@fdm-monster/client-next 0.0.27 → 0.1.0

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.
@@ -0,0 +1,89 @@
1
+ (function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"0.1.0"}}catch{}})();try{(function(){var 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]="7ece20df-6beb-4954-9f04-803aeae05f35",e._sentryDebugIdIdentifier="sentry-dbid-7ece20df-6beb-4954-9f04-803aeae05f35")})()}catch{}(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 a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).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)}})();function Kv(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const $t={},Mo=[],Ns=()=>{},Ex=()=>!1,Uf=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Yv=e=>e.startsWith("onUpdate:"),Cn=Object.assign,Jv=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},xO=Object.prototype.hasOwnProperty,kt=(e,t)=>xO.call(e,t),We=Array.isArray,Vo=e=>zf(e)==="[object Map]",Cx=e=>zf(e)==="[object Set]",Ye=e=>typeof e=="function",Zt=e=>typeof e=="string",Ti=e=>typeof e=="symbol",Nt=e=>e!==null&&typeof e=="object",Tx=e=>(Nt(e)||Ye(e))&&Ye(e.then)&&Ye(e.catch),Ix=Object.prototype.toString,zf=e=>Ix.call(e),EO=e=>zf(e).slice(8,-1),Rx=e=>zf(e)==="[object Object]",jf=e=>Zt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,au=Kv(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Hf=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},CO=/-\w/g,sr=Hf(e=>e.replace(CO,t=>t.slice(1).toUpperCase())),TO=/\B([A-Z])/g,sa=Hf(e=>e.replace(TO,"-$1").toLowerCase()),js=Hf(e=>e.charAt(0).toUpperCase()+e.slice(1)),em=Hf(e=>e?`on${js(e)}`:""),qi=(e,t)=>!Object.is(e,t),pd=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Px=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Xv=e=>{const t=parseFloat(e);return isNaN(t)?e:t},IO=e=>{const t=Zt(e)?Number(e):NaN;return isNaN(t)?e:t};let M1;const qf=()=>M1||(M1=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Le(e){if(We(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],s=Zt(r)?OO(r):Le(r);if(s)for(const i in s)t[i]=s[i]}return t}else if(Zt(e)||Nt(e))return e}const RO=/;(?![^(]*\))/g,PO=/:([^]+)/,AO=/\/\*[^]*?\*\//g;function OO(e){const t={};return e.replace(AO,"").split(RO).forEach(n=>{if(n){const r=n.split(PO);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function Se(e){let t="";if(Zt(e))t=e;else if(We(e))for(let n=0;n<e.length;n++){const r=Se(e[n]);r&&(t+=r+" ")}else if(Nt(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const DO="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",LO=Kv(DO);function Ax(e){return!!e||e===""}const Ox=e=>!!(e&&e.__v_isRef===!0),Y=e=>Zt(e)?e:e==null?"":We(e)||Nt(e)&&(e.toString===Ix||!Ye(e.toString))?Ox(e)?Y(e.value):JSON.stringify(e,Dx,2):String(e),Dx=(e,t)=>Ox(t)?Dx(e,t.value):Vo(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,s],i)=>(n[tm(r,i)+" =>"]=s,n),{})}:Cx(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>tm(n))}:Ti(t)?tm(t):Nt(t)&&!We(t)&&!Rx(t)?String(t):t,tm=(e,t="")=>{var n;return Ti(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};let zn;class Lx{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=zn,!t&&zn&&(this.index=(zn.scopes||(zn.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=zn;try{return zn=this,t()}finally{zn=n}}}on(){++this._on===1&&(this.prevScope=zn,zn=this)}off(){this._on>0&&--this._on===0&&(zn=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 Ha(e){return new Lx(e)}function cc(){return zn}function Xt(e,t=!1){zn&&zn.cleanups.push(e)}let Ut;const nm=new WeakSet;class $x{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,zn&&zn.active&&zn.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,nm.has(this)&&(nm.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Nx(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,V1(this),Mx(this);const t=Ut,n=cs;Ut=this,cs=!0;try{return this.fn()}finally{Vx(this),Ut=t,cs=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)ey(t);this.deps=this.depsTail=void 0,V1(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?nm.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){rg(this)&&this.run()}get dirty(){return rg(this)}}let Fx=0,ou,lu;function Nx(e,t=!1){if(e.flags|=8,t){e.next=lu,lu=e;return}e.next=ou,ou=e}function Qv(){Fx++}function Zv(){if(--Fx>0)return;if(lu){let t=lu;for(lu=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;ou;){let t=ou;for(ou=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 Mx(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Vx(e){let t,n=e.depsTail,r=n;for(;r;){const s=r.prevDep;r.version===-1?(r===n&&(n=s),ey(r),$O(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}e.deps=t,e.depsTail=n}function rg(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Bx(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Bx(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===ku)||(e.globalVersion=ku,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!rg(e))))return;e.flags|=2;const t=e.dep,n=Ut,r=cs;Ut=e,cs=!0;try{Mx(e);const s=e.fn(e._value);(t.version===0||qi(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{Ut=n,cs=r,Vx(e),e.flags&=-3}}function ey(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)ey(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function $O(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let cs=!0;const Ux=[];function mi(){Ux.push(cs),cs=!1}function hi(){const e=Ux.pop();cs=e===void 0?!0:e}function V1(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ut;Ut=void 0;try{t()}finally{Ut=n}}}let ku=0;class FO{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 ty{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,this.__v_skip=!0}track(t){if(!Ut||!cs||Ut===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ut)n=this.activeLink=new FO(Ut,this),Ut.deps?(n.prevDep=Ut.depsTail,Ut.depsTail.nextDep=n,Ut.depsTail=n):Ut.deps=Ut.depsTail=n,zx(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=Ut.depsTail,n.nextDep=void 0,Ut.depsTail.nextDep=n,Ut.depsTail=n,Ut.deps===n&&(Ut.deps=r)}return n}trigger(t){this.version++,ku++,this.notify(t)}notify(t){Qv();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Zv()}}}function zx(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)zx(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Ud=new WeakMap,Pa=Symbol(""),sg=Symbol(""),xu=Symbol("");function Hn(e,t,n){if(cs&&Ut){let r=Ud.get(e);r||Ud.set(e,r=new Map);let s=r.get(n);s||(r.set(n,s=new ty),s.map=r,s.key=n),s.track()}}function ii(e,t,n,r,s,i){const a=Ud.get(e);if(!a){ku++;return}const o=l=>{l&&l.trigger()};if(Qv(),t==="clear")a.forEach(o);else{const l=We(e),c=l&&jf(n);if(l&&n==="length"){const u=Number(r);a.forEach((d,p)=>{(p==="length"||p===xu||!Ti(p)&&p>=u)&&o(d)})}else switch((n!==void 0||a.has(void 0))&&o(a.get(n)),c&&o(a.get(xu)),t){case"add":l?c&&o(a.get("length")):(o(a.get(Pa)),Vo(e)&&o(a.get(sg)));break;case"delete":l||(o(a.get(Pa)),Vo(e)&&o(a.get(sg)));break;case"set":Vo(e)&&o(a.get(Pa));break}}Zv()}function NO(e,t){const n=Ud.get(e);return n&&n.get(t)}function mo(e){const t=Me(e);return t===e?t:(Hn(t,"iterate",xu),Ar(e)?t:t.map(fs))}function Wf(e){return Hn(e=Me(e),"iterate",xu),e}function Ni(e,t){return vi(e)?li(e)?qo(fs(t)):qo(t):fs(t)}const MO={__proto__:null,[Symbol.iterator](){return rm(this,Symbol.iterator,e=>Ni(this,e))},concat(...e){return mo(this).concat(...e.map(t=>We(t)?mo(t):t))},entries(){return rm(this,"entries",e=>(e[1]=Ni(this,e[1]),e))},every(e,t){return Js(this,"every",e,t,void 0,arguments)},filter(e,t){return Js(this,"filter",e,t,n=>n.map(r=>Ni(this,r)),arguments)},find(e,t){return Js(this,"find",e,t,n=>Ni(this,n),arguments)},findIndex(e,t){return Js(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Js(this,"findLast",e,t,n=>Ni(this,n),arguments)},findLastIndex(e,t){return Js(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Js(this,"forEach",e,t,void 0,arguments)},includes(...e){return sm(this,"includes",e)},indexOf(...e){return sm(this,"indexOf",e)},join(e){return mo(this).join(e)},lastIndexOf(...e){return sm(this,"lastIndexOf",e)},map(e,t){return Js(this,"map",e,t,void 0,arguments)},pop(){return ql(this,"pop")},push(...e){return ql(this,"push",e)},reduce(e,...t){return B1(this,"reduce",e,t)},reduceRight(e,...t){return B1(this,"reduceRight",e,t)},shift(){return ql(this,"shift")},some(e,t){return Js(this,"some",e,t,void 0,arguments)},splice(...e){return ql(this,"splice",e)},toReversed(){return mo(this).toReversed()},toSorted(e){return mo(this).toSorted(e)},toSpliced(...e){return mo(this).toSpliced(...e)},unshift(...e){return ql(this,"unshift",e)},values(){return rm(this,"values",e=>Ni(this,e))}};function rm(e,t,n){const r=Wf(e),s=r[t]();return r!==e&&!Ar(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=n(i.value)),i}),s}const VO=Array.prototype;function Js(e,t,n,r,s,i){const a=Wf(e),o=a!==e&&!Ar(e),l=a[t];if(l!==VO[t]){const d=l.apply(e,i);return o?fs(d):d}let c=n;a!==e&&(o?c=function(d,p){return n.call(this,Ni(e,d),p,e)}:n.length>2&&(c=function(d,p){return n.call(this,d,p,e)}));const u=l.call(a,c,r);return o&&s?s(u):u}function B1(e,t,n,r){const s=Wf(e);let i=n;return s!==e&&(Ar(e)?n.length>3&&(i=function(a,o,l){return n.call(this,a,o,l,e)}):i=function(a,o,l){return n.call(this,a,Ni(e,o),l,e)}),s[t](i,...r)}function sm(e,t,n){const r=Me(e);Hn(r,"iterate",xu);const s=r[t](...n);return(s===-1||s===!1)&&Jf(n[0])?(n[0]=Me(n[0]),r[t](...n)):s}function ql(e,t,n=[]){mi(),Qv();const r=Me(e)[t].apply(e,n);return Zv(),hi(),r}const BO=Kv("__proto__,__v_isRef,__isVue"),jx=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ti));function UO(e){Ti(e)||(e=String(e));const t=Me(this);return Hn(t,"has",e),t.hasOwnProperty(e)}class Hx{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?Jx:Yx:i?Kx:Gx).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const a=We(t);if(!s){let l;if(a&&(l=MO[n]))return l;if(n==="hasOwnProperty")return UO}const o=Reflect.get(t,n,nt(t)?t:r);if((Ti(n)?jx.has(n):BO(n))||(s||Hn(t,"get",n),i))return o;if(nt(o)){const l=a&&jf(n)?o:o.value;return s&&Nt(l)?gi(l):l}return Nt(o)?s?gi(o):Jt(o):o}}class qx extends Hx{constructor(t=!1){super(!1,t)}set(t,n,r,s){let i=t[n];const a=We(t)&&jf(n);if(!this._isShallow){const c=vi(i);if(!Ar(r)&&!vi(r)&&(i=Me(i),r=Me(r)),!a&&nt(i)&&!nt(r))return c||(i.value=r),!0}const o=a?Number(n)<t.length:kt(t,n),l=Reflect.set(t,n,r,nt(t)?t:s);return t===Me(s)&&(o?qi(r,i)&&ii(t,"set",n,r):ii(t,"add",n,r)),l}deleteProperty(t,n){const r=kt(t,n);t[n];const s=Reflect.deleteProperty(t,n);return s&&r&&ii(t,"delete",n,void 0),s}has(t,n){const r=Reflect.has(t,n);return(!Ti(n)||!jx.has(n))&&Hn(t,"has",n),r}ownKeys(t){return Hn(t,"iterate",We(t)?"length":Pa),Reflect.ownKeys(t)}}class Wx extends Hx{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const zO=new qx,jO=new Wx,HO=new qx(!0),qO=new Wx(!0),ig=e=>e,Uc=e=>Reflect.getPrototypeOf(e);function WO(e,t,n){return function(...r){const s=this.__v_raw,i=Me(s),a=Vo(i),o=e==="entries"||e===Symbol.iterator&&a,l=e==="keys"&&a,c=s[e](...r),u=n?ig:t?qo:fs;return!t&&Hn(i,"iterate",l?sg:Pa),{next(){const{value:d,done:p}=c.next();return p?{value:d,done:p}:{value:o?[u(d[0]),u(d[1])]:u(d),done:p}},[Symbol.iterator](){return this}}}}function zc(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function GO(e,t){const n={get(s){const i=this.__v_raw,a=Me(i),o=Me(s);e||(qi(s,o)&&Hn(a,"get",s),Hn(a,"get",o));const{has:l}=Uc(a),c=t?ig:e?qo:fs;if(l.call(a,s))return c(i.get(s));if(l.call(a,o))return c(i.get(o));i!==a&&i.get(s)},get size(){const s=this.__v_raw;return!e&&Hn(Me(s),"iterate",Pa),s.size},has(s){const i=this.__v_raw,a=Me(i),o=Me(s);return e||(qi(s,o)&&Hn(a,"has",s),Hn(a,"has",o)),s===o?i.has(s):i.has(s)||i.has(o)},forEach(s,i){const a=this,o=a.__v_raw,l=Me(o),c=t?ig:e?qo:fs;return!e&&Hn(l,"iterate",Pa),o.forEach((u,d)=>s.call(i,c(u),c(d),a))}};return Cn(n,e?{add:zc("add"),set:zc("set"),delete:zc("delete"),clear:zc("clear")}:{add(s){!t&&!Ar(s)&&!vi(s)&&(s=Me(s));const i=Me(this);return Uc(i).has.call(i,s)||(i.add(s),ii(i,"add",s,s)),this},set(s,i){!t&&!Ar(i)&&!vi(i)&&(i=Me(i));const a=Me(this),{has:o,get:l}=Uc(a);let c=o.call(a,s);c||(s=Me(s),c=o.call(a,s));const u=l.call(a,s);return a.set(s,i),c?qi(i,u)&&ii(a,"set",s,i):ii(a,"add",s,i),this},delete(s){const i=Me(this),{has:a,get:o}=Uc(i);let l=a.call(i,s);l||(s=Me(s),l=a.call(i,s)),o&&o.call(i,s);const c=i.delete(s);return l&&ii(i,"delete",s,void 0),c},clear(){const s=Me(this),i=s.size!==0,a=s.clear();return i&&ii(s,"clear",void 0,void 0),a}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=WO(s,e,t)}),n}function Gf(e,t){const n=GO(e,t);return(r,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?r:Reflect.get(kt(n,s)&&s in r?n:r,s,i)}const KO={get:Gf(!1,!1)},YO={get:Gf(!1,!0)},JO={get:Gf(!0,!1)},XO={get:Gf(!0,!0)},Gx=new WeakMap,Kx=new WeakMap,Yx=new WeakMap,Jx=new WeakMap;function QO(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ZO(e){return e.__v_skip||!Object.isExtensible(e)?0:QO(EO(e))}function Jt(e){return vi(e)?e:Yf(e,!1,zO,KO,Gx)}function Kf(e){return Yf(e,!1,HO,YO,Kx)}function gi(e){return Yf(e,!0,jO,JO,Yx)}function ny(e){return Yf(e,!0,qO,XO,Jx)}function Yf(e,t,n,r,s){if(!Nt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=ZO(e);if(i===0)return e;const a=s.get(e);if(a)return a;const o=new Proxy(e,i===2?r:n);return s.set(e,o),o}function li(e){return vi(e)?li(e.__v_raw):!!(e&&e.__v_isReactive)}function vi(e){return!!(e&&e.__v_isReadonly)}function Ar(e){return!!(e&&e.__v_isShallow)}function Jf(e){return e?!!e.__v_raw:!1}function Me(e){const t=e&&e.__v_raw;return t?Me(t):e}function Xf(e){return!kt(e,"__v_skip")&&Object.isExtensible(e)&&Px(e,"__v_skip",!0),e}const fs=e=>Nt(e)?Jt(e):e,qo=e=>Nt(e)?gi(e):e;function nt(e){return e?e.__v_isRef===!0:!1}function q(e){return Xx(e,!1)}function Ee(e){return Xx(e,!0)}function Xx(e,t){return nt(e)?e:new eD(e,t)}class eD{constructor(t,n){this.dep=new ty,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Me(t),this._value=n?t:fs(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||Ar(t)||vi(t);t=r?t:Me(t),qi(t,n)&&(this._rawValue=t,this._value=r?t:fs(t),this.dep.trigger())}}function Q(e){return nt(e)?e.value:e}function Rt(e){return Ye(e)?e():Q(e)}const tD={get:(e,t,n)=>t==="__v_raw"?e:Q(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const s=e[t];return nt(s)&&!nt(n)?(s.value=n,!0):Reflect.set(e,t,n,r)}};function Qx(e){return li(e)?e:new Proxy(e,tD)}function Ii(e){const t=We(e)?new Array(e.length):{};for(const n in e)t[n]=Zx(e,n);return t}class nD{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0,this._raw=Me(t);let s=!0,i=t;if(!We(t)||!jf(String(n)))do s=!Jf(i)||Ar(i);while(s&&(i=i.__v_raw));this._shallow=s}get value(){let t=this._object[this._key];return this._shallow&&(t=Q(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&nt(this._raw[this._key])){const n=this._object[this._key];if(nt(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return NO(this._raw,this._key)}}class rD{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 ee(e,t,n){return nt(e)?e:Ye(e)?new rD(e):Nt(e)&&arguments.length>1?Zx(e,t,n):q(e)}function Zx(e,t,n){return new nD(e,t,n)}class sD{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new ty(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=ku-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&Ut!==this)return Nx(this,!0),!0}get value(){const t=this.dep.track();return Bx(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function iD(e,t,n=!1){let r,s;return Ye(e)?r=e:(r=e.get,s=e.set),new sD(r,s,n)}const jc={},zd=new WeakMap;let ya;function aD(e,t=!1,n=ya){if(n){let r=zd.get(n);r||zd.set(n,r=[]),r.push(e)}}function oD(e,t,n=$t){const{immediate:r,deep:s,once:i,scheduler:a,augmentJob:o,call:l}=n,c=T=>s?T:Ar(T)||s===!1||s===0?ai(T,1):ai(T);let u,d,p,m,v=!1,g=!1;if(nt(e)?(d=()=>e.value,v=Ar(e)):li(e)?(d=()=>c(e),v=!0):We(e)?(g=!0,v=e.some(T=>li(T)||Ar(T)),d=()=>e.map(T=>{if(nt(T))return T.value;if(li(T))return c(T);if(Ye(T))return l?l(T,2):T()})):Ye(e)?t?d=l?()=>l(e,2):e:d=()=>{if(p){mi();try{p()}finally{hi()}}const T=ya;ya=u;try{return l?l(e,3,[m]):e(m)}finally{ya=T}}:d=Ns,t&&s){const T=d,P=s===!0?1/0:s;d=()=>ai(T(),P)}const b=cc(),y=()=>{u.stop(),b&&b.active&&Jv(b.effects,u)};if(i&&t){const T=t;t=(...P)=>{T(...P),y()}}let w=g?new Array(e.length).fill(jc):jc;const _=T=>{if(!(!(u.flags&1)||!u.dirty&&!T))if(t){const P=u.run();if(s||v||(g?P.some((x,C)=>qi(x,w[C])):qi(P,w))){p&&p();const x=ya;ya=u;try{const C=[P,w===jc?void 0:g&&w[0]===jc?[]:w,m];w=P,l?l(t,3,C):t(...C)}finally{ya=x}}}else u.run()};return o&&o(_),u=new $x(d),u.scheduler=a?()=>a(_,!1):_,m=T=>aD(T,!1,u),p=u.onStop=()=>{const T=zd.get(u);if(T){if(l)l(T,4);else for(const P of T)P();zd.delete(u)}},t?r?_(!0):w=u.run():a?a(_.bind(null,!0),!0):u.run(),y.pause=u.pause.bind(u),y.resume=u.resume.bind(u),y.stop=y,y}function ai(e,t=1/0,n){if(t<=0||!Nt(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,nt(e))ai(e.value,t,n);else if(We(e))for(let r=0;r<e.length;r++)ai(e[r],t,n);else if(Cx(e)||Vo(e))e.forEach(r=>{ai(r,t,n)});else if(Rx(e)){for(const r in e)ai(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&ai(e[r],t,n)}return e}function dc(e,t,n,r){try{return r?e(...r):e()}catch(s){Qf(s,t,n)}}function ps(e,t,n,r){if(Ye(e)){const s=dc(e,t,n,r);return s&&Tx(s)&&s.catch(i=>{Qf(i,t,n)}),s}if(We(e)){const s=[];for(let i=0;i<e.length;i++)s.push(ps(e[i],t,n,r));return s}}function Qf(e,t,n,r=!0){const s=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:a}=t&&t.appContext.config||$t;if(t){let o=t.parent;const l=t.proxy,c=`https://vuejs.org/error-reference/#runtime-${n}`;for(;o;){const u=o.ec;if(u){for(let d=0;d<u.length;d++)if(u[d](e,l,c)===!1)return}o=o.parent}if(i){mi(),dc(i,null,10,[e,l,c]),hi();return}}lD(e,n,s,r,a)}function lD(e,t,n,r=!0,s=!1){if(s)throw e;console.error(e)}const tr=[];let Os=-1;const Bo=[];let Mi=null,xo=0;const eE=Promise.resolve();let jd=null;function ut(e){const t=jd||eE;return e?t.then(this?e.bind(this):e):t}function uD(e){let t=Os+1,n=tr.length;for(;t<n;){const r=t+n>>>1,s=tr[r],i=Eu(s);i<e||i===e&&s.flags&2?t=r+1:n=r}return t}function ry(e){if(!(e.flags&1)){const t=Eu(e),n=tr[tr.length-1];!n||!(e.flags&2)&&t>=Eu(n)?tr.push(e):tr.splice(uD(t),0,e),e.flags|=1,tE()}}function tE(){jd||(jd=eE.then(rE))}function cD(e){We(e)?Bo.push(...e):Mi&&e.id===-1?Mi.splice(xo+1,0,e):e.flags&1||(Bo.push(e),e.flags|=1),tE()}function U1(e,t,n=Os+1){for(;n<tr.length;n++){const r=tr[n];if(r&&r.flags&2){if(e&&r.id!==e.uid)continue;tr.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function nE(e){if(Bo.length){const t=[...new Set(Bo)].sort((n,r)=>Eu(n)-Eu(r));if(Bo.length=0,Mi){Mi.push(...t);return}for(Mi=t,xo=0;xo<Mi.length;xo++){const n=Mi[xo];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Mi=null,xo=0}}const Eu=e=>e.id==null?e.flags&2?-1:1/0:e.id;function rE(e){try{for(Os=0;Os<tr.length;Os++){const t=tr[Os];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),dc(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Os<tr.length;Os++){const t=tr[Os];t&&(t.flags&=-2)}Os=-1,tr.length=0,nE(),jd=null,(tr.length||Bo.length)&&rE()}}let $n=null,sE=null;function Hd(e){const t=$n;return $n=e,sE=e&&e.type.__scopeId||null,t}function h(e,t=$n,n){if(!t||e._n)return e;const r=(...s)=>{r._d&&Kd(-1);const i=Hd(t);let a;try{a=e(...s)}finally{Hd(i),r._d&&Kd(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function Pt(e,t){if($n===null)return e;const n=rp($n),r=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[i,a,o,l=$t]=t[s];i&&(Ye(i)&&(i={mounted:i,updated:i}),i.deep&&ai(a),r.push({dir:i,instance:n,value:a,oldValue:void 0,arg:o,modifiers:l}))}return e}function fa(e,t,n,r){const s=e.dirs,i=t&&t.dirs;for(let a=0;a<s.length;a++){const o=s[a];i&&(o.oldValue=i[a].value);let l=o.dir[r];l&&(mi(),ps(l,n,8,[e.el,o,e,t]),hi())}}function Dt(e,t){if(qn){let n=qn.provides;const r=qn.parent&&qn.parent.provides;r===n&&(n=qn.provides=Object.create(r)),n[e]=t}}function He(e,t,n=!1){const r=hl();if(r||Aa){let s=Aa?Aa._context.provides:r?r.parent==null||r.ce?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&&Ye(t)?t.call(r&&r.proxy):t}}function iE(){return!!(hl()||Aa)}const dD=Symbol.for("v-scx"),fD=()=>He(dD);function bn(e,t){return sy(e,null,t)}function _e(e,t,n){return sy(e,t,n)}function sy(e,t,n=$t){const{immediate:r,deep:s,flush:i,once:a}=n,o=Cn({},n),l=t&&r||!t&&i!=="post";let c;if(Ru){if(i==="sync"){const m=fD();c=m.__watcherHandles||(m.__watcherHandles=[])}else if(!l){const m=()=>{};return m.stop=Ns,m.resume=Ns,m.pause=Ns,m}}const u=qn;o.call=(m,v,g)=>ps(m,u,v,g);let d=!1;i==="post"?o.scheduler=m=>{Zn(m,u&&u.suspense)}:i!=="sync"&&(d=!0,o.scheduler=(m,v)=>{v?m():ry(m)}),o.augmentJob=m=>{t&&(m.flags|=4),d&&(m.flags|=2,u&&(m.id=u.uid,m.i=u))};const p=oD(e,t,o);return Ru&&(c?c.push(p):l&&p()),p}function pD(e,t,n){const r=this.proxy,s=Zt(e)?e.includes(".")?aE(r,e):()=>r[e]:e.bind(r,r);let i;Ye(t)?i=t:(i=t.handler,n=t);const a=pc(this),o=sy(s,i.bind(r),n);return a(),o}function aE(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 oE=Symbol("_vte"),lE=e=>e.__isTeleport,uu=e=>e&&(e.disabled||e.disabled===""),z1=e=>e&&(e.defer||e.defer===""),j1=e=>typeof SVGElement<"u"&&e instanceof SVGElement,H1=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,ag=(e,t)=>{const n=e&&e.to;return Zt(n)?t?t(n):null:n},uE={name:"Teleport",__isTeleport:!0,process(e,t,n,r,s,i,a,o,l,c){const{mc:u,pc:d,pbc:p,o:{insert:m,querySelector:v,createText:g,createComment:b}}=c,y=uu(t.props);let{shapeFlag:w,children:_,dynamicChildren:T}=t;if(e==null){const P=t.el=g(""),x=t.anchor=g("");m(P,n,r),m(x,n,r);const C=(R,I)=>{w&16&&u(_,R,I,s,i,a,o,l)},E=()=>{const R=t.target=ag(t.props,v),I=cE(R,t,g,m);R&&(a!=="svg"&&j1(R)?a="svg":a!=="mathml"&&H1(R)&&(a="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(R),y||(C(R,I),md(t,!1)))};y&&(C(n,x),md(t,!0)),z1(t.props)?(t.el.__isMounted=!1,Zn(()=>{E(),delete t.el.__isMounted},i)):E()}else{if(z1(t.props)&&e.el.__isMounted===!1){Zn(()=>{uE.process(e,t,n,r,s,i,a,o,l,c)},i);return}t.el=e.el,t.targetStart=e.targetStart;const P=t.anchor=e.anchor,x=t.target=e.target,C=t.targetAnchor=e.targetAnchor,E=uu(e.props),R=E?n:x,I=E?P:C;if(a==="svg"||j1(x)?a="svg":(a==="mathml"||H1(x))&&(a="mathml"),T?(p(e.dynamicChildren,T,R,s,i,a,o),fy(e,t,!0)):l||d(e,t,R,I,s,i,a,o,!1),y)E?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Hc(t,n,P,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const O=t.target=ag(t.props,v);O&&Hc(t,O,null,c,0)}else E&&Hc(t,x,C,c,1);md(t,y)}},remove(e,t,n,{um:r,o:{remove:s}},i){const{shapeFlag:a,children:o,anchor:l,targetStart:c,targetAnchor:u,target:d,props:p}=e;if(d&&(s(c),s(u)),i&&s(l),a&16){const m=i||!uu(p);for(let v=0;v<o.length;v++){const g=o[v];r(g,t,n,m,!!g.dynamicChildren)}}},move:Hc,hydrate:mD};function Hc(e,t,n,{o:{insert:r},m:s},i=2){i===0&&r(e.targetAnchor,t,n);const{el:a,anchor:o,shapeFlag:l,children:c,props:u}=e,d=i===2;if(d&&r(a,t,n),(!d||uu(u))&&l&16)for(let p=0;p<c.length;p++)s(c[p],t,n,2);d&&r(o,t,n)}function mD(e,t,n,r,s,i,{o:{nextSibling:a,parentNode:o,querySelector:l,insert:c,createText:u}},d){function p(g,b,y,w){b.anchor=d(a(g),b,o(g),n,r,s,i),b.targetStart=y,b.targetAnchor=w}const m=t.target=ag(t.props,l),v=uu(t.props);if(m){const g=m._lpa||m.firstChild;if(t.shapeFlag&16)if(v)p(e,t,g,g&&a(g));else{t.anchor=a(e);let b=g;for(;b;){if(b&&b.nodeType===8){if(b.data==="teleport start anchor")t.targetStart=b;else if(b.data==="teleport anchor"){t.targetAnchor=b,m._lpa=t.targetAnchor&&a(t.targetAnchor);break}}b=a(b)}t.targetAnchor||cE(m,t,u,c),d(g&&a(g),t,m,n,r,s,i)}md(t,v)}else v&&t.shapeFlag&16&&p(e,t,e,a(e));return t.anchor&&a(t.anchor)}const hD=uE;function md(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 cE(e,t,n,r){const s=t.targetStart=n(""),i=t.targetAnchor=n("");return s[oE]=i,e&&(r(s,e),r(i,e)),i}const ri=Symbol("_leaveCb"),qc=Symbol("_enterCb");function dE(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return ot(()=>{e.isMounted=!0}),Mn(()=>{e.isUnmounting=!0}),e}const Ur=[Function,Array],fE={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ur,onEnter:Ur,onAfterEnter:Ur,onEnterCancelled:Ur,onBeforeLeave:Ur,onLeave:Ur,onAfterLeave:Ur,onLeaveCancelled:Ur,onBeforeAppear:Ur,onAppear:Ur,onAfterAppear:Ur,onAppearCancelled:Ur},pE=e=>{const t=e.subTree;return t.component?pE(t.component):t},gD={name:"BaseTransition",props:fE,setup(e,{slots:t}){const n=hl(),r=dE();return()=>{const s=t.default&&iy(t.default(),!0);if(!s||!s.length)return;const i=mE(s),a=Me(e),{mode:o}=a;if(r.isLeaving)return im(i);const l=q1(i);if(!l)return im(i);let c=Cu(l,a,r,n,d=>c=d);l.type!==Dn&&qa(l,c);let u=n.subTree&&q1(n.subTree);if(u&&u.type!==Dn&&!wa(u,l)&&pE(n).type!==Dn){let d=Cu(u,a,r,n);if(qa(u,d),o==="out-in"&&l.type!==Dn)return r.isLeaving=!0,d.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,u=void 0},im(i);o==="in-out"&&l.type!==Dn?d.delayLeave=(p,m,v)=>{const g=hE(r,u);g[String(u.key)]=u,p[ri]=()=>{m(),p[ri]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{v(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return i}}};function mE(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Dn){t=n;break}}return t}const vD=gD;function hE(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 Cu(e,t,n,r,s){const{appear:i,mode:a,persisted:o=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:p,onLeave:m,onAfterLeave:v,onLeaveCancelled:g,onBeforeAppear:b,onAppear:y,onAfterAppear:w,onAppearCancelled:_}=t,T=String(e.key),P=hE(n,e),x=(R,I)=>{R&&ps(R,r,9,I)},C=(R,I)=>{const O=I[1];x(R,I),We(R)?R.every(L=>L.length<=1)&&O():R.length<=1&&O()},E={mode:a,persisted:o,beforeEnter(R){let I=l;if(!n.isMounted)if(i)I=b||l;else return;R[ri]&&R[ri](!0);const O=P[T];O&&wa(e,O)&&O.el[ri]&&O.el[ri](),x(I,[R])},enter(R){let I=c,O=u,L=d;if(!n.isMounted)if(i)I=y||c,O=w||u,L=_||d;else return;let V=!1;const F=R[qc]=B=>{V||(V=!0,B?x(L,[R]):x(O,[R]),E.delayedLeave&&E.delayedLeave(),R[qc]=void 0)};I?C(I,[R,F]):F()},leave(R,I){const O=String(e.key);if(R[qc]&&R[qc](!0),n.isUnmounting)return I();x(p,[R]);let L=!1;const V=R[ri]=F=>{L||(L=!0,I(),F?x(g,[R]):x(v,[R]),R[ri]=void 0,P[O]===e&&delete P[O])};P[O]=e,m?C(m,[R,V]):V()},clone(R){const I=Cu(R,t,n,r,s);return s&&s(I),I}};return E}function im(e){if(Zf(e))return e=yi(e),e.children=null,e}function q1(e){if(!Zf(e))return lE(e.type)&&e.children?mE(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&&Ye(n.default))return n.default()}}function qa(e,t){e.shapeFlag&6&&e.component?(e.transition=t,qa(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 iy(e,t=!1,n){let r=[],s=0;for(let i=0;i<e.length;i++){let a=e[i];const o=n==null?a.key:String(n)+String(a.key!=null?a.key:i);a.type===ke?(a.patchFlag&128&&s++,r=r.concat(iy(a.children,t,o))):(t||a.type!==Dn)&&r.push(o!=null?yi(a,{key:o}):a)}if(s>1)for(let i=0;i<r.length;i++)r[i].patchFlag=-2;return r}function Ae(e,t){return Ye(e)?Cn({name:e.name},t,{setup:e}):e}function Sr(){const e=hl();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function gE(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const qd=new WeakMap;function cu(e,t,n,r,s=!1){if(We(e)){e.forEach((v,g)=>cu(v,t&&(We(t)?t[g]:t),n,r,s));return}if(Uo(r)&&!s){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&cu(e,t,n,r.component.subTree);return}const i=r.shapeFlag&4?rp(r.component):r.el,a=s?null:i,{i:o,r:l}=e,c=t&&t.r,u=o.refs===$t?o.refs={}:o.refs,d=o.setupState,p=Me(d),m=d===$t?Ex:v=>kt(p,v);if(c!=null&&c!==l){if(W1(t),Zt(c))u[c]=null,m(c)&&(d[c]=null);else if(nt(c)){c.value=null;const v=t;v.k&&(u[v.k]=null)}}if(Ye(l))dc(l,o,12,[a,u]);else{const v=Zt(l),g=nt(l);if(v||g){const b=()=>{if(e.f){const y=v?m(l)?d[l]:u[l]:l.value;if(s)We(y)&&Jv(y,i);else if(We(y))y.includes(i)||y.push(i);else if(v)u[l]=[i],m(l)&&(d[l]=u[l]);else{const w=[i];l.value=w,e.k&&(u[e.k]=w)}}else v?(u[l]=a,m(l)&&(d[l]=a)):g&&(l.value=a,e.k&&(u[e.k]=a))};if(a){const y=()=>{b(),qd.delete(e)};y.id=-1,qd.set(e,y),Zn(y,n)}else W1(e),b()}}}function W1(e){const t=qd.get(e);t&&(t.flags|=8,qd.delete(e))}qf().requestIdleCallback;qf().cancelIdleCallback;const Uo=e=>!!e.type.__asyncLoader,Zf=e=>e.type.__isKeepAlive;function vE(e,t){yE(e,"a",t)}function ay(e,t){yE(e,"da",t)}function yE(e,t,n=qn){const r=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(ep(t,r,n),n){let s=n.parent;for(;s&&s.parent;)Zf(s.parent.vnode)&&yD(r,t,n,s),s=s.parent}}function yD(e,t,n,r){const s=ep(t,e,r,!0);tp(()=>{Jv(r[t],s)},n)}function ep(e,t,n=qn,r=!1){if(n){const s=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...a)=>{mi();const o=pc(n),l=ps(t,n,e,a);return o(),hi(),l});return r?s.unshift(i):s.push(i),i}}const Ri=e=>(t,n=qn)=>{(!Ru||e==="sp")&&ep(e,(...r)=>t(...r),n)},ml=Ri("bm"),ot=Ri("m"),bE=Ri("bu"),oy=Ri("u"),Mn=Ri("bum"),tp=Ri("um"),bD=Ri("sp"),SD=Ri("rtg"),wD=Ri("rtc");function _D(e,t=qn){ep("ec",e,t)}const ly="components",kD="directives";function Tu(e,t){return uy(ly,e,!0,t)||e}const xD=Symbol.for("v-ndc");function ED(e){return Zt(e)&&uy(ly,e,!1)||e}function Wd(e){return uy(kD,e)}function uy(e,t,n=!0,r=!1){const s=$n||qn;if(s){const i=s.type;if(e===ly){const o=uL(i,!1);if(o&&(o===t||o===sr(t)||o===js(sr(t))))return i}const a=G1(s[e]||i[e],t)||G1(s.appContext[e],t);return!a&&r?i:a}}function G1(e,t){return e&&(e[t]||e[sr(t)]||e[js(sr(t))])}function Ot(e,t,n,r){let s;const i=n,a=We(e);if(a||Zt(e)){const o=a&&li(e);let l=!1,c=!1;o&&(l=!Ar(e),c=vi(e),e=Wf(e)),s=new Array(e.length);for(let u=0,d=e.length;u<d;u++)s[u]=t(l?c?qo(fs(e[u])):fs(e[u]):e[u],u,void 0,i)}else if(typeof e=="number"){s=new Array(e);for(let o=0;o<e;o++)s[o]=t(o+1,o,void 0,i)}else if(Nt(e))if(e[Symbol.iterator])s=Array.from(e,(o,l)=>t(o,l,void 0,i));else{const o=Object.keys(e);s=new Array(o.length);for(let l=0,c=o.length;l<c;l++){const u=o[l];s[l]=t(e[u],u,l,i)}}else s=[];return s}function CD(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 Wo(e,t,n={},r,s){if($n.ce||$n.parent&&Uo($n.parent)&&$n.parent.ce){const c=Object.keys(n).length>0;return $(),J(ke,null,[f("slot",n,r&&r())],c?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),$();const a=i&&SE(i(n)),o=n.key||a&&a.key,l=J(ke,{key:(o&&!Ti(o)?o:`_${t}`)+(!a&&r?"_fb":"")},a||(r?r():[]),a&&e._===1?64:-2);return l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),i&&i._c&&(i._d=!0),l}function SE(e){return e.some(t=>Go(t)?!(t.type===Dn||t.type===ke&&!SE(t.children)):!0)?e:null}const og=e=>e?ME(e)?rp(e):og(e.parent):null,du=Cn(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=>og(e.parent),$root:e=>og(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>_E(e),$forceUpdate:e=>e.f||(e.f=()=>{ry(e.update)}),$nextTick:e=>e.n||(e.n=ut.bind(e.proxy)),$watch:e=>pD.bind(e)}),am=(e,t)=>e!==$t&&!e.__isScriptSetup&&kt(e,t),TD={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:s,props:i,accessCache:a,type:o,appContext:l}=e;if(t[0]!=="$"){const p=a[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(am(r,t))return a[t]=1,r[t];if(s!==$t&&kt(s,t))return a[t]=2,s[t];if(kt(i,t))return a[t]=3,i[t];if(n!==$t&&kt(n,t))return a[t]=4,n[t];lg&&(a[t]=0)}}const c=du[t];let u,d;if(c)return t==="$attrs"&&Hn(e.attrs,"get",""),c(e);if((u=o.__cssModules)&&(u=u[t]))return u;if(n!==$t&&kt(n,t))return a[t]=4,n[t];if(d=l.config.globalProperties,kt(d,t))return d[t]},set({_:e},t,n){const{data:r,setupState:s,ctx:i}=e;return am(s,t)?(s[t]=n,!0):r!==$t&&kt(r,t)?(r[t]=n,!0):kt(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,props:i,type:a}},o){let l;return!!(n[o]||e!==$t&&o[0]!=="$"&&kt(e,o)||am(t,o)||kt(i,o)||kt(r,o)||kt(du,o)||kt(s.config.globalProperties,o)||(l=a.__cssModules)&&l[o])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:kt(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function K1(e){return We(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let lg=!0;function ID(e){const t=_E(e),n=e.proxy,r=e.ctx;lg=!1,t.beforeCreate&&Y1(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:a,watch:o,provide:l,inject:c,created:u,beforeMount:d,mounted:p,beforeUpdate:m,updated:v,activated:g,deactivated:b,beforeDestroy:y,beforeUnmount:w,destroyed:_,unmounted:T,render:P,renderTracked:x,renderTriggered:C,errorCaptured:E,serverPrefetch:R,expose:I,inheritAttrs:O,components:L,directives:V,filters:F}=t;if(c&&RD(c,r,null),a)for(const N in a){const D=a[N];Ye(D)&&(r[N]=D.bind(n))}if(s){const N=s.call(n,n);Nt(N)&&(e.data=Jt(N))}if(lg=!0,i)for(const N in i){const D=i[N],W=Ye(D)?D.bind(n,n):Ye(D.get)?D.get.bind(n,n):Ns,z=!Ye(D)&&Ye(D.set)?D.set.bind(n):Ns,K=A({get:W,set:z});Object.defineProperty(r,N,{enumerable:!0,configurable:!0,get:()=>K.value,set:H=>K.value=H})}if(o)for(const N in o)wE(o[N],r,n,N);if(l){const N=Ye(l)?l.call(n):l;Reflect.ownKeys(N).forEach(D=>{Dt(D,N[D])})}u&&Y1(u,e,"c");function M(N,D){We(D)?D.forEach(W=>N(W.bind(n))):D&&N(D.bind(n))}if(M(ml,d),M(ot,p),M(bE,m),M(oy,v),M(vE,g),M(ay,b),M(_D,E),M(wD,x),M(SD,C),M(Mn,w),M(tp,T),M(bD,R),We(I))if(I.length){const N=e.exposed||(e.exposed={});I.forEach(D=>{Object.defineProperty(N,D,{get:()=>n[D],set:W=>n[D]=W,enumerable:!0})})}else e.exposed||(e.exposed={});P&&e.render===Ns&&(e.render=P),O!=null&&(e.inheritAttrs=O),L&&(e.components=L),V&&(e.directives=V),R&&gE(e)}function RD(e,t,n=Ns){We(e)&&(e=ug(e));for(const r in e){const s=e[r];let i;Nt(s)?"default"in s?i=He(s.from||r,s.default,!0):i=He(s.from||r):i=He(s),nt(i)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:a=>i.value=a}):t[r]=i}}function Y1(e,t,n){ps(We(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function wE(e,t,n,r){let s=r.includes(".")?aE(n,r):()=>n[r];if(Zt(e)){const i=t[e];Ye(i)&&_e(s,i)}else if(Ye(e))_e(s,e.bind(n));else if(Nt(e))if(We(e))e.forEach(i=>wE(i,t,n,r));else{const i=Ye(e.handler)?e.handler.bind(n):t[e.handler];Ye(i)&&_e(s,i,e)}}function _E(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:s,optionsCache:i,config:{optionMergeStrategies:a}}=e.appContext,o=i.get(t);let l;return o?l=o:!s.length&&!n&&!r?l=t:(l={},s.length&&s.forEach(c=>Gd(l,c,a,!0)),Gd(l,t,a)),Nt(t)&&i.set(t,l),l}function Gd(e,t,n,r=!1){const{mixins:s,extends:i}=t;i&&Gd(e,i,n,!0),s&&s.forEach(a=>Gd(e,a,n,!0));for(const a in t)if(!(r&&a==="expose")){const o=PD[a]||n&&n[a];e[a]=o?o(e[a],t[a]):t[a]}return e}const PD={data:J1,props:X1,emits:X1,methods:nu,computed:nu,beforeCreate:Xn,created:Xn,beforeMount:Xn,mounted:Xn,beforeUpdate:Xn,updated:Xn,beforeDestroy:Xn,beforeUnmount:Xn,destroyed:Xn,unmounted:Xn,activated:Xn,deactivated:Xn,errorCaptured:Xn,serverPrefetch:Xn,components:nu,directives:nu,watch:OD,provide:J1,inject:AD};function J1(e,t){return t?e?function(){return Cn(Ye(e)?e.call(this,this):e,Ye(t)?t.call(this,this):t)}:t:e}function AD(e,t){return nu(ug(e),ug(t))}function ug(e){if(We(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Xn(e,t){return e?[...new Set([].concat(e,t))]:t}function nu(e,t){return e?Cn(Object.create(null),e,t):t}function X1(e,t){return e?We(e)&&We(t)?[...new Set([...e,...t])]:Cn(Object.create(null),K1(e),K1(t??{})):t}function OD(e,t){if(!e)return t;if(!t)return e;const n=Cn(Object.create(null),e);for(const r in t)n[r]=Xn(e[r],t[r]);return n}function kE(){return{app:null,config:{isNativeTag:Ex,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 DD=0;function LD(e,t){return function(r,s=null){Ye(r)||(r=Cn({},r)),s!=null&&!Nt(s)&&(s=null);const i=kE(),a=new WeakSet,o=[];let l=!1;const c=i.app={_uid:DD++,_component:r,_props:s,_container:null,_context:i,_instance:null,version:dL,get config(){return i.config},set config(u){},use(u,...d){return a.has(u)||(u&&Ye(u.install)?(a.add(u),u.install(c,...d)):Ye(u)&&(a.add(u),u(c,...d))),c},mixin(u){return i.mixins.includes(u)||i.mixins.push(u),c},component(u,d){return d?(i.components[u]=d,c):i.components[u]},directive(u,d){return d?(i.directives[u]=d,c):i.directives[u]},mount(u,d,p){if(!l){const m=c._ceVNode||f(r,s);return m.appContext=i,p===!0?p="svg":p===!1&&(p=void 0),e(m,u,p),l=!0,c._container=u,u.__vue_app__=c,rp(m.component)}},onUnmount(u){o.push(u)},unmount(){l&&(ps(o,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(u,d){return i.provides[u]=d,c},runWithContext(u){const d=Aa;Aa=c;try{return u()}finally{Aa=d}}};return c}}let Aa=null;const $D=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${sr(t)}Modifiers`]||e[`${sa(t)}Modifiers`];function FD(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||$t;let s=n;const i=t.startsWith("update:"),a=i&&$D(r,t.slice(7));a&&(a.trim&&(s=n.map(u=>Zt(u)?u.trim():u)),a.number&&(s=n.map(Xv)));let o,l=r[o=em(t)]||r[o=em(sr(t))];!l&&i&&(l=r[o=em(sa(t))]),l&&ps(l,e,6,s);const c=r[o+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[o])return;e.emitted[o]=!0,ps(c,e,6,s)}}const ND=new WeakMap;function xE(e,t,n=!1){const r=n?ND:t.emitsCache,s=r.get(e);if(s!==void 0)return s;const i=e.emits;let a={},o=!1;if(!Ye(e)){const l=c=>{const u=xE(c,t,!0);u&&(o=!0,Cn(a,u))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!i&&!o?(Nt(e)&&r.set(e,null),null):(We(i)?i.forEach(l=>a[l]=null):Cn(a,i),Nt(e)&&r.set(e,a),a)}function np(e,t){return!e||!Uf(t)?!1:(t=t.slice(2).replace(/Once$/,""),kt(e,t[0].toLowerCase()+t.slice(1))||kt(e,sa(t))||kt(e,t))}function Q1(e){const{type:t,vnode:n,proxy:r,withProxy:s,propsOptions:[i],slots:a,attrs:o,emit:l,render:c,renderCache:u,props:d,data:p,setupState:m,ctx:v,inheritAttrs:g}=e,b=Hd(e);let y,w;try{if(n.shapeFlag&4){const T=s||r,P=T;y=Ds(c.call(P,T,u,d,m,p,v)),w=o}else{const T=t;y=Ds(T.length>1?T(d,{attrs:o,slots:a,emit:l}):T(d,null)),w=t.props?o:MD(o)}}catch(T){fu.length=0,Qf(T,e,1),y=f(Dn)}let _=y;if(w&&g!==!1){const T=Object.keys(w),{shapeFlag:P}=_;T.length&&P&7&&(i&&T.some(Yv)&&(w=VD(w,i)),_=yi(_,w,!1,!0))}return n.dirs&&(_=yi(_,null,!1,!0),_.dirs=_.dirs?_.dirs.concat(n.dirs):n.dirs),n.transition&&qa(_,n.transition),y=_,Hd(b),y}const MD=e=>{let t;for(const n in e)(n==="class"||n==="style"||Uf(n))&&((t||(t={}))[n]=e[n]);return t},VD=(e,t)=>{const n={};for(const r in e)(!Yv(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function BD(e,t,n){const{props:r,children:s,component:i}=e,{props:a,children:o,patchFlag:l}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?Z1(r,a,c):!!a;if(l&8){const u=t.dynamicProps;for(let d=0;d<u.length;d++){const p=u[d];if(a[p]!==r[p]&&!np(c,p))return!0}}}else return(s||o)&&(!o||!o.$stable)?!0:r===a?!1:r?a?Z1(r,a,c):!0:!!a;return!1}function Z1(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]&&!np(n,i))return!0}return!1}function UD({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 EE={},CE=()=>Object.create(EE),TE=e=>Object.getPrototypeOf(e)===EE;function zD(e,t,n,r=!1){const s={},i=CE();e.propsDefaults=Object.create(null),IE(e,t,s,i);for(const a in e.propsOptions[0])a in s||(s[a]=void 0);n?e.props=r?s:Kf(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function jD(e,t,n,r){const{props:s,attrs:i,vnode:{patchFlag:a}}=e,o=Me(s),[l]=e.propsOptions;let c=!1;if((r||a>0)&&!(a&16)){if(a&8){const u=e.vnode.dynamicProps;for(let d=0;d<u.length;d++){let p=u[d];if(np(e.emitsOptions,p))continue;const m=t[p];if(l)if(kt(i,p))m!==i[p]&&(i[p]=m,c=!0);else{const v=sr(p);s[v]=cg(l,o,v,m,e,!1)}else m!==i[p]&&(i[p]=m,c=!0)}}}else{IE(e,t,s,i)&&(c=!0);let u;for(const d in o)(!t||!kt(t,d)&&((u=sa(d))===d||!kt(t,u)))&&(l?n&&(n[d]!==void 0||n[u]!==void 0)&&(s[d]=cg(l,o,d,void 0,e,!0)):delete s[d]);if(i!==o)for(const d in i)(!t||!kt(t,d))&&(delete i[d],c=!0)}c&&ii(e.attrs,"set","")}function IE(e,t,n,r){const[s,i]=e.propsOptions;let a=!1,o;if(t)for(let l in t){if(au(l))continue;const c=t[l];let u;s&&kt(s,u=sr(l))?!i||!i.includes(u)?n[u]=c:(o||(o={}))[u]=c:np(e.emitsOptions,l)||(!(l in r)||c!==r[l])&&(r[l]=c,a=!0)}if(i){const l=Me(n),c=o||$t;for(let u=0;u<i.length;u++){const d=i[u];n[d]=cg(s,l,d,c[d],e,!kt(c,d))}}return a}function cg(e,t,n,r,s,i){const a=e[n];if(a!=null){const o=kt(a,"default");if(o&&r===void 0){const l=a.default;if(a.type!==Function&&!a.skipFactory&&Ye(l)){const{propsDefaults:c}=s;if(n in c)r=c[n];else{const u=pc(s);r=c[n]=l.call(null,t),u()}}else r=l;s.ce&&s.ce._setProp(n,r)}a[0]&&(i&&!o?r=!1:a[1]&&(r===""||r===sa(n))&&(r=!0))}return r}const HD=new WeakMap;function RE(e,t,n=!1){const r=n?HD:t.propsCache,s=r.get(e);if(s)return s;const i=e.props,a={},o=[];let l=!1;if(!Ye(e)){const u=d=>{l=!0;const[p,m]=RE(d,t,!0);Cn(a,p),m&&o.push(...m)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!i&&!l)return Nt(e)&&r.set(e,Mo),Mo;if(We(i))for(let u=0;u<i.length;u++){const d=sr(i[u]);e0(d)&&(a[d]=$t)}else if(i)for(const u in i){const d=sr(u);if(e0(d)){const p=i[u],m=a[d]=We(p)||Ye(p)?{type:p}:Cn({},p),v=m.type;let g=!1,b=!0;if(We(v))for(let y=0;y<v.length;++y){const w=v[y],_=Ye(w)&&w.name;if(_==="Boolean"){g=!0;break}else _==="String"&&(b=!1)}else g=Ye(v)&&v.name==="Boolean";m[0]=g,m[1]=b,(g||kt(m,"default"))&&o.push(d)}}const c=[a,o];return Nt(e)&&r.set(e,c),c}function e0(e){return e[0]!=="$"&&!au(e)}const cy=e=>e==="_"||e==="_ctx"||e==="$stable",dy=e=>We(e)?e.map(Ds):[Ds(e)],qD=(e,t,n)=>{if(t._n)return t;const r=h((...s)=>dy(t(...s)),n);return r._c=!1,r},PE=(e,t,n)=>{const r=e._ctx;for(const s in e){if(cy(s))continue;const i=e[s];if(Ye(i))t[s]=qD(s,i,r);else if(i!=null){const a=dy(i);t[s]=()=>a}}},AE=(e,t)=>{const n=dy(t);e.slots.default=()=>n},OE=(e,t,n)=>{for(const r in t)(n||!cy(r))&&(e[r]=t[r])},WD=(e,t,n)=>{const r=e.slots=CE();if(e.vnode.shapeFlag&32){const s=t._;s?(OE(r,t,n),n&&Px(r,"_",s,!0)):PE(t,r)}else t&&AE(e,t)},GD=(e,t,n)=>{const{vnode:r,slots:s}=e;let i=!0,a=$t;if(r.shapeFlag&32){const o=t._;o?n&&o===1?i=!1:OE(s,t,n):(i=!t.$stable,PE(t,s)),a=t}else t&&(AE(e,t),a={default:1});if(i)for(const o in s)!cy(o)&&a[o]==null&&delete s[o]},Zn=QD;function KD(e){return YD(e)}function YD(e,t){const n=qf();n.__VUE__=!0;const{insert:r,remove:s,patchProp:i,createElement:a,createText:o,createComment:l,setText:c,setElementText:u,parentNode:d,nextSibling:p,setScopeId:m=Ns,insertStaticContent:v}=e,g=(U,G,Z,fe=null,ge=null,me=null,we=void 0,Ce=null,he=!!G.dynamicChildren)=>{if(U===G)return;U&&!wa(U,G)&&(fe=X(U),H(U,ge,me,!0),U=null),G.patchFlag===-2&&(he=!1,G.dynamicChildren=null);const{type:ye,ref:Te,shapeFlag:xe}=G;switch(ye){case fc:b(U,G,Z,fe);break;case Dn:y(U,G,Z,fe);break;case lm:U==null&&w(G,Z,fe,we);break;case ke:L(U,G,Z,fe,ge,me,we,Ce,he);break;default:xe&1?P(U,G,Z,fe,ge,me,we,Ce,he):xe&6?V(U,G,Z,fe,ge,me,we,Ce,he):(xe&64||xe&128)&&ye.process(U,G,Z,fe,ge,me,we,Ce,he,ve)}Te!=null&&ge?cu(Te,U&&U.ref,me,G||U,!G):Te==null&&U&&U.ref!=null&&cu(U.ref,null,me,U,!0)},b=(U,G,Z,fe)=>{if(U==null)r(G.el=o(G.children),Z,fe);else{const ge=G.el=U.el;G.children!==U.children&&c(ge,G.children)}},y=(U,G,Z,fe)=>{U==null?r(G.el=l(G.children||""),Z,fe):G.el=U.el},w=(U,G,Z,fe)=>{[U.el,U.anchor]=v(U.children,G,Z,fe,U.el,U.anchor)},_=({el:U,anchor:G},Z,fe)=>{let ge;for(;U&&U!==G;)ge=p(U),r(U,Z,fe),U=ge;r(G,Z,fe)},T=({el:U,anchor:G})=>{let Z;for(;U&&U!==G;)Z=p(U),s(U),U=Z;s(G)},P=(U,G,Z,fe,ge,me,we,Ce,he)=>{if(G.type==="svg"?we="svg":G.type==="math"&&(we="mathml"),U==null)x(G,Z,fe,ge,me,we,Ce,he);else{const ye=U.el&&U.el._isVueCE?U.el:null;try{ye&&ye._beginPatch(),R(U,G,ge,me,we,Ce,he)}finally{ye&&ye._endPatch()}}},x=(U,G,Z,fe,ge,me,we,Ce)=>{let he,ye;const{props:Te,shapeFlag:xe,transition:Re,dirs:je}=U;if(he=U.el=a(U.type,me,Te&&Te.is,Te),xe&8?u(he,U.children):xe&16&&E(U.children,he,null,fe,ge,om(U,me),we,Ce),je&&fa(U,null,fe,"created"),C(he,U,U.scopeId,we,fe),Te){for(const Vt in Te)Vt!=="value"&&!au(Vt)&&i(he,Vt,null,Te[Vt],me,fe);"value"in Te&&i(he,"value",null,Te.value,me),(ye=Te.onVnodeBeforeMount)&&Rs(ye,fe,U)}je&&fa(U,null,fe,"beforeMount");const mt=JD(ge,Re);mt&&Re.beforeEnter(he),r(he,G,Z),((ye=Te&&Te.onVnodeMounted)||mt||je)&&Zn(()=>{ye&&Rs(ye,fe,U),mt&&Re.enter(he),je&&fa(U,null,fe,"mounted")},ge)},C=(U,G,Z,fe,ge)=>{if(Z&&m(U,Z),fe)for(let me=0;me<fe.length;me++)m(U,fe[me]);if(ge){let me=ge.subTree;if(G===me||$E(me.type)&&(me.ssContent===G||me.ssFallback===G)){const we=ge.vnode;C(U,we,we.scopeId,we.slotScopeIds,ge.parent)}}},E=(U,G,Z,fe,ge,me,we,Ce,he=0)=>{for(let ye=he;ye<U.length;ye++){const Te=U[ye]=Ce?Vi(U[ye]):Ds(U[ye]);g(null,Te,G,Z,fe,ge,me,we,Ce)}},R=(U,G,Z,fe,ge,me,we)=>{const Ce=G.el=U.el;let{patchFlag:he,dynamicChildren:ye,dirs:Te}=G;he|=U.patchFlag&16;const xe=U.props||$t,Re=G.props||$t;let je;if(Z&&pa(Z,!1),(je=Re.onVnodeBeforeUpdate)&&Rs(je,Z,G,U),Te&&fa(G,U,Z,"beforeUpdate"),Z&&pa(Z,!0),(xe.innerHTML&&Re.innerHTML==null||xe.textContent&&Re.textContent==null)&&u(Ce,""),ye?I(U.dynamicChildren,ye,Ce,Z,fe,om(G,ge),me):we||D(U,G,Ce,null,Z,fe,om(G,ge),me,!1),he>0){if(he&16)O(Ce,xe,Re,Z,ge);else if(he&2&&xe.class!==Re.class&&i(Ce,"class",null,Re.class,ge),he&4&&i(Ce,"style",xe.style,Re.style,ge),he&8){const mt=G.dynamicProps;for(let Vt=0;Vt<mt.length;Vt++){const Tt=mt[Vt],ar=xe[Tt],or=Re[Tt];(or!==ar||Tt==="value")&&i(Ce,Tt,ar,or,ge,Z)}}he&1&&U.children!==G.children&&u(Ce,G.children)}else!we&&ye==null&&O(Ce,xe,Re,Z,ge);((je=Re.onVnodeUpdated)||Te)&&Zn(()=>{je&&Rs(je,Z,G,U),Te&&fa(G,U,Z,"updated")},fe)},I=(U,G,Z,fe,ge,me,we)=>{for(let Ce=0;Ce<G.length;Ce++){const he=U[Ce],ye=G[Ce],Te=he.el&&(he.type===ke||!wa(he,ye)||he.shapeFlag&198)?d(he.el):Z;g(he,ye,Te,null,fe,ge,me,we,!0)}},O=(U,G,Z,fe,ge)=>{if(G!==Z){if(G!==$t)for(const me in G)!au(me)&&!(me in Z)&&i(U,me,G[me],null,ge,fe);for(const me in Z){if(au(me))continue;const we=Z[me],Ce=G[me];we!==Ce&&me!=="value"&&i(U,me,Ce,we,ge,fe)}"value"in Z&&i(U,"value",G.value,Z.value,ge)}},L=(U,G,Z,fe,ge,me,we,Ce,he)=>{const ye=G.el=U?U.el:o(""),Te=G.anchor=U?U.anchor:o("");let{patchFlag:xe,dynamicChildren:Re,slotScopeIds:je}=G;je&&(Ce=Ce?Ce.concat(je):je),U==null?(r(ye,Z,fe),r(Te,Z,fe),E(G.children||[],Z,Te,ge,me,we,Ce,he)):xe>0&&xe&64&&Re&&U.dynamicChildren&&U.dynamicChildren.length===Re.length?(I(U.dynamicChildren,Re,Z,ge,me,we,Ce),(G.key!=null||ge&&G===ge.subTree)&&fy(U,G,!0)):D(U,G,Z,Te,ge,me,we,Ce,he)},V=(U,G,Z,fe,ge,me,we,Ce,he)=>{G.slotScopeIds=Ce,U==null?G.shapeFlag&512?ge.ctx.activate(G,Z,fe,we,he):F(G,Z,fe,ge,me,we,he):B(U,G,he)},F=(U,G,Z,fe,ge,me,we)=>{const Ce=U.component=sL(U,fe,ge);if(Zf(U)&&(Ce.ctx.renderer=ve),iL(Ce,!1,we),Ce.asyncDep){if(ge&&ge.registerDep(Ce,M,we),!U.el){const he=Ce.subTree=f(Dn);y(null,he,G,Z),U.placeholder=he.el}}else M(Ce,U,G,Z,ge,me,we)},B=(U,G,Z)=>{const fe=G.component=U.component;if(BD(U,G,Z))if(fe.asyncDep&&!fe.asyncResolved){N(fe,G,Z);return}else fe.next=G,fe.update();else G.el=U.el,fe.vnode=G},M=(U,G,Z,fe,ge,me,we)=>{const Ce=()=>{if(U.isMounted){let{next:xe,bu:Re,u:je,parent:mt,vnode:Vt}=U;{const Ts=DE(U);if(Ts){xe&&(xe.el=Vt.el,N(U,xe,we)),Ts.asyncDep.then(()=>{U.isUnmounted||Ce()});return}}let Tt=xe,ar;pa(U,!1),xe?(xe.el=Vt.el,N(U,xe,we)):xe=Vt,Re&&pd(Re),(ar=xe.props&&xe.props.onVnodeBeforeUpdate)&&Rs(ar,mt,xe,Vt),pa(U,!0);const or=Q1(U),Cs=U.subTree;U.subTree=or,g(Cs,or,d(Cs.el),X(Cs),U,ge,me),xe.el=or.el,Tt===null&&UD(U,or.el),je&&Zn(je,ge),(ar=xe.props&&xe.props.onVnodeUpdated)&&Zn(()=>Rs(ar,mt,xe,Vt),ge)}else{let xe;const{el:Re,props:je}=G,{bm:mt,m:Vt,parent:Tt,root:ar,type:or}=U,Cs=Uo(G);pa(U,!1),mt&&pd(mt),!Cs&&(xe=je&&je.onVnodeBeforeMount)&&Rs(xe,Tt,G),pa(U,!0);{ar.ce&&ar.ce._def.shadowRoot!==!1&&ar.ce._injectChildStyle(or);const Ts=U.subTree=Q1(U);g(null,Ts,Z,fe,U,ge,me),G.el=Ts.el}if(Vt&&Zn(Vt,ge),!Cs&&(xe=je&&je.onVnodeMounted)){const Ts=G;Zn(()=>Rs(xe,Tt,Ts),ge)}(G.shapeFlag&256||Tt&&Uo(Tt.vnode)&&Tt.vnode.shapeFlag&256)&&U.a&&Zn(U.a,ge),U.isMounted=!0,G=Z=fe=null}};U.scope.on();const he=U.effect=new $x(Ce);U.scope.off();const ye=U.update=he.run.bind(he),Te=U.job=he.runIfDirty.bind(he);Te.i=U,Te.id=U.uid,he.scheduler=()=>ry(Te),pa(U,!0),ye()},N=(U,G,Z)=>{G.component=U;const fe=U.vnode.props;U.vnode=G,U.next=null,jD(U,G.props,fe,Z),GD(U,G.children,Z),mi(),U1(U),hi()},D=(U,G,Z,fe,ge,me,we,Ce,he=!1)=>{const ye=U&&U.children,Te=U?U.shapeFlag:0,xe=G.children,{patchFlag:Re,shapeFlag:je}=G;if(Re>0){if(Re&128){z(ye,xe,Z,fe,ge,me,we,Ce,he);return}else if(Re&256){W(ye,xe,Z,fe,ge,me,we,Ce,he);return}}je&8?(Te&16&&De(ye,ge,me),xe!==ye&&u(Z,xe)):Te&16?je&16?z(ye,xe,Z,fe,ge,me,we,Ce,he):De(ye,ge,me,!0):(Te&8&&u(Z,""),je&16&&E(xe,Z,fe,ge,me,we,Ce,he))},W=(U,G,Z,fe,ge,me,we,Ce,he)=>{U=U||Mo,G=G||Mo;const ye=U.length,Te=G.length,xe=Math.min(ye,Te);let Re;for(Re=0;Re<xe;Re++){const je=G[Re]=he?Vi(G[Re]):Ds(G[Re]);g(U[Re],je,Z,null,ge,me,we,Ce,he)}ye>Te?De(U,ge,me,!0,!1,xe):E(G,Z,fe,ge,me,we,Ce,he,xe)},z=(U,G,Z,fe,ge,me,we,Ce,he)=>{let ye=0;const Te=G.length;let xe=U.length-1,Re=Te-1;for(;ye<=xe&&ye<=Re;){const je=U[ye],mt=G[ye]=he?Vi(G[ye]):Ds(G[ye]);if(wa(je,mt))g(je,mt,Z,null,ge,me,we,Ce,he);else break;ye++}for(;ye<=xe&&ye<=Re;){const je=U[xe],mt=G[Re]=he?Vi(G[Re]):Ds(G[Re]);if(wa(je,mt))g(je,mt,Z,null,ge,me,we,Ce,he);else break;xe--,Re--}if(ye>xe){if(ye<=Re){const je=Re+1,mt=je<Te?G[je].el:fe;for(;ye<=Re;)g(null,G[ye]=he?Vi(G[ye]):Ds(G[ye]),Z,mt,ge,me,we,Ce,he),ye++}}else if(ye>Re)for(;ye<=xe;)H(U[ye],ge,me,!0),ye++;else{const je=ye,mt=ye,Vt=new Map;for(ye=mt;ye<=Re;ye++){const Tr=G[ye]=he?Vi(G[ye]):Ds(G[ye]);Tr.key!=null&&Vt.set(Tr.key,ye)}let Tt,ar=0;const or=Re-mt+1;let Cs=!1,Ts=0;const Hl=new Array(or);for(ye=0;ye<or;ye++)Hl[ye]=0;for(ye=je;ye<=xe;ye++){const Tr=U[ye];if(ar>=or){H(Tr,ge,me,!0);continue}let Is;if(Tr.key!=null)Is=Vt.get(Tr.key);else for(Tt=mt;Tt<=Re;Tt++)if(Hl[Tt-mt]===0&&wa(Tr,G[Tt])){Is=Tt;break}Is===void 0?H(Tr,ge,me,!0):(Hl[Is-mt]=ye+1,Is>=Ts?Ts=Is:Cs=!0,g(Tr,G[Is],Z,null,ge,me,we,Ce,he),ar++)}const $1=Cs?XD(Hl):Mo;for(Tt=$1.length-1,ye=or-1;ye>=0;ye--){const Tr=mt+ye,Is=G[Tr],F1=G[Tr+1],N1=Tr+1<Te?F1.el||LE(F1):fe;Hl[ye]===0?g(null,Is,Z,N1,ge,me,we,Ce,he):Cs&&(Tt<0||ye!==$1[Tt]?K(Is,Z,N1,2):Tt--)}}},K=(U,G,Z,fe,ge=null)=>{const{el:me,type:we,transition:Ce,children:he,shapeFlag:ye}=U;if(ye&6){K(U.component.subTree,G,Z,fe);return}if(ye&128){U.suspense.move(G,Z,fe);return}if(ye&64){we.move(U,G,Z,ve);return}if(we===ke){r(me,G,Z);for(let xe=0;xe<he.length;xe++)K(he[xe],G,Z,fe);r(U.anchor,G,Z);return}if(we===lm){_(U,G,Z);return}if(fe!==2&&ye&1&&Ce)if(fe===0)Ce.beforeEnter(me),r(me,G,Z),Zn(()=>Ce.enter(me),ge);else{const{leave:xe,delayLeave:Re,afterLeave:je}=Ce,mt=()=>{U.ctx.isUnmounted?s(me):r(me,G,Z)},Vt=()=>{me._isLeaving&&me[ri](!0),xe(me,()=>{mt(),je&&je()})};Re?Re(me,mt,Vt):Vt()}else r(me,G,Z)},H=(U,G,Z,fe=!1,ge=!1)=>{const{type:me,props:we,ref:Ce,children:he,dynamicChildren:ye,shapeFlag:Te,patchFlag:xe,dirs:Re,cacheIndex:je}=U;if(xe===-2&&(ge=!1),Ce!=null&&(mi(),cu(Ce,null,Z,U,!0),hi()),je!=null&&(G.renderCache[je]=void 0),Te&256){G.ctx.deactivate(U);return}const mt=Te&1&&Re,Vt=!Uo(U);let Tt;if(Vt&&(Tt=we&&we.onVnodeBeforeUnmount)&&Rs(Tt,G,U),Te&6)de(U.component,Z,fe);else{if(Te&128){U.suspense.unmount(Z,fe);return}mt&&fa(U,null,G,"beforeUnmount"),Te&64?U.type.remove(U,G,Z,ve,fe):ye&&!ye.hasOnce&&(me!==ke||xe>0&&xe&64)?De(ye,G,Z,!1,!0):(me===ke&&xe&384||!ge&&Te&16)&&De(he,G,Z),fe&&re(U)}(Vt&&(Tt=we&&we.onVnodeUnmounted)||mt)&&Zn(()=>{Tt&&Rs(Tt,G,U),mt&&fa(U,null,G,"unmounted")},Z)},re=U=>{const{type:G,el:Z,anchor:fe,transition:ge}=U;if(G===ke){ae(Z,fe);return}if(G===lm){T(U);return}const me=()=>{s(Z),ge&&!ge.persisted&&ge.afterLeave&&ge.afterLeave()};if(U.shapeFlag&1&&ge&&!ge.persisted){const{leave:we,delayLeave:Ce}=ge,he=()=>we(Z,me);Ce?Ce(U.el,me,he):he()}else me()},ae=(U,G)=>{let Z;for(;U!==G;)Z=p(U),s(U),U=Z;s(G)},de=(U,G,Z)=>{const{bum:fe,scope:ge,job:me,subTree:we,um:Ce,m:he,a:ye}=U;t0(he),t0(ye),fe&&pd(fe),ge.stop(),me&&(me.flags|=8,H(we,U,G,Z)),Ce&&Zn(Ce,G),Zn(()=>{U.isUnmounted=!0},G)},De=(U,G,Z,fe=!1,ge=!1,me=0)=>{for(let we=me;we<U.length;we++)H(U[we],G,Z,fe,ge)},X=U=>{if(U.shapeFlag&6)return X(U.component.subTree);if(U.shapeFlag&128)return U.suspense.next();const G=p(U.anchor||U.el),Z=G&&G[oE];return Z?p(Z):G};let ie=!1;const ne=(U,G,Z)=>{let fe;U==null?G._vnode&&(H(G._vnode,null,null,!0),fe=G._vnode.component):g(G._vnode||null,U,G,null,null,null,Z),G._vnode=U,ie||(ie=!0,U1(fe),nE(),ie=!1)},ve={p:g,um:H,m:K,r:re,mt:F,mc:E,pc:D,pbc:I,n:X,o:e};return{render:ne,hydrate:void 0,createApp:LD(ne)}}function om({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 pa({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function JD(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function fy(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 a=r[i];let o=s[i];o.shapeFlag&1&&!o.dynamicChildren&&((o.patchFlag<=0||o.patchFlag===32)&&(o=s[i]=Vi(s[i]),o.el=a.el),!n&&o.patchFlag!==-2&&fy(a,o)),o.type===fc&&(o.patchFlag!==-1?o.el=a.el:o.__elIndex=i+(e.type===ke?1:0)),o.type===Dn&&!o.el&&(o.el=a.el)}}function XD(e){const t=e.slice(),n=[0];let r,s,i,a,o;const l=e.length;for(r=0;r<l;r++){const c=e[r];if(c!==0){if(s=n[n.length-1],e[s]<c){t[r]=s,n.push(r);continue}for(i=0,a=n.length-1;i<a;)o=i+a>>1,e[n[o]]<c?i=o+1:a=o;c<e[n[i]]&&(i>0&&(t[r]=n[i-1]),n[i]=r)}}for(i=n.length,a=n[i-1];i-- >0;)n[i]=a,a=t[a];return n}function DE(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:DE(t)}function t0(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function LE(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?LE(t.subTree):null}const $E=e=>e.__isSuspense;function QD(e,t){t&&t.pendingBranch?We(e)?t.effects.push(...e):t.effects.push(e):cD(e)}const ke=Symbol.for("v-fgt"),fc=Symbol.for("v-txt"),Dn=Symbol.for("v-cmt"),lm=Symbol.for("v-stc"),fu=[];let Pr=null;function $(e=!1){fu.push(Pr=e?null:[])}function ZD(){fu.pop(),Pr=fu[fu.length-1]||null}let Iu=1;function Kd(e,t=!1){Iu+=e,e<0&&Pr&&t&&(Pr.hasOnce=!0)}function FE(e){return e.dynamicChildren=Iu>0?Pr||Mo:null,ZD(),Iu>0&&Pr&&Pr.push(e),e}function pe(e,t,n,r,s,i){return FE(S(e,t,n,r,s,i,!0))}function J(e,t,n,r,s){return FE(f(e,t,n,r,s,!0))}function Go(e){return e?e.__v_isVNode===!0:!1}function wa(e,t){return e.type===t.type&&e.key===t.key}const NE=({key:e})=>e??null,hd=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Zt(e)||nt(e)||Ye(e)?{i:$n,r:e,k:t,f:!!n}:e:null);function S(e,t=null,n=null,r=0,s=null,i=e===ke?0:1,a=!1,o=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&NE(t),ref:t&&hd(t),scopeId:sE,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:$n};return o?(py(l,n),i&128&&e.normalize(l)):n&&(l.shapeFlag|=Zt(n)?8:16),Iu>0&&!a&&Pr&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&Pr.push(l),l}const f=eL;function eL(e,t=null,n=null,r=0,s=null,i=!1){if((!e||e===xD)&&(e=Dn),Go(e)){const o=yi(e,t,!0);return n&&py(o,n),Iu>0&&!i&&Pr&&(o.shapeFlag&6?Pr[Pr.indexOf(e)]=o:Pr.push(o)),o.patchFlag=-2,o}if(cL(e)&&(e=e.__vccOpts),t){t=tL(t);let{class:o,style:l}=t;o&&!Zt(o)&&(t.class=Se(o)),Nt(l)&&(Jf(l)&&!We(l)&&(l=Cn({},l)),t.style=Le(l))}const a=Zt(e)?1:$E(e)?128:lE(e)?64:Nt(e)?4:Ye(e)?2:0;return S(e,t,n,r,s,a,i,!0)}function tL(e){return e?Jf(e)||TE(e)?Cn({},e):e:null}function yi(e,t,n=!1,r=!1){const{props:s,ref:i,patchFlag:a,children:o,transition:l}=e,c=t?ce(s||{},t):s,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&NE(c),ref:t&&t.ref?n&&i?We(i)?i.concat(hd(t)):[i,hd(t)]:hd(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ke?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&yi(e.ssContent),ssFallback:e.ssFallback&&yi(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&qa(u,l.clone(u)),u}function k(e=" ",t=0){return f(fc,null,e,t)}function se(e="",t=!1){return t?($(),J(Dn,null,e)):f(Dn,null,e)}function Ds(e){return e==null||typeof e=="boolean"?f(Dn):We(e)?f(ke,null,e.slice()):Go(e)?Vi(e):f(fc,null,String(e))}function Vi(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:yi(e)}function py(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),py(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!TE(t)?t._ctx=$n:s===3&&$n&&($n.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Ye(t)?(t={default:t,_ctx:$n},n=32):(t=String(t),r&64?(n=16,t=[k(t)]):n=8);e.children=t,e.shapeFlag|=n}function ce(...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=Se([t.class,r.class]));else if(s==="style")t.style=Le([t.style,r.style]);else if(Uf(s)){const i=t[s],a=r[s];a&&i!==a&&!(We(i)&&i.includes(a))&&(t[s]=i?[].concat(i,a):a)}else s!==""&&(t[s]=r[s])}return t}function Rs(e,t,n,r=null){ps(e,t,7,[n,r])}const nL=kE();let rL=0;function sL(e,t,n){const r=e.type,s=(t?t.appContext:e.appContext)||nL,i={uid:rL++,vnode:e,type:r,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Lx(!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:RE(r,s),emitsOptions:xE(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=FD.bind(null,i),e.ce&&e.ce(i),i}let qn=null;const hl=()=>qn||$n;let Yd,dg;{const e=qf(),t=(n,r)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(r),i=>{s.length>1?s.forEach(a=>a(i)):s[0](i)}};Yd=t("__VUE_INSTANCE_SETTERS__",n=>qn=n),dg=t("__VUE_SSR_SETTERS__",n=>Ru=n)}const pc=e=>{const t=qn;return Yd(e),e.scope.on(),()=>{e.scope.off(),Yd(t)}},n0=()=>{qn&&qn.scope.off(),Yd(null)};function ME(e){return e.vnode.shapeFlag&4}let Ru=!1;function iL(e,t=!1,n=!1){t&&dg(t);const{props:r,children:s}=e.vnode,i=ME(e);zD(e,r,i,t),WD(e,s,n||t);const a=i?aL(e,t):void 0;return t&&dg(!1),a}function aL(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,TD);const{setup:r}=n;if(r){mi();const s=e.setupContext=r.length>1?lL(e):null,i=pc(e),a=dc(r,e,0,[e.props,s]),o=Tx(a);if(hi(),i(),(o||e.sp)&&!Uo(e)&&gE(e),o){if(a.then(n0,n0),t)return a.then(l=>{r0(e,l)}).catch(l=>{Qf(l,e,0)});e.asyncDep=a}else r0(e,a)}else VE(e)}function r0(e,t,n){Ye(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Nt(t)&&(e.setupState=Qx(t)),VE(e)}function VE(e,t,n){const r=e.type;e.render||(e.render=r.render||Ns);{const s=pc(e);mi();try{ID(e)}finally{hi(),s()}}}const oL={get(e,t){return Hn(e,"get",""),e[t]}};function lL(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,oL),slots:e.slots,emit:e.emit,expose:t}}function rp(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Qx(Xf(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in du)return du[n](e)},has(t,n){return n in t||n in du}})):e.proxy}function uL(e,t=!0){return Ye(e)?e.displayName||e.name:e.name||t&&e.__name}function cL(e){return Ye(e)&&"__vccOpts"in e}const A=(e,t)=>iD(e,t,Ru);function gs(e,t,n){try{Kd(-1);const r=arguments.length;return r===2?Nt(t)&&!We(t)?Go(t)?f(e,null,[t]):f(e,t):f(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Go(n)&&(n=[n]),f(e,t,n))}finally{Kd(1)}}const dL="3.5.26";let fg;const s0=typeof window<"u"&&window.trustedTypes;if(s0)try{fg=s0.createPolicy("vue",{createHTML:e=>e})}catch{}const BE=fg?e=>fg.createHTML(e):e=>e,fL="http://www.w3.org/2000/svg",pL="http://www.w3.org/1998/Math/MathML",ni=typeof document<"u"?document:null,i0=ni&&ni.createElement("template"),mL={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"?ni.createElementNS(fL,e):t==="mathml"?ni.createElementNS(pL,e):n?ni.createElement(e,{is:n}):ni.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>ni.createTextNode(e),createComment:e=>ni.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ni.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,s,i){const a=n?n.previousSibling:t.lastChild;if(s&&(s===i||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===i||!(s=s.nextSibling)););else{i0.innerHTML=BE(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const o=i0.content;if(r==="svg"||r==="mathml"){const l=o.firstChild;for(;l.firstChild;)o.appendChild(l.firstChild);o.removeChild(l)}t.insertBefore(o,n)}return[a?a.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Oi="transition",Wl="animation",Ko=Symbol("_vtc"),UE={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},zE=Cn({},fE,UE),hL=e=>(e.displayName="Transition",e.props=zE,e),Ji=hL((e,{slots:t})=>gs(vD,jE(e),t)),ma=(e,t=[])=>{We(e)?e.forEach(n=>n(...t)):e&&e(...t)},a0=e=>e?We(e)?e.some(t=>t.length>1):e.length>1:!1;function jE(e){const t={};for(const L in e)L in UE||(t[L]=e[L]);if(e.css===!1)return t;const{name:n="v",type:r,duration:s,enterFromClass:i=`${n}-enter-from`,enterActiveClass:a=`${n}-enter-active`,enterToClass:o=`${n}-enter-to`,appearFromClass:l=i,appearActiveClass:c=a,appearToClass:u=o,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,v=gL(s),g=v&&v[0],b=v&&v[1],{onBeforeEnter:y,onEnter:w,onEnterCancelled:_,onLeave:T,onLeaveCancelled:P,onBeforeAppear:x=y,onAppear:C=w,onAppearCancelled:E=_}=t,R=(L,V,F,B)=>{L._enterCancelled=B,$i(L,V?u:o),$i(L,V?c:a),F&&F()},I=(L,V)=>{L._isLeaving=!1,$i(L,d),$i(L,m),$i(L,p),V&&V()},O=L=>(V,F)=>{const B=L?C:w,M=()=>R(V,L,F);ma(B,[V,M]),o0(()=>{$i(V,L?l:i),As(V,L?u:o),a0(B)||l0(V,r,g,M)})};return Cn(t,{onBeforeEnter(L){ma(y,[L]),As(L,i),As(L,a)},onBeforeAppear(L){ma(x,[L]),As(L,l),As(L,c)},onEnter:O(!1),onAppear:O(!0),onLeave(L,V){L._isLeaving=!0;const F=()=>I(L,V);As(L,d),L._enterCancelled?(As(L,p),pg(L)):(pg(L),As(L,p)),o0(()=>{L._isLeaving&&($i(L,d),As(L,m),a0(T)||l0(L,r,b,F))}),ma(T,[L,F])},onEnterCancelled(L){R(L,!1,void 0,!0),ma(_,[L])},onAppearCancelled(L){R(L,!0,void 0,!0),ma(E,[L])},onLeaveCancelled(L){I(L),ma(P,[L])}})}function gL(e){if(e==null)return null;if(Nt(e))return[um(e.enter),um(e.leave)];{const t=um(e);return[t,t]}}function um(e){return IO(e)}function As(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Ko]||(e[Ko]=new Set)).add(t)}function $i(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[Ko];n&&(n.delete(t),n.size||(e[Ko]=void 0))}function o0(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let vL=0;function l0(e,t,n,r){const s=e._endId=++vL,i=()=>{s===e._endId&&r()};if(n!=null)return setTimeout(i,n);const{type:a,timeout:o,propCount:l}=HE(e,t);if(!a)return r();const c=a+"end";let u=0;const d=()=>{e.removeEventListener(c,p),i()},p=m=>{m.target===e&&++u>=l&&d()};setTimeout(()=>{u<l&&d()},o+1),e.addEventListener(c,p)}function HE(e,t){const n=window.getComputedStyle(e),r=v=>(n[v]||"").split(", "),s=r(`${Oi}Delay`),i=r(`${Oi}Duration`),a=u0(s,i),o=r(`${Wl}Delay`),l=r(`${Wl}Duration`),c=u0(o,l);let u=null,d=0,p=0;t===Oi?a>0&&(u=Oi,d=a,p=i.length):t===Wl?c>0&&(u=Wl,d=c,p=l.length):(d=Math.max(a,c),u=d>0?a>c?Oi:Wl:null,p=u?u===Oi?i.length:l.length:0);const m=u===Oi&&/\b(?:transform|all)(?:,|$)/.test(r(`${Oi}Property`).toString());return{type:u,timeout:d,propCount:p,hasTransform:m}}function u0(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>c0(n)+c0(e[r])))}function c0(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function pg(e){return(e?e.ownerDocument:document).body.offsetHeight}function yL(e,t,n){const r=e[Ko];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Jd=Symbol("_vod"),qE=Symbol("_vsh"),$r={name:"show",beforeMount(e,{value:t},{transition:n}){e[Jd]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Gl(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),Gl(e,!0),r.enter(e)):r.leave(e,()=>{Gl(e,!1)}):Gl(e,t))},beforeUnmount(e,{value:t}){Gl(e,t)}};function Gl(e,t){e.style.display=t?e[Jd]:"none",e[qE]=!t}const bL=Symbol(""),SL=/(?:^|;)\s*display\s*:/;function wL(e,t,n){const r=e.style,s=Zt(n);let i=!1;if(n&&!s){if(t)if(Zt(t))for(const a of t.split(";")){const o=a.slice(0,a.indexOf(":")).trim();n[o]==null&&gd(r,o,"")}else for(const a in t)n[a]==null&&gd(r,a,"");for(const a in n)a==="display"&&(i=!0),gd(r,a,n[a])}else if(s){if(t!==n){const a=r[bL];a&&(n+=";"+a),r.cssText=n,i=SL.test(n)}}else t&&e.removeAttribute("style");Jd in e&&(e[Jd]=i?r.display:"",e[qE]&&(r.display="none"))}const d0=/\s*!important$/;function gd(e,t,n){if(We(n))n.forEach(r=>gd(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=_L(e,t);d0.test(n)?e.setProperty(sa(r),n.replace(d0,""),"important"):e[r]=n}}const f0=["Webkit","Moz","ms"],cm={};function _L(e,t){const n=cm[t];if(n)return n;let r=sr(t);if(r!=="filter"&&r in e)return cm[t]=r;r=js(r);for(let s=0;s<f0.length;s++){const i=f0[s]+r;if(i in e)return cm[t]=i}return t}const p0="http://www.w3.org/1999/xlink";function m0(e,t,n,r,s,i=LO(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(p0,t.slice(6,t.length)):e.setAttributeNS(p0,t,n):n==null||i&&!Ax(n)?e.removeAttribute(t):e.setAttribute(t,i?"":Ti(n)?String(n):n)}function h0(e,t,n,r,s){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?BE(n):n);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const o=i==="OPTION"?e.getAttribute("value")||"":e.value,l=n==null?e.type==="checkbox"?"on":"":String(n);(o!==l||!("_value"in e))&&(e.value=l),n==null&&e.removeAttribute(t),e._value=n;return}let a=!1;if(n===""||n==null){const o=typeof e[t];o==="boolean"?n=Ax(n):n==null&&o==="string"?(n="",a=!0):o==="number"&&(n=0,a=!0)}try{e[t]=n}catch{}a&&e.removeAttribute(s||t)}function Eo(e,t,n,r){e.addEventListener(t,n,r)}function kL(e,t,n,r){e.removeEventListener(t,n,r)}const g0=Symbol("_vei");function xL(e,t,n,r,s=null){const i=e[g0]||(e[g0]={}),a=i[t];if(r&&a)a.value=r;else{const[o,l]=EL(t);if(r){const c=i[t]=IL(r,s);Eo(e,o,c,l)}else a&&(kL(e,o,a,l),i[t]=void 0)}}const v0=/(?:Once|Passive|Capture)$/;function EL(e){let t;if(v0.test(e)){t={};let r;for(;r=e.match(v0);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):sa(e.slice(2)),t]}let dm=0;const CL=Promise.resolve(),TL=()=>dm||(CL.then(()=>dm=0),dm=Date.now());function IL(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;ps(RL(r,n.value),t,5,[r])};return n.value=e,n.attached=TL(),n}function RL(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 y0=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,PL=(e,t,n,r,s,i)=>{const a=s==="svg";t==="class"?yL(e,r,a):t==="style"?wL(e,n,r):Uf(t)?Yv(t)||xL(e,t,n,r,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):AL(e,t,r,a))?(h0(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&m0(e,t,r,a,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Zt(r))?h0(e,sr(t),r,i,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),m0(e,t,r,a))};function AL(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&y0(t)&&Ye(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||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 y0(t)&&Zt(n)?!1:t in e}const WE=new WeakMap,GE=new WeakMap,Xd=Symbol("_moveCb"),b0=Symbol("_enterCb"),OL=e=>(delete e.props.mode,e),DL=OL({name:"TransitionGroup",props:Cn({},zE,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=hl(),r=dE();let s,i;return oy(()=>{if(!s.length)return;const a=e.moveClass||`${e.name||"v"}-move`;if(!NL(s[0].el,n.vnode.el,a)){s=[];return}s.forEach(LL),s.forEach($L);const o=s.filter(FL);pg(n.vnode.el),o.forEach(l=>{const c=l.el,u=c.style;As(c,a),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[Xd]=p=>{p&&p.target!==c||(!p||p.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",d),c[Xd]=null,$i(c,a))};c.addEventListener("transitionend",d)}),s=[]}),()=>{const a=Me(e),o=jE(a);let l=a.tag||ke;if(s=[],i)for(let c=0;c<i.length;c++){const u=i[c];u.el&&u.el instanceof Element&&(s.push(u),qa(u,Cu(u,o,r,n)),WE.set(u,{left:u.el.offsetLeft,top:u.el.offsetTop}))}i=t.default?iy(t.default()):[];for(let c=0;c<i.length;c++){const u=i[c];u.key!=null&&qa(u,Cu(u,o,r,n))}return f(l,null,i)}}}),my=DL;function LL(e){const t=e.el;t[Xd]&&t[Xd](),t[b0]&&t[b0]()}function $L(e){GE.set(e,{left:e.el.offsetLeft,top:e.el.offsetTop})}function FL(e){const t=WE.get(e),n=GE.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 NL(e,t,n){const r=e.cloneNode(),s=e[Ko];s&&s.forEach(o=>{o.split(/\s+/).forEach(l=>l&&r.classList.remove(l))}),n.split(/\s+/).forEach(o=>o&&r.classList.add(o)),r.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(r);const{hasTransform:a}=HE(r);return i.removeChild(r),a}const S0=e=>{const t=e.props["onUpdate:modelValue"]||!1;return We(t)?n=>pd(t,n):t};function ML(e){e.target.composing=!0}function w0(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const fm=Symbol("_assign");function _0(e,t,n){return t&&(e=e.trim()),n&&(e=Xv(e)),e}const VL={created(e,{modifiers:{lazy:t,trim:n,number:r}},s){e[fm]=S0(s);const i=r||s.props&&s.props.type==="number";Eo(e,t?"change":"input",a=>{a.target.composing||e[fm](_0(e.value,n,i))}),(n||i)&&Eo(e,"change",()=>{e.value=_0(e.value,n,i)}),t||(Eo(e,"compositionstart",ML),Eo(e,"compositionend",w0),Eo(e,"change",w0))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:s,number:i}},a){if(e[fm]=S0(a),e.composing)return;const o=(i||e.type==="number")&&!/^0\d/.test(e.value)?Xv(e.value):e.value,l=t??"";o!==l&&(document.activeElement===e&&e.type!=="range"&&(r&&t===n||s&&e.value.trim()===l)||(e.value=l))}},BL=["ctrl","shift","alt","meta"],UL={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)=>BL.some(n=>e[`${n}Key`]&&!t.includes(n))},qt=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=((s,...i)=>{for(let a=0;a<t.length;a++){const o=UL[t[a]];if(o&&o(s,t))return}return e(s,...i)}))},zL={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Qd=(e,t)=>{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=(s=>{if(!("key"in s))return;const i=sa(s.key);if(t.some(a=>a===i||zL[a]===i))return e(s)}))},jL=Cn({patchProp:PL},mL);let k0;function HL(){return k0||(k0=KD(jL))}const qL=((...e)=>{const t=HL().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=GL(r);if(!s)return;const i=t._component;!Ye(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const a=n(s,!1,WL(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),a},t});function WL(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function GL(e){return Zt(e)?document.querySelector(e):e}let KE;const sp=e=>KE=e,YE=Symbol();function mg(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var pu;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(pu||(pu={}));function KL(){const e=Ha(!0),t=e.run(()=>q({}));let n=[],r=[];const s=Xf({install(i){sp(s),s._a=i,i.provide(YE,s),i.config.globalProperties.$pinia=s,r.forEach(a=>n.push(a)),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 JE=()=>{};function x0(e,t,n,r=JE){e.add(t);const s=()=>{e.delete(t)&&r()};return!n&&cc()&&Xt(s),s}function ho(e,...t){e.forEach(n=>{n(...t)})}const YL=e=>e(),E0=Symbol(),pm=Symbol();function hg(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];mg(s)&&mg(r)&&e.hasOwnProperty(n)&&!nt(r)&&!li(r)?e[n]=hg(s,r):e[n]=r}return e}const JL=Symbol();function XL(e){return!mg(e)||!Object.prototype.hasOwnProperty.call(e,JL)}const{assign:Fi}=Object;function QL(e){return!!(nt(e)&&e.effect)}function ZL(e,t,n,r){const{state:s,actions:i,getters:a}=t,o=n.state.value[e];let l;function c(){o||(n.state.value[e]=s?s():{});const u=Ii(n.state.value[e]);return Fi(u,i,Object.keys(a||{}).reduce((d,p)=>(d[p]=Xf(A(()=>{sp(n);const m=n._s.get(e);return a[p].call(m,m)})),d),{}))}return l=XE(e,c,t,n,r,!0),l}function XE(e,t,n={},r,s,i){let a;const o=Fi({actions:{}},n),l={deep:!0};let c,u,d=new Set,p=new Set,m;const v=r.state.value[e];!i&&!v&&(r.state.value[e]={}),q({});let g;function b(E){let R;c=u=!1,typeof E=="function"?(E(r.state.value[e]),R={type:pu.patchFunction,storeId:e,events:m}):(hg(r.state.value[e],E),R={type:pu.patchObject,payload:E,storeId:e,events:m});const I=g=Symbol();ut().then(()=>{g===I&&(c=!0)}),u=!0,ho(d,R,r.state.value[e])}const y=i?function(){const{state:R}=n,I=R?R():{};this.$patch(O=>{Fi(O,I)})}:JE;function w(){a.stop(),d.clear(),p.clear(),r._s.delete(e)}const _=(E,R="")=>{if(E0 in E)return E[pm]=R,E;const I=function(){sp(r);const O=Array.from(arguments),L=new Set,V=new Set;function F(N){L.add(N)}function B(N){V.add(N)}ho(p,{args:O,name:I[pm],store:P,after:F,onError:B});let M;try{M=E.apply(this&&this.$id===e?this:P,O)}catch(N){throw ho(V,N),N}return M instanceof Promise?M.then(N=>(ho(L,N),N)).catch(N=>(ho(V,N),Promise.reject(N))):(ho(L,M),M)};return I[E0]=!0,I[pm]=R,I},T={_p:r,$id:e,$onAction:x0.bind(null,p),$patch:b,$reset:y,$subscribe(E,R={}){const I=x0(d,E,R.detached,()=>O()),O=a.run(()=>_e(()=>r.state.value[e],L=>{(R.flush==="sync"?u:c)&&E({storeId:e,type:pu.direct,events:m},L)},Fi({},l,R)));return I},$dispose:w},P=Jt(T);r._s.set(e,P);const C=(r._a&&r._a.runWithContext||YL)(()=>r._e.run(()=>(a=Ha()).run(()=>t({action:_}))));for(const E in C){const R=C[E];if(nt(R)&&!QL(R)||li(R))i||(v&&XL(R)&&(nt(R)?R.value=v[E]:hg(R,v[E])),r.state.value[e][E]=R);else if(typeof R=="function"){const I=_(R,E);C[E]=I,o.actions[E]=R}}return Fi(P,C),Fi(Me(P),C),Object.defineProperty(P,"$state",{get:()=>r.state.value[e],set:E=>{b(R=>{Fi(R,E)})}}),r._p.forEach(E=>{Fi(P,a.run(()=>E({store:P,app:r._a,pinia:r,options:o})))}),v&&i&&n.hydrate&&n.hydrate(P.$state,v),c=!0,u=!0,P}function wr(e,t,n){let r;const s=typeof t=="function";r=s?n:t;function i(a,o){const l=iE();return a=a||(l?He(YE,null):null),a&&sp(a),a=KE,a._s.has(e)||(s?XE(e,t,r,a):ZL(e,r,a)),a._s.get(e)}return i.$id=e,i}const hy=wr("Dialog",{state:()=>({ids:[],dialogsById:{}}),getters:{dialogs(){return this.ids.map(e=>this.dialogsById[e])},getBeforeOpenedCallback(){return e=>this.dialogsById[e]?.beforeOpenedCallback},getOpenedCallback(){return e=>this.dialogsById[e]?.openedCallback},getContext(){return e=>this.dialogsById[e]?.context},getOutput(){return e=>this.dialogsById[e]?.output},isDialogOpened(){return e=>this.dialogsById[e]?.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`)},closeAllDialogs(){for(const e of this.ids)this.dialogsById[e]?.opened&&this.closeDialog(e)},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");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?.beforeOpenedCallback,openedCallback:t?.openedCallback};return this.dialogsById[e]=r,this.ids.push(e),r}}});function C0(e,t){return cc()?(Xt(e,t),!0):!1}const gg=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const e$=Object.prototype.toString,t$=e=>e$.call(e)==="[object Object]",T0=()=>{};function n$(e,t){function n(...r){return new Promise((s,i)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(s).catch(i)})}return n}function r$(e,t={}){let n,r,s=T0;const i=l=>{clearTimeout(l),s(),s=T0};let a;return l=>{const c=Rt(e),u=Rt(t.maxWait);return n&&i(n),c<=0||u!==void 0&&u<=0?(r&&(i(r),r=void 0),Promise.resolve(l())):new Promise((d,p)=>{s=t.rejectOnCancel?p:d,a=l,u&&!r&&(r=setTimeout(()=>{n&&i(n),r=void 0,d(a())},u)),n=setTimeout(()=>{r&&i(r),r=void 0,d(l())},c)})}}function mm(e){return Array.isArray(e)?e:[e]}function s$(e,t=200,n={}){return n$(r$(t,n),e)}function i$(e,t=1e3,n={}){const{immediate:r=!0,immediateCallback:s=!1}=n;let i=null;const a=Ee(!1);function o(){i&&(clearInterval(i),i=null)}function l(){a.value=!1,o()}function c(){const u=Rt(t);u<=0||(a.value=!0,s&&e(),o(),a.value&&(i=setInterval(e,u)))}return r&&gg&&c(),(nt(t)||typeof t=="function")&&C0(_e(t,()=>{a.value&&gg&&c()})),C0(l),{isActive:ny(a),pause:l,resume:c}}function a$(e,t,n){return _e(e,t,{...n,immediate:!0})}const QE=gg?window:void 0;function o$(e){var t;const n=Rt(e);return(t=n?.$el)!==null&&t!==void 0?t:n}function l$(...e){const t=(r,s,i,a)=>(r.addEventListener(s,i,a),()=>r.removeEventListener(s,i,a)),n=A(()=>{const r=mm(Rt(e[0])).filter(s=>s!=null);return r.every(s=>typeof s!="string")?r:void 0});return a$(()=>{var r,s;return[(r=(s=n.value)===null||s===void 0?void 0:s.map(i=>o$(i)))!==null&&r!==void 0?r:[QE].filter(i=>i!=null),mm(Rt(n.value?e[1]:e[0])),mm(Q(n.value?e[2]:e[1])),Rt(n.value?e[3]:e[2])]},([r,s,i,a],o,l)=>{if(!r?.length||!s?.length||!i?.length)return;const c=t$(a)?{...a}:a,u=r.flatMap(d=>s.flatMap(p=>i.map(m=>t(d,p,m,c))));l(()=>{u.forEach(d=>d())})},{flush:"post"})}function u$(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function c$(...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=QE,eventName:i="keydown",passive:a=!1,dedupe:o=!1}=r,l=u$(t);return l$(s,i,u=>{u.repeat&&Rt(o)||l(u)&&n(u)},a)}const Kl=new Map;function nr(e){const t=cc();function n(o){var l;const c=Kl.get(e)||new Set;c.add(o),Kl.set(e,c);const u=()=>s(o);return t==null||(l=t.cleanups)===null||l===void 0||l.push(u),u}function r(o){function l(...c){s(l),o(...c)}return n(l)}function s(o){const l=Kl.get(e);l&&(l.delete(o),l.size||i())}function i(){Kl.delete(e)}function a(o,l){var c;(c=Kl.get(e))===null||c===void 0||c.forEach(u=>u(o,l))}return{on:n,once:r,off:s,emit:a,reset:i}}function jt(e){const t=hy();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=>{bn(()=>{t.isDialogOpened(e)||s(t.getOutput(e))})}))}}function ZE(e,t){t=Array.isArray(t)?t.slice(0,-1).map(n=>`'${n}'`).join(", ")+` or '${t.at(-1)}'`:`'${t}'`}const Ct=typeof window<"u",gy=Ct&&"IntersectionObserver"in window,d$=Ct&&("ontouchstart"in window||window.navigator.maxTouchPoints>0),vy=Ct&&"matchMedia"in window&&typeof window.matchMedia=="function",Wa=()=>vy&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;function I0(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 R0(e,t,n){return e.set(eC(e,t),n),n}function Xs(e,t){return e.get(eC(e,t))}function eC(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 tC(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 Ga(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(/^\./,""),tC(e,t.split("."),n))}function sn(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 Ga(e,t,n);if(Array.isArray(t))return tC(e,t,n);if(typeof t!="function")return n;const r=t(e,n);return typeof r>"u"?n:r}function Po(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Array.from({length:e},(n,r)=>t+r)}function Oe(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 Pu(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function P0(e){let t;return e!==null&&typeof e=="object"&&((t=Object.getPrototypeOf(e))===Object.prototype||t===null)}function yy(e){if(e&&"$el"in e){const t=e.$el;return t?.nodeType===Node.TEXT_NODE?t.nextElementSibling:t}return e}const A0=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 nC(e){return Object.keys(e)}function hm(e,t){return t.every(n=>e.hasOwnProperty(n))}function Vs(e,t){const n={};for(const r of t)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function vg(e,t,n){const r=Object.create(null),s=Object.create(null);for(const i in e)t.some(a=>a instanceof RegExp?a.test(i):a===i)?r[i]=e[i]:s[i]=e[i];return[r,s]}function Qt(e,t){const n={...e};return t.forEach(r=>delete n[r]),n}const rC=/^on[^a-z]/,by=e=>rC.test(e),p$=["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 so(e){const[t,n]=vg(e,[rC]),r=Qt(t,p$),[s,i]=vg(n,["class","style","id","inert",/^data-/]);return Object.assign(s,t),Object.assign(i,r),[s,i]}function gn(e){return e==null?[]:Array.isArray(e)?e:[e]}function m$(e,t){let n=0;const r=function(){for(var s=arguments.length,i=new Array(s),a=0;a<s;a++)i[a]=arguments[a];clearTimeout(n),n=setTimeout(()=>e(...i),Q(t))};return r.clear=()=>{clearTimeout(n)},r.immediate=e,r}function In(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 O0(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 D0(e,t){return(arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0").repeat(Math.max(0,t-e.length))+e}function h$(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 L0(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 Gn(){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],a=t[s];if(P0(i)&&P0(a)){r[s]=Gn(i,a,n);continue}if(n&&Array.isArray(i)&&Array.isArray(a)){r[s]=n(i,a);continue}r[s]=a}return r}function sC(e){return e.map(t=>t.type===ke?sC(t.children):t).flat()}function Oa(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(Oa.cache.has(e))return Oa.cache.get(e);const t=e.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return Oa.cache.set(e,t),t}Oa.cache=new Map;function Ao(e,t){if(!t||typeof t!="object")return[];if(Array.isArray(t))return t.map(n=>Ao(e,n)).flat(1);if(t.suspense)return Ao(e,t.ssContent);if(Array.isArray(t.children))return t.children.map(n=>Ao(e,n)).flat(1);if(t.component){if(Object.getOwnPropertyDescriptor(t.component.provides,e))return[t.component];if(t.component.subTree)return Ao(e,t.component.subTree).flat(1)}return[]}var go=new WeakMap,ha=new WeakMap;class iC{constructor(t){I0(this,go,[]),I0(this,ha,0),this.size=t}get isFull(){return Xs(go,this).length===this.size}push(t){Xs(go,this)[Xs(ha,this)]=t,R0(ha,this,(Xs(ha,this)+1)%this.size)}values(){return Xs(go,this).slice(Xs(ha,this)).concat(Xs(go,this).slice(0,Xs(ha,this)))}clear(){Xs(go,this).length=0,R0(ha,this,0)}}function Sy(e){const t=Jt({});bn(()=>{const r=e();for(const s in r)t[s]=r[s]},{flush:"sync"});const n={};for(const r in t)n[r]=ee(()=>t[r]);return n}function Zd(e,t){return e.includes(t)}function aC(e){return e[2].toLowerCase()+e.slice(3)}const Fn=()=>[Function,Array];function $0(e,t){return t="on"+js(t),!!(e[t]||e[`${t}Once`]||e[`${t}Capture`]||e[`${t}OnceCapture`]||e[`${t}CaptureOnce`])}function mc(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 Da(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const n=["button","[href]",'input:not([type="hidden"])',"select","textarea","details:not(:has(> summary))","details > summary","[tabindex]",'[contenteditable]:not([contenteditable="false"])',"audio[controls]","video[controls]"].map(s=>`${s}${t?':not([tabindex="-1"])':""}:not([disabled], [inert])`).join(", ");let r;try{r=[...e.querySelectorAll(n)]}catch{return[]}return r.filter(s=>!s.closest("[inert]")).filter(s=>!!s.offsetParent||s.getClientRects().length>0).filter(s=>!s.parentElement?.closest("details:not([open])")||s.tagName==="SUMMARY"&&s.parentElement?.tagName==="DETAILS")}function oC(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?.(r)??!0))&&s<e.length&&s>=0);return r}function mu(e,t){const n=Da(e);if(t==null)(e===document.activeElement||!e.contains(document.activeElement))&&n[0]?.focus();else if(t==="first")n[0]?.focus();else if(t==="last")n.at(-1)?.focus();else if(typeof t=="number")n[t]?.focus();else{const r=oC(n,t);r?r.focus():mu(e,t==="next"?"first":"last")}}function Wc(e){return e==null||typeof e=="string"&&e.trim()===""}function ef(e,t){if(!(Ct&&typeof CSS<"u"&&typeof CSS.supports<"u"&&CSS.supports(`selector(${t})`)))return null;try{return!!e&&e.matches(t)}catch{return null}}function lC(e){return e.some(t=>Go(t)?t.type===Dn?!1:t.type!==ke||lC(t.children):!0)?e:null}function g$(e,t){if(!Ct||e===0)return t(),()=>{};const n=window.setTimeout(t,e);return()=>window.clearTimeout(n)}function v$(e,t){const n=e.clientX,r=e.clientY,s=t.getBoundingClientRect(),i=s.left,a=s.top,o=s.right,l=s.bottom;return n>=i&&n<=o&&r>=a&&r<=l}function yg(){const e=Ee(),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:()=>yy(e.value)}),t}function F0(e){const t=e.key.length===1,n=!e.ctrlKey&&!e.metaKey&&!e.altKey;return t&&n}function Xi(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="bigint"}function y$(e){const t={};for(const n in e)t[sr(n)]=e[n];return t}function b$(e){const t=["checked","disabled"];return Object.fromEntries(Object.entries(e).filter(n=>{let[r,s]=n;return t.includes(r)?!!s:s!==void 0}))}const uC=["top","bottom"],S$=["start","end","left","right"];function bg(e,t){let[n,r]=e.split(" ");return r||(r=Zd(uC,n)?"start":Zd(S$,n)?"top":"center"),{side:Sg(n,t),align:Sg(r,t)}}function Sg(e,t){return e==="start"?t?"right":"left":e==="end"?t?"left":"right":e}function gm(e){return{side:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[e.side],align:e.align}}function vm(e){return{side:e.side,align:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[e.align]}}function N0(e){return{side:e.align,align:e.side}}function M0(e){return Zd(uC,e.side)?"y":"x"}class Kr{constructor(t){const n=document.body.currentCSSZoom??1,r=t instanceof Element,s=r?1+(1-n)/n:1,{x:i,y:a,width:o,height:l}=r?t.getBoundingClientRect():t;this.x=i*s,this.y=a*s,this.width=o*s,this.height=l*s}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 V0(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 cC(e){if(Array.isArray(e)){const t=document.body.currentCSSZoom??1,n=1+(1-t)/t;return new Kr({x:e[0]*n,y:e[1]*n,width:0*n,height:0*n})}else return new Kr(e)}function w$(e){if(e===document.documentElement)if(visualViewport){const t=document.body.currentCSSZoom??1;return new Kr({x:visualViewport.scale>1?0:visualViewport.offsetLeft,y:visualViewport.scale>1?0:visualViewport.offsetTop,width:visualViewport.width*visualViewport.scale/t,height:visualViewport.height*visualViewport.scale/t})}else return new Kr({x:0,y:0,width:document.documentElement.clientWidth,height:document.documentElement.clientHeight});else return new Kr(e)}function wy(e){const t=new Kr(e),n=getComputedStyle(e),r=n.transform;if(r){let s,i,a,o,l;if(r.startsWith("matrix3d("))s=r.slice(9,-1).split(/, /),i=Number(s[0]),a=Number(s[5]),o=Number(s[12]),l=Number(s[13]);else if(r.startsWith("matrix("))s=r.slice(7,-1).split(/, /),i=Number(s[0]),a=Number(s[3]),o=Number(s[4]),l=Number(s[5]);else return new Kr(t);const c=n.transformOrigin,u=t.x-o-(1-i)*parseFloat(c),d=t.y-l-(1-a)*parseFloat(c.slice(c.indexOf(" ")+1)),p=i?t.width/i:e.offsetWidth+1,m=a?t.height/a:e.offsetHeight+1;return new Kr({x:u,y:d,width:p,height:m})}else return new Kr(t)}function si(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 vd=new WeakMap;function _$(e,t){Object.keys(t).forEach(n=>{if(by(n)){const r=aC(n),s=vd.get(e);if(t[n]==null)s?.forEach(i=>{const[a,o]=i;a===r&&(e.removeEventListener(r,o),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]]),vd.has(e)||vd.set(e,i)}}else t[n]==null?e.removeAttribute(n):e.setAttribute(n,t[n])})}function k$(e,t){Object.keys(t).forEach(n=>{if(by(n)){const r=aC(n),s=vd.get(e);s?.forEach(i=>{const[a,o]=i;a===r&&(e.removeEventListener(r,o),s.delete(i))})}else e.removeAttribute(n)})}const vo=2.4,B0=.2126729,U0=.7151522,z0=.072175,x$=.55,E$=.58,C$=.57,T$=.62,Gc=.03,j0=1.45,I$=5e-4,R$=1.25,P$=1.25,H0=.078,q0=12.82051282051282,Kc=.06,W0=.001;function G0(e,t){const n=(e.r/255)**vo,r=(e.g/255)**vo,s=(e.b/255)**vo,i=(t.r/255)**vo,a=(t.g/255)**vo,o=(t.b/255)**vo;let l=n*B0+r*U0+s*z0,c=i*B0+a*U0+o*z0;if(l<=Gc&&(l+=(Gc-l)**j0),c<=Gc&&(c+=(Gc-c)**j0),Math.abs(c-l)<I$)return 0;let u;if(c>l){const d=(c**x$-l**E$)*R$;u=d<W0?0:d<H0?d-d*q0*Kc:d-Kc}else{const d=(c**T$-l**C$)*P$;u=d>-W0?0:d>-H0?d-d*q0*Kc:d+Kc}return u*100}const tf=.20689655172413793,A$=e=>e>tf**3?Math.cbrt(e):e/(3*tf**2)+4/29,O$=e=>e>tf?e**3:3*tf**2*(e-4/29);function dC(e){const t=A$,n=t(e[1]);return[116*n-16,500*(t(e[0]/.95047)-n),200*(n-t(e[2]/1.08883))]}function fC(e){const t=O$,n=(e[0]+16)/116;return[t(n+e[1]/500)*.95047,t(n),t(n-e[2]/200)*1.08883]}const D$=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]],L$=e=>e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055,$$=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],F$=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4;function pC(e){const t=Array(3),n=L$,r=D$;for(let s=0;s<3;++s)t[s]=Math.round(In(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 _y(e){let{r:t,g:n,b:r}=e;const s=[0,0,0],i=F$,a=$$;t=i(t/255),n=i(n/255),r=i(r/255);for(let o=0;o<3;++o)s[o]=a[o][0]*t+a[o][1]*n+a[o][2]*r;return s}function wg(e){return!!e&&/^(#|var\(--|(rgb|hsl)a?\()/.test(e)}function N$(e){return wg(e)&&!/^((rgb|hsl)a?\()?var\(--/.test(e)}const K0=/^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/,M$={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)=>Y0({h:e,s:t,l:n,a:r}),hsla:(e,t,n,r)=>Y0({h:e,s:t,l:n,a:r}),hsv:(e,t,n,r)=>Au({h:e,s:t,v:n,a:r}),hsva:(e,t,n,r)=>Au({h:e,s:t,v:n,a:r})};function Ls(e){if(typeof e=="number")return{r:(e&16711680)>>16,g:(e&65280)>>8,b:e&255};if(typeof e=="string"&&K0.test(e)){const{groups:t}=e.match(K0),{fn:n,values:r}=t,s=r.split(/,\s*|\s*\/\s*|\s+/).map((i,a)=>i.endsWith("%")||a>0&&a<3&&["hsl","hsla","hsv","hsva"].includes(n)?parseFloat(i)/100:parseFloat(i));return M$[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),B$(t)}else if(typeof e=="object"){if(hm(e,["r","g","b"]))return e;if(hm(e,["h","s","l"]))return Au(mC(e));if(hm(e,["h","s","v"]))return Au(e)}throw new TypeError(`Invalid color: ${e==null?e:String(e)||e.constructor.name}
2
+ Expected #hex, #hexa, rgb(), rgba(), hsl(), hsla(), object or number`)}function Au(e){const{h:t,s:n,v:r,a:s}=e,i=o=>{const l=(o+t/60)%6;return r-r*n*Math.max(Math.min(l,4-l,1),0)},a=[i(5),i(3),i(1)].map(o=>Math.round(o*255));return{r:a[0],g:a[1],b:a[2],a:s}}function Y0(e){return Au(mC(e))}function mC(e){const{h:t,s:n,l:r,a:s}=e,i=r+n*Math.min(r,1-r),a=i===0?0:2-2*r/i;return{h:t,s:a,v:i,a:s}}function Yc(e){const t=Math.round(e).toString(16);return("00".substr(0,2-t.length)+t).toUpperCase()}function V$(e){let{r:t,g:n,b:r,a:s}=e;return`#${[Yc(t),Yc(n),Yc(r),s!==void 0?Yc(Math.round(s*255)):""].join("")}`}function B$(e){e=U$(e);let[t,n,r,s]=h$(e,2).map(i=>parseInt(i,16));return s=s===void 0?s:s/255,{r:t,g:n,b:r,a:s}}function U$(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=O0(O0(e,6),8,"F")),e}function z$(e,t){const n=dC(_y(e));return n[0]=n[0]+t*10,pC(fC(n))}function j$(e,t){const n=dC(_y(e));return n[0]=n[0]-t*10,pC(fC(n))}function H$(e){const t=Ls(e);return _y(t)[1]}function hC(e){const t=Math.abs(G0(Ls(0),Ls(e)));return Math.abs(G0(Ls(16777215),Ls(e)))>Math.min(t,50)?"#fff":"#000"}function oe(e,t){return n=>Object.keys(e).reduce((r,s)=>{const a=typeof e[s]=="object"&&e[s]!=null&&!Array.isArray(e[s])?e[s]:{type:e[s]};return n&&s in n?r[s]={...a,default:n[s]}:r[s]=a,t&&!r[s].source&&(r[s].source=t),r},{})}const Ue=oe({class:[String,Array,Object],style:{type:[String,Array,Object],default:null}},"component");function tn(e,t){const n=hl();if(!n)throw new Error(`[Vuetify] ${e} must be called from inside a setup function`);return n}function Hs(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"composables";const t=tn(e).type;return Oa(t?.aliasName||t?.name)}function q$(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:tn("injectSelf");const{provides:n}=t;if(n&&e in n)return n[e]}const Yo=Symbol.for("vuetify:defaults");function W$(e){return q(e)}function ky(){const e=He(Yo);if(!e)throw new Error("[Vuetify] Could not find defaults instance");return e}function Rn(e,t){const n=ky(),r=q(e),s=A(()=>{if(Q(t?.disabled))return n.value;const a=Q(t?.scoped),o=Q(t?.reset),l=Q(t?.root);if(r.value==null&&!(a||o||l))return n.value;let c=Gn(r.value,{prev:n.value});if(a)return c;if(o||l){const u=Number(o||1/0);for(let d=0;d<=u&&!(!c||!("prev"in c));d++)c=c.prev;return c&&typeof l=="string"&&l in c&&(c=Gn(Gn(c,{prev:c}),c[l])),c}return c.prev?Gn(c.prev,c):c});return Dt(Yo,s),s}function G$(e,t){return e.props&&(typeof e.props[t]<"u"||typeof e.props[Oa(t)]<"u")}function K$(){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]:ky();const r=tn("useDefaults");if(t=t??r.type.name??r.type.__name,!t)throw new Error("[Vuetify] Could not determine component name");const s=A(()=>n.value?.[e._as??t]),i=new Proxy(e,{get(l,c){const u=Reflect.get(l,c);if(c==="class"||c==="style")return[s.value?.[c],u].filter(m=>m!=null);if(G$(r.vnode,c))return u;const d=s.value?.[c];if(d!==void 0)return d;const p=n.value?.global?.[c];return p!==void 0?p:u}}),a=Ee();bn(()=>{if(s.value){const l=Object.entries(s.value).filter(c=>{let[u]=c;return u.startsWith(u[0].toUpperCase())});a.value=l.length?Object.fromEntries(l):void 0}else a.value=void 0});function o(){const l=q$(Yo,r);Dt(Yo,A(()=>a.value?Gn(l?.value??{},a.value):l?.value))}return{props:i,provideSubDefaults:o}}function gl(e){if(e._setup=e._setup??e.setup,!e.name)return e;if(e._setup){e.props=oe(e.props??{},e.name)();const t=Object.keys(e.props).filter(n=>n!=="class"&&n!=="style");e.filterProps=function(r){return Vs(r,t)},e.props._as=String,e.setup=function(r,s){const i=ky();if(!i.value)return e._setup(r,s);const{props:a,provideSubDefaults:o}=K$(r,r._as??e.name,i),l=e._setup(a,s);return o(),l}}return e}function be(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return t=>(e?gl:Ae)(t)}function Y$(e,t){return t.props=e,t}function vl(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"div",n=arguments.length>2?arguments[2]:void 0;return be()({name:n??js(sr(e.replace(/__/g,"-"))),props:{tag:{type:String,default:t},...Ue()},setup(r,s){let{slots:i}=s;return()=>gs(r.tag,{class:[e,r.class],style:r.style},i.default?.())}})}function J$(e,t,n,r){if(!n||Xi(e)||Xi(t))return;const s=n.get(e);if(s)s.set(t,r);else{const i=new WeakMap;i.set(t,r),n.set(e,i)}}function X$(e,t,n){if(!n||Xi(e)||Xi(t))return null;const r=n.get(e)?.get(t);if(typeof r=="boolean")return r;const s=n.get(t)?.get(e);return typeof s=="boolean"?s:null}function mr(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new WeakMap;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 r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;const s=X$(e,t,n);return s||(J$(e,t,n,!0),r.every(i=>mr(e[i],t[i],n)))}function gC(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 Ou="cubic-bezier(0.4, 0, 0.2, 1)",J0="cubic-bezier(0.0, 0, 0.2, 1)",X0="cubic-bezier(0.4, 0, 1, 1)",Q$={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,instant:e=>1};function Q0(e,t,n){return Object.keys(e).filter(r=>by(r)&&r.endsWith(t)).reduce((r,s)=>(r[s.slice(0,-t.length)]=i=>mc(e[s],i,n(i)),r),{})}function xy(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;for(;e;){if(t?Z$(e):Ey(e))return e;e=e.parentElement}return document.scrollingElement}function nf(e,t){const n=[];if(t&&e&&!t.contains(e))return n;for(;e&&(Ey(e)&&n.push(e),e!==t);)e=e.parentElement;return n}function Ey(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return!1;const t=window.getComputedStyle(e),n=t.overflowY==="scroll"||t.overflowY==="auto"&&e.scrollHeight>e.clientHeight,r=t.overflowX==="scroll"||t.overflowX==="auto"&&e.scrollWidth>e.clientWidth;return n||r}function Z$(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return!1;const t=window.getComputedStyle(e);return["scroll","auto"].includes(t.overflowY)}function eF(e){for(;e;){if(window.getComputedStyle(e).position==="fixed")return!0;e=e.offsetParent}return!1}function Ie(e){const t=tn("useRender");t.render=e}function tF(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{leading:!0,trailing:!0},r=0,s=0,i=!1,a=0;function o(){clearTimeout(r),i=!1,a=0}const l=function(){for(var c=arguments.length,u=new Array(c),d=0;d<c;d++)u[d]=arguments[d];clearTimeout(r);const p=Date.now();a||(a=p);const m=p-Math.max(a,s);function v(){s=Date.now(),r=setTimeout(o,t),e(...u)}i?m>=t?v():n.trailing&&(r=setTimeout(v,t-m)):(i=!0,n.leading&&v())};return l.clear=o,l.immediate=e,l}const rs=oe({border:[Boolean,Number,String]},"border");function vs(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Hs();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 nF=[null,"default","comfortable","compact"],Pn=oe({density:{type:String,default:"default",validator:e=>nF.includes(e)}},"density");function Fr(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Hs();return{densityClasses:ee(()=>`${t}--density-${e.density}`)}}const _r=oe({elevation:{type:[Number,String],validator(e){const t=parseInt(e);return!isNaN(t)&&t>=0&&t<=24}}},"elevation");function Nr(e){return{elevationClasses:ee(()=>{const n=nt(e)?e.value:e.elevation;return n==null?[]:[`elevation-${n}`]})}}const Tn=oe({rounded:{type:[Boolean,Number,String],default:void 0},tile:Boolean},"rounded");function An(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Hs();return{roundedClasses:A(()=>{const r=nt(e)?e.value:e.rounded,s=nt(e)?!1:e.tile,i=[];if(s||r===!1)i.push("rounded-0");else if(r===!0||r==="")i.push(`${t}--rounded`);else if(typeof r=="string"||r===0)for(const a of String(r).split(" "))i.push(`rounded-${a}`);return i})}}const lt=oe({tag:{type:[String,Object,Function],default:"div"}},"tag"),Du=Symbol.for("vuetify:theme"),wt=oe({theme:String},"theme");function Z0(){return{defaultTheme:"light",prefix:"v-",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":"#EEEEEE","theme-on-kbd":"#000000","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":"#424242","theme-on-kbd":"#FFFFFF","theme-code":"#343434","theme-on-code":"#CCCCCC"}}},stylesheetId:"vuetify-theme-stylesheet",scoped:!1,unimportant:!1,utilities:!0}}function rF(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Z0();const t=Z0();if(!e)return{...t,isDisabled:!0};const n={};for(const[r,s]of Object.entries(e.themes??{})){const i=s.dark||r==="dark"?t.themes?.dark:t.themes?.light;n[r]=Gn(i,s)}return Gn(t,{...e,themes:n})}function ga(e,t,n,r){e.push(`${oF(t,r)} {
3
+ `,...n.map(s=>` ${s};
4
+ `),`}
5
+ `)}function eS(e,t){const n=e.dark?2:1,r=e.dark?1:2,s=[];for(const[i,a]of Object.entries(e.colors)){const o=Ls(a);s.push(`--${t}theme-${i}: ${o.r},${o.g},${o.b}`),i.startsWith("on-")||s.push(`--${t}theme-${i}-overlay-multiplier: ${H$(a)>.18?n:r}`)}for(const[i,a]of Object.entries(e.variables)){const o=typeof a=="string"&&a.startsWith("#")?Ls(a):void 0,l=o?`${o.r}, ${o.g}, ${o.b}`:void 0;s.push(`--${t}${i}: ${l??a}`)}return s}function sF(e,t,n){const r={};if(n)for(const s of["lighten","darken"]){const i=s==="lighten"?z$:j$;for(const a of Po(n[s],1))r[`${e}-${s}-${a}`]=V$(i(Ls(t),a))}return r}function iF(e,t){if(!t)return{};let n={};for(const r of t.colors){const s=e[r];s&&(n={...n,...sF(r,s,t)})}return n}function aF(e){const t={};for(const n of Object.keys(e)){if(n.startsWith("on-")||e[`on-${n}`])continue;const r=`on-${n}`,s=Ls(e[n]);t[r]=hC(s)}return t}function oF(e,t){if(!t)return e;const n=`:where(${t})`;return e===":root"?n:`${n} ${e}`}function lF(e,t,n){const r=uF(e,t);r&&(r.innerHTML=n)}function uF(e,t){if(!Ct)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 cF(e){const t=rF(e),n=Ee(t.defaultTheme),r=q(t.themes),s=Ee("light"),i=A({get(){return n.value==="system"?s.value:n.value},set(w){n.value=w}}),a=A(()=>{const w={};for(const[_,T]of Object.entries(r.value)){const P={...T.colors,...iF(T.colors,t.variations)};w[_]={...T,colors:{...P,...aF(P)}}}return w}),o=ee(()=>a.value[i.value]),l=ee(()=>n.value==="system"),c=A(()=>{const w=[],_=t.unimportant?"":" !important",T=t.scoped?t.prefix:"";o.value?.dark&&ga(w,":root",["color-scheme: dark"],t.scope),ga(w,":root",eS(o.value,t.prefix),t.scope);for(const[x,C]of Object.entries(a.value))ga(w,`.${t.prefix}theme--${x}`,[`color-scheme: ${C.dark?"dark":"normal"}`,...eS(C,t.prefix)],t.scope);if(t.utilities){const x=[],C=[],E=new Set(Object.values(a.value).flatMap(R=>Object.keys(R.colors)));for(const R of E)R.startsWith("on-")?ga(C,`.${R}`,[`color: rgb(var(--${t.prefix}theme-${R}))${_}`],t.scope):(ga(x,`.${T}bg-${R}`,[`--${t.prefix}theme-overlay-multiplier: var(--${t.prefix}theme-${R}-overlay-multiplier)`,`background-color: rgb(var(--${t.prefix}theme-${R}))${_}`,`color: rgb(var(--${t.prefix}theme-on-${R}))${_}`],t.scope),ga(C,`.${T}text-${R}`,[`color: rgb(var(--${t.prefix}theme-${R}))${_}`],t.scope),ga(C,`.${T}border-${R}`,[`--${t.prefix}border-color: var(--${t.prefix}theme-${R})`],t.scope));t.layers?w.push(`@layer background {
6
+ `,...x.map(R=>` ${R}`),`}
7
+ `,`@layer foreground {
8
+ `,...C.map(R=>` ${R}`),`}
9
+ `):w.push(...x,...C)}let P=w.map((x,C)=>C===0?x:` ${x}`).join("");return t.layers&&(P=`@layer vuetify.theme {
10
+ `+w.map(x=>` ${x}`).join("")+`
11
+ }`),P}),u=ee(()=>t.isDisabled?void 0:`${t.prefix}theme--${i.value}`),d=ee(()=>Object.keys(a.value));if(vy){let _=function(){s.value=w.matches?"dark":"light"};var y=_;const w=window.matchMedia("(prefers-color-scheme: dark)");_(),w.addEventListener("change",_,{passive:!0}),cc()&&Xt(()=>{w.removeEventListener("change",_)})}function p(w){if(t.isDisabled)return;const _=w._context.provides.usehead;if(_){let x=function(){return{style:[{textContent:c.value,id:t.stylesheetId,nonce:t.cspNonce||!1}]}};var T=x;if(_.push){const C=_.push(x);Ct&&_e(c,()=>{C.patch(x)})}else Ct?(_.addHeadObjs(ee(x)),bn(()=>_.updateDOM())):_.addHeadObjs(x())}else{let x=function(){lF(t.stylesheetId,t.cspNonce,c.value)};var P=x;Ct?_e(c,x,{immediate:!0}):x()}}function m(w){w!=="system"&&!d.value.includes(w)||(i.value=w)}function v(){let w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d.value;const _=w.indexOf(i.value),T=_===-1?0:(_+1)%w.length;m(w[T])}function g(){let w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["light","dark"];v(w)}const b=new Proxy(i,{get(w,_){return Reflect.get(w,_)},set(w,_,T){return _==="value"&&ZE(`theme.global.name.value = ${T}`,`theme.change('${T}')`),Reflect.set(w,_,T)}});return{install:p,change:m,cycle:v,toggle:g,isDisabled:t.isDisabled,isSystem:l,name:i,themes:r,current:o,computedThemes:a,prefix:t.prefix,themeClasses:u,styles:c,global:{name:b,current:o}}}function Mt(e){tn("provideTheme");const t=He(Du,null);if(!t)throw new Error("Could not find Vuetify theme injection");const n=ee(()=>e.theme??t.name.value),r=ee(()=>t.themes.value[n.value]),s=ee(()=>t.isDisabled?void 0:`${t.prefix}theme--${n.value}`),i={...t,name:n,current:r,themeClasses:s};return Dt(Du,i),i}function Cy(){tn("useTheme");const e=He(Du,null);if(!e)throw new Error("Could not find Vuetify theme injection");return e}function Ty(e){return Sy(()=>{const{class:t,style:n}=dF(e);return{colorClasses:t,colorStyles:n}})}function Qr(e){const{colorClasses:t,colorStyles:n}=Ty(()=>({text:Rt(e)}));return{textColorClasses:t,textColorStyles:n}}function yn(e){const{colorClasses:t,colorStyles:n}=Ty(()=>({background:Rt(e)}));return{backgroundColorClasses:t,backgroundColorStyles:n}}function dF(e){const t=Rt(e),n=[],r={};if(t.background)if(wg(t.background)){if(r.backgroundColor=t.background,!t.text&&N$(t.background)){const s=Ls(t.background);if(s.a==null||s.a===1){const i=hC(s);r.color=i,r.caretColor=i}}}else n.push(`bg-${t.background}`);return t.text&&(wg(t.text)?(r.color=t.text,r.caretColor=t.text):n.push(`text-${t.text}`)),{class:n,style:r}}const fF=["elevated","flat","tonal","outlined","text","plain"];function ia(e,t){return S(ke,null,[e&&S("span",{key:"overlay",class:Se(`${t}__overlay`)},null),S("span",{key:"underlay",class:Se(`${t}__underlay`)},null)])}const ys=oe({color:String,variant:{type:String,default:"elevated",validator:e=>fF.includes(e)}},"variant");function io(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Hs();const n=ee(()=>{const{variant:i}=Rt(e);return`${t}--variant-${i}`}),{colorClasses:r,colorStyles:s}=Ty(()=>{const{variant:i,color:a}=Rt(e);return{[["elevated","flat"].includes(i)?"background":"text"]:a}});return{colorClasses:r,colorStyles:s,variantClasses:n}}const vC=oe({baseColor:String,divided:Boolean,direction:{type:String,default:"horizontal"},...rs(),...Ue(),...Pn(),..._r(),...Tn(),...lt(),...wt(),...ys()},"VBtnGroup"),_g=be()({name:"VBtnGroup",props:vC(),setup(e,t){let{slots:n}=t;const{themeClasses:r}=Mt(e),{densityClasses:s}=Fr(e),{borderClasses:i}=vs(e),{elevationClasses:a}=Nr(e),{roundedClasses:o}=An(e);Rn({VBtn:{height:ee(()=>e.direction==="horizontal"?"auto":null),baseColor:ee(()=>e.baseColor),color:ee(()=>e.color),density:ee(()=>e.density),flat:!0,variant:ee(()=>e.variant)}}),Ie(()=>f(e.tag,{class:Se(["v-btn-group",`v-btn-group--${e.direction}`,{"v-btn-group--divided":e.divided},r.value,i.value,s.value,a.value,o.value,e.class]),style:Le(e.style)},n))}});function hr(e,t){let n;function r(){n=Ha(),n.run(()=>t.length?t(()=>{n?.stop(),r()}):t())}_e(e,s=>{s&&!n?r():s||(n?.stop(),n=void 0)},{immediate:!0}),Xt(()=>{n?.stop()})}function tt(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=tn("useProxiedModel"),a=q(e[t]!==void 0?e[t]:n),o=Oa(t),c=A(o!==t?()=>(e[t],!!((i.vnode.props?.hasOwnProperty(t)||i.vnode.props?.hasOwnProperty(o))&&(i.vnode.props?.hasOwnProperty(`onUpdate:${t}`)||i.vnode.props?.hasOwnProperty(`onUpdate:${o}`)))):()=>(e[t],!!(i.vnode.props?.hasOwnProperty(t)&&i.vnode.props?.hasOwnProperty(`onUpdate:${t}`))));hr(()=>!c.value,()=>{_e(()=>e[t],d=>{a.value=d})});const u=A({get(){const d=e[t];return r(c.value?d:a.value)},set(d){const p=s(d),m=Me(c.value?e[t]:a.value);m===p||r(m)===d||(a.value=p,i?.emit(`update:${t}`,p))}});return Object.defineProperty(u,"externalValue",{get:()=>c.value?e[t]:a.value}),u}const yl=oe({modelValue:{type:null,default:void 0},multiple:Boolean,mandatory:[Boolean,String],max:Number,selectedClass:String,disabled:Boolean},"group"),bl=oe({value:null,disabled:Boolean,selectedClass:String},"group-item");function Ka(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;const r=tn("useGroupItem");if(!r)throw new Error("[Vuetify] useGroupItem composable must be used inside a component setup function");const s=Sr();Dt(Symbol.for(`${t.description}:id`),s);const i=He(t,null);if(!i){if(!n)return i;throw new Error(`[Vuetify] Could not find useGroup injection with symbol ${t.description}`)}const a=ee(()=>e.value),o=A(()=>!!(i.disabled.value||e.disabled));function l(){i?.register({id:s,value:a,disabled:o},r)}function c(){i?.unregister(s)}l(),Mn(()=>c());const u=A(()=>i.isSelected(s)),d=A(()=>i.items.value[0].id===s),p=A(()=>i.items.value[i.items.value.length-1].id===s),m=A(()=>u.value&&[i.selectedClass.value,e.selectedClass]);return _e(u,v=>{r.emit("group:selected",{value:v})},{flush:"sync"}),{id:s,isSelected:u,isFirst:d,isLast:p,toggle:()=>i.select(s,!u.value),select:v=>i.select(s,v),selectedClass:m,value:a,disabled:o,group:i,register:l,unregister:c}}function ao(e,t){let n=!1;const r=Jt([]),s=tt(e,"modelValue",[],p=>p===void 0?[]:yC(r,p===null?[null]:gn(p)),p=>{const m=mF(r,p);return e.multiple?m:m[0]}),i=tn("useGroup");function a(p,m){const v=p,g=Symbol.for(`${t.description}:id`),y=Ao(g,i?.vnode).indexOf(m);Q(v.value)===void 0&&(v.value=y,v.useIndexAsValue=!0),y>-1?r.splice(y,0,v):r.push(v)}function o(p){if(n)return;l();const m=r.findIndex(v=>v.id===p);r.splice(m,1)}function l(){const p=r.find(m=>!m.disabled);p&&e.mandatory==="force"&&!s.value.length&&(s.value=[p.id])}ot(()=>{l()}),Mn(()=>{n=!0}),oy(()=>{for(let p=0;p<r.length;p++)r[p].useIndexAsValue&&(r[p].value=p)});function c(p,m){const v=r.find(g=>g.id===p);if(!(m&&v?.disabled))if(e.multiple){const g=s.value.slice(),b=g.findIndex(w=>w===p),y=~b;if(m=m??!y,y&&e.mandatory&&g.length<=1||!y&&e.max!=null&&g.length+1>e.max)return;b<0&&m?g.push(p):b>=0&&!m&&g.splice(b,1),s.value=g}else{const g=s.value.includes(p);if(e.mandatory&&g||!g&&!m)return;s.value=m??!g?[p]:[]}}function u(p){if(e.multiple,s.value.length){const m=s.value[0],v=r.findIndex(y=>y.id===m);let g=(v+p)%r.length,b=r[g];for(;b.disabled&&g!==v;)g=(g+p)%r.length,b=r[g];if(b.disabled)return;s.value=[r[g].id]}else{const m=r.find(v=>!v.disabled);m&&(s.value=[m.id])}}const d={register:a,unregister:o,selected:s,select:c,disabled:ee(()=>e.disabled),prev:()=>u(r.length-1),next:()=>u(1),isSelected:p=>s.value.includes(p),selectedClass:ee(()=>e.selectedClass),items:ee(()=>r),getItemIndex:p=>pF(r,p)};return Dt(t,d),d}function pF(e,t){const n=yC(e,[t]);return n.length?e.findIndex(r=>r.id===n[0]):-1}function yC(e,t){const n=[];return t.forEach(r=>{const s=e.find(a=>mr(r,a.value)),i=e[r];s?.value!==void 0?n.push(s.id):i?.useIndexAsValue&&n.push(i.id)}),n}function mF(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!==void 0?i.value:s)}}),n}const bC=Symbol.for("vuetify:v-btn-toggle"),hF=oe({...vC(),...yl()},"VBtnToggle"),SC=be()({name:"VBtnToggle",props:hF(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{isSelected:r,next:s,prev:i,select:a,selected:o}=ao(e,bC);return Ie(()=>{const l=_g.filterProps(e);return f(_g,ce({class:["v-btn-toggle",e.class]},l,{style:e.style}),{default:()=>[n.default?.({isSelected:r,next:s,prev:i,select:a,selected:o})]})}),{next:s,prev:i,select:a}}}),gF=oe({defaults:Object,disabled:Boolean,reset:[Number,String],root:[Boolean,String],scoped:Boolean},"VDefaultsProvider"),vt=be(!1)({name:"VDefaultsProvider",props:gF(),setup(e,t){let{slots:n}=t;const{defaults:r,disabled:s,reset:i,root:a,scoped:o}=Ii(e);return Rn(r,{reset:i,root:a,scoped:o,disabled:s}),()=>n.default?.()}}),Fe=[String,Function,Object,Array],kg=Symbol.for("vuetify:icons"),ip=oe({icon:{type:Fe},tag:{type:[String,Object,Function],required:!0}},"icon"),tS=be()({name:"VComponentIcon",props:ip(),setup(e,t){let{slots:n}=t;return()=>{const r=e.icon;return f(e.tag,null,{default:()=>[e.icon?f(r,null,null):n.default?.()]})}}}),wC=gl({name:"VSvgIcon",inheritAttrs:!1,props:ip(),setup(e,t){let{attrs:n}=t;return()=>f(e.tag,ce(n,{style:null}),{default:()=>[S("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)?S("path",{d:r[0],"fill-opacity":r[1]},null):S("path",{d:r},null)):S("path",{d:e.icon},null)])]})}}),vF=gl({name:"VLigatureIcon",props:ip(),setup(e){return()=>f(e.tag,null,{default:()=>[e.icon]})}}),_C=gl({name:"VClassIcon",props:ip(),setup(e){return()=>f(e.tag,{class:Se(e.icon)},null)}}),yF=e=>{const t=He(kg);if(!t)throw new Error("Missing Vuetify Icons provide!");return{iconData:A(()=>{const r=Rt(e);if(!r)return{component:tS};let s=r;if(typeof s=="string"&&(s=s.trim(),s.startsWith("$")&&(s=t.aliases?.[s.slice(1)])),Array.isArray(s))return{component:wC,icon:s};if(typeof s!="string")return{component:tS,icon:s};const i=Object.keys(t.sets).find(l=>typeof s=="string"&&s.startsWith(`${l}:`)),a=i?s.slice(i.length+1):s;return{component:t.sets[i??t.defaultSet].component,icon:a}})}},bF=["x-small","small","default","large","x-large"],Sl=oe({size:{type:[String,Number],default:"default"}},"size");function hc(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Hs();return Sy(()=>{const n=e.size;let r,s;return Zd(bF,n)?r=`${t}--size-${n}`:n&&(s={width:Oe(n),height:Oe(n)}),{sizeClasses:r,sizeStyles:s}})}const SF=oe({color:String,disabled:Boolean,start:Boolean,end:Boolean,icon:Fe,opacity:[String,Number],...Ue(),...Sl(),...lt({tag:"i"}),...wt()},"VIcon"),j=be()({name:"VIcon",props:SF(),setup(e,t){let{attrs:n,slots:r}=t;const s=Ee(),{themeClasses:i}=Cy(),{iconData:a}=yF(()=>s.value||e.icon),{sizeClasses:o}=hc(e),{textColorClasses:l,textColorStyles:c}=Qr(()=>e.color);return Ie(()=>{const u=r.default?.();u&&(s.value=sC(u).filter(p=>p.type===fc&&p.children&&typeof p.children=="string")[0]?.children);const d=!!(n.onClick||n.onClickOnce);return f(a.value.component,{tag:e.tag,icon:a.value.icon,class:Se(["v-icon","notranslate",i.value,o.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:Le([{"--v-icon-opacity":e.opacity},o.value?void 0:{fontSize:Oe(e.size),height:Oe(e.size),width:Oe(e.size)},c.value,e.style]),role:d?"button":void 0,"aria-hidden":!d,tabindex:d?e.disabled?-1:0:void 0},{default:()=>[u]})}),{}}});function kC(e,t){const n=q(),r=Ee(!1);if(gy){const s=new IntersectionObserver(i=>{r.value=!!i.find(a=>a.isIntersecting)},t);Xt(()=>{s.disconnect()}),_e(n,(i,a)=>{a&&(s.unobserve(a),r.value=!1),i&&s.observe(i)},{flush:"post"})}return{intersectionRef:n,isIntersecting:r}}function Qi(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"content";const n=yg(),r=q();if(Ct){const s=new ResizeObserver(i=>{e?.(i,s),i.length&&(t==="content"?r.value=i[0].contentRect:r.value=i[0].target.getBoundingClientRect())});Mn(()=>{s.disconnect()}),_e(()=>n.el,(i,a)=>{a&&(s.unobserve(a),r.value=void 0),i&&s.observe(i)},{flush:"post"})}return{resizeRef:n,contentRect:gi(r)}}const wF=oe({bgColor:String,color:String,indeterminate:[Boolean,String],rounded:Boolean,modelValue:{type:[Number,String],default:0},rotate:{type:[Number,String],default:0},width:{type:[Number,String],default:4},...Ue(),...Sl(),...lt({tag:"div"}),...wt()},"VProgressCircular"),un=be()({name:"VProgressCircular",props:wF(),setup(e,t){let{slots:n}=t;const r=20,s=2*Math.PI*r,i=q(),{themeClasses:a}=Mt(e),{sizeClasses:o,sizeStyles:l}=hc(e),{textColorClasses:c,textColorStyles:u}=Qr(()=>e.color),{textColorClasses:d,textColorStyles:p}=Qr(()=>e.bgColor),{intersectionRef:m,isIntersecting:v}=kC(),{resizeRef:g,contentRect:b}=Qi(),y=ee(()=>In(parseFloat(e.modelValue),0,100)),w=ee(()=>Number(e.width)),_=ee(()=>l.value?Number(e.size):b.value?b.value.width:Math.max(w.value,32)),T=ee(()=>r/(1-w.value/_.value)*2),P=ee(()=>w.value/_.value*T.value),x=ee(()=>{const E=(100-y.value)/100*s;return e.rounded&&y.value>0&&y.value<100?Oe(Math.min(s-.01,E+P.value)):Oe(E)}),C=A(()=>{const E=Number(e.rotate);return e.rounded?E+P.value/2/s*360:E});return bn(()=>{m.value=i.value,g.value=i.value}),Ie(()=>f(e.tag,{ref:i,class:Se(["v-progress-circular",{"v-progress-circular--indeterminate":!!e.indeterminate,"v-progress-circular--visible":v.value,"v-progress-circular--disable-shrink":e.indeterminate&&(e.indeterminate==="disable-shrink"||Wa())},a.value,o.value,c.value,e.class]),style:Le([l.value,u.value,e.style]),role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e.indeterminate?void 0:y.value},{default:()=>[S("svg",{style:{transform:`rotate(calc(-90deg + ${C.value}deg))`},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${T.value} ${T.value}`},[S("circle",{class:Se(["v-progress-circular__underlay",d.value]),style:Le(p.value),fill:"transparent",cx:"50%",cy:"50%",r,"stroke-width":P.value,"stroke-dasharray":s,"stroke-dashoffset":0},null),S("circle",{class:"v-progress-circular__overlay",fill:"transparent",cx:"50%",cy:"50%",r,"stroke-width":P.value,"stroke-dasharray":s,"stroke-dashoffset":x.value,"stroke-linecap":e.rounded?"round":void 0},null)]),n.default&&S("div",{class:"v-progress-circular__content"},[n.default({value:y.value})])]})),{}}}),Vn=oe({height:[Number,String],maxHeight:[Number,String],maxWidth:[Number,String],minHeight:[Number,String],minWidth:[Number,String],width:[Number,String]},"dimension");function Bn(e){return{dimensionStyles:A(()=>{const n={},r=Oe(e.height),s=Oe(e.maxHeight),i=Oe(e.maxWidth),a=Oe(e.minHeight),o=Oe(e.minWidth),l=Oe(e.width);return r!=null&&(n.height=r),s!=null&&(n.maxHeight=s),i!=null&&(n.maxWidth=i),a!=null&&(n.minHeight=a),o!=null&&(n.minWidth=o),l!=null&&(n.width=l),n})}}const _F={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"},ariaLabel:{previousMonth:"Previous month",nextMonth:"Next month",selectYear:"Select year",previousYear:"Previous year",nextYear:"Next year",selectMonth:"Select month",selectDate:"{0}",currentDate:"Today, {0}"}},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",hour:"Hour",minute:"Minute",second:"Second"},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"},hotkey:{then:"then",ctrl:"Ctrl",command:"Command",space:"Space",shift:"Shift",alt:"Alt",enter:"Enter",escape:"Escape",upArrow:"Up Arrow",downArrow:"Down Arrow",leftArrow:"Left Arrow",rightArrow:"Right Arrow",backspace:"Backspace",option:"Option",plus:"plus",shortcut:"Keyboard shortcut: {0}",or:"or"},video:{play:"Play",pause:"Pause",seek:"Seek",volume:"Volume",showVolume:"Show volume control",mute:"Mute",unmute:"Unmute",enterFullscreen:"Full screen",exitFullscreen:"Exit full screen"},colorPicker:{ariaLabel:{eyedropper:"Select color with eyedropper",hueSlider:"Hue",alphaSlider:"Alpha",redInput:"Red value",greenInput:"Green value",blueInput:"Blue value",alphaInput:"Alpha value",hueInput:"Hue value",saturationInput:"Saturation value",lightnessInput:"Lightness value",hexInput:"HEX value",hexaInput:"HEX with alpha value",changeFormat:"Change color format"}}},nS="$vuetify.",rS=(e,t)=>e.replace(/\{(\d+)\}/g,(n,r)=>String(t[Number(r)])),xC=(e,t,n)=>function(r){for(var s=arguments.length,i=new Array(s>1?s-1:0),a=1;a<s;a++)i[a-1]=arguments[a];if(!r.startsWith(nS))return rS(r,i);const o=r.replace(nS,""),l=e.value&&n.value[e.value],c=t.value&&n.value[t.value];let u=Ga(l,o,null);return u||(`${r}${e.value}`,u=Ga(c,o,null)),u||(u=r),typeof u!="string"&&(u=r),rS(u,i)};function Iy(e,t){return(n,r)=>new Intl.NumberFormat([e.value,t.value],r).format(n)}function EC(e,t){return Iy(e,t)(.1).includes(",")?",":"."}function ym(e,t,n){const r=tt(e,t,e[t]??n.value);return r.value=e[t]??n.value,_e(n,s=>{e[t]==null&&(r.value=n.value)}),r}function CC(e){return t=>{const n=ym(t,"locale",e.current),r=ym(t,"fallback",e.fallback),s=ym(t,"messages",e.messages);return{name:"vuetify",current:n,fallback:r,messages:s,decimalSeparator:ee(()=>EC(n,r)),t:xC(n,r,s),n:Iy(n,r),provide:CC({current:n,fallback:r,messages:s})}}}function kF(e){const t=Ee(e?.locale??"en"),n=Ee(e?.fallback??"en"),r=q({en:_F,...e?.messages});return{name:"vuetify",current:t,fallback:n,messages:r,decimalSeparator:ee(()=>e?.decimalSeparator??EC(t,n)),t:xC(t,n,r),n:Iy(t,n),provide:CC({current:t,fallback:n,messages:r})}}const rf=Symbol.for("vuetify:locale");function xF(e){return e.name!=null}function EF(e){const t=e?.adapter&&xF(e?.adapter)?e?.adapter:kF(e),n=TF(t,e);return{...t,...n}}function kr(){const e=He(rf);if(!e)throw new Error("[Vuetify] Could not find injected locale instance");return e}function CF(){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 TF(e,t){const n=q(t?.rtl??CF()),r=A(()=>n.value[e.current.value]??!1);return{isRtl:r,rtl:n,rtlClasses:ee(()=>`v-locale--is-${r.value?"rtl":"ltr"}`)}}function xr(){const e=He(rf);if(!e)throw new Error("[Vuetify] Could not find injected rtl instance");return{isRtl:e.isRtl,rtlClasses:e.rtlClasses}}const sS={center:"center",top:"bottom",bottom:"top",left:"right",right:"left"},aa=oe({location:String},"location");function oo(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2?arguments[2]:void 0;const{isRtl:r}=xr();return{locationStyles:A(()=>{if(!e.location)return{};const{side:i,align:a}=bg(e.location.split(" ").length>1?e.location:`${e.location} center`,r.value);function o(c){return n?n(c):0}const l={};return i!=="center"&&(t?l[sS[i]]=`calc(100% - ${o(i)}px)`:l[i]=0),a!=="center"?t?l[sS[a]]=`calc(100% - ${o(a)}px)`:l[a]=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 IF=oe({chunkCount:{type:[Number,String],default:null},chunkWidth:{type:[Number,String],default:null},chunkGap:{type:[Number,String],default:4}},"chunks");function RF(e,t){const n=ee(()=>!!e.chunkCount||!!e.chunkWidth),r=A(()=>{const o=Rt(t);if(!o)return 0;if(!e.chunkCount)return Number(e.chunkWidth);const l=Number(e.chunkCount);return(o-Number(e.chunkGap)*(l-1))/l}),s=ee(()=>Number(e.chunkGap)),i=A(()=>{if(!n.value)return{};const o=Oe(s.value),l=Oe(r.value);return{maskRepeat:"repeat-x",maskImage:`linear-gradient(90deg, #000, #000 ${l}, transparent ${l}, transparent)`,maskSize:`calc(${l} + ${o}) 100%`}});function a(o){const l=Rt(t);if(!l)return o;const c=100*s.value/l,u=100*(r.value+s.value)/l,d=Math.floor((o+c)/u);return In(0,d*u-c/2,100)}return{hasChunks:n,chunksMaskStyles:i,snapValueToChunk:a}}const PF=oe({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,...IF(),...Ue(),...aa({location:"top"}),...Tn(),...lt(),...wt()},"VProgressLinear"),Or=be()({name:"VProgressLinear",props:PF(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=q(),s=tt(e,"modelValue"),{isRtl:i,rtlClasses:a}=xr(),{themeClasses:o}=Mt(e),{locationStyles:l}=oo(e),{textColorClasses:c,textColorStyles:u}=Qr(()=>e.color),{backgroundColorClasses:d,backgroundColorStyles:p}=yn(()=>e.bgColor||e.color),{backgroundColorClasses:m,backgroundColorStyles:v}=yn(()=>e.bufferColor||e.bgColor||e.color),{backgroundColorClasses:g,backgroundColorStyles:b}=yn(()=>e.color),{roundedClasses:y}=An(e),{intersectionRef:w,isIntersecting:_}=kC(),T=A(()=>parseFloat(e.max)),P=A(()=>parseFloat(e.height)),x=A(()=>In(parseFloat(e.bufferValue)/T.value*100,0,100)),C=A(()=>In(parseFloat(s.value)/T.value*100,0,100)),E=A(()=>i.value!==e.reverse),R=A(()=>e.indeterminate?"fade-transition":"slide-x-transition"),I=Ee(0),{hasChunks:O,chunksMaskStyles:L,snapValueToChunk:V}=RF(e,I);hr(O,()=>{const{resizeRef:N}=Qi(D=>I.value=D[0].contentRect.width);bn(()=>N.value=r.value)});const F=A(()=>O.value?V(x.value):x.value),B=A(()=>O.value?V(C.value):C.value);function M(N){if(!w.value)return;const{left:D,right:W,width:z}=w.value.getBoundingClientRect(),K=E.value?z-N.clientX+(W-z):N.clientX-D;s.value=Math.round(K/z*T.value)}return bn(()=>{w.value=r.value}),Ie(()=>f(e.tag,{ref:r,class:Se(["v-progress-linear",{"v-progress-linear--absolute":e.absolute,"v-progress-linear--active":e.active&&_.value,"v-progress-linear--reverse":E.value,"v-progress-linear--rounded":e.rounded,"v-progress-linear--rounded-bar":e.roundedBar,"v-progress-linear--striped":e.striped,"v-progress-linear--clickable":e.clickable},y.value,o.value,a.value,e.class]),style:Le([{bottom:e.location==="bottom"?0:void 0,top:e.location==="top"?0:void 0,height:e.active?Oe(P.value):0,"--v-progress-linear-height":Oe(P.value),...e.absolute?l.value:{}},L.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(s.value),T.value),onClick:e.clickable&&M},{default:()=>[e.stream&&S("div",{key:"stream",class:Se(["v-progress-linear__stream",c.value]),style:{...u.value,[E.value?"left":"right"]:Oe(-P.value),borderTop:`${Oe(P.value/2)} dotted`,opacity:parseFloat(e.bufferOpacity),top:`calc(50% - ${Oe(P.value/4)})`,width:Oe(100-x.value,"%"),"--v-progress-linear-stream-to":Oe(P.value*(E.value?1:-1))}},null),S("div",{class:Se(["v-progress-linear__background",d.value]),style:Le([p.value,{opacity:parseFloat(e.bgOpacity),width:e.stream?0:void 0}])},null),S("div",{class:Se(["v-progress-linear__buffer",m.value]),style:Le([v.value,{opacity:parseFloat(e.bufferOpacity),width:Oe(F.value,"%")}])},null),f(Ji,{name:R.value},{default:()=>[e.indeterminate?S("div",{class:"v-progress-linear__indeterminate"},[["long","short"].map(N=>S("div",{key:N,class:Se(["v-progress-linear__indeterminate",N,g.value]),style:Le(b.value)},null))]):S("div",{class:Se(["v-progress-linear__determinate",g.value]),style:Le([b.value,{width:Oe(B.value,"%")}])},null)]}),n.default&&S("div",{class:"v-progress-linear__content"},[n.default({value:C.value,buffer:x.value})])]})),{}}}),ap=oe({loading:[Boolean,String]},"loader");function gc(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Hs();return{loaderClasses:ee(()=>({[`${t}--loading`]:e.loading}))}}function op(e,t){let{slots:n}=t;return S("div",{class:Se(`${e.name}__loader`)},[n.default?.({color:e.color,isActive:e.active})||f(Or,{absolute:e.absolute,active:e.active,color:e.color,height:"2",indeterminate:!0},null)])}const AF=["static","relative","fixed","absolute","sticky"],wl=oe({position:{type:String,validator:e=>AF.includes(e)}},"position");function _l(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Hs();return{positionClasses:ee(()=>e.position?`${t}--${e.position}`:void 0)}}function OF(){const e=tn("useRoute");return A(()=>e?.proxy?.$route)}function TC(){return tn("useRouter")?.proxy?.$router}function lp(e,t){const n=ED("RouterLink"),r=ee(()=>!!(e.href||e.to)),s=A(()=>r?.value||$0(t,"click")||$0(e,"click"));if(typeof n=="string"||!("useLink"in n)){const d=ee(()=>e.href);return{isLink:r,isRouterLink:ee(()=>!1),isClickable:s,href:d,linkProps:Jt({href:d})}}const i=n.useLink({to:ee(()=>e.to||""),replace:ee(()=>e.replace)}),a=A(()=>e.to?i:void 0),o=OF(),l=A(()=>a.value?e.exact?o.value?a.value.isExactActive?.value&&mr(a.value.route.value.query,o.value.query):a.value.isExactActive?.value??!1:a.value.isActive?.value??!1:!1),c=A(()=>e.to?a.value?.route.value.href:e.href),u=ee(()=>!!e.to);return{isLink:r,isRouterLink:u,isClickable:s,isActive:l,route:a.value?.route,navigate:a.value?.navigate,href:c,linkProps:Jt({href:c,"aria-current":ee(()=>l.value?"page":void 0),"aria-disabled":ee(()=>e.disabled&&r.value?"true":void 0),tabindex:ee(()=>e.disabled&&r.value?"-1":void 0)})}}const up=oe({href:String,replace:Boolean,to:[String,Object],exact:Boolean},"router");let bm=!1;function DF(e,t){let n=!1,r,s;Ct&&e?.beforeEach&&(ut(()=>{window.addEventListener("popstate",i),r=e.beforeEach((a,o,l)=>{bm?n?t(l):l():setTimeout(()=>n?t(l):l()),bm=!0}),s=e?.afterEach(()=>{bm=!1})}),Xt(()=>{window.removeEventListener("popstate",i),r?.(),s?.()}));function i(a){a.state?.replaced||(n=!0,setTimeout(()=>n=!1))}}function LF(e,t){_e(()=>e.isActive?.value,n=>{e.isLink.value&&n!=null&&t&&ut(()=>{t(n)})},{immediate:!0})}const xg=Symbol("rippleStop"),$F=80;function iS(e,t){e.style.transform=t,e.style.webkitTransform=t}function Eg(e){return e.constructor.name==="TouchEvent"}function IC(e){return e.constructor.name==="KeyboardEvent"}const FF=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=0,s=0;if(!IC(e)){const d=t.getBoundingClientRect(),p=Eg(e)?e.touches[e.touches.length-1]:e;r=p.clientX-d.left,s=p.clientY-d.top}let i=0,a=.3;t._ripple?.circle?(a=.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 o=`${(t.clientWidth-i*2)/2}px`,l=`${(t.clientHeight-i*2)/2}px`,c=n.center?o:`${r-i}px`,u=n.center?l:`${s-i}px`;return{radius:i,scale:a,x:c,y:u,centerX:o,centerY:l}},sf={show(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t?._ripple?.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:a,x:o,y:l,centerX:c,centerY:u}=FF(e,t,n),d=`${i*2}px`;s.className="v-ripple__animation",s.style.width=d,s.style.height=d,t.appendChild(r);const p=window.getComputedStyle(t);p&&p.position==="static"&&(t.style.position="relative",t.dataset.previousPosition="static"),s.classList.add("v-ripple__animation--enter"),s.classList.add("v-ripple__animation--visible"),iS(s,`translate(${o}, ${l}) scale3d(${a},${a},${a})`),s.dataset.activated=String(performance.now()),requestAnimationFrame(()=>{requestAnimationFrame(()=>{s.classList.remove("v-ripple__animation--enter"),s.classList.add("v-ripple__animation--in"),iS(s,`translate(${c}, ${u}) scale3d(1,1,1)`)})})},hide(e){if(!e?._ripple?.enabled)return;const t=e.getElementsByClassName("v-ripple__animation");if(t.length===0)return;const n=Array.from(t).findLast(i=>!i.dataset.isHiding);if(n)n.dataset.isHiding="true";else return;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(()=>{e.getElementsByClassName("v-ripple__animation").length===1&&e.dataset.previousPosition&&(e.style.position=e.dataset.previousPosition,delete e.dataset.previousPosition),n.parentNode?.parentNode===e&&e.removeChild(n.parentNode)},300)},s)}};function RC(e){return typeof e>"u"||!!e}function Lu(e){const t={},n=e.currentTarget;if(!(!n?._ripple||n._ripple.touched||e[xg])){if(e[xg]=!0,Eg(e))n._ripple.touched=!0,n._ripple.isTouch=!0;else if(n._ripple.isTouch)return;if(t.center=n._ripple.centered||IC(e),n._ripple.class&&(t.class=n._ripple.class),Eg(e)){if(n._ripple.showTimerCommit)return;n._ripple.showTimerCommit=()=>{sf.show(e,n,t)},n._ripple.showTimer=window.setTimeout(()=>{n?._ripple?.showTimerCommit&&(n._ripple.showTimerCommit(),n._ripple.showTimerCommit=null)},$F)}else sf.show(e,n,t)}}function af(e){e[xg]=!0}function Rr(e){const t=e.currentTarget;if(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(()=>{Rr(e)});return}window.setTimeout(()=>{t._ripple&&(t._ripple.touched=!1)}),sf.hide(t)}}function PC(e){const t=e.currentTarget;t?._ripple&&(t._ripple.showTimerCommit&&(t._ripple.showTimerCommit=null),window.clearTimeout(t._ripple.showTimer))}let $u=!1;function NF(e,t){!$u&&t.includes(e.key)&&($u=!0,Lu(e))}function AC(e){$u=!1,Rr(e)}function OC(e){$u&&($u=!1,Rr(e))}function DC(e,t,n){const{value:r,modifiers:s}=t,i=RC(r);i||sf.hide(e),e._ripple=e._ripple??{},e._ripple.enabled=i,e._ripple.centered=s.center,e._ripple.circle=s.circle;const a=Pu(r)?r:{};a.class&&(e._ripple.class=a.class);const o=a.keys??["Enter","Space"];if(e._ripple.keyDownHandler=l=>NF(l,o),i&&!n){if(s.stop){e.addEventListener("touchstart",af,{passive:!0}),e.addEventListener("mousedown",af);return}e.addEventListener("touchstart",Lu,{passive:!0}),e.addEventListener("touchend",Rr,{passive:!0}),e.addEventListener("touchmove",PC,{passive:!0}),e.addEventListener("touchcancel",Rr),e.addEventListener("mousedown",Lu),e.addEventListener("mouseup",Rr),e.addEventListener("mouseleave",Rr),e.addEventListener("keydown",e._ripple.keyDownHandler),e.addEventListener("keyup",AC),e.addEventListener("blur",OC),e.addEventListener("dragstart",Rr,{passive:!0})}else!i&&n&&LC(e)}function LC(e){e.removeEventListener("touchstart",af),e.removeEventListener("mousedown",af),e.removeEventListener("touchstart",Lu),e.removeEventListener("touchend",Rr),e.removeEventListener("touchmove",PC),e.removeEventListener("touchcancel",Rr),e.removeEventListener("mousedown",Lu),e.removeEventListener("mouseup",Rr),e.removeEventListener("mouseleave",Rr),e._ripple?.keyDownHandler&&e.removeEventListener("keydown",e._ripple.keyDownHandler),e.removeEventListener("keyup",AC),e.removeEventListener("blur",OC),e.removeEventListener("dragstart",Rr)}function MF(e,t){DC(e,t,!1)}function VF(e){LC(e),delete e._ripple}function BF(e,t){if(t.value===t.oldValue)return;const n=RC(t.oldValue);DC(e,t,n)}const Lr={mounted:MF,unmounted:VF,updated:BF},$C=oe({active:{type:Boolean,default:void 0},activeColor:String,baseColor:String,symbol:{type:null,default:bC},flat:Boolean,icon:[Boolean,String,Function,Object],prependIcon:Fe,appendIcon:Fe,block:Boolean,readonly:Boolean,slim:Boolean,stacked:Boolean,spaced:String,ripple:{type:[Boolean,Object],default:!0},text:{type:[String,Number,Boolean],default:void 0},...rs(),...Ue(),...Pn(),...Vn(),..._r(),...bl(),...ap(),...aa(),...wl(),...Tn(),...up(),...Sl(),...lt({tag:"button"}),...wt(),...ys({variant:"elevated"})},"VBtn"),te=be()({name:"VBtn",props:$C(),emits:{"group:selected":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const{themeClasses:s}=Mt(e),{borderClasses:i}=vs(e),{densityClasses:a}=Fr(e),{dimensionStyles:o}=Bn(e),{elevationClasses:l}=Nr(e),{loaderClasses:c}=gc(e),{locationStyles:u}=oo(e),{positionClasses:d}=_l(e),{roundedClasses:p}=An(e),{sizeClasses:m,sizeStyles:v}=hc(e),g=Ka(e,e.symbol,!1),b=lp(e,n),y=A(()=>e.active!==void 0?e.active:b.isRouterLink.value?b.isActive?.value:g?.isSelected.value),w=ee(()=>y.value?e.activeColor??e.color:e.color),_=A(()=>({color:g?.isSelected.value&&(!b.isLink.value||b.isActive?.value)||!g||b.isActive?.value?w.value??e.baseColor:e.baseColor,variant:e.variant})),{colorClasses:T,colorStyles:P,variantClasses:x}=io(_),C=A(()=>g?.disabled.value||e.disabled),E=ee(()=>e.variant==="elevated"&&!(e.disabled||e.flat||e.border)),R=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){C.value||b.isLink.value&&(O.metaKey||O.ctrlKey||O.shiftKey||O.button!==0||n.target==="_blank")||(b.isRouterLink.value?b.navigate?.(O):g?.toggle())}return LF(b,g?.select),Ie(()=>{const O=b.isLink.value?"a":e.tag,L=!!(e.prependIcon||r.prepend),V=!!(e.appendIcon||r.append),F=!!(e.icon&&e.icon!==!0);return Pt(f(O,ce(b.linkProps,{type:O==="a"?void 0:"button",class:["v-btn",g?.selectedClass.value,{"v-btn--active":y.value,"v-btn--block":e.block,"v-btn--disabled":C.value,"v-btn--elevated":E.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},e.spaced?["v-btn--spaced",`v-btn--spaced-${e.spaced}`]:[],s.value,i.value,T.value,a.value,l.value,c.value,d.value,p.value,m.value,x.value,e.class],style:[P.value,o.value,u.value,v.value,e.style],"aria-busy":e.loading?!0:void 0,disabled:C.value&&O!=="a"||void 0,tabindex:e.loading||e.readonly?-1:void 0,onClick:I,value:R.value}),{default:()=>[ia(!0,"v-btn"),!e.icon&&L&&S("span",{key:"prepend",class:"v-btn__prepend"},[r.prepend?f(vt,{key:"prepend-defaults",disabled:!e.prependIcon,defaults:{VIcon:{icon:e.prependIcon}}},r.prepend):f(j,{key:"prepend-icon",icon:e.prependIcon},null)]),S("span",{class:"v-btn__content","data-no-activator":""},[!r.default&&F?f(j,{key:"content-icon",icon:e.icon},null):f(vt,{key:"content-defaults",disabled:!F,defaults:{VIcon:{icon:e.icon}}},{default:()=>[r.default?.()??Y(e.text)]})]),!e.icon&&V&&S("span",{key:"append",class:"v-btn__append"},[r.append?f(vt,{key:"append-defaults",disabled:!e.appendIcon,defaults:{VIcon:{icon:e.appendIcon}}},r.append):f(j,{key:"append-icon",icon:e.appendIcon},null)]),!!e.loading&&S("span",{key:"loader",class:"v-btn__loader"},[r.loader?.()??f(un,{color:typeof e.loading=="boolean"?void 0:e.loading,indeterminate:!0,width:"2"},null)])]}),[[Lr,!C.value&&e.ripple,"",{center:!!e.icon}]])}),{group:g}}}),UF=oe({disabled:Boolean,group:Boolean,hideOnLeave:Boolean,leaveAbsolute:Boolean,mode:String,origin:String},"transition");function Mr(e,t,n){return be()({name:e,props:UF({mode:n,origin:t}),setup(r,s){let{slots:i}=s;const a={onBeforeEnter(o){r.origin&&(o.style.transformOrigin=r.origin)},onLeave(o){if(r.leaveAbsolute){const{offsetTop:l,offsetLeft:c,offsetWidth:u,offsetHeight:d}=o;o._transitionInitialStyles={position:o.style.position,top:o.style.top,left:o.style.left,width:o.style.width,height:o.style.height},o.style.position="absolute",o.style.top=`${l}px`,o.style.left=`${c}px`,o.style.width=`${u}px`,o.style.height=`${d}px`}r.hideOnLeave&&o.style.setProperty("display","none","important")},onAfterLeave(o){if(r.leaveAbsolute&&o?._transitionInitialStyles){const{position:l,top:c,left:u,width:d,height:p}=o._transitionInitialStyles;delete o._transitionInitialStyles,o.style.position=l||"",o.style.top=c||"",o.style.left=u||"",o.style.width=d||"",o.style.height=p||""}}};return()=>{const o=r.group?my:Ji;return gs(o,{name:r.disabled?"":e,css:!r.disabled,...r.group?void 0:{mode:r.mode},...r.disabled?{}:a},i.default)}}})}function FC(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"in-out";return be()({name:e,props:{mode:{type:String,default:n},disabled:{type:Boolean,default:Wa()},group:Boolean},setup(r,s){let{slots:i}=s;const a=r.group?my:Ji;return()=>gs(a,{name:r.disabled?"":e,css:!r.disabled,...r.disabled?{}:t},i.default)}})}function NC(){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=sr(`offset-${n}`);return{onBeforeEnter(a){a._parent=a.parentNode,a._initialStyle={transition:a.style.transition,overflow:a.style.overflow,[n]:a.style[n]}},onEnter(a){const o=a._initialStyle;if(!o)return;a.style.setProperty("transition","none","important"),a.style.overflow="hidden";const l=`${a[r]}px`;a.style[n]="0",a.offsetHeight,a.style.transition=o.transition,e&&a._parent&&a._parent.classList.add(e),requestAnimationFrame(()=>{a.style[n]=l})},onAfterEnter:i,onEnterCancelled:i,onLeave(a){a._initialStyle={transition:"",overflow:a.style.overflow,[n]:a.style[n]},a.style.overflow="hidden",a.style[n]=`${a[r]}px`,a.offsetHeight,requestAnimationFrame(()=>a.style[n]="0")},onAfterLeave:s,onLeaveCancelled:s};function s(a){e&&a._parent&&a._parent.classList.remove(e),i(a)}function i(a){if(!a._initialStyle)return;const o=a._initialStyle[n];a.style.overflow=a._initialStyle.overflow,o!=null&&(a.style[n]=o),delete a._initialStyle}}const zF=oe({target:[Object,Array]},"v-dialog-transition"),Sm=new WeakMap,Ry=be()({name:"VDialogTransition",props:zF(),setup(e,t){let{slots:n}=t;const r={onBeforeEnter(s){s.style.pointerEvents="none",s.style.visibility="hidden"},async onEnter(s,i){await new Promise(p=>requestAnimationFrame(p)),await new Promise(p=>requestAnimationFrame(p)),s.style.visibility="";const a=oS(e.target,s),{x:o,y:l,sx:c,sy:u,speed:d}=a;if(Sm.set(s,a),Wa())si(s,[{opacity:0},{}],{duration:125*d,easing:J0}).finished.then(()=>i());else{const p=si(s,[{transform:`translate(${o}px, ${l}px) scale(${c}, ${u})`,opacity:0},{}],{duration:225*d,easing:J0});aS(s)?.forEach(m=>{si(m,[{opacity:0},{opacity:0,offset:.33},{}],{duration:450*d,easing:Ou})}),p.finished.then(()=>i())}},onAfterEnter(s){s.style.removeProperty("pointer-events")},onBeforeLeave(s){s.style.pointerEvents="none"},async onLeave(s,i){await new Promise(p=>requestAnimationFrame(p));let a;!Sm.has(s)||Array.isArray(e.target)||e.target.offsetParent||e.target.getClientRects().length?a=oS(e.target,s):a=Sm.get(s);const{x:o,y:l,sx:c,sy:u,speed:d}=a;Wa()?si(s,[{},{opacity:0}],{duration:85*d,easing:X0}).finished.then(()=>i()):(si(s,[{},{transform:`translate(${o}px, ${l}px) scale(${c}, ${u})`,opacity:0}],{duration:125*d,easing:X0}).finished.then(()=>i()),aS(s)?.forEach(m=>{si(m,[{},{opacity:0,offset:.2},{opacity:0}],{duration:250*d,easing:Ou})}))},onAfterLeave(s){s.style.removeProperty("pointer-events")}};return()=>e.target?f(Ji,ce({name:"dialog-transition"},r,{css:!1}),n):f(Ji,{name:"dialog-transition"},n)}});function aS(e){const t=e.querySelector(":scope > .v-card, :scope > .v-sheet, :scope > .v-list")?.children;return t&&[...t]}function oS(e,t){const n=cC(e),r=wy(t),[s,i]=getComputedStyle(t).transformOrigin.split(" ").map(y=>parseFloat(y)),[a,o]=getComputedStyle(t).getPropertyValue("--v-overlay-anchor-origin").split(" ");let l=n.left+n.width/2;a==="left"||o==="left"?l-=n.width/2:(a==="right"||o==="right")&&(l+=n.width/2);let c=n.top+n.height/2;a==="top"||o==="top"?c-=n.height/2:(a==="bottom"||o==="bottom")&&(c+=n.height/2);const u=n.width/r.width,d=n.height/r.height,p=Math.max(1,u,d),m=u/p||0,v=d/p||0,g=r.width*r.height/(window.innerWidth*window.innerHeight),b=g>.12?Math.min(1.5,(g-.12)*10+1):1;return{x:l-(s+r.left),y:c-(i+r.top),sx:m,sy:v,speed:b}}Mr("fab-transition","center center","out-in");Mr("dialog-bottom-transition");Mr("dialog-top-transition");const lS=Mr("fade-transition"),jF=Mr("scale-transition");Mr("scroll-x-transition");Mr("scroll-x-reverse-transition");const HF=Mr("scroll-y-transition");Mr("scroll-y-reverse-transition");Mr("slide-x-transition");Mr("slide-x-reverse-transition");const cp=Mr("slide-y-transition");Mr("slide-y-reverse-transition");const Py=FC("expand-transition",NC()),MC=FC("expand-x-transition",NC("",!0));function wm(e,t){return{x:e.x+t.x,y:e.y+t.y}}function qF(e,t){return{x:e.x-t.x,y:e.y-t.y}}function uS(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 wm({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 wm({x:s,y:i},t)}return wm({x:t.width/2,y:t.height/2},t)}const VC={static:KF,connected:JF},WF=oe({locationStrategy:{type:[String,Function],default:"static",validator:e=>typeof e=="function"||e in VC},location:{type:String,default:"bottom"},origin:{type:String,default:"auto"},offset:[Number,String,Array],stickToTarget:Boolean,viewportMargin:{type:[Number,String],default:12}},"VOverlay-location-strategies");function GF(e,t){const n=q({}),r=q();Ct&&hr(()=>!!(t.isActive.value&&e.locationStrategy),o=>{_e(()=>e.locationStrategy,o),Xt(()=>{window.removeEventListener("resize",s),visualViewport?.removeEventListener("resize",i),visualViewport?.removeEventListener("scroll",a),r.value=void 0}),window.addEventListener("resize",s,{passive:!0}),visualViewport?.addEventListener("resize",i,{passive:!0}),visualViewport?.addEventListener("scroll",a,{passive:!0}),typeof e.locationStrategy=="function"?r.value=e.locationStrategy(t,e,n)?.updateLocation:r.value=VC[e.locationStrategy](t,e,n)?.updateLocation});function s(o){r.value?.(o)}function i(o){r.value?.(o)}function a(o){r.value?.(o)}return{contentStyles:n,updateLocation:r}}function KF(){}function YF(e,t){const n=wy(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 JF(e,t,n){(Array.isArray(e.target.value)||eF(e.target.value))&&Object.assign(n.value,{position:"fixed",top:0,[e.isRtl.value?"right":"left"]:0});const{preferredAnchor:s,preferredOrigin:i}=Sy(()=>{const y=bg(t.location,e.isRtl.value),w=t.origin==="overlap"?y:t.origin==="auto"?gm(y):bg(t.origin,e.isRtl.value);return y.side===w.side&&y.align===vm(w).align?{preferredAnchor:N0(y),preferredOrigin:N0(w)}:{preferredAnchor:y,preferredOrigin:w}}),[a,o,l,c]=["minWidth","minHeight","maxWidth","maxHeight"].map(y=>A(()=>{const w=parseFloat(t[y]);return isNaN(w)?1/0:w})),u=A(()=>{if(Array.isArray(t.offset))return t.offset;if(typeof t.offset=="string"){const y=t.offset.split(" ").map(parseFloat);return y.length<2&&y.push(0),y}return typeof t.offset=="number"?[t.offset,0]:[0,0]});let d=!1,p=-1;const m=new iC(4),v=new ResizeObserver(()=>{if(!d)return;if(requestAnimationFrame(w=>{w!==p&&m.clear(),requestAnimationFrame(_=>{p=_})}),m.isFull){const w=m.values();if(mr(w.at(-1),w.at(-3))&&!mr(w.at(-1),w.at(-2)))return}const y=b();y&&m.push(y.flipped)});let g=new Kr({x:0,y:0,width:0,height:0});_e(e.target,(y,w)=>{w&&!Array.isArray(w)&&v.unobserve(w),Array.isArray(y)?mr(y,w)||b():y&&v.observe(y)},{immediate:!0}),_e(e.contentEl,(y,w)=>{w&&v.unobserve(w),y&&v.observe(y)},{immediate:!0}),Xt(()=>{v.disconnect()});function b(){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)&&(g=cC(e.target.value));const y=YF(e.contentEl.value,e.isRtl.value),w=nf(e.contentEl.value),_=Number(t.viewportMargin);w.length||(w.push(document.documentElement),e.contentEl.value.style.top&&e.contentEl.value.style.left||(y.x-=parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-x")||0),y.y-=parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-y")||0)));const T=w.reduce((V,F)=>{const B=w$(F);return V?new Kr({x:Math.max(V.left,B.left),y:Math.max(V.top,B.top),width:Math.min(V.right,B.right)-Math.max(V.left,B.left),height:Math.min(V.bottom,B.bottom)-Math.max(V.top,B.top)}):B},void 0);t.stickToTarget?(T.x+=Math.min(_,g.x),T.y+=Math.min(_,g.y),T.width=Math.max(T.width-_*2,g.x+g.width-_),T.height=Math.max(T.height-_*2,g.y+g.height-_)):(T.x+=_,T.y+=_,T.width-=_*2,T.height-=_*2);let P={anchor:s.value,origin:i.value};function x(V){const F=new Kr(y),B=uS(V.anchor,g),M=uS(V.origin,F);let{x:N,y:D}=qF(B,M);switch(V.anchor.side){case"top":D-=u.value[0];break;case"bottom":D+=u.value[0];break;case"left":N-=u.value[0];break;case"right":N+=u.value[0];break}switch(V.anchor.align){case"top":D-=u.value[1];break;case"bottom":D+=u.value[1];break;case"left":N-=u.value[1];break;case"right":N+=u.value[1];break}return F.x+=N,F.y+=D,F.width=Math.min(F.width,l.value),F.height=Math.min(F.height,c.value),{overflows:V0(F,T),x:N,y:D}}let C=0,E=0;const R={x:0,y:0},I={x:!1,y:!1};let O=-1;for(;!(O++>10);){const{x:V,y:F,overflows:B}=x(P);C+=V,E+=F,y.x+=V,y.y+=F;{const M=M0(P.anchor),N=B.x.before||B.x.after,D=B.y.before||B.y.after;let W=!1;if(["x","y"].forEach(z=>{if(z==="x"&&N&&!I.x||z==="y"&&D&&!I.y){const K={anchor:{...P.anchor},origin:{...P.origin}},H=z==="x"?M==="y"?vm:gm:M==="y"?gm:vm;K.anchor=H(K.anchor),K.origin=H(K.origin);const{overflows:re}=x(K);(re[z].before<=B[z].before&&re[z].after<=B[z].after||re[z].before+re[z].after<(B[z].before+B[z].after)/2)&&(P=K,W=I[z]=!0)}}),W)continue}B.x.before&&(C+=B.x.before,y.x+=B.x.before),B.x.after&&(C-=B.x.after,y.x-=B.x.after),B.y.before&&(E+=B.y.before,y.y+=B.y.before),B.y.after&&(E-=B.y.after,y.y-=B.y.after);{const M=V0(y,T);R.x=T.width-M.x.before-M.x.after,R.y=T.height-M.y.before-M.y.after,C+=M.x.before,y.x+=M.x.before,E+=M.y.before,y.y+=M.y.before}break}const L=M0(P.anchor);return Object.assign(n.value,{"--v-overlay-anchor-origin":`${P.anchor.side} ${P.anchor.align}`,transformOrigin:`${P.origin.side} ${P.origin.align}`,top:Oe(_m(E)),left:e.isRtl.value?void 0:Oe(_m(C)),right:e.isRtl.value?Oe(_m(-C)):void 0,minWidth:Oe(L==="y"?Math.min(a.value,g.width):a.value),maxWidth:Oe(cS(In(R.x,a.value===1/0?0:a.value,l.value))),maxHeight:Oe(cS(In(R.y,o.value===1/0?0:o.value,c.value)))}),{available:R,contentBox:y,flipped:I}}return _e(()=>[s.value,i.value,t.offset,t.minWidth,t.minHeight,t.maxWidth,t.maxHeight],()=>b()),ut(()=>{const y=b();if(!y)return;const{available:w,contentBox:_}=y;_.height>w.y&&requestAnimationFrame(()=>{b(),requestAnimationFrame(()=>{b()})})}),{updateLocation:b}}function _m(e){return Math.round(e*devicePixelRatio)/devicePixelRatio}function cS(e){return Math.ceil(e*devicePixelRatio)/devicePixelRatio}let Cg=!0;const of=[];function XF(e){!Cg||of.length?(of.push(e),Tg()):(Cg=!1,e(),Tg())}let dS=-1;function Tg(){cancelAnimationFrame(dS),dS=requestAnimationFrame(()=>{const e=of.shift();e&&e(),of.length?Tg():Cg=!0})}const BC={none:null,close:eN,block:tN,reposition:nN},QF=oe({scrollStrategy:{type:[String,Function],default:"block",validator:e=>typeof e=="function"||e in BC}},"VOverlay-scroll-strategies");function ZF(e,t){if(!Ct)return;let n;bn(async()=>{n?.stop(),t.isActive.value&&e.scrollStrategy&&(n=Ha(),await new Promise(r=>setTimeout(r)),n.active&&n.run(()=>{typeof e.scrollStrategy=="function"?e.scrollStrategy(t,e,n):BC[e.scrollStrategy]?.(t,e,n)}))}),Xt(()=>{n?.stop()})}function eN(e){function t(n){e.isActive.value=!1}UC(Ay(e.target.value,e.contentEl.value),t)}function tN(e,t){const n=e.root.value?.offsetParent,r=Ay(e.target.value,e.contentEl.value),s=[...new Set([...nf(r,t.contained?n:void 0),...nf(e.contentEl.value,t.contained?n:void 0)])].filter(o=>!o.classList.contains("v-overlay-scroll-blocked")),i=window.innerWidth-document.documentElement.offsetWidth,a=(o=>Ey(o)&&o)(n||document.documentElement);a&&e.root.value.classList.add("v-overlay--scroll-blocked"),s.forEach((o,l)=>{o.style.setProperty("--v-body-scroll-x",Oe(-o.scrollLeft)),o.style.setProperty("--v-body-scroll-y",Oe(-o.scrollTop)),o!==document.documentElement&&o.style.setProperty("--v-scrollbar-offset",Oe(i)),o.classList.add("v-overlay-scroll-blocked")}),Xt(()=>{s.forEach((o,l)=>{const c=parseFloat(o.style.getPropertyValue("--v-body-scroll-x")),u=parseFloat(o.style.getPropertyValue("--v-body-scroll-y")),d=o.style.scrollBehavior;o.style.scrollBehavior="auto",o.style.removeProperty("--v-body-scroll-x"),o.style.removeProperty("--v-body-scroll-y"),o.style.removeProperty("--v-scrollbar-offset"),o.classList.remove("v-overlay-scroll-blocked"),o.scrollLeft=-c,o.scrollTop=-u,o.style.scrollBehavior=d}),a&&e.root.value.classList.remove("v-overlay--scroll-blocked")})}function nN(e,t,n){let r=!1,s=-1,i=-1;function a(o){XF(()=>{const l=performance.now();e.updateLocation.value?.(o),r=(performance.now()-l)/(1e3/60)>2})}i=(typeof requestIdleCallback>"u"?o=>o():requestIdleCallback)(()=>{n.run(()=>{UC(Ay(e.target.value,e.contentEl.value),o=>{r?(cancelAnimationFrame(s),s=requestAnimationFrame(()=>{s=requestAnimationFrame(()=>{a(o)})})):a(o)})})}),Xt(()=>{typeof cancelIdleCallback<"u"&&cancelIdleCallback(i),cancelAnimationFrame(s)})}function Ay(e,t){return Array.isArray(e)?document.elementsFromPoint(...e).find(n=>!t?.contains(n)):e??t}function UC(e,t){const n=[document,...nf(e)];n.forEach(r=>{r.addEventListener("scroll",t,{passive:!0})}),Xt(()=>{n.forEach(r=>{r.removeEventListener("scroll",t)})})}const Ig=Symbol.for("vuetify:v-menu"),zC=oe({closeDelay:[Number,String],openDelay:[Number,String]},"delay");function jC(e,t){let n=()=>{};function r(a,o){n?.();const l=a?e.openDelay:e.closeDelay,c=Math.max(o?.minDelay??0,Number(l??0));return new Promise(u=>{n=g$(c,()=>{t?.(a),u(a)})})}function s(){return r(!0)}function i(a){return r(!1,a)}return{clearDelay:n,runOpenDelay:s,runCloseDelay:i}}const rN=oe({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,...zC()},"VOverlay-activator");function sN(e,t){let{isActive:n,isTop:r,contentEl:s}=t;const i=tn("useActivator"),a=q();let o=!1,l=!1,c=!0;const u=A(()=>e.openOnFocus||e.openOnFocus==null&&e.openOnHover),d=A(()=>e.openOnClick||e.openOnClick==null&&!e.openOnHover&&!u.value),{runOpenDelay:p,runCloseDelay:m}=jC(e,E=>{E===(e.openOnHover&&o||u.value&&l)&&!(e.openOnHover&&n.value&&!r.value)&&(n.value!==E&&(c=!0),n.value=E)}),v=q(),g={onClick:E=>{E.stopPropagation(),a.value=E.currentTarget||E.target,n.value||(v.value=[E.clientX,E.clientY]),n.value=!n.value},onMouseenter:E=>{o=!0,a.value=E.currentTarget||E.target,p()},onMouseleave:E=>{o=!1,m()},onFocus:E=>{ef(E.target,":focus-visible")!==!1&&(l=!0,E.stopPropagation(),a.value=E.currentTarget||E.target,p())},onBlur:E=>{l=!1,E.stopPropagation(),m({minDelay:1})}},b=A(()=>{const E={};return d.value&&(E.onClick=g.onClick),e.openOnHover&&(E.onMouseenter=g.onMouseenter,E.onMouseleave=g.onMouseleave),u.value&&(E.onFocus=g.onFocus,E.onBlur=g.onBlur),E}),y=A(()=>{const E={};if(e.openOnHover&&(E.onMouseenter=()=>{o=!0,p()},E.onMouseleave=()=>{o=!1,m()}),u.value&&(E.onFocusin=R=>{R.target.matches(":focus-visible")&&(l=!0,p())},E.onFocusout=()=>{l=!1,m({minDelay:1})}),e.closeOnContentClick){const R=He(Ig,null);E.onClick=()=>{n.value=!1,R?.closeParents()}}return E}),w=A(()=>{const E={};return e.openOnHover&&(E.onMouseenter=()=>{c&&(o=!0,c=!1,p())},E.onMouseleave=()=>{o=!1,m()}),E});_e(r,E=>{E&&(e.openOnHover&&!o&&(!u.value||!l)||u.value&&!l&&(!e.openOnHover||!o))&&!s.value?.contains(document.activeElement)&&(n.value=!1)}),_e(n,E=>{E||setTimeout(()=>{v.value=void 0})},{flush:"post"});const _=yg();bn(()=>{_.value&&ut(()=>{a.value=_.el})});const T=yg(),P=A(()=>e.target==="cursor"&&v.value?v.value:T.value?T.el:HC(e.target,i)||a.value),x=A(()=>Array.isArray(P.value)?void 0:P.value);let C;return _e(()=>!!e.activator,E=>{E&&Ct?(C=Ha(),C.run(()=>{iN(e,i,{activatorEl:a,activatorEvents:b})})):C&&C.stop()},{flush:"post",immediate:!0}),Xt(()=>{C?.stop()}),{activatorEl:a,activatorRef:_,target:P,targetEl:x,targetRef:T,activatorEvents:b,contentEvents:y,scrimEvents:w}}function iN(e,t,n){let{activatorEl:r,activatorEvents:s}=n;_e(()=>e.activator,(l,c)=>{if(c&&l!==c){const u=o(c);u&&a(u)}l&&ut(()=>i())},{immediate:!0}),_e(()=>e.activatorProps,()=>{i()}),Xt(()=>{a()});function i(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:o(),c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.activatorProps;l&&_$(l,ce(s.value,c))}function a(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:o(),c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.activatorProps;l&&k$(l,ce(s.value,c))}function o(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.activator;const c=HC(l,t);return r.value=c?.nodeType===Node.ELEMENT_NODE?c:void 0,r.value}}function HC(e,t){if(!e)return;let n;if(e==="parent"){let r=t?.proxy?.$el?.parentNode;for(;r?.hasAttribute("data-no-activator");)r=r.parentNode;n=r}else typeof e=="string"?n=document.querySelector(e):"$el"in e?n=e.$el:n=e;return n}const qC=oe({retainFocus:Boolean,captureFocus:Boolean,disableInitialFocus:Boolean},"focusTrap"),yd=new Map;let fS=0;function pS(e){const t=document.activeElement;if(e.key!=="Tab"||!t)return;const n=Array.from(yd.values()).filter(c=>{let{isActive:u,contentEl:d}=c;return u.value&&d.value?.contains(t)}).map(c=>c.contentEl.value);let r,s=t.parentElement;for(;s;){if(n.includes(s)){r=s;break}s=s.parentElement}if(!r)return;const i=Da(r).filter(c=>c.tabIndex>=0);if(!i.length)return;const a=document.activeElement;if(i.length===1&&i[0].classList.contains("v-list")&&i[0].contains(a)){e.preventDefault();return}const o=i[0],l=i[i.length-1];e.shiftKey&&(a===o||o.classList.contains("v-list")&&o.contains(a))&&(e.preventDefault(),l.focus()),!e.shiftKey&&(a===l||l.classList.contains("v-list")&&l.contains(a))&&(e.preventDefault(),o.focus())}function WC(e,t){let{isActive:n,localTop:r,activatorEl:s,contentEl:i}=t;const a=Symbol("trap");let o=!1,l=-1;async function c(){o=!0,l=window.setTimeout(()=>{o=!1},100)}async function u(m){const v=m.relatedTarget,g=m.target;document.removeEventListener("pointerdown",c),document.removeEventListener("keydown",d),await ut(),n.value&&!o&&v!==g&&i.value&&Rt(r)&&![document,i.value].includes(g)&&!i.value.contains(g)&&Da(i.value)[0]?.focus()}function d(m){if(m.key==="Tab"&&(document.removeEventListener("keydown",d),n.value&&i.value&&m.target&&!i.value.contains(m.target))){const v=Da(document.documentElement);if(m.shiftKey&&m.target===v.at(0)||!m.shiftKey&&m.target===v.at(-1)){const g=Da(i.value);g.length>0&&(m.preventDefault(),g[0].focus())}}}const p=ee(()=>n.value&&e.captureFocus&&!e.disableInitialFocus);Ct&&(_e(()=>e.retainFocus,m=>{m?yd.set(a,{isActive:n,contentEl:i}):yd.delete(a)},{immediate:!0}),_e(p,m=>{m?(document.addEventListener("pointerdown",c),document.addEventListener("focusin",u,{once:!0}),document.addEventListener("keydown",d)):(document.removeEventListener("pointerdown",c),document.removeEventListener("focusin",u),document.removeEventListener("keydown",d))},{immediate:!0}),fS++<1&&document.addEventListener("keydown",pS)),Xt(()=>{yd.delete(a),clearTimeout(l),document.removeEventListener("pointerdown",c),document.removeEventListener("focusin",u),document.removeEventListener("keydown",d),--fS<1&&document.removeEventListener("keydown",pS)})}const dp=["sm","md","lg","xl","xxl"],Rg=Symbol.for("vuetify:display"),mS={mobileBreakpoint:"lg",thresholds:{xs:0,sm:600,md:960,lg:1280,xl:1920,xxl:2560}},aN=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:mS;return Gn(mS,e)};function hS(e){return Ct&&!e?window.innerWidth:typeof e=="object"&&e.clientWidth||0}function gS(e){return Ct&&!e?window.innerHeight:typeof e=="object"&&e.clientHeight||0}function vS(e){const t=Ct&&!e?window.navigator.userAgent:"ssr";function n(v){return!!t.match(v)}const r=n(/android/i),s=n(/iphone|ipad|ipod/i),i=n(/cordova/i),a=n(/electron/i),o=n(/chrome/i),l=n(/edge/i),c=n(/firefox/i),u=n(/opera/i),d=n(/win/i),p=n(/mac/i),m=n(/linux/i);return{android:r,ios:s,cordova:i,electron:a,chrome:o,edge:l,firefox:c,opera:u,win:d,mac:p,linux:m,touch:d$,ssr:t==="ssr"}}function oN(e,t){const{thresholds:n,mobileBreakpoint:r}=aN(e),s=Ee(gS(t)),i=Ee(vS(t)),a=Jt({}),o=Ee(hS(t));function l(){s.value=gS(),o.value=hS()}function c(){l(),i.value=vS()}return bn(()=>{const u=o.value<n.sm,d=o.value<n.md&&!u,p=o.value<n.lg&&!(d||u),m=o.value<n.xl&&!(p||d||u),v=o.value<n.xxl&&!(m||p||d||u),g=o.value>=n.xxl,b=u?"xs":d?"sm":p?"md":m?"lg":v?"xl":"xxl",y=typeof r=="number"?r:n[r],w=o.value<y;a.xs=u,a.sm=d,a.md=p,a.lg=m,a.xl=v,a.xxl=g,a.smAndUp=!u,a.mdAndUp=!(u||d),a.lgAndUp=!(u||d||p),a.xlAndUp=!(u||d||p||m),a.smAndDown=!(p||m||v||g),a.mdAndDown=!(m||v||g),a.lgAndDown=!(v||g),a.xlAndDown=!g,a.name=b,a.height=s.value,a.width=o.value,a.mobile=w,a.mobileBreakpoint=r,a.platform=i.value,a.thresholds=n}),Ct&&(window.addEventListener("resize",l,{passive:!0}),Xt(()=>{window.removeEventListener("resize",l)},!0)),{...Ii(a),update:c,ssr:!!t}}const lo=oe({mobile:{type:Boolean,default:!1},mobileBreakpoint:[Number,String]},"display");function bs(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{mobile:null},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Hs();const n=He(Rg);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=ee(()=>t?{[`${t}--mobile`]:r.value}:{});return{...n,displayClasses:s,mobile:r}}function lN(){if(!Ct)return Ee(!1);const{ssr:e}=bs();if(e){const t=Ee(!1);return ot(()=>{t.value=!0}),t}else return Ee(!0)}const Oy=oe({eager:Boolean},"lazy");function Dy(e,t){const n=Ee(!1),r=ee(()=>n.value||e.eager||t.value);_e(t,()=>n.value=!0);function s(){e.eager||(n.value=!1)}return{isBooted:n,hasContent:r,onAfterLeave:s}}function uo(){const t=tn("useScopeId").vnode.scopeId;return{scopeId:t?{[t]:""}:void 0}}const yS=Symbol.for("vuetify:stack"),Yl=Jt([]);function uN(e,t,n){const r=tn("useStack"),s=!n,i=He(yS,void 0),a=Jt({activeChildren:new Set});Dt(yS,a);const o=Ee(Number(Rt(t)));hr(e,()=>{const u=Yl.at(-1)?.[1];o.value=u?u+10:Number(Rt(t)),s&&Yl.push([r.uid,o.value]),i?.activeChildren.add(r.uid),Xt(()=>{if(s){const d=Me(Yl).findIndex(p=>p[0]===r.uid);Yl.splice(d,1)}i?.activeChildren.delete(r.uid)})});const l=Ee(!0);s&&bn(()=>{const u=Yl.at(-1)?.[0]===r.uid;setTimeout(()=>l.value=u)});const c=ee(()=>!a.activeChildren.size);return{globalTop:gi(l),localTop:c,stackStyles:ee(()=>({zIndex:o.value}))}}function cN(e){return{teleportTarget:A(()=>{const n=e();if(n===!0||!Ct)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 kl=oe({transition:{type:null,default:"fade-transition",validator:e=>e!==!0}},"transition"),$s=(e,t)=>{let{slots:n}=t;const{transition:r,disabled:s,group:i,...a}=e,{component:o=i?my:Ji,...l}=Pu(r)?r:{};let c;return Pu(r)?c=ce(l,b$({disabled:s,group:i}),a):c=ce({name:s||!r?"":r},a),gs(o,c,n)};function dN(){return!0}function GC(e,t,n){if(!e||KC(e,n)===!1)return!1;const r=gC(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?.contains(e.target))}function KC(e,t){return(typeof t.value=="object"&&t.value.closeConditional||dN)(e)}function fN(e,t,n){const r=typeof n.value=="function"?n.value:n.value.handler;e.shadowTarget=e.target,t._clickOutside.lastMousedownWasOutside&&GC(e,t,n)&&setTimeout(()=>{KC(e,n)&&r&&r(e)},0)}function bS(e,t){const n=gC(e);t(document),typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&t(n)}const SS={mounted(e,t){const n=s=>fN(s,e,t),r=s=>{e._clickOutside.lastMousedownWasOutside=GC(s,e,t)};bS(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&&(bS(e,n=>{if(!n||!e._clickOutside?.[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 pN(e){const{modelValue:t,color:n,...r}=e;return f(Ji,{name:"fade-transition",appear:!0},{default:()=>[e.modelValue&&S("div",ce({class:["v-overlay__scrim",e.color.backgroundColorClasses.value],style:e.color.backgroundColorStyles.value},r),null)]})}const vc=oe({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},...rN(),...Ue(),...Vn(),...Oy(),...WF(),...QF(),...qC(),...wt(),...kl()},"VOverlay"),bi=be()({name:"VOverlay",directives:{vClickOutside:SS},inheritAttrs:!1,props:{_disableGlobalStack:Boolean,...Qt(vc(),["disableInitialFocus"])},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=tn("VOverlay"),a=q(),o=q(),l=q(),c=tt(e,"modelValue"),u=A({get:()=>c.value,set:X=>{X&&e.disabled||(c.value=X)}}),{themeClasses:d}=Mt(e),{rtlClasses:p,isRtl:m}=xr(),{hasContent:v,onAfterLeave:g}=Dy(e,u),b=yn(()=>typeof e.scrim=="string"?e.scrim:null),{globalTop:y,localTop:w,stackStyles:_}=uN(u,()=>e.zIndex,e._disableGlobalStack),{activatorEl:T,activatorRef:P,target:x,targetEl:C,targetRef:E,activatorEvents:R,contentEvents:I,scrimEvents:O}=sN(e,{isActive:u,isTop:w,contentEl:l}),{teleportTarget:L}=cN(()=>{const X=e.attach||e.contained;if(X)return X;const ie=T?.value?.getRootNode()||i.proxy?.$el?.getRootNode();return ie instanceof ShadowRoot?ie:!1}),{dimensionStyles:V}=Bn(e),F=lN(),{scopeId:B}=uo();_e(()=>e.disabled,X=>{X&&(u.value=!1)});const{contentStyles:M,updateLocation:N}=GF(e,{isRtl:m,contentEl:l,target:x,isActive:u});ZF(e,{root:a,contentEl:l,targetEl:C,target:x,isActive:u,updateLocation:N});function D(X){s("click:outside",X),e.persistent?ae():u.value=!1}function W(X){return u.value&&w.value&&(!e.scrim||X.target===o.value||X instanceof MouseEvent&&X.shadowTarget===o.value)}WC(e,{isActive:u,localTop:w,contentEl:l,activatorEl:T}),Ct&&_e(u,X=>{X?window.addEventListener("keydown",z):window.removeEventListener("keydown",z)},{immediate:!0}),Mn(()=>{Ct&&window.removeEventListener("keydown",z)});function z(X){X.key==="Escape"&&y.value&&(l.value?.contains(document.activeElement)||s("keydown",X),e.persistent?ae():(u.value=!1,l.value?.contains(document.activeElement)&&T.value?.focus()))}function K(X){X.key==="Escape"&&!y.value||s("keydown",X)}const H=TC();hr(()=>e.closeOnBack,()=>{DF(H,X=>{y.value&&u.value?(X(!1),e.persistent?ae():u.value=!1):X()})});const re=q();_e(()=>u.value&&(e.absolute||e.contained)&&L.value==null,X=>{if(X){const ie=xy(a.value);ie&&ie!==document.scrollingElement&&(re.value=ie.scrollTop)}});function ae(){e.noClickAnimation||l.value&&si(l.value,[{transformOrigin:"center"},{transform:"scale(1.03)"},{transformOrigin:"center"}],{duration:150,easing:Ou})}function de(){s("afterEnter")}function De(){g(),s("afterLeave")}return Ie(()=>S(ke,null,[n.activator?.({isActive:u.value,targetRef:E,props:ce({ref:P},R.value,e.activatorProps)}),F.value&&v.value&&f(hD,{disabled:!L.value,to:L.value},{default:()=>[S("div",ce({class:["v-overlay",{"v-overlay--absolute":e.absolute||e.contained,"v-overlay--active":u.value,"v-overlay--contained":e.contained},d.value,p.value,e.class],style:[_.value,{"--v-overlay-opacity":e.opacity,top:Oe(re.value)},e.style],ref:a,onKeydown:K},B,r),[f(pN,ce({color:b,modelValue:u.value&&!!e.scrim,ref:o},O.value),null),f($s,{appear:!0,persisted:!0,transition:e.transition,target:x.value,onAfterEnter:de,onAfterLeave:De},{default:()=>[Pt(S("div",ce({ref:l,class:["v-overlay__content",e.contentClass],style:[V.value,M.value]},I.value,e.contentProps),[n.default?.({isActive:u})]),[[$r,u.value],[SS,{handler:D,closeConditional:W,include:()=>[T.value]}]])]})])]})])),{activatorEl:T,scrimEl:o,target:x,animateClick:ae,contentEl:l,rootEl:a,globalTop:y,localTop:w,updateLocation:N}}}),km=Symbol("Forwarded refs");function xm(e,t){let n=e;for(;n;){const r=Reflect.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Vr(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[km]=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 a of n)if(a.value&&Reflect.has(a.value,i)){const o=Reflect.get(a.value,i);return typeof o=="function"?o.bind(a.value):o}}},has(s,i){if(Reflect.has(s,i))return!0;if(typeof i=="symbol"||i.startsWith("$")||i.startsWith("__"))return!1;for(const a of n)if(a.value&&Reflect.has(a.value,i))return!0;return!1},set(s,i,a){if(Reflect.has(s,i))return Reflect.set(s,i,a);if(typeof i=="symbol"||i.startsWith("$")||i.startsWith("__"))return!1;for(const o of n)if(o.value&&Reflect.has(o.value,i))return Reflect.set(o.value,i,a);return!1},getOwnPropertyDescriptor(s,i){const a=Reflect.getOwnPropertyDescriptor(s,i);if(a)return a;if(!(typeof i=="symbol"||i.startsWith("$")||i.startsWith("__"))){for(const o of n){if(!o.value)continue;const l=xm(o.value,i)??("_"in o.value?xm(o.value._?.setupState,i):void 0);if(l)return l}for(const o of n){const l=o.value&&o.value[km];if(!l)continue;const c=l.slice();for(;c.length;){const u=c.shift(),d=xm(u.value,i);if(d)return d;const p=u.value&&u.value[km];p&&c.push(...p)}}}}})}const mN=oe({fullscreen:Boolean,scrollable:Boolean,...Qt(vc({captureFocus:!0,origin:"center center",scrollStrategy:"block",transition:{component:Ry},zIndex:2400,retainFocus:!0}),["disableInitialFocus"])},"VDialog"),Ly=be()({name:"VDialog",props:mN(),emits:{"update:modelValue":e=>!0,afterEnter:()=>!0,afterLeave:()=>!0},setup(e,t){let{emit:n,slots:r}=t;const s=tt(e,"modelValue"),{scopeId:i}=uo(),a=q();function o(){n("afterEnter"),(e.scrim||e.retainFocus)&&a.value?.contentEl&&!a.value.contentEl.contains(document.activeElement)&&a.value.contentEl.focus({preventScroll:!0})}function l(){n("afterLeave")}return _e(s,async c=>{c||(await ut(),a.value.activatorEl?.focus({preventScroll:!0}))}),Ie(()=>{const c=bi.filterProps(e),u=ce({"aria-haspopup":"dialog"},e.activatorProps),d=ce({tabindex:-1},e.contentProps);return f(bi,ce({ref:a,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:u,contentProps:d,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:o,onAfterLeave:l},i),{activator:r.activator,default:function(){for(var p=arguments.length,m=new Array(p),v=0;v<p;v++)m[v]=arguments[v];return f(vt,{root:"VDialog"},{default:()=>[r.default?.(...m)]})}})}),Vr({},a)}}),hN={class:"pa-3 text--primary"},qs=Ae({__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=hy(),s=t,i=jt(n.id);function a(u){return s("opened",u)}function o(u){return s("beforeOpened",u)}ot(async()=>{c$("Escape",u=>{l.value&&(u.preventDefault(),c())}),r.registerDialogReference(n.id,{beforeOpenedCallback:o,openedCallback:a})}),Mn(()=>{r.unregisterDialogReference(n.id)});const l=A(()=>{if(!n.id)return;const u=r.isDialogOpened(n.id);return u&&console.debug(`[BaseDialog ${n.id}] Showing dialog: ${i?.isDialogOpened()}`),u});function c(){s("escape")}return(u,d)=>($(),J(Ly,{"max-width":e.maxWidth,"retain-focus":!1,"model-value":l.value,persistent:"",onClose:d[1]||(d[1]=p=>c())},{default:h(()=>[Wo(u.$slots,"default",{},()=>[S("div",hN,[d[4]||(d[4]=k(" No content defined in dialog. ",-1)),f(te,{onClick:d[0]||(d[0]=p=>Q(i).closeDialog())},{default:h(()=>[f(j,{class:"mr-3"},{default:h(()=>[...d[2]||(d[2]=[k("close",-1)])]),_:1}),d[3]||(d[3]=k("Close ",-1))]),_:1})])])]),_:3},8,["max-width","model-value"]))}});var Ht=(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.JsonViewerDialog="JsonViewerDialog",e))(Ht||{});const gN=Symbol("Progress snackbar message event symbol"),vN=Symbol("Info snackbar message event symbol"),yN=Symbol("Error snackbar message event symbol");function bt(){const{emit:e,on:t}=nr(gN),{emit:n,on:r}=nr(vN),{emit:s,on:i}=nr(yN);return{openProgressMessage:(a,o,l,c)=>e({key:a,title:o,value:l,completed:c}),openInfoMessage:a=>n(a),info:(a,o,l)=>n({title:a,subtitle:o,timeout:l}),openErrorMessage:a=>s(a),error:(a,o)=>s({title:a,subtitle:o}),onProgressMessage:t,onInfoMessage:r,onErrorMessage:i}}const bN=oe({...Ue(),...lt()},"VCardActions"),dn=be()({name:"VCardActions",props:bN(),setup(e,t){let{slots:n}=t;return Rn({VBtn:{slim:!0,variant:"text"}}),Ie(()=>f(e.tag,{class:Se(["v-card-actions",e.class]),style:Le(e.style)},n)),{}}}),SN=oe({opacity:[Number,String],...Ue(),...lt()},"VCardSubtitle"),fp=be()({name:"VCardSubtitle",props:SN(),setup(e,t){let{slots:n}=t;return Ie(()=>f(e.tag,{class:Se(["v-card-subtitle",e.class]),style:Le([{"--v-card-subtitle-opacity":e.opacity},e.style])},n)),{}}}),Lt=vl("v-card-title");function wN(e){return{aspectStyles:A(()=>{const t=Number(e.aspectRatio);return t?{paddingBottom:String(1/t*100)+"%"}:void 0})}}const YC=oe({aspectRatio:[String,Number],contentClass:null,inline:Boolean,...Ue(),...Vn()},"VResponsive"),wS=be()({name:"VResponsive",props:YC(),setup(e,t){let{slots:n}=t;const{aspectStyles:r}=wN(e),{dimensionStyles:s}=Bn(e);return Ie(()=>S("div",{class:Se(["v-responsive",{"v-responsive--inline":e.inline},e.class]),style:Le([s.value,e.style])},[S("div",{class:"v-responsive__sizer",style:Le(r.value)},null),n.additional?.(),n.default&&S("div",{class:Se(["v-responsive__content",e.contentClass])},[n.default()])])),{}}});function _N(e,t){if(!gy)return;const n=t.modifiers||{},r=t.value,{handler:s,options:i}=typeof r=="object"?r:{handler:r,options:{}},a=new IntersectionObserver(function(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=arguments.length>1?arguments[1]:void 0;const c=e._observe?.[t.instance.$.uid];if(!c)return;const u=o.some(d=>d.isIntersecting);s&&(!n.quiet||c.init)&&(!n.once||u||c.init)&&s(u,o,l),u&&n.once?JC(e,t):c.init=!0},i);e._observe=Object(e._observe),e._observe[t.instance.$.uid]={init:!1,observer:a},a.observe(e)}function JC(e,t){const n=e._observe?.[t.instance.$.uid];n&&(n.observer.unobserve(e),delete e._observe[t.instance.$.uid])}const Jo={mounted:_N,unmounted:JC},kN=oe({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,...YC(),...Ue(),...Tn(),...kl()},"VImg"),ms=be()({name:"VImg",directives:{vIntersect:Jo},props:kN(),emits:{loadstart:e=>!0,load:e=>!0,error:e=>!0},setup(e,t){let{emit:n,slots:r}=t;const{backgroundColorClasses:s,backgroundColorStyles:i}=yn(()=>e.color),{roundedClasses:a}=An(e),o=tn("VImg"),l=Ee(""),c=q(),u=Ee(e.eager?"loading":"idle"),d=Ee(),p=Ee(),m=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)}),v=A(()=>m.value.aspect||d.value/p.value||0);_e(()=>e.src,()=>{g(u.value!=="idle")}),_e(v,(L,V)=>{!L&&V&&c.value&&T(c.value)}),ml(()=>g());function g(L){if(!(e.eager&&L)&&!(gy&&!L&&!e.eager)){if(u.value="loading",m.value.lazySrc){const V=new Image;V.src=m.value.lazySrc,T(V,null)}m.value.src&&ut(()=>{n("loadstart",c.value?.currentSrc||m.value.src),setTimeout(()=>{if(!o.isUnmounted)if(c.value?.complete){if(c.value.naturalWidth||y(),u.value==="error")return;v.value||T(c.value,null),u.value==="loading"&&b()}else v.value||T(c.value),w()})})}}function b(){o.isUnmounted||(w(),T(c.value),u.value="loaded",n("load",c.value?.currentSrc||m.value.src))}function y(){o.isUnmounted||(u.value="error",n("error",c.value?.currentSrc||m.value.src))}function w(){const L=c.value;L&&(l.value=L.currentSrc||L.src)}let _=-1;Mn(()=>{clearTimeout(_)});function T(L){let V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:100;const F=()=>{if(clearTimeout(_),o.isUnmounted)return;const{naturalHeight:B,naturalWidth:M}=L;B||M?(d.value=M,p.value=B):!L.complete&&u.value==="loading"&&V!=null?_=window.setTimeout(F,V):(L.currentSrc.endsWith(".svg")||L.currentSrc.startsWith("data:image/svg+xml"))&&(d.value=1,p.value=1)};F()}const P=ee(()=>({"v-img__img--cover":e.cover,"v-img__img--contain":!e.cover})),x=()=>{if(!m.value.src||u.value==="idle")return null;const L=S("img",{class:Se(["v-img__img",P.value]),style:{objectPosition:e.position},crossorigin:e.crossorigin,src:m.value.src,srcset:m.value.srcset,alt:e.alt,referrerpolicy:e.referrerpolicy,draggable:e.draggable,sizes:e.sizes,ref:c,onLoad:b,onError:y},null),V=r.sources?.();return f($s,{transition:e.transition,appear:!0},{default:()=>[Pt(V?S("picture",{class:"v-img__picture"},[V,L]):L,[[$r,u.value==="loaded"]])]})},C=()=>f($s,{transition:e.transition},{default:()=>[m.value.lazySrc&&u.value!=="loaded"&&S("img",{class:Se(["v-img__img","v-img__img--preload",P.value]),style:{objectPosition:e.position},crossorigin:e.crossorigin,src:m.value.lazySrc,alt:e.alt,referrerpolicy:e.referrerpolicy,draggable:e.draggable},null)]}),E=()=>r.placeholder?f($s,{transition:e.transition,appear:!0},{default:()=>[(u.value==="loading"||u.value==="error"&&!r.error)&&S("div",{class:"v-img__placeholder"},[r.placeholder()])]}):null,R=()=>r.error?f($s,{transition:e.transition,appear:!0},{default:()=>[u.value==="error"&&S("div",{class:"v-img__error"},[r.error()])]}):null,I=()=>e.gradient?S("div",{class:"v-img__gradient",style:{backgroundImage:`linear-gradient(${e.gradient})`}},null):null,O=Ee(!1);{const L=_e(v,V=>{V&&(requestAnimationFrame(()=>{requestAnimationFrame(()=>{O.value=!0})}),L())})}return Ie(()=>{const L=wS.filterProps(e);return Pt(f(wS,ce({class:["v-img",{"v-img--absolute":e.absolute,"v-img--booting":!O.value},s.value,a.value,e.class],style:[{width:Oe(e.width==="auto"?d.value:e.width)},i.value,e.style]},L,{aspectRatio:v.value,"aria-label":e.alt,role:e.alt?"img":void 0}),{additional:()=>S(ke,null,[f(x,null,null),f(C,null,null),f(I,null,null),f(E,null,null),f(R,null,null)]),default:r.default}),[[Jo,{handler:g,options:e.options},null,{once:!0}]])}),{currentSrc:l,image:c,state:u,naturalWidth:d,naturalHeight:p}}}),xN=oe({start:Boolean,end:Boolean,icon:Fe,image:String,text:String,...rs(),...Ue(),...Pn(),...Tn(),...Sl(),...lt(),...wt(),...ys({variant:"flat"})},"VAvatar"),Sn=be()({name:"VAvatar",props:xN(),setup(e,t){let{slots:n}=t;const{themeClasses:r}=Mt(e),{borderClasses:s}=vs(e),{colorClasses:i,colorStyles:a,variantClasses:o}=io(e),{densityClasses:l}=Fr(e),{roundedClasses:c}=An(e),{sizeClasses:u,sizeStyles:d}=hc(e);return Ie(()=>f(e.tag,{class:Se(["v-avatar",{"v-avatar--start":e.start,"v-avatar--end":e.end},r.value,s.value,i.value,l.value,c.value,u.value,o.value,e.class]),style:Le([a.value,d.value,e.style])},{default:()=>[n.default?f(vt,{key:"content-defaults",defaults:{VImg:{cover:!0,src:e.image},VIcon:{icon:e.icon}}},{default:()=>[n.default()]}):e.image?f(ms,{key:"image",src:e.image,alt:"",cover:!0},null):e.icon?f(j,{key:"icon",icon:e.icon},null):e.text,ia(!1,"v-avatar")]})),{}}}),EN=oe({appendAvatar:String,appendIcon:Fe,prependAvatar:String,prependIcon:Fe,subtitle:{type:[String,Number,Boolean],default:void 0},title:{type:[String,Number,Boolean],default:void 0},...Ue(),...Pn(),...lt()},"VCardItem"),CN=be()({name:"VCardItem",props:EN(),setup(e,t){let{slots:n}=t;return Ie(()=>{const r=!!(e.prependAvatar||e.prependIcon),s=!!(r||n.prepend),i=!!(e.appendAvatar||e.appendIcon),a=!!(i||n.append),o=!!(e.title!=null||n.title),l=!!(e.subtitle!=null||n.subtitle);return f(e.tag,{class:Se(["v-card-item",e.class]),style:Le(e.style)},{default:()=>[s&&S("div",{key:"prepend",class:"v-card-item__prepend"},[n.prepend?f(vt,{key:"prepend-defaults",disabled:!r,defaults:{VAvatar:{density:e.density,image:e.prependAvatar},VIcon:{density:e.density,icon:e.prependIcon}}},n.prepend):S(ke,null,[e.prependAvatar&&f(Sn,{key:"prepend-avatar",density:e.density,image:e.prependAvatar},null),e.prependIcon&&f(j,{key:"prepend-icon",density:e.density,icon:e.prependIcon},null)])]),S("div",{class:"v-card-item__content"},[o&&f(Lt,{key:"title"},{default:()=>[n.title?.()??Y(e.title)]}),l&&f(fp,{key:"subtitle"},{default:()=>[n.subtitle?.()??Y(e.subtitle)]}),n.default?.()]),a&&S("div",{key:"append",class:"v-card-item__append"},[n.append?f(vt,{key:"append-defaults",disabled:!i,defaults:{VAvatar:{density:e.density,image:e.appendAvatar},VIcon:{density:e.density,icon:e.appendIcon}}},n.append):S(ke,null,[e.appendIcon&&f(j,{key:"append-icon",density:e.density,icon:e.appendIcon},null),e.appendAvatar&&f(Sn,{key:"append-avatar",density:e.density,image:e.appendAvatar},null)])])]})}),{}}}),TN=oe({opacity:[Number,String],...Ue(),...lt()},"VCardText"),Xe=be()({name:"VCardText",props:TN(),setup(e,t){let{slots:n}=t;return Ie(()=>f(e.tag,{class:Se(["v-card-text",e.class]),style:Le([{"--v-card-text-opacity":e.opacity},e.style])},n)),{}}}),IN=oe({appendAvatar:String,appendIcon:Fe,disabled:Boolean,flat:Boolean,hover:Boolean,image:String,link:{type:Boolean,default:void 0},prependAvatar:String,prependIcon:Fe,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},...rs(),...Ue(),...Pn(),...Vn(),..._r(),...ap(),...aa(),...wl(),...Tn(),...up(),...lt(),...wt(),...ys({variant:"elevated"})},"VCard"),$e=be()({name:"VCard",directives:{vRipple:Lr},props:IN(),setup(e,t){let{attrs:n,slots:r}=t;const{themeClasses:s}=Mt(e),{borderClasses:i}=vs(e),{colorClasses:a,colorStyles:o,variantClasses:l}=io(e),{densityClasses:c}=Fr(e),{dimensionStyles:u}=Bn(e),{elevationClasses:d}=Nr(e),{loaderClasses:p}=gc(e),{locationStyles:m}=oo(e),{positionClasses:v}=_l(e),{roundedClasses:g}=An(e),b=lp(e,n),y=Ee(void 0);return _e(()=>e.loading,(w,_)=>{y.value=!w&&typeof _=="string"?_:typeof w=="boolean"?void 0:w},{immediate:!0}),Ie(()=>{const w=e.link!==!1&&b.isLink.value,_=!e.disabled&&e.link!==!1&&(e.link||b.isClickable.value),T=w?"a":e.tag,P=!!(r.title||e.title!=null),x=!!(r.subtitle||e.subtitle!=null),C=P||x,E=!!(r.append||e.appendAvatar||e.appendIcon),R=!!(r.prepend||e.prependAvatar||e.prependIcon),I=!!(r.image||e.image),O=C||R||E,L=!!(r.text||e.text!=null);return Pt(f(T,ce(b.linkProps,{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":_},s.value,i.value,a.value,c.value,d.value,p.value,v.value,g.value,l.value,e.class],style:[o.value,u.value,m.value,e.style],onClick:_&&b.navigate,tabindex:e.disabled?-1:void 0}),{default:()=>[I&&S("div",{key:"image",class:"v-card__image"},[r.image?f(vt,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{cover:!0,src:e.image}}},r.image):f(ms,{key:"image-img",cover:!0,src:e.image},null)]),f(op,{name:"v-card",active:!!e.loading,color:y.value},{default:r.loader}),O&&f(CN,{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}),L&&f(Xe,{key:"text"},{default:()=>[r.text?.()??e.text]}),r.default?.(),r.actions&&f(dn,null,{default:r.actions}),ia(_,"v-card")]}),[[Lr,_&&e.ripple]])}),{}}}),RN=["dotted","dashed","solid","double"],PN=oe({color:String,contentOffset:[Number,String,Array],gradient:Boolean,inset:Boolean,length:[Number,String],opacity:[Number,String],thickness:[Number,String],vertical:Boolean,variant:{type:String,default:"solid",validator:e=>RN.includes(e)},...Ue(),...wt()},"VDivider"),pt=be()({name:"VDivider",props:PN(),setup(e,t){let{attrs:n,slots:r}=t;const{themeClasses:s}=Mt(e),{textColorClasses:i,textColorStyles:a}=Qr(()=>e.color),o=A(()=>{const c={};return e.length&&(c[e.vertical?"height":"width"]=Oe(e.length)),e.thickness&&(c[e.vertical?"borderRightWidth":"borderTopWidth"]=Oe(e.thickness)),c}),l=ee(()=>{const c=Array.isArray(e.contentOffset)?e.contentOffset[0]:e.contentOffset,u=Array.isArray(e.contentOffset)?e.contentOffset[1]:0;return{marginBlock:e.vertical&&c?Oe(c):void 0,marginInline:!e.vertical&&c?Oe(c):void 0,transform:u?`translate${e.vertical?"X":"Y"}(${Oe(u)})`:void 0}});return Ie(()=>{const c=S("hr",{class:Se([{"v-divider":!0,"v-divider--gradient":e.gradient&&!r.default,"v-divider--inset":e.inset,"v-divider--vertical":e.vertical},s.value,i.value,e.class]),style:Le([o.value,a.value,{"--v-border-opacity":e.opacity},{"border-style":e.variant},e.style]),"aria-orientation":!n.role||n.role==="separator"?e.vertical?"vertical":"horizontal":void 0,role:`${n.role||"separator"}`},null);return r.default?S("div",{class:Se(["v-divider__wrapper",{"v-divider__wrapper--gradient":e.gradient,"v-divider__wrapper--inset":e.inset,"v-divider__wrapper--vertical":e.vertical}])},[c,S("div",{class:"v-divider__content",style:Le(l.value)},[r.default()]),c]):c}),{}}}),AN=oe({fluid:{type:Boolean,default:!1},...Ue(),...Vn(),...lt()},"VContainer"),Br=be()({name:"VContainer",props:AN(),setup(e,t){let{slots:n}=t;const{rtlClasses:r}=xr(),{dimensionStyles:s}=Bn(e);return Ie(()=>f(e.tag,{class:Se(["v-container",{"v-container--fluid":e.fluid},r.value,e.class]),style:Le([s.value,e.style])},n)),{}}}),XC=dp.reduce((e,t)=>(e[t]={type:[Boolean,String,Number],default:!1},e),{}),QC=dp.reduce((e,t)=>{const n="offset"+js(t);return e[n]={type:[String,Number],default:null},e},{}),ZC=dp.reduce((e,t)=>{const n="order"+js(t);return e[n]={type:[String,Number],default:null},e},{}),_S={col:Object.keys(XC),offset:Object.keys(QC),order:Object.keys(ZC)};function ON(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 DN=["auto","start","end","center","baseline","stretch"],LN=oe({cols:{type:[Boolean,String,Number],default:!1},...XC,offset:{type:[String,Number],default:null},...QC,order:{type:[String,Number],default:null},...ZC,alignSelf:{type:String,default:null,validator:e=>DN.includes(e)},...Ue(),...lt()},"VCol"),Be=be()({name:"VCol",props:LN(),setup(e,t){let{slots:n}=t;const r=A(()=>{const s=[];let i;for(i in _S)_S[i].forEach(o=>{const l=e[o],c=ON(i,o,l);c&&s.push(c)});const a=s.some(o=>o.startsWith("v-col-"));return s.push({"v-col":!a||!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()=>gs(e.tag,{class:[r.value,e.class],style:e.style},n.default?.())}}),$y=["start","end","center"],eT=["space-between","space-around","space-evenly"];function Fy(e,t){return dp.reduce((n,r)=>{const s=e+js(r);return n[s]=t(),n},{})}const $N=[...$y,"baseline","stretch"],tT=e=>$N.includes(e),nT=Fy("align",()=>({type:String,default:null,validator:tT})),FN=[...$y,...eT],rT=e=>FN.includes(e),sT=Fy("justify",()=>({type:String,default:null,validator:rT})),NN=[...$y,...eT,"stretch"],iT=e=>NN.includes(e),aT=Fy("alignContent",()=>({type:String,default:null,validator:iT})),kS={align:Object.keys(nT),justify:Object.keys(sT),alignContent:Object.keys(aT)},MN={align:"align",justify:"justify",alignContent:"align-content"};function VN(e,t,n){let r=MN[e];if(n!=null){if(t){const s=t.replace(e,"");r+=`-${s}`}return r+=`-${n}`,r.toLowerCase()}}const BN=oe({dense:Boolean,noGutters:Boolean,align:{type:String,default:null,validator:tT},...nT,justify:{type:String,default:null,validator:rT},...sT,alignContent:{type:String,default:null,validator:iT},...aT,...Ue(),...lt()},"VRow"),it=be()({name:"VRow",props:BN(),setup(e,t){let{slots:n}=t;const r=A(()=>{const s=[];let i;for(i in kS)kS[i].forEach(a=>{const o=e[a],l=VN(i,a,o);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()=>gs(e.tag,{class:["v-row",r.value,e.class],style:e.style},n.default?.())}}),Ft=vl("v-spacer","div","VSpacer"),UN={class:"json-content pa-4"},zN=Ae({__name:"JsonViewerDialog",setup(e){const t=Ht.JsonViewerDialog,n=jt(t),r=bt(),s=A(()=>n.context()?.title||"JSON Viewer"),i=A(()=>{const l=n.context();if(!l?.data)return"No data";try{return JSON.stringify(l.data,null,2)}catch{return String(l.data)}});function a(){n.closeDialog()}async function o(){try{await navigator.clipboard.writeText(i.value),r.info("Copied to clipboard")}catch{r.error("Failed to copy to clipboard")}}return(l,c)=>($(),J(qs,{id:Q(t),"max-width":"800px",onEscape:c[1]||(c[1]=u=>a())},{default:h(()=>[f($e,null,{default:h(()=>[f(Lt,{class:"d-flex align-center"},{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...c[2]||(c[2]=[k("data_object",-1)])]),_:1}),S("span",null,Y(s.value),1),f(Ft),f(te,{icon:"",small:"",onClick:o},{default:h(()=>[f(j,{small:""},{default:h(()=>[...c[3]||(c[3]=[k("content_copy",-1)])]),_:1})]),_:1}),f(te,{icon:"",small:"",onClick:c[0]||(c[0]=u=>a())},{default:h(()=>[f(j,{small:""},{default:h(()=>[...c[4]||(c[4]=[k("close",-1)])]),_:1})]),_:1})]),_:1}),f(pt),f(Xe,{class:"pa-0"},{default:h(()=>[S("pre",UN,Y(i.value),1)]),_:1})]),_:1})]),_:1},8,["id"]))}}),fn=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},jN=fn(zN,[["__scopeId","data-v-62ce94c4"]]);function oT(e,t){return function(){return e.apply(t,arguments)}}const{toString:HN}=Object.prototype,{getPrototypeOf:Ny}=Object,{iterator:pp,toStringTag:lT}=Symbol,mp=(e=>t=>{const n=HN.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ss=e=>(e=e.toLowerCase(),t=>mp(t)===e),hp=e=>t=>typeof t===e,{isArray:xl}=Array,Xo=hp("undefined");function yc(e){return e!==null&&!Xo(e)&&e.constructor!==null&&!Xo(e.constructor)&&gr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const uT=Ss("ArrayBuffer");function qN(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&uT(e.buffer),t}const WN=hp("string"),gr=hp("function"),cT=hp("number"),bc=e=>e!==null&&typeof e=="object",GN=e=>e===!0||e===!1,bd=e=>{if(mp(e)!=="object")return!1;const t=Ny(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(lT in e)&&!(pp in e)},KN=e=>{if(!bc(e)||yc(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},YN=Ss("Date"),JN=Ss("File"),XN=Ss("Blob"),QN=Ss("FileList"),ZN=e=>bc(e)&&gr(e.pipe),eM=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||gr(e.append)&&((t=mp(e))==="formdata"||t==="object"&&gr(e.toString)&&e.toString()==="[object FormData]"))},tM=Ss("URLSearchParams"),[nM,rM,sM,iM]=["ReadableStream","Request","Response","Headers"].map(Ss),aM=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Sc(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),xl(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(yc(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;let o;for(r=0;r<a;r++)o=i[r],t.call(null,e[o],o,e)}}function dT(e,t){if(yc(e))return null;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 xa=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,fT=e=>!Xo(e)&&e!==xa;function Pg(){const{caseless:e,skipUndefined:t}=fT(this)&&this||{},n={},r=(s,i)=>{const a=e&&dT(n,i)||i;bd(n[a])&&bd(s)?n[a]=Pg(n[a],s):bd(s)?n[a]=Pg({},s):xl(s)?n[a]=s.slice():(!t||!Xo(s))&&(n[a]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&Sc(arguments[s],r);return n}const oM=(e,t,n,{allOwnKeys:r}={})=>(Sc(t,(s,i)=>{n&&gr(s)?e[i]=oT(s,n):e[i]=s},{allOwnKeys:r}),e),lM=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),uM=(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)},cM=(e,t,n,r)=>{let s,i,a;const o={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)a=s[i],(!r||r(a,e,t))&&!o[a]&&(t[a]=e[a],o[a]=!0);e=n!==!1&&Ny(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},dM=(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},fM=e=>{if(!e)return null;if(xl(e))return e;let t=e.length;if(!cT(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},pM=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ny(Uint8Array)),mM=(e,t)=>{const r=(e&&e[pp]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},hM=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},gM=Ss("HTMLFormElement"),vM=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),xS=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),yM=Ss("RegExp"),pT=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Sc(n,(s,i)=>{let a;(a=t(s,i,e))!==!1&&(r[i]=a||s)}),Object.defineProperties(e,r)},bM=e=>{pT(e,(t,n)=>{if(gr(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(gr(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+"'")})}})},SM=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return xl(e)?r(e):r(String(e).split(t)),n},wM=()=>{},_M=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function kM(e){return!!(e&&gr(e.append)&&e[lT]==="FormData"&&e[pp])}const xM=e=>{const t=new Array(10),n=(r,s)=>{if(bc(r)){if(t.indexOf(r)>=0)return;if(yc(r))return r;if(!("toJSON"in r)){t[s]=r;const i=xl(r)?[]:{};return Sc(r,(a,o)=>{const l=n(a,s+1);!Xo(l)&&(i[o]=l)}),t[s]=void 0,i}}return r};return n(e,0)},EM=Ss("AsyncFunction"),CM=e=>e&&(bc(e)||gr(e))&&gr(e.then)&&gr(e.catch),mT=((e,t)=>e?setImmediate:t?((n,r)=>(xa.addEventListener("message",({source:s,data:i})=>{s===xa&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),xa.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",gr(xa.postMessage)),TM=typeof queueMicrotask<"u"?queueMicrotask.bind(xa):typeof process<"u"&&process.nextTick||mT,IM=e=>e!=null&&gr(e[pp]),le={isArray:xl,isArrayBuffer:uT,isBuffer:yc,isFormData:eM,isArrayBufferView:qN,isString:WN,isNumber:cT,isBoolean:GN,isObject:bc,isPlainObject:bd,isEmptyObject:KN,isReadableStream:nM,isRequest:rM,isResponse:sM,isHeaders:iM,isUndefined:Xo,isDate:YN,isFile:JN,isBlob:XN,isRegExp:yM,isFunction:gr,isStream:ZN,isURLSearchParams:tM,isTypedArray:pM,isFileList:QN,forEach:Sc,merge:Pg,extend:oM,trim:aM,stripBOM:lM,inherits:uM,toFlatObject:cM,kindOf:mp,kindOfTest:Ss,endsWith:dM,toArray:fM,forEachEntry:mM,matchAll:hM,isHTMLForm:gM,hasOwnProperty:xS,hasOwnProp:xS,reduceDescriptors:pT,freezeMethods:bM,toObjectSet:SM,toCamelCase:vM,noop:wM,toFiniteNumber:_M,findKey:dT,global:xa,isContextDefined:fT,isSpecCompliantForm:kM,toJSONObject:xM,isAsyncFn:EM,isThenable:CM,setImmediate:mT,asap:TM,isIterable:IM};function et(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)}le.inherits(et,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:le.toJSONObject(this.config),code:this.code,status:this.status}}});const hT=et.prototype,gT={};["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=>{gT[e]={value:e}});Object.defineProperties(et,gT);Object.defineProperty(hT,"isAxiosError",{value:!0});et.from=(e,t,n,r,s,i)=>{const a=Object.create(hT);le.toFlatObject(e,a,function(u){return u!==Error.prototype},c=>c!=="isAxiosError");const o=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return et.call(a,o,l,n,r,s),e&&a.cause==null&&Object.defineProperty(a,"cause",{value:e,configurable:!0}),a.name=e&&e.name||"Error",i&&Object.assign(a,i),a};const RM=null;function Ag(e){return le.isPlainObject(e)||le.isArray(e)}function vT(e){return le.endsWith(e,"[]")?e.slice(0,-2):e}function ES(e,t,n){return e?e.concat(t).map(function(s,i){return s=vT(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function PM(e){return le.isArray(e)&&!e.some(Ag)}const AM=le.toFlatObject(le,{},null,function(t){return/^is[A-Z]/.test(t)});function gp(e,t,n){if(!le.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=le.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,b){return!le.isUndefined(b[g])});const r=n.metaTokens,s=n.visitor||u,i=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&le.isSpecCompliantForm(t);if(!le.isFunction(s))throw new TypeError("visitor must be a function");function c(v){if(v===null)return"";if(le.isDate(v))return v.toISOString();if(le.isBoolean(v))return v.toString();if(!l&&le.isBlob(v))throw new et("Blob is not supported. Use a Buffer instead.");return le.isArrayBuffer(v)||le.isTypedArray(v)?l&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function u(v,g,b){let y=v;if(v&&!b&&typeof v=="object"){if(le.endsWith(g,"{}"))g=r?g:g.slice(0,-2),v=JSON.stringify(v);else if(le.isArray(v)&&PM(v)||(le.isFileList(v)||le.endsWith(g,"[]"))&&(y=le.toArray(v)))return g=vT(g),y.forEach(function(_,T){!(le.isUndefined(_)||_===null)&&t.append(a===!0?ES([g],T,i):a===null?g:g+"[]",c(_))}),!1}return Ag(v)?!0:(t.append(ES(b,g,i),c(v)),!1)}const d=[],p=Object.assign(AM,{defaultVisitor:u,convertValue:c,isVisitable:Ag});function m(v,g){if(!le.isUndefined(v)){if(d.indexOf(v)!==-1)throw Error("Circular reference detected in "+g.join("."));d.push(v),le.forEach(v,function(y,w){(!(le.isUndefined(y)||y===null)&&s.call(t,y,le.isString(w)?w.trim():w,g,p))===!0&&m(y,g?g.concat(w):[w])}),d.pop()}}if(!le.isObject(e))throw new TypeError("data must be an object");return m(e),t}function CS(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function My(e,t){this._pairs=[],e&&gp(e,this,t)}const yT=My.prototype;yT.append=function(t,n){this._pairs.push([t,n])};yT.toString=function(t){const n=t?function(r){return t.call(this,r,CS)}:CS;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function OM(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function bT(e,t,n){if(!t)return e;const r=n&&n.encode||OM;le.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(s?i=s(t,n):i=le.isURLSearchParams(t)?t.toString():new My(t,n).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class TS{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){le.forEach(this.handlers,function(r){r!==null&&t(r)})}}const ST={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},DM=typeof URLSearchParams<"u"?URLSearchParams:My,LM=typeof FormData<"u"?FormData:null,$M=typeof Blob<"u"?Blob:null,FM={isBrowser:!0,classes:{URLSearchParams:DM,FormData:LM,Blob:$M},protocols:["http","https","file","blob","url","data"]},Vy=typeof window<"u"&&typeof document<"u",Og=typeof navigator=="object"&&navigator||void 0,NM=Vy&&(!Og||["ReactNative","NativeScript","NS"].indexOf(Og.product)<0),MM=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",VM=Vy&&window.location.href||"http://localhost",BM=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Vy,hasStandardBrowserEnv:NM,hasStandardBrowserWebWorkerEnv:MM,navigator:Og,origin:VM},Symbol.toStringTag,{value:"Module"})),Wn={...BM,...FM};function UM(e,t){return gp(e,new Wn.classes.URLSearchParams,{visitor:function(n,r,s,i){return Wn.isNode&&le.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function zM(e){return le.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function jM(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 wT(e){function t(n,r,s,i){let a=n[i++];if(a==="__proto__")return!0;const o=Number.isFinite(+a),l=i>=n.length;return a=!a&&le.isArray(s)?s.length:a,l?(le.hasOwnProp(s,a)?s[a]=[s[a],r]:s[a]=r,!o):((!s[a]||!le.isObject(s[a]))&&(s[a]=[]),t(n,r,s[a],i)&&le.isArray(s[a])&&(s[a]=jM(s[a])),!o)}if(le.isFormData(e)&&le.isFunction(e.entries)){const n={};return le.forEachEntry(e,(r,s)=>{t(zM(r),s,n,0)}),n}return null}function HM(e,t,n){if(le.isString(e))try{return(t||JSON.parse)(e),le.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const wc={transitional:ST,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=le.isObject(t);if(i&&le.isHTMLForm(t)&&(t=new FormData(t)),le.isFormData(t))return s?JSON.stringify(wT(t)):t;if(le.isArrayBuffer(t)||le.isBuffer(t)||le.isStream(t)||le.isFile(t)||le.isBlob(t)||le.isReadableStream(t))return t;if(le.isArrayBufferView(t))return t.buffer;if(le.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return UM(t,this.formSerializer).toString();if((o=le.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return gp(o?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),HM(t)):t}],transformResponse:[function(t){const n=this.transitional||wc.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(le.isResponse(t)||le.isReadableStream(t))return t;if(t&&le.isString(t)&&(r&&!this.responseType||s)){const a=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(o){if(a)throw o.name==="SyntaxError"?et.from(o,et.ERR_BAD_RESPONSE,this,null,this.response):o}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Wn.classes.FormData,Blob:Wn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};le.forEach(["delete","get","head","post","put","patch"],e=>{wc.headers[e]={}});const qM=le.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"]),WM=e=>{const t={};let n,r,s;return e&&e.split(`
12
+ `).forEach(function(a){s=a.indexOf(":"),n=a.substring(0,s).trim().toLowerCase(),r=a.substring(s+1).trim(),!(!n||t[n]&&qM[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},IS=Symbol("internals");function Jl(e){return e&&String(e).trim().toLowerCase()}function Sd(e){return e===!1||e==null?e:le.isArray(e)?e.map(Sd):String(e)}function GM(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 KM=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Em(e,t,n,r,s){if(le.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!le.isString(t)){if(le.isString(r))return t.indexOf(r)!==-1;if(le.isRegExp(r))return r.test(t)}}function YM(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function JM(e,t){const n=le.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,a){return this[r].call(this,t,s,i,a)},configurable:!0})})}let vr=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(o,l,c){const u=Jl(l);if(!u)throw new Error("header name must be a non-empty string");const d=le.findKey(s,u);(!d||s[d]===void 0||c===!0||c===void 0&&s[d]!==!1)&&(s[d||l]=Sd(o))}const a=(o,l)=>le.forEach(o,(c,u)=>i(c,u,l));if(le.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(le.isString(t)&&(t=t.trim())&&!KM(t))a(WM(t),n);else if(le.isObject(t)&&le.isIterable(t)){let o={},l,c;for(const u of t){if(!le.isArray(u))throw TypeError("Object iterator must return a key-value pair");o[c=u[0]]=(l=o[c])?le.isArray(l)?[...l,u[1]]:[l,u[1]]:u[1]}a(o,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=Jl(t),t){const r=le.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return GM(s);if(le.isFunction(n))return n.call(this,s,r);if(le.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Jl(t),t){const r=le.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Em(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(a){if(a=Jl(a),a){const o=le.findKey(r,a);o&&(!n||Em(r,r[o],o,n))&&(delete r[o],s=!0)}}return le.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||Em(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return le.forEach(this,(s,i)=>{const a=le.findKey(r,i);if(a){n[a]=Sd(s),delete n[i];return}const o=t?YM(i):String(i).trim();o!==i&&delete n[i],n[o]=Sd(s),r[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return le.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&le.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(`
13
+ `)}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[IS]=this[IS]={accessors:{}}).accessors,s=this.prototype;function i(a){const o=Jl(a);r[o]||(JM(s,a),r[o]=!0)}return le.isArray(t)?t.forEach(i):i(t),this}};vr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);le.reduceDescriptors(vr.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});le.freezeMethods(vr);function Cm(e,t){const n=this||wc,r=t||n,s=vr.from(r.headers);let i=r.data;return le.forEach(e,function(o){i=o.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function _T(e){return!!(e&&e.__CANCEL__)}function El(e,t,n){et.call(this,e??"canceled",et.ERR_CANCELED,t,n),this.name="CanceledError"}le.inherits(El,et,{__CANCEL__:!0});function kT(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new et("Request failed with status code "+n.status,[et.ERR_BAD_REQUEST,et.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function XM(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function QM(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,a;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[i];a||(a=c),n[s]=l,r[s]=c;let d=i,p=0;for(;d!==s;)p+=n[d++],d=d%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),c-a<t)return;const m=u&&c-u;return m?Math.round(p*1e3/m):void 0}}function ZM(e,t){let n=0,r=1e3/t,s,i;const a=(c,u=Date.now())=>{n=u,s=null,i&&(clearTimeout(i),i=null),e(...c)};return[(...c)=>{const u=Date.now(),d=u-n;d>=r?a(c,u):(s=c,i||(i=setTimeout(()=>{i=null,a(s)},r-d)))},()=>s&&a(s)]}const lf=(e,t,n=3)=>{let r=0;const s=QM(50,250);return ZM(i=>{const a=i.loaded,o=i.lengthComputable?i.total:void 0,l=a-r,c=s(l),u=a<=o;r=a;const d={loaded:a,total:o,progress:o?a/o:void 0,bytes:l,rate:c||void 0,estimated:c&&o&&u?(o-a)/c:void 0,event:i,lengthComputable:o!=null,[t?"download":"upload"]:!0};e(d)},n)},RS=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},PS=e=>(...t)=>le.asap(()=>e(...t)),eV=Wn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Wn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Wn.origin),Wn.navigator&&/(msie|trident)/i.test(Wn.navigator.userAgent)):()=>!0,tV=Wn.hasStandardBrowserEnv?{write(e,t,n,r,s,i,a){if(typeof document>"u")return;const o=[`${e}=${encodeURIComponent(t)}`];le.isNumber(n)&&o.push(`expires=${new Date(n).toUTCString()}`),le.isString(r)&&o.push(`path=${r}`),le.isString(s)&&o.push(`domain=${s}`),i===!0&&o.push("secure"),le.isString(a)&&o.push(`SameSite=${a}`),document.cookie=o.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function nV(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function rV(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function xT(e,t,n){let r=!nV(t);return e&&(r||n==!1)?rV(e,t):t}const AS=e=>e instanceof vr?{...e}:e;function Ya(e,t){t=t||{};const n={};function r(c,u,d,p){return le.isPlainObject(c)&&le.isPlainObject(u)?le.merge.call({caseless:p},c,u):le.isPlainObject(u)?le.merge({},u):le.isArray(u)?u.slice():u}function s(c,u,d,p){if(le.isUndefined(u)){if(!le.isUndefined(c))return r(void 0,c,d,p)}else return r(c,u,d,p)}function i(c,u){if(!le.isUndefined(u))return r(void 0,u)}function a(c,u){if(le.isUndefined(u)){if(!le.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function o(c,u,d){if(d in t)return r(c,u);if(d in e)return r(void 0,c)}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:o,headers:(c,u,d)=>s(AS(c),AS(u),d,!0)};return le.forEach(Object.keys({...e,...t}),function(u){const d=l[u]||s,p=d(e[u],t[u],u);le.isUndefined(p)&&d!==o||(n[u]=p)}),n}const ET=e=>{const t=Ya({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:o}=t;if(t.headers=a=vr.from(a),t.url=bT(xT(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),o&&a.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):""))),le.isFormData(n)){if(Wn.hasStandardBrowserEnv||Wn.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(le.isFunction(n.getHeaders)){const l=n.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(([u,d])=>{c.includes(u.toLowerCase())&&a.set(u,d)})}}if(Wn.hasStandardBrowserEnv&&(r&&le.isFunction(r)&&(r=r(t)),r||r!==!1&&eV(t.url))){const l=s&&i&&tV.read(i);l&&a.set(s,l)}return t},sV=typeof XMLHttpRequest<"u",iV=sV&&function(e){return new Promise(function(n,r){const s=ET(e);let i=s.data;const a=vr.from(s.headers).normalize();let{responseType:o,onUploadProgress:l,onDownloadProgress:c}=s,u,d,p,m,v;function g(){m&&m(),v&&v(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let b=new XMLHttpRequest;b.open(s.method.toUpperCase(),s.url,!0),b.timeout=s.timeout;function y(){if(!b)return;const _=vr.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),P={data:!o||o==="text"||o==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:_,config:e,request:b};kT(function(C){n(C),g()},function(C){r(C),g()},P),b=null}"onloadend"in b?b.onloadend=y:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(y)},b.onabort=function(){b&&(r(new et("Request aborted",et.ECONNABORTED,e,b)),b=null)},b.onerror=function(T){const P=T&&T.message?T.message:"Network Error",x=new et(P,et.ERR_NETWORK,e,b);x.event=T||null,r(x),b=null},b.ontimeout=function(){let T=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const P=s.transitional||ST;s.timeoutErrorMessage&&(T=s.timeoutErrorMessage),r(new et(T,P.clarifyTimeoutError?et.ETIMEDOUT:et.ECONNABORTED,e,b)),b=null},i===void 0&&a.setContentType(null),"setRequestHeader"in b&&le.forEach(a.toJSON(),function(T,P){b.setRequestHeader(P,T)}),le.isUndefined(s.withCredentials)||(b.withCredentials=!!s.withCredentials),o&&o!=="json"&&(b.responseType=s.responseType),c&&([p,v]=lf(c,!0),b.addEventListener("progress",p)),l&&b.upload&&([d,m]=lf(l),b.upload.addEventListener("progress",d),b.upload.addEventListener("loadend",m)),(s.cancelToken||s.signal)&&(u=_=>{b&&(r(!_||_.type?new El(null,e,b):_),b.abort(),b=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const w=XM(s.url);if(w&&Wn.protocols.indexOf(w)===-1){r(new et("Unsupported protocol "+w+":",et.ERR_BAD_REQUEST,e));return}b.send(i||null)})},aV=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const i=function(c){if(!s){s=!0,o();const u=c instanceof Error?c:this.reason;r.abort(u instanceof et?u:new El(u instanceof Error?u.message:u))}};let a=t&&setTimeout(()=>{a=null,i(new et(`timeout ${t} of ms exceeded`,et.ETIMEDOUT))},t);const o=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>c.addEventListener("abort",i));const{signal:l}=r;return l.unsubscribe=()=>le.asap(o),l}},oV=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},lV=async function*(e,t){for await(const n of uV(e))yield*oV(n,t)},uV=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()}},OS=(e,t,n,r)=>{const s=lV(e,t);let i=0,a,o=l=>{a||(a=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await s.next();if(c){o(),l.close();return}let d=u.byteLength;if(n){let p=i+=d;n(p)}l.enqueue(new Uint8Array(u))}catch(c){throw o(c),c}},cancel(l){return o(l),s.return()}},{highWaterMark:2})},DS=64*1024,{isFunction:Jc}=le,cV=(({Request:e,Response:t})=>({Request:e,Response:t}))(le.global),{ReadableStream:LS,TextEncoder:$S}=le.global,FS=(e,...t)=>{try{return!!e(...t)}catch{return!1}},dV=e=>{e=le.merge.call({skipUndefined:!0},cV,e);const{fetch:t,Request:n,Response:r}=e,s=t?Jc(t):typeof fetch=="function",i=Jc(n),a=Jc(r);if(!s)return!1;const o=s&&Jc(LS),l=s&&(typeof $S=="function"?(v=>g=>v.encode(g))(new $S):async v=>new Uint8Array(await new n(v).arrayBuffer())),c=i&&o&&FS(()=>{let v=!1;const g=new n(Wn.origin,{body:new LS,method:"POST",get duplex(){return v=!0,"half"}}).headers.has("Content-Type");return v&&!g}),u=a&&o&&FS(()=>le.isReadableStream(new r("").body)),d={stream:u&&(v=>v.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(v=>{!d[v]&&(d[v]=(g,b)=>{let y=g&&g[v];if(y)return y.call(g);throw new et(`Response type '${v}' is not supported`,et.ERR_NOT_SUPPORT,b)})});const p=async v=>{if(v==null)return 0;if(le.isBlob(v))return v.size;if(le.isSpecCompliantForm(v))return(await new n(Wn.origin,{method:"POST",body:v}).arrayBuffer()).byteLength;if(le.isArrayBufferView(v)||le.isArrayBuffer(v))return v.byteLength;if(le.isURLSearchParams(v)&&(v=v+""),le.isString(v))return(await l(v)).byteLength},m=async(v,g)=>{const b=le.toFiniteNumber(v.getContentLength());return b??p(g)};return async v=>{let{url:g,method:b,data:y,signal:w,cancelToken:_,timeout:T,onDownloadProgress:P,onUploadProgress:x,responseType:C,headers:E,withCredentials:R="same-origin",fetchOptions:I}=ET(v),O=t||fetch;C=C?(C+"").toLowerCase():"text";let L=aV([w,_&&_.toAbortSignal()],T),V=null;const F=L&&L.unsubscribe&&(()=>{L.unsubscribe()});let B;try{if(x&&c&&b!=="get"&&b!=="head"&&(B=await m(E,y))!==0){let K=new n(g,{method:"POST",body:y,duplex:"half"}),H;if(le.isFormData(y)&&(H=K.headers.get("content-type"))&&E.setContentType(H),K.body){const[re,ae]=RS(B,lf(PS(x)));y=OS(K.body,DS,re,ae)}}le.isString(R)||(R=R?"include":"omit");const M=i&&"credentials"in n.prototype,N={...I,signal:L,method:b.toUpperCase(),headers:E.normalize().toJSON(),body:y,duplex:"half",credentials:M?R:void 0};V=i&&new n(g,N);let D=await(i?O(V,I):O(g,N));const W=u&&(C==="stream"||C==="response");if(u&&(P||W&&F)){const K={};["status","statusText","headers"].forEach(de=>{K[de]=D[de]});const H=le.toFiniteNumber(D.headers.get("content-length")),[re,ae]=P&&RS(H,lf(PS(P),!0))||[];D=new r(OS(D.body,DS,re,()=>{ae&&ae(),F&&F()}),K)}C=C||"text";let z=await d[le.findKey(d,C)||"text"](D,v);return!W&&F&&F(),await new Promise((K,H)=>{kT(K,H,{data:z,headers:vr.from(D.headers),status:D.status,statusText:D.statusText,config:v,request:V})})}catch(M){throw F&&F(),M&&M.name==="TypeError"&&/Load failed|fetch/i.test(M.message)?Object.assign(new et("Network Error",et.ERR_NETWORK,v,V),{cause:M.cause||M}):et.from(M,M&&M.code,v,V)}}},fV=new Map,CT=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,i=[r,s,n];let a=i.length,o=a,l,c,u=fV;for(;o--;)l=i[o],c=u.get(l),c===void 0&&u.set(l,c=o?new Map:dV(t)),u=c;return c};CT();const By={http:RM,xhr:iV,fetch:{get:CT}};le.forEach(By,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const NS=e=>`- ${e}`,pV=e=>le.isFunction(e)||e===null||e===!1;function mV(e,t){e=le.isArray(e)?e:[e];const{length:n}=e;let r,s;const i={};for(let a=0;a<n;a++){r=e[a];let o;if(s=r,!pV(r)&&(s=By[(o=String(r)).toLowerCase()],s===void 0))throw new et(`Unknown adapter '${o}'`);if(s&&(le.isFunction(s)||(s=s.get(t))))break;i[o||"#"+a]=s}if(!s){const a=Object.entries(i).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=n?a.length>1?`since :
14
+ `+a.map(NS).join(`
15
+ `):" "+NS(a[0]):"as no adapter specified";throw new et("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return s}const TT={getAdapter:mV,adapters:By};function Tm(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new El(null,e)}function MS(e){return Tm(e),e.headers=vr.from(e.headers),e.data=Cm.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),TT.getAdapter(e.adapter||wc.adapter,e)(e).then(function(r){return Tm(e),r.data=Cm.call(e,e.transformResponse,r),r.headers=vr.from(r.headers),r},function(r){return _T(r)||(Tm(e),r&&r.response&&(r.response.data=Cm.call(e,e.transformResponse,r.response),r.response.headers=vr.from(r.response.headers))),Promise.reject(r)})}const IT="1.13.2",vp={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{vp[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const VS={};vp.transitional=function(t,n,r){function s(i,a){return"[Axios v"+IT+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,o)=>{if(t===!1)throw new et(s(a," has been removed"+(n?" in "+n:"")),et.ERR_DEPRECATED);return n&&!VS[a]&&(VS[a]=!0,console.warn(s(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,o):!0}};vp.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function hV(e,t,n){if(typeof e!="object")throw new et("options must be an object",et.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],a=t[i];if(a){const o=e[i],l=o===void 0||a(o,i,e);if(l!==!0)throw new et("option "+i+" must be "+l,et.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new et("Unknown option "+i,et.ERR_BAD_OPTION)}}const wd={assertOptions:hV,validators:vp},Ps=wd.validators;let La=class{constructor(t){this.defaults=t||{},this.interceptors={request:new TS,response:new TS}}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+=`
16
+ `+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ya(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&wd.assertOptions(r,{silentJSONParsing:Ps.transitional(Ps.boolean),forcedJSONParsing:Ps.transitional(Ps.boolean),clarifyTimeoutError:Ps.transitional(Ps.boolean)},!1),s!=null&&(le.isFunction(s)?n.paramsSerializer={serialize:s}:wd.assertOptions(s,{encode:Ps.function,serialize:Ps.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),wd.assertOptions(n,{baseUrl:Ps.spelling("baseURL"),withXsrfToken:Ps.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&le.merge(i.common,i[n.method]);i&&le.forEach(["delete","get","head","post","put","patch","common"],v=>{delete i[v]}),n.headers=vr.concat(a,i);const o=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,o.unshift(g.fulfilled,g.rejected))});const c=[];this.interceptors.response.forEach(function(g){c.push(g.fulfilled,g.rejected)});let u,d=0,p;if(!l){const v=[MS.bind(this),void 0];for(v.unshift(...o),v.push(...c),p=v.length,u=Promise.resolve(n);d<p;)u=u.then(v[d++],v[d++]);return u}p=o.length;let m=n;for(;d<p;){const v=o[d++],g=o[d++];try{m=v(m)}catch(b){g.call(this,b);break}}try{u=MS.call(this,m)}catch(v){return Promise.reject(v)}for(d=0,p=c.length;d<p;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=Ya(this.defaults,t);const n=xT(t.baseURL,t.url,t.allowAbsoluteUrls);return bT(n,t.params,t.paramsSerializer)}};le.forEach(["delete","get","head","options"],function(t){La.prototype[t]=function(n,r){return this.request(Ya(r||{},{method:t,url:n,data:(r||{}).data}))}});le.forEach(["post","put","patch"],function(t){function n(r){return function(i,a,o){return this.request(Ya(o||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}La.prototype[t]=n(),La.prototype[t+"Form"]=n(!0)});let gV=class RT{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 a=new Promise(o=>{r.subscribe(o),i=o}).then(s);return a.cancel=function(){r.unsubscribe(i)},a},t(function(i,a,o){r.reason||(r.reason=new El(i,a,o),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 RT(function(s){t=s}),cancel:t}}};function vV(e){return function(n){return e.apply(null,n)}}function yV(e){return le.isObject(e)&&e.isAxiosError===!0}const Dg={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Dg).forEach(([e,t])=>{Dg[t]=e});function PT(e){const t=new La(e),n=oT(La.prototype.request,t);return le.extend(n,La.prototype,t,{allOwnKeys:!0}),le.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return PT(Ya(e,s))},n}const ln=PT(wc);ln.Axios=La;ln.CanceledError=El;ln.CancelToken=gV;ln.isCancel=_T;ln.VERSION=IT;ln.toFormData=gp;ln.AxiosError=et;ln.Cancel=ln.CanceledError;ln.all=function(t){return Promise.all(t)};ln.spread=vV;ln.isAxiosError=yV;ln.mergeConfig=Ya;ln.AxiosHeaders=vr;ln.formToJSON=e=>wT(le.isHTMLForm(e)?new FormData(e):e);ln.getAdapter=TT.getAdapter;ln.HttpStatusCode=Dg;ln.default=ln;const{Axios:oae,AxiosError:AT,CanceledError:lae,isCancel:uae,CancelToken:cae,VERSION:dae,all:fae,Cancel:pae,isAxiosError:mae,spread:hae,toFormData:gae,AxiosHeaders:vae,HttpStatusCode:Ea,formToJSON:yae,getAdapter:bae,mergeConfig:Sae}=ln;class ru extends Error{}ru.prototype.name="InvalidTokenError";function bV(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 SV(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 bV(t)}catch{return atob(t)}}function wV(e,t){if(typeof e!="string")throw new ru("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 ru(`Invalid token specified: missing part #${n+1}`);let s;try{s=SV(r)}catch(i){throw new ru(`Invalid token specified: invalid base64 for part #${n+1} (${i.message})`)}try{return JSON.parse(s)}catch(i){throw new ru(`Invalid token specified: invalid json for part #${n+1} (${i.message})`)}}function _V(e,t={}){const{onError:n,fallbackValue:r=null}=t,s=(i,a)=>{try{return wV(i,a)}catch(o){return n?.(o),r}};return{header:A(()=>s(Rt(e),{header:!0})),payload:A(()=>s(Rt(e)))}}class ba{static async getLoginRequired(){return await(await jn(!1,!1)).get("/api/auth/login-required")}static async postLogin(t,n){return await(await jn(!1,!1)).post("/api/auth/login",{username:t,password:n})}static async logout(){return await(await jn(!0,!1)).post("/api/auth/logout")}static async refreshLogin(t){return await(await jn(!1,!1)).post("/api/auth/refresh",{refreshToken:t})}static async verifyLogin(){return await(await jn(!0,!1)).post("/api/auth/verify")}static async registerAccount(t,n){return await(await jn(!0,!1)).post("/api/auth/register",{username:t,password:n})}}const ur={IncorrectCredentials:"IncorrectCredentials",InvalidOrExpiredRefreshToken:"InvalidOrExpiredRefreshToken",InvalidOrExpiredAuthToken:"InvalidOrExpiredAuthToken",PasswordChangeRequired:"PasswordChangeRequired",LoginRequired:"LoginRequired",AccountNotVerified:"AccountNotVerified"};function Uy(e){switch(e){case ur.IncorrectCredentials:return"Incorrect credentials";case ur.InvalidOrExpiredRefreshToken:return"Invalid or expired refresh token";case ur.InvalidOrExpiredAuthToken:return"Invalid or expired auth token";case ur.PasswordChangeRequired:return"Password change required";case ur.LoginRequired:return"Login required";case ur.AccountNotVerified:return"Account not verified";default:return"Authentication error"}}const Zr=wr("auth",{state:()=>({isDemoMode:null,token:null,refreshToken:null,loginRequired:null,registration:null,wizardState:null,lastLogoutReason:null}),actions:{async checkAuthenticationRequirements(){return await ba.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=>{throw console.error("authRequired: failed to check login required",e.response?.status),e})},async login(e,t){return this.lastLogoutReason=null,await ba.postLogin(e,t).then(n=>(this.setTokens(n.data.token,n.data.refreshToken),n.data)).catch(n=>{throw console.error("login: failed to login",n.response?.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 ba.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(){try{return await ba.verifyLogin(),{success:!0}}catch(e){console.error("[AuthStore.verifyOrRefreshLoginOnce]: failed to verify login",e);const t=e;if(!t.response||t.response?.status!==Ea.Unauthorized)throw console.error("[AuthStore.verifyOrRefreshLoginOnce]: unknown error",t.status),e;const{reasonCode:n,url:r}=this.extractSpecialReasonCode(e);if(n)return await this.logout(!1,Uy(n)),console.error(`[AuthStore] 401 Unauthorized - emitting 'auth:${n}' with reason ${n}`),nr(`auth:${n}`).emit({url:r,error:t.message,reasonCode:n}),{success:!1,handled:!0};if(!this.hasRefreshToken)return{success:!1,handled:!1};try{await this.refreshLoginToken(),await ba.verifyLogin()}catch(s){const i=s;if(i.response?.status===Ea.Unauthorized)return await this.logout(!1),console.error("[AuthStore.verifyOrRefreshLoginOnce]: failed to refresh token",i.status),{success:!1,handled:!1};throw s}return{success:!0,handled:!1}}},extractSpecialReasonCode(e){const t=e?.response?.data?.reasonCode;return t&&console.error("[AuthStore] 401 Unauthorized - Checking received reason code",t),t&&(t===ur.AccountNotVerified||t===ur.PasswordChangeRequired)?{reasonCode:t,url:e?.config?.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 ba.refreshLogin(this.refreshToken).then(e=>(e?.data?.token&&this.setIdToken(e.data.token),!0)).catch(e=>{throw e.response?.status==Ea.Unauthorized?(this.setTokens(void 0,void 0),console.error("refreshLoginToken: authentication error, failed to refresh tokens",e.response?.status)):console.error("refreshLoginToken: unknown error, failed to refresh tokens",e.response?.status),e})},setTokens(e,t){this.setIdToken(e),this.setRefreshToken(t)},setIdToken(e){e?.length?(localStorage.setItem("token",e),this.token=e):localStorage.removeItem("token")},setRefreshToken(e){e?.length?(localStorage.setItem("refreshToken",e),this.refreshToken=e):localStorage.removeItem("refreshToken")}},getters:{hasRefreshToken(){return!!this.refreshToken},isLoginExpired(){const e=this.tokenClaims;return e?.exp?e.exp<Date.now()/1e3:!1},hasAuthToken(){return!!this.tokenClaims},tokenClaims(){if(!this.token)return null;const e=_V(this.token,{fallbackValue:null});return e?e.payload.value:null}}}),Ve=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,ct=globalThis,$a="10.32.1";function co(){return yp(ct),ct}function yp(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||$a,t[$a]=t[$a]||{}}function Cl(e,t,n=ct){const r=n.__SENTRY__=n.__SENTRY__||{},s=r[$a]=r[$a]||{};return s[e]||(s[e]=t())}const kV=["debug","info","warn","error","log","assert","trace"],xV="Sentry Logger ",uf={};function Pi(e){if(!("console"in ct))return e();const t=ct.console,n={},r=Object.keys(uf);r.forEach(s=>{const i=uf[s];n[s]=t[s],t[s]=i});try{return e()}finally{r.forEach(s=>{t[s]=n[s]})}}function EV(){jy().enabled=!0}function CV(){jy().enabled=!1}function OT(){return jy().enabled}function TV(...e){zy("log",...e)}function IV(...e){zy("warn",...e)}function RV(...e){zy("error",...e)}function zy(e,...t){Ve&&OT()&&Pi(()=>{ct.console[e](`${xV}[${e}]:`,...t)})}function jy(){return Ve?Cl("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const Pe={enable:EV,disable:CV,isEnabled:OT,log:TV,warn:IV,error:RV},DT=50,Ja="?",BS=/\(error: (.*)\)/,US=/captureMessage|captureException/;function LT(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,s=0)=>{const i=[],a=n.split(`
17
+ `);for(let o=r;o<a.length;o++){let l=a[o];l.length>1024&&(l=l.slice(0,1024));const c=BS.test(l)?l.replace(BS,"$1"):l;if(!c.match(/\S*Error: /)){for(const u of t){const d=u(c);if(d){i.push(d);break}}if(i.length>=DT+s)break}}return AV(i.slice(s))}}function PV(e){return Array.isArray(e)?LT(...e):e}function AV(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(Xc(t).function||"")&&t.pop(),t.reverse(),US.test(Xc(t).function||"")&&(t.pop(),US.test(Xc(t).function||"")&&t.pop()),t.slice(0,DT).map(n=>({...n,filename:n.filename||Xc(t).filename,function:n.function||Ja}))}function Xc(e){return e[e.length-1]||{}}const Im="<anonymous>";function Si(e){try{return!e||typeof e!="function"?Im:e.name||Im}catch{return Im}}function zS(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}}}function $T(e){return"__v_isVNode"in e&&e.__v_isVNode?"[VueVNode]":"[VueViewModel]"}const _d={},jS={};function oa(e,t){_d[e]=_d[e]||[],_d[e].push(t)}function la(e,t){if(!jS[e]){jS[e]=!0;try{t()}catch(n){Ve&&Pe.error(`Error while instrumenting ${e}`,n)}}}function Jr(e,t){const n=e&&_d[e];if(n)for(const r of n)try{r(t)}catch(s){Ve&&Pe.error(`Error while triggering instrumentation handler.
18
+ Type: ${e}
19
+ Name: ${Si(r)}
20
+ Error:`,s)}}let Rm=null;function FT(e){const t="error";oa(t,e),la(t,OV)}function OV(){Rm=ct.onerror,ct.onerror=function(e,t,n,r,s){return Jr("error",{column:r,error:s,line:n,msg:e,url:t}),Rm?Rm.apply(this,arguments):!1},ct.onerror.__SENTRY_INSTRUMENTED__=!0}let Pm=null;function NT(e){const t="unhandledrejection";oa(t,e),la(t,DV)}function DV(){Pm=ct.onunhandledrejection,ct.onunhandledrejection=function(e){return Jr("unhandledrejection",e),Pm?Pm.apply(this,arguments):!0},ct.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const MT=Object.prototype.toString;function Hy(e){switch(MT.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return wi(e,Error)}}function Tl(e,t){return MT.call(e)===`[object ${t}]`}function VT(e){return Tl(e,"ErrorEvent")}function HS(e){return Tl(e,"DOMError")}function LV(e){return Tl(e,"DOMException")}function ui(e){return Tl(e,"String")}function qy(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Qo(e){return e===null||qy(e)||typeof e!="object"&&typeof e!="function"}function Fu(e){return Tl(e,"Object")}function bp(e){return typeof Event<"u"&&wi(e,Event)}function $V(e){return typeof Element<"u"&&wi(e,Element)}function FV(e){return Tl(e,"RegExp")}function Il(e){return!!(e?.then&&typeof e.then=="function")}function NV(e){return Fu(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function wi(e,t){try{return e instanceof t}catch{return!1}}function BT(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue||e.__v_isVNode))}function Wy(e){return typeof Request<"u"&&wi(e,Request)}const Gy=ct,MV=80;function yr(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,s=[];let i=0,a=0;const o=" > ",l=o.length;let c;const u=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||MV;for(;n&&i++<r&&(c=VV(n,u),!(c==="html"||i>1&&a+s.length*l+c.length>=d));)s.push(c),a+=c.length,n=n.parentNode;return s.reverse().join(o)}catch{return"<unknown>"}}function VV(e,t){const n=e,r=[];if(!n?.tagName)return"";if(Gy.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?.length?t.filter(a=>n.getAttribute(a)).map(a=>[a,n.getAttribute(a)]):null;if(s?.length)s.forEach(a=>{r.push(`[${a[0]}="${a[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const a=n.className;if(a&&ui(a)){const o=a.split(/\s+/);for(const l of o)r.push(`.${l}`)}}const i=["aria-label","type","name","title","alt"];for(const a of i){const o=n.getAttribute(a);o&&r.push(`[${a}="${o}"]`)}return r.join("")}function Rl(){try{return Gy.document.location.href}catch{return""}}function UT(e){if(!Gy.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}function dr(e,t,n){if(!(t in e))return;const r=e[t];if(typeof r!="function")return;const s=n(r);typeof s=="function"&&zT(s,r);try{e[t]=s}catch{Ve&&Pe.log(`Failed to replace method "${t}" in object`,e)}}function br(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{Ve&&Pe.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function zT(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,br(e,"__sentry_original__",t)}catch{}}function Ky(e){return e.__sentry_original__}function jT(e){if(Hy(e))return{message:e.message,name:e.name,stack:e.stack,...WS(e)};if(bp(e)){const t={type:e.type,target:qS(e.target),currentTarget:qS(e.currentTarget),...WS(e)};return typeof CustomEvent<"u"&&wi(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function qS(e){try{return $V(e)?yr(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function WS(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 BV(e){const t=Object.keys(jT(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}function Lg(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function GS(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const s=e[r];try{BT(s)?n.push($T(s)):n.push(String(s))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function kd(e,t,n=!1){return ui(e)?FV(t)?t.test(e):ui(t)?n?e===t:e.includes(t):!1:!1}function ci(e,t=[],n=!1){return t.some(r=>kd(e,r,n))}function UV(){const e=ct;return e.crypto||e.msCrypto}let Am;function zV(){return Math.random()*16}function Dr(e=UV()){try{if(e?.randomUUID)return e.randomUUID().replace(/-/g,"")}catch{}return Am||(Am="10000000100040008000"+1e11),Am.replace(/[018]/g,t=>(t^(zV()&15)>>t/4).toString(16))}function HT(e){return e.exception?.values?.[0]}function _a(e){const{message:t,event_id:n}=e;if(t)return t;const r=HT(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function $g(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 Zo(e,t){const n=HT(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?.data,...t.data};n.mechanism.data=i}}function KS(e){if(jV(e))return!0;try{br(e,"__sentry_captured__",!0)}catch{}return!1}function jV(e){try{return e.__sentry_captured__}catch{}}const qT=1e3;function fo(){return Date.now()/qT}function HV(){const{performance:e}=ct;if(!e?.now||!e.timeOrigin)return fo;const t=e.timeOrigin;return()=>(t+e.now())/qT}let YS;function cn(){return(YS??(YS=HV()))()}let Om;function qV(){const{performance:e}=ct;if(!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,a=e.timing?.navigationStart,l=typeof a=="number"?Math.abs(a+n-r):t,c=l<t;return i||c?s<=l?[e.timeOrigin,"timeOrigin"]:[a,"navigationStart"]:[r,"dateNow"]}function Er(){return Om||(Om=qV()),Om[0]}function WV(e){const t=cn(),n={sid:Dr(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>KV(n)};return e&&el(n,e),n}function el(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||cn(),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:Dr()),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 GV(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),el(e,n)}function KV(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 _c(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]=_c(r[s],t[s],n-1));return r}function _i(){return Dr()}function di(){return Dr().substring(16)}const Fg="_sentrySpan";function tl(e,t){t?br(e,Fg,t):delete e[Fg]}function cf(e){return e[Fg]}const YV=100;class Bs{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:_i(),sampleRand:Math.random()}}clone(){const t=new Bs;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},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,tl(t,cf(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&&el(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.setTags({[t]:n})}setAttributes(t){return this._attributes={...this._attributes,...t},this._notifyScopeListeners(),this}setAttribute(t,n){return this.setAttributes({[t]:n})}removeAttribute(t){return t in this._attributes&&(delete this._attributes[t],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 Bs?n.getScopeData():Fu(n)?t:void 0,{tags:s,attributes:i,extra:a,user:o,contexts:l,level:c,fingerprint:u=[],propagationContext:d}=r||{};return this._tags={...this._tags,...s},this._attributes={...this._attributes,...i},this._extra={...this._extra,...a},this._contexts={...this._contexts,...l},o&&Object.keys(o).length&&(this._user=o),c&&(this._level=c),u.length&&(this._fingerprint=u),d&&(this._propagationContext=d),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,tl(this,void 0),this._attachments=[],this.setPropagationContext({traceId:_i(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:YV;if(r<=0)return this;const s={timestamp:fo(),...t,message:t.message?Lg(t.message,2048):t.message};return this._breadcrumbs.push(s),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client?.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,attributes:this._attributes,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:cf(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=_c(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n?.event_id||Dr();if(!this._client)return Ve&&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?.event_id||Dr();if(!this._client)return Ve&&Pe.warn("No client configured on scope - will not capture message!"),s;const i=r?.syntheticException??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?.event_id||Dr();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(Ve&&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 JV(){return Cl("defaultCurrentScope",()=>new Bs)}function XV(){return Cl("defaultIsolationScope",()=>new Bs)}class QV{constructor(t,n){let r;t?r=t:r=new Bs;let s;n?s=n:s=new Bs,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 Il(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 nl(){const e=co(),t=yp(e);return t.stack=t.stack||new QV(JV(),XV())}function ZV(e){return nl().withScope(e)}function eB(e,t){const n=nl();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function JS(e){return nl().withScope(()=>e(nl().getIsolationScope()))}function tB(){return{withIsolationScope:JS,withScope:ZV,withSetScope:eB,withSetIsolationScope:(e,t)=>JS(t),getCurrentScope:()=>nl().getScope(),getIsolationScope:()=>nl().getIsolationScope()}}function Pl(e){const t=yp(e);return t.acs?t.acs:tB()}function St(){const e=co();return Pl(e).getCurrentScope()}function Ws(){const e=co();return Pl(e).getIsolationScope()}function WT(){return Cl("globalScope",()=>new Bs)}function Sp(...e){const t=co(),n=Pl(t);if(e.length===2){const[r,s]=e;return r?n.withSetScope(r,s):n.withScope(s)}return n.withScope(e[0])}function at(){return St().getClient()}function nB(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:s}=t,i={trace_id:n,span_id:s||di()};return r&&(i.parent_span_id=r),i}const fr="sentry.source",Yy="sentry.sample_rate",GT="sentry.previous_trace_sample_rate",ki="sentry.op",en="sentry.origin",Nu="sentry.idle_span_finish_reason",kc="sentry.measurement_unit",xc="sentry.measurement_value",XS="sentry.custom_span_name",Jy="sentry.profile_id",Al="sentry.exclusive_time",rB="sentry.link.type",sB=0,Xy=1,xn=2;function iB(e){if(e<400&&e>=100)return{code:Xy};if(e>=400&&e<500)switch(e){case 401:return{code:xn,message:"unauthenticated"};case 403:return{code:xn,message:"permission_denied"};case 404:return{code:xn,message:"not_found"};case 409:return{code:xn,message:"already_exists"};case 413:return{code:xn,message:"failed_precondition"};case 429:return{code:xn,message:"resource_exhausted"};case 499:return{code:xn,message:"cancelled"};default:return{code:xn,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:xn,message:"unimplemented"};case 503:return{code:xn,message:"unavailable"};case 504:return{code:xn,message:"deadline_exceeded"};default:return{code:xn,message:"internal_error"}}return{code:xn,message:"internal_error"}}function KT(e,t){e.setAttribute("http.response.status_code",t);const n=iB(t);n.message!=="unknown_error"&&e.setStatus(n)}const YT="_sentryScope",JT="_sentryIsolationScope";function aB(e){try{const t=ct.WeakRef;if(typeof t=="function")return new t(e)}catch{}return e}function oB(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}function lB(e,t,n){e&&(br(e,JT,aB(n)),br(e,YT,t))}function df(e){const t=e;return{scope:t[YT],isolationScope:oB(t[JT])}}const Qy="sentry-",uB=/^sentry-/,cB=8192;function XT(e){const t=fB(e);if(!t)return;const n=Object.entries(t).reduce((r,[s,i])=>{if(s.match(uB)){const a=s.slice(Qy.length);r[a]=i}return r},{});if(Object.keys(n).length>0)return n}function dB(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,s])=>(s&&(n[`${Qy}${r}`]=s),n),{});return pB(t)}function fB(e){if(!(!e||!ui(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=QS(n);return Object.entries(r).forEach(([s,i])=>{t[s]=i}),t},{}):QS(e)}function QS(e){return e.split(",").map(t=>{const n=t.indexOf("=");if(n===-1)return[];const r=t.slice(0,n),s=t.slice(n+1);return[r,s].map(i=>{try{return decodeURIComponent(i.trim())}catch{return}})}).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function pB(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],s)=>{const i=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,a=s===0?i:`${t},${i}`;return a.length>cB?(Ve&&Pe.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):a},"")}const mB=/^o(\d+)\./,hB=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function gB(e){return e==="http"||e==="https"}function Ol(e,t=!1){const{host:n,path:r,pass:s,port:i,projectId:a,protocol:o,publicKey:l}=e;return`${o}://${l}${t&&s?`:${s}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${a}`}function vB(e){const t=hB.exec(e);if(!t){Pi(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,s="",i="",a="",o=""]=t.slice(1);let l="",c=o;const u=c.split("/");if(u.length>1&&(l=u.slice(0,-1).join("/"),c=u.pop()),c){const d=c.match(/^\d+/);d&&(c=d[0])}return QT({host:i,pass:s,path:l,projectId:c,port:a,protocol:n,publicKey:r})}function QT(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function yB(e){if(!Ve)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(a=>e[a]?!1:(Pe.error(`Invalid Sentry Dsn: ${a} missing`),!0))?!1:n.match(/^\d+$/)?gB(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 bB(e){return e.match(mB)?.[1]}function SB(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=bB(n)),r}function wB(e){const t=typeof e=="string"?vB(e):QT(e);if(!(!t||!yB(t)))return t}function Xa(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 ZT=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function _B(e){if(!e)return;const t=e.match(ZT);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 kB(e,t){const n=_B(e),r=XT(t);if(!n?.traceId)return{traceId:_i(),sampleRand:Math.random()};const s=xB(n,r);r&&(r.sample_rand=s.toString());const{traceId:i,parentSpanId:a,parentSampled:o}=n;return{traceId:i,parentSpanId:a,sampled:o,dsc:r||{},sampleRand:s}}function eI(e=_i(),t=di(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function tI(e=_i(),t=di(),n){return`00-${e}-${t}-${n?"01":"00"}`}function xB(e,t){const n=Xa(t?.sample_rand);if(n!==void 0)return n;const r=Xa(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?Math.random()*r:r+Math.random()*(1-r):Math.random()}const nI=0,Zy=1;let ZS=!1;function EB(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:s,parent_span_id:i,status:a,origin:o,links:l}=ft(e);return{parent_span_id:i,span_id:t,trace_id:n,data:r,op:s,status:a,origin:o,links:l}}function CB(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),s=r?t:ft(e).parent_span_id,i=df(e).scope,a=r?i?.getPropagationContext().propagationSpanId||di():t;return{parent_span_id:s,span_id:a,trace_id:n}}function TB(e){const{traceId:t,spanId:n}=e.spanContext(),r=ua(e);return eI(t,n,r)}function IB(e){const{traceId:t,spanId:n}=e.spanContext(),r=ua(e);return tI(t,n,r)}function rI(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===Zy,attributes:i,...s}))}function Fa(e){return typeof e=="number"?ew(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?ew(e.getTime()):cn()}function ew(e){return e>9999999999?e/1e3:e}function ft(e){if(PB(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(RB(e)){const{attributes:r,startTime:s,name:i,endTime:a,status:o,links:l}=e,c="parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0;return{span_id:t,trace_id:n,data:r,description:i,parent_span_id:c,start_timestamp:Fa(s),timestamp:Fa(a)||void 0,status:sI(o),op:r[ki],origin:r[en],links:rI(l)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function RB(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function PB(e){return typeof e.getSpanJSON=="function"}function ua(e){const{traceFlags:t}=e.spanContext();return t===Zy}function sI(e){if(!(!e||e.code===sB))return e.code===Xy?"ok":e.message||"internal_error"}const Na="_sentryChildSpans",Ng="_sentryRootSpan";function iI(e,t){const n=e[Ng]||e;br(t,Ng,n),e[Na]?e[Na].add(t):br(e,Na,new Set([t]))}function AB(e,t){e[Na]&&e[Na].delete(t)}function xd(e){const t=new Set;function n(r){if(!t.has(r)&&ua(r)){t.add(r);const s=r[Na]?Array.from(r[Na]):[];for(const i of s)n(i)}}return n(e),Array.from(t)}function Nn(e){return e[Ng]||e}function Un(){const e=co(),t=Pl(e);return t.getActiveSpan?t.getActiveSpan():cf(St())}function Mg(){ZS||(Pi(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),ZS=!0)}let tw=!1;function OB(){if(tw)return;function e(){const t=Un(),n=t&&Nn(t);if(n){const r="internal_error";Ve&&Pe.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:xn,message:r})}}e.tag="sentry_tracingErrorCallback",tw=!0,FT(e),NT(e)}function Xr(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||at()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function nw(e){Pe.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function ff(e,t){if(!t?.length||!e.description)return!1;for(const n of t){if(LB(n)){if(kd(e.description,n))return Ve&&nw(e),!0;continue}if(!n.name&&!n.op)continue;const r=n.name?kd(e.description,n.name):!0,s=n.op?e.op&&kd(e.op,n.op):!0;if(r&&s)return Ve&&nw(e),!0}return!1}function DB(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const s of e)s.parent_span_id===r&&(s.parent_span_id=n)}function LB(e){return typeof e=="string"||e instanceof RegExp}const eb="production",aI="_frozenDsc";function Ed(e,t){br(e,aI,t)}function oI(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},s={environment:n.environment||eb,release:n.release,public_key:r,trace_id:e,org_id:SB(t)};return t.emit("createDsc",s),s}function lI(e,t){const n=t.getPropagationContext();return n.dsc||oI(n.traceId,e)}function xi(e){const t=at();if(!t)return{};const n=Nn(e),r=ft(n),s=r.data,i=n.spanContext().traceState,a=i?.get("sentry.sample_rate")??s[Yy]??s[GT];function o(v){return(typeof a=="number"||typeof a=="string")&&(v.sample_rate=`${a}`),v}const l=n[aI];if(l)return o(l);const c=i?.get("sentry.dsc"),u=c&&XT(c);if(u)return o(u);const d=oI(e.spanContext().traceId,t),p=s[fr],m=r.description;return p!=="url"&&m&&(d.transaction=m),Xr()&&(d.sampled=String(ua(n)),d.sample_rand=i?.get("sentry.sample_rand")??df(n).scope?.getPropagationContext().sampleRand.toString()),o(d),t.emit("createDsc",d,n),d}class Zi{constructor(t={}){this._traceId=t.traceId||_i(),this._spanId=t.spanId||di()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:nI}}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 as(e,t=100,n=1/0){try{return Vg("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function uI(e,t=3,n=100*1024){const r=as(e,t);return MB(r)>n?uI(e,t-1,n):r}function Vg(e,t,n=1/0,r=1/0,s=VB()){const[i,a]=s;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const o=$B(e,t);if(!o.startsWith("[object "))return o;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 o.replace("object ","");if(i(t))return"[Circular ~]";const c=t;if(c&&typeof c.toJSON=="function")try{const m=c.toJSON();return Vg("",m,l-1,r,s)}catch{}const u=Array.isArray(t)?[]:{};let d=0;const p=jT(t);for(const m in p){if(!Object.prototype.hasOwnProperty.call(p,m))continue;if(d>=r){u[m]="[MaxProperties ~]";break}const v=p[m];u[m]=Vg(m,v,l-1,r,s),d++}return a(t),u}function $B(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(BT(t))return $T(t);if(NV(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${Si(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=FB(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function FB(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function NB(e){return~-encodeURI(e).split(/%..|./).length}function MB(e){return NB(JSON.stringify(e))}function VB(){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 ca(e,t=[]){return[e,t]}function BB(e,t){const[n,r]=e;return[n,[...r,t]]}function rw(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 Bg(e){const t=yp(ct);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function UB(e){const[t,n]=e;let r=JSON.stringify(t);function s(i){typeof r=="string"?r=typeof i=="string"?r+i:[Bg(r),i]:r.push(typeof i=="string"?Bg(i):i)}for(const i of n){const[a,o]=i;if(s(`
21
+ ${JSON.stringify(a)}
22
+ `),typeof o=="string"||o instanceof Uint8Array)s(o);else{let l;try{l=JSON.stringify(o)}catch{l=JSON.stringify(as(o))}s(l)}}return typeof r=="string"?r:zB(r)}function zB(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 jB(e){return[{type:"span"},e]}function HB(e){const t=typeof e.data=="string"?Bg(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const qB={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",metric:"metric",trace_metric:"metric"};function sw(e){return qB[e]}function tb(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function cI(e,t,n,r){const s=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Ol(r)},...s&&{trace:s}}}function WB(e,t){if(!t)return e;const n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0},e}function GB(e,t,n,r){const s=tb(n),i={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:Ol(t)}},a="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return ca(i,[a])}function KB(e,t,n,r){const s=tb(n),i=e.type&&e.type!=="replay_event"?e.type:"event";WB(e,n?.sdk);const a=cI(e,s,r,t);return delete e.sdkProcessingMetadata,ca(a,[[{type:i},e]])}function YB(e,t){function n(m){return!!m.trace_id&&!!m.public_key}const r=xi(e[0]),s=t?.getDsn(),i=t?.getOptions().tunnel,a={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!i&&s&&{dsn:Ol(s)}},{beforeSendSpan:o,ignoreSpans:l}=t?.getOptions()||{},c=l?.length?e.filter(m=>!ff(ft(m),l)):e,u=e.length-c.length;u&&t?.recordDroppedEvent("before_send","span",u);const d=o?m=>{const v=ft(m),g=o(v);return g||(Mg(),v)}:ft,p=[];for(const m of c){const v=d(m);v&&p.push(jB(v))}return ca(a,p)}function JB(e){if(!Ve)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=ft(e),{spanId:s}=e.spanContext(),i=ua(e),a=Nn(e),o=a===e,l=`[Tracing] Starting ${i?"sampled":"unsampled"} ${o?"root ":""}span`,c=[`op: ${n}`,`name: ${t}`,`ID: ${s}`];if(r&&c.push(`parent ID: ${r}`),!o){const{op:u,description:d}=ft(a);c.push(`root ID: ${a.spanContext().spanId}`),u&&c.push(`root op: ${u}`),d&&c.push(`root description: ${d}`)}Pe.log(`${l}
23
+ ${c.join(`
24
+ `)}`)}function XB(e){if(!Ve)return;const{description:t="< unknown name >",op:n="< unknown op >"}=ft(e),{spanId:r}=e.spanContext(),i=Nn(e)===e,a=`[Tracing] Finishing "${n}" ${i?"root ":""}span "${t}" with ID ${r}`;Pe.log(a)}function QB(e,t,n,r=Un()){const s=r&&Nn(r);s&&(Ve&&Pe.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),s.addEvent(e,{[xc]:t,[kc]:n}))}function iw(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},s=r[kc],i=r[xc];typeof s=="string"&&typeof i=="number"&&(t[n.name]={value:i,unit:s})}),t}const aw=1e3;class wp{constructor(t={}){this._traceId=t.traceId||_i(),this._spanId=t.spanId||di(),this._startTime=t.startTimestamp||cn(),this._links=t.links,this._attributes={},this.setAttributes({[en]:"manual",[ki]: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?Zy:nI}}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=Fa(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(fr,"custom"),this}end(t){this._endTime||(this._endTime=Fa(t),XB(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[ki],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:sI(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[en],profile_id:this._attributes[Jy],exclusive_time:this._attributes[Al],measurements:iw(this._events),is_segment:this._isStandaloneSpan&&Nn(this)===this||void 0,segment_id:this._isStandaloneSpan?Nn(this).spanContext().spanId:void 0,links:rI(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){Ve&&Pe.log("[Tracing] Adding an event to span:",t);const s=ow(n)?n:r||cn(),i=ow(n)?{}:n||{},a={name:t,time:Fa(s),attributes:i};return this._events.push(a),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=at();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===Nn(this)))return;if(this._isStandaloneSpan){this._sampled?e3(YB([this],t)):(Ve&&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&&(df(this).scope||St()).captureEvent(r)}_convertSpanToTransaction(){if(!lw(ft(this)))return;this._name||(Ve&&Pe.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=df(this),r=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;const i=xd(this).filter(u=>u!==this&&!ZB(u)).map(u=>ft(u)).filter(lw),a=this._attributes[fr];delete this._attributes[XS],i.forEach(u=>{delete u.data[XS]});const o={contexts:{trace:EB(this)},spans:i.length>aw?i.sort((u,d)=>u.start_timestamp-d.start_timestamp).slice(0,aw):i,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:xi(this)},request:r,...a&&{transaction_info:{source:a}}},l=iw(this._events);return l&&Object.keys(l).length&&(Ve&&Pe.log("[Measurements] Adding measurements to transaction event",JSON.stringify(l,void 0,2)),o.measurements=l),o}}function ow(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function lw(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function ZB(e){return e instanceof wp&&e.isStandaloneSpan()}function e3(e){const t=at();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function t3(e,t,n=()=>{},r=()=>{}){let s;try{s=e()}catch(i){throw t(i),n(),i}return n3(s,t,n,r)}function n3(e,t,n,r){return Il(e)?e.then(s=>(n(),r(s),s),s=>{throw t(s),n(),s}):(n(),r(e),e)}function r3(e,t,n){if(!Xr(e))return[!1];let r,s;typeof e.tracesSampler=="function"?(s=e.tracesSampler({...t,inheritOrSampleWith:o=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):o}),r=!0):t.parentSampled!==void 0?s=t.parentSampled:typeof e.tracesSampleRate<"u"&&(s=e.tracesSampleRate,r=!0);const i=Xa(s);if(i===void 0)return Ve&&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 Ve&&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 a=n<i;return a||Ve&&Pe.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(s)})`),[a,i,r]}const dI="__SENTRY_SUPPRESS_TRACING__";function s3(e,t){const n=rb();if(n.startSpan)return n.startSpan(e,t);const r=pI(e),{forceTransaction:s,parentSpan:i,scope:a}=e,o=a?.clone();return Sp(o,()=>a3(i)(()=>{const c=St(),u=mI(c,i),p=e.onlyIfParent&&!u?new Zi:fI({parentSpan:u,spanArguments:r,forceTransaction:s,scope:c});return tl(c,p),t3(()=>t(p),()=>{const{status:m}=ft(p);p.isRecording()&&(!m||m==="ok")&&p.setStatus({code:xn,message:"internal_error"})},()=>{p.end()})}))}function ea(e){const t=rb();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=pI(e),{forceTransaction:r,parentSpan:s}=e;return(e.scope?a=>Sp(e.scope,a):s!==void 0?a=>nb(s,a):a=>a())(()=>{const a=St(),o=mI(a,s);return e.onlyIfParent&&!o?new Zi:fI({parentSpan:o,spanArguments:n,forceTransaction:r,scope:a})})}function nb(e,t){const n=rb();return n.withActiveSpan?n.withActiveSpan(e,t):Sp(r=>(tl(r,e||void 0),t(r)))}function fI({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!Xr()){const a=new Zi;if(n||!e){const o={sampled:"false",sample_rate:"0",transaction:t.name,...xi(a)};Ed(a,o)}return a}const s=Ws();let i;if(e&&!n)i=i3(e,r,t),iI(e,i);else if(e){const a=xi(e),{traceId:o,spanId:l}=e.spanContext(),c=ua(e);i=uw({traceId:o,parentSpanId:l,...t},r,c),Ed(i,a)}else{const{traceId:a,dsc:o,parentSpanId:l,sampled:c}={...s.getPropagationContext(),...r.getPropagationContext()};i=uw({traceId:a,parentSpanId:l,...t},r,c),o&&Ed(i,o)}return JB(i),lB(i,r,s),i}function pI(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=Fa(e.startTime),delete r.startTime,r}return n}function rb(){const e=co();return Pl(e)}function uw(e,t,n){const r=at(),s=r?.getOptions()||{},{name:i=""}=e,a={spanAttributes:{...e.attributes},spanName:i,parentSampled:n};r?.emit("beforeSampling",a,{decision:!1});const o=a.parentSampled??n,l=a.spanAttributes,c=t.getPropagationContext(),[u,d,p]=t.getScopeData().sdkProcessingMetadata[dI]?[!1]:r3(s,{name:i,parentSampled:o,attributes:l,parentSampleRate:Xa(c.dsc?.sample_rate)},c.sampleRand),m=new wp({...e,attributes:{[fr]:"custom",[Yy]:d!==void 0&&p?d:void 0,...l},sampled:u});return!u&&r&&(Ve&&Pe.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate","transaction")),r&&r.emit("spanStart",m),m}function i3(e,t,n){const{spanId:r,traceId:s}=e.spanContext(),i=t.getScopeData().sdkProcessingMetadata[dI]?!1:ua(e),a=i?new wp({...n,parentSpanId:r,traceId:s,sampled:i}):new Zi({traceId:s});iI(e,a);const o=at();return o&&(o.emit("spanStart",a),n.endTimestamp&&o.emit("spanEnd",a)),a}function mI(e,t){if(t)return t;if(t===null)return;const n=cf(e);if(!n)return;const r=at();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?Nn(n):n}function a3(e){return e!==void 0?t=>nb(e,t):t=>t()}const Cd={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},o3="heartbeatFailed",l3="idleTimeout",u3="finalTimeout",c3="externalFinish";function hI(e,t={}){const n=new Map;let r=!1,s,i=c3,a=!t.disableAutoFinish;const o=[],{idleTimeout:l=Cd.idleTimeout,finalTimeout:c=Cd.finalTimeout,childSpanTimeout:u=Cd.childSpanTimeout,beforeSpanEnd:d,trimIdleSpanEndTimestamp:p=!0}=t,m=at();if(!m||!Xr()){const C=new Zi,E={sample_rate:"0",sampled:"false",...xi(C)};return Ed(C,E),C}const v=St(),g=Un(),b=d3(e);b.end=new Proxy(b.end,{apply(C,E,R){if(d&&d(b),E instanceof Zi)return;const[I,...O]=R,L=I||cn(),V=Fa(L),F=xd(b).filter(z=>z!==b),B=ft(b);if(!F.length||!p)return x(V),Reflect.apply(C,E,[V,...O]);const M=m.getOptions().ignoreSpans,N=F?.reduce((z,K)=>{const H=ft(K);return!H.timestamp||M&&ff(H,M)?z:z?Math.max(z,H.timestamp):H.timestamp},void 0),D=B.start_timestamp,W=Math.min(D?D+c/1e3:1/0,Math.max(D||-1/0,Math.min(V,N||1/0)));return x(W),Reflect.apply(C,E,[W,...O])}});function y(){s&&(clearTimeout(s),s=void 0)}function w(C){y(),s=setTimeout(()=>{!r&&n.size===0&&a&&(i=l3,b.end(C))},l)}function _(C){s=setTimeout(()=>{!r&&a&&(i=o3,b.end(C))},u)}function T(C){y(),n.set(C,!0);const E=cn();_(E+u/1e3)}function P(C){if(n.has(C)&&n.delete(C),n.size===0){const E=cn();w(E+l/1e3)}}function x(C){r=!0,n.clear(),o.forEach(F=>F()),tl(v,g);const E=ft(b),{start_timestamp:R}=E;if(!R)return;E.data[Nu]||b.setAttribute(Nu,i);const O=E.status;(!O||O==="unknown")&&b.setStatus({code:Xy}),Pe.log(`[Tracing] Idle span "${E.op}" finished`);const L=xd(b).filter(F=>F!==b);let V=0;L.forEach(F=>{F.isRecording()&&(F.setStatus({code:xn,message:"cancelled"}),F.end(C),Ve&&Pe.log("[Tracing] Cancelling span since span ended early",JSON.stringify(F,void 0,2)));const B=ft(F),{timestamp:M=0,start_timestamp:N=0}=B,D=N<=C,W=(c+l)/1e3,z=M-N<=W;if(Ve){const K=JSON.stringify(F,void 0,2);D?z||Pe.log("[Tracing] Discarding span since it finished after idle span final timeout",K):Pe.log("[Tracing] Discarding span since it happened after idle span was finished",K)}(!z||!D)&&(AB(b,F),V++)}),V>0&&b.setAttribute("sentry.idle_span_discarded_spans",V)}return o.push(m.on("spanStart",C=>{if(r||C===b||ft(C).timestamp||C instanceof wp&&C.isStandaloneSpan())return;xd(b).includes(C)&&T(C.spanContext().spanId)})),o.push(m.on("spanEnd",C=>{r||P(C.spanContext().spanId)})),o.push(m.on("idleSpanEnableAutoFinish",C=>{C===b&&(a=!0,w(),n.size&&_())})),t.disableAutoFinish||w(),setTimeout(()=>{r||(b.setStatus({code:xn,message:"deadline_exceeded"}),i=u3,b.end())},c),b}function d3(e){const t=ea(e);return tl(St(),t),Ve&&Pe.log("[Tracing] Started span is an idle span"),t}const Dm=0,cw=1,dw=2;function _p(e){return new Mu(t=>{t(e)})}function sb(e){return new Mu((t,n)=>{n(e)})}class Mu{constructor(t){this._state=Dm,this._handlers=[],this._runExecutor(t)}then(t,n){return new Mu((r,s)=>{this._handlers.push([!1,i=>{if(!t)r(i);else try{r(t(i))}catch(a){s(a)}},i=>{if(!n)s(i);else try{r(n(i))}catch(a){s(a)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new Mu((n,r)=>{let s,i;return this.then(a=>{i=!1,s=a,t&&t()},a=>{i=!0,s=a,t&&t()}).then(()=>{if(i){r(s);return}n(s)})})}_executeHandlers(){if(this._state===Dm)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===cw&&n[1](this._value),this._state===dw&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(i,a)=>{if(this._state===Dm){if(Il(a)){a.then(r,s);return}this._state=i,this._value=a,this._executeHandlers()}},r=i=>{n(cw,i)},s=i=>{n(dw,i)};try{t(r,s)}catch(i){s(i)}}}function f3(e,t,n,r=0){try{const s=Ug(t,n,e,r);return Il(s)?s:_p(s)}catch(s){return sb(s)}}function Ug(e,t,n,r){const s=n[r];if(!e||!s)return e;const i=s({...e},t);return Ve&&i===null&&Pe.log(`Event processor "${s.id||"?"}" dropped event`),Il(i)?i.then(a=>Ug(a,t,n,r+1)):Ug(i,t,n,r+1)}function p3(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:i}=t;m3(e,t),r&&v3(e,r),y3(e,n),h3(e,s),g3(e,i)}function fw(e,t){const{extra:n,tags:r,attributes:s,user:i,contexts:a,level:o,sdkProcessingMetadata:l,breadcrumbs:c,fingerprint:u,eventProcessors:d,attachments:p,propagationContext:m,transactionName:v,span:g}=t;Xl(e,"extra",n),Xl(e,"tags",r),Xl(e,"attributes",s),Xl(e,"user",i),Xl(e,"contexts",a),e.sdkProcessingMetadata=_c(e.sdkProcessingMetadata,l,2),o&&(e.level=o),v&&(e.transactionName=v),g&&(e.span=g),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),p.length&&(e.attachments=[...e.attachments,...p]),e.propagationContext={...e.propagationContext,...m}}function Xl(e,t,n){e[t]=_c(e[t],n,1)}function m3(e,t){const{extra:n,tags:r,user:s,contexts:i,level:a,transactionName:o}=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}),a&&(e.level=a),o&&e.type!=="transaction"&&(e.transaction=o)}function h3(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function g3(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function v3(e,t){e.contexts={trace:CB(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:xi(t),...e.sdkProcessingMetadata};const n=Nn(t),r=ft(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function y3(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}let va,pw,mw,Di;function b3(e){const t=ct._sentryDebugIds,n=ct._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],s=n?Object.keys(n):[];if(Di&&r.length===pw&&s.length===mw)return Di;pw=r.length,mw=s.length,Di={},va||(va={});const i=(a,o)=>{for(const l of a){const c=o[l],u=va?.[l];if(u&&Di&&c)Di[u[0]]=c,va&&(va[l]=[u[0],c]);else if(c){const d=e(l);for(let p=d.length-1;p>=0;p--){const v=d[p]?.filename;if(v&&Di&&va){Di[v]=c,va[l]=[v,c];break}}}}};return t&&i(r,t),n&&i(s,n),Di}function gI(e,t,n,r,s,i){const{normalizeDepth:a=3,normalizeMaxBreadth:o=1e3}=e,l={...t,event_id:t.event_id||n.event_id||Dr(),timestamp:t.timestamp||fo()},c=n.integrations||e.integrations.map(b=>b.name);S3(l,e),k3(l,c),s&&s.emit("applyFrameMetadata",t),t.type===void 0&&w3(l,e.stackParser);const u=E3(r,n.captureContext);n.mechanism&&Zo(l,n.mechanism);const d=s?s.getEventProcessors():[],p=WT().getScopeData();if(i){const b=i.getScopeData();fw(p,b)}if(u){const b=u.getScopeData();fw(p,b)}const m=[...n.attachments||[],...p.attachments];m.length&&(n.attachments=m),p3(l,p);const v=[...d,...p.eventProcessors];return f3(v,l,n).then(b=>(b&&_3(b),typeof a=="number"&&a>0?x3(b,a,o):b))}function S3(e,t){const{environment:n,release:r,dist:s,maxValueLength:i}=t;e.environment=e.environment||n||eb,!e.release&&r&&(e.release=r),!e.dist&&s&&(e.dist=s);const a=e.request;a?.url&&i&&(a.url=Lg(a.url,i)),i&&e.exception?.values?.forEach(o=>{o.value&&(o.value=Lg(o.value,i))})}function w3(e,t){const n=b3(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(s=>{s.filename&&(s.debug_id=n[s.filename])})})}function _3(e){const t={};if(e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(s=>{s.debug_id&&(s.abs_path?t[s.abs_path]=s.debug_id:s.filename&&(t[s.filename]=s.debug_id),delete s.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(([r,s])=>{n.push({type:"sourcemap",code_file:r,debug_id:s})})}function k3(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function x3(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(s=>({...s,...s.data&&{data:as(s.data,t,n)}}))},...e.user&&{user:as(e.user,t,n)},...e.contexts&&{contexts:as(e.contexts,t,n)},...e.extra&&{extra:as(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=as(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(s=>({...s,...s.data&&{data:as(s.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=as(e.contexts.flags,3,n)),r}function E3(e,t){if(!t)return e;const n=e?e.clone():new Bs;return n.update(t),n}function C3(e){if(e)return T3(e)?{captureContext:e}:R3(e)?{captureContext:e}:e}function T3(e){return e instanceof Bs||typeof e=="function"}const I3=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function R3(e){return Object.keys(e).some(t=>I3.includes(t))}function ds(e,t){return St().captureException(e,C3(t))}function vI(e,t){return St().captureEvent(e,t)}function P3(e,t){Ws().setContext(e,t)}function A3(){const e=at();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function O3(e){Ws().addEventProcessor(e)}function hw(e){const t=Ws(),n=St(),{userAgent:r}=ct.navigator||{},s=WV({user:n.getUser()||t.getUser(),...r&&{userAgent:r},...e}),i=t.getSession();return i?.status==="ok"&&el(i,{status:"exited"}),yI(),t.setSession(s),s}function yI(){const e=Ws(),n=St().getSession()||e.getSession();n&&GV(n),bI(),e.setSession()}function bI(){const e=Ws(),t=at(),n=e.getSession();n&&t&&t.captureSession(n)}function gw(e=!1){if(e){yI();return}bI()}const D3="7";function L3(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function $3(e){return`${L3(e)}${e.projectId}/envelope/`}function F3(e,t){const n={sentry_version:D3};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function N3(e,t,n){return t||`${$3(e)}?${F3(e,n)}`}const vw=[];function M3(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 V3(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 M3(r)}function B3(e,t){const n={};return t.forEach(r=>{r&&SI(e,r,n)}),n}function yw(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function SI(e,t,n){if(n[t.name]){Ve&&Pe.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!vw.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),vw.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,a)=>r(i,a,e),{id:t.name});e.addEventProcessor(s)}Ve&&Pe.log(`Integration installed: ${t.name}`)}function U3(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function z3(e,t,n,r){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=Ol(r)),ca(s,[U3(e)])}function wI(e,t){const n=t??j3(e)??[];if(n.length===0)return;const r=e.getOptions(),s=z3(n,r._metadata,r.tunnel,e.getDsn());_I().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(s)}function j3(e){return _I().get(e)}function _I(){return Cl("clientToLogBufferMap",()=>new WeakMap)}function H3(e){return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:e}]}function q3(e,t,n,r){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=Ol(r)),ca(s,[H3(e)])}function kI(e,t){const n=t??W3(e)??[];if(n.length===0)return;const r=e.getOptions(),s=q3(n,r._metadata,r.tunnel,e.getDsn());xI().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(s)}function W3(e){return xI().get(e)}function xI(){return Cl("clientToMetricBufferMap",()=>new WeakMap)}const ib=Symbol.for("SentryBufferFullError");function ab(e=100){const t=new Set;function n(){return t.size<e}function r(a){t.delete(a)}function s(a){if(!n())return sb(ib);const o=a();return t.add(o),o.then(()=>r(o),()=>r(o)),o}function i(a){if(!t.size)return _p(!0);const o=Promise.allSettled(Array.from(t)).then(()=>!0);if(!a)return o;const l=[o,new Promise(c=>setTimeout(()=>c(!1),a))];return Promise.race(l)}return{get $(){return Array.from(t)},add:s,drain:i}}const G3=60*1e3;function K3(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?G3:r-t}function Y3(e,t){return e[t]||e.all||0}function EI(e,t,n=Date.now()){return Y3(e,t)>n}function CI(e,{statusCode:t,headers:n},r=Date.now()){const s={...e},i=n?.["x-sentry-rate-limits"],a=n?.["retry-after"];if(i)for(const o of i.trim().split(",")){const[l,c,,,u]=o.split(":",5),d=parseInt(l,10),p=(isNaN(d)?60:d)*1e3;if(!c)s.all=r+p;else for(const m of c.split(";"))m==="metric_bucket"?(!u||u.split(";").includes("custom"))&&(s[m]=r+p):s[m]=r+p}else a?s.all=r+K3(a,r):t===429&&(s.all=r+60*1e3);return s}const TI=64;function J3(e,t,n=ab(e.bufferSize||TI)){let r={};const s=a=>n.drain(a);function i(a){const o=[];if(rw(a,(d,p)=>{const m=sw(p);EI(r,m)?e.recordDroppedEvent("ratelimit_backoff",m):o.push(d)}),o.length===0)return Promise.resolve({});const l=ca(a[0],o),c=d=>{rw(l,(p,m)=>{e.recordDroppedEvent(d,sw(m))})},u=()=>t({body:UB(l)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&Ve&&Pe.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=CI(r,d),d),d=>{throw c("network_error"),Ve&&Pe.error("Encountered error running transport request:",d),d});return n.add(u).then(d=>d,d=>{if(d===ib)return Ve&&Pe.error("Skipped sending event because buffer is full."),c("queue_overflow"),Promise.resolve({});throw d})}return{send:i,flush:s}}function X3(e,t,n){const r=[{type:"client_report"},{timestamp:fo(),discarded_events:e}];return ca(t?{dsn:t}:{},[r])}function II(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function Q3(e){const{trace_id:t,parent_span_id:n,span_id:r,status:s,origin:i,data:a,op:o}=e.contexts?.trace??{};return{data:a??{},description:e.transaction,op:o,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:a?.[Jy],exclusive_time:a?.[Al],measurements:e.measurements,is_segment:!0}}function Z3(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&&{[Jy]:e.profile_id},...e.exclusive_time&&{[Al]:e.exclusive_time}}}},measurements:e.measurements}}const bw="Not capturing exception because it's already been captured.",Sw="Discarded session because of missing or non-string release",RI=Symbol.for("SentryInternalError"),PI=Symbol.for("SentryDoNotSendEventError"),eU=5e3;function Td(e){return{message:e,[RI]:!0}}function Lm(e){return{message:e,[PI]:!0}}function ww(e){return!!e&&typeof e=="object"&&RI in e}function _w(e){return!!e&&typeof e=="object"&&PI in e}function kw(e,t,n,r,s){let i=0,a,o=!1;e.on(n,()=>{i=0,clearTimeout(a),o=!1}),e.on(t,l=>{i+=r(l),i>=8e5?s(e):o||(o=!0,a=setTimeout(()=>{s(e)},eU))}),e.on("flush",()=>{s(e)})}class tU{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=ab(t.transportOptions?.bufferSize??TI),t.dsn?this._dsn=wB(t.dsn):Ve&&Pe.warn("No DSN provided, client will not send events."),this._dsn){const r=N3(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:r})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&kw(this,"afterCaptureLog","flushLogs",iU,wI),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&kw(this,"afterCaptureMetric","flushMetrics",sU,kI)}captureException(t,n,r){const s=Dr();if(KS(t))return Ve&&Pe.log(bw),s;const i={event_id:s,...n};return this._process(()=>this.eventFromException(t,i).then(a=>this._captureEvent(a,i,r)).then(a=>a),"error"),i.event_id}captureMessage(t,n,r,s){const i={event_id:Dr(),...r},a=qy(t)?t:String(t),o=Qo(t),l=o?this.eventFromMessage(a,n,i):this.eventFromException(t,i);return this._process(()=>l.then(c=>this._captureEvent(c,i,s)),o?"unknown":"error"),i.event_id}captureEvent(t,n,r){const s=Dr();if(n?.originalException&&KS(n.originalException))return Ve&&Pe.log(bw),s;const i={event_id:s,...n},a=t.sdkProcessingMetadata||{},o=a.capturedSpanScope,l=a.capturedSpanIsolationScope,c=xw(t.type);return this._process(()=>this._captureEvent(t,i,o||r,l),c),i.event_id}captureSession(t){this.sendSession(t),el(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){const n=this._transport;if(!n)return!0;this.emit("flush");const r=await this._isClientDoneProcessing(t),s=await n.flush(t);return r&&s}async close(t){const n=await this.flush(t);return 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];SI(this,t,this._integrations),n||yw(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=KB(t,this._dsn,this._options._metadata,this._options.tunnel);for(const s of n.attachments||[])r=BB(r,HB(s));this.sendEnvelope(r).then(s=>this.emit("afterSendEvent",t,s))}sendSession(t){const{release:n,environment:r=eb}=this._options;if("aggregates"in t){const i=t.attrs||{};if(!i.release&&!n){Ve&&Pe.warn(Sw);return}i.release=i.release||n,i.environment=i.environment||r,t.attrs=i}else{if(!t.release&&!n){Ve&&Pe.warn(Sw);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const s=GB(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}`;Ve&&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]||new Set,s=(...i)=>n(...i);return r.add(s),()=>{r.delete(s)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(s=>s(...n))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(n){return Ve&&Pe.error("Error while sending envelope:",n),{}}return Ve&&Pe.error("Transport disabled"),{}}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=B3(this,t),yw(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",s=!1;const i=n.exception?.values;if(i){s=!0,r=!1;for(const l of i)if(l.mechanism?.handled===!1){r=!0;break}}const a=t.status==="ok";(a&&t.errors===0||a&&r)&&(el(t,{...r&&{status:"crashed"},errors:t.errors||Number(s||r)}),this.captureSession(t))}async _isClientDoneProcessing(t){let n=0;for(;!t||n<t;){if(await new Promise(r=>setTimeout(r,1)),!this._numProcessing)return!0;n++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,s){const i=this.getOptions(),a=Object.keys(this._integrations);return!n.integrations&&a?.length&&(n.integrations=a),this.emit("preprocessEvent",t,n),t.type||s.setLastEventId(t.event_id||n.event_id),gI(i,t,n,r,this,s).then(o=>{if(o===null)return o;this.emit("postprocessEvent",o,n),o.contexts={trace:nB(r),...o.contexts};const l=lI(this,r);return o.sdkProcessingMetadata={dynamicSamplingContext:l,...o.sdkProcessingMetadata},o})}_captureEvent(t,n={},r=St(),s=Ws()){return Ve&&zg(t)&&Pe.log(`Captured error event \`${II(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,s).then(i=>i.event_id,i=>{Ve&&(_w(i)?Pe.log(i.message):ww(i)?Pe.warn(i.message):Pe.warn(i))})}_processEvent(t,n,r,s){const i=this.getOptions(),{sampleRate:a}=i,o=AI(t),l=zg(t),u=`before send for type \`${t.type||"error"}\``,d=typeof a>"u"?void 0:Xa(a);if(l&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error"),sb(Lm(`Discarding event because it's not included in the random sample (sampling rate = ${a})`));const p=xw(t.type);return this._prepareEvent(t,n,r,s).then(m=>{if(m===null)throw this.recordDroppedEvent("event_processor",p),Lm("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return m;const g=rU(this,i,m,n);return nU(g,u)}).then(m=>{if(m===null){if(this.recordDroppedEvent("before_send",p),o){const y=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",y)}throw Lm(`${u} returned \`null\`, will not send event.`)}const v=r.getSession()||s.getSession();if(l&&v&&this._updateSessionFromEvent(v,m),o){const b=m.sdkProcessingMetadata?.spanCountBeforeProcessing||0,y=m.spans?m.spans.length:0,w=b-y;w>0&&this.recordDroppedEvent("before_send","span",w)}const g=m.transaction_info;if(o&&g&&m.transaction!==t.transaction){const b="custom";m.transaction_info={...g,source:b}}return this.sendEvent(m,n),m}).then(null,m=>{throw _w(m)||ww(m)?m:(this.captureException(m,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:m}),Td(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
25
+ Reason: ${m}`))})}_process(t,n){this._numProcessing++,this._promiseBuffer.add(t).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===ib&&this.recordDroppedEvent("queue_overflow",n),r))}_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(){Ve&&Pe.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){Ve&&Pe.log("No outcomes to send");return}if(!this._dsn){Ve&&Pe.log("No dsn provided, will not send outcomes");return}Ve&&Pe.log("Sending outcomes:",t);const n=X3(t,this._options.tunnel&&Ol(this._dsn));this.sendEnvelope(n)}}function xw(e){return e==="replay_event"?"replay":e||"error"}function nU(e,t){const n=`${t} must return \`null\` or a valid event.`;if(Il(e))return e.then(r=>{if(!Fu(r)&&r!==null)throw Td(n);return r},r=>{throw Td(`${t} rejected with ${r}`)});if(!Fu(e)&&e!==null)throw Td(n);return e}function rU(e,t,n,r){const{beforeSend:s,beforeSendTransaction:i,beforeSendSpan:a,ignoreSpans:o}=t;let l=n;if(zg(l)&&s)return s(l,r);if(AI(l)){if(a||o){const c=Q3(l);if(o?.length&&ff(c,o))return null;if(a){const u=a(c);u?l=_c(n,Z3(u)):Mg()}if(l.spans){const u=[],d=l.spans;for(const m of d){if(o?.length&&ff(m,o)){DB(d,m);continue}if(a){const v=a(m);v?u.push(v):(Mg(),u.push(m))}else u.push(m)}const p=l.spans.length-u.length;p&&e.recordDroppedEvent("before_send","span",p),l.spans=u}}if(i){if(l.spans){const c=l.spans.length;l.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:c}}return i(l,r)}}return l}function zg(e){return e.type===void 0}function AI(e){return e.type==="transaction"}function sU(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+OI(e.attributes)}function iU(e){let t=0;return e.message&&(t+=e.message.length*2),t+OI(e.attributes)}function OI(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*Ew(n[0]):Qo(n)?t+=Ew(n):t+=100}),t}function Ew(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function aU(e,t){t.debug===!0&&(Ve?Pe.enable():Pi(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),St().update(t.initialScope);const r=new e(t);return oU(r),r.init(),r}function oU(e){St().setClient(e)}const lU="thismessage:/";function ob(e){return"isRelative"in e}function lb(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=n?lU: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 uU(e){if(ob(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 Ma(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 cU(e){return e.split(/[?#]/,1)[0]}function dU(e,t){const n=t?.getDsn(),r=t?.getOptions().tunnel;return pU(e,n)||fU(e,r)}function fU(e,t){return t?Cw(e)===Cw(t):!1}function pU(e,t){const n=lb(e);return!n||ob(n)?!1:t?n.host.includes(t.host)&&/(^|&|\?)sentry_key=/.test(n.search):!1}function Cw(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function mU(e){"aggregates"in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function DI(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:$a})),version:$a}),e._metadata=s}function LI(e={}){const t=e.client||at();if(!A3()||!t)return{};const n=co(),r=Pl(n);if(r.getTraceData)return r.getTraceData(e);const s=e.scope||St(),i=e.span||Un(),a=i?TB(i):hU(s),o=i?xi(i):lI(t,s),l=dB(o);if(!ZT.test(a))return Pe.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const u={"sentry-trace":a,baggage:l};return e.propagateTraceparent&&(u.traceparent=i?IB(i):gU(s)),u}function hU(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return eI(t,r,n)}function gU(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return tI(t,r,n)}function vU(e,t,n){let r,s,i;const a=n?.maxWait?Math.max(n.maxWait,t):0,o=n?.setTimeoutImpl||setTimeout;function l(){return c(),r=e(),r}function c(){s!==void 0&&clearTimeout(s),i!==void 0&&clearTimeout(i),s=i=void 0}function u(){return s!==void 0||i!==void 0?l():r}function d(){return s&&clearTimeout(s),s=o(l,t),a&&i===void 0&&(i=o(l,a)),r}return d.cancel=c,d.flush=u,d}const yU=100;function Ei(e,t){const n=at(),r=Ws();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:i=yU}=n.getOptions();if(i<=0)return;const o={timestamp:fo(),...e},l=s?Pi(()=>s(o,t)):o;l!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",l,t),r.addBreadcrumb(l,i))}let Tw;const bU="FunctionToString",Iw=new WeakMap,SU=(()=>({name:bU,setupOnce(){Tw=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Ky(this),n=Iw.has(at())&&t!==void 0?t:this;return Tw.apply(n,e)}}catch{}},setup(e){Iw.set(e,!0)}})),wU=SU,_U=[/^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$/],kU="EventFilters",xU=(e={})=>{let t;return{name:kU,setup(n){const r=n.getOptions();t=Rw(e,r)},processEvent(n,r,s){if(!t){const i=s.getOptions();t=Rw(e,i)}return CU(n,t)?null:n}}},EU=((e={})=>({...xU(e),name:"InboundFilters"}));function Rw(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:_U],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function CU(e,t){if(e.type){if(e.type==="transaction"&&IU(e,t.ignoreTransactions))return Ve&&Pe.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
26
+ Event: ${_a(e)}`),!0}else{if(TU(e,t.ignoreErrors))return Ve&&Pe.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
27
+ Event: ${_a(e)}`),!0;if(OU(e))return Ve&&Pe.warn(`Event dropped due to not having an error message, error type or stacktrace.
28
+ Event: ${_a(e)}`),!0;if(RU(e,t.denyUrls))return Ve&&Pe.warn(`Event dropped due to being matched by \`denyUrls\` option.
29
+ Event: ${_a(e)}.
30
+ Url: ${pf(e)}`),!0;if(!PU(e,t.allowUrls))return Ve&&Pe.warn(`Event dropped due to not being matched by \`allowUrls\` option.
31
+ Event: ${_a(e)}.
32
+ Url: ${pf(e)}`),!0}return!1}function TU(e,t){return t?.length?II(e).some(n=>ci(n,t)):!1}function IU(e,t){if(!t?.length)return!1;const n=e.transaction;return n?ci(n,t):!1}function RU(e,t){if(!t?.length)return!1;const n=pf(e);return n?ci(n,t):!1}function PU(e,t){if(!t?.length)return!0;const n=pf(e);return n?ci(n,t):!0}function AU(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 pf(e){try{const n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?AU(n):null}catch{return Ve&&Pe.error(`Cannot extract url for event ${_a(e)}`),null}}function OU(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function DU(e,t,n,r,s,i){if(!s.exception?.values||!i||!wi(i.originalException,Error))return;const a=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;a&&(s.exception.values=jg(e,t,r,i.originalException,n,s.exception.values,a,0))}function jg(e,t,n,r,s,i,a,o){if(i.length>=n+1)return i;let l=[...i];if(wi(r[s],Error)){Pw(a,o);const c=e(t,r[s]),u=l.length;Aw(c,s,u,o),l=jg(e,t,n,r[s],s,[c,...l],c,u)}return Array.isArray(r.errors)&&r.errors.forEach((c,u)=>{if(wi(c,Error)){Pw(a,o);const d=e(t,c),p=l.length;Aw(d,`errors[${u}]`,p,o),l=jg(e,t,n,c,s,[d,...l],d,p)}}),l}function Pw(e,t){e.mechanism={handled:!0,type:"auto.core.linked_errors",...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function Aw(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function LU(e){const t="console";oa(t,e),la(t,$U)}function $U(){"console"in ct&&kV.forEach(function(e){e in ct.console&&dr(ct.console,e,function(t){return uf[e]=t,function(...n){Jr("console",{args:n,level:e}),uf[e]?.apply(ct.console,n)}})})}function $I(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const FU="Dedupe",NU=(()=>{let e;return{name:FU,processEvent(t){if(t.type)return t;try{if(VU(t,e))return Ve&&Pe.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),MU=NU;function VU(e,t){return t?!!(BU(e,t)||UU(e,t)):!1}function BU(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!NI(e,t)||!FI(e,t))}function UU(e,t){const n=Ow(t),r=Ow(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!NI(e,t)||!FI(e,t))}function FI(e,t){let n=zS(e),r=zS(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],a=n[s];if(i.filename!==a.filename||i.lineno!==a.lineno||i.colno!==a.colno||i.function!==a.function)return!1}return!0}function NI(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 Ow(e){return e.exception?.values?.[0]}function zU(e,t,n,r,s){if(!e.fetchData)return;const{method:i,url:a}=e.fetchData,o=Xr()&&t(a);if(e.endTimestamp&&o){const m=e.fetchData.__span;if(!m)return;const v=r[m];v&&(qU(v,e),jU(v,e,s),delete r[m]);return}const{spanOrigin:l="auto.http.browser",propagateTraceparent:c=!1}=typeof s=="object"?s:{spanOrigin:s},u=!!Un(),d=o&&u?ea(GU(a,i,l)):new Zi;if(e.fetchData.__span=d.spanContext().spanId,r[d.spanContext().spanId]=d,n(e.fetchData.url)){const m=e.args[0],v=e.args[1]||{},g=HU(m,v,Xr()&&u?d:void 0,c);g&&(e.args[1]=v,v.headers=g)}const p=at();if(p){const m={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};p.emit("beforeOutgoingRequestSpan",d,m)}return d}function jU(e,t,n){(typeof n=="object"&&n!==null?n.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function HU(e,t,n,r){const s=LI({span:n,propagateTraceparent:r}),i=s["sentry-trace"],a=s.baggage,o=s.traceparent;if(!i)return;const l=t.headers||(Wy(e)?e.headers:void 0);if(l)if(WU(l)){const c=new Headers(l);if(c.get("sentry-trace")||c.set("sentry-trace",i),r&&o&&!c.get("traceparent")&&c.set("traceparent",o),a){const u=c.get("baggage");u?Qc(u)||c.set("baggage",`${u},${a}`):c.set("baggage",a)}return c}else if(Array.isArray(l)){const c=[...l];l.find(d=>d[0]==="sentry-trace")||c.push(["sentry-trace",i]),r&&o&&!l.find(d=>d[0]==="traceparent")&&c.push(["traceparent",o]);const u=l.find(d=>d[0]==="baggage"&&Qc(d[1]));return a&&!u&&c.push(["baggage",a]),c}else{const c="sentry-trace"in l?l["sentry-trace"]:void 0,u="traceparent"in l?l.traceparent:void 0,d="baggage"in l?l.baggage:void 0,p=d?Array.isArray(d)?[...d]:[d]:[],m=d&&(Array.isArray(d)?d.find(g=>Qc(g)):Qc(d));a&&!m&&p.push(a);const v={...l,"sentry-trace":c??i,baggage:p.length>0?p.join(","):void 0};return r&&o&&!u&&(v.traceparent=o),v}else return{...s}}function qU(e,t){if(t.response){KT(e,t.response.status);const n=t.response?.headers?.get("content-length");if(n){const r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus({code:xn,message:"internal_error"});e.end()}function Qc(e){return e.split(",").some(t=>t.trim().startsWith(Qy))}function WU(e){return typeof Headers<"u"&&wi(e,Headers)}function GU(e,t,n){const r=lb(e);return{name:r?`${t} ${uU(r)}`:t,attributes:KU(e,r,t,n)}}function KU(e,t,n,r){const s={url:e,type:"fetch","http.method":n,[en]:r,[ki]:"http.client"};return t&&(ob(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 MI(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const Vu=ct;function YU(){return"history"in Vu&&!!Vu.history}function JU(){if(!("fetch"in Vu))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function Hg(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function XU(){if(typeof EdgeRuntime=="string")return!0;if(!JU())return!1;if(Hg(Vu.fetch))return!0;let e=!1;const t=Vu.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=Hg(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){Ve&&Pe.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function VI(e,t){const n="fetch";oa(n,e),la(n,()=>BI(void 0,t))}function QU(e){const t="fetch-body-resolved";oa(t,e),la(t,()=>BI(e4))}function BI(e,t=!1){t&&!XU()||dr(ct,"fetch",function(n){return function(...r){const s=new Error,{method:i,url:a}=t4(r),o={args:r,fetchData:{method:i,url:a},startTimestamp:cn()*1e3,virtualError:s,headers:n4(r)};return e||Jr("fetch",{...o}),n.apply(ct,r).then(async l=>(e?e(l):Jr("fetch",{...o,endTimestamp:cn()*1e3,response:l}),l),l=>{if(Jr("fetch",{...o,endTimestamp:cn()*1e3,error:l}),Hy(l)&&l.stack===void 0&&(l.stack=s.stack,br(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 c=new URL(o.fetchData.url);l.message=`${l.message} (${c.host})`}catch{}throw l})}})}async function ZU(e,t){if(e?.body){const n=e.body,r=n.getReader(),s=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let i=!0;for(;i;){let a;try{a=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:o}=await r.read();clearTimeout(a),o&&(t(),i=!1)}catch{i=!1}finally{clearTimeout(a)}}clearTimeout(s),r.releaseLock(),n.cancel().then(null,()=>{})}}function e4(e){let t;try{t=e.clone()}catch{return}ZU(t,()=>{Jr("fetch-body-resolved",{endTimestamp:cn()*1e3,response:e})})}function Id(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Dw(e){return typeof e=="string"?e:e?Id(e,"url")?e.url:e.toString?e.toString():"":""}function t4(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:Dw(n),method:Id(r,"method")?String(r.method).toUpperCase():Wy(n)&&Id(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:Dw(t),method:Id(t,"method")?String(t.method).toUpperCase():"GET"}}function n4(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(Wy(t))return new Headers(t.headers)}catch{}}function r4(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function s4(){return"npm"}function i4(){return!r4()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function qg(){return typeof window<"u"&&(!i4()||a4())}function a4(){return ct.process?.type==="renderer"}const gt=ct;let Wg=0;function UI(){return Wg>0}function o4(){Wg++,setTimeout(()=>{Wg--})}function rl(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(Ky(e))return e}catch{return e}const r=function(...s){try{const i=s.map(a=>rl(a,t));return e.apply(this,i)}catch(i){throw o4(),Sp(a=>{a.addEventProcessor(o=>(t.mechanism&&($g(o,void 0),Zo(o,t.mechanism)),o.extra={...o.extra,arguments:s},o)),ds(i)}),i}};try{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}zT(r,e),br(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function ub(){const e=Rl(),{referrer:t}=gt.document||{},{userAgent:n}=gt.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}function cb(e,t){const n=db(e,t),r={type:f4(t),value:p4(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function l4(e,t,n,r){const i=at()?.getOptions().normalizeDepth,a=y4(t),o={__serialized__:uI(t,i)};if(a)return{exception:{values:[cb(e,a)]},extra:o};const l={exception:{values:[{type:bp(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:g4(t,{isUnhandledRejection:r})}]},extra:o};if(n){const c=db(e,n);c.length&&(l.exception.values[0].stacktrace={frames:c})}return l}function $m(e,t){return{exception:{values:[cb(e,t)]}}}function db(e,t){const n=t.stacktrace||t.stack||"",r=c4(t),s=d4(t);try{return e(n,r,s)}catch{}return[]}const u4=/Minified React error #\d+;/i;function c4(e){return e&&u4.test(e.message)?1:0}function d4(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function zI(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function f4(e){const t=e?.name;return!t&&zI(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function p4(e){const t=e?.message;return zI(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 m4(e,t,n,r){const s=n?.syntheticException||void 0,i=fb(e,t,s,r);return Zo(i),i.level="error",n?.event_id&&(i.event_id=n.event_id),_p(i)}function h4(e,t,n="info",r,s){const i=r?.syntheticException||void 0,a=Gg(e,t,i,s);return a.level=n,r?.event_id&&(a.event_id=r.event_id),_p(a)}function fb(e,t,n,r,s){let i;if(VT(t)&&t.error)return $m(e,t.error);if(HS(t)||LV(t)){const a=t;if("stack"in t)i=$m(e,t);else{const o=a.name||(HS(a)?"DOMError":"DOMException"),l=a.message?`${o}: ${a.message}`:o;i=Gg(e,l,n,r),$g(i,l)}return"code"in a&&(i.tags={...i.tags,"DOMException.code":`${a.code}`}),i}return Hy(t)?$m(e,t):Fu(t)||bp(t)?(i=l4(e,t,n,s),Zo(i,{synthetic:!0}),i):(i=Gg(e,t,n,r),$g(i,`${t}`),Zo(i,{synthetic:!0}),i)}function Gg(e,t,n,r){const s={};if(r&&n){const i=db(e,n);i.length&&(s.exception={values:[{value:t,stacktrace:{frames:i}}]}),Zo(s,{synthetic:!0})}if(qy(t)){const{__sentry_template_string__:i,__sentry_template_values__:a}=t;return s.logentry={message:i,params:a},s}return s.message=t,s}function g4(e,{isUnhandledRejection:t}){const n=BV(e),r=t?"promise rejection":"exception";return VT(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:bp(e)?`Event \`${v4(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function v4(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function y4(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}class b4 extends tU{constructor(t){const n=S4(t),r=gt.SENTRY_SDK_SOURCE||s4();DI(n,"browser",["browser"],r),n._metadata?.sdk&&(n._metadata.sdk.settings={infer_ip:n.sendDefaultPii?"auto":"never",...n._metadata.sdk.settings}),super(n);const{sendDefaultPii:s,sendClientReports:i,enableLogs:a,_experiments:o,enableMetrics:l}=this._options,c=l??o?.enableMetrics??!0;gt.document&&(i||a||c)&&gt.document.addEventListener("visibilitychange",()=>{gt.document.visibilityState==="hidden"&&(i&&this._flushOutcomes(),a&&wI(this),c&&kI(this))}),s&&this.on("beforeSendSession",mU)}eventFromException(t,n){return m4(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return h4(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)}}function S4(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:gt.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const Qa=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ze=ct,w4=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",Ec=(e,t,n,r)=>{let s,i;return a=>{t.value>=0&&(a||r)&&(i=t.value-(s??0),(i||s===void 0)&&(s=t.value,t.delta=i,t.rating=w4(t.value,n),e(t)))}},Cc=(e=!0)=>{const t=Ze.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Dl=()=>Cc()?.activationStart??0;function Va(e,t,n){Ze.document&&Ze.addEventListener(e,t,n)}function pb(e,t,n){Ze.document&&Ze.removeEventListener(e,t,n)}let zo=-1;const jI=new Set,_4=()=>Ze.document?.visibilityState==="hidden"&&!Ze.document?.prerendering?0:1/0,Rd=e=>{if(k4(e)&&zo>-1){if(e.type==="visibilitychange"||e.type==="pagehide")for(const t of jI)t();isFinite(zo)||(zo=e.type==="visibilitychange"?e.timeStamp:0,pb("prerenderingchange",Rd,!0))}},Tc=()=>{if(Ze.document&&zo<0){const e=Dl();zo=(Ze.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(n=>n.name==="hidden"&&n.startTime>e)[0]?.startTime)??_4(),Va("visibilitychange",Rd,!0),Va("pagehide",Rd,!0),Va("prerenderingchange",Rd,!0)}return{get firstHiddenTime(){return zo},onHidden(e){jI.add(e)}}};function k4(e){return e.type==="pagehide"||Ze.document?.visibilityState==="hidden"}const x4=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,Ic=(e,t=-1)=>{const n=Cc();let r="navigate";return n&&(Ze.document?.prerendering||Dl()>0?r="prerender":Ze.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:x4(),navigationType:r}},Fm=new WeakMap;function mb(e,t){return Fm.get(e)||Fm.set(e,new t),Fm.get(e)}class mf{constructor(){mf.prototype.__init.call(this),mf.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(t){if(t.hadRecentInput)return;const n=this._sessionEntries[0],r=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this._sessionValue+=t.value,this._sessionEntries.push(t)):(this._sessionValue=t.value,this._sessionEntries=[t]),this._onAfterProcessingUnexpectedShift?.(t)}}const Ll=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(s=>{Promise.resolve().then(()=>{t(s.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},hb=e=>{let t=!1;return()=>{t||(e(),t=!0)}},kp=e=>{Ze.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},E4=[1800,3e3],C4=(e,t={})=>{kp(()=>{const n=Tc(),r=Ic("FCP");let s;const a=Ll("paint",o=>{for(const l of o)l.name==="first-contentful-paint"&&(a.disconnect(),l.startTime<n.firstHiddenTime&&(r.value=Math.max(l.startTime-Dl(),0),r.entries.push(l),s(!0)))});a&&(s=Ec(e,r,E4,t.reportAllChanges))})},T4=[.1,.25],I4=(e,t={})=>{C4(hb(()=>{const n=Ic("CLS",0);let r;const s=Tc(),i=mb(t,mf),a=l=>{for(const c of l)i._processEntry(c);i._sessionValue>n.value&&(n.value=i._sessionValue,n.entries=i._sessionEntries,r())},o=Ll("layout-shift",a);o&&(r=Ec(e,n,T4,t.reportAllChanges),s.onHidden(()=>{a(o.takeRecords()),r(!0)}),Ze?.setTimeout?.(r))}))};let HI=0,Nm=1/0,Zc=0;const R4=e=>{e.forEach(t=>{t.interactionId&&(Nm=Math.min(Nm,t.interactionId),Zc=Math.max(Zc,t.interactionId),HI=Zc?(Zc-Nm)/7+1:0)})};let Kg;const qI=()=>Kg?HI:performance.interactionCount||0,P4=()=>{"interactionCount"in performance||Kg||(Kg=Ll("event",R4,{type:"event",buffered:!0,durationThreshold:0}))},Mm=10;let WI=0;const A4=()=>qI()-WI;class hf{constructor(){hf.prototype.__init.call(this),hf.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){WI=qI(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor(A4()/50));return this._longestInteractionList[t]}_processEntry(t){if(this._onBeforeProcessingEntry?.(t),!(t.interactionId||t.entryType==="first-input"))return;const n=this._longestInteractionList.at(-1);let r=this._longestInteractionMap.get(t.interactionId);if(r||this._longestInteractionList.length<Mm||t.duration>n._latency){if(r?t.duration>r._latency?(r.entries=[t],r._latency=t.duration):t.duration===r._latency&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(r.id,r),this._longestInteractionList.push(r)),this._longestInteractionList.sort((s,i)=>i._latency-s._latency),this._longestInteractionList.length>Mm){const s=this._longestInteractionList.splice(Mm);for(const i of s)this._longestInteractionMap.delete(i.id)}this._onAfterProcessingINPCandidate?.(r)}}}const GI=e=>{const t=n=>{(n.type==="pagehide"||Ze.document?.visibilityState==="hidden")&&e(n)};Va("visibilitychange",t,!0),Va("pagehide",t,!0)},KI=e=>{const t=Ze.requestIdleCallback||Ze.setTimeout;Ze.document?.visibilityState==="hidden"?e():(e=hb(e),Va("visibilitychange",e,{once:!0,capture:!0}),t(()=>{e(),pb("visibilitychange",e,{capture:!0})}),GI(e))},O4=[200,500],D4=40,L4=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return;const n=Tc();kp(()=>{P4();const r=Ic("INP");let s;const i=mb(t,hf),a=l=>{KI(()=>{for(const u of l)i._processEntry(u);const c=i._estimateP98LongestInteraction();c&&c._latency!==r.value&&(r.value=c._latency,r.entries=c.entries,s())})},o=Ll("event",a,{durationThreshold:t.durationThreshold??D4});s=Ec(e,r,O4,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{a(o.takeRecords()),s(!0)}))})};class $4{_processEntry(t){this._onBeforeProcessingEntry?.(t)}}const F4=[2500,4e3],N4=(e,t={})=>{kp(()=>{const n=Tc(),r=Ic("LCP");let s;const i=mb(t,$4),a=l=>{t.reportAllChanges||(l=l.slice(-1));for(const c of l)i._processEntry(c),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-Dl(),0),r.entries=[c],s())},o=Ll("largest-contentful-paint",a);if(o){s=Ec(e,r,F4,t.reportAllChanges);const l=hb(()=>{a(o.takeRecords()),o.disconnect(),s(!0)}),c=u=>{u.isTrusted&&(KI(l),pb(u.type,c,{capture:!0}))};for(const u of["keydown","click","visibilitychange"])Va(u,c,{capture:!0})}})},M4=[800,1800],Yg=e=>{Ze.document?.prerendering?kp(()=>Yg(e)):Ze.document?.readyState!=="complete"?addEventListener("load",()=>Yg(e),!0):setTimeout(e)},V4=(e,t={})=>{const n=Ic("TTFB"),r=Ec(e,n,M4,t.reportAllChanges);Yg(()=>{const s=Cc();s&&(n.value=Math.max(s.responseStart-Dl(),0),n.entries=[s],r(!0))})},hu={},gf={};let YI,JI,XI,QI;function gb(e,t=!1){return xp("cls",e,U4,YI,t)}function vb(e,t=!1){return xp("lcp",e,z4,JI,t)}function B4(e){return xp("ttfb",e,j4,XI)}function ZI(e){return xp("inp",e,H4,QI)}function Za(e,t){return eR(e,t),gf[e]||(q4(e),gf[e]=!0),tR(e,t)}function Rc(e,t){const n=hu[e];if(n?.length)for(const r of n)try{r(t)}catch(s){Qa&&Pe.error(`Error while triggering instrumentation handler.
33
+ Type: ${e}
34
+ Name: ${Si(r)}
35
+ Error:`,s)}}function U4(){return I4(e=>{Rc("cls",{metric:e}),YI=e},{reportAllChanges:!0})}function z4(){return N4(e=>{Rc("lcp",{metric:e}),JI=e},{reportAllChanges:!0})}function j4(){return V4(e=>{Rc("ttfb",{metric:e}),XI=e})}function H4(){return L4(e=>{Rc("inp",{metric:e}),QI=e})}function xp(e,t,n,r,s=!1){eR(e,t);let i;return gf[e]||(i=n(),gf[e]=!0),r&&t({metric:r}),tR(e,t,s?i:void 0)}function q4(e){const t={};e==="event"&&(t.durationThreshold=0),Ll(e,n=>{Rc(e,{entries:n})},t)}function eR(e,t){hu[e]=hu[e]||[],hu[e].push(t)}function tR(e,t,n){return()=>{n&&n();const r=hu[e];if(!r)return;const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}function W4(e){return"duration"in e}function Vm(e){return typeof e=="number"&&isFinite(e)}function ta(e,t,n,{...r}){const s=ft(e).start_timestamp;return s&&s>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),nb(e,()=>{const i=ea({startTime:t,...r});return i&&i.end(n),i})}function yb(e){const t=at();if(!t)return;const{name:n,transaction:r,attributes:s,startTime:i}=e,{release:a,environment:o,sendDefaultPii:l}=t.getOptions(),u=t.getIntegrationByName("Replay")?.getReplayId(),d=St(),p=d.getUser(),m=p!==void 0?p.email||p.id||p.ip_address:void 0;let v;try{v=d.getScopeData().contexts.profile.profile_id}catch{}const g={release:a,environment:o,user:m||void 0,profile_id:v||void 0,replay_id:u||void 0,transaction:r,"user_agent.original":Ze.navigator?.userAgent,"client.address":l?"{{auto}}":void 0,...s};return ea({name:n,attributes:g,startTime:i,experimental:{standalone:!0}})}function Pc(){return Ze.addEventListener&&Ze.performance}function on(e){return e/1e3}function G4(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 nR(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function rR(e,t){let n,r=!1;function s(o){!r&&n&&t(o,n),r=!0}GI(()=>{s("pagehide")});const i=e.on("beforeStartNavigationSpan",(o,l)=>{l?.isRedirect||(s("navigation"),i(),a())}),a=e.on("afterStartPageLoadSpan",o=>{n=o.spanContext().spanId,a()})}function K4(e){let t=0,n;if(!nR("layout-shift"))return;const r=gb(({metric:s})=>{const i=s.entries[s.entries.length-1];i&&(t=s.value,n=i)},!0);rR(e,(s,i)=>{Y4(t,n,i,s),r()})}function Y4(e,t,n,r){Qa&&Pe.log(`Sending CLS span (${e})`);const s=t?on((Er()||0)+t.startTime):cn(),i=St().getScopeData().transactionName,a=t?yr(t.sources[0]?.node):"Layout shift",o={[en]:"auto.http.browser.cls",[ki]:"ui.webvital.cls",[Al]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((c,u)=>{o[`cls.source.${u+1}`]=yr(c.node)});const l=yb({name:a,transaction:i,attributes:o,startTime:s});l&&(l.addEvent("cls",{[kc]:"",[xc]:e}),l.end(s))}function J4(e){let t=0,n;if(!nR("largest-contentful-paint"))return;const r=vb(({metric:s})=>{const i=s.entries[s.entries.length-1];i&&(t=s.value,n=i)},!0);rR(e,(s,i)=>{X4(t,n,i,s),r()})}function X4(e,t,n,r){Qa&&Pe.log(`Sending LCP span (${e})`);const s=on((Er()||0)+(t?.startTime||0)),i=St().getScopeData().transactionName,a=t?yr(t.element):"Largest contentful paint",o={[en]:"auto.http.browser.lcp",[ki]:"ui.webvital.lcp",[Al]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(o["lcp.element"]=yr(t.element)),t.id&&(o["lcp.id"]=t.id),t.url&&(o["lcp.url"]=t.url),t.loadTime!=null&&(o["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(o["lcp.renderTime"]=t.renderTime),t.size!=null&&(o["lcp.size"]=t.size));const l=yb({name:a,transaction:i,attributes:o,startTime:s});l&&(l.addEvent("lcp",{[kc]:"millisecond",[xc]:e}),l.end(s))}function zr(e){return e&&((Er()||performance.timeOrigin)+e)/1e3}function sR(e){const t={};if(e.nextHopProtocol!=null){const{name:n,version:r}=G4(e.nextHopProtocol);t["network.protocol.version"]=r,t["network.protocol.name"]=n}return Er()||Pc()?.timeOrigin?Q4({...t,"http.request.redirect_start":zr(e.redirectStart),"http.request.redirect_end":zr(e.redirectEnd),"http.request.worker_start":zr(e.workerStart),"http.request.fetch_start":zr(e.fetchStart),"http.request.domain_lookup_start":zr(e.domainLookupStart),"http.request.domain_lookup_end":zr(e.domainLookupEnd),"http.request.connect_start":zr(e.connectStart),"http.request.secure_connection_start":zr(e.secureConnectionStart),"http.request.connection_end":zr(e.connectEnd),"http.request.request_start":zr(e.requestStart),"http.request.response_start":zr(e.responseStart),"http.request.response_end":zr(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?e.responseStart/1e3:void 0}):t}function Q4(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}const Z4=2147483647;let Lw=0,os={},lr,vf;function e8({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=Pc();if(r&&Er()){r.mark&&Ze.performance.mark("sentry-tracing-init");const s=t?J4(n):i8(),i=a8(),a=e?K4(n):s8();return()=>{s?.(),i(),a?.()}}return()=>{}}function t8(){Za("longtask",({entries:e})=>{const t=Un();if(!t)return;const{op:n,start_timestamp:r}=ft(t);for(const s of e){const i=on(Er()+s.startTime),a=on(s.duration);n==="navigation"&&r&&i<r||ta(t,i,i+a,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[en]:"auto.ui.browser.metrics"}})}})}function n8(){new PerformanceObserver(t=>{const n=Un();if(n)for(const r of t.getEntries()){if(!r.scripts[0])continue;const s=on(Er()+r.startTime),{start_timestamp:i,op:a}=ft(n);if(a==="navigation"&&i&&s<i)continue;const o=on(r.duration),l={[en]:"auto.ui.browser.metrics"},c=r.scripts[0],{invoker:u,invokerType:d,sourceURL:p,sourceFunctionName:m,sourceCharPosition:v}=c;l["browser.script.invoker"]=u,l["browser.script.invoker_type"]=d,p&&(l["code.filepath"]=p),m&&(l["code.function"]=m),v!==-1&&(l["browser.script.source_char_position"]=v),ta(n,s,s+o,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:l})}}).observe({type:"long-animation-frame",buffered:!0})}function r8(){Za("event",({entries:e})=>{const t=Un();if(t){for(const n of e)if(n.name==="click"){const r=on(Er()+n.startTime),s=on(n.duration),i={name:yr(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[en]:"auto.ui.browser.metrics"}},a=UT(n.target);a&&(i.attributes["ui.component_name"]=a),ta(t,r,r+s,i)}}})}function s8(){return gb(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(os.cls={value:e.value,unit:""},vf=t)},!0)}function i8(){return vb(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(os.lcp={value:e.value,unit:"millisecond"},lr=t)},!0)}function a8(){return B4(({metric:e})=>{e.entries[e.entries.length-1]&&(os.ttfb={value:e.value,unit:"millisecond"})})}function o8(e,t){const n=Pc(),r=Er();if(!n?.getEntries||!r)return;const s=on(r),i=n.getEntries(),{op:a,start_timestamp:o}=ft(e);i.slice(Lw).forEach(l=>{const c=on(l.startTime),u=on(Math.max(0,l.duration));if(!(a==="navigation"&&o&&s+c<o))switch(l.entryType){case"navigation":{d8(e,l,s);break}case"mark":case"paint":case"measure":{u8(e,l,c,u,s,t.ignorePerformanceApiSpans);const d=Tc(),p=l.startTime<d.firstHiddenTime;l.name==="first-paint"&&p&&(os.fp={value:l.startTime,unit:"millisecond"}),l.name==="first-contentful-paint"&&p&&(os.fcp={value:l.startTime,unit:"millisecond"});break}case"resource":{m8(e,l,l.name,c,u,s,t.ignoreResourceSpans);break}}}),Lw=Math.max(i.length-1,0),h8(e),a==="pageload"&&(y8(os),t.recordClsOnPageloadSpan||delete os.cls,t.recordLcpOnPageloadSpan||delete os.lcp,Object.entries(os).forEach(([l,c])=>{QB(l,c.value,c.unit)}),e.setAttribute("performance.timeOrigin",s),e.setAttribute("performance.activationStart",Dl()),g8(e,t)),lr=void 0,vf=void 0,os={}}function l8(e){if(e?.entryType==="measure")try{return e.detail.devtools.track==="Components ⚛"}catch{return}}function u8(e,t,n,r,s,i){if(l8(t)||["mark","measure"].includes(t.entryType)&&ci(t.name,i))return;const a=Cc(!1),o=on(a?a.requestStart:0),l=s+Math.max(n,o),c=s+n,u=c+r,d={[en]:"auto.resource.browser.metrics"};l!==c&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=l),c8(d,t),l<=u&&ta(e,l,u,{name:t.name,op:t.entryType,attributes:d})}function c8(e,t){try{const n=t.detail;if(!n)return;if(typeof n=="object"){for(const[r,s]of Object.entries(n))if(s&&Qo(s))e[`sentry.browser.measure.detail.${r}`]=s;else if(s!==void 0)try{e[`sentry.browser.measure.detail.${r}`]=JSON.stringify(s)}catch{}return}if(Qo(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function d8(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{ed(e,t,r,n)}),ed(e,t,"secureConnection",n,"TLS/SSL"),ed(e,t,"fetch",n,"cache"),ed(e,t,"domainLookup",n,"DNS"),p8(e,t,n)}function ed(e,t,n,r,s=n){const i=f8(n),a=t[i],o=t[`${n}Start`];!o||!a||ta(e,r+on(o),r+on(a),{op:`browser.${s}`,name:t.name,attributes:{[en]:"auto.ui.browser.metrics",...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function f8(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function p8(e,t,n){const r=n+on(t.requestStart),s=n+on(t.responseEnd),i=n+on(t.responseStart);t.responseEnd&&(ta(e,r,s,{op:"browser.request",name:t.name,attributes:{[en]:"auto.ui.browser.metrics"}}),ta(e,i,s,{op:"browser.response",name:t.name,attributes:{[en]:"auto.ui.browser.metrics"}}))}function m8(e,t,n,r,s,i,a){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const o=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(a?.includes(o))return;const l={[en]:"auto.resource.browser.metrics"},c=Ma(n);c.protocol&&(l["url.scheme"]=c.protocol.split(":").pop()),c.host&&(l["server.address"]=c.host),l["url.same_origin"]=n.includes(Ze.location.origin),v8(t,l,[["responseStatus","http.response.status_code"],["transferSize","http.response_transfer_size"],["encodedBodySize","http.response_content_length"],["decodedBodySize","http.decoded_response_content_length"],["renderBlockingStatus","resource.render_blocking_status"],["deliveryType","http.response_delivery_type"]]);const u={...l,...sR(t)},d=i+r,p=d+s;ta(e,d,p,{name:n.replace(Ze.location.origin,""),op:o,attributes:u})}function h8(e){const t=Ze.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),Vm(n.rtt)&&(os["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Vm(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),Vm(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function g8(e,t){lr&&t.recordLcpOnPageloadSpan&&(lr.element&&e.setAttribute("lcp.element",yr(lr.element)),lr.id&&e.setAttribute("lcp.id",lr.id),lr.url&&e.setAttribute("lcp.url",lr.url.trim().slice(0,200)),lr.loadTime!=null&&e.setAttribute("lcp.loadTime",lr.loadTime),lr.renderTime!=null&&e.setAttribute("lcp.renderTime",lr.renderTime),e.setAttribute("lcp.size",lr.size)),vf?.sources&&t.recordClsOnPageloadSpan&&vf.sources.forEach((n,r)=>e.setAttribute(`cls.source.${r+1}`,yr(n.node)))}function v8(e,t,n){n.forEach(([r,s])=>{const i=e[r];i!=null&&(typeof i=="number"&&i<Z4||typeof i=="string")&&(t[s]=i)})}function y8(e){const t=Cc(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}function b8(){return Pc()&&Er()?Za("element",S8):()=>{}}const S8=({entries:e})=>{const t=Un(),n=t?Nn(t):void 0,r=n?ft(n).description:St().getScopeData().transactionName;e.forEach(s=>{const i=s;if(!i.identifier)return;const a=i.name,o=i.renderTime,l=i.loadTime,[c,u]=l?[on(l),"load-time"]:o?[on(o),"render-time"]:[cn(),"entry-emission"],d=a==="image-paint"?on(Math.max(0,(o??0)-(l??0))):0,p={[en]:"auto.ui.browser.elementtiming",[ki]:"ui.elementtiming",[fr]:"component","sentry.span_start_time_source":u,"sentry.transaction_name":r,"element.id":i.id,"element.type":i.element?.tagName?.toLowerCase()||"unknown","element.size":i.naturalWidth&&i.naturalHeight?`${i.naturalWidth}x${i.naturalHeight}`:void 0,"element.render_time":o,"element.load_time":l,"element.url":i.url||void 0,"element.identifier":i.identifier,"element.paint_type":a};s3({name:`element[${i.identifier}]`,attributes:p,startTime:c,onlyIfParent:!0},m=>{m.end(c+d)})})},w8=1e3;let $w,Jg,Xg;function iR(e){oa("dom",e),la("dom",_8)}function _8(){if(!Ze.document)return;const e=Jr.bind(null,"dom"),t=Fw(e,!0);Ze.document.addEventListener("click",t,!1),Ze.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const s=Ze[n]?.prototype;s?.hasOwnProperty?.("addEventListener")&&(dr(s,"addEventListener",function(i){return function(a,o,l){if(a==="click"||a=="keypress")try{const c=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},u=c[a]=c[a]||{refCount:0};if(!u.handler){const d=Fw(e);u.handler=d,i.call(this,a,d,l)}u.refCount++}catch{}return i.call(this,a,o,l)}}),dr(s,"removeEventListener",function(i){return function(a,o,l){if(a==="click"||a=="keypress")try{const c=this.__sentry_instrumentation_handlers__||{},u=c[a];u&&(u.refCount--,u.refCount<=0&&(i.call(this,a,u.handler,l),u.handler=void 0,delete c[a]),Object.keys(c).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return i.call(this,a,o,l)}}))})}function k8(e){if(e.type!==Jg)return!1;try{if(!e.target||e.target._sentryId!==Xg)return!1}catch{}return!0}function x8(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function Fw(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=E8(n);if(x8(n.type,r))return;br(n,"_sentryCaptured",!0),r&&!r._sentryId&&br(r,"_sentryId",Dr());const s=n.type==="keypress"?"input":n.type;k8(n)||(e({event:n,name:s,global:t}),Jg=n.type,Xg=r?r._sentryId:void 0),clearTimeout($w),$w=Ze.setTimeout(()=>{Xg=void 0,Jg=void 0},w8)}}function E8(e){try{return e.target}catch{return null}}let td;function Ep(e){const t="history";oa(t,e),la(t,C8)}function C8(){if(Ze.addEventListener("popstate",()=>{const t=Ze.location.href,n=td;if(td=t,n===t)return;Jr("history",{from:n,to:t})}),!YU())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const s=td,i=T8(String(r));if(td=i,s===i)return t.apply(this,n);Jr("history",{from:s,to:i})}return t.apply(this,n)}}dr(Ze.history,"pushState",e),dr(Ze.history,"replaceState",e)}function T8(e){try{return new URL(e,Ze.location.origin).toString()}catch{return e}}const Pd={};function aR(e){const t=Pd[e];if(t)return t;let n=Ze[e];if(Hg(n))return Pd[e]=n.bind(Ze);const r=Ze.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?.[e]&&(n=i[e]),r.head.removeChild(s)}catch(s){Qa&&Pe.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,s)}return n&&(Pd[e]=n.bind(Ze))}function I8(e){Pd[e]=void 0}function Ac(...e){return aR("setTimeout")(...e)}const Ca="__sentry_xhr_v3__";function oR(e){oa("xhr",e),la("xhr",R8)}function R8(){if(!Ze.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const s=new Error,i=cn()*1e3,a=ui(r[0])?r[0].toUpperCase():void 0,o=P8(r[1]);if(!a||!o)return t.apply(n,r);n[Ca]={method:a,url:o,request_headers:{}},a==="POST"&&o.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const l=()=>{const c=n[Ca];if(c&&n.readyState===4){try{c.status_code=n.status}catch{}const u={endTimestamp:cn()*1e3,startTimestamp:i,xhr:n,virtualError:s};Jr("xhr",u)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(c,u,d){return l(),c.apply(u,d)}}):n.addEventListener("readystatechange",l),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(c,u,d){const[p,m]=d,v=u[Ca];return v&&ui(p)&&ui(m)&&(v.request_headers[p.toLowerCase()]=m),c.apply(u,d)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const s=n[Ca];if(!s)return t.apply(n,r);r[0]!==void 0&&(s.body=r[0]);const i={startTimestamp:cn()*1e3,xhr:n};return Jr("xhr",i),t.apply(n,r)}})}function P8(e){if(ui(e))return e;try{return e.toString()}catch{}}const A8=Symbol.for("sentry__originalRequestBody");function lR(e){return new URLSearchParams(e).toString()}function uR(e,t=Pe){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[lR(e)];if(!e)return[void 0]}catch(n){return Qa&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Qa&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function cR(e=[]){if(e.length>=2&&e[1]&&typeof e[1]=="object"&&"body"in e[1])return e[1].body;if(e.length>=1&&e[0]instanceof Request){const n=e[0][A8];return n!==void 0?n:void 0}}function dR(e){let t;try{t=e.getAllResponseHeaders()}catch(n){return Qa&&Pe.error(n,"Failed to get xhr response headers",e),{}}return t?t.split(`\r
36
+ `).reduce((n,r)=>{const[s,i]=r.split(": ");return i&&(n[s.toLowerCase()]=i),n},{}):{}}const Bm=[],Ad=new Map,yo=new Map,O8=60;function D8(){if(Pc()&&Er()){const t=L8();return()=>{t()}}return()=>{}}const Qg={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 L8(){return ZI($8)}const $8=({metric:e})=>{if(e.value==null)return;const t=on(e.value);if(t>O8)return;const n=e.entries.find(v=>v.duration===e.value&&Qg[v.name]);if(!n)return;const{interactionId:r}=n,s=Qg[n.name],i=on(Er()+n.startTime),a=Un(),o=a?Nn(a):void 0,l=r!=null?Ad.get(r):void 0,c=l?.span||o,u=c?ft(c).description:St().getScopeData().transactionName,d=l?.elementName||yr(n.target),p={[en]:"auto.http.browser.inp",[ki]:`ui.interaction.${s}`,[Al]:n.duration},m=yb({name:d,transaction:u,attributes:p,startTime:i});m&&(m.addEvent("inp",{[kc]:"millisecond",[xc]:e.value}),m.end(i+t))};function F8(){const e=Object.keys(Qg);qg()&&e.forEach(s=>{Ze.addEventListener(s,t,{capture:!0,passive:!0})});function t(s){const i=s.target;if(!i)return;const a=yr(i),o=Math.round(s.timeStamp);if(yo.set(o,a),yo.size>50){const l=yo.keys().next().value;l!==void 0&&yo.delete(l)}}function n(s){const i=Math.round(s.startTime);let a=yo.get(i);if(!a)for(let o=-5;o<=5;o++){const l=yo.get(i+o);if(l){a=l;break}}return a||"<unknown>"}const r=({entries:s})=>{const i=Un(),a=i&&Nn(i);s.forEach(o=>{if(!W4(o))return;const l=o.interactionId;if(l==null||Ad.has(l))return;const c=o.target?yr(o.target):n(o);if(Bm.length>10){const u=Bm.shift();Ad.delete(u)}Bm.push(l),Ad.set(l,{span:a,elementName:c})})};Za("event",r),Za("first-input",r)}const N8=40;function M8(e,t=aR("fetch")){let n=0,r=0;async function s(i){const a=i.body.length;n+=a,r++;const o={body:i.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const l=await t(e.url,o);return{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}}catch(l){throw I8("fetch"),l}finally{n-=a,r--}}return J3(e,s,ab(e.bufferSize||N8))}const es=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,V8=30,B8=50;function Zg(e,t,n,r){const s={filename:e,function:t==="<anonymous>"?Ja:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const U8=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,z8=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,j8=/\((\S*)(?::(\d+))(?::(\d+))\)/,H8=/at (.+?) ?\(data:(.+?),/,q8=e=>{const t=e.match(H8);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=U8.exec(e);if(n){const[,s,i,a]=n;return Zg(s,Ja,+i,+a)}const r=z8.exec(e);if(r){if(r[2]&&r[2].indexOf("eval")===0){const o=j8.exec(r[2]);o&&(r[2]=o[1],r[3]=o[2],r[4]=o[3])}const[i,a]=fR(r[1]||Ja,r[2]);return Zg(a,i,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},W8=[V8,q8],G8=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,K8=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Y8=e=>{const t=G8.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=K8.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]||Ja;return[s,r]=fR(s,r),Zg(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},J8=[B8,Y8],X8=[W8,J8],Q8=LT(...X8),fR=(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]:Ja,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},nd=1024,Z8="Breadcrumbs",e5=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Z8,setup(n){t.console&&LU(s5(n)),t.dom&&iR(r5(n,t.dom)),t.xhr&&oR(i5(n)),t.fetch&&VI(a5(n)),t.history&&Ep(o5(n)),t.sentry&&n.on("beforeSendEvent",n5(n))}}}),t5=e5;function n5(e){return function(n){at()===e&&Ei({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:_a(n)},{event:n})}}function r5(e,t){return function(r){if(at()!==e)return;let s,i,a=typeof t=="object"?t.serializeAttribute:void 0,o=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;o&&o>nd&&(es&&Pe.warn(`\`dom.maxStringLength\` cannot exceed ${nd}, but a value of ${o} was configured. Sentry will use ${nd} instead.`),o=nd),typeof a=="string"&&(a=[a]);try{const c=r.event,u=l5(c)?c.target:c;s=yr(u,{keyAttrs:a,maxStringLength:o}),i=UT(u)}catch{s="<unknown>"}if(s.length===0)return;const l={category:`ui.${r.name}`,message:s};i&&(l.data={"ui.component_name":i}),Ei(l,{event:r.event,name:r.name,global:r.global})}}function s5(e){return function(n){if(at()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:$I(n.level),message:GS(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${GS(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Ei(r,{input:n.args,level:n.level})}}function i5(e){return function(n){if(at()!==e)return;const{startTimestamp:r,endTimestamp:s}=n,i=n.xhr[Ca];if(!r||!s||!i)return;const{method:a,url:o,status_code:l,body:c}=i,u={method:a,url:o,status_code:l},d={xhr:n.xhr,input:c,startTimestamp:r,endTimestamp:s},p={category:"xhr",data:u,type:"http",level:MI(l)};e.emit("beforeOutgoingRequestBreadcrumb",p,d),Ei(p,d)}}function a5(e){return function(n){if(at()!==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,a={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s},o={category:"fetch",data:i,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",o,a),Ei(o,a)}else{const i=n.response,a={...n.fetchData,status_code:i?.status};n.fetchData.request_body_size,n.fetchData.response_body_size,i?.status;const o={input:n.args,response:i,startTimestamp:r,endTimestamp:s},l={category:"fetch",data:a,type:"http",level:MI(a.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",l,o),Ei(l,o)}}}function o5(e){return function(n){if(at()!==e)return;let r=n.from,s=n.to;const i=Ma(gt.location.href);let a=r?Ma(r):void 0;const o=Ma(s);a?.path||(a=i),i.protocol===o.protocol&&i.host===o.host&&(s=o.relative),i.protocol===a.protocol&&i.host===a.host&&(r=a.relative),Ei({category:"navigation",data:{from:r,to:s}})}}function l5(e){return!!e&&!!e.target}const u5=["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"],c5="BrowserApiErrors",d5=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:c5,setupOnce(){t.setTimeout&&dr(gt,"setTimeout",Nw),t.setInterval&&dr(gt,"setInterval",Nw),t.requestAnimationFrame&&dr(gt,"requestAnimationFrame",p5),t.XMLHttpRequest&&"XMLHttpRequest"in gt&&dr(XMLHttpRequest.prototype,"send",m5);const n=t.eventTarget;n&&(Array.isArray(n)?n:u5).forEach(s=>h5(s,t))}}}),f5=d5;function Nw(e){return function(...t){const n=t[0];return t[0]=rl(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${Si(e)}`}}),e.apply(this,t)}}function p5(e){return function(t){return e.apply(this,[rl(t,{mechanism:{data:{handler:Si(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function m5(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&dr(n,s,function(i){const a={mechanism:{data:{handler:Si(i)},handled:!1,type:`auto.browser.browserapierrors.xhr.${s}`}},o=Ky(i);return o&&(a.mechanism.data.handler=Si(o)),rl(i,a)})}),e.apply(this,t)}}function h5(e,t){const r=gt[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(dr(r,"addEventListener",function(s){return function(i,a,o){try{g5(a)&&(a.handleEvent=rl(a.handleEvent,{mechanism:{data:{handler:Si(a),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&v5(this,i,a),s.apply(this,[i,rl(a,{mechanism:{data:{handler:Si(a),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),o])}}),dr(r,"removeEventListener",function(s){return function(i,a,o){try{const l=a.__sentry_wrapped__;l&&s.call(this,i,l,o)}catch{}return s.call(this,i,a,o)}}))}function g5(e){return typeof e.handleEvent=="function"}function v5(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const y5=()=>({name:"BrowserSession",setupOnce(){if(typeof gt.document>"u"){es&&Pe.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}hw({ignoreDuration:!0}),gw(),Ep(({from:e,to:t})=>{e!==void 0&&e!==t&&(hw({ignoreDuration:!0}),gw())})}}),b5="GlobalHandlers",S5=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:b5,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(_5(n),Mw("onerror")),t.onunhandledrejection&&(k5(n),Mw("onunhandledrejection"))}}}),w5=S5;function _5(e){FT(t=>{const{stackParser:n,attachStacktrace:r}=pR();if(at()!==e||UI())return;const{msg:s,url:i,line:a,column:o,error:l}=t,c=C5(fb(n,l||s,void 0,r,!1),i,a,o);c.level="error",vI(c,{originalException:l,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function k5(e){NT(t=>{const{stackParser:n,attachStacktrace:r}=pR();if(at()!==e||UI())return;const s=x5(t),i=Qo(s)?E5(s):fb(n,s,void 0,r,!0);i.level="error",vI(i,{originalException:s,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function x5(e){if(Qo(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 E5(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function C5(e,t,n,r){const s=e.exception=e.exception||{},i=s.values=s.values||[],a=i[0]=i[0]||{},o=a.stacktrace=a.stacktrace||{},l=o.frames=o.frames||[],c=r,u=n,d=T5(t)??Rl();return l.length===0&&l.push({colno:c,filename:d,function:Ja,in_app:!0,lineno:u}),e}function Mw(e){es&&Pe.log(`Global Handler attached: ${e}`)}function pR(){return at()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function T5(e){if(!(!ui(e)||e.length===0)){if(e.startsWith("data:")){const t=e.match(/^data:([^;]+)/),n=t?t[1]:"text/javascript",r=e.includes("base64,");return`<data:${n}${r?",base64":""}>`}return e}}const I5=()=>({name:"HttpContext",preprocessEvent(e){if(!gt.navigator&&!gt.location&&!gt.document)return;const t=ub(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}}}),R5="cause",P5=5,A5="LinkedErrors",O5=((e={})=>{const t=e.limit||P5,n=e.key||R5;return{name:A5,preprocessEvent(r,s,i){const a=i.getOptions();DU(cb,a.stackParser,n,t,r,s)}}}),D5=O5;function L5(){return $5()?(es&&Pi(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function $5(){if(typeof gt.window>"u")return!1;const e=gt;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;const n=Rl(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(gt===gt.top&&r.some(i=>n.startsWith(`${i}://`)))}function mR(e){return[EU(),wU(),f5(),t5(),w5(),D5(),MU(),I5(),y5()]}function F5(e={}){const t=!e.skipBrowserExtensionCheck&&L5();let n=e.defaultIntegrations==null?mR():e.defaultIntegrations;const r={...e,enabled:t?!1:e.enabled,stackParser:PV(e.stackParser||Q8),integrations:V3({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||M8};return aU(b4,r)}const zt=ct,bb="sentryReplaySession",N5="replay_event",Sb="Unable to send Replay",M5=3e5,V5=9e5,B5=5e3,U5=5500,z5=6e4,j5=5e3,H5=3,Vw=15e4,rd=5e3,q5=3e3,W5=300,wb=2e7,G5=4999,K5=5e4,Bw=36e5;var Y5=Object.defineProperty,J5=(e,t,n)=>t in e?Y5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Uw=(e,t,n)=>J5(e,typeof t!="symbol"?t+"":t,n),mn=(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))(mn||{});function X5(e){return e.nodeType===e.ELEMENT_NODE}function gu(e){return e?.host?.shadowRoot===e}function vu(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Q5(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 Z5(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 yf(e){try{const t=e.rules||e.cssRules;return t?Q5(Array.from(t,hR).join("")):null}catch{return null}}function e6(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 hR(e){let t;if(n6(e))try{t=yf(e.styleSheet)||Z5(e)}catch{}else if(r6(e)){let n=e.cssText;const r=e.selectorText.includes(":"),s=typeof e.style.all=="string"&&e.style.all;if(s&&(n=e6(e)),r&&(n=t6(n)),r||s)return n}return t||e.cssText}function t6(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function n6(e){return"styleSheet"in e}function r6(e){return"selectorText"in e}class gR{constructor(){Uw(this,"idNodeMap",new Map),Uw(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.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 s6(){return new gR}function Cp({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 Bu({isMasked:e,element:t,value:n,maskInputFn:r}){let s=n||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function sl(e){return e.toLowerCase()}function ev(e){return e.toUpperCase()}const zw="__rrweb_original__";function i6(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,a=zw in i?i[zw]:i;if(new Uint32Array(a.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 _b(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?sl(t):null}function bf(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function vR(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i;return n.pathname.match(r)?.[1]??null}const jw={};function yR(e){const t=jw[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 jw[e]=r.bind(window)}function tv(...e){return yR("setTimeout")(...e)}function bR(...e){return yR("clearTimeout")(...e)}function SR(e){try{return e.contentDocument}catch{}}let a6=1;const o6=new RegExp("[^a-z0-9-_:]"),Uu=-2;function kb(){return a6++}function l6(e){if(e instanceof HTMLFormElement)return"form";const t=sl(e.tagName);return o6.test(t)?"div":t}function u6(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let bo,Hw;const c6=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,d6=/^(?:[a-z+]+:)?\/\//i,f6=/^www\..*/i,p6=/^(data:)([^,]*),(.*)/i;function m6(e,t){if(!e||t.size===0)return e;try{const n=e.split(";"),r=[];for(let s of n){if(s=s.trim(),!s)continue;const i=s.indexOf(":");if(i===-1){r.push(s);continue}const a=s.slice(0,i).trim();t.has(a)||r.push(s)}return r.join("; ")+(r.length>0&&e.endsWith(";")?";":"")}catch(n){return console.warn("Error filtering CSS properties:",n),e}}function Sf(e,t){return(e||"").replace(c6,(n,r,s,i,a,o)=>{const l=s||a||o,c=r||i||"";if(!l)return n;if(d6.test(l)||f6.test(l))return`url(${c}${l}${c})`;if(p6.test(l))return`url(${c}${l}${c})`;if(l[0]==="/")return`url(${c}${u6(t)+l}${c})`;const u=t.split("/"),d=l.split("/");u.pop();for(const p of d)p!=="."&&(p===".."?u.pop():u.push(p));return`url(${c}${u.join("/")}${c})`})}const h6=/^[^ \t\n\r\u000c]+/,g6=/^[, \t\n\r\u000c]+/;function v6(e,t){if(t.trim()==="")return t;let n=0;function r(i){let a;const o=i.exec(t.substring(n));return o?(a=o[0],n+=a.length,a):""}const s=[];for(;r(g6),!(n>=t.length);){let i=r(h6);if(i.slice(-1)===",")i=Oo(e,i.substring(0,i.length-1)),s.push(i);else{let a="";i=Oo(e,i);let o=!1;for(;;){const l=t.charAt(n);if(l===""){s.push((i+a).trim());break}else if(o)l===")"&&(o=!1);else if(l===","){n+=1,s.push((i+a).trim());break}else l==="("&&(o=!0);a+=l,n+=1}}}return s.join(", ")}const qw=new WeakMap;function Oo(e,t){return!t||t.trim()===""?t:Tp(e,t)}function y6(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Tp(e,t){let n=qw.get(e);if(n||(n=e.createElement("a"),qw.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function wR(e,t,n,r,s,i,a){if(!r)return r;if(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#"))return Oo(e,r);if(n==="xlink:href"&&r[0]!=="#")return Oo(e,r);if(n==="background"&&(t==="table"||t==="td"||t==="th"))return Oo(e,r);if(n==="srcset")return v6(e,r);if(n==="style"){let o=Sf(r,Tp(e));return a&&a.size>0&&(o=m6(o,a)),o}else if(t==="object"&&n==="data")return Oo(e,r);return typeof i=="function"?i(n,r,s):r}function _R(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function b6(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 S6(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Ta(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Ta(e.parentNode,t,n,r+1)}function Do(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(S6(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function il(e,t,n,r,s,i){try{const a=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(a===null)return!1;if(a.tagName==="INPUT"){const c=a.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(c))return!0}let o=-1,l=-1;if(i){if(l=Ta(a,Do(r,s)),l<0)return!0;o=Ta(a,Do(t,n),l>=0?l:1/0)}else{if(o=Ta(a,Do(t,n)),o<0)return!1;l=Ta(a,Do(r,s),o>=0?o:1/0)}return o>=0?l>=0?o<=l:!0:l>=0?!1:!!i}catch{}return!!i}function w6(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 o=tv(()=>{s||(t(),s=!0)},n);e.addEventListener("load",()=>{bR(o),s=!0,t()});return}const a="about:blank";if(r.location.href!==a||e.src===a||e.src==="")return tv(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function _6(e,t,n){let r=!1,s;try{s=e.sheet}catch{return}if(s)return;const i=tv(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{bR(i),r=!0,t()})}function k6(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:a,maskAllText:o,maskAttributeFn:l,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:m,maskInputOptions:v={},maskTextFn:g,maskInputFn:b,dataURLOptions:y={},inlineImages:w,recordCanvas:_,keepIframeSrcFn:T,newlyAddedElement:P=!1,ignoreCSSAttributes:x}=t,C=x6(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:mn.Document,childNodes:[],compatMode:e.compatMode}:{type:mn.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:mn.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:C};case e.ELEMENT_NODE:return C6(e,{doc:n,blockClass:s,blockSelector:i,unblockSelector:a,inlineStylesheet:m,maskAttributeFn:l,maskInputOptions:v,maskInputFn:b,dataURLOptions:y,inlineImages:w,recordCanvas:_,keepIframeSrcFn:T,newlyAddedElement:P,rootId:C,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,ignoreCSSAttributes:x});case e.TEXT_NODE:return E6(e,{doc:n,maskAllText:o,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,maskTextFn:g,maskInputOptions:v,maskInputFn:b,rootId:C});case e.CDATA_SECTION_NODE:return{type:mn.CDATA,textContent:"",rootId:C};case e.COMMENT_NODE:return{type:mn.Comment,textContent:e.textContent||"",rootId:C};default:return!1}}function x6(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function E6(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:i,unmaskTextSelector:a,maskTextFn:o,maskInputOptions:l,maskInputFn:c,rootId:u}=t,d=e.parentNode&&e.parentNode.tagName;let p=e.textContent;const m=d==="STYLE"?!0:void 0,v=d==="SCRIPT"?!0:void 0,g=d==="TEXTAREA"?!0:void 0;if(m&&p){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(p=yf(e.parentNode.sheet))}catch(y){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${y}`,e)}p=Sf(p,Tp(t.doc))}v&&(p="SCRIPT_PLACEHOLDER");const b=il(e,r,i,s,a,n);if(!m&&!v&&!g&&p&&b&&(p=o?o(p,e.parentElement):p.replace(/[\S]/g,"*")),g&&p&&(l.textarea||b)&&(p=c?c(p,e.parentNode):p.replace(/[\S]/g,"*")),d==="OPTION"&&p){const y=Cp({type:null,tagName:d,maskInputOptions:l});p=Bu({isMasked:il(e,r,i,s,a,y),element:e,value:p,maskInputFn:c})}return{type:mn.Text,textContent:p||"",isStyle:m,rootId:u}}function C6(e,t){const{doc:n,blockClass:r,blockSelector:s,unblockSelector:i,inlineStylesheet:a,maskInputOptions:o={},maskAttributeFn:l,maskInputFn:c,dataURLOptions:u={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:m,newlyAddedElement:v=!1,rootId:g,maskTextClass:b,unmaskTextClass:y,maskTextSelector:w,unmaskTextSelector:_,ignoreCSSAttributes:T}=t,P=b6(e,r,s,i),x=l6(e);let C={};const E=e.attributes.length;for(let I=0;I<E;I++){const O=e.attributes[I];O.name&&!_R(x,O.name,O.value)&&(C[O.name]=wR(n,x,sl(O.name),O.value,e,l,T))}if(x==="link"&&a){const I=Array.from(n.styleSheets).find(L=>L.href===e.href);let O=null;I&&(O=yf(I)),O&&(C.rel=null,C.href=null,C.crossorigin=null,C._cssText=Sf(O,I.href))}if(x==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const I=yf(e.sheet);I&&(C._cssText=Sf(I,Tp(n)))}if(x==="input"||x==="textarea"||x==="select"||x==="option"){const I=e,O=_b(I),L=bf(I,ev(x),O),V=I.checked;if(O!=="submit"&&O!=="button"&&L){const F=il(I,b,w,y,_,Cp({type:O,tagName:ev(x),maskInputOptions:o}));C.value=Bu({isMasked:F,element:I,value:L,maskInputFn:c})}V&&(C.checked=V)}if(x==="option"&&(e.selected&&!o.select?C.selected=!0:delete C.selected),x==="canvas"&&p){if(e.__context==="2d")i6(e)||(C.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){const I=e.toDataURL(u.type,u.quality),O=n.createElement("canvas");O.width=e.width,O.height=e.height;const L=O.toDataURL(u.type,u.quality);I!==L&&(C.rr_dataURL=I)}}if(x==="img"&&d){bo||(bo=n.createElement("canvas"),Hw=bo.getContext("2d"));const I=e,O=I.currentSrc||I.getAttribute("src")||"<unknown-src>",L=I.crossOrigin,V=()=>{I.removeEventListener("load",V);try{bo.width=I.naturalWidth,bo.height=I.naturalHeight,Hw.drawImage(I,0,0),C.rr_dataURL=bo.toDataURL(u.type,u.quality)}catch(F){if(I.crossOrigin!=="anonymous"){I.crossOrigin="anonymous",I.complete&&I.naturalWidth!==0?V():I.addEventListener("load",V);return}else console.warn(`Cannot inline img src=${O}! Error: ${F}`)}I.crossOrigin==="anonymous"&&(L?C.crossOrigin=L:I.removeAttribute("crossorigin"))};I.complete&&I.naturalWidth!==0?V():I.addEventListener("load",V)}if((x==="audio"||x==="video")&&(C.rr_mediaState=e.paused?"paused":"played",C.rr_mediaCurrentTime=e.currentTime),v||(e.scrollLeft&&(C.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(C.rr_scrollTop=e.scrollTop)),P){const{width:I,height:O}=e.getBoundingClientRect();C={class:C.class,rr_width:`${I}px`,rr_height:`${O}px`}}x==="iframe"&&!m(C.src)&&(!P&&!SR(e)&&(C.rr_src=C.src),delete C.src);let R;try{customElements.get(x)&&(R=!0)}catch{}return{type:mn.Element,tagName:x,attributes:C,childNodes:[],isSVG:y6(e)||void 0,needBlock:P,rootId:g,isCustom:R}}function Bt(e){return e==null?"":e.toLowerCase()}function T6(e,t){if(t.comment&&e.type===mn.Comment)return!0;if(e.type===mn.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"&&vR(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(Bt(e.attributes.name).match(/^msapplication-tile(image|color)$/)||Bt(e.attributes.name)==="application-name"||Bt(e.attributes.rel)==="icon"||Bt(e.attributes.rel)==="apple-touch-icon"||Bt(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&Bt(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Bt(e.attributes.property).match(/^(og|twitter|fb):/)||Bt(e.attributes.name).match(/^(og|twitter):/)||Bt(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(Bt(e.attributes.name)==="robots"||Bt(e.attributes.name)==="googlebot"||Bt(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(Bt(e.attributes.name)==="author"||Bt(e.attributes.name)==="generator"||Bt(e.attributes.name)==="framework"||Bt(e.attributes.name)==="publisher"||Bt(e.attributes.name)==="progid"||Bt(e.attributes.property).match(/^article:/)||Bt(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(Bt(e.attributes.name)==="google-site-verification"||Bt(e.attributes.name)==="yandex-verification"||Bt(e.attributes.name)==="csrf-token"||Bt(e.attributes.name)==="p:domain_verify"||Bt(e.attributes.name)==="verify-v1"||Bt(e.attributes.name)==="verification"||Bt(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Lo(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:a,maskAllText:o,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:p=!1,inlineStylesheet:m=!0,maskInputOptions:v={},maskAttributeFn:g,maskTextFn:b,maskInputFn:y,slimDOMOptions:w,dataURLOptions:_={},inlineImages:T=!1,recordCanvas:P=!1,onSerialize:x,onIframeLoad:C,iframeLoadTimeout:E=5e3,onBlockedImageLoad:R,onStylesheetLoad:I,stylesheetLoadTimeout:O=5e3,keepIframeSrcFn:L=()=>!1,newlyAddedElement:V=!1,ignoreCSSAttributes:F}=t;let{preserveWhiteSpace:B=!0}=t;const M=k6(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:o,unblockSelector:a,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,inlineStylesheet:m,maskInputOptions:v,maskAttributeFn:g,maskTextFn:b,maskInputFn:y,dataURLOptions:_,inlineImages:T,recordCanvas:P,keepIframeSrcFn:L,newlyAddedElement:V,ignoreCSSAttributes:F});if(!M)return console.warn(e,"not serialized"),null;let N;r.hasNode(e)?N=r.getId(e):T6(M,w)||!B&&M.type===mn.Text&&!M.isStyle&&!M.textContent.replace(/^\s+|\s+$/gm,"").length?N=Uu:N=kb();const D=Object.assign(M,{id:N});if(r.add(e,D),N===Uu)return null;x&&x(e);let W=!p;if(D.type===mn.Element){W=W&&!D.needBlock;const z=e.shadowRoot;z&&vu(z)&&(D.isShadowHost=!0)}if((D.type===mn.Document||D.type===mn.Element)&&W){w.headWhitespace&&D.type===mn.Element&&D.tagName==="head"&&(B=!1);const z={doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:o,unblockSelector:a,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:p,inlineStylesheet:m,maskInputOptions:v,maskAttributeFn:g,maskTextFn:b,maskInputFn:y,slimDOMOptions:w,dataURLOptions:_,inlineImages:T,recordCanvas:P,preserveWhiteSpace:B,onSerialize:x,onIframeLoad:C,iframeLoadTimeout:E,onBlockedImageLoad:R,onStylesheetLoad:I,stylesheetLoadTimeout:O,keepIframeSrcFn:L,ignoreCSSAttributes:F},K=e.childNodes?Array.from(e.childNodes):[];for(const H of K){const re=Lo(H,z);re&&D.childNodes.push(re)}if(X5(e)&&e.shadowRoot)for(const H of Array.from(e.shadowRoot.childNodes)){const re=Lo(H,z);re&&(vu(e.shadowRoot)&&(re.isShadow=!0),D.childNodes.push(re))}}if(e.parentNode&&gu(e.parentNode)&&vu(e.parentNode)&&(D.isShadow=!0),D.type===mn.Element&&D.tagName==="iframe"&&!D.needBlock&&w6(e,()=>{const z=SR(e);if(z&&C){const K=Lo(z,{doc:z,mirror:r,blockClass:s,blockSelector:i,unblockSelector:a,maskAllText:o,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:m,maskInputOptions:v,maskAttributeFn:g,maskTextFn:b,maskInputFn:y,slimDOMOptions:w,dataURLOptions:_,inlineImages:T,recordCanvas:P,preserveWhiteSpace:B,onSerialize:x,onIframeLoad:C,iframeLoadTimeout:E,onStylesheetLoad:I,stylesheetLoadTimeout:O,keepIframeSrcFn:L,ignoreCSSAttributes:F});K&&C(e,K)}},E),D.type===mn.Element&&D.tagName==="img"&&!e.complete&&D.needBlock){const z=e,K=()=>{if(z.isConnected&&!z.complete&&R)try{const H=z.getBoundingClientRect();H.width>0&&H.height>0&&R(z,D,H)}catch{}z.removeEventListener("load",K)};z.isConnected&&z.addEventListener("load",K)}return D.type===mn.Element&&D.tagName==="link"&&typeof D.attributes.rel=="string"&&(D.attributes.rel==="stylesheet"||D.attributes.rel==="preload"&&typeof D.attributes.href=="string"&&vR(D.attributes.href)==="css")&&_6(e,()=>{if(I){const z=Lo(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:a,maskAllText:o,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:m,maskInputOptions:v,maskAttributeFn:g,maskTextFn:b,maskInputFn:y,slimDOMOptions:w,dataURLOptions:_,inlineImages:T,recordCanvas:P,preserveWhiteSpace:B,onSerialize:x,onIframeLoad:C,iframeLoadTimeout:E,onStylesheetLoad:I,stylesheetLoadTimeout:O,keepIframeSrcFn:L,ignoreCSSAttributes:F});z&&I(e,z)}},O),D.type===mn.Element&&delete D.needBlock,D}function I6(e,t){const{mirror:n=new gR,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:i=null,maskAllText:a=!1,maskTextClass:o="rr-mask",unmaskTextClass:l=null,maskTextSelector:c=null,unmaskTextSelector:u=null,inlineStylesheet:d=!0,inlineImages:p=!1,recordCanvas:m=!1,maskAllInputs:v=!1,maskAttributeFn:g,maskTextFn:b,maskInputFn:y,slimDOM:w=!1,dataURLOptions:_,preserveWhiteSpace:T,onSerialize:P,onIframeLoad:x,iframeLoadTimeout:C,onBlockedImageLoad:E,onStylesheetLoad:R,stylesheetLoadTimeout:I,keepIframeSrcFn:O=()=>!1,ignoreCSSAttributes:L=new Set([])}=t||{};return Lo(e,{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:o,unmaskTextClass:l,maskTextSelector:c,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:v===!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}:v===!1?{}:v,maskAttributeFn:g,maskTextFn:b,maskInputFn:y,slimDOMOptions:w===!0||w==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:w==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:w===!1?{}:w,dataURLOptions:_,inlineImages:p,recordCanvas:m,preserveWhiteSpace:T,onSerialize:P,onIframeLoad:x,iframeLoadTimeout:C,onBlockedImageLoad:E,onStylesheetLoad:R,stylesheetLoadTimeout:I,keepIframeSrcFn:O,newlyAddedElement:!1,ignoreCSSAttributes:L})}function rr(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Co=`Please stop import mirror directly. Instead of that,\r
37
+ now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
38
+ or you can use record.mirror to access the mirror instance during recording.`;let Ww={map:{},getId(){return console.error(Co),-1},getNode(){return console.error(Co),null},removeNodeFromMap(){console.error(Co)},has(){return console.error(Co),!1},reset(){console.error(Co)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Ww=new Proxy(Ww,{get(e,t,n){return t==="map"&&console.error(Co),Reflect.get(e,t,n)}}));function zu(e,t,n={}){let r=null,s=0;return function(...i){const a=Date.now();!s&&n.leading===!1&&(s=a);const o=t-(a-s),l=this;o<=0||o>t?(r&&($6(r),r=null),s=a,e.apply(l,i)):!r&&n.trailing!==!1&&(r=Ip(()=>{s=n.leading===!1?0:Date.now(),r=null,e.apply(l,i)},o))}}function kR(e,t,n,r,s=window){const i=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(a){Ip(()=>{n.set.call(this,a)},0),i&&i.set&&i.set.call(this,a)}}),()=>kR(e,t,i||{},!0)}function xb(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 wf=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(wf=()=>new Date().getTime());function xR(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function ER(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function CR(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function TR(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Ir(e,t,n,r,s){if(!e)return!1;const i=TR(e);if(!i)return!1;const a=Do(t,n);if(!s){const c=r&&i.matches(r);return a(i)&&!c}const o=Ta(i,a);let l=-1;return o<0?!1:(r&&(l=Ta(i,Do(null,r))),o>-1&&l<0?!0:o<l)}function R6(e,t){return t.getId(e)!==-1}function Um(e,t){return t.getId(e)===Uu}function IR(e,t){if(gu(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?IR(e.parentNode,t):!0:!0}function nv(e){return!!e.changedTouches}function P6(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 RR(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function PR(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function rv(e){return!!e?.shadowRoot}class A6{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 AR(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function O6(e){let t=e,n;for(;n=AR(t);)t=n;return t}function D6(e){const t=e.ownerDocument;if(!t)return!1;const n=O6(e);return t.contains(n)}function OR(e){const t=e.ownerDocument;return t?t.contains(e)||D6(e):!1}const Gw={};function Eb(e){const t=Gw[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 Gw[e]=r.bind(window)}function L6(...e){return Eb("requestAnimationFrame")(...e)}function Ip(...e){return Eb("setTimeout")(...e)}function $6(...e){return Eb("clearTimeout")(...e)}var st=(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))(st||{}),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||{}),Qn=(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))(Qn||{}),ti=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(ti||{}),To=(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))(To||{});function Cb(e){try{return e.contentDocument}catch{}}function F6(e){try{return e.contentWindow}catch{}}function Kw(e){return"__ln"in e}class N6{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?.next||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&Kw(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&&Kw(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 Yw=(e,t)=>`${e}@${t}`;class M6{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 N6,s=l=>{let c=l,u=Uu;for(;u===Uu;)c=c&&c.nextSibling,u=c&&this.mirror.getId(c);return u},i=l=>{if(!l.parentNode||!OR(l))return;const c=gu(l.parentNode)?this.mirror.getId(AR(l)):this.mirror.getId(l.parentNode),u=s(l);if(c===-1||u===-1)return r.addNode(l);const d=Lo(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:p=>{RR(p,this.mirror)&&!Ir(p,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(p),PR(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),rv(l)&&this.shadowDomManager.addShadowRoot(l.shadowRoot,this.doc)},onIframeLoad:(p,m)=>{Ir(p,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(p,m),p.contentWindow&&this.canvasManager.addWindow(p.contentWindow),this.shadowDomManager.observeAttachShadow(p))},onStylesheetLoad:(p,m)=>{this.stylesheetManager.attachLinkElement(p,m)},onBlockedImageLoad:(p,m,{width:v,height:g})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:m.id,attributes:{style:{width:`${v}px`,height:`${g}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});d&&(t.push({parentId:c,nextId:u,node:d}),n.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const l of this.movedSet)Jw(this.removes,l,this.mirror)&&!this.movedSet.has(l.parentNode)||i(l);for(const l of this.addedSet)!Xw(this.droppedSet,l)&&!Jw(this.removes,l,this.mirror)||Xw(this.movedSet,l)?i(l):this.droppedSet.add(l);let a=null;for(;r.length;){let l=null;if(a){const c=this.mirror.getId(a.value.parentNode),u=s(a.value);c!==-1&&u!==-1&&(l=a)}if(!l){let c=r.tail;for(;c;){const u=c;if(c=c.previous,u){const d=this.mirror.getId(u.value.parentNode);if(s(u.value)===-1)continue;if(d!==-1){l=u;break}else{const m=u.value;if(m.parentNode&&m.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const v=m.parentNode.host;if(this.mirror.getId(v)!==-1){l=u;break}}}}}}if(!l){for(;r.head;)r.removeNode(r.head.value);break}a=l.previous,r.removeNode(l.value),i(l.value)}const o={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:c}=l;if(typeof c.style=="string"){const u=JSON.stringify(l.styleDiff),d=JSON.stringify(l._unchangedStyles);u.length<c.style.length&&(u+d).split("var(").length===c.style.split("var(").length&&(c.style=l.styleDiff)}return{id:this.mirror.getId(l.node),attributes:c}}).filter(l=>!n.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:t};!o.texts.length&&!o.attributes.length&&!o.removes.length&&!o.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(o))},this.processMutation=t=>{if(!Um(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Ir(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:il(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,TR(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 a=_b(n),o=n.tagName;s=bf(n,o,a);const l=Cp({maskInputOptions:this.maskInputOptions,tagName:o,type:a}),c=il(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,l);s=Bu({isMasked:c,element:n,value:s,maskInputFn:this.maskInputFn})}if(Ir(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(!Cb(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"),!_R(n.tagName,r)&&(i.attributes[r]=wR(this.doc,sl(n.tagName),sl(r),s,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const a=this.unattachedDoc.createElement("span");t.oldValue&&a.setAttribute("style",t.oldValue);for(const o of Array.from(n.style)){const l=n.style.getPropertyValue(o),c=n.style.getPropertyPriority(o);l!==a.style.getPropertyValue(o)||c!==a.style.getPropertyPriority(o)?c===""?i.styleDiff[o]=l:i.styleDiff[o]=[l,c]:i._unchangedStyles[o]=[l,c]}for(const o of Array.from(a.style))n.style.getPropertyValue(o)===""&&(i.styleDiff[o]=!1)}break}case"childList":{if(Ir(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=gu(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Ir(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Um(n,this.mirror)||!R6(n,this.mirror)||(this.addedSet.has(n)?(sv(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||IR(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Yw(r,s)]?sv(this.movedSet,n):this.removes.push({parentId:s,id:r,isShadow:gu(t.target)&&vu(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(Um(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[Yw(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Ir(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEach(r=>this.genAdds(r)),rv(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","ignoreCSSAttributes"].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 sv(e,t){e.delete(t),t.childNodes?.forEach(n=>sv(e,n))}function Jw(e,t,n){return e.length===0?!1:V6(e,t,n)}function V6(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 Xw(e,t){return e.size===0?!1:DR(e,t)}function DR(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:DR(e,n):!1}let yu;function B6(e){yu=e}function U6(){yu=void 0}const ht=e=>yu?(...n)=>{try{return e(...n)}catch(r){if(yu&&yu(r)===!0)return()=>{};throw r}}:e,$o=[];function Oc(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 LR(e,t){const n=new M6;$o.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const s=window?.Zone?.__symbol__?.("MutationObserver");s&&window[s]&&(r=window[s]);const i=new r(ht(a=>{e.onMutation&&e.onMutation(a)===!1||n.processMutations.bind(n)(a)}));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function z6({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 a=[],o;const l=zu(ht(d=>{const p=Date.now()-o;e(a.map(m=>(m.timeOffset-=p,m)),d),a=[],o=null}),i),c=ht(zu(ht(d=>{const p=Oc(d),{clientX:m,clientY:v}=nv(d)?d.changedTouches[0]:d;o||(o=wf()),a.push({x:m,y:v,id:r.getId(p),timeOffset:wf()-o}),l(typeof DragEvent<"u"&&d instanceof DragEvent?Je.Drag:d instanceof MouseEvent?Je.MouseMove:Je.TouchMove)}),s,{trailing:!1})),u=[rr("mousemove",c,n),rr("touchmove",c,n),rr("drag",c,n)];return ht(()=>{u.forEach(d=>d())})}function j6({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:a}){if(a.mouseInteraction===!1)return()=>{};const o=a.mouseInteraction===!0||a.mouseInteraction===void 0?{}:a.mouseInteraction,l=[];let c=null;const u=d=>p=>{const m=Oc(p);if(Ir(m,r,s,i,!0))return;let v=null,g=d;if("pointerType"in p){switch(p.pointerType){case"mouse":v=ti.Mouse;break;case"touch":v=ti.Touch;break;case"pen":v=ti.Pen;break}v===ti.Touch?Qn[d]===Qn.MouseDown?g="TouchStart":Qn[d]===Qn.MouseUp&&(g="TouchEnd"):ti.Pen}else nv(p)&&(v=ti.Touch);v!==null?(c=v,(g.startsWith("Touch")&&v===ti.Touch||g.startsWith("Mouse")&&v===ti.Mouse)&&(v=null)):Qn[d]===Qn.Click&&(v=c,c=null);const b=nv(p)?p.changedTouches[0]:p;if(!b)return;const y=n.getId(m),{clientX:w,clientY:_}=b;ht(e)({type:Qn[g],id:y,x:w,y:_,...v!==null&&{pointerType:v}})};return Object.keys(Qn).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&o[d]!==!1).forEach(d=>{let p=sl(d);const m=u(d);if(window.PointerEvent)switch(Qn[d]){case Qn.MouseDown:case Qn.MouseUp:p=p.replace("mouse","pointer");break;case Qn.TouchStart:case Qn.TouchEnd:return}l.push(rr(p,m,t))}),ht(()=>{l.forEach(d=>d())})}function $R({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:a}){const o=ht(zu(ht(l=>{const c=Oc(l);if(!c||Ir(c,r,s,i,!0))return;const u=n.getId(c);if(c===t&&t.defaultView){const d=xR(t.defaultView);e({id:u,x:d.left,y:d.top})}else e({id:u,x:c.scrollLeft,y:c.scrollTop})}),a.scroll||100));return rr("scroll",o,t)}function H6({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const s=ht(zu(ht(()=>{const i=ER(),a=CR();(n!==i||r!==a)&&(e({width:Number(a),height:Number(i)}),n=i,r=a)}),200));return rr("resize",s,t)}const q6=["INPUT","TEXTAREA","SELECT"],Qw=new WeakMap;function W6({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,ignoreClass:a,ignoreSelector:o,maskInputOptions:l,maskInputFn:c,sampling:u,userTriggeredOnInput:d,maskTextClass:p,unmaskTextClass:m,maskTextSelector:v,unmaskTextSelector:g}){function b(C){let E=Oc(C);const R=C.isTrusted,I=E&&ev(E.tagName);if(I==="OPTION"&&(E=E.parentElement),!E||!I||q6.indexOf(I)<0||Ir(E,r,s,i,!0))return;const O=E;if(O.classList.contains(a)||o&&O.matches(o))return;const L=_b(E);let V=bf(O,I,L),F=!1;const B=Cp({maskInputOptions:l,tagName:I,type:L}),M=il(E,p,v,m,g,B);(L==="radio"||L==="checkbox")&&(F=E.checked),V=Bu({isMasked:M,element:E,value:V,maskInputFn:c}),y(E,d?{text:V,isChecked:F,userTriggered:R}:{text:V,isChecked:F});const N=E.name;L==="radio"&&N&&F&&t.querySelectorAll(`input[type="radio"][name="${N}"]`).forEach(D=>{if(D!==E){const W=Bu({isMasked:M,element:D,value:bf(D,I,L),maskInputFn:c});y(D,d?{text:W,isChecked:!F,userTriggered:!1}:{text:W,isChecked:!F})}})}function y(C,E){const R=Qw.get(C);if(!R||R.text!==E.text||R.isChecked!==E.isChecked){Qw.set(C,E);const I=n.getId(C);ht(e)({...E,id:I})}}const _=(u.input==="last"?["change"]:["input","change"]).map(C=>rr(C,ht(b),t)),T=t.defaultView;if(!T)return()=>{_.forEach(C=>C())};const P=T.Object.getOwnPropertyDescriptor(T.HTMLInputElement.prototype,"value"),x=[[T.HTMLInputElement.prototype,"value"],[T.HTMLInputElement.prototype,"checked"],[T.HTMLSelectElement.prototype,"value"],[T.HTMLTextAreaElement.prototype,"value"],[T.HTMLSelectElement.prototype,"selectedIndex"],[T.HTMLOptionElement.prototype,"selected"]];return P&&P.set&&_.push(...x.map(C=>kR(C[0],C[1],{set(){ht(b)({target:this,isTrusted:!1})}},!1,T))),ht(()=>{_.forEach(C=>C())})}function _f(e){const t=[];function n(r,s){if(sd("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||sd("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||sd("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||sd("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const a=Array.from(r.parentRule.cssRules).indexOf(r);s.unshift(a)}else if(r.parentStyleSheet){const a=Array.from(r.parentStyleSheet.cssRules).indexOf(r);s.unshift(a)}return s}return n(e,t)}function Bi(e,t,n){let r,s;return e?(e.ownerNode?r=t.getId(e.ownerNode):s=n.getId(e),{styleId:s,id:r}):{}}function G6({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:ht((u,d,p)=>{const[m,v]=p,{id:g,styleId:b}=Bi(d,t,n.styleMirror);return(g&&g!==-1||b&&b!==-1)&&e({id:g,styleId:b,adds:[{rule:m,index:v}]}),u.apply(d,p)})});const i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:ht((u,d,p)=>{const[m]=p,{id:v,styleId:g}=Bi(d,t,n.styleMirror);return(v&&v!==-1||g&&g!==-1)&&e({id:v,styleId:g,removes:[{index:m}]}),u.apply(d,p)})});let a;r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:ht((u,d,p)=>{const[m]=p,{id:v,styleId:g}=Bi(d,t,n.styleMirror);return(v&&v!==-1||g&&g!==-1)&&e({id:v,styleId:g,replace:m}),u.apply(d,p)})}));let o;r.CSSStyleSheet.prototype.replaceSync&&(o=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(o,{apply:ht((u,d,p)=>{const[m]=p,{id:v,styleId:g}=Bi(d,t,n.styleMirror);return(v&&v!==-1||g&&g!==-1)&&e({id:v,styleId:g,replaceSync:m}),u.apply(d,p)})}));const l={};id("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(id("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),id("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),id("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));const c={};return Object.entries(l).forEach(([u,d])=>{c[u]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(c[u].insertRule,{apply:ht((p,m,v)=>{const[g,b]=v,{id:y,styleId:w}=Bi(m.parentStyleSheet,t,n.styleMirror);return(y&&y!==-1||w&&w!==-1)&&e({id:y,styleId:w,adds:[{rule:g,index:[..._f(m),b||0]}]}),p.apply(m,v)})}),d.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:ht((p,m,v)=>{const[g]=v,{id:b,styleId:y}=Bi(m.parentStyleSheet,t,n.styleMirror);return(b&&b!==-1||y&&y!==-1)&&e({id:b,styleId:y,removes:[{index:[..._f(m),g]}]}),p.apply(m,v)})})}),ht(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=i,a&&(r.CSSStyleSheet.prototype.replace=a),o&&(r.CSSStyleSheet.prototype.replaceSync=o),Object.entries(l).forEach(([u,d])=>{d.prototype.insertRule=c[u].insertRule,d.prototype.deleteRule=c[u].deleteRule})})}function FR({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const s=n.nodeName==="#document"?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,i=s?.prototype?Object.getOwnPropertyDescriptor(s?.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!s||!i?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return i.get?.call(this)},set(a){const o=i.set?.call(this,a);if(r!==null&&r!==-1)try{t.adoptStyleSheets(a,r)}catch{}return o}}),ht(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function K6({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const i=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:ht((o,l,c)=>{const[u,d,p]=c;if(n.has(u))return i.apply(l,[u,d,p]);const{id:m,styleId:v}=Bi(l.parentRule?.parentStyleSheet,t,r.styleMirror);return(m&&m!==-1||v&&v!==-1)&&e({id:m,styleId:v,set:{property:u,value:d,priority:p},index:_f(l.parentRule)}),o.apply(l,c)})});const a=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:ht((o,l,c)=>{const[u]=c;if(n.has(u))return a.apply(l,[u]);const{id:d,styleId:p}=Bi(l.parentRule?.parentStyleSheet,t,r.styleMirror);return(d&&d!==-1||p&&p!==-1)&&e({id:d,styleId:p,remove:{property:u},index:_f(l.parentRule)}),o.apply(l,c)})}),ht(()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=a})}function Y6({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:s,sampling:i,doc:a}){const o=ht(c=>zu(ht(u=>{const d=Oc(u);if(!d||Ir(d,t,n,r,!0))return;const{currentTime:p,volume:m,muted:v,playbackRate:g}=d;e({type:c,id:s.getId(d),currentTime:p,volume:m,muted:v,playbackRate:g})}),i.media||500)),l=[rr("play",o(To.Play),a),rr("pause",o(To.Pause),a),rr("seeked",o(To.Seeked),a),rr("volumechange",o(To.VolumeChange),a),rr("ratechange",o(To.RateChange),a)];return ht(()=>{l.forEach(c=>c())})}function J6({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,i=n.FontFace;n.FontFace=function(l,c,u){const d=new i(l,c,u);return s.set(d,{family:l,buffer:typeof c!="string",descriptors:u,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),d};const a=xb(t.fonts,"add",function(o){return function(l){return Ip(ht(()=>{const c=s.get(l);c&&(e(c),s.delete(l))}),0),o.apply(this,[l])}});return r.push(()=>{n.FontFace=i}),r.push(a),ht(()=>{r.forEach(o=>o())})}function X6(e){const{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,selectionCb:a}=e;let o=!0;const l=ht(()=>{const c=t.getSelection();if(!c||o&&c?.isCollapsed)return;o=c.isCollapsed||!1;const u=[],d=c.rangeCount||0;for(let p=0;p<d;p++){const m=c.getRangeAt(p),{startContainer:v,startOffset:g,endContainer:b,endOffset:y}=m;Ir(v,r,s,i,!0)||Ir(b,r,s,i,!0)||u.push({start:n.getId(v),startOffset:g,end:n.getId(b),endOffset:y})}a({ranges:u})});return l(),rr("selectionchange",l)}function Q6({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:xb(n.customElements,"define",function(s){return function(i,a,o){try{t({define:{name:i}})}catch{}return s.apply(this,[i,a,o])}})}function Z6(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=LR(e,e.doc));const s=z6(e),i=j6(e),a=$R(e),o=H6(e,{win:n}),l=W6(e),c=Y6(e);let u=()=>{},d=()=>{},p=()=>{},m=()=>{};e.recordDOM&&(u=G6(e,{win:n}),d=FR(e,e.doc),p=K6(e,{win:n}),e.collectFonts&&(m=J6(e)));const v=X6(e),g=Q6(e),b=[];for(const y of e.plugins)b.push(y.observer(y.callback,n,y.options));return ht(()=>{$o.forEach(y=>y.reset()),r?.disconnect(),s(),i(),a(),o(),l(),c(),u(),d(),p(),m(),v(),g(),b.forEach(y=>y())})}function sd(e){return typeof window[e]<"u"}function id(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class iv{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,s){const i=r||this.getIdToRemoteIdMap(t),a=s||this.getRemoteIdToIdMap(t);let o=i.get(n);return o||(o=this.generateIdFn(),i.set(n,o),a.set(o,n)),o}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 ez{constructor(){this.crossOriginIframeMirror=new iv(kb),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class tz{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new iv(kb),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new iv(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){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&t.contentWindow?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(t);const r=Cb(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){switch(n.type){case st.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:st.IncrementalSnapshot,data:{source:Je.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case st.Meta:case st.Load:case st.DomContentLoaded:return!1;case st.Plugin:return n;case st.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case st.IncrementalSnapshot:switch(n.data.source){case Je.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);const s=this.crossOriginIframeRootIdMap.get(t);s&&this.patchRootIdOnNode(r.node,s)}),n.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case Je.Drag:case Je.TouchMove:case Je.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,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(r=>{this.replaceIds(r,t,["start","end"])}),n;case Je.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),n.data.styles?.forEach(r=>{this.replaceStyleIds(r,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!==mn.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class nz{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class rz{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(!vu(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=LR({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push($R({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),Ip(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(FR({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=Cb(t),r=F6(t);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(xb(t.prototype,"attachShadow",function(s){return function(i){const a=s.call(this,i);return this.shadowRoot&&OR(this)&&r.addShadowRoot(this.shadowRoot,n),a}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}var Zw="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",sz=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var ad=0;ad<Zw.length;ad++)sz[Zw.charCodeAt(ad)]=ad;class e_{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class iz{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new A6,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 a;this.styleMirror.has(i)?a=this.styleMirror.getId(i):(a=this.styleMirror.add(i),s.push({styleId:a,rules:Array.from(i.rules||CSSRule,(o,l)=>({rule:hR(o),index:l}))})),r.styleIds.push(a)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class az{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,L6(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let nn,kf;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const is=s6();function fi(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:i=null,unblockSelector:a=null,ignoreClass:o="rr-ignore",ignoreSelector:l=null,maskAllText:c=!1,maskTextClass:u="rr-mask",unmaskTextClass:d=null,maskTextSelector:p=null,unmaskTextSelector:m=null,inlineStylesheet:v=!0,maskAllInputs:g,maskInputOptions:b,slimDOMOptions:y,maskAttributeFn:w,maskInputFn:_,maskTextFn:T,maxCanvasSize:P=null,packFn:x,sampling:C={},dataURLOptions:E={},mousemoveWait:R,recordDOM:I=!0,recordCanvas:O=!1,recordCrossOriginIframes:L=!1,recordAfter:V=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:F=!1,collectFonts:B=!1,inlineImages:M=!1,plugins:N,keepIframeSrcFn:D=()=>!1,ignoreCSSAttributes:W=new Set([]),errorHandler:z,onMutation:K,getCanvasManager:H}=e;B6(z);const re=L?window.parent===window:!0;let ae=!1;if(!re)try{window.parent.document&&(ae=!1)}catch{ae=!0}if(re&&!t)throw new Error("emit function is required");if(!re&&!ae)return()=>{};R!==void 0&&C.mousemove===void 0&&(C.mousemove=R),is.reset();const de=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,radio:!0,checkbox:!0}:b!==void 0?b:{},De=y===!0||y==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:y==="all",headMetaDescKeywords:y==="all"}:y||{};P6();let X,ie=0;const ne=he=>{for(const ye of N||[])ye.eventProcessor&&(he=ye.eventProcessor(he));return x&&!ae&&(he=x(he)),he};nn=(he,ye)=>{const Te=he;if(Te.timestamp=wf(),$o[0]?.isFrozen()&&Te.type!==st.FullSnapshot&&!(Te.type===st.IncrementalSnapshot&&Te.data.source===Je.Mutation)&&$o.forEach(xe=>xe.unfreeze()),re)t?.(ne(Te),ye);else if(ae){const xe={type:"rrweb",event:ne(Te),origin:window.location.origin,isCheckout:ye};window.parent.postMessage(xe,"*")}if(Te.type===st.FullSnapshot)X=Te,ie=0;else if(Te.type===st.IncrementalSnapshot){if(Te.data.source===Je.Mutation&&Te.data.isAttachIframe)return;ie++;const xe=r&&ie>=r,Re=n&&X&&Te.timestamp-X.timestamp>n;(xe||Re)&&Ce(!0)}};const ve=he=>{nn({type:st.IncrementalSnapshot,data:{source:Je.Mutation,...he}})},Ne=he=>nn({type:st.IncrementalSnapshot,data:{source:Je.Scroll,...he}}),U=he=>nn({type:st.IncrementalSnapshot,data:{source:Je.CanvasMutation,...he}}),G=he=>nn({type:st.IncrementalSnapshot,data:{source:Je.AdoptedStyleSheet,...he}}),Z=new iz({mutationCb:ve,adoptedStyleSheetCb:G}),fe=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new ez:new tz({mirror:is,mutationCb:ve,stylesheetManager:Z,recordCrossOriginIframes:L,wrappedEmit:nn});for(const he of N||[])he.getMirror&&he.getMirror({nodeMirror:is,crossOriginIframeMirror:fe.crossOriginIframeMirror,crossOriginIframeStyleMirror:fe.crossOriginIframeStyleMirror});const ge=new az,me=lz(H,{mirror:is,win:window,mutationCb:he=>nn({type:st.IncrementalSnapshot,data:{source:Je.CanvasMutation,...he}}),recordCanvas:O,blockClass:s,blockSelector:i,unblockSelector:a,maxCanvasSize:P,sampling:C.canvas,dataURLOptions:E,errorHandler:z}),we=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new nz:new rz({mutationCb:ve,scrollCb:Ne,bypassOptions:{onMutation:K,blockClass:s,blockSelector:i,unblockSelector:a,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:m,inlineStylesheet:v,maskInputOptions:de,dataURLOptions:E,maskAttributeFn:w,maskTextFn:T,maskInputFn:_,recordCanvas:O,inlineImages:M,sampling:C,slimDOMOptions:De,iframeManager:fe,stylesheetManager:Z,canvasManager:me,keepIframeSrcFn:D,processedNodeManager:ge,ignoreCSSAttributes:W},mirror:is}),Ce=(he=!1)=>{if(!I)return;nn({type:st.Meta,data:{href:window.location.href,width:CR(),height:ER()}},he),Z.reset(),we.init(),$o.forEach(Te=>Te.lock());const ye=I6(document,{mirror:is,blockClass:s,blockSelector:i,unblockSelector:a,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:m,inlineStylesheet:v,maskAllInputs:de,maskAttributeFn:w,maskInputFn:_,maskTextFn:T,slimDOM:De,dataURLOptions:E,recordCanvas:O,inlineImages:M,onSerialize:Te=>{RR(Te,is)&&fe.addIframe(Te),PR(Te,is)&&Z.trackLinkElement(Te),rv(Te)&&we.addShadowRoot(Te.shadowRoot,document)},onIframeLoad:(Te,xe)=>{fe.attachIframe(Te,xe),Te.contentWindow&&me.addWindow(Te.contentWindow),we.observeAttachShadow(Te)},onStylesheetLoad:(Te,xe)=>{Z.attachLinkElement(Te,xe)},onBlockedImageLoad:(Te,xe,{width:Re,height:je})=>{ve({adds:[],removes:[],texts:[],attributes:[{id:xe.id,attributes:{style:{width:`${Re}px`,height:`${je}px`}}}]})},keepIframeSrcFn:D,ignoreCSSAttributes:W});if(!ye)return console.warn("Failed to snapshot the document");nn({type:st.FullSnapshot,data:{node:ye,initialOffset:xR(window)}}),$o.forEach(Te=>Te.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Z.adoptStyleSheets(document.adoptedStyleSheets,is.getId(document))};kf=Ce;try{const he=[],ye=xe=>ht(Z6)({onMutation:K,mutationCb:ve,mousemoveCb:(Re,je)=>nn({type:st.IncrementalSnapshot,data:{source:je,positions:Re}}),mouseInteractionCb:Re=>nn({type:st.IncrementalSnapshot,data:{source:Je.MouseInteraction,...Re}}),scrollCb:Ne,viewportResizeCb:Re=>nn({type:st.IncrementalSnapshot,data:{source:Je.ViewportResize,...Re}}),inputCb:Re=>nn({type:st.IncrementalSnapshot,data:{source:Je.Input,...Re}}),mediaInteractionCb:Re=>nn({type:st.IncrementalSnapshot,data:{source:Je.MediaInteraction,...Re}}),styleSheetRuleCb:Re=>nn({type:st.IncrementalSnapshot,data:{source:Je.StyleSheetRule,...Re}}),styleDeclarationCb:Re=>nn({type:st.IncrementalSnapshot,data:{source:Je.StyleDeclaration,...Re}}),canvasMutationCb:U,fontCb:Re=>nn({type:st.IncrementalSnapshot,data:{source:Je.Font,...Re}}),selectionCb:Re=>{nn({type:st.IncrementalSnapshot,data:{source:Je.Selection,...Re}})},customElementCb:Re=>{nn({type:st.IncrementalSnapshot,data:{source:Je.CustomElement,...Re}})},blockClass:s,ignoreClass:o,ignoreSelector:l,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:m,maskInputOptions:de,inlineStylesheet:v,sampling:C,recordDOM:I,recordCanvas:O,inlineImages:M,userTriggeredOnInput:F,collectFonts:B,doc:xe,maskAttributeFn:w,maskInputFn:_,maskTextFn:T,keepIframeSrcFn:D,blockSelector:i,unblockSelector:a,slimDOMOptions:De,dataURLOptions:E,mirror:is,iframeManager:fe,stylesheetManager:Z,shadowDomManager:we,processedNodeManager:ge,canvasManager:me,ignoreCSSAttributes:W,plugins:N?.filter(Re=>Re.observer)?.map(Re=>({observer:Re.observer,options:Re.options,callback:je=>nn({type:st.Plugin,data:{plugin:Re.name,payload:je}})}))||[]},{});fe.addLoadListener(xe=>{try{he.push(ye(xe.contentDocument))}catch(Re){console.warn(Re)}});const Te=()=>{Ce(),he.push(ye(document))};return document.readyState==="interactive"||document.readyState==="complete"?Te():(he.push(rr("DOMContentLoaded",()=>{nn({type:st.DomContentLoaded,data:{}}),V==="DOMContentLoaded"&&Te()})),he.push(rr("load",()=>{nn({type:st.Load,data:{}}),V==="load"&&Te()},window))),()=>{he.forEach(xe=>xe()),ge.destroy(),kf=void 0,U6()}}catch(he){console.warn(he)}}function oz(e){if(!kf)throw new Error("please take full snapshot after start recording");kf(e)}fi.mirror=is;fi.takeFullSnapshot=oz;function lz(e,t){try{return e?e(t):new e_}catch{return console.warn("Unable to initialize CanvasManager"),new e_}}var t_;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(t_||(t_={}));const uz=3,cz=5;function Tb(e){return e>9999999999?e:e*1e3}function zm(e){return e>9999999999?e/1e3:e}function Dc(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:st.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:as(t,10,1e3)}}),t.category==="console")))}const dz="button,a";function NR(e){return e.closest(dz)||e}function MR(e){const t=VR(e);return!t||!(t instanceof Element)?t:NR(t)}function VR(e){return fz(e)?e.target:e}function fz(e){return typeof e=="object"&&!!e&&"target"in e}let Ui;function pz(e){return Ui||(Ui=[],mz()),Ui.push(e),()=>{const t=Ui?Ui.indexOf(e):-1;t>-1&&Ui.splice(t,1)}}function mz(){dr(zt,"open",function(e){return function(...t){if(Ui)try{Ui.forEach(n=>n())}catch{}return e.apply(zt,t)}})}const hz=new Set([Je.Mutation,Je.StyleSheetRule,Je.StyleDeclaration,Je.AdoptedStyleSheet,Je.CanvasMutation,Je.Selection,Je.MediaInteraction]);function gz(e,t,n){e.handleClick(t,n)}class vz{constructor(t,n,r=Dc){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=pz(()=>{this._lastMutation=n_()});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(bz(n,this._ignoreSelector)||!Sz(t))return;const r={timestamp:zm(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=zm(t)}registerScroll(t=Date.now()){this._lastScroll=zm(t)}registerClick(t){const n=NR(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=n_();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:a,clickBreadcrumb:o}=t;if(i){const l=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,c=l<this._timeout*1e3?"mutation":"timeout",u={type:"default",message:o.message,timestamp:o.timestamp,category:"ui.slowClickDetected",data:{...o.data,url:zt.location.href,route:n.getCurrentRoute(),timeAfterClickMs:l,endReason:c,clickCount:a||1}};this._addBreadcrumbEvent(n,u);return}if(a>1){const l={type:"default",message:o.message,timestamp:o.timestamp,category:"ui.multiClick",data:{...o.data,url:zt.location.href,route:n.getCurrentRoute(),clickCount:a,metric:!0}};this._addBreadcrumbEvent(n,l)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=Ac(()=>this._checkClicks(),1e3)}}const yz=["A","BUTTON","INPUT"];function bz(e,t){return!!(!yz.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 Sz(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function n_(){return Date.now()/1e3}function wz(e,t){try{if(!_z(t))return;const{source:n}=t.data;if(hz.has(n)&&e.registerMutation(t.timestamp),n===Je.Scroll&&e.registerScroll(t.timestamp),kz(t)){const{type:r,id:s}=t.data,i=fi.mirror.getNode(s);i instanceof HTMLElement&&r===Qn.Click&&e.registerClick(i)}}catch{}}function _z(e){return e.type===uz}function kz(e){return e.data.source===Je.MouseInteraction}function Fs(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var Ib=(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))(Ib||{});const xz=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function Ez(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(xz.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const Cz=e=>t=>{if(!e.isEnabled())return;const n=Tz(t);if(!n)return;const r=t.name==="click",s=r?t.event:void 0;r&&e.clickDetector&&s?.target&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&gz(e.clickDetector,n,MR(t.event)),Dc(e,n)};function BR(e,t){const n=fi.mirror.getId(e),r=n&&fi.mirror.getNode(n),s=r&&fi.mirror.getMeta(r),i=s&&Rz(s)?s:null;return{message:t,data:i?{nodeId:n,node:{id:n,tagName:i.tagName,textContent:Array.from(i.childNodes).map(a=>a.type===Ib.Text&&a.textContent).filter(Boolean).map(a=>a.trim()).join(""),attributes:Ez(i.attributes)}}:{}}}function Tz(e){const{target:t,message:n}=Iz(e);return Fs({category:`ui.${e.name}`,...BR(t,n)})}function Iz(e){const t=e.name==="click";let n,r=null;try{r=t?MR(e.event):VR(e.event),n=yr(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function Rz(e){return e.type===Ib.Element}function Pz(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=Az(t);n&&Dc(e,n)}function Az(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i,target:a}=e;if(!a||Oz(a)||!i)return null;const o=t||r||s,l=i.length===1;if(!o&&l)return null;const c=yr(a,{maxStringLength:200})||"<unknown>",u=BR(a,c);return Fs({category:"ui.keyDown",message:c,data:{...u.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i}})}function Oz(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const Dz={resource:Mz,paint:Fz,navigation:Nz};function jm(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}function Lz(e){return e.map($z).filter(Boolean)}function $z(e){const t=Dz[e.entryType];return t?t(e):null}function al(e){return((Er()||zt.performance.timeOrigin)+e)/1e3}function Fz(e){const{duration:t,entryType:n,name:r,startTime:s}=e,i=al(s);return{type:n,name:r,start:i,end:i+t,data:void 0}}function Nz(e){const{entryType:t,name:n,decodedBodySize:r,duration:s,domComplete:i,encodedBodySize:a,domContentLoadedEventStart:o,domContentLoadedEventEnd:l,domInteractive:c,loadEventStart:u,loadEventEnd:d,redirectCount:p,startTime:m,transferSize:v,type:g}=e;return s===0?null:{type:`${t}.${g}`,start:al(m),end:al(i),name:n,data:{size:v,decodedBodySize:r,encodedBodySize:a,duration:s,domInteractive:c,domContentLoadedEventStart:o,domContentLoadedEventEnd:l,loadEventStart:u,loadEventEnd:d,domComplete:i,redirectCount:p}}}function Mz(e){const{entryType:t,initiatorType:n,name:r,responseEnd:s,startTime:i,decodedBodySize:a,encodedBodySize:o,responseStatus:l,transferSize:c}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:al(i),end:al(s),name:r,data:{size:c,statusCode:l,decodedBodySize:a,encodedBodySize:o}}}function Vz(e){const t=e.entries[e.entries.length-1],n=t?.element?[t.element]:void 0;return Rb(e,"largest-contentful-paint",n)}function Bz(e){return e.sources!==void 0}function Uz(e){const t=[],n=[];for(const r of e.entries)if(Bz(r)){const s=[];for(const i of r.sources)if(i.node){n.push(i.node);const a=fi.mirror.getId(i.node);a&&s.push(a)}t.push({value:r.value,nodeIds:s.length?s:void 0})}return Rb(e,"cumulative-layout-shift",n,t)}function zz(e){const t=e.entries[e.entries.length-1],n=t?.target?[t.target]:void 0;return Rb(e,"interaction-to-next-paint",n)}function Rb(e,t,n,r){const s=e.value,i=e.rating,a=al(s);return{type:"web-vital",name:t,start:a,end:a,data:{value:s,size:s,rating:i,nodeIds:n?n.map(o=>fi.mirror.getId(o)):void 0,attributions:r}}}function jz(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(Za(s,n))}),r.push(vb(jm(Vz,e)),gb(jm(Uz,e)),ZI(jm(zz,e))),()=>{r.forEach(s=>s())}}const Ge=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Hz='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,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}}},L=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)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=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(L(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}();function q(t,n){n||(n={});var r=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}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return 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&&O(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)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(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=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.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)}const N=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 B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[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 qz(){const e=new Blob([Hz]);return URL.createObjectURL(e)}const r_=["log","warn","error"],Od="[Replay] ";function Hm(e,t="info"){Ei({category:"console",data:{logger:"replay"},level:t,message:`${Od}${e}`},{level:t})}function Wz(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return Ge?(r_.forEach(r=>{n[r]=(...s)=>{Pe[r](Od,...s),t&&Hm(s.join(""),$I(r))}}),n.exception=(r,...s)=>{s.length&&n.error&&n.error(...s),Pe.error(Od,r),e?ds(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&Hm(r,"error")},n.infoTick=(...r)=>{Pe.log(Od,...r),t&&setTimeout(()=>Hm(r[0]),0)}):r_.forEach(r=>{n[r]=()=>{}}),n}const Ke=Wz();class Pb extends Error{constructor(){super(`Event buffer exceeded maximum size of ${wb}.`)}}class UR{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>wb)throw new Pb;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?Tb(t):null}}class Gz{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(){Ge&&Ke.log("Destroying compression worker"),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((s,i)=>{const a=({data:o})=>{const l=o;if(l.method===t&&l.id===r){if(this._worker.removeEventListener("message",a),!l.success){Ge&&Ke.error("Error in compression worker: ",l.response),i(new Error("Error in compression worker"));return}s(l.response)}};this._worker.addEventListener("message",a),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}}class Kz{constructor(t){this._worker=new Gz(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=Tb(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>wb?Promise.reject(new Pb):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{Ge&&Ke.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 Yz{constructor(t){this._fallback=new UR,this._compression=new Kz(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){Ge&&Ke.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){Ge&&Ke.exception(i,"Failed to add events when switching buffers.")}}}function Jz({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=Xz(t);if(n)return n}return Ge&&Ke.log("Using simple buffer"),new UR}function Xz(e){try{const t=e||Qz();if(!t)return;Ge&&Ke.log(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new Yz(n)}catch(t){Ge&&Ke.exception(t,"Failed to create compression worker")}}function Qz(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?qz():""}function Ab(){try{return"sessionStorage"in zt&&!!zt.sessionStorage}catch{return!1}}function Zz(e){ej(),e.session=void 0}function ej(){if(Ab())try{zt.sessionStorage.removeItem(bb)}catch{}}function zR(e){return e===void 0?!1:Math.random()<e}function Rp(e){if(Ab())try{zt.sessionStorage.setItem(bb,JSON.stringify(e))}catch{}}function jR(e){const t=Date.now(),n=e.id||Dr(),r=e.started||t,s=e.lastActivity||t,i=e.segmentId||0,a=e.sampled,o=e.previousSessionId,l=e.dirty||!1;return{id:n,started:r,lastActivity:s,segmentId:i,sampled:a,previousSessionId:o,dirty:l}}function tj(e,t){return zR(e)?"session":t?"buffer":!1}function s_({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const s=tj(e,t),i=jR({sampled:s,previousSessionId:r});return n&&Rp(i),i}function nj(){if(!Ab())return null;try{const e=zt.sessionStorage.getItem(bb);if(!e)return null;const t=JSON.parse(e);return Ge&&Ke.infoTick("Loading existing session"),jR(t)}catch{return null}}function av(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function HR(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return av(e.started,t,r)||av(e.lastActivity,n,r)}function qR(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!HR(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function qm({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const s=r.stickySession&&nj();return s?qR(s,{sessionIdleExpire:e,maxReplayDuration:t})?(Ge&&Ke.infoTick("Session in sessionStorage is expired, creating new one..."),s_(r,{previousSessionId:s.id})):s:(Ge&&Ke.infoTick("Creating new session"),s_(r,{previousSessionId:n}))}function rj(e){return e.type===st.Custom}function Ob(e,t,n){return GR(e,t)?(WR(e,t,n),!0):!1}function sj(e,t,n){return GR(e,t)?WR(e,t,n):Promise.resolve(null)}async function WR(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(),a=ij(t,i.beforeAddRecordingEvent);return a?await r.addEvent(a):void 0}catch(i){const a=i&&i instanceof Pb,o=a?"addEventSizeExceeded":"addEvent",l=at();if(l){const c=a?"buffer_overflow":"internal_sdk_error";l.recordDroppedEvent(c,"replay")}if(a&&s)return r.clear(),r.waitForCheckout=!0,null;e.handleException(i),await e.stop({reason:o})}}function GR(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=Tb(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(Ge&&Ke.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function ij(e,t){try{if(typeof t=="function"&&rj(e))return t(e)}catch(n){return Ge&&Ke.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function Db(e){return!e.type}function ov(e){return e.type==="transaction"}function aj(e){return e.type==="replay_event"}function i_(e){return e.type==="feedback"}function oj(e){return(t,n)=>{if(!e.isEnabled()||!Db(t)&&!ov(t))return;const r=n.statusCode;if(!(!r||r<200||r>=300)){if(ov(t)){lj(e,t);return}uj(e,t)}}}function lj(e,t){const n=e.getContext();t.contexts?.trace?.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function uj(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)||Ac(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(s){e.handleException(s)}})}function cj(e){return t=>{!e.isEnabled()||!Db(t)||dj(e,t)}}function dj(e,t){const n=t.exception?.values?.[0]?.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 r=Fs({category:"replay.hydrate-error",data:{url:Rl()}});Dc(e,r)}}function fj(e){const t=at();t&&t.on("beforeAddBreadcrumb",n=>pj(e,n))}function pj(e,t){if(!e.isEnabled()||!KR(t))return;const n=mj(t);n&&Dc(e,n)}function mj(e){return!KR(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?hj(e):Fs(e)}function hj(e){const t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return Fs(e);let n=!1;const r=t.map(s=>{if(!s)return s;if(typeof s=="string")return s.length>rd?(n=!0,`${s.slice(0,rd)}…`):s;if(typeof s=="object")try{const i=as(s,7);return JSON.stringify(i).length>rd?(n=!0,`${JSON.stringify(i,null,2).slice(0,rd)}…`):i}catch{}return s});return Fs({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function KR(e){return!!e.category}function gj(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function YR(){const e=St().getPropagationContext().dsc;e&&delete e.replay_id;const t=Un();if(t){const n=xi(t);delete n.replay_id}}function vj(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:st.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 yj(e,t){return e.recordingMode!=="buffer"||t.message===Sb||!t.exception||t.type?!1:zR(e.getOptions().errorSampleRate)}function bj(e){return Object.assign((t,n)=>{if(!e.isEnabled()||e.isPaused())return t;if(aj(t))return delete t.breadcrumbs,t;if(!Db(t)&&!ov(t)&&!i_(t))return t;if(!e.checkAndHandleExpiredSession())return YR(),t;if(i_(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),vj(e,t),t;if(gj(t,n)&&!e.getOptions()._experiments.captureExceptions)return Ge&&Ke.log("Ignoring error from rrweb internals",t),null;const s=yj(e,t);if((s||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),s&&e.recordingMode==="buffer"&&e.session?.sampled==="buffer"){const a=e.session;a.dirty=!0,e.getOptions().stickySession&&Rp(a)}return t},{id:"Replay"})}function Pp(e,t){return t.map(({type:n,start:r,end:s,name:i,data:a})=>{const o=e.throttledAddEvent({type:st.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:i,startTimestamp:r,endTimestamp:s,data:a}}});return typeof o=="string"?Promise.resolve(null):o})}function Sj(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 wj(e){return t=>{if(!e.isEnabled())return;const n=Sj(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(Pp(e,[n]),!1)))}}function _j(e,t){return Ge&&e.getOptions()._experiments.traceInternals?!1:dU(t,at())}function JR(e,t){e.isEnabled()&&t!==null&&(_j(e,t.name)||e.addUpdate(()=>(Pp(e,[t]),!0)))}function Ap(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=lR(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function XR(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function xf(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 QR(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:s,method:i,statusCode:a,request:o,response:l}=t;return{type:e,start:n/1e3,end:r/1e3,name:s,data:{method:i,statusCode:a,request:o,response:l}}}function ju(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Wi(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}=kj(n);return r.body=s,i?.length&&(r._meta={warnings:i}),r}function lv(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 kj(e){if(!e||typeof e!="string")return{body:e};const t=e.length>Vw,n=xj(e);if(t){const r=e.slice(0,Vw);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 xj(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function Ef(e,t){const n=Ej(e);return ci(n,t)}function Ej(e,t=zt.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(zt.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 Cj(e,t,n){try{const r=await Ij(e,t,n),s=QR("resource.fetch",r);JR(n.replay,s)}catch(r){Ge&&Ke.exception(r,"Failed to capture fetch breadcrumb")}}function Tj(e,t){const{input:n,response:r}=t,s=n?cR(n):void 0,i=Ap(s),a=r?XR(r.headers.get("content-length")):void 0;i!==void 0&&(e.data.request_body_size=i),a!==void 0&&(e.data.response_body_size=a)}async function Ij(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r}=t,{url:a,method:o,status_code:l=0,request_body_size:c,response_body_size:u}=e.data,d=Ef(a,n.networkDetailAllowUrls)&&!Ef(a,n.networkDetailDenyUrls),p=d?Rj(n,t.input,c):ju(c),m=await Pj(d,n,t.response,u);return{startTimestamp:s,endTimestamp:i,url:a,method:o,statusCode:l,request:p,response:m}}function Rj({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const s=n?Dj(n,t):{};if(!e)return Wi(s,r,void 0);const i=cR(n),[a,o]=uR(i,Ke),l=Wi(s,r,a);return o?xf(l,o):l}async function Pj(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,s){if(!e&&s!==void 0)return ju(s);const i=r?ZR(r.headers,n):{};if(!r||!t&&s!==void 0)return Wi(i,s,void 0);const[a,o]=await Oj(r),l=Aj(a,{networkCaptureBodies:t,responseBodySize:s,captureDetails:e,headers:i});return o?xf(l,o):l}function Aj(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:s}){try{const i=e?.length&&n===void 0?Ap(e):n;return r?t?Wi(s,i,e):Wi(s,i,void 0):ju(i)}catch(i){return Ge&&Ke.exception(i,"Failed to serialize response body"),Wi(s,n,void 0)}}async function Oj(e){const t=Lj(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await $j(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(Ge&&Ke.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(Ge&&Ke.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function ZR(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function Dj(e,t){return e.length===1&&typeof e[0]!="string"?a_(e[0],t):e.length===2?a_(e[1],t):{}}function a_(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?ZR(n,t):Array.isArray(n)?{}:lv(n,t):{}}function Lj(e){try{return e.clone()}catch(t){Ge&&Ke.exception(t,"Failed to clone response body")}}function $j(e){return new Promise((t,n)=>{const r=Ac(()=>n(new Error("Timeout while trying to read response body")),500);Fj(e).then(s=>t(s),s=>n(s)).finally(()=>clearTimeout(r))})}async function Fj(e){return await e.text()}async function Nj(e,t,n){try{const r=Vj(e,t,n),s=QR("resource.xhr",r);JR(n.replay,s)}catch(r){Ge&&Ke.exception(r,"Failed to capture xhr breadcrumb")}}function Mj(e,t){const{xhr:n,input:r}=t;if(!n)return;const s=Ap(r),i=n.getResponseHeader("content-length")?XR(n.getResponseHeader("content-length")):zj(n.response,n.responseType);s!==void 0&&(e.data.request_body_size=s),i!==void 0&&(e.data.response_body_size=i)}function Vj(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r,input:a,xhr:o}=t,{url:l,method:c,status_code:u=0,request_body_size:d,response_body_size:p}=e.data;if(!l)return null;if(!o||!Ef(l,n.networkDetailAllowUrls)||Ef(l,n.networkDetailDenyUrls)){const x=ju(d),C=ju(p);return{startTimestamp:s,endTimestamp:i,url:l,method:c,statusCode:u,request:x,response:C}}const m=o[Ca],v=m?lv(m.request_headers,n.networkRequestHeaders):{},g=lv(dR(o),n.networkResponseHeaders),[b,y]=n.networkCaptureBodies?uR(a,Ke):[void 0],[w,_]=n.networkCaptureBodies?Bj(o):[void 0],T=Wi(v,d,b),P=Wi(g,p,w);return{startTimestamp:s,endTimestamp:i,url:l,method:c,statusCode:u,request:y?xf(T,y):T,response:_?xf(P,_):P}}function Bj(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return Uj(e.response,e.responseType)}catch(n){t.push(n)}return Ge&&Ke.warn("Failed to get xhr response body",...t),[void 0]}function Uj(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 Ge&&Ke.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Ge&&Ke.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function zj(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return Ap(n)}catch{return}}function jj(e){const t=at();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:i,networkResponseHeaders:a}=e.getOptions(),o={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:i,networkResponseHeaders:a};t&&t.on("beforeAddBreadcrumb",(l,c)=>Hj(o,l,c))}catch{}}function Hj(e,t,n){if(t.data)try{qj(t)&&Gj(n)&&(Mj(t,n),Nj(t,n,e)),Wj(t)&&Kj(n)&&(Tj(t,n),Cj(t,n,e))}catch(r){Ge&&Ke.exception(r,"Error when enriching network breadcrumb")}}function qj(e){return e.category==="xhr"}function Wj(e){return e.category==="fetch"}function Gj(e){return e?.xhr}function Kj(e){return e?.response}function Yj(e){const t=at();iR(Cz(e)),Ep(wj(e)),fj(e),jj(e);const n=bj(e);O3(n),t&&(t.on("beforeSendEvent",cj(e)),t.on("afterSendEvent",oj(e)),t.on("createDsc",r=>{const s=e.getSessionId();s&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(r.replay_id=s)}),t.on("spanStart",r=>{e.lastActiveSpan=r}),t.on("spanEnd",r=>{e.lastActiveSpan=r}),t.on("beforeSendFeedback",async(r,s)=>{const i=e.getSessionId();s?.includeReplay&&e.isEnabled()&&i&&r.contexts?.feedback&&(r.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),r.contexts.feedback.replay_id=i)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}async function Jj(e){try{return Promise.all(Pp(e,[Xj(zt.performance.memory)]))}catch{return[]}}function Xj(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 Qj(e,t,n){return vU(e,t,{...n,setTimeoutImpl:Ac})}const od=ct.navigator;function Zj(){return/iPhone|iPad|iPod/i.test(od?.userAgent??"")||/Macintosh/i.test(od?.userAgent??"")&&od?.maxTouchPoints&&od?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function eH(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){Ge&&Ke.warn("Received replay event after session expired.");return}const s=r||!t;t=!0,e.clickDetector&&wz(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&s&&e.setInitialState(),!Ob(e,n,s))return!0;if(!s)return!1;const i=e.session;if(nH(e,s),e.recordingMode==="buffer"&&i&&e.eventBuffer&&!i.dirty){const a=e.eventBuffer.getEarliestTimestamp();a&&(Ge&&Ke.log(`Updating session start time to earliest event in buffer to ${new Date(a)}`),i.started=a,e.getOptions().stickySession&&Rp(i))}return i?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function tH(e){const t=e.getOptions();return{type:st.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 nH(e,t){!t||!e.session||e.session.segmentId!==0||Ob(e,tH(e),!1)}function rH(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function sH(e,t,n,r){return ca(cI(e,tb(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function iH({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
39
+ `;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 aH({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 a=await gI(e.getOptions(),r,i,t,e,Ws());if(!a)return null;e.emit("postprocessEvent",a,i),a.platform=a.platform||"javascript";const o=e.getSdkMetadata(),{name:l,version:c,settings:u}=o?.sdk||{};return a.sdk={...a.sdk,name:l||"sentry.javascript.unknown",version:c||"0.0.0",settings:u},a}async function oH({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:s,session:i}){const a=iH({recordingData:e,headers:{segment_id:n}}),{urls:o,errorIds:l,traceIds:c,initialTimestamp:u}=r,d=at(),p=St(),m=d?.getTransport(),v=d?.getDsn();if(!d||!m||!v||!i.sampled)return Promise.resolve({});const g={type:N5,replay_start_timestamp:u/1e3,timestamp:s/1e3,error_ids:l,trace_ids:c,urls:o,replay_id:t,segment_id:n,replay_type:i.sampled},b=await aH({scope:p,client:d,replayId:t,event:g});if(!b)return d.recordDroppedEvent("event_processor","replay"),Ge&&Ke.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete b.sdkProcessingMetadata;const y=sH(b,a,v,d.getOptions().tunnel);let w;try{w=await m.send(y)}catch(T){const P=new Error(Sb);try{P.cause=T}catch{}throw P}if(typeof w.statusCode=="number"&&(w.statusCode<200||w.statusCode>=300))throw new eP(w.statusCode);const _=CI({},w);if(EI(_,"replay"))throw new Lb(_);return w}class eP extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class Lb extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function tP(e,t={count:0,interval:j5}){const{recordingData:n,onError:r}=e;if(n.length)try{return await oH(e),!0}catch(s){if(s instanceof eP||s instanceof Lb)throw s;if(P3("Replays",{_retryCount:t.count}),r&&r(s),t.count>=H5){const i=new Error(`${Sb} - max retries exceeded`);try{i.cause=s}catch{}throw i}return t.interval*=++t.count,new Promise((i,a)=>{Ac(async()=>{try{await tP(e,t),i(!0)}catch(o){a(o)}},t.interval)})}}const nP="__THROTTLED",lH="__SKIPPED";function uH(e,t,n){const r=new Map,s=o=>{const l=o-n;r.forEach((c,u)=>{u<l&&r.delete(u)})},i=()=>[...r.values()].reduce((o,l)=>o+l,0);let a=!1;return(...o)=>{const l=Math.floor(Date.now()/1e3);if(s(l),i()>=t){const u=a;return a=!0,u?lH:nP}a=!1;const c=r.get(l)||0;return r.set(l,c+1),e(...o)}}class cH{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:M5,sessionIdleExpire:V5},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=Qj(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=uH((a,o)=>sj(this,a,o),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:s}=this.getOptions(),i=r?{threshold:Math.min(q5,r),timeout:r,scrollTimeout:W5,ignoreSelector:s?s.join(","):""}:void 0;if(i&&(this.clickDetector=new vz(this,i)),Ge){const a=t._experiments;Ke.setConfig({captureExceptions:!!a.captureExceptions,traceInternals:!!a.traceInternals})}this._handleVisibilityChange=()=>{zt.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const a=Fs({category:"ui.blur"});this._doChangeToBackgroundTasks(a)},this._handleWindowFocus=()=>{const a=Fs({category:"ui.focus"});this._doChangeToForegroundTasks(a)},this._handleKeyboardEvent=a=>{Pz(this,a)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){Ge&&Ke.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){Ge&&Ke.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",Ge&&Ke.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){Ge&&Ke.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){Ge&&Ke.log("Buffering is in progress, call `flush()` to save the replay");return}Ge&&Ke.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=qm({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled){Ge&&Ke.log("Buffering is in progress, call `flush()` to save the replay");return}Ge&&Ke.infoTick("Starting replay in buffer mode");const t=qm({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=fi({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:z5}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:eH(this),...Zj(),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}={}){if(this._isEnabled){this._isEnabled=!1,this.recordingMode="buffer";try{Ge&&Ke.log(`Stopping Replay${n?` triggered by ${n}`:""}`),YR(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,Zz(this)}catch(r){this.handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),Ge&&Ke.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),Ge&&Ke.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();Ge&&Ke.log("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode==="buffer"||!this._isEnabled||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(t){if(!(t&&this.session?.sampled===!1))return this.session?.id}checkAndHandleExpiredSession(){if(this._lastActivity&&av(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${zt.location.pathname}${zt.location.hash}${zt.location.search}`,n=`${zt.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===nP){const s=Fs({category:"replay.throttled"});this.addUpdate(()=>!Ob(this,{type:cz,timestamp:s.timestamp||0,data:{tag:"breadcrumb",payload:s,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||Un(),n=t&&Nn(t),s=(n&&ft(n).data||{})[fr];if(!(!n||!s||!["route","custom"].includes(s)))return ft(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Jz({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=qm({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 qR(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{zt.document.addEventListener("visibilitychange",this._handleVisibilityChange),zt.addEventListener("blur",this._handleWindowBlur),zt.addEventListener("focus",this._handleWindowFocus),zt.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(Yj(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=jz(this)}_removeListeners(){try{zt.document.removeEventListener("visibilitychange",this._handleVisibilityChange),zt.removeEventListener("blur",this._handleWindowBlur),zt.removeEventListener("focus",this._handleWindowFocus),zt.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){!this.session||HR(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()){Ge&&Ke.log("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:st.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=Lz(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(Pp(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(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){Ge&&Ke.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await Jj(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const r=this._popEventContext(),s=this.session.segmentId++;this._maybeSaveSession();const i=await this.eventBuffer.finish();await tP({replayId:t,recordingData:i,segmentId:s,eventContext:r,session:this.session,timestamp:n,onError:a=>this.handleException(a)})}catch(n){this.handleException(n),this.stop({reason:"sendReplay"});const r=at();if(r){const s=n instanceof Lb?"ratelimit_backoff":"send_error";r.recordDroppedEvent(s,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){Ge&&Ke.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,a=s>this._options.maxReplayDuration+5e3;if(i||a){Ge&&Ke.log(`Session duration (${Math.floor(s/1e3)}s) is too ${i?"short":"long"}, not sending replay.`),i&&this._debouncedFlush();return}const o=this.eventBuffer;o&&this.session.segmentId===0&&!o.hasCheckout&&Ge&&Ke.log("Flushing initial segment without checkout.");const l=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(c){this.handleException(c)}finally{this._flushLock=void 0,l&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&Rp(this.session)}_onMutationHandler(t){const{ignoreMutations:n}=this._options._experiments;if(n?.length&&t.some(o=>{const l=rH(o.target),c=n.join(",");return l?.matches(c)}))return!1;const r=t.length,s=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,a=s&&r>s;if(r>i||a){const o=Fs({category:"replay.mutations",data:{count:r,limit:a}});this._createCustomBreadcrumb(o)}return a?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function Ql(e,t){return[...e,...t].join(",")}function dH({mask:e,unmask:t,block:n,unblock:r,ignore:s}){const i=["base","iframe[srcdoc]:not([src])"],a=Ql(e,[".sentry-mask","[data-sentry-mask]"]),o=Ql(t,[]);return{maskTextSelector:a,unmaskTextSelector:o,blockSelector:Ql(n,[".sentry-block","[data-sentry-block]",...i]),unblockSelector:Ql(r,[]),ignoreSelector:Ql(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function fH({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 o_='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',pH=["content-length","content-type","accept"],mH=Symbol.for("sentry__originalRequestBody");let l_=!1,u_=!1;function hH(){if(typeof Request>"u"||u_)return;const e=Request;try{const t=function(n,r){const s=new e(n,r);return r?.body!=null&&(s[mH]=r.body),s};t.prototype=e.prototype,ct.Request=t,u_=!0}catch{}}const gH=(e=>new vH(e));class vH{constructor({flushMinDelay:t=B5,flushMaxDelay:n=U5,minReplayDuration:r=G5,maxReplayDuration:s=Bw,stickySession:i=!0,useCompression:a=!0,workerUrl:o,_experiments:l={},maskAllText:c=!0,maskAllInputs:u=!0,blockAllMedia:d=!0,mutationBreadcrumbLimit:p=750,mutationLimit:m=1e4,slowClickTimeout:v=7e3,slowClickIgnoreSelectors:g=[],networkDetailAllowUrls:b=[],networkDetailDenyUrls:y=[],networkCaptureBodies:w=!0,networkRequestHeaders:_=[],networkResponseHeaders:T=[],mask:P=[],maskAttributes:x=["title","placeholder","aria-label"],unmask:C=[],block:E=[],unblock:R=[],ignore:I=[],maskFn:O,beforeAddRecordingEvent:L,beforeErrorSampling:V,onError:F,attachRawBodyFromRequest:B=!1}={}){this.name="Replay";const M=dH({mask:P,unmask:C,block:E,unblock:R,ignore:I});if(this._recordingOptions={maskAllInputs:u,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:O,maskInputFn:O,maskAttributeFn:(N,D,W)=>fH({maskAttributes:x,maskAllText:c,privacyOptions:M,key:N,value:D,el:W}),...M,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:N=>{try{N.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!l.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,K5),maxReplayDuration:Math.min(s,Bw),stickySession:i,useCompression:a,workerUrl:o,blockAllMedia:d,maskAllInputs:u,maskAllText:c,mutationBreadcrumbLimit:p,mutationLimit:m,slowClickTimeout:v,slowClickIgnoreSelectors:g,networkDetailAllowUrls:b,networkDetailDenyUrls:y,networkCaptureBodies:w,networkRequestHeaders:c_(_),networkResponseHeaders:c_(T),beforeAddRecordingEvent:L,beforeErrorSampling:V,onError:F,attachRawBodyFromRequest:B,_experiments:l},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${o_}`:o_,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&qg())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return l_}set _isInitialized(t){l_=t}afterAllSetup(t){!qg()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&hH(),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(t){if(this._replay?.isEnabled())return this._replay.getSessionId(t)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=yH(this._initialOptions,t);this._replay=new cH({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function yH(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},s=Xa(n.replaysSessionSampleRate),i=Xa(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 c_(e){return[...pH,...e.map(t=>t.toLowerCase())]}function bH(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function rP(e){try{return new URL(e,gt.location.origin).href}catch{return}}function SH(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function sP(e){try{return new Headers(e)}catch{return}}const d_=new WeakMap,Wm=new Map,iP={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function wH(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:s,shouldCreateSpanForRequest:i,enableHTTPTimings:a,tracePropagationTargets:o,onRequestSpanStart:l,onRequestSpanEnd:c}={...iP,...t},u=typeof i=="function"?i:v=>!0,d=v=>_H(v,o),p={},m=e.getOptions().propagateTraceparent;n&&(e.addEventProcessor(v=>(v.type==="transaction"&&v.spans&&v.spans.forEach(g=>{if(g.op==="http.client"){const b=Wm.get(g.span_id);b&&(g.timestamp=b/1e3,Wm.delete(g.span_id))}}),v)),s&&QU(v=>{if(v.response){const g=d_.get(v.response);g&&v.endTimestamp&&Wm.set(g,v.endTimestamp)}}),VI(v=>{const g=zU(v,u,d,p,{propagateTraceparent:m,onRequestSpanEnd:c});if(v.response&&v.fetchData.__span&&d_.set(v.response,v.fetchData.__span),g){const b=rP(v.fetchData.url),y=b?Ma(b).host:void 0;g.setAttributes({"http.url":b,"server.address":y}),a&&f_(g),l?.(g,{headers:v.headers})}})),r&&oR(v=>{const g=kH(v,u,d,p,m,c);g&&(a&&f_(g),l?.(g,{headers:sP(v.xhr.__sentry_xhr_v3__?.request_headers)}))})}function f_(e){const{url:t}=ft(e).data;if(!t||typeof t!="string")return;const n=Za("resource",({entries:r})=>{r.forEach(s=>{SH(s)&&s.name.endsWith(t)&&(e.setAttributes(sR(s)),setTimeout(n))})})}function _H(e,t){const n=Rl();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?ci(r.toString(),t)||i&&ci(r.pathname,t):i}else{const r=!!e.match(/^\/(?!\/)/);return t?ci(e,t):r}}function kH(e,t,n,r,s,i){const a=e.xhr,o=a?.[Ca];if(!a||a.__sentry_own_request__||!o)return;const{url:l,method:c}=o,u=Xr()&&t(l);if(e.endTimestamp&&u){const y=a.__sentry_xhr_span_id__;if(!y)return;const w=r[y];w&&o.status_code!==void 0&&(KT(w,o.status_code),w.end(),i?.(w,{headers:sP(dR(a)),error:e.error}),delete r[y]);return}const d=rP(l),p=Ma(d||l),m=cU(l),v=!!Un(),g=u&&v?ea({name:`${c} ${m}`,attributes:{url:l,type:"xhr","http.method":c,"http.url":d,"server.address":p?.host,[en]:"auto.http.browser",[ki]:"http.client",...p?.search&&{"http.query":p?.search},...p?.hash&&{"http.fragment":p?.hash}}}):new Zi;a.__sentry_xhr_span_id__=g.spanContext().spanId,r[a.__sentry_xhr_span_id__]=g,n(l)&&xH(a,Xr()&&v?g:void 0,s);const b=at();return b&&b.emit("beforeOutgoingRequestSpan",g,e),g}function xH(e,t,n){const{"sentry-trace":r,baggage:s,traceparent:i}=LI({span:t,propagateTraceparent:n});r&&EH(e,r,s,i)}function EH(e,t,n,r){const s=e.__sentry_xhr_v3__?.request_headers;if(!(s?.["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),r&&!s?.traceparent&&e.setRequestHeader("traceparent",r),n){const i=s?.baggage;(!i||!bH(i))&&e.setRequestHeader("baggage",n)}}catch{}}function CH(){gt.document?gt.document.addEventListener("visibilitychange",()=>{const e=Un();if(!e)return;const t=Nn(e);if(gt.document.hidden&&t){const n="cancelled",{op:r,status:s}=ft(t);es&&Pe.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),s||t.setStatus({code:xn,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):es&&Pe.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const TH=3600,aP="sentry_previous_trace",IH="sentry.previous_trace";function RH(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let s=r?OH():void 0;e.on("spanStart",a=>{if(Nn(a)!==a)return;const o=St().getPropagationContext();s=PH(s,a,o),r&&AH(s)});let i=!0;n&&e.on("beforeSampling",a=>{if(!s)return;const o=St(),l=o.getPropagationContext();if(i&&l.parentSpanId){i=!1;return}o.setPropagationContext({...l,dsc:{...l.dsc,sample_rate:String(s.sampleRate),sampled:String(uv(s.spanContext))},sampleRand:s.sampleRand}),a.parentSampled=uv(s.spanContext),a.parentSampleRate=s.sampleRate,a.spanAttributes={...a.spanAttributes,[GT]:s.sampleRate}})}function PH(e,t,n){const r=ft(t);function s(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[Yy])}catch{return 0}}const i={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:s(),sampleRand:n.sampleRand};if(!e)return i;const a=e.spanContext;return a.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=TH&&(es&&Pe.log(`Adding previous_trace \`${JSON.stringify(a)}\` link to span \`${JSON.stringify({op:r.op,...t.spanContext()})}\``),t.addLink({context:a,attributes:{[rB]:"previous_trace"}}),t.setAttribute(IH,`${a.traceId}-${a.spanId}-${uv(a)?1:0}`)),i)}function AH(e){try{gt.sessionStorage.setItem(aP,JSON.stringify(e))}catch(t){es&&Pe.warn("Could not store previous trace in sessionStorage",t)}}function OH(){try{const e=gt.sessionStorage?.getItem(aP);return JSON.parse(e)}catch{return}}function uv(e){return e.traceFlags===1}const DH="BrowserTracing",LH={...Cd,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...iP},p_=((e={})=>{const t={name:void 0,source:void 0},n=gt.document,{enableInp:r,enableElementTiming:s,enableLongTask:i,enableLongAnimationFrame:a,_experiments:{enableInteractions:o,enableStandaloneClsSpans:l,enableStandaloneLcpSpans:c},beforeStartSpan:u,idleTimeout:d,finalTimeout:p,childSpanTimeout:m,markBackgroundSpan:v,traceFetch:g,traceXHR:b,trackFetchStreamPerformance:y,shouldCreateSpanForRequest:w,enableHTTPTimings:_,ignoreResourceSpans:T,ignorePerformanceApiSpans:P,instrumentPageLoad:x,instrumentNavigation:C,detectRedirects:E,linkPreviousTrace:R,consistentTraceSampling:I,enableReportPageLoaded:O,onRequestSpanStart:L,onRequestSpanEnd:V}={...LH,...e};let F,B,M;function N(D,W,z=!0){const K=W.op==="pageload",H=W.name,re=u?u(W):W,ae=re.attributes||{};if(H!==re.name&&(ae[fr]="custom",re.attributes=ae),!z){const X=fo();ea({...re,startTime:X}).end(X);return}t.name=re.name,t.source=ae[fr];const de=hI(re,{idleTimeout:d,finalTimeout:p,childSpanTimeout:m,disableAutoFinish:K,beforeSpanEnd:X=>{F?.(),o8(X,{recordClsOnPageloadSpan:!l,recordLcpOnPageloadSpan:!c,ignoreResourceSpans:T,ignorePerformanceApiSpans:P}),h_(D,void 0);const ie=St(),ne=ie.getPropagationContext();ie.setPropagationContext({...ne,traceId:de.spanContext().traceId,sampled:ua(de),dsc:xi(X)}),K&&(M=void 0)},trimIdleSpanEndTimestamp:!O});K&&O&&(M=de),h_(D,de);function De(){n&&["interactive","complete"].includes(n.readyState)&&D.emit("idleSpanEnableAutoFinish",de)}K&&!O&&n&&(n.addEventListener("readystatechange",()=>{De()}),De())}return{name:DH,setup(D){if(OB(),F=e8({recordClsStandaloneSpans:l||!1,recordLcpStandaloneSpans:c||!1,client:D}),r&&D8(),s&&b8(),a&&ct.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?n8():i&&t8(),o&&r8(),E&&n){const z=()=>{B=cn()};addEventListener("click",z,{capture:!0}),addEventListener("keydown",z,{capture:!0,passive:!0})}function W(){const z=Hu(D);z&&!ft(z).timestamp&&(es&&Pe.log(`[Tracing] Finishing current active span with op: ${ft(z).op}`),z.setAttribute(Nu,"cancelled"),z.end())}D.on("startNavigationSpan",(z,K)=>{if(at()!==D)return;if(K?.isRedirect){es&&Pe.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),N(D,{op:"navigation.redirect",...z},!1);return}B=void 0,W(),Ws().setPropagationContext({traceId:_i(),sampleRand:Math.random(),propagationSpanId:Xr()?void 0:di()});const H=St();H.setPropagationContext({traceId:_i(),sampleRand:Math.random(),propagationSpanId:Xr()?void 0:di()}),H.setSDKProcessingMetadata({normalizedRequest:void 0}),N(D,{op:"navigation",...z,parentSpan:null,forceTransaction:!0})}),D.on("startPageLoadSpan",(z,K={})=>{if(at()!==D)return;W();const H=K.sentryTrace||m_("sentry-trace"),re=K.baggage||m_("baggage"),ae=kB(H,re),de=St();de.setPropagationContext(ae),Xr()||(de.getPropagationContext().propagationSpanId=di()),de.setSDKProcessingMetadata({normalizedRequest:ub()}),N(D,{op:"pageload",...z})}),D.on("endPageloadSpan",()=>{O&&M&&(M.setAttribute(Nu,"reportPageLoaded"),M.end())})},afterAllSetup(D){let W=Rl();if(R!=="off"&&RH(D,{linkPreviousTrace:R,consistentTraceSampling:I}),gt.location){if(x){const z=Er();$H(D,{name:gt.location.pathname,startTime:z?z/1e3:void 0,attributes:{[fr]:"url",[en]:"auto.pageload.browser"}})}C&&Ep(({to:z,from:K})=>{if(K===void 0&&W?.indexOf(z)!==-1){W=void 0;return}W=void 0;const H=lb(z),re=Hu(D),ae=re&&E&&NH(re,B);oP(D,{name:H?.pathname||gt.location.pathname,attributes:{[fr]:"url",[en]:"auto.navigation.browser"}},{url:z,isRedirect:ae})})}v&&CH(),o&&FH(D,d,p,m,t),r&&F8(),wH(D,{traceFetch:g,traceXHR:b,trackFetchStreamPerformance:y,tracePropagationTargets:D.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:w,enableHTTPTimings:_,onRequestSpanStart:L,onRequestSpanEnd:V})}}});function $H(e,t,n){e.emit("startPageLoadSpan",t,n),St().setTransactionName(t.name);const r=Hu(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function oP(e,t,n){const{url:r,isRedirect:s}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:s}),e.emit("startNavigationSpan",t,{isRedirect:s});const i=St();return i.setTransactionName(t.name),r&&!s&&i.setSDKProcessingMetadata({normalizedRequest:{...ub(),url:r}}),Hu(e)}function m_(e){return gt.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function FH(e,t,n,r,s){const i=gt.document;let a;const o=()=>{const l="ui.action.click",c=Hu(e);if(c){const u=ft(c).op;if(["navigation","pageload"].includes(u)){es&&Pe.warn(`[Tracing] Did not create ${l} span because a pageload or navigation span is in progress.`);return}}if(a&&(a.setAttribute(Nu,"interactionInterrupted"),a.end(),a=void 0),!s.name){es&&Pe.warn(`[Tracing] Did not create ${l} transaction because _latestRouteName is missing.`);return}a=hI({name:s.name,op:l,attributes:{[fr]:s.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};i&&addEventListener("click",o,{capture:!0})}const lP="_sentry_idleSpan";function Hu(e){return e[lP]}function h_(e,t){br(e,lP,t)}const g_=1.5;function NH(e,t){const n=ft(e),r=fo(),s=n.start_timestamp;return!(r-s>g_||t&&r-t<=g_)}const uP=["activate","mount"],cP=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,MH=/(?:^|[-_])(\w)/g,VH=e=>e.replace(MH,t=>t.toUpperCase()).replace(/[-_]/g,""),BH="<Root>",Gm="<Anonymous>",UH=(e,t)=>e.repeat(t),bu=(e,t)=>{if(!e)return Gm;if(e.$root===e)return BH;if(!e.$options)return Gm;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?`<${VH(r)}>`:Gm)+(s&&t!==!1?` at ${s}`:"")},zH=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`
40
+
41
+ found in
42
+
43
+ ${t.map((s,i)=>`${(i===0?"---> ":UH(" ",5+i*2))+(Array.isArray(s)?`${bu(s[0])}... (${s[1]} recursive calls)`:bu(s))}`).join(`
44
+ `)}`}return`
45
+
46
+ (found in ${bu(e)})`},jH=(e,t)=>{const{errorHandler:n}=e.config;e.config.errorHandler=(r,s,i)=>{const a=bu(s,!1),o=s?zH(s):"",l={componentName:a,lifecycleHook:i,trace:o};if(t?.attachProps!==!1&&s&&(s.$options?.propsData?l.propsData=s.$options.propsData:s.$props&&(l.propsData=s.$props)),setTimeout(()=>{ds(r,{captureContext:{contexts:{vue:l}},mechanism:{handled:!!n,type:"auto.function.vue.error_handler"}})}),typeof n=="function"&&e.config.errorHandler)n.call(e,r,s,i);else throw r}},v_="ui.vue",HH={activate:["activated","deactivated"],create:["beforeCreate","created"],unmount:["beforeUnmount","unmounted"],destroy:["beforeDestroy","destroyed"],mount:["beforeMount","mounted"],update:["beforeUpdate","updated"]};function Km(e,t,n){e.$_sentryRootComponentSpanTimer&&clearTimeout(e.$_sentryRootComponentSpanTimer),e.$_sentryRootComponentSpanTimer=setTimeout(()=>{e.$root?.$_sentryRootComponentSpan&&(e.$root.$_sentryRootComponentSpan.end(t),e.$root.$_sentryRootComponentSpan=void 0)},n)}function qH(e,t){function n(s){return s.replace(/^<([^\s]*)>(?: at [^\s]*)?$/,"$1")}return e.some(s=>n(t)===n(s))}const WH=(e={})=>{const t=(e.hooks||[]).concat(uP).filter((s,i,a)=>a.indexOf(s)===i),n={},r=e.timeout||2e3;for(const s of t){const i=HH[s];if(!i){cP&&Pe.warn(`Unknown hook: ${s}`);continue}for(const a of i)n[a]=function(){const o=this.$root===this;o&&(this.$_sentryRootComponentSpan=this.$_sentryRootComponentSpan||ea({name:"Application Render",op:`${v_}.render`,attributes:{[en]:"auto.ui.vue"},onlyIfParent:!0}),Km(this,cn(),r));const l=bu(this,!1);if(!(o||(Array.isArray(e.trackComponents)?qH(e.trackComponents,l):e.trackComponents))){Km(this,cn(),r);return}this.$_sentryComponentSpans=this.$_sentryComponentSpans||{};const u=a===i[0],d=this.$root?.$_sentryRootComponentSpan||Un();if(u){if(d){const p=this.$_sentryComponentSpans[s];p&&p.end(),this.$_sentryComponentSpans[s]=ea({name:`Vue ${l}`,op:`${v_}.${s}`,attributes:{[en]:"auto.ui.vue"},onlyIfParent:!0})}}else{const p=this.$_sentryComponentSpans[s];if(!p)return;p.end(),Km(this,cn(),r)}}}return n},GH=ct,KH={Vue:GH.Vue,attachProps:!0,attachErrorHandler:!0,tracingOptions:{hooks:uP,timeout:2e3,trackComponents:!1}},YH="Vue",JH=(e={})=>({name:YH,setup(t){const n={...KH,...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=>y_(s,n)):n.Vue&&y_(n.Vue,n)}}),y_=(e,t)=>{cP&&e._instance?.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&&jH(e,t),Xr(t)&&e.mixin(WH(t.tracingOptions))};function XH(e={}){const t={defaultIntegrations:[...mR(),JH()],...e};return DI(t,"vue"),F5(t)}function QH(e,t,n){let r=!1;e.onError(s=>ds(s,{mechanism:{handled:!1}})),e.beforeEach((s,i,a)=>{const o=r?void 0:ZH(),l={};for(const d of Object.keys(s.params))l[`url.path.parameter.${d}`]=s.params[d],l[`params.${d}`]=s.params[d];for(const d of Object.keys(s.query)){const p=s.query[d];p&&(l[`query.${d}`]=p)}let c=s.path,u="url";if(s.name&&t.routeLabel!=="path")c=s.name.toString(),u="custom";else if(s.matched.length>0){const d=s.matched.length-1;c=s.matched[d].path,u="route"}St().setTransactionName(c),t.instrumentPageLoad&&o&&(ft(o).data[fr]!=="custom"&&(o.updateName(c),o.setAttribute(fr,u)),o.setAttributes({...l,[en]:"auto.pageload.vue"}),r=!0),t.instrumentNavigation&&!o&&n({name:c,op:"navigation",attributes:{...l,[en]:"auto.navigation.vue",[fr]:u}}),a&&a()})}function ZH(){const e=Un(),t=e&&Nn(e);return t&&ft(t).op==="pageload"?t:void 0}function eq(e={}){if(!e.router)return p_(e);const t=p_({...e,instrumentNavigation:!1}),{router:n,instrumentNavigation:r=!0,instrumentPageLoad:s=!0,routeLabel:i="name"}=e;return{...t,afterAllSetup(a){t.afterAllSetup(a),QH(n,{routeLabel:i,instrumentNavigation:r,instrumentPageLoad:s},l=>{oP(a,l)})}}}const tq={attachPiniaState:!0,addBreadcrumbs:!0,actionTransformer:e=>e,stateTransformer:e=>e},b_=(e,t)=>{const n={};try{return Object.keys(e.state.value).forEach(r=>{n[r]=e.state.value[r]}),t?t(n):n}catch{return n}},nq=e=>{const t={...tq,...e};return({store:r,pinia:s})=>{t.attachPiniaState!==!1&&WT().addEventProcessor((i,a)=>{try{const l=`pinia_state_all_stores_${new Date().toTimeString().split(" ")[0]}.json`;a.attachments?.some(u=>u.filename.startsWith("pinia_state_all_stores_"))||(a.attachments=[...a.attachments||[],{filename:l,data:JSON.stringify(b_(s,t.stateTransformer))}])}catch{}return i}),r.$onAction(i=>{i.after(()=>{const a=t.actionTransformer(i.name);typeof a<"u"&&a!==null&&t.addBreadcrumbs!==!1&&Ei({category:"pinia.action",message:`Store: ${r.$id} | Action: ${a}`,level:"info"});const o=b_(s,t.stateTransformer),l=St(),c=l.getScopeData().contexts.state;if(typeof o<"u"&&o!==null){const p=at()?.getOptions()?.normalizeDepth||3,v={...c||{},state:{type:"pinia",value:o}};br(v,"__sentry_override_normalization_depth__",3+p),l.setContext("state",v)}else l.setContext("state",{...c||{},state:{type:"pinia",value:"undefined"}})})})}};async function dP(){return"/"}async function jn(e=!0,t=!0){const n=ln.create({baseURL:await dP()});return n.interceptors.request.use(r=>(console.debug(`${r.method?.toUpperCase().padEnd(6)} ${r.url?.padEnd(25)} WithAuth: ${e?.toString().padEnd(7)} AutoHandle401: ${t?.toString().padEnd(7)} BaseURL: ${r.baseURL}`),r)),e&&n.interceptors.request.use(async r=>{const s=Zr();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=>{const{response:s,config:i}=r;if(!s){const d=new Error(`No response was returned by axios - URL ${i?.url}`);throw d.stack=r.stack,d}if(s.status===Ea.FailedDependency)throw r;if(![Ea.Unauthorized,Ea.Forbidden].includes(s.status))return console.error("Error in axios response interceptor which is not 401 or 403",r),ds(r),Promise.reject({message:`${r.message} - URL ${i?.url}`,stack:r.stack});if(s.status===Ea.Forbidden){const d=r?.response?.data;throw console.error("[HttpClient] 403 Forbidden",d),nr("auth:permission-denied").emit({roles:d?.roles,permissions:d?.permissions,error:d?.error,url:i?.url}),r}const a=Zr();a.loadTokens();const{reasonCode:o,url:l}=a.extractSpecialReasonCode(r);if(o)return await a.logout(!1,Uy(o)),console.error(`[AuthStore] 401 Unauthorized - emitting 'auth:${o}' with reason ${o}`),nr(`auth:${o}`).emit({url:l,error:r.message,reasonCode:o}),Promise.reject(r);await a.checkAuthenticationRequirements();const{success:c,handled:u}=await a.verifyOrRefreshLoginOnceOrLogout();if(u)return Promise.reject(r);if(c){if(!i?.url)throw new Error("No URL in axios config, cannot retry");console.debug("Redoing request without interceptors",i?.url);const d=i;return d.headers??={},d.headers.Authorization=`Bearer ${a.token}`,ln(d)}return console.error("[HttpClient] 401 Unauthorized - emitting 'auth:failure'"),nr("auth:failure").emit({url:i?.url,error:r.message}),Promise.reject(r)}),n}class Cr{static async get(t){return(await(await jn(!0)).get(t)).data}static async put(t,n){return(await(await jn(!0)).put(t,n)).data}static async post(t,n){return(await(await jn(!0)).post(t,n)).data}static async postUpload(t,n,r){return await(await jn(!0)).post(t,n,r)}static async getDownload(t,n){return await(await jn(!0)).request({method:"GET",url:t,data:n,responseType:"arraybuffer"})}static async delete(t,n){return(await(await jn(!0)).request({url:t,method:"delete",data:n})).data}static async patch(t,n){return(await(await jn(!0)).patch(t,n)).data}}class ue{static base="/api";static firstTimeSetupRoute=`${ue.base}/first-time-setup`;static completeFirstTimeSetupRoute=`${ue.firstTimeSetupRoute}/complete`;static printerRoute=`${ue.base}/printer`;static printerBatchRoute=`${ue.printerRoute}/batch`;static printerTestConnectionRoute=`${ue.printerRoute}/test-connection`;static printerSettingsRoute=`${ue.base}/printer-settings`;static floorRoute=`${ue.base}/floor`;static batchRoute=`${ue.base}/batch`;static batchGetLastPrintedFilesRoute=`${ue.batchRoute}/reprint/list`;static batchReprintFilesRoute=`${ue.batchRoute}/reprint/execute`;static printJobsRoute=`${ue.base}/print-jobs`;static printJobsSearchRoute=`${ue.printJobsRoute}/search`;static printJobsSearchPagedRoute=`${ue.printJobsRoute}/search-paged`;static printerFilesRoute=`${ue.base}/printer-files`;static printerFilesPurgeRoute=`${ue.printerFilesRoute}/purge`;static printerTagsRoute=`${ue.base}/printer-group`;static createGroupRoute=`${ue.base}/printer-group`;static customGCodeRoute=`${ue.base}/custom-gcode`;static userRoute=`${ue.base}/user`;static rolesRoute=`${ue.base}/user/roles`;static userProfileRoute=`${ue.userRoute}/profile`;static settingsRoute=`${ue.base}/settings`;static settingsSensitiveRoute=`${ue.settingsRoute}/sensitive`;static updateLoginRequiredRoute=`${ue.settingsRoute}/login-required`;static updateRegistrationEnabledRoute=`${ue.settingsRoute}/registration-enabled`;static updateCredentialSettings=`${ue.settingsRoute}/credential`;static fileCleanSettingsRoute=`${ue.settingsRoute}/file-clean`;static updateFrontendSettingsRoute=`${ue.settingsRoute}/frontend`;static updateTimeoutSettingRoute=`${ue.settingsRoute}/timeout`;static serverSentryDiagnosticsSettingRoute=`${ue.settingsRoute}/sentry-diagnostics`;static updateExperimentalMoonrakerSupportRoute=`${ue.settingsRoute}/experimental-moonraker-support`;static updateExperimentalThumbnailSupportRoute=`${ue.settingsRoute}/experimental-thumbnail-support`;static updateExperimentalPrusaLinkSupportRoute=`${ue.settingsRoute}/experimental-prusa-link-support`;static updateExperimentalBambuSupportRoute=`${ue.settingsRoute}/experimental-bambu-support`;static deleteTagRoute=t=>`${ue.base}/printer-group/${t}`;static updateTagNameRoute=t=>`${ue.base}/printer-group/${t}/name`;static addPrinterToGroupRoute=t=>`${ue.base}/printer-group/${t}/printer`;static deletePrinterFromTagRoute=ue.addPrinterToGroupRoute;static getPrinterRoute=t=>`${ue.printerRoute}/${t}`;static postPrinterDisabledReasonRoute=t=>`${ue.printerRoute}/${t}/disabled-reason`;static getPrinterLoginDetailsRoute=t=>`${ue.getPrinterRoute(t)}/login-details`;static restartOctoPrintRoute=t=>`${ue.getPrinterRoute(t)}/restart-octoprint`;static refreshSocketRoute=t=>`${ue.getPrinterRoute(t)}/refresh-socket`;static getPrinterSettingsRoute=t=>`${ue.printerSettingsRoute}/${t}`;static syncPrinterNameSettingRoute=t=>`${ue.getPrinterSettingsRoute(t)}/sync-printername`;static getFloorRoute=t=>`${ue.floorRoute}/${t}`;static addOrRemovePrinterFromFloorRoute=t=>`${ue.getFloorRoute(t)}/printer`;static sendQuickStopM112Route=t=>`${ue.customGCodeRoute}/send-emergency-m112/${t}`;static updatePrinterFloorNameRoute=t=>`${ue.getFloorRoute(t)}/name`;static updatePrinterFloorNumberRoute=t=>`${ue.getFloorRoute(t)}/floor-number`;static printerFilesClearRoute=t=>`${ue.printerFilesRoute}/${t}/clear`;static printerFilesStartPrintRoute=t=>`${ue.printerFilesRoute}/${t}/select`;static printerFilesUploadRoute=t=>`${ue.printerFilesRoute}/${t}/upload`;static printerFilesCacheRoute=t=>`${ue.printerFilesRoute}/${t}/cache`;static printerEnabledRoute=t=>`${ue.getPrinterRoute(t)}/enabled`;static printerSerialConnectRoute=t=>`${ue.getPrinterRoute(t)}/serial-connect`;static printerJogCommandRoute=t=>`${ue.getPrinterRoute(t)}/jog`;static printerHomeCommandRoute=t=>`${ue.getPrinterRoute(t)}/home`;static printerSerialDisconnectRoute=t=>`${ue.getPrinterRoute(t)}/serial-disconnect`;static printerJobRoute=t=>`${ue.getPrinterRoute(t)}/job`;static printerStopJobRoute=t=>`${ue.printerJobRoute(t)}/stop`;static printerPauseJobRoute=t=>`${ue.printerJobRoute(t)}/pause`;static printerResumeJobRoute=t=>`${ue.printerJobRoute(t)}/resume`;static userChangeUsernameRoute=t=>`${ue.userRoute}/${t}/change-username`;static userChangePasswordRoute=t=>`${ue.userRoute}/${t}/change-password`;static userDeleteRoute=t=>`${ue.userRoute}/${t}`;static userSetVerifiedRoute=t=>`${ue.userRoute}/${t}/set-verified`;static userSetRootUserRoute=t=>`${ue.userRoute}/${t}/set-root-user`;static userSetUserRolesRoute=t=>`${ue.userRoute}/${t}/set-user-roles`}function cv(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 pi extends Cr{static async getFiles(t){const n=`${ue.printerFilesRoute}/${t}`;return await this.get(n)}static async getThumbnail(t){const n=`${ue.printerFilesRoute}/${t}/thumbnail`;return await this.get(n)}static async getFileCache(t){const n=`${ue.printerFilesCacheRoute(t)}`;return await this.get(n)}static async selectAndPrintFile(t,n,r=!0){const s=ue.printerFilesStartPrintRoute(t);return await this.post(s,{filePath:n,print:r})}static async uploadFile(t,n,r=!0){const s=ue.printerFilesUploadRoute(t.id),i=new FormData;return i.append("startPrint",r.toString()),i.append("files[0]",n),this.postUpload(s,i,{onUploadProgress:a=>{bt().openProgressMessage("single-file-upload",`Uploading file ${n.name}`,100*a.loaded/a.total,!1)}})}static async clearFiles(t){const n=`${ue.printerFilesClearRoute(t)}`;return this.delete(n)}static async purgeFiles(){const t=`${ue.printerFilesPurgeRoute}`;return this.post(t)}static async deleteFileOrFolder(t,n){const r=`${ue.printerFilesRoute}/${t}?path=${encodeURIComponent(n)}`;return this.delete(r)}static async downloadFile(t,n){const r=`${ue.printerFilesRoute}/${t}/download/${encodeURIComponent(n)}`,s=await this.getDownload(r);cv(s.data,n)}}const rq=JSON.parse('["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"]'),sq=JSON.parse(`["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 S_(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function $l(){const e=Math.round(Math.random()*1124),t=Math.round(Math.random()*3260);return`${S_(rq[e])} ${S_(sq[t])}`}function Op(e){return e?.trim().length?e?.trim()?.replace(/[^a-zA-Z ]/g,"")?.split(" ").map(n=>n.length?n:"").slice(0,3).reduce((n,r)=>n+r[0],"")?.replace("undefined",""):"?"}const Dd=()=>({id:void 0,name:$l(),apiKey:"",username:"",password:"",printerURL:"",printerType:0,enabled:!0});class It extends Cr{static convertPrinterToCreateForm(t){const n=Dd();return n.id=t.id,n.printerURL=t.printerURL,n.printerType=t.printerType,n.name=t.name||$l(),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=ue.printerRoute;return await this.get(t)}static async stopPrintJob(t){const n=ue.printerStopJobRoute(t);return await this.post(n)}static async pausePrintJob(t){const n=ue.printerPauseJobRoute(t);return await this.post(n)}static async resumePrintJob(t){const n=ue.printerResumeJobRoute(t);return await this.post(n)}static async refreshSocket(t){const n=`${ue.refreshSocketRoute(t)}`;return await this.post(n)}static async sendPrinterConnectCommand(t){const n=ue.printerSerialConnectRoute(t);return await this.post(n)}static async sendPrinterDisconnectCommand(t){const n=ue.printerSerialDisconnectRoute(t);return await this.post(n)}static async sendPrinterJogCommand(t,n){const r=ue.printerJogCommandRoute(t);return await this.post(r,n)}static async sendPrinterHomeCommand(t,n){const r=ue.printerHomeCommandRoute(t);return await this.post(r,n)}static async createPrinter(t,n){const r=`${ue.printerRoute}?forceSave=${n}`;return await this.post(r,t)}static async batchImportPrinters(t){const n=ue.printerBatchRoute;return await this.post(n,t)}static async deletePrinter(t){const n=ue.getPrinterRoute(t);return await this.delete(n)}static async updatePrinter(t,n,r){const i=`${ue.getPrinterRoute(t)}?forceSave=${r}`;return await this.patch(i,n)}static async updatePrinterMaintenance(t,n=null){const r=ue.postPrinterDisabledReasonRoute(t);return await this.patch(r,{disabledReason:n})}static async testConnection(t){const n=ue.printerTestConnectionRoute;return await this.post(n,t)}static async toggleEnabled(t,n){const r=ue.printerEnabledRoute(t);return await this.patch(r,{enabled:n})}}class iq extends Cr{static async searchJobs(t={}){const n=new URLSearchParams;t.searchPrinter&&n.set("searchPrinter",t.searchPrinter),t.searchFile&&n.set("searchFile",t.searchFile),t.startDate&&n.set("startDate",t.startDate),t.endDate&&n.set("endDate",t.endDate);const r=`${ue.printJobsSearchRoute}?${n.toString()}`;return await this.get(r)}static async searchJobsPaged(t={}){const n=new URLSearchParams;t.searchPrinter&&n.set("searchPrinter",t.searchPrinter),t.searchFile&&n.set("searchFile",t.searchFile),t.startDate&&n.set("startDate",t.startDate),t.endDate&&n.set("endDate",t.endDate),t.page!==void 0&&n.set("page",t.page.toString()),t.pageSize!==void 0&&n.set("pageSize",t.pageSize.toString());const r=`${ue.printJobsSearchPagedRoute}?${n.toString()}`;return await this.get(r)}}class Ln extends Cr{static async getSettings(){const t=ue.settingsRoute;return await this.get(t)}static async getSettingsSensitive(){const t=ue.settingsSensitiveRoute;return await this.get(t)}static async updateLoginRequiredSettings(t){const n=`${ue.updateLoginRequiredRoute}`;return await this.put(n,{loginRequired:t})}static async updateRegistrationEnabledSettings(t){const n=`${ue.updateRegistrationEnabledRoute}`;return await this.put(n,{registrationEnabled:t})}static async updateCredentialSettings(t,n,r){const s=`${ue.updateCredentialSettings}`;return await this.put(s,{jwtExpiresIn:t,refreshTokenAttempts:n,refreshTokenExpiry:r})}static async updateFrontendSettings(t){const n=`${ue.updateFrontendSettingsRoute}`;return await this.put(n,t)}static async setSentryDiagnosticsSettings(t){const n=`${ue.serverSentryDiagnosticsSettingRoute}`;return await this.patch(n,{enabled:t})}static async updateTimeoutSettings(t){const n=`${ue.updateTimeoutSettingRoute}`;return await this.put(n,t)}static async setFileCleanSettings(t){const n=`${ue.fileCleanSettingsRoute}`;return await this.put(n,t)}static async updateExperimentalMoonrakerSupport(t){const n=ue.updateExperimentalMoonrakerSupportRoute;return await this.put(n,{enabled:t})}static async updateExperimentalPrusaLinkSupport(t){const n=ue.updateExperimentalPrusaLinkSupportRoute;return await this.put(n,{enabled:t})}static async updateExperimentalBambuSupport(t){const n=ue.updateExperimentalBambuSupportRoute;return await this.put(n,{enabled:t})}static async updateExperimentalThumbnailSupport(t){const n=ue.updateExperimentalThumbnailSupportRoute;return await this.put(n,{enabled:t})}}const ws=wr("Settings",{state:()=>({settings:void 0,frontendDebugSettings:{showPrinterStateUpdateSideNav:!1,showInterpretedPrinterState:!1,showJobsRendered:!1}}),actions:{async loadSettings(){const e=await Ln.getSettings();return this.settings=e,e},async updateFrontendSettings(e){const t=await Ln.updateFrontendSettings(e);return this.settings=t,t},async saveFrontendSettings(){if(!this.settings)return;const e=await Ln.updateFrontendSettings(this.settings.frontend);this.settings=e},async updateTimeoutSettings(e){const t=await Ln.updateTimeoutSettings(e);return this.settings=t,t}},getters:{serverSettings(){return this.settings?.server},frontendSettings(){return this.settings?.frontend},preferCancelOverQuickStop(){return this.settings?.frontend?.tilePreferCancelOverQuickStop||!1},thumbnailsEnabled(){return this.settings?.server.experimentalThumbnailSupport||!1},largeTiles(){return this.settings?.frontend?.largeTiles||!1},gridCols(){return this.settings?.frontend?.gridCols||8},gridRows(){return this.settings?.frontend?.gridRows||8}}}),Qs={danger:"danger",dark:"dark",secondary:"secondary",success:"success"},Zs={DarkBlue:"#050c2e",Black:"#000000",DarkGray:"#262626",LightBrown:"#583c0e",Brown:"#580e47",Red:"#2e0905"},So={Disabled:"Disabled",Maintenance:"Maintenance",Error:"Error",Paused:"Paused",Operational:"Operational",Printing:"Printing"};function aq(e,t,n){const s=ws().frontendDebugSettings.showInterpretedPrinterState,i={};if(!e.enabled)return e.disabledReason?.length?{...i,color:Qs.danger,rgb:Zs.Black,text:So.Maintenance}:{...i,color:Qs.secondary,rgb:Zs.DarkBlue,text:So.Disabled};const a=t?.api==="responding",o=t?.api==="authFail";if(!a||!t){const p=t?.api==="noResponse";return{...i,color:Qs.secondary,rgb:Zs.Red,text:o?"API key wrong":p?"API unreachable":t?.api||"-"}}if(!a)return{...i,color:Qs.danger,rgb:Zs.Red,text:o?"API key wrong":"No API connection"};const l=t.socket==="authenticated",c=t.socket==="authenticating",u=n?.current?.payload?.state,d=u?.flags;if(!l||!d)return s&&console.debug(`Socket opened ${l?1:0}, socketAuthing ${c?1:0} printerState ${n?1:0},
47
+ currentState: ${u}, FLAGS ${d}`),{...i,color:Qs.danger,rgb:Zs.Red,text:n?"Awaiting state":"Unknown state"};if(!d){console.error("No flags",d);return}return d.error||d.closedOrError?{...i,color:Qs.danger,rgb:Zs.Red,text:u.text?.replace("Offline","Disconnected")||So.Error,description:u.error}:d.paused||d.pausing?{...i,color:Qs.success,rgb:Zs.Brown,text:So.Paused}:d.printing?{...i,color:Qs.success,rgb:Zs.LightBrown,text:So.Printing}:{...i,color:Qs.dark,rgb:Zs.DarkGray,text:So.Operational,description:u.error}}const Ba=e=>e?.current?.payload?.state,dv=e=>Ba(e)?.flags.printing,fv=(e,t)=>!ol(e)&&e?.enabled&&!Ba(t)?.flags.operational||Ba(t)?.flags.error||Ba(t)?.flags.closedOrError,fP=e=>!ol(e)&&!e?.enabled,ol=e=>!e?.enabled&&e?.disabledReason?.length,oq=(e,t)=>Ba(t)?.flags&&!Ba(t)?.flags.printing&&Ba(t)?.flags.operational&&!fP(e)&&!ol(e),Kn=wr("PrinterState",{state:()=>({printerIds:[],printerEventsById:{},socketStatesById:{}}),getters:{operationalPrintersById(){const e=At(),t={};return this.printerIds.forEach(n=>{if(this.printerEventsById[n]?.current?.payload?.state?.flags?.operational){const s=e.printer(n);if(s)t[n]=s;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=>{const n=this.printerEventsById[t];n?.current?.payload?.state?.flags?.printing&&(e[t]=n)}),e},isPrinterPrinting(){return e=>!!this.printingPrintersById[e]},isPrinterStoppable(){return e=>{const t=this.printerEventsById[e];if(!t)return!1;const n=t?.current?.payload?.state?.flags;return n?.printing||n?.paused||n?.pausing}},isPrinterPaused(){return e=>{const t=this.printerEventsById[e];if(!t)return!1;const n=t?.current?.payload?.state?.flags;return n?.paused||n?.pausing}},printerCurrentEventReceivedAtById(){const e={};return this.printerIds.forEach(t=>{const n=this.printerEventsById[t];n?.current?.receivedAt&&(e[t]=n.current.receivedAt)}),e},onlinePrinters(){const e=At(),t={};return this.printerIds.forEach(n=>{if(this.socketStatesById[n]?.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=Kn();return Object.values(e.onlinePrintersWithStates).filter(t=>dv(t.printerState)).length},operationalNotPrintingCount(){return this.onlinePrintersWithStates.filter(e=>oq(e.printer,e.printerState)).length},isApiResponding(){return e=>Object.keys(this.onlinePrinters).includes(e.toString())},isPrinterNotOnline(){return e=>!this.isApiResponding(e)},printerJobsById(){const e=At(),t=ws().frontendDebugSettings.showJobsRendered,n={};return this.printerIds.forEach(r=>{const s=this.printerEventsById[r],i=s?.current?.payload?.state?.flags;if(i?.printing||i?.paused||i?.pausing){const a=e.printer(r);if(a)n[a.id]=s?.current?.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=At(),t=[];return this.printerIds.forEach(n=>{const r=this.printerEventsById[n],s=r?.current?.payload?.state?.flags;if(s?.printing||s?.paused||s?.pausing){const i=e.printer(n);if(i)t.push({printer:i,job:r?.current?.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=>{const n=this.printerEventsById[t],r=n?.current?.payload?.state?.flags;(r?.printing||r?.paused||r?.pausing)&&(e[t]=n?.current?.payload?.job?.file?.path)}),e}},actions:{setSocketStates(e){this.socketStatesById=e,this.printerIds=Object.keys(e).map(Number)},setPrinterEvents(e){this.printerEventsById=e},deletePrinterEvents(e){delete this.printerEventsById[e],this.printerIds=Object.keys(this.printerEventsById).map(Number)},async selectAndPrintFile({printerId:e,fullPath:t}){if(!(!e||!At().printer(e))){if(this.isPrinterPrinting(e)){alert("This printer is printing or not connected! Either way printing is not an option.");return}await pi.selectAndPrintFile(e,t,!0)}}}}),At=wr("Printers",{state:()=>({printers:[],printerFileCache:{},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(fP).length},disconnectedCount(){const e=Kn();return this.printers.filter(t=>fv(t,e.printerEventsById[t.id])).length},maintenanceCount(){return this.printers.filter(e=>ol(e)).length}},actions:{async createPrinter(e,t){const n=await It.createPrinter(e,t);return this.printers.push(n),this.printers.sort((r,s)=>r.name?.toLowerCase()?.localeCompare(s?.name?.toLowerCase())?1:-1),n},toggleSelectedPrinter(e){const t=Kn(),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=[]},setMaintenanceDialogPrinter(e){this.maintenanceDialogPrinter=e},async updatePrinter({printerId:e,updatedPrinter:t},n){const r=await It.updatePrinter(e,t,n);return this._replacePrinter({printerId:e,printer:r}),r},async loadPrinters(){const e=await It.getPrinters();return this.setPrinters(e),e},async deletePrinter(e){const t=await It.deletePrinter(e);return this._popPrinter(e),t},setPrinters(e){if(!e?.length){this.printers=[];return}this.printers=e.sort((t,n)=>t.name?.toLowerCase()?.localeCompare(n?.name?.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 pi.clearFiles(e);if(!t?.failedFiles)throw new Error("No failed files were returned");this.printerFileCache[e]&&(this.printerFileCache[e]=t.failedFiles)},async loadPrinterFiles(e){const t=await pi.getFiles(e);return t.sort((n,r)=>n.date<r.date?1:-1),this.printerFileCache[e]=t,t},async deletePrinterFile(e,t){await pi.deleteFileOrFolder(e,t);const n=this.printerFileCache[e];if(!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=Kn();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 It.stopPrintJob(n.id)}}}),pP=Symbol.for("vuetify:goto");function mP(){return{container:void 0,duration:300,layout:!1,offset:0,easing:"easeInOutCubic",patterns:Q$}}function lq(e){return $b(e)??(document.scrollingElement||document.body)}function $b(e){return typeof e=="string"?document.querySelector(e):yy(e)}function Ym(e,t,n){if(typeof e=="number")return t&&n?-e:e;let r=$b(e),s=0;for(;r;)s+=t?r.offsetLeft:r.offsetTop,r=r.offsetParent;return s}function uq(e,t){return{rtl:t.isRtl,options:Gn(mP(),e)}}async function w_(e,t,n,r){const s=n?"scrollLeft":"scrollTop",i=Gn(r?.options??mP(),t),a=r?.rtl.value,o=(typeof e=="number"?e:$b(e))??0,l=i.container==="parent"&&o instanceof HTMLElement?o.parentElement:lq(i.container),c=Wa()?i.patterns.instant:typeof i.easing=="function"?i.easing:i.patterns[i.easing];if(!c)throw new TypeError(`Easing function "${i.easing}" not found.`);let u;if(typeof o=="number")u=Ym(o,n,a);else if(u=Ym(o,n,a)-Ym(l,n,a),i.layout){const v=window.getComputedStyle(o).getPropertyValue("--v-layout-top");v&&(u-=parseInt(v,10))}u+=i.offset,u=dq(l,u,!!a,!!n);const d=l[s]??0;if(u===d)return Promise.resolve(u);const p=performance.now();return new Promise(m=>requestAnimationFrame(function v(g){const y=(g-p)/i.duration,w=Math.floor(d+(u-d)*c(In(y,0,1)));if(l[s]=w,y>=1&&Math.abs(w-l[s])<10)return m(u);if(y>2)return m(l[s]);requestAnimationFrame(v)}))}function cq(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=He(pP),{isRtl:n}=xr();if(!t)throw new Error("[Vuetify] Could not find injected goto instance");const r={...t,rtl:ee(()=>t.rtl.value||n.value)};async function s(i,a){return w_(i,Gn(e,a),!1,r)}return s.horizontal=async(i,a)=>w_(i,Gn(e,a),!0,r),s}function dq(e,t,n,r){const{scrollWidth:s,scrollHeight:i}=e,[a,o]=e===document.scrollingElement?[window.innerWidth,window.innerHeight]:[e.offsetWidth,e.offsetHeight];let l,c;return r?n?(l=-(s-a),c=0):(l=0,c=s-a):(l=0,c=i+-o),In(t,l,c)}function fq(e){let{selectedElement:t,containerElement:n,isRtl:r,isHorizontal:s}=e;const i=qu(s,n),a=hP(s,r,n),o=qu(s,t),l=gP(s,t),c=o*.4;return a>l?l-c:a+i<l+o?l-i+o+c:a}function pq(e){let{selectedElement:t,containerElement:n,isHorizontal:r}=e;const s=qu(r,n),i=gP(r,t),a=qu(r,t);return i-s/2+a/2}function __(e,t){return t?.[e?"scrollWidth":"scrollHeight"]||0}function mq(e,t){return t?.[e?"clientWidth":"clientHeight"]||0}function hP(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 qu(e,t){return t?.[e?"offsetWidth":"offsetHeight"]||0}function gP(e,t){return t?.[e?"offsetLeft":"offsetTop"]||0}const vP=Symbol.for("vuetify:v-slide-group"),Fb=oe({centerActive:Boolean,scrollToActive:{type:Boolean,default:!0},contentClass:null,direction:{type:String,default:"horizontal"},symbol:{type:null,default:vP},nextIcon:{type:Fe,default:"$next"},prevIcon:{type:Fe,default:"$prev"},showArrows:{type:[Boolean,String],validator:e=>typeof e=="boolean"||["always","desktop","mobile","never"].includes(e)},...Ue(),...lo({mobile:null}),...lt(),...yl({selectedClass:"v-slide-group-item--active"})},"VSlideGroup"),Cf=be()({name:"VSlideGroup",props:Fb(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{isRtl:r}=xr(),{displayClasses:s,mobile:i}=bs(e),a=ao(e,e.symbol),o=Ee(!1),l=Ee(0),c=Ee(0),u=Ee(0),d=A(()=>e.direction==="horizontal"),{resizeRef:p,contentRect:m}=Qi(),{resizeRef:v,contentRect:g}=Qi(),b=cq(),y=A(()=>({container:p.el,duration:200,easing:"easeOutQuart"})),w=A(()=>a.selected.value.length?a.items.value.findIndex(H=>H.id===a.selected.value[0]):-1),_=A(()=>a.selected.value.length?a.items.value.findIndex(H=>H.id===a.selected.value[a.selected.value.length-1]):-1);if(Ct){let H=-1;_e(()=>[a.selected.value,m.value,g.value,d.value],()=>{cancelAnimationFrame(H),H=requestAnimationFrame(()=>{if(m.value&&g.value){const re=d.value?"width":"height";c.value=m.value[re],u.value=g.value[re],o.value=c.value+1<u.value}if(e.scrollToActive&&w.value>=0&&v.el){const re=v.el.children[_.value];P(re,e.centerActive)}})})}const T=Ee(!1);function P(H,re){let ae=0;re?ae=pq({containerElement:p.el,isHorizontal:d.value,selectedElement:H}):ae=fq({containerElement:p.el,isHorizontal:d.value,isRtl:r.value,selectedElement:H}),x(ae)}function x(H){if(!Ct||!p.el)return;const re=qu(d.value,p.el),ae=hP(d.value,r.value,p.el);if(!(__(d.value,p.el)<=re||Math.abs(H-ae)<16)){if(d.value&&r.value&&p.el){const{scrollWidth:De,offsetWidth:X}=p.el;H=De-X-H}d.value?b.horizontal(H,y.value):b(H,y.value)}}function C(H){const{scrollTop:re,scrollLeft:ae}=H.target;l.value=d.value?ae:re}function E(H){if(T.value=!0,!(!o.value||!v.el)){for(const re of H.composedPath())for(const ae of v.el.children)if(ae===re){P(ae);return}}}function R(H){T.value=!1}let I=!1;function O(H){!I&&!T.value&&!(H.relatedTarget&&v.el?.contains(H.relatedTarget))&&B(),I=!1}function L(){I=!0}function V(H){if(!v.el)return;function re(ae){H.preventDefault(),B(ae)}d.value?H.key==="ArrowRight"?re(r.value?"prev":"next"):H.key==="ArrowLeft"&&re(r.value?"next":"prev"):H.key==="ArrowDown"?re("next"):H.key==="ArrowUp"&&re("prev"),H.key==="Home"?re("first"):H.key==="End"&&re("last")}function F(H,re){if(!H)return;let ae=H;do ae=ae?.[re==="next"?"nextElementSibling":"previousElementSibling"];while(ae?.hasAttribute("disabled"));return ae}function B(H){if(!v.el)return;let re;if(!H)re=Da(v.el)[0];else if(H==="next"){if(re=F(v.el.querySelector(":focus"),H),!re)return B("first")}else if(H==="prev"){if(re=F(v.el.querySelector(":focus"),H),!re)return B("last")}else H==="first"?(re=v.el.firstElementChild,re?.hasAttribute("disabled")&&(re=F(re,"next"))):H==="last"&&(re=v.el.lastElementChild,re?.hasAttribute("disabled")&&(re=F(re,"prev")));re&&re.focus({preventScroll:!0})}function M(H){const re=d.value&&r.value?-1:1,ae=(H==="prev"?-re:re)*c.value;let de=l.value+ae;if(d.value&&r.value&&p.el){const{scrollWidth:De,offsetWidth:X}=p.el;de+=De-X}x(de)}const N=A(()=>({next:a.next,prev:a.prev,select:a.select,isSelected:a.isSelected})),D=A(()=>o.value||Math.abs(l.value)>0),W=A(()=>{switch(e.showArrows){case"never":return!1;case"always":return!0;case"desktop":return!i.value;case!0:return D.value;case"mobile":return i.value||D.value;default:return!i.value&&D.value}}),z=A(()=>Math.abs(l.value)>1),K=A(()=>{if(!p.value||!D.value)return!1;const H=__(d.value,p.el),re=mq(d.value,p.el);return H-re-Math.abs(l.value)>1});return Ie(()=>f(e.tag,{class:Se(["v-slide-group",{"v-slide-group--vertical":!d.value,"v-slide-group--has-affixes":W.value,"v-slide-group--is-overflowing":o.value},s.value,e.class]),style:Le(e.style),tabindex:T.value||a.selected.value.length?-1:0,onFocus:O},{default:()=>[W.value&&S("div",{key:"prev",class:Se(["v-slide-group__prev",{"v-slide-group__prev--disabled":!z.value}]),onMousedown:L,onClick:()=>z.value&&M("prev")},[n.prev?.(N.value)??f(lS,null,{default:()=>[f(j,{icon:r.value?e.nextIcon:e.prevIcon},null)]})]),S("div",{key:"container",ref:p,class:Se(["v-slide-group__container",e.contentClass]),onScroll:C},[S("div",{ref:v,class:"v-slide-group__content",onFocusin:E,onFocusout:R,onKeydown:V},[n.default?.(N.value)])]),W.value&&S("div",{key:"next",class:Se(["v-slide-group__next",{"v-slide-group__next--disabled":!K.value}]),onMousedown:L,onClick:()=>K.value&&M("next")},[n.next?.(N.value)??f(lS,null,{default:()=>[f(j,{icon:r.value?e.prevIcon:e.nextIcon},null)]})])]})),{selected:a.selected,scrollTo:M,scrollOffset:l,focus:B,hasPrev:z,hasNext:K}}}),yP=Symbol.for("vuetify:v-chip-group"),hq=oe({baseColor:String,column:Boolean,filter:Boolean,valueComparator:{type:Function,default:mr},...Fb({scrollToActive:!1}),...Ue(),...yl({selectedClass:"v-chip--selected"}),...lt(),...wt(),...ys({variant:"tonal"})},"VChipGroup"),k_=be()({name:"VChipGroup",props:hq(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{themeClasses:r}=Mt(e),{isSelected:s,select:i,next:a,prev:o,selected:l}=ao(e,yP);return Rn({VChip:{baseColor:ee(()=>e.baseColor),color:ee(()=>e.color),disabled:ee(()=>e.disabled),filter:ee(()=>e.filter),variant:ee(()=>e.variant)}}),Ie(()=>{const c=Cf.filterProps(e);return f(Cf,ce(c,{class:["v-chip-group",{"v-chip-group--column":e.column},r.value,e.class],style:e.style}),{default:()=>[n.default?.({isSelected:s,select:i,next:a,prev:o,selected:l.value})]})}),{}}}),gq=oe({activeClass:String,appendAvatar:String,appendIcon:Fe,baseColor:String,closable:Boolean,closeIcon:{type:Fe,default:"$delete"},closeLabel:{type:String,default:"$vuetify.close"},draggable:Boolean,filter:Boolean,filterIcon:{type:Fe,default:"$complete"},label:Boolean,link:{type:Boolean,default:void 0},pill:Boolean,prependAvatar:String,prependIcon:Fe,ripple:{type:[Boolean,Object],default:!0},text:{type:[String,Number,Boolean],default:void 0},modelValue:{type:Boolean,default:!0},onClick:Fn(),onClickOnce:Fn(),...rs(),...Ue(),...Pn(),..._r(),...bl(),...Tn(),...up(),...Sl(),...lt({tag:"span"}),...wt(),...ys({variant:"tonal"})},"VChip"),qe=be()({name:"VChip",directives:{vRipple:Lr},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}=kr(),{borderClasses:a}=vs(e),{densityClasses:o}=Fr(e),{elevationClasses:l}=Nr(e),{roundedClasses:c}=An(e),{sizeClasses:u}=hc(e),{themeClasses:d}=Mt(e),p=tt(e,"modelValue"),m=Ka(e,yP,!1),v=Ka(e,vP,!1),g=lp(e,n),b=ee(()=>e.link!==!1&&g.isLink.value),y=A(()=>!e.disabled&&e.link!==!1&&(!!m||e.link||g.isClickable.value)),w=ee(()=>({"aria-label":i(e.closeLabel),disabled:e.disabled,onClick(E){E.preventDefault(),E.stopPropagation(),p.value=!1,r("click:close",E)}}));_e(p,E=>{E?(m?.register(),v?.register()):(m?.unregister(),v?.unregister())});const{colorClasses:_,colorStyles:T,variantClasses:P}=io(()=>({color:!m||m.isSelected.value?e.color??e.baseColor:e.baseColor,variant:e.variant}));function x(E){r("click",E),y.value&&(g.navigate?.(E),m?.toggle())}function C(E){(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),x(E))}return()=>{const E=g.isLink.value?"a":e.tag,R=!!(e.appendIcon||e.appendAvatar),I=!!(R||s.append),O=!!(s.close||e.closable),L=!!(s.filter||e.filter)&&m,V=!!(e.prependIcon||e.prependAvatar),F=!!(V||s.prepend);return p.value&&Pt(f(E,ce(g.linkProps,{class:["v-chip",{"v-chip--disabled":e.disabled,"v-chip--label":e.label,"v-chip--link":y.value,"v-chip--filter":L,"v-chip--pill":e.pill,[`${e.activeClass}`]:e.activeClass&&g.isActive?.value},d.value,a.value,_.value,o.value,l.value,c.value,u.value,P.value,m?.selectedClass.value,e.class],style:[T.value,e.style],disabled:e.disabled||void 0,draggable:e.draggable,tabindex:y.value?0:void 0,onClick:x,onKeydown:y.value&&!b.value&&C}),{default:()=>[ia(y.value,"v-chip"),L&&f(MC,{key:"filter"},{default:()=>[Pt(S("div",{class:"v-chip__filter"},[s.filter?f(vt,{key:"filter-defaults",disabled:!e.filterIcon,defaults:{VIcon:{icon:e.filterIcon}}},s.filter):f(j,{key:"filter-icon",icon:e.filterIcon},null)]),[[$r,m.isSelected.value]])]}),F&&S("div",{key:"prepend",class:"v-chip__prepend"},[s.prepend?f(vt,{key:"prepend-defaults",disabled:!V,defaults:{VAvatar:{image:e.prependAvatar,start:!0},VIcon:{icon:e.prependIcon,start:!0}}},s.prepend):S(ke,null,[e.prependIcon&&f(j,{key:"prepend-icon",icon:e.prependIcon,start:!0},null),e.prependAvatar&&f(Sn,{key:"prepend-avatar",image:e.prependAvatar,start:!0},null)])]),S("div",{class:"v-chip__content","data-no-activator":""},[s.default?.({isSelected:m?.isSelected.value,selectedClass:m?.selectedClass.value,select:m?.select,toggle:m?.toggle,value:m?.value.value,disabled:e.disabled})??Y(e.text)]),I&&S("div",{key:"append",class:"v-chip__append"},[s.append?f(vt,{key:"append-defaults",disabled:!R,defaults:{VAvatar:{end:!0,image:e.appendAvatar},VIcon:{end:!0,icon:e.appendIcon}}},s.append):S(ke,null,[e.appendIcon&&f(j,{key:"append-icon",end:!0,icon:e.appendIcon},null),e.appendAvatar&&f(Sn,{key:"append-avatar",end:!0,image:e.appendAvatar},null)])]),O&&S("button",ce({key:"close",class:"v-chip__close",type:"button","data-testid":"close-chip"},w.value),[s.close?f(vt,{key:"close-defaults",defaults:{VIcon:{icon:e.closeIcon,size:"x-small"}}},s.close):f(j,{key:"close-icon",icon:e.closeIcon,size:"x-small"},null)])]}),[[Lr,y.value&&e.ripple,null]])}}}),vq=Ae({__name:"PrinterControlDialog",setup(e){const t=jt(Ht.PrinterControlDialog),n=At(),r=Kn(),s=A(()=>t.context()?.printer?.id),i=A(()=>{if(s.value)return n.printer(s.value)}),a=q(10),o=A(()=>{if(!s.value)return null;const d=r.printerEventsById[s.value];return d?.current?.payload?.temps?.length&&d?.current?.payload?.temps[0]?.tool0?.actual?d?.current?.payload?.temps[0]?.tool0:null}),l=async(d,p,m)=>{s.value&&await It.sendPrinterJogCommand(s.value,{x:d*a.value,y:p*a.value,z:m*a.value})},c=async d=>{s.value&&await It.sendPrinterHomeCommand(s.value,d)},u=()=>{t.closeDialog()};return(d,p)=>{const m=qs;return $(),J(m,{id:Q(t).dialogId,"max-width":"700px",onEscape:p[14]||(p[14]=v=>u())},{default:h(()=>[f($e,null,{default:h(()=>[f(Lt,null,{default:h(()=>[...p[15]||(p[15]=[k(" Printer Controls ",-1)])]),_:1}),f(Xe,null,{default:h(()=>[i.value?($(),J(Br,{key:0},{default:h(()=>[f(it,null,{default:h(()=>[f(Be,{cols:12},{default:h(()=>[k(" Printer: "+Y(i.value?.name)+" ",1),p[16]||(p[16]=S("br",null,null,-1)),f(qe,{color:"primary"},{default:h(()=>[k(Y(o.value?.actual)+"C / "+Y(o.value?.target)+"C ",1)]),_:1})]),_:1})]),_:1}),f(it,null,{default:h(()=>[f(Be,{cols:8},{default:h(()=>[p[26]||(p[26]=k(" X/Y ",-1)),p[27]||(p[27]=S("br",null,null,-1)),f(te,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:p[0]||(p[0]=v=>l(-1,1,0))},{default:h(()=>[f(j,null,{default:h(()=>[...p[17]||(p[17]=[k("north_west",-1)])]),_:1})]),_:1}),f(te,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:p[1]||(p[1]=v=>l(0,1,0))},{default:h(()=>[f(j,null,{default:h(()=>[...p[18]||(p[18]=[k("north",-1)])]),_:1})]),_:1}),f(te,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:p[2]||(p[2]=v=>l(1,1,0))},{default:h(()=>[f(j,null,{default:h(()=>[...p[19]||(p[19]=[k("north_east",-1)])]),_:1})]),_:1}),p[28]||(p[28]=S("br",null,null,-1)),f(te,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:p[3]||(p[3]=v=>l(-1,0,0))},{default:h(()=>[f(j,null,{default:h(()=>[...p[20]||(p[20]=[k("west",-1)])]),_:1})]),_:1}),f(te,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:p[4]||(p[4]=v=>c(["x","y"]))},{default:h(()=>[f(j,null,{default:h(()=>[...p[21]||(p[21]=[k("home",-1)])]),_:1})]),_:1}),f(te,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:p[5]||(p[5]=v=>l(1,0,0))},{default:h(()=>[f(j,null,{default:h(()=>[...p[22]||(p[22]=[k("east",-1)])]),_:1})]),_:1}),p[29]||(p[29]=S("br",null,null,-1)),f(te,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:p[6]||(p[6]=v=>l(-1,-1,0))},{default:h(()=>[f(j,null,{default:h(()=>[...p[23]||(p[23]=[k("south_west",-1)])]),_:1})]),_:1}),f(te,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:p[7]||(p[7]=v=>l(0,-1,0))},{default:h(()=>[f(j,null,{default:h(()=>[...p[24]||(p[24]=[k("south",-1)])]),_:1})]),_:1}),f(te,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:p[8]||(p[8]=v=>l(1,-1,0))},{default:h(()=>[f(j,null,{default:h(()=>[...p[25]||(p[25]=[k("south_east",-1)])]),_:1})]),_:1})]),_:1}),f(Be,{cols:"4"},{default:h(()=>[p[33]||(p[33]=k(" Z ",-1)),p[34]||(p[34]=S("br",null,null,-1)),f(te,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:p[9]||(p[9]=v=>l(0,0,1))},{default:h(()=>[f(j,null,{default:h(()=>[...p[30]||(p[30]=[k("north",-1)])]),_:1})]),_:1}),p[35]||(p[35]=S("br",null,null,-1)),f(te,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:p[10]||(p[10]=v=>c(["z"]))},{default:h(()=>[f(j,null,{default:h(()=>[...p[31]||(p[31]=[k("home",-1)])]),_:1})]),_:1}),p[36]||(p[36]=S("br",null,null,-1)),f(te,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:p[11]||(p[11]=v=>l(1,0,1))},{default:h(()=>[f(j,null,{default:h(()=>[...p[32]||(p[32]=[k("south",-1)])]),_:1})]),_:1})]),_:1})]),_:1}),f(it,null,{default:h(()=>[f(Be,{cols:"12"},{default:h(()=>[f(SC,{modelValue:a.value,"onUpdate:modelValue":p[12]||(p[12]=v=>a.value=v)},{default:h(()=>[f(te,{value:.1},{default:h(()=>[...p[37]||(p[37]=[k(" 0.1 ",-1)])]),_:1}),f(te,{value:1},{default:h(()=>[...p[38]||(p[38]=[k(" 1 ",-1)])]),_:1}),f(te,{value:10},{default:h(()=>[...p[39]||(p[39]=[k(" 10 ",-1)])]),_:1}),f(te,{value:100},{default:h(()=>[...p[40]||(p[40]=[k(" 100 ",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})):se("",!0)]),_:1}),f(dn,null,{default:h(()=>[f(Ft),f(te,{variant:"text",onClick:p[13]||(p[13]=v=>u())},{default:h(()=>[...p[41]||(p[41]=[k(" Close ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}});class Su extends Cr{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=ue.batchGetLastPrintedFilesRoute;return await this.post(n,{printerIds:t})}static async batchReprintFiles(t){const n=ue.batchReprintFilesRoute;return await this.post(n,{prints:t})}}var Sa=(e=>(e[e.PrinterNotAvailable=0]="PrinterNotAvailable",e[e.NoLastPrint=1]="NoLastPrint",e[e.LastPrintReady=2]="LastPrintReady",e))(Sa||{});function yq(e){return e.message?`${e.message}
48
+ ${e.stack}`:`'${e}'`}const bP=vl("v-alert-title"),bq=oe({iconSize:[Number,String],iconSizes:{type:Array,default:()=>[["x-small",10],["small",16],["default",24],["large",28],["x-large",32]]}},"iconSize");function Sq(e,t){return{iconSize:A(()=>{const r=new Map(e.iconSizes),s=e.iconSize??t()??"default";return r.has(s)?r.get(s):s})}}const wq=["success","info","warning","error"],_q=oe({border:{type:[Boolean,String],validator:e=>typeof e=="boolean"||["top","end","bottom","start"].includes(e)},borderColor:String,closable:Boolean,closeIcon:{type:Fe,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=>wq.includes(e)},...Ue(),...Pn(),...Vn(),..._r(),...bq(),...aa(),...wl(),...Tn(),...lt(),...wt(),...ys({variant:"flat"})},"VAlert"),Et=be()({name:"VAlert",props:_q(),emits:{"click:close":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{emit:n,slots:r}=t;const s=tt(e,"modelValue"),i=ee(()=>{if(e.icon!==!1)return e.type?e.icon??`$${e.type}`:e.icon}),{iconSize:a}=Sq(e,()=>e.prominent?44:void 0),{themeClasses:o}=Mt(e),{colorClasses:l,colorStyles:c,variantClasses:u}=io(()=>({color:e.color??e.type,variant:e.variant})),{densityClasses:d}=Fr(e),{dimensionStyles:p}=Bn(e),{elevationClasses:m}=Nr(e),{locationStyles:v}=oo(e),{positionClasses:g}=_l(e),{roundedClasses:b}=An(e),{textColorClasses:y,textColorStyles:w}=Qr(()=>e.borderColor),{t:_}=kr(),T=ee(()=>({"aria-label":_(e.closeLabel),onClick(P){s.value=!1,n("click:close",P)}}));return()=>{const P=!!(r.prepend||i.value),x=!!(r.title||e.title),C=!!(r.close||e.closable),E={density:e.density,icon:i.value,size:e.iconSize||e.prominent?a.value:void 0};return s.value&&f(e.tag,{class:Se(["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,l.value,d.value,m.value,g.value,b.value,u.value,e.class]),style:Le([c.value,p.value,v.value,e.style]),role:"alert"},{default:()=>[ia(!1,"v-alert"),e.border&&S("div",{key:"border",class:Se(["v-alert__border",y.value]),style:Le(w.value)},null),P&&S("div",{key:"prepend",class:"v-alert__prepend"},[r.prepend?f(vt,{key:"prepend-defaults",disabled:!i.value,defaults:{VIcon:{...E}}},r.prepend):f(j,ce({key:"prepend-icon"},E),null)]),S("div",{class:"v-alert__content"},[x&&f(bP,{key:"title"},{default:()=>[r.title?.()??e.title]}),r.text?.()??e.text,r.default?.()]),r.append&&S("div",{key:"append",class:"v-alert__append"},[r.append()]),C&&S("div",{key:"close",class:"v-alert__close"},[r.close?f(vt,{key:"close-defaults",defaults:{VBtn:{icon:e.closeIcon,size:"x-small",variant:"text"}}},{default:()=>[r.close?.({props:T.value})]}):f(te,ce({key:"close-btn",icon:e.closeIcon,size:"x-small",variant:"text"},T.value),null)])]})}}}),pv=Symbol.for("vuetify:list");function SP(){let{filterable:e}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{filterable:!1};const t=He(pv,{filterable:!1,hasPrepend:Ee(!1),updateHasPrepend:()=>null}),n={filterable:t.filterable||e,hasPrepend:Ee(!1),updateHasPrepend:r=>{r&&(n.hasPrepend.value=r)}};return Dt(pv,n),t}function wP(){return He(pv,null)}const Nb=e=>{const t={activate:n=>{let{id:r,value:s,activated:i}=n;return r=Me(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 a of gn(n))i=t.activate({id:a,value:!0,activated:new Set(i),children:r,parents:s});return i},out:n=>Array.from(n)};return t},_P=e=>{const t=Nb(e);return{activate:r=>{let{activated:s,id:i,...a}=r;i=Me(i);const o=s.has(i)?new Set([i]):new Set;return t.activate({...a,id:i,activated:o})},in:(r,s,i)=>{let a=new Set;if(r!=null){const o=gn(r);o.length&&(a=t.in(o.slice(0,1),s,i))}return a},out:(r,s,i)=>t.out(r,s,i)}},kq=e=>{const t=Nb(e);return{activate:r=>{let{id:s,activated:i,children:a,...o}=r;return s=Me(s),a.has(s)?i:t.activate({id:s,activated:i,children:a,...o})},in:t.in,out:t.out}},xq=e=>{const t=_P(e);return{activate:r=>{let{id:s,activated:i,children:a,...o}=r;return s=Me(s),a.has(s)?i:t.activate({id:s,activated:i,children:a,...o})},in:t.in,out:t.out}},Eq={open:e=>{let{id:t,value:n,opened:r,parents:s}=e;if(n){const i=new Set;i.add(t);let a=s.get(t);for(;a!=null;)i.add(a),a=s.get(a);return i}else return r.delete(t),r},select:()=>null},kP={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},Cq={open:kP.open,select:e=>{let{id:t,value:n,opened:r,parents:s}=e;if(!n)return r;const i=[];let a=s.get(t);for(;a!=null;)i.push(a),a=s.get(a);return new Set(i)}},Mb=e=>{const t={select:n=>{let{id:r,value:s,selected:i}=n;if(r=Me(r),e&&!s){const a=Array.from(i.entries()).reduce((o,l)=>{let[c,u]=l;return u==="on"&&o.push(c),o},[]);if(a.length===1&&a[0]===r)return i}return i.set(r,s?"on":"off"),i},in:(n,r,s,i)=>{const a=new Map;for(const o of n||[])t.select({id:o,value:!0,selected:a,children:r,parents:s,disabled:i});return a},out:n=>{const r=[];for(const[s,i]of n.entries())i==="on"&&r.push(s);return r}};return t},xP=e=>{const t=Mb(e);return{select:r=>{let{selected:s,id:i,...a}=r;i=Me(i);const o=s.has(i)?new Map([[i,s.get(i)]]):new Map;return t.select({...a,id:i,selected:o})},in:(r,s,i,a)=>r?.length?t.in(r.slice(0,1),s,i,a):new Map,out:(r,s,i)=>t.out(r,s,i)}},Tq=e=>{const t=Mb(e);return{select:r=>{let{id:s,selected:i,children:a,...o}=r;return s=Me(s),a.has(s)?i:t.select({id:s,selected:i,children:a,...o})},in:t.in,out:t.out}},Iq=e=>{const t=xP(e);return{select:r=>{let{id:s,selected:i,children:a,...o}=r;return s=Me(s),a.has(s)?i:t.select({id:s,selected:i,children:a,...o})},in:t.in,out:t.out}},EP=e=>{const t={select:n=>{let{id:r,value:s,selected:i,children:a,parents:o,disabled:l}=n;r=Me(r);const c=new Map(i),u=[r];for(;u.length;){const p=u.shift();l.has(p)||i.set(Me(p),s?"on":"off"),a.has(p)&&u.push(...a.get(p))}let d=Me(o.get(r));for(;d;){let p=!0,m=!0;for(const v of a.get(d)){const g=Me(v);if(!l.has(g)&&(i.get(g)!=="on"&&(p=!1),i.has(g)&&i.get(g)!=="off"&&(m=!1),!p&&!m))break}i.set(d,p?"on":m?"off":"indeterminate"),d=Me(o.get(d))}return e&&!s&&Array.from(i.entries()).reduce((m,v)=>{let[g,b]=v;return b==="on"&&m.push(g),m},[]).length===0?c:i},in:(n,r,s)=>{let i=new Map;for(const a of n||[])i=t.select({id:a,value:!0,selected:i,children:r,parents:s,disabled:new Set});return i},out:(n,r)=>{const s=[];for(const[i,a]of n.entries())a==="on"&&!r.has(i)&&s.push(i);return s}};return t},Rq=e=>{const t=EP(e);return{select:t.select,in:t.in,out:(r,s,i)=>{const a=[];for(const[o,l]of r.entries())if(l==="on"){if(i.has(o)){const c=i.get(o);if(r.get(c)==="on")continue}a.push(o)}return a}}},ll=Symbol.for("vuetify:nested"),CP={id:Ee(),root:{itemsRegistration:q("render"),register:()=>null,unregister:()=>null,updateDisabled:()=>null,children:q(new Map),parents:q(new Map),disabled:q(new Set),open:()=>null,openOnSelect:()=>null,activate:()=>null,select:()=>null,activatable:q(!1),selectable:q(!1),opened:q(new Set),activated:q(new Set),selected:q(new Map),selectedValues:q([]),getPath:()=>[]}},Pq=oe({activatable:Boolean,selectable:Boolean,activeStrategy:[String,Function,Object],selectStrategy:[String,Function,Object],openStrategy:[String,Object],opened:null,activated:null,selected:null,mandatory:Boolean,itemsRegistration:{type:String,default:"render"}},"nested"),Aq=(e,t,n)=>{let r=!1;const s=Ee(new Map),i=Ee(new Map),a=Ee(new Set),o=tt(e,"opened",e.opened,_=>new Set(Array.isArray(_)?_.map(T=>Me(T)):_),_=>[..._.values()]),l=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 kq(e.mandatory);case"single-leaf":return xq(e.mandatory);case"independent":return Nb(e.mandatory);default:return _P(e.mandatory)}}),c=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 Iq(e.mandatory);case"leaf":return Tq(e.mandatory);case"independent":return Mb(e.mandatory);case"single-independent":return xP(e.mandatory);case"trunk":return Rq(e.mandatory);default:return EP(e.mandatory)}}),u=A(()=>{if(typeof e.openStrategy=="object")return e.openStrategy;switch(e.openStrategy){case"list":return Cq;case"single":return Eq;default:return kP}}),d=tt(e,"activated",e.activated,_=>l.value.in(_,s.value,i.value),_=>l.value.out(_,s.value,i.value)),p=tt(e,"selected",e.selected,_=>c.value.in(_,s.value,i.value,a.value),_=>c.value.out(_,s.value,i.value));Mn(()=>{r=!0});function m(_){const T=[];let P=Me(_);for(;P!==void 0;)T.unshift(P),P=i.value.get(P);return T}const v=tn("nested"),g=new Set,b=tF(()=>{ut(()=>{s.value=new Map(s.value),i.value=new Map(i.value)})},100);_e(()=>[t.value,Rt(n)],()=>{e.itemsRegistration==="props"&&y()},{immediate:!0});function y(){const _=new Map,T=new Map,P=new Set,x=Rt(n)?R=>Me(R.raw):R=>R.value,C=[...t.value];let E=0;for(;E<C.length;){const R=C[E++],I=x(R);if(R.children){const O=[];for(const L of R.children){const V=x(L);_.set(V,I),O.push(V),C.push(L)}T.set(I,O)}R.props.disabled&&P.add(I)}s.value=T,i.value=_,a.value=P}const w={id:Ee(),root:{opened:o,activatable:ee(()=>e.activatable),selectable:ee(()=>e.selectable),activated:d,selected:p,selectedValues:A(()=>{const _=[];for(const[T,P]of p.value.entries())P==="on"&&_.push(T);return _}),itemsRegistration:ee(()=>e.itemsRegistration),register:(_,T,P,x)=>{if(g.has(_)){m(_).map(String).join(" -> "),m(T).concat(_).map(String).join(" -> ");return}else g.add(_);T&&_!==T&&i.value.set(_,T),P&&a.value.add(_),x&&s.value.set(_,[]),T!=null&&s.value.set(T,[...s.value.get(T)||[],_]),b()},unregister:_=>{if(r)return;g.delete(_),s.value.delete(_),a.value.delete(_);const T=i.value.get(_);if(T){const P=s.value.get(T)??[];s.value.set(T,P.filter(x=>x!==_))}i.value.delete(_),b()},updateDisabled:(_,T)=>{T?a.value.add(_):a.value.delete(_)},open:(_,T,P)=>{v.emit("click:open",{id:_,value:T,path:m(_),event:P});const x=u.value.open({id:_,value:T,opened:new Set(o.value),children:s.value,parents:i.value,event:P});x&&(o.value=x)},openOnSelect:(_,T,P)=>{const x=u.value.select({id:_,value:T,selected:new Map(p.value),opened:new Set(o.value),children:s.value,parents:i.value,event:P});x&&(o.value=x)},select:(_,T,P)=>{v.emit("click:select",{id:_,value:T,path:m(_),event:P});const x=c.value.select({id:_,value:T,selected:new Map(p.value),children:s.value,parents:i.value,disabled:a.value,event:P});x&&(p.value=x),w.root.openOnSelect(_,T,P)},activate:(_,T,P)=>{if(!e.activatable)return w.root.select(_,!0,P);v.emit("click:activate",{id:_,value:T,path:m(_),event:P});const x=l.value.activate({id:_,value:T,activated:new Set(d.value),children:s.value,parents:i.value,event:P});if(x.size!==d.value.size)d.value=x;else{for(const C of x)if(!d.value.has(C)){d.value=x;return}for(const C of d.value)if(!x.has(C)){d.value=x;return}}},children:s,parents:i,disabled:a,getPath:m}};return Dt(ll,w),w.root},TP=(e,t,n)=>{const r=He(ll,CP),s=Symbol("nested item"),i=A(()=>{const o=Me(Rt(e));return o!==void 0?o:s}),a={...r,id:i,open:(o,l)=>r.root.open(i.value,o,l),openOnSelect:(o,l)=>r.root.openOnSelect(i.value,o,l),isOpen:A(()=>r.root.opened.value.has(i.value)),parent:A(()=>r.root.parents.value.get(i.value)),activate:(o,l)=>r.root.activate(i.value,o,l),isActivated:A(()=>r.root.activated.value.has(i.value)),select:(o,l)=>r.root.select(i.value,o,l),isSelected:A(()=>r.root.selected.value.get(i.value)==="on"),isIndeterminate:A(()=>r.root.selected.value.get(i.value)==="indeterminate"),isLeaf:A(()=>!r.root.children.value.get(i.value)),isGroupActivator:r.isGroupActivator};return ml(()=>{r.isGroupActivator||r.root.itemsRegistration.value==="props"||ut(()=>{r.root.register(i.value,r.id.value,Rt(t),n)})}),Mn(()=>{r.isGroupActivator||r.root.itemsRegistration.value==="props"||r.root.unregister(i.value)}),_e(i,(o,l)=>{r.isGroupActivator||r.root.itemsRegistration.value==="props"||(r.root.unregister(l),ut(()=>{r.root.register(o,r.id.value,Rt(t),n)}))}),_e(()=>Rt(t),o=>{r.root.updateDisabled(i.value,o)}),n&&Dt(ll,a),a},Oq=()=>{const e=He(ll,CP);Dt(ll,{...e,isGroupActivator:!0})};function Lc(){const e=Ee(!1);return ot(()=>{window.requestAnimationFrame(()=>{e.value=!0})}),{ssrBootStyles:ee(()=>e.value?void 0:{transition:"none !important"}),isBooted:gi(e)}}const Dq=gl({name:"VListGroupActivator",setup(e,t){let{slots:n}=t;return Oq(),()=>n.default?.()}}),Lq=oe({activeColor:String,baseColor:String,color:String,collapseIcon:{type:Fe,default:"$collapse"},disabled:Boolean,expandIcon:{type:Fe,default:"$expand"},rawId:[String,Number],prependIcon:Fe,appendIcon:Fe,fluid:Boolean,subgroup:Boolean,title:String,value:null,...Ue(),...lt()},"VListGroup"),mv=be()({name:"VListGroup",props:Lq(),setup(e,t){let{slots:n}=t;const{isOpen:r,open:s,id:i}=TP(()=>e.value,()=>e.disabled,!0),a=A(()=>`v-list-group--id-${String(e.rawId??i.value)}`),o=wP(),{isBooted:l}=Lc(),c=He(ll),u=ee(()=>c?.root?.itemsRegistration.value==="render");function d(g){["INPUT","TEXTAREA"].includes(g.target?.tagName)||s(!r.value,g)}const p=A(()=>({onClick:d,class:"v-list-group__header",id:a.value})),m=A(()=>r.value?e.collapseIcon:e.expandIcon),v=A(()=>({VListItem:{activeColor:e.activeColor,baseColor:e.baseColor,color:e.color,prependIcon:e.prependIcon||e.subgroup&&m.value,appendIcon:e.appendIcon||!e.subgroup&&m.value,title:e.title,value:e.value}}));return Ie(()=>f(e.tag,{class:Se(["v-list-group",{"v-list-group--prepend":o?.hasPrepend.value,"v-list-group--fluid":e.fluid,"v-list-group--subgroup":e.subgroup,"v-list-group--open":r.value},e.class]),style:Le(e.style)},{default:()=>[n.activator&&f(vt,{defaults:v.value},{default:()=>[f(Dq,null,{default:()=>[n.activator({props:p.value,isOpen:r.value})]})]}),f($s,{transition:{component:Py},disabled:!l.value},{default:()=>[u.value?Pt(S("div",{class:"v-list-group__items",role:"group","aria-labelledby":a.value},[n.default?.()]),[[$r,r.value]]):r.value&&S("div",{class:"v-list-group__items",role:"group","aria-labelledby":a.value},[n.default?.()])]})]})),{isOpen:r}}}),$q=oe({opacity:[Number,String],...Ue(),...lt()},"VListItemSubtitle"),Fl=be()({name:"VListItemSubtitle",props:$q(),setup(e,t){let{slots:n}=t;return Ie(()=>f(e.tag,{class:Se(["v-list-item-subtitle",e.class]),style:Le([{"--v-list-item-subtitle-opacity":e.opacity},e.style])},n)),{}}}),Gt=vl("v-list-item-title"),Fq=oe({active:{type:Boolean,default:void 0},activeClass:String,activeColor:String,appendAvatar:String,appendIcon:Fe,baseColor:String,disabled:Boolean,lines:[Boolean,String],link:{type:Boolean,default:void 0},nav:Boolean,prependAvatar:String,prependIcon:Fe,ripple:{type:[Boolean,Object],default:!0},slim:Boolean,prependGap:[Number,String],subtitle:{type:[String,Number,Boolean],default:void 0},title:{type:[String,Number,Boolean],default:void 0},value:null,onClick:Fn(),onClickOnce:Fn(),...rs(),...Ue(),...Pn(),...Vn(),..._r(),...Tn(),...up(),...lt(),...wt(),...ys({variant:"text"})},"VListItem"),yt=be()({name:"VListItem",directives:{vRipple:Lr},props:Fq(),emits:{click:e=>!0},setup(e,t){let{attrs:n,slots:r,emit:s}=t;const i=lp(e,n),a=A(()=>e.value===void 0?i.href.value:e.value),{activate:o,isActivated:l,select:c,isOpen:u,isSelected:d,isIndeterminate:p,isGroupActivator:m,root:v,parent:g,openOnSelect:b,id:y}=TP(a,()=>e.disabled,!1),w=wP(),_=A(()=>e.active!==!1&&(e.active||i.isActive?.value||(v.activatable.value?l.value:d.value))),T=ee(()=>e.link!==!1&&i.isLink.value),P=A(()=>!!w&&(v.selectable.value||v.activatable.value||e.value!=null)),x=A(()=>!e.disabled&&e.link!==!1&&(e.link||i.isClickable.value||P.value)),C=A(()=>w?T.value?"link":P.value?"option":"listitem":void 0),E=A(()=>{if(P.value)return v.activatable.value?l.value:v.selectable.value?d.value:_.value}),R=ee(()=>e.rounded||e.nav),I=ee(()=>e.color??e.activeColor),O=ee(()=>({color:_.value?I.value??e.baseColor:e.baseColor,variant:e.variant}));_e(()=>i.isActive?.value,X=>{X&&L()}),ml(()=>{i.isActive?.value&&ut(()=>L())});function L(){g.value!=null&&v.open(g.value,!0),b(!0)}const{themeClasses:V}=Mt(e),{borderClasses:F}=vs(e),{colorClasses:B,colorStyles:M,variantClasses:N}=io(O),{densityClasses:D}=Fr(e),{dimensionStyles:W}=Bn(e),{elevationClasses:z}=Nr(e),{roundedClasses:K}=An(R),H=ee(()=>e.lines?`v-list-item--${e.lines}-line`:void 0),re=ee(()=>e.ripple!==void 0&&e.ripple&&w?.filterable?{keys:["Enter"]}:e.ripple),ae=A(()=>({isActive:_.value,select:c,isOpen:u.value,isSelected:d.value,isIndeterminate:p.value}));function de(X){s("click",X),!["INPUT","TEXTAREA"].includes(X.target?.tagName)&&x.value&&(i.navigate?.(X),!m&&(v.activatable.value?o(!l.value,X):(v.selectable.value||e.value!=null&&!T.value)&&c(!d.value,X)))}function De(X){const ie=X.target;["INPUT","TEXTAREA"].includes(ie.tagName)||(X.key==="Enter"||X.key===" "&&!w?.filterable)&&(X.preventDefault(),X.stopPropagation(),X.target.dispatchEvent(new MouseEvent("click",X)))}return Ie(()=>{const X=T.value?"a":e.tag,ie=r.title||e.title!=null,ne=r.subtitle||e.subtitle!=null,ve=!!(e.appendAvatar||e.appendIcon),Ne=!!(ve||r.append),U=!!(e.prependAvatar||e.prependIcon),G=!!(U||r.prepend);return w?.updateHasPrepend(G),e.activeColor&&ZE("active-color",["color","base-color"]),Pt(f(X,ce(i.linkProps,{class:["v-list-item",{"v-list-item--active":_.value,"v-list-item--disabled":e.disabled,"v-list-item--link":x.value,"v-list-item--nav":e.nav,"v-list-item--slim":e.slim,[`${e.activeClass}`]:e.activeClass&&_.value},V.value,F.value,B.value,D.value,z.value,H.value,K.value,N.value,e.class],style:[{"--v-list-prepend-gap":Oe(e.prependGap)},M.value,W.value,e.style],tabindex:x.value?w?-2:0:void 0,"aria-selected":E.value,role:C.value,onClick:de,onKeydown:x.value&&!T.value&&De}),{default:()=>[ia(x.value||_.value,"v-list-item"),G&&S("div",{key:"prepend",class:"v-list-item__prepend"},[r.prepend?f(vt,{key:"prepend-defaults",disabled:!U,defaults:{VAvatar:{density:e.density,image:e.prependAvatar},VIcon:{density:e.density,icon:e.prependIcon},VListItemAction:{start:!0}}},{default:()=>[r.prepend?.(ae.value)]}):S(ke,null,[e.prependAvatar&&f(Sn,{key:"prepend-avatar",density:e.density,image:e.prependAvatar},null),e.prependIcon&&f(j,{key:"prepend-icon",density:e.density,icon:e.prependIcon},null)]),S("div",{class:"v-list-item__spacer"},null)]),S("div",{class:"v-list-item__content","data-no-activator":""},[ie&&f(Gt,{key:"title"},{default:()=>[r.title?.({title:e.title})??Y(e.title)]}),ne&&f(Fl,{key:"subtitle"},{default:()=>[r.subtitle?.({subtitle:e.subtitle})??Y(e.subtitle)]}),r.default?.(ae.value)]),Ne&&S("div",{key:"append",class:"v-list-item__append"},[r.append?f(vt,{key:"append-defaults",disabled:!ve,defaults:{VAvatar:{density:e.density,image:e.appendAvatar},VIcon:{density:e.density,icon:e.appendIcon},VListItemAction:{end:!0}}},{default:()=>[r.append?.(ae.value)]}):S(ke,null,[e.appendIcon&&f(j,{key:"append-icon",density:e.density,icon:e.appendIcon},null),e.appendAvatar&&f(Sn,{key:"append-avatar",density:e.density,image:e.appendAvatar},null)]),S("div",{class:"v-list-item__spacer"},null)])]}),[[Lr,x.value&&re.value]])}),{activate:o,isActivated:l,isGroupActivator:m,isSelected:d,list:w,select:c,root:v,id:y,link:i}}}),Nq=oe({color:String,inset:Boolean,sticky:Boolean,title:String,...Ue(),...lt()},"VListSubheader"),$c=be()({name:"VListSubheader",props:Nq(),setup(e,t){let{slots:n}=t;const{textColorClasses:r,textColorStyles:s}=Qr(()=>e.color);return Ie(()=>{const i=!!(n.default||e.title);return f(e.tag,{class:Se(["v-list-subheader",{"v-list-subheader--inset":e.inset,"v-list-subheader--sticky":e.sticky},r.value,e.class]),style:Le([{textColorStyles:s},e.style])},{default:()=>[i&&S("div",{class:"v-list-subheader__text"},[n.default?.()??e.title])]})}),{}}}),Mq=oe({items:Array,returnObject:Boolean},"VListChildren"),IP=be()({name:"VListChildren",props:Mq(),setup(e,t){let{slots:n}=t;return SP(),()=>n.default?.()??e.items?.map(r=>{let{children:s,props:i,type:a,raw:o}=r;if(a==="divider")return n.divider?.({props:i})??f(pt,i,null);if(a==="subheader")return n.subheader?.({props:i})??f($c,i,null);const l={subtitle:n.subtitle?u=>n.subtitle?.({...u,item:o}):void 0,prepend:n.prepend?u=>n.prepend?.({...u,item:o}):void 0,append:n.append?u=>n.append?.({...u,item:o}):void 0,title:n.title?u=>n.title?.({...u,item:o}):void 0},c=mv.filterProps(i);return s?f(mv,ce(c,{value:e.returnObject?o:i?.value,rawId:i?.value}),{activator:u=>{let{props:d}=u;const p=ce(i,d,{value:e.returnObject?o:i.value});return n.header?n.header({props:p}):f(yt,p,l)},default:()=>f(IP,{items:s,returnObject:e.returnObject},n)}):n.item?n.item({props:i}):f(yt,ce(i,{value:e.returnObject?o:i.value}),l)})}}),RP=oe({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"},itemType:{type:[Boolean,String,Array,Function],default:"type"},returnObject:Boolean,valueComparator:Function},"list-items"),Vq=new Set(["item","divider","subheader"]);function jo(e,t){const n=sn(t,e.itemTitle,t),r=sn(t,e.itemValue,n),s=sn(t,e.itemChildren),i=e.itemProps===!0?typeof t=="object"&&t!=null&&!Array.isArray(t)?"children"in t?Qt(t,["children"]):t:void 0:sn(t,e.itemProps);let a=sn(t,e.itemType,"item");Vq.has(a)||(a="item");const o={title:n,value:r,...i};return{type:a,title:String(o.title??""),value:o.value,props:o,children:a==="item"&&Array.isArray(s)?PP(e,s):void 0,raw:t}}jo.neededProps=["itemTitle","itemValue","itemChildren","itemProps","itemType"];function PP(e,t){const n=Vs(e,jo.neededProps),r=[];for(const s of t)r.push(jo(n,s));return r}function Bq(e){const t=A(()=>PP(e,e.items)),n=A(()=>t.value.some(o=>o.value===null)),r=Ee(new Map),s=Ee([]);bn(()=>{const o=t.value,l=new Map,c=[];for(let u=0;u<o.length;u++){const d=o[u];if(Xi(d.value)||d.value===null){let p=l.get(d.value);p||(p=[],l.set(d.value,p)),p.push(d)}else c.push(d)}r.value=l,s.value=c});function i(o){const l=r.value,c=t.value,u=s.value,d=n.value,p=e.returnObject,m=!!e.valueComparator,v=e.valueComparator||mr,g=Vs(e,jo.neededProps),b=[];e:for(const y of o){if(!d&&y===null)continue;if(p&&typeof y=="string"){b.push(jo(g,y));continue}const w=l.get(y);if(m||!w){for(const _ of m?c:u)if(v(y,_.value)){b.push(_);continue e}b.push(jo(g,y));continue}b.push(...w)}return b}function a(o){return e.returnObject?o.map(l=>{let{raw:c}=l;return c}):o.map(l=>{let{value:c}=l;return c})}return{items:t,transformIn:i,transformOut:a}}const Uq=new Set(["item","divider","subheader"]);function zq(e,t){const n=Xi(t)?t:sn(t,e.itemTitle),r=Xi(t)?t:sn(t,e.itemValue,void 0),s=sn(t,e.itemChildren),i=e.itemProps===!0?Qt(t,["children"]):sn(t,e.itemProps);let a=sn(t,e.itemType,"item");Uq.has(a)||(a="item");const o={title:n,value:r,...i};return{type:a,title:o.title,value:o.value,props:o,children:a==="item"&&s?AP(e,s):void 0,raw:t}}function AP(e,t){const n=[];for(const r of t)n.push(zq(e,r));return n}function jq(e){return{items:A(()=>AP(e,e.items))}}const Hq=oe({baseColor:String,activeColor:String,activeClass:String,bgColor:String,disabled:Boolean,filterable:Boolean,expandIcon:Fe,collapseIcon:Fe,lines:{type:[Boolean,String],default:"one"},slim:Boolean,prependGap:[Number,String],indent:[Number,String],nav:Boolean,"onClick:open":Fn(),"onClick:select":Fn(),"onUpdate:opened":Fn(),...Pq({selectStrategy:"single-leaf",openStrategy:"list"}),...rs(),...Ue(),...Pn(),...Vn(),..._r(),...RP(),...Tn(),...lt(),...wt(),...ys({variant:"text"})},"VList"),_s=be()({name:"VList",props:Hq(),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}=jq(e),{themeClasses:s}=Mt(e),{backgroundColorClasses:i,backgroundColorStyles:a}=yn(()=>e.bgColor),{borderClasses:o}=vs(e),{densityClasses:l}=Fr(e),{dimensionStyles:c}=Bn(e),{elevationClasses:u}=Nr(e),{roundedClasses:d}=An(e),{children:p,open:m,parents:v,select:g,getPath:b}=Aq(e,r,()=>e.returnObject),y=ee(()=>e.lines?`v-list--${e.lines}-line`:void 0),w=ee(()=>e.activeColor),_=ee(()=>e.baseColor),T=ee(()=>e.color),P=ee(()=>e.selectable||e.activatable);SP({filterable:e.filterable}),Rn({VListGroup:{activeColor:w,baseColor:_,color:T,expandIcon:ee(()=>e.expandIcon),collapseIcon:ee(()=>e.collapseIcon)},VListItem:{activeClass:ee(()=>e.activeClass),activeColor:w,baseColor:_,color:T,density:ee(()=>e.density),disabled:ee(()=>e.disabled),lines:ee(()=>e.lines),nav:ee(()=>e.nav),slim:ee(()=>e.slim),variant:ee(()=>e.variant)}});const x=Ee(!1),C=q();function E(F){x.value=!0}function R(F){x.value=!1}function I(F){!x.value&&!(F.relatedTarget&&C.value?.contains(F.relatedTarget))&&V()}function O(F){const B=F.target;if(!(!C.value||B.tagName==="INPUT"&&["Home","End"].includes(F.key)||B.tagName==="TEXTAREA")){if(F.key==="ArrowDown")V("next");else if(F.key==="ArrowUp")V("prev");else if(F.key==="Home")V("first");else if(F.key==="End")V("last");else return;F.preventDefault()}}function L(F){x.value=!0}function V(F){if(C.value)return mu(C.value,F)}return Ie(()=>{const F=e.indent??(e.prependGap?Number(e.prependGap)+24:void 0);return f(e.tag,{ref:C,class:Se(["v-list",{"v-list--disabled":e.disabled,"v-list--nav":e.nav,"v-list--slim":e.slim},s.value,i.value,o.value,l.value,u.value,y.value,d.value,e.class]),style:Le([{"--v-list-indent":Oe(F),"--v-list-group-prepend":F?"0px":void 0,"--v-list-prepend-gap":Oe(e.prependGap)},a.value,c.value,e.style]),tabindex:e.disabled?-1:0,role:P.value?"listbox":"list","aria-activedescendant":void 0,onFocusin:E,onFocusout:R,onFocus:I,onKeydown:O,onMousedown:L},{default:()=>[f(IP,{items:r.value,returnObject:e.returnObject},n)]})}),{open:m,select:g,focus:V,children:p,parents:v,getPath:b}}}),qq={key:1},Wq={key:2},Gq={class:"mt-3"},Kq={key:0},Yq={key:1},Jq={key:2},Xq=Ae({__name:"BatchReprintDialog",setup(e){const t=At(),n=q(),r=jt(Ht.BatchReprintDialog),s=q(!1),i=q(!1),a=q([]),o=q([]),l=q(""),c=bt();function u(v){s.value=!0}async function d(v){n.value=v;try{const g=await Su.batchGetLastPrintedFiles(n.value);a.value=g,o.value=g.filter(b=>b.connectionState==="Operational"&&b.reprintState==Sa.LastPrintReady)}catch(g){l.value=g.code.toString()??""}s.value=!1}async function p(){i.value=!0;try{await Su.batchReprintFiles(o.value.filter(v=>v.file?.path).map(v=>({printerId:v.printerId,path:v.file?.path||""}))),t.clearSelectedPrinters(),c.info("Action completed","Your reprinted jobs are starting",5e3),m()}catch(v){l.value=yq(v)}finally{i.value=!1}}function m(){r.closeDialog(r.context())}return(v,g)=>{const b=qs;return $(),J(b,{id:Q(r).dialogId,"max-width":"1000px",onBeforeOpened:u,onEscape:g[3]||(g[3]=y=>m()),onOpened:d},{default:h(()=>[f($e,{class:"pa-4"},{default:h(()=>[f(Lt,null,{default:h(()=>[...g[4]||(g[4]=[S("span",{class:"text-h5"}," Batch - Submit Reprint Jobs ",-1)])]),_:1}),f(Xe,null,{default:h(()=>[l.value?.length?($(),J(Et,{key:0,color:"error"},{default:h(()=>[k(Y(l.value),1)]),_:1})):se("",!0),s.value?($(),pe("span",qq," Loading... ")):($(),pe("div",Wq,[f(_s,{density:"compact"},{default:h(()=>[f($c,null,{default:h(()=>[...g[5]||(g[5]=[k(" Reprinted Files - Select from list ",-1)])]),_:1}),f(mv,{modelValue:o.value,"onUpdate:modelValue":g[0]||(g[0]=y=>o.value=y),multiple:""},{default:h(()=>[($(!0),pe(ke,null,Ot(a.value,(y,w)=>($(),J(yt,{key:w,value:y,disabled:y.connectionState!=="Operational"||y.reprintState!==Q(Sa).LastPrintReady},{prepend:h(()=>[y.reprintState==Q(Sa).LastPrintReady?($(),J(j,{key:0},{default:h(()=>[...g[6]||(g[6]=[k("checklist",-1)])]),_:1})):se("",!0),y.reprintState==Q(Sa).NoLastPrint?($(),J(j,{key:1},{default:h(()=>[...g[7]||(g[7]=[k(" question_mark ",-1)])]),_:1})):se("",!0),y.reprintState==Q(Sa).PrinterNotAvailable?($(),J(j,{key:2},{default:h(()=>[...g[8]||(g[8]=[k(" signal_disconnected ",-1)])]),_:1})):se("",!0)]),default:h(()=>[y.file?.path?.length?($(),J(Gt,{key:0},{default:h(()=>[k(Y(y.file?.path)+" ",1),y.connectionState!=="Operational"?($(),J(qe,{key:0},{default:h(()=>[...g[9]||(g[9]=[k(" Printer busy ",-1)])]),_:1})):se("",!0)]),_:2},1024)):y.reprintState==Q(Sa).NoLastPrint?($(),J(Gt,{key:1},{default:h(()=>[...g[10]||(g[10]=[k(" No file is present to print again ",-1)])]),_:1})):($(),J(Gt,{key:2},{default:h(()=>[...g[11]||(g[11]=[k(" OctoPrint cant be reached ",-1)])]),_:1})),f(Fl,null,{default:h(()=>[k(" Printer '"+Y(Q(t).printer(y.printerId)?.name??"Unknown printer")+"' ",1)]),_:2},1024)]),_:2},1032,["value","disabled"]))),128))]),_:1},8,["modelValue"])]),_:1})])),S("div",Gq,[i.value?($(),pe("div",Kq,[f(un,{class:"ma-3",indeterminate:"",color:"blue"}),g[12]||(g[12]=k(" Submitting ",-1))])):o.value.length>0?($(),pe("div",Yq,Y(o.value.length)+" reprint selected ",1)):($(),pe("div",Jq,"Must select at least one file"))]),g[14]||(g[14]=S("br",null,null,-1)),f(te,{disabled:i.value||o.value.length===0,onClick:g[1]||(g[1]=y=>p())},{default:h(()=>[...g[13]||(g[13]=[k(" Submit Batch Reprint ",-1)])]),_:1},8,["disabled"])]),_:1}),f(dn,null,{default:h(()=>[f(Ft),f(te,{variant:"text",onClick:g[2]||(g[2]=y=>Q(r).closeDialog())},{default:h(()=>[...g[15]||(g[15]=[k(" Close ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}});function OP(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 oi=0,Ua=1,ji=2,jr=3;function Qq(e){return e===oi}function hv(e){return e===Ua}function gv(e){return e===ji}function vv(e){return e===jr}function Yr(e){return Qq(e)?"OctoPrint":hv(e)?"Moonraker":gv(e)?"PrusaLink":vv(e)?"Bambu":"Unknown"}const Zq=[{name:Yr(oi),value:oi},{name:Yr(Ua),value:Ua},{name:Yr(ji),value:ji},{name:Yr(jr),value:jr}],eW={hasSerialConnection:!0,canSyncName:!0,hasWebInterface:!0,hasEmergencyStop:!0,hasPrinterControl:!0},tW={hasSerialConnection:!1,canSyncName:!1,hasWebInterface:!1,hasEmergencyStop:!0,hasPrinterControl:!0},nW={hasSerialConnection:!1,canSyncName:!1,hasWebInterface:!0,hasEmergencyStop:!1,hasPrinterControl:!1},rW={hasSerialConnection:!1,canSyncName:!1,hasWebInterface:!1,hasEmergencyStop:!1,hasPrinterControl:!0},Fc={[oi]:eW,[Ua]:tW,[ji]:nW,[jr]:rW};function Vb(e){return Fc[e]?.hasSerialConnection??!1}function sW(e){return Fc[e]?.canSyncName??!1}function DP(e){return Fc[e]?.hasWebInterface??!1}function LP(e){return Fc[e]?.hasEmergencyStop??!1}function Jm(e){return Fc[e]?.hasPrinterControl??!1}const wn=q({isOpen:!1,currentPrinterId:void 0,loading:!0,error:!1,lastLoadedPrinterId:void 0});function Nc(){const e=A(()=>wn.value.isOpen),t=A(()=>wn.value.currentPrinterId),n=A(()=>wn.value.loading),r=A(()=>wn.value.error),s=A(()=>wn.value.lastLoadedPrinterId);return{isOpen:e,currentPrinterId:t,loading:n,error:r,lastLoadedPrinterId:s,openFileExplorer:u=>{const d=wn.value.lastLoadedPrinterId!==u.id;wn.value.isOpen=!0,wn.value.currentPrinterId=u.id,d&&(wn.value.error=!1,wn.value.lastLoadedPrinterId=u.id)},closeFileExplorer:()=>{wn.value.isOpen=!1,wn.value.currentPrinterId=void 0,wn.value.error=!1,wn.value.lastLoadedPrinterId=void 0},setLoading:u=>{wn.value.loading=u},setError:u=>{wn.value.error=u},resetForPrinter:u=>{wn.value.lastLoadedPrinterId===u&&(wn.value.error=!1,wn.value.loading=!0)}}}function iW(e){let{rootEl:t,isSticky:n,layoutItemStyles:r}=e;const s=Ee(!1),i=Ee(0),a=A(()=>{const c=typeof s.value=="boolean"?"top":s.value;return[n.value?{top:"auto",bottom:"auto",height:void 0}:void 0,s.value?{[c]:Oe(i.value)}:{top:r.value.top}]});ot(()=>{_e(n,c=>{c?window.addEventListener("scroll",l,{passive:!0}):window.removeEventListener("scroll",l)},{immediate:!0})}),Mn(()=>{window.removeEventListener("scroll",l)});let o=0;function l(){const c=o>window.scrollY?"up":"down",u=t.value.getBoundingClientRect(),d=parseFloat(r.value.top??0),p=window.scrollY-Math.max(0,i.value-d),m=u.height+Math.max(i.value,d)-window.scrollY-window.innerHeight,v=parseFloat(getComputedStyle(t.value).getPropertyValue("--v-body-scroll-y"))||0;u.height<window.innerHeight-d?(s.value="top",i.value=d):c==="up"&&s.value==="bottom"||c==="down"&&s.value==="top"?(i.value=window.scrollY+u.top-v,s.value=!0):c==="down"&&m<=0?(i.value=0,s.value="bottom"):c==="up"&&p<=0&&(v?s.value!=="top"&&(i.value=-p+v+d,s.value="top"):(i.value=u.top+p,s.value="top")),o=window.scrollY}return{isStuck:s,stickyStyles:a}}const aW=100,oW=20;function x_(e){return(e<0?-1:1)*Math.sqrt(Math.abs(e))*1.41421356237}function E_(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=x_(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 x_(t)*1e3}function lW(){const e={};function t(s){Array.from(s.changedTouches).forEach(i=>{(e[i.identifier]??(e[i.identifier]=new iC(oW))).push([s.timeStamp,i])})}function n(s){Array.from(s.changedTouches).forEach(i=>{delete e[i.identifier]})}function r(s){const i=e[s]?.values().reverse();if(!i)throw new Error(`No samples for touch id ${s}`);const a=i[0],o=[],l=[];for(const c of i){if(a[0]-c[0]>aW)break;o.push({t:c[0],d:c[1].clientX}),l.push({t:c[0],d:c[1].clientY})}return{x:E_(o),y:E_(l),get direction(){const{x:c,y:u}=this,[d,p]=[Math.abs(c),Math.abs(u)];return d>p&&c>=0?"right":d>p&&c<=0?"left":p>d&&u>=0?"down":p>d&&u<=0?"up":uW()}}}return{addMovement:t,endTouch:n,getVelocity:r}}function uW(){throw new Error}function cW(e){let{el:t,isActive:n,isTemporary:r,width:s,touchless:i,position:a}=e;ot(()=>{window.addEventListener("touchstart",w,{passive:!0}),window.addEventListener("touchmove",_,{passive:!1}),window.addEventListener("touchend",T,{passive:!0})}),Mn(()=>{window.removeEventListener("touchstart",w),window.removeEventListener("touchmove",_),window.removeEventListener("touchend",T)});const o=A(()=>["left","right"].includes(a.value)),{addMovement:l,endTouch:c,getVelocity:u}=lW();let d=!1;const p=Ee(!1),m=Ee(0),v=Ee(0);let g;function b(x,C){return(a.value==="left"?x:a.value==="right"?document.documentElement.clientWidth-x:a.value==="top"?x:a.value==="bottom"?document.documentElement.clientHeight-x:wo())-(C?s.value:0)}function y(x){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const E=a.value==="left"?(x-v.value)/s.value:a.value==="right"?(document.documentElement.clientWidth-x-v.value)/s.value:a.value==="top"?(x-v.value)/s.value:a.value==="bottom"?(document.documentElement.clientHeight-x-v.value)/s.value:wo();return C?In(E):E}function w(x){if(i.value)return;const C=x.changedTouches[0].clientX,E=x.changedTouches[0].clientY,R=25,I=a.value==="left"?C<R:a.value==="right"?C>document.documentElement.clientWidth-R:a.value==="top"?E<R:a.value==="bottom"?E>document.documentElement.clientHeight-R:wo(),O=n.value&&(a.value==="left"?C<s.value:a.value==="right"?C>document.documentElement.clientWidth-s.value:a.value==="top"?E<s.value:a.value==="bottom"?E>document.documentElement.clientHeight-s.value:wo());(I||O||n.value&&r.value)&&(g=[C,E],v.value=b(o.value?C:E,n.value),m.value=y(o.value?C:E),d=v.value>-20&&v.value<80,c(x),l(x))}function _(x){const C=x.changedTouches[0].clientX,E=x.changedTouches[0].clientY;if(d){if(!x.cancelable){d=!1;return}const I=Math.abs(C-g[0]),O=Math.abs(E-g[1]);(o.value?I>O&&I>3:O>I&&O>3)?(p.value=!0,d=!1):(o.value?O:I)>3&&(d=!1)}if(!p.value)return;x.preventDefault(),l(x);const R=y(o.value?C:E,!1);m.value=Math.max(0,Math.min(1,R)),R>1?v.value=b(o.value?C:E,!0):R<0&&(v.value=b(o.value?C:E,!1))}function T(x){if(d=!1,!p.value)return;l(x),p.value=!1;const C=u(x.changedTouches[0].identifier),E=Math.abs(C.x),R=Math.abs(C.y);(o.value?E>R&&E>400:R>E&&R>3)?n.value=C.direction===({left:"right",right:"left",top:"down",bottom:"up"}[a.value]||wo()):n.value=m.value>.5}const P=A(()=>p.value?{transform:a.value==="left"?`translateX(calc(-100% + ${m.value*s.value}px))`:a.value==="right"?`translateX(calc(100% - ${m.value*s.value}px))`:a.value==="top"?`translateY(calc(-100% + ${m.value*s.value}px))`:a.value==="bottom"?`translateY(calc(100% - ${m.value*s.value}px))`:wo(),transition:"none"}:void 0);return hr(p,()=>{const x=t.value?.style.transform??null,C=t.value?.style.transition??null;bn(()=>{t.value?.style.setProperty("transform",P.value?.transform||"none"),t.value?.style.setProperty("transition",P.value?.transition||null)}),Xt(()=>{t.value?.style.setProperty("transform",x),t.value?.style.setProperty("transition",C)})}),{isDragging:p,dragProgress:m,dragStyles:P}}function wo(){throw new Error}function Mc(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
49
+ 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
50
+ 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
51
+ 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
52
+ 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 dW(e,t,n){const r=[];let s=[];const i=$P(e),a=FP(e),o=n??Mc(t)?.firstDay??0,l=(i.getDay()-o+7)%7,c=(a.getDay()-o+7)%7;for(let u=0;u<l;u++){const d=new Date(i);d.setDate(d.getDate()-(l-u)),s.push(d)}for(let u=1;u<=a.getDate();u++){const d=new Date(e.getFullYear(),e.getMonth(),u);s.push(d),s.length===7&&(r.push(s),s=[])}for(let u=1;u<7-c;u++){const d=new Date(a);d.setDate(d.getDate()+u),s.push(d)}return s.length>0&&r.push(s),r}function wu(e,t,n){let r=(n??Mc(t)?.firstDay??0)%7;[0,1,2,3,4,5,6].includes(r)||(r=0);const s=new Date(e);for(;s.getDay()!==r;)s.setDate(s.getDate()-1);return s}function fW(e,t){const n=new Date(e),r=((Mc(t)?.firstDay??0)+6)%7;for(;n.getDay()!==r;)n.setDate(n.getDate()+1);return n}function $P(e){return new Date(e.getFullYear(),e.getMonth(),1)}function FP(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function pW(e){const t=e.split("-").map(Number);return new Date(t[0],t[1]-1,t[2])}const mW=/^([12]\d{3}-([1-9]|0[1-9]|1[0-2])-([1-9]|0[1-9]|[12]\d|3[01]))$/;function NP(e){if(e==null)return new Date;if(e instanceof Date)return e;if(typeof e=="string"){let t;if(mW.test(e))return pW(e);if(t=Date.parse(e),!isNaN(t))return new Date(t)}return null}const C_=new Date(2e3,0,2);function hW(e,t,n){const r=t??Mc(e)?.firstDay??0;return Po(7).map(s=>{const i=new Date(C_);return i.setDate(C_.getDate()+r+s),new Intl.DateTimeFormat(e,{weekday:n??"narrow"}).format(i)})}function gW(e,t,n,r){const s=NP(e)??new Date,i=r?.[t];if(typeof i=="function")return i(s,t,n);let a={};switch(t){case"fullDate":a={year:"numeric",month:"short",day:"numeric"};break;case"fullDateWithWeekday":a={weekday:"long",year:"numeric",month:"long",day:"numeric"};break;case"normalDate":const o=s.getDate(),l=new Intl.DateTimeFormat(n,{month:"long"}).format(s);return`${o} ${l}`;case"normalDateWithWeekday":a={weekday:"short",day:"numeric",month:"short"};break;case"shortDate":a={month:"short",day:"numeric"};break;case"year":a={year:"numeric"};break;case"month":a={month:"long"};break;case"monthShort":a={month:"short"};break;case"monthAndYear":a={month:"long",year:"numeric"};break;case"monthAndDate":a={month:"long",day:"numeric"};break;case"weekday":a={weekday:"long"};break;case"weekdayShort":a={weekday:"short"};break;case"dayOfMonth":return new Intl.NumberFormat(n).format(s.getDate());case"hours12h":a={hour:"numeric",hour12:!0};break;case"hours24h":a={hour:"numeric",hour12:!1};break;case"minutes":a={minute:"numeric"};break;case"seconds":a={second:"numeric"};break;case"fullTime":a={hour:"numeric",minute:"numeric"};break;case"fullTime12h":a={hour:"numeric",minute:"numeric",hour12:!0};break;case"fullTime24h":a={hour:"numeric",minute:"numeric",hour12:!1};break;case"fullDateTime":a={year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric"};break;case"fullDateTime12h":a={year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",hour12:!0};break;case"fullDateTime24h":a={year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",hour12:!1};break;case"keyboardDate":a={year:"numeric",month:"2-digit",day:"2-digit"};break;case"keyboardDateTime":return a={year:"numeric",month:"2-digit",day:"2-digit",hour:"numeric",minute:"numeric"},new Intl.DateTimeFormat(n,a).format(s).replace(/, /g," ");case"keyboardDateTime12h":return a={year:"numeric",month:"2-digit",day:"2-digit",hour:"numeric",minute:"numeric",hour12:!0},new Intl.DateTimeFormat(n,a).format(s).replace(/, /g," ");case"keyboardDateTime24h":return a={year:"numeric",month:"2-digit",day:"2-digit",hour:"numeric",minute:"numeric",hour12:!1},new Intl.DateTimeFormat(n,a).format(s).replace(/, /g," ");default:a=i??{timeZone:"UTC",timeZoneName:"short"}}return new Intl.DateTimeFormat(n,a).format(s)}function vW(e,t){const n=e.toJsDate(t),r=n.getFullYear(),s=D0(String(n.getMonth()+1),2,"0"),i=D0(String(n.getDate()),2,"0");return`${r}-${s}-${i}`}function yW(e){const[t,n,r]=e.split("-").map(Number);return new Date(t,n-1,r)}function bW(e,t){const n=new Date(e);return n.setMinutes(n.getMinutes()+t),n}function SW(e,t){const n=new Date(e);return n.setHours(n.getHours()+t),n}function za(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),n}function wW(e,t){const n=new Date(e);return n.setDate(n.getDate()+t*7),n}function _W(e,t){const n=new Date(e);return n.setDate(1),n.setMonth(n.getMonth()+t),n}function Wu(e){return e.getFullYear()}function kW(e){return e.getMonth()}function xW(e,t,n,r){const s=Mc(t),i=n??s?.firstDay??0,a=s?.firstWeekSize??1;return r!==void 0?EW(e,t,i,r):CW(e,t,i,a)}function EW(e,t,n,r){const s=(7+r-n)%7,i=wu(e,t,n),a=za(i,6);function o(p){return(7+new Date(p,0,1).getDay()-n)%7}let l=Wu(i);l<Wu(a)&&o(l+1)<=s&&l++;const c=new Date(l,0,1),u=o(l),d=u<=s?za(c,-u):za(c,7-u);return 1+If(Bb(i),Gu(d),"weeks")}function CW(e,t,n,r){const s=wu(e,t,n),i=za(wu(e,t,n),6);function a(d){const p=new Date(d,0,1);return 7-If(p,wu(p,t,n),"days")}let o=Wu(s);o<Wu(i)&&a(o+1)>=r&&o++;const l=new Date(o,0,1),c=a(o),u=c>=r?za(l,c-7):za(l,c);return 1+If(Bb(s),Gu(u),"weeks")}function TW(e){return e.getDate()}function IW(e){return new Date(e.getFullYear(),e.getMonth()+1,1)}function RW(e){return new Date(e.getFullYear(),e.getMonth()-1,1)}function PW(e){return e.getHours()}function AW(e){return e.getMinutes()}function OW(e){return new Date(e.getFullYear(),0,1)}function DW(e){return new Date(e.getFullYear(),11,31)}function LW(e,t){return Tf(e,t[0])&&NW(e,t[1])}function $W(e){const t=new Date(e);return t instanceof Date&&!isNaN(t.getTime())}function Tf(e,t){return e.getTime()>t.getTime()}function FW(e,t){return Tf(Gu(e),Gu(t))}function NW(e,t){return e.getTime()<t.getTime()}function T_(e,t){return e.getTime()===t.getTime()}function MW(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function VW(e,t){return e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function BW(e,t){return e.getFullYear()===t.getFullYear()}function If(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 UW(e,t){const n=new Date(e);return n.setHours(t),n}function zW(e,t){const n=new Date(e);return n.setMinutes(t),n}function jW(e,t){const n=new Date(e);return n.setMonth(t),n}function HW(e,t){const n=new Date(e);return n.setDate(t),n}function qW(e,t){const n=new Date(e);return n.setFullYear(t),n}function Gu(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0)}function Bb(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59,999)}class WW{constructor(t){this.locale=t.locale,this.formats=t.formats}date(t){return NP(t)}toJsDate(t){return t}toISO(t){return vW(this,t)}parseISO(t){return yW(t)}addMinutes(t,n){return bW(t,n)}addHours(t,n){return SW(t,n)}addDays(t,n){return za(t,n)}addWeeks(t,n){return wW(t,n)}addMonths(t,n){return _W(t,n)}getWeekArray(t,n){const r=n!==void 0?Number(n):void 0;return dW(t,this.locale,r)}startOfWeek(t,n){const r=n!==void 0?Number(n):void 0;return wu(t,this.locale,r)}endOfWeek(t){return fW(t,this.locale)}startOfMonth(t){return $P(t)}endOfMonth(t){return FP(t)}format(t,n){return gW(t,n,this.locale,this.formats)}isEqual(t,n){return T_(t,n)}isValid(t){return $W(t)}isWithinRange(t,n){return LW(t,n)}isAfter(t,n){return Tf(t,n)}isAfterDay(t,n){return FW(t,n)}isBefore(t,n){return!Tf(t,n)&&!T_(t,n)}isSameDay(t,n){return MW(t,n)}isSameMonth(t,n){return VW(t,n)}isSameYear(t,n){return BW(t,n)}setMinutes(t,n){return zW(t,n)}setHours(t,n){return UW(t,n)}setMonth(t,n){return jW(t,n)}setDate(t,n){return HW(t,n)}setYear(t,n){return qW(t,n)}getDiff(t,n,r){return If(t,n,r)}getWeekdays(t,n){const r=t!==void 0?Number(t):void 0;return hW(this.locale,r,n)}getYear(t){return Wu(t)}getMonth(t){return kW(t)}getWeek(t,n,r){const s=n!==void 0?Number(n):void 0,i=r!==void 0?Number(r):void 0;return xW(t,this.locale,s,i)}getDate(t){return TW(t)}getNextMonth(t){return IW(t)}getPreviousMonth(t){return RW(t)}getHours(t){return PW(t)}getMinutes(t){return AW(t)}startOfDay(t){return Gu(t)}endOfDay(t){return Bb(t)}startOfYear(t){return OW(t)}endOfYear(t){return DW(t)}}const GW=Symbol.for("vuetify:date-options"),I_=Symbol.for("vuetify:date-adapter");function KW(e,t){const n=Gn({adapter:WW,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:YW(n,t)}}function YW(e,t){const n=Jt(typeof e.adapter=="function"?new e.adapter({locale:e.locale[t.current.value]??t.current.value,formats:e.formats}):e.adapter);return _e(t.current,r=>{n.locale=e.locale[r]??r??n.locale}),n}const Ku=Symbol.for("vuetify:layout"),MP=Symbol.for("vuetify:layout-item"),R_=1e3,VP=oe({overlaps:{type:Array,default:()=>[]},fullHeight:Boolean},"layout"),BP=oe({name:{type:String},order:{type:[Number,String],default:0},absolute:Boolean},"layout-item");function UP(){const e=He(Ku);if(!e)throw new Error("[Vuetify] Could not find injected layout");return{getLayoutItem:e.getLayoutItem,mainRect:e.mainRect,mainStyles:e.mainStyles}}function zP(e){const t=He(Ku);if(!t)throw new Error("[Vuetify] Could not find injected layout");const n=e.id??`layout-item-${Sr()}`,r=tn("useLayoutItem");Dt(MP,{id:n});const s=Ee(!1);ay(()=>s.value=!0),vE(()=>s.value=!1);const{layoutItemStyles:i,layoutItemScrimStyles:a}=t.register(r,{...e,active:A(()=>s.value?!1:e.active.value),id:n});return Mn(()=>t.unregister(n)),{layoutItemStyles:i,layoutRect:t.layoutRect,layoutItemScrimStyles:a}}const JW=(e,t,n,r)=>{let s={top:0,left:0,right:0,bottom:0};const i=[{id:"",layer:{...s}}];for(const a of e){const o=t.get(a),l=n.get(a),c=r.get(a);if(!o||!l||!c)continue;const u={...s,[o.value]:parseInt(s[o.value],10)+(c.value?parseInt(l.value,10):0)};i.push({id:a,layer:u}),s=u}return i};function jP(e){const t=He(Ku,null),n=A(()=>t?t.rootZIndex.value-100:R_),r=q([]),s=Jt(new Map),i=Jt(new Map),a=Jt(new Map),o=Jt(new Map),l=Jt(new Map),{resizeRef:c,contentRect:u}=Qi(),d=A(()=>{const x=new Map,C=e.overlaps??[];for(const E of C.filter(R=>R.includes(":"))){const[R,I]=E.split(":");if(!r.value.includes(R)||!r.value.includes(I))continue;const O=s.get(R),L=s.get(I),V=i.get(R),F=i.get(I);!O||!L||!V||!F||(x.set(I,{position:O.value,amount:parseInt(V.value,10)}),x.set(R,{position:L.value,amount:-parseInt(F.value,10)}))}return x}),p=A(()=>{const x=[...new Set([...a.values()].map(E=>E.value))].sort((E,R)=>E-R),C=[];for(const E of x){const R=r.value.filter(I=>a.get(I)?.value===E);C.push(...R)}return JW(C,s,i,o)}),m=A(()=>!Array.from(l.values()).some(x=>x.value)),v=A(()=>p.value[p.value.length-1].layer),g=ee(()=>({"--v-layout-left":Oe(v.value.left),"--v-layout-right":Oe(v.value.right),"--v-layout-top":Oe(v.value.top),"--v-layout-bottom":Oe(v.value.bottom),...m.value?void 0:{transition:"none"}})),b=A(()=>p.value.slice(1).map((x,C)=>{let{id:E}=x;const{layer:R}=p.value[C],I=i.get(E),O=s.get(E);return{id:E,...R,size:Number(I.value),position:O.value}})),y=x=>b.value.find(C=>C.id===x),w=tn("createLayout"),_=Ee(!1);ot(()=>{_.value=!0}),Dt(Ku,{register:(x,C)=>{let{id:E,order:R,position:I,layoutSize:O,elementSize:L,active:V,disableTransitions:F,absolute:B}=C;a.set(E,R),s.set(E,I),i.set(E,O),o.set(E,V),F&&l.set(E,F);const N=Ao(MP,w?.vnode).indexOf(x);N>-1?r.value.splice(N,0,E):r.value.push(E);const D=A(()=>b.value.findIndex(H=>H.id===E)),W=A(()=>n.value+p.value.length*2-D.value*2),z=A(()=>{const H=I.value==="left"||I.value==="right",re=I.value==="right",ae=I.value==="bottom",de=L.value??O.value,De=de===0?"%":"px",X={[I.value]:0,zIndex:W.value,transform:`translate${H?"X":"Y"}(${(V.value?0:-(de===0?100:de))*(re||ae?-1:1)}${De})`,position:B.value||n.value!==R_?"absolute":"fixed",...m.value?void 0:{transition:"none"}};if(!_.value)return X;const ie=b.value[D.value],ne=d.value.get(E);return ne&&(ie[ne.position]+=ne.amount),{...X,height:H?`calc(100% - ${ie.top}px - ${ie.bottom}px)`:L.value?`${L.value}px`:void 0,left:re?void 0:`${ie.left}px`,right:re?`${ie.right}px`:void 0,top:I.value!=="bottom"?`${ie.top}px`:void 0,bottom:I.value!=="top"?`${ie.bottom}px`:void 0,width:H?L.value?`${L.value}px`:void 0:`calc(100% - ${ie.left}px - ${ie.right}px)`}}),K=A(()=>({zIndex:W.value-1}));return{layoutItemStyles:z,layoutItemScrimStyles:K,zIndex:W}},unregister:x=>{a.delete(x),s.delete(x),i.delete(x),o.delete(x),l.delete(x),r.value=r.value.filter(C=>C!==x)},mainRect:v,mainStyles:g,getLayoutItem:y,items:b,layoutRect:u,rootZIndex:n});const T=ee(()=>["v-layout",{"v-layout--full-height":e.fullHeight}]),P=ee(()=>({zIndex:t?n.value:void 0,position:t?"relative":void 0,overflow:t?"hidden":void 0}));return{layoutClasses:T,layoutStyles:P,getLayoutItem:y,items:b,layoutRect:u,layoutRef:c}}const XW=["start","end","left","right","top","bottom"],QW=oe({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=>XW.includes(e)},sticky:Boolean,...rs(),...Ue(),...zC(),...lo({mobile:null}),..._r(),...BP(),...Tn(),...Qt(qC(),["disableInitialFocus"]),...lt({tag:"nav"}),...wt()},"VNavigationDrawer"),Ub=be()({name:"VNavigationDrawer",props:QW(),emits:{"update:modelValue":e=>!0,"update:rail":e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const{isRtl:i}=xr(),{themeClasses:a}=Mt(e),{borderClasses:o}=vs(e),{backgroundColorClasses:l,backgroundColorStyles:c}=yn(()=>e.color),{elevationClasses:u}=Nr(e),{displayClasses:d,mobile:p}=bs(e),{roundedClasses:m}=An(e),v=TC(),g=tt(e,"modelValue",null,z=>!!z),{ssrBootStyles:b}=Lc(),{scopeId:y}=uo(),w=q(),_=Ee(!1),{runOpenDelay:T,runCloseDelay:P}=jC(e,z=>{_.value=z}),x=A(()=>e.rail&&e.expandOnHover&&_.value?Number(e.width):Number(e.rail?e.railWidth:e.width)),C=A(()=>Sg(e.location,i.value)),E=ee(()=>e.persistent),R=A(()=>!e.permanent&&(p.value||e.temporary)),I=A(()=>e.sticky&&!R.value&&C.value!=="bottom");WC(e,{isActive:g,localTop:R,contentEl:w}),hr(()=>e.expandOnHover&&e.rail!=null,()=>{_e(_,z=>r("update:rail",!z))}),hr(()=>!e.disableResizeWatcher,()=>{_e(R,z=>!e.permanent&&ut(()=>g.value=!z))}),hr(()=>!e.disableRouteWatcher&&!!v,()=>{_e(v.currentRoute,()=>R.value&&(g.value=!1))}),_e(()=>e.permanent,z=>{z&&(g.value=!0)}),e.modelValue==null&&!R.value&&(g.value=e.permanent||!p.value);const{isDragging:O,dragProgress:L}=cW({el:w,isActive:g,isTemporary:R,width:x,touchless:ee(()=>e.touchless),position:C}),V=A(()=>{const z=R.value?0:e.rail&&e.expandOnHover?Number(e.railWidth):x.value;return O.value?z*L.value:z}),{layoutItemStyles:F,layoutItemScrimStyles:B}=zP({id:e.name,order:A(()=>parseInt(e.order,10)),position:C,layoutSize:V,elementSize:x,active:gi(g),disableTransitions:ee(()=>O.value),absolute:A(()=>e.absolute||I.value&&typeof M.value!="string")}),{isStuck:M,stickyStyles:N}=iW({rootEl:w,isSticky:I,layoutItemStyles:F}),D=yn(()=>typeof e.scrim=="string"?e.scrim:null),W=A(()=>({...O.value?{opacity:L.value*.2,transition:"none"}:void 0,...B.value}));return Rn({VList:{bgColor:"transparent"}}),Ie(()=>{const z=s.image||e.image;return S(ke,null,[f(e.tag,ce({ref:w,onMouseenter:T,onMouseleave:P,class:["v-navigation-drawer",`v-navigation-drawer--${C.value}`,{"v-navigation-drawer--expand-on-hover":e.expandOnHover,"v-navigation-drawer--floating":e.floating,"v-navigation-drawer--is-hovering":_.value,"v-navigation-drawer--rail":e.rail,"v-navigation-drawer--temporary":R.value,"v-navigation-drawer--persistent":E.value,"v-navigation-drawer--active":g.value,"v-navigation-drawer--sticky":I.value},a.value,l.value,o.value,d.value,u.value,m.value,e.class],style:[c.value,F.value,b.value,N.value,e.style],inert:!g.value},y,n),{default:()=>[z&&S("div",{key:"image",class:"v-navigation-drawer__img"},[s.image?f(vt,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{alt:"",cover:!0,height:"inherit",src:e.image}}},s.image):f(ms,{key:"image-img",alt:"",cover:!0,height:"inherit",src:e.image},null)]),s.prepend&&S("div",{class:"v-navigation-drawer__prepend"},[s.prepend?.()]),S("div",{class:"v-navigation-drawer__content"},[s.default?.()]),s.append&&S("div",{class:"v-navigation-drawer__append"},[s.append?.()])]}),f(Ji,{name:"fade-transition"},{default:()=>[R.value&&(O.value||g.value)&&!!e.scrim&&S("div",ce({class:["v-navigation-drawer__scrim",D.backgroundColorClasses.value],style:[W.value,D.backgroundColorStyles.value],onClick:()=>{E.value||(g.value=!1)}},y),null)]})])}),{isStuck:M}}}),ZW=oe({active:Boolean,disabled:Boolean,max:[Number,String],value:{type:[Number,String],default:0},...Ue(),...kl({transition:{component:cp}})},"VCounter"),zb=be()({name:"VCounter",functional:!0,props:ZW(),setup(e,t){let{slots:n}=t;const r=ee(()=>e.max?`${e.value} / ${e.max}`:String(e.value));return Ie(()=>f($s,{transition:e.transition},{default:()=>[Pt(S("div",{class:Se(["v-counter",{"text-error":e.max&&!e.disabled&&parseFloat(e.value)>parseFloat(e.max)},e.class]),style:Le(e.style)},[n.default?n.default({counter:r.value,max:e.max,value:e.value}):r.value]),[[$r,e.active]])]})),{}}}),e7=oe({text:String,onClick:Fn(),...Ue(),...wt()},"VLabel"),jb=be()({name:"VLabel",props:e7(),setup(e,t){let{slots:n}=t;return Ie(()=>S("label",{class:Se(["v-label",{"v-label--clickable":!!e.onClick},e.class]),style:Le(e.style),onClick:e.onClick},[e.text,n.default?.()])),{}}}),t7=oe({floating:Boolean,...Ue()},"VFieldLabel"),ld=be()({name:"VFieldLabel",props:t7(),setup(e,t){let{slots:n}=t;return Ie(()=>f(jb,{class:Se(["v-field-label",{"v-field-label--floating":e.floating},e.class]),style:Le(e.style)},n)),{}}});function Hb(e){const{t}=kr();function n(r){let{name:s,color:i,...a}=r;const o={prepend:"prependAction",prependInner:"prependAction",append:"appendAction",appendInner:"appendAction",clear:"clear"}[s],l=e[`onClick:${s}`];function c(d){d.key!=="Enter"&&d.key!==" "||(d.preventDefault(),d.stopPropagation(),mc(l,new PointerEvent("click",d)))}const u=l&&o?t(`$vuetify.input.${o}`,e.label??""):void 0;return f(j,ce({icon:e[`${s}Icon`],"aria-label":u,onClick:l,onKeydown:c,color:i},a),null)}return{InputIcon:n}}const HP=oe({focused:Boolean,"onUpdate:focused":Fn()},"focus");function Nl(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Hs();const n=tt(e,"focused"),r=ee(()=>({[`${t}--focused`]:n.value}));function s(){n.value=!0}function i(){n.value=!1}return{focusClasses:r,isFocused:n,focus:s,blur:i}}const n7=["underlined","outlined","filled","solo","solo-inverted","solo-filled","plain"],Dp=oe({appendInnerIcon:Fe,bgColor:String,clearable:Boolean,clearIcon:{type:Fe,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:Fe,reverse:Boolean,singleLine:Boolean,variant:{type:String,default:"filled",validator:e=>n7.includes(e)},"onClick:clear":Fn(),"onClick:appendInner":Fn(),"onClick:prependInner":Fn(),...Ue(),...ap(),...Tn(),...wt()},"VField"),ul=be()({name:"VField",inheritAttrs:!1,props:{id:String,details:Boolean,labelId:String,...HP(),...Dp()},emits:{"update:focused":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const{themeClasses:i}=Mt(e),{loaderClasses:a}=gc(e),{focusClasses:o,isFocused:l,focus:c,blur:u}=Nl(e),{InputIcon:d}=Hb(e),{roundedClasses:p}=An(e),{rtlClasses:m}=xr(),v=ee(()=>e.dirty||e.active),g=ee(()=>!!(e.label||s.label)),b=ee(()=>!e.singleLine&&g.value),y=Sr(),w=A(()=>e.id||`input-${y}`),_=ee(()=>e.details?`${w.value}-messages`:void 0),T=q(),P=q(),x=q(),C=A(()=>["plain","underlined"].includes(e.variant)),E=A(()=>e.error||e.disabled?void 0:v.value&&l.value?e.color:e.baseColor),R=A(()=>{if(!(!e.iconColor||e.glow&&!l.value))return e.iconColor===!0?E.value:e.iconColor}),{backgroundColorClasses:I,backgroundColorStyles:O}=yn(()=>e.bgColor),{textColorClasses:L,textColorStyles:V}=Qr(E);_e(v,M=>{if(b.value&&!Wa()){const N=T.value.$el,D=P.value.$el;requestAnimationFrame(()=>{const W=wy(N),z=D.getBoundingClientRect(),K=z.x-W.x,H=z.y-W.y-(W.height/2-z.height/2),re=z.width/.75,ae=Math.abs(re-W.width)>1?{maxWidth:Oe(re)}:void 0,de=getComputedStyle(N),De=getComputedStyle(D),X=parseFloat(de.transitionDuration)*1e3||150,ie=parseFloat(De.getPropertyValue("--v-field-label-scale")),ne=De.getPropertyValue("color");N.style.visibility="visible",D.style.visibility="hidden",si(N,{transform:`translate(${K}px, ${H}px) scale(${ie})`,color:ne,...ae},{duration:X,easing:Ou,direction:M?"normal":"reverse"}).finished.then(()=>{N.style.removeProperty("visibility"),D.style.removeProperty("visibility")})})}},{flush:"post"});const F=A(()=>({isActive:v,isFocused:l,controlRef:x,iconColor:R,blur:u,focus:c}));function B(M){M.target!==document.activeElement&&M.preventDefault()}return Ie(()=>{const M=e.variant==="outlined",N=!!(s["prepend-inner"]||e.prependInnerIcon),D=!!(e.clearable||s.clear)&&!e.disabled,W=!!(s["append-inner"]||e.appendInnerIcon||D),z=()=>s.label?s.label({...F.value,label:e.label,props:{for:w.value}}):e.label;return S("div",ce({class:["v-field",{"v-field--active":v.value,"v-field--appended":W,"v-field--center-affix":e.centerAffix??!C.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":N,"v-field--reverse":e.reverse,"v-field--single-line":e.singleLine,"v-field--no-label":!z(),[`v-field--variant-${e.variant}`]:!0},i.value,I.value,o.value,a.value,p.value,m.value,e.class],style:[O.value,e.style],onClick:B},n),[S("div",{class:"v-field__overlay"},null),f(op,{name:"v-field",active:!!e.loading,color:e.error?"error":typeof e.loading=="string"?e.loading:e.color},{default:s.loader}),N&&S("div",{key:"prepend",class:"v-field__prepend-inner"},[s["prepend-inner"]?s["prepend-inner"](F.value):e.prependInnerIcon&&f(d,{key:"prepend-icon",name:"prependInner",color:R.value},null)]),S("div",{class:"v-field__field","data-no-activator":""},[["filled","solo","solo-inverted","solo-filled"].includes(e.variant)&&b.value&&f(ld,{key:"floating-label",ref:P,class:Se([L.value]),floating:!0,for:w.value,"aria-hidden":!v.value,style:Le(V.value)},{default:()=>[z()]}),g.value&&f(ld,{key:"label",ref:T,id:e.labelId,for:w.value,"aria-hidden":b.value&&v.value},{default:()=>[z()]}),s.default?.({...F.value,props:{id:w.value,class:"v-field__input","aria-describedby":_.value},focus:c,blur:u})??S("div",{id:w.value,class:"v-field__input","aria-describedby":_.value},null)]),D&&f(MC,{key:"clear"},{default:()=>[Pt(S("div",{class:"v-field__clearable",onMousedown:K=>{K.preventDefault(),K.stopPropagation()}},[f(vt,{defaults:{VIcon:{icon:e.clearIcon}}},{default:()=>[s.clear?s.clear({...F.value,props:{onFocus:c,onBlur:u,onClick:e["onClick:clear"],tabindex:-1}}):f(d,{name:"clear",onFocus:c,onBlur:u,tabindex:-1},null)]})]),[[$r,e.dirty]])]}),W&&S("div",{key:"append",class:"v-field__append-inner"},[s["append-inner"]?s["append-inner"](F.value):e.appendInnerIcon&&f(d,{key:"append-icon",name:"appendInner",color:R.value},null)]),S("div",{class:Se(["v-field__outline",L.value]),style:Le(V.value)},[M&&S(ke,null,[S("div",{class:"v-field__outline__start"},null),b.value&&S("div",{class:"v-field__outline__notch"},[f(ld,{ref:P,floating:!0,for:w.value,"aria-hidden":!v.value},{default:()=>[z()]})]),S("div",{class:"v-field__outline__end"},null)]),C.value&&b.value&&f(ld,{ref:P,floating:!0,for:w.value,"aria-hidden":!v.value},{default:()=>[z()]})])])}),{controlRef:x,fieldIconColor:R}}}),r7=oe({active:Boolean,color:String,messages:{type:[Array,String],default:()=>[]},...Ue(),...kl({transition:{component:cp,leaveAbsolute:!0,group:!0}})},"VMessages"),s7=be()({name:"VMessages",props:r7(),setup(e,t){let{slots:n}=t;const r=A(()=>gn(e.messages)),{textColorClasses:s,textColorStyles:i}=Qr(()=>e.color);return Ie(()=>f($s,{transition:e.transition,tag:"div",class:Se(["v-messages",s.value,e.class]),style:Le([i.value,e.style])},{default:()=>[e.active&&r.value.map((a,o)=>S("div",{class:"v-messages__message",key:`${o}-${r.value}`},[n.message?n.message({message:a}):a]))]})),{}}}),qP=Symbol.for("vuetify:form"),i7=oe({disabled:Boolean,fastFail:Boolean,readonly:Boolean,modelValue:{type:Boolean,default:null},validateOn:{type:String,default:"input"}},"form");function a7(e){const t=tt(e,"modelValue"),n=ee(()=>e.disabled),r=ee(()=>e.readonly),s=Ee(!1),i=q([]),a=q([]);async function o(){const u=[];let d=!0;a.value=[],s.value=!0;for(const p of i.value){const m=await p.validate();if(m.length>0&&(d=!1,u.push({id:p.id,errorMessages:m})),!d&&e.fastFail)break}return a.value=u,s.value=!1,{valid:d,errors:a.value}}function l(){i.value.forEach(u=>u.reset())}function c(){i.value.forEach(u=>u.resetValidation())}return _e(i,()=>{let u=0,d=0;const p=[];for(const m of i.value)m.isValid===!1?(d++,p.push({id:m.id,errorMessages:m.errorMessages})):m.isValid===!0&&u++;a.value=p,t.value=d>0?!1:u===i.value.length?!0:null},{deep:!0,flush:"post"}),Dt(qP,{register:u=>{let{id:d,vm:p,validate:m,reset:v,resetValidation:g}=u;i.value.some(b=>b.id===d),i.value.push({id:d,validate:m,reset:v,resetValidation:g,vm:Xf(p),isValid:null,errorMessages:[]})},unregister:u=>{i.value=i.value.filter(d=>d.id!==u)},update:(u,d,p)=>{const m=i.value.find(v=>v.id===u);m&&(m.isValid=d,m.errorMessages=p)},isDisabled:n,isReadonly:r,isValidating:s,isValid:t,items:i,validateOn:ee(()=>e.validateOn)}),{errors:a,isDisabled:n,isReadonly:r,isValidating:s,isValid:t,items:i,validate:o,reset:l,resetValidation:c}}function WP(e){const t=He(qP,null);return{...t,isReadonly:A(()=>!!(e?.readonly??t?.isReadonly.value)),isDisabled:A(()=>!!(e?.disabled??t?.isDisabled.value))}}const o7=Symbol.for("vuetify:rules");function l7(e){const t=He(o7,null);if(!e){if(!t)throw new Error("Could not find Vuetify rules injection");return t.aliases}return t?.resolve(e)??ee(e)}const u7=oe({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,...HP()},"validation");function c7(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Hs(),n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Sr();const r=tt(e,"modelValue"),s=A(()=>e.validationValue===void 0?r.value:e.validationValue),i=WP(e),a=l7(()=>e.rules),o=q([]),l=Ee(!0),c=A(()=>!!(gn(r.value===""?null:r.value).length||gn(s.value===""?null:s.value).length)),u=A(()=>e.errorMessages?.length?gn(e.errorMessages).concat(o.value).slice(0,Math.max(0,Number(e.maxErrors))):o.value),d=A(()=>{let T=(e.validateOn??i.validateOn?.value)||"input";T==="lazy"&&(T="input lazy"),T==="eager"&&(T="input eager");const P=new Set(T?.split(" ")??[]);return{input:P.has("input"),blur:P.has("blur")||P.has("input")||P.has("invalid-input"),invalidInput:P.has("invalid-input"),lazy:P.has("lazy"),eager:P.has("eager")}}),p=A(()=>e.error||e.errorMessages?.length?!1:e.rules.length?l.value?o.value.length||d.value.lazy?null:!0:!o.value.length:!0),m=Ee(!1),v=A(()=>({[`${t}--error`]:p.value===!1,[`${t}--dirty`]:c.value,[`${t}--disabled`]:i.isDisabled.value,[`${t}--readonly`]:i.isReadonly.value})),g=tn("validation"),b=A(()=>e.name??Q(n));ml(()=>{i.register?.({id:b.value,vm:g,validate:_,reset:y,resetValidation:w})}),Mn(()=>{i.unregister?.(b.value)}),ot(async()=>{d.value.lazy||await _(!d.value.eager),i.update?.(b.value,p.value,u.value)}),hr(()=>d.value.input||d.value.invalidInput&&p.value===!1,()=>{_e(s,()=>{if(s.value!=null)_();else if(e.focused){const T=_e(()=>e.focused,P=>{P||_(),T()})}})}),hr(()=>d.value.blur,()=>{_e(()=>e.focused,T=>{T||_()})}),_e([p,u],()=>{i.update?.(b.value,p.value,u.value)});async function y(){r.value=null,await ut(),await w()}async function w(){l.value=!0,d.value.lazy?o.value=[]:await _(!d.value.eager)}async function _(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const P=[];m.value=!0;for(const x of a.value){if(P.length>=Number(e.maxErrors??1))break;const E=await(typeof x=="function"?x:()=>x)(s.value);if(E!==!0){if(E!==!1&&typeof E!="string"){console.warn(`${E} is not a valid value. Rule functions must return boolean true or a string.`);continue}P.push(E||"")}}return o.value=P,m.value=!1,l.value=T,o.value}return{errorMessages:u,isDirty:c,isDisabled:i.isDisabled,isReadonly:i.isReadonly,isPristine:l,isValid:p,isValidating:m,reset:y,resetValidation:w,validate:_,validationClasses:v}}const po=oe({id:String,appendIcon:Fe,baseColor:String,centerAffix:{type:Boolean,default:!0},color:String,glow:Boolean,iconColor:[Boolean,String],prependIcon:Fe,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":Fn(),"onClick:append":Fn(),...Ue(),...Pn(),...Vs(Vn(),["maxWidth","minWidth","width"]),...wt(),...u7()},"VInput"),ts=be()({name:"VInput",props:{...po()},emits:{"update:modelValue":e=>!0},setup(e,t){let{attrs:n,slots:r,emit:s}=t;const{densityClasses:i}=Fr(e),{dimensionStyles:a}=Bn(e),{themeClasses:o}=Mt(e),{rtlClasses:l}=xr(),{InputIcon:c}=Hb(e),u=Sr(),d=A(()=>e.id||`input-${u}`),{errorMessages:p,isDirty:m,isDisabled:v,isReadonly:g,isPristine:b,isValid:y,isValidating:w,reset:_,resetValidation:T,validate:P,validationClasses:x}=c7(e,"v-input",d),C=A(()=>e.errorMessages?.length||!b.value&&p.value.length?p.value:e.hint&&(e.persistentHint||e.focused)?e.hint:e.messages),E=ee(()=>C.value.length>0),R=ee(()=>!e.hideDetails||e.hideDetails==="auto"&&(E.value||!!r.details)),I=A(()=>R.value?`${d.value}-messages`:void 0),O=A(()=>({id:d,messagesId:I,isDirty:m,isDisabled:v,isReadonly:g,isPristine:b,isValid:y,isValidating:w,hasDetails:R,reset:_,resetValidation:T,validate:P})),L=ee(()=>e.error||e.disabled?void 0:e.focused?e.color:e.baseColor),V=ee(()=>{if(e.iconColor)return e.iconColor===!0?L.value:e.iconColor});return Ie(()=>{const F=!!(r.prepend||e.prependIcon),B=!!(r.append||e.appendIcon);return S("div",{class:Se(["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,o.value,l.value,x.value,e.class]),style:Le([a.value,e.style])},[F&&S("div",{key:"prepend",class:"v-input__prepend"},[r.prepend?r.prepend(O.value):e.prependIcon&&f(c,{key:"prepend-icon",name:"prepend",color:V.value},null)]),r.default&&S("div",{class:"v-input__control"},[r.default?.(O.value)]),B&&S("div",{key:"append",class:"v-input__append"},[r.append?r.append(O.value):e.appendIcon&&f(c,{key:"append-icon",name:"append",color:V.value},null)]),R.value&&S("div",{id:I.value,class:"v-input__details",role:"alert","aria-live":"polite"},[f(s7,{active:E.value,messages:C.value},{message:r.message}),r.details?.(O.value)])])}),{reset:_,resetValidation:T,validate:P,isValid:y,errorMessages:p}}}),GP=oe({autocomplete:String},"autocomplete");function qb(e){const t=Sr(),n=Ee(0),r=ee(()=>e.autocomplete==="suppress"),s=ee(()=>{if(e.name)return r.value?`${e.name}-${t}-${n.value}`:e.name}),i=ee(()=>r.value?"off":e.autocomplete);return{isSuppressing:r,fieldAutocomplete:i,fieldName:s,update:()=>n.value=new Date().getTime()}}function KP(e){function t(n,r){if(!e.autofocus||!n)return;const s=r[0].target;(s.matches("input,textarea")?s:s.querySelector("input,textarea"))?.focus()}return{onIntersect:t}}const d7=["color","file","time","date","datetime-local","week","month"],YP=oe({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,...GP(),...po(),...Dp()},"VTextField"),Qe=be()({name:"VTextField",directives:{vIntersect:Jo},inheritAttrs:!1,props:YP(),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=tt(e,"modelValue"),{isFocused:a,focus:o,blur:l}=Nl(e),{onIntersect:c}=KP(e),u=A(()=>typeof e.counterValue=="function"?e.counterValue(i.value):typeof e.counterValue=="number"?e.counterValue:(i.value??"").toString().length),d=A(()=>{if(n.maxlength)return n.maxlength;if(!(!e.counter||typeof e.counter!="number"&&typeof e.counter!="string"))return e.counter}),p=A(()=>["plain","underlined"].includes(e.variant)),m=q(),v=q(),g=q(),b=qb(e),y=A(()=>d7.includes(e.type)||e.persistentPlaceholder||a.value||e.active);function w(){b.isSuppressing.value&&b.update(),a.value||o(),ut(()=>{g.value!==document.activeElement&&g.value?.focus()})}function _(C){r("mousedown:control",C),C.target!==g.value&&(w(),C.preventDefault())}function T(C){r("click:control",C)}function P(C,E){C.stopPropagation(),w(),ut(()=>{E(),mc(e["onClick:clear"],C)})}function x(C){const E=C.target;if(!(e.modelModifiers?.trim&&["text","search","password","tel","url"].includes(e.type))){i.value=E.value;return}const R=E.value,I=E.selectionStart,O=E.selectionEnd;i.value=R,ut(()=>{let L=0;R.trimStart().length===E.value.length&&(L=R.length-E.value.length),I!=null&&(E.selectionStart=I-L),O!=null&&(E.selectionEnd=O-L)})}return Ie(()=>{const C=!!(s.counter||e.counter!==!1&&e.counter!=null),E=!!(C||s.details),[R,I]=so(n),{modelValue:O,...L}=ts.filterProps(e),V=ul.filterProps(e);return f(ts,ce({ref:m,modelValue:i.value,"onUpdate:modelValue":F=>i.value=F,class:["v-text-field",{"v-text-field--prefixed":e.prefix,"v-text-field--suffixed":e.suffix,"v-input--plain-underlined":p.value},e.class],style:e.style},R,L,{centerAffix:!p.value,focused:a.value}),{...s,default:F=>{let{id:B,isDisabled:M,isDirty:N,isReadonly:D,isValid:W,hasDetails:z,reset:K}=F;return f(ul,ce({ref:v,onMousedown:_,onClick:T,"onClick:clear":H=>P(H,K),role:e.role},Qt(V,["onClick:clear"]),{id:B.value,labelId:`${B.value}-label`,active:y.value||N.value,dirty:N.value||e.dirty,disabled:M.value,focused:a.value,details:z.value,error:W.value===!1}),{...s,default:H=>{let{props:{class:re,...ae},controlRef:de}=H;const De=S("input",ce({ref:X=>g.value=de.value=X,value:i.value,onInput:x,autofocus:e.autofocus,readonly:D.value,disabled:M.value,name:b.fieldName.value,autocomplete:b.fieldAutocomplete.value,placeholder:e.placeholder,size:1,role:e.role,type:e.type,onFocus:o,onBlur:l,"aria-labelledby":`${B.value}-label`},ae,I),null);return S(ke,null,[e.prefix&&S("span",{class:"v-text-field__prefix"},[S("span",{class:"v-text-field__prefix__text"},[e.prefix])]),Pt(s.default?S("div",{class:Se(re),"data-no-activator":""},[s.default({id:B}),De]):yi(De,{class:re}),[[Jo,c,null,{once:!0}]]),e.suffix&&S("span",{class:"v-text-field__suffix"},[S("span",{class:"v-text-field__suffix__text"},[e.suffix])])])}})},details:E?F=>S(ke,null,[s.details?.(F),C&&S(ke,null,[S("span",null,null),f(zb,{active:e.persistentCounter||a.value,value:u.value,max:d.value,disabled:e.disabled},s.counter)])]):void 0})}),Vr({},m,v,g)}}),f7={class:"d-flex align-center mb-3"},p7={class:"text-h6 font-weight-bold"},m7={class:"flex-grow-1"},h7={class:"text-h6 font-weight-bold"},g7={class:"text-caption text-medium-emphasis"},v7={key:0,class:"mt-3"},y7={class:"d-flex justify-space-between align-center mb-1"},b7={class:"text-body-2"},S7={class:"text-body-2 font-weight-bold"},w7={class:"ma-3"},_7={class:"text-caption"},k7={class:"d-flex flex-wrap ga-2"},x7={class:"d-flex flex-wrap ga-2"},E7={class:"file-list"},C7={key:0,class:"d-flex justify-center py-4"},T7={key:1,class:"text-center py-6"},I7={class:"d-flex align-center"},R7={class:"flex-grow-1 min-width-0"},P7=["title"],A7={class:"text-caption text-medium-emphasis"},O7={class:"d-flex ga-1"},D7={class:"d-flex flex-wrap ga-2"},L7=Ae({__name:"FileExplorerSideNav",setup(e){const t=At(),n=Kn(),r=Nc(),s=q(void 0),i=q(void 0),a=r.isOpen,o=r.loading,l=r.error,c=r.currentPrinterId,u=A(()=>{if(c.value)return t.printer(c.value)}),d=A(()=>c.value?n.isApiResponding(c.value):!1),p=A(()=>Yr(u.value?.printerType)),m=A(()=>c.value?n.isPrinterOperational(c.value):!1),v=A(()=>u.value?.enabled),g=A(()=>!!u.value?.disabledReason?.length),b=A(()=>c.value?n.isPrinterPrinting(c.value):!1),y=A(()=>i.value?.length?i.value.filter(ie=>s.value?.length?`${ie.path}`.toLowerCase().includes(s.value):!0)||[]:[]),w=A(()=>!u.value||!c.value?!1:n.isPrinterStoppable(c.value)),_=A(()=>!u.value||!c.value?!1:n.isPrinterPaused(c.value)),T=A(()=>c.value?i.value?.length&&n.isApiResponding(c.value):!1),P=A(()=>{if(!c.value)throw new Error("Printer ID not set, cannot get current job");return n.printerJobsById[c.value]}),x=A(()=>{if(!c.value)throw new Error("Printer ID not set, cannot get current printing file name");return n.printingFilePathsByPrinterId[c.value]}),C=async()=>{r.setLoading(!0),r.setError(!1);const ie=c.value;if(ie)try{n.isApiResponding(ie)?i.value=await t.loadPrinterFiles(ie):i.value=await pi.getFileCache(ie)}catch(ne){console.warn("Failed to load printer files:",ne),r.setError(!0),i.value=[]}finally{r.setLoading(!1)}},E=async ie=>{c.value&&await t.deletePrinterFile(c.value,ie.path)};_e(c,async(ie,ne)=>{ie&&ie!==ne?await C():ie||(i.value=void 0)});function R(ie){return ie?ie?.toFixed(1):""}function I(ie){return c.value?n.printingFilePathsByPrinterId[c.value]===ie.path:!1}function O(){const ie=u.value;if(ie&&a.value)return Op(ie.name)}function L(){u.value&&(It.openPrinterURL(u.value.printerURL),ae())}async function V(){if(c.value){if(n.isPrinterOperational(c.value))return await It.sendPrinterDisconnectCommand(c.value);await It.sendPrinterConnectCommand(c.value)}}async function F(){if(!c.value)throw new Error("Printer ID not set, cant toggle enabled");if(!u.value)throw new Error("Cant toggle enabled, sidenav printer unset");const ie=!u.value.enabled;await It.toggleEnabled(c.value,ie)}async function B(){if(!c.value)throw new Error("Printer ID not set, cant toggle maintenance");if(!u.value)throw new Error("Cant toggle enabled, sidenav printer unset");if(g.value){await It.updatePrinterMaintenance(c.value);return}t.setMaintenanceDialogPrinter(u.value),await jt(Ht.PrinterMaintenanceDialog).openDialog(),ae()}async function M(){c.value&&await It.refreshSocket(c.value)}async function N(){c.value&&confirm("Are you sure to cancel the current print job?")&&await It.stopPrintJob(c.value)}async function D(){c.value&&await It.pausePrintJob(c.value)}async function W(){c.value&&await It.resumePrintJob(c.value)}async function z(){c.value&&confirm("Are you sure to delete all files for this printer?")&&(r.setLoading(!0),await t.deletePrinterFiles(c.value),r.setLoading(!1),i.value=t.printerFiles(c.value))}function K(){u.value&&(jt(Ht.AddOrUpdatePrinterDialog).openDialog({id:u.value.id}),ae())}async function H(ie){c.value&&await n.selectAndPrintFile({printerId:c.value,fullPath:ie.path})}function re(ie){c.value&&pi.downloadFile(c.value,ie)}function ae(){r.closeFileExplorer()}function de(){return v.value?d.value?b.value?"success":m.value?"primary":"medium-emphasis":"warning":"error"}function De(){return v.value?d.value?b.value?"print":m.value?"check_circle":"radio_button_unchecked":"wifi_off":"power_off"}function X(){return v.value?d.value?b.value&&_.value?"Paused":b.value?"Printing":m.value?"Ready":"Idle":"Offline":"Disabled"}return(ie,ne)=>($(),J(Ub,{modelValue:Q(a),"onUpdate:modelValue":[ne[12]||(ne[12]=ve=>nt(a)?a.value=ve:null),ae],location:"right",temporary:"",width:"420",class:"printer-side-nav"},{default:h(()=>[u.value?($(),J($e,{key:0,class:"ma-3 mb-4",elevation:"2",rounded:"lg"},{default:h(()=>[f(Xe,{class:"pb-2"},{default:h(()=>[S("div",f7,[f(Sn,{size:48,color:"primary",class:"mr-3"},{default:h(()=>[S("span",p7,Y(O()),1)]),_:1}),S("div",m7,[S("div",h7,Y(u.value.name),1),S("div",g7,Y(p.value),1)]),u.value&&Q(DP)(u.value.printerType)?($(),J(te,{key:0,icon:"open_in_new",variant:"text",size:"small",onClick:ne[0]||(ne[0]=ve=>L())})):se("",!0)]),f(qe,{color:de(),"prepend-icon":De(),size:"small",class:"mb-2"},{default:h(()=>[k(Y(X()),1)]),_:1},8,["color","prepend-icon"]),P.value?.progress&&b.value?($(),pe("div",v7,[S("div",y7,[S("span",b7,Y(x.value),1),S("span",S7,Y(R(P.value.progress.completion))+"% ",1)]),f(Or,{"model-value":P.value.progress.completion,color:"primary",height:"6",rounded:""},null,8,["model-value"])])):se("",!0)]),_:1})]),_:1})):se("",!0),S("div",w7,[v.value?d.value?se("",!0):($(),J(Et,{key:1,type:"info",variant:"tonal",class:"mb-3",density:"compact"},{prepend:h(()=>[f(j,null,{default:h(()=>[...ne[15]||(ne[15]=[k("wifi_off",-1)])]),_:1})]),default:h(()=>[ne[16]||(ne[16]=k(" Printer appears offline. Attempting to reconnect... ",-1))]),_:1})):($(),J(Et,{key:0,type:"warning",variant:"tonal",class:"mb-3",density:"compact"},{prepend:h(()=>[f(j,null,{default:h(()=>[...ne[13]||(ne[13]=[k("power_off",-1)])]),_:1})]),default:h(()=>[ne[14]||(ne[14]=k(" Printer is disabled. Enable to receive live updates. ",-1))]),_:1})),u.value?.disabledReason?($(),J(Et,{key:2,type:"error",variant:"tonal",class:"mb-3",density:"compact"},{prepend:h(()=>[f(j,null,{default:h(()=>[...ne[17]||(ne[17]=[k("construction",-1)])]),_:1})]),default:h(()=>[S("div",null,[ne[18]||(ne[18]=S("div",{class:"font-weight-bold"},"Under Maintenance",-1)),S("div",_7,Y(u.value.disabledReason),1)])]),_:1})):se("",!0),Q(l)?($(),J(Et,{key:3,type:"warning",variant:"tonal",class:"mb-3",density:"compact"},{prepend:h(()=>[f(j,null,{default:h(()=>[...ne[19]||(ne[19]=[k("warning",-1)])]),_:1})]),default:h(()=>[S("div",null,[S("div",null,"Unable to load files from "+Y(p.value),1),f(te,{size:"small",variant:"outlined",class:"mt-2",onClick:ne[1]||(ne[1]=ve=>C())},{default:h(()=>[...ne[20]||(ne[20]=[k(" Try Again ",-1)])]),_:1})])]),_:1})):se("",!0)]),f($e,{class:"ma-3 mb-4",elevation:"1",rounded:"lg"},{default:h(()=>[f(Lt,{class:"text-subtitle-1 py-3"},{default:h(()=>[...ne[21]||(ne[21]=[k(" Quick Actions ",-1)])]),_:1}),f(Xe,{class:"pt-0"},{default:h(()=>[S("div",k7,[f(te,{disabled:!v.value||!d.value,color:m.value?"warning":"success",size:"small",variant:"outlined",onClick:ne[2]||(ne[2]=ve=>V())},{default:h(()=>[f(j,{start:""},{default:h(()=>[k(Y(m.value?"usb_off":"usb"),1)]),_:1}),k(" "+Y(m.value?"Disconnect":"Connect"),1)]),_:1},8,["disabled","color"]),f(te,{color:v.value?"warning":"success",size:"small",variant:"outlined",onClick:ne[3]||(ne[3]=ve=>F())},{default:h(()=>[f(j,{start:""},{default:h(()=>[k(Y(v.value?"pause":"play_arrow"),1)]),_:1}),k(" "+Y(v.value?"Disable":"Enable"),1)]),_:1},8,["color"]),f(te,{size:"small",variant:"outlined",onClick:ne[4]||(ne[4]=ve=>M())},{default:h(()=>[f(j,{start:""},{default:h(()=>[...ne[22]||(ne[22]=[k("refresh",-1)])]),_:1}),ne[23]||(ne[23]=k(" Refresh ",-1))]),_:1})])]),_:1})]),_:1}),b.value||w.value||_.value?($(),J($e,{key:1,class:"ma-3 mb-4",elevation:"1",rounded:"lg"},{default:h(()=>[f(Lt,{class:"text-subtitle-1 py-3"},{default:h(()=>[...ne[24]||(ne[24]=[k(" Print Controls ",-1)])]),_:1}),f(Xe,{class:"pt-0"},{default:h(()=>[S("div",x7,[b.value||_.value?($(),J(te,{key:0,disabled:!d.value,color:_.value?"success":"warning",size:"small",variant:"outlined",onClick:ne[5]||(ne[5]=ve=>_.value?W():D())},{default:h(()=>[f(j,{start:""},{default:h(()=>[k(Y(_.value?"play_arrow":"pause"),1)]),_:1}),k(" "+Y(_.value?"Resume":"Pause"),1)]),_:1},8,["disabled","color"])):se("",!0),w.value?($(),J(te,{key:1,color:"error",size:"small",variant:"outlined",onClick:ne[6]||(ne[6]=ve=>N())},{default:h(()=>[f(j,{start:""},{default:h(()=>[...ne[25]||(ne[25]=[k("stop",-1)])]),_:1}),ne[26]||(ne[26]=k(" Cancel Print ",-1))]),_:1})):se("",!0)])]),_:1})]),_:1})):se("",!0),f($e,{class:"ma-3 mb-4 flex-grow-1",elevation:"1",rounded:"lg"},{default:h(()=>[f(Lt,{class:"d-flex align-center py-3"},{default:h(()=>[ne[27]||(ne[27]=S("span",{class:"text-subtitle-1"},"Files",-1)),f(Ft),f(te,{icon:"refresh",size:"small",variant:"text",onClick:ne[7]||(ne[7]=ve=>C())})]),_:1}),f(pt),f(Xe,{class:"pt-3"},{default:h(()=>[f(Qe,{modelValue:s.value,"onUpdate:modelValue":ne[8]||(ne[8]=ve=>s.value=ve),placeholder:"Search files...","prepend-inner-icon":"search",variant:"outlined",density:"compact",clearable:"","hide-details":"",class:"mb-3"},null,8,["modelValue"]),S("div",E7,[Q(o)?($(),pe("div",C7,[f(un,{indeterminate:"",size:"32"})])):!y.value.length&&!Q(l)?($(),pe("div",T7,[f(j,{size:"48",color:"medium-emphasis",class:"mb-2"},{default:h(()=>[...ne[28]||(ne[28]=[k(" folder_open ",-1)])]),_:1}),ne[29]||(ne[29]=S("div",{class:"text-body-2 text-medium-emphasis"}," No files found ",-1))])):se("",!0),($(!0),pe(ke,null,Ot(y.value,(ve,Ne)=>($(),pe("div",{key:Ne,class:"file-item"},[f($e,{class:Se([{"file-printing":I(ve)},"mb-2"]),variant:"outlined",rounded:"lg"},{default:h(()=>[f(Xe,{class:"py-2 px-3"},{default:h(()=>[S("div",I7,[f(j,{color:I(ve)?"primary":"medium-emphasis",class:"mr-3"},{default:h(()=>[k(Y(I(ve)?"play_circle":"insert_drive_file"),1)]),_:2},1032,["color"]),S("div",R7,[S("div",{class:Se([{"text-primary font-weight-bold":I(ve)},"text-body-2 text-truncate"]),title:ve.path},Y(ve.path),11,P7),S("div",A7,Y(Q(OP)(ve.size)),1)]),S("div",O7,[f(te,{icon:"download",size:"x-small",variant:"text",onClick:U=>re(ve.path)},null,8,["onClick"]),f(te,{disabled:I(ve),icon:"play_arrow",size:"x-small",variant:"text",color:"success",onClick:U=>H(ve)},null,8,["disabled","onClick"]),f(te,{disabled:I(ve),icon:"delete",size:"x-small",variant:"text",color:"error",onClick:U=>E(ve)},null,8,["disabled","onClick"])])])]),_:2},1024)]),_:2},1032,["class"])]))),128))])]),_:1})]),_:1}),f($e,{class:"ma-3",elevation:"1",rounded:"lg"},{default:h(()=>[f(Xe,{class:"py-3"},{default:h(()=>[S("div",D7,[f(te,{disabled:!T.value,color:"error",size:"small",variant:"outlined",onClick:ne[9]||(ne[9]=ve=>z())},{default:h(()=>[f(j,{start:""},{default:h(()=>[...ne[30]||(ne[30]=[k("delete_sweep",-1)])]),_:1}),ne[31]||(ne[31]=k(" Clear All ",-1))]),_:1},8,["disabled"]),f(te,{size:"small",variant:"outlined",onClick:ne[10]||(ne[10]=ve=>K())},{default:h(()=>[f(j,{start:""},{default:h(()=>[...ne[32]||(ne[32]=[k("settings",-1)])]),_:1}),ne[33]||(ne[33]=k(" Settings ",-1))]),_:1}),g.value?($(),J(te,{key:0,size:"small",variant:"outlined",color:"warning",onClick:ne[11]||(ne[11]=ve=>B())},{default:h(()=>[f(j,{start:""},{default:h(()=>[...ne[34]||(ne[34]=[k("build",-1)])]),_:1}),ne[35]||(ne[35]=k(" Maintenance ",-1))]),_:1})):se("",!0)])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}}),$7=fn(L7,[["__scopeId","data-v-6302d6a3"]]);function JP(e){return typeof e>"u"||e===null}function F7(e){return typeof e=="object"&&e!==null}function N7(e){return Array.isArray(e)?e:JP(e)?[]:[e]}function M7(e,t){var n,r,s,i;if(t)for(i=Object.keys(t),n=0,r=i.length;n<r;n+=1)s=i[n],e[s]=t[s];return e}function V7(e,t){var n="",r;for(r=0;r<t;r+=1)n+=e;return n}function B7(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var U7=JP,z7=F7,j7=N7,H7=V7,q7=B7,W7=M7,En={isNothing:U7,isObject:z7,toArray:j7,repeat:H7,isNegativeZero:q7,extend:W7};function XP(e,t){var n="",r=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(n+=`
53
+
54
+ `+e.mark.snippet),r+" "+n):r}function Yu(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=XP(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Yu.prototype=Object.create(Error.prototype);Yu.prototype.constructor=Yu;Yu.prototype.toString=function(t){return this.name+": "+XP(this,t)};var cr=Yu;function Xm(e,t,n,r,s){var i="",a="",o=Math.floor(s/2)-1;return r-t>o&&(i=" ... ",t=r-o+i.length),n-r>o&&(a=" ...",n=r+o-a.length),{str:i+e.slice(t,n).replace(/\t/g,"→")+a,pos:r-t+i.length}}function Qm(e,t){return En.repeat(" ",t-e.length)+e}function G7(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var n=/\r?\n|\r|\0/g,r=[0],s=[],i,a=-1;i=n.exec(e.buffer);)s.push(i.index),r.push(i.index+i[0].length),e.position<=i.index&&a<0&&(a=r.length-2);a<0&&(a=r.length-1);var o="",l,c,u=Math.min(e.line+t.linesAfter,s.length).toString().length,d=t.maxLength-(t.indent+u+3);for(l=1;l<=t.linesBefore&&!(a-l<0);l++)c=Xm(e.buffer,r[a-l],s[a-l],e.position-(r[a]-r[a-l]),d),o=En.repeat(" ",t.indent)+Qm((e.line-l+1).toString(),u)+" | "+c.str+`
55
+ `+o;for(c=Xm(e.buffer,r[a],s[a],e.position,d),o+=En.repeat(" ",t.indent)+Qm((e.line+1).toString(),u)+" | "+c.str+`
56
+ `,o+=En.repeat("-",t.indent+u+3+c.pos)+`^
57
+ `,l=1;l<=t.linesAfter&&!(a+l>=s.length);l++)c=Xm(e.buffer,r[a+l],s[a+l],e.position-(r[a]-r[a+l]),d),o+=En.repeat(" ",t.indent)+Qm((e.line+l+1).toString(),u)+" | "+c.str+`
58
+ `;return o.replace(/\n$/,"")}var K7=G7,Y7=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],J7=["scalar","sequence","mapping"];function X7(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(r){t[String(r)]=n})}),t}function Q7(e,t){if(t=t||{},Object.keys(t).forEach(function(n){if(Y7.indexOf(n)===-1)throw new cr('Unknown option "'+n+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(n){return n},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=X7(t.styleAliases||null),J7.indexOf(this.kind)===-1)throw new cr('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var Yn=Q7;function P_(e,t){var n=[];return e[t].forEach(function(r){var s=n.length;n.forEach(function(i,a){i.tag===r.tag&&i.kind===r.kind&&i.multi===r.multi&&(s=a)}),n[s]=r}),n}function Z7(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,n;function r(s){s.multi?(e.multi[s.kind].push(s),e.multi.fallback.push(s)):e[s.kind][s.tag]=e.fallback[s.tag]=s}for(t=0,n=arguments.length;t<n;t+=1)arguments[t].forEach(r);return e}function yv(e){return this.extend(e)}yv.prototype.extend=function(t){var n=[],r=[];if(t instanceof Yn)r.push(t);else if(Array.isArray(t))r=r.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(n=n.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit));else throw new cr("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(i){if(!(i instanceof Yn))throw new cr("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(i.loadKind&&i.loadKind!=="scalar")throw new cr("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(i.multi)throw new cr("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(i){if(!(i instanceof Yn))throw new cr("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(yv.prototype);return s.implicit=(this.implicit||[]).concat(n),s.explicit=(this.explicit||[]).concat(r),s.compiledImplicit=P_(s,"implicit"),s.compiledExplicit=P_(s,"explicit"),s.compiledTypeMap=Z7(s.compiledImplicit,s.compiledExplicit),s};var e9=yv,t9=new Yn("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),n9=new Yn("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),r9=new Yn("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),s9=new e9({explicit:[t9,n9,r9]});function i9(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function a9(){return null}function o9(e){return e===null}var l9=new Yn("tag:yaml.org,2002:null",{kind:"scalar",resolve:i9,construct:a9,predicate:o9,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function u9(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function c9(e){return e==="true"||e==="True"||e==="TRUE"}function d9(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var f9=new Yn("tag:yaml.org,2002:bool",{kind:"scalar",resolve:u9,construct:c9,predicate:d9,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function p9(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function m9(e){return 48<=e&&e<=55}function h9(e){return 48<=e&&e<=57}function g9(e){if(e===null)return!1;var t=e.length,n=0,r=!1,s;if(!t)return!1;if(s=e[n],(s==="-"||s==="+")&&(s=e[++n]),s==="0"){if(n+1===t)return!0;if(s=e[++n],s==="b"){for(n++;n<t;n++)if(s=e[n],s!=="_"){if(s!=="0"&&s!=="1")return!1;r=!0}return r&&s!=="_"}if(s==="x"){for(n++;n<t;n++)if(s=e[n],s!=="_"){if(!p9(e.charCodeAt(n)))return!1;r=!0}return r&&s!=="_"}if(s==="o"){for(n++;n<t;n++)if(s=e[n],s!=="_"){if(!m9(e.charCodeAt(n)))return!1;r=!0}return r&&s!=="_"}}if(s==="_")return!1;for(;n<t;n++)if(s=e[n],s!=="_"){if(!h9(e.charCodeAt(n)))return!1;r=!0}return!(!r||s==="_")}function v9(e){var t=e,n=1,r;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),r=t[0],(r==="-"||r==="+")&&(r==="-"&&(n=-1),t=t.slice(1),r=t[0]),t==="0")return 0;if(r==="0"){if(t[1]==="b")return n*parseInt(t.slice(2),2);if(t[1]==="x")return n*parseInt(t.slice(2),16);if(t[1]==="o")return n*parseInt(t.slice(2),8)}return n*parseInt(t,10)}function y9(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!En.isNegativeZero(e)}var b9=new Yn("tag:yaml.org,2002:int",{kind:"scalar",resolve:g9,construct:v9,predicate:y9,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),S9=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function w9(e){return!(e===null||!S9.test(e)||e[e.length-1]==="_")}function _9(e){var t,n;return t=e.replace(/_/g,"").toLowerCase(),n=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:n*parseFloat(t,10)}var k9=/^[-+]?[0-9]+e/;function x9(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(En.isNegativeZero(e))return"-0.0";return n=e.toString(10),k9.test(n)?n.replace("e",".e"):n}function E9(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||En.isNegativeZero(e))}var C9=new Yn("tag:yaml.org,2002:float",{kind:"scalar",resolve:w9,construct:_9,predicate:E9,represent:x9,defaultStyle:"lowercase"}),T9=s9.extend({implicit:[l9,f9,b9,C9]}),I9=T9,QP=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),ZP=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function R9(e){return e===null?!1:QP.exec(e)!==null||ZP.exec(e)!==null}function P9(e){var t,n,r,s,i,a,o,l=0,c=null,u,d,p;if(t=QP.exec(e),t===null&&(t=ZP.exec(e)),t===null)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,s=+t[3],!t[4])return new Date(Date.UTC(n,r,s));if(i=+t[4],a=+t[5],o=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(u=+t[10],d=+(t[11]||0),c=(u*60+d)*6e4,t[9]==="-"&&(c=-c)),p=new Date(Date.UTC(n,r,s,i,a,o,l)),c&&p.setTime(p.getTime()-c),p}function A9(e){return e.toISOString()}var O9=new Yn("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:R9,construct:P9,instanceOf:Date,represent:A9});function D9(e){return e==="<<"||e===null}var L9=new Yn("tag:yaml.org,2002:merge",{kind:"scalar",resolve:D9}),Wb=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
59
+ \r`;function $9(e){if(e===null)return!1;var t,n,r=0,s=e.length,i=Wb;for(n=0;n<s;n++)if(t=i.indexOf(e.charAt(n)),!(t>64)){if(t<0)return!1;r+=6}return r%8===0}function F9(e){var t,n,r=e.replace(/[\r\n=]/g,""),s=r.length,i=Wb,a=0,o=[];for(t=0;t<s;t++)t%4===0&&t&&(o.push(a>>16&255),o.push(a>>8&255),o.push(a&255)),a=a<<6|i.indexOf(r.charAt(t));return n=s%4*6,n===0?(o.push(a>>16&255),o.push(a>>8&255),o.push(a&255)):n===18?(o.push(a>>10&255),o.push(a>>2&255)):n===12&&o.push(a>>4&255),new Uint8Array(o)}function N9(e){var t="",n=0,r,s,i=e.length,a=Wb;for(r=0;r<i;r++)r%3===0&&r&&(t+=a[n>>18&63],t+=a[n>>12&63],t+=a[n>>6&63],t+=a[n&63]),n=(n<<8)+e[r];return s=i%3,s===0?(t+=a[n>>18&63],t+=a[n>>12&63],t+=a[n>>6&63],t+=a[n&63]):s===2?(t+=a[n>>10&63],t+=a[n>>4&63],t+=a[n<<2&63],t+=a[64]):s===1&&(t+=a[n>>2&63],t+=a[n<<4&63],t+=a[64],t+=a[64]),t}function M9(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var V9=new Yn("tag:yaml.org,2002:binary",{kind:"scalar",resolve:$9,construct:F9,predicate:M9,represent:N9}),B9=Object.prototype.hasOwnProperty,U9=Object.prototype.toString;function z9(e){if(e===null)return!0;var t=[],n,r,s,i,a,o=e;for(n=0,r=o.length;n<r;n+=1){if(s=o[n],a=!1,U9.call(s)!=="[object Object]")return!1;for(i in s)if(B9.call(s,i))if(!a)a=!0;else return!1;if(!a)return!1;if(t.indexOf(i)===-1)t.push(i);else return!1}return!0}function j9(e){return e!==null?e:[]}var H9=new Yn("tag:yaml.org,2002:omap",{kind:"sequence",resolve:z9,construct:j9}),q9=Object.prototype.toString;function W9(e){if(e===null)return!0;var t,n,r,s,i,a=e;for(i=new Array(a.length),t=0,n=a.length;t<n;t+=1){if(r=a[t],q9.call(r)!=="[object Object]"||(s=Object.keys(r),s.length!==1))return!1;i[t]=[s[0],r[s[0]]]}return!0}function G9(e){if(e===null)return[];var t,n,r,s,i,a=e;for(i=new Array(a.length),t=0,n=a.length;t<n;t+=1)r=a[t],s=Object.keys(r),i[t]=[s[0],r[s[0]]];return i}var K9=new Yn("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:W9,construct:G9}),Y9=Object.prototype.hasOwnProperty;function J9(e){if(e===null)return!0;var t,n=e;for(t in n)if(Y9.call(n,t)&&n[t]!==null)return!1;return!0}function X9(e){return e!==null?e:{}}var Q9=new Yn("tag:yaml.org,2002:set",{kind:"mapping",resolve:J9,construct:X9}),eA=I9.extend({implicit:[O9,L9],explicit:[V9,H9,K9,Q9]}),na=Object.prototype.hasOwnProperty,Rf=1,tA=2,nA=3,Pf=4,Zm=1,Z9=2,A_=3,eG=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,tG=/[\x85\u2028\u2029]/,nG=/[,\[\]\{\}]/,rA=/^(?:!|!!|![a-z\-]+!)$/i,sA=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function O_(e){return Object.prototype.toString.call(e)}function Ms(e){return e===10||e===13}function ja(e){return e===9||e===32}function pr(e){return e===9||e===32||e===10||e===13}function Fo(e){return e===44||e===91||e===93||e===123||e===125}function rG(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function sG(e){return e===120?2:e===117?4:e===85?8:0}function iG(e){return 48<=e&&e<=57?e-48:-1}function D_(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
60
+ `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}function aG(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var iA=new Array(256),aA=new Array(256);for(var _o=0;_o<256;_o++)iA[_o]=D_(_o)?1:0,aA[_o]=D_(_o);function oG(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||eA,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function oA(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=K7(n),new cr(t,n)}function ze(e,t){throw oA(e,t)}function Af(e,t){e.onWarning&&e.onWarning.call(null,oA(e,t))}var L_={YAML:function(t,n,r){var s,i,a;t.version!==null&&ze(t,"duplication of %YAML directive"),r.length!==1&&ze(t,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),s===null&&ze(t,"ill-formed argument of the YAML directive"),i=parseInt(s[1],10),a=parseInt(s[2],10),i!==1&&ze(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&Af(t,"unsupported YAML version of the document")},TAG:function(t,n,r){var s,i;r.length!==2&&ze(t,"TAG directive accepts exactly two arguments"),s=r[0],i=r[1],rA.test(s)||ze(t,"ill-formed tag handle (first argument) of the TAG directive"),na.call(t.tagMap,s)&&ze(t,'there is a previously declared suffix for "'+s+'" tag handle'),sA.test(i)||ze(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch{ze(t,"tag prefix is malformed: "+i)}t.tagMap[s]=i}};function Gi(e,t,n,r){var s,i,a,o;if(t<n){if(o=e.input.slice(t,n),r)for(s=0,i=o.length;s<i;s+=1)a=o.charCodeAt(s),a===9||32<=a&&a<=1114111||ze(e,"expected valid JSON character");else eG.test(o)&&ze(e,"the stream contains non-printable characters");e.result+=o}}function $_(e,t,n,r){var s,i,a,o;for(En.isObject(n)||ze(e,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(n),a=0,o=s.length;a<o;a+=1)i=s[a],na.call(t,i)||(t[i]=n[i],r[i]=!0)}function No(e,t,n,r,s,i,a,o,l){var c,u;if(Array.isArray(s))for(s=Array.prototype.slice.call(s),c=0,u=s.length;c<u;c+=1)Array.isArray(s[c])&&ze(e,"nested arrays are not supported inside keys"),typeof s=="object"&&O_(s[c])==="[object Object]"&&(s[c]="[object Object]");if(typeof s=="object"&&O_(s)==="[object Object]"&&(s="[object Object]"),s=String(s),t===null&&(t={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(i))for(c=0,u=i.length;c<u;c+=1)$_(e,t,i[c],n);else $_(e,t,i,n);else!e.json&&!na.call(n,s)&&na.call(t,s)&&(e.line=a||e.line,e.lineStart=o||e.lineStart,e.position=l||e.position,ze(e,"duplicated mapping key")),s==="__proto__"?Object.defineProperty(t,s,{configurable:!0,enumerable:!0,writable:!0,value:i}):t[s]=i,delete n[s];return t}function Gb(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):ze(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function hn(e,t,n){for(var r=0,s=e.input.charCodeAt(e.position);s!==0;){for(;ja(s);)s===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),s=e.input.charCodeAt(++e.position);if(t&&s===35)do s=e.input.charCodeAt(++e.position);while(s!==10&&s!==13&&s!==0);if(Ms(s))for(Gb(e),s=e.input.charCodeAt(e.position),r++,e.lineIndent=0;s===32;)e.lineIndent++,s=e.input.charCodeAt(++e.position);else break}return n!==-1&&r!==0&&e.lineIndent<n&&Af(e,"deficient indentation"),r}function Lp(e){var t=e.position,n;return n=e.input.charCodeAt(t),!!((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)&&(t+=3,n=e.input.charCodeAt(t),n===0||pr(n)))}function Kb(e,t){t===1?e.result+=" ":t>1&&(e.result+=En.repeat(`
61
+ `,t-1))}function lG(e,t,n){var r,s,i,a,o,l,c,u,d=e.kind,p=e.result,m;if(m=e.input.charCodeAt(e.position),pr(m)||Fo(m)||m===35||m===38||m===42||m===33||m===124||m===62||m===39||m===34||m===37||m===64||m===96||(m===63||m===45)&&(s=e.input.charCodeAt(e.position+1),pr(s)||n&&Fo(s)))return!1;for(e.kind="scalar",e.result="",i=a=e.position,o=!1;m!==0;){if(m===58){if(s=e.input.charCodeAt(e.position+1),pr(s)||n&&Fo(s))break}else if(m===35){if(r=e.input.charCodeAt(e.position-1),pr(r))break}else{if(e.position===e.lineStart&&Lp(e)||n&&Fo(m))break;if(Ms(m))if(l=e.line,c=e.lineStart,u=e.lineIndent,hn(e,!1,-1),e.lineIndent>=t){o=!0,m=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=l,e.lineStart=c,e.lineIndent=u;break}}o&&(Gi(e,i,a,!1),Kb(e,e.line-l),i=a=e.position,o=!1),ja(m)||(a=e.position+1),m=e.input.charCodeAt(++e.position)}return Gi(e,i,a,!1),e.result?!0:(e.kind=d,e.result=p,!1)}function uG(e,t){var n,r,s;if(n=e.input.charCodeAt(e.position),n!==39)return!1;for(e.kind="scalar",e.result="",e.position++,r=s=e.position;(n=e.input.charCodeAt(e.position))!==0;)if(n===39)if(Gi(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),n===39)r=e.position,e.position++,s=e.position;else return!0;else Ms(n)?(Gi(e,r,s,!0),Kb(e,hn(e,!1,t)),r=s=e.position):e.position===e.lineStart&&Lp(e)?ze(e,"unexpected end of the document within a single quoted scalar"):(e.position++,s=e.position);ze(e,"unexpected end of the stream within a single quoted scalar")}function cG(e,t){var n,r,s,i,a,o;if(o=e.input.charCodeAt(e.position),o!==34)return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;(o=e.input.charCodeAt(e.position))!==0;){if(o===34)return Gi(e,n,e.position,!0),e.position++,!0;if(o===92){if(Gi(e,n,e.position,!0),o=e.input.charCodeAt(++e.position),Ms(o))hn(e,!1,t);else if(o<256&&iA[o])e.result+=aA[o],e.position++;else if((a=sG(o))>0){for(s=a,i=0;s>0;s--)o=e.input.charCodeAt(++e.position),(a=rG(o))>=0?i=(i<<4)+a:ze(e,"expected hexadecimal character");e.result+=aG(i),e.position++}else ze(e,"unknown escape sequence");n=r=e.position}else Ms(o)?(Gi(e,n,r,!0),Kb(e,hn(e,!1,t)),n=r=e.position):e.position===e.lineStart&&Lp(e)?ze(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}ze(e,"unexpected end of the stream within a double quoted scalar")}function dG(e,t){var n=!0,r,s,i,a=e.tag,o,l=e.anchor,c,u,d,p,m,v=Object.create(null),g,b,y,w;if(w=e.input.charCodeAt(e.position),w===91)u=93,m=!1,o=[];else if(w===123)u=125,m=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),w=e.input.charCodeAt(++e.position);w!==0;){if(hn(e,!0,t),w=e.input.charCodeAt(e.position),w===u)return e.position++,e.tag=a,e.anchor=l,e.kind=m?"mapping":"sequence",e.result=o,!0;n?w===44&&ze(e,"expected the node content, but found ','"):ze(e,"missed comma between flow collection entries"),b=g=y=null,d=p=!1,w===63&&(c=e.input.charCodeAt(e.position+1),pr(c)&&(d=p=!0,e.position++,hn(e,!0,t))),r=e.line,s=e.lineStart,i=e.position,cl(e,t,Rf,!1,!0),b=e.tag,g=e.result,hn(e,!0,t),w=e.input.charCodeAt(e.position),(p||e.line===r)&&w===58&&(d=!0,w=e.input.charCodeAt(++e.position),hn(e,!0,t),cl(e,t,Rf,!1,!0),y=e.result),m?No(e,o,v,b,g,y,r,s,i):d?o.push(No(e,null,v,b,g,y,r,s,i)):o.push(g),hn(e,!0,t),w=e.input.charCodeAt(e.position),w===44?(n=!0,w=e.input.charCodeAt(++e.position)):n=!1}ze(e,"unexpected end of the stream within a flow collection")}function fG(e,t){var n,r,s=Zm,i=!1,a=!1,o=t,l=0,c=!1,u,d;if(d=e.input.charCodeAt(e.position),d===124)r=!1;else if(d===62)r=!0;else return!1;for(e.kind="scalar",e.result="";d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)Zm===s?s=d===43?A_:Z9:ze(e,"repeat of a chomping mode identifier");else if((u=iG(d))>=0)u===0?ze(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?ze(e,"repeat of an indentation width identifier"):(o=t+u-1,a=!0);else break;if(ja(d)){do d=e.input.charCodeAt(++e.position);while(ja(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!Ms(d)&&d!==0)}for(;d!==0;){for(Gb(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!a||e.lineIndent<o)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>o&&(o=e.lineIndent),Ms(d)){l++;continue}if(e.lineIndent<o){s===A_?e.result+=En.repeat(`
62
+ `,i?1+l:l):s===Zm&&i&&(e.result+=`
63
+ `);break}for(r?ja(d)?(c=!0,e.result+=En.repeat(`
64
+ `,i?1+l:l)):c?(c=!1,e.result+=En.repeat(`
65
+ `,l+1)):l===0?i&&(e.result+=" "):e.result+=En.repeat(`
66
+ `,l):e.result+=En.repeat(`
67
+ `,i?1+l:l),i=!0,a=!0,l=0,n=e.position;!Ms(d)&&d!==0;)d=e.input.charCodeAt(++e.position);Gi(e,n,e.position,!1)}return!0}function F_(e,t){var n,r=e.tag,s=e.anchor,i=[],a,o=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=i),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,ze(e,"tab characters must not be used in indentation")),!(l!==45||(a=e.input.charCodeAt(e.position+1),!pr(a))));){if(o=!0,e.position++,hn(e,!0,-1)&&e.lineIndent<=t){i.push(null),l=e.input.charCodeAt(e.position);continue}if(n=e.line,cl(e,t,nA,!1,!0),i.push(e.result),hn(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&l!==0)ze(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return o?(e.tag=r,e.anchor=s,e.kind="sequence",e.result=i,!0):!1}function pG(e,t,n){var r,s,i,a,o,l,c=e.tag,u=e.anchor,d={},p=Object.create(null),m=null,v=null,g=null,b=!1,y=!1,w;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),w=e.input.charCodeAt(e.position);w!==0;){if(!b&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,ze(e,"tab characters must not be used in indentation")),r=e.input.charCodeAt(e.position+1),i=e.line,(w===63||w===58)&&pr(r))w===63?(b&&(No(e,d,p,m,v,null,a,o,l),m=v=g=null),y=!0,b=!0,s=!0):b?(b=!1,s=!0):ze(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,w=r;else{if(a=e.line,o=e.lineStart,l=e.position,!cl(e,n,tA,!1,!0))break;if(e.line===i){for(w=e.input.charCodeAt(e.position);ja(w);)w=e.input.charCodeAt(++e.position);if(w===58)w=e.input.charCodeAt(++e.position),pr(w)||ze(e,"a whitespace character is expected after the key-value separator within a block mapping"),b&&(No(e,d,p,m,v,null,a,o,l),m=v=g=null),y=!0,b=!1,s=!1,m=e.tag,v=e.result;else if(y)ze(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=u,!0}else if(y)ze(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=u,!0}if((e.line===i||e.lineIndent>t)&&(b&&(a=e.line,o=e.lineStart,l=e.position),cl(e,t,Pf,!0,s)&&(b?v=e.result:g=e.result),b||(No(e,d,p,m,v,g,a,o,l),m=v=g=null),hn(e,!0,-1),w=e.input.charCodeAt(e.position)),(e.line===i||e.lineIndent>t)&&w!==0)ze(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return b&&No(e,d,p,m,v,null,a,o,l),y&&(e.tag=c,e.anchor=u,e.kind="mapping",e.result=d),y}function mG(e){var t,n=!1,r=!1,s,i,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&ze(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(n=!0,a=e.input.charCodeAt(++e.position)):a===33?(r=!0,s="!!",a=e.input.charCodeAt(++e.position)):s="!",t=e.position,n){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(i=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):ze(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!pr(a);)a===33&&(r?ze(e,"tag suffix cannot contain exclamation marks"):(s=e.input.slice(t-1,e.position+1),rA.test(s)||ze(e,"named tag handle cannot contain such characters"),r=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);i=e.input.slice(t,e.position),nG.test(i)&&ze(e,"tag suffix cannot contain flow indicator characters")}i&&!sA.test(i)&&ze(e,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch{ze(e,"tag name is malformed: "+i)}return n?e.tag=i:na.call(e.tagMap,s)?e.tag=e.tagMap[s]+i:s==="!"?e.tag="!"+i:s==="!!"?e.tag="tag:yaml.org,2002:"+i:ze(e,'undeclared tag handle "'+s+'"'),!0}function hG(e){var t,n;if(n=e.input.charCodeAt(e.position),n!==38)return!1;for(e.anchor!==null&&ze(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!pr(n)&&!Fo(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&ze(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function gG(e){var t,n,r;if(r=e.input.charCodeAt(e.position),r!==42)return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!pr(r)&&!Fo(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&ze(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),na.call(e.anchorMap,n)||ze(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],hn(e,!0,-1),!0}function cl(e,t,n,r,s){var i,a,o,l=1,c=!1,u=!1,d,p,m,v,g,b;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,i=a=o=Pf===n||nA===n,r&&hn(e,!0,-1)&&(c=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;mG(e)||hG(e);)hn(e,!0,-1)?(c=!0,o=i,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):o=!1;if(o&&(o=c||s),(l===1||Pf===n)&&(Rf===n||tA===n?g=t:g=t+1,b=e.position-e.lineStart,l===1?o&&(F_(e,b)||pG(e,b,g))||dG(e,g)?u=!0:(a&&fG(e,g)||uG(e,g)||cG(e,g)?u=!0:gG(e)?(u=!0,(e.tag!==null||e.anchor!==null)&&ze(e,"alias node should not have any properties")):lG(e,g,Rf===n)&&(u=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(u=o&&F_(e,b))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&ze(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),d=0,p=e.implicitTypes.length;d<p;d+=1)if(v=e.implicitTypes[d],v.resolve(e.result)){e.result=v.construct(e.result),e.tag=v.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(na.call(e.typeMap[e.kind||"fallback"],e.tag))v=e.typeMap[e.kind||"fallback"][e.tag];else for(v=null,m=e.typeMap.multi[e.kind||"fallback"],d=0,p=m.length;d<p;d+=1)if(e.tag.slice(0,m[d].tag.length)===m[d].tag){v=m[d];break}v||ze(e,"unknown tag !<"+e.tag+">"),e.result!==null&&v.kind!==e.kind&&ze(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+v.kind+'", not "'+e.kind+'"'),v.resolve(e.result,e.tag)?(e.result=v.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):ze(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||u}function vG(e){var t=e.position,n,r,s,i=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(hn(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(i=!0,a=e.input.charCodeAt(++e.position),n=e.position;a!==0&&!pr(a);)a=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),s=[],r.length<1&&ze(e,"directive name must not be less than one character in length");a!==0;){for(;ja(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!Ms(a));break}if(Ms(a))break;for(n=e.position;a!==0&&!pr(a);)a=e.input.charCodeAt(++e.position);s.push(e.input.slice(n,e.position))}a!==0&&Gb(e),na.call(L_,r)?L_[r](e,r,s):Af(e,'unknown document directive "'+r+'"')}if(hn(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,hn(e,!0,-1)):i&&ze(e,"directives end mark is expected"),cl(e,e.lineIndent-1,Pf,!1,!0),hn(e,!0,-1),e.checkLineBreaks&&tG.test(e.input.slice(t,e.position))&&Af(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Lp(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,hn(e,!0,-1));return}if(e.position<e.length-1)ze(e,"end of the stream or a document separator is expected");else return}function yG(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
68
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var n=new oG(e,t),r=e.indexOf("\0");for(r!==-1&&(n.position=r,ze(n,"null byte is not allowed in input")),n.input+="\0";n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)vG(n);return n.documents}function bG(e,t){var n=yG(e,t);if(n.length!==0){if(n.length===1)return n[0];throw new cr("expected a single document in the stream, but found more")}}var SG=bG,wG={load:SG},lA=Object.prototype.toString,uA=Object.prototype.hasOwnProperty,Yb=65279,_G=9,Ju=10,kG=13,xG=32,EG=33,CG=34,bv=35,TG=37,IG=38,RG=39,PG=42,cA=44,AG=45,Of=58,OG=61,DG=62,LG=63,$G=64,dA=91,fA=93,FG=96,pA=123,NG=124,mA=125,Jn={};Jn[0]="\\0";Jn[7]="\\a";Jn[8]="\\b";Jn[9]="\\t";Jn[10]="\\n";Jn[11]="\\v";Jn[12]="\\f";Jn[13]="\\r";Jn[27]="\\e";Jn[34]='\\"';Jn[92]="\\\\";Jn[133]="\\N";Jn[160]="\\_";Jn[8232]="\\L";Jn[8233]="\\P";var MG=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],VG=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function BG(e,t){var n,r,s,i,a,o,l;if(t===null)return{};for(n={},r=Object.keys(t),s=0,i=r.length;s<i;s+=1)a=r[s],o=String(t[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),l=e.compiledTypeMap.fallback[a],l&&uA.call(l.styleAliases,o)&&(o=l.styleAliases[o]),n[a]=o;return n}function UG(e){var t,n,r;if(t=e.toString(16).toUpperCase(),e<=255)n="x",r=2;else if(e<=65535)n="u",r=4;else if(e<=4294967295)n="U",r=8;else throw new cr("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+En.repeat("0",r-t.length)+t}var zG=1,Xu=2;function jG(e){this.schema=e.schema||eA,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=En.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=BG(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Xu:zG,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function N_(e,t){for(var n=En.repeat(" ",t),r=0,s=-1,i="",a,o=e.length;r<o;)s=e.indexOf(`
69
+ `,r),s===-1?(a=e.slice(r),r=o):(a=e.slice(r,s+1),r=s+1),a.length&&a!==`
70
+ `&&(i+=n),i+=a;return i}function Sv(e,t){return`
71
+ `+En.repeat(" ",e.indent*t)}function HG(e,t){var n,r,s;for(n=0,r=e.implicitTypes.length;n<r;n+=1)if(s=e.implicitTypes[n],s.resolve(t))return!0;return!1}function Df(e){return e===xG||e===_G}function Qu(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Yb||65536<=e&&e<=1114111}function M_(e){return Qu(e)&&e!==Yb&&e!==kG&&e!==Ju}function V_(e,t,n){var r=M_(e),s=r&&!Df(e);return(n?r:r&&e!==cA&&e!==dA&&e!==fA&&e!==pA&&e!==mA)&&e!==bv&&!(t===Of&&!s)||M_(t)&&!Df(t)&&e===bv||t===Of&&s}function qG(e){return Qu(e)&&e!==Yb&&!Df(e)&&e!==AG&&e!==LG&&e!==Of&&e!==cA&&e!==dA&&e!==fA&&e!==pA&&e!==mA&&e!==bv&&e!==IG&&e!==PG&&e!==EG&&e!==NG&&e!==OG&&e!==DG&&e!==RG&&e!==CG&&e!==TG&&e!==$G&&e!==FG}function WG(e){return!Df(e)&&e!==Of}function su(e,t){var n=e.charCodeAt(t),r;return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1),r>=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}function hA(e){var t=/^\n* /;return t.test(e)}var gA=1,wv=2,vA=3,yA=4,Io=5;function GG(e,t,n,r,s,i,a,o){var l,c=0,u=null,d=!1,p=!1,m=r!==-1,v=-1,g=qG(su(e,0))&&WG(su(e,e.length-1));if(t||a)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=su(e,l),!Qu(c))return Io;g=g&&V_(c,u,o),u=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=su(e,l),c===Ju)d=!0,m&&(p=p||l-v-1>r&&e[v+1]!==" ",v=l);else if(!Qu(c))return Io;g=g&&V_(c,u,o),u=c}p=p||m&&l-v-1>r&&e[v+1]!==" "}return!d&&!p?g&&!a&&!s(e)?gA:i===Xu?Io:wv:n>9&&hA(e)?Io:a?i===Xu?Io:wv:p?yA:vA}function KG(e,t,n,r,s){e.dump=(function(){if(t.length===0)return e.quotingType===Xu?'""':"''";if(!e.noCompatMode&&(MG.indexOf(t)!==-1||VG.test(t)))return e.quotingType===Xu?'"'+t+'"':"'"+t+"'";var i=e.indent*Math.max(1,n),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),o=r||e.flowLevel>-1&&n>=e.flowLevel;function l(c){return HG(e,c)}switch(GG(t,o,e.indent,a,l,e.quotingType,e.forceQuotes&&!r,s)){case gA:return t;case wv:return"'"+t.replace(/'/g,"''")+"'";case vA:return"|"+B_(t,e.indent)+U_(N_(t,i));case yA:return">"+B_(t,e.indent)+U_(N_(YG(t,a),i));case Io:return'"'+JG(t)+'"';default:throw new cr("impossible error: invalid scalar style")}})()}function B_(e,t){var n=hA(e)?String(t):"",r=e[e.length-1]===`
72
+ `,s=r&&(e[e.length-2]===`
73
+ `||e===`
74
+ `),i=s?"+":r?"":"-";return n+i+`
75
+ `}function U_(e){return e[e.length-1]===`
76
+ `?e.slice(0,-1):e}function YG(e,t){for(var n=/(\n+)([^\n]*)/g,r=(function(){var c=e.indexOf(`
77
+ `);return c=c!==-1?c:e.length,n.lastIndex=c,z_(e.slice(0,c),t)})(),s=e[0]===`
78
+ `||e[0]===" ",i,a;a=n.exec(e);){var o=a[1],l=a[2];i=l[0]===" ",r+=o+(!s&&!i&&l!==""?`
79
+ `:"")+z_(l,t),s=i}return r}function z_(e,t){if(e===""||e[0]===" ")return e;for(var n=/ [^ ]/g,r,s=0,i,a=0,o=0,l="";r=n.exec(e);)o=r.index,o-s>t&&(i=a>s?a:o,l+=`
80
+ `+e.slice(s,i),s=i+1),a=o;return l+=`
81
+ `,e.length-s>t&&a>s?l+=e.slice(s,a)+`
82
+ `+e.slice(a+1):l+=e.slice(s),l.slice(1)}function JG(e){for(var t="",n=0,r,s=0;s<e.length;n>=65536?s+=2:s++)n=su(e,s),r=Jn[n],!r&&Qu(n)?(t+=e[s],n>=65536&&(t+=e[s+1])):t+=r||UG(n);return t}function XG(e,t,n){var r="",s=e.tag,i,a,o;for(i=0,a=n.length;i<a;i+=1)o=n[i],e.replacer&&(o=e.replacer.call(n,String(i),o)),(Ci(e,t,o,!1,!1)||typeof o>"u"&&Ci(e,t,null,!1,!1))&&(r!==""&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=s,e.dump="["+r+"]"}function j_(e,t,n,r){var s="",i=e.tag,a,o,l;for(a=0,o=n.length;a<o;a+=1)l=n[a],e.replacer&&(l=e.replacer.call(n,String(a),l)),(Ci(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&Ci(e,t+1,null,!0,!0,!1,!0))&&((!r||s!=="")&&(s+=Sv(e,t)),e.dump&&Ju===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=i,e.dump=s||"[]"}function QG(e,t,n){var r="",s=e.tag,i=Object.keys(n),a,o,l,c,u;for(a=0,o=i.length;a<o;a+=1)u="",r!==""&&(u+=", "),e.condenseFlow&&(u+='"'),l=i[a],c=n[l],e.replacer&&(c=e.replacer.call(n,l,c)),Ci(e,t,l,!1,!1)&&(e.dump.length>1024&&(u+="? "),u+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ci(e,t,c,!1,!1)&&(u+=e.dump,r+=u));e.tag=s,e.dump="{"+r+"}"}function ZG(e,t,n,r){var s="",i=e.tag,a=Object.keys(n),o,l,c,u,d,p;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new cr("sortKeys must be a boolean or a function");for(o=0,l=a.length;o<l;o+=1)p="",(!r||s!=="")&&(p+=Sv(e,t)),c=a[o],u=n[c],e.replacer&&(u=e.replacer.call(n,c,u)),Ci(e,t+1,c,!0,!0,!0)&&(d=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,d&&(e.dump&&Ju===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,d&&(p+=Sv(e,t)),Ci(e,t+1,u,!0,d)&&(e.dump&&Ju===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,s+=p));e.tag=i,e.dump=s||"{}"}function H_(e,t,n){var r,s,i,a,o,l;for(s=n?e.explicitTypes:e.implicitTypes,i=0,a=s.length;i<a;i+=1)if(o=s[i],(o.instanceOf||o.predicate)&&(!o.instanceOf||typeof t=="object"&&t instanceof o.instanceOf)&&(!o.predicate||o.predicate(t))){if(n?o.multi&&o.representName?e.tag=o.representName(t):e.tag=o.tag:e.tag="?",o.represent){if(l=e.styleMap[o.tag]||o.defaultStyle,lA.call(o.represent)==="[object Function]")r=o.represent(t,l);else if(uA.call(o.represent,l))r=o.represent[l](t,l);else throw new cr("!<"+o.tag+'> tag resolver accepts not "'+l+'" style');e.dump=r}return!0}return!1}function Ci(e,t,n,r,s,i,a){e.tag=null,e.dump=n,H_(e,n,!1)||H_(e,n,!0);var o=lA.call(e.dump),l=r,c;r&&(r=e.flowLevel<0||e.flowLevel>t);var u=o==="[object Object]"||o==="[object Array]",d,p;if(u&&(d=e.duplicates.indexOf(n),p=d!==-1),(e.tag!==null&&e.tag!=="?"||p||e.indent!==2&&t>0)&&(s=!1),p&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(u&&p&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),o==="[object Object]")r&&Object.keys(e.dump).length!==0?(ZG(e,t,e.dump,s),p&&(e.dump="&ref_"+d+e.dump)):(QG(e,t,e.dump),p&&(e.dump="&ref_"+d+" "+e.dump));else if(o==="[object Array]")r&&e.dump.length!==0?(e.noArrayIndent&&!a&&t>0?j_(e,t-1,e.dump,s):j_(e,t,e.dump,s),p&&(e.dump="&ref_"+d+e.dump)):(XG(e,t,e.dump),p&&(e.dump="&ref_"+d+" "+e.dump));else if(o==="[object String]")e.tag!=="?"&&KG(e,e.dump,t,i,l);else{if(o==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new cr("unacceptable kind of an object to dump "+o)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}function eK(e,t){var n=[],r=[],s,i;for(_v(e,n,r),s=0,i=r.length;s<i;s+=1)t.duplicates.push(n[r[s]]);t.usedDuplicates=new Array(i)}function _v(e,t,n){var r,s,i;if(e!==null&&typeof e=="object")if(s=t.indexOf(e),s!==-1)n.indexOf(s)===-1&&n.push(s);else if(t.push(e),Array.isArray(e))for(s=0,i=e.length;s<i;s+=1)_v(e[s],t,n);else for(r=Object.keys(e),s=0,i=r.length;s<i;s+=1)_v(e[r[s]],t,n)}function tK(e,t){t=t||{};var n=new jG(t);n.noRefs||eK(e,n);var r=e;return n.replacer&&(r=n.replacer.call({"":r},"",r)),Ci(n,0,r,!0,!0)?n.dump+`
83
+ `:""}var nK=tK,rK={dump:nK},kv=wG.load,sK=rK.dump;const bA=Ae({__name:"YamlImportSummary",props:{summary:{},excludeSettingsAndUsers:{type:Boolean,default:!1}},setup(e){return(t,n)=>e.summary?($(),J($e,{key:0,variant:"tonal"},{default:h(()=>[f(Lt,{class:"text-h6"},{default:h(()=>[f(j,{class:"mr-2",color:"success"},{default:h(()=>[...n[0]||(n[0]=[k("check_circle",-1)])]),_:1}),n[1]||(n[1]=k(" Import Summary ",-1))]),_:1}),f(Xe,null,{default:h(()=>[f(_s,{density:"compact"},{default:h(()=>[f(yt,null,{prepend:h(()=>[f(j,null,{default:h(()=>[...n[2]||(n[2]=[k("info",-1)])]),_:1})]),default:h(()=>[f(Gt,null,{default:h(()=>[k("Version: "+Y(e.summary.version),1)]),_:1})]),_:1}),f(yt,null,{prepend:h(()=>[f(j,null,{default:h(()=>[...n[3]||(n[3]=[k("storage",-1)])]),_:1})]),default:h(()=>[f(Gt,null,{default:h(()=>[k("Database: "+Y(e.summary.databaseType),1)]),_:1})]),_:1}),f(yt,null,{prepend:h(()=>[f(j,null,{default:h(()=>[...n[4]||(n[4]=[k("schedule",-1)])]),_:1})]),default:h(()=>[f(Gt,null,{default:h(()=>[k("Exported: "+Y(e.summary.exportedAt),1)]),_:1})]),_:1}),f(pt,{class:"my-2"}),f(yt,null,{prepend:h(()=>[f(j,null,{default:h(()=>[...n[5]||(n[5]=[k("print",-1)])]),_:1})]),default:h(()=>[f(Gt,null,{default:h(()=>[k(Y(e.summary.printersCount)+" Printers",1)]),_:1})]),_:1}),f(yt,null,{prepend:h(()=>[f(j,null,{default:h(()=>[...n[6]||(n[6]=[k("layers",-1)])]),_:1})]),default:h(()=>[f(Gt,null,{default:h(()=>[k(Y(e.summary.floorsCount)+" Floors",1)]),_:1})]),_:1}),f(yt,null,{prepend:h(()=>[f(j,null,{default:h(()=>[...n[7]||(n[7]=[k("label",-1)])]),_:1})]),default:h(()=>[f(Gt,null,{default:h(()=>[k(Y(e.summary.groupsCount)+" Tags",1)]),_:1})]),_:1}),e.summary.hasSettings?($(),J(yt,{key:0},{prepend:h(()=>[f(j,{color:e.excludeSettingsAndUsers?"error":void 0},{default:h(()=>[k(Y(e.excludeSettingsAndUsers?"block":"settings"),1)]),_:1},8,["color"])]),default:h(()=>[f(Gt,{class:Se(e.excludeSettingsAndUsers?"text-decoration-line-through text-medium-emphasis":"")},{default:h(()=>[k(" Settings "+Y(e.excludeSettingsAndUsers?"(will be excluded)":"included"),1)]),_:1},8,["class"])]),_:1})):se("",!0),e.summary.usersCount&&e.summary.usersCount>0?($(),J(yt,{key:1},{prepend:h(()=>[f(j,{color:e.excludeSettingsAndUsers?"error":void 0},{default:h(()=>[k(Y(e.excludeSettingsAndUsers?"block":"people"),1)]),_:1},8,["color"])]),default:h(()=>[f(Gt,{class:Se(e.excludeSettingsAndUsers?"text-decoration-line-through text-medium-emphasis":"")},{default:h(()=>[k(Y(e.summary.usersCount)+" Users "+Y(e.excludeSettingsAndUsers?"(will be excluded)":""),1)]),_:1},8,["class"])]),_:1})):se("",!0)]),_:1})]),_:1})]),_:1})):se("",!0)}});class Lf extends Cr{static async downloadYamlExport(t){const r=await(await jn()).request({method:"POST",url:"api/server/yaml-export",data:t,responseType:"arraybuffer"});cv(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/yaml-import",n,{})}static async downloadLogDump(){const n=await(await jn()).request({method:"POST",url:"api/server/dump-fdm-monster-logs",responseType:"arraybuffer"});cv(n.data,"logs-fdm-monster-"+Date.now()+".zip")}static async clearLogFilesOlderThanWeek(){return await this.delete("api/server/clear-outdated-fdm-monster-logs")}}class Hi extends Cr{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 jn(!1,!1)).get("/api/test")}}const $p=wr("Feature",{state:()=>({features:void 0}),getters:{getFeatures(){return this.features},getFeature:e=>t=>{if(e.features)return e.features[t]},hasFeature:e=>t=>{if(!e.features)return!1;const n=e.features[t];return n?n?.available:(console.debug(`Feature ${t} not defined. Options:`,Object.keys(e.features)),!1)}},actions:{async loadFeatures(){try{const e=await Hi.getFeatures();this.setFeatures(e)}catch{this.features={}}},setFeatures(e){this.features=e}}}),SA=Symbol.for("vuetify:selection-control-group"),Jb=oe({color:String,disabled:{type:Boolean,default:null},defaultsTarget:String,error:Boolean,id:String,inline:Boolean,falseIcon:Fe,trueIcon:Fe,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:mr},...Ue(),...Pn(),...wt()},"SelectionControlGroup"),iK=oe({...Jb({defaultsTarget:"VSelectionControl"})},"VSelectionControlGroup"),aK=be()({name:"VSelectionControlGroup",props:iK(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=tt(e,"modelValue"),s=Sr(),i=ee(()=>e.id||`v-selection-control-group-${s}`),a=ee(()=>e.name||i.value),o=new Set;return Dt(SA,{modelValue:r,forceUpdate:()=>{o.forEach(l=>l())},onForceUpdate:l=>{o.add(l),Xt(()=>{o.delete(l)})}}),Rn({[e.defaultsTarget]:{color:ee(()=>e.color),disabled:ee(()=>e.disabled),density:ee(()=>e.density),error:ee(()=>e.error),inline:ee(()=>e.inline),modelValue:r,multiple:ee(()=>!!e.multiple||e.multiple==null&&Array.isArray(r.value)),name:a,falseIcon:ee(()=>e.falseIcon),trueIcon:ee(()=>e.trueIcon),readonly:ee(()=>e.readonly),ripple:ee(()=>e.ripple),type:ee(()=>e.type),valueComparator:ee(()=>e.valueComparator)}}),Ie(()=>S("div",{class:Se(["v-selection-control-group",{"v-selection-control-group--inline":e.inline},e.class]),style:Le(e.style),role:e.type==="radio"?"radiogroup":void 0},[n.default?.()])),{}}}),Fp=oe({label:String,baseColor:String,trueValue:null,falseValue:null,value:null,...Ue(),...Jb()},"VSelectionControl");function oK(e){const t=He(SA,void 0),{densityClasses:n}=Fr(e),r=tt(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),a=A(()=>!!e.multiple||e.multiple==null&&Array.isArray(r.value)),o=A({get(){const m=t?t.modelValue.value:r.value;return a.value?gn(m).some(v=>e.valueComparator(v,s.value)):e.valueComparator(m,s.value)},set(m){if(e.readonly)return;const v=m?s.value:i.value;let g=v;a.value&&(g=m?[...gn(r.value),v]:gn(r.value).filter(b=>!e.valueComparator(b,s.value))),t?t.modelValue.value=g:r.value=g}}),{textColorClasses:l,textColorStyles:c}=Qr(()=>{if(!(e.error||e.disabled))return o.value?e.color:e.baseColor}),{backgroundColorClasses:u,backgroundColorStyles:d}=yn(()=>o.value&&!e.error&&!e.disabled?e.color:e.baseColor),p=A(()=>o.value?e.trueIcon:e.falseIcon);return{group:t,densityClasses:n,trueValue:s,falseValue:i,model:o,textColorClasses:l,textColorStyles:c,backgroundColorClasses:u,backgroundColorStyles:d,icon:p}}const eo=be()({name:"VSelectionControl",directives:{vRipple:Lr},inheritAttrs:!1,props:Fp(),emits:{"update:modelValue":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const{group:s,densityClasses:i,icon:a,model:o,textColorClasses:l,textColorStyles:c,backgroundColorClasses:u,backgroundColorStyles:d,trueValue:p}=oK(e),m=Sr(),v=Ee(!1),g=Ee(!1),b=q(),y=ee(()=>e.id||`input-${m}`),w=ee(()=>!e.disabled&&!e.readonly);s?.onForceUpdate(()=>{b.value&&(b.value.checked=o.value)});function _(C){w.value&&(v.value=!0,ef(C.target,":focus-visible")!==!1&&(g.value=!0))}function T(){v.value=!1,g.value=!1}function P(C){C.stopPropagation()}function x(C){if(!w.value){b.value&&(b.value.checked=o.value);return}e.readonly&&s&&ut(()=>s.forceUpdate()),o.value=C.target.checked}return Ie(()=>{const C=r.label?r.label({label:e.label,props:{for:y.value}}):e.label,[E,R]=so(n),I=S("input",ce({ref:b,checked:o.value,disabled:!!e.disabled,id:y.value,onBlur:T,onFocus:_,onInput:x,"aria-disabled":!!e.disabled,"aria-label":e.label,type:e.type,value:p.value,name:e.name,"aria-checked":e.type==="checkbox"?o.value:void 0},R),null);return S("div",ce({class:["v-selection-control",{"v-selection-control--dirty":o.value,"v-selection-control--disabled":e.disabled,"v-selection-control--error":e.error,"v-selection-control--focused":v.value,"v-selection-control--focus-visible":g.value,"v-selection-control--inline":e.inline},i.value,e.class]},E,{style:e.style}),[S("div",{class:Se(["v-selection-control__wrapper",l.value]),style:Le(c.value)},[r.default?.({backgroundColorClasses:u,backgroundColorStyles:d}),Pt(S("div",{class:Se(["v-selection-control__input"])},[r.input?.({model:o,textColorClasses:l,textColorStyles:c,backgroundColorClasses:u,backgroundColorStyles:d,inputNode:I,icon:a.value,props:{onFocus:_,onBlur:T,id:y.value}})??S(ke,null,[a.value&&f(j,{key:"icon",icon:a.value},null),I])]),[[Lr,!e.disabled&&!e.readonly&&e.ripple,null,{center:!0,circle:!0}]])]),C&&f(jb,{for:y.value,onClick:P},{default:()=>[C]})])}),{isFocused:v,input:b}}}),wA=oe({indeterminate:Boolean,indeterminateIcon:{type:Fe,default:"$checkboxIndeterminate"},...Fp({falseIcon:"$checkboxOff",trueIcon:"$checkboxOn"})},"VCheckboxBtn"),ra=be()({name:"VCheckboxBtn",props:wA(),emits:{"update:modelValue":e=>!0,"update:indeterminate":e=>!0},setup(e,t){let{slots:n}=t;const r=tt(e,"indeterminate"),s=tt(e,"modelValue");function i(l){r.value&&(r.value=!1)}const a=ee(()=>r.value?e.indeterminateIcon:e.falseIcon),o=ee(()=>r.value?e.indeterminateIcon:e.trueIcon);return Ie(()=>{const l=Qt(eo.filterProps(e),["modelValue"]);return f(eo,ce(l,{modelValue:s.value,"onUpdate:modelValue":[c=>s.value=c,i],class:["v-checkbox-btn",e.class],style:e.style,type:"checkbox",falseIcon:a.value,trueIcon:o.value,"aria-checked":r.value?"mixed":void 0}),n)}),{}}}),lK=oe({...po(),...Qt(wA(),["inline"])},"VCheckbox"),Yt=be()({name:"VCheckbox",inheritAttrs:!1,props:lK(),emits:{"update:modelValue":e=>!0,"update:focused":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const s=tt(e,"modelValue"),{isFocused:i,focus:a,blur:o}=Nl(e),l=q(),c=Sr();return Ie(()=>{const[u,d]=so(n),p=ts.filterProps(e),m=ra.filterProps(e);return f(ts,ce({ref:l,class:["v-checkbox",e.class]},u,p,{modelValue:s.value,"onUpdate:modelValue":v=>s.value=v,id:e.id||`checkbox-${c}`,focused:i.value,style:e.style}),{...r,default:v=>{let{id:g,messagesId:b,isDisabled:y,isReadonly:w,isValid:_}=v;return f(ra,ce(m,{id:g.value,"aria-describedby":b.value,disabled:y.value,readonly:w.value},d,{error:_.value===!1,modelValue:s.value,"onUpdate:modelValue":T=>s.value=T,onFocus:a,onBlur:o}),r)}})}),Vr({},l)}}),Zu=Symbol.for("vuetify:v-expansion-panel"),_A=oe({...Ue(),...Oy()},"VExpansionPanelText"),ec=be()({name:"VExpansionPanelText",props:_A(),setup(e,t){let{slots:n}=t;const r=He(Zu);if(!r)throw new Error("[Vuetify] v-expansion-panel-text needs to be placed inside v-expansion-panel");const{hasContent:s,onAfterLeave:i}=Dy(e,r.isSelected);return Ie(()=>f(Py,{onAfterLeave:i},{default:()=>[Pt(S("div",{class:Se(["v-expansion-panel-text",e.class]),style:Le(e.style)},[n.default&&s.value&&S("div",{class:"v-expansion-panel-text__wrapper"},[n.default?.()])]),[[$r,r.isSelected.value]])]})),{}}}),kA=oe({color:String,expandIcon:{type:Fe,default:"$expand"},collapseIcon:{type:Fe,default:"$collapse"},hideActions:Boolean,focusable:Boolean,static:Boolean,ripple:{type:[Boolean,Object],default:!1},readonly:Boolean,...Ue(),...Vn()},"VExpansionPanelTitle"),tc=be()({name:"VExpansionPanelTitle",directives:{vRipple:Lr},props:kA(),setup(e,t){let{slots:n}=t;const r=He(Zu);if(!r)throw new Error("[Vuetify] v-expansion-panel-title needs to be placed inside v-expansion-panel");const{backgroundColorClasses:s,backgroundColorStyles:i}=yn(()=>e.color),{dimensionStyles:a}=Bn(e),o=A(()=>({collapseIcon:e.collapseIcon,disabled:r.disabled.value,expanded:r.isSelected.value,expandIcon:e.expandIcon,readonly:e.readonly})),l=ee(()=>r.isSelected.value?e.collapseIcon:e.expandIcon);return Ie(()=>Pt(S("button",{class:Se(["v-expansion-panel-title",{"v-expansion-panel-title--active":r.isSelected.value,"v-expansion-panel-title--focusable":e.focusable,"v-expansion-panel-title--static":e.static},s.value,e.class]),style:Le([i.value,a.value,e.style]),type:"button",tabindex:r.disabled.value?-1:void 0,disabled:r.disabled.value,"aria-expanded":r.isSelected.value,onClick:e.readonly?void 0:r.toggle},[S("span",{class:"v-expansion-panel-title__overlay"},null),n.default?.(o.value),!e.hideActions&&f(vt,{defaults:{VIcon:{icon:l.value}}},{default:()=>[S("span",{class:"v-expansion-panel-title__icon"},[n.actions?.(o.value)??f(j,null,null)])]})]),[[Lr,e.ripple]])),{}}}),Xb=oe({title:String,text:String,bgColor:String,..._r(),...bl(),...Tn(),...lt(),...kA(),..._A()},"VExpansionPanel"),nc=be()({name:"VExpansionPanel",props:Xb(),emits:{"group:selected":e=>!0},setup(e,t){let{slots:n}=t;const r=Ka(e,Zu),{backgroundColorClasses:s,backgroundColorStyles:i}=yn(()=>e.bgColor),{elevationClasses:a}=Nr(e),{roundedClasses:o}=An(e),l=ee(()=>r?.disabled.value||e.disabled),c=A(()=>r.group.items.value.reduce((p,m,v)=>(r.group.selected.value.includes(m.id)&&p.push(v),p),[])),u=A(()=>{const p=r.group.items.value.findIndex(m=>m.id===r.id);return!r.isSelected.value&&c.value.some(m=>m-p===1)}),d=A(()=>{const p=r.group.items.value.findIndex(m=>m.id===r.id);return!r.isSelected.value&&c.value.some(m=>m-p===-1)});return Dt(Zu,r),Ie(()=>{const p=!!(n.text||e.text),m=!!(n.title||e.title),v=tc.filterProps(e),g=ec.filterProps(e);return f(e.tag,{class:Se(["v-expansion-panel",{"v-expansion-panel--active":r.isSelected.value,"v-expansion-panel--before-active":u.value,"v-expansion-panel--after-active":d.value,"v-expansion-panel--disabled":l.value},o.value,s.value,e.class]),style:Le([i.value,e.style])},{default:()=>[S("div",{class:Se(["v-expansion-panel__shadow",...a.value])},null),f(vt,{defaults:{VExpansionPanelTitle:{...v},VExpansionPanelText:{...g}}},{default:()=>[m&&f(tc,{key:"title"},{default:()=>[n.title?n.title():e.title]}),p&&f(ec,{key:"text"},{default:()=>[n.text?n.text():e.text]}),n.default?.()]})]})}),{groupItem:r}}}),uK=["default","accordion","inset","popout"],xA=oe({flat:Boolean,...yl(),...Vs(Xb(),["bgColor","collapseIcon","color","eager","elevation","expandIcon","focusable","hideActions","readonly","ripple","rounded","tile","static"]),...wt(),...Ue(),...lt(),variant:{type:String,default:"default",validator:e=>uK.includes(e)}},"VExpansionPanels"),rc=be()({name:"VExpansionPanels",props:xA(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{next:r,prev:s}=ao(e,Zu),{themeClasses:i}=Mt(e),a=ee(()=>e.variant&&`v-expansion-panels--variant-${e.variant}`);return Rn({VExpansionPanel:{bgColor:ee(()=>e.bgColor),collapseIcon:ee(()=>e.collapseIcon),color:ee(()=>e.color),eager:ee(()=>e.eager),elevation:ee(()=>e.elevation),expandIcon:ee(()=>e.expandIcon),focusable:ee(()=>e.focusable),hideActions:ee(()=>e.hideActions),readonly:ee(()=>e.readonly),ripple:ee(()=>e.ripple),rounded:ee(()=>e.rounded),static:ee(()=>e.static)}}),Ie(()=>f(e.tag,{class:Se(["v-expansion-panels",{"v-expansion-panels--flat":e.flat,"v-expansion-panels--tile":e.tile},i.value,a.value,e.class]),style:Le(e.style)},{default:()=>[n.default?.({prev:s,next:r})]})),{next:r,prev:s}}});function cK(){function e(n){return[...n.dataTransfer?.items??[]].filter(s=>s.kind==="file").map(s=>s.webkitGetAsEntry()).filter(Boolean).length>0||[...n.dataTransfer?.files??[]].length>0}async function t(n){const r=[],s=[...n.dataTransfer?.items??[]].filter(i=>i.kind==="file").map(i=>i.webkitGetAsEntry()).filter(Boolean);if(s.length)for(const i of s){const a=await EA(i,CA(".",i));r.push(...a.map(o=>o.file))}else r.push(...n.dataTransfer?.files??[]);return r}return{handleDrop:t,hasFilesOrFolders:e}}function EA(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return new Promise((n,r)=>{e.isFile?e.file(i=>n([{file:i,path:t}]),r):e.isDirectory&&e.createReader().readEntries(async i=>{const a=[];for(const o of i)a.push(...await EA(o,CA(t,o)));n(a)})})}function CA(e,t){return t.isDirectory?`${e}/${t.name}`:e}const dK=oe({filterByType:String},"file-accept");function fK(e){const t=A(()=>e.filterByType?pK(e.filterByType):null);function n(r){if(t.value){const s=r.filter(t.value);return{accepted:s,rejected:r.filter(i=>!s.includes(i))}}return{accepted:r,rejected:[]}}return{filterAccepted:n}}function pK(e){const t=e.split(",").map(i=>i.trim().toLowerCase()),n=t.filter(i=>i.startsWith(".")),r=t.filter(i=>i.endsWith("/*")),s=t.filter(i=>!n.includes(i)&&!r.includes(i));return i=>{const a=i.name.split(".").at(-1)?.toLowerCase()??"",o=i.type.split("/").at(0)?.toLowerCase()??"";return s.includes(i.type)||n.includes(`.${a}`)||r.includes(`${o}/*`)}}const mK=oe({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))},truncateLength:{type:[Number,String],default:22},...po({prependIcon:"$file"}),modelValue:{type:[Array,Object],default:e=>e.multiple?[]:null,validator:e=>gn(e).every(t=>t!=null&&typeof t=="object")},...dK(),...Dp({clearable:!0})},"VFileInput"),Qb=be()({name:"VFileInput",inheritAttrs:!1,props:mK(),emits:{"click:control":e=>!0,"mousedown:control":e=>!0,"update:focused":e=>!0,"update:modelValue":e=>!0,rejected:e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const{t:i}=kr(),{filterAccepted:a}=fK(e),o=tt(e,"modelValue",e.modelValue,W=>gn(W),W=>!e.multiple&&Array.isArray(W)?W[0]:W),{isFocused:l,focus:c,blur:u}=Nl(e),d=A(()=>typeof e.showSize!="boolean"?e.showSize:void 0),p=A(()=>(o.value??[]).reduce((W,z)=>{let{size:K=0}=z;return W+K},0)),m=A(()=>L0(p.value,d.value)),v=A(()=>(o.value??[]).map(W=>{const{name:z="",size:K=0}=W,H=V(z);return e.showSize?`${H} (${L0(K,d.value)})`:H})),g=A(()=>{const W=o.value?.length??0;return e.showSize?i(e.counterSizeString,W,m.value):i(e.counterString,W)}),b=q(),y=q(),w=q(),_=ee(()=>l.value||e.active),T=A(()=>["plain","underlined"].includes(e.variant)),P=Ee(!1),{handleDrop:x,hasFilesOrFolders:C}=cK();function E(){w.value!==document.activeElement&&w.value?.focus(),l.value||c()}function R(W){w.value?.click()}function I(W){r("mousedown:control",W)}function O(W){w.value?.click(),r("click:control",W)}function L(W){W.stopPropagation(),E(),ut(()=>{o.value=[],mc(e["onClick:clear"],W)})}function V(W){if(W.length<Number(e.truncateLength))return W;const z=Math.floor((Number(e.truncateLength)-1)/2);return`${W.slice(0,z)}…${W.slice(W.length-z)}`}function F(W){W.preventDefault(),W.stopImmediatePropagation(),P.value=!0}function B(W){W.preventDefault(),P.value=!1}async function M(W){if(W.preventDefault(),W.stopImmediatePropagation(),P.value=!1,!w.value||!C(W))return;const z=await x(W);D(z)}function N(W){if(!(!W.target||W.repack))if(e.filterByType)D([...W.target.files]);else{const z=W.target;o.value=[...z.files??[]]}}function D(W){const z=new DataTransfer,{accepted:K,rejected:H}=a(W);H.length&&r("rejected",H);for(const ae of K)z.items.add(ae);w.value.files=z.files,o.value=[...z.files];const re=new Event("change",{bubbles:!0});re.repack=!0,w.value.dispatchEvent(re)}return _e(o,W=>{(!Array.isArray(W)||!W.length)&&w.value&&(w.value.value="")}),Ie(()=>{const W=!!(s.counter||e.counter),z=!!(W||s.details),[K,H]=so(n),{modelValue:re,...ae}=ts.filterProps(e),de={...ul.filterProps(e),"onClick:clear":L},De=n.webkitdirectory!==void 0&&n.webkitdirectory!==!1,X=n.accept?String(n.accept):void 0,ie=De?void 0:e.filterByType??X;return f(ts,ce({ref:b,modelValue:e.multiple?o.value:o.value[0],class:["v-file-input",{"v-file-input--chips":!!e.chips,"v-file-input--dragging":P.value,"v-file-input--hide":e.hideInput,"v-input--plain-underlined":T.value},e.class],style:e.style,"onClick:prepend":R},K,ae,{centerAffix:!T.value,focused:l.value}),{...s,default:ne=>{let{id:ve,isDisabled:Ne,isDirty:U,isReadonly:G,isValid:Z,hasDetails:fe}=ne;return f(ul,ce({ref:y,prependIcon:e.prependIcon,onMousedown:I,onClick:O,"onClick:prependInner":e["onClick:prependInner"],"onClick:appendInner":e["onClick:appendInner"]},de,{id:ve.value,active:_.value||U.value,dirty:U.value||e.dirty,disabled:Ne.value,focused:l.value,details:fe.value,error:Z.value===!1,onDragover:F,onDrop:M}),{...s,default:ge=>{let{props:{class:me,...we},controlRef:Ce}=ge;return S(ke,null,[S("input",ce({ref:he=>w.value=Ce.value=he,type:"file",accept:ie,readonly:G.value,disabled:Ne.value,multiple:e.multiple,name:e.name,onClick:he=>{he.stopPropagation(),G.value&&he.preventDefault(),E()},onChange:N,onDragleave:B,onFocus:E,onBlur:u},we,H),null),S("div",{class:Se(me)},[!!o.value?.length&&!e.hideInput&&(s.selection?s.selection({fileNames:v.value,totalBytes:p.value,totalBytesReadable:m.value}):e.chips?v.value.map(he=>f(qe,{key:he,size:"small",text:he},null)):v.value.join(", "))])])}})},details:z?ne=>S(ke,null,[s.details?.(ne),W&&S(ke,null,[S("span",null,null),f(zb,{active:!!o.value?.length,value:g.value,disabled:e.disabled},s.counter)])]):void 0})}),Vr({},b,y,w)}}),Zb=Symbol.for("vuetify:v-tabs"),TA=oe({fixed:Boolean,sliderColor:String,sliderTransition:String,sliderTransitionDuration:[String,Number],hideSlider:Boolean,inset:Boolean,direction:{type:String,default:"horizontal"},...Qt($C({selectedClass:"v-tab--selected",variant:"text"}),["active","block","flat","location","position","symbol"])},"VTab"),xv=be()({name:"VTab",props:TA(),setup(e,t){let{slots:n,attrs:r}=t;const{textColorClasses:s,textColorStyles:i}=Qr(()=>e.sliderColor),{backgroundColorClasses:a,backgroundColorStyles:o}=yn(()=>e.sliderColor),l=q(),c=q(),u=A(()=>e.direction==="horizontal"),d=A(()=>l.value?.group?.isSelected.value??!1);function p(b,y){return{opacity:[0,1]}}function m(b,y){return e.direction==="vertical"?{transform:["scaleY(0)","scaleY(1)"]}:{transform:["scaleX(0)","scaleX(1)"]}}function v(b,y){const w=y.getBoundingClientRect(),_=b.getBoundingClientRect(),T=u.value?"x":"y",P=u.value?"X":"Y",x=u.value?"right":"bottom",C=u.value?"width":"height",E=w[T],R=_[T],I=E>R?w[x]-_[x]:w[T]-_[T],O=Math.sign(I)>0?u.value?"right":"bottom":Math.sign(I)<0?u.value?"left":"top":"center",V=(Math.abs(I)+(Math.sign(I)<0?w[C]:_[C]))/Math.max(w[C],_[C])||0,F=w[C]/_[C]||0,B=1.5;return{transform:[`translate${P}(${I}px) scale${P}(${F})`,`translate${P}(${I/B}px) scale${P}(${(V-1)/B+1})`,"none"],transformOrigin:Array(3).fill(O)}}function g(b){let{value:y}=b;if(y){const w=l.value?.$el.parentElement?.querySelector(".v-tab--selected .v-tab__slider"),_=c.value;if(!w||!_)return;const T=getComputedStyle(w).color,P={fade:p,grow:m,shift:v}[e.sliderTransition??"shift"]??v,x=Number(e.sliderTransitionDuration)||({fade:400,grow:350,shift:225}[e.sliderTransition??"shift"]??225);si(_,{backgroundColor:[T,"currentcolor"],...P(_,w)},{duration:x,easing:Ou})}}return Ie(()=>{const b=te.filterProps(e);return f(te,ce({symbol:Zb,ref:l,class:["v-tab",e.class,d.value&&e.inset?a.value:[]],style:[e.style,d.value&&e.inset?o.value:[]],tabindex:d.value?0:-1,role:"tab","aria-selected":String(d.value),active:!1},b,r,{block:e.fixed,maxWidth:e.fixed?300:void 0,"onGroup:selected":g}),{...n,default:()=>S(ke,null,[n.default?.()??e.text,!e.hideSlider&&S("div",{ref:c,class:Se(["v-tab__slider",s.value]),style:Le(i.value)},null)])})}),Vr({},l)}}),hK=e=>{const{touchstartX:t,touchendX:n,touchstartY:r,touchendY:s}=e,i=.5,a=16;e.offsetX=n-t,e.offsetY=s-r,Math.abs(e.offsetY)<i*Math.abs(e.offsetX)&&(e.left&&n<t-a&&e.left(e),e.right&&n>t+a&&e.right(e)),Math.abs(e.offsetX)<i*Math.abs(e.offsetY)&&(e.up&&s<r-a&&e.up(e),e.down&&s>r+a&&e.down(e))};function gK(e,t){const n=e.changedTouches[0];t.touchstartX=n.clientX,t.touchstartY=n.clientY,t.start?.({originalEvent:e,...t})}function vK(e,t){const n=e.changedTouches[0];t.touchendX=n.clientX,t.touchendY=n.clientY,t.end?.({originalEvent:e,...t}),hK(t)}function yK(e,t){const n=e.changedTouches[0];t.touchmoveX=n.clientX,t.touchmoveY=n.clientY,t.move?.({originalEvent:e,...t})}function bK(){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=>gK(n,t),touchend:n=>vK(n,t),touchmove:n=>yK(n,t)}}function SK(e,t){const n=t.value,r=n?.parent?e.parentElement:e,s=n?.options??{passive:!0},i=t.instance?.$.uid;if(!r||i===void 0)return;const a=bK(t.value);r._touchHandlers=r._touchHandlers??Object.create(null),r._touchHandlers[i]=a,nC(a).forEach(o=>{r.addEventListener(o,a[o],s)})}function wK(e,t){const n=t.value?.parent?e.parentElement:e,r=t.instance?.$.uid;if(!n?._touchHandlers||r===void 0)return;const s=n._touchHandlers[r];nC(s).forEach(i=>{n.removeEventListener(i,s[i])}),delete n._touchHandlers[r]}const Ev={mounted:SK,unmounted:wK},IA=Symbol.for("vuetify:v-window"),RA=Symbol.for("vuetify:v-window-group"),e1=oe({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"},verticalArrows:[Boolean,String],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"},crossfade:Boolean,transitionDuration:Number,...Ue(),...lt(),...wt()},"VWindow"),sc=be()({name:"VWindow",directives:{vTouch:Ev},props:e1(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{themeClasses:r}=Mt(e),{isRtl:s}=xr(),{t:i}=kr(),a=ao(e,RA),o=q(),l=A(()=>s.value?!e.reverse:e.reverse),c=Ee(!1),u=A(()=>{if(e.crossfade)return"v-window-crossfade-transition";const T=e.direction==="vertical"?"y":"x",x=(l.value?!c.value:c.value)?"-reverse":"";return`v-window-${T}${x}-transition`}),d=Ee(0),p=q(void 0),m=A(()=>a.items.value.findIndex(T=>a.selected.value.includes(T.id)));_e(m,(T,P)=>{let x;const C={left:0,top:0};Ct&&P>=0&&(x=xy(o.value),C.left=x?.scrollLeft,C.top=x?.scrollTop);const E=a.items.value.length,R=E-1;E<=2?c.value=T<P:T===R&&P===0?c.value=!1:T===0&&P===R?c.value=!0:c.value=T<P,ut(()=>{if(!Ct||!x)return;x.scrollTop!==C.top&&x.scrollTo({...C,behavior:"instant"}),requestAnimationFrame(()=>{if(!x)return;x.scrollTop!==C.top&&x.scrollTo({...C,behavior:"instant"})})})},{flush:"sync"}),Dt(IA,{transition:u,isReversed:c,transitionCount:d,transitionHeight:p,rootRef:o});const v=ee(()=>e.continuous||m.value!==0),g=ee(()=>e.continuous||m.value!==a.items.value.length-1);function b(){v.value&&a.prev()}function y(){g.value&&a.next()}const w=A(()=>{const T=[],P={icon:s.value?e.nextIcon:e.prevIcon,class:`v-window__${l.value?"right":"left"}`,onClick:a.prev,"aria-label":i("$vuetify.carousel.prev")};T.push(v.value?n.prev?n.prev({props:P}):f(te,P,null):S("div",null,null));const x={icon:s.value?e.prevIcon:e.nextIcon,class:`v-window__${l.value?"left":"right"}`,onClick:a.next,"aria-label":i("$vuetify.carousel.next")};return T.push(g.value?n.next?n.next({props:x}):f(te,x,null):S("div",null,null)),T}),_=A(()=>e.touch===!1?e.touch:{...{left:()=>{l.value?b():y()},right:()=>{l.value?y():b()},start:P=>{let{originalEvent:x}=P;x.stopPropagation()}},...e.touch===!0?{}:e.touch});return Ie(()=>Pt(f(e.tag,{ref:o,class:Se(["v-window",{"v-window--show-arrows-on-hover":e.showArrows==="hover","v-window--vertical-arrows":!!e.verticalArrows,"v-window--crossfade":!!e.crossfade},r.value,e.class]),style:Le([e.style,{"--v-window-transition-duration":Wa()?null:Oe(e.transitionDuration,"ms")}])},{default:()=>[S("div",{class:"v-window__container",style:{height:p.value}},[n.default?.({group:a}),e.showArrows!==!1&&S("div",{class:Se(["v-window__controls",{"v-window__controls--left":e.verticalArrows==="left"||e.verticalArrows===!0},{"v-window__controls--right":e.verticalArrows==="right"}])},[w.value])]),n.additional?.({group:a})]}),[[Ev,_.value]])),{group:a}}}),_K=oe({...Qt(e1(),["continuous","nextIcon","prevIcon","showArrows","touch","mandatory"])},"VTabsWindow"),kK=be()({name:"VTabsWindow",props:_K(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=He(Zb,null),s=tt(e,"modelValue"),i=A({get(){return s.value!=null||!r?s.value:r.items.value.find(a=>r.selected.value.includes(a.id))?.value},set(a){s.value=a}});return Ie(()=>{const a=sc.filterProps(e);return f(sc,ce({_as:"VTabsWindow"},a,{modelValue:i.value,"onUpdate:modelValue":o=>i.value=o,class:["v-tabs-window",e.class],style:e.style,mandatory:!1,touch:!1}),n)}),{}}}),t1=oe({reverseTransition:{type:[Boolean,String],default:void 0},transition:{type:[Boolean,String],default:void 0},...Ue(),...bl(),...Oy()},"VWindowItem"),dl=be()({name:"VWindowItem",directives:{vTouch:Ev},props:t1(),emits:{"group:selected":e=>!0},setup(e,t){let{slots:n}=t;const r=He(IA),s=Ka(e,RA),{isBooted:i}=Lc();if(!r||!s)throw new Error("[Vuetify] VWindowItem must be used inside VWindow");const a=Ee(!1),o=A(()=>i.value&&(r.isReversed.value?e.reverseTransition!==!1:e.transition!==!1));function l(){!a.value||!r||(a.value=!1,r.transitionCount.value>0&&(r.transitionCount.value-=1,r.transitionCount.value===0&&(r.transitionHeight.value=void 0)))}function c(){a.value||!r||(a.value=!0,r.transitionCount.value===0&&(r.transitionHeight.value=Oe(r.rootRef.value?.clientHeight)),r.transitionCount.value+=1)}function u(){l()}function d(v){a.value&&ut(()=>{!o.value||!a.value||!r||(r.transitionHeight.value=Oe(v.clientHeight))})}const p=A(()=>{const v=r.isReversed.value?e.reverseTransition:e.transition;return o.value?{name:typeof v!="string"?r.transition.value:v,onBeforeEnter:c,onAfterEnter:l,onEnterCancelled:u,onBeforeLeave:c,onAfterLeave:l,onLeaveCancelled:u,onEnter:d}:!1}),{hasContent:m}=Dy(e,s.isSelected);return Ie(()=>f($s,{transition:p.value,disabled:!i.value},{default:()=>[Pt(S("div",{class:Se(["v-window-item",s.selectedClass.value,e.class]),style:Le(e.style)},[m.value&&n.default?.()]),[[$r,s.isSelected.value]])]})),{groupItem:s}}}),xK=oe({...t1()},"VTabsWindowItem"),EK=be()({name:"VTabsWindowItem",props:xK(),setup(e,t){let{slots:n}=t;return Ie(()=>{const r=dl.filterProps(e);return f(dl,ce({_as:"VTabsWindowItem"},r,{class:["v-tabs-window-item",e.class],style:e.style}),n)}),{}}});function CK(e){return e?e.map(t=>Pu(t)?t:{text:t,value:t}):[]}const TK=oe({alignTabs:{type:String,default:"start"},color:String,fixedTabs:Boolean,items:{type:Array,default:()=>[]},stacked:Boolean,bgColor:String,grow:Boolean,height:{type:[Number,String],default:void 0},hideSlider:Boolean,inset:Boolean,insetPadding:[String,Number],insetRadius:[String,Number],sliderColor:String,...Vs(TA(),["spaced","sliderTransition","sliderTransitionDuration"]),...Fb({mandatory:"force",selectedClass:"v-tab-item--selected"}),...Pn(),...lt()},"VTabs"),IK=be()({name:"VTabs",props:TK(),emits:{"update:modelValue":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const s=tt(e,"modelValue"),i=A(()=>CK(e.items)),{densityClasses:a}=Fr(e),{backgroundColorClasses:o,backgroundColorStyles:l}=yn(()=>e.bgColor),{scopeId:c}=uo();return Rn({VTab:{color:ee(e,"color"),direction:ee(e,"direction"),stacked:ee(e,"stacked"),fixed:ee(e,"fixedTabs"),inset:ee(e,"inset"),sliderColor:ee(e,"sliderColor"),sliderTransition:ee(e,"sliderTransition"),sliderTransitionDuration:ee(e,"sliderTransitionDuration"),hideSlider:ee(e,"hideSlider")}}),Ie(()=>{const u=Cf.filterProps(e),d=!!(r.window||e.items.length>0);return S(ke,null,[f(Cf,ce(u,{modelValue:s.value,"onUpdate:modelValue":p=>s.value=p,class:["v-tabs",`v-tabs--${e.direction}`,`v-tabs--align-tabs-${e.alignTabs}`,{"v-tabs--fixed-tabs":e.fixedTabs,"v-tabs--grow":e.grow,"v-tabs--inset":e.inset,"v-tabs--stacked":e.stacked},a.value,o.value,e.class],style:[{"--v-tabs-height":Oe(e.height),"--v-tabs-inset-padding":e.inset?Oe(e.insetPadding):void 0,"--v-tabs-inset-radius":e.inset?Oe(e.insetRadius):void 0},l.value,e.style],role:"tablist",symbol:Zb},c,n),{default:r.default??(()=>i.value.map(p=>r.tab?.({item:p})??f(xv,ce(p,{key:p.text,value:p.value,spaced:e.spaced}),{default:r[`tab.${p.value}`]?()=>r[`tab.${p.value}`]?.({item:p}):void 0}))),prev:r.prev,next:r.next}),d&&f(kK,ce({modelValue:s.value,"onUpdate:modelValue":p=>s.value=p,key:"tabs-window"},c),{default:()=>[i.value.map(p=>r.item?.({item:p})??f(EK,{value:p.value},{default:()=>r[`item.${p.value}`]?.({item:p})})),r.window?.()]})])}),{}}}),RK=oe({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))},maxHeight:{type:[Number,String],validator:e=>!isNaN(parseFloat(e))},maxRows:{type:[Number,String],validator:e=>!isNaN(parseFloat(e))},suffix:String,modelModifiers:Object,...GP(),...po(),...Dp()},"VTextarea"),PA=be()({name:"VTextarea",directives:{vIntersect:Jo},inheritAttrs:!1,props:RK(),emits:{"click:control":e=>!0,"mousedown:control":e=>!0,"update:focused":e=>!0,"update:modelValue":e=>!0,"update:rows":e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const i=tt(e,"modelValue"),{isFocused:a,focus:o,blur:l}=Nl(e),{onIntersect:c}=KP(e),u=A(()=>typeof e.counterValue=="function"?e.counterValue(i.value):(i.value||"").toString().length),d=A(()=>{if(n.maxlength)return n.maxlength;if(!(!e.counter||typeof e.counter!="number"&&typeof e.counter!="string"))return e.counter}),p=q(),m=q(),v=Ee(""),g=q(),b=q(0),{platform:y}=bs(),w=qb(e),_=A(()=>e.persistentPlaceholder||a.value||e.active);function T(){w.isSuppressing.value&&w.update(),g.value!==document.activeElement&&g.value?.focus(),a.value||o()}function P(F){T(),r("click:control",F)}function x(F){r("mousedown:control",F)}function C(F){F.stopPropagation(),T(),ut(()=>{i.value="",mc(e["onClick:clear"],F)})}function E(F){const B=F.target;if(!e.modelModifiers?.trim){i.value=B.value;return}const M=B.value,N=B.selectionStart,D=B.selectionEnd;i.value=M,ut(()=>{let W=0;M.trimStart().length===B.value.length&&(W=M.length-B.value.length),N!=null&&(B.selectionStart=N-W),D!=null&&(B.selectionEnd=D-W)})}const R=q(),I=q(Number(e.rows)),O=A(()=>["plain","underlined"].includes(e.variant));bn(()=>{e.autoGrow||(I.value=Number(e.rows))});function L(){ut(()=>{if(!g.value)return;if(y.value.firefox){b.value=12;return}const{offsetWidth:F,clientWidth:B}=g.value;b.value=Math.max(0,F-B)}),e.autoGrow&&ut(()=>{if(!R.value||!m.value)return;const F=getComputedStyle(R.value),B=getComputedStyle(m.value.$el),M=parseFloat(F.getPropertyValue("--v-field-padding-top"))+parseFloat(F.getPropertyValue("--v-input-padding-top"))+parseFloat(F.getPropertyValue("--v-field-padding-bottom")),N=R.value.scrollHeight,D=parseFloat(F.lineHeight),W=Math.max(parseFloat(e.rows)*D+M,parseFloat(B.getPropertyValue("--v-input-control-height"))),z=e.maxHeight?parseFloat(e.maxHeight):parseFloat(e.maxRows)*D+M||1/0,K=In(N??0,W,z);I.value=Math.floor((K-M)/D),v.value=Oe(K)})}ot(L),_e(i,L),_e(()=>e.rows,L),_e(()=>e.maxHeight,L),_e(()=>e.maxRows,L),_e(()=>e.density,L),_e(I,F=>{r("update:rows",F)});let V;return _e(R,F=>{F?(V=new ResizeObserver(L),V.observe(R.value)):V?.disconnect()}),Mn(()=>{V?.disconnect()}),Ie(()=>{const F=!!(s.counter||e.counter||e.counterValue),B=!!(F||s.details),[M,N]=so(n),{modelValue:D,...W}=ts.filterProps(e),z={...ul.filterProps(e),"onClick:clear":C};return f(ts,ce({ref:p,modelValue:i.value,"onUpdate:modelValue":K=>i.value=K,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":O.value},e.class],style:[{"--v-textarea-max-height":e.maxHeight?Oe(e.maxHeight):void 0,"--v-textarea-scroll-bar-width":Oe(b.value)},e.style]},M,W,{centerAffix:I.value===1&&!O.value,focused:a.value}),{...s,default:K=>{let{id:H,isDisabled:re,isDirty:ae,isReadonly:de,isValid:De,hasDetails:X}=K;return f(ul,ce({ref:m,style:{"--v-textarea-control-height":v.value},onClick:P,onMousedown:x,"onClick:prependInner":e["onClick:prependInner"],"onClick:appendInner":e["onClick:appendInner"]},z,{id:H.value,active:_.value||ae.value,labelId:`${H.value}-label`,centerAffix:I.value===1&&!O.value,dirty:ae.value||e.dirty,disabled:re.value,focused:a.value,details:X.value,error:De.value===!1}),{...s,default:ie=>{let{props:{class:ne,...ve},controlRef:Ne}=ie;return S(ke,null,[e.prefix&&S("span",{class:"v-text-field__prefix"},[e.prefix]),Pt(S("textarea",ce({ref:U=>g.value=Ne.value=U,class:ne,value:i.value,onInput:E,autofocus:e.autofocus,readonly:de.value,disabled:re.value,placeholder:e.placeholder,rows:e.rows,name:w.fieldName.value,autocomplete:w.fieldAutocomplete.value,onFocus:T,onBlur:l,"aria-labelledby":`${H.value}-label`},ve,N),null),[[Jo,{handler:c},null,{once:!0}]]),e.autoGrow&&Pt(S("textarea",{class:Se([ne,"v-textarea__sizer"]),id:`${ve.id}-sizer`,"onUpdate:modelValue":U=>i.value=U,ref:R,readonly:!0,"aria-hidden":"true"},null),[[VL,i.value]]),e.suffix&&S("span",{class:"v-text-field__suffix"},[e.suffix])])}})},details:B?K=>S(ke,null,[s.details?.(K),F&&S(ke,null,[S("span",null,null),f(zb,{active:e.persistentCounter||a.value,value:u.value,max:d.value,disabled:e.disabled},s.counter)])]):void 0})}),Vr({},p,m,g)}}),PK={class:"font-weight-bold"},AK={key:0,class:"text-caption mt-2"},OK=Ae({__name:"YamlImportExportDialog",setup(e){const t=$p(),n=jt(Ht.YamlImportExport),r=bt(),s=q(""),i=q(""),a=q(0),o=q(!0),l=q(!0),c=q(!0),u=q(!0),d=q(!0),p=q(!0),m=q(void 0),v=q(""),g=q(!1),b=q(null),y=A(()=>!!m.value),w=A(()=>a.value===0),_=async I=>{I?(s.value="",i.value="",b.value=null,await x()):(b.value=null,s.value="No file selected",i.value="Please select a yaml file to import")},T=async()=>{await t.loadFeatures()},P=async()=>{m.value=void 0,s.value="",i.value="",v.value="",b.value=null,g.value=!1},x=async()=>{if(m.value){g.value=!0;try{const I=await m.value.text(),O=kv(I);if(!O||typeof O!="object"){s.value="Failed to parse yaml file structure",i.value="yaml load failed",b.value=null;return}b.value={version:O.version||"Unknown",databaseType:O.databaseType||"Unknown",exportedAt:O.exportedAt?new Date(O.exportedAt).toLocaleString():"Unknown",printersCount:O.printers?.length||0,floorsCount:O.floors?.length||0,groupsCount:O.groups?.length||0,hasSettings:!!O.settings,usersCount:O.users?.length||0}}catch(I){s.value="Failed to validate import file",i.value=I.message,b.value=null}finally{g.value=!1}}},C=async()=>{l.value&&(u.value=!0),await Lf.downloadYamlExport({exportPrinters:u.value,exportGroups:c.value,exportFloorGrid:l.value,exportSettings:d.value,exportUsers:p.value,printerComparisonStrategiesByPriority:["name","url"],exportFloors:o.value,floorComparisonStrategiesByPriority:"floor",notes:v.value}),r.openInfoMessage({title:"Downloaded the YAML file"}),v.value=""},E=async()=>{if(s.value="",i.value="",!m.value){s.value="The import file was not specified";return}try{const I=await m.value.text(),O=kv(I);O.settings&&delete O.settings,O.users&&delete O.users,O.roles&&delete O.roles,O.user_roles&&delete O.user_roles;const L=sK(O),V=new File([L],m.value.name,{type:"application/x-yaml"});await Lf.uploadAndImportYaml(V),m.value=void 0,r.openInfoMessage({title:"Imported the YAML file (settings and users excluded)"}),R()}catch(I){s.value="An error occurred during import",i.value=I.message.toString(),m.value=void 0}},R=()=>{m.value=void 0,s.value="",i.value="",v.value="",b.value=null,g.value=!1,n.closeDialog()};return(I,O)=>($(),J(qs,{id:Q(n).dialogId,"max-width":"600px",onEscape:O[13]||(O[13]=L=>R()),onOpened:P,onBeforeOpened:T},{default:h(()=>[f($e,null,{default:h(()=>[f(Lt,{class:"d-flex align-center"},{default:h(()=>[f(j,{class:"mr-3"},{default:h(()=>[...O[14]||(O[14]=[k("code",-1)])]),_:1}),O[15]||(O[15]=k(" YAML Import/Export ",-1))]),_:1}),f(IK,{modelValue:a.value,"onUpdate:modelValue":O[0]||(O[0]=L=>a.value=L)},{default:h(()=>[f(xv,{value:0},{default:h(()=>[f(j,{start:""},{default:h(()=>[...O[16]||(O[16]=[k("upload",-1)])]),_:1}),O[17]||(O[17]=k(" Import ",-1))]),_:1}),f(xv,{value:1},{default:h(()=>[f(j,{start:""},{default:h(()=>[...O[18]||(O[18]=[k("download",-1)])]),_:1}),O[19]||(O[19]=k(" Export ",-1))]),_:1})]),_:1},8,["modelValue"]),f(Xe,{class:"pt-4"},{default:h(()=>[f(sc,{modelValue:a.value,"onUpdate:modelValue":O[11]||(O[11]=L=>a.value=L)},{default:h(()=>[f(dl,{value:0},{default:h(()=>[f(Qb,{modelValue:m.value,"onUpdate:modelValue":[O[1]||(O[1]=L=>m.value=L),_],accept:".yaml,.yml",label:"Select YAML file","prepend-icon":"attach_file",variant:"outlined",hint:"Upload a YAML file to import printers, floors, and tags (groups)","persistent-hint":""},null,8,["modelValue"]),g.value?($(),J(Or,{key:0,indeterminate:"",color:"secondary",class:"mt-4"})):se("",!0),s.value?($(),J(Et,{key:1,type:"error",class:"mt-4",closable:""},{default:h(()=>[S("div",PK,Y(s.value),1),i.value?($(),pe("div",AK,Y(i.value),1)):se("",!0)]),_:1})):se("",!0),b.value?($(),J(bA,{key:2,summary:b.value,"exclude-settings-and-users":!0,class:"mt-4"},null,8,["summary"])):se("",!0),w.value&&b.value?($(),J(te,{key:3,disabled:!y.value,block:"",color:"primary",size:"large",class:"mt-4",onClick:O[2]||(O[2]=L=>E())},{default:h(()=>[f(j,{start:""},{default:h(()=>[...O[20]||(O[20]=[k("upload",-1)])]),_:1}),O[21]||(O[21]=k(" Import YAML Data ",-1))]),_:1},8,["disabled"])):se("",!0)]),_:1}),f(dl,{value:1},{default:h(()=>[f(rc,{variant:"accordion"},{default:h(()=>[f(nc,null,{default:h(()=>[f(tc,null,{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...O[22]||(O[22]=[k("tune",-1)])]),_:1}),O[23]||(O[23]=k(" Advanced Options ",-1))]),_:1}),f(ec,null,{default:h(()=>[O[24]||(O[24]=S("div",{class:"text-caption mb-2 text-medium-emphasis"}," Select which data to include in the export: ",-1)),f(Yt,{modelValue:u.value,"onUpdate:modelValue":O[3]||(O[3]=L=>u.value=L),label:"Printers","hide-details":"",density:"comfortable"},null,8,["modelValue"]),f(Yt,{modelValue:o.value,"onUpdate:modelValue":O[4]||(O[4]=L=>o.value=L),label:"Floors","hide-details":"",density:"comfortable"},null,8,["modelValue"]),f(Yt,{modelValue:l.value,"onUpdate:modelValue":O[5]||(O[5]=L=>l.value=L),label:"Grid Positions",hint:"Automatically includes printers","persistent-hint":"",density:"comfortable",class:"mb-2"},null,8,["modelValue"]),f(Yt,{modelValue:c.value,"onUpdate:modelValue":O[6]||(O[6]=L=>c.value=L),label:"Tags","hide-details":"",density:"comfortable"},null,8,["modelValue"]),f(Yt,{modelValue:d.value,"onUpdate:modelValue":O[7]||(O[7]=L=>d.value=L),label:"Settings","hide-details":"",density:"comfortable"},null,8,["modelValue"]),f(Yt,{modelValue:p.value,"onUpdate:modelValue":O[8]||(O[8]=L=>p.value=L),label:"Users","hide-details":"",density:"comfortable"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),f(pt,{class:"my-4"}),f(PA,{modelValue:v.value,"onUpdate:modelValue":O[9]||(O[9]=L=>v.value=L),label:"Notes (optional)",placeholder:"Add notes for yourself...",variant:"outlined",rows:"2","auto-grow":""},null,8,["modelValue"]),f(te,{block:"",color:"primary",size:"large",class:"mt-2",onClick:O[10]||(O[10]=L=>C())},{default:h(()=>[f(j,{start:""},{default:h(()=>[...O[25]||(O[25]=[k("download",-1)])]),_:1}),O[26]||(O[26]=k(" Download YAML File ",-1))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1}),f(dn,null,{default:h(()=>[f(Ft),f(te,{variant:"text",onClick:O[12]||(O[12]=L=>R())},{default:h(()=>[...O[27]||(O[27]=[k(" Close ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["id"]))}}),DK="/assets/octofarm-printer-export-Dw0Zh14I.gif",LK={class:"d-flex align-center mb-2"},$K={class:"d-flex align-center mb-2"},FK={class:"d-flex align-center mb-2"},NK={class:"d-flex align-center mb-2"},MK={class:"my-3"},VK={key:0},BK={key:1},UK={class:"d-flex align-center"},zK={class:"d-flex align-center"},jK={class:"flex-grow-1"},HK={class:"font-weight-bold mb-1"},qK={key:0},WK={key:0},GK={key:1},KK={class:"d-flex align-center"},YK={class:"d-flex align-center"},JK={class:"flex-grow-1"},XK={class:"font-weight-bold mb-1"},QK={key:0},ZK={key:0},eY={key:1},tY={class:"d-flex justify-space-between align-center mb-3"},nY={class:"d-flex flex-column"},rY={class:"text-caption"},sY={class:"text-caption"},iY={class:"ml-4"},aY=Ae({__name:"OctoFarmImportDialog",setup(e){const t=q(1),n=q(!1),r=q(!1),s=q(!1),i=q(""),a=q(""),o=q(null),l=q(0),c=q([]),u=q([]),d=q(!1),p=jt(Ht.ImportOctoFarmDialog);function m(){t.value=1,n.value=!1,i.value="",a.value="",r.value=!1,l.value=0,c.value=[],u.value=[],d.value=!1}async function v(){}const g=async()=>{if(n.value=!1,i.value="",a.value="",!o.value)return i.value="No file selected",a.value="Please select a PrintersDB.json file to import",[];try{const P=JSON.parse(await o.value.text());if(!P||typeof P!="object")return i.value="Invalid JSON file format",a.value="The file does not contain valid JSON data",[];const x=P.databases;if(!x)return i.value="Invalid OctoFarm export format",a.value='Missing "databases" property in the JSON file',[];if(!Array.isArray(x))return i.value="Invalid databases format",a.value='The "databases" property should be an array',[];if(!x?.length)return i.value="No printer data found",a.value="The databases array is empty",[];let C=x;if(x.length>0&&Array.isArray(x[0])){const L=x[0];Array.isArray(L)&&(C=L)}if(!Array.isArray(C)||!C.length)return i.value="No printers found in export",a.value="The export file does not contain any printer data",[];const E=C.map((L,V)=>(L._id&&delete L._id,L.apikey&&(L.apiKey=L.apikey,delete L.apikey),L.settingsApperance&&(L.settingsAppearance=L.settingsApperance,delete L.settingsApperance),L.settingsAppearance?.name?(L.name=L.settingsAppearance?.name,delete L.settingsAppearance):L.name=L.printerURL||`Printer ${V+1}`,{enabled:L.disabled===void 0||!L.disabled,apiKey:L.apiKey||"",printerURL:L.printerURL||"",name:L.name||L.printerURL||`Printer ${V+1}`,printerType:0,username:"",password:""}));let R=!1;const I=[],O=[];for(let L=0;L<E.length;L++){const V=E[L],F=[];if((!V.apiKey||V.apiKey.trim().length===0)&&F.push("missing or invalid API key"),(!V.printerURL||V.printerURL.trim().length===0)&&F.push("missing or invalid printer URL"),(!V.name||V.name.trim().length===0)&&F.push("missing or invalid printer name"),V.printerURL&&V.printerURL.trim().length>0)try{new URL(V.printerURL.startsWith("http")?V.printerURL:`http://${V.printerURL}`).hostname||F.push("invalid URL format")}catch{F.push("malformed URL")}if(F.length>0){const B=V.name||`Printer ${L+1}`;I.push(`${B}: ${F.join(", ")}`),R=!0}else O.push(V)}return R?(i.value=`${I.length} printer(s) failed validation`,a.value=I.join("; "),n.value=!1,O):(n.value=!0,E)}catch(P){return i.value="Failed to parse JSON file",a.value=`Parse error: ${P?.message||"Unknown error"}`,[]}},b=async()=>{if(!o.value){n.value=!1,i.value="",a.value="",l.value=0,c.value=[],u.value=[];return}try{const P=await g();if(l.value=P?.length||0,!P?.length){i.value||(i.value="No valid printers found",a.value="The import file contains no valid printer data");return}u.value=Array.from({length:P.length},(x,C)=>C),c.value=P,n.value?t.value=2:console.log("[OctoFarm] Validation failed but have valid printers, staying on step 1")}catch(P){i.value="Validation failed",a.value=`Error during validation: ${P?.message||"Unknown error"}`,n.value=!1,l.value=0}},y=P=>{const x=u.value.indexOf(P);x>-1?u.value.splice(x,1):u.value.push(P)},w=()=>{u.value.length?u.value=[]:u.value=Array.from({length:c.value.length},(x,C)=>C)},_=async()=>{const P=c.value.filter((x,C)=>u.value.includes(C));if(P?.length)try{await It.batchImportPrinters(P),d.value=!0,T()}catch(x){d.value=!1,o.value=null,i.value="An error occurred",a.value=x.message.toString()}},T=()=>{o.value=null,p.closeDialog(),t.value=1};return(P,x)=>{const C=Tu("v-stepper-vertical-item"),E=Tu("v-stepper-vertical"),R=qs;return $(),J(R,{id:Q(p).dialogId,"max-width":"700px",onBeforeOpened:x[11]||(x[11]=I=>m()),onEscape:x[12]||(x[12]=I=>T()),onOpened:x[13]||(x[13]=I=>v())},{default:h(()=>[f($e,{class:"pa-4"},{default:h(()=>[f(Lt,null,{default:h(()=>[...x[14]||(x[14]=[S("span",{class:"text-h5"}," Import OctoFarm Printers ",-1)])]),_:1}),f(Xe,null,{default:h(()=>[f(it,null,{default:h(()=>[f(Be,{cols:"12"},{default:h(()=>[f(E,{modelValue:t.value,"onUpdate:modelValue":x[9]||(x[9]=I=>t.value=I),color:"primary","non-linear":""},{default:h(({step:I})=>[f(C,{title:"Export PrintersDB from OctoFarm",elevation:"0",value:1,complete:I>1,editable:""},{default:h(()=>[S("ol",null,[S("li",LK,[f(j,{class:"mr-2"},{default:h(()=>[...x[15]||(x[15]=[k("mdi:mdi-navigation",-1)])]),_:1}),x[16]||(x[16]=S("span",null,"1. Go to your OctoFarm System page",-1))]),S("li",$K,[f(j,{class:"mr-2"},{default:h(()=>[...x[17]||(x[17]=[k("mdi:mdi-mouse",-1)])]),_:1}),x[18]||(x[18]=S("span",null,"2. Click 'Database'",-1))]),S("li",FK,[f(j,{class:"mr-2"},{default:h(()=>[...x[19]||(x[19]=[k("mdi:mdi-mouse",-1)])]),_:1}),x[20]||(x[20]=S("span",null,"3. Click the button 'Export Printers'",-1))]),S("li",NK,[f(j,{class:"mr-2"},{default:h(()=>[...x[21]||(x[21]=[k("mdi:mdi-upload",-1)])]),_:1}),x[22]||(x[22]=S("span",null,"4. Upload 'PrintersDB.json' above",-1))])]),S("div",MK,[f(j,{class:"pr-2"},{default:h(()=>[...x[23]||(x[23]=[k("mdi:mdi-information",-1)])]),_:1}),x[25]||(x[25]=k(' OctoFarm printers should be exported as a JSON file. Please upload the correct "PrintersDB.json" database file using the steps provided. ',-1)),f(te,{size:"small",class:"ml-2",color:"success",onClick:x[0]||(x[0]=O=>s.value=!s.value)},{default:h(()=>[f(j,{class:"pr-2"},{default:h(()=>[...x[24]||(x[24]=[k("mdi:mdi-file-gif-box",-1)])]),_:1}),s.value?($(),pe("span",BK,"Hide GIF")):($(),pe("span",VK,"Show GIF"))]),_:1})]),s.value?($(),J(ms,{key:0,class:"my-4",src:Q(DK),style:{border:"3px solid dimgray","max-width":"800px"},elevation:"10"},null,8,["src"])):se("",!0),f(pt,{class:"mt-10"}),f(Qb,{class:"mt-8",style:{"max-width":"400px"},modelValue:o.value,"onUpdate:modelValue":[x[1]||(x[1]=O=>o.value=O),x[2]||(x[2]=O=>b())],variant:"filled",accept:".json",clearable:"",label:"Upload PrintersDB.json file"},null,8,["modelValue"]),o.value&&n.value?($(),J(Et,{key:1,class:"my-2",type:"success",variant:"tonal"},{default:h(()=>[S("div",UK,[S("div",null,[x[26]||(x[26]=S("div",{class:"font-weight-bold"},"Validation successful",-1)),S("div",null,Y(l.value)+" valid printer(s) found",1)])])]),_:1})):se("",!0),o.value&&i.value?($(),J(Et,{key:2,class:"my-2",type:"error",variant:"tonal"},{default:h(()=>[S("div",zK,[f(j,{class:"mr-2"},{default:h(()=>[...x[27]||(x[27]=[k("mdi:mdi-alert-circle",-1)])]),_:1}),S("div",jK,[S("div",HK,Y(i.value),1),a.value?($(),pe("div",qK,[!r.value&&a.value.length>150?($(),pe("div",WK,[k(Y(a.value.slice(0,150))+"... ",1),f(te,{size:"x-small",color:"error",variant:"text",class:"ml-1",onClick:x[3]||(x[3]=O=>r.value=!0)},{default:h(()=>[...x[28]||(x[28]=[k(" Show Details ",-1)])]),_:1})])):($(),pe("div",GK,[k(Y(a.value)+" ",1),r.value&&a.value.length>150?($(),J(te,{key:0,size:"x-small",color:"error",variant:"text",class:"ml-1",onClick:x[4]||(x[4]=O=>r.value=!1)},{default:h(()=>[...x[29]||(x[29]=[k(" Hide Details ",-1)])]),_:1})):se("",!0)]))])):se("",!0)])]),!n.value&&c.value.length>0?($(),J(te,{key:0,size:"small",color:"warning",variant:"outlined",class:"mt-2",onClick:x[5]||(x[5]=O=>t.value=2)},{default:h(()=>[f(j,{class:"mr-1"},{default:h(()=>[...x[30]||(x[30]=[k("mdi:mdi-alert",-1)])]),_:1}),k(" Continue with "+Y(c.value.length)+" valid printer(s) ",1)]),_:1})):se("",!0)]),_:1})):se("",!0)]),_:1},8,["complete"]),f(C,{title:"Show printers & verify",elevation:"0",value:2,complete:I>2,editable:"","onClick:next":_},{next:h(({next:O})=>[f(te,{color:"primary",onClick:O,disabled:!u.value?.length},{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...x[43]||(x[43]=[k("mdi:mdi-upload",-1)])]),_:1}),k(" Submit "+Y(u.value?.length)+" printer"+Y(u.value?.length!==1?"s":""),1)]),_:1},8,["onClick","disabled"])]),default:h(()=>[f(Et,{type:n.value?"success":"warning",variant:"tonal",class:"mb-4"},{default:h(()=>[S("div",KK,[S("div",null,[x[31]||(x[31]=S("strong",null,"Import state: ",-1)),S("span",null,Y(n.value?"success":"failed")+", "+Y(l.value)+" printer(s) found ",1)])])]),_:1},8,["type"]),i.value?($(),J(Et,{key:0,class:"mb-4",type:"error",variant:"tonal"},{default:h(()=>[S("div",YK,[f(j,{class:"mr-2"},{default:h(()=>[...x[32]||(x[32]=[k("mdi:mdi-alert-circle",-1)])]),_:1}),S("div",JK,[S("div",XK,Y(i.value),1),a.value?($(),pe("div",QK,[!r.value&&a.value.length>150?($(),pe("div",ZK,[k(Y(a.value.slice(0,150))+"... ",1),f(te,{size:"x-small",color:"error",variant:"text",class:"ml-1","data-testid":"show-details-btn",onClick:x[6]||(x[6]=O=>r.value=!0)},{default:h(()=>[...x[33]||(x[33]=[k(" Show Details ",-1)])]),_:1})])):($(),pe("div",eY,[k(Y(a.value)+" ",1),r.value&&a.value.length>150?($(),J(te,{key:0,size:"x-small",color:"error",variant:"text",class:"ml-1","data-testid":"hide-details-btn",onClick:x[7]||(x[7]=O=>r.value=!1)},{default:h(()=>[...x[34]||(x[34]=[k(" Hide Details ",-1)])]),_:1})):se("",!0)]))])):se("",!0)])]),!n.value&&c.value.length>0?($(),J(te,{key:0,size:"small",color:"warning",variant:"outlined",class:"mt-2","data-testid":"continue-with-valid-btn",onClick:x[8]||(x[8]=O=>t.value=2)},{default:h(()=>[f(j,{class:"mr-1"},{default:h(()=>[...x[35]||(x[35]=[k("mdi:mdi-alert",-1)])]),_:1}),k(" Continue with "+Y(c.value.length)+" valid printer(s) ",1)]),_:1})):se("",!0)]),_:1})):se("",!0),S("div",tY,[x[38]||(x[38]=S("h4",{class:"text-subtitle-1 font-weight-medium"},"Found printers",-1)),f(te,{onClick:w,size:"small",variant:"outlined"},{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...x[36]||(x[36]=[k("mdi:mdi-check-all",-1)])]),_:1}),x[37]||(x[37]=k(" Toggle selection ",-1))]),_:1})]),f($e,{variant:"outlined",class:"mb-4"},{default:h(()=>[f(_s,{lines:"three",density:"compact"},{default:h(()=>[($(!0),pe(ke,null,Ot(c.value,(O,L)=>($(),J(yt,{key:O.name,onClick:V=>y(L)},{prepend:h(()=>[f(ra,{"model-value":u.value.includes(L)},null,8,["model-value"])]),default:h(()=>[f(Gt,{class:"font-weight-medium mb-1"},{default:h(()=>[k(Y(O.name),1)]),_:2},1024),f(Fl,null,{default:h(()=>[S("div",nY,[S("span",rY,[x[39]||(x[39]=S("strong",null,"URL:",-1)),k(" "+Y(O.printerURL),1)]),S("span",sY,[x[41]||(x[41]=S("strong",null,"Enabled:",-1)),k(" "+Y(O.enabled)+" ",1),S("span",iY,[x[40]||(x[40]=S("strong",null,"API Key:",-1)),k(" "+Y(O.apiKey.slice(0,20))+"...",1)])])])]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1}),f(Et,{type:"info",variant:"tonal",density:"compact",class:"mb-4"},{default:h(()=>[...x[42]||(x[42]=[S("div",{class:"text-caption"},[S("strong",null,"Properties to import:"),k(" enabled, name, printerURL, apiKey ")],-1)])]),_:1})]),_:1},8,["complete"])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),f(dn,null,{default:h(()=>[f(Ft),f(te,{onClick:x[10]||(x[10]=I=>T())},{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...x[44]||(x[44]=[k("mdi:mdi-close",-1)])]),_:1}),x[45]||(x[45]=k(" Close ",-1))]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),oY=oe({id:String,submenu:Boolean,...Qt(vc({captureFocus:!0,closeDelay:250,closeOnContentClick:!0,locationStrategy:"connected",location:void 0,openDelay:300,scrim:!1,scrollStrategy:"reposition",transition:{component:Ry}}),["absolute"])},"VMenu"),da=be()({name:"VMenu",props:oY(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=tt(e,"modelValue"),{scopeId:s}=uo(),{isRtl:i}=xr(),a=Sr(),o=ee(()=>e.id||`v-menu-${a}`),l=q(),c=He(Ig,null),u=Ee(new Set);Dt(Ig,{register(){u.value.add(a)},unregister(){u.value.delete(a)},closeParents(g){setTimeout(()=>{!u.value.size&&!e.persistent&&(g==null||l.value?.contentEl&&!v$(g,l.value.contentEl))&&(r.value=!1,c?.closeParents())},40)}}),Mn(()=>c?.unregister()),ay(()=>r.value=!1),_e(r,g=>{g?c?.register():c?.unregister()},{immediate:!0});function d(g){c?.closeParents(g)}function p(g){if(!e.disabled)if(g.key==="Tab"||g.key==="Enter"&&!e.closeOnContentClick){if(g.key==="Enter"&&(g.target instanceof HTMLTextAreaElement||g.target instanceof HTMLInputElement&&g.target.closest("form")))return;g.key==="Enter"&&g.preventDefault(),!oC(Da(l.value?.contentEl,!1),g.shiftKey?"prev":"next",y=>y.tabIndex>=0)&&!e.retainFocus&&(r.value=!1,l.value?.activatorEl?.focus())}else e.submenu&&g.key===(i.value?"ArrowRight":"ArrowLeft")&&(r.value=!1,l.value?.activatorEl?.focus())}function m(g){if(e.disabled)return;const b=l.value?.contentEl;b&&r.value?g.key==="ArrowDown"?(g.preventDefault(),g.stopImmediatePropagation(),mu(b,"next")):g.key==="ArrowUp"?(g.preventDefault(),g.stopImmediatePropagation(),mu(b,"prev")):e.submenu&&(g.key===(i.value?"ArrowRight":"ArrowLeft")?r.value=!1:g.key===(i.value?"ArrowLeft":"ArrowRight")&&(g.preventDefault(),mu(b,"first"))):(e.submenu?g.key===(i.value?"ArrowLeft":"ArrowRight"):["ArrowDown","ArrowUp"].includes(g.key))&&(r.value=!0,g.preventDefault(),setTimeout(()=>setTimeout(()=>m(g))))}const v=A(()=>ce({"aria-haspopup":"menu","aria-expanded":String(r.value),"aria-controls":o.value,"aria-owns":o.value,onKeydown:m},e.activatorProps));return Ie(()=>{const g=bi.filterProps(e);return f(bi,ce({ref:l,id:o.value,class:["v-menu",e.class],style:e.style},g,{modelValue:r.value,"onUpdate:modelValue":b=>r.value=b,absolute:!0,activatorProps:v.value,location:e.location??(e.submenu?"end":"bottom"),"onClick:outside":d,onKeydown:p},s),{activator:n.activator,default:function(){for(var b=arguments.length,y=new Array(b),w=0;w<b;w++)y[w]=arguments[w];return f(vt,{root:"VMenu"},{default:()=>[n.default?.(...y)]})}})}),Vr({id:o,ΨopenChildren:u},l)}}),lY=oe({renderless:Boolean,...Ue()},"VVirtualScrollItem"),uY=be()({name:"VVirtualScrollItem",inheritAttrs:!1,props:lY(),emits:{"update:height":e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const{resizeRef:i,contentRect:a}=Qi(void 0,"border");_e(()=>a.value?.height,o=>{o!=null&&r("update:height",o)}),Ie(()=>e.renderless?S(ke,null,[s.default?.({itemRef:i})]):S("div",ce({ref:i,class:["v-virtual-scroll__item",e.class],style:e.style},n),[s.default?.()]))}}),cY=-1,dY=1,eh=100,fY=oe({itemHeight:{type:[Number,String],default:null},itemKey:{type:[String,Array,Function],default:null},height:[Number,String]},"virtual");function pY(e,t){const n=bs(),r=Ee(0);bn(()=>{r.value=parseFloat(e.itemHeight||0)});const s=Ee(0),i=Ee(Math.ceil((parseInt(e.height)||n.height.value)/(r.value||16))||1),a=Ee(0),o=Ee(0),l=q(),c=q();let u=0;const{resizeRef:d,contentRect:p}=Qi();bn(()=>{d.value=l.value});const m=A(()=>l.value===document.documentElement?n.height.value:p.value?.height||parseInt(e.height)||0),v=A(()=>!!(l.value&&c.value&&m.value&&r.value));let g=Array.from({length:t.value.length}),b=Array.from({length:t.value.length});const y=Ee(0);let w=-1;function _(z){return g[z]||r.value}const T=m$(()=>{const z=performance.now();b[0]=0;const K=t.value.length;for(let H=1;H<=K;H++)b[H]=(b[H-1]||0)+_(H-1);y.value=Math.max(y.value,performance.now()-z)},y),P=_e(v,z=>{z&&(P(),u=c.value.offsetTop,T.immediate(),M(),~w&&ut(()=>{Ct&&window.requestAnimationFrame(()=>{D(w),w=-1})}))});Xt(()=>{T.clear()});function x(z,K){const H=g[z],re=r.value;r.value=re?Math.min(r.value,K):K,(H!==K||re!==r.value)&&(g[z]=K,T())}function C(z){z=In(z,0,t.value.length);const K=Math.floor(z),H=z%1,re=K+1,ae=b[K]||0,de=b[re]||ae;return ae+(de-ae)*H}function E(z){return mY(b,z)}let R=0,I=0,O=0;_e(m,(z,K)=>{M(),z<K&&requestAnimationFrame(()=>{I=0,M()})});let L=-1;function V(){if(!l.value||!c.value)return;const z=l.value.scrollTop,K=performance.now();K-O>500?(I=Math.sign(z-R),u=c.value.offsetTop):I=z-R,R=z,O=K,window.clearTimeout(L),L=window.setTimeout(F,500),M()}function F(){!l.value||!c.value||(I=0,O=0,window.clearTimeout(L),M())}let B=-1;function M(){cancelAnimationFrame(B),B=requestAnimationFrame(N)}function N(){if(!l.value||!m.value||!r.value)return;const z=R-u,K=Math.sign(I),H=Math.max(0,z-eh),re=In(E(H),0,t.value.length),ae=z+m.value+eh,de=In(E(ae)+1,re+1,t.value.length);if((K!==cY||re<s.value)&&(K!==dY||de>i.value)){const De=C(s.value)-C(re),X=C(de)-C(i.value);Math.max(De,X)>eh?(s.value=re,i.value=de):(re<=0&&(s.value=re),de>=t.value.length&&(i.value=de))}a.value=C(s.value),o.value=C(t.value.length)-C(i.value)}function D(z){const K=C(z);!l.value||z&&!K?w=z:l.value.scrollTop=K}const W=A(()=>t.value.slice(s.value,i.value).map((z,K)=>{const H=K+s.value;return{raw:z,index:H,key:sn(z,e.itemKey,H)}}));return _e(t,()=>{g=Array.from({length:t.value.length}),b=Array.from({length:t.value.length}),T.immediate(),M()},{deep:1}),{calculateVisibleItems:M,containerRef:l,markerRef:c,computedItems:W,paddingTop:a,paddingBottom:o,scrollToIndex:D,handleScroll:V,handleScrollend:F,handleItemResize:x}}function mY(e,t){let n=e.length-1,r=0,s=0,i=null,a=-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)a=s,r=s+1;else return i===t?s:r;return a}const hY=oe({items:{type:Array,default:()=>[]},renderless:Boolean,...fY(),...Ue(),...Vn()},"VVirtualScroll"),gY=be()({name:"VVirtualScroll",props:hY(),setup(e,t){let{slots:n}=t;const r=tn("VVirtualScroll"),{dimensionStyles:s}=Bn(e),{calculateVisibleItems:i,containerRef:a,markerRef:o,handleScroll:l,handleScrollend:c,handleItemResize:u,scrollToIndex:d,paddingTop:p,paddingBottom:m,computedItems:v}=pY(e,ee(()=>e.items));return hr(()=>e.renderless,()=>{function g(){const y=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)?"addEventListener":"removeEventListener";a.value===document.documentElement?(document[y]("scroll",l,{passive:!0}),document[y]("scrollend",c)):(a.value?.[y]("scroll",l,{passive:!0}),a.value?.[y]("scrollend",c))}ot(()=>{a.value=xy(r.vnode.el,!0),g(!0)}),Xt(g)}),Ie(()=>{const g=v.value.map(b=>f(uY,{key:b.key,renderless:e.renderless,"onUpdate:height":y=>u(b.index,y)},{default:y=>n.default?.({item:b.raw,index:b.index,...y})}));return e.renderless?S(ke,null,[S("div",{ref:o,class:"v-virtual-scroll__spacer",style:{paddingTop:Oe(p.value)}},null),g,S("div",{class:"v-virtual-scroll__spacer",style:{paddingBottom:Oe(m.value)}},null)]):S("div",{ref:a,class:Se(["v-virtual-scroll",e.class]),onScrollPassive:l,onScrollend:c,style:Le([s.value,e.style])},[S("div",{ref:o,class:"v-virtual-scroll__container",style:{paddingTop:Oe(p.value),paddingBottom:Oe(m.value)}},[g])])}),{calculateVisibleItems:i,scrollToIndex:d}}});function vY(e,t){const n=Ee(!1);let r;function s(o){cancelAnimationFrame(r),n.value=!0,r=requestAnimationFrame(()=>{r=requestAnimationFrame(()=>{n.value=!1})})}async function i(){await new Promise(o=>requestAnimationFrame(o)),await new Promise(o=>requestAnimationFrame(o)),await new Promise(o=>requestAnimationFrame(o)),await new Promise(o=>{if(n.value){const l=_e(n,()=>{l(),o()})}else o()})}async function a(o){if(o.key==="Tab"&&t.value?.focus(),!["PageDown","PageUp","Home","End"].includes(o.key))return;const l=e.value?.$el;if(!l)return;(o.key==="Home"||o.key==="End")&&l.scrollTo({top:o.key==="Home"?0:l.scrollHeight,behavior:"smooth"}),await i();const c=l.querySelectorAll(":scope > :not(.v-virtual-scroll__spacer)");if(o.key==="PageDown"||o.key==="Home"){const u=l.getBoundingClientRect().top;for(const d of c)if(d.getBoundingClientRect().top>=u){d.focus();break}}else{const u=l.getBoundingClientRect().bottom;for(const d of[...c].reverse())if(d.getBoundingClientRect().bottom<=u){d.focus();break}}}return{onScrollPassive:s,onKeydown:a}}const yY=oe({closeText:{type:String,default:"$vuetify.close"},openText:{type:String,default:"$vuetify.open"}},"autocomplete");function bY(e,t){const n=Sr(),r=A(()=>`menu-${n}`),s=ee(()=>Rt(t)),i=ee(()=>r.value);return{menuId:r,ariaExpanded:s,ariaControls:i}}const SY=oe({chips:Boolean,closableChips:Boolean,eager:Boolean,hideNoData:Boolean,hideSelected:Boolean,listProps:{type:Object},menu:Boolean,menuIcon:{type:Fe,default:"$dropdown"},menuProps:{type:Object},multiple:Boolean,noDataText:{type:String,default:"$vuetify.noDataText"},openOnClear:Boolean,itemColor:String,noAutoScroll:Boolean,...yY(),...RP({itemChildren:!1})},"Select"),wY=oe({...SY(),...Qt(YP({modelValue:null,role:"combobox"}),["validationValue","dirty"]),...kl({transition:{component:Ry}})},"VSelect"),Ai=be()({name:"VSelect",props:wY(),emits:{"update:focused":e=>!0,"update:modelValue":e=>!0,"update:menu":e=>!0},setup(e,t){let{slots:n}=t;const{t:r}=kr(),s=q(),i=q(),a=q(),{items:o,transformIn:l,transformOut:c}=Bq(e),u=tt(e,"modelValue",[],de=>l(de===null?[null]:gn(de)),de=>{const De=c(de);return e.multiple?De:De[0]??null}),d=A(()=>typeof e.counterValue=="function"?e.counterValue(u.value):typeof e.counterValue=="number"?e.counterValue:u.value.length),p=WP(e),m=qb(e),v=A(()=>u.value.map(de=>de.value)),g=Ee(!1),b=ee(()=>e.closableChips&&!p.isReadonly.value&&!p.isDisabled.value),{InputIcon:y}=Hb(e);let w="",_=0,T;const P=A(()=>e.hideSelected?o.value.filter(de=>!u.value.some(De=>(e.valueComparator||mr)(De,de))):o.value),x=A(()=>e.hideNoData&&!P.value.length||p.isReadonly.value||p.isDisabled.value),C=tt(e,"menu"),E=A({get:()=>C.value,set:de=>{C.value&&!de&&i.value?.ΨopenChildren.size||de&&x.value||(C.value=de)}}),{menuId:R,ariaExpanded:I,ariaControls:O}=bY(e,E),L=A(()=>({...e.menuProps,activatorProps:{...e.menuProps?.activatorProps||{},"aria-haspopup":"listbox"}})),V=q(),F=vY(V,s);function B(de){e.openOnClear&&(E.value=!0)}function M(){x.value||(E.value=!E.value)}function N(de){F0(de)&&D(de)}function D(de){if(!de.key||p.isReadonly.value)return;if(["Enter"," ","ArrowDown","ArrowUp","Home","End"].includes(de.key)&&de.preventDefault(),["Enter","ArrowDown"," "].includes(de.key)&&(E.value=!0),["Escape","Tab"].includes(de.key)&&(E.value=!1),e.clearable&&de.key==="Backspace"){de.preventDefault(),u.value=[],B();return}de.key==="Home"?V.value?.focus("first"):de.key==="End"&&V.value?.focus("last");const De=1e3;if(!F0(de))return;const X=performance.now();X-T>De&&(w="",_=0),w+=de.key.toLowerCase(),T=X;const ie=P.value;function ne(){let Z=ve();return Z||w.at(-1)===w.at(-2)&&(w=w.slice(0,-1),_++,Z=ve(),Z)||(_=0,Z=ve(),Z)?Z:(w=de.key.toLowerCase(),ve())}function ve(){for(let Z=_;Z<ie.length;Z++){const fe=ie[Z];if(fe.title.toLowerCase().startsWith(w))return[fe,Z]}}const Ne=ne();if(!Ne)return;const[U,G]=Ne;_=G,V.value?.focus(G),e.multiple||(u.value=[U])}function W(de){let De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!de.props.disabled)if(e.multiple){const X=u.value.findIndex(ne=>(e.valueComparator||mr)(ne.value,de.value)),ie=De??!~X;if(~X){const ne=ie?[...u.value,de]:[...u.value];ne.splice(X,1),u.value=ne}else ie&&(u.value=[...u.value,de])}else{const X=De!==!1;u.value=X?[de]:[],ut(()=>{E.value=!1})}}function z(de){V.value?.$el.contains(de.relatedTarget)||(E.value=!1)}function K(){e.eager&&a.value?.calculateVisibleItems()}function H(){g.value&&s.value?.focus()}function re(de){g.value=!0}function ae(de){if(de==null)u.value=[];else if(ef(s.value,":autofill")||ef(s.value,":-webkit-autofill")){const De=o.value.find(X=>X.title===de);De&&W(De)}else s.value&&(s.value.value="")}return _e(E,()=>{if(!e.hideSelected&&E.value&&u.value.length){const de=P.value.findIndex(De=>u.value.some(X=>(e.valueComparator||mr)(X.value,De.value)));Ct&&!e.noAutoScroll&&window.requestAnimationFrame(()=>{de>=0&&a.value?.scrollToIndex(de)})}}),_e(o,(de,De)=>{E.value||g.value&&e.hideNoData&&!De.length&&de.length&&(E.value=!0)}),Ie(()=>{const de=!!(e.chips||n.chip),De=!!(!e.hideNoData||P.value.length||n["prepend-item"]||n["append-item"]||n["no-data"]),X=u.value.length>0,ie=Qe.filterProps(e),ne=X||!g.value&&e.label&&!e.persistentPlaceholder?void 0:e.placeholder;return f(Qe,ce({ref:s},ie,{modelValue:u.value.map(ve=>ve.props.title).join(", "),name:void 0,"onUpdate:modelValue":ae,focused:g.value,"onUpdate:focused":ve=>g.value=ve,validationValue:u.externalValue,counterValue:d.value,dirty:X,class:["v-select",{"v-select--active-menu":E.value,"v-select--chips":!!e.chips,[`v-select--${e.multiple?"multiple":"single"}`]:!0,"v-select--selected":u.value.length,"v-select--selection-slot":!!n.selection},e.class],style:e.style,inputmode:"none",placeholder:ne,"onClick:clear":B,"onMousedown:control":M,onBlur:z,onKeydown:D,"aria-expanded":I.value,"aria-controls":O.value}),{...n,default:ve=>{let{id:Ne}=ve;return S(ke,null,[S("select",{hidden:!0,multiple:e.multiple,name:m.fieldName.value},[o.value.map(U=>S("option",{key:U.value,value:U.value,selected:v.value.includes(U.value)},null))]),f(da,ce({id:R.value,ref:i,modelValue:E.value,"onUpdate:modelValue":U=>E.value=U,activator:"parent",contentClass:"v-select__content",disabled:x.value,eager:e.eager,maxHeight:310,openOnClick:!1,closeOnContentClick:!1,transition:e.transition,onAfterEnter:K,onAfterLeave:H},L.value),{default:()=>[De&&f(_s,ce({ref:V,selected:v.value,selectStrategy:e.multiple?"independent":"single-independent",onMousedown:U=>U.preventDefault(),onKeydown:N,onFocusin:re,tabindex:"-1",selectable:!0,"aria-live":"polite","aria-labelledby":`${Ne.value}-label`,"aria-multiselectable":e.multiple,color:e.itemColor??e.color},F,e.listProps),{default:()=>[n["prepend-item"]?.(),!P.value.length&&!e.hideNoData&&(n["no-data"]?.()??f(yt,{key:"no-data",title:r(e.noDataText)},null)),f(gY,{ref:a,renderless:!0,items:P.value,itemKey:"value"},{default:U=>{let{item:G,index:Z,itemRef:fe}=U;const ge=y$(G.props),me=ce(G.props,{ref:fe,key:G.value,onClick:()=>W(G,null),"aria-posinset":Z+1,"aria-setsize":P.value.length});return G.type==="divider"?n.divider?.({props:G.raw,index:Z})??f(pt,ce(G.props,{key:`divider-${Z}`}),null):G.type==="subheader"?n.subheader?.({props:G.raw,index:Z})??f($c,ce(G.props,{key:`subheader-${Z}`}),null):n.item?.({item:G,index:Z,props:me})??f(yt,ce(me,{role:"option"}),{prepend:we=>{let{isSelected:Ce}=we;return S(ke,null,[e.multiple&&!e.hideSelected?f(ra,{key:G.value,modelValue:Ce,ripple:!1,tabindex:"-1","aria-hidden":!0,onClick:he=>he.preventDefault()},null):void 0,ge.prependAvatar&&f(Sn,{image:ge.prependAvatar},null),ge.prependIcon&&f(j,{icon:ge.prependIcon},null)])}})}}),n["append-item"]?.()]})]}),u.value.map((U,G)=>{function Z(we){we.stopPropagation(),we.preventDefault(),W(U,!1)}const fe=ce(qe.filterProps(U.props),{"onClick:close":Z,onKeydown(we){we.key!=="Enter"&&we.key!==" "||(we.preventDefault(),we.stopPropagation(),Z(we))},onMousedown(we){we.preventDefault(),we.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0}),ge=de?!!n.chip:!!n.selection,me=ge?lC(de?n.chip({item:U,index:G,props:fe}):n.selection({item:U,index:G})):void 0;if(!(ge&&!me))return S("div",{key:U.value,class:"v-select__selection"},[de?n.chip?f(vt,{key:"chip-defaults",defaults:{VChip:{closable:b.value,size:"small",text:U.title}}},{default:()=>[me]}):f(qe,ce({key:"chip",closable:b.value,size:"small",text:U.title,disabled:U.props.disabled},fe),null):me??S("span",{class:"v-select__selection-text"},[U.title,e.multiple&&G<u.value.length-1&&S("span",{class:"v-select__selection-comma"},[k(",")])])])})])},"append-inner":function(){for(var ve=arguments.length,Ne=new Array(ve),U=0;U<ve;U++)Ne[U]=arguments[U];return S(ke,null,[n["append-inner"]?.(...Ne),e.menuIcon?f(j,{class:"v-select__menu-icon",color:s.value?.fieldIconColor,icon:e.menuIcon,"aria-hidden":!0},null):void 0,e.appendInnerIcon&&f(y,{key:"append-icon",name:"appendInner",color:Ne[0].iconColor.value},null)])}})}),Vr({isFocused:g,menu:E,select:W},s)}}),_Y={class:"text-h5"},kY=Ae({__name:"PrinterMaintenanceDialog",setup(e){const t=q([]),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=q({}),s=At(),i=jt(Ht.PrinterMaintenanceDialog),a=A(()=>s.maintenanceDialogPrinter),o=()=>{r.value.disabledReason=t.value.join(", ")},l=async()=>{const u=a.value?.id;if(!u){r.value={},c();return}const d=r.value.disabledReason;await It.updatePrinterMaintenance(u,d),r.value={},c()},c=()=>{t.value=[],i.closeDialog(),s.setMaintenanceDialogPrinter()};return(u,d)=>{const p=qs;return $(),J(p,{id:Q(i).dialogId,"max-width":"700px",onEscape:d[5]||(d[5]=m=>c())},{default:h(()=>[f($e,{class:"pa-4"},{default:h(()=>[f(Lt,null,{default:h(()=>[S("span",_Y," Mark '"+Y(a.value?.name)+"' for maintenance ",1)]),_:1}),f(Et,{color:"secondary"},{default:h(()=>[...d[6]||(d[6]=[k(" Keep this info clear and stick to convention ",-1)])]),_:1}),f(Xe,null,{default:h(()=>[f(it,null,{default:h(()=>[f(Be,{cols:"12"},{default:h(()=>[f(Ai,{modelValue:t.value,"onUpdate:modelValue":[d[0]||(d[0]=m=>t.value=m),d[1]||(d[1]=m=>o())],chips:!0,items:n,"menu-props":{closeOnBack:!0,closeOnContentClick:!0},clearable:"",color:"primary",multiple:"",placeholder:"Quick select reason"},null,8,["modelValue"]),f(PA,{modelValue:r.value.disabledReason,"onUpdate:modelValue":d[2]||(d[2]=m=>r.value.disabledReason=m),"data-vv-validate-on":"change|blur"},{label:h(()=>[...d[7]||(d[7]=[S("div",null,"Type the reason*",-1)])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),f(dn,null,{default:h(()=>[d[10]||(d[10]=S("em",{class:"text-red"}," * indicates required field ",-1)),f(Ft),f(te,{variant:"text",onClick:d[3]||(d[3]=m=>c())},{default:h(()=>[...d[8]||(d[8]=[k(" Close ",-1)])]),_:1}),f(te,{color:"blue-darken-1",variant:"text",onClick:d[4]||(d[4]=m=>l())},{default:h(()=>[...d[9]||(d[9]=[k(" Save ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}});class qr extends Cr{static async createUser(t){const n=ue.userRoute;return await this.post(n,t)}static async listUsers(){const t=ue.userRoute;return await this.get(t)}static async listRoles(){const t=ue.rolesRoute;return await this.get(t)}static async getProfile(){const t=ue.userProfileRoute;return await this.get(t)}static async changePassword(t,n,r){const s=ue.userChangePasswordRoute(t);return await this.post(s,{oldPassword:n,newPassword:r})}static async changeUsername(t,n){const r=ue.userChangeUsernameRoute(t);return await this.post(r,{username:n})}static async deleteUser(t){const n=ue.userDeleteRoute(t);return await this.delete(n)}static async setUserVerified(t,n){const r=ue.userSetVerifiedRoute(t);return await this.post(r,{isVerified:n})}static async setRootUser(t,n){const r=ue.userSetRootUserRoute(t);return await this.post(r,{isRootUser:n})}static async setUserRoles(t,n){const r=ue.userSetUserRolesRoute(t);return await this.post(r,{roles:n})}}const xY=oe({id:String,interactive:Boolean,text:String,...Qt(vc({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","retainFocus","captureFocus","disableInitialFocus"])},"VTooltip"),Kt=be()({name:"VTooltip",props:xY(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=tt(e,"modelValue"),{scopeId:s}=uo(),i=Sr(),a=ee(()=>e.id||`v-tooltip-${i}`),o=q(),l=A(()=>e.location.split(" ").length>1?e.location:e.location+" center"),c=A(()=>e.origin==="auto"||e.origin==="overlap"||e.origin.split(" ").length>1||e.location.split(" ").length>1?e.origin:e.origin+" center"),u=ee(()=>e.transition!=null?e.transition:r.value?"scale-transition":"fade-transition"),d=A(()=>ce({"aria-describedby":a.value},e.activatorProps));return Ie(()=>{const p=bi.filterProps(e);return f(bi,ce({ref:o,class:["v-tooltip",{"v-tooltip--interactive":e.interactive},e.class],style:e.style,id:a.value},p,{modelValue:r.value,"onUpdate:modelValue":m=>r.value=m,transition:u.value,absolute:!0,location:l.value,origin:c.value,role:"tooltip",activatorProps:d.value,_disableGlobalStack:!0},s),{activator:n.activator,default:function(){for(var m=arguments.length,v=new Array(m),g=0;g<m;g++)v[g]=arguments[g];return n.default?.(...v)??e.text}})}),Vr({},o)}}),EY={class:"text-h5"},CY={class:"pl-5"},TY=Ae({__name:"CreateUserDialog",setup(e){const t=jt(Ht.CreateUserDialog),n=He("appConstants"),r=bt(),s=q({username:"",password:"",roles:[]}),i=q(""),a=q([]);function o(){}async function l(){try{a.value=await qr.listRoles()}catch(v){r.openErrorMessage({title:"Failed to load roles",subtitle:v instanceof Error?v.message:"Unknown error"})}}const c=A(()=>s.value?.username?.length?Op(s.value.username):"??"),u={required:v=>!!v||"Required field",minLength:v=>v.length>=n.minUsernameLength||`Minimum ${n.minUsernameLength} characters`,password:v=>v.length>=8?!0:"Password must be at least 8 characters",passwordMatch:v=>v===s.value.password||"Passwords must match"},d=()=>!s.value.username||s.value.username.length<n.minUsernameLength?(r.openErrorMessage({title:"Invalid username"}),!1):!s.value.password||u.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.roles.length?!0:(r.openErrorMessage({title:"Please select a role"}),!1),p=async()=>{if(d())try{await qr.createUser(s.value),r.openInfoMessage({title:`User ${s.value.username} created successfully`}),m()}catch(v){r.openErrorMessage({title:"Failed to create user",subtitle:v instanceof Error?v.message:"Unknown error"})}},m=()=>{s.value={username:"",password:"",roles:[]},i.value="",t.closeDialog()};return(v,g)=>{const b=qs;return $(),J(b,{id:Q(t).dialogId,"max-width":"700px",onBeforeOpened:g[4]||(g[4]=y=>void 0),onEscape:g[5]||(g[5]=y=>m()),onOpened:g[6]||(g[6]=y=>l())},{default:h(()=>[f($e,{class:"pa-4"},{default:h(()=>[f(Lt,null,{default:h(()=>[S("span",EY,[f(Sn,{color:"primary",size:"56"},{default:h(()=>[k(Y(c.value),1)]),_:1}),S("span",CY,[g[9]||(g[9]=k("New verified User ",-1)),f(Kt,{top:""},{activator:h(({props:y})=>[f(te,ce({class:"ma-2",fab:""},y,{"x-small":""}),{default:h(()=>[f(j,null,{default:h(()=>[...g[7]||(g[7]=[k("question_mark",-1)])]),_:1})]),_:1},16)]),default:h(()=>[...g[8]||(g[8]=[k(" The user will be set to verified and assigned roles. Please share the username and password with them manually. ",-1)])]),_:1})])])]),_:1}),f(Xe,null,{default:h(()=>[f(it,null,{default:h(()=>[f(Be,{cols:12},{default:h(()=>[f(Br,null,{default:h(()=>[f(it,null,{default:h(()=>[f(Be,{cols:"12",md:"6"},{default:h(()=>[f(Qe,{modelValue:s.value.username,"onUpdate:modelValue":g[0]||(g[0]=y=>s.value.username=y),rules:[u.required,u.minLength],autofocus:"",label:"Username*","prepend-icon":"person",required:""},null,8,["modelValue","rules"]),f(Qe,{modelValue:s.value.password,"onUpdate:modelValue":g[1]||(g[1]=y=>s.value.password=y),rules:[u.required,u.password],label:"Password*","prepend-icon":"lock",required:"",type:"password"},null,8,["modelValue","rules"]),f(Qe,{modelValue:i.value,"onUpdate:modelValue":g[2]||(g[2]=y=>i.value=y),rules:[u.required,u.passwordMatch],label:"Confirm Password*","prepend-icon":"lock",required:"",type:"password"},null,8,["modelValue","rules"]),f(Ai,{modelValue:s.value.roles,"onUpdate:modelValue":g[3]||(g[3]=y=>s.value.roles=y),items:a.value.map(y=>({text:y.name,value:y.name})),rules:[u.required],label:"Roles*",multiple:"","prepend-icon":"shield",required:""},null,8,["modelValue","items","rules"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),f(dn,null,{default:h(()=>[g[12]||(g[12]=S("em",{class:"text-red"}," * indicates required field ",-1)),f(Ft),f(te,{variant:"text",onClick:m},{default:h(()=>[...g[10]||(g[10]=[k("Close",-1)])]),_:1}),f(te,{color:"blue-darken-1",variant:"text",onClick:p},{default:h(()=>[...g[11]||(g[11]=[k("Create",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),AA=()=>({id:void 0,name:$l(),floor:"1",printers:[]});class ls extends Cr{static convertPrinterFloorToCreateForm(t){const n=AA();return n.id=t?.id,n.name=t?.name||$l(),n.printers=[],n.floor=(t?.floor||1).toString(),n}static convertCreateFormToFloor(t){const n={...t};if(n.floor=Number.parseInt(n.floor),Number.isNaN(n.floor))throw new TypeError("Floor number did not convert to number.");return n}static async getFloors(){const t=`${ue.floorRoute}/`;return await this.get(t)}static async createFloor(t){const n=`${ue.floorRoute}/`;return await this.post(n,t)}static async updateFloorName(t,n){const r=`${ue.updatePrinterFloorNameRoute(t)}/`;return await this.patch(r,{name:n})}static async updateFloorNumber(t,n){const r=`${ue.updatePrinterFloorNumberRoute(t)}/`;return await this.patch(r,{floor:n})}static async deleteFloor(t){const n=`${ue.getFloorRoute(t)}/`;return await this.delete(n)}static async addPrinterToFloor(t,n){const r=`${ue.addOrRemovePrinterFromFloorRoute(t)}/`;return await this.post(r,n)}static async deletePrinterFromFloor(t,n){const r=`${ue.addOrRemovePrinterFromFloorRoute(t)}/`;return await this.delete(r,{printerId:n})}}const ns=wr("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 At().printers.filter(n=>!e.floors.find(r=>r.printers.find(s=>s.printerId===n.id)))},gridSortedPrinters(){const e=ws(),t=e.gridCols,n=e.gridRows,s=At().printers;if(!s.length)return[];if(!this.selectedFloor)return[];const i=this.selectedFloor.printers,a=[];for(let o=0;o<t;o++){const l=[];a.push(l);for(let c=0;c<n;c++){const u=i.find(d=>d.x===o&&d.y===c);if(!u)l.push(void 0);else{const d=s.find(p=>p.id===u.printerId);l.push(d)}}}return a}},actions:{async loadFloors(){const e=await ls.getFloors();return this.saveFloors(e),e},async createFloor(e){const t=await ls.createFloor(e);return this.floors.push(t),t},saveFloors(e){if(!e?.length)return;this.floors=e.sort((r,s)=>r.floor-s.floor);const t=this.selectedFloor?.id,n=this.floors.findIndex(r=>r.id===t);this.selectedFloorIndex=n===-1?0:n},async deleteFloor(e){await ls.deleteFloor(e),this._popPrinterFloor(e)},async updateFloorName({floorId:e,name:t}){const n=await ls.updateFloorName(e,t);return this._replaceFloor(n),n},async updateFloorNumber({floorId:e,floorNumber:t}){const n=await ls.updateFloorNumber(e,t);return this._replaceFloor(n),n},async addPrinterToFloor({floorId:e,printerId:t,x:n,y:r}){const s=await ls.addPrinterToFloor(e,{printerId:t,x:n,y:r});this._replaceFloor(s)},async changeSelectedFloorByIndex(e){if(!this.floors?.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 ls.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)}}}),IY={class:"text-h5"},RY=Ae({__name:"AddOrUpdateFloorDialog",setup(e){const t=jt(Ht.AddOrUpdateFloorDialog),n=ns(),r=He("appConstants"),s=bt(),i=q(AA()),a=A(()=>t.context()?.printerFloorId),o=A(()=>i.value?Op(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),c=async()=>{if(!l())return;const p=ls.convertCreateFormToFloor(i.value);await n.createFloor(p),s.openInfoMessage({title:`Floor ${p.name} created`}),i.value.name=$l();const m=Math.max(...n.floors.map(v=>v.floor))+1;i.value.floor=m.toString(),u()},u=()=>{t.closeDialog()},d=()=>{if(a.value){const p=n.floor(a.value);i.value=ls.convertPrinterFloorToCreateForm(p)}else if(n.floors?.length){const p=Math.max(...n.floors.map(m=>m.floor))+1;i.value.floor=p.toString()}};return(p,m)=>{const v=qs;return $(),J(v,{id:Q(t).dialogId,"max-width":"700px",onEscape:u,onOpened:d},{default:h(()=>[f($e,null,{default:h(()=>[f(Lt,null,{default:h(()=>[S("span",IY,[f(Sn,{color:"primary",size:"56"},{default:h(()=>[k(Y(o.value),1)]),_:1}),m[2]||(m[2]=k(" New Floor ",-1))])]),_:1}),f(Xe,null,{default:h(()=>[f(it,null,{default:h(()=>[f(Be,{cols:12},{default:h(()=>[f(Br,null,{default:h(()=>[f(it,null,{default:h(()=>[i.value?($(),J(Be,{key:0,cols:"12",md:"6"},{default:h(()=>[f(Qe,{modelValue:i.value.name,"onUpdate:modelValue":m[0]||(m[0]=g=>i.value.name=g),autofocus:"",label:"Floor name*",required:""},null,8,["modelValue"]),f(Qe,{modelValue:i.value.floor,"onUpdate:modelValue":m[1]||(m[1]=g=>i.value.floor=g),label:"Floor number",required:"",type:"number"},null,8,["modelValue"])]),_:1})):se("",!0)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),f(dn,null,{default:h(()=>[m[5]||(m[5]=S("em",{class:"text-red"}," * indicates required field ",-1)),f(Ft),f(te,{variant:"text",onClick:u},{default:h(()=>[...m[3]||(m[3]=[k("Close",-1)])]),_:1}),f(te,{color:"blue-darken-1",variant:"text",onClick:c},{default:h(()=>[...m[4]||(m[4]=[k("Create",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}});class ic extends Cr{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}`)}}const PY=Object.freeze(Object.defineProperty({__proto__:null,CameraStreamService:ic},Symbol.toStringTag,{value:"Module"}));var Ml=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(){}},AY={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},OY=class{#e=AY;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},Ia=new OY;function DY(e){setTimeout(e,0)}var to=typeof window>"u"||"Deno"in globalThis;function Hr(){}function LY(e,t){return typeof e=="function"?e(t):e}function Cv(e){return typeof e=="number"&&e>=0&&e!==1/0}function OA(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ki(e,t){return typeof e=="function"?e(t):e}function Wr(e,t){return typeof e=="function"?e(t):e}function q_(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:a,stale:o}=e;if(a){if(r){if(t.queryHash!==n1(a,t.options))return!1}else if(!ac(t.queryKey,a))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||s&&s!==t.state.fetchStatus||i&&!i(t))}function W_(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(no(t.options.mutationKey)!==no(i))return!1}else if(!ac(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function n1(e,t){return(t?.queryKeyHashFn||no)(e)}function no(e){return JSON.stringify(e,(t,n)=>Tv(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function ac(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>ac(e[n],t[n])):!1}var $Y=Object.prototype.hasOwnProperty;function DA(e,t){if(e===t)return e;const n=G_(e)&&G_(t);if(!n&&!(Tv(e)&&Tv(t)))return t;const s=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),a=i.length,o=n?new Array(a):{};let l=0;for(let c=0;c<a;c++){const u=n?c:i[c],d=e[u],p=t[u];if(d===p){o[u]=d,(n?c<s:$Y.call(e,u))&&l++;continue}if(d===null||p===null||typeof d!="object"||typeof p!="object"){o[u]=p;continue}const m=DA(d,p);o[u]=m,m===d&&l++}return s===a&&l===s?e:o}function $f(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 G_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Tv(e){if(!K_(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!K_(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function K_(e){return Object.prototype.toString.call(e)==="[object Object]"}function FY(e){return new Promise(t=>{Ia.setTimeout(t,e)})}function Iv(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?DA(e,t):t}function NY(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function MY(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var r1=Symbol();function LA(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===r1?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Rv(e,t){return typeof e=="function"?e(...t):!!e}function VY(e,t,n){let r=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??=t(),r||(r=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),e}var BY=class extends Ml{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!to&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},s1=new BY;function Pv(){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}var UY=DY;function zY(){let e=[],t=0,n=o=>{o()},r=o=>{o()},s=UY;const i=o=>{t?e.push(o):s(()=>{n(o)})},a=()=>{const o=e;e=[],o.length&&s(()=>{r(()=>{o.forEach(l=>{n(l)})})})};return{batch:o=>{let l;t++;try{l=o()}finally{t--,t||a()}return l},batchCalls:o=>(...l)=>{i(()=>{o(...l)})},schedule:i,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{s=o}}}var On=zY(),jY=class extends Ml{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!to&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},Ff=new jY;function HY(e){return Math.min(1e3*2**e,3e4)}function $A(e){return(e??"online")==="online"?Ff.isOnline():!0}var Av=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function FA(e){let t=!1,n=0,r;const s=Pv(),i=()=>s.status!=="pending",a=g=>{if(!i()){const b=new Av(g);p(b),e.onCancel?.(b)}},o=()=>{t=!0},l=()=>{t=!1},c=()=>s1.isFocused()&&(e.networkMode==="always"||Ff.isOnline())&&e.canRun(),u=()=>$A(e.networkMode)&&e.canRun(),d=g=>{i()||(r?.(),s.resolve(g))},p=g=>{i()||(r?.(),s.reject(g))},m=()=>new Promise(g=>{r=b=>{(i()||c())&&g(b)},e.onPause?.()}).then(()=>{r=void 0,i()||e.onContinue?.()}),v=()=>{if(i())return;let g;const b=n===0?e.initialPromise:void 0;try{g=b??e.fn()}catch(y){g=Promise.reject(y)}Promise.resolve(g).then(d).catch(y=>{if(i())return;const w=e.retry??(to?0:3),_=e.retryDelay??HY,T=typeof _=="function"?_(n,y):_,P=w===!0||typeof w=="number"&&n<w||typeof w=="function"&&w(n,y);if(t||!P){p(y);return}n++,e.onFail?.(n,y),FY(T).then(()=>c()?void 0:m()).then(()=>{t?p(y):v()})})};return{promise:s,status:()=>s.status,cancel:a,continue:()=>(r?.(),s),cancelRetry:o,continueRetry:l,canStart:u,start:()=>(u()?v():m().then(v),s)}}var NA=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Cv(this.gcTime)&&(this.#e=Ia.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(to?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Ia.clearTimeout(this.#e),this.#e=void 0)}},qY=class extends NA{#e;#t;#n;#s;#r;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#n=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=J_(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=J_(this.options);t.data!==void 0&&(this.setState(Y_(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=Iv(this.state.data,e,this.options);return this.#i({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Hr).catch(Hr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Wr(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===r1||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Ki(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!OA(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#o?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const o=this.observers.find(l=>l.options.queryFn);o&&this.setOptions(o.options)}const n=new AbortController,r=o=>{Object.defineProperty(o,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},s=()=>{const o=LA(this.options,t),c=(()=>{const u={client:this.#s,queryKey:this.queryKey,meta:this.meta};return r(u),u})();return this.#o=!1,this.options.persister?this.options.persister(o,c,this):o(c)},a=(()=>{const o={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:s};return r(o),o})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#i({type:"fetch",meta:a.fetchOptions?.meta}),this.#r=FA({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:o=>{o instanceof Av&&o.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(o,l)=>{this.#i({type:"failed",failureCount:o,error:l})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{const o=await this.#r.start();if(o===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(o),this.#n.config.onSuccess?.(o,this),this.#n.config.onSettled?.(o,this.state.error,this),o}catch(o){if(o instanceof Av){if(o.silent)return this.#r.promise;if(o.revert){if(this.state.data===void 0)throw o;return this.state.data}}throw this.#i({type:"error",error:o}),this.#n.config.onError?.(o,this),this.#n.config.onSettled?.(this.state.data,o,this),o}finally{this.scheduleGc()}}#i(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...MA(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...Y_(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?r:void 0,r;case"error":const s=e.error;return{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),On.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function MA(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:$A(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Y_(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function J_(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 WY=class extends Ml{constructor(e,t){super(),this.options=t,this.#e=e,this.#i=null,this.#o=Pv(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#s=void 0;#r;#a;#o;#i;#h;#f;#p;#u;#c;#l;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),X_(this.#t,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ov(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ov(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#S(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Wr(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#_(),this.#t.setOptions(this.options),t._defaulted&&!$f(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&Q_(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),r&&(this.#t!==n||Wr(this.options.enabled,this.#t)!==Wr(t.enabled,this.#t)||Ki(this.options.staleTime,this.#t)!==Ki(t.staleTime,this.#t))&&this.#g();const s=this.#v();r&&(this.#t!==n||Wr(this.options.enabled,this.#t)!==Wr(t.enabled,this.#t)||s!==this.#l)&&this.#y(s)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return KY(this,n)&&(this.#s=n,this.#a=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#s}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#d(e){this.#_();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Hr)),t}#g(){this.#S();const e=Ki(this.options.staleTime,this.#t);if(to||this.#s.isStale||!Cv(e))return;const n=OA(this.#s.dataUpdatedAt,e)+1;this.#u=Ia.setTimeout(()=>{this.#s.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#w(),this.#l=e,!(to||Wr(this.options.enabled,this.#t)===!1||!Cv(this.#l)||this.#l===0)&&(this.#c=Ia.setInterval(()=>{(this.options.refetchIntervalInBackground||s1.isFocused())&&this.#d()},this.#l))}#b(){this.#g(),this.#y(this.#v())}#S(){this.#u&&(Ia.clearTimeout(this.#u),this.#u=void 0)}#w(){this.#c&&(Ia.clearInterval(this.#c),this.#c=void 0)}createResult(e,t){const n=this.#t,r=this.options,s=this.#s,i=this.#r,a=this.#a,l=e!==n?e.state:this.#n,{state:c}=e;let u={...c},d=!1,p;if(t._optimisticResults){const E=this.hasListeners(),R=!E&&X_(e,t),I=E&&Q_(e,n,t,r);(R||I)&&(u={...u,...MA(c.data,e.options)}),t._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:m,errorUpdatedAt:v,status:g}=u;p=u.data;let b=!1;if(t.placeholderData!==void 0&&p===void 0&&g==="pending"){let E;s?.isPlaceholderData&&t.placeholderData===a?.placeholderData?(E=s.data,b=!0):E=typeof t.placeholderData=="function"?t.placeholderData(this.#p?.state.data,this.#p):t.placeholderData,E!==void 0&&(g="success",p=Iv(s?.data,E,t),d=!0)}if(t.select&&p!==void 0&&!b)if(s&&p===i?.data&&t.select===this.#h)p=this.#f;else try{this.#h=t.select,p=t.select(p),p=Iv(s?.data,p,t),this.#f=p,this.#i=null}catch(E){this.#i=E}this.#i&&(m=this.#i,p=this.#f,v=Date.now(),g="error");const y=u.fetchStatus==="fetching",w=g==="pending",_=g==="error",T=w&&y,P=p!==void 0,C={status:g,fetchStatus:u.fetchStatus,isPending:w,isSuccess:g==="success",isError:_,isInitialLoading:T,isLoading:T,data:p,dataUpdatedAt:u.dataUpdatedAt,error:m,errorUpdatedAt:v,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>l.dataUpdateCount||u.errorUpdateCount>l.errorUpdateCount,isFetching:y,isRefetching:y&&!w,isLoadingError:_&&!P,isPaused:u.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:_&&P,isStale:i1(e,t),refetch:this.refetch,promise:this.#o,isEnabled:Wr(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const E=O=>{C.status==="error"?O.reject(C.error):C.data!==void 0&&O.resolve(C.data)},R=()=>{const O=this.#o=C.promise=Pv();E(O)},I=this.#o;switch(I.status){case"pending":e.queryHash===n.queryHash&&E(I);break;case"fulfilled":(C.status==="error"||C.data!==I.value)&&R();break;case"rejected":(C.status!=="error"||C.error!==I.reason)&&R();break}}return C}updateResult(){const e=this.#s,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#a=this.options,this.#r.data!==void 0&&(this.#p=this.#t),$f(t,e))return;this.#s=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,s=typeof r=="function"?r():r;if(s==="all"||!s&&!this.#m.size)return!0;const i=new Set(s??this.#m);return this.options.throwOnError&&i.add("error"),Object.keys(this.#s).some(a=>{const o=a;return this.#s[o]!==e[o]&&i.has(o)})};this.#k({listeners:n()})}#_(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#k(e){On.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#s)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function GY(e,t){return Wr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function X_(e,t){return GY(e,t)||e.state.data!==void 0&&Ov(e,t,t.refetchOnMount)}function Ov(e,t,n){if(Wr(t.enabled,e)!==!1&&Ki(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&i1(e,t)}return!1}function Q_(e,t,n,r){return(e!==t||Wr(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&i1(e,n)}function i1(e,t){return Wr(t.enabled,e)!==!1&&e.isStaleByTime(Ki(t.staleTime,e))}function KY(e,t){return!$f(e.getCurrentResult(),t)}function Z_(e){return{onFetch:(t,n)=>{const r=t.options,s=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],a=t.state.data?.pageParams||[];let o={pages:[],pageParams:[]},l=0;const c=async()=>{let u=!1;const d=v=>{VY(v,()=>t.signal,()=>u=!0)},p=LA(t.options,t.fetchOptions),m=async(v,g,b)=>{if(u)return Promise.reject();if(g==null&&v.pages.length)return Promise.resolve(v);const w=(()=>{const x={client:t.client,queryKey:t.queryKey,pageParam:g,direction:b?"backward":"forward",meta:t.options.meta};return d(x),x})(),_=await p(w),{maxPages:T}=t.options,P=b?MY:NY;return{pages:P(v.pages,_,T),pageParams:P(v.pageParams,g,T)}};if(s&&i.length){const v=s==="backward",g=v?YY:ek,b={pages:i,pageParams:a},y=g(r,b);o=await m(b,y,v)}else{const v=e??i.length;do{const g=l===0?a[0]??r.initialPageParam:ek(r,o);if(l>0&&g==null)break;o=await m(o,g),l++}while(l<v)}return o};t.options.persister?t.fetchFn=()=>t.options.persister?.(c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=c}}}function ek(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 YY(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var JY=class extends NA{#e;#t;#n;#s;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||VA(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=FA({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(i,a)=>{this.#r({type:"failed",failureCount:i,error:a})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",s=!this.#s.canStart();try{if(r)t();else{this.#r({type:"pending",variables:e,isPaused:s}),await this.#n.config.onMutate?.(e,this,n);const a=await this.options.onMutate?.(e,n);a!==this.state.context&&this.#r({type:"pending",context:a,variables:e,isPaused:s})}const i=await this.#s.start();return await this.#n.config.onSuccess?.(i,e,this.state.context,this,n),await this.options.onSuccess?.(i,e,this.state.context,n),await this.#n.config.onSettled?.(i,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(i,null,e,this.state.context,n),this.#r({type:"success",data:i}),i}catch(i){try{await this.#n.config.onError?.(i,e,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onError?.(i,e,this.state.context,n)}catch(a){Promise.reject(a)}try{await this.#n.config.onSettled?.(void 0,i,this.state.variables,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onSettled?.(void 0,i,e,this.state.context,n)}catch(a){Promise.reject(a)}throw this.#r({type:"error",error:i}),i}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),On.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function VA(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var BA=class extends Ml{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(t,n,r){const s=new JY({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){this.#e.add(t);const n=ud(t);if(typeof n=="string"){const r=this.#t.get(n);r?r.push(t):this.#t.set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const n=ud(t);if(typeof n=="string"){const r=this.#t.get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&this.#t.delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=ud(t);if(typeof n=="string"){const s=this.#t.get(n)?.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){const n=ud(t);return typeof n=="string"?this.#t.get(n)?.find(s=>s!==t&&s.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){On.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){const n={exact:!0,...t};return this.getAll().find(r=>W_(n,r))}findAll(t={}){return this.getAll().filter(n=>W_(t,n))}notify(t){On.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return On.batch(()=>Promise.all(t.map(n=>n.continue().catch(Hr))))}};function ud(e){return e.options.scope?.id}var XY=class extends Ml{#e;#t=void 0;#n;#s;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),$f(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&no(n.mutationKey)!==no(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#a(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#a()}mutate(t,n){return this.#s=n,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#r(){const t=this.#n?.state??VA();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#a(t){On.batch(()=>{if(this.#s&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context,s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#s.onSuccess?.(t.data,n,r,s)}catch(i){Promise.reject(i)}try{this.#s.onSettled?.(t.data,null,n,r,s)}catch(i){Promise.reject(i)}}else if(t?.type==="error"){try{this.#s.onError?.(t.error,n,r,s)}catch(i){Promise.reject(i)}try{this.#s.onSettled?.(void 0,t.error,n,r,s)}catch(i){Promise.reject(i)}}}this.listeners.forEach(n=>{n(this.#t)})})}},UA=class extends Ml{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,n,r){const s=n.queryKey,i=n.queryHash??n1(s,n);let a=this.get(i);return a||(a=new qY({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(a)),a}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=this.#e.get(t.queryHash);n&&(t.destroy(),n===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){On.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>q_(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>q_(t,r)):n}notify(t){On.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){On.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){On.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},QY=class{#e;#t;#n;#s;#r;#a;#o;#i;constructor(t={}){this.#e=t.queryCache||new UA,this.#t=t.mutationCache||new BA,this.#n=t.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=s1.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=Ff.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#i?.(),this.#i=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){const n=this.defaultQueryOptions({queryKey:t});return this.#e.get(n.queryHash)?.state.data}ensureQueryData(t){const n=this.defaultQueryOptions(t),r=this.#e.build(this,n),s=r.state.data;return s===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(Ki(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(s))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:n,state:r})=>{const s=r.data;return[n,s]})}setQueryData(t,n,r){const s=this.defaultQueryOptions({queryKey:t}),a=this.#e.get(s.queryHash)?.state.data,o=LY(n,a);if(o!==void 0)return this.#e.build(this,s).setData(o,{...r,manual:!0})}setQueriesData(t,n,r){return On.batch(()=>this.#e.findAll(t).map(({queryKey:s})=>[s,this.setQueryData(s,n,r)]))}getQueryState(t){const n=this.defaultQueryOptions({queryKey:t});return this.#e.get(n.queryHash)?.state}removeQueries(t){const n=this.#e;On.batch(()=>{n.findAll(t).forEach(r=>{n.remove(r)})})}resetQueries(t,n){const r=this.#e;return On.batch(()=>(r.findAll(t).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...t},n)))}cancelQueries(t,n={}){const r={revert:!0,...n},s=On.batch(()=>this.#e.findAll(t).map(i=>i.cancel(r)));return Promise.all(s).then(Hr).catch(Hr)}invalidateQueries(t,n={}){return On.batch(()=>(this.#e.findAll(t).forEach(r=>{r.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},n)))}refetchQueries(t,n={}){const r={...n,cancelRefetch:n.cancelRefetch??!0},s=On.batch(()=>this.#e.findAll(t).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(Hr)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(s).then(Hr)}fetchQuery(t){const n=this.defaultQueryOptions(t);n.retry===void 0&&(n.retry=!1);const r=this.#e.build(this,n);return r.isStaleByTime(Ki(n.staleTime,r))?r.fetch(n):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Hr).catch(Hr)}fetchInfiniteQuery(t){return t.behavior=Z_(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Hr).catch(Hr)}ensureInfiniteQueryData(t){return t.behavior=Z_(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Ff.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,n){this.#s.set(no(t),{queryKey:t,defaultOptions:n})}getQueryDefaults(t){const n=[...this.#s.values()],r={};return n.forEach(s=>{ac(t,s.queryKey)&&Object.assign(r,s.defaultOptions)}),r}setMutationDefaults(t,n){this.#r.set(no(t),{mutationKey:t,defaultOptions:n})}getMutationDefaults(t){const n=[...this.#r.values()],r={};return n.forEach(s=>{ac(t,s.mutationKey)&&Object.assign(r,s.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const n={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return n.queryHash||(n.queryHash=n1(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===r1&&(n.enabled=!1),n}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},ZY="VUE_QUERY_CLIENT";function zA(e){const t=e?`:${e}`:"";return`${ZY}${t}`}function Dv(e,t){Object.keys(e).forEach(n=>{e[n]=t[n]})}function Lv(e,t,n="",r=0){if(t){const s=t(e,n,r);if(s===void 0&&nt(e)||s!==void 0)return s}if(Array.isArray(e))return e.map((s,i)=>Lv(s,t,String(i),r+1));if(typeof e=="object"&&tJ(e)){const s=Object.entries(e).map(([i,a])=>[i,Lv(a,t,i,r+1)]);return Object.fromEntries(s)}return e}function eJ(e,t){return Lv(e,t)}function rt(e,t=!1){return eJ(e,(n,r,s)=>{if(s===1&&r==="queryKey")return rt(n,!0);if(t&&nJ(n))return rt(n(),t);if(nt(n))return rt(Q(n),t)})}function tJ(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function nJ(e){return typeof e=="function"}function a1(e=""){if(!iE())throw new Error("vue-query hooks can only be used inside setup() function or functions that support injection context.");const t=zA(e),n=He(t);if(!n)throw new Error("No 'queryClient' found in Vue context, use 'VueQueryPlugin' to properly initialize the library.");return n}var rJ=class extends UA{find(e){return super.find(rt(e))}findAll(e={}){return super.findAll(rt(e))}},sJ=class extends BA{find(e){return super.find(rt(e))}findAll(e={}){return super.findAll(rt(e))}},iJ=class extends QY{constructor(e={}){const t={defaultOptions:e.defaultOptions,queryCache:e.queryCache||new rJ,mutationCache:e.mutationCache||new sJ};super(t),this.isRestoring=q(!1)}isFetching(e={}){return super.isFetching(rt(e))}isMutating(e={}){return super.isMutating(rt(e))}getQueryData(e){return super.getQueryData(rt(e))}ensureQueryData(e){return super.ensureQueryData(rt(e))}getQueriesData(e){return super.getQueriesData(rt(e))}setQueryData(e,t,n={}){return super.setQueryData(rt(e),t,rt(n))}setQueriesData(e,t,n={}){return super.setQueriesData(rt(e),t,rt(n))}getQueryState(e){return super.getQueryState(rt(e))}removeQueries(e={}){return super.removeQueries(rt(e))}resetQueries(e={},t={}){return super.resetQueries(rt(e),rt(t))}cancelQueries(e={},t={}){return super.cancelQueries(rt(e),rt(t))}invalidateQueries(e={},t={}){const n=rt(e),r=rt(t);if(super.invalidateQueries({...n,refetchType:"none"},r),n.refetchType==="none")return Promise.resolve();const s={...n,type:n.refetchType??n.type??"active"};return ut().then(()=>super.refetchQueries(s,r))}refetchQueries(e={},t={}){return super.refetchQueries(rt(e),rt(t))}fetchQuery(e){return super.fetchQuery(rt(e))}prefetchQuery(e){return super.prefetchQuery(rt(e))}fetchInfiniteQuery(e){return super.fetchInfiniteQuery(rt(e))}prefetchInfiniteQuery(e){return super.prefetchInfiniteQuery(rt(e))}setDefaultOptions(e){super.setDefaultOptions(rt(e))}setQueryDefaults(e,t){super.setQueryDefaults(rt(e),rt(t))}getQueryDefaults(e){return super.getQueryDefaults(rt(e))}setMutationDefaults(e,t){super.setMutationDefaults(rt(e),rt(t))}getMutationDefaults(e){return super.getMutationDefaults(rt(e))}},aJ={install:(e,t={})=>{const n=zA(t.queryClientKey);let r;if("queryClient"in t&&t.queryClient)r=t.queryClient;else{const a="queryClientConfig"in t?t.queryClientConfig:void 0;r=new iJ(a)}to||r.mount();let s=()=>{};if(t.clientPersister){r.isRestoring&&(r.isRestoring.value=!0);const[a,o]=t.clientPersister(r);s=a,o.then(()=>{r.isRestoring&&(r.isRestoring.value=!1),t.clientPersisterOnSuccess?.(r)})}const i=()=>{r.unmount(),s()};if(e.onUnmount)e.onUnmount(i);else{const a=e.unmount;e.unmount=function(){i(),a()}}e.provide(n,r)}};function oJ(e,t,n){const r=a1(),s=A(()=>{let m=t;typeof m=="function"&&(m=m());const v=rt(m);typeof v.enabled=="function"&&(v.enabled=v.enabled());const g=r.defaultQueryOptions(v);return g._optimisticResults=r.isRestoring?.value?"isRestoring":"optimistic",g}),i=new e(r,s.value),a=s.value.shallow?Kf(i.getCurrentResult()):Jt(i.getCurrentResult());let o=()=>{};r.isRestoring&&_e(r.isRestoring,m=>{m||(o(),o=i.subscribe(v=>{Dv(a,v)}))},{immediate:!0});const l=()=>{i.setOptions(s.value),Dv(a,i.getCurrentResult())};_e(s,l),Xt(()=>{o()});const c=(...m)=>(l(),a.refetch(...m)),u=()=>new Promise((m,v)=>{let g=()=>{};const b=()=>{if(s.value.enabled!==!1){i.setOptions(s.value);const y=i.getOptimisticResult(s.value);y.isStale?(g(),i.fetchOptimistic(s.value).then(m,w=>{Rv(s.value.throwOnError,[w,i.getCurrentQuery()])?v(w):m(i.getCurrentResult())})):(g(),m(y))}};b(),g=_e(s,b)});_e(()=>a.error,m=>{if(a.isError&&!a.isFetching&&Rv(s.value.throwOnError,[m,i.getCurrentQuery()]))throw m});const d=s.value.shallow?ny(a):gi(a),p=Ii(d);for(const m in a)typeof a[m]=="function"&&(p[m]=a[m]);return p.suspense=u,p.refetch=c,p}function Np(e,t){return oJ(WY,e)}function lJ(e,t){const n=a1(),r=A(()=>{const u=typeof e=="function"?e():e;return n.defaultMutationOptions(rt(u))}),s=new XY(n,r.value),i=r.value.shallow?Kf(s.getCurrentResult()):Jt(s.getCurrentResult()),a=s.subscribe(u=>{Dv(i,u)}),o=(u,d)=>{s.mutate(u,d).catch(()=>{})};_e(r,()=>{s.setOptions(r.value)}),Xt(()=>{a()});const l=r.value.shallow?ny(i):gi(i),c=Ii(l);return _e(()=>i.error,u=>{if(u&&Rv(r.value.throwOnError,[u]))throw u}),{...c,mutate:o,mutateAsync:i.mutate,reset:i.reset}}const uJ=oe({...Ue(),...i7()},"VForm"),Mp=be()({name:"VForm",props:uJ(),emits:{"update:modelValue":e=>!0,submit:e=>!0},setup(e,t){let{slots:n,emit:r}=t;const s=a7(e),i=q();function a(l){l.preventDefault(),s.reset()}function o(l){const c=l,u=s.validate();c.then=u.then.bind(u),c.catch=u.catch.bind(u),c.finally=u.finally.bind(u),r("submit",c),c.defaultPrevented||u.then(d=>{let{valid:p}=d;p&&i.value?.submit()}),c.preventDefault()}return Ie(()=>S("form",{ref:i,class:Se(["v-form",e.class]),style:Le(e.style),novalidate:!0,onReset:a,onSubmit:o},[n.default?.(s)])),Vr(s,i)}}),cJ={class:"text-h6 font-weight-bold"},dJ={class:"text-caption text-medium-emphasis"},fJ={class:"d-flex align-center justify-space-between pa-3 preview-header"},pJ={class:"d-flex align-center"},mJ={class:"camera-preview-container"},hJ=["src"],gJ={key:0,class:"camera-preview-loading"},vJ={key:1,class:"camera-preview-error"},yJ=Ae({__name:"AddOrUpdateCameraStreamDialog",setup(e){const t=a1(),n=jt(Ht.AddOrUpdateCameraDialog),r=At(),s=q(),i=q(!1),a=q(!1),o=q(!0),l=q(0),c=q({name:"",streamURL:"",printerId:void 0}),u={required:x=>!!x||"This field is required",url:x=>{if(!x)return!0;try{return new URL(x),!0}catch{return"Please enter a valid URL"}}},d=A(()=>r.printers.map(x=>({title:x.name,value:x.id}))),p=A(()=>c.value.name?.trim()&&c.value.streamURL?.trim()),m=()=>n.context()?.addOrUpdate==="update",v=A(()=>m());function g(){a.value=!0,o.value=!1}function b(){a.value=!1,o.value=!1}function y(){a.value=!1,o.value=!0,l.value++}_e(()=>n.context(),x=>{if(a.value=!1,o.value=!0,l.value=0,!x||x?.addOrUpdate!=="update"){c.value.streamURL="",c.value.name="",c.value.printerId=void 0;return}const C=t.getQueryData(["cameraStream"])?.find(E=>E.cameraStream.id===x.cameraId);C&&(c.value.name=C.cameraStream.name||"",c.value.streamURL=C.cameraStream.streamURL||"",c.value.printerId=C.cameraStream.printerId)});function w(){n.closeDialog()}async function _(){if(s.value?.validate()){i.value=!0;try{await ic.createCameraStream({streamURL:c.value.streamURL,name:c.value.name,printerId:c.value.printerId}),await t.refetchQueries({queryKey:["cameraStream"]}),n.closeDialog()}catch(x){console.error("Failed to create camera:",x)}finally{i.value=!1}}}async function T(){if(!s.value?.validate())return;const x=n.context()?.cameraId;if(!x){console.error("No camera ID provided");return}i.value=!0;try{await ic.updateCameraStream(x,{streamURL:c.value.streamURL,name:c.value.name,printerId:c.value.printerId}),await t.refetchQueries({queryKey:["cameraStream"]}),n.closeDialog()}catch(C){console.error("Failed to update camera:",C)}finally{i.value=!1}}function P(){n.closeDialog()}return(x,C)=>{const E=qs;return $(),J(E,{id:Q(n).dialogId,"max-width":"700px",onEscape:C[4]||(C[4]=R=>w())},{default:h(()=>[f($e,{rounded:"lg",color:"surface"},{default:h(()=>[f(Lt,{class:"d-flex align-center pa-5"},{default:h(()=>[f(Sn,{color:"primary",size:"48",class:"mr-3"},{default:h(()=>[f(j,{size:"28"},{default:h(()=>[...C[5]||(C[5]=[k("videocam",-1)])]),_:1})]),_:1}),S("div",null,[S("div",cJ,Y(v.value?"Update Camera Stream":"Add New Camera Stream"),1),S("div",dJ,Y(v.value?"Modify camera stream settings":"Connect a new camera to your printer farm"),1)])]),_:1}),f(Xe,{class:"pa-6"},{default:h(()=>[f(Mp,{ref_key:"formRef",ref:s},{default:h(()=>[f(Qe,{modelValue:c.value.name,"onUpdate:modelValue":C[0]||(C[0]=R=>c.value.name=R),label:"Camera Name",placeholder:"e.g., Front Camera, Ender 3 Cam","prepend-inner-icon":"label",variant:"outlined",density:"comfortable",rules:[u.required],class:"mb-2",hint:"Give your camera a descriptive name","persistent-hint":""},null,8,["modelValue","rules"]),f(Qe,{modelValue:c.value.streamURL,"onUpdate:modelValue":C[1]||(C[1]=R=>c.value.streamURL=R),label:"Stream URL (MJPEG)",placeholder:"http://192.168.1.100:8080/webcam/?action=stream","prepend-inner-icon":"link",variant:"outlined",density:"comfortable",rules:[u.required,u.url],class:"mb-2",hint:"MJPEG stream URL from OctoPrint, Klipper, or IP camera","persistent-hint":""},null,8,["modelValue","rules"]),f(Ai,{modelValue:c.value.printerId,"onUpdate:modelValue":C[2]||(C[2]=R=>c.value.printerId=R),items:d.value,label:"Associate with Printer (Optional)",placeholder:"Select a printer","prepend-inner-icon":"print",variant:"outlined",density:"comfortable",clearable:"",class:"mb-2",hint:"Link this camera to a specific printer","persistent-hint":""},null,8,["modelValue","items"]),c.value.streamURL?($(),J($e,{key:0,variant:"outlined",class:"mt-4",rounded:"lg",color:"surface"},{default:h(()=>[S("div",fJ,[S("div",pJ,[f(j,{size:"small",class:"mr-2"},{default:h(()=>[...C[6]||(C[6]=[k("preview",-1)])]),_:1}),C[7]||(C[7]=S("span",{class:"text-subtitle-2 font-weight-medium"},"Stream Preview",-1))]),f(te,{size:"small",variant:"text",color:"primary",onClick:y},{default:h(()=>[f(j,{start:""},{default:h(()=>[...C[8]||(C[8]=[k("refresh",-1)])]),_:1}),C[9]||(C[9]=k(" Reconnect ",-1))]),_:1})]),f(Xe,{class:"pa-0"},{default:h(()=>[S("div",mJ,[Pt(($(),pe("img",{alt:"Camera stream",key:l.value,src:c.value.streamURL,class:"camera-preview",onError:g,onLoad:b},null,40,hJ)),[[$r,!a.value&&!o.value]]),o.value&&!a.value?($(),pe("div",gJ,[f(un,{indeterminate:"",color:"primary",size:"64"}),C[10]||(C[10]=S("div",{class:"text-body-2 mt-4"},"Connecting to camera...",-1))])):se("",!0),a.value?($(),pe("div",vJ,[f(j,{size:"64",color:"error"},{default:h(()=>[...C[11]||(C[11]=[k("error_outline",-1)])]),_:1}),C[12]||(C[12]=S("div",{class:"text-body-2 font-weight-bold mt-2"},"Unable to load camera stream",-1)),C[13]||(C[13]=S("div",{class:"text-caption text-medium-emphasis mt-1"},"Check the URL and try again",-1))])):se("",!0)])]),_:1})]),_:1})):se("",!0),f(Et,{type:"info",variant:"tonal",density:"compact",class:"mt-4"},{default:h(()=>[...C[14]||(C[14]=[S("div",{class:"text-caption"},[S("strong",null,"Tip:"),k(" Most 3D printer cameras use MJPEG streams. Common URLs: "),S("ul",{class:"mt-2 ml-4"},[S("li",null,[S("code",null,"http://[ip]:8080/webcam/?action=stream"),k(" (OctoPrint/Klipper)")]),S("li",null,[S("code",null,"http://[ip]/mjpeg_stream"),k(" (IP cameras)")])])],-1)])]),_:1})]),_:1},512)]),_:1}),f(pt),f(dn,{class:"pa-4"},{default:h(()=>[f(Ft),f(te,{variant:"text",onClick:P},{default:h(()=>[...C[15]||(C[15]=[k(" Cancel ",-1)])]),_:1}),f(te,{color:"primary",variant:"elevated",loading:i.value,disabled:!p.value,onClick:C[3]||(C[3]=R=>v.value?T():_())},{default:h(()=>[f(j,{start:""},{default:h(()=>[k(Y(v.value?"save":"add"),1)]),_:1}),k(" "+Y(v.value?"Update Camera":"Add Camera"),1)]),_:1},8,["loading","disabled"])]),_:1})]),_:1})]),_:1},8,["id"])}}}),bJ=fn(yJ,[["__scopeId","data-v-658a512c"]]),o1=wr("TestPrinter",{state:()=>({currentCorrelationToken:void 0,testPrinter:void 0,testPrinterEvents:[]}),getters:{getEvents(){return()=>(this.testPrinterEvents?.filter(e=>e.correlationToken===this.currentCorrelationToken)||[]).filter(e=>(e.event!=="API_STATE_UPDATED"||e.payload!=="unset")&&(e.event!=="WS_STATE_UPDATED"||e.payload!=="unopened")).map(e=>({event:e.event.startsWith("WS_")?"Socket":"API",payload:e.payload?.toString()?.replace("noResponse","unreachable").replace("authFail","authentication failure"),failure:["authFail","noResponse","aborted","globalKey","error","connection error","closed","connection closed"].includes(e.payload?.toString())}))}},actions:{clearEvents(){this.testPrinterEvents=[]},async createTestPrinter(e){return this.testPrinter=e,await It.testConnection(e)},saveEvent(e){this.testPrinterEvents?.push(e)}}}),SJ="/assets/klipper-logo-B1Hu-a1R.svg",tk="/assets/octoprint-tentacle-D_4slObB.svg",wJ="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",_J="/assets/bambu-logo-CHl3qEbB.png",kJ="error",xJ="success",EJ=Ae({__name:"PrinterChecksPanel",setup(e){const t=o1(),n=q(4);function r(){return t.getEvents().map(s=>({label:s.event,text:s.payload,color:s.failure?kJ:xJ}))}return(s,i)=>($(),J(Be,{cols:Q(n)},{default:h(()=>[i[0]||(i[0]=S("strong",null," Checks: ",-1)),($(!0),pe(ke,null,Ot(r(),(a,o)=>($(),J(Et,{key:o,type:a.color,density:"compact"},{default:h(()=>[S("small",null,Y(a.label)+" "+Y(a.text),1)]),_:2},1032,["type"]))),128))]),_:1},8,["cols"]))}}),jA=Symbol.for("vuetify:v-item-group"),CJ=oe({...Ue(),...yl({selectedClass:"v-item--selected"}),...lt(),...wt()},"VItemGroup"),TJ=be()({name:"VItemGroup",props:CJ(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{themeClasses:r}=Mt(e),{isSelected:s,select:i,next:a,prev:o,selected:l}=ao(e,jA);return()=>f(e.tag,{class:Se(["v-item-group",r.value,e.class]),style:Le(e.style)},{default:()=>[n.default?.({isSelected:s,select:i,next:a,prev:o,selected:l.value})]})}}),IJ=be()({name:"VItem",props:bl(),emits:{"group:selected":e=>!0},setup(e,t){let{slots:n}=t;const{isSelected:r,select:s,toggle:i,selectedClass:a,value:o,disabled:l}=Ka(e,jA);return()=>n.default?.({isSelected:r.value,selectedClass:a.value,select:s,toggle:i,value:o.value,disabled:l.value})}}),RJ={class:"text-h5"},PJ={class:"ml-3 align-center"},AJ=Ae({__name:"AddOrUpdatePrinterDialog",setup(e){const t=jt(Ht.AddOrUpdatePrinterDialog),n=At(),r=o1(),s=$p(),i=ns(),a=He("appConstants"),o=bt(),l=q(null),c=q(!1),u=q(!1),d=q(!1),p=q(""),m=q(Dd()),v=A(()=>{if(s.hasFeature("multiplePrinterServices")){const M=s.getFeature("multiplePrinterServices"),N=M?.subFeatures?.types?.includes("klipper"),D=M?.subFeatures?.types?.includes("prusaLink"),W=M?.subFeatures?.types?.includes("bambu");return[{name:Yr(oi),type:oi,logo:tk,height:"60px"},...N?[{name:Yr(Ua),type:Ua,logo:SJ,height:"60px"}]:[],...D?[{name:Yr(ji),type:ji,logo:wJ,height:"20px"}]:[],...W?[{name:Yr(jr),type:jr,logo:_J,height:"60px"}]:[]]}return[{name:"OctoPrint",type:oi,logo:tk,height:"75px"}]}),g=A(()=>t.context()?.id);async function b(){if(await s.loadFeatures(),!g.value){m.value=Dd();return}const M=n.printer(g.value);M&&(m.value=It.convertPrinterToCreateForm(M))}const y=A(()=>!!g.value),w=A(()=>{if(y.value)return"Updating Printer";const M=t.context();if(M?.floorId){const N=i.floors.find(D=>D.id===M.floorId);if(N)return`Add Printer to ${N.name}`}return"New Printer"}),_=A(()=>(u.value?"Force ":"")+(y.value?"Save":"Create")),T=A(()=>m?Op(m.value?.name):"?"),P=A(()=>({required:!0,max:a.maxPrinterNameLength})),x=A(()=>({required:!0,length:a.apiKeyLength,alpha_num:!0}));function C(){m.value=Dd()}function E(){d.value=!0}async function R(){if(!I())return;r.clearEvents(),E();const{correlationToken:M}=await r.createTestPrinter(m.value);r.currentCorrelationToken=M}const I=()=>{const M=m.value;return M?hv(M.printerType)?M.printerURL?.length&&M.name?.length:gv(M.printerType)||vv(M.printerType)?M.printerURL?.length&&M.name?.length&&M.username?.length&&M.password?.length:M.printerURL?.length&&M.name?.length&&M.apiKey?.length:!1};async function O(M){const N=await n.createPrinter(M,u.value);return o.openInfoMessage({title:`Printer ${M.name} created`}),N}async function L(M){const N=M.id,D=await n.updatePrinter({printerId:N,updatedPrinter:M},u.value);return o.openInfoMessage({title:`Printer ${M.name} updated`}),D}async function V(){if(!I())return;l.value=null,c.value=!0,m.value.printerURL?.length&&!m.value.printerURL?.startsWith("http://")&&!m.value.printerURL?.startsWith("https://")&&(m.value.printerURL="https://"+m.value.printerURL);const M=m.value;(hv(M.printerType)||gv(M.printerType)||vv(M.printerType))&&(M.apiKey="");try{if(y.value)await L(M);else{const N=await O(M);try{const D=t.context();D?.floorId&&typeof D.floorX=="number"&&typeof D.floorY=="number"&&D.floorX>=0&&D.floorY>=0&&await ns().addPrinterToFloor({floorId:D.floorId,printerId:N.id,y:D.floorY,x:D.floorX})}catch(D){console.warn("Attempt to add printer to floor failed",D),ds(D)}}B()}catch(N){N instanceof AT?(l.value=N.response?.data?.error||N.message,o.error("Validation Failed",N.message)):(l.value=N.message,o.error("Error",N.message))}finally{c.value=!1,u.value=!1}}async function F(){m.value.name=$l(),l.value=null,u.value=!1}function B(){t.closeDialog(),u.value=!1,l.value=null,d.value=!1,r.clearEvents(),C(),p.value=""}return(M,N)=>{const D=qs;return $(),J(D,{id:Q(t).dialogId,"max-width":d.value?"900px":"800px",onEscape:N[13]||(N[13]=W=>B()),onOpened:N[14]||(N[14]=W=>b())},{default:h(()=>[f($e,{class:"pa-4"},{default:h(()=>[f(Lt,null,{default:h(()=>[S("span",RJ,[f(Sn,{color:"primary",size:"56"},{default:h(()=>[k(Y(T.value),1)]),_:1}),k(" "+Y(w.value),1)])]),_:1}),f(Xe,null,{default:h(()=>[N[17]||(N[17]=S("h4",null,"Printer type",-1)),f(TJ,{modelValue:m.value.printerType,"onUpdate:modelValue":N[0]||(N[0]=W=>m.value.printerType=W),mandatory:""},{default:h(()=>[f(Br,null,{default:h(()=>[f(it,null,{default:h(()=>[($(!0),pe(ke,null,Ot(v.value,W=>($(),J(Be,{key:W.name,cols:"4",md:"4"},{default:h(()=>[f(IJ,{value:W.type},{default:h(({isSelected:z,toggle:K})=>[f($e,{color:z?"primary":"blue-grey darken-4",class:"d-flex align-center justify-center elevation-8",height:"60px",width:"225px",onClick:K},{default:h(()=>[f(ms,{height:W.height,src:W.logo,"max-width":"100px",width:"125px"},null,8,["height","src"]),f(HF,null,{default:h(()=>[S("h3",PJ,Y(W.name),1)]),_:2},1024)]),_:2},1032,["color","onClick"])]),_:2},1032,["value"])]),_:2},1024))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"]),f(it,null,{default:h(()=>[f(Be,{cols:d.value?8:12},{default:h(()=>[m.value?($(),J(it,{key:0},{default:h(()=>[f(Be,null,{default:h(()=>[f(Qe,{modelValue:m.value.name,"onUpdate:modelValue":N[1]||(N[1]=W=>m.value.name=W),counter:P.value.max,autofocus:"",class:"ma-1",label:"Printer name*",required:""},null,8,["modelValue","counter"])]),_:1}),f(Be,null,{default:h(()=>[f(Yt,{modelValue:m.value.enabled,"onUpdate:modelValue":N[2]||(N[2]=W=>m.value.enabled=W),hint:"Disabling makes the printer passive",label:"Enabled*","persistent-hint":"",required:""},null,8,["modelValue"])]),_:1})]),_:1})):se("",!0),f(Qe,{modelValue:m.value.printerURL,"onUpdate:modelValue":N[3]||(N[3]=W=>m.value.printerURL=W),class:"ma-1",hint:"F.e. 'octopi.local' or 'https://my.printer.com'",label:"Printer URL*"},null,8,["modelValue"]),m.value.printerType===Q(oi)?($(),J(Qe,{key:1,modelValue:m.value.apiKey,"onUpdate:modelValue":N[4]||(N[4]=W=>m.value.apiKey=W),counter:x.value.length,class:"ma-1",hint:"User or Application Key with 32 or 43 characters (Global API key will fail)",label:m.value.printerType===Q(oi)||m.value.printerType===Q(Ua)?"API Key (required)*":"API Key (unsupported)","persistent-hint":"",required:""},null,8,["modelValue","counter","label"])):se("",!0),m.value.printerType===Q(ji)||m.value.printerType===Q(jr)?($(),J(Qe,{key:2,modelValue:m.value.username,"onUpdate:modelValue":N[5]||(N[5]=W=>m.value.username=W),class:"ma-1",hint:m.value.printerType===Q(jr)?"Serial number from printer":"Username (often 'maker')",label:m.value.printerType===Q(jr)?"Serial":"Username","persistent-hint":"",required:""},null,8,["modelValue","hint","label"])):se("",!0),m.value.printerType===Q(ji)||m.value.printerType===Q(jr)?($(),J(Qe,{key:3,modelValue:m.value.password,"onUpdate:modelValue":N[6]||(N[6]=W=>m.value.password=W),class:"ma-1",hint:m.value.printerType===Q(jr)?"Access code from printer settings":"Password (visit your printer settings)",label:m.value.printerType===Q(jr)?"AccessCode":"Password","persistent-hint":"",required:""},null,8,["modelValue","hint","label"])):se("",!0)]),_:1},8,["cols"]),d.value?($(),J(EJ,{key:0,cols:4},{default:h(()=>[f(te,{onClick:N[7]||(N[7]=W=>d.value=!1)},{default:h(()=>[...N[15]||(N[15]=[k(" Hide checks",-1)])]),_:1})]),_:1})):se("",!0)]),_:1}),l.value?.length?($(),J(Et,{key:0,class:"my-3",color:"primary"},{default:h(()=>[k(Y(l.value)+" ",1),f(Yt,{modelValue:u.value,"onUpdate:modelValue":N[8]||(N[8]=W=>u.value=W),color:"warning",label:"Force save"},null,8,["modelValue"])]),_:1})):se("",!0),c.value?($(),J(Et,{key:1,class:"my-3"},{default:h(()=>[N[16]||(N[16]=k(" Validating printer ",-1)),f(un,{indeterminate:""})]),_:1})):se("",!0)]),_:1}),f(dn,null,{default:h(()=>[N[21]||(N[21]=S("em",{class:"text-red"}," * indicates required field ",-1)),f(Ft),f(te,{variant:"text",onClick:N[9]||(N[9]=W=>B())},{default:h(()=>[...N[18]||(N[18]=[k(" Close ",-1)])]),_:1}),y.value?($(),J(te,{key:0,disabled:!I(),color:"gray",variant:"text",onClick:N[10]||(N[10]=W=>F())},{default:h(()=>[...N[19]||(N[19]=[k(" Duplicate ",-1)])]),_:1},8,["disabled"])):se("",!0),f(te,{disabled:!I(),color:"warning",variant:"text",onClick:N[11]||(N[11]=W=>R())},{default:h(()=>[...N[20]||(N[20]=[k(" Test connection ",-1)])]),_:1},8,["disabled"]),f(te,{disabled:!I(),color:"blue-darken-1",variant:"text",onClick:N[12]||(N[12]=W=>V())},{default:h(()=>[k(Y(_.value),1)]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["id","max-width"])}}}),OJ=oe({text:String,...Ue(),...lt()},"VToolbarTitle"),Us=be()({name:"VToolbarTitle",props:OJ(),setup(e,t){let{slots:n}=t;return Ie(()=>{const r=!!(n.default||n.text||e.text);return f(e.tag,{class:Se(["v-toolbar-title",e.class]),style:Le(e.style)},{default:()=>[r&&S("div",{class:"v-toolbar-title__placeholder"},[n.text?n.text():e.text,n.default?.()])]})}),{}}}),DJ=[null,"prominent","default","comfortable","compact"],HA=oe({absolute:Boolean,collapse:Boolean,collapsePosition:{type:String,default:"start"},color:String,density:{type:String,default:"default",validator:e=>DJ.includes(e)},extended:{type:Boolean,default:null},extensionHeight:{type:[Number,String],default:48},flat:Boolean,floating:Boolean,height:{type:[Number,String],default:64},image:String,title:String,...rs(),...Ue(),..._r(),...Tn(),...lt({tag:"header"}),...wt()},"VToolbar"),ro=be()({name:"VToolbar",props:HA(),setup(e,t){let{slots:n}=t;const{backgroundColorClasses:r,backgroundColorStyles:s}=yn(()=>e.color),{borderClasses:i}=vs(e),{elevationClasses:a}=Nr(e),{roundedClasses:o}=An(e),{themeClasses:l}=Mt(e),{rtlClasses:c}=xr(),u=Ee(e.extended===null?!!n.extension?.():e.extended),d=A(()=>parseInt(Number(e.height)+(e.density==="prominent"?Number(e.height):0)-(e.density==="comfortable"?8:0)-(e.density==="compact"?16:0),10)),p=A(()=>u.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 Rn({VBtn:{variant:"text"}}),Ie(()=>{const m=!!(e.title||n.title),v=!!(n.image||e.image),g=n.extension?.();return u.value=e.extended===null?!!g:e.extended,f(e.tag,{class:Se(["v-toolbar",`v-toolbar--collapse-${e.collapsePosition}`,{"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,a.value,o.value,l.value,c.value,e.class]),style:Le([s.value,e.style])},{default:()=>[v&&S("div",{key:"image",class:"v-toolbar__image"},[n.image?f(vt,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{cover:!0,src:e.image}}},n.image):f(ms,{key:"image-img",cover:!0,src:e.image},null)]),f(vt,{defaults:{VTabs:{height:Oe(d.value)}}},{default:()=>[S("div",{class:"v-toolbar__content",style:{height:Oe(d.value)}},[n.prepend&&S("div",{class:"v-toolbar__prepend"},[n.prepend?.()]),m&&f(Us,{key:"title",text:e.title},{text:n.title}),n.default?.(),n.append&&S("div",{class:"v-toolbar__append"},[n.append?.()])])]}),f(vt,{defaults:{VTabs:{height:Oe(p.value)}}},{default:()=>[f(Py,null,{default:()=>[u.value&&S("div",{class:"v-toolbar__extension",style:{height:Oe(p.value)}},[g])]})]})]})}),{contentHeight:d,extensionHeight:p}}}),LJ=Ae({__name:"HelpOverlay",setup(e){const t=q(!1);return(n,r)=>($(),J(Ly,{modelValue:Q(t),"onUpdate:modelValue":r[0]||(r[0]=s=>nt(t)?t.value=s:null),fullscreen:"",eager:"",transition:"dialog-bottom-transition",width:"100%"},{activator:h(({props:s})=>[f(Kt,{location:"top"},{activator:h(({props:i})=>[f(te,ce({variant:"tonal",class:"ml-2 mr-2"},{...s,...i}),{default:h(()=>[f(j,{icon:"mdi:mdi-help",class:"mr-2"}),r[1]||(r[1]=k(" help ",-1))]),_:1},16)]),default:h(()=>[r[2]||(r[2]=S("span",null," Load the online documentation webpage ",-1))]),_:2},1024)]),default:h(({isActive:s})=>[f($e,{height:"100%",width:"100%"},{default:h(()=>[f(ro,{color:"primary"},{default:h(()=>[f(j,{class:"ml-5"},{default:h(()=>[...r[3]||(r[3]=[k("help",-1)])]),_:1}),r[6]||(r[6]=S("h2",{class:"ml-10"},"FDM Monster Documentation",-1)),f(Ft),r[7]||(r[7]=S("span",{class:"mr-10"}," docs.fdm-monster.net ",-1)),f(te,{variant:"flat",onClick:i=>s.value=!1},{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...r[4]||(r[4]=[k("close",-1)])]),_:1}),r[5]||(r[5]=k(" Close help ",-1))]),_:1},8,["onClick"])]),_:2},1024),r[8]||(r[8]=S("iframe",{height:"100%",src:"https://docs.fdm-monster.net",style:{"background-color":"black","border-width":"0"},width:"100%"},null,-1))]),_:2},1024)]),_:1},8,["modelValue"]))}}),$J=Ae({__name:"TooltipButton",props:{tooltip:{},color:{default:"white"},variant:{default:"elevated"},icon:{default:""},iconClass:{default:""},text:{default:""},location:{default:"bottom"}},emits:["click"],setup(e){const t=e;return(n,r)=>($(),J(Kt,{location:t.location},{activator:h(({props:s})=>[f(te,ce(s,{variant:e.variant,class:"ml-2",color:e.color,onClick:r[0]||(r[0]=i=>n.$emit("click"))}),{default:h(()=>[Wo(n.$slots,"default",{},()=>[t.icon?.length?($(),J(j,{key:0,class:Se("mr-2 "+t.iconClass)},{default:h(()=>[k(Y(t.icon),1)]),_:1},8,["class"])):se("",!0),k(" "+Y(t.text),1)])]),_:3},16,["variant","color"])]),default:h(()=>[S("span",null,Y(t.tooltip),1)]),_:3},8,["location"]))}});const Ro=typeof document<"u";function qA(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function FJ(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&qA(e.default)}const _t=Object.assign;function th(e,t){const n={};for(const r in t){const s=t[r];n[r]=hs(s)?s.map(e):e(s)}return n}const _u=()=>{},hs=Array.isArray;function nk(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}const WA=/#/g,NJ=/&/g,MJ=/\//g,VJ=/=/g,BJ=/\?/g,GA=/\+/g,UJ=/%5B/g,zJ=/%5D/g,KA=/%5E/g,jJ=/%60/g,YA=/%7B/g,HJ=/%7C/g,JA=/%7D/g,qJ=/%20/g;function l1(e){return e==null?"":encodeURI(""+e).replace(HJ,"|").replace(UJ,"[").replace(zJ,"]")}function WJ(e){return l1(e).replace(YA,"{").replace(JA,"}").replace(KA,"^")}function $v(e){return l1(e).replace(GA,"%2B").replace(qJ,"+").replace(WA,"%23").replace(NJ,"%26").replace(jJ,"`").replace(YA,"{").replace(JA,"}").replace(KA,"^")}function GJ(e){return $v(e).replace(VJ,"%3D")}function KJ(e){return l1(e).replace(WA,"%23").replace(BJ,"%3F")}function YJ(e){return KJ(e).replace(MJ,"%2F")}function oc(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const JJ=/\/$/,XJ=e=>e.replace(JJ,"");function nh(e,t,n="/"){let r,s={},i="",a="";const o=t.indexOf("#");let l=t.indexOf("?");return l=o>=0&&l>o?-1:l,l>=0&&(r=t.slice(0,l),i=t.slice(l,o>0?o:t.length),s=e(i.slice(1))),o>=0&&(r=r||t.slice(0,o),a=t.slice(o,t.length)),r=tX(r??t,n),{fullPath:r+i+a,path:r,query:s,hash:oc(a)}}function QJ(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function rk(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function ZJ(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&fl(t.matched[r],n.matched[s])&&XA(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function fl(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function XA(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!eX(e[n],t[n]))return!1;return!0}function eX(e,t){return hs(e)?sk(e,t):hs(t)?sk(t,e):e?.valueOf()===t?.valueOf()}function sk(e,t){return hs(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function tX(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,a,o;for(a=0;a<r.length;a++)if(o=r[a],o!==".")if(o==="..")i>1&&i--;else break;return n.slice(0,i).join("/")+"/"+r.slice(a).join("/")}const Li={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let Fv=(function(e){return e.pop="pop",e.push="push",e})({}),rh=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function nX(e){if(!e)if(Ro){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),XJ(e)}const rX=/^[^#]+#/;function sX(e,t){return e.replace(rX,"#")+t}function iX(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 Vp=()=>({left:window.scrollX,top:window.scrollY});function aX(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=iX(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 ik(e,t){return(history.state?history.state.position-t:-1)+e}const Nv=new Map;function oX(e,t){Nv.set(e,t)}function lX(e){const t=Nv.get(e);return Nv.delete(e),t}function uX(e){return typeof e=="string"||e&&typeof e=="object"}function QA(e){return typeof e=="string"||typeof e=="symbol"}let rn=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({});const ZA=Symbol("");rn.MATCHER_NOT_FOUND+"",rn.NAVIGATION_GUARD_REDIRECT+"",rn.NAVIGATION_ABORTED+"",rn.NAVIGATION_CANCELLED+"",rn.NAVIGATION_DUPLICATED+"";function pl(e,t){return _t(new Error,{type:e,[ZA]:!0},t)}function ei(e,t){return e instanceof Error&&ZA in e&&(t==null||!!(e.type&t))}const cX=["params","query","hash"];function dX(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of cX)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function fX(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<n.length;++r){const s=n[r].replace(GA," "),i=s.indexOf("="),a=oc(i<0?s:s.slice(0,i)),o=i<0?null:oc(s.slice(i+1));if(a in t){let l=t[a];hs(l)||(l=t[a]=[l]),l.push(o)}else t[a]=o}return t}function ak(e){let t="";for(let n in e){const r=e[n];if(n=GJ(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(hs(r)?r.map(s=>s&&$v(s)):[r&&$v(r)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function pX(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=hs(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}const mX=Symbol(""),ok=Symbol(""),Bp=Symbol(""),u1=Symbol(""),Mv=Symbol("");function Zl(){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 zi(e,t,n,r,s,i=a=>a()){const a=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((o,l)=>{const c=p=>{p===!1?l(pl(rn.NAVIGATION_ABORTED,{from:n,to:t})):p instanceof Error?l(p):uX(p)?l(pl(rn.NAVIGATION_GUARD_REDIRECT,{from:t,to:p})):(a&&r.enterCallbacks[s]===a&&typeof p=="function"&&a.push(p),o())},u=i(()=>e.call(r&&r.instances[s],t,n,c));let d=Promise.resolve(u);e.length<3&&(d=d.then(c)),d.catch(p=>l(p))})}function sh(e,t,n,r,s=i=>i()){const i=[];for(const a of e)for(const o in a.components){let l=a.components[o];if(!(t!=="beforeRouteEnter"&&!a.instances[o]))if(qA(l)){const c=(l.__vccOpts||l)[t];c&&i.push(zi(c,n,r,a,o,s))}else{let c=l();i.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${o}" at "${a.path}"`);const d=FJ(u)?u.default:u;a.mods[o]=u,a.components[o]=d;const p=(d.__vccOpts||d)[t];return p&&zi(p,n,r,a,o,s)()}))}}return i}function hX(e,t){const n=[],r=[],s=[],i=Math.max(t.matched.length,e.matched.length);for(let a=0;a<i;a++){const o=t.matched[a];o&&(e.matched.find(c=>fl(c,o))?r.push(o):n.push(o));const l=e.matched[a];l&&(t.matched.find(c=>fl(c,l))||s.push(l))}return[n,r,s]}let gX=()=>location.protocol+"//"+location.host;function e2(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,o=s.slice(a);return o[0]!=="/"&&(o="/"+o),rk(o,"")}return rk(n,e)+r+s}function vX(e,t,n,r){let s=[],i=[],a=null;const o=({state:p})=>{const m=e2(e,location),v=n.value,g=t.value;let b=0;if(p){if(n.value=m,t.value=p,a&&a===v){a=null;return}b=g?p.position-g.position:0}else r(m);s.forEach(y=>{y(n.value,v,{delta:b,type:Fv.pop,direction:b?b>0?rh.forward:rh.back:rh.unknown})})};function l(){a=n.value}function c(p){s.push(p);const m=()=>{const v=s.indexOf(p);v>-1&&s.splice(v,1)};return i.push(m),m}function u(){if(document.visibilityState==="hidden"){const{history:p}=window;if(!p.state)return;p.replaceState(_t({},p.state,{scroll:Vp()}),"")}}function d(){for(const p of i)p();i=[],window.removeEventListener("popstate",o),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",o),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:l,listen:c,destroy:d}}function lk(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?Vp():null}}function yX(e){const{history:t,location:n}=window,r={value:e2(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,c,u){const d=e.indexOf("#"),p=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+l:gX()+e+l;try{t[u?"replaceState":"pushState"](c,"",p),s.value=c}catch(m){console.error(m),n[u?"replace":"assign"](p)}}function a(l,c){i(l,_t({},t.state,lk(s.value.back,l,s.value.forward,!0),c,{position:s.value.position}),!0),r.value=l}function o(l,c){const u=_t({},s.value,t.state,{forward:l,scroll:Vp()});i(u.current,u,!0),i(l,_t({},lk(r.value,l,null),{position:u.position+1},c),!1),r.value=l}return{location:r,state:s,push:o,replace:a}}function bX(e){e=nX(e);const t=yX(e),n=vX(e,t.state,t.location,t.replace);function r(i,a=!0){a||n.pauseListeners(),history.go(i)}const s=_t({location:"",base:e,go:r,createHref:sX.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}let Ra=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var _n=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(_n||{});const SX={type:Ra.Static,value:""},wX=/[a-zA-Z0-9_]/;function _X(e){if(!e)return[[]];if(e==="/")return[[SX]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(m){throw new Error(`ERR (${n})/"${c}": ${m}`)}let n=_n.Static,r=n;const s=[];let i;function a(){i&&s.push(i),i=[]}let o=0,l,c="",u="";function d(){c&&(n===_n.Static?i.push({type:Ra.Static,value:c}):n===_n.Param||n===_n.ParamRegExp||n===_n.ParamRegExpEnd?(i.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),i.push({type:Ra.Param,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),c="")}function p(){c+=l}for(;o<e.length;){if(l=e[o++],l==="\\"&&n!==_n.ParamRegExp){r=n,n=_n.EscapeNext;continue}switch(n){case _n.Static:l==="/"?(c&&d(),a()):l===":"?(d(),n=_n.Param):p();break;case _n.EscapeNext:p(),n=r;break;case _n.Param:l==="("?n=_n.ParamRegExp:wX.test(l)?p():(d(),n=_n.Static,l!=="*"&&l!=="?"&&l!=="+"&&o--);break;case _n.ParamRegExp:l===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+l:n=_n.ParamRegExpEnd:u+=l;break;case _n.ParamRegExpEnd:d(),n=_n.Static,l!=="*"&&l!=="?"&&l!=="+"&&o--,u="";break;default:t("Unknown state");break}}return n===_n.ParamRegExp&&t(`Unfinished custom RegExp for param "${c}"`),d(),a(),s}const uk="[^/]+?",kX={sensitive:!1,strict:!1,start:!0,end:!0};var er=(function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e})(er||{});const xX=/[.+*?^${}()[\]/\\]/g;function EX(e,t){const n=_t({},kX,t),r=[];let s=n.start?"^":"";const i=[];for(const c of e){const u=c.length?[]:[er.Root];n.strict&&!c.length&&(s+="/");for(let d=0;d<c.length;d++){const p=c[d];let m=er.Segment+(n.sensitive?er.BonusCaseSensitive:0);if(p.type===Ra.Static)d||(s+="/"),s+=p.value.replace(xX,"\\$&"),m+=er.Static;else if(p.type===Ra.Param){const{value:v,repeatable:g,optional:b,regexp:y}=p;i.push({name:v,repeatable:g,optional:b});const w=y||uk;if(w!==uk){m+=er.BonusCustomRegExp;try{`${w}`}catch(T){throw new Error(`Invalid custom RegExp for param "${v}" (${w}): `+T.message)}}let _=g?`((?:${w})(?:/(?:${w}))*)`:`(${w})`;d||(_=b&&c.length<2?`(?:/${_})`:"/"+_),b&&(_+="?"),s+=_,m+=er.Dynamic,b&&(m+=er.BonusOptional),g&&(m+=er.BonusRepeatable),w===".*"&&(m+=er.BonusWildcard)}u.push(m)}r.push(u)}if(n.strict&&n.end){const c=r.length-1;r[c][r[c].length-1]+=er.BonusStrict}n.strict||(s+="/?"),n.end?s+="$":n.strict&&!s.endsWith("/")&&(s+="(?:/|$)");const a=new RegExp(s,n.sensitive?"":"i");function o(c){const u=c.match(a),d={};if(!u)return null;for(let p=1;p<u.length;p++){const m=u[p]||"",v=i[p-1];d[v.name]=m&&v.repeatable?m.split("/"):m}return d}function l(c){let u="",d=!1;for(const p of e){(!d||!u.endsWith("/"))&&(u+="/"),d=!1;for(const m of p)if(m.type===Ra.Static)u+=m.value;else if(m.type===Ra.Param){const{value:v,repeatable:g,optional:b}=m,y=v in c?c[v]:"";if(hs(y)&&!g)throw new Error(`Provided param "${v}" is an array but it is not repeatable (* or + modifiers)`);const w=hs(y)?y.join("/"):y;if(!w)if(b)p.length<2&&(u.endsWith("/")?u=u.slice(0,-1):d=!0);else throw new Error(`Missing required param "${v}"`);u+=w}}return u||"/"}return{re:a,score:r,keys:i,parse:o,stringify:l}}function CX(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]===er.Static+er.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===er.Static+er.Segment?1:-1:0}function t2(e,t){let n=0;const r=e.score,s=t.score;for(;n<r.length&&n<s.length;){const i=CX(r[n],s[n]);if(i)return i;n++}if(Math.abs(s.length-r.length)===1){if(ck(r))return 1;if(ck(s))return-1}return s.length-r.length}function ck(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const TX={strict:!1,end:!0,sensitive:!1};function IX(e,t,n){const r=EX(_X(e.path),n),s=_t(r,{record:e,parent:t,children:[],alias:[]});return t&&!s.record.aliasOf==!t.record.aliasOf&&t.children.push(s),s}function RX(e,t){const n=[],r=new Map;t=nk(TX,t);function s(d){return r.get(d)}function i(d,p,m){const v=!m,g=fk(d);g.aliasOf=m&&m.record;const b=nk(t,d),y=[g];if("alias"in d){const T=typeof d.alias=="string"?[d.alias]:d.alias;for(const P of T)y.push(fk(_t({},g,{components:m?m.record.components:g.components,path:P,aliasOf:m?m.record:g})))}let w,_;for(const T of y){const{path:P}=T;if(p&&P[0]!=="/"){const x=p.record.path,C=x[x.length-1]==="/"?"":"/";T.path=p.record.path+(P&&C+P)}if(w=IX(T,p,b),m?m.alias.push(w):(_=_||w,_!==w&&_.alias.push(w),v&&d.name&&!pk(w)&&a(d.name)),n2(w)&&l(w),g.children){const x=g.children;for(let C=0;C<x.length;C++)i(x[C],w,m&&m.children[C])}m=m||w}return _?()=>{a(_)}:_u}function a(d){if(QA(d)){const p=r.get(d);p&&(r.delete(d),n.splice(n.indexOf(p),1),p.children.forEach(a),p.alias.forEach(a))}else{const p=n.indexOf(d);p>-1&&(n.splice(p,1),d.record.name&&r.delete(d.record.name),d.children.forEach(a),d.alias.forEach(a))}}function o(){return n}function l(d){const p=OX(d,n);n.splice(p,0,d),d.record.name&&!pk(d)&&r.set(d.record.name,d)}function c(d,p){let m,v={},g,b;if("name"in d&&d.name){if(m=r.get(d.name),!m)throw pl(rn.MATCHER_NOT_FOUND,{location:d});b=m.record.name,v=_t(dk(p.params,m.keys.filter(_=>!_.optional).concat(m.parent?m.parent.keys.filter(_=>_.optional):[]).map(_=>_.name)),d.params&&dk(d.params,m.keys.map(_=>_.name))),g=m.stringify(v)}else if(d.path!=null)g=d.path,m=n.find(_=>_.re.test(g)),m&&(v=m.parse(g),b=m.record.name);else{if(m=p.name?r.get(p.name):n.find(_=>_.re.test(p.path)),!m)throw pl(rn.MATCHER_NOT_FOUND,{location:d,currentLocation:p});b=m.record.name,v=_t({},p.params,d.params),g=m.stringify(v)}const y=[];let w=m;for(;w;)y.unshift(w.record),w=w.parent;return{name:b,path:g,params:v,matched:y,meta:AX(y)}}e.forEach(d=>i(d));function u(){n.length=0,r.clear()}return{addRoute:i,resolve:c,removeRoute:a,clearRoutes:u,getRoutes:o,getRecordMatcher:s}}function dk(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function fk(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:PX(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 PX(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 pk(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function AX(e){return e.reduce((t,n)=>_t(t,n.meta),{})}function OX(e,t){let n=0,r=t.length;for(;n!==r;){const i=n+r>>1;t2(e,t[i])<0?r=i:n=i+1}const s=DX(e);return s&&(r=t.lastIndexOf(s,r-1)),r}function DX(e){let t=e;for(;t=t.parent;)if(n2(t)&&t2(e,t)===0)return t}function n2({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function mk(e){const t=He(Bp),n=He(u1),r=A(()=>{const l=Q(e.to);return t.resolve(l)}),s=A(()=>{const{matched:l}=r.value,{length:c}=l,u=l[c-1],d=n.matched;if(!u||!d.length)return-1;const p=d.findIndex(fl.bind(null,u));if(p>-1)return p;const m=hk(l[c-2]);return c>1&&hk(u)===m&&d[d.length-1].path!==m?d.findIndex(fl.bind(null,l[c-2])):p}),i=A(()=>s.value>-1&&MX(n.params,r.value.params)),a=A(()=>s.value>-1&&s.value===n.matched.length-1&&XA(n.params,r.value.params));function o(l={}){if(NX(l)){const c=t[Q(e.replace)?"replace":"push"](Q(e.to)).catch(_u);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:r,href:A(()=>r.value.href),isActive:i,isExactActive:a,navigate:o}}function LX(e){return e.length===1?e[0]:e}const $X=Ae({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:mk,setup(e,{slots:t}){const n=Jt(mk(e)),{options:r}=He(Bp),s=A(()=>({[gk(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[gk(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&LX(t.default(n));return e.custom?i:gs("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},i)}}}),FX=$X;function NX(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 MX(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(!hs(s)||s.length!==r.length||r.some((i,a)=>i.valueOf()!==s[a].valueOf()))return!1}return!0}function hk(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const gk=(e,t,n)=>e??t??n,VX=Ae({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=He(Mv),s=A(()=>e.route||r.value),i=He(ok,0),a=A(()=>{let c=Q(i);const{matched:u}=s.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),o=A(()=>s.value.matched[a.value]);Dt(ok,A(()=>a.value+1)),Dt(mX,o),Dt(Mv,s);const l=q();return _e(()=>[l.value,o.value,e.name],([c,u,d],[p,m,v])=>{u&&(u.instances[d]=c,m&&m!==u&&c&&c===p&&(u.leaveGuards.size||(u.leaveGuards=m.leaveGuards),u.updateGuards.size||(u.updateGuards=m.updateGuards))),c&&u&&(!m||!fl(u,m)||!p)&&(u.enterCallbacks[d]||[]).forEach(g=>g(c))},{flush:"post"}),()=>{const c=s.value,u=e.name,d=o.value,p=d&&d.components[u];if(!p)return vk(n.default,{Component:p,route:c});const m=d.props[u],v=m?m===!0?c.params:typeof m=="function"?m(c):m:null,b=gs(p,_t({},v,t,{onVnodeUnmounted:y=>{y.component.isUnmounted&&(d.instances[u]=null)},ref:l}));return vk(n.default,{Component:b,route:c})||b}}});function vk(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const BX=VX;function UX(e){const t=RX(e.routes,e),n=e.parseQuery||fX,r=e.stringifyQuery||ak,s=e.history,i=Zl(),a=Zl(),o=Zl(),l=Ee(Li);let c=Li;Ro&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=th.bind(null,X=>""+X),d=th.bind(null,YJ),p=th.bind(null,oc);function m(X,ie){let ne,ve;return QA(X)?(ne=t.getRecordMatcher(X),ve=ie):ve=X,t.addRoute(ve,ne)}function v(X){const ie=t.getRecordMatcher(X);ie&&t.removeRoute(ie)}function g(){return t.getRoutes().map(X=>X.record)}function b(X){return!!t.getRecordMatcher(X)}function y(X,ie){if(ie=_t({},ie||l.value),typeof X=="string"){const Z=nh(n,X,ie.path),fe=t.resolve({path:Z.path},ie),ge=s.createHref(Z.fullPath);return _t(Z,fe,{params:p(fe.params),hash:oc(Z.hash),redirectedFrom:void 0,href:ge})}let ne;if(X.path!=null)ne=_t({},X,{path:nh(n,X.path,ie.path).path});else{const Z=_t({},X.params);for(const fe in Z)Z[fe]==null&&delete Z[fe];ne=_t({},X,{params:d(Z)}),ie.params=d(ie.params)}const ve=t.resolve(ne,ie),Ne=X.hash||"";ve.params=u(p(ve.params));const U=QJ(r,_t({},X,{hash:WJ(Ne),path:ve.path})),G=s.createHref(U);return _t({fullPath:U,hash:Ne,query:r===ak?pX(X.query):X.query||{}},ve,{redirectedFrom:void 0,href:G})}function w(X){return typeof X=="string"?nh(n,X,l.value.path):_t({},X)}function _(X,ie){if(c!==X)return pl(rn.NAVIGATION_CANCELLED,{from:ie,to:X})}function T(X){return C(X)}function P(X){return T(_t(w(X),{replace:!0}))}function x(X,ie){const ne=X.matched[X.matched.length-1];if(ne&&ne.redirect){const{redirect:ve}=ne;let Ne=typeof ve=="function"?ve(X,ie):ve;return typeof Ne=="string"&&(Ne=Ne.includes("?")||Ne.includes("#")?Ne=w(Ne):{path:Ne},Ne.params={}),_t({query:X.query,hash:X.hash,params:Ne.path!=null?{}:X.params},Ne)}}function C(X,ie){const ne=c=y(X),ve=l.value,Ne=X.state,U=X.force,G=X.replace===!0,Z=x(ne,ve);if(Z)return C(_t(w(Z),{state:typeof Z=="object"?_t({},Ne,Z.state):Ne,force:U,replace:G}),ie||ne);const fe=ne;fe.redirectedFrom=ie;let ge;return!U&&ZJ(r,ve,ne)&&(ge=pl(rn.NAVIGATION_DUPLICATED,{to:fe,from:ve}),K(ve,ve,!0,!1)),(ge?Promise.resolve(ge):I(fe,ve)).catch(me=>ei(me)?ei(me,rn.NAVIGATION_GUARD_REDIRECT)?me:z(me):D(me,fe,ve)).then(me=>{if(me){if(ei(me,rn.NAVIGATION_GUARD_REDIRECT))return C(_t({replace:G},w(me.to),{state:typeof me.to=="object"?_t({},Ne,me.to.state):Ne,force:U}),ie||fe)}else me=L(fe,ve,!0,G,Ne);return O(fe,ve,me),me})}function E(X,ie){const ne=_(X,ie);return ne?Promise.reject(ne):Promise.resolve()}function R(X){const ie=ae.values().next().value;return ie&&typeof ie.runWithContext=="function"?ie.runWithContext(X):X()}function I(X,ie){let ne;const[ve,Ne,U]=hX(X,ie);ne=sh(ve.reverse(),"beforeRouteLeave",X,ie);for(const Z of ve)Z.leaveGuards.forEach(fe=>{ne.push(zi(fe,X,ie))});const G=E.bind(null,X,ie);return ne.push(G),De(ne).then(()=>{ne=[];for(const Z of i.list())ne.push(zi(Z,X,ie));return ne.push(G),De(ne)}).then(()=>{ne=sh(Ne,"beforeRouteUpdate",X,ie);for(const Z of Ne)Z.updateGuards.forEach(fe=>{ne.push(zi(fe,X,ie))});return ne.push(G),De(ne)}).then(()=>{ne=[];for(const Z of U)if(Z.beforeEnter)if(hs(Z.beforeEnter))for(const fe of Z.beforeEnter)ne.push(zi(fe,X,ie));else ne.push(zi(Z.beforeEnter,X,ie));return ne.push(G),De(ne)}).then(()=>(X.matched.forEach(Z=>Z.enterCallbacks={}),ne=sh(U,"beforeRouteEnter",X,ie,R),ne.push(G),De(ne))).then(()=>{ne=[];for(const Z of a.list())ne.push(zi(Z,X,ie));return ne.push(G),De(ne)}).catch(Z=>ei(Z,rn.NAVIGATION_CANCELLED)?Z:Promise.reject(Z))}function O(X,ie,ne){o.list().forEach(ve=>R(()=>ve(X,ie,ne)))}function L(X,ie,ne,ve,Ne){const U=_(X,ie);if(U)return U;const G=ie===Li,Z=Ro?history.state:{};ne&&(ve||G?s.replace(X.fullPath,_t({scroll:G&&Z&&Z.scroll},Ne)):s.push(X.fullPath,Ne)),l.value=X,K(X,ie,ne,G),z()}let V;function F(){V||(V=s.listen((X,ie,ne)=>{if(!de.listening)return;const ve=y(X),Ne=x(ve,de.currentRoute.value);if(Ne){C(_t(Ne,{replace:!0,force:!0}),ve).catch(_u);return}c=ve;const U=l.value;Ro&&oX(ik(U.fullPath,ne.delta),Vp()),I(ve,U).catch(G=>ei(G,rn.NAVIGATION_ABORTED|rn.NAVIGATION_CANCELLED)?G:ei(G,rn.NAVIGATION_GUARD_REDIRECT)?(C(_t(w(G.to),{force:!0}),ve).then(Z=>{ei(Z,rn.NAVIGATION_ABORTED|rn.NAVIGATION_DUPLICATED)&&!ne.delta&&ne.type===Fv.pop&&s.go(-1,!1)}).catch(_u),Promise.reject()):(ne.delta&&s.go(-ne.delta,!1),D(G,ve,U))).then(G=>{G=G||L(ve,U,!1),G&&(ne.delta&&!ei(G,rn.NAVIGATION_CANCELLED)?s.go(-ne.delta,!1):ne.type===Fv.pop&&ei(G,rn.NAVIGATION_ABORTED|rn.NAVIGATION_DUPLICATED)&&s.go(-1,!1)),O(ve,U,G)}).catch(_u)}))}let B=Zl(),M=Zl(),N;function D(X,ie,ne){z(X);const ve=M.list();return ve.length?ve.forEach(Ne=>Ne(X,ie,ne)):console.error(X),Promise.reject(X)}function W(){return N&&l.value!==Li?Promise.resolve():new Promise((X,ie)=>{B.add([X,ie])})}function z(X){return N||(N=!X,F(),B.list().forEach(([ie,ne])=>X?ne(X):ie()),B.reset()),X}function K(X,ie,ne,ve){const{scrollBehavior:Ne}=e;if(!Ro||!Ne)return Promise.resolve();const U=!ne&&lX(ik(X.fullPath,0))||(ve||!ne)&&history.state&&history.state.scroll||null;return ut().then(()=>Ne(X,ie,U)).then(G=>G&&aX(G)).catch(G=>D(G,X,ie))}const H=X=>s.go(X);let re;const ae=new Set,de={currentRoute:l,listening:!0,addRoute:m,removeRoute:v,clearRoutes:t.clearRoutes,hasRoute:b,getRoutes:g,resolve:y,options:e,push:T,replace:P,go:H,back:()=>H(-1),forward:()=>H(1),beforeEach:i.add,beforeResolve:a.add,afterEach:o.add,onError:M.add,isReady:W,install(X){X.component("RouterLink",FX),X.component("RouterView",BX),X.config.globalProperties.$router=de,Object.defineProperty(X.config.globalProperties,"$route",{enumerable:!0,get:()=>Q(l)}),Ro&&!re&&l.value===Li&&(re=!0,T(s.location).catch(ve=>{}));const ie={};for(const ve in Li)Object.defineProperty(ie,ve,{get:()=>l.value[ve],enumerable:!0});X.provide(Bp,de),X.provide(u1,Kf(ie)),X.provide(Mv,l);const ne=X.unmount;ae.add(X),X.unmount=function(){ae.delete(X),ae.size<1&&(c=Li,V&&V(),V=null,l.value=Li,re=!1,N=!1),ne()}}};function De(X){return X.reduce((ie,ne)=>ie.then(()=>R(ne)),Promise.resolve())}return de}function ks(){return He(Bp)}function c1(e){return He(u1)}const zX=Ae({__name:"PrinterStatusMenu",setup(e){const t=q(!1),n=ks(),r=At(),s=Kn(),i=A(()=>r.printers.length),a=A(()=>s.printingCount),o=A(()=>s.operationalNotPrintingCount),l=A(()=>r.maintenanceCount),c=A(()=>r.disconnectedCount),u=A(()=>r.disabledCount);function d(){t.value=!1,n.push("/")}return(p,m)=>($(),J(da,{modelValue:t.value,"onUpdate:modelValue":m[0]||(m[0]=v=>t.value=v),"close-on-content-click":!1,location:"bottom","min-width":"300"},{activator:h(({props:v})=>[f(te,ce({variant:"tonal"},v,{class:"mr-2"}),{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...m[1]||(m[1]=[k("dashboard",-1)])]),_:1}),k(" "+Y(i.value)+" Printers ",1)]),_:1},16)]),default:h(()=>[f($e,null,{default:h(()=>[f(Lt,{class:"d-flex align-center"},{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...m[2]||(m[2]=[k("dashboard",-1)])]),_:1}),m[3]||(m[3]=k(" Printer Status ",-1))]),_:1}),f(Xe,{class:"pa-0"},{default:h(()=>[f(_s,{density:"compact"},{default:h(()=>[f(yt,null,{prepend:h(()=>[f(j,{color:"success"},{default:h(()=>[...m[4]||(m[4]=[k("print",-1)])]),_:1})]),append:h(()=>[f(qe,{size:"small",color:"success"},{default:h(()=>[k(Y(a.value),1)]),_:1})]),default:h(()=>[f(Gt,null,{default:h(()=>[...m[5]||(m[5]=[k("Printing",-1)])]),_:1})]),_:1}),f(yt,null,{prepend:h(()=>[f(j,{color:"info"},{default:h(()=>[...m[6]||(m[6]=[k("ac_unit",-1)])]),_:1})]),append:h(()=>[f(qe,{size:"small",color:"info"},{default:h(()=>[k(Y(o.value),1)]),_:1})]),default:h(()=>[f(Gt,null,{default:h(()=>[...m[7]||(m[7]=[k("Operational",-1)])]),_:1})]),_:1}),f(yt,null,{prepend:h(()=>[f(j,{color:"warning"},{default:h(()=>[...m[8]||(m[8]=[k("handyman",-1)])]),_:1})]),append:h(()=>[f(qe,{size:"small",color:"warning"},{default:h(()=>[k(Y(l.value),1)]),_:1})]),default:h(()=>[f(Gt,null,{default:h(()=>[...m[9]||(m[9]=[k("Maintenance",-1)])]),_:1})]),_:1}),f(yt,null,{prepend:h(()=>[f(j,{color:"error"},{default:h(()=>[...m[10]||(m[10]=[k("usb_off",-1)])]),_:1})]),append:h(()=>[f(qe,{size:"small",color:"error"},{default:h(()=>[k(Y(c.value),1)]),_:1})]),default:h(()=>[f(Gt,null,{default:h(()=>[...m[11]||(m[11]=[k("Disconnected",-1)])]),_:1})]),_:1}),f(yt,null,{prepend:h(()=>[f(j,null,{default:h(()=>[...m[12]||(m[12]=[k("print_disabled",-1)])]),_:1})]),append:h(()=>[f(qe,{size:"small"},{default:h(()=>[k(Y(u.value),1)]),_:1})]),default:h(()=>[f(Gt,null,{default:h(()=>[...m[13]||(m[13]=[k("Disabled",-1)])]),_:1})]),_:1})]),_:1})]),_:1}),f(dn,null,{default:h(()=>[f(te,{variant:"tonal",color:"primary",block:"","prepend-icon":"dashboard",onClick:d},{default:h(()=>[...m[14]||(m[14]=[k(" View Dashboard ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]))}});class ka extends Cr{static async createTag(t){const n=`${ue.createGroupRoute}`,r={name:t};return await this.post(n,r)}static async deleteTag(t){const n=`${ue.deleteTagRoute(t)}`;return await this.delete(n)}static async getTagsWithPrinters(){const t=`${ue.printerTagsRoute}`;return await this.get(t)}static async addPrinterToTag(t,n){const r=`${ue.addPrinterToGroupRoute(t)}`,s={printerId:n};return await this.post(r,s)}static async deletePrinterTag(t,n){const r=`${ue.deletePrinterFromTagRoute(t)}`,s={printerId:n};return await this.delete(r,s)}static async updateGroupName(t,n){const r=`${ue.updateTagNameRoute(t)}`,s={name:n};return await this.patch(r,s)}}function Vc(){const e=q([]),t=q([]),n=q([]),r=q([]),s=async()=>{r.value=await ka.getTagsWithPrinters(),n.value=r.value.map(c=>({id:c.id,name:c.name}))},i=c=>e.value.length===0?!0:r.value.some(u=>e.value.includes(u.id)&&u.printers.some(d=>d.printerId===c)),a=c=>t.value.length===0?!0:t.value.includes(c.printerType);return{selectedTags:e,selectedPrinterTypes:t,tags:n,tagsWithPrinters:r,loadTags:s,matchesTagFilter:i,matchesPrinterTypeFilter:a,filterPrinters:c=>c.filter(u=>i(u.id)&&a(u)),clearFilters:()=>{e.value=[],t.value=[]}}}const Vl=Ae({inheritAttrs:!1,__name:"PrinterTagFilter",props:{modelValue:{},tags:{},label:{default:"Filter by tags"},prependInnerIcon:{default:"label"},prependIcon:{},variant:{default:"outlined"},density:{default:"compact"},multiple:{type:Boolean,default:!0},chips:{type:Boolean,default:!0},closableChips:{type:Boolean,default:!0},clearable:{type:Boolean,default:!0},hideDetails:{type:Boolean,default:!0},hideWhenEmpty:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(e){return(t,n)=>e.tags.length||!e.hideWhenEmpty?($(),J(Ai,ce({key:0},t.$attrs,{"model-value":e.modelValue,items:e.tags,"item-title":"name","item-value":"id",label:e.label,"prepend-inner-icon":e.prependInnerIcon,"prepend-icon":e.prependIcon,variant:e.variant,density:e.density,multiple:e.multiple,chips:e.chips,"closable-chips":e.closableChips,clearable:e.clearable,"hide-details":e.hideDetails,"onUpdate:modelValue":n[0]||(n[0]=r=>t.$emit("update:modelValue",r))}),null,16,["model-value","items","label","prepend-inner-icon","prepend-icon","variant","density","multiple","chips","closable-chips","clearable","hide-details"])):se("",!0)}}),Bl=Ae({inheritAttrs:!1,__name:"PrinterTypeFilter",props:{modelValue:{},label:{default:"Filter by type"},prependInnerIcon:{default:"category"},prependIcon:{},variant:{default:"outlined"},density:{default:"compact"},multiple:{type:Boolean,default:!0},chips:{type:Boolean,default:!0},closableChips:{type:Boolean,default:!0},clearable:{type:Boolean,default:!0},hideDetails:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(e){const t=Zq;return(n,r)=>($(),J(Ai,ce(n.$attrs,{"model-value":e.modelValue,items:Q(t),"item-title":"name","item-value":"value",label:e.label,"prepend-inner-icon":e.prependInnerIcon,"prepend-icon":e.prependIcon,variant:e.variant,density:e.density,multiple:e.multiple,chips:e.chips,"closable-chips":e.closableChips,clearable:e.clearable,"hide-details":e.hideDetails,"onUpdate:modelValue":r[0]||(r[0]=s=>n.$emit("update:modelValue",s))}),null,16,["model-value","items","label","prepend-inner-icon","prepend-icon","variant","density","multiple","chips","closable-chips","clearable","hide-details"]))}}),jX=oe({bordered:Boolean,color:String,content:[Number,String],dot:Boolean,floating:Boolean,icon:Fe,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(),...aa({location:"top end"}),...Tn(),...lt(),...wt(),...kl({transition:"scale-rotate-transition"}),...Vn()},"VBadge"),Up=be()({name:"VBadge",inheritAttrs:!1,props:jX(),setup(e,t){const{backgroundColorClasses:n,backgroundColorStyles:r}=yn(()=>e.color),{roundedClasses:s}=An(e),{t:i}=kr(),{textColorClasses:a,textColorStyles:o}=Qr(()=>e.textColor),{themeClasses:l}=Cy(),{locationStyles:c}=oo(e,!0,d=>(e.floating?e.dot?2:4:e.dot?8:12)+(["top","bottom"].includes(d)?Number(e.offsetY??0):["left","right"].includes(d)?Number(e.offsetX??0):0)),{dimensionStyles:u}=Bn(e);return Ie(()=>{const d=Number(e.content),p=!e.max||isNaN(d)?e.content:d<=Number(e.max)?d:`${e.max}+`,[m,v]=vg(t.attrs,["aria-atomic","aria-label","aria-live","role","title"]);return f(e.tag,ce({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]},v,{style:e.style}),{default:()=>[S("div",{class:"v-badge__wrapper"},[t.slots.default?.(),f($s,{transition:e.transition},{default:()=>[Pt(S("span",ce({class:["v-badge__badge",l.value,n.value,s.value,a.value],style:[r.value,o.value,u.value,e.inline?{}:c.value],"aria-atomic":"true","aria-label":i(e.label,d),"aria-live":"polite",role:"status"},m),[e.dot?void 0:t.slots.badge?t.slots.badge?.():e.icon?f(j,{icon:e.icon},null):p]),[[$r,e.modelValue]])]})])]})}),{}}}),HX={class:"text-center"},qX={class:"d-flex ga-2 mb-3"},WX=Ae({__name:"PrintJobsMenu",setup(e){const t=Kn(),n=q(""),r=q(!1),{selectedTags:s,selectedPrinterTypes:i,tags:a,loadTags:o,matchesTagFilter:l,matchesPrinterTypeFilter:c}=Vc();ot(async()=>{await o()});const u=A(()=>t.printersWithJob.filter(m=>{const g=m.job?.job?.file.name?.toLowerCase()||"",b=m.printer.printerURL?.toLowerCase()||"",y=m.printer.name?.toLowerCase()||"",w=`${g} ${b} ${y}`,_=!n.value||w.includes(n.value.toLowerCase()),T=l(m.printer.id),P=c(m.printer);return _&&T&&P})),d=A(()=>u.value.length||0);function p(m){return m?m?.toFixed(0):""}return _e(r,()=>{n.value=""}),(m,v)=>($(),pe("div",HX,[f(da,{modelValue:r.value,"onUpdate:modelValue":v[4]||(v[4]=g=>r.value=g),"close-on-content-click":!1,location:"bottom",width:"800"},{activator:h(({props:g})=>[f(te,ce({color:d.value?"success":"",variant:"tonal"},g),{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...v[5]||(v[5]=[k("work",-1)])]),_:1}),k(" Active Jobs ("+Y(d.value)+") ",1),d.value>0?($(),J(Up,{key:0,content:d.value,color:"success",inline:"",class:"ml-2"},null,8,["content"])):se("",!0)]),_:1},16,["color"])]),default:h(()=>[f($e,null,{default:h(()=>[f(Lt,{class:"d-flex align-center"},{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...v[6]||(v[6]=[k("work",-1)])]),_:1}),v[7]||(v[7]=k(" Active Print Jobs ",-1)),f(Ft),f(qe,{size:"small",color:"success"},{default:h(()=>[k(Y(d.value),1)]),_:1})]),_:1}),f(Xe,{class:"pa-3"},{default:h(()=>[f(Qe,{modelValue:n.value,"onUpdate:modelValue":v[0]||(v[0]=g=>n.value=g),clearable:"",label:"Search",placeholder:"Search by filename or printer name...","prepend-inner-icon":"search",variant:"outlined",density:"compact","hide-details":"",class:"mb-3"},null,8,["modelValue"]),S("div",qX,[f(Vl,{modelValue:Q(s),"onUpdate:modelValue":v[1]||(v[1]=g=>nt(s)?s.value=g:null),tags:Q(a),label:"Filter by tags",style:{flex:"1"}},null,8,["modelValue","tags"]),f(Bl,{modelValue:Q(i),"onUpdate:modelValue":v[2]||(v[2]=g=>nt(i)?i.value=g:null),label:"Filter by type",style:{flex:"1"}},null,8,["modelValue"])])]),_:1}),f(pt),f(_s,{style:{"overflow-y":"auto","flex-shrink":"1"}},{default:h(()=>[d.value?se("",!0):($(),J(yt,{key:0},{default:h(()=>[...v[8]||(v[8]=[k(" No active prints ",-1)])]),_:1})),($(!0),pe(ke,null,Ot(u.value,({printer:g,job:b})=>($(),J(yt,{key:g.id,lines:"two"},{prepend:h(()=>[f(Sn,{size:"70"},{default:h(()=>[f(un,{"model-value":b?.progress?.completion,width:5,color:"green",size:"50"},{default:h(()=>[k(Y(p(b.progress?.completion)+"%"||""),1)]),_:2},1032,["model-value"])]),_:2},1024)]),default:h(()=>[f(Gt,null,{default:h(()=>[k(Y(b.job?.file?.name),1)]),_:2},1024),f(Fl,null,{default:h(()=>[k(" Elapsed: "+Y(Math.round(b?.progress.printTime??0/60))+" minutes ",1),v[9]||(v[9]=S("br",null,null,-1)),k(" Printer: "+Y(g.name),1)]),_:2},1024)]),_:2},1024))),128))]),_:1}),f(dn,null,{default:h(()=>[f(Ft),f(te,{variant:"tonal",onClick:v[3]||(v[3]=g=>r.value=!1)},{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...v[10]||(v[10]=[k("close",-1)])]),_:1}),v[11]||(v[11]=k(" Close ",-1))]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])]))}}),d1=wr("profile",{state:()=>({username:null,isDemoUser:null,userId:null}),actions:{async getProfile(){return await qr.getProfile().then(e=>{this.username=e.username,this.userId=e.id,this.isDemoUser=e.isDemoUser})}}}),xt={Home:"Home",Dashboard:"Dashboard",Login:"Login",Registration:"Registration",PrintersView:"PrintersView",Settings:"Settings",CameraGridView:"CameraGridView",PrintJobs:"Print Jobs",About:"About",PermissionDenied:"PermissionDenied",NotFound:"NotFound",FirstTimeSetup:"FirstTimeSetup"};async function GX(e,t){return e.push({name:t})}async function r2(e){if(e.currentRoute.value.path==="/login"){console.log("routeToLogin: already at login page");return}return GX(e,xt.Login)}const ih=!0,KX=()=>Object.freeze({apiKeyLength:43,maxPort:65535,maxPrinterNameLength:25,maxPrinterGroupNameLength:30,maxPrinterGroupLocationX:4,maxPrinterGroupLocationY:4,minPrinterFloorNameLength:3,minUsernameLength:3}),YX=wr("tracked-uploads",()=>{const e=q([]),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}}),zs=Object.create(null);zs.open="0";zs.close="1";zs.ping="2";zs.pong="3";zs.message="4";zs.upgrade="5";zs.noop="6";const Ld=Object.create(null);Object.keys(zs).forEach(e=>{Ld[zs[e]]=e});const Vv={type:"error",data:"parser error"},s2=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",i2=typeof ArrayBuffer=="function",a2=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,f1=({type:e,data:t},n,r)=>s2&&t instanceof Blob?n?r(t):yk(t,r):i2&&(t instanceof ArrayBuffer||a2(t))?n?r(t):yk(new Blob([t]),r):r(zs[e]+(t||"")),yk=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function bk(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let ah;function JX(e,t){if(s2&&e.data instanceof Blob)return e.data.arrayBuffer().then(bk).then(t);if(i2&&(e.data instanceof ArrayBuffer||a2(e.data)))return t(bk(e.data));f1(e,!1,n=>{ah||(ah=new TextEncoder),t(ah.encode(n))})}const Sk="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",iu=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<Sk.length;e++)iu[Sk.charCodeAt(e)]=e;const XX=e=>{let t=e.length*.75,n=e.length,r,s=0,i,a,o,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const c=new ArrayBuffer(t),u=new Uint8Array(c);for(r=0;r<n;r+=4)i=iu[e.charCodeAt(r)],a=iu[e.charCodeAt(r+1)],o=iu[e.charCodeAt(r+2)],l=iu[e.charCodeAt(r+3)],u[s++]=i<<2|a>>4,u[s++]=(a&15)<<4|o>>2,u[s++]=(o&3)<<6|l&63;return c},QX=typeof ArrayBuffer=="function",p1=(e,t)=>{if(typeof e!="string")return{type:"message",data:o2(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:ZX(e.substring(1),t)}:Ld[n]?e.length>1?{type:Ld[n],data:e.substring(1)}:{type:Ld[n]}:Vv},ZX=(e,t)=>{if(QX){const n=XX(e);return o2(n,t)}else return{base64:!0,data:e}},o2=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,l2="",eQ=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((i,a)=>{f1(i,!1,o=>{r[a]=o,++s===n&&t(r.join(l2))})})},tQ=(e,t)=>{const n=e.split(l2),r=[];for(let s=0;s<n.length;s++){const i=p1(n[s],t);if(r.push(i),i.type==="error")break}return r};function nQ(){return new TransformStream({transform(e,t){JX(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 oh;function cd(e){return e.reduce((t,n)=>t+n.length,0)}function dd(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 rQ(e,t){oh||(oh=new TextDecoder);const n=[];let r=0,s=-1,i=!1;return new TransformStream({transform(a,o){for(n.push(a);;){if(r===0){if(cd(n)<1)break;const l=dd(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(cd(n)<2)break;const l=dd(n,2);s=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(cd(n)<8)break;const l=dd(n,8),c=new DataView(l.buffer,l.byteOffset,l.length),u=c.getUint32(0);if(u>Math.pow(2,21)-1){o.enqueue(Vv);break}s=u*Math.pow(2,32)+c.getUint32(4),r=3}else{if(cd(n)<s)break;const l=dd(n,s);o.enqueue(p1(i?l:oh.decode(l),t)),r=0}if(s===0||s>e){o.enqueue(Vv);break}}}})}const u2=4;function vn(e){if(e)return sQ(e)}function sQ(e){for(var t in vn.prototype)e[t]=vn.prototype[t];return e}vn.prototype.on=vn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};vn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};vn.prototype.off=vn.prototype.removeListener=vn.prototype.removeAllListeners=vn.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};vn.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};vn.prototype.emitReserved=vn.prototype.emit;vn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};vn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const zp=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Gr=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),iQ="arraybuffer";function c2(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const aQ=Gr.setTimeout,oQ=Gr.clearTimeout;function jp(e,t){t.useNativeTimers?(e.setTimeoutFn=aQ.bind(Gr),e.clearTimeoutFn=oQ.bind(Gr)):(e.setTimeoutFn=Gr.setTimeout.bind(Gr),e.clearTimeoutFn=Gr.clearTimeout.bind(Gr))}const lQ=1.33;function uQ(e){return typeof e=="string"?cQ(e):Math.ceil((e.byteLength||e.size)*lQ)}function cQ(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 d2(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function dQ(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function fQ(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 pQ extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class m1 extends vn{constructor(t){super(),this.writable=!1,jp(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 pQ(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=p1(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=dQ(t);return n.length?"?"+n:""}}class mQ extends m1{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)};tQ(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,eQ(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]=d2()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let f2=!1;try{f2=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const hQ=f2;function gQ(){}class vQ extends mQ{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 Ho=class $d extends vn{constructor(t,n,r){super(),this.createRequest=t,jp(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=c2(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=$d.requestsCount++,$d.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=gQ,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete $d.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()}};Ho.requestsCount=0;Ho.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",wk);else if(typeof addEventListener=="function"){const e="onpagehide"in Gr?"pagehide":"unload";addEventListener(e,wk,!1)}}function wk(){for(let e in Ho.requests)Ho.requests.hasOwnProperty(e)&&Ho.requests[e].abort()}const yQ=(function(){const e=p2({xdomain:!1});return e&&e.responseType!==null})();class bQ extends vQ{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=yQ&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Ho(p2,this.uri(),t)}}function p2(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||hQ))return new XMLHttpRequest}catch{}if(!t)try{return new Gr[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const m2=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class SQ extends m1{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=m2?{}:c2(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;f1(r,this.supportsBinary,i=>{try{this.doWrite(r,i)}catch{}s&&zp(()=>{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]=d2()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const lh=Gr.WebSocket||Gr.MozWebSocket;class wQ extends SQ{createSocket(t,n,r){return m2?new lh(t,n,r):n?new lh(t,n):new lh(t)}doWrite(t,n){this.ws.send(n)}}class _Q extends m1{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=rQ(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=nQ();s.readable.pipeTo(t.writable),this._writer=s.writable.getWriter();const i=()=>{r.read().then(({done:o,value:l})=>{o||(this.onPacket(l),i())}).catch(o=>{})};i();const a={type:"open"};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this._writer.write(a).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&&zp(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const kQ={websocket:wQ,webtransport:_Q,polling:bQ},xQ=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,EQ=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Bv(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=xQ.exec(e||""),i={},a=14;for(;a--;)i[EQ[a]]=s[a]||"";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=CQ(i,i.path),i.queryKey=TQ(i,i.query),i}function CQ(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 TQ(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,i){s&&(n[s]=i)}),n}const Uv=typeof addEventListener=="function"&&typeof removeEventListener=="function",Fd=[];Uv&&addEventListener("offline",()=>{Fd.forEach(e=>e())},!1);class Yi extends vn{constructor(t,n){if(super(),this.binaryType=iQ,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=Bv(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=Bv(n.host).host);jp(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=fQ(this.opts.query)),Uv&&(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"})},Fd.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=u2,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&&Yi.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",Yi.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+=uQ(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,zp(()=>{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(Yi.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(),Uv&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Fd.indexOf(this._offlineEventListener);r!==-1&&Fd.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Yi.protocol=u2;class IQ extends Yi{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;Yi.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;Yi.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(u(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const p=new Error("probe error");p.transport=n.name,this.emitReserved("upgradeError",p)}}))};function i(){r||(r=!0,u(),n.close(),n=null)}const a=d=>{const p=new Error("probe error: "+d);p.transport=n.name,i(),this.emitReserved("upgradeError",p)};function o(){a("transport closed")}function l(){a("socket closed")}function c(d){n&&d.name!==n.name&&i()}const u=()=>{n.removeListener("open",s),n.removeListener("error",a),n.removeListener("close",o),this.off("close",l),this.off("upgrading",c)};n.once("open",s),n.once("error",a),n.once("close",o),this.once("close",l),this.once("upgrading",c),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 RQ=class extends IQ{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=>kQ[s]).filter(s=>!!s)),super(t,r)}};function PQ(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=Bv(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 AQ=typeof ArrayBuffer=="function",OQ=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,h2=Object.prototype.toString,DQ=typeof Blob=="function"||typeof Blob<"u"&&h2.call(Blob)==="[object BlobConstructor]",LQ=typeof File=="function"||typeof File<"u"&&h2.call(File)==="[object FileConstructor]";function h1(e){return AQ&&(e instanceof ArrayBuffer||OQ(e))||DQ&&e instanceof Blob||LQ&&e instanceof File}function Nd(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Nd(e[n]))return!0;return!1}if(h1(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Nd(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Nd(e[n]))return!0;return!1}function $Q(e){const t=[],n=e.data,r=e;return r.data=zv(n,t),r.attachments=t.length,{packet:r,buffers:t}}function zv(e,t){if(!e)return e;if(h1(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]=zv(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]=zv(e[r],t));return n}return e}function FQ(e,t){return e.data=jv(e.data,t),delete e.attachments,e}function jv(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]=jv(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=jv(e[n],t));return e}const NQ=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],MQ=5;var dt;(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"})(dt||(dt={}));class VQ{constructor(t){this.replacer=t}encode(t){return(t.type===dt.EVENT||t.type===dt.ACK)&&Nd(t)?this.encodeAsBinary({type:t.type===dt.EVENT?dt.BINARY_EVENT:dt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===dt.BINARY_EVENT||t.type===dt.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=$Q(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}function _k(e){return Object.prototype.toString.call(e)==="[object Object]"}class g1 extends vn{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===dt.BINARY_EVENT;r||n.type===dt.BINARY_ACK?(n.type=r?dt.EVENT:dt.ACK,this.reconstructor=new BQ(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(h1(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(dt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===dt.BINARY_EVENT||r.type===dt.BINARY_ACK){const i=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const a=t.substring(i,n);if(a!=Number(a)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(a)}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 a=t.charAt(n);if(a==null||Number(a)!=a){--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(g1.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 dt.CONNECT:return _k(n);case dt.DISCONNECT:return n===void 0;case dt.CONNECT_ERROR:return typeof n=="string"||_k(n);case dt.EVENT:case dt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&NQ.indexOf(n[0])===-1);case dt.ACK:case dt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class BQ{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=FQ(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const UQ=Object.freeze(Object.defineProperty({__proto__:null,Decoder:g1,Encoder:VQ,get PacketType(){return dt},protocol:MQ},Symbol.toStringTag,{value:"Module"}));function us(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const zQ=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class g2 extends vn{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=[us(t,"open",this.onopen.bind(this)),us(t,"packet",this.onpacket.bind(this)),us(t,"error",this.onerror.bind(this)),us(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(zQ.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 a={type:dt.EVENT,data:n};if(a.options={},a.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const u=this.ids++,d=n.pop();this._registerAckCallback(u,d),a.id=u}const o=(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&&!o||(l?(this.notifyOutgoingListeners(a),this.packet(a)):this.sendBuffer.push(a)),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 o=0;o<this.sendBuffer.length;o++)this.sendBuffer[o].id===t&&this.sendBuffer.splice(o,1);n.call(this,new Error("operation has timed out"))},s),a=(...o)=>{this.io.clearTimeoutFn(i),n.apply(this,o)};a.withError=!0,this.acks[t]=a}emitWithAck(t,...n){return new Promise((r,s)=>{const i=(a,o)=>a?s(a):r(o);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)=>(this._queue[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:dt.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 dt.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 dt.EVENT:case dt.BINARY_EVENT:this.onevent(t);break;case dt.ACK:case dt.BINARY_ACK:this.onack(t);break;case dt.DISCONNECT:this.ondisconnect();break;case dt.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:dt.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._drainQueue(!0),this.emitReserved("connect")}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:dt.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 Ul(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}Ul.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)==0?e-n:e+n}return Math.min(e,this.max)|0};Ul.prototype.reset=function(){this.attempts=0};Ul.prototype.setMin=function(e){this.ms=e};Ul.prototype.setMax=function(e){this.max=e};Ul.prototype.setJitter=function(e){this.jitter=e};class Hv extends vn{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,jp(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 Ul({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||UQ;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 RQ(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=us(n,"open",function(){r.onopen(),t&&t()}),i=o=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",o),t?t(o):this.maybeReconnectOnOpen()},a=us(n,"error",i);if(this._timeout!==!1){const o=this._timeout,l=this.setTimeoutFn(()=>{s(),i(new Error("timeout")),n.close()},o);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(s),this.subs.push(a),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(us(t,"ping",this.onping.bind(this)),us(t,"data",this.ondata.bind(this)),us(t,"error",this.onerror.bind(this)),us(t,"close",this.onclose.bind(this)),us(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){zp(()=>{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 g2(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 eu={};function Md(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=PQ(e,t.path||"/socket.io"),r=n.source,s=n.id,i=n.path,a=eu[s]&&i in eu[s].nsps,o=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return o?l=new Hv(r,t):(eu[s]||(eu[s]=new Hv(r,t)),l=eu[s]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(Md,{Manager:Hv,Socket:g2,io:Md,connect:Md});let jQ=0;const v2=wr("DebugSocket",{state:()=>({messages:[],maxMessages:500,enabled:!1,paused:!1,filter:""}),getters:{filteredMessages(){if(!this.filter)return this.messages;const e=this.filter.toLowerCase();return this.messages.filter(t=>t.event.toLowerCase().includes(e)||JSON.stringify(t.data).toLowerCase().includes(e))},messageCount(){return this.messages.length}},actions:{enable(){this.enabled=!0},disable(){this.enabled=!1},togglePause(){this.paused=!this.paused},logMessage(e,t,n){if(!this.enabled||this.paused)return;const r={id:++jQ,timestamp:new Date,direction:e,event:t,data:n};this.messages.push(r),this.messages.length>this.maxMessages&&(this.messages=this.messages.slice(-this.maxMessages))},clearMessages(){this.messages=[]},setFilter(e){this.filter=e},setMaxMessages(e){this.maxMessages=e,this.messages.length>e&&(this.messages=this.messages.slice(-e))}}}),zl=wr("Overlay",{state:()=>({loading:!0,overlay:!0,overlayMessage:"",serverDisconnected:!1,errorCaught:null,errorUrl:null,errorResponse:null,isRetrying:!1,nextRetryTime:null,isTestingConnection:!1}),actions:{setLoading(e){this.loading=e},setOverlay(e,t=""){this.overlay=e,this.overlayMessage=t},hideOverlay(){this.overlay=!1,this.overlayMessage="",this.loading=!1},setServerDisconnected(e){this.serverDisconnected=e,e?(hy().closeAllDialogs(),Nc().closeFileExplorer(),this.overlay=!0,this.loading=!1):(this.overlay=!1,this.loading=!1)},setError(e,t=null,n=null){this.errorCaught=e,this.errorUrl=t,this.errorResponse=n,e&&(this.loading=!1)},clearError(){this.errorCaught=null,this.errorUrl=null,this.errorResponse=null},startRetry(e){this.isRetrying=!0,this.nextRetryTime=Date.now()+e},incrementRetry(e){this.nextRetryTime=Date.now()+e},resetRetry(){this.isRetrying=!1,this.nextRetryTime=null,this.isTestingConnection=!1},setTestingConnection(e){this.isTestingConnection=e},retryNow(){this.nextRetryTime=Date.now()}}});let Wt=null;const kn=Jt({connected:!1,setup:!1,id:"",active:!1});class HQ{printerStore=At();floorStore=ns();printerStateStore=Kn();testPrinterStore=o1();trackedUploadsStore=YX();debugSocketStore=v2();appLoaderStore=zl();snackbar=bt();authStore=Zr();socketState(){return Wt?{setup:!0,connected:Wt.connected,active:Wt.active,id:Wt.id}:(console.debug("Returning default socket state, socket was not set up"),{setup:!1})}async setupSocketConnection(){if(console.debug("Setting up socket.io client"),kn.setup)throw new Error("Cant setup socket, socket already created");kn.setup=!1;const t=await dP();this.authStore.loadTokens(),Wt=Md(t,{auth:async n=>{if(!this.authStore.loginRequired)return n({});try{this.authStore.isLoginExpired&&(console.warn("Login expired, attempting to refresh token"),await this.authStore.refreshLoginToken()),this.authStore.token?n({token:this.authStore.token}):(console.error("No token available after refresh"),n({}))}catch(r){console.error("Token refresh failed:",r),n({})}}}),this.setupConnectionHandlers(),this.registerMessageHandlers(),kn.setup=!0}disconnect(){if(!Wt)throw new Error("Cant disconnect socket, socket not created");Wt.close(),Wt=null,kn.setup=!1,kn.connected=!1,kn.active=!1,kn.id=""}reconnect(){if(!Wt)throw new Error("Cant reconnect socket, socket not created");console.debug("Resetting socket connection. Previous state:",{connected:Wt.connected,active:Wt.active,id:Wt.id}),Wt.close(),Wt.connect()}onMessage(t){t.trackedUploads.current?.length&&(this.trackedUploadsStore.setUploads(t?.trackedUploads.current),this.trackedUploadsStore.activeUploads.forEach(n=>{this.snackbar.openProgressMessage(n.correlationToken,n.multerFile.originalname,(n.progress||0)*100,n.completed)})),t.floors?.length&&this.floorStore.saveFloors(t.floors),t.printers?.length&&this.printerStore.setPrinters(t.printers),t.socketStates&&this.printerStateStore.setSocketStates(t.socketStates),t.printerEvents&&this.printerStateStore.setPrinterEvents(t.printerEvents)}setupConnectionHandlers(){if(!Wt)throw new Error("Cant bind socket events, socket not created");Wt.on("connect",()=>{kn.id=Wt?.id??"",kn.connected=!0,kn.active=Wt?.active??!1,console.debug("Socket connected:",kn.id,"Active:",kn.active),this.appLoaderStore.setServerDisconnected(!1),this.appLoaderStore.resetRetry()}),Wt.on("disconnect",()=>{kn.id="",kn.connected=!1,kn.active=!1,console.debug("Socket disconnected"),this.appLoaderStore.setServerDisconnected(!0),nr("backend:start-retry").emit()}),Wt.on("connect_error",async t=>{if(console.error("Socket connection error:",t.message),t.message.includes("Authentication")||t.message.includes("jwt")||t.message.includes("token")||t.message.includes("auth")){console.warn("Possible JWT authentication issue detected");try{await this.authStore.refreshLoginToken(),this.reconnect()}catch{console.error("Error refreshing token"),this.disconnect(),await this.authStore.logout()}}else this.appLoaderStore.setServerDisconnected(!0)})}registerMessageHandlers(){if(!Wt)throw new Error("Cant bind socket app events, socket not created");Wt.onAny((t,...n)=>{this.debugSocketStore.logMessage("in",t,n.length===1?n[0]:n)}),Wt.on("update",t=>this.onMessage(t)),Wt.on("test-printer-state",t=>{this.testPrinterStore.saveEvent(t)})}}const qQ=oe({scrollTarget:{type:String},scrollThreshold:{type:[String,Number],default:300}},"scroll");function WQ(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{canScroll:n,layoutSize:r}=t;let s=0,i=0;const a=q(null),o=Ee(0),l=Ee(0),c=Ee(0),u=Ee(!1),d=Ee(!1),p=Ee(!1),m=Ee(!1),v=Ee(!0),g=A(()=>Number(e.scrollThreshold)),b=A(()=>In((g.value-o.value)/g.value||0));function y(P){const x="window"in P?window.innerHeight:P.clientHeight,C="window"in P?document.documentElement.scrollHeight:P.scrollHeight;return{clientHeight:x,scrollHeight:C}}function w(){const P=a.value;if(!P)return;const{clientHeight:x,scrollHeight:C}=y(P),E=C-x,R=r?.value||0,I=g.value+R;v.value=E>I}function _(){w()}function T(){const P=a.value;if(!P||n&&!n.value)return;s=o.value,o.value="window"in P?P.pageYOffset:P.scrollTop;const x=P instanceof Window?document.documentElement.scrollHeight:P.scrollHeight;i!==x&&(x>i&&w(),i=x),d.value=o.value<s,c.value=Math.abs(o.value-g.value);const{clientHeight:C,scrollHeight:E}=y(P),R=o.value+C>=E-5;!d.value&&R&&o.value>=g.value&&v.value&&(m.value=!0);const I=Math.abs(o.value-s)>100,O=o.value<=5;(d.value&&s-o.value>1&&!R||I&&o.value<g.value||O)&&(m.value=!1),p.value=R}return _e(d,()=>{l.value=l.value||o.value}),_e(u,()=>{l.value=0}),ot(()=>{_e(()=>e.scrollTarget,P=>{const x=P?document.querySelector(P):window;x&&x!==a.value&&(a.value?.removeEventListener("scroll",T),a.value=x,a.value.addEventListener("scroll",T,{passive:!0}),Promise.resolve().then(()=>{w()}))},{immediate:!0}),window.addEventListener("resize",_,{passive:!0})}),Mn(()=>{a.value?.removeEventListener("scroll",T),window.removeEventListener("resize",_)}),n&&_e(n,T,{immediate:!0}),{scrollThreshold:g,currentScroll:o,currentThreshold:c,isScrollActive:u,scrollRatio:b,isScrollingUp:d,savedScroll:l,isAtBottom:p,reachedBottomWhileScrollingDown:m,hasEnoughScrollableSpace:v}}const GQ=oe({scrollBehavior:String,modelValue:{type:Boolean,default:!0},location:{type:String,default:"top",validator:e=>["top","bottom"].includes(e)},...HA(),...BP(),...qQ(),height:{type:[Number,String],default:64}},"VAppBar"),y2=be()({name:"VAppBar",props:GQ(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=q(),s=tt(e,"modelValue"),i=A(()=>{const x=new Set(e.scrollBehavior?.split(" ")??[]);return{hide:x.has("hide"),fullyHide:x.has("fully-hide"),inverted:x.has("inverted"),collapse:x.has("collapse"),elevate:x.has("elevate"),fadeImage:x.has("fade-image")}}),a=A(()=>{const x=i.value;return x.hide||x.fullyHide||x.inverted||x.collapse||x.elevate||x.fadeImage||!s.value}),o=A(()=>{const x=r.value?.contentHeight??0,C=r.value?.extensionHeight??0;return x+C}),{currentScroll:l,scrollThreshold:c,isScrollingUp:u,scrollRatio:d,isAtBottom:p,reachedBottomWhileScrollingDown:m,hasEnoughScrollableSpace:v}=WQ(e,{canScroll:a,layoutSize:o}),g=ee(()=>i.value.hide||i.value.fullyHide),b=A(()=>e.collapse||i.value.collapse&&(i.value.inverted?d.value>0:d.value===0)),y=A(()=>e.flat||i.value.fullyHide&&!s.value||i.value.elevate&&(i.value.inverted?l.value>0:l.value===0)),w=A(()=>i.value.fadeImage?i.value.inverted?1-d.value:d.value:void 0),_=A(()=>{if(i.value.hide&&i.value.inverted)return 0;const x=r.value?.contentHeight??0,C=r.value?.extensionHeight??0;return g.value?l.value<c.value||i.value.fullyHide?x+C:x:x+C});hr(()=>!!e.scrollBehavior,()=>{bn(()=>{if(!g.value){s.value=!0;return}if(i.value.inverted){s.value=l.value>c.value;return}if(!v.value){s.value=!0;return}if(m.value){s.value=!1;return}s.value=u.value&&!p.value||l.value<c.value})});const{ssrBootStyles:T}=Lc(),{layoutItemStyles:P}=zP({id:e.name,order:A(()=>parseInt(e.order,10)),position:ee(()=>e.location),layoutSize:_,elementSize:Ee(void 0),active:s,absolute:ee(()=>e.absolute)});return Ie(()=>{const x=ro.filterProps(e);return f(ro,ce({ref:r,class:["v-app-bar",{"v-app-bar--bottom":e.location==="bottom"},e.class],style:[{...P.value,"--v-toolbar-image-opacity":w.value,height:void 0,...T.value},e.style]},x,{collapse:b.value,flat:y.value}),n)}),{}}}),KQ={key:1,class:"text-uppercase text--white"},YQ=Ae({__name:"TopBar",setup(e){const t=d1(),n=Zr(),r=ks(),s=[{title:"Open Profile",icon:"mdi:mdi-account",path:"/settings/account"}],i=q(Date.now());i$(()=>{i.value=Date.now()},1e3);const a=A(()=>{if(!n.tokenClaims?.exp)return"";const u=n.tokenClaims.exp-i.value/1e3;return`${Math.round(u)}s`}),o=A(()=>t.username),l=A(()=>n.isDemoMode);async function c(){await n.logout(!0),await r2(r)}return(u,d)=>{const p=$J,m=LJ;return $(),J(y2,{elevation:"0"},{default:h(()=>[f(Us,{class:"text-uppercase text-white"},{default:h(()=>[...d[1]||(d[1]=[S("span",{class:"font-weight-light"}," FDM ",-1),S("strong",null," Monster ",-1)])]),_:1}),l.value?($(),J(Ft,{key:0})):se("",!0),l.value?($(),pe("h2",KQ," DEMO MODE ")):se("",!0),f(Ft),f(zX),f(WX),Q(n).hasAuthToken&&!Q(n).isLoginExpired?($(),J(da,{key:2,"close-on-content-click":!1,location:"bottom right","open-on-hover":"",transition:"slide-y-transition"},{activator:h(({props:v})=>[f(te,ce({class:"ml-2",variant:"tonal"},v),{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...d[2]||(d[2]=[k("mdi:mdi-account",-1)])]),_:1}),k(" "+Y(o.value),1)]),_:1},16)]),default:h(()=>[f(_s,null,{default:h(()=>[($(),pe(ke,null,Ot(s,(v,g)=>f(yt,{key:g,to:v.path,title:v.title,"prepend-icon":v.icon,link:""},null,8,["to","title","prepend-icon"])),64)),Q(ih)?($(),J(pt,{key:0})):se("",!0),Q(ih)&&a.value?($(),J(yt,{key:1,disabled:""},{prepend:h(()=>[f(j,null,{default:h(()=>[...d[3]||(d[3]=[k("schedule",-1)])]),_:1})]),default:h(()=>[f(Gt,{class:"text-caption"},{default:h(()=>[k(" Auth Expiry: "+Y(a.value),1)]),_:1})]),_:1})):se("",!0),Q(ih)?($(),J(yt,{key:2,disabled:""},{prepend:h(()=>[f(j,null,{default:h(()=>[...d[4]||(d[4]=[k("wifi",-1)])]),_:1})]),default:h(()=>[f(Gt,{class:"text-caption font-monospace"},{default:h(()=>[k(" SocketIO: S"+Y(Q(kn).setup?1:0)+" C"+Y(Q(kn).connected?1:0)+" A"+Y(Q(kn).active?1:0),1)]),_:1}),f(Fl,{class:"text-caption"},{default:h(()=>[k(Y(Q(kn).id),1)]),_:1})]),_:1})):se("",!0)]),_:1})]),_:1})):se("",!0),Q(n).loginRequired===!0?($(),J(p,{key:3,tooltip:"Go back to login",text:"Logout",icon:"logout",variant:"tonal",onClick:d[0]||(d[0]=v=>c())})):se("",!0),f(m)]),_:1})}}}),v1="/assets/logo-CJVdjy51.png",JQ={class:"d-flex justify-center align-center logo-container"},XQ=Ae({__name:"NavigationBar",setup(e){const t=[["dashboard","Dashboard","/dashboard"],["view_module","Printer Grid","/printers-grid"],["mdi:mdi-printer","Printers","/printers"],["mdi:mdi-camera","Cameras","/cameras"],["mdi:mdi-history","Print Jobs","/jobs"],["mdi:mdi-cog","Settings","/settings"]];return(n,r)=>($(),J(Ub,{permanent:"",rail:""},{default:h(()=>[S("div",JQ,[f(ms,{alt:"FDM Monster Logo",src:Q(v1),class:"logo-image",transition:"scale-transition"},null,8,["src"])]),f(pt),f(_s,{density:"compact",nav:""},{default:h(()=>[($(),pe(ke,null,Ot(t,([s,i,a],o)=>f(Kt,{key:o,location:"end"},{activator:h(({props:l})=>[f(yt,ce({ref_for:!0},l,{to:a,"prepend-icon":s,density:"comfortable","router-link":""}),null,16,["to","prepend-icon"])]),default:h(()=>[S("span",null,Y(i),1)]),_:2},1024)),64))]),_:1})]),_:1}))}}),QQ=fn(XQ,[["__scopeId","data-v-92af8da9"]]);function ZQ(e){const t=Ee(e());let n=-1;function r(){clearInterval(n)}function s(){r(),ut(()=>t.value=e())}function i(a){const o=a?getComputedStyle(a):{transitionDuration:.2},l=parseFloat(o.transitionDuration)*1e3||200;if(r(),t.value<=0)return;const c=performance.now();n=window.setInterval(()=>{const u=performance.now()-c+l;t.value=Math.max(e()-u,0),t.value<=0&&r()},l)}return Xt(r),{clear:r,time:t,start:i,reset:s}}const eZ=oe({multiLine:Boolean,text:String,timer:[Boolean,String],timeout:{type:[Number,String],default:5e3},vertical:Boolean,...aa({location:"bottom"}),...wl(),...Tn(),...ys(),...wt(),...Qt(vc({transition:"v-snackbar-transition"}),["persistent","noClickAnimation","retainFocus","captureFocus","disableInitialFocus","scrim","scrollStrategy","stickToTarget","viewportMargin"])},"VSnackbar"),y1=be()({name:"VSnackbar",props:eZ(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=tt(e,"modelValue"),{positionClasses:s}=_l(e),{scopeId:i}=uo(),{themeClasses:a}=Mt(e),{colorClasses:o,colorStyles:l,variantClasses:c}=io(e),{roundedClasses:u}=An(e),d=ZQ(()=>Number(e.timeout)),p=q(),m=q(),v=Ee(!1),g=Ee(0),b=q(),y=He(Ku,void 0);hr(()=>!!y,()=>{const O=UP();bn(()=>{b.value=O.mainStyles.value})}),_e(r,_),_e(()=>e.timeout,_),ot(()=>{r.value&&_()});let w=-1;function _(){d.reset(),window.clearTimeout(w);const O=Number(e.timeout);if(!r.value||O===-1)return;const L=yy(m.value);d.start(L),w=window.setTimeout(()=>{r.value=!1},O)}function T(){d.reset(),window.clearTimeout(w)}function P(){v.value=!0,T()}function x(){v.value=!1,_()}function C(O){g.value=O.touches[0].clientY}function E(O){Math.abs(g.value-O.changedTouches[0].clientY)>50&&(r.value=!1)}function R(){v.value&&x()}const I=A(()=>e.location.split(" ").reduce((O,L)=>(O[`v-snackbar--${L}`]=!0,O),{}));return Ie(()=>{const O=bi.filterProps(e),L=!!(n.default||n.text||e.text);return f(bi,ce({ref:p,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:[b.value,e.style]},O,{modelValue:r.value,"onUpdate:modelValue":V=>r.value=V,contentProps:ce({class:["v-snackbar__wrapper",a.value,o.value,u.value,c.value],style:[l.value],onPointerenter:P,onPointerleave:x},O.contentProps),persistent:!0,noClickAnimation:!0,scrim:!1,scrollStrategy:"none",_disableGlobalStack:!0,onTouchstartPassive:C,onTouchend:E,onAfterLeave:R},i),{default:()=>[ia(!1,"v-snackbar"),e.timer&&!v.value&&S("div",{key:"timer",class:"v-snackbar__timer"},[f(Or,{ref:m,color:typeof e.timer=="string"?e.timer:"info",max:e.timeout,modelValue:d.time.value},null)]),L&&S("div",{key:"content",class:"v-snackbar__content",role:"status","aria-live":"polite"},[n.text?.()??e.text,n.default?.()]),n.actions&&f(vt,{defaults:{VBtn:{variant:"text",ripple:!1,slim:!0}}},{default:()=>[S("div",{class:"v-snackbar__actions"},[n.actions({isActive:r})])]})],activator:n.activator})}),Vr({},p)}}),tZ={class:"d-flex align-start ga-3"},nZ={class:"flex-grow-1 min-width-0"},rZ={class:"text-body-1 font-weight-medium text-white mb-3"},sZ={class:"d-flex align-center ga-2 mb-1"},iZ={class:"text-body-2 text-white"},aZ={class:"text-body-2 text-white font-weight-bold"},oZ=Ae({__name:"AppProgressSnackbar",setup(e){const t=bt(),n=q(!1),r=q(""),s=q([]),i=q(100);function a(c){return s.value.find(u=>u.key===c)}function o(c,u,d=0,p=!1,m=Date.now()+1500){console.log(`[AppProgressSnackbar] Adding ${c} tracker with progress ${d}`),s.value.push({key:c,title:u,value:d,completed:p,startedAt:Date.now(),expiresAt:m,timeoutAt:void 0})}function l(c){s.value=s.value.filter(u=>u.key!==c)}return ot(()=>{setInterval(()=>{if(s.value.length){for(const c of s.value){const{value:u,completed:d,expiresAt:p,key:m}=c;(d||u>=100)&&p<Date.now()||c.timeoutAt&&c.timeoutAt<Date.now()?l(m):!c.timeoutAt&&p<Date.now()&&(c.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(c=>{const{key:u,value:d,title:p,completed:m}=c,v=a(u);if(v)Math.min(100,d)>=v.value&&(v.expiresAt=Date.now()+1500,v.value=d,v.completed=m);else{if(d>=100)return;o(u,p,d,!1,Date.now()+1500)}r.value="Uploading files"})}),(c,u)=>($(),J(y1,{modelValue:n.value,"onUpdate:modelValue":u[1]||(u[1]=d=>n.value=d),timeout:i.value,location:"bottom right",class:"progress-snackbar",color:"primary",variant:"elevated",rounded:"lg","multi-line":"",width:"450","max-width":"90vw"},{default:h(()=>[S("div",tZ,[f(j,{color:"white",size:"24"},{default:h(()=>[...u[2]||(u[2]=[k(" upload ",-1)])]),_:1}),S("div",nZ,[S("div",rZ,Y(r.value),1),($(!0),pe(ke,null,Ot(s.value,(d,p)=>($(),pe("div",{key:p,class:"mb-3"},[S("div",sZ,[f(j,{color:"white",size:"16"},{default:h(()=>[k(Y(d.completed?"check":d.timeoutAt?"pause":"schedule"),1)]),_:2},1024),S("span",iZ,Y(d.title),1),f(Ft),S("span",aZ,Y((d.completed?100:d.value).toFixed(1))+"% ",1)]),($(),J(Or,{key:d.key,"model-value":d.completed?100:d.value,color:d.timeoutAt?"error":"success",height:"4",rounded:"","bg-color":"rgba(255,255,255,0.3)"},null,8,["model-value","color"]))]))),128))]),f(te,{icon:"close",variant:"text",color:"white",size:"small",class:"ml-2",onClick:u[0]||(u[0]=d=>n.value=!1)})])]),_:1},8,["modelValue","timeout"]))}}),lZ=fn(oZ,[["__scopeId","data-v-4a864bff"]]),uZ={class:"d-flex align-center ga-3"},cZ={class:"flex-grow-1 min-width-0"},dZ={class:"text-body-1 font-weight-medium text-white"},fZ={key:0,class:"text-body-2 text-white opacity-90 mt-1"},pZ=Ae({__name:"AppErrorSnackbar",setup(e){const t=bt(),n=q(-1),r=q(!1),s=q(""),i=q("");return ot(()=>{t.onErrorMessage(a=>{s.value=a.title,i.value=a.subtitle??"",r.value=!0,n.value=a.timeout??1e4})}),(a,o)=>($(),J(y1,{modelValue:r.value,"onUpdate:modelValue":o[1]||(o[1]=l=>r.value=l),timeout:n.value,location:"bottom right",class:"error-snackbar",color:"error",variant:"elevated",rounded:"lg","multi-line":"",width:"400","max-width":"90vw"},{default:h(()=>[S("div",uZ,[f(j,{color:"white",size:"24"},{default:h(()=>[...o[2]||(o[2]=[k(" error ",-1)])]),_:1}),S("div",cZ,[S("div",dZ,Y(s.value),1),i.value?.length?($(),pe("div",fZ,Y(i.value),1)):se("",!0)]),f(te,{icon:"close",variant:"text",color:"white",size:"small",class:"ml-2",onClick:o[0]||(o[0]=l=>r.value=!1)})])]),_:1},8,["modelValue","timeout"]))}}),mZ=fn(pZ,[["__scopeId","data-v-3b4e7ea3"]]),hZ={class:"d-flex align-center ga-3"},gZ={class:"flex-grow-1 min-width-0"},vZ=Ae({__name:"AppInfoSnackbar",setup(e){const t=bt(),n=q(!1),r=q(""),s=q(""),i=q(2e3),a=q(!1);return ot(()=>{t.onInfoMessage(o=>{r.value=o.title,s.value=o.subtitle??"",a.value=o.warning??!1,i.value=o.timeout??2e3,n.value=!0})}),(o,l)=>($(),J(y1,{modelValue:n.value,"onUpdate:modelValue":l[1]||(l[1]=c=>n.value=c),timeout:i.value,location:"bottom right",class:"info-snackbar",color:a.value?"warning":"success",variant:"elevated",rounded:"lg","multi-line":"",width:"400","max-width":"90vw"},{default:h(()=>[S("div",hZ,[f(j,{color:a.value?"black":"white",size:"24"},{default:h(()=>[k(Y(a.value?"warning":"check_circle"),1)]),_:1},8,["color"]),S("div",gZ,[S("div",{class:Se(a.value?"text-body-1 font-weight-medium text-black":"text-body-1 font-weight-medium text-white")},Y(r.value),3),s.value?.length?($(),pe("div",{key:0,class:Se(a.value?"text-body-2 text-black opacity-90 mt-1":"text-body-2 text-white opacity-90 mt-1")},Y(s.value),3)):se("",!0)]),f(te,{icon:"close",variant:"text",color:a.value?"black":"white",size:"small",class:"ml-2",onClick:l[0]||(l[0]=c=>n.value=!1)},null,8,["color"])])]),_:1},8,["modelValue","timeout","color"]))}}),yZ=fn(vZ,[["__scopeId","data-v-6622ec4d"]]),b1=wr("Uploads",{state:()=>({queuedUploads:[],failedUploads:[],uploadingNow:!1}),getters:{hasPendingUploads(e){return e.queuedUploads?.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(){const e=bt();if(!this.queuedUploads?.length)return;this.uploadingNow=!0;const{file:t,printer:n,startPrint:r}=this.nextUpload;this.queuedUploads.splice(0,1);try{await pi.uploadFile(n,t,r)}catch(s){if(s.isAxiosError){const i={file:t,printer:n,error:s,startPrint:!1};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}}}),bZ={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",tableGroupCollapse:"mdi-chevron-down",tableGroupExpand:"mdi-chevron-right",eyeDropper:"mdi-eyedropper",upload:"mdi-cloud-upload",color:"mdi-palette",command:"mdi-apple-keyboard-command",ctrl:"mdi-apple-keyboard-control",space:"mdi-keyboard-space",shift:"mdi-apple-keyboard-shift",alt:"mdi-apple-keyboard-option",enter:"mdi-keyboard-return",arrowup:"mdi-arrow-up",arrowdown:"mdi-arrow-down",arrowleft:"mdi-arrow-left",arrowright:"mdi-arrow-right",backspace:"mdi-backspace",play:"mdi-play",pause:"mdi-pause",fullscreen:"mdi-fullscreen",fullscreenExit:"mdi-fullscreen-exit",volumeHigh:"mdi-volume-high",volumeMedium:"mdi-volume-medium",volumeLow:"mdi-volume-low",volumeOff:"mdi-volume-variant-off"},b2={component:e=>gs(_C,{...e,class:"mdi"})};function SZ(){return{svg:{component:wC},class:{component:_C}}}function wZ(e){const t=SZ(),n=e?.defaultSet??"mdi";return n==="mdi"&&!t.mdi&&(t.mdi=b2),Gn({defaultSet:n,sets:t,aliases:{...bZ,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)}function S2(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{blueprint:t,...n}=e,r=Gn(t,n),{aliases:s={},components:i={},directives:a={}}=r,o=Ha();return o.run(()=>{const l=W$(r.defaults),c=oN(r.display,r.ssr),u=cF(r.theme),d=wZ(r.icons),p=EF(r.locale),m=KW(r.date,p),v=uq(r.goTo,p);function g(y){for(const _ in a)y.directive(_,a[_]);for(const _ in i)y.component(_,i[_]);for(const _ in s)y.component(_,gl({...s[_],name:_,aliasName:s[_].name}));const w=Ha();if(w.run(()=>{u.install(y)}),y.onUnmount(()=>w.stop()),y.provide(Yo,l),y.provide(Rg,c),y.provide(Du,u),y.provide(kg,d),y.provide(rf,p),y.provide(GW,m.options),y.provide(I_,m.instance),y.provide(pP,v),Ct&&r.ssr)if(y.$nuxt)y.$nuxt.hook("app:suspense:resolve",()=>{c.update()});else{const{mount:_}=y;y.mount=function(){const T=_(...arguments);return ut(()=>c.update()),y.mount=_,T}}y.mixin({computed:{$vuetify(){return Jt({defaults:ko.call(this,Yo),display:ko.call(this,Rg),theme:ko.call(this,Du),icons:ko.call(this,kg),locale:ko.call(this,rf),date:ko.call(this,I_)})}}})}function b(){o.stop()}return{install:g,unmount:b,defaults:l,display:c,theme:u,icons:d,locale:p,date:m,goTo:v}})}const _Z="3.11.6";S2.version=_Z;function ko(e){const t=this.$,n=t.parent?.provides??t.vnode.appContext?.provides;if(n&&e in n)return n[e]}function w2(e){const t=at();t.getOptions().enabled=e,console.warn("Sentry enabled:",e)}const kZ=e=>new Promise(t=>setTimeout(t,e)),xZ=e=>Math.random()*e,EZ={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:xZ,getWrapperStyle(){return{width:`${Number.parseFloat(this.size)*3+Number.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 CZ(e,t,n,r,s,i){return n.loading?($(),pe("div",{key:0,style:Le(i.getWrapperStyle())},[($(),pe(ke,null,Ot(9,a=>S("div",{key:a,style:Le(i.getCircleStyle(i.random(100)))},null,4)),64))],4)):se("",!0)}const _2=fn(EZ,[["render",CZ]]),TZ={key:0,class:"d-flex flex-column align-center"},IZ={class:"mt-8"},RZ=Ae({__name:"AppLoadingMessage",setup(e){const t=zl();return(n,r)=>Q(t).loading?($(),pe("div",TZ,[f(_2,{size:20,color:"#a70015"}),S("div",IZ,Y(Q(t).overlayMessage),1)])):se("",!0)}}),PZ={key:0},S1=Ae({__name:"DiscordInviteButton",props:{label:{default:"Join our Discord"},color:{default:"indigo"},variant:{default:"elevated"},size:{default:"default"},block:{type:Boolean,default:!1},iconOnly:{type:Boolean,default:!1}},setup(e){return(t,n)=>($(),J(te,ce(t.$attrs,{href:"https://discord.gg/mwA8uP8CMc",target:"_blank",color:e.color,variant:e.variant,size:e.size,block:e.block}),{default:h(()=>[f(j,{class:Se(e.iconOnly?"":"mr-2")},{default:h(()=>[...n[0]||(n[0]=[k("discord",-1)])]),_:1},8,["class"]),e.iconOnly?se("",!0):($(),pe("span",PZ,Y(e.label),1))]),_:1},16,["color","variant","size","block"]))}}),AZ={key:2},w1=Ae({__name:"GithubIssuesButton",props:{label:{default:"Report Issue on GitHub"},color:{default:void 0},variant:{default:"tonal"},size:{default:"default"},block:{type:Boolean,default:!1},iconOnly:{type:Boolean,default:!1}},setup(e){return(t,n)=>($(),J(te,ce(t.$attrs,{href:"https://github.com/fdm-monster/fdm-monster/issues",target:"_blank",color:e.color,variant:e.variant,size:e.size,block:e.block}),{default:h(()=>[e.iconOnly?($(),J(j,{key:1},{default:h(()=>[...n[1]||(n[1]=[k("mdi:mdi-github",-1)])]),_:1})):($(),J(j,{key:0,class:"mr-2"},{default:h(()=>[...n[0]||(n[0]=[k("mdi:mdi-github",-1)])]),_:1})),e.iconOnly?se("",!0):($(),pe("span",AZ,Y(e.label),1))]),_:1},16,["color","variant","size","block"]))}}),OZ={class:"mb-8"},DZ={key:0,class:"mt-6"},LZ={key:2},$Z={key:3},FZ={class:"d-flex flex-column align-center ga-4"},NZ={class:"text-center"},MZ={class:"d-flex ga-3 flex-wrap justify-center mb-6"},VZ={class:"d-flex flex-wrap justify-center ga-2"},BZ=Ae({__name:"ServerDisconnectedMessage",setup(e){const t=zl(),n=q(0);let r=null;function s(){if(!t.nextRetryTime){n.value=0;return}n.value=Math.max(0,Math.ceil((t.nextRetryTime-Date.now())/1e3))}return ot(()=>{s(),r=globalThis.setInterval(s,100)}),tp(()=>{r&&clearInterval(r)}),(i,a)=>($(),J(cp,null,{default:h(()=>[Q(t).serverDisconnected?($(),J($e,{key:0,class:"pa-8 mx-auto text-center","max-width":"600",elevation:"12"},{default:h(()=>[S("div",OZ,[f(j,{size:"80",color:"error",class:"mb-5"},{default:h(()=>[...a[1]||(a[1]=[k(" wifi_off ",-1)])]),_:1}),a[4]||(a[4]=S("h1",{class:"text-h4 font-weight-bold mb-4"},"Server Disconnected",-1)),a[5]||(a[5]=S("p",{class:"text-body-1 text-medium-emphasis mb-0"}," Cannot connect to FDM Monster server. Please ensure the server is running and try again. ",-1)),Q(t).isRetrying?($(),pe("div",DZ,[f(qe,{color:"primary",outline:"",size:"large",class:"px-4"},{default:h(()=>[Q(t).isTestingConnection?se("",!0):($(),J(j,{key:0,class:"mr-2"},{default:h(()=>[...a[2]||(a[2]=[k("mdi:mdi-refresh",-1)])]),_:1})),Q(t).isTestingConnection?($(),J(j,{key:1,class:"mr-2"},{default:h(()=>[...a[3]||(a[3]=[k("mdi:mdi-timer",-1)])]),_:1})):se("",!0),Q(t).isTestingConnection?($(),pe("span",LZ,"Testing connection")):($(),pe("span",$Z,"Retrying in "+Y(n.value)+"s",1))]),_:1}),Q(t).isTestingConnection?($(),J(Or,{key:1,indeterminate:"",color:"primary",height:"4",class:"mt-4",rounded:""})):($(),J(Or,{key:0,"model-value":(5-n.value)/5*100,color:"primary",height:"4",class:"mt-4",rounded:""},null,8,["model-value"]))])):se("",!0)]),S("div",FZ,[f(te,{disabled:!Q(t).isRetrying||Q(t).isTestingConnection,color:"primary",size:"large",variant:"elevated",onClick:a[0]||(a[0]=o=>Q(t).retryNow()),class:"px-8"},{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...a[6]||(a[6]=[k("mdi:mdi-play",-1)])]),_:1}),a[7]||(a[7]=k(" Retry Now ",-1))]),_:1},8,["disabled"])]),f(pt,{class:"my-8"}),S("div",NZ,[a[13]||(a[13]=S("p",{class:"text-caption text-medium-emphasis mb-3"}," Helpful links: ",-1)),S("div",MZ,[f(te,{color:"surface-variant",variant:"outlined",href:"https://docs.fdm-monster.net",target:"_blank"},{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...a[8]||(a[8]=[k("menu_book",-1)])]),_:1}),a[9]||(a[9]=k(" Documentation ",-1))]),_:1}),f(S1,{label:"Discord Support",variant:"elevated"}),f(w1,{label:"GitHub",variant:"outlined",color:"surface-variant"})]),a[14]||(a[14]=S("p",{class:"text-caption text-medium-emphasis mb-3"}," Common solutions: ",-1)),S("div",VZ,[f(qe,{size:"small",variant:"outlined"},{default:h(()=>[...a[10]||(a[10]=[k("Check server status",-1)])]),_:1}),f(qe,{size:"small",variant:"outlined"},{default:h(()=>[...a[11]||(a[11]=[k("Verify network connection",-1)])]),_:1}),f(qe,{size:"small",variant:"outlined"},{default:h(()=>[...a[12]||(a[12]=[k("Review server logs",-1)])]),_:1})])])]),_:1})):se("",!0)]),_:1}))}}),UZ=fn(BZ,[["__scopeId","data-v-3b933b98"]]),zZ={class:"mb-6 text-center"},jZ={class:"d-flex align-center"},HZ={class:"mb-3"},qZ={class:"text-caption mt-1"},WZ={key:0,class:"mb-3"},GZ={class:"text-caption"},KZ={key:1,class:"mb-3"},YZ={class:"text-caption mt-1"},JZ={class:"d-flex flex-column align-center ga-3"},XZ={class:"d-flex ga-3 flex-wrap justify-center"},QZ=Ae({__name:"ErrorStateMessage",setup(e){const t=zl(),n=bt();function r(){globalThis.location.reload()}function s(){navigator.clipboard.writeText(JSON.stringify(t.errorCaught)),n.openInfoMessage({title:"Copied",subtitle:"Error copied to clipboard"})}return(i,a)=>($(),J(cp,null,{default:h(()=>[Q(t).errorCaught?($(),J($e,{key:0,class:"pa-8 mx-auto align-content-center","max-width":"700",elevation:"12"},{default:h(()=>[S("div",zZ,[f(j,{size:"80",color:"error",class:"mb-4"},{default:h(()=>[...a[2]||(a[2]=[k(" error_outline ",-1)])]),_:1}),a[3]||(a[3]=S("h1",{class:"text-h4 font-weight-bold mb-3"},"Server Error",-1)),a[4]||(a[4]=S("p",{class:"text-body-1 text-medium-emphasis mb-0"}," The server returned an unexpected response. Please check your configuration and logs. ",-1))]),f(rc,{class:"mb-6"},{default:h(()=>[f(nc,null,{default:h(()=>[f(tc,null,{default:h(()=>[S("div",jZ,[f(j,{class:"mr-2"},{default:h(()=>[...a[5]||(a[5]=[k("bug_report",-1)])]),_:1}),a[6]||(a[6]=k(" Error Details ",-1))])]),_:1}),f(ec,null,{default:h(()=>[f($e,{variant:"outlined",class:"pa-4"},{default:h(()=>[S("div",HZ,[a[7]||(a[7]=S("strong",null,"Error:",-1)),S("pre",qZ,Y(JSON.stringify(Q(t).errorCaught,null,2)),1)]),Q(t).errorUrl?($(),pe("div",WZ,[a[8]||(a[8]=S("strong",null,"URL:",-1)),S("code",GZ,Y(Q(t).errorUrl),1)])):se("",!0),Q(t).errorResponse?($(),pe("div",KZ,[a[9]||(a[9]=S("strong",null,"Response:",-1)),S("pre",YZ,Y(Q(t).errorResponse),1)])):se("",!0)]),_:1})]),_:1})]),_:1})]),_:1}),S("div",JZ,[f(te,{color:"primary",size:"large",variant:"elevated",onClick:a[0]||(a[0]=o=>r()),class:"px-8"},{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...a[10]||(a[10]=[k("refresh",-1)])]),_:1}),a[11]||(a[11]=k(" Reload Page ",-1))]),_:1}),S("div",XZ,[f(te,{color:"secondary",variant:"outlined",onClick:a[1]||(a[1]=o=>s())},{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...a[12]||(a[12]=[k("content_copy",-1)])]),_:1}),a[13]||(a[13]=k(" Copy Error ",-1))]),_:1}),f(te,{color:"surface-variant",variant:"outlined",href:"https://docs.fdm-monster.net",target:"_blank"},{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...a[14]||(a[14]=[k("menu_book",-1)])]),_:1}),a[15]||(a[15]=k(" Documentation ",-1))]),_:1}),f(te,{color:"purple",variant:"outlined",href:"https://discord.gg/mwA8uP8CMc",target:"_blank"},{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...a[16]||(a[16]=[k("chat",-1)])]),_:1}),a[17]||(a[17]=k(" Get Support ",-1))]),_:1})])])]),_:1})):se("",!0)]),_:1}))}}),ZZ=fn(QZ,[["__scopeId","data-v-a399452b"]]),kk=5e3,eee=Ae({__name:"AppLoader",setup(e){const t=Zr(),n=zl(),r=ws(),s=$p(),i=d1(),a=ks(),o=bt(),l=new HQ,c=Cy(),u=A(()=>c.current.value.colors.background);let d=null;function p(E,R=""){E?(n.setOverlay(!0,R),n.clearError()):n.hideOverlay()}async function m(){n.setTestingConnection(!0);try{await Hi.test(),console.log("[AppLoader] Backend connection successful, reloading page"),g(),n.resetRetry(),globalThis.location.reload()}catch(E){console.log("[AppLoader] Retry attempt failed",E),n.setTestingConnection(!1),n.incrementRetry(kk)}}function v(){console.log("[AppLoader] Starting retry loop"),g(),d=globalThis.setInterval(async()=>{const E=n.nextRetryTime||0;Date.now()>=E&&E>0&&(console.log(`[AppLoader] Retry attempt at ${Date.now()}`),n.nextRetryTime=0,await m())},100)}function g(){d&&(console.log("[AppLoader] Stopping retry loop"),clearInterval(d),d=null)}async function b(){try{await r.loadSettings(),await s.loadFeatures(),await i.getProfile();const E=r.serverSettings?.sentryDiagnosticsEnabled;w2(!!E)}catch(E){console.log("Error when loading settings.",E),o.openErrorMessage({title:"Error",subtitle:"Error when loading settings, features and/or profile."}),ds(E)}l.socketState().setup?l.reconnect():await l.setupSocketConnection(),p(!1)}nr("auth:permission-denied").on(async E=>{console.log("[AppLoader] Permission denied, going to permission denied page"),p(!0,"Permission denied"),await a.push({name:xt.PermissionDenied,query:{roles:E?.roles,page:String(a.currentRoute.value.name),permissions:E?.permissions,error:E?.error,url:E?.url}}),p(!1)}),nr("auth:failure").on(async E=>{console.debug(`[AppLoader] Event received: 'auth:failure', going back to login, context: ${E}`),p(!0,"Authentication failed, going back to login"),a.currentRoute.value.name!==xt.Login&&await a.push({name:xt.Login}),p(!1)}),nr("auth:login").on(async()=>{console.debug("[AppLoader] Event received: 'auth:login', loading app"),p(!0,"Loading app"),await b()}),nr(`auth:${ur.AccountNotVerified}`).on(async()=>{console.debug(`[AppLoader] Event received: 'auth:${ur.AccountNotVerified}', going to login`),o.error("Account not verified, please ask an administrator to verify your account."),p(!0,"Account not verified, please ask an administrator to verify your account."),a.currentRoute.value.name!==xt.Login&&await a.push({name:xt.Login}),p(!1)}),nr(`auth:${ur.PasswordChangeRequired}`).on(async()=>{console.debug(`[AppLoader] Event received: 'auth:${ur.PasswordChangeRequired}', going to login`),o.error("Password change required, please change your password."),p(!0,"Password change required, please change your password."),a.currentRoute.value.name!==xt.Login&&await a.push({name:xt.Login}),p(!1)}),nr("backend:start-retry").on(()=>{console.debug("[AppLoader] Event received: backend:start-retry, starting retry loop"),n.startRetry(kk),v()}),_e(()=>t.wizardState?.wizardCompleted,async(E,R)=>{if(E&&!R){const I=a.currentRoute.value.name;if(I===xt.Login||I===xt.Registration){console.debug("[AppLoader] Wizard completed but already on auth page, skipping loadApp");return}console.debug("[AppLoader] Wizard completed detected, triggering app load"),await C()}}),tp(()=>{g(),l.socketState().setup&&l.disconnect()});async function C(){n.setLoading(!0);const E=["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","Forking PrusaSlicer","Filling progress bar","Eating printed spaghetti"],R=E[Math.floor(Math.random()*E.length)];p(!0,R);try{await Hi.test()}catch(L){n.setServerDisconnected(!0),ds(L),n.startRetry(5e3),v();return}const{loginRequired:I,wizardState:O}=await t.checkAuthenticationRequirements();if(!O.wizardCompleted){console.debug("[AppLoader] Wizard not completed, going to wizard"),await t.logout(!1),a.currentRoute.value.name!==xt.FirstTimeSetup&&await a.replace({name:xt.FirstTimeSetup}),p(!1);return}if(!I)return console.debug("[AppLoader] Login not required, loading app"),await b();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"),p(!1);p(!0,"Refreshing login"),console.debug("[AppLoader] Verifying or refreshing login once");try{const{success:L,handled:V}=await t.verifyOrRefreshLoginOnceOrLogout();if(V){console.debug("[AppLoader] received handled event, hiding overlay");return}if(!L){console.debug("[AppLoader] No success refreshing"),p(!0,"Login expired, going back to login"),await kZ(500),a.currentRoute.value.name!==xt.Login&&await a.push({name:xt.Login}),p(!1);return}}catch(L){console.log("[AppLoader] Error when refreshing login",L),n.setLoading(!1),n.setError(L.message,L.config?.url,L.response?.data),ds(L);return}await b()}return ml(async()=>{await C()}),(E,R)=>($(),pe(ke,null,[Q(n).overlay?se("",!0):Wo(E.$slots,"default",{key:0}),f(bi,{modelValue:Q(n).overlay,"onUpdate:modelValue":R[0]||(R[0]=I=>Q(n).overlay=I),scrim:u.value,opacity:"0.98",persistent:"","no-click-animation":"",class:"align-center justify-center"},{default:h(()=>[f(RZ),f(UZ),f(ZZ)]),_:1},8,["modelValue","scrim"])],64))}}),tee=oe({...Ue(),...Qt(VP(),["fullHeight"]),...wt()},"VApp"),nee=be()({name:"VApp",props:tee(),setup(e,t){let{slots:n}=t;const r=Mt(e),{layoutClasses:s,getLayoutItem:i,items:a,layoutRef:o}=jP({...e,fullHeight:!0}),{rtlClasses:l}=xr();return Ie(()=>S("div",{ref:o,class:Se(["v-application",r.themeClasses.value,s.value,l.value,e.class]),style:Le([e.style])},[S("div",{class:"v-application__wrap"},[n.default?.()])])),{getLayoutItem:i,items:a,theme:r}}}),ree=oe({scrollable:Boolean,...Ue(),...Vn(),...lt({tag:"main"})},"VMain"),see=be()({name:"VMain",props:ree(),setup(e,t){let{slots:n}=t;const{dimensionStyles:r}=Bn(e),{mainStyles:s}=UP(),{ssrBootStyles:i}=Lc();return Ie(()=>f(e.tag,{class:Se(["v-main",{"v-main--scrollable":e.scrollable},e.class]),style:Le([s.value,i.value,r.value,e.style])},{default:()=>[e.scrollable?S("div",{class:"v-main__scroller"},[n.default?.()]):n.default?.()]})),{}}}),iee=Ae({__name:"App",setup(e){const t=b1(),n=Zr(),r=zl(),s=t.queuedUploads;return _e(s,async()=>{await t.handleNextUpload()}),ot(()=>{console.debug(`App.vue mounted. Logged in: ${n.hasAuthToken}, Expired: ${n.isLoginExpired}`)}),(i,a)=>{const o=yZ,l=mZ,c=lZ,u=QQ,d=YQ,p=Tu("router-view"),m=AJ,v=bJ,g=RY,b=TY,y=kY,w=aY,_=OK,T=$7,P=Xq,x=vq,C=jN;return $(),J(nee,null,{default:h(()=>[f(o),f(l),f(c),!Q(r).loading&&Q(n).wizardState?.wizardCompleted&&(Q(n).hasAuthToken&&!Q(n).isLoginExpired||!Q(n).loginRequired)?($(),J(u,{key:0})):se("",!0),!Q(r).loading&&Q(n).wizardState?.wizardCompleted&&(Q(n).hasAuthToken&&!Q(n).isLoginExpired||!Q(n).loginRequired)?($(),J(d,{key:1})):se("",!0),f(eee,null,{default:h(()=>[f(see,null,{default:h(()=>[f(p)]),_:1})]),_:1}),f(m),f(v),f(g),f(b),f(y),f(w),f(_),f(T),f(P),f(x),f(C)]),_:1})}}}),aee={class:"text-h4 font-weight-bold text-green"},oee={class:"text-h4 font-weight-bold text-blue"},lee={class:"text-h4 font-weight-bold text-orange"},uee={class:"text-h4 font-weight-bold text-purple"},cee={class:"text-h6 mb-4 d-flex align-center"},dee={class:"d-flex align-center justify-space-between mb-4"},fee={class:"text-h6 d-flex align-center"},pee={class:"d-flex align-center ga-2"},mee={key:0,class:"printer-status-grid"},hee={class:"printer-name text-subtitle-2 font-weight-medium mb-1"},gee={key:0,class:"mt-2"},vee={class:"text-caption"},yee={key:0,class:"text-center mt-3"},bee={key:1,class:"text-center py-8"},See={class:"text-h6 mb-4 d-flex align-center"},wee={class:"mb-4"},_ee={class:"d-flex justify-space-between align-center mb-2"},kee={class:"mb-4"},xee={class:"d-flex justify-space-between align-center mb-2"},Eee={class:"text-green"},Cee={class:"mt-6"},Tee={class:"d-flex justify-space-between py-2 border-b"},Iee={class:"d-flex justify-space-between py-2 border-b"},Ree={class:"d-flex justify-space-between py-2"},Pee=Ae({__name:"DashboardView",setup(e){const t=ks(),n=At(),r=Kn(),{selectedTags:s,selectedPrinterTypes:i,tags:a,loadTags:o,filterPrinters:l}=Vc();ot(async()=>{await o()});const c=A(()=>n.printers),u=A(()=>l(c.value)),d=A(()=>c.value.length),p=A(()=>r.printingCount),m=A(()=>r.operationalNotPrintingCount),v=A(()=>c.value.filter(N=>{const D=r.printerEventsById[N.id];return fv(N,D)||ol(N)}).length),g=A(()=>d.value===0),b=A(()=>d.value===0?0:Math.round(p.value/d.value*100)),y=A(()=>94),w=A(()=>p.value),_=A(()=>0),T=A(()=>"2h 34m"),P=()=>{t.push("/printers-grid")},x=()=>{t.push("/cameras")},C=()=>{t.push("/jobs")},E=()=>{globalThis.open("https://docs.fdm-monster.net","_blank")},R=()=>{jt(Ht.YamlImportExport).openDialog()},I=()=>{jt(Ht.ImportOctoFarmDialog).openDialog()},O=()=>{t.push("/printers-grid")},L=N=>{const D=r.printerEventsById[N.id];return dv(D)},V=N=>{const D=r.printerEventsById[N.id];return ol(N)?"MAINTENANCE":fv(N,D)?"OFFLINE":dv(D)?"PRINTING":"READY"},F=N=>{switch(V(N)){case"PRINTING":return"success";case"READY":return"primary";case"MAINTENANCE":return"warning";case"OFFLINE":return"error";default:return"surface"}},B=N=>{const D=V(N);return{"border-l-4 border-success":D==="PRINTING","border-l-4 border-primary":D==="READY","border-l-4 border-warning":D==="MAINTENANCE","border-l-4 border-error":D==="OFFLINE"}},M=N=>r.printerEventsById[N.id]?.current?.payload?.progress?.completion||0;return(N,D)=>($(),J(Br,{fluid:"",class:"pa-4"},{default:h(()=>[f(it,{class:"mb-6"},{default:h(()=>[f(Be,null,{default:h(()=>[...D[3]||(D[3]=[S("div",{class:"text-center mb-2"},[S("h1",{class:"text-h4 font-weight-bold"},"Welcome to FDM Monster"),S("p",{class:"text-subtitle-1 text-medium-emphasis mb-0"}," Manage your 3D print farm with ease ")],-1)])]),_:1})]),_:1}),f(it,{class:"mb-6"},{default:h(()=>[f(Be,{cols:"12",sm:"6",md:"3"},{default:h(()=>[f($e,{class:"text-center pa-4",elevation:"2"},{default:h(()=>[f(j,{color:"green",size:"48",class:"mb-2"},{default:h(()=>[...D[4]||(D[4]=[k("print",-1)])]),_:1}),S("h2",aee,Y(p.value),1),D[5]||(D[5]=S("p",{class:"text-subtitle-2"},"Currently Printing",-1))]),_:1})]),_:1}),f(Be,{cols:"12",sm:"6",md:"3"},{default:h(()=>[f($e,{class:"text-center pa-4",elevation:"2"},{default:h(()=>[f(j,{color:"blue",size:"48",class:"mb-2"},{default:h(()=>[...D[6]||(D[6]=[k("settings",-1)])]),_:1}),S("h2",oee,Y(m.value),1),D[7]||(D[7]=S("p",{class:"text-subtitle-2"},"Ready to Print",-1))]),_:1})]),_:1}),f(Be,{cols:"12",sm:"6",md:"3"},{default:h(()=>[f($e,{class:"text-center pa-4",elevation:"2"},{default:h(()=>[f(j,{color:"orange",size:"48",class:"mb-2"},{default:h(()=>[...D[8]||(D[8]=[k("warning",-1)])]),_:1}),S("h2",lee,Y(v.value),1),D[9]||(D[9]=S("p",{class:"text-subtitle-2"},"Offline / Issues",-1))]),_:1})]),_:1}),f(Be,{cols:"12",sm:"6",md:"3"},{default:h(()=>[f($e,{class:"text-center pa-4",elevation:"2"},{default:h(()=>[f(j,{color:"purple",size:"48",class:"mb-2"},{default:h(()=>[...D[10]||(D[10]=[k("inventory",-1)])]),_:1}),S("h2",uee,Y(d.value),1),D[11]||(D[11]=S("p",{class:"text-subtitle-2"},"Total Printers",-1))]),_:1})]),_:1})]),_:1}),g.value?($(),J(it,{key:0,class:"mb-6"},{default:h(()=>[f(Be,null,{default:h(()=>[f(Et,{type:"info",variant:"tonal",class:"mb-4",icon:"rocket_launch"},{default:h(()=>[f(bP,{class:"mb-2"},{default:h(()=>[...D[12]||(D[12]=[k("Welcome to FDM Monster!",-1)])]),_:1}),D[17]||(D[17]=S("p",{class:"mb-3"}," It looks like you're just getting started. Let's help you set up your 3D print farm. ",-1)),f(te,{color:"primary",variant:"elevated",class:"mr-3",onClick:P},{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...D[13]||(D[13]=[k("add",-1)])]),_:1}),D[14]||(D[14]=k(" Add Your First Printer ",-1))]),_:1}),f(te,{variant:"outlined",onClick:E},{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...D[15]||(D[15]=[k("help",-1)])]),_:1}),D[16]||(D[16]=k(" View Documentation ",-1))]),_:1})]),_:1})]),_:1})]),_:1})):se("",!0),f(it,{class:"mb-6"},{default:h(()=>[f(Be,null,{default:h(()=>[f($e,{class:"pa-4",elevation:"2"},{default:h(()=>[S("h3",cee,[f(j,{class:"mr-2"},{default:h(()=>[...D[18]||(D[18]=[k("flash_on",-1)])]),_:1}),D[19]||(D[19]=k(" Quick Actions ",-1))]),f(_g,{class:"d-flex flex-wrap ga-2"},{default:h(()=>[f(te,{color:"primary",variant:"elevated",onClick:P},{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...D[20]||(D[20]=[k("view_module",-1)])]),_:1}),D[21]||(D[21]=k(" Manage Printers ",-1))]),_:1}),f(te,{color:"success",variant:"elevated",onClick:x},{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...D[22]||(D[22]=[k("camera_alt",-1)])]),_:1}),D[23]||(D[23]=k(" View Cameras ",-1))]),_:1}),f(te,{color:"warning",variant:"elevated",onClick:C},{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...D[24]||(D[24]=[k("analytics",-1)])]),_:1}),D[25]||(D[25]=k(" View Jobs ",-1))]),_:1}),f(te,{variant:"elevated",color:"primary",onClick:R},{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...D[26]||(D[26]=[k("code",-1)])]),_:1}),D[27]||(D[27]=k(" Import/Export backup ",-1))]),_:1}),f(te,{variant:"elevated",color:"purple",onClick:I},{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...D[28]||(D[28]=[k("publish",-1)])]),_:1}),D[29]||(D[29]=k(" Import OctoFarm printers ",-1))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),f(it,null,{default:h(()=>[f(Be,{cols:"12",md:"8"},{default:h(()=>[f($e,{class:"pa-4 fill-height",elevation:"2"},{default:h(()=>[S("div",dee,[S("h3",fee,[f(j,{class:"mr-2"},{default:h(()=>[...D[30]||(D[30]=[k("timeline",-1)])]),_:1}),D[31]||(D[31]=k(" Farm Status Overview ",-1))]),S("div",pee,[f(Vl,{modelValue:Q(s),"onUpdate:modelValue":D[0]||(D[0]=W=>nt(s)?s.value=W:null),tags:Q(a),label:"Tags",style:{width:"200px"}},null,8,["modelValue","tags"]),f(Bl,{modelValue:Q(i),"onUpdate:modelValue":D[1]||(D[1]=W=>nt(i)?i.value=W:null),label:"Type",style:{width:"200px"}},null,8,["modelValue"])])]),d.value>0?($(),pe("div",mee,[($(!0),pe(ke,null,Ot(u.value.slice(0,8),W=>($(),pe("div",{key:W.id,class:"printer-status-item",onClick:D[2]||(D[2]=z=>O())},[f($e,{class:Se(["pa-3 text-center cursor-pointer hover-effect",B(W)]),elevation:"1"},{default:h(()=>[S("div",hee,Y(W.name),1),f(qe,{color:F(W),size:"x-small",variant:"elevated"},{default:h(()=>[k(Y(V(W)),1)]),_:2},1032,["color"]),L(W)?($(),pe("div",gee,[f(Or,{"model-value":M(W),height:"4",color:"success",class:"mb-1"},null,8,["model-value"]),S("div",vee,Y(M(W))+"% ",1)])):se("",!0)]),_:2},1032,["class"])]))),128)),d.value>8?($(),pe("div",yee,[f(te,{variant:"outlined",size:"small",onClick:P},{default:h(()=>[k(" View All "+Y(d.value)+" Printers ",1)]),_:1})])):se("",!0)])):($(),pe("div",bee,[f(j,{size:"80",color:"surface-variant",class:"mb-4"},{default:h(()=>[...D[32]||(D[32]=[k(" add_circle ",-1)])]),_:1}),D[35]||(D[35]=S("h3",{class:"text-h6 mb-2"},"No printers configured",-1)),D[36]||(D[36]=S("p",{class:"text-body-2 text-medium-emphasis mb-4"}," Add your first 3D printer to start monitoring your farm ",-1)),f(te,{color:"primary",variant:"elevated",onClick:P},{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...D[33]||(D[33]=[k("add",-1)])]),_:1}),D[34]||(D[34]=k(" Add Printer ",-1))]),_:1})]))]),_:1})]),_:1}),f(Be,{cols:"12",md:"4"},{default:h(()=>[f($e,{class:"pa-4 fill-height",elevation:"2"},{default:h(()=>[S("h3",See,[f(j,{class:"mr-2"},{default:h(()=>[...D[37]||(D[37]=[k("trending_up",-1)])]),_:1}),D[38]||(D[38]=k(" Performance Insights ",-1))]),S("div",wee,[S("div",_ee,[D[39]||(D[39]=S("span",{class:"text-body-2"},"Farm Utilization",-1)),S("strong",null,Y(b.value)+"%",1)]),f(Or,{"model-value":b.value,color:"primary",height:"8",rounded:""},null,8,["model-value"])]),S("div",kee,[S("div",xee,[D[40]||(D[40]=S("span",{class:"text-body-2"},"Success Rate (24h)",-1)),S("strong",Eee,Y(y.value)+"%",1)]),f(Or,{"model-value":y.value,color:"success",height:"8",rounded:""},null,8,["model-value"])]),S("div",Cee,[S("div",Tee,[D[41]||(D[41]=S("span",{class:"text-body-2"},"Active Jobs",-1)),S("strong",null,Y(w.value),1)]),S("div",Iee,[D[42]||(D[42]=S("span",{class:"text-body-2"},"Queue Length",-1)),S("strong",null,Y(_.value),1)]),S("div",Ree,[D[43]||(D[43]=S("span",{class:"text-body-2"},"Avg. Print Time",-1)),S("strong",null,Y(T.value),1)])]),f(te,{color:"primary",variant:"outlined",block:"",class:"mt-4",onClick:C},{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...D[44]||(D[44]=[k("analytics",-1)])]),_:1}),D[45]||(D[45]=k(" View Job Analytics ",-1))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}}),Aee=fn(Pee,[["__scopeId","data-v-b4a6defe"]]),k2=wr("GridStore",{state:()=>({selectedTagFilter:[],selectedPrinterTypeFilter:[]}),actions:{setTagFilter(e){this.selectedTagFilter=e},setPrinterTypeFilter(e){this.selectedPrinterTypeFilter=e}}}),Oee={class:"d-flex align-center ga-1 pa-2 rounded",style:{"background-color":"rgba(255,255,255,0.05)"}},Dee={class:"text-body-2",style:{"min-width":"20px","text-align":"center"}},Lee={class:"text-body-2",style:{"min-width":"20px","text-align":"center"}},$ee=Ae({__name:"GridSizeControl",setup(e){const t=ws();async function n(){!t.frontendSettings||t.frontendSettings.gridRows>=16||await t.updateFrontendSettings({...t.frontendSettings,gridRows:t.frontendSettings.gridRows+1})}async function r(){!t.frontendSettings||t.frontendSettings.gridRows<=1||await t.updateFrontendSettings({...t.frontendSettings,gridRows:t.frontendSettings.gridRows-1})}async function s(){!t.frontendSettings||t.frontendSettings.gridCols>=12||await t.updateFrontendSettings({...t.frontendSettings,gridCols:t.frontendSettings.gridCols+1})}async function i(){!t.frontendSettings||t.frontendSettings.gridCols<=1||await t.updateFrontendSettings({...t.frontendSettings,gridCols:t.frontendSettings.gridCols-1})}return(a,o)=>($(),pe("div",Oee,[f(j,{size:"x-small"},{default:h(()=>[...o[4]||(o[4]=[k("table_rows",-1)])]),_:1}),f(te,{size:"x-small",icon:"",variant:"text",disabled:Q(t).gridRows<=1,onClick:o[0]||(o[0]=l=>r())},{default:h(()=>[f(j,{size:"small"},{default:h(()=>[...o[5]||(o[5]=[k("remove",-1)])]),_:1})]),_:1},8,["disabled"]),S("span",Dee,Y(Q(t).gridRows),1),f(te,{size:"x-small",icon:"",variant:"text",disabled:Q(t).gridRows>=16,onClick:o[1]||(o[1]=l=>n())},{default:h(()=>[f(j,{size:"small"},{default:h(()=>[...o[6]||(o[6]=[k("add",-1)])]),_:1})]),_:1},8,["disabled"]),f(pt,{vertical:"",class:"mx-1"}),f(j,{size:"x-small"},{default:h(()=>[...o[7]||(o[7]=[k("view_column",-1)])]),_:1}),f(te,{size:"x-small",icon:"",variant:"text",disabled:Q(t).gridCols<=1,onClick:o[2]||(o[2]=l=>i())},{default:h(()=>[f(j,{size:"small"},{default:h(()=>[...o[8]||(o[8]=[k("remove",-1)])]),_:1})]),_:1},8,["disabled"]),S("span",Lee,Y(Q(t).gridCols),1),f(te,{size:"x-small",icon:"",variant:"text",disabled:Q(t).gridCols>=12,onClick:o[3]||(o[3]=l=>s())},{default:h(()=>[f(j,{size:"small"},{default:h(()=>[...o[9]||(o[9]=[k("add",-1)])]),_:1})]),_:1},8,["disabled"])]))}}),Fee=Ae({__name:"GridSettingsMenu",setup(e){const t=ws(),n=q(t.largeTiles),r=q(t.preferCancelOverQuickStop);async function s(a){t.frontendSettings&&await t.updateFrontendSettings({...t.frontendSettings,largeTiles:a??!1})}async function i(a){t.frontendSettings&&await t.updateFrontendSettings({...t.frontendSettings,tilePreferCancelOverQuickStop:a??!1})}return(a,o)=>($(),J(da,{"close-on-content-click":!1},{activator:h(({props:l})=>[f(te,ce(l,{variant:"text",size:"small",icon:"settings"}),null,16)]),default:h(()=>[f($e,{"min-width":"280"},{default:h(()=>[f(Lt,{class:"text-subtitle-1"},{default:h(()=>[f(j,{class:"mr-2",size:"small"},{default:h(()=>[...o[2]||(o[2]=[k("settings",-1)])]),_:1}),o[3]||(o[3]=k(" Grid Settings ",-1))]),_:1}),f(Xe,null,{default:h(()=>[f(Yt,{modelValue:n.value,"onUpdate:modelValue":[o[0]||(o[0]=l=>n.value=l),s],label:"Large tiles",density:"compact","hide-details":""},null,8,["modelValue"]),f(Yt,{modelValue:r.value,"onUpdate:modelValue":[o[1]||(o[1]=l=>r.value=l),i],label:"Show cancel instead of quick stop",density:"compact","hide-details":"",class:"mt-2"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}))}}),Hp="FDM-Monster-Client-Vue2",x2={TILE_DRAG_START:"tile-drag-start"};var qp=(e=>(e.PRINTER_PLACE="PRINTER_PLACE",e))(qp||{});function Nee(e){return!e?.appId?.length||!e?.intent?.length?!1:e.appId===Hp&&e.intent==="PRINTER_PLACE"}const Mee={class:"d-flex flex-wrap ga-2"},Vee={class:"font-weight-medium"},Bee=Ae({__name:"HomeToolbar",setup(e){const t=ns(),n=k2(),{selectedTags:r,selectedPrinterTypes:s,tags:i,loadTags:a}=Vc(),o=A(()=>t.selectedFloorIndex),l=A(()=>t.floors);ot(async()=>{await a()});function c(m){t.changeSelectedFloorByIndex(m)}function u(m){n.setTagFilter(m)}function d(m){n.setPrinterTypeFilter(m)}function p(m,v){!v.dataTransfer||!m.id||v.dataTransfer.setData("text",JSON.stringify({appId:Hp,intent:qp.PRINTER_PLACE,printerId:m.id}))}return(m,v)=>($(),J(ro,{flat:"",color:"surface",class:"text-on-surface"},{default:h(()=>[f(SC,{"model-value":o.value,class:"ml-4",rounded:"",mandatory:"","onUpdate:modelValue":c},{default:h(()=>[($(!0),pe(ke,null,Ot(l.value,g=>($(),J(te,{key:g.id,size:"small"},{default:h(()=>[f(j,null,{default:h(()=>[...v[2]||(v[2]=[k("layers",-1)])]),_:1}),k(" "+Y(g.name),1)]),_:2},1024))),128))]),_:1},8,["model-value"]),f(Vl,{modelValue:Q(r),"onUpdate:modelValue":[v[0]||(v[0]=g=>nt(r)?r.value=g:null),u],tags:Q(i),label:"Filter by tags",class:"ml-4",style:{"max-width":"300px"}},null,8,["modelValue","tags"]),f(Bl,{modelValue:Q(s),"onUpdate:modelValue":[v[1]||(v[1]=g=>nt(s)?s.value=g:null),d],label:"Filter by type",class:"ml-2",style:{"max-width":"300px"}},null,8,["modelValue"]),Q(t).floorlessPrinters.length?($(),J(da,{key:0,"close-on-content-click":!1},{activator:h(({props:g})=>[f(te,ce(g,{color:"warning",variant:"tonal",size:"small",class:"ml-4"}),{default:h(()=>[f(j,{start:""},{default:h(()=>[...v[3]||(v[3]=[k("warning",-1)])]),_:1}),k(" "+Y(Q(t).floorlessPrinters.length)+" Unplaced ",1)]),_:1},16)]),default:h(()=>[f($e,{"min-width":"300"},{default:h(()=>[f(Lt,{class:"text-subtitle-1"},{default:h(()=>[f(j,{class:"mr-2",color:"warning"},{default:h(()=>[...v[4]||(v[4]=[k("warning",-1)])]),_:1}),v[5]||(v[5]=k(" Unplaced Printers ",-1))]),_:1}),f(Xe,null,{default:h(()=>[v[7]||(v[7]=S("div",{class:"text-caption mb-2 text-medium-emphasis"}," Drag these printers onto the grid: ",-1)),S("div",Mee,[($(!0),pe(ke,null,Ot(Q(t).floorlessPrinters,g=>($(),J(qe,{key:g.id,draggable:"",size:"small",color:"warning",style:{cursor:"move"},onDragstart:b=>p(g,b)},{default:h(()=>[f(j,{start:"",size:"x-small"},{default:h(()=>[...v[6]||(v[6]=[k("drag_indicator",-1)])]),_:1}),S("span",Vee,Y(g.name),1),f(qe,{size:"x-small",variant:"flat",class:"ml-2 px-2",style:{height:"18px"}},{default:h(()=>[k(Y(Q(Yr)(g.printerType)),1)]),_:2},1024)]),_:2},1032,["onDragstart"]))),128))])]),_:1})]),_:1})]),_:1})):se("",!0),f(Ft),f($ee,{class:"ml-4"}),f(Fee,{class:"ml-4"})]),_:1}))}});function Uee(e,t,n=!0){return e?t.map(r=>({file:r,printer:e,startPrint:n})):[]}function E2(e,t,n=!0){return!e?.length||!t?[]:e.map(r=>({file:t,printer:r,startPrint:n}))}const zee=oe({color:String,density:String,...Ue()},"VBannerActions"),jee=be()({name:"VBannerActions",props:zee(),setup(e,t){let{slots:n}=t;return Rn({VBtn:{color:e.color,density:e.density,slim:!0,variant:"text"}}),Ie(()=>S("div",{class:Se(["v-banner-actions",e.class]),style:Le(e.style)},[n.default?.()])),{}}}),Hee=vl("v-banner-text"),qee=oe({avatar:String,bgColor:String,color:String,icon:Fe,lines:String,stacked:Boolean,sticky:Boolean,text:String,...rs(),...Ue(),...Pn(),...Vn(),...lo({mobile:null}),..._r(),...aa(),...wl(),...Tn(),...lt(),...wt()},"VBanner"),Wee=be()({name:"VBanner",props:qee(),setup(e,t){let{slots:n}=t;const{backgroundColorClasses:r,backgroundColorStyles:s}=yn(()=>e.bgColor),{borderClasses:i}=vs(e),{densityClasses:a}=Fr(e),{displayClasses:o,mobile:l}=bs(e),{dimensionStyles:c}=Bn(e),{elevationClasses:u}=Nr(e),{locationStyles:d}=oo(e),{positionClasses:p}=_l(e),{roundedClasses:m}=An(e),{themeClasses:v}=Mt(e),g=ee(()=>e.color),b=ee(()=>e.density);Rn({VBannerActions:{color:g,density:b}}),Ie(()=>{const y=!!(e.text||n.text),w=!!(e.avatar||e.icon),_=!!(w||n.prepend);return f(e.tag,{class:Se(["v-banner",{"v-banner--stacked":e.stacked||l.value,"v-banner--sticky":e.sticky,[`v-banner--${e.lines}-line`]:!!e.lines},v.value,r.value,i.value,a.value,o.value,u.value,p.value,m.value,e.class]),style:Le([s.value,c.value,d.value,e.style]),role:"banner"},{default:()=>[_&&S("div",{key:"prepend",class:"v-banner__prepend"},[n.prepend?f(vt,{key:"prepend-defaults",disabled:!w,defaults:{VAvatar:{color:g.value,density:b.value,icon:e.icon,image:e.avatar}}},n.prepend):f(Sn,{key:"prepend-avatar",color:g.value,density:b.value,icon:e.icon,image:e.avatar},null)]),S("div",{class:"v-banner__content"},[y&&f(Hee,{key:"text"},{default:()=>[n.text?.()??e.text]}),n.default?.()]),n.actions&&f(jee,{key:"actions"},n.actions)]})})}}),Gee={class:"pl-1"},Kee=Ae({__name:"UploadToolbar",setup(e){const t=At(),n=Kn(),r=b1(),s=bt(),i=q(void 0),a=q(null),o=A(()=>t.selectedPrinters.length>0),l=A(()=>t.selectedPrinters),c=()=>{a.value&&a.value.files?i.value=a.value.files[0]:i.value=void 0},u=()=>{a.value&&(a.value.value="",i.value=void 0)},d=async()=>{const b=t.selectedPrinters?.map(w=>w.id)??[],y=await jt(Ht.BatchReprintDialog).handleAsync(b);console.log("[PrinterGridView] Dialog completed",y)},p=b=>{const y=l.value,w=y.filter(P=>n.isApiResponding(P.id));if(!i.value)return;const _=y.length-w.length;_>0&&s.openInfoMessage({title:`${_} printers inaccessible`,subtitle:"These were skipped from uploading."});const T=E2(w,i.value,b);r.queueUploads(T),a.value&&(a.value.value=""),v()},m=b=>{t.toggleSelectedPrinter(b)},v=()=>{t.clearSelectedPrinters()},g=b=>{It.openPrinterURL(b.printerURL)};return(b,y)=>{const w=Wd("drop-upload");return Pt(($(),J(Wee,null,{default:h(()=>[f(it,{style:{"margin-bottom":"-5px"}},{default:h(()=>[f(Be,{style:{padding:"5px 0 0 15px"}},{default:h(()=>[f(k_,{class:"d-inline-block"},{default:h(()=>[l.value.length===0?($(),J(qe,{key:0,size:"small"},{default:h(()=>[...y[7]||(y[7]=[k(" No selected printers ",-1)])]),_:1})):se("",!0),($(!0),pe(ke,null,Ot(l.value,_=>($(),J(qe,{key:_.id,closable:"",color:"primary",size:"small",onClick:T=>g(_),"onClick:close":T=>m(_)},{default:h(()=>[k(Y(_.name),1)]),_:2},1032,["onClick","onClick:close"]))),128))]),_:1})]),_:1}),f(Be,{align:"right",style:{padding:"0"}},{default:h(()=>[Q(i)?($(),J(k_,{key:0,class:"float-end"},{default:h(()=>[f(qe,{closable:"","onClick:close":y[0]||(y[0]=_=>u())},{default:h(()=>[k(Y(Q(i).name)+" ",1),S("strong",Gee,Y(Q(OP)(Q(i).size)),1)]),_:1})]),_:1})):se("",!0),y[14]||(y[14]=S("br",null,null,-1)),f(te,{disabled:!o.value,color:"primary",variant:"elevated",size:"small",onClick:y[1]||(y[1]=_=>d())},{default:h(()=>[f(j,{class:"pr-2",size:"small"},{default:h(()=>[...y[8]||(y[8]=[k("refresh",-1)])]),_:1}),y[9]||(y[9]=k(" Batch reprint ",-1))]),_:1},8,["disabled"]),f(te,{disabled:l.value.length===0,class:"ml-2",variant:"elevated",size:"small",onClick:y[2]||(y[2]=_=>v())},{default:h(()=>[f(j,{class:"pr-2",size:"small"},{default:h(()=>[...y[10]||(y[10]=[k("delete",-1)])]),_:1}),k(" Clear all ("+Y(l.value.length)+") ",1)]),_:1},8,["disabled"]),f(te,{class:"ml-2",variant:"elevated",size:"small",onClick:y[3]||(y[3]=_=>Q(a)?.click())},{default:h(()=>[...y[11]||(y[11]=[k(" Select gcode file ",-1)])]),_:1}),f(te,{disabled:!Q(i),class:"ml-2",color:"success",variant:"elevated",size:"small",onClick:y[4]||(y[4]=_=>p(!1))},{default:h(()=>[...y[12]||(y[12]=[k(" Upload only ",-1)])]),_:1},8,["disabled"]),f(te,{disabled:!Q(i),class:"ml-2 mr-5",color:"success",variant:"elevated",size:"small",onClick:y[5]||(y[5]=_=>p(!0))},{default:h(()=>[...y[13]||(y[13]=[k(" Upload and print ",-1)])]),_:1},8,["disabled"]),S("input",{ref_key:"fileUpload",ref:a,multiple:!1,accept:".gcode,.3mf,.bgcode",style:{display:"none"},type:"file",onChange:y[6]||(y[6]=_=>c())},null,544)]),_:1})]),_:1})]),_:1})),[[w,{printers:l.value}]])}}}),_1="/img/logo.svg",Yee=Ae({__name:"PrinterCreateAction",props:{floorId:{},floorX:{},floorY:{},isFirstTime:{type:Boolean}},setup(e){const t=e,n=jt(Ht.AddOrUpdatePrinterDialog);function r(){n.openDialog({floorId:t.floorId,floorX:t.floorX,floorY:t.floorY})}return(s,i)=>e.isFirstTime?($(),pe("div",{key:0,class:"text-center pa-4 clickable-first-time",onClick:i[0]||(i[0]=qt(a=>r(),["stop"]))},[f(j,{size:"large",color:"primary",class:"mb-2"},{default:h(()=>[...i[2]||(i[2]=[k("add_circle",-1)])]),_:1}),i[3]||(i[3]=S("div",{class:"text-subtitle-2 mb-2"},"No printers placed",-1)),i[4]||(i[4]=S("div",{class:"text-caption text-medium-emphasis"},"Click here to add your first printer",-1))])):($(),J(te,{key:1,class:"ma-2",color:"primary",size:"small",rounded:"",onClickCapture:i[1]||(i[1]=qt(a=>r(),["stop"]))},{default:h(()=>[f(j,null,{default:h(()=>[...i[5]||(i[5]=[k("add",-1)])]),_:1}),i[6]||(i[6]=k(" New printer ",-1))]),_:1}))}}),C2=fn(Yee,[["__scopeId","data-v-89f7b0e1"]]);class T2 extends Cr{static async postQuickStopM112Command(t){const n=ue.sendQuickStopM112Route(t);return await this.post(n)}}const Jee="thumbnail",Xee=(e,t)=>Np({queryKey:[Jee,e],queryFn:async()=>e.value?pi.getThumbnail(e.value).then(n=>n.thumbnailBase64||""):"",enabled:!!e&&!!t}),Qee={class:"d-flex flex flex-column justify-center align-center",style:{height:"100%"}},Zee={key:1,class:"printer-file-or-stream-viewer"},ete={key:2,class:"printer-file-or-stream-viewer"},tte={key:3,class:"printer-menu"},nte={class:"file-name"},rte={key:5,class:"centered-controls"},ste={key:0},ite={key:1},xk="rgba(100,100,100,0.1)",ate=Ae({__name:"PrinterGridTile",props:{printer:{type:Object,required:!1},x:{type:Number,required:!0},y:{type:Number,required:!0}},setup(e){const t=e,n=At(),r=Kn(),s=ns(),i=ws(),a=jt(Ht.PrinterControlDialog),o=jt(Ht.AddOrUpdatePrinterDialog),l=Nc(),c=bt(),u=A(()=>t.printer?.id),d=A(()=>t.x===0&&t.y===0),p=A(()=>n.printers.length===0),m=A(()=>i.largeTiles),v=A(()=>m.value?"80px":"40px"),{data:g}=Xee(u,i.thumbnailsEnabled),b=A(()=>u.value?r.isApiResponding(u.value):!1),y=A(()=>u.value?r.isPrinterOperational(u.value):!1),w=A(()=>u.value?r.isPrinterPrinting(u.value):!1),_=A(()=>u.value?r.isPrinterPaused(u.value):!1),T=A(()=>u.value?n.isSelectedPrinter(u.value):!1),P=A(()=>n.selectedPrinters?.length&&!T.value),x=A(()=>i.preferCancelOverQuickStop),C=A(()=>{if(!u.value)return;const re=n.printer(u.value);if(!re)return;const ae=r.printerEventsById[u.value],de=r.socketStatesById[u.value];return aq(re,de,ae)}),E=A(()=>{const re=C.value;return re&&re.rgb||xk}),R=A(()=>{if(u.value)return r.printerJobsById[u.value]}),I=A(()=>u.value?R.value?.progress?.completion:void 0),O=A(()=>{if(u.value)return r.printingFilePathsByPrinterId[u.value]}),L=async()=>{u.value&&await n.sendStopJobCommand(u.value)},V=async()=>{u.value&&await It.pausePrintJob(u.value)},F=async()=>{u.value&&await It.resumePrintJob(u.value)},B=()=>{t.printer&&l.openFileExplorer(t.printer)},M=async()=>{u.value&&(await It.refreshSocket(u.value),c.openInfoMessage({title:"Refreshing connection state"}))},N=re=>{!re.dataTransfer||!t.printer?.id||(globalThis.dispatchEvent(new CustomEvent(x2.TILE_DRAG_START)),re.dataTransfer.setData("text",JSON.stringify({appId:Hp,intent:qp.PRINTER_PLACE,printerId:t.printer.id})))},D=()=>{const re=t.printer;re&&o.openDialog({id:re.id})},W=async()=>{if(!u.value||!t.printer)throw new Error("PrinterId not set, cant open dialog");await a.openDialog({printer:t.printer})},z=async()=>{u.value&&confirm("Are you sure to abort the print in Quick Stop mode? Please reconnect after.")&&await T2.postQuickStopM112Command(u.value)},K=async()=>{u.value&&await It.sendPrinterConnectCommand(u.value)},H=async()=>{!t.printer||!u.value||n.toggleSelectedPrinter(t.printer)};return(re,ae)=>{const de=C2,De=Wd("drop-upload"),X=Wd("drop-printer-position");return Pt(($(),pe("div",null,[Pt(($(),J($e,{draggable:!!e.printer,ripple:b.value,class:Se([{"tile-large":m.value,"tile-selected":T.value,"tile-unselected":P.value,"tile-no-printer":!e.printer,"tile-draggable":!!e.printer},"tile colored-tile rounded-lg"]),elevation:"5",onClick:ae[7]||(ae[7]=ie=>H()),onDragstart:N},{default:h(()=>[Pt(S("div",{class:"printer-title"},Y(e.printer?.name??" "),513),[[$r,e.printer]]),e.printer?se("",!0):($(),pe("div",{key:0,style:Le([{height:m.value?"calc(120px - 20px)":"calc(84px - 20px)"},{position:"absolute"}]),class:Se(d.value&&p.value?"plus-always-visible":"plus-hover-icon")},[S("div",Qee,[f(de,{"floor-id":Q(s).selectedFloor?.id,"floor-x":e.x,"floor-y":e.y,"is-first-time":d.value&&p.value},null,8,["floor-id","floor-x","floor-y","is-first-time"])])],6)),e.printer&&b.value?($(),pe("div",Zee,[Q(g)?.length?($(),J(ms,{key:1,src:"data:image/png;base64,"+(Q(g)??""),width:v.value},null,8,["src","width"])):($(),J(ms,{key:0,src:Q(v1),width:v.value,alt:"No thumbnail was found in GCode",style:{opacity:"0.3",filter:"grayscale(100%)"}},null,8,["src","width"]))])):e.printer?($(),pe("div",ete,[C.value?.text.includes("API")?($(),J(j,{key:0,size:v.value,color:"secondary"},{default:h(()=>[...ae[8]||(ae[8]=[k(" wifi_off ",-1)])]),_:1},8,["size"])):se("",!0),e.printer.enabled?se("",!0):($(),J(j,{key:1,size:v.value,color:"secondary"},{default:h(()=>[...ae[9]||(ae[9]=[k(" disabled_by_default ",-1)])]),_:1},8,["size"])),C.value?.text.includes("unset")?($(),J(j,{key:2,size:v.value,color:"secondary"},{default:h(()=>[...ae[10]||(ae[10]=[k(" question_mark ",-1)])]),_:1},8,["size"])):se("",!0)])):se("",!0),e.printer?($(),pe("div",tte,[f(Kt,{location:"top"},{activator:h(({props:ie})=>[f(te,ce({color:"primary",elevation:"2",size:"x-small",rounded:"xl"},ie,{onClick:ae[0]||(ae[0]=qt(ne=>B(),["prevent","stop"]))}),{default:h(()=>[f(j,{size:"16"},{default:h(()=>[...ae[11]||(ae[11]=[k("folder",-1)])]),_:1})]),_:1},16)]),default:h(()=>[...ae[12]||(ae[12]=[k("Files",-1)])]),_:1})])):se("",!0),e.printer?($(),pe("div",{key:4,style:Le([{position:m.value?"inherit":"absolute",top:m.value?"inherit":"30px"},{overflow:"clip"}]),class:"printer-controls"},[S("small",nte,Y(O.value??" "),1)],4)):se("",!0),e.printer?($(),pe("div",rte,[f(Kt,{top:""},{activator:h(({props:ie})=>[f(te,ce({disabled:!b.value||!y.value,size:m.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},ie,{onClick:ae[1]||(ae[1]=qt(ne=>W(),["prevent","stop"]))}),{default:h(()=>[f(j,null,{default:h(()=>[...ae[13]||(ae[13]=[k("open_with",-1)])]),_:1})]),_:1},16,["disabled","size"])]),default:h(()=>[...ae[14]||(ae[14]=[k("Move and home printer",-1)])]),_:1}),Q(Vb)(e.printer.printerType)?($(),J(Kt,{key:0,top:""},{activator:h(({props:ie})=>[!y.value&&b.value?($(),J(te,ce({key:0,size:m.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},ie,{onClick:ae[2]||(ae[2]=qt(ne=>K(),["prevent","stop"]))}),{default:h(()=>[f(j,null,{default:h(()=>[...ae[15]||(ae[15]=[k("usb",-1)])]),_:1})]),_:1},16,["size"])):se("",!0)]),default:h(()=>[...ae[16]||(ae[16]=[k("Connect USB (only for OctoPrint)",-1)])]),_:1})):se("",!0),Q(Jm)(e.printer.printerType)?($(),J(Kt,{key:1,top:""},{activator:h(({props:ie})=>[f(te,ce({size:m.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},ie,{onClick:ae[3]||(ae[3]=qt(ne=>M(),["prevent","stop"]))}),{default:h(()=>[f(j,null,{default:h(()=>[...ae[17]||(ae[17]=[k("refresh",-1)])]),_:1})]),_:1},16,["size"])]),default:h(()=>[...ae[18]||(ae[18]=[k("Reload printer connection and refresh all states ",-1)])]),_:1})):se("",!0),Q(Jm)(e.printer.printerType)?($(),J(Kt,{key:2,top:""},{activator:h(({props:ie})=>[f(te,ce({disabled:!b.value||!_.value&&!w.value,size:m.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},ie,{onClick:ae[4]||(ae[4]=qt(ne=>_.value?F():V(),["prevent","stop"]))}),{default:h(()=>[_.value?se("",!0):($(),J(j,{key:0},{default:h(()=>[...ae[19]||(ae[19]=[k("pause",-1)])]),_:1})),_.value?($(),J(j,{key:1},{default:h(()=>[...ae[20]||(ae[20]=[k("play_arrow",-1)])]),_:1})):se("",!0)]),_:1},16,["disabled","size"])]),default:h(()=>[k(Y(_.value?"Resume print":"Pause print"),1)]),_:1})):se("",!0),Q(Jm)(e.printer.printerType)&&(Q(LP)(e.printer.printerType)||x.value)?($(),J(Kt,{key:3,top:""},{activator:h(({props:ie})=>[f(te,ce({disabled:!b.value||x.value&&!w.value&&!_.value,size:m.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},ie,{onClick:ae[5]||(ae[5]=qt(ne=>x.value?L():z(),["prevent","stop"]))}),{default:h(()=>[f(j,null,{default:h(()=>[k(Y(x.value?"stop":"dangerous"),1)]),_:1})]),_:1},16,["disabled","size"])]),default:h(()=>[k(Y(x.value?"Cancel current print gracefully":"Perform quick stop of printer"),1)]),_:1})):se("",!0),f(Kt,{top:""},{activator:h(({props:ie})=>[f(te,ce({size:m.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},ie,{onClick:ae[6]||(ae[6]=qt(ne=>D(),["prevent","stop"]))}),{default:h(()=>[f(j,null,{default:h(()=>[...ae[21]||(ae[21]=[k("settings",-1)])]),_:1})]),_:1},16,["size"])]),default:h(()=>[...ae[22]||(ae[22]=[k("Open printer settings",-1)])]),_:1})])):se("",!0),e.printer?($(),J(Or,{key:6,"model-value":I.value,"background-color":"dark-gray",class:"progress-bar",height:"14"},{default:h(({value:ie})=>[S("strong",null,Y(ie?.toFixed(1)+"%"),1),f(Kt,{disabled:e.printer?.enabled,"close-delay":100,color:"danger","open-delay":0,top:""},{activator:h(({props:ne})=>[S("span",ce({class:"xsmall-resized-font text--secondary ml-sm-2"},ne),[e.printer?.disabledReason?($(),pe("span",ste,[ae[24]||(ae[24]=S("small",null," MAINTENANCE",-1)),f(j,{class:"d-none d-xl-inline",color:"primary",small:""},{default:h(()=>[...ae[23]||(ae[23]=[k("info",-1)])]),_:1})])):($(),pe("span",ite,[S("small",{style:Le({"background-color":E.value+"99","border-left":"5px solid "+E.value+"ff",padding:"5px"})},Y(C.value?.text?.toUpperCase()),5)]))],16)]),default:h(()=>[S("span",null,Y(e.printer?.disabledReason??"Printer disabled"),1)]),_:1},8,["disabled"])]),_:1},8,["model-value"])):se("",!0)]),_:1},8,["draggable","ripple","class"])),[[De,{printers:[e.printer]}]])])),[[X,{x:e.x,y:e.y,printerSet:e.printer}]])}}}),ote={class:"printer-grid-container"},lte=Ae({__name:"PrinterGrid",props:{gap:{type:String,default:"4px"}},setup(e){const t=At(),n=ns(),r=ws(),s=k2(),i=q([]),a=q(!1),o=q(!1),l=q(!1);globalThis.addEventListener("dragstart",x=>{a.value=!0}),globalThis.addEventListener("dragend",()=>{a.value=!1,o.value=!1}),globalThis.addEventListener(x2.TILE_DRAG_START,()=>{o.value=!0}),ot(async()=>{await t.loadPrinters(),await n.loadFloors(),i.value=await ka.getTagsWithPrinters()});const c=e,u=A(()=>{const x=n.gridSortedPrinters,C=s.selectedTagFilter?.length>0,E=s.selectedPrinterTypeFilter?.length>0;return!C&&!E?x:x.map(R=>R.map(I=>{if(!I)return;let O=!C;C&&(O=i.value.some(V=>s.selectedTagFilter.includes(V.id)&&V.printers.some(F=>F.printerId===I.id)));let L=!E;return E&&(L=s.selectedPrinterTypeFilter.includes(I.printerType)),O&&L?I:void 0}))}),d=A(()=>r.gridCols),p=A(()=>r.gridRows),m=A(()=>r.largeTiles),v=A(()=>p.value*d.value),g=A(()=>({display:"grid",gridTemplateColumns:`repeat(${d.value}, 1fr)`,gap:c.gap})),b=x=>x%d.value,y=x=>Math.floor(x/d.value);function w(x,C){const E=x,R=C;if(!(!u.value?.length||!u.value[E]))return u.value[E][R]}function _(){l.value=!0}function T(){l.value=!1}async function P(x){if(l.value=!1,!!x.dataTransfer)try{const C=JSON.parse(x.dataTransfer.getData("text"));if(C.appId!==Hp||C.intent!==qp.PRINTER_PLACE)return;const E=C.printerId;if(!E||!n.selectedFloor)return;await ls.deletePrinterFromFloor(n.selectedFloor.id,E),await n.loadFloors()}catch(C){console.error("Failed to remove printer from grid:",C)}}return(x,C)=>($(),pe("div",null,[S("div",ote,[S("div",{class:"printer-grid",style:Le(g.value)},[($(!0),pe(ke,null,Ot(v.value,E=>($(),pe("div",{key:`printer-${b(E-1)}-${y(E-1)}`,class:Se(["printer-cell",{"printer-cell-large":m.value}])},[f(ate,{printer:w(b(E-1),y(E-1)),x:b(E-1),y:y(E-1)},null,8,["printer","x","y"])],2))),128))],4)]),Pt(S("div",{class:"remove-drop-zone",onDragover:C[0]||(C[0]=qt(()=>{},["prevent"])),onDragenter:qt(_,["prevent"]),onDragleave:qt(T,["prevent"]),onDrop:qt(P,["prevent"])},[f(j,{size:"large",class:"mr-2"},{default:h(()=>[...C[1]||(C[1]=[k("delete_forever",-1)])]),_:1}),C[2]||(C[2]=S("span",{class:"text-h6"},"Drop here to remove from grid",-1))],544),[[$r,o.value]]),C[3]||(C[3]=S("img",{alt:"FDM Monster Background",class:"grid-bg-img align-content-center",src:_1,style:{opacity:"0.08","pointer-events":"none"}},null,-1))]))}}),ute=fn(lte,[["__scopeId","data-v-4025d668"]]),cte=Ae({__name:"PrinterGridView",setup(e){const t=c1(),n=ns();return ot(()=>{const r=t.query.floor;if(r){const s=n.floors.findIndex(i=>i.id===Number(r));s>=0&&n.changeSelectedFloorByIndex(s)}}),(r,s)=>($(),pe("div",null,[f(Bee),f(Kee),f(ute,{class:"ma-2"})]))}}),dte="modulepreload",fte=function(e){return"/"+e},Ek={},pte=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){let c=function(u){return Promise.all(u.map(d=>Promise.resolve(d).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};var a=c;document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),l=o?.nonce||o?.getAttribute("nonce");s=c(n.map(u=>{if(u=fte(u),u in Ek)return;Ek[u]=!0;const d=u.endsWith(".css"),p=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${p}`))return;const m=document.createElement("link");if(m.rel=d?"stylesheet":dte,d||(m.as="script"),m.crossOrigin="",m.href=u,l&&m.setAttribute("nonce",l),document.head.appendChild(m),d)return new Promise((v,g)=>{m.addEventListener("load",v),m.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${u}`)))})}))}function i(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return s.then(o=>{for(const l of o||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})},mte=Ae({name:"RefreshFilesAction",components:{},props:{printer:Object},setup:()=>({printersStore:At()}),methods:{async getFiles(){this.printer&&await this.printersStore.loadPrinterFiles(this.printer.id)}}});function hte(e,t,n,r,s,i){return $(),J(te,{color:"secondary",onClick:t[0]||(t[0]=a=>e.getFiles())},{default:h(()=>[f(j,null,{default:h(()=>[...t[1]||(t[1]=[k("refresh",-1)])]),_:1}),t[2]||(t[2]=S("span",{class:"d-none d-lg-inline"}," Refresh files ",-1))]),_:1})}const I2=fn(mte,[["render",hte]]),gte=Ae({name:"PrinterDetails",components:{RefreshFilesAction:I2},props:{printer:Object},setup:()=>({printersStore:At(),printerStateStore:Kn()}),data:()=>({dragging:!1}),computed:{printerId(){return this.printer?.id},socketState(){if(this.printerId)return this.printerStateStore.socketStatesById[this.printerId]?.socket},apiState(){if(this.printerId)return this.printerStateStore.socketStatesById[this.printerId]?.api},printerTextState(){if(this.printerId)return this.printerStateStore.printerEventsById[this.printerId]?.current?.payload?.state.text}}}),vte={class:"d-flex flex-column ga-2"},yte={class:"d-flex align-center"},bte={class:"font-weight-medium"},Ste={class:"d-flex align-center"},wte={class:"text-caption"},_te={class:"d-flex align-center flex-wrap ga-2"},kte={class:"d-flex align-center"},xte={class:"d-flex align-center"},Ete={class:"d-flex align-center"};function Cte(e,t,n,r,s,i){const a=I2,o=Wd("drop-upload");return e.printer?Pt(($(),pe("div",{key:0,class:"pa-4",style:Le(e.dragging?"background-color: rgba(211, 47, 47, 0.1)":"background-color: rgba(0,0,0,0.2)")},[f(it,null,{default:h(()=>[f(Be,{cols:"12",md:"8"},{default:h(()=>[S("div",vte,[S("div",yte,[f(j,{size:"small",class:"mr-2"},{default:h(()=>[...t[0]||(t[0]=[k("badge",-1)])]),_:1}),t[1]||(t[1]=S("span",{class:"text-caption text-medium-emphasis mr-2"},"Name:",-1)),S("span",bte,Y(e.printer.name),1)]),S("div",Ste,[f(j,{size:"small",class:"mr-2"},{default:h(()=>[...t[2]||(t[2]=[k("link",-1)])]),_:1}),t[3]||(t[3]=S("span",{class:"text-caption text-medium-emphasis mr-2"},"URL:",-1)),S("span",wte,Y(e.printer.printerURL),1)]),S("div",_te,[S("div",kte,[f(j,{size:"small",class:"mr-2"},{default:h(()=>[...t[4]||(t[4]=[k("dns",-1)])]),_:1}),t[5]||(t[5]=S("span",{class:"text-caption text-medium-emphasis mr-2"},"Host:",-1)),f(qe,{size:"x-small",variant:"tonal"},{default:h(()=>[k(Y(e.apiState),1)]),_:1})]),S("div",xte,[f(j,{size:"small",class:"mr-2"},{default:h(()=>[...t[6]||(t[6]=[k("hub",-1)])]),_:1}),t[7]||(t[7]=S("span",{class:"text-caption text-medium-emphasis mr-2"},"WebSocket:",-1)),f(qe,{size:"x-small",variant:"tonal"},{default:h(()=>[k(Y(e.socketState),1)]),_:1})]),S("div",Ete,[f(j,{size:"small",class:"mr-2"},{default:h(()=>[...t[8]||(t[8]=[k("print",-1)])]),_:1}),t[9]||(t[9]=S("span",{class:"text-caption text-medium-emphasis mr-2"},"Printer:",-1)),f(qe,{size:"x-small",variant:"tonal"},{default:h(()=>[k(Y(e.printerTextState),1)]),_:1})])])])]),_:1}),f(Be,{cols:"12",md:"4",class:"d-flex align-center justify-end"},{default:h(()=>[f(a,{printer:e.printer},null,8,["printer"])]),_:1})]),_:1})],4)),[[o,{printers:[e.printer]}]]):se("",!0)}const Tte=fn(gte,[["render",Cte]]),Ite=Ae({__name:"PrinterUrlAction",props:{printer:{}},setup(e){const t=e;async function n(){It.openPrinterURL(t.printer.printerURL)}return(r,s)=>Q(DP)(e.printer.printerType)?($(),J(Kt,{key:0,location:"top"},{activator:h(({props:i})=>[f(te,ce(i,{color:"secondary",class:"ms-4",rounded:"",size:"small",onClickCapture:s[0]||(s[0]=qt(a=>n(),["stop"]))}),{default:h(()=>[f(j,null,{default:h(()=>[...s[1]||(s[1]=[k("directions",-1)])]),_:1})]),_:1},16)]),default:h(()=>[...s[2]||(s[2]=[k("Visit printer service",-1)])]),_:1})):se("",!0)}}),Rte=Ae({name:"PrinterSettingsAction",props:{printer:Object},computed:{printerId(){return this.printer.id}},methods:{openSettings(){this.$emit("update:show",this.printer.id)}}});function Pte(e,t,n,r,s,i){return $(),J(Kt,{location:"top"},{activator:h(({props:a})=>[f(te,ce(a,{color:"secondary",class:"ms-4",size:"small",rounded:"",onClickCapture:t[0]||(t[0]=qt(o=>e.openSettings(),["stop"]))}),{default:h(()=>[f(j,null,{default:h(()=>[...t[1]||(t[1]=[k("settings",-1)])]),_:1})]),_:1},16)]),default:h(()=>[...t[2]||(t[2]=[k("Update printer settings",-1)])]),_:1})}const Ate=fn(Rte,[["render",Pte]]),Ote=Ae({__name:"PrinterConnectionAction",props:{printer:{}},setup(e){const t=e,n=Kn();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 It.sendPrinterDisconnectCommand(t.printer.id);await It.sendPrinterConnectCommand(t.printer.id)}return(a,o)=>Q(Vb)(e.printer.printerType)?($(),J(Kt,{key:0,location:"top"},{activator:h(({props:l})=>[e.printer.enabled?($(),J(Up,{key:0,color:r()?"green":"red",class:"ms-4"},{badge:h(()=>[r()?($(),J(j,{key:0},{default:h(()=>[...o[0]||(o[0]=[k("check",-1)])]),_:1})):($(),J(j,{key:1},{default:h(()=>[...o[1]||(o[1]=[k("close",-1)])]),_:1}))]),default:h(()=>[f(te,ce({disabled:s()},l,{color:"secondary",rounded:"",size:"small",onClick:qt(i,["stop"])}),{default:h(()=>[f(j,null,{default:h(()=>[...o[2]||(o[2]=[k("usb",-1)])]),_:1})]),_:1},16,["disabled"])]),_:2},1032,["color"])):se("",!0)]),default:h(()=>[...o[3]||(o[3]=[k("Connect USB (OctoPrint only)",-1)])]),_:1})):se("",!0)}}),Dte=Ae({__name:"PrinterQuickStopAction",props:{printer:{}},setup(e){const t=e;async function n(){confirm("Are you sure to quick stop this printer?")&&await T2.postQuickStopM112Command(t.printer.id)}return(r,s)=>Q(LP)(e.printer.printerType)?($(),J(Kt,{key:0,location:"top"},{activator:h(({props:i})=>[e.printer.enabled?($(),J(Up,{key:0,class:"ms-4"},{badge:h(()=>[f(j,null,{default:h(()=>[...s[0]||(s[0]=[k("bolt",-1)])]),_:1})]),default:h(()=>[f(te,ce(i,{color:"secondary",size:"small",rounded:"",onClick:qt(n,["stop"])}),{default:h(()=>[f(j,null,{default:h(()=>[...s[1]||(s[1]=[k("dangerous",-1)])]),_:1})]),_:1},16)]),_:2},1024)):se("",!0)]),default:h(()=>[...s[2]||(s[2]=[k("Perform quick stop of printer",-1)])]),_:1})):se("",!0)}}),Lte=Ae({__name:"FileExplorerAction",props:{printer:{}},setup(e){const t=e,n=Nc();function r(){t.printer&&n.openFileExplorer(t.printer)}return(s,i)=>($(),J(Kt,{location:"top"},{activator:h(({props:a})=>[f(te,ce(a,{disabled:!e.printer,color:"secondary",rounded:"",size:"small",onClickCapture:i[0]||(i[0]=qt(o=>r(),["stop"]))}),{default:h(()=>[f(j,null,{default:h(()=>[...i[1]||(i[1]=[k("folder",-1)])]),_:1})]),_:1},16,["disabled"])]),default:h(()=>[...i[2]||(i[2]=[k("Open file explorer",-1)])]),_:1}))}});class $te extends Cr{static async syncPrinterName(t){const n=`${ue.syncPrinterNameSettingRoute(t)}`;return await this.post(n)}}const Fte=Ae({__name:"SyncPrinterNameAction",props:{printer:{}},setup(e){const t=e,n=bt();async function r(){await $te.syncPrinterName(t.printer.id),n.openInfoMessage({title:"Synced printer name to OctoPrint"})}return(s,i)=>Q(sW)(e.printer.printerType)?($(),J(Kt,{key:0,location:"top"},{activator:h(({props:a})=>[f(te,ce(a,{color:"secondary",class:"ms-4",size:"small",rounded:"",onClickCapture:i[0]||(i[0]=qt(o=>r(),["stop"]))}),{default:h(()=>[f(j,null,{default:h(()=>[...i[1]||(i[1]=[k("badge",-1)])]),_:1})]),_:1},16)]),default:h(()=>[...i[2]||(i[2]=[k(" Set OctoPrint name to the FDM Monster name ",-1)])]),_:1})):se("",!0)}}),Nte=Ae({__name:"PrinterDeleteAction",props:{printer:{}},setup(e){const t=e,n=At(),r=Kn();async function s(){confirm("Are you sure to delete this printer?")&&(await n.deletePrinter(t.printer.id),r.deletePrinterEvents(t.printer.id))}return(i,a)=>($(),J(Kt,{location:"top"},{activator:h(({props:o})=>[f(te,ce(o,{class:"ms-4",color:"secondary",size:"small",rounded:"",onClick:qt(s,["prevent","stop"])}),{default:h(()=>[f(j,null,{default:h(()=>[...a[0]||(a[0]=[k("delete",-1)])]),_:1})]),_:1},16)]),default:h(()=>[...a[1]||(a[1]=[k("Delete printer",-1)])]),_:1}))}}),Mte=(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 uh(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 Vte=oe({customFilter:Function,customKeyFilter:Object,filterKeys:[Array,String],filterMode:{type:String,default:"intersection"},noFilter:Boolean},"filter");function Bte(e,t,n){const r=[],s=n?.default??Mte,i=n?.filterKeys?gn(n.filterKeys):!1,a=Object.keys(n?.customKeyFilter??{}).length;if(!e?.length)return r;let o=null;e:for(let l=0;l<e.length;l++){const[c,u=c]=gn(e[l]),d={},p={};let m=-1;if((t||a>0)&&!n?.noFilter){let v=!1;if(typeof c=="object"){if(c.type==="divider"||c.type==="subheader"){o?.type==="divider"&&c.type==="subheader"&&r.push(o),o={index:l,matches:{},type:c.type};continue}const y=i||Object.keys(u);v=y.length===a;for(const w of y){const _=sn(u,w),T=n?.customKeyFilter?.[w];if(m=T?T(_,t,c):s(_,t,c),m!==-1&&m!==!1)T?d[w]=uh(m,t):p[w]=uh(m,t);else if(n?.filterMode==="every")continue e}}else m=s(c,t,c),m!==-1&&m!==!1&&(p.title=uh(m,t));const g=Object.keys(p).length,b=Object.keys(d).length;if(!g&&!b||n?.filterMode==="union"&&b!==a&&!g||n?.filterMode==="intersection"&&(b!==a||!g&&a>0&&!v))continue}o&&(r.push(o),o=null),r.push({index:l,matches:{...p,...d}})}return r}function Ute(e,t,n,r){const s=Ee([]),i=Ee(new Map),a=A(()=>r?.transform?Q(t).map(l=>[l,r.transform(l)]):Q(t));bn(()=>{const l=typeof n=="function"?n():Q(n),c=typeof l!="string"&&typeof l!="number"?"":String(l),u=Bte(a.value,c,{customKeyFilter:{...e.customKeyFilter,...Q(r?.customKeyFilter)},default:e.customFilter,filterKeys:e.filterKeys,filterMode:e.filterMode,noFilter:e.noFilter}),d=Q(t),p=[],m=new Map;u.forEach(v=>{let{index:g,matches:b}=v;const y=d[g];p.push(y),m.set(y.value,b)}),s.value=p,i.value=m});function o(l){return i.value.get(l.value)}return{filteredItems:s,filteredMatches:i,getMatches:o}}const R2=oe({color:String,...rs(),...Ue(),...Vn(),..._r(),...aa(),...wl(),...Tn(),...lt(),...wt()},"VSheet"),Ck=be()({name:"VSheet",props:R2(),setup(e,t){let{slots:n}=t;const{themeClasses:r}=Mt(e),{backgroundColorClasses:s,backgroundColorStyles:i}=yn(()=>e.color),{borderClasses:a}=vs(e),{dimensionStyles:o}=Bn(e),{elevationClasses:l}=Nr(e),{locationStyles:c}=oo(e),{positionClasses:u}=_l(e),{roundedClasses:d}=An(e);return Ie(()=>f(e.tag,{class:Se(["v-sheet",r.value,s.value,a.value,l.value,u.value,d.value,e.class]),style:Le([i.value,o.value,c.value,e.style])},n)),{}}}),zte=oe({expandOnClick:Boolean,showExpand:Boolean,expanded:{type:Array,default:()=>[]}},"DataTable-expand"),P2=Symbol.for("vuetify:datatable:expanded");function A2(e){const t=ee(()=>e.expandOnClick),n=tt(e,"expanded",e.expanded,o=>new Set(o),o=>[...o.values()]);function r(o,l){const c=new Set(n.value),u=Me(o.value);if(l)c.add(u);else{const d=[...n.value].find(p=>Me(p)===u);c.delete(d)}n.value=c}function s(o){const l=Me(o.value);return[...n.value].some(c=>Me(c)===l)}function i(o){r(o,!s(o))}const a={expand:r,expanded:n,expandOnClick:t,isExpanded:s,toggleExpand:i};return Dt(P2,a),a}function O2(){const e=He(P2);if(!e)throw new Error("foo");return e}const jte=oe({groupBy:{type:Array,default:()=>[]}},"DataTable-group"),D2=Symbol.for("vuetify:data-table-group");function L2(e){return{groupBy:tt(e,"groupBy")}}function $2(e){const{disableSort:t,groupBy:n,sortBy:r}=e,s=q(new Set),i=A(()=>n.value.map(u=>({...u,order:u.order??!1})).concat(t?.value?[]:r.value));function a(u){return s.value.has(u.id)}function o(u){const d=new Set(s.value);a(u)?d.delete(u.id):d.add(u.id),s.value=d}function l(u){function d(p){const m=[];for(const v of p.items)"type"in v&&v.type==="group"?m.push(...d(v)):m.push(v);return[...new Set(m)]}return d({items:u})}const c={sortByWithGroups:i,toggleGroup:o,opened:s,groupBy:n,extractRows:l,isGroupOpen:a};return Dt(D2,c),c}function F2(){const e=He(D2);if(!e)throw new Error("Missing group!");return e}function Hte(e,t){if(!e.length)return[];const n=new Map;for(const r of e){const s=Ga(r.raw,t);n.has(s)||n.set(s,[]),n.get(s).push(r)}return n}function N2(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=Hte(e,t[0]),i=[],a=t.slice(1);return s.forEach((o,l)=>{const c=t[0],u=`${r}_${c}_${l}`;i.push({depth:n,id:u,key:c,value:l,items:a.length?N2(o,a,n+1,u):o,type:"group"})}),i}function M2(e,t,n){const r=[];for(const s of e)"type"in s&&s.type==="group"?(s.value!=null&&r.push(s),(t.has(s.id)||s.value==null)&&(r.push(...M2(s.items,t,n)),n&&r.push({...s,type:"group-summary"}))):r.push(s);return r}function V2(e,t,n,r){return{flatItems:A(()=>{if(!t.value.length)return e.value;const i=N2(e.value,t.value.map(a=>a.key));return M2(i,n.value,Rt(r))})}}function B2(e){let{page:t,itemsPerPage:n,sortBy:r,groupBy:s,search:i}=e;const a=tn("VDataTable"),o=()=>({page:t.value,itemsPerPage:n.value,sortBy:r.value,groupBy:s.value,search:i.value});let l=null;_e(o,c=>{mr(l,c)||(l&&l.search!==c.search&&(t.value=1),a.emit("update:options",c),l=c)},{deep:!0,immediate:!0})}const U2=oe({page:{type:[Number,String],default:1},itemsPerPage:{type:[Number,String],default:10}},"DataTable-paginate"),z2=Symbol.for("vuetify:data-table-pagination");function j2(e){const t=tt(e,"page",void 0,r=>Number(r??1)),n=tt(e,"itemsPerPage",void 0,r=>Number(r??10));return{page:t,itemsPerPage:n}}function H2(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)),a=A(()=>n.value===-1||r.value===0?1:Math.ceil(r.value/n.value));_e([t,a],()=>{t.value>a.value&&(t.value=a.value)});function o(p){n.value=p,t.value=1}function l(){t.value=In(t.value+1,1,a.value)}function c(){t.value=In(t.value-1,1,a.value)}function u(p){t.value=In(p,1,a.value)}const d={page:t,itemsPerPage:n,startIndex:s,stopIndex:i,pageCount:a,itemsLength:r,nextPage:l,prevPage:c,setPage:u,setItemsPerPage:o};return Dt(z2,d),d}function qte(){const e=He(z2);if(!e)throw new Error("Missing pagination!");return e}function Wte(e){const t=tn("usePaginatedItems"),{items:n,startIndex:r,stopIndex:s,itemsPerPage:i}=e,a=A(()=>i.value<=0?n.value:n.value.slice(r.value,s.value));return _e(a,o=>{t.emit("update:currentItems",o)},{immediate:!0}),{paginatedItems:a}}const Gte={showSelectAll:!1,allSelected:()=>[],select:e=>{let{items:t,value:n}=e;return new Set(n?[t[0]?.value]:[])},selectAll:e=>{let{selected:t}=e;return t}},q2={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 q2.select({items:n,value:t,selected:r})}},Kte={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}=e;return new Set(t?n.map(r=>r.value):[])}},Yte=oe({showSelect:Boolean,selectStrategy:{type:[String,Object],default:"page"},modelValue:{type:Array,default:()=>[]},valueComparator:Function},"DataTable-select"),W2=Symbol.for("vuetify:data-table-selection");function G2(e,t){let{allItems:n,currentPage:r}=t;const s=tt(e,"modelValue",e.modelValue,w=>{const _=e.valueComparator;return _?new Set(gn(w).map(T=>n.value.find(P=>_(T,P.value))?.value??T)):new Set(gn(w).map(T=>Xi(T)?n.value.find(P=>T===P.value)?.value??T:n.value.find(P=>mr(T,P.value))?.value??T))},w=>[...w.values()]),i=A(()=>n.value.filter(w=>w.selectable)),a=A(()=>r.value.filter(w=>w.selectable)),o=A(()=>{if(typeof e.selectStrategy=="object")return e.selectStrategy;switch(e.selectStrategy){case"single":return Gte;case"all":return Kte;default:return q2}}),l=Ee(null);function c(w){return gn(w).every(_=>s.value.has(_.value))}function u(w){return gn(w).some(_=>s.value.has(_.value))}function d(w,_){const T=o.value.select({items:w,value:_,selected:new Set(s.value)});s.value=T}function p(w,_,T){const P=[];if(_=_??r.value.findIndex(x=>x.value===w.value),e.selectStrategy!=="single"&&T?.shiftKey&&l.value!==null){const[x,C]=[l.value,_].sort((E,R)=>E-R);P.push(...r.value.slice(x,C+1).filter(E=>E.selectable))}else P.push(w),l.value=_;d(P,!c([w]))}function m(w){const _=o.value.selectAll({value:w,allItems:i.value,currentPage:a.value,selected:new Set(s.value)});s.value=_}const v=A(()=>s.value.size>0),g=A(()=>{const w=o.value.allSelected({allItems:i.value,currentPage:a.value});return!!w.length&&c(w)}),b=ee(()=>o.value.showSelectAll),y={toggleSelect:p,select:d,selectAll:m,isSelected:c,isSomeSelected:u,someSelected:v,allSelected:g,showSelectAll:b,lastSelectedIndex:l,selectStrategy:o};return Dt(W2,y),y}function Wp(){const e=He(W2);if(!e)throw new Error("Missing selection!");return e}const Jte=oe({initialSortOrder:{type:String,default:"asc",validator:e=>!e||["asc","desc"].includes(e)},sortBy:{type:Array,default:()=>[]},customKeySort:Object,multiSort:{type:[Boolean,Object],default:!1},mustSort:Boolean},"DataTable-sort"),K2=Symbol.for("vuetify:data-table-sort");function Y2(e){const t=ee(()=>e.initialSortOrder),n=tt(e,"sortBy"),r=ee(()=>e.mustSort),s=ee(()=>e.multiSort);return{initialSortOrder:t,sortBy:n,multiSort:s,mustSort:r}}function Xte(e,t){if(!Pu(e))return{active:!!e};const{key:n,mode:r,modifier:s}=e,i=s==="alt"&&t?.altKey||s==="shift"&&t?.shiftKey;return{active:!n||t?.ctrlKey||t?.metaKey||!1,mode:i?r==="append"?"prepend":"append":r}}function J2(e){const{initialSortOrder:t,sortBy:n,mustSort:r,multiSort:s,page:i}=e,a=(c,u)=>{if(c.key==null)return;let d=n.value.map(g=>({...g}))??[];const p=d.find(g=>g.key===c.key),m=t.value,v=t.value==="desc"?"asc":"desc";if(p)p.order===v?r.value&&d.length===1?p.order=t.value:d=d.filter(g=>g.key!==c.key):p.order=v;else{const{active:g,mode:b}=Xte(s.value,u);g?b==="prepend"?d.unshift({key:c.key,order:m}):d.push({key:c.key,order:m}):d=[{key:c.key,order:m}]}n.value=d,i&&(i.value=1)};function o(c){return!!n.value.find(u=>u.key===c.key)}const l={sortBy:n,toggleSort:a,isSorted:o};return Dt(K2,l),l}function X2(){const e=He(K2);if(!e)throw new Error("Missing sort!");return e}function Qte(e,t,n,r){const s=kr();return{sortedItems:A(()=>n.value.length?Zte(t.value,n.value,s.current.value,{transform:r?.transform,sortFunctions:{...e.customKeySort,...r?.sortFunctions?.value},sortRawFunctions:r?.sortRawFunctions?.value}):t.value)}}function Zte(e,t,n,r){const s=new Intl.Collator(n,{sensitivity:"accent",usage:"sort"});return e.map(a=>[a,r?.transform?r.transform(a):a]).sort((a,o)=>{for(let l=0;l<t.length;l++){let c=!1;const u=t[l].key,d=t[l].order??"asc";if(d===!1)continue;let p=Ga(a[1],u),m=Ga(o[1],u),v=a[0].raw,g=o[0].raw;if(d==="desc"&&([p,m]=[m,p],[v,g]=[g,v]),r?.sortRawFunctions?.[u]){const b=r.sortRawFunctions[u](v,g);if(b==null)continue;if(c=!0,b)return b}if(r?.sortFunctions?.[u]){const b=r.sortFunctions[u](p,m);if(b==null)continue;if(c=!0,b)return b}if(!c&&(p instanceof Date&&m instanceof Date&&(p=p.getTime(),m=m.getTime()),[p,m]=[p,m].map(b=>b!=null?b.toString().toLocaleLowerCase():b),p!==m))return Wc(p)&&Wc(m)?0:Wc(p)?-1:Wc(m)?1:!isNaN(p)&&!isNaN(m)?Number(p)-Number(m):s.compare(p,m)}return 0}).map(a=>{let[o]=a;return o})}function ene(){const e=q([]);bE(()=>e.value=[]);function t(n,r){e.value[r]=n}return{refs:e,updateRef:t}}const tne=oe({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:Fe,default:"$first"},prevIcon:{type:Fe,default:"$prev"},nextIcon:{type:Fe,default:"$next"},lastIcon:{type:Fe,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,...rs(),...Ue(),...Pn(),..._r(),...Tn(),...Sl(),...lt({tag:"nav"}),...wt(),...ys({variant:"text"})},"VPagination"),Tk=be()({name:"VPagination",props:tne(),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=tt(e,"modelValue"),{t:i,n:a}=kr(),{isRtl:o}=xr(),{themeClasses:l}=Mt(e),{width:c}=bs(),u=Ee(-1);Rn(void 0,{scoped:!0});const{resizeRef:d}=Qi(E=>{if(!E.length)return;const{target:R,contentRect:I}=E[0],O=R.querySelector(".v-pagination__list > *");if(!O)return;const L=I.width,V=O.offsetWidth+parseFloat(getComputedStyle(O).marginRight)*2;u.value=g(L,V)}),p=A(()=>parseInt(e.length,10)),m=A(()=>parseInt(e.start,10)),v=A(()=>e.totalVisible!=null?parseInt(e.totalVisible,10):u.value>=0?u.value:g(c.value,58));function g(E,R){const I=e.showFirstLastPage?5:3;return Math.max(0,Math.floor(Number(((E-R*I)/R).toFixed(2))))}const b=A(()=>{if(p.value<=0||isNaN(p.value)||p.value>Number.MAX_SAFE_INTEGER)return[];if(v.value<=0)return[];if(v.value===1)return[s.value];if(p.value<=v.value)return Po(p.value,m.value);const E=v.value%2===0,R=E?v.value/2:Math.floor(v.value/2),I=E?R:R+1,O=p.value-R;if(I-s.value>=0)return[...Po(Math.max(1,v.value-1),m.value),e.ellipsis,p.value];if(s.value-O>=(E?1:0)){const L=v.value-1,V=p.value-L+m.value;return[m.value,e.ellipsis,...Po(L,V)]}else{const L=Math.max(1,v.value-2),V=L===1?s.value:s.value-Math.ceil(L/2)+m.value;return[m.value,e.ellipsis,...Po(L,V),e.ellipsis,p.value]}});function y(E,R,I){E.preventDefault(),s.value=R,I&&r(I,R)}const{refs:w,updateRef:_}=ene();Rn({VPaginationBtn:{color:ee(()=>e.color),border:ee(()=>e.border),density:ee(()=>e.density),size:ee(()=>e.size),variant:ee(()=>e.variant),rounded:ee(()=>e.rounded),elevation:ee(()=>e.elevation)}});const T=A(()=>b.value.map((E,R)=>{const I=O=>_(O,R);if(typeof E=="string")return{isActive:!1,key:`ellipsis-${R}`,page:E,props:{ref:I,ellipsis:!0,icon:!0,disabled:!0}};{const O=E===s.value;return{isActive:O,key:E,page:a(E),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,E),onClick:L=>y(L,E)}}}})),P=A(()=>{const E=!!e.disabled||s.value<=m.value,R=!!e.disabled||s.value>=m.value+p.value-1;return{first:e.showFirstLastPage?{icon:o.value?e.lastIcon:e.firstIcon,onClick:I=>y(I,m.value,"first"),disabled:E,"aria-label":i(e.firstAriaLabel),"aria-disabled":E}:void 0,prev:{icon:o.value?e.nextIcon:e.prevIcon,onClick:I=>y(I,s.value-1,"prev"),disabled:E,"aria-label":i(e.previousAriaLabel),"aria-disabled":E},next:{icon:o.value?e.prevIcon:e.nextIcon,onClick:I=>y(I,s.value+1,"next"),disabled:R,"aria-label":i(e.nextAriaLabel),"aria-disabled":R},last:e.showFirstLastPage?{icon:o.value?e.firstIcon:e.lastIcon,onClick:I=>y(I,m.value+p.value-1,"last"),disabled:R,"aria-label":i(e.lastAriaLabel),"aria-disabled":R}:void 0}});function x(){const E=s.value-m.value;w.value[E]?.$el.focus()}function C(E){E.key===A0.left&&!e.disabled&&s.value>Number(e.start)?(s.value=s.value-1,ut(x)):E.key===A0.right&&!e.disabled&&s.value<m.value+p.value-1&&(s.value=s.value+1,ut(x))}return Ie(()=>f(e.tag,{ref:d,class:Se(["v-pagination",l.value,e.class]),style:Le(e.style),role:"navigation","aria-label":i(e.ariaLabel),onKeydown:C,"data-test":"v-pagination-root"},{default:()=>[S("ul",{class:"v-pagination__list"},[e.showFirstLastPage&&S("li",{key:"first",class:"v-pagination__first","data-test":"v-pagination-first"},[n.first?n.first(P.value.first):f(te,ce({_as:"VPaginationBtn"},P.value.first),null)]),S("li",{key:"prev",class:"v-pagination__prev","data-test":"v-pagination-prev"},[n.prev?n.prev(P.value.prev):f(te,ce({_as:"VPaginationBtn"},P.value.prev),null)]),T.value.map((E,R)=>S("li",{key:E.key,class:Se(["v-pagination__item",{"v-pagination__item--is-active":E.isActive}]),"data-test":"v-pagination-item"},[n.item?n.item(E):f(te,ce({_as:"VPaginationBtn"},E.props),{default:()=>[E.page]})])),S("li",{key:"next",class:"v-pagination__next","data-test":"v-pagination-next"},[n.next?n.next(P.value.next):f(te,ce({_as:"VPaginationBtn"},P.value.next),null)]),e.showFirstLastPage&&S("li",{key:"last",class:"v-pagination__last","data-test":"v-pagination-last"},[n.last?n.last(P.value.last):f(te,ce({_as:"VPaginationBtn"},P.value.last),null)])])]})),{}}}),k1=oe({color:String,prevIcon:{type:Fe,default:"$prev"},nextIcon:{type:Fe,default:"$next"},firstIcon:{type:Fe,default:"$first"},lastIcon:{type:Fe,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"),Nf=be()({name:"VDataTableFooter",props:k1(),setup(e,t){let{slots:n}=t;const{t:r}=kr(),{page:s,pageCount:i,startIndex:a,stopIndex:o,itemsLength:l,itemsPerPage:c,setItemsPerPage:u}=qte(),d=A(()=>e.itemsPerPageOptions.map(p=>typeof p=="number"?{value:p,title:p===-1?r("$vuetify.dataFooter.itemsPerPageAll"):String(p)}:{...p,title:isNaN(Number(p.title))?r(p.title):p.title}));return Ie(()=>{const p=Tk.filterProps(e);return S("div",{class:"v-data-table-footer"},[n.prepend?.(),S("div",{class:"v-data-table-footer__items-per-page"},[S("span",null,[r(e.itemsPerPageText)]),f(Ai,{items:d.value,itemColor:e.color,modelValue:c.value,"onUpdate:modelValue":m=>u(Number(m)),density:"compact",variant:"outlined","aria-label":r(e.itemsPerPageText),hideDetails:!0},null)]),S("div",{class:"v-data-table-footer__info"},[S("div",null,[r(e.pageText,l.value?a.value+1:0,o.value,l.value)])]),S("div",{class:"v-data-table-footer__pagination"},[f(Tk,ce({modelValue:s.value,"onUpdate:modelValue":m=>s.value=m,density:"comfortable",firstAriaLabel:e.firstPageLabel,lastAriaLabel:e.lastPageLabel,length:i.value,nextAriaLabel:e.nextPageLabel,previousAriaLabel:e.prevPageLabel,rounded:!0,showFirstLastPage:!0,totalVisible:e.showCurrentPage?1:0,variant:"plain"},Qt(p,["color"])),null)])])}),{}}}),lc=Y$({align:{type:String,default:"start"},fixed:{type:[Boolean,String],default:!1},fixedOffset:[Number,String],fixedEndOffset:[Number,String],height:[Number,String],lastFixed:Boolean,firstFixedEnd:Boolean,noPadding:Boolean,indent:[Number,String],empty:Boolean,tag:String,width:[Number,String],maxWidth:[Number,String],nowrap:Boolean},(e,t)=>{let{slots:n}=t;const r=e.tag??"td",s=typeof e.fixed=="string"?e.fixed:e.fixed?"start":"none";return f(r,{class:Se(["v-data-table__td",{"v-data-table-column--fixed":s==="start","v-data-table-column--fixed-end":s==="end","v-data-table-column--last-fixed":e.lastFixed,"v-data-table-column--first-fixed-end":e.firstFixedEnd,"v-data-table-column--no-padding":e.noPadding,"v-data-table-column--nowrap":e.nowrap,"v-data-table-column--empty":e.empty},`v-data-table-column--align-${e.align}`]),style:{height:Oe(e.height),width:Oe(e.width),maxWidth:Oe(e.maxWidth),left:s==="start"?Oe(e.fixedOffset||null):void 0,right:s==="end"?Oe(e.fixedEndOffset||null):void 0,paddingInlineStart:e.indent?Oe(e.indent):void 0}},{default:()=>[n.default?.()]})}),nne=oe({headers:Array},"DataTable-header"),Q2=Symbol.for("vuetify:data-table-headers"),Z2={title:"",sortable:!1},rne={...Z2,width:48};function sne(){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 qv(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)qv(n,t);return t}function eO(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&&eO(n.children,t);return t}function ine(e){if(e.key){if(e.key==="data-table-group")return Z2;if(["data-table-expand","data-table-select"].includes(e.key))return rne}}function x1(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.children?Math.max(t,...e.children.map(n=>x1(n,t+1))):t}function ane(e){let t=!1;function n(i,a){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"none";if(i)if(o!=="none"&&(i.fixed=o),i.fixed===!0&&(i.fixed="start"),i.fixed===a)if(i.children)if(a==="start")for(let l=i.children.length-1;l>=0;l--)n(i.children[l],a,a);else for(let l=0;l<i.children.length;l++)n(i.children[l],a,a);else!t&&a==="start"?i.lastFixed=!0:!t&&a==="end"?i.firstFixedEnd=!0:isNaN(Number(i.width))?(`${i.key}`,void 0):i.minWidth=Math.max(Number(i.width)||0,Number(i.minWidth)||0),t=!0;else if(i.children)if(a==="start")for(let l=i.children.length-1;l>=0;l--)n(i.children[l],a);else for(let l=0;l<i.children.length;l++)n(i.children[l],a);else t=!1}for(let i=e.length-1;i>=0;i--)n(e[i],"start");for(let i=0;i<e.length;i++)n(e[i],"end");let r=0;for(let i=0;i<e.length;i++)r=tO(e[i],r);let s=0;for(let i=e.length-1;i>=0;i--)s=nO(e[i],s)}function tO(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!e)return t;if(e.children){e.fixedOffset=t;for(const n of e.children)t=tO(n,t)}else e.fixed&&e.fixed!=="end"&&(e.fixedOffset=t,t+=parseFloat(e.width||"0")||0);return t}function nO(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!e)return t;if(e.children){e.fixedEndOffset=t;for(const n of e.children)t=nO(n,t)}else e.fixed==="end"&&(e.fixedEndOffset=t,t+=parseFloat(e.width||"0")||0);return t}function one(e,t){const n=[];let r=0;const s=sne(e);for(;s.size()>0;){let a=s.count();const o=[];let l=1;for(;a>0;){const{element:c,priority:u}=s.dequeue(),d=t-r-x1(c);if(o.push({...c,rowspan:d??1,colspan:c.children?qv(c).length:1}),c.children)for(const p of c.children){const m=u%1+l/Math.pow(10,r+2);s.enqueue(p,r+d+m)}l+=1,a-=1}r+=1,n.push(o)}return{columns:e.map(a=>qv(a)).flat(),headers:n}}function rO(e){const t=[];for(const n of e){const r={...ine(n),...n},s=r.key??(typeof r.value=="string"?r.value:null),i=r.value??s??null,a={...r,key:s,value:i,sortable:r.sortable??(r.key!=null||!!r.sort),children:r.children?rO(r.children):void 0};t.push(a)}return t}function sO(e,t){const n=q([]),r=q([]),s=q({}),i=q({}),a=q({});bn(()=>{const c=(e.headers||Object.keys(e.items[0]??{}).map(g=>({key:g,title:js(g)}))).slice(),u=eO(c);t?.groupBy?.value.length&&!u.has("data-table-group")&&c.unshift({key:"data-table-group",title:"Group"}),t?.showSelect?.value&&!u.has("data-table-select")&&c.unshift({key:"data-table-select"}),t?.showExpand?.value&&!u.has("data-table-expand")&&c.push({key:"data-table-expand"});const d=rO(c);ane(d);const p=Math.max(...d.map(g=>x1(g)))+1,m=one(d,p);n.value=m.headers,r.value=m.columns;const v=m.headers.flat(1);for(const g of v)g.key&&(g.sortable&&(g.sort&&(s.value[g.key]=g.sort),g.sortRaw&&(i.value[g.key]=g.sortRaw)),g.filter&&(a.value[g.key]=g.filter))});const o={headers:n,columns:r,sortFunctions:s,sortRawFunctions:i,filterFunctions:a};return Dt(Q2,o),o}function Gp(){const e=He(Q2);if(!e)throw new Error("Missing headers!");return e}const iO=oe({color:String,disableSort:Boolean,fixedHeader:Boolean,multiSort:Boolean,initialSortOrder:String,sortAscIcon:{type:Fe,default:"$sortAsc"},sortDescIcon:{type:Fe,default:"$sortDesc"},headerProps:{type:Object},sticky:Boolean,...Pn(),...lo(),...ap()},"VDataTableHeaders"),Mf=be()({name:"VDataTableHeaders",props:iO(),setup(e,t){let{slots:n}=t;const{t:r}=kr(),{toggleSort:s,sortBy:i,isSorted:a}=X2(),{someSelected:o,allSelected:l,selectAll:c,showSelectAll:u}=Wp(),{columns:d,headers:p}=Gp(),{loaderClasses:m}=gc(e);function v(R,I){if(!(e.sticky||e.fixedHeader)&&!R.fixed)return;const O=typeof R.fixed=="string"?R.fixed:R.fixed?"start":"none";return{position:"sticky",left:O==="start"?Oe(R.fixedOffset):void 0,right:O==="end"?Oe(R.fixedEndOffset):void 0,top:e.sticky||e.fixedHeader?`calc(var(--v-table-header-height) * ${I})`:void 0}}function g(R,I){R.key==="Enter"&&!e.disableSort&&s(I,R)}function b(R){const I=i.value.find(O=>O.key===R.key);return!I&&e.initialSortOrder==="asc"||I?.order==="asc"?e.sortAscIcon:e.sortDescIcon}const{backgroundColorClasses:y,backgroundColorStyles:w}=yn(()=>e.color),{displayClasses:_,mobile:T}=bs(e),P=A(()=>({headers:p.value,columns:d.value,toggleSort:s,isSorted:a,sortBy:i.value,someSelected:o.value,allSelected:l.value,selectAll:c,getSortIcon:b})),x=A(()=>["v-data-table__th",{"v-data-table__th--sticky":e.sticky||e.fixedHeader},_.value,m.value]),C=R=>{let{column:I,x:O,y:L}=R;const V=I.key==="data-table-select"||I.key==="data-table-expand",F=I.key==="data-table-group"&&I.width===0&&!I.title,B=ce(e.headerProps??{},I.headerProps??{});return f(lc,ce({tag:"th",align:I.align,class:[{"v-data-table__th--sortable":I.sortable&&!e.disableSort,"v-data-table__th--sorted":a(I),"v-data-table__th--fixed":I.fixed},...x.value],style:{width:Oe(I.width),minWidth:Oe(I.minWidth),maxWidth:Oe(I.maxWidth),...v(I,L)},colspan:I.colspan,rowspan:I.rowspan,fixed:I.fixed,nowrap:I.nowrap,lastFixed:I.lastFixed,firstFixedEnd:I.firstFixedEnd,noPadding:V,empty:F,tabindex:I.sortable?0:void 0,onClick:I.sortable?M=>s(I,M):void 0,onKeydown:I.sortable?M=>g(M,I):void 0},B),{default:()=>{const M=`header.${I.key}`,N={column:I,selectAll:c,isSorted:a,toggleSort:s,sortBy:i.value,someSelected:o.value,allSelected:l.value,getSortIcon:b};return n[M]?n[M](N):F?"":I.key==="data-table-select"?n["header.data-table-select"]?.(N)??(u.value&&f(ra,{color:e.color,density:e.density,modelValue:l.value,indeterminate:o.value&&!l.value,"onUpdate:modelValue":c},null)):S("div",{class:"v-data-table-header__content"},[S("span",null,[I.title]),I.sortable&&!e.disableSort&&f(j,{key:"icon",class:"v-data-table-header__sort-icon",icon:b(I)},null),e.multiSort&&a(I)&&S("div",{key:"badge",class:Se(["v-data-table-header__sort-badge",...y.value]),style:Le(w.value)},[i.value.findIndex(D=>D.key===I.key)+1])])}})},E=()=>{const R=A(()=>d.value.filter(O=>O?.sortable&&!e.disableSort)),I=d.value.find(O=>O.key==="data-table-select");return f(lc,ce({tag:"th",class:[...x.value],colspan:p.value.length+1},e.headerProps),{default:()=>[S("div",{class:"v-data-table-header__content"},[f(Ai,{chips:!0,color:e.color,class:"v-data-table__td-sort-select",clearable:!0,density:"default",items:R.value,label:r("$vuetify.dataTable.sortBy"),multiple:e.multiSort,variant:"underlined","onClick:clear":()=>i.value=[]},{append:I?()=>f(ra,{color:e.color,density:"compact",modelValue:l.value,indeterminate:o.value&&!l.value,"onUpdate:modelValue":()=>c(!l.value)},null):void 0,chip:O=>f(qe,{onClick:O.item.raw?.sortable?()=>s(O.item.raw):void 0,onMousedown:L=>{L.preventDefault(),L.stopPropagation()}},{default:()=>[O.item.title,f(j,{class:Se(["v-data-table__td-sort-icon",a(O.item.raw)&&"v-data-table__td-sort-icon-active"]),icon:b(O.item.raw),size:"small"},null)]})})])]})};Ie(()=>T.value?S("tr",null,[f(E,null,null)]):S(ke,null,[n.headers?n.headers(P.value):p.value.map((R,I)=>S("tr",null,[R.map((O,L)=>f(C,{column:O,x:L,y:I},null))])),e.loading&&S("tr",{class:"v-data-table-progress"},[S("th",{colspan:d.value.length},[f(op,{name:"v-data-table-progress",absolute:!0,active:!0,color:typeof e.loading=="boolean"||e.loading==="true"?e.color:e.loading,indeterminate:!0},{default:n.loader})])])]))}}),aO=oe({item:{type:Object,required:!0},groupCollapseIcon:{type:Fe,default:"$tableGroupCollapse"},groupExpandIcon:{type:Fe,default:"$tableGroupExpand"},...Pn()},"VDataTableGroupHeaderRow"),lne=be()({name:"VDataTableGroupHeaderRow",props:aO(),setup(e,t){let{slots:n}=t;const{isGroupOpen:r,toggleGroup:s,extractRows:i}=F2(),{isSelected:a,isSomeSelected:o,select:l}=Wp(),{columns:c}=Gp(),u=A(()=>i([e.item])),d=ee(()=>c.value.length-(c.value.some(p=>p.key==="data-table-select")?1:0));return()=>S("tr",{class:"v-data-table-group-header-row",style:{"--v-data-table-group-header-row-depth":e.item.depth}},[c.value.map(p=>{if(p.key==="data-table-group"){const m=r(e.item)?e.groupCollapseIcon:e.groupExpandIcon,v=()=>s(e.item);return n["data-table-group"]?.({item:e.item,count:u.value.length,props:{icon:m,onClick:v}})??f(lc,{class:"v-data-table-group-header-row__column",colspan:d.value},{default:()=>[f(te,{size:"small",variant:"text",icon:m,onClick:v},null),S("span",null,[e.item.value]),S("span",null,[k("("),u.value.length,k(")")])]})}else if(p.key==="data-table-select"){const m=u.value.filter(y=>y.selectable),v=m.length>0&&a(m),g=o(m)&&!v,b=y=>l(m,y);return n["data-table-select"]?.({props:{modelValue:v,indeterminate:g,"onUpdate:modelValue":b}})??f(lc,{class:"v-data-table__td--select-row",noPadding:!0},{default:()=>[f(ra,{density:e.density,disabled:m.length===0,modelValue:v,indeterminate:g,"onUpdate:modelValue":b},null)]})}return""})])}}),oO=oe({color:String,index:Number,item:Object,cellProps:[Object,Function],collapseIcon:{type:Fe,default:"$collapse"},expandIcon:{type:Fe,default:"$expand"},onClick:Fn(),onContextmenu:Fn(),onDblclick:Fn(),...Pn(),...lo()},"VDataTableRow"),une=be()({name:"VDataTableRow",props:oO(),setup(e,t){let{slots:n}=t;const{displayClasses:r,mobile:s}=bs(e,"v-data-table__tr"),{isSelected:i,toggleSelect:a,someSelected:o,allSelected:l,selectAll:c}=Wp(),{isExpanded:u,toggleExpand:d}=O2(),{toggleSort:p,sortBy:m,isSorted:v}=X2(),{columns:g}=Gp();Ie(()=>S("tr",{class:Se(["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&&g.value.map((b,y)=>{const w=e.item,_=`item.${b.key}`,T=`header.${b.key}`,P={index:e.index,item:w.raw,internalItem:w,value:Ga(w.columns,b.key),column:b,isSelected:i,toggleSelect:a,isExpanded:u,toggleExpand:d},x={column:b,selectAll:c,isSorted:v,toggleSort:p,sortBy:m.value,someSelected:o.value,allSelected:l.value,getSortIcon:()=>""},C=typeof e.cellProps=="function"?e.cellProps({index:P.index,item:P.item,internalItem:P.internalItem,value:P.value,column:b}):e.cellProps,E=typeof b.cellProps=="function"?b.cellProps({index:P.index,item:P.item,internalItem:P.internalItem,value:P.value}):b.cellProps,R=b.key==="data-table-select"||b.key==="data-table-expand",I=b.key==="data-table-group"&&b.width===0&&!b.title;return f(lc,ce({align:b.align,indent:b.indent,class:{"v-data-table__td--expanded-row":b.key==="data-table-expand","v-data-table__td--select-row":b.key==="data-table-select"},fixed:b.fixed,fixedOffset:b.fixedOffset,fixedEndOffset:b.fixedEndOffset,lastFixed:b.lastFixed,firstFixedEnd:b.firstFixedEnd,maxWidth:s.value?void 0:b.maxWidth,noPadding:R,empty:I,nowrap:b.nowrap,width:s.value?void 0:b.width},C,E),{default:()=>{if(b.key==="data-table-select")return n["item.data-table-select"]?.({...P,props:{color:e.color,disabled:!w.selectable,modelValue:i([w]),onClick:qt(()=>a(w),["stop"])}})??f(ra,{color:e.color,disabled:!w.selectable,density:e.density,modelValue:i([w]),onClick:qt(L=>a(w,e.index,L),["stop"])},null);if(b.key==="data-table-expand")return n["item.data-table-expand"]?.({...P,props:{icon:u(w)?e.collapseIcon:e.expandIcon,size:"small",variant:"text",onClick:qt(()=>d(w),["stop"])}})??f(te,{icon:u(w)?e.collapseIcon:e.expandIcon,size:"small",variant:"text",onClick:qt(()=>d(w),["stop"])},null);if(n[_]&&!s.value)return n[_](P);const O=Y(P.value);return s.value?S(ke,null,[S("div",{class:"v-data-table__td-title"},[n[T]?.(x)??b.title]),S("div",{class:"v-data-table__td-value"},[n[_]?.(P)??O])]):O}})})]))}}),lO=oe({color:String,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],...Vs(oO(),["collapseIcon","expandIcon","density"]),...Vs(aO(),["groupCollapseIcon","groupExpandIcon","density"]),...lo()},"VDataTableRows"),Vf=be()({name:"VDataTableRows",inheritAttrs:!1,props:lO(),setup(e,t){let{attrs:n,slots:r}=t;const{columns:s}=Gp(),{expandOnClick:i,toggleExpand:a,isExpanded:o}=O2(),{isSelected:l,toggleSelect:c}=Wp(),{toggleGroup:u,isGroupOpen:d}=F2(),{t:p}=kr(),{mobile:m}=bs(e);return Ie(()=>{const v=Vs(e,["groupCollapseIcon","groupExpandIcon","density"]);return e.loading&&(!e.items.length||r.loading)?S("tr",{class:"v-data-table-rows-loading",key:"loading"},[S("td",{colspan:s.value.length},[r.loading?.()??p(e.loadingText)])]):!e.loading&&!e.items.length&&!e.hideNoData?S("tr",{class:"v-data-table-rows-no-data",key:"no-data"},[S("td",{colspan:s.value.length},[r["no-data"]?.()??p(e.noDataText)])]):S(ke,null,[e.items.map((g,b)=>{if(g.type==="group"){const _={index:b,item:g,columns:s.value,isExpanded:o,toggleExpand:a,isSelected:l,toggleSelect:c,toggleGroup:u,isGroupOpen:d};return r["group-header"]?r["group-header"](_):f(lne,ce({key:`group-header_${g.id}`,item:g},Q0(n,":groupHeader",()=>_),v),r)}if(g.type==="group-summary"){const _={index:b,item:g,columns:s.value,toggleGroup:u};return r["group-summary"]?.(_)??""}const y={index:g.virtualIndex??b,item:g.raw,internalItem:g,columns:s.value,isExpanded:o,toggleExpand:a,isSelected:l,toggleSelect:c},w={...y,props:ce({key:`item_${g.key??g.index}`,onClick:i.value?()=>{a(g)}:void 0,index:b,item:g,color:e.color,cellProps:e.cellProps,collapseIcon:e.collapseIcon,expandIcon:e.expandIcon,density:e.density,mobile:m.value},Q0(n,":row",()=>y),typeof e.rowProps=="function"?e.rowProps({item:y.item,index:y.index,internalItem:y.internalItem}):e.rowProps)};return S(ke,{key:w.props.key},[r.item?r.item(w):f(une,w.props,r),o(g)&&r["expanded-row"]?.(y)])})])}),{}}}),uO=oe({fixedHeader:Boolean,fixedFooter:Boolean,height:[Number,String],hover:Boolean,striped:{type:String,default:null,validator:e=>["even","odd"].includes(e)},...Ue(),...Pn(),...lt(),...wt()},"VTable"),uc=be()({name:"VTable",props:uO(),setup(e,t){let{slots:n,emit:r}=t;const{themeClasses:s}=Mt(e),{densityClasses:i}=Fr(e);return Ie(()=>f(e.tag,{class:Se(["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,"v-table--striped-even":e.striped==="even","v-table--striped-odd":e.striped==="odd"},s.value,i.value,e.class]),style:Le(e.style)},{default:()=>[n.top?.(),n.default?S("div",{class:"v-table__wrapper",style:{height:Oe(e.height)}},[S("table",null,[n.default()])]):n.wrapper?.(),n.bottom?.()]})),{}}}),cne=oe({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 dne(e,t,n,r){const s=e.returnObject?t:sn(t,e.itemValue),i=sn(t,e.itemSelectable,!0),a=r.reduce((o,l)=>(l.key!=null&&(o[l.key]=sn(t,l.value)),o),{});return{type:"item",key:e.returnObject?sn(t,e.itemValue):s,index:n,value:s,selectable:i,columns:a,raw:t}}function fne(e,t,n){return t.map((r,s)=>dne(e,r,s,n))}function cO(e,t){return{items:A(()=>fne(e,e.items,t.value))}}const dO=oe({...lO(),hideDefaultBody:Boolean,hideDefaultFooter:Boolean,hideDefaultHeader:Boolean,width:[String,Number],search:String,...zte(),...jte(),...nne(),...cne(),...Yte(),...Jte(),...Qt(iO(),["multiSort","initialSortOrder"]),...uO()},"DataTable"),pne=oe({...U2(),...dO(),...Vte(),...k1()},"VDataTable"),mne=be()({name:"VDataTable",props:pne(),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}=L2(e),{initialSortOrder:i,sortBy:a,multiSort:o,mustSort:l}=Y2(e),{page:c,itemsPerPage:u}=j2(e),{disableSort:d}=Ii(e),{columns:p,headers:m,sortFunctions:v,sortRawFunctions:g,filterFunctions:b}=sO(e,{groupBy:s,showSelect:ee(()=>e.showSelect),showExpand:ee(()=>e.showExpand)}),{items:y}=cO(e,p),w=ee(()=>e.search),{filteredItems:_}=Ute(e,y,w,{transform:ie=>ie.columns,customKeyFilter:b}),{toggleSort:T}=J2({initialSortOrder:i,sortBy:a,multiSort:o,mustSort:l,page:c}),{sortByWithGroups:P,opened:x,extractRows:C,isGroupOpen:E,toggleGroup:R}=$2({groupBy:s,sortBy:a,disableSort:d}),{sortedItems:I}=Qte(e,_,P,{transform:ie=>({...ie.raw,...ie.columns}),sortFunctions:v,sortRawFunctions:g}),{flatItems:O}=V2(I,s,x,()=>!!r["group-summary"]),L=A(()=>O.value.length),{startIndex:V,stopIndex:F,pageCount:B,setItemsPerPage:M}=H2({page:c,itemsPerPage:u,itemsLength:L}),{paginatedItems:N}=Wte({items:O,startIndex:V,stopIndex:F,itemsPerPage:u}),D=A(()=>C(N.value)),{isSelected:W,select:z,selectAll:K,toggleSelect:H,someSelected:re,allSelected:ae}=G2(e,{allItems:y,currentPage:D}),{isExpanded:de,toggleExpand:De}=A2(e);B2({page:c,itemsPerPage:u,sortBy:a,groupBy:s,search:w}),Rn({VDataTableRows:{hideNoData:ee(()=>e.hideNoData),noDataText:ee(()=>e.noDataText),loading:ee(()=>e.loading),loadingText:ee(()=>e.loadingText)}});const X=A(()=>({page:c.value,itemsPerPage:u.value,sortBy:a.value,pageCount:B.value,toggleSort:T,setItemsPerPage:M,someSelected:re.value,allSelected:ae.value,isSelected:W,select:z,selectAll:K,toggleSelect:H,isExpanded:de,toggleExpand:De,isGroupOpen:E,toggleGroup:R,items:D.value.map(ie=>ie.raw),internalItems:D.value,groupedItems:N.value,columns:p.value,headers:m.value}));return Ie(()=>{const ie=Nf.filterProps(e),ne=Mf.filterProps(Qt(e,["multiSort"])),ve=Vf.filterProps(e),Ne=uc.filterProps(e);return f(uc,ce({class:["v-data-table",{"v-data-table--show-select":e.showSelect,"v-data-table--loading":e.loading},e.class],style:e.style},Ne,{fixedHeader:e.fixedHeader||e.sticky}),{top:()=>r.top?.(X.value),default:()=>r.default?r.default(X.value):S(ke,null,[r.colgroup?.(X.value),!e.hideDefaultHeader&&S("thead",{key:"thead"},[f(Mf,ce(ne,{multiSort:!!e.multiSort}),r)]),r.thead?.(X.value),!e.hideDefaultBody&&S("tbody",null,[r["body.prepend"]?.(X.value),r.body?r.body(X.value):f(Vf,ce(n,ve,{items:N.value}),r),r["body.append"]?.(X.value)]),r.tbody?.(X.value),r.tfoot?.(X.value)]),bottom:()=>r.bottom?r.bottom(X.value):!e.hideDefaultFooter&&S(ke,null,[f(pt,null,null),f(Nf,ie,{prepend:r["footer.prepend"]})])})}),{}}}),hne=oe({itemsLength:{type:[Number,String],required:!0},...U2(),...dO(),...k1()},"VDataTableServer"),gne=be()({name:"VDataTableServer",props:hne(),emits:{"update:modelValue":e=>!0,"update:page":e=>!0,"update:itemsPerPage":e=>!0,"update:sortBy":e=>!0,"update:options":e=>!0,"update:expanded":e=>!0,"update:groupBy":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const{groupBy:s}=L2(e),{initialSortOrder:i,sortBy:a,multiSort:o,mustSort:l}=Y2(e),{page:c,itemsPerPage:u}=j2(e),{disableSort:d}=Ii(e),p=A(()=>parseInt(e.itemsLength,10)),{columns:m,headers:v}=sO(e,{groupBy:s,showSelect:ee(()=>e.showSelect),showExpand:ee(()=>e.showExpand)}),{items:g}=cO(e,m),{toggleSort:b}=J2({initialSortOrder:i,sortBy:a,multiSort:o,mustSort:l,page:c}),{opened:y,isGroupOpen:w,toggleGroup:_,extractRows:T}=$2({groupBy:s,sortBy:a,disableSort:d}),{pageCount:P,setItemsPerPage:x}=H2({page:c,itemsPerPage:u,itemsLength:p}),{flatItems:C}=V2(g,s,y,()=>!!r["group-summary"]),{isSelected:E,select:R,selectAll:I,toggleSelect:O,someSelected:L,allSelected:V}=G2(e,{allItems:g,currentPage:g}),{isExpanded:F,toggleExpand:B}=A2(e),M=A(()=>T(g.value));B2({page:c,itemsPerPage:u,sortBy:a,groupBy:s,search:ee(()=>e.search)}),Dt("v-data-table",{toggleSort:b,sortBy:a}),Rn({VDataTableRows:{hideNoData:ee(()=>e.hideNoData),noDataText:ee(()=>e.noDataText),loading:ee(()=>e.loading),loadingText:ee(()=>e.loadingText)}});const N=A(()=>({page:c.value,itemsPerPage:u.value,sortBy:a.value,pageCount:P.value,toggleSort:b,setItemsPerPage:x,someSelected:L.value,allSelected:V.value,isSelected:E,select:R,selectAll:I,toggleSelect:O,isExpanded:F,toggleExpand:B,isGroupOpen:w,toggleGroup:_,items:M.value.map(D=>D.raw),internalItems:M.value,groupedItems:C.value,columns:m.value,headers:v.value}));Ie(()=>{const D=Nf.filterProps(e),W=Mf.filterProps(Qt(e,["multiSort"])),z=Vf.filterProps(e),K=uc.filterProps(e);return f(uc,ce({class:["v-data-table",{"v-data-table--loading":e.loading},e.class],style:e.style},K,{fixedHeader:e.fixedHeader||e.sticky}),{top:()=>r.top?.(N.value),default:()=>r.default?r.default(N.value):S(ke,null,[r.colgroup?.(N.value),!e.hideDefaultHeader&&S("thead",{key:"thead",class:"v-data-table__thead",role:"rowgroup"},[f(Mf,ce(W,{multiSort:!!e.multiSort}),r)]),r.thead?.(N.value),!e.hideDefaultBody&&S("tbody",{class:"v-data-table__tbody",role:"rowgroup"},[r["body.prepend"]?.(N.value),r.body?r.body(N.value):f(Vf,ce(n,z,{items:C.value}),r),r["body.append"]?.(N.value)]),r.tbody?.(N.value),r.tfoot?.(N.value)]),bottom:()=>r.bottom?r.bottom(N.value):!e.hideDefaultFooter&&S(ke,null,[f(pt,null,null),f(Nf,D,{prepend:r["footer.prepend"]})])})})}}),vne=oe({...Ue(),...Vn(),...VP()},"VLayout"),E1=be()({name:"VLayout",props:vne(),setup(e,t){let{slots:n}=t;const{layoutClasses:r,layoutStyles:s,getLayoutItem:i,items:a,layoutRef:o}=jP(e),{dimensionStyles:l}=Bn(e);return Ie(()=>S("div",{ref:o,class:Se([r.value,e.class]),style:Le([l.value,s.value,e.style])},[n.default?.()])),{getLayoutItem:i,items:a}}}),yne=oe({...Fp({falseIcon:"$radioOff",trueIcon:"$radioOn"})},"VRadio"),bne=be()({name:"VRadio",props:yne(),setup(e,t){let{slots:n}=t;return Ie(()=>{const r=eo.filterProps(e);return f(eo,ce(r,{class:["v-radio",e.class],style:e.style,type:"radio"}),n)}),{}}}),Sne=oe({height:{type:[Number,String],default:"auto"},...po(),...Qt(Jb(),["multiple"]),trueIcon:{type:Fe,default:"$radioOn"},falseIcon:{type:Fe,default:"$radioOff"},type:{type:String,default:"radio"}},"VRadioGroup"),wne=be()({name:"VRadioGroup",inheritAttrs:!1,props:Sne(),emits:{"update:modelValue":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const s=Sr(),i=A(()=>e.id||`radio-group-${s}`),a=tt(e,"modelValue"),o=q();return Ie(()=>{const[l,c]=so(n),u=ts.filterProps(e),d=eo.filterProps(e),p=r.label?r.label({label:e.label,props:{for:i.value}}):e.label;return f(ts,ce({ref:o,class:["v-radio-group",e.class],style:e.style},l,u,{modelValue:a.value,"onUpdate:modelValue":m=>a.value=m,id:i.value}),{...r,default:m=>{let{id:v,messagesId:g,isDisabled:b,isReadonly:y}=m;return S(ke,null,[p&&f(jb,{id:v.value},{default:()=>[p]}),f(aK,ce(d,{id:v.value,"aria-describedby":g.value,defaultsTarget:"VRadio",trueIcon:e.trueIcon,falseIcon:e.falseIcon,type:e.type,disabled:b.value,readonly:y.value,"aria-labelledby":p?v.value:void 0,multiple:!1},c,{modelValue:a.value,"onUpdate:modelValue":w=>a.value=w}),r)])}})}),Vr({},o)}}),_ne={actions:"button@2",article:"heading, paragraph",avatar:"avatar",button:"button",card:"image, heading","card-avatar":"image, list-item-avatar",chip:"chip","date-picker":"list-item, heading, divider, date-picker-options, date-picker-days, actions","date-picker-options":"text, avatar@2","date-picker-days":"avatar@28",divider:"divider",heading:"heading",image:"image","list-item":"text","list-item-avatar":"avatar, text","list-item-two-line":"sentences","list-item-avatar-two-line":"avatar, sentences","list-item-three-line":"paragraph","list-item-avatar-three-line":"avatar, paragraph",ossein:"ossein",paragraph:"text@3",sentences:"text@2",subtitle:"text",table:"table-heading, table-thead, table-tbody, table-tfoot","table-heading":"chip, text","table-thead":"heading@6","table-tbody":"table-row-divider@6","table-row-divider":"table-row, divider","table-row":"text@6","table-tfoot":"text@2, avatar@2",text:"text"};function kne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return S("div",{class:Se(["v-skeleton-loader__bone",`v-skeleton-loader__${e}`])},[t])}function Ik(e){const[t,n]=e.split("@");return Array.from({length:n}).map(()=>Kp(t))}function Kp(e){let t=[];if(!e)return t;const n=_ne[e];if(e!==n){if(e.includes(","))return Rk(e);if(e.includes("@"))return Ik(e);n.includes(",")?t=Rk(n):n.includes("@")?t=Ik(n):n&&t.push(Kp(n))}return[kne(e,t)]}function Rk(e){return e.replace(/\s/g,"").split(",").map(Kp)}const xne=oe({boilerplate:Boolean,color:String,loading:Boolean,loadingText:{type:String,default:"$vuetify.loading"},type:{type:[String,Array],default:"ossein"},...Vn(),..._r(),...wt()},"VSkeletonLoader"),Ene=be()({name:"VSkeletonLoader",inheritAttrs:!1,props:xne(),setup(e,t){let{attrs:n,slots:r}=t;const{backgroundColorClasses:s,backgroundColorStyles:i}=yn(()=>e.color),{dimensionStyles:a}=Bn(e),{elevationClasses:o}=Nr(e),{themeClasses:l}=Mt(e),{t:c}=kr(),u=A(()=>Kp(gn(e.type).join(",")));return Ie(()=>{const d=!r.default||e.loading,p=e.boilerplate||!d?{}:{ariaLive:"polite",ariaLabel:c(e.loadingText),role:"alert"};return d?S("div",ce({class:["v-skeleton-loader",{"v-skeleton-loader--boilerplate":e.boilerplate},l.value,s.value,o.value],style:[i.value,a.value]},p,n),[u.value]):S(ke,null,[r.default?.()])}),{}}}),C1=Symbol.for("vuetify:v-stepper"),T1=oe({color:String,disabled:{type:[Boolean,String],default:!1},prevText:{type:String,default:"$vuetify.stepper.prev"},nextText:{type:String,default:"$vuetify.stepper.next"}},"VStepperActions"),Wv=be()({name:"VStepperActions",props:T1(),emits:{"click:prev":()=>!0,"click:next":()=>!0},setup(e,t){let{emit:n,slots:r}=t;const{t:s}=kr();function i(){n("click:prev")}function a(){n("click:next")}return Ie(()=>{const o={onClick:i},l={onClick:a};return S("div",{class:"v-stepper-actions"},[f(vt,{defaults:{VBtn:{disabled:["prev",!0].includes(e.disabled),text:s(e.prevText),variant:"text"}}},{default:()=>[r.prev?.({props:o})??f(te,o,null)]}),f(vt,{defaults:{VBtn:{color:e.color,disabled:["next",!0].includes(e.disabled),text:s(e.nextText),variant:"tonal"}}},{default:()=>[r.next?.({props:l})??f(te,l,null)]})])}),{}}}),fO=vl("v-stepper-header"),pO=oe({color:String,title:String,subtitle:String,complete:Boolean,completeIcon:{type:Fe,default:"$complete"},editable:Boolean,editIcon:{type:Fe,default:"$edit"},error:Boolean,errorIcon:{type:Fe,default:"$error"},icon:Fe,ripple:{type:[Boolean,Object],default:!0},rules:{type:Array,default:()=>[]}},"StepperItem"),Cne=oe({...pO(),...bl()},"VStepperItem"),Vd=be()({name:"VStepperItem",directives:{vRipple:Lr},props:Cne(),emits:{"group:selected":e=>!0},setup(e,t){let{slots:n}=t;const r=Ka(e,C1,!0),s=A(()=>r?.value.value??e.value),i=A(()=>e.rules.every(p=>p()===!0)),a=A(()=>!e.disabled&&e.editable),o=A(()=>!e.disabled&&e.editable),l=A(()=>e.error||!i.value),c=A(()=>e.complete||e.rules.length>0&&i.value),u=A(()=>l.value?e.errorIcon:c.value?e.completeIcon:r.isSelected.value&&e.editable?e.editIcon:e.icon),d=A(()=>({canEdit:o.value,hasError:l.value,hasCompleted:c.value,title:e.title,subtitle:e.subtitle,step:s.value,value:e.value}));return Ie(()=>{const p=(!r||r.isSelected.value||c.value||o.value)&&!l.value&&!e.disabled,m=!!(e.title!=null||n.title),v=!!(e.subtitle!=null||n.subtitle);function g(){r?.toggle()}return Pt(S("button",{class:Se(["v-stepper-item",{"v-stepper-item--complete":c.value,"v-stepper-item--disabled":e.disabled,"v-stepper-item--error":l.value},r?.selectedClass.value]),disabled:!e.editable,type:"button",onClick:g},[a.value&&ia(!0,"v-stepper-item"),f(Sn,{key:"stepper-avatar",class:"v-stepper-item__avatar",color:p?e.color:void 0,size:24},{default:()=>[n.icon?.(d.value)??(u.value?f(j,{icon:u.value},null):s.value)]}),S("div",{class:"v-stepper-item__content"},[m&&S("div",{key:"title",class:"v-stepper-item__title"},[n.title?.(d.value)??e.title]),v&&S("div",{key:"subtitle",class:"v-stepper-item__subtitle"},[n.subtitle?.(d.value)??e.subtitle]),n.default?.(d.value)])]),[[Lr,e.editable&&e.ripple,null]])}),{}}}),Tne=oe({...Qt(e1(),["continuous","nextIcon","prevIcon","showArrows","touch","mandatory"])},"VStepperWindow"),mO=be()({name:"VStepperWindow",props:Tne(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=He(C1,null),s=tt(e,"modelValue"),i=A({get(){return s.value!=null||!r?s.value:r.items.value.find(a=>r.selected.value.includes(a.id))?.value},set(a){s.value=a}});return Ie(()=>{const a=sc.filterProps(e);return f(sc,ce({_as:"VStepperWindow"},a,{modelValue:i.value,"onUpdate:modelValue":o=>i.value=o,class:["v-stepper-window",e.class],style:e.style,mandatory:!1,touch:!1}),n)}),{}}}),Ine=oe({...t1()},"VStepperWindowItem"),Bd=be()({name:"VStepperWindowItem",props:Ine(),setup(e,t){let{slots:n}=t;return Ie(()=>{const r=dl.filterProps(e);return f(dl,ce({_as:"VStepperWindowItem"},r,{class:["v-stepper-window-item",e.class],style:e.style}),n)}),{}}}),hO=oe({altLabels:Boolean,bgColor:String,completeIcon:Fe,editIcon:Fe,editable:Boolean,errorIcon:Fe,hideActions:Boolean,items:{type:Array,default:()=>[]},itemTitle:{type:[String,Array,Function],default:"title"},itemValue:{type:[String,Array,Function],default:"value"},itemProps:{type:[Boolean,String,Array,Function],default:"props"},nonLinear:Boolean,flat:Boolean,...lo()},"Stepper"),Rne=oe({...hO(),...yl({mandatory:"force",selectedClass:"v-stepper-item--selected"}),...R2(),...Vs(T1(),["prevText","nextText"])},"VStepper"),Pne=be()({name:"VStepper",props:Rne(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{items:r,next:s,prev:i,selected:a}=ao(e,C1),{displayClasses:o,mobile:l}=bs(e),{completeIcon:c,editIcon:u,errorIcon:d,color:p,editable:m,prevText:v,nextText:g}=Ii(e),b=A(()=>e.items.map((_,T)=>{const P=sn(_,e.itemTitle,_),x=sn(_,e.itemValue,T+1),C=e.itemProps===!0?_:sn(_,e.itemProps),E={title:P,value:x,...C};return{title:E.title,value:E.value,props:E,raw:_}})),y=A(()=>r.value.findIndex(_=>a.value.includes(_.id))),w=A(()=>e.disabled?e.disabled:y.value===0?"prev":y.value===r.value.length-1?"next":!1);return Rn({VStepperItem:{editable:m,errorIcon:d,completeIcon:c,editIcon:u,prevText:v,nextText:g},VStepperActions:{color:p,disabled:w,prevText:v,nextText:g}}),Ie(()=>{const _=Ck.filterProps(e),T=!!(n.header||e.items.length),P=e.items.length>0,x=!e.hideActions&&!!(P||n.actions);return f(Ck,ce(_,{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},o.value,e.class],style:e.style}),{default:()=>[T&&f(fO,{key:"stepper-header"},{default:()=>[b.value.map((C,E)=>{let{raw:R,...I}=C;return S(ke,null,[!!E&&f(pt,null,null),f(Vd,I.props,{default:n[`header-item.${I.value}`]??n.header,icon:n.icon,title:n.title,subtitle:n.subtitle})])})]}),P&&f(mO,{key:"stepper-window"},{default:()=>[b.value.map(C=>f(Bd,{value:C.value},{default:()=>n[`item.${C.value}`]?.(C)??n.item?.(C)}))]}),n.default?.({prev:i,next:s}),x&&(n.actions?.({next:s,prev:i})??f(Wv,{key:"stepper-actions","onClick:prev":i,"onClick:next":s},n))]})}),{prev:i,next:s}}}),Ane=oe({indeterminate:Boolean,inset:Boolean,flat:Boolean,loading:{type:[Boolean,String],default:!1},...po(),...Fp()},"VSwitch"),Gv=be()({name:"VSwitch",inheritAttrs:!1,props:Ane(),emits:{"update:focused":e=>!0,"update:modelValue":e=>!0,"update:indeterminate":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const s=tt(e,"indeterminate"),i=tt(e,"modelValue"),{loaderClasses:a}=gc(e),{isFocused:o,focus:l,blur:c}=Nl(e),u=q(),d=q(),p=vy&&window.matchMedia("(forced-colors: active)").matches,m=ee(()=>typeof e.loading=="string"&&e.loading!==""?e.loading:e.color),v=Sr(),g=ee(()=>e.id||`switch-${v}`);function b(){s.value&&(s.value=!1)}function y(w){w.stopPropagation(),w.preventDefault(),u.value?.input?.click()}return Ie(()=>{const[w,_]=so(n),T=ts.filterProps(e),P=eo.filterProps(e);return f(ts,ce({ref:d,class:["v-switch",{"v-switch--flat":e.flat},{"v-switch--inset":e.inset},{"v-switch--indeterminate":s.value},a.value,e.class]},w,T,{modelValue:i.value,"onUpdate:modelValue":x=>i.value=x,id:g.value,focused:o.value,style:e.style}),{...r,default:x=>{let{id:C,messagesId:E,isDisabled:R,isReadonly:I,isValid:O}=x;const L={model:i,isValid:O};return f(eo,ce({ref:u},P,{modelValue:i.value,"onUpdate:modelValue":[V=>i.value=V,b],id:C.value,"aria-describedby":E.value,type:"checkbox","aria-checked":s.value?"mixed":void 0,disabled:R.value,readonly:I.value,onFocus:l,onBlur:c},_),{...r,default:V=>{let{backgroundColorClasses:F,backgroundColorStyles:B}=V;return S("div",{class:Se(["v-switch__track",p?void 0:F.value]),style:Le(B.value),onClick:y},[r["track-true"]&&S("div",{key:"prepend",class:"v-switch__track-true"},[r["track-true"](L)]),r["track-false"]&&S("div",{key:"append",class:"v-switch__track-false"},[r["track-false"](L)])])},input:V=>{let{inputNode:F,icon:B,backgroundColorClasses:M,backgroundColorStyles:N}=V;return S(ke,null,[F,S("div",{class:Se(["v-switch__thumb",{"v-switch__thumb--filled":B||e.loading},e.inset||p?void 0:M.value]),style:Le(e.inset?void 0:N.value)},[r.thumb?f(vt,{defaults:{VIcon:{icon:B,size:"x-small"}}},{default:()=>[r.thumb({...L,icon:B})]}):f(jF,null,{default:()=>[e.loading?f(op,{name:"v-switch",active:!0,color:O.value===!1?void 0:m.value},{default:D=>r.loader?r.loader(D):f(un,{active:D.isActive,color:D.color,indeterminate:!0,size:"16",width:"2"},null)}):B&&f(j,{key:String(B),icon:B,size:"x-small"},null)]})])])}})}})}),Vr({},d)}}),One={class:"d-flex align-center ga-2"},Dne={class:"mt-4 mb-4"},Lne={key:0},$ne={key:1},Fne={class:"d-flex align-center flex-wrap ga-1"},Nne={key:1,class:"text-caption text-medium-emphasis"},Mne={class:"d-flex align-center flex-wrap ga-1"},Vne={class:"d-flex align-center"},Bne={class:"d-flex ga-1"},Une={key:0},zne={key:1},jne=["colspan"],Hne={class:"mb-4"},qne={class:"d-flex flex-wrap ga-2"},Wne=Ae({__name:"PrintersView",setup(e){const t=bt(),n=At(),r=q(!1),s=Kn(),i=ns(),a=$p(),o=jt(Ht.AddOrUpdatePrinterDialog),l=q([]),c=q([]),u=q([]),d=q(""),p=q(!1),m=q([]),v=q([]),g=q(""),b=q([]),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},{title:"Tags",key:"group",sortable:!0},{title:"Cameras",key:"cameras",sortable:!1},{title:"Actions",key:"actions",sortable:!1},{title:"Socket Update",key:"socketupdate",sortable:!1},{title:"",key:"data-table-expand"}]);async function w(){r.value=!0,await a.loadFeatures(),l.value=await ka.getTagsWithPrinters(),c.value=l.value.map(K=>({id:K.id,name:K.name}));const{CameraStreamService:z}=await pte(async()=>{const{CameraStreamService:K}=await Promise.resolve().then(()=>PY);return{CameraStreamService:K}},void 0);return v.value=await z.listCameraStreams(),r.value=!1,l}const _=Np({queryKey:["printerGroups"],queryFn:w}),T=A(()=>{let z=n.printers;if(u.value?.length>0){const K=l.value.filter(H=>u.value.includes(H.id)).flatMap(H=>H.printers.map(re=>re.printerId));z=z.filter(H=>K.includes(H.id))}return m.value?.length>0&&(z=z.filter(K=>m.value.includes(K.printerType))),z}),P=A(()=>s.printerCurrentEventReceivedAtById),x=z=>z?(Date.now()-z)/1e3:void 0,C=z=>l.value.filter(K=>K.printers.find(H=>H.printerId===z)),E=z=>l.value.filter(K=>!K.printers.some(H=>H.printerId===z)),R=z=>i.floorOfPrinter(z),I=z=>v.value.filter(K=>K.printerId===z),O=z=>{o.openDialog({id:z.id})},L=()=>{o.openDialog()},V=()=>{jt(Ht.ImportOctoFarmDialog).openDialog()},F=()=>{jt(Ht.YamlImportExport).openDialog()},B=async()=>{if(!d.value?.trim()?.length)throw new Error("Please set a non-empty tag name");await ka.createTag(d.value.trim()),await _.refetch(),d.value="",p.value=!1,t.info("Created tag")},M=async z=>{const K=l.value.find(re=>re.id===z);if(!K)throw new Error("Tag was not found, please reload the page");const H=K.printers.length;H>0&&!confirm(`This tag contains ${H} printers, are you sure to delete it?`)||(await ka.deleteTag(z),await _.refetch(),t.info("Deleted tag"))},N=async(z,K)=>{await ka.addPrinterToTag(z,K),await _.refetch(),t.info("Added printer to tag")},D=async(z,K)=>{await ka.deletePrinterTag(z,K),await _.refetch(),t.info("Removed printer from tag")},W=async z=>{if(!z.id)throw new Error("Printer ID not set, cant toggle enabled");z.enabled=!z.enabled,await It.toggleEnabled(z.id,z.enabled)};return(z,K)=>($(),pe("div",null,[f($e,null,{default:h(()=>[f(Lt,{class:"d-flex align-center"},{default:h(()=>[K[13]||(K[13]=S("span",null,"Printers",-1)),f(Ft),S("div",One,[f(Vl,{modelValue:u.value,"onUpdate:modelValue":K[0]||(K[0]=H=>u.value=H),tags:c.value,label:"Filter by tags",style:{width:"220px"}},null,8,["modelValue","tags"]),f(Bl,{modelValue:m.value,"onUpdate:modelValue":K[1]||(K[1]=H=>m.value=H),style:{width:"220px"}},null,8,["modelValue"]),f(Qe,{modelValue:g.value,"onUpdate:modelValue":K[2]||(K[2]=H=>g.value=H),clearable:"",label:"Search","prepend-inner-icon":"search",density:"compact",variant:"outlined","hide-details":"",style:{width:"220px"}},null,8,["modelValue"])])]),_:1}),f(Q(mne),{expanded:b.value,"onUpdate:expanded":K[7]||(K[7]=H=>b.value=H),headers:y.value,items:T.value,search:g.value,class:"elevation-1","item-value":"id","show-expand":""},{"no-data":h(()=>[S("div",Dne,[T.value.length===0?($(),pe("h3",Lne," No printer has been created yet. Create one here: ")):($(),pe("h3",$ne," No printer has been found. Adjust your filters or search criteria. ")),f(C2)])]),top:h(()=>[f(ro,{flat:""},{default:h(()=>[f(Us,null,{default:h(()=>[k(" Showing "+Y(T.value.length||0)+" printers ",1)]),_:1}),f(Ft),f(te,{variant:"elevated",color:"purple","prepend-icon":"publish",onClick:K[3]||(K[3]=H=>V())},{default:h(()=>[...K[14]||(K[14]=[k(" Import OctoFarm ",-1)])]),_:1}),f(te,{class:"ml-2",variant:"elevated",color:"success","prepend-icon":"add",onClick:K[4]||(K[4]=H=>L())},{default:h(()=>[...K[15]||(K[15]=[k(" Create Printer ",-1)])]),_:1}),f(te,{class:"ml-2",variant:"elevated","prepend-icon":"label",onClick:K[5]||(K[5]=H=>p.value=!0)},{default:h(()=>[...K[16]||(K[16]=[k(" Manage Tags ",-1)])]),_:1}),f(te,{class:"ml-2 mr-2",variant:"elevated",color:"primary","prepend-icon":"code",onClick:K[6]||(K[6]=H=>F())},{default:h(()=>[...K[17]||(K[17]=[k(" Import/Export Backup ",-1)])]),_:1})]),_:1})]),"item.enabled":h(({item:H})=>[f(Gv,{modelValue:H.enabled,"onUpdate:modelValue":re=>H.enabled=re,color:"primary",inset:"",onClickCapture:qt(re=>W(H),["stop"])},{default:h(()=>[k(Y(H.enabled),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onClickCapture"])]),"item.printerType":h(({item:H})=>[k(Y(Q(Yr)(H.printerType)),1)]),"item.name":h(({item:H})=>[f(qe,null,{default:h(()=>[k(Y(H.name||H.printerURL),1)]),_:2},1024)]),"item.floor":h(({item:H})=>[H.id?($(),J(qe,{key:0},{default:h(()=>[k(Y(R(H.id)?.name),1)]),_:2},1024)):se("",!0)]),"item.cameras":h(({item:H})=>[S("div",Fne,[($(!0),pe(ke,null,Ot(I(H.id).slice(0,2),(re,ae)=>($(),J(qe,{key:re.id,size:"x-small",variant:"tonal"},{default:h(()=>[f(j,{start:"",size:"x-small"},{default:h(()=>[...K[18]||(K[18]=[k("videocam",-1)])]),_:1}),k(" "+Y(re.name),1)]),_:2},1024))),128)),I(H.id).length>2?($(),J(qe,{key:0,size:"x-small",variant:"text"},{default:h(()=>[k(" +"+Y(I(H.id).length-2)+" more ",1)]),_:2},1024)):se("",!0),I(H.id).length?se("",!0):($(),pe("span",Nne," No cameras "))])]),"item.group":h(({item:H})=>[S("div",Mne,[($(!0),pe(ke,null,Ot(C(H.id),re=>($(),J(qe,{key:re.id,size:"small",variant:"tonal",closable:"","onClick:close":ae=>D(re.id,H.id)},{default:h(()=>[f(j,{start:"",size:"x-small"},{default:h(()=>[...K[19]||(K[19]=[k("label",-1)])]),_:1}),k(" "+Y(re.name),1)]),_:2},1032,["onClick:close"]))),128)),f(da,null,{activator:h(({props:re})=>[f(te,ce(re,{disabled:!E(H.id).length,size:"x-small",icon:"",variant:"text"}),{default:h(()=>[f(j,null,{default:h(()=>[...K[20]||(K[20]=[k("add",-1)])]),_:1})]),_:1},16,["disabled"])]),default:h(()=>[f(_s,{density:"compact","min-width":"150"},{default:h(()=>[f($c,null,{default:h(()=>[...K[21]||(K[21]=[k("Add Tag",-1)])]),_:1}),($(!0),pe(ke,null,Ot(E(H.id),(re,ae)=>($(),J(yt,{key:ae,onClick:de=>N(re.id,H.id)},{prepend:h(()=>[f(j,{size:"small"},{default:h(()=>[...K[22]||(K[22]=[k("label",-1)])]),_:1})]),default:h(()=>[f(Gt,null,{default:h(()=>[k(Y(re.name),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128)),E(H.id).length?se("",!0):($(),J(yt,{key:0,disabled:""},{default:h(()=>[f(Gt,{class:"text-caption"},{default:h(()=>[...K[23]||(K[23]=[k("All tags assigned",-1)])]),_:1})]),_:1}))]),_:2},1024)]),_:2},1024)])]),"item.actions":h(({item:H})=>[S("div",Vne,[S("div",Bne,[f(Lte,{printer:H},null,8,["printer"]),f(Ate,{printer:H,"onUpdate:show":re=>O(H)},null,8,["printer","onUpdate:show"]),f(Nte,{printer:H},null,8,["printer"]),f(Ite,{printer:H},null,8,["printer"]),f(Dte,{printer:H},null,8,["printer"]),f(Ote,{printer:H},null,8,["printer"]),f(Fte,{printer:H},null,8,["printer"])])])]),"item.socketupdate":h(({item:H})=>[P.value[H.id]?($(),pe("span",Une," Updated "+Y(x(P.value[H.id]))+" seconds ago ",1)):($(),pe("span",zne," No update received (silence) "))]),"expanded-row":h(({item:H,columns:re})=>[S("td",{colspan:re.length},[f(Tte,{printer:H},null,8,["printer"])],8,jne)]),_:1},8,["expanded","headers","items","search"])]),_:1}),f(Ly,{modelValue:p.value,"onUpdate:modelValue":K[12]||(K[12]=H=>p.value=H),"max-width":"500"},{default:h(()=>[f($e,null,{default:h(()=>[f(Lt,{class:"d-flex align-center"},{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...K[24]||(K[24]=[k("label",-1)])]),_:1}),K[25]||(K[25]=k(" Manage Tags ",-1))]),_:1}),f(Xe,null,{default:h(()=>[S("div",Hne,[K[27]||(K[27]=S("div",{class:"text-subtitle-2 mb-2"},"Available Tags:",-1)),S("div",qne,[($(!0),pe(ke,null,Ot(l.value,H=>($(),J(qe,{key:H.id,closable:"",size:"small","onClick:close":re=>M(H.id)},{default:h(()=>[k(Y(H.name),1)]),_:2},1032,["onClick:close"]))),128)),l.value.length?se("",!0):($(),J(qe,{key:0,disabled:"",size:"small"},{default:h(()=>[...K[26]||(K[26]=[k(" No tags yet ",-1)])]),_:1}))])]),f(pt,{class:"my-4"}),S("div",null,[K[29]||(K[29]=S("div",{class:"text-subtitle-2 mb-2"},"Create New Tag:",-1)),f(Qe,{modelValue:d.value,"onUpdate:modelValue":K[8]||(K[8]=H=>d.value=H),label:"Tag Name",placeholder:"Enter tag name",density:"compact",variant:"outlined","hide-details":"",onKeyup:K[9]||(K[9]=Qd(H=>B(),["enter"]))},null,8,["modelValue"]),f(te,{class:"mt-2",color:"primary",size:"small","prepend-icon":"add",onClick:K[10]||(K[10]=H=>B())},{default:h(()=>[...K[28]||(K[28]=[k(" Create Tag ",-1)])]),_:1})])]),_:1}),f(dn,null,{default:h(()=>[f(Ft),f(te,{onClick:K[11]||(K[11]=H=>p.value=!1)},{default:h(()=>[...K[30]||(K[30]=[k("Close",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])]))}}),ss={floors:"floors",printer:"printer",emergencyCommands:"emergencyCommands",users:"users",account:"account",serverProtection:"serverProtection",softwareUpgrade:"softwareUpgrade",diagnostics:"diagnostics",experimental:"experimental",debugSocket:"debugSocket",about:"about"},Gs={[ss.floors]:{title:"Floors",icon:"house_siding",path:"/settings/floors",divider:!0},[ss.printer]:{title:"Printer",icon:"local_print_shop",path:"/settings/printer",divider:!1},[ss.emergencyCommands]:{title:"Emergency Commands",icon:"warning",path:"/settings/emergency-commands",divider:!0},[ss.serverProtection]:{title:"Server Protection",icon:"security",path:"/settings/server-protection",divider:!1},[ss.users]:{title:"Users",icon:"group",path:"/settings/user-management",divider:!1},[ss.account]:{title:"Account",icon:"account_circle",path:"/settings/account",divider:!0},[ss.softwareUpgrade]:{title:"Software Upgrade",icon:"upgrade",path:"/settings/software-upgrade",divider:!1},[ss.diagnostics]:{title:"Diagnostics",icon:"bug_report",path:"/settings/diagnostics",divider:!1},[ss.experimental]:{title:"Experimental",icon:"settings_applications",path:"/settings/experimental",divider:!1},[ss.debugSocket]:{title:"SocketIO Debug",icon:"wifi_tethering",path:"/settings/debug-socket",divider:!0},[ss.about]:{title:"About",icon:"info",path:"/settings/about",divider:!1}},Gne=Ae({__name:"SettingsView",setup(e){const t=q(Gs);return(n,r)=>{const s=Tu("router-view");return $(),pe("div",null,[f(it,{"no-gutters":""},{default:h(()=>[f(Ub,{permanent:!0},{default:h(()=>[f(yt,null,{default:h(()=>[f(Gt,{class:"text-h6"},{default:h(()=>[...r[0]||(r[0]=[k(" Settings ",-1)])]),_:1}),f(Fl,null,{default:h(()=>[...r[1]||(r[1]=[k(" Adjust your FDM Monster ",-1)])]),_:1})]),_:1}),f(pt),f(_s,{density:"compact",nav:""},{default:h(()=>[($(!0),pe(ke,null,Ot(Q(t),i=>($(),J(yt,{key:i.title,to:i.path,link:"","prepend-icon":i.icon,title:i.title,"router-link":"",style:Le(i.divider?"border-bottom: 1px solid gray":"")},null,8,["to","prepend-icon","title","style"]))),128))]),_:1})]),_:1}),f(Be,null,{default:h(()=>[f(s)]),_:1})]),_:1})])}}});function Kne(e){const t=new Date(e);return new Intl.DateTimeFormat("default",{dateStyle:"long"}).format(t)}const Ks=Ae({__name:"SettingsToolbar",props:["icon","title"],setup(e){const t=e;return(n,r)=>($(),J(ro,null,{default:h(()=>[f(Sn,{class:"ml-4"},{default:h(()=>[f(j,null,{default:h(()=>[k(Y(t.icon),1)]),_:1})]),_:1}),f(Us,null,{default:h(()=>[k(Y(t.title),1)]),_:1}),Wo(n.$slots,"default")]),_:3}))}}),Yne={class:"pr-3"},Jne={class:"tooltip-content"},an=Ae({__name:"SettingSection",props:{title:{},tooltip:{},usecols:{type:Boolean,default:!0}},setup(e){const t=e;return(n,r)=>($(),J(_s,{subheader:"","three-line":""},{default:h(()=>[f($c,null,{default:h(()=>[S("span",Yne,Y(t.title),1),t.tooltip?.length?($(),J(Kt,{key:0,bottom:""},{activator:h(({props:s})=>[f(j,ce({class:"help-icon"},s),{default:h(()=>[...r[0]||(r[0]=[k("help_outline",-1)])]),_:1},16)]),default:h(()=>[S("span",Jne,Y(e.tooltip),1)]),_:1})):se("",!0)]),_:1}),f(yt,null,{default:h(()=>[e.usecols?($(),J(it,{key:0},{default:h(()=>[f(Be,{cols:"4"},{default:h(()=>[Wo(n.$slots,"default")]),_:3})]),_:3})):Wo(n.$slots,"default",{key:1})]),_:3})]),_:3}))}}),Xne={class:"mb-4"},Qne={class:"d-flex align-center"},Zne={class:"font-weight-medium"},ere={class:"d-flex align-center ga-1"},tre={key:0,style:{"min-width":"200px"}},nre={key:1,class:"d-flex align-center ga-1 flex-wrap"},rre={class:"text-caption"},sre={class:"d-flex justify-end ga-1"},ire=Ae({__name:"UserManagementSettings",setup(e){const t=Gs.users,n=bt(),r=q(!1),s=q(),i=q([]),a=q([]);async function o(){r.value=!0;try{s.value=await qr.getProfile(),a.value=await qr.listRoles(),i.value=await qr.listUsers()}catch(g){throw r.value=!1,console.error(g),g}return r.value=!1,{users:i,roles:a,profile:s}}const l=Np({queryKey:["userRolesProfile"],queryFn:o});function c(g){return g.id==s.value?.id}async function u(g){if(confirm(`Are you sure you want to delete ${g.username}?`)){try{r.value=!0,await qr.deleteUser(g.id),await l.refetch()}catch(b){throw r.value=!1,console.error(b),b}r.value=!1,n.info(`User ${g.username} deleted`)}}async function d(g,b=!0){if(g.isRootUser){n.error("You are not allowed to do perform this action on an owner");return}if(confirm(`Are you sure you want to ${b?"verify":"unverify"} ${g.username}?`)){try{r.value=!0,await qr.setUserVerified(g.id,b),await l.refetch()}catch(y){throw r.value=!1,console.error(y),y}r.value=!1,n.info(b?`User ${g.username} verified`:`User ${g.username} unverified`)}}async function p(g,b=!0){if(s.value?.isRootUser||n.error("You are not allowed to do perform this action as you're not an owner"),!!confirm(`You are about to ${b?"set":"remove"} owner rights on ${g.username}. Are you sure?`)){try{r.value=!0,await qr.setRootUser(g.id,b),await l.refetch()}catch(y){throw r.value=!1,console.error(y),y}r.value=!1,n.info(b?`User ${g.username} set to owner`:`User ${g.username} is no longer owner`)}}async function m(g){try{r.value=!0,await qr.setUserRoles(g.id,g.roles),await l.refetch(),n.info(`Roles updated for ${g.username}`)}catch(b){throw r.value=!1,console.error(b),n.error(`Failed to update roles for ${g.username}`),b}r.value=!1}async function v(){await jt(Ht.CreateUserDialog).openDialog()}return(g,b)=>($(),J($e,null,{default:h(()=>[f(Ks,{icon:Q(t).icon,title:Q(t).title},null,8,["icon","title"]),f(Xe,null,{default:h(()=>[r.value?($(),J(_2,{key:0,size:20,color:"#a70015",style:{margin:"250px",position:"absolute"}})):se("",!0),f(an,{title:"User Management",usecols:!1},{default:h(()=>[S("div",Xne,[f(te,{disabled:!s.value?.isRootUser,color:"primary","prepend-icon":"add",onClick:b[0]||(b[0]=y=>v())},{default:h(()=>[...b[1]||(b[1]=[k(" Create Verified User ",-1)])]),_:1},8,["disabled"])]),f(uc,{theme:"dark",hover:""},{default:h(()=>[b[7]||(b[7]=S("thead",null,[S("tr",null,[S("th",{scope:"col",class:"text-left"},"Username"),S("th",{scope:"col",class:"text-left"},"Status"),S("th",{scope:"col",class:"text-left"},"Roles"),S("th",{scope:"col",class:"text-left"},"Created"),S("th",{scope:"col",class:"text-right"},"Actions")])],-1)),S("tbody",null,[($(!0),pe(ke,null,Ot(i.value,(y,w)=>($(),pe("tr",{key:w,class:Se({"bg-grey-darken-3":c(y)})},[S("td",null,[S("div",Qne,[S("span",Zne,Y(y.username),1),c(y)?($(),J(qe,{key:0,color:"primary",size:"x-small",class:"ml-2"},{default:h(()=>[...b[2]||(b[2]=[k(" You ",-1)])]),_:1})):se("",!0)])]),S("td",null,[S("div",ere,[f(qe,{color:y.isVerified?"success":"warning",size:"x-small"},{default:h(()=>[k(Y(y.isVerified?"Verified":"Unverified"),1)]),_:2},1032,["color"]),y.isDemoUser?($(),J(qe,{key:0,size:"x-small",color:"info"},{default:h(()=>[...b[3]||(b[3]=[k(" Demo ",-1)])]),_:1})):se("",!0)])]),S("td",null,[s.value?.isRootUser?($(),pe("div",tre,[f(Ai,{items:a.value.map(_=>({title:_.name,value:_.name})),modelValue:y.roles,"onUpdate:modelValue":[_=>y.roles=_,_=>m(y)],multiple:"",chips:"",density:"compact",variant:"outlined","hide-details":""},CD({_:2},[y.isRootUser?{name:"prepend-item",fn:h(()=>[f(yt,null,{default:h(()=>[f(qe,{size:"small",color:"error"},{default:h(()=>[...b[4]||(b[4]=[k("OWNER",-1)])]),_:1})]),_:1}),f(pt)]),key:"0"}:void 0]),1032,["items","modelValue","onUpdate:modelValue"])])):($(),pe("div",nre,[y.isRootUser?($(),J(qe,{key:0,size:"x-small",color:"error"},{default:h(()=>[...b[5]||(b[5]=[k(" OWNER ",-1)])]),_:1})):se("",!0),($(!0),pe(ke,null,Ot(y.roles,_=>($(),J(qe,{key:_,size:"x-small"},{default:h(()=>[k(Y(_),1)]),_:2},1024))),128))]))]),S("td",rre,Y(Q(Kne)(y.createdAt)),1),S("td",null,[S("div",sre,[f(Kt,{text:y.isVerified?"Set user to unverified":"Set user to verified"},{activator:h(({props:_})=>[f(te,ce({ref_for:!0},_,{disabled:c(y)||y.isRootUser,color:y.isVerified?"warning":"success",size:"small",icon:"",variant:"text",onClick:T=>d(y,!y.isVerified)}),{default:h(()=>[f(j,null,{default:h(()=>[k(Y(y.isVerified?"shield_off":"shield"),1)]),_:2},1024)]),_:2},1040,["disabled","color","onClick"])]),_:2},1032,["text"]),f(Kt,{text:"Toggle owner status"},{activator:h(({props:_})=>[f(te,ce({ref_for:!0},_,{disabled:c(y)||!s.value?.isRootUser,color:y.isRootUser?"warning":"primary",size:"small",icon:"",variant:"text",onClick:T=>p(y,!y.isRootUser)}),{default:h(()=>[f(j,null,{default:h(()=>[k(Y(y.isRootUser?"key_off":"key"),1)]),_:2},1024)]),_:2},1040,["disabled","color","onClick"])]),_:2},1024),f(Kt,{text:"Delete user"},{activator:h(({props:_})=>[f(te,ce({ref_for:!0},_,{disabled:c(y)||y.isRootUser,color:"error",size:"small",icon:"",variant:"text",onClick:T=>u(y)}),{default:h(()=>[f(j,null,{default:h(()=>[...b[6]||(b[6]=[k("delete",-1)])]),_:1})]),_:1},16,["disabled","onClick"])]),_:2},1024)])])],2))),128))])]),_:1})]),_:1})]),_:1})]),_:1}))}}),are=Ae({__name:"PrinterSettings",setup(e){const t=Gs.printer,n=ws(),r=bt(),s=q({autoRemoveOldFilesBeforeUpload:!1,autoRemoveOldFilesAtBoot:!1,autoRemoveOldFilesCriteriumDays:7}),i=q({fileCleanSettings:!1,timeoutSettings:!1,purgeFiles:!1});ot(async()=>{const c=await Ln.getSettings();s.value=c.printerFileClean});async function a(){if(n.settings.timeout.apiTimeout=parseInt(n.settings.timeout.apiTimeout.toString()),n.settings.timeout.apiUploadTimeout=parseInt(n.settings.timeout.apiUploadTimeout.toString()),!n.settings?.timeout?.apiTimeout){r.error("Timeout not set");return}if(n.settings.timeout.apiTimeout<1e3&&(r.error("Timeout is too low - please set it to at least 1000 milliseconds"),n.settings.timeout.apiTimeout=1e3),n.settings.timeout.apiUploadTimeout<1e4)r.error("Upload timeout is too low - please set it to at least 10000 milliseconds"),n.settings.timeout.apiUploadTimeout=1e4;else{i.value.timeoutSettings=!0;try{await n.updateTimeoutSettings(n.settings.timeout),r.info("Timeout settings updated")}finally{i.value.timeoutSettings=!1}}}async function o(){i.value.fileCleanSettings=!0;try{const c=await Ln.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 pi.purgeFiles(),r.openInfoMessage({title:"Successfully purged all references to printer files!"})}finally{i.value.purgeFiles=!1}}return(c,u)=>($(),J($e,null,{default:h(()=>[f(Ks,{icon:Q(t).icon,title:Q(t).title},null,8,["icon","title"]),f(Xe,null,{default:h(()=>[f(an,{title:"Pre-upload File Cleanup",tooltip:"Automatically cleanup old files to ensure the SD card has enough space."},{default:h(()=>[f(Yt,{modelValue:s.value.autoRemoveOldFilesBeforeUpload,"onUpdate:modelValue":u[0]||(u[0]=d=>s.value.autoRemoveOldFilesBeforeUpload=d),label:"Remove old file before upload",onChange:o},null,8,["modelValue"]),f(Qe,{modelValue:s.value.autoRemoveOldFilesCriteriumDays,"onUpdate:modelValue":u[1]||(u[1]=d=>s.value.autoRemoveOldFilesCriteriumDays=d),disabled:!s.value.autoRemoveOldFilesBeforeUpload,label:"Amount of days to keep files",min:"0",type:"number",onChange:o},null,8,["modelValue","disabled"]),f(Yt,{modelValue:s.value.autoRemoveOldFilesAtBoot,"onUpdate:modelValue":u[2]||(u[2]=d=>s.value.autoRemoveOldFilesAtBoot=d),label:"Remove old files when (re)booting the server",onChange:o},null,8,["modelValue"]),i.value.fileCleanSettings?($(),J(un,{key:0,class:"ml-2",indeterminate:"",size:"30",width:"4"})):se("",!0)]),_:1}),f(pt),Q(n).settings?.timeout?($(),J(an,{key:0,title:"API Timeout",tooltip:"Set the server default REST API timeout in milliseconds."},{default:h(()=>[f(Qe,{modelValue:Q(n).settings.timeout.apiTimeout,"onUpdate:modelValue":u[3]||(u[3]=d=>Q(n).settings.timeout.apiTimeout=d),label:"Connection Timeout",min:"0",type:"number",onChange:a},null,8,["modelValue"]),i.value.timeoutSettings?($(),J(un,{key:0,class:"ml-2",indeterminate:"",size:"30",width:"4"})):se("",!0)]),_:1})):se("",!0),Q(n).settings?.timeout?($(),J(an,{key:1,title:"Upload Timeout",tooltip:"Set the server REST API file upload timeout in milliseconds."},{default:h(()=>[f(Qe,{modelValue:Q(n).settings.timeout.apiUploadTimeout,"onUpdate:modelValue":u[4]||(u[4]=d=>Q(n).settings.timeout.apiUploadTimeout=d),label:"Upload Timeout",min:"0",type:"number",onChange:a},null,8,["modelValue"]),i.value.timeoutSettings?($(),J(un,{key:0,class:"ml-2",indeterminate:"",size:"30",width:"4"})):se("",!0)]),_:1})):se("",!0),f(pt),f(an,{title:"Clean File References",tooltip:"Clear out file references without removing them from OctoPrint."},{default:h(()=>[f(te,{color:"primary",onClick:u[5]||(u[5]=d=>l())},{default:h(()=>[...u[6]||(u[6]=[k(" Purge File References ",-1)])]),_:1}),i.value.purgeFiles?($(),J(un,{key:0,class:"ml-2",indeterminate:"",size:"30",width:"4"})):se("",!0)]),_:1})]),_:1})]),_:1}))}}),ore={class:"mb-4"},lre={class:"d-flex align-center justify-space-between",style:{width:"100%"}},ure={class:"d-flex align-center"},cre={class:"text-subtitle-1 font-weight-medium"},dre={class:"text-caption text-medium-emphasis"},fre={class:"mb-4"},pre={class:"mb-4"},mre={key:0,class:"mb-3"},hre={class:"d-flex flex-wrap ga-2"},gre={key:1,class:"text-caption text-medium-emphasis mb-3"},vre={key:0,class:"text-center pa-8 text-medium-emphasis"},yre=Ae({__name:"FloorSettings",setup(e){const t=ks(),n=ns(),r=At(),s=bt(),i=jt(Ht.AddOrUpdateFloorDialog),a=A(()=>n.floors);function o(v){return r.printers.find(b=>b.id===v)?.name||`Printer ${v}`}function l(v){t.push({path:"/printers-grid",query:{floor:v.toString()}})}async function c(){await i.openDialog()}async function u(v,g){g.trim()&&(await n.updateFloorName({floorId:v,name:g.trim()}),s.info("Floor name updated"))}async function d(v,g){!g||g<0||(await n.updateFloorNumber({floorId:v,floorNumber:g}),s.info("Floor number updated"))}async function p(v){confirm("Are you sure you want to delete this floor? Printers will not be deleted.")&&(await n.deleteFloor(v),s.info("Floor deleted"))}async function m(v,g){await n.deletePrinterFromFloor({floorId:v,printerId:g}),s.info("Printer removed from floor")}return(v,g)=>($(),J($e,null,{default:h(()=>[f(Ks,{icon:"house_siding",title:"Floors"}),f(Xe,null,{default:h(()=>[f(an,{title:"Manage Floors",usecols:!1},{default:h(()=>[S("div",ore,[f(te,{color:"primary","prepend-icon":"add",onClick:g[0]||(g[0]=b=>c())},{default:h(()=>[...g[1]||(g[1]=[k(" Create New Floor ",-1)])]),_:1})]),f(rc,{variant:"accordion"},{default:h(()=>[($(!0),pe(ke,null,Ot(a.value,b=>($(),J(nc,{key:b.id},{default:h(()=>[f(tc,null,{default:h(()=>[S("div",lre,[S("div",ure,[f(j,{class:"mr-3"},{default:h(()=>[...g[2]||(g[2]=[k("layers",-1)])]),_:1}),S("div",null,[S("div",cre,Y(b.name),1),S("div",dre," Floor #"+Y(b.floor)+" • "+Y(b.printers.length)+" printer(s) assigned ",1)])])])]),_:2},1024),f(ec,null,{default:h(()=>[S("div",fre,[f(it,null,{default:h(()=>[f(Be,{cols:"6"},{default:h(()=>[f(Qe,{"model-value":b.name,label:"Floor Name",variant:"outlined",density:"compact","hide-details":"",onBlur:y=>u(b.id,y.target.value)},null,8,["model-value","onBlur"])]),_:2},1024),f(Be,{cols:"6"},{default:h(()=>[f(Qe,{"model-value":b.floor,label:"Floor Number",type:"number",variant:"outlined",density:"compact","hide-details":"",onBlur:y=>d(b.id,Number(y.target.value))},null,8,["model-value","onBlur"])]),_:2},1024)]),_:2},1024)]),S("div",pre,[f(te,{color:"primary",variant:"tonal","prepend-icon":"grid_on",onClick:y=>l(b.id)},{default:h(()=>[...g[3]||(g[3]=[k(" Manage Printers on Grid ",-1)])]),_:1},8,["onClick"])]),f(pt,{class:"my-3"}),b.printers.length>0?($(),pe("div",mre,[g[5]||(g[5]=S("div",{class:"text-subtitle-2 mb-2"},"Assigned Printers:",-1)),S("div",hre,[($(!0),pe(ke,null,Ot(b.printers,y=>($(),J(qe,{key:y.printerId,closable:"",size:"small","onClick:close":w=>m(b.id,y.printerId)},{default:h(()=>[f(j,{start:"",size:"x-small"},{default:h(()=>[...g[4]||(g[4]=[k("print",-1)])]),_:1}),k(" "+Y(o(y.printerId))+" ",1),f(qe,{size:"x-small",variant:"flat",class:"ml-1"},{default:h(()=>[k(Y(y.x)+","+Y(y.y),1)]),_:2},1024)]),_:2},1032,["onClick:close"]))),128))])])):($(),pe("div",gre," No printers assigned to this floor yet. ")),f(pt,{class:"my-3"}),f(te,{color:"error",variant:"outlined",size:"small","prepend-icon":"delete",onClick:y=>p(b.id)},{default:h(()=>[...g[6]||(g[6]=[k(" Delete Floor ",-1)])]),_:1},8,["onClick"])]),_:2},1024)]),_:2},1024))),128))]),_:1}),a.value.length?se("",!0):($(),pe("div",vre,[f(j,{size:"large",class:"mb-2"},{default:h(()=>[...g[7]||(g[7]=[k("layers_clear",-1)])]),_:1}),g[8]||(g[8]=S("div",null,'No floors created yet. Click "Create New Floor" to get started.',-1))]))]),_:1})]),_:1})]),_:1}))}}),bre=Ae({__name:"EmergencyCommands",setup(e){const t=Gs.emergencyCommands,n=At(),r=q(!1),s=A(()=>n.printers.some(u=>Vb(u.printerType))),i=A(()=>n.printers.every(u=>!u.enabled)),a=A(()=>n.printers.every(u=>!!u.enabled));async function o(u){if(confirm("Are you sure you want to toggle all printers?")){r.value=!0;try{await Su.batchToggleEnabled(n.printers.map(d=>d.id),u)}finally{r.value=!1}}}async function l(){if(confirm("Are you sure you want to connect all USBs?"))try{await Su.batchConnectUsb(n.printers.map(u=>u.id))}finally{r.value=!1}}async function c(){confirm("Are you sure you want to connect all sockets?")&&(r.value=!0,await Su.batchConnectSocket(n.printers.map(u=>u.id)),r.value=!1)}return(u,d)=>($(),J($e,null,{default:h(()=>[f(Ks,{icon:Q(t).icon,title:Q(t).title},null,8,["icon","title"]),f(Xe,null,{default:h(()=>[f(an,{title:"Batch disabling",tooltip:"Disable all printers in batch (will not affect print)"},{default:h(()=>[f(te,{disabled:r.value||i.value,color:"primary",onClick:d[0]||(d[0]=p=>o(!1))},{default:h(()=>[...d[2]||(d[2]=[k(" Batch disable ",-1)])]),_:1},8,["disabled"]),r.value?($(),J(un,{key:0,class:"ml-2",indeterminate:"",size:"30",width:"4"})):se("",!0),i.value?($(),J(j,{key:1,class:"ml-2",color:"warning"},{default:h(()=>[...d[3]||(d[3]=[k(" warning ",-1)])]),_:1})):se("",!0)]),_:1}),f(pt),f(an,{title:"Batch enabling",tooltip:"Enabling all printers in batch (will not affect print and it will skip printers in maintenance mode)"},{default:h(()=>[f(te,{disabled:r.value||a.value,color:"primary",onClick:d[1]||(d[1]=p=>o(!0))},{default:h(()=>[...d[4]||(d[4]=[k(" Batch enable ",-1)])]),_:1},8,["disabled"]),r.value?($(),J(un,{key:0,class:"ml-2",indeterminate:"",size:"30",width:"4"})):se("",!0),a.value?($(),J(j,{key:1,class:"ml-2",color:"warning"},{default:h(()=>[...d[5]||(d[5]=[k(" warning ",-1)])]),_:1})):se("",!0)]),_:1}),s.value?($(),J(pt,{key:0})):se("",!0),s.value?($(),J(an,{key:1,title:"Batch USB connect",tooltip:"Connect all USB devices (OctoPrint only)"},{default:h(()=>[f(te,{disabled:r.value||i.value,color:"primary",onClick:l},{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...d[6]||(d[6]=[k("usb",-1)])]),_:1}),d[7]||(d[7]=k(" Connect USBs ",-1))]),_:1},8,["disabled"]),r.value?($(),J(un,{key:0,class:"ml-2",indeterminate:"",size:"30",width:"4"})):se("",!0)]),_:1})):se("",!0),f(an,{title:"Batch Socket connect",tooltip:"Connect all Network Connections"},{default:h(()=>[f(te,{disabled:r.value||i.value,color:"primary",onClick:c},{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...d[8]||(d[8]=[k("hub",-1)])]),_:1}),d[9]||(d[9]=k(" Refresh Network Connections ",-1))]),_:1},8,["disabled"]),r.value?($(),J(un,{key:0,class:"ml-2",indeterminate:"",size:"30",width:"4"})):se("",!0)]),_:1})]),_:1})]),_:1}))}}),Sre={class:"text-center"},wre=Ae({__name:"NotFoundView",setup(e){const t=ks(),n=()=>{t.go(-1)};return(r,s)=>($(),J(Br,null,{default:h(()=>[s[6]||(s[6]=S("h2",{class:"text-center mt-lg-12"},"This page was not found.",-1)),s[7]||(s[7]=S("h1",{class:"text-center"},": (",-1)),s[8]||(s[8]=S("br",null,null,-1)),S("h4",Sre,[f(te,{class:"align-center",color:"primary",to:"/",variant:"elevated"},{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...s[1]||(s[1]=[k("home",-1)])]),_:1}),s[2]||(s[2]=k(" Go home ",-1))]),_:1}),s[5]||(s[5]=S("span",{class:"pa-5"}," or ",-1)),f(te,{class:"align-center",variant:"elevated",onClick:s[0]||(s[0]=i=>n())},{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...s[3]||(s[3]=[k("arrow_left",-1)])]),_:1}),s[4]||(s[4]=k(" Go back ",-1))]),_:1})])]),_:1}))}}),_re={key:0},kre={key:1},xre={key:2},Ere={key:3},Cre={key:4},Tre=Ae({__name:"PermissionDenied",setup(e){const t=c1(),n=A(()=>t.query);return(r,s)=>($(),J(Br,{"fill-height":"",fluid:""},{default:h(()=>[f(y2,{color:"primary"},{default:h(()=>[f(Us,{class:"text-uppercase text-white"},{default:h(()=>[...s[0]||(s[0]=[S("span",{class:"font-weight-light"}," FDM ",-1),S("strong",null," Monster ",-1)])]),_:1})]),_:1}),s[11]||(s[11]=S("img",{alt:"FDM Monster Background",class:"grid-bg-img align-content-center",src:_1,style:{opacity:"0.06"}},null,-1)),f(E1,{"align-center":"",column:"","justify-center":""},{default:h(()=>[f($e,{class:"flex align-center justify-center pa-lg-16 pa-sm-10",style:{width:"80%"}},{default:h(()=>[f(Lt,null,{default:h(()=>[f(j,{class:"mr-4",size:"50"},{default:h(()=>[...s[1]||(s[1]=[k(" lock ",-1)])]),_:1}),s[2]||(s[2]=S("h3",null,"Permission Denied",-1))]),_:1}),f(fp,{class:"mt-1"},{default:h(()=>[...s[3]||(s[3]=[k(" You do not have permission to access a specific resource on this page. ",-1)])]),_:1}),n.value?($(),J(Xe,{key:0},{default:h(()=>[n.value.page?($(),pe("div",_re,[s[4]||(s[4]=k(" Page: ",-1)),S("strong",null,Y(n.value?.page),1)])):se("",!0),n.value.permissions?($(),pe("div",kre,[s[5]||(s[5]=k(" Required permission(s): ",-1)),($(!0),pe(ke,null,Ot(n.value.permissions,i=>($(),pe("strong",{key:i},Y(i),1))),128))])):se("",!0),n.value.roles?($(),pe("div",xre,[s[6]||(s[6]=k(" Usable roles: ",-1)),S("strong",null,Y(n.value.roles?.join(", ")),1)])):se("",!0),n.value.url?($(),pe("div",Ere,[s[7]||(s[7]=k(" Problematic API path: ",-1)),S("strong",null,Y(n.value.url),1)])):se("",!0),n.value.error?($(),pe("div",Cre,[s[8]||(s[8]=k(" Error: ",-1)),S("strong",null,Y(n.value.error),1)])):se("",!0)]),_:1})):se("",!0),f(dn,{class:"mt-6"},{default:h(()=>[f(te,{class:"align-center",color:"primary",to:"/",variant:"elevated"},{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...s[9]||(s[9]=[k("home",-1)])]),_:1}),s[10]||(s[10]=k(" Go home ",-1))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}}),Ire=Ae({__name:"Logo",setup(e){return(t,n)=>($(),J(ms,{src:Q(v1),class:"shrink mr-1 pt-3 ml-1",contain:"",style:{opacity:"0.85"},width:"150"},null,8,["src"]))}}),Rre=Ae({__name:"LoginForm",setup(e){const t=Zr(),n=q(""),r=q(""),s=q(!1),i=q(""),a=ks(),o=c1(),l=q(!1),c=nr("auth:login"),u=bt(),d=A(()=>(r.value??"")?.length<3||(i.value??"").length<3);ot(async()=>{if(t.loadTokens(),await t.checkAuthenticationRequirements(),t.loginRequired===!1)return console.debug("LoginView, no login required, redirecting to",o.query.redirect,"or home"),c.emit(!0),await v();if(!t.hasRefreshToken)return;await t.verifyOrRefreshLoginOnceOrLogout()&&await v()});async function p(){return await a.push({name:xt.Registration})}async function m(){try{l.value=!0,await t.login(r.value,i.value),t.lastLogoutReason=null,i.value="",l.value=!1}catch(g){if(l.value=!1,g?.response?.status===401){i.value="";const b=g?.response?.data?.reasonCode,y=Uy(b);b===ur.AccountNotVerified?u.error(y,"Please ask your administrator to verify your account and try again."):b===ur.PasswordChangeRequired&&u.error(y,"Your password needs to be changed. This feature is sadly not finished"),n.value=y;return}u.openErrorMessage({title:"Error logging in",subtitle:"Please test your connection and try again."}),n.value="Error logging in - status code "+g?.response?.status,i.value="";return}return n.value="",c.emit(!0),await v()}async function v(){const g=o.query.redirect;if(g){console.debug("[LoginForm] Redirecting to ",g),await a.push({path:g});return}else{console.debug("[LoginForm] Redirecting to home"),await a.push({name:xt.Home});return}}return(g,b)=>($(),J($e,{class:"pa-4",elevation:"10",style:{"border-radius":"10px"}},{default:h(()=>[f(Xe,null,{default:h(()=>[f(Mp,null,{default:h(()=>[b[7]||(b[7]=S("label",null," Username ",-1)),f(Qe,{modelValue:r.value,"onUpdate:modelValue":b[0]||(b[0]=y=>r.value=y),"prepend-icon":"person",autofocus:"",label:"Username",name:"login",type:"text",variant:"underlined",onKeyup:b[1]||(b[1]=Qd(y=>d.value||m(),["enter"]))},null,8,["modelValue"]),f(Qe,{modelValue:i.value,"onUpdate:modelValue":b[2]||(b[2]=y=>i.value=y),"append-inner-icon":s.value?"visibility_off":"visibility","onClick:appendInner":b[3]||(b[3]=y=>s.value=!s.value),type:s.value?"text":"password",label:"Password",name:"password",password:"","prepend-icon":"lock",variant:"underlined",onKeyup:b[4]||(b[4]=Qd(y=>d.value||m(),["enter"]))},null,8,["modelValue","append-inner-icon","type"]),n.value?($(),J(Et,{key:0,class:"mt-6",color:"error",density:"compact",variant:"outlined"},{default:h(()=>[k(Y(n.value),1)]),_:1})):se("",!0),Q(t).lastLogoutReason?($(),J(Et,{key:1,class:"mt-6",color:"error-darken-1",density:"compact",variant:"outlined"},{default:h(()=>[k(" Reason for automatic logout: "+Y(Q(t).lastLogoutReason),1)]),_:1})):se("",!0)]),_:1})]),_:1}),f(dn,null,{default:h(()=>[f(te,{loading:l.value,class:"pa-4",color:"primary",size:"lg",variant:"flat",style:{width:"100%"},onClick:b[5]||(b[5]=y=>m())},{default:h(()=>[...b[8]||(b[8]=[k(" Login ",-1)])]),_:1},8,["loading"])]),_:1}),f(dn,null,{default:h(()=>[f(te,{disabled:!Q(t).registration,class:"pa-4",size:"lg",variant:"flat",style:{width:"100%"},onClick:b[6]||(b[6]=y=>p())},{default:h(()=>[k(" Register new account "+Y(Q(t).registration?"":"(not enabled)")+" ",1),f(j,{class:"pl-5",icon:"right"})]),_:1},8,["disabled"])]),_:1})]),_:1}))}}),Pre={class:"d-flex align-center",style:{"min-height":"calc(100vh - 148px)"}},Are={class:"pt-6 pl-6 d-flex flex-column align-center"},Ore=Ae({__name:"LoginView",setup(e){return(t,n)=>{const r=Ire;return $(),J(it,{class:"position-relative","no-gutters":""},{default:h(()=>[f(Be,{cols:"12",lg:"12"},{default:h(()=>[f(Br,null,{default:h(()=>[S("div",Pre,[f(it,{justify:"center",class:"align-content-center"},{default:h(()=>[S("div",Are,[f(r),f(Us,{class:"text-uppercase text-red"},{default:h(()=>[...n[0]||(n[0]=[S("strong",null," FDM  ",-1),S("strong",null," Monster ",-1)])]),_:1}),f(Us,{class:"mt-lg-6 mt-sm-5 mb-md-5"},{default:h(()=>[...n[1]||(n[1]=[k(" Login to your account ",-1)])]),_:1}),f(fp,{class:"text-grey mb-md-5"},{default:h(()=>[...n[2]||(n[2]=[k(" Welcome back! Please enter your details ",-1)])]),_:1})]),f(Be,{cols:"12",md:"12"},{default:h(()=>[f(Rre,{class:"login-card"})]),_:1})]),_:1})])]),_:1})]),_:1})]),_:1})}}}),Dre={class:"d-flex flex-column align-center"},Lre=Ae({__name:"RegistrationForm",setup(e){const t=Zr(),n=ks(),r=q(""),s=q(""),i=q(!1),a=q(!1),o=q(""),l=q(""),c=q(!1),u=bt();async function d(){return await n.push({name:xt.Login})}const p=A(()=>(s.value??"")?.length<3||(o.value??"").length<3||o.value!=l.value);ot(async()=>{await t.logout(),await t.checkAuthenticationRequirements(),t.registration||(u.info("Registration is disabled, please contact your administrator"),await n.push({name:xt.Login}))});async function m(){try{c.value=!0,await ba.registerAccount(s.value,o.value),c.value=!1}catch(v){if(c.value=!1,v?.response?.status===401){r.value="Invalid credentials";return}u.openErrorMessage({title:"Error logging in",subtitle:"Please test your connection and try again."});return}r.value="",u.info("Account created, please login"),await d()}return(v,g)=>{const b=Tu("v-flex");return $(),J(Br,{"fill-height":"",fluid:""},{default:h(()=>[f(E1,{"align-content-center":"","justify-center":""},{default:h(()=>[f(b,{class:"d-flex flex-column align-content-center",md4:"",sm8:"",style:{"max-width":"450px","margin-top":"10%"},xs12:""},{default:h(()=>[S("div",Dre,[f(ms,{src:require("@/assets/logo.png"),class:"shrink mr-1 pt-3 ml-1",contain:"",style:{opacity:"0.85"},width:"150"},null,8,["src"]),f(Us,{class:"text-uppercase text-red"},{default:h(()=>[...g[8]||(g[8]=[S("strong",null," FDM  ",-1),S("strong",null," Monster ",-1)])]),_:1}),f(Us,{class:"mt-lg-6 mt-sm-5"},{default:h(()=>[...g[9]||(g[9]=[k(" Register new account ",-1)])]),_:1}),f(fp,{class:"text-grey"},{default:h(()=>[...g[10]||(g[10]=[k(" Welcome! Please register your guest account ",-1)])]),_:1})]),f($e,{class:"elevation-4 pa-4",style:{"border-radius":"10px"}},{default:h(()=>[f(Xe,null,{default:h(()=>[f(Mp,null,{default:h(()=>[g[11]||(g[11]=S("label",null," Username ",-1)),f(Qe,{modelValue:s.value,"onUpdate:modelValue":g[0]||(g[0]=y=>s.value=y),rules:[y=>!!y||"Username is required",y=>(y?.length??0)>=3||"Username must be of length 3 or greater",y=>!y.toLowerCase().includes("admin")||"Username may not contain the word admin",y=>!y.toLowerCase().includes("root")||"Username may not contain the word root",y=>y.toLowerCase()!=="demo"||"Username may not equal the word demo"],autofocus:"",name:"login",label:"Username","prepend-icon":"person",type:"text"},null,8,["modelValue","rules"]),f(Qe,{id:"password",modelValue:o.value,"onUpdate:modelValue":g[1]||(g[1]=y=>o.value=y),"append-icon":i.value?"visibility":"visibility_off",type:i.value?"text":"password",label:"Password",name:"password",rules:[y=>!!y||"Password is required",y=>!!y&&y?.length>=8||"Password must be of length 8 or greater"],password:"","prepend-icon":"lock","onClick:append":g[2]||(g[2]=y=>i.value=!i.value)},null,8,["modelValue","append-icon","type","rules"]),f(Qe,{id:"password",modelValue:l.value,"onUpdate:modelValue":g[3]||(g[3]=y=>l.value=y),"append-icon":a.value?"visibility":"visibility_off",type:a.value?"text":"password",rules:[y=>!!y||"Repeated password is required",y=>y===o.value||"Passwords are not equal"],label:"Repeated Password",name:"password",password:"","prepend-icon":"lock","onClick:append":g[4]||(g[4]=y=>a.value=!a.value),onKeyup:g[5]||(g[5]=Qd(y=>p.value||m(),["enter"]))},null,8,["modelValue","append-icon","type","rules"]),r.value?($(),J(Et,{key:0,class:"mt-6",color:"error",density:"compact",variant:"outlined"},{default:h(()=>[k(Y(r.value),1)]),_:1})):se("",!0)]),_:1})]),_:1}),f(dn,null,{default:h(()=>[f(te,{loading:c.value,class:"pa-4",color:"primary",size:"large",style:{width:"100%"},onClick:g[6]||(g[6]=y=>m())},{default:h(()=>[...g[12]||(g[12]=[k(" Register account ",-1)])]),_:1},8,["loading"])]),_:1}),f(dn,null,{default:h(()=>[f(te,{style:{width:"100%"},class:"pa-4",size:"large",onClick:g[7]||(g[7]=y=>d())},{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...g[13]||(g[13]=[k("arrow_left",-1)])]),_:1}),g[14]||(g[14]=k("Back to Login ",-1))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}}}),$re=Ae({__name:"RegistrationView",setup(e){return(t,n)=>($(),J(Br,{"fill-height":"",fluid:""},{default:h(()=>[f(E1,{"align-center":"","justify-center":""},{default:h(()=>[f(Lre)]),_:1})]),_:1}))}}),Fre={class:"camera-grid-view"},Nre={class:"pa-4"},Mre={class:"d-flex align-center ga-2"},Vre={class:"pa-4"},Bre={key:0,class:"d-flex justify-center align-center py-12"},Ure={class:"empty-tile-content"},zre={class:"flex-grow-1 text-truncate"},jre={class:"d-flex align-center gap-2 mb-1"},Hre={class:"text-subtitle-2 font-weight-bold text-truncate"},qre={key:0,class:"text-caption text-medium-emphasis text-truncate"},Wre={class:"camera-stream-container"},Gre=["src","onError","onLoad"],Kre={key:1,class:"camera-loading"},Yre={key:2,class:"camera-unavailable"},Jre=Ae({__name:"CameraGridView",setup(e){const t=At(),n=jt(Ht.AddOrUpdateCameraDialog),r=Nc(),{selectedTags:s,selectedPrinterTypes:i,tags:a,tagsWithPrinters:o,loadTags:l}=Vc(),c=q(""),u=q(void 0),d=q(!1),p=Jt({}),m=Jt({});ot(async()=>{await l()});const g=Np({queryKey:["cameraStream"],queryFn:async()=>(await ic.listCameraStreams()).map(M=>({printer:t.printers.find(N=>N.id===M.printerId),cameraStream:M}))}),b=lJ({mutationFn:B=>ic.deleteCameraStream(B),onSuccess:()=>g.refetch()}),y=A(()=>{const B=[{title:"All Printers",value:void 0},{title:"Unassigned Cameras",value:null}];return t.printers.forEach(M=>{B.push({title:M.name,value:M.id})}),B}),w=A(()=>g.data.value?g.data.value.filter(B=>{const M=!c.value||B.cameraStream.name?.toLowerCase().includes(c.value.toLowerCase())||B.printer?.name?.toLowerCase().includes(c.value.toLowerCase()),N=u.value===void 0||u.value===null&&!B.cameraStream.printerId||B.cameraStream.printerId===u.value;let D=s.value.length===0;s.value.length>0&&B.printer?.id&&(D=o.value.some(K=>s.value.includes(K.id)&&K.printers.some(H=>H.printerId===B.printer?.id)));let W=i.value.length===0;i.value.length>0&&B.printer&&(W=i.value.includes(B.printer.printerType));const z=!d.value||p[B.cameraStream.id];return M&&N&&D&&W&&z}):[]),_=A(()=>Object.values(p).filter(Boolean).length),T=A(()=>u.value!==void 0||d.value||s.value.length>0||i.value.length>0),P=A(()=>{let B=0;return u.value!==void 0&&B++,d.value&&B++,s.value.length>0&&B++,i.value.length>0&&B++,B});function x(B){B&&(p[B]=!0,m[B]=!1)}function C(B){B&&(p[B]=!1,m[B]=!1)}_e(()=>g.data.value,B=>{B&&B.forEach(M=>{M.cameraStream.id&&m[M.cameraStream.id]===void 0&&(m[M.cameraStream.id]=!0)})},{immediate:!0});function E(){u.value=void 0,d.value=!1,s.value=[],i.value=[]}function R(){n.openDialog({addOrUpdate:"add"})}function I(B){B&&n.openDialog({addOrUpdate:"update",cameraId:B})}function O(B){const M=B.cameraStream.name||B.printer?.name||"this camera";confirm(`Are you sure you want to delete ${M}?`)&&L(B.cameraStream.id)}function L(B){B&&b.mutateAsync(B)}function V(B){r.openFileExplorer(B)}function F(B){return Yr(B)}return(B,M)=>($(),pe("div",Fre,[f(ro,{color:"surface",elevation:"1",class:"px-4"},{default:h(()=>[f(j,{size:"32",class:"mr-3"},{default:h(()=>[...M[7]||(M[7]=[k("videocam",-1)])]),_:1}),f(Us,{class:"text-h5 font-weight-bold"},{default:h(()=>[...M[8]||(M[8]=[k(" Camera Overview ",-1)])]),_:1})]),_:1}),S("div",Nre,[f(it,{align:"center"},{default:h(()=>[f(Be,{cols:"12",md:"6"},{default:h(()=>[S("div",Mre,[f(te,{color:"primary",variant:"elevated",onClick:M[0]||(M[0]=N=>R())},{default:h(()=>[f(j,{start:""},{default:h(()=>[...M[9]||(M[9]=[k("add",-1)])]),_:1}),M[10]||(M[10]=k(" Add Camera ",-1))]),_:1}),f(da,{"close-on-content-click":!1},{activator:h(({props:N})=>[f(te,ce(N,{variant:"outlined",color:T.value?"primary":void 0}),{default:h(()=>[f(j,{start:""},{default:h(()=>[...M[11]||(M[11]=[k("filter_list",-1)])]),_:1}),M[12]||(M[12]=k(" Filter ",-1)),T.value?($(),J(Up,{key:0,color:"primary",content:P.value,inline:"",class:"ml-2"},null,8,["content"])):se("",!0)]),_:1},16,["color"])]),default:h(()=>[f($e,{"min-width":"350"},{default:h(()=>[f(Xe,null,{default:h(()=>[f(Ai,{modelValue:u.value,"onUpdate:modelValue":M[1]||(M[1]=N=>u.value=N),items:y.value,label:"Filter by Printer","prepend-inner-icon":"print",variant:"outlined",density:"compact",clearable:"","hide-details":"",class:"mb-3"},null,8,["modelValue","items"]),f(Vl,{modelValue:Q(s),"onUpdate:modelValue":M[2]||(M[2]=N=>nt(s)?s.value=N:null),tags:Q(a),label:"Filter by Tags",class:"mb-3"},null,8,["modelValue","tags"]),f(Bl,{modelValue:Q(i),"onUpdate:modelValue":M[3]||(M[3]=N=>nt(i)?i.value=N:null),label:"Filter by Type",class:"mb-3"},null,8,["modelValue"]),f(Yt,{modelValue:d.value,"onUpdate:modelValue":M[4]||(M[4]=N=>d.value=N),label:"Show only unavailable cameras",density:"compact","hide-details":""},null,8,["modelValue"])]),_:1}),f(dn,null,{default:h(()=>[f(Ft),f(te,{variant:"text",size:"small",onClick:E},{default:h(()=>[...M[13]||(M[13]=[k(" Clear All ",-1)])]),_:1})]),_:1})]),_:1})]),_:1}),f(Qe,{modelValue:c.value,"onUpdate:modelValue":M[5]||(M[5]=N=>c.value=N),placeholder:"Search cameras by name...","prepend-inner-icon":"search",variant:"outlined",density:"compact",clearable:"","hide-details":"",class:"flex-grow-1"},null,8,["modelValue"])])]),_:1}),f(Be,{cols:"12",md:"6",class:"text-md-right"},{default:h(()=>[f(qe,{class:"mr-2",color:"primary"},{default:h(()=>[f(j,{start:"",size:"small"},{default:h(()=>[...M[14]||(M[14]=[k("videocam",-1)])]),_:1}),k(" "+Y(w.value.length)+" cameras ",1)]),_:1}),_.value>0?($(),J(qe,{key:0,color:"error"},{default:h(()=>[f(j,{start:"",size:"small"},{default:h(()=>[...M[15]||(M[15]=[k("error_outline",-1)])]),_:1}),k(" "+Y(_.value)+" unavailable ",1)]),_:1})):se("",!0)]),_:1})]),_:1})]),S("div",Vre,[Q(g).isLoading.value?($(),pe("div",Bre,[f(un,{indeterminate:"",color:"primary",size:"64"})])):Q(g).data.value?.length&&!w.value.length?($(),J($e,{key:1,variant:"outlined",class:"text-center py-12"},{default:h(()=>[f(j,{size:"64",color:"medium-emphasis",class:"mb-4"},{default:h(()=>[...M[16]||(M[16]=[k(" search_off ",-1)])]),_:1}),M[17]||(M[17]=S("div",{class:"text-h6 text-medium-emphasis mb-2"}," No cameras match your filters ",-1)),M[18]||(M[18]=S("div",{class:"text-body-2 text-medium-emphasis mb-4"}," Try adjusting your search or filters ",-1))]),_:1})):($(),J(it,{key:2},{default:h(()=>[Q(g).data.value?.length?se("",!0):($(),J(Be,{key:0,cols:"12",sm:"6",md:"4",lg:"3"},{default:h(()=>[f($e,{class:"camera-card empty-camera-tile",elevation:"2",rounded:"lg",hover:"",onClick:M[6]||(M[6]=N=>R())},{default:h(()=>[S("div",Ure,[f(Sn,{color:"primary",size:"64",class:"mb-4"},{default:h(()=>[f(j,{size:"32"},{default:h(()=>[...M[19]||(M[19]=[k("add_a_photo",-1)])]),_:1})]),_:1}),M[22]||(M[22]=S("div",{class:"text-h6 font-weight-bold mb-2"}," Get Started ",-1)),M[23]||(M[23]=S("div",{class:"text-body-2 text-medium-emphasis mb-4 px-4"}," Add your first camera stream to monitor your 3D printers ",-1)),f(te,{color:"primary",variant:"elevated",size:"small"},{default:h(()=>[f(j,{start:""},{default:h(()=>[...M[20]||(M[20]=[k("add",-1)])]),_:1}),M[21]||(M[21]=k(" Add Camera ",-1))]),_:1})])]),_:1})]),_:1})),($(!0),pe(ke,null,Ot(w.value,N=>($(),J(Be,{key:N.cameraStream.id,cols:"12",sm:"6",md:"4",lg:"3"},{default:h(()=>[f($e,{class:"camera-card",elevation:"2",rounded:"lg"},{default:h(()=>[f(Lt,{class:"d-flex align-center pa-3"},{default:h(()=>[f(Sn,{color:N.cameraStream.printerId?"primary":"secondary",size:"32",class:"mr-2"},{default:h(()=>[f(j,{size:"20"},{default:h(()=>[k(Y(N.cameraStream.printerId?"print":"videocam"),1)]),_:2},1024)]),_:2},1032,["color"]),S("div",zre,[S("div",jre,[S("div",Hre,Y(N.cameraStream.name||N.printer?.name||"Camera"),1)]),N.printer?($(),pe("div",qre,[k(Y(N.printer.name)+" ",1),N.printer?($(),J(qe,{key:0,size:"x-small",color:"primary",variant:"tonal"},{default:h(()=>[k(Y(F(N.printer.printerType)),1)]),_:2},1024)):se("",!0)])):se("",!0)])]),_:2},1024),S("div",Wre,[N.cameraStream.id?Pt(($(),pe("img",{key:0,alt:"Camera stream",src:N.cameraStream.streamURL,class:"camera-stream",onError:D=>x(N.cameraStream.id),onLoad:D=>C(N.cameraStream.id)},null,40,Gre)),[[$r,N.cameraStream.id&&!p[N.cameraStream.id]&&!m[N.cameraStream.id]]]):se("",!0),N.cameraStream.id&&m[N.cameraStream.id]&&!p[N.cameraStream.id]?($(),pe("div",Kre,[f(un,{indeterminate:"",color:"primary",size:"48"}),M[24]||(M[24]=S("div",{class:"text-caption mt-2"},"Connecting...",-1))])):se("",!0),N.cameraStream.id&&p[N.cameraStream.id]?($(),pe("div",Yre,[f(j,{size:"48",color:"error"},{default:h(()=>[...M[25]||(M[25]=[k("videocam_off",-1)])]),_:1}),M[26]||(M[26]=S("div",{class:"text-body-2 font-weight-bold mt-2"},"Camera stream unavailable",-1)),M[27]||(M[27]=S("div",{class:"text-caption text-medium-emphasis mt-1"},"Unable to connect to stream",-1))])):se("",!0)]),f(dn,{class:"pa-3"},{default:h(()=>[f(te,{variant:"text",size:"small",onClick:D=>I(N.cameraStream.id)},{default:h(()=>[f(j,{start:""},{default:h(()=>[...M[28]||(M[28]=[k("edit",-1)])]),_:1}),M[29]||(M[29]=k(" Edit ",-1))]),_:1},8,["onClick"]),N.printer?($(),J(te,{key:0,variant:"text",size:"small",color:"primary",onClick:D=>V(N.printer)},{default:h(()=>[f(j,{start:""},{default:h(()=>[...M[30]||(M[30]=[k("folder",-1)])]),_:1}),M[31]||(M[31]=k(" Files ",-1))]),_:1},8,["onClick"])):se("",!0),f(Ft),f(te,{variant:"text",size:"small",color:"error",onClick:D=>O(N)},{default:h(()=>[f(j,{start:""},{default:h(()=>[...M[32]||(M[32]=[k("delete",-1)])]),_:1}),M[33]||(M[33]=k(" Delete ",-1))]),_:1},8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))]),_:1}))])]))}}),Xre=fn(Jre,[["__scopeId","data-v-130b58dc"]]),Qre="/img/OIG.jpg";class Pk extends Cr{static async postFirstTimeSetup(t){const n=ue.completeFirstTimeSetupRoute;return await this.post(n,t)}static async postYamlImport(t){const n=new FormData;return n.append("file",t),await this.postUpload("api/first-time-setup/yaml-import",n,{})}}const Zre={class:"d-flex align-start",style:{gap:"12px"}},ese={class:"text-body-2 mb-3"},tse={class:"d-flex gap-2 flex-wrap"},ch=Ae({__name:"HelpBanner",props:{message:{default:"Need help getting started?"},buttonSize:{default:"small"},githubVariant:{default:"outlined"},githubColor:{default:"default"},discordVariant:{default:"elevated"}},setup(e){return(t,n)=>($(),pe("div",Zre,[f(j,{color:"info"},{default:h(()=>[...n[0]||(n[0]=[k("help_outline",-1)])]),_:1}),S("div",null,[S("div",ese,Y(e.message),1),S("div",tse,[f(w1,{size:e.buttonSize,color:e.githubColor,variant:e.githubVariant},null,8,["size","color","variant"]),f(S1,{class:"ml-2",size:e.buttonSize,variant:e.discordVariant},null,8,["size","variant"])])])]))}}),nse={class:"setup-option-box pa-8"},rse={class:"setup-option-box pa-8",style:{overflow:"visible"}},sse={class:"mb-4"},ise={key:2,class:"mb-4"},ase={class:"d-flex align-start",style:{gap:"8px"}},ose={class:"px-6 pb-6"},lse={class:"setup-option-box ma-6 pa-8"},use={class:"d-flex flex-column align-center",style:{"max-width":"500px",margin:"0 auto"}},cse={class:"text-caption"},dse={class:"text-caption"},fse={class:"text-caption"},pse={class:"px-6 pb-6"},mse={class:"setup-option-box ma-6 pa-6"},hse={class:"d-flex flex-column align-center text-center"},gse={class:"d-flex justify-center mt-8"},vse={class:"px-6 pb-6"},yse=Ae({__name:"FirstTimeSetupView",setup(e){const t=ks(),n=bt(),r=q(!1),s=Zr(),i=q({loginRequired:!0,registration:!1}),a=q({rootUsername:"admin",rootPassword:"",rootPassword2:""}),o=q(null),l=q(!1),c=q(null),u=q(""),d=q(1);ot(async()=>{await s.checkAuthenticationRequirements(),s.wizardState?.wizardCompleted&&(n.info("Setup already completed."),s.loginRequired?await t.push({name:"Login"}):await t.push({name:"Home"}))});async function p(){if(!r.value){n.error("Please fill out all required fields.");return}const b=i.value,y=a.value;await Pk.postFirstTimeSetup({loginRequired:b.loginRequired,registration:b.registration,rootUsername:y.rootUsername,rootPassword:y.rootPassword}),n.openInfoMessage({title:"Setup completed"}),d.value=3}async function m(){await s.checkAuthenticationRequirements()}async function v(){if(c.value=null,u.value="",!o.value){u.value="No file selected",c.value=null;return}l.value=!0;try{const b=await o.value.text(),y=kv(b);if(!y||typeof y!="object"){u.value="Invalid YAML file structure",c.value=null;return}c.value={version:y.version||"Unknown",databaseType:y.databaseType||"Unknown",exportedAt:y.exportedAt?new Date(y.exportedAt).toLocaleString():"Unknown",printersCount:y.printers?.length||0,floorsCount:y.floors?.length||0,groupsCount:y.groups?.length||0,hasSettings:!!y.settings,usersCount:y.users?.length||0}}catch(b){u.value="Failed to validate YAML file: "+b.message,c.value=null}finally{l.value=!1}}async function g(){if(!o.value){n.error("Please select a YAML file to import.");return}if(!(o.value instanceof File)){n.error("Invalid file selected. Please try again.");return}if(o.value.size===0){n.error("The selected file is empty.");return}try{await Pk.postYamlImport(o.value),n.openInfoMessage({title:"Import successful!",subtitle:"Your configuration has been restored."}),await s.checkAuthenticationRequirements(),s.loginRequired?await t.push({name:"Login"}):await t.push({name:"Home"})}catch{n.error("Failed to import YAML configuration.")}}return(b,y)=>($(),J(Br,{fluid:""},{default:h(()=>[y[42]||(y[42]=S("img",{alt:"FDM Monster Background",class:"grid-bg-img align-content-center",src:_1,style:{opacity:"0.08"}},null,-1)),f(it,{class:"justify-center"},{default:h(()=>[f(Be,{cols:"12",md:"10",lg:"8"},{default:h(()=>[f(Pne,{modelValue:d.value,"onUpdate:modelValue":y[13]||(y[13]=w=>d.value=w),class:"bg-grey-darken-4"},{default:h(()=>[f(fO,null,{default:h(()=>[f(Vd,{complete:d.value>1,value:1,title:"Introduction"},null,8,["complete"]),f(pt),f(Vd,{complete:d.value>2,value:2,title:"Login & Registration"},null,8,["complete"]),f(pt),f(Vd,{value:3,title:"What's Next?"})]),_:1}),f(mO,{modelValue:d.value,"onUpdate:modelValue":y[12]||(y[12]=w=>d.value=w)},{default:h(()=>[f(Bd,{value:1},{default:h(()=>[y[23]||(y[23]=S("div",{class:"d-flex flex-column align-center text-center",style:{padding:"60px 40px 40px"}},[S("div",{class:"d-flex align-center justify-center mb-4"},[S("img",{class:"rounded-pill",alt:"User setting up software",src:Qre,style:{opacity:"0.7"},width:"80",height:"80"}),S("h1",{class:"text-h3 ml-4"},"FDM Monster")]),S("p",{class:"text-subtitle-1 text-medium-emphasis"},[k(" Welcome! Let's set up your 3D printing farm management system. "),S("br"),k(" Choose an option below. ")])],-1)),f(it,{class:"px-6 pb-6",align:"start"},{default:h(()=>[f(Be,{cols:"12",md:"6"},{default:h(()=>[S("div",nse,[y[16]||(y[16]=S("div",{class:"text-center mb-8"},[S("h2",{class:"text-h5 mb-2"},"Start Setup"),S("p",{class:"text-body-2 text-medium-emphasis"}," Configure your FDM Monster server step by step with the setup wizard. ")],-1)),f(te,{color:"primary",size:"x-large",block:"",onClick:y[0]||(y[0]=w=>d.value=2)},{default:h(()=>[f(j,{start:""},{default:h(()=>[...y[14]||(y[14]=[k("rocket_launch",-1)])]),_:1}),y[15]||(y[15]=k(" START SETUP ",-1))]),_:1})])]),_:1}),f(Be,{cols:"12",md:"6"},{default:h(()=>[S("div",rse,[y[22]||(y[22]=S("div",{class:"text-center mb-6"},[S("h2",{class:"text-h5 mb-1"},"Import Backup"),S("p",{class:"text-body-2 text-medium-emphasis"}," A .yaml/.yml file is required ")],-1)),S("div",sse,[f(Qb,{modelValue:o.value,"onUpdate:modelValue":[y[1]||(y[1]=w=>o.value=w),v],accept:".yaml,.yml",label:"Select YAML file",variant:"outlined","prepend-icon":"",density:"default","hide-details":""},{"prepend-inner":h(()=>[f(j,null,{default:h(()=>[...y[17]||(y[17]=[k("attach_file",-1)])]),_:1})]),_:1},8,["modelValue"])]),l.value?($(),J(Or,{key:0,indeterminate:"",color:"primary",class:"mb-4"})):se("",!0),u.value?($(),J(Et,{key:1,type:"error",variant:"tonal",density:"compact",class:"mb-4",closable:""},{default:h(()=>[k(Y(u.value),1)]),_:1})):se("",!0),c.value?($(),pe("div",ise,[f(bA,{summary:c.value},null,8,["summary"])])):se("",!0),f(te,{disabled:!c.value,color:"primary",size:"x-large",block:"",class:"mb-4",onClick:y[2]||(y[2]=w=>g())},{default:h(()=>[f(j,{start:""},{default:h(()=>[...y[18]||(y[18]=[k("upload",-1)])]),_:1}),y[19]||(y[19]=k(" IMPORT CONFIGURATION ",-1))]),_:1},8,["disabled"]),S("div",ase,[f(j,{size:"small",color:"info"},{default:h(()=>[...y[20]||(y[20]=[k("info",-1)])]),_:1}),y[21]||(y[21]=S("div",{class:"text-caption text-medium-emphasis",style:{"line-height":"1.4"}}," This will skip the wizard and restore your configuration. ",-1))])])]),_:1})]),_:1}),S("div",ose,[f(ch)])]),_:1}),f(Bd,{value:2},{default:h(()=>[S("div",lse,[S("div",use,[y[36]||(y[36]=S("h2",{class:"text-h5 mb-4 text-center"},"Login Configuration",-1)),f(Mp,{modelValue:r.value,"onUpdate:modelValue":y[8]||(y[8]=w=>r.value=w),class:"w-100"},{default:h(()=>[f(Gv,{modelValue:i.value.loginRequired,"onUpdate:modelValue":y[3]||(y[3]=w=>i.value.loginRequired=w),label:"Enable Login",color:"primary",density:"compact","hide-details":""},null,8,["modelValue"]),f(Et,{type:i.value.loginRequired?"success":"warning",variant:"tonal",density:"compact",class:"mt-2 mb-3"},{default:h(()=>[S("div",cse,[f(j,{size:"x-small",class:"mr-1"},{default:h(()=>[k(Y(i.value.loginRequired?"check":"warning"),1)]),_:1}),k(" "+Y(i.value.loginRequired?"Login is required for all users.":"No login required. Admin role assumed."),1)])]),_:1},8,["type"]),i.value.loginRequired?se("",!0):($(),J(Et,{key:0,type:"error",variant:"tonal",density:"compact",class:"mb-3"},{default:h(()=>[S("div",dse,[f(j,{size:"x-small",class:"mr-1"},{default:h(()=>[...y[24]||(y[24]=[k("security",-1)])]),_:1}),y[25]||(y[25]=k(" Server may be publicly exposed. Carefully evaluate ",-1)),y[26]||(y[26]=S("strong",null,"Enable Login",-1)),y[27]||(y[27]=k(". ",-1))])]),_:1})),f(Gv,{modelValue:i.value.registration,"onUpdate:modelValue":y[4]||(y[4]=w=>i.value.registration=w),label:"Enable Registration",color:"primary",density:"compact",class:"mt-3","hide-details":""},null,8,["modelValue"]),f(Et,{type:i.value.registration?"info":"warning",variant:"tonal",density:"compact",class:"mt-2 mb-4"},{default:h(()=>[S("div",fse,[f(j,{size:"x-small",class:"mr-1"},{default:h(()=>[k(Y(i.value.registration?"check":"block"),1)]),_:1}),k(" "+Y(i.value.registration?"New accounts can be registered with guest role.":"Only admin can create accounts."),1)])]),_:1},8,["type"]),f(pt,{class:"my-6 w-100"}),y[31]||(y[31]=S("h2",{class:"text-h5 mb-4 text-center"},"Admin Account",-1)),f(Qe,{modelValue:a.value.rootUsername,"onUpdate:modelValue":y[5]||(y[5]=w=>a.value.rootUsername=w),rules:[w=>!!w||"Username is required"],label:"Username",variant:"outlined",density:"compact",class:"mb-3"},{"prepend-inner":h(()=>[f(j,{size:"small"},{default:h(()=>[...y[28]||(y[28]=[k("person",-1)])]),_:1})]),_:1},8,["modelValue","rules"]),f(Qe,{modelValue:a.value.rootPassword,"onUpdate:modelValue":y[6]||(y[6]=w=>a.value.rootPassword=w),type:"password",rules:[w=>!!w||"Password is required",w=>!!w&&w?.length>=8||"Password must be at least 8 characters"],label:"Password",variant:"outlined",density:"compact",class:"mb-3"},{"prepend-inner":h(()=>[f(j,{size:"small"},{default:h(()=>[...y[29]||(y[29]=[k("lock",-1)])]),_:1})]),_:1},8,["modelValue","rules"]),f(Qe,{modelValue:a.value.rootPassword2,"onUpdate:modelValue":y[7]||(y[7]=w=>a.value.rootPassword2=w),type:"password",rules:[w=>!!w||"Please repeat password",w=>w===a.value.rootPassword||"Passwords do not match"],label:"Repeat Password",variant:"outlined",density:"compact",class:"mb-4"},{"prepend-inner":h(()=>[f(j,{size:"small"},{default:h(()=>[...y[30]||(y[30]=[k("lock",-1)])]),_:1})]),_:1},8,["modelValue","rules"])]),_:1},8,["modelValue"]),f(dn,{class:"px-0 mt-4"},{default:h(()=>[f(te,{variant:"elevated",onClick:y[9]||(y[9]=w=>d.value=1)},{default:h(()=>[f(j,{start:"",size:"small"},{default:h(()=>[...y[32]||(y[32]=[k("arrow_back",-1)])]),_:1}),y[33]||(y[33]=k(" Back ",-1))]),_:1}),f(Ft),f(te,{disabled:!r.value,color:"primary",variant:"elevated",onClick:y[10]||(y[10]=w=>p())},{default:h(()=>[f(j,{class:"mr-2",size:"small"},{default:h(()=>[...y[34]||(y[34]=[k("mdi:mdi-check",-1)])]),_:1}),y[35]||(y[35]=k(" Submit ",-1))]),_:1},8,["disabled"])]),_:1})])]),S("div",pse,[f(ch)])]),_:1}),f(Bd,{value:3},{default:h(()=>[S("div",mse,[S("div",hse,[f(j,{size:"120",color:"success",class:"mb-4"},{default:h(()=>[...y[37]||(y[37]=[k(" check_circle ",-1)])]),_:1}),y[38]||(y[38]=S("h2",{class:"text-h4 mb-2"},"Setup Completed!",-1)),y[39]||(y[39]=S("p",{class:"text-subtitle-1 text-medium-emphasis"}," Your FDM Monster server is now configured and ready to use. ",-1))]),S("div",gse,[f(te,{color:"primary",size:"large",onClick:y[11]||(y[11]=w=>m())},{default:h(()=>[y[41]||(y[41]=k(" Continue to Login ",-1)),f(j,{end:""},{default:h(()=>[...y[40]||(y[40]=[k("arrow_forward",-1)])]),_:1})]),_:1})])]),S("div",vse,[f(ch,{message:"Need help?"})])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}))}}),bse=fn(yse,[["__scopeId","data-v-3f167de9"]]),Sse=Ae({__name:"AccountSettings",setup(e){const t=Gs.account,n=ws(),r=d1(),s=Zr(),i=ks(),a=bt(),o=q(),l=q(null),c=q({username:"",newPassword:"",oldPassword:"",repeatPassword:""});ot(async()=>{await n.loadSettings(),o.value=n.settings?.server.loginRequired,await r.getProfile(),c.value.username=r.username,l.value=r.userId});async function u(){if(!l.value?.toString()?.length){a.openErrorMessage({title:"User not loaded"});return}await qr.changeUsername(l.value,c.value.username),await r.getProfile(),c.value.username=r.username,a.openInfoMessage({title:"Username changed"})}async function d(){if(!l.value?.toString()?.length){a.openErrorMessage({title:"User not loaded"});return}if(c.value.newPassword!==c.value.repeatPassword){a.openErrorMessage({title:"Passwords do not match"});return}await qr.changePassword(l.value,c.value.oldPassword,c.value.newPassword),c.value.oldPassword="",c.value.newPassword="",c.value.repeatPassword="",a.openInfoMessage({title:"Password changed"}),await s.logout(!0),await r2(i)}return(p,m)=>($(),J($e,null,{default:h(()=>[f(Ks,{icon:Q(t).icon,title:Q(t).title},null,8,["icon","title"]),f(Xe,null,{default:h(()=>[o.value?se("",!0):($(),J(Et,{key:0,color:"primary",variant:"tonal",class:"mb-4"},{default:h(()=>[...m[6]||(m[6]=[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)])]),_:1})),f(an,{title:"Change Username",usecols:!1},{default:h(()=>[f(Qe,{modelValue:c.value.username,"onUpdate:modelValue":m[0]||(m[0]=v=>c.value.username=v),disabled:!o.value,label:"Fill in your username"},null,8,["modelValue","disabled"]),f(te,{disabled:!o.value,color:"primary",class:"mt-2",onClick:m[1]||(m[1]=v=>u())},{default:h(()=>[...m[7]||(m[7]=[k(" Change username ",-1)])]),_:1},8,["disabled"])]),_:1}),f(pt),f(an,{title:"Change Password",usecols:!1},{default:h(()=>[f(Qe,{modelValue:c.value.oldPassword,"onUpdate:modelValue":m[2]||(m[2]=v=>c.value.oldPassword=v),disabled:!o.value,placeholder:"Old password",type:"password",label:"Old Password",class:"mb-3"},null,8,["modelValue","disabled"]),f(Qe,{modelValue:c.value.newPassword,"onUpdate:modelValue":m[3]||(m[3]=v=>c.value.newPassword=v),disabled:!o.value,placeholder:"New password",type:"password",label:"New Password",class:"mb-3"},null,8,["modelValue","disabled"]),f(Qe,{modelValue:c.value.repeatPassword,"onUpdate:modelValue":m[4]||(m[4]=v=>c.value.repeatPassword=v),disabled:!o.value,placeholder:"Repeat new password",type:"password",label:"Repeat New Password",class:"mb-3"},null,8,["modelValue","disabled"]),f(te,{disabled:!o.value,color:"primary",onClick:m[5]||(m[5]=v=>d())},{default:h(()=>[...m[8]||(m[8]=[k(" Change password ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1}))}}),wse=Ae({__name:"ServerProtectionSettings",setup(e){const t=ks(),n=bt(),r=Zr(),s=Gs.serverProtection,i=q(""),a=q(!1),o=q(!1),l=q(),c=q(!1),u=q(-1),d=q(14);async function p(){const w=await Ln.getSettings();a.value=w.server.loginRequired,o.value=w.server.registration,i.value=w.connection?.clientIp??"127.0.0.1";const _=await Ln.getSettingsSensitive();l.value=_.credentials.jwtExpiresIn,c.value=_.credentials.refreshTokenAttempts!==-1,u.value=_.credentials.refreshTokenAttempts,d.value=_.credentials.refreshTokenExpiry/24/3600}ot(async()=>{await p()});function m(){c.value||(u.value=-1)}async function v(){const w=a.value;!w&&!confirm("Disabling login will expose your server. Continue?")||(await Ln.updateLoginRequiredSettings(w),await r.logout(!0),await r.checkAuthenticationRequirements(),w?await t.push({name:xt.Login}):await t.push({name:xt.Home}),n.info("Login Required settings updated"))}async function g(){await Ln.updateRegistrationEnabledSettings(o.value),await r.checkAuthenticationRequirements(),n.info("Registration settings updated")}async function b(){l.value=3600,c.value=!1,u.value=-1,d.value=14,await y(),n.info("Login expiry settings reset to default")}async function y(){if(l.value=Number.parseInt((l.value??"")?.toString()),u.value=Number.parseInt((u.value??"").toString()),!l.value||l.value<120||l.value>7200)throw new Error("JWT Expiry must be between 2 and 120 minutes");if(c.value||(u.value=-1),c.value&&(u.value<1||u.value>50))throw new Error("Refresh Token Attempts must be between 1 and 50");if(d.value<1||d.value>30)throw new Error("Refresh Token Expiry must be between 1 and 30 days");await Ln.updateCredentialSettings(l.value,u.value,d.value*24*3600),n.info("Login expiry settings updated")}return(w,_)=>($(),J($e,null,{default:h(()=>[f(Ks,{icon:Q(s).icon,title:Q(s).title},null,8,["icon","title"]),f(Xe,null,{default:h(()=>[f(an,{usecols:!1,title:"Login and registration"},{default:h(()=>[f(it,null,{default:h(()=>[f(Be,{cols:"4",lg:"3",sm:"12",xl:"2"},{default:h(()=>[f(Yt,{modelValue:a.value,"onUpdate:modelValue":_[0]||(_[0]=T=>a.value=T),label:"Require Login",onChange:v},null,8,["modelValue"])]),_:1}),f(Be,{cols:"4",lg:"3",sm:"12",xl:"2"},{default:h(()=>[f(Yt,{modelValue:o.value,"onUpdate:modelValue":_[1]||(_[1]=T=>o.value=T),label:"Enable Registration",onChange:g},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),f(pt),f(an,{usecols:!1,title:"Login expiry settings (advanced)"},{default:h(()=>[f(Et,{class:"mb-6",color:"secondary"},{default:h(()=>[f(j,null,{default:h(()=>[..._[9]||(_[9]=[k("info",-1)])]),_:1}),_[10]||(_[10]=k("   Be cautious, setting the wrong expiry could make you lose access to the server or make your user experience highly degraded! ",-1))]),_:1}),f(it,null,{default:h(()=>[f(Be,{cols:"4",lg:"3",sm:"12",xl:"2"},{default:h(()=>[f(Qe,{modelValue:l.value,"onUpdate:modelValue":_[2]||(_[2]=T=>l.value=T),rules:[T=>!!T&&T>=120&&T<=7200],label:"JWT Expiry (seconds)"},null,8,["modelValue","rules"])]),_:1})]),_:1}),f(it,null,{default:h(()=>[f(Be,{cols:"4",lg:"3",sm:"12",xl:"2"},{default:h(()=>[f(Yt,{modelValue:c.value,"onUpdate:modelValue":_[3]||(_[3]=T=>c.value=T),label:"Enable Refresh Token Attempts",onChange:_[4]||(_[4]=T=>m())},null,8,["modelValue"])]),_:1}),f(Be,{cols:"4",lg:"3",sm:"12",xl:"2"},{default:h(()=>[f(Qe,{modelValue:u.value,"onUpdate:modelValue":_[5]||(_[5]=T=>u.value=T),disabled:!c.value,rules:[T=>!!T&&T>=1],label:"Refresh Token Attempts (disabled: -1, range: 1 to 50)",type:"number"},null,8,["modelValue","disabled","rules"])]),_:1}),f(Be,{cols:"4",lg:"3",sm:"12",xl:"2"},{default:h(()=>[f(Qe,{modelValue:d.value,"onUpdate:modelValue":_[6]||(_[6]=T=>d.value=T),rules:[T=>!!T&&T>=1&&T<=30],label:"Refresh Token Expiry (days)"},null,8,["modelValue","rules"])]),_:1})]),_:1}),f(it,null,{default:h(()=>[f(Be,{cols:"4",lg:"3",sm:"12",xl:"2"},{default:h(()=>[f(te,{color:"primary",onClick:_[7]||(_[7]=T=>y())},{default:h(()=>[..._[11]||(_[11]=[k(" save login expiry settings ",-1)])]),_:1})]),_:1}),f(Be,{cols:"4",lg:"3",sm:"12",xl:"2"},{default:h(()=>[f(te,{color:"default",onClick:_[8]||(_[8]=T=>b())},{default:h(()=>[..._[12]||(_[12]=[k(" reset to default ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}}),gO="0.1.0";var fd={exports:{}},dh,Ak;function Yp(){if(Ak)return dh;Ak=1;const e="2.0.0",t=256,n=Number.MAX_SAFE_INTEGER||9007199254740991,r=16,s=t-6;return dh={MAX_LENGTH:t,MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:s,MAX_SAFE_INTEGER:n,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},dh}var fh,Ok;function Jp(){if(Ok)return fh;Ok=1;var e={};return fh=typeof process=="object"&&e&&e.NODE_DEBUG&&/\bsemver\b/i.test(e.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{},fh}var Dk;function Bc(){return Dk||(Dk=1,(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:s}=Yp(),i=Jp();t=e.exports={};const a=t.re=[],o=t.safeRe=[],l=t.src=[],c=t.safeSrc=[],u=t.t={};let d=0;const p="[a-zA-Z0-9-]",m=[["\\s",1],["\\d",s],[p,r]],v=b=>{for(const[y,w]of m)b=b.split(`${y}*`).join(`${y}{0,${w}}`).split(`${y}+`).join(`${y}{1,${w}}`);return b},g=(b,y,w)=>{const _=v(y),T=d++;i(b,T,y),u[b]=T,l[T]=y,c[T]=_,a[T]=new RegExp(y,w?"g":void 0),o[T]=new RegExp(_,w?"g":void 0)};g("NUMERICIDENTIFIER","0|[1-9]\\d*"),g("NUMERICIDENTIFIERLOOSE","\\d+"),g("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),g("MAINVERSION",`(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})`),g("MAINVERSIONLOOSE",`(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})`),g("PRERELEASEIDENTIFIER",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIER]})`),g("PRERELEASEIDENTIFIERLOOSE",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIERLOOSE]})`),g("PRERELEASE",`(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`),g("PRERELEASELOOSE",`(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`),g("BUILDIDENTIFIER",`${p}+`),g("BUILD",`(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`),g("FULLPLAIN",`v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`),g("FULL",`^${l[u.FULLPLAIN]}$`),g("LOOSEPLAIN",`[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`),g("LOOSE",`^${l[u.LOOSEPLAIN]}$`),g("GTLT","((?:<|>)?=?)"),g("XRANGEIDENTIFIERLOOSE",`${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),g("XRANGEIDENTIFIER",`${l[u.NUMERICIDENTIFIER]}|x|X|\\*`),g("XRANGEPLAIN",`[v=\\s]*(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?)?)?`),g("XRANGEPLAINLOOSE",`[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?)?)?`),g("XRANGE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`),g("XRANGELOOSE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`),g("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),g("COERCE",`${l[u.COERCEPLAIN]}(?:$|[^\\d])`),g("COERCEFULL",l[u.COERCEPLAIN]+`(?:${l[u.PRERELEASE]})?(?:${l[u.BUILD]})?(?:$|[^\\d])`),g("COERCERTL",l[u.COERCE],!0),g("COERCERTLFULL",l[u.COERCEFULL],!0),g("LONETILDE","(?:~>?)"),g("TILDETRIM",`(\\s*)${l[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",g("TILDE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`),g("TILDELOOSE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`),g("LONECARET","(?:\\^)"),g("CARETTRIM",`(\\s*)${l[u.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",g("CARET",`^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`),g("CARETLOOSE",`^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`),g("COMPARATORLOOSE",`^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`),g("COMPARATOR",`^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`),g("COMPARATORTRIM",`(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",g("HYPHENRANGE",`^\\s*(${l[u.XRANGEPLAIN]})\\s+-\\s+(${l[u.XRANGEPLAIN]})\\s*$`),g("HYPHENRANGELOOSE",`^\\s*(${l[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[u.XRANGEPLAINLOOSE]})\\s*$`),g("STAR","(<|>)?=?\\s*\\*"),g("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),g("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(fd,fd.exports)),fd.exports}var ph,Lk;function I1(){if(Lk)return ph;Lk=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return ph=r=>r?typeof r!="object"?e:r:t,ph}var mh,$k;function vO(){if($k)return mh;$k=1;const e=/^[0-9]+$/,t=(r,s)=>{if(typeof r=="number"&&typeof s=="number")return r===s?0:r<s?-1:1;const i=e.test(r),a=e.test(s);return i&&a&&(r=+r,s=+s),r===s?0:i&&!a?-1:a&&!i?1:r<s?-1:1};return mh={compareIdentifiers:t,rcompareIdentifiers:(r,s)=>t(s,r)},mh}var hh,Fk;function ir(){if(Fk)return hh;Fk=1;const e=Jp(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=Yp(),{safeRe:r,t:s}=Bc(),i=I1(),{compareIdentifiers:a}=vO();class o{constructor(c,u){if(u=i(u),c instanceof o){if(c.loose===!!u.loose&&c.includePrerelease===!!u.includePrerelease)return c;c=c.version}else if(typeof c!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof c}".`);if(c.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",c,u),this.options=u,this.loose=!!u.loose,this.includePrerelease=!!u.includePrerelease;const d=c.trim().match(u.loose?r[s.LOOSE]:r[s.FULL]);if(!d)throw new TypeError(`Invalid Version: ${c}`);if(this.raw=c,this.major=+d[1],this.minor=+d[2],this.patch=+d[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");d[4]?this.prerelease=d[4].split(".").map(p=>{if(/^[0-9]+$/.test(p)){const m=+p;if(m>=0&&m<n)return m}return p}):this.prerelease=[],this.build=d[5]?d[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(c){if(e("SemVer.compare",this.version,this.options,c),!(c instanceof o)){if(typeof c=="string"&&c===this.version)return 0;c=new o(c,this.options)}return c.version===this.version?0:this.compareMain(c)||this.comparePre(c)}compareMain(c){return c instanceof o||(c=new o(c,this.options)),this.major<c.major?-1:this.major>c.major?1:this.minor<c.minor?-1:this.minor>c.minor?1:this.patch<c.patch?-1:this.patch>c.patch?1:0}comparePre(c){if(c instanceof o||(c=new o(c,this.options)),this.prerelease.length&&!c.prerelease.length)return-1;if(!this.prerelease.length&&c.prerelease.length)return 1;if(!this.prerelease.length&&!c.prerelease.length)return 0;let u=0;do{const d=this.prerelease[u],p=c.prerelease[u];if(e("prerelease compare",u,d,p),d===void 0&&p===void 0)return 0;if(p===void 0)return 1;if(d===void 0)return-1;if(d===p)continue;return a(d,p)}while(++u)}compareBuild(c){c instanceof o||(c=new o(c,this.options));let u=0;do{const d=this.build[u],p=c.build[u];if(e("build compare",u,d,p),d===void 0&&p===void 0)return 0;if(p===void 0)return 1;if(d===void 0)return-1;if(d===p)continue;return a(d,p)}while(++u)}inc(c,u,d){if(c.startsWith("pre")){if(!u&&d===!1)throw new Error("invalid increment argument: identifier is empty");if(u){const p=`-${u}`.match(this.options.loose?r[s.PRERELEASELOOSE]:r[s.PRERELEASE]);if(!p||p[1]!==u)throw new Error(`invalid identifier: ${u}`)}}switch(c){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",u,d);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",u,d);break;case"prepatch":this.prerelease.length=0,this.inc("patch",u,d),this.inc("pre",u,d);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",u,d),this.inc("pre",u,d);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 p=Number(d)?1:0;if(this.prerelease.length===0)this.prerelease=[p];else{let m=this.prerelease.length;for(;--m>=0;)typeof this.prerelease[m]=="number"&&(this.prerelease[m]++,m=-2);if(m===-1){if(u===this.prerelease.join(".")&&d===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(p)}}if(u){let m=[u,p];d===!1&&(m=[u]),a(this.prerelease[0],u)===0?isNaN(this.prerelease[1])&&(this.prerelease=m):this.prerelease=m}break}default:throw new Error(`invalid increment argument: ${c}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return hh=o,hh}var gh,Nk;function jl(){if(Nk)return gh;Nk=1;const e=ir();return gh=(n,r,s=!1)=>{if(n instanceof e)return n;try{return new e(n,r)}catch(i){if(!s)return null;throw i}},gh}var vh,Mk;function _se(){if(Mk)return vh;Mk=1;const e=jl();return vh=(n,r)=>{const s=e(n,r);return s?s.version:null},vh}var yh,Vk;function kse(){if(Vk)return yh;Vk=1;const e=jl();return yh=(n,r)=>{const s=e(n.trim().replace(/^[=v]+/,""),r);return s?s.version:null},yh}var bh,Bk;function xse(){if(Bk)return bh;Bk=1;const e=ir();return bh=(n,r,s,i,a)=>{typeof s=="string"&&(a=i,i=s,s=void 0);try{return new e(n instanceof e?n.version:n,s).inc(r,i,a).version}catch{return null}},bh}var Sh,Uk;function Ese(){if(Uk)return Sh;Uk=1;const e=jl();return Sh=(n,r)=>{const s=e(n,null,!0),i=e(r,null,!0),a=s.compare(i);if(a===0)return null;const o=a>0,l=o?s:i,c=o?i:s,u=!!l.prerelease.length;if(!!c.prerelease.length&&!u){if(!c.patch&&!c.minor)return"major";if(c.compareMain(l)===0)return c.minor&&!c.patch?"minor":"patch"}const p=u?"pre":"";return s.major!==i.major?p+"major":s.minor!==i.minor?p+"minor":s.patch!==i.patch?p+"patch":"prerelease"},Sh}var wh,zk;function Cse(){if(zk)return wh;zk=1;const e=ir();return wh=(n,r)=>new e(n,r).major,wh}var _h,jk;function Tse(){if(jk)return _h;jk=1;const e=ir();return _h=(n,r)=>new e(n,r).minor,_h}var kh,Hk;function Ise(){if(Hk)return kh;Hk=1;const e=ir();return kh=(n,r)=>new e(n,r).patch,kh}var xh,qk;function Rse(){if(qk)return xh;qk=1;const e=jl();return xh=(n,r)=>{const s=e(n,r);return s&&s.prerelease.length?s.prerelease:null},xh}var Eh,Wk;function xs(){if(Wk)return Eh;Wk=1;const e=ir();return Eh=(n,r,s)=>new e(n,s).compare(new e(r,s)),Eh}var Ch,Gk;function Pse(){if(Gk)return Ch;Gk=1;const e=xs();return Ch=(n,r,s)=>e(r,n,s),Ch}var Th,Kk;function Ase(){if(Kk)return Th;Kk=1;const e=xs();return Th=(n,r)=>e(n,r,!0),Th}var Ih,Yk;function R1(){if(Yk)return Ih;Yk=1;const e=ir();return Ih=(n,r,s)=>{const i=new e(n,s),a=new e(r,s);return i.compare(a)||i.compareBuild(a)},Ih}var Rh,Jk;function Ose(){if(Jk)return Rh;Jk=1;const e=R1();return Rh=(n,r)=>n.sort((s,i)=>e(s,i,r)),Rh}var Ph,Xk;function Dse(){if(Xk)return Ph;Xk=1;const e=R1();return Ph=(n,r)=>n.sort((s,i)=>e(i,s,r)),Ph}var Ah,Qk;function Xp(){if(Qk)return Ah;Qk=1;const e=xs();return Ah=(n,r,s)=>e(n,r,s)>0,Ah}var Oh,Zk;function P1(){if(Zk)return Oh;Zk=1;const e=xs();return Oh=(n,r,s)=>e(n,r,s)<0,Oh}var Dh,ex;function yO(){if(ex)return Dh;ex=1;const e=xs();return Dh=(n,r,s)=>e(n,r,s)===0,Dh}var Lh,tx;function bO(){if(tx)return Lh;tx=1;const e=xs();return Lh=(n,r,s)=>e(n,r,s)!==0,Lh}var $h,nx;function A1(){if(nx)return $h;nx=1;const e=xs();return $h=(n,r,s)=>e(n,r,s)>=0,$h}var Fh,rx;function O1(){if(rx)return Fh;rx=1;const e=xs();return Fh=(n,r,s)=>e(n,r,s)<=0,Fh}var Nh,sx;function SO(){if(sx)return Nh;sx=1;const e=yO(),t=bO(),n=Xp(),r=A1(),s=P1(),i=O1();return Nh=(o,l,c,u)=>{switch(l){case"===":return typeof o=="object"&&(o=o.version),typeof c=="object"&&(c=c.version),o===c;case"!==":return typeof o=="object"&&(o=o.version),typeof c=="object"&&(c=c.version),o!==c;case"":case"=":case"==":return e(o,c,u);case"!=":return t(o,c,u);case">":return n(o,c,u);case">=":return r(o,c,u);case"<":return s(o,c,u);case"<=":return i(o,c,u);default:throw new TypeError(`Invalid operator: ${l}`)}},Nh}var Mh,ix;function Lse(){if(ix)return Mh;ix=1;const e=ir(),t=jl(),{safeRe:n,t:r}=Bc();return Mh=(i,a)=>{if(i instanceof e)return i;if(typeof i=="number"&&(i=String(i)),typeof i!="string")return null;a=a||{};let o=null;if(!a.rtl)o=i.match(a.includePrerelease?n[r.COERCEFULL]:n[r.COERCE]);else{const m=a.includePrerelease?n[r.COERCERTLFULL]:n[r.COERCERTL];let v;for(;(v=m.exec(i))&&(!o||o.index+o[0].length!==i.length);)(!o||v.index+v[0].length!==o.index+o[0].length)&&(o=v),m.lastIndex=v.index+v[1].length+v[2].length;m.lastIndex=-1}if(o===null)return null;const l=o[2],c=o[3]||"0",u=o[4]||"0",d=a.includePrerelease&&o[5]?`-${o[5]}`:"",p=a.includePrerelease&&o[6]?`+${o[6]}`:"";return t(`${l}.${c}.${u}${d}${p}`,a)},Mh}var Vh,ax;function $se(){if(ax)return Vh;ax=1;class e{constructor(){this.max=1e3,this.map=new Map}get(n){const r=this.map.get(n);if(r!==void 0)return this.map.delete(n),this.map.set(n,r),r}delete(n){return this.map.delete(n)}set(n,r){if(!this.delete(n)&&r!==void 0){if(this.map.size>=this.max){const i=this.map.keys().next().value;this.delete(i)}this.map.set(n,r)}return this}}return Vh=e,Vh}var Bh,ox;function Es(){if(ox)return Bh;ox=1;const e=/\s+/g;class t{constructor(B,M){if(M=s(M),B instanceof t)return B.loose===!!M.loose&&B.includePrerelease===!!M.includePrerelease?B:new t(B.raw,M);if(B instanceof i)return this.raw=B.value,this.set=[[B]],this.formatted=void 0,this;if(this.options=M,this.loose=!!M.loose,this.includePrerelease=!!M.includePrerelease,this.raw=B.trim().replace(e," "),this.set=this.raw.split("||").map(N=>this.parseRange(N.trim())).filter(N=>N.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const N=this.set[0];if(this.set=this.set.filter(D=>!g(D[0])),this.set.length===0)this.set=[N];else if(this.set.length>1){for(const D of this.set)if(D.length===1&&b(D[0])){this.set=[D];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let B=0;B<this.set.length;B++){B>0&&(this.formatted+="||");const M=this.set[B];for(let N=0;N<M.length;N++)N>0&&(this.formatted+=" "),this.formatted+=M[N].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(B){const N=((this.options.includePrerelease&&m)|(this.options.loose&&v))+":"+B,D=r.get(N);if(D)return D;const W=this.options.loose,z=W?l[c.HYPHENRANGELOOSE]:l[c.HYPHENRANGE];B=B.replace(z,L(this.options.includePrerelease)),a("hyphen replace",B),B=B.replace(l[c.COMPARATORTRIM],u),a("comparator trim",B),B=B.replace(l[c.TILDETRIM],d),a("tilde trim",B),B=B.replace(l[c.CARETTRIM],p),a("caret trim",B);let K=B.split(" ").map(de=>w(de,this.options)).join(" ").split(/\s+/).map(de=>O(de,this.options));W&&(K=K.filter(de=>(a("loose invalid filter",de,this.options),!!de.match(l[c.COMPARATORLOOSE])))),a("range list",K);const H=new Map,re=K.map(de=>new i(de,this.options));for(const de of re){if(g(de))return[de];H.set(de.value,de)}H.size>1&&H.has("")&&H.delete("");const ae=[...H.values()];return r.set(N,ae),ae}intersects(B,M){if(!(B instanceof t))throw new TypeError("a Range is required");return this.set.some(N=>y(N,M)&&B.set.some(D=>y(D,M)&&N.every(W=>D.every(z=>W.intersects(z,M)))))}test(B){if(!B)return!1;if(typeof B=="string")try{B=new o(B,this.options)}catch{return!1}for(let M=0;M<this.set.length;M++)if(V(this.set[M],B,this.options))return!0;return!1}}Bh=t;const n=$se(),r=new n,s=I1(),i=Qp(),a=Jp(),o=ir(),{safeRe:l,t:c,comparatorTrimReplace:u,tildeTrimReplace:d,caretTrimReplace:p}=Bc(),{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:v}=Yp(),g=F=>F.value==="<0.0.0-0",b=F=>F.value==="",y=(F,B)=>{let M=!0;const N=F.slice();let D=N.pop();for(;M&&N.length;)M=N.every(W=>D.intersects(W,B)),D=N.pop();return M},w=(F,B)=>(F=F.replace(l[c.BUILD],""),a("comp",F,B),F=x(F,B),a("caret",F),F=T(F,B),a("tildes",F),F=E(F,B),a("xrange",F),F=I(F,B),a("stars",F),F),_=F=>!F||F.toLowerCase()==="x"||F==="*",T=(F,B)=>F.trim().split(/\s+/).map(M=>P(M,B)).join(" "),P=(F,B)=>{const M=B.loose?l[c.TILDELOOSE]:l[c.TILDE];return F.replace(M,(N,D,W,z,K)=>{a("tilde",F,N,D,W,z,K);let H;return _(D)?H="":_(W)?H=`>=${D}.0.0 <${+D+1}.0.0-0`:_(z)?H=`>=${D}.${W}.0 <${D}.${+W+1}.0-0`:K?(a("replaceTilde pr",K),H=`>=${D}.${W}.${z}-${K} <${D}.${+W+1}.0-0`):H=`>=${D}.${W}.${z} <${D}.${+W+1}.0-0`,a("tilde return",H),H})},x=(F,B)=>F.trim().split(/\s+/).map(M=>C(M,B)).join(" "),C=(F,B)=>{a("caret",F,B);const M=B.loose?l[c.CARETLOOSE]:l[c.CARET],N=B.includePrerelease?"-0":"";return F.replace(M,(D,W,z,K,H)=>{a("caret",F,D,W,z,K,H);let re;return _(W)?re="":_(z)?re=`>=${W}.0.0${N} <${+W+1}.0.0-0`:_(K)?W==="0"?re=`>=${W}.${z}.0${N} <${W}.${+z+1}.0-0`:re=`>=${W}.${z}.0${N} <${+W+1}.0.0-0`:H?(a("replaceCaret pr",H),W==="0"?z==="0"?re=`>=${W}.${z}.${K}-${H} <${W}.${z}.${+K+1}-0`:re=`>=${W}.${z}.${K}-${H} <${W}.${+z+1}.0-0`:re=`>=${W}.${z}.${K}-${H} <${+W+1}.0.0-0`):(a("no pr"),W==="0"?z==="0"?re=`>=${W}.${z}.${K}${N} <${W}.${z}.${+K+1}-0`:re=`>=${W}.${z}.${K}${N} <${W}.${+z+1}.0-0`:re=`>=${W}.${z}.${K} <${+W+1}.0.0-0`),a("caret return",re),re})},E=(F,B)=>(a("replaceXRanges",F,B),F.split(/\s+/).map(M=>R(M,B)).join(" ")),R=(F,B)=>{F=F.trim();const M=B.loose?l[c.XRANGELOOSE]:l[c.XRANGE];return F.replace(M,(N,D,W,z,K,H)=>{a("xRange",F,N,D,W,z,K,H);const re=_(W),ae=re||_(z),de=ae||_(K),De=de;return D==="="&&De&&(D=""),H=B.includePrerelease?"-0":"",re?D===">"||D==="<"?N="<0.0.0-0":N="*":D&&De?(ae&&(z=0),K=0,D===">"?(D=">=",ae?(W=+W+1,z=0,K=0):(z=+z+1,K=0)):D==="<="&&(D="<",ae?W=+W+1:z=+z+1),D==="<"&&(H="-0"),N=`${D+W}.${z}.${K}${H}`):ae?N=`>=${W}.0.0${H} <${+W+1}.0.0-0`:de&&(N=`>=${W}.${z}.0${H} <${W}.${+z+1}.0-0`),a("xRange return",N),N})},I=(F,B)=>(a("replaceStars",F,B),F.trim().replace(l[c.STAR],"")),O=(F,B)=>(a("replaceGTE0",F,B),F.trim().replace(l[B.includePrerelease?c.GTE0PRE:c.GTE0],"")),L=F=>(B,M,N,D,W,z,K,H,re,ae,de,De)=>(_(N)?M="":_(D)?M=`>=${N}.0.0${F?"-0":""}`:_(W)?M=`>=${N}.${D}.0${F?"-0":""}`:z?M=`>=${M}`:M=`>=${M}${F?"-0":""}`,_(re)?H="":_(ae)?H=`<${+re+1}.0.0-0`:_(de)?H=`<${re}.${+ae+1}.0-0`:De?H=`<=${re}.${ae}.${de}-${De}`:F?H=`<${re}.${ae}.${+de+1}-0`:H=`<=${H}`,`${M} ${H}`.trim()),V=(F,B,M)=>{for(let N=0;N<F.length;N++)if(!F[N].test(B))return!1;if(B.prerelease.length&&!M.includePrerelease){for(let N=0;N<F.length;N++)if(a(F[N].semver),F[N].semver!==i.ANY&&F[N].semver.prerelease.length>0){const D=F[N].semver;if(D.major===B.major&&D.minor===B.minor&&D.patch===B.patch)return!0}return!1}return!0};return Bh}var Uh,lx;function Qp(){if(lx)return Uh;lx=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(u,d){if(d=n(d),u instanceof t){if(u.loose===!!d.loose)return u;u=u.value}u=u.trim().split(/\s+/).join(" "),a("comparator",u,d),this.options=d,this.loose=!!d.loose,this.parse(u),this.semver===e?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(u){const d=this.options.loose?r[s.COMPARATORLOOSE]:r[s.COMPARATOR],p=u.match(d);if(!p)throw new TypeError(`Invalid comparator: ${u}`);this.operator=p[1]!==void 0?p[1]:"",this.operator==="="&&(this.operator=""),p[2]?this.semver=new o(p[2],this.options.loose):this.semver=e}toString(){return this.value}test(u){if(a("Comparator.test",u,this.options.loose),this.semver===e||u===e)return!0;if(typeof u=="string")try{u=new o(u,this.options)}catch{return!1}return i(u,this.operator,this.semver,this.options)}intersects(u,d){if(!(u instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new l(u.value,d).test(this.value):u.operator===""?u.value===""?!0:new l(this.value,d).test(u.semver):(d=n(d),d.includePrerelease&&(this.value==="<0.0.0-0"||u.value==="<0.0.0-0")||!d.includePrerelease&&(this.value.startsWith("<0.0.0")||u.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&u.operator.startsWith(">")||this.operator.startsWith("<")&&u.operator.startsWith("<")||this.semver.version===u.semver.version&&this.operator.includes("=")&&u.operator.includes("=")||i(this.semver,"<",u.semver,d)&&this.operator.startsWith(">")&&u.operator.startsWith("<")||i(this.semver,">",u.semver,d)&&this.operator.startsWith("<")&&u.operator.startsWith(">")))}}Uh=t;const n=I1(),{safeRe:r,t:s}=Bc(),i=SO(),a=Jp(),o=ir(),l=Es();return Uh}var zh,ux;function Zp(){if(ux)return zh;ux=1;const e=Es();return zh=(n,r,s)=>{try{r=new e(r,s)}catch{return!1}return r.test(n)},zh}var jh,cx;function Fse(){if(cx)return jh;cx=1;const e=Es();return jh=(n,r)=>new e(n,r).set.map(s=>s.map(i=>i.value).join(" ").trim().split(" ")),jh}var Hh,dx;function Nse(){if(dx)return Hh;dx=1;const e=ir(),t=Es();return Hh=(r,s,i)=>{let a=null,o=null,l=null;try{l=new t(s,i)}catch{return null}return r.forEach(c=>{l.test(c)&&(!a||o.compare(c)===-1)&&(a=c,o=new e(a,i))}),a},Hh}var qh,fx;function Mse(){if(fx)return qh;fx=1;const e=ir(),t=Es();return qh=(r,s,i)=>{let a=null,o=null,l=null;try{l=new t(s,i)}catch{return null}return r.forEach(c=>{l.test(c)&&(!a||o.compare(c)===1)&&(a=c,o=new e(a,i))}),a},qh}var Wh,px;function Vse(){if(px)return Wh;px=1;const e=ir(),t=Es(),n=Xp();return Wh=(s,i)=>{s=new t(s,i);let a=new e("0.0.0");if(s.test(a)||(a=new e("0.0.0-0"),s.test(a)))return a;a=null;for(let o=0;o<s.set.length;++o){const l=s.set[o];let c=null;l.forEach(u=>{const d=new e(u.semver.version);switch(u.operator){case">":d.prerelease.length===0?d.patch++:d.prerelease.push(0),d.raw=d.format();case"":case">=":(!c||n(d,c))&&(c=d);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${u.operator}`)}}),c&&(!a||n(a,c))&&(a=c)}return a&&s.test(a)?a:null},Wh}var Gh,mx;function Bse(){if(mx)return Gh;mx=1;const e=Es();return Gh=(n,r)=>{try{return new e(n,r).range||"*"}catch{return null}},Gh}var Kh,hx;function D1(){if(hx)return Kh;hx=1;const e=ir(),t=Qp(),{ANY:n}=t,r=Es(),s=Zp(),i=Xp(),a=P1(),o=O1(),l=A1();return Kh=(u,d,p,m)=>{u=new e(u,m),d=new r(d,m);let v,g,b,y,w;switch(p){case">":v=i,g=o,b=a,y=">",w=">=";break;case"<":v=a,g=l,b=i,y="<",w="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(u,d,m))return!1;for(let _=0;_<d.set.length;++_){const T=d.set[_];let P=null,x=null;if(T.forEach(C=>{C.semver===n&&(C=new t(">=0.0.0")),P=P||C,x=x||C,v(C.semver,P.semver,m)?P=C:b(C.semver,x.semver,m)&&(x=C)}),P.operator===y||P.operator===w||(!x.operator||x.operator===y)&&g(u,x.semver))return!1;if(x.operator===w&&b(u,x.semver))return!1}return!0},Kh}var Yh,gx;function Use(){if(gx)return Yh;gx=1;const e=D1();return Yh=(n,r,s)=>e(n,r,">",s),Yh}var Jh,vx;function zse(){if(vx)return Jh;vx=1;const e=D1();return Jh=(n,r,s)=>e(n,r,"<",s),Jh}var Xh,yx;function jse(){if(yx)return Xh;yx=1;const e=Es();return Xh=(n,r,s)=>(n=new e(n,s),r=new e(r,s),n.intersects(r,s)),Xh}var Qh,bx;function Hse(){if(bx)return Qh;bx=1;const e=Zp(),t=xs();return Qh=(n,r,s)=>{const i=[];let a=null,o=null;const l=n.sort((p,m)=>t(p,m,s));for(const p of l)e(p,r,s)?(o=p,a||(a=p)):(o&&i.push([a,o]),o=null,a=null);a&&i.push([a,null]);const c=[];for(const[p,m]of i)p===m?c.push(p):!m&&p===l[0]?c.push("*"):m?p===l[0]?c.push(`<=${m}`):c.push(`${p} - ${m}`):c.push(`>=${p}`);const u=c.join(" || "),d=typeof r.raw=="string"?r.raw:String(r);return u.length<d.length?u:r},Qh}var Zh,Sx;function qse(){if(Sx)return Zh;Sx=1;const e=Es(),t=Qp(),{ANY:n}=t,r=Zp(),s=xs(),i=(d,p,m={})=>{if(d===p)return!0;d=new e(d,m),p=new e(p,m);let v=!1;e:for(const g of d.set){for(const b of p.set){const y=l(g,b,m);if(v=v||y!==null,y)continue e}if(v)return!1}return!0},a=[new t(">=0.0.0-0")],o=[new t(">=0.0.0")],l=(d,p,m)=>{if(d===p)return!0;if(d.length===1&&d[0].semver===n){if(p.length===1&&p[0].semver===n)return!0;m.includePrerelease?d=a:d=o}if(p.length===1&&p[0].semver===n){if(m.includePrerelease)return!0;p=o}const v=new Set;let g,b;for(const E of d)E.operator===">"||E.operator===">="?g=c(g,E,m):E.operator==="<"||E.operator==="<="?b=u(b,E,m):v.add(E.semver);if(v.size>1)return null;let y;if(g&&b){if(y=s(g.semver,b.semver,m),y>0)return null;if(y===0&&(g.operator!==">="||b.operator!=="<="))return null}for(const E of v){if(g&&!r(E,String(g),m)||b&&!r(E,String(b),m))return null;for(const R of p)if(!r(E,String(R),m))return!1;return!0}let w,_,T,P,x=b&&!m.includePrerelease&&b.semver.prerelease.length?b.semver:!1,C=g&&!m.includePrerelease&&g.semver.prerelease.length?g.semver:!1;x&&x.prerelease.length===1&&b.operator==="<"&&x.prerelease[0]===0&&(x=!1);for(const E of p){if(P=P||E.operator===">"||E.operator===">=",T=T||E.operator==="<"||E.operator==="<=",g){if(C&&E.semver.prerelease&&E.semver.prerelease.length&&E.semver.major===C.major&&E.semver.minor===C.minor&&E.semver.patch===C.patch&&(C=!1),E.operator===">"||E.operator===">="){if(w=c(g,E,m),w===E&&w!==g)return!1}else if(g.operator===">="&&!r(g.semver,String(E),m))return!1}if(b){if(x&&E.semver.prerelease&&E.semver.prerelease.length&&E.semver.major===x.major&&E.semver.minor===x.minor&&E.semver.patch===x.patch&&(x=!1),E.operator==="<"||E.operator==="<="){if(_=u(b,E,m),_===E&&_!==b)return!1}else if(b.operator==="<="&&!r(b.semver,String(E),m))return!1}if(!E.operator&&(b||g)&&y!==0)return!1}return!(g&&T&&!b&&y!==0||b&&P&&!g&&y!==0||C||x)},c=(d,p,m)=>{if(!d)return p;const v=s(d.semver,p.semver,m);return v>0?d:v<0||p.operator===">"&&d.operator===">="?p:d},u=(d,p,m)=>{if(!d)return p;const v=s(d.semver,p.semver,m);return v<0?d:v>0||p.operator==="<"&&d.operator==="<="?p:d};return Zh=i,Zh}var eg,wx;function Wse(){if(wx)return eg;wx=1;const e=Bc(),t=Yp(),n=ir(),r=vO(),s=jl(),i=_se(),a=kse(),o=xse(),l=Ese(),c=Cse(),u=Tse(),d=Ise(),p=Rse(),m=xs(),v=Pse(),g=Ase(),b=R1(),y=Ose(),w=Dse(),_=Xp(),T=P1(),P=yO(),x=bO(),C=A1(),E=O1(),R=SO(),I=Lse(),O=Qp(),L=Es(),V=Zp(),F=Fse(),B=Nse(),M=Mse(),N=Vse(),D=Bse(),W=D1(),z=Use(),K=zse(),H=jse(),re=Hse(),ae=qse();return eg={parse:s,valid:i,clean:a,inc:o,diff:l,major:c,minor:u,patch:d,prerelease:p,compare:m,rcompare:v,compareLoose:g,compareBuild:b,sort:y,rsort:w,gt:_,lt:T,eq:P,neq:x,gte:C,lte:E,cmp:R,coerce:I,Comparator:O,Range:L,satisfies:V,toComparators:F,maxSatisfying:B,minSatisfying:M,minVersion:N,validRange:D,outside:W,gtr:z,ltr:K,intersects:H,simplifyRange:re,subset:ae,SemVer:n,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:r.compareIdentifiers,rcompareIdentifiers:r.rcompareIdentifiers},eg}var tu=Wse();const Gse={key:0},Kse={key:1},Yse={class:"mb-2"},Jse={class:"mt-3"},Xse=Ae({__name:"SoftwareUpgradeSettings",setup(e){const t=Gs.softwareUpgrade,n=q(""),r=q(!0),s=q(!1),i=q(!1),a=q(""),o=q(""),l=q(gO),c=q(),u=q(),d=q(),p=q(!1),m=q([]);ot(async()=>{await v();const R=await Hi.getVersion();a.value=R.version,o.value=R.monsterPi?.trim()||""});async function v(){r.value=!0,n.value="",s.value=!1;try{const R=await Hi.getGithubRateLimit();if(R.rate.remaining===0){const O=new Date(R.rate.reset).toLocaleTimeString(),L=R.rate.reset*1e3-Date.now(),V=Math.ceil(L/6e4);n.value=`Server has reached a rate limit of the Github API. This limit will be reset at ${O} (in ${V} minutes)`,r.value=!1,s.value=!0;return}}catch{r.value=!1;return}try{const R=await Hi.getClientReleases();c.value=R.current,u.value=R.minimum,m.value=R.releases}catch(R){n.value="An error occurred loading the releases: "+R.message}finally{r.value=!1}}const g=A(()=>m.value.filter(R=>{const I=tu.minor(R.tag_name)===tu.minor(u.value.tag_name),O=T(R),L=R.draft;return I&&(y()||p.value||!O)&&!L})),b=A(()=>y());function y(){const R=c.value;return T(R)}function w(R){return C(R)||!x(R,c.value)||P(R)}function _(R){const I=T(R)?`${R.tag_name}, unstable`:R.tag_name;return C(R)?`${I}, currently installed`:P(R)?`${I}, below minimum`:x(R,c.value)?I:`${I}, downgrade not allowed`}function T(R){return R?.tag_name?.length?R.prerelease||R.tag_name.includes("rc")||R.tag_name.includes("unstable"):!1}function P(R){return tu.compare(R.tag_name,u.value.tag_name)===-1}function x(R,I){if(!I)throw new Error("No current release is known, cannot compare.");return i.value?!0:tu.compare(R.tag_name,I.tag_name)!==-1&&tu.compare(R.tag_name,u.value.tag_name)!==-1}function C(R){return R.tag_name===c.value?.tag_name}async function E(R){confirm("Are you sure? This might cause breaking changes, if the server is outdated")&&(await Hi.updateClientDistGithub(R,i.value),location.reload())}return(R,I)=>($(),J($e,null,{default:h(()=>[f(Ks,{icon:Q(t).icon,title:Q(t).title},null,8,["icon","title"]),f(Xe,null,{default:h(()=>[f(an,{title:"Current versions in use",usecols:!1},{default:h(()=>[S("div",null,"Your server's version is: "+Y(a.value),1),S("div",null,"Your client's version is: "+Y(l.value),1),o.value?($(),pe("div",Gse," Your MonsterPi version is: "+Y(o.value),1)):($(),pe("div",Kse," MonsterPi: No MonsterPi distro was detected. "))]),_:1}),f(pt),f(an,{title:"Server upgrade",tooltip:"Please visit the installation documentation for instructions",usecols:!1},{default:h(()=>[...I[5]||(I[5]=[S("div",null,[k(" Please visit "),S("a",{href:"https://docs.fdm-monster.net/docs/installing/"}," the installation documentation "),k(" for instructions on how to upgrade the server. ")],-1)])]),_:1}),f(pt),f(an,{title:"Client upgrade",tooltip:"Upgrade the client webapp for quickly retrieving small fixes and features",usecols:!1},{default:h(()=>[I[12]||(I[12]=S("div",{class:"mb-3"},[k(" Please visit "),S("a",{href:"https://docs.fdm-monster.net/docs/configuration/updating_client_bundle"}," the installation documentation "),k(" for instructions on how to upgrade the client bundle. ")],-1)),I[13]||(I[13]=S("div",{class:"font-weight-bold mb-2"},"Select a release to upgrade to:",-1)),S("div",Yse," Minimum required version: "+Y(u.value?.tag_name),1),r.value?($(),J(Et,{key:0},{default:h(()=>[...I[6]||(I[6]=[k("Loading releases...",-1)])]),_:1})):se("",!0),!r.value&&!g.value?.length?($(),J(Et,{key:1},{default:h(()=>[...I[7]||(I[7]=[k(" No releases to show. ",-1)])]),_:1})):se("",!0),f(wne,{modelValue:d.value,"onUpdate:modelValue":I[0]||(I[0]=O=>d.value=O)},{default:h(()=>[($(!0),pe(ke,null,Ot(g.value,O=>($(),J(bne,{key:O.tag_name,disabled:w(O),label:_(O),value:O.tag_name},null,8,["disabled","label","value"]))),128))]),_:1},8,["modelValue"]),p.value?($(),J(Et,{key:2,color:"primary","max-width":"500px",class:"mb-3"},{default:h(()=>[...I[8]||(I[8]=[k(" You are viewing prereleases, please install such versions at your own risk! ",-1)])]),_:1})):se("",!0),f(Yt,{modelValue:i.value,"onUpdate:modelValue":I[1]||(I[1]=O=>i.value=O),label:"Allow downgrade"},null,8,["modelValue"]),f(Yt,{modelValue:p.value,"onUpdate:modelValue":I[2]||(I[2]=O=>p.value=O),disabled:b.value,label:b.value?"Show prerelease versions (Currently already on prerelease version)":"Show prerelease versions"},null,8,["modelValue","disabled","label"]),S("div",Jse,[f(te,{class:"mr-4",color:"secondary",onClick:I[3]||(I[3]=O=>v())},{default:h(()=>[...I[9]||(I[9]=[k(" Reload release version list ",-1)])]),_:1}),f(te,{disabled:!d.value?.length||d.value===c.value?.tag_name,color:"primary",variant:"flat",onClick:I[4]||(I[4]=O=>E(d.value))},{default:h(()=>[f(j,null,{default:h(()=>[...I[10]||(I[10]=[k("upgrade",-1)])]),_:1}),I[11]||(I[11]=k(" Upgrade/downgrade client ",-1))]),_:1},8,["disabled"])])]),_:1})]),_:1})]),_:1}))}}),Qse=Ae({__name:"DiagnosticsSettings",setup(e){const t=Gs.diagnostics,n=bt(),r=ws(),s=q(!1);ot(async()=>{await r.loadSettings(),s.value=r.serverSettings?.sentryDiagnosticsEnabled||!1});async function i(){await Ln.setSentryDiagnosticsSettings(s.value),w2(s.value)}async function a(){const c=`Test Error ${Date.now()} Sentry enabled: ${s.value}`;try{throw new Error(c)}catch(u){ds(u),n.openInfoMessage({title:"Test report was sent",subtitle:`Content: ${c}`})}}async function o(){await Lf.downloadLogDump()}async function l(){await Lf.clearLogFilesOlderThanWeek(),n.openInfoMessage({title:"Action success",subtitle:"Log files older than a week have been deleted"})}return(c,u)=>($(),J($e,null,{default:h(()=>[f(Ks,{icon:Q(t).icon,title:Q(t).title},null,8,["icon","title"]),f(Xe,null,{default:h(()=>[f(an,{title:"Remote Sentry diagnostic reports"},{default:h(()=>[f(Yt,{modelValue:s.value,"onUpdate:modelValue":u[0]||(u[0]=d=>s.value=d),label:"Enable remote Sentry diagnostic reports",onChange:i},null,8,["modelValue"]),f(te,{color:"secondary",onClick:u[1]||(u[1]=d=>a())},{default:h(()=>[f(j,{class:"pr-2"},{default:h(()=>[...u[4]||(u[4]=[k("bug_report",-1)])]),_:1}),u[5]||(u[5]=k(" Test Error ",-1))]),_:1})]),_:1}),f(pt),f(an,{usecols:!1,title:"Download a .zip file containing all logs from the server"},{default:h(()=>[f(it,null,{default:h(()=>[f(Be,{cols:"3"},{default:h(()=>[f(te,{color:"primary",onClick:u[2]||(u[2]=d=>o())},{default:h(()=>[f(j,null,{default:h(()=>[...u[6]||(u[6]=[k("download",-1)])]),_:1}),u[7]||(u[7]=k(" Download Log Files (.zip) ",-1))]),_:1})]),_:1})]),_:1})]),_:1}),f(pt),f(an,{title:"Clear log files"},{default:h(()=>[f(te,{color:"default",onClick:u[3]||(u[3]=d=>l())},{default:h(()=>[f(j,null,{default:h(()=>[...u[8]||(u[8]=[k("download",-1)])]),_:1}),u[9]||(u[9]=k(" Clear log files older than a week ",-1))]),_:1})]),_:1})]),_:1})]),_:1}))}}),Zse={class:"d-flex align-center justify-space-between"},eie={key:0,class:"text-caption text-medium-emphasis"},tie={class:"text-body-2"},nie={class:"text-caption text-medium-emphasis"},rie={key:0,class:"text-body-2"},sie={class:"text-caption text-medium-emphasis"},iie={key:1,class:"text-medium-emphasis"},aie={key:0,class:"progress-container"},oie={class:"text-caption font-weight-bold"},lie={key:1,class:"text-medium-emphasis"},uie={key:0,class:"text-body-2"},cie={key:1,class:"text-medium-emphasis"},die={class:"d-flex align-center"},fie={class:"text-body-2 font-weight-medium"},pie={class:"text-caption text-medium-emphasis"},mie={class:"d-flex align-center"},hie={class:"text-body-2 font-weight-medium"},gie={key:0,class:"text-caption text-medium-emphasis"},vie={key:1,class:"text-medium-emphasis"},yie={key:0,class:"filament-info"},bie={key:1,class:"text-caption text-medium-emphasis mt-1"},Sie={key:1,class:"text-medium-emphasis"},wie=Ae({__name:"PrintJobs",setup(e){const t=q([]),n=q(!1),r=q(1),s=q(25),i=q(0),{selectedTags:a,selectedPrinterTypes:o,tags:l,tagsWithPrinters:c,loadTags:u}=Vc(),d=q({searchPrinter:"",searchFile:"",startDate:"",endDate:"",page:1,pageSize:25}),p=ns(),m=At(),v=A(()=>[d.value.searchPrinter,d.value.searchFile].filter(Boolean).join(" ")),g=A(()=>{let L=t.value;return a.value.length>0&&(L=L.filter(V=>V.printerId?c.value.some(F=>a.value.includes(F.id)&&F.printers.some(B=>B.printerId===V.printerId)):!1)),o.value.length>0&&(L=L.filter(V=>{if(!V.printerId)return!1;const F=m.printers.find(B=>B.id===V.printerId);return F&&o.value.includes(F.printerType)})),L}),b=[{title:"Printer",key:"printerName",sortable:!1},{title:"File Name",key:"fileName",sortable:!1},{title:"Status",key:"status",sortable:!1},{title:"Progress",key:"progress",sortable:!1},{title:"Started",key:"createdAt",sortable:!1},{title:"Ended",key:"endedAt",sortable:!1},{title:"Duration",key:"duration",sortable:!1},{title:"Filament",key:"filament",sortable:!1},{title:"Reason",key:"reason",sortable:!1}],y=s$(()=>{r.value=1,w()},500);ot(async()=>{await w(),await u()});const w=async()=>{n.value=!0;try{const L={...d.value,page:r.value,pageSize:s.value};Object.keys(L).forEach(F=>{L[F]===""&&delete L[F]});const V=await iq.searchJobsPaged(L);t.value=V.items,i.value=V.count}catch(L){console.error("Failed to load print jobs:",L),t.value=[],i.value=0}finally{n.value=!1}},_=L=>{switch(L){case"FINISHED":return"success";case"FAILED":return"error";case"STARTED":return"primary";default:return"grey"}},T=L=>{switch(L){case"FINISHED":return"check_circle";case"FAILED":return"error";case"STARTED":return"play_circle";default:return"help"}},P=L=>L>=90?"success":L>=50?"primary":L>=25?"warning":"error",x=L=>{const V=L/3600;return V<1?"success":V<4?"primary":V<8?"warning":"error"},C=L=>new Date(L).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}),E=L=>{const V=new Date,F=new Date(L),B=Math.floor((V.getTime()-F.getTime())/(1e3*60));if(B<1)return"Just now";if(B<60)return`${B}m ago`;const M=Math.floor(B/60);if(M<24)return`${M}h ago`;const N=Math.floor(M/24);return N<7?`${N}d ago`:`${Math.floor(N/7)}w ago`},R=L=>{if(!L)return"-";const V=Math.floor(L/3600),F=Math.floor(L%3600/60);return V>0?`${V}h ${F}m`:`${F}m`},I=L=>L?p.floorOfPrinter(L)?.name||"No floor assigned":"Unknown",O=()=>{d.value={searchPrinter:"",searchFile:"",startDate:"",endDate:"",page:1,pageSize:25},r.value=1,w()};return(L,V)=>($(),J(Br,{fluid:"",class:"print-jobs-container"},{default:h(()=>[f(it,{class:"mb-6"},{default:h(()=>[f(Be,{cols:"12"},{default:h(()=>[S("div",Zse,[V[9]||(V[9]=S("div",null,[S("h1",{class:"text-h4 font-weight-bold mb-2"},"Print Jobs"),S("p",{class:"text-subtitle-1 text-medium-emphasis mb-0"}," Track and monitor all your 3D printing jobs ")],-1)),i.value>0?($(),J(qe,{key:0,color:"primary",variant:"elevated",size:"large",class:"px-4"},{default:h(()=>[f(j,{start:""},{default:h(()=>[...V[8]||(V[8]=[k("work",-1)])]),_:1}),k(" "+Y(i.value)+" jobs found ",1)]),_:1})):se("",!0)])]),_:1})]),_:1}),f($e,{class:"mb-6",elevation:"2"},{default:h(()=>[f(Lt,{class:"d-flex align-center pb-0"},{default:h(()=>[f(j,{class:"mr-3",color:"primary"},{default:h(()=>[...V[10]||(V[10]=[k("search",-1)])]),_:1}),V[13]||(V[13]=S("span",{class:"text-h6"},"Search & Filters",-1)),f(Ft),f(te,{color:"primary",onClick:w,loading:n.value,variant:"elevated"},{default:h(()=>[f(j,{left:""},{default:h(()=>[...V[11]||(V[11]=[k("refresh",-1)])]),_:1}),V[12]||(V[12]=k(" Refresh ",-1))]),_:1},8,["loading"])]),_:1}),f(Xe,{class:"pt-4"},{default:h(()=>[f(it,null,{default:h(()=>[f(Be,{cols:"12",md:"6"},{default:h(()=>[f(Qe,{modelValue:d.value.searchPrinter,"onUpdate:modelValue":V[0]||(V[0]=F=>d.value.searchPrinter=F),label:"Search by printer name","prepend-inner-icon":"print",variant:"outlined",clearable:"","hide-details":"",onInput:Q(y)},null,8,["modelValue","onInput"])]),_:1}),f(Be,{cols:"12",md:"6"},{default:h(()=>[f(Qe,{modelValue:d.value.searchFile,"onUpdate:modelValue":V[1]||(V[1]=F=>d.value.searchFile=F),label:"Search by file name","prepend-inner-icon":"description",variant:"outlined",clearable:"","hide-details":"",onInput:Q(y)},null,8,["modelValue","onInput"])]),_:1})]),_:1}),f(it,{class:"mt-3"},{default:h(()=>[f(Be,{cols:"12",md:"4"},{default:h(()=>[f(Qe,{modelValue:d.value.startDate,"onUpdate:modelValue":V[2]||(V[2]=F=>d.value.startDate=F),label:"Start Date",type:"date",variant:"outlined","prepend-inner-icon":"event","hide-details":"",onInput:Q(y)},null,8,["modelValue","onInput"])]),_:1}),f(Be,{cols:"12",md:"4"},{default:h(()=>[f(Qe,{modelValue:d.value.endDate,"onUpdate:modelValue":V[3]||(V[3]=F=>d.value.endDate=F),label:"End Date",type:"date",variant:"outlined","prepend-inner-icon":"event","hide-details":"",onInput:Q(y)},null,8,["modelValue","onInput"])]),_:1}),f(Be,{cols:"12",md:"4"},{default:h(()=>[f(Bl,{modelValue:Q(o),"onUpdate:modelValue":V[4]||(V[4]=F=>nt(o)?o.value=F:null),label:"Filter by Type"},null,8,["modelValue"])]),_:1})]),_:1}),Q(l).length?($(),J(it,{key:0,class:"mt-3"},{default:h(()=>[f(Be,{cols:"12"},{default:h(()=>[f(Vl,{modelValue:Q(a),"onUpdate:modelValue":V[5]||(V[5]=F=>nt(a)?a.value=F:null),tags:Q(l),label:"Filter by Tags"},null,8,["modelValue","tags"])]),_:1})]),_:1})):se("",!0)]),_:1})]),_:1}),f($e,{elevation:"2"},{default:h(()=>[f(Lt,{class:"d-flex align-center"},{default:h(()=>[f(j,{class:"mr-3",color:"primary"},{default:h(()=>[...V[14]||(V[14]=[k("list_alt",-1)])]),_:1}),V[15]||(V[15]=S("span",{class:"text-h6"},"Print Jobs Results",-1)),f(Ft),!n.value&&i.value>0?($(),pe("div",eie," Showing "+Y((r.value-1)*s.value+1)+" - "+Y(Math.min(r.value*s.value,i.value))+" of "+Y(i.value)+" jobs ",1)):se("",!0)]),_:1}),f(Xe,{class:"pa-0"},{default:h(()=>[f(gne,{"items-per-page":s.value,"onUpdate:itemsPerPage":V[6]||(V[6]=F=>s.value=F),page:r.value,"onUpdate:page":V[7]||(V[7]=F=>r.value=F),headers:b,items:g.value,"items-length":i.value,loading:n.value,search:v.value,class:"print-jobs-table","loading-text":"Loading print jobs...","no-data-text":"No print jobs found","onUpdate:options":w},{"item.status":h(({item:F})=>[f(qe,{color:_(F.status),icon:T(F.status),size:"small",variant:"elevated"},{default:h(()=>[k(Y(F.status||"Unknown"),1)]),_:2},1032,["color","icon"])]),"item.createdAt":h(({item:F})=>[S("div",tie,[S("div",null,Y(C(F.createdAt)),1),S("div",nie,Y(E(F.createdAt)),1)])]),"item.endedAt":h(({item:F})=>[F.endedAt?($(),pe("div",rie,[S("div",null,Y(C(F.endedAt)),1),S("div",sie,Y(E(F.endedAt)),1)])):($(),pe("span",iie,"-"))]),"item.progress":h(({item:F})=>[F.progress!==null?($(),pe("div",aie,[f(Or,{"model-value":F.progress,color:P(F.progress),height:"20",rounded:"",class:"mb-1"},{default:h(()=>[S("span",oie,Y(Math.round(F.progress))+"% ",1)]),_:2},1032,["model-value","color"])])):($(),pe("span",lie,"-"))]),"item.duration":h(({item:F})=>[F.actualPrintTimeSeconds?($(),pe("div",uie,[f(qe,{color:x(F.actualPrintTimeSeconds),size:"small",variant:"tonal"},{default:h(()=>[f(j,{start:"",size:"small"},{default:h(()=>[...V[16]||(V[16]=[k("schedule",-1)])]),_:1}),k(" "+Y(R(F.actualPrintTimeSeconds)),1)]),_:2},1032,["color"])])):($(),pe("span",cie,"-"))]),"item.printerName":h(({item:F})=>[S("div",die,[f(Sn,{size:"24",class:"mr-2",color:"primary"},{default:h(()=>[f(j,{size:"small"},{default:h(()=>[...V[17]||(V[17]=[k("print",-1)])]),_:1})]),_:1}),S("div",null,[S("div",fie,Y(F.printerName||`Printer ${F.printerId}`),1),S("div",pie,Y(I(F.printerId)),1)])])]),"item.fileName":h(({item:F})=>[S("div",mie,[f(j,{class:"mr-2",size:"small",color:"primary"},{default:h(()=>[...V[18]||(V[18]=[k("description",-1)])]),_:1}),S("div",null,[S("div",hie,Y(F.fileName),1),F.gcodePrintTimeSeconds?($(),pe("div",gie," Est. "+Y(R(F.gcodePrintTimeSeconds)),1)):se("",!0)])])]),"item.reason":h(({item:F})=>[F.reason?($(),J(Kt,{key:0,location:"top"},{activator:h(({props:B})=>[f(j,ce(B,{color:"warning",size:"small"}),{default:h(()=>[...V[19]||(V[19]=[k("info",-1)])]),_:1},16)]),default:h(()=>[S("span",null,Y(F.reason),1)]),_:2},1024)):($(),pe("span",vie,"-"))]),"item.filament":h(({item:F})=>[F.filamentUsedGrams||F.filamentUsedMm?($(),pe("div",yie,[F.filamentUsedGrams?($(),J(qe,{key:0,color:"green",size:"small",variant:"tonal"},{default:h(()=>[f(j,{start:"",size:"small"},{default:h(()=>[...V[20]||(V[20]=[k("fitness_center",-1)])]),_:1}),k(" "+Y(Math.round(F.filamentUsedGrams))+"g ",1)]),_:2},1024)):se("",!0),F.filamentUsedMm?($(),pe("div",bie,Y(Math.round(F.filamentUsedMm/1e3))+"m ",1)):se("",!0)])):($(),pe("span",Sie,"-"))]),loading:h(()=>[f(Ene,{type:"table-row@5"})]),_:1},8,["items-per-page","page","items","items-length","loading","search"])]),_:1})]),_:1}),!n.value&&i.value===0?($(),J($e,{key:0,class:"mt-6",elevation:"1"},{default:h(()=>[f(Xe,{class:"text-center py-12"},{default:h(()=>[f(j,{size:"64",color:"grey-lighten-1",class:"mb-4"},{default:h(()=>[...V[21]||(V[21]=[k("work_off",-1)])]),_:1}),V[24]||(V[24]=S("h3",{class:"text-h6 mb-2"},"No Print Jobs Found",-1)),V[25]||(V[25]=S("p",{class:"text-body-2 text-medium-emphasis mb-4"}," Try adjusting your search criteria or date range ",-1)),f(te,{color:"primary",onClick:O},{default:h(()=>[f(j,{left:""},{default:h(()=>[...V[22]||(V[22]=[k("clear_all",-1)])]),_:1}),V[23]||(V[23]=k(" Clear Filters ",-1))]),_:1})]),_:1})]),_:1})):se("",!0)]),_:1}))}}),wO=fn(wie,[["__scopeId","data-v-37d0af6c"]]),_ie=Ae({name:"PrintJobsView",components:{PrintJobs:wO}});function kie(e,t,n,r,s,i){const a=wO;return $(),J(Br,null,{default:h(()=>[f(a)]),_:1})}const xie=fn(_ie,[["render",kie]]),Eie={class:"d-flex align-center mb-2"},Cie={class:"d-flex align-center mb-2"},Tie={class:"d-flex align-center"},Iie={class:"d-flex align-center"},Rie=Ae({__name:"ExperimentalSettings",setup(e){const t=Gs.experimental,n=q(!1),r=q(!1),s=q(!1),i=q(!1),a=q(!1),o=q(!1),l=q(!1),c=q(!1),u=q(!1),d=q(!1),p=q(!1),m=q(!1);async function v(){const _=await Ln.getSettings();n.value=_.server.experimentalMoonrakerSupport,r.value=_.server.experimentalPrusaLinkSupport,s.value=_.server.experimentalBambuSupport,i.value=_.server.experimentalThumbnailSupport}ot(async()=>{await v()});const g=async()=>{a.value=!0,u.value=!1;try{await Ln.updateExperimentalMoonrakerSupport(n.value),await v(),setTimeout(()=>{a.value=!1,u.value=!0},250),setTimeout(()=>{u.value=!1},3e3)}catch(_){console.error("Failed to update Moonraker support:",_),n.value=!n.value,a.value=!1}},b=async()=>{o.value=!0,d.value=!1;try{await Ln.updateExperimentalPrusaLinkSupport(r.value),await v(),setTimeout(()=>{o.value=!1,d.value=!0},250),setTimeout(()=>{d.value=!1},3e3)}catch(_){console.error("Failed to update PrusaLink support:",_),r.value=!r.value,o.value=!1}},y=async()=>{l.value=!0,p.value=!1;try{await Ln.updateExperimentalBambuSupport(s.value),await v(),setTimeout(()=>{l.value=!1,p.value=!0},250),setTimeout(()=>{p.value=!1},3e3)}catch(_){console.error("Failed to update Bambu support:",_),s.value=!s.value,l.value=!1}},w=async()=>{c.value=!0,m.value=!1;try{await Ln.updateExperimentalThumbnailSupport(i.value),await v(),setTimeout(()=>{c.value=!1,m.value=!0},250),setTimeout(()=>{m.value=!1},3e3)}catch(_){console.error("Failed to update Thumbnail support:",_),i.value=!i.value,c.value=!1}};return(_,T)=>($(),J($e,null,{default:h(()=>[f(Ks,{icon:Q(t).icon,title:Q(t).title},null,8,["icon","title"]),f(Xe,null,{default:h(()=>[f(an,{title:"Experimental Server Features",tooltip:"Moonraker support is currently in beta, use at your own risk.",usecols:!1},{default:h(()=>[S("div",Eie,[f(Yt,{modelValue:n.value,"onUpdate:modelValue":T[0]||(T[0]=P=>n.value=P),disabled:a.value,onChange:g,"hide-details":"",label:"Enable Experimental Moonraker Support"},null,8,["modelValue","disabled"]),a.value?($(),J(un,{key:0,indeterminate:"",size:"30",width:"4",class:"ml-2"})):se("",!0),u.value?($(),J(j,{key:1,color:"success",class:"ml-2"},{default:h(()=>[...T[4]||(T[4]=[k(" check_circle ",-1)])]),_:1})):se("",!0)]),n.value?($(),J(Et,{key:0,color:"warning",variant:"tonal",class:"mb-2"},{default:h(()=>[...T[5]||(T[5]=[k(" Disabling Moonraker support will disable all printers of type Moonraker. You need to re-enable them after re-enabling this feature. ",-1)])]),_:1})):se("",!0),S("div",Cie,[f(Yt,{modelValue:r.value,"onUpdate:modelValue":T[1]||(T[1]=P=>r.value=P),disabled:o.value,onChange:b,"hide-details":"",label:"Enable Experimental PrusaLink Support"},null,8,["modelValue","disabled"]),o.value?($(),J(un,{key:0,indeterminate:"",size:"30",width:"4",class:"ml-2"})):se("",!0),d.value?($(),J(j,{key:1,color:"success",class:"ml-2"},{default:h(()=>[...T[6]||(T[6]=[k(" check_circle ",-1)])]),_:1})):se("",!0)]),S("div",Tie,[f(Yt,{modelValue:s.value,"onUpdate:modelValue":T[2]||(T[2]=P=>s.value=P),disabled:l.value,onChange:y,"hide-details":"",label:"Enable Experimental Bambu Support"},null,8,["modelValue","disabled"]),l.value?($(),J(un,{key:0,indeterminate:"",size:"30",width:"4",class:"ml-2"})):se("",!0),p.value?($(),J(j,{key:1,color:"success",class:"ml-2"},{default:h(()=>[...T[7]||(T[7]=[k(" check_circle ",-1)])]),_:1})):se("",!0)])]),_:1}),f(pt),f(an,{title:"Experimental Thumbnail Support",tooltip:"Thumbnails are extracted from gcode. Please enable PNG thumbnails in your slicer.",usecols:!1},{default:h(()=>[S("div",Iie,[f(Yt,{modelValue:i.value,"onUpdate:modelValue":T[3]||(T[3]=P=>i.value=P),disabled:c.value,onChange:w,"hide-details":"",label:"Enable Experimental Thumbnail Support"},null,8,["modelValue","disabled"]),c.value?($(),J(un,{key:0,indeterminate:"",size:"30",width:"4",class:"ml-2"})):se("",!0),m.value?($(),J(j,{key:1,color:"success",class:"ml-2"},{default:h(()=>[...T[8]||(T[8]=[k(" check_circle ",-1)])]),_:1})):se("",!0)])]),_:1})]),_:1})]),_:1}))}}),Pie={class:"d-flex align-center flex-wrap gap-2 mb-2"},Aie=["onClick"],Oie={class:"msg-time"},Die={class:"msg-event"},Lie={class:"msg-preview"},$ie={key:0,class:"no-messages"},Fie={class:"mt-2 grey--text"},Nie=Ae({__name:"DebugSocketSettings",setup(e){const t=Gs.debugSocket,n=v2(),r=jt(Ht.JsonViewerDialog),s=q(""),i=q(!0),a=q(null);ot(()=>{n.enabled||n.enable()});function o(){n.enabled?(n.disable(),n.paused&&n.togglePause()):n.enable()}function l(){n.setFilter(s.value||"")}function c(p){return p.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})}function u(p){try{const m=JSON.stringify(p);return m.length>100?m.substring(0,100)+"...":m}catch{return String(p)}}function d(p){r.openDialog({title:`${p.event} (${p.direction==="in"?"Received":"Sent"})`,data:p.data})}return _e(()=>n.messages.length,async()=>{i.value&&a.value&&(await ut(),a.value.scrollTop=a.value.scrollHeight)}),(p,m)=>($(),J($e,null,{default:h(()=>[f(Ks,{icon:Q(t).icon,title:Q(t).title},null,8,["icon","title"]),f(Xe,{class:"pa-2"},{default:h(()=>[S("div",Pie,[f(te,{color:Q(n).enabled?"error":"primary",small:"",onClick:o},{default:h(()=>[f(j,{small:"",class:"mr-1"},{default:h(()=>[k(Y(Q(n).enabled?"mdi:mdi-stop":"mdi:mdi-play"),1)]),_:1}),k(" "+Y(Q(n).enabled?"Stop":"Start"),1)]),_:1},8,["color"]),f(te,{disabled:!Q(n).enabled,color:Q(n).paused?"warning":"default",small:"",onClick:m[0]||(m[0]=v=>Q(n).togglePause())},{default:h(()=>[f(j,{small:"",class:"mr-1"},{default:h(()=>[k(Y(Q(n).paused?"play_arrow":"pause"),1)]),_:1}),k(" "+Y(Q(n).paused?"Resume":"Pause"),1)]),_:1},8,["disabled","color"]),f(te,{small:"",color:"default",onClick:m[1]||(m[1]=v=>Q(n).clearMessages())},{default:h(()=>[f(j,{small:"",class:"mr-1"},{default:h(()=>[...m[4]||(m[4]=[k("delete",-1)])]),_:1}),m[5]||(m[5]=k(" Clear ",-1))]),_:1}),f(Ft),f(qe,{small:"",outlined:""},{default:h(()=>[k(Y(Q(n).filteredMessages.length)+" / "+Y(Q(n).messageCount)+" messages ",1)]),_:1}),f(Qe,{modelValue:s.value,"onUpdate:modelValue":m[2]||(m[2]=v=>s.value=v),dense:"","hide-details":"",outlined:"",placeholder:"Filter...","prepend-inner-icon":"search",clearable:"",style:{"max-width":"200px"},onInput:l},null,8,["modelValue"]),f(Yt,{modelValue:i.value,"onUpdate:modelValue":m[3]||(m[3]=v=>i.value=v),dense:"","hide-details":"",label:"Auto-scroll",class:"mt-0 pt-0"},null,8,["modelValue"])]),S("div",{ref_key:"messagesContainer",ref:a,class:"messages-container"},[($(!0),pe(ke,null,Ot(Q(n).filteredMessages,v=>($(),pe("div",{key:v.id,class:"message-row",onClick:g=>d(v)},[S("span",Oie,Y(c(v.timestamp)),1),f(qe,{"x-small":"",color:v.direction==="in"?"blue":"green",class:"msg-direction"},{default:h(()=>[k(Y(v.direction==="in"?"IN":"OUT"),1)]),_:2},1032,["color"]),S("span",Die,Y(v.event),1),S("span",Lie,Y(u(v.data)),1)],8,Aie))),128)),Q(n).filteredMessages.length===0?($(),pe("div",$ie,[f(j,{large:"",color:"grey"},{default:h(()=>[...m[6]||(m[6]=[k("speaker_notes_off",-1)])]),_:1}),S("div",Fie,Y(Q(n).enabled?"Waiting for messages...":"Click Start to begin capturing"),1)])):se("",!0)],512)]),_:1})]),_:1}))}}),Mie=fn(Nie,[["__scopeId","data-v-0df940b4"]]),Vie="/img/DavidZwart.jpg",Bie={class:"mt-4"},Uie={key:0},zie={key:1},jie={class:"d-flex align-center"},Hie={class:"d-flex gap-2"},qie=Ae({__name:"AboutSettings",setup(e){const t=q(""),n=q(""),r=q(gO);return ot(async()=>{const s=await Hi.getVersion();t.value=s.version,n.value=s.monsterPi}),(s,i)=>($(),J($e,null,{default:h(()=>[f(Lt,null,{default:h(()=>[...i[0]||(i[0]=[k("About FDM Monster",-1)])]),_:1}),f(Xe,null,{default:h(()=>[i[7]||(i[7]=S("p",null," FDM Monster is an open-source 3D printing farm management system created by David Zwart in 2021. ",-1)),S("p",Bie,[i[1]||(i[1]=S("strong",null,"Server version:",-1)),k(" "+Y(t.value),1),i[2]||(i[2]=S("br",null,null,-1)),i[3]||(i[3]=S("strong",null,"Client version:",-1)),k(" "+Y(r.value),1),i[4]||(i[4]=S("br",null,null,-1)),n.value?($(),pe("strong",Uie,"MonsterPi version: "+Y(n.value),1)):($(),pe("strong",zie,"No MonsterPi distro detected."))]),f(te,{class:"mt-3",variant:"outlined",to:"/settings/software-upgrade"},{default:h(()=>[f(j,null,{default:h(()=>[...i[5]||(i[5]=[k("mdi:mdi-upgrade",-1)])]),_:1}),i[6]||(i[6]=k(" Visit Upgrade Settings ",-1))]),_:1})]),_:1}),f(Lt,null,{default:h(()=>[...i[8]||(i[8]=[k("Documentation & Support",-1)])]),_:1}),f(Xe,null,{default:h(()=>[f(te,{href:"https://docs.fdm-monster.net",target:"_blank",variant:"tonal",class:"mb-2"},{default:h(()=>[f(j,{class:"mr-2"},{default:h(()=>[...i[9]||(i[9]=[k("menu_book",-1)])]),_:1}),i[10]||(i[10]=k(" Documentation ",-1))]),_:1}),i[11]||(i[11]=S("br",null,null,-1)),f(S1,{class:"mb-2"}),i[12]||(i[12]=S("br",null,null,-1)),f(w1)]),_:1}),f(Lt,null,{default:h(()=>[...i[13]||(i[13]=[k("Author",-1)])]),_:1}),f(Xe,null,{default:h(()=>[S("div",jie,[i[17]||(i[17]=S("img",{src:Vie,width:"100",class:"mr-4",alt:"Creator David Zwart"},null,-1)),S("div",null,[i[16]||(i[16]=S("div",{class:"mb-2"},"David Zwart MSc.",-1)),S("div",Hie,[f(te,{icon:"",size:"small",variant:"tonal",class:"mr-2",href:"https://www.linkedin.com/in/david-zwart-88514083/",target:"_blank"},{default:h(()=>[f(j,null,{default:h(()=>[...i[14]||(i[14]=[k("mdi:mdi-linkedin",-1)])]),_:1})]),_:1}),f(te,{icon:"",size:"small",variant:"tonal",href:"https://github.com/davidzwa",target:"_blank"},{default:h(()=>[f(j,null,{default:h(()=>[...i[15]||(i[15]=[k("mdi:mdi-github",-1)])]),_:1})]),_:1})])])])]),_:1})]),_:1}))}}),pn={requiresAuth:!0},tg={requiresAuth:!1},L1=UX({history:bX("/"),routes:[{path:"/",name:xt.Home,meta:pn,redirect:"/dashboard"},{path:"/dashboard",name:xt.Dashboard,meta:pn,component:Aee},{path:"/printers-grid",name:"PrinterGrid",meta:pn,component:cte},{path:"/first-time-setup",name:xt.FirstTimeSetup,meta:tg,component:bse},{path:"/login",name:xt.Login,meta:tg,component:Ore},{path:"/registration",name:xt.Registration,meta:tg,component:$re},{path:"/printers",name:xt.PrintersView,meta:pn,component:Wne},{path:"/cameras",name:xt.CameraGridView,meta:pn,component:Xre},{path:"/settings",component:Gne,meta:pn,children:[{path:"",meta:pn,redirect:"/settings/floors"},{path:"account",meta:pn,component:Sse},{path:"server-protection",meta:pn,component:wse},{path:"floors",meta:pn,component:yre},{path:"user-management",meta:pn,component:ire},{path:"printer",meta:pn,component:are},{path:"emergency-commands",meta:pn,component:bre},{path:"software-upgrade",meta:pn,component:Xse},{path:"diagnostics",meta:pn,component:Qse},{path:"experimental",meta:pn,component:Rie},{path:"debug-socket",meta:pn,component:Mie},{path:"about",meta:pn,component:qie}]},{path:"/jobs",name:xt.PrintJobs,meta:pn,component:xie},{path:"/permission-denied",name:xt.PermissionDenied,meta:pn,component:Tre},{path:"/:pathMatch(.*)*",name:"NotFound",component:wre}]});L1.beforeEach(async(e,t,n)=>{const r=Zr();return!e?.meta?.requiresAuth||r.loginRequired===!1?(console.debug(`No auth required on route ${e.fullPath}`),n()):(console.debug(`Auth required on route ${e.fullPath} (loginRequired=${r.loginRequired}, registration=${r.registration}, wizardState=${r.wizardState}, requiresAuth=${e?.meta?.requiresAuth})`),r.loadTokens(),!r.hasAuthToken&&!r.hasRefreshToken?(console.debug("Not logged in, redirecting to login page"),e.name===xt.Login?(console.debug("Already on login page, allowing navigation"),n()):n({path:"/login",query:{redirect:e.fullPath}})):n())});const _x=(e,t,n)=>{const r=At(),s=b1(),i=bt();if(t?.length){const a=t.length===1,o=t[0];e.ondrop=async l=>{l.preventDefault(),e.style.border=Bf;const c=l.dataTransfer?.files;if(!c?.length)return;const u=Array.from(c);let d=[];if(a){const p=u.length===1?u[0].name:null;console.debug("Single printer upload mode",t.length,u.length,p),d=Uee(o,u,!0)}else{if(u.length>1)throw new Error("Cannot upload multiple files to multiple printers");console.debug("Multi printer upload mode",t.length,u.length);const p=u[0];d=E2(t,p,!0)}s.queueUploads(d),r.clearSelectedPrinters()};return}e.ondrop=async a=>{a.preventDefault(),e.style.border=Bf,i.openInfoMessage({title:"No action performed",subtitle:"Please select one or more printers",warning:!0})}},Bf="1px solid #2b2a27",Wie="background-color 0.5s ease",kx="1px solid red";function Gie(){return{mounted:(e,t,n)=>{e.style.border=Bf,e.style.transition=Wie,e.ondragenter=r=>{r.preventDefault(),e.style.border=kx},e.ondragover=r=>{r.preventDefault(),e.style.border=kx},e.ondragleave=r=>{r.preventDefault(),e.style.border=Bf},_x(e,t.value?.printers,n.appContext)},beforeUpdate:(e,t,n)=>{_x(e,t.value?.printers,n.appContext)}}}const ng="none",Kie="2px dashed rgba(255, 255, 255, 0.4)",xx=(e,t,n)=>{const r=t?.printerSet,s=ns();if(r){e.ondrop=null,e.ondragover=null,e.ondragleave=null;return}e.style.border=ng,e.ondrop=async i=>{if(e.style.border=ng,i.preventDefault(),!i.dataTransfer)return;const a=i.dataTransfer.getData("text"),o=JSON.parse(a);if(!Nee(o)){console.debug("Drop not recognized",o);return}const c=s.selectedFloor?.id;if(!c)throw new Error("Floor is not set");const u=o.printerId;if(!u)throw new Error("PrinterId was not provided");await ls.addPrinterToFloor(c,{printerId:u,x:t.x,y:t.y})},e.ondragover=i=>{i?.dataTransfer&&(i.dataTransfer&&Array.from(i.dataTransfer.items).filter(a=>a.kind==="file").length||(e.style.border=Kie,i.preventDefault()))},e.ondragleave=i=>{e.style.border=ng,i.preventDefault()}};function Yie(){return{mounted:(e,t,n)=>{xx(e,t.value,n.appContext)},beforeUpdate:(e,t,n)=>{xx(e,t.value,n.appContext)}}}const Jie={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",tableGroupCollapse:"chevron_down",tableGroupExpand:"chevron_right",eyeDropper:"colorize",upload:"cloud_upload",color:"palette",command:"keyboard_command_key",ctrl:"keyboard_control_key",shift:"shift",alt:"keyboard_option_key",space:"keyboard_space",enter:"keyboard_return",arrowup:"keyboard_arrow_up",arrowdown:"keyboard_arrow_down",arrowleft:"keyboard_arrow_left",arrowright:"keyboard_arrow_right",backspace:"backspace",play:"play",pause:"pause",fullscreen:"fullscreen",fullscreenExit:"fullscreen_exit",volumeHigh:"volume_high",volumeMedium:"volume_medium",volumeLow:"volume_low",volumeOff:"volume_variant_off"},Xie={component:e=>gs(vF,{...e,class:"material-icons"})},Qie=oe({...T1()},"VStepperActions"),Zie=be()({name:"VStepperVerticalActions",props:Qie(),emits:{"click:prev":()=>!0,"click:next":()=>!0},setup(e,t){let{emit:n,slots:r}=t;function s(){n("click:prev")}function i(){n("click:next")}return Ie(()=>{const a=Wv.filterProps(e);return f(Wv,ce({class:"v-stepper-vertical-actions"},a,{"onClick:prev":s,"onClick:next":i}),r)}),{}}}),eae=oe({hideActions:Boolean,...pO(),...Qt(Xb({expandIcon:"",collapseIcon:""}),["hideActions"])},"VStepperVerticalItem"),_O=be()({name:"VStepperVerticalItem",props:eae(),emits:{"click:next":()=>!0,"click:prev":()=>!0,"click:finish":()=>!0},setup(e,t){let{emit:n,slots:r}=t;const s=q(),i=A(()=>isNaN(parseInt(e.value))?e.value:Number(e.value)),a=A(()=>s.value?.groupItem),o=A(()=>e.rules.every(y=>y()===!0)),l=A(()=>!e.disabled&&e.editable),c=A(()=>e.error||!o.value),u=A(()=>e.complete||e.rules.length>0&&o.value),d=A(()=>e.disabled?e.disabled:a.value?.isFirst.value?"prev":!1),p=A(()=>c.value?e.errorIcon:u.value?e.completeIcon:a.value?.isSelected.value&&e.editable?e.editIcon:e.icon),m=A(()=>({canEdit:l.value,hasError:c.value,hasCompleted:u.value,title:e.title,subtitle:e.subtitle,step:i.value})),v=A(()=>({...m.value,prev:b,next:g}));function g(){n("click:next"),!a.value?.isLast.value&&a.value.group.next()}function b(){n("click:prev"),a.value.group.prev()}return Ie(()=>{const y=(!a.value||a.value?.isSelected.value||u.value||l.value)&&!c.value&&!e.disabled,w=!e.hideActions||!!r.actions,_=nc.filterProps(e);return f(nc,ce({_as:"VStepperVerticalItem",ref:s},_,{class:["v-stepper-vertical-item",{"v-stepper-vertical-item--complete":u.value,"v-stepper-vertical-item--disabled":e.disabled,"v-stepper-vertical-item--editable":l.value,"v-stepper-vertical-item--error":c.value},e.class],readonly:!e.editable,style:e.style,color:"",hideActions:!1,value:i.value}),{title:()=>S(ke,null,[f(Sn,{key:"stepper-avatar",class:"v-stepper-vertical-item__avatar",color:y?e.color:void 0,size:24,start:!0},{default:()=>[r.icon?.(m.value)??(p.value?f(j,{icon:p.value},null):i.value)]}),S("div",null,[S("div",{class:"v-stepper-vertical-item__title"},[r.title?.(m.value)??e.title]),S("div",{class:"v-stepper-vertical-item__subtitle"},[r.subtitle?.(m.value)??e.subtitle])])]),text:()=>S(ke,null,[r.default?.(m.value)??e.text,w&&f(vt,{defaults:{VStepperVerticalActions:{disabled:d.value,finish:a.value?.isLast.value}}},{default:()=>[r.actions?.(v.value)??f(Zie,{"onClick:next":g,"onClick:prev":b},{prev:r.prev?()=>r.prev?.(v.value):void 0,next:r.next?()=>r.next?.(v.value):void 0})]})])})}),{}}}),tae=oe({prevText:{type:String,default:"$vuetify.stepper.prev"},nextText:{type:String,default:"$vuetify.stepper.next"},...hO(),...Qt(xA({mandatory:"force",variant:"accordion"}),["static"])},"VStepperVertical"),nae=be()({name:"VStepperVertical",props:tae(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=q(),{color:s,eager:i,editable:a,prevText:o,nextText:l,hideActions:c}=Ii(e),u=tt(e,"modelValue"),d=A(()=>e.items.map((p,m)=>{const v=sn(p,e.itemTitle,p),g=sn(p,e.itemValue,m+1),b=e.itemProps===!0?p:sn(p,e.itemProps),y={title:v,value:g,...b};return{title:y.title,value:y.value,props:y,raw:p}}));return Rn({VStepperVerticalItem:{color:s,eager:i,editable:a,hideActions:c,static:!0},VStepperVerticalActions:{color:s,nextText:l,prevText:o}}),Ie(()=>{const p=rc.filterProps(e);return f(rc,ce(p,{modelValue:u.value,"onUpdate:modelValue":m=>u.value=m,ref:r,class:["v-stepper",{"v-stepper--alt-labels":e.altLabels,"v-stepper--flat":e.flat,"v-stepper--non-linear":e.nonLinear,"v-stepper--mobile":e.mobile},e.class],style:e.style}),{...n,default:m=>{let{prev:v,next:g}=m;return S(ke,null,[d.value.map(b=>{let{raw:y,...w}=b;return f(_O,w.props,{...n,default:n[`item.${w.value}`]})}),n.default?.({prev:v,next:g,step:u.value})])}})}),{}}}),rae="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='Discord-Logo'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20126.644%2096'%3e%3cdefs%3e%3cstyle%3e.cls-1{fill:%235865f2;}%3c/style%3e%3c/defs%3e%3cpath%20id='Discord-Symbol-Blurple'%20class='cls-1'%20d='M81.15,0c-1.2376,2.1973-2.3489,4.4704-3.3591,6.794-9.5975-1.4396-19.3718-1.4396-28.9945,0-.985-2.3236-2.1216-4.5967-3.3591-6.794-9.0166,1.5407-17.8059,4.2431-26.1405,8.0568C2.779,32.5304-1.6914,56.3725.5312,79.8863c9.6732,7.1476,20.5083,12.603,32.0505,16.0884,2.6014-3.4854,4.8998-7.1981,6.8698-11.0623-3.738-1.3891-7.3497-3.1318-10.8098-5.1523.9092-.6567,1.7932-1.3386,2.6519-1.9953,20.281,9.547,43.7696,9.547,64.0758,0,.8587.7072,1.7427,1.3891,2.6519,1.9953-3.4601,2.0457-7.0718,3.7632-10.835,5.1776,1.97,3.8642,4.2683,7.5769,6.8698,11.0623,11.5419-3.4854,22.3769-8.9156,32.0509-16.0631,2.626-27.2771-4.496-50.9172-18.817-71.8548C98.9811,4.2684,90.1918,1.5659,81.1752.0505l-.0252-.0505ZM42.2802,65.4144c-6.2383,0-11.4159-5.6575-11.4159-12.6535s4.9755-12.6788,11.3907-12.6788,11.5169,5.708,11.4159,12.6788c-.101,6.9708-5.026,12.6535-11.3907,12.6535ZM84.3576,65.4144c-6.2637,0-11.3907-5.6575-11.3907-12.6535s4.9755-12.6788,11.3907-12.6788,11.4917,5.708,11.3906,12.6788c-.101,6.9708-5.026,12.6535-11.3906,12.6535Z'/%3e%3c/svg%3e",sae=S2({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:"#1eb6c3",secondary:"#424242",accent:"#82B1FF",error:"#FF5252",info:"#2196F3",success:"#4CAF50",warning:"#FFC107"}}}},icons:{defaultSet:"md",aliases:{...Jie,discord:rae},sets:{md:Xie,mdi:b2,custom:{component:e=>e.icon}}},components:{VStepperVertical:nae,VStepperVerticalItem:_O}}),Ys=qL(iee);console.log("[DEV: false][PROD: true]","0.1.0");XH({app:Ys,dsn:"https://f64683e8d1cb4ac291434993cff1bf9b@o4503975545733120.ingest.sentry.io/4503975546912768",integrations:[eq({router:L1}),gH()],release:"0.1.0",environment:"production",enabled:!0,tracesSampleRate:1,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1});Ys.config.errorHandler=e=>{if(e instanceof AT){console.error(`An error was caught [${e.name}]:
84
+ ${e.message}
85
+ ${e.config?.url}
86
+ ${e.stack}`);let t="An error occurred",n=e.message;const r=e.response?.status;r===500?(t="Server Error",n="The server encountered an unexpected error. Please try again later."):r===404?(t="Resource Not Found",n="The requested resource could not be found."):r===403?(t="Access Denied",n="You do not have permission to access this resource."):r===401?(t="Authentication Required",n="Please log in to continue."):r&&r>=400&&r<500?(t="Request Error",n="There was a problem with your request. Please check and try again."):r&&r>=500?(t="Server Error",n="The server is experiencing difficulties. Please try again later."):(e.code==="NETWORK_ERROR"||e.code==="ECONNREFUSED")&&(t="Connection Error",n="Unable to connect to the server. Please check your connection."),bt().openErrorMessage({title:t,subtitle:n,timeout:5e3});return}else e instanceof Error?(console.error(`An error was caught [${e.name}]:
87
+ ${e.message}
88
+ ${e.stack}`),bt().openErrorMessage({title:"An error occurred",subtitle:e.message,timeout:5e3})):(console.error("Unknown error caught:",e),bt().openErrorMessage({title:"An error occurred",subtitle:"An unexpected error occurred",timeout:5e3}));ds(e)};Ys.directive("drop-upload",Gie());Ys.directive("drop-printer-position",Yie());const kO=KL();kO.use(nq());Ys.use(kO);Ys.use(aJ);Ys.use(sae);Ys.provide("appConstants",KX());Ys.use(L1);Ys.mount("#app");
89
+ //# sourceMappingURL=index-BSN99B_g.js.map