@fdm-monster/client-next 0.0.20 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.yarn/install-state.gz +0 -0
- package/RELEASE_NOTES.MD +10 -0
- package/dist/assets/index-tOR9YF1n.js +93 -0
- package/dist/assets/index-tOR9YF1n.js.map +1 -0
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/index-CXYoPsmd.js +0 -93
- package/dist/assets/index-CXYoPsmd.js.map +0 -1
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
var eD=Object.defineProperty;var W0=e=>{throw TypeError(e)};var tD=(e,t,n)=>t in e?eD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var _e=(e,t,n)=>tD(e,typeof t!="symbol"?t+"":t,n),Wm=(e,t,n)=>t.has(e)||W0("Cannot "+n);var W=(e,t,n)=>(Wm(e,t,"read from private field"),n?n.call(e):t.get(e)),je=(e,t,n)=>t.has(e)?W0("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),De=(e,t,n,r)=>(Wm(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),tt=(e,t,n)=>(Wm(e,t,"access private method"),n);var Yd=(e,t,n,r)=>({set _(s){De(e,t,s,n)},get _(){return W(e,t,r)}});try{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="80abfbbd-4bef-4054-9016-33ac6ac9ff8f",e._sentryDebugIdIdentifier="sentry-dbid-80abfbbd-4bef-4054-9016-33ac6ac9ff8f")}catch{}{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"b93d9c018c577072a74a2a375a22c7f8a0a7bbe2"}}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();/**
|
|
2
|
+
* @vue/shared v3.5.14
|
|
3
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
|
+
* @license MIT
|
|
5
|
+
**//*! #__NO_SIDE_EFFECTS__ */function Eb(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const $t={},Dl=[],oi=()=>{},nD=()=>!1,Tp=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Cb=e=>e.startsWith("onUpdate:"),vn=Object.assign,Tb=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},rD=Object.prototype.hasOwnProperty,Tt=(e,t)=>rD.call(e,t),We=Array.isArray,Ll=e=>Pp(e)==="[object Map]",eC=e=>Pp(e)==="[object Set]",Xe=e=>typeof e=="function",rn=e=>typeof e=="string",Yi=e=>typeof e=="symbol",Yt=e=>e!==null&&typeof e=="object",tC=e=>(Yt(e)||Xe(e))&&Xe(e.then)&&Xe(e.catch),nC=Object.prototype.toString,Pp=e=>nC.call(e),sD=e=>Pp(e).slice(8,-1),rC=e=>Pp(e)==="[object Object]",Pb=e=>rn(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,yc=Eb(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Rp=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},iD=/-(\w)/g,Rr=Rp(e=>e.replace(iD,(t,n)=>n?n.toUpperCase():"")),oD=/\B([A-Z])/g,Uo=Rp(e=>e.replace(oD,"-$1").toLowerCase()),ci=Rp(e=>e.charAt(0).toUpperCase()+e.slice(1)),Gm=Rp(e=>e?`on${ci(e)}`:""),Co=(e,t)=>!Object.is(e,t),jf=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},sC=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},yv=e=>{const t=parseFloat(e);return isNaN(t)?e:t},aD=e=>{const t=rn(e)?Number(e):NaN;return isNaN(t)?e:t};let G0;const Ip=()=>G0||(G0=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function is(e){if(We(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],s=rn(r)?dD(r):is(r);if(s)for(const i in s)t[i]=s[i]}return t}else if(rn(e)||Yt(e))return e}const lD=/;(?![^(]*\))/g,uD=/:([^]+)/,cD=/\/\*[^]*?\*\//g;function dD(e){const t={};return e.replace(cD,"").split(lD).forEach(n=>{if(n){const r=n.split(uD);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function zo(e){let t="";if(rn(e))t=e;else if(We(e))for(let n=0;n<e.length;n++){const r=zo(e[n]);r&&(t+=r+" ")}else if(Yt(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function bv(e){if(!e)return null;let{class:t,style:n}=e;return t&&!rn(t)&&(e.class=zo(t)),n&&(e.style=is(n)),e}const fD="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",hD=Eb(fD);function iC(e){return!!e||e===""}const oC=e=>!!(e&&e.__v_isRef===!0),se=e=>rn(e)?e:e==null?"":We(e)||Yt(e)&&(e.toString===nC||!Xe(e.toString))?oC(e)?se(e.value):JSON.stringify(e,aC,2):String(e),aC=(e,t)=>oC(t)?aC(e,t.value):Ll(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,s],i)=>(n[Km(r,i)+" =>"]=s,n),{})}:eC(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Km(n))}:Yi(t)?Km(t):Yt(t)&&!We(t)&&!rC(t)?String(t):t,Km=(e,t="")=>{var n;return Yi(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
|
|
6
|
+
* @vue/reactivity v3.5.14
|
|
7
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
8
|
+
* @license MIT
|
|
9
|
+
**/let Xn;class lC{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Xn,!t&&Xn&&(this.index=(Xn.scopes||(Xn.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=Xn;try{return Xn=this,t()}finally{Xn=n}}}on(){++this._on===1&&(this.prevScope=Xn,Xn=this)}off(){this._on>0&&--this._on===0&&(Xn=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(this.effects.length=0,n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}}function $a(e){return new lC(e)}function Ap(){return Xn}function yn(e,t=!1){Xn&&Xn.cleanups.push(e)}let Ht;const Ym=new WeakSet;class uC{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Xn&&Xn.active&&Xn.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ym.has(this)&&(Ym.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||dC(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,K0(this),fC(this);const t=Ht,n=Rs;Ht=this,Rs=!0;try{return this.fn()}finally{hC(this),Ht=t,Rs=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Ab(t);this.deps=this.depsTail=void 0,K0(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ym.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){_v(this)&&this.run()}get dirty(){return _v(this)}}let cC=0,bc,_c;function dC(e,t=!1){if(e.flags|=8,t){e.next=_c,_c=e;return}e.next=bc,bc=e}function Rb(){cC++}function Ib(){if(--cC>0)return;if(_c){let t=_c;for(_c=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;bc;){let t=bc;for(bc=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function fC(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function hC(e){let t,n=e.depsTail,r=n;for(;r;){const s=r.prevDep;r.version===-1?(r===n&&(n=s),Ab(r),pD(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}e.deps=t,e.depsTail=n}function _v(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(pC(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function pC(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Vc)||(e.globalVersion=Vc,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!_v(e))))return;e.flags|=2;const t=e.dep,n=Ht,r=Rs;Ht=e,Rs=!0;try{fC(e);const s=e.fn(e._value);(t.version===0||Co(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{Ht=n,Rs=r,hC(e),e.flags&=-3}}function Ab(e,t=!1){const{dep:n,prevSub:r,nextSub:s}=e;if(r&&(r.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)Ab(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function pD(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Rs=!0;const mC=[];function Ni(){mC.push(Rs),Rs=!1}function Vi(){const e=mC.pop();Rs=e===void 0?!0:e}function K0(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ht;Ht=void 0;try{t()}finally{Ht=n}}}let Vc=0;class mD{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Ob{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!Ht||!Rs||Ht===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ht)n=this.activeLink=new mD(Ht,this),Ht.deps?(n.prevDep=Ht.depsTail,Ht.depsTail.nextDep=n,Ht.depsTail=n):Ht.deps=Ht.depsTail=n,gC(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=Ht.depsTail,n.nextDep=void 0,Ht.depsTail.nextDep=n,Ht.depsTail=n,Ht.deps===n&&(Ht.deps=r)}return n}trigger(t){this.version++,Vc++,this.notify(t)}notify(t){Rb();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Ib()}}}function gC(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)gC(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const kh=new WeakMap,Ea=Symbol(""),wv=Symbol(""),Bc=Symbol("");function Jn(e,t,n){if(Rs&&Ht){let r=kh.get(e);r||kh.set(e,r=new Map);let s=r.get(n);s||(r.set(n,s=new Ob),s.map=r,s.key=n),s.track()}}function Oi(e,t,n,r,s,i){const o=kh.get(e);if(!o){Vc++;return}const a=l=>{l&&l.trigger()};if(Rb(),t==="clear")o.forEach(a);else{const l=We(e),u=l&&Pb(n);if(l&&n==="length"){const c=Number(r);o.forEach((d,f)=>{(f==="length"||f===Bc||!Yi(f)&&f>=c)&&a(d)})}else switch((n!==void 0||o.has(void 0))&&a(o.get(n)),u&&a(o.get(Bc)),t){case"add":l?u&&a(o.get("length")):(a(o.get(Ea)),Ll(e)&&a(o.get(wv)));break;case"delete":l||(a(o.get(Ea)),Ll(e)&&a(o.get(wv)));break;case"set":Ll(e)&&a(o.get(Ea));break}}Ib()}function gD(e,t){const n=kh.get(e);return n&&n.get(t)}function al(e){const t=Be(e);return t===e?t:(Jn(t,"iterate",Bc),os(e)?t:t.map($n))}function Op(e){return Jn(e=Be(e),"iterate",Bc),e}const vD={__proto__:null,[Symbol.iterator](){return Xm(this,Symbol.iterator,$n)},concat(...e){return al(this).concat(...e.map(t=>We(t)?al(t):t))},entries(){return Xm(this,"entries",e=>(e[1]=$n(e[1]),e))},every(e,t){return gi(this,"every",e,t,void 0,arguments)},filter(e,t){return gi(this,"filter",e,t,n=>n.map($n),arguments)},find(e,t){return gi(this,"find",e,t,$n,arguments)},findIndex(e,t){return gi(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return gi(this,"findLast",e,t,$n,arguments)},findLastIndex(e,t){return gi(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return gi(this,"forEach",e,t,void 0,arguments)},includes(...e){return Qm(this,"includes",e)},indexOf(...e){return Qm(this,"indexOf",e)},join(e){return al(this).join(e)},lastIndexOf(...e){return Qm(this,"lastIndexOf",e)},map(e,t){return gi(this,"map",e,t,void 0,arguments)},pop(){return Yu(this,"pop")},push(...e){return Yu(this,"push",e)},reduce(e,...t){return Y0(this,"reduce",e,t)},reduceRight(e,...t){return Y0(this,"reduceRight",e,t)},shift(){return Yu(this,"shift")},some(e,t){return gi(this,"some",e,t,void 0,arguments)},splice(...e){return Yu(this,"splice",e)},toReversed(){return al(this).toReversed()},toSorted(e){return al(this).toSorted(e)},toSpliced(...e){return al(this).toSpliced(...e)},unshift(...e){return Yu(this,"unshift",e)},values(){return Xm(this,"values",$n)}};function Xm(e,t,n){const r=Op(e),s=r[t]();return r!==e&&!os(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.value&&(i.value=n(i.value)),i}),s}const yD=Array.prototype;function gi(e,t,n,r,s,i){const o=Op(e),a=o!==e&&!os(e),l=o[t];if(l!==yD[t]){const d=l.apply(e,i);return a?$n(d):d}let u=n;o!==e&&(a?u=function(d,f){return n.call(this,$n(d),f,e)}:n.length>2&&(u=function(d,f){return n.call(this,d,f,e)}));const c=l.call(o,u,r);return a&&s?s(c):c}function Y0(e,t,n,r){const s=Op(e);let i=n;return s!==e&&(os(e)?n.length>3&&(i=function(o,a,l){return n.call(this,o,a,l,e)}):i=function(o,a,l){return n.call(this,o,$n(a),l,e)}),s[t](i,...r)}function Qm(e,t,n){const r=Be(e);Jn(r,"iterate",Bc);const s=r[t](...n);return(s===-1||s===!1)&&_d(n[0])?(n[0]=Be(n[0]),r[t](...n)):s}function Yu(e,t,n=[]){Ni(),Rb();const r=Be(e)[t].apply(e,n);return Ib(),Vi(),r}const bD=Eb("__proto__,__v_isRef,__isVue"),vC=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Yi));function _D(e){Yi(e)||(e=String(e));const t=Be(this);return Jn(t,"has",e),t.hasOwnProperty(e)}class yC{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;const s=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return i;if(n==="__v_raw")return r===(s?i?xC:kC:i?SC:wC).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const o=We(t);if(!s){let l;if(o&&(l=vD[n]))return l;if(n==="hasOwnProperty")return _D}const a=Reflect.get(t,n,et(t)?t:r);return(Yi(n)?vC.has(n):bD(n))||(s||Jn(t,"get",n),i)?a:et(a)?o&&Pb(n)?a:a.value:Yt(a)?s?Ho(a):cn(a):a}}class bC extends yC{constructor(t=!1){super(!1,t)}set(t,n,r,s){let i=t[n];if(!this._isShallow){const l=Do(i);if(!os(r)&&!Do(r)&&(i=Be(i),r=Be(r)),!We(t)&&et(i)&&!et(r))return l?!1:(i.value=r,!0)}const o=We(t)&&Pb(n)?Number(n)<t.length:Tt(t,n),a=Reflect.set(t,n,r,et(t)?t:s);return t===Be(s)&&(o?Co(r,i)&&Oi(t,"set",n,r):Oi(t,"add",n,r)),a}deleteProperty(t,n){const r=Tt(t,n);t[n];const s=Reflect.deleteProperty(t,n);return s&&r&&Oi(t,"delete",n,void 0),s}has(t,n){const r=Reflect.has(t,n);return(!Yi(n)||!vC.has(n))&&Jn(t,"has",n),r}ownKeys(t){return Jn(t,"iterate",We(t)?"length":Ea),Reflect.ownKeys(t)}}class _C extends yC{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const wD=new bC,SD=new _C,kD=new bC(!0),xD=new _C(!0),Sv=e=>e,Xd=e=>Reflect.getPrototypeOf(e);function ED(e,t,n){return function(...r){const s=this.__v_raw,i=Be(s),o=Ll(i),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,u=s[e](...r),c=n?Sv:t?xh:$n;return!t&&Jn(i,"iterate",l?wv:Ea),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:a?[c(d[0]),c(d[1])]:c(d),done:f}},[Symbol.iterator](){return this}}}}function Qd(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function CD(e,t){const n={get(s){const i=this.__v_raw,o=Be(i),a=Be(s);e||(Co(s,a)&&Jn(o,"get",s),Jn(o,"get",a));const{has:l}=Xd(o),u=t?Sv:e?xh:$n;if(l.call(o,s))return u(i.get(s));if(l.call(o,a))return u(i.get(a));i!==o&&i.get(s)},get size(){const s=this.__v_raw;return!e&&Jn(Be(s),"iterate",Ea),Reflect.get(s,"size",s)},has(s){const i=this.__v_raw,o=Be(i),a=Be(s);return e||(Co(s,a)&&Jn(o,"has",s),Jn(o,"has",a)),s===a?i.has(s):i.has(s)||i.has(a)},forEach(s,i){const o=this,a=o.__v_raw,l=Be(a),u=t?Sv:e?xh:$n;return!e&&Jn(l,"iterate",Ea),a.forEach((c,d)=>s.call(i,u(c),u(d),o))}};return vn(n,e?{add:Qd("add"),set:Qd("set"),delete:Qd("delete"),clear:Qd("clear")}:{add(s){!t&&!os(s)&&!Do(s)&&(s=Be(s));const i=Be(this);return Xd(i).has.call(i,s)||(i.add(s),Oi(i,"add",s,s)),this},set(s,i){!t&&!os(i)&&!Do(i)&&(i=Be(i));const o=Be(this),{has:a,get:l}=Xd(o);let u=a.call(o,s);u||(s=Be(s),u=a.call(o,s));const c=l.call(o,s);return o.set(s,i),u?Co(i,c)&&Oi(o,"set",s,i):Oi(o,"add",s,i),this},delete(s){const i=Be(this),{has:o,get:a}=Xd(i);let l=o.call(i,s);l||(s=Be(s),l=o.call(i,s)),a&&a.call(i,s);const u=i.delete(s);return l&&Oi(i,"delete",s,void 0),u},clear(){const s=Be(this),i=s.size!==0,o=s.clear();return i&&Oi(s,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=ED(s,e,t)}),n}function Mp(e,t){const n=CD(e,t);return(r,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?r:Reflect.get(Tt(n,s)&&s in r?n:r,s,i)}const TD={get:Mp(!1,!1)},PD={get:Mp(!1,!0)},RD={get:Mp(!0,!1)},ID={get:Mp(!0,!0)},wC=new WeakMap,SC=new WeakMap,kC=new WeakMap,xC=new WeakMap;function AD(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function OD(e){return e.__v_skip||!Object.isExtensible(e)?0:AD(sD(e))}function cn(e){return Do(e)?e:Lp(e,!1,wD,TD,wC)}function Dp(e){return Lp(e,!1,kD,PD,SC)}function Ho(e){return Lp(e,!0,SD,RD,kC)}function Mb(e){return Lp(e,!0,xD,ID,xC)}function Lp(e,t,n,r,s){if(!Yt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=OD(e);if(i===0)return e;const o=s.get(e);if(o)return o;const a=new Proxy(e,i===2?r:n);return s.set(e,a),a}function To(e){return Do(e)?To(e.__v_raw):!!(e&&e.__v_isReactive)}function Do(e){return!!(e&&e.__v_isReadonly)}function os(e){return!!(e&&e.__v_isShallow)}function _d(e){return e?!!e.__v_raw:!1}function Be(e){const t=e&&e.__v_raw;return t?Be(t):e}function $p(e){return!Tt(e,"__v_skip")&&Object.isExtensible(e)&&sC(e,"__v_skip",!0),e}const $n=e=>Yt(e)?cn(e):e,xh=e=>Yt(e)?Ho(e):e;function et(e){return e?e.__v_isRef===!0:!1}function j(e){return EC(e,!1)}function Ie(e){return EC(e,!0)}function EC(e,t){return et(e)?e:new MD(e,t)}class MD{constructor(t,n){this.dep=new Ob,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Be(t),this._value=n?t:$n(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||os(t)||Do(t);t=r?t:Be(t),Co(t,n)&&(this._rawValue=t,this._value=r?t:$n(t),this.dep.trigger())}}function X(e){return et(e)?e.value:e}function Bn(e){return Xe(e)?e():X(e)}const DD={get:(e,t,n)=>t==="__v_raw"?e:X(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const s=e[t];return et(s)&&!et(n)?(s.value=n,!0):Reflect.set(e,t,n,r)}};function CC(e){return To(e)?e:new Proxy(e,DD)}function Xa(e){const t=We(e)?new Array(e.length):{};for(const n in e)t[n]=TC(e,n);return t}class LD{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return gD(Be(this._object),this._key)}}class $D{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function ae(e,t,n){return et(e)?e:Xe(e)?new $D(e):Yt(e)&&arguments.length>1?TC(e,t,n):j(e)}function TC(e,t,n){const r=e[t];return et(r)?r:new LD(e,t,n)}class FD{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Ob(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Vc-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&Ht!==this)return dC(this,!0),!0}get value(){const t=this.dep.track();return pC(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function ND(e,t,n=!1){let r,s;return Xe(e)?r=e:(r=e.get,s=e.set),new FD(r,s,n)}const Jd={},Eh=new WeakMap;let ia;function VD(e,t=!1,n=ia){if(n){let r=Eh.get(n);r||Eh.set(n,r=[]),r.push(e)}}function BD(e,t,n=$t){const{immediate:r,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=n,u=C=>s?C:os(C)||s===!1||s===0?Mi(C,1):Mi(C);let c,d,f,p,g=!1,m=!1;if(et(e)?(d=()=>e.value,g=os(e)):To(e)?(d=()=>u(e),g=!0):We(e)?(m=!0,g=e.some(C=>To(C)||os(C)),d=()=>e.map(C=>{if(et(C))return C.value;if(To(C))return u(C);if(Xe(C))return l?l(C,2):C()})):Xe(e)?t?d=l?()=>l(e,2):e:d=()=>{if(f){Ni();try{f()}finally{Vi()}}const C=ia;ia=c;try{return l?l(e,3,[p]):e(p)}finally{ia=C}}:d=oi,t&&s){const C=d,S=s===!0?1/0:s;d=()=>Mi(C(),S)}const y=Ap(),_=()=>{c.stop(),y&&y.active&&Tb(y.effects,c)};if(i&&t){const C=t;t=(...S)=>{C(...S),_()}}let b=m?new Array(e.length).fill(Jd):Jd;const x=C=>{if(!(!(c.flags&1)||!c.dirty&&!C))if(t){const S=c.run();if(s||g||(m?S.some((T,P)=>Co(T,b[P])):Co(S,b))){f&&f();const T=ia;ia=c;try{const P=[S,b===Jd?void 0:m&&b[0]===Jd?[]:b,p];l?l(t,3,P):t(...P),b=S}finally{ia=T}}}else c.run()};return a&&a(x),c=new uC(d),c.scheduler=o?()=>o(x,!1):x,p=C=>VD(C,!1,c),f=c.onStop=()=>{const C=Eh.get(c);if(C){if(l)l(C,4);else for(const S of C)S();Eh.delete(c)}},t?r?x(!0):b=c.run():o?o(x.bind(null,!0),!0):c.run(),_.pause=c.pause.bind(c),_.resume=c.resume.bind(c),_.stop=_,_}function Mi(e,t=1/0,n){if(t<=0||!Yt(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,et(e))Mi(e.value,t,n);else if(We(e))for(let r=0;r<e.length;r++)Mi(e[r],t,n);else if(eC(e)||Ll(e))e.forEach(r=>{Mi(r,t,n)});else if(rC(e)){for(const r in e)Mi(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Mi(e[r],t,n)}return e}/**
|
|
10
|
+
* @vue/runtime-core v3.5.14
|
|
11
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
12
|
+
* @license MIT
|
|
13
|
+
**/function wd(e,t,n,r){try{return r?e(...r):e()}catch(s){Fp(s,t,n)}}function Is(e,t,n,r){if(Xe(e)){const s=wd(e,t,n,r);return s&&tC(s)&&s.catch(i=>{Fp(i,t,n)}),s}if(We(e)){const s=[];for(let i=0;i<e.length;i++)s.push(Is(e[i],t,n,r));return s}}function Fp(e,t,n,r=!0){const s=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||$t;if(t){let a=t.parent;const l=t.proxy,u=`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const c=a.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,l,u)===!1)return}a=a.parent}if(i){Ni(),wd(i,null,10,[e,l,u]),Vi();return}}UD(e,n,s,r,o)}function UD(e,t,n,r=!0,s=!1){if(s)throw e;console.error(e)}const cr=[];let Xs=-1;const $l=[];let oo=null,bl=0;const PC=Promise.resolve();let Ch=null;function Mt(e){const t=Ch||PC;return e?t.then(this?e.bind(this):e):t}function zD(e){let t=Xs+1,n=cr.length;for(;t<n;){const r=t+n>>>1,s=cr[r],i=Uc(s);i<e||i===e&&s.flags&2?t=r+1:n=r}return t}function Db(e){if(!(e.flags&1)){const t=Uc(e),n=cr[cr.length-1];!n||!(e.flags&2)&&t>=Uc(n)?cr.push(e):cr.splice(zD(t),0,e),e.flags|=1,RC()}}function RC(){Ch||(Ch=PC.then(AC))}function HD(e){We(e)?$l.push(...e):oo&&e.id===-1?oo.splice(bl+1,0,e):e.flags&1||($l.push(e),e.flags|=1),RC()}function X0(e,t,n=Xs+1){for(;n<cr.length;n++){const r=cr[n];if(r&&r.flags&2){if(e&&r.id!==e.uid)continue;cr.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function IC(e){if($l.length){const t=[...new Set($l)].sort((n,r)=>Uc(n)-Uc(r));if($l.length=0,oo){oo.push(...t);return}for(oo=t,bl=0;bl<oo.length;bl++){const n=oo[bl];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}oo=null,bl=0}}const Uc=e=>e.id==null?e.flags&2?-1:1/0:e.id;function AC(e){try{for(Xs=0;Xs<cr.length;Xs++){const t=cr[Xs];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),wd(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Xs<cr.length;Xs++){const t=cr[Xs];t&&(t.flags&=-2)}Xs=-1,cr.length=0,IC(),Ch=null,(cr.length||$l.length)&&AC()}}let xn=null,OC=null;function Th(e){const t=xn;return xn=e,OC=e&&e.type.__scopeId||null,t}function v(e,t=xn,n){if(!t||e._n)return e;const r=(...s)=>{r._d&&u1(-1);const i=Th(t);let o;try{o=e(...s)}finally{Th(i),r._d&&u1(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function Nt(e,t){if(xn===null)return e;const n=jp(xn),r=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[i,o,a,l=$t]=t[s];i&&(Xe(i)&&(i={mounted:i,updated:i}),i.deep&&Mi(o),r.push({dir:i,instance:n,value:o,oldValue:void 0,arg:a,modifiers:l}))}return e}function Xo(e,t,n,r){const s=e.dirs,i=t&&t.dirs;for(let o=0;o<s.length;o++){const a=s[o];i&&(a.oldValue=i[o].value);let l=a.dir[r];l&&(Ni(),Is(l,n,8,[e.el,a,e,t]),Vi())}}const MC=Symbol("_vte"),DC=e=>e.__isTeleport,wc=e=>e&&(e.disabled||e.disabled===""),Q0=e=>e&&(e.defer||e.defer===""),J0=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Z0=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,kv=(e,t)=>{const n=e&&e.to;return rn(n)?t?t(n):null:n},LC={name:"Teleport",__isTeleport:!0,process(e,t,n,r,s,i,o,a,l,u){const{mc:c,pc:d,pbc:f,o:{insert:p,querySelector:g,createText:m,createComment:y}}=u,_=wc(t.props);let{shapeFlag:b,children:x,dynamicChildren:C}=t;if(e==null){const S=t.el=m(""),T=t.anchor=m("");p(S,n,r),p(T,n,r);const P=(E,I)=>{b&16&&(s&&s.isCE&&(s.ce._teleportTarget=E),c(x,E,I,s,i,o,a,l))},w=()=>{const E=t.target=kv(t.props,g),I=$C(E,t,m,p);E&&(o!=="svg"&&J0(E)?o="svg":o!=="mathml"&&Z0(E)&&(o="mathml"),_||(P(E,I),qf(t,!1)))};_&&(P(n,T),qf(t,!0)),Q0(t.props)?ur(()=>{w(),t.el.__isMounted=!0},i):w()}else{if(Q0(t.props)&&!e.el.__isMounted){ur(()=>{LC.process(e,t,n,r,s,i,o,a,l,u),delete e.el.__isMounted},i);return}t.el=e.el,t.targetStart=e.targetStart;const S=t.anchor=e.anchor,T=t.target=e.target,P=t.targetAnchor=e.targetAnchor,w=wc(e.props),E=w?n:T,I=w?S:P;if(o==="svg"||J0(T)?o="svg":(o==="mathml"||Z0(T))&&(o="mathml"),C?(f(e.dynamicChildren,C,E,s,i,o,a),Hb(e,t,!0)):l||d(e,t,E,I,s,i,o,a,!1),_)w?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Zd(t,n,S,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const O=t.target=kv(t.props,g);O&&Zd(t,O,null,u,0)}else w&&Zd(t,T,P,u,1);qf(t,_)}},remove(e,t,n,{um:r,o:{remove:s}},i){const{shapeFlag:o,children:a,anchor:l,targetStart:u,targetAnchor:c,target:d,props:f}=e;if(d&&(s(u),s(c)),i&&s(l),o&16){const p=i||!wc(f);for(let g=0;g<a.length;g++){const m=a[g];r(m,t,n,p,!!m.dynamicChildren)}}},move:Zd,hydrate:jD};function Zd(e,t,n,{o:{insert:r},m:s},i=2){i===0&&r(e.targetAnchor,t,n);const{el:o,anchor:a,shapeFlag:l,children:u,props:c}=e,d=i===2;if(d&&r(o,t,n),(!d||wc(c))&&l&16)for(let f=0;f<u.length;f++)s(u[f],t,n,2);d&&r(a,t,n)}function jD(e,t,n,r,s,i,{o:{nextSibling:o,parentNode:a,querySelector:l,insert:u,createText:c}},d){const f=t.target=kv(t.props,l);if(f){const p=wc(t.props),g=f._lpa||f.firstChild;if(t.shapeFlag&16)if(p)t.anchor=d(o(e),t,a(e),n,r,s,i),t.targetStart=g,t.targetAnchor=g&&o(g);else{t.anchor=o(e);let m=g;for(;m;){if(m&&m.nodeType===8){if(m.data==="teleport start anchor")t.targetStart=m;else if(m.data==="teleport anchor"){t.targetAnchor=m,f._lpa=t.targetAnchor&&o(t.targetAnchor);break}}m=o(m)}t.targetAnchor||$C(f,t,c,u),d(g&&o(g),t,f,n,r,s,i)}qf(t,p)}return t.anchor&&o(t.anchor)}const qD=LC;function qf(e,t){const n=e.ctx;if(n&&n.ut){let r,s;for(t?(r=e.el,s=e.anchor):(r=e.targetStart,s=e.targetAnchor);r&&r!==s;)r.nodeType===1&&r.setAttribute("data-v-owner",n.uid),r=r.nextSibling;n.ut()}}function $C(e,t,n,r){const s=t.targetStart=n(""),i=t.targetAnchor=n("");return s[MC]=i,e&&(r(s,e),r(i,e)),i}const ao=Symbol("_leaveCb"),ef=Symbol("_enterCb");function FC(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return bt(()=>{e.isMounted=!0}),Cn(()=>{e.isUnmounting=!0}),e}const Xr=[Function,Array],NC={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Xr,onEnter:Xr,onAfterEnter:Xr,onEnterCancelled:Xr,onBeforeLeave:Xr,onLeave:Xr,onAfterLeave:Xr,onLeaveCancelled:Xr,onBeforeAppear:Xr,onAppear:Xr,onAfterAppear:Xr,onAppearCancelled:Xr},VC=e=>{const t=e.subTree;return t.component?VC(t.component):t},WD={name:"BaseTransition",props:NC,setup(e,{slots:t}){const n=Hp(),r=FC();return()=>{const s=t.default&&Lb(t.default(),!0);if(!s||!s.length)return;const i=BC(s),o=Be(e),{mode:a}=o;if(r.isLeaving)return Jm(i);const l=e1(i);if(!l)return Jm(i);let u=zc(l,o,r,n,d=>u=d);l.type!==Nn&&Fa(l,u);let c=n.subTree&&e1(n.subTree);if(c&&c.type!==Nn&&!ua(l,c)&&VC(n).type!==Nn){let d=zc(c,o,r,n);if(Fa(c,d),a==="out-in"&&l.type!==Nn)return r.isLeaving=!0,d.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,c=void 0},Jm(i);a==="in-out"&&l.type!==Nn?d.delayLeave=(f,p,g)=>{const m=UC(r,c);m[String(c.key)]=c,f[ao]=()=>{p(),f[ao]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{g(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return i}}};function BC(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Nn){t=n;break}}return t}const GD=WD;function UC(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function zc(e,t,n,r,s){const{appear:i,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:p,onAfterLeave:g,onLeaveCancelled:m,onBeforeAppear:y,onAppear:_,onAfterAppear:b,onAppearCancelled:x}=t,C=String(e.key),S=UC(n,e),T=(E,I)=>{E&&Is(E,r,9,I)},P=(E,I)=>{const O=I[1];T(E,I),We(E)?E.every(R=>R.length<=1)&&O():E.length<=1&&O()},w={mode:o,persisted:a,beforeEnter(E){let I=l;if(!n.isMounted)if(i)I=y||l;else return;E[ao]&&E[ao](!0);const O=S[C];O&&ua(e,O)&&O.el[ao]&&O.el[ao](),T(I,[E])},enter(E){let I=u,O=c,R=d;if(!n.isMounted)if(i)I=_||u,O=b||c,R=x||d;else return;let M=!1;const D=E[ef]=F=>{M||(M=!0,F?T(R,[E]):T(O,[E]),w.delayedLeave&&w.delayedLeave(),E[ef]=void 0)};I?P(I,[E,D]):D()},leave(E,I){const O=String(e.key);if(E[ef]&&E[ef](!0),n.isUnmounting)return I();T(f,[E]);let R=!1;const M=E[ao]=D=>{R||(R=!0,I(),D?T(m,[E]):T(g,[E]),E[ao]=void 0,S[O]===e&&delete S[O])};S[O]=e,p?P(p,[E,M]):M()},clone(E){const I=zc(E,t,n,r,s);return s&&s(I),I}};return w}function Jm(e){if(Np(e))return e=Bi(e),e.children=null,e}function e1(e){if(!Np(e))return DC(e.type)&&e.children?BC(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&Xe(n.default))return n.default()}}function Fa(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Fa(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Lb(e,t=!1,n){let r=[],s=0;for(let i=0;i<e.length;i++){let o=e[i];const a=n==null?o.key:String(n)+String(o.key!=null?o.key:i);o.type===Ae?(o.patchFlag&128&&s++,r=r.concat(Lb(o.children,t,a))):(t||o.type!==Nn)&&r.push(a!=null?Bi(o,{key:a}):o)}if(s>1)for(let i=0;i<r.length;i++)r[i].patchFlag=-2;return r}/*! #__NO_SIDE_EFFECTS__ */function Le(e,t){return Xe(e)?vn({name:e.name},t,{setup:e}):e}function ms(){const e=Hp();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function zC(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Ph(e,t,n,r,s=!1){if(We(e)){e.forEach((g,m)=>Ph(g,t&&(We(t)?t[m]:t),n,r,s));return}if(Fl(r)&&!s){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Ph(e,t,n,r.component.subTree);return}const i=r.shapeFlag&4?jp(r.component):r.el,o=s?null:i,{i:a,r:l}=e,u=t&&t.r,c=a.refs===$t?a.refs={}:a.refs,d=a.setupState,f=Be(d),p=d===$t?()=>!1:g=>Tt(f,g);if(u!=null&&u!==l&&(rn(u)?(c[u]=null,p(u)&&(d[u]=null)):et(u)&&(u.value=null)),Xe(l))wd(l,a,12,[o,c]);else{const g=rn(l),m=et(l);if(g||m){const y=()=>{if(e.f){const _=g?p(l)?d[l]:c[l]:l.value;s?We(_)&&Tb(_,i):We(_)?_.includes(i)||_.push(i):g?(c[l]=[i],p(l)&&(d[l]=c[l])):(l.value=[i],e.k&&(c[e.k]=l.value))}else g?(c[l]=o,p(l)&&(d[l]=o)):m&&(l.value=o,e.k&&(c[e.k]=o))};o?(y.id=-1,ur(y,n)):y()}}}Ip().requestIdleCallback;Ip().cancelIdleCallback;const Fl=e=>!!e.type.__asyncLoader,Np=e=>e.type.__isKeepAlive;function HC(e,t){jC(e,"a",t)}function $b(e,t){jC(e,"da",t)}function jC(e,t,n=Rn){const r=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(Vp(t,r,n),n){let s=n.parent;for(;s&&s.parent;)Np(s.parent.vnode)&&KD(r,t,n,s),s=s.parent}}function KD(e,t,n,r){const s=Vp(t,e,r,!0);Bp(()=>{Tb(r[t],s)},n)}function Vp(e,t,n=Rn,r=!1){if(n){const s=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{Ni();const a=kd(n),l=Is(t,n,e,o);return a(),Vi(),l});return r?s.unshift(i):s.push(i),i}}const Xi=e=>(t,n=Rn)=>{(!jc||e==="sp")&&Vp(e,(...r)=>t(...r),n)},wu=Xi("bm"),bt=Xi("m"),qC=Xi("bu"),Fb=Xi("u"),Cn=Xi("bum"),Bp=Xi("um"),YD=Xi("sp"),XD=Xi("rtg"),QD=Xi("rtc");function JD(e,t=Rn){Vp("ec",e,t)}const Nb="components",ZD="directives";function In(e,t){return Vb(Nb,e,!0,t)||e}const eL=Symbol.for("v-ndc");function tL(e){return rn(e)&&Vb(Nb,e,!1)||e}function hr(e){return Vb(ZD,e)}function Vb(e,t,n=!0,r=!1){const s=xn||Rn;if(s){const i=s.type;if(e===Nb){const a=VL(i,!1);if(a&&(a===t||a===Rr(t)||a===ci(Rr(t))))return i}const o=t1(s[e]||i[e],t)||t1(s.appContext[e],t);return!o&&r?i:o}}function t1(e,t){return e&&(e[t]||e[Rr(t)]||e[ci(Rr(t))])}function Gt(e,t,n,r){let s;const i=n,o=We(e);if(o||rn(e)){const a=o&&To(e);let l=!1,u=!1;a&&(l=!os(e),u=Do(e),e=Op(e)),s=new Array(e.length);for(let c=0,d=e.length;c<d;c++)s[c]=t(l?u?xh($n(e[c])):$n(e[c]):e[c],c,void 0,i)}else if(typeof e=="number"){s=new Array(e);for(let a=0;a<e;a++)s[a]=t(a+1,a,void 0,i)}else if(Yt(e))if(e[Symbol.iterator])s=Array.from(e,(a,l)=>t(a,l,void 0,i));else{const a=Object.keys(e);s=new Array(a.length);for(let l=0,u=a.length;l<u;l++){const c=a[l];s[l]=t(e[c],c,l,i)}}else s=[];return s}function WC(e,t){for(let n=0;n<t.length;n++){const r=t[n];if(We(r))for(let s=0;s<r.length;s++)e[r[s].name]=r[s].fn;else r&&(e[r.name]=r.key?(...s)=>{const i=r.fn(...s);return i&&(i.key=r.key),i}:r.fn)}return e}function Up(e,t,n={},r,s){if(xn.ce||xn.parent&&Fl(xn.parent)&&xn.parent.ce)return $(),te(Ae,null,[h("slot",n,r&&r())],64);let i=e[t];i&&i._c&&(i._d=!1),$();const o=i&&GC(i(n)),a=n.key||o&&o.key,l=te(Ae,{key:(a&&!Yi(a)?a:`_${t}`)+(!o&&r?"_fb":"")},o||(r?r():[]),o&&e._===1?64:-2);return l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),i&&i._c&&(i._d=!0),l}function GC(e){return e.some(t=>tu(t)?!(t.type===Nn||t.type===Ae&&!GC(t.children)):!0)?e:null}const xv=e=>e?dT(e)?jp(e):xv(e.parent):null,Sc=vn(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>xv(e.parent),$root:e=>xv(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Bb(e),$forceUpdate:e=>e.f||(e.f=()=>{Db(e.update)}),$nextTick:e=>e.n||(e.n=Mt.bind(e.proxy)),$watch:e=>SL.bind(e)}),Zm=(e,t)=>e!==$t&&!e.__isScriptSetup&&Tt(e,t),nL={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:s,props:i,accessCache:o,type:a,appContext:l}=e;let u;if(t[0]!=="$"){const p=o[t];if(p!==void 0)switch(p){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return i[t]}else{if(Zm(r,t))return o[t]=1,r[t];if(s!==$t&&Tt(s,t))return o[t]=2,s[t];if((u=e.propsOptions[0])&&Tt(u,t))return o[t]=3,i[t];if(n!==$t&&Tt(n,t))return o[t]=4,n[t];Ev&&(o[t]=0)}}const c=Sc[t];let d,f;if(c)return t==="$attrs"&&Jn(e.attrs,"get",""),c(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(n!==$t&&Tt(n,t))return o[t]=4,n[t];if(f=l.config.globalProperties,Tt(f,t))return f[t]},set({_:e},t,n){const{data:r,setupState:s,ctx:i}=e;return Zm(s,t)?(s[t]=n,!0):r!==$t&&Tt(r,t)?(r[t]=n,!0):Tt(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:s,propsOptions:i}},o){let a;return!!n[o]||e!==$t&&Tt(e,o)||Zm(t,o)||(a=i[0])&&Tt(a,o)||Tt(r,o)||Tt(Sc,o)||Tt(s.config.globalProperties,o)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Tt(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function n1(e){return We(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Ev=!0;function rL(e){const t=Bb(e),n=e.proxy,r=e.ctx;Ev=!1,t.beforeCreate&&r1(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:o,watch:a,provide:l,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:p,updated:g,activated:m,deactivated:y,beforeDestroy:_,beforeUnmount:b,destroyed:x,unmounted:C,render:S,renderTracked:T,renderTriggered:P,errorCaptured:w,serverPrefetch:E,expose:I,inheritAttrs:O,components:R,directives:M,filters:D}=t;if(u&&sL(u,r,null),o)for(const K in o){const Q=o[K];Xe(Q)&&(r[K]=Q.bind(n))}if(s){const K=s.call(n,n);Yt(K)&&(e.data=cn(K))}if(Ev=!0,i)for(const K in i){const Q=i[K],H=Xe(Q)?Q.bind(n,n):Xe(Q.get)?Q.get.bind(n,n):oi,V=!Xe(Q)&&Xe(Q.set)?Q.set.bind(n):oi,ee=A({get:H,set:V});Object.defineProperty(r,K,{enumerable:!0,configurable:!0,get:()=>ee.value,set:q=>ee.value=q})}if(a)for(const K in a)KC(a[K],r,n,K);if(l){const K=Xe(l)?l.call(n):l;Reflect.ownKeys(K).forEach(Q=>{Kt(Q,K[Q])})}c&&r1(c,e,"c");function U(K,Q){We(Q)?Q.forEach(H=>K(H.bind(n))):Q&&K(Q.bind(n))}if(U(wu,d),U(bt,f),U(qC,p),U(Fb,g),U(HC,m),U($b,y),U(JD,w),U(QD,T),U(XD,P),U(Cn,b),U(Bp,C),U(YD,E),We(I))if(I.length){const K=e.exposed||(e.exposed={});I.forEach(Q=>{Object.defineProperty(K,Q,{get:()=>n[Q],set:H=>n[Q]=H})})}else e.exposed||(e.exposed={});S&&e.render===oi&&(e.render=S),O!=null&&(e.inheritAttrs=O),R&&(e.components=R),M&&(e.directives=M),E&&zC(e)}function sL(e,t,n=oi){We(e)&&(e=Cv(e));for(const r in e){const s=e[r];let i;Yt(s)?"default"in s?i=Qe(s.from||r,s.default,!0):i=Qe(s.from||r):i=Qe(s),et(i)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[r]=i}}function r1(e,t,n){Is(We(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function KC(e,t,n,r){let s=r.includes(".")?oT(n,r):()=>n[r];if(rn(e)){const i=t[e];Xe(i)&&Ee(s,i)}else if(Xe(e))Ee(s,e.bind(n));else if(Yt(e))if(We(e))e.forEach(i=>KC(i,t,n,r));else{const i=Xe(e.handler)?e.handler.bind(n):t[e.handler];Xe(i)&&Ee(s,i,e)}}function Bb(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:s,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,a=i.get(t);let l;return a?l=a:!s.length&&!n&&!r?l=t:(l={},s.length&&s.forEach(u=>Rh(l,u,o,!0)),Rh(l,t,o)),Yt(t)&&i.set(t,l),l}function Rh(e,t,n,r=!1){const{mixins:s,extends:i}=t;i&&Rh(e,i,n,!0),s&&s.forEach(o=>Rh(e,o,n,!0));for(const o in t)if(!(r&&o==="expose")){const a=iL[o]||n&&n[o];e[o]=a?a(e[o],t[o]):t[o]}return e}const iL={data:s1,props:i1,emits:i1,methods:dc,computed:dc,beforeCreate:ir,created:ir,beforeMount:ir,mounted:ir,beforeUpdate:ir,updated:ir,beforeDestroy:ir,beforeUnmount:ir,destroyed:ir,unmounted:ir,activated:ir,deactivated:ir,errorCaptured:ir,serverPrefetch:ir,components:dc,directives:dc,watch:aL,provide:s1,inject:oL};function s1(e,t){return t?e?function(){return vn(Xe(e)?e.call(this,this):e,Xe(t)?t.call(this,this):t)}:t:e}function oL(e,t){return dc(Cv(e),Cv(t))}function Cv(e){if(We(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function ir(e,t){return e?[...new Set([].concat(e,t))]:t}function dc(e,t){return e?vn(Object.create(null),e,t):t}function i1(e,t){return e?We(e)&&We(t)?[...new Set([...e,...t])]:vn(Object.create(null),n1(e),n1(t??{})):t}function aL(e,t){if(!e)return t;if(!t)return e;const n=vn(Object.create(null),e);for(const r in t)n[r]=ir(e[r],t[r]);return n}function YC(){return{app:null,config:{isNativeTag:nD,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let lL=0;function uL(e,t){return function(r,s=null){Xe(r)||(r=vn({},r)),s!=null&&!Yt(s)&&(s=null);const i=YC(),o=new WeakSet,a=[];let l=!1;const u=i.app={_uid:lL++,_component:r,_props:s,_container:null,_context:i,_instance:null,version:hT,get config(){return i.config},set config(c){},use(c,...d){return o.has(c)||(c&&Xe(c.install)?(o.add(c),c.install(u,...d)):Xe(c)&&(o.add(c),c(u,...d))),u},mixin(c){return i.mixins.includes(c)||i.mixins.push(c),u},component(c,d){return d?(i.components[c]=d,u):i.components[c]},directive(c,d){return d?(i.directives[c]=d,u):i.directives[c]},mount(c,d,f){if(!l){const p=u._ceVNode||h(r,s);return p.appContext=i,f===!0?f="svg":f===!1&&(f=void 0),d&&t?t(p,c):e(p,c,f),l=!0,u._container=c,c.__vue_app__=u,jp(p.component)}},onUnmount(c){a.push(c)},unmount(){l&&(Is(a,u._instance,16),e(null,u._container),delete u._container.__vue_app__)},provide(c,d){return i.provides[c]=d,u},runWithContext(c){const d=Ca;Ca=u;try{return c()}finally{Ca=d}}};return u}}let Ca=null;function Kt(e,t){if(Rn){let n=Rn.provides;const r=Rn.parent&&Rn.parent.provides;r===n&&(n=Rn.provides=Object.create(r)),n[e]=t}}function Qe(e,t,n=!1){const r=Rn||xn;if(r||Ca){const s=Ca?Ca._context.provides:r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(s&&e in s)return s[e];if(arguments.length>1)return n&&Xe(t)?t.call(r&&r.proxy):t}}function XC(){return!!(Rn||xn||Ca)}const QC={},JC=()=>Object.create(QC),ZC=e=>Object.getPrototypeOf(e)===QC;function cL(e,t,n,r=!1){const s={},i=JC();e.propsDefaults=Object.create(null),eT(e,t,s,i);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);n?e.props=r?s:Dp(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function dL(e,t,n,r){const{props:s,attrs:i,vnode:{patchFlag:o}}=e,a=Be(s),[l]=e.propsOptions;let u=!1;if((r||o>0)&&!(o&16)){if(o&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let f=c[d];if(zp(e.emitsOptions,f))continue;const p=t[f];if(l)if(Tt(i,f))p!==i[f]&&(i[f]=p,u=!0);else{const g=Rr(f);s[g]=Tv(l,a,g,p,e,!1)}else p!==i[f]&&(i[f]=p,u=!0)}}}else{eT(e,t,s,i)&&(u=!0);let c;for(const d in a)(!t||!Tt(t,d)&&((c=Uo(d))===d||!Tt(t,c)))&&(l?n&&(n[d]!==void 0||n[c]!==void 0)&&(s[d]=Tv(l,a,d,void 0,e,!0)):delete s[d]);if(i!==a)for(const d in i)(!t||!Tt(t,d))&&(delete i[d],u=!0)}u&&Oi(e.attrs,"set","")}function eT(e,t,n,r){const[s,i]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(yc(l))continue;const u=t[l];let c;s&&Tt(s,c=Rr(l))?!i||!i.includes(c)?n[c]=u:(a||(a={}))[c]=u:zp(e.emitsOptions,l)||(!(l in r)||u!==r[l])&&(r[l]=u,o=!0)}if(i){const l=Be(n),u=a||$t;for(let c=0;c<i.length;c++){const d=i[c];n[d]=Tv(s,l,d,u[d],e,!Tt(u,d))}}return o}function Tv(e,t,n,r,s,i){const o=e[n];if(o!=null){const a=Tt(o,"default");if(a&&r===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&Xe(l)){const{propsDefaults:u}=s;if(n in u)r=u[n];else{const c=kd(s);r=u[n]=l.call(null,t),c()}}else r=l;s.ce&&s.ce._setProp(n,r)}o[0]&&(i&&!a?r=!1:o[1]&&(r===""||r===Uo(n))&&(r=!0))}return r}const fL=new WeakMap;function tT(e,t,n=!1){const r=n?fL:t.propsCache,s=r.get(e);if(s)return s;const i=e.props,o={},a=[];let l=!1;if(!Xe(e)){const c=d=>{l=!0;const[f,p]=tT(d,t,!0);vn(o,f),p&&a.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!i&&!l)return Yt(e)&&r.set(e,Dl),Dl;if(We(i))for(let c=0;c<i.length;c++){const d=Rr(i[c]);o1(d)&&(o[d]=$t)}else if(i)for(const c in i){const d=Rr(c);if(o1(d)){const f=i[c],p=o[d]=We(f)||Xe(f)?{type:f}:vn({},f),g=p.type;let m=!1,y=!0;if(We(g))for(let _=0;_<g.length;++_){const b=g[_],x=Xe(b)&&b.name;if(x==="Boolean"){m=!0;break}else x==="String"&&(y=!1)}else m=Xe(g)&&g.name==="Boolean";p[0]=m,p[1]=y,(m||Tt(p,"default"))&&a.push(d)}}const u=[o,a];return Yt(e)&&r.set(e,u),u}function o1(e){return e[0]!=="$"&&!yc(e)}const Ub=e=>e[0]==="_"||e==="$stable",zb=e=>We(e)?e.map(ti):[ti(e)],hL=(e,t,n)=>{if(t._n)return t;const r=v((...s)=>zb(t(...s)),n);return r._c=!1,r},nT=(e,t,n)=>{const r=e._ctx;for(const s in e){if(Ub(s))continue;const i=e[s];if(Xe(i))t[s]=hL(s,i,r);else if(i!=null){const o=zb(i);t[s]=()=>o}}},rT=(e,t)=>{const n=zb(t);e.slots.default=()=>n},sT=(e,t,n)=>{for(const r in t)(n||!Ub(r))&&(e[r]=t[r])},pL=(e,t,n)=>{const r=e.slots=JC();if(e.vnode.shapeFlag&32){const s=t._;s?(sT(r,t,n),n&&sC(r,"_",s,!0)):nT(t,r)}else t&&rT(e,t)},mL=(e,t,n)=>{const{vnode:r,slots:s}=e;let i=!0,o=$t;if(r.shapeFlag&32){const a=t._;a?n&&a===1?i=!1:sT(s,t,n):(i=!t.$stable,nT(t,s)),o=t}else t&&(rT(e,t),o={default:1});if(i)for(const a in s)!Ub(a)&&o[a]==null&&delete s[a]},ur=RL;function gL(e){return vL(e)}function vL(e,t){const n=Ip();n.__VUE__=!0;const{insert:r,remove:s,patchProp:i,createElement:o,createText:a,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:p=oi,insertStaticContent:g}=e,m=(N,B,Y,fe=null,ce=null,be=null,Re=void 0,ye=null,Se=!!B.dynamicChildren)=>{if(N===B)return;N&&!ua(N,B)&&(fe=Z(N),q(N,ce,be,!0),N=null),B.patchFlag===-2&&(Se=!1,B.dynamicChildren=null);const{type:me,ref:$e,shapeFlag:Te}=B;switch(me){case Sd:y(N,B,Y,fe);break;case Nn:_(N,B,Y,fe);break;case ng:N==null&&b(B,Y,fe,Re);break;case Ae:R(N,B,Y,fe,ce,be,Re,ye,Se);break;default:Te&1?S(N,B,Y,fe,ce,be,Re,ye,Se):Te&6?M(N,B,Y,fe,ce,be,Re,ye,Se):(Te&64||Te&128)&&me.process(N,B,Y,fe,ce,be,Re,ye,Se,z)}$e!=null&&ce&&Ph($e,N&&N.ref,be,B||N,!B)},y=(N,B,Y,fe)=>{if(N==null)r(B.el=a(B.children),Y,fe);else{const ce=B.el=N.el;B.children!==N.children&&u(ce,B.children)}},_=(N,B,Y,fe)=>{N==null?r(B.el=l(B.children||""),Y,fe):B.el=N.el},b=(N,B,Y,fe)=>{[N.el,N.anchor]=g(N.children,B,Y,fe,N.el,N.anchor)},x=({el:N,anchor:B},Y,fe)=>{let ce;for(;N&&N!==B;)ce=f(N),r(N,Y,fe),N=ce;r(B,Y,fe)},C=({el:N,anchor:B})=>{let Y;for(;N&&N!==B;)Y=f(N),s(N),N=Y;s(B)},S=(N,B,Y,fe,ce,be,Re,ye,Se)=>{B.type==="svg"?Re="svg":B.type==="math"&&(Re="mathml"),N==null?T(B,Y,fe,ce,be,Re,ye,Se):E(N,B,ce,be,Re,ye,Se)},T=(N,B,Y,fe,ce,be,Re,ye)=>{let Se,me;const{props:$e,shapeFlag:Te,transition:Ce,dirs:Ge}=N;if(Se=N.el=o(N.type,be,$e&&$e.is,$e),Te&8?c(Se,N.children):Te&16&&w(N.children,Se,null,fe,ce,eg(N,be),Re,ye),Ge&&Xo(N,null,fe,"created"),P(Se,N,N.scopeId,Re,fe),$e){for(const Ut in $e)Ut!=="value"&&!yc(Ut)&&i(Se,Ut,null,$e[Ut],be,fe);"value"in $e&&i(Se,"value",null,$e.value,be),(me=$e.onVnodeBeforeMount)&&zs(me,fe,N)}Ge&&Xo(N,null,fe,"beforeMount");const mt=yL(ce,Ce);mt&&Ce.beforeEnter(Se),r(Se,B,Y),((me=$e&&$e.onVnodeMounted)||mt||Ge)&&ur(()=>{me&&zs(me,fe,N),mt&&Ce.enter(Se),Ge&&Xo(N,null,fe,"mounted")},ce)},P=(N,B,Y,fe,ce)=>{if(Y&&p(N,Y),fe)for(let be=0;be<fe.length;be++)p(N,fe[be]);if(ce){let be=ce.subTree;if(B===be||lT(be.type)&&(be.ssContent===B||be.ssFallback===B)){const Re=ce.vnode;P(N,Re,Re.scopeId,Re.slotScopeIds,ce.parent)}}},w=(N,B,Y,fe,ce,be,Re,ye,Se=0)=>{for(let me=Se;me<N.length;me++){const $e=N[me]=ye?lo(N[me]):ti(N[me]);m(null,$e,B,Y,fe,ce,be,Re,ye)}},E=(N,B,Y,fe,ce,be,Re)=>{const ye=B.el=N.el;let{patchFlag:Se,dynamicChildren:me,dirs:$e}=B;Se|=N.patchFlag&16;const Te=N.props||$t,Ce=B.props||$t;let Ge;if(Y&&Qo(Y,!1),(Ge=Ce.onVnodeBeforeUpdate)&&zs(Ge,Y,B,N),$e&&Xo(B,N,Y,"beforeUpdate"),Y&&Qo(Y,!0),(Te.innerHTML&&Ce.innerHTML==null||Te.textContent&&Ce.textContent==null)&&c(ye,""),me?I(N.dynamicChildren,me,ye,Y,fe,eg(B,ce),be):Re||Q(N,B,ye,null,Y,fe,eg(B,ce),be,!1),Se>0){if(Se&16)O(ye,Te,Ce,Y,ce);else if(Se&2&&Te.class!==Ce.class&&i(ye,"class",null,Ce.class,ce),Se&4&&i(ye,"style",Te.style,Ce.style,ce),Se&8){const mt=B.dynamicProps;for(let Ut=0;Ut<mt.length;Ut++){const Rt=mt[Ut],Lr=Te[Rt],Wn=Ce[Rt];(Wn!==Lr||Rt==="value")&&i(ye,Rt,Lr,Wn,ce,Y)}}Se&1&&N.children!==B.children&&c(ye,B.children)}else!Re&&me==null&&O(ye,Te,Ce,Y,ce);((Ge=Ce.onVnodeUpdated)||$e)&&ur(()=>{Ge&&zs(Ge,Y,B,N),$e&&Xo(B,N,Y,"updated")},fe)},I=(N,B,Y,fe,ce,be,Re)=>{for(let ye=0;ye<B.length;ye++){const Se=N[ye],me=B[ye],$e=Se.el&&(Se.type===Ae||!ua(Se,me)||Se.shapeFlag&70)?d(Se.el):Y;m(Se,me,$e,null,fe,ce,be,Re,!0)}},O=(N,B,Y,fe,ce)=>{if(B!==Y){if(B!==$t)for(const be in B)!yc(be)&&!(be in Y)&&i(N,be,B[be],null,ce,fe);for(const be in Y){if(yc(be))continue;const Re=Y[be],ye=B[be];Re!==ye&&be!=="value"&&i(N,be,ye,Re,ce,fe)}"value"in Y&&i(N,"value",B.value,Y.value,ce)}},R=(N,B,Y,fe,ce,be,Re,ye,Se)=>{const me=B.el=N?N.el:a(""),$e=B.anchor=N?N.anchor:a("");let{patchFlag:Te,dynamicChildren:Ce,slotScopeIds:Ge}=B;Ge&&(ye=ye?ye.concat(Ge):Ge),N==null?(r(me,Y,fe),r($e,Y,fe),w(B.children||[],Y,$e,ce,be,Re,ye,Se)):Te>0&&Te&64&&Ce&&N.dynamicChildren?(I(N.dynamicChildren,Ce,Y,ce,be,Re,ye),(B.key!=null||ce&&B===ce.subTree)&&Hb(N,B,!0)):Q(N,B,Y,$e,ce,be,Re,ye,Se)},M=(N,B,Y,fe,ce,be,Re,ye,Se)=>{B.slotScopeIds=ye,N==null?B.shapeFlag&512?ce.ctx.activate(B,Y,fe,Re,Se):D(B,Y,fe,ce,be,Re,Se):F(N,B,Se)},D=(N,B,Y,fe,ce,be,Re)=>{const ye=N.component=DL(N,fe,ce);if(Np(N)&&(ye.ctx.renderer=z),LL(ye,!1,Re),ye.asyncDep){if(ce&&ce.registerDep(ye,U,Re),!N.el){const Se=ye.subTree=h(Nn);_(null,Se,B,Y)}}else U(ye,N,B,Y,ce,be,Re)},F=(N,B,Y)=>{const fe=B.component=N.component;if(TL(N,B,Y))if(fe.asyncDep&&!fe.asyncResolved){K(fe,B,Y);return}else fe.next=B,fe.update();else B.el=N.el,fe.vnode=B},U=(N,B,Y,fe,ce,be,Re)=>{const ye=()=>{if(N.isMounted){let{next:Te,bu:Ce,u:Ge,parent:mt,vnode:Ut}=N;{const $r=iT(N);if($r){Te&&(Te.el=Ut.el,K(N,Te,Re)),$r.asyncDep.then(()=>{N.isUnmounted||ye()});return}}let Rt=Te,Lr;Qo(N,!1),Te?(Te.el=Ut.el,K(N,Te,Re)):Te=Ut,Ce&&jf(Ce),(Lr=Te.props&&Te.props.onVnodeBeforeUpdate)&&zs(Lr,mt,Te,Ut),Qo(N,!0);const Wn=tg(N),_s=N.subTree;N.subTree=Wn,m(_s,Wn,d(_s.el),Z(_s),N,ce,be),Te.el=Wn.el,Rt===null&&PL(N,Wn.el),Ge&&ur(Ge,ce),(Lr=Te.props&&Te.props.onVnodeUpdated)&&ur(()=>zs(Lr,mt,Te,Ut),ce)}else{let Te;const{el:Ce,props:Ge}=B,{bm:mt,m:Ut,parent:Rt,root:Lr,type:Wn}=N,_s=Fl(B);if(Qo(N,!1),mt&&jf(mt),!_s&&(Te=Ge&&Ge.onVnodeBeforeMount)&&zs(Te,Rt,B),Qo(N,!0),Ce&&Fe){const $r=()=>{N.subTree=tg(N),Fe(Ce,N.subTree,N,ce,null)};_s&&Wn.__asyncHydrate?Wn.__asyncHydrate(Ce,N,$r):$r()}else{Lr.ce&&Lr.ce._injectChildStyle(Wn);const $r=N.subTree=tg(N);m(null,$r,Y,fe,N,ce,be),B.el=$r.el}if(Ut&&ur(Ut,ce),!_s&&(Te=Ge&&Ge.onVnodeMounted)){const $r=B;ur(()=>zs(Te,Rt,$r),ce)}(B.shapeFlag&256||Rt&&Fl(Rt.vnode)&&Rt.vnode.shapeFlag&256)&&N.a&&ur(N.a,ce),N.isMounted=!0,B=Y=fe=null}};N.scope.on();const Se=N.effect=new uC(ye);N.scope.off();const me=N.update=Se.run.bind(Se),$e=N.job=Se.runIfDirty.bind(Se);$e.i=N,$e.id=N.uid,Se.scheduler=()=>Db($e),Qo(N,!0),me()},K=(N,B,Y)=>{B.component=N;const fe=N.vnode.props;N.vnode=B,N.next=null,dL(N,B.props,fe,Y),mL(N,B.children,Y),Ni(),X0(N),Vi()},Q=(N,B,Y,fe,ce,be,Re,ye,Se=!1)=>{const me=N&&N.children,$e=N?N.shapeFlag:0,Te=B.children,{patchFlag:Ce,shapeFlag:Ge}=B;if(Ce>0){if(Ce&128){V(me,Te,Y,fe,ce,be,Re,ye,Se);return}else if(Ce&256){H(me,Te,Y,fe,ce,be,Re,ye,Se);return}}Ge&8?($e&16&&we(me,ce,be),Te!==me&&c(Y,Te)):$e&16?Ge&16?V(me,Te,Y,fe,ce,be,Re,ye,Se):we(me,ce,be,!0):($e&8&&c(Y,""),Ge&16&&w(Te,Y,fe,ce,be,Re,ye,Se))},H=(N,B,Y,fe,ce,be,Re,ye,Se)=>{N=N||Dl,B=B||Dl;const me=N.length,$e=B.length,Te=Math.min(me,$e);let Ce;for(Ce=0;Ce<Te;Ce++){const Ge=B[Ce]=Se?lo(B[Ce]):ti(B[Ce]);m(N[Ce],Ge,Y,null,ce,be,Re,ye,Se)}me>$e?we(N,ce,be,!0,!1,Te):w(B,Y,fe,ce,be,Re,ye,Se,Te)},V=(N,B,Y,fe,ce,be,Re,ye,Se)=>{let me=0;const $e=B.length;let Te=N.length-1,Ce=$e-1;for(;me<=Te&&me<=Ce;){const Ge=N[me],mt=B[me]=Se?lo(B[me]):ti(B[me]);if(ua(Ge,mt))m(Ge,mt,Y,null,ce,be,Re,ye,Se);else break;me++}for(;me<=Te&&me<=Ce;){const Ge=N[Te],mt=B[Ce]=Se?lo(B[Ce]):ti(B[Ce]);if(ua(Ge,mt))m(Ge,mt,Y,null,ce,be,Re,ye,Se);else break;Te--,Ce--}if(me>Te){if(me<=Ce){const Ge=Ce+1,mt=Ge<$e?B[Ge].el:fe;for(;me<=Ce;)m(null,B[me]=Se?lo(B[me]):ti(B[me]),Y,mt,ce,be,Re,ye,Se),me++}}else if(me>Ce)for(;me<=Te;)q(N[me],ce,be,!0),me++;else{const Ge=me,mt=me,Ut=new Map;for(me=mt;me<=Ce;me++){const Fr=B[me]=Se?lo(B[me]):ti(B[me]);Fr.key!=null&&Ut.set(Fr.key,me)}let Rt,Lr=0;const Wn=Ce-mt+1;let _s=!1,$r=0;const Ku=new Array(Wn);for(me=0;me<Wn;me++)Ku[me]=0;for(me=Ge;me<=Te;me++){const Fr=N[me];if(Lr>=Wn){q(Fr,ce,be,!0);continue}let Us;if(Fr.key!=null)Us=Ut.get(Fr.key);else for(Rt=mt;Rt<=Ce;Rt++)if(Ku[Rt-mt]===0&&ua(Fr,B[Rt])){Us=Rt;break}Us===void 0?q(Fr,ce,be,!0):(Ku[Us-mt]=me+1,Us>=$r?$r=Us:_s=!0,m(Fr,B[Us],Y,null,ce,be,Re,ye,Se),Lr++)}const j0=_s?bL(Ku):Dl;for(Rt=j0.length-1,me=Wn-1;me>=0;me--){const Fr=mt+me,Us=B[Fr],q0=Fr+1<$e?B[Fr+1].el:fe;Ku[me]===0?m(null,Us,Y,q0,ce,be,Re,ye,Se):_s&&(Rt<0||me!==j0[Rt]?ee(Us,Y,q0,2):Rt--)}}},ee=(N,B,Y,fe,ce=null)=>{const{el:be,type:Re,transition:ye,children:Se,shapeFlag:me}=N;if(me&6){ee(N.component.subTree,B,Y,fe);return}if(me&128){N.suspense.move(B,Y,fe);return}if(me&64){Re.move(N,B,Y,z);return}if(Re===Ae){r(be,B,Y);for(let Te=0;Te<Se.length;Te++)ee(Se[Te],B,Y,fe);r(N.anchor,B,Y);return}if(Re===ng){x(N,B,Y);return}if(fe!==2&&me&1&&ye)if(fe===0)ye.beforeEnter(be),r(be,B,Y),ur(()=>ye.enter(be),ce);else{const{leave:Te,delayLeave:Ce,afterLeave:Ge}=ye,mt=()=>{N.ctx.isUnmounted?s(be):r(be,B,Y)},Ut=()=>{Te(be,()=>{mt(),Ge&&Ge()})};Ce?Ce(be,mt,Ut):Ut()}else r(be,B,Y)},q=(N,B,Y,fe=!1,ce=!1)=>{const{type:be,props:Re,ref:ye,children:Se,dynamicChildren:me,shapeFlag:$e,patchFlag:Te,dirs:Ce,cacheIndex:Ge}=N;if(Te===-2&&(ce=!1),ye!=null&&(Ni(),Ph(ye,null,Y,N,!0),Vi()),Ge!=null&&(B.renderCache[Ge]=void 0),$e&256){B.ctx.deactivate(N);return}const mt=$e&1&&Ce,Ut=!Fl(N);let Rt;if(Ut&&(Rt=Re&&Re.onVnodeBeforeUnmount)&&zs(Rt,B,N),$e&6)ie(N.component,Y,fe);else{if($e&128){N.suspense.unmount(Y,fe);return}mt&&Xo(N,null,B,"beforeUnmount"),$e&64?N.type.remove(N,B,Y,z,fe):me&&!me.hasOnce&&(be!==Ae||Te>0&&Te&64)?we(me,B,Y,!1,!0):(be===Ae&&Te&384||!ce&&$e&16)&&we(Se,B,Y),fe&&G(N)}(Ut&&(Rt=Re&&Re.onVnodeUnmounted)||mt)&&ur(()=>{Rt&&zs(Rt,B,N),mt&&Xo(N,null,B,"unmounted")},Y)},G=N=>{const{type:B,el:Y,anchor:fe,transition:ce}=N;if(B===Ae){le(Y,fe);return}if(B===ng){C(N);return}const be=()=>{s(Y),ce&&!ce.persisted&&ce.afterLeave&&ce.afterLeave()};if(N.shapeFlag&1&&ce&&!ce.persisted){const{leave:Re,delayLeave:ye}=ce,Se=()=>Re(Y,be);ye?ye(N.el,be,Se):Se()}else be()},le=(N,B)=>{let Y;for(;N!==B;)Y=f(N),s(N),N=Y;s(B)},ie=(N,B,Y)=>{const{bum:fe,scope:ce,job:be,subTree:Re,um:ye,m:Se,a:me,parent:$e,slots:{__:Te}}=N;a1(Se),a1(me),fe&&jf(fe),$e&&We(Te)&&Te.forEach(Ce=>{$e.renderCache[Ce]=void 0}),ce.stop(),be&&(be.flags|=8,q(Re,N,B,Y)),ye&&ur(ye,B),ur(()=>{N.isUnmounted=!0},B),B&&B.pendingBranch&&!B.isUnmounted&&N.asyncDep&&!N.asyncResolved&&N.suspenseId===B.pendingId&&(B.deps--,B.deps===0&&B.resolve())},we=(N,B,Y,fe=!1,ce=!1,be=0)=>{for(let Re=be;Re<N.length;Re++)q(N[Re],B,Y,fe,ce)},Z=N=>{if(N.shapeFlag&6)return Z(N.component.subTree);if(N.shapeFlag&128)return N.suspense.next();const B=f(N.anchor||N.el),Y=B&&B[MC];return Y?f(Y):B};let he=!1;const ne=(N,B,Y)=>{N==null?B._vnode&&q(B._vnode,null,null,!0):m(B._vnode||null,N,B,null,null,null,Y),B._vnode=N,he||(he=!0,X0(),IC(),he=!1)},z={p:m,um:q,m:ee,r:G,mt:D,mc:w,pc:Q,pbc:I,n:Z,o:e};let xe,Fe;return{render:ne,hydrate:xe,createApp:uL(ne,xe)}}function eg({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Qo({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function yL(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Hb(e,t,n=!1){const r=e.children,s=t.children;if(We(r)&&We(s))for(let i=0;i<r.length;i++){const o=r[i];let a=s[i];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=s[i]=lo(s[i]),a.el=o.el),!n&&a.patchFlag!==-2&&Hb(o,a)),a.type===Sd&&(a.el=o.el),a.type===Nn&&!a.el&&(a.el=o.el)}}function bL(e){const t=e.slice(),n=[0];let r,s,i,o,a;const l=e.length;for(r=0;r<l;r++){const u=e[r];if(u!==0){if(s=n[n.length-1],e[s]<u){t[r]=s,n.push(r);continue}for(i=0,o=n.length-1;i<o;)a=i+o>>1,e[n[a]]<u?i=a+1:o=a;u<e[n[i]]&&(i>0&&(t[r]=n[i-1]),n[i]=r)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function iT(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:iT(t)}function a1(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const _L=Symbol.for("v-scx"),wL=()=>Qe(_L);function On(e,t){return jb(e,null,t)}function Ee(e,t,n){return jb(e,t,n)}function jb(e,t,n=$t){const{immediate:r,deep:s,flush:i,once:o}=n,a=vn({},n),l=t&&r||!t&&i!=="post";let u;if(jc){if(i==="sync"){const p=wL();u=p.__watcherHandles||(p.__watcherHandles=[])}else if(!l){const p=()=>{};return p.stop=oi,p.resume=oi,p.pause=oi,p}}const c=Rn;a.call=(p,g,m)=>Is(p,c,g,m);let d=!1;i==="post"?a.scheduler=p=>{ur(p,c&&c.suspense)}:i!=="sync"&&(d=!0,a.scheduler=(p,g)=>{g?p():Db(p)}),a.augmentJob=p=>{t&&(p.flags|=4),d&&(p.flags|=2,c&&(p.id=c.uid,p.i=c))};const f=BD(e,t,a);return jc&&(u?u.push(f):l&&f()),f}function SL(e,t,n){const r=this.proxy,s=rn(e)?e.includes(".")?oT(r,e):()=>r[e]:e.bind(r,r);let i;Xe(t)?i=t:(i=t.handler,n=t);const o=kd(this),a=jb(s,i.bind(r),n);return o(),a}function oT(e,t){const n=t.split(".");return()=>{let r=e;for(let s=0;s<n.length&&r;s++)r=r[n[s]];return r}}const kL=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Rr(t)}Modifiers`]||e[`${Uo(t)}Modifiers`];function xL(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||$t;let s=n;const i=t.startsWith("update:"),o=i&&kL(r,t.slice(7));o&&(o.trim&&(s=n.map(c=>rn(c)?c.trim():c)),o.number&&(s=n.map(yv)));let a,l=r[a=Gm(t)]||r[a=Gm(Rr(t))];!l&&i&&(l=r[a=Gm(Uo(t))]),l&&Is(l,e,6,s);const u=r[a+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Is(u,e,6,s)}}function aT(e,t,n=!1){const r=t.emitsCache,s=r.get(e);if(s!==void 0)return s;const i=e.emits;let o={},a=!1;if(!Xe(e)){const l=u=>{const c=aT(u,t,!0);c&&(a=!0,vn(o,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!i&&!a?(Yt(e)&&r.set(e,null),null):(We(i)?i.forEach(l=>o[l]=null):vn(o,i),Yt(e)&&r.set(e,o),o)}function zp(e,t){return!e||!Tp(t)?!1:(t=t.slice(2).replace(/Once$/,""),Tt(e,t[0].toLowerCase()+t.slice(1))||Tt(e,Uo(t))||Tt(e,t))}function tg(e){const{type:t,vnode:n,proxy:r,withProxy:s,propsOptions:[i],slots:o,attrs:a,emit:l,render:u,renderCache:c,props:d,data:f,setupState:p,ctx:g,inheritAttrs:m}=e,y=Th(e);let _,b;try{if(n.shapeFlag&4){const C=s||r,S=C;_=ti(u.call(S,C,c,d,p,f,g)),b=a}else{const C=t;_=ti(C.length>1?C(d,{attrs:a,slots:o,emit:l}):C(d,null)),b=t.props?a:EL(a)}}catch(C){kc.length=0,Fp(C,e,1),_=h(Nn)}let x=_;if(b&&m!==!1){const C=Object.keys(b),{shapeFlag:S}=x;C.length&&S&7&&(i&&C.some(Cb)&&(b=CL(b,i)),x=Bi(x,b,!1,!0))}return n.dirs&&(x=Bi(x,null,!1,!0),x.dirs=x.dirs?x.dirs.concat(n.dirs):n.dirs),n.transition&&Fa(x,n.transition),_=x,Th(y),_}const EL=e=>{let t;for(const n in e)(n==="class"||n==="style"||Tp(n))&&((t||(t={}))[n]=e[n]);return t},CL=(e,t)=>{const n={};for(const r in e)(!Cb(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function TL(e,t,n){const{props:r,children:s,component:i}=e,{props:o,children:a,patchFlag:l}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?l1(r,o,u):!!o;if(l&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(o[f]!==r[f]&&!zp(u,f))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:r===o?!1:r?o?l1(r,o,u):!0:!!o;return!1}function l1(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let s=0;s<r.length;s++){const i=r[s];if(t[i]!==e[i]&&!zp(n,i))return!0}return!1}function PL({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const lT=e=>e.__isSuspense;function RL(e,t){t&&t.pendingBranch?We(e)?t.effects.push(...e):t.effects.push(e):HD(e)}const Ae=Symbol.for("v-fgt"),Sd=Symbol.for("v-txt"),Nn=Symbol.for("v-cmt"),ng=Symbol.for("v-stc"),kc=[];let Ur=null;function $(e=!1){kc.push(Ur=e?null:[])}function IL(){kc.pop(),Ur=kc[kc.length-1]||null}let Hc=1;function u1(e,t=!1){Hc+=e,e<0&&Ur&&t&&(Ur.hasOnce=!0)}function uT(e){return e.dynamicChildren=Hc>0?Ur||Dl:null,IL(),Hc>0&&Ur&&Ur.push(e),e}function ve(e,t,n,r,s,i){return uT(L(e,t,n,r,s,i,!0))}function te(e,t,n,r,s){return uT(h(e,t,n,r,s,!0))}function tu(e){return e?e.__v_isVNode===!0:!1}function ua(e,t){return e.type===t.type&&e.key===t.key}const cT=({key:e})=>e??null,Wf=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?rn(e)||et(e)||Xe(e)?{i:xn,r:e,k:t,f:!!n}:e:null);function L(e,t=null,n=null,r=0,s=null,i=e===Ae?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&cT(t),ref:t&&Wf(t),scopeId:OC,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:xn};return a?(qb(l,n),i&128&&e.normalize(l)):n&&(l.shapeFlag|=rn(n)?8:16),Hc>0&&!o&&Ur&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&Ur.push(l),l}const h=AL;function AL(e,t=null,n=null,r=0,s=null,i=!1){if((!e||e===eL)&&(e=Nn),tu(e)){const a=Bi(e,t,!0);return n&&qb(a,n),Hc>0&&!i&&Ur&&(a.shapeFlag&6?Ur[Ur.indexOf(e)]=a:Ur.push(a)),a.patchFlag=-2,a}if(BL(e)&&(e=e.__vccOpts),t){t=Ih(t);let{class:a,style:l}=t;a&&!rn(a)&&(t.class=zo(a)),Yt(l)&&(_d(l)&&!We(l)&&(l=vn({},l)),t.style=is(l))}const o=rn(e)?1:lT(e)?128:DC(e)?64:Yt(e)?4:Xe(e)?2:0;return L(e,t,n,r,s,o,i,!0)}function Ih(e){return e?_d(e)||ZC(e)?vn({},e):e:null}function Bi(e,t,n=!1,r=!1){const{props:s,ref:i,patchFlag:o,children:a,transition:l}=e,u=t?ge(s||{},t):s,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&cT(u),ref:t&&t.ref?n&&i?We(i)?i.concat(Wf(t)):[i,Wf(t)]:Wf(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ae?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Bi(e.ssContent),ssFallback:e.ssFallback&&Bi(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&Fa(c,l.clone(c)),c}function k(e=" ",t=0){return h(Sd,null,e,t)}function pe(e="",t=!1){return t?($(),te(Nn,null,e)):h(Nn,null,e)}function ti(e){return e==null||typeof e=="boolean"?h(Nn):We(e)?h(Ae,null,e.slice()):tu(e)?lo(e):h(Sd,null,String(e))}function lo(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Bi(e)}function qb(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(We(t))n=16;else if(typeof t=="object")if(r&65){const s=t.default;s&&(s._c&&(s._d=!1),qb(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!ZC(t)?t._ctx=xn:s===3&&xn&&(xn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Xe(t)?(t={default:t,_ctx:xn},n=32):(t=String(t),r&64?(n=16,t=[k(t)]):n=8);e.children=t,e.shapeFlag|=n}function ge(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const s in r)if(s==="class")t.class!==r.class&&(t.class=zo([t.class,r.class]));else if(s==="style")t.style=is([t.style,r.style]);else if(Tp(s)){const i=t[s],o=r[s];o&&i!==o&&!(We(i)&&i.includes(o))&&(t[s]=i?[].concat(i,o):o)}else s!==""&&(t[s]=r[s])}return t}function zs(e,t,n,r=null){Is(e,t,7,[n,r])}const OL=YC();let ML=0;function DL(e,t,n){const r=e.type,s=(t?t.appContext:e.appContext)||OL,i={uid:ML++,vnode:e,type:r,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new lC(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:tT(r,s),emitsOptions:aT(r,s),emit:null,emitted:null,propsDefaults:$t,inheritAttrs:r.inheritAttrs,ctx:$t,data:$t,props:$t,attrs:$t,slots:$t,refs:$t,setupState:$t,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=xL.bind(null,i),e.ce&&e.ce(i),i}let Rn=null;const Hp=()=>Rn||xn;let Ah,Pv;{const e=Ip(),t=(n,r)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(r),i=>{s.length>1?s.forEach(o=>o(i)):s[0](i)}};Ah=t("__VUE_INSTANCE_SETTERS__",n=>Rn=n),Pv=t("__VUE_SSR_SETTERS__",n=>jc=n)}const kd=e=>{const t=Rn;return Ah(e),e.scope.on(),()=>{e.scope.off(),Ah(t)}},c1=()=>{Rn&&Rn.scope.off(),Ah(null)};function dT(e){return e.vnode.shapeFlag&4}let jc=!1;function LL(e,t=!1,n=!1){t&&Pv(t);const{props:r,children:s}=e.vnode,i=dT(e);cL(e,r,i,t),pL(e,s,n||t);const o=i?$L(e,t):void 0;return t&&Pv(!1),o}function $L(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,nL);const{setup:r}=n;if(r){Ni();const s=e.setupContext=r.length>1?NL(e):null,i=kd(e),o=wd(r,e,0,[e.props,s]),a=tC(o);if(Vi(),i(),(a||e.sp)&&!Fl(e)&&zC(e),a){if(o.then(c1,c1),t)return o.then(l=>{d1(e,l,t)}).catch(l=>{Fp(l,e,0)});e.asyncDep=o}else d1(e,o,t)}else fT(e,t)}function d1(e,t,n){Xe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Yt(t)&&(e.setupState=CC(t)),fT(e,n)}let f1;function fT(e,t,n){const r=e.type;if(!e.render){if(!t&&f1&&!r.render){const s=r.template||Bb(e).template;if(s){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:a,compilerOptions:l}=r,u=vn(vn({isCustomElement:i,delimiters:a},o),l);r.render=f1(s,u)}}e.render=r.render||oi}{const s=kd(e);Ni();try{rL(e)}finally{Vi(),s()}}}const FL={get(e,t){return Jn(e,"get",""),e[t]}};function NL(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,FL),slots:e.slots,emit:e.emit,expose:t}}function jp(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(CC($p(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Sc)return Sc[n](e)},has(t,n){return n in t||n in Sc}})):e.proxy}function VL(e,t=!0){return Xe(e)?e.displayName||e.name:e.name||t&&e.__name}function BL(e){return Xe(e)&&"__vccOpts"in e}const A=(e,t)=>ND(e,t,jc);function pr(e,t,n){const r=arguments.length;return r===2?Yt(t)&&!We(t)?tu(t)?h(e,null,[t]):h(e,t):h(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&tu(n)&&(n=[n]),h(e,t,n))}const hT="3.5.14";/**
|
|
14
|
+
* @vue/runtime-dom v3.5.14
|
|
15
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
16
|
+
* @license MIT
|
|
17
|
+
**/let Rv;const h1=typeof window<"u"&&window.trustedTypes;if(h1)try{Rv=h1.createPolicy("vue",{createHTML:e=>e})}catch{}const pT=Rv?e=>Rv.createHTML(e):e=>e,UL="http://www.w3.org/2000/svg",zL="http://www.w3.org/1998/Math/MathML",Ci=typeof document<"u"?document:null,p1=Ci&&Ci.createElement("template"),HL={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const s=t==="svg"?Ci.createElementNS(UL,e):t==="mathml"?Ci.createElementNS(zL,e):n?Ci.createElement(e,{is:n}):Ci.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>Ci.createTextNode(e),createComment:e=>Ci.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ci.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,s,i){const o=n?n.previousSibling:t.lastChild;if(s&&(s===i||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===i||!(s=s.nextSibling)););else{p1.innerHTML=pT(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const a=p1.content;if(r==="svg"||r==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},eo="transition",Xu="animation",nu=Symbol("_vtc"),mT={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},gT=vn({},NC,mT),jL=e=>(e.displayName="Transition",e.props=gT,e),Lo=jL((e,{slots:t})=>pr(GD,vT(e),t)),Jo=(e,t=[])=>{We(e)?e.forEach(n=>n(...t)):e&&e(...t)},m1=e=>e?We(e)?e.some(t=>t.length>1):e.length>1:!1;function vT(e){const t={};for(const R in e)R in mT||(t[R]=e[R]);if(e.css===!1)return t;const{name:n="v",type:r,duration:s,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=i,appearActiveClass:u=o,appearToClass:c=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,g=qL(s),m=g&&g[0],y=g&&g[1],{onBeforeEnter:_,onEnter:b,onEnterCancelled:x,onLeave:C,onLeaveCancelled:S,onBeforeAppear:T=_,onAppear:P=b,onAppearCancelled:w=x}=t,E=(R,M,D,F)=>{R._enterCancelled=F,ro(R,M?c:a),ro(R,M?u:o),D&&D()},I=(R,M)=>{R._isLeaving=!1,ro(R,d),ro(R,p),ro(R,f),M&&M()},O=R=>(M,D)=>{const F=R?P:b,U=()=>E(M,R,D);Jo(F,[M,U]),g1(()=>{ro(M,R?l:i),Gs(M,R?c:a),m1(F)||v1(M,r,m,U)})};return vn(t,{onBeforeEnter(R){Jo(_,[R]),Gs(R,i),Gs(R,o)},onBeforeAppear(R){Jo(T,[R]),Gs(R,l),Gs(R,u)},onEnter:O(!1),onAppear:O(!0),onLeave(R,M){R._isLeaving=!0;const D=()=>I(R,M);Gs(R,d),R._enterCancelled?(Gs(R,f),Iv()):(Iv(),Gs(R,f)),g1(()=>{R._isLeaving&&(ro(R,d),Gs(R,p),m1(C)||v1(R,r,y,D))}),Jo(C,[R,D])},onEnterCancelled(R){E(R,!1,void 0,!0),Jo(x,[R])},onAppearCancelled(R){E(R,!0,void 0,!0),Jo(w,[R])},onLeaveCancelled(R){I(R),Jo(S,[R])}})}function qL(e){if(e==null)return null;if(Yt(e))return[rg(e.enter),rg(e.leave)];{const t=rg(e);return[t,t]}}function rg(e){return aD(e)}function Gs(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[nu]||(e[nu]=new Set)).add(t)}function ro(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[nu];n&&(n.delete(t),n.size||(e[nu]=void 0))}function g1(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let WL=0;function v1(e,t,n,r){const s=e._endId=++WL,i=()=>{s===e._endId&&r()};if(n!=null)return setTimeout(i,n);const{type:o,timeout:a,propCount:l}=yT(e,t);if(!o)return r();const u=o+"end";let c=0;const d=()=>{e.removeEventListener(u,f),i()},f=p=>{p.target===e&&++c>=l&&d()};setTimeout(()=>{c<l&&d()},a+1),e.addEventListener(u,f)}function yT(e,t){const n=window.getComputedStyle(e),r=g=>(n[g]||"").split(", "),s=r(`${eo}Delay`),i=r(`${eo}Duration`),o=y1(s,i),a=r(`${Xu}Delay`),l=r(`${Xu}Duration`),u=y1(a,l);let c=null,d=0,f=0;t===eo?o>0&&(c=eo,d=o,f=i.length):t===Xu?u>0&&(c=Xu,d=u,f=l.length):(d=Math.max(o,u),c=d>0?o>u?eo:Xu:null,f=c?c===eo?i.length:l.length:0);const p=c===eo&&/\b(transform|all)(,|$)/.test(r(`${eo}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:p}}function y1(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>b1(n)+b1(e[r])))}function b1(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Iv(){return document.body.offsetHeight}function GL(e,t,n){const r=e[nu];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Oh=Symbol("_vod"),bT=Symbol("_vsh"),Qi={beforeMount(e,{value:t},{transition:n}){e[Oh]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Qu(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Qu(e,!0),r.enter(e)):r.leave(e,()=>{Qu(e,!1)}):Qu(e,t))},beforeUnmount(e,{value:t}){Qu(e,t)}};function Qu(e,t){e.style.display=t?e[Oh]:"none",e[bT]=!t}const KL=Symbol(""),YL=/(^|;)\s*display\s*:/;function XL(e,t,n){const r=e.style,s=rn(n);let i=!1;if(n&&!s){if(t)if(rn(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();n[a]==null&&Gf(r,a,"")}else for(const o in t)n[o]==null&&Gf(r,o,"");for(const o in n)o==="display"&&(i=!0),Gf(r,o,n[o])}else if(s){if(t!==n){const o=r[KL];o&&(n+=";"+o),r.cssText=n,i=YL.test(n)}}else t&&e.removeAttribute("style");Oh in e&&(e[Oh]=i?r.display:"",e[bT]&&(r.display="none"))}const _1=/\s*!important$/;function Gf(e,t,n){if(We(n))n.forEach(r=>Gf(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=QL(e,t);_1.test(n)?e.setProperty(Uo(r),n.replace(_1,""),"important"):e[r]=n}}const w1=["Webkit","Moz","ms"],sg={};function QL(e,t){const n=sg[t];if(n)return n;let r=Rr(t);if(r!=="filter"&&r in e)return sg[t]=r;r=ci(r);for(let s=0;s<w1.length;s++){const i=w1[s]+r;if(i in e)return sg[t]=i}return t}const S1="http://www.w3.org/1999/xlink";function k1(e,t,n,r,s,i=hD(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(S1,t.slice(6,t.length)):e.setAttributeNS(S1,t,n):n==null||i&&!iC(n)?e.removeAttribute(t):e.setAttribute(t,i?"":Yi(n)?String(n):n)}function x1(e,t,n,r,s){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?pT(n):n);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const a=i==="OPTION"?e.getAttribute("value")||"":e.value,l=n==null?e.type==="checkbox"?"on":"":String(n);(a!==l||!("_value"in e))&&(e.value=l),n==null&&e.removeAttribute(t),e._value=n;return}let o=!1;if(n===""||n==null){const a=typeof e[t];a==="boolean"?n=iC(n):n==null&&a==="string"?(n="",o=!0):a==="number"&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(s||t)}function _l(e,t,n,r){e.addEventListener(t,n,r)}function JL(e,t,n,r){e.removeEventListener(t,n,r)}const E1=Symbol("_vei");function ZL(e,t,n,r,s=null){const i=e[E1]||(e[E1]={}),o=i[t];if(r&&o)o.value=r;else{const[a,l]=e$(t);if(r){const u=i[t]=r$(r,s);_l(e,a,u,l)}else o&&(JL(e,a,o,l),i[t]=void 0)}}const C1=/(?:Once|Passive|Capture)$/;function e$(e){let t;if(C1.test(e)){t={};let r;for(;r=e.match(C1);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Uo(e.slice(2)),t]}let ig=0;const t$=Promise.resolve(),n$=()=>ig||(t$.then(()=>ig=0),ig=Date.now());function r$(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Is(s$(r,n.value),t,5,[r])};return n.value=e,n.attached=n$(),n}function s$(e,t){if(We(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>s=>!s._stopped&&r&&r(s))}else return t}const T1=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,i$=(e,t,n,r,s,i)=>{const o=s==="svg";t==="class"?GL(e,r,o):t==="style"?XL(e,n,r):Tp(t)?Cb(t)||ZL(e,t,n,r,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):o$(e,t,r,o))?(x1(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&k1(e,t,r,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!rn(r))?x1(e,Rr(t),r,i,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),k1(e,t,r,o))};function o$(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&T1(t)&&Xe(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return T1(t)&&rn(n)?!1:t in e}const _T=new WeakMap,wT=new WeakMap,Mh=Symbol("_moveCb"),P1=Symbol("_enterCb"),a$=e=>(delete e.props.mode,e),l$=a$({name:"TransitionGroup",props:vn({},gT,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Hp(),r=FC();let s,i;return Fb(()=>{if(!s.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!f$(s[0].el,n.vnode.el,o)){s=[];return}s.forEach(u$),s.forEach(c$);const a=s.filter(d$);Iv(),a.forEach(l=>{const u=l.el,c=u.style;Gs(u,o),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[Mh]=f=>{f&&f.target!==u||(!f||/transform$/.test(f.propertyName))&&(u.removeEventListener("transitionend",d),u[Mh]=null,ro(u,o))};u.addEventListener("transitionend",d)}),s=[]}),()=>{const o=Be(e),a=vT(o);let l=o.tag||Ae;if(s=[],i)for(let u=0;u<i.length;u++){const c=i[u];c.el&&c.el instanceof Element&&(s.push(c),Fa(c,zc(c,a,r,n)),_T.set(c,c.el.getBoundingClientRect()))}i=t.default?Lb(t.default()):[];for(let u=0;u<i.length;u++){const c=i[u];c.key!=null&&Fa(c,zc(c,a,r,n))}return h(l,null,i)}}}),Wb=l$;function u$(e){const t=e.el;t[Mh]&&t[Mh](),t[P1]&&t[P1]()}function c$(e){wT.set(e,e.el.getBoundingClientRect())}function d$(e){const t=_T.get(e),n=wT.get(e),r=t.left-n.left,s=t.top-n.top;if(r||s){const i=e.el.style;return i.transform=i.webkitTransform=`translate(${r}px,${s}px)`,i.transitionDuration="0s",e}}function f$(e,t,n){const r=e.cloneNode(),s=e[nu];s&&s.forEach(a=>{a.split(/\s+/).forEach(l=>l&&r.classList.remove(l))}),n.split(/\s+/).forEach(a=>a&&r.classList.add(a)),r.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(r);const{hasTransform:o}=yT(r);return i.removeChild(r),o}const R1=e=>{const t=e.props["onUpdate:modelValue"]||!1;return We(t)?n=>jf(t,n):t};function h$(e){e.target.composing=!0}function I1(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const og=Symbol("_assign"),p$={created(e,{modifiers:{lazy:t,trim:n,number:r}},s){e[og]=R1(s);const i=r||s.props&&s.props.type==="number";_l(e,t?"change":"input",o=>{if(o.target.composing)return;let a=e.value;n&&(a=a.trim()),i&&(a=yv(a)),e[og](a)}),n&&_l(e,"change",()=>{e.value=e.value.trim()}),t||(_l(e,"compositionstart",h$),_l(e,"compositionend",I1),_l(e,"change",I1))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:s,number:i}},o){if(e[og]=R1(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?yv(e.value):e.value,l=t??"";a!==l&&(document.activeElement===e&&e.type!=="range"&&(r&&t===n||s&&e.value.trim()===l)||(e.value=l))}},m$=["ctrl","shift","alt","meta"],g$={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>m$.some(n=>e[`${n}Key`]&&!t.includes(n))},St=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(s,...i)=>{for(let o=0;o<t.length;o++){const a=g$[t[o]];if(a&&a(s,t))return}return e(s,...i)})},v$={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Av=(e,t)=>{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=s=>{if(!("key"in s))return;const i=Uo(s.key);if(t.some(o=>o===i||v$[o]===i))return e(s)})},y$=vn({patchProp:i$},HL);let A1;function ST(){return A1||(A1=gL(y$))}const kT=(...e)=>{ST().render(...e)},b$=(...e)=>{const t=ST().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=w$(r);if(!s)return;const i=t._component;!Xe(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=n(s,!1,_$(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},t};function _$(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function w$(e){return rn(e)?document.querySelector(e):e}/*!
|
|
18
|
+
* pinia v3.0.2
|
|
19
|
+
* (c) 2025 Eduardo San Martin Morote
|
|
20
|
+
* @license MIT
|
|
21
|
+
*/let xT;const qp=e=>xT=e,ET=Symbol();function Ov(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var xc;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(xc||(xc={}));function S$(){const e=$a(!0),t=e.run(()=>j({}));let n=[],r=[];const s=$p({install(i){qp(s),s._a=i,i.provide(ET,s),i.config.globalProperties.$pinia=s,r.forEach(o=>n.push(o)),r=[]},use(i){return this._a?n.push(i):r.push(i),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return s}const CT=()=>{};function O1(e,t,n,r=CT){e.push(t);const s=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),r())};return!n&&Ap()&&yn(s),s}function ll(e,...t){e.slice().forEach(n=>{n(...t)})}const k$=e=>e(),M1=Symbol(),ag=Symbol();function Mv(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,r)=>e.set(r,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const r=t[n],s=e[n];Ov(s)&&Ov(r)&&e.hasOwnProperty(n)&&!et(r)&&!To(r)?e[n]=Mv(s,r):e[n]=r}return e}const x$=Symbol();function E$(e){return!Ov(e)||!Object.prototype.hasOwnProperty.call(e,x$)}const{assign:so}=Object;function C$(e){return!!(et(e)&&e.effect)}function T$(e,t,n,r){const{state:s,actions:i,getters:o}=t,a=n.state.value[e];let l;function u(){a||(n.state.value[e]=s?s():{});const c=Xa(n.state.value[e]);return so(c,i,Object.keys(o||{}).reduce((d,f)=>(d[f]=$p(A(()=>{qp(n);const p=n._s.get(e);return o[f].call(p,p)})),d),{}))}return l=TT(e,u,t,n,r,!0),l}function TT(e,t,n={},r,s,i){let o;const a=so({actions:{}},n),l={deep:!0};let u,c,d=[],f=[],p;const g=r.state.value[e];!i&&!g&&(r.state.value[e]={}),j({});let m;function y(w){let E;u=c=!1,typeof w=="function"?(w(r.state.value[e]),E={type:xc.patchFunction,storeId:e,events:p}):(Mv(r.state.value[e],w),E={type:xc.patchObject,payload:w,storeId:e,events:p});const I=m=Symbol();Mt().then(()=>{m===I&&(u=!0)}),c=!0,ll(d,E,r.state.value[e])}const _=i?function(){const{state:E}=n,I=E?E():{};this.$patch(O=>{so(O,I)})}:CT;function b(){o.stop(),d=[],f=[],r._s.delete(e)}const x=(w,E="")=>{if(M1 in w)return w[ag]=E,w;const I=function(){qp(r);const O=Array.from(arguments),R=[],M=[];function D(K){R.push(K)}function F(K){M.push(K)}ll(f,{args:O,name:I[ag],store:S,after:D,onError:F});let U;try{U=w.apply(this&&this.$id===e?this:S,O)}catch(K){throw ll(M,K),K}return U instanceof Promise?U.then(K=>(ll(R,K),K)).catch(K=>(ll(M,K),Promise.reject(K))):(ll(R,U),U)};return I[M1]=!0,I[ag]=E,I},C={_p:r,$id:e,$onAction:O1.bind(null,f),$patch:y,$reset:_,$subscribe(w,E={}){const I=O1(d,w,E.detached,()=>O()),O=o.run(()=>Ee(()=>r.state.value[e],R=>{(E.flush==="sync"?c:u)&&w({storeId:e,type:xc.direct,events:p},R)},so({},l,E)));return I},$dispose:b},S=cn(C);r._s.set(e,S);const P=(r._a&&r._a.runWithContext||k$)(()=>r._e.run(()=>(o=$a()).run(()=>t({action:x}))));for(const w in P){const E=P[w];if(et(E)&&!C$(E)||To(E))i||(g&&E$(E)&&(et(E)?E.value=g[w]:Mv(E,g[w])),r.state.value[e][w]=E);else if(typeof E=="function"){const I=x(E,w);P[w]=I,a.actions[w]=E}}return so(S,P),so(Be(S),P),Object.defineProperty(S,"$state",{get:()=>r.state.value[e],set:w=>{y(E=>{so(E,w)})}}),r._p.forEach(w=>{so(S,o.run(()=>w({store:S,app:r._a,pinia:r,options:a})))}),g&&i&&n.hydrate&&n.hydrate(S.$state,g),u=!0,c=!0,S}/*! #__NO_SIDE_EFFECTS__ */function gs(e,t,n){let r;const s=typeof t=="function";r=s?n:t;function i(o,a){const l=XC();return o=o||(l?Qe(ET,null):null),o&&qp(o),o=xT,o._s.has(e)||(s?TT(e,t,r,o):T$(e,r,o)),o._s.get(e)}return i.$id=e,i}const PT=gs("Dialog",{state:()=>({ids:[],dialogsById:{}}),getters:{dialogs(){return this.ids.map(e=>this.dialogsById[e])},getBeforeOpenedCallback(){return e=>{var t;return(t=this.dialogsById[e])==null?void 0:t.beforeOpenedCallback}},getOpenedCallback(){return e=>{var t;return(t=this.dialogsById[e])==null?void 0:t.openedCallback}},getContext(){return e=>{var t;return(t=this.dialogsById[e])==null?void 0:t.context}},getOutput(){return e=>{var t;return(t=this.dialogsById[e])==null?void 0:t.output}},isDialogOpened(){return e=>{var t;return(t=this.dialogsById[e])==null?void 0:t.opened}}},actions:{openDialogWithContext(e,t){let n=this.dialogsById[e];n||(n=this.registerDialogReference(e)),n.opened=!0,n.context=t,this.dialogsById={...this.dialogsById},console.debug(`[Pinia Dialog ${e}] Opened with context`,t)},closeDialog(e,t){let n=this.dialogsById[e];n||(n=this.registerDialogReference(e)),n.opened=!1,delete n.context,n.output=t,this.dialogsById={...this.dialogsById},console.debug(`[Pinia Dialog ${e}] Closed`)},unregisterDialogReference(e){delete this.dialogsById[e],this.ids=this.ids.filter(t=>t!==e)},registerDialogReference(e,t){if(!e)throw new Error("Cannot unregister undefined dialog reference");console.debug(`[Pinia Dialog ${e}] Registered`);const n=this.dialogsById[e];if(n)return console.debug(`[Pinia Dialog ${e}] Already registered dialog, not registering again`),n;const r={id:e,opened:!1,beforeOpenedCallback:t==null?void 0:t.beforeOpenedCallback,openedCallback:t==null?void 0:t.openedCallback};return this.dialogsById[e]=r,this.ids.push(e),r}}});function Dv(e){return Ap()?(yn(e),!0):!1}const Lv=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const P$=Object.prototype.toString,R$=e=>P$.call(e)==="[object Object]";function lg(e){return Array.isArray(e)?e:[e]}function I$(e,t=1e3,n={}){const{immediate:r=!0,immediateCallback:s=!1}=n;let i=null;const o=Ie(!1);function a(){i&&(clearInterval(i),i=null)}function l(){o.value=!1,a()}function u(){const c=Bn(t);c<=0||(o.value=!0,s&&e(),a(),o.value&&(i=setInterval(e,c)))}if(r&&Lv&&u(),et(t)||typeof t=="function"){const c=Ee(t,()=>{o.value&&Lv&&u()});Dv(c)}return Dv(l),{isActive:Mb(o),pause:l,resume:u}}function A$(e,t,n){return Ee(e,t,{...n,immediate:!0})}const RT=Lv?window:void 0;function O$(e){var t;const n=Bn(e);return(t=n==null?void 0:n.$el)!=null?t:n}function M$(...e){const t=[],n=()=>{t.forEach(a=>a()),t.length=0},r=(a,l,u,c)=>(a.addEventListener(l,u,c),()=>a.removeEventListener(l,u,c)),s=A(()=>{const a=lg(Bn(e[0])).filter(l=>l!=null);return a.every(l=>typeof l!="string")?a:void 0}),i=A$(()=>{var a,l;return[(l=(a=s.value)==null?void 0:a.map(u=>O$(u)))!=null?l:[RT].filter(u=>u!=null),lg(Bn(s.value?e[1]:e[0])),lg(X(s.value?e[2]:e[1])),Bn(s.value?e[3]:e[2])]},([a,l,u,c])=>{if(n(),!(a!=null&&a.length)||!(l!=null&&l.length)||!(u!=null&&u.length))return;const d=R$(c)?{...c}:c;t.push(...a.flatMap(f=>l.flatMap(p=>u.map(g=>r(f,p,g,d)))))},{flush:"post"}),o=()=>{i(),n()};return Dv(n),o}function D$(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function L$(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:s=RT,eventName:i="keydown",passive:o=!1,dedupe:a=!1}=r,l=D$(t);return M$(s,i,c=>{c.repeat&&Bn(a)||l(c)&&n(c)},o)}const Ju=new Map;function Vr(e){const t=Ap();function n(a){var l;const u=Ju.get(e)||new Set;u.add(a),Ju.set(e,u);const c=()=>s(a);return(l=t==null?void 0:t.cleanups)==null||l.push(c),c}function r(a){function l(...u){s(l),a(...u)}return n(l)}function s(a){const l=Ju.get(e);l&&(l.delete(a),l.size||i())}function i(){Ju.delete(e)}function o(a,l){var u;(u=Ju.get(e))==null||u.forEach(c=>c(a,l))}return{on:n,once:r,off:s,emit:o,reset:i}}function tn(e){const t=PT();async function n(r){const s=t.getBeforeOpenedCallback(e);s&&await s(r),t.openDialogWithContext(e,r);const i=t.getOpenedCallback(e);i&&await i(r)}return{dialogId:e,dialogStore:t,openDialog:n,context:()=>t.getContext(e),closeDialog:r=>t.closeDialog(e,r),isDialogOpened:()=>t.isDialogOpened(e),handleAsync:async r=>(await n(r),new Promise(s=>{On(()=>{t.isDialogOpened(e)||s(t.getOutput(e))})}))}}const Et=typeof window<"u",Gb=Et&&"IntersectionObserver"in window,$$=Et&&("ontouchstart"in window||window.navigator.maxTouchPoints>0);function D1(e,t,n){F$(e,t),t.set(e,n)}function F$(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function L1(e,t,n){return e.set(IT(e,t),n),n}function vi(e,t){return e.get(IT(e,t))}function IT(e,t,n){if(typeof e=="function"?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function AT(e,t,n){const r=t.length-1;if(r<0)return e===void 0?n:e;for(let s=0;s<r;s++){if(e==null)return n;e=e[t[s]]}return e==null||e[t[r]]===void 0?n:e[t[r]]}function as(e,t){if(e===t)return!0;if(e instanceof Date&&t instanceof Date&&e.getTime()!==t.getTime()||e!==Object(e)||t!==Object(t))return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>as(e[r],t[r]))}function Na(e,t,n){return e==null||!t||typeof t!="string"?n:e[t]!==void 0?e[t]:(t=t.replace(/\[(\w+)\]/g,".$1"),t=t.replace(/^\./,""),AT(e,t.split("."),n))}function Vn(e,t,n){if(t===!0)return e===void 0?n:e;if(t==null||typeof t=="boolean")return n;if(e!==Object(e)){if(typeof t!="function")return n;const s=t(e,n);return typeof s>"u"?n:s}if(typeof t=="string")return Na(e,t,n);if(Array.isArray(t))return AT(e,t,n);if(typeof t!="function")return n;const r=t(e,n);return typeof r>"u"?n:r}function xl(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Array.from({length:e},(n,r)=>t+r)}function Ne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"px";if(e==null||e==="")return;const n=Number(e);return isNaN(n)?String(e):isFinite(n)?`${n}${t}`:void 0}function Dh(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function $1(e){let t;return e!==null&&typeof e=="object"&&((t=Object.getPrototypeOf(e))===Object.prototype||t===null)}function Kb(e){if(e&&"$el"in e){const t=e.$el;return(t==null?void 0:t.nodeType)===Node.TEXT_NODE?t.nextElementSibling:t}return e}const F1=Object.freeze({enter:13,tab:9,delete:46,esc:27,space:32,up:38,down:40,left:37,right:39,end:35,home:36,del:46,backspace:8,insert:45,pageup:33,pagedown:34,shift:16}),N1=Object.freeze({enter:"Enter",tab:"Tab",delete:"Delete",esc:"Escape",space:"Space",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",end:"End",home:"Home",del:"Delete",backspace:"Backspace",insert:"Insert",pageup:"PageUp",pagedown:"PageDown",shift:"Shift"});function OT(e){return Object.keys(e)}function ug(e,t){return t.every(n=>e.hasOwnProperty(n))}function xd(e,t){const n={};for(const r of t)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function $v(e,t,n){const r=Object.create(null),s=Object.create(null);for(const i in e)t.some(o=>o instanceof RegExp?o.test(i):o===i)&&!(n!=null&&n.some(o=>o===i))?r[i]=e[i]:s[i]=e[i];return[r,s]}function Ms(e,t){const n={...e};return t.forEach(r=>delete n[r]),n}const MT=/^on[^a-z]/,Yb=e=>MT.test(e),N$=["onAfterscriptexecute","onAnimationcancel","onAnimationend","onAnimationiteration","onAnimationstart","onAuxclick","onBeforeinput","onBeforescriptexecute","onChange","onClick","onCompositionend","onCompositionstart","onCompositionupdate","onContextmenu","onCopy","onCut","onDblclick","onFocusin","onFocusout","onFullscreenchange","onFullscreenerror","onGesturechange","onGestureend","onGesturestart","onGotpointercapture","onInput","onKeydown","onKeypress","onKeyup","onLostpointercapture","onMousedown","onMousemove","onMouseout","onMouseover","onMouseup","onMousewheel","onPaste","onPointercancel","onPointerdown","onPointerenter","onPointerleave","onPointermove","onPointerout","onPointerover","onPointerup","onReset","onSelect","onSubmit","onTouchcancel","onTouchend","onTouchmove","onTouchstart","onTransitioncancel","onTransitionend","onTransitionrun","onTransitionstart","onWheel"];function Qa(e){const[t,n]=$v(e,[MT]),r=Ms(t,N$),[s,i]=$v(n,["class","style","id",/^data-/]);return Object.assign(s,t),Object.assign(i,r),[s,i]}function An(e){return e==null?[]:Array.isArray(e)?e:[e]}function V$(e,t){let n=0;const r=function(){for(var s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];clearTimeout(n),n=setTimeout(()=>e(...i),X(t))};return r.clear=()=>{clearTimeout(n)},r.immediate=e,r}function Cr(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return Math.max(t,Math.min(n,e))}function V1(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0";return e+n.repeat(Math.max(0,t-e.length))}function B1(e,t){return(arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0").repeat(Math.max(0,t-e.length))+e}function B$(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const n=[];let r=0;for(;r<e.length;)n.push(e.substr(r,t)),r+=t;return n}function U1(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e3;if(e<t)return`${e} B`;const n=t===1024?["Ki","Mi","Gi"]:["k","M","G"];let r=-1;for(;Math.abs(e)>=t&&r<n.length-1;)e/=t,++r;return`${e.toFixed(1)} ${n[r]}B`}function er(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r={};for(const s in e)r[s]=e[s];for(const s in t){const i=e[s],o=t[s];if($1(i)&&$1(o)){r[s]=er(i,o,n);continue}if(n&&Array.isArray(i)&&Array.isArray(o)){r[s]=n(i,o);continue}r[s]=o}return r}function DT(e){return e.map(t=>t.type===Ae?DT(t.children):t).flat()}function Ta(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(Ta.cache.has(e))return Ta.cache.get(e);const t=e.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return Ta.cache.set(e,t),t}Ta.cache=new Map;function El(e,t){if(!t||typeof t!="object")return[];if(Array.isArray(t))return t.map(n=>El(e,n)).flat(1);if(t.suspense)return El(e,t.ssContent);if(Array.isArray(t.children))return t.children.map(n=>El(e,n)).flat(1);if(t.component){if(Object.getOwnPropertySymbols(t.component.provides).includes(e))return[t.component];if(t.component.subTree)return El(e,t.component.subTree).flat(1)}return[]}var ul=new WeakMap,Zo=new WeakMap;class LT{constructor(t){D1(this,ul,[]),D1(this,Zo,0),this.size=t}get isFull(){return vi(ul,this).length===this.size}push(t){vi(ul,this)[vi(Zo,this)]=t,L1(Zo,this,(vi(Zo,this)+1)%this.size)}values(){return vi(ul,this).slice(vi(Zo,this)).concat(vi(ul,this).slice(0,vi(Zo,this)))}clear(){vi(ul,this).length=0,L1(Zo,this,0)}}function Xb(e){const t=cn({});On(()=>{const r=e();for(const s in r)t[s]=r[s]},{flush:"sync"});const n={};for(const r in t)n[r]=ae(()=>t[r]);return n}function Lh(e,t){return e.includes(t)}function $T(e){return e[2].toLowerCase()+e.slice(3)}const Un=()=>[Function,Array];function z1(e,t){return t="on"+ci(t),!!(e[t]||e[`${t}Once`]||e[`${t}Capture`]||e[`${t}OnceCapture`]||e[`${t}CaptureOnce`])}function Wp(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(Array.isArray(e))for(const s of e)s(...n);else typeof e=="function"&&e(...n)}function qc(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const n=["button","[href]",'input:not([type="hidden"])',"select","textarea","[tabindex]"].map(r=>`${r}${t?':not([tabindex="-1"])':""}:not([disabled])`).join(", ");return[...e.querySelectorAll(n)]}function FT(e,t,n){let r,s=e.indexOf(document.activeElement);const i=t==="next"?1:-1;do s+=i,r=e[s];while((!r||r.offsetParent==null||!((n==null?void 0:n(r))??!0))&&s<e.length&&s>=0);return r}function Ec(e,t){var r,s,i,o;const n=qc(e);if(!t)(e===document.activeElement||!e.contains(document.activeElement))&&((r=n[0])==null||r.focus());else if(t==="first")(s=n[0])==null||s.focus();else if(t==="last")(i=n.at(-1))==null||i.focus();else if(typeof t=="number")(o=n[t])==null||o.focus();else{const a=FT(n,t);a?a.focus():Ec(e,t==="next"?"first":"last")}}function tf(e){return e==null||typeof e=="string"&&e.trim()===""}function $h(e,t){if(!(Et&&typeof CSS<"u"&&typeof CSS.supports<"u"&&CSS.supports(`selector(${t})`)))return null;try{return!!e&&e.matches(t)}catch{return null}}function NT(e){return e.some(t=>tu(t)?t.type===Nn?!1:t.type!==Ae||NT(t.children):!0)?e:null}function U$(e,t){if(!Et||e===0)return t(),()=>{};const n=window.setTimeout(t,e);return()=>window.clearTimeout(n)}function z$(e,t){const n=e.clientX,r=e.clientY,s=t.getBoundingClientRect(),i=s.left,o=s.top,a=s.right,l=s.bottom;return n>=i&&n<=a&&r>=o&&r<=l}function Fv(){const e=Ie(),t=n=>{e.value=n};return Object.defineProperty(t,"value",{enumerable:!0,get:()=>e.value,set:n=>e.value=n}),Object.defineProperty(t,"el",{enumerable:!0,get:()=>Kb(e.value)}),t}function H1(e){const t=e.key.length===1,n=!e.ctrlKey&&!e.metaKey&&!e.altKey;return t&&n}function VT(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="bigint"}const BT=["top","bottom"],H$=["start","end","left","right"];function Nv(e,t){let[n,r]=e.split(" ");return r||(r=Lh(BT,n)?"start":Lh(H$,n)?"top":"center"),{side:Vv(n,t),align:Vv(r,t)}}function Vv(e,t){return e==="start"?t?"right":"left":e==="end"?t?"left":"right":e}function cg(e){return{side:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[e.side],align:e.align}}function dg(e){return{side:e.side,align:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[e.align]}}function j1(e){return{side:e.align,align:e.side}}function q1(e){return Lh(BT,e.side)?"y":"x"}class ko{constructor(t){let{x:n,y:r,width:s,height:i}=t;this.x=n,this.y=r,this.width=s,this.height=i}get top(){return this.y}get bottom(){return this.y+this.height}get left(){return this.x}get right(){return this.x+this.width}}function W1(e,t){return{x:{before:Math.max(0,t.left-e.left),after:Math.max(0,e.right-t.right)},y:{before:Math.max(0,t.top-e.top),after:Math.max(0,e.bottom-t.bottom)}}}function UT(e){return Array.isArray(e)?new ko({x:e[0],y:e[1],width:0,height:0}):e.getBoundingClientRect()}function Qb(e){const t=e.getBoundingClientRect(),n=getComputedStyle(e),r=n.transform;if(r){let s,i,o,a,l;if(r.startsWith("matrix3d("))s=r.slice(9,-1).split(/, /),i=Number(s[0]),o=Number(s[5]),a=Number(s[12]),l=Number(s[13]);else if(r.startsWith("matrix("))s=r.slice(7,-1).split(/, /),i=Number(s[0]),o=Number(s[3]),a=Number(s[4]),l=Number(s[5]);else return new ko(t);const u=n.transformOrigin,c=t.x-a-(1-i)*parseFloat(u),d=t.y-l-(1-o)*parseFloat(u.slice(u.indexOf(" ")+1)),f=i?t.width/i:e.offsetWidth+1,p=o?t.height/o:e.offsetHeight+1;return new ko({x:c,y:d,width:f,height:p})}else return new ko(t)}function Cl(e,t,n){if(typeof e.animate>"u")return{finished:Promise.resolve()};let r;try{r=e.animate(t,n)}catch{return{finished:Promise.resolve()}}return typeof r.finished>"u"&&(r.finished=new Promise(s=>{r.onfinish=()=>{s(r)}})),r}const Kf=new WeakMap;function j$(e,t){Object.keys(t).forEach(n=>{if(Yb(n)){const r=$T(n),s=Kf.get(e);if(t[n]==null)s==null||s.forEach(i=>{const[o,a]=i;o===r&&(e.removeEventListener(r,a),s.delete(i))});else if(!s||![...s].some(i=>i[0]===r&&i[1]===t[n])){e.addEventListener(r,t[n]);const i=s||new Set;i.add([r,t[n]]),Kf.has(e)||Kf.set(e,i)}}else t[n]==null?e.removeAttribute(n):e.setAttribute(n,t[n])})}function q$(e,t){Object.keys(t).forEach(n=>{if(Yb(n)){const r=$T(n),s=Kf.get(e);s==null||s.forEach(i=>{const[o,a]=i;o===r&&(e.removeEventListener(r,a),s.delete(i))})}else e.removeAttribute(n)})}const cl=2.4,G1=.2126729,K1=.7151522,Y1=.072175,W$=.55,G$=.58,K$=.57,Y$=.62,nf=.03,X1=1.45,X$=5e-4,Q$=1.25,J$=1.25,Q1=.078,J1=12.82051282051282,rf=.06,Z1=.001;function ew(e,t){const n=(e.r/255)**cl,r=(e.g/255)**cl,s=(e.b/255)**cl,i=(t.r/255)**cl,o=(t.g/255)**cl,a=(t.b/255)**cl;let l=n*G1+r*K1+s*Y1,u=i*G1+o*K1+a*Y1;if(l<=nf&&(l+=(nf-l)**X1),u<=nf&&(u+=(nf-u)**X1),Math.abs(u-l)<X$)return 0;let c;if(u>l){const d=(u**W$-l**G$)*Q$;c=d<Z1?0:d<Q1?d-d*J1*rf:d-rf}else{const d=(u**Y$-l**K$)*J$;c=d>-Z1?0:d>-Q1?d-d*J1*rf:d+rf}return c*100}function Z$(e,t){t=Array.isArray(t)?t.slice(0,-1).map(n=>`'${n}'`).join(", ")+` or '${t.at(-1)}'`:`'${t}'`}const Fh=.20689655172413793,eF=e=>e>Fh**3?Math.cbrt(e):e/(3*Fh**2)+4/29,tF=e=>e>Fh?e**3:3*Fh**2*(e-4/29);function zT(e){const t=eF,n=t(e[1]);return[116*n-16,500*(t(e[0]/.95047)-n),200*(n-t(e[2]/1.08883))]}function HT(e){const t=tF,n=(e[0]+16)/116;return[t(n+e[1]/500)*.95047,t(n),t(n-e[2]/200)*1.08883]}const nF=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]],rF=e=>e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055,sF=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],iF=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4;function jT(e){const t=Array(3),n=rF,r=nF;for(let s=0;s<3;++s)t[s]=Math.round(Cr(n(r[s][0]*e[0]+r[s][1]*e[1]+r[s][2]*e[2]))*255);return{r:t[0],g:t[1],b:t[2]}}function Jb(e){let{r:t,g:n,b:r}=e;const s=[0,0,0],i=iF,o=sF;t=i(t/255),n=i(n/255),r=i(r/255);for(let a=0;a<3;++a)s[a]=o[a][0]*t+o[a][1]*n+o[a][2]*r;return s}function Bv(e){return!!e&&/^(#|var\(--|(rgb|hsl)a?\()/.test(e)}function oF(e){return Bv(e)&&!/^((rgb|hsl)a?\()?var\(--/.test(e)}const tw=/^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/,aF={rgb:(e,t,n,r)=>({r:e,g:t,b:n,a:r}),rgba:(e,t,n,r)=>({r:e,g:t,b:n,a:r}),hsl:(e,t,n,r)=>nw({h:e,s:t,l:n,a:r}),hsla:(e,t,n,r)=>nw({h:e,s:t,l:n,a:r}),hsv:(e,t,n,r)=>Wc({h:e,s:t,v:n,a:r}),hsva:(e,t,n,r)=>Wc({h:e,s:t,v:n,a:r})};function ri(e){if(typeof e=="number")return{r:(e&16711680)>>16,g:(e&65280)>>8,b:e&255};if(typeof e=="string"&&tw.test(e)){const{groups:t}=e.match(tw),{fn:n,values:r}=t,s=r.split(/,\s*|\s*\/\s*|\s+/).map((i,o)=>i.endsWith("%")||o>0&&o<3&&["hsl","hsla","hsv","hsva"].includes(n)?parseFloat(i)/100:parseFloat(i));return aF[n](...s)}else if(typeof e=="string"){let t=e.startsWith("#")?e.slice(1):e;return[3,4].includes(t.length)?t=t.split("").map(n=>n+n).join(""):[6,8].includes(t.length),uF(t)}else if(typeof e=="object"){if(ug(e,["r","g","b"]))return e;if(ug(e,["h","s","l"]))return Wc(qT(e));if(ug(e,["h","s","v"]))return Wc(e)}throw new TypeError(`Invalid color: ${e==null?e:String(e)||e.constructor.name}
|
|
22
|
+
Expected #hex, #hexa, rgb(), rgba(), hsl(), hsla(), object or number`)}function Wc(e){const{h:t,s:n,v:r,a:s}=e,i=a=>{const l=(a+t/60)%6;return r-r*n*Math.max(Math.min(l,4-l,1),0)},o=[i(5),i(3),i(1)].map(a=>Math.round(a*255));return{r:o[0],g:o[1],b:o[2],a:s}}function nw(e){return Wc(qT(e))}function qT(e){const{h:t,s:n,l:r,a:s}=e,i=r+n*Math.min(r,1-r),o=i===0?0:2-2*r/i;return{h:t,s:o,v:i,a:s}}function sf(e){const t=Math.round(e).toString(16);return("00".substr(0,2-t.length)+t).toUpperCase()}function lF(e){let{r:t,g:n,b:r,a:s}=e;return`#${[sf(t),sf(n),sf(r),s!==void 0?sf(Math.round(s*255)):""].join("")}`}function uF(e){e=cF(e);let[t,n,r,s]=B$(e,2).map(i=>parseInt(i,16));return s=s===void 0?s:s/255,{r:t,g:n,b:r,a:s}}function cF(e){return e.startsWith("#")&&(e=e.slice(1)),e=e.replace(/([^0-9a-f])/gi,"F"),(e.length===3||e.length===4)&&(e=e.split("").map(t=>t+t).join("")),e.length!==6&&(e=V1(V1(e,6),8,"F")),e}function dF(e,t){const n=zT(Jb(e));return n[0]=n[0]+t*10,jT(HT(n))}function fF(e,t){const n=zT(Jb(e));return n[0]=n[0]-t*10,jT(HT(n))}function hF(e){const t=ri(e);return Jb(t)[1]}function WT(e){const t=Math.abs(ew(ri(0),ri(e)));return Math.abs(ew(ri(16777215),ri(e)))>Math.min(t,50)?"#fff":"#000"}function de(e,t){return n=>Object.keys(e).reduce((r,s)=>{const o=typeof e[s]=="object"&&e[s]!=null&&!Array.isArray(e[s])?e[s]:{type:e[s]};return n&&s in n?r[s]={...o,default:n[s]}:r[s]=o,t&&!r[s].source&&(r[s].source=t),r},{})}const Ue=de({class:[String,Array,Object],style:{type:[String,Array,Object],default:null}},"component");function an(e,t){const n=Hp();if(!n)throw new Error(`[Vuetify] ${e} must be called from inside a setup function`);return n}function di(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"composables";const t=an(e).type;return Ta((t==null?void 0:t.aliasName)||(t==null?void 0:t.name))}function pF(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:an("injectSelf");const{provides:n}=t;if(n&&e in n)return n[e]}const ru=Symbol.for("vuetify:defaults");function mF(e){return j(e)}function Zb(){const e=Qe(ru);if(!e)throw new Error("[Vuetify] Could not find defaults instance");return e}function Ir(e,t){const n=Zb(),r=j(e),s=A(()=>{if(X(t==null?void 0:t.disabled))return n.value;const o=X(t==null?void 0:t.scoped),a=X(t==null?void 0:t.reset),l=X(t==null?void 0:t.root);if(r.value==null&&!(o||a||l))return n.value;let u=er(r.value,{prev:n.value});if(o)return u;if(a||l){const c=Number(a||1/0);for(let d=0;d<=c&&!(!u||!("prev"in u));d++)u=u.prev;return u&&typeof l=="string"&&l in u&&(u=er(er(u,{prev:u}),u[l])),u}return u.prev?er(u.prev,u):u});return Kt(ru,s),s}function gF(e,t){return e.props&&(typeof e.props[t]<"u"||typeof e.props[Ta(t)]<"u")}function vF(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Zb();const r=an("useDefaults");if(t=t??r.type.name??r.type.__name,!t)throw new Error("[Vuetify] Could not determine component name");const s=A(()=>{var l;return(l=n.value)==null?void 0:l[e._as??t]}),i=new Proxy(e,{get(l,u){var p,g,m,y;const c=Reflect.get(l,u);if(u==="class"||u==="style")return[(p=s.value)==null?void 0:p[u],c].filter(_=>_!=null);if(gF(r.vnode,u))return c;const d=(g=s.value)==null?void 0:g[u];if(d!==void 0)return d;const f=(y=(m=n.value)==null?void 0:m.global)==null?void 0:y[u];return f!==void 0?f:c}}),o=Ie();On(()=>{if(s.value){const l=Object.entries(s.value).filter(u=>{let[c]=u;return c.startsWith(c[0].toUpperCase())});o.value=l.length?Object.fromEntries(l):void 0}else o.value=void 0});function a(){const l=pF(ru,r);Kt(ru,A(()=>o.value?er((l==null?void 0:l.value)??{},o.value):l==null?void 0:l.value))}return{props:i,provideSubDefaults:a}}function Su(e){if(e._setup=e._setup??e.setup,!e.name)return e;if(e._setup){e.props=de(e.props??{},e.name)();const t=Object.keys(e.props).filter(n=>n!=="class"&&n!=="style");e.filterProps=function(r){return xd(r,t)},e.props._as=String,e.setup=function(r,s){const i=Zb();if(!i.value)return e._setup(r,s);const{props:o,provideSubDefaults:a}=vF(r,r._as??e.name,i),l=e._setup(o,s);return a(),l}}return e}function ke(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return t=>(e?Su:Le)(t)}function yF(e,t){return t.props=e,t}function ku(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"div",n=arguments.length>2?arguments[2]:void 0;return ke()({name:n??ci(Rr(e.replace(/__/g,"-"))),props:{tag:{type:String,default:t},...Ue()},setup(r,s){let{slots:i}=s;return()=>{var o;return pr(r.tag,{class:[e,r.class],style:r.style},(o=i.default)==null?void 0:o.call(i))}}})}function GT(e){if(typeof e.getRootNode!="function"){for(;e.parentNode;)e=e.parentNode;return e!==document?null:document}const t=e.getRootNode();return t!==document&&t.getRootNode({composed:!0})!==document?null:t}const Nh="cubic-bezier(0.4, 0, 0.2, 1)",bF="cubic-bezier(0.0, 0, 0.2, 1)",_F="cubic-bezier(0.4, 0, 1, 1)";function rw(e,t,n){return Object.keys(e).filter(r=>Yb(r)&&r.endsWith(t)).reduce((r,s)=>(r[s.slice(0,-t.length)]=i=>e[s](i,n(i)),r),{})}function KT(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;for(;e;){if(t?wF(e):e_(e))return e;e=e.parentElement}return document.scrollingElement}function Vh(e,t){const n=[];if(t&&e&&!t.contains(e))return n;for(;e&&(e_(e)&&n.push(e),e!==t);)e=e.parentElement;return n}function e_(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return!1;const t=window.getComputedStyle(e);return t.overflowY==="scroll"||t.overflowY==="auto"&&e.scrollHeight>e.clientHeight}function wF(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return!1;const t=window.getComputedStyle(e);return["scroll","auto"].includes(t.overflowY)}function SF(e){for(;e;){if(window.getComputedStyle(e).position==="fixed")return!0;e=e.offsetParent}return!1}function Oe(e){const t=an("useRender");t.render=e}const vs=de({border:[Boolean,Number,String]},"border");function Ds(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:di();return{borderClasses:A(()=>{const r=e.border;return r===!0||r===""?`${t}--border`:typeof r=="string"||r===0?String(r).split(" ").map(s=>`border-${s}`):[]})}}const kF=[null,"default","comfortable","compact"],Ar=de({density:{type:String,default:"default",validator:e=>kF.includes(e)}},"density");function ys(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:di();return{densityClasses:ae(()=>`${t}--density-${e.density}`)}}const bs=de({elevation:{type:[Number,String],validator(e){const t=parseInt(e);return!isNaN(t)&&t>=0&&t<=24}}},"elevation");function Ls(e){return{elevationClasses:ae(()=>{const n=et(e)?e.value:e.elevation;return n==null?[]:[`elevation-${n}`]})}}const Dn=de({rounded:{type:[Boolean,Number,String],default:void 0},tile:Boolean},"rounded");function jn(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:di();return{roundedClasses:A(()=>{const r=et(e)?e.value:e.rounded,s=et(e)?e.value:e.tile,i=[];if(r===!0||r==="")i.push(`${t}--rounded`);else if(typeof r=="string"||r===0)for(const o of String(r).split(" "))i.push(`rounded-${o}`);else(s||r===!1)&&i.push("rounded-0");return i})}}const _t=de({tag:{type:[String,Object,Function],default:"div"}},"tag"),Gc=Symbol.for("vuetify:theme"),Lt=de({theme:String},"theme");function sw(){return{defaultTheme:"light",variations:{colors:[],lighten:0,darken:0},themes:{light:{dark:!1,colors:{background:"#FFFFFF",surface:"#FFFFFF","surface-bright":"#FFFFFF","surface-light":"#EEEEEE","surface-variant":"#424242","on-surface-variant":"#EEEEEE",primary:"#1867C0","primary-darken-1":"#1F5592",secondary:"#48A9A6","secondary-darken-1":"#018786",error:"#B00020",info:"#2196F3",success:"#4CAF50",warning:"#FB8C00"},variables:{"border-color":"#000000","border-opacity":.12,"high-emphasis-opacity":.87,"medium-emphasis-opacity":.6,"disabled-opacity":.38,"idle-opacity":.04,"hover-opacity":.04,"focus-opacity":.12,"selected-opacity":.08,"activated-opacity":.12,"pressed-opacity":.12,"dragged-opacity":.08,"theme-kbd":"#212529","theme-on-kbd":"#FFFFFF","theme-code":"#F5F5F5","theme-on-code":"#000000"}},dark:{dark:!0,colors:{background:"#121212",surface:"#212121","surface-bright":"#ccbfd6","surface-light":"#424242","surface-variant":"#c8c8c8","on-surface-variant":"#000000",primary:"#2196F3","primary-darken-1":"#277CC1",secondary:"#54B6B2","secondary-darken-1":"#48A9A6",error:"#CF6679",info:"#2196F3",success:"#4CAF50",warning:"#FB8C00"},variables:{"border-color":"#FFFFFF","border-opacity":.12,"high-emphasis-opacity":1,"medium-emphasis-opacity":.7,"disabled-opacity":.5,"idle-opacity":.1,"hover-opacity":.04,"focus-opacity":.12,"selected-opacity":.08,"activated-opacity":.12,"pressed-opacity":.16,"dragged-opacity":.08,"theme-kbd":"#212529","theme-on-kbd":"#FFFFFF","theme-code":"#343434","theme-on-code":"#CCCCCC"}}},stylesheetId:"vuetify-theme-stylesheet"}}function xF(){var r,s;let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:sw();const t=sw();if(!e)return{...t,isDisabled:!0};const n={};for(const[i,o]of Object.entries(e.themes??{})){const a=o.dark||i==="dark"?(r=t.themes)==null?void 0:r.dark:(s=t.themes)==null?void 0:s.light;n[i]=er(a,o)}return er(t,{...e,themes:n})}function ea(e,t,n,r){e.push(`${PF(t,r)} {
|
|
23
|
+
`,...n.map(s=>` ${s};
|
|
24
|
+
`),`}
|
|
25
|
+
`)}function iw(e){const t=e.dark?2:1,n=e.dark?1:2,r=[];for(const[s,i]of Object.entries(e.colors)){const o=ri(i);r.push(`--v-theme-${s}: ${o.r},${o.g},${o.b}`),s.startsWith("on-")||r.push(`--v-theme-${s}-overlay-multiplier: ${hF(i)>.18?t:n}`)}for(const[s,i]of Object.entries(e.variables)){const o=typeof i=="string"&&i.startsWith("#")?ri(i):void 0,a=o?`${o.r}, ${o.g}, ${o.b}`:void 0;r.push(`--v-${s}: ${a??i}`)}return r}function EF(e,t,n){const r={};if(n)for(const s of["lighten","darken"]){const i=s==="lighten"?dF:fF;for(const o of xl(n[s],1))r[`${e}-${s}-${o}`]=lF(i(ri(t),o))}return r}function CF(e,t){if(!t)return{};let n={};for(const r of t.colors){const s=e[r];s&&(n={...n,...EF(r,s,t)})}return n}function TF(e){const t={};for(const n of Object.keys(e)){if(n.startsWith("on-")||e[`on-${n}`])continue;const r=`on-${n}`,s=ri(e[n]);t[r]=WT(s)}return t}function PF(e,t){if(!t)return e;const n=`:where(${t})`;return e===":root"?n:`${n} ${e}`}function RF(e,t){e&&(e.innerHTML=t)}function IF(e,t){if(!Et)return null;let n=document.getElementById(e);return n||(n=document.createElement("style"),n.id=e,n.type="text/css",t&&n.setAttribute("nonce",t),document.head.appendChild(n)),n}function AF(e){const t=xF(e),n=Ie(t.defaultTheme),r=j(t.themes),s=A(()=>{const u={};for(const[c,d]of Object.entries(r.value)){const f={...d.colors,...CF(d.colors,t.variations)};u[c]={...d,colors:{...f,...TF(f)}}}return u}),i=ae(()=>s.value[n.value]),o=A(()=>{var p;const u=[];(p=i.value)!=null&&p.dark&&ea(u,":root",["color-scheme: dark"],t.scope),ea(u,":root",iw(i.value),t.scope);for(const[g,m]of Object.entries(s.value))ea(u,`.v-theme--${g}`,[`color-scheme: ${m.dark?"dark":"normal"}`,...iw(m)],t.scope);const c=[],d=[],f=new Set(Object.values(s.value).flatMap(g=>Object.keys(g.colors)));for(const g of f)g.startsWith("on-")?ea(d,`.${g}`,[`color: rgb(var(--v-theme-${g})) !important`],t.scope):(ea(c,`.bg-${g}`,[`--v-theme-overlay-multiplier: var(--v-theme-${g}-overlay-multiplier)`,`background-color: rgb(var(--v-theme-${g})) !important`,`color: rgb(var(--v-theme-on-${g})) !important`],t.scope),ea(d,`.text-${g}`,[`color: rgb(var(--v-theme-${g})) !important`],t.scope),ea(d,`.border-${g}`,[`--v-border-color: var(--v-theme-${g})`],t.scope));return u.push(...c,...d),u.map((g,m)=>m===0?g:` ${g}`).join("")});function a(u){if(t.isDisabled)return;const c=u._context.provides.usehead;if(c){let p=function(){return{style:[{textContent:o.value,id:t.stylesheetId,nonce:t.cspNonce||!1}]}};var d=p;if(c.push){const g=c.push(p);Et&&Ee(o,()=>{g.patch(p)})}else Et?(c.addHeadObjs(ae(p)),On(()=>c.updateDOM())):c.addHeadObjs(p())}else{let p=function(){RF(IF(t.stylesheetId,t.cspNonce),o.value)};var f=p;Et?Ee(o,p,{immediate:!0}):p()}}const l=ae(()=>t.isDisabled?void 0:`v-theme--${n.value}`);return{install:a,isDisabled:t.isDisabled,name:n,themes:r,current:i,computedThemes:s,themeClasses:l,styles:o,global:{name:n,current:i}}}function Zt(e){an("provideTheme");const t=Qe(Gc,null);if(!t)throw new Error("Could not find Vuetify theme injection");const n=ae(()=>e.theme??t.name.value),r=ae(()=>t.themes.value[n.value]),s=ae(()=>t.isDisabled?void 0:`v-theme--${n.value}`),i={...t,name:n,current:r,themeClasses:s};return Kt(Gc,i),i}function YT(){an("useTheme");const e=Qe(Gc,null);if(!e)throw new Error("Could not find Vuetify theme injection");return e}function t_(e){return Xb(()=>{const t=Bn(e),n=[],r={};if(t.background)if(Bv(t.background)){if(r.backgroundColor=t.background,!t.text&&oF(t.background)){const s=ri(t.background);if(s.a==null||s.a===1){const i=WT(s);r.color=i,r.caretColor=i}}}else n.push(`bg-${t.background}`);return t.text&&(Bv(t.text)?(r.color=t.text,r.caretColor=t.text):n.push(`text-${t.text}`)),{colorClasses:n,colorStyles:r}})}function As(e){const{colorClasses:t,colorStyles:n}=t_(()=>({text:Bn(e)}));return{textColorClasses:t,textColorStyles:n}}function fr(e){const{colorClasses:t,colorStyles:n}=t_(()=>({background:Bn(e)}));return{backgroundColorClasses:t,backgroundColorStyles:n}}const OF=["elevated","flat","tonal","outlined","text","plain"];function jo(e,t){return h(Ae,null,[e&&h("span",{key:"overlay",class:`${t}__overlay`},null),h("span",{key:"underlay",class:`${t}__underlay`},null)])}const $s=de({color:String,variant:{type:String,default:"elevated",validator:e=>OF.includes(e)}},"variant");function Ja(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:di();const n=ae(()=>{const{variant:i}=Bn(e);return`${t}--variant-${i}`}),{colorClasses:r,colorStyles:s}=t_(()=>{const{variant:i,color:o}=Bn(e);return{[["elevated","flat"].includes(i)?"background":"text"]:o}});return{colorClasses:r,colorStyles:s,variantClasses:n}}const XT=de({baseColor:String,divided:Boolean,...vs(),...Ue(),...Ar(),...bs(),...Dn(),..._t(),...Lt(),...$s()},"VBtnGroup"),ow=ke()({name:"VBtnGroup",props:XT(),setup(e,t){let{slots:n}=t;const{themeClasses:r}=Zt(e),{densityClasses:s}=ys(e),{borderClasses:i}=Ds(e),{elevationClasses:o}=Ls(e),{roundedClasses:a}=jn(e);Ir({VBtn:{height:"auto",baseColor:ae(()=>e.baseColor),color:ae(()=>e.color),density:ae(()=>e.density),flat:!0,variant:ae(()=>e.variant)}}),Oe(()=>h(e.tag,{class:["v-btn-group",{"v-btn-group--divided":e.divided},r.value,i.value,s.value,o.value,a.value,e.class],style:e.style},n))}});function Hr(e,t){let n;function r(){n=$a(),n.run(()=>t.length?t(()=>{n==null||n.stop(),r()}):t())}Ee(e,s=>{s&&!n?r():s||(n==null||n.stop(),n=void 0)},{immediate:!0}),yn(()=>{n==null||n.stop()})}function it(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:d=>d,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:d=>d;const i=an("useProxiedModel"),o=j(e[t]!==void 0?e[t]:n),a=Ta(t),u=A(a!==t?()=>{var d,f,p,g;return e[t],!!(((d=i.vnode.props)!=null&&d.hasOwnProperty(t)||(f=i.vnode.props)!=null&&f.hasOwnProperty(a))&&((p=i.vnode.props)!=null&&p.hasOwnProperty(`onUpdate:${t}`)||(g=i.vnode.props)!=null&&g.hasOwnProperty(`onUpdate:${a}`)))}:()=>{var d,f;return e[t],!!((d=i.vnode.props)!=null&&d.hasOwnProperty(t)&&((f=i.vnode.props)!=null&&f.hasOwnProperty(`onUpdate:${t}`)))});Hr(()=>!u.value,()=>{Ee(()=>e[t],d=>{o.value=d})});const c=A({get(){const d=e[t];return r(u.value?d:o.value)},set(d){const f=s(d),p=Be(u.value?e[t]:o.value);p===f||r(p)===d||(o.value=f,i==null||i.emit(`update:${t}`,f))}});return Object.defineProperty(c,"externalValue",{get:()=>u.value?e[t]:o.value}),c}const Ed=de({modelValue:{type:null,default:void 0},multiple:Boolean,mandatory:[Boolean,String],max:Number,selectedClass:String,disabled:Boolean},"group"),Cd=de({value:null,disabled:Boolean,selectedClass:String},"group-item");function Td(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;const r=an("useGroupItem");if(!r)throw new Error("[Vuetify] useGroupItem composable must be used inside a component setup function");const s=ms();Kt(Symbol.for(`${t.description}:id`),s);const i=Qe(t,null);if(!i){if(!n)return i;throw new Error(`[Vuetify] Could not find useGroup injection with symbol ${t.description}`)}const o=ae(()=>e.value),a=A(()=>!!(i.disabled.value||e.disabled));i.register({id:s,value:o,disabled:a},r),Cn(()=>{i.unregister(s)});const l=A(()=>i.isSelected(s)),u=A(()=>i.items.value[0].id===s),c=A(()=>i.items.value[i.items.value.length-1].id===s),d=A(()=>l.value&&[i.selectedClass.value,e.selectedClass]);return Ee(l,f=>{r.emit("group:selected",{value:f})},{flush:"sync"}),{id:s,isSelected:l,isFirst:u,isLast:c,toggle:()=>i.select(s,!l.value),select:f=>i.select(s,f),selectedClass:d,value:o,disabled:a,group:i}}function xu(e,t){let n=!1;const r=cn([]),s=it(e,"modelValue",[],f=>f==null?[]:QT(r,An(f)),f=>{const p=DF(r,f);return e.multiple?p:p[0]}),i=an("useGroup");function o(f,p){const g=f,m=Symbol.for(`${t.description}:id`),_=El(m,i==null?void 0:i.vnode).indexOf(p);X(g.value)==null&&(g.value=_,g.useIndexAsValue=!0),_>-1?r.splice(_,0,g):r.push(g)}function a(f){if(n)return;l();const p=r.findIndex(g=>g.id===f);r.splice(p,1)}function l(){const f=r.find(p=>!p.disabled);f&&e.mandatory==="force"&&!s.value.length&&(s.value=[f.id])}bt(()=>{l()}),Cn(()=>{n=!0}),Fb(()=>{for(let f=0;f<r.length;f++)r[f].useIndexAsValue&&(r[f].value=f)});function u(f,p){const g=r.find(m=>m.id===f);if(!(p&&(g!=null&&g.disabled)))if(e.multiple){const m=s.value.slice(),y=m.findIndex(b=>b===f),_=~y;if(p=p??!_,_&&e.mandatory&&m.length<=1||!_&&e.max!=null&&m.length+1>e.max)return;y<0&&p?m.push(f):y>=0&&!p&&m.splice(y,1),s.value=m}else{const m=s.value.includes(f);if(e.mandatory&&m)return;s.value=p??!m?[f]:[]}}function c(f){if(e.multiple,s.value.length){const p=s.value[0],g=r.findIndex(_=>_.id===p);let m=(g+f)%r.length,y=r[m];for(;y.disabled&&m!==g;)m=(m+f)%r.length,y=r[m];if(y.disabled)return;s.value=[r[m].id]}else{const p=r.find(g=>!g.disabled);p&&(s.value=[p.id])}}const d={register:o,unregister:a,selected:s,select:u,disabled:ae(()=>e.disabled),prev:()=>c(r.length-1),next:()=>c(1),isSelected:f=>s.value.includes(f),selectedClass:ae(()=>e.selectedClass),items:ae(()=>r),getItemIndex:f=>MF(r,f)};return Kt(t,d),d}function MF(e,t){const n=QT(e,[t]);return n.length?e.findIndex(r=>r.id===n[0]):-1}function QT(e,t){const n=[];return t.forEach(r=>{const s=e.find(o=>as(r,o.value)),i=e[r];(s==null?void 0:s.value)!=null?n.push(s.id):i!=null&&n.push(i.id)}),n}function DF(e,t){const n=[];return t.forEach(r=>{const s=e.findIndex(i=>i.id===r);if(~s){const i=e[s];n.push(i.value!=null?i.value:s)}}),n}const JT=Symbol.for("vuetify:v-btn-toggle"),LF=de({...XT(),...Ed()},"VBtnToggle"),ZT=ke()({name:"VBtnToggle",props:LF(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{isSelected:r,next:s,prev:i,select:o,selected:a}=xu(e,JT);return Oe(()=>{const l=ow.filterProps(e);return h(ow,ge({class:["v-btn-toggle",e.class]},l,{style:e.style}),{default:()=>{var u;return[(u=n.default)==null?void 0:u.call(n,{isSelected:r,next:s,prev:i,select:o,selected:a})]}})}),{next:s,prev:i,select:o}}}),$F=de({defaults:Object,disabled:Boolean,reset:[Number,String],root:[Boolean,String],scoped:Boolean},"VDefaultsProvider"),Ot=ke(!1)({name:"VDefaultsProvider",props:$F(),setup(e,t){let{slots:n}=t;const{defaults:r,disabled:s,reset:i,root:o,scoped:a}=Xa(e);return Ir(r,{reset:i,root:o,scoped:a,disabled:s}),()=>{var l;return(l=n.default)==null?void 0:l.call(n)}}}),FF={collapse:"mdi-chevron-up",complete:"mdi-check",cancel:"mdi-close-circle",close:"mdi-close",delete:"mdi-close-circle",clear:"mdi-close-circle",success:"mdi-check-circle",info:"mdi-information",warning:"mdi-alert-circle",error:"mdi-close-circle",prev:"mdi-chevron-left",next:"mdi-chevron-right",checkboxOn:"mdi-checkbox-marked",checkboxOff:"mdi-checkbox-blank-outline",checkboxIndeterminate:"mdi-minus-box",delimiter:"mdi-circle",sortAsc:"mdi-arrow-up",sortDesc:"mdi-arrow-down",expand:"mdi-chevron-down",menu:"mdi-menu",subgroup:"mdi-menu-down",dropdown:"mdi-menu-down",radioOn:"mdi-radiobox-marked",radioOff:"mdi-radiobox-blank",edit:"mdi-pencil",ratingEmpty:"mdi-star-outline",ratingFull:"mdi-star",ratingHalf:"mdi-star-half-full",loading:"mdi-cached",first:"mdi-page-first",last:"mdi-page-last",unfold:"mdi-unfold-more-horizontal",file:"mdi-paperclip",plus:"mdi-plus",minus:"mdi-minus",calendar:"mdi-calendar",treeviewCollapse:"mdi-menu-down",treeviewExpand:"mdi-menu-right",eyeDropper:"mdi-eyedropper",upload:"mdi-cloud-upload"},NF={component:e=>pr(tP,{...e,class:"mdi"})},He=[String,Function,Object,Array],Uv=Symbol.for("vuetify:icons"),Gp=de({icon:{type:He},tag:{type:[String,Object,Function],required:!0}},"icon"),aw=ke()({name:"VComponentIcon",props:Gp(),setup(e,t){let{slots:n}=t;return()=>{const r=e.icon;return h(e.tag,null,{default:()=>{var s;return[e.icon?h(r,null,null):(s=n.default)==null?void 0:s.call(n)]}})}}}),eP=Su({name:"VSvgIcon",inheritAttrs:!1,props:Gp(),setup(e,t){let{attrs:n}=t;return()=>h(e.tag,ge(n,{style:null}),{default:()=>[h("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(e.icon)?e.icon.map(r=>Array.isArray(r)?h("path",{d:r[0],"fill-opacity":r[1]},null):h("path",{d:r},null)):h("path",{d:e.icon},null)])]})}}),VF=Su({name:"VLigatureIcon",props:Gp(),setup(e){return()=>h(e.tag,null,{default:()=>[e.icon]})}}),tP=Su({name:"VClassIcon",props:Gp(),setup(e){return()=>h(e.tag,{class:e.icon},null)}});function BF(){return{svg:{component:eP},class:{component:tP}}}function UF(e){const t=BF(),n=(e==null?void 0:e.defaultSet)??"mdi";return n==="mdi"&&!t.mdi&&(t.mdi=NF),er({defaultSet:n,sets:t,aliases:{...FF,vuetify:["M8.2241 14.2009L12 21L22 3H14.4459L8.2241 14.2009Z",["M7.26303 12.4733L7.00113 12L2 3H12.5261C12.5261 3 12.5261 3 12.5261 3L7.26303 12.4733Z",.6]],"vuetify-outline":"svg:M7.26 12.47 12.53 3H2L7.26 12.47ZM14.45 3 8.22 14.2 12 21 22 3H14.45ZM18.6 5 12 16.88 10.51 14.2 15.62 5ZM7.26 8.35 5.4 5H9.13L7.26 8.35Z","vuetify-play":["m6.376 13.184-4.11-7.192C1.505 4.66 2.467 3 4.003 3h8.532l-.953 1.576-.006.01-.396.677c-.429.732-.214 1.507.194 2.015.404.503 1.092.878 1.869.806a3.72 3.72 0 0 1 1.005.022c.276.053.434.143.523.237.138.146.38.635-.25 2.09-.893 1.63-1.553 1.722-1.847 1.677-.213-.033-.468-.158-.756-.406a4.95 4.95 0 0 1-.8-.927c-.39-.564-1.04-.84-1.66-.846-.625-.006-1.316.27-1.693.921l-.478.826-.911 1.506Z",["M9.093 11.552c.046-.079.144-.15.32-.148a.53.53 0 0 1 .43.207c.285.414.636.847 1.046 1.2.405.35.914.662 1.516.754 1.334.205 2.502-.698 3.48-2.495l.014-.028.013-.03c.687-1.574.774-2.852-.005-3.675-.37-.391-.861-.586-1.333-.676a5.243 5.243 0 0 0-1.447-.044c-.173.016-.393-.073-.54-.257-.145-.18-.127-.316-.082-.392l.393-.672L14.287 3h5.71c1.536 0 2.499 1.659 1.737 2.992l-7.997 13.996c-.768 1.344-2.706 1.344-3.473 0l-3.037-5.314 1.377-2.278.004-.006.004-.007.481-.831Z",.6]]}},e)}const zF=e=>{const t=Qe(Uv);if(!t)throw new Error("Missing Vuetify Icons provide!");return{iconData:A(()=>{var l;const r=Bn(e);if(!r)return{component:aw};let s=r;if(typeof s=="string"&&(s=s.trim(),s.startsWith("$")&&(s=(l=t.aliases)==null?void 0:l[s.slice(1)])),Array.isArray(s))return{component:eP,icon:s};if(typeof s!="string")return{component:aw,icon:s};const i=Object.keys(t.sets).find(u=>typeof s=="string"&&s.startsWith(`${u}:`)),o=i?s.slice(i.length+1):s;return{component:t.sets[i??t.defaultSet].component,icon:o}})}},HF=["x-small","small","default","large","x-large"],Eu=de({size:{type:[String,Number],default:"default"}},"size");function Pd(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:di();return Xb(()=>{const n=e.size;let r,s;return Lh(HF,n)?r=`${t}--size-${n}`:n&&(s={width:Ne(n),height:Ne(n)}),{sizeClasses:r,sizeStyles:s}})}const jF=de({color:String,disabled:Boolean,start:Boolean,end:Boolean,icon:He,opacity:[String,Number],...Ue(),...Eu(),..._t({tag:"i"}),...Lt()},"VIcon"),J=ke()({name:"VIcon",props:jF(),setup(e,t){let{attrs:n,slots:r}=t;const s=Ie(),{themeClasses:i}=YT(),{iconData:o}=zF(()=>s.value||e.icon),{sizeClasses:a}=Pd(e),{textColorClasses:l,textColorStyles:u}=As(()=>e.color);return Oe(()=>{var f,p;const c=(f=r.default)==null?void 0:f.call(r);c&&(s.value=(p=DT(c).filter(g=>g.type===Sd&&g.children&&typeof g.children=="string")[0])==null?void 0:p.children);const d=!!(n.onClick||n.onClickOnce);return h(o.value.component,{tag:e.tag,icon:o.value.icon,class:["v-icon","notranslate",i.value,a.value,l.value,{"v-icon--clickable":d,"v-icon--disabled":e.disabled,"v-icon--start":e.start,"v-icon--end":e.end},e.class],style:[{"--v-icon-opacity":e.opacity},a.value?void 0:{fontSize:Ne(e.size),height:Ne(e.size),width:Ne(e.size)},u.value,e.style],role:d?"button":void 0,"aria-hidden":!d,tabindex:d?e.disabled?-1:0:void 0},{default:()=>[c]})}),{}}});function nP(e,t){const n=j(),r=Ie(!1);if(Gb){const s=new IntersectionObserver(i=>{r.value=!!i.find(o=>o.isIntersecting)},t);Cn(()=>{s.disconnect()}),Ee(n,(i,o)=>{o&&(s.unobserve(o),r.value=!1),i&&s.observe(i)},{flush:"post"})}return{intersectionRef:n,isIntersecting:r}}function Va(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"content";const n=Fv(),r=j();if(Et){const s=new ResizeObserver(i=>{e==null||e(i,s),i.length&&(t==="content"?r.value=i[0].contentRect:r.value=i[0].target.getBoundingClientRect())});Cn(()=>{s.disconnect()}),Ee(()=>n.el,(i,o)=>{o&&(s.unobserve(o),r.value=void 0),i&&s.observe(i)},{flush:"post"})}return{resizeRef:n,contentRect:Ho(r)}}const qF=de({bgColor:String,color:String,indeterminate:[Boolean,String],modelValue:{type:[Number,String],default:0},rotate:{type:[Number,String],default:0},width:{type:[Number,String],default:4},...Ue(),...Eu(),..._t({tag:"div"}),...Lt()},"VProgressCircular"),ni=ke()({name:"VProgressCircular",props:qF(),setup(e,t){let{slots:n}=t;const r=20,s=2*Math.PI*r,i=j(),{themeClasses:o}=Zt(e),{sizeClasses:a,sizeStyles:l}=Pd(e),{textColorClasses:u,textColorStyles:c}=As(()=>e.color),{textColorClasses:d,textColorStyles:f}=As(()=>e.bgColor),{intersectionRef:p,isIntersecting:g}=nP(),{resizeRef:m,contentRect:y}=Va(),_=ae(()=>Math.max(0,Math.min(100,parseFloat(e.modelValue)))),b=ae(()=>Number(e.width)),x=ae(()=>l.value?Number(e.size):y.value?y.value.width:Math.max(b.value,32)),C=ae(()=>r/(1-b.value/x.value)*2),S=ae(()=>b.value/x.value*C.value),T=ae(()=>Ne((100-_.value)/100*s));return On(()=>{p.value=i.value,m.value=i.value}),Oe(()=>h(e.tag,{ref:i,class:["v-progress-circular",{"v-progress-circular--indeterminate":!!e.indeterminate,"v-progress-circular--visible":g.value,"v-progress-circular--disable-shrink":e.indeterminate==="disable-shrink"},o.value,a.value,u.value,e.class],style:[l.value,c.value,e.style],role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e.indeterminate?void 0:_.value},{default:()=>[h("svg",{style:{transform:`rotate(calc(-90deg + ${Number(e.rotate)}deg))`},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${C.value} ${C.value}`},[h("circle",{class:["v-progress-circular__underlay",d.value],style:f.value,fill:"transparent",cx:"50%",cy:"50%",r,"stroke-width":S.value,"stroke-dasharray":s,"stroke-dashoffset":0},null),h("circle",{class:"v-progress-circular__overlay",fill:"transparent",cx:"50%",cy:"50%",r,"stroke-width":S.value,"stroke-dasharray":s,"stroke-dashoffset":T.value},null)]),n.default&&h("div",{class:"v-progress-circular__content"},[n.default({value:_.value})])]})),{}}}),Or=de({height:[Number,String],maxHeight:[Number,String],maxWidth:[Number,String],minHeight:[Number,String],minWidth:[Number,String],width:[Number,String]},"dimension");function Mr(e){return{dimensionStyles:A(()=>{const n={},r=Ne(e.height),s=Ne(e.maxHeight),i=Ne(e.maxWidth),o=Ne(e.minHeight),a=Ne(e.minWidth),l=Ne(e.width);return r!=null&&(n.height=r),s!=null&&(n.maxHeight=s),i!=null&&(n.maxWidth=i),o!=null&&(n.minHeight=o),a!=null&&(n.minWidth=a),l!=null&&(n.width=l),n})}}const WF={badge:"Badge",open:"Open",close:"Close",dismiss:"Dismiss",confirmEdit:{ok:"OK",cancel:"Cancel"},dataIterator:{noResultsText:"No matching records found",loadingText:"Loading items..."},dataTable:{itemsPerPageText:"Rows per page:",ariaLabel:{sortDescending:"Sorted descending.",sortAscending:"Sorted ascending.",sortNone:"Not sorted.",activateNone:"Activate to remove sorting.",activateDescending:"Activate to sort descending.",activateAscending:"Activate to sort ascending."},sortBy:"Sort by"},dataFooter:{itemsPerPageText:"Items per page:",itemsPerPageAll:"All",nextPage:"Next page",prevPage:"Previous page",firstPage:"First page",lastPage:"Last page",pageText:"{0}-{1} of {2}"},dateRangeInput:{divider:"to"},datePicker:{itemsSelected:"{0} selected",range:{title:"Select dates",header:"Enter dates"},title:"Select date",header:"Enter date",input:{placeholder:"Enter date"}},noDataText:"No data available",carousel:{prev:"Previous visual",next:"Next visual",ariaLabel:{delimiter:"Carousel slide {0} of {1}"}},calendar:{moreEvents:"{0} more",today:"Today"},input:{clear:"Clear {0}",prependAction:"{0} prepended action",appendAction:"{0} appended action",otp:"Please enter OTP character {0}"},fileInput:{counter:"{0} files",counterSize:"{0} files ({1} in total)"},fileUpload:{title:"Drag and drop files here",divider:"or",browse:"Browse Files"},timePicker:{am:"AM",pm:"PM",title:"Select Time"},pagination:{ariaLabel:{root:"Pagination Navigation",next:"Next page",previous:"Previous page",page:"Go to page {0}",currentPage:"Page {0}, Current page",first:"First page",last:"Last page"}},stepper:{next:"Next",prev:"Previous"},rating:{ariaLabel:{item:"Rating {0} of {1}"}},loading:"Loading...",infiniteScroll:{loadMore:"Load more",empty:"No more"},rules:{required:"This field is required",email:"Please enter a valid email",number:"This field can only contain numbers",integer:"This field can only contain integer values",capital:"This field can only contain uppercase letters",maxLength:"You must enter a maximum of {0} characters",minLength:"You must enter a minimum of {0} characters",strictLength:"The length of the entered field is invalid",exclude:"The {0} character is not allowed",notEmpty:"Please choose at least one value",pattern:"Invalid format"}},lw="$vuetify.",uw=(e,t)=>e.replace(/\{(\d+)\}/g,(n,r)=>String(t[Number(r)])),rP=(e,t,n)=>function(r){for(var s=arguments.length,i=new Array(s>1?s-1:0),o=1;o<s;o++)i[o-1]=arguments[o];if(!r.startsWith(lw))return uw(r,i);const a=r.replace(lw,""),l=e.value&&n.value[e.value],u=t.value&&n.value[t.value];let c=Na(l,a,null);return c||(`${r}${e.value}`,c=Na(u,a,null)),c||(c=r),typeof c!="string"&&(c=r),uw(c,i)};function sP(e,t){return(n,r)=>new Intl.NumberFormat([e.value,t.value],r).format(n)}function fg(e,t,n){const r=it(e,t,e[t]??n.value);return r.value=e[t]??n.value,Ee(n,s=>{e[t]==null&&(r.value=n.value)}),r}function iP(e){return t=>{const n=fg(t,"locale",e.current),r=fg(t,"fallback",e.fallback),s=fg(t,"messages",e.messages);return{name:"vuetify",current:n,fallback:r,messages:s,t:rP(n,r,s),n:sP(n,r),provide:iP({current:n,fallback:r,messages:s})}}}function GF(e){const t=Ie((e==null?void 0:e.locale)??"en"),n=Ie((e==null?void 0:e.fallback)??"en"),r=j({en:WF,...e==null?void 0:e.messages});return{name:"vuetify",current:t,fallback:n,messages:r,t:rP(t,n,r),n:sP(t,n),provide:iP({current:t,fallback:n,messages:r})}}const Bh=Symbol.for("vuetify:locale");function KF(e){return e.name!=null}function YF(e){const t=e!=null&&e.adapter&&KF(e==null?void 0:e.adapter)?e==null?void 0:e.adapter:GF(e),n=QF(t,e);return{...t,...n}}function Gr(){const e=Qe(Bh);if(!e)throw new Error("[Vuetify] Could not find injected locale instance");return e}function XF(){return{af:!1,ar:!0,bg:!1,ca:!1,ckb:!1,cs:!1,de:!1,el:!1,en:!1,es:!1,et:!1,fa:!0,fi:!1,fr:!1,hr:!1,hu:!1,he:!0,id:!1,it:!1,ja:!1,km:!1,ko:!1,lv:!1,lt:!1,nl:!1,no:!1,pl:!1,pt:!1,ro:!1,ru:!1,sk:!1,sl:!1,srCyrl:!1,srLatn:!1,sv:!1,th:!1,tr:!1,az:!1,uk:!1,vi:!1,zhHans:!1,zhHant:!1}}function QF(e,t){const n=j((t==null?void 0:t.rtl)??XF()),r=A(()=>n.value[e.current.value]??!1);return{isRtl:r,rtl:n,rtlClasses:ae(()=>`v-locale--is-${r.value?"rtl":"ltr"}`)}}function Dr(){const e=Qe(Bh);if(!e)throw new Error("[Vuetify] Could not find injected rtl instance");return{isRtl:e.isRtl,rtlClasses:e.rtlClasses}}const cw={center:"center",top:"bottom",bottom:"top",left:"right",right:"left"},qo=de({location:String},"location");function Za(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2?arguments[2]:void 0;const{isRtl:r}=Dr();return{locationStyles:A(()=>{if(!e.location)return{};const{side:i,align:o}=Nv(e.location.split(" ").length>1?e.location:`${e.location} center`,r.value);function a(u){return n?n(u):0}const l={};return i!=="center"&&(t?l[cw[i]]=`calc(100% - ${a(i)}px)`:l[i]=0),o!=="center"?t?l[cw[o]]=`calc(100% - ${a(o)}px)`:l[o]=0:(i==="center"?l.top=l.left="50%":l[{top:"left",bottom:"left",left:"top",right:"top"}[i]]="50%",l.transform={top:"translateX(-50%)",bottom:"translateX(-50%)",left:"translateY(-50%)",right:"translateY(-50%)",center:"translate(-50%, -50%)"}[i]),l})}}const JF=de({absolute:Boolean,active:{type:Boolean,default:!0},bgColor:String,bgOpacity:[Number,String],bufferValue:{type:[Number,String],default:0},bufferColor:String,bufferOpacity:[Number,String],clickable:Boolean,color:String,height:{type:[Number,String],default:4},indeterminate:Boolean,max:{type:[Number,String],default:100},modelValue:{type:[Number,String],default:0},opacity:[Number,String],reverse:Boolean,stream:Boolean,striped:Boolean,roundedBar:Boolean,...Ue(),...qo({location:"top"}),...Dn(),..._t(),...Lt()},"VProgressLinear"),su=ke()({name:"VProgressLinear",props:JF(),emits:{"update:modelValue":e=>!0},setup(e,t){var O;let{slots:n}=t;const r=it(e,"modelValue"),{isRtl:s,rtlClasses:i}=Dr(),{themeClasses:o}=Zt(e),{locationStyles:a}=Za(e),{textColorClasses:l,textColorStyles:u}=As(()=>e.color),{backgroundColorClasses:c,backgroundColorStyles:d}=fr(()=>e.bgColor||e.color),{backgroundColorClasses:f,backgroundColorStyles:p}=fr(()=>e.bufferColor||e.bgColor||e.color),{backgroundColorClasses:g,backgroundColorStyles:m}=fr(()=>e.color),{roundedClasses:y}=jn(e),{intersectionRef:_,isIntersecting:b}=nP(),x=A(()=>parseFloat(e.max)),C=A(()=>parseFloat(e.height)),S=A(()=>Cr(parseFloat(e.bufferValue)/x.value*100,0,100)),T=A(()=>Cr(parseFloat(r.value)/x.value*100,0,100)),P=A(()=>s.value!==e.reverse),w=A(()=>e.indeterminate?"fade-transition":"slide-x-transition"),E=Et&&((O=window.matchMedia)==null?void 0:O.call(window,"(forced-colors: active)").matches);function I(R){if(!_.value)return;const{left:M,right:D,width:F}=_.value.getBoundingClientRect(),U=P.value?F-R.clientX+(D-F):R.clientX-M;r.value=Math.round(U/F*x.value)}return Oe(()=>h(e.tag,{ref:_,class:["v-progress-linear",{"v-progress-linear--absolute":e.absolute,"v-progress-linear--active":e.active&&b.value,"v-progress-linear--reverse":P.value,"v-progress-linear--rounded":e.rounded,"v-progress-linear--rounded-bar":e.roundedBar,"v-progress-linear--striped":e.striped},y.value,o.value,i.value,e.class],style:[{bottom:e.location==="bottom"?0:void 0,top:e.location==="top"?0:void 0,height:e.active?Ne(C.value):0,"--v-progress-linear-height":Ne(C.value),...e.absolute?a.value:{}},e.style],role:"progressbar","aria-hidden":e.active?"false":"true","aria-valuemin":"0","aria-valuemax":e.max,"aria-valuenow":e.indeterminate?void 0:Math.min(parseFloat(r.value),x.value),onClick:e.clickable&&I},{default:()=>[e.stream&&h("div",{key:"stream",class:["v-progress-linear__stream",l.value],style:{...u.value,[P.value?"left":"right"]:Ne(-C.value),borderTop:`${Ne(C.value/2)} dotted`,opacity:parseFloat(e.bufferOpacity),top:`calc(50% - ${Ne(C.value/4)})`,width:Ne(100-S.value,"%"),"--v-progress-linear-stream-to":Ne(C.value*(P.value?1:-1))}},null),h("div",{class:["v-progress-linear__background",E?void 0:c.value],style:[d.value,{opacity:parseFloat(e.bgOpacity),width:e.stream?0:void 0}]},null),h("div",{class:["v-progress-linear__buffer",E?void 0:f.value],style:[p.value,{opacity:parseFloat(e.bufferOpacity),width:Ne(S.value,"%")}]},null),h(Lo,{name:w.value},{default:()=>[e.indeterminate?h("div",{class:"v-progress-linear__indeterminate"},[["long","short"].map(R=>h("div",{key:R,class:["v-progress-linear__indeterminate",R,E?void 0:g.value],style:m.value},null))]):h("div",{class:["v-progress-linear__determinate",E?void 0:g.value],style:[m.value,{width:Ne(T.value,"%")}]},null)]}),n.default&&h("div",{class:"v-progress-linear__content"},[n.default({value:T.value,buffer:S.value})])]})),{}}}),Kp=de({loading:[Boolean,String]},"loader");function Rd(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:di();return{loaderClasses:ae(()=>({[`${t}--loading`]:e.loading}))}}function Yp(e,t){var r;let{slots:n}=t;return h("div",{class:`${e.name}__loader`},[((r=n.default)==null?void 0:r.call(n,{color:e.color,isActive:e.active}))||h(su,{absolute:e.absolute,active:e.active,color:e.color,height:"2",indeterminate:!0},null)])}const ZF=["static","relative","fixed","absolute","sticky"],Cu=de({position:{type:String,validator:e=>ZF.includes(e)}},"position");function Tu(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:di();return{positionClasses:ae(()=>e.position?`${t}--${e.position}`:void 0)}}function eN(){const e=an("useRoute");return A(()=>{var t;return(t=e==null?void 0:e.proxy)==null?void 0:t.$route})}function oP(){var e,t;return(t=(e=an("useRouter"))==null?void 0:e.proxy)==null?void 0:t.$router}function Xp(e,t){var c,d;const n=tL("RouterLink"),r=ae(()=>!!(e.href||e.to)),s=A(()=>(r==null?void 0:r.value)||z1(t,"click")||z1(e,"click"));if(typeof n=="string"||!("useLink"in n)){const f=ae(()=>e.href);return{isLink:r,isClickable:s,href:f,linkProps:cn({href:f})}}const i=n.useLink({to:ae(()=>e.to||""),replace:ae(()=>e.replace)}),o=A(()=>e.to?i:void 0),a=eN(),l=A(()=>{var f,p,g;return o.value?e.exact?a.value?((g=o.value.isExactActive)==null?void 0:g.value)&&as(o.value.route.value.query,a.value.query):((p=o.value.isExactActive)==null?void 0:p.value)??!1:((f=o.value.isActive)==null?void 0:f.value)??!1:!1}),u=A(()=>{var f;return e.to?(f=o.value)==null?void 0:f.route.value.href:e.href});return{isLink:r,isClickable:s,isActive:l,route:(c=o.value)==null?void 0:c.route,navigate:(d=o.value)==null?void 0:d.navigate,href:u,linkProps:cn({href:u,"aria-current":ae(()=>l.value?"page":void 0)})}}const Qp=de({href:String,replace:Boolean,to:[String,Object],exact:Boolean},"router");let hg=!1;function tN(e,t){let n=!1,r,s;Et&&(e!=null&&e.beforeEach)&&(Mt(()=>{window.addEventListener("popstate",i),r=e.beforeEach((o,a,l)=>{hg?n?t(l):l():setTimeout(()=>n?t(l):l()),hg=!0}),s=e==null?void 0:e.afterEach(()=>{hg=!1})}),yn(()=>{window.removeEventListener("popstate",i),r==null||r(),s==null||s()}));function i(o){var a;(a=o.state)!=null&&a.replaced||(n=!0,setTimeout(()=>n=!1))}}function nN(e,t){Ee(()=>{var n;return(n=e.isActive)==null?void 0:n.value},n=>{e.isLink.value&&n&&t&&Mt(()=>{t(!0)})},{immediate:!0})}const zv=Symbol("rippleStop"),rN=80;function dw(e,t){e.style.transform=t,e.style.webkitTransform=t}function Hv(e){return e.constructor.name==="TouchEvent"}function aP(e){return e.constructor.name==="KeyboardEvent"}const sN=function(e,t){var d;let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=0,s=0;if(!aP(e)){const f=t.getBoundingClientRect(),p=Hv(e)?e.touches[e.touches.length-1]:e;r=p.clientX-f.left,s=p.clientY-f.top}let i=0,o=.3;(d=t._ripple)!=null&&d.circle?(o=.15,i=t.clientWidth/2,i=n.center?i:i+Math.sqrt((r-i)**2+(s-i)**2)/4):i=Math.sqrt(t.clientWidth**2+t.clientHeight**2)/2;const a=`${(t.clientWidth-i*2)/2}px`,l=`${(t.clientHeight-i*2)/2}px`,u=n.center?a:`${r-i}px`,c=n.center?l:`${s-i}px`;return{radius:i,scale:o,x:u,y:c,centerX:a,centerY:l}},Uh={show(e,t){var p;let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!((p=t==null?void 0:t._ripple)!=null&&p.enabled))return;const r=document.createElement("span"),s=document.createElement("span");r.appendChild(s),r.className="v-ripple__container",n.class&&(r.className+=` ${n.class}`);const{radius:i,scale:o,x:a,y:l,centerX:u,centerY:c}=sN(e,t,n),d=`${i*2}px`;s.className="v-ripple__animation",s.style.width=d,s.style.height=d,t.appendChild(r);const f=window.getComputedStyle(t);f&&f.position==="static"&&(t.style.position="relative",t.dataset.previousPosition="static"),s.classList.add("v-ripple__animation--enter"),s.classList.add("v-ripple__animation--visible"),dw(s,`translate(${a}, ${l}) scale3d(${o},${o},${o})`),s.dataset.activated=String(performance.now()),requestAnimationFrame(()=>{requestAnimationFrame(()=>{s.classList.remove("v-ripple__animation--enter"),s.classList.add("v-ripple__animation--in"),dw(s,`translate(${u}, ${c}) scale3d(1,1,1)`)})})},hide(e){var i;if(!((i=e==null?void 0:e._ripple)!=null&&i.enabled))return;const t=e.getElementsByClassName("v-ripple__animation");if(t.length===0)return;const n=t[t.length-1];if(n.dataset.isHiding)return;n.dataset.isHiding="true";const r=performance.now()-Number(n.dataset.activated),s=Math.max(250-r,0);setTimeout(()=>{n.classList.remove("v-ripple__animation--in"),n.classList.add("v-ripple__animation--out"),setTimeout(()=>{var a;e.getElementsByClassName("v-ripple__animation").length===1&&e.dataset.previousPosition&&(e.style.position=e.dataset.previousPosition,delete e.dataset.previousPosition),((a=n.parentNode)==null?void 0:a.parentNode)===e&&e.removeChild(n.parentNode)},300)},s)}};function lP(e){return typeof e>"u"||!!e}function Kc(e){const t={},n=e.currentTarget;if(!(!(n!=null&&n._ripple)||n._ripple.touched||e[zv])){if(e[zv]=!0,Hv(e))n._ripple.touched=!0,n._ripple.isTouch=!0;else if(n._ripple.isTouch)return;if(t.center=n._ripple.centered||aP(e),n._ripple.class&&(t.class=n._ripple.class),Hv(e)){if(n._ripple.showTimerCommit)return;n._ripple.showTimerCommit=()=>{Uh.show(e,n,t)},n._ripple.showTimer=window.setTimeout(()=>{var r;(r=n==null?void 0:n._ripple)!=null&&r.showTimerCommit&&(n._ripple.showTimerCommit(),n._ripple.showTimerCommit=null)},rN)}else Uh.show(e,n,t)}}function fw(e){e[zv]=!0}function Br(e){const t=e.currentTarget;if(t!=null&&t._ripple){if(window.clearTimeout(t._ripple.showTimer),e.type==="touchend"&&t._ripple.showTimerCommit){t._ripple.showTimerCommit(),t._ripple.showTimerCommit=null,t._ripple.showTimer=window.setTimeout(()=>{Br(e)});return}window.setTimeout(()=>{t._ripple&&(t._ripple.touched=!1)}),Uh.hide(t)}}function uP(e){const t=e.currentTarget;t!=null&&t._ripple&&(t._ripple.showTimerCommit&&(t._ripple.showTimerCommit=null),window.clearTimeout(t._ripple.showTimer))}let Yc=!1;function cP(e){!Yc&&(e.keyCode===F1.enter||e.keyCode===F1.space)&&(Yc=!0,Kc(e))}function dP(e){Yc=!1,Br(e)}function fP(e){Yc&&(Yc=!1,Br(e))}function hP(e,t,n){const{value:r,modifiers:s}=t,i=lP(r);if(i||Uh.hide(e),e._ripple=e._ripple??{},e._ripple.enabled=i,e._ripple.centered=s.center,e._ripple.circle=s.circle,Dh(r)&&r.class&&(e._ripple.class=r.class),i&&!n){if(s.stop){e.addEventListener("touchstart",fw,{passive:!0}),e.addEventListener("mousedown",fw);return}e.addEventListener("touchstart",Kc,{passive:!0}),e.addEventListener("touchend",Br,{passive:!0}),e.addEventListener("touchmove",uP,{passive:!0}),e.addEventListener("touchcancel",Br),e.addEventListener("mousedown",Kc),e.addEventListener("mouseup",Br),e.addEventListener("mouseleave",Br),e.addEventListener("keydown",cP),e.addEventListener("keyup",dP),e.addEventListener("blur",fP),e.addEventListener("dragstart",Br,{passive:!0})}else!i&&n&&pP(e)}function pP(e){e.removeEventListener("mousedown",Kc),e.removeEventListener("touchstart",Kc),e.removeEventListener("touchend",Br),e.removeEventListener("touchmove",uP),e.removeEventListener("touchcancel",Br),e.removeEventListener("mouseup",Br),e.removeEventListener("mouseleave",Br),e.removeEventListener("keydown",cP),e.removeEventListener("keyup",dP),e.removeEventListener("dragstart",Br),e.removeEventListener("blur",fP)}function iN(e,t){hP(e,t,!1)}function oN(e){delete e._ripple,pP(e)}function aN(e,t){if(t.value===t.oldValue)return;const n=lP(t.oldValue);hP(e,t,n)}const Pu={mounted:iN,unmounted:oN,updated:aN},mP=de({active:{type:Boolean,default:void 0},activeColor:String,baseColor:String,symbol:{type:null,default:JT},flat:Boolean,icon:[Boolean,String,Function,Object],prependIcon:He,appendIcon:He,block:Boolean,readonly:Boolean,slim:Boolean,stacked:Boolean,ripple:{type:[Boolean,Object],default:!0},text:{type:[String,Number,Boolean],default:void 0},...vs(),...Ue(),...Ar(),...Or(),...bs(),...Cd(),...Kp(),...qo(),...Cu(),...Dn(),...Qp(),...Eu(),..._t({tag:"button"}),...Lt(),...$s({variant:"elevated"})},"VBtn"),re=ke()({name:"VBtn",props:mP(),emits:{"group:selected":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const{themeClasses:s}=Zt(e),{borderClasses:i}=Ds(e),{densityClasses:o}=ys(e),{dimensionStyles:a}=Mr(e),{elevationClasses:l}=Ls(e),{loaderClasses:u}=Rd(e),{locationStyles:c}=Za(e),{positionClasses:d}=Tu(e),{roundedClasses:f}=jn(e),{sizeClasses:p,sizeStyles:g}=Pd(e),m=Td(e,e.symbol,!1),y=Xp(e,n),_=A(()=>{var O;return e.active!==void 0?e.active:y.isLink.value?(O=y.isActive)==null?void 0:O.value:m==null?void 0:m.isSelected.value}),b=ae(()=>_.value?e.activeColor??e.color:e.color),x=A(()=>{var R,M;return{color:(m==null?void 0:m.isSelected.value)&&(!y.isLink.value||((R=y.isActive)==null?void 0:R.value))||!m||((M=y.isActive)==null?void 0:M.value)?b.value??e.baseColor:e.baseColor,variant:e.variant}}),{colorClasses:C,colorStyles:S,variantClasses:T}=Ja(x),P=A(()=>(m==null?void 0:m.disabled.value)||e.disabled),w=ae(()=>e.variant==="elevated"&&!(e.disabled||e.flat||e.border)),E=A(()=>{if(!(e.value===void 0||typeof e.value=="symbol"))return Object(e.value)===e.value?JSON.stringify(e.value,null,0):e.value});function I(O){var R;P.value||y.isLink.value&&(O.metaKey||O.ctrlKey||O.shiftKey||O.button!==0||n.target==="_blank")||((R=y.navigate)==null||R.call(y,O),m==null||m.toggle())}return nN(y,m==null?void 0:m.select),Oe(()=>{const O=y.isLink.value?"a":e.tag,R=!!(e.prependIcon||r.prepend),M=!!(e.appendIcon||r.append),D=!!(e.icon&&e.icon!==!0);return Nt(h(O,ge({type:O==="a"?void 0:"button",class:["v-btn",m==null?void 0:m.selectedClass.value,{"v-btn--active":_.value,"v-btn--block":e.block,"v-btn--disabled":P.value,"v-btn--elevated":w.value,"v-btn--flat":e.flat,"v-btn--icon":!!e.icon,"v-btn--loading":e.loading,"v-btn--readonly":e.readonly,"v-btn--slim":e.slim,"v-btn--stacked":e.stacked},s.value,i.value,C.value,o.value,l.value,u.value,d.value,f.value,p.value,T.value,e.class],style:[S.value,a.value,c.value,g.value,e.style],"aria-busy":e.loading?!0:void 0,disabled:P.value||void 0,tabindex:e.loading||e.readonly?-1:void 0,onClick:I,value:E.value},y.linkProps),{default:()=>{var F;return[jo(!0,"v-btn"),!e.icon&&R&&h("span",{key:"prepend",class:"v-btn__prepend"},[r.prepend?h(Ot,{key:"prepend-defaults",disabled:!e.prependIcon,defaults:{VIcon:{icon:e.prependIcon}}},r.prepend):h(J,{key:"prepend-icon",icon:e.prependIcon},null)]),h("span",{class:"v-btn__content","data-no-activator":""},[!r.default&&D?h(J,{key:"content-icon",icon:e.icon},null):h(Ot,{key:"content-defaults",disabled:!D,defaults:{VIcon:{icon:e.icon}}},{default:()=>{var U;return[((U=r.default)==null?void 0:U.call(r))??se(e.text)]}})]),!e.icon&&M&&h("span",{key:"append",class:"v-btn__append"},[r.append?h(Ot,{key:"append-defaults",disabled:!e.appendIcon,defaults:{VIcon:{icon:e.appendIcon}}},r.append):h(J,{key:"append-icon",icon:e.appendIcon},null)]),!!e.loading&&h("span",{key:"loader",class:"v-btn__loader"},[((F=r.loader)==null?void 0:F.call(r))??h(ni,{color:typeof e.loading=="boolean"?void 0:e.loading,indeterminate:!0,width:"2"},null)])]}}),[[Pu,!P.value&&e.ripple,"",{center:!!e.icon}]])}),{group:m}}}),lN=de({disabled:Boolean,group:Boolean,hideOnLeave:Boolean,leaveAbsolute:Boolean,mode:String,origin:String},"transition");function Kr(e,t,n){return ke()({name:e,props:lN({mode:n,origin:t}),setup(r,s){let{slots:i}=s;const o={onBeforeEnter(a){r.origin&&(a.style.transformOrigin=r.origin)},onLeave(a){if(r.leaveAbsolute){const{offsetTop:l,offsetLeft:u,offsetWidth:c,offsetHeight:d}=a;a._transitionInitialStyles={position:a.style.position,top:a.style.top,left:a.style.left,width:a.style.width,height:a.style.height},a.style.position="absolute",a.style.top=`${l}px`,a.style.left=`${u}px`,a.style.width=`${c}px`,a.style.height=`${d}px`}r.hideOnLeave&&a.style.setProperty("display","none","important")},onAfterLeave(a){if(r.leaveAbsolute&&(a!=null&&a._transitionInitialStyles)){const{position:l,top:u,left:c,width:d,height:f}=a._transitionInitialStyles;delete a._transitionInitialStyles,a.style.position=l||"",a.style.top=u||"",a.style.left=c||"",a.style.width=d||"",a.style.height=f||""}}};return()=>{const a=r.group?Wb:Lo;return pr(a,{name:r.disabled?"":e,css:!r.disabled,...r.group?void 0:{mode:r.mode},...r.disabled?{}:o},i.default)}}})}function gP(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"in-out";return ke()({name:e,props:{mode:{type:String,default:n},disabled:Boolean,group:Boolean},setup(r,s){let{slots:i}=s;const o=r.group?Wb:Lo;return()=>pr(o,{name:r.disabled?"":e,css:!r.disabled,...r.disabled?{}:t},i.default)}})}function vP(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";const n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1)?"width":"height",r=Rr(`offset-${n}`);return{onBeforeEnter(o){o._parent=o.parentNode,o._initialStyle={transition:o.style.transition,overflow:o.style.overflow,[n]:o.style[n]}},onEnter(o){const a=o._initialStyle;if(!a)return;o.style.setProperty("transition","none","important"),o.style.overflow="hidden";const l=`${o[r]}px`;o.style[n]="0",o.offsetHeight,o.style.transition=a.transition,e&&o._parent&&o._parent.classList.add(e),requestAnimationFrame(()=>{o.style[n]=l})},onAfterEnter:i,onEnterCancelled:i,onLeave(o){o._initialStyle={transition:"",overflow:o.style.overflow,[n]:o.style[n]},o.style.overflow="hidden",o.style[n]=`${o[r]}px`,o.offsetHeight,requestAnimationFrame(()=>o.style[n]="0")},onAfterLeave:s,onLeaveCancelled:s};function s(o){e&&o._parent&&o._parent.classList.remove(e),i(o)}function i(o){if(!o._initialStyle)return;const a=o._initialStyle[n];o.style.overflow=o._initialStyle.overflow,a!=null&&(o.style[n]=a),delete o._initialStyle}}const uN=de({target:[Object,Array]},"v-dialog-transition"),pg=new WeakMap,n_=ke()({name:"VDialogTransition",props:uN(),setup(e,t){let{slots:n}=t;const r={onBeforeEnter(s){s.style.pointerEvents="none",s.style.visibility="hidden"},async onEnter(s,i){var p;await new Promise(g=>requestAnimationFrame(g)),await new Promise(g=>requestAnimationFrame(g)),s.style.visibility="";const o=pw(e.target,s),{x:a,y:l,sx:u,sy:c,speed:d}=o;pg.set(s,o);const f=Cl(s,[{transform:`translate(${a}px, ${l}px) scale(${u}, ${c})`,opacity:0},{}],{duration:225*d,easing:bF});(p=hw(s))==null||p.forEach(g=>{Cl(g,[{opacity:0},{opacity:0,offset:.33},{}],{duration:225*2*d,easing:Nh})}),f.finished.then(()=>i())},onAfterEnter(s){s.style.removeProperty("pointer-events")},onBeforeLeave(s){s.style.pointerEvents="none"},async onLeave(s,i){var p;await new Promise(g=>requestAnimationFrame(g));let o;!pg.has(s)||Array.isArray(e.target)||e.target.offsetParent||e.target.getClientRects().length?o=pw(e.target,s):o=pg.get(s);const{x:a,y:l,sx:u,sy:c,speed:d}=o;Cl(s,[{},{transform:`translate(${a}px, ${l}px) scale(${u}, ${c})`,opacity:0}],{duration:125*d,easing:_F}).finished.then(()=>i()),(p=hw(s))==null||p.forEach(g=>{Cl(g,[{},{opacity:0,offset:.2},{opacity:0}],{duration:125*2*d,easing:Nh})})},onAfterLeave(s){s.style.removeProperty("pointer-events")}};return()=>e.target?h(Lo,ge({name:"dialog-transition"},r,{css:!1}),n):h(Lo,{name:"dialog-transition"},n)}});function hw(e){var n;const t=(n=e.querySelector(":scope > .v-card, :scope > .v-sheet, :scope > .v-list"))==null?void 0:n.children;return t&&[...t]}function pw(e,t){const n=UT(e),r=Qb(t),[s,i]=getComputedStyle(t).transformOrigin.split(" ").map(_=>parseFloat(_)),[o,a]=getComputedStyle(t).getPropertyValue("--v-overlay-anchor-origin").split(" ");let l=n.left+n.width/2;o==="left"||a==="left"?l-=n.width/2:(o==="right"||a==="right")&&(l+=n.width/2);let u=n.top+n.height/2;o==="top"||a==="top"?u-=n.height/2:(o==="bottom"||a==="bottom")&&(u+=n.height/2);const c=n.width/r.width,d=n.height/r.height,f=Math.max(1,c,d),p=c/f||0,g=d/f||0,m=r.width*r.height/(window.innerWidth*window.innerHeight),y=m>.12?Math.min(1.5,(m-.12)*10+1):1;return{x:l-(s+r.left),y:u-(i+r.top),sx:p,sy:g,speed:y}}Kr("fab-transition","center center","out-in");Kr("dialog-bottom-transition");Kr("dialog-top-transition");const mw=Kr("fade-transition"),cN=Kr("scale-transition");Kr("scroll-x-transition");Kr("scroll-x-reverse-transition");const dN=Kr("scroll-y-transition");Kr("scroll-y-reverse-transition");Kr("slide-x-transition");Kr("slide-x-reverse-transition");const yP=Kr("slide-y-transition");Kr("slide-y-reverse-transition");const bP=gP("expand-transition",vP()),_P=gP("expand-x-transition",vP("",!0));function mg(e,t){return{x:e.x+t.x,y:e.y+t.y}}function fN(e,t){return{x:e.x-t.x,y:e.y-t.y}}function gw(e,t){if(e.side==="top"||e.side==="bottom"){const{side:n,align:r}=e,s=r==="left"?0:r==="center"?t.width/2:r==="right"?t.width:r,i=n==="top"?0:n==="bottom"?t.height:n;return mg({x:s,y:i},t)}else if(e.side==="left"||e.side==="right"){const{side:n,align:r}=e,s=n==="left"?0:n==="right"?t.width:n,i=r==="top"?0:r==="center"?t.height/2:r==="bottom"?t.height:r;return mg({x:s,y:i},t)}return mg({x:t.width/2,y:t.height/2},t)}const wP={static:mN,connected:vN},hN=de({locationStrategy:{type:[String,Function],default:"static",validator:e=>typeof e=="function"||e in wP},location:{type:String,default:"bottom"},origin:{type:String,default:"auto"},offset:[Number,String,Array]},"VOverlay-location-strategies");function pN(e,t){const n=j({}),r=j();Et&&Hr(()=>!!(t.isActive.value&&e.locationStrategy),i=>{var o,a;Ee(()=>e.locationStrategy,i),yn(()=>{window.removeEventListener("resize",s),r.value=void 0}),window.addEventListener("resize",s,{passive:!0}),typeof e.locationStrategy=="function"?r.value=(o=e.locationStrategy(t,e,n))==null?void 0:o.updateLocation:r.value=(a=wP[e.locationStrategy](t,e,n))==null?void 0:a.updateLocation});function s(i){var o;(o=r.value)==null||o.call(r,i)}return{contentStyles:n,updateLocation:r}}function mN(){}function gN(e,t){const n=Qb(e);return t?n.x+=parseFloat(e.style.right||0):n.x-=parseFloat(e.style.left||0),n.y-=parseFloat(e.style.top||0),n}function vN(e,t,n){(Array.isArray(e.target.value)||SF(e.target.value))&&Object.assign(n.value,{position:"fixed",top:0,[e.isRtl.value?"right":"left"]:0});const{preferredAnchor:s,preferredOrigin:i}=Xb(()=>{const _=Nv(t.location,e.isRtl.value),b=t.origin==="overlap"?_:t.origin==="auto"?cg(_):Nv(t.origin,e.isRtl.value);return _.side===b.side&&_.align===dg(b).align?{preferredAnchor:j1(_),preferredOrigin:j1(b)}:{preferredAnchor:_,preferredOrigin:b}}),[o,a,l,u]=["minWidth","minHeight","maxWidth","maxHeight"].map(_=>A(()=>{const b=parseFloat(t[_]);return isNaN(b)?1/0:b})),c=A(()=>{if(Array.isArray(t.offset))return t.offset;if(typeof t.offset=="string"){const _=t.offset.split(" ").map(parseFloat);return _.length<2&&_.push(0),_}return typeof t.offset=="number"?[t.offset,0]:[0,0]});let d=!1,f=-1;const p=new LT(4),g=new ResizeObserver(()=>{if(!d)return;if(requestAnimationFrame(b=>{b!==f&&p.clear(),requestAnimationFrame(x=>{f=x})}),p.isFull){const b=p.values();if(as(b.at(-1),b.at(-3)))return}const _=y();_&&p.push(_.flipped)});Ee([e.target,e.contentEl],(_,b)=>{let[x,C]=_,[S,T]=b;S&&!Array.isArray(S)&&g.unobserve(S),x&&!Array.isArray(x)&&g.observe(x),T&&g.unobserve(T),C&&g.observe(C)},{immediate:!0}),yn(()=>{g.disconnect()});let m=new ko({x:0,y:0,width:0,height:0});function y(){if(d=!1,requestAnimationFrame(()=>d=!0),!e.target.value||!e.contentEl.value)return;(Array.isArray(e.target.value)||e.target.value.offsetParent||e.target.value.getClientRects().length)&&(m=UT(e.target.value));const _=gN(e.contentEl.value,e.isRtl.value),b=Vh(e.contentEl.value),x=12;b.length||(b.push(document.documentElement),e.contentEl.value.style.top&&e.contentEl.value.style.left||(_.x-=parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-x")||0),_.y-=parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-y")||0)));const C=b.reduce((M,D)=>{const F=D.getBoundingClientRect(),U=new ko({x:D===document.documentElement?0:F.x,y:D===document.documentElement?0:F.y,width:D.clientWidth,height:D.clientHeight});return M?new ko({x:Math.max(M.left,U.left),y:Math.max(M.top,U.top),width:Math.min(M.right,U.right)-Math.max(M.left,U.left),height:Math.min(M.bottom,U.bottom)-Math.max(M.top,U.top)}):U},void 0);C.x+=x,C.y+=x,C.width-=x*2,C.height-=x*2;let S={anchor:s.value,origin:i.value};function T(M){const D=new ko(_),F=gw(M.anchor,m),U=gw(M.origin,D);let{x:K,y:Q}=fN(F,U);switch(M.anchor.side){case"top":Q-=c.value[0];break;case"bottom":Q+=c.value[0];break;case"left":K-=c.value[0];break;case"right":K+=c.value[0];break}switch(M.anchor.align){case"top":Q-=c.value[1];break;case"bottom":Q+=c.value[1];break;case"left":K-=c.value[1];break;case"right":K+=c.value[1];break}return D.x+=K,D.y+=Q,D.width=Math.min(D.width,l.value),D.height=Math.min(D.height,u.value),{overflows:W1(D,C),x:K,y:Q}}let P=0,w=0;const E={x:0,y:0},I={x:!1,y:!1};let O=-1;for(;!(O++>10);){const{x:M,y:D,overflows:F}=T(S);P+=M,w+=D,_.x+=M,_.y+=D;{const U=q1(S.anchor),K=F.x.before||F.x.after,Q=F.y.before||F.y.after;let H=!1;if(["x","y"].forEach(V=>{if(V==="x"&&K&&!I.x||V==="y"&&Q&&!I.y){const ee={anchor:{...S.anchor},origin:{...S.origin}},q=V==="x"?U==="y"?dg:cg:U==="y"?cg:dg;ee.anchor=q(ee.anchor),ee.origin=q(ee.origin);const{overflows:G}=T(ee);(G[V].before<=F[V].before&&G[V].after<=F[V].after||G[V].before+G[V].after<(F[V].before+F[V].after)/2)&&(S=ee,H=I[V]=!0)}}),H)continue}F.x.before&&(P+=F.x.before,_.x+=F.x.before),F.x.after&&(P-=F.x.after,_.x-=F.x.after),F.y.before&&(w+=F.y.before,_.y+=F.y.before),F.y.after&&(w-=F.y.after,_.y-=F.y.after);{const U=W1(_,C);E.x=C.width-U.x.before-U.x.after,E.y=C.height-U.y.before-U.y.after,P+=U.x.before,_.x+=U.x.before,w+=U.y.before,_.y+=U.y.before}break}const R=q1(S.anchor);return Object.assign(n.value,{"--v-overlay-anchor-origin":`${S.anchor.side} ${S.anchor.align}`,transformOrigin:`${S.origin.side} ${S.origin.align}`,top:Ne(gg(w)),left:e.isRtl.value?void 0:Ne(gg(P)),right:e.isRtl.value?Ne(gg(-P)):void 0,minWidth:Ne(R==="y"?Math.min(o.value,m.width):o.value),maxWidth:Ne(vw(Cr(E.x,o.value===1/0?0:o.value,l.value))),maxHeight:Ne(vw(Cr(E.y,a.value===1/0?0:a.value,u.value)))}),{available:E,contentBox:_,flipped:I}}return Ee(()=>[s.value,i.value,t.offset,t.minWidth,t.minHeight,t.maxWidth,t.maxHeight],()=>y()),Mt(()=>{const _=y();if(!_)return;const{available:b,contentBox:x}=_;x.height>b.y&&requestAnimationFrame(()=>{y(),requestAnimationFrame(()=>{y()})})}),{updateLocation:y}}function gg(e){return Math.round(e*devicePixelRatio)/devicePixelRatio}function vw(e){return Math.ceil(e*devicePixelRatio)/devicePixelRatio}let jv=!0;const zh=[];function yN(e){!jv||zh.length?(zh.push(e),qv()):(jv=!1,e(),qv())}let yw=-1;function qv(){cancelAnimationFrame(yw),yw=requestAnimationFrame(()=>{const e=zh.shift();e&&e(),zh.length?qv():jv=!0})}const Yf={none:null,close:wN,block:SN,reposition:kN},bN=de({scrollStrategy:{type:[String,Function],default:"block",validator:e=>typeof e=="function"||e in Yf}},"VOverlay-scroll-strategies");function _N(e,t){if(!Et)return;let n;On(async()=>{n==null||n.stop(),t.isActive.value&&e.scrollStrategy&&(n=$a(),await new Promise(r=>setTimeout(r)),n.active&&n.run(()=>{var r;typeof e.scrollStrategy=="function"?e.scrollStrategy(t,e,n):(r=Yf[e.scrollStrategy])==null||r.call(Yf,t,e,n)}))}),yn(()=>{n==null||n.stop()})}function wN(e){function t(n){e.isActive.value=!1}SP(e.targetEl.value??e.contentEl.value,t)}function SN(e,t){var o;const n=(o=e.root.value)==null?void 0:o.offsetParent,r=[...new Set([...Vh(e.targetEl.value,t.contained?n:void 0),...Vh(e.contentEl.value,t.contained?n:void 0)])].filter(a=>!a.classList.contains("v-overlay-scroll-blocked")),s=window.innerWidth-document.documentElement.offsetWidth,i=(a=>e_(a)&&a)(n||document.documentElement);i&&e.root.value.classList.add("v-overlay--scroll-blocked"),r.forEach((a,l)=>{a.style.setProperty("--v-body-scroll-x",Ne(-a.scrollLeft)),a.style.setProperty("--v-body-scroll-y",Ne(-a.scrollTop)),a!==document.documentElement&&a.style.setProperty("--v-scrollbar-offset",Ne(s)),a.classList.add("v-overlay-scroll-blocked")}),yn(()=>{r.forEach((a,l)=>{const u=parseFloat(a.style.getPropertyValue("--v-body-scroll-x")),c=parseFloat(a.style.getPropertyValue("--v-body-scroll-y")),d=a.style.scrollBehavior;a.style.scrollBehavior="auto",a.style.removeProperty("--v-body-scroll-x"),a.style.removeProperty("--v-body-scroll-y"),a.style.removeProperty("--v-scrollbar-offset"),a.classList.remove("v-overlay-scroll-blocked"),a.scrollLeft=-u,a.scrollTop=-c,a.style.scrollBehavior=d}),i&&e.root.value.classList.remove("v-overlay--scroll-blocked")})}function kN(e,t,n){let r=!1,s=-1,i=-1;function o(a){yN(()=>{var c,d;const l=performance.now();(d=(c=e.updateLocation).value)==null||d.call(c,a),r=(performance.now()-l)/(1e3/60)>2})}i=(typeof requestIdleCallback>"u"?a=>a():requestIdleCallback)(()=>{n.run(()=>{SP(e.targetEl.value??e.contentEl.value,a=>{r?(cancelAnimationFrame(s),s=requestAnimationFrame(()=>{s=requestAnimationFrame(()=>{o(a)})})):o(a)})})}),yn(()=>{typeof cancelIdleCallback<"u"&&cancelIdleCallback(i),cancelAnimationFrame(s)})}function SP(e,t){const n=[document,...Vh(e)];n.forEach(r=>{r.addEventListener("scroll",t,{passive:!0})}),yn(()=>{n.forEach(r=>{r.removeEventListener("scroll",t)})})}const Wv=Symbol.for("vuetify:v-menu"),r_=de({closeDelay:[Number,String],openDelay:[Number,String]},"delay");function s_(e,t){let n=()=>{};function r(o){n==null||n();const a=Number(o?e.openDelay:e.closeDelay);return new Promise(l=>{n=U$(a,()=>{t==null||t(o),l(o)})})}function s(){return r(!0)}function i(){return r(!1)}return{clearDelay:n,runOpenDelay:s,runCloseDelay:i}}const xN=de({target:[String,Object],activator:[String,Object],activatorProps:{type:Object,default:()=>({})},openOnClick:{type:Boolean,default:void 0},openOnHover:Boolean,openOnFocus:{type:Boolean,default:void 0},closeOnContentClick:Boolean,...r_()},"VOverlay-activator");function EN(e,t){let{isActive:n,isTop:r,contentEl:s}=t;const i=an("useActivator"),o=j();let a=!1,l=!1,u=!0;const c=A(()=>e.openOnFocus||e.openOnFocus==null&&e.openOnHover),d=A(()=>e.openOnClick||e.openOnClick==null&&!e.openOnHover&&!c.value),{runOpenDelay:f,runCloseDelay:p}=s_(e,w=>{w===(e.openOnHover&&a||c.value&&l)&&!(e.openOnHover&&n.value&&!r.value)&&(n.value!==w&&(u=!0),n.value=w)}),g=j(),m={onClick:w=>{w.stopPropagation(),o.value=w.currentTarget||w.target,n.value||(g.value=[w.clientX,w.clientY]),n.value=!n.value},onMouseenter:w=>{var E;(E=w.sourceCapabilities)!=null&&E.firesTouchEvents||(a=!0,o.value=w.currentTarget||w.target,f())},onMouseleave:w=>{a=!1,p()},onFocus:w=>{$h(w.target,":focus-visible")!==!1&&(l=!0,w.stopPropagation(),o.value=w.currentTarget||w.target,f())},onBlur:w=>{l=!1,w.stopPropagation(),p()}},y=A(()=>{const w={};return d.value&&(w.onClick=m.onClick),e.openOnHover&&(w.onMouseenter=m.onMouseenter,w.onMouseleave=m.onMouseleave),c.value&&(w.onFocus=m.onFocus,w.onBlur=m.onBlur),w}),_=A(()=>{const w={};if(e.openOnHover&&(w.onMouseenter=()=>{a=!0,f()},w.onMouseleave=()=>{a=!1,p()}),c.value&&(w.onFocusin=()=>{l=!0,f()},w.onFocusout=()=>{l=!1,p()}),e.closeOnContentClick){const E=Qe(Wv,null);w.onClick=()=>{n.value=!1,E==null||E.closeParents()}}return w}),b=A(()=>{const w={};return e.openOnHover&&(w.onMouseenter=()=>{u&&(a=!0,u=!1,f())},w.onMouseleave=()=>{a=!1,p()}),w});Ee(r,w=>{var E;w&&(e.openOnHover&&!a&&(!c.value||!l)||c.value&&!l&&(!e.openOnHover||!a))&&!((E=s.value)!=null&&E.contains(document.activeElement))&&(n.value=!1)}),Ee(n,w=>{w||setTimeout(()=>{g.value=void 0})},{flush:"post"});const x=Fv();On(()=>{x.value&&Mt(()=>{o.value=x.el})});const C=Fv(),S=A(()=>e.target==="cursor"&&g.value?g.value:C.value?C.el:kP(e.target,i)||o.value),T=A(()=>Array.isArray(S.value)?void 0:S.value);let P;return Ee(()=>!!e.activator,w=>{w&&Et?(P=$a(),P.run(()=>{CN(e,i,{activatorEl:o,activatorEvents:y})})):P&&P.stop()},{flush:"post",immediate:!0}),yn(()=>{P==null||P.stop()}),{activatorEl:o,activatorRef:x,target:S,targetEl:T,targetRef:C,activatorEvents:y,contentEvents:_,scrimEvents:b}}function CN(e,t,n){let{activatorEl:r,activatorEvents:s}=n;Ee(()=>e.activator,(l,u)=>{if(u&&l!==u){const c=a(u);c&&o(c)}l&&Mt(()=>i())},{immediate:!0}),Ee(()=>e.activatorProps,()=>{i()}),yn(()=>{o()});function i(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:a(),u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.activatorProps;l&&j$(l,ge(s.value,u))}function o(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:a(),u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.activatorProps;l&&q$(l,ge(s.value,u))}function a(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.activator;const u=kP(l,t);return r.value=(u==null?void 0:u.nodeType)===Node.ELEMENT_NODE?u:void 0,r.value}}function kP(e,t){var r,s;if(!e)return;let n;if(e==="parent"){let i=(s=(r=t==null?void 0:t.proxy)==null?void 0:r.$el)==null?void 0:s.parentNode;for(;i!=null&&i.hasAttribute("data-no-activator");)i=i.parentNode;n=i}else typeof e=="string"?n=document.querySelector(e):"$el"in e?n=e.$el:n=e;return n}const Jp=["sm","md","lg","xl","xxl"],Gv=Symbol.for("vuetify:display"),bw={mobileBreakpoint:"lg",thresholds:{xs:0,sm:600,md:960,lg:1280,xl:1920,xxl:2560}},TN=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:bw;return er(bw,e)};function _w(e){return Et&&!e?window.innerWidth:typeof e=="object"&&e.clientWidth||0}function ww(e){return Et&&!e?window.innerHeight:typeof e=="object"&&e.clientHeight||0}function Sw(e){const t=Et&&!e?window.navigator.userAgent:"ssr";function n(g){return!!t.match(g)}const r=n(/android/i),s=n(/iphone|ipad|ipod/i),i=n(/cordova/i),o=n(/electron/i),a=n(/chrome/i),l=n(/edge/i),u=n(/firefox/i),c=n(/opera/i),d=n(/win/i),f=n(/mac/i),p=n(/linux/i);return{android:r,ios:s,cordova:i,electron:o,chrome:a,edge:l,firefox:u,opera:c,win:d,mac:f,linux:p,touch:$$,ssr:t==="ssr"}}function PN(e,t){const{thresholds:n,mobileBreakpoint:r}=TN(e),s=Ie(ww(t)),i=Ie(Sw(t)),o=cn({}),a=Ie(_w(t));function l(){s.value=ww(),a.value=_w()}function u(){l(),i.value=Sw()}return On(()=>{const c=a.value<n.sm,d=a.value<n.md&&!c,f=a.value<n.lg&&!(d||c),p=a.value<n.xl&&!(f||d||c),g=a.value<n.xxl&&!(p||f||d||c),m=a.value>=n.xxl,y=c?"xs":d?"sm":f?"md":p?"lg":g?"xl":"xxl",_=typeof r=="number"?r:n[r],b=a.value<_;o.xs=c,o.sm=d,o.md=f,o.lg=p,o.xl=g,o.xxl=m,o.smAndUp=!c,o.mdAndUp=!(c||d),o.lgAndUp=!(c||d||f),o.xlAndUp=!(c||d||f||p),o.smAndDown=!(f||p||g||m),o.mdAndDown=!(p||g||m),o.lgAndDown=!(g||m),o.xlAndDown=!m,o.name=y,o.height=s.value,o.width=a.value,o.mobile=b,o.mobileBreakpoint=r,o.platform=i.value,o.thresholds=n}),Et&&(window.addEventListener("resize",l,{passive:!0}),yn(()=>{window.removeEventListener("resize",l)},!0)),{...Xa(o),update:u,ssr:!!t}}const el=de({mobile:{type:Boolean,default:!1},mobileBreakpoint:[Number,String]},"display");function fi(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{mobile:null},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:di();const n=Qe(Gv);if(!n)throw new Error("Could not find Vuetify display injection");const r=A(()=>e.mobile?!0:typeof e.mobileBreakpoint=="number"?n.width.value<e.mobileBreakpoint:e.mobileBreakpoint?n.width.value<n.thresholds.value[e.mobileBreakpoint]:e.mobile===null?n.mobile.value:!1),s=ae(()=>t?{[`${t}--mobile`]:r.value}:{});return{...n,displayClasses:s,mobile:r}}function RN(){if(!Et)return Ie(!1);const{ssr:e}=fi();if(e){const t=Ie(!1);return bt(()=>{t.value=!0}),t}else return Ie(!0)}const xP=de({eager:Boolean},"lazy");function EP(e,t){const n=Ie(!1),r=ae(()=>n.value||e.eager||t.value);Ee(t,()=>n.value=!0);function s(){e.eager||(n.value=!1)}return{isBooted:n,hasContent:r,onAfterLeave:s}}function Ru(){const t=an("useScopeId").vnode.scopeId;return{scopeId:t?{[t]:""}:void 0}}const kw=Symbol.for("vuetify:stack"),Zu=cn([]);function IN(e,t,n){const r=an("useStack"),s=!n,i=Qe(kw,void 0),o=cn({activeChildren:new Set});Kt(kw,o);const a=Ie(Number(Bn(t)));Hr(e,()=>{var d;const c=(d=Zu.at(-1))==null?void 0:d[1];a.value=c?c+10:Number(Bn(t)),s&&Zu.push([r.uid,a.value]),i==null||i.activeChildren.add(r.uid),yn(()=>{if(s){const f=Be(Zu).findIndex(p=>p[0]===r.uid);Zu.splice(f,1)}i==null||i.activeChildren.delete(r.uid)})});const l=Ie(!0);s&&On(()=>{var d;const c=((d=Zu.at(-1))==null?void 0:d[0])===r.uid;setTimeout(()=>l.value=c)});const u=ae(()=>!o.activeChildren.size);return{globalTop:Ho(l),localTop:u,stackStyles:ae(()=>({zIndex:a.value}))}}function AN(e){return{teleportTarget:A(()=>{const n=e();if(n===!0||!Et)return;const r=n===!1?document.body:typeof n=="string"?document.querySelector(n):n;if(r==null)return;let s=[...r.children].find(i=>i.matches(".v-overlay-container"));return s||(s=document.createElement("div"),s.className="v-overlay-container",r.appendChild(s)),s})}}const Iu=de({transition:{type:null,default:"fade-transition",validator:e=>e!==!0}},"transition"),si=(e,t)=>{let{slots:n}=t;const{transition:r,disabled:s,group:i,...o}=e,{component:a=i?Wb:Lo,...l}=Dh(r)?r:{};let u;return Dh(r)?u=ge(l,JSON.parse(JSON.stringify({disabled:s,group:i})),o):u=ge({name:s||!r?"":r},o),pr(a,u,n)};function ON(){return!0}function CP(e,t,n){if(!e||TP(e,n)===!1)return!1;const r=GT(t);if(typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&r.host===e.target)return!1;const s=(typeof n.value=="object"&&n.value.include||(()=>[]))();return s.push(t),!s.some(i=>i==null?void 0:i.contains(e.target))}function TP(e,t){return(typeof t.value=="object"&&t.value.closeConditional||ON)(e)}function MN(e,t,n){const r=typeof n.value=="function"?n.value:n.value.handler;e.shadowTarget=e.target,t._clickOutside.lastMousedownWasOutside&&CP(e,t,n)&&setTimeout(()=>{TP(e,n)&&r&&r(e)},0)}function xw(e,t){const n=GT(e);t(document),typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&t(n)}const DN={mounted(e,t){const n=s=>MN(s,e,t),r=s=>{e._clickOutside.lastMousedownWasOutside=CP(s,e,t)};xw(e,s=>{s.addEventListener("click",n,!0),s.addEventListener("mousedown",r,!0)}),e._clickOutside||(e._clickOutside={lastMousedownWasOutside:!1}),e._clickOutside[t.instance.$.uid]={onClick:n,onMousedown:r}},beforeUnmount(e,t){e._clickOutside&&(xw(e,n=>{var i;if(!n||!((i=e._clickOutside)!=null&&i[t.instance.$.uid]))return;const{onClick:r,onMousedown:s}=e._clickOutside[t.instance.$.uid];n.removeEventListener("click",r,!0),n.removeEventListener("mousedown",s,!0)}),delete e._clickOutside[t.instance.$.uid])}};function LN(e){const{modelValue:t,color:n,...r}=e;return h(Lo,{name:"fade-transition",appear:!0},{default:()=>[e.modelValue&&h("div",ge({class:["v-overlay__scrim",e.color.backgroundColorClasses.value],style:e.color.backgroundColorStyles.value},r),null)]})}const Id=de({absolute:Boolean,attach:[Boolean,String,Object],closeOnBack:{type:Boolean,default:!0},contained:Boolean,contentClass:null,contentProps:null,disabled:Boolean,opacity:[Number,String],noClickAnimation:Boolean,modelValue:Boolean,persistent:Boolean,scrim:{type:[Boolean,String],default:!0},zIndex:{type:[Number,String],default:2e3},...xN(),...Ue(),...Or(),...xP(),...hN(),...bN(),...Lt(),...Iu()},"VOverlay"),Ui=ke()({name:"VOverlay",directives:{ClickOutside:DN},inheritAttrs:!1,props:{_disableGlobalStack:Boolean,...Id()},emits:{"click:outside":e=>!0,"update:modelValue":e=>!0,keydown:e=>!0,afterEnter:()=>!0,afterLeave:()=>!0},setup(e,t){let{slots:n,attrs:r,emit:s}=t;const i=an("VOverlay"),o=j(),a=j(),l=j(),u=it(e,"modelValue"),c=A({get:()=>u.value,set:Z=>{Z&&e.disabled||(u.value=Z)}}),{themeClasses:d}=Zt(e),{rtlClasses:f,isRtl:p}=Dr(),{hasContent:g,onAfterLeave:m}=EP(e,c),y=fr(()=>typeof e.scrim=="string"?e.scrim:null),{globalTop:_,localTop:b,stackStyles:x}=IN(c,()=>e.zIndex,e._disableGlobalStack),{activatorEl:C,activatorRef:S,target:T,targetEl:P,targetRef:w,activatorEvents:E,contentEvents:I,scrimEvents:O}=EN(e,{isActive:c,isTop:b,contentEl:l}),{teleportTarget:R}=AN(()=>{var ne,z,xe;const Z=e.attach||e.contained;if(Z)return Z;const he=((ne=C==null?void 0:C.value)==null?void 0:ne.getRootNode())||((xe=(z=i.proxy)==null?void 0:z.$el)==null?void 0:xe.getRootNode());return he instanceof ShadowRoot?he:!1}),{dimensionStyles:M}=Mr(e),D=RN(),{scopeId:F}=Ru();Ee(()=>e.disabled,Z=>{Z&&(c.value=!1)});const{contentStyles:U,updateLocation:K}=pN(e,{isRtl:p,contentEl:l,target:T,isActive:c});_N(e,{root:o,contentEl:l,targetEl:P,isActive:c,updateLocation:K});function Q(Z){s("click:outside",Z),e.persistent?le():c.value=!1}function H(Z){return c.value&&_.value&&(!e.scrim||Z.target===a.value||Z instanceof MouseEvent&&Z.shadowTarget===a.value)}Et&&Ee(c,Z=>{Z?window.addEventListener("keydown",V):window.removeEventListener("keydown",V)},{immediate:!0}),Cn(()=>{Et&&window.removeEventListener("keydown",V)});function V(Z){var he,ne,z;Z.key==="Escape"&&_.value&&((he=l.value)!=null&&he.contains(document.activeElement)||s("keydown",Z),e.persistent?le():(c.value=!1,(ne=l.value)!=null&&ne.contains(document.activeElement)&&((z=C.value)==null||z.focus())))}function ee(Z){Z.key==="Escape"&&!_.value||s("keydown",Z)}const q=oP();Hr(()=>e.closeOnBack,()=>{tN(q,Z=>{_.value&&c.value?(Z(!1),e.persistent?le():c.value=!1):Z()})});const G=j();Ee(()=>c.value&&(e.absolute||e.contained)&&R.value==null,Z=>{if(Z){const he=KT(o.value);he&&he!==document.scrollingElement&&(G.value=he.scrollTop)}});function le(){e.noClickAnimation||l.value&&Cl(l.value,[{transformOrigin:"center"},{transform:"scale(1.03)"},{transformOrigin:"center"}],{duration:150,easing:Nh})}function ie(){s("afterEnter")}function we(){m(),s("afterLeave")}return Oe(()=>{var Z;return h(Ae,null,[(Z=n.activator)==null?void 0:Z.call(n,{isActive:c.value,targetRef:w,props:ge({ref:S},E.value,e.activatorProps)}),D.value&&g.value&&h(qD,{disabled:!R.value,to:R.value},{default:()=>[h("div",ge({class:["v-overlay",{"v-overlay--absolute":e.absolute||e.contained,"v-overlay--active":c.value,"v-overlay--contained":e.contained},d.value,f.value,e.class],style:[x.value,{"--v-overlay-opacity":e.opacity,top:Ne(G.value)},e.style],ref:o,onKeydown:ee},F,r),[h(LN,ge({color:y,modelValue:c.value&&!!e.scrim,ref:a},O.value),null),h(si,{appear:!0,persisted:!0,transition:e.transition,target:T.value,onAfterEnter:ie,onAfterLeave:we},{default:()=>{var he;return[Nt(h("div",ge({ref:l,class:["v-overlay__content",e.contentClass],style:[M.value,U.value]},I.value,e.contentProps),[(he=n.default)==null?void 0:he.call(n,{isActive:c})]),[[Qi,c.value],[hr("click-outside"),{handler:Q,closeConditional:H,include:()=>[C.value]}]])]}})])]})])}),{activatorEl:C,scrimEl:a,target:T,animateClick:le,contentEl:l,globalTop:_,localTop:b,updateLocation:K}}}),vg=Symbol("Forwarded refs");function yg(e,t){let n=e;for(;n;){const r=Reflect.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Ji(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e[vg]=n,new Proxy(e,{get(s,i){if(Reflect.has(s,i))return Reflect.get(s,i);if(!(typeof i=="symbol"||i.startsWith("$")||i.startsWith("__"))){for(const o of n)if(o.value&&Reflect.has(o.value,i)){const a=Reflect.get(o.value,i);return typeof a=="function"?a.bind(o.value):a}}},has(s,i){if(Reflect.has(s,i))return!0;if(typeof i=="symbol"||i.startsWith("$")||i.startsWith("__"))return!1;for(const o of n)if(o.value&&Reflect.has(o.value,i))return!0;return!1},set(s,i,o){if(Reflect.has(s,i))return Reflect.set(s,i,o);if(typeof i=="symbol"||i.startsWith("$")||i.startsWith("__"))return!1;for(const a of n)if(a.value&&Reflect.has(a.value,i))return Reflect.set(a.value,i,o);return!1},getOwnPropertyDescriptor(s,i){var a;const o=Reflect.getOwnPropertyDescriptor(s,i);if(o)return o;if(!(typeof i=="symbol"||i.startsWith("$")||i.startsWith("__"))){for(const l of n){if(!l.value)continue;const u=yg(l.value,i)??("_"in l.value?yg((a=l.value._)==null?void 0:a.setupState,i):void 0);if(u)return u}for(const l of n){const u=l.value&&l.value[vg];if(!u)continue;const c=u.slice();for(;c.length;){const d=c.shift(),f=yg(d.value,i);if(f)return f;const p=d.value&&d.value[vg];p&&c.push(...p)}}}}})}const $N=de({fullscreen:Boolean,retainFocus:{type:Boolean,default:!0},scrollable:Boolean,...Id({origin:"center center",scrollStrategy:"block",transition:{component:n_},zIndex:2400})},"VDialog"),PP=ke()({name:"VDialog",props:$N(),emits:{"update:modelValue":e=>!0,afterEnter:()=>!0,afterLeave:()=>!0},setup(e,t){let{emit:n,slots:r}=t;const s=it(e,"modelValue"),{scopeId:i}=Ru(),o=j();function a(c){var p,g;const d=c.relatedTarget,f=c.target;if(d!==f&&((p=o.value)!=null&&p.contentEl)&&((g=o.value)!=null&&g.globalTop)&&![document,o.value.contentEl].includes(f)&&!o.value.contentEl.contains(f)){const m=qc(o.value.contentEl);if(!m.length)return;const y=m[0],_=m[m.length-1];d===y?_.focus():y.focus()}}Cn(()=>{document.removeEventListener("focusin",a)}),Et&&Ee(()=>s.value&&e.retainFocus,c=>{c?document.addEventListener("focusin",a):document.removeEventListener("focusin",a)},{immediate:!0});function l(){var c;n("afterEnter"),(e.scrim||e.retainFocus)&&((c=o.value)!=null&&c.contentEl)&&!o.value.contentEl.contains(document.activeElement)&&o.value.contentEl.focus({preventScroll:!0})}function u(){n("afterLeave")}return Ee(s,async c=>{var d;c||(await Mt(),(d=o.value.activatorEl)==null||d.focus({preventScroll:!0}))}),Oe(()=>{const c=Ui.filterProps(e),d=ge({"aria-haspopup":"dialog"},e.activatorProps),f=ge({tabindex:-1},e.contentProps);return h(Ui,ge({ref:o,class:["v-dialog",{"v-dialog--fullscreen":e.fullscreen,"v-dialog--scrollable":e.scrollable},e.class],style:e.style},c,{modelValue:s.value,"onUpdate:modelValue":p=>s.value=p,"aria-modal":"true",activatorProps:d,contentProps:f,height:e.fullscreen?void 0:e.height,width:e.fullscreen?void 0:e.width,maxHeight:e.fullscreen?void 0:e.maxHeight,maxWidth:e.fullscreen?void 0:e.maxWidth,role:"dialog",onAfterEnter:l,onAfterLeave:u},i),{activator:r.activator,default:function(){for(var p=arguments.length,g=new Array(p),m=0;m<p;m++)g[m]=arguments[m];return h(Ot,{root:"VDialog"},{default:()=>{var y;return[(y=r.default)==null?void 0:y.call(r,...g)]}})}})}),Ji({},o)}}),FN={class:"pa-3 text--primary"},hi=Le({__name:"BaseDialog",props:{id:{type:String,required:!0},maxWidth:{type:String,default:"400px"}},emits:["escape","opened","beforeOpened"],setup(e,{emit:t}){const n=e,r=PT(),s=t,i=tn(n.id);function o(c){return s("opened",c)}function a(c){return s("beforeOpened",c)}bt(async()=>{L$("Escape",c=>{l.value&&(c.preventDefault(),u())}),r.registerDialogReference(n.id,{beforeOpenedCallback:a,openedCallback:o})}),Cn(()=>{r.unregisterDialogReference(n.id)});const l=A(()=>{if(!n.id)return;const c=r.isDialogOpened(n.id);return c&&console.debug(`[BaseDialog ${n.id}] Showing dialog: ${i==null?void 0:i.isDialogOpened()}`),c});function u(){s("escape")}return(c,d)=>($(),te(PP,{"max-width":e.maxWidth,"retain-focus":!1,"model-value":l.value,persistent:"",onClose:d[1]||(d[1]=f=>u())},{default:v(()=>[Up(c.$slots,"default",{},()=>[L("div",FN,[d[4]||(d[4]=k(" No content defined in dialog. ")),h(re,{onClick:d[0]||(d[0]=f=>X(i).closeDialog())},{default:v(()=>[h(J,{class:"mr-3"},{default:v(()=>d[2]||(d[2]=[k("close")])),_:1,__:[2]}),d[3]||(d[3]=k("Close "))]),_:1,__:[3]})])])]),_:3},8,["max-width","model-value"]))}});var nn=(e=>(e.ImportOctoFarmDialog="ImportOctoFarmDialog",e.BatchReprintDialog="BatchReprintDialog",e.YamlImportExport="YamlImportExport",e.AddOrUpdatePrinterDialog="AddOrUpdatePrinterDialog",e.AddOrUpdateFloorDialog="AddOrUpdateFloorDialog",e.PrinterMaintenanceDialog="PrinterMaintenanceDialog",e.AddOrUpdateCameraDialog="AddOrUpdateCameraDialog",e.PrinterControlDialog="PrinterControlDialog",e.CreateUserDialog="CreateUserDialog",e.GridSettingsDialog="GridSettingsDialog",e))(nn||{});function RP(e,t){return function(){return e.apply(t,arguments)}}const{toString:NN}=Object.prototype,{getPrototypeOf:i_}=Object,{iterator:Zp,toStringTag:IP}=Symbol,em=(e=>t=>{const n=NN.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Fs=e=>(e=e.toLowerCase(),t=>em(t)===e),tm=e=>t=>typeof t===e,{isArray:Au}=Array,Xc=tm("undefined");function VN(e){return e!==null&&!Xc(e)&&e.constructor!==null&&!Xc(e.constructor)&&Tr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const AP=Fs("ArrayBuffer");function BN(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&AP(e.buffer),t}const UN=tm("string"),Tr=tm("function"),OP=tm("number"),nm=e=>e!==null&&typeof e=="object",zN=e=>e===!0||e===!1,Xf=e=>{if(em(e)!=="object")return!1;const t=i_(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(IP in e)&&!(Zp in e)},HN=Fs("Date"),jN=Fs("File"),qN=Fs("Blob"),WN=Fs("FileList"),GN=e=>nm(e)&&Tr(e.pipe),KN=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Tr(e.append)&&((t=em(e))==="formdata"||t==="object"&&Tr(e.toString)&&e.toString()==="[object FormData]"))},YN=Fs("URLSearchParams"),[XN,QN,JN,ZN]=["ReadableStream","Request","Response","Headers"].map(Fs),eV=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ad(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),Au(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let a;for(r=0;r<o;r++)a=i[r],t.call(null,e[a],a,e)}}function MP(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const da=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,DP=e=>!Xc(e)&&e!==da;function Kv(){const{caseless:e}=DP(this)&&this||{},t={},n=(r,s)=>{const i=e&&MP(t,s)||s;Xf(t[i])&&Xf(r)?t[i]=Kv(t[i],r):Xf(r)?t[i]=Kv({},r):Au(r)?t[i]=r.slice():t[i]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&Ad(arguments[r],n);return t}const tV=(e,t,n,{allOwnKeys:r}={})=>(Ad(t,(s,i)=>{n&&Tr(s)?e[i]=RP(s,n):e[i]=s},{allOwnKeys:r}),e),nV=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),rV=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},sV=(e,t,n,r)=>{let s,i,o;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=n!==!1&&i_(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},iV=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},oV=e=>{if(!e)return null;if(Au(e))return e;let t=e.length;if(!OP(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},aV=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&i_(Uint8Array)),lV=(e,t)=>{const r=(e&&e[Zp]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},uV=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},cV=Fs("HTMLFormElement"),dV=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Ew=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),fV=Fs("RegExp"),LP=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ad(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},hV=e=>{LP(e,(t,n)=>{if(Tr(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Tr(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},pV=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return Au(e)?r(e):r(String(e).split(t)),n},mV=()=>{},gV=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function vV(e){return!!(e&&Tr(e.append)&&e[IP]==="FormData"&&e[Zp])}const yV=e=>{const t=new Array(10),n=(r,s)=>{if(nm(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const i=Au(r)?[]:{};return Ad(r,(o,a)=>{const l=n(o,s+1);!Xc(l)&&(i[a]=l)}),t[s]=void 0,i}}return r};return n(e,0)},bV=Fs("AsyncFunction"),_V=e=>e&&(nm(e)||Tr(e))&&Tr(e.then)&&Tr(e.catch),$P=((e,t)=>e?setImmediate:t?((n,r)=>(da.addEventListener("message",({source:s,data:i})=>{s===da&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),da.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Tr(da.postMessage)),wV=typeof queueMicrotask<"u"?queueMicrotask.bind(da):typeof process<"u"&&process.nextTick||$P,SV=e=>e!=null&&Tr(e[Zp]),ue={isArray:Au,isArrayBuffer:AP,isBuffer:VN,isFormData:KN,isArrayBufferView:BN,isString:UN,isNumber:OP,isBoolean:zN,isObject:nm,isPlainObject:Xf,isReadableStream:XN,isRequest:QN,isResponse:JN,isHeaders:ZN,isUndefined:Xc,isDate:HN,isFile:jN,isBlob:qN,isRegExp:fV,isFunction:Tr,isStream:GN,isURLSearchParams:YN,isTypedArray:aV,isFileList:WN,forEach:Ad,merge:Kv,extend:tV,trim:eV,stripBOM:nV,inherits:rV,toFlatObject:sV,kindOf:em,kindOfTest:Fs,endsWith:iV,toArray:oV,forEachEntry:lV,matchAll:uV,isHTMLForm:cV,hasOwnProperty:Ew,hasOwnProp:Ew,reduceDescriptors:LP,freezeMethods:hV,toObjectSet:pV,toCamelCase:dV,noop:mV,toFiniteNumber:gV,findKey:MP,global:da,isContextDefined:DP,isSpecCompliantForm:vV,toJSONObject:yV,isAsyncFn:bV,isThenable:_V,setImmediate:$P,asap:wV,isIterable:SV};function Ze(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}ue.inherits(Ze,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ue.toJSONObject(this.config),code:this.code,status:this.status}}});const FP=Ze.prototype,NP={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{NP[e]={value:e}});Object.defineProperties(Ze,NP);Object.defineProperty(FP,"isAxiosError",{value:!0});Ze.from=(e,t,n,r,s,i)=>{const o=Object.create(FP);return ue.toFlatObject(e,o,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),Ze.call(o,e.message,t,n,r,s),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const kV=null;function Yv(e){return ue.isPlainObject(e)||ue.isArray(e)}function VP(e){return ue.endsWith(e,"[]")?e.slice(0,-2):e}function Cw(e,t,n){return e?e.concat(t).map(function(s,i){return s=VP(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function xV(e){return ue.isArray(e)&&!e.some(Yv)}const EV=ue.toFlatObject(ue,{},null,function(t){return/^is[A-Z]/.test(t)});function rm(e,t,n){if(!ue.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=ue.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!ue.isUndefined(y[m])});const r=n.metaTokens,s=n.visitor||c,i=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&ue.isSpecCompliantForm(t);if(!ue.isFunction(s))throw new TypeError("visitor must be a function");function u(g){if(g===null)return"";if(ue.isDate(g))return g.toISOString();if(!l&&ue.isBlob(g))throw new Ze("Blob is not supported. Use a Buffer instead.");return ue.isArrayBuffer(g)||ue.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function c(g,m,y){let _=g;if(g&&!y&&typeof g=="object"){if(ue.endsWith(m,"{}"))m=r?m:m.slice(0,-2),g=JSON.stringify(g);else if(ue.isArray(g)&&xV(g)||(ue.isFileList(g)||ue.endsWith(m,"[]"))&&(_=ue.toArray(g)))return m=VP(m),_.forEach(function(x,C){!(ue.isUndefined(x)||x===null)&&t.append(o===!0?Cw([m],C,i):o===null?m:m+"[]",u(x))}),!1}return Yv(g)?!0:(t.append(Cw(y,m,i),u(g)),!1)}const d=[],f=Object.assign(EV,{defaultVisitor:c,convertValue:u,isVisitable:Yv});function p(g,m){if(!ue.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(g),ue.forEach(g,function(_,b){(!(ue.isUndefined(_)||_===null)&&s.call(t,_,ue.isString(b)?b.trim():b,m,f))===!0&&p(_,m?m.concat(b):[b])}),d.pop()}}if(!ue.isObject(e))throw new TypeError("data must be an object");return p(e),t}function Tw(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function o_(e,t){this._pairs=[],e&&rm(e,this,t)}const BP=o_.prototype;BP.append=function(t,n){this._pairs.push([t,n])};BP.toString=function(t){const n=t?function(r){return t.call(this,r,Tw)}:Tw;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function CV(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function UP(e,t,n){if(!t)return e;const r=n&&n.encode||CV;ue.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(s?i=s(t,n):i=ue.isURLSearchParams(t)?t.toString():new o_(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Pw{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ue.forEach(this.handlers,function(r){r!==null&&t(r)})}}const zP={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},TV=typeof URLSearchParams<"u"?URLSearchParams:o_,PV=typeof FormData<"u"?FormData:null,RV=typeof Blob<"u"?Blob:null,IV={isBrowser:!0,classes:{URLSearchParams:TV,FormData:PV,Blob:RV},protocols:["http","https","file","blob","url","data"]},a_=typeof window<"u"&&typeof document<"u",Xv=typeof navigator=="object"&&navigator||void 0,AV=a_&&(!Xv||["ReactNative","NativeScript","NS"].indexOf(Xv.product)<0),OV=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",MV=a_&&window.location.href||"http://localhost",DV=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:a_,hasStandardBrowserEnv:AV,hasStandardBrowserWebWorkerEnv:OV,navigator:Xv,origin:MV},Symbol.toStringTag,{value:"Module"})),Zn={...DV,...IV};function LV(e,t){return rm(e,new Zn.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,i){return Zn.isNode&&ue.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function $V(e){return ue.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function FV(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],t[i]=e[i];return t}function HP(e){function t(n,r,s,i){let o=n[i++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),l=i>=n.length;return o=!o&&ue.isArray(s)?s.length:o,l?(ue.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!a):((!s[o]||!ue.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&ue.isArray(s[o])&&(s[o]=FV(s[o])),!a)}if(ue.isFormData(e)&&ue.isFunction(e.entries)){const n={};return ue.forEachEntry(e,(r,s)=>{t($V(r),s,n,0)}),n}return null}function NV(e,t,n){if(ue.isString(e))try{return(t||JSON.parse)(e),ue.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const Od={transitional:zP,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=ue.isObject(t);if(i&&ue.isHTMLForm(t)&&(t=new FormData(t)),ue.isFormData(t))return s?JSON.stringify(HP(t)):t;if(ue.isArrayBuffer(t)||ue.isBuffer(t)||ue.isStream(t)||ue.isFile(t)||ue.isBlob(t)||ue.isReadableStream(t))return t;if(ue.isArrayBufferView(t))return t.buffer;if(ue.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return LV(t,this.formSerializer).toString();if((a=ue.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return rm(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),NV(t)):t}],transformResponse:[function(t){const n=this.transitional||Od.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(ue.isResponse(t)||ue.isReadableStream(t))return t;if(t&&ue.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(a){if(o)throw a.name==="SyntaxError"?Ze.from(a,Ze.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Zn.classes.FormData,Blob:Zn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ue.forEach(["delete","get","head","post","put","patch"],e=>{Od.headers[e]={}});const VV=ue.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),BV=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
26
|
+
`).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&VV[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Rw=Symbol("internals");function ec(e){return e&&String(e).trim().toLowerCase()}function Qf(e){return e===!1||e==null?e:ue.isArray(e)?e.map(Qf):String(e)}function UV(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const zV=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function bg(e,t,n,r,s){if(ue.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!ue.isString(t)){if(ue.isString(r))return t.indexOf(r)!==-1;if(ue.isRegExp(r))return r.test(t)}}function HV(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function jV(e,t){const n=ue.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}let Pr=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(a,l,u){const c=ec(l);if(!c)throw new Error("header name must be a non-empty string");const d=ue.findKey(s,c);(!d||s[d]===void 0||u===!0||u===void 0&&s[d]!==!1)&&(s[d||l]=Qf(a))}const o=(a,l)=>ue.forEach(a,(u,c)=>i(u,c,l));if(ue.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(ue.isString(t)&&(t=t.trim())&&!zV(t))o(BV(t),n);else if(ue.isObject(t)&&ue.isIterable(t)){let a={},l,u;for(const c of t){if(!ue.isArray(c))throw TypeError("Object iterator must return a key-value pair");a[u=c[0]]=(l=a[u])?ue.isArray(l)?[...l,c[1]]:[l,c[1]]:c[1]}o(a,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=ec(t),t){const r=ue.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return UV(s);if(ue.isFunction(n))return n.call(this,s,r);if(ue.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ec(t),t){const r=ue.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||bg(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=ec(o),o){const a=ue.findKey(r,o);a&&(!n||bg(r,r[a],a,n))&&(delete r[a],s=!0)}}return ue.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||bg(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return ue.forEach(this,(s,i)=>{const o=ue.findKey(r,i);if(o){n[o]=Qf(s),delete n[i];return}const a=t?HV(i):String(i).trim();a!==i&&delete n[i],n[a]=Qf(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return ue.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&ue.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
27
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[Rw]=this[Rw]={accessors:{}}).accessors,s=this.prototype;function i(o){const a=ec(o);r[a]||(jV(s,o),r[a]=!0)}return ue.isArray(t)?t.forEach(i):i(t),this}};Pr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ue.reduceDescriptors(Pr.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});ue.freezeMethods(Pr);function _g(e,t){const n=this||Od,r=t||n,s=Pr.from(r.headers);let i=r.data;return ue.forEach(e,function(a){i=a.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function jP(e){return!!(e&&e.__CANCEL__)}function Ou(e,t,n){Ze.call(this,e??"canceled",Ze.ERR_CANCELED,t,n),this.name="CanceledError"}ue.inherits(Ou,Ze,{__CANCEL__:!0});function qP(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ze("Request failed with status code "+n.status,[Ze.ERR_BAD_REQUEST,Ze.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function qV(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function WV(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=r[i];o||(o=u),n[s]=l,r[s]=u;let d=i,f=0;for(;d!==s;)f+=n[d++],d=d%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),u-o<t)return;const p=c&&u-c;return p?Math.round(f*1e3/p):void 0}}function GV(e,t){let n=0,r=1e3/t,s,i;const o=(u,c=Date.now())=>{n=c,s=null,i&&(clearTimeout(i),i=null),e.apply(null,u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=r?o(u,c):(s=u,i||(i=setTimeout(()=>{i=null,o(s)},r-d)))},()=>s&&o(s)]}const Hh=(e,t,n=3)=>{let r=0;const s=WV(50,250);return GV(i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,l=o-r,u=s(l),c=o<=a;r=o;const d={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&c?(a-o)/u:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},Iw=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Aw=e=>(...t)=>ue.asap(()=>e(...t)),KV=Zn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Zn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Zn.origin),Zn.navigator&&/(msie|trident)/i.test(Zn.navigator.userAgent)):()=>!0,YV=Zn.hasStandardBrowserEnv?{write(e,t,n,r,s,i){const o=[e+"="+encodeURIComponent(t)];ue.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),ue.isString(r)&&o.push("path="+r),ue.isString(s)&&o.push("domain="+s),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function XV(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function QV(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function WP(e,t,n){let r=!XV(t);return e&&(r||n==!1)?QV(e,t):t}const Ow=e=>e instanceof Pr?{...e}:e;function Ba(e,t){t=t||{};const n={};function r(u,c,d,f){return ue.isPlainObject(u)&&ue.isPlainObject(c)?ue.merge.call({caseless:f},u,c):ue.isPlainObject(c)?ue.merge({},c):ue.isArray(c)?c.slice():c}function s(u,c,d,f){if(ue.isUndefined(c)){if(!ue.isUndefined(u))return r(void 0,u,d,f)}else return r(u,c,d,f)}function i(u,c){if(!ue.isUndefined(c))return r(void 0,c)}function o(u,c){if(ue.isUndefined(c)){if(!ue.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function a(u,c,d){if(d in t)return r(u,c);if(d in e)return r(void 0,u)}const l={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(u,c,d)=>s(Ow(u),Ow(c),d,!0)};return ue.forEach(Object.keys(Object.assign({},e,t)),function(c){const d=l[c]||s,f=d(e[c],t[c],c);ue.isUndefined(f)&&d!==a||(n[c]=f)}),n}const GP=e=>{const t=Ba({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:a}=t;t.headers=o=Pr.from(o),t.url=UP(WP(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(ue.isFormData(n)){if(Zn.hasStandardBrowserEnv||Zn.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((l=o.getContentType())!==!1){const[u,...c]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];o.setContentType([u||"multipart/form-data",...c].join("; "))}}if(Zn.hasStandardBrowserEnv&&(r&&ue.isFunction(r)&&(r=r(t)),r||r!==!1&&KV(t.url))){const u=s&&i&&YV.read(i);u&&o.set(s,u)}return t},JV=typeof XMLHttpRequest<"u",ZV=JV&&function(e){return new Promise(function(n,r){const s=GP(e);let i=s.data;const o=Pr.from(s.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=s,c,d,f,p,g;function m(){p&&p(),g&&g(),s.cancelToken&&s.cancelToken.unsubscribe(c),s.signal&&s.signal.removeEventListener("abort",c)}let y=new XMLHttpRequest;y.open(s.method.toUpperCase(),s.url,!0),y.timeout=s.timeout;function _(){if(!y)return;const x=Pr.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),S={data:!a||a==="text"||a==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:x,config:e,request:y};qP(function(P){n(P),m()},function(P){r(P),m()},S),y=null}"onloadend"in y?y.onloadend=_:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(_)},y.onabort=function(){y&&(r(new Ze("Request aborted",Ze.ECONNABORTED,e,y)),y=null)},y.onerror=function(){r(new Ze("Network Error",Ze.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let C=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const S=s.transitional||zP;s.timeoutErrorMessage&&(C=s.timeoutErrorMessage),r(new Ze(C,S.clarifyTimeoutError?Ze.ETIMEDOUT:Ze.ECONNABORTED,e,y)),y=null},i===void 0&&o.setContentType(null),"setRequestHeader"in y&&ue.forEach(o.toJSON(),function(C,S){y.setRequestHeader(S,C)}),ue.isUndefined(s.withCredentials)||(y.withCredentials=!!s.withCredentials),a&&a!=="json"&&(y.responseType=s.responseType),u&&([f,g]=Hh(u,!0),y.addEventListener("progress",f)),l&&y.upload&&([d,p]=Hh(l),y.upload.addEventListener("progress",d),y.upload.addEventListener("loadend",p)),(s.cancelToken||s.signal)&&(c=x=>{y&&(r(!x||x.type?new Ou(null,e,y):x),y.abort(),y=null)},s.cancelToken&&s.cancelToken.subscribe(c),s.signal&&(s.signal.aborted?c():s.signal.addEventListener("abort",c)));const b=qV(s.url);if(b&&Zn.protocols.indexOf(b)===-1){r(new Ze("Unsupported protocol "+b+":",Ze.ERR_BAD_REQUEST,e));return}y.send(i||null)})},eB=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const i=function(u){if(!s){s=!0,a();const c=u instanceof Error?u:this.reason;r.abort(c instanceof Ze?c:new Ou(c instanceof Error?c.message:c))}};let o=t&&setTimeout(()=>{o=null,i(new Ze(`timeout ${t} of ms exceeded`,Ze.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:l}=r;return l.unsubscribe=()=>ue.asap(a),l}},tB=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},nB=async function*(e,t){for await(const n of rB(e))yield*tB(n,t)},rB=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Mw=(e,t,n,r)=>{const s=nB(e,t);let i=0,o,a=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await s.next();if(u){a(),l.close();return}let d=c.byteLength;if(n){let f=i+=d;n(f)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),s.return()}},{highWaterMark:2})},sm=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",KP=sm&&typeof ReadableStream=="function",sB=sm&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),YP=(e,...t)=>{try{return!!e(...t)}catch{return!1}},iB=KP&&YP(()=>{let e=!1;const t=new Request(Zn.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Dw=64*1024,Qv=KP&&YP(()=>ue.isReadableStream(new Response("").body)),jh={stream:Qv&&(e=>e.body)};sm&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!jh[t]&&(jh[t]=ue.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Ze(`Response type '${t}' is not supported`,Ze.ERR_NOT_SUPPORT,r)})})})(new Response);const oB=async e=>{if(e==null)return 0;if(ue.isBlob(e))return e.size;if(ue.isSpecCompliantForm(e))return(await new Request(Zn.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(ue.isArrayBufferView(e)||ue.isArrayBuffer(e))return e.byteLength;if(ue.isURLSearchParams(e)&&(e=e+""),ue.isString(e))return(await sB(e)).byteLength},aB=async(e,t)=>{const n=ue.toFiniteNumber(e.getContentLength());return n??oB(t)},lB=sm&&(async e=>{let{url:t,method:n,data:r,signal:s,cancelToken:i,timeout:o,onDownloadProgress:a,onUploadProgress:l,responseType:u,headers:c,withCredentials:d="same-origin",fetchOptions:f}=GP(e);u=u?(u+"").toLowerCase():"text";let p=eB([s,i&&i.toAbortSignal()],o),g;const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let y;try{if(l&&iB&&n!=="get"&&n!=="head"&&(y=await aB(c,r))!==0){let S=new Request(t,{method:"POST",body:r,duplex:"half"}),T;if(ue.isFormData(r)&&(T=S.headers.get("content-type"))&&c.setContentType(T),S.body){const[P,w]=Iw(y,Hh(Aw(l)));r=Mw(S.body,Dw,P,w)}}ue.isString(d)||(d=d?"include":"omit");const _="credentials"in Request.prototype;g=new Request(t,{...f,signal:p,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:_?d:void 0});let b=await fetch(g);const x=Qv&&(u==="stream"||u==="response");if(Qv&&(a||x&&m)){const S={};["status","statusText","headers"].forEach(E=>{S[E]=b[E]});const T=ue.toFiniteNumber(b.headers.get("content-length")),[P,w]=a&&Iw(T,Hh(Aw(a),!0))||[];b=new Response(Mw(b.body,Dw,P,()=>{w&&w(),m&&m()}),S)}u=u||"text";let C=await jh[ue.findKey(jh,u)||"text"](b,e);return!x&&m&&m(),await new Promise((S,T)=>{qP(S,T,{data:C,headers:Pr.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:g})})}catch(_){throw m&&m(),_&&_.name==="TypeError"&&/Load failed|fetch/i.test(_.message)?Object.assign(new Ze("Network Error",Ze.ERR_NETWORK,e,g),{cause:_.cause||_}):Ze.from(_,_&&_.code,e,g)}}),Jv={http:kV,xhr:ZV,fetch:lB};ue.forEach(Jv,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Lw=e=>`- ${e}`,uB=e=>ue.isFunction(e)||e===null||e===!1,XP={getAdapter:e=>{e=ue.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let i=0;i<t;i++){n=e[i];let o;if(r=n,!uB(n)&&(r=Jv[(o=String(n)).toLowerCase()],r===void 0))throw new Ze(`Unknown adapter '${o}'`);if(r)break;s[o||"#"+i]=r}if(!r){const i=Object.entries(s).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=t?i.length>1?`since :
|
|
28
|
+
`+i.map(Lw).join(`
|
|
29
|
+
`):" "+Lw(i[0]):"as no adapter specified";throw new Ze("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:Jv};function wg(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ou(null,e)}function $w(e){return wg(e),e.headers=Pr.from(e.headers),e.data=_g.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),XP.getAdapter(e.adapter||Od.adapter)(e).then(function(r){return wg(e),r.data=_g.call(e,e.transformResponse,r),r.headers=Pr.from(r.headers),r},function(r){return jP(r)||(wg(e),r&&r.response&&(r.response.data=_g.call(e,e.transformResponse,r.response),r.response.headers=Pr.from(r.response.headers))),Promise.reject(r)})}const QP="1.9.0",im={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{im[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Fw={};im.transitional=function(t,n,r){function s(i,o){return"[Axios v"+QP+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,a)=>{if(t===!1)throw new Ze(s(o," has been removed"+(n?" in "+n:"")),Ze.ERR_DEPRECATED);return n&&!Fw[o]&&(Fw[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,a):!0}};im.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function cB(e,t,n){if(typeof e!="object")throw new Ze("options must be an object",Ze.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const a=e[i],l=a===void 0||o(a,i,e);if(l!==!0)throw new Ze("option "+i+" must be "+l,Ze.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ze("Unknown option "+i,Ze.ERR_BAD_OPTION)}}const Jf={assertOptions:cB,validators:im},Hs=Jf.validators;let Pa=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Pw,response:new Pw}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
30
|
+
`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ba(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&Jf.assertOptions(r,{silentJSONParsing:Hs.transitional(Hs.boolean),forcedJSONParsing:Hs.transitional(Hs.boolean),clarifyTimeoutError:Hs.transitional(Hs.boolean)},!1),s!=null&&(ue.isFunction(s)?n.paramsSerializer={serialize:s}:Jf.assertOptions(s,{encode:Hs.function,serialize:Hs.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Jf.assertOptions(n,{baseUrl:Hs.spelling("baseURL"),withXsrfToken:Hs.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&ue.merge(i.common,i[n.method]);i&&ue.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),n.headers=Pr.concat(o,i);const a=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let c,d=0,f;if(!l){const g=[$w.bind(this),void 0];for(g.unshift.apply(g,a),g.push.apply(g,u),f=g.length,c=Promise.resolve(n);d<f;)c=c.then(g[d++],g[d++]);return c}f=a.length;let p=n;for(d=0;d<f;){const g=a[d++],m=a[d++];try{p=g(p)}catch(y){m.call(this,y);break}}try{c=$w.call(this,p)}catch(g){return Promise.reject(g)}for(d=0,f=u.length;d<f;)c=c.then(u[d++],u[d++]);return c}getUri(t){t=Ba(this.defaults,t);const n=WP(t.baseURL,t.url,t.allowAbsoluteUrls);return UP(n,t.params,t.paramsSerializer)}};ue.forEach(["delete","get","head","options"],function(t){Pa.prototype[t]=function(n,r){return this.request(Ba(r||{},{method:t,url:n,data:(r||{}).data}))}});ue.forEach(["post","put","patch"],function(t){function n(r){return function(i,o,a){return this.request(Ba(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Pa.prototype[t]=n(),Pa.prototype[t+"Form"]=n(!0)});let dB=class JP{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(a=>{r.subscribe(a),i=a}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,a){r.reason||(r.reason=new Ou(i,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new JP(function(s){t=s}),cancel:t}}};function fB(e){return function(n){return e.apply(null,n)}}function hB(e){return ue.isObject(e)&&e.isAxiosError===!0}const Zv={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Zv).forEach(([e,t])=>{Zv[t]=e});function ZP(e){const t=new Pa(e),n=RP(Pa.prototype.request,t);return ue.extend(n,Pa.prototype,t,{allOwnKeys:!0}),ue.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return ZP(Ba(e,s))},n}const hn=ZP(Od);hn.Axios=Pa;hn.CanceledError=Ou;hn.CancelToken=dB;hn.isCancel=jP;hn.VERSION=QP;hn.toFormData=rm;hn.AxiosError=Ze;hn.Cancel=hn.CanceledError;hn.all=function(t){return Promise.all(t)};hn.spread=fB;hn.isAxiosError=hB;hn.mergeConfig=Ba;hn.AxiosHeaders=Pr;hn.formToJSON=e=>HP(ue.isHTMLForm(e)?new FormData(e):e);hn.getAdapter=XP.getAdapter;hn.HttpStatusCode=Zv;hn.default=hn;const{Axios:gae,AxiosError:eR,CanceledError:vae,isCancel:yae,CancelToken:bae,VERSION:_ae,all:wae,Cancel:Sae,isAxiosError:kae,spread:xae,toFormData:Eae,AxiosHeaders:Cae,HttpStatusCode:fa,formToJSON:Tae,getAdapter:Pae,mergeConfig:Rae}=hn;class fc extends Error{}fc.prototype.name="InvalidTokenError";function pB(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,n)=>{let r=n.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}function mB(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return pB(t)}catch{return atob(t)}}function gB(e,t){if(typeof e!="string")throw new fc("Invalid token specified: must be a string");t||(t={});const n=t.header===!0?0:1,r=e.split(".")[n];if(typeof r!="string")throw new fc(`Invalid token specified: missing part #${n+1}`);let s;try{s=mB(r)}catch(i){throw new fc(`Invalid token specified: invalid base64 for part #${n+1} (${i.message})`)}try{return JSON.parse(s)}catch(i){throw new fc(`Invalid token specified: invalid json for part #${n+1} (${i.message})`)}}function vB(e,t={}){const{onError:n,fallbackValue:r=null}=t,s=(a,l)=>{try{return gB(a,l)}catch(u){return n==null||n(u),r}},i=A(()=>s(Bn(e),{header:!0})),o=A(()=>s(Bn(e)));return{header:i,payload:o}}class oa{static async getLoginRequired(){return await(await Qn(!1,!1)).get("/api/auth/login-required")}static async postLogin(t,n){return await(await Qn(!1,!1)).post("/api/auth/login",{username:t,password:n})}static async logout(){return await(await Qn(!0,!1)).post("/api/auth/logout")}static async refreshLogin(t){return await(await Qn(!1,!1)).post("/api/auth/refresh",{refreshToken:t})}static async verifyLogin(){return await(await Qn(!0,!1)).post("/api/auth/verify")}static async registerAccount(t,n){return await(await Qn(!0,!1)).post("/api/auth/register",{username:t,password:n})}}const kr={IncorrectCredentials:"IncorrectCredentials",InvalidOrExpiredRefreshToken:"InvalidOrExpiredRefreshToken",InvalidOrExpiredAuthToken:"InvalidOrExpiredAuthToken",PasswordChangeRequired:"PasswordChangeRequired",LoginRequired:"LoginRequired",AccountNotVerified:"AccountNotVerified"};function l_(e){switch(e){case kr.IncorrectCredentials:return"Incorrect credentials";case kr.InvalidOrExpiredRefreshToken:return"Invalid or expired refresh token";case kr.InvalidOrExpiredAuthToken:return"Invalid or expired auth token";case kr.PasswordChangeRequired:return"Password change required";case kr.LoginRequired:return"Login required";case kr.AccountNotVerified:return"Account not verified";default:return"Authentication error"}}const us=gs("auth",{state:()=>({isDemoMode:null,token:null,refreshToken:null,loginRequired:null,registration:null,wizardState:null,lastLogoutReason:null}),actions:{async checkAuthenticationRequirements(){return await oa.getLoginRequired().then(e=>(this.loginRequired=e.data.loginRequired,this.wizardState=e.data.wizardState,this.registration=e.data.registration,this.isDemoMode=e.data.isDemoMode,{loginRequired:this.loginRequired,wizardState:this.wizardState,registration:this.registration})).catch(e=>{var t;throw console.error("authRequired: failed to check login required",(t=e.response)==null?void 0:t.status),e})},async login(e,t){return this.lastLogoutReason=null,await oa.postLogin(e,t).then(n=>(this.setTokens(n.data.token,n.data.refreshToken),n.data)).catch(n=>{var r;throw console.error("login: failed to login",(r=n.response)==null?void 0:r.status),n})},async logout(e=!1,t){if(console.debug(`Logging out (calling server ${e})`),t&&(this.lastLogoutReason=t),e&&this.tokenClaims&&!this.isLoginExpired)try{await oa.logout()}catch(n){console.error("Server could not process logout, but local logout was successful",n)}this.setIdToken(void 0),this.setRefreshToken(void 0)},async verifyOrRefreshLoginOnceOrLogout(){var e,t;try{return await oa.verifyLogin(),{success:!0}}catch(n){console.error("[AuthStore.verifyOrRefreshLoginOnce]: failed to verify login",n);const r=n;if(!r.response||((e=r.response)==null?void 0:e.status)!==fa.Unauthorized)throw console.error("[AuthStore.verifyOrRefreshLoginOnce]: unknown error",r.status),n;const{reasonCode:s,url:i}=this.extractSpecialReasonCode(n);if(s)return await this.logout(!1,l_(s)),console.error(`[AuthStore] 401 Unauthorized - emitting 'auth:${s}' with reason ${s}`),Vr(`auth:${s}`).emit({url:i,error:r.message,reasonCode:s}),{success:!1,handled:!0};if(!this.hasRefreshToken)return{success:!1,handled:!1};try{await this.refreshLoginToken(),await oa.verifyLogin()}catch(o){const a=o;if(((t=a.response)==null?void 0:t.status)===fa.Unauthorized)return await this.logout(!1),console.error("[AuthStore.verifyOrRefreshLoginOnce]: failed to refresh token",a.status),{success:!1,handled:!1};throw o}return{success:!0,handled:!1}}},extractSpecialReasonCode(e){var n,r,s;const t=(r=(n=e==null?void 0:e.response)==null?void 0:n.data)==null?void 0:r.reasonCode;return t&&console.error("[AuthStore] 401 Unauthorized - Checking received reason code",t),t&&(t===kr.AccountNotVerified||t===kr.PasswordChangeRequired)?{reasonCode:t,url:(s=e==null?void 0:e.config)==null?void 0:s.url}:{reasonCode:null,url:null}},loadTokens(){this.token=localStorage.getItem("token"),this.refreshToken=localStorage.getItem("refreshToken")},async refreshLoginToken(){if(!this.refreshToken)throw new Error("refreshLoginToken: no refresh token");return await oa.refreshLogin(this.refreshToken).then(e=>{var t;return(t=e==null?void 0:e.data)!=null&&t.token&&this.setIdToken(e.data.token),!0}).catch(e=>{var t,n,r;throw((t=e.response)==null?void 0:t.status)==fa.Unauthorized?(this.setTokens(void 0,void 0),console.error("refreshLoginToken: authentication error, failed to refresh tokens",(n=e.response)==null?void 0:n.status)):console.error("refreshLoginToken: unknown error, failed to refresh tokens",(r=e.response)==null?void 0:r.status),e})},setTokens(e,t){this.setIdToken(e),this.setRefreshToken(t)},setIdToken(e){e!=null&&e.length?(localStorage.setItem("token",e),this.token=e):localStorage.removeItem("token")},setRefreshToken(e){e!=null&&e.length?(localStorage.setItem("refreshToken",e),this.refreshToken=e):localStorage.removeItem("refreshToken")}},getters:{hasRefreshToken(){return!!this.refreshToken},isLoginExpired(){const e=this.tokenClaims;return e!=null&&e.exp?e.exp<Date.now()/1e3:!1},hasAuthToken(){return!!this.tokenClaims},tokenClaims(){if(!this.token)return null;const e=vB(this.token,{fallbackValue:null});return e?e.payload.value:null}}}),qe=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ra="9.18.0",ft=globalThis;function tl(){return om(ft),ft}function om(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Ra,t[Ra]=t[Ra]||{}}function am(e,t,n=ft){const r=n.__SENTRY__=n.__SENTRY__||{},s=r[Ra]=r[Ra]||{};return s[e]||(s[e]=t())}const tR=Object.prototype.toString;function u_(e){switch(tR.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return zi(e,Error)}}function Mu(e,t){return tR.call(e)===`[object ${t}]`}function nR(e){return Mu(e,"ErrorEvent")}function Nw(e){return Mu(e,"DOMError")}function yB(e){return Mu(e,"DOMException")}function Di(e){return Mu(e,"String")}function c_(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function d_(e){return e===null||c_(e)||typeof e!="object"&&typeof e!="function"}function Qc(e){return Mu(e,"Object")}function lm(e){return typeof Event<"u"&&zi(e,Event)}function bB(e){return typeof Element<"u"&&zi(e,Element)}function _B(e){return Mu(e,"RegExp")}function um(e){return!!(e!=null&&e.then&&typeof e.then=="function")}function wB(e){return Qc(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function zi(e,t){try{return e instanceof t}catch{return!1}}function rR(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function sR(e){return typeof Request<"u"&&zi(e,Request)}const f_=ft,SB=80;function Hi(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,s=[];let i=0,o=0;const a=" > ",l=a.length;let u;const c=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||SB;for(;n&&i++<r&&(u=kB(n,c),!(u==="html"||i>1&&o+s.length*l+u.length>=d));)s.push(u),o+=u.length,n=n.parentNode;return s.reverse().join(a)}catch{return"<unknown>"}}function kB(e,t){const n=e,r=[];if(!(n!=null&&n.tagName))return"";if(f_.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const s=t!=null&&t.length?t.filter(o=>n.getAttribute(o)).map(o=>[o,n.getAttribute(o)]):null;if(s!=null&&s.length)s.forEach(o=>{r.push(`[${o[0]}="${o[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const o=n.className;if(o&&Di(o)){const a=o.split(/\s+/);for(const l of a)r.push(`.${l}`)}}const i=["aria-label","type","name","title","alt"];for(const o of i){const a=n.getAttribute(o);a&&r.push(`[${o}="${a}"]`)}return r.join("")}function Du(){try{return f_.document.location.href}catch{return""}}function iR(e){if(!f_.HTMLElement)return null;let t=e;const n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}const xB="Sentry Logger ",ey=["debug","info","warn","error","log","assert","trace"],qh={};function pi(e){if(!("console"in ft))return e();const t=ft.console,n={},r=Object.keys(qh);r.forEach(s=>{const i=qh[s];n[s]=t[s],t[s]=i});try{return e()}finally{r.forEach(s=>{t[s]=n[s]})}}function EB(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return qe?ey.forEach(n=>{t[n]=(...r)=>{e&&pi(()=>{ft.console[n](`${xB}[${n}]:`,...r)})}}):ey.forEach(n=>{t[n]=()=>{}}),t}const Pe=am("logger",EB);function Wh(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Vw(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const s=e[r];try{rR(s)?n.push("[VueViewModel]"):n.push(String(s))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function CB(e,t,n=!1){return Di(e)?_B(t)?t.test(e):Di(t)?n?e===t:e.includes(t):!1:!1}function Po(e,t=[],n=!1){return t.some(r=>CB(e,r,n))}function Er(e,t,n){if(!(t in e))return;const r=e[t];if(typeof r!="function")return;const s=n(r);typeof s=="function"&&oR(s,r);try{e[t]=s}catch{qe&&Pe.log(`Failed to replace method "${t}" in object`,e)}}function Wr(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{qe&&Pe.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function oR(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,Wr(e,"__sentry_original__",t)}catch{}}function h_(e){return e.__sentry_original__}function aR(e){if(u_(e))return{message:e.message,name:e.name,stack:e.stack,...Uw(e)};if(lm(e)){const t={type:e.type,target:Bw(e.target),currentTarget:Bw(e.currentTarget),...Uw(e)};return typeof CustomEvent<"u"&&zi(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Bw(e){try{return bB(e)?Hi(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function Uw(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function TB(e,t=40){const n=Object.keys(aR(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return Wh(r,t);for(let s=n.length;s>0;s--){const i=n.slice(0,s).join(", ");if(!(i.length>t))return s===n.length?i:Wh(i,t)}return""}function PB(){const e=ft;return e.crypto||e.msCrypto}function jr(e=PB()){let t=()=>Math.random()*16;try{if(e!=null&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e!=null&&e.getRandomValues&&(t=()=>{const n=new Uint8Array(1);return e.getRandomValues(n),n[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(t()&15)>>n/4).toString(16))}function lR(e){var t,n;return(n=(t=e.exception)==null?void 0:t.values)==null?void 0:n[0]}function ca(e){const{message:t,event_id:n}=e;if(t)return t;const r=lR(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function ty(e,t,n){const r=e.exception=e.exception||{},s=r.values=r.values||[],i=s[0]=s[0]||{};i.value||(i.value=t||""),i.type||(i.type="Error")}function iu(e,t){const n=lR(e);if(!n)return;const r={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism={...r,...s,...t},t&&"data"in t){const i={...s==null?void 0:s.data,...t.data};n.mechanism.data=i}}function zw(e){if(RB(e))return!0;try{Wr(e,"__sentry_captured__",!0)}catch{}return!1}function RB(e){try{return e.__sentry_captured__}catch{}}const uR=1e3;function Md(){return Date.now()/uR}function IB(){const{performance:e}=ft;if(!(e!=null&&e.now))return Md;const t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/uR}const nr=IB();let Sg;function AB(){var c;const{performance:e}=ft;if(!(e!=null&&e.now))return[void 0,"none"];const t=3600*1e3,n=e.now(),r=Date.now(),s=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,i=s<t,o=(c=e.timing)==null?void 0:c.navigationStart,l=typeof o=="number"?Math.abs(o+n-r):t,u=l<t;return i||u?s<=l?[e.timeOrigin,"timeOrigin"]:[o,"navigationStart"]:[r,"dateNow"]}function Yr(){return Sg||(Sg=AB()),Sg[0]}function OB(e){const t=nr(),n={sid:jr(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>DB(n)};return e&&ou(n,e),n}function ou(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||nr(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:jr()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function MB(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),ou(e,n)}function DB(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function Dd(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;const r={...e};for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=Dd(r[s],t[s],n-1));return r}const ny="_sentrySpan";function Jc(e,t){t?Wr(e,ny,t):delete e[ny]}function Gh(e){return e[ny]}function $o(){return jr()}function Ld(){return jr().substring(16)}const LB=100;class li{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:$o(),sampleRand:Math.random()}}clone(){const t=new li;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,Jc(t,Gh(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&ou(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,r=n instanceof li?n.getScopeData():Qc(n)?t:void 0,{tags:s,extra:i,user:o,contexts:a,level:l,fingerprint:u=[],propagationContext:c}=r||{};return this._tags={...this._tags,...s},this._extra={...this._extra,...i},this._contexts={...this._contexts,...a},o&&Object.keys(o).length&&(this._user=o),l&&(this._level=l),u.length&&(this._fingerprint=u),c&&(this._propagationContext=c),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,Jc(this,void 0),this._attachments=[],this.setPropagationContext({traceId:$o(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){var i;const r=typeof n=="number"?n:LB;if(r<=0)return this;const s={timestamp:Md(),...t,message:t.message?Wh(t.message,2048):t.message};return this._breadcrumbs.push(s),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),(i=this._client)==null||i.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Gh(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Dd(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=(n==null?void 0:n.event_id)||jr();if(!this._client)return Pe.warn("No client configured on scope - will not capture exception!"),r;const s=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:s,...n,event_id:r},this),r}captureMessage(t,n,r){const s=(r==null?void 0:r.event_id)||jr();if(!this._client)return Pe.warn("No client configured on scope - will not capture message!"),s;const i=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:s},this),s}captureEvent(t,n){const r=(n==null?void 0:n.event_id)||jr();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(Pe.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function $B(){return am("defaultCurrentScope",()=>new li)}function FB(){return am("defaultIsolationScope",()=>new li)}class NB{constructor(t,n){let r;t?r=t:r=new li;let s;n?s=n:s=new li,this._stack=[{scope:r}],this._isolationScope=s}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(s){throw this._popScope(),s}return um(r)?r.then(s=>(this._popScope(),s),s=>{throw this._popScope(),s}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function au(){const e=tl(),t=om(e);return t.stack=t.stack||new NB($B(),FB())}function VB(e){return au().withScope(e)}function BB(e,t){const n=au();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Hw(e){return au().withScope(()=>e(au().getIsolationScope()))}function UB(){return{withIsolationScope:Hw,withScope:VB,withSetScope:BB,withSetIsolationScope:(e,t)=>Hw(t),getCurrentScope:()=>au().getScope(),getIsolationScope:()=>au().getIsolationScope()}}function Lu(e){const t=om(e);return t.acs?t.acs:UB()}function Vt(){const e=tl();return Lu(e).getCurrentScope()}function mi(){const e=tl();return Lu(e).getIsolationScope()}function zB(){return am("globalScope",()=>new li)}function p_(...e){const t=tl(),n=Lu(t);if(e.length===2){const[r,s]=e;return r?n.withSetScope(r,s):n.withScope(s)}return n.withScope(e[0])}function dt(){return Vt().getClient()}function HB(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:s}=t,i={trace_id:n,span_id:s||Ld()};return r&&(i.parent_span_id=r),i}const zr="sentry.source",m_="sentry.sample_rate",cR="sentry.previous_trace_sample_rate",Ua="sentry.op",on="sentry.origin",ry="sentry.idle_span_finish_reason",cm="sentry.measurement_unit",dm="sentry.measurement_value",jw="sentry.custom_span_name",g_="sentry.profile_id",$d="sentry.exclusive_time",jB="sentry.link.type",qB=0,dR=1,Tn=2;function WB(e){if(e<400&&e>=100)return{code:dR};if(e>=400&&e<500)switch(e){case 401:return{code:Tn,message:"unauthenticated"};case 403:return{code:Tn,message:"permission_denied"};case 404:return{code:Tn,message:"not_found"};case 409:return{code:Tn,message:"already_exists"};case 413:return{code:Tn,message:"failed_precondition"};case 429:return{code:Tn,message:"resource_exhausted"};case 499:return{code:Tn,message:"cancelled"};default:return{code:Tn,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:Tn,message:"unimplemented"};case 503:return{code:Tn,message:"unavailable"};case 504:return{code:Tn,message:"deadline_exceeded"};default:return{code:Tn,message:"internal_error"}}return{code:Tn,message:"unknown_error"}}function fR(e,t){e.setAttribute("http.response.status_code",t);const n=WB(t);n.message!=="unknown_error"&&e.setStatus(n)}const hR="_sentryScope",pR="_sentryIsolationScope";function GB(e,t,n){e&&(Wr(e,pR,n),Wr(e,hR,t))}function Kh(e){return{scope:e[hR],isolationScope:e[pR]}}function za(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}const v_="sentry-",KB=/^sentry-/,YB=8192;function mR(e){const t=QB(e);if(!t)return;const n=Object.entries(t).reduce((r,[s,i])=>{if(s.match(KB)){const o=s.slice(v_.length);r[o]=i}return r},{});if(Object.keys(n).length>0)return n}function XB(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,s])=>(s&&(n[`${v_}${r}`]=s),n),{});return JB(t)}function QB(e){if(!(!e||!Di(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=qw(n);return Object.entries(r).forEach(([s,i])=>{t[s]=i}),t},{}):qw(e)}function qw(e){return e.split(",").map(t=>t.split("=").map(n=>{try{return decodeURIComponent(n.trim())}catch{return}})).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function JB(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],s)=>{const i=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,o=s===0?i:`${t},${i}`;return o.length>YB?(qe&&Pe.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):o},"")}const gR=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function ZB(e){if(!e)return;const t=e.match(gR);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function e3(e,t){const n=ZB(e),r=mR(t);if(!(n!=null&&n.traceId))return{traceId:$o(),sampleRand:Math.random()};const s=t3(n,r);r&&(r.sample_rand=s.toString());const{traceId:i,parentSpanId:o,parentSampled:a}=n;return{traceId:i,parentSpanId:o,sampled:a,dsc:r||{},sampleRand:s}}function vR(e=$o(),t=Ld(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function t3(e,t){const n=za(t==null?void 0:t.sample_rand);if(n!==void 0)return n;const r=za(t==null?void 0:t.sample_rate);return r&&(e==null?void 0:e.parentSampled)!==void 0?e.parentSampled?Math.random()*r:r+Math.random()*(1-r):Math.random()}const yR=0,y_=1;let Ww=!1;function n3(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:s,parent_span_id:i,status:o,origin:a,links:l}=kt(e);return{parent_span_id:i,span_id:t,trace_id:n,data:r,op:s,status:o,origin:a,links:l}}function r3(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),s=r?t:kt(e).parent_span_id,i=Kh(e).scope,o=r?(i==null?void 0:i.getPropagationContext().propagationSpanId)||Ld():t;return{parent_span_id:s,span_id:o,trace_id:n}}function s3(e){const{traceId:t,spanId:n}=e.spanContext(),r=nl(e);return vR(t,n,r)}function bR(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:r,...s},attributes:i})=>({span_id:t,trace_id:n,sampled:r===y_,attributes:i,...s}))}function Ia(e){return typeof e=="number"?Gw(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Gw(e.getTime()):nr()}function Gw(e){return e>9999999999?e/1e3:e}function kt(e){var r;if(o3(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(i3(e)){const{attributes:s,startTime:i,name:o,endTime:a,status:l,links:u}=e,c="parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?(r=e.parentSpanContext)==null?void 0:r.spanId:void 0;return{span_id:t,trace_id:n,data:s,description:o,parent_span_id:c,start_timestamp:Ia(i),timestamp:Ia(a)||void 0,status:_R(l),op:s[Ua],origin:s[on],links:bR(u)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function i3(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function o3(e){return typeof e.getSpanJSON=="function"}function nl(e){const{traceFlags:t}=e.spanContext();return t===y_}function _R(e){if(!(!e||e.code===qB))return e.code===dR?"ok":e.message||"unknown_error"}const Aa="_sentryChildSpans",sy="_sentryRootSpan";function wR(e,t){const n=e[sy]||e;Wr(t,sy,n),e[Aa]?e[Aa].add(t):Wr(e,Aa,new Set([t]))}function a3(e,t){e[Aa]&&e[Aa].delete(t)}function Zf(e){const t=new Set;function n(r){if(!t.has(r)&&nl(r)){t.add(r);const s=r[Aa]?Array.from(r[Aa]):[];for(const i of s)n(i)}}return n(e),Array.from(t)}function zn(e){return e[sy]||e}function qn(){const e=tl(),t=Lu(e);return t.getActiveSpan?t.getActiveSpan():Gh(Vt())}function iy(){Ww||(pi(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),Ww=!0)}const SR=50,Ha="?",Kw=/\(error: (.*)\)/,Yw=/captureMessage|captureException/;function kR(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,s=0)=>{const i=[],o=n.split(`
|
|
31
|
+
`);for(let a=r;a<o.length;a++){const l=o[a];if(l.length>1024)continue;const u=Kw.test(l)?l.replace(Kw,"$1"):l;if(!u.match(/\S*Error: /)){for(const c of t){const d=c(u);if(d){i.push(d);break}}if(i.length>=SR+s)break}}return u3(i.slice(s))}}function l3(e){return Array.isArray(e)?kR(...e):e}function u3(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(of(t).function||"")&&t.pop(),t.reverse(),Yw.test(of(t).function||"")&&(t.pop(),Yw.test(of(t).function||"")&&t.pop()),t.slice(0,SR).map(n=>({...n,filename:n.filename||of(t).filename,function:n.function||Ha}))}function of(e){return e[e.length-1]||{}}const kg="<anonymous>";function ji(e){try{return!e||typeof e!="function"?kg:e.name||kg}catch{return kg}}function Xw(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}const eh={},Qw={};function Wo(e,t){eh[e]=eh[e]||[],eh[e].push(t)}function Go(e,t){if(!Qw[e]){Qw[e]=!0;try{t()}catch(n){qe&&Pe.error(`Error while instrumenting ${e}`,n)}}}function ls(e,t){const n=e&&eh[e];if(n)for(const r of n)try{r(t)}catch(s){qe&&Pe.error(`Error while triggering instrumentation handler.
|
|
32
|
+
Type: ${e}
|
|
33
|
+
Name: ${ji(r)}
|
|
34
|
+
Error:`,s)}}let xg=null;function xR(e){const t="error";Wo(t,e),Go(t,c3)}function c3(){xg=ft.onerror,ft.onerror=function(e,t,n,r,s){return ls("error",{column:r,error:s,line:n,msg:e,url:t}),xg?xg.apply(this,arguments):!1},ft.onerror.__SENTRY_INSTRUMENTED__=!0}let Eg=null;function ER(e){const t="unhandledrejection";Wo(t,e),Go(t,d3)}function d3(){Eg=ft.onunhandledrejection,ft.onunhandledrejection=function(e){return ls("unhandledrejection",e),Eg?Eg.apply(this,arguments):!0},ft.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}let Jw=!1;function f3(){Jw||(Jw=!0,xR(oy),ER(oy))}function oy(){const e=qn(),t=e&&zn(e);if(t){const n="internal_error";qe&&Pe.log(`[Tracing] Root span: ${n} -> Global error occurred`),t.setStatus({code:Tn,message:n})}}oy.tag="sentry_tracingErrorCallback";function qi(e){var n;if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||((n=dt())==null?void 0:n.getOptions());return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}const b_="production",CR="_frozenDsc";function th(e,t){Wr(e,CR,t)}function TR(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},s={environment:n.environment||b_,release:n.release,public_key:r,trace_id:e};return t.emit("createDsc",s),s}function PR(e,t){const n=t.getPropagationContext();return n.dsc||TR(n.traceId,e)}function Wi(e){var g;const t=dt();if(!t)return{};const n=zn(e),r=kt(n),s=r.data,i=n.spanContext().traceState,o=(i==null?void 0:i.get("sentry.sample_rate"))??s[m_]??s[cR];function a(m){return(typeof o=="number"||typeof o=="string")&&(m.sample_rate=`${o}`),m}const l=n[CR];if(l)return a(l);const u=i==null?void 0:i.get("sentry.dsc"),c=u&&mR(u);if(c)return a(c);const d=TR(e.spanContext().traceId,t),f=s[zr],p=r.description;return f!=="url"&&p&&(d.transaction=p),qi()&&(d.sampled=String(nl(n)),d.sample_rand=(i==null?void 0:i.get("sentry.sample_rand"))??((g=Kh(n).scope)==null?void 0:g.getPropagationContext().sampleRand.toString())),a(d),t.emit("createDsc",d,n),d}class ja{constructor(t={}){this._traceId=t.traceId||$o(),this._spanId=t.spanId||Ld()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:yR}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,n,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}}function h3(e){if(!qe)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=kt(e),{spanId:s}=e.spanContext(),i=nl(e),o=zn(e),a=o===e,l=`[Tracing] Starting ${i?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${s}`];if(r&&u.push(`parent ID: ${r}`),!a){const{op:c,description:d}=kt(o);u.push(`root ID: ${o.spanContext().spanId}`),c&&u.push(`root op: ${c}`),d&&u.push(`root description: ${d}`)}Pe.log(`${l}
|
|
35
|
+
${u.join(`
|
|
36
|
+
`)}`)}function p3(e){if(!qe)return;const{description:t="< unknown name >",op:n="< unknown op >"}=kt(e),{spanId:r}=e.spanContext(),i=zn(e)===e,o=`[Tracing] Finishing "${n}" ${i?"root ":""}span "${t}" with ID ${r}`;Pe.log(o)}function m3(e,t,n){if(!qi(e))return[!1];let r,s;typeof e.tracesSampler=="function"?(s=e.tracesSampler({...t,inheritOrSampleWith:a=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):a}),r=!0):t.parentSampled!==void 0?s=t.parentSampled:typeof e.tracesSampleRate<"u"&&(s=e.tracesSampleRate,r=!0);const i=za(s);if(i===void 0)return qe&&Pe.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(s)} of type ${JSON.stringify(typeof s)}.`),[!1];if(!i)return qe&&Pe.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,i,r];const o=n<i;return o||qe&&Pe.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(s)})`),[o,i,r]}const g3=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function v3(e){return e==="http"||e==="https"}function Fd(e,t=!1){const{host:n,path:r,pass:s,port:i,projectId:o,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&s?`:${s}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${o}`}function y3(e){const t=g3.exec(e);if(!t){pi(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,s="",i="",o="",a=""]=t.slice(1);let l="",u=a;const c=u.split("/");if(c.length>1&&(l=c.slice(0,-1).join("/"),u=c.pop()),u){const d=u.match(/^\d+/);d&&(u=d[0])}return RR({host:i,pass:s,path:l,projectId:u,port:o,protocol:n,publicKey:r})}function RR(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function b3(e){if(!qe)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(Pe.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?v3(r)?t&&isNaN(parseInt(t,10))?(Pe.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(Pe.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(Pe.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function _3(e){const t=typeof e=="string"?y3(e):RR(e);if(!(!t||!b3(t)))return t}function xs(e,t=100,n=1/0){try{return ay("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function IR(e,t=3,n=100*1024){const r=xs(e,t);return x3(r)>n?IR(e,t-1,n):r}function ay(e,t,n=1/0,r=1/0,s=E3()){const[i,o]=s;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=w3(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const l=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(l===0)return a.replace("object ","");if(i(t))return"[Circular ~]";const u=t;if(u&&typeof u.toJSON=="function")try{const p=u.toJSON();return ay("",p,l-1,r,s)}catch{}const c=Array.isArray(t)?[]:{};let d=0;const f=aR(t);for(const p in f){if(!Object.prototype.hasOwnProperty.call(f,p))continue;if(d>=r){c[p]="[MaxProperties ~]";break}const g=f[p];c[p]=ay(p,g,l-1,r,s),d++}return o(t),c}function w3(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(rR(t))return"[VueViewModel]";if(wB(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${ji(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=S3(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function S3(e){const t=Object.getPrototypeOf(e);return t!=null&&t.constructor?t.constructor.name:"null prototype"}function k3(e){return~-encodeURI(e).split(/%..|./).length}function x3(e){return k3(JSON.stringify(e))}function E3(){const e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}function n(r){e.delete(r)}return[t,n]}function rl(e,t=[]){return[e,t]}function C3(e,t){const[n,r]=e;return[n,[...r,t]]}function Zw(e,t){const n=e[1];for(const r of n){const s=r[0].type;if(t(r,s))return!0}return!1}function ly(e){const t=om(ft);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function T3(e){const[t,n]=e;let r=JSON.stringify(t);function s(i){typeof r=="string"?r=typeof i=="string"?r+i:[ly(r),i]:r.push(typeof i=="string"?ly(i):i)}for(const i of n){const[o,a]=i;if(s(`
|
|
37
|
+
${JSON.stringify(o)}
|
|
38
|
+
`),typeof a=="string"||a instanceof Uint8Array)s(a);else{let l;try{l=JSON.stringify(a)}catch{l=JSON.stringify(xs(a))}s(l)}}return typeof r=="string"?r:P3(r)}function P3(e){const t=e.reduce((s,i)=>s+i.length,0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function R3(e){return[{type:"span"},e]}function I3(e){const t=typeof e.data=="string"?ly(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const A3={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item"};function eS(e){return A3[e]}function __(e){if(!(e!=null&&e.sdk))return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function AR(e,t,n,r){var i;const s=(i=e.sdkProcessingMetadata)==null?void 0:i.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Fd(r)},...s&&{trace:s}}}function O3(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function M3(e,t,n,r){const s=__(n),i={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:Fd(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return rl(i,[o])}function D3(e,t,n,r){const s=__(n),i=e.type&&e.type!=="replay_event"?e.type:"event";O3(e,n==null?void 0:n.sdk);const o=AR(e,s,r,t);return delete e.sdkProcessingMetadata,rl(o,[[{type:i},e]])}function L3(e,t){function n(c){return!!c.trace_id&&!!c.public_key}const r=Wi(e[0]),s=t==null?void 0:t.getDsn(),i=t==null?void 0:t.getOptions().tunnel,o={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!i&&s&&{dsn:Fd(s)}},a=t==null?void 0:t.getOptions().beforeSendSpan,l=a?c=>{const d=kt(c),f=a(d);return f||(iy(),d)}:kt,u=[];for(const c of e){const d=l(c);d&&u.push(R3(d))}return rl(o,u)}function $3(e,t,n,r=qn()){const s=r&&zn(r);s&&(qe&&Pe.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),s.addEvent(e,{[dm]:t,[cm]:n}))}function tS(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},s=r[cm],i=r[dm];typeof s=="string"&&typeof i=="number"&&(t[n.name]={value:i,unit:s})}),t}const nS=1e3;class w_{constructor(t={}){this._traceId=t.traceId||$o(),this._spanId=t.spanId||Ld(),this._startTime=t.startTimestamp||nr(),this._links=t.links,this._attributes={},this.setAttributes({[on]:"manual",[Ua]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this._links?this._links.push(t):this._links=[t],this}addLinks(t){return this._links?this._links.push(...t):this._links=t,this}recordException(t,n){}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?y_:yR}}setAttribute(t,n){return n===void 0?delete this._attributes[t]:this._attributes[t]=n,this}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._startTime=Ia(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(zr,"custom"),this}end(t){this._endTime||(this._endTime=Ia(t),p3(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[Ua],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:_R(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[on],profile_id:this._attributes[g_],exclusive_time:this._attributes[$d],measurements:tS(this._events),is_segment:this._isStandaloneSpan&&zn(this)===this||void 0,segment_id:this._isStandaloneSpan?zn(this).spanContext().spanId:void 0,links:bR(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){qe&&Pe.log("[Tracing] Adding an event to span:",t);const s=rS(n)?n:r||nr(),i=rS(n)?{}:n||{},o={name:t,time:Ia(s),attributes:i};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=dt();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===zn(this)))return;if(this._isStandaloneSpan){this._sampled?N3(L3([this],t)):(qe&&Pe.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}const r=this._convertSpanToTransaction();r&&(Kh(this).scope||Vt()).captureEvent(r)}_convertSpanToTransaction(){if(!sS(kt(this)))return;this._name||(qe&&Pe.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=Kh(this);if(this._sampled!==!0)return;const s=Zf(this).filter(u=>u!==this&&!F3(u)).map(u=>kt(u)).filter(sS),i=this._attributes[zr];delete this._attributes[jw],s.forEach(u=>{delete u.data[jw]});const o={contexts:{trace:n3(this)},spans:s.length>nS?s.sort((u,c)=>u.start_timestamp-c.start_timestamp).slice(0,nS):s,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:Wi(this)},...i&&{transaction_info:{source:i}}},a=tS(this._events);return a&&Object.keys(a).length&&(qe&&Pe.log("[Measurements] Adding measurements to transaction event",JSON.stringify(a,void 0,2)),o.measurements=a),o}}function rS(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function sS(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function F3(e){return e instanceof w_&&e.isStandaloneSpan()}function N3(e){const t=dt();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}const OR="__SENTRY_SUPPRESS_TRACING__";function qa(e){const t=DR();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=B3(e),{forceTransaction:r,parentSpan:s}=e;return(e.scope?o=>p_(e.scope,o):s!==void 0?o=>MR(s,o):o=>o())(()=>{const o=Vt(),a=z3(o);return e.onlyIfParent&&!a?new ja:V3({parentSpan:a,spanArguments:n,forceTransaction:r,scope:o})})}function MR(e,t){const n=DR();return n.withActiveSpan?n.withActiveSpan(e,t):p_(r=>(Jc(r,e||void 0),t(r)))}function V3({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!qi()){const o=new ja;if(n||!e){const a={sampled:"false",sample_rate:"0",transaction:t.name,...Wi(o)};th(o,a)}return o}const s=mi();let i;if(e&&!n)i=U3(e,r,t),wR(e,i);else if(e){const o=Wi(e),{traceId:a,spanId:l}=e.spanContext(),u=nl(e);i=iS({traceId:a,parentSpanId:l,...t},r,u),th(i,o)}else{const{traceId:o,dsc:a,parentSpanId:l,sampled:u}={...s.getPropagationContext(),...r.getPropagationContext()};i=iS({traceId:o,parentSpanId:l,...t},r,u),a&&th(i,a)}return h3(i),GB(i,r,s),i}function B3(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=Ia(e.startTime),delete r.startTime,r}return n}function DR(){const e=tl();return Lu(e)}function iS(e,t,n){var g;const r=dt(),s=(r==null?void 0:r.getOptions())||{},{name:i=""}=e,o={spanAttributes:{...e.attributes},spanName:i,parentSampled:n};r==null||r.emit("beforeSampling",o,{decision:!1});const a=o.parentSampled??n,l=o.spanAttributes,u=t.getPropagationContext(),[c,d,f]=t.getScopeData().sdkProcessingMetadata[OR]?[!1]:m3(s,{name:i,parentSampled:a,attributes:l,parentSampleRate:za((g=u.dsc)==null?void 0:g.sample_rate)},u.sampleRand),p=new w_({...e,attributes:{[zr]:"custom",[m_]:d!==void 0&&f?d:void 0,...l},sampled:c});return!c&&r&&(qe&&Pe.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate","transaction")),r&&r.emit("spanStart",p),p}function U3(e,t,n){const{spanId:r,traceId:s}=e.spanContext(),i=t.getScopeData().sdkProcessingMetadata[OR]?!1:nl(e),o=i?new w_({...n,parentSpanId:r,traceId:s,sampled:i}):new ja({traceId:s});wR(e,o);const a=dt();return a&&(a.emit("spanStart",o),n.endTimestamp&&a.emit("spanEnd",o)),o}function z3(e){const t=Gh(e);if(!t)return;const n=dt();return(n?n.getOptions():{}).parentSpanIsAlwaysRootSpan?zn(t):t}const nh={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},H3="heartbeatFailed",j3="idleTimeout",q3="finalTimeout",W3="externalFinish";function LR(e,t={}){const n=new Map;let r=!1,s,i=W3,o=!t.disableAutoFinish;const a=[],{idleTimeout:l=nh.idleTimeout,finalTimeout:u=nh.finalTimeout,childSpanTimeout:c=nh.childSpanTimeout,beforeSpanEnd:d}=t,f=dt();if(!f||!qi()){const T=new ja,P={sample_rate:"0",sampled:"false",...Wi(T)};return th(T,P),T}const p=Vt(),g=qn(),m=G3(e);m.end=new Proxy(m.end,{apply(T,P,w){if(d&&d(m),P instanceof ja)return;const[E,...I]=w,O=E||nr(),R=Ia(O),M=Zf(m).filter(Q=>Q!==m);if(!M.length)return S(R),Reflect.apply(T,P,[R,...I]);const D=M.map(Q=>kt(Q).timestamp).filter(Q=>!!Q),F=D.length?Math.max(...D):void 0,U=kt(m).start_timestamp,K=Math.min(U?U+u/1e3:1/0,Math.max(U||-1/0,Math.min(R,F||1/0)));return S(K),Reflect.apply(T,P,[K,...I])}});function y(){s&&(clearTimeout(s),s=void 0)}function _(T){y(),s=setTimeout(()=>{!r&&n.size===0&&o&&(i=j3,m.end(T))},l)}function b(T){s=setTimeout(()=>{!r&&o&&(i=H3,m.end(T))},c)}function x(T){y(),n.set(T,!0);const P=nr();b(P+c/1e3)}function C(T){if(n.has(T)&&n.delete(T),n.size===0){const P=nr();_(P+l/1e3)}}function S(T){r=!0,n.clear(),a.forEach(R=>R()),Jc(p,g);const P=kt(m),{start_timestamp:w}=P;if(!w)return;P.data[ry]||m.setAttribute(ry,i),Pe.log(`[Tracing] Idle span "${P.op}" finished`);const I=Zf(m).filter(R=>R!==m);let O=0;I.forEach(R=>{R.isRecording()&&(R.setStatus({code:Tn,message:"cancelled"}),R.end(T),qe&&Pe.log("[Tracing] Cancelling span since span ended early",JSON.stringify(R,void 0,2)));const M=kt(R),{timestamp:D=0,start_timestamp:F=0}=M,U=F<=T,K=(u+l)/1e3,Q=D-F<=K;if(qe){const H=JSON.stringify(R,void 0,2);U?Q||Pe.log("[Tracing] Discarding span since it finished after idle span final timeout",H):Pe.log("[Tracing] Discarding span since it happened after idle span was finished",H)}(!Q||!U)&&(a3(m,R),O++)}),O>0&&m.setAttribute("sentry.idle_span_discarded_spans",O)}return a.push(f.on("spanStart",T=>{if(r||T===m||kt(T).timestamp)return;Zf(m).includes(T)&&x(T.spanContext().spanId)})),a.push(f.on("spanEnd",T=>{r||C(T.spanContext().spanId)})),a.push(f.on("idleSpanEnableAutoFinish",T=>{T===m&&(o=!0,_(),n.size&&b())})),t.disableAutoFinish||_(),setTimeout(()=>{r||(m.setStatus({code:Tn,message:"deadline_exceeded"}),i=q3,m.end())},u),m}function G3(e){const t=qa(e);return Jc(Vt(),t),qe&&Pe.log("[Tracing] Started span is an idle span"),t}var Ti;(function(e){e[e.PENDING=0]="PENDING";const n=1;e[e.RESOLVED=n]="RESOLVED";const r=2;e[e.REJECTED=r]="REJECTED"})(Ti||(Ti={}));function Gi(e){return new Fo(t=>{t(e)})}function Yh(e){return new Fo((t,n)=>{n(e)})}class Fo{constructor(t){this._state=Ti.PENDING,this._handlers=[],this._runExecutor(t)}then(t,n){return new Fo((r,s)=>{this._handlers.push([!1,i=>{if(!t)r(i);else try{r(t(i))}catch(o){s(o)}},i=>{if(!n)s(i);else try{r(n(i))}catch(o){s(o)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new Fo((n,r)=>{let s,i;return this.then(o=>{i=!1,s=o,t&&t()},o=>{i=!0,s=o,t&&t()}).then(()=>{if(i){r(s);return}n(s)})})}_executeHandlers(){if(this._state===Ti.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Ti.RESOLVED&&n[1](this._value),this._state===Ti.REJECTED&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(i,o)=>{if(this._state===Ti.PENDING){if(um(o)){o.then(r,s);return}this._state=i,this._value=o,this._executeHandlers()}},r=i=>{n(Ti.RESOLVED,i)},s=i=>{n(Ti.REJECTED,i)};try{t(r,s)}catch(i){s(i)}}}function uy(e,t,n,r=0){return new Fo((s,i)=>{const o=e[r];if(t===null||typeof o!="function")s(t);else{const a=o({...t},n);qe&&o.id&&a===null&&Pe.log(`Event processor "${o.id}" dropped event`),um(a)?a.then(l=>uy(e,l,n,r+1).then(s)).then(null,i):uy(e,a,n,r+1).then(s).then(null,i)}})}let af,oS,lf;function K3(e){const t=ft._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return lf&&n.length===oS||(oS=n.length,lf=n.reduce((r,s)=>{af||(af={});const i=af[s];if(i)r[i[0]]=i[1];else{const o=e(s);for(let a=o.length-1;a>=0;a--){const l=o[a],u=l==null?void 0:l.filename,c=t[s];if(u&&c){r[u]=c,af[s]=[u,c];break}}}return r},{})),lf}function Y3(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:i}=t;X3(e,t),r&&Z3(e,r),eU(e,n),Q3(e,s),J3(e,i)}function aS(e,t){const{extra:n,tags:r,user:s,contexts:i,level:o,sdkProcessingMetadata:a,breadcrumbs:l,fingerprint:u,eventProcessors:c,attachments:d,propagationContext:f,transactionName:p,span:g}=t;uf(e,"extra",n),uf(e,"tags",r),uf(e,"user",s),uf(e,"contexts",i),e.sdkProcessingMetadata=Dd(e.sdkProcessingMetadata,a,2),o&&(e.level=o),p&&(e.transactionName=p),g&&(e.span=g),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),c.length&&(e.eventProcessors=[...e.eventProcessors,...c]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...f}}function uf(e,t,n){e[t]=Dd(e[t],n,1)}function X3(e,t){const{extra:n,tags:r,user:s,contexts:i,level:o,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(s).length&&(e.user={...s,...e.user}),Object.keys(i).length&&(e.contexts={...i,...e.contexts}),o&&(e.level=o),a&&e.type!=="transaction"&&(e.transaction=a)}function Q3(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function J3(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Z3(e,t){e.contexts={trace:r3(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Wi(t),...e.sdkProcessingMetadata};const n=zn(t),r=kt(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function eU(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}function $R(e,t,n,r,s,i){const{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=e,l={...t,event_id:t.event_id||n.event_id||jr(),timestamp:t.timestamp||Md()},u=n.integrations||e.integrations.map(y=>y.name);tU(l,e),sU(l,u),s&&s.emit("applyFrameMetadata",t),t.type===void 0&&nU(l,e.stackParser);const c=oU(r,n.captureContext);n.mechanism&&iu(l,n.mechanism);const d=s?s.getEventProcessors():[],f=zB().getScopeData();if(i){const y=i.getScopeData();aS(f,y)}if(c){const y=c.getScopeData();aS(f,y)}const p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),Y3(l,f);const g=[...d,...f.eventProcessors];return uy(g,l,n).then(y=>(y&&rU(y),typeof o=="number"&&o>0?iU(y,o,a):y))}function tU(e,t){const{environment:n,release:r,dist:s,maxValueLength:i=250}=t;e.environment=e.environment||n||b_,!e.release&&r&&(e.release=r),!e.dist&&s&&(e.dist=s);const o=e.request;o!=null&&o.url&&(o.url=Wh(o.url,i))}function nU(e,t){var r,s;const n=K3(t);(s=(r=e.exception)==null?void 0:r.values)==null||s.forEach(i=>{var o,a;(a=(o=i.stacktrace)==null?void 0:o.frames)==null||a.forEach(l=>{l.filename&&(l.debug_id=n[l.filename])})})}function rU(e){var r,s;const t={};if((s=(r=e.exception)==null?void 0:r.values)==null||s.forEach(i=>{var o,a;(a=(o=i.stacktrace)==null?void 0:o.frames)==null||a.forEach(l=>{l.debug_id&&(l.abs_path?t[l.abs_path]=l.debug_id:l.filename&&(t[l.filename]=l.debug_id),delete l.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([i,o])=>{n.push({type:"sourcemap",code_file:i,debug_id:o})})}function sU(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function iU(e,t,n){var s,i;if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:xs(o.data,t,n)}}))},...e.user&&{user:xs(e.user,t,n)},...e.contexts&&{contexts:xs(e.contexts,t,n)},...e.extra&&{extra:xs(e.extra,t,n)}};return(s=e.contexts)!=null&&s.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=xs(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(o=>({...o,...o.data&&{data:xs(o.data,t,n)}}))),(i=e.contexts)!=null&&i.flags&&r.contexts&&(r.contexts.flags=xs(e.contexts.flags,3,n)),r}function oU(e,t){if(!t)return e;const n=e?e.clone():new li;return n.update(t),n}function aU(e){if(e)return lU(e)?{captureContext:e}:cU(e)?{captureContext:e}:e}function lU(e){return e instanceof li||typeof e=="function"}const uU=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function cU(e){return Object.keys(e).some(t=>uU.includes(t))}function ai(e,t){return Vt().captureException(e,aU(t))}function FR(e,t){return Vt().captureEvent(e,t)}function dU(e,t){mi().setContext(e,t)}function fU(){const e=dt();return(e==null?void 0:e.getOptions().enabled)!==!1&&!!(e!=null&&e.getTransport())}function hU(e){mi().addEventProcessor(e)}function lS(e){const t=mi(),n=Vt(),{userAgent:r}=ft.navigator||{},s=OB({user:n.getUser()||t.getUser(),...r&&{userAgent:r},...e}),i=t.getSession();return(i==null?void 0:i.status)==="ok"&&ou(i,{status:"exited"}),NR(),t.setSession(s),s}function NR(){const e=mi(),n=Vt().getSession()||e.getSession();n&&MB(n),VR(),e.setSession()}function VR(){const e=mi(),t=dt(),n=e.getSession();n&&t&&t.captureSession(n)}function uS(e=!1){if(e){NR();return}VR()}const pU="7";function mU(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function gU(e){return`${mU(e)}${e.projectId}/envelope/`}function vU(e,t){const n={sentry_version:pU};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function yU(e,t,n){return t||`${gU(e)}?${vU(e,n)}`}const cS=[];function bU(e){const t={};return e.forEach(n=>{const{name:r}=n,s=t[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function _U(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(s=>{s.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const s=n(t);r=Array.isArray(s)?s:[s]}else r=t;return bU(r)}function wU(e,t){const n={};return t.forEach(r=>{r&&BR(e,r,n)}),n}function dS(e,t){for(const n of t)n!=null&&n.afterAllSetup&&n.afterAllSetup(e)}function BR(e,t,n){if(n[t.name]){qe&&Pe.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,cS.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),cS.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(s,i)=>r(s,i,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),s=Object.assign((i,o)=>r(i,o,e),{id:t.name});e.addEventProcessor(s)}qe&&Pe.log(`Integration installed: ${t.name}`)}function UR(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n!=null&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function SU(e){var l;const{trace_id:t,parent_span_id:n,span_id:r,status:s,origin:i,data:o,op:a}=((l=e.contexts)==null?void 0:l.trace)??{};return{data:o??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:s,timestamp:e.timestamp,trace_id:t??"",origin:i,profile_id:o==null?void 0:o[g_],exclusive_time:o==null?void 0:o[$d],measurements:e.measurements,is_segment:!0}}function kU(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[g_]:e.profile_id},...e.exclusive_time&&{[$d]:e.exclusive_time}}}},measurements:e.measurements}}function xU(e,t,n){const r=[{type:"client_report"},{timestamp:Md(),discarded_events:e}];return rl(t?{dsn:t}:{},[r])}const fS="Not capturing exception because it's already been captured.",hS="Discarded session because of missing or non-string release",zR=Symbol.for("SentryInternalError"),HR=Symbol.for("SentryDoNotSendEventError");function rh(e){return{message:e,[zR]:!0}}function Cg(e){return{message:e,[HR]:!0}}function pS(e){return!!e&&typeof e=="object"&&zR in e}function mS(e){return!!e&&typeof e=="object"&&HR in e}class EU{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=_3(t.dsn):qe&&Pe.warn("No DSN provided, client will not send events."),this._dsn){const n=yU(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,r){const s=jr();if(zw(t))return qe&&Pe.log(fS),s;const i={event_id:s,...n};return this._process(this.eventFromException(t,i).then(o=>this._captureEvent(o,i,r))),i.event_id}captureMessage(t,n,r,s){const i={event_id:jr(),...r},o=c_(t)?t:String(t),a=d_(t)?this.eventFromMessage(o,n,i):this.eventFromException(t,i);return this._process(a.then(l=>this._captureEvent(l,i,s))),i.event_id}captureEvent(t,n,r){const s=jr();if(n!=null&&n.originalException&&zw(n.originalException))return qe&&Pe.log(fS),s;const i={event_id:s,...n},o=t.sdkProcessingMetadata||{},a=o.capturedSpanScope,l=o.capturedSpanIsolationScope;return this._process(this._captureEvent(t,i,a||r,l)),i.event_id}captureSession(t){this.sendSession(t),ou(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(s=>r&&s))):Gi(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.emit("close"),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];BR(this,t,this._integrations),n||dS(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=D3(t,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])r=C3(r,I3(i));const s=this.sendEnvelope(r);s&&s.then(i=>this.emit("afterSendEvent",t,i),null)}sendSession(t){const{release:n,environment:r=b_}=this._options;if("aggregates"in t){const i=t.attrs||{};if(!i.release&&!n){qe&&Pe.warn(hS);return}i.release=i.release||n,i.environment=i.environment||r,t.attrs=i}else{if(!t.release&&!n){qe&&Pe.warn(hS);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const s=M3(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(s)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const s=`${t}:${n}`;qe&&Pe.log(`Recording outcome: "${s}"${r>1?` (${r} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||[];return r.push(n),()=>{const s=r.indexOf(n);s>-1&&r.splice(s,1)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(s=>s(...n))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,n=>(qe&&Pe.error("Error while sending envelope:",n),n)):(qe&&Pe.error("Transport disabled"),Gi({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=wU(this,t),dS(this,t)}_updateSessionFromEvent(t,n){var l;let r=n.level==="fatal",s=!1;const i=(l=n.exception)==null?void 0:l.values;if(i){s=!0;for(const u of i){const c=u.mechanism;if((c==null?void 0:c.handled)===!1){r=!0;break}}}const o=t.status==="ok";(o&&t.errors===0||o&&r)&&(ou(t,{...r&&{status:"crashed"},errors:t.errors||Number(s||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Fo(n=>{let r=0;const s=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=s,t&&r>=t&&(clearInterval(i),n(!1)))},s)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,s){const i=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&(o!=null&&o.length)&&(n.integrations=o),this.emit("preprocessEvent",t,n),t.type||s.setLastEventId(t.event_id||n.event_id),$R(i,t,n,r,this,s).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:HB(r),...a.contexts};const l=PR(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:l,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=Vt(),s=mi()){return qe&&cy(t)&&Pe.log(`Captured error event \`${UR(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,s).then(i=>i.event_id,i=>{qe&&(mS(i)?Pe.log(i.message):pS(i)?Pe.warn(i.message):Pe.warn(i))})}_processEvent(t,n,r,s){const i=this.getOptions(),{sampleRate:o}=i,a=jR(t),l=cy(t),u=t.type||"error",c=`before send for type \`${u}\``,d=typeof o>"u"?void 0:za(o);if(l&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error"),Yh(Cg(`Discarding event because it's not included in the random sample (sampling rate = ${o})`));const f=u==="replay_event"?"replay":u;return this._prepareEvent(t,n,r,s).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",f),Cg("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return p;const m=TU(this,i,p,n);return CU(m,c)}).then(p=>{var y;if(p===null){if(this.recordDroppedEvent("before_send",f),a){const b=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",b)}throw Cg(`${c} returned \`null\`, will not send event.`)}const g=r.getSession()||s.getSession();if(l&&g&&this._updateSessionFromEvent(g,p),a){const _=((y=p.sdkProcessingMetadata)==null?void 0:y.spanCountBeforeProcessing)||0,b=p.spans?p.spans.length:0,x=_-b;x>0&&this.recordDroppedEvent("before_send","span",x)}const m=p.transaction_info;if(a&&m&&p.transaction!==t.transaction){const _="custom";p.transaction_info={...m,source:_}}return this.sendEvent(p,n),p}).then(null,p=>{throw mS(p)||pS(p)?p:(this.captureException(p,{data:{__sentry__:!0},originalException:p}),rh(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
39
|
+
Reason: ${p}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[s,i]=n.split(":");return{reason:s,category:i,quantity:r}})}_flushOutcomes(){qe&&Pe.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){qe&&Pe.log("No outcomes to send");return}if(!this._dsn){qe&&Pe.log("No dsn provided, will not send outcomes");return}qe&&Pe.log("Sending outcomes:",t);const n=xU(t,this._options.tunnel&&Fd(this._dsn));this.sendEnvelope(n)}}function CU(e,t){const n=`${t} must return \`null\` or a valid event.`;if(um(e))return e.then(r=>{if(!Qc(r)&&r!==null)throw rh(n);return r},r=>{throw rh(`${t} rejected with ${r}`)});if(!Qc(e)&&e!==null)throw rh(n);return e}function TU(e,t,n,r){const{beforeSend:s,beforeSendTransaction:i,beforeSendSpan:o}=t;let a=n;if(cy(a)&&s)return s(a,r);if(jR(a)){if(o){const l=o(SU(a));if(l?a=Dd(n,kU(l)):iy(),a.spans){const u=[];for(const c of a.spans){const d=o(c);d?u.push(d):(iy(),u.push(c))}a.spans=u}}if(i){if(a.spans){const l=a.spans.length;a.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:l}}return i(a,r)}}return a}function cy(e){return e.type===void 0}function jR(e){return e.type==="transaction"}function PU(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function RU(e,t,n,r){const s={};return t!=null&&t.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=Fd(r)),rl(s,[PU(e)])}ft._sentryClientToLogBufferMap=new WeakMap;function Tg(e,t){var i;const n=IU(e)??[];if(n.length===0)return;const r=e.getOptions(),s=RU(n,r._metadata,r.tunnel,e.getDsn());(i=ft._sentryClientToLogBufferMap)==null||i.set(e,[]),e.emit("flushLogs"),e.sendEnvelope(s)}function IU(e){var t;return(t=ft._sentryClientToLogBufferMap)==null?void 0:t.get(e)}function AU(e,t){t.debug===!0&&(qe?Pe.enable():pi(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Vt().update(t.initialScope);const r=new e(t);return OU(r),r.init(),r}function OU(e){Vt().setClient(e)}const qR=Symbol.for("SentryBufferFullError");function MU(e){const t=[];function n(){return e===void 0||t.length<e}function r(o){return t.splice(t.indexOf(o),1)[0]||Promise.resolve(void 0)}function s(o){if(!n())return Yh(qR);const a=o();return t.indexOf(a)===-1&&t.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function i(o){return new Fo((a,l)=>{let u=t.length;if(!u)return a(!0);const c=setTimeout(()=>{o&&o>0&&a(!1)},o);t.forEach(d=>{Gi(d).then(()=>{--u||(clearTimeout(c),a(!0))},l)})})}return{$:t,add:s,drain:i}}const DU=60*1e3;function LU(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?DU:r-t}function $U(e,t){return e[t]||e.all||0}function WR(e,t,n=Date.now()){return $U(e,t)>n}function GR(e,{statusCode:t,headers:n},r=Date.now()){const s={...e},i=n==null?void 0:n["x-sentry-rate-limits"],o=n==null?void 0:n["retry-after"];if(i)for(const a of i.trim().split(",")){const[l,u,,,c]=a.split(":",5),d=parseInt(l,10),f=(isNaN(d)?60:d)*1e3;if(!u)s.all=r+f;else for(const p of u.split(";"))p==="metric_bucket"?(!c||c.split(";").includes("custom"))&&(s[p]=r+f):s[p]=r+f}else o?s.all=r+LU(o,r):t===429&&(s.all=r+60*1e3);return s}const FU=64;function NU(e,t,n=MU(e.bufferSize||FU)){let r={};const s=o=>n.drain(o);function i(o){const a=[];if(Zw(o,(d,f)=>{const p=eS(f);WR(r,p)?e.recordDroppedEvent("ratelimit_backoff",p):a.push(d)}),a.length===0)return Gi({});const l=rl(o[0],a),u=d=>{Zw(l,(f,p)=>{e.recordDroppedEvent(d,eS(p))})},c=()=>t({body:T3(l)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&qe&&Pe.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=GR(r,d),d),d=>{throw u("network_error"),qe&&Pe.error("Encountered error running transport request:",d),d});return n.add(c).then(d=>d,d=>{if(d===qR)return qe&&Pe.error("Skipped sending event because buffer is full."),u("queue_overflow"),Gi({});throw d})}return{send:i,flush:s}}function VU(e,t){const n=t==null?void 0:t.getDsn(),r=t==null?void 0:t.getOptions().tunnel;return UU(e,n)||BU(e,r)}function BU(e,t){return t?gS(e)===gS(t):!1}function UU(e,t){return t?e.includes(t.host):!1}function gS(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function zU(e){var t;((t=e.user)==null?void 0:t.ip_address)===void 0&&(e.user={...e.user,ip_address:"{{auto}}"})}function HU(e){var t;"aggregates"in e?((t=e.attrs)==null?void 0:t.ip_address)===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function KR(e,t,n=[t],r="npm"){const s=e._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${t}`,packages:n.map(i=>({name:`${r}:@sentry/${i}`,version:Ra})),version:Ra}),e._metadata=s}function YR(e={}){const t=dt();if(!fU()||!t)return{};const n=tl(),r=Lu(n);if(r.getTraceData)return r.getTraceData(e);const s=Vt(),i=e.span||qn(),o=i?s3(i):jU(s),a=i?Wi(i):PR(t,s),l=XB(a);return gR.test(o)?{"sentry-trace":o,baggage:l}:(Pe.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}function jU(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return vR(t,r,n)}const qU=100;function No(e,t){const n=dt(),r=mi();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:i=qU}=n.getOptions();if(i<=0)return;const a={timestamp:Md(),...e},l=s?pi(()=>s(a,t)):a;l!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",l,t),r.addBreadcrumb(l,i))}let vS;const WU="FunctionToString",yS=new WeakMap,GU=()=>({name:WU,setupOnce(){vS=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=h_(this),n=yS.has(dt())&&t!==void 0?t:this;return vS.apply(n,e)}}catch{}},setup(e){yS.set(e,!0)}}),KU=GU,YU=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],XU="EventFilters",QU=(e={})=>{let t;return{name:XU,setup(n){const r=n.getOptions();t=bS(e,r)},processEvent(n,r,s){if(!t){const i=s.getOptions();t=bS(e,i)}return ZU(n,t)?null:n}}},JU=(e={})=>({...QU(e),name:"InboundFilters"});function bS(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:YU],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function ZU(e,t){if(e.type){if(e.type==="transaction"&&t4(e,t.ignoreTransactions))return qe&&Pe.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
40
|
+
Event: ${ca(e)}`),!0}else{if(e4(e,t.ignoreErrors))return qe&&Pe.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
41
|
+
Event: ${ca(e)}`),!0;if(i4(e))return qe&&Pe.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
42
|
+
Event: ${ca(e)}`),!0;if(n4(e,t.denyUrls))return qe&&Pe.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
43
|
+
Event: ${ca(e)}.
|
|
44
|
+
Url: ${Xh(e)}`),!0;if(!r4(e,t.allowUrls))return qe&&Pe.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
45
|
+
Event: ${ca(e)}.
|
|
46
|
+
Url: ${Xh(e)}`),!0}return!1}function e4(e,t){return t!=null&&t.length?UR(e).some(n=>Po(n,t)):!1}function t4(e,t){if(!(t!=null&&t.length))return!1;const n=e.transaction;return n?Po(n,t):!1}function n4(e,t){if(!(t!=null&&t.length))return!1;const n=Xh(e);return n?Po(n,t):!1}function r4(e,t){if(!(t!=null&&t.length))return!0;const n=Xh(e);return n?Po(n,t):!0}function s4(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function Xh(e){var t,n;try{const r=[...((t=e.exception)==null?void 0:t.values)??[]].reverse().find(i=>{var o,a,l;return((o=i.mechanism)==null?void 0:o.parent_id)===void 0&&((l=(a=i.stacktrace)==null?void 0:a.frames)==null?void 0:l.length)}),s=(n=r==null?void 0:r.stacktrace)==null?void 0:n.frames;return s?s4(s):null}catch{return qe&&Pe.error(`Cannot extract url for event ${ca(e)}`),null}}function i4(e){var t,n;return(n=(t=e.exception)==null?void 0:t.values)!=null&&n.length?!e.message&&!e.exception.values.some(r=>r.stacktrace||r.type&&r.type!=="Error"||r.value):!1}function o4(e,t,n,r,s,i){var a;if(!((a=s.exception)!=null&&a.values)||!i||!zi(i.originalException,Error))return;const o=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;o&&(s.exception.values=dy(e,t,r,i.originalException,n,s.exception.values,o,0))}function dy(e,t,n,r,s,i,o,a){if(i.length>=n+1)return i;let l=[...i];if(zi(r[s],Error)){_S(o,a);const u=e(t,r[s]),c=l.length;wS(u,s,c,a),l=dy(e,t,n,r[s],s,[u,...l],u,c)}return Array.isArray(r.errors)&&r.errors.forEach((u,c)=>{if(zi(u,Error)){_S(o,a);const d=e(t,u),f=l.length;wS(d,`errors[${c}]`,f,a),l=dy(e,t,n,u,s,[d,...l],d,f)}}),l}function _S(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function wS(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function a4(e){const t="console";Wo(t,e),Go(t,l4)}function l4(){"console"in ft&&ey.forEach(function(e){e in ft.console&&Er(ft.console,e,function(t){return qh[e]=t,function(...n){ls("console",{args:n,level:e});const s=qh[e];s==null||s.apply(ft.console,n)}})})}function XR(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const u4="Dedupe",c4=()=>{let e;return{name:u4,processEvent(t){if(t.type)return t;try{if(f4(t,e))return qe&&Pe.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},d4=c4;function f4(e,t){return t?!!(h4(e,t)||p4(e,t)):!1}function h4(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!JR(e,t)||!QR(e,t))}function p4(e,t){const n=SS(t),r=SS(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!JR(e,t)||!QR(e,t))}function QR(e,t){let n=Xw(e),r=Xw(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s<r.length;s++){const i=r[s],o=n[s];if(i.filename!==o.filename||i.lineno!==o.lineno||i.colno!==o.colno||i.function!==o.function)return!1}return!0}function JR(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function SS(e){var t;return((t=e.exception)==null?void 0:t.values)&&e.exception.values[0]}const m4="thismessage:/";function ZR(e){return"isRelative"in e}function g4(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=n?m4:void 0;try{if("canParse"in URL&&!URL.canParse(e,r))return;const s=new URL(e,r);return n?{isRelative:n,pathname:s.pathname,search:s.search,hash:s.hash}:s}catch{}}function v4(e){if(ZR(e))return e.pathname;const t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function Oa(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function y4(e){return e.split(/[?#]/,1)[0]}function b4(e,t,n,r,s="auto.http.browser"){if(!e.fetchData)return;const{method:i,url:o}=e.fetchData,a=qi()&&t(o);if(e.endTimestamp&&a){const d=e.fetchData.__span;if(!d)return;const f=r[d];f&&(w4(f,e),delete r[d]);return}const l=!!qn(),u=a&&l?qa(k4(o,i,s)):new ja;if(e.fetchData.__span=u.spanContext().spanId,r[u.spanContext().spanId]=u,n(e.fetchData.url)){const d=e.args[0],f=e.args[1]||{},p=_4(d,f,qi()&&l?u:void 0);p&&(e.args[1]=f,f.headers=p)}const c=dt();if(c){const d={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};c.emit("beforeOutgoingRequestSpan",u,d)}return u}function _4(e,t,n){const r=YR({span:n}),s=r["sentry-trace"],i=r.baggage;if(!s)return;const o=t.headers||(sR(e)?e.headers:void 0);if(o)if(S4(o)){const a=new Headers(o);if(a.get("sentry-trace")||a.set("sentry-trace",s),i){const l=a.get("baggage");l?cf(l)||a.set("baggage",`${l},${i}`):a.set("baggage",i)}return a}else if(Array.isArray(o)){const a=[...o];o.find(u=>u[0]==="sentry-trace")||a.push(["sentry-trace",s]);const l=o.find(u=>u[0]==="baggage"&&cf(u[1]));return i&&!l&&a.push(["baggage",i]),a}else{const a="sentry-trace"in o?o["sentry-trace"]:void 0,l="baggage"in o?o.baggage:void 0,u=l?Array.isArray(l)?[...l]:[l]:[],c=l&&(Array.isArray(l)?l.find(d=>cf(d)):cf(l));return i&&!c&&u.push(i),{...o,"sentry-trace":a??s,baggage:u.length>0?u.join(","):void 0}}else return{...r}}function w4(e,t){var n;if(t.response){fR(e,t.response.status);const r=((n=t.response)==null?void 0:n.headers)&&t.response.headers.get("content-length");if(r){const s=parseInt(r);s>0&&e.setAttribute("http.response_content_length",s)}}else t.error&&e.setStatus({code:Tn,message:"internal_error"});e.end()}function cf(e){return e.split(",").some(t=>t.trim().startsWith(v_))}function S4(e){return typeof Headers<"u"&&zi(e,Headers)}function k4(e,t,n){const r=g4(e);return{name:r?`${t} ${v4(r)}`:t,attributes:x4(e,r,t,n)}}function x4(e,t,n,r){const s={url:e,type:"fetch","http.method":n,[on]:r,[Ua]:"http.client"};return t&&(ZR(t)||(s["http.url"]=t.href,s["server.address"]=t.host),t.search&&(s["http.query"]=t.search),t.hash&&(s["http.fragment"]=t.hash)),s}function eI(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const Zc=ft;function E4(){return"history"in Zc&&!!Zc.history}function tI(){if(!("fetch"in Zc))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function fy(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function C4(){var n;if(typeof EdgeRuntime=="string")return!0;if(!tI())return!1;if(fy(Zc.fetch))return!0;let e=!1;const t=Zc.document;if(t&&typeof t.createElement=="function")try{const r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r),(n=r.contentWindow)!=null&&n.fetch&&(e=fy(r.contentWindow.fetch)),t.head.removeChild(r)}catch(r){qe&&Pe.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}function nI(e,t){const n="fetch";Wo(n,e),Go(n,()=>rI(void 0,t))}function T4(e){const t="fetch-body-resolved";Wo(t,e),Go(t,()=>rI(R4))}function rI(e,t=!1){t&&!C4()||Er(ft,"fetch",function(n){return function(...r){const s=new Error,{method:i,url:o}=I4(r),a={args:r,fetchData:{method:i,url:o},startTimestamp:nr()*1e3,virtualError:s,headers:A4(r)};return e||ls("fetch",{...a}),n.apply(ft,r).then(async l=>(e?e(l):ls("fetch",{...a,endTimestamp:nr()*1e3,response:l}),l),l=>{if(ls("fetch",{...a,endTimestamp:nr()*1e3,error:l}),u_(l)&&l.stack===void 0&&(l.stack=s.stack,Wr(l,"framesToPop",1)),l instanceof TypeError&&(l.message==="Failed to fetch"||l.message==="Load failed"||l.message==="NetworkError when attempting to fetch resource."))try{const u=new URL(a.fetchData.url);l.message=`${l.message} (${u.host})`}catch{}throw l})}})}async function P4(e,t){if(e!=null&&e.body){const n=e.body,r=n.getReader(),s=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let i=!0;for(;i;){let o;try{o=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:a}=await r.read();clearTimeout(o),a&&(t(),i=!1)}catch{i=!1}finally{clearTimeout(o)}}clearTimeout(s),r.releaseLock(),n.cancel().then(null,()=>{})}}function R4(e){let t;try{t=e.clone()}catch{return}P4(t,()=>{ls("fetch-body-resolved",{endTimestamp:nr()*1e3,response:e})})}function hy(e,t){return!!e&&typeof e=="object"&&!!e[t]}function kS(e){return typeof e=="string"?e:e?hy(e,"url")?e.url:e.toString?e.toString():"":""}function I4(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:kS(n),method:hy(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:kS(t),method:hy(t,"method")?String(t.method).toUpperCase():"GET"}}function A4(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(sR(t))return new Headers(t.headers)}catch{}}function O4(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function M4(){return"npm"}function D4(){return!O4()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function xS(){return typeof window<"u"&&(!D4()||L4())}function L4(){const e=ft.process;return(e==null?void 0:e.type)==="renderer"}const wt=ft;let py=0;function sI(){return py>0}function $4(){py++,setTimeout(()=>{py--})}function lu(e,t={}){function n(s){return typeof s=="function"}if(!n(e))return e;try{const s=e.__sentry_wrapped__;if(s)return typeof s=="function"?s:e;if(h_(e))return e}catch{return e}const r=function(...s){try{const i=s.map(o=>lu(o,t));return e.apply(this,i)}catch(i){throw $4(),p_(o=>{o.addEventProcessor(a=>(t.mechanism&&(ty(a,void 0),iu(a,t.mechanism)),a.extra={...a.extra,arguments:s},a)),ai(i)}),i}};try{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}oR(r,e),Wr(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function S_(e,t){const n=k_(e,t),r={type:U4(t),value:z4(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function F4(e,t,n,r){const s=dt(),i=s==null?void 0:s.getOptions().normalizeDepth,o=G4(t),a={__serialized__:IR(t,i)};if(o)return{exception:{values:[S_(e,o)]},extra:a};const l={exception:{values:[{type:lm(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:q4(t,{isUnhandledRejection:r})}]},extra:a};if(n){const u=k_(e,n);u.length&&(l.exception.values[0].stacktrace={frames:u})}return l}function Pg(e,t){return{exception:{values:[S_(e,t)]}}}function k_(e,t){const n=t.stacktrace||t.stack||"",r=V4(t),s=B4(t);try{return e(n,r,s)}catch{}return[]}const N4=/Minified React error #\d+;/i;function V4(e){return e&&N4.test(e.message)?1:0}function B4(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function iI(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function U4(e){const t=e==null?void 0:e.name;return!t&&iI(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function z4(e){const t=e==null?void 0:e.message;return iI(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function H4(e,t,n,r){const s=(n==null?void 0:n.syntheticException)||void 0,i=x_(e,t,s,r);return iu(i),i.level="error",n!=null&&n.event_id&&(i.event_id=n.event_id),Gi(i)}function j4(e,t,n="info",r,s){const i=(r==null?void 0:r.syntheticException)||void 0,o=my(e,t,i,s);return o.level=n,r!=null&&r.event_id&&(o.event_id=r.event_id),Gi(o)}function x_(e,t,n,r,s){let i;if(nR(t)&&t.error)return Pg(e,t.error);if(Nw(t)||yB(t)){const o=t;if("stack"in t)i=Pg(e,t);else{const a=o.name||(Nw(o)?"DOMError":"DOMException"),l=o.message?`${a}: ${o.message}`:a;i=my(e,l,n,r),ty(i,l)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return u_(t)?Pg(e,t):Qc(t)||lm(t)?(i=F4(e,t,n,s),iu(i,{synthetic:!0}),i):(i=my(e,t,n,r),ty(i,`${t}`),iu(i,{synthetic:!0}),i)}function my(e,t,n,r){const s={};if(r&&n){const i=k_(e,n);i.length&&(s.exception={values:[{value:t,stacktrace:{frames:i}}]}),iu(s,{synthetic:!0})}if(c_(t)){const{__sentry_template_string__:i,__sentry_template_values__:o}=t;return s.logentry={message:i,params:o},s}return s.message=t,s}function q4(e,{isUnhandledRejection:t}){const n=TB(e),r=t?"promise rejection":"exception";return nR(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:lm(e)?`Event \`${W4(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function W4(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function G4(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}const K4=5e3;class Y4 extends EU{constructor(t){const n={parentSpanIsAlwaysRootSpan:!0,...t},r=wt.SENTRY_SDK_SOURCE||M4();KR(n,"browser",["browser"],r),super(n);const s=this,{sendDefaultPii:i,_experiments:o}=s._options,a=o==null?void 0:o.enableLogs;n.sendClientReports&&wt.document&&wt.document.addEventListener("visibilitychange",()=>{wt.document.visibilityState==="hidden"&&(this._flushOutcomes(),a&&Tg(s))}),a&&(s.on("flush",()=>{Tg(s)}),s.on("afterCaptureLog",()=>{s._logFlushIdleTimeout&&clearTimeout(s._logFlushIdleTimeout),s._logFlushIdleTimeout=setTimeout(()=>{Tg(s)},K4)})),i&&(s.on("postprocessEvent",zU),s.on("beforeSendSession",HU))}eventFromException(t,n){return H4(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return j4(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,s){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,s)}}const ed=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,X4=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",$u=(e,t,n,r)=>{let s,i;return o=>{t.value>=0&&(o||r)&&(i=t.value-(s||0),(i||s===void 0)&&(s=t.value,t.delta=i,t.rating=X4(t.value,n),e(t)))}},lt=ft,Q4=()=>`v4-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,Nd=(e=!0)=>{var n,r;const t=(r=(n=lt.performance)==null?void 0:n.getEntriesByType)==null?void 0:r.call(n,"navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Vd=()=>{const e=Nd();return(e==null?void 0:e.activationStart)||0},Fu=(e,t)=>{var i,o;const n=Nd();let r="navigate";return n&&((i=lt.document)!=null&&i.prerendering||Vd()>0?r="prerender":(o=lt.document)!=null&&o.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:Q4(),navigationType:r}},sl=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(s=>{Promise.resolve().then(()=>{t(s.getEntries())})});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},Nu=e=>{const t=n=>{var r;(n.type==="pagehide"||((r=lt.document)==null?void 0:r.visibilityState)==="hidden")&&e(n)};lt.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},fm=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let Cc=-1;const J4=()=>lt.document.visibilityState==="hidden"&&!lt.document.prerendering?0:1/0,Qh=e=>{lt.document.visibilityState==="hidden"&&Cc>-1&&(Cc=e.type==="visibilitychange"?e.timeStamp:0,e5())},Z4=()=>{addEventListener("visibilitychange",Qh,!0),addEventListener("prerenderingchange",Qh,!0)},e5=()=>{removeEventListener("visibilitychange",Qh,!0),removeEventListener("prerenderingchange",Qh,!0)},hm=()=>(lt.document&&Cc<0&&(Cc=J4(),Z4()),{get firstHiddenTime(){return Cc}}),Bd=e=>{var t;(t=lt.document)!=null&&t.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},t5=[1800,3e3],n5=(e,t={})=>{Bd(()=>{const n=hm(),r=Fu("FCP");let s;const o=sl("paint",a=>{a.forEach(l=>{l.name==="first-contentful-paint"&&(o.disconnect(),l.startTime<n.firstHiddenTime&&(r.value=Math.max(l.startTime-Vd(),0),r.entries.push(l),s(!0)))})});o&&(s=$u(e,r,t5,t.reportAllChanges))})},r5=[.1,.25],s5=(e,t={})=>{n5(fm(()=>{const n=Fu("CLS",0);let r,s=0,i=[];const o=l=>{l.forEach(u=>{if(!u.hadRecentInput){const c=i[0],d=i[i.length-1];s&&c&&d&&u.startTime-d.startTime<1e3&&u.startTime-c.startTime<5e3?(s+=u.value,i.push(u)):(s=u.value,i=[u])}}),s>n.value&&(n.value=s,n.entries=i,r())},a=sl("layout-shift",o);a&&(r=$u(e,n,r5,t.reportAllChanges),Nu(()=>{o(a.takeRecords()),r(!0)}),setTimeout(r,0))}))},i5=[100,300],o5=(e,t={})=>{Bd(()=>{const n=hm(),r=Fu("FID");let s;const i=l=>{l.startTime<n.firstHiddenTime&&(r.value=l.processingStart-l.startTime,r.entries.push(l),s(!0))},o=l=>{l.forEach(i)},a=sl("first-input",o);s=$u(e,r,i5,t.reportAllChanges),a&&Nu(fm(()=>{o(a.takeRecords()),a.disconnect()}))})};let oI=0,Rg=1/0,df=0;const a5=e=>{e.forEach(t=>{t.interactionId&&(Rg=Math.min(Rg,t.interactionId),df=Math.max(df,t.interactionId),oI=df?(df-Rg)/7+1:0)})};let gy;const l5=()=>gy?oI:performance.interactionCount||0,u5=()=>{"interactionCount"in performance||gy||(gy=sl("event",a5,{type:"event",buffered:!0,durationThreshold:0}))},Pi=[],Ig=new Map,c5=40;let d5=0;const f5=()=>l5()-d5,h5=()=>{const e=Math.min(Pi.length-1,Math.floor(f5()/50));return Pi[e]},Ag=10,p5=[],m5=e=>{var r;if(p5.forEach(s=>s(e)),!(e.interactionId||e.entryType==="first-input"))return;const t=Pi[Pi.length-1],n=Ig.get(e.interactionId);if(n||Pi.length<Ag||t&&e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===((r=n.entries[0])==null?void 0:r.startTime)&&n.entries.push(e);else{const s={id:e.interactionId,latency:e.duration,entries:[e]};Ig.set(s.id,s),Pi.push(s)}Pi.sort((s,i)=>i.latency-s.latency),Pi.length>Ag&&Pi.splice(Ag).forEach(s=>Ig.delete(s.id))}},aI=e=>{var r;const t=lt.requestIdleCallback||lt.setTimeout;let n=-1;return e=fm(e),((r=lt.document)==null?void 0:r.visibilityState)==="hidden"?e():(n=t(e),Nu(e)),n},g5=[200,500],v5=(e,t={})=>{"PerformanceEventTiming"in lt&&"interactionId"in PerformanceEventTiming.prototype&&Bd(()=>{u5();const n=Fu("INP");let r;const s=o=>{aI(()=>{o.forEach(m5);const a=h5();a&&a.latency!==n.value&&(n.value=a.latency,n.entries=a.entries,r())})},i=sl("event",s,{durationThreshold:t.durationThreshold!=null?t.durationThreshold:c5});r=$u(e,n,g5,t.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),Nu(()=>{s(i.takeRecords()),r(!0)}))})},y5=[2500,4e3],ES={},b5=(e,t={})=>{Bd(()=>{const n=hm(),r=Fu("LCP");let s;const i=a=>{t.reportAllChanges||(a=a.slice(-1)),a.forEach(l=>{l.startTime<n.firstHiddenTime&&(r.value=Math.max(l.startTime-Vd(),0),r.entries=[l],s())})},o=sl("largest-contentful-paint",i);if(o){s=$u(e,r,y5,t.reportAllChanges);const a=fm(()=>{ES[r.id]||(i(o.takeRecords()),o.disconnect(),ES[r.id]=!0,s(!0))});["keydown","click"].forEach(l=>{lt.document&&addEventListener(l,()=>aI(a),{once:!0,capture:!0})}),Nu(a)}})},_5=[800,1800],vy=e=>{var t,n;(t=lt.document)!=null&&t.prerendering?Bd(()=>vy(e)):((n=lt.document)==null?void 0:n.readyState)!=="complete"?addEventListener("load",()=>vy(e),!0):setTimeout(e,0)},w5=(e,t={})=>{const n=Fu("TTFB"),r=$u(e,n,_5,t.reportAllChanges);vy(()=>{const s=Nd();s&&(n.value=Math.max(s.responseStart-Vd(),0),n.entries=[s],r(!0))})},Tc={},Jh={};let lI,uI,cI,dI,fI;function E_(e,t=!1){return Ud("cls",e,k5,lI,t)}function hI(e,t=!1){return Ud("lcp",e,E5,cI,t)}function pI(e){return Ud("fid",e,x5,uI)}function S5(e){return Ud("ttfb",e,C5,dI)}function mI(e){return Ud("inp",e,T5,fI)}function uu(e,t){return gI(e,t),Jh[e]||(P5(e),Jh[e]=!0),vI(e,t)}function Vu(e,t){const n=Tc[e];if(n!=null&&n.length)for(const r of n)try{r(t)}catch(s){ed&&Pe.error(`Error while triggering instrumentation handler.
|
|
47
|
+
Type: ${e}
|
|
48
|
+
Name: ${ji(r)}
|
|
49
|
+
Error:`,s)}}function k5(){return s5(e=>{Vu("cls",{metric:e}),lI=e},{reportAllChanges:!0})}function x5(){return o5(e=>{Vu("fid",{metric:e}),uI=e})}function E5(){return b5(e=>{Vu("lcp",{metric:e}),cI=e},{reportAllChanges:!0})}function C5(){return w5(e=>{Vu("ttfb",{metric:e}),dI=e})}function T5(){return v5(e=>{Vu("inp",{metric:e}),fI=e})}function Ud(e,t,n,r,s=!1){gI(e,t);let i;return Jh[e]||(i=n(),Jh[e]=!0),r&&t({metric:r}),vI(e,t,s?i:void 0)}function P5(e){const t={};e==="event"&&(t.durationThreshold=0),sl(e,n=>{Vu(e,{entries:n})},t)}function gI(e,t){Tc[e]=Tc[e]||[],Tc[e].push(t)}function vI(e,t,n){return()=>{n&&n();const r=Tc[e];if(!r)return;const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}function R5(e){return"duration"in e}function Og(e){return typeof e=="number"&&isFinite(e)}function Ki(e,t,n,{...r}){const s=kt(e).start_timestamp;return s&&s>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),MR(e,()=>{const i=qa({startTime:t,...r});return i&&i.end(n),i})}function yI(e){var y;const t=dt();if(!t)return;const{name:n,transaction:r,attributes:s,startTime:i}=e,{release:o,environment:a,sendDefaultPii:l}=t.getOptions(),u=t.getIntegrationByName("Replay"),c=u==null?void 0:u.getReplayId(),d=Vt(),f=d.getUser(),p=f!==void 0?f.email||f.id||f.ip_address:void 0;let g;try{g=d.getScopeData().contexts.profile.profile_id}catch{}const m={release:o,environment:a,user:p||void 0,profile_id:g||void 0,replay_id:c||void 0,transaction:r,"user_agent.original":(y=lt.navigator)==null?void 0:y.userAgent,"client.address":l?"{{auto}}":void 0,...s};return qa({name:n,attributes:m,startTime:i,experimental:{standalone:!0}})}function C_(){return lt.addEventListener&<.performance}function pn(e){return e/1e3}function bI(e){let t="unknown",n="unknown",r="";for(const s of e){if(s==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(s))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=s}return r===e&&(t=r),{name:t,version:n}}function I5(){let e=0,t,n;if(!O5())return;let r=!1;function s(){r||(r=!0,n&&A5(e,t,n),i())}const i=E_(({metric:o})=>{const a=o.entries[o.entries.length-1];a&&(e=o.value,t=a)},!0);Nu(()=>{s()}),setTimeout(()=>{const o=dt();if(!o)return;const a=o.on("startNavigationSpan",()=>{s(),a==null||a()}),l=qn();if(l){const u=zn(l);kt(u).op==="pageload"&&(n=u.spanContext().spanId)}},0)}function A5(e,t,n){var l;ed&&Pe.log(`Sending CLS span (${e})`);const r=pn((Yr()||0)+((t==null?void 0:t.startTime)||0)),s=Vt().getScopeData().transactionName,i=t?Hi((l=t.sources[0])==null?void 0:l.node):"Layout shift",o={[on]:"auto.http.browser.cls",[Ua]:"ui.webvital.cls",[$d]:(t==null?void 0:t.duration)||0,"sentry.pageload.span_id":n},a=yI({name:i,transaction:s,attributes:o,startTime:r});a&&(a.addEvent("cls",{[cm]:"",[dm]:e}),a.end(r))}function O5(){try{return PerformanceObserver.supportedEntryTypes.includes("layout-shift")}catch{return!1}}const M5=2147483647;let CS=0,Ln={},br,Tl;function D5({recordClsStandaloneSpans:e}){const t=C_();if(t&&Yr()){t.mark&<.performance.mark("sentry-tracing-init");const n=B5(),r=V5(),s=U5(),i=e?I5():N5();return()=>{n(),r(),s(),i==null||i()}}return()=>{}}function L5(){uu("longtask",({entries:e})=>{const t=qn();if(!t)return;const{op:n,start_timestamp:r}=kt(t);for(const s of e){const i=pn(Yr()+s.startTime),o=pn(s.duration);n==="navigation"&&r&&i<r||Ki(t,i,i+o,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[on]:"auto.ui.browser.metrics"}})}})}function $5(){new PerformanceObserver(t=>{const n=qn();if(n)for(const r of t.getEntries()){if(!r.scripts[0])continue;const s=pn(Yr()+r.startTime),{start_timestamp:i,op:o}=kt(n);if(o==="navigation"&&i&&s<i)continue;const a=pn(r.duration),l={[on]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:c,invokerType:d,sourceURL:f,sourceFunctionName:p,sourceCharPosition:g}=u;l["browser.script.invoker"]=c,l["browser.script.invoker_type"]=d,f&&(l["code.filepath"]=f),p&&(l["code.function"]=p),g!==-1&&(l["browser.script.source_char_position"]=g),Ki(n,s,s+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:l})}}).observe({type:"long-animation-frame",buffered:!0})}function F5(){uu("event",({entries:e})=>{const t=qn();if(t){for(const n of e)if(n.name==="click"){const r=pn(Yr()+n.startTime),s=pn(n.duration),i={name:Hi(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[on]:"auto.ui.browser.metrics"}},o=iR(n.target);o&&(i.attributes["ui.component_name"]=o),Ki(t,r,r+s,i)}}})}function N5(){return E_(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Ln.cls={value:e.value,unit:""},Tl=t)},!0)}function V5(){return hI(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Ln.lcp={value:e.value,unit:"millisecond"},br=t)},!0)}function B5(){return pI(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=pn(Yr()),r=pn(t.startTime);Ln.fid={value:e.value,unit:"millisecond"},Ln["mark.fid"]={value:n+r,unit:"second"}})}function U5(){return S5(({metric:e})=>{e.entries[e.entries.length-1]&&(Ln.ttfb={value:e.value,unit:"millisecond"})})}function z5(e,t){const n=C_(),r=Yr();if(!(n!=null&&n.getEntries)||!r)return;const s=pn(r),i=n.getEntries(),{op:o,start_timestamp:a}=kt(e);if(i.slice(CS).forEach(l=>{const u=pn(l.startTime),c=pn(Math.max(0,l.duration));if(!(o==="navigation"&&a&&s+u<a))switch(l.entryType){case"navigation":{j5(e,l,s);break}case"mark":case"paint":case"measure":{H5(e,l,u,c,s);const d=hm(),f=l.startTime<d.firstHiddenTime;l.name==="first-paint"&&f&&(Ln.fp={value:l.startTime,unit:"millisecond"}),l.name==="first-contentful-paint"&&f&&(Ln.fcp={value:l.startTime,unit:"millisecond"});break}case"resource":{G5(e,l,l.name,u,c,s);break}}}),CS=Math.max(i.length-1,0),K5(e),o==="pageload"){X5(Ln);const l=Ln["mark.fid"];l&&Ln.fid&&(Ki(e,l.value,l.value+pn(Ln.fid.value),{name:"first input delay",op:"ui.action",attributes:{[on]:"auto.ui.browser.metrics"}}),delete Ln["mark.fid"]),(!("fcp"in Ln)||!t.recordClsOnPageloadSpan)&&delete Ln.cls,Object.entries(Ln).forEach(([u,c])=>{$3(u,c.value,c.unit)}),e.setAttribute("performance.timeOrigin",s),e.setAttribute("performance.activationStart",Vd()),Y5(e)}br=void 0,Tl=void 0,Ln={}}function H5(e,t,n,r,s){const i=Nd(!1),o=pn(i?i.requestStart:0),a=s+Math.max(n,o),l=s+n,u=l+r,c={[on]:"auto.resource.browser.metrics"};a!==l&&(c["sentry.browser.measure_happened_before_request"]=!0,c["sentry.browser.measure_start_time"]=a),a<=u&&Ki(e,a,u,{name:t.name,op:t.entryType,attributes:c})}function j5(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{ff(e,t,r,n)}),ff(e,t,"secureConnection",n,"TLS/SSL"),ff(e,t,"fetch",n,"cache"),ff(e,t,"domainLookup",n,"DNS"),W5(e,t,n)}function ff(e,t,n,r,s=n){const i=q5(n),o=t[i],a=t[`${n}Start`];!a||!o||Ki(e,r+pn(a),r+pn(o),{op:`browser.${s}`,name:t.name,attributes:{[on]:"auto.ui.browser.metrics",...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function q5(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function W5(e,t,n){const r=n+pn(t.requestStart),s=n+pn(t.responseEnd),i=n+pn(t.responseStart);t.responseEnd&&(Ki(e,r,s,{op:"browser.request",name:t.name,attributes:{[on]:"auto.ui.browser.metrics"}}),Ki(e,i,s,{op:"browser.response",name:t.name,attributes:{[on]:"auto.ui.browser.metrics"}}))}function G5(e,t,n,r,s,i){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const o=Oa(n),a={[on]:"auto.resource.browser.metrics"};Mg(a,t,"transferSize","http.response_transfer_size"),Mg(a,t,"encodedBodySize","http.response_content_length"),Mg(a,t,"decodedBodySize","http.decoded_response_content_length");const l=t.deliveryType;l!=null&&(a["http.response_delivery_type"]=l);const u=t.renderBlockingStatus;u&&(a["resource.render_blocking_status"]=u),o.protocol&&(a["url.scheme"]=o.protocol.split(":").pop()),o.host&&(a["server.address"]=o.host),a["url.same_origin"]=n.includes(lt.location.origin);const{name:c,version:d}=bI(t.nextHopProtocol);a["network.protocol.name"]=c,a["network.protocol.version"]=d;const f=i+r,p=f+s;Ki(e,f,p,{name:n.replace(lt.location.origin,""),op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",attributes:a})}function K5(e){const t=lt.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),Og(n.rtt)&&(Ln["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Og(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),Og(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function Y5(e){br&&(br.element&&e.setAttribute("lcp.element",Hi(br.element)),br.id&&e.setAttribute("lcp.id",br.id),br.url&&e.setAttribute("lcp.url",br.url.trim().slice(0,200)),br.loadTime!=null&&e.setAttribute("lcp.loadTime",br.loadTime),br.renderTime!=null&&e.setAttribute("lcp.renderTime",br.renderTime),e.setAttribute("lcp.size",br.size)),Tl!=null&&Tl.sources&&Tl.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,Hi(t.node)))}function Mg(e,t,n,r){const s=t[n];s!=null&&s<M5&&(e[r]=s)}function X5(e){const t=Nd(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}const Q5=1e3;let TS,yy,by;function _I(e){const t="dom";Wo(t,e),Go(t,J5)}function J5(){if(!lt.document)return;const e=ls.bind(null,"dom"),t=PS(e,!0);lt.document.addEventListener("click",t,!1),lt.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{var i,o;const s=(i=lt[n])==null?void 0:i.prototype;(o=s==null?void 0:s.hasOwnProperty)!=null&&o.call(s,"addEventListener")&&(Er(s,"addEventListener",function(a){return function(l,u,c){if(l==="click"||l=="keypress")try{const d=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},f=d[l]=d[l]||{refCount:0};if(!f.handler){const p=PS(e);f.handler=p,a.call(this,l,p,c)}f.refCount++}catch{}return a.call(this,l,u,c)}}),Er(s,"removeEventListener",function(a){return function(l,u,c){if(l==="click"||l=="keypress")try{const d=this.__sentry_instrumentation_handlers__||{},f=d[l];f&&(f.refCount--,f.refCount<=0&&(a.call(this,l,f.handler,c),f.handler=void 0,delete d[l]),Object.keys(d).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return a.call(this,l,u,c)}}))})}function Z5(e){if(e.type!==yy)return!1;try{if(!e.target||e.target._sentryId!==by)return!1}catch{}return!0}function ez(e,t){return e!=="keypress"?!1:t!=null&&t.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function PS(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=tz(n);if(ez(n.type,r))return;Wr(n,"_sentryCaptured",!0),r&&!r._sentryId&&Wr(r,"_sentryId",jr());const s=n.type==="keypress"?"input":n.type;Z5(n)||(e({event:n,name:s,global:t}),yy=n.type,by=r?r._sentryId:void 0),clearTimeout(TS),TS=lt.setTimeout(()=>{by=void 0,yy=void 0},Q5)}}function tz(e){try{return e.target}catch{return null}}let hf;function pm(e){const t="history";Wo(t,e),Go(t,nz)}function nz(){if(lt.addEventListener("popstate",()=>{const t=lt.location.href,n=hf;if(hf=t,n===t)return;ls("history",{from:n,to:t})}),!E4())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const s=hf,i=String(r);if(hf=i,s===i)return t.apply(this,n);ls("history",{from:s,to:i})}return t.apply(this,n)}}Er(lt.history,"pushState",e),Er(lt.history,"replaceState",e)}const sh={};function wI(e){const t=sh[e];if(t)return t;let n=lt[e];if(fy(n))return sh[e]=n.bind(lt);const r=lt.document;if(r&&typeof r.createElement=="function")try{const s=r.createElement("iframe");s.hidden=!0,r.head.appendChild(s);const i=s.contentWindow;i!=null&&i[e]&&(n=i[e]),r.head.removeChild(s)}catch(s){ed&&Pe.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,s)}return n&&(sh[e]=n.bind(lt))}function RS(e){sh[e]=void 0}function cu(...e){return wI("setTimeout")(...e)}const ha="__sentry_xhr_v3__";function SI(e){const t="xhr";Wo(t,e),Go(t,rz)}function rz(){if(!lt.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const s=new Error,i=nr()*1e3,o=Di(r[0])?r[0].toUpperCase():void 0,a=sz(r[1]);if(!o||!a)return t.apply(n,r);n[ha]={method:o,url:a,request_headers:{}},o==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const l=()=>{const u=n[ha];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const c={endTimestamp:nr()*1e3,startTimestamp:i,xhr:n,virtualError:s};ls("xhr",c)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,c,d){return l(),u.apply(c,d)}}):n.addEventListener("readystatechange",l),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,c,d){const[f,p]=d,g=c[ha];return g&&Di(f)&&Di(p)&&(g.request_headers[f.toLowerCase()]=p),u.apply(c,d)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const s=n[ha];if(!s)return t.apply(n,r);r[0]!==void 0&&(s.body=r[0]);const i={startTimestamp:nr()*1e3,xhr:n};return ls("xhr",i),t.apply(n,r)}})}function sz(e){if(Di(e))return e;try{return e.toString()}catch{}}function kI(e){return new URLSearchParams(e).toString()}function xI(e,t=Pe){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[kI(e)];if(!e)return[void 0]}catch(n){return ed&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return ed&&t.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function EI(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}const Dg=[],ih=new Map;function iz(){if(C_()&&Yr()){const t=oz();return()=>{t()}}return()=>{}}const IS={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function oz(){return mI(({metric:e})=>{if(e.value==null)return;const t=e.entries.find(g=>g.duration===e.value&&IS[g.name]);if(!t)return;const{interactionId:n}=t,r=IS[t.name],s=pn(Yr()+t.startTime),i=pn(e.value),o=qn(),a=o?zn(o):void 0,u=(n!=null?ih.get(n):void 0)||a,c=u?kt(u).description:Vt().getScopeData().transactionName,d=Hi(t.target),f={[on]:"auto.http.browser.inp",[Ua]:`ui.interaction.${r}`,[$d]:t.duration},p=yI({name:d,transaction:c,attributes:f,startTime:s});p&&(p.addEvent("inp",{[cm]:"millisecond",[dm]:e.value}),p.end(s+i))})}function az(){const e=({entries:t})=>{const n=qn(),r=n&&zn(n);t.forEach(s=>{if(!R5(s)||!r)return;const i=s.interactionId;if(i!=null&&!ih.has(i)){if(Dg.length>10){const o=Dg.shift();ih.delete(o)}Dg.push(i),ih.set(i,r)}})};uu("event",e),uu("first-input",e)}function lz(e,t=wI("fetch")){let n=0,r=0;function s(i){const o=i.body.length;n+=o,r++;const a={body:i.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return RS("fetch"),Yh("No fetch implementation available");try{return t(e.url,a).then(l=>(n-=o,r--,{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}))}catch(l){return RS("fetch"),n-=o,r--,Yh(l)}}return NU(e,s)}const uz=30,cz=50;function _y(e,t,n,r){const s={filename:e,function:t==="<anonymous>"?Ha:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const dz=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,fz=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,hz=/\((\S*)(?::(\d+))(?::(\d+))\)/,pz=e=>{const t=dz.exec(e);if(t){const[,r,s,i]=t;return _y(r,Ha,+s,+i)}const n=fz.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){const o=hz.exec(n[2]);o&&(n[2]=o[1],n[3]=o[2],n[4]=o[3])}const[s,i]=CI(n[1]||Ha,n[2]);return _y(i,s,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},mz=[uz,pz],gz=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,vz=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,yz=e=>{const t=gz.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=vz.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],s=t[1]||Ha;return[s,r]=CI(s,r),_y(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},bz=[cz,yz],_z=[mz,bz],wz=kR(..._z),CI=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Ha,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},cs=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,pf=1024,Sz="Breadcrumbs",kz=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Sz,setup(n){t.console&&a4(Tz(n)),t.dom&&_I(Cz(n,t.dom)),t.xhr&&SI(Pz(n)),t.fetch&&nI(Rz(n)),t.history&&pm(Iz(n)),t.sentry&&n.on("beforeSendEvent",Ez(n))}}},xz=kz;function Ez(e){return function(n){dt()===e&&No({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:ca(n)},{event:n})}}function Cz(e,t){return function(r){if(dt()!==e)return;let s,i,o=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>pf&&(cs&&Pe.warn(`\`dom.maxStringLength\` cannot exceed ${pf}, but a value of ${a} was configured. Sentry will use ${pf} instead.`),a=pf),typeof o=="string"&&(o=[o]);try{const u=r.event,c=Az(u)?u.target:u;s=Hi(c,{keyAttrs:o,maxStringLength:a}),i=iR(c)}catch{s="<unknown>"}if(s.length===0)return;const l={category:`ui.${r.name}`,message:s};i&&(l.data={"ui.component_name":i}),No(l,{event:r.event,name:r.name,global:r.global})}}function Tz(e){return function(n){if(dt()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:XR(n.level),message:Vw(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Vw(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;No(r,{input:n.args,level:n.level})}}function Pz(e){return function(n){if(dt()!==e)return;const{startTimestamp:r,endTimestamp:s}=n,i=n.xhr[ha];if(!r||!s||!i)return;const{method:o,url:a,status_code:l,body:u}=i,c={method:o,url:a,status_code:l},d={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s},f={category:"xhr",data:c,type:"http",level:eI(l)};e.emit("beforeOutgoingRequestBreadcrumb",f,d),No(f,d)}}function Rz(e){return function(n){if(dt()!==e)return;const{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){const i=n.fetchData,o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s},a={category:"fetch",data:i,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",a,o),No(a,o)}else{const i=n.response,o={...n.fetchData,status_code:i==null?void 0:i.status};n.fetchData.request_body_size,n.fetchData.response_body_size,i==null||i.status;const a={input:n.args,response:i,startTimestamp:r,endTimestamp:s},l={category:"fetch",data:o,type:"http",level:eI(o.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",l,a),No(l,a)}}}function Iz(e){return function(n){if(dt()!==e)return;let r=n.from,s=n.to;const i=Oa(wt.location.href);let o=r?Oa(r):void 0;const a=Oa(s);o!=null&&o.path||(o=i),i.protocol===a.protocol&&i.host===a.host&&(s=a.relative),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),No({category:"navigation",data:{from:r,to:s}})}}function Az(e){return!!e&&!!e.target}const Oz=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Mz="BrowserApiErrors",Dz=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:Mz,setupOnce(){t.setTimeout&&Er(wt,"setTimeout",AS),t.setInterval&&Er(wt,"setInterval",AS),t.requestAnimationFrame&&Er(wt,"requestAnimationFrame",$z),t.XMLHttpRequest&&"XMLHttpRequest"in wt&&Er(XMLHttpRequest.prototype,"send",Fz);const n=t.eventTarget;n&&(Array.isArray(n)?n:Oz).forEach(Nz)}}},Lz=Dz;function AS(e){return function(...t){const n=t[0];return t[0]=lu(n,{mechanism:{data:{function:ji(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function $z(e){return function(t){return e.apply(this,[lu(t,{mechanism:{data:{function:"requestAnimationFrame",handler:ji(e)},handled:!1,type:"instrument"}})])}}function Fz(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&Er(n,s,function(i){const o={mechanism:{data:{function:s,handler:ji(i)},handled:!1,type:"instrument"}},a=h_(i);return a&&(o.mechanism.data.handler=ji(a)),lu(i,o)})}),e.apply(this,t)}}function Nz(e){var r,s;const n=(r=wt[e])==null?void 0:r.prototype;(s=n==null?void 0:n.hasOwnProperty)!=null&&s.call(n,"addEventListener")&&(Er(n,"addEventListener",function(i){return function(o,a,l){try{Vz(a)&&(a.handleEvent=lu(a.handleEvent,{mechanism:{data:{function:"handleEvent",handler:ji(a),target:e},handled:!1,type:"instrument"}}))}catch{}return i.apply(this,[o,lu(a,{mechanism:{data:{function:"addEventListener",handler:ji(a),target:e},handled:!1,type:"instrument"}}),l])}}),Er(n,"removeEventListener",function(i){return function(o,a,l){try{const u=a.__sentry_wrapped__;u&&i.call(this,o,u,l)}catch{}return i.call(this,o,a,l)}}))}function Vz(e){return typeof e.handleEvent=="function"}const Bz=()=>({name:"BrowserSession",setupOnce(){if(typeof wt.document>"u"){cs&&Pe.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}lS({ignoreDuration:!0}),uS(),pm(({from:e,to:t})=>{e!==void 0&&e!==t&&(lS({ignoreDuration:!0}),uS())})}}),Uz="GlobalHandlers",zz=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:Uz,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(jz(n),OS("onerror")),t.onunhandledrejection&&(qz(n),OS("onunhandledrejection"))}}},Hz=zz;function jz(e){xR(t=>{const{stackParser:n,attachStacktrace:r}=TI();if(dt()!==e||sI())return;const{msg:s,url:i,line:o,column:a,error:l}=t,u=Kz(x_(n,l||s,void 0,r,!1),i,o,a);u.level="error",FR(u,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}function qz(e){ER(t=>{const{stackParser:n,attachStacktrace:r}=TI();if(dt()!==e||sI())return;const s=Wz(t),i=d_(s)?Gz(s):x_(n,s,void 0,r,!0);i.level="error",FR(i,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function Wz(e){if(d_(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function Gz(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Kz(e,t,n,r){const s=e.exception=e.exception||{},i=s.values=s.values||[],o=i[0]=i[0]||{},a=o.stacktrace=o.stacktrace||{},l=a.frames=a.frames||[],u=r,c=n,d=Di(t)&&t.length>0?t:Du();return l.length===0&&l.push({colno:u,filename:d,function:Ha,in_app:!0,lineno:c}),e}function OS(e){cs&&Pe.log(`Global Handler attached: ${e}`)}function TI(){const e=dt();return(e==null?void 0:e.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}const Yz=()=>({name:"HttpContext",preprocessEvent(e){var o,a;if(!wt.navigator&&!wt.location&&!wt.document)return;const t=((o=e.request)==null?void 0:o.url)||Du(),{referrer:n}=wt.document||{},{userAgent:r}=wt.navigator||{},s={...(a=e.request)==null?void 0:a.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},i={...e.request,...t&&{url:t},headers:s};e.request=i}}),Xz="cause",Qz=5,Jz="LinkedErrors",Zz=(e={})=>{const t=e.limit||Qz,n=e.key||Xz;return{name:Jz,preprocessEvent(r,s,i){const o=i.getOptions();o4(S_,o.stackParser,n,t,r,s)}}},e8=Zz;function PI(e){return[JU(),KU(),Lz(),xz(),Hz(),e8(),d4(),Yz(),Bz()]}function t8(e={}){var n;return{...{defaultIntegrations:PI(),release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:(n=wt.SENTRY_RELEASE)==null?void 0:n.id,sendClientReports:!0},...n8(e)}}function n8(e){const t={};for(const n of Object.getOwnPropertyNames(e)){const r=n;e[r]!==void 0&&(t[r]=e[r])}return t}function r8(){var l;const e=typeof wt.window<"u"&&wt;if(!e)return!1;const t=e.chrome?"chrome":"browser",n=e[t],r=(l=n==null?void 0:n.runtime)==null?void 0:l.id,s=Du()||"",i=["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"],o=!!r&&wt===wt.top&&i.some(u=>s.startsWith(`${u}//`)),a=typeof e.nw<"u";return!!r&&!o&&!a}function s8(e={}){const t=t8(e);if(!t.skipBrowserExtensionCheck&&r8()){cs&&pi(()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")});return}cs&&!tI()&&Pe.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill.");const n={...t,stackParser:l3(t.stackParser||wz),integrations:_U(t),transport:t.transport||lz};return AU(Y4,n)}const jt=ft,T_="sentryReplaySession",i8="replay_event",P_="Unable to send Replay",o8=3e5,a8=9e5,l8=5e3,u8=5500,c8=6e4,d8=5e3,f8=3,MS=15e4,mf=5e3,h8=3e3,p8=300,R_=2e7,m8=4999,g8=15e3,DS=36e5;var v8=Object.defineProperty,y8=(e,t,n)=>t in e?v8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,LS=(e,t,n)=>y8(e,typeof t!="symbol"?t+"":t,n),Pn=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Pn||{});function b8(e){return e.nodeType===e.ELEMENT_NODE}function Pc(e){const t=e==null?void 0:e.host;return(t==null?void 0:t.shadowRoot)===e}function Rc(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function _8(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function w8(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function Zh(e){try{const t=e.rules||e.cssRules;return t?_8(Array.from(t,RI).join("")):null}catch{return null}}function S8(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,s=r[n],i=r.getPropertyPriority(s);t+=`${s}:${r.getPropertyValue(s)}${i?" !important":""};`}return`${e.selectorText} { ${t} }`}function RI(e){let t;if(x8(e))try{t=Zh(e.styleSheet)||w8(e)}catch{}else if(E8(e)){let n=e.cssText;const r=e.selectorText.includes(":"),s=typeof e.style.all=="string"&&e.style.all;if(s&&(n=S8(e)),r&&(n=k8(n)),r||s)return n}return t||e.cssText}function k8(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function x8(e){return"styleSheet"in e}function E8(e){return"selectorText"in e}class II{constructor(){LS(this,"idNodeMap",new Map),LS(this,"nodeMetaMap",new WeakMap)}getId(t){var r;return t?((r=this.getMeta(t))==null?void 0:r.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(n,s)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function C8(){return new II}function mm({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function td({isMasked:e,element:t,value:n,maskInputFn:r}){let s=n||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function du(e){return e.toLowerCase()}function wy(e){return e.toUpperCase()}const $S="__rrweb_original__";function T8(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let s=0;s<e.height;s+=n){const i=t.getImageData,o=$S in i?i[$S]:i;if(new Uint32Array(o.call(t,r,s,Math.min(n,e.width-r),Math.min(n,e.height-s)).data.buffer).some(l=>l!==0))return!1}return!0}function I_(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?du(t):null}function ep(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function AI(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i,s=n.pathname.match(r);return(s==null?void 0:s[1])??null}const FS={};function OI(e){const t=FS[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const i=s.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(s)}catch{}return FS[e]=r.bind(window)}function Sy(...e){return OI("setTimeout")(...e)}function MI(...e){return OI("clearTimeout")(...e)}function DI(e){try{return e.contentDocument}catch{}}let P8=1;const R8=new RegExp("[^a-z0-9-_:]"),nd=-2;function A_(){return P8++}function I8(e){if(e instanceof HTMLFormElement)return"form";const t=du(e.tagName);return R8.test(t)?"div":t}function A8(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let dl,NS;const O8=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,M8=/^(?:[a-z+]+:)?\/\//i,D8=/^www\..*/i,L8=/^(data:)([^,]*),(.*)/i;function tp(e,t){return(e||"").replace(O8,(n,r,s,i,o,a)=>{const l=s||o||a,u=r||i||"";if(!l)return n;if(M8.test(l)||D8.test(l))return`url(${u}${l}${u})`;if(L8.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${A8(t)+l}${u})`;const c=t.split("/"),d=l.split("/");c.pop();for(const f of d)f!=="."&&(f===".."?c.pop():c.push(f));return`url(${u}${c.join("/")}${u})`})}const $8=/^[^ \t\n\r\u000c]+/,F8=/^[, \t\n\r\u000c]+/;function N8(e,t){if(t.trim()==="")return t;let n=0;function r(i){let o;const a=i.exec(t.substring(n));return a?(o=a[0],n+=o.length,o):""}const s=[];for(;r(F8),!(n>=t.length);){let i=r($8);if(i.slice(-1)===",")i=Pl(e,i.substring(0,i.length-1)),s.push(i);else{let o="";i=Pl(e,i);let a=!1;for(;;){const l=t.charAt(n);if(l===""){s.push((i+o).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){n+=1,s.push((i+o).trim());break}else l==="("&&(a=!0);o+=l,n+=1}}}return s.join(", ")}const VS=new WeakMap;function Pl(e,t){return!t||t.trim()===""?t:gm(e,t)}function V8(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function gm(e,t){let n=VS.get(e);if(n||(n=e.createElement("a"),VS.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function LI(e,t,n,r,s,i){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?Pl(e,r):n==="srcset"?N8(e,r):n==="style"?tp(r,gm(e)):t==="object"&&n==="data"?Pl(e,r):typeof i=="function"?i(n,r,s):r)}function $I(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function FI(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let s=e.classList.length;s--;){const i=e.classList[s];if(t.test(i))return!0}if(n)return e.matches(n)}catch{}return!1}function B8(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function pa(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:pa(e.parentNode,t,n,r+1)}function Rl(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(B8(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function fu(e,t,n,r,s,i){try{const o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(o===null)return!1;if(o.tagName==="INPUT"){const u=o.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let a=-1,l=-1;if(i){if(l=pa(o,Rl(r,s)),l<0)return!0;a=pa(o,Rl(t,n),l>=0?l:1/0)}else{if(a=pa(o,Rl(t,n)),a<0)return!1;l=pa(o,Rl(r,s),a>=0?a:1/0)}return a>=0?l>=0?a<=l:!0:l>=0?!1:!!i}catch{}return!!i}function U8(e,t,n){const r=e.contentWindow;if(!r)return;let s=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){const a=Sy(()=>{s||(t(),s=!0)},n);e.addEventListener("load",()=>{MI(a),s=!0,t()});return}const o="about:blank";if(r.location.href!==o||e.src===o||e.src==="")return Sy(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function z8(e,t,n){let r=!1,s;try{s=e.sheet}catch{return}if(s)return;const i=Sy(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{MI(i),r=!0,t()})}function H8(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskAttributeFn:l,maskTextClass:u,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:g={},maskTextFn:m,maskInputFn:y,dataURLOptions:_={},inlineImages:b,recordCanvas:x,keepIframeSrcFn:C,newlyAddedElement:S=!1}=t,T=j8(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Pn.Document,childNodes:[],compatMode:e.compatMode}:{type:Pn.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Pn.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:T};case e.ELEMENT_NODE:return W8(e,{doc:n,blockClass:s,blockSelector:i,unblockSelector:o,inlineStylesheet:p,maskAttributeFn:l,maskInputOptions:g,maskInputFn:y,dataURLOptions:_,inlineImages:b,recordCanvas:x,keepIframeSrcFn:C,newlyAddedElement:S,rootId:T,maskTextClass:u,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:f});case e.TEXT_NODE:return q8(e,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:m,maskInputOptions:g,maskInputFn:y,rootId:T});case e.CDATA_SECTION_NODE:return{type:Pn.CDATA,textContent:"",rootId:T};case e.COMMENT_NODE:return{type:Pn.Comment,textContent:e.textContent||"",rootId:T};default:return!1}}function j8(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function q8(e,t){var _;const{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:i,unmaskTextSelector:o,maskTextFn:a,maskInputOptions:l,maskInputFn:u,rootId:c}=t,d=e.parentNode&&e.parentNode.tagName;let f=e.textContent;const p=d==="STYLE"?!0:void 0,g=d==="SCRIPT"?!0:void 0,m=d==="TEXTAREA"?!0:void 0;if(p&&f){try{e.nextSibling||e.previousSibling||(_=e.parentNode.sheet)!=null&&_.cssRules&&(f=Zh(e.parentNode.sheet))}catch(b){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${b}`,e)}f=tp(f,gm(t.doc))}g&&(f="SCRIPT_PLACEHOLDER");const y=fu(e,r,i,s,o,n);if(!p&&!g&&!m&&f&&y&&(f=a?a(f,e.parentElement):f.replace(/[\S]/g,"*")),m&&f&&(l.textarea||y)&&(f=u?u(f,e.parentNode):f.replace(/[\S]/g,"*")),d==="OPTION"&&f){const b=mm({type:null,tagName:d,maskInputOptions:l});f=td({isMasked:fu(e,r,i,s,o,b),element:e,value:f,maskInputFn:u})}return{type:Pn.Text,textContent:f||"",isStyle:p,rootId:c}}function W8(e,t){const{doc:n,blockClass:r,blockSelector:s,unblockSelector:i,inlineStylesheet:o,maskInputOptions:a={},maskAttributeFn:l,maskInputFn:u,dataURLOptions:c={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:g=!1,rootId:m,maskTextClass:y,unmaskTextClass:_,maskTextSelector:b,unmaskTextSelector:x}=t,C=FI(e,r,s,i),S=I8(e);let T={};const P=e.attributes.length;for(let E=0;E<P;E++){const I=e.attributes[E];I.name&&!$I(S,I.name,I.value)&&(T[I.name]=LI(n,S,du(I.name),I.value,e,l))}if(S==="link"&&o){const E=Array.from(n.styleSheets).find(O=>O.href===e.href);let I=null;E&&(I=Zh(E)),I&&(T.rel=null,T.href=null,T.crossorigin=null,T._cssText=tp(I,E.href))}if(S==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const E=Zh(e.sheet);E&&(T._cssText=tp(E,gm(n)))}if(S==="input"||S==="textarea"||S==="select"||S==="option"){const E=e,I=I_(E),O=ep(E,wy(S),I),R=E.checked;if(I!=="submit"&&I!=="button"&&O){const M=fu(E,y,b,_,x,mm({type:I,tagName:wy(S),maskInputOptions:a}));T.value=td({isMasked:M,element:E,value:O,maskInputFn:u})}R&&(T.checked=R)}if(S==="option"&&(e.selected&&!a.select?T.selected=!0:delete T.selected),S==="canvas"&&f){if(e.__context==="2d")T8(e)||(T.rr_dataURL=e.toDataURL(c.type,c.quality));else if(!("__context"in e)){const E=e.toDataURL(c.type,c.quality),I=n.createElement("canvas");I.width=e.width,I.height=e.height;const O=I.toDataURL(c.type,c.quality);E!==O&&(T.rr_dataURL=E)}}if(S==="img"&&d){dl||(dl=n.createElement("canvas"),NS=dl.getContext("2d"));const E=e,I=E.currentSrc||E.getAttribute("src")||"<unknown-src>",O=E.crossOrigin,R=()=>{E.removeEventListener("load",R);try{dl.width=E.naturalWidth,dl.height=E.naturalHeight,NS.drawImage(E,0,0),T.rr_dataURL=dl.toDataURL(c.type,c.quality)}catch(M){if(E.crossOrigin!=="anonymous"){E.crossOrigin="anonymous",E.complete&&E.naturalWidth!==0?R():E.addEventListener("load",R);return}else console.warn(`Cannot inline img src=${I}! Error: ${M}`)}E.crossOrigin==="anonymous"&&(O?T.crossOrigin=O:E.removeAttribute("crossorigin"))};E.complete&&E.naturalWidth!==0?R():E.addEventListener("load",R)}if((S==="audio"||S==="video")&&(T.rr_mediaState=e.paused?"paused":"played",T.rr_mediaCurrentTime=e.currentTime),g||(e.scrollLeft&&(T.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(T.rr_scrollTop=e.scrollTop)),C){const{width:E,height:I}=e.getBoundingClientRect();T={class:T.class,rr_width:`${E}px`,rr_height:`${I}px`}}S==="iframe"&&!p(T.src)&&(!C&&!DI(e)&&(T.rr_src=T.src),delete T.src);let w;try{customElements.get(S)&&(w=!0)}catch{}return{type:Pn.Element,tagName:S,attributes:T,childNodes:[],isSVG:V8(e)||void 0,needBlock:C,rootId:m,isCustom:w}}function zt(e){return e==null?"":e.toLowerCase()}function G8(e,t){if(t.comment&&e.type===Pn.Comment)return!0;if(e.type===Pn.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&AI(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(zt(e.attributes.name).match(/^msapplication-tile(image|color)$/)||zt(e.attributes.name)==="application-name"||zt(e.attributes.rel)==="icon"||zt(e.attributes.rel)==="apple-touch-icon"||zt(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&zt(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(zt(e.attributes.property).match(/^(og|twitter|fb):/)||zt(e.attributes.name).match(/^(og|twitter):/)||zt(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(zt(e.attributes.name)==="robots"||zt(e.attributes.name)==="googlebot"||zt(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(zt(e.attributes.name)==="author"||zt(e.attributes.name)==="generator"||zt(e.attributes.name)==="framework"||zt(e.attributes.name)==="publisher"||zt(e.attributes.name)==="progid"||zt(e.attributes.property).match(/^article:/)||zt(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(zt(e.attributes.name)==="google-site-verification"||zt(e.attributes.name)==="yandex-verification"||zt(e.attributes.name)==="csrf-token"||zt(e.attributes.name)==="p:domain_verify"||zt(e.attributes.name)==="verify-v1"||zt(e.attributes.name)==="verification"||zt(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Il(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,skipChild:f=!1,inlineStylesheet:p=!0,maskInputOptions:g={},maskAttributeFn:m,maskTextFn:y,maskInputFn:_,slimDOMOptions:b,dataURLOptions:x={},inlineImages:C=!1,recordCanvas:S=!1,onSerialize:T,onIframeLoad:P,iframeLoadTimeout:w=5e3,onStylesheetLoad:E,stylesheetLoadTimeout:I=5e3,keepIframeSrcFn:O=()=>!1,newlyAddedElement:R=!1}=t;let{preserveWhiteSpace:M=!0}=t;const D=H8(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:g,maskAttributeFn:m,maskTextFn:y,maskInputFn:_,dataURLOptions:x,inlineImages:C,recordCanvas:S,keepIframeSrcFn:O,newlyAddedElement:R});if(!D)return console.warn(e,"not serialized"),null;let F;r.hasNode(e)?F=r.getId(e):G8(D,b)||!M&&D.type===Pn.Text&&!D.isStyle&&!D.textContent.replace(/^\s+|\s+$/gm,"").length?F=nd:F=A_();const U=Object.assign(D,{id:F});if(r.add(e,U),F===nd)return null;T&&T(e);let K=!f;if(U.type===Pn.Element){K=K&&!U.needBlock,delete U.needBlock;const Q=e.shadowRoot;Q&&Rc(Q)&&(U.isShadowHost=!0)}if((U.type===Pn.Document||U.type===Pn.Element)&&K){b.headWhitespace&&U.type===Pn.Element&&U.tagName==="head"&&(M=!1);const Q={doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,skipChild:f,inlineStylesheet:p,maskInputOptions:g,maskAttributeFn:m,maskTextFn:y,maskInputFn:_,slimDOMOptions:b,dataURLOptions:x,inlineImages:C,recordCanvas:S,preserveWhiteSpace:M,onSerialize:T,onIframeLoad:P,iframeLoadTimeout:w,onStylesheetLoad:E,stylesheetLoadTimeout:I,keepIframeSrcFn:O};for(const H of Array.from(e.childNodes)){const V=Il(H,Q);V&&U.childNodes.push(V)}if(b8(e)&&e.shadowRoot)for(const H of Array.from(e.shadowRoot.childNodes)){const V=Il(H,Q);V&&(Rc(e.shadowRoot)&&(V.isShadow=!0),U.childNodes.push(V))}}return e.parentNode&&Pc(e.parentNode)&&Rc(e.parentNode)&&(U.isShadow=!0),U.type===Pn.Element&&U.tagName==="iframe"&&!FI(e,s,i,o)&&U8(e,()=>{const Q=DI(e);if(Q&&P){const H=Il(Q,{doc:Q,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:g,maskAttributeFn:m,maskTextFn:y,maskInputFn:_,slimDOMOptions:b,dataURLOptions:x,inlineImages:C,recordCanvas:S,preserveWhiteSpace:M,onSerialize:T,onIframeLoad:P,iframeLoadTimeout:w,onStylesheetLoad:E,stylesheetLoadTimeout:I,keepIframeSrcFn:O});H&&P(e,H)}},w),U.type===Pn.Element&&U.tagName==="link"&&typeof U.attributes.rel=="string"&&(U.attributes.rel==="stylesheet"||U.attributes.rel==="preload"&&typeof U.attributes.href=="string"&&AI(U.attributes.href)==="css")&&z8(e,()=>{if(E){const Q=Il(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:g,maskAttributeFn:m,maskTextFn:y,maskInputFn:_,slimDOMOptions:b,dataURLOptions:x,inlineImages:C,recordCanvas:S,preserveWhiteSpace:M,onSerialize:T,onIframeLoad:P,iframeLoadTimeout:w,onStylesheetLoad:E,stylesheetLoadTimeout:I,keepIframeSrcFn:O});Q&&E(e,Q)}},I),U}function K8(e,t){const{mirror:n=new II,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:i=null,maskAllText:o=!1,maskTextClass:a="rr-mask",unmaskTextClass:l=null,maskTextSelector:u=null,unmaskTextSelector:c=null,inlineStylesheet:d=!0,inlineImages:f=!1,recordCanvas:p=!1,maskAllInputs:g=!1,maskAttributeFn:m,maskTextFn:y,maskInputFn:_,slimDOM:b=!1,dataURLOptions:x,preserveWhiteSpace:C,onSerialize:S,onIframeLoad:T,iframeLoadTimeout:P,onStylesheetLoad:w,stylesheetLoadTimeout:E,keepIframeSrcFn:I=()=>!1}=t||{};return Il(e,{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,maskAllText:o,maskTextClass:a,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:c,skipChild:!1,inlineStylesheet:d,maskInputOptions:g===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:g===!1?{}:g,maskAttributeFn:m,maskTextFn:y,maskInputFn:_,slimDOMOptions:b===!0||b==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:b==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:b===!1?{}:b,dataURLOptions:x,inlineImages:f,recordCanvas:p,preserveWhiteSpace:C,onSerialize:S,onIframeLoad:T,iframeLoadTimeout:P,onStylesheetLoad:w,stylesheetLoadTimeout:E,keepIframeSrcFn:I,newlyAddedElement:!1})}function dr(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const wl=`Please stop import mirror directly. Instead of that,\r
|
|
50
|
+
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
51
|
+
or you can use record.mirror to access the mirror instance during recording.`;let BS={map:{},getId(){return console.error(wl),-1},getNode(){return console.error(wl),null},removeNodeFromMap(){console.error(wl)},has(){return console.error(wl),!1},reset(){console.error(wl)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(BS=new Proxy(BS,{get(e,t,n){return t==="map"&&console.error(wl),Reflect.get(e,t,n)}}));function rd(e,t,n={}){let r=null,s=0;return function(...i){const o=Date.now();!s&&n.leading===!1&&(s=o);const a=t-(o-s),l=this;a<=0||a>t?(r&&(tH(r),r=null),s=o,e.apply(l,i)):!r&&n.trailing!==!1&&(r=vm(()=>{s=n.leading===!1?0:Date.now(),r=null,e.apply(l,i)},a))}}function NI(e,t,n,r,s=window){const i=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(o){vm(()=>{n.set.call(this,o)},0),i&&i.set&&i.set.call(this,o)}}),()=>NI(e,t,i||{},!0)}function O_(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],s=n(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}let np=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(np=()=>new Date().getTime());function VI(e){var n,r,s,i,o,a;const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:(t==null?void 0:t.documentElement.scrollLeft)||((r=(n=t==null?void 0:t.body)==null?void 0:n.parentElement)==null?void 0:r.scrollLeft)||((s=t==null?void 0:t.body)==null?void 0:s.scrollLeft)||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(t==null?void 0:t.documentElement.scrollTop)||((o=(i=t==null?void 0:t.body)==null?void 0:i.parentElement)==null?void 0:o.scrollTop)||((a=t==null?void 0:t.body)==null?void 0:a.scrollTop)||0}}function BI(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function UI(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function zI(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Nr(e,t,n,r,s){if(!e)return!1;const i=zI(e);if(!i)return!1;const o=Rl(t,n);if(!s){const u=r&&i.matches(r);return o(i)&&!u}const a=pa(i,o);let l=-1;return a<0?!1:(r&&(l=pa(i,Rl(null,r))),a>-1&&l<0?!0:a<l)}function Y8(e,t){return t.getId(e)!==-1}function Lg(e,t){return t.getId(e)===nd}function HI(e,t){if(Pc(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?HI(e.parentNode,t):!0:!0}function ky(e){return!!e.changedTouches}function X8(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function jI(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function qI(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function xy(e){return!!(e!=null&&e.shadowRoot)}class Q8{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function WI(e){var n,r;let t=null;return((r=(n=e.getRootNode)==null?void 0:n.call(e))==null?void 0:r.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function J8(e){let t=e,n;for(;n=WI(t);)t=n;return t}function Z8(e){const t=e.ownerDocument;if(!t)return!1;const n=J8(e);return t.contains(n)}function GI(e){const t=e.ownerDocument;return t?t.contains(e)||Z8(e):!1}const US={};function M_(e){const t=US[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const i=s.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(s)}catch{}return US[e]=r.bind(window)}function eH(...e){return M_("requestAnimationFrame")(...e)}function vm(...e){return M_("setTimeout")(...e)}function tH(...e){return M_("clearTimeout")(...e)}var at=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(at||{}),Je=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(Je||{}),or=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(or||{}),Si=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Si||{}),Sl=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Sl||{});function D_(e){try{return e.contentDocument}catch{}}function nH(e){try{return e.contentWindow}catch{}}function zS(e){return"__ln"in e}class rH{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=(n==null?void 0:n.next)||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&zS(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&zS(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const HS=(e,t)=>`${e}@${t}`;class sH{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new rH,s=l=>{let u=l,c=nd;for(;c===nd;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},i=l=>{if(!l.parentNode||!GI(l))return;const u=Pc(l.parentNode)?this.mirror.getId(WI(l)):this.mirror.getId(l.parentNode),c=s(l);if(u===-1||c===-1)return r.addNode(l);const d=Il(l,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:f=>{jI(f,this.mirror)&&!Nr(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(f),qI(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),xy(l)&&this.shadowDomManager.addShadowRoot(l.shadowRoot,this.doc)},onIframeLoad:(f,p)=>{Nr(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(f,p),f.contentWindow&&this.canvasManager.addWindow(f.contentWindow),this.shadowDomManager.observeAttachShadow(f))},onStylesheetLoad:(f,p)=>{this.stylesheetManager.attachLinkElement(f,p)}});d&&(t.push({parentId:u,nextId:c,node:d}),n.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const l of this.movedSet)jS(this.removes,l,this.mirror)&&!this.movedSet.has(l.parentNode)||i(l);for(const l of this.addedSet)!qS(this.droppedSet,l)&&!jS(this.removes,l,this.mirror)||qS(this.movedSet,l)?i(l):this.droppedSet.add(l);let o=null;for(;r.length;){let l=null;if(o){const u=this.mirror.getId(o.value.parentNode),c=s(o.value);u!==-1&&c!==-1&&(l=o)}if(!l){let u=r.tail;for(;u;){const c=u;if(u=u.previous,c){const d=this.mirror.getId(c.value.parentNode);if(s(c.value)===-1)continue;if(d!==-1){l=c;break}else{const p=c.value;if(p.parentNode&&p.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const g=p.parentNode.host;if(this.mirror.getId(g)!==-1){l=c;break}}}}}}if(!l){for(;r.head;)r.removeNode(r.head.value);break}o=l.previous,r.removeNode(l.value),i(l.value)}const a={texts:this.texts.map(l=>({id:this.mirror.getId(l.node),value:l.value})).filter(l=>!n.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{const{attributes:u}=l;if(typeof u.style=="string"){const c=JSON.stringify(l.styleDiff),d=JSON.stringify(l._unchangedStyles);c.length<u.style.length&&(c+d).split("var(").length===u.style.split("var(").length&&(u.style=l.styleDiff)}return{id:this.mirror.getId(l.node),attributes:u}}).filter(l=>!n.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!Lg(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Nr(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:fu(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,zI(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,s=t.target.getAttribute(r);if(r==="value"){const o=I_(n),a=n.tagName;s=ep(n,a,o);const l=mm({maskInputOptions:this.maskInputOptions,tagName:a,type:o}),u=fu(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,l);s=td({isMasked:u,element:n,value:s,maskInputFn:this.maskInputFn})}if(Nr(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||s===t.oldValue)return;let i=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(s))if(!D_(n))r="rr_src";else return;if(i||(i={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(t.target,i)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!$I(n.tagName,r)&&(i.attributes[r]=LI(this.doc,du(n.tagName),du(r),s,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");t.oldValue&&o.setAttribute("style",t.oldValue);for(const a of Array.from(n.style)){const l=n.style.getPropertyValue(a),u=n.style.getPropertyPriority(a);l!==o.style.getPropertyValue(a)||u!==o.style.getPropertyPriority(a)?u===""?i.styleDiff[a]=l:i.styleDiff[a]=[l,u]:i._unchangedStyles[a]=[l,u]}for(const a of Array.from(o.style))n.style.getPropertyValue(a)===""&&(i.styleDiff[a]=!1)}break}case"childList":{if(Nr(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),s=Pc(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Nr(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Lg(n,this.mirror)||!Y8(n,this.mirror)||(this.addedSet.has(n)?(Ey(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||HI(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[HS(r,s)]?Ey(this.movedSet,n):this.removes.push({parentId:s,id:r,isShadow:Pc(t.target)&&Rc(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Lg(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[HS(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Nr(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes.forEach(r=>this.genAdds(r)),xy(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Ey(e,t){e.delete(t),t.childNodes.forEach(n=>Ey(e,n))}function jS(e,t,n){return e.length===0?!1:iH(e,t,n)}function iH(e,t,n){let r=t.parentNode;for(;r;){const s=n.getId(r);if(e.some(i=>i.id===s))return!0;r=r.parentNode}return!1}function qS(e,t){return e.size===0?!1:KI(e,t)}function KI(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:KI(e,n):!1}let Ic;function oH(e){Ic=e}function aH(){Ic=void 0}const gt=e=>Ic?(...n)=>{try{return e(...n)}catch(r){if(Ic&&Ic(r)===!0)return()=>{};throw r}}:e,Al=[];function zd(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function YI(e,t){var o,a;const n=new sH;Al.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const s=(a=(o=window==null?void 0:window.Zone)==null?void 0:o.__symbol__)==null?void 0:a.call(o,"MutationObserver");s&&window[s]&&(r=window[s]);const i=new r(gt(l=>{e.onMutation&&e.onMutation(l)===!1||n.processMutations.bind(n)(l)}));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function lH({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const s=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let o=[],a;const l=rd(gt(d=>{const f=Date.now()-a;e(o.map(p=>(p.timeOffset-=f,p)),d),o=[],a=null}),i),u=gt(rd(gt(d=>{const f=zd(d),{clientX:p,clientY:g}=ky(d)?d.changedTouches[0]:d;a||(a=np()),o.push({x:p,y:g,id:r.getId(f),timeOffset:np()-a}),l(typeof DragEvent<"u"&&d instanceof DragEvent?Je.Drag:d instanceof MouseEvent?Je.MouseMove:Je.TouchMove)}),s,{trailing:!1})),c=[dr("mousemove",u,n),dr("touchmove",u,n),dr("drag",u,n)];return gt(()=>{c.forEach(d=>d())})}function uH({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const a=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,l=[];let u=null;const c=d=>f=>{const p=zd(f);if(Nr(p,r,s,i,!0))return;let g=null,m=d;if("pointerType"in f){switch(f.pointerType){case"mouse":g=Si.Mouse;break;case"touch":g=Si.Touch;break;case"pen":g=Si.Pen;break}g===Si.Touch?or[d]===or.MouseDown?m="TouchStart":or[d]===or.MouseUp&&(m="TouchEnd"):Si.Pen}else ky(f)&&(g=Si.Touch);g!==null?(u=g,(m.startsWith("Touch")&&g===Si.Touch||m.startsWith("Mouse")&&g===Si.Mouse)&&(g=null)):or[d]===or.Click&&(g=u,u=null);const y=ky(f)?f.changedTouches[0]:f;if(!y)return;const _=n.getId(p),{clientX:b,clientY:x}=y;gt(e)({type:or[m],id:_,x:b,y:x,...g!==null&&{pointerType:g}})};return Object.keys(or).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&a[d]!==!1).forEach(d=>{let f=du(d);const p=c(d);if(window.PointerEvent)switch(or[d]){case or.MouseDown:case or.MouseUp:f=f.replace("mouse","pointer");break;case or.TouchStart:case or.TouchEnd:return}l.push(dr(f,p,t))}),gt(()=>{l.forEach(d=>d())})}function XI({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){const a=gt(rd(gt(l=>{const u=zd(l);if(!u||Nr(u,r,s,i,!0))return;const c=n.getId(u);if(u===t&&t.defaultView){const d=VI(t.defaultView);e({id:c,x:d.left,y:d.top})}else e({id:c,x:u.scrollLeft,y:u.scrollTop})}),o.scroll||100));return dr("scroll",a,t)}function cH({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const s=gt(rd(gt(()=>{const i=BI(),o=UI();(n!==i||r!==o)&&(e({width:Number(o),height:Number(i)}),n=i,r=o)}),200));return dr("resize",s,t)}const dH=["INPUT","TEXTAREA","SELECT"],WS=new WeakMap;function fH({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,ignoreClass:o,ignoreSelector:a,maskInputOptions:l,maskInputFn:u,sampling:c,userTriggeredOnInput:d,maskTextClass:f,unmaskTextClass:p,maskTextSelector:g,unmaskTextSelector:m}){function y(P){let w=zd(P);const E=P.isTrusted,I=w&&wy(w.tagName);if(I==="OPTION"&&(w=w.parentElement),!w||!I||dH.indexOf(I)<0||Nr(w,r,s,i,!0))return;const O=w;if(O.classList.contains(o)||a&&O.matches(a))return;const R=I_(w);let M=ep(O,I,R),D=!1;const F=mm({maskInputOptions:l,tagName:I,type:R}),U=fu(w,f,g,p,m,F);(R==="radio"||R==="checkbox")&&(D=w.checked),M=td({isMasked:U,element:w,value:M,maskInputFn:u}),_(w,d?{text:M,isChecked:D,userTriggered:E}:{text:M,isChecked:D});const K=w.name;R==="radio"&&K&&D&&t.querySelectorAll(`input[type="radio"][name="${K}"]`).forEach(Q=>{if(Q!==w){const H=td({isMasked:U,element:Q,value:ep(Q,I,R),maskInputFn:u});_(Q,d?{text:H,isChecked:!D,userTriggered:!1}:{text:H,isChecked:!D})}})}function _(P,w){const E=WS.get(P);if(!E||E.text!==w.text||E.isChecked!==w.isChecked){WS.set(P,w);const I=n.getId(P);gt(e)({...w,id:I})}}const x=(c.input==="last"?["change"]:["input","change"]).map(P=>dr(P,gt(y),t)),C=t.defaultView;if(!C)return()=>{x.forEach(P=>P())};const S=C.Object.getOwnPropertyDescriptor(C.HTMLInputElement.prototype,"value"),T=[[C.HTMLInputElement.prototype,"value"],[C.HTMLInputElement.prototype,"checked"],[C.HTMLSelectElement.prototype,"value"],[C.HTMLTextAreaElement.prototype,"value"],[C.HTMLSelectElement.prototype,"selectedIndex"],[C.HTMLOptionElement.prototype,"selected"]];return S&&S.set&&x.push(...T.map(P=>NI(P[0],P[1],{set(){gt(y)({target:this,isTrusted:!1})}},!1,C))),gt(()=>{x.forEach(P=>P())})}function rp(e){const t=[];function n(r,s){if(gf("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||gf("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||gf("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||gf("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const o=Array.from(r.parentRule.cssRules).indexOf(r);s.unshift(o)}else if(r.parentStyleSheet){const o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);s.unshift(o)}return s}return n(e,t)}function uo(e,t,n){let r,s;return e?(e.ownerNode?r=t.getId(e.ownerNode):s=n.getId(e),{styleId:s,id:r}):{}}function hH({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:gt((c,d,f)=>{const[p,g]=f,{id:m,styleId:y}=uo(d,t,n.styleMirror);return(m&&m!==-1||y&&y!==-1)&&e({id:m,styleId:y,adds:[{rule:p,index:g}]}),c.apply(d,f)})});const i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:gt((c,d,f)=>{const[p]=f,{id:g,styleId:m}=uo(d,t,n.styleMirror);return(g&&g!==-1||m&&m!==-1)&&e({id:g,styleId:m,removes:[{index:p}]}),c.apply(d,f)})});let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:gt((c,d,f)=>{const[p]=f,{id:g,styleId:m}=uo(d,t,n.styleMirror);return(g&&g!==-1||m&&m!==-1)&&e({id:g,styleId:m,replace:p}),c.apply(d,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:gt((c,d,f)=>{const[p]=f,{id:g,styleId:m}=uo(d,t,n.styleMirror);return(g&&g!==-1||m&&m!==-1)&&e({id:g,styleId:m,replaceSync:p}),c.apply(d,f)})}));const l={};vf("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(vf("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),vf("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),vf("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(l).forEach(([c,d])=>{u[c]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(u[c].insertRule,{apply:gt((f,p,g)=>{const[m,y]=g,{id:_,styleId:b}=uo(p.parentStyleSheet,t,n.styleMirror);return(_&&_!==-1||b&&b!==-1)&&e({id:_,styleId:b,adds:[{rule:m,index:[...rp(p),y||0]}]}),f.apply(p,g)})}),d.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:gt((f,p,g)=>{const[m]=g,{id:y,styleId:_}=uo(p.parentStyleSheet,t,n.styleMirror);return(y&&y!==-1||_&&_!==-1)&&e({id:y,styleId:_,removes:[{index:[...rp(p),m]}]}),f.apply(p,g)})})}),gt(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=i,o&&(r.CSSStyleSheet.prototype.replace=o),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([c,d])=>{d.prototype.insertRule=u[c].insertRule,d.prototype.deleteRule=u[c].deleteRule})})}function QI({mirror:e,stylesheetManager:t},n){var o,a,l;let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const s=n.nodeName==="#document"?(o=n.defaultView)==null?void 0:o.Document:(l=(a=n.ownerDocument)==null?void 0:a.defaultView)==null?void 0:l.ShadowRoot,i=s!=null&&s.prototype?Object.getOwnPropertyDescriptor(s==null?void 0:s.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!s||!i?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){var u;return(u=i.get)==null?void 0:u.call(this)},set(u){var d;const c=(d=i.set)==null?void 0:d.call(this,u);if(r!==null&&r!==-1)try{t.adoptStyleSheets(u,r)}catch{}return c}}),gt(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function pH({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const i=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:gt((a,l,u)=>{var m;const[c,d,f]=u;if(n.has(c))return i.apply(l,[c,d,f]);const{id:p,styleId:g}=uo((m=l.parentRule)==null?void 0:m.parentStyleSheet,t,r.styleMirror);return(p&&p!==-1||g&&g!==-1)&&e({id:p,styleId:g,set:{property:c,value:d,priority:f},index:rp(l.parentRule)}),a.apply(l,u)})});const o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:gt((a,l,u)=>{var p;const[c]=u;if(n.has(c))return o.apply(l,[c]);const{id:d,styleId:f}=uo((p=l.parentRule)==null?void 0:p.parentStyleSheet,t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,remove:{property:c},index:rp(l.parentRule)}),a.apply(l,u)})}),gt(()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=o})}function mH({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:s,sampling:i,doc:o}){const a=gt(u=>rd(gt(c=>{const d=zd(c);if(!d||Nr(d,t,n,r,!0))return;const{currentTime:f,volume:p,muted:g,playbackRate:m}=d;e({type:u,id:s.getId(d),currentTime:f,volume:p,muted:g,playbackRate:m})}),i.media||500)),l=[dr("play",a(Sl.Play),o),dr("pause",a(Sl.Pause),o),dr("seeked",a(Sl.Seeked),o),dr("volumechange",a(Sl.VolumeChange),o),dr("ratechange",a(Sl.RateChange),o)];return gt(()=>{l.forEach(u=>u())})}function gH({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,i=n.FontFace;n.FontFace=function(l,u,c){const d=new i(l,u,c);return s.set(d,{family:l,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),d};const o=O_(t.fonts,"add",function(a){return function(l){return vm(gt(()=>{const u=s.get(l);u&&(e(u),s.delete(l))}),0),a.apply(this,[l])}});return r.push(()=>{n.FontFace=i}),r.push(o),gt(()=>{r.forEach(a=>a())})}function vH(e){const{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,selectionCb:o}=e;let a=!0;const l=gt(()=>{const u=t.getSelection();if(!u||a&&(u!=null&&u.isCollapsed))return;a=u.isCollapsed||!1;const c=[],d=u.rangeCount||0;for(let f=0;f<d;f++){const p=u.getRangeAt(f),{startContainer:g,startOffset:m,endContainer:y,endOffset:_}=p;Nr(g,r,s,i,!0)||Nr(y,r,s,i,!0)||c.push({start:n.getId(g),startOffset:m,end:n.getId(y),endOffset:_})}o({ranges:c})});return l(),dr("selectionchange",l)}function yH({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:O_(n.customElements,"define",function(s){return function(i,o,a){try{t({define:{name:i}})}catch{}return s.apply(this,[i,o,a])}})}function bH(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=YI(e,e.doc));const s=lH(e),i=uH(e),o=XI(e),a=cH(e,{win:n}),l=fH(e),u=mH(e);let c=()=>{},d=()=>{},f=()=>{},p=()=>{};e.recordDOM&&(c=hH(e,{win:n}),d=QI(e,e.doc),f=pH(e,{win:n}),e.collectFonts&&(p=gH(e)));const g=vH(e),m=yH(e),y=[];for(const _ of e.plugins)y.push(_.observer(_.callback,n,_.options));return gt(()=>{Al.forEach(_=>_.reset()),r==null||r.disconnect(),s(),i(),o(),a(),l(),u(),c(),d(),f(),p(),g(),m(),y.forEach(_=>_())})}function gf(e){return typeof window[e]<"u"}function vf(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Cy{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,s){const i=r||this.getIdToRemoteIdMap(t),o=s||this.getRemoteIdToIdMap(t);let a=i.get(n);return a||(a=this.generateIdFn(),i.set(n,a),o.set(a,n)),a}getIds(t,n){const r=this.getIdToRemoteIdMap(t),s=this.getRemoteIdToIdMap(t);return n.map(i=>this.getId(t,i,r,s))}getRemoteId(t,n,r){const s=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const i=s.get(n);return i||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(s=>this.getRemoteId(t,s,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}class _H{constructor(){this.crossOriginIframeMirror=new Cy(A_),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class wH{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Cy(A_),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Cy(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){var s,i;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((s=t.contentWindow)==null||s.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,t);const r=D_(t);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const s=this.crossOriginIframeMap.get(t.source);if(!s)return;const i=this.transformCrossOriginEvent(s,n.data.event);i&&this.wrappedEmit(i,n.data.isCheckout)}transformCrossOriginEvent(t,n){var r;switch(n.type){case at.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const s=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,s),this.patchRootIdOnNode(n.data.node,s),{timestamp:n.timestamp,type:at.IncrementalSnapshot,data:{source:Je.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case at.Meta:case at.Load:case at.DomContentLoaded:return!1;case at.Plugin:return n;case at.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case at.IncrementalSnapshot:switch(n.data.source){case Je.Mutation:return n.data.adds.forEach(s=>{this.replaceIds(s,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(s.node,t);const i=this.crossOriginIframeRootIdMap.get(t);i&&this.patchRootIdOnNode(s.node,i)}),n.data.removes.forEach(s=>{this.replaceIds(s,t,["parentId","id"])}),n.data.attributes.forEach(s=>{this.replaceIds(s,t,["id"])}),n.data.texts.forEach(s=>{this.replaceIds(s,t,["id"])}),n;case Je.Drag:case Je.TouchMove:case Je.MouseMove:return n.data.positions.forEach(s=>{this.replaceIds(s,t,["id"])}),n;case Je.ViewportResize:return!1;case Je.MediaInteraction:case Je.MouseInteraction:case Je.Scroll:case Je.CanvasMutation:case Je.Input:return this.replaceIds(n.data,t,["id"]),n;case Je.StyleSheetRule:case Je.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case Je.Font:return n;case Je.Selection:return n.data.ranges.forEach(s=>{this.replaceIds(s,t,["start","end"])}),n;case Je.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),(r=n.data.styles)==null||r.forEach(s=>{this.replaceStyleIds(s,t,["styleId"])}),n}}return!1}replace(t,n,r,s){for(const i of s)!Array.isArray(n[i])&&typeof n[i]!="number"||(Array.isArray(n[i])?n[i]=t.getIds(r,n[i]):n[i]=t.getId(r,n[i]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==Pn.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class SH{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class kH{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!Rc(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=YI({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(XI({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),vm(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(QI({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=D_(t),r=nH(t);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(O_(t.prototype,"attachShadow",function(s){return function(i){const o=s.call(this,i);return this.shadowRoot&&GI(this)&&r.addShadowRoot(this.shadowRoot,n),o}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}var GS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xH=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var yf=0;yf<GS.length;yf++)xH[GS.charCodeAt(yf)]=yf;class KS{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class EH{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new Q8,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},s=[];for(const i of t){let o;this.styleMirror.has(i)?o=this.styleMirror.getId(i):(o=this.styleMirror.add(i),s.push({styleId:o,rules:Array.from(i.rules||CSSRule,(a,l)=>({rule:RI(a),index:l}))})),r.styleIds.push(o)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class CH{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(s=>s!==n)}add(t,n){this.active||(this.active=!0,eH(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let ln,sp;var HE;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((HE=e.contentWindow)==null?void 0:HE.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const ws=C8();function Li(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:i=null,unblockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,maskAllText:u=!1,maskTextClass:c="rr-mask",unmaskTextClass:d=null,maskTextSelector:f=null,unmaskTextSelector:p=null,inlineStylesheet:g=!0,maskAllInputs:m,maskInputOptions:y,slimDOMOptions:_,maskAttributeFn:b,maskInputFn:x,maskTextFn:C,maxCanvasSize:S=null,packFn:T,sampling:P={},dataURLOptions:w={},mousemoveWait:E,recordDOM:I=!0,recordCanvas:O=!1,recordCrossOriginIframes:R=!1,recordAfter:M=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:D=!1,collectFonts:F=!1,inlineImages:U=!1,plugins:K,keepIframeSrcFn:Q=()=>!1,ignoreCSSAttributes:H=new Set([]),errorHandler:V,onMutation:ee,getCanvasManager:q}=e;oH(V);const G=R?window.parent===window:!0;let le=!1;if(!G)try{window.parent.document&&(le=!1)}catch{le=!0}if(G&&!t)throw new Error("emit function is required");if(!G&&!le)return()=>{};E!==void 0&&P.mousemove===void 0&&(P.mousemove=E),ws.reset();const ie=m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:y!==void 0?y:{},we=_===!0||_==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:_==="all",headMetaDescKeywords:_==="all"}:_||{};X8();let Z,he=0;const ne=ye=>{for(const Se of K||[])Se.eventProcessor&&(ye=Se.eventProcessor(ye));return T&&!le&&(ye=T(ye)),ye};ln=(ye,Se)=>{var $e;const me=ye;if(me.timestamp=np(),($e=Al[0])!=null&&$e.isFrozen()&&me.type!==at.FullSnapshot&&!(me.type===at.IncrementalSnapshot&&me.data.source===Je.Mutation)&&Al.forEach(Te=>Te.unfreeze()),G)t==null||t(ne(me),Se);else if(le){const Te={type:"rrweb",event:ne(me),origin:window.location.origin,isCheckout:Se};window.parent.postMessage(Te,"*")}if(me.type===at.FullSnapshot)Z=me,he=0;else if(me.type===at.IncrementalSnapshot){if(me.data.source===Je.Mutation&&me.data.isAttachIframe)return;he++;const Te=r&&he>=r,Ce=n&&Z&&me.timestamp-Z.timestamp>n;(Te||Ce)&&Re(!0)}};const z=ye=>{ln({type:at.IncrementalSnapshot,data:{source:Je.Mutation,...ye}})},xe=ye=>ln({type:at.IncrementalSnapshot,data:{source:Je.Scroll,...ye}}),Fe=ye=>ln({type:at.IncrementalSnapshot,data:{source:Je.CanvasMutation,...ye}}),N=ye=>ln({type:at.IncrementalSnapshot,data:{source:Je.AdoptedStyleSheet,...ye}}),B=new EH({mutationCb:z,adoptedStyleSheetCb:N}),Y=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new _H:new wH({mirror:ws,mutationCb:z,stylesheetManager:B,recordCrossOriginIframes:R,wrappedEmit:ln});for(const ye of K||[])ye.getMirror&&ye.getMirror({nodeMirror:ws,crossOriginIframeMirror:Y.crossOriginIframeMirror,crossOriginIframeStyleMirror:Y.crossOriginIframeStyleMirror});const fe=new CH,ce=PH(q,{mirror:ws,win:window,mutationCb:ye=>ln({type:at.IncrementalSnapshot,data:{source:Je.CanvasMutation,...ye}}),recordCanvas:O,blockClass:s,blockSelector:i,unblockSelector:o,maxCanvasSize:S,sampling:P.canvas,dataURLOptions:w,errorHandler:V}),be=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new SH:new kH({mutationCb:z,scrollCb:xe,bypassOptions:{onMutation:ee,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:g,maskInputOptions:ie,dataURLOptions:w,maskAttributeFn:b,maskTextFn:C,maskInputFn:x,recordCanvas:O,inlineImages:U,sampling:P,slimDOMOptions:we,iframeManager:Y,stylesheetManager:B,canvasManager:ce,keepIframeSrcFn:Q,processedNodeManager:fe},mirror:ws}),Re=(ye=!1)=>{if(!I)return;ln({type:at.Meta,data:{href:window.location.href,width:UI(),height:BI()}},ye),B.reset(),be.init(),Al.forEach(me=>me.lock());const Se=K8(document,{mirror:ws,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:g,maskAllInputs:ie,maskAttributeFn:b,maskInputFn:x,maskTextFn:C,slimDOM:we,dataURLOptions:w,recordCanvas:O,inlineImages:U,onSerialize:me=>{jI(me,ws)&&Y.addIframe(me),qI(me,ws)&&B.trackLinkElement(me),xy(me)&&be.addShadowRoot(me.shadowRoot,document)},onIframeLoad:(me,$e)=>{Y.attachIframe(me,$e),me.contentWindow&&ce.addWindow(me.contentWindow),be.observeAttachShadow(me)},onStylesheetLoad:(me,$e)=>{B.attachLinkElement(me,$e)},keepIframeSrcFn:Q});if(!Se)return console.warn("Failed to snapshot the document");ln({type:at.FullSnapshot,data:{node:Se,initialOffset:VI(window)}}),Al.forEach(me=>me.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&B.adoptStyleSheets(document.adoptedStyleSheets,ws.getId(document))};sp=Re;try{const ye=[],Se=$e=>{var Te;return gt(bH)({onMutation:ee,mutationCb:z,mousemoveCb:(Ce,Ge)=>ln({type:at.IncrementalSnapshot,data:{source:Ge,positions:Ce}}),mouseInteractionCb:Ce=>ln({type:at.IncrementalSnapshot,data:{source:Je.MouseInteraction,...Ce}}),scrollCb:xe,viewportResizeCb:Ce=>ln({type:at.IncrementalSnapshot,data:{source:Je.ViewportResize,...Ce}}),inputCb:Ce=>ln({type:at.IncrementalSnapshot,data:{source:Je.Input,...Ce}}),mediaInteractionCb:Ce=>ln({type:at.IncrementalSnapshot,data:{source:Je.MediaInteraction,...Ce}}),styleSheetRuleCb:Ce=>ln({type:at.IncrementalSnapshot,data:{source:Je.StyleSheetRule,...Ce}}),styleDeclarationCb:Ce=>ln({type:at.IncrementalSnapshot,data:{source:Je.StyleDeclaration,...Ce}}),canvasMutationCb:Fe,fontCb:Ce=>ln({type:at.IncrementalSnapshot,data:{source:Je.Font,...Ce}}),selectionCb:Ce=>{ln({type:at.IncrementalSnapshot,data:{source:Je.Selection,...Ce}})},customElementCb:Ce=>{ln({type:at.IncrementalSnapshot,data:{source:Je.CustomElement,...Ce}})},blockClass:s,ignoreClass:a,ignoreSelector:l,maskAllText:u,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,maskInputOptions:ie,inlineStylesheet:g,sampling:P,recordDOM:I,recordCanvas:O,inlineImages:U,userTriggeredOnInput:D,collectFonts:F,doc:$e,maskAttributeFn:b,maskInputFn:x,maskTextFn:C,keepIframeSrcFn:Q,blockSelector:i,unblockSelector:o,slimDOMOptions:we,dataURLOptions:w,mirror:ws,iframeManager:Y,stylesheetManager:B,shadowDomManager:be,processedNodeManager:fe,canvasManager:ce,ignoreCSSAttributes:H,plugins:((Te=K==null?void 0:K.filter(Ce=>Ce.observer))==null?void 0:Te.map(Ce=>({observer:Ce.observer,options:Ce.options,callback:Ge=>ln({type:at.Plugin,data:{plugin:Ce.name,payload:Ge}})})))||[]},{})};Y.addLoadListener($e=>{try{ye.push(Se($e.contentDocument))}catch(Te){console.warn(Te)}});const me=()=>{Re(),ye.push(Se(document))};return document.readyState==="interactive"||document.readyState==="complete"?me():(ye.push(dr("DOMContentLoaded",()=>{ln({type:at.DomContentLoaded,data:{}}),M==="DOMContentLoaded"&&me()})),ye.push(dr("load",()=>{ln({type:at.Load,data:{}}),M==="load"&&me()},window))),()=>{ye.forEach($e=>$e()),fe.destroy(),sp=void 0,aH()}}catch(ye){console.warn(ye)}}function TH(e){if(!sp)throw new Error("please take full snapshot after start recording");sp(e)}Li.mirror=ws;Li.takeFullSnapshot=TH;function PH(e,t){try{return e?e(t):new KS}catch{return console.warn("Unable to initialize CanvasManager"),new KS}}var YS;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(YS||(YS={}));const RH=3,IH=5;function L_(e){return e>9999999999?e:e*1e3}function $g(e){return e>9999999999?e/1e3:e}function Hd(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:at.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:xs(t,10,1e3)}}),t.category==="console")))}const AH="button,a";function JI(e){return e.closest(AH)||e}function ZI(e){const t=eA(e);return!t||!(t instanceof Element)?t:JI(t)}function eA(e){return OH(e)?e.target:e}function OH(e){return typeof e=="object"&&!!e&&"target"in e}let co;function MH(e){return co||(co=[],DH()),co.push(e),()=>{const t=co?co.indexOf(e):-1;t>-1&&co.splice(t,1)}}function DH(){Er(jt,"open",function(e){return function(...t){if(co)try{co.forEach(n=>n())}catch{}return e.apply(jt,t)}})}const LH=new Set([Je.Mutation,Je.StyleSheetRule,Je.StyleDeclaration,Je.AdoptedStyleSheet,Je.CanvasMutation,Je.Selection,Je.MediaInteraction]);function $H(e,t,n){e.handleClick(t,n)}class FH{constructor(t,n,r=Hd){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scrollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=MH(()=>{this._lastMutation=XS()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(VH(n,this._ignoreSelector)||!BH(t))return;const r={timestamp:$g(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(s=>s.node===r.node&&Math.abs(s.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=$g(t)}registerScroll(t=Date.now()){this._lastScroll=$g(t)}registerClick(t){const n=JI(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=XS();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(const r of t){const s=this._clicks.indexOf(r);s>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(s,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,s=t.mutationAfter&&t.mutationAfter<=this._threshold,i=!r&&!s,{clickCount:o,clickBreadcrumb:a}=t;if(i){const l=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=l<this._timeout*1e3?"mutation":"timeout",c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:jt.location.href,route:n.getCurrentRoute(),timeAfterClickMs:l,endReason:u,clickCount:o||1}};this._addBreadcrumbEvent(n,c);return}if(o>1){const l={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:jt.location.href,route:n.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(n,l)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=cu(()=>this._checkClicks(),1e3)}}const NH=["A","BUTTON","INPUT"];function VH(e,t){return!!(!NH.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function BH(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function XS(){return Date.now()/1e3}function UH(e,t){try{if(!zH(t))return;const{source:n}=t.data;if(LH.has(n)&&e.registerMutation(t.timestamp),n===Je.Scroll&&e.registerScroll(t.timestamp),HH(t)){const{type:r,id:s}=t.data,i=Li.mirror.getNode(s);i instanceof HTMLElement&&r===or.Click&&e.registerClick(i)}}catch{}}function zH(e){return e.type===RH}function HH(e){return e.data.source===Je.MouseInteraction}function ii(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var $_=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))($_||{});const jH=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function qH(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(jH.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const WH=e=>t=>{if(!e.isEnabled())return;const n=GH(t);if(!n)return;const r=t.name==="click",s=r?t.event:void 0;r&&e.clickDetector&&s&&s.target&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&$H(e.clickDetector,n,ZI(t.event)),Hd(e,n)};function tA(e,t){const n=Li.mirror.getId(e),r=n&&Li.mirror.getNode(n),s=r&&Li.mirror.getMeta(r),i=s&&YH(s)?s:null;return{message:t,data:i?{nodeId:n,node:{id:n,tagName:i.tagName,textContent:Array.from(i.childNodes).map(o=>o.type===$_.Text&&o.textContent).filter(Boolean).map(o=>o.trim()).join(""),attributes:qH(i.attributes)}}:{}}}function GH(e){const{target:t,message:n}=KH(e);return ii({category:`ui.${e.name}`,...tA(t,n)})}function KH(e){const t=e.name==="click";let n,r=null;try{r=t?ZI(e.event):eA(e.event),n=Hi(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function YH(e){return e.type===$_.Element}function XH(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=QH(t);n&&Hd(e,n)}function QH(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i,target:o}=e;if(!o||JH(o)||!i)return null;const a=t||r||s,l=i.length===1;if(!a&&l)return null;const u=Hi(o,{maxStringLength:200})||"<unknown>",c=tA(o,u);return ii({category:"ui.keyDown",message:u,data:{...c.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i}})}function JH(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const ZH={resource:sj,paint:nj,navigation:rj};function bf(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function ej(e){return e.map(tj).filter(Boolean)}function tj(e){const t=ZH[e.entryType];return t?t(e):null}function hu(e){return((Yr()||jt.performance.timeOrigin)+e)/1e3}function nj(e){const{duration:t,entryType:n,name:r,startTime:s}=e,i=hu(s);return{type:n,name:r,start:i,end:i+t,data:void 0}}function rj(e){const{entryType:t,name:n,decodedBodySize:r,duration:s,domComplete:i,encodedBodySize:o,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,domInteractive:u,loadEventStart:c,loadEventEnd:d,redirectCount:f,startTime:p,transferSize:g,type:m}=e;return s===0?null:{type:`${t}.${m}`,start:hu(p),end:hu(i),name:n,data:{size:g,decodedBodySize:r,encodedBodySize:o,duration:s,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,loadEventStart:c,loadEventEnd:d,domComplete:i,redirectCount:f}}}function sj(e){const{entryType:t,initiatorType:n,name:r,responseEnd:s,startTime:i,decodedBodySize:o,encodedBodySize:a,responseStatus:l,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:hu(i),end:hu(s),name:r,data:{size:u,statusCode:l,decodedBodySize:o,encodedBodySize:a}}}function ij(e){const t=e.entries[e.entries.length-1],n=t!=null&&t.element?[t.element]:void 0;return ym(e,"largest-contentful-paint",n)}function oj(e){return e.sources!==void 0}function aj(e){const t=[],n=[];for(const r of e.entries)if(oj(r)){const s=[];for(const i of r.sources)if(i.node){n.push(i.node);const o=Li.mirror.getId(i.node);o&&s.push(o)}t.push({value:r.value,nodeIds:s.length?s:void 0})}return ym(e,"cumulative-layout-shift",n,t)}function lj(e){const t=e.entries[e.entries.length-1],n=t!=null&&t.target?[t.target]:void 0;return ym(e,"first-input-delay",n)}function uj(e){const t=e.entries[e.entries.length-1],n=t!=null&&t.target?[t.target]:void 0;return ym(e,"interaction-to-next-paint",n)}function ym(e,t,n,r){const s=e.value,i=e.rating,o=hu(s);return{type:"web-vital",name:t,start:o,end:o,data:{value:s,size:s,rating:i,nodeIds:n?n.map(a=>Li.mirror.getId(a)):void 0,attributions:r}}}function cj(e){function t(s){e.performanceEntries.includes(s)||e.performanceEntries.push(s)}function n({entries:s}){s.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(s=>{r.push(uu(s,n))}),r.push(hI(bf(ij,e)),E_(bf(aj,e)),pI(bf(lj,e)),mI(bf(uj,e))),()=>{r.forEach(s=>s())}}const Ke=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,dj='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort((function(t,n){return p[n.s]-p[t.s]||t.f-n.f}));s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}},L=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},O=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&j(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(O(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){G.prototype.flush.call(this)},t}(),J="undefined"!=typeof TextEncoder&&new TextEncoder,K="undefined"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(n,r){if(J)return J.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),s=i.length;return q(i,n),j(i,s-8,r.d()),j(i,s-4,e),i}(P(t))}const R=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new H,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&"function"==typeof V[n])try{const t=V[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function fj(){const e=new Blob([dj]);return URL.createObjectURL(e)}const QS=["info","warn","error","log"],oh="[Replay] ";function Fg(e,t="info"){No({category:"console",data:{logger:"replay"},level:t,message:`${oh}${e}`},{level:t})}function hj(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return Ke?(QS.forEach(r=>{n[r]=(...s)=>{Pe[r](oh,...s),t&&Fg(s.join(""),XR(r))}}),n.exception=(r,...s)=>{s.length&&n.error&&n.error(...s),Pe.error(oh,r),e?ai(r):t&&Fg(r,"error")},n.infoTick=(...r)=>{Pe.info(oh,...r),t&&setTimeout(()=>Fg(r[0]),0)}):QS.forEach(r=>{n[r]=()=>{}}),n}const Ye=hj();class F_ extends Error{constructor(){super(`Event buffer exceeded maximum size of ${R_}.`)}}class nA{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>R_)throw new F_;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map(n=>n.timestamp).sort()[0];return t?L_(t):null}}class pj{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():n()},{once:!0}),this._worker.addEventListener("error",r=>{n(r)},{once:!0})}),this._ensureReadyPromise)}destroy(){Ke&&Ye.info("Destroying compression worker"),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((s,i)=>{const o=({data:a})=>{const l=a;if(l.method===t&&l.id===r){if(this._worker.removeEventListener("message",o),!l.success){Ke&&Ye.error("Error in compression worker: ",l.response),i(new Error("Error in compression worker"));return}s(l.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}}class mj{constructor(t){this._worker=new pj(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const n=L_(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>R_?Promise.reject(new F_):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{Ke&&Ye.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class gj{constructor(t){this._fallback=new nA,this._compression=new mj(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}set waitForCheckout(t){this._used.waitForCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){Ke&&Ye.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n,waitForCheckout:r}=this._fallback,s=[];for(const i of t)s.push(this._compression.addEvent(i));this._compression.hasCheckout=n,this._compression.waitForCheckout=r,this._used=this._compression;try{await Promise.all(s),this._fallback.clear()}catch(i){Ke&&Ye.exception(i,"Failed to add events when switching buffers.")}}}function vj({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=yj(t);if(n)return n}return Ke&&Ye.info("Using simple buffer"),new nA}function yj(e){try{const t=e||bj();if(!t)return;Ke&&Ye.info(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new gj(n)}catch(t){Ke&&Ye.exception(t,"Failed to create compression worker")}}function bj(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?fj():""}function N_(){try{return"sessionStorage"in jt&&!!jt.sessionStorage}catch{return!1}}function _j(e){wj(),e.session=void 0}function wj(){if(N_())try{jt.sessionStorage.removeItem(T_)}catch{}}function rA(e){return e===void 0?!1:Math.random()<e}function V_(e){if(N_())try{jt.sessionStorage.setItem(T_,JSON.stringify(e))}catch{}}function sA(e){const t=Date.now(),n=e.id||jr(),r=e.started||t,s=e.lastActivity||t,i=e.segmentId||0,o=e.sampled,a=e.previousSessionId;return{id:n,started:r,lastActivity:s,segmentId:i,sampled:o,previousSessionId:a}}function Sj(e,t){return rA(e)?"session":t?"buffer":!1}function JS({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const s=Sj(e,t),i=sA({sampled:s,previousSessionId:r});return n&&V_(i),i}function kj(){if(!N_())return null;try{const e=jt.sessionStorage.getItem(T_);if(!e)return null;const t=JSON.parse(e);return Ke&&Ye.infoTick("Loading existing session"),sA(t)}catch{return null}}function Ty(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function iA(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Ty(e.started,t,r)||Ty(e.lastActivity,n,r)}function oA(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!iA(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Ng({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const s=r.stickySession&&kj();return s?oA(s,{sessionIdleExpire:e,maxReplayDuration:t})?(Ke&&Ye.infoTick("Session in sessionStorage is expired, creating new one..."),JS(r,{previousSessionId:s.id})):s:(Ke&&Ye.infoTick("Creating new session"),JS(r,{previousSessionId:n}))}function xj(e){return e.type===at.Custom}function B_(e,t,n){return lA(e,t)?(aA(e,t,n),!0):!1}function Ej(e,t,n){return lA(e,t)?aA(e,t,n):Promise.resolve(null)}async function aA(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const s=e.recordingMode==="buffer";try{n&&s&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const i=e.getOptions(),o=Cj(t,i.beforeAddRecordingEvent);return o?await r.addEvent(o):void 0}catch(i){const o=i&&i instanceof F_,a=o?"addEventSizeExceeded":"addEvent";if(o&&s)return r.clear(),r.waitForCheckout=!0,null;e.handleException(i),await e.stop({reason:a});const l=dt();l&&l.recordDroppedEvent("internal_sdk_error","replay")}}function lA(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=L_(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(Ke&&Ye.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function Cj(e,t){try{if(typeof t=="function"&&xj(e))return t(e)}catch(n){return Ke&&Ye.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function U_(e){return!e.type}function Py(e){return e.type==="transaction"}function Tj(e){return e.type==="replay_event"}function ZS(e){return e.type==="feedback"}function Pj(e){return(t,n)=>{if(!e.isEnabled()||!U_(t)&&!Py(t))return;const r=n==null?void 0:n.statusCode;if(!(!r||r<200||r>=300)){if(Py(t)){Rj(e,t);return}Ij(e,t)}}}function Rj(e,t){var r,s;const n=e.getContext();(s=(r=t.contexts)==null?void 0:r.trace)!=null&&s.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function Ij(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||cu(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(s){e.handleException(s)}})}function Aj(e){return t=>{!e.isEnabled()||!U_(t)||Oj(e,t)}}function Oj(e,t){var r,s,i;const n=(i=(s=(r=t.exception)==null?void 0:r.values)==null?void 0:s[0])==null?void 0:i.value;if(typeof n=="string"&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const o=ii({category:"replay.hydrate-error",data:{url:Du()}});Hd(e,o)}}function Mj(e){const t=dt();t&&t.on("beforeAddBreadcrumb",n=>Dj(e,n))}function Dj(e,t){if(!e.isEnabled()||!uA(t))return;const n=Lj(t);n&&Hd(e,n)}function Lj(e){return!uA(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?$j(e):ii(e)}function $j(e){var s;const t=(s=e.data)==null?void 0:s.arguments;if(!Array.isArray(t)||t.length===0)return ii(e);let n=!1;const r=t.map(i=>{if(!i)return i;if(typeof i=="string")return i.length>mf?(n=!0,`${i.slice(0,mf)}…`):i;if(typeof i=="object")try{const o=xs(i,7);return JSON.stringify(o).length>mf?(n=!0,`${JSON.stringify(o,null,2).slice(0,mf)}…`):o}catch{}return i});return ii({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function uA(e){return!!e.category}function Fj(e,t){var n;return e.type||!e.exception||!e.exception.values||!e.exception.values.length?!1:!!((n=t.originalException)!=null&&n.__rrweb__)}function cA(){const e=Vt().getPropagationContext().dsc;e&&delete e.replay_id;const t=qn();if(t){const n=Wi(t);delete n.replay_id}}function Nj(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:at.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function Vj(e,t){return e.recordingMode!=="buffer"||t.message===P_||!t.exception||t.type?!1:rA(e.getOptions().errorSampleRate)}function Bj(e){return Object.assign((t,n)=>!e.isEnabled()||e.isPaused()?t:Tj(t)?(delete t.breadcrumbs,t):!U_(t)&&!Py(t)&&!ZS(t)?t:e.checkAndHandleExpiredSession()?ZS(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),Nj(e,t),t):Fj(t,n)&&!e.getOptions()._experiments.captureExceptions?(Ke&&Ye.log("Ignoring error from rrweb internals",t),null):((Vj(e,t)||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),t):(cA(),t),{id:"Replay"})}function bm(e,t){return t.map(({type:n,start:r,end:s,name:i,data:o})=>{const a=e.throttledAddEvent({type:at.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:i,startTimestamp:r,endTimestamp:s,data:o}}});return typeof a=="string"?Promise.resolve(null):a})}function Uj(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function zj(e){return t=>{if(!e.isEnabled())return;const n=Uj(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(bm(e,[n]),!1)))}}function Hj(e,t){return Ke&&e.getOptions()._experiments.traceInternals?!1:VU(t,dt())}function dA(e,t){e.isEnabled()&&t!==null&&(Hj(e,t.name)||e.addUpdate(()=>(bm(e,[t]),!0)))}function _m(e){if(!e)return;const t=new TextEncoder;try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=kI(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function fA(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function ip(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function hA(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:s,method:i,statusCode:o,request:a,response:l}=t;return{type:e,start:n/1e3,end:r/1e3,name:s,data:{method:i,statusCode:o,request:a,response:l}}}function sd(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Ro(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:s,warnings:i}=jj(n);return r.body=s,i!=null&&i.length&&(r._meta={warnings:i}),r}function Ry(e,t){return Object.entries(e).reduce((n,[r,s])=>{const i=r.toLowerCase();return t.includes(i)&&e[r]&&(n[i]=s),n},{})}function jj(e){if(!e||typeof e!="string")return{body:e};const t=e.length>MS,n=qj(e);if(t){const r=e.slice(0,MS);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function qj(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function op(e,t){const n=Wj(e);return Po(n,t)}function Wj(e,t=jt.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(jt.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function Gj(e,t,n){try{const r=await Yj(e,t,n),s=hA("resource.fetch",r);dA(n.replay,s)}catch(r){Ke&&Ye.exception(r,"Failed to capture fetch breadcrumb")}}function Kj(e,t){const{input:n,response:r}=t,s=n?EI(n):void 0,i=_m(s),o=r?fA(r.headers.get("content-length")):void 0;i!==void 0&&(e.data.request_body_size=i),o!==void 0&&(e.data.response_body_size=o)}async function Yj(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r}=t,{url:o,method:a,status_code:l=0,request_body_size:u,response_body_size:c}=e.data,d=op(o,n.networkDetailAllowUrls)&&!op(o,n.networkDetailDenyUrls),f=d?Xj(n,t.input,u):sd(u),p=await Qj(d,n,t.response,c);return{startTimestamp:s,endTimestamp:i,url:o,method:a,statusCode:l,request:f,response:p}}function Xj({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const s=n?e6(n,t):{};if(!e)return Ro(s,r,void 0);const i=EI(n),[o,a]=xI(i,Ye),l=Ro(s,r,o);return a?ip(l,a):l}async function Qj(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,s){if(!e&&s!==void 0)return sd(s);const i=r?pA(r.headers,n):{};if(!r||!t&&s!==void 0)return Ro(i,s,void 0);const[o,a]=await Zj(r),l=Jj(o,{networkCaptureBodies:t,responseBodySize:s,captureDetails:e,headers:i});return a?ip(l,a):l}function Jj(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:s}){try{const i=e!=null&&e.length&&n===void 0?_m(e):n;return r?t?Ro(s,i,e):Ro(s,i,void 0):sd(i)}catch(i){return Ke&&Ye.exception(i,"Failed to serialize response body"),Ro(s,n,void 0)}}async function Zj(e){const t=t6(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await n6(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(Ke&&Ye.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(Ke&&Ye.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function pA(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function e6(e,t){return e.length===1&&typeof e[0]!="string"?ek(e[0],t):e.length===2?ek(e[1],t):{}}function ek(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?pA(n,t):Array.isArray(n)?{}:Ry(n,t):{}}function t6(e){try{return e.clone()}catch(t){Ke&&Ye.exception(t,"Failed to clone response body")}}function n6(e){return new Promise((t,n)=>{const r=cu(()=>n(new Error("Timeout while trying to read response body")),500);r6(e).then(s=>t(s),s=>n(s)).finally(()=>clearTimeout(r))})}async function r6(e){return await e.text()}async function s6(e,t,n){try{const r=o6(e,t,n),s=hA("resource.xhr",r);dA(n.replay,s)}catch(r){Ke&&Ye.exception(r,"Failed to capture xhr breadcrumb")}}function i6(e,t){const{xhr:n,input:r}=t;if(!n)return;const s=_m(r),i=n.getResponseHeader("content-length")?fA(n.getResponseHeader("content-length")):c6(n.response,n.responseType);s!==void 0&&(e.data.request_body_size=s),i!==void 0&&(e.data.response_body_size=i)}function o6(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r,input:o,xhr:a}=t,{url:l,method:u,status_code:c=0,request_body_size:d,response_body_size:f}=e.data;if(!l)return null;if(!a||!op(l,n.networkDetailAllowUrls)||op(l,n.networkDetailDenyUrls)){const T=sd(d),P=sd(f);return{startTimestamp:s,endTimestamp:i,url:l,method:u,statusCode:c,request:T,response:P}}const p=a[ha],g=p?Ry(p.request_headers,n.networkRequestHeaders):{},m=Ry(a6(a),n.networkResponseHeaders),[y,_]=n.networkCaptureBodies?xI(o,Ye):[void 0],[b,x]=n.networkCaptureBodies?l6(a):[void 0],C=Ro(g,d,y),S=Ro(m,f,b);return{startTimestamp:s,endTimestamp:i,url:l,method:u,statusCode:c,request:_?ip(C,_):C,response:x?ip(S,x):S}}function a6(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
|
|
52
|
+
`).reduce((n,r)=>{const[s,i]=r.split(": ");return i&&(n[s.toLowerCase()]=i),n},{}):{}}function l6(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return u6(e.response,e.responseType)}catch(n){t.push(n)}return Ke&&Ye.warn("Failed to get xhr response body",...t),[void 0]}function u6(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return Ke&&Ye.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Ke&&Ye.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function c6(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return _m(n)}catch{return}}function d6(e){const t=dt();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:i,networkResponseHeaders:o}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:i,networkResponseHeaders:o};t&&t.on("beforeAddBreadcrumb",(l,u)=>f6(a,l,u))}catch{}}function f6(e,t,n){if(t.data)try{h6(t)&&m6(n)&&(i6(t,n),s6(t,n,e)),p6(t)&&g6(n)&&(Kj(t,n),Gj(t,n,e))}catch(r){Ke&&Ye.exception(r,"Error when enriching network breadcrumb")}}function h6(e){return e.category==="xhr"}function p6(e){return e.category==="fetch"}function m6(e){return e==null?void 0:e.xhr}function g6(e){return e==null?void 0:e.response}function v6(e,{autoFlushOnFeedback:t}){const n=dt();_I(WH(e)),pm(zj(e)),Mj(e),d6(e);const r=Bj(e);hU(r),n&&(n.on("beforeSendEvent",Aj(e)),n.on("afterSendEvent",Pj(e)),n.on("createDsc",s=>{const i=e.getSessionId();i&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(s.replay_id=i)}),n.on("spanStart",s=>{e.lastActiveSpan=s}),n.on("spanEnd",s=>{e.lastActiveSpan=s}),n.on("beforeSendFeedback",async(s,i)=>{var a;const o=e.getSessionId();i!=null&&i.includeReplay&&e.isEnabled()&&o&&((a=s.contexts)!=null&&a.feedback)&&(s.contexts.feedback.source==="api"&&t&&await e.flush(),s.contexts.feedback.replay_id=o)}),t&&n.on("openFeedbackWidget",async()=>{await e.flush()}))}async function y6(e){try{return Promise.all(bm(e,[b6(jt.performance.memory)]))}catch{return[]}}function b6(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,s=Date.now()/1e3;return{type:"memory",name:"memory",start:s,end:s,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function _6(e,t,n){let r,s,i;const o=n!=null&&n.maxWait?Math.max(n.maxWait,t):0;function a(){return l(),r=e(),r}function l(){s!==void 0&&clearTimeout(s),i!==void 0&&clearTimeout(i),s=i=void 0}function u(){return s!==void 0||i!==void 0?a():r}function c(){return s&&clearTimeout(s),s=cu(a,t),o&&i===void 0&&(i=cu(a,o)),r}return c.cancel=l,c.flush=u,c}const Qr=ft.navigator;function w6(){return/iPhone|iPad|iPod/i.test((Qr==null?void 0:Qr.userAgent)??"")||/Macintosh/i.test((Qr==null?void 0:Qr.userAgent)??"")&&(Qr!=null&&Qr.maxTouchPoints)&&(Qr==null?void 0:Qr.maxTouchPoints)>1?{sampling:{mousemove:!1}}:{}}function S6(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){Ke&&Ye.warn("Received replay event after session expired.");return}const s=r||!t;t=!0,e.clickDetector&&UH(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&s&&e.setInitialState(),!B_(e,n,s))return!0;if(!s)return!1;const i=e.session;if(x6(e,s),e.recordingMode==="buffer"&&i&&e.eventBuffer){const o=e.eventBuffer.getEarliestTimestamp();o&&(Ke&&Ye.info(`Updating session start time to earliest event in buffer to ${new Date(o)}`),i.started=o,e.getOptions().stickySession&&V_(i))}return i!=null&&i.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function k6(e){const t=e.getOptions();return{type:at.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function x6(e,t){!t||!e.session||e.session.segmentId!==0||B_(e,k6(e),!1)}function E6(e,t,n,r){return rl(AR(e,__(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function C6({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
|
|
53
|
+
`;if(typeof e=="string")n=`${r}${e}`;else{const i=new TextEncoder().encode(r);n=new Uint8Array(i.length+e.length),n.set(i),n.set(e,i.length)}return n}async function T6({client:e,scope:t,replayId:n,event:r}){const s=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,i={event_id:n,integrations:s};e.emit("preprocessEvent",r,i);const o=await $R(e.getOptions(),r,i,t,e,mi());if(!o)return null;e.emit("postprocessEvent",o,i),o.platform=o.platform||"javascript";const a=e.getSdkMetadata(),{name:l,version:u}=(a==null?void 0:a.sdk)||{};return o.sdk={...o.sdk,name:l||"sentry.javascript.unknown",version:u||"0.0.0"},o}async function P6({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:s,session:i}){const o=C6({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:l,traceIds:u,initialTimestamp:c}=r,d=dt(),f=Vt(),p=d==null?void 0:d.getTransport(),g=d==null?void 0:d.getDsn();if(!d||!p||!g||!i.sampled)return Gi({});const m={type:i8,replay_start_timestamp:c/1e3,timestamp:s/1e3,error_ids:l,trace_ids:u,urls:a,replay_id:t,segment_id:n,replay_type:i.sampled},y=await T6({scope:f,client:d,replayId:t,event:m});if(!y)return d.recordDroppedEvent("event_processor","replay"),Ke&&Ye.info("An event processor returned `null`, will not send event."),Gi({});delete y.sdkProcessingMetadata;const _=E6(y,o,g,d.getOptions().tunnel);let b;try{b=await p.send(_)}catch(C){const S=new Error(P_);try{S.cause=C}catch{}throw S}if(typeof b.statusCode=="number"&&(b.statusCode<200||b.statusCode>=300))throw new mA(b.statusCode);const x=GR({},b);if(WR(x,"replay"))throw new z_(x);return b}class mA extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class z_ extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function gA(e,t={count:0,interval:d8}){const{recordingData:n,onError:r}=e;if(n.length)try{return await P6(e),!0}catch(s){if(s instanceof mA||s instanceof z_)throw s;if(dU("Replays",{_retryCount:t.count}),r&&r(s),t.count>=f8){const i=new Error(`${P_} - max retries exceeded`);try{i.cause=s}catch{}throw i}return t.interval*=++t.count,new Promise((i,o)=>{cu(async()=>{try{await gA(e,t),i(!0)}catch(a){o(a)}},t.interval)})}}const vA="__THROTTLED",R6="__SKIPPED";function I6(e,t,n){const r=new Map,s=a=>{const l=a-n;r.forEach((u,c)=>{c<l&&r.delete(c)})},i=()=>[...r.values()].reduce((a,l)=>a+l,0);let o=!1;return(...a)=>{const l=Math.floor(Date.now()/1e3);if(s(l),i()>=t){const c=o;return o=!0,c?R6:vA}o=!1;const u=r.get(l)||0;return r.set(l,u+1),e(...a)}}class A6{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:o8,sessionIdleExpire:a8},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=_6(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=I6((o,a)=>Ej(this,o,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:s}=this.getOptions(),i=r?{threshold:Math.min(h8,r),timeout:r,scrollTimeout:p8,ignoreSelector:s?s.join(","):""}:void 0;if(i&&(this.clickDetector=new FH(this,i)),Ke){const o=t._experiments;Ye.setConfig({captureExceptions:!!o.captureExceptions,traceInternals:!!o.traceInternals})}this._handleVisibilityChange=()=>{jt.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const o=ii({category:"ui.blur"});this._doChangeToBackgroundTasks(o)},this._handleWindowFocus=()=>{const o=ii({category:"ui.focus"});this._doChangeToForegroundTasks(o)},this._handleKeyboardEvent=o=>{XH(this,o)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){Ke&&Ye.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options,s=n<=0&&r<=0;if(this._requiresManualStart=s,!s){if(this._initializeSessionForSampling(t),!this.session){Ke&&Ye.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",Ke&&Ye.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){Ke&&Ye.info("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){Ke&&Ye.info("Buffering is in progress, call `flush()` to save the replay");return}Ke&&Ye.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=Ng({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this._initializeRecording()}startBuffering(){if(this._isEnabled){Ke&&Ye.info("Buffering is in progress, call `flush()` to save the replay");return}Ke&&Ye.infoTick("Starting replay in buffer mode");const t=Ng({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=Li({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:c8}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:S6(this),...w6(),onMutation:this._onMutationHandler.bind(this),...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){var r;if(this._isEnabled){this._isEnabled=!1;try{Ke&&Ye.info(`Stopping Replay${n?` triggered by ${n}`:""}`),cA(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),(r=this.eventBuffer)==null||r.destroy(),this.eventBuffer=null,_j(this)}catch(s){this.handleException(s)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),Ke&&Ye.info("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),Ke&&Ye.info("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();Ke&&Ye.info("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode!=="buffer"&&n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){var t;return(t=this.session)==null?void 0:t.id}checkAndHandleExpiredSession(){if(this._lastActivity&&Ty(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${jt.location.pathname}${jt.location.hash}${jt.location.search}`,n=`${jt.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const r=this._throttledAddEvent(t,n);if(r===vA){const s=ii({category:"replay.throttled"});this.addUpdate(()=>!B_(this,{type:IH,timestamp:s.timestamp||0,data:{tag:"breadcrumb",payload:s,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||qn(),n=t&&zn(t),s=(n&&kt(n).data||{})[zr];if(!(!n||!s||!["route","custom"].includes(s)))return kt(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=vj({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=Ng({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const t=this.session;return oA(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{jt.document.addEventListener("visibilitychange",this._handleVisibilityChange),jt.addEventListener("blur",this._handleWindowBlur),jt.addEventListener("focus",this._handleWindowFocus),jt.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(v6(this,{autoFlushOnFeedback:this._options._experiments.autoFlushOnFeedback}),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=cj(this)}_removeListeners(){try{jt.document.removeEventListener("visibilitychange",this._handleVisibilityChange),jt.removeEventListener("blur",this._handleWindowBlur),jt.removeEventListener("focus",this._handleWindowFocus),jt.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){!this.session||iA(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){Ke&&Ye.info("Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:at.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=ej(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const n=this._context.initialTimestamp/1e3;t=t.filter(r=>r.start>=n)}return Promise.all(bm(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){var n;const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){Ke&&Ye.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!((n=this.eventBuffer)!=null&&n.hasEvents)&&(await y6(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const r=Date.now();if(r-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const s=this._popEventContext(),i=this.session.segmentId++;this._maybeSaveSession();const o=await this.eventBuffer.finish();await gA({replayId:t,recordingData:o,segmentId:i,eventContext:s,session:this.session,timestamp:r,onError:a=>this.handleException(a)})}catch(r){this.handleException(r),this.stop({reason:"sendReplay"});const s=dt();if(s){const i=r instanceof z_?"ratelimit_backoff":"send_error";s.recordDroppedEvent(i,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){Ke&&Ye.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,s=Date.now()-n;this._debouncedFlush.cancel();const i=s<this._options.minReplayDuration,o=s>this._options.maxReplayDuration+5e3;if(i||o){Ke&&Ye.info(`Session duration (${Math.floor(s/1e3)}s) is too ${i?"short":"long"}, not sending replay.`),i&&this._debouncedFlush();return}const a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&Ke&&Ye.info("Flushing initial segment without checkout.");const l=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(u){this.handleException(u)}finally{this._flushLock=void 0,l&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&V_(this.session)}_onMutationHandler(t){const n=t.length,r=this._options.mutationLimit,s=this._options.mutationBreadcrumbLimit,i=r&&n>r;if(n>s||i){const o=ii({category:"replay.mutations",data:{count:n,limit:i}});this._createCustomBreadcrumb(o)}return i?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function tc(e,t){return[...e,...t].join(",")}function O6({mask:e,unmask:t,block:n,unblock:r,ignore:s}){const i=["base","iframe[srcdoc]:not([src])"],o=tc(e,[".sentry-mask","[data-sentry-mask]"]),a=tc(t,[]);return{maskTextSelector:o,unmaskTextSelector:a,blockSelector:tc(n,[".sentry-block","[data-sentry-block]",...i]),unblockSelector:tc(r,[]),ignoreSelector:tc(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function M6({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:s,value:i}){return!r||s.unmaskTextSelector&&e.matches(s.unmaskTextSelector)?i:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?i.replace(/[\S]/g,"*"):i}const tk='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',D6=["content-length","content-type","accept"];let nk=!1;const L6=e=>new $6(e);class $6{constructor({flushMinDelay:t=l8,flushMaxDelay:n=u8,minReplayDuration:r=m8,maxReplayDuration:s=DS,stickySession:i=!0,useCompression:o=!0,workerUrl:a,_experiments:l={},maskAllText:u=!0,maskAllInputs:c=!0,blockAllMedia:d=!0,mutationBreadcrumbLimit:f=750,mutationLimit:p=1e4,slowClickTimeout:g=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:y=[],networkDetailDenyUrls:_=[],networkCaptureBodies:b=!0,networkRequestHeaders:x=[],networkResponseHeaders:C=[],mask:S=[],maskAttributes:T=["title","placeholder"],unmask:P=[],block:w=[],unblock:E=[],ignore:I=[],maskFn:O,beforeAddRecordingEvent:R,beforeErrorSampling:M,onError:D}={}){this.name="Replay";const F=O6({mask:S,unmask:P,block:w,unblock:E,ignore:I});if(this._recordingOptions={maskAllInputs:c,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:O,maskInputFn:O,maskAttributeFn:(U,K,Q)=>M6({maskAttributes:T,maskAllText:u,privacyOptions:F,key:U,value:K,el:Q}),...F,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:U=>{try{U.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!l.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,g8),maxReplayDuration:Math.min(s,DS),stickySession:i,useCompression:o,workerUrl:a,blockAllMedia:d,maskAllInputs:c,maskAllText:u,mutationBreadcrumbLimit:f,mutationLimit:p,slowClickTimeout:g,slowClickIgnoreSelectors:m,networkDetailAllowUrls:y,networkDetailDenyUrls:_,networkCaptureBodies:b,networkRequestHeaders:rk(x),networkResponseHeaders:rk(C),beforeAddRecordingEvent:R,beforeErrorSampling:M,onError:D,_experiments:l},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${tk}`:tk),this._isInitialized&&xS())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return nk}set _isInitialized(t){nk=t}afterAllSetup(t){!xS()||this._replay||(this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){var t;if((t=this._replay)!=null&&t.isEnabled())return this._replay.getSessionId()}getRecordingMode(){var t;if((t=this._replay)!=null&&t.isEnabled())return this._replay.recordingMode}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=F6(this._initialOptions,t);this._replay=new A6({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function F6(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},s=za(n.replaysSessionSampleRate),i=za(n.replaysOnErrorSampleRate);return s==null&&i==null&&pi(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),s!=null&&(r.sessionSampleRate=s),i!=null&&(r.errorSampleRate=i),r}function rk(e){return[...D6,...e.map(t=>t.toLowerCase())]}const sk=new WeakMap,Vg=new Map,yA={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function N6(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:s,shouldCreateSpanForRequest:i,enableHTTPTimings:o,tracePropagationTargets:a,onRequestSpanStart:l}={...yA,...t},u=typeof i=="function"?i:f=>!0,c=f=>U6(f,a),d={};n&&(e.addEventProcessor(f=>(f.type==="transaction"&&f.spans&&f.spans.forEach(p=>{if(p.op==="http.client"){const g=Vg.get(p.span_id);g&&(p.timestamp=g/1e3,Vg.delete(p.span_id))}}),f)),s&&T4(f=>{if(f.response){const p=sk.get(f.response);p&&f.endTimestamp&&Vg.set(p,f.endTimestamp)}}),nI(f=>{const p=b4(f,u,c,d);if(f.response&&f.fetchData.__span&&sk.set(f.response,f.fetchData.__span),p){const g=bA(f.fetchData.url),m=g?Oa(g).host:void 0;p.setAttributes({"http.url":g,"server.address":m}),o&&ik(p),l==null||l(p,{headers:f.headers})}})),r&&SI(f=>{var g;const p=z6(f,u,c,d);if(p){o&&ik(p);let m;try{m=new Headers((g=f.xhr.__sentry_xhr_v3__)==null?void 0:g.request_headers)}catch{}l==null||l(p,{headers:m})}})}function V6(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function ik(e){const{url:t}=kt(e).data;if(!t||typeof t!="string")return;const n=uu("resource",({entries:r})=>{r.forEach(s=>{V6(s)&&s.name.endsWith(t)&&(B6(s).forEach(o=>e.setAttribute(...o)),setTimeout(n))})})}function js(e=0){return((Yr()||performance.timeOrigin)+e)/1e3}function B6(e){const{name:t,version:n}=bI(e.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",t]),Yr()?[...r,["http.request.redirect_start",js(e.redirectStart)],["http.request.fetch_start",js(e.fetchStart)],["http.request.domain_lookup_start",js(e.domainLookupStart)],["http.request.domain_lookup_end",js(e.domainLookupEnd)],["http.request.connect_start",js(e.connectStart)],["http.request.secure_connection_start",js(e.secureConnectionStart)],["http.request.connection_end",js(e.connectEnd)],["http.request.request_start",js(e.requestStart)],["http.request.response_start",js(e.responseStart)],["http.request.response_end",js(e.responseEnd)]]:r}function U6(e,t){const n=Du();if(n){let r,s;try{r=new URL(e,n),s=new URL(n).origin}catch{return!1}const i=r.origin===s;return t?Po(r.toString(),t)||i&&Po(r.pathname,t):i}else{const r=!!e.match(/^\/(?!\/)/);return t?Po(e,t):r}}function z6(e,t,n,r){const s=e.xhr,i=s==null?void 0:s[ha];if(!s||s.__sentry_own_request__||!i)return;const{url:o,method:a}=i,l=qi()&&t(o);if(e.endTimestamp&&l){const m=s.__sentry_xhr_span_id__;if(!m)return;const y=r[m];y&&i.status_code!==void 0&&(fR(y,i.status_code),y.end(),delete r[m]);return}const u=bA(o),c=Oa(u||o),d=y4(o),f=!!qn(),p=l&&f?qa({name:`${a} ${d}`,attributes:{url:o,type:"xhr","http.method":a,"http.url":u,"server.address":c==null?void 0:c.host,[on]:"auto.http.browser",[Ua]:"http.client",...(c==null?void 0:c.search)&&{"http.query":c==null?void 0:c.search},...(c==null?void 0:c.hash)&&{"http.fragment":c==null?void 0:c.hash}}}):new ja;s.__sentry_xhr_span_id__=p.spanContext().spanId,r[s.__sentry_xhr_span_id__]=p,n(o)&&H6(s,qi()&&f?p:void 0);const g=dt();return g&&g.emit("beforeOutgoingRequestSpan",p,e),p}function H6(e,t){const{"sentry-trace":n,baggage:r}=YR({span:t});n&&j6(e,n,r)}function j6(e,t,n){var s;const r=(s=e.__sentry_xhr_v3__)==null?void 0:s.request_headers;if(!(r!=null&&r["sentry-trace"]))try{if(e.setRequestHeader("sentry-trace",t),n){const i=r==null?void 0:r.baggage;(!i||!q6(i))&&e.setRequestHeader("baggage",n)}}catch{}}function q6(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function bA(e){try{return new URL(e,wt.location.origin).href}catch{return}}function W6(){wt.document?wt.document.addEventListener("visibilitychange",()=>{const e=qn();if(!e)return;const t=zn(e);if(wt.document.hidden&&t){const n="cancelled",{op:r,status:s}=kt(t);cs&&Pe.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),s||t.setStatus({code:Tn,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):cs&&Pe.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const G6=3600,_A="sentry_previous_trace",K6="sentry.previous_trace";function Y6(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let s=r?J6():void 0;e.on("spanStart",o=>{if(zn(o)!==o)return;const a=Vt().getPropagationContext();s=X6(s,o,a),r&&Q6(s)});let i=!0;n&&e.on("beforeSampling",o=>{if(!s)return;const a=Vt(),l=a.getPropagationContext();if(i&&l.parentSpanId){i=!1;return}a.setPropagationContext({...l,dsc:{...l.dsc,sample_rate:String(s.sampleRate),sampled:String(Iy(s.spanContext))},sampleRand:s.sampleRand}),o.parentSampled=Iy(s.spanContext),o.parentSampleRate=s.sampleRate,o.spanAttributes={...o.spanAttributes,[cR]:s.sampleRate}})}function X6(e,t,n){const r=kt(t);function s(){var a,l;try{return Number((a=n.dsc)==null?void 0:a.sample_rate)??Number((l=r.data)==null?void 0:l[m_])}catch{return 0}}const i={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:s(),sampleRand:n.sampleRand};if(!e)return i;const o=e.spanContext;return o.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=G6&&(cs&&Pe.info(`Adding previous_trace ${o} link to span ${{op:r.op,...t.spanContext()}}`),t.addLink({context:o,attributes:{[jB]:"previous_trace"}}),t.setAttribute(K6,`${o.traceId}-${o.spanId}-${Iy(o)?1:0}`)),i)}function Q6(e){try{wt.sessionStorage.setItem(_A,JSON.stringify(e))}catch(t){cs&&Pe.warn("Could not store previous trace in sessionStorage",t)}}function J6(){var e;try{const t=(e=wt.sessionStorage)==null?void 0:e.getItem(_A);return JSON.parse(t)}catch{return}}function Iy(e){return e.traceFlags===1}const Z6="BrowserTracing",eq={...nh,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,_experiments:{},...yA};let ok=!1;const ak=(e={})=>{ok&&pi(()=>{console.warn("Multiple browserTracingIntegration instances are not supported.")}),ok=!0;const t=wt.document;f3();const{enableInp:n,enableLongTask:r,enableLongAnimationFrame:s,_experiments:{enableInteractions:i,enableStandaloneClsSpans:o},beforeStartSpan:a,idleTimeout:l,finalTimeout:u,childSpanTimeout:c,markBackgroundSpan:d,traceFetch:f,traceXHR:p,trackFetchStreamPerformance:g,shouldCreateSpanForRequest:m,enableHTTPTimings:y,instrumentPageLoad:_,instrumentNavigation:b,linkPreviousTrace:x,consistentTraceSampling:C,onRequestSpanStart:S}={...eq,...e},T=D5({recordClsStandaloneSpans:o||!1});n&&iz(),s&&ft.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?$5():r&&L5(),i&&F5();const P={name:void 0,source:void 0};function w(E,I){const O=I.op==="pageload",R=a?a(I):I,M=R.attributes||{};I.name!==R.name&&(M[zr]="custom",R.attributes=M),P.name=R.name,P.source=M[zr];const D=LR(R,{idleTimeout:l,finalTimeout:u,childSpanTimeout:c,disableAutoFinish:O,beforeSpanEnd:U=>{T(),z5(U,{recordClsOnPageloadSpan:!o}),uk(E,void 0);const K=Vt(),Q=K.getPropagationContext();K.setPropagationContext({...Q,traceId:D.spanContext().traceId,sampled:nl(D),dsc:Wi(U)})}});uk(E,D);function F(){t&&["interactive","complete"].includes(t.readyState)&&E.emit("idleSpanEnableAutoFinish",D)}O&&t&&(t.addEventListener("readystatechange",()=>{F()}),F())}return{name:Z6,afterAllSetup(E){let I=Du();function O(){const R=wm(E);R&&!kt(R).timestamp&&(cs&&Pe.log(`[Tracing] Finishing current active span with op: ${kt(R).op}`),R.end())}if(E.on("startNavigationSpan",R=>{dt()===E&&(O(),mi().setPropagationContext({traceId:$o(),sampleRand:Math.random()}),Vt().setPropagationContext({traceId:$o(),sampleRand:Math.random()}),w(E,{op:"navigation",...R}))}),E.on("startPageLoadSpan",(R,M={})=>{if(dt()!==E)return;O();const D=M.sentryTrace||lk("sentry-trace"),F=M.baggage||lk("baggage"),U=e3(D,F);Vt().setPropagationContext(U),w(E,{op:"pageload",...R})}),x!=="off"&&Y6(E,{linkPreviousTrace:x,consistentTraceSampling:C}),wt.location){if(_){const R=Yr();tq(E,{name:wt.location.pathname,startTime:R?R/1e3:void 0,attributes:{[zr]:"url",[on]:"auto.pageload.browser"}})}b&&pm(({to:R,from:M})=>{if(M===void 0&&(I==null?void 0:I.indexOf(R))!==-1){I=void 0;return}M!==R&&(I=void 0,wA(E,{name:wt.location.pathname,attributes:{[zr]:"url",[on]:"auto.navigation.browser"}}))})}d&&W6(),i&&nq(E,l,u,c,P),n&&az(),N6(E,{traceFetch:f,traceXHR:p,trackFetchStreamPerformance:g,tracePropagationTargets:E.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:m,enableHTTPTimings:y,onRequestSpanStart:S})}}};function tq(e,t,n){return e.emit("startPageLoadSpan",t,n),Vt().setTransactionName(t.name),wm(e)}function wA(e,t){return e.emit("startNavigationSpan",t),Vt().setTransactionName(t.name),wm(e)}function lk(e){const t=wt.document,n=t==null?void 0:t.querySelector(`meta[name=${e}]`);return(n==null?void 0:n.getAttribute("content"))||void 0}function nq(e,t,n,r,s){const i=wt.document;let o;const a=()=>{const l="ui.action.click",u=wm(e);if(u){const c=kt(u).op;if(["navigation","pageload"].includes(c)){cs&&Pe.warn(`[Tracing] Did not create ${l} span because a pageload or navigation span is in progress.`);return}}if(o&&(o.setAttribute(ry,"interactionInterrupted"),o.end(),o=void 0),!s.name){cs&&Pe.warn(`[Tracing] Did not create ${l} transaction because _latestRouteName is missing.`);return}o=LR({name:s.name,op:l,attributes:{[zr]:s.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};i&&addEventListener("click",a,{once:!1,capture:!0})}const SA="_sentry_idleSpan";function wm(e){return e[SA]}function uk(e,t){Wr(e,SA,t)}const kA=["activate","mount"],xA=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,rq=/(?:^|[-_])(\w)/g,sq=e=>e.replace(rq,t=>t.toUpperCase()).replace(/[-_]/g,""),iq="<Root>",Bg="<Anonymous>",oq=(e,t)=>e.repeat(t),Ac=(e,t)=>{if(!e)return Bg;if(e.$root===e)return iq;if(!e.$options)return Bg;const n=e.$options;let r=n.name||n._componentTag||n.__name;const s=n.__file;if(!r&&s){const i=s.match(/([^/\\]+)\.vue$/);i&&(r=i[1])}return(r?`<${sq(r)}>`:Bg)+(s&&t!==!1?` at ${s}`:"")},aq=e=>{if(e&&(e._isVue||e.__isVue)&&e.$parent){const t=[];let n=0;for(;e;){if(t.length>0){const s=t[t.length-1];if(s.constructor===e.constructor){n++,e=e.$parent;continue}else n>0&&(t[t.length-1]=[s,n],n=0)}t.push(e),e=e.$parent}return`
|
|
54
|
+
|
|
55
|
+
found in
|
|
56
|
+
|
|
57
|
+
${t.map((s,i)=>`${(i===0?"---> ":oq(" ",5+i*2))+(Array.isArray(s)?`${Ac(s[0])}... (${s[1]} recursive calls)`:Ac(s))}`).join(`
|
|
58
|
+
`)}`}return`
|
|
59
|
+
|
|
60
|
+
(found in ${Ac(e)})`},lq=(e,t)=>{const{errorHandler:n}=e.config;e.config.errorHandler=(r,s,i)=>{var u;const o=Ac(s,!1),a=s?aq(s):"",l={componentName:o,lifecycleHook:i,trace:a};if(t.attachProps&&s&&((u=s.$options)!=null&&u.propsData?l.propsData=s.$options.propsData:s.$props&&(l.propsData=s.$props)),setTimeout(()=>{ai(r,{captureContext:{contexts:{vue:l}},mechanism:{handled:!!n,type:"vue"}})}),typeof n=="function"&&e.config.errorHandler)n.call(e,r,s,i);else throw r}},ck="ui.vue",uq={activate:["activated","deactivated"],create:["beforeCreate","created"],unmount:["beforeUnmount","unmounted"],destroy:["beforeDestroy","destroyed"],mount:["beforeMount","mounted"],update:["beforeUpdate","updated"]};function cq(e,t,n){e.$_sentryRootSpanTimer&&clearTimeout(e.$_sentryRootSpanTimer),e.$_sentryRootSpanTimer=setTimeout(()=>{var r;(r=e.$root)!=null&&r.$_sentryRootSpan&&(e.$root.$_sentryRootSpan.end(t),e.$root.$_sentryRootSpan=void 0)},n)}function dq(e,t){function n(s){return s.replace(/^<([^\s]*)>(?: at [^\s]*)?$/,"$1")}return e.some(s=>n(t)===n(s))}const fq=(e={})=>{const t=(e.hooks||[]).concat(kA).filter((r,s,i)=>i.indexOf(r)===s),n={};for(const r of t){const s=uq[r];if(!s){xA&&Pe.warn(`Unknown hook: ${r}`);continue}for(const i of s)n[i]=function(){var u;const o=this.$root===this;o&&(this.$_sentryRootSpan=this.$_sentryRootSpan||qa({name:"Application Render",op:`${ck}.render`,attributes:{[on]:"auto.ui.vue"},onlyIfParent:!0}));const a=Ac(this,!1),l=Array.isArray(e.trackComponents)?dq(e.trackComponents,a):e.trackComponents;if(!(!o&&!l))if(this.$_sentrySpans=this.$_sentrySpans||{},i==s[0]){if(((u=this.$root)==null?void 0:u.$_sentryRootSpan)||qn()){const d=this.$_sentrySpans[r];d&&d.end(),this.$_sentrySpans[r]=qa({name:`Vue ${a}`,op:`${ck}.${r}`,attributes:{[on]:"auto.ui.vue"},onlyIfParent:!0})}}else{const c=this.$_sentrySpans[r];if(!c)return;c.end(),cq(this,nr(),e.timeout||2e3)}}}return n},hq=ft,pq={Vue:hq.Vue,attachProps:!0,attachErrorHandler:!0,tracingOptions:{hooks:kA,timeout:2e3,trackComponents:!1}},mq="Vue",gq=(e={})=>({name:mq,setup(t){const n={...pq,...t.getOptions(),...e};if(!n.Vue&&!n.app){pi(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue specific errors will not be captured. Update your `Sentry.init` call with an appropriate config option: `app` (Application Instance - Vue 3) or `Vue` (Vue Constructor - Vue 2).")});return}n.app?(Array.isArray(n.app)?n.app:[n.app]).forEach(s=>dk(s,n)):n.Vue&&dk(n.Vue,n)}}),dk=(e,t)=>{var n;xA&&((n=e._instance)==null?void 0:n.isMounted)===!0&&pi(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue app is already mounted. Make sure to call `app.mount()` after `Sentry.init()`.")}),t.attachErrorHandler&&lq(e,t),qi(t)&&e.mixin(fq(t.tracingOptions))};function vq(e={}){const t={defaultIntegrations:[...PI(),gq()],...e};return KR(t,"vue"),s8(t)}function yq(e,t,n){let r=!0;e.onError(s=>ai(s,{mechanism:{handled:!1}})),e.beforeEach((s,i,o)=>{const a=i.name==null&&i.matched.length===0||i.name===void 0&&r;r&&(r=!1);const l={[on]:"auto.navigation.vue"};for(const d of Object.keys(s.params))l[`params.${d}`]=s.params[d];for(const d of Object.keys(s.query)){const f=s.query[d];f&&(l[`query.${d}`]=f)}let u=s.path,c="url";if(s.name&&t.routeLabel!=="path")u=s.name.toString(),c="custom";else if(s.matched.length>0){const d=s.matched.length-1;u=s.matched[d].path,c="route"}if(Vt().setTransactionName(u),t.instrumentPageLoad&&a){const d=bq();d&&(kt(d).data[zr]!=="custom"&&(d.updateName(u),d.setAttribute(zr,c)),d.setAttributes({...l,[on]:"auto.pageload.vue"}))}t.instrumentNavigation&&!a&&(l[zr]=c,l[on]="auto.navigation.vue",n({name:u,op:"navigation",attributes:l})),o&&o()})}function bq(){const e=qn(),t=e&&zn(e);if(!t)return;const n=kt(t).op;return n==="navigation"||n==="pageload"?t:void 0}function _q(e={}){if(!e.router)return ak(e);const t=ak({...e,instrumentNavigation:!1}),{router:n,instrumentNavigation:r=!0,instrumentPageLoad:s=!0,routeLabel:i="name"}=e;return{...t,afterAllSetup(o){t.afterAllSetup(o),yq(n,{routeLabel:i,instrumentNavigation:r,instrumentPageLoad:s},l=>{wA(o,l)})}}}async function EA(){return"/"}async function Qn(e=!0,t=!0){const n=hn.create({baseURL:await EA()});return n.interceptors.request.use(r=>{var s,i;return console.debug(`${(s=r.method)==null?void 0:s.toUpperCase().padEnd(6)} ${(i=r.url)==null?void 0:i.padEnd(25)} WithAuth: ${e==null?void 0:e.toString().padEnd(7)} AutoHandle401: ${t==null?void 0:t.toString().padEnd(7)} BaseURL: ${r.baseURL}`),r}),e&&n.interceptors.request.use(async r=>{const s=us();return s.loadTokens(),s.hasAuthToken&&(r.headers.Authorization=`Bearer ${s.token}`),r},r=>(console.error("Error in axios request interceptor",r),Promise.reject(r))),t&&n.interceptors.response.use(r=>r,async r=>{var d;const{response:s,config:i}=r;if(!s)return console.error("No response was returned by axios",r),Promise.reject({message:`No response was returned by axios - URL ${i==null?void 0:i.url}`,stack:r.stack});if(s.status===fa.FailedDependency)return Promise.reject(r);if(![fa.Unauthorized,fa.Forbidden].includes(s.status))return console.error("Error in axios response interceptor which is not 401 or 403",r),ai(r),Promise.reject({message:`${r.message} - URL ${i==null?void 0:i.url}`,stack:r.stack});if(s.status===fa.Forbidden){const f=(d=r==null?void 0:r.response)==null?void 0:d.data;return console.error("[HttpClient] 403 Forbidden",f),Vr("auth:permission-denied").emit({roles:f==null?void 0:f.roles,permissions:f==null?void 0:f.permissions,error:f==null?void 0:f.error,url:i==null?void 0:i.url}),Promise.reject(r)}const o=us();o.loadTokens();const{reasonCode:a,url:l}=o.extractSpecialReasonCode(r);if(a)return await o.logout(!1,l_(a)),console.error(`[AuthStore] 401 Unauthorized - emitting 'auth:${a}' with reason ${a}`),Vr(`auth:${a}`).emit({url:l,error:r.message,reasonCode:a}),Promise.reject(r);await o.checkAuthenticationRequirements();const{success:u,handled:c}=await o.verifyOrRefreshLoginOnceOrLogout();if(c)return Promise.reject(r);if(u){if(!(i!=null&&i.url))throw new Error("No URL in axios config, cannot retry");console.debug("Redoing request without interceptors",i==null?void 0:i.url);const f=i;return f.headers||(f.headers={}),f.headers.Authorization=`Bearer ${o.token}`,hn(f)}return console.error("[HttpClient] 401 Unauthorized - emitting 'auth:failure'"),Vr("auth:failure").emit({url:i==null?void 0:i.url,error:r.message}),Promise.reject(r)}),n}class gr{static async get(t){return(await(await Qn(!0)).get(t)).data}static async put(t,n){return(await(await Qn(!0)).put(t,n)).data}static async post(t,n){return(await(await Qn(!0)).post(t,n)).data}static async postUpload(t,n,r){return await(await Qn(!0)).post(t,n,r)}static async getDownload(t,n){return await(await Qn(!0)).request({method:"GET",url:t,data:n,responseType:"arraybuffer"})}static async delete(t,n){return(await(await Qn(!0)).request({url:t,method:"delete",data:n})).data}static async patch(t,n){return(await(await Qn(!0)).patch(t,n)).data}}const oe=class oe{};_e(oe,"base","/api"),_e(oe,"firstTimeSetupRoute",`${oe.base}/first-time-setup`),_e(oe,"completeFirstTimeSetupRoute",`${oe.firstTimeSetupRoute}/complete`),_e(oe,"printerRoute",`${oe.base}/printer`),_e(oe,"printerBatchRoute",`${oe.printerRoute}/batch`),_e(oe,"printerTestConnectionRoute",`${oe.printerRoute}/test-connection`),_e(oe,"printerSettingsRoute",`${oe.base}/printer-settings`),_e(oe,"floorRoute",`${oe.base}/floor`),_e(oe,"batchRoute",`${oe.base}/batch`),_e(oe,"batchGetLastPrintedFilesRoute",`${oe.batchRoute}/reprint/list`),_e(oe,"batchReprintFilesRoute",`${oe.batchRoute}/reprint/execute`),_e(oe,"printCompletionRoute",`${oe.base}/print-completion`),_e(oe,"printerFilesRoute",`${oe.base}/printer-files`),_e(oe,"printerFilesPurgeRoute",`${oe.printerFilesRoute}/purge`),_e(oe,"printerGroupRoute",`${oe.base}/printer-group`),_e(oe,"createGroupRoute",`${oe.base}/printer-group`),_e(oe,"customGCodeRoute",`${oe.base}/custom-gcode`),_e(oe,"userRoute",`${oe.base}/user`),_e(oe,"rolesRoute",`${oe.base}/user/roles`),_e(oe,"userProfileRoute",`${oe.userRoute}/profile`),_e(oe,"settingsRoute",`${oe.base}/settings`),_e(oe,"settingsSensitiveRoute",`${oe.settingsRoute}/sensitive`),_e(oe,"updateLoginRequiredRoute",`${oe.settingsRoute}/login-required`),_e(oe,"updateRegistrationEnabledRoute",`${oe.settingsRoute}/registration-enabled`),_e(oe,"updateCredentialSettings",`${oe.settingsRoute}/credential`),_e(oe,"fileCleanSettingsRoute",`${oe.settingsRoute}/file-clean`),_e(oe,"updateFrontendSettingsRoute",`${oe.settingsRoute}/frontend`),_e(oe,"updateTimeoutSettingRoute",`${oe.settingsRoute}/timeout`),_e(oe,"serverSentryDiagnosticsSettingRoute",`${oe.settingsRoute}/sentry-diagnostics`),_e(oe,"updateExperimentalMoonrakerSupportRoute",`${oe.settingsRoute}/experimental-moonraker-support`),_e(oe,"updateExperimentalThumbnailSupportRoute",`${oe.settingsRoute}/experimental-thumbnail-support`),_e(oe,"updateExperimentalClientSupportRoute",`${oe.settingsRoute}/experimental-client-support`),_e(oe,"updateExperimentalPrusaLinkSupportRoute",`${oe.settingsRoute}/experimental-prusa-link-support`),_e(oe,"deleteGroupRoute",t=>`${oe.base}/printer-group/${t}`),_e(oe,"updateGroupNameRoute",t=>`${oe.base}/printer-group/${t}/name`),_e(oe,"addPrinterToGroupRoute",t=>`${oe.base}/printer-group/${t}/printer`),_e(oe,"deletePrinterFromGroupRoute",oe.addPrinterToGroupRoute),_e(oe,"getPrinterRoute",t=>`${oe.printerRoute}/${t}`),_e(oe,"postPrinterDisabledReasonRoute",t=>`${oe.printerRoute}/${t}/disabled-reason`),_e(oe,"getPrinterLoginDetailsRoute",t=>`${oe.getPrinterRoute(t)}/login-details`),_e(oe,"restartOctoPrintRoute",t=>`${oe.getPrinterRoute(t)}/restart-octoprint`),_e(oe,"refreshSocketRoute",t=>`${oe.getPrinterRoute(t)}/refresh-socket`),_e(oe,"getPrinterSettingsRoute",t=>`${oe.printerSettingsRoute}/${t}`),_e(oe,"setPrinterSettingsGCodeAnalysisRoute",t=>`${oe.getPrinterSettingsRoute(t)}/gcode-analysis`),_e(oe,"syncPrinterNameSettingRoute",t=>`${oe.getPrinterSettingsRoute(t)}/sync-printername`),_e(oe,"getFloorRoute",t=>`${oe.floorRoute}/${t}`),_e(oe,"addOrRemovePrinterFromFloorRoute",t=>`${oe.getFloorRoute(t)}/printer`),_e(oe,"sendQuickStopM112Route",t=>`${oe.customGCodeRoute}/send-emergency-m112/${t}`),_e(oe,"updatePrinterFloorNameRoute",t=>`${oe.getFloorRoute(t)}/name`),_e(oe,"updatePrinterFloorNumberRoute",t=>`${oe.getFloorRoute(t)}/floor-number`),_e(oe,"printerFilesClearRoute",t=>`${oe.printerFilesRoute}/${t}/clear`),_e(oe,"printerFilesSelectAndPrintRoute",t=>`${oe.printerFilesRoute}/${t}/select`),_e(oe,"printerFilesUploadRoute",t=>`${oe.printerFilesRoute}/${t}/upload`),_e(oe,"printerFilesCacheRoute",t=>`${oe.printerFilesRoute}/${t}/cache`),_e(oe,"printerEnabledRoute",t=>`${oe.getPrinterRoute(t)}/enabled`),_e(oe,"printerSerialConnectRoute",t=>`${oe.getPrinterRoute(t)}/serial-connect`),_e(oe,"printerJogCommandRoute",t=>`${oe.getPrinterRoute(t)}/jog`),_e(oe,"printerHomeCommandRoute",t=>`${oe.getPrinterRoute(t)}/home`),_e(oe,"printerSerialDisconnectRoute",t=>`${oe.getPrinterRoute(t)}/serial-disconnect`),_e(oe,"printerJobRoute",t=>`${oe.getPrinterRoute(t)}/job`),_e(oe,"printerStopJobRoute",t=>`${oe.printerJobRoute(t)}/stop`),_e(oe,"printerPauseJobRoute",t=>`${oe.printerJobRoute(t)}/pause`),_e(oe,"printerResumeJobRoute",t=>`${oe.printerJobRoute(t)}/resume`),_e(oe,"userChangeUsernameRoute",t=>`${oe.userRoute}/${t}/change-username`),_e(oe,"userChangePasswordRoute",t=>`${oe.userRoute}/${t}/change-password`),_e(oe,"userDeleteRoute",t=>`${oe.userRoute}/${t}`),_e(oe,"userSetVerifiedRoute",t=>`${oe.userRoute}/${t}/set-verified`),_e(oe,"userSetRootUserRoute",t=>`${oe.userRoute}/${t}/set-root-user`),_e(oe,"userSetUserRolesRoute",t=>`${oe.userRoute}/${t}/set-user-roles`);let Me=oe;const wq=Symbol("Progress snackbar message event symbol"),Sq=Symbol("Info snackbar message event symbol"),kq=Symbol("Error snackbar message event symbol");function Dt(){const{emit:e,on:t}=Vr(wq),{emit:n,on:r}=Vr(Sq),{emit:s,on:i}=Vr(kq);return{openProgressMessage:(o,a,l,u)=>e({key:o,title:a,value:l,completed:u}),openInfoMessage:o=>n(o),info:(o,a,l)=>n({title:o,subtitle:a,timeout:l}),openErrorMessage:o=>s(o),error:(o,a)=>s({title:o,subtitle:a}),onProgressMessage:t,onInfoMessage:r,onErrorMessage:i}}function Ay(e,t){if(!e)throw new Error("No data to download");const n=new Blob([e],{type:"text/plain"}),r=document.createElement("a");r.href=URL.createObjectURL(n),r.download=t,r.click(),URL.revokeObjectURL(r.href)}class $i extends gr{static async getFiles(t){const n=`${Me.printerFilesRoute}/${t}`;return await this.get(n)}static async getThumbnail(t){const n=`${Me.printerFilesRoute}/${t}/thumbnail`;return await this.get(n)}static async getFileCache(t){const n=`${Me.printerFilesCacheRoute(t)}`;return await this.get(n)}static async selectAndPrintFile(t,n,r=!0){const s=Me.printerFilesSelectAndPrintRoute(t);return await this.post(s,{filePath:n,print:r})}static async uploadFile(t,n){const r=Me.printerFilesUploadRoute(t.id),s=new FormData;return s.append("files[0]",n),this.postUpload(r,s,{onUploadProgress:i=>{Dt().openProgressMessage("single-file-upload",`Uploading file ${n.name}`,100*i.loaded/i.total,!1)}})}static async clearFiles(t){const n=`${Me.printerFilesClearRoute(t)}`;return this.delete(n)}static async purgeFiles(){const t=`${Me.printerFilesPurgeRoute}`;return this.post(t)}static async deleteFileOrFolder(t,n){const r=`${Me.printerFilesRoute}/${t}?path=${encodeURIComponent(n)}`;return this.delete(r)}static async downloadFile(t,n){const r=`${Me.printerFilesRoute}/${t}/download/${encodeURIComponent(n)}`,s=await this.getDownload(r);Ay(s.data,n)}}const xq=["able","above","absent","absolute","abstract","abundant","academic","acceptable","accepted","accessible","accurate","accused","active","actual","acute","added","additional","adequate","adjacent","administrative","adorable","advanced","adverse","advisory","aesthetic","afraid","afraid","african","aggregate","aggressive","agreeable","agreed","agricultural","alert","alive","alive","alleged","allied","alone","alright","alternative","amateur","amazing","ambitious","american","amused","ancient","ancient","angry","angry","annoyed","annual","anonymous","anxious","anxious","appalling","apparent","applicable","appropriate","arab","arbitrary","architectural","armed","arrogant","artificial","artistic","ashamed","ashamed","asian","asleep","assistant","associated","atomic","attractive","australian","automatic","autonomous","available","average","average","average","awake","aware","awful","awful","awkward","back","bad","bad","bad","balanced","bare","basic","beautiful","beautiful","beautiful","beneficial","better","bewildered","big","big","big","binding","biological","bitter","bitter","bizarre","black","black","blank","blind","blonde","bloody","bloody","blue","blue","blushing","boiling","bold","bored","bored","boring","bottom","brainy","brave","brave","breakable","breezy","brief","brief","bright","bright","bright","brilliant","british","broad","broad","broken","broken","brown","bumpy","burning","busy","busy","calm","calm","canadian","capable","capitalist","careful","careful","casual","catholic","causal","cautious","cautious","central","certain","changing","characteristic","charming","charming","cheap","cheerful","cheerful","chemical","chief","chilly","chinese","chosen","christian","chronic","chubby","circular","civic","civil","civilian","classic","classical","clean","clean","clear","clear","clever","clever","clinical","close","closed","cloudy","clumsy","coastal","cognitive","coherent","cold","cold","collective","colonial","colorful","colossal","coloured","colourful","combative","combined","comfortable","comfortable","coming","commercial","common","communist","compact","comparable","comparative","compatible","competent","competitive","complete","complex","complicated","comprehensive","compulsory","conceptual","concerned","concerned","concrete","condemned","confident","confidential","confused","confused","conscious","conservation","conservative","considerable","consistent","constant","constitutional","contemporary","content","continental","continued","continuing","continuous","controlled","controversial","convenient","conventional","convinced","convincing","cooing","cool","cool","cooperative","corporate","correct","corresponding","costly","courageous","crazy","crazy","crazy","creative","creepy","creepy","criminal","critical","crooked","crooked","crowded","crucial","crude","cruel","cruel","cuddly","cultural","curious","curious","curly","current","curved","cute","daily","damaged","damp","damp","dangerous","dangerous","dark","dark","dead","dead","deaf","deafening","dear","decent","decisive","deep","deep","defeated","defensive","defiant","definite","deliberate","delicate","delicious","delicious","delighted","delightful","delightful","democratic","dependent","depressed","depressed","desirable","desperate","detailed","determined","determined","developed","developing","devoted","different","different","difficult","difficult","digital","diplomatic","direct","dirty","dirty","disabled","disappointed","disastrous","disciplinary","disgusted","distant","distinct","distinct","distinctive","distinguished","disturbed","disturbing","diverse","divine","dizzy","domestic","dominant","double","doubtful","doubtful","drab","dramatic","dreadful","driving","drunk","dry","dry","dual","due","dull","dull","dull","dusty","dutch","dying","dynamic","eager","eager","early","early","eastern","easy","easy","economic","educational","eerie","effective","efficient","elaborate","elated","elderly","eldest","electoral","electric","electrical","electronic","elegant","elegant","eligible","embarrassed","embarrassed","embarrassing","emotional","empirical","empty","empty","enchanting","encouraging","encouraging","endless","energetic","english","enormous","enthusiastic","enthusiastic","entire","entitled","envious","environmental","equal","equivalent","essential","established","estimated","ethical","ethnic","european","eventual","everyday","evident","evil","evil","evolutionary","exact","excellent","exceptional","excess","excessive","excited","excited","exciting","exclusive","existing","exotic","expected","expensive","experienced","experimental","explicit","extended","extensive","external","extra","extraordinary","extreme","exuberant","faint","faint","fair","fair","faithful","faithful","familiar","famous","famous","fancy","fantastic","fantastic","far","fascinating","fashionable","fast","fast","fat","fat","fat","fatal","favourable","favourite","federal","fellow","female","feminist","few","fierce","fierce","filthy","filthy","final","financial","fine","fine","firm","fiscal","fit","fixed","flaky","flat","flat","flexible","fluffy","fluttering","flying","following","fond","foolish","foolish","foreign","formal","formidable","forthcoming","fortunate","forward","fragile","frail","frantic","free","french","frequent","fresh","fresh","friendly","friendly","friendly","frightened","frightened","front","frozen","fucking","full","full-time","fun","functional","fundamental","funny","funny","funny","furious","future","fuzzy","gastric","gay","general","generous","genetic","gentle","gentle","genuine","geographical","german","giant","giant","gigantic","gigantic","given","glad","glamorous","gleaming","global","glorious","glorious","golden","good","good","gorgeous","gothic","governing","graceful","gradual","grand","grateful","greasy","great","great","great","greek","green","green","grey","grieving","grim","gross","grotesque","growing","grubby","grumpy","guilty","handicapped","handsome","handsome","happy","happy","happy","hard","hard","harsh","harsh","head","healthy","healthy","heavy","heavy","helpful","helpful","helpful","helpless","helpless","hidden","high","high","high-pitched","hilarious","hissing","historic","historical","hollow","holy","homeless","homeless","homely","hon","honest","horizontal","horrible","horrible","hostile","hot","hot","huge","huge","human","hungry","hungry","hurt","hushed","husky","icy","ideal","identical","ideological","ill","ill","illegal","imaginative","immediate","immense","immense","imperial","implicit","important","important","impossible","impossible","impressed","impressive","improved","inadequate","inappropriate","inc","inclined","increased","increasing","incredible","independent","indian","indirect","individual","industrial","inevitable","influential","informal","inherent","initial","injured","inland","inner","innocent","innocent","innovative","inquisitive","instant","institutional","insufficient","intact","integral","integrated","intellectual","intelligent","intense","intensive","interested","interesting","interim","interior","intermediate","internal","international","intimate","invisible","involved","iraqi","irish","irrelevant","islamic","isolated","israeli","italian","itchy","japanese","jealous","jewish","jittery","joint","jolly","jolly","joyous","judicial","juicy","junior","just","keen","key","kind","kind","kind","known","korean","labour","large","large","large-scale","late","late","latin","lazy","leading","left","legal","legislative","legitimate","lengthy","lesser","level","lexical","liable","liberal","light","light","light","like","likely","limited","linear","linguistic","liquid","literary","little","little","live","lively","lively","living","local","logical","lonely","lonely","long","long","long","long","long-term","loose","loose","lost","loud","loud","lovely","lovely","low","low","loyal","ltd","lucky","lucky","mad","magenta","magic","magnetic","magnificent","magnificent","main","major","male","mammoth","managerial","managing","manual","many","many","marginal","marine","marked","married","marvellous","marxist","mass","massive","massive","mathematical","mature","maximum","mean","meaningful","mechanical","medical","medieval","melodic","melted","mental","mere","metropolitan","mid","middle","middle-class","mighty","mighty","mild","military","miniature","minimal","minimum","ministerial","minor","miserable","misleading","missing","misty","mixed","moaning","mobile","moderate","modern","modern","modern","modest","molecular","monetary","monthly","moral","motionless","muddy","multiple","mushy","musical","mute","mutual","mysterious","mysterious","naked","narrow","narrow","nasty","nasty","national","native","natural","naughty","naval","near","nearby","neat","necessary","negative","neighbouring","nervous","nervous","net","neutral","new","new","nice","nice","nineteenth-century","noble","noisy","noisy","normal","northern","nosy","notable","novel","nuclear","numerous","numerous","nursing","nutritious","nutty","obedient","objective","obliged","obnoxious","obvious","occasional","occupational","odd","odd","official","ok","okay","old","old","old-fashioned","old-fashioned","olympic","only","open","open","operational","opposite","optimistic","oral","orange","orange","ordinary","ordinary","organic","organisational","original","orthodox","other","outdoor","outer","outrageous","outside","outstanding","outstanding","overall","overseas","overwhelming","painful","pale","palestinian","panicky","parallel","parental","parliamentary","part-time","partial","particular","passing","passive","past","patient","payable","peaceful","peculiar","perfect","perfect","permanent","persistent","personal","petite","philosophical","physical","pink","plain","plain","planned","plastic","pleasant","pleasant","pleased","poised","polish","polite","political","poor","poor","popular","positive","possible","post-war","potential","powerful","powerful","practical","precious","precious","precise","preferred","pregnant","preliminary","premier","prepared","present","presidential","pretty","pretty","previous","prickly","prickly","primary","prime","primitive","principal","printed","prior","private","probable","productive","professional","profitable","profound","progressive","prominent","promising","proper","proposed","prospective","protective","protestant","proud","proud","provincial","psychiatric","psychological","public","puny","pure","purple","purple","purring","puzzled","puzzled","quaint","quaint","qualified","quick","quick","quick","quickest","quiet","quiet","quiet","racial","radical","rainy","rainy","random","rapid","rapid","rare","rare","raspy","rational","ratty","raw","ready","real","real","realistic","rear","reasonable","recent","red","red","reduced","redundant","regional","registered","regular","regulatory","related","relative","relaxed","relevant","reliable","relieved","relieved","religious","reluctant","remaining","remarkable","remote","renewed","representative","repulsive","required","resident","residential","resonant","respectable","respective","responsible","resulting","retail","retired","revolutionary","rich","rich","ridiculous","right","rigid","ripe","rising","rival","roasted","robust","rolling","roman","romantic","rotten","rough","rough","round","round","round","royal","rubber","rude","ruling","running","rural","russian","sacred","sad","sad","safe","salty","satisfactory","satisfied","scared","scary","scary","scattered","scientific","scornful","scottish","scrawny","screeching","secondary","secret","secure","select","selected","selective","selfish","semantic","senior","sensible","sensitive","separate","serious","severe","sexual","shaggy","shaky","shallow","shallow","shared","sharp","sharp","sheer","shiny","shivering","shocked","short","short","short","short","short-term","shrill","shy","shy","sick","significant","silent","silent","silky","silly","silly","silly","similar","simple","single","skilled","skinny","sleepy","slight","slim","slimy","slippery","slow","slow","small","small","smart","smiling","smoggy","smooth","smooth","so-called","social","socialist","soft","soft","soft","solar","sole","solid","solid","sophisticated","sore","sorry","sound","sound","sour","southern","soviet","spanish","spare","sparkling","spatial","special","specific","specified","spectacular","spicy","spiritual","splendid","splendid","spontaneous","sporting","spotless","spotty","square","square","squealing","stable","stale","standard","static","statistical","statutory","steady","steady","steep","steep","sticky","sticky","stiff","still","stingy","stormy","straight","straight","straightforward","strange","strange","strange","strategic","strict","striking","striped","strong","strong","structural","stuck","stupid","stupid","subjective","subsequent","substantial","subtle","successful","successful","successive","sudden","sufficient","suitable","sunny","super","super","superb","superior","supporting","supposed","supreme","sure","surprised","surprising","surrounding","surviving","suspicious","sweet","sweet","swift","swiss","symbolic","sympathetic","systematic","tall","tall","tall","tame","tame","tan","tart","tasteless","tasty","technical","technological","teenage","temporary","tender","tender","tender","tense","terrible","terrible","territorial","testy","then","theoretical","thick","thin","thirsty","thorough","thoughtful","thoughtless","thundering","tight","tight","tiny","tiny","tired","tired","top","tory","total","tough","tough","toxic","traditional","tragic","tremendous","tricky","tropical","troubled","turkish","typical","ugliest","ugly","ugly","ugly","ultimate","unable","unacceptable","unaware","uncertain","unchanged","uncomfortable","unconscious","underground","underlying","unemployed","uneven","unexpected","unfair","unfortunate","unhappy","uniform","uninterested","unique","united","universal","unknown","unlikely","unnecessary","unpleasant","unsightly","unusual","unusual","unwilling","upper","upset","upset","uptight","urban","urgent","used","useful","useless","usual","vague","valid","valuable","variable","varied","various","varying","vast","vast","verbal","vertical","very","victorian","victorious","video-taped","violent","visible","visiting","visual","vital","vivacious","vivid","vocational","voiceless","voluntary","vulnerable","wandering","warm","wasteful","watery","weak","weak","wealthy","weary","wee","weekly","weird","welcome","well","well-known","welsh","western","wet","wet","wet","whispering","white","whole","wicked","wicked","wide","wide","wide-eyed","widespread","wild","wild","willing","wise","witty","wonderful","wonderful","wonderful","wooden","wooden","working","working-class","worldwide","worried","worried","worrying","worthwhile","worthy","written","wrong","wrong","yellow","yellow","young","young","yummy","zany","zany","zealous"],Eq=["aardvark","abacus","abbey","abdomen","abolishment","abroad","abyssinian","accelerant","accelerator","accompanist","accordion","account","accountant","achieve","achiever","acid","acknowledgment","acoustic","acoustics","acrylic","act","action","active","activity","actor","actress","acupuncture","adapter","addiction","addition","address","adjustment","administration","adrenalin","adult","advancement","advantage","advertisement","advertising","advice","affair","affect","afghanistan","africa","aftermath","afternoon","aftershave","aftershock","afterthought","age","agency","agenda","agent","aglet","agreement","air","airbag","airbus","airfare","airforce","airline","airmail","airplane","airport","airship","alarm","alb","albatross","alcohol","alcove","alder","algebra","algeria","alibi","allergist","alley","alligator","alloy","almanac","almond","alpaca","alpenglow","alpenhorn","alpha","alphabet","alternative","altitude","alto","aluminium","aluminum","ambassador","ambulance","amendment","america","amount","amusement","anagram","analgesia","analog","analysis","analyst","anatomy","anesthesiology","anethesiologist","anger","angiosperm","angle","angora","angstrom","anguish","animal","anime","ankle","anklet","annual","anorak","answer","ant","antarctica","anteater","antechamber","antelope","anthony","anthropology","antler","anybody","anything","anywhere","apartment","ape","aperitif","apology","apparatus","apparel","appeal","appendix","apple","applewood","appliance","approval","april","apron","apse","aquarius","aquifer","arch","archaeology","archeology","archer","architect","architecture","arch-rival","area","argentina","argument","aries","arithmetic","arm","armadillo","armament","armchair","armenian","armoire","armor","arm-rest","army","arrival","arrow","art","artichoke","artificer","ascot","ash","ashram","ashtray","asia","asparagus","asphalt","assignment","assistance","associate","association","asterisk","astrakhan","astrolabe","astrologer","astrology","astronomy","atelier","athelete","athlete","atm","atmosphere","atom","atrium","attachment","attack","attempt","attendant","attention","attenuation","attic","attitude","attorney","attraction","audience","auditorium","august","aunt","australia","australian","author","authorisation","authority","authorization","automaton","avalanche","avenue","average","azimuth","babe","babies","baboon","babushka","baby","back","backbone","backdrop","backpack","bacon","bad","badge","badger","bafflement","bag","bagel","bagpipe","bagpipes","bail","bait","bake","baker","bakery","bakeware","balaclava","balalaika","balance","balcony","balinese","ball","balloon","ballpark","bamboo","banana","band","bandana","bandolier","bangladesh","bangle","banjo","bank","bankbook","banker","banquette","baobab","bar","barbara","barbeque","barber","barbiturate","barge","baritone","barium","barn","barometer","barracks","barstool","base","baseball","basement","basin","basis","basket","basketball","bass","bassinet","bassoon","bat","bath","bather","bathhouse","bathrobe","bathroom","bathtub","batter","battery","batting","battle","battleship","bay","bayou","beach","bead","beak","beam","bean","beanie","beanstalk","bear","beard","beast","beat","beautician","beauty","beaver","bed","bedroom","bee","beech","beef","beer","beet","beetle","beggar","beginner","begonia","behavior","beheading","behest","belfry","belgian","belief","believe","bell","belligerency","bellows","belly","belt","bench","bend","beneficiary","benefit","bengal","beret","berry","bestseller","best-seller","betty","beverage","beyond","bibliography","bicycle","bid","bidet","bifocals","big","big-rig","bijou","bike","bikini","bill","billboard","bin","biology","biplane","birch","bird","birdbath","birdcage","birdhouse","bird-watcher","birth","birthday","bit","bite","black","blackberry","blackboard","blackfish","bladder","blade","blame","blank","blanket","blazer","blight","blinker","blister","blizzard","block","blocker","blood","bloodflow","bloom","bloomers","blossom","blouse","blow","blowgun","blowhole","blue","blueberry","boar","board","boat","boat-building","boatload","boatyard","bobcat","body","bog","bolero","bolt","bomb","bomber","bondsman","bone","bongo","bonnet","bonsai","bonus","boogeyman","book","bookcase","bookend","booklet","booster","boot","bootee","bootie","boots","booty","border","bore","bosom","botany","bottle","bottling","bottom","bottom-line","boudoir","bough","boundary","bow","bower","bowl","bowler","bowling","bowtie","box","boxer","boxspring","boy","bra","brace","bracelet","bracket","brain","brake","branch","brand","brandy","brass","brassiere","bratwurst","brazil","bread","breadcrumb","break","breakfast","breakpoint","breast","breastplate","breath","breeze","brian","bribery","brick","bricklaying","bridge","brief","briefs","brilliant","british","broccoli","brochure","broiler","broker","brome","bronchitis","bronco","bronze","brooch","brood","brook","broom","brother","brother-in-law","brow","brown","brush","brushfire","brushing","bubble","bucket","buckle","bud","budget","buffer","buffet","bug","buggy","bugle","building","bulb","bull","bulldozer","bullet","bull-fighter","bumper","bun","bunch","bungalow","bunghole","bunkhouse","burglar","burlesque","burma","burn","burn-out","burst","bus","bush","business","bust","bustle","butane","butcher","butter","button","buy","buyer","buzzard","cabana","cabbage","cabin","cabinet","cable","caboose","cacao","cactus","caddy","cadet","cafe","caftan","cake","calcification","calculation","calculator","calculus","calendar","calf","calico","call","calm","camel","cameo","camera","camp","campaign","campanile","can","canada","canadian","canal","cancel","cancer","candelabra","candidate","candle","candy","cane","cannon","canoe","canon","canopy","canteen","canvas","cap","cape","capital","capitulation","capon","cappelletti","cappuccino","capricorn","captain","caption","car","caravan","carbon","card","cardboard","cardigan","care","cargo","carload","carnation","carol","carotene","carp","carpenter","carpet","carport","carriage","carrier","carrot","carry","cart","cartilage","cartload","cartoon","cartridge","cascade","case","casement","cash","cashier","casino","casserole","cassock","cast","castanet","castanets","castle","cat","catacomb","catamaran","category","caterpillar","cathedral","catsup","cattle","cauliflower","cause","caution","cave","c-clamp","cd","ceiling","celebration","celeriac","celery","celeste","cell","cellar","cello","celsius","cement","cemetery","cenotaph","census","cent","centenarian","center","centimeter","centurion","century","cephalopod","ceramic","cereal","certification","cesspool","chador","chafe","chain","chainstay","chair","chairlift","chairman","chairperson","chairwoman","chaise","chalet","chalice","chalk","champion","chance","chandelier","change","channel","chap","chapel","character","chard","charge","charity","charlatan","charles","charm","chart","chastity","chasuble","chateau","chauffeur","chauvinist","check","checkroom","cheek","cheese","cheetah","chef","chemistry","cheque","cherries","cherry","chess","chest","chick","chicken","chicory","chief","chiffonier","child","childhood","children","chill","chime","chimpanzee","chin","china","chinese","chino","chipmunk","chit-chat","chivalry","chive","chocolate","choice","choker","chop","chopstick","chord","chowder","christmas","christopher","chrome","chromolithograph","chronograph","chronometer","chub","chug","church","churn","cicada","cinema","circle","circulation","circumference","cirrus","citizenship","city","civilisation","clam","clank","clapboard","clarinet","clasp","class","claus","clave","clavicle","clavier","cleaner","cleat","cleavage","clef","cleric","clerk","click","client","cliff","climb","clip","clipper","cloak","cloakroom","clock","clockwork","clogs","cloister","close","closet","cloth","clothes","clothing","cloud","cloudburst","cloudy","clove","clover","club","clutch","coach","coal","coast","coat","cob","cobweb","cockpit","cockroach","cocktail","cocoa","cod","codon","codpiece","coevolution","coffee","coffin","coil","coin","coinsurance","coke","cold","coliseum","collar","collection","college","collision","colloquia","colombia","colon","colonisation","colony","color","colt","column","columnist","comb","combat","combination","comfort","comfortable","comic","comma","command","commercial","commission","committee","communicant","communication","community","company","comparison","competition","competitor","complement","complex","component","comportment","composer","composition","compost","compulsion","computer","comradeship","concert","concrete","condition","condominium","condor","conductor","cone","confectionery","conference","confidence","confirmation","conflict","conga","congo","congressman","congressperson","congresswoman","conifer","connection","consent","consequence","console","consonant","conspirator","constant","constellation","construction","consul","consulate","contact lens","contagion","contest","context","continent","contract","contrail","contrary","contribution","control","convection","convert","convertible","cook","cookie","cooking","coonskin","cope","cop-out","copper","co-producer","copy","copyright","copywriter","cord","corduroy","cork","cormorant","corn","cornerstone","cornet","corral","correspondent","corridor","corsage","cost","costume","cot","cottage","cotton","couch","cougar","cough","council","councilman","councilor","councilperson","councilwoman","counter","counter-force","countess","country","couple","courage","course","court","cousin","covariate","cover","coverall","cow","cowbell","cowboy","crab","crack","cracker","crackers","cradle","craftsman","crash","crate","cravat","craw","crawdad","crayfish","crayon","cream","creative","creator","creature","creche","credenza","credit","creditor","creek","creme brulee","crest","crew","crib","cribbage","cricket","cricketer","crime","criminal","crinoline","criteria","criterion","criticism","crocodile","crocus","croissant","crook","crop","cross","cross-contamination","cross-stitch","crotch","croup","crow","crowd","crown","crude","crush","cry","crystallography","cub","cuban","cuckoo","cucumber","cuff-links","cultivar","cultivator","culture","culvert","cummerbund","cup","cupboard","cupcake","cupola","curio","curl","curler","currency","current","cursor","curtain","curve","cushion","custard","custodian","customer","cut","cuticle","cutlet","cutover","cutting","cyclamen","cycle","cyclone","cylinder","cymbal","cymbals","cynic","cyst","cytoplasm","dad","daffodil","dagger","dahlia","daisy","damage","dame","dance","dancer","danger","daniel","dark","dart","dash","dashboard","database","date","daughter","david","day","daybed","dead","deadline","deal","dealer","dear","death","deathwatch","deborah","debt","debtor","decade","december","decimal","decision","deck","declination","decongestant","decrease","decryption","dedication","deer","defense","deficit","deformation","degree","delete","delivery","demand","demur","den","denim","dentist","deodorant","department","dependent","deployment","deposit","depressive","depth","deputy","derby","derrick","description","desert","design","designer","desire","desk","dessert","destiny","destroyer","destruction","detail","detainment","detective","detention","determination","development","deviance","dew","dhow","diadem","diamond","diaphragm","diarist","dibble","dickey","dictaphone","diction","dictionary","diet","dietician","difference","differential","difficulty","digestion","digger","digital","dilapidation","dill","dime","dimension","dimple","diner","dinghy","dinner","dinosaur","diploma","dipstick","direction","director","dirndl","dirt","disadvantage","disarmament","disaster","disco","disconnection","discount","discovery","discrepancy","discussion","disease","disembodiment","disengagement","disguise","disgust","dish","dishes","dishwasher","disk","display","disposer","distance","distribution","distributor","district","divan","diver","divide","divider","diving","division","dock","doctor","document","doe","dog","dogsled","dogwood","doll","dollar","dolman","dolphin","domain","donald","donkey","donna","door","doorknob","doorpost","dorothy","dory","dot","double","doubling","doubt","doubter","downforce","downgrade","downtown","draft","dragon","dragonfly","dragster","drain","drake","drama","dramaturge","draw","drawbridge","drawer","drawing","dream","dredger","dress","dresser","dressing","drill","drink","drive","driver","driveway","driving","drizzle","dromedary","drop","drug","drum","drummer","drunk","dry","dryer","duck","duckling","dud","duffel","dugout","dulcimer","dumbwaiter","dump truck","dune buggy","dungarees","dungeon","duplexer","dust","dust storm","duster","duty","dwarf","dwelling","dynamo","eagle","ear","eardrum","earmuffs","earplug","earrings","earth","earthquake","earthworm","ease","easel","east","eave","eavesdropper","e-book","ecclesia","eclipse","ecliptic","economics","ecumenist","eddy","edge","edger","editor","editorial","education","edward","eel","effacement","effect","effective","efficacy","efficiency","effort","egg","egghead","eggnog","eggplant","egypt","eight","ejector","elbow","election","electrocardiogram","element","elephant","elevator","elixir","elizabeth","elk","ellipse","elm","elongation","embossing","emergence","emergent","emery","emotion","employ","employee","employer","employment","empowerment","emu","encirclement","encyclopedia","end","endothelium","enemy","energy","engine","engineer","engineering","english","enigma","enquiry","entertainment","entrance","entry","environment","epauliere","epee","ephemera","ephemeris","epoch","eponym","epoxy","equinox","equipment","era","e-reader","error","escape","espadrille","espalier","establishment","estate","estimate","estrogen","estuary","ethernet","ethiopia","euphonium","eurocentrism","europe","evaluator","evening","evening-wear","event","eviction","evidence","evocation","examination","examiner","example","exchange","exclamation","excuse","executor","exhaust","ex-husband","exile","existence","exit","expansion","expansionism","experience","expert","explanation","exposition","extension","extent","extreme","ex-wife","eye","eyeball","eyebrow","eyebrows","eyeglasses","eyelash","eyelashes","eyelid","eyelids","eyeliner","eyestrain","face","facelift","facet","facilities","facsimile","fact","factor","factory","faculty","fahrenheit","fairies","fairy","fall","falling-out","familiar","family","fan","fang","fanlight","fanny","fanny-pack","farm","farmer","fascia","fat","father","father-in-law","fatigues","faucet","fault","fawn","fax","fear","feast","feather","feature","february","fedelini","fedora","feed","feedback","feeling","feet","felony","female","fen","fence","fencing","fender","ferry","ferryboat","fertilizer","few","fiber","fiberglass","fibre","fiction","fiddle","field","fifth","fight","fighter","figurine","file","fill","filly","filth","final","finance","find","fine","finger","fingernail","finisher","fir","fire","fireman","fireplace","firewall","fish","fishbone","fisherman","fishery","fishmonger","fishnet","fisting","fix","fixture","flag","flame","flanker","flare","flash","flat","flatboat","flavor","flax","fleck","fleece","flesh","flight","flintlock","flip-flops","flock","flood","floor","floozie","flower","flu","flugelhorn","fluke","flute","fly","flytrap","foam","fob","focus","fog","fold","folder","fondue","font","food","foot","football","footnote","footrest","foot-rest","footstool","foray","force","forearm","forebear","forecast","forehead","forest","forestry","forgery","fork","form","formal","format","former","fort","fortnight","fortress","forum","foundation","fountain","fowl","fox","foxglove","fragrance","frame","france","fratricide","fraudster","frazzle","freckle","freeplay","freeze","freezer","freight","freighter","french","freon","fresco","friction","friday","fridge","friend","friendship","frigate","fringe","frock","frog","front","frost","frown","fruit","frustration","fuel","fulfillment","full","function","fundraising","funny","fur","furnace","furniture","fusarium","futon","future","gaffer","gaiters","gale","gall-bladder","galleon","gallery","galley","gallon","galoshes","game","gamebird","gamma-ray","gander","gap","garage","garb","garbage","garden","garlic","garment","garter","gas","gasoline","gastropod","gate","gateway","gather","gauge","gauntlet","gazebo","gazelle","gear","gearshift","geese","gelding","gem","gemini","gemsbok","gender","gene","general","genetics","geography","geology","geometry","george","geranium","gerbil","geriatrician","german","germany","geyser","ghana","gherkin","ghost","giant","gigantism","ginseng","giraffe","girdle","girl","git","glad","gladiolus","gland","glass","glasses","glen","glider","gliding","glockenspiel","glove","gloves","glue","glut","goal","goat","gobbler","godmother","goggles","go-kart","gold","goldfish","golf","gondola","gong","good","goodbye","good-bye","goodie","goose","gopher","gore-tex","gorilla","gosling","governance","government","governor","gown","grab-bag","grade","grain","gram","granddaughter","grandfather","grandmom","grandmother","grandson","granny","grape","grapefruit","graph","graphic","grass","grasshopper","grassland","gray","grease","great","great-grandfather","great-grandmother","greece","greek","green","greenhouse","grenade","grey","grief","grill","grip","grit","ground","group","grouper","grouse","growth","guarantee","guatemalan","guest","guestbook","guide","guilty","guitar","guitarist","gum","gumshoes","gun","gutter","guy","gym","gymnast","gynaecology","gyro","hacienda","hacksaw","hackwork","hail","hair","haircut","half","half-brother","half-sister","halibut","hall","hallway","hamaki","hamburger","hammer","hammock","hamster","hand","handball","hand-holding","handicap","handle","handlebar","handmaiden","handsaw","hang","harbor","harbour","hardboard","hardcover","hardening","hardhat","hard-hat","hardware","harm","harmonica","harmony","harp","harpooner","harpsichord","hassock","hat","hatbox","hatchet","hate","haunt","haversack","hawk","hay","head","headlight","headline","headrest","health","hearing","heart","heartache","hearth","hearthside","heart-throb","heartwood","heat","heater","heaven","heavy","hedge","hedgehog","heel","height","heirloom","helen","helicopter","helium","hell","hellcat","helmet","helo","help","hemp","hen","herb","heron","herring","hexagon","heyday","hide","high","highlight","high-rise","highway","hill","himalayan","hip","hippodrome","hippopotamus","historian","history","hit","hive","hobbies","hobbit","hobby","hockey","hoe","hog","hold","hole","holiday","home","homogenate","homonym","honey","honeybee","honoree","hood","hoof","hook","hope","hops","horn","hornet","horse","hose","hosiery","hospice","hospital","host","hostel","hostess","hot","hot-dog","hotel","hour","hourglass","house","houseboat","hovel","hovercraft","howitzer","hub","hubcap","hugger","human","humidity","humor","hunger","hurdler","hurricane","hurry","hurt","husband","hut","hutch","hyacinth","hybridisation","hydrant","hydraulics","hydrofoil","hydrogen","hyena","hygienic","hyphenation","hypochondria","hypothermia","ice","icebreaker","icecream","ice-cream","icicle","icon","idea","ideal","igloo","ikebana","illegal","image","imagination","impact","implement","importance","impress","imprisonment","improvement","impudence","impulse","inbox","incandescence","inch","income","increase","independent","index","india","indigence","indonesia","industry","infancy","inflammation","inflation","information","infusion","inglenook","ingrate","initial","initiative","in-joke","injury","ink","in-laws","inlay","inn","innervation","innocent","input","inquiry","inscription","insect","inside","insolence","inspector","instruction","instrument","instrumentalist","instrumentation","insulation","insurance","insurgence","intelligence","intention","interactive","interest","interferometer","interior","interloper","internal","internet","interpreter","intervenor","interview","interviewer","intestine","intestines","invention","inventor","inventory","invite","invoice","ipad","iran","iraq","iridescence","iris","iron","ironclad","island","israel","issue","italian","italy","jackal","jacket","jaguar","jail","jailhouse","jam","james","january","japan","japanese","jar","jasmine","jason","jaw","jeans","jeep","jeff","jelly","jellyfish","jennifer","jet","jewel","jewelry","jiffy","job","jockey","jodhpurs","joey","jogging","john","join","joke","joseph","jot","journey","judge","judo","juggernaut","juice","july","jumbo","jump","jumper","jumpsuit","june","junior","junk","junker","junket","jury","justice","jute","kale","kamikaze","kangaroo","karate","karen","kayak","kazoo","kendo","kenneth","kenya","ketch","ketchup","kettle","kettledrum","kevin","key","keyboard","keyboarding","keystone","kick","kick-off","kid","kidney","kidneys","kielbasa","kill","kilogram","kilometer","kilt","kimberly","kimono","kind","king","kingfish","kiosk","kiss","kitchen","kite","kitten","kitty","kleenex","klomps","knee","kneejerk","knickers","knife","knife-edge","knight","knitting","knot","knowledge","knuckle","koala","kohlrabi","korean","lab","laborer","lace","lacquerware","ladder","ladybug","lake","lamb","lamp","lan","lanai","land","landform","landmine","language","lantern","lap","laparoscope","lapdog","laptop","larch","larder","lark","laryngitis","lasagna","latency","latex","lathe","latte","laugh","laundry","laura","law","lawn","lawsuit","lawyer","layer","lead","leader","leaf","league","leaker","learning","leash","leather","leaver","lecture","leek","leg","legal","legging","legume","lei","lemon","lemonade","lemur","length","lentil","leo","leopard","leotard","leprosy","let","letter","lettuce","level","lever","leverage","libra","librarian","library","license","lier","life","lift","light","lighting","lightning","lilac","lily","limit","limo","line","linen","liner","link","linseed","lion","lip","lipstick","liquid","liquor","lisa","list","literature","litigation","litter","liver","living","lizard","llama","loaf","loafer","loan","lobotomy","lobster","lock","locker","locket","locomotive","locust","loft","log","loggia","loincloth","look","loss","lot","lotion","lounge","lout","love","low","loyalty","luck","luggage","lumber","lumberman","lunch","luncheonette","lunchroom","lung","lunge","lute","luttuce","lycra","lye","lymphocyte","lynx","lyocell","lyre","lyric","macadamia","macaroni","machine","macrame","macrofauna","maelstrom","maestro","magazine","magic","magician","maid","maiden","mail","mailbox","mailman","maintenance","major","major-league","makeup","malaysia","male","mall","mallet","mambo","mammoth","man","management","manager","mandarin","mandolin","mangrove","manhunt","maniac","manicure","manner","manor","mansard","manservant","mansion","mantel","mantle","mantua","manufacturer","manx","map","maple","maraca","maracas","marble","march","mare","margaret","margin","maria","mariachi","marimba","mark","market","marketing","marksman","marriage","marsh","marshland","marxism","mary","mascara","mask","mass","massage","master","mastication","mastoid","mat","match","material","math","mattock","mattress","maximum","may","maybe","mayonnaise","mayor","meal","meaning","measure","meat","mechanic","medicine","medium","meet","meeting","megalomaniac","melody","member","membership","memory","men","menorah","mention","menu","mercury","mess","message","metal","metallurgist","meteor","meteorology","meter","methane","method","methodology","metro","metronome","mexican","mexico","mezzanine","mice","michael","michelle","microlending","microwave","mid-course","middle","middleman","midi","midline","midnight","midwife","might","migrant","mile","milk","milkshake","millennium","millimeter","millisecond","mime","mimosa","mind","mine","mini","minibus","minion","mini-skirt","minister","minor","minor-league","mint","minute","mirror","miscarriage","miscommunication","misfit","misogyny","misplacement","misreading","missile","mission","mist","mistake","mister","miter","mitten","mix","mixer","mixture","moat","mobile","moccasins","mocha","mode","model","modem","mole","mom","moment","monastery","monasticism","monday","money","monger","monitor","monkey","monocle","monotheism","monsoon","monster","month","mood","moon","moonscape","moonshine","mop","Mormon","morning","morocco","morsel","mortise","mosque","mosquito","most","motel","moth","mother","mother-in-law","motion","motor","motorboat","motorcar","motorcycle","mound","mountain","mouse","mouser","mousse","moustache","mouth","mouton","move","mover","movie","mower","mug","mukluk","mule","multimedia","muscle","musculature","museum","music","music-box","musician","music-making","mustache","mustard","mutt","myanmar","mycoplasma","nail","name","naming","nancy","nanoparticle","napkin","narcissus","nation","naturalisation","nature","neat","neck","necklace","necktie","necromancer","need","needle","negligee","neologism","neon","nepal","nephew","nerve","nest","net","netball","netbook","netsuke","network","neurobiologist","neuropathologist","neuropsychiatry","news","newspaper","newsprint","newsstand","nexus","nic","nicety","niche","nickel","niece","nigeria","night","nightclub","nightgown","nightingale","nightlight","nitrogen","node","noise","nonbeliever","nonconformist","nondisclosure","noodle","normal","norse","north","north america","north korea","norwegian","nose","note","notebook","notice","notify","notoriety","nougat","novel","november","nudge","number","numeracy","numeric","numismatist","nurse","nursery","nurture","nut","nylon","oak","oar","oasis","oatmeal","obi","objective","obligation","oboe","observation","observatory","occasion","occupation","ocean","ocelot","octagon","octave","octavo","octet","october","octopus","odometer","oeuvre","offence","offer","office","official","off-ramp","oil","okra","oldie","olive","omega","omelet","oncology","one","onion","open","opening","opera","operation","ophthalmologist","opinion","opium","opossum","opportunist","opportunity","opposite","option","orange","orangutan","orator","orchard","orchestra","orchid","order","ordinary","ordination","organ","organisation","organization","original","ornament","osmosis","osprey","ostrich","others","otter","ottoman","ounce","outback","outcome","outfit","outhouse","outlay","output","outrigger","outset","outside","oval","ovary","oven","overcharge","overclocking","overcoat","overexertion","overflight","overnighter","overshoot","owl","owner","ox","oxen","oxford","oxygen","oyster","pacemaker","pack","package","packet","pad","paddle","paddock","page","pagoda","pail","pain","paint","painter","painting","paintwork","pair","pajama","pajamas","pakistan","paleontologist","paleontology","palm","pamphlet","pan","pancake","pancreas","panda","panic","pannier","panpipe","pansy","panther","panties","pantry","pants","pantsuit","panty","pantyhose","paper","paperback","parable","parachute","parade","parallelogram","paramedic","parcel","parchment","parent","parentheses","park","parka","parrot","parsnip","part","participant","particle","particular","partner","partridge","party","passage","passbook","passenger","passive","pasta","paste","pastor","pastoralist","pastry","patch","path","patient","patina","patio","patriarch","patricia","patrimony","patriot","patrol","pattern","paul","pavement","pavilion","paw","pawnshop","payee","payment","pea","peace","peach","peacoat","peacock","peak","peanut","pear","pearl","pedal","pedestrian","pediatrician","peen","peer","peer-to-peer","pegboard","pelican","pelt","pen","penalty","pencil","pendant","pendulum","penicillin","pension","pentagon","peony","people","pepper","percentage","perch","perfume","period","periodical","peripheral","permafrost","permission","permit","perp","persian","person","personality","peru","pest","pet","petal","petticoat","pew","pharmacist","pharmacopoeia","phase","pheasant","philippines","philosopher","philosophy","phone","photo","photographer","phrase","physical","physician","pianist","piano","piccolo","pick","pickax","picket","pickle","picture","pie","piece","pier","piety","pig","pigeon","pike","pile","pilgrimage","pillbox","pillow","pilot","pimp","pimple","pin","pinafore","pince-nez","pine","pineapple","pinecone","ping","pink","pinkie","pinstripe","pint","pinto","pinworm","pioneer","pipe","piracy","piranha","pisces","piss","pitch","pitching","pith","pizza","place","plain","plane","planet","plant","plantation","planter","plaster","plasterboard","plastic","plate","platform","platinum","platypus","play","player","playground","playroom","pleasure","pleated","plier","plot","plough","plover","plow","plowman","plume","plunger","plywood","pneumonia","pocket","pocketbook","pocket-watch","poet","poignance","point","poison","poisoning","poland","pole","polenta","police","policeman","policy","polish","politician","pollution","polo","polyester","pompom","poncho","pond","pony","poof","pool","popcorn","poppy","popsicle","population","populist","porch","porcupine","port","porter","portfolio","porthole","position","positive","possibility","postage","postbox","poster","pot","potato","potential","potty","pouch","poultry","pound","pounding","powder","power","precedent","precipitation","preface","prelude","premeditation","premier","preoccupation","preparation","presence","presentation","president","pressroom","pressure","pressurisation","price","pride","priest","priesthood","primary","primate","prince","princess","principal","print","printer","priority","prison","prize","prizefight","probation","problem","procedure","process","processing","produce","producer","product","production","professional","professor","profit","program","project","promotion","prompt","proof-reader","propane","property","prose","prosecution","protest","protocol","prow","pruner","pseudoscience","psychiatrist","psychoanalyst","psychologist","psychology","ptarmigan","publisher","pudding","puddle","puffin","pull","pulley","puma","pump","pumpkin","pumpkinseed","punch","punishment","pupa","pupil","puppy","purchase","puritan","purple","purpose","purse","push","pusher","put","pvc","pyjama","pyramid","quadrant","quail","quality","quart","quarter","quartz","queen","question","quicksand","quiet","quill","quilt","quince","quit","quiver","quotation","rabbi","rabbit","raccoon","race","racer","racing","racist","rack","radar","radiator","radio","radiosonde","radish","raffle","raft","rag","rage","rail","railway","raiment","rain","rainbow","raincoat","rainmaker","rainstorm","raise","rake","ram","rambler","ramie","ranch","random","randomisation","range","rank","raspberry","rat","rate","ratio","raven","ravioli","raw","rawhide","ray","rayon","reactant","reaction","read","reading","reamer","rear","reason","receipt","reception","recess","recliner","recognition","recommendation","record","recorder","recover","recruit","rectangle","red","redesign","rediscovery","reduction","reef","refectory","reflection","refrigerator","refund","refuse","region","register","regret","regular","regulation","reindeer","reinscription","reject","relation","relative","religion","relish","reminder","rent","repair","reparation","repeat","replace","replication","reply","report","representative","reprocessing","request","resale","research","resident","resist","resolution","respect","respite","responsibility","rest","restaurant","result","retailer","rethinking","retina","retouch","return","reveal","revenant","review","revolution","revolve","revolver","reward","rheumatism","rhinoceros","rhyme","rhythm","rice","richard","riddle","ride","rider","ridge","rifle","right","rim","ring","ringworm","ripple","rise","riser","risk","river","riverbed","rivulet","road","roadway","roast","robe","robert","robin","rock","rocker","rocket","rocket-ship","rod","role","roll","roller","romania","romanian","ronald","roof","room","rooster","root","rope","rose","rostrum","rotate","roundabout","route","router","routine","row","rowboat","royal","rub","rubber","rubric","ruckus","ruffle","rugby","rule","run","runaway","runner","russia","russian","rutabaga","ruth","sabre","sack","sad","saddle","safe","safety","sage","sagittarius","sail","sailboat","sailor","salad","salary","sale","salesman","salmon","salon","saloon","salt","samovar","sampan","sample","samurai","sand","sandals","sandbar","sandra","sandwich","santa","sarah","sardine","sari","sarong","sash","satellite","satin","satire","saturday","sauce","saudi arabia","sausage","save","saving","savior","saviour","saw","saxophone","scale","scallion","scanner","scarecrow","scarf","scarification","scene","scent","schedule","scheme","schizophrenic","schnitzel","school","schoolhouse","schooner","science","scimitar","scissors","scooter","score","scorn","scorpio","scorpion","scow","scraper","screamer","screen","screenwriting","screw","screwdriver","screw-up","scrim","scrip","sculpting","sculpture","sea","seagull","seal","seaplane","search","seashore","season","seat","second","secretariat","secretary","section","sectional","sector","secure","security","seed","seeder","segment","select","selection","self","sell","semicircle","semicolon","senator","sense","sentence","sepal","september","septicaemia","series","servant","server","service","session","set","setting","settler","sewer","sex","shack","shade","shadow","shadowbox","shake","shakedown","shaker","shallot","shame","shampoo","shanty","shape","share","shark","sharon","shawl","shearling","shears","sheath","shed","sheep","sheet","shelf","shell","sherry","shield","shift","shin","shine","shingle","ship","shirt","shirtdress","shoat","shock","shoe","shoehorn","shoe-horn","shoelace","shoemaker","shoes","shoestring","shofar","shoot","shootdown","shop","shopper","shopping","shore","shortage","shorts","shortwave","shot","shoulder","shovel","show","shower","show-stopper","shred","shrimp","shrine","siamese","siberian","sibling","sick","side","sideboard","sideburns","sidecar","sidestream","sidewalk","siding","sign","signature","signet","significance","signup","silica","silk","silkworm","sill","silo","silver","simple","sing","singer","single","sink","sister","sister-in-law","sit","sitar","size","skate","skiing","skill","skin","skirt","skulduggery","skull","skullcap","skullduggery","skunk","sky","skylight","skyscraper","skywalk","slapstick","slash","slave","sled","sledge","sleep","sleet","sleuth","slice","slider","slime","slip","slipper","slippers","slope","sloth","smash","smell","smelting","smile","smock","smog","smoke","smuggling","snail","snake","snakebite","sneakers","sneeze","snob","snorer","snow","snowboarding","snowflake","snowman","snowmobiling","snowplow","snowstorm","snowsuit","snuggle","soap","soccer","society","sociology","sock","socks","soda","sofa","softball","softdrink","softening","software","soil","soldier","solid","solitaire","sombrero","somersault","somewhere","son","song","songbird","sonnet","soot","soprano","sorbet","sort","soulmate","sound","soup","source","sourwood","sousaphone","south","south africa","south america","south korea","sow","soy","soybean","space","spacing","spade","spaghetti","spain","spandex","spank","spark","sparrow","spasm","speaker","speakerphone","spear","special","specialist","specific","spectacle","spectacles","spectrograph","speedboat","spend","sphere","sphynx","spider","spike","spinach","spine","spiral","spirit","spiritual","spite","spleen","split","sponge","spoon","sport","spot","spotlight","spray","spread","spring","sprinter","sprout","spruce","spume","spur","spy","square","squash","squatter","squeegee","squid","squirrel","stable","stack","stacking","stadium","staff","stag","stage","stain","stair","staircase","stallion","stamen","stamina","stamp","stance","standoff","star","start","starter","state","statement","station","station-wagon","statistic","statistician","steak","steal","steam","steamroller","steel","steeple","stem","stencil","step","step-aunt","step-brother","stepdaughter","step-daughter","step-father","step-grandfather","step-grandmother","stepmother","step-mother","stepping-stone","steps","step-sister","stepson","step-son","step-uncle","steven","stew","stick","stiletto","still","stinger","stitch","stock","stocking","stockings","stock-in-trade","stole","stomach","stone","stonework","stool","stop","stopsign","stopwatch","store","storey","storm","story","storyboard","story-telling","stove","strait","stranger","strap","straw","strawberry","stream","street","streetcar","stress","stretch","strike","string","strip","structure","struggle","stud","student","studio","study","stuff","stumbling","sturgeon","style","styling","stylus","subcomponent","subconscious","submarine","subroutine","subsidence","substance","suburb","subway","success","suck","sudan","suede","suffocation","sugar","suggestion","suit","suitcase","sultan","summer","sun","sunbeam","sunbonnet","sunday","sundial","sunflower","sunglasses","sunlamp","sunroom","sunshine","supermarket","supply","support","supporter","suppression","surface","surfboard","surgeon","surgery","surname","surprise","susan","sushi","suspect","suspenders","sustainment","SUV","swallow","swamp","swan","swath","sweat","sweater","sweats","sweatshirt","sweatshop","sweatsuit","swedish","sweets","swell","swim","swimming","swimsuit","swing","swiss","switch","switchboard","swivel","sword","swordfish","sycamore","syndicate","synergy","synod","syria","syrup","system","tabby","tabernacle","table","tablecloth","tabletop","tachometer","tackle","tadpole","tail","tailor","tailspin","taiwan","tale","talk","tam","tambour","tambourine","tam-o'-shanter","tandem","tangerine","tank","tanker","tankful","tank-top","tanzania","tap","target","tassel","taste","tatami","tattler","tattoo","taurus","tavern","tax","taxi","taxicab","tea","teacher","teaching","team","tear","technician","technologist","technology","teen","teeth","telephone","telescreen","teletype","television","teller","temp","temper","temperature","temple","tempo","temporariness","temptress","tendency","tenement","tennis","tenor","tent","tepee","term","terracotta","terrapin","territory","test","text","textbook","texture","thailand","thanks","thaw","theater","theism","theme","theoretician","theory","therapist","thermals","thermometer","thigh","thing","thinking","thistle","thomas","thong","thongs","thorn","thought","thread","thrill","throat","throne","thrush","thumb","thunder","thunderbolt","thunderhead","thunderstorm","thursday","tiara","tic","ticket","tie","tiger","tight","tights","tile","till","timbale","time","timeline","timeout","timer","timpani","tin","tinderbox","tinkle","tintype","tip","tire","tissue","titanium","title","toad","toast","toe","toenail","toga","togs","toilet","tom","tomato","tomography","tomorrow","tom-tom","ton","tongue","toot","tooth","toothbrush","toothpaste","toothpick","top","top-hat","topsail","toque","torchiere","toreador","tornado","torso","tortellini","tortoise","tosser","total","tote","touch","tough","tough-guy","tour","tourist","towel","tower","town","townhouse","tow-truck","toy","trachoma","track","tracksuit","tractor","trade","tradition","traditionalism","traffic","trail","trailer","train","trainer","training","tram","tramp","transaction","translation","transmission","transom","transport","trapdoor","trapezium","trapezoid","trash","travel","tray","treatment","tree","trellis","tremor","trench","trial","triangle","tribe","trick","trigonometry","trim","trinket","trip","tripod","trolley","trombone","trooper","trouble","trousers","trout","trove","trowel","truck","truckit","trumpet","trunk","trust","try","t-shirt","tsunami","tub","tuba","tube","tuesday","tugboat","tulip","tummy","tuna","tune","tune-up","tunic","tunnel","turban","turkey","turkish","turn","turnip","turnover","turnstile","turret","turtle","tussle","tutu","tuxedo","tv","twig","twilight","twine","twist","twister","two","typewriter","typhoon","tyvek","uganda","ukraine","ukrainian","ukulele","umbrella","unblinking","uncle","underclothes","underground","underneath","underpants","underpass","undershirt","underwear","underwire","unibody","uniform","union","unit","united kingdom","urn","use","usher","utensil","uzbekistan","vacation","vacuum","vagrant","valance","valley","valuable","value","van","vane","vanity","variation","variety","vase","vast","vault","vaulting","veal","vegetable","vegetarian","vehicle","veil","vein","veldt","vellum","velodrome","velvet","venezuela","venezuelan","venom","veranda","verdict","vermicelli","verse","version","vertigo","verve","vessel","vest","vestment","veterinarian","vibe","vibraphone","vibration","vietnam","view","villa","village","vineyard","vinyl","viola","violet","violin","virginal","virgo","virtue","viscose","vise","vision","visit","visitor","visor","vixen","voice","volcano","volleyball","voyage","vulture","wad","wafer","waffle","waist","waistband","waiter","waitress","walk","walker","walkway","wall","wallaby","wallet","walnut","walrus","wampum","wannabe","war","warden","warlock","warm-up","warning","wash","washbasin","washcloth","washer","washtub","wasp","waste","wastebasket","watch","watchmaker","water","waterbed","waterfall","waterskiing","waterspout","wave","wax","way","weakness","wealth","weapon","weasel","weather","web","wedge","wednesday","weed","weeder","weedkiller","week","weekend","weekender","weight","weird","well","west","western","wet-bar","wetsuit","whale","wharf","wheel","whip","whirlpool","whirlwind","whisker","whiskey","whistle","white","whole","wholesale","wholesaler","whorl","wife","wilderness","will","william","willow","wind","windage","wind-chime","window","windscreen","windshield","wine","wing","wingman","wingtip","winter","wire","wiseguy","wish","wisteria","witch","witch-hunt","withdrawal","witness","wolf","woman","wombat","women","wood","woodland","woodshed","woodwind","wool","woolen","word","work","workbench","worker","workhorse","worklife","workshop","world","worm","worthy","wound","wrap","wraparound","wrecker","wren","wrench","wrestler","wrinkle","wrist","writer","writing","wrong","xylophone","yacht","yak","yam","yard","yarmulke","yarn","yawl","year","yellow","yesterday","yew","yin","yogurt","yoke","young","youth","yugoslavian","yurt","zampone","zebra","zebrafish","zephyr","ziggurat","zinc","zipper","zither","zone","zoo","zoologist","zoology","zoot-suit","zucchini"];function fk(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function Bu(){const e=Math.round(Math.random()*1124),t=Math.round(Math.random()*3260);return`${fk(xq[e])} ${fk(Eq[t])}`}function Sm(e){var n,r;if(!(e!=null&&e.trim().length))return"?";const t=(r=(n=e==null?void 0:e.trim())==null?void 0:n.replace(/[^a-zA-Z ]/g,""))==null?void 0:r.split(" ").map(s=>s.length?s:"").slice(0,3).reduce((s,i)=>s+i[0],"");return t==null?void 0:t.replace("undefined","")}const Oy=()=>({id:void 0,name:Bu(),apiKey:"",username:"",password:"",printerURL:"",printerType:0,enabled:!0});class Qt extends gr{static convertPrinterToCreateForm(t){const n=Oy();return n.id=t.id,n.printerURL=t.printerURL,n.name=t.name||Bu(),n.apiKey=t.apiKey,n.username=t.username,n.password=t.password,n.enabled=t.enabled,n}static openPrinterURL(t){t&&window.open(t)}static async getPrinters(){const t=Me.printerRoute;return await this.get(t)}static async getPrinterLoginDetails(t){const n=Me.getPrinterLoginDetailsRoute(t);return await this.get(n)}static async restartOctoPrint(t){const n=`${Me.restartOctoPrintRoute(t)}`;return await this.post(n)}static async refreshSocket(t){const n=`${Me.refreshSocketRoute(t)}`;return await this.post(n)}static async sendPrinterConnectCommand(t){const n=Me.printerSerialConnectRoute(t);return await this.post(n)}static async sendPrinterDisconnectCommand(t){const n=Me.printerSerialDisconnectRoute(t);return await this.post(n)}static async sendPrinterJogCommand(t,n){const r=Me.printerJogCommandRoute(t);return await this.post(r,n)}static async sendPrinterHomeCommand(t,n){const r=Me.printerHomeCommandRoute(t);return await this.post(r,n)}static async createPrinter(t,n){const r=`${Me.printerRoute}?forceSave=${n}`;return await this.post(r,t)}static async batchImportPrinters(t){const n=Me.printerBatchRoute;return await this.post(n,t)}static async deletePrinter(t){const n=Me.getPrinterRoute(t);return await this.delete(n)}static async updatePrinter(t,n,r){const i=`${Me.getPrinterRoute(t)}?forceSave=${r}`;return await this.patch(i,n)}static async updatePrinterMaintenance(t,n=null){const r=Me.postPrinterDisabledReasonRoute(t);return await this.patch(r,{disabledReason:n})}static async testConnection(t){const n=Me.printerTestConnectionRoute;return await this.post(n,t)}static async toggleEnabled(t,n){const r=Me.printerEnabledRoute(t);return await this.patch(r,{enabled:n})}}class bn extends gr{static async getSettings(){const t=Me.settingsRoute;return await this.get(t)}static async getSettingsSensitive(){const t=Me.settingsSensitiveRoute;return await this.get(t)}static async updateLoginRequiredSettings(t){const n=`${Me.updateLoginRequiredRoute}`;return await this.put(n,{loginRequired:t})}static async updateRegistrationEnabledSettings(t){const n=`${Me.updateRegistrationEnabledRoute}`;return await this.put(n,{registrationEnabled:t})}static async updateCredentialSettings(t,n,r){const s=`${Me.updateCredentialSettings}`;return await this.put(s,{jwtExpiresIn:t,refreshTokenAttempts:n,refreshTokenExpiry:r})}static async updateFrontendSettings(t){const n=`${Me.updateFrontendSettingsRoute}`;return await this.put(n,t)}static async setSentryDiagnosticsSettings(t){const n=`${Me.serverSentryDiagnosticsSettingRoute}`;return await this.patch(n,{enabled:t})}static async updateTimeoutSettings(t){const n=`${Me.updateTimeoutSettingRoute}`;return await this.put(n,t)}static async setFileCleanSettings(t){const n=`${Me.fileCleanSettingsRoute}`;return await this.put(n,t)}static async updateExperimentalMoonrakerSupport(t){const n=Me.updateExperimentalMoonrakerSupportRoute;return await this.put(n,{enabled:t})}static async updateExperimentalPrusaLinkSupport(t){const n=Me.updateExperimentalPrusaLinkSupportRoute;return await this.put(n,{enabled:t})}static async updateExperimentalClientSupport(t){const n=Me.updateExperimentalClientSupportRoute;return await this.put(n,{enabled:t})}}class Ma extends gr{static async stopPrintJob(t){const n=Me.printerStopJobRoute(t);return await this.post(n)}static async pausePrintJob(t){const n=Me.printerPauseJobRoute(t);return await this.post(n)}static async resumePrintJob(t){const n=Me.printerResumeJobRoute(t);return await this.post(n)}}const Ns=gs("Settings",{state:()=>({settings:void 0,frontendDebugSettings:{showPrinterStateUpdateSideNav:!1,showInterpretedPrinterState:!1,showJobsRendered:!1}}),actions:{async loadSettings(){const e=await bn.getSettings();return this.settings=e,e},async updateFrontendSettings(e){const t=await bn.updateFrontendSettings(e);return this.settings=t,t},async saveFrontendSettings(){if(!this.settings)return;const e=await bn.updateFrontendSettings(this.settings.frontend);this.settings=e},async updateTimeoutSettings(e){const t=await bn.updateTimeoutSettings(e);return this.settings=t,t}},getters:{serverSettings(){var e;return(e=this.settings)==null?void 0:e.server},frontendSettings(){var e;return(e=this.settings)==null?void 0:e.frontend},preferCancelOverQuickStop(){var e,t;return((t=(e=this.settings)==null?void 0:e.frontend)==null?void 0:t.tilePreferCancelOverQuickStop)||!1},thumbnailsEnabled(){var e;return((e=this.settings)==null?void 0:e.server.experimentalThumbnailSupport)||!1},largeTiles(){var e,t;return((t=(e=this.settings)==null?void 0:e.frontend)==null?void 0:t.largeTiles)||!1},gridCols(){var e,t;return((t=(e=this.settings)==null?void 0:e.frontend)==null?void 0:t.gridCols)||8},gridRows(){var e,t;return((t=(e=this.settings)==null?void 0:e.frontend)==null?void 0:t.gridRows)||8}}}),yi={danger:"danger",dark:"dark",secondary:"secondary",success:"success"},bi={DarkBlue:"#050c2e",Black:"#000000",DarkGray:"#262626",LightBrown:"#583c0e",Brown:"#580e47",Red:"#2e0905"},fl={Disabled:"Disabled",Maintenance:"Maintenance",Offline:"Offline",Finding:"Finding",Disconnected:"Disconnected",Error:"Error",Paused:"Paused",Operational:"Operational",Printing:"Printing"};function CA(e,t,n){var f,p,g,m;const s=Ns().frontendDebugSettings.showInterpretedPrinterState,i={};if(!e.enabled)return(f=e.disabledReason)!=null&&f.length?{...i,color:yi.danger,rgb:bi.Black,text:fl.Maintenance}:{...i,color:yi.secondary,rgb:bi.DarkBlue,text:fl.Disabled};const o=(t==null?void 0:t.api)==="responding",a=(t==null?void 0:t.api)==="authFail";if(!o||!t){const y=(t==null?void 0:t.api)==="noResponse";return{...i,color:yi.secondary,rgb:bi.Red,text:a?"API key wrong":y?"API unreachable":(t==null?void 0:t.api)||"-"}}if(!o)return{...i,color:yi.danger,rgb:bi.Red,text:a?"API key wrong":"No API connection"};const l=t.socket==="authenticated",u=t.socket==="authenticating",c=(g=(p=n==null?void 0:n.current)==null?void 0:p.payload)==null?void 0:g.state,d=c==null?void 0:c.flags;if(!l||!d)return s&&console.debug(`Socket opened ${l?1:0}, socketAuthing ${u?1:0} printerState ${n?1:0},
|
|
61
|
+
currentState: ${c}, FLAGS ${d}`),{...i,color:yi.danger,rgb:bi.Red,text:n?"Awaiting state":"No USB"};if(!d){console.error("No flags",d);return}return d.error||d.closedOrError?{...i,color:yi.danger,rgb:bi.Red,text:((m=c.text)==null?void 0:m.replace("Offline","Disconnected"))||fl.Error,description:c.error}:d.paused||d.pausing?{...i,color:yi.success,rgb:bi.Brown,text:fl.Paused}:d.printing?{...i,color:yi.success,rgb:bi.LightBrown,text:fl.Printing}:{...i,color:yi.dark,rgb:bi.DarkGray,text:fl.Operational,description:c.error}}const Da=e=>{var t,n;return(n=(t=e==null?void 0:e.current)==null?void 0:t.payload)==null?void 0:n.state},Cq=e=>{var t;return(t=Da(e))==null?void 0:t.flags.printing},Tq=(e,t)=>{var n,r,s;return!km(e)&&(e==null?void 0:e.enabled)&&!((n=Da(t))!=null&&n.flags.operational)||((r=Da(t))==null?void 0:r.flags.error)||((s=Da(t))==null?void 0:s.flags.closedOrError)},TA=e=>!km(e)&&!(e!=null&&e.enabled),km=e=>{var t;return!(e!=null&&e.enabled)&&((t=e==null?void 0:e.disabledReason)==null?void 0:t.length)},Pq=(e,t)=>{var n,r,s;return((n=Da(t))==null?void 0:n.flags)&&!((r=Da(t))!=null&&r.flags.printing)&&((s=Da(t))==null?void 0:s.flags.operational)&&!TA(e)&&!km(e)},rr=gs("PrinterState",{state:()=>({printerIds:[],printerEventsById:{},socketStatesById:{}}),getters:{operationalPrintersById(){const e=Wt(),t={};return this.printerIds.forEach(n=>{var s,i,o,a;const r=this.printerEventsById[n];if((a=(o=(i=(s=r==null?void 0:r.current)==null?void 0:s.payload)==null?void 0:i.state)==null?void 0:o.flags)!=null&&a.operational){const l=e.printer(n);if(l)t[n]=l;else throw new Error(`PrinterStore contains no printer with id ${n} but events are known`)}}),t},isPrinterOperational(){return e=>!!this.operationalPrintersById[e]},printingPrintersById(){const e={};return this.printerIds.forEach(t=>{var r,s,i,o;const n=this.printerEventsById[t];(o=(i=(s=(r=n==null?void 0:n.current)==null?void 0:r.payload)==null?void 0:s.state)==null?void 0:i.flags)!=null&&o.printing&&(e[t]=n)}),e},isPrinterPrinting(){return e=>!!this.printingPrintersById[e]},isPrinterStoppable(){return e=>{var r,s,i;const t=this.printerEventsById[e];if(!t)return!1;const n=(i=(s=(r=t==null?void 0:t.current)==null?void 0:r.payload)==null?void 0:s.state)==null?void 0:i.flags;return(n==null?void 0:n.printing)||(n==null?void 0:n.paused)||(n==null?void 0:n.pausing)}},isPrinterPaused(){return e=>{var r,s,i;const t=this.printerEventsById[e];if(!t)return!1;const n=(i=(s=(r=t==null?void 0:t.current)==null?void 0:r.payload)==null?void 0:s.state)==null?void 0:i.flags;return(n==null?void 0:n.paused)||(n==null?void 0:n.pausing)}},printerCurrentEventReceivedAtById(){const e={};return this.printerIds.forEach(t=>{var r;const n=this.printerEventsById[t];(r=n==null?void 0:n.current)!=null&&r.receivedAt&&(e[t]=n.current.receivedAt)}),e},onlinePrinters(){const e=Wt(),t={};return this.printerIds.forEach(n=>{const r=this.socketStatesById[n];if((r==null?void 0:r.api)==="responding"){const s=e.printer(n);if(s)t[n]=s;else throw new Error(`PrinterStore contains no printer with id ${n} but socket state is opened`)}}),t},onlinePrintersWithStates(){return Object.values(this.onlinePrinters).map(e=>({printer:e,printerState:this.printerEventsById[e.id]}))},printingCount(){const e=rr();return Object.values(e.onlinePrintersWithStates).filter(t=>Cq(t.printerState)).length},operationalNotPrintingCount(){return this.onlinePrintersWithStates.filter(e=>Pq(e.printer,e.printerState)).length},isApiResponding(){return e=>Object.keys(this.onlinePrinters).includes(e.toString())},isPrinterNotOnline(){return e=>!this.isApiResponding(e)},printerJobsById(){const e=Wt(),t=Ns().frontendDebugSettings.showJobsRendered,n={};return this.printerIds.forEach(r=>{var o,a,l,u;const s=this.printerEventsById[r],i=(l=(a=(o=s==null?void 0:s.current)==null?void 0:o.payload)==null?void 0:a.state)==null?void 0:l.flags;if(i!=null&&i.printing||i!=null&&i.paused||i!=null&&i.pausing){const c=e.printer(r);if(c)n[c.id]=(u=s==null?void 0:s.current)==null?void 0:u.payload;else throw new Error(`PrinterStore contains no printer with id ${r} but events are known`)}}),t&&console.debug("[PrinterStateStore] rendered printerJobsById",n),n},printersWithJob(){const e=Wt(),t=[];return this.printerIds.forEach(n=>{var i,o,a,l;const r=this.printerEventsById[n],s=(a=(o=(i=r==null?void 0:r.current)==null?void 0:i.payload)==null?void 0:o.state)==null?void 0:a.flags;if(s!=null&&s.printing||s!=null&&s.paused||s!=null&&s.pausing){const u=e.printer(n);if(u)t.push({printer:u,job:(l=r==null?void 0:r.current)==null?void 0:l.payload});else throw new Error(`PrinterStore contains no printer with id ${n} but events are known`)}}),t},printingFilePathsByPrinterId(){const e={};return this.printerIds.forEach(t=>{var s,i,o,a,l,u,c;const n=this.printerEventsById[t],r=(o=(i=(s=n==null?void 0:n.current)==null?void 0:s.payload)==null?void 0:i.state)==null?void 0:o.flags;(r!=null&&r.printing||r!=null&&r.paused||r!=null&&r.pausing)&&(e[t]=(c=(u=(l=(a=n==null?void 0:n.current)==null?void 0:a.payload)==null?void 0:l.job)==null?void 0:u.file)==null?void 0:c.path)}),e}},actions:{setSocketStates(e){this.socketStatesById=e,this.printerIds=Object.keys(e)},setPrinterEvents(e){this.printerEventsById=e},deletePrinterEvents(e){delete this.printerEventsById[e],this.printerIds=Object.keys(this.printerEventsById)},async selectAndPrintFile({printerId:e,fullPath:t}){if(!(!e||!Wt().printer(e))){if(this.isPrinterPrinting(e)){alert("This printer is printing or not connected! Either way printing is not an option.");return}await $i.selectAndPrintFile(e,t,!0)}}}}),Wt=gs("Printers",{state:()=>({printers:[],printerFileCache:{},sideNavPrinter:void 0,updateDialogPrinter:void 0,selectedPrinters:[],maintenanceDialogPrinter:void 0}),getters:{printer(){return e=>this.printers.find(t=>t.id==e)},isSelectedPrinter(e){return t=>!!e.selectedPrinters.find(n=>n.id===t)},printerFiles(){return e=>this.printerFileCache[e]},disabledCount(){return this.printers.filter(TA).length},disconnectedCount(){const e=rr();return this.printers.filter(t=>Tq(t,e.printerEventsById[t.id])).length},maintenanceCount(){return this.printers.filter(e=>km(e)).length}},actions:{async createPrinter(e,t){const n=await Qt.createPrinter(e,t);return this.printers.push(n),this.printers.sort((r,s)=>{var i,o,a;return(a=(i=r.name)==null?void 0:i.toLowerCase())!=null&&a.localeCompare((o=s==null?void 0:s.name)==null?void 0:o.toLowerCase())?1:-1}),n},toggleSelectedPrinter(e){const t=rr(),n=this.selectedPrinters.findIndex(r=>r.id==e.id);n===-1?t.isApiResponding(e.id)&&this.selectedPrinters.push(e):this.selectedPrinters.splice(n,1)},clearSelectedPrinters(){this.selectedPrinters=[]},setSideNavPrinter(e){this.sideNavPrinter=e},setUpdateDialogPrinter(e){this.updateDialogPrinter=e},setMaintenanceDialogPrinter(e){this.maintenanceDialogPrinter=e},async updatePrinter({printerId:e,updatedPrinter:t},n){const r=await Qt.updatePrinter(e,t,n);return this._replacePrinter({printerId:e,printer:r}),r},async loadPrinters(){const e=await Qt.getPrinters();return this.setPrinters(e),e},async deletePrinter(e){const t=await Qt.deletePrinter(e);return this._popPrinter(e),t},setPrinters(e){var n;if(!(e!=null&&e.length)){this.printers=[];return}const t=(n=this.sideNavPrinter)==null?void 0:n.id;t&&(this.sideNavPrinter=e.find(r=>r.id===t)),this.printers=e.sort((r,s)=>{var i,o,a;return(a=(i=r.name)==null?void 0:i.toLowerCase())!=null&&a.localeCompare((o=s==null?void 0:s.name)==null?void 0:o.toLowerCase())?1:-1})},_popPrinter(e){const t=this.printers.findIndex(n=>n.id===e);t!==-1?this.printers.splice(t,1):console.warn("Printer was not popped as it did not occur in state",e)},_replacePrinter({printerId:e,printer:t}){const n=this.printers.findIndex(r=>r.id===e);n!==-1?this.printers[n]=t:console.warn("Printer was not purged as it did not occur in state",e)},async deletePrinterFiles(e){if(!e)throw new Error("No printerId was provided");const t=await $i.clearFiles(e);if(!(t!=null&&t.failedFiles))throw new Error("No failed files were returned");this.printerFileCache[e]&&(this.printerFileCache[e]=t.failedFiles)},async loadPrinterFiles(e){const t=await $i.getFiles(e);return t.sort((n,r)=>n.date<r.date?1:-1),this.printerFileCache[e]=t,t},async deletePrinterFile(e,t){await $i.deleteFileOrFolder(e,t);const n=this.printerFileCache[e];if(!(n!=null&&n.length)){console.warn("Printer file list was nonexistent",e);return}const r=n.findIndex(s=>s.path===t);return r!==-1?n.splice(r,1):console.warn("File was not purged as it did not occur in state",t),this.printerFiles(e)},async sendStopJobCommand(e){const t=rr();if(!e)return;const n=this.printer(e);if(!n)return;const r=t.isPrinterPrinting(e)?"The printer seems idle - do you want to command it to stop anyway?":"The printer is still printing - are you sure to stop it?";confirm(r)&&await Ma.stopPrintJob(n.id)}}}),Mn=ke()({name:"VCardActions",props:Ue(),setup(e,t){let{slots:n}=t;return Ir({VBtn:{slim:!0,variant:"text"}}),Oe(()=>{var r;return h("div",{class:["v-card-actions",e.class],style:e.style},[(r=n.default)==null?void 0:r.call(n)])}),{}}}),Rq=de({opacity:[Number,String],...Ue(),..._t()},"VCardSubtitle"),xm=ke()({name:"VCardSubtitle",props:Rq(),setup(e,t){let{slots:n}=t;return Oe(()=>h(e.tag,{class:["v-card-subtitle",e.class],style:[{"--v-card-subtitle-opacity":e.opacity},e.style]},n)),{}}}),sn=ku("v-card-title");function Iq(e){return{aspectStyles:A(()=>{const t=Number(e.aspectRatio);return t?{paddingBottom:String(1/t*100)+"%"}:void 0})}}const PA=de({aspectRatio:[String,Number],contentClass:null,inline:Boolean,...Ue(),...Or()},"VResponsive"),hk=ke()({name:"VResponsive",props:PA(),setup(e,t){let{slots:n}=t;const{aspectStyles:r}=Iq(e),{dimensionStyles:s}=Mr(e);return Oe(()=>{var i;return h("div",{class:["v-responsive",{"v-responsive--inline":e.inline},e.class],style:[s.value,e.style]},[h("div",{class:"v-responsive__sizer",style:r.value},null),(i=n.additional)==null?void 0:i.call(n),n.default&&h("div",{class:["v-responsive__content",e.contentClass]},[n.default()])])}),{}}});function Aq(e,t){if(!Gb)return;const n=t.modifiers||{},r=t.value,{handler:s,options:i}=typeof r=="object"?r:{handler:r,options:{}},o=new IntersectionObserver(function(){var d;let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=arguments.length>1?arguments[1]:void 0;const u=(d=e._observe)==null?void 0:d[t.instance.$.uid];if(!u)return;const c=a.some(f=>f.isIntersecting);s&&(!n.quiet||u.init)&&(!n.once||c||u.init)&&s(c,a,l),c&&n.once?RA(e,t):u.init=!0},i);e._observe=Object(e._observe),e._observe[t.instance.$.uid]={init:!1,observer:o},o.observe(e)}function RA(e,t){var r;const n=(r=e._observe)==null?void 0:r[t.instance.$.uid];n&&(n.observer.unobserve(e),delete e._observe[t.instance.$.uid])}const H_={mounted:Aq,unmounted:RA},Oq=de({absolute:Boolean,alt:String,cover:Boolean,color:String,draggable:{type:[Boolean,String],default:void 0},eager:Boolean,gradient:String,lazySrc:String,options:{type:Object,default:()=>({root:void 0,rootMargin:void 0,threshold:void 0})},sizes:String,src:{type:[String,Object],default:""},crossorigin:String,referrerpolicy:String,srcset:String,position:String,...PA(),...Ue(),...Dn(),...Iu()},"VImg"),ds=ke()({name:"VImg",directives:{intersect:H_},props:Oq(),emits:{loadstart:e=>!0,load:e=>!0,error:e=>!0},setup(e,t){let{emit:n,slots:r}=t;const{backgroundColorClasses:s,backgroundColorStyles:i}=fr(()=>e.color),{roundedClasses:o}=jn(e),a=an("VImg"),l=Ie(""),u=j(),c=Ie(e.eager?"loading":"idle"),d=Ie(),f=Ie(),p=A(()=>e.src&&typeof e.src=="object"?{src:e.src.src,srcset:e.srcset||e.src.srcset,lazySrc:e.lazySrc||e.src.lazySrc,aspect:Number(e.aspectRatio||e.src.aspect||0)}:{src:e.src,srcset:e.srcset,lazySrc:e.lazySrc,aspect:Number(e.aspectRatio||0)}),g=A(()=>p.value.aspect||d.value/f.value||0);Ee(()=>e.src,()=>{m(c.value!=="idle")}),Ee(g,(R,M)=>{!R&&M&&u.value&&C(u.value)}),wu(()=>m());function m(R){if(!(e.eager&&R)&&!(Gb&&!R&&!e.eager)){if(c.value="loading",p.value.lazySrc){const M=new Image;M.src=p.value.lazySrc,C(M,null)}p.value.src&&Mt(()=>{var M;n("loadstart",((M=u.value)==null?void 0:M.currentSrc)||p.value.src),setTimeout(()=>{var D;if(!a.isUnmounted)if((D=u.value)!=null&&D.complete){if(u.value.naturalWidth||_(),c.value==="error")return;g.value||C(u.value,null),c.value==="loading"&&y()}else g.value||C(u.value),b()})})}}function y(){var R;a.isUnmounted||(b(),C(u.value),c.value="loaded",n("load",((R=u.value)==null?void 0:R.currentSrc)||p.value.src))}function _(){var R;a.isUnmounted||(c.value="error",n("error",((R=u.value)==null?void 0:R.currentSrc)||p.value.src))}function b(){const R=u.value;R&&(l.value=R.currentSrc||R.src)}let x=-1;Cn(()=>{clearTimeout(x)});function C(R){let M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:100;const D=()=>{if(clearTimeout(x),a.isUnmounted)return;const{naturalHeight:F,naturalWidth:U}=R;F||U?(d.value=U,f.value=F):!R.complete&&c.value==="loading"&&M!=null?x=window.setTimeout(D,M):(R.currentSrc.endsWith(".svg")||R.currentSrc.startsWith("data:image/svg+xml"))&&(d.value=1,f.value=1)};D()}const S=ae(()=>({"v-img__img--cover":e.cover,"v-img__img--contain":!e.cover})),T=()=>{var D;if(!p.value.src||c.value==="idle")return null;const R=h("img",{class:["v-img__img",S.value],style:{objectPosition:e.position},crossorigin:e.crossorigin,src:p.value.src,srcset:p.value.srcset,alt:e.alt,referrerpolicy:e.referrerpolicy,draggable:e.draggable,sizes:e.sizes,ref:u,onLoad:y,onError:_},null),M=(D=r.sources)==null?void 0:D.call(r);return h(si,{transition:e.transition,appear:!0},{default:()=>[Nt(M?h("picture",{class:"v-img__picture"},[M,R]):R,[[Qi,c.value==="loaded"]])]})},P=()=>h(si,{transition:e.transition},{default:()=>[p.value.lazySrc&&c.value!=="loaded"&&h("img",{class:["v-img__img","v-img__img--preload",S.value],style:{objectPosition:e.position},crossorigin:e.crossorigin,src:p.value.lazySrc,alt:e.alt,referrerpolicy:e.referrerpolicy,draggable:e.draggable},null)]}),w=()=>r.placeholder?h(si,{transition:e.transition,appear:!0},{default:()=>[(c.value==="loading"||c.value==="error"&&!r.error)&&h("div",{class:"v-img__placeholder"},[r.placeholder()])]}):null,E=()=>r.error?h(si,{transition:e.transition,appear:!0},{default:()=>[c.value==="error"&&h("div",{class:"v-img__error"},[r.error()])]}):null,I=()=>e.gradient?h("div",{class:"v-img__gradient",style:{backgroundImage:`linear-gradient(${e.gradient})`}},null):null,O=Ie(!1);{const R=Ee(g,M=>{M&&(requestAnimationFrame(()=>{requestAnimationFrame(()=>{O.value=!0})}),R())})}return Oe(()=>{const R=hk.filterProps(e);return Nt(h(hk,ge({class:["v-img",{"v-img--absolute":e.absolute,"v-img--booting":!O.value},s.value,o.value,e.class],style:[{width:Ne(e.width==="auto"?d.value:e.width)},i.value,e.style]},R,{aspectRatio:g.value,"aria-label":e.alt,role:e.alt?"img":void 0}),{additional:()=>h(Ae,null,[h(T,null,null),h(P,null,null),h(I,null,null),h(w,null,null),h(E,null,null)]),default:r.default}),[[hr("intersect"),{handler:m,options:e.options},null,{once:!0}]])}),{currentSrc:l,image:u,state:c,naturalWidth:d,naturalHeight:f}}}),Mq=de({start:Boolean,end:Boolean,icon:He,image:String,text:String,...vs(),...Ue(),...Ar(),...Dn(),...Eu(),..._t(),...Lt(),...$s({variant:"flat"})},"VAvatar"),ut=ke()({name:"VAvatar",props:Mq(),setup(e,t){let{slots:n}=t;const{themeClasses:r}=Zt(e),{borderClasses:s}=Ds(e),{colorClasses:i,colorStyles:o,variantClasses:a}=Ja(e),{densityClasses:l}=ys(e),{roundedClasses:u}=jn(e),{sizeClasses:c,sizeStyles:d}=Pd(e);return Oe(()=>h(e.tag,{class:["v-avatar",{"v-avatar--start":e.start,"v-avatar--end":e.end},r.value,s.value,i.value,l.value,u.value,c.value,a.value,e.class],style:[o.value,d.value,e.style]},{default:()=>[n.default?h(Ot,{key:"content-defaults",defaults:{VImg:{cover:!0,src:e.image},VIcon:{icon:e.icon}}},{default:()=>[n.default()]}):e.image?h(ds,{key:"image",src:e.image,alt:"",cover:!0},null):e.icon?h(J,{key:"icon",icon:e.icon},null):e.text,jo(!1,"v-avatar")]})),{}}}),Dq=de({appendAvatar:String,appendIcon:He,prependAvatar:String,prependIcon:He,subtitle:{type:[String,Number,Boolean],default:void 0},title:{type:[String,Number,Boolean],default:void 0},...Ue(),...Ar()},"VCardItem"),Lq=ke()({name:"VCardItem",props:Dq(),setup(e,t){let{slots:n}=t;return Oe(()=>{var u;const r=!!(e.prependAvatar||e.prependIcon),s=!!(r||n.prepend),i=!!(e.appendAvatar||e.appendIcon),o=!!(i||n.append),a=!!(e.title!=null||n.title),l=!!(e.subtitle!=null||n.subtitle);return h("div",{class:["v-card-item",e.class],style:e.style},[s&&h("div",{key:"prepend",class:"v-card-item__prepend"},[n.prepend?h(Ot,{key:"prepend-defaults",disabled:!r,defaults:{VAvatar:{density:e.density,image:e.prependAvatar},VIcon:{density:e.density,icon:e.prependIcon}}},n.prepend):h(Ae,null,[e.prependAvatar&&h(ut,{key:"prepend-avatar",density:e.density,image:e.prependAvatar},null),e.prependIcon&&h(J,{key:"prepend-icon",density:e.density,icon:e.prependIcon},null)])]),h("div",{class:"v-card-item__content"},[a&&h(sn,{key:"title"},{default:()=>{var c;return[((c=n.title)==null?void 0:c.call(n))??se(e.title)]}}),l&&h(xm,{key:"subtitle"},{default:()=>{var c;return[((c=n.subtitle)==null?void 0:c.call(n))??se(e.subtitle)]}}),(u=n.default)==null?void 0:u.call(n)]),o&&h("div",{key:"append",class:"v-card-item__append"},[n.append?h(Ot,{key:"append-defaults",disabled:!i,defaults:{VAvatar:{density:e.density,image:e.appendAvatar},VIcon:{density:e.density,icon:e.appendIcon}}},n.append):h(Ae,null,[e.appendIcon&&h(J,{key:"append-icon",density:e.density,icon:e.appendIcon},null),e.appendAvatar&&h(ut,{key:"append-avatar",density:e.density,image:e.appendAvatar},null)])])])}),{}}}),$q=de({opacity:[Number,String],...Ue(),..._t()},"VCardText"),en=ke()({name:"VCardText",props:$q(),setup(e,t){let{slots:n}=t;return Oe(()=>h(e.tag,{class:["v-card-text",e.class],style:[{"--v-card-text-opacity":e.opacity},e.style]},n)),{}}}),Fq=de({appendAvatar:String,appendIcon:He,disabled:Boolean,flat:Boolean,hover:Boolean,image:String,link:{type:Boolean,default:void 0},prependAvatar:String,prependIcon:He,ripple:{type:[Boolean,Object],default:!0},subtitle:{type:[String,Number,Boolean],default:void 0},text:{type:[String,Number,Boolean],default:void 0},title:{type:[String,Number,Boolean],default:void 0},...vs(),...Ue(),...Ar(),...Or(),...bs(),...Kp(),...qo(),...Cu(),...Dn(),...Qp(),..._t(),...Lt(),...$s({variant:"elevated"})},"VCard"),yt=ke()({name:"VCard",directives:{Ripple:Pu},props:Fq(),setup(e,t){let{attrs:n,slots:r}=t;const{themeClasses:s}=Zt(e),{borderClasses:i}=Ds(e),{colorClasses:o,colorStyles:a,variantClasses:l}=Ja(e),{densityClasses:u}=ys(e),{dimensionStyles:c}=Mr(e),{elevationClasses:d}=Ls(e),{loaderClasses:f}=Rd(e),{locationStyles:p}=Za(e),{positionClasses:g}=Tu(e),{roundedClasses:m}=jn(e),y=Xp(e,n);return Oe(()=>{const _=e.link!==!1&&y.isLink.value,b=!e.disabled&&e.link!==!1&&(e.link||y.isClickable.value),x=_?"a":e.tag,C=!!(r.title||e.title!=null),S=!!(r.subtitle||e.subtitle!=null),T=C||S,P=!!(r.append||e.appendAvatar||e.appendIcon),w=!!(r.prepend||e.prependAvatar||e.prependIcon),E=!!(r.image||e.image),I=T||w||P,O=!!(r.text||e.text!=null);return Nt(h(x,ge({class:["v-card",{"v-card--disabled":e.disabled,"v-card--flat":e.flat,"v-card--hover":e.hover&&!(e.disabled||e.flat),"v-card--link":b},s.value,i.value,o.value,u.value,d.value,f.value,g.value,m.value,l.value,e.class],style:[a.value,c.value,p.value,e.style],onClick:b&&y.navigate,tabindex:e.disabled?-1:void 0},y.linkProps),{default:()=>{var R;return[E&&h("div",{key:"image",class:"v-card__image"},[r.image?h(Ot,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{cover:!0,src:e.image}}},r.image):h(ds,{key:"image-img",cover:!0,src:e.image},null)]),h(Yp,{name:"v-card",active:!!e.loading,color:typeof e.loading=="boolean"?void 0:e.loading},{default:r.loader}),I&&h(Lq,{key:"item",prependAvatar:e.prependAvatar,prependIcon:e.prependIcon,title:e.title,subtitle:e.subtitle,appendAvatar:e.appendAvatar,appendIcon:e.appendIcon},{default:r.item,prepend:r.prepend,title:r.title,subtitle:r.subtitle,append:r.append}),O&&h(en,{key:"text"},{default:()=>{var M;return[((M=r.text)==null?void 0:M.call(r))??e.text]}}),(R=r.default)==null?void 0:R.call(r),r.actions&&h(Mn,null,{default:r.actions}),jo(b,"v-card")]}}),[[hr("ripple"),b&&e.ripple]])}),{}}}),IA=Symbol.for("vuetify:goto");function AA(){return{container:void 0,duration:300,layout:!1,offset:0,easing:"easeInOutCubic",patterns:{linear:e=>e,easeInQuad:e=>e**2,easeOutQuad:e=>e*(2-e),easeInOutQuad:e=>e<.5?2*e**2:-1+(4-2*e)*e,easeInCubic:e=>e**3,easeOutCubic:e=>--e**3+1,easeInOutCubic:e=>e<.5?4*e**3:(e-1)*(2*e-2)*(2*e-2)+1,easeInQuart:e=>e**4,easeOutQuart:e=>1- --e**4,easeInOutQuart:e=>e<.5?8*e**4:1-8*--e**4,easeInQuint:e=>e**5,easeOutQuint:e=>1+--e**5,easeInOutQuint:e=>e<.5?16*e**5:1+16*--e**5}}}function Nq(e){return j_(e)??(document.scrollingElement||document.body)}function j_(e){return typeof e=="string"?document.querySelector(e):Kb(e)}function Ug(e,t,n){if(typeof e=="number")return t&&n?-e:e;let r=j_(e),s=0;for(;r;)s+=t?r.offsetLeft:r.offsetTop,r=r.offsetParent;return s}function Vq(e,t){return{rtl:t.isRtl,options:er(AA(),e)}}async function pk(e,t,n,r){const s=n?"scrollLeft":"scrollTop",i=er((r==null?void 0:r.options)??AA(),t),o=r==null?void 0:r.rtl.value,a=(typeof e=="number"?e:j_(e))??0,l=i.container==="parent"&&a instanceof HTMLElement?a.parentElement:Nq(i.container),u=typeof i.easing=="function"?i.easing:i.patterns[i.easing];if(!u)throw new TypeError(`Easing function "${i.easing}" not found.`);let c;if(typeof a=="number")c=Ug(a,n,o);else if(c=Ug(a,n,o)-Ug(l,n,o),i.layout){const g=window.getComputedStyle(a).getPropertyValue("--v-layout-top");g&&(c-=parseInt(g,10))}c+=i.offset,c=Uq(l,c,!!o,!!n);const d=l[s]??0;if(c===d)return Promise.resolve(c);const f=performance.now();return new Promise(p=>requestAnimationFrame(function g(m){const _=(m-f)/i.duration,b=Math.floor(d+(c-d)*u(Cr(_,0,1)));if(l[s]=b,_>=1&&Math.abs(b-l[s])<10)return p(c);if(_>2)return p(l[s]);requestAnimationFrame(g)}))}function Bq(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=Qe(IA),{isRtl:n}=Dr();if(!t)throw new Error("[Vuetify] Could not find injected goto instance");const r={...t,rtl:ae(()=>t.rtl.value||n.value)};async function s(i,o){return pk(i,er(e,o),!1,r)}return s.horizontal=async(i,o)=>pk(i,er(e,o),!0,r),s}function Uq(e,t,n,r){const{scrollWidth:s,scrollHeight:i}=e,[o,a]=e===document.scrollingElement?[window.innerWidth,window.innerHeight]:[e.offsetWidth,e.offsetHeight];let l,u;return r?n?(l=-(s-o),u=0):(l=0,u=s-o):(l=0,u=i+-a),Math.max(Math.min(t,u),l)}function zq(e){let{selectedElement:t,containerElement:n,isRtl:r,isHorizontal:s}=e;const i=id(s,n),o=OA(s,r,n),a=id(s,t),l=MA(s,t),u=a*.4;return o>l?l-u:o+i<l+a?l-i+a+u:o}function Hq(e){let{selectedElement:t,containerElement:n,isHorizontal:r}=e;const s=id(r,n),i=MA(r,t),o=id(r,t);return i-s/2+o/2}function mk(e,t){const n=e?"scrollWidth":"scrollHeight";return(t==null?void 0:t[n])||0}function jq(e,t){const n=e?"clientWidth":"clientHeight";return(t==null?void 0:t[n])||0}function OA(e,t,n){if(!n)return 0;const{scrollLeft:r,offsetWidth:s,scrollWidth:i}=n;return e?t?i-s+r:r:n.scrollTop}function id(e,t){const n=e?"offsetWidth":"offsetHeight";return(t==null?void 0:t[n])||0}function MA(e,t){const n=e?"offsetLeft":"offsetTop";return(t==null?void 0:t[n])||0}const qq=Symbol.for("vuetify:v-slide-group"),DA=de({centerActive:Boolean,direction:{type:String,default:"horizontal"},symbol:{type:null,default:qq},nextIcon:{type:He,default:"$next"},prevIcon:{type:He,default:"$prev"},showArrows:{type:[Boolean,String],validator:e=>typeof e=="boolean"||["always","desktop","mobile"].includes(e)},...Ue(),...el({mobile:null}),..._t(),...Ed({selectedClass:"v-slide-group-item--active"})},"VSlideGroup"),gk=ke()({name:"VSlideGroup",props:DA(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{isRtl:r}=Dr(),{displayClasses:s,mobile:i}=fi(e),o=xu(e,e.symbol),a=Ie(!1),l=Ie(0),u=Ie(0),c=Ie(0),d=A(()=>e.direction==="horizontal"),{resizeRef:f,contentRect:p}=Va(),{resizeRef:g,contentRect:m}=Va(),y=Bq(),_=A(()=>({container:f.el,duration:200,easing:"easeOutQuart"})),b=A(()=>o.selected.value.length?o.items.value.findIndex(ee=>ee.id===o.selected.value[0]):-1),x=A(()=>o.selected.value.length?o.items.value.findIndex(ee=>ee.id===o.selected.value[o.selected.value.length-1]):-1);if(Et){let ee=-1;Ee(()=>[o.selected.value,p.value,m.value,d.value],()=>{cancelAnimationFrame(ee),ee=requestAnimationFrame(()=>{if(p.value&&m.value){const q=d.value?"width":"height";u.value=p.value[q],c.value=m.value[q],a.value=u.value+1<c.value}if(b.value>=0&&g.el){const q=g.el.children[x.value];S(q,e.centerActive)}})})}const C=Ie(!1);function S(ee,q){let G=0;q?G=Hq({containerElement:f.el,isHorizontal:d.value,selectedElement:ee}):G=zq({containerElement:f.el,isHorizontal:d.value,isRtl:r.value,selectedElement:ee}),T(G)}function T(ee){if(!Et||!f.el)return;const q=id(d.value,f.el),G=OA(d.value,r.value,f.el);if(!(mk(d.value,f.el)<=q||Math.abs(ee-G)<16)){if(d.value&&r.value&&f.el){const{scrollWidth:ie,offsetWidth:we}=f.el;ee=ie-we-ee}d.value?y.horizontal(ee,_.value):y(ee,_.value)}}function P(ee){const{scrollTop:q,scrollLeft:G}=ee.target;l.value=d.value?G:q}function w(ee){if(C.value=!0,!(!a.value||!g.el)){for(const q of ee.composedPath())for(const G of g.el.children)if(G===q){S(G);return}}}function E(ee){C.value=!1}let I=!1;function O(ee){var q;!I&&!C.value&&!(ee.relatedTarget&&((q=g.el)!=null&&q.contains(ee.relatedTarget)))&&F(),I=!1}function R(){I=!0}function M(ee){if(!g.el)return;function q(G){ee.preventDefault(),F(G)}d.value?ee.key==="ArrowRight"?q(r.value?"prev":"next"):ee.key==="ArrowLeft"&&q(r.value?"next":"prev"):ee.key==="ArrowDown"?q("next"):ee.key==="ArrowUp"&&q("prev"),ee.key==="Home"?q("first"):ee.key==="End"&&q("last")}function D(ee,q){if(!ee)return;let G=ee;do G=G==null?void 0:G[q==="next"?"nextElementSibling":"previousElementSibling"];while(G!=null&&G.hasAttribute("disabled"));return G}function F(ee){if(!g.el)return;let q;if(!ee)q=qc(g.el)[0];else if(ee==="next"){if(q=D(g.el.querySelector(":focus"),ee),!q)return F("first")}else if(ee==="prev"){if(q=D(g.el.querySelector(":focus"),ee),!q)return F("last")}else ee==="first"?(q=g.el.firstElementChild,q!=null&&q.hasAttribute("disabled")&&(q=D(q,"next"))):ee==="last"&&(q=g.el.lastElementChild,q!=null&&q.hasAttribute("disabled")&&(q=D(q,"prev")));q&&q.focus({preventScroll:!0})}function U(ee){const q=d.value&&r.value?-1:1,G=(ee==="prev"?-q:q)*u.value;let le=l.value+G;if(d.value&&r.value&&f.el){const{scrollWidth:ie,offsetWidth:we}=f.el;le+=ie-we}T(le)}const K=A(()=>({next:o.next,prev:o.prev,select:o.select,isSelected:o.isSelected})),Q=A(()=>{switch(e.showArrows){case"always":return!0;case"desktop":return!i.value;case!0:return a.value||Math.abs(l.value)>0;case"mobile":return i.value||a.value||Math.abs(l.value)>0;default:return!i.value&&(a.value||Math.abs(l.value)>0)}}),H=A(()=>Math.abs(l.value)>1),V=A(()=>{if(!f.value)return!1;const ee=mk(d.value,f.el),q=jq(d.value,f.el);return ee-q-Math.abs(l.value)>1});return Oe(()=>h(e.tag,{class:["v-slide-group",{"v-slide-group--vertical":!d.value,"v-slide-group--has-affixes":Q.value,"v-slide-group--is-overflowing":a.value},s.value,e.class],style:e.style,tabindex:C.value||o.selected.value.length?-1:0,onFocus:O},{default:()=>{var ee,q,G;return[Q.value&&h("div",{key:"prev",class:["v-slide-group__prev",{"v-slide-group__prev--disabled":!H.value}],onMousedown:R,onClick:()=>H.value&&U("prev")},[((ee=n.prev)==null?void 0:ee.call(n,K.value))??h(mw,null,{default:()=>[h(J,{icon:r.value?e.nextIcon:e.prevIcon},null)]})]),h("div",{key:"container",ref:f,class:"v-slide-group__container",onScroll:P},[h("div",{ref:g,class:"v-slide-group__content",onFocusin:w,onFocusout:E,onKeydown:M},[(q=n.default)==null?void 0:q.call(n,K.value)])]),Q.value&&h("div",{key:"next",class:["v-slide-group__next",{"v-slide-group__next--disabled":!V.value}],onMousedown:R,onClick:()=>V.value&&U("next")},[((G=n.next)==null?void 0:G.call(n,K.value))??h(mw,null,{default:()=>[h(J,{icon:r.value?e.prevIcon:e.nextIcon},null)]})])]}})),{selected:o.selected,scrollTo:U,scrollOffset:l,focus:F,hasPrev:H,hasNext:V}}}),LA=Symbol.for("vuetify:v-chip-group"),Wq=de({baseColor:String,column:Boolean,filter:Boolean,valueComparator:{type:Function,default:as},...DA(),...Ue(),...Ed({selectedClass:"v-chip--selected"}),..._t(),...Lt(),...$s({variant:"tonal"})},"VChipGroup"),ap=ke()({name:"VChipGroup",props:Wq(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{themeClasses:r}=Zt(e),{isSelected:s,select:i,next:o,prev:a,selected:l}=xu(e,LA);return Ir({VChip:{baseColor:ae(()=>e.baseColor),color:ae(()=>e.color),disabled:ae(()=>e.disabled),filter:ae(()=>e.filter),variant:ae(()=>e.variant)}}),Oe(()=>{const u=gk.filterProps(e);return h(gk,ge(u,{class:["v-chip-group",{"v-chip-group--column":e.column},r.value,e.class],style:e.style}),{default:()=>{var c;return[(c=n.default)==null?void 0:c.call(n,{isSelected:s,select:i,next:o,prev:a,selected:l.value})]}})}),{}}}),Gq=de({activeClass:String,appendAvatar:String,appendIcon:He,baseColor:String,closable:Boolean,closeIcon:{type:He,default:"$delete"},closeLabel:{type:String,default:"$vuetify.close"},draggable:Boolean,filter:Boolean,filterIcon:{type:He,default:"$complete"},label:Boolean,link:{type:Boolean,default:void 0},pill:Boolean,prependAvatar:String,prependIcon:He,ripple:{type:[Boolean,Object],default:!0},text:{type:[String,Number,Boolean],default:void 0},modelValue:{type:Boolean,default:!0},onClick:Un(),onClickOnce:Un(),...vs(),...Ue(),...Ar(),...bs(),...Cd(),...Dn(),...Qp(),...Eu(),..._t({tag:"span"}),...Lt(),...$s({variant:"tonal"})},"VChip"),Sn=ke()({name:"VChip",directives:{Ripple:Pu},props:Gq(),emits:{"click:close":e=>!0,"update:modelValue":e=>!0,"group:selected":e=>!0,click:e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const{t:i}=Gr(),{borderClasses:o}=Ds(e),{densityClasses:a}=ys(e),{elevationClasses:l}=Ls(e),{roundedClasses:u}=jn(e),{sizeClasses:c}=Pd(e),{themeClasses:d}=Zt(e),f=it(e,"modelValue"),p=Td(e,LA,!1),g=Xp(e,n),m=ae(()=>e.link!==!1&&g.isLink.value),y=A(()=>!e.disabled&&e.link!==!1&&(!!p||e.link||g.isClickable.value)),_=ae(()=>({"aria-label":i(e.closeLabel),onClick(P){P.preventDefault(),P.stopPropagation(),f.value=!1,r("click:close",P)}})),{colorClasses:b,colorStyles:x,variantClasses:C}=Ja(()=>({color:!p||p.isSelected.value?e.color??e.baseColor:e.baseColor,variant:e.variant}));function S(P){var w;r("click",P),y.value&&((w=g.navigate)==null||w.call(g,P),p==null||p.toggle())}function T(P){(P.key==="Enter"||P.key===" ")&&(P.preventDefault(),S(P))}return()=>{var D;const P=g.isLink.value?"a":e.tag,w=!!(e.appendIcon||e.appendAvatar),E=!!(w||s.append),I=!!(s.close||e.closable),O=!!(s.filter||e.filter)&&p,R=!!(e.prependIcon||e.prependAvatar),M=!!(R||s.prepend);return f.value&&Nt(h(P,ge({class:["v-chip",{"v-chip--disabled":e.disabled,"v-chip--label":e.label,"v-chip--link":y.value,"v-chip--filter":O,"v-chip--pill":e.pill,[`${e.activeClass}`]:e.activeClass&&((D=g.isActive)==null?void 0:D.value)},d.value,o.value,b.value,a.value,l.value,u.value,c.value,C.value,p==null?void 0:p.selectedClass.value,e.class],style:[x.value,e.style],disabled:e.disabled||void 0,draggable:e.draggable,tabindex:y.value?0:void 0,onClick:S,onKeydown:y.value&&!m.value&&T},g.linkProps),{default:()=>{var F;return[jo(y.value,"v-chip"),O&&h(_P,{key:"filter"},{default:()=>[Nt(h("div",{class:"v-chip__filter"},[s.filter?h(Ot,{key:"filter-defaults",disabled:!e.filterIcon,defaults:{VIcon:{icon:e.filterIcon}}},s.filter):h(J,{key:"filter-icon",icon:e.filterIcon},null)]),[[Qi,p.isSelected.value]])]}),M&&h("div",{key:"prepend",class:"v-chip__prepend"},[s.prepend?h(Ot,{key:"prepend-defaults",disabled:!R,defaults:{VAvatar:{image:e.prependAvatar,start:!0},VIcon:{icon:e.prependIcon,start:!0}}},s.prepend):h(Ae,null,[e.prependIcon&&h(J,{key:"prepend-icon",icon:e.prependIcon,start:!0},null),e.prependAvatar&&h(ut,{key:"prepend-avatar",image:e.prependAvatar,start:!0},null)])]),h("div",{class:"v-chip__content","data-no-activator":""},[((F=s.default)==null?void 0:F.call(s,{isSelected:p==null?void 0:p.isSelected.value,selectedClass:p==null?void 0:p.selectedClass.value,select:p==null?void 0:p.select,toggle:p==null?void 0:p.toggle,value:p==null?void 0:p.value.value,disabled:e.disabled}))??se(e.text)]),E&&h("div",{key:"append",class:"v-chip__append"},[s.append?h(Ot,{key:"append-defaults",disabled:!w,defaults:{VAvatar:{end:!0,image:e.appendAvatar},VIcon:{end:!0,icon:e.appendIcon}}},s.append):h(Ae,null,[e.appendIcon&&h(J,{key:"append-icon",end:!0,icon:e.appendIcon},null),e.appendAvatar&&h(ut,{key:"append-avatar",end:!0,image:e.appendAvatar},null)])]),I&&h("button",ge({key:"close",class:"v-chip__close",type:"button","data-testid":"close-chip"},_.value),[s.close?h(Ot,{key:"close-defaults",defaults:{VIcon:{icon:e.closeIcon,size:"x-small"}}},s.close):h(J,{key:"close-icon",icon:e.closeIcon,size:"x-small"},null)])]}}),[[hr("ripple"),y.value&&e.ripple,null]])}}}),Kq=de({fluid:{type:Boolean,default:!1},...Ue(),...Or(),..._t()},"VContainer"),Hn=ke()({name:"VContainer",props:Kq(),setup(e,t){let{slots:n}=t;const{rtlClasses:r}=Dr(),{dimensionStyles:s}=Mr(e);return Oe(()=>h(e.tag,{class:["v-container",{"v-container--fluid":e.fluid},r.value,e.class],style:[s.value,e.style]},n)),{}}}),$A=Jp.reduce((e,t)=>(e[t]={type:[Boolean,String,Number],default:!1},e),{}),FA=Jp.reduce((e,t)=>{const n="offset"+ci(t);return e[n]={type:[String,Number],default:null},e},{}),NA=Jp.reduce((e,t)=>{const n="order"+ci(t);return e[n]={type:[String,Number],default:null},e},{}),vk={col:Object.keys($A),offset:Object.keys(FA),order:Object.keys(NA)};function Yq(e,t,n){let r=e;if(!(n==null||n===!1)){if(t){const s=t.replace(e,"");r+=`-${s}`}return e==="col"&&(r="v-"+r),e==="col"&&(n===""||n===!0)||(r+=`-${n}`),r.toLowerCase()}}const Xq=["auto","start","end","center","baseline","stretch"],Qq=de({cols:{type:[Boolean,String,Number],default:!1},...$A,offset:{type:[String,Number],default:null},...FA,order:{type:[String,Number],default:null},...NA,alignSelf:{type:String,default:null,validator:e=>Xq.includes(e)},...Ue(),..._t()},"VCol"),ze=ke()({name:"VCol",props:Qq(),setup(e,t){let{slots:n}=t;const r=A(()=>{const s=[];let i;for(i in vk)vk[i].forEach(a=>{const l=e[a],u=Yq(i,a,l);u&&s.push(u)});const o=s.some(a=>a.startsWith("v-col-"));return s.push({"v-col":!o||!e.cols,[`v-col-${e.cols}`]:e.cols,[`offset-${e.offset}`]:e.offset,[`order-${e.order}`]:e.order,[`align-self-${e.alignSelf}`]:e.alignSelf}),s});return()=>{var s;return pr(e.tag,{class:[r.value,e.class],style:e.style},(s=n.default)==null?void 0:s.call(n))}}}),q_=["start","end","center"],VA=["space-between","space-around","space-evenly"];function W_(e,t){return Jp.reduce((n,r)=>{const s=e+ci(r);return n[s]=t(),n},{})}const Jq=[...q_,"baseline","stretch"],BA=e=>Jq.includes(e),UA=W_("align",()=>({type:String,default:null,validator:BA})),Zq=[...q_,...VA],zA=e=>Zq.includes(e),HA=W_("justify",()=>({type:String,default:null,validator:zA})),eW=[...q_,...VA,"stretch"],jA=e=>eW.includes(e),qA=W_("alignContent",()=>({type:String,default:null,validator:jA})),yk={align:Object.keys(UA),justify:Object.keys(HA),alignContent:Object.keys(qA)},tW={align:"align",justify:"justify",alignContent:"align-content"};function nW(e,t,n){let r=tW[e];if(n!=null){if(t){const s=t.replace(e,"");r+=`-${s}`}return r+=`-${n}`,r.toLowerCase()}}const rW=de({dense:Boolean,noGutters:Boolean,align:{type:String,default:null,validator:BA},...UA,justify:{type:String,default:null,validator:zA},...HA,alignContent:{type:String,default:null,validator:jA},...qA,...Ue(),..._t()},"VRow"),rt=ke()({name:"VRow",props:rW(),setup(e,t){let{slots:n}=t;const r=A(()=>{const s=[];let i;for(i in yk)yk[i].forEach(o=>{const a=e[o],l=nW(i,o,a);l&&s.push(l)});return s.push({"v-row--no-gutters":e.noGutters,"v-row--dense":e.dense,[`align-${e.align}`]:e.align,[`justify-${e.justify}`]:e.justify,[`align-content-${e.alignContent}`]:e.alignContent}),s});return()=>{var s;return pr(e.tag,{class:["v-row",r.value,e.class],style:e.style},(s=n.default)==null?void 0:s.call(n))}}}),wn=ku("v-spacer","div","VSpacer"),sW=Le({__name:"PrinterControlDialog",setup(e){const t=tn(nn.PrinterControlDialog),n=Wt(),r=rr(),s=A(()=>{var d;return(d=t.context())==null?void 0:d.printerId}),i=A(()=>{if(s.value)return n.printer(s.value)}),o=j(10),a=A(()=>{var f,p,g,m,y,_,b,x,C,S;const d=r.printerEventsById[s.value];return(g=(p=(f=d==null?void 0:d.current)==null?void 0:f.payload)==null?void 0:p.temps)!=null&&g.length&&((b=(_=(y=(m=d==null?void 0:d.current)==null?void 0:m.payload)==null?void 0:y.temps[0])==null?void 0:_.tool0)!=null&&b.actual)?(S=(C=(x=d==null?void 0:d.current)==null?void 0:x.payload)==null?void 0:C.temps[0])==null?void 0:S.tool0:null}),l=async(d,f,p)=>{await Qt.sendPrinterJogCommand(s.value,{x:d*o.value,y:f*o.value,z:p*o.value})},u=async d=>{await Qt.sendPrinterHomeCommand(s.value,d)},c=()=>{t.closeDialog()};return(d,f)=>{const p=hi;return $(),te(p,{id:X(t).dialogId,"max-width":"700px",onEscape:f[14]||(f[14]=g=>c())},{default:v(()=>[h(yt,null,{default:v(()=>[h(sn,null,{default:v(()=>f[15]||(f[15]=[k(" Printer Controls ")])),_:1,__:[15]}),h(en,null,{default:v(()=>[i.value?($(),te(Hn,{key:0},{default:v(()=>[h(rt,null,{default:v(()=>[h(ze,{cols:12},{default:v(()=>{var g;return[k(" Printer: "+se((g=i.value)==null?void 0:g.name)+" ",1),f[16]||(f[16]=L("br",null,null,-1)),h(Sn,{color:"primary"},{default:v(()=>{var m,y;return[k(se((m=a.value)==null?void 0:m.actual)+"C / "+se((y=a.value)==null?void 0:y.target)+"C ",1)]}),_:1})]}),_:1,__:[16]})]),_:1}),h(rt,null,{default:v(()=>[h(ze,{cols:8},{default:v(()=>[f[26]||(f[26]=k(" X/Y ")),f[27]||(f[27]=L("br",null,null,-1)),h(re,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[0]||(f[0]=g=>l(-1,1,0))},{default:v(()=>[h(J,null,{default:v(()=>f[17]||(f[17]=[k("north_west")])),_:1,__:[17]})]),_:1}),h(re,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[1]||(f[1]=g=>l(0,1,0))},{default:v(()=>[h(J,null,{default:v(()=>f[18]||(f[18]=[k("north")])),_:1,__:[18]})]),_:1}),h(re,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[2]||(f[2]=g=>l(1,1,0))},{default:v(()=>[h(J,null,{default:v(()=>f[19]||(f[19]=[k("north_east")])),_:1,__:[19]})]),_:1}),f[28]||(f[28]=L("br",null,null,-1)),h(re,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[3]||(f[3]=g=>l(-1,0,0))},{default:v(()=>[h(J,null,{default:v(()=>f[20]||(f[20]=[k("west")])),_:1,__:[20]})]),_:1}),h(re,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[4]||(f[4]=g=>u(["x","y"]))},{default:v(()=>[h(J,null,{default:v(()=>f[21]||(f[21]=[k("home")])),_:1,__:[21]})]),_:1}),h(re,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[5]||(f[5]=g=>l(1,0,0))},{default:v(()=>[h(J,null,{default:v(()=>f[22]||(f[22]=[k("east")])),_:1,__:[22]})]),_:1}),f[29]||(f[29]=L("br",null,null,-1)),h(re,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[6]||(f[6]=g=>l(-1,-1,0))},{default:v(()=>[h(J,null,{default:v(()=>f[23]||(f[23]=[k("south_west")])),_:1,__:[23]})]),_:1}),h(re,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[7]||(f[7]=g=>l(0,-1,0))},{default:v(()=>[h(J,null,{default:v(()=>f[24]||(f[24]=[k("south")])),_:1,__:[24]})]),_:1}),h(re,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[8]||(f[8]=g=>l(1,-1,0))},{default:v(()=>[h(J,null,{default:v(()=>f[25]||(f[25]=[k("south_east")])),_:1,__:[25]})]),_:1})]),_:1,__:[26,27,28,29]}),h(ze,{cols:"4"},{default:v(()=>[f[33]||(f[33]=k(" Z ")),f[34]||(f[34]=L("br",null,null,-1)),h(re,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[9]||(f[9]=g=>l(0,0,1))},{default:v(()=>[h(J,null,{default:v(()=>f[30]||(f[30]=[k("north")])),_:1,__:[30]})]),_:1}),f[35]||(f[35]=L("br",null,null,-1)),h(re,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[10]||(f[10]=g=>u(["z"]))},{default:v(()=>[h(J,null,{default:v(()=>f[31]||(f[31]=[k("home")])),_:1,__:[31]})]),_:1}),f[36]||(f[36]=L("br",null,null,-1)),h(re,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[11]||(f[11]=g=>l(1,0,1))},{default:v(()=>[h(J,null,{default:v(()=>f[32]||(f[32]=[k("south")])),_:1,__:[32]})]),_:1})]),_:1,__:[33,34,35,36]})]),_:1}),h(rt,null,{default:v(()=>[h(ze,{cols:"12"},{default:v(()=>[h(ZT,{modelValue:o.value,"onUpdate:modelValue":f[12]||(f[12]=g=>o.value=g)},{default:v(()=>[h(re,{value:.1},{default:v(()=>f[37]||(f[37]=[k(" 0.1 ")])),_:1,__:[37]}),h(re,{value:1},{default:v(()=>f[38]||(f[38]=[k(" 1 ")])),_:1,__:[38]}),h(re,{value:10},{default:v(()=>f[39]||(f[39]=[k(" 10 ")])),_:1,__:[39]}),h(re,{value:100},{default:v(()=>f[40]||(f[40]=[k(" 100 ")])),_:1,__:[40]})]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})):pe("",!0)]),_:1}),h(Mn,null,{default:v(()=>[h(wn),h(re,{variant:"text",onClick:f[13]||(f[13]=g=>c())},{default:v(()=>f[41]||(f[41]=[k(" Close ")])),_:1,__:[41]})]),_:1})]),_:1})]),_:1},8,["id"])}}});class Ol extends gr{static async batchSettingsGet(t){return await this.post("/api/batch/settings/get",{printerIds:t})}static async batchConnectUsb(t){return await this.post("/api/batch/connect/usb",{printerIds:t})}static async batchConnectSocket(t){return await this.post("/api/batch/connect/socket",{printerIds:t})}static async batchToggleEnabled(t,n){return await this.post("/api/batch/toggle-enabled",{printerIds:t,enabled:n})}static async batchGetLastPrintedFiles(t){const n=Me.batchGetLastPrintedFilesRoute;return await this.post(n,{printerIds:t})}static async batchReprintFiles(t){const n=Me.batchReprintFilesRoute;return await this.post(n,{prints:t})}}var aa=(e=>(e[e.PrinterNotAvailable=0]="PrinterNotAvailable",e[e.NoLastPrint=1]="NoLastPrint",e[e.LastPrintReady=2]="LastPrintReady",e))(aa||{});function iW(e){return e.message?`${e.message}
|
|
62
|
+
${e.stack}`:`'${e}'`}const oW=ku("v-alert-title"),aW=["success","info","warning","error"],lW=de({border:{type:[Boolean,String],validator:e=>typeof e=="boolean"||["top","end","bottom","start"].includes(e)},borderColor:String,closable:Boolean,closeIcon:{type:He,default:"$close"},closeLabel:{type:String,default:"$vuetify.close"},icon:{type:[Boolean,String,Function,Object],default:null},modelValue:{type:Boolean,default:!0},prominent:Boolean,title:String,text:String,type:{type:String,validator:e=>aW.includes(e)},...Ue(),...Ar(),...Or(),...bs(),...qo(),...Cu(),...Dn(),..._t(),...Lt(),...$s({variant:"flat"})},"VAlert"),fn=ke()({name:"VAlert",props:lW(),emits:{"click:close":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{emit:n,slots:r}=t;const s=it(e,"modelValue"),i=ae(()=>{if(e.icon!==!1)return e.type?e.icon??`$${e.type}`:e.icon}),{themeClasses:o}=Zt(e),{colorClasses:a,colorStyles:l,variantClasses:u}=Ja(()=>({color:e.color??e.type,variant:e.variant})),{densityClasses:c}=ys(e),{dimensionStyles:d}=Mr(e),{elevationClasses:f}=Ls(e),{locationStyles:p}=Za(e),{positionClasses:g}=Tu(e),{roundedClasses:m}=jn(e),{textColorClasses:y,textColorStyles:_}=As(()=>e.borderColor),{t:b}=Gr(),x=ae(()=>({"aria-label":b(e.closeLabel),onClick(C){s.value=!1,n("click:close",C)}}));return()=>{const C=!!(r.prepend||i.value),S=!!(r.title||e.title),T=!!(r.close||e.closable);return s.value&&h(e.tag,{class:["v-alert",e.border&&{"v-alert--border":!!e.border,[`v-alert--border-${e.border===!0?"start":e.border}`]:!0},{"v-alert--prominent":e.prominent},o.value,a.value,c.value,f.value,g.value,m.value,u.value,e.class],style:[l.value,d.value,p.value,e.style],role:"alert"},{default:()=>{var P,w;return[jo(!1,"v-alert"),e.border&&h("div",{key:"border",class:["v-alert__border",y.value],style:_.value},null),C&&h("div",{key:"prepend",class:"v-alert__prepend"},[r.prepend?h(Ot,{key:"prepend-defaults",disabled:!i.value,defaults:{VIcon:{density:e.density,icon:i.value,size:e.prominent?44:28}}},r.prepend):h(J,{key:"prepend-icon",density:e.density,icon:i.value,size:e.prominent?44:28},null)]),h("div",{class:"v-alert__content"},[S&&h(oW,{key:"title"},{default:()=>{var E;return[((E=r.title)==null?void 0:E.call(r))??e.title]}}),((P=r.text)==null?void 0:P.call(r))??e.text,(w=r.default)==null?void 0:w.call(r)]),r.append&&h("div",{key:"append",class:"v-alert__append"},[r.append()]),T&&h("div",{key:"close",class:"v-alert__close"},[r.close?h(Ot,{key:"close-defaults",defaults:{VBtn:{icon:e.closeIcon,size:"x-small",variant:"text"}}},{default:()=>{var E;return[(E=r.close)==null?void 0:E.call(r,{props:x.value})]}}):h(re,ge({key:"close-btn",icon:e.closeIcon,size:"x-small",variant:"text"},x.value),null)])]}})}}}),My=Symbol.for("vuetify:list");function WA(){const e=Qe(My,{hasPrepend:Ie(!1),updateHasPrepend:()=>null}),t={hasPrepend:Ie(!1),updateHasPrepend:n=>{n&&(t.hasPrepend.value=n)}};return Kt(My,t),e}function GA(){return Qe(My,null)}const G_=e=>{const t={activate:n=>{let{id:r,value:s,activated:i}=n;return r=Be(r),e&&!s&&i.size===1&&i.has(r)||(s?i.add(r):i.delete(r)),i},in:(n,r,s)=>{let i=new Set;if(n!=null)for(const o of An(n))i=t.activate({id:o,value:!0,activated:new Set(i),children:r,parents:s});return i},out:n=>Array.from(n)};return t},KA=e=>{const t=G_(e);return{activate:r=>{let{activated:s,id:i,...o}=r;i=Be(i);const a=s.has(i)?new Set([i]):new Set;return t.activate({...o,id:i,activated:a})},in:(r,s,i)=>{let o=new Set;if(r!=null){const a=An(r);a.length&&(o=t.in(a.slice(0,1),s,i))}return o},out:(r,s,i)=>t.out(r,s,i)}},uW=e=>{const t=G_(e);return{activate:r=>{let{id:s,activated:i,children:o,...a}=r;return s=Be(s),o.has(s)?i:t.activate({id:s,activated:i,children:o,...a})},in:t.in,out:t.out}},cW=e=>{const t=KA(e);return{activate:r=>{let{id:s,activated:i,children:o,...a}=r;return s=Be(s),o.has(s)?i:t.activate({id:s,activated:i,children:o,...a})},in:t.in,out:t.out}},dW={open:e=>{let{id:t,value:n,opened:r,parents:s}=e;if(n){const i=new Set;i.add(t);let o=s.get(t);for(;o!=null;)i.add(o),o=s.get(o);return i}else return r.delete(t),r},select:()=>null},YA={open:e=>{let{id:t,value:n,opened:r,parents:s}=e;if(n){let i=s.get(t);for(r.add(t);i!=null&&i!==t;)r.add(i),i=s.get(i);return r}else r.delete(t);return r},select:()=>null},fW={open:YA.open,select:e=>{let{id:t,value:n,opened:r,parents:s}=e;if(!n)return r;const i=[];let o=s.get(t);for(;o!=null;)i.push(o),o=s.get(o);return new Set(i)}},K_=e=>{const t={select:n=>{let{id:r,value:s,selected:i}=n;if(r=Be(r),e&&!s){const o=Array.from(i.entries()).reduce((a,l)=>{let[u,c]=l;return c==="on"&&a.push(u),a},[]);if(o.length===1&&o[0]===r)return i}return i.set(r,s?"on":"off"),i},in:(n,r,s)=>{const i=new Map;for(const o of n||[])t.select({id:o,value:!0,selected:i,children:r,parents:s});return i},out:n=>{const r=[];for(const[s,i]of n.entries())i==="on"&&r.push(s);return r}};return t},XA=e=>{const t=K_(e);return{select:r=>{let{selected:s,id:i,...o}=r;i=Be(i);const a=s.has(i)?new Map([[i,s.get(i)]]):new Map;return t.select({...o,id:i,selected:a})},in:(r,s,i)=>r!=null&&r.length?t.in(r.slice(0,1),s,i):new Map,out:(r,s,i)=>t.out(r,s,i)}},hW=e=>{const t=K_(e);return{select:r=>{let{id:s,selected:i,children:o,...a}=r;return s=Be(s),o.has(s)?i:t.select({id:s,selected:i,children:o,...a})},in:t.in,out:t.out}},pW=e=>{const t=XA(e);return{select:r=>{let{id:s,selected:i,children:o,...a}=r;return s=Be(s),o.has(s)?i:t.select({id:s,selected:i,children:o,...a})},in:t.in,out:t.out}},QA=e=>{const t={select:n=>{let{id:r,value:s,selected:i,children:o,parents:a}=n;r=Be(r);const l=new Map(i),u=[r];for(;u.length;){const d=u.shift();i.set(Be(d),s?"on":"off"),o.has(d)&&u.push(...o.get(d))}let c=Be(a.get(r));for(;c;){const d=o.get(c),f=d.every(g=>i.get(Be(g))==="on"),p=d.every(g=>!i.has(Be(g))||i.get(Be(g))==="off");i.set(c,f?"on":p?"off":"indeterminate"),c=Be(a.get(c))}return e&&!s&&Array.from(i.entries()).reduce((f,p)=>{let[g,m]=p;return m==="on"&&f.push(g),f},[]).length===0?l:i},in:(n,r,s)=>{let i=new Map;for(const o of n||[])i=t.select({id:o,value:!0,selected:i,children:r,parents:s});return i},out:(n,r)=>{const s=[];for(const[i,o]of n.entries())o==="on"&&!r.has(i)&&s.push(i);return s}};return t},mW=e=>{const t=QA(e);return{select:t.select,in:t.in,out:(r,s,i)=>{const o=[];for(const[a,l]of r.entries())if(l==="on"){if(i.has(a)){const u=i.get(a);if(r.get(u)==="on")continue}o.push(a)}return o}}},od=Symbol.for("vuetify:nested"),JA={id:Ie(),root:{register:()=>null,unregister:()=>null,parents:j(new Map),children:j(new Map),open:()=>null,openOnSelect:()=>null,activate:()=>null,select:()=>null,activatable:j(!1),selectable:j(!1),opened:j(new Set),activated:j(new Set),selected:j(new Map),selectedValues:j([]),getPath:()=>[]}},gW=de({activatable:Boolean,selectable:Boolean,activeStrategy:[String,Function,Object],selectStrategy:[String,Function,Object],openStrategy:[String,Object],opened:null,activated:null,selected:null,mandatory:Boolean},"nested"),vW=e=>{let t=!1;const n=j(new Map),r=j(new Map),s=it(e,"opened",e.opened,g=>new Set(g),g=>[...g.values()]),i=A(()=>{if(typeof e.activeStrategy=="object")return e.activeStrategy;if(typeof e.activeStrategy=="function")return e.activeStrategy(e.mandatory);switch(e.activeStrategy){case"leaf":return uW(e.mandatory);case"single-leaf":return cW(e.mandatory);case"independent":return G_(e.mandatory);case"single-independent":default:return KA(e.mandatory)}}),o=A(()=>{if(typeof e.selectStrategy=="object")return e.selectStrategy;if(typeof e.selectStrategy=="function")return e.selectStrategy(e.mandatory);switch(e.selectStrategy){case"single-leaf":return pW(e.mandatory);case"leaf":return hW(e.mandatory);case"independent":return K_(e.mandatory);case"single-independent":return XA(e.mandatory);case"trunk":return mW(e.mandatory);case"classic":default:return QA(e.mandatory)}}),a=A(()=>{if(typeof e.openStrategy=="object")return e.openStrategy;switch(e.openStrategy){case"list":return fW;case"single":return dW;case"multiple":default:return YA}}),l=it(e,"activated",e.activated,g=>i.value.in(g,n.value,r.value),g=>i.value.out(g,n.value,r.value)),u=it(e,"selected",e.selected,g=>o.value.in(g,n.value,r.value),g=>o.value.out(g,n.value,r.value));Cn(()=>{t=!0});function c(g){const m=[];let y=g;for(;y!=null;)m.unshift(y),y=r.value.get(y);return m}const d=an("nested"),f=new Set,p={id:Ie(),root:{opened:s,activatable:ae(()=>e.activatable),selectable:ae(()=>e.selectable),activated:l,selected:u,selectedValues:A(()=>{const g=[];for(const[m,y]of u.value.entries())y==="on"&&g.push(m);return g}),register:(g,m,y)=>{if(f.has(g)){c(g).map(String).join(" -> "),c(m).concat(g).map(String).join(" -> ");return}else f.add(g);m&&g!==m&&r.value.set(g,m),y&&n.value.set(g,[]),m!=null&&n.value.set(m,[...n.value.get(m)||[],g])},unregister:g=>{if(t)return;f.delete(g),n.value.delete(g);const m=r.value.get(g);if(m){const y=n.value.get(m)??[];n.value.set(m,y.filter(_=>_!==g))}r.value.delete(g)},open:(g,m,y)=>{d.emit("click:open",{id:g,value:m,path:c(g),event:y});const _=a.value.open({id:g,value:m,opened:new Set(s.value),children:n.value,parents:r.value,event:y});_&&(s.value=_)},openOnSelect:(g,m,y)=>{const _=a.value.select({id:g,value:m,selected:new Map(u.value),opened:new Set(s.value),children:n.value,parents:r.value,event:y});_&&(s.value=_)},select:(g,m,y)=>{d.emit("click:select",{id:g,value:m,path:c(g),event:y});const _=o.value.select({id:g,value:m,selected:new Map(u.value),children:n.value,parents:r.value,event:y});_&&(u.value=_),p.root.openOnSelect(g,m,y)},activate:(g,m,y)=>{if(!e.activatable)return p.root.select(g,!0,y);d.emit("click:activate",{id:g,value:m,path:c(g),event:y});const _=i.value.activate({id:g,value:m,activated:new Set(l.value),children:n.value,parents:r.value,event:y});if(_.size!==l.value.size)l.value=_;else{for(const b of _)if(!l.value.has(b)){l.value=_;return}for(const b of l.value)if(!_.has(b)){l.value=_;return}}},children:n,parents:r,getPath:c}};return Kt(od,p),p.root},ZA=(e,t)=>{const n=Qe(od,JA),r=Symbol("nested item"),s=A(()=>Bn(e)??r),i={...n,id:s,open:(o,a)=>n.root.open(s.value,o,a),openOnSelect:(o,a)=>n.root.openOnSelect(s.value,o,a),isOpen:A(()=>n.root.opened.value.has(s.value)),parent:A(()=>n.root.parents.value.get(s.value)),activate:(o,a)=>n.root.activate(s.value,o,a),isActivated:A(()=>n.root.activated.value.has(Be(s.value))),select:(o,a)=>n.root.select(s.value,o,a),isSelected:A(()=>n.root.selected.value.get(Be(s.value))==="on"),isIndeterminate:A(()=>n.root.selected.value.get(Be(s.value))==="indeterminate"),isLeaf:A(()=>!n.root.children.value.get(s.value)),isGroupActivator:n.isGroupActivator};return wu(()=>{!n.isGroupActivator&&n.root.register(s.value,n.id.value,t)}),Cn(()=>{!n.isGroupActivator&&n.root.unregister(s.value)}),t&&Kt(od,i),i},yW=()=>{const e=Qe(od,JA);Kt(od,{...e,isGroupActivator:!0})};function jd(){const e=Ie(!1);return bt(()=>{window.requestAnimationFrame(()=>{e.value=!0})}),{ssrBootStyles:ae(()=>e.value?void 0:{transition:"none !important"}),isBooted:Ho(e)}}const bW=Su({name:"VListGroupActivator",setup(e,t){let{slots:n}=t;return yW(),()=>{var r;return(r=n.default)==null?void 0:r.call(n)}}}),_W=de({activeColor:String,baseColor:String,color:String,collapseIcon:{type:He,default:"$collapse"},expandIcon:{type:He,default:"$expand"},prependIcon:He,appendIcon:He,fluid:Boolean,subgroup:Boolean,title:String,value:null,...Ue(),..._t()},"VListGroup"),Dy=ke()({name:"VListGroup",props:_W(),setup(e,t){let{slots:n}=t;const{isOpen:r,open:s,id:i}=ZA(()=>e.value,!0),o=A(()=>`v-list-group--id-${String(i.value)}`),a=GA(),{isBooted:l}=jd();function u(p){var g;p.stopPropagation(),!["INPUT","TEXTAREA"].includes((g=p.target)==null?void 0:g.tagName)&&s(!r.value,p)}const c=A(()=>({onClick:u,class:"v-list-group__header",id:o.value})),d=A(()=>r.value?e.collapseIcon:e.expandIcon),f=A(()=>({VListItem:{active:r.value,activeColor:e.activeColor,baseColor:e.baseColor,color:e.color,prependIcon:e.prependIcon||e.subgroup&&d.value,appendIcon:e.appendIcon||!e.subgroup&&d.value,title:e.title,value:e.value}}));return Oe(()=>h(e.tag,{class:["v-list-group",{"v-list-group--prepend":a==null?void 0:a.hasPrepend.value,"v-list-group--fluid":e.fluid,"v-list-group--subgroup":e.subgroup,"v-list-group--open":r.value},e.class],style:e.style},{default:()=>[n.activator&&h(Ot,{defaults:f.value},{default:()=>[h(bW,null,{default:()=>[n.activator({props:c.value,isOpen:r.value})]})]}),h(si,{transition:{component:bP},disabled:!l.value},{default:()=>{var p;return[Nt(h("div",{class:"v-list-group__items",role:"group","aria-labelledby":o.value},[(p=n.default)==null?void 0:p.call(n)]),[[Qi,r.value]])]}})]})),{isOpen:r}}}),wW=de({opacity:[Number,String],...Ue(),..._t()},"VListItemSubtitle"),vt=ke()({name:"VListItemSubtitle",props:wW(),setup(e,t){let{slots:n}=t;return Oe(()=>h(e.tag,{class:["v-list-item-subtitle",e.class],style:[{"--v-list-item-subtitle-opacity":e.opacity},e.style]},n)),{}}}),ct=ku("v-list-item-title"),SW=de({active:{type:Boolean,default:void 0},activeClass:String,activeColor:String,appendAvatar:String,appendIcon:He,baseColor:String,disabled:Boolean,lines:[Boolean,String],link:{type:Boolean,default:void 0},nav:Boolean,prependAvatar:String,prependIcon:He,ripple:{type:[Boolean,Object],default:!0},slim:Boolean,subtitle:{type:[String,Number,Boolean],default:void 0},title:{type:[String,Number,Boolean],default:void 0},value:null,onClick:Un(),onClickOnce:Un(),...vs(),...Ue(),...Ar(),...Or(),...bs(),...Dn(),...Qp(),..._t(),...Lt(),...$s({variant:"text"})},"VListItem"),Ve=ke()({name:"VListItem",directives:{Ripple:Pu},props:SW(),emits:{click:e=>!0},setup(e,t){let{attrs:n,slots:r,emit:s}=t;const i=Xp(e,n),o=A(()=>e.value===void 0?i.href.value:e.value),{activate:a,isActivated:l,select:u,isOpen:c,isSelected:d,isIndeterminate:f,isGroupActivator:p,root:g,parent:m,openOnSelect:y,id:_}=ZA(o,!1),b=GA(),x=A(()=>{var le;return e.active!==!1&&(e.active||((le=i.isActive)==null?void 0:le.value)||(g.activatable.value?l.value:d.value))}),C=ae(()=>e.link!==!1&&i.isLink.value),S=A(()=>!!b&&(g.selectable.value||g.activatable.value||e.value!=null)),T=A(()=>!e.disabled&&e.link!==!1&&(e.link||i.isClickable.value||S.value)),P=ae(()=>e.rounded||e.nav),w=ae(()=>e.color??e.activeColor),E=ae(()=>({color:x.value?w.value??e.baseColor:e.baseColor,variant:e.variant}));Ee(()=>{var le;return(le=i.isActive)==null?void 0:le.value},le=>{le&&I()}),wu(()=>{var le;(le=i.isActive)!=null&&le.value&&I()});function I(){m.value!=null&&g.open(m.value,!0),y(!0)}const{themeClasses:O}=Zt(e),{borderClasses:R}=Ds(e),{colorClasses:M,colorStyles:D,variantClasses:F}=Ja(E),{densityClasses:U}=ys(e),{dimensionStyles:K}=Mr(e),{elevationClasses:Q}=Ls(e),{roundedClasses:H}=jn(P),V=ae(()=>e.lines?`v-list-item--${e.lines}-line`:void 0),ee=A(()=>({isActive:x.value,select:u,isOpen:c.value,isSelected:d.value,isIndeterminate:f.value}));function q(le){var ie,we;s("click",le),!["INPUT","TEXTAREA"].includes((ie=le.target)==null?void 0:ie.tagName)&&T.value&&((we=i.navigate)==null||we.call(i,le),!p&&(g.activatable.value?a(!l.value,le):(g.selectable.value||e.value!=null)&&u(!d.value,le)))}function G(le){const ie=le.target;["INPUT","TEXTAREA"].includes(ie.tagName)||(le.key==="Enter"||le.key===" ")&&(le.preventDefault(),le.target.dispatchEvent(new MouseEvent("click",le)))}return Oe(()=>{const le=C.value?"a":e.tag,ie=r.title||e.title!=null,we=r.subtitle||e.subtitle!=null,Z=!!(e.appendAvatar||e.appendIcon),he=!!(Z||r.append),ne=!!(e.prependAvatar||e.prependIcon),z=!!(ne||r.prepend);return b==null||b.updateHasPrepend(z),e.activeColor&&Z$("active-color",["color","base-color"]),Nt(h(le,ge({class:["v-list-item",{"v-list-item--active":x.value,"v-list-item--disabled":e.disabled,"v-list-item--link":T.value,"v-list-item--nav":e.nav,"v-list-item--prepend":!z&&(b==null?void 0:b.hasPrepend.value),"v-list-item--slim":e.slim,[`${e.activeClass}`]:e.activeClass&&x.value},O.value,R.value,M.value,U.value,Q.value,V.value,H.value,F.value,e.class],style:[D.value,K.value,e.style],tabindex:T.value?b?-2:0:void 0,"aria-selected":S.value?g.activatable.value?l.value:g.selectable.value?d.value:x.value:void 0,onClick:q,onKeydown:T.value&&!C.value&&G},i.linkProps),{default:()=>{var xe;return[jo(T.value||x.value,"v-list-item"),z&&h("div",{key:"prepend",class:"v-list-item__prepend"},[r.prepend?h(Ot,{key:"prepend-defaults",disabled:!ne,defaults:{VAvatar:{density:e.density,image:e.prependAvatar},VIcon:{density:e.density,icon:e.prependIcon},VListItemAction:{start:!0}}},{default:()=>{var Fe;return[(Fe=r.prepend)==null?void 0:Fe.call(r,ee.value)]}}):h(Ae,null,[e.prependAvatar&&h(ut,{key:"prepend-avatar",density:e.density,image:e.prependAvatar},null),e.prependIcon&&h(J,{key:"prepend-icon",density:e.density,icon:e.prependIcon},null)]),h("div",{class:"v-list-item__spacer"},null)]),h("div",{class:"v-list-item__content","data-no-activator":""},[ie&&h(ct,{key:"title"},{default:()=>{var Fe;return[((Fe=r.title)==null?void 0:Fe.call(r,{title:e.title}))??se(e.title)]}}),we&&h(vt,{key:"subtitle"},{default:()=>{var Fe;return[((Fe=r.subtitle)==null?void 0:Fe.call(r,{subtitle:e.subtitle}))??se(e.subtitle)]}}),(xe=r.default)==null?void 0:xe.call(r,ee.value)]),he&&h("div",{key:"append",class:"v-list-item__append"},[r.append?h(Ot,{key:"append-defaults",disabled:!Z,defaults:{VAvatar:{density:e.density,image:e.appendAvatar},VIcon:{density:e.density,icon:e.appendIcon},VListItemAction:{end:!0}}},{default:()=>{var Fe;return[(Fe=r.append)==null?void 0:Fe.call(r,ee.value)]}}):h(Ae,null,[e.appendIcon&&h(J,{key:"append-icon",density:e.density,icon:e.appendIcon},null),e.appendAvatar&&h(ut,{key:"append-avatar",density:e.density,image:e.appendAvatar},null)]),h("div",{class:"v-list-item__spacer"},null)])]}}),[[hr("ripple"),T.value&&e.ripple]])}),{activate:a,isActivated:l,isGroupActivator:p,isSelected:d,list:b,select:u,root:g,id:_,link:i}}}),kW=de({color:String,inset:Boolean,sticky:Boolean,title:String,...Ue(),..._t()},"VListSubheader"),qr=ke()({name:"VListSubheader",props:kW(),setup(e,t){let{slots:n}=t;const{textColorClasses:r,textColorStyles:s}=As(()=>e.color);return Oe(()=>{const i=!!(n.default||e.title);return h(e.tag,{class:["v-list-subheader",{"v-list-subheader--inset":e.inset,"v-list-subheader--sticky":e.sticky},r.value,e.class],style:[{textColorStyles:s},e.style]},{default:()=>{var o;return[i&&h("div",{class:"v-list-subheader__text"},[((o=n.default)==null?void 0:o.call(n))??e.title])]}})}),{}}}),xW=de({color:String,inset:Boolean,length:[Number,String],opacity:[Number,String],thickness:[Number,String],vertical:Boolean,...Ue(),...Lt()},"VDivider"),dn=ke()({name:"VDivider",props:xW(),setup(e,t){let{attrs:n,slots:r}=t;const{themeClasses:s}=Zt(e),{textColorClasses:i,textColorStyles:o}=As(()=>e.color),a=A(()=>{const l={};return e.length&&(l[e.vertical?"height":"width"]=Ne(e.length)),e.thickness&&(l[e.vertical?"borderRightWidth":"borderTopWidth"]=Ne(e.thickness)),l});return Oe(()=>{const l=h("hr",{class:[{"v-divider":!0,"v-divider--inset":e.inset,"v-divider--vertical":e.vertical},s.value,i.value,e.class],style:[a.value,o.value,{"--v-border-opacity":e.opacity},e.style],"aria-orientation":!n.role||n.role==="separator"?e.vertical?"vertical":"horizontal":void 0,role:`${n.role||"separator"}`},null);return r.default?h("div",{class:["v-divider__wrapper",{"v-divider__wrapper--vertical":e.vertical,"v-divider__wrapper--inset":e.inset}]},[l,h("div",{class:"v-divider__content"},[r.default()]),l]):l}),{}}}),EW=de({items:Array,returnObject:Boolean},"VListChildren"),eO=ke()({name:"VListChildren",props:EW(),setup(e,t){let{slots:n}=t;return WA(),()=>{var r,s;return((r=n.default)==null?void 0:r.call(n))??((s=e.items)==null?void 0:s.map(i=>{var f,p;let{children:o,props:a,type:l,raw:u}=i;if(l==="divider")return((f=n.divider)==null?void 0:f.call(n,{props:a}))??h(dn,a,null);if(l==="subheader")return((p=n.subheader)==null?void 0:p.call(n,{props:a}))??h(qr,a,null);const c={subtitle:n.subtitle?g=>{var m;return(m=n.subtitle)==null?void 0:m.call(n,{...g,item:u})}:void 0,prepend:n.prepend?g=>{var m;return(m=n.prepend)==null?void 0:m.call(n,{...g,item:u})}:void 0,append:n.append?g=>{var m;return(m=n.append)==null?void 0:m.call(n,{...g,item:u})}:void 0,title:n.title?g=>{var m;return(m=n.title)==null?void 0:m.call(n,{...g,item:u})}:void 0},d=Dy.filterProps(a);return o?h(Dy,ge({value:a==null?void 0:a.value},d),{activator:g=>{let{props:m}=g;const y={...a,...m,value:e.returnObject?u:a.value};return n.header?n.header({props:y}):h(Ve,y,c)},default:()=>h(eO,{items:o,returnObject:e.returnObject},n)}):n.item?n.item({props:a}):h(Ve,ge(a,{value:e.returnObject?u:a.value}),c)}))}}}),tO=de({items:{type:Array,default:()=>[]},itemTitle:{type:[String,Array,Function],default:"title"},itemValue:{type:[String,Array,Function],default:"value"},itemChildren:{type:[Boolean,String,Array,Function],default:"children"},itemProps:{type:[Boolean,String,Array,Function],default:"props"},returnObject:Boolean,valueComparator:Function},"list-items");function Ly(e,t){const n=Vn(t,e.itemTitle,t),r=Vn(t,e.itemValue,n),s=Vn(t,e.itemChildren),i=e.itemProps===!0?typeof t=="object"&&t!=null&&!Array.isArray(t)?"children"in t?Ms(t,["children"]):t:void 0:Vn(t,e.itemProps),o={title:n,value:r,...i};return{title:String(o.title??""),value:o.value,props:o,children:Array.isArray(s)?nO(e,s):void 0,raw:t}}function nO(e,t){const n=xd(e,["itemTitle","itemValue","itemChildren","itemProps","returnObject","valueComparator"]),r=[];for(const s of t)r.push(Ly(n,s));return r}function CW(e){const t=A(()=>nO(e,e.items)),n=A(()=>t.value.some(a=>a.value===null)),r=Ie(new Map),s=Ie([]);On(()=>{const a=t.value,l=new Map,u=[];for(let c=0;c<a.length;c++){const d=a[c];if(VT(d.value)||d.value===null){let f=l.get(d.value);f||(f=[],l.set(d.value,f)),f.push(d)}else u.push(d)}r.value=l,s.value=u});function i(a){const l=r.value,u=t.value,c=s.value,d=n.value,f=e.returnObject,p=!!e.valueComparator,g=e.valueComparator||as,m=xd(e,["itemTitle","itemValue","itemChildren","itemProps","returnObject","valueComparator"]),y=[];e:for(const _ of a){if(!d&&_===null)continue;if(f&&typeof _=="string"){y.push(Ly(m,_));continue}const b=l.get(_);if(p||!b){for(const x of p?u:c)if(g(_,x.value)){y.push(x);continue e}y.push(Ly(m,_));continue}y.push(...b)}return y}function o(a){return e.returnObject?a.map(l=>{let{raw:u}=l;return u}):a.map(l=>{let{value:u}=l;return u})}return{items:t,transformIn:i,transformOut:o}}function TW(e,t){const n=Vn(t,e.itemType,"item"),r=VT(t)?t:Vn(t,e.itemTitle),s=Vn(t,e.itemValue,void 0),i=Vn(t,e.itemChildren),o=e.itemProps===!0?Ms(t,["children"]):Vn(t,e.itemProps),a={title:r,value:s,...o};return{type:n,title:a.title,value:a.value,props:a,children:n==="item"&&i?rO(e,i):void 0,raw:t}}function rO(e,t){const n=[];for(const r of t)n.push(TW(e,r));return n}function PW(e){return{items:A(()=>rO(e,e.items))}}const RW=de({baseColor:String,activeColor:String,activeClass:String,bgColor:String,disabled:Boolean,expandIcon:He,collapseIcon:He,lines:{type:[Boolean,String],default:"one"},slim:Boolean,nav:Boolean,"onClick:open":Un(),"onClick:select":Un(),"onUpdate:opened":Un(),...gW({selectStrategy:"single-leaf",openStrategy:"list"}),...vs(),...Ue(),...Ar(),...Or(),...bs(),itemType:{type:String,default:"type"},...tO(),...Dn(),..._t(),...Lt(),...$s({variant:"text"})},"VList"),Bt=ke()({name:"VList",props:RW(),emits:{"update:selected":e=>!0,"update:activated":e=>!0,"update:opened":e=>!0,"click:open":e=>!0,"click:activate":e=>!0,"click:select":e=>!0},setup(e,t){let{slots:n}=t;const{items:r}=PW(e),{themeClasses:s}=Zt(e),{backgroundColorClasses:i,backgroundColorStyles:o}=fr(()=>e.bgColor),{borderClasses:a}=Ds(e),{densityClasses:l}=ys(e),{dimensionStyles:u}=Mr(e),{elevationClasses:c}=Ls(e),{roundedClasses:d}=jn(e),{children:f,open:p,parents:g,select:m,getPath:y}=vW(e),_=ae(()=>e.lines?`v-list--${e.lines}-line`:void 0),b=ae(()=>e.activeColor),x=ae(()=>e.baseColor),C=ae(()=>e.color);WA(),Ir({VListGroup:{activeColor:b,baseColor:x,color:C,expandIcon:ae(()=>e.expandIcon),collapseIcon:ae(()=>e.collapseIcon)},VListItem:{activeClass:ae(()=>e.activeClass),activeColor:b,baseColor:x,color:C,density:ae(()=>e.density),disabled:ae(()=>e.disabled),lines:ae(()=>e.lines),nav:ae(()=>e.nav),slim:ae(()=>e.slim),variant:ae(()=>e.variant)}});const S=Ie(!1),T=j();function P(M){S.value=!0}function w(M){S.value=!1}function E(M){var D;!S.value&&!(M.relatedTarget&&((D=T.value)!=null&&D.contains(M.relatedTarget)))&&R()}function I(M){const D=M.target;if(!(!T.value||["INPUT","TEXTAREA"].includes(D.tagName))){if(M.key==="ArrowDown")R("next");else if(M.key==="ArrowUp")R("prev");else if(M.key==="Home")R("first");else if(M.key==="End")R("last");else return;M.preventDefault()}}function O(M){S.value=!0}function R(M){if(T.value)return Ec(T.value,M)}return Oe(()=>h(e.tag,{ref:T,class:["v-list",{"v-list--disabled":e.disabled,"v-list--nav":e.nav,"v-list--slim":e.slim},s.value,i.value,a.value,l.value,c.value,_.value,d.value,e.class],style:[o.value,u.value,e.style],tabindex:e.disabled?-1:0,role:"listbox","aria-activedescendant":void 0,onFocusin:P,onFocusout:w,onFocus:E,onKeydown:I,onMousedown:O},{default:()=>[h(eO,{items:r.value,returnObject:e.returnObject},n)]})),{open:p,select:m,focus:R,children:f,parents:g,getPath:y}}}),IW=de({start:Boolean,end:Boolean,...Ue(),..._t()},"VListItemAction"),pu=ke()({name:"VListItemAction",props:IW(),setup(e,t){let{slots:n}=t;return Oe(()=>h(e.tag,{class:["v-list-item-action",{"v-list-item-action--start":e.start,"v-list-item-action--end":e.end},e.class],style:e.style},n)),{}}}),AW=de({start:Boolean,end:Boolean,...Ue(),..._t()},"VListItemMedia"),OW=ke()({name:"VListItemMedia",props:AW(),setup(e,t){let{slots:n}=t;return Oe(()=>h(e.tag,{class:["v-list-item-media",{"v-list-item-media--start":e.start,"v-list-item-media--end":e.end},e.class],style:e.style},n)),{}}}),MW={key:1},DW={key:2},LW={class:"mt-3"},$W={key:0},FW={key:1},NW={key:2},VW=Le({__name:"BatchReprintDialog",setup(e){const t=Wt(),n=j(),r=tn(nn.BatchReprintDialog),s=j(!1),i=j(!1),o=j([]),a=j([]),l=j(""),u=Dt();function c(g){s.value=!0}async function d(g){n.value=g;try{const m=await Ol.batchGetLastPrintedFiles(n.value);o.value=m,a.value=m.filter(y=>y.connectionState==="Operational"&&y.reprintState==aa.LastPrintReady)}catch(m){l.value=m.code.toString()??""}s.value=!1}async function f(){i.value=!0;try{await Ol.batchReprintFiles(a.value.filter(g=>{var m;return(m=g.file)==null?void 0:m.path}).map(g=>{var m;return{printerId:g.printerId,path:((m=g.file)==null?void 0:m.path)||""}})),t.clearSelectedPrinters(),u.info("Action completed","Your reprinted jobs are starting",5e3),p()}catch(g){l.value=iW(g)}finally{i.value=!1}}function p(){r.closeDialog(r.context())}return(g,m)=>{const y=hi;return $(),te(y,{id:X(r).dialogId,"max-width":"1000px",onBeforeOpened:c,onEscape:m[3]||(m[3]=_=>p()),onOpened:d},{default:v(()=>[h(yt,{class:"pa-4"},{default:v(()=>[h(sn,null,{default:v(()=>m[4]||(m[4]=[L("span",{class:"text-h5"}," Batch - Submit Reprint Jobs ",-1)])),_:1,__:[4]}),h(en,null,{default:v(()=>{var _;return[(_=l.value)!=null&&_.length?($(),te(fn,{key:0,color:"error"},{default:v(()=>[k(se(l.value),1)]),_:1})):pe("",!0),s.value?($(),ve("span",MW," Loading... ")):($(),ve("div",DW,[h(Bt,{density:"compact"},{default:v(()=>[h(qr,null,{default:v(()=>m[5]||(m[5]=[k(" Reprinted Files - Select from list ")])),_:1,__:[5]}),h(Dy,{modelValue:a.value,"onUpdate:modelValue":m[0]||(m[0]=b=>a.value=b),multiple:""},{default:v(()=>[($(!0),ve(Ae,null,Gt(o.value,(b,x)=>($(),te(Ve,{key:x,value:b,disabled:b.connectionState!=="Operational"||b.reprintState!==X(aa).LastPrintReady},{prepend:v(()=>[b.reprintState==X(aa).LastPrintReady?($(),te(J,{key:0},{default:v(()=>m[6]||(m[6]=[k("checklist")])),_:1,__:[6]})):pe("",!0),b.reprintState==X(aa).NoLastPrint?($(),te(J,{key:1},{default:v(()=>m[7]||(m[7]=[k(" question_mark ")])),_:1,__:[7]})):pe("",!0),b.reprintState==X(aa).PrinterNotAvailable?($(),te(J,{key:2},{default:v(()=>m[8]||(m[8]=[k(" signal_disconnected ")])),_:1,__:[8]})):pe("",!0)]),default:v(()=>{var C,S;return[(S=(C=b.file)==null?void 0:C.path)!=null&&S.length?($(),te(ct,{key:0},{default:v(()=>{var T;return[k(se((T=b.file)==null?void 0:T.path)+" ",1),b.connectionState!=="Operational"?($(),te(Sn,{key:0},{default:v(()=>m[9]||(m[9]=[k(" Printer busy ")])),_:1,__:[9]})):pe("",!0)]}),_:2},1024)):b.reprintState==X(aa).NoLastPrint?($(),te(ct,{key:1},{default:v(()=>m[10]||(m[10]=[k(" No file is present to print again ")])),_:1,__:[10]})):($(),te(ct,{key:2},{default:v(()=>m[11]||(m[11]=[k(" OctoPrint cant be reached ")])),_:1,__:[11]})),h(vt,null,{default:v(()=>{var T;return[k(" Printer '"+se(((T=X(t).printer(b.printerId))==null?void 0:T.name)??"Unknown printer")+"' ",1)]}),_:2},1024)]}),_:2},1032,["value","disabled"]))),128))]),_:1},8,["modelValue"])]),_:1})])),L("div",LW,[i.value?($(),ve("div",$W,[h(ni,{class:"ma-3",indeterminate:"",color:"blue"}),m[12]||(m[12]=k(" Submitting "))])):a.value.length>0?($(),ve("div",FW,se(a.value.length)+" reprint selected ",1)):($(),ve("div",NW,"Must select at least one file"))]),m[14]||(m[14]=L("br",null,null,-1)),h(re,{disabled:i.value||a.value.length===0,onClick:m[1]||(m[1]=b=>f())},{default:v(()=>m[13]||(m[13]=[k(" Submit Batch Reprint ")])),_:1,__:[13]},8,["disabled"])]}),_:1,__:[14]}),h(Mn,null,{default:v(()=>[h(wn),h(re,{variant:"text",onClick:m[2]||(m[2]=_=>X(r).closeDialog())},{default:v(()=>m[15]||(m[15]=[k(" Close ")])),_:1,__:[15]})]),_:1})]),_:1})]),_:1},8,["id"])}}});function sO(e,t=2){if(e===0)return"0 Bytes";const n=1024,r=t<0?0:t,s=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],i=Math.floor(Math.log(e)/Math.log(n));return parseFloat((e/Math.pow(n,i)).toFixed(r))+" "+s[i]}const $y="/assets/octoprint-tentacle-D_4slObB.svg",ah=0,Fy=1,lh=2;function iO(e){return e===ah}function lp(e){return e===Fy}function up(e){return e===lh}function Oc(e){return iO(e)?"OctoPrint":lp(e)?"Moonraker":up(e)?"PrusaLink":"Unknown"}function BW(e){let{rootEl:t,isSticky:n,layoutItemStyles:r}=e;const s=Ie(!1),i=Ie(0),o=A(()=>{const u=typeof s.value=="boolean"?"top":s.value;return[n.value?{top:"auto",bottom:"auto",height:void 0}:void 0,s.value?{[u]:Ne(i.value)}:{top:r.value.top}]});bt(()=>{Ee(n,u=>{u?window.addEventListener("scroll",l,{passive:!0}):window.removeEventListener("scroll",l)},{immediate:!0})}),Cn(()=>{window.removeEventListener("scroll",l)});let a=0;function l(){const u=a>window.scrollY?"up":"down",c=t.value.getBoundingClientRect(),d=parseFloat(r.value.top??0),f=window.scrollY-Math.max(0,i.value-d),p=c.height+Math.max(i.value,d)-window.scrollY-window.innerHeight,g=parseFloat(getComputedStyle(t.value).getPropertyValue("--v-body-scroll-y"))||0;c.height<window.innerHeight-d?(s.value="top",i.value=d):u==="up"&&s.value==="bottom"||u==="down"&&s.value==="top"?(i.value=window.scrollY+c.top-g,s.value=!0):u==="down"&&p<=0?(i.value=0,s.value="bottom"):u==="up"&&f<=0&&(g?s.value!=="top"&&(i.value=-f+g+d,s.value="top"):(i.value=c.top+f,s.value="top")),a=window.scrollY}return{isStuck:s,stickyStyles:o}}const UW=100,zW=20;function bk(e){return(e<0?-1:1)*Math.sqrt(Math.abs(e))*1.41421356237}function _k(e){if(e.length<2)return 0;if(e.length===2)return e[1].t===e[0].t?0:(e[1].d-e[0].d)/(e[1].t-e[0].t);let t=0;for(let n=e.length-1;n>0;n--){if(e[n].t===e[n-1].t)continue;const r=bk(t),s=(e[n].d-e[n-1].d)/(e[n].t-e[n-1].t);t+=(s-r)*Math.abs(s),n===e.length-1&&(t*=.5)}return bk(t)*1e3}function HW(){const e={};function t(s){Array.from(s.changedTouches).forEach(i=>{(e[i.identifier]??(e[i.identifier]=new LT(zW))).push([s.timeStamp,i])})}function n(s){Array.from(s.changedTouches).forEach(i=>{delete e[i.identifier]})}function r(s){var u;const i=(u=e[s])==null?void 0:u.values().reverse();if(!i)throw new Error(`No samples for touch id ${s}`);const o=i[0],a=[],l=[];for(const c of i){if(o[0]-c[0]>UW)break;a.push({t:c[0],d:c[1].clientX}),l.push({t:c[0],d:c[1].clientY})}return{x:_k(a),y:_k(l),get direction(){const{x:c,y:d}=this,[f,p]=[Math.abs(c),Math.abs(d)];return f>p&&c>=0?"right":f>p&&c<=0?"left":p>f&&d>=0?"down":p>f&&d<=0?"up":jW()}}}return{addMovement:t,endTouch:n,getVelocity:r}}function jW(){throw new Error}function qW(e){let{el:t,isActive:n,isTemporary:r,width:s,touchless:i,position:o}=e;bt(()=>{window.addEventListener("touchstart",b,{passive:!0}),window.addEventListener("touchmove",x,{passive:!1}),window.addEventListener("touchend",C,{passive:!0})}),Cn(()=>{window.removeEventListener("touchstart",b),window.removeEventListener("touchmove",x),window.removeEventListener("touchend",C)});const a=A(()=>["left","right"].includes(o.value)),{addMovement:l,endTouch:u,getVelocity:c}=HW();let d=!1;const f=Ie(!1),p=Ie(0),g=Ie(0);let m;function y(T,P){return(o.value==="left"?T:o.value==="right"?document.documentElement.clientWidth-T:o.value==="top"?T:o.value==="bottom"?document.documentElement.clientHeight-T:hl())-(P?s.value:0)}function _(T){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const w=o.value==="left"?(T-g.value)/s.value:o.value==="right"?(document.documentElement.clientWidth-T-g.value)/s.value:o.value==="top"?(T-g.value)/s.value:o.value==="bottom"?(document.documentElement.clientHeight-T-g.value)/s.value:hl();return P?Math.max(0,Math.min(1,w)):w}function b(T){if(i.value)return;const P=T.changedTouches[0].clientX,w=T.changedTouches[0].clientY,E=25,I=o.value==="left"?P<E:o.value==="right"?P>document.documentElement.clientWidth-E:o.value==="top"?w<E:o.value==="bottom"?w>document.documentElement.clientHeight-E:hl(),O=n.value&&(o.value==="left"?P<s.value:o.value==="right"?P>document.documentElement.clientWidth-s.value:o.value==="top"?w<s.value:o.value==="bottom"?w>document.documentElement.clientHeight-s.value:hl());(I||O||n.value&&r.value)&&(m=[P,w],g.value=y(a.value?P:w,n.value),p.value=_(a.value?P:w),d=g.value>-20&&g.value<80,u(T),l(T))}function x(T){const P=T.changedTouches[0].clientX,w=T.changedTouches[0].clientY;if(d){if(!T.cancelable){d=!1;return}const I=Math.abs(P-m[0]),O=Math.abs(w-m[1]);(a.value?I>O&&I>3:O>I&&O>3)?(f.value=!0,d=!1):(a.value?O:I)>3&&(d=!1)}if(!f.value)return;T.preventDefault(),l(T);const E=_(a.value?P:w,!1);p.value=Math.max(0,Math.min(1,E)),E>1?g.value=y(a.value?P:w,!0):E<0&&(g.value=y(a.value?P:w,!1))}function C(T){if(d=!1,!f.value)return;l(T),f.value=!1;const P=c(T.changedTouches[0].identifier),w=Math.abs(P.x),E=Math.abs(P.y);(a.value?w>E&&w>400:E>w&&E>3)?n.value=P.direction===({left:"right",right:"left",top:"down",bottom:"up"}[o.value]||hl()):n.value=p.value>.5}const S=A(()=>f.value?{transform:o.value==="left"?`translateX(calc(-100% + ${p.value*s.value}px))`:o.value==="right"?`translateX(calc(100% - ${p.value*s.value}px))`:o.value==="top"?`translateY(calc(-100% + ${p.value*s.value}px))`:o.value==="bottom"?`translateY(calc(100% - ${p.value*s.value}px))`:hl(),transition:"none"}:void 0);return Hr(f,()=>{var w,E;const T=((w=t.value)==null?void 0:w.style.transform)??null,P=((E=t.value)==null?void 0:E.style.transition)??null;On(()=>{var I,O,R,M;(O=t.value)==null||O.style.setProperty("transform",((I=S.value)==null?void 0:I.transform)||"none"),(M=t.value)==null||M.style.setProperty("transition",((R=S.value)==null?void 0:R.transition)||null)}),yn(()=>{var I,O;(I=t.value)==null||I.style.setProperty("transform",T),(O=t.value)==null||O.style.setProperty("transition",P)})}),{isDragging:f,dragProgress:p,dragStyles:S}}function hl(){throw new Error}function qd(e){const t=e.slice(-2).toUpperCase();switch(!0){case e==="GB-alt-variant":return{firstDay:0,firstWeekSize:4};case e==="001":return{firstDay:1,firstWeekSize:1};case`AG AS BD BR BS BT BW BZ CA CO DM DO ET GT GU HK HN ID IL IN JM JP KE
|
|
63
|
+
KH KR LA MH MM MO MT MX MZ NI NP PA PE PH PK PR PY SA SG SV TH TT TW UM US
|
|
64
|
+
VE VI WS YE ZA ZW`.includes(t):return{firstDay:0,firstWeekSize:1};case`AI AL AM AR AU AZ BA BM BN BY CL CM CN CR CY EC GE HR KG KZ LB LK LV
|
|
65
|
+
MD ME MK MN MY NZ RO RS SI TJ TM TR UA UY UZ VN XK`.includes(t):return{firstDay:1,firstWeekSize:1};case`AD AN AT AX BE BG CH CZ DE DK EE ES FI FJ FO FR GB GF GP GR HU IE IS
|
|
66
|
+
IT LI LT LU MC MQ NL NO PL RE RU SE SK SM VA`.includes(t):return{firstDay:1,firstWeekSize:4};case"AE AF BH DJ DZ EG IQ IR JO KW LY OM QA SD SY".includes(t):return{firstDay:6,firstWeekSize:1};case t==="MV":return{firstDay:5,firstWeekSize:1};case t==="PT":return{firstDay:0,firstWeekSize:4};default:return null}}function WW(e,t,n){var c;const r=[];let s=[];const i=oO(e),o=aO(e),a=n??((c=qd(t))==null?void 0:c.firstDay)??0,l=(i.getDay()-a+7)%7,u=(o.getDay()-a+7)%7;for(let d=0;d<l;d++){const f=new Date(i);f.setDate(f.getDate()-(l-d)),s.push(f)}for(let d=1;d<=o.getDate();d++){const f=new Date(e.getFullYear(),e.getMonth(),d);s.push(f),s.length===7&&(r.push(s),s=[])}for(let d=1;d<7-u;d++){const f=new Date(o);f.setDate(f.getDate()+d),s.push(f)}return s.length>0&&r.push(s),r}function Ny(e,t,n){var i;const r=n??((i=qd(t))==null?void 0:i.firstDay)??0,s=new Date(e);for(;s.getDay()!==r;)s.setDate(s.getDate()-1);return s}function GW(e,t){var s;const n=new Date(e),r=((((s=qd(t))==null?void 0:s.firstDay)??0)+6)%7;for(;n.getDay()!==r;)n.setDate(n.getDate()+1);return n}function oO(e){return new Date(e.getFullYear(),e.getMonth(),1)}function aO(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function KW(e){const t=e.split("-").map(Number);return new Date(t[0],t[1]-1,t[2])}const YW=/^([12]\d{3}-([1-9]|0[1-9]|1[0-2])-([1-9]|0[1-9]|[12]\d|3[01]))$/;function lO(e){if(e==null)return new Date;if(e instanceof Date)return e;if(typeof e=="string"){let t;if(YW.test(e))return KW(e);if(t=Date.parse(e),!isNaN(t))return new Date(t)}return null}const wk=new Date(2e3,0,2);function XW(e,t){var r;const n=t??((r=qd(e))==null?void 0:r.firstDay)??0;return xl(7).map(s=>{const i=new Date(wk);return i.setDate(wk.getDate()+n+s),new Intl.DateTimeFormat(e,{weekday:"narrow"}).format(i)})}function QW(e,t,n,r){const s=lO(e)??new Date,i=r==null?void 0:r[t];if(typeof i=="function")return i(s,t,n);let o={};switch(t){case"fullDate":o={year:"numeric",month:"long",day:"numeric"};break;case"fullDateWithWeekday":o={weekday:"long",year:"numeric",month:"long",day:"numeric"};break;case"normalDate":const a=s.getDate(),l=new Intl.DateTimeFormat(n,{month:"long"}).format(s);return`${a} ${l}`;case"normalDateWithWeekday":o={weekday:"short",day:"numeric",month:"short"};break;case"shortDate":o={month:"short",day:"numeric"};break;case"year":o={year:"numeric"};break;case"month":o={month:"long"};break;case"monthShort":o={month:"short"};break;case"monthAndYear":o={month:"long",year:"numeric"};break;case"monthAndDate":o={month:"long",day:"numeric"};break;case"weekday":o={weekday:"long"};break;case"weekdayShort":o={weekday:"short"};break;case"dayOfMonth":return new Intl.NumberFormat(n).format(s.getDate());case"hours12h":o={hour:"numeric",hour12:!0};break;case"hours24h":o={hour:"numeric",hour12:!1};break;case"minutes":o={minute:"numeric"};break;case"seconds":o={second:"numeric"};break;case"fullTime":o={hour:"numeric",minute:"numeric"};break;case"fullTime12h":o={hour:"numeric",minute:"numeric",hour12:!0};break;case"fullTime24h":o={hour:"numeric",minute:"numeric",hour12:!1};break;case"fullDateTime":o={year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric"};break;case"fullDateTime12h":o={year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",hour12:!0};break;case"fullDateTime24h":o={year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",hour12:!1};break;case"keyboardDate":o={year:"numeric",month:"2-digit",day:"2-digit"};break;case"keyboardDateTime":return o={year:"numeric",month:"2-digit",day:"2-digit",hour:"numeric",minute:"numeric"},new Intl.DateTimeFormat(n,o).format(s).replace(/, /g," ");case"keyboardDateTime12h":return o={year:"numeric",month:"2-digit",day:"2-digit",hour:"numeric",minute:"numeric",hour12:!0},new Intl.DateTimeFormat(n,o).format(s).replace(/, /g," ");case"keyboardDateTime24h":return o={year:"numeric",month:"2-digit",day:"2-digit",hour:"numeric",minute:"numeric",hour12:!1},new Intl.DateTimeFormat(n,o).format(s).replace(/, /g," ");default:o=i??{timeZone:"UTC",timeZoneName:"short"}}return new Intl.DateTimeFormat(n,o).format(s)}function JW(e,t){const n=e.toJsDate(t),r=n.getFullYear(),s=B1(String(n.getMonth()+1),2,"0"),i=B1(String(n.getDate()),2,"0");return`${r}-${s}-${i}`}function ZW(e){const[t,n,r]=e.split("-").map(Number);return new Date(t,n-1,r)}function e7(e,t){const n=new Date(e);return n.setMinutes(n.getMinutes()+t),n}function t7(e,t){const n=new Date(e);return n.setHours(n.getHours()+t),n}function uh(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),n}function n7(e,t){const n=new Date(e);return n.setDate(n.getDate()+t*7),n}function r7(e,t){const n=new Date(e);return n.setDate(1),n.setMonth(n.getMonth()+t),n}function Vy(e){return e.getFullYear()}function s7(e){return e.getMonth()}function i7(e,t,n,r){const s=qd(t),i=n??(s==null?void 0:s.firstDay)??0,o=r??(s==null?void 0:s.firstWeekSize)??1;function a(p){const g=new Date(p,0,1);return 7-By(g,Ny(g,t,i),"days")}let l=Vy(e);const u=uh(Ny(e,t,i),6);l<Vy(u)&&a(l+1)>=o&&l++;const c=new Date(l,0,1),d=a(l),f=d>=o?uh(c,d-7):uh(c,d);return 1+By(e,f,"weeks")}function o7(e){return e.getDate()}function a7(e){return new Date(e.getFullYear(),e.getMonth()+1,1)}function l7(e){return new Date(e.getFullYear(),e.getMonth()-1,1)}function u7(e){return e.getHours()}function c7(e){return e.getMinutes()}function d7(e){return new Date(e.getFullYear(),0,1)}function f7(e){return new Date(e.getFullYear(),11,31)}function h7(e,t){return cp(e,t[0])&&g7(e,t[1])}function p7(e){const t=new Date(e);return t instanceof Date&&!isNaN(t.getTime())}function cp(e,t){return e.getTime()>t.getTime()}function m7(e,t){return cp(Uy(e),Uy(t))}function g7(e,t){return e.getTime()<t.getTime()}function Sk(e,t){return e.getTime()===t.getTime()}function v7(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function y7(e,t){return e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function b7(e,t){return e.getFullYear()===t.getFullYear()}function By(e,t,n){const r=new Date(e),s=new Date(t);switch(n){case"years":return r.getFullYear()-s.getFullYear();case"quarters":return Math.floor((r.getMonth()-s.getMonth()+(r.getFullYear()-s.getFullYear())*12)/4);case"months":return r.getMonth()-s.getMonth()+(r.getFullYear()-s.getFullYear())*12;case"weeks":return Math.floor((r.getTime()-s.getTime())/(1e3*60*60*24*7));case"days":return Math.floor((r.getTime()-s.getTime())/(1e3*60*60*24));case"hours":return Math.floor((r.getTime()-s.getTime())/(1e3*60*60));case"minutes":return Math.floor((r.getTime()-s.getTime())/(1e3*60));case"seconds":return Math.floor((r.getTime()-s.getTime())/1e3);default:return r.getTime()-s.getTime()}}function _7(e,t){const n=new Date(e);return n.setHours(t),n}function w7(e,t){const n=new Date(e);return n.setMinutes(t),n}function S7(e,t){const n=new Date(e);return n.setMonth(t),n}function k7(e,t){const n=new Date(e);return n.setDate(t),n}function x7(e,t){const n=new Date(e);return n.setFullYear(t),n}function Uy(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0)}function E7(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59,999)}class C7{constructor(t){this.locale=t.locale,this.formats=t.formats}date(t){return lO(t)}toJsDate(t){return t}toISO(t){return JW(this,t)}parseISO(t){return ZW(t)}addMinutes(t,n){return e7(t,n)}addHours(t,n){return t7(t,n)}addDays(t,n){return uh(t,n)}addWeeks(t,n){return n7(t,n)}addMonths(t,n){return r7(t,n)}getWeekArray(t,n){const r=n!==void 0?Number(n):void 0;return WW(t,this.locale,r)}startOfWeek(t,n){const r=n!==void 0?Number(n):void 0;return Ny(t,this.locale,r)}endOfWeek(t){return GW(t,this.locale)}startOfMonth(t){return oO(t)}endOfMonth(t){return aO(t)}format(t,n){return QW(t,n,this.locale,this.formats)}isEqual(t,n){return Sk(t,n)}isValid(t){return p7(t)}isWithinRange(t,n){return h7(t,n)}isAfter(t,n){return cp(t,n)}isAfterDay(t,n){return m7(t,n)}isBefore(t,n){return!cp(t,n)&&!Sk(t,n)}isSameDay(t,n){return v7(t,n)}isSameMonth(t,n){return y7(t,n)}isSameYear(t,n){return b7(t,n)}setMinutes(t,n){return w7(t,n)}setHours(t,n){return _7(t,n)}setMonth(t,n){return S7(t,n)}setDate(t,n){return k7(t,n)}setYear(t,n){return x7(t,n)}getDiff(t,n,r){return By(t,n,r)}getWeekdays(t){const n=t!==void 0?Number(t):void 0;return XW(this.locale,n)}getYear(t){return Vy(t)}getMonth(t){return s7(t)}getWeek(t,n,r){const s=n!==void 0?Number(n):void 0;return i7(t,this.locale,s,r)}getDate(t){return o7(t)}getNextMonth(t){return a7(t)}getPreviousMonth(t){return l7(t)}getHours(t){return u7(t)}getMinutes(t){return c7(t)}startOfDay(t){return Uy(t)}endOfDay(t){return E7(t)}startOfYear(t){return d7(t)}endOfYear(t){return f7(t)}}const T7=Symbol.for("vuetify:date-options"),kk=Symbol.for("vuetify:date-adapter");function P7(e,t){const n=er({adapter:C7,locale:{af:"af-ZA",bg:"bg-BG",ca:"ca-ES",ckb:"",cs:"cs-CZ",de:"de-DE",el:"el-GR",en:"en-US",et:"et-EE",fa:"fa-IR",fi:"fi-FI",hr:"hr-HR",hu:"hu-HU",he:"he-IL",id:"id-ID",it:"it-IT",ja:"ja-JP",ko:"ko-KR",lv:"lv-LV",lt:"lt-LT",nl:"nl-NL",no:"no-NO",pl:"pl-PL",pt:"pt-PT",ro:"ro-RO",ru:"ru-RU",sk:"sk-SK",sl:"sl-SI",srCyrl:"sr-SP",srLatn:"sr-SP",sv:"sv-SE",th:"th-TH",tr:"tr-TR",az:"az-AZ",uk:"uk-UA",vi:"vi-VN",zhHans:"zh-CN",zhHant:"zh-TW"}},e);return{options:n,instance:R7(n,t)}}function R7(e,t){const n=cn(typeof e.adapter=="function"?new e.adapter({locale:e.locale[t.current.value]??t.current.value,formats:e.formats}):e.adapter);return Ee(t.current,r=>{n.locale=e.locale[r]??r??n.locale}),n}const ad=Symbol.for("vuetify:layout"),uO=Symbol.for("vuetify:layout-item"),xk=1e3,cO=de({overlaps:{type:Array,default:()=>[]},fullHeight:Boolean},"layout"),dO=de({name:{type:String},order:{type:[Number,String],default:0},absolute:Boolean},"layout-item");function fO(){const e=Qe(ad);if(!e)throw new Error("[Vuetify] Could not find injected layout");return{getLayoutItem:e.getLayoutItem,mainRect:e.mainRect,mainStyles:e.mainStyles}}function hO(e){const t=Qe(ad);if(!t)throw new Error("[Vuetify] Could not find injected layout");const n=e.id??`layout-item-${ms()}`,r=an("useLayoutItem");Kt(uO,{id:n});const s=Ie(!1);$b(()=>s.value=!0),HC(()=>s.value=!1);const{layoutItemStyles:i,layoutItemScrimStyles:o}=t.register(r,{...e,active:A(()=>s.value?!1:e.active.value),id:n});return Cn(()=>t.unregister(n)),{layoutItemStyles:i,layoutRect:t.layoutRect,layoutItemScrimStyles:o}}const I7=(e,t,n,r)=>{let s={top:0,left:0,right:0,bottom:0};const i=[{id:"",layer:{...s}}];for(const o of e){const a=t.get(o),l=n.get(o),u=r.get(o);if(!a||!l||!u)continue;const c={...s,[a.value]:parseInt(s[a.value],10)+(u.value?parseInt(l.value,10):0)};i.push({id:o,layer:c}),s=c}return i};function pO(e){const t=Qe(ad,null),n=A(()=>t?t.rootZIndex.value-100:xk),r=j([]),s=cn(new Map),i=cn(new Map),o=cn(new Map),a=cn(new Map),l=cn(new Map),{resizeRef:u,contentRect:c}=Va(),d=A(()=>{const T=new Map,P=e.overlaps??[];for(const w of P.filter(E=>E.includes(":"))){const[E,I]=w.split(":");if(!r.value.includes(E)||!r.value.includes(I))continue;const O=s.get(E),R=s.get(I),M=i.get(E),D=i.get(I);!O||!R||!M||!D||(T.set(I,{position:O.value,amount:parseInt(M.value,10)}),T.set(E,{position:R.value,amount:-parseInt(D.value,10)}))}return T}),f=A(()=>{const T=[...new Set([...o.values()].map(w=>w.value))].sort((w,E)=>w-E),P=[];for(const w of T){const E=r.value.filter(I=>{var O;return((O=o.get(I))==null?void 0:O.value)===w});P.push(...E)}return I7(P,s,i,a)}),p=A(()=>!Array.from(l.values()).some(T=>T.value)),g=A(()=>f.value[f.value.length-1].layer),m=ae(()=>({"--v-layout-left":Ne(g.value.left),"--v-layout-right":Ne(g.value.right),"--v-layout-top":Ne(g.value.top),"--v-layout-bottom":Ne(g.value.bottom),...p.value?void 0:{transition:"none"}})),y=A(()=>f.value.slice(1).map((T,P)=>{let{id:w}=T;const{layer:E}=f.value[P],I=i.get(w),O=s.get(w);return{id:w,...E,size:Number(I.value),position:O.value}})),_=T=>y.value.find(P=>P.id===T),b=an("createLayout"),x=Ie(!1);bt(()=>{x.value=!0}),Kt(ad,{register:(T,P)=>{let{id:w,order:E,position:I,layoutSize:O,elementSize:R,active:M,disableTransitions:D,absolute:F}=P;o.set(w,E),s.set(w,I),i.set(w,O),a.set(w,M),D&&l.set(w,D);const K=El(uO,b==null?void 0:b.vnode).indexOf(T);K>-1?r.value.splice(K,0,w):r.value.push(w);const Q=A(()=>y.value.findIndex(q=>q.id===w)),H=A(()=>n.value+f.value.length*2-Q.value*2),V=A(()=>{const q=I.value==="left"||I.value==="right",G=I.value==="right",le=I.value==="bottom",ie=R.value??O.value,we=ie===0?"%":"px",Z={[I.value]:0,zIndex:H.value,transform:`translate${q?"X":"Y"}(${(M.value?0:-(ie===0?100:ie))*(G||le?-1:1)}${we})`,position:F.value||n.value!==xk?"absolute":"fixed",...p.value?void 0:{transition:"none"}};if(!x.value)return Z;const he=y.value[Q.value];if(!he)throw new Error(`[Vuetify] Could not find layout item "${w}"`);const ne=d.value.get(w);return ne&&(he[ne.position]+=ne.amount),{...Z,height:q?`calc(100% - ${he.top}px - ${he.bottom}px)`:R.value?`${R.value}px`:void 0,left:G?void 0:`${he.left}px`,right:G?`${he.right}px`:void 0,top:I.value!=="bottom"?`${he.top}px`:void 0,bottom:I.value!=="top"?`${he.bottom}px`:void 0,width:q?R.value?`${R.value}px`:void 0:`calc(100% - ${he.left}px - ${he.right}px)`}}),ee=A(()=>({zIndex:H.value-1}));return{layoutItemStyles:V,layoutItemScrimStyles:ee,zIndex:H}},unregister:T=>{o.delete(T),s.delete(T),i.delete(T),a.delete(T),l.delete(T),r.value=r.value.filter(P=>P!==T)},mainRect:g,mainStyles:m,getLayoutItem:_,items:y,layoutRect:c,rootZIndex:n});const C=ae(()=>["v-layout",{"v-layout--full-height":e.fullHeight}]),S=ae(()=>({zIndex:t?n.value:void 0,position:t?"relative":void 0,overflow:t?"hidden":void 0}));return{layoutClasses:C,layoutStyles:S,getLayoutItem:_,items:y,layoutRect:c,layoutRef:u}}const A7=["start","end","left","right","top","bottom"],O7=de({color:String,disableResizeWatcher:Boolean,disableRouteWatcher:Boolean,expandOnHover:Boolean,floating:Boolean,modelValue:{type:Boolean,default:null},permanent:Boolean,rail:{type:Boolean,default:null},railWidth:{type:[Number,String],default:56},scrim:{type:[Boolean,String],default:!0},image:String,temporary:Boolean,persistent:Boolean,touchless:Boolean,width:{type:[Number,String],default:256},location:{type:String,default:"start",validator:e=>A7.includes(e)},sticky:Boolean,...vs(),...Ue(),...r_(),...el({mobile:null}),...bs(),...dO(),...Dn(),..._t({tag:"nav"}),...Lt()},"VNavigationDrawer"),Y_=ke()({name:"VNavigationDrawer",props:O7(),emits:{"update:modelValue":e=>!0,"update:rail":e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const{isRtl:i}=Dr(),{themeClasses:o}=Zt(e),{borderClasses:a}=Ds(e),{backgroundColorClasses:l,backgroundColorStyles:u}=fr(()=>e.color),{elevationClasses:c}=Ls(e),{displayClasses:d,mobile:f}=fi(e),{roundedClasses:p}=jn(e),g=oP(),m=it(e,"modelValue",null,V=>!!V),{ssrBootStyles:y}=jd(),{scopeId:_}=Ru(),b=j(),x=Ie(!1),{runOpenDelay:C,runCloseDelay:S}=s_(e,V=>{x.value=V}),T=A(()=>e.rail&&e.expandOnHover&&x.value?Number(e.width):Number(e.rail?e.railWidth:e.width)),P=A(()=>Vv(e.location,i.value)),w=ae(()=>e.persistent),E=A(()=>!e.permanent&&(f.value||e.temporary)),I=A(()=>e.sticky&&!E.value&&P.value!=="bottom");Hr(()=>e.expandOnHover&&e.rail!=null,()=>{Ee(x,V=>r("update:rail",!V))}),Hr(()=>!e.disableResizeWatcher,()=>{Ee(E,V=>!e.permanent&&Mt(()=>m.value=!V))}),Hr(()=>!e.disableRouteWatcher&&!!g,()=>{Ee(g.currentRoute,()=>E.value&&(m.value=!1))}),Ee(()=>e.permanent,V=>{V&&(m.value=!0)}),e.modelValue==null&&!E.value&&(m.value=e.permanent||!f.value);const{isDragging:O,dragProgress:R}=qW({el:b,isActive:m,isTemporary:E,width:T,touchless:ae(()=>e.touchless),position:P}),M=A(()=>{const V=E.value?0:e.rail&&e.expandOnHover?Number(e.railWidth):T.value;return O.value?V*R.value:V}),{layoutItemStyles:D,layoutItemScrimStyles:F}=hO({id:e.name,order:A(()=>parseInt(e.order,10)),position:P,layoutSize:M,elementSize:T,active:Ho(m),disableTransitions:ae(()=>O.value),absolute:A(()=>e.absolute||I.value&&typeof U.value!="string")}),{isStuck:U,stickyStyles:K}=BW({rootEl:b,isSticky:I,layoutItemStyles:D}),Q=fr(()=>typeof e.scrim=="string"?e.scrim:null),H=A(()=>({...O.value?{opacity:R.value*.2,transition:"none"}:void 0,...F.value}));return Ir({VList:{bgColor:"transparent"}}),Oe(()=>{const V=s.image||e.image;return h(Ae,null,[h(e.tag,ge({ref:b,onMouseenter:C,onMouseleave:S,class:["v-navigation-drawer",`v-navigation-drawer--${P.value}`,{"v-navigation-drawer--expand-on-hover":e.expandOnHover,"v-navigation-drawer--floating":e.floating,"v-navigation-drawer--is-hovering":x.value,"v-navigation-drawer--rail":e.rail,"v-navigation-drawer--temporary":E.value,"v-navigation-drawer--persistent":w.value,"v-navigation-drawer--active":m.value,"v-navigation-drawer--sticky":I.value},o.value,l.value,a.value,d.value,c.value,p.value,e.class],style:[u.value,D.value,y.value,K.value,e.style]},_,n),{default:()=>{var ee,q,G;return[V&&h("div",{key:"image",class:"v-navigation-drawer__img"},[s.image?h(Ot,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{alt:"",cover:!0,height:"inherit",src:e.image}}},s.image):h(ds,{key:"image-img",alt:"",cover:!0,height:"inherit",src:e.image},null)]),s.prepend&&h("div",{class:"v-navigation-drawer__prepend"},[(ee=s.prepend)==null?void 0:ee.call(s)]),h("div",{class:"v-navigation-drawer__content"},[(q=s.default)==null?void 0:q.call(s)]),s.append&&h("div",{class:"v-navigation-drawer__append"},[(G=s.append)==null?void 0:G.call(s)])]}}),h(Lo,{name:"fade-transition"},{default:()=>[E.value&&(O.value||m.value)&&!!e.scrim&&h("div",ge({class:["v-navigation-drawer__scrim",Q.backgroundColorClasses.value],style:[H.value,Q.backgroundColorStyles.value],onClick:()=>{w.value||(m.value=!1)}},_),null)]})])}),{isStuck:U}}}),M7=de({active:Boolean,disabled:Boolean,max:[Number,String],value:{type:[Number,String],default:0},...Ue(),...Iu({transition:{component:yP}})},"VCounter"),X_=ke()({name:"VCounter",functional:!0,props:M7(),setup(e,t){let{slots:n}=t;const r=ae(()=>e.max?`${e.value} / ${e.max}`:String(e.value));return Oe(()=>h(si,{transition:e.transition},{default:()=>[Nt(h("div",{class:["v-counter",{"text-error":e.max&&!e.disabled&&parseFloat(e.value)>parseFloat(e.max)},e.class],style:e.style},[n.default?n.default({counter:r.value,max:e.max,value:e.value}):r.value]),[[Qi,e.active]])]})),{}}}),D7=de({text:String,onClick:Un(),...Ue(),...Lt()},"VLabel"),Q_=ke()({name:"VLabel",props:D7(),setup(e,t){let{slots:n}=t;return Oe(()=>{var r;return h("label",{class:["v-label",{"v-label--clickable":!!e.onClick},e.class],style:e.style,onClick:e.onClick},[e.text,(r=n.default)==null?void 0:r.call(n)])}),{}}}),L7=de({floating:Boolean,...Ue()},"VFieldLabel"),_f=ke()({name:"VFieldLabel",props:L7(),setup(e,t){let{slots:n}=t;return Oe(()=>h(Q_,{class:["v-field-label",{"v-field-label--floating":e.floating},e.class],style:e.style,"aria-hidden":e.floating||void 0},n)),{}}});function mO(e){const{t}=Gr();function n(r){let{name:s,color:i}=r;const o={prepend:"prependAction",prependInner:"prependAction",append:"appendAction",appendInner:"appendAction",clear:"clear"}[s],a=e[`onClick:${s}`];function l(c){c.key!=="Enter"&&c.key!==" "||(c.preventDefault(),c.stopPropagation(),Wp(a,new PointerEvent("click",c)))}const u=a&&o?t(`$vuetify.input.${o}`,e.label??""):void 0;return h(J,{icon:e[`${s}Icon`],"aria-label":u,onClick:a,onKeydown:l,color:i},null)}return{InputIcon:n}}const gO=de({focused:Boolean,"onUpdate:focused":Un()},"focus");function Uu(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:di();const n=it(e,"focused"),r=ae(()=>({[`${t}--focused`]:n.value}));function s(){n.value=!0}function i(){n.value=!1}return{focusClasses:r,isFocused:n,focus:s,blur:i}}const $7=["underlined","outlined","filled","solo","solo-inverted","solo-filled","plain"],Em=de({appendInnerIcon:He,bgColor:String,clearable:Boolean,clearIcon:{type:He,default:"$clear"},active:Boolean,centerAffix:{type:Boolean,default:void 0},color:String,baseColor:String,dirty:Boolean,disabled:{type:Boolean,default:null},glow:Boolean,error:Boolean,flat:Boolean,iconColor:[Boolean,String],label:String,persistentClear:Boolean,prependInnerIcon:He,reverse:Boolean,singleLine:Boolean,variant:{type:String,default:"filled",validator:e=>$7.includes(e)},"onClick:clear":Un(),"onClick:appendInner":Un(),"onClick:prependInner":Un(),...Ue(),...Kp(),...Dn(),...Lt()},"VField"),mu=ke()({name:"VField",inheritAttrs:!1,props:{id:String,...gO(),...Em()},emits:{"update:focused":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const{themeClasses:i}=Zt(e),{loaderClasses:o}=Rd(e),{focusClasses:a,isFocused:l,focus:u,blur:c}=Uu(e),{InputIcon:d}=mO(e),{roundedClasses:f}=jn(e),{rtlClasses:p}=Dr(),g=ae(()=>e.dirty||e.active),m=ae(()=>!!(e.label||s.label)),y=ae(()=>!e.singleLine&&m.value),_=ms(),b=A(()=>e.id||`input-${_}`),x=ae(()=>`${b.value}-messages`),C=j(),S=j(),T=j(),P=A(()=>["plain","underlined"].includes(e.variant)),w=A(()=>e.error||e.disabled?void 0:g.value&&l.value?e.color:e.baseColor),E=A(()=>{if(!(!e.iconColor||e.glow&&!l.value))return e.iconColor===!0?w.value:e.iconColor}),{backgroundColorClasses:I,backgroundColorStyles:O}=fr(()=>e.bgColor),{textColorClasses:R,textColorStyles:M}=As(w);Ee(g,U=>{if(y.value){const K=C.value.$el,Q=S.value.$el;requestAnimationFrame(()=>{const H=Qb(K),V=Q.getBoundingClientRect(),ee=V.x-H.x,q=V.y-H.y-(H.height/2-V.height/2),G=V.width/.75,le=Math.abs(G-H.width)>1?{maxWidth:Ne(G)}:void 0,ie=getComputedStyle(K),we=getComputedStyle(Q),Z=parseFloat(ie.transitionDuration)*1e3||150,he=parseFloat(we.getPropertyValue("--v-field-label-scale")),ne=we.getPropertyValue("color");K.style.visibility="visible",Q.style.visibility="hidden",Cl(K,{transform:`translate(${ee}px, ${q}px) scale(${he})`,color:ne,...le},{duration:Z,easing:Nh,direction:U?"normal":"reverse"}).finished.then(()=>{K.style.removeProperty("visibility"),Q.style.removeProperty("visibility")})})}},{flush:"post"});const D=A(()=>({isActive:g,isFocused:l,controlRef:T,blur:c,focus:u}));function F(U){U.target!==document.activeElement&&U.preventDefault()}return Oe(()=>{var ee,q,G;const U=e.variant==="outlined",K=!!(s["prepend-inner"]||e.prependInnerIcon),Q=!!(e.clearable||s.clear)&&!e.disabled,H=!!(s["append-inner"]||e.appendInnerIcon||Q),V=()=>s.label?s.label({...D.value,label:e.label,props:{for:b.value}}):e.label;return h("div",ge({class:["v-field",{"v-field--active":g.value,"v-field--appended":H,"v-field--center-affix":e.centerAffix??!P.value,"v-field--disabled":e.disabled,"v-field--dirty":e.dirty,"v-field--error":e.error,"v-field--glow":e.glow,"v-field--flat":e.flat,"v-field--has-background":!!e.bgColor,"v-field--persistent-clear":e.persistentClear,"v-field--prepended":K,"v-field--reverse":e.reverse,"v-field--single-line":e.singleLine,"v-field--no-label":!V(),[`v-field--variant-${e.variant}`]:!0},i.value,I.value,a.value,o.value,f.value,p.value,e.class],style:[O.value,e.style],onClick:F},n),[h("div",{class:"v-field__overlay"},null),h(Yp,{name:"v-field",active:!!e.loading,color:e.error?"error":typeof e.loading=="string"?e.loading:e.color},{default:s.loader}),K&&h("div",{key:"prepend",class:"v-field__prepend-inner"},[e.prependInnerIcon&&h(d,{key:"prepend-icon",name:"prependInner",color:E.value},null),(ee=s["prepend-inner"])==null?void 0:ee.call(s,D.value)]),h("div",{class:"v-field__field","data-no-activator":""},[["filled","solo","solo-inverted","solo-filled"].includes(e.variant)&&y.value&&h(_f,{key:"floating-label",ref:S,class:[R.value],floating:!0,for:b.value,style:M.value},{default:()=>[V()]}),m.value&&h(_f,{key:"label",ref:C,for:b.value},{default:()=>[V()]}),((q=s.default)==null?void 0:q.call(s,{...D.value,props:{id:b.value,class:"v-field__input","aria-describedby":x.value},focus:u,blur:c}))??h("div",{id:b.value,class:"v-field__input","aria-describedby":x.value},null)]),Q&&h(_P,{key:"clear"},{default:()=>[Nt(h("div",{class:"v-field__clearable",onMousedown:le=>{le.preventDefault(),le.stopPropagation()}},[h(Ot,{defaults:{VIcon:{icon:e.clearIcon}}},{default:()=>[s.clear?s.clear({...D.value,props:{onFocus:u,onBlur:c,onClick:e["onClick:clear"]}}):h(d,{name:"clear",onFocus:u,onBlur:c},null)]})]),[[Qi,e.dirty]])]}),H&&h("div",{key:"append",class:"v-field__append-inner"},[(G=s["append-inner"])==null?void 0:G.call(s,D.value),e.appendInnerIcon&&h(d,{key:"append-icon",name:"appendInner",color:E.value},null)]),h("div",{class:["v-field__outline",R.value],style:M.value},[U&&h(Ae,null,[h("div",{class:"v-field__outline__start"},null),y.value&&h("div",{class:"v-field__outline__notch"},[h(_f,{ref:S,floating:!0,for:b.value},{default:()=>[V()]})]),h("div",{class:"v-field__outline__end"},null)]),P.value&&y.value&&h(_f,{ref:S,floating:!0,for:b.value},{default:()=>[V()]})])])}),{controlRef:T,fieldIconColor:E}}}),F7=de({active:Boolean,color:String,messages:{type:[Array,String],default:()=>[]},...Ue(),...Iu({transition:{component:yP,leaveAbsolute:!0,group:!0}})},"VMessages"),N7=ke()({name:"VMessages",props:F7(),setup(e,t){let{slots:n}=t;const r=A(()=>An(e.messages)),{textColorClasses:s,textColorStyles:i}=As(()=>e.color);return Oe(()=>h(si,{transition:e.transition,tag:"div",class:["v-messages",s.value,e.class],style:[i.value,e.style]},{default:()=>[e.active&&r.value.map((o,a)=>h("div",{class:"v-messages__message",key:`${a}-${r.value}`},[n.message?n.message({message:o}):o]))]})),{}}}),vO=Symbol.for("vuetify:form"),V7=de({disabled:Boolean,fastFail:Boolean,readonly:Boolean,modelValue:{type:Boolean,default:null},validateOn:{type:String,default:"input"}},"form");function B7(e){const t=it(e,"modelValue"),n=ae(()=>e.disabled),r=ae(()=>e.readonly),s=Ie(!1),i=j([]),o=j([]);async function a(){const c=[];let d=!0;o.value=[],s.value=!0;for(const f of i.value){const p=await f.validate();if(p.length>0&&(d=!1,c.push({id:f.id,errorMessages:p})),!d&&e.fastFail)break}return o.value=c,s.value=!1,{valid:d,errors:o.value}}function l(){i.value.forEach(c=>c.reset())}function u(){i.value.forEach(c=>c.resetValidation())}return Ee(i,()=>{let c=0,d=0;const f=[];for(const p of i.value)p.isValid===!1?(d++,f.push({id:p.id,errorMessages:p.errorMessages})):p.isValid===!0&&c++;o.value=f,t.value=d>0?!1:c===i.value.length?!0:null},{deep:!0,flush:"post"}),Kt(vO,{register:c=>{let{id:d,vm:f,validate:p,reset:g,resetValidation:m}=c;i.value.some(y=>y.id===d),i.value.push({id:d,validate:p,reset:g,resetValidation:m,vm:$p(f),isValid:null,errorMessages:[]})},unregister:c=>{i.value=i.value.filter(d=>d.id!==c)},update:(c,d,f)=>{const p=i.value.find(g=>g.id===c);p&&(p.isValid=d,p.errorMessages=f)},isDisabled:n,isReadonly:r,isValidating:s,isValid:t,items:i,validateOn:ae(()=>e.validateOn)}),{errors:o,isDisabled:n,isReadonly:r,isValidating:s,isValid:t,items:i,validate:a,reset:l,resetValidation:u}}function yO(e){const t=Qe(vO,null);return{...t,isReadonly:A(()=>!!((e==null?void 0:e.readonly)??(t==null?void 0:t.isReadonly.value))),isDisabled:A(()=>!!((e==null?void 0:e.disabled)??(t==null?void 0:t.isDisabled.value)))}}const U7=de({disabled:{type:Boolean,default:null},error:Boolean,errorMessages:{type:[Array,String],default:()=>[]},maxErrors:{type:[Number,String],default:1},name:String,label:String,readonly:{type:Boolean,default:null},rules:{type:Array,default:()=>[]},modelValue:null,validateOn:String,validationValue:null,...gO()},"validation");function z7(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:di(),n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ms();const r=it(e,"modelValue"),s=A(()=>e.validationValue===void 0?r.value:e.validationValue),i=yO(e),o=j([]),a=Ie(!0),l=A(()=>!!(An(r.value===""?null:r.value).length||An(s.value===""?null:s.value).length)),u=A(()=>{var x;return(x=e.errorMessages)!=null&&x.length?An(e.errorMessages).concat(o.value).slice(0,Math.max(0,Number(e.maxErrors))):o.value}),c=A(()=>{var S;let x=(e.validateOn??((S=i.validateOn)==null?void 0:S.value))||"input";x==="lazy"&&(x="input lazy"),x==="eager"&&(x="input eager");const C=new Set((x==null?void 0:x.split(" "))??[]);return{input:C.has("input"),blur:C.has("blur")||C.has("input")||C.has("invalid-input"),invalidInput:C.has("invalid-input"),lazy:C.has("lazy"),eager:C.has("eager")}}),d=A(()=>{var x;return e.error||(x=e.errorMessages)!=null&&x.length?!1:e.rules.length?a.value?o.value.length||c.value.lazy?null:!0:!o.value.length:!0}),f=Ie(!1),p=A(()=>({[`${t}--error`]:d.value===!1,[`${t}--dirty`]:l.value,[`${t}--disabled`]:i.isDisabled.value,[`${t}--readonly`]:i.isReadonly.value})),g=an("validation"),m=A(()=>e.name??X(n));wu(()=>{var x;(x=i.register)==null||x.call(i,{id:m.value,vm:g,validate:b,reset:y,resetValidation:_})}),Cn(()=>{var x;(x=i.unregister)==null||x.call(i,m.value)}),bt(async()=>{var x;c.value.lazy||await b(!c.value.eager),(x=i.update)==null||x.call(i,m.value,d.value,u.value)}),Hr(()=>c.value.input||c.value.invalidInput&&d.value===!1,()=>{Ee(s,()=>{if(s.value!=null)b();else if(e.focused){const x=Ee(()=>e.focused,C=>{C||b(),x()})}})}),Hr(()=>c.value.blur,()=>{Ee(()=>e.focused,x=>{x||b()})}),Ee([d,u],()=>{var x;(x=i.update)==null||x.call(i,m.value,d.value,u.value)});async function y(){r.value=null,await Mt(),await _()}async function _(){a.value=!0,c.value.lazy?o.value=[]:await b(!c.value.eager)}async function b(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const C=[];f.value=!0;for(const S of e.rules){if(C.length>=Number(e.maxErrors??1))break;const P=await(typeof S=="function"?S:()=>S)(s.value);if(P!==!0){if(P!==!1&&typeof P!="string"){console.warn(`${P} is not a valid value. Rule functions must return boolean true or a string.`);continue}C.push(P||"")}}return o.value=C,f.value=!1,a.value=x,o.value}return{errorMessages:u,isDirty:l,isDisabled:i.isDisabled,isReadonly:i.isReadonly,isPristine:a,isValid:d,isValidating:f,reset:y,resetValidation:_,validate:b,validationClasses:p}}const il=de({id:String,appendIcon:He,baseColor:String,centerAffix:{type:Boolean,default:!0},color:String,glow:Boolean,iconColor:[Boolean,String],prependIcon:He,hideDetails:[Boolean,String],hideSpinButtons:Boolean,hint:String,persistentHint:Boolean,messages:{type:[Array,String],default:()=>[]},direction:{type:String,default:"horizontal",validator:e=>["horizontal","vertical"].includes(e)},"onClick:prepend":Un(),"onClick:append":Un(),...Ue(),...Ar(),...xd(Or(),["maxWidth","minWidth","width"]),...Lt(),...U7()},"VInput"),fs=ke()({name:"VInput",props:{...il()},emits:{"update:modelValue":e=>!0},setup(e,t){let{attrs:n,slots:r,emit:s}=t;const{densityClasses:i}=ys(e),{dimensionStyles:o}=Mr(e),{themeClasses:a}=Zt(e),{rtlClasses:l}=Dr(),{InputIcon:u}=mO(e),c=ms(),d=A(()=>e.id||`input-${c}`),f=A(()=>`${d.value}-messages`),{errorMessages:p,isDirty:g,isDisabled:m,isReadonly:y,isPristine:_,isValid:b,isValidating:x,reset:C,resetValidation:S,validate:T,validationClasses:P}=z7(e,"v-input",d),w=A(()=>({id:d,messagesId:f,isDirty:g,isDisabled:m,isReadonly:y,isPristine:_,isValid:b,isValidating:x,reset:C,resetValidation:S,validate:T})),E=ae(()=>e.error||e.disabled?void 0:e.focused?e.color:e.baseColor),I=ae(()=>{if(e.iconColor)return e.iconColor===!0?E.value:e.iconColor}),O=A(()=>{var R;return(R=e.errorMessages)!=null&&R.length||!_.value&&p.value.length?p.value:e.hint&&(e.persistentHint||e.focused)?e.hint:e.messages});return Oe(()=>{var U,K,Q,H;const R=!!(r.prepend||e.prependIcon),M=!!(r.append||e.appendIcon),D=O.value.length>0,F=!e.hideDetails||e.hideDetails==="auto"&&(D||!!r.details);return h("div",{class:["v-input",`v-input--${e.direction}`,{"v-input--center-affix":e.centerAffix,"v-input--focused":e.focused,"v-input--glow":e.glow,"v-input--hide-spin-buttons":e.hideSpinButtons},i.value,a.value,l.value,P.value,e.class],style:[o.value,e.style]},[R&&h("div",{key:"prepend",class:"v-input__prepend"},[(U=r.prepend)==null?void 0:U.call(r,w.value),e.prependIcon&&h(u,{key:"prepend-icon",name:"prepend",color:I.value},null)]),r.default&&h("div",{class:"v-input__control"},[(K=r.default)==null?void 0:K.call(r,w.value)]),M&&h("div",{key:"append",class:"v-input__append"},[e.appendIcon&&h(u,{key:"append-icon",name:"append",color:I.value},null),(Q=r.append)==null?void 0:Q.call(r,w.value)]),F&&h("div",{id:f.value,class:"v-input__details",role:"alert","aria-live":"polite"},[h(N7,{active:D,messages:O.value},{message:r.message}),(H=r.details)==null?void 0:H.call(r,w.value)])])}),{reset:C,resetValidation:S,validate:T,isValid:b,errorMessages:p}}}),H7=["color","file","time","date","datetime-local","week","month"],bO=de({autofocus:Boolean,counter:[Boolean,Number,String],counterValue:[Number,Function],prefix:String,placeholder:String,persistentPlaceholder:Boolean,persistentCounter:Boolean,suffix:String,role:String,type:{type:String,default:"text"},modelModifiers:Object,...il(),...Em()},"VTextField"),st=ke()({name:"VTextField",directives:{Intersect:H_},inheritAttrs:!1,props:bO(),emits:{"click:control":e=>!0,"mousedown:control":e=>!0,"update:focused":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const i=it(e,"modelValue"),{isFocused:o,focus:a,blur:l}=Uu(e),u=A(()=>typeof e.counterValue=="function"?e.counterValue(i.value):typeof e.counterValue=="number"?e.counterValue:(i.value??"").toString().length),c=A(()=>{if(n.maxlength)return n.maxlength;if(!(!e.counter||typeof e.counter!="number"&&typeof e.counter!="string"))return e.counter}),d=A(()=>["plain","underlined"].includes(e.variant));function f(T,P){var w,E;!e.autofocus||!T||(E=(w=P[0].target)==null?void 0:w.focus)==null||E.call(w)}const p=j(),g=j(),m=j(),y=A(()=>H7.includes(e.type)||e.persistentPlaceholder||o.value||e.active);function _(){var T;m.value!==document.activeElement&&((T=m.value)==null||T.focus()),o.value||a()}function b(T){r("mousedown:control",T),T.target!==m.value&&(_(),T.preventDefault())}function x(T){_(),r("click:control",T)}function C(T,P){T.stopPropagation(),_(),Mt(()=>{i.value=null,P(),Wp(e["onClick:clear"],T)})}function S(T){var w;const P=T.target;if(i.value=P.value,(w=e.modelModifiers)!=null&&w.trim&&["text","search","password","tel","url"].includes(e.type)){const E=[P.selectionStart,P.selectionEnd];Mt(()=>{P.selectionStart=E[0],P.selectionEnd=E[1]})}}return Oe(()=>{const T=!!(s.counter||e.counter!==!1&&e.counter!=null),P=!!(T||s.details),[w,E]=Qa(n),{modelValue:I,...O}=fs.filterProps(e),R=mu.filterProps(e);return h(fs,ge({ref:p,modelValue:i.value,"onUpdate:modelValue":M=>i.value=M,class:["v-text-field",{"v-text-field--prefixed":e.prefix,"v-text-field--suffixed":e.suffix,"v-input--plain-underlined":d.value},e.class],style:e.style},w,O,{centerAffix:!d.value,focused:o.value}),{...s,default:M=>{let{id:D,isDisabled:F,isDirty:U,isReadonly:K,isValid:Q,reset:H}=M;return h(mu,ge({ref:g,onMousedown:b,onClick:x,"onClick:clear":V=>C(V,H),"onClick:prependInner":e["onClick:prependInner"],"onClick:appendInner":e["onClick:appendInner"],role:e.role},R,{id:D.value,active:y.value||U.value,dirty:U.value||e.dirty,disabled:F.value,focused:o.value,error:Q.value===!1}),{...s,default:V=>{let{props:{class:ee,...q}}=V;const G=Nt(h("input",ge({ref:m,value:i.value,onInput:S,autofocus:e.autofocus,readonly:K.value,disabled:F.value,name:e.name,placeholder:e.placeholder,size:1,type:e.type,onFocus:_,onBlur:l},q,E),null),[[hr("intersect"),{handler:f},null,{once:!0}]]);return h(Ae,null,[e.prefix&&h("span",{class:"v-text-field__prefix"},[h("span",{class:"v-text-field__prefix__text"},[e.prefix])]),s.default?h("div",{class:ee,"data-no-activator":""},[s.default(),G]):Bi(G,{class:ee}),e.suffix&&h("span",{class:"v-text-field__suffix"},[h("span",{class:"v-text-field__suffix__text"},[e.suffix])])])}})},details:P?M=>{var D;return h(Ae,null,[(D=s.details)==null?void 0:D.call(s,M),T&&h(Ae,null,[h("span",null,null),h(X_,{active:e.persistentCounter||o.value,value:u.value,max:c.value,disabled:e.disabled},s.counter)])])}:void 0})}),Ji({},p,g,m)}}),j7=de({id:String,interactive:Boolean,text:String,...Ms(Id({closeOnBack:!1,location:"end",locationStrategy:"connected",eager:!0,minWidth:0,offset:10,openOnClick:!1,openOnHover:!0,origin:"auto",scrim:!1,scrollStrategy:"reposition",transition:null}),["absolute","persistent"])},"VTooltip"),nt=ke()({name:"VTooltip",props:j7(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=it(e,"modelValue"),{scopeId:s}=Ru(),i=ms(),o=ae(()=>e.id||`v-tooltip-${i}`),a=j(),l=A(()=>e.location.split(" ").length>1?e.location:e.location+" center"),u=A(()=>e.origin==="auto"||e.origin==="overlap"||e.origin.split(" ").length>1||e.location.split(" ").length>1?e.origin:e.origin+" center"),c=ae(()=>e.transition!=null?e.transition:r.value?"scale-transition":"fade-transition"),d=A(()=>ge({"aria-describedby":o.value},e.activatorProps));return Oe(()=>{const f=Ui.filterProps(e);return h(Ui,ge({ref:a,class:["v-tooltip",{"v-tooltip--interactive":e.interactive},e.class],style:e.style,id:o.value},f,{modelValue:r.value,"onUpdate:modelValue":p=>r.value=p,transition:c.value,absolute:!0,location:l.value,origin:u.value,persistent:!0,role:"tooltip",activatorProps:d.value,_disableGlobalStack:!0},s),{activator:n.activator,default:function(){var y;for(var p=arguments.length,g=new Array(p),m=0;m<p;m++)g[m]=arguments[m];return((y=n.default)==null?void 0:y.call(n,...g))??e.text}})}),Ji({},a)}}),q7={key:0,class:"d-flex justify-center static-disabled"},W7={key:1,class:"pulsating-red d-flex justify-center"},G7={key:0,class:"d-flex justify-center"},K7={key:0},Y7={key:1},X7={key:1},Q7={key:2},J7={key:3},Z7={key:0},e9={key:1},t9={key:0},n9={key:1},r9={key:0},s9={key:1},i9={key:2},o9=Le({__name:"FileExplorerSideNav",setup(e){const t=Wt(),n=rr(),r=j(36),s=j(void 0),i=j(void 0),o=j(!1),a=j(!0),l=A(()=>t.sideNavPrinter),u=A(()=>{var ne;return(ne=l.value)==null?void 0:ne.id}),c=A(()=>u.value?n.isApiResponding(u.value):!1),d=A(()=>{var ne;return iO((ne=l.value)==null?void 0:ne.printerType)}),f=A(()=>{var ne;return lp((ne=l.value)==null?void 0:ne.printerType)}),p=A(()=>{var ne;return up((ne=l.value)==null?void 0:ne.printerType)}),g=A(()=>{var ne;return Oc((ne=l.value)==null?void 0:ne.printerType)}),m=A(()=>u.value?n.isPrinterOperational(u.value):!1),y=A(()=>{var ne;return(ne=l.value)==null?void 0:ne.enabled}),_=A(()=>{var ne,z;return!!((z=(ne=l.value)==null?void 0:ne.disabledReason)!=null&&z.length)}),b=A(()=>u.value?n.isPrinterPrinting(u.value):!1),x=A(()=>{var ne;return(ne=i.value)!=null&&ne.length?i.value.filter(z=>{var xe;return(xe=s.value)!=null&&xe.length?`${z.path}`.toLowerCase().includes(s.value):!0})||[]:[]}),C=A(()=>!l.value||!u.value?!1:n.isPrinterStoppable(u.value)),S=A(()=>!l.value||!u.value?!1:n.isPrinterPaused(u.value)),T=A(()=>{var ne;return u.value?((ne=i.value)==null?void 0:ne.length)&&n.isApiResponding(u.value):!1}),P=A(()=>{if(!u.value)throw new Error("Printer ID not set, cannot get current job");return n.printerJobsById[u.value]}),w=A(()=>{if(!u.value)throw new Error("Printer ID not set, cannot get current printing file name");return n.printingFilePathsByPrinterId[u.value]}),E=A(()=>{var N;if(!u.value||!l.value)return null;const ne=n.printerEventsById[u.value],z=n.socketStatesById[u.value],xe=CA(l.value,z,ne);return((N=Ns().frontendDebugSettings)==null?void 0:N.showInterpretedPrinterState)&&console.debug("[FileExplorerSideNav] rendered for printerId",u.value,xe==null?void 0:xe.text,xe==null?void 0:xe.color,xe==null?void 0:xe.rgb),xe}),I=async()=>{var z;a.value=!0;const ne=(z=l.value)==null?void 0:z.id;if(ne)try{n.isApiResponding(ne)?i.value=await t.loadPrinterFiles(ne):i.value=await $i.getFileCache(ne)}finally{a.value=!1}},O=async ne=>{u.value&&await t.deletePrinterFile(u.value,ne.path)};Ee(l,async(ne,z)=>{o.value=!!ne;const xe=ne==null?void 0:ne.id;!ne||!xe||(!i.value||ne.id!==(z==null?void 0:z.id)||!z)&&await I()}),Ee(o,ne=>{ne||t.setSideNavPrinter(void 0)});function R(ne){return ne?ne==null?void 0:ne.toFixed(1):""}function M(ne){return u.value?n.printingFilePathsByPrinterId[u.value]===ne.path:!1}function D(){const ne=l.value;if(ne&&o.value)return Sm(ne.name)}function F(){l.value&&(Qt.openPrinterURL(l.value.printerURL),he())}function U(){if(!l.value)return;const ne=new URL(l.value.printerURL);ne.port="8080",Qt.openPrinterURL(ne.toString()),he()}async function K(){if(u.value){if(n.isPrinterOperational(u.value))return await Qt.sendPrinterDisconnectCommand(u.value);await Qt.sendPrinterConnectCommand(u.value)}}async function Q(){if(!u.value)throw new Error("Printer ID not set, cant toggle enabled");if(!l.value)throw new Error("Cant toggle enabled, sidenav printer unset");const ne=!l.value.enabled;await Qt.toggleEnabled(u.value,ne)}async function H(){if(!u.value)throw new Error("Printer ID not set, cant toggle maintenance");if(!l.value)throw new Error("Cant toggle enabled, sidenav printer unset");if(_.value){await Qt.updatePrinterMaintenance(u.value);return}t.setMaintenanceDialogPrinter(l.value),await tn(nn.PrinterMaintenanceDialog).openDialog(),he()}async function V(){u.value&&await Qt.refreshSocket(u.value)}async function ee(){u.value&&confirm("Are you sure to cancel the current print job?")&&await Ma.stopPrintJob(u.value)}async function q(){u.value&&await Ma.pausePrintJob(u.value)}async function G(){u.value&&await Ma.resumePrintJob(u.value)}async function le(){u.value&&confirm("Are you sure to delete all files for this printer?")&&(a.value=!0,await t.deletePrinterFiles(u.value),a.value=!1,i.value=t.printerFiles(u.value))}function ie(){l.value&&(t.setUpdateDialogPrinter(l.value),tn(nn.AddOrUpdatePrinterDialog).openDialog(),he())}async function we(ne){u.value&&await n.selectAndPrintFile({printerId:u.value,fullPath:ne.path})}function Z(ne){u.value&&$i.downloadFile(u.value,ne)}function he(){t.setSideNavPrinter(void 0)}return(ne,z)=>{const xe=hr("drop-upload");return $(),te(Y_,{modelValue:o.value,"onUpdate:modelValue":z[14]||(z[14]=Fe=>o.value=Fe),absolute:"",loading:"true",location:"right",scrim:"white",temporary:"",width:"700",onClose:z[15]||(z[15]=Fe=>he())},{default:v(()=>{var Fe,N,B;return[l.value?($(),te(Ve,{key:0,lines:"two"},{prepend:v(()=>[h(nt,{location:"left"},{activator:v(({props:Y})=>[h(re,ge({size:r.value,class:"mr-4 mt-1",color:"primary",icon:""},Y,{onClick:z[0]||(z[0]=fe=>F()),onMouseup:z[1]||(z[1]=St(fe=>F(),["middle"]))}),{default:v(()=>[h(ut,{size:r.value,class:"font-weight-bold",color:"primary"},{default:v(()=>[k(se(D()),1)]),_:1},8,["size"])]),_:2},1040,["size"])]),default:v(()=>[L("span",null," Visit the "+se(g.value)+" associated to this printer ",1)]),_:1})]),default:v(()=>[h(ct,{class:"font-weight-bold"},{default:v(()=>[k(se(l.value.name),1)]),_:1}),h(vt),h(OW,null,{default:v(()=>{var Y,fe,ce,be;return[!y.value||!c.value?($(),ve("strong",q7,se(y.value?"Enabled":"Disabled")+" - "+se(c.value?(fe=(Y=E.value)==null?void 0:Y.text)==null?void 0:fe.toUpperCase():"Offline"),1)):pe("",!0),y.value&&((ce=E.value)!=null&&ce.text)&&m.value&&c.value?($(),ve("strong",W7," Enabled - "+se((be=E.value)==null?void 0:be.text),1)):pe("",!0)]}),_:1}),P.value?($(),te(vt,{key:0},{default:v(()=>{var Y,fe,ce,be;return[(Y=P.value)!=null&&Y.progress?($(),ve("span",G7," Progress: "+se(R((fe=P.value)==null?void 0:fe.progress.completion))+"% ",1)):pe("",!0),(ce=P.value)!=null&&ce.progress?($(),te(su,{key:1,"model-value":R((be=P.value.progress)==null?void 0:be.completion),class:"mt-1 mb-1",height:"8px"},null,8,["model-value"])):pe("",!0),h(nt,{location:"bottom"},{activator:v(({props:Re})=>[h(re,ge({size:"small"},Re,{variant:"outlined"}),{default:v(()=>[k(se(w.value),1)]),_:2},1040)]),default:v(()=>[L("span",null,se(w.value),1)]),_:1})]}),_:1})):pe("",!0)]),_:1})):pe("",!0),!y.value||!c.value?($(),te(fn,{key:1,color:"primary"},{default:v(()=>[y.value?($(),ve("span",Y7,[k(" This "+se(g.value)+" seems unreachable... Will keep trying for you ",1),h(J,null,{default:v(()=>z[16]||(z[16]=[k("hourglass_top")])),_:1,__:[16]})])):($(),ve("span",K7," Disabled "+se(g.value)+", enable it first to get live updates ",1))]),_:1})):pe("",!0),!((Fe=l.value)!=null&&Fe.enabled)&&!((N=l.value)!=null&&N.disabledReason)?($(),te(fn,{key:2,color:"secondary"},{default:v(()=>[k(" This "+se(g.value)+" was disabled without reason. ",1)]),_:1})):pe("",!0),(B=l.value)!=null&&B.disabledReason?($(),te(fn,{key:3,color:"black"},{default:v(()=>{var Y;return[k(" This "+se(g.value)+" was disabled for maintenance: ",1),z[17]||(z[17]=L("br",null,null,-1)),L("small",null," "+se((Y=l.value)==null?void 0:Y.disabledReason),1)]}),_:1,__:[17]})):pe("",!0),h(dn),Nt(($(),te(Bt,{density:"compact"},{default:v(()=>[h(qr,{inset:""},{default:v(()=>z[18]||(z[18]=[k(" Manage FDM Monster instance")])),_:1,__:[18]}),h(nt,{location:"left"},{activator:v(({props:Y})=>[h(Ve,ge({class:"extra-dense-list-item",link:""},Y,{onClick:z[2]||(z[2]=St(fe=>F(),["prevent","stop"]))}),{prepend:v(()=>[h(ut,{size:r.value,class:"ml-3 mr-6 ma-5"},{default:v(()=>[d.value?($(),te(ds,{key:0,src:X($y)},null,8,["src"])):f.value?($(),ve("span",X7,"MR")):p.value?($(),ve("span",Q7,"PL")):($(),ve("span",J7,"?"))]),_:1},8,["size"])]),default:v(()=>[L("span",null," Open "+se(g.value),1)]),_:2},1040)]),default:v(()=>[L("span",null," Visit the "+se(g.value)+" associated to this printer ",1)]),_:1}),f.value?($(),te(nt,{key:0,location:"left"},{activator:v(({props:Y})=>[h(Ve,ge({class:"extra-dense-list-item",link:""},Y,{onClick:z[3]||(z[3]=St(fe=>U(),["prevent","stop"]))}),{prepend:v(()=>[h(ut,{size:r.value,class:"ml-3 mr-6 ma-5"},{default:v(()=>z[19]||(z[19]=[L("span",null,"MA",-1)])),_:1,__:[19]},8,["size"])]),default:v(()=>[z[20]||(z[20]=L("span",null," Open Mainsail ",-1))]),_:2,__:[20]},1040)]),default:v(()=>[z[21]||(z[21]=L("span",null," Visit the Mainsail for this printer ",-1))]),_:1,__:[21]})):pe("",!0),h(nt,{location:"left"},{activator:v(({props:Y})=>[h(Ve,ge({class:"extra-dense-list-item",link:""},Y,{onClick:z[4]||(z[4]=St(fe=>Q(),["prevent","stop"]))}),{prepend:v(()=>[h(ut,{size:r.value,color:"grey-lighten-1"},{default:v(()=>[h(J,{color:y.value?"primary":"green"},{default:v(()=>z[22]||(z[22]=[k(" dns")])),_:1,__:[22]},8,["color"])]),_:1},8,["size"])]),default:v(()=>[y.value?($(),ve("span",Z7," Disable Printer Location ")):y.value?pe("",!0):($(),ve("span",e9," Enable Printer Location "))]),_:2},1040)]),default:v(()=>[z[23]||(z[23]=L("span",null," Deactivate connection, without impacting print ",-1))]),_:1,__:[23]}),h(nt,{location:"left"},{activator:v(({props:Y})=>[h(Ve,ge({class:"extra-dense-list-item",link:""},Y,{onClick:z[5]||(z[5]=St(fe=>H(),["prevent","stop"]))}),{default:v(()=>[h(ut,{size:r.value,color:"grey-lighten-1"},{default:v(()=>[h(J,{color:_.value?"green":"primary"},{default:v(()=>z[24]||(z[24]=[k(" construction ")])),_:1,__:[24]},8,["color"])]),_:1},8,["size"]),_.value?_.value?($(),ve("span",n9," Complete Maintenance ")):pe("",!0):($(),ve("span",t9," Enable Maintenance "))]),_:2},1040)]),default:v(()=>[z[25]||(z[25]=L("span",null," Deactivate, set under repair, without impacting print ",-1))]),_:1,__:[25]}),h(nt,{location:"left"},{activator:v(({props:Y})=>[h(Ve,ge({class:"extra-dense-list-item",link:""},Y,{onClick:z[6]||(z[6]=St(fe=>V(),["prevent","stop"]))}),{default:v(()=>[h(ut,{size:r.value},{default:v(()=>[h(J,{color:_.value?"green":"primary",class:"grey-lighten-1"},{default:v(()=>z[26]||(z[26]=[k(" autorenew ")])),_:1,__:[26]},8,["color"])]),_:1},8,["size"]),z[27]||(z[27]=L("span",null,[k(" Refresh State "),L("small",null," - this does not affect the print! ")],-1))]),_:2,__:[27]},1040)]),default:v(()=>[z[28]||(z[28]=L("span",null," Let FDM Monster know you are experiencing inconsistencies, reset all volatile states ",-1))]),_:1,__:[28]}),h(dn),h(qr,{inset:""},{default:v(()=>z[29]||(z[29]=[k(" Commands")])),_:1,__:[29]}),h(nt,{location:"left"},{activator:v(({props:Y})=>{var fe;return[h(Ve,ge({disabled:!((fe=l.value)!=null&&fe.enabled)||!c.value,class:"extra-dense-list-item",link:""},Y,{onClick:z[7]||(z[7]=St(ce=>K(),["prevent","stop"]))}),{default:v(()=>[h(ut,{size:r.value},{default:v(()=>[h(J,null,{default:v(()=>z[30]||(z[30]=[k(" usb")])),_:1,__:[30]})]),_:1},8,["size"]),C.value?($(),ve("span",r9," Disconnect USB & Stop Print ")):m.value?($(),ve("span",s9," Disconnect USB ")):($(),ve("span",i9," Connect USB "))]),_:2},1040,["disabled"])]}),default:v(()=>[z[31]||(z[31]=L("span",null," Disconnect USB, disrupting any print ",-1))]),_:1,__:[31]}),h(nt,{location:"left"},{activator:v(({props:Y})=>[h(Ve,ge({disabled:!c.value||!b.value,class:"extra-dense-list-item",link:""},Y,{onClick:z[8]||(z[8]=St(fe=>S.value?G():q(),["prevent","stop"]))}),{default:v(()=>[h(ut,{size:r.value},{default:v(()=>[S.value?pe("",!0):($(),te(J,{key:0},{default:v(()=>z[32]||(z[32]=[k(" pause")])),_:1,__:[32]})),S.value?($(),te(J,{key:1},{default:v(()=>z[33]||(z[33]=[k(" play_circle_outline")])),_:1,__:[33]})):pe("",!0)]),_:1},8,["size"]),k(" "+se(S.value?"Resume print":"Pause print"),1)]),_:2},1040,["disabled"])]),default:v(()=>[z[34]||(z[34]=L("span",null," Send Pause or Resume command ",-1))]),_:1,__:[34]}),h(nt,{location:"left"},{activator:v(({props:Y})=>[h(Ve,ge({disabled:!C.value,class:"extra-dense-list-item",link:""},Y,{onClick:z[9]||(z[9]=St(fe=>ee(),["prevent","stop"]))}),{default:v(()=>[h(ut,{size:r.value},{default:v(()=>[h(J,null,{default:v(()=>z[35]||(z[35]=[k(" stop")])),_:1,__:[35]})]),_:1},8,["size"]),z[36]||(z[36]=k(" Cancel print "))]),_:2,__:[36]},1040,["disabled"])]),default:v(()=>[z[37]||(z[37]=L("span",null," Cancel print gracefully ",-1))]),_:1,__:[37]}),h(nt,{location:"left"},{activator:v(({props:Y})=>[h(Ve,ge({disabled:!T.value,class:"extra-dense-list-item",link:""},Y,{onClick:z[10]||(z[10]=St(fe=>le(),["prevent","stop"]))}),{default:v(()=>[h(ut,{size:r.value},{default:v(()=>[h(J,null,{default:v(()=>z[38]||(z[38]=[k(" delete")])),_:1,__:[38]})]),_:1},8,["size"]),z[39]||(z[39]=k(" Delete files "))]),_:2,__:[39]},1040,["disabled"])]),default:v(()=>[z[40]||(z[40]=L("span",null," Clear all files present on OctoPrint (local) ",-1))]),_:1,__:[40]}),h(nt,{location:"left"},{activator:v(({props:Y})=>[h(Ve,ge({class:"extra-dense-list-item",link:""},Y,{onClick:z[11]||(z[11]=St(fe=>I(),["prevent","stop"]))}),{default:v(()=>[h(ut,{size:r.value},{default:v(()=>[h(J,null,{default:v(()=>z[41]||(z[41]=[k(" refresh")])),_:1,__:[41]})]),_:1},8,["size"]),z[42]||(z[42]=k(" Refresh files "))]),_:2,__:[42]},1040)]),default:v(()=>[z[43]||(z[43]=L("span",null," Rebuild the file list on OctoPrint (local) ",-1))]),_:1,__:[43]}),h(nt,{location:"left"},{activator:v(({props:Y})=>[h(Ve,ge({class:"extra-dense-list-item",link:""},Y,{onClick:z[12]||(z[12]=St(fe=>ie(),["prevent","stop"]))}),{default:v(()=>[h(ut,{size:r.value},{default:v(()=>[h(J,null,{default:v(()=>z[44]||(z[44]=[k(" settings")])),_:1,__:[44]})]),_:1},8,["size"]),z[45]||(z[45]=k(" Settings "))]),_:2,__:[45]},1040)]),default:v(()=>[z[46]||(z[46]=L("span",null," Edit the printer settings ",-1))]),_:1,__:[46]})]),_:1})),[[xe,{printers:[l.value]}]]),h(dn),Nt(($(),te(Bt,{density:"compact"},{default:v(()=>[h(qr,{inset:""},{default:v(()=>z[47]||(z[47]=[k(" Files - drag 'n drop!")])),_:1,__:[47]}),h(st,{modelValue:s.value,"onUpdate:modelValue":z[13]||(z[13]=Y=>s.value=Y),class:"ml-5 mr-5",clearable:"",label:"Search files...","prepend-icon":"search"},null,8,["modelValue"]),x.value.length?pe("",!0):($(),te(Ve,{key:0},{default:v(()=>[h(ut,{size:r.value},{default:v(()=>[h(J,null,{default:v(()=>z[48]||(z[48]=[k(" clear")])),_:1,__:[48]})]),_:1},8,["size"]),h(ct,null,{default:v(()=>z[49]||(z[49]=[k(" No files to show")])),_:1,__:[49]})]),_:1})),a.value?($(),te(su,{key:1,indeterminate:""})):pe("",!0),($(!0),ve(Ae,null,Gt(x.value,(Y,fe)=>($(),te(Ve,{key:fe,density:"compact",link:"",style:{"padding-top":"0"}},{default:v(()=>[h(ut,{size:r.value},{default:v(()=>[h(nt,{location:"left"},{activator:v(({props:ce})=>[h(re,ge({ref_for:!0},ce,{onClick:be=>Z(Y.path)}),{default:v(()=>[h(J,null,{default:v(()=>z[50]||(z[50]=[k(" download")])),_:1,__:[50]})]),_:2},1040,["onClick"])]),default:v(()=>[z[51]||(z[51]=L("span",null," Download GCode ",-1))]),_:2,__:[51]},1024)]),_:2},1032,["size"]),h(pu,null,{default:v(()=>[h(nt,{location:"left"},{activator:v(({props:ce})=>[h(re,ge({disabled:M(Y),icon:"",ref_for:!0},ce,{onClick:be=>we(Y)}),{default:v(()=>[h(J,null,{default:v(()=>z[52]||(z[52]=[k(" play_arrow")])),_:1,__:[52]})]),_:2},1040,["disabled","onClick"])]),default:v(()=>[z[53]||(z[53]=L("span",null," Select & Print ",-1))]),_:2,__:[53]},1024)]),_:2},1024),h(nt,{location:"left"},{activator:v(({props:ce})=>[L("span",ge({class:{"current-file-print":M(Y)},ref_for:!0},ce),se(Y.path),17)]),default:v(()=>[L("span",null,[k(" File: "+se(Y.path)+" ",1),z[54]||(z[54]=L("br",null,null,-1)),k(" Size: "+se(X(sO)(Y.size))+" ",1),z[55]||(z[55]=L("br",null,null,-1)),L("strong",null,se(M(Y)?"Printing":"Unused"),1)])]),_:2},1024),h(pu,null,{default:v(()=>[h(nt,{location:"left"},{activator:v(({props:ce})=>[h(re,ge({disabled:M(Y),ref_for:!0},ce,{onClick:be=>O(Y)}),{default:v(()=>[h(J,{color:"grey-lighten-1"},{default:v(()=>z[56]||(z[56]=[k(" delete")])),_:1,__:[56]})]),_:2},1040,["disabled","onClick"])]),default:v(()=>[z[57]||(z[57]=L("span",null," Delete file ",-1))]),_:2,__:[57]},1024)]),_:2},1024)]),_:2},1024))),128))]),_:1})),[[xe,{printers:[l.value]}]])]}),_:1},8,["modelValue"])}}});class dp extends gr{static async downloadYamlExport(t){const r=await(await Qn()).request({method:"POST",url:"api/server/export-printers-floors-yaml",data:t,responseType:"arraybuffer"});Ay(r.data,"export-fdm-monster-"+Date.now()+".yaml")}static async uploadAndImportYaml(t){const n=new FormData;return n.append("file",t),await this.postUpload("api/server/import-printers-floors-yaml",n,{})}static async downloadLogDump(){const n=await(await Qn()).request({method:"POST",url:"api/server/dump-fdm-monster-logs",responseType:"arraybuffer"});Ay(n.data,"logs-fdm-monster-"+Date.now()+".zip")}static async clearLogFilesOlderThanWeek(){return await this.delete("api/server/clear-outdated-fdm-monster-logs")}}class ma extends gr{static async updateClientDistGithub(t,n){return await this.post("/api/server/update-client-bundle-github",{downloadRelease:t,allowDowngrade:n})}static async getGithubRateLimit(){return await this.get("/api/server/github-rate-limit")}static async getClientReleases(){return await this.get("/api/server/client-releases")}static async getVersion(){return await this.get("/api/version")}static async getFeatures(){return await this.get("/api/features")}static async test(){return await(await Qn(!1,!1)).get("/api/test")}}const Cm=gs("Feature",{state:()=>({features:void 0}),getters:{getFeatures(){return this.features},getFeature:e=>t=>{if(!e.features){console.warn("Feature[getFeature] store not loaded");return}return e.features[t]},hasFeature:e=>t=>{if(!e.features)return console.warn("Feature[hasFeature] store not loaded"),!1;const n=e.features[t];return n?n==null?void 0:n.available:(console.debug(`Feature ${t} not defined. Options:`,Object.keys(e.features)),!1)}},actions:{async loadFeatures(){try{const e=await ma.getFeatures();this.setFeatures(e)}catch{this.features={}}},setFeatures(e){this.features=e}}}),_O=Symbol.for("vuetify:selection-control-group"),J_=de({color:String,disabled:{type:Boolean,default:null},defaultsTarget:String,error:Boolean,id:String,inline:Boolean,falseIcon:He,trueIcon:He,ripple:{type:[Boolean,Object],default:!0},multiple:{type:Boolean,default:null},name:String,readonly:{type:Boolean,default:null},modelValue:null,type:String,valueComparator:{type:Function,default:as},...Ue(),...Ar(),...Lt()},"SelectionControlGroup"),a9=de({...J_({defaultsTarget:"VSelectionControl"})},"VSelectionControlGroup"),l9=ke()({name:"VSelectionControlGroup",props:a9(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=it(e,"modelValue"),s=ms(),i=ae(()=>e.id||`v-selection-control-group-${s}`),o=ae(()=>e.name||i.value),a=new Set;return Kt(_O,{modelValue:r,forceUpdate:()=>{a.forEach(l=>l())},onForceUpdate:l=>{a.add(l),yn(()=>{a.delete(l)})}}),Ir({[e.defaultsTarget]:{color:ae(()=>e.color),disabled:ae(()=>e.disabled),density:ae(()=>e.density),error:ae(()=>e.error),inline:ae(()=>e.inline),modelValue:r,multiple:ae(()=>!!e.multiple||e.multiple==null&&Array.isArray(r.value)),name:o,falseIcon:ae(()=>e.falseIcon),trueIcon:ae(()=>e.trueIcon),readonly:ae(()=>e.readonly),ripple:ae(()=>e.ripple),type:ae(()=>e.type),valueComparator:ae(()=>e.valueComparator)}}),Oe(()=>{var l;return h("div",{class:["v-selection-control-group",{"v-selection-control-group--inline":e.inline},e.class],style:e.style,role:e.type==="radio"?"radiogroup":void 0},[(l=n.default)==null?void 0:l.call(n)])}),{}}}),Tm=de({label:String,baseColor:String,trueValue:null,falseValue:null,value:null,...Ue(),...J_()},"VSelectionControl");function u9(e){const t=Qe(_O,void 0),{densityClasses:n}=ys(e),r=it(e,"modelValue"),s=A(()=>e.trueValue!==void 0?e.trueValue:e.value!==void 0?e.value:!0),i=A(()=>e.falseValue!==void 0?e.falseValue:!1),o=A(()=>!!e.multiple||e.multiple==null&&Array.isArray(r.value)),a=A({get(){const p=t?t.modelValue.value:r.value;return o.value?An(p).some(g=>e.valueComparator(g,s.value)):e.valueComparator(p,s.value)},set(p){if(e.readonly)return;const g=p?s.value:i.value;let m=g;o.value&&(m=p?[...An(r.value),g]:An(r.value).filter(y=>!e.valueComparator(y,s.value))),t?t.modelValue.value=m:r.value=m}}),{textColorClasses:l,textColorStyles:u}=As(()=>{if(!(e.error||e.disabled))return a.value?e.color:e.baseColor}),{backgroundColorClasses:c,backgroundColorStyles:d}=fr(()=>a.value&&!e.error&&!e.disabled?e.color:e.baseColor),f=A(()=>a.value?e.trueIcon:e.falseIcon);return{group:t,densityClasses:n,trueValue:s,falseValue:i,model:a,textColorClasses:l,textColorStyles:u,backgroundColorClasses:c,backgroundColorStyles:d,icon:f}}const Wa=ke()({name:"VSelectionControl",directives:{Ripple:Pu},inheritAttrs:!1,props:Tm(),emits:{"update:modelValue":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const{group:s,densityClasses:i,icon:o,model:a,textColorClasses:l,textColorStyles:u,backgroundColorClasses:c,backgroundColorStyles:d,trueValue:f}=u9(e),p=ms(),g=Ie(!1),m=Ie(!1),y=j(),_=ae(()=>e.id||`input-${p}`),b=ae(()=>!e.disabled&&!e.readonly);s==null||s.onForceUpdate(()=>{y.value&&(y.value.checked=a.value)});function x(P){b.value&&(g.value=!0,$h(P.target,":focus-visible")!==!1&&(m.value=!0))}function C(){g.value=!1,m.value=!1}function S(P){P.stopPropagation()}function T(P){if(!b.value){y.value&&(y.value.checked=a.value);return}e.readonly&&s&&Mt(()=>s.forceUpdate()),a.value=P.target.checked}return Oe(()=>{var O,R;const P=r.label?r.label({label:e.label,props:{for:_.value}}):e.label,[w,E]=Qa(n),I=h("input",ge({ref:y,checked:a.value,disabled:!!e.disabled,id:_.value,onBlur:C,onFocus:x,onInput:T,"aria-disabled":!!e.disabled,"aria-label":e.label,type:e.type,value:f.value,name:e.name,"aria-checked":e.type==="checkbox"?a.value:void 0},E),null);return h("div",ge({class:["v-selection-control",{"v-selection-control--dirty":a.value,"v-selection-control--disabled":e.disabled,"v-selection-control--error":e.error,"v-selection-control--focused":g.value,"v-selection-control--focus-visible":m.value,"v-selection-control--inline":e.inline},i.value,e.class]},w,{style:e.style}),[h("div",{class:["v-selection-control__wrapper",l.value],style:u.value},[(O=r.default)==null?void 0:O.call(r,{backgroundColorClasses:c,backgroundColorStyles:d}),Nt(h("div",{class:["v-selection-control__input"]},[((R=r.input)==null?void 0:R.call(r,{model:a,textColorClasses:l,textColorStyles:u,backgroundColorClasses:c,backgroundColorStyles:d,inputNode:I,icon:o.value,props:{onFocus:x,onBlur:C,id:_.value}}))??h(Ae,null,[o.value&&h(J,{key:"icon",icon:o.value},null),I])]),[[hr("ripple"),e.ripple&&[!e.disabled&&!e.readonly,null,["center","circle"]]]])]),P&&h(Q_,{for:_.value,onClick:S},{default:()=>[P]})])}),{isFocused:g,input:y}}}),wO=de({indeterminate:Boolean,indeterminateIcon:{type:He,default:"$checkboxIndeterminate"},...Tm({falseIcon:"$checkboxOff",trueIcon:"$checkboxOn"})},"VCheckboxBtn"),gu=ke()({name:"VCheckboxBtn",props:wO(),emits:{"update:modelValue":e=>!0,"update:indeterminate":e=>!0},setup(e,t){let{slots:n}=t;const r=it(e,"indeterminate"),s=it(e,"modelValue");function i(l){r.value&&(r.value=!1)}const o=ae(()=>r.value?e.indeterminateIcon:e.falseIcon),a=ae(()=>r.value?e.indeterminateIcon:e.trueIcon);return Oe(()=>{const l=Ms(Wa.filterProps(e),["modelValue"]);return h(Wa,ge(l,{modelValue:s.value,"onUpdate:modelValue":[u=>s.value=u,i],class:["v-checkbox-btn",e.class],style:e.style,type:"checkbox",falseIcon:o.value,trueIcon:a.value,"aria-checked":r.value?"mixed":void 0}),n)}),{}}}),c9=de({...il(),...Ms(wO(),["inline"])},"VCheckbox"),mn=ke()({name:"VCheckbox",inheritAttrs:!1,props:c9(),emits:{"update:modelValue":e=>!0,"update:focused":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const s=it(e,"modelValue"),{isFocused:i,focus:o,blur:a}=Uu(e),l=ms();return Oe(()=>{const[u,c]=Qa(n),d=fs.filterProps(e),f=gu.filterProps(e);return h(fs,ge({class:["v-checkbox",e.class]},u,d,{modelValue:s.value,"onUpdate:modelValue":p=>s.value=p,id:e.id||`checkbox-${l}`,focused:i.value,style:e.style}),{...r,default:p=>{let{id:g,messagesId:m,isDisabled:y,isReadonly:_,isValid:b}=p;return h(gu,ge(f,{id:g.value,"aria-describedby":m.value,disabled:y.value,readonly:_.value},c,{error:b.value===!1,modelValue:s.value,"onUpdate:modelValue":x=>s.value=x,onFocus:o,onBlur:a}),r)}})}),{}}}),d9=de({chips:Boolean,counter:Boolean,counterSizeString:{type:String,default:"$vuetify.fileInput.counterSize"},counterString:{type:String,default:"$vuetify.fileInput.counter"},hideInput:Boolean,multiple:Boolean,showSize:{type:[Boolean,Number,String],default:!1,validator:e=>typeof e=="boolean"||[1e3,1024].includes(Number(e))},...il({prependIcon:"$file"}),modelValue:{type:[Array,Object],default:e=>e.multiple?[]:null,validator:e=>An(e).every(t=>t!=null&&typeof t=="object")},...Em({clearable:!0})},"VFileInput"),SO=ke()({name:"VFileInput",inheritAttrs:!1,props:d9(),emits:{"click:control":e=>!0,"mousedown:control":e=>!0,"update:focused":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const{t:i}=Gr(),o=it(e,"modelValue",e.modelValue,M=>An(M),M=>!e.multiple&&Array.isArray(M)?M[0]:M),{isFocused:a,focus:l,blur:u}=Uu(e),c=A(()=>typeof e.showSize!="boolean"?e.showSize:void 0),d=A(()=>(o.value??[]).reduce((M,D)=>{let{size:F=0}=D;return M+F},0)),f=A(()=>U1(d.value,c.value)),p=A(()=>(o.value??[]).map(M=>{const{name:D="",size:F=0}=M;return e.showSize?`${D} (${U1(F,c.value)})`:D})),g=A(()=>{var D;const M=((D=o.value)==null?void 0:D.length)??0;return e.showSize?i(e.counterSizeString,M,f.value):i(e.counterString,M)}),m=j(),y=j(),_=j(),b=ae(()=>a.value||e.active),x=A(()=>["plain","underlined"].includes(e.variant)),C=Ie(!1);function S(){var M;_.value!==document.activeElement&&((M=_.value)==null||M.focus()),a.value||l()}function T(M){var D;(D=_.value)==null||D.click()}function P(M){r("mousedown:control",M)}function w(M){var D;(D=_.value)==null||D.click(),r("click:control",M)}function E(M){M.stopPropagation(),S(),Mt(()=>{o.value=[],Wp(e["onClick:clear"],M)})}function I(M){M.preventDefault(),M.stopImmediatePropagation(),C.value=!0}function O(M){M.preventDefault(),C.value=!1}function R(M){var F,U;if(M.preventDefault(),M.stopImmediatePropagation(),C.value=!1,!((U=(F=M.dataTransfer)==null?void 0:F.files)!=null&&U.length)||!_.value)return;const D=new DataTransfer;for(const K of M.dataTransfer.files)D.items.add(K);_.value.files=D.files,_.value.dispatchEvent(new Event("change",{bubbles:!0}))}return Ee(o,M=>{(!Array.isArray(M)||!M.length)&&_.value&&(_.value.value="")}),Oe(()=>{const M=!!(s.counter||e.counter),D=!!(M||s.details),[F,U]=Qa(n),{modelValue:K,...Q}=fs.filterProps(e),H=mu.filterProps(e);return h(fs,ge({ref:m,modelValue:e.multiple?o.value:o.value[0],class:["v-file-input",{"v-file-input--chips":!!e.chips,"v-file-input--dragging":C.value,"v-file-input--hide":e.hideInput,"v-input--plain-underlined":x.value},e.class],style:e.style,"onClick:prepend":T},F,Q,{centerAffix:!x.value,focused:a.value}),{...s,default:V=>{let{id:ee,isDisabled:q,isDirty:G,isReadonly:le,isValid:ie}=V;return h(mu,ge({ref:y,"prepend-icon":e.prependIcon,onMousedown:P,onClick:w,"onClick:clear":E,"onClick:prependInner":e["onClick:prependInner"],"onClick:appendInner":e["onClick:appendInner"]},H,{id:ee.value,active:b.value||G.value,dirty:G.value||e.dirty,disabled:q.value,focused:a.value,error:ie.value===!1,onDragover:I,onDrop:R}),{...s,default:we=>{var ne;let{props:{class:Z,...he}}=we;return h(Ae,null,[h("input",ge({ref:_,type:"file",readonly:le.value,disabled:q.value,multiple:e.multiple,name:e.name,onClick:z=>{z.stopPropagation(),le.value&&z.preventDefault(),S()},onChange:z=>{if(!z.target)return;const xe=z.target;o.value=[...xe.files??[]]},onDragleave:O,onFocus:S,onBlur:u},he,U),null),h("div",{class:Z},[!!((ne=o.value)!=null&&ne.length)&&!e.hideInput&&(s.selection?s.selection({fileNames:p.value,totalBytes:d.value,totalBytesReadable:f.value}):e.chips?p.value.map(z=>h(Sn,{key:z,size:"small",text:z},null)):p.value.join(", "))])])}})},details:D?V=>{var ee,q;return h(Ae,null,[(ee=s.details)==null?void 0:ee.call(s,V),M&&h(Ae,null,[h("span",null,null),h(X_,{active:!!((q=o.value)!=null&&q.length),value:g.value,disabled:e.disabled},s.counter)])])}:void 0})}),Ji({},m,y,_)}}),f9=de({...Tm({falseIcon:"$radioOff",trueIcon:"$radioOn"})},"VRadio"),zy=ke()({name:"VRadio",props:f9(),setup(e,t){let{slots:n}=t;return Oe(()=>{const r=Wa.filterProps(e);return h(Wa,ge(r,{class:["v-radio",e.class],style:e.style,type:"radio"}),n)}),{}}}),h9=de({height:{type:[Number,String],default:"auto"},...il(),...Ms(J_(),["multiple"]),trueIcon:{type:He,default:"$radioOn"},falseIcon:{type:He,default:"$radioOff"},type:{type:String,default:"radio"}},"VRadioGroup"),kO=ke()({name:"VRadioGroup",inheritAttrs:!1,props:h9(),emits:{"update:modelValue":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const s=ms(),i=A(()=>e.id||`radio-group-${s}`),o=it(e,"modelValue");return Oe(()=>{const[a,l]=Qa(n),u=fs.filterProps(e),c=Wa.filterProps(e),d=r.label?r.label({label:e.label,props:{for:i.value}}):e.label;return h(fs,ge({class:["v-radio-group",e.class],style:e.style},a,u,{modelValue:o.value,"onUpdate:modelValue":f=>o.value=f,id:i.value}),{...r,default:f=>{let{id:p,messagesId:g,isDisabled:m,isReadonly:y}=f;return h(Ae,null,[d&&h(Q_,{id:p.value},{default:()=>[d]}),h(l9,ge(c,{id:p.value,"aria-describedby":g.value,defaultsTarget:"VRadio",trueIcon:e.trueIcon,falseIcon:e.falseIcon,type:e.type,disabled:m.value,readonly:y.value,"aria-labelledby":d?p.value:void 0,multiple:!1},l,{modelValue:o.value,"onUpdate:modelValue":_=>o.value=_}),r)])}})}),{}}}),p9=de({autoGrow:Boolean,autofocus:Boolean,counter:[Boolean,Number,String],counterValue:Function,prefix:String,placeholder:String,persistentPlaceholder:Boolean,persistentCounter:Boolean,noResize:Boolean,rows:{type:[Number,String],default:5,validator:e=>!isNaN(parseFloat(e))},maxRows:{type:[Number,String],validator:e=>!isNaN(parseFloat(e))},suffix:String,modelModifiers:Object,...il(),...Em()},"VTextarea"),xO=ke()({name:"VTextarea",directives:{Intersect:H_},inheritAttrs:!1,props:p9(),emits:{"click:control":e=>!0,"mousedown:control":e=>!0,"update:focused":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const i=it(e,"modelValue"),{isFocused:o,focus:a,blur:l}=Uu(e),u=A(()=>typeof e.counterValue=="function"?e.counterValue(i.value):(i.value||"").toString().length),c=A(()=>{if(n.maxlength)return n.maxlength;if(!(!e.counter||typeof e.counter!="number"&&typeof e.counter!="string"))return e.counter});function d(O,R){var M,D;!e.autofocus||!O||(D=(M=R[0].target)==null?void 0:M.focus)==null||D.call(M)}const f=j(),p=j(),g=Ie(""),m=j(),y=A(()=>e.persistentPlaceholder||o.value||e.active);function _(){var O;m.value!==document.activeElement&&((O=m.value)==null||O.focus()),o.value||a()}function b(O){_(),r("click:control",O)}function x(O){r("mousedown:control",O)}function C(O){O.stopPropagation(),_(),Mt(()=>{i.value="",Wp(e["onClick:clear"],O)})}function S(O){var M;const R=O.target;if(i.value=R.value,(M=e.modelModifiers)!=null&&M.trim){const D=[R.selectionStart,R.selectionEnd];Mt(()=>{R.selectionStart=D[0],R.selectionEnd=D[1]})}}const T=j(),P=j(Number(e.rows)),w=A(()=>["plain","underlined"].includes(e.variant));On(()=>{e.autoGrow||(P.value=Number(e.rows))});function E(){e.autoGrow&&Mt(()=>{if(!T.value||!p.value)return;const O=getComputedStyle(T.value),R=getComputedStyle(p.value.$el),M=parseFloat(O.getPropertyValue("--v-field-padding-top"))+parseFloat(O.getPropertyValue("--v-input-padding-top"))+parseFloat(O.getPropertyValue("--v-field-padding-bottom")),D=T.value.scrollHeight,F=parseFloat(O.lineHeight),U=Math.max(parseFloat(e.rows)*F+M,parseFloat(R.getPropertyValue("--v-input-control-height"))),K=parseFloat(e.maxRows)*F+M||1/0,Q=Cr(D??0,U,K);P.value=Math.floor((Q-M)/F),g.value=Ne(Q)})}bt(E),Ee(i,E),Ee(()=>e.rows,E),Ee(()=>e.maxRows,E),Ee(()=>e.density,E);let I;return Ee(T,O=>{O?(I=new ResizeObserver(E),I.observe(T.value)):I==null||I.disconnect()}),Cn(()=>{I==null||I.disconnect()}),Oe(()=>{const O=!!(s.counter||e.counter||e.counterValue),R=!!(O||s.details),[M,D]=Qa(n),{modelValue:F,...U}=fs.filterProps(e),K=mu.filterProps(e);return h(fs,ge({ref:f,modelValue:i.value,"onUpdate:modelValue":Q=>i.value=Q,class:["v-textarea v-text-field",{"v-textarea--prefixed":e.prefix,"v-textarea--suffixed":e.suffix,"v-text-field--prefixed":e.prefix,"v-text-field--suffixed":e.suffix,"v-textarea--auto-grow":e.autoGrow,"v-textarea--no-resize":e.noResize||e.autoGrow,"v-input--plain-underlined":w.value},e.class],style:e.style},M,U,{centerAffix:P.value===1&&!w.value,focused:o.value}),{...s,default:Q=>{let{id:H,isDisabled:V,isDirty:ee,isReadonly:q,isValid:G}=Q;return h(mu,ge({ref:p,style:{"--v-textarea-control-height":g.value},onClick:b,onMousedown:x,"onClick:clear":C,"onClick:prependInner":e["onClick:prependInner"],"onClick:appendInner":e["onClick:appendInner"]},K,{id:H.value,active:y.value||ee.value,centerAffix:P.value===1&&!w.value,dirty:ee.value||e.dirty,disabled:V.value,focused:o.value,error:G.value===!1}),{...s,default:le=>{let{props:{class:ie,...we}}=le;return h(Ae,null,[e.prefix&&h("span",{class:"v-text-field__prefix"},[e.prefix]),Nt(h("textarea",ge({ref:m,class:ie,value:i.value,onInput:S,autofocus:e.autofocus,readonly:q.value,disabled:V.value,placeholder:e.placeholder,rows:e.rows,name:e.name,onFocus:_,onBlur:l},we,D),null),[[hr("intersect"),{handler:d},null,{once:!0}]]),e.autoGrow&&Nt(h("textarea",{class:[ie,"v-textarea__sizer"],id:`${we.id}-sizer`,"onUpdate:modelValue":Z=>i.value=Z,ref:T,readonly:!0,"aria-hidden":"true"},null),[[p$,i.value]]),e.suffix&&h("span",{class:"v-text-field__suffix"},[e.suffix])])}})},details:R?Q=>{var H;return h(Ae,null,[(H=s.details)==null?void 0:H.call(s,Q),O&&h(Ae,null,[h("span",null,null),h(X_,{active:e.persistentCounter||o.value,value:u.value,max:c.value,disabled:e.disabled},s.counter)])])}:void 0})}),Ji({},f,p,m)}}),m9={key:0,class:"pl-2"},g9={key:1},v9=Le({__name:"YamlImportExportDialog",setup(e){const t=Cm(),n=tn(nn.YamlImportExport),r=Dt(),s=j(""),i=j(""),o=j(0),a=j(!0),l=j(!0),u=j(!0),c=j(!0),d=j(void 0),f=j(""),p=A(()=>!t.hasFeature("printerGroupsApi")),g=A(()=>!!d.value),m=A(()=>o.value===0),y=async()=>{await t.loadFeatures(),u.value=t.hasFeature("printerGroupsApi")},_=async()=>{d.value=void 0,s.value="",i.value="",f.value=""},b=async()=>{l.value&&(c.value=!0),await dp.downloadYamlExport({exportPrinters:c.value,exportGroups:u.value,exportFloorGrid:l.value,printerComparisonStrategiesByPriority:["name","url"],exportFloors:a.value,floorComparisonStrategiesByPriority:"floor",notes:f.value}),r.openInfoMessage({title:"Downloaded the YAML file"}),f.value=""},x=async()=>{if(s.value="",i.value="",!d.value){s.value="The import file was not specified";return}try{await dp.uploadAndImportYaml(d.value),d.value=void 0,r.openInfoMessage({title:"Imported the YAML file"}),C()}catch(S){s.value="An error occurred uring import",i.value=S.message.toString(),d.value=void 0}},C=()=>{d.value=void 0,s.value="",i.value="",f.value="",n.closeDialog()};return(S,T)=>{const P=hi;return $(),te(P,{id:X(n).dialogId,"max-width":"700px",onEscape:T[10]||(T[10]=w=>C()),onOpened:_,onBeforeOpened:y},{default:v(()=>[h(yt,{class:"pa-4"},{default:v(()=>[h(sn,null,{default:v(()=>T[11]||(T[11]=[L("span",{class:"text-h5"}," YAML export and import ",-1)])),_:1,__:[11]}),h(en,null,{default:v(()=>[T[18]||(T[18]=L("div",null,"Choose mode:",-1)),h(rt,null,{default:v(()=>[T[12]||(T[12]=L("br",null,null,-1)),h(kO,{modelValue:X(o),"onUpdate:modelValue":T[0]||(T[0]=w=>et(o)?o.value=w:null),class:"ml-3",inline:""},{default:v(()=>[h(zy,{value:0,label:"Import YAML"}),h(zy,{value:1,label:"Export YAML"})]),_:1},8,["modelValue"])]),_:1,__:[12]}),L("div",null,[X(m)?($(),ve("div",m9,[h(SO,{modelValue:X(d),"onUpdate:modelValue":T[1]||(T[1]=w=>et(d)?d.value=w:null),accept:".yaml",label:"Select a YAML file for import *"},null,8,["modelValue"])])):($(),ve("div",g9,[h(mn,{modelValue:X(a),"onUpdate:modelValue":T[2]||(T[2]=w=>et(a)?a.value=w:null),class:"pa-0 ma-0 mt-2 ml-2",label:"Include floors"},null,8,["modelValue"]),h(mn,{modelValue:X(u),"onUpdate:modelValue":T[3]||(T[3]=w=>et(u)?u.value=w:null),disabled:X(p),class:"pa-0 ma-0 mt-2 ml-2",label:"Include groups"},null,8,["modelValue","disabled"]),h(mn,{modelValue:X(c),"onUpdate:modelValue":T[4]||(T[4]=w=>et(c)?c.value=w:null),class:"pa-0 ma-0 ml-2",label:"Include printers"},null,8,["modelValue"]),h(mn,{modelValue:X(l),"onUpdate:modelValue":T[5]||(T[5]=w=>et(l)?l.value=w:null),class:"pa-0 ma-0 ml-2",label:"Include grid positions (auto-includes printers)"},null,8,["modelValue"]),T[13]||(T[13]=k(" Include notes (for yourself): ")),h(xO,{modelValue:X(f),"onUpdate:modelValue":T[6]||(T[6]=w=>et(f)?f.value=w:null),rows:"1"},null,8,["modelValue"])])),X(m)?pe("",!0):($(),te(re,{key:2,onClick:T[7]||(T[7]=w=>b())},{default:v(()=>[h(J,null,{default:v(()=>T[14]||(T[14]=[k("download")])),_:1,__:[14]}),T[15]||(T[15]=k(" Export YAML file "))]),_:1,__:[15]})),X(m)?($(),te(re,{key:3,disabled:!X(g),onClick:T[8]||(T[8]=w=>x())},{default:v(()=>[h(J,null,{default:v(()=>T[16]||(T[16]=[k("upload")])),_:1,__:[16]}),T[17]||(T[17]=k(" Import YAML data "))]),_:1,__:[17]},8,["disabled"])):pe("",!0)])]),_:1,__:[18]}),h(Mn,null,{default:v(()=>[T[20]||(T[20]=L("em",{class:"text-red"}," * indicates required field ",-1)),h(wn),h(re,{variant:"text",onClick:T[9]||(T[9]=w=>C())},{default:v(()=>T[19]||(T[19]=[k(" Close ")])),_:1,__:[19]})]),_:1,__:[20]})]),_:1})]),_:1},8,["id"])}}}),y9="/assets/octofarm-printer-export-Dw0Zh14I.gif",Z_=Symbol.for("vuetify:v-stepper"),EO=de({color:String,disabled:{type:[Boolean,String],default:!1},prevText:{type:String,default:"$vuetify.stepper.prev"},nextText:{type:String,default:"$vuetify.stepper.next"}},"VStepperActions"),b9=ke()({name:"VStepperActions",props:EO(),emits:{"click:prev":()=>!0,"click:next":()=>!0},setup(e,t){let{emit:n,slots:r}=t;const{t:s}=Gr();function i(){n("click:prev")}function o(){n("click:next")}return Oe(()=>{const a={onClick:i},l={onClick:o};return h("div",{class:"v-stepper-actions"},[h(Ot,{defaults:{VBtn:{disabled:["prev",!0].includes(e.disabled),text:s(e.prevText),variant:"text"}}},{default:()=>{var u;return[((u=r.prev)==null?void 0:u.call(r,{props:a}))??h(re,a,null)]}}),h(Ot,{defaults:{VBtn:{color:e.color,disabled:["next",!0].includes(e.disabled),text:s(e.nextText),variant:"tonal"}}},{default:()=>{var u;return[((u=r.next)==null?void 0:u.call(r,{props:l}))??h(re,l,null)]}})])}),{}}}),e0=ku("v-stepper-header"),_9=de({color:String,title:String,subtitle:String,complete:Boolean,completeIcon:{type:He,default:"$complete"},editable:Boolean,editIcon:{type:He,default:"$edit"},error:Boolean,errorIcon:{type:He,default:"$error"},icon:He,ripple:{type:[Boolean,Object],default:!0},rules:{type:Array,default:()=>[]}},"StepperItem"),w9=de({..._9(),...Cd()},"VStepperItem"),ch=ke()({name:"VStepperItem",directives:{Ripple:Pu},props:w9(),emits:{"group:selected":e=>!0},setup(e,t){let{slots:n}=t;const r=Td(e,Z_,!0),s=A(()=>(r==null?void 0:r.value.value)??e.value),i=A(()=>e.rules.every(f=>f()===!0)),o=A(()=>!e.disabled&&e.editable),a=A(()=>!e.disabled&&e.editable),l=A(()=>e.error||!i.value),u=A(()=>e.complete||e.rules.length>0&&i.value),c=A(()=>l.value?e.errorIcon:u.value?e.completeIcon:r.isSelected.value&&e.editable?e.editIcon:e.icon),d=A(()=>({canEdit:a.value,hasError:l.value,hasCompleted:u.value,title:e.title,subtitle:e.subtitle,step:s.value,value:e.value}));return Oe(()=>{var y,_,b;const f=(!r||r.isSelected.value||u.value||a.value)&&!l.value&&!e.disabled,p=!!(e.title!=null||n.title),g=!!(e.subtitle!=null||n.subtitle);function m(){r==null||r.toggle()}return Nt(h("button",{class:["v-stepper-item",{"v-stepper-item--complete":u.value,"v-stepper-item--disabled":e.disabled,"v-stepper-item--error":l.value},r==null?void 0:r.selectedClass.value],disabled:!e.editable,type:"button",onClick:m},[o.value&&jo(!0,"v-stepper-item"),h(ut,{key:"stepper-avatar",class:"v-stepper-item__avatar",color:f?e.color:void 0,size:24},{default:()=>{var x;return[((x=n.icon)==null?void 0:x.call(n,d.value))??(c.value?h(J,{icon:c.value},null):s.value)]}}),h("div",{class:"v-stepper-item__content"},[p&&h("div",{key:"title",class:"v-stepper-item__title"},[((y=n.title)==null?void 0:y.call(n,d.value))??e.title]),g&&h("div",{key:"subtitle",class:"v-stepper-item__subtitle"},[((_=n.subtitle)==null?void 0:_.call(n,d.value))??e.subtitle]),(b=n.default)==null?void 0:b.call(n,d.value)])]),[[hr("ripple"),e.ripple&&e.editable,null]])}),{}}}),S9=e=>{const{touchstartX:t,touchendX:n,touchstartY:r,touchendY:s}=e,i=.5,o=16;e.offsetX=n-t,e.offsetY=s-r,Math.abs(e.offsetY)<i*Math.abs(e.offsetX)&&(e.left&&n<t-o&&e.left(e),e.right&&n>t+o&&e.right(e)),Math.abs(e.offsetX)<i*Math.abs(e.offsetY)&&(e.up&&s<r-o&&e.up(e),e.down&&s>r+o&&e.down(e))};function k9(e,t){var r;const n=e.changedTouches[0];t.touchstartX=n.clientX,t.touchstartY=n.clientY,(r=t.start)==null||r.call(t,{originalEvent:e,...t})}function x9(e,t){var r;const n=e.changedTouches[0];t.touchendX=n.clientX,t.touchendY=n.clientY,(r=t.end)==null||r.call(t,{originalEvent:e,...t}),S9(t)}function E9(e,t){var r;const n=e.changedTouches[0];t.touchmoveX=n.clientX,t.touchmoveY=n.clientY,(r=t.move)==null||r.call(t,{originalEvent:e,...t})}function C9(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t={touchstartX:0,touchstartY:0,touchendX:0,touchendY:0,touchmoveX:0,touchmoveY:0,offsetX:0,offsetY:0,left:e.left,right:e.right,up:e.up,down:e.down,start:e.start,move:e.move,end:e.end};return{touchstart:n=>k9(n,t),touchend:n=>x9(n,t),touchmove:n=>E9(n,t)}}function T9(e,t){var a;const n=t.value,r=n!=null&&n.parent?e.parentElement:e,s=(n==null?void 0:n.options)??{passive:!0},i=(a=t.instance)==null?void 0:a.$.uid;if(!r||!i)return;const o=C9(t.value);r._touchHandlers=r._touchHandlers??Object.create(null),r._touchHandlers[i]=o,OT(o).forEach(l=>{r.addEventListener(l,o[l],s)})}function P9(e,t){var i,o;const n=(i=t.value)!=null&&i.parent?e.parentElement:e,r=(o=t.instance)==null?void 0:o.$.uid;if(!(n!=null&&n._touchHandlers)||!r)return;const s=n._touchHandlers[r];OT(s).forEach(a=>{n.removeEventListener(a,s[a])}),delete n._touchHandlers[r]}const CO={mounted:T9,unmounted:P9},TO=Symbol.for("vuetify:v-window"),PO=Symbol.for("vuetify:v-window-group"),RO=de({continuous:Boolean,nextIcon:{type:[Boolean,String,Function,Object],default:"$next"},prevIcon:{type:[Boolean,String,Function,Object],default:"$prev"},reverse:Boolean,showArrows:{type:[Boolean,String],validator:e=>typeof e=="boolean"||e==="hover"},touch:{type:[Object,Boolean],default:void 0},direction:{type:String,default:"horizontal"},modelValue:null,disabled:Boolean,selectedClass:{type:String,default:"v-window-item--active"},mandatory:{type:[Boolean,String],default:"force"},...Ue(),..._t(),...Lt()},"VWindow"),Ek=ke()({name:"VWindow",directives:{Touch:CO},props:RO(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{themeClasses:r}=Zt(e),{isRtl:s}=Dr(),{t:i}=Gr(),o=xu(e,PO),a=j(),l=A(()=>s.value?!e.reverse:e.reverse),u=Ie(!1),c=A(()=>{const C=e.direction==="vertical"?"y":"x",T=(l.value?!u.value:u.value)?"-reverse":"";return`v-window-${C}${T}-transition`}),d=Ie(0),f=j(void 0),p=A(()=>o.items.value.findIndex(C=>o.selected.value.includes(C.id)));Ee(p,(C,S)=>{const T=o.items.value.length,P=T-1;T<=2?u.value=C<S:C===P&&S===0?u.value=!0:C===0&&S===P?u.value=!1:u.value=C<S}),Kt(TO,{transition:c,isReversed:u,transitionCount:d,transitionHeight:f,rootRef:a});const g=ae(()=>e.continuous||p.value!==0),m=ae(()=>e.continuous||p.value!==o.items.value.length-1);function y(){g.value&&o.prev()}function _(){m.value&&o.next()}const b=A(()=>{const C=[],S={icon:s.value?e.nextIcon:e.prevIcon,class:`v-window__${l.value?"right":"left"}`,onClick:o.prev,"aria-label":i("$vuetify.carousel.prev")};C.push(g.value?n.prev?n.prev({props:S}):h(re,S,null):h("div",null,null));const T={icon:s.value?e.prevIcon:e.nextIcon,class:`v-window__${l.value?"left":"right"}`,onClick:o.next,"aria-label":i("$vuetify.carousel.next")};return C.push(m.value?n.next?n.next({props:T}):h(re,T,null):h("div",null,null)),C}),x=A(()=>e.touch===!1?e.touch:{...{left:()=>{l.value?y():_()},right:()=>{l.value?_():y()},start:S=>{let{originalEvent:T}=S;T.stopPropagation()}},...e.touch===!0?{}:e.touch});return Oe(()=>Nt(h(e.tag,{ref:a,class:["v-window",{"v-window--show-arrows-on-hover":e.showArrows==="hover"},r.value,e.class],style:e.style},{default:()=>{var C,S;return[h("div",{class:"v-window__container",style:{height:f.value}},[(C=n.default)==null?void 0:C.call(n,{group:o}),e.showArrows!==!1&&h("div",{class:"v-window__controls"},[b.value])]),(S=n.additional)==null?void 0:S.call(n,{group:o})]}}),[[hr("touch"),x.value]])),{group:o}}}),R9=de({...Ms(RO(),["continuous","nextIcon","prevIcon","showArrows","touch","mandatory"])},"VStepperWindow"),IO=ke()({name:"VStepperWindow",props:R9(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=Qe(Z_,null),s=it(e,"modelValue"),i=A({get(){var o;return s.value!=null||!r?s.value:(o=r.items.value.find(a=>r.selected.value.includes(a.id)))==null?void 0:o.value},set(o){s.value=o}});return Oe(()=>{const o=Ek.filterProps(e);return h(Ek,ge({_as:"VStepperWindow"},o,{modelValue:i.value,"onUpdate:modelValue":a=>i.value=a,class:["v-stepper-window",e.class],style:e.style,mandatory:!1,touch:!1}),n)}),{}}}),AO=de({reverseTransition:{type:[Boolean,String],default:void 0},transition:{type:[Boolean,String],default:void 0},...Ue(),...Cd(),...xP()},"VWindowItem"),Ck=ke()({name:"VWindowItem",directives:{Touch:CO},props:AO(),emits:{"group:selected":e=>!0},setup(e,t){let{slots:n}=t;const r=Qe(TO),s=Td(e,PO),{isBooted:i}=jd();if(!r||!s)throw new Error("[Vuetify] VWindowItem must be used inside VWindow");const o=Ie(!1),a=A(()=>i.value&&(r.isReversed.value?e.reverseTransition!==!1:e.transition!==!1));function l(){!o.value||!r||(o.value=!1,r.transitionCount.value>0&&(r.transitionCount.value-=1,r.transitionCount.value===0&&(r.transitionHeight.value=void 0)))}function u(){var g;o.value||!r||(o.value=!0,r.transitionCount.value===0&&(r.transitionHeight.value=Ne((g=r.rootRef.value)==null?void 0:g.clientHeight)),r.transitionCount.value+=1)}function c(){l()}function d(g){o.value&&Mt(()=>{!a.value||!o.value||!r||(r.transitionHeight.value=Ne(g.clientHeight))})}const f=A(()=>{const g=r.isReversed.value?e.reverseTransition:e.transition;return a.value?{name:typeof g!="string"?r.transition.value:g,onBeforeEnter:u,onAfterEnter:l,onEnterCancelled:c,onBeforeLeave:u,onAfterLeave:l,onLeaveCancelled:c,onEnter:d}:!1}),{hasContent:p}=EP(e,s.isSelected);return Oe(()=>h(si,{transition:f.value,disabled:!i.value},{default:()=>{var g;return[Nt(h("div",{class:["v-window-item",s.selectedClass.value,e.class],style:e.style},[p.value&&((g=n.default)==null?void 0:g.call(n))]),[[Qi,s.isSelected.value]])]}})),{groupItem:s}}}),I9=de({...AO()},"VStepperWindowItem"),dh=ke()({name:"VStepperWindowItem",props:I9(),setup(e,t){let{slots:n}=t;return Oe(()=>{const r=Ck.filterProps(e);return h(Ck,ge({_as:"VStepperWindowItem"},r,{class:["v-stepper-window-item",e.class],style:e.style}),n)}),{}}}),OO=de({color:String,...vs(),...Ue(),...Or(),...bs(),...qo(),...Cu(),...Dn(),..._t(),...Lt()},"VSheet"),fp=ke()({name:"VSheet",props:OO(),setup(e,t){let{slots:n}=t;const{themeClasses:r}=Zt(e),{backgroundColorClasses:s,backgroundColorStyles:i}=fr(()=>e.color),{borderClasses:o}=Ds(e),{dimensionStyles:a}=Mr(e),{elevationClasses:l}=Ls(e),{locationStyles:u}=Za(e),{positionClasses:c}=Tu(e),{roundedClasses:d}=jn(e);return Oe(()=>h(e.tag,{class:["v-sheet",r.value,s.value,o.value,l.value,c.value,d.value,e.class],style:[i.value,a.value,u.value,e.style]},n)),{}}}),A9=de({altLabels:Boolean,bgColor:String,completeIcon:He,editIcon:He,editable:Boolean,errorIcon:He,hideActions:Boolean,items:{type:Array,default:()=>[]},itemTitle:{type:String,default:"title"},itemValue:{type:String,default:"value"},nonLinear:Boolean,flat:Boolean,...el()},"Stepper"),O9=de({...A9(),...Ed({mandatory:"force",selectedClass:"v-stepper-item--selected"}),...OO(),...xd(EO(),["prevText","nextText"])},"VStepper"),MO=ke()({name:"VStepper",props:O9(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{items:r,next:s,prev:i,selected:o}=xu(e,Z_),{displayClasses:a,mobile:l}=fi(e),{completeIcon:u,editIcon:c,errorIcon:d,color:f,editable:p,prevText:g,nextText:m}=Xa(e),y=A(()=>e.items.map((x,C)=>{const S=Vn(x,e.itemTitle,x),T=Vn(x,e.itemValue,C+1);return{title:S,value:T,raw:x}})),_=A(()=>r.value.findIndex(x=>o.value.includes(x.id))),b=A(()=>e.disabled?e.disabled:_.value===0?"prev":_.value===r.value.length-1?"next":!1);return Ir({VStepperItem:{editable:p,errorIcon:d,completeIcon:u,editIcon:c,prevText:g,nextText:m},VStepperActions:{color:f,disabled:b,prevText:g,nextText:m}}),Oe(()=>{const x=fp.filterProps(e),C=!!(n.header||e.items.length),S=e.items.length>0,T=!e.hideActions&&!!(S||n.actions);return h(fp,ge(x,{color:e.bgColor,class:["v-stepper",{"v-stepper--alt-labels":e.altLabels,"v-stepper--flat":e.flat,"v-stepper--non-linear":e.nonLinear,"v-stepper--mobile":l.value},a.value,e.class],style:e.style}),{default:()=>{var P,w;return[C&&h(e0,{key:"stepper-header"},{default:()=>[y.value.map((E,I)=>{let{raw:O,...R}=E;return h(Ae,null,[!!I&&h(dn,null,null),h(ch,R,{default:n[`header-item.${R.value}`]??n.header,icon:n.icon,title:n.title,subtitle:n.subtitle})])})]}),S&&h(IO,{key:"stepper-window"},{default:()=>[y.value.map(E=>h(dh,{value:E.value},{default:()=>{var I,O;return((I=n[`item.${E.value}`])==null?void 0:I.call(n,E))??((O=n.item)==null?void 0:O.call(n,E))}}))]}),(P=n.default)==null?void 0:P.call(n,{prev:i,next:s}),T&&(((w=n.actions)==null?void 0:w.call(n,{next:s,prev:i}))??h(b9,{key:"stepper-actions","onClick:prev":i,"onClick:next":s},n))]}})}),{prev:i,next:s}}}),M9={class:"my-3"},D9={key:0},L9={key:1},$9={class:"my-2"},F9={key:0},N9={class:"mr-4"},V9={class:"mr-4"},B9={class:"mr-4"},U9={class:"my-3"},z9={key:0,class:"mb-5 mt-10"},H9={key:1},j9={class:"ml-5 mt-2"},q9={key:0,class:"ml-5 mt-2"},W9=Le({__name:"OctoFarmImportDialog",setup(e){const t=j(),n=j(!1),r=j(!1),s=j(""),i=j(""),o=j(),a=j(0),l=j([]),u=j([]),c=j(!1),d=tn(nn.ImportOctoFarmDialog);function f(){}async function p(){}const g=async()=>{if(!o.value){n.value=!1;return}const C=JSON.parse(await o.value.text());if(!C||!Array.isArray(C))return[];if(!(C!=null&&C.length))return[];let S=C;C.length===1&&Array.isArray(C[0])&&(S=C[0]),S=S.map(w=>{var E,I;return w._id&&delete w._id,w.apikey&&(w.apiKey=w.apikey,delete w.apikey),w.settingsApperance&&(w.settingsAppearance=w.settingsApperance,delete w.settingsApperance),(E=w.settingsAppearance)!=null&&E.name?(w.name=(I=w.settingsAppearance)==null?void 0:I.name,delete w.settingsAppearance):w.name=w.printerURL,{enabled:!w.disabled,apiKey:w.apiKey,printerURL:w.printerURL,name:w.name}});let T=!1;const P=[];s.value="",i.value="";for(const w of S){const E=Object.keys(w);E.includes("enabled")&&(w.enabled===!1||w.enabled===!0)&&E.includes("apiKey")&&w.apiKey.length&&E.includes("printerURL")&&w.printerURL.length&&E.includes("name")&&w.name||(P.push(w.name||w.printerURL||"No name known for printer"),T||(T=!0))}return n.value=!T,T&&(s.value="Imported file failed the validation step",i.value="These printers failed validation: "+P.join(", ")),S},m=async()=>{const C=await g();C!=null&&C.length&&(u.value=[...Array(C.length)].map((S,T)=>T),l.value=C||[],t.value=2)},y=()=>{u.value.length?u.value=[]:u.value=[...Array(l.value.length)].map((S,T)=>T)},_=async()=>{var C;a.value=((C=await g())==null?void 0:C.length)||0},b=async()=>{t.value=3;const C=l.value.filter((S,T)=>u.value.includes(T));if(C!=null&&C.length)try{await Qt.batchImportPrinters(C),c.value=!0}catch(S){c.value=!1,o.value=void 0,s.value="An error occurred",i.value=S.message.toString()}},x=()=>{o.value=void 0,d.closeDialog(),t.value=1};return(C,S)=>{const T=In("v-subheader"),P=In("v-list-item-content"),w=In("v-list-item-group"),E=hi;return $(),te(E,{id:X(d).dialogId,"max-width":"700px",onBeforeOpened:S[8]||(S[8]=I=>void 0),onEscape:S[9]||(S[9]=I=>x()),onOpened:S[10]||(S[10]=I=>p())},{default:v(()=>[h(yt,{class:"pa-4"},{default:v(()=>[h(sn,null,{default:v(()=>S[11]||(S[11]=[L("span",{class:"text-h5"}," Import OctoFarm Printers ",-1)])),_:1,__:[11]}),h(en,null,{default:v(()=>[h(rt,null,{default:v(()=>[h(ze,{cols:"12"},{default:v(()=>[h(MO,{modelValue:X(t),"onUpdate:modelValue":S[6]||(S[6]=I=>et(t)?t.value=I:null),"non-linear":""},{default:v(()=>[h(e0,null,{default:v(()=>[h(ch,{complete:X(t)>1,value:"1",editable:""},{default:v(()=>S[12]||(S[12]=[k(" Export PrintersDB from OctoFarm ")])),_:1,__:[12]},8,["complete"]),h(ch,{complete:X(t)>2,value:"2",editable:""},{default:v(()=>S[13]||(S[13]=[k(" Show printers & decide ")])),_:1,__:[13]},8,["complete"]),h(ch,{complete:X(t)>3,value:"3",editable:""},{default:v(()=>S[14]||(S[14]=[k(" Import printers into FDM Monster ")])),_:1,__:[14]},8,["complete"])]),_:1}),h(IO,null,{default:v(()=>[h(dh,{value:"1"},{default:v(()=>[h(SO,{class:"mt-2",style:{"max-width":"400px"},modelValue:X(o),"onUpdate:modelValue":S[0]||(S[0]=I=>et(o)?o.value=I:null),filled:"",accept:".json",clearable:"",label:"Upload PrintersDB.json file",onChange:S[1]||(S[1]=I=>_())},null,8,["modelValue"]),L("ol",null,[L("li",null,[L("h4",null,[h(J,null,{default:v(()=>S[15]||(S[15]=[k("navigation")])),_:1,__:[15]}),S[16]||(S[16]=k(" Go to your OctoFarm System page "))])]),L("li",null,[L("h4",null,[h(J,null,{default:v(()=>S[17]||(S[17]=[k("mouse")])),_:1,__:[17]}),S[18]||(S[18]=k(" Click 'Database' "))])]),L("li",null,[L("h4",null,[h(J,null,{default:v(()=>S[19]||(S[19]=[k("mouse")])),_:1,__:[19]}),S[20]||(S[20]=k(" Click the button 'Export Printers' "))])]),L("li",null,[L("h4",null,[h(J,null,{default:v(()=>S[21]||(S[21]=[k("upload")])),_:1,__:[21]}),S[22]||(S[22]=k(" Upload 'PrintersDB.json' above "))])])]),L("div",M9,[h(J,{class:"pr-2"},{default:v(()=>S[23]||(S[23]=[k("info")])),_:1,__:[23]}),S[25]||(S[25]=k(' OctoFarm printers should be exported as a JSON file. Please upload the correct "PrintersDB.json" database file using the steps provided. ')),h(re,{small:"",class:"ml-2",color:"success",onClick:S[2]||(S[2]=I=>r.value=!X(r))},{default:v(()=>[h(J,{class:"pr-2"},{default:v(()=>S[24]||(S[24]=[k("gif")])),_:1,__:[24]}),X(r)?($(),ve("span",L9,"Hide GIF")):($(),ve("span",D9,"Show GIF"))]),_:1})]),X(r)?($(),te(ds,{key:0,class:"my-4",src:X(y9),style:{border:"3px solid dimgray","max-width":"800px"},elevation:"10"},null,8,["src"])):pe("",!0),S[27]||(S[27]=L("br",null,null,-1)),h(re,{color:"primary",onClick:S[3]||(S[3]=I=>m()),disabled:!X(o)},{default:v(()=>S[26]||(S[26]=[k(" Validate ")])),_:1,__:[26]},8,["disabled"])]),_:1,__:[27]}),h(dh,{value:"2"},{default:v(()=>{var I;return[L("div",$9,[h(J,{class:"pr-2"},{default:v(()=>S[28]||(S[28]=[k("info")])),_:1,__:[28]}),k(" Import state: "+se(X(n)?"success":"failed")+" - "+se(X(a))+" printer(s) found ",1)]),X(s)?($(),te(fn,{key:0,class:"my-2",type:"error"},{default:v(()=>{var O,R;return[k(se(X(s))+" ",1),S[29]||(S[29]=L("br",null,null,-1)),k(" Details: "+se((O=X(i))==null?void 0:O.slice(0,75))+" ",1),((R=X(i))==null?void 0:R.length)>75?($(),ve("span",F9,"...")):pe("",!0)]}),_:1,__:[29]})):pe("",!0),h(dn,{class:"mt-2"}),h(Bt,{"two-line":"",flat:"",subheader:"",dense:"",class:"mt-2"},{default:v(()=>[h(T,null,{default:v(()=>S[30]||(S[30]=[k("Found printers")])),_:1,__:[30]}),h(w,{modelValue:X(u),"onUpdate:modelValue":S[4]||(S[4]=O=>et(u)?u.value=O:null),multiple:""},{default:v(()=>[($(!0),ve(Ae,null,Gt(X(l),O=>($(),te(Ve,{dense:"",key:O.name,title:O.name},{default:v(({isActive:R})=>[h(pu,null,{default:v(()=>[h(mn,{"input-value":R},null,8,["input-value"])]),_:2},1024),h(P,null,{default:v(()=>[h(ct,null,{default:v(()=>[k(se(O.name),1)]),_:2},1024),h(vt,null,{default:v(()=>[L("span",N9,"URL: "+se(O.printerURL),1),L("span",V9,"Enabled: "+se(O.enabled),1),L("span",B9,"API Key: "+se(O.apiKey),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["title"]))),128))]),_:1},8,["modelValue"]),h(T,null,{default:v(()=>[h(re,{onClick:y,class:"my-2",small:""},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>S[31]||(S[31]=[k("check")])),_:1,__:[31]}),S[32]||(S[32]=k(" Toggle selection "))]),_:1,__:[32]})]),_:1})]),_:1}),L("div",U9,[h(J,{class:"pr-2"},{default:v(()=>S[33]||(S[33]=[k("info")])),_:1,__:[33]}),S[34]||(S[34]=k(" At this moment, the following properties will be imported: enabled, name, printerURL and apiKey "))]),h(re,{class:"my-2",color:"primary",onClick:S[5]||(S[5]=O=>b()),disabled:!((I=X(u))!=null&&I.length)},{default:v(()=>{var O;return[k(" Submit "+se((O=X(u))==null?void 0:O.length)+" printers ",1)]}),_:1},8,["disabled"])]}),_:1}),h(dh,{value:"3"},{default:v(()=>{var I,O;return[X(c)?($(),ve("div",z9,[h(J,{size:"100",class:"mr-5",color:"green circle"},{default:v(()=>S[35]||(S[35]=[k("check_circle")])),_:1,__:[35]}),S[36]||(S[36]=k(" Import Completed "))])):($(),ve("div",H9,[h(J,{size:"100",class:"mr-5",color:"red circle"},{default:v(()=>S[37]||(S[37]=[k("error")])),_:1,__:[37]}),k(" Something went wrong: "+se(X(s))+" ",1),S[38]||(S[38]=L("br",null,null,-1)),L("span",j9," Details: "+se((I=X(i))==null?void 0:I.slice(0,75)),1),((O=X(i))==null?void 0:O.length)>75?($(),ve("span",q9,"...")):pe("",!0)]))]}),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1}),h(re,{class:"mt-2"},{default:v(()=>S[39]||(S[39]=[k(" Validate printers ")])),_:1,__:[39]})]),_:1}),h(Mn,null,{default:v(()=>[h(wn),h(re,{onClick:S[7]||(S[7]=I=>x())},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>S[40]||(S[40]=[k("close")])),_:1,__:[40]}),S[41]||(S[41]=k(" Close "))]),_:1,__:[41]})]),_:1})]),_:1})]),_:1},8,["id"])}}}),G9=de({id:String,submenu:Boolean,...Ms(Id({closeDelay:250,closeOnContentClick:!0,locationStrategy:"connected",location:void 0,openDelay:300,scrim:!1,scrollStrategy:"reposition",transition:{component:n_}}),["absolute"])},"VMenu"),Pm=ke()({name:"VMenu",props:G9(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=it(e,"modelValue"),{scopeId:s}=Ru(),{isRtl:i}=Dr(),o=ms(),a=ae(()=>e.id||`v-menu-${o}`),l=j(),u=Qe(Wv,null),c=Ie(new Set);Kt(Wv,{register(){c.value.add(o)},unregister(){c.value.delete(o)},closeParents(y){setTimeout(()=>{var _;!c.value.size&&!e.persistent&&(y==null||(_=l.value)!=null&&_.contentEl&&!z$(y,l.value.contentEl))&&(r.value=!1,u==null||u.closeParents())},40)}}),Cn(()=>{u==null||u.unregister(),document.removeEventListener("focusin",d)}),$b(()=>r.value=!1);async function d(y){var x,C,S;const _=y.relatedTarget,b=y.target;await Mt(),r.value&&_!==b&&((x=l.value)!=null&&x.contentEl)&&((C=l.value)!=null&&C.globalTop)&&![document,l.value.contentEl].includes(b)&&!l.value.contentEl.contains(b)&&((S=qc(l.value.contentEl)[0])==null||S.focus())}Ee(r,y=>{y?(u==null||u.register(),Et&&document.addEventListener("focusin",d,{once:!0})):(u==null||u.unregister(),Et&&document.removeEventListener("focusin",d))},{immediate:!0});function f(y){u==null||u.closeParents(y)}function p(y){var _,b,x,C,S;if(!e.disabled)if(y.key==="Tab"||y.key==="Enter"&&!e.closeOnContentClick){if(y.key==="Enter"&&(y.target instanceof HTMLTextAreaElement||y.target instanceof HTMLInputElement&&y.target.closest("form")))return;y.key==="Enter"&&y.preventDefault(),FT(qc((_=l.value)==null?void 0:_.contentEl,!1),y.shiftKey?"prev":"next",P=>P.tabIndex>=0)||(r.value=!1,(x=(b=l.value)==null?void 0:b.activatorEl)==null||x.focus())}else e.submenu&&y.key===(i.value?"ArrowRight":"ArrowLeft")&&(r.value=!1,(S=(C=l.value)==null?void 0:C.activatorEl)==null||S.focus())}function g(y){var b;if(e.disabled)return;const _=(b=l.value)==null?void 0:b.contentEl;_&&r.value?y.key==="ArrowDown"?(y.preventDefault(),y.stopImmediatePropagation(),Ec(_,"next")):y.key==="ArrowUp"?(y.preventDefault(),y.stopImmediatePropagation(),Ec(_,"prev")):e.submenu&&(y.key===(i.value?"ArrowRight":"ArrowLeft")?r.value=!1:y.key===(i.value?"ArrowLeft":"ArrowRight")&&(y.preventDefault(),Ec(_,"first"))):(e.submenu?y.key===(i.value?"ArrowLeft":"ArrowRight"):["ArrowDown","ArrowUp"].includes(y.key))&&(r.value=!0,y.preventDefault(),setTimeout(()=>setTimeout(()=>g(y))))}const m=A(()=>ge({"aria-haspopup":"menu","aria-expanded":String(r.value),"aria-controls":a.value,onKeydown:g},e.activatorProps));return Oe(()=>{const y=Ui.filterProps(e);return h(Ui,ge({ref:l,id:a.value,class:["v-menu",e.class],style:e.style},y,{modelValue:r.value,"onUpdate:modelValue":_=>r.value=_,absolute:!0,activatorProps:m.value,location:e.location??(e.submenu?"end":"bottom"),"onClick:outside":f,onKeydown:p},s),{activator:n.activator,default:function(){for(var _=arguments.length,b=new Array(_),x=0;x<_;x++)b[x]=arguments[x];return h(Ot,{root:"VMenu"},{default:()=>{var C;return[(C=n.default)==null?void 0:C.call(n,...b)]}})}})}),Ji({id:a,ΨopenChildren:c},l)}}),K9=de({renderless:Boolean,...Ue()},"VVirtualScrollItem"),Y9=ke()({name:"VVirtualScrollItem",inheritAttrs:!1,props:K9(),emits:{"update:height":e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const{resizeRef:i,contentRect:o}=Va(void 0,"border");Ee(()=>{var a;return(a=o.value)==null?void 0:a.height},a=>{a!=null&&r("update:height",a)}),Oe(()=>{var a,l;return e.renderless?h(Ae,null,[(a=s.default)==null?void 0:a.call(s,{itemRef:i})]):h("div",ge({ref:i,class:["v-virtual-scroll__item",e.class],style:e.style},n),[(l=s.default)==null?void 0:l.call(s)])})}}),X9=-1,Q9=1,zg=100,J9=de({itemHeight:{type:[Number,String],default:null},itemKey:{type:[String,Array,Function],default:null},height:[Number,String]},"virtual");function Z9(e,t){const n=fi(),r=Ie(0);On(()=>{r.value=parseFloat(e.itemHeight||0)});const s=Ie(0),i=Ie(Math.ceil((parseInt(e.height)||n.height.value)/(r.value||16))||1),o=Ie(0),a=Ie(0),l=j(),u=j();let c=0;const{resizeRef:d,contentRect:f}=Va();On(()=>{d.value=l.value});const p=A(()=>{var V;return l.value===document.documentElement?n.height.value:((V=f.value)==null?void 0:V.height)||parseInt(e.height)||0}),g=A(()=>!!(l.value&&u.value&&p.value&&r.value));let m=Array.from({length:t.value.length}),y=Array.from({length:t.value.length});const _=Ie(0);let b=-1;function x(V){return m[V]||r.value}const C=V$(()=>{const V=performance.now();y[0]=0;const ee=t.value.length;for(let q=1;q<=ee-1;q++)y[q]=(y[q-1]||0)+x(q-1);_.value=Math.max(_.value,performance.now()-V)},_),S=Ee(g,V=>{V&&(S(),c=u.value.offsetTop,C.immediate(),U(),~b&&Mt(()=>{Et&&window.requestAnimationFrame(()=>{Q(b),b=-1})}))});yn(()=>{C.clear()});function T(V,ee){const q=m[V],G=r.value;r.value=G?Math.min(r.value,ee):ee,(q!==ee||G!==r.value)&&(m[V]=ee,C())}function P(V){return V=Cr(V,0,t.value.length-1),y[V]||0}function w(V){return eG(y,V)}let E=0,I=0,O=0;Ee(p,(V,ee)=>{ee&&(U(),V<ee&&requestAnimationFrame(()=>{I=0,U()}))});let R=-1;function M(){if(!l.value||!u.value)return;const V=l.value.scrollTop,ee=performance.now();ee-O>500?(I=Math.sign(V-E),c=u.value.offsetTop):I=V-E,E=V,O=ee,window.clearTimeout(R),R=window.setTimeout(D,500),U()}function D(){!l.value||!u.value||(I=0,O=0,window.clearTimeout(R),U())}let F=-1;function U(){cancelAnimationFrame(F),F=requestAnimationFrame(K)}function K(){if(!l.value||!p.value)return;const V=E-c,ee=Math.sign(I),q=Math.max(0,V-zg),G=Cr(w(q),0,t.value.length),le=V+p.value+zg,ie=Cr(w(le)+1,G+1,t.value.length);if((ee!==X9||G<s.value)&&(ee!==Q9||ie>i.value)){const we=P(s.value)-P(G),Z=P(ie)-P(i.value);Math.max(we,Z)>zg?(s.value=G,i.value=ie):(G<=0&&(s.value=G),ie>=t.value.length&&(i.value=ie))}o.value=P(s.value),a.value=P(t.value.length)-P(i.value)}function Q(V){const ee=P(V);!l.value||V&&!ee?b=V:l.value.scrollTop=ee}const H=A(()=>t.value.slice(s.value,i.value).map((V,ee)=>{const q=ee+s.value;return{raw:V,index:q,key:Vn(V,e.itemKey,q)}}));return Ee(t,()=>{m=Array.from({length:t.value.length}),y=Array.from({length:t.value.length}),C.immediate(),U()},{deep:1}),{calculateVisibleItems:U,containerRef:l,markerRef:u,computedItems:H,paddingTop:o,paddingBottom:a,scrollToIndex:Q,handleScroll:M,handleScrollend:D,handleItemResize:T}}function eG(e,t){let n=e.length-1,r=0,s=0,i=null,o=-1;if(e[n]<t)return n;for(;r<=n;)if(s=r+n>>1,i=e[s],i>t)n=s-1;else if(i<t)o=s,r=s+1;else return i===t?s:r;return o}const tG=de({items:{type:Array,default:()=>[]},renderless:Boolean,...J9(),...Ue(),...Or()},"VVirtualScroll"),nG=ke()({name:"VVirtualScroll",props:tG(),setup(e,t){let{slots:n}=t;const r=an("VVirtualScroll"),{dimensionStyles:s}=Mr(e),{calculateVisibleItems:i,containerRef:o,markerRef:a,handleScroll:l,handleScrollend:u,handleItemResize:c,scrollToIndex:d,paddingTop:f,paddingBottom:p,computedItems:g}=Z9(e,ae(()=>e.items));return Hr(()=>e.renderless,()=>{function m(){var b,x;const _=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)?"addEventListener":"removeEventListener";o.value===document.documentElement?(document[_]("scroll",l,{passive:!0}),document[_]("scrollend",u)):((b=o.value)==null||b[_]("scroll",l,{passive:!0}),(x=o.value)==null||x[_]("scrollend",u))}bt(()=>{o.value=KT(r.vnode.el,!0),m(!0)}),yn(m)}),Oe(()=>{const m=g.value.map(y=>h(Y9,{key:y.key,renderless:e.renderless,"onUpdate:height":_=>c(y.index,_)},{default:_=>{var b;return(b=n.default)==null?void 0:b.call(n,{item:y.raw,index:y.index,..._})}}));return e.renderless?h(Ae,null,[h("div",{ref:a,class:"v-virtual-scroll__spacer",style:{paddingTop:Ne(f.value)}},null),m,h("div",{class:"v-virtual-scroll__spacer",style:{paddingBottom:Ne(p.value)}},null)]):h("div",{ref:o,class:["v-virtual-scroll",e.class],onScrollPassive:l,onScrollend:u,style:[s.value,e.style]},[h("div",{ref:a,class:"v-virtual-scroll__container",style:{paddingTop:Ne(f.value),paddingBottom:Ne(p.value)}},[m])])}),{calculateVisibleItems:i,scrollToIndex:d}}});function rG(e,t){const n=Ie(!1);let r;function s(a){cancelAnimationFrame(r),n.value=!0,r=requestAnimationFrame(()=>{r=requestAnimationFrame(()=>{n.value=!1})})}async function i(){await new Promise(a=>requestAnimationFrame(a)),await new Promise(a=>requestAnimationFrame(a)),await new Promise(a=>requestAnimationFrame(a)),await new Promise(a=>{if(n.value){const l=Ee(n,()=>{l(),a()})}else a()})}async function o(a){var c,d;if(a.key==="Tab"&&((c=t.value)==null||c.focus()),!["PageDown","PageUp","Home","End"].includes(a.key))return;const l=(d=e.value)==null?void 0:d.$el;if(!l)return;(a.key==="Home"||a.key==="End")&&l.scrollTo({top:a.key==="Home"?0:l.scrollHeight,behavior:"smooth"}),await i();const u=l.querySelectorAll(":scope > :not(.v-virtual-scroll__spacer)");if(a.key==="PageDown"||a.key==="Home"){const f=l.getBoundingClientRect().top;for(const p of u)if(p.getBoundingClientRect().top>=f){p.focus();break}}else{const f=l.getBoundingClientRect().bottom;for(const p of[...u].reverse())if(p.getBoundingClientRect().bottom<=f){p.focus();break}}}return{onScrollPassive:s,onKeydown:o}}const sG=de({chips:Boolean,closableChips:Boolean,closeText:{type:String,default:"$vuetify.close"},openText:{type:String,default:"$vuetify.open"},eager:Boolean,hideNoData:Boolean,hideSelected:Boolean,listProps:{type:Object},menu:Boolean,menuIcon:{type:He,default:"$dropdown"},menuProps:{type:Object},multiple:Boolean,noDataText:{type:String,default:"$vuetify.noDataText"},openOnClear:Boolean,itemColor:String,...tO({itemChildren:!1})},"Select"),iG=de({...sG(),...Ms(bO({modelValue:null,role:"combobox"}),["validationValue","dirty","appendInnerIcon"]),...Iu({transition:{component:n_}})},"VSelect"),Vo=ke()({name:"VSelect",props:iG(),emits:{"update:focused":e=>!0,"update:modelValue":e=>!0,"update:menu":e=>!0},setup(e,t){let{slots:n}=t;const{t:r}=Gr(),s=j(),i=j(),o=j(),{items:a,transformIn:l,transformOut:u}=CW(e),c=it(e,"modelValue",[],H=>l(H===null?[null]:An(H)),H=>{const V=u(H);return e.multiple?V:V[0]??null}),d=A(()=>typeof e.counterValue=="function"?e.counterValue(c.value):typeof e.counterValue=="number"?e.counterValue:c.value.length),f=yO(e),p=A(()=>c.value.map(H=>H.value)),g=Ie(!1);let m="",y;const _=A(()=>e.hideSelected?a.value.filter(H=>!c.value.some(V=>(e.valueComparator||as)(V,H))):a.value),b=A(()=>e.hideNoData&&!_.value.length||f.isReadonly.value||f.isDisabled.value),x=it(e,"menu"),C=A({get:()=>x.value,set:H=>{var V;x.value&&!H&&((V=i.value)!=null&&V.ΨopenChildren.size)||H&&b.value||(x.value=H)}}),S=ae(()=>C.value?e.closeText:e.openText),T=A(()=>{var H;return{...e.menuProps,activatorProps:{...((H=e.menuProps)==null?void 0:H.activatorProps)||{},"aria-haspopup":"listbox"}}}),P=j(),w=rG(P,s);function E(H){e.openOnClear&&(C.value=!0)}function I(){b.value||(C.value=!C.value)}function O(H){H1(H)&&R(H)}function R(H){var G,le;if(!H.key||f.isReadonly.value)return;["Enter"," ","ArrowDown","ArrowUp","Home","End"].includes(H.key)&&H.preventDefault(),["Enter","ArrowDown"," "].includes(H.key)&&(C.value=!0),["Escape","Tab"].includes(H.key)&&(C.value=!1),H.key==="Home"?(G=P.value)==null||G.focus("first"):H.key==="End"&&((le=P.value)==null||le.focus("last"));const V=1e3;if(!H1(H))return;const ee=performance.now();ee-y>V&&(m=""),m+=H.key.toLowerCase(),y=ee;const q=a.value.find(ie=>ie.title.toLowerCase().startsWith(m));if(q!==void 0){c.value=[q];const ie=_.value.indexOf(q);Et&&window.requestAnimationFrame(()=>{var we;ie>=0&&((we=o.value)==null||we.scrollToIndex(ie))})}}function M(H){let V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!H.props.disabled)if(e.multiple){const ee=c.value.findIndex(G=>(e.valueComparator||as)(G.value,H.value)),q=V??!~ee;if(~ee){const G=q?[...c.value,H]:[...c.value];G.splice(ee,1),c.value=G}else q&&(c.value=[...c.value,H])}else{const ee=V!==!1;c.value=ee?[H]:[],Mt(()=>{C.value=!1})}}function D(H){var V;(V=P.value)!=null&&V.$el.contains(H.relatedTarget)||(C.value=!1)}function F(){var H;e.eager&&((H=o.value)==null||H.calculateVisibleItems())}function U(){var H;g.value&&((H=s.value)==null||H.focus())}function K(H){g.value=!0}function Q(H){if(H==null)c.value=[];else if($h(s.value,":autofill")||$h(s.value,":-webkit-autofill")){const V=a.value.find(ee=>ee.title===H);V&&M(V)}else s.value&&(s.value.value="")}return Ee(C,()=>{if(!e.hideSelected&&C.value&&c.value.length){const H=_.value.findIndex(V=>c.value.some(ee=>(e.valueComparator||as)(ee.value,V.value)));Et&&window.requestAnimationFrame(()=>{var V;H>=0&&((V=o.value)==null||V.scrollToIndex(H))})}}),Ee(()=>e.items,(H,V)=>{C.value||g.value&&!V.length&&H.length&&(C.value=!0)}),Oe(()=>{const H=!!(e.chips||n.chip),V=!!(!e.hideNoData||_.value.length||n["prepend-item"]||n["append-item"]||n["no-data"]),ee=c.value.length>0,q=st.filterProps(e),G=ee||!g.value&&e.label&&!e.persistentPlaceholder?void 0:e.placeholder;return h(st,ge({ref:s},q,{modelValue:c.value.map(le=>le.props.value).join(", "),"onUpdate:modelValue":Q,focused:g.value,"onUpdate:focused":le=>g.value=le,validationValue:c.externalValue,counterValue:d.value,dirty:ee,class:["v-select",{"v-select--active-menu":C.value,"v-select--chips":!!e.chips,[`v-select--${e.multiple?"multiple":"single"}`]:!0,"v-select--selected":c.value.length,"v-select--selection-slot":!!n.selection},e.class],style:e.style,inputmode:"none",placeholder:G,"onClick:clear":E,"onMousedown:control":I,onBlur:D,onKeydown:R,"aria-label":r(S.value),title:r(S.value)}),{...n,default:()=>h(Ae,null,[h(Pm,ge({ref:i,modelValue:C.value,"onUpdate:modelValue":le=>C.value=le,activator:"parent",contentClass:"v-select__content",disabled:b.value,eager:e.eager,maxHeight:310,openOnClick:!1,closeOnContentClick:!1,transition:e.transition,onAfterEnter:F,onAfterLeave:U},T.value),{default:()=>[V&&h(Bt,ge({ref:P,selected:p.value,selectStrategy:e.multiple?"independent":"single-independent",onMousedown:le=>le.preventDefault(),onKeydown:O,onFocusin:K,tabindex:"-1","aria-live":"polite","aria-label":`${e.label}-list`,color:e.itemColor??e.color},w,e.listProps),{default:()=>{var le,ie,we;return[(le=n["prepend-item"])==null?void 0:le.call(n),!_.value.length&&!e.hideNoData&&(((ie=n["no-data"])==null?void 0:ie.call(n))??h(Ve,{key:"no-data",title:r(e.noDataText)},null)),h(nG,{ref:o,renderless:!0,items:_.value,itemKey:"value"},{default:Z=>{var Fe;let{item:he,index:ne,itemRef:z}=Z;const xe=ge(he.props,{ref:z,key:he.value,onClick:()=>M(he,null)});return((Fe=n.item)==null?void 0:Fe.call(n,{item:he,index:ne,props:xe}))??h(Ve,ge(xe,{role:"option"}),{prepend:N=>{let{isSelected:B}=N;return h(Ae,null,[e.multiple&&!e.hideSelected?h(gu,{key:he.value,modelValue:B,ripple:!1,tabindex:"-1"},null):void 0,he.props.prependAvatar&&h(ut,{image:he.props.prependAvatar},null),he.props.prependIcon&&h(J,{icon:he.props.prependIcon},null)])}})}}),(we=n["append-item"])==null?void 0:we.call(n)]}})]}),c.value.map((le,ie)=>{function we(z){z.stopPropagation(),z.preventDefault(),M(le,!1)}const Z={"onClick:close":we,onKeydown(z){z.key!=="Enter"&&z.key!==" "||(z.preventDefault(),z.stopPropagation(),we(z))},onMousedown(z){z.preventDefault(),z.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0},he=H?!!n.chip:!!n.selection,ne=he?NT(H?n.chip({item:le,index:ie,props:Z}):n.selection({item:le,index:ie})):void 0;if(!(he&&!ne))return h("div",{key:le.value,class:"v-select__selection"},[H?n.chip?h(Ot,{key:"chip-defaults",defaults:{VChip:{closable:e.closableChips,size:"small",text:le.title}}},{default:()=>[ne]}):h(Sn,ge({key:"chip",closable:e.closableChips,size:"small",text:le.title,disabled:le.props.disabled},Z),null):ne??h("span",{class:"v-select__selection-text"},[le.title,e.multiple&&ie<c.value.length-1&&h("span",{class:"v-select__selection-comma"},[k(",")])])])})]),"append-inner":function(){var Z,he;for(var le=arguments.length,ie=new Array(le),we=0;we<le;we++)ie[we]=arguments[we];return h(Ae,null,[(Z=n["append-inner"])==null?void 0:Z.call(n,...ie),e.menuIcon?h(J,{class:"v-select__menu-icon",color:(he=s.value)==null?void 0:he.fieldIconColor,icon:e.menuIcon},null):void 0])}})}),Ji({isFocused:g,menu:C,select:M},s)}}),oG={class:"text-h5"},aG=Le({__name:"PrinterMaintenanceDialog",setup(e){const t=j([]),n=["Broken part","Blob","Maxtemp","Preheat error","Cable USB ","Bed thermal runaway","Thermistor Heatbed","Thermistor Heatblock","Thermal Runaway","Mintemp Nozzle","Mintemp Heatbed","Nozzle","Nozzle Clog","Fan Hotend","Fan Part cooling","Extruder rattle","Extruder","Z Axis","X Axis","Y Axis","Rented","Motherboard","Other","Clean"],r=j({}),s=Wt(),i=tn(nn.PrinterMaintenanceDialog),o=A(()=>s.maintenanceDialogPrinter),a=()=>{r.value.disabledReason=t.value.join(", ")},l=async()=>{var f;const c=(f=o.value)==null?void 0:f.id;if(!c){r.value={},u();return}const d=r.value.disabledReason;await Qt.updatePrinterMaintenance(c,d),r.value={},u()},u=()=>{t.value=[],i.closeDialog(),s.setMaintenanceDialogPrinter()};return(c,d)=>{const f=hi;return $(),te(f,{id:X(i).dialogId,"max-width":"700px",onEscape:d[5]||(d[5]=p=>u())},{default:v(()=>[h(yt,{class:"pa-4"},{default:v(()=>[h(sn,null,{default:v(()=>{var p;return[L("span",oG," Mark '"+se((p=o.value)==null?void 0:p.name)+"' for maintenance ",1)]}),_:1}),h(fn,{color:"secondary"},{default:v(()=>d[6]||(d[6]=[k(" Keep this info clear and stick to convention ")])),_:1,__:[6]}),h(en,null,{default:v(()=>[h(rt,null,{default:v(()=>[h(ze,{cols:"12"},{default:v(()=>[h(Vo,{modelValue:t.value,"onUpdate:modelValue":[d[0]||(d[0]=p=>t.value=p),d[1]||(d[1]=p=>a())],chips:!0,items:n,"menu-props":{closeOnBack:!0,closeOnContentClick:!0},clearable:"",color:"primary",multiple:"",placeholder:"Quick select reason"},null,8,["modelValue"]),h(xO,{modelValue:r.value.disabledReason,"onUpdate:modelValue":d[2]||(d[2]=p=>r.value.disabledReason=p),"data-vv-validate-on":"change|blur"},{label:v(()=>d[7]||(d[7]=[L("div",null,"Type the reason*",-1)])),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),h(Mn,null,{default:v(()=>[d[10]||(d[10]=L("em",{class:"text-red"}," * indicates required field ",-1)),h(wn),h(re,{variant:"text",onClick:d[3]||(d[3]=p=>u())},{default:v(()=>d[8]||(d[8]=[k(" Close ")])),_:1,__:[8]}),h(re,{color:"blue-darken-1",variant:"text",onClick:d[4]||(d[4]=p=>l())},{default:v(()=>d[9]||(d[9]=[k(" Save ")])),_:1,__:[9]})]),_:1,__:[10]})]),_:1})]),_:1},8,["id"])}}}),lG=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],uG=[1,2,3,4,5,6,7,8,9,10,11,12],DO=Le({__name:"GridSettingsList",setup(e){const t=Ns(),n=Dt(),r=A(()=>t.largeTiles),s=A(()=>t.preferCancelOverQuickStop);async function i(u){if(u)return l(u,t.gridRows)}async function o(u){if(u)return l(t.gridCols,u)}async function a(){return l(t.gridCols,t.gridRows)}async function l(u,c){await t.updateFrontendSettings({gridCols:c,gridRows:u,largeTiles:r.value,tilePreferCancelOverQuickStop:s.value}),n.info("Grid settings updated")}return(u,c)=>($(),ve("div",null,[h(en,null,{default:v(()=>[h(Bt,{subheader:"",lines:"three"},{default:v(()=>{var d;return[h(qr,null,{default:v(()=>c[2]||(c[2]=[k(" Grid Rows and Columns ")])),_:1,__:[2]}),(d=X(t).settings)!=null&&d.frontend?($(),te(Ve,{key:0},{default:v(()=>[h(rt,null,{default:v(()=>[h(ze,{cols:"3"},{default:v(()=>[h(Vo,{type:"number","onUpdate:modelValue":o,value:X(t).settings.frontend.gridRows,items:X(lG),label:"Set the grid rows"},null,8,["value","items"])]),_:1}),h(ze,{cols:"3"},{default:v(()=>[h(Vo,{type:"number","onUpdate:modelValue":i,value:X(t).settings.frontend.gridCols,items:X(uG),label:"Set the grid columns"},null,8,["value","items"])]),_:1})]),_:1})]),_:1})):pe("",!0)]}),_:1}),h(dn),h(Bt,{subheader:"",lines:"three"},{default:v(()=>[h(qr,null,{default:v(()=>c[3]||(c[3]=[k(" Large or Compact Tiles ")])),_:1,__:[3]}),h(Ve,null,{default:v(()=>{var d;return[(d=X(t).settings)!=null&&d.frontend?($(),te(rt,{key:0},{default:v(()=>[h(ze,{cols:"5"},{default:v(()=>[h(mn,{onChange:a,modelValue:X(t).settings.frontend.largeTiles,"onUpdate:modelValue":c[0]||(c[0]=f=>X(t).settings.frontend.largeTiles=f),label:"Large tiles"},null,8,["modelValue"])]),_:1})]),_:1})):pe("",!0)]}),_:1})]),_:1}),h(dn),h(Bt,{subheader:"","three-line":""},{default:v(()=>[h(qr,null,{default:v(()=>c[4]||(c[4]=[k("Large or Compact Tiles")])),_:1,__:[4]}),h(Ve,null,{default:v(()=>{var d;return[(d=X(t).settings)!=null&&d.frontend?($(),te(rt,{key:0},{default:v(()=>[h(ze,{cols:"5"},{default:v(()=>[h(mn,{onChange:a,modelValue:X(t).settings.frontend.tilePreferCancelOverQuickStop,"onUpdate:modelValue":c[1]||(c[1]=f=>X(t).settings.frontend.tilePreferCancelOverQuickStop=f),label:"Print tile - show cancel instead of quick stop"},null,8,["modelValue"])]),_:1})]),_:1})):pe("",!0)]}),_:1})]),_:1})]),_:1})]))}}),cG={class:"text-h5"},dG=Le({__name:"GridSettingsDialog",setup(e){const t=tn(nn.GridSettingsDialog);function n(){t.closeDialog(t.context())}return(r,s)=>{const i=hi;return $(),te(i,{id:X(t).dialogId,"max-width":"1000px",onEscape:s[1]||(s[1]=o=>n())},{default:v(()=>[h(yt,{class:"pa-4"},{default:v(()=>[h(sn,null,{default:v(()=>[L("span",cG,[s[4]||(s[4]=k(" Grid Settings ")),h(nt,{top:""},{activator:v(({props:o})=>[h(re,ge(o,{class:"ma-2",fab:"","x-small":""}),{default:v(()=>[h(J,null,{default:v(()=>s[2]||(s[2]=[k("question_mark")])),_:1,__:[2]})]),_:2},1040)]),default:v(()=>s[3]||(s[3]=[k(" Change your grid rows, columns and tile settings. ")])),_:1})])]),_:1}),h(DO),h(Mn,null,{default:v(()=>[h(wn),h(re,{onClick:s[0]||(s[0]=o=>X(t).closeDialog())},{default:v(()=>s[5]||(s[5]=[k("Close")])),_:1,__:[5]})]),_:1})]),_:1})]),_:1},8,["id"])}}});class ts extends gr{static async createUser(t){const n=Me.userRoute;return await this.post(n,t)}static async listUsers(){const t=Me.userRoute;return await this.get(t)}static async listRoles(){const t=Me.rolesRoute;return await this.get(t)}static async getProfile(){const t=Me.userProfileRoute;return await this.get(t)}static async changePassword(t,n,r){const s=Me.userChangePasswordRoute(t);return await this.post(s,{oldPassword:n,newPassword:r})}static async changeUsername(t,n){const r=Me.userChangeUsernameRoute(t);return await this.post(r,{username:n})}static async deleteUser(t){const n=Me.userDeleteRoute(t);return await this.delete(n)}static async setUserVerified(t,n){const r=Me.userSetVerifiedRoute(t);return await this.post(r,{isVerified:n})}static async setRootUser(t,n){const r=Me.userSetRootUserRoute(t);return await this.post(r,{isRootUser:n})}static async setUserRoles(t,n){const r=Me.userSetUserRolesRoute(t);return await this.post(r,{roleIds:n})}}const fG={class:"text-h5"},hG={class:"pl-5"},pG=Le({__name:"CreateUserDialog",setup(e){const t=tn(nn.CreateUserDialog),n=Qe("appConstants"),r=Dt(),s=j({username:"",password:"",roleIds:[]}),i=j(""),o=j([]),a=A(()=>{var f,p;return(p=(f=s.value)==null?void 0:f.username)!=null&&p.length?Sm(s.value.username):"??"}),l={required:f=>!!f||"Required field",minLength:f=>f.length>=n.minUsernameLength||`Minimum ${n.minUsernameLength} characters`,password:f=>f.length>=8?!0:"Password must be at least 8 characters",passwordMatch:f=>f===s.value.password||"Passwords must match"},u=()=>!s.value.username||s.value.username.length<n.minUsernameLength?(r.openErrorMessage({title:"Invalid username"}),!1):!s.value.password||l.password(s.value.password)!==!0?(r.openErrorMessage({title:"Invalid password"}),!1):s.value.password!==i.value?(r.openErrorMessage({title:"Passwords do not match"}),!1):s.value.roleIds.length?!0:(r.openErrorMessage({title:"Please select a role"}),!1),c=async()=>{if(u())try{await ts.createUser(s.value),r.openInfoMessage({title:`User ${s.value.username} created successfully`}),d()}catch(f){r.openErrorMessage({title:"Failed to create user",subtitle:f instanceof Error?f.message:"Unknown error"})}},d=()=>{s.value={username:"",password:"",roleIds:[]},i.value="",t.closeDialog()};return bt(async()=>{try{o.value=await ts.listRoles()}catch(f){r.openErrorMessage({title:"Failed to load roles",subtitle:f instanceof Error?f.message:"Unknown error"})}}),(f,p)=>{const g=hi;return $(),te(g,{id:X(t).dialogId,"max-width":"700px",onEscape:d},{default:v(()=>[h(yt,{class:"pa-4"},{default:v(()=>[h(sn,null,{default:v(()=>[L("span",fG,[h(ut,{color:"primary",size:"56"},{default:v(()=>[k(se(a.value),1)]),_:1}),L("span",hG,[p[6]||(p[6]=k("New verified User ")),h(nt,{top:""},{activator:v(({props:m})=>[h(re,ge({class:"ma-2",fab:""},m,{"x-small":""}),{default:v(()=>[h(J,null,{default:v(()=>p[4]||(p[4]=[k("question_mark")])),_:1,__:[4]})]),_:2},1040)]),default:v(()=>p[5]||(p[5]=[k(" The user will be set to verified and assigned roles. Please share the username and password with them manually. ")])),_:1})])])]),_:1}),h(en,null,{default:v(()=>[h(rt,null,{default:v(()=>[h(ze,{cols:12},{default:v(()=>[h(Hn,null,{default:v(()=>[h(rt,null,{default:v(()=>[h(ze,{cols:"12",md:"6"},{default:v(()=>[h(st,{modelValue:s.value.username,"onUpdate:modelValue":p[0]||(p[0]=m=>s.value.username=m),rules:[l.required,l.minLength],autofocus:"",label:"Username*","prepend-icon":"person",required:""},null,8,["modelValue","rules"]),h(st,{modelValue:s.value.password,"onUpdate:modelValue":p[1]||(p[1]=m=>s.value.password=m),rules:[l.required,l.password],label:"Password*","prepend-icon":"lock",required:"",type:"password"},null,8,["modelValue","rules"]),h(st,{modelValue:i.value,"onUpdate:modelValue":p[2]||(p[2]=m=>i.value=m),rules:[l.required,l.passwordMatch],label:"Confirm Password*","prepend-icon":"lock",required:"",type:"password"},null,8,["modelValue","rules"]),h(Vo,{modelValue:s.value.roleIds,"onUpdate:modelValue":p[3]||(p[3]=m=>s.value.roleIds=m),items:o.value.map(m=>({text:m.name,value:m.id})),rules:[l.required],label:"Roles*",multiple:"","prepend-icon":"shield",required:""},null,8,["modelValue","items","rules"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),h(Mn,null,{default:v(()=>[p[9]||(p[9]=L("em",{class:"text-red"}," * indicates required field ",-1)),h(wn),h(re,{variant:"text",onClick:d},{default:v(()=>p[7]||(p[7]=[k("Close")])),_:1,__:[7]}),h(re,{color:"blue-darken-1",variant:"text",onClick:c},{default:v(()=>p[8]||(p[8]=[k("Create")])),_:1,__:[8]})]),_:1,__:[9]})]),_:1})]),_:1},8,["id"])}}}),LO=()=>({id:void 0,name:Bu(),floor:"1",printers:[]});class ns extends gr{static convertPrinterFloorToCreateForm(t){const n=LO();return n.id=t==null?void 0:t.id,n.name=(t==null?void 0:t.name)||Bu(),n.printers=[],n.floor=((t==null?void 0:t.floor)||1).toString(),n}static convertCreateFormToFloor(t){const n={...t};if(n.floor=parseInt(n.floor),Number.isNaN(n.floor))throw new Error("Floor number did not convert to number.");return n}static async getFloors(){const t=`${Me.floorRoute}/`;return await this.get(t)}static async createFloor(t){const n=`${Me.floorRoute}/`;return await this.post(n,t)}static async updateFloorName(t,n){const r=`${Me.updatePrinterFloorNameRoute(t)}/`;return await this.patch(r,{name:n})}static async updateFloorNumber(t,n){const r=`${Me.updatePrinterFloorNumberRoute(t)}/`;return await this.patch(r,{floor:n})}static async deleteFloor(t){const n=`${Me.getFloorRoute(t)}/`;return await this.delete(n)}static async addPrinterToFloor(t,n){const r=`${Me.addOrRemovePrinterFromFloorRoute(t)}/`;return await this.post(r,n)}static async deletePrinterFromFloor(t,n){const r=`${Me.addOrRemovePrinterFromFloorRoute(t)}/`;return await this.delete(r,{printerId:n})}}const Zi=gs("Floors",{state:()=>({floors:[],selectedFloorIndex:0}),getters:{selectedFloor(e){return e.floors.length<=e.selectedFloorIndex?null:e.floors[e.selectedFloorIndex]},sortedFloors(e){return e.floors.sort((t,n)=>t.floor-n.floor)},floor(e){return t=>e.floors.find(n=>n.id===t)},floorNames(e){return e.floors.map(t=>t.name)},floorOfPrinter(){return e=>this.floors.find(t=>t.printers.map(n=>n.printerId).includes(e))},floorlessPrinters(e){return Wt().printers.filter(n=>!e.floors.find(r=>r.printers.find(s=>s.printerId===n.id)))},gridSortedPrinters(){const e=Ns(),t=e.gridCols,n=e.gridRows,s=Wt().printers;if(!s.length)return[];if(!this.selectedFloor)return[];const i=this.selectedFloor.printers,o=[];for(let a=0;a<t;a++){const l=[];o.push(l);for(let u=0;u<n;u++){const c=i.find(d=>d.x===a&&d.y===u);if(!c)l.push(void 0);else{const d=s.find(f=>f.id===c.printerId);l.push(d)}}}return o}},actions:{async loadFloors(){const e=await ns.getFloors();return this.saveFloors(e),e},async createFloor(e){const t=await ns.createFloor(e);return this.floors.push(t),t},saveFloors(e){var r;if(!(e!=null&&e.length))return;this.floors=e.sort((s,i)=>s.floor-i.floor);const t=(r=this.selectedFloor)==null?void 0:r.id,n=this.floors.findIndex(s=>s.id===t);this.selectedFloorIndex=n===-1?0:n},async deleteFloor(e){await ns.deleteFloor(e),this._popPrinterFloor(e)},async updateFloorName({floorId:e,name:t}){const n=await ns.updateFloorName(e,t);return this._replaceFloor(n),n},async updateFloorNumber({floorId:e,floorNumber:t}){const n=await ns.updateFloorNumber(e,t);return this._replaceFloor(n),n},async addPrinterToFloor({floorId:e,printerId:t,x:n,y:r}){const s=await ns.addPrinterToFloor(e,{printerId:t,x:n,y:r});this._replaceFloor(s)},async changeSelectedFloorByIndex(e){var n;if(!((n=this.floors)!=null&&n.length))return;if(this.floors.length<=e){console.warn("Selected floor index exceeds floors array"),this.selectedFloorIndex=0;return}if(!this.floors[e]){console.warn("Selected floor index did not exist in floors array"),this.selectedFloorIndex=0;return}this.selectedFloorIndex=e},async deletePrinterFromFloor({floorId:e,printerId:t}){const n=await ns.deletePrinterFromFloor(e,t);this._replaceFloor(n)},_popPrinterFloor(e){const t=this.floors.findIndex(n=>n.id===e);t!==-1&&this.floors.splice(t,1)},_replaceFloor(e){const t=this.floors.findIndex(n=>n.id===e.id);t!==-1&&(this.floors[t]=e)}}}),mG={class:"text-h5"},gG=Le({__name:"AddOrUpdateFloorDialog",setup(e){const t=tn(nn.AddOrUpdateFloorDialog),n=Zi(),r=Qe("appConstants"),s=Dt(),i=j(LO()),o=A(()=>{var d;return(d=t.context())==null?void 0:d.printerFloorId}),a=A(()=>i.value?Sm(i.value.name):""),l=()=>!i.value.name||i.value.name.length<r.minPrinterFloorNameLength?(s.openErrorMessage({title:"Invalid floor name"}),!1):Number.isInteger(Number(i.value.floor))?!0:(s.openErrorMessage({title:"Floor number must be an integer"}),!1),u=async()=>{if(!l())return;const d=ns.convertCreateFormToFloor(i.value);await n.createFloor(d),s.openInfoMessage({title:`Floor ${d.name} created`}),i.value.name=Bu();const f=Math.max(...n.floors.map(p=>p.floor))+1;i.value.floor=f.toString(),c()},c=()=>{t.closeDialog()};return Ee(o,d=>{if(d){const f=n.floor(d);i.value=ns.convertPrinterFloorToCreateForm(f)}}),bt(()=>{var d;if(o.value){const f=n.floor(o.value);i.value=ns.convertPrinterFloorToCreateForm(f)}else if((d=n.floors)!=null&&d.length){const f=Math.max(...n.floors.map(p=>p.floor))+1;i.value.floor=f.toString()}}),(d,f)=>{const p=hi;return $(),te(p,{id:X(t).dialogId,"max-width":"700px",onEscape:c},{default:v(()=>[h(yt,null,{default:v(()=>[h(sn,null,{default:v(()=>[L("span",mG,[h(ut,{color:"primary",size:"56"},{default:v(()=>[k(se(a.value),1)]),_:1}),f[2]||(f[2]=k(" New Floor "))])]),_:1}),h(en,null,{default:v(()=>[h(rt,null,{default:v(()=>[h(ze,{cols:12},{default:v(()=>[h(Hn,null,{default:v(()=>[h(rt,null,{default:v(()=>[i.value?($(),te(ze,{key:0,cols:"12",md:"6"},{default:v(()=>[h(st,{modelValue:i.value.name,"onUpdate:modelValue":f[0]||(f[0]=g=>i.value.name=g),autofocus:"",label:"Floor name*",required:""},null,8,["modelValue"]),h(st,{modelValue:i.value.floor,"onUpdate:modelValue":f[1]||(f[1]=g=>i.value.floor=g),label:"Floor number",required:"",type:"number"},null,8,["modelValue"])]),_:1})):pe("",!0)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),h(Mn,null,{default:v(()=>[f[5]||(f[5]=L("em",{class:"text-red"}," * indicates required field ",-1)),h(wn),h(re,{variant:"text",onClick:c},{default:v(()=>f[3]||(f[3]=[k("Close")])),_:1,__:[3]}),h(re,{color:"blue-darken-1",variant:"text",onClick:u},{default:v(()=>f[4]||(f[4]=[k("Create")])),_:1,__:[4]})]),_:1,__:[5]})]),_:1})]),_:1},8,["id"])}}});class hp extends gr{static async listCameraStreams(){return await this.get("/api/camera-stream/")}static async createCameraStream(t){return await this.post("/api/camera-stream/",t)}static async getCameraStream(t){return await this.get(`/api/camera-stream/${t}`)}static async updateCameraStream(t,n){return await this.put(`/api/camera-stream/${t}`,n)}static async deleteCameraStream(t){return await this.delete(`/api/camera-stream/${t}`)}}var zu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ga=typeof window>"u"||"Deno"in globalThis;function es(){}function vG(e,t){return typeof e=="function"?e(t):e}function Hy(e){return typeof e=="number"&&e>=0&&e!==1/0}function $O(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Nl(e,t){return typeof e=="function"?e(t):e}function Cs(e,t){return typeof e=="function"?e(t):e}function Tk(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==t0(o,t.options))return!1}else if(!ld(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||i&&!i(t))}function Pk(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Ka(t.options.mutationKey)!==Ka(i))return!1}else if(!ld(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function t0(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ka)(e)}function Ka(e){return JSON.stringify(e,(t,n)=>jy(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function ld(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>ld(e[n],t[n])):!1}function FO(e,t){if(e===t)return e;const n=Rk(e)&&Rk(t);if(n||jy(e)&&jy(t)){const r=n?e:Object.keys(e),s=r.length,i=n?t:Object.keys(t),o=i.length,a=n?[]:{};let l=0;for(let u=0;u<o;u++){const c=n?u:i[u];(!n&&r.includes(c)||n)&&e[c]===void 0&&t[c]===void 0?(a[c]=void 0,l++):(a[c]=FO(e[c],t[c]),a[c]===e[c]&&e[c]!==void 0&&l++)}return s===o&&l===s?e:a}return t}function pp(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Rk(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function jy(e){if(!Ik(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Ik(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Ik(e){return Object.prototype.toString.call(e)==="[object Object]"}function yG(e){return new Promise(t=>{setTimeout(t,e)})}function qy(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?FO(e,t):t}function bG(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function _G(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var n0=Symbol();function NO(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===n0?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Wy(e,t){return typeof e=="function"?e(...t):!!e}var va,ho,zl,jE,wG=(jE=class extends zu{constructor(){super();je(this,va);je(this,ho);je(this,zl);De(this,zl,t=>{if(!Ga&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){W(this,ho)||this.setEventListener(W(this,zl))}onUnsubscribe(){var t;this.hasListeners()||((t=W(this,ho))==null||t.call(this),De(this,ho,void 0))}setEventListener(t){var n;De(this,zl,t),(n=W(this,ho))==null||n.call(this),De(this,ho,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){W(this,va)!==t&&(De(this,va,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof W(this,va)=="boolean"?W(this,va):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},va=new WeakMap,ho=new WeakMap,zl=new WeakMap,jE),r0=new wG,Hl,po,jl,qE,SG=(qE=class extends zu{constructor(){super();je(this,Hl,!0);je(this,po);je(this,jl);De(this,jl,t=>{if(!Ga&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){W(this,po)||this.setEventListener(W(this,jl))}onUnsubscribe(){var t;this.hasListeners()||((t=W(this,po))==null||t.call(this),De(this,po,void 0))}setEventListener(t){var n;De(this,jl,t),(n=W(this,po))==null||n.call(this),De(this,po,t(this.setOnline.bind(this)))}setOnline(t){W(this,Hl)!==t&&(De(this,Hl,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return W(this,Hl)}},Hl=new WeakMap,po=new WeakMap,jl=new WeakMap,qE),mp=new SG;function Gy(){let e,t;const n=new Promise((s,i)=>{e=s,t=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}function kG(e){return Math.min(1e3*2**e,3e4)}function VO(e){return(e??"online")==="online"?mp.isOnline():!0}var BO=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Hg(e){return e instanceof BO}function UO(e){let t=!1,n=0,r=!1,s;const i=Gy(),o=m=>{var y;r||(f(new BO(m)),(y=e.abort)==null||y.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>r0.isFocused()&&(e.networkMode==="always"||mp.isOnline())&&e.canRun(),c=()=>VO(e.networkMode)&&e.canRun(),d=m=>{var y;r||(r=!0,(y=e.onSuccess)==null||y.call(e,m),s==null||s(),i.resolve(m))},f=m=>{var y;r||(r=!0,(y=e.onError)==null||y.call(e,m),s==null||s(),i.reject(m))},p=()=>new Promise(m=>{var y;s=_=>{(r||u())&&m(_)},(y=e.onPause)==null||y.call(e)}).then(()=>{var m;s=void 0,r||(m=e.onContinue)==null||m.call(e)}),g=()=>{if(r)return;let m;const y=n===0?e.initialPromise:void 0;try{m=y??e.fn()}catch(_){m=Promise.reject(_)}Promise.resolve(m).then(d).catch(_=>{var T;if(r)return;const b=e.retry??(Ga?0:3),x=e.retryDelay??kG,C=typeof x=="function"?x(n,_):x,S=b===!0||typeof b=="number"&&n<b||typeof b=="function"&&b(n,_);if(t||!S){f(_);return}n++,(T=e.onFail)==null||T.call(e,n,_),yG(C).then(()=>u()?void 0:p()).then(()=>{t?f(_):g()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?g():p().then(g),i)}}var xG=e=>setTimeout(e,0);function EG(){let e=[],t=0,n=a=>{a()},r=a=>{a()},s=xG;const i=a=>{t?e.push(a):s(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&s(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var Fn=EG(),ya,WE,zO=(WE=class{constructor(){je(this,ya)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Hy(this.gcTime)&&De(this,ya,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ga?1/0:5*60*1e3))}clearGcTimeout(){W(this,ya)&&(clearTimeout(W(this,ya)),De(this,ya,void 0))}},ya=new WeakMap,WE),ql,Wl,Zr,ba,Kn,gd,_a,Ss,ki,GE,CG=(GE=class extends zO{constructor(t){super();je(this,Ss);je(this,ql);je(this,Wl);je(this,Zr);je(this,ba);je(this,Kn);je(this,gd);je(this,_a);De(this,_a,!1),De(this,gd,t.defaultOptions),this.setOptions(t.options),this.observers=[],De(this,ba,t.client),De(this,Zr,W(this,ba).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,De(this,ql,TG(this.options)),this.state=t.state??W(this,ql),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=W(this,Kn))==null?void 0:t.promise}setOptions(t){this.options={...W(this,gd),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&W(this,Zr).remove(this)}setData(t,n){const r=qy(this.state.data,t,this.options);return tt(this,Ss,ki).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){tt(this,Ss,ki).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=W(this,Kn))==null?void 0:r.promise;return(s=W(this,Kn))==null||s.cancel(t),n?n.then(es).catch(es):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(W(this,ql))}isActive(){return this.observers.some(t=>Cs(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===n0||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!$O(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=W(this,Kn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=W(this,Kn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),W(this,Zr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(W(this,Kn)&&(W(this,_a)?W(this,Kn).cancel({revert:!0}):W(this,Kn).cancelRetry()),this.scheduleGc()),W(this,Zr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||tt(this,Ss,ki).call(this,{type:"invalidate"})}fetch(t,n){var l,u,c;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(W(this,Kn))return W(this,Kn).continueRetry(),W(this,Kn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const r=new AbortController,s=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(De(this,_a,!0),r.signal)})},i=()=>{const d=NO(this.options,n),f={client:W(this,ba),queryKey:this.queryKey,meta:this.meta};return s(f),De(this,_a,!1),this.options.persister?this.options.persister(d,f,this):d(f)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:W(this,ba),state:this.state,fetchFn:i};s(o),(l=this.options.behavior)==null||l.onFetch(o,this),De(this,Wl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=o.fetchOptions)==null?void 0:u.meta))&&tt(this,Ss,ki).call(this,{type:"fetch",meta:(c=o.fetchOptions)==null?void 0:c.meta});const a=d=>{var f,p,g,m;Hg(d)&&d.silent||tt(this,Ss,ki).call(this,{type:"error",error:d}),Hg(d)||((p=(f=W(this,Zr).config).onError)==null||p.call(f,d,this),(m=(g=W(this,Zr).config).onSettled)==null||m.call(g,this.state.data,d,this)),this.scheduleGc()};return De(this,Kn,UO({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:d=>{var f,p,g,m;if(d===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(d)}catch(y){a(y);return}(p=(f=W(this,Zr).config).onSuccess)==null||p.call(f,d,this),(m=(g=W(this,Zr).config).onSettled)==null||m.call(g,d,this.state.error,this),this.scheduleGc()},onError:a,onFail:(d,f)=>{tt(this,Ss,ki).call(this,{type:"failed",failureCount:d,error:f})},onPause:()=>{tt(this,Ss,ki).call(this,{type:"pause"})},onContinue:()=>{tt(this,Ss,ki).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),W(this,Kn).start()}},ql=new WeakMap,Wl=new WeakMap,Zr=new WeakMap,ba=new WeakMap,Kn=new WeakMap,gd=new WeakMap,_a=new WeakMap,Ss=new WeakSet,ki=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...HO(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return Hg(s)&&s.revert&&W(this,Wl)?{...W(this,Wl),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Fn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),W(this,Zr).notify({query:this,type:"updated",action:t})})},GE);function HO(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:VO(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function TG(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Js,KE,jO=(KE=class extends zu{constructor(n={}){super();je(this,Js);this.config=n,De(this,Js,new Map)}build(n,r,s){const i=r.queryKey,o=r.queryHash??t0(i,r);let a=this.get(o);return a||(a=new CG({client:n,queryKey:i,queryHash:o,options:n.defaultQueryOptions(r),state:s,defaultOptions:n.getQueryDefaults(i)}),this.add(a)),a}add(n){W(this,Js).has(n.queryHash)||(W(this,Js).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const r=W(this,Js).get(n.queryHash);r&&(n.destroy(),r===n&&W(this,Js).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){Fn.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return W(this,Js).get(n)}getAll(){return[...W(this,Js).values()]}find(n){const r={exact:!0,...n};return this.getAll().find(s=>Tk(r,s))}findAll(n={}){const r=this.getAll();return Object.keys(n).length>0?r.filter(s=>Tk(n,s)):r}notify(n){Fn.batch(()=>{this.listeners.forEach(r=>{r(n)})})}onFocus(){Fn.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){Fn.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},Js=new WeakMap,KE),Zs,ar,wa,ei,io,YE,PG=(YE=class extends zO{constructor(t){super();je(this,ei);je(this,Zs);je(this,ar);je(this,wa);this.mutationId=t.mutationId,De(this,ar,t.mutationCache),De(this,Zs,[]),this.state=t.state||qO(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){W(this,Zs).includes(t)||(W(this,Zs).push(t),this.clearGcTimeout(),W(this,ar).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){De(this,Zs,W(this,Zs).filter(n=>n!==t)),this.scheduleGc(),W(this,ar).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){W(this,Zs).length||(this.state.status==="pending"?this.scheduleGc():W(this,ar).remove(this))}continue(){var t;return((t=W(this,wa))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,a,l,u,c,d,f,p,g,m,y,_,b,x,C,S,T,P,w;const n=()=>{tt(this,ei,io).call(this,{type:"continue"})};De(this,wa,UO({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(E,I)=>{tt(this,ei,io).call(this,{type:"failed",failureCount:E,error:I})},onPause:()=>{tt(this,ei,io).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>W(this,ar).canRun(this)}));const r=this.state.status==="pending",s=!W(this,wa).canStart();try{if(r)n();else{tt(this,ei,io).call(this,{type:"pending",variables:t,isPaused:s}),await((o=(i=W(this,ar).config).onMutate)==null?void 0:o.call(i,t,this));const I=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));I!==this.state.context&&tt(this,ei,io).call(this,{type:"pending",context:I,variables:t,isPaused:s})}const E=await W(this,wa).start();return await((c=(u=W(this,ar).config).onSuccess)==null?void 0:c.call(u,E,t,this.state.context,this)),await((f=(d=this.options).onSuccess)==null?void 0:f.call(d,E,t,this.state.context)),await((g=(p=W(this,ar).config).onSettled)==null?void 0:g.call(p,E,null,this.state.variables,this.state.context,this)),await((y=(m=this.options).onSettled)==null?void 0:y.call(m,E,null,t,this.state.context)),tt(this,ei,io).call(this,{type:"success",data:E}),E}catch(E){try{throw await((b=(_=W(this,ar).config).onError)==null?void 0:b.call(_,E,t,this.state.context,this)),await((C=(x=this.options).onError)==null?void 0:C.call(x,E,t,this.state.context)),await((T=(S=W(this,ar).config).onSettled)==null?void 0:T.call(S,void 0,E,this.state.variables,this.state.context,this)),await((w=(P=this.options).onSettled)==null?void 0:w.call(P,void 0,E,t,this.state.context)),E}finally{tt(this,ei,io).call(this,{type:"error",error:E})}}finally{W(this,ar).runNext(this)}}},Zs=new WeakMap,ar=new WeakMap,wa=new WeakMap,ei=new WeakSet,io=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Fn.batch(()=>{W(this,Zs).forEach(r=>{r.onMutationUpdate(t)}),W(this,ar).notify({mutation:this,type:"updated",action:t})})},YE);function qO(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ii,ks,vd,XE,WO=(XE=class extends zu{constructor(n={}){super();je(this,Ii);je(this,ks);je(this,vd);this.config=n,De(this,Ii,new Set),De(this,ks,new Map),De(this,vd,0)}build(n,r,s){const i=new PG({mutationCache:this,mutationId:++Yd(this,vd)._,options:n.defaultMutationOptions(r),state:s});return this.add(i),i}add(n){W(this,Ii).add(n);const r=wf(n);if(typeof r=="string"){const s=W(this,ks).get(r);s?s.push(n):W(this,ks).set(r,[n])}this.notify({type:"added",mutation:n})}remove(n){if(W(this,Ii).delete(n)){const r=wf(n);if(typeof r=="string"){const s=W(this,ks).get(r);if(s)if(s.length>1){const i=s.indexOf(n);i!==-1&&s.splice(i,1)}else s[0]===n&&W(this,ks).delete(r)}}this.notify({type:"removed",mutation:n})}canRun(n){const r=wf(n);if(typeof r=="string"){const s=W(this,ks).get(r),i=s==null?void 0:s.find(o=>o.state.status==="pending");return!i||i===n}else return!0}runNext(n){var s;const r=wf(n);if(typeof r=="string"){const i=(s=W(this,ks).get(r))==null?void 0:s.find(o=>o!==n&&o.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Fn.batch(()=>{W(this,Ii).forEach(n=>{this.notify({type:"removed",mutation:n})}),W(this,Ii).clear(),W(this,ks).clear()})}getAll(){return Array.from(W(this,Ii))}find(n){const r={exact:!0,...n};return this.getAll().find(s=>Pk(r,s))}findAll(n={}){return this.getAll().filter(r=>Pk(n,r))}notify(n){Fn.batch(()=>{this.listeners.forEach(r=>{r(n)})})}resumePausedMutations(){const n=this.getAll().filter(r=>r.state.isPaused);return Fn.batch(()=>Promise.all(n.map(r=>r.continue().catch(es))))}},Ii=new WeakMap,ks=new WeakMap,vd=new WeakMap,XE);function wf(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Ak(e){return{onFetch:(t,n)=>{var c,d,f,p,g;const r=t.options,s=(f=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],o=((g=t.state.data)==null?void 0:g.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let m=!1;const y=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},_=NO(t.options,t.fetchOptions),b=async(x,C,S)=>{if(m)return Promise.reject();if(C==null&&x.pages.length)return Promise.resolve(x);const T={client:t.client,queryKey:t.queryKey,pageParam:C,direction:S?"backward":"forward",meta:t.options.meta};y(T);const P=await _(T),{maxPages:w}=t.options,E=S?_G:bG;return{pages:E(x.pages,P,w),pageParams:E(x.pageParams,C,w)}};if(s&&i.length){const x=s==="backward",C=x?RG:Ok,S={pages:i,pageParams:o},T=C(r,S);a=await b(S,T,x)}else{const x=e??i.length;do{const C=l===0?o[0]??r.initialPageParam:Ok(r,a);if(l>0&&C==null)break;a=await b(a,C),l++}while(l<x)}return a};t.options.persister?t.fetchFn=()=>{var m,y;return(y=(m=t.options).persister)==null?void 0:y.call(m,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Ok(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function RG(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var un,mo,go,Gl,Kl,vo,Yl,Xl,QE,IG=(QE=class{constructor(t={}){je(this,un);je(this,mo);je(this,go);je(this,Gl);je(this,Kl);je(this,vo);je(this,Yl);je(this,Xl);De(this,un,t.queryCache||new jO),De(this,mo,t.mutationCache||new WO),De(this,go,t.defaultOptions||{}),De(this,Gl,new Map),De(this,Kl,new Map),De(this,vo,0)}mount(){Yd(this,vo)._++,W(this,vo)===1&&(De(this,Yl,r0.subscribe(async t=>{t&&(await this.resumePausedMutations(),W(this,un).onFocus())})),De(this,Xl,mp.subscribe(async t=>{t&&(await this.resumePausedMutations(),W(this,un).onOnline())})))}unmount(){var t,n;Yd(this,vo)._--,W(this,vo)===0&&((t=W(this,Yl))==null||t.call(this),De(this,Yl,void 0),(n=W(this,Xl))==null||n.call(this),De(this,Xl,void 0))}isFetching(t){return W(this,un).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return W(this,mo).findAll({...t,status:"pending"}).length}getQueryData(t){var r;const n=this.defaultQueryOptions({queryKey:t});return(r=W(this,un).get(n.queryHash))==null?void 0:r.state.data}ensureQueryData(t){const n=this.defaultQueryOptions(t),r=W(this,un).build(this,n),s=r.state.data;return s===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(Nl(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(s))}getQueriesData(t){return W(this,un).findAll(t).map(({queryKey:n,state:r})=>{const s=r.data;return[n,s]})}setQueryData(t,n,r){const s=this.defaultQueryOptions({queryKey:t}),i=W(this,un).get(s.queryHash),o=i==null?void 0:i.state.data,a=vG(n,o);if(a!==void 0)return W(this,un).build(this,s).setData(a,{...r,manual:!0})}setQueriesData(t,n,r){return Fn.batch(()=>W(this,un).findAll(t).map(({queryKey:s})=>[s,this.setQueryData(s,n,r)]))}getQueryState(t){var r;const n=this.defaultQueryOptions({queryKey:t});return(r=W(this,un).get(n.queryHash))==null?void 0:r.state}removeQueries(t){const n=W(this,un);Fn.batch(()=>{n.findAll(t).forEach(r=>{n.remove(r)})})}resetQueries(t,n){const r=W(this,un);return Fn.batch(()=>(r.findAll(t).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...t},n)))}cancelQueries(t,n={}){const r={revert:!0,...n},s=Fn.batch(()=>W(this,un).findAll(t).map(i=>i.cancel(r)));return Promise.all(s).then(es).catch(es)}invalidateQueries(t,n={}){return Fn.batch(()=>(W(this,un).findAll(t).forEach(r=>{r.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},n)))}refetchQueries(t,n={}){const r={...n,cancelRefetch:n.cancelRefetch??!0},s=Fn.batch(()=>W(this,un).findAll(t).filter(i=>!i.isDisabled()).map(i=>{let o=i.fetch(void 0,r);return r.throwOnError||(o=o.catch(es)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(s).then(es)}fetchQuery(t){const n=this.defaultQueryOptions(t);n.retry===void 0&&(n.retry=!1);const r=W(this,un).build(this,n);return r.isStaleByTime(Nl(n.staleTime,r))?r.fetch(n):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(es).catch(es)}fetchInfiniteQuery(t){return t.behavior=Ak(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(es).catch(es)}ensureInfiniteQueryData(t){return t.behavior=Ak(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return mp.isOnline()?W(this,mo).resumePausedMutations():Promise.resolve()}getQueryCache(){return W(this,un)}getMutationCache(){return W(this,mo)}getDefaultOptions(){return W(this,go)}setDefaultOptions(t){De(this,go,t)}setQueryDefaults(t,n){W(this,Gl).set(Ka(t),{queryKey:t,defaultOptions:n})}getQueryDefaults(t){const n=[...W(this,Gl).values()],r={};return n.forEach(s=>{ld(t,s.queryKey)&&Object.assign(r,s.defaultOptions)}),r}setMutationDefaults(t,n){W(this,Kl).set(Ka(t),{mutationKey:t,defaultOptions:n})}getMutationDefaults(t){const n=[...W(this,Kl).values()],r={};return n.forEach(s=>{ld(t,s.mutationKey)&&Object.assign(r,s.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const n={...W(this,go).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return n.queryHash||(n.queryHash=t0(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===n0&&(n.enabled=!1),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...W(this,go).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){W(this,un).clear(),W(this,mo).clear()}},un=new WeakMap,mo=new WeakMap,go=new WeakMap,Gl=new WeakMap,Kl=new WeakMap,vo=new WeakMap,Yl=new WeakMap,Xl=new WeakMap,QE),_r,ht,yd,lr,Sa,Ql,yo,bo,bd,Jl,Zl,ka,xa,_o,eu,Pt,hc,Ky,Yy,Xy,Qy,Jy,Zy,eb,GO,JE,AG=(JE=class extends zu{constructor(t,n){super();je(this,Pt);je(this,_r);je(this,ht);je(this,yd);je(this,lr);je(this,Sa);je(this,Ql);je(this,yo);je(this,bo);je(this,bd);je(this,Jl);je(this,Zl);je(this,ka);je(this,xa);je(this,_o);je(this,eu,new Set);this.options=n,De(this,_r,t),De(this,bo,null),De(this,yo,Gy()),this.options.experimental_prefetchInRender||W(this,yo).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(W(this,ht).addObserver(this),Mk(W(this,ht),this.options)?tt(this,Pt,hc).call(this):this.updateResult(),tt(this,Pt,Qy).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return tb(W(this,ht),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return tb(W(this,ht),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,tt(this,Pt,Jy).call(this),tt(this,Pt,Zy).call(this),W(this,ht).removeObserver(this)}setOptions(t){const n=this.options,r=W(this,ht);if(this.options=W(this,_r).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Cs(this.options.enabled,W(this,ht))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");tt(this,Pt,eb).call(this),W(this,ht).setOptions(this.options),n._defaulted&&!pp(this.options,n)&&W(this,_r).getQueryCache().notify({type:"observerOptionsUpdated",query:W(this,ht),observer:this});const s=this.hasListeners();s&&Dk(W(this,ht),r,this.options,n)&&tt(this,Pt,hc).call(this),this.updateResult(),s&&(W(this,ht)!==r||Cs(this.options.enabled,W(this,ht))!==Cs(n.enabled,W(this,ht))||Nl(this.options.staleTime,W(this,ht))!==Nl(n.staleTime,W(this,ht)))&&tt(this,Pt,Ky).call(this);const i=tt(this,Pt,Yy).call(this);s&&(W(this,ht)!==r||Cs(this.options.enabled,W(this,ht))!==Cs(n.enabled,W(this,ht))||i!==W(this,_o))&&tt(this,Pt,Xy).call(this,i)}getOptimisticResult(t){const n=W(this,_r).getQueryCache().build(W(this,_r),t),r=this.createResult(n,t);return MG(this,r)&&(De(this,lr,r),De(this,Ql,this.options),De(this,Sa,W(this,ht).state)),r}getCurrentResult(){return W(this,lr)}trackResult(t,n){return new Proxy(t,{get:(r,s)=>(this.trackProp(s),n==null||n(s),Reflect.get(r,s))})}trackProp(t){W(this,eu).add(t)}getCurrentQuery(){return W(this,ht)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=W(this,_r).defaultQueryOptions(t),r=W(this,_r).getQueryCache().build(W(this,_r),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return tt(this,Pt,hc).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),W(this,lr)))}createResult(t,n){var E;const r=W(this,ht),s=this.options,i=W(this,lr),o=W(this,Sa),a=W(this,Ql),u=t!==r?t.state:W(this,yd),{state:c}=t;let d={...c},f=!1,p;if(n._optimisticResults){const I=this.hasListeners(),O=!I&&Mk(t,n),R=I&&Dk(t,r,n,s);(O||R)&&(d={...d,...HO(c.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:g,errorUpdatedAt:m,status:y}=d;p=d.data;let _=!1;if(n.placeholderData!==void 0&&p===void 0&&y==="pending"){let I;i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(I=i.data,_=!0):I=typeof n.placeholderData=="function"?n.placeholderData((E=W(this,Zl))==null?void 0:E.state.data,W(this,Zl)):n.placeholderData,I!==void 0&&(y="success",p=qy(i==null?void 0:i.data,I,n),f=!0)}if(n.select&&p!==void 0&&!_)if(i&&p===(o==null?void 0:o.data)&&n.select===W(this,bd))p=W(this,Jl);else try{De(this,bd,n.select),p=n.select(p),p=qy(i==null?void 0:i.data,p,n),De(this,Jl,p),De(this,bo,null)}catch(I){De(this,bo,I)}W(this,bo)&&(g=W(this,bo),p=W(this,Jl),m=Date.now(),y="error");const b=d.fetchStatus==="fetching",x=y==="pending",C=y==="error",S=x&&b,T=p!==void 0,w={status:y,fetchStatus:d.fetchStatus,isPending:x,isSuccess:y==="success",isError:C,isInitialLoading:S,isLoading:S,data:p,dataUpdatedAt:d.dataUpdatedAt,error:g,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:b,isRefetching:b&&!x,isLoadingError:C&&!T,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:C&&T,isStale:s0(t,n),refetch:this.refetch,promise:W(this,yo)};if(this.options.experimental_prefetchInRender){const I=M=>{w.status==="error"?M.reject(w.error):w.data!==void 0&&M.resolve(w.data)},O=()=>{const M=De(this,yo,w.promise=Gy());I(M)},R=W(this,yo);switch(R.status){case"pending":t.queryHash===r.queryHash&&I(R);break;case"fulfilled":(w.status==="error"||w.data!==R.value)&&O();break;case"rejected":(w.status!=="error"||w.error!==R.reason)&&O();break}}return w}updateResult(){const t=W(this,lr),n=this.createResult(W(this,ht),this.options);if(De(this,Sa,W(this,ht).state),De(this,Ql,this.options),W(this,Sa).data!==void 0&&De(this,Zl,W(this,ht)),pp(n,t))return;De(this,lr,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!W(this,eu).size)return!0;const o=new Set(i??W(this,eu));return this.options.throwOnError&&o.add("error"),Object.keys(W(this,lr)).some(a=>{const l=a;return W(this,lr)[l]!==t[l]&&o.has(l)})};tt(this,Pt,GO).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&tt(this,Pt,Qy).call(this)}},_r=new WeakMap,ht=new WeakMap,yd=new WeakMap,lr=new WeakMap,Sa=new WeakMap,Ql=new WeakMap,yo=new WeakMap,bo=new WeakMap,bd=new WeakMap,Jl=new WeakMap,Zl=new WeakMap,ka=new WeakMap,xa=new WeakMap,_o=new WeakMap,eu=new WeakMap,Pt=new WeakSet,hc=function(t){tt(this,Pt,eb).call(this);let n=W(this,ht).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(es)),n},Ky=function(){tt(this,Pt,Jy).call(this);const t=Nl(this.options.staleTime,W(this,ht));if(Ga||W(this,lr).isStale||!Hy(t))return;const r=$O(W(this,lr).dataUpdatedAt,t)+1;De(this,ka,setTimeout(()=>{W(this,lr).isStale||this.updateResult()},r))},Yy=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(W(this,ht)):this.options.refetchInterval)??!1},Xy=function(t){tt(this,Pt,Zy).call(this),De(this,_o,t),!(Ga||Cs(this.options.enabled,W(this,ht))===!1||!Hy(W(this,_o))||W(this,_o)===0)&&De(this,xa,setInterval(()=>{(this.options.refetchIntervalInBackground||r0.isFocused())&&tt(this,Pt,hc).call(this)},W(this,_o)))},Qy=function(){tt(this,Pt,Ky).call(this),tt(this,Pt,Xy).call(this,tt(this,Pt,Yy).call(this))},Jy=function(){W(this,ka)&&(clearTimeout(W(this,ka)),De(this,ka,void 0))},Zy=function(){W(this,xa)&&(clearInterval(W(this,xa)),De(this,xa,void 0))},eb=function(){const t=W(this,_r).getQueryCache().build(W(this,_r),this.options);if(t===W(this,ht))return;const n=W(this,ht);De(this,ht,t),De(this,yd,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},GO=function(t){Fn.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(W(this,lr))}),W(this,_r).getQueryCache().notify({query:W(this,ht),type:"observerResultsUpdated"})})},JE);function OG(e,t){return Cs(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Mk(e,t){return OG(e,t)||e.state.data!==void 0&&tb(e,t,t.refetchOnMount)}function tb(e,t,n){if(Cs(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&s0(e,t)}return!1}function Dk(e,t,n,r){return(e!==t||Cs(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&s0(e,n)}function s0(e,t){return Cs(t.enabled,e)!==!1&&e.isStaleByTime(Nl(t.staleTime,e))}function MG(e,t){return!pp(e.getCurrentResult(),t)}var wo,So,wr,Ai,Fi,fh,nb,ZE,DG=(ZE=class extends zu{constructor(n,r){super();je(this,Fi);je(this,wo);je(this,So);je(this,wr);je(this,Ai);De(this,wo,n),this.setOptions(r),this.bindMethods(),tt(this,Fi,fh).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const r=this.options;this.options=W(this,wo).defaultMutationOptions(n),pp(this.options,r)||W(this,wo).getMutationCache().notify({type:"observerOptionsUpdated",mutation:W(this,wr),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Ka(r.mutationKey)!==Ka(this.options.mutationKey)?this.reset():((s=W(this,wr))==null?void 0:s.state.status)==="pending"&&W(this,wr).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=W(this,wr))==null||n.removeObserver(this)}onMutationUpdate(n){tt(this,Fi,fh).call(this),tt(this,Fi,nb).call(this,n)}getCurrentResult(){return W(this,So)}reset(){var n;(n=W(this,wr))==null||n.removeObserver(this),De(this,wr,void 0),tt(this,Fi,fh).call(this),tt(this,Fi,nb).call(this)}mutate(n,r){var s;return De(this,Ai,r),(s=W(this,wr))==null||s.removeObserver(this),De(this,wr,W(this,wo).getMutationCache().build(W(this,wo),this.options)),W(this,wr).addObserver(this),W(this,wr).execute(n)}},wo=new WeakMap,So=new WeakMap,wr=new WeakMap,Ai=new WeakMap,Fi=new WeakSet,fh=function(){var r;const n=((r=W(this,wr))==null?void 0:r.state)??qO();De(this,So,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},nb=function(n){Fn.batch(()=>{var r,s,i,o,a,l,u,c;if(W(this,Ai)&&this.hasListeners()){const d=W(this,So).variables,f=W(this,So).context;(n==null?void 0:n.type)==="success"?((s=(r=W(this,Ai)).onSuccess)==null||s.call(r,n.data,d,f),(o=(i=W(this,Ai)).onSettled)==null||o.call(i,n.data,null,d,f)):(n==null?void 0:n.type)==="error"&&((l=(a=W(this,Ai)).onError)==null||l.call(a,n.error,d,f),(c=(u=W(this,Ai)).onSettled)==null||c.call(u,void 0,n.error,d,f))}this.listeners.forEach(d=>{d(W(this,So))})})},ZE),LG="VUE_QUERY_CLIENT";function KO(e){const t=e?`:${e}`:"";return`${LG}${t}`}function rb(e,t){Object.keys(e).forEach(n=>{e[n]=t[n]})}function sb(e,t,n="",r=0){if(t){const s=t(e,n,r);if(s===void 0&&et(e)||s!==void 0)return s}if(Array.isArray(e))return e.map((s,i)=>sb(s,t,String(i),r+1));if(typeof e=="object"&&FG(e)){const s=Object.entries(e).map(([i,o])=>[i,sb(o,t,i,r+1)]);return Object.fromEntries(s)}return e}function $G(e,t){return sb(e,t)}function ot(e,t=!1){return $G(e,(n,r,s)=>{if(s===1&&r==="queryKey")return ot(n,!0);if(t&&NG(n))return ot(n(),t);if(et(n))return ot(X(n),t)})}function FG(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function NG(e){return typeof e=="function"}function i0(e=""){if(!XC())throw new Error("vue-query hooks can only be used inside setup() function or functions that support injection context.");const t=KO(e),n=Qe(t);if(!n)throw new Error("No 'queryClient' found in Vue context, use 'VueQueryPlugin' to properly initialize the library.");return n}var VG=class extends jO{find(e){return super.find(ot(e))}findAll(e={}){return super.findAll(ot(e))}},BG=class extends WO{find(e){return super.find(ot(e))}findAll(e={}){return super.findAll(ot(e))}},UG=class extends IG{constructor(e={}){const t={defaultOptions:e.defaultOptions,queryCache:e.queryCache||new VG,mutationCache:e.mutationCache||new BG};super(t),this.isRestoring=j(!1)}isFetching(e={}){return super.isFetching(ot(e))}isMutating(e={}){return super.isMutating(ot(e))}getQueryData(e){return super.getQueryData(ot(e))}ensureQueryData(e){return super.ensureQueryData(ot(e))}getQueriesData(e){return super.getQueriesData(ot(e))}setQueryData(e,t,n={}){return super.setQueryData(ot(e),t,ot(n))}setQueriesData(e,t,n={}){return super.setQueriesData(ot(e),t,ot(n))}getQueryState(e){return super.getQueryState(ot(e))}removeQueries(e={}){return super.removeQueries(ot(e))}resetQueries(e={},t={}){return super.resetQueries(ot(e),ot(t))}cancelQueries(e={},t={}){return super.cancelQueries(ot(e),ot(t))}invalidateQueries(e={},t={}){const n=ot(e),r=ot(t);if(super.invalidateQueries({...n,refetchType:"none"},r),n.refetchType==="none")return Promise.resolve();const s={...n,type:n.refetchType??n.type??"active"};return Mt().then(()=>super.refetchQueries(s,r))}refetchQueries(e={},t={}){return super.refetchQueries(ot(e),ot(t))}fetchQuery(e){return super.fetchQuery(ot(e))}prefetchQuery(e){return super.prefetchQuery(ot(e))}fetchInfiniteQuery(e){return super.fetchInfiniteQuery(ot(e))}prefetchInfiniteQuery(e){return super.prefetchInfiniteQuery(ot(e))}setDefaultOptions(e){super.setDefaultOptions(ot(e))}setQueryDefaults(e,t){super.setQueryDefaults(ot(e),ot(t))}getQueryDefaults(e){return super.getQueryDefaults(ot(e))}setMutationDefaults(e,t){super.setMutationDefaults(ot(e),ot(t))}getMutationDefaults(e){return super.getMutationDefaults(ot(e))}},zG={install:(e,t={})=>{const n=KO(t.queryClientKey);let r;if("queryClient"in t&&t.queryClient)r=t.queryClient;else{const o="queryClientConfig"in t?t.queryClientConfig:void 0;r=new UG(o)}Ga||r.mount();let s=()=>{};if(t.clientPersister){r.isRestoring.value=!0;const[o,a]=t.clientPersister(r);s=o,a.then(()=>{var l;r.isRestoring.value=!1,(l=t.clientPersisterOnSuccess)==null||l.call(t,r)})}const i=()=>{r.unmount(),s()};if(e.onUnmount)e.onUnmount(i);else{const o=e.unmount;e.unmount=function(){i(),o()}}e.provide(n,r)}};function HG(e,t,n){const r=i0(),s=A(()=>{const p=ot(t);typeof p.enabled=="function"&&(p.enabled=p.enabled());const g=r.defaultQueryOptions(p);return g._optimisticResults=r.isRestoring.value?"isRestoring":"optimistic",g}),i=new e(r,s.value),o=s.value.shallow?Dp(i.getCurrentResult()):cn(i.getCurrentResult());let a=()=>{};Ee(r.isRestoring,p=>{p||(a(),a=i.subscribe(g=>{rb(o,g)}))},{immediate:!0});const l=()=>{i.setOptions(s.value),rb(o,i.getCurrentResult())};Ee(s,l),yn(()=>{a()});const u=(...p)=>(l(),o.refetch(...p)),c=()=>new Promise((p,g)=>{let m=()=>{};const y=()=>{if(s.value.enabled!==!1){i.setOptions(s.value);const _=i.getOptimisticResult(s.value);_.isStale?(m(),i.fetchOptimistic(s.value).then(p,b=>{Wy(s.value.throwOnError,[b,i.getCurrentQuery()])?g(b):p(i.getCurrentResult())})):(m(),p(_))}};y(),m=Ee(s,y)});Ee(()=>o.error,p=>{if(o.isError&&!o.isFetching&&Wy(s.value.throwOnError,[p,i.getCurrentQuery()]))throw p});const d=s.value.shallow?Mb(o):Ho(o),f=Xa(d);for(const p in o)typeof o[p]=="function"&&(f[p]=o[p]);return f.suspense=c,f.refetch=u,f}function Rm(e,t){return HG(AG,e)}function jG(e,t){const n=i0(),r=A(()=>n.defaultMutationOptions(ot(e))),s=new DG(n,r.value),i=r.value.shallow?Dp(s.getCurrentResult()):cn(s.getCurrentResult()),o=s.subscribe(c=>{rb(i,c)}),a=(c,d)=>{s.mutate(c,d).catch(()=>{})};Ee(r,()=>{s.setOptions(r.value)}),yn(()=>{o()});const l=r.value.shallow?Mb(i):Ho(i),u=Xa(l);return Ee(()=>i.error,c=>{if(c&&Wy(r.value.throwOnError,[c]))throw c}),{...u,mutate:a,mutateAsync:i.mutate,reset:i.reset}}const qG=de({...Ue(),...Or(),...cO()},"VLayout"),Im=ke()({name:"VLayout",props:qG(),setup(e,t){let{slots:n}=t;const{layoutClasses:r,layoutStyles:s,getLayoutItem:i,items:o,layoutRef:a}=pO(e),{dimensionStyles:l}=Mr(e);return Oe(()=>{var u;return h("div",{ref:a,class:[r.value,e.class],style:[l.value,s.value,e.style]},[(u=n.default)==null?void 0:u.call(n)])}),{getLayoutItem:i,items:o}}}),WG={class:"text-h5"},GG={key:0},KG={key:1},YG=Le({__name:"AddOrUpdateCameraStreamDialog",setup(e){const t=i0(),n=tn(nn.AddOrUpdateCameraDialog),r=A(()=>"C"),s=j({name:"",streamURL:""}),i=()=>{var d;return((d=n.context())==null?void 0:d.addOrUpdate)==="update"},o=A(()=>i());Ee(()=>n.context(),d=>{var p;if(!d||(d==null?void 0:d.addOrUpdate)!=="update"){s.value.streamURL="",s.value.name="";return}const f=(p=t.getQueryData(["cameraStream"]))==null?void 0:p.find(g=>g.cameraStream.id===d.cameraId);s.value.name=f==null?void 0:f.cameraStream.name,s.value.streamURL=(f==null?void 0:f.cameraStream.streamURL)||""});function a(){n.closeDialog()}async function l(){await hp.createCameraStream({streamURL:s.value.streamURL,name:s.value.name}),await t.refetchQueries({queryKey:["cameraStream"]}),n.closeDialog()}async function u(){var d;await hp.updateCameraStream((d=n.context())==null?void 0:d.cameraId,{streamURL:s.value.streamURL,name:s.value.name}),await t.refetchQueries({queryKey:["cameraStream"]}),n.closeDialog()}function c(){n.closeDialog()}return(d,f)=>{const p=hi;return $(),te(p,{id:X(n).dialogId,"max-width":"800px",onEscape:f[3]||(f[3]=g=>a())},{default:v(()=>[h(yt,null,{default:v(()=>[h(sn,null,{default:v(()=>[L("span",WG,[h(ut,{class:"mr-2",color:"primary",size:"56"},{default:v(()=>[k(se(r.value),1)]),_:1}),o.value?($(),ve("span",GG," Updating Camera ")):($(),ve("span",KG," New Camera "))])]),_:1}),h(en,null,{default:v(()=>[h(Hn,{"grid-list-md":""},{default:v(()=>[h(Im,{wrap:""},{default:v(()=>[h(st,{modelValue:s.value.name,"onUpdate:modelValue":f[0]||(f[0]=g=>s.value.name=g),label:"Name",required:""},null,8,["modelValue"]),h(st,{modelValue:s.value.streamURL,"onUpdate:modelValue":f[1]||(f[1]=g=>s.value.streamURL=g),label:"Url (MJPEG)",required:""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),h(Mn,null,{default:v(()=>[h(wn),h(re,{color:"primary-darken-2",onClick:c},{default:v(()=>f[4]||(f[4]=[k(" Cancel ")])),_:1,__:[4]}),h(re,{color:"primary",onClick:f[2]||(f[2]=g=>o.value?u():l())},{default:v(()=>[k(se(o.value?"Update":"Create"),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),o0=gs("TestPrinter",{state:()=>({currentCorrelationToken:void 0,testPrinter:void 0,testPrinterEvents:[]}),getters:{getEvents(){return()=>{var e;return(((e=this.testPrinterEvents)==null?void 0:e.filter(t=>t.correlationToken===this.currentCorrelationToken))||[]).filter(t=>(t.event!=="API_STATE_UPDATED"||t.payload!=="unset")&&(t.event!=="WS_STATE_UPDATED"||t.payload!=="unopened")).map(t=>{var r,s,i;return{event:t.event.startsWith("WS_")?"Socket":"API",payload:(s=(r=t.payload)==null?void 0:r.toString())==null?void 0:s.replace("noResponse","unreachable").replace("authFail","authentication failure"),failure:["authFail","noResponse","aborted","globalKey","error","connection error","closed","connection closed"].includes((i=t.payload)==null?void 0:i.toString())}})}}},actions:{clearEvents(){this.testPrinterEvents=[]},async createTestPrinter(e){return this.testPrinter=e,await Qt.testConnection(e)},saveEvent(e){var t;(t=this.testPrinterEvents)==null||t.push(e)}}}),XG="error",QG="success",JG=Le({__name:"PrinterChecksPanel",setup(e){const t=o0(),n=j(4);function r(){return t.getEvents().map(s=>({label:s.event,text:s.payload,color:s.failure?XG:QG}))}return(s,i)=>($(),te(ze,{cols:X(n)},{default:v(()=>[i[0]||(i[0]=L("strong",null," Checks: ",-1)),($(!0),ve(Ae,null,Gt(r(),(o,a)=>($(),te(fn,{key:a,type:o.color,density:"compact"},{default:v(()=>[L("small",null,se(o.label)+" "+se(o.text),1)]),_:2},1032,["type"]))),128))]),_:1,__:[0]},8,["cols"]))}}),ZG="/assets/klipper-logo-B1Hu-a1R.svg",eK="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3c!--%20Creator:%20CorelDRAW%202017%20--%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml:space='preserve'%20width='76.1823mm'%20height='18.3444mm'%20version='1.1'%20style='shape-rendering:geometricPrecision;%20text-rendering:geometricPrecision;%20image-rendering:optimizeQuality;%20fill-rule:evenodd;%20clip-rule:evenodd'%20viewBox='0%200%205483.86%201320.49'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cdefs%3e%3cstyle%20type='text/css'%3e%3c![CDATA[%20.fil0%20{fill:%23FEFEFE}%20.fil2%20{fill:%23FA6831}%20.fil3%20{fill:%23FEFEFE;fill-rule:nonzero}%20.fil1%20{fill:%232B2A29;fill-rule:nonzero}%20]]%3e%3c/style%3e%3c/defs%3e%3cg%20id='Layer_x0020_1'%3e%3cmetadata%20id='CorelCorpID_0Corel-Layer'/%3e%3cpath%20class='fil0'%20d='M-0%20385.77l3064.43%200%200%20934.72%20-3064.43%200%200%20-934.72zm5417.22%200l-2227.07%200%200%20934.72%202227.07%200%200%20-934.72z'/%3e%3cpath%20class='fil1'%20d='M3381.47%201144.22l426.16%200%200%20-131.38%20-273.43%200%200%20-454.89%20-152.73%200%200%20586.27zm-3073.6%20-463.92l102.63%200c46.8,0%2082.11,21.34%2082.11,77.18%200,53.37%20-33.66,73.08%20-82.11,73.08l-102.63%200%200%20-150.26zm-152.73%20463.92l152.73%200%200%20-195.42%20125.63%200c128.92,0%20211.85,-56.66%20211.85,-201.99%200,-138.76%20-102.64,-188.86%20-211.85,-188.86l-278.35%200%200%20586.27zm689.32%20-463.92l121.52%200c42.7,0%2077.18,19.7%2077.18,63.22%200,45.16%20-24.63,68.97%20-70.61,68.97l-128.09%200%200%20-132.2zm-152.73%20463.92l152.73%200%200%20-213.49%20115.78%200c72.26,0%2081.28,60.76%2085.39,119.88%202.46,17.25%204.1,73.08%2017.24,93.61l151.09%200c-20.53,-22.99%20-22.17,-106.74%20-24.63,-132.2%20-4.11,-55.84%20-23.81,-124.8%20-85.4,-140.41l0%20-1.64c62.41,-23.81%2091.97,-83.75%2091.97,-146.98%200,-118.24%20-102.63,-165.04%20-205.27,-165.04l-298.88%200%200%20586.27zm1073.59%20-586.27l-152.72%200%200%20353.08c0,75.54%20-27.1,114.13%20-102.64,114.13%20-75.54,0%20-102.63,-38.59%20-102.63,-114.13l0%20-353.08%20-152.73%200%200%20344.04c0,169.97%2078,254.54%20255.36,254.54%20177.36,0%20255.36,-84.57%20255.36,-254.54l0%20-344.04zm42.29%20389.21c0,150.26%20120.7,209.38%20254.54,209.38%20128.91,0%20255.36,-47.62%20255.36,-196.24%200,-105.92%20-85.39,-145.33%20-169.97,-169.15%20-85.39,-23.81%20-169.97,-31.2%20-169.97,-77.19%200,-38.59%2041.05,-50.09%2073.9,-50.09%2045.98,0%2096.89,18.07%2094.43,70.62l152.72%200c0,-131.38%20-119.06,-188.86%20-234.83,-188.86%20-110.03,0%20-238.94,50.09%20-238.94,178.18%200,108.39%2088.68,145.33%20171.61,169.15%2084.57,23.81%20168.33,32.85%20168.33,85.39%200,43.52%20-47.62,59.94%20-93.61,59.94%20-65.68,0%20-107.56,-22.17%20-110.85,-91.14l-152.72%200zm495.53%20197.06l156.83%200%2036.95%20-105.1%20204.45%200%2036.13%20105.1%20159.3%200%20-219.24%20-586.27%20-155.18%200%20-219.24%20586.27zm295.6%20-423.69l1.64%200%2064.86%20205.27%20-133.02%200%2066.51%20-205.27zm1258.56%20423.69l152.73%200%200%20-586.27%20-152.73%200%200%20586.27zm231.14%200l143.69%200%200%20-365.39%201.64%200%20203.63%20365.39%20156.83%200%200%20-586.27%20-143.69%200%200%20361.28%20-1.64%200%20-203.63%20-361.28%20-156.83%200%200%20586.27zm584.21%200l152.73%200%200%20-180.64%2062.4%20-65.68%20157.65%20246.33%20189.68%200%20-243.87%20-355.53%20216.77%20-230.74%20-189.68%200%20-192.96%20224.98%200%20-224.98%20-152.73%200%200%20586.27z'/%3e%3cpolygon%20class='fil2'%20points='5483.86,0%204170.36,0%204170.36,486.71%205483.86,486.71%20'/%3e%3cpath%20class='fil3'%20d='M4377.66%20154.79l62.68%200c16.97,0%2033.08,7.4%2033.08,30.03%200,22.2%20-19.15,29.6%20-33.08,29.6l-62.68%200%200%20-59.63zm-80.96%20248.1l149.29%200c66.6,0%20121,-22.63%20121,-96.63%200,-35.26%20-20.46,-63.55%20-53.54,-73.56%2024.38,-12.19%2040.92,-34.82%2040.92,-62.68%200,-64.42%20-58.76,-79.22%20-112.29,-77.91l-145.38%200%200%20310.77zm80.96%20-136.24l64.85%200c24.37,0%2043.53,9.14%2043.53,36.56%200,25.68%20-17.84,34.82%20-43.53,34.82l-64.85%200%200%20-71.38zm219.59%20136.24l252.01%200%200%20-69.64%20-171.05%200%200%20-59.19%20152.34%200%200%20-62.68%20-152.34%200%200%20-54.41%20166.71%200%200%20-64.85%20-247.67%200%200%20310.77zm530.8%20-310.77l-266.38%200%200%2069.64%2092.71%200%200%20241.14%2080.96%200%200%20-241.14%2092.71%200%200%20-69.64zm-49.83%20310.77l83.13%200%2019.59%20-55.72%20108.38%200%2019.15%2055.72%2084.44%200%20-116.21%20-310.77%20-82.27%200%20-116.21%20310.77zm156.69%20-224.6l0.87%200%2034.39%20108.82%20-70.51%200%2035.26%20-108.82z'/%3e%3c/g%3e%3c/svg%3e",YO=Symbol.for("vuetify:v-item-group"),tK=de({...Ue(),...Ed({selectedClass:"v-item--selected"}),..._t(),...Lt()},"VItemGroup"),nK=ke()({name:"VItemGroup",props:tK(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{themeClasses:r}=Zt(e),{isSelected:s,select:i,next:o,prev:a,selected:l}=xu(e,YO);return()=>h(e.tag,{class:["v-item-group",r.value,e.class],style:e.style},{default:()=>{var u;return[(u=n.default)==null?void 0:u.call(n,{isSelected:s,select:i,next:o,prev:a,selected:l.value})]}})}}),rK=ke()({name:"VItem",props:Cd(),emits:{"group:selected":e=>!0},setup(e,t){let{slots:n}=t;const{isSelected:r,select:s,toggle:i,selectedClass:o,value:a,disabled:l}=Td(e,YO);return()=>{var u;return(u=n.default)==null?void 0:u.call(n,{isSelected:r.value,selectedClass:o.value,select:s,toggle:i,value:a.value,disabled:l.value})}}}),sK={class:"text-h5"},iK={key:0},oK={key:1},aK={class:"ml-3 align-center"},lK=Le({__name:"AddOrUpdatePrinterDialog",setup(e){const t=tn(nn.AddOrUpdatePrinterDialog),n=Wt(),r=o0(),s=Cm(),i=Qe("appConstants"),o=Dt(),a=j(null),l=j(!1),u=j(!1),c=j(!1),d=j(""),f=j(Oy()),p=A(()=>{var D,F,U,K;if(s.hasFeature("multiplePrinterServices")){const Q=s.getFeature("multiplePrinterServices"),H=(F=(D=Q==null?void 0:Q.subFeatures)==null?void 0:D.types)==null?void 0:F.includes("klipper"),V=(K=(U=Q==null?void 0:Q.subFeatures)==null?void 0:U.types)==null?void 0:K.includes("prusaLink");return[{name:Oc(ah),logo:$y,height:"60px"},...H?[{name:Oc(Fy),logo:ZG,height:"60px"}]:[],...V?[{name:Oc(lh),logo:eK,height:"20px"}]:[]]}return[{name:"OctoPrint",logo:$y,height:"75px"}]}),g=A(()=>{var D;return(D=n.updateDialogPrinter)==null?void 0:D.id});bt(async()=>{if(g.value){const D=n.printer(g.value);f.value=Qt.convertPrinterToCreateForm(D)}}),Ee(g,D=>{if(!D)return;const F=n.printer(D);f.value=Qt.convertPrinterToCreateForm(F)});const m=A(()=>n.updateDialogPrinter),y=A(()=>!!m.value),_=A(()=>y?"Save":"Create"),b=A(()=>{var D;return f?Sm((D=f.value)==null?void 0:D.name):"?"}),x=A(()=>({required:!0,max:i.maxPrinterNameLength})),C=A(()=>({required:!0,length:i.apiKeyLength,alpha_num:!0}));function S(){f.value=Oy()}function T(){c.value=!0}async function P(){if(!w())return;r.clearEvents(),T();const{correlationToken:D}=await r.createTestPrinter(f.value);r.currentCorrelationToken=D}const w=()=>{var F,U,K,Q,H,V,ee,q,G;const D=f.value;return D?lp(D.printerType)?((F=D.printerURL)==null?void 0:F.length)&&((U=D.name)==null?void 0:U.length):up(D.printerType)?((K=D.printerURL)==null?void 0:K.length)&&((Q=D.name)==null?void 0:Q.length)&&((H=D.username)==null?void 0:H.length)&&((V=D.password)==null?void 0:V.length):((ee=D.printerURL)==null?void 0:ee.length)&&((q=D.name)==null?void 0:q.length)&&((G=D.apiKey)==null?void 0:G.length):!1};async function E(D){await n.createPrinter(D,u.value),o.openInfoMessage({title:`Printer ${D.name} created`})}async function I(D){const F=D.id;await n.updatePrinter({printerId:F,updatedPrinter:D},u.value),o.openInfoMessage({title:`Printer ${D.name} updated`})}async function O(){var F,U,K,Q,H;if(!w())return;a.value=null,l.value=!0,(F=f.value.printerURL)!=null&&F.length&&!((U=f.value.printerURL)!=null&&U.startsWith("http://"))&&!((K=f.value.printerURL)!=null&&K.startsWith("https://"))&&(f.value.printerURL+="https://");const D=f.value;(lp(D.printerType)||up(D.printerType))&&(D.apiKey="");try{y.value?await I(D):await E(D),M()}catch(V){V instanceof eR?(a.value=((H=(Q=V.response)==null?void 0:Q.data)==null?void 0:H.error)||V.message,o.error("Validation Failed",V.message)):(a.value=V.message,o.error("Error",V.message))}finally{l.value=!1,u.value=!1}}async function R(){f.value.name=Bu(),n.updateDialogPrinter=void 0,a.value=null,u.value=!1,a.value=null}function M(){t.closeDialog(),u.value=!1,a.value=null,c.value=!1,r.clearEvents(),S(),n.updateDialogPrinter=void 0,d.value=""}return(D,F)=>{const U=JG,K=hi;return $(),te(K,{id:X(t).dialogId,"max-width":X(c)?"900px":"700px",onEscape:F[13]||(F[13]=Q=>M())},{default:v(()=>[h(yt,{class:"pa-4"},{default:v(()=>[h(sn,null,{default:v(()=>[L("span",sK,[h(ut,{color:"primary",size:"56"},{default:v(()=>[k(se(X(b)),1)]),_:1}),X(y)?($(),ve("span",iK," Updating Printer ")):($(),ve("span",oK," New Printer "))])]),_:1}),h(en,null,{default:v(()=>{var Q;return[F[16]||(F[16]=L("h4",null,"Printer type",-1)),h(nK,{modelValue:X(f).printerType,"onUpdate:modelValue":F[0]||(F[0]=H=>X(f).printerType=H),mandatory:""},{default:v(()=>[h(Hn,null,{default:v(()=>[h(rt,null,{default:v(()=>[($(!0),ve(Ae,null,Gt(X(p),H=>($(),te(ze,{key:H.name,cols:"4",md:"4"},{default:v(()=>[h(rK,null,{default:v(({isSelected:V,toggle:ee})=>[h(yt,{color:V?"primary":"blue-grey darken-4",class:"d-flex align-center justify-center elevation-8",height:"60px",width:"225px",onClick:ee},{default:v(()=>[h(ds,{height:H.height,src:H.logo,"max-width":"100px",width:"125px"},null,8,["height","src"]),h(dN,null,{default:v(()=>[L("h3",aK,se(H.name),1)]),_:2},1024)]),_:2},1032,["color","onClick"])]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"]),h(rt,null,{default:v(()=>[h(ze,{cols:X(c)?8:12},{default:v(()=>[X(f)?($(),te(rt,{key:0},{default:v(()=>[h(ze,null,{default:v(()=>[h(st,{modelValue:X(f).name,"onUpdate:modelValue":F[1]||(F[1]=H=>X(f).name=H),counter:X(x).max,autofocus:"",class:"ma-1",label:"Printer name*",required:""},null,8,["modelValue","counter"])]),_:1}),h(ze,null,{default:v(()=>[h(mn,{modelValue:X(f).enabled,"onUpdate:modelValue":F[2]||(F[2]=H=>X(f).enabled=H),hint:"Disabling makes the printer passive",label:"Enabled*","persistent-hint":"",required:""},null,8,["modelValue"])]),_:1})]),_:1})):pe("",!0),h(st,{modelValue:X(f).printerURL,"onUpdate:modelValue":F[3]||(F[3]=H=>X(f).printerURL=H),class:"ma-1",hint:"F.e. 'octopi.local' or 'https://my.printer.com'",label:"Printer URL*"},null,8,["modelValue"]),X(f).printerType===X(ah)?($(),te(st,{key:1,modelValue:X(f).apiKey,"onUpdate:modelValue":F[4]||(F[4]=H=>X(f).apiKey=H),counter:X(C).length,class:"ma-1",hint:"User or Application Key with 32 or 43 characters (Global API key will fail)",label:X(f).printerType===X(ah)||X(f).printerType===X(Fy)?"API Key (unsupported)":"API Key (required)*","persistent-hint":"",required:""},null,8,["modelValue","counter","label"])):pe("",!0),X(f).printerType===X(lh)?($(),te(st,{key:2,modelValue:X(f).username,"onUpdate:modelValue":F[5]||(F[5]=H=>X(f).username=H),class:"ma-1",hint:"Username (often 'maker')",label:"Username","persistent-hint":"",required:""},null,8,["modelValue"])):pe("",!0),X(f).printerType===X(lh)?($(),te(st,{key:3,modelValue:X(f).password,"onUpdate:modelValue":F[6]||(F[6]=H=>X(f).password=H),class:"ma-1",hint:"Password (visit your printer settings)",label:"Password","persistent-hint":"",required:""},null,8,["modelValue"])):pe("",!0)]),_:1},8,["cols"]),X(c)?($(),te(U,{key:0,cols:4},{default:v(()=>[h(re,{onClick:F[7]||(F[7]=H=>c.value=!1)},{default:v(()=>F[14]||(F[14]=[k(" Hide checks")])),_:1,__:[14]})]),_:1})):pe("",!0)]),_:1}),(Q=X(a))!=null&&Q.length?($(),te(fn,{key:0,class:"my-3",color:"primary"},{default:v(()=>[k(se(X(a))+" ",1),h(mn,{modelValue:X(u),"onUpdate:modelValue":F[8]||(F[8]=H=>et(u)?u.value=H:null),color:"warning",label:"Force save"},null,8,["modelValue"])]),_:1})):pe("",!0),X(l)?($(),te(fn,{key:1,class:"my-3"},{default:v(()=>[F[15]||(F[15]=k(" Validating printer ")),h(ni,{indeterminate:""})]),_:1,__:[15]})):pe("",!0)]}),_:1,__:[16]}),h(Mn,null,{default:v(()=>[F[20]||(F[20]=L("em",{class:"text-red"}," * indicates required field ",-1)),h(wn),h(re,{variant:"text",onClick:F[9]||(F[9]=Q=>M())},{default:v(()=>F[17]||(F[17]=[k(" Close ")])),_:1,__:[17]}),X(y)?($(),te(re,{key:0,color:"gray",variant:"text",onClick:F[10]||(F[10]=Q=>R())},{default:v(()=>F[18]||(F[18]=[k(" Duplicate ")])),_:1,__:[18]})):pe("",!0),h(re,{color:"warning",variant:"text",onClick:F[11]||(F[11]=Q=>P())},{default:v(()=>F[19]||(F[19]=[k(" Test connection ")])),_:1,__:[19]}),h(re,{color:"blue-darken-1",variant:"text",onClick:F[12]||(F[12]=Q=>O())},{default:v(()=>[k(se(X(_)),1)]),_:1})]),_:1,__:[20]})]),_:1})]),_:1},8,["id","max-width"])}}}),uK=de({text:String,...Ue(),..._t()},"VToolbarTitle"),En=ke()({name:"VToolbarTitle",props:uK(),setup(e,t){let{slots:n}=t;return Oe(()=>{const r=!!(n.default||n.text||e.text);return h(e.tag,{class:["v-toolbar-title",e.class],style:e.style},{default:()=>{var s;return[r&&h("div",{class:"v-toolbar-title__placeholder"},[n.text?n.text():e.text,(s=n.default)==null?void 0:s.call(n)])]}})}),{}}}),cK=[null,"prominent","default","comfortable","compact"],XO=de({absolute:Boolean,collapse:Boolean,color:String,density:{type:String,default:"default",validator:e=>cK.includes(e)},extended:Boolean,extensionHeight:{type:[Number,String],default:48},flat:Boolean,floating:Boolean,height:{type:[Number,String],default:64},image:String,title:String,...vs(),...Ue(),...bs(),...Dn(),..._t({tag:"header"}),...Lt()},"VToolbar"),mr=ke()({name:"VToolbar",props:XO(),setup(e,t){var p;let{slots:n}=t;const{backgroundColorClasses:r,backgroundColorStyles:s}=fr(()=>e.color),{borderClasses:i}=Ds(e),{elevationClasses:o}=Ls(e),{roundedClasses:a}=jn(e),{themeClasses:l}=Zt(e),{rtlClasses:u}=Dr(),c=Ie(!!(e.extended||(p=n.extension)!=null&&p.call(n))),d=A(()=>parseInt(Number(e.height)+(e.density==="prominent"?Number(e.height):0)-(e.density==="comfortable"?8:0)-(e.density==="compact"?16:0),10)),f=A(()=>c.value?parseInt(Number(e.extensionHeight)+(e.density==="prominent"?Number(e.extensionHeight):0)-(e.density==="comfortable"?4:0)-(e.density==="compact"?8:0),10):0);return Ir({VBtn:{variant:"text"}}),Oe(()=>{var _;const g=!!(e.title||n.title),m=!!(n.image||e.image),y=(_=n.extension)==null?void 0:_.call(n);return c.value=!!(e.extended||y),h(e.tag,{class:["v-toolbar",{"v-toolbar--absolute":e.absolute,"v-toolbar--collapse":e.collapse,"v-toolbar--flat":e.flat,"v-toolbar--floating":e.floating,[`v-toolbar--density-${e.density}`]:!0},r.value,i.value,o.value,a.value,l.value,u.value,e.class],style:[s.value,e.style]},{default:()=>[m&&h("div",{key:"image",class:"v-toolbar__image"},[n.image?h(Ot,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{cover:!0,src:e.image}}},n.image):h(ds,{key:"image-img",cover:!0,src:e.image},null)]),h(Ot,{defaults:{VTabs:{height:Ne(d.value)}}},{default:()=>{var b,x,C;return[h("div",{class:"v-toolbar__content",style:{height:Ne(d.value)}},[n.prepend&&h("div",{class:"v-toolbar__prepend"},[(b=n.prepend)==null?void 0:b.call(n)]),g&&h(En,{key:"title",text:e.title},{text:n.title}),(x=n.default)==null?void 0:x.call(n),n.append&&h("div",{class:"v-toolbar__append"},[(C=n.append)==null?void 0:C.call(n)])])]}}),h(Ot,{defaults:{VTabs:{height:Ne(f.value)}}},{default:()=>[h(bP,null,{default:()=>[c.value&&h("div",{class:"v-toolbar__extension",style:{height:Ne(f.value)}},[y])]})]})]})}),{contentHeight:d,extensionHeight:f}}}),dK=Le({__name:"HelpOverlay",setup(e){const t=j(!1);return(n,r)=>($(),te(PP,{modelValue:X(t),"onUpdate:modelValue":r[0]||(r[0]=s=>et(t)?t.value=s:null),fullscreen:"",eager:"",transition:"dialog-bottom-transition",width:"100%"},{activator:v(({props:s})=>[h(nt,{location:"top"},{activator:v(({props:i})=>[h(re,ge({icon:"help"},{...s,...i}),{default:v(()=>[h(J,null,{default:v(()=>r[1]||(r[1]=[k("help")])),_:1,__:[1]})]),_:2},1040)]),default:v(()=>[r[2]||(r[2]=L("span",null," Load the online documentation webpage ",-1))]),_:2,__:[2]},1024)]),default:v(({isActive:s})=>[h(yt,{height:"100%",width:"100%"},{default:v(()=>[h(mr,{color:"primary"},{default:v(()=>[h(J,{class:"ml-5"},{default:v(()=>r[3]||(r[3]=[k("help")])),_:1,__:[3]}),r[6]||(r[6]=L("h2",{class:"ml-10"},"FDM Monster Documentation",-1)),h(wn),r[7]||(r[7]=L("span",{class:"mr-10"}," docs.fdm-monster.net ",-1)),h(re,{variant:"flat",onClick:i=>s.value=!1},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>r[4]||(r[4]=[k("close")])),_:1,__:[4]}),r[5]||(r[5]=k(" Close help "))]),_:2,__:[5]},1032,["onClick"])]),_:2,__:[6,7]},1024),r[8]||(r[8]=L("iframe",{height:"100%",src:"https://docs.fdm-monster.net",style:{"background-color":"black","border-width":"0"},width:"100%"},null,-1))]),_:2,__:[8]},1024)]),_:1},8,["modelValue"]))}}),fK=Le({__name:"TooltipButton",props:{tooltip:{},color:{default:"white"},icon:{default:""},iconClass:{default:""},text:{default:""},location:{default:"bottom"}},emits:["click"],setup(e){const t=e;return(n,r)=>($(),te(nt,{location:t.location},{activator:v(({props:s})=>[h(re,ge(s,{variant:"outlined",class:"ml-2",color:n.color,onClick:r[0]||(r[0]=i=>n.$emit("click"))}),{default:v(()=>[Up(n.$slots,"default",{},()=>{var i;return[(i=t.icon)!=null&&i.length?($(),te(J,{key:0,class:zo("mr-2 "+t.iconClass)},{default:v(()=>[k(se(t.icon),1)]),_:1},8,["class"])):pe("",!0),k(" "+se(t.text),1)]})]),_:2},1040,["color"])]),default:v(()=>[L("span",null,se(t.tooltip),1)]),_:3},8,["location"]))}});/*!
|
|
67
|
+
* vue-router v4.5.1
|
|
68
|
+
* (c) 2025 Eduardo San Martin Morote
|
|
69
|
+
* @license MIT
|
|
70
|
+
*/const kl=typeof document<"u";function QO(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function hK(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&QO(e.default)}const Ct=Object.assign;function jg(e,t){const n={};for(const r in t){const s=t[r];n[r]=Os(s)?s.map(e):e(s)}return n}const Mc=()=>{},Os=Array.isArray,JO=/#/g,pK=/&/g,mK=/\//g,gK=/=/g,vK=/\?/g,ZO=/\+/g,yK=/%5B/g,bK=/%5D/g,e2=/%5E/g,_K=/%60/g,t2=/%7B/g,wK=/%7C/g,n2=/%7D/g,SK=/%20/g;function a0(e){return encodeURI(""+e).replace(wK,"|").replace(yK,"[").replace(bK,"]")}function kK(e){return a0(e).replace(t2,"{").replace(n2,"}").replace(e2,"^")}function ib(e){return a0(e).replace(ZO,"%2B").replace(SK,"+").replace(JO,"%23").replace(pK,"%26").replace(_K,"`").replace(t2,"{").replace(n2,"}").replace(e2,"^")}function xK(e){return ib(e).replace(gK,"%3D")}function EK(e){return a0(e).replace(JO,"%23").replace(vK,"%3F")}function CK(e){return e==null?"":EK(e).replace(mK,"%2F")}function ud(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const TK=/\/$/,PK=e=>e.replace(TK,"");function qg(e,t,n="/"){let r,s={},i="",o="";const a=t.indexOf("#");let l=t.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(r=t.slice(0,l),i=t.slice(l+1,a>-1?a:t.length),s=e(i)),a>-1&&(r=r||t.slice(0,a),o=t.slice(a,t.length)),r=OK(r??t,n),{fullPath:r+(i&&"?")+i+o,path:r,query:s,hash:ud(o)}}function RK(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Lk(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function IK(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&vu(t.matched[r],n.matched[s])&&r2(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function vu(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function r2(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!AK(e[n],t[n]))return!1;return!0}function AK(e,t){return Os(e)?$k(e,t):Os(t)?$k(t,e):e===t}function $k(e,t){return Os(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function OK(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),s=r[r.length-1];(s===".."||s===".")&&r.push("");let i=n.length-1,o,a;for(o=0;o<r.length;o++)if(a=r[o],a!==".")if(a==="..")i>1&&i--;else break;return n.slice(0,i).join("/")+"/"+r.slice(o).join("/")}const to={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var cd;(function(e){e.pop="pop",e.push="push"})(cd||(cd={}));var Dc;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Dc||(Dc={}));function MK(e){if(!e)if(kl){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),PK(e)}const DK=/^[^#]+#/;function LK(e,t){return e.replace(DK,"#")+t}function $K(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const Am=()=>({left:window.scrollX,top:window.scrollY});function FK(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;t=$K(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Fk(e,t){return(history.state?history.state.position-t:-1)+e}const ob=new Map;function NK(e,t){ob.set(e,t)}function VK(e){const t=ob.get(e);return ob.delete(e),t}let BK=()=>location.protocol+"//"+location.host;function s2(e,t){const{pathname:n,search:r,hash:s}=t,i=e.indexOf("#");if(i>-1){let a=s.includes(e.slice(i))?e.slice(i).length:1,l=s.slice(a);return l[0]!=="/"&&(l="/"+l),Lk(l,"")}return Lk(n,e)+r+s}function UK(e,t,n,r){let s=[],i=[],o=null;const a=({state:f})=>{const p=s2(e,location),g=n.value,m=t.value;let y=0;if(f){if(n.value=p,t.value=f,o&&o===g){o=null;return}y=m?f.position-m.position:0}else r(p);s.forEach(_=>{_(n.value,g,{delta:y,type:cd.pop,direction:y?y>0?Dc.forward:Dc.back:Dc.unknown})})};function l(){o=n.value}function u(f){s.push(f);const p=()=>{const g=s.indexOf(f);g>-1&&s.splice(g,1)};return i.push(p),p}function c(){const{history:f}=window;f.state&&f.replaceState(Ct({},f.state,{scroll:Am()}),"")}function d(){for(const f of i)f();i=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",c)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:l,listen:u,destroy:d}}function Nk(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?Am():null}}function zK(e){const{history:t,location:n}=window,r={value:s2(e,n)},s={value:t.state};s.value||i(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(l,u,c){const d=e.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+l:BK()+e+l;try{t[c?"replaceState":"pushState"](u,"",f),s.value=u}catch(p){console.error(p),n[c?"replace":"assign"](f)}}function o(l,u){const c=Ct({},t.state,Nk(s.value.back,l,s.value.forward,!0),u,{position:s.value.position});i(l,c,!0),r.value=l}function a(l,u){const c=Ct({},s.value,t.state,{forward:l,scroll:Am()});i(c.current,c,!0);const d=Ct({},Nk(r.value,l,null),{position:c.position+1},u);i(l,d,!1),r.value=l}return{location:r,state:s,push:a,replace:o}}function HK(e){e=MK(e);const t=zK(e),n=UK(e,t.state,t.location,t.replace);function r(i,o=!0){o||n.pauseListeners(),history.go(i)}const s=Ct({location:"",base:e,go:r,createHref:LK.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}function jK(e){return typeof e=="string"||e&&typeof e=="object"}function i2(e){return typeof e=="string"||typeof e=="symbol"}const o2=Symbol("");var Vk;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Vk||(Vk={}));function yu(e,t){return Ct(new Error,{type:e,[o2]:!0},t)}function _i(e,t){return e instanceof Error&&o2 in e&&(t==null||!!(e.type&t))}const Bk="[^/]+?",qK={sensitive:!1,strict:!1,start:!0,end:!0},WK=/[.+*?^${}()[\]/\\]/g;function GK(e,t){const n=Ct({},qK,t),r=[];let s=n.start?"^":"";const i=[];for(const u of e){const c=u.length?[]:[90];n.strict&&!u.length&&(s+="/");for(let d=0;d<u.length;d++){const f=u[d];let p=40+(n.sensitive?.25:0);if(f.type===0)d||(s+="/"),s+=f.value.replace(WK,"\\$&"),p+=40;else if(f.type===1){const{value:g,repeatable:m,optional:y,regexp:_}=f;i.push({name:g,repeatable:m,optional:y});const b=_||Bk;if(b!==Bk){p+=10;try{new RegExp(`(${b})`)}catch(C){throw new Error(`Invalid custom RegExp for param "${g}" (${b}): `+C.message)}}let x=m?`((?:${b})(?:/(?:${b}))*)`:`(${b})`;d||(x=y&&u.length<2?`(?:/${x})`:"/"+x),y&&(x+="?"),s+=x,p+=20,y&&(p+=-8),m&&(p+=-20),b===".*"&&(p+=-50)}c.push(p)}r.push(c)}if(n.strict&&n.end){const u=r.length-1;r[u][r[u].length-1]+=.7000000000000001}n.strict||(s+="/?"),n.end?s+="$":n.strict&&!s.endsWith("/")&&(s+="(?:/|$)");const o=new RegExp(s,n.sensitive?"":"i");function a(u){const c=u.match(o),d={};if(!c)return null;for(let f=1;f<c.length;f++){const p=c[f]||"",g=i[f-1];d[g.name]=p&&g.repeatable?p.split("/"):p}return d}function l(u){let c="",d=!1;for(const f of e){(!d||!c.endsWith("/"))&&(c+="/"),d=!1;for(const p of f)if(p.type===0)c+=p.value;else if(p.type===1){const{value:g,repeatable:m,optional:y}=p,_=g in u?u[g]:"";if(Os(_)&&!m)throw new Error(`Provided param "${g}" is an array but it is not repeatable (* or + modifiers)`);const b=Os(_)?_.join("/"):_;if(!b)if(y)f.length<2&&(c.endsWith("/")?c=c.slice(0,-1):d=!0);else throw new Error(`Missing required param "${g}"`);c+=b}}return c||"/"}return{re:o,score:r,keys:i,parse:a,stringify:l}}function KK(e,t){let n=0;for(;n<e.length&&n<t.length;){const r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function a2(e,t){let n=0;const r=e.score,s=t.score;for(;n<r.length&&n<s.length;){const i=KK(r[n],s[n]);if(i)return i;n++}if(Math.abs(s.length-r.length)===1){if(Uk(r))return 1;if(Uk(s))return-1}return s.length-r.length}function Uk(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const YK={type:0,value:""},XK=/[a-zA-Z0-9_]/;function QK(e){if(!e)return[[]];if(e==="/")return[[YK]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${n})/"${u}": ${p}`)}let n=0,r=n;const s=[];let i;function o(){i&&s.push(i),i=[]}let a=0,l,u="",c="";function d(){u&&(n===0?i.push({type:0,value:u}):n===1||n===2||n===3?(i.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:u,regexp:c,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),u="")}function f(){u+=l}for(;a<e.length;){if(l=e[a++],l==="\\"&&n!==2){r=n,n=4;continue}switch(n){case 0:l==="/"?(u&&d(),o()):l===":"?(d(),n=1):f();break;case 4:f(),n=r;break;case 1:l==="("?n=2:XK.test(l)?f():(d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case 2:l===")"?c[c.length-1]=="\\"?c=c.slice(0,-1)+l:n=3:c+=l;break;case 3:d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--,c="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${u}"`),d(),o(),s}function JK(e,t,n){const r=GK(QK(e.path),n),s=Ct(r,{record:e,parent:t,children:[],alias:[]});return t&&!s.record.aliasOf==!t.record.aliasOf&&t.children.push(s),s}function ZK(e,t){const n=[],r=new Map;t=qk({strict:!1,end:!0,sensitive:!1},t);function s(d){return r.get(d)}function i(d,f,p){const g=!p,m=Hk(d);m.aliasOf=p&&p.record;const y=qk(t,d),_=[m];if("alias"in d){const C=typeof d.alias=="string"?[d.alias]:d.alias;for(const S of C)_.push(Hk(Ct({},m,{components:p?p.record.components:m.components,path:S,aliasOf:p?p.record:m})))}let b,x;for(const C of _){const{path:S}=C;if(f&&S[0]!=="/"){const T=f.record.path,P=T[T.length-1]==="/"?"":"/";C.path=f.record.path+(S&&P+S)}if(b=JK(C,f,y),p?p.alias.push(b):(x=x||b,x!==b&&x.alias.push(b),g&&d.name&&!jk(b)&&o(d.name)),l2(b)&&l(b),m.children){const T=m.children;for(let P=0;P<T.length;P++)i(T[P],b,p&&p.children[P])}p=p||b}return x?()=>{o(x)}:Mc}function o(d){if(i2(d)){const f=r.get(d);f&&(r.delete(d),n.splice(n.indexOf(f),1),f.children.forEach(o),f.alias.forEach(o))}else{const f=n.indexOf(d);f>-1&&(n.splice(f,1),d.record.name&&r.delete(d.record.name),d.children.forEach(o),d.alias.forEach(o))}}function a(){return n}function l(d){const f=nY(d,n);n.splice(f,0,d),d.record.name&&!jk(d)&&r.set(d.record.name,d)}function u(d,f){let p,g={},m,y;if("name"in d&&d.name){if(p=r.get(d.name),!p)throw yu(1,{location:d});y=p.record.name,g=Ct(zk(f.params,p.keys.filter(x=>!x.optional).concat(p.parent?p.parent.keys.filter(x=>x.optional):[]).map(x=>x.name)),d.params&&zk(d.params,p.keys.map(x=>x.name))),m=p.stringify(g)}else if(d.path!=null)m=d.path,p=n.find(x=>x.re.test(m)),p&&(g=p.parse(m),y=p.record.name);else{if(p=f.name?r.get(f.name):n.find(x=>x.re.test(f.path)),!p)throw yu(1,{location:d,currentLocation:f});y=p.record.name,g=Ct({},f.params,d.params),m=p.stringify(g)}const _=[];let b=p;for(;b;)_.unshift(b.record),b=b.parent;return{name:y,path:m,params:g,matched:_,meta:tY(_)}}e.forEach(d=>i(d));function c(){n.length=0,r.clear()}return{addRoute:i,resolve:u,removeRoute:o,clearRoutes:c,getRoutes:a,getRecordMatcher:s}}function zk(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function Hk(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:eY(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function eY(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function jk(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function tY(e){return e.reduce((t,n)=>Ct(t,n.meta),{})}function qk(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function nY(e,t){let n=0,r=t.length;for(;n!==r;){const i=n+r>>1;a2(e,t[i])<0?r=i:n=i+1}const s=rY(e);return s&&(r=t.lastIndexOf(s,r-1)),r}function rY(e){let t=e;for(;t=t.parent;)if(l2(t)&&a2(e,t)===0)return t}function l2({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function sY(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;s<r.length;++s){const i=r[s].replace(ZO," "),o=i.indexOf("="),a=ud(o<0?i:i.slice(0,o)),l=o<0?null:ud(i.slice(o+1));if(a in t){let u=t[a];Os(u)||(u=t[a]=[u]),u.push(l)}else t[a]=l}return t}function Wk(e){let t="";for(let n in e){const r=e[n];if(n=xK(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(Os(r)?r.map(i=>i&&ib(i)):[r&&ib(r)]).forEach(i=>{i!==void 0&&(t+=(t.length?"&":"")+n,i!=null&&(t+="="+i))})}return t}function iY(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=Os(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}const oY=Symbol(""),Gk=Symbol(""),Om=Symbol(""),l0=Symbol(""),ab=Symbol("");function nc(){let e=[];function t(r){return e.push(r),()=>{const s=e.indexOf(r);s>-1&&e.splice(s,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function fo(e,t,n,r,s,i=o=>o()){const o=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((a,l)=>{const u=f=>{f===!1?l(yu(4,{from:n,to:t})):f instanceof Error?l(f):jK(f)?l(yu(2,{from:t,to:f})):(o&&r.enterCallbacks[s]===o&&typeof f=="function"&&o.push(f),a())},c=i(()=>e.call(r&&r.instances[s],t,n,u));let d=Promise.resolve(c);e.length<3&&(d=d.then(u)),d.catch(f=>l(f))})}function Wg(e,t,n,r,s=i=>i()){const i=[];for(const o of e)for(const a in o.components){let l=o.components[a];if(!(t!=="beforeRouteEnter"&&!o.instances[a]))if(QO(l)){const c=(l.__vccOpts||l)[t];c&&i.push(fo(c,n,r,o,a,s))}else{let u=l();i.push(()=>u.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const d=hK(c)?c.default:c;o.mods[a]=c,o.components[a]=d;const p=(d.__vccOpts||d)[t];return p&&fo(p,n,r,o,a,s)()}))}}return i}function Kk(e){const t=Qe(Om),n=Qe(l0),r=A(()=>{const l=X(e.to);return t.resolve(l)}),s=A(()=>{const{matched:l}=r.value,{length:u}=l,c=l[u-1],d=n.matched;if(!c||!d.length)return-1;const f=d.findIndex(vu.bind(null,c));if(f>-1)return f;const p=Yk(l[u-2]);return u>1&&Yk(c)===p&&d[d.length-1].path!==p?d.findIndex(vu.bind(null,l[u-2])):f}),i=A(()=>s.value>-1&&dY(n.params,r.value.params)),o=A(()=>s.value>-1&&s.value===n.matched.length-1&&r2(n.params,r.value.params));function a(l={}){if(cY(l)){const u=t[X(e.replace)?"replace":"push"](X(e.to)).catch(Mc);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:r,href:A(()=>r.value.href),isActive:i,isExactActive:o,navigate:a}}function aY(e){return e.length===1?e[0]:e}const lY=Le({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Kk,setup(e,{slots:t}){const n=cn(Kk(e)),{options:r}=Qe(Om),s=A(()=>({[Xk(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[Xk(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&aY(t.default(n));return e.custom?i:pr("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},i)}}}),uY=lY;function cY(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function dY(e,t){for(const n in t){const r=t[n],s=e[n];if(typeof r=="string"){if(r!==s)return!1}else if(!Os(s)||s.length!==r.length||r.some((i,o)=>i!==s[o]))return!1}return!0}function Yk(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Xk=(e,t,n)=>e??t??n,fY=Le({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=Qe(ab),s=A(()=>e.route||r.value),i=Qe(Gk,0),o=A(()=>{let u=X(i);const{matched:c}=s.value;let d;for(;(d=c[u])&&!d.components;)u++;return u}),a=A(()=>s.value.matched[o.value]);Kt(Gk,A(()=>o.value+1)),Kt(oY,a),Kt(ab,s);const l=j();return Ee(()=>[l.value,a.value,e.name],([u,c,d],[f,p,g])=>{c&&(c.instances[d]=u,p&&p!==c&&u&&u===f&&(c.leaveGuards.size||(c.leaveGuards=p.leaveGuards),c.updateGuards.size||(c.updateGuards=p.updateGuards))),u&&c&&(!p||!vu(c,p)||!f)&&(c.enterCallbacks[d]||[]).forEach(m=>m(u))},{flush:"post"}),()=>{const u=s.value,c=e.name,d=a.value,f=d&&d.components[c];if(!f)return Qk(n.default,{Component:f,route:u});const p=d.props[c],g=p?p===!0?u.params:typeof p=="function"?p(u):p:null,y=pr(f,Ct({},g,t,{onVnodeUnmounted:_=>{_.component.isUnmounted&&(d.instances[c]=null)},ref:l}));return Qk(n.default,{Component:y,route:u})||y}}});function Qk(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const hY=fY;function pY(e){const t=ZK(e.routes,e),n=e.parseQuery||sY,r=e.stringifyQuery||Wk,s=e.history,i=nc(),o=nc(),a=nc(),l=Ie(to);let u=to;kl&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=jg.bind(null,Z=>""+Z),d=jg.bind(null,CK),f=jg.bind(null,ud);function p(Z,he){let ne,z;return i2(Z)?(ne=t.getRecordMatcher(Z),z=he):z=Z,t.addRoute(z,ne)}function g(Z){const he=t.getRecordMatcher(Z);he&&t.removeRoute(he)}function m(){return t.getRoutes().map(Z=>Z.record)}function y(Z){return!!t.getRecordMatcher(Z)}function _(Z,he){if(he=Ct({},he||l.value),typeof Z=="string"){const B=qg(n,Z,he.path),Y=t.resolve({path:B.path},he),fe=s.createHref(B.fullPath);return Ct(B,Y,{params:f(Y.params),hash:ud(B.hash),redirectedFrom:void 0,href:fe})}let ne;if(Z.path!=null)ne=Ct({},Z,{path:qg(n,Z.path,he.path).path});else{const B=Ct({},Z.params);for(const Y in B)B[Y]==null&&delete B[Y];ne=Ct({},Z,{params:d(B)}),he.params=d(he.params)}const z=t.resolve(ne,he),xe=Z.hash||"";z.params=c(f(z.params));const Fe=RK(r,Ct({},Z,{hash:kK(xe),path:z.path})),N=s.createHref(Fe);return Ct({fullPath:Fe,hash:xe,query:r===Wk?iY(Z.query):Z.query||{}},z,{redirectedFrom:void 0,href:N})}function b(Z){return typeof Z=="string"?qg(n,Z,l.value.path):Ct({},Z)}function x(Z,he){if(u!==Z)return yu(8,{from:he,to:Z})}function C(Z){return P(Z)}function S(Z){return C(Ct(b(Z),{replace:!0}))}function T(Z){const he=Z.matched[Z.matched.length-1];if(he&&he.redirect){const{redirect:ne}=he;let z=typeof ne=="function"?ne(Z):ne;return typeof z=="string"&&(z=z.includes("?")||z.includes("#")?z=b(z):{path:z},z.params={}),Ct({query:Z.query,hash:Z.hash,params:z.path!=null?{}:Z.params},z)}}function P(Z,he){const ne=u=_(Z),z=l.value,xe=Z.state,Fe=Z.force,N=Z.replace===!0,B=T(ne);if(B)return P(Ct(b(B),{state:typeof B=="object"?Ct({},xe,B.state):xe,force:Fe,replace:N}),he||ne);const Y=ne;Y.redirectedFrom=he;let fe;return!Fe&&IK(r,z,ne)&&(fe=yu(16,{to:Y,from:z}),ee(z,z,!0,!1)),(fe?Promise.resolve(fe):I(Y,z)).catch(ce=>_i(ce)?_i(ce,2)?ce:V(ce):Q(ce,Y,z)).then(ce=>{if(ce){if(_i(ce,2))return P(Ct({replace:N},b(ce.to),{state:typeof ce.to=="object"?Ct({},xe,ce.to.state):xe,force:Fe}),he||Y)}else ce=R(Y,z,!0,N,xe);return O(Y,z,ce),ce})}function w(Z,he){const ne=x(Z,he);return ne?Promise.reject(ne):Promise.resolve()}function E(Z){const he=le.values().next().value;return he&&typeof he.runWithContext=="function"?he.runWithContext(Z):Z()}function I(Z,he){let ne;const[z,xe,Fe]=mY(Z,he);ne=Wg(z.reverse(),"beforeRouteLeave",Z,he);for(const B of z)B.leaveGuards.forEach(Y=>{ne.push(fo(Y,Z,he))});const N=w.bind(null,Z,he);return ne.push(N),we(ne).then(()=>{ne=[];for(const B of i.list())ne.push(fo(B,Z,he));return ne.push(N),we(ne)}).then(()=>{ne=Wg(xe,"beforeRouteUpdate",Z,he);for(const B of xe)B.updateGuards.forEach(Y=>{ne.push(fo(Y,Z,he))});return ne.push(N),we(ne)}).then(()=>{ne=[];for(const B of Fe)if(B.beforeEnter)if(Os(B.beforeEnter))for(const Y of B.beforeEnter)ne.push(fo(Y,Z,he));else ne.push(fo(B.beforeEnter,Z,he));return ne.push(N),we(ne)}).then(()=>(Z.matched.forEach(B=>B.enterCallbacks={}),ne=Wg(Fe,"beforeRouteEnter",Z,he,E),ne.push(N),we(ne))).then(()=>{ne=[];for(const B of o.list())ne.push(fo(B,Z,he));return ne.push(N),we(ne)}).catch(B=>_i(B,8)?B:Promise.reject(B))}function O(Z,he,ne){a.list().forEach(z=>E(()=>z(Z,he,ne)))}function R(Z,he,ne,z,xe){const Fe=x(Z,he);if(Fe)return Fe;const N=he===to,B=kl?history.state:{};ne&&(z||N?s.replace(Z.fullPath,Ct({scroll:N&&B&&B.scroll},xe)):s.push(Z.fullPath,xe)),l.value=Z,ee(Z,he,ne,N),V()}let M;function D(){M||(M=s.listen((Z,he,ne)=>{if(!ie.listening)return;const z=_(Z),xe=T(z);if(xe){P(Ct(xe,{replace:!0,force:!0}),z).catch(Mc);return}u=z;const Fe=l.value;kl&&NK(Fk(Fe.fullPath,ne.delta),Am()),I(z,Fe).catch(N=>_i(N,12)?N:_i(N,2)?(P(Ct(b(N.to),{force:!0}),z).then(B=>{_i(B,20)&&!ne.delta&&ne.type===cd.pop&&s.go(-1,!1)}).catch(Mc),Promise.reject()):(ne.delta&&s.go(-ne.delta,!1),Q(N,z,Fe))).then(N=>{N=N||R(z,Fe,!1),N&&(ne.delta&&!_i(N,8)?s.go(-ne.delta,!1):ne.type===cd.pop&&_i(N,20)&&s.go(-1,!1)),O(z,Fe,N)}).catch(Mc)}))}let F=nc(),U=nc(),K;function Q(Z,he,ne){V(Z);const z=U.list();return z.length?z.forEach(xe=>xe(Z,he,ne)):console.error(Z),Promise.reject(Z)}function H(){return K&&l.value!==to?Promise.resolve():new Promise((Z,he)=>{F.add([Z,he])})}function V(Z){return K||(K=!Z,D(),F.list().forEach(([he,ne])=>Z?ne(Z):he()),F.reset()),Z}function ee(Z,he,ne,z){const{scrollBehavior:xe}=e;if(!kl||!xe)return Promise.resolve();const Fe=!ne&&VK(Fk(Z.fullPath,0))||(z||!ne)&&history.state&&history.state.scroll||null;return Mt().then(()=>xe(Z,he,Fe)).then(N=>N&&FK(N)).catch(N=>Q(N,Z,he))}const q=Z=>s.go(Z);let G;const le=new Set,ie={currentRoute:l,listening:!0,addRoute:p,removeRoute:g,clearRoutes:t.clearRoutes,hasRoute:y,getRoutes:m,resolve:_,options:e,push:C,replace:S,go:q,back:()=>q(-1),forward:()=>q(1),beforeEach:i.add,beforeResolve:o.add,afterEach:a.add,onError:U.add,isReady:H,install(Z){const he=this;Z.component("RouterLink",uY),Z.component("RouterView",hY),Z.config.globalProperties.$router=he,Object.defineProperty(Z.config.globalProperties,"$route",{enumerable:!0,get:()=>X(l)}),kl&&!G&&l.value===to&&(G=!0,C(s.location).catch(xe=>{}));const ne={};for(const xe in to)Object.defineProperty(ne,xe,{get:()=>l.value[xe],enumerable:!0});Z.provide(Om,he),Z.provide(l0,Dp(ne)),Z.provide(ab,l);const z=Z.unmount;le.add(Z),Z.unmount=function(){le.delete(Z),le.size<1&&(u=to,M&&M(),M=null,l.value=to,G=!1,K=!1),z()}}};function we(Z){return Z.reduce((he,ne)=>he.then(()=>E(ne)),Promise.resolve())}return ie}function mY(e,t){const n=[],r=[],s=[],i=Math.max(t.matched.length,e.matched.length);for(let o=0;o<i;o++){const a=t.matched[o];a&&(e.matched.find(u=>vu(u,a))?r.push(a):n.push(a));const l=e.matched[o];l&&(t.matched.find(u=>vu(u,l))||s.push(l))}return[n,r,s]}function Ko(){return Qe(Om)}function u2(e){return Qe(l0)}const gY={class:"text-center"},vY={class:"float-end"},yY=Le({__name:"PrintJobsMenu",setup(e){const t=rr(),n=j(""),r=j(!1),s=A(()=>t.printersWithJob.filter(a=>{var p,g,m,y;const l=(g=(p=a.job)==null?void 0:p.job)==null?void 0:g.file.name,u=(l==null?void 0:l.toLowerCase())||"",c=((m=a.printer.printerURL)==null?void 0:m.toLowerCase())||"",d=((y=a.printer.name)==null?void 0:y.toLowerCase())||"",f=`${u} ${c} ${d}`;return!n.value||f.includes(n.value.toLowerCase())})),i=A(()=>s.value.length||0);function o(a){return a?a==null?void 0:a.toFixed(0):""}return Ee(r,()=>{n.value=""}),(a,l)=>($(),ve("div",gY,[h(Pm,{modelValue:X(r),"onUpdate:modelValue":l[3]||(l[3]=u=>et(r)?r.value=u:null),"close-on-content-click":!1,"nudge-width":400,location:"bottom right","offset-x":"","offset-y":"",transition:"slide-x-transition"},{activator:v(({props:u})=>[h(re,ge({color:X(i)?"green":"secondary",dark:""},u),{default:v(()=>[L("span",null," Print jobs "+se(X(i)?`(${X(i)})`:""),1),h(J,{end:""},{default:v(()=>l[4]||(l[4]=[k(" work ")])),_:1,__:[4]})]),_:2},1040,["color"])]),default:v(()=>[h(yt,{class:"d-flex flex-column","min-width":"300"},{default:v(()=>[h(Bt,{style:{"overflow-y":"hidden","flex-shrink":"0"}},{default:v(()=>[h(Ve,null,{prepend:v(()=>[h(ut,{class:"font-weight-bold",color:"primary",size:"44"},{default:v(()=>[k(se(X(i)),1)]),_:1})]),default:v(()=>[h(ct,null,{default:v(()=>[l[7]||(l[7]=k(" Print Jobs ")),L("span",vY,[h(re,{variant:"tonal",onClick:l[0]||(l[0]=u=>r.value=!1)},{default:v(()=>[h(J,null,{default:v(()=>l[5]||(l[5]=[k("close")])),_:1,__:[5]}),l[6]||(l[6]=k("Close "))]),_:1,__:[6]})])]),_:1,__:[7]}),h(pu,{class:"mt-2"},{default:v(()=>[h(st,{modelValue:X(n),"onUpdate:modelValue":l[1]||(l[1]=u=>et(n)?n.value=u:null),autofocus:"",class:"p-2",clearable:"",label:"Search jobs or printers","persistent-placeholder":"",placeholder:"Type part of a filename or printer name to search","prepend-icon":"search",style:{"min-width":"900px"}},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),h(dn),h(Bt,{style:{"overflow-y":"auto","flex-shrink":"1"}},{default:v(()=>[X(i)?pe("",!0):($(),te(Ve,{key:0},{default:v(()=>l[8]||(l[8]=[k(" No active prints ")])),_:1,__:[8]})),($(!0),ve(Ae,null,Gt(X(s),({printer:u,job:c})=>($(),te(Ve,{key:u.id,lines:"two"},{prepend:v(()=>[h(ut,{size:"70"},{default:v(()=>{var d;return[h(ni,{"model-value":(d=c==null?void 0:c.progress)==null?void 0:d.completion,width:5,color:"green",size:"50"},{default:v(()=>{var f;return[k(se(o((f=c.progress)==null?void 0:f.completion)+"%"||""),1)]}),_:2},1032,["model-value"])]}),_:2},1024)]),default:v(()=>[h(ct,null,{default:v(()=>{var d,f;return[k(se((f=(d=c.job)==null?void 0:d.file)==null?void 0:f.name),1)]}),_:2},1024),h(vt,null,{default:v(()=>[k(" Elapsed: "+se(Math.round((c==null?void 0:c.progress.printTime)??0/60))+" minutes ",1),l[9]||(l[9]=L("br",null,null,-1)),k(" Printer: "+se(u.name),1)]),_:2,__:[9]},1024)]),_:2},1024))),128))]),_:1}),h(Mn,null,{default:v(()=>[h(wn),h(re,{onClick:l[2]||(l[2]=u=>r.value=!1)},{default:v(()=>l[10]||(l[10]=[k(" Close ")])),_:1,__:[10]})]),_:1})]),_:1})]),_:1},8,["modelValue"])]))}}),u0=gs("profile",{state:()=>({username:null,isDemoUser:null,userId:null}),actions:{async getProfile(){return await ts.getProfile().then(e=>{this.username=e.username,this.userId=e.id,this.isDemoUser=e.isDemoUser})}}}),qt={Home:"Home",Login:"Login",Registration:"Registration",PrintersView:"PrintersView",Settings:"Settings",CameraGridView:"CameraGridView",PrintStatistics:"Print Statistics",About:"About",PermissionDenied:"PermissionDenied",NotFound:"NotFound",FirstTimeSetup:"FirstTimeSetup",ServerProtection:"ServerProtection"};async function bY(e,t){return e.push({name:t})}async function c2(e){if(e.currentRoute.value.path==="/login"){console.log("routeToLogin: already at login page");return}return bY(e,qt.Login)}const Jk=!0,_Y=()=>Object.freeze({apiKeyLength:43,maxPort:65535,maxPrinterNameLength:25,maxPrinterGroupNameLength:30,maxPrinterGroupLocationX:4,maxPrinterGroupLocationY:4,minPrinterFloorNameLength:3,minUsernameLength:3}),ui=Object.create(null);ui.open="0";ui.close="1";ui.ping="2";ui.pong="3";ui.message="4";ui.upgrade="5";ui.noop="6";const hh=Object.create(null);Object.keys(ui).forEach(e=>{hh[ui[e]]=e});const lb={type:"error",data:"parser error"},d2=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",f2=typeof ArrayBuffer=="function",h2=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,c0=({type:e,data:t},n,r)=>d2&&t instanceof Blob?n?r(t):Zk(t,r):f2&&(t instanceof ArrayBuffer||h2(t))?n?r(t):Zk(new Blob([t]),r):r(ui[e]+(t||"")),Zk=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function ex(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Gg;function wY(e,t){if(d2&&e.data instanceof Blob)return e.data.arrayBuffer().then(ex).then(t);if(f2&&(e.data instanceof ArrayBuffer||h2(e.data)))return t(ex(e.data));c0(e,!1,n=>{Gg||(Gg=new TextEncoder),t(Gg.encode(n))})}const tx="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",pc=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<tx.length;e++)pc[tx.charCodeAt(e)]=e;const SY=e=>{let t=e.length*.75,n=e.length,r,s=0,i,o,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),c=new Uint8Array(u);for(r=0;r<n;r+=4)i=pc[e.charCodeAt(r)],o=pc[e.charCodeAt(r+1)],a=pc[e.charCodeAt(r+2)],l=pc[e.charCodeAt(r+3)],c[s++]=i<<2|o>>4,c[s++]=(o&15)<<4|a>>2,c[s++]=(a&3)<<6|l&63;return u},kY=typeof ArrayBuffer=="function",d0=(e,t)=>{if(typeof e!="string")return{type:"message",data:p2(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:xY(e.substring(1),t)}:hh[n]?e.length>1?{type:hh[n],data:e.substring(1)}:{type:hh[n]}:lb},xY=(e,t)=>{if(kY){const n=SY(e);return p2(n,t)}else return{base64:!0,data:e}},p2=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},m2="",EY=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((i,o)=>{c0(i,!1,a=>{r[o]=a,++s===n&&t(r.join(m2))})})},CY=(e,t)=>{const n=e.split(m2),r=[];for(let s=0;s<n.length;s++){const i=d0(n[s],t);if(r.push(i),i.type==="error")break}return r};function TY(){return new TransformStream({transform(e,t){wY(e,n=>{const r=n.length;let s;if(r<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,r);else if(r<65536){s=new Uint8Array(3);const i=new DataView(s.buffer);i.setUint8(0,126),i.setUint16(1,r)}else{s=new Uint8Array(9);const i=new DataView(s.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(s[0]|=128),t.enqueue(s),t.enqueue(n)})}})}let Kg;function Sf(e){return e.reduce((t,n)=>t+n.length,0)}function kf(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let s=0;s<t;s++)n[s]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function PY(e,t){Kg||(Kg=new TextDecoder);const n=[];let r=0,s=-1,i=!1;return new TransformStream({transform(o,a){for(n.push(o);;){if(r===0){if(Sf(n)<1)break;const l=kf(n,1);i=(l[0]&128)===128,s=l[0]&127,s<126?r=3:s===126?r=1:r=2}else if(r===1){if(Sf(n)<2)break;const l=kf(n,2);s=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(Sf(n)<8)break;const l=kf(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),c=u.getUint32(0);if(c>Math.pow(2,21)-1){a.enqueue(lb);break}s=c*Math.pow(2,32)+u.getUint32(4),r=3}else{if(Sf(n)<s)break;const l=kf(n,s);a.enqueue(d0(i?l:Kg.decode(l),t)),r=0}if(s===0||s>e){a.enqueue(lb);break}}}})}const g2=4;function _n(e){if(e)return RY(e)}function RY(e){for(var t in _n.prototype)e[t]=_n.prototype[t];return e}_n.prototype.on=_n.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};_n.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};_n.prototype.off=_n.prototype.removeListener=_n.prototype.removeAllListeners=_n.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,s=0;s<n.length;s++)if(r=n[s],r===t||r.fn===t){n.splice(s,1);break}return n.length===0&&delete this._callbacks["$"+e],this};_n.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,s=n.length;r<s;++r)n[r].apply(this,t)}return this};_n.prototype.emitReserved=_n.prototype.emit;_n.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};_n.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Mm=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),rs=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),IY="arraybuffer";function v2(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const AY=rs.setTimeout,OY=rs.clearTimeout;function Dm(e,t){t.useNativeTimers?(e.setTimeoutFn=AY.bind(rs),e.clearTimeoutFn=OY.bind(rs)):(e.setTimeoutFn=rs.setTimeout.bind(rs),e.clearTimeoutFn=rs.clearTimeout.bind(rs))}const MY=1.33;function DY(e){return typeof e=="string"?LY(e):Math.ceil((e.byteLength||e.size)*MY)}function LY(e){let t=0,n=0;for(let r=0,s=e.length;r<s;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function y2(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function $Y(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function FY(e){let t={},n=e.split("&");for(let r=0,s=n.length;r<s;r++){let i=n[r].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}class NY extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class f0 extends _n{constructor(t){super(),this.writable=!1,Dm(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new NY(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=d0(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=$Y(t);return n.length?"?"+n:""}}class VY extends f0{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};CY(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,EY(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=y2()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let b2=!1;try{b2=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const BY=b2;function UY(){}class zY extends VY{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(s,i)=>{this.onError("xhr post error",s,i)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}let Vl=class ph extends _n{constructor(t,n,r){super(),this.createRequest=t,Dm(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=v2(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&r.setRequestHeader(s,this._opts.extraHeaders[s])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var s;r.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document<"u"&&(this._index=ph.requestsCount++,ph.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=UY,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete ph.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};Vl.requestsCount=0;Vl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",nx);else if(typeof addEventListener=="function"){const e="onpagehide"in rs?"pagehide":"unload";addEventListener(e,nx,!1)}}function nx(){for(let e in Vl.requests)Vl.requests.hasOwnProperty(e)&&Vl.requests[e].abort()}const HY=function(){const e=_2({xdomain:!1});return e&&e.responseType!==null}();class jY extends zY{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=HY&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Vl(_2,this.uri(),t)}}function _2(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||BY))return new XMLHttpRequest}catch{}if(!t)try{return new rs[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const w2=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class qY extends f0{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=w2?{}:v2(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;c0(r,this.supportsBinary,i=>{try{this.doWrite(r,i)}catch{}s&&Mm(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=y2()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Yg=rs.WebSocket||rs.MozWebSocket;class WY extends qY{createSocket(t,n,r){return w2?new Yg(t,n,r):n?new Yg(t,n):new Yg(t)}doWrite(t,n){this.ws.send(n)}}class GY extends f0{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=PY(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=TY();s.readable.pipeTo(t.writable),this._writer=s.writable.getWriter();const i=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),i())}).catch(a=>{})};i();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;this._writer.write(r).then(()=>{s&&Mm(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const KY={websocket:WY,webtransport:GY,polling:jY},YY=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,XY=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function ub(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let s=YY.exec(e||""),i={},o=14;for(;o--;)i[XY[o]]=s[o]||"";return n!=-1&&r!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=QY(i,i.path),i.queryKey=JY(i,i.query),i}function QY(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function JY(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,i){s&&(n[s]=i)}),n}const cb=typeof addEventListener=="function"&&typeof removeEventListener=="function",mh=[];cb&&addEventListener("offline",()=>{mh.forEach(e=>e())},!1);class Io extends _n{constructor(t,n){if(super(),this.binaryType=IY,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=ub(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=ub(n.host).host);Dm(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const s=r.prototype.name;this.transports.push(s),this._transportsByName[s]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=FY(this.opts.query)),cb&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},mh.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=g2,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Io.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Io.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const s=this.writeBuffer[r].data;if(s&&(n+=DY(s)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Mm(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,s){if(typeof n=="function"&&(s=n,n=void 0),typeof r=="function"&&(s=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const i={type:t,data:n,options:r};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),s&&this.once("flush",s),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Io.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),cb&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=mh.indexOf(this._offlineEventListener);r!==-1&&mh.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Io.protocol=g2;class ZY extends Io{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Io.priorWebsocketSuccess=!1;const s=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",d=>{if(!r)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Io.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(c(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const f=new Error("probe error");f.transport=n.name,this.emitReserved("upgradeError",f)}}))};function i(){r||(r=!0,c(),n.close(),n=null)}const o=d=>{const f=new Error("probe error: "+d);f.transport=n.name,i(),this.emitReserved("upgradeError",f)};function a(){o("transport closed")}function l(){o("socket closed")}function u(d){n&&d.name!==n.name&&i()}const c=()=>{n.removeListener("open",s),n.removeListener("error",o),n.removeListener("close",a),this.off("close",l),this.off("upgrading",u)};n.once("open",s),n.once("error",o),n.once("close",a),this.once("close",l),this.once("upgrading",u),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let eX=class extends ZY{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(s=>KY[s]).filter(s=>!!s)),super(t,r)}};function tX(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=ub(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const i=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+t,r.href=r.protocol+"://"+i+(n&&n.port===r.port?"":":"+r.port),r}const nX=typeof ArrayBuffer=="function",rX=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,S2=Object.prototype.toString,sX=typeof Blob=="function"||typeof Blob<"u"&&S2.call(Blob)==="[object BlobConstructor]",iX=typeof File=="function"||typeof File<"u"&&S2.call(File)==="[object FileConstructor]";function h0(e){return nX&&(e instanceof ArrayBuffer||rX(e))||sX&&e instanceof Blob||iX&&e instanceof File}function gh(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(gh(e[n]))return!0;return!1}if(h0(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return gh(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&gh(e[n]))return!0;return!1}function oX(e){const t=[],n=e.data,r=e;return r.data=db(n,t),r.attachments=t.length,{packet:r,buffers:t}}function db(e,t){if(!e)return e;if(h0(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=db(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=db(e[r],t));return n}return e}function aX(e,t){return e.data=fb(e.data,t),delete e.attachments,e}function fb(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=fb(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=fb(e[n],t));return e}const lX=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],uX=5;var pt;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(pt||(pt={}));class cX{constructor(t){this.replacer=t}encode(t){return(t.type===pt.EVENT||t.type===pt.ACK)&&gh(t)?this.encodeAsBinary({type:t.type===pt.EVENT?pt.BINARY_EVENT:pt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===pt.BINARY_EVENT||t.type===pt.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=oX(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}function rx(e){return Object.prototype.toString.call(e)==="[object Object]"}class p0 extends _n{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===pt.BINARY_EVENT;r||n.type===pt.BINARY_ACK?(n.type=r?pt.EVENT:pt.ACK,this.reconstructor=new dX(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(h0(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(pt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===pt.BINARY_EVENT||r.type===pt.BINARY_ACK){const i=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const o=t.substring(i,n);if(o!=Number(o)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(o)}if(t.charAt(n+1)==="/"){const i=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(i,n)}else r.nsp="/";const s=t.charAt(n+1);if(s!==""&&Number(s)==s){const i=n+1;for(;++n;){const o=t.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===t.length)break}r.id=Number(t.substring(i,n+1))}if(t.charAt(++n)){const i=this.tryParse(t.substr(n));if(p0.isPayloadValid(r.type,i))r.data=i;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case pt.CONNECT:return rx(n);case pt.DISCONNECT:return n===void 0;case pt.CONNECT_ERROR:return typeof n=="string"||rx(n);case pt.EVENT:case pt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&lX.indexOf(n[0])===-1);case pt.ACK:case pt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class dX{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=aX(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const fX=Object.freeze(Object.defineProperty({__proto__:null,Decoder:p0,Encoder:cX,get PacketType(){return pt},protocol:uX},Symbol.toStringTag,{value:"Module"}));function Es(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const hX=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class k2 extends _n{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Es(t,"open",this.onopen.bind(this)),Es(t,"packet",this.onpacket.bind(this)),Es(t,"error",this.onerror.bind(this)),Es(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,s,i;if(hX.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const o={type:pt.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const c=this.ids++,d=n.pop();this._registerAckCallback(c,d),o.id=c}const a=(s=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||s===void 0?void 0:s.writable,l=this.connected&&!(!((i=this.io.engine)===null||i===void 0)&&i._hasPingExpired());return this.flags.volatile&&!a||(l?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,n){var r;const s=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(s===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},s),o=(...a)=>{this.io.clearTimeoutFn(i),n.apply(this,a)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...n){return new Promise((r,s)=>{const i=(o,a)=>o?s(o):r(a);i.withError=!0,n.push(i),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((s,...i)=>r!==this._queue[0]?void 0:(s!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(s)):(this._queue.shift(),n&&n(null,...i)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:pt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case pt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case pt.EVENT:case pt.BINARY_EVENT:this.onevent(t);break;case pt.ACK:case pt.BINARY_ACK:this.onack(t);break;case pt.DISCONNECT:this.ondisconnect();break;case pt.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...s){r||(r=!0,n.packet({type:pt.ACK,id:t,data:s}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:pt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Hu(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Hu.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Hu.prototype.reset=function(){this.attempts=0};Hu.prototype.setMin=function(e){this.ms=e};Hu.prototype.setMax=function(e){this.max=e};Hu.prototype.setJitter=function(e){this.jitter=e};class hb extends _n{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Dm(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Hu({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const s=n.parser||fX;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new eX(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=Es(n,"open",function(){r.onopen(),t&&t()}),i=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=Es(n,"error",i);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{s(),i(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(s),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Es(t,"ping",this.onping.bind(this)),Es(t,"data",this.ondata.bind(this)),Es(t,"error",this.onerror.bind(this)),Es(t,"close",this.onclose.bind(this)),Es(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Mm(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new k2(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(s=>{s?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",s)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const rc={};function vh(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=tX(e,t.path||"/socket.io"),r=n.source,s=n.id,i=n.path,o=rc[s]&&i in rc[s].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new hb(r,t):(rc[s]||(rc[s]=new hb(r,t)),l=rc[s]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(vh,{Manager:hb,Socket:k2,io:vh,connect:vh});let Jt=null;const Sr=cn({connected:!1,setup:!1,id:""});function pX(e,t){if(Sr.setup)throw new Error("Socket already set up");Sr.setup=!1,Jt=vh(e,{auth:t!=null&&t.length?{token:t}:void 0}),Sr.setup=!0,Jt.on("connect",()=>{Sr.id=Jt.id||"",Sr.connected=!0}),Jt.on("disconnect",()=>{Sr.id="",Sr.connected=!1})}function mX(){Sr.connected=!1,Jt==null||Jt.close(),Jt==null||Jt.open()}function gX(){Jt&&Jt.close(),Jt=null,Sr.setup=!1,Sr.connected=!1,Sr.id=""}function vX(){if(!Jt)return console.warn("Socket not set-up"),{setup:!1};const e={setup:!0,active:Jt.active,connected:Jt.connected,id:Jt.id,recovered:Jt.recovered};return console.warn(e),e}const yX=de({scrollTarget:{type:String},scrollThreshold:{type:[String,Number],default:300}},"scroll");function bX(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{canScroll:n}=t;let r=0,s=0;const i=j(null),o=Ie(0),a=Ie(0),l=Ie(0),u=Ie(!1),c=Ie(!1),d=A(()=>Number(e.scrollThreshold)),f=A(()=>Cr((d.value-o.value)/d.value||0)),p=()=>{const g=i.value;if(!g||n&&!n.value)return;r=o.value,o.value="window"in g?g.pageYOffset:g.scrollTop;const m=g instanceof Window?document.documentElement.scrollHeight:g.scrollHeight;if(s!==m){s=m;return}c.value=o.value<r,l.value=Math.abs(o.value-d.value)};return Ee(c,()=>{a.value=a.value||o.value}),Ee(u,()=>{a.value=0}),bt(()=>{Ee(()=>e.scrollTarget,g=>{var y;const m=g?document.querySelector(g):window;m&&m!==i.value&&((y=i.value)==null||y.removeEventListener("scroll",p),i.value=m,i.value.addEventListener("scroll",p,{passive:!0}))},{immediate:!0})}),Cn(()=>{var g;(g=i.value)==null||g.removeEventListener("scroll",p)}),n&&Ee(n,p,{immediate:!0}),{scrollThreshold:d,currentScroll:o,currentThreshold:l,isScrollActive:u,scrollRatio:f,isScrollingUp:c,savedScroll:a}}const _X=de({scrollBehavior:String,modelValue:{type:Boolean,default:!0},location:{type:String,default:"top",validator:e=>["top","bottom"].includes(e)},...XO(),...dO(),...yX(),height:{type:[Number,String],default:64}},"VAppBar"),x2=ke()({name:"VAppBar",props:_X(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=j(),s=it(e,"modelValue"),i=A(()=>{var x;const b=new Set(((x=e.scrollBehavior)==null?void 0:x.split(" "))??[]);return{hide:b.has("hide"),fullyHide:b.has("fully-hide"),inverted:b.has("inverted"),collapse:b.has("collapse"),elevate:b.has("elevate"),fadeImage:b.has("fade-image")}}),o=A(()=>{const b=i.value;return b.hide||b.fullyHide||b.inverted||b.collapse||b.elevate||b.fadeImage||!s.value}),{currentScroll:a,scrollThreshold:l,isScrollingUp:u,scrollRatio:c}=bX(e,{canScroll:o}),d=ae(()=>i.value.hide||i.value.fullyHide),f=A(()=>e.collapse||i.value.collapse&&(i.value.inverted?c.value>0:c.value===0)),p=A(()=>e.flat||i.value.fullyHide&&!s.value||i.value.elevate&&(i.value.inverted?a.value>0:a.value===0)),g=A(()=>i.value.fadeImage?i.value.inverted?1-c.value:c.value:void 0),m=A(()=>{var C,S;if(i.value.hide&&i.value.inverted)return 0;const b=((C=r.value)==null?void 0:C.contentHeight)??0,x=((S=r.value)==null?void 0:S.extensionHeight)??0;return d.value?a.value<l.value||i.value.fullyHide?b+x:b:b+x});Hr(()=>!!e.scrollBehavior,()=>{On(()=>{d.value?i.value.inverted?s.value=a.value>l.value:s.value=u.value||a.value<l.value:s.value=!0})});const{ssrBootStyles:y}=jd(),{layoutItemStyles:_}=hO({id:e.name,order:A(()=>parseInt(e.order,10)),position:ae(()=>e.location),layoutSize:m,elementSize:Ie(void 0),active:s,absolute:ae(()=>e.absolute)});return Oe(()=>{const b=mr.filterProps(e);return h(mr,ge({ref:r,class:["v-app-bar",{"v-app-bar--bottom":e.location==="bottom"},e.class],style:[{..._.value,"--v-toolbar-image-opacity":g.value,height:void 0,...y.value},e.style]},b,{collapse:f.value,flat:p.value}),n)}),{}}}),wX=de({...mP({icon:"$menu",variant:"text"})},"VAppBarNavIcon"),SX=ke()({name:"VAppBarNavIcon",props:wX(),setup(e,t){let{slots:n}=t;return Oe(()=>h(re,ge(e,{class:["v-app-bar-nav-icon"]}),n)),{}}}),kX={key:1,class:"text-uppercase text--white"},xX={key:3,class:"ml-2"},EX={key:4,class:"ml-2"},CX=Le({__name:"TopBar",setup(e){const t=u0(),n=us(),r=Ko(),s=[{title:"Open Profile",icon:"person",path:"/settings/account"}],i=j(Date.now());I$(()=>{i.value=Date.now()},1e3);const o=A(()=>{var d;if(!((d=n.tokenClaims)!=null&&d.exp))return"";const c=n.tokenClaims.exp-i.value/1e3;return`${Math.round(c)}s`}),a=A(()=>t.username),l=A(()=>n.isDemoMode);async function u(){await n.logout(!0),await c2(r)}return(c,d)=>{const f=fK,p=dK;return $(),te(x2,{elevation:"0"},{default:v(()=>[h(En,{class:"text-uppercase text-white"},{default:v(()=>d[1]||(d[1]=[L("span",{class:"font-weight-light"}," FDM ",-1),L("strong",null," Monster ",-1)])),_:1,__:[1]}),l.value?($(),te(wn,{key:0})):pe("",!0),l.value?($(),ve("h2",kX," DEMO MODE ")):pe("",!0),h(wn),h(yY),X(n).hasAuthToken&&!X(n).isLoginExpired?($(),te(Pm,{key:2,"close-on-content-click":!1,location:"bottom right","open-on-hover":"",transition:"slide-y-transition"},{activator:v(({props:g})=>[h(re,ge({class:"ml-2",color:"secondary",theme:"dark"},g),{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>d[2]||(d[2]=[k("person")])),_:1,__:[2]}),k(" "+se(a.value),1)]),_:2},1040)]),default:v(()=>[h(Bt,null,{default:v(()=>[($(),ve(Ae,null,Gt(s,(g,m)=>h(Ve,{key:m,to:g.path,title:g.title,"prepend-avatar":g.icon,link:""},null,8,["to","title","prepend-avatar"])),64))]),_:1})]),_:1})):pe("",!0),X(Jk)&&o.value?($(),ve("span",xX," AuthExp "+se(o.value),1)):pe("",!0),X(Jk)?($(),ve("span",EX,[L("small",null," S"+se(X(Sr).setup?1:0)+" C"+se(X(Sr).connected?1:0)+" "+se(X(Sr).id),1)])):pe("",!0),X(n).loginRequired===!0?($(),te(f,{key:5,tooltip:"Go back to login",text:"Logout",color:"secondary",icon:"logout",onClick:d[0]||(d[0]=g=>u())})):pe("",!0),X(n).loginRequired===!0?($(),te(re,{key:6,class:"ml-2"},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>d[3]||(d[3]=[k("logout")])),_:1,__:[3]}),d[4]||(d[4]=k(" Logout "))]),_:1,__:[4]})):pe("",!0),h(p)]),_:1})}}}),m0="/assets/logo-CJVdjy51.png",TX=Le({__name:"NavigationBar",setup(e){const t=[["home","Devices","/"],["print","Printers","/printers"],["camera_alt","CameraGridView","/cameras"],["settings","Settings","/settings"],["timeline","PrintStatistics","/statistics"],["contact_support","About","/about"]];return(n,r)=>($(),te(Y_,{permanent:"",rail:""},{default:v(()=>[h(SX,{class:"ml-1 mt-2"},{default:v(()=>[h(ds,{alt:"FDM Monster Logo",src:X(m0),class:"shrink mr-1 pt-3 ml-1",transition:"scale-transition",width:"40"},null,8,["src"])]),_:1}),h(dn),h(Bt,{density:"compact",nav:""},{default:v(()=>[($(),ve(Ae,null,Gt(t,([s,i,o],a)=>h(Ve,{key:a,to:o,"prepend-icon":s,title:i,density:"comfortable","router-link":""},null,8,["to","prepend-icon","title"])),64))]),_:1})]),_:1}))}});function PX(e){const t=Ie(e());let n=-1;function r(){clearInterval(n)}function s(){r(),Mt(()=>t.value=e())}function i(o){const a=o?getComputedStyle(o):{transitionDuration:.2},l=parseFloat(a.transitionDuration)*1e3||200;if(r(),t.value<=0)return;const u=performance.now();n=window.setInterval(()=>{const c=performance.now()-u+l;t.value=Math.max(e()-c,0),t.value<=0&&r()},l)}return yn(r),{clear:r,time:t,start:i,reset:s}}const RX=de({multiLine:Boolean,text:String,timer:[Boolean,String],timeout:{type:[Number,String],default:5e3},vertical:Boolean,...qo({location:"bottom"}),...Cu(),...Dn(),...$s(),...Lt(),...Ms(Id({transition:"v-snackbar-transition"}),["persistent","noClickAnimation","scrim","scrollStrategy"])},"VSnackbar"),g0=ke()({name:"VSnackbar",props:RX(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=it(e,"modelValue"),{positionClasses:s}=Tu(e),{scopeId:i}=Ru(),{themeClasses:o}=Zt(e),{colorClasses:a,colorStyles:l,variantClasses:u}=Ja(e),{roundedClasses:c}=jn(e),d=PX(()=>Number(e.timeout)),f=j(),p=j(),g=Ie(!1),m=Ie(0),y=j(),_=Qe(ad,void 0);Hr(()=>!!_,()=>{const O=fO();On(()=>{y.value=O.mainStyles.value})}),Ee(r,x),Ee(()=>e.timeout,x),bt(()=>{r.value&&x()});let b=-1;function x(){d.reset(),window.clearTimeout(b);const O=Number(e.timeout);if(!r.value||O===-1)return;const R=Kb(p.value);d.start(R),b=window.setTimeout(()=>{r.value=!1},O)}function C(){d.reset(),window.clearTimeout(b)}function S(){g.value=!0,C()}function T(){g.value=!1,x()}function P(O){m.value=O.touches[0].clientY}function w(O){Math.abs(m.value-O.changedTouches[0].clientY)>50&&(r.value=!1)}function E(){g.value&&T()}const I=A(()=>e.location.split(" ").reduce((O,R)=>(O[`v-snackbar--${R}`]=!0,O),{}));return Oe(()=>{const O=Ui.filterProps(e),R=!!(n.default||n.text||e.text);return h(Ui,ge({ref:f,class:["v-snackbar",{"v-snackbar--active":r.value,"v-snackbar--multi-line":e.multiLine&&!e.vertical,"v-snackbar--timer":!!e.timer,"v-snackbar--vertical":e.vertical},I.value,s.value,e.class],style:[y.value,e.style]},O,{modelValue:r.value,"onUpdate:modelValue":M=>r.value=M,contentProps:ge({class:["v-snackbar__wrapper",o.value,a.value,c.value,u.value],style:[l.value],onPointerenter:S,onPointerleave:T},O.contentProps),persistent:!0,noClickAnimation:!0,scrim:!1,scrollStrategy:"none",_disableGlobalStack:!0,onTouchstartPassive:P,onTouchend:w,onAfterLeave:E},i),{default:()=>{var M,D;return[jo(!1,"v-snackbar"),e.timer&&!g.value&&h("div",{key:"timer",class:"v-snackbar__timer"},[h(su,{ref:p,color:typeof e.timer=="string"?e.timer:"info",max:e.timeout,"model-value":d.time.value},null)]),R&&h("div",{key:"content",class:"v-snackbar__content",role:"status","aria-live":"polite"},[((M=n.text)==null?void 0:M.call(n))??e.text,(D=n.default)==null?void 0:D.call(n)]),n.actions&&h(Ot,{defaults:{VBtn:{variant:"text",ripple:!1,slim:!0}}},{default:()=>[h("div",{class:"v-snackbar__actions"},[n.actions({isActive:r})])]})]},activator:n.activator})}),Ji({},f)}}),IX={style:{width:"100%"}},AX={class:"font-weight-bold text-button"},OX=Le({__name:"AppProgressSnackbar",setup(e){const t=Dt(),n=j(!1),r=j(""),s=j([]),i=j(100);function o(u){return s.value.find(c=>c.key===u)}function a(u,c,d=0,f=!1,p=Date.now()+1500){console.log(`[AppProgressSnackbar] Adding ${u} tracker with progress ${d}`),s.value.push({key:u,title:c,value:d,completed:f,startedAt:Date.now(),expiresAt:p,timeoutAt:void 0})}function l(u){s.value=s.value.filter(c=>c.key!==u)}return bt(()=>{setInterval(()=>{if(s.value.length){for(const u of s.value){const{value:c,completed:d,expiresAt:f,key:p}=u;(d||c>=100)&&f<Date.now()||u.timeoutAt&&u.timeoutAt<Date.now()?l(p):!u.timeoutAt&&f<Date.now()&&(u.timeoutAt=Date.now()+5e3)}s.value.length?(i.value=-1,n.value=!0):(i.value=2e3,r.value="Upload ended",console.debug(`[AppSnackbars] Setting timeout to ${i.value}`))}},1e3),t.onProgressMessage(u=>{const{key:c,value:d,title:f,completed:p}=u,g=o(c);if(g)Math.min(100,d)>=g.value&&(g.expiresAt=Date.now()+1500,g.value=d,g.completed=p);else{if(d>=100)return;a(c,f,d,!1,Date.now()+1500)}r.value="Uploading files"})}),(u,c)=>($(),te(g0,{modelValue:n.value,"onUpdate:modelValue":c[1]||(c[1]=d=>n.value=d),timeout:i.value,absolute:"",location:"bottom right",class:"ma-3 elevation-24","min-width":"450px","multi-line":"",rounded:"pill",style:{"z-index":"1000"}},{default:v(()=>[h(rt,null,{default:v(()=>[h(ze,{cols:"2"},{default:v(()=>[h(re,{icon:"file_upload",size:"large"})]),_:1}),h(ze,{class:"d-flex align-center flex-row",cols:"8"},{default:v(()=>[L("div",IX,[L("span",AX,se(r.value),1),($(!0),ve(Ae,null,Gt(s.value,(d,f)=>($(),ve("div",{key:f,class:"mb-2"},[d.completed?($(),te(J,{key:0},{default:v(()=>c[2]||(c[2]=[k("check")])),_:1,__:[2]})):d.timeoutAt?($(),te(J,{key:1},{default:v(()=>c[3]||(c[3]=[k("pause")])),_:1,__:[3]})):($(),te(J,{key:2},{default:v(()=>c[4]||(c[4]=[k("hourglass_bottom")])),_:1,__:[4]})),k(" "+se(d.title)+" "+se((d.completed?100:d.value).toFixed(1))+"% ",1),c[5]||(c[5]=L("br",null,null,-1)),($(),te(su,{key:d.key,"model-value":d.completed?100:d.value,color:d.timeoutAt?"red":"success"},null,8,["model-value","color"]))]))),128))])]),_:1}),h(ze,{cols:"1"},{default:v(()=>[h(re,{icon:"close",size:"large",onClick:c[0]||(c[0]=d=>n.value=!1)})]),_:1})]),_:1})]),_:1},8,["modelValue","timeout"]))}}),MX={class:"font-weight-bold text-button"},DX={key:0},LX=Le({__name:"AppErrorSnackbar",setup(e){const t=Dt(),n=j(-1),r=j(!1),s=j(""),i=j("");return bt(()=>{t.onErrorMessage(o=>{s.value=o.title,i.value=o.subtitle??"",r.value=!0,n.value=o.timeout??1e4})}),(o,a)=>($(),te(g0,{modelValue:r.value,"onUpdate:modelValue":a[1]||(a[1]=l=>r.value=l),timeout:n.value,absolute:"",location:"bottom",class:"ml-16 mb-16 ma-3 elevation-24",color:"error-darken-1",rounded:"pill","multi-line":"",style:{"z-index":"1000"},width:"450"},{default:v(()=>[h(rt,null,{default:v(()=>[h(ze,{cols:"2"},{default:v(()=>[h(re,{icon:"error"})]),_:1}),h(ze,{class:"d-flex align-center flex-row",cols:"8"},{default:v(()=>{var l;return[L("div",null,[L("span",MX,se(s.value),1),(l=i.value)!=null&&l.length?($(),ve("div",DX,se(i.value),1)):pe("",!0)])]}),_:1}),h(ze,{cols:"1"},{default:v(()=>[h(re,{icon:"close",onClick:a[0]||(a[0]=l=>r.value=!1)})]),_:1})]),_:1})]),_:1},8,["modelValue","timeout"]))}}),$X={class:"font-weight-bold text-button"},FX={key:0},NX=Le({__name:"AppInfoSnackbar",setup(e){const t=Dt(),n=j(!1),r=j(""),s=j(""),i=j(2e3),o=j(!1);return bt(()=>{t.onInfoMessage(a=>{r.value=a.title,s.value=a.subtitle??"",o.value=a.warning??!1,i.value=a.timeout??2e3,n.value=!0})}),(a,l)=>($(),te(g0,{modelValue:n.value,"onUpdate:modelValue":l[1]||(l[1]=u=>n.value=u),absolute:"",location:"bottom",color:o.value?"warning darken-2":"success",class:"ma-3 elevation-24",rounded:"pill",timeout:i.value,style:{"z-index":"1000"},"multi-line":""},{default:v(()=>[h(rt,null,{default:v(()=>[h(ze,{cols:"2"},{default:v(()=>[h(re,{icon:"info"})]),_:1}),h(ze,{cols:"8",class:"d-flex align-center flex-row"},{default:v(()=>{var u;return[L("div",null,[L("span",$X,se(r.value),1),(u=s.value)!=null&&u.length?($(),ve("div",FX,se(s.value),1)):pe("",!0)])]}),_:1}),h(ze,{cols:"2"},{default:v(()=>[h(re,{icon:"close",onClick:l[0]||(l[0]=u=>n.value=!1)})]),_:1})]),_:1})]),_:1},8,["modelValue","color","timeout"]))}}),v0=gs("Uploads",{state:()=>({queuedUploads:[],failedUploads:[],uploadingNow:!1}),getters:{hasPendingUploads(e){var t;return((t=e.queuedUploads)==null?void 0:t.length)>0},isUploadingNow(e){return e.uploadingNow},nextUpload(e){return e.queuedUploads[0]}},actions:{queueUploads(e){this.failedUploads=[],this.queuedUploads.push(...e)},cancelUploads(){this.queuedUploads=[],this.failedUploads=[]},async handleNextUpload(){var r;const e=Dt();if(!((r=this.queuedUploads)!=null&&r.length))return;this.uploadingNow=!0;const{file:t,printer:n}=this.nextUpload;this.queuedUploads.splice(0,1);try{await $i.uploadFile(n,t)}catch(s){if(s.isAxiosError){const i={file:t,printer:n,error:s};this.failedUploads.push(i),e.openErrorMessage({title:"Upload failure",subtitle:`File ${t.name}Upload failed for to printer ${n.name}`})}else e.openErrorMessage({title:"Upload failure",subtitle:"Unknown upload error occurred"})}this.uploadingNow=!1}}}),VX="/img/OIG.JYDC2RaWdz7g9.jpg",ol=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},BX=e=>Math.random()*e,UX={name:"GridLoader",props:{loading:{type:Boolean,default:!0},color:{type:String,default:"#000000"},size:{type:Number,default:15},margin:{type:String,default:"2px"},sizeUnit:{type:String,default:"px"}},methods:{random:BX,getWrapperStyle(){return{width:`${parseFloat(this.size)*3+parseFloat(this.margin)*6}${this.sizeUnit}`,fontSize:0}},getCircleStyle(e){const t=`grid ${e/100+.6}s ${e/100-.2}s infinite ease`;return{display:"inline-block",backgroundColor:this.color,width:`${this.size}${this.sizeUnit}`,height:`${this.size}${this.sizeUnit}`,margin:this.margin,borderRadius:"100%",animationFillMode:"both",animation:t}}}};function zX(e,t,n,r,s,i){return n.loading?($(),ve("div",{key:0,style:is(i.getWrapperStyle())},[($(),ve(Ae,null,Gt(9,o=>L("div",{key:o,style:is(i.getCircleStyle(i.random(100)))},null,4)),64))],4)):pe("",!0)}const E2=ol(UX,[["render",zX]]);function C2(e){const t=dt();t.getOptions().enabled=e,console.warn("Sentry enabled:",e)}const HX=e=>new Promise(t=>setTimeout(t,e)),jX=gs("tracked-uploads",()=>{const e=j([]),t=A(()=>e.value.filter(r=>!r.completed));function n(r){e.value.splice(0),e.value.push(...r)}return{current:e,setUploads:n,activeUploads:t}});class qX{constructor(){_e(this,"printerStore",Wt());_e(this,"floorStore",Zi());_e(this,"printerStateStore",rr());_e(this,"testPrinterStore",o0());_e(this,"trackedUploadsStore",jX());_e(this,"snackbar",Dt())}socketState(){return vX()}async setupSocketConnection(){console.debug("Setting up socket.io client");const t=await EA(),n=us();n.loadTokens(),pX(t,n.loginRequired?n.token:void 0),Jt==null||Jt.on("legacy-update",r=>this.onMessage(JSON.parse(r))),Jt==null||Jt.on("test-printer-state",r=>{this.testPrinterStore.saveEvent(r),console.log(r)})}disconnect(){gX()}reconnect(){Jt&&(console.debug("Resetting socket.io client connection"),mX())}onMessage(t){var n,r,s;(n=t.trackedUploads.current)!=null&&n.length&&(this.trackedUploadsStore.setUploads(t==null?void 0:t.trackedUploads.current),this.trackedUploadsStore.activeUploads.forEach(o=>{this.snackbar.openProgressMessage(o.correlationToken,o.multerFile.originalname,(o.progress||0)*100,o.completed)})),(r=t.floors)!=null&&r.length&&this.floorStore.saveFloors(t.floors),(s=t.printers)!=null&&s.length&&this.printerStore.setPrinters(t.printers),t.socketStates&&this.printerStateStore.setSocketStates(t.socketStates),t.printerEvents&&this.printerStateStore.setPrinterEvents(t.printerEvents)}}const WX={key:1,style:{margin:"50px"}},GX={class:"mt-2 mb-2"},KX={key:0,class:"mt-2 mb-2"},YX={key:1,class:"mt-2 mb-2"},XX={key:2,style:{animation:"fadeIn 0.75s"}},QX=Le({__name:"AppLoader",setup(e){const t=us(),n=Ns(),r=Cm(),s=u0(),i=j(!1),o=Ko(),a=j(""),l=j(!0),u=j(),c=j(),d=j(),f=Dt(),p=new qX;function g(){window.location.reload()}function m(){navigator.clipboard.writeText(JSON.stringify(u.value)),f.openInfoMessage({title:"Copied",subtitle:"Error copied to clipboard"})}function y(P,w=""){P?(a.value=w,u.value=null,c.value=null,d.value=null):a.value="",i.value=P}async function _(){var P;try{await n.loadSettings(),await r.loadFeatures(),await s.getProfile();const w=(P=n.serverSettings)==null?void 0:P.sentryDiagnosticsEnabled;C2(!!w)}catch(w){console.log("Error when loading settings.",w),f.openErrorMessage({title:"Error",subtitle:"Error when loading settings, features and/or profile."}),ai(w)}p.socketState().setup?p.reconnect():await p.setupSocketConnection(),y(!1)}return Vr("auth:permission-denied").on(async P=>{console.log("[AppLoader] Permission denied, going to permission denied page"),y(!0,"Permission denied"),await o.push({name:qt.PermissionDenied,query:{roles:P==null?void 0:P.roles,page:String(o.currentRoute.value.name),permissions:P==null?void 0:P.permissions,error:P==null?void 0:P.error,url:P==null?void 0:P.url}}),y(!1)}),Vr("auth:failure").on(async P=>{console.debug(`[AppLoader] Event received: 'auth:failure', going back to login, context: ${P}`),y(!0,"Authentication failed, going back to login"),o.currentRoute.value.name!==qt.Login&&await o.push({name:qt.Login}),y(!1)}),Vr("auth:login").on(async()=>{console.debug("[AppLoader] Event received: 'auth:login', loading app"),y(!0,"Loading app"),await _()}),Vr(`auth:${kr.AccountNotVerified}`).on(async()=>{console.debug(`[AppLoader] Event received: 'auth:${kr.AccountNotVerified}', going to login`),f.error("Account not verified, please ask an administrator to verify your account."),y(!0,"Account not verified, please ask an administrator to verify your account."),o.currentRoute.value.name!==qt.Login&&await o.push({name:qt.Login}),y(!1)}),Vr(`auth:${kr.PasswordChangeRequired}`).on(async()=>{console.debug(`[AppLoader] Event received: 'auth:${kr.PasswordChangeRequired}', going to login`),f.error("Password change required, please change your password."),y(!0,"Password change required, please change your password."),o.currentRoute.value.name!==qt.Login&&await o.push({name:qt.Login}),y(!1)}),Bp(()=>{p&&p.disconnect()}),wu(async()=>{var O,R;l.value=!0;const P=["Loading FDM Monster","Loading it all","Loading features","Loading what needs to be loaded","Farming potatoes","Wiping the floor","Cleaning cobwebs","Loading filament.dll","Loading 3D_printer.exe","Loading spools"],w=P[Math.floor(Math.random()*P.length)];y(!0,w);try{await ma.test()}catch(M){l.value=!1,u.value=M,c.value="api/test",ai(M);return}const{loginRequired:E,wizardState:I}=await t.checkAuthenticationRequirements();if(!I.wizardCompleted){console.debug("[AppLoader] Wizard not completed, going to wizard"),await t.logout(!1),o.currentRoute.value.name!==qt.FirstTimeSetup&&await o.replace({name:qt.FirstTimeSetup}),y(!1);return}if(!E)return console.debug("[AppLoader] Login not required, loading app"),await _();if(console.debug("[AppLoader] Checking if tokens are present"),!t.hasAuthToken&&!t.hasRefreshToken)return console.debug("[AppLoader] No tokens present, hiding overlay as router will have handled it"),y(!1);y(!0,"Refreshing login"),console.debug("[AppLoader] Verifying or refreshing login once");try{const{success:M,handled:D}=await t.verifyOrRefreshLoginOnceOrLogout();if(D){console.debug("[AppLoader] received handled event, hiding overlay");return}if(!M){console.debug("[AppLoader] No success refreshing"),y(!0,"Login expired, going back to login"),await HX(500),o.currentRoute.value.name!==qt.Login&&await o.push({name:qt.Login}),y(!1);return}}catch(M){console.log("[AppLoader] Error when refreshing login",M),l.value=!1,u.value=M.message,c.value=(O=M.config)==null?void 0:O.url,d.value=(R=M.response)==null?void 0:R.data,ai(M);return}console.debug("[AppLoader] Loading app"),await _()}),(P,w)=>($(),ve(Ae,null,[h(Ui,{modelValue:i.value,"onUpdate:modelValue":w[2]||(w[2]=E=>i.value=E),opacity:"0.98",style:{"z-index":"7"}},{default:v(()=>[l.value?($(),te(E2,{key:0,size:20,class:"ma-auto",color:"#a70015"})):pe("",!0),w[19]||(w[19]=L("br",null,null,-1)),u.value?($(),ve("div",WX,[w[16]||(w[16]=L("h1",null,"FDM Monster Server Error",-1)),w[17]||(w[17]=L("p",null," Did not expect this answer from the server. Please check your configuration and logs. ",-1)),h(fp,{class:"pa-4 rounded",color:"grey-darken-2",width:"80%"},{default:v(()=>[w[11]||(w[11]=k(" Details: ")),L("div",GX,se(JSON.stringify(u.value,null,4)),1),c.value?($(),ve("div",KX," Original URL: "+se(c.value),1)):pe("",!0),d.value?($(),ve("div",YX," Response body: "+se(d.value),1)):pe("",!0),w[12]||(w[12]=L("br",null,null,-1)),h(re,{class:"mb-2",color:"secondary",onClick:w[0]||(w[0]=E=>m())},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>w[3]||(w[3]=[k("content_copy")])),_:1,__:[3]}),w[4]||(w[4]=k(" Copy error details "))]),_:1,__:[4]}),w[13]||(w[13]=L("br",null,null,-1)),h(re,{color:"primary mb-2",onClick:w[1]||(w[1]=E=>g())},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>w[5]||(w[5]=[k("refresh")])),_:1,__:[5]}),w[6]||(w[6]=k(" reload the page "))]),_:1,__:[6]}),w[14]||(w[14]=L("br",null,null,-1)),h(re,{color:"darken-2 mb-2",href:"https://docs.fdm-monster.net",style:{color:"white"},target:"_blank"},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>w[7]||(w[7]=[k("menu_book")])),_:1,__:[7]}),w[8]||(w[8]=k(" view documentation "))]),_:1,__:[8]}),w[15]||(w[15]=L("br",null,null,-1)),h(re,{color:"purple-darken-4",href:"https://discord.gg/mwA8uP8CMc",style:{color:"white"},target:"_blank"},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>w[9]||(w[9]=[k("chat")])),_:1,__:[9]}),w[10]||(w[10]=k(" join our Discord "))]),_:1,__:[10]})]),_:1,__:[11,12,13,14,15]}),w[18]||(w[18]=L("img",{class:"justify-center align-center align-content-center rounded-pill mt-8 ma-4",src:VX,style:{opacity:"0.9"},width:"400"},null,-1))])):pe("",!0),l.value?($(),ve("div",XX,se(a.value),1)):pe("",!0)]),_:1,__:[19]},8,["modelValue"]),i.value?pe("",!0):Up(P.$slots,"default",{key:0})],64))}});async function JX(){const e="vpss",t=document.getElementById(e),n=document.getElementById(`${e}-style`);if(!t||!n){console.error("Splash screen not found. Did you forget to add the `vite-plugin-splash-screen` plugin?");return}const r=window.__VPSS__||{};if(t.addEventListener("animationend",s=>{s.animationName==="vpss-hide"&&(t.remove(),n.remove())}),"minDurationMs"in r&&"renderedAt"in r){const s=new Date().getTime()-r.renderedAt,i=Math.max(r.minDurationMs-s,0);await new Promise(o=>setTimeout(o,i))}t.classList.add(`${e}-hidden`)}const ZX=de({...Ue(),...cO({fullHeight:!0}),...Lt()},"VApp"),eQ=ke()({name:"VApp",props:ZX(),setup(e,t){let{slots:n}=t;const r=Zt(e),{layoutClasses:s,getLayoutItem:i,items:o,layoutRef:a}=pO(e),{rtlClasses:l}=Dr();return Oe(()=>{var u;return h("div",{ref:a,class:["v-application",r.themeClasses.value,s.value,l.value,e.class],style:[e.style]},[h("div",{class:"v-application__wrap"},[(u=n.default)==null?void 0:u.call(n)])])}),{getLayoutItem:i,items:o,theme:r}}}),tQ=de({scrollable:Boolean,...Ue(),...Or(),..._t({tag:"main"})},"VMain"),nQ=ke()({name:"VMain",props:tQ(),setup(e,t){let{slots:n}=t;const{dimensionStyles:r}=Mr(e),{mainStyles:s}=fO(),{ssrBootStyles:i}=jd();return Oe(()=>h(e.tag,{class:["v-main",{"v-main--scrollable":e.scrollable},e.class],style:[s.value,i.value,r.value,e.style]},{default:()=>{var o,a;return[e.scrollable?h("div",{class:"v-main__scroller"},[(o=n.default)==null?void 0:o.call(n)]):(a=n.default)==null?void 0:a.call(n)]}})),{}}}),rQ=Le({__name:"App",setup(e){const t=v0(),n=us(),r=t.queuedUploads;return Ee(r,async()=>{await t.handleNextUpload()}),bt(()=>{JX(),console.debug(`App.vue mounted. Logged in: ${n.hasAuthToken}, Expired: ${n.isLoginExpired}`)}),(s,i)=>{const o=NX,a=LX,l=OX,u=TX,c=CX,d=In("router-view"),f=lK,p=YG,g=gG,m=pG,y=dG,_=aG,b=W9,x=v9,C=o9,S=VW,T=sW;return $(),te(eQ,null,{default:v(()=>[h(o),h(a),h(l),X(n).hasAuthToken&&!X(n).isLoginExpired||!X(n).loginRequired?($(),te(u,{key:0})):pe("",!0),X(n).hasAuthToken&&!X(n).isLoginExpired||!X(n).loginRequired?($(),te(c,{key:1})):pe("",!0),h(QX,null,{default:v(()=>[h(nQ,null,{default:v(()=>[h(d)]),_:1})]),_:1}),h(f),h(p),h(g),h(m),h(y),h(_),h(b),h(x),h(C),h(S),h(T)]),_:1})}}}),y0="/img/logo.svg",T2=Le({__name:"PrinterCreateAction",props:{floorId:{},floorX:{},floorY:{}},setup(e){const t=e,n=tn(nn.AddOrUpdatePrinterDialog);function r(){n.openDialog(t)}return(s,i)=>($(),te(re,{class:"ma-2",color:"primary",size:"small",rounded:"",onClickCapture:i[0]||(i[0]=St(o=>r(),["stop"]))},{default:v(()=>[h(J,null,{default:v(()=>i[1]||(i[1]=[k("add")])),_:1,__:[1]}),i[2]||(i[2]=k(" New printer "))]),_:1,__:[2]}))}});class P2 extends gr{static async postQuickStopM112Command(t){const n=Me.sendQuickStopM112Route(t);return await this.post(n)}}const Lm=gs("GridStore",{state:()=>({gridEditMode:!1})}),sQ="thumbnail",iQ=(e,t)=>Rm({queryKey:[sQ,e],queryFn:async()=>e.value?$i.getThumbnail(e.value).then(n=>n.thumbnailBase64||""):"",enabled:!!e&&!!t}),oQ={class:"d-flex flex flex-column justify-center",style:{height:"100%"}},aQ={key:1,class:"printer-file-or-stream-viewer"},lQ={key:2,class:"printer-file-or-stream-viewer"},uQ={key:3,class:"printer-menu"},cQ={class:"file-name"},dQ={key:5,class:"centered-controls"},fQ={key:0},hQ={key:1},sx="rgba(100,100,100,0.1)",pQ=Le({__name:"PrinterGridTile",props:{printer:{type:Object,required:!1},x:{type:Number,required:!0},y:{type:Number,required:!0}},setup(e){const t=e,n=Wt(),r=rr(),s=Zi(),i=Ns(),o=Lm(),a=tn(nn.PrinterControlDialog),l=tn(nn.AddOrUpdatePrinterDialog),u=Dt(),c=A(()=>{var H;return(H=t.printer)==null?void 0:H.id}),d=A(()=>i.largeTiles),f=A(()=>d.value?"80px":"40px"),{data:p}=iQ(c,i.thumbnailsEnabled),g=A(()=>c.value?r.isApiResponding(c.value):!1),m=A(()=>c.value?r.isPrinterOperational(c.value):!1),y=A(()=>c.value?r.isPrinterPrinting(c.value):!1),_=A(()=>c.value?r.isPrinterPaused(c.value):!1),b=A(()=>c.value?n.isSelectedPrinter(c.value):!1),x=A(()=>{var H;return((H=n.selectedPrinters)==null?void 0:H.length)&&!b.value}),C=A(()=>i.preferCancelOverQuickStop),S=A(()=>{if(!c.value)return;const H=n.printer(c.value);if(!H)return;const V=r.printerEventsById[c.value],ee=r.socketStatesById[c.value];return CA(H,ee,V)}),T=A(()=>{const H=S.value;return H&&H.rgb||sx}),P=A(()=>{if(c.value)return r.printerJobsById[c.value]}),w=A(()=>{if(c.value)return r.printingFilePathsByPrinterId[c.value]}),E=async()=>{c.value&&confirm("Are you sure to cancel the current print job?")&&await Ma.stopPrintJob(c.value)},I=async()=>{c.value&&await Ma.pausePrintJob(c.value)},O=async()=>{c.value&&await Ma.resumePrintJob(c.value)},R=()=>{n.setSideNavPrinter(t.printer)},M=async()=>{c.value&&(await Qt.refreshSocket(c.value),u.openInfoMessage({title:"Refreshing connection state"}))},D=()=>{n.setUpdateDialogPrinter(t.printer),l.openDialog()},F=async()=>{if(!c.value)throw new Error("PrinterId not set, cant open dialog");await a.openDialog({printerId:c})},U=async()=>{c.value&&confirm("Are you sure to abort the print in Quick Stop mode? Please reconnect after.")&&await P2.postQuickStopM112Command(c.value)},K=async()=>{c.value&&await Qt.sendPrinterConnectCommand(c.value)},Q=async()=>{var H;if(!(!t.printer||!c.value)){if(o.gridEditMode){const V=(H=s.selectedFloor)==null?void 0:H.id;if(!V)throw new Error("Cant clear printer, floor not selected");await ns.deletePrinterFromFloor(V,c.value);return}n.toggleSelectedPrinter(t.printer)}};return(H,V)=>{const ee=T2,q=hr("drop-upload"),G=hr("drop-printer-position");return Nt(($(),ve("div",null,[Nt(($(),te(yt,{class:zo([{"tile-large":d.value,"tile-selected":b.value,"tile-unselected":x.value,"tile-no-printer":!e.printer},"tile colored-tile rounded-lg"]),elevation:"5",onClick:V[8]||(V[8]=le=>Q())},{default:v(()=>{var le,ie,we,Z,he,ne,z;return[Nt(L("div",{class:"printer-title"},se(((le=e.printer)==null?void 0:le.name)??" "),513),[[Qi,e.printer]]),!e.printer||X(o).gridEditMode?($(),ve("div",{key:0,style:is([{height:d.value?"calc(120px - 20px)":"calc(84px - 20px)"},{position:"absolute"}]),class:"plus-hover-icon"},[L("div",oQ,[e.printer?pe("",!0):($(),te(ee,{key:0,"floor-id":(ie=X(s).selectedFloor)==null?void 0:ie.id,"floor-x":e.x,"floor-y":e.y},null,8,["floor-id","floor-x","floor-y"])),e.printer?($(),te(re,{key:1,color:"error",rounded:"",small:"",onClickCapture:V[0]||(V[0]=St(xe=>Q(),["stop"]))},{default:v(()=>[h(J,null,{default:v(()=>V[9]||(V[9]=[k("clear")])),_:1,__:[9]}),V[10]||(V[10]=k(" Clear position "))]),_:1,__:[10]})):pe("",!0)])],4)):pe("",!0),e.printer&&g.value?($(),ve("div",aQ,[(we=X(p))!=null&&we.length?($(),te(ds,{key:1,src:"data:image/png;base64,"+(X(p)??""),width:f.value},null,8,["src","width"])):($(),te(ds,{key:0,src:X(m0),width:f.value,alt:"No thumbnail was found in GCode",style:{opacity:"0.3",filter:"grayscale(100%)"}},null,8,["src","width"]))])):e.printer?($(),ve("div",lQ,[(Z=S.value)!=null&&Z.text.includes("API")?($(),te(J,{key:0,size:f.value,color:"secondary"},{default:v(()=>V[11]||(V[11]=[k(" wifi_off ")])),_:1,__:[11]},8,["size"])):pe("",!0),e.printer.enabled?pe("",!0):($(),te(J,{key:1,size:f.value,color:"secondary"},{default:v(()=>V[12]||(V[12]=[k(" disabled_by_default ")])),_:1,__:[12]},8,["size"])),(he=S.value)!=null&&he.text.includes("unset")?($(),te(J,{key:2,size:f.value,color:"secondary"},{default:v(()=>V[13]||(V[13]=[k(" question_mark ")])),_:1,__:[13]},8,["size"])):pe("",!0)])):pe("",!0),e.printer&&!X(o).gridEditMode?($(),ve("div",uQ,[h(nt,{top:""},{activator:v(({props:xe})=>[h(re,ge({color:"darkgray",elevation:"0",small:"",style:{"border-radius":"7px"}},xe,{onClick:V[1]||(V[1]=St(Fe=>R(),["prevent","stop"]))}),{default:v(()=>[h(J,{dark:""},{default:v(()=>V[14]||(V[14]=[k("menu")])),_:1,__:[14]})]),_:2},1040)]),default:v(()=>V[15]||(V[15]=[k("Open printer details")])),_:1})])):pe("",!0),e.printer&&!X(o).gridEditMode?($(),ve("div",{key:4,style:is([{position:d.value?"inherit":"absolute",top:d.value?"inherit":"30px"},{overflow:"clip"}]),class:"printer-controls"},[L("small",cQ,se(w.value??" "),1)],4)):pe("",!0),e.printer&&!X(o).gridEditMode?($(),ve("div",dQ,[h(nt,{top:""},{activator:v(({props:xe})=>[h(re,ge({disabled:!g.value||!m.value,size:d.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},xe,{onClick:V[2]||(V[2]=St(Fe=>F(),["prevent","stop"]))}),{default:v(()=>[h(J,null,{default:v(()=>V[16]||(V[16]=[k("open_with")])),_:1,__:[16]})]),_:2},1040,["disabled","size"])]),default:v(()=>V[17]||(V[17]=[k("Move and home printer")])),_:1}),h(nt,{top:""},{activator:v(({props:xe})=>[!m.value&&g.value?($(),te(re,ge({key:0,size:d.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},xe,{onClick:V[3]||(V[3]=St(Fe=>K(),["prevent","stop"]))}),{default:v(()=>[h(J,null,{default:v(()=>V[18]||(V[18]=[k("usb")])),_:1,__:[18]})]),_:2},1040,["size"])):pe("",!0)]),default:v(()=>V[19]||(V[19]=[k("Connect USB (only for OctoPrint)")])),_:1}),h(nt,{top:""},{activator:v(({props:xe})=>[h(re,ge({size:d.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},xe,{onClick:V[4]||(V[4]=St(Fe=>M(),["prevent","stop"]))}),{default:v(()=>[h(J,null,{default:v(()=>V[20]||(V[20]=[k("refresh")])),_:1,__:[20]})]),_:2},1040,["size"])]),default:v(()=>V[21]||(V[21]=[k("Reload printer websocket and refresh all states ")])),_:1}),h(nt,{top:""},{activator:v(({props:xe})=>[h(re,ge({disabled:!g.value||!_.value&&!y.value,size:d.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},xe,{onClick:V[5]||(V[5]=St(Fe=>_.value?O():I(),["prevent","stop"]))}),{default:v(()=>[_.value?pe("",!0):($(),te(J,{key:0},{default:v(()=>V[22]||(V[22]=[k("pause")])),_:1,__:[22]})),_.value?($(),te(J,{key:1},{default:v(()=>V[23]||(V[23]=[k("play_arrow")])),_:1,__:[23]})):pe("",!0)]),_:2},1040,["disabled","size"])]),default:v(()=>[k(se(_.value?"Resume print":"Pause print"),1)]),_:1}),h(nt,{top:""},{activator:v(({props:xe})=>[h(re,ge({disabled:!g.value||C.value&&!y.value&&!_.value,size:d.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},xe,{onClick:V[6]||(V[6]=St(Fe=>C.value?E():U(),["prevent","stop"]))}),{default:v(()=>[h(J,null,{default:v(()=>[k(se(C.value?"stop":"dangerous"),1)]),_:1})]),_:2},1040,["disabled","size"])]),default:v(()=>[k(se(C.value?"Cancel current print gracefully":"Perform quick stop of printer"),1)]),_:1}),h(nt,{top:""},{activator:v(({props:xe})=>[h(re,ge({size:d.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},xe,{onClick:V[7]||(V[7]=St(Fe=>D(),["prevent","stop"]))}),{default:v(()=>[h(J,null,{default:v(()=>V[24]||(V[24]=[k("settings")])),_:1,__:[24]})]),_:2},1040,["size"])]),default:v(()=>V[25]||(V[25]=[k("Open printer settings")])),_:1})])):pe("",!0),e.printer&&!X(o).gridEditMode?($(),te(su,{key:6,value:(z=(ne=P.value)==null?void 0:ne.progress)==null?void 0:z.completion,"background-color":"dark-gray",class:"progress-bar",height:"14"},{default:v(({value:xe})=>{var Fe;return[L("strong",null,se((xe==null?void 0:xe.toFixed(1))+"%"),1),h(nt,{disabled:(Fe=e.printer)==null?void 0:Fe.enabled,"close-delay":"100",color:"danger","open-delay":"0",top:""},{activator:v(({props:N})=>{var B,Y,fe;return[L("span",ge({class:"xsmall-resized-font text--secondary ml-sm-2"},N),[(B=e.printer)!=null&&B.disabledReason?($(),ve("span",fQ,[V[27]||(V[27]=L("small",null," MAINTENANCE",-1)),h(J,{class:"d-none d-xl-inline",color:"primary",small:""},{default:v(()=>V[26]||(V[26]=[k("info")])),_:1,__:[26]})])):($(),ve("span",hQ,[L("small",{style:is({"background-color":T.value+"99","border-left":"5px solid "+T.value+"ff",padding:"5px"})},se((fe=(Y=S.value)==null?void 0:Y.text)==null?void 0:fe.toUpperCase()),5)]))],16)]}),default:v(()=>{var N;return[L("span",null,se(((N=e.printer)==null?void 0:N.disabledReason)??"Printer disabled"),1)]}),_:1},8,["disabled"])]}),_:1},8,["value"])):pe("",!0)]}),_:1},8,["class"])),[[q,{printers:[e.printer]}]])])),[[G,{x:e.x,y:e.y,printerSet:e.printer}]])}}}),R2="FDM-Monster-Client-Vue2";var I2=(e=>(e.PRINTER_PLACE="PRINTER_PLACE",e))(I2||{});function mQ(e){var t,n;return!((t=e==null?void 0:e.appId)!=null&&t.length)||!((n=e==null?void 0:e.intent)!=null&&n.length)?!1:e.appId===R2&&e.intent==="PRINTER_PLACE"}const gQ=de({color:String,density:String,...Ue()},"VBannerActions"),vQ=ke()({name:"VBannerActions",props:gQ(),setup(e,t){let{slots:n}=t;return Ir({VBtn:{color:e.color,density:e.density,slim:!0,variant:"text"}}),Oe(()=>{var r;return h("div",{class:["v-banner-actions",e.class],style:e.style},[(r=n.default)==null?void 0:r.call(n)])}),{}}}),yQ=ku("v-banner-text"),bQ=de({avatar:String,bgColor:String,color:String,icon:He,lines:String,stacked:Boolean,sticky:Boolean,text:String,...vs(),...Ue(),...Ar(),...Or(),...el({mobile:null}),...bs(),...qo(),...Cu(),...Dn(),..._t(),...Lt()},"VBanner"),A2=ke()({name:"VBanner",props:bQ(),setup(e,t){let{slots:n}=t;const{backgroundColorClasses:r,backgroundColorStyles:s}=fr(()=>e.bgColor),{borderClasses:i}=Ds(e),{densityClasses:o}=ys(e),{displayClasses:a,mobile:l}=fi(e),{dimensionStyles:u}=Mr(e),{elevationClasses:c}=Ls(e),{locationStyles:d}=Za(e),{positionClasses:f}=Tu(e),{roundedClasses:p}=jn(e),{themeClasses:g}=Zt(e),m=ae(()=>e.color),y=ae(()=>e.density);Ir({VBannerActions:{color:m,density:y}}),Oe(()=>{const _=!!(e.text||n.text),b=!!(e.avatar||e.icon),x=!!(b||n.prepend);return h(e.tag,{class:["v-banner",{"v-banner--stacked":e.stacked||l.value,"v-banner--sticky":e.sticky,[`v-banner--${e.lines}-line`]:!!e.lines},g.value,r.value,i.value,o.value,a.value,c.value,f.value,p.value,e.class],style:[s.value,u.value,d.value,e.style],role:"banner"},{default:()=>{var C;return[x&&h("div",{key:"prepend",class:"v-banner__prepend"},[n.prepend?h(Ot,{key:"prepend-defaults",disabled:!b,defaults:{VAvatar:{color:m.value,density:y.value,icon:e.icon,image:e.avatar}}},n.prepend):h(ut,{key:"prepend-avatar",color:m.value,density:y.value,icon:e.icon,image:e.avatar},null)]),h("div",{class:"v-banner__content"},[_&&h(yQ,{key:"text"},{default:()=>{var S;return[((S=n.text)==null?void 0:S.call(n))??e.text]}}),(C=n.default)==null?void 0:C.call(n)]),n.actions&&h(vQ,{key:"actions"},n.actions)]}})})}}),_Q={class:"printer-grid-container"},wQ={key:0,class:"d-flex flex-row justify-start",style:{gap:"10px",width:"100%"}},SQ={key:0,class:"d-flex flex-column justify-start",style:{gap:"10px","margin-top":"10px"}},kQ=Le({__name:"PrinterGrid",props:{gap:{type:String,default:"4px"}},setup(e){const t=Wt(),n=Zi(),r=Ns(),s=Lm();bt(async()=>{await t.loadPrinters(),await n.loadFloors()});const i=e,o=A(()=>n.gridSortedPrinters),a=A(()=>r.gridCols),l=A(()=>r.gridRows),u=A(()=>r.largeTiles),c=A(()=>l.value*a.value),d=A(()=>({display:"grid",gridTemplateColumns:`repeat(${a.value}, 1fr)`,gap:i.gap})),f=C=>C%a.value,p=C=>Math.floor(C/a.value);function g(C,S){S.dataTransfer&&C.id&&S.dataTransfer.setData("text",JSON.stringify({appId:R2,intent:I2.PRINTER_PLACE,printerId:C.id}))}function m(C,S){var w;const T=C,P=S;if(!(!((w=o.value)!=null&&w.length)||!o.value[T]))return o.value[T][P]}async function y(){!s.gridEditMode||!r.frontendSettings||r.frontendSettings.gridRows>=16||(r.frontendSettings.gridRows++,await r.saveFrontendSettings())}async function _(){!s.gridEditMode||!r.frontendSettings||r.frontendSettings.gridCols>=12||(r.frontendSettings.gridCols++,await r.saveFrontendSettings())}async function b(){!s.gridEditMode||!r.frontendSettings||r.frontendSettings.gridRows!=1&&(r.frontendSettings.gridRows--,await r.saveFrontendSettings())}async function x(){!s.gridEditMode||!r.frontendSettings||r.frontendSettings.gridCols!=1&&(r.frontendSettings.gridCols--,await r.saveFrontendSettings())}return(C,S)=>($(),ve("div",null,[X(s).gridEditMode?($(),te(A2,{key:0},{default:v(()=>[h(rt,{style:{"margin-bottom":"-5px"}},{default:v(()=>[h(ze,null,{default:v(()=>[L("span",null," Drag "+se(X(n).floorlessPrinters.length)+" unplaced printer(s) from here to place it on the grid. ",1),h(ap,null,{default:v(()=>[($(!0),ve(Ae,null,Gt(X(n).floorlessPrinters,T=>($(),te(Sn,{key:T.id,draggable:"",size:"small",style:{cursor:"move"},onDragstart:P=>g(T,P)},{default:v(()=>[k(se(T.name),1)]),_:2},1032,["onDragstart"]))),128))]),_:1})]),_:1}),h(ze,null,{default:v(()=>[L("div",null,[S[6]||(S[6]=k(" Clear printers by clicking on ")),L("strong",null,[h(J,null,{default:v(()=>S[4]||(S[4]=[k("disabled_visible")])),_:1,__:[4]}),S[5]||(S[5]=k(" Click to clear "))])])]),_:1})]),_:1})]),_:1})):pe("",!0),L("div",_Q,[L("div",{class:"printer-grid",style:is(d.value)},[($(!0),ve(Ae,null,Gt(c.value,T=>($(),ve("div",{key:`printer-${f(T-1)}-${p(T-1)}`,class:zo(["printer-cell",{"printer-cell-large":u.value}])},[h(pQ,{printer:m(f(T-1),p(T-1)),x:f(T-1),y:p(T-1)},null,8,["printer","x","y"])],2))),128)),X(s).gridEditMode?($(),ve("div",wQ,[S[9]||(S[9]=k(" Columns ")),h(re,{"x-small":"",rounded:"",disabled:X(r).gridCols<=1,onClick:S[0]||(S[0]=T=>x())},{default:v(()=>[h(J,null,{default:v(()=>S[7]||(S[7]=[k("remove")])),_:1,__:[7]})]),_:1},8,["disabled"]),h(re,{"x-small":"",rounded:"",disabled:X(r).gridCols>=12,onClick:S[1]||(S[1]=T=>_())},{default:v(()=>[h(J,null,{default:v(()=>S[8]||(S[8]=[k("add")])),_:1,__:[8]})]),_:1},8,["disabled"])])):pe("",!0)],4),X(s).gridEditMode?($(),ve("div",SQ,[S[12]||(S[12]=k(" Rows ")),h(re,{"x-small":"",rounded:"",disabled:X(r).gridRows<=1,onClick:S[2]||(S[2]=T=>b())},{default:v(()=>[h(J,null,{default:v(()=>S[10]||(S[10]=[k("remove")])),_:1,__:[10]})]),_:1},8,["disabled"]),h(re,{"x-small":"",rounded:"",disabled:X(r).gridRows>=16,onClick:S[3]||(S[3]=T=>y())},{default:v(()=>[h(J,null,{default:v(()=>S[11]||(S[11]=[k("add")])),_:1,__:[11]})]),_:1},8,["disabled"])])):pe("",!0)]),S[13]||(S[13]=L("img",{alt:"FDM Monster Background",class:"grid-bg-img align-content-center",src:y0,style:{opacity:"0.08","pointer-events":"none"}},null,-1))]))}}),xQ=ol(kQ,[["__scopeId","data-v-0a20edf3"]]);function EQ(e,t){return e?t.map(n=>({file:n,printer:e})):[]}function O2(e,t){return!(e!=null&&e.length)||!t?[]:e.map(n=>({file:t,printer:n}))}const CQ=de({indeterminate:Boolean,inset:Boolean,flat:Boolean,loading:{type:[Boolean,String],default:!1},...il(),...Tm()},"VSwitch"),gp=ke()({name:"VSwitch",inheritAttrs:!1,props:CQ(),emits:{"update:focused":e=>!0,"update:modelValue":e=>!0,"update:indeterminate":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const s=it(e,"indeterminate"),i=it(e,"modelValue"),{loaderClasses:o}=Rd(e),{isFocused:a,focus:l,blur:u}=Uu(e),c=j(),d=Et&&window.matchMedia("(forced-colors: active)").matches,f=ae(()=>typeof e.loading=="string"&&e.loading!==""?e.loading:e.color),p=ms(),g=ae(()=>e.id||`switch-${p}`);function m(){s.value&&(s.value=!1)}function y(_){var b,x;_.stopPropagation(),_.preventDefault(),(x=(b=c.value)==null?void 0:b.input)==null||x.click()}return Oe(()=>{const[_,b]=Qa(n),x=fs.filterProps(e),C=Wa.filterProps(e);return h(fs,ge({class:["v-switch",{"v-switch--flat":e.flat},{"v-switch--inset":e.inset},{"v-switch--indeterminate":s.value},o.value,e.class]},_,x,{modelValue:i.value,"onUpdate:modelValue":S=>i.value=S,id:g.value,focused:a.value,style:e.style}),{...r,default:S=>{let{id:T,messagesId:P,isDisabled:w,isReadonly:E,isValid:I}=S;const O={model:i,isValid:I};return h(Wa,ge({ref:c},C,{modelValue:i.value,"onUpdate:modelValue":[R=>i.value=R,m],id:T.value,"aria-describedby":P.value,type:"checkbox","aria-checked":s.value?"mixed":void 0,disabled:w.value,readonly:E.value,onFocus:l,onBlur:u},b),{...r,default:R=>{let{backgroundColorClasses:M,backgroundColorStyles:D}=R;return h("div",{class:["v-switch__track",d?void 0:M.value],style:D.value,onClick:y},[r["track-true"]&&h("div",{key:"prepend",class:"v-switch__track-true"},[r["track-true"](O)]),r["track-false"]&&h("div",{key:"append",class:"v-switch__track-false"},[r["track-false"](O)])])},input:R=>{let{inputNode:M,icon:D,backgroundColorClasses:F,backgroundColorStyles:U}=R;return h(Ae,null,[M,h("div",{class:["v-switch__thumb",{"v-switch__thumb--filled":D||e.loading},e.inset||d?void 0:F.value],style:e.inset?void 0:U.value},[r.thumb?h(Ot,{defaults:{VIcon:{icon:D,size:"x-small"}}},{default:()=>[r.thumb({...O,icon:D})]}):h(cN,null,{default:()=>[e.loading?h(Yp,{name:"v-switch",active:!0,color:I.value===!1?void 0:f.value},{default:K=>r.loader?r.loader(K):h(ni,{active:K.isActive,color:K.color,indeterminate:!0,size:"16",width:"2"},null)}):D&&h(J,{key:String(D),icon:D,size:"x-small"},null)]})])])}})}})}),{}}}),TQ={class:"d-flex flex-wrap gap-2"},PQ={class:"pr-2"},RQ={class:"pr-2"},IQ={class:"pr-2"},AQ={class:"pr-2"},OQ={class:"pr-2"},MQ={class:"ma-4 pt-6"},DQ=Le({__name:"HomeToolbar",setup(e){const t=Wt(),n=rr(),r=Zi(),s=Lm(),i=A(()=>r.selectedFloorIndex),o=A(()=>r.floors);function a(l){r.changeSelectedFloorByIndex(l)}return(l,u)=>($(),te(mr,{flat:""},{default:v(()=>{var c;return[h(ZT,{"model-value":i.value,class:"ml-7",mandatory:"",rounded:"","onUpdate:modelValue":a},{default:v(()=>[($(!0),ve(Ae,null,Gt(o.value,d=>($(),te(re,{key:d.id,size:"small"},{default:v(()=>[h(J,null,{default:v(()=>u[2]||(u[2]=[k("layers")])),_:1,__:[2]}),k(" "+se(d.name),1)]),_:2},1024))),128))]),_:1},8,["model-value"]),(c=X(t).printers)!=null&&c.length?pe("",!0):($(),te(re,{key:0,class:"mt-0 ml-6",color:"primary",to:"/printers"},{default:v(()=>u[3]||(u[3]=[k(" You have no printers. Click here to start! ")])),_:1,__:[3]})),X(r).floorlessPrinters.length?($(),te(fn,{key:1,class:"ml-4"},{default:v(()=>[h(J,null,{default:v(()=>u[4]||(u[4]=[k("warning")])),_:1,__:[4]}),k(" "+se(X(r).floorlessPrinters.length)+" unplaced printer(s)! ",1)]),_:1})):pe("",!0),h(wn),L("span",TQ,[L("span",PQ,[h(J,null,{default:v(()=>u[5]||(u[5]=[k("print")])),_:1,__:[5]}),k(" "+se(X(n).printingCount),1)]),L("span",RQ,[h(J,null,{default:v(()=>u[6]||(u[6]=[k("ac_unit")])),_:1,__:[6]}),k(" "+se(X(n).operationalNotPrintingCount),1)]),L("span",IQ,[h(J,null,{default:v(()=>u[7]||(u[7]=[k("handyman")])),_:1,__:[7]}),k(" "+se(X(t).maintenanceCount),1)]),L("span",AQ,[h(J,null,{default:v(()=>u[8]||(u[8]=[k("usb_off")])),_:1,__:[8]}),k(" "+se(X(t).disconnectedCount),1)]),L("span",OQ,[h(J,null,{default:v(()=>u[9]||(u[9]=[k("print_disabled")])),_:1,__:[9]}),k(" "+se(X(t).disabledCount),1)])]),h(re,{elevation:"2",small:"",class:"ml-6",icon:"",onClick:u[0]||(u[0]=d=>X(tn)(X(nn).GridSettingsDialog).openDialog())},{default:v(()=>[h(J,null,{default:v(()=>u[10]||(u[10]=[k("settings")])),_:1,__:[10]})]),_:1}),L("div",MQ,[h(gp,{modelValue:X(s).gridEditMode,"onUpdate:modelValue":u[1]||(u[1]=d=>X(s).gridEditMode=d),label:"Grid Edit Mode"},null,8,["modelValue"])])]}),_:1}))}}),LQ={class:"pl-1"},$Q=Le({__name:"PrinterGridView",setup(e){const t=Lm(),n=Wt(),r=rr(),s=v0(),i=Dt(),o=j(void 0),a=A(()=>n.selectedPrinters.length>0),l=A(()=>n.selectedPrinters),u=j(null),c=()=>{u.value&&(u.value.value="",o.value=void 0)},d=()=>{n.clearSelectedPrinters()},f=async()=>{var b;const _=await tn(nn.BatchReprintDialog).handleAsync((b=n.selectedPrinters)==null?void 0:b.map(x=>x.id));console.log("[PrinterGridView] Dialog completed",_)},p=()=>{const _=l.value,b=_.filter(S=>r.isApiResponding(S.id));if(!o.value)return;const x=_.length-b.length;x>0&&i.openInfoMessage({title:`${x} printers inaccessible`,subtitle:"These were skipped from uploading."});const C=O2(b,o.value);s.queueUploads(C),u.value&&(u.value.value=""),d()},g=()=>{u.value&&u.value.files?o.value=u.value.files[0]:o.value=void 0},m=_=>{n.toggleSelectedPrinter(_)},y=_=>{Qt.openPrinterURL(_.printerURL)};return(_,b)=>{const x=hr("drop-upload");return $(),ve("div",null,[h(DQ),X(t).gridEditMode?pe("",!0):Nt(($(),te(A2,{key:0},{default:v(()=>[h(rt,{style:{"margin-bottom":"-5px"}},{default:v(()=>[h(ze,{style:{padding:"5px 0 0 15px"}},{default:v(()=>[h(ap,{class:"d-inline-block"},{default:v(()=>[l.value.length===0?($(),te(Sn,{key:0,size:"small"},{default:v(()=>b[6]||(b[6]=[k(" No selected printers ")])),_:1,__:[6]})):pe("",!0),($(!0),ve(Ae,null,Gt(l.value,C=>($(),te(Sn,{key:C.id,closable:"",color:"primary",size:"small",onClick:S=>y(C),"onClick:close":S=>m(C)},{default:v(()=>[k(se(C.name),1)]),_:2},1032,["onClick","onClick:close"]))),128))]),_:1})]),_:1}),h(ze,{align:"right",style:{padding:"0"}},{default:v(()=>[o.value?($(),te(ap,{key:0,class:"float-end"},{default:v(()=>[h(Sn,{closable:"","onClick:close":b[0]||(b[0]=C=>c())},{default:v(()=>[k(se(o.value.name)+" ",1),L("strong",LQ,se(X(sO)(o.value.size)),1)]),_:1})]),_:1})):pe("",!0),b[12]||(b[12]=L("br",null,null,-1)),h(re,{disabled:!a.value,color:"primary",size:"x-small",onClick:b[1]||(b[1]=C=>f())},{default:v(()=>[h(J,{class:"pr-2",size:"small"},{default:v(()=>b[7]||(b[7]=[k(" refresh ")])),_:1,__:[7]}),b[8]||(b[8]=k(" Batch reprint "))]),_:1,__:[8]},8,["disabled"]),h(re,{color:a.value?"primary":"secondary",class:"ml-2",size:"x-small",onClick:b[2]||(b[2]=C=>d())},{default:v(()=>[h(J,{class:"pr-2",size:"small"},{default:v(()=>b[9]||(b[9]=[k(" delete ")])),_:1,__:[9]}),k(" Clear all ("+se(l.value.length)+") ",1)]),_:1},8,["color"]),h(re,{class:"ml-2",color:"primary",size:"x-small",onClick:b[3]||(b[3]=C=>{var S;return(S=u.value)==null?void 0:S.click()})},{default:v(()=>b[10]||(b[10]=[k(" Select gcode file ")])),_:1,__:[10]}),h(re,{disabled:!o.value,class:"ml-2 mr-5",color:"green",size:"x-small",onClick:b[4]||(b[4]=C=>p())},{default:v(()=>b[11]||(b[11]=[k(" Upload gcode file ")])),_:1,__:[11]},8,["disabled"]),L("input",{ref_key:"fileUpload",ref:u,multiple:!1,accept:".gcode",style:{display:"none"},type:"file",onChange:b[5]||(b[5]=C=>g())},null,544)]),_:1,__:[12]})]),_:1})]),_:1})),[[x,{printers:l.value}]]),h(xQ,{class:"ma-2"})])}}}),FQ=Le({name:"RefreshFilesAction",components:{},props:{printer:Object},setup:()=>({printersStore:Wt()}),methods:{async getFiles(){this.printer&&await this.printersStore.loadPrinterFiles(this.printer.id)}}});function NQ(e,t,n,r,s,i){return $(),te(re,{color:"secondary",onClick:t[0]||(t[0]=o=>e.getFiles())},{default:v(()=>[h(J,null,{default:v(()=>t[1]||(t[1]=[k("refresh")])),_:1,__:[1]}),t[2]||(t[2]=L("span",{class:"d-none d-lg-inline"}," Refresh files ",-1))]),_:1,__:[2]})}const M2=ol(FQ,[["render",NQ]]),VQ=Le({name:"PrinterDetails",components:{RefreshFilesAction:M2},props:{printer:Object},setup:()=>({printersStore:Wt(),printerStateStore:rr()}),data:()=>({dragging:!1}),computed:{printerId(){var e;return(e=this.printer)==null?void 0:e.id},socketState(){var e;if(this.printerId)return(e=this.printerStateStore.socketStatesById[this.printerId])==null?void 0:e.socket},apiState(){var e;if(this.printerId)return(e=this.printerStateStore.socketStatesById[this.printerId])==null?void 0:e.api},printerTextState(){var e,t,n;if(this.printerId)return(n=(t=(e=this.printerStateStore.printerEventsById[this.printerId])==null?void 0:e.current)==null?void 0:t.payload)==null?void 0:n.state.text}}});function BQ(e,t,n,r,s,i){const o=M2,a=hr("drop-upload");return e.printer?Nt(($(),te(Hn,{key:0,style:is(e.dragging?"background-color:red":""),transition:"scale-transition"},{default:v(()=>[h(rt,null,{default:v(()=>[h(ze,null,{default:v(()=>[k(" Name: "+se(e.printer.name)+" ",1),t[0]||(t[0]=L("br",null,null,-1)),k(" URL: "+se(e.printer.printerURL)+" ",1),t[1]||(t[1]=L("br",null,null,-1)),t[2]||(t[2]=k(" Host: ")),h(Sn,{size:"small"},{default:v(()=>[k(se(e.apiState),1)]),_:1}),t[3]||(t[3]=L("br",null,null,-1)),t[4]||(t[4]=k(" WebSocket: ")),h(Sn,{size:"small"},{default:v(()=>[k(se(e.socketState),1)]),_:1}),t[5]||(t[5]=L("br",null,null,-1)),t[6]||(t[6]=k(" Printer: ")),h(Sn,{size:"small"},{default:v(()=>[k(se(e.printerTextState),1)]),_:1})]),_:1,__:[0,1,2,3,4,5,6]}),h(ze,null,{default:v(()=>[h(o,{printer:e.printer,class:"d-flex justify-end"},null,8,["printer"])]),_:1})]),_:1})]),_:1},8,["style"])),[[a,{printers:[e.printer]}]]):pe("",!0)}const UQ=ol(VQ,[["render",BQ]]),zQ=Le({__name:"PrinterUrlAction",props:{printer:{}},setup(e){const t=e;async function n(){Qt.openPrinterURL(t.printer.printerURL)}return(r,s)=>($(),te(nt,{location:"top"},{activator:v(({props:i})=>[h(re,ge(i,{color:"secondary",rounded:"",size:"small",onClickCapture:s[0]||(s[0]=St(o=>n(),["stop"]))}),{default:v(()=>[h(J,null,{default:v(()=>s[1]||(s[1]=[k("directions")])),_:1,__:[1]})]),_:2},1040)]),default:v(()=>s[2]||(s[2]=[k("Visit printer service")])),_:1}))}}),HQ=Le({name:"PrinterSettingsAction",props:{printer:Object},computed:{printerId(){return this.printer.id}},methods:{openSettings(){this.$emit("update:show",this.printer.id)}}});function jQ(e,t,n,r,s,i){return $(),te(nt,{location:"top"},{activator:v(({props:o})=>[h(re,ge(o,{color:"secondary",class:"ma-2",size:"small",rounded:"",onClickCapture:t[0]||(t[0]=St(a=>e.openSettings(),["stop"]))}),{default:v(()=>[h(J,null,{default:v(()=>t[1]||(t[1]=[k("settings")])),_:1,__:[1]})]),_:2},1040)]),default:v(()=>t[2]||(t[2]=[k("Update printer settings")])),_:1})}const qQ=ol(HQ,[["render",jQ]]),WQ=de({bordered:Boolean,color:String,content:[Number,String],dot:Boolean,floating:Boolean,icon:He,inline:Boolean,label:{type:String,default:"$vuetify.badge"},max:[Number,String],modelValue:{type:Boolean,default:!0},offsetX:[Number,String],offsetY:[Number,String],textColor:String,...Ue(),...qo({location:"top end"}),...Dn(),..._t(),...Lt(),...Iu({transition:"scale-rotate-transition"})},"VBadge"),D2=ke()({name:"VBadge",inheritAttrs:!1,props:WQ(),setup(e,t){const{backgroundColorClasses:n,backgroundColorStyles:r}=fr(()=>e.color),{roundedClasses:s}=jn(e),{t:i}=Gr(),{textColorClasses:o,textColorStyles:a}=As(()=>e.textColor),{themeClasses:l}=YT(),{locationStyles:u}=Za(e,!0,c=>(e.floating?e.dot?2:4:e.dot?8:12)+(["top","bottom"].includes(c)?Number(e.offsetY??0):["left","right"].includes(c)?Number(e.offsetX??0):0));return Oe(()=>{const c=Number(e.content),d=!e.max||isNaN(c)?e.content:c<=Number(e.max)?c:`${e.max}+`,[f,p]=$v(t.attrs,["aria-atomic","aria-label","aria-live","role","title"]);return h(e.tag,ge({class:["v-badge",{"v-badge--bordered":e.bordered,"v-badge--dot":e.dot,"v-badge--floating":e.floating,"v-badge--inline":e.inline},e.class]},p,{style:e.style}),{default:()=>{var g,m;return[h("div",{class:"v-badge__wrapper"},[(m=(g=t.slots).default)==null?void 0:m.call(g),h(si,{transition:e.transition},{default:()=>{var y,_;return[Nt(h("span",ge({class:["v-badge__badge",l.value,n.value,s.value,o.value],style:[r.value,a.value,e.inline?{}:u.value],"aria-atomic":"true","aria-label":i(e.label,c),"aria-live":"polite",role:"status"},f),[e.dot?void 0:t.slots.badge?(_=(y=t.slots).badge)==null?void 0:_.call(y):e.icon?h(J,{icon:e.icon},null):d]),[[Qi,e.modelValue]])]}})])]}})}),{}}}),GQ=Le({__name:"PrinterConnectionAction",props:{printer:{}},setup(e){const t=e,n=rr();function r(){return t.printer.id?n.isPrinterOperational(t.printer.id):!1}function s(){return t.printer.id?n.isPrinterPrinting(t.printer.id):!1}async function i(){if(r())return Qt.sendPrinterDisconnectCommand(t.printer.id);await Qt.sendPrinterConnectCommand(t.printer.id)}return(o,a)=>($(),te(nt,{location:"top"},{activator:v(({props:l})=>[o.printer.enabled?($(),te(D2,{key:0,color:r()?"green":"red",class:"pa-2"},{badge:v(()=>[r()?($(),te(J,{key:0},{default:v(()=>a[0]||(a[0]=[k("check")])),_:1,__:[0]})):($(),te(J,{key:1},{default:v(()=>a[1]||(a[1]=[k("close")])),_:1,__:[1]}))]),default:v(()=>[h(re,ge({disabled:s()},l,{color:"secondary",rounded:"",size:"small",onClick:St(i,["stop"])}),{default:v(()=>[h(J,null,{default:v(()=>a[2]||(a[2]=[k("usb")])),_:1,__:[2]})]),_:2},1040,["disabled"])]),_:2},1032,["color"])):pe("",!0)]),default:v(()=>a[3]||(a[3]=[k("Connect USB (OctoPrint only)")])),_:1}))}}),KQ=Le({__name:"PrinterQuickStopAction",props:{printer:{}},setup(e){const t=e;async function n(){confirm("Are you sure to quick stop this printer?")&&await P2.postQuickStopM112Command(t.printer.id)}return(r,s)=>($(),te(nt,{location:"top"},{activator:v(({props:i})=>[r.printer.enabled?($(),te(D2,{key:0,class:"ma-2"},{badge:v(()=>[h(J,null,{default:v(()=>s[0]||(s[0]=[k("bolt")])),_:1,__:[0]})]),default:v(()=>[h(re,ge(i,{color:"secondary",size:"small",rounded:"",onClick:St(n,["stop"])}),{default:v(()=>[h(J,null,{default:v(()=>s[1]||(s[1]=[k("dangerous")])),_:1,__:[1]})]),_:2},1040)]),_:2},1024)):pe("",!0)]),default:v(()=>s[2]||(s[2]=[k("Perform quick stop of printer")])),_:1}))}});class L2 extends gr{static async getSettings(t){const n=`${Me.getPrinterSettingsRoute(t)}`;return await this.get(n)}static async setGCodeAnalysis(t,n=!1){const r=`${Me.setPrinterSettingsGCodeAnalysisRoute(t)}`;return await this.post(r,{enabled:n})}static async syncPrinterName(t){const n=`${Me.syncPrinterNameSettingRoute(t)}`;return await this.post(n)}}const YQ=Le({__name:"SyncPrinterNameAction",props:{printer:{}},setup(e){const t=e,n=Dt();async function r(){await L2.syncPrinterName(t.printer.id),n.openInfoMessage({title:"Synced printer name to OctoPrint"})}return(s,i)=>($(),te(nt,{location:"top"},{activator:v(({props:o})=>[h(re,ge(o,{color:"secondary",size:"small",rounded:"",onClickCapture:i[0]||(i[0]=St(a=>r(),["stop"]))}),{default:v(()=>[h(J,null,{default:v(()=>i[1]||(i[1]=[k("badge")])),_:1,__:[1]})]),_:2},1040)]),default:v(()=>i[2]||(i[2]=[k(" Set OctoPrints name to the FDM Monster Name ")])),_:1}))}}),XQ=Le({__name:"PrinterDeleteAction",props:{printer:{}},setup(e){const t=e,n=Wt(),r=rr();async function s(){confirm("Are you sure to delete this printer?")&&(await n.deletePrinter(t.printer.id),r.deletePrinterEvents(t.printer.id))}return(i,o)=>($(),te(nt,{location:"top"},{activator:v(({props:a})=>[h(re,ge(a,{class:"ms-4",color:"secondary",size:"small",rounded:"",onClick:St(s,["prevent","stop"])}),{default:v(()=>[h(J,null,{default:v(()=>o[0]||(o[0]=[k("delete")])),_:1,__:[0]})]),_:2},1040)]),default:v(()=>o[1]||(o[1]=[k("Delete printer")])),_:1}))}});class pl extends gr{static async createGroup(t){const n=`${Me.createGroupRoute}`,r={name:t};return await this.post(n,r)}static async deleteGroup(t){const n=`${Me.deleteGroupRoute(t)}`;return await this.delete(n)}static async getGroupsWithPrinters(){const t=`${Me.printerGroupRoute}`;return await this.get(t)}static async addPrinterToGroup(t,n){const r=`${Me.addPrinterToGroupRoute(t)}`,s={printerId:n};return await this.post(r,s)}static async deletePrinterFromGroup(t,n){const r=`${Me.deletePrinterFromGroupRoute(t)}`,s={printerId:n};return await this.delete(r,s)}static async updateGroupName(t,n){const r=`${Me.updateGroupNameRoute(t)}`,s={name:n};return await this.patch(r,s)}}const QQ=(e,t,n)=>{if(e==null||t==null)return-1;if(!t.length)return 0;e=e.toString().toLocaleLowerCase(),t=t.toString().toLocaleLowerCase();const r=[];let s=e.indexOf(t);for(;~s;)r.push([s,s+t.length]),s=e.indexOf(t,s+t.length);return r.length?r:-1};function Xg(e,t){if(!(e==null||typeof e=="boolean"||e===-1))return typeof e=="number"?[[e,e+t.length]]:Array.isArray(e[0])?e:[e]}const JQ=de({customFilter:Function,customKeyFilter:Object,filterKeys:[Array,String],filterMode:{type:String,default:"intersection"},noFilter:Boolean},"filter");function ZQ(e,t,n){var a;const r=[],s=(n==null?void 0:n.default)??QQ,i=n!=null&&n.filterKeys?An(n.filterKeys):!1,o=Object.keys((n==null?void 0:n.customKeyFilter)??{}).length;if(!(e!=null&&e.length))return r;e:for(let l=0;l<e.length;l++){const[u,c=u]=An(e[l]),d={},f={};let p=-1;if((t||o>0)&&!(n!=null&&n.noFilter)){if(typeof u=="object"){const y=i||Object.keys(c);for(const _ of y){const b=Vn(c,_),x=(a=n==null?void 0:n.customKeyFilter)==null?void 0:a[_];if(p=x?x(b,t,u):s(b,t,u),p!==-1&&p!==!1)x?d[_]=Xg(p,t):f[_]=Xg(p,t);else if((n==null?void 0:n.filterMode)==="every")continue e}}else p=s(u,t,u),p!==-1&&p!==!1&&(f.title=Xg(p,t));const g=Object.keys(f).length,m=Object.keys(d).length;if(!g&&!m||(n==null?void 0:n.filterMode)==="union"&&m!==o&&!g||(n==null?void 0:n.filterMode)==="intersection"&&(m!==o||!g))continue}r.push({index:l,matches:{...f,...d}})}return r}function eJ(e,t,n,r){const s=Ie([]),i=Ie(new Map),o=A(()=>r!=null&&r.transform?X(t).map(l=>[l,r.transform(l)]):X(t));On(()=>{const l=typeof n=="function"?n():X(n),u=typeof l!="string"&&typeof l!="number"?"":String(l),c=ZQ(o.value,u,{customKeyFilter:{...e.customKeyFilter,...X(r==null?void 0:r.customKeyFilter)},default:e.customFilter,filterKeys:e.filterKeys,filterMode:e.filterMode,noFilter:e.noFilter}),d=X(t),f=[],p=new Map;c.forEach(g=>{let{index:m,matches:y}=g;const _=d[m];f.push(_),p.set(_.value,y)}),s.value=f,i.value=p});function a(l){return i.value.get(l.value)}return{filteredItems:s,filteredMatches:i,getMatches:a}}const tJ=de({expandOnClick:Boolean,showExpand:Boolean,expanded:{type:Array,default:()=>[]}},"DataTable-expand"),$2=Symbol.for("vuetify:datatable:expanded");function nJ(e){const t=ae(()=>e.expandOnClick),n=it(e,"expanded",e.expanded,a=>new Set(a),a=>[...a.values()]);function r(a,l){const u=new Set(n.value);l?u.add(a.value):u.delete(a.value),n.value=u}function s(a){return n.value.has(a.value)}function i(a){r(a,!s(a))}const o={expand:r,expanded:n,expandOnClick:t,isExpanded:s,toggleExpand:i};return Kt($2,o),o}function F2(){const e=Qe($2);if(!e)throw new Error("foo");return e}const rJ=de({groupBy:{type:Array,default:()=>[]}},"DataTable-group"),N2=Symbol.for("vuetify:data-table-group");function sJ(e){return{groupBy:it(e,"groupBy")}}function iJ(e){const{disableSort:t,groupBy:n,sortBy:r}=e,s=j(new Set),i=A(()=>n.value.map(c=>({...c,order:c.order??!1})).concat(t!=null&&t.value?[]:r.value));function o(c){return s.value.has(c.id)}function a(c){const d=new Set(s.value);o(c)?d.delete(c.id):d.add(c.id),s.value=d}function l(c){function d(f){const p=[];for(const g of f.items)"type"in g&&g.type==="group"?p.push(...d(g)):p.push(g);return[...new Set(p)]}return d({type:"group",items:c,id:"dummy",key:"dummy",value:"dummy",depth:0})}const u={sortByWithGroups:i,toggleGroup:a,opened:s,groupBy:n,extractRows:l,isGroupOpen:o};return Kt(N2,u),u}function V2(){const e=Qe(N2);if(!e)throw new Error("Missing group!");return e}function oJ(e,t){if(!e.length)return[];const n=new Map;for(const r of e){const s=Na(r.raw,t);n.has(s)||n.set(s,[]),n.get(s).push(r)}return n}function B2(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"root";if(!t.length)return[];const s=oJ(e,t[0]),i=[],o=t.slice(1);return s.forEach((a,l)=>{const u=t[0],c=`${r}_${u}_${l}`;i.push({depth:n,id:c,key:u,value:l,items:o.length?B2(a,o,n+1,c):a,type:"group"})}),i}function U2(e,t){const n=[];for(const r of e)"type"in r&&r.type==="group"?(r.value!=null&&n.push(r),(t.has(r.id)||r.value==null)&&n.push(...U2(r.items,t))):n.push(r);return n}function aJ(e,t,n){return{flatItems:A(()=>{if(!t.value.length)return e.value;const s=B2(e.value,t.value.map(i=>i.key));return U2(s,n.value)})}}function lJ(e){let{page:t,itemsPerPage:n,sortBy:r,groupBy:s,search:i}=e;const o=an("VDataTable"),a=()=>({page:t.value,itemsPerPage:n.value,sortBy:r.value,groupBy:s.value,search:i.value});let l=null;Ee(a,u=>{as(l,u)||(l&&l.search!==u.search&&(t.value=1),o.emit("update:options",u),l=u)},{deep:!0,immediate:!0})}const uJ=de({page:{type:[Number,String],default:1},itemsPerPage:{type:[Number,String],default:10}},"DataTable-paginate"),z2=Symbol.for("vuetify:data-table-pagination");function cJ(e){const t=it(e,"page",void 0,r=>Number(r??1)),n=it(e,"itemsPerPage",void 0,r=>Number(r??10));return{page:t,itemsPerPage:n}}function dJ(e){const{page:t,itemsPerPage:n,itemsLength:r}=e,s=A(()=>n.value===-1?0:n.value*(t.value-1)),i=A(()=>n.value===-1?r.value:Math.min(r.value,s.value+n.value)),o=A(()=>n.value===-1||r.value===0?1:Math.ceil(r.value/n.value));Ee([t,o],()=>{t.value>o.value&&(t.value=o.value)});function a(f){n.value=f,t.value=1}function l(){t.value=Cr(t.value+1,1,o.value)}function u(){t.value=Cr(t.value-1,1,o.value)}function c(f){t.value=Cr(f,1,o.value)}const d={page:t,itemsPerPage:n,startIndex:s,stopIndex:i,pageCount:o,itemsLength:r,nextPage:l,prevPage:u,setPage:c,setItemsPerPage:a};return Kt(z2,d),d}function fJ(){const e=Qe(z2);if(!e)throw new Error("Missing pagination!");return e}function hJ(e){const t=an("usePaginatedItems"),{items:n,startIndex:r,stopIndex:s,itemsPerPage:i}=e,o=A(()=>i.value<=0?n.value:n.value.slice(r.value,s.value));return Ee(o,a=>{t.emit("update:currentItems",a)},{immediate:!0}),{paginatedItems:o}}const pJ={showSelectAll:!1,allSelected:()=>[],select:e=>{var r;let{items:t,value:n}=e;return new Set(n?[(r=t[0])==null?void 0:r.value]:[])},selectAll:e=>{let{selected:t}=e;return t}},H2={showSelectAll:!0,allSelected:e=>{let{currentPage:t}=e;return t},select:e=>{let{items:t,value:n,selected:r}=e;for(const s of t)n?r.add(s.value):r.delete(s.value);return r},selectAll:e=>{let{value:t,currentPage:n,selected:r}=e;return H2.select({items:n,value:t,selected:r})}},j2={showSelectAll:!0,allSelected:e=>{let{allItems:t}=e;return t},select:e=>{let{items:t,value:n,selected:r}=e;for(const s of t)n?r.add(s.value):r.delete(s.value);return r},selectAll:e=>{let{value:t,allItems:n,selected:r}=e;return j2.select({items:n,value:t,selected:r})}},mJ=de({showSelect:Boolean,selectStrategy:{type:[String,Object],default:"page"},modelValue:{type:Array,default:()=>[]},valueComparator:{type:Function,default:as}},"DataTable-select"),q2=Symbol.for("vuetify:data-table-selection");function gJ(e,t){let{allItems:n,currentPage:r}=t;const s=it(e,"modelValue",e.modelValue,b=>new Set(An(b).map(x=>{var C;return((C=n.value.find(S=>e.valueComparator(x,S.value)))==null?void 0:C.value)??x})),b=>[...b.values()]),i=A(()=>n.value.filter(b=>b.selectable)),o=A(()=>r.value.filter(b=>b.selectable)),a=A(()=>{if(typeof e.selectStrategy=="object")return e.selectStrategy;switch(e.selectStrategy){case"single":return pJ;case"all":return j2;case"page":default:return H2}}),l=Ie(null);function u(b){return An(b).every(x=>s.value.has(x.value))}function c(b){return An(b).some(x=>s.value.has(x.value))}function d(b,x){const C=a.value.select({items:b,value:x,selected:new Set(s.value)});s.value=C}function f(b,x,C){const S=[];if(x=x??r.value.findIndex(T=>T.value===b.value),e.selectStrategy!=="single"&&(C!=null&&C.shiftKey)&&l.value!==null){const[T,P]=[l.value,x].sort((w,E)=>w-E);S.push(...r.value.slice(T,P+1).filter(w=>w.selectable))}else S.push(b),l.value=x;d(S,!u([b]))}function p(b){const x=a.value.selectAll({value:b,allItems:i.value,currentPage:o.value,selected:new Set(s.value)});s.value=x}const g=A(()=>s.value.size>0),m=A(()=>{const b=a.value.allSelected({allItems:i.value,currentPage:o.value});return!!b.length&&u(b)}),y=ae(()=>a.value.showSelectAll),_={toggleSelect:f,select:d,selectAll:p,isSelected:u,isSomeSelected:c,someSelected:g,allSelected:m,showSelectAll:y,lastSelectedIndex:l,selectStrategy:a};return Kt(q2,_),_}function $m(){const e=Qe(q2);if(!e)throw new Error("Missing selection!");return e}const vJ=de({sortBy:{type:Array,default:()=>[]},customKeySort:Object,multiSort:Boolean,mustSort:Boolean},"DataTable-sort"),W2=Symbol.for("vuetify:data-table-sort");function yJ(e){const t=it(e,"sortBy"),n=ae(()=>e.mustSort),r=ae(()=>e.multiSort);return{sortBy:t,mustSort:n,multiSort:r}}function bJ(e){const{sortBy:t,mustSort:n,multiSort:r,page:s}=e,i=l=>{if(l.key==null)return;let u=t.value.map(d=>({...d}))??[];const c=u.find(d=>d.key===l.key);c?c.order==="desc"?n.value&&u.length===1?c.order="asc":u=u.filter(d=>d.key!==l.key):c.order="desc":r.value?u.push({key:l.key,order:"asc"}):u=[{key:l.key,order:"asc"}],t.value=u,s&&(s.value=1)};function o(l){return!!t.value.find(u=>u.key===l.key)}const a={sortBy:t,toggleSort:i,isSorted:o};return Kt(W2,a),a}function G2(){const e=Qe(W2);if(!e)throw new Error("Missing sort!");return e}function _J(e,t,n,r){const s=Gr();return{sortedItems:A(()=>{var o,a;return n.value.length?wJ(t.value,n.value,s.current.value,{transform:r==null?void 0:r.transform,sortFunctions:{...e.customKeySort,...(o=r==null?void 0:r.sortFunctions)==null?void 0:o.value},sortRawFunctions:(a=r==null?void 0:r.sortRawFunctions)==null?void 0:a.value}):t.value})}}function wJ(e,t,n,r){const s=new Intl.Collator(n,{sensitivity:"accent",usage:"sort"});return e.map(o=>[o,r!=null&&r.transform?r.transform(o):o]).sort((o,a)=>{var l,u;for(let c=0;c<t.length;c++){let d=!1;const f=t[c].key,p=t[c].order??"asc";if(p===!1)continue;let g=Na(o[1],f),m=Na(a[1],f),y=o[0].raw,_=a[0].raw;if(p==="desc"&&([g,m]=[m,g],[y,_]=[_,y]),(l=r==null?void 0:r.sortRawFunctions)!=null&&l[f]){const b=r.sortRawFunctions[f](y,_);if(b==null)continue;if(d=!0,b)return b}if((u=r==null?void 0:r.sortFunctions)!=null&&u[f]){const b=r.sortFunctions[f](g,m);if(b==null)continue;if(d=!0,b)return b}if(!d){if(g instanceof Date&&m instanceof Date)return g.getTime()-m.getTime();if([g,m]=[g,m].map(b=>b!=null?b.toString().toLocaleLowerCase():b),g!==m)return tf(g)&&tf(m)?0:tf(g)?-1:tf(m)?1:!isNaN(g)&&!isNaN(m)?Number(g)-Number(m):s.compare(g,m)}}return 0}).map(o=>{let[a]=o;return a})}function SJ(){const e=j([]);qC(()=>e.value=[]);function t(n,r){e.value[r]=n}return{refs:e,updateRef:t}}const kJ=de({activeColor:String,start:{type:[Number,String],default:1},modelValue:{type:Number,default:e=>e.start},disabled:Boolean,length:{type:[Number,String],default:1,validator:e=>e%1===0},totalVisible:[Number,String],firstIcon:{type:He,default:"$first"},prevIcon:{type:He,default:"$prev"},nextIcon:{type:He,default:"$next"},lastIcon:{type:He,default:"$last"},ariaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.root"},pageAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.page"},currentPageAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.currentPage"},firstAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.first"},previousAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.previous"},nextAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.next"},lastAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.last"},ellipsis:{type:String,default:"..."},showFirstLastPage:Boolean,...vs(),...Ue(),...Ar(),...bs(),...Dn(),...Eu(),..._t({tag:"nav"}),...Lt(),...$s({variant:"text"})},"VPagination"),ix=ke()({name:"VPagination",props:kJ(),emits:{"update:modelValue":e=>!0,first:e=>!0,prev:e=>!0,next:e=>!0,last:e=>!0},setup(e,t){let{slots:n,emit:r}=t;const s=it(e,"modelValue"),{t:i,n:o}=Gr(),{isRtl:a}=Dr(),{themeClasses:l}=Zt(e),{width:u}=fi(),c=Ie(-1);Ir(void 0,{scoped:!0});const{resizeRef:d}=Va(w=>{if(!w.length)return;const{target:E,contentRect:I}=w[0],O=E.querySelector(".v-pagination__list > *");if(!O)return;const R=I.width,M=O.offsetWidth+parseFloat(getComputedStyle(O).marginRight)*2;c.value=m(R,M)}),f=A(()=>parseInt(e.length,10)),p=A(()=>parseInt(e.start,10)),g=A(()=>e.totalVisible!=null?parseInt(e.totalVisible,10):c.value>=0?c.value:m(u.value,58));function m(w,E){const I=e.showFirstLastPage?5:3;return Math.max(0,Math.floor(Number(((w-E*I)/E).toFixed(2))))}const y=A(()=>{if(f.value<=0||isNaN(f.value)||f.value>Number.MAX_SAFE_INTEGER)return[];if(g.value<=0)return[];if(g.value===1)return[s.value];if(f.value<=g.value)return xl(f.value,p.value);const w=g.value%2===0,E=w?g.value/2:Math.floor(g.value/2),I=w?E:E+1,O=f.value-E;if(I-s.value>=0)return[...xl(Math.max(1,g.value-1),p.value),e.ellipsis,f.value];if(s.value-O>=(w?1:0)){const R=g.value-1,M=f.value-R+p.value;return[p.value,e.ellipsis,...xl(R,M)]}else{const R=Math.max(1,g.value-2),M=R===1?s.value:s.value-Math.ceil(R/2)+p.value;return[p.value,e.ellipsis,...xl(R,M),e.ellipsis,f.value]}});function _(w,E,I){w.preventDefault(),s.value=E,I&&r(I,E)}const{refs:b,updateRef:x}=SJ();Ir({VPaginationBtn:{color:ae(()=>e.color),border:ae(()=>e.border),density:ae(()=>e.density),size:ae(()=>e.size),variant:ae(()=>e.variant),rounded:ae(()=>e.rounded),elevation:ae(()=>e.elevation)}});const C=A(()=>y.value.map((w,E)=>{const I=O=>x(O,E);if(typeof w=="string")return{isActive:!1,key:`ellipsis-${E}`,page:w,props:{ref:I,ellipsis:!0,icon:!0,disabled:!0}};{const O=w===s.value;return{isActive:O,key:w,page:o(w),props:{ref:I,ellipsis:!1,icon:!0,disabled:!!e.disabled||Number(e.length)<2,color:O?e.activeColor:e.color,"aria-current":O,"aria-label":i(O?e.currentPageAriaLabel:e.pageAriaLabel,w),onClick:R=>_(R,w)}}}})),S=A(()=>{const w=!!e.disabled||s.value<=p.value,E=!!e.disabled||s.value>=p.value+f.value-1;return{first:e.showFirstLastPage?{icon:a.value?e.lastIcon:e.firstIcon,onClick:I=>_(I,p.value,"first"),disabled:w,"aria-label":i(e.firstAriaLabel),"aria-disabled":w}:void 0,prev:{icon:a.value?e.nextIcon:e.prevIcon,onClick:I=>_(I,s.value-1,"prev"),disabled:w,"aria-label":i(e.previousAriaLabel),"aria-disabled":w},next:{icon:a.value?e.prevIcon:e.nextIcon,onClick:I=>_(I,s.value+1,"next"),disabled:E,"aria-label":i(e.nextAriaLabel),"aria-disabled":E},last:e.showFirstLastPage?{icon:a.value?e.firstIcon:e.lastIcon,onClick:I=>_(I,p.value+f.value-1,"last"),disabled:E,"aria-label":i(e.lastAriaLabel),"aria-disabled":E}:void 0}});function T(){var E;const w=s.value-p.value;(E=b.value[w])==null||E.$el.focus()}function P(w){w.key===N1.left&&!e.disabled&&s.value>Number(e.start)?(s.value=s.value-1,Mt(T)):w.key===N1.right&&!e.disabled&&s.value<p.value+f.value-1&&(s.value=s.value+1,Mt(T))}return Oe(()=>h(e.tag,{ref:d,class:["v-pagination",l.value,e.class],style:e.style,role:"navigation","aria-label":i(e.ariaLabel),onKeydown:P,"data-test":"v-pagination-root"},{default:()=>[h("ul",{class:"v-pagination__list"},[e.showFirstLastPage&&h("li",{key:"first",class:"v-pagination__first","data-test":"v-pagination-first"},[n.first?n.first(S.value.first):h(re,ge({_as:"VPaginationBtn"},S.value.first),null)]),h("li",{key:"prev",class:"v-pagination__prev","data-test":"v-pagination-prev"},[n.prev?n.prev(S.value.prev):h(re,ge({_as:"VPaginationBtn"},S.value.prev),null)]),C.value.map((w,E)=>h("li",{key:w.key,class:["v-pagination__item",{"v-pagination__item--is-active":w.isActive}],"data-test":"v-pagination-item"},[n.item?n.item(w):h(re,ge({_as:"VPaginationBtn"},w.props),{default:()=>[w.page]})])),h("li",{key:"next",class:"v-pagination__next","data-test":"v-pagination-next"},[n.next?n.next(S.value.next):h(re,ge({_as:"VPaginationBtn"},S.value.next),null)]),e.showFirstLastPage&&h("li",{key:"last",class:"v-pagination__last","data-test":"v-pagination-last"},[n.last?n.last(S.value.last):h(re,ge({_as:"VPaginationBtn"},S.value.last),null)])])]})),{}}}),K2=de({prevIcon:{type:He,default:"$prev"},nextIcon:{type:He,default:"$next"},firstIcon:{type:He,default:"$first"},lastIcon:{type:He,default:"$last"},itemsPerPageText:{type:String,default:"$vuetify.dataFooter.itemsPerPageText"},pageText:{type:String,default:"$vuetify.dataFooter.pageText"},firstPageLabel:{type:String,default:"$vuetify.dataFooter.firstPage"},prevPageLabel:{type:String,default:"$vuetify.dataFooter.prevPage"},nextPageLabel:{type:String,default:"$vuetify.dataFooter.nextPage"},lastPageLabel:{type:String,default:"$vuetify.dataFooter.lastPage"},itemsPerPageOptions:{type:Array,default:()=>[{value:10,title:"10"},{value:25,title:"25"},{value:50,title:"50"},{value:100,title:"100"},{value:-1,title:"$vuetify.dataFooter.itemsPerPageAll"}]},showCurrentPage:Boolean},"VDataTableFooter"),ox=ke()({name:"VDataTableFooter",props:K2(),setup(e,t){let{slots:n}=t;const{t:r}=Gr(),{page:s,pageCount:i,startIndex:o,stopIndex:a,itemsLength:l,itemsPerPage:u,setItemsPerPage:c}=fJ(),d=A(()=>e.itemsPerPageOptions.map(f=>typeof f=="number"?{value:f,title:f===-1?r("$vuetify.dataFooter.itemsPerPageAll"):String(f)}:{...f,title:isNaN(Number(f.title))?r(f.title):f.title}));return Oe(()=>{var p;const f=ix.filterProps(e);return h("div",{class:"v-data-table-footer"},[(p=n.prepend)==null?void 0:p.call(n),h("div",{class:"v-data-table-footer__items-per-page"},[h("span",null,[r(e.itemsPerPageText)]),h(Vo,{items:d.value,modelValue:u.value,"onUpdate:modelValue":g=>c(Number(g)),density:"compact",variant:"outlined","hide-details":!0},null)]),h("div",{class:"v-data-table-footer__info"},[h("div",null,[r(e.pageText,l.value?o.value+1:0,a.value,l.value)])]),h("div",{class:"v-data-table-footer__pagination"},[h(ix,ge({modelValue:s.value,"onUpdate:modelValue":g=>s.value=g,density:"comfortable","first-aria-label":e.firstPageLabel,"last-aria-label":e.lastPageLabel,length:i.value,"next-aria-label":e.nextPageLabel,"previous-aria-label":e.prevPageLabel,rounded:!0,"show-first-last-page":!0,"total-visible":e.showCurrentPage?1:0,variant:"plain"},f),null)])])}),{}}}),vp=yF({align:{type:String,default:"start"},fixed:Boolean,fixedOffset:[Number,String],height:[Number,String],lastFixed:Boolean,noPadding:Boolean,tag:String,width:[Number,String],maxWidth:[Number,String],nowrap:Boolean},(e,t)=>{let{slots:n}=t;const r=e.tag??"td";return h(r,{class:["v-data-table__td",{"v-data-table-column--fixed":e.fixed,"v-data-table-column--last-fixed":e.lastFixed,"v-data-table-column--no-padding":e.noPadding,"v-data-table-column--nowrap":e.nowrap},`v-data-table-column--align-${e.align}`],style:{height:Ne(e.height),width:Ne(e.width),maxWidth:Ne(e.maxWidth),left:Ne(e.fixedOffset||null)}},{default:()=>{var s;return[(s=n.default)==null?void 0:s.call(n)]}})}),xJ=de({headers:Array},"DataTable-header"),Y2=Symbol.for("vuetify:data-table-headers"),X2={title:"",sortable:!1},EJ={...X2,width:48};function CJ(){const t=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).map(n=>({element:n,priority:0}));return{enqueue:(n,r)=>{let s=!1;for(let i=0;i<t.length;i++)if(t[i].priority>r){t.splice(i,0,{element:n,priority:r}),s=!0;break}s||t.push({element:n,priority:r})},size:()=>t.length,count:()=>{let n=0;if(!t.length)return 0;const r=Math.floor(t[0].priority);for(let s=0;s<t.length;s++)Math.floor(t[s].priority)===r&&(n+=1);return n},dequeue:()=>t.shift()}}function pb(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(!e.children)t.push(e);else for(const n of e.children)pb(n,t);return t}function Q2(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Set;for(const n of e)n.key&&t.add(n.key),n.children&&Q2(n.children,t);return t}function TJ(e){if(e.key){if(e.key==="data-table-group")return X2;if(["data-table-expand","data-table-select"].includes(e.key))return EJ}}function b0(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.children?Math.max(t,...e.children.map(n=>b0(n,t+1))):t}function PJ(e){let t=!1;function n(i){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(i)if(o&&(i.fixed=!0),i.fixed)if(i.children)for(let a=i.children.length-1;a>=0;a--)n(i.children[a],!0);else t?isNaN(Number(i.width))?(`${i.key}`,void 0):i.minWidth=Math.max(Number(i.width)||0,Number(i.minWidth)||0):i.lastFixed=!0,t=!0;else if(i.children)for(let a=i.children.length-1;a>=0;a--)n(i.children[a]);else t=!1}for(let i=e.length-1;i>=0;i--)n(e[i]);function r(i){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!i)return o;if(i.children){i.fixedOffset=o;for(const a of i.children)o=r(a,o)}else i.fixed&&(i.fixedOffset=o,o+=parseFloat(i.width||"0")||0);return o}let s=0;for(const i of e)s=r(i,s)}function RJ(e,t){const n=[];let r=0;const s=CJ(e);for(;s.size()>0;){let o=s.count();const a=[];let l=1;for(;o>0;){const{element:u,priority:c}=s.dequeue(),d=t-r-b0(u);if(a.push({...u,rowspan:d??1,colspan:u.children?pb(u).length:1}),u.children)for(const f of u.children){const p=c%1+l/Math.pow(10,r+2);s.enqueue(f,r+d+p)}l+=1,o-=1}r+=1,n.push(a)}return{columns:e.map(o=>pb(o)).flat(),headers:n}}function J2(e){const t=[];for(const n of e){const r={...TJ(n),...n},s=r.key??(typeof r.value=="string"?r.value:null),i=r.value??s??null,o={...r,key:s,value:i,sortable:r.sortable??(r.key!=null||!!r.sort),children:r.children?J2(r.children):void 0};t.push(o)}return t}function IJ(e,t){const n=j([]),r=j([]),s=j({}),i=j({}),o=j({});On(()=>{var m,y,_;const u=(e.headers||Object.keys(e.items[0]??{}).map(b=>({key:b,title:ci(b)}))).slice(),c=Q2(u);(m=t==null?void 0:t.groupBy)!=null&&m.value.length&&!c.has("data-table-group")&&u.unshift({key:"data-table-group",title:"Group"}),(y=t==null?void 0:t.showSelect)!=null&&y.value&&!c.has("data-table-select")&&u.unshift({key:"data-table-select"}),(_=t==null?void 0:t.showExpand)!=null&&_.value&&!c.has("data-table-expand")&&u.push({key:"data-table-expand"});const d=J2(u);PJ(d);const f=Math.max(...d.map(b=>b0(b)))+1,p=RJ(d,f);n.value=p.headers,r.value=p.columns;const g=p.headers.flat(1);for(const b of g)b.key&&(b.sortable&&(b.sort&&(s.value[b.key]=b.sort),b.sortRaw&&(i.value[b.key]=b.sortRaw)),b.filter&&(o.value[b.key]=b.filter))});const a={headers:n,columns:r,sortFunctions:s,sortRawFunctions:i,filterFunctions:o};return Kt(Y2,a),a}function Fm(){const e=Qe(Y2);if(!e)throw new Error("Missing headers!");return e}const Z2=de({color:String,disableSort:Boolean,fixedHeader:Boolean,multiSort:Boolean,sortAscIcon:{type:He,default:"$sortAsc"},sortDescIcon:{type:He,default:"$sortDesc"},headerProps:{type:Object},sticky:Boolean,...el(),...Kp()},"VDataTableHeaders"),ax=ke()({name:"VDataTableHeaders",props:Z2(),setup(e,t){let{slots:n}=t;const{t:r}=Gr(),{toggleSort:s,sortBy:i,isSorted:o}=G2(),{someSelected:a,allSelected:l,selectAll:u,showSelectAll:c}=$m(),{columns:d,headers:f}=Fm(),{loaderClasses:p}=Rd(e);function g(w,E){if(!(!(e.sticky||e.fixedHeader)&&!w.fixed))return{position:"sticky",left:w.fixed?Ne(w.fixedOffset):void 0,top:e.sticky||e.fixedHeader?`calc(var(--v-table-header-height) * ${E})`:void 0}}function m(w){const E=i.value.find(I=>I.key===w.key);return E?E.order==="asc"?e.sortAscIcon:e.sortDescIcon:e.sortAscIcon}const{backgroundColorClasses:y,backgroundColorStyles:_}=fr(()=>e.color),{displayClasses:b,mobile:x}=fi(e),C=A(()=>({headers:f.value,columns:d.value,toggleSort:s,isSorted:o,sortBy:i.value,someSelected:a.value,allSelected:l.value,selectAll:u,getSortIcon:m})),S=A(()=>["v-data-table__th",{"v-data-table__th--sticky":e.sticky||e.fixedHeader},b.value,p.value]),T=w=>{let{column:E,x:I,y:O}=w;const R=E.key==="data-table-select"||E.key==="data-table-expand",M=ge(e.headerProps??{},E.headerProps??{});return h(vp,ge({tag:"th",align:E.align,class:[{"v-data-table__th--sortable":E.sortable&&!e.disableSort,"v-data-table__th--sorted":o(E),"v-data-table__th--fixed":E.fixed},...S.value],style:{width:Ne(E.width),minWidth:Ne(E.minWidth),maxWidth:Ne(E.maxWidth),...g(E,O)},colspan:E.colspan,rowspan:E.rowspan,onClick:E.sortable?()=>s(E):void 0,fixed:E.fixed,nowrap:E.nowrap,lastFixed:E.lastFixed,noPadding:R},M),{default:()=>{var U;const D=`header.${E.key}`,F={column:E,selectAll:u,isSorted:o,toggleSort:s,sortBy:i.value,someSelected:a.value,allSelected:l.value,getSortIcon:m};return n[D]?n[D](F):E.key==="data-table-select"?((U=n["header.data-table-select"])==null?void 0:U.call(n,F))??(c.value&&h(gu,{modelValue:l.value,indeterminate:a.value&&!l.value,"onUpdate:modelValue":u},null)):h("div",{class:"v-data-table-header__content"},[h("span",null,[E.title]),E.sortable&&!e.disableSort&&h(J,{key:"icon",class:"v-data-table-header__sort-icon",icon:m(E)},null),e.multiSort&&o(E)&&h("div",{key:"badge",class:["v-data-table-header__sort-badge",...y.value],style:_.value},[i.value.findIndex(K=>K.key===E.key)+1])])}})},P=()=>{const w=A(()=>d.value.filter(I=>(I==null?void 0:I.sortable)&&!e.disableSort)),E=A(()=>{if(d.value.find(O=>O.key==="data-table-select")!=null)return l.value?"$checkboxOn":a.value?"$checkboxIndeterminate":"$checkboxOff"});return h(vp,ge({tag:"th",class:[...S.value],colspan:f.value.length+1},e.headerProps),{default:()=>[h("div",{class:"v-data-table-header__content"},[h(Vo,{chips:!0,class:"v-data-table__td-sort-select",clearable:!0,density:"default",items:w.value,label:r("$vuetify.dataTable.sortBy"),multiple:e.multiSort,variant:"underlined","onClick:clear":()=>i.value=[],appendIcon:E.value,"onClick:append":()=>u(!l.value)},{...n,chip:I=>{var O;return h(Sn,{onClick:(O=I.item.raw)!=null&&O.sortable?()=>s(I.item.raw):void 0,onMousedown:R=>{R.preventDefault(),R.stopPropagation()}},{default:()=>[I.item.title,h(J,{class:["v-data-table__td-sort-icon",o(I.item.raw)&&"v-data-table__td-sort-icon-active"],icon:m(I.item.raw),size:"small"},null)]})}})])]})};Oe(()=>x.value?h("tr",null,[h(P,null,null)]):h(Ae,null,[n.headers?n.headers(C.value):f.value.map((w,E)=>h("tr",null,[w.map((I,O)=>h(T,{column:I,x:O,y:E},null))])),e.loading&&h("tr",{class:"v-data-table-progress"},[h("th",{colspan:d.value.length},[h(Yp,{name:"v-data-table-progress",absolute:!0,active:!0,color:typeof e.loading=="boolean"?void 0:e.loading,indeterminate:!0},{default:n.loader})])])]))}}),AJ=de({item:{type:Object,required:!0}},"VDataTableGroupHeaderRow"),OJ=ke()({name:"VDataTableGroupHeaderRow",props:AJ(),setup(e,t){let{slots:n}=t;const{isGroupOpen:r,toggleGroup:s,extractRows:i}=V2(),{isSelected:o,isSomeSelected:a,select:l}=$m(),{columns:u}=Fm(),c=A(()=>i([e.item]));return()=>h("tr",{class:"v-data-table-group-header-row",style:{"--v-data-table-group-header-row-depth":e.item.depth}},[u.value.map(d=>{var f,p;if(d.key==="data-table-group"){const g=r(e.item)?"$expand":"$next",m=()=>s(e.item);return((f=n["data-table-group"])==null?void 0:f.call(n,{item:e.item,count:c.value.length,props:{icon:g,onClick:m}}))??h(vp,{class:"v-data-table-group-header-row__column"},{default:()=>[h(re,{size:"small",variant:"text",icon:g,onClick:m},null),h("span",null,[e.item.value]),h("span",null,[k("("),c.value.length,k(")")])]})}if(d.key==="data-table-select"){const g=o(c.value),m=a(c.value)&&!g,y=_=>l(c.value,_);return((p=n["data-table-select"])==null?void 0:p.call(n,{props:{modelValue:g,indeterminate:m,"onUpdate:modelValue":y}}))??h("td",null,[h(gu,{modelValue:g,indeterminate:m,"onUpdate:modelValue":y},null)])}return h("td",null,null)})])}}),MJ=de({index:Number,item:Object,cellProps:[Object,Function],onClick:Un(),onContextmenu:Un(),onDblclick:Un(),...el()},"VDataTableRow"),DJ=ke()({name:"VDataTableRow",props:MJ(),setup(e,t){let{slots:n}=t;const{displayClasses:r,mobile:s}=fi(e,"v-data-table__tr"),{isSelected:i,toggleSelect:o,someSelected:a,allSelected:l,selectAll:u}=$m(),{isExpanded:c,toggleExpand:d}=F2(),{toggleSort:f,sortBy:p,isSorted:g}=G2(),{columns:m}=Fm();Oe(()=>h("tr",{class:["v-data-table__tr",{"v-data-table__tr--clickable":!!(e.onClick||e.onContextmenu||e.onDblclick)},r.value],onClick:e.onClick,onContextmenu:e.onContextmenu,onDblclick:e.onDblclick},[e.item&&m.value.map((y,_)=>{const b=e.item,x=`item.${y.key}`,C=`header.${y.key}`,S={index:e.index,item:b.raw,internalItem:b,value:Na(b.columns,y.key),column:y,isSelected:i,toggleSelect:o,isExpanded:c,toggleExpand:d},T={column:y,selectAll:u,isSorted:g,toggleSort:f,sortBy:p.value,someSelected:a.value,allSelected:l.value,getSortIcon:()=>""},P=typeof e.cellProps=="function"?e.cellProps({index:S.index,item:S.item,internalItem:S.internalItem,value:S.value,column:y}):e.cellProps,w=typeof y.cellProps=="function"?y.cellProps({index:S.index,item:S.item,internalItem:S.internalItem,value:S.value}):y.cellProps;return h(vp,ge({align:y.align,class:{"v-data-table__td--expanded-row":y.key==="data-table-expand","v-data-table__td--select-row":y.key==="data-table-select"},fixed:y.fixed,fixedOffset:y.fixedOffset,lastFixed:y.lastFixed,maxWidth:s.value?void 0:y.maxWidth,noPadding:y.key==="data-table-select"||y.key==="data-table-expand",nowrap:y.nowrap,width:s.value?void 0:y.width},P,w),{default:()=>{var I,O,R,M;if(y.key==="data-table-select")return((I=n["item.data-table-select"])==null?void 0:I.call(n,{...S,props:{disabled:!b.selectable,modelValue:i([b]),onClick:St(()=>o(b),["stop"])}}))??h(gu,{disabled:!b.selectable,modelValue:i([b]),onClick:St(D=>o(b,e.index,D),["stop"])},null);if(y.key==="data-table-expand")return((O=n["item.data-table-expand"])==null?void 0:O.call(n,{...S,props:{icon:c(b)?"$collapse":"$expand",size:"small",variant:"text",onClick:St(()=>d(b),["stop"])}}))??h(re,{icon:c(b)?"$collapse":"$expand",size:"small",variant:"text",onClick:St(()=>d(b),["stop"])},null);if(n[x]&&!s.value)return n[x](S);const E=se(S.value);return s.value?h(Ae,null,[h("div",{class:"v-data-table__td-title"},[((R=n[C])==null?void 0:R.call(n,T))??y.title]),h("div",{class:"v-data-table__td-value"},[((M=n[x])==null?void 0:M.call(n,S))??E])]):E}})})]))}}),eM=de({loading:[Boolean,String],loadingText:{type:String,default:"$vuetify.dataIterator.loadingText"},hideNoData:Boolean,items:{type:Array,default:()=>[]},noDataText:{type:String,default:"$vuetify.noDataText"},rowProps:[Object,Function],cellProps:[Object,Function],...el()},"VDataTableRows"),lx=ke()({name:"VDataTableRows",inheritAttrs:!1,props:eM(),setup(e,t){let{attrs:n,slots:r}=t;const{columns:s}=Fm(),{expandOnClick:i,toggleExpand:o,isExpanded:a}=F2(),{isSelected:l,toggleSelect:u}=$m(),{toggleGroup:c,isGroupOpen:d}=V2(),{t:f}=Gr(),{mobile:p}=fi(e);return Oe(()=>{var g,m;return e.loading&&(!e.items.length||r.loading)?h("tr",{class:"v-data-table-rows-loading",key:"loading"},[h("td",{colspan:s.value.length},[((g=r.loading)==null?void 0:g.call(r))??f(e.loadingText)])]):!e.loading&&!e.items.length&&!e.hideNoData?h("tr",{class:"v-data-table-rows-no-data",key:"no-data"},[h("td",{colspan:s.value.length},[((m=r["no-data"])==null?void 0:m.call(r))??f(e.noDataText)])]):h(Ae,null,[e.items.map((y,_)=>{var C;if(y.type==="group"){const S={index:_,item:y,columns:s.value,isExpanded:a,toggleExpand:o,isSelected:l,toggleSelect:u,toggleGroup:c,isGroupOpen:d};return r["group-header"]?r["group-header"](S):h(OJ,ge({key:`group-header_${y.id}`,item:y},rw(n,":group-header",()=>S)),r)}const b={index:_,item:y.raw,internalItem:y,columns:s.value,isExpanded:a,toggleExpand:o,isSelected:l,toggleSelect:u},x={...b,props:ge({key:`item_${y.key??y.index}`,onClick:i.value?()=>{o(y)}:void 0,index:_,item:y,cellProps:e.cellProps,mobile:p.value},rw(n,":row",()=>b),typeof e.rowProps=="function"?e.rowProps({item:b.item,index:b.index,internalItem:b.internalItem}):e.rowProps)};return h(Ae,{key:x.props.key},[r.item?r.item(x):h(DJ,x.props,r),a(y)&&((C=r["expanded-row"])==null?void 0:C.call(r,b))])})])}),{}}}),tM=de({fixedHeader:Boolean,fixedFooter:Boolean,height:[Number,String],hover:Boolean,...Ue(),...Ar(),..._t(),...Lt()},"VTable"),mb=ke()({name:"VTable",props:tM(),setup(e,t){let{slots:n,emit:r}=t;const{themeClasses:s}=Zt(e),{densityClasses:i}=ys(e);return Oe(()=>h(e.tag,{class:["v-table",{"v-table--fixed-height":!!e.height,"v-table--fixed-header":e.fixedHeader,"v-table--fixed-footer":e.fixedFooter,"v-table--has-top":!!n.top,"v-table--has-bottom":!!n.bottom,"v-table--hover":e.hover},s.value,i.value,e.class],style:e.style},{default:()=>{var o,a,l;return[(o=n.top)==null?void 0:o.call(n),n.default?h("div",{class:"v-table__wrapper",style:{height:Ne(e.height)}},[h("table",null,[n.default()])]):(a=n.wrapper)==null?void 0:a.call(n),(l=n.bottom)==null?void 0:l.call(n)]}})),{}}}),LJ=de({items:{type:Array,default:()=>[]},itemValue:{type:[String,Array,Function],default:"id"},itemSelectable:{type:[String,Array,Function],default:null},rowProps:[Object,Function],cellProps:[Object,Function],returnObject:Boolean},"DataTable-items");function $J(e,t,n,r){const s=e.returnObject?t:Vn(t,e.itemValue),i=Vn(t,e.itemSelectable,!0),o=r.reduce((a,l)=>(l.key!=null&&(a[l.key]=Vn(t,l.value)),a),{});return{type:"item",key:e.returnObject?Vn(t,e.itemValue):s,index:n,value:s,selectable:i,columns:o,raw:t}}function FJ(e,t,n){return t.map((r,s)=>$J(e,r,s,n))}function NJ(e,t){return{items:A(()=>FJ(e,e.items,t.value))}}const VJ=de({...eM(),hideDefaultBody:Boolean,hideDefaultFooter:Boolean,hideDefaultHeader:Boolean,width:[String,Number],search:String,...tJ(),...rJ(),...xJ(),...LJ(),...mJ(),...vJ(),...Z2(),...tM()},"DataTable"),BJ=de({...uJ(),...VJ(),...JQ(),...K2()},"VDataTable"),UJ=ke()({name:"VDataTable",props:BJ(),emits:{"update:modelValue":e=>!0,"update:page":e=>!0,"update:itemsPerPage":e=>!0,"update:sortBy":e=>!0,"update:options":e=>!0,"update:groupBy":e=>!0,"update:expanded":e=>!0,"update:currentItems":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const{groupBy:s}=sJ(e),{sortBy:i,multiSort:o,mustSort:a}=yJ(e),{page:l,itemsPerPage:u}=cJ(e),{disableSort:c}=Xa(e),{columns:d,headers:f,sortFunctions:p,sortRawFunctions:g,filterFunctions:m}=IJ(e,{groupBy:s,showSelect:ae(()=>e.showSelect),showExpand:ae(()=>e.showExpand)}),{items:y}=NJ(e,d),_=ae(()=>e.search),{filteredItems:b}=eJ(e,y,_,{transform:Z=>Z.columns,customKeyFilter:m}),{toggleSort:x}=bJ({sortBy:i,multiSort:o,mustSort:a,page:l}),{sortByWithGroups:C,opened:S,extractRows:T,isGroupOpen:P,toggleGroup:w}=iJ({groupBy:s,sortBy:i,disableSort:c}),{sortedItems:E}=_J(e,b,C,{transform:Z=>({...Z.raw,...Z.columns}),sortFunctions:p,sortRawFunctions:g}),{flatItems:I}=aJ(E,s,S),O=A(()=>I.value.length),{startIndex:R,stopIndex:M,pageCount:D,setItemsPerPage:F}=dJ({page:l,itemsPerPage:u,itemsLength:O}),{paginatedItems:U}=hJ({items:I,startIndex:R,stopIndex:M,itemsPerPage:u}),K=A(()=>T(U.value)),{isSelected:Q,select:H,selectAll:V,toggleSelect:ee,someSelected:q,allSelected:G}=gJ(e,{allItems:y,currentPage:K}),{isExpanded:le,toggleExpand:ie}=nJ(e);lJ({page:l,itemsPerPage:u,sortBy:i,groupBy:s,search:_}),Ir({VDataTableRows:{hideNoData:ae(()=>e.hideNoData),noDataText:ae(()=>e.noDataText),loading:ae(()=>e.loading),loadingText:ae(()=>e.loadingText)}});const we=A(()=>({page:l.value,itemsPerPage:u.value,sortBy:i.value,pageCount:D.value,toggleSort:x,setItemsPerPage:F,someSelected:q.value,allSelected:G.value,isSelected:Q,select:H,selectAll:V,toggleSelect:ee,isExpanded:le,toggleExpand:ie,isGroupOpen:P,toggleGroup:w,items:K.value.map(Z=>Z.raw),internalItems:K.value,groupedItems:U.value,columns:d.value,headers:f.value}));return Oe(()=>{const Z=ox.filterProps(e),he=ax.filterProps(e),ne=lx.filterProps(e),z=mb.filterProps(e);return h(mb,ge({class:["v-data-table",{"v-data-table--show-select":e.showSelect,"v-data-table--loading":e.loading},e.class],style:e.style},z,{fixedHeader:e.fixedHeader||e.sticky}),{top:()=>{var xe;return(xe=r.top)==null?void 0:xe.call(r,we.value)},default:()=>{var xe,Fe,N,B,Y,fe;return r.default?r.default(we.value):h(Ae,null,[(xe=r.colgroup)==null?void 0:xe.call(r,we.value),!e.hideDefaultHeader&&h("thead",{key:"thead"},[h(ax,he,r)]),(Fe=r.thead)==null?void 0:Fe.call(r,we.value),!e.hideDefaultBody&&h("tbody",null,[(N=r["body.prepend"])==null?void 0:N.call(r,we.value),r.body?r.body(we.value):h(lx,ge(n,ne,{items:U.value}),r),(B=r["body.append"])==null?void 0:B.call(r,we.value)]),(Y=r.tbody)==null?void 0:Y.call(r,we.value),(fe=r.tfoot)==null?void 0:fe.call(r,we.value)])},bottom:()=>r.bottom?r.bottom(we.value):!e.hideDefaultFooter&&h(Ae,null,[h(dn,null,null),h(ox,Z,{prepend:r["footer.prepend"]})])})}),{}}}),zJ=de({...Ue(),...V7()},"VForm"),_0=ke()({name:"VForm",props:zJ(),emits:{"update:modelValue":e=>!0,submit:e=>!0},setup(e,t){let{slots:n,emit:r}=t;const s=B7(e),i=j();function o(l){l.preventDefault(),s.reset()}function a(l){const u=l,c=s.validate();u.then=c.then.bind(c),u.catch=c.catch.bind(c),u.finally=c.finally.bind(c),r("submit",u),u.defaultPrevented||c.then(d=>{var p;let{valid:f}=d;f&&((p=i.value)==null||p.submit())}),u.preventDefault()}return Oe(()=>{var l;return h("form",{ref:i,class:["v-form",e.class],style:e.style,novalidate:!0,onReset:o,onSubmit:a},[(l=n.default)==null?void 0:l.call(n,s)])}),Ji(s,i)}}),HJ=de({disabled:Boolean,modelValue:{type:Boolean,default:null},...r_()},"VHover"),ux=ke()({name:"VHover",props:HJ(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=it(e,"modelValue"),{runOpenDelay:s,runCloseDelay:i}=s_(e,o=>!e.disabled&&(r.value=o));return()=>{var o;return(o=n.default)==null?void 0:o.call(n,{isHovering:r.value,props:{onMouseenter:s,onMouseleave:i}})}}}),jJ={class:"mt-4 mb-4"},qJ={key:0},WJ={key:1},GJ={key:0},KJ={key:1},YJ=["colspan"],XJ=Le({__name:"PrintersView",setup(e){const t=Dt(),n=Wt(),r=j(!1),s=rr(),i=Zi(),o=Cm(),a=tn(nn.AddOrUpdatePrinterDialog),l=j([]),u=j([]),c=j(""),d=j(""),f=j(),p=j(""),g=j([]),m=A(()=>o.hasFeature("printerGroupsApi")),y=A(()=>[{title:"Enabled",key:"enabled"},{title:"Type",key:"printerType"},{title:"Printer Name",align:"start",sortable:!0,key:"name"},{title:"Floor",key:"floor",sortable:!1},...o.hasFeature("printerGroupsApi")?[{title:"Group(s)",key:"group",sortable:!0}]:[],{title:"Actions",key:"actions",sortable:!1},{title:"Socket Update",key:"socketupdate",sortable:!1},{title:"",key:"data-table-expand"}]);async function _(){return r.value=!0,await o.loadFeatures(),o.hasFeature("printerGroupsApi")&&(l.value=await pl.getGroupsWithPrinters()),r.value=!1,l}const b=Rm({queryKey:["printerGroups"],queryFn:_}),x=A(()=>{var G;if(!o.hasFeature("printerGroupsApi")||!((G=u.value)!=null&&G.length))return n.printers;const q=u.value.flatMap(le=>le.printers.map(ie=>ie.printerId))||[];return n.printers.filter(le=>q.includes(le.id))}),C=A(()=>s.printerCurrentEventReceivedAtById),S=A(()=>{if(!(!f.value&&f.value!==0))return l.value[f.value]}),T=q=>q?(Date.now()-q)/1e3:void 0,P=q=>l.value.filter(G=>G.printers.find(le=>le.printerId===q)),w=q=>l.value.filter(G=>!G.printers.find(le=>le.printerId===q)),E=q=>i.floorOfPrinter(q),I=q=>{n.setUpdateDialogPrinter(q),a.openDialog(q)},O=()=>{a.openDialog()},R=(q,G)=>{if(console.log(q,G),G.isExpanded){const le=g.value.findIndex(ie=>ie===q.id);g.value.splice(le,1)}else g.value.push(q.id.toString())},M=()=>{tn(nn.ImportOctoFarmDialog).openDialog()},D=()=>{tn(nn.YamlImportExport).openDialog()},F=async()=>{var q,G;if(!((G=(q=c.value)==null?void 0:q.trim())!=null&&G.length))throw new Error("Please set a non-empty group name");await pl.createGroup(c.value.trim()),await b.refetch(),c.value="",t.info("Created group")},U=()=>{var q;S.value&&(d.value=(q=S.value)==null?void 0:q.name)},K=async q=>{var le,ie;if(!(q!=null&&q.id))throw new Error("Group id was not defined");if(!l.value.find(we=>we.id===q.id))throw new Error("Group was not found, please reload the page");if(!((ie=(le=d.value)==null?void 0:le.trim())!=null&&ie.length))throw new Error("Please set a non-empty group name");await pl.updateGroupName(q.id,d.value.trim()),await b.refetch()},Q=async q=>{const G=l.value.find(ie=>ie.id===q);if(!G)throw new Error("Group was not found, please reload the page");const le=G.printers.length;le>0&&!confirm(`This group contains ${le} printers, are you sure to delete it?`)||(await pl.deleteGroup(q),await b.refetch(),t.info("Deleted group"))},H=async(q,G)=>{await pl.addPrinterToGroup(q,G),await b.refetch(),t.info("Added printer to group")},V=async(q,G)=>{await pl.deletePrinterFromGroup(q,G),await b.refetch(),t.info("Removed printer from group")},ee=async q=>{if(!q.id)throw new Error("Printer ID not set, cant toggle enabled");q.enabled=!q.enabled,await Qt.toggleEnabled(q.id,q.enabled)};return(q,G)=>{const le=In("v-list-item-group");return $(),ve("div",null,[h(yt,null,{default:v(()=>[h(sn,null,{default:v(()=>[G[11]||(G[11]=k(" Printers ")),h(wn),m.value&&l.value.length?($(),te(Vo,{key:0,modelValue:u.value,"onUpdate:modelValue":G[0]||(G[0]=ie=>u.value=ie),items:l.value,"return-object":!0,"item-title":"name",label:"Filter by groups",multiple:"",placeholder:"Select group to filter by","prepend-icon":"filter_list"},null,8,["modelValue","items"])):pe("",!0),h(st,{modelValue:p.value,"onUpdate:modelValue":G[1]||(G[1]=ie=>p.value=ie),class:"p-2",clearable:"",label:"Printer search","prepend-icon":"search","single-line":""},null,8,["modelValue"])]),_:1,__:[11]}),h(X(UJ),{expanded:g.value,headers:y.value,items:x.value,search:p.value,class:"elevation-1","item-key":"id","show-expand":"","single-expand":"","onClick:row":R},WC({"no-data":v(()=>[L("div",jJ,[x.value.length===0?($(),ve("h3",qJ," No printer has been created yet. Create one here: ")):($(),ve("h3",WJ," No printer has been found. Adjust your filters or search criteria. ")),h(T2)])]),top:v(()=>[h(mr,{flat:""},{default:v(()=>[h(En,null,{default:v(()=>[k(" Showing "+se(x.value.length||0)+" printers ",1)]),_:1}),h(re,{class:"ml-3",type:"button",variant:"outlined",onClick:G[2]||(G[2]=ie=>M())},{default:v(()=>[h(J,null,{default:v(()=>G[12]||(G[12]=[k("publish")])),_:1,__:[12]}),G[13]||(G[13]=k(" Import OctoFarm Printers "))]),_:1,__:[13]}),h(re,{class:"ml-3",type:"button",variant:"outlined",onClick:G[3]||(G[3]=ie=>O())},{default:v(()=>[h(J,null,{default:v(()=>G[14]||(G[14]=[k("add")])),_:1,__:[14]}),G[15]||(G[15]=k(" Create Printer "))]),_:1,__:[15]}),h(re,{class:"ml-3",color:"primary",type:"button",onClick:G[4]||(G[4]=ie=>D())},{default:v(()=>[h(J,null,{default:v(()=>G[16]||(G[16]=[k("publish")])),_:1,__:[16]}),G[17]||(G[17]=k(" Import/Export YAML "))]),_:1,__:[17]}),h(wn)]),_:1})]),"item.enabled":v(({item:ie})=>[h(gp,{modelValue:ie.enabled,"onUpdate:modelValue":we=>ie.enabled=we,color:"primary",inset:"",onClickCapture:St(we=>ee(ie),["stop"])},{default:v(()=>[k(se(ie.enabled),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onClickCapture"])]),"item.printerType":v(({item:ie})=>[k(se(X(Oc)(ie.printerType)),1)]),"item.name":v(({item:ie})=>[h(Sn,null,{default:v(()=>[k(se(ie.name||ie.printerURL),1)]),_:2},1024)]),"item.floor":v(({item:ie})=>[ie.id?($(),te(Sn,{key:0},{default:v(()=>{var we;return[k(se((we=E(ie.id))==null?void 0:we.name),1)]}),_:2},1024)):pe("",!0)]),"item.actions":v(({item:ie})=>[h(zQ,{printer:ie},null,8,["printer"]),h(GQ,{printer:ie},null,8,["printer"]),h(KQ,{printer:ie},null,8,["printer"]),h(YQ,{printer:ie},null,8,["printer"]),h(XQ,{printer:ie},null,8,["printer"]),h(qQ,{printer:ie,"onUpdate:show":we=>I(ie)},null,8,["printer","onUpdate:show"])]),"item.socketupdate":v(({item:ie})=>[C.value[ie.id]?($(),ve("span",GJ," Updated "+se(T(C.value[ie.id]))+" seconds ago ",1)):($(),ve("span",KJ," No update received (silence) "))]),"expanded-row":v(({item:ie,columns:we})=>[L("td",{colspan:we.length},[h(UQ,{printer:ie},null,8,["printer"])],8,YJ)]),_:2},[m.value?{name:"item.group",fn:v(({item:ie})=>[($(!0),ve(Ae,null,Gt(P(ie.id),we=>($(),te(Sn,{key:we.id,class:"ml-2",closable:"",size:"small","onClick:close":Z=>V(we.id,ie.id)},{default:v(()=>[k(se(we.name),1)]),_:2},1032,["onClick:close"]))),128)),h(Pm,{"offset-y":""},{activator:v(({props:we})=>[h(Sn,ge({disabled:!l.value.length,class:"ml-2",size:"small"},we),{default:v(()=>[h(J,{size:"small"},{default:v(()=>G[18]||(G[18]=[k("add")])),_:1,__:[18]})]),_:2},1040,["disabled"])]),default:v(()=>[h(Bt,{density:"compact",style:{border:"1px solid dimgray"}},{default:v(()=>[h(qr,null,{default:v(()=>G[19]||(G[19]=[k(" ADD TO GROUP")])),_:1,__:[19]}),h(le,null,{default:v(()=>[($(!0),ve(Ae,null,Gt(w(ie.id),(we,Z)=>($(),te(Ve,{key:Z,onClick:he=>H(we.id,ie.id)},{default:v(()=>[h(ct,null,{default:v(()=>[k(se(we.name),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:2},1024)]),_:2},1024)]),_:2},1024)]),key:"0"}:void 0]),1032,["expanded","headers","items","search"])]),_:1}),m.value?($(),te(yt,{key:0,class:"mt-4"},{default:v(()=>[h(sn,null,{default:v(()=>G[20]||(G[20]=[k(" Printer Groups ")])),_:1,__:[20]}),h(en,null,{default:v(()=>[G[26]||(G[26]=L("h3",null,"Existing groups:",-1)),h(Hn,null,{default:v(()=>[h(ap,{modelValue:f.value,"onUpdate:modelValue":[G[5]||(G[5]=ie=>f.value=ie),G[6]||(G[6]=ie=>U())],column:"","selected-class":"primary--text"},{default:v(()=>[($(!0),ve(Ae,null,Gt(l.value,ie=>($(),te(Sn,{key:ie.id,class:"mr-3",closable:"",size:"small","onClick:close":we=>Q(ie.id)},{default:v(()=>[k(se(ie.name),1)]),_:2},1032,["onClick:close"]))),128))]),_:1},8,["modelValue"])]),_:1}),G[27]||(G[27]=L("h3",{class:"mt-3"},"Update group name",-1)),h(Hn,null,{default:v(()=>[S.value?pe("",!0):($(),te(fn,{key:0},{default:v(()=>G[21]||(G[21]=[k(" Select a group to update its name. ")])),_:1,__:[21]})),h(st,{modelValue:d.value,"onUpdate:modelValue":G[7]||(G[7]=ie=>d.value=ie),disabled:!S.value,label:"Group Name",placeholder:"Type group name here"},{default:v(()=>G[22]||(G[22]=[k(" Name ")])),_:1,__:[22]},8,["modelValue","disabled"]),h(re,{onClick:G[8]||(G[8]=ie=>K(S.value))},{default:v(()=>G[23]||(G[23]=[k(" Update name ")])),_:1,__:[23]})]),_:1}),G[28]||(G[28]=L("h3",{class:"mt-3"},"Add group",-1)),h(Hn,null,{default:v(()=>[h(st,{modelValue:c.value,"onUpdate:modelValue":G[9]||(G[9]=ie=>c.value=ie),label:"Group Name",placeholder:"Type group name here"},{default:v(()=>G[24]||(G[24]=[k(" Name ")])),_:1,__:[24]},8,["modelValue"]),h(re,{onClick:G[10]||(G[10]=ie=>F())},{default:v(()=>G[25]||(G[25]=[k(" Create new group")])),_:1,__:[25]})]),_:1})]),_:1,__:[26,27,28]})]),_:1})):pe("",!0)])}}}),qs={grid:"grid",floors:"floors",printer:"printer",emergencyCommands:"emergencyCommands",users:"users",account:"account",serverProtection:"serverProtection",softwareUpgrade:"softwareUpgrade",diagnostics:"diagnostics",experimental:"experimental"},QJ={[qs.grid]:{title:"Grid",icon:"grid_on",path:"/settings/grid",divider:!1},[qs.floors]:{title:"Floors",icon:"house_siding",path:"/settings/floors",divider:!0},[qs.printer]:{title:"Printer",icon:"local_print_shop",path:"/settings/printer",divider:!1},[qs.emergencyCommands]:{title:"Emergency Commands",icon:"warning",path:"/settings/emergency-commands",divider:!0},[qs.users]:{title:"Users",icon:"group",path:"/settings/user-management",divider:!1},[qs.account]:{title:"Account",icon:"account_circle",path:"/settings/account",divider:!1},[qs.serverProtection]:{title:"Server Protection",icon:"security",path:"/settings/server-protection",divider:!0},[qs.softwareUpgrade]:{title:"Software Upgrade",icon:"upgrade",path:"/settings/software-upgrade",divider:!1},[qs.diagnostics]:{title:"Diagnostics",icon:"bug_report",path:"/settings/diagnostics",divider:!1},[qs.experimental]:{title:"Experimental",icon:"settings_applications",path:"/settings/experimental",divider:!1}},JJ=Le({__name:"SettingsView",setup(e){const t=j(QJ);return(n,r)=>{const s=In("router-view");return $(),ve("div",null,[h(rt,{"no-gutters":""},{default:v(()=>[h(Y_,{permanent:!0},{default:v(()=>[h(Ve,null,{default:v(()=>[h(ct,{class:"text-h6"},{default:v(()=>r[0]||(r[0]=[k(" Settings ")])),_:1,__:[0]}),h(vt,null,{default:v(()=>r[1]||(r[1]=[k(" Adjust your FDM Monster ")])),_:1,__:[1]})]),_:1}),h(dn),h(Bt,{density:"compact",nav:""},{default:v(()=>[($(!0),ve(Ae,null,Gt(X(t),i=>($(),te(Ve,{key:i.title,to:i.path,link:"","prepend-icon":i.icon,title:i.title,"router-link":"",style:is(i.divider?"border-bottom: 1px solid gray":"")},null,8,["to","prepend-icon","title","style"]))),128))]),_:1})]),_:1}),h(ze,null,{default:v(()=>[h(s)]),_:1})]),_:1})])}}});function ZJ(e){const t=new Date(e);return new Intl.DateTimeFormat("default",{dateStyle:"long"}).format(t)}const eZ={key:0,class:"text--primary float-end mr-5 mt-2"},tZ={class:"text-grey-darken-4"},nZ={key:0,class:"text-success"},rZ={key:1,class:"text-error"},sZ={key:0},iZ={key:0},oZ={key:0},aZ={key:1},lZ={key:0},uZ={key:1},cZ=Le({__name:"UserManagementSettings",setup(e){const t=Dt(),n=j(!1),r=j(),s=j([]),i=j([]);async function o(){n.value=!0;try{r.value=await ts.getProfile(),i.value=await ts.listRoles(),s.value=await ts.listUsers()}catch(m){throw n.value=!1,console.error(m),m}return n.value=!1,{users:s,roles:i,profile:r}}const a=Rm({queryKey:["userRolesProfile"],queryFn:o});function l(m){return m.map(y=>{var _;return(_=i.value.find(b=>b.id==y))==null?void 0:_.name})}function u(m){var y;return m.id==((y=r.value)==null?void 0:y.id)}async function c(m){if(confirm(`Are you sure you want to delete ${m.username}?`)){try{n.value=!0,await ts.deleteUser(m.id),await a.refetch()}catch(y){throw n.value=!1,console.error(y),y}n.value=!1,t.info(`User ${m.username} deleted`)}}async function d(m,y=!0){if(m.isRootUser){t.error("You are not allowed to do perform this action on an owner");return}if(confirm(`Are you sure you want to ${y?"verify":"unverify"} ${m.username}?`)){try{n.value=!0,await ts.setUserVerified(m.id,y),await a.refetch()}catch(_){throw n.value=!1,console.error(_),_}n.value=!1,t.info(y?`User ${m.username} verified`:`User ${m.username} unverified`)}}async function f(m,y=!0){var _;if((_=r.value)!=null&&_.isRootUser||t.error("You are not allowed to do perform this action as you're not an owner"),!!confirm(`You are about to ${y?"set":"remove"} owner rights on ${m.username}. Are you sure?`)){try{n.value=!0,await ts.setRootUser(m.id,y),await a.refetch()}catch(b){throw n.value=!1,console.error(b),b}n.value=!1,t.info(y?`User ${m.username} set to owner`:`User ${m.username} is no longer owner`)}}async function p(m){try{n.value=!0,console.log(m.roles),console.log(m.roles.map(y=>typeof y)),await ts.setUserRoles(m.id,m.roles),await a.refetch(),t.info(`Roles updated for ${m.username}`)}catch(y){throw n.value=!1,console.error(y),t.error(`Failed to update roles for ${m.username}`),y}n.value=!1}async function g(){await tn(nn.CreateUserDialog).openDialog()}return(m,y)=>{const _=In("v-list-item-content");return $(),te(yt,null,{default:v(()=>[h(mr,{color:"primary"},{default:v(()=>{var b;return[h(ut,null,{default:v(()=>[h(J,null,{default:v(()=>y[1]||(y[1]=[k("settings")])),_:1,__:[1]})]),_:1}),h(En,null,{default:v(()=>y[2]||(y[2]=[k(" Users ")])),_:1,__:[2]}),h(wn),h(re,{disabled:!((b=r.value)!=null&&b.isRootUser),class:"mt-2",color:"primary",onClick:y[0]||(y[0]=x=>g())},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>y[3]||(y[3]=[k("verified_user")])),_:1,__:[3]}),y[4]||(y[4]=L("span",null,"Create verified user",-1))]),_:1,__:[4]},8,["disabled"])]}),_:1}),n.value?($(),te(E2,{key:0,size:20,color:"#a70015",style:{margin:"250px",position:"absolute"}})):pe("",!0),h(Bt,{lines:"three"},{default:v(()=>[h(qr,null,{default:v(()=>y[5]||(y[5]=[k(" Showing all users ")])),_:1,__:[5]}),($(!0),ve(Ae,null,Gt(s.value,(b,x)=>($(),te(Ve,{key:x,class:"pl-6",style:{"max-width":"800px","border-top":"1px solid grey","border-bottom":"1px solid grey"}},{default:v(()=>[h(_,{class:zo(u(b)?"pl-6 grey darken-3":"pl-6 grey darken-4")},{default:v(()=>[h(ct,null,{default:v(()=>[k(" User '"+se(b.username)+"' ",1),u(b)?($(),ve("strong",eZ," Your account ")):pe("",!0)]),_:2},1024),h(vt),L("span",tZ,[L("ul",null,[L("li",null,[b.isVerified?($(),ve("span",nZ," Account verified ")):($(),ve("span",rZ," Account not verified "))]),L("li",null,"Created at "+se(X(ZJ)(b.createdAt)),1),b.isDemoUser?($(),ve("li",sZ,"Demo user account")):pe("",!0),L("li",null,[y[7]||(y[7]=k(" Role(s) ")),L("ul",null,[b.isRootUser?($(),ve("li",iZ,[h(Sn,{class:"mb-2 mt-2",size:"small"},{default:v(()=>y[6]||(y[6]=[k(" OWNER ")])),_:1,__:[6]})])):pe("",!0),($(!0),ve(Ae,null,Gt(l(b.roles),C=>($(),ve("li",{key:C},[h(Sn,{class:"mb-2 mt-2",size:"small"},{default:v(()=>[k(se(C),1)]),_:2},1024)]))),128))])])])])]),_:2},1032,["class"]),h(pu,null,{default:v(()=>{var C,S;return[h(re,{disabled:u(b)||b.isRootUser,color:b.isVerified?"error darken-4":"success",onClick:T=>d(b,!b.isVerified)},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>y[8]||(y[8]=[k("shield")])),_:1,__:[8]}),b.isVerified?pe("",!0):($(),ve("span",oZ," Verify account ")),b.isVerified?($(),ve("span",aZ," Un-verify account ")):pe("",!0)]),_:2},1032,["disabled","color","onClick"]),h(re,{color:b.isRootUser?"error darken-4":"success",disabled:u(b)||!((C=r.value)!=null&&C.isRootUser),class:"mt-2",onClick:T=>f(b,!b.isRootUser)},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>y[9]||(y[9]=[k("key")])),_:1,__:[9]}),b.isRootUser?($(),ve("span",lZ," Remove owner ")):pe("",!0),b.isRootUser?pe("",!0):($(),ve("span",uZ," Set owner "))]),_:2},1032,["color","disabled","onClick"]),(S=r.value)!=null&&S.isRootUser?($(),te(Vo,{key:0,items:i.value.map(T=>({text:T.name,value:T.id})),modelValue:b.roles,"onUpdate:modelValue":T=>b.roles=T,multiple:"",label:"Select roles",onChange:T=>p(b),class:"pt-6",style:{width:"15rem"}},null,8,["items","modelValue","onUpdate:modelValue","onChange"])):pe("",!0),h(re,{disabled:u(b)||b.isRootUser,class:"mt-2",color:"error-darken-2",onClick:T=>c(b)},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>y[10]||(y[10]=[k("delete")])),_:1,__:[10]}),y[11]||(y[11]=k(" Delete "))]),_:2,__:[11]},1032,["disabled","onClick"])]}),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1})}}}),dZ=Le({__name:"PrinterSettings",setup(e){const t=Ns(),n=rr(),r=Dt(),s=j({autoRemoveOldFilesBeforeUpload:!1,autoRemoveOldFilesAtBoot:!1,autoRemoveOldFilesCriteriumDays:7}),i=j({fileCleanSettings:!1,timeoutSettings:!1,purgeFiles:!1,bulkDisableGCodeAnalysis:!1});bt(async()=>{const c=await bn.getSettings();s.value=c.printerFileClean});async function o(){var c,d;if(t.settings.timeout.apiTimeout=parseInt(t.settings.timeout.apiTimeout.toString()),t.settings.timeout.apiUploadTimeout=parseInt(t.settings.timeout.apiUploadTimeout.toString()),!((d=(c=t.settings)==null?void 0:c.timeout)!=null&&d.apiTimeout)){r.error("Timeout not set");return}if(t.settings.timeout.apiTimeout<1e3&&(r.error("Timeout is too low - please set it to at least 1000 milliseconds"),t.settings.timeout.apiTimeout=1e3),t.settings.timeout.apiUploadTimeout<1e4)r.error("Upload timeout is too low - please set it to at least 10000 milliseconds"),t.settings.timeout.apiUploadTimeout=1e4;else{i.value.timeoutSettings=!0;try{await t.updateTimeoutSettings(t.settings.timeout),r.info("Timeout settings updated")}finally{i.value.timeoutSettings=!1}}}async function a(){i.value.fileCleanSettings=!0;try{const c=await bn.setFileCleanSettings(s.value);s.value=c.printerFileClean,r.openInfoMessage({title:"Successfully saved file cleanup settings"})}finally{i.value.fileCleanSettings=!1}}async function l(){i.value.purgeFiles=!0;try{await $i.purgeFiles(),r.openInfoMessage({title:"Successfully purged all references to printer files!"})}finally{i.value.purgeFiles=!1}}async function u(){i.value.bulkDisableGCodeAnalysis=!0;try{const c=n.onlinePrinters;for(const d of Object.values(c))await L2.setGCodeAnalysis(d.id,!1);r.openInfoMessage({title:`Finished disabling GCode analysis for ${c.length} online printers.`})}finally{i.value.bulkDisableGCodeAnalysis=!1}}return(c,d)=>($(),te(yt,null,{default:v(()=>[h(mr,{color:"primary"},{default:v(()=>[h(ut,null,{default:v(()=>[h(J,null,{default:v(()=>d[10]||(d[10]=[k("settings")])),_:1,__:[10]})]),_:1}),h(En,null,{default:v(()=>d[11]||(d[11]=[k(" Printer Settings ")])),_:1,__:[11]})]),_:1}),h(Bt,{lines:"three"},{default:v(()=>[h(Ve,null,{default:v(()=>[h(ct,null,{default:v(()=>d[12]||(d[12]=[k(" Pre-upload file cleanup ")])),_:1,__:[12]}),h(vt,null,{default:v(()=>[d[14]||(d[14]=k(" Automatically cleanup old files to ensure the SD card has enough space. ")),d[15]||(d[15]=L("br",null,null,-1)),h(mn,{modelValue:s.value.autoRemoveOldFilesBeforeUpload,"onUpdate:modelValue":d[0]||(d[0]=f=>s.value.autoRemoveOldFilesBeforeUpload=f),label:"Remove old file before upload"},null,8,["modelValue"]),h(st,{modelValue:s.value.autoRemoveOldFilesCriteriumDays,"onUpdate:modelValue":d[1]||(d[1]=f=>s.value.autoRemoveOldFilesCriteriumDays=f),disabled:!s.value.autoRemoveOldFilesBeforeUpload,label:"Amount of days to keep files",min:"0",variant:"outlined",type:"number"},null,8,["modelValue","disabled"]),h(mn,{modelValue:s.value.autoRemoveOldFilesAtBoot,"onUpdate:modelValue":d[2]||(d[2]=f=>s.value.autoRemoveOldFilesAtBoot=f),label:"Remove old files when (re)booting the server"},null,8,["modelValue"]),h(re,{color:"primary",onClick:d[3]||(d[3]=f=>a())},{default:v(()=>d[13]||(d[13]=[k(" save file clean settings ")])),_:1,__:[13]})]),_:1,__:[14,15]})]),_:1}),h(Ve,null,{default:v(()=>{var f;return[h(ct,null,{default:v(()=>d[16]||(d[16]=[k(" Connection Timeout ")])),_:1,__:[16]}),(f=X(t).settings)!=null&&f.timeout?($(),te(vt,{key:0},{default:v(()=>[d[18]||(d[18]=k(" Set the server default REST API timeout in milliseconds. ")),h(st,{modelValue:X(t).settings.timeout.apiTimeout,"onUpdate:modelValue":d[4]||(d[4]=p=>X(t).settings.timeout.apiTimeout=p),label:"Connection Timeout",min:"0",variant:"outlined",type:"number"},null,8,["modelValue"]),h(re,{color:"primary",onClick:d[5]||(d[5]=p=>o())},{default:v(()=>d[17]||(d[17]=[k(" save connection timeout ")])),_:1,__:[17]})]),_:1,__:[18]})):pe("",!0)]}),_:1}),h(Ve,null,{default:v(()=>{var f;return[h(ct,null,{default:v(()=>d[19]||(d[19]=[k(" Upload Timeout ")])),_:1,__:[19]}),(f=X(t).settings)!=null&&f.timeout?($(),te(vt,{key:0},{default:v(()=>[d[21]||(d[21]=k(" Set the server REST API file upload timeout in milliseconds. ")),h(st,{modelValue:X(t).settings.timeout.apiUploadTimeout,"onUpdate:modelValue":d[6]||(d[6]=p=>X(t).settings.timeout.apiUploadTimeout=p),label:"Upload Timeout",min:"0",variant:"outlined",type:"number"},null,8,["modelValue"]),h(re,{color:"primary",onClick:d[7]||(d[7]=p=>o())},{default:v(()=>d[20]||(d[20]=[k(" save upload timeout ")])),_:1,__:[20]})]),_:1,__:[21]})):pe("",!0)]}),_:1}),h(Ve,null,{default:v(()=>[h(ct,null,{default:v(()=>d[22]||(d[22]=[k(" Clean file references ")])),_:1,__:[22]}),h(vt,null,{default:v(()=>[d[24]||(d[24]=k(" Clear out the file references for all printers - this does not remove them from OctoPrint! ")),d[25]||(d[25]=L("br",null,null,-1)),h(re,{color:"primary",onClick:d[8]||(d[8]=f=>l())},{default:v(()=>d[23]||(d[23]=[k(" Purge file references ")])),_:1,__:[23]})]),_:1,__:[24,25]})]),_:1}),h(Ve,null,{default:v(()=>[h(ct,null,{default:v(()=>d[26]||(d[26]=[k(" Disable inefficient GCode analysis ")])),_:1,__:[26]}),h(vt,null,{default:v(()=>[d[28]||(d[28]=k(" Disable GCode analysis on all printers at once, preventing CPU intensive and inaccurate time/size estimates. ")),d[29]||(d[29]=L("br",null,null,-1)),h(re,{color:"primary",onClick:d[9]||(d[9]=f=>u())},{default:v(()=>d[27]||(d[27]=[k(" Bulk disable GCode Analysis ")])),_:1,__:[27]})]),_:1,__:[28,29]})]),_:1})]),_:1})]),_:1}))}}),nM=Le({__name:"SettingsToolbar",props:["icon","title"],setup(e){const t=e;return(n,r)=>($(),te(mr,null,{default:v(()=>[h(ut,null,{default:v(()=>[h(J,null,{default:v(()=>[k(se(t.icon),1)]),_:1})]),_:1}),h(En,null,{default:v(()=>[k(se(t.title),1)]),_:1}),Up(n.$slots,"default")]),_:3}))}}),fZ=Le({name:"FloorSettings",props:{},setup:()=>({printersStore:Wt(),floorStore:Zi(),addOrUpdateFloorDialog:tn(nn.AddOrUpdateFloorDialog),snackbar:Dt()}),data:()=>({selectedItem:0,editedFloorName:"",editedFloorNumber:0}),computed:{floors(){return this.floorStore.floors},selectedFloor(){return this.floorStore.floors[this.selectedItem]},showAddedPrinters(){var e;return((e=this.selectedFloor.printers)==null?void 0:e.length)+1}},methods:{printerInFloor(e,t){if(!(e!=null&&e.printers))return;const n=e.printers[t-1];if(n)return this.printersStore.printer(n.printerId)},async createFloor(){await this.addOrUpdateFloorDialog.openDialog()},setEditedPrinterFloorName(){this.editedFloorName=this.selectedFloor.name},setEditedPrinterFloorNumber(){this.editedFloorNumber=this.selectedFloor.floor},async updatePrinterFloorName(){var t;if(!((t=this.selectedFloor)!=null&&t.id))return;const{id:e}=this.selectedFloor;await this.floorStore.updateFloorName({floorId:e,name:this.editedFloorName}),this.snackbar.info("Floor name updated")},async updatePrinterFloorNumber(){var t;if(!((t=this.selectedFloor)!=null&&t.id))return;const{id:e}=this.selectedFloor;await this.floorStore.updateFloorNumber({floorId:e,floorNumber:this.editedFloorNumber}),this.snackbar.info("Floor level updated"),this.selectedItem=-1},async clickDeleteFloor(){var e;(e=this.selectedFloor)!=null&&e.id&&(await this.floorStore.deleteFloor(this.selectedFloor.id),this.snackbar.info("Floor deleted"))},async deletePrinterFromFloor(e,t){const n=this.printerInFloor(e,t);!(e!=null&&e.id)||!(n!=null&&n.id)||(await this.floorStore.deletePrinterFromFloor({floorId:e.id,printerId:n.id}),this.snackbar.info("Printer removed from floor"))}}}),hZ={key:1};function pZ(e,t,n,r,s,i){const o=nM,a=In("v-list-item-action-text"),l=In("v-list-item-group"),u=In("v-edit-dialog"),c=In("v-list-item-content");return $(),te(yt,null,{default:v(()=>[h(o,{icon:"house_siding",title:"Floors"}),h(Bt,{subheader:"",lines:"three"},{default:v(()=>[h(qr,null,{default:v(()=>t[7]||(t[7]=[k("Floors")])),_:1,__:[7]}),h(Ve,null,{default:v(()=>[h(ct,null,{default:v(()=>t[8]||(t[8]=[k(" Create new floor ")])),_:1,__:[8]}),h(vt,null,{default:v(()=>[t[10]||(t[10]=k(" Creates an empty department/floor to view printer groups ")),t[11]||(t[11]=L("br",null,null,-1)),h(re,{color:"primary",onClick:t[0]||(t[0]=d=>e.createFloor())},{default:v(()=>t[9]||(t[9]=[k(" Create floor ")])),_:1,__:[9]})]),_:1,__:[10,11]})]),_:1})]),_:1}),h(dn),h(rt,{"no-gutters":""},{default:v(()=>[h(ze,null,{default:v(()=>[h(Bt,{density:"compact"},{default:v(()=>[h(l,{modelValue:e.selectedItem,"onUpdate:modelValue":t[1]||(t[1]=d=>e.selectedItem=d)},{default:v(()=>[($(!0),ve(Ae,null,Gt(e.floors,d=>($(),te(Ve,{key:d.id},{default:v(()=>[h(ct,null,{default:v(()=>[k(se(d.name),1)]),_:2},1024),h(vt,null,{default:v(()=>[k(se(d.printers.length||0)+" assigned ",1)]),_:2},1024),h(a,null,{default:v(()=>[k(" Floor number: "+se(d.floor),1)]),_:2},1024)]),_:2},1024))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),h(ze,null,{default:v(()=>[h(mr,null,{default:v(()=>[h(ux,null,{default:v(({isHovering:d,props:f})=>[h(En,bv(Ih(f)),{default:v(()=>[e.selectedFloor?($(),te(u,{key:0,onOpen:e.setEditedPrinterFloorName,onSave:e.updatePrinterFloorName},{input:v(()=>[h(st,{modelValue:e.editedFloorName,"onUpdate:modelValue":t[2]||(t[2]=p=>e.editedFloorName=p),"return-value":e.editedFloorName,"onUpdate:returnValue":t[3]||(t[3]=p=>e.editedFloorName=p),counter:"",label:"Edit","single-line":""},null,8,["modelValue","return-value"])]),default:v(()=>[h(re,{color:"secondary"},{default:v(()=>[d?($(),te(J,{key:0,size:"small"},{default:v(()=>t[12]||(t[12]=[k(" edit ")])),_:1,__:[12]})):pe("",!0),k(" "+se(e.selectedFloor.name),1)]),_:2},1024)]),_:2},1032,["onOpen","onSave"])):($(),ve("span",hZ," Select a floor on the left "))]),_:2},1040)]),_:1}),h(ux,null,{default:v(({isHovering:d,props:f})=>[h(En,bv(Ih(f)),{default:v(()=>[e.selectedFloor?($(),te(u,{key:0,onOpen:e.setEditedPrinterFloorNumber,onSave:e.updatePrinterFloorNumber},{input:v(()=>[h(st,{modelValue:e.editedFloorNumber,"onUpdate:modelValue":t[4]||(t[4]=p=>e.editedFloorNumber=p),"return-value":e.editedFloorNumber,"onUpdate:returnValue":t[5]||(t[5]=p=>e.editedFloorNumber=p),label:"Edit","single-line":"",type:"number"},null,8,["modelValue","return-value"])]),default:v(()=>[h(re,{color:"secondary"},{default:v(()=>[d?($(),te(J,{key:0,size:"small"},{default:v(()=>t[13]||(t[13]=[k(" edit ")])),_:1,__:[13]})):pe("",!0),k(" "+se(e.selectedFloor.floor),1)]),_:2},1024)]),_:2},1032,["onOpen","onSave"])):pe("",!0)]),_:2},1040)]),_:1}),h(wn),e.selectedFloor?($(),te(re,{key:0,color:"primary",onClick:t[6]||(t[6]=d=>e.clickDeleteFloor())},{default:v(()=>[h(J,null,{default:v(()=>t[14]||(t[14]=[k("delete")])),_:1,__:[14]}),t[15]||(t[15]=k(" Delete floor "))]),_:1,__:[15]})):pe("",!0)]),_:1}),e.selectedFloor?($(),te(Bt,{key:0},{default:v(()=>[($(!0),ve(Ae,null,Gt(e.showAddedPrinters,d=>($(),te(Ve,{key:d},{default:v(()=>[e.printerInFloor(e.selectedFloor,d)?($(),te(c,{key:0},{default:v(()=>[h(ct,null,{default:v(()=>{var f;return[k(se((f=e.printerInFloor(e.selectedFloor,d))==null?void 0:f.name),1)]}),_:2},1024)]),_:2},1024)):pe("",!0),e.printerInFloor(e.selectedFloor,d)?($(),te(pu,{key:1},{default:v(()=>[h(re,{onClick:f=>e.deletePrinterFromFloor(e.selectedFloor,d)},{default:v(()=>[h(J,null,{default:v(()=>t[16]||(t[16]=[k("close")])),_:1,__:[16]}),t[17]||(t[17]=k(" Clear "))]),_:2,__:[17]},1032,["onClick"])]),_:2},1024)):pe("",!0)]),_:2},1024))),128))]),_:1})):pe("",!0)]),_:1})]),_:1})]),_:1})}const mZ=ol(fZ,[["render",pZ]]),gZ="/img/DavidZwart.jpg",rM="0.0.21",vZ={key:0},yZ={key:1},bZ=Le({__name:"AboutView",setup(e){const t=j(""),n=j(""),r=j(rM);return bt(async()=>{const s=await ma.getVersion();t.value=s.version,n.value=s.monsterPi}),(s,i)=>($(),te(yt,null,{default:v(()=>[h(sn,null,{default:v(()=>i[0]||(i[0]=[k(" About FDM Monster"),L("strong",null," © ",-1)])),_:1,__:[0]}),h(en,null,{default:v(()=>i[1]||(i[1]=[k(" The first prototype of FDM Monster"),L("strong",null," © ",-1),k(" was created by David Zwart in 2021 in collaboration with "),L("strong",null,[L("a",{href:"https://mtb3d.com"}," MTB3D ")],-1),k(". This open-source prototype proved a strong factor in process and logistics optimization for a 3D Printing company with 100+ printers. Due to it's success, we decided to keep it open-source and free! ")])),_:1,__:[1]}),h(en,null,{default:v(()=>[i[4]||(i[4]=k(" The latest 3D Printing Farm server named FDM Monster has been tested for 2 years using a custom image for running 4 OctoPrint images on a Raspberry Pi. ")),i[5]||(i[5]=L("br",null,null,-1)),i[6]||(i[6]=k(" This version uses the famous ")),i[7]||(i[7]=L("a",{href:"https://nodejs.org/en",target:"_blank"},[L("strong",null," Node.js framework ")],-1)),i[8]||(i[8]=k(" together with Awilix and ExpressJS for its server, and ")),i[9]||(i[9]=L("a",{href:"https://vuejs.org/",target:"_blank"},[L("strong",null," Vue 2 ")],-1)),i[10]||(i[10]=k(" and ")),i[11]||(i[11]=L("a",{href:"https://next.vuetifyjs.com/",target:"_blank"},[L("strong",null," Vuetify 2 ")],-1)),i[12]||(i[12]=k(" to set a base for FDM Monster Client")),i[13]||(i[13]=L("strong",null," © ",-1)),i[14]||(i[14]=k(" - the webapp. ")),i[15]||(i[15]=L("br",null,null,-1)),i[16]||(i[16]=L("br",null,null,-1)),L("strong",null," Your server's version is: "+se(t.value),1),i[17]||(i[17]=L("br",null,null,-1)),L("strong",null," Your clients's version is: "+se(r.value),1),i[18]||(i[18]=L("br",null,null,-1)),n.value?($(),ve("strong",vZ,[k(" Your MonsterPi version is: "+se(n.value),1),i[2]||(i[2]=L("br",null,null,-1))])):($(),ve("strong",yZ," No MonsterPi distro detected. ")),i[19]||(i[19]=L("br",null,null,-1)),h(re,{class:"mt-3",variant:"outlined",to:"/settings/software-upgrade"},{default:v(()=>i[3]||(i[3]=[k(" Visit Upgrade Settings ")])),_:1,__:[3]})]),_:1,__:[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]}),h(sn,null,{default:v(()=>i[20]||(i[20]=[k(" Documentation ")])),_:1,__:[20]}),h(en,null,{default:v(()=>[L("strong",null,[h(re,{color:"primary",href:"https://docs.fdm-monster.net",style:{color:"white"},target:"_blank"},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>i[21]||(i[21]=[k("menu_book")])),_:1,__:[21]}),i[22]||(i[22]=k(" FDM Monster documentation site "))]),_:1,__:[22]})]),i[23]||(i[23]=L("br",null,null,-1))]),_:1,__:[23]}),h(sn,null,{default:v(()=>[i[25]||(i[25]=k(" Bug reports ")),h(J,null,{default:v(()=>i[24]||(i[24]=[k("bug")])),_:1,__:[24]})]),_:1,__:[25]}),h(en,null,{default:v(()=>i[26]||(i[26]=[k(" Did you find a bug, or a feature that needs work? We would love to hear about it! "),L("br",null,null,-1),L("strong",null," We have multiple ways to report it: ",-1),L("h3",null,[L("ul",{class:"ml-5"},[L("li",null,"Mail to davidzwa@gmail.com"),L("li",null,[L("a",{href:"https://discord.gg/mwA8uP8CMc",style:{color:"white"},target:"_blank"}," Discord server ")]),L("li",null,[L("strong",null,[L("a",{href:"https://github.com/fdm-monster/fdm-monster/issues",style:{color:"white"},target:"_blank"},[k(" FDM Monster "),L("strong",null," © "),k(" Github Issues ")])])]),L("li",null,[L("a",{href:"https://fdm-monster.net",style:{color:"white"},target:"_blank"}," Website ")])])],-1)])),_:1,__:[26]}),h(sn,null,{default:v(()=>i[27]||(i[27]=[k(" About me ")])),_:1,__:[27]}),h(en,null,{default:v(()=>i[28]||(i[28]=[L("img",{src:gZ,width:"150px"},null,-1),L("h4",{class:"mt-2"},[L("a",{href:"https://www.linkedin.com/in/david-zwart-88514083/",style:{color:"white"},target:"_blank"}," LinkedIn "),L("a",{class:"ml-2",href:"https://github.com/davidzwa",style:{color:"white"},target:"_blank"}," Github Profile ")],-1),k(" David Zwart MSc., post-graduate from the TU Delft (Embedded Systems), author of FDM Monster"),L("strong",null," © ",-1)])),_:1,__:[28]})]),_:1}))}});/*!
|
|
71
|
+
* @kurkle/color v0.3.2
|
|
72
|
+
* https://github.com/kurkle/color#readme
|
|
73
|
+
* (c) 2023 Jukka Kurkela
|
|
74
|
+
* Released under the MIT License
|
|
75
|
+
*/function Wd(e){return e+.5|0}const xo=(e,t,n)=>Math.max(Math.min(e,n),t);function mc(e){return xo(Wd(e*2.55),0,255)}function Ao(e){return xo(Wd(e*255),0,255)}function Ri(e){return xo(Wd(e/2.55)/100,0,1)}function cx(e){return xo(Wd(e*100),0,100)}const Jr={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},gb=[..."0123456789ABCDEF"],_Z=e=>gb[e&15],wZ=e=>gb[(e&240)>>4]+gb[e&15],xf=e=>(e&240)>>4===(e&15),SZ=e=>xf(e.r)&&xf(e.g)&&xf(e.b)&&xf(e.a);function kZ(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&Jr[e[1]]*17,g:255&Jr[e[2]]*17,b:255&Jr[e[3]]*17,a:t===5?Jr[e[4]]*17:255}:(t===7||t===9)&&(n={r:Jr[e[1]]<<4|Jr[e[2]],g:Jr[e[3]]<<4|Jr[e[4]],b:Jr[e[5]]<<4|Jr[e[6]],a:t===9?Jr[e[7]]<<4|Jr[e[8]]:255})),n}const xZ=(e,t)=>e<255?t(e):"";function EZ(e){var t=SZ(e)?_Z:wZ;return e?"#"+t(e.r)+t(e.g)+t(e.b)+xZ(e.a,t):void 0}const CZ=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function sM(e,t,n){const r=t*Math.min(n,1-n),s=(i,o=(i+e/30)%12)=>n-r*Math.max(Math.min(o-3,9-o,1),-1);return[s(0),s(8),s(4)]}function TZ(e,t,n){const r=(s,i=(s+e/60)%6)=>n-n*t*Math.max(Math.min(i,4-i,1),0);return[r(5),r(3),r(1)]}function PZ(e,t,n){const r=sM(e,1,.5);let s;for(t+n>1&&(s=1/(t+n),t*=s,n*=s),s=0;s<3;s++)r[s]*=1-t-n,r[s]+=t;return r}function RZ(e,t,n,r,s){return e===s?(t-n)/r+(t<n?6:0):t===s?(n-e)/r+2:(e-t)/r+4}function w0(e){const n=e.r/255,r=e.g/255,s=e.b/255,i=Math.max(n,r,s),o=Math.min(n,r,s),a=(i+o)/2;let l,u,c;return i!==o&&(c=i-o,u=a>.5?c/(2-i-o):c/(i+o),l=RZ(n,r,s,c,i),l=l*60+.5),[l|0,u||0,a]}function S0(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(Ao)}function k0(e,t,n){return S0(sM,e,t,n)}function IZ(e,t,n){return S0(PZ,e,t,n)}function AZ(e,t,n){return S0(TZ,e,t,n)}function iM(e){return(e%360+360)%360}function OZ(e){const t=CZ.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?mc(+t[5]):Ao(+t[5]));const s=iM(+t[2]),i=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?r=IZ(s,i,o):t[1]==="hsv"?r=AZ(s,i,o):r=k0(s,i,o),{r:r[0],g:r[1],b:r[2],a:n}}function MZ(e,t){var n=w0(e);n[0]=iM(n[0]+t),n=k0(n),e.r=n[0],e.g=n[1],e.b=n[2]}function DZ(e){if(!e)return;const t=w0(e),n=t[0],r=cx(t[1]),s=cx(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${s}%, ${Ri(e.a)})`:`hsl(${n}, ${r}%, ${s}%)`}const dx={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"},fx={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function LZ(){const e={},t=Object.keys(fx),n=Object.keys(dx);let r,s,i,o,a;for(r=0;r<t.length;r++){for(o=a=t[r],s=0;s<n.length;s++)i=n[s],a=a.replace(i,dx[i]);i=parseInt(fx[o],16),e[a]=[i>>16&255,i>>8&255,i&255]}return e}let Ef;function $Z(e){Ef||(Ef=LZ(),Ef.transparent=[0,0,0,0]);const t=Ef[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const FZ=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function NZ(e){const t=FZ.exec(e);let n=255,r,s,i;if(t){if(t[7]!==r){const o=+t[7];n=t[8]?mc(o):xo(o*255,0,255)}return r=+t[1],s=+t[3],i=+t[5],r=255&(t[2]?mc(r):xo(r,0,255)),s=255&(t[4]?mc(s):xo(s,0,255)),i=255&(t[6]?mc(i):xo(i,0,255)),{r,g:s,b:i,a:n}}}function VZ(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Ri(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const Qg=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,ml=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function BZ(e,t,n){const r=ml(Ri(e.r)),s=ml(Ri(e.g)),i=ml(Ri(e.b));return{r:Ao(Qg(r+n*(ml(Ri(t.r))-r))),g:Ao(Qg(s+n*(ml(Ri(t.g))-s))),b:Ao(Qg(i+n*(ml(Ri(t.b))-i))),a:e.a+n*(t.a-e.a)}}function Cf(e,t,n){if(e){let r=w0(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=k0(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function oM(e,t){return e&&Object.assign(t||{},e)}function hx(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=Ao(e[3]))):(t=oM(e,{r:0,g:0,b:0,a:1}),t.a=Ao(t.a)),t}function UZ(e){return e.charAt(0)==="r"?NZ(e):OZ(e)}class dd{constructor(t){if(t instanceof dd)return t;const n=typeof t;let r;n==="object"?r=hx(t):n==="string"&&(r=kZ(t)||$Z(t)||UZ(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=oM(this._rgb);return t&&(t.a=Ri(t.a)),t}set rgb(t){this._rgb=hx(t)}rgbString(){return this._valid?VZ(this._rgb):void 0}hexString(){return this._valid?EZ(this._rgb):void 0}hslString(){return this._valid?DZ(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,s=t.rgb;let i;const o=n===i?.5:n,a=2*o-1,l=r.a-s.a,u=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;i=1-u,r.r=255&u*r.r+i*s.r+.5,r.g=255&u*r.g+i*s.g+.5,r.b=255&u*r.b+i*s.b+.5,r.a=o*r.a+(1-o)*s.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=BZ(this._rgb,t._rgb,n)),this}clone(){return new dd(this.rgb)}alpha(t){return this._rgb.a=Ao(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=Wd(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Cf(this._rgb,2,t),this}darken(t){return Cf(this._rgb,2,-t),this}saturate(t){return Cf(this._rgb,1,t),this}desaturate(t){return Cf(this._rgb,1,-t),this}rotate(t){return MZ(this._rgb,t),this}}/*!
|
|
76
|
+
* Chart.js v4.4.9
|
|
77
|
+
* https://www.chartjs.org
|
|
78
|
+
* (c) 2025 Chart.js Contributors
|
|
79
|
+
* Released under the MIT License
|
|
80
|
+
*/function wi(){}const zZ=(()=>{let e=0;return()=>e++})();function Ft(e){return e==null}function kn(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 xt(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function hs(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Ws(e,t){return hs(e)?e:t}function At(e,t){return typeof e>"u"?t:e}const HZ=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Xt(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function It(e,t,n,r){let s,i,o;if(kn(e))for(i=e.length,s=0;s<i;s++)t.call(n,e[s],s);else if(xt(e))for(o=Object.keys(e),i=o.length,s=0;s<i;s++)t.call(n,e[o[s]],o[s])}function yp(e,t){let n,r,s,i;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(s=e[n],i=t[n],s.datasetIndex!==i.datasetIndex||s.index!==i.index)return!1;return!0}function bp(e){if(kn(e))return e.map(bp);if(xt(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let s=0;for(;s<r;++s)t[n[s]]=bp(e[n[s]]);return t}return e}function aM(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function jZ(e,t,n,r){if(!aM(e))return;const s=t[e],i=n[e];xt(s)&&xt(i)?fd(s,i,r):t[e]=bp(i)}function fd(e,t,n){const r=kn(t)?t:[t],s=r.length;if(!xt(e))return e;n=n||{};const i=n.merger||jZ;let o;for(let a=0;a<s;++a){if(o=r[a],!xt(o))continue;const l=Object.keys(o);for(let u=0,c=l.length;u<c;++u)i(l[u],e,o,n)}return e}function Lc(e,t){return fd(e,t,{merger:qZ})}function qZ(e,t,n){if(!aM(e))return;const r=t[e],s=n[e];xt(r)&&xt(s)?Lc(r,s):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=bp(s))}const px={"":e=>e,x:e=>e.x,y:e=>e.y};function WZ(e){const t=e.split("."),n=[];let r="";for(const s of t)r+=s,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function GZ(e){const t=WZ(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function bu(e,t){return(px[t]||(px[t]=GZ(t)))(e)}function x0(e){return e.charAt(0).toUpperCase()+e.slice(1)}const hd=e=>typeof e<"u",Bo=e=>typeof e=="function",mx=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function KZ(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const sr=Math.PI,Oo=2*sr,_p=Number.POSITIVE_INFINITY,YZ=sr/180,Ts=sr/2,ta=sr/4,gx=sr*2/3,vb=Math.log10,Mo=Math.sign;function yh(e,t,n){return Math.abs(e-t)<n}function vx(e){const t=Math.round(e);e=yh(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(vb(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function XZ(e){const t=[],n=Math.sqrt(e);let r;for(r=1;r<n;r++)e%r===0&&(t.push(r),t.push(e/r));return n===(n|0)&&t.push(n),t.sort((s,i)=>s-i).pop(),t}function QZ(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function wp(e){return!QZ(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function JZ(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function ZZ(e,t,n){let r,s,i;for(r=0,s=e.length;r<s;r++)i=e[r][n],isNaN(i)||(t.min=Math.min(t.min,i),t.max=Math.max(t.max,i))}function ga(e){return e*(sr/180)}function eee(e){return e*(180/sr)}function yx(e){if(!hs(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function tee(e,t){const n=t.x-e.x,r=t.y-e.y,s=Math.sqrt(n*n+r*r);let i=Math.atan2(r,n);return i<-.5*sr&&(i+=Oo),{angle:i,distance:s}}function nee(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function na(e){return(e%Oo+Oo)%Oo}function ree(e,t,n,r){const s=na(e),i=na(t),o=na(n),a=na(i-s),l=na(o-s),u=na(s-i),c=na(s-o);return s===i||s===o||r&&i===o||a>l&&u<c}function Ps(e,t,n){return Math.max(t,Math.min(n,e))}function see(e){return Ps(e,-32768,32767)}function Ml(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function E0(e,t,n){n=n||(o=>e[o]<t);let r=e.length-1,s=0,i;for(;r-s>1;)i=s+r>>1,n(i)?s=i:r=i;return{lo:s,hi:r}}const yb=(e,t,n,r)=>E0(e,n,r?s=>{const i=e[s][t];return i<n||i===n&&e[s+1][t]===n}:s=>e[s][t]<n),iee=(e,t,n)=>E0(e,n,r=>e[r][t]>=n);function oee(e,t,n){let r=0,s=e.length;for(;r<s&&e[r]<t;)r++;for(;s>r&&e[s-1]>n;)s--;return r>0||s<e.length?e.slice(r,s):e}const lM=["push","pop","shift","splice","unshift"];function aee(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),lM.forEach(n=>{const r="_onData"+x0(n),s=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...i){const o=s.apply(this,i);return e._chartjs.listeners.forEach(a=>{typeof a[r]=="function"&&a[r](...i)}),o}})})}function bx(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,s=r.indexOf(t);s!==-1&&r.splice(s,1),!(r.length>0)&&(lM.forEach(i=>{delete e[i]}),delete e._chartjs)}function uM(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const cM=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function dM(e,t){let n=[],r=!1;return function(...s){n=s,r||(r=!0,cM.call(window,()=>{r=!1,e.apply(t,n)}))}}function lee(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const C0=e=>e==="start"?"left":e==="end"?"right":"center",Yn=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,uee=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t,Tf=e=>e===0||e===1,_x=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Oo/n)),wx=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Oo/n)+1,$c={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*Ts)+1,easeOutSine:e=>Math.sin(e*Ts),easeInOutSine:e=>-.5*(Math.cos(sr*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>Tf(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Tf(e)?e:_x(e,.075,.3),easeOutElastic:e=>Tf(e)?e:wx(e,.075,.3),easeInOutElastic(e){return Tf(e)?e:e<.5?.5*_x(e*2,.1125,.45):.5+.5*wx(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-$c.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?$c.easeInBounce(e*2)*.5:$c.easeOutBounce(e*2-1)*.5+.5};function fM(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Sx(e){return fM(e)?e:new dd(e)}function Jg(e){return fM(e)?e:new dd(e).saturate(.5).darken(.1).hexString()}const cee=["x","y","borderWidth","radius","tension"],dee=["color","borderColor","backgroundColor"];function fee(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:dee},numbers:{type:"number",properties:cee}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function hee(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const kx=new Map;function pee(e,t){t=t||{};const n=e+JSON.stringify(t);let r=kx.get(n);return r||(r=new Intl.NumberFormat(e,t),kx.set(n,r)),r}function hM(e,t,n){return pee(t,n).format(e)}const pM={values(e){return kn(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let s,i=e;if(n.length>1){const u=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(u<1e-4||u>1e15)&&(s="scientific"),i=mee(e,n)}const o=vb(Math.abs(i)),a=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),hM(e,r,l)},logarithmic(e,t,n){if(e===0)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor(vb(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?pM.numeric.call(this,e,t,n):""}};function mee(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var mM={formatters:pM};function gee(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:mM.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Ya=Object.create(null),bb=Object.create(null);function Fc(e,t){if(!t)return e;const n=t.split(".");for(let r=0,s=n.length;r<s;++r){const i=n[r];e=e[i]||(e[i]=Object.create(null))}return e}function Zg(e,t,n){return typeof t=="string"?fd(Fc(e,t),n):fd(Fc(e,""),t)}class vee{constructor(t,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=r=>r.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,s)=>Jg(s.backgroundColor),this.hoverBorderColor=(r,s)=>Jg(s.borderColor),this.hoverColor=(r,s)=>Jg(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return Zg(this,t,n)}get(t){return Fc(this,t)}describe(t,n){return Zg(bb,t,n)}override(t,n){return Zg(Ya,t,n)}route(t,n,r,s){const i=Fc(this,t),o=Fc(this,r),a="_"+n;Object.defineProperties(i,{[a]:{value:i[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],u=o[s];return xt(l)?Object.assign({},u,l):At(l,u)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}}var gn=new vee({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[fee,hee,gee]);function yee(e){return!e||Ft(e.size)||Ft(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function xx(e,t,n,r,s){let i=t[s];return i||(i=t[s]=e.measureText(s).width,n.push(s)),i>r&&(r=i),r}function ra(e,t,n){const r=e.currentDevicePixelRatio,s=n!==0?Math.max(n/2,.5):0;return Math.round((t-s)*r)/r+s}function Ex(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function Cx(e,t,n,r){gM(e,t,n,r,null)}function gM(e,t,n,r,s){let i,o,a,l,u,c,d,f;const p=t.pointStyle,g=t.rotation,m=t.radius;let y=(g||0)*YZ;if(p&&typeof p=="object"&&(i=p.toString(),i==="[object HTMLImageElement]"||i==="[object HTMLCanvasElement]")){e.save(),e.translate(n,r),e.rotate(y),e.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),e.restore();return}if(!(isNaN(m)||m<=0)){switch(e.beginPath(),p){default:s?e.ellipse(n,r,s/2,m,0,0,Oo):e.arc(n,r,m,0,Oo),e.closePath();break;case"triangle":c=s?s/2:m,e.moveTo(n+Math.sin(y)*c,r-Math.cos(y)*m),y+=gx,e.lineTo(n+Math.sin(y)*c,r-Math.cos(y)*m),y+=gx,e.lineTo(n+Math.sin(y)*c,r-Math.cos(y)*m),e.closePath();break;case"rectRounded":u=m*.516,l=m-u,o=Math.cos(y+ta)*l,d=Math.cos(y+ta)*(s?s/2-u:l),a=Math.sin(y+ta)*l,f=Math.sin(y+ta)*(s?s/2-u:l),e.arc(n-d,r-a,u,y-sr,y-Ts),e.arc(n+f,r-o,u,y-Ts,y),e.arc(n+d,r+a,u,y,y+Ts),e.arc(n-f,r+o,u,y+Ts,y+sr),e.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*m,c=s?s/2:l,e.rect(n-c,r-l,2*c,2*l);break}y+=ta;case"rectRot":d=Math.cos(y)*(s?s/2:m),o=Math.cos(y)*m,a=Math.sin(y)*m,f=Math.sin(y)*(s?s/2:m),e.moveTo(n-d,r-a),e.lineTo(n+f,r-o),e.lineTo(n+d,r+a),e.lineTo(n-f,r+o),e.closePath();break;case"crossRot":y+=ta;case"cross":d=Math.cos(y)*(s?s/2:m),o=Math.cos(y)*m,a=Math.sin(y)*m,f=Math.sin(y)*(s?s/2:m),e.moveTo(n-d,r-a),e.lineTo(n+d,r+a),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o);break;case"star":d=Math.cos(y)*(s?s/2:m),o=Math.cos(y)*m,a=Math.sin(y)*m,f=Math.sin(y)*(s?s/2:m),e.moveTo(n-d,r-a),e.lineTo(n+d,r+a),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o),y+=ta,d=Math.cos(y)*(s?s/2:m),o=Math.cos(y)*m,a=Math.sin(y)*m,f=Math.sin(y)*(s?s/2:m),e.moveTo(n-d,r-a),e.lineTo(n+d,r+a),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o);break;case"line":o=s?s/2:Math.cos(y)*m,a=Math.sin(y)*m,e.moveTo(n-o,r-a),e.lineTo(n+o,r+a);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(y)*(s?s/2:m),r+Math.sin(y)*m);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function vM(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function T0(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function P0(e){e.restore()}function bee(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),Ft(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function _ee(e,t,n,r,s){if(s.strikethrough||s.underline){const i=e.measureText(r),o=t-i.actualBoundingBoxLeft,a=t+i.actualBoundingBoxRight,l=n-i.actualBoundingBoxAscent,u=n+i.actualBoundingBoxDescent,c=s.strikethrough?(l+u)/2:u;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=s.decorationWidth||2,e.moveTo(o,c),e.lineTo(a,c),e.stroke()}}function wee(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function pd(e,t,n,r,s,i={}){const o=kn(t)?t:[t],a=i.strokeWidth>0&&i.strokeColor!=="";let l,u;for(e.save(),e.font=s.string,bee(e,i),l=0;l<o.length;++l)u=o[l],i.backdrop&&wee(e,i.backdrop),a&&(i.strokeColor&&(e.strokeStyle=i.strokeColor),Ft(i.strokeWidth)||(e.lineWidth=i.strokeWidth),e.strokeText(u,n,r,i.maxWidth)),e.fillText(u,n,r,i.maxWidth),_ee(e,n,r,u,i),r+=Number(s.lineHeight);e.restore()}function Sp(e,t){const{x:n,y:r,w:s,h:i,radius:o}=t;e.arc(n+o.topLeft,r+o.topLeft,o.topLeft,1.5*sr,sr,!0),e.lineTo(n,r+i-o.bottomLeft),e.arc(n+o.bottomLeft,r+i-o.bottomLeft,o.bottomLeft,sr,Ts,!0),e.lineTo(n+s-o.bottomRight,r+i),e.arc(n+s-o.bottomRight,r+i-o.bottomRight,o.bottomRight,Ts,0,!0),e.lineTo(n+s,r+o.topRight),e.arc(n+s-o.topRight,r+o.topRight,o.topRight,0,-Ts,!0),e.lineTo(n+o.topLeft,r)}const See=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,kee=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function xee(e,t){const n=(""+e).match(See);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const Eee=e=>+e||0;function yM(e,t){const n={},r=xt(t),s=r?Object.keys(t):t,i=xt(e)?r?o=>At(e[o],e[t[o]]):o=>e[o]:()=>e;for(const o of s)n[o]=Eee(i(o));return n}function bM(e){return yM(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Bl(e){return yM(e,["topLeft","topRight","bottomLeft","bottomRight"])}function ps(e){const t=bM(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function tr(e,t){e=e||{},t=t||gn.font;let n=At(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=At(e.style,t.style);r&&!(""+r).match(kee)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const s={family:At(e.family,t.family),lineHeight:xee(At(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:At(e.weight,t.weight),string:""};return s.string=yee(s),s}function Pf(e,t,n,r){let s,i,o;for(s=0,i=e.length;s<i;++s)if(o=e[s],o!==void 0&&o!==void 0)return o}function Cee(e,t,n){const{min:r,max:s}=e,i=HZ(t,(s-r)/2),o=(a,l)=>n&&a===0?0:a+l;return{min:o(r,-Math.abs(i)),max:o(s,i)}}function ju(e,t){return Object.assign(Object.create(e),t)}function R0(e,t=[""],n,r,s=()=>e[0]){const i=n||e;typeof r>"u"&&(r=kM("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:i,_fallback:r,_getTarget:s,override:a=>R0([a,...e],t,i,r)};return new Proxy(o,{deleteProperty(a,l){return delete a[l],delete a._keys,delete e[0][l],!0},get(a,l){return wM(a,l,()=>Dee(l,t,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return Px(a).includes(l)},ownKeys(a){return Px(a)},set(a,l,u){const c=a._storage||(a._storage=s());return a[l]=c[l]=u,delete a._keys,!0}})}function _u(e,t,n,r){const s={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:_M(e,r),setContext:i=>_u(e,i,n,r),override:i=>_u(e.override(i),t,n,r)};return new Proxy(s,{deleteProperty(i,o){return delete i[o],delete e[o],!0},get(i,o,a){return wM(i,o,()=>Pee(i,o,a))},getOwnPropertyDescriptor(i,o){return i._descriptors.allKeys?Reflect.has(e,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,o)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(i,o){return Reflect.has(e,o)},ownKeys(){return Reflect.ownKeys(e)},set(i,o,a){return e[o]=a,delete i[o],!0}})}function _M(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:s=t.allKeys}=e;return{allKeys:s,scriptable:n,indexable:r,isScriptable:Bo(n)?n:()=>n,isIndexable:Bo(r)?r:()=>r}}const Tee=(e,t)=>e?e+x0(t):t,I0=(e,t)=>xt(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function wM(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const r=n();return e[t]=r,r}function Pee(e,t,n){const{_proxy:r,_context:s,_subProxy:i,_descriptors:o}=e;let a=r[t];return Bo(a)&&o.isScriptable(t)&&(a=Ree(t,a,e,n)),kn(a)&&a.length&&(a=Iee(t,a,e,o.isIndexable)),I0(t,a)&&(a=_u(a,s,i&&i[t],o)),a}function Ree(e,t,n,r){const{_proxy:s,_context:i,_subProxy:o,_stack:a}=n;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);a.add(e);let l=t(i,o||r);return a.delete(e),I0(e,l)&&(l=A0(s._scopes,s,e,l)),l}function Iee(e,t,n,r){const{_proxy:s,_context:i,_subProxy:o,_descriptors:a}=n;if(typeof i.index<"u"&&r(e))return t[i.index%t.length];if(xt(t[0])){const l=t,u=s._scopes.filter(c=>c!==l);t=[];for(const c of l){const d=A0(u,s,e,c);t.push(_u(d,i,o&&o[e],a))}}return t}function SM(e,t,n){return Bo(e)?e(t,n):e}const Aee=(e,t)=>e===!0?t:typeof e=="string"?bu(t,e):void 0;function Oee(e,t,n,r,s){for(const i of t){const o=Aee(n,i);if(o){e.add(o);const a=SM(o._fallback,n,s);if(typeof a<"u"&&a!==n&&a!==r)return a}else if(o===!1&&typeof r<"u"&&n!==r)return null}return!1}function A0(e,t,n,r){const s=t._rootScopes,i=SM(t._fallback,n,r),o=[...e,...s],a=new Set;a.add(r);let l=Tx(a,o,n,i||n,r);return l===null||typeof i<"u"&&i!==n&&(l=Tx(a,o,i,l,r),l===null)?!1:R0(Array.from(a),[""],s,i,()=>Mee(t,n,r))}function Tx(e,t,n,r,s){for(;n;)n=Oee(e,t,n,r,s);return n}function Mee(e,t,n){const r=e._getTarget();t in r||(r[t]={});const s=r[t];return kn(s)&&xt(n)?n:s||{}}function Dee(e,t,n,r){let s;for(const i of t)if(s=kM(Tee(i,e),n),typeof s<"u")return I0(e,s)?A0(n,r,e,s):s}function kM(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function Px(e){let t=e._keys;return t||(t=e._keys=Lee(e._scopes)),t}function Lee(e){const t=new Set;for(const n of e)for(const r of Object.keys(n).filter(s=>!s.startsWith("_")))t.add(r);return Array.from(t)}function O0(){return typeof window<"u"&&typeof document<"u"}function M0(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function kp(e,t,n){let r;return typeof e=="string"?(r=parseInt(e,10),e.indexOf("%")!==-1&&(r=r/100*t.parentNode[n])):r=e,r}const Nm=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function $ee(e,t){return Nm(e).getPropertyValue(t)}const Fee=["top","right","bottom","left"];function La(e,t,n){const r={};n=n?"-"+n:"";for(let s=0;s<4;s++){const i=Fee[s];r[i]=parseFloat(e[t+"-"+i+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const Nee=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function Vee(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:s,offsetY:i}=r;let o=!1,a,l;if(Nee(s,i,e.target))a=s,l=i;else{const u=t.getBoundingClientRect();a=r.clientX-u.left,l=r.clientY-u.top,o=!0}return{x:a,y:l,box:o}}function la(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,s=Nm(n),i=s.boxSizing==="border-box",o=La(s,"padding"),a=La(s,"border","width"),{x:l,y:u,box:c}=Vee(e,n),d=o.left+(c&&a.left),f=o.top+(c&&a.top);let{width:p,height:g}=t;return i&&(p-=o.width+a.width,g-=o.height+a.height),{x:Math.round((l-d)/p*n.width/r),y:Math.round((u-f)/g*n.height/r)}}function Bee(e,t,n){let r,s;if(t===void 0||n===void 0){const i=e&&M0(e);if(!i)t=e.clientWidth,n=e.clientHeight;else{const o=i.getBoundingClientRect(),a=Nm(i),l=La(a,"border","width"),u=La(a,"padding");t=o.width-u.width-l.width,n=o.height-u.height-l.height,r=kp(a.maxWidth,i,"clientWidth"),s=kp(a.maxHeight,i,"clientHeight")}}return{width:t,height:n,maxWidth:r||_p,maxHeight:s||_p}}const Rf=e=>Math.round(e*10)/10;function Uee(e,t,n,r){const s=Nm(e),i=La(s,"margin"),o=kp(s.maxWidth,e,"clientWidth")||_p,a=kp(s.maxHeight,e,"clientHeight")||_p,l=Bee(e,t,n);let{width:u,height:c}=l;if(s.boxSizing==="content-box"){const f=La(s,"border","width"),p=La(s,"padding");u-=p.width+f.width,c-=p.height+f.height}return u=Math.max(0,u-i.width),c=Math.max(0,r?u/r:c-i.height),u=Rf(Math.min(u,o,l.maxWidth)),c=Rf(Math.min(c,a,l.maxHeight)),u&&!c&&(c=Rf(u/2)),(t!==void 0||n!==void 0)&&r&&l.height&&c>l.height&&(c=l.height,u=Rf(Math.floor(c*r))),{width:u,height:c}}function Rx(e,t,n){const r=t||1,s=Math.floor(e.height*r),i=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const o=e.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||o.height!==s||o.width!==i?(e.currentDevicePixelRatio=r,o.height=s,o.width=i,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const zee=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};O0()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e}();function Ix(e,t){const n=$ee(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}const Hee=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},jee=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function Ul(e,t,n){return e?Hee(t,n):jee()}function xM(e,t){let n,r;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function EM(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function If(e,t,n){return e.options.clip?e[n]:t[n]}function qee(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:If(n,t,"left"),right:If(n,t,"right"),top:If(r,t,"top"),bottom:If(r,t,"bottom")}:t}function Wee(e,t){const n=t._clip;if(n.disabled)return!1;const r=qee(t,e.chartArea);return{left:n.left===!1?0:r.left-(n.left===!0?0:n.left),right:n.right===!1?e.width:r.right+(n.right===!0?0:n.right),top:n.top===!1?0:r.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?e.height:r.bottom+(n.bottom===!0?0:n.bottom)}}/*!
|
|
81
|
+
* Chart.js v4.4.9
|
|
82
|
+
* https://www.chartjs.org
|
|
83
|
+
* (c) 2025 Chart.js Contributors
|
|
84
|
+
* Released under the MIT License
|
|
85
|
+
*/class Gee{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,s){const i=n.listeners[s],o=n.duration;i.forEach(a=>a({chart:t,initial:n.initial,numSteps:o,currentStep:Math.min(r-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=cM.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,s)=>{if(!r.running||!r.items.length)return;const i=r.items;let o=i.length-1,a=!1,l;for(;o>=0;--o)l=i[o],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),a=!0):(i[o]=i[i.length-1],i.pop());a&&(s.draw(),this._notify(s,r,t,"progress")),i.length||(r.running=!1,this._notify(s,r,t,"complete"),r.initial=!1),n+=i.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}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((r,s)=>Math.max(r,s._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 r=n.items;let s=r.length-1;for(;s>=0;--s)r[s].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var xi=new Gee;const Ax="transparent",Kee={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=Sx(e||Ax),s=r.valid&&Sx(t||Ax);return s&&s.valid?s.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class Yee{constructor(t,n,r,s){const i=n[r];s=Pf([t.to,s,i,t.from]);const o=Pf([t.from,i,s]);this._active=!0,this._fn=t.fn||Kee[t.type||typeof o],this._easing=$c[t.easing]||$c.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=r,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const s=this._target[this._prop],i=r-this._start,o=this._duration-i;this._start=r,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=i,this._loop=!!t.loop,this._to=Pf([t.to,n,s,t.from]),this._from=Pf([t.from,s,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,s=this._prop,i=this._from,o=this._loop,a=this._to;let l;if(this._active=i!==a&&(o||n<r),!this._active){this._target[s]=a,this._notify(!0);return}if(n<0){this._target[s]=i;return}l=n/r%2,l=o&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(i,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let s=0;s<r.length;s++)r[s][n]()}}class CM{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!xt(t))return;const n=Object.keys(gn.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{const i=t[s];if(!xt(i))return;const o={};for(const a of n)o[a]=i[a];(kn(i.properties)&&i.properties||[s]).forEach(a=>{(a===s||!r.has(a))&&r.set(a,o)})})}_animateOptions(t,n){const r=n.options,s=Qee(t,r);if(!s)return[];const i=this._createAnimations(s,r);return r.$shared&&Xee(t.options.$animations,r).then(()=>{t.options=r},()=>{}),i}_createAnimations(t,n){const r=this._properties,s=[],i=t.$animations||(t.$animations={}),o=Object.keys(n),a=Date.now();let l;for(l=o.length-1;l>=0;--l){const u=o[l];if(u.charAt(0)==="$")continue;if(u==="options"){s.push(...this._animateOptions(t,n));continue}const c=n[u];let d=i[u];const f=r.get(u);if(d)if(f&&d.active()){d.update(f,c,a);continue}else d.cancel();if(!f||!f.duration){t[u]=c;continue}i[u]=d=new Yee(f,t,u,c),s.push(d)}return s}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return xi.add(this._chart,r),!0}}function Xee(e,t){const n=[],r=Object.keys(t);for(let s=0;s<r.length;s++){const i=e[r[s]];i&&i.active()&&n.push(i.wait())}return Promise.all(n)}function Qee(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Ox(e,t){const n=e&&e.options||{},r=n.reverse,s=n.min===void 0?t:0,i=n.max===void 0?t:0;return{start:r?i:s,end:r?s:i}}function Jee(e,t,n){if(n===!1)return!1;const r=Ox(e,n),s=Ox(t,n);return{top:s.end,right:r.end,bottom:s.start,left:r.start}}function Zee(e){let t,n,r,s;return xt(e)?(t=e.top,n=e.right,r=e.bottom,s=e.left):t=n=r=s=e,{top:t,right:n,bottom:r,left:s,disabled:e===!1}}function TM(e,t){const n=[],r=e._getSortedDatasetMetas(t);let s,i;for(s=0,i=r.length;s<i;++s)n.push(r[s].index);return n}function Mx(e,t,n,r={}){const s=e.keys,i=r.mode==="single";let o,a,l,u;if(t===null)return;let c=!1;for(o=0,a=s.length;o<a;++o){if(l=+s[o],l===n){if(c=!0,r.all)continue;break}u=e.values[l],hs(u)&&(i||t===0||Mo(t)===Mo(u))&&(t+=u)}return!c&&!r.all?0:t}function ete(e,t){const{iScale:n,vScale:r}=t,s=n.axis==="x"?"x":"y",i=r.axis==="x"?"x":"y",o=Object.keys(e),a=new Array(o.length);let l,u,c;for(l=0,u=o.length;l<u;++l)c=o[l],a[l]={[s]:c,[i]:e[c]};return a}function ev(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function tte(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function nte(e){const{min:t,max:n,minDefined:r,maxDefined:s}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:s?n:Number.POSITIVE_INFINITY}}function rte(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function Dx(e,t,n,r){for(const s of t.getMatchingVisibleMetas(r).reverse()){const i=e[s.index];if(n&&i>0||!n&&i<0)return s.index}return null}function Lx(e,t){const{chart:n,_cachedMeta:r}=e,s=n._stacks||(n._stacks={}),{iScale:i,vScale:o,index:a}=r,l=i.axis,u=o.axis,c=tte(i,o,r),d=t.length;let f;for(let p=0;p<d;++p){const g=t[p],{[l]:m,[u]:y}=g,_=g._stacks||(g._stacks={});f=_[u]=rte(s,c,m),f[a]=y,f._top=Dx(f,o,!0,r.type),f._bottom=Dx(f,o,!1,r.type);const b=f._visualValues||(f._visualValues={});b[a]=y}}function tv(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function ste(e,t){return ju(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function ite(e,t,n){return ju(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function sc(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const s of t){const i=s._stacks;if(!i||i[r]===void 0||i[r][n]===void 0)return;delete i[r][n],i[r]._visualValues!==void 0&&i[r]._visualValues[n]!==void 0&&delete i[r]._visualValues[n]}}}const nv=e=>e==="reset"||e==="none",$x=(e,t)=>t?e:Object.assign({},e),ote=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:TM(n,!0),values:null};class Nc{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=ev(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&sc(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),s=(d,f,p,g)=>d==="x"?f:d==="r"?g:p,i=n.xAxisID=At(r.xAxisID,tv(t,"x")),o=n.yAxisID=At(r.yAxisID,tv(t,"y")),a=n.rAxisID=At(r.rAxisID,tv(t,"r")),l=n.indexAxis,u=n.iAxisID=s(l,i,o,a),c=n.vAxisID=s(l,o,i,a);n.xScale=this.getScaleForId(i),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(u),n.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&bx(this._data,this),t._stacked&&sc(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(xt(n)){const s=this._cachedMeta;this._data=ete(n,s)}else if(r!==n){if(r){bx(r,this);const s=this._cachedMeta;sc(s),s._parsed=[]}n&&Object.isExtensible(n)&&aee(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let s=!1;this._dataCheck();const i=n._stacked;n._stacked=ev(n.vScale,n),n.stack!==r.stack&&(s=!0,sc(n),n.stack=r.stack),this._resyncElements(t),(s||i!==n._stacked)&&(Lx(this,n._parsed),n._stacked=ev(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:s}=this,{iScale:i,_stacked:o}=r,a=i.axis;let l=t===0&&n===s.length?!0:r._sorted,u=t>0&&r._parsed[t-1],c,d,f;if(this._parsing===!1)r._parsed=s,r._sorted=!0,f=s;else{kn(s[t])?f=this.parseArrayData(r,s,t,n):xt(s[t])?f=this.parseObjectData(r,s,t,n):f=this.parsePrimitiveData(r,s,t,n);const p=()=>d[a]===null||u&&d[a]<u[a];for(c=0;c<n;++c)r._parsed[c+t]=d=f[c],l&&(p()&&(l=!1),u=d);r._sorted=l}o&&Lx(this,f)}parsePrimitiveData(t,n,r,s){const{iScale:i,vScale:o}=t,a=i.axis,l=o.axis,u=i.getLabels(),c=i===o,d=new Array(s);let f,p,g;for(f=0,p=s;f<p;++f)g=f+r,d[f]={[a]:c||i.parse(u[g],g),[l]:o.parse(n[g],g)};return d}parseArrayData(t,n,r,s){const{xScale:i,yScale:o}=t,a=new Array(s);let l,u,c,d;for(l=0,u=s;l<u;++l)c=l+r,d=n[c],a[l]={x:i.parse(d[0],c),y:o.parse(d[1],c)};return a}parseObjectData(t,n,r,s){const{xScale:i,yScale:o}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,u=new Array(s);let c,d,f,p;for(c=0,d=s;c<d;++c)f=c+r,p=n[f],u[c]={x:i.parse(bu(p,a),f),y:o.parse(bu(p,l),f)};return u}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){const s=this.chart,i=this._cachedMeta,o=n[t.axis],a={keys:TM(s,!0),values:n._stacks[t.axis]._visualValues};return Mx(a,o,i.index,{mode:r})}updateRangeFromParsed(t,n,r,s){const i=r[n.axis];let o=i===null?NaN:i;const a=s&&r._stacks[n.axis];s&&a&&(s.values=a,o=Mx(s,i,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,n){const r=this._cachedMeta,s=r._parsed,i=r._sorted&&t===r.iScale,o=s.length,a=this._getOtherScale(t),l=ote(n,r,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:d}=nte(a);let f,p;function g(){p=s[f];const m=p[a.axis];return!hs(p[t.axis])||c>m||d<m}for(f=0;f<o&&!(!g()&&(this.updateRangeFromParsed(u,t,p,l),i));++f);if(i){for(f=o-1;f>=0;--f)if(!g()){this.updateRangeFromParsed(u,t,p,l);break}}return u}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let s,i,o;for(s=0,i=n.length;s<i;++s)o=n[s][t.axis],hs(o)&&r.push(o);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,r=n.iScale,s=n.vScale,i=this.getParsed(t);return{label:r?""+r.getLabelForValue(i[r.axis]):"",value:s?""+s.getLabelForValue(i[s.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=Zee(At(this.options.clip,Jee(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,r=this._cachedMeta,s=r.data||[],i=n.chartArea,o=[],a=this._drawStart||0,l=this._drawCount||s.length-a,u=this.options.drawActiveElementsOnTop;let c;for(r.dataset&&r.dataset.draw(t,i,a,l),c=a;c<a+l;++c){const d=s[c];d.hidden||(d.active&&u?o.push(d):d.draw(t,i))}for(c=0;c<o.length;++c)o[c].draw(t,i)}getStyle(t,n){const r=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,n,r){const s=this.getDataset();let i;if(t>=0&&t<this._cachedMeta.data.length){const o=this._cachedMeta.data[t];i=o.$context||(o.$context=ite(this.getContext(),t,o)),i.parsed=this.getParsed(t),i.raw=s.data[t],i.index=i.dataIndex=t}else i=this.$context||(this.$context=ste(this.chart.getContext(),this.index)),i.dataset=s,i.index=i.datasetIndex=this.index;return i.active=!!n,i.mode=r,i}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",r){const s=n==="active",i=this._cachedDataOpts,o=t+"-"+n,a=i[o],l=this.enableOptionSharing&&hd(r);if(a)return $x(a,l);const u=this.chart.config,c=u.datasetElementScopeKeys(this._type,t),d=s?[`${t}Hover`,"hover",t,""]:[t,""],f=u.getOptionScopes(this.getDataset(),c),p=Object.keys(gn.elements[t]),g=()=>this.getContext(r,s,n),m=u.resolveNamedOptions(f,p,g,d);return m.$shared&&(m.$shared=l,i[o]=Object.freeze($x(m,l))),m}_resolveAnimations(t,n,r){const s=this.chart,i=this._cachedDataOpts,o=`animation-${n}`,a=i[o];if(a)return a;let l;if(s.options.animation!==!1){const c=this.chart.config,d=c.datasetAnimationScopeKeys(this._type,n),f=c.getOptionScopes(this.getDataset(),d);l=c.createResolver(f,this.getContext(t,r,n))}const u=new CM(s,l&&l.animations);return l&&l._cacheable&&(i[o]=Object.freeze(u)),u}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||nv(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),s=this._sharedOptions,i=this.getSharedOptions(r),o=this.includeOptions(n,i)||i!==s;return this.updateSharedOptions(i,n,r),{sharedOptions:i,includeOptions:o}}updateElement(t,n,r,s){nv(s)?Object.assign(t,r):this._resolveAnimations(n,s).update(t,r)}updateSharedOptions(t,n,r){t&&!nv(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,s){t.active=s;const i=this.getStyle(n,s);this._resolveAnimations(n,r,s).update(t,{options:!s&&this.getSharedOptions(i)||i})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[a,l,u]of this._syncList)this[a](l,u);this._syncList=[];const s=r.length,i=n.length,o=Math.min(i,s);o&&this.parse(0,o),i>s?this._insertElements(s,i-s,t):i<s&&this._removeElements(i,s-i)}_insertElements(t,n,r=!0){const s=this._cachedMeta,i=s.data,o=t+n;let a;const l=u=>{for(u.length+=n,a=u.length-1;a>=o;a--)u[a]=u[a-n]};for(l(i),a=t;a<o;++a)i[a]=new this.dataElementType;this._parsing&&l(s._parsed),this.parse(t,n),r&&this.updateElements(i,t,n,"reset")}updateElements(t,n,r,s){}_removeElements(t,n){const r=this._cachedMeta;if(this._parsing){const s=r._parsed.splice(t,n);r._stacked&&sc(r,s)}r.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,r,s]=t;this[n](r,s)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}_e(Nc,"defaults",{}),_e(Nc,"datasetElementType",null),_e(Nc,"dataElementType",null);function ate(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let r=[];for(let s=0,i=n.length;s<i;s++)r=r.concat(n[s].controller.getAllParsedValues(e));e._cache.$bar=uM(r.sort((s,i)=>s-i))}return e._cache.$bar}function lte(e){const t=e.iScale,n=ate(t,e.type);let r=t._length,s,i,o,a;const l=()=>{o===32767||o===-32768||(hd(a)&&(r=Math.min(r,Math.abs(o-a)||r)),a=o)};for(s=0,i=n.length;s<i;++s)o=t.getPixelForValue(n[s]),l();for(a=void 0,s=0,i=t.ticks.length;s<i;++s)o=t.getPixelForTick(s),l();return r}function ute(e,t,n,r){const s=n.barThickness;let i,o;return Ft(s)?(i=t.min*n.categoryPercentage,o=n.barPercentage):(i=s*r,o=1),{chunk:i/r,ratio:o,start:t.pixels[e]-i/2}}function cte(e,t,n,r){const s=t.pixels,i=s[e];let o=e>0?s[e-1]:null,a=e<s.length-1?s[e+1]:null;const l=n.categoryPercentage;o===null&&(o=i-(a===null?t.end-t.start:a-i)),a===null&&(a=i+i-o);const u=i-(i-Math.min(o,a))/2*l;return{chunk:Math.abs(a-o)/2*l/r,ratio:n.barPercentage,start:u}}function dte(e,t,n,r){const s=n.parse(e[0],r),i=n.parse(e[1],r),o=Math.min(s,i),a=Math.max(s,i);let l=o,u=a;Math.abs(o)>Math.abs(a)&&(l=a,u=o),t[n.axis]=u,t._custom={barStart:l,barEnd:u,start:s,end:i,min:o,max:a}}function PM(e,t,n,r){return kn(e)?dte(e,t,n,r):t[n.axis]=n.parse(e,r),t}function Fx(e,t,n,r){const s=e.iScale,i=e.vScale,o=s.getLabels(),a=s===i,l=[];let u,c,d,f;for(u=n,c=n+r;u<c;++u)f=t[u],d={},d[s.axis]=a||s.parse(o[u],u),l.push(PM(f,d,i,u));return l}function rv(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function fte(e,t,n){return e!==0?Mo(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function hte(e){let t,n,r,s,i;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.base<e.y,n="bottom",r="top"),t?(s="end",i="start"):(s="start",i="end"),{start:n,end:r,reverse:t,top:s,bottom:i}}function pte(e,t,n,r){let s=t.borderSkipped;const i={};if(!s){e.borderSkipped=i;return}if(s===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:o,end:a,reverse:l,top:u,bottom:c}=hte(e);s==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?s=u:(n._bottom||0)===r?s=c:(i[Nx(c,o,a,l)]=!0,s=u)),i[Nx(s,o,a,l)]=!0,e.borderSkipped=i}function Nx(e,t,n,r){return r?(e=mte(e,t,n),e=Vx(e,n,t)):e=Vx(e,t,n),e}function mte(e,t,n){return e===t?n:e===n?t:e}function Vx(e,t,n){return e==="start"?t:e==="end"?n:e}function gte(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class bh extends Nc{parsePrimitiveData(t,n,r,s){return Fx(t,n,r,s)}parseArrayData(t,n,r,s){return Fx(t,n,r,s)}parseObjectData(t,n,r,s){const{iScale:i,vScale:o}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,u=i.axis==="x"?a:l,c=o.axis==="x"?a:l,d=[];let f,p,g,m;for(f=r,p=r+s;f<p;++f)m=n[f],g={},g[i.axis]=i.parse(bu(m,u),f),d.push(PM(bu(m,c),g,o,f));return d}updateRangeFromParsed(t,n,r,s){super.updateRangeFromParsed(t,n,r,s);const i=r._custom;i&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,i.min),t.max=Math.max(t.max,i.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:r,vScale:s}=n,i=this.getParsed(t),o=i._custom,a=rv(o)?"["+o.start+", "+o.end+"]":""+s.getLabelForValue(i[s.axis]);return{label:""+r.getLabelForValue(i[r.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,r,s){const i=s==="reset",{index:o,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),u=a.isHorizontal(),c=this._getRuler(),{sharedOptions:d,includeOptions:f}=this._getSharedOptions(n,s);for(let p=n;p<n+r;p++){const g=this.getParsed(p),m=i||Ft(g[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),y=this._calculateBarIndexPixels(p,c),_=(g._stacks||{})[a.axis],b={horizontal:u,base:m.base,enableBorderRadius:!_||rv(g._custom)||o===_._top||o===_._bottom,x:u?m.head:y.center,y:u?y.center:m.head,height:u?y.size:Math.abs(m.size),width:u?Math.abs(m.size):y.size};f&&(b.options=d||this.resolveDataElementOptions(p,t[p].active?"active":s));const x=b.options||t[p].options;pte(b,x,_,o),gte(b,x,c.ratio),this.updateElement(t[p],p,b,s)}}_getStacks(t,n){const{iScale:r}=this._cachedMeta,s=r.getMatchingVisibleMetas(this._type).filter(c=>c.controller.options.grouped),i=r.options.stacked,o=[],a=this._cachedMeta.controller.getParsed(n),l=a&&a[r.axis],u=c=>{const d=c._parsed.find(p=>p[r.axis]===l),f=d&&d[c.vScale.axis];if(Ft(f)||isNaN(f))return!0};for(const c of s)if(!(n!==void 0&&u(c))&&((i===!1||o.indexOf(c.stack)===-1||i===void 0&&c.stack===void 0)&&o.push(c.stack),c.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,r){const s=this._getStacks(t,r),i=n!==void 0?s.indexOf(n):-1;return i===-1?s.length-1:i}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,s=[];let i,o;for(i=0,o=n.data.length;i<o;++i)s.push(r.getPixelForValue(this.getParsed(i)[r.axis],i));const a=t.barThickness;return{min:a||lte(n),pixels:s,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:r,index:s},options:{base:i,minBarLength:o}}=this,a=i||0,l=this.getParsed(t),u=l._custom,c=rv(u);let d=l[n.axis],f=0,p=r?this.applyStack(n,l,r):d,g,m;p!==d&&(f=p-d,p=d),c&&(d=u.barStart,p=u.barEnd-u.barStart,d!==0&&Mo(d)!==Mo(u.barEnd)&&(f=0),f+=d);const y=!Ft(i)&&!c?i:f;let _=n.getPixelForValue(y);if(this.chart.getDataVisibility(t)?g=n.getPixelForValue(f+p):g=_,m=g-_,Math.abs(m)<o){m=fte(m,n,a)*o,d===a&&(_-=m/2);const b=n.getPixelForDecimal(0),x=n.getPixelForDecimal(1),C=Math.min(b,x),S=Math.max(b,x);_=Math.max(Math.min(_,S),C),g=_+m,r&&!c&&(l._stacks[n.axis]._visualValues[s]=n.getValueForPixel(g)-n.getValueForPixel(_))}if(_===n.getPixelForValue(a)){const b=Mo(m)*n.getLineWidthForValue(a)/2;_+=b,m-=b}return{size:m,base:_,head:g,center:g+m/2}}_calculateBarIndexPixels(t,n){const r=n.scale,s=this.options,i=s.skipNull,o=At(s.maxBarThickness,1/0);let a,l;if(n.grouped){const u=i?this._getStackCount(t):n.stackCount,c=s.barThickness==="flex"?cte(t,n,s,u):ute(t,n,s,u),d=this._getStackIndex(this.index,this._cachedMeta.stack,i?t:void 0);a=c.start+c.chunk*d+c.chunk/2,l=Math.min(o,c.chunk*c.ratio)}else a=r.getPixelForValue(this.getParsed(t)[r.axis],t),l=Math.min(o,n.min*n.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const t=this._cachedMeta,n=t.vScale,r=t.data,s=r.length;let i=0;for(;i<s;++i)this.getParsed(i)[n.axis]!==null&&!r[i].hidden&&r[i].draw(this._ctx)}}_e(bh,"id","bar"),_e(bh,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),_e(bh,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});function sa(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class D0{constructor(t){_e(this,"options");this.options=t||{}}static override(t){Object.assign(D0.prototype,t)}init(){}formats(){return sa()}parse(){return sa()}format(){return sa()}add(){return sa()}diff(){return sa()}startOf(){return sa()}endOf(){return sa()}}var vte={_date:D0};function yte(e,t,n,r){const{controller:s,data:i,_sorted:o}=e,a=s._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(a&&t===a.axis&&t!=="r"&&o&&i.length){const u=a._reversePixels?iee:yb;if(r){if(s._sharedOptions){const c=i[0],d=typeof c.getRange=="function"&&c.getRange(t);if(d){const f=u(i,t,n-d),p=u(i,t,n+d);return{lo:f.lo,hi:p.hi}}}}else{const c=u(i,t,n);if(l){const{vScale:d}=s._cachedMeta,{_parsed:f}=e,p=f.slice(0,c.lo+1).reverse().findIndex(m=>!Ft(m[d.axis]));c.lo-=Math.max(0,p);const g=f.slice(c.hi).findIndex(m=>!Ft(m[d.axis]));c.hi+=Math.max(0,g)}return c}}return{lo:0,hi:i.length-1}}function Gd(e,t,n,r,s){const i=e.getSortedVisibleDatasetMetas(),o=n[t];for(let a=0,l=i.length;a<l;++a){const{index:u,data:c}=i[a],{lo:d,hi:f}=yte(i[a],t,o,s);for(let p=d;p<=f;++p){const g=c[p];g.skip||r(g,u,p)}}}function bte(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,s){const i=t?Math.abs(r.x-s.x):0,o=n?Math.abs(r.y-s.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(o,2))}}function sv(e,t,n,r,s){const i=[];return!s&&!e.isPointInArea(t)||Gd(e,n,t,function(a,l,u){!s&&!vM(a,e.chartArea,0)||a.inRange(t.x,t.y,r)&&i.push({element:a,datasetIndex:l,index:u})},!0),i}function _te(e,t,n,r){let s=[];function i(o,a,l){const{startAngle:u,endAngle:c}=o.getProps(["startAngle","endAngle"],r),{angle:d}=tee(o,{x:t.x,y:t.y});ree(d,u,c)&&s.push({element:o,datasetIndex:a,index:l})}return Gd(e,n,t,i),s}function wte(e,t,n,r,s,i){let o=[];const a=bte(n);let l=Number.POSITIVE_INFINITY;function u(c,d,f){const p=c.inRange(t.x,t.y,s);if(r&&!p)return;const g=c.getCenterPoint(s);if(!(!!i||e.isPointInArea(g))&&!p)return;const y=a(t,g);y<l?(o=[{element:c,datasetIndex:d,index:f}],l=y):y===l&&o.push({element:c,datasetIndex:d,index:f})}return Gd(e,n,t,u),o}function iv(e,t,n,r,s,i){return!i&&!e.isPointInArea(t)?[]:n==="r"&&!r?_te(e,t,n,s):wte(e,t,n,r,s,i)}function Bx(e,t,n,r,s){const i=[],o=n==="x"?"inXRange":"inYRange";let a=!1;return Gd(e,n,t,(l,u,c)=>{l[o]&&l[o](t[n],s)&&(i.push({element:l,datasetIndex:u,index:c}),a=a||l.inRange(t.x,t.y,s))}),r&&!a?[]:i}var Ste={evaluateInteractionItems:Gd,modes:{index(e,t,n,r){const s=la(t,e),i=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?sv(e,s,i,r,o):iv(e,s,i,!1,r,o),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(u=>{const c=a[0].index,d=u.data[c];d&&!d.skip&&l.push({element:d,datasetIndex:u.index,index:c})}),l):[]},dataset(e,t,n,r){const s=la(t,e),i=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?sv(e,s,i,r,o):iv(e,s,i,!1,r,o);if(a.length>0){const l=a[0].datasetIndex,u=e.getDatasetMeta(l).data;a=[];for(let c=0;c<u.length;++c)a.push({element:u[c],datasetIndex:l,index:c})}return a},point(e,t,n,r){const s=la(t,e),i=n.axis||"xy",o=n.includeInvisible||!1;return sv(e,s,i,r,o)},nearest(e,t,n,r){const s=la(t,e),i=n.axis||"xy",o=n.includeInvisible||!1;return iv(e,s,i,n.intersect,r,o)},x(e,t,n,r){const s=la(t,e);return Bx(e,s,"x",n.intersect,r)},y(e,t,n,r){const s=la(t,e);return Bx(e,s,"y",n.intersect,r)}}};const RM=["left","top","right","bottom"];function ic(e,t){return e.filter(n=>n.pos===t)}function Ux(e,t){return e.filter(n=>RM.indexOf(n.pos)===-1&&n.box.axis===t)}function oc(e,t){return e.sort((n,r)=>{const s=t?r:n,i=t?n:r;return s.weight===i.weight?s.index-i.index:s.weight-i.weight})}function kte(e){const t=[];let n,r,s,i,o,a;for(n=0,r=(e||[]).length;n<r;++n)s=e[n],{position:i,options:{stack:o,stackWeight:a=1}}=s,t.push({index:n,box:s,pos:i,horizontal:s.isHorizontal(),weight:s.weight,stack:o&&i+o,stackWeight:a});return t}function xte(e){const t={};for(const n of e){const{stack:r,pos:s,stackWeight:i}=n;if(!r||!RM.includes(s))continue;const o=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=i}return t}function Ete(e,t){const n=xte(e),{vBoxMaxWidth:r,hBoxMaxHeight:s}=t;let i,o,a;for(i=0,o=e.length;i<o;++i){a=e[i];const{fullSize:l}=a.box,u=n[a.stack],c=u&&a.stackWeight/u.weight;a.horizontal?(a.width=c?c*r:l&&t.availableWidth,a.height=s):(a.width=r,a.height=c?c*s:l&&t.availableHeight)}return n}function Cte(e){const t=kte(e),n=oc(t.filter(u=>u.box.fullSize),!0),r=oc(ic(t,"left"),!0),s=oc(ic(t,"right")),i=oc(ic(t,"top"),!0),o=oc(ic(t,"bottom")),a=Ux(t,"x"),l=Ux(t,"y");return{fullSize:n,leftAndTop:r.concat(i),rightAndBottom:s.concat(l).concat(o).concat(a),chartArea:ic(t,"chartArea"),vertical:r.concat(s).concat(l),horizontal:i.concat(o).concat(a)}}function zx(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function IM(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function Tte(e,t,n,r){const{pos:s,box:i}=n,o=e.maxPadding;if(!xt(s)){n.size&&(e[s]-=n.size);const d=r[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?i.height:i.width),n.size=d.size/d.count,e[s]+=n.size}i.getPadding&&IM(o,i.getPadding());const a=Math.max(0,t.outerWidth-zx(o,e,"left","right")),l=Math.max(0,t.outerHeight-zx(o,e,"top","bottom")),u=a!==e.w,c=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:u,other:c}:{same:c,other:u}}function Pte(e){const t=e.maxPadding;function n(r){const s=Math.max(t[r]-e[r],0);return e[r]+=s,s}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function Rte(e,t){const n=t.maxPadding;function r(s){const i={left:0,top:0,right:0,bottom:0};return s.forEach(o=>{i[o]=Math.max(t[o],n[o])}),i}return r(e?["left","right"]:["top","bottom"])}function gc(e,t,n,r){const s=[];let i,o,a,l,u,c;for(i=0,o=e.length,u=0;i<o;++i){a=e[i],l=a.box,l.update(a.width||t.w,a.height||t.h,Rte(a.horizontal,t));const{same:d,other:f}=Tte(t,n,a,r);u|=d&&s.length,c=c||f,l.fullSize||s.push(a)}return u&&gc(s,t,n,r)||c}function Af(e,t,n,r,s){e.top=n,e.left=t,e.right=t+r,e.bottom=n+s,e.width=r,e.height=s}function Hx(e,t,n,r){const s=n.padding;let{x:i,y:o}=t;for(const a of e){const l=a.box,u=r[a.stack]||{count:1,placed:0,weight:1},c=a.stackWeight/u.weight||1;if(a.horizontal){const d=t.w*c,f=u.size||l.height;hd(u.start)&&(o=u.start),l.fullSize?Af(l,s.left,o,n.outerWidth-s.right-s.left,f):Af(l,t.left+u.placed,o,d,f),u.start=o,u.placed+=d,o=l.bottom}else{const d=t.h*c,f=u.size||l.width;hd(u.start)&&(i=u.start),l.fullSize?Af(l,i,s.top,f,n.outerHeight-s.bottom-s.top):Af(l,i,t.top+u.placed,f,d),u.start=i,u.placed+=d,i=l.right}}t.x=i,t.y=o}var ss={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;const s=ps(e.options.layout.padding),i=Math.max(t-s.width,0),o=Math.max(n-s.height,0),a=Cte(e.boxes),l=a.vertical,u=a.horizontal;It(e.boxes,m=>{typeof m.beforeLayout=="function"&&m.beforeLayout()});const c=l.reduce((m,y)=>y.box.options&&y.box.options.display===!1?m:m+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:s,availableWidth:i,availableHeight:o,vBoxMaxWidth:i/2/c,hBoxMaxHeight:o/2}),f=Object.assign({},s);IM(f,ps(r));const p=Object.assign({maxPadding:f,w:i,h:o,x:s.left,y:s.top},s),g=Ete(l.concat(u),d);gc(a.fullSize,p,d,g),gc(l,p,d,g),gc(u,p,d,g)&&gc(l,p,d,g),Pte(p),Hx(a.leftAndTop,p,d,g),p.x+=p.w,p.y+=p.h,Hx(a.rightAndBottom,p,d,g),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},It(a.chartArea,m=>{const y=m.box;Object.assign(y,e.chartArea),y.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class AM{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,s){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,s?Math.floor(n/s):r)}}isAttached(t){return!0}updateConfig(t){}}class Ite extends AM{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const _h="$chartjs",Ate={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},jx=e=>e===null||e==="";function Ote(e,t){const n=e.style,r=e.getAttribute("height"),s=e.getAttribute("width");if(e[_h]={initial:{height:r,width:s,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",jx(s)){const i=Ix(e,"width");i!==void 0&&(e.width=i)}if(jx(r))if(e.style.height==="")e.height=e.width/(t||2);else{const i=Ix(e,"height");i!==void 0&&(e.height=i)}return e}const OM=zee?{passive:!0}:!1;function Mte(e,t,n){e&&e.addEventListener(t,n,OM)}function Dte(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,OM)}function Lte(e,t){const n=Ate[e.type]||e.type,{x:r,y:s}=la(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:s!==void 0?s:null}}function xp(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function $te(e,t,n){const r=e.canvas,s=new MutationObserver(i=>{let o=!1;for(const a of i)o=o||xp(a.addedNodes,r),o=o&&!xp(a.removedNodes,r);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}function Fte(e,t,n){const r=e.canvas,s=new MutationObserver(i=>{let o=!1;for(const a of i)o=o||xp(a.removedNodes,r),o=o&&!xp(a.addedNodes,r);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}const md=new Map;let qx=0;function MM(){const e=window.devicePixelRatio;e!==qx&&(qx=e,md.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function Nte(e,t){md.size||window.addEventListener("resize",MM),md.set(e,t)}function Vte(e){md.delete(e),md.size||window.removeEventListener("resize",MM)}function Bte(e,t,n){const r=e.canvas,s=r&&M0(r);if(!s)return;const i=dM((a,l)=>{const u=s.clientWidth;n(a,l),u<s.clientWidth&&n()},window),o=new ResizeObserver(a=>{const l=a[0],u=l.contentRect.width,c=l.contentRect.height;u===0&&c===0||i(u,c)});return o.observe(s),Nte(e,i),o}function ov(e,t,n){n&&n.disconnect(),t==="resize"&&Vte(e)}function Ute(e,t,n){const r=e.canvas,s=dM(i=>{e.ctx!==null&&n(Lte(i,e))},e);return Mte(r,t,s),s}class zte extends AM{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(Ote(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[_h])return!1;const r=n[_h].initial;["height","width"].forEach(i=>{const o=r[i];Ft(o)?n.removeAttribute(i):n.setAttribute(i,o)});const s=r.style||{};return Object.keys(s).forEach(i=>{n.style[i]=s[i]}),n.width=n.width,delete n[_h],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const s=t.$proxies||(t.$proxies={}),o={attach:$te,detach:Fte,resize:Bte}[n]||Ute;s[n]=o(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),s=r[n];if(!s)return;({attach:ov,detach:ov,resize:ov}[n]||Dte)(t,n,s),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,s){return Uee(t,n,r,s)}isAttached(t){const n=t&&M0(t);return!!(n&&n.isConnected)}}function Hte(e){return!O0()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?Ite:zte}var Hf;let qu=(Hf=class{constructor(){_e(this,"x");_e(this,"y");_e(this,"active",!1);_e(this,"options");_e(this,"$animations")}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return wp(this.x)&&wp(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const s={};return t.forEach(i=>{s[i]=r[i]&&r[i].active()?r[i]._to:this[i]}),s}},_e(Hf,"defaults",{}),_e(Hf,"defaultRoutes"),Hf);function jte(e,t){const n=e.options.ticks,r=qte(e),s=Math.min(n.maxTicksLimit||r,r),i=n.major.enabled?Gte(t):[],o=i.length,a=i[0],l=i[o-1],u=[];if(o>s)return Kte(t,u,i,o/s),u;const c=Wte(i,t,s);if(o>0){let d,f;const p=o>1?Math.round((l-a)/(o-1)):null;for(Of(t,u,c,Ft(p)?0:a-p,a),d=0,f=o-1;d<f;d++)Of(t,u,c,i[d],i[d+1]);return Of(t,u,c,l,Ft(p)?t.length:l+p),u}return Of(t,u,c),u}function qte(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),s=e._maxLength/n;return Math.floor(Math.min(r,s))}function Wte(e,t,n){const r=Yte(e),s=t.length/n;if(!r)return Math.max(s,1);const i=XZ(r);for(let o=0,a=i.length-1;o<a;o++){const l=i[o];if(l>s)return l}return Math.max(s,1)}function Gte(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function Kte(e,t,n,r){let s=0,i=n[0],o;for(r=Math.ceil(r),o=0;o<e.length;o++)o===i&&(t.push(e[o]),s++,i=n[s*r])}function Of(e,t,n,r,s){const i=At(r,0),o=Math.min(At(s,e.length),e.length);let a=0,l,u,c;for(n=Math.ceil(n),s&&(l=s-r,n=l/Math.floor(l/n)),c=i;c<0;)a++,c=Math.round(i+a*n);for(u=Math.max(i,0);u<o;u++)u===c&&(t.push(e[u]),a++,c=Math.round(i+a*n))}function Yte(e){const t=e.length;let n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}const Xte=e=>e==="left"?"right":e==="right"?"left":e,Wx=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Gx=(e,t)=>Math.min(t||e,e);function Kx(e,t){const n=[],r=e.length/t,s=e.length;let i=0;for(;i<s;i+=r)n.push(e[Math.floor(i)]);return n}function Qte(e,t,n){const r=e.ticks.length,s=Math.min(t,r-1),i=e._startPixel,o=e._endPixel,a=1e-6;let l=e.getPixelForTick(s),u;if(!(n&&(r===1?u=Math.max(l-i,o-l):t===0?u=(e.getPixelForTick(1)-l)/2:u=(l-e.getPixelForTick(s-1))/2,l+=s<t?u:-u,l<i-a||l>o+a)))return l}function Jte(e,t){It(e,n=>{const r=n.gc,s=r.length/2;let i;if(s>t){for(i=0;i<s;++i)delete n.data[r[i]];r.splice(0,s)}})}function ac(e){return e.drawTicks?e.tickLength:0}function Yx(e,t){if(!e.display)return 0;const n=tr(e.font,t),r=ps(e.padding);return(kn(e.text)?e.text.length:1)*n.lineHeight+r.height}function Zte(e,t){return ju(e,{scale:t,type:"scale"})}function ene(e,t,n){return ju(e,{tick:n,index:t,type:"tick"})}function tne(e,t,n){let r=C0(e);return(n&&t!=="right"||!n&&t==="right")&&(r=Xte(r)),r}function nne(e,t,n,r){const{top:s,left:i,bottom:o,right:a,chart:l}=e,{chartArea:u,scales:c}=l;let d=0,f,p,g;const m=o-s,y=a-i;if(e.isHorizontal()){if(p=Yn(r,i,a),xt(n)){const _=Object.keys(n)[0],b=n[_];g=c[_].getPixelForValue(b)+m-t}else n==="center"?g=(u.bottom+u.top)/2+m-t:g=Wx(e,n,t);f=a-i}else{if(xt(n)){const _=Object.keys(n)[0],b=n[_];p=c[_].getPixelForValue(b)-y+t}else n==="center"?p=(u.left+u.right)/2-y+t:p=Wx(e,n,t);g=Yn(r,o,s),d=n==="left"?-Ts:Ts}return{titleX:p,titleY:g,maxWidth:f,rotation:d}}class Wu extends qu{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:r,_suggestedMax:s}=this;return t=Ws(t,Number.POSITIVE_INFINITY),n=Ws(n,Number.NEGATIVE_INFINITY),r=Ws(r,Number.POSITIVE_INFINITY),s=Ws(s,Number.NEGATIVE_INFINITY),{min:Ws(t,r),max:Ws(n,s),minDefined:hs(t),maxDefined:hs(n)}}getMinMax(t){let{min:n,max:r,minDefined:s,maxDefined:i}=this.getUserBounds(),o;if(s&&i)return{min:n,max:r};const a=this.getMatchingVisibleMetas();for(let l=0,u=a.length;l<u;++l)o=a[l].controller.getMinMax(this,t),s||(n=Math.min(n,o.min)),i||(r=Math.max(r,o.max));return n=i&&n>r?r:n,r=s&&n>r?n:r,{min:Ws(n,Ws(r,n)),max:Ws(r,Ws(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Xt(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:s,grace:i,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Cee(this,i,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?Kx(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=jte(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,t=!t),this._startPixel=n,this._endPixel=r,this._reversePixels=t,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Xt(this.options.afterUpdate,[this])}beforeSetDimensions(){Xt(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Xt(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Xt(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Xt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let r,s,i;for(r=0,s=t.length;r<s;r++)i=t[r],i.label=Xt(n.callback,[i.value,r,t],this)}afterTickToLabelConversion(){Xt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Xt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=Gx(this.ticks.length,t.ticks.maxTicksLimit),s=n.minRotation||0,i=n.maxRotation;let o=s,a,l,u;if(!this._isVisible()||!n.display||s>=i||r<=1||!this.isHorizontal()){this.labelRotation=s;return}const c=this._getLabelSizes(),d=c.widest.width,f=c.highest.height,p=Ps(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/r:p/(r-1),d+6>a&&(a=p/(r-(t.offset?.5:1)),l=this.maxHeight-ac(t.grid)-n.padding-Yx(t.title,this.chart.options.font),u=Math.sqrt(d*d+f*f),o=eee(Math.min(Math.asin(Ps((c.highest.height+6)/a,-1,1)),Math.asin(Ps(l/u,-1,1))-Math.asin(Ps(f/u,-1,1)))),o=Math.max(s,Math.min(i,o))),this.labelRotation=o}afterCalculateLabelRotation(){Xt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Xt(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:s,grid:i}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const l=Yx(s,n.options.font);if(a?(t.width=this.maxWidth,t.height=ac(i)+l):(t.height=this.maxHeight,t.width=ac(i)+l),r.display&&this.ticks.length){const{first:u,last:c,widest:d,highest:f}=this._getLabelSizes(),p=r.padding*2,g=ga(this.labelRotation),m=Math.cos(g),y=Math.sin(g);if(a){const _=r.mirror?0:y*d.width+m*f.height;t.height=Math.min(this.maxHeight,t.height+_+p)}else{const _=r.mirror?0:m*d.width+y*f.height;t.width=Math.min(this.maxWidth,t.width+_+p)}this._calculatePadding(u,c,y,m)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,s){const{ticks:{align:i,padding:o},position:a}=this.options,l=this.labelRotation!==0,u=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const c=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,p=0;l?u?(f=s*t.width,p=r*n.height):(f=r*t.height,p=s*n.width):i==="start"?p=n.width:i==="end"?f=t.width:i!=="inner"&&(f=t.width/2,p=n.width/2),this.paddingLeft=Math.max((f-c+o)*this.width/(this.width-c),0),this.paddingRight=Math.max((p-d+o)*this.width/(this.width-d),0)}else{let c=n.height/2,d=t.height/2;i==="start"?(c=0,d=t.height):i==="end"&&(c=n.height,d=0),this.paddingTop=c+o,this.paddingBottom=d+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Xt(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n<r;n++)Ft(t[n].label)&&(t.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=Kx(r,n)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,r){const{ctx:s,_longestTextCache:i}=this,o=[],a=[],l=Math.floor(n/Gx(n,r));let u=0,c=0,d,f,p,g,m,y,_,b,x,C,S;for(d=0;d<n;d+=l){if(g=t[d].label,m=this._resolveTickFontOptions(d),s.font=y=m.string,_=i[y]=i[y]||{data:{},gc:[]},b=m.lineHeight,x=C=0,!Ft(g)&&!kn(g))x=xx(s,_.data,_.gc,x,g),C=b;else if(kn(g))for(f=0,p=g.length;f<p;++f)S=g[f],!Ft(S)&&!kn(S)&&(x=xx(s,_.data,_.gc,x,S),C+=b);o.push(x),a.push(C),u=Math.max(x,u),c=Math.max(C,c)}Jte(i,n);const T=o.indexOf(u),P=a.indexOf(c),w=E=>({width:o[E]||0,height:a[E]||0});return{first:w(0),last:w(n-1),widest:w(T),highest:w(P),widths:o,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return see(this._alignToPixels?ra(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const r=n[t];return r.$context||(r.$context=ene(this.getContext(),t,r))}return this.$context||(this.$context=Zte(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=ga(this.labelRotation),r=Math.abs(Math.cos(n)),s=Math.abs(Math.sin(n)),i=this._getLabelSizes(),o=t.autoSkipPadding||0,a=i?i.widest.width+o:0,l=i?i.highest.height+o:0;return this.isHorizontal()?l*r>a*s?a/r:l/s:l*s<a*r?l/r:a/s}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,r=this.chart,s=this.options,{grid:i,position:o,border:a}=s,l=i.offset,u=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=ac(i),p=[],g=a.setContext(this.getContext()),m=g.display?g.width:0,y=m/2,_=function(U){return ra(r,U,m)};let b,x,C,S,T,P,w,E,I,O,R,M;if(o==="top")b=_(this.bottom),P=this.bottom-f,E=b-y,O=_(t.top)+y,M=t.bottom;else if(o==="bottom")b=_(this.top),O=t.top,M=_(t.bottom)-y,P=b+y,E=this.top+f;else if(o==="left")b=_(this.right),T=this.right-f,w=b-y,I=_(t.left)+y,R=t.right;else if(o==="right")b=_(this.left),I=t.left,R=_(t.right)-y,T=b+y,w=this.left+f;else if(n==="x"){if(o==="center")b=_((t.top+t.bottom)/2+.5);else if(xt(o)){const U=Object.keys(o)[0],K=o[U];b=_(this.chart.scales[U].getPixelForValue(K))}O=t.top,M=t.bottom,P=b+y,E=P+f}else if(n==="y"){if(o==="center")b=_((t.left+t.right)/2);else if(xt(o)){const U=Object.keys(o)[0],K=o[U];b=_(this.chart.scales[U].getPixelForValue(K))}T=b-y,w=T-f,I=t.left,R=t.right}const D=At(s.ticks.maxTicksLimit,d),F=Math.max(1,Math.ceil(d/D));for(x=0;x<d;x+=F){const U=this.getContext(x),K=i.setContext(U),Q=a.setContext(U),H=K.lineWidth,V=K.color,ee=Q.dash||[],q=Q.dashOffset,G=K.tickWidth,le=K.tickColor,ie=K.tickBorderDash||[],we=K.tickBorderDashOffset;C=Qte(this,x,l),C!==void 0&&(S=ra(r,C,H),u?T=w=I=R=S:P=E=O=M=S,p.push({tx1:T,ty1:P,tx2:w,ty2:E,x1:I,y1:O,x2:R,y2:M,width:H,color:V,borderDash:ee,borderDashOffset:q,tickWidth:G,tickColor:le,tickBorderDash:ie,tickBorderDashOffset:we}))}return this._ticksLength=d,this._borderValue=b,p}_computeLabelItems(t){const n=this.axis,r=this.options,{position:s,ticks:i}=r,o=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:u,padding:c,mirror:d}=i,f=ac(r.grid),p=f+c,g=d?-c:p,m=-ga(this.labelRotation),y=[];let _,b,x,C,S,T,P,w,E,I,O,R,M="middle";if(s==="top")T=this.bottom-g,P=this._getXAxisLabelAlignment();else if(s==="bottom")T=this.top+g,P=this._getXAxisLabelAlignment();else if(s==="left"){const F=this._getYAxisLabelAlignment(f);P=F.textAlign,S=F.x}else if(s==="right"){const F=this._getYAxisLabelAlignment(f);P=F.textAlign,S=F.x}else if(n==="x"){if(s==="center")T=(t.top+t.bottom)/2+p;else if(xt(s)){const F=Object.keys(s)[0],U=s[F];T=this.chart.scales[F].getPixelForValue(U)+p}P=this._getXAxisLabelAlignment()}else if(n==="y"){if(s==="center")S=(t.left+t.right)/2-p;else if(xt(s)){const F=Object.keys(s)[0],U=s[F];S=this.chart.scales[F].getPixelForValue(U)}P=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?M="top":l==="end"&&(M="bottom"));const D=this._getLabelSizes();for(_=0,b=a.length;_<b;++_){x=a[_],C=x.label;const F=i.setContext(this.getContext(_));w=this.getPixelForTick(_)+i.labelOffset,E=this._resolveTickFontOptions(_),I=E.lineHeight,O=kn(C)?C.length:1;const U=O/2,K=F.color,Q=F.textStrokeColor,H=F.textStrokeWidth;let V=P;o?(S=w,P==="inner"&&(_===b-1?V=this.options.reverse?"left":"right":_===0?V=this.options.reverse?"right":"left":V="center"),s==="top"?u==="near"||m!==0?R=-O*I+I/2:u==="center"?R=-D.highest.height/2-U*I+I:R=-D.highest.height+I/2:u==="near"||m!==0?R=I/2:u==="center"?R=D.highest.height/2-U*I:R=D.highest.height-O*I,d&&(R*=-1),m!==0&&!F.showLabelBackdrop&&(S+=I/2*Math.sin(m))):(T=w,R=(1-O)*I/2);let ee;if(F.showLabelBackdrop){const q=ps(F.backdropPadding),G=D.heights[_],le=D.widths[_];let ie=R-q.top,we=0-q.left;switch(M){case"middle":ie-=G/2;break;case"bottom":ie-=G;break}switch(P){case"center":we-=le/2;break;case"right":we-=le;break;case"inner":_===b-1?we-=le:_>0&&(we-=le/2);break}ee={left:we,top:ie,width:le+q.width,height:G+q.height,color:F.backdropColor}}y.push({label:C,font:E,textOffset:R,options:{rotation:m,color:K,strokeColor:Q,strokeWidth:H,textAlign:V,textBaseline:M,translation:[S,T],backdrop:ee}})}return y}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-ga(this.labelRotation))return t==="top"?"left":"right";let s="center";return n.align==="start"?s="left":n.align==="end"?s="right":n.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:r,mirror:s,padding:i}}=this.options,o=this._getLabelSizes(),a=t+i,l=o.widest.width;let u,c;return n==="left"?s?(c=this.right+i,r==="near"?u="left":r==="center"?(u="center",c+=l/2):(u="right",c+=l)):(c=this.right-a,r==="near"?u="right":r==="center"?(u="center",c-=l/2):(u="left",c=this.left)):n==="right"?s?(c=this.left+i,r==="near"?u="right":r==="center"?(u="center",c-=l/2):(u="left",c-=l)):(c=this.left+a,r==="near"?u="left":r==="center"?(u="center",c+=l/2):(u="right",c=this.right)):u="right",{textAlign:u,x:c}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:r,top:s,width:i,height:o}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,s,i,o),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const s=this.ticks.findIndex(i=>i.value===t);return s>=0?n.setContext(this.getContext(s)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let i,o;const a=(l,u,c)=>{!c.width||!c.color||(r.save(),r.lineWidth=c.width,r.strokeStyle=c.color,r.setLineDash(c.borderDash||[]),r.lineDashOffset=c.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(u.x,u.y),r.stroke(),r.restore())};if(n.display)for(i=0,o=s.length;i<o;++i){const l=s[i];n.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:r,grid:s}}=this,i=r.setContext(this.getContext()),o=r.display?i.width:0;if(!o)return;const a=s.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let u,c,d,f;this.isHorizontal()?(u=ra(t,this.left,o)-o/2,c=ra(t,this.right,a)+a/2,d=f=l):(d=ra(t,this.top,o)-o/2,f=ra(t,this.bottom,a)+a/2,u=c=l),n.save(),n.lineWidth=i.width,n.strokeStyle=i.color,n.beginPath(),n.moveTo(u,d),n.lineTo(c,f),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,s=this._computeLabelArea();s&&T0(r,s);const i=this.getLabelItems(t);for(const o of i){const a=o.options,l=o.font,u=o.label,c=o.textOffset;pd(r,u,0,c,l,a)}s&&P0(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:s}}=this;if(!r.display)return;const i=tr(r.font),o=ps(r.padding),a=r.align;let l=i.lineHeight/2;n==="bottom"||n==="center"||xt(n)?(l+=o.bottom,kn(r.text)&&(l+=i.lineHeight*(r.text.length-1))):l+=o.top;const{titleX:u,titleY:c,maxWidth:d,rotation:f}=nne(this,l,n,a);pd(t,r.text,0,0,i,{color:r.color,maxWidth:d,rotation:f,textAlign:tne(a,n,s),textBaseline:"middle",translation:[u,c]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,r=At(t.grid&&t.grid.z,-1),s=At(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Wu.prototype.draw?[{z:n,draw:i=>{this.draw(i)}}]:[{z:r,draw:i=>{this.drawBackground(),this.drawGrid(i),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:n,draw:i=>{this.drawLabels(i)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",s=[];let i,o;for(i=0,o=n.length;i<o;++i){const a=n[i];a[r]===this.id&&(!t||a.type===t)&&s.push(a)}return s}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return tr(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Mf{constructor(t,n,r){this.type=t,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let r;ine(n)&&(r=this.register(n));const s=this.items,i=t.id,o=this.scope+"."+i;if(!i)throw new Error("class does not have id: "+t);return i in s||(s[i]=t,rne(t,o,r),this.override&&gn.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const n=this.items,r=t.id,s=this.scope;r in n&&delete n[r],s&&r in gn[s]&&(delete gn[s][r],this.override&&delete Ya[r])}}function rne(e,t,n){const r=fd(Object.create(null),[n?gn.get(n):{},gn.get(t),e.defaults]);gn.set(t,r),e.defaultRoutes&&sne(t,e.defaultRoutes),e.descriptors&&gn.describe(t,e.descriptors)}function sne(e,t){Object.keys(t).forEach(n=>{const r=n.split("."),s=r.pop(),i=[e].concat(r).join("."),o=t[n].split("."),a=o.pop(),l=o.join(".");gn.route(i,s,l,a)})}function ine(e){return"id"in e&&"defaults"in e}class one{constructor(){this.controllers=new Mf(Nc,"datasets",!0),this.elements=new Mf(qu,"elements"),this.plugins=new Mf(Object,"plugins"),this.scales=new Mf(Wu,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(s=>{const i=r||this._getRegistryForType(s);r||i.isForType(s)||i===this.plugins&&s.id?this._exec(t,i,s):It(s,o=>{const a=r||this._getRegistryForType(o);this._exec(t,a,o)})})}_exec(t,n,r){const s=x0(t);Xt(r["before"+s],[],r),n[t](r),Xt(r["after"+s],[],r)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(t))return r}return this.plugins}_get(t,n,r){const s=n.get(t);if(s===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return s}}var Qs=new one;class ane{constructor(){this._init=[]}notify(t,n,r,s){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const i=s?this._descriptors(t).filter(s):this._descriptors(t),o=this._notify(i,t,n,r);return n==="afterDestroy"&&(this._notify(i,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,n,r,s){s=s||{};for(const i of t){const o=i.plugin,a=o[r],l=[n,s,i.options];if(Xt(a,l,o)===!1&&s.cancelable)return!1}return!0}invalidate(){Ft(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const r=t&&t.config,s=At(r.options&&r.options.plugins,{}),i=lne(r);return s===!1&&!n?[]:cne(t,i,s,n)}_notifyStateChanges(t){const n=this._oldCache||[],r=this._cache,s=(i,o)=>i.filter(a=>!o.some(l=>a.plugin.id===l.plugin.id));this._notify(s(n,r),t,"stop"),this._notify(s(r,n),t,"start")}}function lne(e){const t={},n=[],r=Object.keys(Qs.plugins.items);for(let i=0;i<r.length;i++)n.push(Qs.getPlugin(r[i]));const s=e.plugins||[];for(let i=0;i<s.length;i++){const o=s[i];n.indexOf(o)===-1&&(n.push(o),t[o.id]=!0)}return{plugins:n,localIds:t}}function une(e,t){return!t&&e===!1?null:e===!0?{}:e}function cne(e,{plugins:t,localIds:n},r,s){const i=[],o=e.getContext();for(const a of t){const l=a.id,u=une(r[l],s);u!==null&&i.push({plugin:a,options:dne(e.config,{plugin:a,local:n[l]},u,o)})}return i}function dne(e,{plugin:t,local:n},r,s){const i=e.pluginScopeKeys(t),o=e.getOptionScopes(r,i);return n&&t.defaults&&o.push(t.defaults),e.createResolver(o,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function _b(e,t){const n=gn.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function fne(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function hne(e,t){return e===t?"_index_":"_value_"}function Xx(e){if(e==="x"||e==="y"||e==="r")return e}function pne(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function wb(e,...t){if(Xx(e))return e;for(const n of t){const r=n.axis||pne(n.position)||e.length>1&&Xx(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Qx(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function mne(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return Qx(e,"x",n[0])||Qx(e,"y",n[0])}return{}}function gne(e,t){const n=Ya[e.type]||{scales:{}},r=t.scales||{},s=_b(e.type,t),i=Object.create(null);return Object.keys(r).forEach(o=>{const a=r[o];if(!xt(a))return console.error(`Invalid scale configuration for scale: ${o}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const l=wb(o,a,mne(o,e),gn.scales[a.type]),u=hne(l,s),c=n.scales||{};i[o]=Lc(Object.create(null),[{axis:l},a,c[l],c[u]])}),e.data.datasets.forEach(o=>{const a=o.type||e.type,l=o.indexAxis||_b(a,t),c=(Ya[a]||{}).scales||{};Object.keys(c).forEach(d=>{const f=fne(d,l),p=o[f+"AxisID"]||f;i[p]=i[p]||Object.create(null),Lc(i[p],[{axis:f},r[p],c[d]])})}),Object.keys(i).forEach(o=>{const a=i[o];Lc(a,[gn.scales[a.type],gn.scale])}),i}function DM(e){const t=e.options||(e.options={});t.plugins=At(t.plugins,{}),t.scales=gne(e,t)}function LM(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function vne(e){return e=e||{},e.data=LM(e.data),DM(e),e}const Jx=new Map,$M=new Set;function Df(e,t){let n=Jx.get(e);return n||(n=t(),Jx.set(e,n),$M.add(n)),n}const lc=(e,t,n)=>{const r=bu(t,n);r!==void 0&&e.add(r)};class yne{constructor(t){this._config=vne(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=LM(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),DM(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Df(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return Df(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return Df(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return Df(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let s=r.get(t);return(!s||n)&&(s=new Map,r.set(t,s)),s}getOptionScopes(t,n,r){const{options:s,type:i}=this,o=this._cachedScopes(t,r),a=o.get(n);if(a)return a;const l=new Set;n.forEach(c=>{t&&(l.add(t),c.forEach(d=>lc(l,t,d))),c.forEach(d=>lc(l,s,d)),c.forEach(d=>lc(l,Ya[i]||{},d)),c.forEach(d=>lc(l,gn,d)),c.forEach(d=>lc(l,bb,d))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),$M.has(n)&&o.set(n,u),u}chartOptionScopes(){const{options:t,type:n}=this;return[t,Ya[n]||{},gn.datasets[n]||{},{type:n},gn,bb]}resolveNamedOptions(t,n,r,s=[""]){const i={$shared:!0},{resolver:o,subPrefixes:a}=Zx(this._resolverCache,t,s);let l=o;if(_ne(o,n)){i.$shared=!1,r=Bo(r)?r():r;const u=this.createResolver(t,r,a);l=_u(o,r,u)}for(const u of n)i[u]=l[u];return i}createResolver(t,n,r=[""],s){const{resolver:i}=Zx(this._resolverCache,t,r);return xt(n)?_u(i,n,void 0,s):i}}function Zx(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const s=n.join();let i=r.get(s);return i||(i={resolver:R0(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(s,i)),i}const bne=e=>xt(e)&&Object.getOwnPropertyNames(e).some(t=>Bo(e[t]));function _ne(e,t){const{isScriptable:n,isIndexable:r}=_M(e);for(const s of t){const i=n(s),o=r(s),a=(o||i)&&e[s];if(i&&(Bo(a)||bne(a))||o&&kn(a))return!0}return!1}var wne="4.4.9";const Sne=["top","bottom","left","right","chartArea"];function eE(e,t){return e==="top"||e==="bottom"||Sne.indexOf(e)===-1&&t==="x"}function tE(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function nE(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Xt(n&&n.onComplete,[e],t)}function kne(e){const t=e.chart,n=t.options.animation;Xt(n&&n.onProgress,[e],t)}function FM(e){return O0()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const wh={},rE=e=>{const t=FM(e);return Object.values(wh).filter(n=>n.canvas===t).pop()};function xne(e,t,n){const r=Object.keys(e);for(const s of r){const i=+s;if(i>=t){const o=e[s];delete e[s],(n>0||i>t)&&(e[i+n]=o)}}}function Ene(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}var no;let Vm=(no=class{static register(...t){Qs.add(...t),sE()}static unregister(...t){Qs.remove(...t),sE()}constructor(t,n){const r=this.config=new yne(n),s=FM(t),i=rE(s);if(i)throw new Error("Canvas is already in use. Chart with ID '"+i.id+"' must be destroyed before the canvas with ID '"+i.canvas.id+"' can be reused.");const o=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||Hte(s)),this.platform.updateConfig(r);const a=this.platform.acquireContext(s,o.aspectRatio),l=a&&a.canvas,u=l&&l.height,c=l&&l.width;if(this.id=zZ(),this.ctx=a,this.canvas=l,this.width=c,this.height=u,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new ane,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=lee(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],wh[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}xi.listen(this,"complete",nE),xi.listen(this,"progress",kne),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:s,_aspectRatio:i}=this;return Ft(t)?n&&i?i:s?r/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Qs}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Rx(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ex(this.canvas,this.ctx),this}stop(){return xi.stop(this),this}resize(t,n){xi.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,s=this.canvas,i=r.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,t,n,i),a=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,Rx(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),Xt(r.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};It(n,(r,s)=>{r.id=s})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,s=Object.keys(r).reduce((o,a)=>(o[a]=!1,o),{});let i=[];n&&(i=i.concat(Object.keys(n).map(o=>{const a=n[o],l=wb(o,a),u=l==="r",c=l==="x";return{options:a,dposition:u?"chartArea":c?"bottom":"left",dtype:u?"radialLinear":c?"category":"linear"}}))),It(i,o=>{const a=o.options,l=a.id,u=wb(l,a),c=At(a.type,o.dtype);(a.position===void 0||eE(a.position,u)!==eE(o.dposition))&&(a.position=o.dposition),s[l]=!0;let d=null;if(l in r&&r[l].type===c)d=r[l];else{const f=Qs.getScale(c);d=new f({id:l,type:c,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(a,t)}),It(s,(o,a)=>{o||delete r[a]}),It(r,o=>{ss.configure(this,o,o.options),ss.addBox(this,o)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((s,i)=>s.index-i.index),r>n){for(let s=n;s<r;++s)this._destroyDatasetMeta(s);t.splice(n,r-n)}this._sortedMetasets=t.slice(0).sort(tE("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,s)=>{n.filter(i=>i===r._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,s;for(this._removeUnreferencedMetasets(),r=0,s=n.length;r<s;r++){const i=n[r];let o=this.getDatasetMeta(r);const a=i.type||this.config.type;if(o.type&&o.type!==a&&(this._destroyDatasetMeta(r),o=this.getDatasetMeta(r)),o.type=a,o.indexAxis=i.indexAxis||_b(a,this.options),o.order=i.order||0,o.index=r,o.label=""+i.label,o.visible=this.isDatasetVisible(r),o.controller)o.controller.updateIndex(r),o.controller.linkScales();else{const l=Qs.getController(a),{datasetElementType:u,dataElementType:c}=gn.datasets[a];Object.assign(l,{dataElementType:Qs.getElement(c),datasetElementType:u&&Qs.getElement(u)}),o.controller=new l(this,r),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){It(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const i=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let u=0,c=this.data.datasets.length;u<c;u++){const{controller:d}=this.getDatasetMeta(u),f=!s&&i.indexOf(d)===-1;d.buildOrUpdateElements(f),o=Math.max(+d.getMaxOverflow(),o)}o=this._minPadding=r.layout.autoPadding?o:0,this._updateLayout(o),s||It(i,u=>{u.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(tE("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){It(this.scales,t=>{ss.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!mx(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:s,count:i}of n){const o=r==="_removeElements"?-i:i;xne(t,s,o)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=i=>new Set(t.filter(o=>o[0]===i).map((o,a)=>a+","+o.splice(1).join(","))),s=r(0);for(let i=1;i<n;i++)if(!mx(s,r(i)))return;return Array.from(s).map(i=>i.split(",")).map(i=>({method:i[1],start:+i[2],count:+i[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;ss.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],It(this.boxes,s=>{r&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,i)=>{s._idx=i}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,Bo(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const r=this.getDatasetMeta(t),s={meta:r,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(r.controller._update(n),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(xi.has(this)?this.attached&&!xi.running(this)&&xi.start(this):(this.draw(),nE({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:s}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,s)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,r=[];let s,i;for(s=0,i=n.length;s<i;++s){const o=n[s];(!t||o.visible)&&r.push(o)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r={meta:t,index:t.index,cancelable:!0},s=Wee(this,t);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(s&&T0(n,s),t.controller.draw(),s&&P0(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return vM(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,s){const i=Ste.modes[n];return typeof i=="function"?i(this,t,r,s):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let s=r.filter(i=>i&&i._dataset===n).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(s)),s}getContext(){return this.$context||(this.$context=ju(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const s=r?"show":"hide",i=this.getDatasetMeta(t),o=i.controller._resolveAnimations(void 0,s);hd(n)?(i.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),o.update(i,{visible:r}),this.update(a=>a.datasetIndex===t?s:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),xi.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Ex(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete wh[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,r=(i,o)=>{n.addEventListener(this,i,o),t[i]=o},s=(i,o,a)=>{i.offsetX=o,i.offsetY=a,this._eventHandler(i)};It(this.options.events,i=>r(i,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,u)=>{n.addEventListener(this,l,u),t[l]=u},s=(l,u)=>{t[l]&&(n.removeEventListener(this,l,u),delete t[l])},i=(l,u)=>{this.canvas&&this.resize(l,u)};let o;const a=()=>{s("attach",a),this.attached=!0,this.resize(),r("resize",i),r("detach",o)};o=()=>{this.attached=!1,s("resize",i),this._stop(),this._resize(0,0),r("attach",a)},n.isAttached(this.canvas)?a():o()}unbindEvents(){It(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},It(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const s=r?"set":"remove";let i,o,a,l;for(n==="dataset"&&(i=this.getDatasetMeta(t[0].datasetIndex),i.controller["_"+s+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){o=t[a];const u=o&&this.getDatasetMeta(o.datasetIndex).controller;u&&u[s+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],r=t.map(({datasetIndex:i,index:o})=>{const a=this.getDatasetMeta(i);if(!a)throw new Error("No dataset found at index "+i);return{datasetIndex:i,element:a.data[o],index:o}});!yp(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const s=this.options.hover,i=(l,u)=>l.filter(c=>!u.some(d=>c.datasetIndex===d.datasetIndex&&c.index===d.index)),o=i(n,t),a=r?t:i(t,n);o.length&&this.updateHoverStyle(o,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},s=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,s)===!1)return;const i=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,s),(i||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:s=[],options:i}=this,o=n,a=this._getActiveElements(t,s,r,o),l=KZ(t),u=Ene(t,this._lastEvent,r,l);r&&(this._lastEvent=null,Xt(i.onHover,[t,a,this],this),l&&Xt(i.onClick,[t,a,this],this));const c=!yp(a,s);return(c||n)&&(this._active=a,this._updateHoverStyles(a,s,n)),this._lastEvent=u,c}_getActiveElements(t,n,r,s){if(t.type==="mouseout")return[];if(!r)return n;const i=this.options.hover;return this.getElementsAtEventForMode(t,i.mode,i,s)}},_e(no,"defaults",gn),_e(no,"instances",wh),_e(no,"overrides",Ya),_e(no,"registry",Qs),_e(no,"version",wne),_e(no,"getChart",rE),no);function sE(){return It(Vm.instances,e=>e._plugins.invalidate())}function NM(e,t){const{x:n,y:r,base:s,width:i,height:o}=e.getProps(["x","y","base","width","height"],t);let a,l,u,c,d;return e.horizontal?(d=o/2,a=Math.min(n,s),l=Math.max(n,s),u=r-d,c=r+d):(d=i/2,a=n-d,l=n+d,u=Math.min(r,s),c=Math.max(r,s)),{left:a,top:u,right:l,bottom:c}}function Eo(e,t,n,r){return e?0:Ps(t,n,r)}function Cne(e,t,n){const r=e.options.borderWidth,s=e.borderSkipped,i=bM(r);return{t:Eo(s.top,i.top,0,n),r:Eo(s.right,i.right,0,t),b:Eo(s.bottom,i.bottom,0,n),l:Eo(s.left,i.left,0,t)}}function Tne(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),s=e.options.borderRadius,i=Bl(s),o=Math.min(t,n),a=e.borderSkipped,l=r||xt(s);return{topLeft:Eo(!l||a.top||a.left,i.topLeft,0,o),topRight:Eo(!l||a.top||a.right,i.topRight,0,o),bottomLeft:Eo(!l||a.bottom||a.left,i.bottomLeft,0,o),bottomRight:Eo(!l||a.bottom||a.right,i.bottomRight,0,o)}}function Pne(e){const t=NM(e),n=t.right-t.left,r=t.bottom-t.top,s=Cne(e,n/2,r/2),i=Tne(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:i},inner:{x:t.left+s.l,y:t.top+s.t,w:n-s.l-s.r,h:r-s.t-s.b,radius:{topLeft:Math.max(0,i.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,i.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,i.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,i.bottomRight-Math.max(s.b,s.r))}}}}function av(e,t,n,r){const s=t===null,i=n===null,a=e&&!(s&&i)&&NM(e,r);return a&&(s||Ml(t,a.left,a.right))&&(i||Ml(n,a.top,a.bottom))}function Rne(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function Ine(e,t){e.rect(t.x,t.y,t.w,t.h)}function lv(e,t,n={}){const r=e.x!==n.x?-t:0,s=e.y!==n.y?-t:0,i=(e.x+e.w!==n.x+n.w?t:0)-r,o=(e.y+e.h!==n.y+n.h?t:0)-s;return{x:e.x+r,y:e.y+s,w:e.w+i,h:e.h+o,radius:e.radius}}class Sh extends qu{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:n,options:{borderColor:r,backgroundColor:s}}=this,{inner:i,outer:o}=Pne(this),a=Rne(o.radius)?Sp:Ine;t.save(),(o.w!==i.w||o.h!==i.h)&&(t.beginPath(),a(t,lv(o,n,i)),t.clip(),a(t,lv(i,-n,o)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),a(t,lv(i,n)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,n,r){return av(this,t,n,r)}inXRange(t,n){return av(this,t,null,n)}inYRange(t,n){return av(this,null,t,n)}getCenterPoint(t){const{x:n,y:r,base:s,horizontal:i}=this.getProps(["x","y","base","horizontal"],t);return{x:i?(n+s)/2:n,y:i?r:(r+s)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}_e(Sh,"id","bar"),_e(Sh,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),_e(Sh,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});const iE=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},Ane=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class oE extends qu{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=Xt(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,s)=>t.sort(r,s,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,s=tr(r.font),i=s.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=iE(r,i);let u,c;n.font=s.string,this.isHorizontal()?(u=this.maxWidth,c=this._fitRows(o,i,a,l)+10):(c=this.maxHeight,u=this._fitCols(o,s,a,l)+10),this.width=Math.min(u,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,s){const{ctx:i,maxWidth:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],u=this.lineWidths=[0],c=s+a;let d=t;i.textAlign="left",i.textBaseline="middle";let f=-1,p=-c;return this.legendItems.forEach((g,m)=>{const y=r+n/2+i.measureText(g.text).width;(m===0||u[u.length-1]+y+2*a>o)&&(d+=c,u[u.length-(m>0?0:1)]=0,p+=c,f++),l[m]={left:0,top:p,row:f,width:y,height:s},u[u.length-1]+=y+a}),d}_fitCols(t,n,r,s){const{ctx:i,maxHeight:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],u=this.columnSizes=[],c=o-t;let d=a,f=0,p=0,g=0,m=0;return this.legendItems.forEach((y,_)=>{const{itemWidth:b,itemHeight:x}=One(r,n,i,y,s);_>0&&p+x+2*a>c&&(d+=f+a,u.push({width:f,height:p}),g+=f+a,m++,f=p=0),l[_]={left:g,top:p,col:m,width:b,height:x},f=Math.max(f,b),p+=x+a}),d+=f,u.push({width:f,height:p}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:s},rtl:i}}=this,o=Ul(i,this.left,this.width);if(this.isHorizontal()){let a=0,l=Yn(r,this.left+s,this.right-this.lineWidths[a]);for(const u of n)a!==u.row&&(a=u.row,l=Yn(r,this.left+s,this.right-this.lineWidths[a])),u.top+=this.top+t+s,u.left=o.leftForLtr(o.x(l),u.width),l+=u.width+s}else{let a=0,l=Yn(r,this.top+t+s,this.bottom-this.columnSizes[a].height);for(const u of n)u.col!==a&&(a=u.col,l=Yn(r,this.top+t+s,this.bottom-this.columnSizes[a].height)),u.top=l,u.left+=this.left+s,u.left=o.leftForLtr(o.x(u.left),u.width),l+=u.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;T0(t,this),this._draw(),P0(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:s}=this,{align:i,labels:o}=t,a=gn.color,l=Ul(t.rtl,this.left,this.width),u=tr(o.font),{padding:c}=o,d=u.size,f=d/2;let p;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=u.string;const{boxWidth:g,boxHeight:m,itemHeight:y}=iE(o,d),_=function(T,P,w){if(isNaN(g)||g<=0||isNaN(m)||m<0)return;s.save();const E=At(w.lineWidth,1);if(s.fillStyle=At(w.fillStyle,a),s.lineCap=At(w.lineCap,"butt"),s.lineDashOffset=At(w.lineDashOffset,0),s.lineJoin=At(w.lineJoin,"miter"),s.lineWidth=E,s.strokeStyle=At(w.strokeStyle,a),s.setLineDash(At(w.lineDash,[])),o.usePointStyle){const I={radius:m*Math.SQRT2/2,pointStyle:w.pointStyle,rotation:w.rotation,borderWidth:E},O=l.xPlus(T,g/2),R=P+f;gM(s,I,O,R,o.pointStyleWidth&&g)}else{const I=P+Math.max((d-m)/2,0),O=l.leftForLtr(T,g),R=Bl(w.borderRadius);s.beginPath(),Object.values(R).some(M=>M!==0)?Sp(s,{x:O,y:I,w:g,h:m,radius:R}):s.rect(O,I,g,m),s.fill(),E!==0&&s.stroke()}s.restore()},b=function(T,P,w){pd(s,w.text,T,P+y/2,u,{strikethrough:w.hidden,textAlign:l.textAlign(w.textAlign)})},x=this.isHorizontal(),C=this._computeTitleHeight();x?p={x:Yn(i,this.left+c,this.right-r[0]),y:this.top+c+C,line:0}:p={x:this.left+c,y:Yn(i,this.top+C+c,this.bottom-n[0].height),line:0},xM(this.ctx,t.textDirection);const S=y+c;this.legendItems.forEach((T,P)=>{s.strokeStyle=T.fontColor,s.fillStyle=T.fontColor;const w=s.measureText(T.text).width,E=l.textAlign(T.textAlign||(T.textAlign=o.textAlign)),I=g+f+w;let O=p.x,R=p.y;l.setWidth(this.width),x?P>0&&O+I+c>this.right&&(R=p.y+=S,p.line++,O=p.x=Yn(i,this.left+c,this.right-r[p.line])):P>0&&R+S>this.bottom&&(O=p.x=O+n[p.line].width+c,p.line++,R=p.y=Yn(i,this.top+C+c,this.bottom-n[p.line].height));const M=l.x(O);if(_(M,R,T),O=uee(E,O+g+f,x?O+I:this.right,t.rtl),b(l.x(O),R,T),x)p.x+=I+c;else if(typeof T.text!="string"){const D=u.lineHeight;p.y+=VM(T,D)+c}else p.y+=S}),EM(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=tr(n.font),s=ps(n.padding);if(!n.display)return;const i=Ul(t.rtl,this.left,this.width),o=this.ctx,a=n.position,l=r.size/2,u=s.top+l;let c,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),c=this.top+u,d=Yn(t.align,d,this.right-f);else{const g=this.columnSizes.reduce((m,y)=>Math.max(m,y.height),0);c=u+Yn(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}const p=Yn(a,d,d+f);o.textAlign=i.textAlign(C0(a)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=r.string,pd(o,n.text,p,c,r)}_computeTitleHeight(){const t=this.options.title,n=tr(t.font),r=ps(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,s,i;if(Ml(t,this.left,this.right)&&Ml(n,this.top,this.bottom)){for(i=this.legendHitBoxes,r=0;r<i.length;++r)if(s=i[r],Ml(t,s.left,s.left+s.width)&&Ml(n,s.top,s.top+s.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!Lne(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const s=this._hoveredItem,i=Ane(s,r);s&&!i&&Xt(n.onLeave,[t,s,this],this),this._hoveredItem=r,r&&!i&&Xt(n.onHover,[t,r,this],this)}else r&&Xt(n.onClick,[t,r,this],this)}}function One(e,t,n,r,s){const i=Mne(r,e,t,n),o=Dne(s,r,t.lineHeight);return{itemWidth:i,itemHeight:o}}function Mne(e,t,n,r){let s=e.text;return s&&typeof s!="string"&&(s=s.reduce((i,o)=>i.length>o.length?i:o)),t+n.size/2+r.measureText(s).width}function Dne(e,t,n){let r=e;return typeof t.text!="string"&&(r=VM(t,n)),r}function VM(e,t){const n=e.text?e.text.length:0;return t*n}function Lne(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var $ne={id:"legend",_element:oE,start(e,t,n){const r=e.legend=new oE({ctx:e.ctx,options:n,chart:e});ss.configure(e,r,n),ss.addBox(e,r)},stop(e){ss.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;ss.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,s=n.chart;s.isDatasetVisible(r)?(s.hide(r),t.hidden=!0):(s.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:s,color:i,useBorderRadius:o,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const u=l.controller.getStyle(n?0:void 0),c=ps(u.borderWidth);return{text:t[l.index].label,fillStyle:u.backgroundColor,fontColor:i,hidden:!l.visible,lineCap:u.borderCapStyle,lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:u.borderColor,pointStyle:r||u.pointStyle,rotation:u.rotation,textAlign:s||u.textAlign,borderRadius:o&&(a||u.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class BM extends qu{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const s=kn(r.text)?r.text.length:1;this._padding=ps(r.padding);const i=s*tr(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=i:this.width=i}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:s,right:i,options:o}=this,a=o.align;let l=0,u,c,d;return this.isHorizontal()?(c=Yn(a,r,i),d=n+t,u=i-r):(o.position==="left"?(c=r+t,d=Yn(a,s,n),l=sr*-.5):(c=i-t,d=Yn(a,n,s),l=sr*.5),u=s-n),{titleX:c,titleY:d,maxWidth:u,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=tr(n.font),i=r.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:u}=this._drawArgs(i);pd(t,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:u,textAlign:C0(n.align),textBaseline:"middle",translation:[o,a]})}}function Fne(e,t){const n=new BM({ctx:e.ctx,options:t,chart:e});ss.configure(e,n,t),ss.addBox(e,n),e.titleBlock=n}var Nne={id:"title",_element:BM,start(e,t,n){Fne(e,n)},stop(e){const t=e.titleBlock;ss.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;ss.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const vc={average(e){if(!e.length)return!1;let t,n,r=new Set,s=0,i=0;for(t=0,n=e.length;t<n;++t){const a=e[t].element;if(a&&a.hasValue()){const l=a.tooltipPosition();r.add(l.x),s+=l.y,++i}}return i===0||r.size===0?!1:{x:[...r].reduce((a,l)=>a+l)/r.size,y:s/i}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,s=Number.POSITIVE_INFINITY,i,o,a;for(i=0,o=e.length;i<o;++i){const l=e[i].element;if(l&&l.hasValue()){const u=l.getCenterPoint(),c=nee(t,u);c<s&&(s=c,a=l)}}if(a){const l=a.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function Ks(e,t){return t&&(kn(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Ei(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
86
|
+
`)>-1?e.split(`
|
|
87
|
+
`):e}function Vne(e,t){const{element:n,datasetIndex:r,index:s}=t,i=e.getDatasetMeta(r).controller,{label:o,value:a}=i.getLabelAndValue(s);return{chart:e,label:o,parsed:i.getParsed(s),raw:e.data.datasets[r].data[s],formattedValue:a,dataset:i.getDataset(),dataIndex:s,datasetIndex:r,element:n}}function aE(e,t){const n=e.chart.ctx,{body:r,footer:s,title:i}=e,{boxWidth:o,boxHeight:a}=t,l=tr(t.bodyFont),u=tr(t.titleFont),c=tr(t.footerFont),d=i.length,f=s.length,p=r.length,g=ps(t.padding);let m=g.height,y=0,_=r.reduce((C,S)=>C+S.before.length+S.lines.length+S.after.length,0);if(_+=e.beforeBody.length+e.afterBody.length,d&&(m+=d*u.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),_){const C=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=p*C+(_-p)*l.lineHeight+(_-1)*t.bodySpacing}f&&(m+=t.footerMarginTop+f*c.lineHeight+(f-1)*t.footerSpacing);let b=0;const x=function(C){y=Math.max(y,n.measureText(C).width+b)};return n.save(),n.font=u.string,It(e.title,x),n.font=l.string,It(e.beforeBody.concat(e.afterBody),x),b=t.displayColors?o+2+t.boxPadding:0,It(r,C=>{It(C.before,x),It(C.lines,x),It(C.after,x)}),b=0,n.font=c.string,It(e.footer,x),n.restore(),y+=g.width,{width:y,height:m}}function Bne(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function Une(e,t,n,r){const{x:s,width:i}=r,o=n.caretSize+n.caretPadding;if(e==="left"&&s+i+o>t.width||e==="right"&&s-i-o<0)return!0}function zne(e,t,n,r){const{x:s,width:i}=n,{width:o,chartArea:{left:a,right:l}}=e;let u="center";return r==="center"?u=s<=(a+l)/2?"left":"right":s<=i/2?u="left":s>=o-i/2&&(u="right"),Une(u,e,t,n)&&(u="center"),u}function lE(e,t,n){const r=n.yAlign||t.yAlign||Bne(e,n);return{xAlign:n.xAlign||t.xAlign||zne(e,t,n,r),yAlign:r}}function Hne(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function jne(e,t,n){let{y:r,height:s}=e;return t==="top"?r+=n:t==="bottom"?r-=s+n:r-=s/2,r}function uE(e,t,n,r){const{caretSize:s,caretPadding:i,cornerRadius:o}=e,{xAlign:a,yAlign:l}=n,u=s+i,{topLeft:c,topRight:d,bottomLeft:f,bottomRight:p}=Bl(o);let g=Hne(t,a);const m=jne(t,l,u);return l==="center"?a==="left"?g+=u:a==="right"&&(g-=u):a==="left"?g-=Math.max(c,f)+s:a==="right"&&(g+=Math.max(d,p)+s),{x:Ps(g,0,r.width-t.width),y:Ps(m,0,r.height-t.height)}}function Lf(e,t,n){const r=ps(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function cE(e){return Ks([],Ei(e))}function qne(e,t,n){return ju(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function dE(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const UM={beforeTitle:wi,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:wi,beforeBody:wi,beforeLabel:wi,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 Ft(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:wi,afterBody:wi,beforeFooter:wi,footer:wi,afterFooter:wi};function yr(e,t,n,r){const s=e[t].call(n,r);return typeof s>"u"?UM[t].call(n,r):s}var vv;let fE=(vv=class extends qu{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),s=r.enabled&&n.options.animation&&r.animations,i=new CM(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=qne(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,s=yr(r,"beforeTitle",this,t),i=yr(r,"title",this,t),o=yr(r,"afterTitle",this,t);let a=[];return a=Ks(a,Ei(s)),a=Ks(a,Ei(i)),a=Ks(a,Ei(o)),a}getBeforeBody(t,n){return cE(yr(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,s=[];return It(t,i=>{const o={before:[],lines:[],after:[]},a=dE(r,i);Ks(o.before,Ei(yr(a,"beforeLabel",this,i))),Ks(o.lines,yr(a,"label",this,i)),Ks(o.after,Ei(yr(a,"afterLabel",this,i))),s.push(o)}),s}getAfterBody(t,n){return cE(yr(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,s=yr(r,"beforeFooter",this,t),i=yr(r,"footer",this,t),o=yr(r,"afterFooter",this,t);let a=[];return a=Ks(a,Ei(s)),a=Ks(a,Ei(i)),a=Ks(a,Ei(o)),a}_createItems(t){const n=this._active,r=this.chart.data,s=[],i=[],o=[];let a=[],l,u;for(l=0,u=n.length;l<u;++l)a.push(Vne(this.chart,n[l]));return t.filter&&(a=a.filter((c,d,f)=>t.filter(c,d,f,r))),t.itemSort&&(a=a.sort((c,d)=>t.itemSort(c,d,r))),It(a,c=>{const d=dE(t.callbacks,c);s.push(yr(d,"labelColor",this,c)),i.push(yr(d,"labelPointStyle",this,c)),o.push(yr(d,"labelTextColor",this,c))}),this.labelColors=s,this.labelPointStyles=i,this.labelTextColors=o,this.dataPoints=a,a}update(t,n){const r=this.options.setContext(this.getContext()),s=this._active;let i,o=[];if(!s.length)this.opacity!==0&&(i={opacity:0});else{const a=vc[r.position].call(this,s,this._eventPosition);o=this._createItems(r),this.title=this.getTitle(o,r),this.beforeBody=this.getBeforeBody(o,r),this.body=this.getBody(o,r),this.afterBody=this.getAfterBody(o,r),this.footer=this.getFooter(o,r);const l=this._size=aE(this,r),u=Object.assign({},a,l),c=lE(this.chart,r,u),d=uE(r,u,c,this.chart);this.xAlign=c.xAlign,this.yAlign=c.yAlign,i={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=o,this.$context=void 0,i&&this._resolveAnimations().update(this,i),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,s){const i=this.getCaretPosition(t,r,s);n.lineTo(i.x1,i.y1),n.lineTo(i.x2,i.y2),n.lineTo(i.x3,i.y3)}getCaretPosition(t,n,r){const{xAlign:s,yAlign:i}=this,{caretSize:o,cornerRadius:a}=r,{topLeft:l,topRight:u,bottomLeft:c,bottomRight:d}=Bl(a),{x:f,y:p}=t,{width:g,height:m}=n;let y,_,b,x,C,S;return i==="center"?(C=p+m/2,s==="left"?(y=f,_=y-o,x=C+o,S=C-o):(y=f+g,_=y+o,x=C-o,S=C+o),b=y):(s==="left"?_=f+Math.max(l,c)+o:s==="right"?_=f+g-Math.max(u,d)-o:_=this.caretX,i==="top"?(x=p,C=x-o,y=_-o,b=_+o):(x=p+m,C=x+o,y=_+o,b=_-o),S=x),{x1:y,x2:_,x3:b,y1:x,y2:C,y3:S}}drawTitle(t,n,r){const s=this.title,i=s.length;let o,a,l;if(i){const u=Ul(r.rtl,this.x,this.width);for(t.x=Lf(this,r.titleAlign,r),n.textAlign=u.textAlign(r.titleAlign),n.textBaseline="middle",o=tr(r.titleFont),a=r.titleSpacing,n.fillStyle=r.titleColor,n.font=o.string,l=0;l<i;++l)n.fillText(s[l],u.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+a,l+1===i&&(t.y+=r.titleMarginBottom-a)}}_drawColorBox(t,n,r,s,i){const o=this.labelColors[r],a=this.labelPointStyles[r],{boxHeight:l,boxWidth:u}=i,c=tr(i.bodyFont),d=Lf(this,"left",i),f=s.x(d),p=l<c.lineHeight?(c.lineHeight-l)/2:0,g=n.y+p;if(i.usePointStyle){const m={radius:Math.min(u,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},y=s.leftForLtr(f,u)+u/2,_=g+l/2;t.strokeStyle=i.multiKeyBackground,t.fillStyle=i.multiKeyBackground,Cx(t,m,y,_),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,Cx(t,m,y,_)}else{t.lineWidth=xt(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const m=s.leftForLtr(f,u),y=s.leftForLtr(s.xPlus(f,1),u-2),_=Bl(o.borderRadius);Object.values(_).some(b=>b!==0)?(t.beginPath(),t.fillStyle=i.multiKeyBackground,Sp(t,{x:m,y:g,w:u,h:l,radius:_}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),Sp(t,{x:y,y:g+1,w:u-2,h:l-2,radius:_}),t.fill()):(t.fillStyle=i.multiKeyBackground,t.fillRect(m,g,u,l),t.strokeRect(m,g,u,l),t.fillStyle=o.backgroundColor,t.fillRect(y,g+1,u-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:s}=this,{bodySpacing:i,bodyAlign:o,displayColors:a,boxHeight:l,boxWidth:u,boxPadding:c}=r,d=tr(r.bodyFont);let f=d.lineHeight,p=0;const g=Ul(r.rtl,this.x,this.width),m=function(w){n.fillText(w,g.x(t.x+p),t.y+f/2),t.y+=f+i},y=g.textAlign(o);let _,b,x,C,S,T,P;for(n.textAlign=o,n.textBaseline="middle",n.font=d.string,t.x=Lf(this,y,r),n.fillStyle=r.bodyColor,It(this.beforeBody,m),p=a&&y!=="right"?o==="center"?u/2+c:u+2+c:0,C=0,T=s.length;C<T;++C){for(_=s[C],b=this.labelTextColors[C],n.fillStyle=b,It(_.before,m),x=_.lines,a&&x.length&&(this._drawColorBox(n,t,C,g,r),f=Math.max(d.lineHeight,l)),S=0,P=x.length;S<P;++S)m(x[S]),f=d.lineHeight;It(_.after,m)}p=0,f=d.lineHeight,It(this.afterBody,m),t.y-=i}drawFooter(t,n,r){const s=this.footer,i=s.length;let o,a;if(i){const l=Ul(r.rtl,this.x,this.width);for(t.x=Lf(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",o=tr(r.footerFont),n.fillStyle=r.footerColor,n.font=o.string,a=0;a<i;++a)n.fillText(s[a],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+r.footerSpacing}}drawBackground(t,n,r,s){const{xAlign:i,yAlign:o}=this,{x:a,y:l}=t,{width:u,height:c}=r,{topLeft:d,topRight:f,bottomLeft:p,bottomRight:g}=Bl(s.cornerRadius);n.fillStyle=s.backgroundColor,n.strokeStyle=s.borderColor,n.lineWidth=s.borderWidth,n.beginPath(),n.moveTo(a+d,l),o==="top"&&this.drawCaret(t,n,r,s),n.lineTo(a+u-f,l),n.quadraticCurveTo(a+u,l,a+u,l+f),o==="center"&&i==="right"&&this.drawCaret(t,n,r,s),n.lineTo(a+u,l+c-g),n.quadraticCurveTo(a+u,l+c,a+u-g,l+c),o==="bottom"&&this.drawCaret(t,n,r,s),n.lineTo(a+p,l+c),n.quadraticCurveTo(a,l+c,a,l+c-p),o==="center"&&i==="left"&&this.drawCaret(t,n,r,s),n.lineTo(a,l+d),n.quadraticCurveTo(a,l,a+d,l),n.closePath(),n.fill(),s.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,s=r&&r.x,i=r&&r.y;if(s||i){const o=vc[t.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=aE(this,t),l=Object.assign({},o,this._size),u=lE(n,t,l),c=uE(t,l,u,n);(s._to!==c.x||i._to!==c.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const s={width:this.width,height:this.height},i={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const o=ps(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(t.save(),t.globalAlpha=r,this.drawBackground(i,t,s,n),xM(t,n.textDirection),i.y+=o.top,this.drawTitle(i,t,n),this.drawBody(i,t,n),this.drawFooter(i,t,n),EM(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,s=t.map(({datasetIndex:a,index:l})=>{const u=this.chart.getDatasetMeta(a);if(!u)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:u.data[l],index:l}}),i=!yp(r,s),o=this._positionChanged(s,n);(i||o)&&(this._active=s,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,i=this._active||[],o=this._getActiveElements(t,i,n,r),a=this._positionChanged(o,t),l=n||!yp(o,i)||a;return l&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,s){const i=this.options;if(t.type==="mouseout")return[];if(!s)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const o=this.chart.getElementsAtEventForMode(t,i.mode,i,r);return i.reverse&&o.reverse(),o}_positionChanged(t,n){const{caretX:r,caretY:s,options:i}=this,o=vc[i.position].call(this,t,n);return o!==!1&&(r!==o.x||s!==o.y)}},_e(vv,"positioners",vc),vv);var Wne={id:"tooltip",_element:fE,positioners:vc,afterInit(e,t,n){n&&(e.tooltip=new fE({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:UM},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Gne=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function Kne(e,t,n,r){const s=e.indexOf(t);if(s===-1)return Gne(e,t,n,r);const i=e.lastIndexOf(t);return s!==i?n:s}const Yne=(e,t)=>e===null?null:Ps(Math.round(e),0,t);function hE(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Sb extends Wu{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:s,label:i}of n)r[s]===i&&r.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(Ft(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:Kne(r,t,At(n,t),this._addedLabels),Yne(n,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(s=this.getLabels().length-1)),this.min=r,this.max=s}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,s=[];let i=this.getLabels();i=t===0&&n===i.length-1?i:i.slice(t,n+1),this._valueRange=Math.max(i.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let o=t;o<=n;o++)s.push({value:o});return s}getLabelForValue(t){return hE.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}_e(Sb,"id","category"),_e(Sb,"defaults",{ticks:{callback:hE}});function Xne(e,t){const n=[],{bounds:s,step:i,min:o,max:a,precision:l,count:u,maxTicks:c,maxDigits:d,includeBounds:f}=e,p=i||1,g=c-1,{min:m,max:y}=t,_=!Ft(o),b=!Ft(a),x=!Ft(u),C=(y-m)/(d+1);let S=vx((y-m)/g/p)*p,T,P,w,E;if(S<1e-14&&!_&&!b)return[{value:m},{value:y}];E=Math.ceil(y/S)-Math.floor(m/S),E>g&&(S=vx(E*S/g/p)*p),Ft(l)||(T=Math.pow(10,l),S=Math.ceil(S*T)/T),s==="ticks"?(P=Math.floor(m/S)*S,w=Math.ceil(y/S)*S):(P=m,w=y),_&&b&&i&&JZ((a-o)/i,S/1e3)?(E=Math.round(Math.min((a-o)/S,c)),S=(a-o)/E,P=o,w=a):x?(P=_?o:P,w=b?a:w,E=u-1,S=(w-P)/E):(E=(w-P)/S,yh(E,Math.round(E),S/1e3)?E=Math.round(E):E=Math.ceil(E));const I=Math.max(yx(S),yx(P));T=Math.pow(10,Ft(l)?I:l),P=Math.round(P*T)/T,w=Math.round(w*T)/T;let O=0;for(_&&(f&&P!==o?(n.push({value:o}),P<o&&O++,yh(Math.round((P+O*S)*T)/T,o,pE(o,C,e))&&O++):P<o&&O++);O<E;++O){const R=Math.round((P+O*S)*T)/T;if(b&&R>a)break;n.push({value:R})}return b&&f&&w!==a?n.length&&yh(n[n.length-1].value,a,pE(a,C,e))?n[n.length-1].value=a:n.push({value:a}):(!b||w===a)&&n.push({value:w}),n}function pE(e,t,{horizontal:n,minRotation:r}){const s=ga(r),i=(n?Math.sin(s):Math.cos(s))||.001,o=.75*t*(""+e).length;return Math.min(t/i,o)}class Qne extends Wu{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return Ft(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:s,max:i}=this;const o=l=>s=n?s:l,a=l=>i=r?i:l;if(t){const l=Mo(s),u=Mo(i);l<0&&u<0?a(0):l>0&&u>0&&o(0)}if(s===i){let l=i===0?1:Math.abs(i*.05);a(i+l),t||o(s-l)}this.min=s,this.max=i}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,s;return r?(s=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),n=n||11),n&&(s=Math.min(n,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const s={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},i=this._range||this,o=Xne(s,i);return t.bounds==="ticks"&&ZZ(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const s=(r-n)/Math.max(t.length-1,1)/2;n-=s,r+=s}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return hM(t,this.chart.options.locale,this.options.ticks.format)}}class kb extends Qne{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=hs(t)?t:0,this.max=hs(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=ga(this.options.ticks.minRotation),s=(t?Math.sin(r):Math.cos(r))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,i.lineHeight/s))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}_e(kb,"id","linear"),_e(kb,"defaults",{ticks:{callback:mM.formatters.numeric}});const Bm={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},xr=Object.keys(Bm);function mE(e,t){return e-t}function gE(e,t){if(Ft(t))return null;const n=e._adapter,{parser:r,round:s,isoWeekday:i}=e._parseOpts;let o=t;return typeof r=="function"&&(o=r(o)),hs(o)||(o=typeof r=="string"?n.parse(o,r):n.parse(o)),o===null?null:(s&&(o=s==="week"&&(wp(i)||i===!0)?n.startOf(o,"isoWeek",i):n.startOf(o,s)),+o)}function vE(e,t,n,r){const s=xr.length;for(let i=xr.indexOf(e);i<s-1;++i){const o=Bm[xr[i]],a=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-t)/(a*o.size))<=r)return xr[i]}return xr[s-1]}function Jne(e,t,n,r,s){for(let i=xr.length-1;i>=xr.indexOf(n);i--){const o=xr[i];if(Bm[o].common&&e._adapter.diff(s,r,o)>=t-1)return o}return xr[n?xr.indexOf(n):0]}function Zne(e){for(let t=xr.indexOf(e)+1,n=xr.length;t<n;++t)if(Bm[xr[t]].common)return xr[t]}function yE(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:s}=E0(n,t),i=n[r]>=t?n[r]:n[s];e[i]=!0}}function ere(e,t,n,r){const s=e._adapter,i=+s.startOf(t[0].value,r),o=t[t.length-1].value;let a,l;for(a=i;a<=o;a=+s.add(a,1,r))l=n[a],l>=0&&(t[l].major=!0);return t}function bE(e,t,n){const r=[],s={},i=t.length;let o,a;for(o=0;o<i;++o)a=t[o],s[a]=o,r.push({value:a,major:!1});return i===0||!n?r:ere(e,r,s,n)}class Ep extends Wu{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const r=t.time||(t.time={}),s=this._adapter=new vte._date(t.adapters.date);s.init(n),Lc(r.displayFormats,s.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:gE(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:s,max:i,minDefined:o,maxDefined:a}=this.getUserBounds();function l(u){!o&&!isNaN(u.min)&&(s=Math.min(s,u.min)),!a&&!isNaN(u.max)&&(i=Math.max(i,u.max))}(!o||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),s=hs(s)&&!isNaN(s)?s:+n.startOf(Date.now(),r),i=hs(i)&&!isNaN(i)?i:+n.endOf(Date.now(),r)+1,this.min=Math.min(s,i-1),this.max=Math.max(s+1,i)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,s=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const i=this.min,o=this.max,a=oee(s,i,o);return this._unit=n.unit||(r.autoSkip?vE(n.minUnit,this.min,this.max,this._getLabelCapacity(i)):Jne(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:Zne(this._unit),this.initOffsets(s),t.reverse&&a.reverse(),bE(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,s,i;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),t.length===1?n=1-s:n=(this.getDecimalForValue(t[1])-s)/2,i=this.getDecimalForValue(t[t.length-1]),t.length===1?r=i:r=(i-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;n=Ps(n,0,o),r=Ps(r,0,o),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,s=this.options,i=s.time,o=i.unit||vE(i.minUnit,n,r,this._getLabelCapacity(n)),a=At(s.ticks.stepSize,1),l=o==="week"?i.isoWeekday:!1,u=wp(l)||l===!0,c={};let d=n,f,p;if(u&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,u?"day":o),t.diff(r,n,o)>1e5*a)throw new Error(n+" and "+r+" are too far apart with stepSize of "+a+" "+o);const g=s.ticks.source==="data"&&this.getDataTimestamps();for(f=d,p=0;f<r;f=+t.add(f,a,o),p++)yE(c,f,g);return(f===r||s.bounds==="ticks"||p===1)&&yE(c,f,g),Object.keys(c).sort(mE).map(m=>+m)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const s=this.options.time.displayFormats,i=this._unit,o=n||s[i];return this._adapter.format(t,o)}_tickFormatFunction(t,n,r,s){const i=this.options,o=i.ticks.callback;if(o)return Xt(o,[t,n,r],this);const a=i.time.displayFormats,l=this._unit,u=this._majorUnit,c=l&&a[l],d=u&&a[u],f=r[n],p=u&&d&&f&&f.major;return this._adapter.format(t,s||(p?d:c))}generateTickLabels(t){let n,r,s;for(n=0,r=t.length;n<r;++n)s=t[n],s.label=this._tickFormatFunction(s.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,r=this.ctx.measureText(t).width,s=ga(this.isHorizontal()?n.maxRotation:n.minRotation),i=Math.cos(s),o=Math.sin(s),a=this._resolveTickFontOptions(0).size;return{w:r*i+a*o,h:r*o+a*i}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,s=r[n.unit]||r.millisecond,i=this._tickFormatFunction(t,0,bE(this,[t],this._majorUnit),s),o=this._getLabelSize(i),a=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(n=0,r=s.length;n<r;++n)t=t.concat(s[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,r;if(t.length)return t;const s=this.getLabels();for(n=0,r=s.length;n<r;++n)t.push(gE(this,s[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return uM(t.sort(mE))}}_e(Ep,"id","time"),_e(Ep,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function $f(e,t,n){let r=0,s=e.length-1,i,o,a,l;n?(t>=e[r].pos&&t<=e[s].pos&&({lo:r,hi:s}=yb(e,"pos",t)),{pos:i,time:a}=e[r],{pos:o,time:l}=e[s]):(t>=e[r].time&&t<=e[s].time&&({lo:r,hi:s}=yb(e,"time",t)),{time:i,pos:a}=e[r],{time:o,pos:l}=e[s]);const u=o-i;return u?a+(l-a)*(t-i)/u:a}class _E extends Ep{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=$f(n,this.min),this._tableRange=$f(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,s=[],i=[];let o,a,l,u,c;for(o=0,a=t.length;o<a;++o)u=t[o],u>=n&&u<=r&&s.push(u);if(s.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(o=0,a=s.length;o<a;++o)c=s[o+1],l=s[o-1],u=s[o],Math.round((c+l)/2)!==u&&i.push({time:u,pos:o/(a-1)});return i}_generate(){const t=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((s,i)=>s-i)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return($f(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return $f(this._table,r*this._tableRange+this._minPos,!0)}}_e(_E,"id","timeseries"),_e(_E,"defaults",Ep.defaults);const zM={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},tre={ariaLabel:{type:String},ariaDescribedby:{type:String}},nre={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...zM,...tre},rre=hT[0]==="2"?(e,t)=>Object.assign(e,{attrs:t}):(e,t)=>Object.assign(e,t);function gl(e){return _d(e)?Be(e):e}function sre(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e;return _d(t)?new Proxy(e,{}):e}function ire(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function HM(e,t){e.labels=t}function jM(e,t,n){const r=[];e.datasets=t.map(s=>{const i=e.datasets.find(o=>o[n]===s[n]);return!i||!s.data||r.includes(i)?{...s}:(r.push(i),Object.assign(i,s),i)})}function ore(e,t){const n={labels:[],datasets:[]};return HM(n,e.labels),jM(n,e.datasets,t),n}const are=Le({props:nre,setup(e,t){let{expose:n,slots:r}=t;const s=j(null),i=Ie(null);n({chart:i});const o=()=>{if(!s.value)return;const{type:u,data:c,options:d,plugins:f,datasetIdKey:p}=e,g=ore(c,p),m=sre(g,c);i.value=new Vm(s.value,{type:u,data:m,options:{...d},plugins:f})},a=()=>{const u=Be(i.value);u&&(e.destroyDelay>0?setTimeout(()=>{u.destroy(),i.value=null},e.destroyDelay):(u.destroy(),i.value=null))},l=u=>{u.update(e.updateMode)};return bt(o),Bp(a),Ee([()=>e.options,()=>e.data],(u,c)=>{let[d,f]=u,[p,g]=c;const m=Be(i.value);if(!m)return;let y=!1;if(d){const _=gl(d),b=gl(p);_&&_!==b&&(ire(m,_),y=!0)}if(f){const _=gl(f.labels),b=gl(g.labels),x=gl(f.datasets),C=gl(g.datasets);_!==b&&(HM(m.config.data,_),y=!0),x&&x!==C&&(jM(m.config.data,x,e.datasetIdKey),y=!0)}y&&Mt(()=>{l(m)})},{deep:!0}),()=>pr("canvas",{role:"img",ariaLabel:e.ariaLabel,ariaDescribedby:e.ariaDescribedby,ref:s},[pr("p",{},[r.default?r.default():""])])}});function lre(e,t){return Vm.register(t),Le({props:zM,setup(n,r){let{expose:s}=r;const i=Ie(null),o=a=>{i.value=a==null?void 0:a.chart};return s({chart:i}),()=>pr(are,rre({ref:o},{type:e,...n}))}})}const ure=lre("bar",bh);function cre(e,t){const n=typeof e=="string"?In(e):e,r=dre(n,t);return{mounted:r,updated:r,unmounted(s){kT(null,s)}}}function dre(e,t){return function(n,r,s){var d,f,p;const i=typeof t=="function"?t(r):t,o=((d=r.value)==null?void 0:d.text)??r.value??(i==null?void 0:i.text),a=Dh(r.value)?r.value:{},l=()=>o??n.textContent,u=(s.ctx===r.instance.$?(f=fre(s,r.instance.$))==null?void 0:f.provides:(p=s.ctx)==null?void 0:p.provides)??r.instance.$.provides,c=pr(e,ge(i,a),l);c.appContext=Object.assign(Object.create(null),r.instance.$.appContext,{provides:u}),kT(c,n)}}function fre(e,t){const n=new Set,r=i=>{var o,a;for(const l of i){if(!l)continue;if(l===e||l.el&&e.el&&l.el===e.el)return!0;n.add(l);let u;if(l.suspense?u=r([l.ssContent]):Array.isArray(l.children)?u=r(l.children):(o=l.component)!=null&&o.vnode&&(u=r([(a=l.component)==null?void 0:a.subTree])),u)return u;n.delete(l)}return!1};if(!r([t.subTree]))return t;const s=Array.from(n).reverse();for(const i of s)if(i.component)return i.component;return t}const hre=cre(nt,e=>{var t;return{activator:"parent",location:(t=e.arg)==null?void 0:t.replace("-"," "),text:typeof e.value=="boolean"?void 0:e.value}}),pre={class:"ma-3"},mre={class:"ml-6"},gre={class:"ml-7 mt-3"},vre={key:0},yre={key:2},bre=Le({__name:"EmergencyCommands",setup(e){Vm.register(Sb,kb,Sh,Nne,Wne,$ne);const t=Wt(),n=j(!1),r=j(!1),s=j([]),i=j([]),o=j(NaN),a=j(NaN),l=j(NaN),u=j({labels:[],datasets:[{label:"OctoPrint Settings response times (ms)",data:[],borderColor:"#FF6384",backgroundColor:"#ffffff"}]}),c={color:"white",plugins:{title:{color:"red",text:"Response times (ms)",display:!0}},responsive:!0},d=A(()=>t.printers.length===0||t.printers.every(_=>!_.enabled)),f=A(()=>t.printers.length===0||t.printers.every(_=>!!_.enabled));async function p(){try{n.value=!0;const _=t.printers.map(T=>T.id),b=await Ol.batchSettingsGet(_),x=b.map(T=>{var P,w;return((w=(P=T.value)==null?void 0:P.appearance)==null?void 0:w.name)||"ERROR"});i.value=b.filter(T=>!T.success).map(T=>({message:T.error}));const C=b.map(T=>T.time),S=b.map(T=>{var P,w;return((w=(P=T.value)==null?void 0:P.appearance)==null?void 0:w.name)??""});o.value=C.reduce((T,P)=>T+P,0)/C.length,l.value=Math.min(...C),a.value=Math.max(...C),u.value={labels:S,datasets:[{label:"OctoPrint Settings response times (ms)",data:C,borderColor:"#FF6384",backgroundColor:"#ffffff"}]},r.value=!0,s.value=x}finally{n.value=!1}}async function g(_){if(confirm("Are you sure you want to toggle all printers?")){n.value=!0;try{await Ol.batchToggleEnabled(t.printers.map(b=>b.id),_)}finally{n.value=!1}}}async function m(){if(confirm("Are you sure you want to connect all USBs?"))try{await Ol.batchConnectUsb(t.printers.map(_=>_.id))}finally{n.value=!1}}async function y(){confirm("Are you sure you want to connect all sockets?")&&(n.value=!0,await Ol.batchConnectSocket(t.printers.map(_=>_.id)),n.value=!1)}return(_,b)=>($(),te(yt,null,{default:v(()=>[h(mr,{color:"primary"},{default:v(()=>[h(ut,null,{default:v(()=>[h(J,null,{default:v(()=>b[3]||(b[3]=[k("settings")])),_:1,__:[3]})]),_:1}),h(En,null,{default:v(()=>b[4]||(b[4]=[k(" Emergency Commands")])),_:1,__:[4]})]),_:1}),h(Bt,{lines:"three",subheader:""},{default:v(()=>[h(qr,null,{default:v(()=>b[5]||(b[5]=[k(" Emergency Commands to rectify problematic situations ")])),_:1,__:[5]}),h(Ve,null,{default:v(()=>[h(ct,null,{default:v(()=>b[6]||(b[6]=[k(" Batch disabling")])),_:1,__:[6]}),h(vt,null,{default:v(()=>[b[9]||(b[9]=k(" Disable all printers in batch (will not affect print) ")),b[10]||(b[10]=L("br",null,null,-1)),h(re,{disabled:n.value||d.value,class:"ml-4",color:"primary",onClick:b[0]||(b[0]=x=>g(!1))},{default:v(()=>b[7]||(b[7]=[k(" Batch disable ")])),_:1,__:[7]},8,["disabled"]),n.value?($(),te(ni,{key:0,class:"ml-2",indeterminate:"",size:"30",width:"4"})):pe("",!0),d.value?($(),te(J,{key:1,class:"ml-2",color:"warning"},{default:v(()=>b[8]||(b[8]=[k(" warning ")])),_:1,__:[8]})):pe("",!0)]),_:1,__:[9,10]})]),_:1}),h(Ve,null,{default:v(()=>[h(ct,null,{default:v(()=>b[11]||(b[11]=[k(" Batch enabling")])),_:1,__:[11]}),h(vt,null,{default:v(()=>[b[14]||(b[14]=k(" Enabling all printers in batch (will not affect print and it will skip printers in maintenance mode) ")),b[15]||(b[15]=L("br",null,null,-1)),h(re,{disabled:n.value||f.value,class:"ml-4",color:"primary",onClick:b[1]||(b[1]=x=>g(!0))},{default:v(()=>b[12]||(b[12]=[k(" Batch enable ")])),_:1,__:[12]},8,["disabled"]),n.value?($(),te(ni,{key:0,class:"ml-2",indeterminate:"",size:"30",width:"4"})):pe("",!0),f.value?Nt(($(),te(J,{key:1,class:"ml-2",color:"warning"},{default:v(()=>b[13]||(b[13]=[k("warning ")])),_:1,__:[13]})),[[hre,"No printers available",void 0,{bottom:!0}]]):pe("",!0)]),_:1,__:[14,15]})]),_:1}),h(Ve,null,{default:v(()=>[h(ct,null,{default:v(()=>b[16]||(b[16]=[k(" Batch USB connect")])),_:1,__:[16]}),h(vt,null,{default:v(()=>[b[19]||(b[19]=k(" Connect all USB devices ")),b[20]||(b[20]=L("br",null,null,-1)),h(re,{disabled:n.value||d.value,class:"ml-4",color:"primary",onClick:m},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>b[17]||(b[17]=[k("usb")])),_:1,__:[17]}),b[18]||(b[18]=k(" Connect USBs "))]),_:1,__:[18]},8,["disabled"]),n.value?($(),te(ni,{key:0,class:"ml-2",indeterminate:"",size:"30",width:"4"})):pe("",!0)]),_:1,__:[19,20]}),h(vt,{class:"mt-2"},{default:v(()=>[b[23]||(b[23]=k(" Connect all Sockets ")),b[24]||(b[24]=L("br",null,null,-1)),h(re,{disabled:n.value||d.value,class:"ml-4",color:"primary",onClick:y},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>b[21]||(b[21]=[k("hub")])),_:1,__:[21]}),b[22]||(b[22]=k(" Connect Sockets "))]),_:1,__:[22]},8,["disabled"])]),_:1,__:[23,24]}),n.value?($(),te(ni,{key:0,class:"ml-2",indeterminate:"",size:"30",width:"4"})):pe("",!0)]),_:1})]),_:1}),L("div",pre,[h(fn,null,{default:v(()=>b[25]||(b[25]=[k(" Test all OctoPrint response times")])),_:1,__:[25]}),L("div",mre,[h(re,{loading:n.value,color:"primary",onClick:b[2]||(b[2]=x=>p())},{default:v(()=>b[26]||(b[26]=[k(" Measure network response times ")])),_:1,__:[26]},8,["loading"])]),L("div",gre,[r.value?($(),ve("span",vre," Response times: ")):pe("",!0),r.value?($(),te(X(ure),{key:1,data:u.value,options:c,height:"100",style:{"background-color":"#272727"}},null,8,["data"])):($(),ve("span",yre,"A graph will be shown, presenting the times in milliseconds (ms)")),n.value?($(),te(ni,{key:3,class:"ml-2",indeterminate:"",size:"30",width:"4"})):pe("",!0)])])]),_:1}))}}),_re={class:"text-center"},wre=Le({__name:"NotFoundView",setup(e){const t=Ko(),n=()=>{t.go(-1)};return(r,s)=>($(),te(Hn,null,{default:v(()=>[s[6]||(s[6]=L("h2",{class:"text-center mt-lg-12"},"This page was not found.",-1)),s[7]||(s[7]=L("h1",{class:"text-center"},": (",-1)),s[8]||(s[8]=L("br",null,null,-1)),L("h4",_re,[h(re,{class:"align-center",color:"primary",to:"/",variant:"elevated"},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>s[1]||(s[1]=[k("home")])),_:1,__:[1]}),s[2]||(s[2]=k(" Go home "))]),_:1,__:[2]}),s[5]||(s[5]=L("span",{class:"pa-5"}," or ",-1)),h(re,{class:"align-center",variant:"elevated",onClick:s[0]||(s[0]=i=>n())},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>s[3]||(s[3]=[k("arrow_left")])),_:1,__:[3]}),s[4]||(s[4]=k(" Go back "))]),_:1,__:[4]})])]),_:1,__:[6,7,8]}))}}),Sre={key:0},kre={key:1},xre={key:2},Ere={key:3},Cre={key:4},Tre=Le({__name:"PermissionDenied",setup(e){const t=u2(),n=A(()=>t.query);return(r,s)=>($(),te(Hn,{"fill-height":"",fluid:""},{default:v(()=>[h(x2,{color:"primary"},{default:v(()=>[h(En,{class:"text-uppercase text-white"},{default:v(()=>s[0]||(s[0]=[L("span",{class:"font-weight-light"}," FDM ",-1),L("strong",null," Monster ",-1)])),_:1,__:[0]})]),_:1}),s[11]||(s[11]=L("img",{alt:"FDM Monster Background",class:"grid-bg-img align-content-center",src:y0,style:{opacity:"0.06"}},null,-1)),h(Im,{"align-center":"",column:"","justify-center":""},{default:v(()=>[h(yt,{class:"flex align-center justify-center pa-lg-16 pa-sm-10",style:{width:"80%"}},{default:v(()=>[h(sn,null,{default:v(()=>[h(J,{class:"mr-4",size:"50"},{default:v(()=>s[1]||(s[1]=[k(" lock ")])),_:1,__:[1]}),s[2]||(s[2]=L("h3",null,"Permission Denied",-1))]),_:1,__:[2]}),h(xm,{class:"mt-1"},{default:v(()=>s[3]||(s[3]=[k(" You do not have permission to access a specific resource on this page. ")])),_:1,__:[3]}),n.value?($(),te(en,{key:0},{default:v(()=>{var i,o;return[n.value.page?($(),ve("div",Sre,[s[4]||(s[4]=k(" Page: ")),L("strong",null,se((i=n.value)==null?void 0:i.page),1)])):pe("",!0),n.value.permissions?($(),ve("div",kre,[s[5]||(s[5]=k(" Required permission(s): ")),($(!0),ve(Ae,null,Gt(n.value.permissions,a=>($(),ve("strong",{key:a},se(a),1))),128))])):pe("",!0),n.value.roles?($(),ve("div",xre,[s[6]||(s[6]=k(" Usable roles: ")),L("strong",null,se((o=n.value.roles)==null?void 0:o.join(", ")),1)])):pe("",!0),n.value.url?($(),ve("div",Ere,[s[7]||(s[7]=k(" Problematic API path: ")),L("strong",null,se(n.value.url),1)])):pe("",!0),n.value.error?($(),ve("div",Cre,[s[8]||(s[8]=k(" Error: ")),L("strong",null,se(n.value.error),1)])):pe("",!0)]}),_:1})):pe("",!0),h(Mn,{class:"mt-6"},{default:v(()=>[h(re,{class:"align-center",color:"primary",to:"/",variant:"elevated"},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>s[9]||(s[9]=[k("home")])),_:1,__:[9]}),s[10]||(s[10]=k(" Go home "))]),_:1,__:[10]})]),_:1})]),_:1})]),_:1})]),_:1,__:[11]}))}}),Pre=Le({__name:"Logo",setup(e){return(t,n)=>($(),te(ds,{src:X(m0),class:"shrink mr-1 pt-3 ml-1",contain:"",style:{opacity:"0.85"},width:"150"},null,8,["src"]))}}),Rre=Le({__name:"LoginForm",setup(e){const t=us(),n=j(""),r=j(""),s=j(!1),i=j(""),o=Ko(),a=u2(),l=j(!1),u=Vr("auth:login"),c=Dt(),d=A(()=>{var m;return((m=r.value??"")==null?void 0:m.length)<3||(i.value??"").length<3});bt(async()=>{if(t.loadTokens(),await t.checkAuthenticationRequirements(),t.loginRequired===!1)return console.debug("LoginView, no login required, redirecting to",a.query.redirect,"or home"),u.emit(!0),await g();if(!t.hasRefreshToken)return;await t.verifyOrRefreshLoginOnceOrLogout()&&await g()});async function f(){return await o.push({name:qt.Registration})}async function p(){var m,y,_,b;try{l.value=!0,await t.login(r.value,i.value),t.lastLogoutReason=null,i.value="",l.value=!1}catch(x){if(l.value=!1,((m=x==null?void 0:x.response)==null?void 0:m.status)===401){i.value="";const C=(_=(y=x==null?void 0:x.response)==null?void 0:y.data)==null?void 0:_.reasonCode,S=l_(C);C===kr.AccountNotVerified?c.error(S,"Please ask your administrator to verify your account and try again."):C===kr.PasswordChangeRequired&&c.error(S,"Your password needs to be changed. This feature is sadly not finished"),n.value=S;return}c.openErrorMessage({title:"Error logging in",subtitle:"Please test your connection and try again."}),n.value="Error logging in - status code "+((b=x==null?void 0:x.response)==null?void 0:b.status),i.value="";return}return n.value="",u.emit(!0),await g()}async function g(){const m=a.query.redirect;if(m){console.debug("[LoginForm] Redirecting to ",m),await o.push({path:m});return}else{console.debug("[LoginForm] Redirecting to home"),await o.push({name:qt.Home});return}}return(m,y)=>($(),te(yt,{class:"pa-4",elevation:"10",style:{"border-radius":"10px"}},{default:v(()=>[h(en,null,{default:v(()=>[h(_0,null,{default:v(()=>[y[7]||(y[7]=L("label",null," Username ",-1)),h(st,{modelValue:r.value,"onUpdate:modelValue":y[0]||(y[0]=_=>r.value=_),"prepend-icon":"person",autofocus:"",label:"Username",name:"login",type:"text",variant:"underlined",onKeyup:y[1]||(y[1]=Av(_=>d.value||p(),["enter"]))},null,8,["modelValue"]),h(st,{modelValue:i.value,"onUpdate:modelValue":y[2]||(y[2]=_=>i.value=_),"append-inner-icon":s.value?"visibility_off":"visibility","onClick:appendInner":y[3]||(y[3]=_=>s.value=!s.value),type:s.value?"text":"password",label:"Password",name:"password",password:"","prepend-icon":"lock",variant:"underlined",onKeyup:y[4]||(y[4]=Av(_=>d.value||p(),["enter"]))},null,8,["modelValue","append-inner-icon","type"]),n.value?($(),te(fn,{key:0,class:"mt-6",color:"error",density:"compact",variant:"outlined"},{default:v(()=>[k(se(n.value),1)]),_:1})):pe("",!0),X(t).lastLogoutReason?($(),te(fn,{key:1,class:"mt-6",color:"error-darken-1",density:"compact",variant:"outlined"},{default:v(()=>[k(" Reason for automatic logout: "+se(X(t).lastLogoutReason),1)]),_:1})):pe("",!0)]),_:1,__:[7]})]),_:1}),h(Mn,null,{default:v(()=>[h(re,{loading:l.value,class:"pa-4",color:"primary",size:"lg",variant:"flat",style:{width:"100%"},onClick:y[5]||(y[5]=_=>p())},{default:v(()=>y[8]||(y[8]=[k(" Login ")])),_:1,__:[8]},8,["loading"])]),_:1}),h(Mn,null,{default:v(()=>[h(re,{disabled:!X(t).registration,class:"pa-4",size:"lg",variant:"flat",style:{width:"100%"},onClick:y[6]||(y[6]=_=>f())},{default:v(()=>[k(" Register new account "+se(X(t).registration?"":"(not enabled)")+" ",1),h(J,{class:"pl-5",icon:"right"})]),_:1},8,["disabled"])]),_:1})]),_:1}))}}),Ire={class:"d-flex align-center",style:{"min-height":"calc(100vh - 148px)"}},Are={class:"pt-6 pl-6 d-flex flex-column align-center"},Ore=Le({__name:"LoginView",setup(e){return(t,n)=>{const r=Pre;return $(),te(rt,{class:"position-relative","no-gutters":""},{default:v(()=>[h(ze,{cols:"12",lg:"12"},{default:v(()=>[h(Hn,null,{default:v(()=>[L("div",Ire,[h(rt,{justify:"center",class:"align-content-center"},{default:v(()=>[L("div",Are,[h(r),h(En,{class:"text-uppercase text-red"},{default:v(()=>n[0]||(n[0]=[L("strong",null," FDM ",-1),L("strong",null," Monster ",-1)])),_:1,__:[0]}),h(En,{class:"mt-lg-6 mt-sm-5 mb-md-5"},{default:v(()=>n[1]||(n[1]=[k(" Login to your account ")])),_:1,__:[1]}),h(xm,{class:"text-grey mb-md-5"},{default:v(()=>n[2]||(n[2]=[k(" Welcome back! Please enter your details ")])),_:1,__:[2]})]),h(ze,{cols:"12",md:"12"},{default:v(()=>[h(Rre,{class:"login-card"})]),_:1})]),_:1})])]),_:1})]),_:1})]),_:1})}}}),Mre={class:"d-flex flex-column align-center"},Dre=Le({__name:"RegistrationForm",setup(e){const t=us(),n=Ko(),r=j(""),s=j(""),i=j(!1),o=j(!1),a=j(""),l=j(""),u=j(!1),c=Dt();async function d(){return await n.push({name:qt.Login})}const f=A(()=>{var g;return((g=s.value??"")==null?void 0:g.length)<3||(a.value??"").length<3||a.value!=l.value});bt(async()=>{await t.logout(),await t.checkAuthenticationRequirements(),t.registration||(c.info("Registration is disabled, please contact your administrator"),await n.push({name:qt.Login}))});async function p(){var g;try{u.value=!0,await oa.registerAccount(s.value,a.value),u.value=!1}catch(m){if(u.value=!1,((g=m==null?void 0:m.response)==null?void 0:g.status)===401){r.value="Invalid credentials";return}c.openErrorMessage({title:"Error logging in",subtitle:"Please test your connection and try again."});return}r.value="",c.info("Account created, please login"),await d()}return(g,m)=>{const y=In("v-flex");return $(),te(Hn,{"fill-height":"",fluid:""},{default:v(()=>[h(Im,{"align-content-center":"","justify-center":""},{default:v(()=>[h(y,{class:"d-flex flex-column align-content-center",md4:"",sm8:"",style:{"max-width":"450px","margin-top":"10%"},xs12:""},{default:v(()=>[L("div",Mre,[h(ds,{src:require("@/assets/logo.png"),class:"shrink mr-1 pt-3 ml-1",contain:"",style:{opacity:"0.85"},width:"150"},null,8,["src"]),h(En,{class:"text-uppercase text-red"},{default:v(()=>m[8]||(m[8]=[L("strong",null," FDM ",-1),L("strong",null," Monster ",-1)])),_:1,__:[8]}),h(En,{class:"mt-lg-6 mt-sm-5"},{default:v(()=>m[9]||(m[9]=[k(" Register new account ")])),_:1,__:[9]}),h(xm,{class:"text-grey"},{default:v(()=>m[10]||(m[10]=[k(" Welcome! Please register your guest account ")])),_:1,__:[10]})]),h(yt,{class:"elevation-4 pa-4",style:{"border-radius":"10px"}},{default:v(()=>[h(en,null,{default:v(()=>[h(_0,null,{default:v(()=>[m[11]||(m[11]=L("label",null," Username ",-1)),h(st,{modelValue:s.value,"onUpdate:modelValue":m[0]||(m[0]=_=>s.value=_),rules:[_=>!!_||"Username is required",_=>((_==null?void 0:_.length)??0)>=3||"Username must be of length 3 or greater",_=>!_.toLowerCase().includes("admin")||"Username may not contain the word admin",_=>!_.toLowerCase().includes("root")||"Username may not contain the word root",_=>_.toLowerCase()!=="demo"||"Username may not equal the word demo"],autofocus:"",name:"login",label:"Username","prepend-icon":"person",type:"text"},null,8,["modelValue","rules"]),h(st,{id:"password",modelValue:a.value,"onUpdate:modelValue":m[1]||(m[1]=_=>a.value=_),"append-icon":i.value?"visibility":"visibility_off",type:i.value?"text":"password",label:"Password",name:"password",rules:[_=>!!_||"Password is required",_=>!!_&&(_==null?void 0:_.length)>=8||"Password must be of length 8 or greater"],password:"","prepend-icon":"lock","onClick:append":m[2]||(m[2]=_=>i.value=!i.value)},null,8,["modelValue","append-icon","type","rules"]),h(st,{id:"password",modelValue:l.value,"onUpdate:modelValue":m[3]||(m[3]=_=>l.value=_),"append-icon":o.value?"visibility":"visibility_off",type:o.value?"text":"password",rules:[_=>!!_||"Repeated password is required",_=>_===a.value||"Passwords are not equal"],label:"Repeated Password",name:"password",password:"","prepend-icon":"lock","onClick:append":m[4]||(m[4]=_=>o.value=!o.value),onKeyup:m[5]||(m[5]=Av(_=>f.value||p(),["enter"]))},null,8,["modelValue","append-icon","type","rules"]),r.value?($(),te(fn,{key:0,class:"mt-6",color:"error",density:"compact",variant:"outlined"},{default:v(()=>[k(se(r.value),1)]),_:1})):pe("",!0)]),_:1,__:[11]})]),_:1}),h(Mn,null,{default:v(()=>[h(re,{loading:u.value,class:"pa-4",color:"primary",size:"large",style:{width:"100%"},onClick:m[6]||(m[6]=_=>p())},{default:v(()=>m[12]||(m[12]=[k(" Register account ")])),_:1,__:[12]},8,["loading"])]),_:1}),h(Mn,null,{default:v(()=>[h(re,{style:{width:"100%"},class:"pa-4",size:"large",onClick:m[7]||(m[7]=_=>d())},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>m[13]||(m[13]=[k("arrow_left")])),_:1,__:[13]}),m[14]||(m[14]=k("Back to Login "))]),_:1,__:[14]})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}}}),Lre=Le({__name:"RegistrationView",setup(e){return(t,n)=>($(),te(Hn,{"fill-height":"",fluid:""},{default:v(()=>[h(Im,{"align-center":"","justify-center":""},{default:v(()=>[h(Dre)]),_:1})]),_:1}))}}),$re=["src"],Fre=Le({__name:"CameraGridView",setup(e){const t=Wt(),n=tn(nn.AddOrUpdateCameraDialog),s=Rm({queryKey:["cameraStream"],queryFn:async()=>(await hp.listCameraStreams()).map(c=>({printer:t.printers.find(d=>d.id===c.printerId),cameraStream:c}))}),i=jG({mutationFn:u=>hp.deleteCameraStream(u),onSuccess:()=>s.refetch()});function o(){n.openDialog({addOrUpdate:"add"})}function a(u){u&&n.openDialog({addOrUpdate:"update",cameraId:u})}function l(u){u&&i.mutateAsync(u)}return(u,c)=>($(),ve("div",null,[h(mr,null,{default:v(()=>[h(En,{class:"mr-4"},{default:v(()=>c[1]||(c[1]=[k(" Camera Overview ")])),_:1,__:[1]}),h(re,{color:"primary",onClick:c[0]||(c[0]=d=>o())},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>c[2]||(c[2]=[k("add")])),_:1,__:[2]}),c[3]||(c[3]=k(" Add camera "))]),_:1,__:[3]})]),_:1}),h(rt,{class:"ma-0"},{default:v(()=>[($(!0),ve(Ae,null,Gt(X(s).data.value,d=>($(),ve("div",{key:d.cameraStream.id,class:"ma-4",style:{border:"1px solid grey",margin:"0"},width:"300"},[h(yt,{class:"pb-2 pl-2 pr-2",width:"300"},{default:v(()=>{var f;return[h(sn,null,{default:v(()=>{var p;return[d.cameraStream.printerId?($(),te(J,{key:0,class:"mr-2",size:"small"},{default:v(()=>c[4]||(c[4]=[k(" print ")])),_:1,__:[4]})):($(),te(J,{key:1,class:"mr-2",size:"small"},{default:v(()=>c[5]||(c[5]=[k(" camera_alt ")])),_:1,__:[5]})),k(" "+se((d==null?void 0:d.cameraStream.name)??((p=d==null?void 0:d.printer)==null?void 0:p.name)??"Camera"),1)]}),_:2},1024),L("img",{src:(f=d.cameraStream)==null?void 0:f.streamURL,width:"100%"},null,8,$re),c[10]||(c[10]=L("br",null,null,-1)),h(re,{class:"mr-1",size:"small",onClick:p=>a(d.cameraStream.id)},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>c[6]||(c[6]=[k("edit")])),_:1,__:[6]}),c[7]||(c[7]=k(" Update "))]),_:2,__:[7]},1032,["onClick"]),h(re,{size:"small",onClick:p=>l(d.cameraStream.id)},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>c[8]||(c[8]=[k("delete")])),_:1,__:[8]}),c[9]||(c[9]=k(" Delete "))]),_:2,__:[9]},1032,["onClick"])]}),_:2,__:[10]},1024)]))),128))]),_:1})]))}}),Nre="/img/OIG.jpg";class Vre extends gr{static async postFirstTimeSetup(t){const n=Me.completeFirstTimeSetupRoute;return await this.post(n,t)}}const Bre={class:"mt-6 border_all"},Ure={class:"d-flex flex-row align-center"},zre={class:"d-flex flex-row align-center"},Hre={class:"d-flex flex-row align-center"},jre={class:"d-flex flex-row align-center"},qre={class:"mt-4"},Wre={class:"mt-4"},Gre={class:"mt-14"},Kre={class:"mb-5 mt-10"},Yre={class:"mt-14"},Xre=Le({__name:"FirstTimeSetupView",setup(e){const t=Ko(),n=Dt(),r=j(!1),s=us(),i=j({loginRequired:!0,registration:!1}),o=j({rootUsername:"admin",rootPassword:"",rootPassword2:""}),a=j(1);bt(async()=>{var c;await s.checkAuthenticationRequirements(),(c=s.wizardState)!=null&&c.wizardCompleted&&(n.info("Setup already completed."),s.loginRequired?await t.push({name:"Login"}):await t.push({name:"Home"}))});async function l(){if(!r.value){n.error("Please fill out all required fields.");return}const c=i.value,d=o.value;await Vre.postFirstTimeSetup({loginRequired:c.loginRequired,registration:c.registration,rootUsername:d.rootUsername,rootPassword:d.rootPassword}),n.openInfoMessage({title:"Setup completed"}),a.value=3}async function u(){await t.push({name:"Login"})}return(c,d)=>{const f=In("v-stepper-step"),p=In("v-stepper-content"),g=In("v-stepper-items");return $(),te(Hn,null,{default:v(()=>[d[46]||(d[46]=L("img",{alt:"FDM Monster Background",class:"grid-bg-img align-content-center",src:y0,style:{opacity:"0.08"}},null,-1)),h(MO,{modelValue:a.value,"onUpdate:modelValue":d[10]||(d[10]=m=>a.value=m),class:"bg-grey-darken-4"},{default:v(()=>[h(e0,null,{default:v(()=>[h(f,{complete:a.value>1,step:"1"},{default:v(()=>d[11]||(d[11]=[k(" Introduction ")])),_:1,__:[11]},8,["complete"]),h(dn),h(f,{complete:a.value>2,step:"2"},{default:v(()=>d[12]||(d[12]=[k(" Login and registration ")])),_:1,__:[12]},8,["complete"]),h(dn),h(f,{step:"3"},{default:v(()=>d[13]||(d[13]=[k(" Summary ")])),_:1,__:[13]})]),_:1}),h(g,null,{default:v(()=>[h(p,{class:"align-content-center align-center text-center",step:"1"},{default:v(()=>[d[17]||(d[17]=L("div",{class:"align-content-center align-center text-center"},[L("img",{class:"rounded-pill ma-4",src:Nre,style:{opacity:"0.7"},width:"400"}),k(" /> "),L("h1",null,"FDM Monster"),L("small",null," This server is still unconfigured. ")],-1)),h(re,{class:"mt-14 mb-14",color:"primary",onClick:d[0]||(d[0]=m=>a.value=2)},{default:v(()=>d[14]||(d[14]=[k(" Start Setup ")])),_:1,__:[14]}),L("div",Bre,[h(J,{class:"mr-6"},{default:v(()=>d[15]||(d[15]=[k("question_mark")])),_:1,__:[15]}),d[16]||(d[16]=L("small",null,[k(" If you have questions at any point, reach out on "),L("a",{href:"https://github.com/fdm-monster/fdm-monster/issues"}," Github "),k(" or on "),L("a",{href:"https://discord.gg/mwA8uP8CMc"}," Discord "),k(". ")],-1))])]),_:1,__:[17]}),h(p,{class:"align-content-center align-center text-center",step:"2"},{default:v(()=>[L("h4",null,[h(J,{class:"mr-2"},{default:v(()=>d[18]||(d[18]=[k("settings")])),_:1,__:[18]}),d[19]||(d[19]=k(" Login"))]),h(_0,{modelValue:r.value,"onUpdate:modelValue":d[6]||(d[6]=m=>r.value=m)},{default:v(()=>[h(gp,{modelValue:i.value.loginRequired,"onUpdate:modelValue":d[1]||(d[1]=m=>i.value.loginRequired=m),class:"mt-5"},{message:v(()=>[L("span",Ure,[h(J,{color:i.value.loginRequired?"success":"",disabled:!i.value.loginRequired,class:"ml-3 mr-3"},{default:v(()=>d[20]||(d[20]=[k(" check ")])),_:1,__:[20]},8,["color","disabled"]),d[21]||(d[21]=k(" Login is required. "))]),L("span",zre,[h(J,{color:i.value.loginRequired?"":"error",disabled:i.value.loginRequired,class:"ml-3 mr-3"},{default:v(()=>d[22]||(d[22]=[k(" close ")])),_:1,__:[22]},8,["color","disabled"]),d[23]||(d[23]=k(" No login is required. The admin role is assumed. "))])]),label:v(()=>d[24]||(d[24]=[k(" Enable Login ")])),_:1},8,["modelValue"]),i.value.loginRequired?pe("",!0):($(),te(fn,{key:0,color:"error-darken-4"},{default:v(()=>d[25]||(d[25]=[k(" You might be exposing your FDM Monster server publicly. Please take care evaluating the "),L("strong",null," Enable Login ",-1),k(" option. ")])),_:1,__:[25]})),h(gp,{modelValue:i.value.registration,"onUpdate:modelValue":d[2]||(d[2]=m=>i.value.registration=m),class:"mt-10 mb-10"},{message:v(()=>[L("span",Hre,[h(J,{color:i.value.registration?"success":"",disabled:!i.value.registration,class:"ml-3 mr-3"},{default:v(()=>d[26]||(d[26]=[k(" check ")])),_:1,__:[26]},8,["color","disabled"]),d[27]||(d[27]=k(" Accounts can be registered with a guest role. "))]),L("span",jre,[h(J,{color:i.value.registration?"":"error",disabled:i.value.registration,class:"ml-3 mr-3"},{default:v(()=>d[28]||(d[28]=[k(" close ")])),_:1,__:[28]},8,["color","disabled"]),d[29]||(d[29]=k(" No other accounts can be registered. "))])]),label:v(()=>d[30]||(d[30]=[k(" Enable Registration ")])),_:1},8,["modelValue"]),h(dn),L("h4",qre,[h(J,{class:"mr-2"},{default:v(()=>d[31]||(d[31]=[k("shield")])),_:1,__:[31]}),d[32]||(d[32]=k(" Admin account "))]),h(st,{modelValue:o.value.rootUsername,"onUpdate:modelValue":d[3]||(d[3]=m=>o.value.rootUsername=m),rules:[m=>!!m||"Username is required"],class:"mt-5",label:"Username","prepend-icon":"person"},{prepend:v(()=>[h(J,null,{default:v(()=>d[33]||(d[33]=[k("person")])),_:1,__:[33]})]),_:1},8,["modelValue","rules"]),h(st,{modelValue:o.value.rootPassword,"onUpdate:modelValue":d[4]||(d[4]=m=>o.value.rootPassword=m),type:"password","prepend-icon":"lock",rules:[m=>!!m||"Password is required",m=>!!m&&(m==null?void 0:m.length)>=8||"Password must be of length 8 or greater"],class:"mt-5",label:"Password"},{prepend:v(()=>[h(J,null,{default:v(()=>d[34]||(d[34]=[k("password")])),_:1,__:[34]})]),_:1},8,["modelValue","rules"]),h(st,{modelValue:o.value.rootPassword2,"onUpdate:modelValue":d[5]||(d[5]=m=>o.value.rootPassword2=m),type:"password","prepend-icon":"lock",rules:[m=>!!m||"Repeated password is required",m=>m===o.value.rootPassword||"Passwords are not equal"],class:"mt-5",label:"Repeated Password"},{prepend:v(()=>[h(J,null,{default:v(()=>d[35]||(d[35]=[k("password")])),_:1,__:[35]})]),_:1},8,["modelValue","rules"])]),_:1},8,["modelValue"]),L("div",Wre,[h(re,{class:"mr-4",onClick:d[7]||(d[7]=m=>a.value=1)},{default:v(()=>d[36]||(d[36]=[k(" Back ")])),_:1,__:[36]}),h(re,{disabled:!r.value,color:"primary",onClick:d[8]||(d[8]=m=>l())},{default:v(()=>d[37]||(d[37]=[k(" Verify & Submit ")])),_:1,__:[37]},8,["disabled"])]),h(dn,{class:"mt-4"}),L("div",Gre,[h(J,{class:"mr-6"},{default:v(()=>d[38]||(d[38]=[k("question_mark")])),_:1,__:[38]}),d[39]||(d[39]=L("small",null,[k(" If you have questions at any point, reach out on "),L("a",{href:"https://github.com/fdm-monster/fdm-monster/issues"}," Github "),k(" or on "),L("a",{href:"https://discord.gg/mwA8uP8CMc"}," Discord "),k(". ")],-1))])]),_:1}),h(p,{class:"align-content-center align-center text-center",step:"3"},{default:v(()=>[L("div",Kre,[h(J,{size:"100",class:"mr-5",color:"green circle"},{default:v(()=>d[40]||(d[40]=[k(" check_circle ")])),_:1,__:[40]}),d[41]||(d[41]=k(" Setup Completed "))]),d[45]||(d[45]=L("br",null,null,-1)),h(re,{color:"primary",class:"mr-4",onClick:d[9]||(d[9]=m=>u())},{default:v(()=>d[42]||(d[42]=[k(" Let's continue ")])),_:1,__:[42]}),L("div",Yre,[h(J,{class:"mr-6"},{default:v(()=>d[43]||(d[43]=[k("question_mark")])),_:1,__:[43]}),d[44]||(d[44]=L("small",null,[k(" If you have questions at any point, reach out on "),L("a",{href:"https://github.com/fdm-monster/fdm-monster/issues"}," Github "),k(" or on "),L("a",{href:"https://discord.gg/mwA8uP8CMc"}," Discord "),k(". ")],-1))])]),_:1,__:[45]})]),_:1})]),_:1},8,["modelValue"])]),_:1,__:[46]})}}}),Qre={class:"ml-4 mb-4"},Jre={class:"ml-4 mb-4"},Zre=Le({__name:"AccountSettings",setup(e){const t=Ns(),n=u0(),r=us(),s=Ko(),i=Dt(),o=j(),a=j(""),l=j({username:"",newPassword:"",oldPassword:"",repeatPassword:""});bt(async()=>{var d;await t.loadSettings(),o.value=(d=t.settings)==null?void 0:d.server.loginRequired,await n.getProfile(),l.value.username=n.username,a.value=n.userId});async function u(){var d,f;if(!((f=(d=a.value)==null?void 0:d.toString())!=null&&f.length)){i.openErrorMessage({title:"User not loaded"});return}await ts.changeUsername(a.value,l.value.username),await n.getProfile(),l.value.username=n.username,i.openInfoMessage({title:"Username changed"})}async function c(){var d,f;if(!((f=(d=a.value)==null?void 0:d.toString())!=null&&f.length)){i.openErrorMessage({title:"User not loaded"});return}if(l.value.newPassword!==l.value.repeatPassword){i.openErrorMessage({title:"Passwords do not match"});return}await ts.changePassword(a.value,l.value.oldPassword,l.value.newPassword),l.value.oldPassword="",l.value.newPassword="",l.value.repeatPassword="",i.openInfoMessage({title:"Password changed"}),await r.logout(!0),await c2(s)}return(d,f)=>{const p=In("v-list-item-content"),g=In("v-list-item-action-text");return $(),te(yt,null,{default:v(()=>[h(mr,{color:"primary"},{default:v(()=>[h(ut,null,{default:v(()=>[h(J,null,{default:v(()=>f[6]||(f[6]=[k("account_circle")])),_:1,__:[6]})]),_:1}),h(En,null,{default:v(()=>f[7]||(f[7]=[k(" Account Settings ")])),_:1,__:[7]})]),_:1}),h(Bt,{subheader:"",lines:"three"},{default:v(()=>[h(Ve,null,{default:v(()=>[o.value?pe("",!0):($(),te(p,{key:0},{default:v(()=>[h(fn,{color:"primary"},{default:v(()=>f[8]||(f[8]=[k(" Login is currently disabled. To adjust your username and password, please enable that setting at the Server Protection settings page. Then log in and visit this page. ")])),_:1,__:[8]})]),_:1}))]),_:1})]),_:1}),h(Bt,{subheader:"",lines:"three"},{default:v(()=>[h(Ve,null,{default:v(()=>[h(ct,null,{default:v(()=>f[9]||(f[9]=[k(" Username ")])),_:1,__:[9]}),h(g,null,{default:v(()=>[h(st,{modelValue:l.value.username,"onUpdate:modelValue":f[0]||(f[0]=m=>l.value.username=m),disabled:!o.value,label:"Fill in your username"},null,8,["modelValue","disabled"])]),_:1})]),_:1}),L("div",Qre,[h(re,{disabled:!o.value,color:"primary",onClick:f[1]||(f[1]=m=>u())},{default:v(()=>f[10]||(f[10]=[k(" Change username ")])),_:1,__:[10]},8,["disabled"])]),h(dn),f[14]||(f[14]=L("br",null,null,-1)),h(Ve,null,{default:v(()=>[h(ct,null,{default:v(()=>f[11]||(f[11]=[k(" Old Password ")])),_:1,__:[11]}),h(g,null,{default:v(()=>[h(st,{modelValue:l.value.oldPassword,"onUpdate:modelValue":f[2]||(f[2]=m=>l.value.oldPassword=m),disabled:!o.value,placeholder:"Old password",type:"password"},null,8,["modelValue","disabled"])]),_:1})]),_:1}),h(Ve,null,{default:v(()=>[h(ct,null,{default:v(()=>f[12]||(f[12]=[k(" New Password ")])),_:1,__:[12]}),h(g,null,{default:v(()=>[h(st,{modelValue:l.value.newPassword,"onUpdate:modelValue":f[3]||(f[3]=m=>l.value.newPassword=m),disabled:!o.value,placeholder:"New password",type:"password"},null,8,["modelValue","disabled"])]),_:1})]),_:1}),h(Ve,null,{default:v(()=>[h(ct,null,{default:v(()=>f[13]||(f[13]=[k(" Repeat New Password ")])),_:1,__:[13]}),h(g,null,{default:v(()=>[h(st,{modelValue:l.value.repeatPassword,"onUpdate:modelValue":f[4]||(f[4]=m=>l.value.repeatPassword=m),disabled:!o.value,placeholder:"Repeat new password",type:"password"},null,8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1,__:[14]}),L("div",Jre,[h(re,{disabled:!o.value,color:"primary",onClick:f[5]||(f[5]=m=>c())},{default:v(()=>f[15]||(f[15]=[k(" Change password ")])),_:1,__:[15]},8,["disabled"])]),h(dn)]),_:1})}}}),ese=Le({__name:"GridSettings",setup(e){return(t,n)=>($(),te(rt,null,{default:v(()=>[h(ze,{cols:"12"},{default:v(()=>[h(yt,null,{default:v(()=>[h(nM,{icon:"grid_on",title:"Grid"}),h(DO)]),_:1})]),_:1})]),_:1}))}}),tse=Le({__name:"ServerProtectionSettings",setup(e){const t=Ko(),n=Dt(),r=us(),s=j(""),i=j(!1),o=j(!1),a=j(3200),l=j(!1),u=j(-1),c=j(14);async function d(){var x;const _=await bn.getSettings();i.value=_.server.loginRequired,o.value=_.server.registration,s.value=((x=_.connection)==null?void 0:x.clientIp)??"127.0.0.1";const b=await bn.getSettingsSensitive();a.value=b.credentials.jwtExpiresIn/60,l.value=b.credentials.refreshTokenAttempts!==-1,u.value=b.credentials.refreshTokenAttempts,c.value=b.credentials.refreshTokenExpiry/24/3600}bt(async()=>{await d()});function f(){l.value||(u.value=-1)}async function p(){const _=i.value;!_&&!confirm("Disabling login will expose your server. Continue?")||(await bn.updateLoginRequiredSettings(_),await r.logout(!0),await r.checkAuthenticationRequirements(),_?await t.push({name:qt.Login}):await t.push({name:qt.Home}),n.info("Login Required settings updated"))}async function g(){await bn.updateRegistrationEnabledSettings(o.value),await r.checkAuthenticationRequirements(),n.info("Registration settings updated")}async function m(){a.value=120,l.value=!1,u.value=-1,c.value=14,await y(),n.info("Login expiry settings reset to default")}async function y(_=!0){if(a.value<2||a.value>120)throw new Error("JWT Expiry must be between 2 and 120 minutes");if(l.value&&(u.value<50||u.value>1e3))throw new Error("Refresh Token Attempts must be between 50 and 1000");if(c.value<1||c.value>30)throw new Error("Refresh Token Expiry must be between 1 and 30 days");await bn.updateCredentialSettings(a.value*60,u.value,c.value*24*3600),n.info("Login expiry settings updated")}return(_,b)=>($(),te(yt,null,{default:v(()=>[h(mr,{color:"primary"},{default:v(()=>[h(ut,null,{default:v(()=>[h(J,null,{default:v(()=>b[11]||(b[11]=[k("settings")])),_:1,__:[11]})]),_:1}),h(En,null,{default:v(()=>b[12]||(b[12]=[k(" Server Protection Settings ")])),_:1,__:[12]})]),_:1}),h(Bt,{lines:"three"},{default:v(()=>[h(Ve,null,{default:v(()=>[h(ct,null,{default:v(()=>b[13]||(b[13]=[k(" Login Required ")])),_:1,__:[13]}),h(vt,null,{default:v(()=>[h(rt,null,{default:v(()=>[h(ze,{cols:"12",md:"2"},{default:v(()=>[h(mn,{modelValue:i.value,"onUpdate:modelValue":b[0]||(b[0]=x=>i.value=x),label:"Require Login"},null,8,["modelValue"])]),_:1})]),_:1}),h(rt,null,{default:v(()=>[h(ze,null,{default:v(()=>[h(re,{color:"primary",onClick:b[1]||(b[1]=x=>p())},{default:v(()=>b[14]||(b[14]=[k(" save login required setting ")])),_:1,__:[14]})]),_:1})]),_:1})]),_:1})]),_:1}),h(Ve,null,{default:v(()=>[h(ct,null,{default:v(()=>b[15]||(b[15]=[k(" Registration Enabled ")])),_:1,__:[15]}),h(vt,null,{default:v(()=>[h(rt,null,{default:v(()=>[h(ze,{cols:"12",md:"2"},{default:v(()=>[h(mn,{modelValue:o.value,"onUpdate:modelValue":b[2]||(b[2]=x=>o.value=x),label:"Enable Registration"},null,8,["modelValue"])]),_:1})]),_:1}),h(rt,null,{default:v(()=>[h(ze,null,{default:v(()=>[h(re,{color:"primary",onClick:b[3]||(b[3]=x=>g())},{default:v(()=>b[16]||(b[16]=[k(" save registration enabled setting ")])),_:1,__:[16]})]),_:1})]),_:1})]),_:1})]),_:1}),h(Ve,null,{default:v(()=>[h(ct,null,{default:v(()=>b[17]||(b[17]=[k(" Login Expiry Settings (advanced) ")])),_:1,__:[17]}),h(vt,null,{default:v(()=>[h(rt,null,{default:v(()=>[h(ze,{cols:"12",md:"2"},{default:v(()=>[h(st,{modelValue:a.value,"onUpdate:modelValue":b[4]||(b[4]=x=>a.value=x),rules:[x=>!!x&&x>=2&&x<=120],label:"JWT Expiry (minutes)"},null,8,["modelValue","rules"])]),_:1})]),_:1}),h(rt,null,{default:v(()=>[h(ze,{cols:"12",md:"2"},{default:v(()=>[h(mn,{modelValue:l.value,"onUpdate:modelValue":[b[5]||(b[5]=x=>l.value=x),b[6]||(b[6]=x=>f())],label:"Enable Refresh Token Attempts"},null,8,["modelValue"])]),_:1})]),_:1}),h(rt,null,{default:v(()=>[h(ze,{cols:"12",md:"2"},{default:v(()=>[h(st,{modelValue:u.value,"onUpdate:modelValue":b[7]||(b[7]=x=>u.value=x),disabled:!l.value,rules:[x=>!!x&&x>=50],label:"Refresh Token Attempts (disabled: -1)",type:"number"},null,8,["modelValue","disabled","rules"])]),_:1})]),_:1}),h(rt,null,{default:v(()=>[h(ze,{cols:"12",md:"2"},{default:v(()=>[h(st,{modelValue:c.value,"onUpdate:modelValue":b[8]||(b[8]=x=>c.value=x),rules:[x=>!!x&&x>=1&&x<=30],label:"Refresh Token Expiry (days)"},null,8,["modelValue","rules"])]),_:1})]),_:1}),h(fn,{color:"secondary"},{default:v(()=>[h(J,null,{default:v(()=>b[18]||(b[18]=[k("info")])),_:1,__:[18]}),b[19]||(b[19]=k(" Be cautious, setting the wrong expiry could make you lose access to the server or make your user experience highly degraded! "))]),_:1,__:[19]}),h(rt,null,{default:v(()=>[h(ze,null,{default:v(()=>[h(re,{color:"primary",onClick:b[9]||(b[9]=x=>y())},{default:v(()=>b[20]||(b[20]=[k(" save login expiry settings ")])),_:1,__:[20]}),h(re,{color:"default",onClick:b[10]||(b[10]=x=>m())},{default:v(()=>b[21]||(b[21]=[k(" reset to default ")])),_:1,__:[21]})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}});var xb={exports:{}};const nse="2.0.0",qM=256,rse=Number.MAX_SAFE_INTEGER||9007199254740991,sse=16,ise=qM-6,ose=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var Um={MAX_LENGTH:qM,MAX_SAFE_COMPONENT_LENGTH:sse,MAX_SAFE_BUILD_LENGTH:ise,MAX_SAFE_INTEGER:rse,RELEASE_TYPES:ose,SEMVER_SPEC_VERSION:nse,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},uv={};const ase=typeof process=="object"&&uv&&uv.NODE_DEBUG&&/\bsemver\b/i.test(uv.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var zm=ase;(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:s}=Um,i=zm;t=e.exports={};const o=t.re=[],a=t.safeRe=[],l=t.src=[],u=t.safeSrc=[],c=t.t={};let d=0;const f="[a-zA-Z0-9-]",p=[["\\s",1],["\\d",s],[f,r]],g=y=>{for(const[_,b]of p)y=y.split(`${_}*`).join(`${_}{0,${b}}`).split(`${_}+`).join(`${_}{1,${b}}`);return y},m=(y,_,b)=>{const x=g(_),C=d++;i(y,C,_),c[y]=C,l[C]=_,u[C]=x,o[C]=new RegExp(_,b?"g":void 0),a[C]=new RegExp(x,b?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),m("MAINVERSION",`(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${l[c.NONNUMERICIDENTIFIER]}|${l[c.NUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${l[c.NONNUMERICIDENTIFIER]}|${l[c.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASE",`(?:-(${l[c.PRERELEASEIDENTIFIER]}(?:\\.${l[c.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${l[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[c.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${f}+`),m("BUILD",`(?:\\+(${l[c.BUILDIDENTIFIER]}(?:\\.${l[c.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${l[c.MAINVERSION]}${l[c.PRERELEASE]}?${l[c.BUILD]}?`),m("FULL",`^${l[c.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${l[c.MAINVERSIONLOOSE]}${l[c.PRERELEASELOOSE]}?${l[c.BUILD]}?`),m("LOOSE",`^${l[c.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${l[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${l[c.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:${l[c.PRERELEASE]})?${l[c.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:${l[c.PRERELEASELOOSE]})?${l[c.BUILD]}?)?)?`),m("XRANGE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),m("COERCE",`${l[c.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",l[c.COERCEPLAIN]+`(?:${l[c.PRERELEASE]})?(?:${l[c.BUILD]})?(?:$|[^\\d])`),m("COERCERTL",l[c.COERCE],!0),m("COERCERTLFULL",l[c.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${l[c.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",m("TILDE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${l[c.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",m("CARET",`^${l[c.LONECARET]}${l[c.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${l[c.LONECARET]}${l[c.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${l[c.GTLT]}\\s*(${l[c.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]}|${l[c.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${l[c.XRANGEPLAIN]})\\s+-\\s+(${l[c.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${l[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[c.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(xb,xb.exports);var Kd=xb.exports;const lse=Object.freeze({loose:!0}),use=Object.freeze({}),cse=e=>e?typeof e!="object"?lse:e:use;var L0=cse;const wE=/^[0-9]+$/,WM=(e,t)=>{const n=wE.test(e),r=wE.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1},dse=(e,t)=>WM(t,e);var GM={compareIdentifiers:WM,rcompareIdentifiers:dse};const Ff=zm,{MAX_LENGTH:SE,MAX_SAFE_INTEGER:Nf}=Um,{safeRe:Vf,t:Bf}=Kd,fse=L0,{compareIdentifiers:vl}=GM;let hse=class Ys{constructor(t,n){if(n=fse(n),t instanceof Ys){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>SE)throw new TypeError(`version is longer than ${SE} characters`);Ff("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const r=t.trim().match(n.loose?Vf[Bf.LOOSE]:Vf[Bf.FULL]);if(!r)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>Nf||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Nf||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Nf||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){const i=+s;if(i>=0&&i<Nf)return i}return s}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(Ff("SemVer.compare",this.version,this.options,t),!(t instanceof Ys)){if(typeof t=="string"&&t===this.version)return 0;t=new Ys(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof Ys||(t=new Ys(t,this.options)),vl(this.major,t.major)||vl(this.minor,t.minor)||vl(this.patch,t.patch)}comparePre(t){if(t instanceof Ys||(t=new Ys(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{const r=this.prerelease[n],s=t.prerelease[n];if(Ff("prerelease compare",n,r,s),r===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(r===void 0)return-1;if(r===s)continue;return vl(r,s)}while(++n)}compareBuild(t){t instanceof Ys||(t=new Ys(t,this.options));let n=0;do{const r=this.build[n],s=t.build[n];if(Ff("build compare",n,r,s),r===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(r===void 0)return-1;if(r===s)continue;return vl(r,s)}while(++n)}inc(t,n,r){if(t.startsWith("pre")){if(!n&&r===!1)throw new Error("invalid increment argument: identifier is empty");if(n){const s=`-${n}`.match(this.options.loose?Vf[Bf.PRERELEASELOOSE]:Vf[Bf.PRERELEASE]);if(!s||s[1]!==n)throw new Error(`invalid identifier: ${n}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,r),this.inc("pre",n,r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,r),this.inc("pre",n,r);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const s=Number(r)?1:0;if(this.prerelease.length===0)this.prerelease=[s];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(n===this.prerelease.join(".")&&r===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(n){let i=[n,s];r===!1&&(i=[n]),vl(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var vr=hse;const kE=vr,pse=(e,t,n=!1)=>{if(e instanceof kE)return e;try{return new kE(e,t)}catch(r){if(!n)return null;throw r}};var Gu=pse;const mse=Gu,gse=(e,t)=>{const n=mse(e,t);return n?n.version:null};var vse=gse;const yse=Gu,bse=(e,t)=>{const n=yse(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};var _se=bse;const xE=vr,wse=(e,t,n,r,s)=>{typeof n=="string"&&(s=r,r=n,n=void 0);try{return new xE(e instanceof xE?e.version:e,n).inc(t,r,s).version}catch{return null}};var Sse=wse;const EE=Gu,kse=(e,t)=>{const n=EE(e,null,!0),r=EE(t,null,!0),s=n.compare(r);if(s===0)return null;const i=s>0,o=i?n:r,a=i?r:n,l=!!o.prerelease.length;if(!!a.prerelease.length&&!l){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0)return a.minor&&!a.patch?"minor":"patch"}const c=l?"pre":"";return n.major!==r.major?c+"major":n.minor!==r.minor?c+"minor":n.patch!==r.patch?c+"patch":"prerelease"};var xse=kse;const Ese=vr,Cse=(e,t)=>new Ese(e,t).major;var Tse=Cse;const Pse=vr,Rse=(e,t)=>new Pse(e,t).minor;var Ise=Rse;const Ase=vr,Ose=(e,t)=>new Ase(e,t).patch;var Mse=Ose;const Dse=Gu,Lse=(e,t)=>{const n=Dse(e,t);return n&&n.prerelease.length?n.prerelease:null};var $se=Lse;const CE=vr,Fse=(e,t,n)=>new CE(e,n).compare(new CE(t,n));var Vs=Fse;const Nse=Vs,Vse=(e,t,n)=>Nse(t,e,n);var Bse=Vse;const Use=Vs,zse=(e,t)=>Use(e,t,!0);var Hse=zse;const TE=vr,jse=(e,t,n)=>{const r=new TE(e,n),s=new TE(t,n);return r.compare(s)||r.compareBuild(s)};var $0=jse;const qse=$0,Wse=(e,t)=>e.sort((n,r)=>qse(n,r,t));var Gse=Wse;const Kse=$0,Yse=(e,t)=>e.sort((n,r)=>Kse(r,n,t));var Xse=Yse;const Qse=Vs,Jse=(e,t,n)=>Qse(e,t,n)>0;var Hm=Jse;const Zse=Vs,eie=(e,t,n)=>Zse(e,t,n)<0;var F0=eie;const tie=Vs,nie=(e,t,n)=>tie(e,t,n)===0;var KM=nie;const rie=Vs,sie=(e,t,n)=>rie(e,t,n)!==0;var YM=sie;const iie=Vs,oie=(e,t,n)=>iie(e,t,n)>=0;var N0=oie;const aie=Vs,lie=(e,t,n)=>aie(e,t,n)<=0;var V0=lie;const uie=KM,cie=YM,die=Hm,fie=N0,hie=F0,pie=V0,mie=(e,t,n,r)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e===n;case"!==":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e!==n;case"":case"=":case"==":return uie(e,n,r);case"!=":return cie(e,n,r);case">":return die(e,n,r);case">=":return fie(e,n,r);case"<":return hie(e,n,r);case"<=":return pie(e,n,r);default:throw new TypeError(`Invalid operator: ${t}`)}};var XM=mie;const gie=vr,vie=Gu,{safeRe:Uf,t:zf}=Kd,yie=(e,t)=>{if(e instanceof gie)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let n=null;if(!t.rtl)n=e.match(t.includePrerelease?Uf[zf.COERCEFULL]:Uf[zf.COERCE]);else{const l=t.includePrerelease?Uf[zf.COERCERTLFULL]:Uf[zf.COERCERTL];let u;for(;(u=l.exec(e))&&(!n||n.index+n[0].length!==e.length);)(!n||u.index+u[0].length!==n.index+n[0].length)&&(n=u),l.lastIndex=u.index+u[1].length+u[2].length;l.lastIndex=-1}if(n===null)return null;const r=n[2],s=n[3]||"0",i=n[4]||"0",o=t.includePrerelease&&n[5]?`-${n[5]}`:"",a=t.includePrerelease&&n[6]?`+${n[6]}`:"";return vie(`${r}.${s}.${i}${o}${a}`,t)};var bie=yie;class _ie{constructor(){this.max=1e3,this.map=new Map}get(t){const n=this.map.get(t);if(n!==void 0)return this.map.delete(t),this.map.set(t,n),n}delete(t){return this.map.delete(t)}set(t,n){if(!this.delete(t)&&n!==void 0){if(this.map.size>=this.max){const s=this.map.keys().next().value;this.delete(s)}this.map.set(t,n)}return this}}var wie=_ie,cv,PE;function Bs(){if(PE)return cv;PE=1;const e=/\s+/g;class t{constructor(F,U){if(U=s(U),F instanceof t)return F.loose===!!U.loose&&F.includePrerelease===!!U.includePrerelease?F:new t(F.raw,U);if(F instanceof i)return this.raw=F.value,this.set=[[F]],this.formatted=void 0,this;if(this.options=U,this.loose=!!U.loose,this.includePrerelease=!!U.includePrerelease,this.raw=F.trim().replace(e," "),this.set=this.raw.split("||").map(K=>this.parseRange(K.trim())).filter(K=>K.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const K=this.set[0];if(this.set=this.set.filter(Q=>!m(Q[0])),this.set.length===0)this.set=[K];else if(this.set.length>1){for(const Q of this.set)if(Q.length===1&&y(Q[0])){this.set=[Q];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let F=0;F<this.set.length;F++){F>0&&(this.formatted+="||");const U=this.set[F];for(let K=0;K<U.length;K++)K>0&&(this.formatted+=" "),this.formatted+=U[K].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(F){const K=((this.options.includePrerelease&&p)|(this.options.loose&&g))+":"+F,Q=r.get(K);if(Q)return Q;const H=this.options.loose,V=H?l[u.HYPHENRANGELOOSE]:l[u.HYPHENRANGE];F=F.replace(V,R(this.options.includePrerelease)),o("hyphen replace",F),F=F.replace(l[u.COMPARATORTRIM],c),o("comparator trim",F),F=F.replace(l[u.TILDETRIM],d),o("tilde trim",F),F=F.replace(l[u.CARETTRIM],f),o("caret trim",F);let ee=F.split(" ").map(ie=>b(ie,this.options)).join(" ").split(/\s+/).map(ie=>O(ie,this.options));H&&(ee=ee.filter(ie=>(o("loose invalid filter",ie,this.options),!!ie.match(l[u.COMPARATORLOOSE])))),o("range list",ee);const q=new Map,G=ee.map(ie=>new i(ie,this.options));for(const ie of G){if(m(ie))return[ie];q.set(ie.value,ie)}q.size>1&&q.has("")&&q.delete("");const le=[...q.values()];return r.set(K,le),le}intersects(F,U){if(!(F instanceof t))throw new TypeError("a Range is required");return this.set.some(K=>_(K,U)&&F.set.some(Q=>_(Q,U)&&K.every(H=>Q.every(V=>H.intersects(V,U)))))}test(F){if(!F)return!1;if(typeof F=="string")try{F=new a(F,this.options)}catch{return!1}for(let U=0;U<this.set.length;U++)if(M(this.set[U],F,this.options))return!0;return!1}}cv=t;const n=wie,r=new n,s=L0,i=jm(),o=zm,a=vr,{safeRe:l,t:u,comparatorTrimReplace:c,tildeTrimReplace:d,caretTrimReplace:f}=Kd,{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:g}=Um,m=D=>D.value==="<0.0.0-0",y=D=>D.value==="",_=(D,F)=>{let U=!0;const K=D.slice();let Q=K.pop();for(;U&&K.length;)U=K.every(H=>Q.intersects(H,F)),Q=K.pop();return U},b=(D,F)=>(o("comp",D,F),D=T(D,F),o("caret",D),D=C(D,F),o("tildes",D),D=w(D,F),o("xrange",D),D=I(D,F),o("stars",D),D),x=D=>!D||D.toLowerCase()==="x"||D==="*",C=(D,F)=>D.trim().split(/\s+/).map(U=>S(U,F)).join(" "),S=(D,F)=>{const U=F.loose?l[u.TILDELOOSE]:l[u.TILDE];return D.replace(U,(K,Q,H,V,ee)=>{o("tilde",D,K,Q,H,V,ee);let q;return x(Q)?q="":x(H)?q=`>=${Q}.0.0 <${+Q+1}.0.0-0`:x(V)?q=`>=${Q}.${H}.0 <${Q}.${+H+1}.0-0`:ee?(o("replaceTilde pr",ee),q=`>=${Q}.${H}.${V}-${ee} <${Q}.${+H+1}.0-0`):q=`>=${Q}.${H}.${V} <${Q}.${+H+1}.0-0`,o("tilde return",q),q})},T=(D,F)=>D.trim().split(/\s+/).map(U=>P(U,F)).join(" "),P=(D,F)=>{o("caret",D,F);const U=F.loose?l[u.CARETLOOSE]:l[u.CARET],K=F.includePrerelease?"-0":"";return D.replace(U,(Q,H,V,ee,q)=>{o("caret",D,Q,H,V,ee,q);let G;return x(H)?G="":x(V)?G=`>=${H}.0.0${K} <${+H+1}.0.0-0`:x(ee)?H==="0"?G=`>=${H}.${V}.0${K} <${H}.${+V+1}.0-0`:G=`>=${H}.${V}.0${K} <${+H+1}.0.0-0`:q?(o("replaceCaret pr",q),H==="0"?V==="0"?G=`>=${H}.${V}.${ee}-${q} <${H}.${V}.${+ee+1}-0`:G=`>=${H}.${V}.${ee}-${q} <${H}.${+V+1}.0-0`:G=`>=${H}.${V}.${ee}-${q} <${+H+1}.0.0-0`):(o("no pr"),H==="0"?V==="0"?G=`>=${H}.${V}.${ee}${K} <${H}.${V}.${+ee+1}-0`:G=`>=${H}.${V}.${ee}${K} <${H}.${+V+1}.0-0`:G=`>=${H}.${V}.${ee} <${+H+1}.0.0-0`),o("caret return",G),G})},w=(D,F)=>(o("replaceXRanges",D,F),D.split(/\s+/).map(U=>E(U,F)).join(" ")),E=(D,F)=>{D=D.trim();const U=F.loose?l[u.XRANGELOOSE]:l[u.XRANGE];return D.replace(U,(K,Q,H,V,ee,q)=>{o("xRange",D,K,Q,H,V,ee,q);const G=x(H),le=G||x(V),ie=le||x(ee),we=ie;return Q==="="&&we&&(Q=""),q=F.includePrerelease?"-0":"",G?Q===">"||Q==="<"?K="<0.0.0-0":K="*":Q&&we?(le&&(V=0),ee=0,Q===">"?(Q=">=",le?(H=+H+1,V=0,ee=0):(V=+V+1,ee=0)):Q==="<="&&(Q="<",le?H=+H+1:V=+V+1),Q==="<"&&(q="-0"),K=`${Q+H}.${V}.${ee}${q}`):le?K=`>=${H}.0.0${q} <${+H+1}.0.0-0`:ie&&(K=`>=${H}.${V}.0${q} <${H}.${+V+1}.0-0`),o("xRange return",K),K})},I=(D,F)=>(o("replaceStars",D,F),D.trim().replace(l[u.STAR],"")),O=(D,F)=>(o("replaceGTE0",D,F),D.trim().replace(l[F.includePrerelease?u.GTE0PRE:u.GTE0],"")),R=D=>(F,U,K,Q,H,V,ee,q,G,le,ie,we)=>(x(K)?U="":x(Q)?U=`>=${K}.0.0${D?"-0":""}`:x(H)?U=`>=${K}.${Q}.0${D?"-0":""}`:V?U=`>=${U}`:U=`>=${U}${D?"-0":""}`,x(G)?q="":x(le)?q=`<${+G+1}.0.0-0`:x(ie)?q=`<${G}.${+le+1}.0-0`:we?q=`<=${G}.${le}.${ie}-${we}`:D?q=`<${G}.${le}.${+ie+1}-0`:q=`<=${q}`,`${U} ${q}`.trim()),M=(D,F,U)=>{for(let K=0;K<D.length;K++)if(!D[K].test(F))return!1;if(F.prerelease.length&&!U.includePrerelease){for(let K=0;K<D.length;K++)if(o(D[K].semver),D[K].semver!==i.ANY&&D[K].semver.prerelease.length>0){const Q=D[K].semver;if(Q.major===F.major&&Q.minor===F.minor&&Q.patch===F.patch)return!0}return!1}return!0};return cv}var dv,RE;function jm(){if(RE)return dv;RE=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(c,d){if(d=n(d),c instanceof t){if(c.loose===!!d.loose)return c;c=c.value}c=c.trim().split(/\s+/).join(" "),o("comparator",c,d),this.options=d,this.loose=!!d.loose,this.parse(c),this.semver===e?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(c){const d=this.options.loose?r[s.COMPARATORLOOSE]:r[s.COMPARATOR],f=c.match(d);if(!f)throw new TypeError(`Invalid comparator: ${c}`);this.operator=f[1]!==void 0?f[1]:"",this.operator==="="&&(this.operator=""),f[2]?this.semver=new a(f[2],this.options.loose):this.semver=e}toString(){return this.value}test(c){if(o("Comparator.test",c,this.options.loose),this.semver===e||c===e)return!0;if(typeof c=="string")try{c=new a(c,this.options)}catch{return!1}return i(c,this.operator,this.semver,this.options)}intersects(c,d){if(!(c instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new l(c.value,d).test(this.value):c.operator===""?c.value===""?!0:new l(this.value,d).test(c.semver):(d=n(d),d.includePrerelease&&(this.value==="<0.0.0-0"||c.value==="<0.0.0-0")||!d.includePrerelease&&(this.value.startsWith("<0.0.0")||c.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&c.operator.startsWith(">")||this.operator.startsWith("<")&&c.operator.startsWith("<")||this.semver.version===c.semver.version&&this.operator.includes("=")&&c.operator.includes("=")||i(this.semver,"<",c.semver,d)&&this.operator.startsWith(">")&&c.operator.startsWith("<")||i(this.semver,">",c.semver,d)&&this.operator.startsWith("<")&&c.operator.startsWith(">")))}}dv=t;const n=L0,{safeRe:r,t:s}=Kd,i=XM,o=zm,a=vr,l=Bs();return dv}const Sie=Bs(),kie=(e,t,n)=>{try{t=new Sie(t,n)}catch{return!1}return t.test(e)};var qm=kie;const xie=Bs(),Eie=(e,t)=>new xie(e,t).set.map(n=>n.map(r=>r.value).join(" ").trim().split(" "));var Cie=Eie;const Tie=vr,Pie=Bs(),Rie=(e,t,n)=>{let r=null,s=null,i=null;try{i=new Pie(t,n)}catch{return null}return e.forEach(o=>{i.test(o)&&(!r||s.compare(o)===-1)&&(r=o,s=new Tie(r,n))}),r};var Iie=Rie;const Aie=vr,Oie=Bs(),Mie=(e,t,n)=>{let r=null,s=null,i=null;try{i=new Oie(t,n)}catch{return null}return e.forEach(o=>{i.test(o)&&(!r||s.compare(o)===1)&&(r=o,s=new Aie(r,n))}),r};var Die=Mie;const fv=vr,Lie=Bs(),IE=Hm,$ie=(e,t)=>{e=new Lie(e,t);let n=new fv("0.0.0");if(e.test(n)||(n=new fv("0.0.0-0"),e.test(n)))return n;n=null;for(let r=0;r<e.set.length;++r){const s=e.set[r];let i=null;s.forEach(o=>{const a=new fv(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!i||IE(a,i))&&(i=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),i&&(!n||IE(n,i))&&(n=i)}return n&&e.test(n)?n:null};var Fie=$ie;const Nie=Bs(),Vie=(e,t)=>{try{return new Nie(e,t).range||"*"}catch{return null}};var Bie=Vie;const Uie=vr,QM=jm(),{ANY:zie}=QM,Hie=Bs(),jie=qm,AE=Hm,OE=F0,qie=V0,Wie=N0,Gie=(e,t,n,r)=>{e=new Uie(e,r),t=new Hie(t,r);let s,i,o,a,l;switch(n){case">":s=AE,i=qie,o=OE,a=">",l=">=";break;case"<":s=OE,i=Wie,o=AE,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(jie(e,t,r))return!1;for(let u=0;u<t.set.length;++u){const c=t.set[u];let d=null,f=null;if(c.forEach(p=>{p.semver===zie&&(p=new QM(">=0.0.0")),d=d||p,f=f||p,s(p.semver,d.semver,r)?d=p:o(p.semver,f.semver,r)&&(f=p)}),d.operator===a||d.operator===l||(!f.operator||f.operator===a)&&i(e,f.semver))return!1;if(f.operator===l&&o(e,f.semver))return!1}return!0};var B0=Gie;const Kie=B0,Yie=(e,t,n)=>Kie(e,t,">",n);var Xie=Yie;const Qie=B0,Jie=(e,t,n)=>Qie(e,t,"<",n);var Zie=Jie;const ME=Bs(),eoe=(e,t,n)=>(e=new ME(e,n),t=new ME(t,n),e.intersects(t,n));var toe=eoe;const noe=qm,roe=Vs;var soe=(e,t,n)=>{const r=[];let s=null,i=null;const o=e.sort((c,d)=>roe(c,d,n));for(const c of o)noe(c,t,n)?(i=c,s||(s=c)):(i&&r.push([s,i]),i=null,s=null);s&&r.push([s,null]);const a=[];for(const[c,d]of r)c===d?a.push(c):!d&&c===o[0]?a.push("*"):d?c===o[0]?a.push(`<=${d}`):a.push(`${c} - ${d}`):a.push(`>=${c}`);const l=a.join(" || "),u=typeof t.raw=="string"?t.raw:String(t);return l.length<u.length?l:t};const DE=Bs(),U0=jm(),{ANY:hv}=U0,uc=qm,z0=Vs,ioe=(e,t,n={})=>{if(e===t)return!0;e=new DE(e,n),t=new DE(t,n);let r=!1;e:for(const s of e.set){for(const i of t.set){const o=aoe(s,i,n);if(r=r||o!==null,o)continue e}if(r)return!1}return!0},ooe=[new U0(">=0.0.0-0")],LE=[new U0(">=0.0.0")],aoe=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===hv){if(t.length===1&&t[0].semver===hv)return!0;n.includePrerelease?e=ooe:e=LE}if(t.length===1&&t[0].semver===hv){if(n.includePrerelease)return!0;t=LE}const r=new Set;let s,i;for(const p of e)p.operator===">"||p.operator===">="?s=$E(s,p,n):p.operator==="<"||p.operator==="<="?i=FE(i,p,n):r.add(p.semver);if(r.size>1)return null;let o;if(s&&i){if(o=z0(s.semver,i.semver,n),o>0)return null;if(o===0&&(s.operator!==">="||i.operator!=="<="))return null}for(const p of r){if(s&&!uc(p,String(s),n)||i&&!uc(p,String(i),n))return null;for(const g of t)if(!uc(p,String(g),n))return!1;return!0}let a,l,u,c,d=i&&!n.includePrerelease&&i.semver.prerelease.length?i.semver:!1,f=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1;d&&d.prerelease.length===1&&i.operator==="<"&&d.prerelease[0]===0&&(d=!1);for(const p of t){if(c=c||p.operator===">"||p.operator===">=",u=u||p.operator==="<"||p.operator==="<=",s){if(f&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===f.major&&p.semver.minor===f.minor&&p.semver.patch===f.patch&&(f=!1),p.operator===">"||p.operator===">="){if(a=$E(s,p,n),a===p&&a!==s)return!1}else if(s.operator===">="&&!uc(s.semver,String(p),n))return!1}if(i){if(d&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===d.major&&p.semver.minor===d.minor&&p.semver.patch===d.patch&&(d=!1),p.operator==="<"||p.operator==="<="){if(l=FE(i,p,n),l===p&&l!==i)return!1}else if(i.operator==="<="&&!uc(i.semver,String(p),n))return!1}if(!p.operator&&(i||s)&&o!==0)return!1}return!(s&&u&&!i&&o!==0||i&&c&&!s&&o!==0||f||d)},$E=(e,t,n)=>{if(!e)return t;const r=z0(e.semver,t.semver,n);return r>0?e:r<0||t.operator===">"&&e.operator===">="?t:e},FE=(e,t,n)=>{if(!e)return t;const r=z0(e.semver,t.semver,n);return r<0?e:r>0||t.operator==="<"&&e.operator==="<="?t:e};var loe=ioe;const pv=Kd,NE=Um,uoe=vr,VE=GM,coe=Gu,doe=vse,foe=_se,hoe=Sse,poe=xse,moe=Tse,goe=Ise,voe=Mse,yoe=$se,boe=Vs,_oe=Bse,woe=Hse,Soe=$0,koe=Gse,xoe=Xse,Eoe=Hm,Coe=F0,Toe=KM,Poe=YM,Roe=N0,Ioe=V0,Aoe=XM,Ooe=bie,Moe=jm(),Doe=Bs(),Loe=qm,$oe=Cie,Foe=Iie,Noe=Die,Voe=Fie,Boe=Bie,Uoe=B0,zoe=Xie,Hoe=Zie,joe=toe,qoe=soe,Woe=loe;var cc={parse:coe,valid:doe,clean:foe,inc:hoe,diff:poe,major:moe,minor:goe,patch:voe,prerelease:yoe,compare:boe,rcompare:_oe,compareLoose:woe,compareBuild:Soe,sort:koe,rsort:xoe,gt:Eoe,lt:Coe,eq:Toe,neq:Poe,gte:Roe,lte:Ioe,cmp:Aoe,coerce:Ooe,Comparator:Moe,Range:Doe,satisfies:Loe,toComparators:$oe,maxSatisfying:Foe,minSatisfying:Noe,minVersion:Voe,validRange:Boe,outside:Uoe,gtr:zoe,ltr:Hoe,intersects:joe,simplifyRange:qoe,subset:Woe,SemVer:uoe,re:pv.re,src:pv.src,tokens:pv.t,SEMVER_SPEC_VERSION:NE.SEMVER_SPEC_VERSION,RELEASE_TYPES:NE.RELEASE_TYPES,compareIdentifiers:VE.compareIdentifiers,rcompareIdentifiers:VE.rcompareIdentifiers};const Goe={key:0},Koe={key:1},Yoe={key:0},Xoe=Le({__name:"SoftwareUpgradeSettings",setup(e){const t=j(""),n=j(!0),r=j(!1),s=j(!1),i=j(""),o=j(""),a=j(rM),l=j(),u=j(),c=j(),d=j(!1),f=j([]);bt(async()=>{var E;await p();const w=await ma.getVersion();i.value=w.version,o.value=((E=w.monsterPi)==null?void 0:E.trim())||""});async function p(){n.value=!0,t.value="",r.value=!1;try{const w=await ma.getGithubRateLimit();if(w.rate.remaining===0){const I=new Date(w.rate.reset).toLocaleTimeString(),O=w.rate.reset*1e3-Date.now(),R=Math.ceil(O/6e4);t.value=`Server has reached a rate limit of the Github API. This limit will be reset at ${I} (in ${R} minutes)`,n.value=!1,r.value=!0;return}}catch{n.value=!1;return}try{const w=await ma.getClientReleases();l.value=w.current,u.value=w.minimum,f.value=w.releases}catch(w){t.value="An error occurred loading the releases: "+w.message}finally{n.value=!1}}const g=A(()=>f.value.filter(w=>{const E=cc.minor(w.tag_name)===cc.minor(u.value.tag_name),I=x(w),O=w.draft;return E&&(y()||d.value||!I)&&!O})),m=A(()=>y());function y(){const w=l.value;return x(w)}function _(w){return T(w)||!S(w,l.value)||C(w)}function b(w){const E=x(w)?`${w.tag_name}, unstable`:w.tag_name;return T(w)?`${E}, currently installed`:C(w)?`${E}, below minimum`:S(w,l.value)?E:`${E}, downgrade not allowed`}function x(w){var E;return(E=w==null?void 0:w.tag_name)!=null&&E.length?w.prerelease||w.tag_name.includes("rc")||w.tag_name.includes("unstable"):!1}function C(w){return cc.compare(w.tag_name,u.value.tag_name)===-1}function S(w,E){if(!E)throw new Error("No current release is known, cannot compare.");return s.value?!0:cc.compare(w.tag_name,E.tag_name)!==-1&&cc.compare(w.tag_name,u.value.tag_name)!==-1}function T(w){var E;return w.tag_name===((E=l.value)==null?void 0:E.tag_name)}async function P(w){confirm("Are you sure? This might cause breaking changes, if the server is outdated")&&(await ma.updateClientDistGithub(w,s.value),location.reload())}return(w,E)=>($(),te(yt,null,{default:v(()=>[h(mr,{color:"primary"},{default:v(()=>[h(ut,null,{default:v(()=>[h(J,null,{default:v(()=>E[5]||(E[5]=[k("upgrade")])),_:1,__:[5]})]),_:1}),h(En,null,{default:v(()=>E[6]||(E[6]=[k(" Software Upgrade")])),_:1,__:[6]})]),_:1}),h(Bt,{lines:"three"},{default:v(()=>[h(Ve,null,{default:v(()=>[h(ct,null,{default:v(()=>E[7]||(E[7]=[k(" Current versions in use:")])),_:1,__:[7]}),h(vt,null,{default:v(()=>[k(" Your server's version is: "+se(i.value),1)]),_:1}),h(vt,null,{default:v(()=>[k(" Your client's version is: "+se(a.value),1)]),_:1}),h(vt,null,{default:v(()=>[o.value?($(),ve("div",Goe,[E[8]||(E[8]=k(" MonsterPi: ")),E[9]||(E[9]=L("div",null,"Your MonsterPi version is:",-1)),k(" "+se(o.value),1)])):($(),ve("div",Koe,E[10]||(E[10]=[k(" MonsterPi: "),L("div",null,"No MonsterPi distro was detected.",-1)])))]),_:1})]),_:1})]),_:1}),h(dn),h(Bt,{lines:"three",subheader:""},{default:v(()=>[h(Ve,null,{default:v(()=>[h(ct,null,{default:v(()=>E[11]||(E[11]=[k(" Server upgrade")])),_:1,__:[11]}),h(vt,null,{default:v(()=>E[12]||(E[12]=[k(" Please visit "),L("a",{href:"https://docs.fdm-monster.net/docs/installing/"}," the installation documentation ",-1),k(" for instructions on how to upgrade the server. ")])),_:1,__:[12]})]),_:1})]),_:1}),h(dn),h(Bt,{lines:"three"},{default:v(()=>[h(Ve,null,{default:v(()=>[h(ct,null,{default:v(()=>E[13]||(E[13]=[k(" Client upgrade")])),_:1,__:[13]}),h(vt,null,{default:v(()=>E[14]||(E[14]=[k(" Please visit "),L("a",{href:"https://docs.fdm-monster.net/docs/configuration/updating_client_bundle"}," the installation documentation ",-1),k(" for instructions on how to upgrade the client bundle. ")])),_:1,__:[14]}),h(vt,null,{default:v(()=>E[15]||(E[15]=[k(" Upgrade the client webapp for quickly retrieving small fixes and features ")])),_:1,__:[15]})]),_:1}),h(Ve,null,{default:v(()=>{var I,O,R;return[h(ct,null,{default:v(()=>E[16]||(E[16]=[k(" Select a release to upgrade to:")])),_:1,__:[16]}),h(vt,{class:"mt-2"},{default:v(()=>{var M;return[k(" Minimum required version: "+se((M=u.value)==null?void 0:M.tag_name),1)]}),_:1}),n.value?($(),ve("span",Yoe,[h(fn,null,{default:v(()=>E[17]||(E[17]=[k(" Loading releases... ")])),_:1,__:[17]})])):pe("",!0),!n.value&&!((I=g.value)!=null&&I.length)?($(),te(fn,{key:1},{default:v(()=>E[18]||(E[18]=[k(" No releases to show. ")])),_:1,__:[18]})):pe("",!0),h(kO,{modelValue:c.value,"onUpdate:modelValue":E[0]||(E[0]=M=>c.value=M)},{default:v(()=>[($(!0),ve(Ae,null,Gt(g.value,M=>($(),te(zy,{key:M.tag_name,disabled:_(M),label:b(M),value:M.tag_name},null,8,["disabled","label","value"]))),128))]),_:1},8,["modelValue"]),L("div",null,[d.value?($(),te(fn,{key:0,color:"primary","max-width":"500px"},{default:v(()=>E[19]||(E[19]=[k(" You are viewing prereleases, please install such versions at your own risk! ")])),_:1,__:[19]})):pe("",!0)]),L("div",null,[h(mn,{modelValue:s.value,"onUpdate:modelValue":E[1]||(E[1]=M=>s.value=M),label:"Allow downgrade"},null,8,["modelValue"]),h(mn,{modelValue:d.value,"onUpdate:modelValue":E[2]||(E[2]=M=>d.value=M),disabled:m.value,label:m.value?"Show prerelease versions (Currently already on prerelease version)":"Show prerelease versions"},null,8,["modelValue","disabled","label"])]),h(re,{class:"mt-2 mr-4",color:"secondary",onClick:E[3]||(E[3]=M=>p())},{default:v(()=>E[20]||(E[20]=[k(" Reload release version list ")])),_:1,__:[20]}),h(re,{disabled:!((O=c.value)!=null&&O.length)||c.value===((R=l.value)==null?void 0:R.tag_name),class:"mt-2",color:"primary",variant:"flat",onClick:E[4]||(E[4]=M=>P(c.value))},{default:v(()=>[h(J,null,{default:v(()=>E[21]||(E[21]=[k("upgrade")])),_:1,__:[21]}),E[22]||(E[22]=k(" Upgrade/downgrade client "))]),_:1,__:[22]},8,["disabled"])]}),_:1})]),_:1})]),_:1}))}}),Qoe=Le({__name:"DiagnosticsSettings",setup(e){const t=Dt(),n=Ns(),r=j(!1);bt(async()=>{var l;await n.loadSettings(),r.value=((l=n.serverSettings)==null?void 0:l.sentryDiagnosticsEnabled)||!1});async function s(){await bn.setSentryDiagnosticsSettings(r.value),C2(r.value)}async function i(){const l=`Test Error ${Date.now()} Sentry enabled: ${r.value}`;try{throw new Error(l)}catch(u){ai(u),t.openInfoMessage({title:"Test report was sent",subtitle:`Content: ${l}`})}}async function o(){await dp.downloadLogDump()}async function a(){await dp.clearLogFilesOlderThanWeek(),t.openInfoMessage({title:"Action success",subtitle:"Log files older than a week have been deleted"})}return(l,u)=>($(),te(yt,null,{default:v(()=>[h(mr,{color:"primary"},{default:v(()=>[h(ut,null,{default:v(()=>[h(J,null,{default:v(()=>u[5]||(u[5]=[k("bug_report")])),_:1,__:[5]})]),_:1}),h(En,null,{default:v(()=>u[6]||(u[6]=[k(" Diagnostics")])),_:1,__:[6]})]),_:1}),h(Bt,{lines:"three",subheader:""},{default:v(()=>[h(qr,null,{default:v(()=>u[7]||(u[7]=[k(" Diagnostics to provide bug reports to the developers of this software ")])),_:1,__:[7]}),h(Ve,null,{default:v(()=>[h(ct,null,{default:v(()=>u[8]||(u[8]=[k(" Remote Sentry diagnostic reports: ")])),_:1,__:[8]}),h(vt,null,{default:v(()=>[h(mn,{modelValue:r.value,"onUpdate:modelValue":u[0]||(u[0]=c=>r.value=c),label:"Enable remote Sentry diagnostic reports"},null,8,["modelValue"])]),_:1}),h(vt,null,{default:v(()=>[h(re,{color:"primary",onClick:u[1]||(u[1]=c=>s())},{default:v(()=>[h(J,{class:"pr-2"},{default:v(()=>u[9]||(u[9]=[k("save")])),_:1,__:[9]}),u[10]||(u[10]=k(" Save "))]),_:1,__:[10]}),h(re,{color:"secondary",onClick:u[2]||(u[2]=c=>i())},{default:v(()=>[h(J,{class:"pr-2"},{default:v(()=>u[11]||(u[11]=[k("bug_report")])),_:1,__:[11]}),u[12]||(u[12]=k(" Test Error "))]),_:1,__:[12]})]),_:1})]),_:1}),h(dn),h(Ve,null,{default:v(()=>[h(ct,null,{default:v(()=>u[13]||(u[13]=[k(" Logs Dump")])),_:1,__:[13]}),h(vt,null,{default:v(()=>u[14]||(u[14]=[k(" Download a .zip file containing all logs from the server ")])),_:1,__:[14]}),h(vt,null,{default:v(()=>[u[17]||(u[17]=L("br",null,null,-1)),h(re,{color:"primary",onClick:u[3]||(u[3]=c=>o())},{default:v(()=>[h(J,null,{default:v(()=>u[15]||(u[15]=[k("download")])),_:1,__:[15]}),u[16]||(u[16]=k(" Download Log Files (.zip) "))]),_:1,__:[16]})]),_:1,__:[17]})]),_:1}),h(Ve,null,{default:v(()=>[h(ct,null,{default:v(()=>u[18]||(u[18]=[k(" Clear log files")])),_:1,__:[18]}),h(vt,null,{default:v(()=>[u[21]||(u[21]=L("br",null,null,-1)),h(re,{color:"default",onClick:u[4]||(u[4]=c=>a())},{default:v(()=>[h(J,null,{default:v(()=>u[19]||(u[19]=[k("download")])),_:1,__:[19]}),u[20]||(u[20]=k(" Clear log files older than a week "))]),_:1,__:[20]})]),_:1,__:[21]})]),_:1})]),_:1})]),_:1}))}});class Joe extends gr{static async getCompletions(){const t=`${Me.printCompletionRoute}`;return await this.get(t)}}const JM=Le({__name:"PrintStatistics",setup(e){const t=j([]),n=j([]),r=j(""),s=Wt(),i=Zi();bt(async()=>{await o()}),Ee([()=>r.value],()=>{u()});const o=async()=>{t.value=[],n.value=[],t.value=await Joe.getCompletions(),u()},a=c=>s.printer(c),l=c=>i.floorOfPrinter(c),u=()=>{var p;const c=s.printers.map(g=>g.id),d=c.length?t.value.filter(g=>c.includes(g.printerId)):t.value,f=(p=r.value)!=null&&p.length?d.filter(g=>{const m=s.printers.find(y=>y.id===g.printerId);return m?(m.name+m.printerURL).toLowerCase().includes(r.value.toLowerCase()):!1}):d;n.value=f.sort((g,m)=>g.failureCount===m.failureCount?g.printCount>m.printCount?-1:1:g.failureCount>m.failureCount?-1:1)};return(c,d)=>($(),te(fp,{height:"100%",width:"100%"},{default:v(()=>[h(Hn,null,{default:v(()=>[h(rt,null,{default:v(()=>[h(ze,null,{default:v(()=>[h(J,null,{default:v(()=>d[2]||(d[2]=[k("filter_list")])),_:1,__:[2]}),d[3]||(d[3]=k(" Filter by printer name (optional) "))]),_:1,__:[3]}),h(ze,null,{default:v(()=>[h(st,{modelValue:r.value,"onUpdate:modelValue":d[0]||(d[0]=f=>r.value=f),class:"p-2",clearable:"",label:"Search","prepend-icon":"search","single-line":""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),h(fn,null,{default:v(()=>[d[5]||(d[5]=k(" Please reload here if you want updated results: ")),h(re,{color:"primary",size:"x-small",onClick:d[1]||(d[1]=f=>o())},{default:v(()=>d[4]||(d[4]=[k(" Reload ")])),_:1,__:[4]})]),_:1,__:[5]}),h(mb,{dark:""},{default:v(()=>[d[11]||(d[11]=L("thead",null,[L("tr",null,[L("th",{class:"text-left"},"Printer name"),L("th",{class:"text-left"},"Floor"),L("th",{class:"text-left"},"Fail/ Success/ Total"),L("th",{class:"text-left"},"Last success"),L("th",{class:"text-left"},"Last failure"),L("th",{class:"text-left"},"Successes (week/48H/24H)"),L("th",{class:"text-left"},"Failures (week/48H/24H)")])],-1)),L("tbody",null,[($(!0),ve(Ae,null,Gt(n.value,f=>{var p,g,m,y;return $(),ve("tr",{key:f.printerId},[L("td",null,se(((p=a(f.printerId))==null?void 0:p.name)??"?"),1),L("td",null,se(((g=l(f.printerId))==null?void 0:g.name)??"?"),1),L("td",null,[k(" × "+se(f.failureCount)+" / 🗸 "+se(f.successCount)+" ",1),L("strong",null," ~"+se(f.printCount),1)]),L("td",null,se(Date.now()-((m=f.lastSuccess)==null?void 0:m.createdAt)||"-"),1),L("td",null,[h(nt,{location:"bottom"},WC({default:v(()=>{var _,b,x,C;return[L("span",null,[k(se(((_=f.lastFailure)==null?void 0:_.status)||"-")+" ",1),d[7]||(d[7]=L("br",null,null,-1)),k(" "+se((b=f.lastFailure)==null?void 0:b.createdAt)+" ",1),d[8]||(d[8]=L("br",null,null,-1)),L("small",null,se((x=f.lastFailure)==null?void 0:x.fileName),1),d[9]||(d[9]=L("br",null,null,-1)),L("strong",null,se((C=f.lastFailure)==null?void 0:C.completionLog),1),d[10]||(d[10]=L("br",null,null,-1))])]}),_:2},[(y=f.lastFailure)!=null&&y.status?{name:"activator",fn:v(({props:_})=>[h(J,ge({ref_for:!0},_),{default:v(()=>d[6]||(d[6]=[k("info")])),_:2,__:[6]},1040)]),key:"0"}:void 0]),1024)]),L("td",null,se(f.successEventsLastWeek)+" "+se(f.successEventsLast48H)+" "+se(f.successEventsLast24H),1),L("td",null,se(f.failureEventsLastWeek)+" "+se(f.failureEventsLast48H)+" "+se(f.failureEventsLast24H),1)])}),128))])]),_:1})]),_:1}))}}),Zoe=Le({name:"PrintStatisticsView",components:{PrintStatistics:JM}});function eae(e,t,n,r,s,i){const o=JM;return $(),te(Hn,null,{default:v(()=>[h(o)]),_:1})}const tae=ol(Zoe,[["render",eae]]),nae=Le({__name:"ExperimentalSettings",setup(e){const t=j(!1),n=j(!1),r=j(!1),s=j(!1);async function i(){const u=await bn.getSettings();t.value=u.server.experimentalMoonrakerSupport,n.value=u.server.experimentalPrusaLinkSupport,r.value=u.server.experimentalTypeormSupport,s.value=u.server.experimentalClientSupport}bt(async()=>{await i()});const o=async()=>{await bn.updateExperimentalMoonrakerSupport(t.value),await bn.updateExperimentalPrusaLinkSupport(n.value),await bn.updateExperimentalClientSupport(s.value),await i()},a=async()=>{await bn.updateExperimentalMoonrakerSupport(!1),await bn.updateExperimentalPrusaLinkSupport(!1),await bn.updateExperimentalClientSupport(!1),await i()},l=async()=>{await bn.updateExperimentalClientSupport(s.value),window.location.reload()};return(u,c)=>($(),te(rt,null,{default:v(()=>[h(ze,{cols:"12"},{default:v(()=>[h(yt,null,{default:v(()=>[h(sn,null,{default:v(()=>c[4]||(c[4]=[L("h2",null,"Settings",-1)])),_:1,__:[4]}),h(en,null,{default:v(()=>[h(rt,null,{default:v(()=>[h(ze,{cols:"12",md:"6"},{default:v(()=>[h(yt,null,{default:v(()=>[h(sn,null,{default:v(()=>[L("h3",null,[c[7]||(c[7]=k(" Experimental Features ")),h(nt,{bottom:""},{activator:v(({props:d})=>[h(J,ge({class:"help-icon"},d),{default:v(()=>c[5]||(c[5]=[k("help_outline")])),_:2,__:[5]},1040)]),default:v(()=>[c[6]||(c[6]=L("span",{class:"tooltip-content"}," Moonraker support is currently in beta, use at your own risk. ",-1))]),_:1,__:[6]})])]),_:1}),h(en,null,{default:v(()=>[h(mn,{modelValue:t.value,"onUpdate:modelValue":c[0]||(c[0]=d=>t.value=d),label:"Enable Experimental Moonraker Support","hide-details":""},{label:v(()=>c[8]||(c[8]=[L("span",null,"Enable Experimental Moonraker Support",-1)])),_:1},8,["modelValue"]),h(mn,{modelValue:n.value,"onUpdate:modelValue":c[1]||(c[1]=d=>n.value=d),label:"Enable Experimental PrusaLink Support","hide-details":""},{label:v(()=>c[9]||(c[9]=[L("span",null,"Enable Experimental PrusaLink Support",-1)])),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),h(ze,{cols:"12",md:"6"},{default:v(()=>[h(yt,null,{default:v(()=>[h(sn,null,{default:v(()=>[L("h3",null,[c[12]||(c[12]=k(" Database Settings ")),h(nt,{bottom:""},{activator:v(({props:d})=>[h(J,bv(Ih(d)),{default:v(()=>c[10]||(c[10]=[k("help_outline")])),_:2,__:[10]},1040)]),default:v(()=>[c[11]||(c[11]=L("span",{class:"tooltip-content"}," By enabling this setting you will set FDM Monster to SQLite as a database source (standalone mode). Please set 'ENABLE_EXPERIMENTAL_TYPEORM' to 'true' to enable this feature. ",-1))]),_:1,__:[11]})])]),_:1}),h(en,null,{default:v(()=>[h(mn,{modelValue:r.value,"onUpdate:modelValue":c[2]||(c[2]=d=>r.value=d),label:"Enable TypeORM Support","hide-details":"",disabled:""},{label:v(()=>c[13]||(c[13]=[L("span",null,"Enable TypeORM Support",-1)])),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),h(ze,{cols:"12",md:"6"},{default:v(()=>[h(yt,null,{default:v(()=>[h(sn,null,{default:v(()=>[L("h3",null,[c[16]||(c[16]=k(" Experimental Features ")),h(nt,{bottom:""},{activator:v(({props:d})=>[h(J,ge({class:"help-icon"},d),{default:v(()=>c[14]||(c[14]=[k("help_outline")])),_:2,__:[14]},1040)]),default:v(()=>[c[15]||(c[15]=L("span",{class:"tooltip-content"}," Enables the next version of the FDM Monster UI (experimental). ",-1))]),_:1,__:[15]})])]),_:1}),h(en,null,{default:v(()=>[h(mn,{modelValue:s.value,"onUpdate:modelValue":c[3]||(c[3]=d=>s.value=d),label:"Enable Next Client Version (Experimental)","hide-details":"",onChange:l},{label:v(()=>c[17]||(c[17]=[L("span",null,"Enable Next Client Version (Experimental)",-1)])),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),h(Mn,null,{default:v(()=>[h(wn),h(re,{color:"primary",onClick:o},{default:v(()=>c[18]||(c[18]=[k("Save Settings")])),_:1,__:[18]}),h(re,{onClick:a},{default:v(()=>c[19]||(c[19]=[k("Reset to Default")])),_:1,__:[19]})]),_:1})]),_:1})]),_:1})]),_:1}))}}),Gn={requiresAuth:!0},mv={requiresAuth:!1},H0=pY({history:HK("/"),routes:[{path:"/",name:qt.Home,meta:Gn,component:$Q},{path:"/first-time-setup",name:qt.FirstTimeSetup,meta:mv,component:Xre},{path:"/login",name:qt.Login,meta:mv,component:Ore},{path:"/registration",name:qt.Registration,meta:mv,component:Lre},{path:"/printers",name:qt.PrintersView,meta:Gn,component:XJ},{path:"/cameras",name:qt.CameraGridView,component:Fre},{path:"/settings",component:JJ,meta:Gn,children:[{path:"",meta:Gn,redirect:"/settings/grid"},{path:"account",meta:Gn,component:Zre},{path:"server-protection",meta:Gn,component:tse},{path:"grid",meta:Gn,component:ese},{path:"floors",meta:Gn,component:mZ},{path:"user-management",meta:Gn,component:cZ},{path:"printer",meta:Gn,component:dZ},{path:"emergency-commands",meta:Gn,component:bre},{path:"software-upgrade",meta:Gn,component:Xoe},{path:"diagnostics",meta:Gn,component:Qoe},{path:"experimental",meta:Gn,component:nae}]},{path:"/statistics",name:qt.PrintStatistics,meta:Gn,component:tae},{path:"/about",name:"About",component:bZ},{path:"/permission-denied",name:qt.PermissionDenied,meta:Gn,component:Tre},{path:"/:pathMatch(.*)*",name:"NotFound",component:wre}]});H0.beforeEach(async(e,t,n)=>{var s,i;const r=us();if(!((s=e==null?void 0:e.meta)!=null&&s.requiresAuth)||r.loginRequired===!1)return console.debug(`No auth required on route ${e.fullPath}`),n();if(console.debug(`Auth required on route ${e.fullPath} (loginRequired=${r.loginRequired}, registration=${r.registration}, wizardState=${r.wizardState}, requiresAuth=${(i=e==null?void 0:e.meta)==null?void 0:i.requiresAuth})`),r.loadTokens(),!r.hasAuthToken&&!r.hasRefreshToken){if(console.debug("Not logged in, redirecting to login page"),t.path=="/login")throw new Error("Already on login page, cannot redirect");return n({path:"/login",query:{redirect:e.fullPath}})}return n()});const rae={collapse:"keyboard_arrow_up",complete:"check",cancel:"cancel",close:"close",delete:"cancel",clear:"cancel",success:"check_circle",info:"info",warning:"priority_high",error:"warning",prev:"chevron_left",next:"chevron_right",checkboxOn:"check_box",checkboxOff:"check_box_outline_blank",checkboxIndeterminate:"indeterminate_check_box",delimiter:"fiber_manual_record",sortAsc:"arrow_upward",sortDesc:"arrow_downward",expand:"keyboard_arrow_down",menu:"menu",subgroup:"arrow_drop_down",dropdown:"arrow_drop_down",radioOn:"radio_button_checked",radioOff:"radio_button_unchecked",edit:"edit",ratingEmpty:"star_border",ratingFull:"star",ratingHalf:"star_half",loading:"cached",first:"first_page",last:"last_page",unfold:"unfold_more",file:"attach_file",plus:"add",minus:"remove",calendar:"event",treeviewCollapse:"arrow_drop_down",treeviewExpand:"arrow_right",eyeDropper:"colorize"},sae={component:e=>pr(VF,{...e,class:"material-icons"})};function ZM(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{blueprint:t,...n}=e,r=er(t,n),{aliases:s={},components:i={},directives:o={}}=r,a=$a();return a.run(()=>{const l=mF(r.defaults),u=PN(r.display,r.ssr),c=AF(r.theme),d=UF(r.icons),f=YF(r.locale),p=P7(r.date,f),g=Vq(r.goTo,f);function m(_){for(const x in o)_.directive(x,o[x]);for(const x in i)_.component(x,i[x]);for(const x in s)_.component(x,Su({...s[x],name:x,aliasName:s[x].name}));const b=$a();if(b.run(()=>{c.install(_)}),_.onUnmount(()=>b.stop()),_.provide(ru,l),_.provide(Gv,u),_.provide(Gc,c),_.provide(Uv,d),_.provide(Bh,f),_.provide(T7,p.options),_.provide(kk,p.instance),_.provide(IA,g),Et&&r.ssr)if(_.$nuxt)_.$nuxt.hook("app:suspense:resolve",()=>{u.update()});else{const{mount:x}=_;_.mount=function(){const C=x(...arguments);return Mt(()=>u.update()),_.mount=x,C}}_.mixin({computed:{$vuetify(){return cn({defaults:yl.call(this,ru),display:yl.call(this,Gv),theme:yl.call(this,Gc),icons:yl.call(this,Uv),locale:yl.call(this,Bh),date:yl.call(this,kk)})}}})}function y(){a.stop()}return{install:m,unmount:y,defaults:l,display:u,theme:c,icons:d,locale:f,date:p,goTo:g}})}const iae="3.8.4";ZM.version=iae;function yl(e){var r,s;const t=this.$,n=((r=t.parent)==null?void 0:r.provides)??((s=t.vnode.appContext)==null?void 0:s.provides);if(n&&e in n)return n[e]}const oae=ZM({theme:{defaultTheme:"dark",themes:{dark:{dark:!0,colors:{primary:"#1eb6c3",secondary:"#424242",accent:"#82B1FF",error:"#FF5252",info:"#2196F3",success:"#4CAF50",warning:"#FFC107"}},light:{dark:!1,colors:{primary:"#9B0505",secondary:"#424242",accent:"#82B1FF",error:"#FF5252",info:"#2196F3",success:"#4CAF50",warning:"#FFC107"}}}},icons:{defaultSet:"md",aliases:rae,sets:{md:sae}}}),aae=S$();function lae(e){e.use(oae).use(zG).use(aae)}const BE=(e,t,n)=>{const r=Wt(),s=v0(),i=Dt();if(t!=null&&t.length){const o=t.length===1,a=t[0];e.ondrop=async l=>{var f;l.preventDefault(),e.style.border=Cp;const u=(f=l.dataTransfer)==null?void 0:f.files;if(!(u!=null&&u.length))return;const c=[...Array.from(u)];let d=[];if(o){const p=c.length===1?c[0].name:null;console.debug("Single printer upload mode",t.length,c.length,p),d=EQ(a,c)}else{if(c.length>1)throw"Cannot upload multiple files to multiple printers";console.debug("Multi printer upload mode",t.length,c.length);const p=c[0];d=O2(t,p)}s.queueUploads(d),r.clearSelectedPrinters()}}else e.ondrop=async o=>{o.preventDefault(),e.style.border=Cp,i.openInfoMessage({title:"No action performed",subtitle:"Please select one or more printers",warning:!0})}},Cp="1px solid #2b2a27",uae="background-color 0.5s ease",UE="1px solid red";function cae(){return{mounted:(e,t,n)=>{var r;e.style.border=Cp,e.style.transition=uae,e.ondragenter=s=>{s.preventDefault(),e.style.border=UE},e.ondragover=s=>{s.preventDefault(),e.style.border=UE},e.ondragleave=s=>{s.preventDefault(),e.style.border=Cp},BE(e,(r=t.value)==null?void 0:r.printers,n.appContext)},beforeUpdate:(e,t,n)=>{BE(e,t.value,n.appContext)}}}const gv="1px solid #2b2a27",dae="1px solid gray",zE=(e,t,n)=>{const r=t==null?void 0:t.printerSet,s=Zi();if(r){e.ondrop=null,e.ondragover=null,e.ondragleave=null;return}e.style.border=gv,e.ondrop=async i=>{var d;if(e.style.border=gv,i.preventDefault(),!i.dataTransfer)return;const o=i.dataTransfer.getData("text"),a=JSON.parse(o);if(!mQ(a)){console.debug("Drop not recognized",a);return}const u=(d=s.selectedFloor)==null?void 0:d.id;if(!u)throw new Error("Floor is not set");const c=a.printerId;if(!c)throw new Error("PrinterId was not provided");await ns.addPrinterToFloor(u,{printerId:c,x:t.x,y:t.y})},e.ondragover=i=>{i!=null&&i.dataTransfer&&(i.dataTransfer&&Array.from(i.dataTransfer.items).filter(o=>o.kind==="file").length||(e.style.border=dae,i.preventDefault()))},e.ondragleave=i=>{e.style.border=gv,i.preventDefault()}};function fae(){return{mounted:(e,t,n)=>{zE(e,t.value,n.appContext)},beforeUpdate:(e,t,n)=>{zE(e,t.value,n.appContext)}}}const Yo=b$(rQ);console.log("[DEV: false][PROD: true]","0.0.21");vq({app:Yo,dsn:"https://f64683e8d1cb4ac291434993cff1bf9b@o4503975545733120.ingest.sentry.io/4503975546912768",integrations:[_q({router:H0}),L6()],release:"0.0.21",environment:"production",enabled:!0,tracesSampleRate:1,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1});Yo.config.errorHandler=e=>{var t;if(e instanceof eR){console.error(`An error was caught [${e.name}]:
|
|
88
|
+
${e.message}
|
|
89
|
+
${(t=e.config)==null?void 0:t.url}
|
|
90
|
+
${e.stack}`),Dt().openErrorMessage({title:"An error occurred",subtitle:e.message,timeout:5e3});return}else console.error(`An error was caught [${e.name}]:
|
|
91
|
+
${e.message}
|
|
92
|
+
${e.stack}`);Dt().openErrorMessage({title:"An error occurred",subtitle:e.message,timeout:5e3}),ai(e)};Yo.directive("drop-upload",cae());Yo.directive("drop-printer-position",fae());lae(Yo);Yo.provide("appConstants",_Y());Yo.use(H0);Yo.mount("#app");
|
|
93
|
+
//# sourceMappingURL=index-tOR9YF1n.js.map
|