@fdm-monster/client-next 0.0.22 → 0.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.yarn/install-state.gz +0 -0
- package/.yarn/releases/{yarn-4.10.3.cjs → yarn-4.12.0.cjs} +300 -300
- package/.yarnrc.yml +1 -1
- package/RELEASE_NOTES.MD +6 -0
- package/dist/assets/index-Bj2_diIZ.js +103 -0
- package/dist/assets/index-Bj2_diIZ.js.map +1 -0
- package/dist/assets/index-Cnc8DDeR.css +5 -0
- package/dist/index.html +3 -3
- package/package.json +3 -2
- package/vite.config.mts +6 -5
- package/dist/assets/index-Cu6fadRj.js +0 -93
- package/dist/assets/index-Cu6fadRj.js.map +0 -1
- package/dist/assets/index-MwpeX3td.css +0 -5
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
var vL=Object.defineProperty;var Dw=e=>{throw TypeError(e)};var yL=(e,t,n)=>t in e?vL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Se=(e,t,n)=>yL(e,typeof t!="symbol"?t+"":t,n),mg=(e,t,n)=>t.has(e)||Dw("Cannot "+n);var Q=(e,t,n)=>(mg(e,t,"read from private field"),n?n.call(e):t.get(e)),qe=(e,t,n)=>t.has(e)?Dw("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Fe=(e,t,n,r)=>(mg(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),it=(e,t,n)=>(mg(e,t,"access private method"),n);var Rf=(e,t,n,r)=>({set _(s){Fe(e,t,s,n)},get _(){return Q(e,t,r)}});(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"09c5075ad9af76359f284082ca4b3320c8b0c4bc"}}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]="ab3329c7-58aa-495a-a3f5-5e394dee3e28",e._sentryDebugIdIdentifier="sentry-dbid-ab3329c7-58aa-495a-a3f5-5e394dee3e28")})()}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 o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();/**
|
|
2
|
+
* @vue/shared v3.5.26
|
|
3
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
|
+
* @license MIT
|
|
5
|
+
**/function Wb(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Vt={},Jl=[],mi=()=>{},rT=()=>!1,nm=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),qb=e=>e.startsWith("onUpdate:"),kn=Object.assign,Gb=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},bL=Object.prototype.hasOwnProperty,It=(e,t)=>bL.call(e,t),Ye=Array.isArray,Zl=e=>rm(e)==="[object Map]",sT=e=>rm(e)==="[object Set]",et=e=>typeof e=="function",an=e=>typeof e=="string",ao=e=>typeof e=="symbol",jt=e=>e!==null&&typeof e=="object",iT=e=>(jt(e)||et(e))&&et(e.then)&&et(e.catch),oT=Object.prototype.toString,rm=e=>oT.call(e),wL=e=>rm(e).slice(8,-1),aT=e=>rm(e)==="[object Object]",sm=e=>an(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Wc=Wb(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),im=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},SL=/-\w/g,Sr=im(e=>e.replace(SL,t=>t.slice(1).toUpperCase())),_L=/\B([A-Z])/g,na=im(e=>e.replace(_L,"-$1").toLowerCase()),bi=im(e=>e.charAt(0).toUpperCase()+e.slice(1)),gg=im(e=>e?`on${bi(e)}`:""),Bo=(e,t)=>!Object.is(e,t),yh=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},lT=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Kb=e=>{const t=parseFloat(e);return isNaN(t)?e:t},kL=e=>{const t=an(e)?Number(e):NaN;return isNaN(t)?e:t};let Mw;const om=()=>Mw||(Mw=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Be(e){if(Ye(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],s=an(r)?TL(r):Be(r);if(s)for(const i in s)t[i]=s[i]}return t}else if(an(e)||jt(e))return e}const xL=/;(?![^(]*\))/g,EL=/:([^]+)/,CL=/\/\*[^]*?\*\//g;function TL(e){const t={};return e.replace(CL,"").split(xL).forEach(n=>{if(n){const r=n.split(EL);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function Oe(e){let t="";if(an(e))t=e;else if(Ye(e))for(let n=0;n<e.length;n++){const r=Oe(e[n]);r&&(t+=r+" ")}else if(jt(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function jv(e){if(!e)return null;let{class:t,style:n}=e;return t&&!an(t)&&(e.class=Oe(t)),n&&(e.style=Be(n)),e}const RL="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",PL=Wb(RL);function uT(e){return!!e||e===""}const cT=e=>!!(e&&e.__v_isRef===!0),ae=e=>an(e)?e:e==null?"":Ye(e)||jt(e)&&(e.toString===oT||!et(e.toString))?cT(e)?ae(e.value):JSON.stringify(e,dT,2):String(e),dT=(e,t)=>cT(t)?dT(e,t.value):Zl(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,s],i)=>(n[vg(r,i)+" =>"]=s,n),{})}:sT(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>vg(n))}:ao(t)?vg(t):jt(t)&&!Ye(t)&&!aT(t)?String(t):t,vg=(e,t="")=>{var n;return ao(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
|
|
6
|
+
* @vue/reactivity v3.5.26
|
|
7
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
8
|
+
* @license MIT
|
|
9
|
+
**/let rr;class fT{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=rr,!t&&rr&&(this.index=(rr.scopes||(rr.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=rr;try{return rr=this,t()}finally{rr=n}}}on(){++this._on===1&&(this.prevScope=rr,rr=this)}off(){this._on>0&&--this._on===0&&(rr=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 rl(e){return new fT(e)}function Xd(){return rr}function ln(e,t=!1){rr&&rr.cleanups.push(e)}let Gt;const yg=new WeakSet;class hT{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,rr&&rr.active&&rr.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,yg.has(this)&&(yg.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||mT(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Lw(this),gT(this);const t=Gt,n=$s;Gt=this,$s=!0;try{return this.fn()}finally{vT(this),Gt=t,$s=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Qb(t);this.deps=this.depsTail=void 0,Lw(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?yg.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Wv(this)&&this.run()}get dirty(){return Wv(this)}}let pT=0,qc,Gc;function mT(e,t=!1){if(e.flags|=8,t){e.next=Gc,Gc=e;return}e.next=qc,qc=e}function Yb(){pT++}function Xb(){if(--pT>0)return;if(Gc){let t=Gc;for(Gc=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;qc;){let t=qc;for(qc=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 gT(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function vT(e){let t,n=e.depsTail,r=n;for(;r;){const s=r.prevDep;r.version===-1?(r===n&&(n=s),Qb(r),IL(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}e.deps=t,e.depsTail=n}function Wv(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(yT(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function yT(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===fd)||(e.globalVersion=fd,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Wv(e))))return;e.flags|=2;const t=e.dep,n=Gt,r=$s;Gt=e,$s=!0;try{gT(e);const s=e.fn(e._value);(t.version===0||Bo(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{Gt=n,$s=r,vT(e),e.flags&=-3}}function Qb(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)Qb(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function IL(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let $s=!0;const bT=[];function Xi(){bT.push($s),$s=!1}function Qi(){const e=bT.pop();$s=e===void 0?!0:e}function Lw(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Gt;Gt=void 0;try{t()}finally{Gt=n}}}let fd=0;class AL{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 Jb{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(!Gt||!$s||Gt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Gt)n=this.activeLink=new AL(Gt,this),Gt.deps?(n.prevDep=Gt.depsTail,Gt.depsTail.nextDep=n,Gt.depsTail=n):Gt.deps=Gt.depsTail=n,wT(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=Gt.depsTail,n.nextDep=void 0,Gt.depsTail.nextDep=n,Gt.depsTail=n,Gt.deps===n&&(Gt.deps=r)}return n}trigger(t){this.version++,fd++,this.notify(t)}notify(t){Yb();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Xb()}}}function wT(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)wT(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const ep=new WeakMap,Ha=Symbol(""),qv=Symbol(""),hd=Symbol("");function ir(e,t,n){if($s&&Gt){let r=ep.get(e);r||ep.set(e,r=new Map);let s=r.get(n);s||(r.set(n,s=new Jb),s.map=r,s.key=n),s.track()}}function Ui(e,t,n,r,s,i){const o=ep.get(e);if(!o){fd++;return}const a=l=>{l&&l.trigger()};if(Yb(),t==="clear")o.forEach(a);else{const l=Ye(e),u=l&&sm(n);if(l&&n==="length"){const c=Number(r);o.forEach((d,f)=>{(f==="length"||f===hd||!ao(f)&&f>=c)&&a(d)})}else switch((n!==void 0||o.has(void 0))&&a(o.get(n)),u&&a(o.get(hd)),t){case"add":l?u&&a(o.get("length")):(a(o.get(Ha)),Zl(e)&&a(o.get(qv)));break;case"delete":l||(a(o.get(Ha)),Zl(e)&&a(o.get(qv)));break;case"set":Zl(e)&&a(o.get(Ha));break}}Xb()}function OL(e,t){const n=ep.get(e);return n&&n.get(t)}function Cl(e){const t=Ue(e);return t===e?t:(ir(t,"iterate",hd),Jr(e)?t:t.map(Ns))}function am(e){return ir(e=Ue(e),"iterate",hd),e}function wo(e,t){return Zi(e)?Hi(e)?bu(Ns(t)):bu(t):Ns(t)}const DL={__proto__:null,[Symbol.iterator](){return bg(this,Symbol.iterator,e=>wo(this,e))},concat(...e){return Cl(this).concat(...e.map(t=>Ye(t)?Cl(t):t))},entries(){return bg(this,"entries",e=>(e[1]=wo(this,e[1]),e))},every(e,t){return ki(this,"every",e,t,void 0,arguments)},filter(e,t){return ki(this,"filter",e,t,n=>n.map(r=>wo(this,r)),arguments)},find(e,t){return ki(this,"find",e,t,n=>wo(this,n),arguments)},findIndex(e,t){return ki(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return ki(this,"findLast",e,t,n=>wo(this,n),arguments)},findLastIndex(e,t){return ki(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return ki(this,"forEach",e,t,void 0,arguments)},includes(...e){return wg(this,"includes",e)},indexOf(...e){return wg(this,"indexOf",e)},join(e){return Cl(this).join(e)},lastIndexOf(...e){return wg(this,"lastIndexOf",e)},map(e,t){return ki(this,"map",e,t,void 0,arguments)},pop(){return Sc(this,"pop")},push(...e){return Sc(this,"push",e)},reduce(e,...t){return Fw(this,"reduce",e,t)},reduceRight(e,...t){return Fw(this,"reduceRight",e,t)},shift(){return Sc(this,"shift")},some(e,t){return ki(this,"some",e,t,void 0,arguments)},splice(...e){return Sc(this,"splice",e)},toReversed(){return Cl(this).toReversed()},toSorted(e){return Cl(this).toSorted(e)},toSpliced(...e){return Cl(this).toSpliced(...e)},unshift(...e){return Sc(this,"unshift",e)},values(){return bg(this,"values",e=>wo(this,e))}};function bg(e,t,n){const r=am(e),s=r[t]();return r!==e&&!Jr(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=n(i.value)),i}),s}const ML=Array.prototype;function ki(e,t,n,r,s,i){const o=am(e),a=o!==e&&!Jr(e),l=o[t];if(l!==ML[t]){const d=l.apply(e,i);return a?Ns(d):d}let u=n;o!==e&&(a?u=function(d,f){return n.call(this,wo(e,d),f,e)}:n.length>2&&(u=function(d,f){return n.call(this,d,f,e)}));const c=l.call(o,u,r);return a&&s?s(c):c}function Fw(e,t,n,r){const s=am(e);let i=n;return s!==e&&(Jr(e)?n.length>3&&(i=function(o,a,l){return n.call(this,o,a,l,e)}):i=function(o,a,l){return n.call(this,o,wo(e,a),l,e)}),s[t](i,...r)}function wg(e,t,n){const r=Ue(e);ir(r,"iterate",hd);const s=r[t](...n);return(s===-1||s===!1)&&ju(n[0])?(n[0]=Ue(n[0]),r[t](...n)):s}function Sc(e,t,n=[]){Xi(),Yb();const r=Ue(e)[t].apply(e,n);return Xb(),Qi(),r}const LL=Wb("__proto__,__v_isRef,__isVue"),ST=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ao));function FL(e){ao(e)||(e=String(e));const t=Ue(this);return ir(t,"has",e),t.hasOwnProperty(e)}class _T{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?RT:TT:i?CT:ET).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const o=Ye(t);if(!s){let l;if(o&&(l=DL[n]))return l;if(n==="hasOwnProperty")return FL}const a=Reflect.get(t,n,nt(t)?t:r);if((ao(n)?ST.has(n):LL(n))||(s||ir(t,"get",n),i))return a;if(nt(a)){const l=o&&sm(n)?a:a.value;return s&&jt(l)?Ji(l):l}return jt(a)?s?Ji(a):gn(a):a}}class kT extends _T{constructor(t=!1){super(!1,t)}set(t,n,r,s){let i=t[n];const o=Ye(t)&&sm(n);if(!this._isShallow){const u=Zi(i);if(!Jr(r)&&!Zi(r)&&(i=Ue(i),r=Ue(r)),!o&&nt(i)&&!nt(r))return u||(i.value=r),!0}const a=o?Number(n)<t.length:It(t,n),l=Reflect.set(t,n,r,nt(t)?t:s);return t===Ue(s)&&(a?Bo(r,i)&&Ui(t,"set",n,r):Ui(t,"add",n,r)),l}deleteProperty(t,n){const r=It(t,n);t[n];const s=Reflect.deleteProperty(t,n);return s&&r&&Ui(t,"delete",n,void 0),s}has(t,n){const r=Reflect.has(t,n);return(!ao(n)||!ST.has(n))&&ir(t,"has",n),r}ownKeys(t){return ir(t,"iterate",Ye(t)?"length":Ha),Reflect.ownKeys(t)}}class xT extends _T{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const $L=new kT,NL=new xT,BL=new kT(!0),VL=new xT(!0),Gv=e=>e,Pf=e=>Reflect.getPrototypeOf(e);function UL(e,t,n){return function(...r){const s=this.__v_raw,i=Ue(s),o=Zl(i),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,u=s[e](...r),c=n?Gv:t?bu:Ns;return!t&&ir(i,"iterate",l?qv:Ha),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:a?[c(d[0]),c(d[1])]:c(d),done:f}},[Symbol.iterator](){return this}}}}function If(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function zL(e,t){const n={get(s){const i=this.__v_raw,o=Ue(i),a=Ue(s);e||(Bo(s,a)&&ir(o,"get",s),ir(o,"get",a));const{has:l}=Pf(o),u=t?Gv:e?bu:Ns;if(l.call(o,s))return u(i.get(s));if(l.call(o,a))return u(i.get(a));i!==o&&i.get(s)},get size(){const s=this.__v_raw;return!e&&ir(Ue(s),"iterate",Ha),s.size},has(s){const i=this.__v_raw,o=Ue(i),a=Ue(s);return e||(Bo(s,a)&&ir(o,"has",s),ir(o,"has",a)),s===a?i.has(s):i.has(s)||i.has(a)},forEach(s,i){const o=this,a=o.__v_raw,l=Ue(a),u=t?Gv:e?bu:Ns;return!e&&ir(l,"iterate",Ha),a.forEach((c,d)=>s.call(i,u(c),u(d),o))}};return kn(n,e?{add:If("add"),set:If("set"),delete:If("delete"),clear:If("clear")}:{add(s){!t&&!Jr(s)&&!Zi(s)&&(s=Ue(s));const i=Ue(this);return Pf(i).has.call(i,s)||(i.add(s),Ui(i,"add",s,s)),this},set(s,i){!t&&!Jr(i)&&!Zi(i)&&(i=Ue(i));const o=Ue(this),{has:a,get:l}=Pf(o);let u=a.call(o,s);u||(s=Ue(s),u=a.call(o,s));const c=l.call(o,s);return o.set(s,i),u?Bo(i,c)&&Ui(o,"set",s,i):Ui(o,"add",s,i),this},delete(s){const i=Ue(this),{has:o,get:a}=Pf(i);let l=o.call(i,s);l||(s=Ue(s),l=o.call(i,s)),a&&a.call(i,s);const u=i.delete(s);return l&&Ui(i,"delete",s,void 0),u},clear(){const s=Ue(this),i=s.size!==0,o=s.clear();return i&&Ui(s,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=UL(s,e,t)}),n}function lm(e,t){const n=zL(e,t);return(r,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?r:Reflect.get(It(n,s)&&s in r?n:r,s,i)}const HL={get:lm(!1,!1)},jL={get:lm(!1,!0)},WL={get:lm(!0,!1)},qL={get:lm(!0,!0)},ET=new WeakMap,CT=new WeakMap,TT=new WeakMap,RT=new WeakMap;function GL(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function KL(e){return e.__v_skip||!Object.isExtensible(e)?0:GL(wL(e))}function gn(e){return Zi(e)?e:cm(e,!1,$L,HL,ET)}function um(e){return cm(e,!1,BL,jL,CT)}function Ji(e){return cm(e,!0,NL,WL,TT)}function Zb(e){return cm(e,!0,VL,qL,RT)}function cm(e,t,n,r,s){if(!jt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=KL(e);if(i===0)return e;const o=s.get(e);if(o)return o;const a=new Proxy(e,i===2?r:n);return s.set(e,a),a}function Hi(e){return Zi(e)?Hi(e.__v_raw):!!(e&&e.__v_isReactive)}function Zi(e){return!!(e&&e.__v_isReadonly)}function Jr(e){return!!(e&&e.__v_isShallow)}function ju(e){return e?!!e.__v_raw:!1}function Ue(e){const t=e&&e.__v_raw;return t?Ue(t):e}function dm(e){return!It(e,"__v_skip")&&Object.isExtensible(e)&&lT(e,"__v_skip",!0),e}const Ns=e=>jt(e)?gn(e):e,bu=e=>jt(e)?Ji(e):e;function nt(e){return e?e.__v_isRef===!0:!1}function G(e){return PT(e,!1)}function Ce(e){return PT(e,!0)}function PT(e,t){return nt(e)?e:new YL(e,t)}class YL{constructor(t,n){this.dep=new Jb,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Ue(t),this._value=n?t:Ns(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||Jr(t)||Zi(t);t=r?t:Ue(t),Bo(t,n)&&(this._rawValue=t,this._value=r?t:Ns(t),this.dep.trigger())}}function Z(e){return nt(e)?e.value:e}function Qt(e){return et(e)?e():Z(e)}const XL={get:(e,t,n)=>t==="__v_raw"?e:Z(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 IT(e){return Hi(e)?e:new Proxy(e,XL)}function vl(e){const t=Ye(e)?new Array(e.length):{};for(const n in e)t[n]=AT(e,n);return t}class QL{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0,this._raw=Ue(t);let s=!0,i=t;if(!Ye(t)||!sm(String(n)))do s=!ju(i)||Jr(i);while(s&&(i=i.__v_raw));this._shallow=s}get value(){let t=this._object[this._key];return this._shallow&&(t=Z(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 OL(this._raw,this._key)}}class JL{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 ie(e,t,n){return nt(e)?e:et(e)?new JL(e):jt(e)&&arguments.length>1?AT(e,t,n):G(e)}function AT(e,t,n){return new QL(e,t,n)}class ZL{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Jb(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=fd-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&Gt!==this)return mT(this,!0),!0}get value(){const t=this.dep.track();return yT(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function eF(e,t,n=!1){let r,s;return et(e)?r=e:(r=e.get,s=e.set),new ZL(r,s,n)}const Af={},tp=new WeakMap;let wa;function tF(e,t=!1,n=wa){if(n){let r=tp.get(n);r||tp.set(n,r=[]),r.push(e)}}function nF(e,t,n=Vt){const{immediate:r,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=n,u=_=>s?_:Jr(_)||s===!1||s===0?zi(_,1):zi(_);let c,d,f,h,g=!1,m=!1;if(nt(e)?(d=()=>e.value,g=Jr(e)):Hi(e)?(d=()=>u(e),g=!0):Ye(e)?(m=!0,g=e.some(_=>Hi(_)||Jr(_)),d=()=>e.map(_=>{if(nt(_))return _.value;if(Hi(_))return u(_);if(et(_))return l?l(_,2):_()})):et(e)?t?d=l?()=>l(e,2):e:d=()=>{if(f){Xi();try{f()}finally{Qi()}}const _=wa;wa=c;try{return l?l(e,3,[h]):e(h)}finally{wa=_}}:d=mi,t&&s){const _=d,k=s===!0?1/0:s;d=()=>zi(_(),k)}const y=Xd(),w=()=>{c.stop(),y&&y.active&&Gb(y.effects,c)};if(i&&t){const _=t;t=(...k)=>{_(...k),w()}}let b=m?new Array(e.length).fill(Af):Af;const S=_=>{if(!(!(c.flags&1)||!c.dirty&&!_))if(t){const k=c.run();if(s||g||(m?k.some((T,R)=>Bo(T,b[R])):Bo(k,b))){f&&f();const T=wa;wa=c;try{const R=[k,b===Af?void 0:m&&b[0]===Af?[]:b,h];b=k,l?l(t,3,R):t(...R)}finally{wa=T}}}else c.run()};return a&&a(S),c=new hT(d),c.scheduler=o?()=>o(S,!1):S,h=_=>tF(_,!1,c),f=c.onStop=()=>{const _=tp.get(c);if(_){if(l)l(_,4);else for(const k of _)k();tp.delete(c)}},t?r?S(!0):b=c.run():o?o(S.bind(null,!0),!0):c.run(),w.pause=c.pause.bind(c),w.resume=c.resume.bind(c),w.stop=w,w}function zi(e,t=1/0,n){if(t<=0||!jt(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,nt(e))zi(e.value,t,n);else if(Ye(e))for(let r=0;r<e.length;r++)zi(e[r],t,n);else if(sT(e)||Zl(e))e.forEach(r=>{zi(r,t,n)});else if(aT(e)){for(const r in e)zi(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&zi(e[r],t,n)}return e}/**
|
|
10
|
+
* @vue/runtime-core v3.5.26
|
|
11
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
12
|
+
* @license MIT
|
|
13
|
+
**/function Qd(e,t,n,r){try{return r?e(...r):e()}catch(s){fm(s,t,n)}}function Bs(e,t,n,r){if(et(e)){const s=Qd(e,t,n,r);return s&&iT(s)&&s.catch(i=>{fm(i,t,n)}),s}if(Ye(e)){const s=[];for(let i=0;i<e.length;i++)s.push(Bs(e[i],t,n,r));return s}}function fm(e,t,n,r=!0){const s=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||Vt;if(t){let a=t.parent;const l=t.proxy,u=`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const c=a.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,l,u)===!1)return}a=a.parent}if(i){Xi(),Qd(i,null,10,[e,l,u]),Qi();return}}rF(e,n,s,r,o)}function rF(e,t,n,r=!0,s=!1){if(s)throw e;console.error(e)}const yr=[];let ii=-1;const eu=[];let So=null,Nl=0;const OT=Promise.resolve();let np=null;function ht(e){const t=np||OT;return e?t.then(this?e.bind(this):e):t}function sF(e){let t=ii+1,n=yr.length;for(;t<n;){const r=t+n>>>1,s=yr[r],i=pd(s);i<e||i===e&&s.flags&2?t=r+1:n=r}return t}function e0(e){if(!(e.flags&1)){const t=pd(e),n=yr[yr.length-1];!n||!(e.flags&2)&&t>=pd(n)?yr.push(e):yr.splice(sF(t),0,e),e.flags|=1,DT()}}function DT(){np||(np=OT.then(LT))}function iF(e){Ye(e)?eu.push(...e):So&&e.id===-1?So.splice(Nl+1,0,e):e.flags&1||(eu.push(e),e.flags|=1),DT()}function $w(e,t,n=ii+1){for(;n<yr.length;n++){const r=yr[n];if(r&&r.flags&2){if(e&&r.id!==e.uid)continue;yr.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function MT(e){if(eu.length){const t=[...new Set(eu)].sort((n,r)=>pd(n)-pd(r));if(eu.length=0,So){So.push(...t);return}for(So=t,Nl=0;Nl<So.length;Nl++){const n=So[Nl];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}So=null,Nl=0}}const pd=e=>e.id==null?e.flags&2?-1:1/0:e.id;function LT(e){try{for(ii=0;ii<yr.length;ii++){const t=yr[ii];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Qd(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;ii<yr.length;ii++){const t=yr[ii];t&&(t.flags&=-2)}ii=-1,yr.length=0,MT(),np=null,(yr.length||eu.length)&<()}}let Gn=null,FT=null;function rp(e){const t=Gn;return Gn=e,FT=e&&e.type.__scopeId||null,t}function v(e,t=Gn,n){if(!t||e._n)return e;const r=(...s)=>{r._d&&op(-1);const i=rp(t);let o;try{o=e(...s)}finally{rp(i),r._d&&op(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function zt(e,t){if(Gn===null)return e;const n=ym(Gn),r=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[i,o,a,l=Vt]=t[s];i&&(et(i)&&(i={mounted:i,updated:i}),i.deep&&zi(o),r.push({dir:i,instance:n,value:o,oldValue:void 0,arg:a,modifiers:l}))}return e}function da(e,t,n,r){const s=e.dirs,i=t&&t.dirs;for(let o=0;o<s.length;o++){const a=s[o];i&&(a.oldValue=i[o].value);let l=a.dir[r];l&&(Xi(),Bs(l,n,8,[e.el,a,e,t]),Qi())}}function Jt(e,t){if(or){let n=or.provides;const r=or.parent&&or.parent.provides;r===n&&(n=or.provides=Object.create(r)),n[e]=t}}function Xe(e,t,n=!1){const r=qu();if(r||ja){let s=ja?ja._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&&et(t)?t.call(r&&r.proxy):t}}function $T(){return!!(qu()||ja)}const oF=Symbol.for("v-scx"),aF=()=>Xe(oF);function Rn(e,t){return t0(e,null,t)}function xe(e,t,n){return t0(e,t,n)}function t0(e,t,n=Vt){const{immediate:r,deep:s,flush:i,once:o}=n,a=kn({},n),l=t&&r||!t&&i!=="post";let u;if(yd){if(i==="sync"){const h=aF();u=h.__watcherHandles||(h.__watcherHandles=[])}else if(!l){const h=()=>{};return h.stop=mi,h.resume=mi,h.pause=mi,h}}const c=or;a.call=(h,g,m)=>Bs(h,c,g,m);let d=!1;i==="post"?a.scheduler=h=>{gr(h,c&&c.suspense)}:i!=="sync"&&(d=!0,a.scheduler=(h,g)=>{g?h():e0(h)}),a.augmentJob=h=>{t&&(h.flags|=4),d&&(h.flags|=2,c&&(h.id=c.uid,h.i=c))};const f=nF(e,t,a);return yd&&(u?u.push(f):l&&f()),f}function lF(e,t,n){const r=this.proxy,s=an(e)?e.includes(".")?NT(r,e):()=>r[e]:e.bind(r,r);let i;et(t)?i=t:(i=t.handler,n=t);const o=Zd(this),a=t0(s,i.bind(r),n);return o(),a}function NT(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 BT=Symbol("_vte"),VT=e=>e.__isTeleport,Kc=e=>e&&(e.disabled||e.disabled===""),Nw=e=>e&&(e.defer||e.defer===""),Bw=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Vw=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Kv=(e,t)=>{const n=e&&e.to;return an(n)?t?t(n):null:n},UT={name:"Teleport",__isTeleport:!0,process(e,t,n,r,s,i,o,a,l,u){const{mc:c,pc:d,pbc:f,o:{insert:h,querySelector:g,createText:m,createComment:y}}=u,w=Kc(t.props);let{shapeFlag:b,children:S,dynamicChildren:_}=t;if(e==null){const k=t.el=m(""),T=t.anchor=m("");h(k,n,r),h(T,n,r);const R=(I,P)=>{b&16&&c(S,I,P,s,i,o,a,l)},x=()=>{const I=t.target=Kv(t.props,g),P=zT(I,t,m,h);I&&(o!=="svg"&&Bw(I)?o="svg":o!=="mathml"&&Vw(I)&&(o="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(I),w||(R(I,P),bh(t,!1)))};w&&(R(n,T),bh(t,!0)),Nw(t.props)?(t.el.__isMounted=!1,gr(()=>{x(),delete t.el.__isMounted},i)):x()}else{if(Nw(t.props)&&e.el.__isMounted===!1){gr(()=>{UT.process(e,t,n,r,s,i,o,a,l,u)},i);return}t.el=e.el,t.targetStart=e.targetStart;const k=t.anchor=e.anchor,T=t.target=e.target,R=t.targetAnchor=e.targetAnchor,x=Kc(e.props),I=x?n:T,P=x?k:R;if(o==="svg"||Bw(T)?o="svg":(o==="mathml"||Vw(T))&&(o="mathml"),_?(f(e.dynamicChildren,_,I,s,i,o,a),c0(e,t,!0)):l||d(e,t,I,P,s,i,o,a,!1),w)x?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Of(t,n,k,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const A=t.target=Kv(t.props,g);A&&Of(t,A,null,u,0)}else x&&Of(t,T,R,u,1);bh(t,w)}},remove(e,t,n,{um:r,o:{remove:s}},i){const{shapeFlag:o,children:a,anchor:l,targetStart:u,targetAnchor:c,target:d,props:f}=e;if(d&&(s(u),s(c)),i&&s(l),o&16){const h=i||!Kc(f);for(let g=0;g<a.length;g++){const m=a[g];r(m,t,n,h,!!m.dynamicChildren)}}},move:Of,hydrate:uF};function Of(e,t,n,{o:{insert:r},m:s},i=2){i===0&&r(e.targetAnchor,t,n);const{el:o,anchor:a,shapeFlag:l,children:u,props:c}=e,d=i===2;if(d&&r(o,t,n),(!d||Kc(c))&&l&16)for(let f=0;f<u.length;f++)s(u[f],t,n,2);d&&r(a,t,n)}function uF(e,t,n,r,s,i,{o:{nextSibling:o,parentNode:a,querySelector:l,insert:u,createText:c}},d){function f(m,y,w,b){y.anchor=d(o(m),y,a(m),n,r,s,i),y.targetStart=w,y.targetAnchor=b}const h=t.target=Kv(t.props,l),g=Kc(t.props);if(h){const m=h._lpa||h.firstChild;if(t.shapeFlag&16)if(g)f(e,t,m,m&&o(m));else{t.anchor=o(e);let y=m;for(;y;){if(y&&y.nodeType===8){if(y.data==="teleport start anchor")t.targetStart=y;else if(y.data==="teleport anchor"){t.targetAnchor=y,h._lpa=t.targetAnchor&&o(t.targetAnchor);break}}y=o(y)}t.targetAnchor||zT(h,t,c,u),d(m&&o(m),t,h,n,r,s,i)}bh(t,g)}else g&&t.shapeFlag&16&&f(e,t,e,o(e));return t.anchor&&o(t.anchor)}const cF=UT;function bh(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 zT(e,t,n,r){const s=t.targetStart=n(""),i=t.targetAnchor=n("");return s[BT]=i,e&&(r(s,e),r(i,e)),i}const Li=Symbol("_leaveCb"),Df=Symbol("_enterCb");function HT(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return xt(()=>{e.isMounted=!0}),Qn(()=>{e.isUnmounting=!0}),e}const rs=[Function,Array],jT={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:rs,onEnter:rs,onAfterEnter:rs,onEnterCancelled:rs,onBeforeLeave:rs,onLeave:rs,onAfterLeave:rs,onLeaveCancelled:rs,onBeforeAppear:rs,onAppear:rs,onAfterAppear:rs,onAppearCancelled:rs},WT=e=>{const t=e.subTree;return t.component?WT(t.component):t},dF={name:"BaseTransition",props:jT,setup(e,{slots:t}){const n=qu(),r=HT();return()=>{const s=t.default&&n0(t.default(),!0);if(!s||!s.length)return;const i=qT(s),o=Ue(e),{mode:a}=o;if(r.isLeaving)return Sg(i);const l=Uw(i);if(!l)return Sg(i);let u=md(l,o,r,n,d=>u=d);l.type!==qn&&sl(l,u);let c=n.subTree&&Uw(n.subTree);if(c&&c.type!==qn&&!xa(c,l)&&WT(n).type!==qn){let d=md(c,o,r,n);if(sl(c,d),a==="out-in"&&l.type!==qn)return r.isLeaving=!0,d.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,c=void 0},Sg(i);a==="in-out"&&l.type!==qn?d.delayLeave=(f,h,g)=>{const m=GT(r,c);m[String(c.key)]=c,f[Li]=()=>{h(),f[Li]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{g(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return i}}};function qT(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==qn){t=n;break}}return t}const fF=dF;function GT(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 md(e,t,n,r,s){const{appear:i,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:h,onAfterLeave:g,onLeaveCancelled:m,onBeforeAppear:y,onAppear:w,onAfterAppear:b,onAppearCancelled:S}=t,_=String(e.key),k=GT(n,e),T=(I,P)=>{I&&Bs(I,r,9,P)},R=(I,P)=>{const A=P[1];T(I,P),Ye(I)?I.every(L=>L.length<=1)&&A():I.length<=1&&A()},x={mode:o,persisted:a,beforeEnter(I){let P=l;if(!n.isMounted)if(i)P=y||l;else return;I[Li]&&I[Li](!0);const A=k[_];A&&xa(e,A)&&A.el[Li]&&A.el[Li](),T(P,[I])},enter(I){let P=u,A=c,L=d;if(!n.isMounted)if(i)P=w||u,A=b||c,L=S||d;else return;let B=!1;const O=I[Df]=F=>{B||(B=!0,F?T(L,[I]):T(A,[I]),x.delayedLeave&&x.delayedLeave(),I[Df]=void 0)};P?R(P,[I,O]):O()},leave(I,P){const A=String(e.key);if(I[Df]&&I[Df](!0),n.isUnmounting)return P();T(f,[I]);let L=!1;const B=I[Li]=O=>{L||(L=!0,P(),O?T(m,[I]):T(g,[I]),I[Li]=void 0,k[A]===e&&delete k[A])};k[A]=e,h?R(h,[I,B]):B()},clone(I){const P=md(I,t,n,r,s);return s&&s(P),P}};return x}function Sg(e){if(hm(e))return e=eo(e),e.children=null,e}function Uw(e){if(!hm(e))return VT(e.type)&&e.children?qT(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&&et(n.default))return n.default()}}function sl(e,t){e.shapeFlag&6&&e.component?(e.transition=t,sl(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 n0(e,t=!1,n){let r=[],s=0;for(let i=0;i<e.length;i++){let o=e[i];const a=n==null?o.key:String(n)+String(o.key!=null?o.key:i);o.type===De?(o.patchFlag&128&&s++,r=r.concat(n0(o.children,t,a))):(t||o.type!==qn)&&r.push(a!=null?eo(o,{key:a}):o)}if(s>1)for(let i=0;i<r.length;i++)r[i].patchFlag=-2;return r}function Ve(e,t){return et(e)?kn({name:e.name},t,{setup:e}):e}function jr(){const e=qu();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function KT(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const sp=new WeakMap;function Yc(e,t,n,r,s=!1){if(Ye(e)){e.forEach((g,m)=>Yc(g,t&&(Ye(t)?t[m]:t),n,r,s));return}if(tu(r)&&!s){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Yc(e,t,n,r.component.subTree);return}const i=r.shapeFlag&4?ym(r.component):r.el,o=s?null:i,{i:a,r:l}=e,u=t&&t.r,c=a.refs===Vt?a.refs={}:a.refs,d=a.setupState,f=Ue(d),h=d===Vt?rT:g=>It(f,g);if(u!=null&&u!==l){if(zw(t),an(u))c[u]=null,h(u)&&(d[u]=null);else if(nt(u)){u.value=null;const g=t;g.k&&(c[g.k]=null)}}if(et(l))Qd(l,a,12,[o,c]);else{const g=an(l),m=nt(l);if(g||m){const y=()=>{if(e.f){const w=g?h(l)?d[l]:c[l]:l.value;if(s)Ye(w)&&Gb(w,i);else if(Ye(w))w.includes(i)||w.push(i);else if(g)c[l]=[i],h(l)&&(d[l]=c[l]);else{const b=[i];l.value=b,e.k&&(c[e.k]=b)}}else g?(c[l]=o,h(l)&&(d[l]=o)):m&&(l.value=o,e.k&&(c[e.k]=o))};if(o){const w=()=>{y(),sp.delete(e)};w.id=-1,sp.set(e,w),gr(w,n)}else zw(e),y()}}}function zw(e){const t=sp.get(e);t&&(t.flags|=8,sp.delete(e))}om().requestIdleCallback;om().cancelIdleCallback;const tu=e=>!!e.type.__asyncLoader,hm=e=>e.type.__isKeepAlive;function YT(e,t){XT(e,"a",t)}function r0(e,t){XT(e,"da",t)}function XT(e,t,n=or){const r=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(pm(t,r,n),n){let s=n.parent;for(;s&&s.parent;)hm(s.parent.vnode)&&hF(r,t,n,s),s=s.parent}}function hF(e,t,n,r){const s=pm(t,e,r,!0);mm(()=>{Gb(r[t],s)},n)}function pm(e,t,n=or,r=!1){if(n){const s=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{Xi();const a=Zd(n),l=Bs(t,n,e,o);return a(),Qi(),l});return r?s.unshift(i):s.push(i),i}}const lo=e=>(t,n=or)=>{(!yd||e==="sp")&&pm(e,(...r)=>t(...r),n)},Wu=lo("bm"),xt=lo("m"),QT=lo("bu"),s0=lo("u"),Qn=lo("bum"),mm=lo("um"),pF=lo("sp"),mF=lo("rtg"),gF=lo("rtc");function vF(e,t=or){pm("ec",e,t)}const i0="components",yF="directives";function Vn(e,t){return o0(i0,e,!0,t)||e}const bF=Symbol.for("v-ndc");function wF(e){return an(e)&&o0(i0,e,!1)||e}function gd(e){return o0(yF,e)}function o0(e,t,n=!0,r=!1){const s=Gn||or;if(s){const i=s.type;if(e===i0){const a=n$(i,!1);if(a&&(a===t||a===Sr(t)||a===bi(Sr(t))))return i}const o=Hw(s[e]||i[e],t)||Hw(s.appContext[e],t);return!o&&r?i:o}}function Hw(e,t){return e&&(e[t]||e[Sr(t)]||e[bi(Sr(t))])}function Zt(e,t,n,r){let s;const i=n,o=Ye(e);if(o||an(e)){const a=o&&Hi(e);let l=!1,u=!1;a&&(l=!Jr(e),u=Zi(e),e=am(e)),s=new Array(e.length);for(let c=0,d=e.length;c<d;c++)s[c]=t(l?u?bu(Ns(e[c])):Ns(e[c]):e[c],c,void 0,i)}else if(typeof e=="number"){s=new Array(e);for(let a=0;a<e;a++)s[a]=t(a+1,a,void 0,i)}else if(jt(e))if(e[Symbol.iterator])s=Array.from(e,(a,l)=>t(a,l,void 0,i));else{const a=Object.keys(e);s=new Array(a.length);for(let l=0,u=a.length;l<u;l++){const c=a[l];s[l]=t(e[c],c,l,i)}}else s=[];return s}function JT(e,t){for(let n=0;n<t.length;n++){const r=t[n];if(Ye(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 gm(e,t,n={},r,s){if(Gn.ce||Gn.parent&&tu(Gn.parent)&&Gn.parent.ce){const u=Object.keys(n).length>0;return $(),te(De,null,[p("slot",n,r&&r())],u?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),$();const o=i&&ZT(i(n)),a=n.key||o&&o.key,l=te(De,{key:(a&&!ao(a)?a:`_${t}`)+(!o&&r?"_fb":"")},o||(r?r():[]),o&&e._===1?64:-2);return l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),i&&i._c&&(i._d=!0),l}function ZT(e){return e.some(t=>wu(t)?!(t.type===qn||t.type===De&&!ZT(t.children)):!0)?e:null}const Yv=e=>e?gR(e)?ym(e):Yv(e.parent):null,Xc=kn(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=>Yv(e.parent),$root:e=>Yv(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>a0(e),$forceUpdate:e=>e.f||(e.f=()=>{e0(e.update)}),$nextTick:e=>e.n||(e.n=ht.bind(e.proxy)),$watch:e=>lF.bind(e)}),_g=(e,t)=>e!==Vt&&!e.__isScriptSetup&&It(e,t),SF={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:s,props:i,accessCache:o,type:a,appContext:l}=e;if(t[0]!=="$"){const f=o[t];if(f!==void 0)switch(f){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return i[t]}else{if(_g(r,t))return o[t]=1,r[t];if(s!==Vt&&It(s,t))return o[t]=2,s[t];if(It(i,t))return o[t]=3,i[t];if(n!==Vt&&It(n,t))return o[t]=4,n[t];Xv&&(o[t]=0)}}const u=Xc[t];let c,d;if(u)return t==="$attrs"&&ir(e.attrs,"get",""),u(e);if((c=a.__cssModules)&&(c=c[t]))return c;if(n!==Vt&&It(n,t))return o[t]=4,n[t];if(d=l.config.globalProperties,It(d,t))return d[t]},set({_:e},t,n){const{data:r,setupState:s,ctx:i}=e;return _g(s,t)?(s[t]=n,!0):r!==Vt&&It(r,t)?(r[t]=n,!0):It(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:o}},a){let l;return!!(n[a]||e!==Vt&&a[0]!=="$"&&It(e,a)||_g(t,a)||It(i,a)||It(r,a)||It(Xc,a)||It(s.config.globalProperties,a)||(l=o.__cssModules)&&l[a])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:It(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function jw(e){return Ye(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Xv=!0;function _F(e){const t=a0(e),n=e.proxy,r=e.ctx;Xv=!1,t.beforeCreate&&Ww(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:o,watch:a,provide:l,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:h,updated:g,activated:m,deactivated:y,beforeDestroy:w,beforeUnmount:b,destroyed:S,unmounted:_,render:k,renderTracked:T,renderTriggered:R,errorCaptured:x,serverPrefetch:I,expose:P,inheritAttrs:A,components:L,directives:B,filters:O}=t;if(u&&kF(u,r,null),o)for(const X in o){const V=o[X];et(V)&&(r[X]=V.bind(n))}if(s){const X=s.call(n,n);jt(X)&&(e.data=gn(X))}if(Xv=!0,i)for(const X in i){const V=i[X],z=et(V)?V.bind(n,n):et(V.get)?V.get.bind(n,n):mi,M=!et(V)&&et(V.set)?V.set.bind(n):mi,re=D({get:z,set:M});Object.defineProperty(r,X,{enumerable:!0,configurable:!0,get:()=>re.value,set:H=>re.value=H})}if(a)for(const X in a)eR(a[X],r,n,X);if(l){const X=et(l)?l.call(n):l;Reflect.ownKeys(X).forEach(V=>{Jt(V,X[V])})}c&&Ww(c,e,"c");function W(X,V){Ye(V)?V.forEach(z=>X(z.bind(n))):V&&X(V.bind(n))}if(W(Wu,d),W(xt,f),W(QT,h),W(s0,g),W(YT,m),W(r0,y),W(vF,x),W(gF,T),W(mF,R),W(Qn,b),W(mm,_),W(pF,I),Ye(P))if(P.length){const X=e.exposed||(e.exposed={});P.forEach(V=>{Object.defineProperty(X,V,{get:()=>n[V],set:z=>n[V]=z,enumerable:!0})})}else e.exposed||(e.exposed={});k&&e.render===mi&&(e.render=k),A!=null&&(e.inheritAttrs=A),L&&(e.components=L),B&&(e.directives=B),I&&KT(e)}function kF(e,t,n=mi){Ye(e)&&(e=Qv(e));for(const r in e){const s=e[r];let i;jt(s)?"default"in s?i=Xe(s.from||r,s.default,!0):i=Xe(s.from||r):i=Xe(s),nt(i)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[r]=i}}function Ww(e,t,n){Bs(Ye(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function eR(e,t,n,r){let s=r.includes(".")?NT(n,r):()=>n[r];if(an(e)){const i=t[e];et(i)&&xe(s,i)}else if(et(e))xe(s,e.bind(n));else if(jt(e))if(Ye(e))e.forEach(i=>eR(i,t,n,r));else{const i=et(e.handler)?e.handler.bind(n):t[e.handler];et(i)&&xe(s,i,e)}}function a0(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:s,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,a=i.get(t);let l;return a?l=a:!s.length&&!n&&!r?l=t:(l={},s.length&&s.forEach(u=>ip(l,u,o,!0)),ip(l,t,o)),jt(t)&&i.set(t,l),l}function ip(e,t,n,r=!1){const{mixins:s,extends:i}=t;i&&ip(e,i,n,!0),s&&s.forEach(o=>ip(e,o,n,!0));for(const o in t)if(!(r&&o==="expose")){const a=xF[o]||n&&n[o];e[o]=a?a(e[o],t[o]):t[o]}return e}const xF={data:qw,props:Gw,emits:Gw,methods:Nc,computed:Nc,beforeCreate:fr,created:fr,beforeMount:fr,mounted:fr,beforeUpdate:fr,updated:fr,beforeDestroy:fr,beforeUnmount:fr,destroyed:fr,unmounted:fr,activated:fr,deactivated:fr,errorCaptured:fr,serverPrefetch:fr,components:Nc,directives:Nc,watch:CF,provide:qw,inject:EF};function qw(e,t){return t?e?function(){return kn(et(e)?e.call(this,this):e,et(t)?t.call(this,this):t)}:t:e}function EF(e,t){return Nc(Qv(e),Qv(t))}function Qv(e){if(Ye(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function fr(e,t){return e?[...new Set([].concat(e,t))]:t}function Nc(e,t){return e?kn(Object.create(null),e,t):t}function Gw(e,t){return e?Ye(e)&&Ye(t)?[...new Set([...e,...t])]:kn(Object.create(null),jw(e),jw(t??{})):t}function CF(e,t){if(!e)return t;if(!t)return e;const n=kn(Object.create(null),e);for(const r in t)n[r]=fr(e[r],t[r]);return n}function tR(){return{app:null,config:{isNativeTag:rT,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 TF=0;function RF(e,t){return function(r,s=null){et(r)||(r=kn({},r)),s!=null&&!jt(s)&&(s=null);const i=tR(),o=new WeakSet,a=[];let l=!1;const u=i.app={_uid:TF++,_component:r,_props:s,_container:null,_context:i,_instance:null,version:yR,get config(){return i.config},set config(c){},use(c,...d){return o.has(c)||(c&&et(c.install)?(o.add(c),c.install(u,...d)):et(c)&&(o.add(c),c(u,...d))),u},mixin(c){return i.mixins.includes(c)||i.mixins.push(c),u},component(c,d){return d?(i.components[c]=d,u):i.components[c]},directive(c,d){return d?(i.directives[c]=d,u):i.directives[c]},mount(c,d,f){if(!l){const h=u._ceVNode||p(r,s);return h.appContext=i,f===!0?f="svg":f===!1&&(f=void 0),d&&t?t(h,c):e(h,c,f),l=!0,u._container=c,c.__vue_app__=u,ym(h.component)}},onUnmount(c){a.push(c)},unmount(){l&&(Bs(a,u._instance,16),e(null,u._container),delete u._container.__vue_app__)},provide(c,d){return i.provides[c]=d,u},runWithContext(c){const d=ja;ja=u;try{return c()}finally{ja=d}}};return u}}let ja=null;const PF=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Sr(t)}Modifiers`]||e[`${na(t)}Modifiers`];function IF(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Vt;let s=n;const i=t.startsWith("update:"),o=i&&PF(r,t.slice(7));o&&(o.trim&&(s=n.map(c=>an(c)?c.trim():c)),o.number&&(s=n.map(Kb)));let a,l=r[a=gg(t)]||r[a=gg(Sr(t))];!l&&i&&(l=r[a=gg(na(t))]),l&&Bs(l,e,6,s);const u=r[a+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Bs(u,e,6,s)}}const AF=new WeakMap;function nR(e,t,n=!1){const r=n?AF:t.emitsCache,s=r.get(e);if(s!==void 0)return s;const i=e.emits;let o={},a=!1;if(!et(e)){const l=u=>{const c=nR(u,t,!0);c&&(a=!0,kn(o,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!i&&!a?(jt(e)&&r.set(e,null),null):(Ye(i)?i.forEach(l=>o[l]=null):kn(o,i),jt(e)&&r.set(e,o),o)}function vm(e,t){return!e||!nm(t)?!1:(t=t.slice(2).replace(/Once$/,""),It(e,t[0].toLowerCase()+t.slice(1))||It(e,na(t))||It(e,t))}function kg(e){const{type:t,vnode:n,proxy:r,withProxy:s,propsOptions:[i],slots:o,attrs:a,emit:l,render:u,renderCache:c,props:d,data:f,setupState:h,ctx:g,inheritAttrs:m}=e,y=rp(e);let w,b;try{if(n.shapeFlag&4){const _=s||r,k=_;w=ci(u.call(k,_,c,d,h,f,g)),b=a}else{const _=t;w=ci(_.length>1?_(d,{attrs:a,slots:o,emit:l}):_(d,null)),b=t.props?a:OF(a)}}catch(_){Qc.length=0,fm(_,e,1),w=p(qn)}let S=w;if(b&&m!==!1){const _=Object.keys(b),{shapeFlag:k}=S;_.length&&k&7&&(i&&_.some(qb)&&(b=DF(b,i)),S=eo(S,b,!1,!0))}return n.dirs&&(S=eo(S,null,!1,!0),S.dirs=S.dirs?S.dirs.concat(n.dirs):n.dirs),n.transition&&sl(S,n.transition),w=S,rp(y),w}const OF=e=>{let t;for(const n in e)(n==="class"||n==="style"||nm(n))&&((t||(t={}))[n]=e[n]);return t},DF=(e,t)=>{const n={};for(const r in e)(!qb(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function MF(e,t,n){const{props:r,children:s,component:i}=e,{props:o,children:a,patchFlag:l}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?Kw(r,o,u):!!o;if(l&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(o[f]!==r[f]&&!vm(u,f))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:r===o?!1:r?o?Kw(r,o,u):!0:!!o;return!1}function Kw(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]&&!vm(n,i))return!0}return!1}function LF({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 rR={},sR=()=>Object.create(rR),iR=e=>Object.getPrototypeOf(e)===rR;function FF(e,t,n,r=!1){const s={},i=sR();e.propsDefaults=Object.create(null),oR(e,t,s,i);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);n?e.props=r?s:um(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function $F(e,t,n,r){const{props:s,attrs:i,vnode:{patchFlag:o}}=e,a=Ue(s),[l]=e.propsOptions;let u=!1;if((r||o>0)&&!(o&16)){if(o&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let f=c[d];if(vm(e.emitsOptions,f))continue;const h=t[f];if(l)if(It(i,f))h!==i[f]&&(i[f]=h,u=!0);else{const g=Sr(f);s[g]=Jv(l,a,g,h,e,!1)}else h!==i[f]&&(i[f]=h,u=!0)}}}else{oR(e,t,s,i)&&(u=!0);let c;for(const d in a)(!t||!It(t,d)&&((c=na(d))===d||!It(t,c)))&&(l?n&&(n[d]!==void 0||n[c]!==void 0)&&(s[d]=Jv(l,a,d,void 0,e,!0)):delete s[d]);if(i!==a)for(const d in i)(!t||!It(t,d))&&(delete i[d],u=!0)}u&&Ui(e.attrs,"set","")}function oR(e,t,n,r){const[s,i]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(Wc(l))continue;const u=t[l];let c;s&&It(s,c=Sr(l))?!i||!i.includes(c)?n[c]=u:(a||(a={}))[c]=u:vm(e.emitsOptions,l)||(!(l in r)||u!==r[l])&&(r[l]=u,o=!0)}if(i){const l=Ue(n),u=a||Vt;for(let c=0;c<i.length;c++){const d=i[c];n[d]=Jv(s,l,d,u[d],e,!It(u,d))}}return o}function Jv(e,t,n,r,s,i){const o=e[n];if(o!=null){const a=It(o,"default");if(a&&r===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&et(l)){const{propsDefaults:u}=s;if(n in u)r=u[n];else{const c=Zd(s);r=u[n]=l.call(null,t),c()}}else r=l;s.ce&&s.ce._setProp(n,r)}o[0]&&(i&&!a?r=!1:o[1]&&(r===""||r===na(n))&&(r=!0))}return r}const NF=new WeakMap;function aR(e,t,n=!1){const r=n?NF:t.propsCache,s=r.get(e);if(s)return s;const i=e.props,o={},a=[];let l=!1;if(!et(e)){const c=d=>{l=!0;const[f,h]=aR(d,t,!0);kn(o,f),h&&a.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!i&&!l)return jt(e)&&r.set(e,Jl),Jl;if(Ye(i))for(let c=0;c<i.length;c++){const d=Sr(i[c]);Yw(d)&&(o[d]=Vt)}else if(i)for(const c in i){const d=Sr(c);if(Yw(d)){const f=i[c],h=o[d]=Ye(f)||et(f)?{type:f}:kn({},f),g=h.type;let m=!1,y=!0;if(Ye(g))for(let w=0;w<g.length;++w){const b=g[w],S=et(b)&&b.name;if(S==="Boolean"){m=!0;break}else S==="String"&&(y=!1)}else m=et(g)&&g.name==="Boolean";h[0]=m,h[1]=y,(m||It(h,"default"))&&a.push(d)}}const u=[o,a];return jt(e)&&r.set(e,u),u}function Yw(e){return e[0]!=="$"&&!Wc(e)}const l0=e=>e==="_"||e==="_ctx"||e==="$stable",u0=e=>Ye(e)?e.map(ci):[ci(e)],BF=(e,t,n)=>{if(t._n)return t;const r=v((...s)=>u0(t(...s)),n);return r._c=!1,r},lR=(e,t,n)=>{const r=e._ctx;for(const s in e){if(l0(s))continue;const i=e[s];if(et(i))t[s]=BF(s,i,r);else if(i!=null){const o=u0(i);t[s]=()=>o}}},uR=(e,t)=>{const n=u0(t);e.slots.default=()=>n},cR=(e,t,n)=>{for(const r in t)(n||!l0(r))&&(e[r]=t[r])},VF=(e,t,n)=>{const r=e.slots=sR();if(e.vnode.shapeFlag&32){const s=t._;s?(cR(r,t,n),n&&lT(r,"_",s,!0)):lR(t,r)}else t&&uR(e,t)},UF=(e,t,n)=>{const{vnode:r,slots:s}=e;let i=!0,o=Vt;if(r.shapeFlag&32){const a=t._;a?n&&a===1?i=!1:cR(s,t,n):(i=!t.$stable,lR(t,s)),o=t}else t&&(uR(e,t),o={default:1});if(i)for(const a in s)!l0(a)&&o[a]==null&&delete s[a]},gr=qF;function zF(e){return HF(e)}function HF(e,t){const n=om();n.__VUE__=!0;const{insert:r,remove:s,patchProp:i,createElement:o,createText:a,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:h=mi,insertStaticContent:g}=e,m=(N,U,Y,le=null,oe=null,me=null,Pe=void 0,be=null,_e=!!U.dynamicChildren)=>{if(N===U)return;N&&!xa(N,U)&&(le=q(N),H(N,oe,me,!0),N=null),U.patchFlag===-2&&(_e=!1,U.dynamicChildren=null);const{type:fe,ref:Ne,shapeFlag:Ie}=U;switch(fe){case Jd:y(N,U,Y,le);break;case qn:w(N,U,Y,le);break;case Eg:N==null&&b(U,Y,le,Pe);break;case De:L(N,U,Y,le,oe,me,Pe,be,_e);break;default:Ie&1?k(N,U,Y,le,oe,me,Pe,be,_e):Ie&6?B(N,U,Y,le,oe,me,Pe,be,_e):(Ie&64||Ie&128)&&fe.process(N,U,Y,le,oe,me,Pe,be,_e,K)}Ne!=null&&oe?Yc(Ne,N&&N.ref,me,U||N,!U):Ne==null&&N&&N.ref!=null&&Yc(N.ref,null,me,N,!0)},y=(N,U,Y,le)=>{if(N==null)r(U.el=a(U.children),Y,le);else{const oe=U.el=N.el;U.children!==N.children&&u(oe,U.children)}},w=(N,U,Y,le)=>{N==null?r(U.el=l(U.children||""),Y,le):U.el=N.el},b=(N,U,Y,le)=>{[N.el,N.anchor]=g(N.children,U,Y,le,N.el,N.anchor)},S=({el:N,anchor:U},Y,le)=>{let oe;for(;N&&N!==U;)oe=f(N),r(N,Y,le),N=oe;r(U,Y,le)},_=({el:N,anchor:U})=>{let Y;for(;N&&N!==U;)Y=f(N),s(N),N=Y;s(U)},k=(N,U,Y,le,oe,me,Pe,be,_e)=>{if(U.type==="svg"?Pe="svg":U.type==="math"&&(Pe="mathml"),N==null)T(U,Y,le,oe,me,Pe,be,_e);else{const fe=N.el&&N.el._isVueCE?N.el:null;try{fe&&fe._beginPatch(),I(N,U,oe,me,Pe,be,_e)}finally{fe&&fe._endPatch()}}},T=(N,U,Y,le,oe,me,Pe,be)=>{let _e,fe;const{props:Ne,shapeFlag:Ie,transition:Te,dirs:Ke}=N;if(_e=N.el=o(N.type,me,Ne&&Ne.is,Ne),Ie&8?c(_e,N.children):Ie&16&&x(N.children,_e,null,le,oe,xg(N,me),Pe,be),Ke&&da(N,null,le,"created"),R(_e,N,N.scopeId,Pe,le),Ne){for(const Wt in Ne)Wt!=="value"&&!Wc(Wt)&&i(_e,Wt,null,Ne[Wt],me,le);"value"in Ne&&i(_e,"value",null,Ne.value,me),(fe=Ne.onVnodeBeforeMount)&&Js(fe,le,N)}Ke&&da(N,null,le,"beforeMount");const wt=jF(oe,Te);wt&&Te.beforeEnter(_e),r(_e,U,Y),((fe=Ne&&Ne.onVnodeMounted)||wt||Ke)&&gr(()=>{fe&&Js(fe,le,N),wt&&Te.enter(_e),Ke&&da(N,null,le,"mounted")},oe)},R=(N,U,Y,le,oe)=>{if(Y&&h(N,Y),le)for(let me=0;me<le.length;me++)h(N,le[me]);if(oe){let me=oe.subTree;if(U===me||hR(me.type)&&(me.ssContent===U||me.ssFallback===U)){const Pe=oe.vnode;R(N,Pe,Pe.scopeId,Pe.slotScopeIds,oe.parent)}}},x=(N,U,Y,le,oe,me,Pe,be,_e=0)=>{for(let fe=_e;fe<N.length;fe++){const Ne=N[fe]=be?_o(N[fe]):ci(N[fe]);m(null,Ne,U,Y,le,oe,me,Pe,be)}},I=(N,U,Y,le,oe,me,Pe)=>{const be=U.el=N.el;let{patchFlag:_e,dynamicChildren:fe,dirs:Ne}=U;_e|=N.patchFlag&16;const Ie=N.props||Vt,Te=U.props||Vt;let Ke;if(Y&&fa(Y,!1),(Ke=Te.onVnodeBeforeUpdate)&&Js(Ke,Y,U,N),Ne&&da(U,N,Y,"beforeUpdate"),Y&&fa(Y,!0),(Ie.innerHTML&&Te.innerHTML==null||Ie.textContent&&Te.textContent==null)&&c(be,""),fe?P(N.dynamicChildren,fe,be,Y,le,xg(U,oe),me):Pe||V(N,U,be,null,Y,le,xg(U,oe),me,!1),_e>0){if(_e&16)A(be,Ie,Te,Y,oe);else if(_e&2&&Ie.class!==Te.class&&i(be,"class",null,Te.class,oe),_e&4&&i(be,"style",Ie.style,Te.style,oe),_e&8){const wt=U.dynamicProps;for(let Wt=0;Wt<wt.length;Wt++){const Mt=wt[Wt],Rr=Ie[Mt],tr=Te[Mt];(tr!==Rr||Mt==="value")&&i(be,Mt,Rr,tr,oe,Y)}}_e&1&&N.children!==U.children&&c(be,U.children)}else!Pe&&fe==null&&A(be,Ie,Te,Y,oe);((Ke=Te.onVnodeUpdated)||Ne)&&gr(()=>{Ke&&Js(Ke,Y,U,N),Ne&&da(U,N,Y,"updated")},le)},P=(N,U,Y,le,oe,me,Pe)=>{for(let be=0;be<U.length;be++){const _e=N[be],fe=U[be],Ne=_e.el&&(_e.type===De||!xa(_e,fe)||_e.shapeFlag&198)?d(_e.el):Y;m(_e,fe,Ne,null,le,oe,me,Pe,!0)}},A=(N,U,Y,le,oe)=>{if(U!==Y){if(U!==Vt)for(const me in U)!Wc(me)&&!(me in Y)&&i(N,me,U[me],null,oe,le);for(const me in Y){if(Wc(me))continue;const Pe=Y[me],be=U[me];Pe!==be&&me!=="value"&&i(N,me,be,Pe,oe,le)}"value"in Y&&i(N,"value",U.value,Y.value,oe)}},L=(N,U,Y,le,oe,me,Pe,be,_e)=>{const fe=U.el=N?N.el:a(""),Ne=U.anchor=N?N.anchor:a("");let{patchFlag:Ie,dynamicChildren:Te,slotScopeIds:Ke}=U;Ke&&(be=be?be.concat(Ke):Ke),N==null?(r(fe,Y,le),r(Ne,Y,le),x(U.children||[],Y,Ne,oe,me,Pe,be,_e)):Ie>0&&Ie&64&&Te&&N.dynamicChildren&&N.dynamicChildren.length===Te.length?(P(N.dynamicChildren,Te,Y,oe,me,Pe,be),(U.key!=null||oe&&U===oe.subTree)&&c0(N,U,!0)):V(N,U,Y,Ne,oe,me,Pe,be,_e)},B=(N,U,Y,le,oe,me,Pe,be,_e)=>{U.slotScopeIds=be,N==null?U.shapeFlag&512?oe.ctx.activate(U,Y,le,Pe,_e):O(U,Y,le,oe,me,Pe,_e):F(N,U,_e)},O=(N,U,Y,le,oe,me,Pe)=>{const be=N.component=QF(N,le,oe);if(hm(N)&&(be.ctx.renderer=K),JF(be,!1,Pe),be.asyncDep){if(oe&&oe.registerDep(be,W,Pe),!N.el){const _e=be.subTree=p(qn);w(null,_e,U,Y),N.placeholder=_e.el}}else W(be,N,U,Y,oe,me,Pe)},F=(N,U,Y)=>{const le=U.component=N.component;if(MF(N,U,Y))if(le.asyncDep&&!le.asyncResolved){X(le,U,Y);return}else le.next=U,le.update();else U.el=N.el,le.vnode=U},W=(N,U,Y,le,oe,me,Pe)=>{const be=()=>{if(N.isMounted){let{next:Ie,bu:Te,u:Ke,parent:wt,vnode:Wt}=N;{const Gr=dR(N);if(Gr){Ie&&(Ie.el=Wt.el,X(N,Ie,Pe)),Gr.asyncDep.then(()=>{N.isUnmounted||be()});return}}let Mt=Ie,Rr;fa(N,!1),Ie?(Ie.el=Wt.el,X(N,Ie,Pe)):Ie=Wt,Te&&yh(Te),(Rr=Ie.props&&Ie.props.onVnodeBeforeUpdate)&&Js(Rr,wt,Ie,Wt),fa(N,!0);const tr=kg(N),Rs=N.subTree;N.subTree=tr,m(Rs,tr,d(Rs.el),q(Rs),N,oe,me),Ie.el=tr.el,Mt===null&&LF(N,tr.el),Ke&&gr(Ke,oe),(Rr=Ie.props&&Ie.props.onVnodeUpdated)&&gr(()=>Js(Rr,wt,Ie,Wt),oe)}else{let Ie;const{el:Te,props:Ke}=U,{bm:wt,m:Wt,parent:Mt,root:Rr,type:tr}=N,Rs=tu(U);if(fa(N,!1),wt&&yh(wt),!Rs&&(Ie=Ke&&Ke.onVnodeBeforeMount)&&Js(Ie,Mt,U),fa(N,!0),Te&&Re){const Gr=()=>{N.subTree=kg(N),Re(Te,N.subTree,N,oe,null)};Rs&&tr.__asyncHydrate?tr.__asyncHydrate(Te,N,Gr):Gr()}else{Rr.ce&&Rr.ce._def.shadowRoot!==!1&&Rr.ce._injectChildStyle(tr);const Gr=N.subTree=kg(N);m(null,Gr,Y,le,N,oe,me),U.el=Gr.el}if(Wt&&gr(Wt,oe),!Rs&&(Ie=Ke&&Ke.onVnodeMounted)){const Gr=U;gr(()=>Js(Ie,Mt,Gr),oe)}(U.shapeFlag&256||Mt&&tu(Mt.vnode)&&Mt.vnode.shapeFlag&256)&&N.a&&gr(N.a,oe),N.isMounted=!0,U=Y=le=null}};N.scope.on();const _e=N.effect=new hT(be);N.scope.off();const fe=N.update=_e.run.bind(_e),Ne=N.job=_e.runIfDirty.bind(_e);Ne.i=N,Ne.id=N.uid,_e.scheduler=()=>e0(Ne),fa(N,!0),fe()},X=(N,U,Y)=>{U.component=N;const le=N.vnode.props;N.vnode=U,N.next=null,$F(N,U.props,le,Y),UF(N,U.children,Y),Xi(),$w(N),Qi()},V=(N,U,Y,le,oe,me,Pe,be,_e=!1)=>{const fe=N&&N.children,Ne=N?N.shapeFlag:0,Ie=U.children,{patchFlag:Te,shapeFlag:Ke}=U;if(Te>0){if(Te&128){M(fe,Ie,Y,le,oe,me,Pe,be,_e);return}else if(Te&256){z(fe,Ie,Y,le,oe,me,Pe,be,_e);return}}Ke&8?(Ne&16&&we(fe,oe,me),Ie!==fe&&c(Y,Ie)):Ne&16?Ke&16?M(fe,Ie,Y,le,oe,me,Pe,be,_e):we(fe,oe,me,!0):(Ne&8&&c(Y,""),Ke&16&&x(Ie,Y,le,oe,me,Pe,be,_e))},z=(N,U,Y,le,oe,me,Pe,be,_e)=>{N=N||Jl,U=U||Jl;const fe=N.length,Ne=U.length,Ie=Math.min(fe,Ne);let Te;for(Te=0;Te<Ie;Te++){const Ke=U[Te]=_e?_o(U[Te]):ci(U[Te]);m(N[Te],Ke,Y,null,oe,me,Pe,be,_e)}fe>Ne?we(N,oe,me,!0,!1,Ie):x(U,Y,le,oe,me,Pe,be,_e,Ie)},M=(N,U,Y,le,oe,me,Pe,be,_e)=>{let fe=0;const Ne=U.length;let Ie=N.length-1,Te=Ne-1;for(;fe<=Ie&&fe<=Te;){const Ke=N[fe],wt=U[fe]=_e?_o(U[fe]):ci(U[fe]);if(xa(Ke,wt))m(Ke,wt,Y,null,oe,me,Pe,be,_e);else break;fe++}for(;fe<=Ie&&fe<=Te;){const Ke=N[Ie],wt=U[Te]=_e?_o(U[Te]):ci(U[Te]);if(xa(Ke,wt))m(Ke,wt,Y,null,oe,me,Pe,be,_e);else break;Ie--,Te--}if(fe>Ie){if(fe<=Te){const Ke=Te+1,wt=Ke<Ne?U[Ke].el:le;for(;fe<=Te;)m(null,U[fe]=_e?_o(U[fe]):ci(U[fe]),Y,wt,oe,me,Pe,be,_e),fe++}}else if(fe>Te)for(;fe<=Ie;)H(N[fe],oe,me,!0),fe++;else{const Ke=fe,wt=fe,Wt=new Map;for(fe=wt;fe<=Te;fe++){const Kr=U[fe]=_e?_o(U[fe]):ci(U[fe]);Kr.key!=null&&Wt.set(Kr.key,fe)}let Mt,Rr=0;const tr=Te-wt+1;let Rs=!1,Gr=0;const wc=new Array(tr);for(fe=0;fe<tr;fe++)wc[fe]=0;for(fe=Ke;fe<=Ie;fe++){const Kr=N[fe];if(Rr>=tr){H(Kr,oe,me,!0);continue}let Qs;if(Kr.key!=null)Qs=Wt.get(Kr.key);else for(Mt=wt;Mt<=Te;Mt++)if(wc[Mt-wt]===0&&xa(Kr,U[Mt])){Qs=Mt;break}Qs===void 0?H(Kr,oe,me,!0):(wc[Qs-wt]=fe+1,Qs>=Gr?Gr=Qs:Rs=!0,m(Kr,U[Qs],Y,null,oe,me,Pe,be,_e),Rr++)}const Iw=Rs?WF(wc):Jl;for(Mt=Iw.length-1,fe=tr-1;fe>=0;fe--){const Kr=wt+fe,Qs=U[Kr],Aw=U[Kr+1],Ow=Kr+1<Ne?Aw.el||fR(Aw):le;wc[fe]===0?m(null,Qs,Y,Ow,oe,me,Pe,be,_e):Rs&&(Mt<0||fe!==Iw[Mt]?re(Qs,Y,Ow,2):Mt--)}}},re=(N,U,Y,le,oe=null)=>{const{el:me,type:Pe,transition:be,children:_e,shapeFlag:fe}=N;if(fe&6){re(N.component.subTree,U,Y,le);return}if(fe&128){N.suspense.move(U,Y,le);return}if(fe&64){Pe.move(N,U,Y,K);return}if(Pe===De){r(me,U,Y);for(let Ie=0;Ie<_e.length;Ie++)re(_e[Ie],U,Y,le);r(N.anchor,U,Y);return}if(Pe===Eg){S(N,U,Y);return}if(le!==2&&fe&1&&be)if(le===0)be.beforeEnter(me),r(me,U,Y),gr(()=>be.enter(me),oe);else{const{leave:Ie,delayLeave:Te,afterLeave:Ke}=be,wt=()=>{N.ctx.isUnmounted?s(me):r(me,U,Y)},Wt=()=>{me._isLeaving&&me[Li](!0),Ie(me,()=>{wt(),Ke&&Ke()})};Te?Te(me,wt,Wt):Wt()}else r(me,U,Y)},H=(N,U,Y,le=!1,oe=!1)=>{const{type:me,props:Pe,ref:be,children:_e,dynamicChildren:fe,shapeFlag:Ne,patchFlag:Ie,dirs:Te,cacheIndex:Ke}=N;if(Ie===-2&&(oe=!1),be!=null&&(Xi(),Yc(be,null,Y,N,!0),Qi()),Ke!=null&&(U.renderCache[Ke]=void 0),Ne&256){U.ctx.deactivate(N);return}const wt=Ne&1&&Te,Wt=!tu(N);let Mt;if(Wt&&(Mt=Pe&&Pe.onVnodeBeforeUnmount)&&Js(Mt,U,N),Ne&6)J(N.component,Y,le);else{if(Ne&128){N.suspense.unmount(Y,le);return}wt&&da(N,null,U,"beforeUnmount"),Ne&64?N.type.remove(N,U,Y,K,le):fe&&!fe.hasOnce&&(me!==De||Ie>0&&Ie&64)?we(fe,U,Y,!1,!0):(me===De&&Ie&384||!oe&&Ne&16)&&we(_e,U,Y),le&&j(N)}(Wt&&(Mt=Pe&&Pe.onVnodeUnmounted)||wt)&&gr(()=>{Mt&&Js(Mt,U,N),wt&&da(N,null,U,"unmounted")},Y)},j=N=>{const{type:U,el:Y,anchor:le,transition:oe}=N;if(U===De){pe(Y,le);return}if(U===Eg){_(N);return}const me=()=>{s(Y),oe&&!oe.persisted&&oe.afterLeave&&oe.afterLeave()};if(N.shapeFlag&1&&oe&&!oe.persisted){const{leave:Pe,delayLeave:be}=oe,_e=()=>Pe(Y,me);be?be(N.el,me,_e):_e()}else me()},pe=(N,U)=>{let Y;for(;N!==U;)Y=f(N),s(N),N=Y;s(U)},J=(N,U,Y)=>{const{bum:le,scope:oe,job:me,subTree:Pe,um:be,m:_e,a:fe}=N;Xw(_e),Xw(fe),le&&yh(le),oe.stop(),me&&(me.flags|=8,H(Pe,N,U,Y)),be&&gr(be,U),gr(()=>{N.isUnmounted=!0},U)},we=(N,U,Y,le=!1,oe=!1,me=0)=>{for(let Pe=me;Pe<N.length;Pe++)H(N[Pe],U,Y,le,oe)},q=N=>{if(N.shapeFlag&6)return q(N.component.subTree);if(N.shapeFlag&128)return N.suspense.next();const U=f(N.anchor||N.el),Y=U&&U[BT];return Y?f(Y):U};let he=!1;const ne=(N,U,Y)=>{let le;N==null?U._vnode&&(H(U._vnode,null,null,!0),le=U._vnode.component):m(U._vnode||null,N,U,null,null,null,Y),U._vnode=N,he||(he=!0,$w(le),MT(),he=!1)},K={p:m,um:H,m:re,r:j,mt:O,mc:x,pc:V,pbc:P,n:q,o:e};let ke,Re;return{render:ne,hydrate:ke,createApp:RF(ne,ke)}}function xg({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 fa({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function jF(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function c0(e,t,n=!1){const r=e.children,s=t.children;if(Ye(r)&&Ye(s))for(let i=0;i<r.length;i++){const o=r[i];let a=s[i];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=s[i]=_o(s[i]),a.el=o.el),!n&&a.patchFlag!==-2&&c0(o,a)),a.type===Jd&&(a.patchFlag!==-1?a.el=o.el:a.__elIndex=i+(e.type===De?1:0)),a.type===qn&&!a.el&&(a.el=o.el)}}function WF(e){const t=e.slice(),n=[0];let r,s,i,o,a;const l=e.length;for(r=0;r<l;r++){const u=e[r];if(u!==0){if(s=n[n.length-1],e[s]<u){t[r]=s,n.push(r);continue}for(i=0,o=n.length-1;i<o;)a=i+o>>1,e[n[a]]<u?i=a+1:o=a;u<e[n[i]]&&(i>0&&(t[r]=n[i-1]),n[i]=r)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function dR(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:dR(t)}function Xw(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function fR(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?fR(t.subTree):null}const hR=e=>e.__isSuspense;function qF(e,t){t&&t.pendingBranch?Ye(e)?t.effects.push(...e):t.effects.push(e):iF(e)}const De=Symbol.for("v-fgt"),Jd=Symbol.for("v-txt"),qn=Symbol.for("v-cmt"),Eg=Symbol.for("v-stc"),Qc=[];let Qr=null;function $(e=!1){Qc.push(Qr=e?null:[])}function GF(){Qc.pop(),Qr=Qc[Qc.length-1]||null}let vd=1;function op(e,t=!1){vd+=e,e<0&&Qr&&t&&(Qr.hasOnce=!0)}function pR(e){return e.dynamicChildren=vd>0?Qr||Jl:null,GF(),vd>0&&Qr&&Qr.push(e),e}function ye(e,t,n,r,s,i){return pR(C(e,t,n,r,s,i,!0))}function te(e,t,n,r,s){return pR(p(e,t,n,r,s,!0))}function wu(e){return e?e.__v_isVNode===!0:!1}function xa(e,t){return e.type===t.type&&e.key===t.key}const mR=({key:e})=>e??null,wh=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?an(e)||nt(e)||et(e)?{i:Gn,r:e,k:t,f:!!n}:e:null);function C(e,t=null,n=null,r=0,s=null,i=e===De?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&mR(t),ref:t&&wh(t),scopeId:FT,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:Gn};return a?(d0(l,n),i&128&&e.normalize(l)):n&&(l.shapeFlag|=an(n)?8:16),vd>0&&!o&&Qr&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&Qr.push(l),l}const p=KF;function KF(e,t=null,n=null,r=0,s=null,i=!1){if((!e||e===bF)&&(e=qn),wu(e)){const a=eo(e,t,!0);return n&&d0(a,n),vd>0&&!i&&Qr&&(a.shapeFlag&6?Qr[Qr.indexOf(e)]=a:Qr.push(a)),a.patchFlag=-2,a}if(r$(e)&&(e=e.__vccOpts),t){t=ap(t);let{class:a,style:l}=t;a&&!an(a)&&(t.class=Oe(a)),jt(l)&&(ju(l)&&!Ye(l)&&(l=kn({},l)),t.style=Be(l))}const o=an(e)?1:hR(e)?128:VT(e)?64:jt(e)?4:et(e)?2:0;return C(e,t,n,r,s,o,i,!0)}function ap(e){return e?ju(e)||iR(e)?kn({},e):e:null}function eo(e,t,n=!1,r=!1){const{props:s,ref:i,patchFlag:o,children:a,transition:l}=e,u=t?ge(s||{},t):s,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&mR(u),ref:t&&t.ref?n&&i?Ye(i)?i.concat(wh(t)):[i,wh(t)]:wh(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==De?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&eo(e.ssContent),ssFallback:e.ssFallback&&eo(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&sl(c,l.clone(c)),c}function E(e=" ",t=0){return p(Jd,null,e,t)}function ve(e="",t=!1){return t?($(),te(qn,null,e)):p(qn,null,e)}function ci(e){return e==null||typeof e=="boolean"?p(qn):Ye(e)?p(De,null,e.slice()):wu(e)?_o(e):p(Jd,null,String(e))}function _o(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:eo(e)}function d0(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(Ye(t))n=16;else if(typeof t=="object")if(r&65){const s=t.default;s&&(s._c&&(s._d=!1),d0(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!iR(t)?t._ctx=Gn:s===3&&Gn&&(Gn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else et(t)?(t={default:t,_ctx:Gn},n=32):(t=String(t),r&64?(n=16,t=[E(t)]):n=8);e.children=t,e.shapeFlag|=n}function ge(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const s in r)if(s==="class")t.class!==r.class&&(t.class=Oe([t.class,r.class]));else if(s==="style")t.style=Be([t.style,r.style]);else if(nm(s)){const i=t[s],o=r[s];o&&i!==o&&!(Ye(i)&&i.includes(o))&&(t[s]=i?[].concat(i,o):o)}else s!==""&&(t[s]=r[s])}return t}function Js(e,t,n,r=null){Bs(e,t,7,[n,r])}const YF=tR();let XF=0;function QF(e,t,n){const r=e.type,s=(t?t.appContext:e.appContext)||YF,i={uid:XF++,vnode:e,type:r,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new fT(!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:aR(r,s),emitsOptions:nR(r,s),emit:null,emitted:null,propsDefaults:Vt,inheritAttrs:r.inheritAttrs,ctx:Vt,data:Vt,props:Vt,attrs:Vt,slots:Vt,refs:Vt,setupState:Vt,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=IF.bind(null,i),e.ce&&e.ce(i),i}let or=null;const qu=()=>or||Gn;let lp,Zv;{const e=om(),t=(n,r)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(r),i=>{s.length>1?s.forEach(o=>o(i)):s[0](i)}};lp=t("__VUE_INSTANCE_SETTERS__",n=>or=n),Zv=t("__VUE_SSR_SETTERS__",n=>yd=n)}const Zd=e=>{const t=or;return lp(e),e.scope.on(),()=>{e.scope.off(),lp(t)}},Qw=()=>{or&&or.scope.off(),lp(null)};function gR(e){return e.vnode.shapeFlag&4}let yd=!1;function JF(e,t=!1,n=!1){t&&Zv(t);const{props:r,children:s}=e.vnode,i=gR(e);FF(e,r,i,t),VF(e,s,n||t);const o=i?ZF(e,t):void 0;return t&&Zv(!1),o}function ZF(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,SF);const{setup:r}=n;if(r){Xi();const s=e.setupContext=r.length>1?t$(e):null,i=Zd(e),o=Qd(r,e,0,[e.props,s]),a=iT(o);if(Qi(),i(),(a||e.sp)&&!tu(e)&&KT(e),a){if(o.then(Qw,Qw),t)return o.then(l=>{Jw(e,l,t)}).catch(l=>{fm(l,e,0)});e.asyncDep=o}else Jw(e,o,t)}else vR(e,t)}function Jw(e,t,n){et(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:jt(t)&&(e.setupState=IT(t)),vR(e,n)}let Zw;function vR(e,t,n){const r=e.type;if(!e.render){if(!t&&Zw&&!r.render){const s=r.template||a0(e).template;if(s){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:a,compilerOptions:l}=r,u=kn(kn({isCustomElement:i,delimiters:a},o),l);r.render=Zw(s,u)}}e.render=r.render||mi}{const s=Zd(e);Xi();try{_F(e)}finally{Qi(),s()}}}const e$={get(e,t){return ir(e,"get",""),e[t]}};function t$(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,e$),slots:e.slots,emit:e.emit,expose:t}}function ym(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(IT(dm(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Xc)return Xc[n](e)},has(t,n){return n in t||n in Xc}})):e.proxy}function n$(e,t=!0){return et(e)?e.displayName||e.name:e.name||t&&e.__name}function r$(e){return et(e)&&"__vccOpts"in e}const D=(e,t)=>eF(e,t,yd);function _r(e,t,n){try{op(-1);const r=arguments.length;return r===2?jt(t)&&!Ye(t)?wu(t)?p(e,null,[t]):p(e,t):p(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&wu(n)&&(n=[n]),p(e,t,n))}finally{op(1)}}const yR="3.5.26";/**
|
|
14
|
+
* @vue/runtime-dom v3.5.26
|
|
15
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
16
|
+
* @license MIT
|
|
17
|
+
**/let ey;const eS=typeof window<"u"&&window.trustedTypes;if(eS)try{ey=eS.createPolicy("vue",{createHTML:e=>e})}catch{}const bR=ey?e=>ey.createHTML(e):e=>e,s$="http://www.w3.org/2000/svg",i$="http://www.w3.org/1998/Math/MathML",Mi=typeof document<"u"?document:null,tS=Mi&&Mi.createElement("template"),o$={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"?Mi.createElementNS(s$,e):t==="mathml"?Mi.createElementNS(i$,e):n?Mi.createElement(e,{is:n}):Mi.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>Mi.createTextNode(e),createComment:e=>Mi.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Mi.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,s,i){const o=n?n.previousSibling:t.lastChild;if(s&&(s===i||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===i||!(s=s.nextSibling)););else{tS.innerHTML=bR(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const a=tS.content;if(r==="svg"||r==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},ho="transition",_c="animation",Su=Symbol("_vtc"),wR={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},SR=kn({},jT,wR),a$=e=>(e.displayName="Transition",e.props=SR,e),qo=a$((e,{slots:t})=>_r(fF,_R(e),t)),ha=(e,t=[])=>{Ye(e)?e.forEach(n=>n(...t)):e&&e(...t)},nS=e=>e?Ye(e)?e.some(t=>t.length>1):e.length>1:!1;function _R(e){const t={};for(const L in e)L in wR||(t[L]=e[L]);if(e.css===!1)return t;const{name:n="v",type:r,duration:s,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=i,appearActiveClass:u=o,appearToClass:c=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=e,g=l$(s),m=g&&g[0],y=g&&g[1],{onBeforeEnter:w,onEnter:b,onEnterCancelled:S,onLeave:_,onLeaveCancelled:k,onBeforeAppear:T=w,onAppear:R=b,onAppearCancelled:x=S}=t,I=(L,B,O,F)=>{L._enterCancelled=F,vo(L,B?c:a),vo(L,B?u:o),O&&O()},P=(L,B)=>{L._isLeaving=!1,vo(L,d),vo(L,h),vo(L,f),B&&B()},A=L=>(B,O)=>{const F=L?R:b,W=()=>I(B,L,O);ha(F,[B,W]),rS(()=>{vo(B,L?l:i),ni(B,L?c:a),nS(F)||sS(B,r,m,W)})};return kn(t,{onBeforeEnter(L){ha(w,[L]),ni(L,i),ni(L,o)},onBeforeAppear(L){ha(T,[L]),ni(L,l),ni(L,u)},onEnter:A(!1),onAppear:A(!0),onLeave(L,B){L._isLeaving=!0;const O=()=>P(L,B);ni(L,d),L._enterCancelled?(ni(L,f),ty(L)):(ty(L),ni(L,f)),rS(()=>{L._isLeaving&&(vo(L,d),ni(L,h),nS(_)||sS(L,r,y,O))}),ha(_,[L,O])},onEnterCancelled(L){I(L,!1,void 0,!0),ha(S,[L])},onAppearCancelled(L){I(L,!0,void 0,!0),ha(x,[L])},onLeaveCancelled(L){P(L),ha(k,[L])}})}function l$(e){if(e==null)return null;if(jt(e))return[Cg(e.enter),Cg(e.leave)];{const t=Cg(e);return[t,t]}}function Cg(e){return kL(e)}function ni(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Su]||(e[Su]=new Set)).add(t)}function vo(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[Su];n&&(n.delete(t),n.size||(e[Su]=void 0))}function rS(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let u$=0;function sS(e,t,n,r){const s=e._endId=++u$,i=()=>{s===e._endId&&r()};if(n!=null)return setTimeout(i,n);const{type:o,timeout:a,propCount:l}=kR(e,t);if(!o)return r();const u=o+"end";let c=0;const d=()=>{e.removeEventListener(u,f),i()},f=h=>{h.target===e&&++c>=l&&d()};setTimeout(()=>{c<l&&d()},a+1),e.addEventListener(u,f)}function kR(e,t){const n=window.getComputedStyle(e),r=g=>(n[g]||"").split(", "),s=r(`${ho}Delay`),i=r(`${ho}Duration`),o=iS(s,i),a=r(`${_c}Delay`),l=r(`${_c}Duration`),u=iS(a,l);let c=null,d=0,f=0;t===ho?o>0&&(c=ho,d=o,f=i.length):t===_c?u>0&&(c=_c,d=u,f=l.length):(d=Math.max(o,u),c=d>0?o>u?ho:_c:null,f=c?c===ho?i.length:l.length:0);const h=c===ho&&/\b(?:transform|all)(?:,|$)/.test(r(`${ho}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:h}}function iS(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>oS(n)+oS(e[r])))}function oS(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function ty(e){return(e?e.ownerDocument:document).body.offsetHeight}function c$(e,t,n){const r=e[Su];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const up=Symbol("_vod"),xR=Symbol("_vsh"),uo={name:"show",beforeMount(e,{value:t},{transition:n}){e[up]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):kc(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),kc(e,!0),r.enter(e)):r.leave(e,()=>{kc(e,!1)}):kc(e,t))},beforeUnmount(e,{value:t}){kc(e,t)}};function kc(e,t){e.style.display=t?e[up]:"none",e[xR]=!t}const d$=Symbol(""),f$=/(?:^|;)\s*display\s*:/;function h$(e,t,n){const r=e.style,s=an(n);let i=!1;if(n&&!s){if(t)if(an(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();n[a]==null&&Sh(r,a,"")}else for(const o in t)n[o]==null&&Sh(r,o,"");for(const o in n)o==="display"&&(i=!0),Sh(r,o,n[o])}else if(s){if(t!==n){const o=r[d$];o&&(n+=";"+o),r.cssText=n,i=f$.test(n)}}else t&&e.removeAttribute("style");up in e&&(e[up]=i?r.display:"",e[xR]&&(r.display="none"))}const aS=/\s*!important$/;function Sh(e,t,n){if(Ye(n))n.forEach(r=>Sh(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=p$(e,t);aS.test(n)?e.setProperty(na(r),n.replace(aS,""),"important"):e[r]=n}}const lS=["Webkit","Moz","ms"],Tg={};function p$(e,t){const n=Tg[t];if(n)return n;let r=Sr(t);if(r!=="filter"&&r in e)return Tg[t]=r;r=bi(r);for(let s=0;s<lS.length;s++){const i=lS[s]+r;if(i in e)return Tg[t]=i}return t}const uS="http://www.w3.org/1999/xlink";function cS(e,t,n,r,s,i=PL(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(uS,t.slice(6,t.length)):e.setAttributeNS(uS,t,n):n==null||i&&!uT(n)?e.removeAttribute(t):e.setAttribute(t,i?"":ao(n)?String(n):n)}function dS(e,t,n,r,s){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?bR(n):n);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const a=i==="OPTION"?e.getAttribute("value")||"":e.value,l=n==null?e.type==="checkbox"?"on":"":String(n);(a!==l||!("_value"in e))&&(e.value=l),n==null&&e.removeAttribute(t),e._value=n;return}let o=!1;if(n===""||n==null){const a=typeof e[t];a==="boolean"?n=uT(n):n==null&&a==="string"?(n="",o=!0):a==="number"&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(s||t)}function Bl(e,t,n,r){e.addEventListener(t,n,r)}function m$(e,t,n,r){e.removeEventListener(t,n,r)}const fS=Symbol("_vei");function g$(e,t,n,r,s=null){const i=e[fS]||(e[fS]={}),o=i[t];if(r&&o)o.value=r;else{const[a,l]=v$(t);if(r){const u=i[t]=w$(r,s);Bl(e,a,u,l)}else o&&(m$(e,a,o,l),i[t]=void 0)}}const hS=/(?:Once|Passive|Capture)$/;function v$(e){let t;if(hS.test(e)){t={};let r;for(;r=e.match(hS);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):na(e.slice(2)),t]}let Rg=0;const y$=Promise.resolve(),b$=()=>Rg||(y$.then(()=>Rg=0),Rg=Date.now());function w$(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Bs(S$(r,n.value),t,5,[r])};return n.value=e,n.attached=b$(),n}function S$(e,t){if(Ye(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 pS=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,_$=(e,t,n,r,s,i)=>{const o=s==="svg";t==="class"?c$(e,r,o):t==="style"?h$(e,n,r):nm(t)?qb(t)||g$(e,t,n,r,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):k$(e,t,r,o))?(dS(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&cS(e,t,r,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!an(r))?dS(e,Sr(t),r,i,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),cS(e,t,r,o))};function k$(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&pS(t)&&et(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 pS(t)&&an(n)?!1:t in e}const ER=new WeakMap,CR=new WeakMap,cp=Symbol("_moveCb"),mS=Symbol("_enterCb"),x$=e=>(delete e.props.mode,e),E$=x$({name:"TransitionGroup",props:kn({},SR,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=qu(),r=HT();let s,i;return s0(()=>{if(!s.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!P$(s[0].el,n.vnode.el,o)){s=[];return}s.forEach(C$),s.forEach(T$);const a=s.filter(R$);ty(n.vnode.el),a.forEach(l=>{const u=l.el,c=u.style;ni(u,o),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[cp]=f=>{f&&f.target!==u||(!f||f.propertyName.endsWith("transform"))&&(u.removeEventListener("transitionend",d),u[cp]=null,vo(u,o))};u.addEventListener("transitionend",d)}),s=[]}),()=>{const o=Ue(e),a=_R(o);let l=o.tag||De;if(s=[],i)for(let u=0;u<i.length;u++){const c=i[u];c.el&&c.el instanceof Element&&(s.push(c),sl(c,md(c,a,r,n)),ER.set(c,{left:c.el.offsetLeft,top:c.el.offsetTop}))}i=t.default?n0(t.default()):[];for(let u=0;u<i.length;u++){const c=i[u];c.key!=null&&sl(c,md(c,a,r,n))}return p(l,null,i)}}}),f0=E$;function C$(e){const t=e.el;t[cp]&&t[cp](),t[mS]&&t[mS]()}function T$(e){CR.set(e,{left:e.el.offsetLeft,top:e.el.offsetTop})}function R$(e){const t=ER.get(e),n=CR.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 P$(e,t,n){const r=e.cloneNode(),s=e[Su];s&&s.forEach(a=>{a.split(/\s+/).forEach(l=>l&&r.classList.remove(l))}),n.split(/\s+/).forEach(a=>a&&r.classList.add(a)),r.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(r);const{hasTransform:o}=kR(r);return i.removeChild(r),o}const gS=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Ye(t)?n=>yh(t,n):t};function I$(e){e.target.composing=!0}function vS(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Pg=Symbol("_assign");function yS(e,t,n){return t&&(e=e.trim()),n&&(e=Kb(e)),e}const A$={created(e,{modifiers:{lazy:t,trim:n,number:r}},s){e[Pg]=gS(s);const i=r||s.props&&s.props.type==="number";Bl(e,t?"change":"input",o=>{o.target.composing||e[Pg](yS(e.value,n,i))}),(n||i)&&Bl(e,"change",()=>{e.value=yS(e.value,n,i)}),t||(Bl(e,"compositionstart",I$),Bl(e,"compositionend",vS),Bl(e,"change",vS))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:s,number:i}},o){if(e[Pg]=gS(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?Kb(e.value):e.value,l=t??"";a!==l&&(document.activeElement===e&&e.type!=="range"&&(r&&t===n||s&&e.value.trim()===l)||(e.value=l))}},O$=["ctrl","shift","alt","meta"],D$={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)=>O$.some(n=>e[`${n}Key`]&&!t.includes(n))},Ct=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(s,...i)=>{for(let o=0;o<t.length;o++){const a=D$[t[o]];if(a&&a(s,t))return}return e(s,...i)})},M$={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},ny=(e,t)=>{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=s=>{if(!("key"in s))return;const i=na(s.key);if(t.some(o=>o===i||M$[o]===i))return e(s)})},L$=kn({patchProp:_$},o$);let bS;function TR(){return bS||(bS=zF(L$))}const RR=(...e)=>{TR().render(...e)},F$=(...e)=>{const t=TR().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=N$(r);if(!s)return;const i=t._component;!et(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=n(s,!1,$$(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},t};function $$(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function N$(e){return an(e)?document.querySelector(e):e}/*!
|
|
18
|
+
* pinia v3.0.4
|
|
19
|
+
* (c) 2025 Eduardo San Martin Morote
|
|
20
|
+
* @license MIT
|
|
21
|
+
*/let PR;const bm=e=>PR=e,IR=Symbol();function ry(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Jc;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Jc||(Jc={}));function B$(){const e=rl(!0),t=e.run(()=>G({}));let n=[],r=[];const s=dm({install(i){bm(s),s._a=i,i.provide(IR,s),i.config.globalProperties.$pinia=s,r.forEach(o=>n.push(o)),r=[]},use(i){return this._a?n.push(i):r.push(i),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return s}const AR=()=>{};function wS(e,t,n,r=AR){e.add(t);const s=()=>{e.delete(t)&&r()};return!n&&Xd()&&ln(s),s}function Tl(e,...t){e.forEach(n=>{n(...t)})}const V$=e=>e(),SS=Symbol(),Ig=Symbol();function sy(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];ry(s)&&ry(r)&&e.hasOwnProperty(n)&&!nt(r)&&!Hi(r)?e[n]=sy(s,r):e[n]=r}return e}const U$=Symbol();function z$(e){return!ry(e)||!Object.prototype.hasOwnProperty.call(e,U$)}const{assign:yo}=Object;function H$(e){return!!(nt(e)&&e.effect)}function j$(e,t,n,r){const{state:s,actions:i,getters:o}=t,a=n.state.value[e];let l;function u(){a||(n.state.value[e]=s?s():{});const c=vl(n.state.value[e]);return yo(c,i,Object.keys(o||{}).reduce((d,f)=>(d[f]=dm(D(()=>{bm(n);const h=n._s.get(e);return o[f].call(h,h)})),d),{}))}return l=OR(e,u,t,n,r,!0),l}function OR(e,t,n={},r,s,i){let o;const a=yo({actions:{}},n),l={deep:!0};let u,c,d=new Set,f=new Set,h;const g=r.state.value[e];!i&&!g&&(r.state.value[e]={}),G({});let m;function y(x){let I;u=c=!1,typeof x=="function"?(x(r.state.value[e]),I={type:Jc.patchFunction,storeId:e,events:h}):(sy(r.state.value[e],x),I={type:Jc.patchObject,payload:x,storeId:e,events:h});const P=m=Symbol();ht().then(()=>{m===P&&(u=!0)}),c=!0,Tl(d,I,r.state.value[e])}const w=i?function(){const{state:I}=n,P=I?I():{};this.$patch(A=>{yo(A,P)})}:AR;function b(){o.stop(),d.clear(),f.clear(),r._s.delete(e)}const S=(x,I="")=>{if(SS in x)return x[Ig]=I,x;const P=function(){bm(r);const A=Array.from(arguments),L=new Set,B=new Set;function O(X){L.add(X)}function F(X){B.add(X)}Tl(f,{args:A,name:P[Ig],store:k,after:O,onError:F});let W;try{W=x.apply(this&&this.$id===e?this:k,A)}catch(X){throw Tl(B,X),X}return W instanceof Promise?W.then(X=>(Tl(L,X),X)).catch(X=>(Tl(B,X),Promise.reject(X))):(Tl(L,W),W)};return P[SS]=!0,P[Ig]=I,P},_={_p:r,$id:e,$onAction:wS.bind(null,f),$patch:y,$reset:w,$subscribe(x,I={}){const P=wS(d,x,I.detached,()=>A()),A=o.run(()=>xe(()=>r.state.value[e],L=>{(I.flush==="sync"?c:u)&&x({storeId:e,type:Jc.direct,events:h},L)},yo({},l,I)));return P},$dispose:b},k=gn(_);r._s.set(e,k);const R=(r._a&&r._a.runWithContext||V$)(()=>r._e.run(()=>(o=rl()).run(()=>t({action:S}))));for(const x in R){const I=R[x];if(nt(I)&&!H$(I)||Hi(I))i||(g&&z$(I)&&(nt(I)?I.value=g[x]:sy(I,g[x])),r.state.value[e][x]=I);else if(typeof I=="function"){const P=S(I,x);R[x]=P,a.actions[x]=I}}return yo(k,R),yo(Ue(k),R),Object.defineProperty(k,"$state",{get:()=>r.state.value[e],set:x=>{y(I=>{yo(I,x)})}}),r._p.forEach(x=>{yo(k,o.run(()=>x({store:k,app:r._a,pinia:r,options:a})))}),g&&i&&n.hydrate&&n.hydrate(k.$state,g),u=!0,c=!0,k}/*! #__NO_SIDE_EFFECTS__ */function ks(e,t,n){let r;const s=typeof t=="function";r=s?n:t;function i(o,a){const l=$T();return o=o||(l?Xe(IR,null):null),o&&bm(o),o=PR,o._s.has(e)||(s?OR(e,t,r,o):j$(e,r,o)),o._s.get(e)}return i.$id=e,i}const DR=ks("Dialog",{state:()=>({ids:[],dialogsById:{}}),getters:{dialogs(){return this.ids.map(e=>this.dialogsById[e])},getBeforeOpenedCallback(){return e=>{var t;return(t=this.dialogsById[e])==null?void 0:t.beforeOpenedCallback}},getOpenedCallback(){return e=>{var t;return(t=this.dialogsById[e])==null?void 0:t.openedCallback}},getContext(){return e=>{var t;return(t=this.dialogsById[e])==null?void 0:t.context}},getOutput(){return e=>{var t;return(t=this.dialogsById[e])==null?void 0:t.output}},isDialogOpened(){return e=>{var t;return(t=this.dialogsById[e])==null?void 0:t.opened}}},actions:{openDialogWithContext(e,t){let n=this.dialogsById[e];n||(n=this.registerDialogReference(e)),n.opened=!0,n.context=t,this.dialogsById={...this.dialogsById},console.debug(`[Pinia Dialog ${e}] Opened with context`,t)},closeDialog(e,t){let n=this.dialogsById[e];n||(n=this.registerDialogReference(e)),n.opened=!1,delete n.context,n.output=t,this.dialogsById={...this.dialogsById},console.debug(`[Pinia Dialog ${e}] Closed`)},unregisterDialogReference(e){delete this.dialogsById[e],this.ids=this.ids.filter(t=>t!==e)},registerDialogReference(e,t){if(!e)throw new Error("Cannot unregister undefined dialog reference");console.debug(`[Pinia Dialog ${e}] Registered`);const n=this.dialogsById[e];if(n)return console.debug(`[Pinia Dialog ${e}] Already registered dialog, not registering again`),n;const r={id:e,opened:!1,beforeOpenedCallback:t==null?void 0:t.beforeOpenedCallback,openedCallback:t==null?void 0:t.openedCallback};return this.dialogsById[e]=r,this.ids.push(e),r}}});function _S(e,t){return Xd()?(ln(e,t),!0):!1}const iy=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const W$=Object.prototype.toString,q$=e=>W$.call(e)==="[object Object]";function Ag(e){return Array.isArray(e)?e:[e]}function G$(e,t=1e3,n={}){const{immediate:r=!0,immediateCallback:s=!1}=n;let i=null;const o=Ce(!1);function a(){i&&(clearInterval(i),i=null)}function l(){o.value=!1,a()}function u(){const c=Qt(t);c<=0||(o.value=!0,s&&e(),a(),o.value&&(i=setInterval(e,c)))}return r&&iy&&u(),(nt(t)||typeof t=="function")&&_S(xe(t,()=>{o.value&&iy&&u()})),_S(l),{isActive:Zb(o),pause:l,resume:u}}function K$(e,t,n){return xe(e,t,{...n,immediate:!0})}const MR=iy?window:void 0;function Y$(e){var t;const n=Qt(e);return(t=n==null?void 0:n.$el)!==null&&t!==void 0?t:n}function X$(...e){const t=(r,s,i,o)=>(r.addEventListener(s,i,o),()=>r.removeEventListener(s,i,o)),n=D(()=>{const r=Ag(Qt(e[0])).filter(s=>s!=null);return r.every(s=>typeof s!="string")?r:void 0});return K$(()=>{var r,s;return[(r=(s=n.value)===null||s===void 0?void 0:s.map(i=>Y$(i)))!==null&&r!==void 0?r:[MR].filter(i=>i!=null),Ag(Qt(n.value?e[1]:e[0])),Ag(Z(n.value?e[2]:e[1])),Qt(n.value?e[3]:e[2])]},([r,s,i,o],a,l)=>{if(!(r!=null&&r.length)||!(s!=null&&s.length)||!(i!=null&&i.length))return;const u=q$(o)?{...o}:o,c=r.flatMap(d=>s.flatMap(f=>i.map(h=>t(d,f,h,u))));l(()=>{c.forEach(d=>d())})},{flush:"post"})}function Q$(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function J$(...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=MR,eventName:i="keydown",passive:o=!1,dedupe:a=!1}=r,l=Q$(t);return X$(s,i,c=>{c.repeat&&Qt(a)||l(c)&&n(c)},o)}const xc=new Map;function Bn(e){const t=Xd();function n(a){var l;const u=xc.get(e)||new Set;u.add(a),xc.set(e,u);const c=()=>s(a);return t==null||(l=t.cleanups)===null||l===void 0||l.push(c),c}function r(a){function l(...u){s(l),a(...u)}return n(l)}function s(a){const l=xc.get(e);l&&(l.delete(a),l.size||i())}function i(){xc.delete(e)}function o(a,l){var u;(u=xc.get(e))===null||u===void 0||u.forEach(c=>c(a,l))}return{on:n,once:r,off:s,emit:o,reset:i}}function sn(e){const t=DR();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=>{Rn(()=>{t.isDialogOpened(e)||s(t.getOutput(e))})}))}}function LR(e,t){t=Array.isArray(t)?t.slice(0,-1).map(n=>`'${n}'`).join(", ")+` or '${t.at(-1)}'`:`'${t}'`}const Ot=typeof window<"u",h0=Ot&&"IntersectionObserver"in window,Z$=Ot&&("ontouchstart"in window||window.navigator.maxTouchPoints>0),p0=Ot&&"matchMedia"in window&&typeof window.matchMedia=="function",il=()=>p0&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;function kS(e,t,n){eN(e,t),t.set(e,n)}function eN(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function xS(e,t,n){return e.set(FR(e,t),n),n}function xi(e,t){return e.get(FR(e,t))}function FR(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 $R(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 ol(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(/^\./,""),$R(e,t.split("."),n))}function Mn(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 ol(e,t,n);if(Array.isArray(t))return $R(e,t,n);if(typeof t!="function")return n;const r=t(e,n);return typeof r>"u"?n:r}function Hl(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Array.from({length:e},(n,r)=>t+r)}function Le(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 _u(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function ES(e){let t;return e!==null&&typeof e=="object"&&((t=Object.getPrototypeOf(e))===Object.prototype||t===null)}function m0(e){if(e&&"$el"in e){const t=e.$el;return(t==null?void 0:t.nodeType)===Node.TEXT_NODE?t.nextElementSibling:t}return e}const CS=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 NR(e){return Object.keys(e)}function Og(e,t){return t.every(n=>e.hasOwnProperty(n))}function Go(e,t){const n={};for(const r of t)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function oy(e,t,n){const r=Object.create(null),s=Object.create(null);for(const i in e)t.some(o=>o instanceof RegExp?o.test(i):o===i)&&!(n!=null&&n.some(o=>o===i))?r[i]=e[i]:s[i]=e[i];return[r,s]}function In(e,t){const n={...e};return t.forEach(r=>delete n[r]),n}const BR=/^on[^a-z]/,g0=e=>BR.test(e),tN=["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 yl(e){const[t,n]=oy(e,[BR]),r=In(t,tN),[s,i]=oy(n,["class","style","id","inert",/^data-/]);return Object.assign(s,t),Object.assign(i,r),[s,i]}function Fn(e){return e==null?[]:Array.isArray(e)?e:[e]}function nN(e,t){let n=0;const r=function(){for(var s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];clearTimeout(n),n=setTimeout(()=>e(...i),Z(t))};return r.clear=()=>{clearTimeout(n)},r.immediate=e,r}function Un(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 TS(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 RS(e,t){return(arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0").repeat(Math.max(0,t-e.length))+e}function rN(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 PS(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 lr(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r={};for(const s in e)r[s]=e[s];for(const s in t){const i=e[s],o=t[s];if(ES(i)&&ES(o)){r[s]=lr(i,o,n);continue}if(n&&Array.isArray(i)&&Array.isArray(o)){r[s]=n(i,o);continue}r[s]=o}return r}function VR(e){return e.map(t=>t.type===De?VR(t.children):t).flat()}function Wa(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(Wa.cache.has(e))return Wa.cache.get(e);const t=e.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return Wa.cache.set(e,t),t}Wa.cache=new Map;function jl(e,t){if(!t||typeof t!="object")return[];if(Array.isArray(t))return t.map(n=>jl(e,n)).flat(1);if(t.suspense)return jl(e,t.ssContent);if(Array.isArray(t.children))return t.children.map(n=>jl(e,n)).flat(1);if(t.component){if(Object.getOwnPropertyDescriptor(t.component.provides,e))return[t.component];if(t.component.subTree)return jl(e,t.component.subTree).flat(1)}return[]}var Rl=new WeakMap,pa=new WeakMap;class UR{constructor(t){kS(this,Rl,[]),kS(this,pa,0),this.size=t}get isFull(){return xi(Rl,this).length===this.size}push(t){xi(Rl,this)[xi(pa,this)]=t,xS(pa,this,(xi(pa,this)+1)%this.size)}values(){return xi(Rl,this).slice(xi(pa,this)).concat(xi(Rl,this).slice(0,xi(pa,this)))}clear(){xi(Rl,this).length=0,xS(pa,this,0)}}function v0(e){const t=gn({});Rn(()=>{const r=e();for(const s in r)t[s]=r[s]},{flush:"sync"});const n={};for(const r in t)n[r]=ie(()=>t[r]);return n}function dp(e,t){return e.includes(t)}function zR(e){return e[2].toLowerCase()+e.slice(3)}const Kn=()=>[Function,Array];function IS(e,t){return t="on"+bi(t),!!(e[t]||e[`${t}Once`]||e[`${t}Capture`]||e[`${t}OnceCapture`]||e[`${t}CaptureOnce`])}function ef(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 qa(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=>{var i,o;return!((i=s.parentElement)!=null&&i.closest("details:not([open])"))||s.tagName==="SUMMARY"&&((o=s.parentElement)==null?void 0:o.tagName)==="DETAILS"})}function HR(e,t,n){let r,s=e.indexOf(document.activeElement);const i=t==="next"?1:-1;do s+=i,r=e[s];while((!r||r.offsetParent==null||!((n==null?void 0:n(r))??!0))&&s<e.length&&s>=0);return r}function Zc(e,t){var r,s,i,o;const n=qa(e);if(t==null)(e===document.activeElement||!e.contains(document.activeElement))&&((r=n[0])==null||r.focus());else if(t==="first")(s=n[0])==null||s.focus();else if(t==="last")(i=n.at(-1))==null||i.focus();else if(typeof t=="number")(o=n[t])==null||o.focus();else{const a=HR(n,t);a?a.focus():Zc(e,t==="next"?"first":"last")}}function Mf(e){return e==null||typeof e=="string"&&e.trim()===""}function fp(e,t){if(!(Ot&&typeof CSS<"u"&&typeof CSS.supports<"u"&&CSS.supports(`selector(${t})`)))return null;try{return!!e&&e.matches(t)}catch{return null}}function jR(e){return e.some(t=>wu(t)?t.type===qn?!1:t.type!==De||jR(t.children):!0)?e:null}function sN(e,t){if(!Ot||e===0)return t(),()=>{};const n=window.setTimeout(t,e);return()=>window.clearTimeout(n)}function iN(e,t){const n=e.clientX,r=e.clientY,s=t.getBoundingClientRect(),i=s.left,o=s.top,a=s.right,l=s.bottom;return n>=i&&n<=a&&r>=o&&r<=l}function ay(){const e=Ce(),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:()=>m0(e.value)}),t}function AS(e){const t=e.key.length===1,n=!e.ctrlKey&&!e.metaKey&&!e.altKey;return t&&n}function Ko(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="bigint"}function oN(e){const t={};for(const n in e)t[Sr(n)]=e[n];return t}function aN(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 WR=["top","bottom"],lN=["start","end","left","right"];function ly(e,t){let[n,r]=e.split(" ");return r||(r=dp(WR,n)?"start":dp(lN,n)?"top":"center"),{side:uy(n,t),align:uy(r,t)}}function uy(e,t){return e==="start"?t?"right":"left":e==="end"?t?"left":"right":e}function Dg(e){return{side:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[e.side],align:e.align}}function Mg(e){return{side:e.side,align:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[e.align]}}function OS(e){return{side:e.align,align:e.side}}function DS(e){return dp(WR,e.side)?"y":"x"}class hs{constructor(t){const n=document.body.currentCSSZoom??1,r=t instanceof Element,s=r?1+(1-n)/n:1,{x:i,y:o,width:a,height:l}=r?t.getBoundingClientRect():t;this.x=i*s,this.y=o*s,this.width=a*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 MS(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 qR(e){if(Array.isArray(e)){const t=document.body.currentCSSZoom??1,n=1+(1-t)/t;return new hs({x:e[0]*n,y:e[1]*n,width:0*n,height:0*n})}else return new hs(e)}function uN(e){if(e===document.documentElement)if(visualViewport){const t=document.body.currentCSSZoom??1;return new hs({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 hs({x:0,y:0,width:document.documentElement.clientWidth,height:document.documentElement.clientHeight});else return new hs(e)}function y0(e){const t=new hs(e),n=getComputedStyle(e),r=n.transform;if(r){let s,i,o,a,l;if(r.startsWith("matrix3d("))s=r.slice(9,-1).split(/, /),i=Number(s[0]),o=Number(s[5]),a=Number(s[12]),l=Number(s[13]);else if(r.startsWith("matrix("))s=r.slice(7,-1).split(/, /),i=Number(s[0]),o=Number(s[3]),a=Number(s[4]),l=Number(s[5]);else return new hs(t);const u=n.transformOrigin,c=t.x-a-(1-i)*parseFloat(u),d=t.y-l-(1-o)*parseFloat(u.slice(u.indexOf(" ")+1)),f=i?t.width/i:e.offsetWidth+1,h=o?t.height/o:e.offsetHeight+1;return new hs({x:c,y:d,width:f,height:h})}else return new hs(t)}function ko(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 _h=new WeakMap;function cN(e,t){Object.keys(t).forEach(n=>{if(g0(n)){const r=zR(n),s=_h.get(e);if(t[n]==null)s==null||s.forEach(i=>{const[o,a]=i;o===r&&(e.removeEventListener(r,a),s.delete(i))});else if(!s||![...s].some(i=>i[0]===r&&i[1]===t[n])){e.addEventListener(r,t[n]);const i=s||new Set;i.add([r,t[n]]),_h.has(e)||_h.set(e,i)}}else t[n]==null?e.removeAttribute(n):e.setAttribute(n,t[n])})}function dN(e,t){Object.keys(t).forEach(n=>{if(g0(n)){const r=zR(n),s=_h.get(e);s==null||s.forEach(i=>{const[o,a]=i;o===r&&(e.removeEventListener(r,a),s.delete(i))})}else e.removeAttribute(n)})}const Pl=2.4,LS=.2126729,FS=.7151522,$S=.072175,fN=.55,hN=.58,pN=.57,mN=.62,Lf=.03,NS=1.45,gN=5e-4,vN=1.25,yN=1.25,BS=.078,VS=12.82051282051282,Ff=.06,US=.001;function zS(e,t){const n=(e.r/255)**Pl,r=(e.g/255)**Pl,s=(e.b/255)**Pl,i=(t.r/255)**Pl,o=(t.g/255)**Pl,a=(t.b/255)**Pl;let l=n*LS+r*FS+s*$S,u=i*LS+o*FS+a*$S;if(l<=Lf&&(l+=(Lf-l)**NS),u<=Lf&&(u+=(Lf-u)**NS),Math.abs(u-l)<gN)return 0;let c;if(u>l){const d=(u**fN-l**hN)*vN;c=d<US?0:d<BS?d-d*VS*Ff:d-Ff}else{const d=(u**mN-l**pN)*yN;c=d>-US?0:d>-BS?d-d*VS*Ff:d+Ff}return c*100}const hp=.20689655172413793,bN=e=>e>hp**3?Math.cbrt(e):e/(3*hp**2)+4/29,wN=e=>e>hp?e**3:3*hp**2*(e-4/29);function GR(e){const t=bN,n=t(e[1]);return[116*n-16,500*(t(e[0]/.95047)-n),200*(n-t(e[2]/1.08883))]}function KR(e){const t=wN,n=(e[0]+16)/116;return[t(n+e[1]/500)*.95047,t(n),t(n-e[2]/200)*1.08883]}const SN=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]],_N=e=>e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055,kN=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],xN=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4;function YR(e){const t=Array(3),n=_N,r=SN;for(let s=0;s<3;++s)t[s]=Math.round(Un(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 b0(e){let{r:t,g:n,b:r}=e;const s=[0,0,0],i=xN,o=kN;t=i(t/255),n=i(n/255),r=i(r/255);for(let a=0;a<3;++a)s[a]=o[a][0]*t+o[a][1]*n+o[a][2]*r;return s}function cy(e){return!!e&&/^(#|var\(--|(rgb|hsl)a?\()/.test(e)}function EN(e){return cy(e)&&!/^((rgb|hsl)a?\()?var\(--/.test(e)}const HS=/^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/,CN={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)=>jS({h:e,s:t,l:n,a:r}),hsla:(e,t,n,r)=>jS({h:e,s:t,l:n,a:r}),hsv:(e,t,n,r)=>bd({h:e,s:t,v:n,a:r}),hsva:(e,t,n,r)=>bd({h:e,s:t,v:n,a:r})};function fi(e){if(typeof e=="number")return{r:(e&16711680)>>16,g:(e&65280)>>8,b:e&255};if(typeof e=="string"&&HS.test(e)){const{groups:t}=e.match(HS),{fn:n,values:r}=t,s=r.split(/,\s*|\s*\/\s*|\s+/).map((i,o)=>i.endsWith("%")||o>0&&o<3&&["hsl","hsla","hsv","hsva"].includes(n)?parseFloat(i)/100:parseFloat(i));return CN[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),RN(t)}else if(typeof e=="object"){if(Og(e,["r","g","b"]))return e;if(Og(e,["h","s","l"]))return bd(XR(e));if(Og(e,["h","s","v"]))return bd(e)}throw new TypeError(`Invalid color: ${e==null?e:String(e)||e.constructor.name}
|
|
22
|
+
Expected #hex, #hexa, rgb(), rgba(), hsl(), hsla(), object or number`)}function bd(e){const{h:t,s:n,v:r,a:s}=e,i=a=>{const l=(a+t/60)%6;return r-r*n*Math.max(Math.min(l,4-l,1),0)},o=[i(5),i(3),i(1)].map(a=>Math.round(a*255));return{r:o[0],g:o[1],b:o[2],a:s}}function jS(e){return bd(XR(e))}function XR(e){const{h:t,s:n,l:r,a:s}=e,i=r+n*Math.min(r,1-r),o=i===0?0:2-2*r/i;return{h:t,s:o,v:i,a:s}}function $f(e){const t=Math.round(e).toString(16);return("00".substr(0,2-t.length)+t).toUpperCase()}function TN(e){let{r:t,g:n,b:r,a:s}=e;return`#${[$f(t),$f(n),$f(r),s!==void 0?$f(Math.round(s*255)):""].join("")}`}function RN(e){e=PN(e);let[t,n,r,s]=rN(e,2).map(i=>parseInt(i,16));return s=s===void 0?s:s/255,{r:t,g:n,b:r,a:s}}function PN(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=TS(TS(e,6),8,"F")),e}function IN(e,t){const n=GR(b0(e));return n[0]=n[0]+t*10,YR(KR(n))}function AN(e,t){const n=GR(b0(e));return n[0]=n[0]-t*10,YR(KR(n))}function ON(e){const t=fi(e);return b0(t)[1]}function QR(e){const t=Math.abs(zS(fi(0),fi(e)));return Math.abs(zS(fi(16777215),fi(e)))>Math.min(t,50)?"#fff":"#000"}function ce(e,t){return n=>Object.keys(e).reduce((r,s)=>{const o=typeof e[s]=="object"&&e[s]!=null&&!Array.isArray(e[s])?e[s]:{type:e[s]};return n&&s in n?r[s]={...o,default:n[s]}:r[s]=o,t&&!r[s].source&&(r[s].source=t),r},{})}const Ge=ce({class:[String,Array,Object],style:{type:[String,Array,Object],default:null}},"component");function fn(e,t){const n=qu();if(!n)throw new Error(`[Vuetify] ${e} must be called from inside a setup function`);return n}function wi(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"composables";const t=fn(e).type;return Wa((t==null?void 0:t.aliasName)||(t==null?void 0:t.name))}function DN(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:fn("injectSelf");const{provides:n}=t;if(n&&e in n)return n[e]}const ku=Symbol.for("vuetify:defaults");function MN(e){return G(e)}function w0(){const e=Xe(ku);if(!e)throw new Error("[Vuetify] Could not find defaults instance");return e}function zr(e,t){const n=w0(),r=G(e),s=D(()=>{if(Z(t==null?void 0:t.disabled))return n.value;const o=Z(t==null?void 0:t.scoped),a=Z(t==null?void 0:t.reset),l=Z(t==null?void 0:t.root);if(r.value==null&&!(o||a||l))return n.value;let u=lr(r.value,{prev:n.value});if(o)return u;if(a||l){const c=Number(a||1/0);for(let d=0;d<=c&&!(!u||!("prev"in u));d++)u=u.prev;return u&&typeof l=="string"&&l in u&&(u=lr(lr(u,{prev:u}),u[l])),u}return u.prev?lr(u.prev,u):u});return Jt(ku,s),s}function LN(e,t){return e.props&&(typeof e.props[t]<"u"||typeof e.props[Wa(t)]<"u")}function FN(){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]:w0();const r=fn("useDefaults");if(t=t??r.type.name??r.type.__name,!t)throw new Error("[Vuetify] Could not determine component name");const s=D(()=>{var l;return(l=n.value)==null?void 0:l[e._as??t]}),i=new Proxy(e,{get(l,u){var h,g,m,y;const c=Reflect.get(l,u);if(u==="class"||u==="style")return[(h=s.value)==null?void 0:h[u],c].filter(w=>w!=null);if(LN(r.vnode,u))return c;const d=(g=s.value)==null?void 0:g[u];if(d!==void 0)return d;const f=(y=(m=n.value)==null?void 0:m.global)==null?void 0:y[u];return f!==void 0?f:c}}),o=Ce();Rn(()=>{if(s.value){const l=Object.entries(s.value).filter(u=>{let[c]=u;return c.startsWith(c[0].toUpperCase())});o.value=l.length?Object.fromEntries(l):void 0}else o.value=void 0});function a(){const l=DN(ku,r);Jt(ku,D(()=>o.value?lr((l==null?void 0:l.value)??{},o.value):l==null?void 0:l.value))}return{props:i,provideSubDefaults:a}}function Gu(e){if(e._setup=e._setup??e.setup,!e.name)return e;if(e._setup){e.props=ce(e.props??{},e.name)();const t=Object.keys(e.props).filter(n=>n!=="class"&&n!=="style");e.filterProps=function(r){return Go(r,t)},e.props._as=String,e.setup=function(r,s){const i=w0();if(!i.value)return e._setup(r,s);const{props:o,provideSubDefaults:a}=FN(r,r._as??e.name,i),l=e._setup(o,s);return a(),l}}return e}function Ee(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return t=>(e?Gu:Ve)(t)}function $N(e,t){return t.props=e,t}function Ku(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"div",n=arguments.length>2?arguments[2]:void 0;return Ee()({name:n??bi(Sr(e.replace(/__/g,"-"))),props:{tag:{type:String,default:t},...Ge()},setup(r,s){let{slots:i}=s;return()=>{var o;return _r(r.tag,{class:[e,r.class],style:r.style},(o=i.default)==null?void 0:o.call(i))}}})}function NN(e,t,n,r){if(!n||Ko(e)||Ko(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 BN(e,t,n){var i,o;if(!n||Ko(e)||Ko(t))return null;const r=(i=n.get(e))==null?void 0:i.get(t);if(typeof r=="boolean")return r;const s=(o=n.get(t))==null?void 0:o.get(e);return typeof s=="boolean"?s:null}function $r(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=BN(e,t,n);return s||(NN(e,t,n,!0),r.every(i=>$r(e[i],t[i],n)))}function JR(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 pp="cubic-bezier(0.4, 0, 0.2, 1)",WS="cubic-bezier(0.0, 0, 0.2, 1)",qS="cubic-bezier(0.4, 0, 1, 1)",VN={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 GS(e,t,n){return Object.keys(e).filter(r=>g0(r)&&r.endsWith(t)).reduce((r,s)=>(r[s.slice(0,-t.length)]=i=>ef(e[s],i,n(i)),r),{})}function S0(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;for(;e;){if(t?UN(e):_0(e))return e;e=e.parentElement}return document.scrollingElement}function mp(e,t){const n=[];if(t&&e&&!t.contains(e))return n;for(;e&&(_0(e)&&n.push(e),e!==t);)e=e.parentElement;return n}function _0(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 UN(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return!1;const t=window.getComputedStyle(e);return["scroll","auto"].includes(t.overflowY)}function zN(e){for(;e;){if(window.getComputedStyle(e).position==="fixed")return!0;e=e.offsetParent}return!1}function Me(e){const t=fn("useRender");t.render=e}function HN(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{leading:!0,trailing:!0},r=0,s=0,i=!1,o=0;function a(){clearTimeout(r),i=!1,o=0}const l=function(){for(var u=arguments.length,c=new Array(u),d=0;d<u;d++)c[d]=arguments[d];clearTimeout(r);const f=Date.now();o||(o=f);const h=f-Math.max(o,s);function g(){s=Date.now(),r=setTimeout(a,t),e(...c)}i?h>=t?g():n.trailing&&(r=setTimeout(g,t-h)):(i=!0,n.leading&&g())};return l.clear=a,l.immediate=e,l}const xs=ce({border:[Boolean,Number,String]},"border");function Hs(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wi();return{borderClasses:D(()=>{const r=e.border;return r===!0||r===""?`${t}--border`:typeof r=="string"||r===0?String(r).split(" ").map(s=>`border-${s}`):[]})}}const jN=[null,"default","comfortable","compact"],Jn=ce({density:{type:String,default:"default",validator:e=>jN.includes(e)}},"density");function Es(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wi();return{densityClasses:ie(()=>`${t}--density-${e.density}`)}}const Cs=ce({elevation:{type:[Number,String],validator(e){const t=parseInt(e);return!isNaN(t)&&t>=0&&t<=24}}},"elevation");function js(e){return{elevationClasses:ie(()=>{const n=nt(e)?e.value:e.elevation;return n==null?[]:[`elevation-${n}`]})}}const Hn=ce({rounded:{type:[Boolean,Number,String],default:void 0},tile:Boolean},"rounded");function Zn(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wi();return{roundedClasses:D(()=>{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 o of String(r).split(" "))i.push(`rounded-${o}`);return i})}}const gt=ce({tag:{type:[String,Object,Function],default:"div"}},"tag"),wd=Symbol.for("vuetify:theme"),Nt=ce({theme:String},"theme");function KS(){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 WN(){var r,s;let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:KS();const t=KS();if(!e)return{...t,isDisabled:!0};const n={};for(const[i,o]of Object.entries(e.themes??{})){const a=o.dark||i==="dark"?(r=t.themes)==null?void 0:r.dark:(s=t.themes)==null?void 0:s.light;n[i]=lr(a,o)}return lr(t,{...e,themes:n})}function ma(e,t,n,r){e.push(`${YN(t,r)} {
|
|
23
|
+
`,...n.map(s=>` ${s};
|
|
24
|
+
`),`}
|
|
25
|
+
`)}function YS(e,t){const n=e.dark?2:1,r=e.dark?1:2,s=[];for(const[i,o]of Object.entries(e.colors)){const a=fi(o);s.push(`--${t}theme-${i}: ${a.r},${a.g},${a.b}`),i.startsWith("on-")||s.push(`--${t}theme-${i}-overlay-multiplier: ${ON(o)>.18?n:r}`)}for(const[i,o]of Object.entries(e.variables)){const a=typeof o=="string"&&o.startsWith("#")?fi(o):void 0,l=a?`${a.r}, ${a.g}, ${a.b}`:void 0;s.push(`--${t}${i}: ${l??o}`)}return s}function qN(e,t,n){const r={};if(n)for(const s of["lighten","darken"]){const i=s==="lighten"?IN:AN;for(const o of Hl(n[s],1))r[`${e}-${s}-${o}`]=TN(i(fi(t),o))}return r}function GN(e,t){if(!t)return{};let n={};for(const r of t.colors){const s=e[r];s&&(n={...n,...qN(r,s,t)})}return n}function KN(e){const t={};for(const n of Object.keys(e)){if(n.startsWith("on-")||e[`on-${n}`])continue;const r=`on-${n}`,s=fi(e[n]);t[r]=QR(s)}return t}function YN(e,t){if(!t)return e;const n=`:where(${t})`;return e===":root"?n:`${n} ${e}`}function XN(e,t,n){const r=QN(e,t);r&&(r.innerHTML=n)}function QN(e,t){if(!Ot)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 JN(e){const t=WN(e),n=Ce(t.defaultTheme),r=G(t.themes),s=Ce("light"),i=D({get(){return n.value==="system"?s.value:n.value},set(b){n.value=b}}),o=D(()=>{const b={};for(const[S,_]of Object.entries(r.value)){const k={..._.colors,...GN(_.colors,t.variations)};b[S]={..._,colors:{...k,...KN(k)}}}return b}),a=ie(()=>o.value[i.value]),l=ie(()=>n.value==="system"),u=D(()=>{var T;const b=[],S=t.unimportant?"":" !important",_=t.scoped?t.prefix:"";(T=a.value)!=null&&T.dark&&ma(b,":root",["color-scheme: dark"],t.scope),ma(b,":root",YS(a.value,t.prefix),t.scope);for(const[R,x]of Object.entries(o.value))ma(b,`.${t.prefix}theme--${R}`,[`color-scheme: ${x.dark?"dark":"normal"}`,...YS(x,t.prefix)],t.scope);if(t.utilities){const R=[],x=[],I=new Set(Object.values(o.value).flatMap(P=>Object.keys(P.colors)));for(const P of I)P.startsWith("on-")?ma(x,`.${P}`,[`color: rgb(var(--${t.prefix}theme-${P}))${S}`],t.scope):(ma(R,`.${_}bg-${P}`,[`--${t.prefix}theme-overlay-multiplier: var(--${t.prefix}theme-${P}-overlay-multiplier)`,`background-color: rgb(var(--${t.prefix}theme-${P}))${S}`,`color: rgb(var(--${t.prefix}theme-on-${P}))${S}`],t.scope),ma(x,`.${_}text-${P}`,[`color: rgb(var(--${t.prefix}theme-${P}))${S}`],t.scope),ma(x,`.${_}border-${P}`,[`--${t.prefix}border-color: var(--${t.prefix}theme-${P})`],t.scope));t.layers?b.push(`@layer background {
|
|
26
|
+
`,...R.map(P=>` ${P}`),`}
|
|
27
|
+
`,`@layer foreground {
|
|
28
|
+
`,...x.map(P=>` ${P}`),`}
|
|
29
|
+
`):b.push(...R,...x)}let k=b.map((R,x)=>x===0?R:` ${R}`).join("");return t.layers&&(k=`@layer vuetify.theme {
|
|
30
|
+
`+b.map(R=>` ${R}`).join("")+`
|
|
31
|
+
}`),k}),c=ie(()=>t.isDisabled?void 0:`${t.prefix}theme--${i.value}`),d=ie(()=>Object.keys(o.value));if(p0){let S=function(){s.value=b.matches?"dark":"light"};var w=S;const b=window.matchMedia("(prefers-color-scheme: dark)");S(),b.addEventListener("change",S,{passive:!0}),Xd()&&ln(()=>{b.removeEventListener("change",S)})}function f(b){if(t.isDisabled)return;const S=b._context.provides.usehead;if(S){let T=function(){return{style:[{textContent:u.value,id:t.stylesheetId,nonce:t.cspNonce||!1}]}};var _=T;if(S.push){const R=S.push(T);Ot&&xe(u,()=>{R.patch(T)})}else Ot?(S.addHeadObjs(ie(T)),Rn(()=>S.updateDOM())):S.addHeadObjs(T())}else{let T=function(){XN(t.stylesheetId,t.cspNonce,u.value)};var k=T;Ot?xe(u,T,{immediate:!0}):T()}}function h(b){b!=="system"&&!d.value.includes(b)||(i.value=b)}function g(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d.value;const S=b.indexOf(i.value),_=S===-1?0:(S+1)%b.length;h(b[_])}function m(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["light","dark"];g(b)}const y=new Proxy(i,{get(b,S){return Reflect.get(b,S)},set(b,S,_){return S==="value"&&LR(`theme.global.name.value = ${_}`,`theme.change('${_}')`),Reflect.set(b,S,_)}});return{install:f,change:h,cycle:g,toggle:m,isDisabled:t.isDisabled,isSystem:l,name:i,themes:r,current:a,computedThemes:o,prefix:t.prefix,themeClasses:c,styles:u,global:{name:y,current:a}}}function nn(e){fn("provideTheme");const t=Xe(wd,null);if(!t)throw new Error("Could not find Vuetify theme injection");const n=ie(()=>e.theme??t.name.value),r=ie(()=>t.themes.value[n.value]),s=ie(()=>t.isDisabled?void 0:`${t.prefix}theme--${n.value}`),i={...t,name:n,current:r,themeClasses:s};return Jt(wd,i),i}function ZR(){fn("useTheme");const e=Xe(wd,null);if(!e)throw new Error("Could not find Vuetify theme injection");return e}function k0(e){return v0(()=>{const{class:t,style:n}=ZN(e);return{colorClasses:t,colorStyles:n}})}function Vs(e){const{colorClasses:t,colorStyles:n}=k0(()=>({text:Qt(e)}));return{textColorClasses:t,textColorStyles:n}}function wr(e){const{colorClasses:t,colorStyles:n}=k0(()=>({background:Qt(e)}));return{backgroundColorClasses:t,backgroundColorStyles:n}}function ZN(e){const t=Qt(e),n=[],r={};if(t.background)if(cy(t.background)){if(r.backgroundColor=t.background,!t.text&&EN(t.background)){const s=fi(t.background);if(s.a==null||s.a===1){const i=QR(s);r.color=i,r.caretColor=i}}}else n.push(`bg-${t.background}`);return t.text&&(cy(t.text)?(r.color=t.text,r.caretColor=t.text):n.push(`text-${t.text}`)),{class:n,style:r}}const eB=["elevated","flat","tonal","outlined","text","plain"];function ra(e,t){return C(De,null,[e&&C("span",{key:"overlay",class:Oe(`${t}__overlay`)},null),C("span",{key:"underlay",class:Oe(`${t}__underlay`)},null)])}const Ws=ce({color:String,variant:{type:String,default:"elevated",validator:e=>eB.includes(e)}},"variant");function bl(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wi();const n=ie(()=>{const{variant:i}=Qt(e);return`${t}--variant-${i}`}),{colorClasses:r,colorStyles:s}=k0(()=>{const{variant:i,color:o}=Qt(e);return{[["elevated","flat"].includes(i)?"background":"text"]:o}});return{colorClasses:r,colorStyles:s,variantClasses:n}}const eP=ce({baseColor:String,divided:Boolean,direction:{type:String,default:"horizontal"},...xs(),...Ge(),...Jn(),...Cs(),...Hn(),...gt(),...Nt(),...Ws()},"VBtnGroup"),XS=Ee()({name:"VBtnGroup",props:eP(),setup(e,t){let{slots:n}=t;const{themeClasses:r}=nn(e),{densityClasses:s}=Es(e),{borderClasses:i}=Hs(e),{elevationClasses:o}=js(e),{roundedClasses:a}=Zn(e);zr({VBtn:{height:ie(()=>e.direction==="horizontal"?"auto":null),baseColor:ie(()=>e.baseColor),color:ie(()=>e.color),density:ie(()=>e.density),flat:!0,variant:ie(()=>e.variant)}}),Me(()=>p(e.tag,{class:Oe(["v-btn-group",`v-btn-group--${e.direction}`,{"v-btn-group--divided":e.divided},r.value,i.value,s.value,o.value,a.value,e.class]),style:Be(e.style)},n))}});function Nr(e,t){let n;function r(){n=rl(),n.run(()=>t.length?t(()=>{n==null||n.stop(),r()}):t())}xe(e,s=>{s&&!n?r():s||(n==null||n.stop(),n=void 0)},{immediate:!0}),ln(()=>{n==null||n.stop()})}function lt(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=fn("useProxiedModel"),o=G(e[t]!==void 0?e[t]:n),a=Wa(t),u=D(a!==t?()=>{var d,f,h,g;return e[t],!!(((d=i.vnode.props)!=null&&d.hasOwnProperty(t)||(f=i.vnode.props)!=null&&f.hasOwnProperty(a))&&((h=i.vnode.props)!=null&&h.hasOwnProperty(`onUpdate:${t}`)||(g=i.vnode.props)!=null&&g.hasOwnProperty(`onUpdate:${a}`)))}:()=>{var d,f;return e[t],!!((d=i.vnode.props)!=null&&d.hasOwnProperty(t)&&((f=i.vnode.props)!=null&&f.hasOwnProperty(`onUpdate:${t}`)))});Nr(()=>!u.value,()=>{xe(()=>e[t],d=>{o.value=d})});const c=D({get(){const d=e[t];return r(u.value?d:o.value)},set(d){const f=s(d),h=Ue(u.value?e[t]:o.value);h===f||r(h)===d||(o.value=f,i==null||i.emit(`update:${t}`,f))}});return Object.defineProperty(c,"externalValue",{get:()=>u.value?e[t]:o.value}),c}const tf=ce({modelValue:{type:null,default:void 0},multiple:Boolean,mandatory:[Boolean,String],max:Number,selectedClass:String,disabled:Boolean},"group"),nf=ce({value:null,disabled:Boolean,selectedClass:String},"group-item");function xu(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;const r=fn("useGroupItem");if(!r)throw new Error("[Vuetify] useGroupItem composable must be used inside a component setup function");const s=jr();Jt(Symbol.for(`${t.description}:id`),s);const i=Xe(t,null);if(!i){if(!n)return i;throw new Error(`[Vuetify] Could not find useGroup injection with symbol ${t.description}`)}const o=ie(()=>e.value),a=D(()=>!!(i.disabled.value||e.disabled));function l(){i==null||i.register({id:s,value:o,disabled:a},r)}function u(){i==null||i.unregister(s)}l(),Qn(()=>u());const c=D(()=>i.isSelected(s)),d=D(()=>i.items.value[0].id===s),f=D(()=>i.items.value[i.items.value.length-1].id===s),h=D(()=>c.value&&[i.selectedClass.value,e.selectedClass]);return xe(c,g=>{r.emit("group:selected",{value:g})},{flush:"sync"}),{id:s,isSelected:c,isFirst:d,isLast:f,toggle:()=>i.select(s,!c.value),select:g=>i.select(s,g),selectedClass:h,value:o,disabled:a,group:i,register:l,unregister:u}}function Yu(e,t){let n=!1;const r=gn([]),s=lt(e,"modelValue",[],f=>f===void 0?[]:tP(r,f===null?[null]:Fn(f)),f=>{const h=nB(r,f);return e.multiple?h:h[0]}),i=fn("useGroup");function o(f,h){const g=f,m=Symbol.for(`${t.description}:id`),w=jl(m,i==null?void 0:i.vnode).indexOf(h);Z(g.value)===void 0&&(g.value=w,g.useIndexAsValue=!0),w>-1?r.splice(w,0,g):r.push(g)}function a(f){if(n)return;l();const h=r.findIndex(g=>g.id===f);r.splice(h,1)}function l(){const f=r.find(h=>!h.disabled);f&&e.mandatory==="force"&&!s.value.length&&(s.value=[f.id])}xt(()=>{l()}),Qn(()=>{n=!0}),s0(()=>{for(let f=0;f<r.length;f++)r[f].useIndexAsValue&&(r[f].value=f)});function u(f,h){const g=r.find(m=>m.id===f);if(!(h&&(g!=null&&g.disabled)))if(e.multiple){const m=s.value.slice(),y=m.findIndex(b=>b===f),w=~y;if(h=h??!w,w&&e.mandatory&&m.length<=1||!w&&e.max!=null&&m.length+1>e.max)return;y<0&&h?m.push(f):y>=0&&!h&&m.splice(y,1),s.value=m}else{const m=s.value.includes(f);if(e.mandatory&&m||!m&&!h)return;s.value=h??!m?[f]:[]}}function c(f){if(e.multiple,s.value.length){const h=s.value[0],g=r.findIndex(w=>w.id===h);let m=(g+f)%r.length,y=r[m];for(;y.disabled&&m!==g;)m=(m+f)%r.length,y=r[m];if(y.disabled)return;s.value=[r[m].id]}else{const h=r.find(g=>!g.disabled);h&&(s.value=[h.id])}}const d={register:o,unregister:a,selected:s,select:u,disabled:ie(()=>e.disabled),prev:()=>c(r.length-1),next:()=>c(1),isSelected:f=>s.value.includes(f),selectedClass:ie(()=>e.selectedClass),items:ie(()=>r),getItemIndex:f=>tB(r,f)};return Jt(t,d),d}function tB(e,t){const n=tP(e,[t]);return n.length?e.findIndex(r=>r.id===n[0]):-1}function tP(e,t){const n=[];return t.forEach(r=>{const s=e.find(o=>$r(r,o.value)),i=e[r];(s==null?void 0:s.value)!==void 0?n.push(s.id):i!=null&&i.useIndexAsValue&&n.push(i.id)}),n}function nB(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 nP=Symbol.for("vuetify:v-btn-toggle"),rB=ce({...eP(),...tf()},"VBtnToggle"),rP=Ee()({name:"VBtnToggle",props:rB(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{isSelected:r,next:s,prev:i,select:o,selected:a}=Yu(e,nP);return Me(()=>{const l=XS.filterProps(e);return p(XS,ge({class:["v-btn-toggle",e.class]},l,{style:e.style}),{default:()=>{var u;return[(u=n.default)==null?void 0:u.call(n,{isSelected:r,next:s,prev:i,select:o,selected:a})]}})}),{next:s,prev:i,select:o}}}),sB=ce({defaults:Object,disabled:Boolean,reset:[Number,String],root:[Boolean,String],scoped:Boolean},"VDefaultsProvider"),Ft=Ee(!1)({name:"VDefaultsProvider",props:sB(),setup(e,t){let{slots:n}=t;const{defaults:r,disabled:s,reset:i,root:o,scoped:a}=vl(e);return zr(r,{reset:i,root:o,scoped:a,disabled:s}),()=>{var l;return(l=n.default)==null?void 0:l.call(n)}}}),He=[String,Function,Object,Array],dy=Symbol.for("vuetify:icons"),wm=ce({icon:{type:He},tag:{type:[String,Object,Function],required:!0}},"icon"),QS=Ee()({name:"VComponentIcon",props:wm(),setup(e,t){let{slots:n}=t;return()=>{const r=e.icon;return p(e.tag,null,{default:()=>{var s;return[e.icon?p(r,null,null):(s=n.default)==null?void 0:s.call(n)]}})}}}),sP=Gu({name:"VSvgIcon",inheritAttrs:!1,props:wm(),setup(e,t){let{attrs:n}=t;return()=>p(e.tag,ge(n,{style:null}),{default:()=>[C("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)?C("path",{d:r[0],"fill-opacity":r[1]},null):C("path",{d:r},null)):C("path",{d:e.icon},null)])]})}}),iB=Gu({name:"VLigatureIcon",props:wm(),setup(e){return()=>p(e.tag,null,{default:()=>[e.icon]})}}),iP=Gu({name:"VClassIcon",props:wm(),setup(e){return()=>p(e.tag,{class:Oe(e.icon)},null)}}),oB=e=>{const t=Xe(dy);if(!t)throw new Error("Missing Vuetify Icons provide!");return{iconData:D(()=>{var l;const r=Qt(e);if(!r)return{component:QS};let s=r;if(typeof s=="string"&&(s=s.trim(),s.startsWith("$")&&(s=(l=t.aliases)==null?void 0:l[s.slice(1)])),Array.isArray(s))return{component:sP,icon:s};if(typeof s!="string")return{component:QS,icon:s};const i=Object.keys(t.sets).find(u=>typeof s=="string"&&s.startsWith(`${u}:`)),o=i?s.slice(i.length+1):s;return{component:t.sets[i??t.defaultSet].component,icon:o}})}},aB=["x-small","small","default","large","x-large"],Xu=ce({size:{type:[String,Number],default:"default"}},"size");function rf(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wi();return v0(()=>{const n=e.size;let r,s;return dp(aB,n)?r=`${t}--size-${n}`:n&&(s={width:Le(n),height:Le(n)}),{sizeClasses:r,sizeStyles:s}})}const lB=ce({color:String,disabled:Boolean,start:Boolean,end:Boolean,icon:He,opacity:[String,Number],...Ge(),...Xu(),...gt({tag:"i"}),...Nt()},"VIcon"),ee=Ee()({name:"VIcon",props:lB(),setup(e,t){let{attrs:n,slots:r}=t;const s=Ce(),{themeClasses:i}=ZR(),{iconData:o}=oB(()=>s.value||e.icon),{sizeClasses:a}=rf(e),{textColorClasses:l,textColorStyles:u}=Vs(()=>e.color);return Me(()=>{var f,h;const c=(f=r.default)==null?void 0:f.call(r);c&&(s.value=(h=VR(c).filter(g=>g.type===Jd&&g.children&&typeof g.children=="string")[0])==null?void 0:h.children);const d=!!(n.onClick||n.onClickOnce);return p(o.value.component,{tag:e.tag,icon:o.value.icon,class:Oe(["v-icon","notranslate",i.value,a.value,l.value,{"v-icon--clickable":d,"v-icon--disabled":e.disabled,"v-icon--start":e.start,"v-icon--end":e.end},e.class]),style:Be([{"--v-icon-opacity":e.opacity},a.value?void 0:{fontSize:Le(e.size),height:Le(e.size),width:Le(e.size)},u.value,e.style]),role:d?"button":void 0,"aria-hidden":!d,tabindex:d?e.disabled?-1:0:void 0},{default:()=>[c]})}),{}}});function oP(e,t){const n=G(),r=Ce(!1);if(h0){const s=new IntersectionObserver(i=>{r.value=!!i.find(o=>o.isIntersecting)},t);ln(()=>{s.disconnect()}),xe(n,(i,o)=>{o&&(s.unobserve(o),r.value=!1),i&&s.observe(i)},{flush:"post"})}return{intersectionRef:n,isIntersecting:r}}function Yo(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"content";const n=ay(),r=G();if(Ot){const s=new ResizeObserver(i=>{e==null||e(i,s),i.length&&(t==="content"?r.value=i[0].contentRect:r.value=i[0].target.getBoundingClientRect())});Qn(()=>{s.disconnect()}),xe(()=>n.el,(i,o)=>{o&&(s.unobserve(o),r.value=void 0),i&&s.observe(i)},{flush:"post"})}return{resizeRef:n,contentRect:Ji(r)}}const uB=ce({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},...Ge(),...Xu(),...gt({tag:"div"}),...Nt()},"VProgressCircular"),di=Ee()({name:"VProgressCircular",props:uB(),setup(e,t){let{slots:n}=t;const r=20,s=2*Math.PI*r,i=G(),{themeClasses:o}=nn(e),{sizeClasses:a,sizeStyles:l}=rf(e),{textColorClasses:u,textColorStyles:c}=Vs(()=>e.color),{textColorClasses:d,textColorStyles:f}=Vs(()=>e.bgColor),{intersectionRef:h,isIntersecting:g}=oP(),{resizeRef:m,contentRect:y}=Yo(),w=ie(()=>Un(parseFloat(e.modelValue),0,100)),b=ie(()=>Number(e.width)),S=ie(()=>l.value?Number(e.size):y.value?y.value.width:Math.max(b.value,32)),_=ie(()=>r/(1-b.value/S.value)*2),k=ie(()=>b.value/S.value*_.value),T=ie(()=>{const x=(100-w.value)/100*s;return e.rounded&&w.value>0&&w.value<100?Le(Math.min(s-.01,x+k.value)):Le(x)}),R=D(()=>{const x=Number(e.rotate);return e.rounded?x+k.value/2/s*360:x});return Rn(()=>{h.value=i.value,m.value=i.value}),Me(()=>p(e.tag,{ref:i,class:Oe(["v-progress-circular",{"v-progress-circular--indeterminate":!!e.indeterminate,"v-progress-circular--visible":g.value,"v-progress-circular--disable-shrink":e.indeterminate&&(e.indeterminate==="disable-shrink"||il())},o.value,a.value,u.value,e.class]),style:Be([l.value,c.value,e.style]),role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e.indeterminate?void 0:w.value},{default:()=>[C("svg",{style:{transform:`rotate(calc(-90deg + ${R.value}deg))`},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${_.value} ${_.value}`},[C("circle",{class:Oe(["v-progress-circular__underlay",d.value]),style:Be(f.value),fill:"transparent",cx:"50%",cy:"50%",r,"stroke-width":k.value,"stroke-dasharray":s,"stroke-dashoffset":0},null),C("circle",{class:"v-progress-circular__overlay",fill:"transparent",cx:"50%",cy:"50%",r,"stroke-width":k.value,"stroke-dasharray":s,"stroke-dashoffset":T.value,"stroke-linecap":e.rounded?"round":void 0},null)]),n.default&&C("div",{class:"v-progress-circular__content"},[n.default({value:w.value})])]})),{}}}),xr=ce({height:[Number,String],maxHeight:[Number,String],maxWidth:[Number,String],minHeight:[Number,String],minWidth:[Number,String],width:[Number,String]},"dimension");function Er(e){return{dimensionStyles:D(()=>{const n={},r=Le(e.height),s=Le(e.maxHeight),i=Le(e.maxWidth),o=Le(e.minHeight),a=Le(e.minWidth),l=Le(e.width);return r!=null&&(n.height=r),s!=null&&(n.maxHeight=s),i!=null&&(n.maxWidth=i),o!=null&&(n.minHeight=o),a!=null&&(n.minWidth=a),l!=null&&(n.width=l),n})}}const cB={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"}}},JS="$vuetify.",ZS=(e,t)=>e.replace(/\{(\d+)\}/g,(n,r)=>String(t[Number(r)])),aP=(e,t,n)=>function(r){for(var s=arguments.length,i=new Array(s>1?s-1:0),o=1;o<s;o++)i[o-1]=arguments[o];if(!r.startsWith(JS))return ZS(r,i);const a=r.replace(JS,""),l=e.value&&n.value[e.value],u=t.value&&n.value[t.value];let c=ol(l,a,null);return c||(`${r}${e.value}`,c=ol(u,a,null)),c||(c=r),typeof c!="string"&&(c=r),ZS(c,i)};function x0(e,t){return(n,r)=>new Intl.NumberFormat([e.value,t.value],r).format(n)}function lP(e,t){return x0(e,t)(.1).includes(",")?",":"."}function Lg(e,t,n){const r=lt(e,t,e[t]??n.value);return r.value=e[t]??n.value,xe(n,s=>{e[t]==null&&(r.value=n.value)}),r}function uP(e){return t=>{const n=Lg(t,"locale",e.current),r=Lg(t,"fallback",e.fallback),s=Lg(t,"messages",e.messages);return{name:"vuetify",current:n,fallback:r,messages:s,decimalSeparator:ie(()=>lP(n,r)),t:aP(n,r,s),n:x0(n,r),provide:uP({current:n,fallback:r,messages:s})}}}function dB(e){const t=Ce((e==null?void 0:e.locale)??"en"),n=Ce((e==null?void 0:e.fallback)??"en"),r=G({en:cB,...e==null?void 0:e.messages});return{name:"vuetify",current:t,fallback:n,messages:r,decimalSeparator:ie(()=>(e==null?void 0:e.decimalSeparator)??lP(t,n)),t:aP(t,n,r),n:x0(t,n),provide:uP({current:t,fallback:n,messages:r})}}const gp=Symbol.for("vuetify:locale");function fB(e){return e.name!=null}function hB(e){const t=e!=null&&e.adapter&&fB(e==null?void 0:e.adapter)?e==null?void 0:e.adapter:dB(e),n=mB(t,e);return{...t,...n}}function ts(){const e=Xe(gp);if(!e)throw new Error("[Vuetify] Could not find injected locale instance");return e}function pB(){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 mB(e,t){const n=G((t==null?void 0:t.rtl)??pB()),r=D(()=>n.value[e.current.value]??!1);return{isRtl:r,rtl:n,rtlClasses:ie(()=>`v-locale--is-${r.value?"rtl":"ltr"}`)}}function Wr(){const e=Xe(gp);if(!e)throw new Error("[Vuetify] Could not find injected rtl instance");return{isRtl:e.isRtl,rtlClasses:e.rtlClasses}}const e_={center:"center",top:"bottom",bottom:"top",left:"right",right:"left"},sa=ce({location:String},"location");function wl(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2?arguments[2]:void 0;const{isRtl:r}=Wr();return{locationStyles:D(()=>{if(!e.location)return{};const{side:i,align:o}=ly(e.location.split(" ").length>1?e.location:`${e.location} center`,r.value);function a(u){return n?n(u):0}const l={};return i!=="center"&&(t?l[e_[i]]=`calc(100% - ${a(i)}px)`:l[i]=0),o!=="center"?t?l[e_[o]]=`calc(100% - ${a(o)}px)`:l[o]=0:(i==="center"?l.top=l.left="50%":l[{top:"left",bottom:"left",left:"top",right:"top"}[i]]="50%",l.transform={top:"translateX(-50%)",bottom:"translateX(-50%)",left:"translateY(-50%)",right:"translateY(-50%)",center:"translate(-50%, -50%)"}[i]),l})}}const gB=ce({chunkCount:{type:[Number,String],default:null},chunkWidth:{type:[Number,String],default:null},chunkGap:{type:[Number,String],default:4}},"chunks");function vB(e,t){const n=ie(()=>!!e.chunkCount||!!e.chunkWidth),r=D(()=>{const a=Qt(t);if(!a)return 0;if(!e.chunkCount)return Number(e.chunkWidth);const l=Number(e.chunkCount);return(a-Number(e.chunkGap)*(l-1))/l}),s=ie(()=>Number(e.chunkGap)),i=D(()=>{if(!n.value)return{};const a=Le(s.value),l=Le(r.value);return{maskRepeat:"repeat-x",maskImage:`linear-gradient(90deg, #000, #000 ${l}, transparent ${l}, transparent)`,maskSize:`calc(${l} + ${a}) 100%`}});function o(a){const l=Qt(t);if(!l)return a;const u=100*s.value/l,c=100*(r.value+s.value)/l,d=Math.floor((a+u)/c);return Un(0,d*c-u/2,100)}return{hasChunks:n,chunksMaskStyles:i,snapValueToChunk:o}}const yB=ce({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,...gB(),...Ge(),...sa({location:"top"}),...Hn(),...gt(),...Nt()},"VProgressLinear"),Eu=Ee()({name:"VProgressLinear",props:yB(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=G(),s=lt(e,"modelValue"),{isRtl:i,rtlClasses:o}=Wr(),{themeClasses:a}=nn(e),{locationStyles:l}=wl(e),{textColorClasses:u,textColorStyles:c}=Vs(()=>e.color),{backgroundColorClasses:d,backgroundColorStyles:f}=wr(()=>e.bgColor||e.color),{backgroundColorClasses:h,backgroundColorStyles:g}=wr(()=>e.bufferColor||e.bgColor||e.color),{backgroundColorClasses:m,backgroundColorStyles:y}=wr(()=>e.color),{roundedClasses:w}=Zn(e),{intersectionRef:b,isIntersecting:S}=oP(),_=D(()=>parseFloat(e.max)),k=D(()=>parseFloat(e.height)),T=D(()=>Un(parseFloat(e.bufferValue)/_.value*100,0,100)),R=D(()=>Un(parseFloat(s.value)/_.value*100,0,100)),x=D(()=>i.value!==e.reverse),I=D(()=>e.indeterminate?"fade-transition":"slide-x-transition"),P=Ce(0),{hasChunks:A,chunksMaskStyles:L,snapValueToChunk:B}=vB(e,P);Nr(A,()=>{const{resizeRef:X}=Yo(V=>P.value=V[0].contentRect.width);Rn(()=>X.value=r.value)});const O=D(()=>A.value?B(T.value):T.value),F=D(()=>A.value?B(R.value):R.value);function W(X){if(!b.value)return;const{left:V,right:z,width:M}=b.value.getBoundingClientRect(),re=x.value?M-X.clientX+(z-M):X.clientX-V;s.value=Math.round(re/M*_.value)}return Rn(()=>{b.value=r.value}),Me(()=>p(e.tag,{ref:r,class:Oe(["v-progress-linear",{"v-progress-linear--absolute":e.absolute,"v-progress-linear--active":e.active&&S.value,"v-progress-linear--reverse":x.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},w.value,a.value,o.value,e.class]),style:Be([{bottom:e.location==="bottom"?0:void 0,top:e.location==="top"?0:void 0,height:e.active?Le(k.value):0,"--v-progress-linear-height":Le(k.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),_.value),onClick:e.clickable&&W},{default:()=>[e.stream&&C("div",{key:"stream",class:Oe(["v-progress-linear__stream",u.value]),style:{...c.value,[x.value?"left":"right"]:Le(-k.value),borderTop:`${Le(k.value/2)} dotted`,opacity:parseFloat(e.bufferOpacity),top:`calc(50% - ${Le(k.value/4)})`,width:Le(100-T.value,"%"),"--v-progress-linear-stream-to":Le(k.value*(x.value?1:-1))}},null),C("div",{class:Oe(["v-progress-linear__background",d.value]),style:Be([f.value,{opacity:parseFloat(e.bgOpacity),width:e.stream?0:void 0}])},null),C("div",{class:Oe(["v-progress-linear__buffer",h.value]),style:Be([g.value,{opacity:parseFloat(e.bufferOpacity),width:Le(O.value,"%")}])},null),p(qo,{name:I.value},{default:()=>[e.indeterminate?C("div",{class:"v-progress-linear__indeterminate"},[["long","short"].map(X=>C("div",{key:X,class:Oe(["v-progress-linear__indeterminate",X,m.value]),style:Be(y.value)},null))]):C("div",{class:Oe(["v-progress-linear__determinate",m.value]),style:Be([y.value,{width:Le(F.value,"%")}])},null)]}),n.default&&C("div",{class:"v-progress-linear__content"},[n.default({value:R.value,buffer:T.value})])]})),{}}}),Sm=ce({loading:[Boolean,String]},"loader");function sf(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wi();return{loaderClasses:ie(()=>({[`${t}--loading`]:e.loading}))}}function _m(e,t){var r;let{slots:n}=t;return C("div",{class:Oe(`${e.name}__loader`)},[((r=n.default)==null?void 0:r.call(n,{color:e.color,isActive:e.active}))||p(Eu,{absolute:e.absolute,active:e.active,color:e.color,height:"2",indeterminate:!0},null)])}const bB=["static","relative","fixed","absolute","sticky"],Qu=ce({position:{type:String,validator:e=>bB.includes(e)}},"position");function Ju(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wi();return{positionClasses:ie(()=>e.position?`${t}--${e.position}`:void 0)}}function wB(){const e=fn("useRoute");return D(()=>{var t;return(t=e==null?void 0:e.proxy)==null?void 0:t.$route})}function cP(){var e,t;return(t=(e=fn("useRouter"))==null?void 0:e.proxy)==null?void 0:t.$router}function km(e,t){var d,f;const n=wF("RouterLink"),r=ie(()=>!!(e.href||e.to)),s=D(()=>(r==null?void 0:r.value)||IS(t,"click")||IS(e,"click"));if(typeof n=="string"||!("useLink"in n)){const h=ie(()=>e.href);return{isLink:r,isRouterLink:ie(()=>!1),isClickable:s,href:h,linkProps:gn({href:h})}}const i=n.useLink({to:ie(()=>e.to||""),replace:ie(()=>e.replace)}),o=D(()=>e.to?i:void 0),a=wB(),l=D(()=>{var h,g,m;return o.value?e.exact?a.value?((m=o.value.isExactActive)==null?void 0:m.value)&&$r(o.value.route.value.query,a.value.query):((g=o.value.isExactActive)==null?void 0:g.value)??!1:((h=o.value.isActive)==null?void 0:h.value)??!1:!1}),u=D(()=>{var h;return e.to?(h=o.value)==null?void 0:h.route.value.href:e.href}),c=ie(()=>!!e.to);return{isLink:r,isRouterLink:c,isClickable:s,isActive:l,route:(d=o.value)==null?void 0:d.route,navigate:(f=o.value)==null?void 0:f.navigate,href:u,linkProps:gn({href:u,"aria-current":ie(()=>l.value?"page":void 0),"aria-disabled":ie(()=>e.disabled&&r.value?"true":void 0),tabindex:ie(()=>e.disabled&&r.value?"-1":void 0)})}}const xm=ce({href:String,replace:Boolean,to:[String,Object],exact:Boolean},"router");let Fg=!1;function SB(e,t){let n=!1,r,s;Ot&&(e!=null&&e.beforeEach)&&(ht(()=>{window.addEventListener("popstate",i),r=e.beforeEach((o,a,l)=>{Fg?n?t(l):l():setTimeout(()=>n?t(l):l()),Fg=!0}),s=e==null?void 0:e.afterEach(()=>{Fg=!1})}),ln(()=>{window.removeEventListener("popstate",i),r==null||r(),s==null||s()}));function i(o){var a;(a=o.state)!=null&&a.replaced||(n=!0,setTimeout(()=>n=!1))}}function _B(e,t){xe(()=>{var n;return(n=e.isActive)==null?void 0:n.value},n=>{e.isLink.value&&n!=null&&t&&ht(()=>{t(n)})},{immediate:!0})}const fy=Symbol("rippleStop"),kB=80;function t_(e,t){e.style.transform=t,e.style.webkitTransform=t}function hy(e){return e.constructor.name==="TouchEvent"}function dP(e){return e.constructor.name==="KeyboardEvent"}const xB=function(e,t){var d;let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=0,s=0;if(!dP(e)){const f=t.getBoundingClientRect(),h=hy(e)?e.touches[e.touches.length-1]:e;r=h.clientX-f.left,s=h.clientY-f.top}let i=0,o=.3;(d=t._ripple)!=null&&d.circle?(o=.15,i=t.clientWidth/2,i=n.center?i:i+Math.sqrt((r-i)**2+(s-i)**2)/4):i=Math.sqrt(t.clientWidth**2+t.clientHeight**2)/2;const a=`${(t.clientWidth-i*2)/2}px`,l=`${(t.clientHeight-i*2)/2}px`,u=n.center?a:`${r-i}px`,c=n.center?l:`${s-i}px`;return{radius:i,scale:o,x:u,y:c,centerX:a,centerY:l}},vp={show(e,t){var h;let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!((h=t==null?void 0:t._ripple)!=null&&h.enabled))return;const r=document.createElement("span"),s=document.createElement("span");r.appendChild(s),r.className="v-ripple__container",n.class&&(r.className+=` ${n.class}`);const{radius:i,scale:o,x:a,y:l,centerX:u,centerY:c}=xB(e,t,n),d=`${i*2}px`;s.className="v-ripple__animation",s.style.width=d,s.style.height=d,t.appendChild(r);const f=window.getComputedStyle(t);f&&f.position==="static"&&(t.style.position="relative",t.dataset.previousPosition="static"),s.classList.add("v-ripple__animation--enter"),s.classList.add("v-ripple__animation--visible"),t_(s,`translate(${a}, ${l}) scale3d(${o},${o},${o})`),s.dataset.activated=String(performance.now()),requestAnimationFrame(()=>{requestAnimationFrame(()=>{s.classList.remove("v-ripple__animation--enter"),s.classList.add("v-ripple__animation--in"),t_(s,`translate(${u}, ${c}) scale3d(1,1,1)`)})})},hide(e){var i;if(!((i=e==null?void 0:e._ripple)!=null&&i.enabled))return;const t=e.getElementsByClassName("v-ripple__animation");if(t.length===0)return;const n=Array.from(t).findLast(o=>!o.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(()=>{var a;e.getElementsByClassName("v-ripple__animation").length===1&&e.dataset.previousPosition&&(e.style.position=e.dataset.previousPosition,delete e.dataset.previousPosition),((a=n.parentNode)==null?void 0:a.parentNode)===e&&e.removeChild(n.parentNode)},300)},s)}};function fP(e){return typeof e>"u"||!!e}function Sd(e){const t={},n=e.currentTarget;if(!(!(n!=null&&n._ripple)||n._ripple.touched||e[fy])){if(e[fy]=!0,hy(e))n._ripple.touched=!0,n._ripple.isTouch=!0;else if(n._ripple.isTouch)return;if(t.center=n._ripple.centered||dP(e),n._ripple.class&&(t.class=n._ripple.class),hy(e)){if(n._ripple.showTimerCommit)return;n._ripple.showTimerCommit=()=>{vp.show(e,n,t)},n._ripple.showTimer=window.setTimeout(()=>{var r;(r=n==null?void 0:n._ripple)!=null&&r.showTimerCommit&&(n._ripple.showTimerCommit(),n._ripple.showTimerCommit=null)},kB)}else vp.show(e,n,t)}}function yp(e){e[fy]=!0}function Xr(e){const t=e.currentTarget;if(t!=null&&t._ripple){if(window.clearTimeout(t._ripple.showTimer),e.type==="touchend"&&t._ripple.showTimerCommit){t._ripple.showTimerCommit(),t._ripple.showTimerCommit=null,t._ripple.showTimer=window.setTimeout(()=>{Xr(e)});return}window.setTimeout(()=>{t._ripple&&(t._ripple.touched=!1)}),vp.hide(t)}}function hP(e){const t=e.currentTarget;t!=null&&t._ripple&&(t._ripple.showTimerCommit&&(t._ripple.showTimerCommit=null),window.clearTimeout(t._ripple.showTimer))}let _d=!1;function EB(e,t){!_d&&t.includes(e.key)&&(_d=!0,Sd(e))}function pP(e){_d=!1,Xr(e)}function mP(e){_d&&(_d=!1,Xr(e))}function gP(e,t,n){const{value:r,modifiers:s}=t,i=fP(r);i||vp.hide(e),e._ripple=e._ripple??{},e._ripple.enabled=i,e._ripple.centered=s.center,e._ripple.circle=s.circle;const o=_u(r)?r:{};o.class&&(e._ripple.class=o.class);const a=o.keys??["Enter","Space"];if(e._ripple.keyDownHandler=l=>EB(l,a),i&&!n){if(s.stop){e.addEventListener("touchstart",yp,{passive:!0}),e.addEventListener("mousedown",yp);return}e.addEventListener("touchstart",Sd,{passive:!0}),e.addEventListener("touchend",Xr,{passive:!0}),e.addEventListener("touchmove",hP,{passive:!0}),e.addEventListener("touchcancel",Xr),e.addEventListener("mousedown",Sd),e.addEventListener("mouseup",Xr),e.addEventListener("mouseleave",Xr),e.addEventListener("keydown",e._ripple.keyDownHandler),e.addEventListener("keyup",pP),e.addEventListener("blur",mP),e.addEventListener("dragstart",Xr,{passive:!0})}else!i&&n&&vP(e)}function vP(e){var t;e.removeEventListener("touchstart",yp),e.removeEventListener("mousedown",yp),e.removeEventListener("touchstart",Sd),e.removeEventListener("touchend",Xr),e.removeEventListener("touchmove",hP),e.removeEventListener("touchcancel",Xr),e.removeEventListener("mousedown",Sd),e.removeEventListener("mouseup",Xr),e.removeEventListener("mouseleave",Xr),(t=e._ripple)!=null&&t.keyDownHandler&&e.removeEventListener("keydown",e._ripple.keyDownHandler),e.removeEventListener("keyup",pP),e.removeEventListener("blur",mP),e.removeEventListener("dragstart",Xr)}function CB(e,t){gP(e,t,!1)}function TB(e){vP(e),delete e._ripple}function RB(e,t){if(t.value===t.oldValue)return;const n=fP(t.oldValue);gP(e,t,n)}const Us={mounted:CB,unmounted:TB,updated:RB},yP=ce({active:{type:Boolean,default:void 0},activeColor:String,baseColor:String,symbol:{type:null,default:nP},flat:Boolean,icon:[Boolean,String,Function,Object],prependIcon:He,appendIcon:He,block:Boolean,readonly:Boolean,slim:Boolean,stacked:Boolean,spaced:String,ripple:{type:[Boolean,Object],default:!0},text:{type:[String,Number,Boolean],default:void 0},...xs(),...Ge(),...Jn(),...xr(),...Cs(),...nf(),...Sm(),...sa(),...Qu(),...Hn(),...xm(),...Xu(),...gt({tag:"button"}),...Nt(),...Ws({variant:"elevated"})},"VBtn"),se=Ee()({name:"VBtn",props:yP(),emits:{"group:selected":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const{themeClasses:s}=nn(e),{borderClasses:i}=Hs(e),{densityClasses:o}=Es(e),{dimensionStyles:a}=Er(e),{elevationClasses:l}=js(e),{loaderClasses:u}=sf(e),{locationStyles:c}=wl(e),{positionClasses:d}=Ju(e),{roundedClasses:f}=Zn(e),{sizeClasses:h,sizeStyles:g}=rf(e),m=xu(e,e.symbol,!1),y=km(e,n),w=D(()=>{var A;return e.active!==void 0?e.active:y.isRouterLink.value?(A=y.isActive)==null?void 0:A.value:m==null?void 0:m.isSelected.value}),b=ie(()=>w.value?e.activeColor??e.color:e.color),S=D(()=>{var L,B;return{color:(m==null?void 0:m.isSelected.value)&&(!y.isLink.value||((L=y.isActive)==null?void 0:L.value))||!m||((B=y.isActive)==null?void 0:B.value)?b.value??e.baseColor:e.baseColor,variant:e.variant}}),{colorClasses:_,colorStyles:k,variantClasses:T}=bl(S),R=D(()=>(m==null?void 0:m.disabled.value)||e.disabled),x=ie(()=>e.variant==="elevated"&&!(e.disabled||e.flat||e.border)),I=D(()=>{if(!(e.value===void 0||typeof e.value=="symbol"))return Object(e.value)===e.value?JSON.stringify(e.value,null,0):e.value});function P(A){var L;R.value||y.isLink.value&&(A.metaKey||A.ctrlKey||A.shiftKey||A.button!==0||n.target==="_blank")||(y.isRouterLink.value?(L=y.navigate)==null||L.call(y,A):m==null||m.toggle())}return _B(y,m==null?void 0:m.select),Me(()=>{const A=y.isLink.value?"a":e.tag,L=!!(e.prependIcon||r.prepend),B=!!(e.appendIcon||r.append),O=!!(e.icon&&e.icon!==!0);return zt(p(A,ge(y.linkProps,{type:A==="a"?void 0:"button",class:["v-btn",m==null?void 0:m.selectedClass.value,{"v-btn--active":w.value,"v-btn--block":e.block,"v-btn--disabled":R.value,"v-btn--elevated":x.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,_.value,o.value,l.value,u.value,d.value,f.value,h.value,T.value,e.class],style:[k.value,a.value,c.value,g.value,e.style],"aria-busy":e.loading?!0:void 0,disabled:R.value&&A!=="a"||void 0,tabindex:e.loading||e.readonly?-1:void 0,onClick:P,value:I.value}),{default:()=>{var F;return[ra(!0,"v-btn"),!e.icon&&L&&C("span",{key:"prepend",class:"v-btn__prepend"},[r.prepend?p(Ft,{key:"prepend-defaults",disabled:!e.prependIcon,defaults:{VIcon:{icon:e.prependIcon}}},r.prepend):p(ee,{key:"prepend-icon",icon:e.prependIcon},null)]),C("span",{class:"v-btn__content","data-no-activator":""},[!r.default&&O?p(ee,{key:"content-icon",icon:e.icon},null):p(Ft,{key:"content-defaults",disabled:!O,defaults:{VIcon:{icon:e.icon}}},{default:()=>{var W;return[((W=r.default)==null?void 0:W.call(r))??ae(e.text)]}})]),!e.icon&&B&&C("span",{key:"append",class:"v-btn__append"},[r.append?p(Ft,{key:"append-defaults",disabled:!e.appendIcon,defaults:{VIcon:{icon:e.appendIcon}}},r.append):p(ee,{key:"append-icon",icon:e.appendIcon},null)]),!!e.loading&&C("span",{key:"loader",class:"v-btn__loader"},[((F=r.loader)==null?void 0:F.call(r))??p(di,{color:typeof e.loading=="boolean"?void 0:e.loading,indeterminate:!0,width:"2"},null)])]}}),[[Us,!R.value&&e.ripple,"",{center:!!e.icon}]])}),{group:m}}}),PB=ce({disabled:Boolean,group:Boolean,hideOnLeave:Boolean,leaveAbsolute:Boolean,mode:String,origin:String},"transition");function ns(e,t,n){return Ee()({name:e,props:PB({mode:n,origin:t}),setup(r,s){let{slots:i}=s;const o={onBeforeEnter(a){r.origin&&(a.style.transformOrigin=r.origin)},onLeave(a){if(r.leaveAbsolute){const{offsetTop:l,offsetLeft:u,offsetWidth:c,offsetHeight:d}=a;a._transitionInitialStyles={position:a.style.position,top:a.style.top,left:a.style.left,width:a.style.width,height:a.style.height},a.style.position="absolute",a.style.top=`${l}px`,a.style.left=`${u}px`,a.style.width=`${c}px`,a.style.height=`${d}px`}r.hideOnLeave&&a.style.setProperty("display","none","important")},onAfterLeave(a){if(r.leaveAbsolute&&(a!=null&&a._transitionInitialStyles)){const{position:l,top:u,left:c,width:d,height:f}=a._transitionInitialStyles;delete a._transitionInitialStyles,a.style.position=l||"",a.style.top=u||"",a.style.left=c||"",a.style.width=d||"",a.style.height=f||""}}};return()=>{const a=r.group?f0:qo;return _r(a,{name:r.disabled?"":e,css:!r.disabled,...r.group?void 0:{mode:r.mode},...r.disabled?{}:o},i.default)}}})}function bP(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"in-out";return Ee()({name:e,props:{mode:{type:String,default:n},disabled:{type:Boolean,default:il()},group:Boolean},setup(r,s){let{slots:i}=s;const o=r.group?f0:qo;return()=>_r(o,{name:r.disabled?"":e,css:!r.disabled,...r.disabled?{}:t},i.default)}})}function wP(){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(o){o._parent=o.parentNode,o._initialStyle={transition:o.style.transition,overflow:o.style.overflow,[n]:o.style[n]}},onEnter(o){const a=o._initialStyle;if(!a)return;o.style.setProperty("transition","none","important"),o.style.overflow="hidden";const l=`${o[r]}px`;o.style[n]="0",o.offsetHeight,o.style.transition=a.transition,e&&o._parent&&o._parent.classList.add(e),requestAnimationFrame(()=>{o.style[n]=l})},onAfterEnter:i,onEnterCancelled:i,onLeave(o){o._initialStyle={transition:"",overflow:o.style.overflow,[n]:o.style[n]},o.style.overflow="hidden",o.style[n]=`${o[r]}px`,o.offsetHeight,requestAnimationFrame(()=>o.style[n]="0")},onAfterLeave:s,onLeaveCancelled:s};function s(o){e&&o._parent&&o._parent.classList.remove(e),i(o)}function i(o){if(!o._initialStyle)return;const a=o._initialStyle[n];o.style.overflow=o._initialStyle.overflow,a!=null&&(o.style[n]=a),delete o._initialStyle}}const IB=ce({target:[Object,Array]},"v-dialog-transition"),$g=new WeakMap,E0=Ee()({name:"VDialogTransition",props:IB(),setup(e,t){let{slots:n}=t;const r={onBeforeEnter(s){s.style.pointerEvents="none",s.style.visibility="hidden"},async onEnter(s,i){var f;await new Promise(h=>requestAnimationFrame(h)),await new Promise(h=>requestAnimationFrame(h)),s.style.visibility="";const o=r_(e.target,s),{x:a,y:l,sx:u,sy:c,speed:d}=o;if($g.set(s,o),il())ko(s,[{opacity:0},{}],{duration:125*d,easing:WS}).finished.then(()=>i());else{const h=ko(s,[{transform:`translate(${a}px, ${l}px) scale(${u}, ${c})`,opacity:0},{}],{duration:225*d,easing:WS});(f=n_(s))==null||f.forEach(g=>{ko(g,[{opacity:0},{opacity:0,offset:.33},{}],{duration:225*2*d,easing:pp})}),h.finished.then(()=>i())}},onAfterEnter(s){s.style.removeProperty("pointer-events")},onBeforeLeave(s){s.style.pointerEvents="none"},async onLeave(s,i){var f;await new Promise(h=>requestAnimationFrame(h));let o;!$g.has(s)||Array.isArray(e.target)||e.target.offsetParent||e.target.getClientRects().length?o=r_(e.target,s):o=$g.get(s);const{x:a,y:l,sx:u,sy:c,speed:d}=o;il()?ko(s,[{},{opacity:0}],{duration:85*d,easing:qS}).finished.then(()=>i()):(ko(s,[{},{transform:`translate(${a}px, ${l}px) scale(${u}, ${c})`,opacity:0}],{duration:125*d,easing:qS}).finished.then(()=>i()),(f=n_(s))==null||f.forEach(g=>{ko(g,[{},{opacity:0,offset:.2},{opacity:0}],{duration:125*2*d,easing:pp})}))},onAfterLeave(s){s.style.removeProperty("pointer-events")}};return()=>e.target?p(qo,ge({name:"dialog-transition"},r,{css:!1}),n):p(qo,{name:"dialog-transition"},n)}});function n_(e){var n;const t=(n=e.querySelector(":scope > .v-card, :scope > .v-sheet, :scope > .v-list"))==null?void 0:n.children;return t&&[...t]}function r_(e,t){const n=qR(e),r=y0(t),[s,i]=getComputedStyle(t).transformOrigin.split(" ").map(w=>parseFloat(w)),[o,a]=getComputedStyle(t).getPropertyValue("--v-overlay-anchor-origin").split(" ");let l=n.left+n.width/2;o==="left"||a==="left"?l-=n.width/2:(o==="right"||a==="right")&&(l+=n.width/2);let u=n.top+n.height/2;o==="top"||a==="top"?u-=n.height/2:(o==="bottom"||a==="bottom")&&(u+=n.height/2);const c=n.width/r.width,d=n.height/r.height,f=Math.max(1,c,d),h=c/f||0,g=d/f||0,m=r.width*r.height/(window.innerWidth*window.innerHeight),y=m>.12?Math.min(1.5,(m-.12)*10+1):1;return{x:l-(s+r.left),y:u-(i+r.top),sx:h,sy:g,speed:y}}ns("fab-transition","center center","out-in");ns("dialog-bottom-transition");ns("dialog-top-transition");const s_=ns("fade-transition"),AB=ns("scale-transition");ns("scroll-x-transition");ns("scroll-x-reverse-transition");const OB=ns("scroll-y-transition");ns("scroll-y-reverse-transition");ns("slide-x-transition");ns("slide-x-reverse-transition");const SP=ns("slide-y-transition");ns("slide-y-reverse-transition");const _P=bP("expand-transition",wP()),kP=bP("expand-x-transition",wP("",!0));function Ng(e,t){return{x:e.x+t.x,y:e.y+t.y}}function DB(e,t){return{x:e.x-t.x,y:e.y-t.y}}function i_(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 Ng({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 Ng({x:s,y:i},t)}return Ng({x:t.width/2,y:t.height/2},t)}const xP={static:FB,connected:NB},MB=ce({locationStrategy:{type:[String,Function],default:"static",validator:e=>typeof e=="function"||e in xP},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 LB(e,t){const n=G({}),r=G();Ot&&Nr(()=>!!(t.isActive.value&&e.locationStrategy),a=>{var l,u;xe(()=>e.locationStrategy,a),ln(()=>{window.removeEventListener("resize",s),visualViewport==null||visualViewport.removeEventListener("resize",i),visualViewport==null||visualViewport.removeEventListener("scroll",o),r.value=void 0}),window.addEventListener("resize",s,{passive:!0}),visualViewport==null||visualViewport.addEventListener("resize",i,{passive:!0}),visualViewport==null||visualViewport.addEventListener("scroll",o,{passive:!0}),typeof e.locationStrategy=="function"?r.value=(l=e.locationStrategy(t,e,n))==null?void 0:l.updateLocation:r.value=(u=xP[e.locationStrategy](t,e,n))==null?void 0:u.updateLocation});function s(a){var l;(l=r.value)==null||l.call(r,a)}function i(a){var l;(l=r.value)==null||l.call(r,a)}function o(a){var l;(l=r.value)==null||l.call(r,a)}return{contentStyles:n,updateLocation:r}}function FB(){}function $B(e,t){const n=y0(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 NB(e,t,n){(Array.isArray(e.target.value)||zN(e.target.value))&&Object.assign(n.value,{position:"fixed",top:0,[e.isRtl.value?"right":"left"]:0});const{preferredAnchor:s,preferredOrigin:i}=v0(()=>{const w=ly(t.location,e.isRtl.value),b=t.origin==="overlap"?w:t.origin==="auto"?Dg(w):ly(t.origin,e.isRtl.value);return w.side===b.side&&w.align===Mg(b).align?{preferredAnchor:OS(w),preferredOrigin:OS(b)}:{preferredAnchor:w,preferredOrigin:b}}),[o,a,l,u]=["minWidth","minHeight","maxWidth","maxHeight"].map(w=>D(()=>{const b=parseFloat(t[w]);return isNaN(b)?1/0:b})),c=D(()=>{if(Array.isArray(t.offset))return t.offset;if(typeof t.offset=="string"){const w=t.offset.split(" ").map(parseFloat);return w.length<2&&w.push(0),w}return typeof t.offset=="number"?[t.offset,0]:[0,0]});let d=!1,f=-1;const h=new UR(4),g=new ResizeObserver(()=>{if(!d)return;if(requestAnimationFrame(b=>{b!==f&&h.clear(),requestAnimationFrame(S=>{f=S})}),h.isFull){const b=h.values();if($r(b.at(-1),b.at(-3))&&!$r(b.at(-1),b.at(-2)))return}const w=y();w&&h.push(w.flipped)});let m=new hs({x:0,y:0,width:0,height:0});xe(e.target,(w,b)=>{b&&!Array.isArray(b)&&g.unobserve(b),Array.isArray(w)?$r(w,b)||y():w&&g.observe(w)},{immediate:!0}),xe(e.contentEl,(w,b)=>{b&&g.unobserve(b),w&&g.observe(w)},{immediate:!0}),ln(()=>{g.disconnect()});function y(){if(d=!1,requestAnimationFrame(()=>d=!0),!e.target.value||!e.contentEl.value)return;(Array.isArray(e.target.value)||e.target.value.offsetParent||e.target.value.getClientRects().length)&&(m=qR(e.target.value));const w=$B(e.contentEl.value,e.isRtl.value),b=mp(e.contentEl.value),S=Number(t.viewportMargin);b.length||(b.push(document.documentElement),e.contentEl.value.style.top&&e.contentEl.value.style.left||(w.x-=parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-x")||0),w.y-=parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-y")||0)));const _=b.reduce((B,O)=>{const F=uN(O);return B?new hs({x:Math.max(B.left,F.left),y:Math.max(B.top,F.top),width:Math.min(B.right,F.right)-Math.max(B.left,F.left),height:Math.min(B.bottom,F.bottom)-Math.max(B.top,F.top)}):F},void 0);t.stickToTarget?(_.x+=Math.min(S,m.x),_.y+=Math.min(S,m.y),_.width=Math.max(_.width-S*2,m.x+m.width-S),_.height=Math.max(_.height-S*2,m.y+m.height-S)):(_.x+=S,_.y+=S,_.width-=S*2,_.height-=S*2);let k={anchor:s.value,origin:i.value};function T(B){const O=new hs(w),F=i_(B.anchor,m),W=i_(B.origin,O);let{x:X,y:V}=DB(F,W);switch(B.anchor.side){case"top":V-=c.value[0];break;case"bottom":V+=c.value[0];break;case"left":X-=c.value[0];break;case"right":X+=c.value[0];break}switch(B.anchor.align){case"top":V-=c.value[1];break;case"bottom":V+=c.value[1];break;case"left":X-=c.value[1];break;case"right":X+=c.value[1];break}return O.x+=X,O.y+=V,O.width=Math.min(O.width,l.value),O.height=Math.min(O.height,u.value),{overflows:MS(O,_),x:X,y:V}}let R=0,x=0;const I={x:0,y:0},P={x:!1,y:!1};let A=-1;for(;!(A++>10);){const{x:B,y:O,overflows:F}=T(k);R+=B,x+=O,w.x+=B,w.y+=O;{const W=DS(k.anchor),X=F.x.before||F.x.after,V=F.y.before||F.y.after;let z=!1;if(["x","y"].forEach(M=>{if(M==="x"&&X&&!P.x||M==="y"&&V&&!P.y){const re={anchor:{...k.anchor},origin:{...k.origin}},H=M==="x"?W==="y"?Mg:Dg:W==="y"?Dg:Mg;re.anchor=H(re.anchor),re.origin=H(re.origin);const{overflows:j}=T(re);(j[M].before<=F[M].before&&j[M].after<=F[M].after||j[M].before+j[M].after<(F[M].before+F[M].after)/2)&&(k=re,z=P[M]=!0)}}),z)continue}F.x.before&&(R+=F.x.before,w.x+=F.x.before),F.x.after&&(R-=F.x.after,w.x-=F.x.after),F.y.before&&(x+=F.y.before,w.y+=F.y.before),F.y.after&&(x-=F.y.after,w.y-=F.y.after);{const W=MS(w,_);I.x=_.width-W.x.before-W.x.after,I.y=_.height-W.y.before-W.y.after,R+=W.x.before,w.x+=W.x.before,x+=W.y.before,w.y+=W.y.before}break}const L=DS(k.anchor);return Object.assign(n.value,{"--v-overlay-anchor-origin":`${k.anchor.side} ${k.anchor.align}`,transformOrigin:`${k.origin.side} ${k.origin.align}`,top:Le(Bg(x)),left:e.isRtl.value?void 0:Le(Bg(R)),right:e.isRtl.value?Le(Bg(-R)):void 0,minWidth:Le(L==="y"?Math.min(o.value,m.width):o.value),maxWidth:Le(o_(Un(I.x,o.value===1/0?0:o.value,l.value))),maxHeight:Le(o_(Un(I.y,a.value===1/0?0:a.value,u.value)))}),{available:I,contentBox:w,flipped:P}}return xe(()=>[s.value,i.value,t.offset,t.minWidth,t.minHeight,t.maxWidth,t.maxHeight],()=>y()),ht(()=>{const w=y();if(!w)return;const{available:b,contentBox:S}=w;S.height>b.y&&requestAnimationFrame(()=>{y(),requestAnimationFrame(()=>{y()})})}),{updateLocation:y}}function Bg(e){return Math.round(e*devicePixelRatio)/devicePixelRatio}function o_(e){return Math.ceil(e*devicePixelRatio)/devicePixelRatio}let py=!0;const bp=[];function BB(e){!py||bp.length?(bp.push(e),my()):(py=!1,e(),my())}let a_=-1;function my(){cancelAnimationFrame(a_),a_=requestAnimationFrame(()=>{const e=bp.shift();e&&e(),bp.length?my():py=!0})}const kh={none:null,close:zB,block:HB,reposition:jB},VB=ce({scrollStrategy:{type:[String,Function],default:"block",validator:e=>typeof e=="function"||e in kh}},"VOverlay-scroll-strategies");function UB(e,t){if(!Ot)return;let n;Rn(async()=>{n==null||n.stop(),t.isActive.value&&e.scrollStrategy&&(n=rl(),await new Promise(r=>setTimeout(r)),n.active&&n.run(()=>{var r;typeof e.scrollStrategy=="function"?e.scrollStrategy(t,e,n):(r=kh[e.scrollStrategy])==null||r.call(kh,t,e,n)}))}),ln(()=>{n==null||n.stop()})}function zB(e){function t(n){e.isActive.value=!1}EP(C0(e.target.value,e.contentEl.value),t)}function HB(e,t){var a;const n=(a=e.root.value)==null?void 0:a.offsetParent,r=C0(e.target.value,e.contentEl.value),s=[...new Set([...mp(r,t.contained?n:void 0),...mp(e.contentEl.value,t.contained?n:void 0)])].filter(l=>!l.classList.contains("v-overlay-scroll-blocked")),i=window.innerWidth-document.documentElement.offsetWidth,o=(l=>_0(l)&&l)(n||document.documentElement);o&&e.root.value.classList.add("v-overlay--scroll-blocked"),s.forEach((l,u)=>{l.style.setProperty("--v-body-scroll-x",Le(-l.scrollLeft)),l.style.setProperty("--v-body-scroll-y",Le(-l.scrollTop)),l!==document.documentElement&&l.style.setProperty("--v-scrollbar-offset",Le(i)),l.classList.add("v-overlay-scroll-blocked")}),ln(()=>{s.forEach((l,u)=>{const c=parseFloat(l.style.getPropertyValue("--v-body-scroll-x")),d=parseFloat(l.style.getPropertyValue("--v-body-scroll-y")),f=l.style.scrollBehavior;l.style.scrollBehavior="auto",l.style.removeProperty("--v-body-scroll-x"),l.style.removeProperty("--v-body-scroll-y"),l.style.removeProperty("--v-scrollbar-offset"),l.classList.remove("v-overlay-scroll-blocked"),l.scrollLeft=-c,l.scrollTop=-d,l.style.scrollBehavior=f}),o&&e.root.value.classList.remove("v-overlay--scroll-blocked")})}function jB(e,t,n){let r=!1,s=-1,i=-1;function o(a){BB(()=>{var c,d;const l=performance.now();(d=(c=e.updateLocation).value)==null||d.call(c,a),r=(performance.now()-l)/(1e3/60)>2})}i=(typeof requestIdleCallback>"u"?a=>a():requestIdleCallback)(()=>{n.run(()=>{EP(C0(e.target.value,e.contentEl.value),a=>{r?(cancelAnimationFrame(s),s=requestAnimationFrame(()=>{s=requestAnimationFrame(()=>{o(a)})})):o(a)})})}),ln(()=>{typeof cancelIdleCallback<"u"&&cancelIdleCallback(i),cancelAnimationFrame(s)})}function C0(e,t){return Array.isArray(e)?document.elementsFromPoint(...e).find(n=>!(t!=null&&t.contains(n))):e??t}function EP(e,t){const n=[document,...mp(e)];n.forEach(r=>{r.addEventListener("scroll",t,{passive:!0})}),ln(()=>{n.forEach(r=>{r.removeEventListener("scroll",t)})})}const gy=Symbol.for("vuetify:v-menu"),T0=ce({closeDelay:[Number,String],openDelay:[Number,String]},"delay");function R0(e,t){let n=()=>{};function r(o,a){n==null||n();const l=o?e.openDelay:e.closeDelay,u=Math.max((a==null?void 0:a.minDelay)??0,Number(l??0));return new Promise(c=>{n=sN(u,()=>{t==null||t(o),c(o)})})}function s(){return r(!0)}function i(o){return r(!1,o)}return{clearDelay:n,runOpenDelay:s,runCloseDelay:i}}const WB=ce({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,...T0()},"VOverlay-activator");function qB(e,t){let{isActive:n,isTop:r,contentEl:s}=t;const i=fn("useActivator"),o=G();let a=!1,l=!1,u=!0;const c=D(()=>e.openOnFocus||e.openOnFocus==null&&e.openOnHover),d=D(()=>e.openOnClick||e.openOnClick==null&&!e.openOnHover&&!c.value),{runOpenDelay:f,runCloseDelay:h}=R0(e,x=>{x===(e.openOnHover&&a||c.value&&l)&&!(e.openOnHover&&n.value&&!r.value)&&(n.value!==x&&(u=!0),n.value=x)}),g=G(),m={onClick:x=>{x.stopPropagation(),o.value=x.currentTarget||x.target,n.value||(g.value=[x.clientX,x.clientY]),n.value=!n.value},onMouseenter:x=>{a=!0,o.value=x.currentTarget||x.target,f()},onMouseleave:x=>{a=!1,h()},onFocus:x=>{fp(x.target,":focus-visible")!==!1&&(l=!0,x.stopPropagation(),o.value=x.currentTarget||x.target,f())},onBlur:x=>{l=!1,x.stopPropagation(),h({minDelay:1})}},y=D(()=>{const x={};return d.value&&(x.onClick=m.onClick),e.openOnHover&&(x.onMouseenter=m.onMouseenter,x.onMouseleave=m.onMouseleave),c.value&&(x.onFocus=m.onFocus,x.onBlur=m.onBlur),x}),w=D(()=>{const x={};if(e.openOnHover&&(x.onMouseenter=()=>{a=!0,f()},x.onMouseleave=()=>{a=!1,h()}),c.value&&(x.onFocusin=I=>{I.target.matches(":focus-visible")&&(l=!0,f())},x.onFocusout=()=>{l=!1,h({minDelay:1})}),e.closeOnContentClick){const I=Xe(gy,null);x.onClick=()=>{n.value=!1,I==null||I.closeParents()}}return x}),b=D(()=>{const x={};return e.openOnHover&&(x.onMouseenter=()=>{u&&(a=!0,u=!1,f())},x.onMouseleave=()=>{a=!1,h()}),x});xe(r,x=>{var I;x&&(e.openOnHover&&!a&&(!c.value||!l)||c.value&&!l&&(!e.openOnHover||!a))&&!((I=s.value)!=null&&I.contains(document.activeElement))&&(n.value=!1)}),xe(n,x=>{x||setTimeout(()=>{g.value=void 0})},{flush:"post"});const S=ay();Rn(()=>{S.value&&ht(()=>{o.value=S.el})});const _=ay(),k=D(()=>e.target==="cursor"&&g.value?g.value:_.value?_.el:CP(e.target,i)||o.value),T=D(()=>Array.isArray(k.value)?void 0:k.value);let R;return xe(()=>!!e.activator,x=>{x&&Ot?(R=rl(),R.run(()=>{GB(e,i,{activatorEl:o,activatorEvents:y})})):R&&R.stop()},{flush:"post",immediate:!0}),ln(()=>{R==null||R.stop()}),{activatorEl:o,activatorRef:S,target:k,targetEl:T,targetRef:_,activatorEvents:y,contentEvents:w,scrimEvents:b}}function GB(e,t,n){let{activatorEl:r,activatorEvents:s}=n;xe(()=>e.activator,(l,u)=>{if(u&&l!==u){const c=a(u);c&&o(c)}l&&ht(()=>i())},{immediate:!0}),xe(()=>e.activatorProps,()=>{i()}),ln(()=>{o()});function i(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:a(),u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.activatorProps;l&&cN(l,ge(s.value,u))}function o(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:a(),u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.activatorProps;l&&dN(l,ge(s.value,u))}function a(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.activator;const u=CP(l,t);return r.value=(u==null?void 0:u.nodeType)===Node.ELEMENT_NODE?u:void 0,r.value}}function CP(e,t){var r,s;if(!e)return;let n;if(e==="parent"){let i=(s=(r=t==null?void 0:t.proxy)==null?void 0:r.$el)==null?void 0:s.parentNode;for(;i!=null&&i.hasAttribute("data-no-activator");)i=i.parentNode;n=i}else typeof e=="string"?n=document.querySelector(e):"$el"in e?n=e.$el:n=e;return n}const TP=ce({retainFocus:Boolean,captureFocus:Boolean,disableInitialFocus:Boolean},"focusTrap"),xh=new Map;let l_=0;function u_(e){const t=document.activeElement;if(e.key!=="Tab"||!t)return;const n=Array.from(xh.values()).filter(u=>{var f;let{isActive:c,contentEl:d}=u;return c.value&&((f=d.value)==null?void 0:f.contains(t))}).map(u=>u.contentEl.value);let r,s=t.parentElement;for(;s;){if(n.includes(s)){r=s;break}s=s.parentElement}if(!r)return;const i=qa(r).filter(u=>u.tabIndex>=0);if(!i.length)return;const o=document.activeElement;if(i.length===1&&i[0].classList.contains("v-list")&&i[0].contains(o)){e.preventDefault();return}const a=i[0],l=i[i.length-1];e.shiftKey&&(o===a||a.classList.contains("v-list")&&a.contains(o))&&(e.preventDefault(),l.focus()),!e.shiftKey&&(o===l||l.classList.contains("v-list")&&l.contains(o))&&(e.preventDefault(),a.focus())}function RP(e,t){let{isActive:n,localTop:r,activatorEl:s,contentEl:i}=t;const o=Symbol("trap");let a=!1,l=-1;async function u(){a=!0,l=window.setTimeout(()=>{a=!1},100)}async function c(h){var y;const g=h.relatedTarget,m=h.target;document.removeEventListener("pointerdown",u),document.removeEventListener("keydown",d),await ht(),n.value&&!a&&g!==m&&i.value&&Qt(r)&&![document,i.value].includes(m)&&!i.value.contains(m)&&((y=qa(i.value)[0])==null||y.focus())}function d(h){if(h.key==="Tab"&&(document.removeEventListener("keydown",d),n.value&&i.value&&h.target&&!i.value.contains(h.target))){const g=qa(document.documentElement);if(h.shiftKey&&h.target===g.at(0)||!h.shiftKey&&h.target===g.at(-1)){const m=qa(i.value);m.length>0&&(h.preventDefault(),m[0].focus())}}}const f=ie(()=>n.value&&e.captureFocus&&!e.disableInitialFocus);Ot&&(xe(()=>e.retainFocus,h=>{h?xh.set(o,{isActive:n,contentEl:i}):xh.delete(o)},{immediate:!0}),xe(f,h=>{h?(document.addEventListener("pointerdown",u),document.addEventListener("focusin",c,{once:!0}),document.addEventListener("keydown",d)):(document.removeEventListener("pointerdown",u),document.removeEventListener("focusin",c),document.removeEventListener("keydown",d))},{immediate:!0}),l_++<1&&document.addEventListener("keydown",u_)),ln(()=>{xh.delete(o),clearTimeout(l),document.removeEventListener("pointerdown",u),document.removeEventListener("focusin",c),document.removeEventListener("keydown",d),--l_<1&&document.removeEventListener("keydown",u_)})}const Em=["sm","md","lg","xl","xxl"],vy=Symbol.for("vuetify:display"),c_={mobileBreakpoint:"lg",thresholds:{xs:0,sm:600,md:960,lg:1280,xl:1920,xxl:2560}},KB=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:c_;return lr(c_,e)};function d_(e){return Ot&&!e?window.innerWidth:typeof e=="object"&&e.clientWidth||0}function f_(e){return Ot&&!e?window.innerHeight:typeof e=="object"&&e.clientHeight||0}function h_(e){const t=Ot&&!e?window.navigator.userAgent:"ssr";function n(g){return!!t.match(g)}const r=n(/android/i),s=n(/iphone|ipad|ipod/i),i=n(/cordova/i),o=n(/electron/i),a=n(/chrome/i),l=n(/edge/i),u=n(/firefox/i),c=n(/opera/i),d=n(/win/i),f=n(/mac/i),h=n(/linux/i);return{android:r,ios:s,cordova:i,electron:o,chrome:a,edge:l,firefox:u,opera:c,win:d,mac:f,linux:h,touch:Z$,ssr:t==="ssr"}}function YB(e,t){const{thresholds:n,mobileBreakpoint:r}=KB(e),s=Ce(f_(t)),i=Ce(h_(t)),o=gn({}),a=Ce(d_(t));function l(){s.value=f_(),a.value=d_()}function u(){l(),i.value=h_()}return Rn(()=>{const c=a.value<n.sm,d=a.value<n.md&&!c,f=a.value<n.lg&&!(d||c),h=a.value<n.xl&&!(f||d||c),g=a.value<n.xxl&&!(h||f||d||c),m=a.value>=n.xxl,y=c?"xs":d?"sm":f?"md":h?"lg":g?"xl":"xxl",w=typeof r=="number"?r:n[r],b=a.value<w;o.xs=c,o.sm=d,o.md=f,o.lg=h,o.xl=g,o.xxl=m,o.smAndUp=!c,o.mdAndUp=!(c||d),o.lgAndUp=!(c||d||f),o.xlAndUp=!(c||d||f||h),o.smAndDown=!(f||h||g||m),o.mdAndDown=!(h||g||m),o.lgAndDown=!(g||m),o.xlAndDown=!m,o.name=y,o.height=s.value,o.width=a.value,o.mobile=b,o.mobileBreakpoint=r,o.platform=i.value,o.thresholds=n}),Ot&&(window.addEventListener("resize",l,{passive:!0}),ln(()=>{window.removeEventListener("resize",l)},!0)),{...vl(o),update:u,ssr:!!t}}const Sl=ce({mobile:{type:Boolean,default:!1},mobileBreakpoint:[Number,String]},"display");function qs(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{mobile:null},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wi();const n=Xe(vy);if(!n)throw new Error("Could not find Vuetify display injection");const r=D(()=>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=ie(()=>t?{[`${t}--mobile`]:r.value}:{});return{...n,displayClasses:s,mobile:r}}function XB(){if(!Ot)return Ce(!1);const{ssr:e}=qs();if(e){const t=Ce(!1);return xt(()=>{t.value=!0}),t}else return Ce(!0)}const PP=ce({eager:Boolean},"lazy");function IP(e,t){const n=Ce(!1),r=ie(()=>n.value||e.eager||t.value);xe(t,()=>n.value=!0);function s(){e.eager||(n.value=!1)}return{isBooted:n,hasContent:r,onAfterLeave:s}}function Zu(){const t=fn("useScopeId").vnode.scopeId;return{scopeId:t?{[t]:""}:void 0}}const p_=Symbol.for("vuetify:stack"),Ec=gn([]);function QB(e,t,n){const r=fn("useStack"),s=!n,i=Xe(p_,void 0),o=gn({activeChildren:new Set});Jt(p_,o);const a=Ce(Number(Qt(t)));Nr(e,()=>{var d;const c=(d=Ec.at(-1))==null?void 0:d[1];a.value=c?c+10:Number(Qt(t)),s&&Ec.push([r.uid,a.value]),i==null||i.activeChildren.add(r.uid),ln(()=>{if(s){const f=Ue(Ec).findIndex(h=>h[0]===r.uid);Ec.splice(f,1)}i==null||i.activeChildren.delete(r.uid)})});const l=Ce(!0);s&&Rn(()=>{var d;const c=((d=Ec.at(-1))==null?void 0:d[0])===r.uid;setTimeout(()=>l.value=c)});const u=ie(()=>!o.activeChildren.size);return{globalTop:Ji(l),localTop:u,stackStyles:ie(()=>({zIndex:a.value}))}}function JB(e){return{teleportTarget:D(()=>{const n=e();if(n===!0||!Ot)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 ec=ce({transition:{type:null,default:"fade-transition",validator:e=>e!==!0}},"transition"),hi=(e,t)=>{let{slots:n}=t;const{transition:r,disabled:s,group:i,...o}=e,{component:a=i?f0:qo,...l}=_u(r)?r:{};let u;return _u(r)?u=ge(l,aN({disabled:s,group:i}),o):u=ge({name:s||!r?"":r},o),_r(a,u,n)};function ZB(){return!0}function AP(e,t,n){if(!e||OP(e,n)===!1)return!1;const r=JR(t);if(typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&r.host===e.target)return!1;const s=(typeof n.value=="object"&&n.value.include||(()=>[]))();return s.push(t),!s.some(i=>i==null?void 0:i.contains(e.target))}function OP(e,t){return(typeof t.value=="object"&&t.value.closeConditional||ZB)(e)}function eV(e,t,n){const r=typeof n.value=="function"?n.value:n.value.handler;e.shadowTarget=e.target,t._clickOutside.lastMousedownWasOutside&&AP(e,t,n)&&setTimeout(()=>{OP(e,n)&&r&&r(e)},0)}function m_(e,t){const n=JR(e);t(document),typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&t(n)}const g_={mounted(e,t){const n=s=>eV(s,e,t),r=s=>{e._clickOutside.lastMousedownWasOutside=AP(s,e,t)};m_(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&&(m_(e,n=>{var i;if(!n||!((i=e._clickOutside)!=null&&i[t.instance.$.uid]))return;const{onClick:r,onMousedown:s}=e._clickOutside[t.instance.$.uid];n.removeEventListener("click",r,!0),n.removeEventListener("mousedown",s,!0)}),delete e._clickOutside[t.instance.$.uid])}};function tV(e){const{modelValue:t,color:n,...r}=e;return p(qo,{name:"fade-transition",appear:!0},{default:()=>[e.modelValue&&C("div",ge({class:["v-overlay__scrim",e.color.backgroundColorClasses.value],style:e.color.backgroundColorStyles.value},r),null)]})}const of=ce({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},...WB(),...Ge(),...xr(),...PP(),...MB(),...VB(),...TP(),...Nt(),...ec()},"VOverlay"),to=Ee()({name:"VOverlay",directives:{vClickOutside:g_},inheritAttrs:!1,props:{_disableGlobalStack:Boolean,...In(of(),["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=fn("VOverlay"),o=G(),a=G(),l=G(),u=lt(e,"modelValue"),c=D({get:()=>u.value,set:q=>{q&&e.disabled||(u.value=q)}}),{themeClasses:d}=nn(e),{rtlClasses:f,isRtl:h}=Wr(),{hasContent:g,onAfterLeave:m}=IP(e,c),y=wr(()=>typeof e.scrim=="string"?e.scrim:null),{globalTop:w,localTop:b,stackStyles:S}=QB(c,()=>e.zIndex,e._disableGlobalStack),{activatorEl:_,activatorRef:k,target:T,targetEl:R,targetRef:x,activatorEvents:I,contentEvents:P,scrimEvents:A}=qB(e,{isActive:c,isTop:b,contentEl:l}),{teleportTarget:L}=JB(()=>{var ne,K,ke;const q=e.attach||e.contained;if(q)return q;const he=((ne=_==null?void 0:_.value)==null?void 0:ne.getRootNode())||((ke=(K=i.proxy)==null?void 0:K.$el)==null?void 0:ke.getRootNode());return he instanceof ShadowRoot?he:!1}),{dimensionStyles:B}=Er(e),O=XB(),{scopeId:F}=Zu();xe(()=>e.disabled,q=>{q&&(c.value=!1)});const{contentStyles:W,updateLocation:X}=LB(e,{isRtl:h,contentEl:l,target:T,isActive:c});UB(e,{root:o,contentEl:l,targetEl:R,target:T,isActive:c,updateLocation:X});function V(q){s("click:outside",q),e.persistent?pe():c.value=!1}function z(q){return c.value&&b.value&&(!e.scrim||q.target===a.value||q instanceof MouseEvent&&q.shadowTarget===a.value)}RP(e,{isActive:c,localTop:b,contentEl:l,activatorEl:_}),Ot&&xe(c,q=>{q?window.addEventListener("keydown",M):window.removeEventListener("keydown",M)},{immediate:!0}),Qn(()=>{Ot&&window.removeEventListener("keydown",M)});function M(q){var he,ne,K;q.key==="Escape"&&w.value&&((he=l.value)!=null&&he.contains(document.activeElement)||s("keydown",q),e.persistent?pe():(c.value=!1,(ne=l.value)!=null&&ne.contains(document.activeElement)&&((K=_.value)==null||K.focus())))}function re(q){q.key==="Escape"&&!w.value||s("keydown",q)}const H=cP();Nr(()=>e.closeOnBack,()=>{SB(H,q=>{w.value&&c.value?(q(!1),e.persistent?pe():c.value=!1):q()})});const j=G();xe(()=>c.value&&(e.absolute||e.contained)&&L.value==null,q=>{if(q){const he=S0(o.value);he&&he!==document.scrollingElement&&(j.value=he.scrollTop)}});function pe(){e.noClickAnimation||l.value&&ko(l.value,[{transformOrigin:"center"},{transform:"scale(1.03)"},{transformOrigin:"center"}],{duration:150,easing:pp})}function J(){s("afterEnter")}function we(){m(),s("afterLeave")}return Me(()=>{var q;return C(De,null,[(q=n.activator)==null?void 0:q.call(n,{isActive:c.value,targetRef:x,props:ge({ref:k},I.value,e.activatorProps)}),O.value&&g.value&&p(cF,{disabled:!L.value,to:L.value},{default:()=>[C("div",ge({class:["v-overlay",{"v-overlay--absolute":e.absolute||e.contained,"v-overlay--active":c.value,"v-overlay--contained":e.contained},d.value,f.value,e.class],style:[S.value,{"--v-overlay-opacity":e.opacity,top:Le(j.value)},e.style],ref:o,onKeydown:re},F,r),[p(tV,ge({color:y,modelValue:c.value&&!!e.scrim,ref:a},A.value),null),p(hi,{appear:!0,persisted:!0,transition:e.transition,target:T.value,onAfterEnter:J,onAfterLeave:we},{default:()=>{var he;return[zt(C("div",ge({ref:l,class:["v-overlay__content",e.contentClass],style:[B.value,W.value]},P.value,e.contentProps),[(he=n.default)==null?void 0:he.call(n,{isActive:c})]),[[uo,c.value],[g_,{handler:V,closeConditional:z,include:()=>[_.value]}]])]}})])]})])}),{activatorEl:_,scrimEl:a,target:T,animateClick:pe,contentEl:l,rootEl:o,globalTop:w,localTop:b,updateLocation:X}}}),Vg=Symbol("Forwarded refs");function Ug(e,t){let n=e;for(;n;){const r=Reflect.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Ts(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e[Vg]=n,new Proxy(e,{get(s,i){if(Reflect.has(s,i))return Reflect.get(s,i);if(!(typeof i=="symbol"||i.startsWith("$")||i.startsWith("__"))){for(const o of n)if(o.value&&Reflect.has(o.value,i)){const a=Reflect.get(o.value,i);return typeof a=="function"?a.bind(o.value):a}}},has(s,i){if(Reflect.has(s,i))return!0;if(typeof i=="symbol"||i.startsWith("$")||i.startsWith("__"))return!1;for(const o of n)if(o.value&&Reflect.has(o.value,i))return!0;return!1},set(s,i,o){if(Reflect.has(s,i))return Reflect.set(s,i,o);if(typeof i=="symbol"||i.startsWith("$")||i.startsWith("__"))return!1;for(const a of n)if(a.value&&Reflect.has(a.value,i))return Reflect.set(a.value,i,o);return!1},getOwnPropertyDescriptor(s,i){var a;const o=Reflect.getOwnPropertyDescriptor(s,i);if(o)return o;if(!(typeof i=="symbol"||i.startsWith("$")||i.startsWith("__"))){for(const l of n){if(!l.value)continue;const u=Ug(l.value,i)??("_"in l.value?Ug((a=l.value._)==null?void 0:a.setupState,i):void 0);if(u)return u}for(const l of n){const u=l.value&&l.value[Vg];if(!u)continue;const c=u.slice();for(;c.length;){const d=c.shift(),f=Ug(d.value,i);if(f)return f;const h=d.value&&d.value[Vg];h&&c.push(...h)}}}}})}const nV=ce({fullscreen:Boolean,scrollable:Boolean,...In(of({captureFocus:!0,origin:"center center",scrollStrategy:"block",transition:{component:E0},zIndex:2400,retainFocus:!0}),["disableInitialFocus"])},"VDialog"),DP=Ee()({name:"VDialog",props:nV(),emits:{"update:modelValue":e=>!0,afterEnter:()=>!0,afterLeave:()=>!0},setup(e,t){let{emit:n,slots:r}=t;const s=lt(e,"modelValue"),{scopeId:i}=Zu(),o=G();function a(){var u;n("afterEnter"),(e.scrim||e.retainFocus)&&((u=o.value)!=null&&u.contentEl)&&!o.value.contentEl.contains(document.activeElement)&&o.value.contentEl.focus({preventScroll:!0})}function l(){n("afterLeave")}return xe(s,async u=>{var c;u||(await ht(),(c=o.value.activatorEl)==null||c.focus({preventScroll:!0}))}),Me(()=>{const u=to.filterProps(e),c=ge({"aria-haspopup":"dialog"},e.activatorProps),d=ge({tabindex:-1},e.contentProps);return p(to,ge({ref:o,class:["v-dialog",{"v-dialog--fullscreen":e.fullscreen,"v-dialog--scrollable":e.scrollable},e.class],style:e.style},u,{modelValue:s.value,"onUpdate:modelValue":f=>s.value=f,"aria-modal":"true",activatorProps:c,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:a,onAfterLeave:l},i),{activator:r.activator,default:function(){for(var f=arguments.length,h=new Array(f),g=0;g<f;g++)h[g]=arguments[g];return p(Ft,{root:"VDialog"},{default:()=>{var m;return[(m=r.default)==null?void 0:m.call(r,...h)]}})}})}),Ts({},o)}}),rV={class:"pa-3 text--primary"},Si=Ve({__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=DR(),s=t,i=sn(n.id);function o(c){return s("opened",c)}function a(c){return s("beforeOpened",c)}xt(async()=>{J$("Escape",c=>{l.value&&(c.preventDefault(),u())}),r.registerDialogReference(n.id,{beforeOpenedCallback:a,openedCallback:o})}),Qn(()=>{r.unregisterDialogReference(n.id)});const l=D(()=>{if(!n.id)return;const c=r.isDialogOpened(n.id);return c&&console.debug(`[BaseDialog ${n.id}] Showing dialog: ${i==null?void 0:i.isDialogOpened()}`),c});function u(){s("escape")}return(c,d)=>($(),te(DP,{"max-width":e.maxWidth,"retain-focus":!1,"model-value":l.value,persistent:"",onClose:d[1]||(d[1]=f=>u())},{default:v(()=>[gm(c.$slots,"default",{},()=>[C("div",rV,[d[4]||(d[4]=E(" No content defined in dialog. ",-1)),p(se,{onClick:d[0]||(d[0]=f=>Z(i).closeDialog())},{default:v(()=>[p(ee,{class:"mr-3"},{default:v(()=>[...d[2]||(d[2]=[E("close",-1)])]),_:1}),d[3]||(d[3]=E("Close ",-1))]),_:1})])])]),_:3},8,["max-width","model-value"]))}});var on=(e=>(e.ImportOctoFarmDialog="ImportOctoFarmDialog",e.BatchReprintDialog="BatchReprintDialog",e.YamlImportExport="YamlImportExport",e.AddOrUpdatePrinterDialog="AddOrUpdatePrinterDialog",e.AddOrUpdateFloorDialog="AddOrUpdateFloorDialog",e.PrinterMaintenanceDialog="PrinterMaintenanceDialog",e.AddOrUpdateCameraDialog="AddOrUpdateCameraDialog",e.PrinterControlDialog="PrinterControlDialog",e.CreateUserDialog="CreateUserDialog",e.GridSettingsDialog="GridSettingsDialog",e))(on||{});function MP(e,t){return function(){return e.apply(t,arguments)}}const{toString:sV}=Object.prototype,{getPrototypeOf:P0}=Object,{iterator:Cm,toStringTag:LP}=Symbol,Tm=(e=>t=>{const n=sV.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Gs=e=>(e=e.toLowerCase(),t=>Tm(t)===e),Rm=e=>t=>typeof t===e,{isArray:tc}=Array,Cu=Rm("undefined");function af(e){return e!==null&&!Cu(e)&&e.constructor!==null&&!Cu(e.constructor)&&Br(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const FP=Gs("ArrayBuffer");function iV(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&FP(e.buffer),t}const oV=Rm("string"),Br=Rm("function"),$P=Rm("number"),lf=e=>e!==null&&typeof e=="object",aV=e=>e===!0||e===!1,Eh=e=>{if(Tm(e)!=="object")return!1;const t=P0(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(LP in e)&&!(Cm in e)},lV=e=>{if(!lf(e)||af(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},uV=Gs("Date"),cV=Gs("File"),dV=Gs("Blob"),fV=Gs("FileList"),hV=e=>lf(e)&&Br(e.pipe),pV=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Br(e.append)&&((t=Tm(e))==="formdata"||t==="object"&&Br(e.toString)&&e.toString()==="[object FormData]"))},mV=Gs("URLSearchParams"),[gV,vV,yV,bV]=["ReadableStream","Request","Response","Headers"].map(Gs),wV=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function uf(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),tc(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(af(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let a;for(r=0;r<o;r++)a=i[r],t.call(null,e[a],a,e)}}function NP(e,t){if(af(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 Ca=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,BP=e=>!Cu(e)&&e!==Ca;function yy(){const{caseless:e,skipUndefined:t}=BP(this)&&this||{},n={},r=(s,i)=>{const o=e&&NP(n,i)||i;Eh(n[o])&&Eh(s)?n[o]=yy(n[o],s):Eh(s)?n[o]=yy({},s):tc(s)?n[o]=s.slice():(!t||!Cu(s))&&(n[o]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&uf(arguments[s],r);return n}const SV=(e,t,n,{allOwnKeys:r}={})=>(uf(t,(s,i)=>{n&&Br(s)?e[i]=MP(s,n):e[i]=s},{allOwnKeys:r}),e),_V=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),kV=(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)},xV=(e,t,n,r)=>{let s,i,o;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=n!==!1&&P0(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},EV=(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},CV=e=>{if(!e)return null;if(tc(e))return e;let t=e.length;if(!$P(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},TV=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&P0(Uint8Array)),RV=(e,t)=>{const r=(e&&e[Cm]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},PV=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},IV=Gs("HTMLFormElement"),AV=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),v_=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),OV=Gs("RegExp"),VP=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};uf(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},DV=e=>{VP(e,(t,n)=>{if(Br(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Br(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+"'")})}})},MV=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return tc(e)?r(e):r(String(e).split(t)),n},LV=()=>{},FV=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function $V(e){return!!(e&&Br(e.append)&&e[LP]==="FormData"&&e[Cm])}const NV=e=>{const t=new Array(10),n=(r,s)=>{if(lf(r)){if(t.indexOf(r)>=0)return;if(af(r))return r;if(!("toJSON"in r)){t[s]=r;const i=tc(r)?[]:{};return uf(r,(o,a)=>{const l=n(o,s+1);!Cu(l)&&(i[a]=l)}),t[s]=void 0,i}}return r};return n(e,0)},BV=Gs("AsyncFunction"),VV=e=>e&&(lf(e)||Br(e))&&Br(e.then)&&Br(e.catch),UP=((e,t)=>e?setImmediate:t?((n,r)=>(Ca.addEventListener("message",({source:s,data:i})=>{s===Ca&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),Ca.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Br(Ca.postMessage)),UV=typeof queueMicrotask<"u"?queueMicrotask.bind(Ca):typeof process<"u"&&process.nextTick||UP,zV=e=>e!=null&&Br(e[Cm]),ue={isArray:tc,isArrayBuffer:FP,isBuffer:af,isFormData:pV,isArrayBufferView:iV,isString:oV,isNumber:$P,isBoolean:aV,isObject:lf,isPlainObject:Eh,isEmptyObject:lV,isReadableStream:gV,isRequest:vV,isResponse:yV,isHeaders:bV,isUndefined:Cu,isDate:uV,isFile:cV,isBlob:dV,isRegExp:OV,isFunction:Br,isStream:hV,isURLSearchParams:mV,isTypedArray:TV,isFileList:fV,forEach:uf,merge:yy,extend:SV,trim:wV,stripBOM:_V,inherits:kV,toFlatObject:xV,kindOf:Tm,kindOfTest:Gs,endsWith:EV,toArray:CV,forEachEntry:RV,matchAll:PV,isHTMLForm:IV,hasOwnProperty:v_,hasOwnProp:v_,reduceDescriptors:VP,freezeMethods:DV,toObjectSet:MV,toCamelCase:AV,noop:LV,toFiniteNumber:FV,findKey:NP,global:Ca,isContextDefined:BP,isSpecCompliantForm:$V,toJSONObject:NV,isAsyncFn:BV,isThenable:VV,setImmediate:UP,asap:UV,isIterable:zV};function rt(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}ue.inherits(rt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ue.toJSONObject(this.config),code:this.code,status:this.status}}});const zP=rt.prototype,HP={};["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=>{HP[e]={value:e}});Object.defineProperties(rt,HP);Object.defineProperty(zP,"isAxiosError",{value:!0});rt.from=(e,t,n,r,s,i)=>{const o=Object.create(zP);ue.toFlatObject(e,o,function(c){return c!==Error.prototype},u=>u!=="isAxiosError");const a=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return rt.call(o,a,l,n,r,s),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",i&&Object.assign(o,i),o};const HV=null;function by(e){return ue.isPlainObject(e)||ue.isArray(e)}function jP(e){return ue.endsWith(e,"[]")?e.slice(0,-2):e}function y_(e,t,n){return e?e.concat(t).map(function(s,i){return s=jP(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function jV(e){return ue.isArray(e)&&!e.some(by)}const WV=ue.toFlatObject(ue,{},null,function(t){return/^is[A-Z]/.test(t)});function Pm(e,t,n){if(!ue.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=ue.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!ue.isUndefined(y[m])});const r=n.metaTokens,s=n.visitor||c,i=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&ue.isSpecCompliantForm(t);if(!ue.isFunction(s))throw new TypeError("visitor must be a function");function u(g){if(g===null)return"";if(ue.isDate(g))return g.toISOString();if(ue.isBoolean(g))return g.toString();if(!l&&ue.isBlob(g))throw new rt("Blob is not supported. Use a Buffer instead.");return ue.isArrayBuffer(g)||ue.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function c(g,m,y){let w=g;if(g&&!y&&typeof g=="object"){if(ue.endsWith(m,"{}"))m=r?m:m.slice(0,-2),g=JSON.stringify(g);else if(ue.isArray(g)&&jV(g)||(ue.isFileList(g)||ue.endsWith(m,"[]"))&&(w=ue.toArray(g)))return m=jP(m),w.forEach(function(S,_){!(ue.isUndefined(S)||S===null)&&t.append(o===!0?y_([m],_,i):o===null?m:m+"[]",u(S))}),!1}return by(g)?!0:(t.append(y_(y,m,i),u(g)),!1)}const d=[],f=Object.assign(WV,{defaultVisitor:c,convertValue:u,isVisitable:by});function h(g,m){if(!ue.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(g),ue.forEach(g,function(w,b){(!(ue.isUndefined(w)||w===null)&&s.call(t,w,ue.isString(b)?b.trim():b,m,f))===!0&&h(w,m?m.concat(b):[b])}),d.pop()}}if(!ue.isObject(e))throw new TypeError("data must be an object");return h(e),t}function b_(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function I0(e,t){this._pairs=[],e&&Pm(e,this,t)}const WP=I0.prototype;WP.append=function(t,n){this._pairs.push([t,n])};WP.toString=function(t){const n=t?function(r){return t.call(this,r,b_)}:b_;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function qV(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function qP(e,t,n){if(!t)return e;const r=n&&n.encode||qV;ue.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(s?i=s(t,n):i=ue.isURLSearchParams(t)?t.toString():new I0(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class w_{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ue.forEach(this.handlers,function(r){r!==null&&t(r)})}}const GP={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},GV=typeof URLSearchParams<"u"?URLSearchParams:I0,KV=typeof FormData<"u"?FormData:null,YV=typeof Blob<"u"?Blob:null,XV={isBrowser:!0,classes:{URLSearchParams:GV,FormData:KV,Blob:YV},protocols:["http","https","file","blob","url","data"]},A0=typeof window<"u"&&typeof document<"u",wy=typeof navigator=="object"&&navigator||void 0,QV=A0&&(!wy||["ReactNative","NativeScript","NS"].indexOf(wy.product)<0),JV=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ZV=A0&&window.location.href||"http://localhost",eU=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:A0,hasStandardBrowserEnv:QV,hasStandardBrowserWebWorkerEnv:JV,navigator:wy,origin:ZV},Symbol.toStringTag,{value:"Module"})),ar={...eU,...XV};function tU(e,t){return Pm(e,new ar.classes.URLSearchParams,{visitor:function(n,r,s,i){return ar.isNode&&ue.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function nU(e){return ue.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function rU(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 KP(e){function t(n,r,s,i){let o=n[i++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),l=i>=n.length;return o=!o&&ue.isArray(s)?s.length:o,l?(ue.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!a):((!s[o]||!ue.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&ue.isArray(s[o])&&(s[o]=rU(s[o])),!a)}if(ue.isFormData(e)&&ue.isFunction(e.entries)){const n={};return ue.forEachEntry(e,(r,s)=>{t(nU(r),s,n,0)}),n}return null}function sU(e,t,n){if(ue.isString(e))try{return(t||JSON.parse)(e),ue.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const cf={transitional:GP,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=ue.isObject(t);if(i&&ue.isHTMLForm(t)&&(t=new FormData(t)),ue.isFormData(t))return s?JSON.stringify(KP(t)):t;if(ue.isArrayBuffer(t)||ue.isBuffer(t)||ue.isStream(t)||ue.isFile(t)||ue.isBlob(t)||ue.isReadableStream(t))return t;if(ue.isArrayBufferView(t))return t.buffer;if(ue.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return tU(t,this.formSerializer).toString();if((a=ue.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Pm(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),sU(t)):t}],transformResponse:[function(t){const n=this.transitional||cf.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(ue.isResponse(t)||ue.isReadableStream(t))return t;if(t&&ue.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(a){if(o)throw a.name==="SyntaxError"?rt.from(a,rt.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ar.classes.FormData,Blob:ar.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ue.forEach(["delete","get","head","post","put","patch"],e=>{cf.headers[e]={}});const iU=ue.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),oU=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
32
|
+
`).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&iU[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},S_=Symbol("internals");function Cc(e){return e&&String(e).trim().toLowerCase()}function Ch(e){return e===!1||e==null?e:ue.isArray(e)?e.map(Ch):String(e)}function aU(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 lU=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function zg(e,t,n,r,s){if(ue.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!ue.isString(t)){if(ue.isString(r))return t.indexOf(r)!==-1;if(ue.isRegExp(r))return r.test(t)}}function uU(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function cU(e,t){const n=ue.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}let Vr=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(a,l,u){const c=Cc(l);if(!c)throw new Error("header name must be a non-empty string");const d=ue.findKey(s,c);(!d||s[d]===void 0||u===!0||u===void 0&&s[d]!==!1)&&(s[d||l]=Ch(a))}const o=(a,l)=>ue.forEach(a,(u,c)=>i(u,c,l));if(ue.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(ue.isString(t)&&(t=t.trim())&&!lU(t))o(oU(t),n);else if(ue.isObject(t)&&ue.isIterable(t)){let a={},l,u;for(const c of t){if(!ue.isArray(c))throw TypeError("Object iterator must return a key-value pair");a[u=c[0]]=(l=a[u])?ue.isArray(l)?[...l,c[1]]:[l,c[1]]:c[1]}o(a,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=Cc(t),t){const r=ue.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return aU(s);if(ue.isFunction(n))return n.call(this,s,r);if(ue.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Cc(t),t){const r=ue.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||zg(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=Cc(o),o){const a=ue.findKey(r,o);a&&(!n||zg(r,r[a],a,n))&&(delete r[a],s=!0)}}return ue.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||zg(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return ue.forEach(this,(s,i)=>{const o=ue.findKey(r,i);if(o){n[o]=Ch(s),delete n[i];return}const a=t?uU(i):String(i).trim();a!==i&&delete n[i],n[a]=Ch(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return ue.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&ue.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
33
|
+
`)}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[S_]=this[S_]={accessors:{}}).accessors,s=this.prototype;function i(o){const a=Cc(o);r[a]||(cU(s,o),r[a]=!0)}return ue.isArray(t)?t.forEach(i):i(t),this}};Vr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ue.reduceDescriptors(Vr.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});ue.freezeMethods(Vr);function Hg(e,t){const n=this||cf,r=t||n,s=Vr.from(r.headers);let i=r.data;return ue.forEach(e,function(a){i=a.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function YP(e){return!!(e&&e.__CANCEL__)}function nc(e,t,n){rt.call(this,e??"canceled",rt.ERR_CANCELED,t,n),this.name="CanceledError"}ue.inherits(nc,rt,{__CANCEL__:!0});function XP(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new rt("Request failed with status code "+n.status,[rt.ERR_BAD_REQUEST,rt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function dU(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function fU(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=r[i];o||(o=u),n[s]=l,r[s]=u;let d=i,f=0;for(;d!==s;)f+=n[d++],d=d%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),u-o<t)return;const h=c&&u-c;return h?Math.round(f*1e3/h):void 0}}function hU(e,t){let n=0,r=1e3/t,s,i;const o=(u,c=Date.now())=>{n=c,s=null,i&&(clearTimeout(i),i=null),e(...u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=r?o(u,c):(s=u,i||(i=setTimeout(()=>{i=null,o(s)},r-d)))},()=>s&&o(s)]}const wp=(e,t,n=3)=>{let r=0;const s=fU(50,250);return hU(i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,l=o-r,u=s(l),c=o<=a;r=o;const d={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&c?(a-o)/u:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},__=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},k_=e=>(...t)=>ue.asap(()=>e(...t)),pU=ar.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,ar.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(ar.origin),ar.navigator&&/(msie|trident)/i.test(ar.navigator.userAgent)):()=>!0,mU=ar.hasStandardBrowserEnv?{write(e,t,n,r,s,i,o){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];ue.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),ue.isString(r)&&a.push(`path=${r}`),ue.isString(s)&&a.push(`domain=${s}`),i===!0&&a.push("secure"),ue.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.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 gU(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function vU(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function QP(e,t,n){let r=!gU(t);return e&&(r||n==!1)?vU(e,t):t}const x_=e=>e instanceof Vr?{...e}:e;function al(e,t){t=t||{};const n={};function r(u,c,d,f){return ue.isPlainObject(u)&&ue.isPlainObject(c)?ue.merge.call({caseless:f},u,c):ue.isPlainObject(c)?ue.merge({},c):ue.isArray(c)?c.slice():c}function s(u,c,d,f){if(ue.isUndefined(c)){if(!ue.isUndefined(u))return r(void 0,u,d,f)}else return r(u,c,d,f)}function i(u,c){if(!ue.isUndefined(c))return r(void 0,c)}function o(u,c){if(ue.isUndefined(c)){if(!ue.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function a(u,c,d){if(d in t)return r(u,c);if(d in e)return r(void 0,u)}const l={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(u,c,d)=>s(x_(u),x_(c),d,!0)};return ue.forEach(Object.keys({...e,...t}),function(c){const d=l[c]||s,f=d(e[c],t[c],c);ue.isUndefined(f)&&d!==a||(n[c]=f)}),n}const JP=e=>{const t=al({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:a}=t;if(t.headers=o=Vr.from(o),t.url=qP(QP(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),ue.isFormData(n)){if(ar.hasStandardBrowserEnv||ar.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(ue.isFunction(n.getHeaders)){const l=n.getHeaders(),u=["content-type","content-length"];Object.entries(l).forEach(([c,d])=>{u.includes(c.toLowerCase())&&o.set(c,d)})}}if(ar.hasStandardBrowserEnv&&(r&&ue.isFunction(r)&&(r=r(t)),r||r!==!1&&pU(t.url))){const l=s&&i&&mU.read(i);l&&o.set(s,l)}return t},yU=typeof XMLHttpRequest<"u",bU=yU&&function(e){return new Promise(function(n,r){const s=JP(e);let i=s.data;const o=Vr.from(s.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=s,c,d,f,h,g;function m(){h&&h(),g&&g(),s.cancelToken&&s.cancelToken.unsubscribe(c),s.signal&&s.signal.removeEventListener("abort",c)}let y=new XMLHttpRequest;y.open(s.method.toUpperCase(),s.url,!0),y.timeout=s.timeout;function w(){if(!y)return;const S=Vr.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),k={data:!a||a==="text"||a==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:S,config:e,request:y};XP(function(R){n(R),m()},function(R){r(R),m()},k),y=null}"onloadend"in y?y.onloadend=w:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(w)},y.onabort=function(){y&&(r(new rt("Request aborted",rt.ECONNABORTED,e,y)),y=null)},y.onerror=function(_){const k=_&&_.message?_.message:"Network Error",T=new rt(k,rt.ERR_NETWORK,e,y);T.event=_||null,r(T),y=null},y.ontimeout=function(){let _=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const k=s.transitional||GP;s.timeoutErrorMessage&&(_=s.timeoutErrorMessage),r(new rt(_,k.clarifyTimeoutError?rt.ETIMEDOUT:rt.ECONNABORTED,e,y)),y=null},i===void 0&&o.setContentType(null),"setRequestHeader"in y&&ue.forEach(o.toJSON(),function(_,k){y.setRequestHeader(k,_)}),ue.isUndefined(s.withCredentials)||(y.withCredentials=!!s.withCredentials),a&&a!=="json"&&(y.responseType=s.responseType),u&&([f,g]=wp(u,!0),y.addEventListener("progress",f)),l&&y.upload&&([d,h]=wp(l),y.upload.addEventListener("progress",d),y.upload.addEventListener("loadend",h)),(s.cancelToken||s.signal)&&(c=S=>{y&&(r(!S||S.type?new nc(null,e,y):S),y.abort(),y=null)},s.cancelToken&&s.cancelToken.subscribe(c),s.signal&&(s.signal.aborted?c():s.signal.addEventListener("abort",c)));const b=dU(s.url);if(b&&ar.protocols.indexOf(b)===-1){r(new rt("Unsupported protocol "+b+":",rt.ERR_BAD_REQUEST,e));return}y.send(i||null)})},wU=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const i=function(u){if(!s){s=!0,a();const c=u instanceof Error?u:this.reason;r.abort(c instanceof rt?c:new nc(c instanceof Error?c.message:c))}};let o=t&&setTimeout(()=>{o=null,i(new rt(`timeout ${t} of ms exceeded`,rt.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:l}=r;return l.unsubscribe=()=>ue.asap(a),l}},SU=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},_U=async function*(e,t){for await(const n of kU(e))yield*SU(n,t)},kU=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()}},E_=(e,t,n,r)=>{const s=_U(e,t);let i=0,o,a=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await s.next();if(u){a(),l.close();return}let d=c.byteLength;if(n){let f=i+=d;n(f)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),s.return()}},{highWaterMark:2})},C_=64*1024,{isFunction:Nf}=ue,xU=(({Request:e,Response:t})=>({Request:e,Response:t}))(ue.global),{ReadableStream:T_,TextEncoder:R_}=ue.global,P_=(e,...t)=>{try{return!!e(...t)}catch{return!1}},EU=e=>{e=ue.merge.call({skipUndefined:!0},xU,e);const{fetch:t,Request:n,Response:r}=e,s=t?Nf(t):typeof fetch=="function",i=Nf(n),o=Nf(r);if(!s)return!1;const a=s&&Nf(T_),l=s&&(typeof R_=="function"?(g=>m=>g.encode(m))(new R_):async g=>new Uint8Array(await new n(g).arrayBuffer())),u=i&&a&&P_(()=>{let g=!1;const m=new n(ar.origin,{body:new T_,method:"POST",get duplex(){return g=!0,"half"}}).headers.has("Content-Type");return g&&!m}),c=o&&a&&P_(()=>ue.isReadableStream(new r("").body)),d={stream:c&&(g=>g.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!d[g]&&(d[g]=(m,y)=>{let w=m&&m[g];if(w)return w.call(m);throw new rt(`Response type '${g}' is not supported`,rt.ERR_NOT_SUPPORT,y)})});const f=async g=>{if(g==null)return 0;if(ue.isBlob(g))return g.size;if(ue.isSpecCompliantForm(g))return(await new n(ar.origin,{method:"POST",body:g}).arrayBuffer()).byteLength;if(ue.isArrayBufferView(g)||ue.isArrayBuffer(g))return g.byteLength;if(ue.isURLSearchParams(g)&&(g=g+""),ue.isString(g))return(await l(g)).byteLength},h=async(g,m)=>{const y=ue.toFiniteNumber(g.getContentLength());return y??f(m)};return async g=>{let{url:m,method:y,data:w,signal:b,cancelToken:S,timeout:_,onDownloadProgress:k,onUploadProgress:T,responseType:R,headers:x,withCredentials:I="same-origin",fetchOptions:P}=JP(g),A=t||fetch;R=R?(R+"").toLowerCase():"text";let L=wU([b,S&&S.toAbortSignal()],_),B=null;const O=L&&L.unsubscribe&&(()=>{L.unsubscribe()});let F;try{if(T&&u&&y!=="get"&&y!=="head"&&(F=await h(x,w))!==0){let re=new n(m,{method:"POST",body:w,duplex:"half"}),H;if(ue.isFormData(w)&&(H=re.headers.get("content-type"))&&x.setContentType(H),re.body){const[j,pe]=__(F,wp(k_(T)));w=E_(re.body,C_,j,pe)}}ue.isString(I)||(I=I?"include":"omit");const W=i&&"credentials"in n.prototype,X={...P,signal:L,method:y.toUpperCase(),headers:x.normalize().toJSON(),body:w,duplex:"half",credentials:W?I:void 0};B=i&&new n(m,X);let V=await(i?A(B,P):A(m,X));const z=c&&(R==="stream"||R==="response");if(c&&(k||z&&O)){const re={};["status","statusText","headers"].forEach(J=>{re[J]=V[J]});const H=ue.toFiniteNumber(V.headers.get("content-length")),[j,pe]=k&&__(H,wp(k_(k),!0))||[];V=new r(E_(V.body,C_,j,()=>{pe&&pe(),O&&O()}),re)}R=R||"text";let M=await d[ue.findKey(d,R)||"text"](V,g);return!z&&O&&O(),await new Promise((re,H)=>{XP(re,H,{data:M,headers:Vr.from(V.headers),status:V.status,statusText:V.statusText,config:g,request:B})})}catch(W){throw O&&O(),W&&W.name==="TypeError"&&/Load failed|fetch/i.test(W.message)?Object.assign(new rt("Network Error",rt.ERR_NETWORK,g,B),{cause:W.cause||W}):rt.from(W,W&&W.code,g,B)}}},CU=new Map,ZP=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,i=[r,s,n];let o=i.length,a=o,l,u,c=CU;for(;a--;)l=i[a],u=c.get(l),u===void 0&&c.set(l,u=a?new Map:EU(t)),c=u;return u};ZP();const O0={http:HV,xhr:bU,fetch:{get:ZP}};ue.forEach(O0,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const I_=e=>`- ${e}`,TU=e=>ue.isFunction(e)||e===null||e===!1;function RU(e,t){e=ue.isArray(e)?e:[e];const{length:n}=e;let r,s;const i={};for(let o=0;o<n;o++){r=e[o];let a;if(s=r,!TU(r)&&(s=O0[(a=String(r)).toLowerCase()],s===void 0))throw new rt(`Unknown adapter '${a}'`);if(s&&(ue.isFunction(s)||(s=s.get(t))))break;i[a||"#"+o]=s}if(!s){const o=Object.entries(i).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=n?o.length>1?`since :
|
|
34
|
+
`+o.map(I_).join(`
|
|
35
|
+
`):" "+I_(o[0]):"as no adapter specified";throw new rt("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return s}const eI={getAdapter:RU,adapters:O0};function jg(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new nc(null,e)}function A_(e){return jg(e),e.headers=Vr.from(e.headers),e.data=Hg.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),eI.getAdapter(e.adapter||cf.adapter,e)(e).then(function(r){return jg(e),r.data=Hg.call(e,e.transformResponse,r),r.headers=Vr.from(r.headers),r},function(r){return YP(r)||(jg(e),r&&r.response&&(r.response.data=Hg.call(e,e.transformResponse,r.response),r.response.headers=Vr.from(r.response.headers))),Promise.reject(r)})}const tI="1.13.2",Im={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Im[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const O_={};Im.transitional=function(t,n,r){function s(i,o){return"[Axios v"+tI+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,a)=>{if(t===!1)throw new rt(s(o," has been removed"+(n?" in "+n:"")),rt.ERR_DEPRECATED);return n&&!O_[o]&&(O_[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,a):!0}};Im.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function PU(e,t,n){if(typeof e!="object")throw new rt("options must be an object",rt.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const a=e[i],l=a===void 0||o(a,i,e);if(l!==!0)throw new rt("option "+i+" must be "+l,rt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new rt("Unknown option "+i,rt.ERR_BAD_OPTION)}}const Th={assertOptions:PU,validators:Im},Zs=Th.validators;let Ga=class{constructor(t){this.defaults=t||{},this.interceptors={request:new w_,response:new w_}}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+=`
|
|
36
|
+
`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=al(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&Th.assertOptions(r,{silentJSONParsing:Zs.transitional(Zs.boolean),forcedJSONParsing:Zs.transitional(Zs.boolean),clarifyTimeoutError:Zs.transitional(Zs.boolean)},!1),s!=null&&(ue.isFunction(s)?n.paramsSerializer={serialize:s}:Th.assertOptions(s,{encode:Zs.function,serialize:Zs.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Th.assertOptions(n,{baseUrl:Zs.spelling("baseURL"),withXsrfToken:Zs.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&ue.merge(i.common,i[n.method]);i&&ue.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),n.headers=Vr.concat(o,i);const a=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let c,d=0,f;if(!l){const g=[A_.bind(this),void 0];for(g.unshift(...a),g.push(...u),f=g.length,c=Promise.resolve(n);d<f;)c=c.then(g[d++],g[d++]);return c}f=a.length;let h=n;for(;d<f;){const g=a[d++],m=a[d++];try{h=g(h)}catch(y){m.call(this,y);break}}try{c=A_.call(this,h)}catch(g){return Promise.reject(g)}for(d=0,f=u.length;d<f;)c=c.then(u[d++],u[d++]);return c}getUri(t){t=al(this.defaults,t);const n=QP(t.baseURL,t.url,t.allowAbsoluteUrls);return qP(n,t.params,t.paramsSerializer)}};ue.forEach(["delete","get","head","options"],function(t){Ga.prototype[t]=function(n,r){return this.request(al(r||{},{method:t,url:n,data:(r||{}).data}))}});ue.forEach(["post","put","patch"],function(t){function n(r){return function(i,o,a){return this.request(al(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Ga.prototype[t]=n(),Ga.prototype[t+"Form"]=n(!0)});let IU=class nI{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(a=>{r.subscribe(a),i=a}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,a){r.reason||(r.reason=new nc(i,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new nI(function(s){t=s}),cancel:t}}};function AU(e){return function(n){return e.apply(null,n)}}function OU(e){return ue.isObject(e)&&e.isAxiosError===!0}const Sy={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(Sy).forEach(([e,t])=>{Sy[t]=e});function rI(e){const t=new Ga(e),n=MP(Ga.prototype.request,t);return ue.extend(n,Ga.prototype,t,{allOwnKeys:!0}),ue.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return rI(al(e,s))},n}const bn=rI(cf);bn.Axios=Ga;bn.CanceledError=nc;bn.CancelToken=IU;bn.isCancel=YP;bn.VERSION=tI;bn.toFormData=Pm;bn.AxiosError=rt;bn.Cancel=bn.CanceledError;bn.all=function(t){return Promise.all(t)};bn.spread=AU;bn.isAxiosError=OU;bn.mergeConfig=al;bn.AxiosHeaders=Vr;bn.formToJSON=e=>KP(ue.isHTMLForm(e)?new FormData(e):e);bn.getAdapter=eI.getAdapter;bn.HttpStatusCode=Sy;bn.default=bn;const{Axios:Aue,AxiosError:sI,CanceledError:Oue,isCancel:Due,CancelToken:Mue,VERSION:Lue,all:Fue,Cancel:$ue,isAxiosError:Nue,spread:Bue,toFormData:Vue,AxiosHeaders:Uue,HttpStatusCode:Ta,formToJSON:zue,getAdapter:Hue,mergeConfig:jue}=bn;class Bc extends Error{}Bc.prototype.name="InvalidTokenError";function DU(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 MU(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 DU(t)}catch{return atob(t)}}function LU(e,t){if(typeof e!="string")throw new Bc("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 Bc(`Invalid token specified: missing part #${n+1}`);let s;try{s=MU(r)}catch(i){throw new Bc(`Invalid token specified: invalid base64 for part #${n+1} (${i.message})`)}try{return JSON.parse(s)}catch(i){throw new Bc(`Invalid token specified: invalid json for part #${n+1} (${i.message})`)}}function FU(e,t={}){const{onError:n,fallbackValue:r=null}=t,s=(i,o)=>{try{return LU(i,o)}catch(a){return n==null||n(a),r}};return{header:D(()=>s(Qt(e),{header:!0})),payload:D(()=>s(Qt(e)))}}class Sa{static async getLoginRequired(){return await(await sr(!1,!1)).get("/api/auth/login-required")}static async postLogin(t,n){return await(await sr(!1,!1)).post("/api/auth/login",{username:t,password:n})}static async logout(){return await(await sr(!0,!1)).post("/api/auth/logout")}static async refreshLogin(t){return await(await sr(!1,!1)).post("/api/auth/refresh",{refreshToken:t})}static async verifyLogin(){return await(await sr(!0,!1)).post("/api/auth/verify")}static async registerAccount(t,n){return await(await sr(!0,!1)).post("/api/auth/register",{username:t,password:n})}}const Dr={IncorrectCredentials:"IncorrectCredentials",InvalidOrExpiredRefreshToken:"InvalidOrExpiredRefreshToken",InvalidOrExpiredAuthToken:"InvalidOrExpiredAuthToken",PasswordChangeRequired:"PasswordChangeRequired",LoginRequired:"LoginRequired",AccountNotVerified:"AccountNotVerified"};function D0(e){switch(e){case Dr.IncorrectCredentials:return"Incorrect credentials";case Dr.InvalidOrExpiredRefreshToken:return"Invalid or expired refresh token";case Dr.InvalidOrExpiredAuthToken:return"Invalid or expired auth token";case Dr.PasswordChangeRequired:return"Password change required";case Dr.LoginRequired:return"Login required";case Dr.AccountNotVerified:return"Account not verified";default:return"Authentication error"}}const vs=ks("auth",{state:()=>({isDemoMode:null,token:null,refreshToken:null,loginRequired:null,registration:null,wizardState:null,lastLogoutReason:null}),actions:{async checkAuthenticationRequirements(){return await Sa.getLoginRequired().then(e=>(this.loginRequired=e.data.loginRequired,this.wizardState=e.data.wizardState,this.registration=e.data.registration,this.isDemoMode=e.data.isDemoMode,{loginRequired:this.loginRequired,wizardState:this.wizardState,registration:this.registration})).catch(e=>{var t;throw console.error("authRequired: failed to check login required",(t=e.response)==null?void 0:t.status),e})},async login(e,t){return this.lastLogoutReason=null,await Sa.postLogin(e,t).then(n=>(this.setTokens(n.data.token,n.data.refreshToken),n.data)).catch(n=>{var r;throw console.error("login: failed to login",(r=n.response)==null?void 0:r.status),n})},async logout(e=!1,t){if(console.debug(`Logging out (calling server ${e})`),t&&(this.lastLogoutReason=t),e&&this.tokenClaims&&!this.isLoginExpired)try{await Sa.logout()}catch(n){console.error("Server could not process logout, but local logout was successful",n)}this.setIdToken(void 0),this.setRefreshToken(void 0)},async verifyOrRefreshLoginOnceOrLogout(){var e,t;try{return await Sa.verifyLogin(),{success:!0}}catch(n){console.error("[AuthStore.verifyOrRefreshLoginOnce]: failed to verify login",n);const r=n;if(!r.response||((e=r.response)==null?void 0:e.status)!==Ta.Unauthorized)throw console.error("[AuthStore.verifyOrRefreshLoginOnce]: unknown error",r.status),n;const{reasonCode:s,url:i}=this.extractSpecialReasonCode(n);if(s)return await this.logout(!1,D0(s)),console.error(`[AuthStore] 401 Unauthorized - emitting 'auth:${s}' with reason ${s}`),Bn(`auth:${s}`).emit({url:i,error:r.message,reasonCode:s}),{success:!1,handled:!0};if(!this.hasRefreshToken)return{success:!1,handled:!1};try{await this.refreshLoginToken(),await Sa.verifyLogin()}catch(o){const a=o;if(((t=a.response)==null?void 0:t.status)===Ta.Unauthorized)return await this.logout(!1),console.error("[AuthStore.verifyOrRefreshLoginOnce]: failed to refresh token",a.status),{success:!1,handled:!1};throw o}return{success:!0,handled:!1}}},extractSpecialReasonCode(e){var n,r,s;const t=(r=(n=e==null?void 0:e.response)==null?void 0:n.data)==null?void 0:r.reasonCode;return t&&console.error("[AuthStore] 401 Unauthorized - Checking received reason code",t),t&&(t===Dr.AccountNotVerified||t===Dr.PasswordChangeRequired)?{reasonCode:t,url:(s=e==null?void 0:e.config)==null?void 0:s.url}:{reasonCode:null,url:null}},loadTokens(){this.token=localStorage.getItem("token"),this.refreshToken=localStorage.getItem("refreshToken")},async refreshLoginToken(){if(!this.refreshToken)throw new Error("refreshLoginToken: no refresh token");return await Sa.refreshLogin(this.refreshToken).then(e=>{var t;return(t=e==null?void 0:e.data)!=null&&t.token&&this.setIdToken(e.data.token),!0}).catch(e=>{var t,n,r;throw((t=e.response)==null?void 0:t.status)==Ta.Unauthorized?(this.setTokens(void 0,void 0),console.error("refreshLoginToken: authentication error, failed to refresh tokens",(n=e.response)==null?void 0:n.status)):console.error("refreshLoginToken: unknown error, failed to refresh tokens",(r=e.response)==null?void 0:r.status),e})},setTokens(e,t){this.setIdToken(e),this.setRefreshToken(t)},setIdToken(e){e!=null&&e.length?(localStorage.setItem("token",e),this.token=e):localStorage.removeItem("token")},setRefreshToken(e){e!=null&&e.length?(localStorage.setItem("refreshToken",e),this.refreshToken=e):localStorage.removeItem("refreshToken")}},getters:{hasRefreshToken(){return!!this.refreshToken},isLoginExpired(){const e=this.tokenClaims;return e!=null&&e.exp?e.exp<Date.now()/1e3:!1},hasAuthToken(){return!!this.tokenClaims},tokenClaims(){if(!this.token)return null;const e=FU(this.token,{fallbackValue:null});return e?e.payload.value:null}}}),je=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,pt=globalThis,Ka="10.32.1";function _l(){return Am(pt),pt}function Am(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Ka,t[Ka]=t[Ka]||{}}function rc(e,t,n=pt){const r=n.__SENTRY__=n.__SENTRY__||{},s=r[Ka]=r[Ka]||{};return s[e]||(s[e]=t())}const $U=["debug","info","warn","error","log","assert","trace"],NU="Sentry Logger ",Sp={};function co(e){if(!("console"in pt))return e();const t=pt.console,n={},r=Object.keys(Sp);r.forEach(s=>{const i=Sp[s];n[s]=t[s],t[s]=i});try{return e()}finally{r.forEach(s=>{t[s]=n[s]})}}function BU(){L0().enabled=!0}function VU(){L0().enabled=!1}function iI(){return L0().enabled}function UU(...e){M0("log",...e)}function zU(...e){M0("warn",...e)}function HU(...e){M0("error",...e)}function M0(e,...t){je&&iI()&&co(()=>{pt.console[e](`${NU}[${e}]:`,...t)})}function L0(){return je?rc("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const Ae={enable:BU,disable:VU,isEnabled:iI,log:UU,warn:zU,error:HU},oI=50,ll="?",D_=/\(error: (.*)\)/,M_=/captureMessage|captureException/;function aI(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,s=0)=>{const i=[],o=n.split(`
|
|
37
|
+
`);for(let a=r;a<o.length;a++){let l=o[a];l.length>1024&&(l=l.slice(0,1024));const u=D_.test(l)?l.replace(D_,"$1"):l;if(!u.match(/\S*Error: /)){for(const c of t){const d=c(u);if(d){i.push(d);break}}if(i.length>=oI+s)break}}return WU(i.slice(s))}}function jU(e){return Array.isArray(e)?aI(...e):e}function WU(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(Bf(t).function||"")&&t.pop(),t.reverse(),M_.test(Bf(t).function||"")&&(t.pop(),M_.test(Bf(t).function||"")&&t.pop()),t.slice(0,oI).map(n=>({...n,filename:n.filename||Bf(t).filename,function:n.function||ll}))}function Bf(e){return e[e.length-1]||{}}const Wg="<anonymous>";function no(e){try{return!e||typeof e!="function"?Wg:e.name||Wg}catch{return Wg}}function L_(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 lI(e){return"__v_isVNode"in e&&e.__v_isVNode?"[VueVNode]":"[VueViewModel]"}const Rh={},F_={};function ia(e,t){Rh[e]=Rh[e]||[],Rh[e].push(t)}function oa(e,t){if(!F_[e]){F_[e]=!0;try{t()}catch(n){je&&Ae.error(`Error while instrumenting ${e}`,n)}}}function ms(e,t){const n=e&&Rh[e];if(n)for(const r of n)try{r(t)}catch(s){je&&Ae.error(`Error while triggering instrumentation handler.
|
|
38
|
+
Type: ${e}
|
|
39
|
+
Name: ${no(r)}
|
|
40
|
+
Error:`,s)}}let qg=null;function uI(e){const t="error";ia(t,e),oa(t,qU)}function qU(){qg=pt.onerror,pt.onerror=function(e,t,n,r,s){return ms("error",{column:r,error:s,line:n,msg:e,url:t}),qg?qg.apply(this,arguments):!1},pt.onerror.__SENTRY_INSTRUMENTED__=!0}let Gg=null;function cI(e){const t="unhandledrejection";ia(t,e),oa(t,GU)}function GU(){Gg=pt.onunhandledrejection,pt.onunhandledrejection=function(e){return ms("unhandledrejection",e),Gg?Gg.apply(this,arguments):!0},pt.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const dI=Object.prototype.toString;function F0(e){switch(dI.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return ro(e,Error)}}function sc(e,t){return dI.call(e)===`[object ${t}]`}function fI(e){return sc(e,"ErrorEvent")}function $_(e){return sc(e,"DOMError")}function KU(e){return sc(e,"DOMException")}function ji(e){return sc(e,"String")}function $0(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Tu(e){return e===null||$0(e)||typeof e!="object"&&typeof e!="function"}function kd(e){return sc(e,"Object")}function Om(e){return typeof Event<"u"&&ro(e,Event)}function YU(e){return typeof Element<"u"&&ro(e,Element)}function XU(e){return sc(e,"RegExp")}function ic(e){return!!(e!=null&&e.then&&typeof e.then=="function")}function QU(e){return kd(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function ro(e,t){try{return e instanceof t}catch{return!1}}function hI(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue||e.__v_isVNode))}function N0(e){return typeof Request<"u"&&ro(e,Request)}const B0=pt,JU=80;function Hr(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,s=[];let i=0,o=0;const a=" > ",l=a.length;let u;const c=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||JU;for(;n&&i++<r&&(u=ZU(n,c),!(u==="html"||i>1&&o+s.length*l+u.length>=d));)s.push(u),o+=u.length,n=n.parentNode;return s.reverse().join(a)}catch{return"<unknown>"}}function ZU(e,t){const n=e,r=[];if(!(n!=null&&n.tagName))return"";if(B0.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const s=t!=null&&t.length?t.filter(o=>n.getAttribute(o)).map(o=>[o,n.getAttribute(o)]):null;if(s!=null&&s.length)s.forEach(o=>{r.push(`[${o[0]}="${o[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const o=n.className;if(o&&ji(o)){const a=o.split(/\s+/);for(const l of a)r.push(`.${l}`)}}const i=["aria-label","type","name","title","alt"];for(const o of i){const a=n.getAttribute(o);a&&r.push(`[${o}="${a}"]`)}return r.join("")}function oc(){try{return B0.document.location.href}catch{return""}}function pI(e){if(!B0.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 Lr(e,t,n){if(!(t in e))return;const r=e[t];if(typeof r!="function")return;const s=n(r);typeof s=="function"&&mI(s,r);try{e[t]=s}catch{je&&Ae.log(`Failed to replace method "${t}" in object`,e)}}function es(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{je&&Ae.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function mI(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,es(e,"__sentry_original__",t)}catch{}}function V0(e){return e.__sentry_original__}function gI(e){if(F0(e))return{message:e.message,name:e.name,stack:e.stack,...B_(e)};if(Om(e)){const t={type:e.type,target:N_(e.target),currentTarget:N_(e.currentTarget),...B_(e)};return typeof CustomEvent<"u"&&ro(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function N_(e){try{return YU(e)?Hr(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function B_(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 e3(e){const t=Object.keys(gI(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}function _y(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function V_(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const s=e[r];try{hI(s)?n.push(lI(s)):n.push(String(s))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function Ph(e,t,n=!1){return ji(e)?XU(t)?t.test(e):ji(t)?n?e===t:e.includes(t):!1:!1}function Wi(e,t=[],n=!1){return t.some(r=>Ph(e,r,n))}function t3(){const e=pt;return e.crypto||e.msCrypto}let Kg;function n3(){return Math.random()*16}function Zr(e=t3()){try{if(e!=null&&e.randomUUID)return e.randomUUID().replace(/-/g,"")}catch{}return Kg||(Kg="10000000100040008000"+1e11),Kg.replace(/[018]/g,t=>(t^(n3()&15)>>t/4).toString(16))}function vI(e){var t,n;return(n=(t=e.exception)==null?void 0:t.values)==null?void 0:n[0]}function Ea(e){const{message:t,event_id:n}=e;if(t)return t;const r=vI(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function ky(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 Ru(e,t){const n=vI(e);if(!n)return;const r={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism={...r,...s,...t},t&&"data"in t){const i={...s==null?void 0:s.data,...t.data};n.mechanism.data=i}}function U_(e){if(r3(e))return!0;try{es(e,"__sentry_captured__",!0)}catch{}return!1}function r3(e){try{return e.__sentry_captured__}catch{}}const yI=1e3;function kl(){return Date.now()/yI}function s3(){const{performance:e}=pt;if(!(e!=null&&e.now)||!e.timeOrigin)return kl;const t=e.timeOrigin;return()=>(t+e.now())/yI}let z_;function _n(){return(z_??(z_=s3()))()}let Yg;function i3(){var c;const{performance:e}=pt;if(!(e!=null&&e.now))return[void 0,"none"];const t=3600*1e3,n=e.now(),r=Date.now(),s=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,i=s<t,o=(c=e.timing)==null?void 0:c.navigationStart,l=typeof o=="number"?Math.abs(o+n-r):t,u=l<t;return i||u?s<=l?[e.timeOrigin,"timeOrigin"]:[o,"navigationStart"]:[r,"dateNow"]}function qr(){return Yg||(Yg=i3()),Yg[0]}function o3(e){const t=_n(),n={sid:Zr(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>l3(n)};return e&&Pu(n,e),n}function Pu(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||_n(),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:Zr()),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 a3(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),Pu(e,n)}function l3(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 df(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]=df(r[s],t[s],n-1));return r}function so(){return Zr()}function qi(){return Zr().substring(16)}const xy="_sentrySpan";function Iu(e,t){t?es(e,xy,t):delete e[xy]}function _p(e){return e[xy]}const u3=100;class vi{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:so(),sampleRand:Math.random()}}clone(){const t=new vi;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,Iu(t,_p(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&&Pu(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 vi?n.getScopeData():kd(n)?t:void 0,{tags:s,attributes:i,extra:o,user:a,contexts:l,level:u,fingerprint:c=[],propagationContext:d}=r||{};return this._tags={...this._tags,...s},this._attributes={...this._attributes,...i},this._extra={...this._extra,...o},this._contexts={...this._contexts,...l},a&&Object.keys(a).length&&(this._user=a),u&&(this._level=u),c.length&&(this._fingerprint=c),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,Iu(this,void 0),this._attachments=[],this.setPropagationContext({traceId:so(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){var i;const r=typeof n=="number"?n:u3;if(r<=0)return this;const s={timestamp:kl(),...t,message:t.message?_y(t.message,2048):t.message};return this._breadcrumbs.push(s),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),(i=this._client)==null||i.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,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:_p(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=df(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=(n==null?void 0:n.event_id)||Zr();if(!this._client)return je&&Ae.warn("No client configured on scope - will not capture exception!"),r;const s=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:s,...n,event_id:r},this),r}captureMessage(t,n,r){const s=(r==null?void 0:r.event_id)||Zr();if(!this._client)return je&&Ae.warn("No client configured on scope - will not capture message!"),s;const i=(r==null?void 0: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==null?void 0:n.event_id)||Zr();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(je&&Ae.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 c3(){return rc("defaultCurrentScope",()=>new vi)}function d3(){return rc("defaultIsolationScope",()=>new vi)}class f3{constructor(t,n){let r;t?r=t:r=new vi;let s;n?s=n:s=new vi,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 ic(r)?r.then(s=>(this._popScope(),s),s=>{throw this._popScope(),s}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function Au(){const e=_l(),t=Am(e);return t.stack=t.stack||new f3(c3(),d3())}function h3(e){return Au().withScope(e)}function p3(e,t){const n=Au();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function H_(e){return Au().withScope(()=>e(Au().getIsolationScope()))}function m3(){return{withIsolationScope:H_,withScope:h3,withSetScope:p3,withSetIsolationScope:(e,t)=>H_(t),getCurrentScope:()=>Au().getScope(),getIsolationScope:()=>Au().getIsolationScope()}}function ac(e){const t=Am(e);return t.acs?t.acs:m3()}function Dt(){const e=_l();return ac(e).getCurrentScope()}function _i(){const e=_l();return ac(e).getIsolationScope()}function g3(){return rc("globalScope",()=>new vi)}function Dm(...e){const t=_l(),n=ac(t);if(e.length===2){const[r,s]=e;return r?n.withSetScope(r,s):n.withScope(s)}return n.withScope(e[0])}function mt(){return Dt().getClient()}function v3(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:s}=t,i={trace_id:n,span_id:s||qi()};return r&&(i.parent_span_id=r),i}const Fr="sentry.source",U0="sentry.sample_rate",bI="sentry.previous_trace_sample_rate",io="sentry.op",dn="sentry.origin",xd="sentry.idle_span_finish_reason",ff="sentry.measurement_unit",hf="sentry.measurement_value",j_="sentry.custom_span_name",z0="sentry.profile_id",lc="sentry.exclusive_time",y3="sentry.link.type",b3=0,H0=1,Dn=2;function w3(e){if(e<400&&e>=100)return{code:H0};if(e>=400&&e<500)switch(e){case 401:return{code:Dn,message:"unauthenticated"};case 403:return{code:Dn,message:"permission_denied"};case 404:return{code:Dn,message:"not_found"};case 409:return{code:Dn,message:"already_exists"};case 413:return{code:Dn,message:"failed_precondition"};case 429:return{code:Dn,message:"resource_exhausted"};case 499:return{code:Dn,message:"cancelled"};default:return{code:Dn,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:Dn,message:"unimplemented"};case 503:return{code:Dn,message:"unavailable"};case 504:return{code:Dn,message:"deadline_exceeded"};default:return{code:Dn,message:"internal_error"}}return{code:Dn,message:"internal_error"}}function wI(e,t){e.setAttribute("http.response.status_code",t);const n=w3(t);n.message!=="unknown_error"&&e.setStatus(n)}const SI="_sentryScope",_I="_sentryIsolationScope";function S3(e){try{const t=pt.WeakRef;if(typeof t=="function")return new t(e)}catch{}return e}function _3(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}function k3(e,t,n){e&&(es(e,_I,S3(n)),es(e,SI,t))}function kp(e){const t=e;return{scope:t[SI],isolationScope:_3(t[_I])}}const j0="sentry-",x3=/^sentry-/,E3=8192;function kI(e){const t=T3(e);if(!t)return;const n=Object.entries(t).reduce((r,[s,i])=>{if(s.match(x3)){const o=s.slice(j0.length);r[o]=i}return r},{});if(Object.keys(n).length>0)return n}function C3(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,s])=>(s&&(n[`${j0}${r}`]=s),n),{});return R3(t)}function T3(e){if(!(!e||!ji(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=W_(n);return Object.entries(r).forEach(([s,i])=>{t[s]=i}),t},{}):W_(e)}function W_(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 R3(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],s)=>{const i=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,o=s===0?i:`${t},${i}`;return o.length>E3?(je&&Ae.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):o},"")}const P3=/^o(\d+)\./,I3=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function A3(e){return e==="http"||e==="https"}function uc(e,t=!1){const{host:n,path:r,pass:s,port:i,projectId:o,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&s?`:${s}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${o}`}function O3(e){const t=I3.exec(e);if(!t){co(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,s="",i="",o="",a=""]=t.slice(1);let l="",u=a;const c=u.split("/");if(c.length>1&&(l=c.slice(0,-1).join("/"),u=c.pop()),u){const d=u.match(/^\d+/);d&&(u=d[0])}return xI({host:i,pass:s,path:l,projectId:u,port:o,protocol:n,publicKey:r})}function xI(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function D3(e){if(!je)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(Ae.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?A3(r)?t&&isNaN(parseInt(t,10))?(Ae.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(Ae.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(Ae.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function M3(e){const t=e.match(P3);return t==null?void 0:t[1]}function L3(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=M3(n)),r}function F3(e){const t=typeof e=="string"?O3(e):xI(e);if(!(!t||!D3(t)))return t}function ul(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 EI=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function $3(e){if(!e)return;const t=e.match(EI);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 N3(e,t){const n=$3(e),r=kI(t);if(!(n!=null&&n.traceId))return{traceId:so(),sampleRand:Math.random()};const s=B3(n,r);r&&(r.sample_rand=s.toString());const{traceId:i,parentSpanId:o,parentSampled:a}=n;return{traceId:i,parentSpanId:o,sampled:a,dsc:r||{},sampleRand:s}}function CI(e=so(),t=qi(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function TI(e=so(),t=qi(),n){return`00-${e}-${t}-${n?"01":"00"}`}function B3(e,t){const n=ul(t==null?void 0:t.sample_rand);if(n!==void 0)return n;const r=ul(t==null?void 0:t.sample_rate);return r&&(e==null?void 0:e.parentSampled)!==void 0?e.parentSampled?Math.random()*r:r+Math.random()*(1-r):Math.random()}const RI=0,W0=1;let q_=!1;function V3(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:s,parent_span_id:i,status:o,origin:a,links:l}=bt(e);return{parent_span_id:i,span_id:t,trace_id:n,data:r,op:s,status:o,origin:a,links:l}}function U3(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),s=r?t:bt(e).parent_span_id,i=kp(e).scope,o=r?(i==null?void 0:i.getPropagationContext().propagationSpanId)||qi():t;return{parent_span_id:s,span_id:o,trace_id:n}}function z3(e){const{traceId:t,spanId:n}=e.spanContext(),r=aa(e);return CI(t,n,r)}function H3(e){const{traceId:t,spanId:n}=e.spanContext(),r=aa(e);return TI(t,n,r)}function PI(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===W0,attributes:i,...s}))}function Ya(e){return typeof e=="number"?G_(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?G_(e.getTime()):_n()}function G_(e){return e>9999999999?e/1e3:e}function bt(e){var r;if(W3(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(j3(e)){const{attributes:s,startTime:i,name:o,endTime:a,status:l,links:u}=e,c="parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?(r=e.parentSpanContext)==null?void 0:r.spanId:void 0;return{span_id:t,trace_id:n,data:s,description:o,parent_span_id:c,start_timestamp:Ya(i),timestamp:Ya(a)||void 0,status:II(l),op:s[io],origin:s[dn],links:PI(u)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function j3(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function W3(e){return typeof e.getSpanJSON=="function"}function aa(e){const{traceFlags:t}=e.spanContext();return t===W0}function II(e){if(!(!e||e.code===b3))return e.code===H0?"ok":e.message||"internal_error"}const Xa="_sentryChildSpans",Ey="_sentryRootSpan";function AI(e,t){const n=e[Ey]||e;es(t,Ey,n),e[Xa]?e[Xa].add(t):es(e,Xa,new Set([t]))}function q3(e,t){e[Xa]&&e[Xa].delete(t)}function Ih(e){const t=new Set;function n(r){if(!t.has(r)&&aa(r)){t.add(r);const s=r[Xa]?Array.from(r[Xa]):[];for(const i of s)n(i)}}return n(e),Array.from(t)}function Yn(e){return e[Ey]||e}function er(){const e=_l(),t=ac(e);return t.getActiveSpan?t.getActiveSpan():_p(Dt())}function Cy(){q_||(co(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),q_=!0)}let K_=!1;function G3(){if(K_)return;function e(){const t=er(),n=t&&Yn(t);if(n){const r="internal_error";je&&Ae.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:Dn,message:r})}}e.tag="sentry_tracingErrorCallback",K_=!0,uI(e),cI(e)}function gs(e){var n;if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||((n=mt())==null?void 0:n.getOptions());return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function Y_(e){Ae.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function xp(e,t){if(!(t!=null&&t.length)||!e.description)return!1;for(const n of t){if(Y3(n)){if(Ph(e.description,n))return je&&Y_(e),!0;continue}if(!n.name&&!n.op)continue;const r=n.name?Ph(e.description,n.name):!0,s=n.op?e.op&&Ph(e.op,n.op):!0;if(r&&s)return je&&Y_(e),!0}return!1}function K3(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 Y3(e){return typeof e=="string"||e instanceof RegExp}const q0="production",OI="_frozenDsc";function Ah(e,t){es(e,OI,t)}function DI(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},s={environment:n.environment||q0,release:n.release,public_key:r,trace_id:e,org_id:L3(t)};return t.emit("createDsc",s),s}function MI(e,t){const n=t.getPropagationContext();return n.dsc||DI(n.traceId,e)}function oo(e){var g;const t=mt();if(!t)return{};const n=Yn(e),r=bt(n),s=r.data,i=n.spanContext().traceState,o=(i==null?void 0:i.get("sentry.sample_rate"))??s[U0]??s[bI];function a(m){return(typeof o=="number"||typeof o=="string")&&(m.sample_rate=`${o}`),m}const l=n[OI];if(l)return a(l);const u=i==null?void 0:i.get("sentry.dsc"),c=u&&kI(u);if(c)return a(c);const d=DI(e.spanContext().traceId,t),f=s[Fr],h=r.description;return f!=="url"&&h&&(d.transaction=h),gs()&&(d.sampled=String(aa(n)),d.sample_rand=(i==null?void 0:i.get("sentry.sample_rand"))??((g=kp(n).scope)==null?void 0:g.getPropagationContext().sampleRand.toString())),a(d),t.emit("createDsc",d,n),d}class Xo{constructor(t={}){this._traceId=t.traceId||so(),this._spanId=t.spanId||qi()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:RI}}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 Os(e,t=100,n=1/0){try{return Ty("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function LI(e,t=3,n=100*1024){const r=Os(e,t);return Z3(r)>n?LI(e,t-1,n):r}function Ty(e,t,n=1/0,r=1/0,s=e5()){const[i,o]=s;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=X3(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const l=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(l===0)return a.replace("object ","");if(i(t))return"[Circular ~]";const u=t;if(u&&typeof u.toJSON=="function")try{const h=u.toJSON();return Ty("",h,l-1,r,s)}catch{}const c=Array.isArray(t)?[]:{};let d=0;const f=gI(t);for(const h in f){if(!Object.prototype.hasOwnProperty.call(f,h))continue;if(d>=r){c[h]="[MaxProperties ~]";break}const g=f[h];c[h]=Ty(h,g,l-1,r,s),d++}return o(t),c}function X3(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(hI(t))return lI(t);if(QU(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${no(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=Q3(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function Q3(e){const t=Object.getPrototypeOf(e);return t!=null&&t.constructor?t.constructor.name:"null prototype"}function J3(e){return~-encodeURI(e).split(/%..|./).length}function Z3(e){return J3(JSON.stringify(e))}function e5(){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 la(e,t=[]){return[e,t]}function t5(e,t){const[n,r]=e;return[n,[...r,t]]}function X_(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 Ry(e){const t=Am(pt);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function n5(e){const[t,n]=e;let r=JSON.stringify(t);function s(i){typeof r=="string"?r=typeof i=="string"?r+i:[Ry(r),i]:r.push(typeof i=="string"?Ry(i):i)}for(const i of n){const[o,a]=i;if(s(`
|
|
41
|
+
${JSON.stringify(o)}
|
|
42
|
+
`),typeof a=="string"||a instanceof Uint8Array)s(a);else{let l;try{l=JSON.stringify(a)}catch{l=JSON.stringify(Os(a))}s(l)}}return typeof r=="string"?r:r5(r)}function r5(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 s5(e){return[{type:"span"},e]}function i5(e){const t=typeof e.data=="string"?Ry(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const o5={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 Q_(e){return o5[e]}function G0(e){if(!(e!=null&&e.sdk))return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function FI(e,t,n,r){var i;const s=(i=e.sdkProcessingMetadata)==null?void 0:i.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:uc(r)},...s&&{trace:s}}}function a5(e,t){var r,s,i,o;if(!t)return e;const n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...((r=e.sdk)==null?void 0:r.integrations)||[],...t.integrations||[]],packages:[...((s=e.sdk)==null?void 0:s.packages)||[],...t.packages||[]],settings:(i=e.sdk)!=null&&i.settings||t.settings?{...(o=e.sdk)==null?void 0:o.settings,...t.settings}:void 0},e}function l5(e,t,n,r){const s=G0(n),i={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:uc(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return la(i,[o])}function u5(e,t,n,r){const s=G0(n),i=e.type&&e.type!=="replay_event"?e.type:"event";a5(e,n==null?void 0:n.sdk);const o=FI(e,s,r,t);return delete e.sdkProcessingMetadata,la(o,[[{type:i},e]])}function c5(e,t){function n(h){return!!h.trace_id&&!!h.public_key}const r=oo(e[0]),s=t==null?void 0:t.getDsn(),i=t==null?void 0:t.getOptions().tunnel,o={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!i&&s&&{dsn:uc(s)}},{beforeSendSpan:a,ignoreSpans:l}=(t==null?void 0:t.getOptions())||{},u=l!=null&&l.length?e.filter(h=>!xp(bt(h),l)):e,c=e.length-u.length;c&&(t==null||t.recordDroppedEvent("before_send","span",c));const d=a?h=>{const g=bt(h),m=a(g);return m||(Cy(),g)}:bt,f=[];for(const h of u){const g=d(h);g&&f.push(s5(g))}return la(o,f)}function d5(e){if(!je)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=bt(e),{spanId:s}=e.spanContext(),i=aa(e),o=Yn(e),a=o===e,l=`[Tracing] Starting ${i?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${s}`];if(r&&u.push(`parent ID: ${r}`),!a){const{op:c,description:d}=bt(o);u.push(`root ID: ${o.spanContext().spanId}`),c&&u.push(`root op: ${c}`),d&&u.push(`root description: ${d}`)}Ae.log(`${l}
|
|
43
|
+
${u.join(`
|
|
44
|
+
`)}`)}function f5(e){if(!je)return;const{description:t="< unknown name >",op:n="< unknown op >"}=bt(e),{spanId:r}=e.spanContext(),i=Yn(e)===e,o=`[Tracing] Finishing "${n}" ${i?"root ":""}span "${t}" with ID ${r}`;Ae.log(o)}function h5(e,t,n,r=er()){const s=r&&Yn(r);s&&(je&&Ae.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),s.addEvent(e,{[hf]:t,[ff]:n}))}function J_(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},s=r[ff],i=r[hf];typeof s=="string"&&typeof i=="number"&&(t[n.name]={value:i,unit:s})}),t}const Z_=1e3;class Mm{constructor(t={}){this._traceId=t.traceId||so(),this._spanId=t.spanId||qi(),this._startTime=t.startTimestamp||_n(),this._links=t.links,this._attributes={},this.setAttributes({[dn]:"manual",[io]: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?W0:RI}}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=Ya(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=Ya(t),f5(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[io],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:II(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[dn],profile_id:this._attributes[z0],exclusive_time:this._attributes[lc],measurements:J_(this._events),is_segment:this._isStandaloneSpan&&Yn(this)===this||void 0,segment_id:this._isStandaloneSpan?Yn(this).spanContext().spanId:void 0,links:PI(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){je&&Ae.log("[Tracing] Adding an event to span:",t);const s=ek(n)?n:r||_n(),i=ek(n)?{}:n||{},o={name:t,time:Ya(s),attributes:i};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=mt();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===Yn(this)))return;if(this._isStandaloneSpan){this._sampled?m5(c5([this],t)):(je&&Ae.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&&(kp(this).scope||Dt()).captureEvent(r)}_convertSpanToTransaction(){var c;if(!tk(bt(this)))return;this._name||(je&&Ae.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=kp(this),r=(c=t==null?void 0:t.getScopeData().sdkProcessingMetadata)==null?void 0:c.normalizedRequest;if(this._sampled!==!0)return;const i=Ih(this).filter(d=>d!==this&&!p5(d)).map(d=>bt(d)).filter(tk),o=this._attributes[Fr];delete this._attributes[j_],i.forEach(d=>{delete d.data[j_]});const a={contexts:{trace:V3(this)},spans:i.length>Z_?i.sort((d,f)=>d.start_timestamp-f.start_timestamp).slice(0,Z_):i,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:oo(this)},request:r,...o&&{transaction_info:{source:o}}},l=J_(this._events);return l&&Object.keys(l).length&&(je&&Ae.log("[Measurements] Adding measurements to transaction event",JSON.stringify(l,void 0,2)),a.measurements=l),a}}function ek(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function tk(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function p5(e){return e instanceof Mm&&e.isStandaloneSpan()}function m5(e){const t=mt();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function g5(e,t,n=()=>{},r=()=>{}){let s;try{s=e()}catch(i){throw t(i),n(),i}return v5(s,t,n,r)}function v5(e,t,n,r){return ic(e)?e.then(s=>(n(),r(s),s),s=>{throw t(s),n(),s}):(n(),r(e),e)}function y5(e,t,n){if(!gs(e))return[!1];let r,s;typeof e.tracesSampler=="function"?(s=e.tracesSampler({...t,inheritOrSampleWith:a=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):a}),r=!0):t.parentSampled!==void 0?s=t.parentSampled:typeof e.tracesSampleRate<"u"&&(s=e.tracesSampleRate,r=!0);const i=ul(s);if(i===void 0)return je&&Ae.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 je&&Ae.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,i,r];const o=n<i;return o||je&&Ae.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(s)})`),[o,i,r]}const $I="__SENTRY_SUPPRESS_TRACING__";function b5(e,t){const n=Y0();if(n.startSpan)return n.startSpan(e,t);const r=BI(e),{forceTransaction:s,parentSpan:i,scope:o}=e,a=o==null?void 0:o.clone();return Dm(a,()=>S5(i)(()=>{const u=Dt(),c=VI(u,i),f=e.onlyIfParent&&!c?new Xo:NI({parentSpan:c,spanArguments:r,forceTransaction:s,scope:u});return Iu(u,f),g5(()=>t(f),()=>{const{status:h}=bt(f);f.isRecording()&&(!h||h==="ok")&&f.setStatus({code:Dn,message:"internal_error"})},()=>{f.end()})}))}function Qo(e){const t=Y0();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=BI(e),{forceTransaction:r,parentSpan:s}=e;return(e.scope?o=>Dm(e.scope,o):s!==void 0?o=>K0(s,o):o=>o())(()=>{const o=Dt(),a=VI(o,s);return e.onlyIfParent&&!a?new Xo:NI({parentSpan:a,spanArguments:n,forceTransaction:r,scope:o})})}function K0(e,t){const n=Y0();return n.withActiveSpan?n.withActiveSpan(e,t):Dm(r=>(Iu(r,e||void 0),t(r)))}function NI({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!gs()){const o=new Xo;if(n||!e){const a={sampled:"false",sample_rate:"0",transaction:t.name,...oo(o)};Ah(o,a)}return o}const s=_i();let i;if(e&&!n)i=w5(e,r,t),AI(e,i);else if(e){const o=oo(e),{traceId:a,spanId:l}=e.spanContext(),u=aa(e);i=nk({traceId:a,parentSpanId:l,...t},r,u),Ah(i,o)}else{const{traceId:o,dsc:a,parentSpanId:l,sampled:u}={...s.getPropagationContext(),...r.getPropagationContext()};i=nk({traceId:o,parentSpanId:l,...t},r,u),a&&Ah(i,a)}return d5(i),k3(i,r,s),i}function BI(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=Ya(e.startTime),delete r.startTime,r}return n}function Y0(){const e=_l();return ac(e)}function nk(e,t,n){var g;const r=mt(),s=(r==null?void 0:r.getOptions())||{},{name:i=""}=e,o={spanAttributes:{...e.attributes},spanName:i,parentSampled:n};r==null||r.emit("beforeSampling",o,{decision:!1});const a=o.parentSampled??n,l=o.spanAttributes,u=t.getPropagationContext(),[c,d,f]=t.getScopeData().sdkProcessingMetadata[$I]?[!1]:y5(s,{name:i,parentSampled:a,attributes:l,parentSampleRate:ul((g=u.dsc)==null?void 0:g.sample_rate)},u.sampleRand),h=new Mm({...e,attributes:{[Fr]:"custom",[U0]:d!==void 0&&f?d:void 0,...l},sampled:c});return!c&&r&&(je&&Ae.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate","transaction")),r&&r.emit("spanStart",h),h}function w5(e,t,n){const{spanId:r,traceId:s}=e.spanContext(),i=t.getScopeData().sdkProcessingMetadata[$I]?!1:aa(e),o=i?new Mm({...n,parentSpanId:r,traceId:s,sampled:i}):new Xo({traceId:s});AI(e,o);const a=mt();return a&&(a.emit("spanStart",o),n.endTimestamp&&a.emit("spanEnd",o)),o}function VI(e,t){if(t)return t;if(t===null)return;const n=_p(e);if(!n)return;const r=mt();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?Yn(n):n}function S5(e){return e!==void 0?t=>K0(e,t):t=>t()}const Oh={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},_5="heartbeatFailed",k5="idleTimeout",x5="finalTimeout",E5="externalFinish";function UI(e,t={}){const n=new Map;let r=!1,s,i=E5,o=!t.disableAutoFinish;const a=[],{idleTimeout:l=Oh.idleTimeout,finalTimeout:u=Oh.finalTimeout,childSpanTimeout:c=Oh.childSpanTimeout,beforeSpanEnd:d,trimIdleSpanEndTimestamp:f=!0}=t,h=mt();if(!h||!gs()){const R=new Xo,x={sample_rate:"0",sampled:"false",...oo(R)};return Ah(R,x),R}const g=Dt(),m=er(),y=C5(e);y.end=new Proxy(y.end,{apply(R,x,I){if(d&&d(y),x instanceof Xo)return;const[P,...A]=I,L=P||_n(),B=Ya(L),O=Ih(y).filter(M=>M!==y),F=bt(y);if(!O.length||!f)return T(B),Reflect.apply(R,x,[B,...A]);const W=h.getOptions().ignoreSpans,X=O==null?void 0:O.reduce((M,re)=>{const H=bt(re);return!H.timestamp||W&&xp(H,W)?M:M?Math.max(M,H.timestamp):H.timestamp},void 0),V=F.start_timestamp,z=Math.min(V?V+u/1e3:1/0,Math.max(V||-1/0,Math.min(B,X||1/0)));return T(z),Reflect.apply(R,x,[z,...A])}});function w(){s&&(clearTimeout(s),s=void 0)}function b(R){w(),s=setTimeout(()=>{!r&&n.size===0&&o&&(i=k5,y.end(R))},l)}function S(R){s=setTimeout(()=>{!r&&o&&(i=_5,y.end(R))},c)}function _(R){w(),n.set(R,!0);const x=_n();S(x+c/1e3)}function k(R){if(n.has(R)&&n.delete(R),n.size===0){const x=_n();b(x+l/1e3)}}function T(R){r=!0,n.clear(),a.forEach(O=>O()),Iu(g,m);const x=bt(y),{start_timestamp:I}=x;if(!I)return;x.data[xd]||y.setAttribute(xd,i);const A=x.status;(!A||A==="unknown")&&y.setStatus({code:H0}),Ae.log(`[Tracing] Idle span "${x.op}" finished`);const L=Ih(y).filter(O=>O!==y);let B=0;L.forEach(O=>{O.isRecording()&&(O.setStatus({code:Dn,message:"cancelled"}),O.end(R),je&&Ae.log("[Tracing] Cancelling span since span ended early",JSON.stringify(O,void 0,2)));const F=bt(O),{timestamp:W=0,start_timestamp:X=0}=F,V=X<=R,z=(u+l)/1e3,M=W-X<=z;if(je){const re=JSON.stringify(O,void 0,2);V?M||Ae.log("[Tracing] Discarding span since it finished after idle span final timeout",re):Ae.log("[Tracing] Discarding span since it happened after idle span was finished",re)}(!M||!V)&&(q3(y,O),B++)}),B>0&&y.setAttribute("sentry.idle_span_discarded_spans",B)}return a.push(h.on("spanStart",R=>{if(r||R===y||bt(R).timestamp||R instanceof Mm&&R.isStandaloneSpan())return;Ih(y).includes(R)&&_(R.spanContext().spanId)})),a.push(h.on("spanEnd",R=>{r||k(R.spanContext().spanId)})),a.push(h.on("idleSpanEnableAutoFinish",R=>{R===y&&(o=!0,b(),n.size&&S())})),t.disableAutoFinish||b(),setTimeout(()=>{r||(y.setStatus({code:Dn,message:"deadline_exceeded"}),i=x5,y.end())},u),y}function C5(e){const t=Qo(e);return Iu(Dt(),t),je&&Ae.log("[Tracing] Started span is an idle span"),t}const Xg=0,rk=1,sk=2;function Lm(e){return new Ed(t=>{t(e)})}function X0(e){return new Ed((t,n)=>{n(e)})}class Ed{constructor(t){this._state=Xg,this._handlers=[],this._runExecutor(t)}then(t,n){return new Ed((r,s)=>{this._handlers.push([!1,i=>{if(!t)r(i);else try{r(t(i))}catch(o){s(o)}},i=>{if(!n)s(i);else try{r(n(i))}catch(o){s(o)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new Ed((n,r)=>{let s,i;return this.then(o=>{i=!1,s=o,t&&t()},o=>{i=!0,s=o,t&&t()}).then(()=>{if(i){r(s);return}n(s)})})}_executeHandlers(){if(this._state===Xg)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===rk&&n[1](this._value),this._state===sk&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(i,o)=>{if(this._state===Xg){if(ic(o)){o.then(r,s);return}this._state=i,this._value=o,this._executeHandlers()}},r=i=>{n(rk,i)},s=i=>{n(sk,i)};try{t(r,s)}catch(i){s(i)}}}function T5(e,t,n,r=0){try{const s=Py(t,n,e,r);return ic(s)?s:Lm(s)}catch(s){return X0(s)}}function Py(e,t,n,r){const s=n[r];if(!e||!s)return e;const i=s({...e},t);return je&&i===null&&Ae.log(`Event processor "${s.id||"?"}" dropped event`),ic(i)?i.then(o=>Py(o,t,n,r+1)):Py(i,t,n,r+1)}function R5(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:i}=t;P5(e,t),r&&O5(e,r),D5(e,n),I5(e,s),A5(e,i)}function ik(e,t){const{extra:n,tags:r,attributes:s,user:i,contexts:o,level:a,sdkProcessingMetadata:l,breadcrumbs:u,fingerprint:c,eventProcessors:d,attachments:f,propagationContext:h,transactionName:g,span:m}=t;Tc(e,"extra",n),Tc(e,"tags",r),Tc(e,"attributes",s),Tc(e,"user",i),Tc(e,"contexts",o),e.sdkProcessingMetadata=df(e.sdkProcessingMetadata,l,2),a&&(e.level=a),g&&(e.transactionName=g),m&&(e.span=m),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),c.length&&(e.fingerprint=[...e.fingerprint,...c]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...h}}function Tc(e,t,n){e[t]=df(e[t],n,1)}function P5(e,t){const{extra:n,tags:r,user:s,contexts:i,level:o,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(s).length&&(e.user={...s,...e.user}),Object.keys(i).length&&(e.contexts={...i,...e.contexts}),o&&(e.level=o),a&&e.type!=="transaction"&&(e.transaction=a)}function I5(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function A5(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function O5(e,t){e.contexts={trace:U3(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:oo(t),...e.sdkProcessingMetadata};const n=Yn(t),r=bt(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function D5(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 Ei,ok,ak,po;function M5(e){const t=pt._sentryDebugIds,n=pt._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],s=n?Object.keys(n):[];if(po&&r.length===ok&&s.length===ak)return po;ok=r.length,ak=s.length,po={},Ei||(Ei={});const i=(o,a)=>{for(const l of o){const u=a[l],c=Ei==null?void 0:Ei[l];if(c&&po&&u)po[c[0]]=u,Ei&&(Ei[l]=[c[0],u]);else if(u){const d=e(l);for(let f=d.length-1;f>=0;f--){const h=d[f],g=h==null?void 0:h.filename;if(g&&po&&Ei){po[g]=u,Ei[l]=[g,u];break}}}}};return t&&i(r,t),n&&i(s,n),po}function zI(e,t,n,r,s,i){const{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=e,l={...t,event_id:t.event_id||n.event_id||Zr(),timestamp:t.timestamp||kl()},u=n.integrations||e.integrations.map(y=>y.name);L5(l,e),N5(l,u),s&&s.emit("applyFrameMetadata",t),t.type===void 0&&F5(l,e.stackParser);const c=V5(r,n.captureContext);n.mechanism&&Ru(l,n.mechanism);const d=s?s.getEventProcessors():[],f=g3().getScopeData();if(i){const y=i.getScopeData();ik(f,y)}if(c){const y=c.getScopeData();ik(f,y)}const h=[...n.attachments||[],...f.attachments];h.length&&(n.attachments=h),R5(l,f);const g=[...d,...f.eventProcessors];return T5(g,l,n).then(y=>(y&&$5(y),typeof o=="number"&&o>0?B5(y,o,a):y))}function L5(e,t){var a,l;const{environment:n,release:r,dist:s,maxValueLength:i}=t;e.environment=e.environment||n||q0,!e.release&&r&&(e.release=r),!e.dist&&s&&(e.dist=s);const o=e.request;o!=null&&o.url&&i&&(o.url=_y(o.url,i)),i&&((l=(a=e.exception)==null?void 0:a.values)==null||l.forEach(u=>{u.value&&(u.value=_y(u.value,i))}))}function F5(e,t){var r,s;const n=M5(t);(s=(r=e.exception)==null?void 0:r.values)==null||s.forEach(i=>{var o,a;(a=(o=i.stacktrace)==null?void 0:o.frames)==null||a.forEach(l=>{l.filename&&(l.debug_id=n[l.filename])})})}function $5(e){var r,s;const t={};if((s=(r=e.exception)==null?void 0:r.values)==null||s.forEach(i=>{var o,a;(a=(o=i.stacktrace)==null?void 0:o.frames)==null||a.forEach(l=>{l.debug_id&&(l.abs_path?t[l.abs_path]=l.debug_id:l.filename&&(t[l.filename]=l.debug_id),delete l.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([i,o])=>{n.push({type:"sourcemap",code_file:i,debug_id:o})})}function N5(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function B5(e,t,n){var s,i;if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:Os(o.data,t,n)}}))},...e.user&&{user:Os(e.user,t,n)},...e.contexts&&{contexts:Os(e.contexts,t,n)},...e.extra&&{extra:Os(e.extra,t,n)}};return(s=e.contexts)!=null&&s.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Os(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(o=>({...o,...o.data&&{data:Os(o.data,t,n)}}))),(i=e.contexts)!=null&&i.flags&&r.contexts&&(r.contexts.flags=Os(e.contexts.flags,3,n)),r}function V5(e,t){if(!t)return e;const n=e?e.clone():new vi;return n.update(t),n}function U5(e){if(e)return z5(e)?{captureContext:e}:j5(e)?{captureContext:e}:e}function z5(e){return e instanceof vi||typeof e=="function"}const H5=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function j5(e){return Object.keys(e).some(t=>H5.includes(t))}function gi(e,t){return Dt().captureException(e,U5(t))}function HI(e,t){return Dt().captureEvent(e,t)}function W5(e,t){_i().setContext(e,t)}function q5(){const e=mt();return(e==null?void 0:e.getOptions().enabled)!==!1&&!!(e!=null&&e.getTransport())}function G5(e){_i().addEventProcessor(e)}function lk(e){const t=_i(),n=Dt(),{userAgent:r}=pt.navigator||{},s=o3({user:n.getUser()||t.getUser(),...r&&{userAgent:r},...e}),i=t.getSession();return(i==null?void 0:i.status)==="ok"&&Pu(i,{status:"exited"}),jI(),t.setSession(s),s}function jI(){const e=_i(),n=Dt().getSession()||e.getSession();n&&a3(n),WI(),e.setSession()}function WI(){const e=_i(),t=mt(),n=e.getSession();n&&t&&t.captureSession(n)}function uk(e=!1){if(e){jI();return}WI()}const K5="7";function Y5(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function X5(e){return`${Y5(e)}${e.projectId}/envelope/`}function Q5(e,t){const n={sentry_version:K5};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function J5(e,t,n){return t||`${X5(e)}?${Q5(e,n)}`}const ck=[];function Z5(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 e4(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 Z5(r)}function t4(e,t){const n={};return t.forEach(r=>{r&&qI(e,r,n)}),n}function dk(e,t){for(const n of t)n!=null&&n.afterAllSetup&&n.afterAllSetup(e)}function qI(e,t,n){if(n[t.name]){je&&Ae.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!ck.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),ck.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(s,i)=>r(s,i,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),s=Object.assign((i,o)=>r(i,o,e),{id:t.name});e.addEventProcessor(s)}je&&Ae.log(`Integration installed: ${t.name}`)}function n4(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function r4(e,t,n,r){const s={};return t!=null&&t.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=uc(r)),la(s,[n4(e)])}function GI(e,t){const n=t??s4(e)??[];if(n.length===0)return;const r=e.getOptions(),s=r4(n,r._metadata,r.tunnel,e.getDsn());KI().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(s)}function s4(e){return KI().get(e)}function KI(){return rc("clientToLogBufferMap",()=>new WeakMap)}function i4(e){return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:e}]}function o4(e,t,n,r){const s={};return t!=null&&t.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=uc(r)),la(s,[i4(e)])}function YI(e,t){const n=t??a4(e)??[];if(n.length===0)return;const r=e.getOptions(),s=o4(n,r._metadata,r.tunnel,e.getDsn());XI().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(s)}function a4(e){return XI().get(e)}function XI(){return rc("clientToMetricBufferMap",()=>new WeakMap)}const Q0=Symbol.for("SentryBufferFullError");function J0(e=100){const t=new Set;function n(){return t.size<e}function r(o){t.delete(o)}function s(o){if(!n())return X0(Q0);const a=o();return t.add(a),a.then(()=>r(a),()=>r(a)),a}function i(o){if(!t.size)return Lm(!0);const a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!o)return a;const l=[a,new Promise(u=>setTimeout(()=>u(!1),o))];return Promise.race(l)}return{get $(){return Array.from(t)},add:s,drain:i}}const l4=60*1e3;function u4(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?l4:r-t}function c4(e,t){return e[t]||e.all||0}function QI(e,t,n=Date.now()){return c4(e,t)>n}function JI(e,{statusCode:t,headers:n},r=Date.now()){const s={...e},i=n==null?void 0:n["x-sentry-rate-limits"],o=n==null?void 0:n["retry-after"];if(i)for(const a of i.trim().split(",")){const[l,u,,,c]=a.split(":",5),d=parseInt(l,10),f=(isNaN(d)?60:d)*1e3;if(!u)s.all=r+f;else for(const h of u.split(";"))h==="metric_bucket"?(!c||c.split(";").includes("custom"))&&(s[h]=r+f):s[h]=r+f}else o?s.all=r+u4(o,r):t===429&&(s.all=r+60*1e3);return s}const ZI=64;function d4(e,t,n=J0(e.bufferSize||ZI)){let r={};const s=o=>n.drain(o);function i(o){const a=[];if(X_(o,(d,f)=>{const h=Q_(f);QI(r,h)?e.recordDroppedEvent("ratelimit_backoff",h):a.push(d)}),a.length===0)return Promise.resolve({});const l=la(o[0],a),u=d=>{X_(l,(f,h)=>{e.recordDroppedEvent(d,Q_(h))})},c=()=>t({body:n5(l)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&je&&Ae.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=JI(r,d),d),d=>{throw u("network_error"),je&&Ae.error("Encountered error running transport request:",d),d});return n.add(c).then(d=>d,d=>{if(d===Q0)return je&&Ae.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw d})}return{send:i,flush:s}}function f4(e,t,n){const r=[{type:"client_report"},{timestamp:kl(),discarded_events:e}];return la(t?{dsn:t}:{},[r])}function eA(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n!=null&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function h4(e){var l;const{trace_id:t,parent_span_id:n,span_id:r,status:s,origin:i,data:o,op:a}=((l=e.contexts)==null?void 0:l.trace)??{};return{data:o??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:s,timestamp:e.timestamp,trace_id:t??"",origin:i,profile_id:o==null?void 0:o[z0],exclusive_time:o==null?void 0:o[lc],measurements:e.measurements,is_segment:!0}}function p4(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&&{[z0]:e.profile_id},...e.exclusive_time&&{[lc]:e.exclusive_time}}}},measurements:e.measurements}}const fk="Not capturing exception because it's already been captured.",hk="Discarded session because of missing or non-string release",tA=Symbol.for("SentryInternalError"),nA=Symbol.for("SentryDoNotSendEventError"),m4=5e3;function Dh(e){return{message:e,[tA]:!0}}function Qg(e){return{message:e,[nA]:!0}}function pk(e){return!!e&&typeof e=="object"&&tA in e}function mk(e){return!!e&&typeof e=="object"&&nA in e}function gk(e,t,n,r,s){let i=0,o,a=!1;e.on(n,()=>{i=0,clearTimeout(o),a=!1}),e.on(t,l=>{i+=r(l),i>=8e5?s(e):a||(a=!0,o=setTimeout(()=>{s(e)},m4))}),e.on("flush",()=>{s(e)})}class g4{constructor(t){var r,s,i;if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=J0(((r=t.transportOptions)==null?void 0:r.bufferSize)??ZI),t.dsn?this._dsn=F3(t.dsn):je&&Ae.warn("No DSN provided, client will not send events."),this._dsn){const o=J5(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:o})}this._options.enableLogs=this._options.enableLogs??((s=this._options._experiments)==null?void 0:s.enableLogs),this._options.enableLogs&&gk(this,"afterCaptureLog","flushLogs",w4,GI),(this._options.enableMetrics??((i=this._options._experiments)==null?void 0:i.enableMetrics)??!0)&&gk(this,"afterCaptureMetric","flushMetrics",b4,YI)}captureException(t,n,r){const s=Zr();if(U_(t))return je&&Ae.log(fk),s;const i={event_id:s,...n};return this._process(()=>this.eventFromException(t,i).then(o=>this._captureEvent(o,i,r)).then(o=>o),"error"),i.event_id}captureMessage(t,n,r,s){const i={event_id:Zr(),...r},o=$0(t)?t:String(t),a=Tu(t),l=a?this.eventFromMessage(o,n,i):this.eventFromException(t,i);return this._process(()=>l.then(u=>this._captureEvent(u,i,s)),a?"unknown":"error"),i.event_id}captureEvent(t,n,r){const s=Zr();if(n!=null&&n.originalException&&U_(n.originalException))return je&&Ae.log(fk),s;const i={event_id:s,...n},o=t.sdkProcessingMetadata||{},a=o.capturedSpanScope,l=o.capturedSpanIsolationScope,u=vk(t.type);return this._process(()=>this._captureEvent(t,i,a||r,l),u),i.event_id}captureSession(t){this.sendSession(t),Pu(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];qI(this,t,this._integrations),n||dk(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=u5(t,this._dsn,this._options._metadata,this._options.tunnel);for(const s of n.attachments||[])r=t5(r,i5(s));this.sendEnvelope(r).then(s=>this.emit("afterSendEvent",t,s))}sendSession(t){const{release:n,environment:r=q0}=this._options;if("aggregates"in t){const i=t.attrs||{};if(!i.release&&!n){je&&Ae.warn(hk);return}i.release=i.release||n,i.environment=i.environment||r,t.attrs=i}else{if(!t.release&&!n){je&&Ae.warn(hk);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const s=l5(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}`;je&&Ae.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 je&&Ae.error("Error while sending envelope:",n),{}}return je&&Ae.error("Transport disabled"),{}}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=t4(this,t),dk(this,t)}_updateSessionFromEvent(t,n){var l,u;let r=n.level==="fatal",s=!1;const i=(l=n.exception)==null?void 0:l.values;if(i){s=!0,r=!1;for(const c of i)if(((u=c.mechanism)==null?void 0:u.handled)===!1){r=!0;break}}const o=t.status==="ok";(o&&t.errors===0||o&&r)&&(Pu(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(),o=Object.keys(this._integrations);return!n.integrations&&(o!=null&&o.length)&&(n.integrations=o),this.emit("preprocessEvent",t,n),t.type||s.setLastEventId(t.event_id||n.event_id),zI(i,t,n,r,this,s).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:v3(r),...a.contexts};const l=MI(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:l,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=Dt(),s=_i()){return je&&Iy(t)&&Ae.log(`Captured error event \`${eA(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,s).then(i=>i.event_id,i=>{je&&(mk(i)?Ae.log(i.message):pk(i)?Ae.warn(i.message):Ae.warn(i))})}_processEvent(t,n,r,s){const i=this.getOptions(),{sampleRate:o}=i,a=rA(t),l=Iy(t),c=`before send for type \`${t.type||"error"}\``,d=typeof o>"u"?void 0:ul(o);if(l&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error"),X0(Qg(`Discarding event because it's not included in the random sample (sampling rate = ${o})`));const f=vk(t.type);return this._prepareEvent(t,n,r,s).then(h=>{if(h===null)throw this.recordDroppedEvent("event_processor",f),Qg("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return h;const m=y4(this,i,h,n);return v4(m,c)}).then(h=>{var y;if(h===null){if(this.recordDroppedEvent("before_send",f),a){const b=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",b)}throw Qg(`${c} returned \`null\`, will not send event.`)}const g=r.getSession()||s.getSession();if(l&&g&&this._updateSessionFromEvent(g,h),a){const w=((y=h.sdkProcessingMetadata)==null?void 0:y.spanCountBeforeProcessing)||0,b=h.spans?h.spans.length:0,S=w-b;S>0&&this.recordDroppedEvent("before_send","span",S)}const m=h.transaction_info;if(a&&m&&h.transaction!==t.transaction){const w="custom";h.transaction_info={...m,source:w}}return this.sendEvent(h,n),h}).then(null,h=>{throw mk(h)||pk(h)?h:(this.captureException(h,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:h}),Dh(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
45
|
+
Reason: ${h}`))})}_process(t,n){this._numProcessing++,this._promiseBuffer.add(t).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===Q0&&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(){je&&Ae.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){je&&Ae.log("No outcomes to send");return}if(!this._dsn){je&&Ae.log("No dsn provided, will not send outcomes");return}je&&Ae.log("Sending outcomes:",t);const n=f4(t,this._options.tunnel&&uc(this._dsn));this.sendEnvelope(n)}}function vk(e){return e==="replay_event"?"replay":e||"error"}function v4(e,t){const n=`${t} must return \`null\` or a valid event.`;if(ic(e))return e.then(r=>{if(!kd(r)&&r!==null)throw Dh(n);return r},r=>{throw Dh(`${t} rejected with ${r}`)});if(!kd(e)&&e!==null)throw Dh(n);return e}function y4(e,t,n,r){const{beforeSend:s,beforeSendTransaction:i,beforeSendSpan:o,ignoreSpans:a}=t;let l=n;if(Iy(l)&&s)return s(l,r);if(rA(l)){if(o||a){const u=h4(l);if(a!=null&&a.length&&xp(u,a))return null;if(o){const c=o(u);c?l=df(n,p4(c)):Cy()}if(l.spans){const c=[],d=l.spans;for(const h of d){if(a!=null&&a.length&&xp(h,a)){K3(d,h);continue}if(o){const g=o(h);g?c.push(g):(Cy(),c.push(h))}else c.push(h)}const f=l.spans.length-c.length;f&&e.recordDroppedEvent("before_send","span",f),l.spans=c}}if(i){if(l.spans){const u=l.spans.length;l.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:u}}return i(l,r)}}return l}function Iy(e){return e.type===void 0}function rA(e){return e.type==="transaction"}function b4(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+sA(e.attributes)}function w4(e){let t=0;return e.message&&(t+=e.message.length*2),t+sA(e.attributes)}function sA(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*yk(n[0]):Tu(n)?t+=yk(n):t+=100}),t}function yk(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function S4(e,t){t.debug===!0&&(je?Ae.enable():co(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Dt().update(t.initialScope);const r=new e(t);return _4(r),r.init(),r}function _4(e){Dt().setClient(e)}const k4="thismessage:/";function Z0(e){return"isRelative"in e}function e1(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=n?k4: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 x4(e){if(Z0(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 Qa(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 E4(e){return e.split(/[?#]/,1)[0]}function C4(e,t){const n=t==null?void 0:t.getDsn(),r=t==null?void 0:t.getOptions().tunnel;return R4(e,n)||T4(e,r)}function T4(e,t){return t?bk(e)===bk(t):!1}function R4(e,t){const n=e1(e);return!n||Z0(n)?!1:t?n.host.includes(t.host)&&/(^|&|\?)sentry_key=/.test(n.search):!1}function bk(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function P4(e){var t;"aggregates"in e?((t=e.attrs)==null?void 0:t.ip_address)===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function iA(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:Ka})),version:Ka}),e._metadata=s}function oA(e={}){const t=e.client||mt();if(!q5()||!t)return{};const n=_l(),r=ac(n);if(r.getTraceData)return r.getTraceData(e);const s=e.scope||Dt(),i=e.span||er(),o=i?z3(i):I4(s),a=i?oo(i):MI(t,s),l=C3(a);if(!EI.test(o))return Ae.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const c={"sentry-trace":o,baggage:l};return e.propagateTraceparent&&(c.traceparent=i?H3(i):A4(s)),c}function I4(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return CI(t,r,n)}function A4(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return TI(t,r,n)}function O4(e,t,n){let r,s,i;const o=n!=null&&n.maxWait?Math.max(n.maxWait,t):0,a=(n==null?void 0:n.setTimeoutImpl)||setTimeout;function l(){return u(),r=e(),r}function u(){s!==void 0&&clearTimeout(s),i!==void 0&&clearTimeout(i),s=i=void 0}function c(){return s!==void 0||i!==void 0?l():r}function d(){return s&&clearTimeout(s),s=a(l,t),o&&i===void 0&&(i=a(l,o)),r}return d.cancel=u,d.flush=c,d}const D4=100;function Jo(e,t){const n=mt(),r=_i();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:i=D4}=n.getOptions();if(i<=0)return;const a={timestamp:kl(),...e},l=s?co(()=>s(a,t)):a;l!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",l,t),r.addBreadcrumb(l,i))}let wk;const M4="FunctionToString",Sk=new WeakMap,L4=()=>({name:M4,setupOnce(){wk=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=V0(this),n=Sk.has(mt())&&t!==void 0?t:this;return wk.apply(n,e)}}catch{}},setup(e){Sk.set(e,!0)}}),F4=L4,$4=[/^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$/],N4="EventFilters",B4=(e={})=>{let t;return{name:N4,setup(n){const r=n.getOptions();t=_k(e,r)},processEvent(n,r,s){if(!t){const i=s.getOptions();t=_k(e,i)}return U4(n,t)?null:n}}},V4=(e={})=>({...B4(e),name:"InboundFilters"});function _k(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:$4],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function U4(e,t){if(e.type){if(e.type==="transaction"&&H4(e,t.ignoreTransactions))return je&&Ae.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
46
|
+
Event: ${Ea(e)}`),!0}else{if(z4(e,t.ignoreErrors))return je&&Ae.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
47
|
+
Event: ${Ea(e)}`),!0;if(G4(e))return je&&Ae.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
48
|
+
Event: ${Ea(e)}`),!0;if(j4(e,t.denyUrls))return je&&Ae.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
49
|
+
Event: ${Ea(e)}.
|
|
50
|
+
Url: ${Ep(e)}`),!0;if(!W4(e,t.allowUrls))return je&&Ae.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
51
|
+
Event: ${Ea(e)}.
|
|
52
|
+
Url: ${Ep(e)}`),!0}return!1}function z4(e,t){return t!=null&&t.length?eA(e).some(n=>Wi(n,t)):!1}function H4(e,t){if(!(t!=null&&t.length))return!1;const n=e.transaction;return n?Wi(n,t):!1}function j4(e,t){if(!(t!=null&&t.length))return!1;const n=Ep(e);return n?Wi(n,t):!1}function W4(e,t){if(!(t!=null&&t.length))return!0;const n=Ep(e);return n?Wi(n,t):!0}function q4(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 Ep(e){var t,n;try{const r=[...((t=e.exception)==null?void 0:t.values)??[]].reverse().find(i=>{var o,a,l;return((o=i.mechanism)==null?void 0:o.parent_id)===void 0&&((l=(a=i.stacktrace)==null?void 0:a.frames)==null?void 0:l.length)}),s=(n=r==null?void 0:r.stacktrace)==null?void 0:n.frames;return s?q4(s):null}catch{return je&&Ae.error(`Cannot extract url for event ${Ea(e)}`),null}}function G4(e){var t,n;return(n=(t=e.exception)==null?void 0:t.values)!=null&&n.length?!e.message&&!e.exception.values.some(r=>r.stacktrace||r.type&&r.type!=="Error"||r.value):!1}function K4(e,t,n,r,s,i){var a;if(!((a=s.exception)!=null&&a.values)||!i||!ro(i.originalException,Error))return;const o=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;o&&(s.exception.values=Ay(e,t,r,i.originalException,n,s.exception.values,o,0))}function Ay(e,t,n,r,s,i,o,a){if(i.length>=n+1)return i;let l=[...i];if(ro(r[s],Error)){kk(o,a);const u=e(t,r[s]),c=l.length;xk(u,s,c,a),l=Ay(e,t,n,r[s],s,[u,...l],u,c)}return Array.isArray(r.errors)&&r.errors.forEach((u,c)=>{if(ro(u,Error)){kk(o,a);const d=e(t,u),f=l.length;xk(d,`errors[${c}]`,f,a),l=Ay(e,t,n,u,s,[d,...l],d,f)}}),l}function kk(e,t){e.mechanism={handled:!0,type:"auto.core.linked_errors",...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function xk(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function Y4(e){const t="console";ia(t,e),oa(t,X4)}function X4(){"console"in pt&&$U.forEach(function(e){e in pt.console&&Lr(pt.console,e,function(t){return Sp[e]=t,function(...n){ms("console",{args:n,level:e});const s=Sp[e];s==null||s.apply(pt.console,n)}})})}function aA(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const Q4="Dedupe",J4=()=>{let e;return{name:Q4,processEvent(t){if(t.type)return t;try{if(ez(t,e))return je&&Ae.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},Z4=J4;function ez(e,t){return t?!!(tz(e,t)||nz(e,t)):!1}function tz(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!uA(e,t)||!lA(e,t))}function nz(e,t){const n=Ek(t),r=Ek(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!uA(e,t)||!lA(e,t))}function lA(e,t){let n=L_(e),r=L_(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s<r.length;s++){const i=r[s],o=n[s];if(i.filename!==o.filename||i.lineno!==o.lineno||i.colno!==o.colno||i.function!==o.function)return!1}return!0}function uA(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 Ek(e){var t,n;return(n=(t=e.exception)==null?void 0:t.values)==null?void 0:n[0]}function rz(e,t,n,r,s){if(!e.fetchData)return;const{method:i,url:o}=e.fetchData,a=gs()&&t(o);if(e.endTimestamp&&a){const h=e.fetchData.__span;if(!h)return;const g=r[h];g&&(oz(g,e),sz(g,e,s),delete r[h]);return}const{spanOrigin:l="auto.http.browser",propagateTraceparent:u=!1}=typeof s=="object"?s:{spanOrigin:s},c=!!er(),d=a&&c?Qo(lz(o,i,l)):new Xo;if(e.fetchData.__span=d.spanContext().spanId,r[d.spanContext().spanId]=d,n(e.fetchData.url)){const h=e.args[0],g=e.args[1]||{},m=iz(h,g,gs()&&c?d:void 0,u);m&&(e.args[1]=g,g.headers=m)}const f=mt();if(f){const h={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};f.emit("beforeOutgoingRequestSpan",d,h)}return d}function sz(e,t,n){var s;const r=typeof n=="object"&&n!==null?n.onRequestSpanEnd:void 0;r==null||r(e,{headers:(s=t.response)==null?void 0:s.headers,error:t.error})}function iz(e,t,n,r){const s=oA({span:n,propagateTraceparent:r}),i=s["sentry-trace"],o=s.baggage,a=s.traceparent;if(!i)return;const l=t.headers||(N0(e)?e.headers:void 0);if(l)if(az(l)){const u=new Headers(l);if(u.get("sentry-trace")||u.set("sentry-trace",i),r&&a&&!u.get("traceparent")&&u.set("traceparent",a),o){const c=u.get("baggage");c?Vf(c)||u.set("baggage",`${c},${o}`):u.set("baggage",o)}return u}else if(Array.isArray(l)){const u=[...l];l.find(d=>d[0]==="sentry-trace")||u.push(["sentry-trace",i]),r&&a&&!l.find(d=>d[0]==="traceparent")&&u.push(["traceparent",a]);const c=l.find(d=>d[0]==="baggage"&&Vf(d[1]));return o&&!c&&u.push(["baggage",o]),u}else{const u="sentry-trace"in l?l["sentry-trace"]:void 0,c="traceparent"in l?l.traceparent:void 0,d="baggage"in l?l.baggage:void 0,f=d?Array.isArray(d)?[...d]:[d]:[],h=d&&(Array.isArray(d)?d.find(m=>Vf(m)):Vf(d));o&&!h&&f.push(o);const g={...l,"sentry-trace":u??i,baggage:f.length>0?f.join(","):void 0};return r&&a&&!c&&(g.traceparent=a),g}else return{...s}}function oz(e,t){var n,r;if(t.response){wI(e,t.response.status);const s=(r=(n=t.response)==null?void 0:n.headers)==null?void 0:r.get("content-length");if(s){const i=parseInt(s);i>0&&e.setAttribute("http.response_content_length",i)}}else t.error&&e.setStatus({code:Dn,message:"internal_error"});e.end()}function Vf(e){return e.split(",").some(t=>t.trim().startsWith(j0))}function az(e){return typeof Headers<"u"&&ro(e,Headers)}function lz(e,t,n){const r=e1(e);return{name:r?`${t} ${x4(r)}`:t,attributes:uz(e,r,t,n)}}function uz(e,t,n,r){const s={url:e,type:"fetch","http.method":n,[dn]:r,[io]:"http.client"};return t&&(Z0(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 cA(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const Cd=pt;function cz(){return"history"in Cd&&!!Cd.history}function dz(){if(!("fetch"in Cd))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function Oy(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function fz(){var n;if(typeof EdgeRuntime=="string")return!0;if(!dz())return!1;if(Oy(Cd.fetch))return!0;let e=!1;const t=Cd.document;if(t&&typeof t.createElement=="function")try{const r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r),(n=r.contentWindow)!=null&&n.fetch&&(e=Oy(r.contentWindow.fetch)),t.head.removeChild(r)}catch(r){je&&Ae.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}function dA(e,t){const n="fetch";ia(n,e),oa(n,()=>fA(void 0,t))}function hz(e){const t="fetch-body-resolved";ia(t,e),oa(t,()=>fA(mz))}function fA(e,t=!1){t&&!fz()||Lr(pt,"fetch",function(n){return function(...r){const s=new Error,{method:i,url:o}=gz(r),a={args:r,fetchData:{method:i,url:o},startTimestamp:_n()*1e3,virtualError:s,headers:vz(r)};return e||ms("fetch",{...a}),n.apply(pt,r).then(async l=>(e?e(l):ms("fetch",{...a,endTimestamp:_n()*1e3,response:l}),l),l=>{if(ms("fetch",{...a,endTimestamp:_n()*1e3,error:l}),F0(l)&&l.stack===void 0&&(l.stack=s.stack,es(l,"framesToPop",1)),l instanceof TypeError&&(l.message==="Failed to fetch"||l.message==="Load failed"||l.message==="NetworkError when attempting to fetch resource."))try{const u=new URL(a.fetchData.url);l.message=`${l.message} (${u.host})`}catch{}throw l})}})}async function pz(e,t){if(e!=null&&e.body){const n=e.body,r=n.getReader(),s=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let i=!0;for(;i;){let o;try{o=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:a}=await r.read();clearTimeout(o),a&&(t(),i=!1)}catch{i=!1}finally{clearTimeout(o)}}clearTimeout(s),r.releaseLock(),n.cancel().then(null,()=>{})}}function mz(e){let t;try{t=e.clone()}catch{return}pz(t,()=>{ms("fetch-body-resolved",{endTimestamp:_n()*1e3,response:e})})}function Mh(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Ck(e){return typeof e=="string"?e:e?Mh(e,"url")?e.url:e.toString?e.toString():"":""}function gz(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:Ck(n),method:Mh(r,"method")?String(r.method).toUpperCase():N0(n)&&Mh(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:Ck(t),method:Mh(t,"method")?String(t.method).toUpperCase():"GET"}}function vz(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(N0(t))return new Headers(t.headers)}catch{}}function yz(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function bz(){return"npm"}function wz(){return!yz()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function Dy(){return typeof window<"u"&&(!wz()||Sz())}function Sz(){const e=pt.process;return(e==null?void 0:e.type)==="renderer"}const Et=pt;let My=0;function hA(){return My>0}function _z(){My++,setTimeout(()=>{My--})}function Ou(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(V0(e))return e}catch{return e}const r=function(...s){try{const i=s.map(o=>Ou(o,t));return e.apply(this,i)}catch(i){throw _z(),Dm(o=>{o.addEventProcessor(a=>(t.mechanism&&(ky(a,void 0),Ru(a,t.mechanism)),a.extra={...a.extra,arguments:s},a)),gi(i)}),i}};try{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}mI(r,e),es(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function t1(){const e=oc(),{referrer:t}=Et.document||{},{userAgent:n}=Et.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}function n1(e,t){const n=r1(e,t),r={type:Tz(t),value:Rz(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function kz(e,t,n,r){const s=mt(),i=s==null?void 0:s.getOptions().normalizeDepth,o=Dz(t),a={__serialized__:LI(t,i)};if(o)return{exception:{values:[n1(e,o)]},extra:a};const l={exception:{values:[{type:Om(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Az(t,{isUnhandledRejection:r})}]},extra:a};if(n){const u=r1(e,n);u.length&&(l.exception.values[0].stacktrace={frames:u})}return l}function Jg(e,t){return{exception:{values:[n1(e,t)]}}}function r1(e,t){const n=t.stacktrace||t.stack||"",r=Ez(t),s=Cz(t);try{return e(n,r,s)}catch{}return[]}const xz=/Minified React error #\d+;/i;function Ez(e){return e&&xz.test(e.message)?1:0}function Cz(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function pA(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function Tz(e){const t=e==null?void 0:e.name;return!t&&pA(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function Rz(e){const t=e==null?void 0:e.message;return pA(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 Pz(e,t,n,r){const s=(n==null?void 0:n.syntheticException)||void 0,i=s1(e,t,s,r);return Ru(i),i.level="error",n!=null&&n.event_id&&(i.event_id=n.event_id),Lm(i)}function Iz(e,t,n="info",r,s){const i=(r==null?void 0:r.syntheticException)||void 0,o=Ly(e,t,i,s);return o.level=n,r!=null&&r.event_id&&(o.event_id=r.event_id),Lm(o)}function s1(e,t,n,r,s){let i;if(fI(t)&&t.error)return Jg(e,t.error);if($_(t)||KU(t)){const o=t;if("stack"in t)i=Jg(e,t);else{const a=o.name||($_(o)?"DOMError":"DOMException"),l=o.message?`${a}: ${o.message}`:a;i=Ly(e,l,n,r),ky(i,l)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return F0(t)?Jg(e,t):kd(t)||Om(t)?(i=kz(e,t,n,s),Ru(i,{synthetic:!0}),i):(i=Ly(e,t,n,r),ky(i,`${t}`),Ru(i,{synthetic:!0}),i)}function Ly(e,t,n,r){const s={};if(r&&n){const i=r1(e,n);i.length&&(s.exception={values:[{value:t,stacktrace:{frames:i}}]}),Ru(s,{synthetic:!0})}if($0(t)){const{__sentry_template_string__:i,__sentry_template_values__:o}=t;return s.logentry={message:i,params:o},s}return s.message=t,s}function Az(e,{isUnhandledRejection:t}){const n=e3(e),r=t?"promise rejection":"exception";return fI(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Om(e)?`Event \`${Oz(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Oz(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Dz(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}class Mz extends g4{constructor(t){var c;const n=Lz(t),r=Et.SENTRY_SDK_SOURCE||bz();iA(n,"browser",["browser"],r),(c=n._metadata)!=null&&c.sdk&&(n._metadata.sdk.settings={infer_ip:n.sendDefaultPii?"auto":"never",...n._metadata.sdk.settings}),super(n);const{sendDefaultPii:s,sendClientReports:i,enableLogs:o,_experiments:a,enableMetrics:l}=this._options,u=l??(a==null?void 0:a.enableMetrics)??!0;Et.document&&(i||o||u)&&Et.document.addEventListener("visibilitychange",()=>{Et.document.visibilityState==="hidden"&&(i&&this._flushOutcomes(),o&&GI(this),u&&YI(this))}),s&&this.on("beforeSendSession",P4)}eventFromException(t,n){return Pz(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return Iz(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 Lz(e){var t;return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:(t=Et.SENTRY_RELEASE)==null?void 0:t.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const cl=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ze=pt,Fz=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",pf=(e,t,n,r)=>{let s,i;return o=>{t.value>=0&&(o||r)&&(i=t.value-(s??0),(i||s===void 0)&&(s=t.value,t.delta=i,t.rating=Fz(t.value,n),e(t)))}},mf=(e=!0)=>{var n,r;const t=(r=(n=Ze.performance)==null?void 0:n.getEntriesByType)==null?void 0:r.call(n,"navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},cc=()=>{const e=mf();return(e==null?void 0:e.activationStart)??0};function Ja(e,t,n){Ze.document&&Ze.addEventListener(e,t,n)}function i1(e,t,n){Ze.document&&Ze.removeEventListener(e,t,n)}let nu=-1;const mA=new Set,$z=()=>{var e,t;return((e=Ze.document)==null?void 0:e.visibilityState)==="hidden"&&!((t=Ze.document)!=null&&t.prerendering)?0:1/0},Lh=e=>{if(Nz(e)&&nu>-1){if(e.type==="visibilitychange"||e.type==="pagehide")for(const t of mA)t();isFinite(nu)||(nu=e.type==="visibilitychange"?e.timeStamp:0,i1("prerenderingchange",Lh,!0))}},gf=()=>{var e;if(Ze.document&&nu<0){const t=cc();nu=(Ze.document.prerendering||(e=globalThis.performance.getEntriesByType("visibility-state").filter(r=>r.name==="hidden"&&r.startTime>t)[0])==null?void 0:e.startTime)??$z(),Ja("visibilitychange",Lh,!0),Ja("pagehide",Lh,!0),Ja("prerenderingchange",Lh,!0)}return{get firstHiddenTime(){return nu},onHidden(t){mA.add(t)}}};function Nz(e){var t;return e.type==="pagehide"||((t=Ze.document)==null?void 0:t.visibilityState)==="hidden"}const Bz=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,vf=(e,t=-1)=>{var i,o;const n=mf();let r="navigate";return n&&((i=Ze.document)!=null&&i.prerendering||cc()>0?r="prerender":(o=Ze.document)!=null&&o.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:Bz(),navigationType:r}},Zg=new WeakMap;function o1(e,t){return Zg.get(e)||Zg.set(e,new t),Zg.get(e)}class Cp{constructor(){Cp.prototype.__init.call(this),Cp.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(t){var s;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]),(s=this._onAfterProcessingUnexpectedShift)==null||s.call(this,t)}}const dc=(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{}},a1=e=>{let t=!1;return()=>{t||(e(),t=!0)}},Fm=e=>{var t;(t=Ze.document)!=null&&t.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},Vz=[1800,3e3],Uz=(e,t={})=>{Fm(()=>{const n=gf(),r=vf("FCP");let s;const o=dc("paint",a=>{for(const l of a)l.name==="first-contentful-paint"&&(o.disconnect(),l.startTime<n.firstHiddenTime&&(r.value=Math.max(l.startTime-cc(),0),r.entries.push(l),s(!0)))});o&&(s=pf(e,r,Vz,t.reportAllChanges))})},zz=[.1,.25],Hz=(e,t={})=>{Uz(a1(()=>{var l;const n=vf("CLS",0);let r;const s=gf(),i=o1(t,Cp),o=u=>{for(const c of u)i._processEntry(c);i._sessionValue>n.value&&(n.value=i._sessionValue,n.entries=i._sessionEntries,r())},a=dc("layout-shift",o);a&&(r=pf(e,n,zz,t.reportAllChanges),s.onHidden(()=>{o(a.takeRecords()),r(!0)}),(l=Ze==null?void 0:Ze.setTimeout)==null||l.call(Ze,r))}))};let gA=0,ev=1/0,Uf=0;const jz=e=>{e.forEach(t=>{t.interactionId&&(ev=Math.min(ev,t.interactionId),Uf=Math.max(Uf,t.interactionId),gA=Uf?(Uf-ev)/7+1:0)})};let Fy;const vA=()=>Fy?gA:performance.interactionCount||0,Wz=()=>{"interactionCount"in performance||Fy||(Fy=dc("event",jz,{type:"event",buffered:!0,durationThreshold:0}))},tv=10;let yA=0;const qz=()=>vA()-yA;class Tp{constructor(){Tp.prototype.__init.call(this),Tp.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){yA=vA(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor(qz()/50));return this._longestInteractionList[t]}_processEntry(t){var s,i;if((s=this._onBeforeProcessingEntry)==null||s.call(this,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<tv||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((o,a)=>a._latency-o._latency),this._longestInteractionList.length>tv){const o=this._longestInteractionList.splice(tv);for(const a of o)this._longestInteractionMap.delete(a.id)}(i=this._onAfterProcessingINPCandidate)==null||i.call(this,r)}}}const bA=e=>{const t=n=>{var r;(n.type==="pagehide"||((r=Ze.document)==null?void 0:r.visibilityState)==="hidden")&&e(n)};Ja("visibilitychange",t,!0),Ja("pagehide",t,!0)},wA=e=>{var n;const t=Ze.requestIdleCallback||Ze.setTimeout;((n=Ze.document)==null?void 0:n.visibilityState)==="hidden"?e():(e=a1(e),Ja("visibilitychange",e,{once:!0,capture:!0}),t(()=>{e(),i1("visibilitychange",e,{capture:!0})}),bA(e))},Gz=[200,500],Kz=40,Yz=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return;const n=gf();Fm(()=>{Wz();const r=vf("INP");let s;const i=o1(t,Tp),o=l=>{wA(()=>{for(const c of l)i._processEntry(c);const u=i._estimateP98LongestInteraction();u&&u._latency!==r.value&&(r.value=u._latency,r.entries=u.entries,s())})},a=dc("event",o,{durationThreshold:t.durationThreshold??Kz});s=pf(e,r,Gz,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{o(a.takeRecords()),s(!0)}))})};class Xz{_processEntry(t){var n;(n=this._onBeforeProcessingEntry)==null||n.call(this,t)}}const Qz=[2500,4e3],Jz=(e,t={})=>{Fm(()=>{const n=gf(),r=vf("LCP");let s;const i=o1(t,Xz),o=l=>{t.reportAllChanges||(l=l.slice(-1));for(const u of l)i._processEntry(u),u.startTime<n.firstHiddenTime&&(r.value=Math.max(u.startTime-cc(),0),r.entries=[u],s())},a=dc("largest-contentful-paint",o);if(a){s=pf(e,r,Qz,t.reportAllChanges);const l=a1(()=>{o(a.takeRecords()),a.disconnect(),s(!0)}),u=c=>{c.isTrusted&&(wA(l),i1(c.type,u,{capture:!0}))};for(const c of["keydown","click","visibilitychange"])Ja(c,u,{capture:!0})}})},Zz=[800,1800],$y=e=>{var t,n;(t=Ze.document)!=null&&t.prerendering?Fm(()=>$y(e)):((n=Ze.document)==null?void 0:n.readyState)!=="complete"?addEventListener("load",()=>$y(e),!0):setTimeout(e)},eH=(e,t={})=>{const n=vf("TTFB"),r=pf(e,n,Zz,t.reportAllChanges);$y(()=>{const s=mf();s&&(n.value=Math.max(s.responseStart-cc(),0),n.entries=[s],r(!0))})},ed={},Rp={};let SA,_A,kA,xA;function l1(e,t=!1){return $m("cls",e,nH,SA,t)}function u1(e,t=!1){return $m("lcp",e,rH,_A,t)}function tH(e){return $m("ttfb",e,sH,kA)}function EA(e){return $m("inp",e,iH,xA)}function dl(e,t){return CA(e,t),Rp[e]||(oH(e),Rp[e]=!0),TA(e,t)}function yf(e,t){const n=ed[e];if(n!=null&&n.length)for(const r of n)try{r(t)}catch(s){cl&&Ae.error(`Error while triggering instrumentation handler.
|
|
53
|
+
Type: ${e}
|
|
54
|
+
Name: ${no(r)}
|
|
55
|
+
Error:`,s)}}function nH(){return Hz(e=>{yf("cls",{metric:e}),SA=e},{reportAllChanges:!0})}function rH(){return Jz(e=>{yf("lcp",{metric:e}),_A=e},{reportAllChanges:!0})}function sH(){return eH(e=>{yf("ttfb",{metric:e}),kA=e})}function iH(){return Yz(e=>{yf("inp",{metric:e}),xA=e})}function $m(e,t,n,r,s=!1){CA(e,t);let i;return Rp[e]||(i=n(),Rp[e]=!0),r&&t({metric:r}),TA(e,t,s?i:void 0)}function oH(e){const t={};e==="event"&&(t.durationThreshold=0),dc(e,n=>{yf(e,{entries:n})},t)}function CA(e,t){ed[e]=ed[e]||[],ed[e].push(t)}function TA(e,t,n){return()=>{n&&n();const r=ed[e];if(!r)return;const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}function aH(e){return"duration"in e}function nv(e){return typeof e=="number"&&isFinite(e)}function Zo(e,t,n,{...r}){const s=bt(e).start_timestamp;return s&&s>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),K0(e,()=>{const i=Qo({startTime:t,...r});return i&&i.end(n),i})}function c1(e){var y;const t=mt();if(!t)return;const{name:n,transaction:r,attributes:s,startTime:i}=e,{release:o,environment:a,sendDefaultPii:l}=t.getOptions(),u=t.getIntegrationByName("Replay"),c=u==null?void 0:u.getReplayId(),d=Dt(),f=d.getUser(),h=f!==void 0?f.email||f.id||f.ip_address:void 0;let g;try{g=d.getScopeData().contexts.profile.profile_id}catch{}const m={release:o,environment:a,user:h||void 0,profile_id:g||void 0,replay_id:c||void 0,transaction:r,"user_agent.original":(y=Ze.navigator)==null?void 0:y.userAgent,"client.address":l?"{{auto}}":void 0,...s};return Qo({name:n,attributes:m,startTime:i,experimental:{standalone:!0}})}function bf(){return Ze.addEventListener&&Ze.performance}function vn(e){return e/1e3}function lH(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 RA(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function PA(e,t){let n,r=!1;function s(a){!r&&n&&t(a,n),r=!0}bA(()=>{s("pagehide")});const i=e.on("beforeStartNavigationSpan",(a,l)=>{l!=null&&l.isRedirect||(s("navigation"),i(),o())}),o=e.on("afterStartPageLoadSpan",a=>{n=a.spanContext().spanId,o()})}function uH(e){let t=0,n;if(!RA("layout-shift"))return;const r=l1(({metric:s})=>{const i=s.entries[s.entries.length-1];i&&(t=s.value,n=i)},!0);PA(e,(s,i)=>{cH(t,n,i,s),r()})}function cH(e,t,n,r){var u;cl&&Ae.log(`Sending CLS span (${e})`);const s=t?vn((qr()||0)+t.startTime):_n(),i=Dt().getScopeData().transactionName,o=t?Hr((u=t.sources[0])==null?void 0:u.node):"Layout shift",a={[dn]:"auto.http.browser.cls",[io]:"ui.webvital.cls",[lc]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t!=null&&t.sources&&t.sources.forEach((c,d)=>{a[`cls.source.${d+1}`]=Hr(c.node)});const l=c1({name:o,transaction:i,attributes:a,startTime:s});l&&(l.addEvent("cls",{[ff]:"",[hf]:e}),l.end(s))}function dH(e){let t=0,n;if(!RA("largest-contentful-paint"))return;const r=u1(({metric:s})=>{const i=s.entries[s.entries.length-1];i&&(t=s.value,n=i)},!0);PA(e,(s,i)=>{fH(t,n,i,s),r()})}function fH(e,t,n,r){cl&&Ae.log(`Sending LCP span (${e})`);const s=vn((qr()||0)+((t==null?void 0:t.startTime)||0)),i=Dt().getScopeData().transactionName,o=t?Hr(t.element):"Largest contentful paint",a={[dn]:"auto.http.browser.lcp",[io]:"ui.webvital.lcp",[lc]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(a["lcp.element"]=Hr(t.element)),t.id&&(a["lcp.id"]=t.id),t.url&&(a["lcp.url"]=t.url),t.loadTime!=null&&(a["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(a["lcp.renderTime"]=t.renderTime),t.size!=null&&(a["lcp.size"]=t.size));const l=c1({name:o,transaction:i,attributes:a,startTime:s});l&&(l.addEvent("lcp",{[ff]:"millisecond",[hf]:e}),l.end(s))}function ss(e){return e&&((qr()||performance.timeOrigin)+e)/1e3}function IA(e){var n;const t={};if(e.nextHopProtocol!=null){const{name:r,version:s}=lH(e.nextHopProtocol);t["network.protocol.version"]=s,t["network.protocol.name"]=r}return qr()||(n=bf())!=null&&n.timeOrigin?hH({...t,"http.request.redirect_start":ss(e.redirectStart),"http.request.redirect_end":ss(e.redirectEnd),"http.request.worker_start":ss(e.workerStart),"http.request.fetch_start":ss(e.fetchStart),"http.request.domain_lookup_start":ss(e.domainLookupStart),"http.request.domain_lookup_end":ss(e.domainLookupEnd),"http.request.connect_start":ss(e.connectStart),"http.request.secure_connection_start":ss(e.secureConnectionStart),"http.request.connection_end":ss(e.connectEnd),"http.request.request_start":ss(e.requestStart),"http.request.response_start":ss(e.responseStart),"http.request.response_end":ss(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?e.responseStart/1e3:void 0}):t}function hH(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}const pH=2147483647;let Tk=0,Ds={},Ir,Wl;function mH({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=bf();if(r&&qr()){r.mark&&Ze.performance.mark("sentry-tracing-init");const s=t?dH(n):wH(),i=SH(),o=e?uH(n):bH();return()=>{s==null||s(),i(),o==null||o()}}return()=>{}}function gH(){dl("longtask",({entries:e})=>{const t=er();if(!t)return;const{op:n,start_timestamp:r}=bt(t);for(const s of e){const i=vn(qr()+s.startTime),o=vn(s.duration);n==="navigation"&&r&&i<r||Zo(t,i,i+o,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[dn]:"auto.ui.browser.metrics"}})}})}function vH(){new PerformanceObserver(t=>{const n=er();if(n)for(const r of t.getEntries()){if(!r.scripts[0])continue;const s=vn(qr()+r.startTime),{start_timestamp:i,op:o}=bt(n);if(o==="navigation"&&i&&s<i)continue;const a=vn(r.duration),l={[dn]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:c,invokerType:d,sourceURL:f,sourceFunctionName:h,sourceCharPosition:g}=u;l["browser.script.invoker"]=c,l["browser.script.invoker_type"]=d,f&&(l["code.filepath"]=f),h&&(l["code.function"]=h),g!==-1&&(l["browser.script.source_char_position"]=g),Zo(n,s,s+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:l})}}).observe({type:"long-animation-frame",buffered:!0})}function yH(){dl("event",({entries:e})=>{const t=er();if(t){for(const n of e)if(n.name==="click"){const r=vn(qr()+n.startTime),s=vn(n.duration),i={name:Hr(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[dn]:"auto.ui.browser.metrics"}},o=pI(n.target);o&&(i.attributes["ui.component_name"]=o),Zo(t,r,r+s,i)}}})}function bH(){return l1(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Ds.cls={value:e.value,unit:""},Wl=t)},!0)}function wH(){return u1(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Ds.lcp={value:e.value,unit:"millisecond"},Ir=t)},!0)}function SH(){return tH(({metric:e})=>{e.entries[e.entries.length-1]&&(Ds.ttfb={value:e.value,unit:"millisecond"})})}function _H(e,t){const n=bf(),r=qr();if(!(n!=null&&n.getEntries)||!r)return;const s=vn(r),i=n.getEntries(),{op:o,start_timestamp:a}=bt(e);i.slice(Tk).forEach(l=>{const u=vn(l.startTime),c=vn(Math.max(0,l.duration));if(!(o==="navigation"&&a&&s+u<a))switch(l.entryType){case"navigation":{CH(e,l,s);break}case"mark":case"paint":case"measure":{xH(e,l,u,c,s,t.ignorePerformanceApiSpans);const d=gf(),f=l.startTime<d.firstHiddenTime;l.name==="first-paint"&&f&&(Ds.fp={value:l.startTime,unit:"millisecond"}),l.name==="first-contentful-paint"&&f&&(Ds.fcp={value:l.startTime,unit:"millisecond"});break}case"resource":{PH(e,l,l.name,u,c,s,t.ignoreResourceSpans);break}}}),Tk=Math.max(i.length-1,0),IH(e),o==="pageload"&&(DH(Ds),t.recordClsOnPageloadSpan||delete Ds.cls,t.recordLcpOnPageloadSpan||delete Ds.lcp,Object.entries(Ds).forEach(([l,u])=>{h5(l,u.value,u.unit)}),e.setAttribute("performance.timeOrigin",s),e.setAttribute("performance.activationStart",cc()),AH(e,t)),Ir=void 0,Wl=void 0,Ds={}}function kH(e){if((e==null?void 0:e.entryType)==="measure")try{return e.detail.devtools.track==="Components ⚛"}catch{return}}function xH(e,t,n,r,s,i){if(kH(t)||["mark","measure"].includes(t.entryType)&&Wi(t.name,i))return;const o=mf(!1),a=vn(o?o.requestStart:0),l=s+Math.max(n,a),u=s+n,c=u+r,d={[dn]:"auto.resource.browser.metrics"};l!==u&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=l),EH(d,t),l<=c&&Zo(e,l,c,{name:t.name,op:t.entryType,attributes:d})}function EH(e,t){try{const n=t.detail;if(!n)return;if(typeof n=="object"){for(const[r,s]of Object.entries(n))if(s&&Tu(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(Tu(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function CH(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{zf(e,t,r,n)}),zf(e,t,"secureConnection",n,"TLS/SSL"),zf(e,t,"fetch",n,"cache"),zf(e,t,"domainLookup",n,"DNS"),RH(e,t,n)}function zf(e,t,n,r,s=n){const i=TH(n),o=t[i],a=t[`${n}Start`];!a||!o||Zo(e,r+vn(a),r+vn(o),{op:`browser.${s}`,name:t.name,attributes:{[dn]:"auto.ui.browser.metrics",...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function TH(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function RH(e,t,n){const r=n+vn(t.requestStart),s=n+vn(t.responseEnd),i=n+vn(t.responseStart);t.responseEnd&&(Zo(e,r,s,{op:"browser.request",name:t.name,attributes:{[dn]:"auto.ui.browser.metrics"}}),Zo(e,i,s,{op:"browser.response",name:t.name,attributes:{[dn]:"auto.ui.browser.metrics"}}))}function PH(e,t,n,r,s,i,o){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const a=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(o!=null&&o.includes(a))return;const l={[dn]:"auto.resource.browser.metrics"},u=Qa(n);u.protocol&&(l["url.scheme"]=u.protocol.split(":").pop()),u.host&&(l["server.address"]=u.host),l["url.same_origin"]=n.includes(Ze.location.origin),OH(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 c={...l,...IA(t)},d=i+r,f=d+s;Zo(e,d,f,{name:n.replace(Ze.location.origin,""),op:a,attributes:c})}function IH(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),nv(n.rtt)&&(Ds["connection.rtt"]={value:n.rtt,unit:"millisecond"})),nv(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),nv(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function AH(e,t){Ir&&t.recordLcpOnPageloadSpan&&(Ir.element&&e.setAttribute("lcp.element",Hr(Ir.element)),Ir.id&&e.setAttribute("lcp.id",Ir.id),Ir.url&&e.setAttribute("lcp.url",Ir.url.trim().slice(0,200)),Ir.loadTime!=null&&e.setAttribute("lcp.loadTime",Ir.loadTime),Ir.renderTime!=null&&e.setAttribute("lcp.renderTime",Ir.renderTime),e.setAttribute("lcp.size",Ir.size)),Wl!=null&&Wl.sources&&t.recordClsOnPageloadSpan&&Wl.sources.forEach((n,r)=>e.setAttribute(`cls.source.${r+1}`,Hr(n.node)))}function OH(e,t,n){n.forEach(([r,s])=>{const i=e[r];i!=null&&(typeof i=="number"&&i<pH||typeof i=="string")&&(t[s]=i)})}function DH(e){const t=mf(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}function MH(){return bf()&&qr()?dl("element",LH):()=>{}}const LH=({entries:e})=>{const t=er(),n=t?Yn(t):void 0,r=n?bt(n).description:Dt().getScopeData().transactionName;e.forEach(s=>{var h,g;const i=s;if(!i.identifier)return;const o=i.name,a=i.renderTime,l=i.loadTime,[u,c]=l?[vn(l),"load-time"]:a?[vn(a),"render-time"]:[_n(),"entry-emission"],d=o==="image-paint"?vn(Math.max(0,(a??0)-(l??0))):0,f={[dn]:"auto.ui.browser.elementtiming",[io]:"ui.elementtiming",[Fr]:"component","sentry.span_start_time_source":c,"sentry.transaction_name":r,"element.id":i.id,"element.type":((g=(h=i.element)==null?void 0:h.tagName)==null?void 0:g.toLowerCase())||"unknown","element.size":i.naturalWidth&&i.naturalHeight?`${i.naturalWidth}x${i.naturalHeight}`:void 0,"element.render_time":a,"element.load_time":l,"element.url":i.url||void 0,"element.identifier":i.identifier,"element.paint_type":o};b5({name:`element[${i.identifier}]`,attributes:f,startTime:u,onlyIfParent:!0},m=>{m.end(u+d)})})},FH=1e3;let Rk,Ny,By;function AA(e){const t="dom";ia(t,e),oa(t,$H)}function $H(){if(!Ze.document)return;const e=ms.bind(null,"dom"),t=Pk(e,!0);Ze.document.addEventListener("click",t,!1),Ze.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{var i,o;const s=(i=Ze[n])==null?void 0:i.prototype;(o=s==null?void 0:s.hasOwnProperty)!=null&&o.call(s,"addEventListener")&&(Lr(s,"addEventListener",function(a){return function(l,u,c){if(l==="click"||l=="keypress")try{const d=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},f=d[l]=d[l]||{refCount:0};if(!f.handler){const h=Pk(e);f.handler=h,a.call(this,l,h,c)}f.refCount++}catch{}return a.call(this,l,u,c)}}),Lr(s,"removeEventListener",function(a){return function(l,u,c){if(l==="click"||l=="keypress")try{const d=this.__sentry_instrumentation_handlers__||{},f=d[l];f&&(f.refCount--,f.refCount<=0&&(a.call(this,l,f.handler,c),f.handler=void 0,delete d[l]),Object.keys(d).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return a.call(this,l,u,c)}}))})}function NH(e){if(e.type!==Ny)return!1;try{if(!e.target||e.target._sentryId!==By)return!1}catch{}return!0}function BH(e,t){return e!=="keypress"?!1:t!=null&&t.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function Pk(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=VH(n);if(BH(n.type,r))return;es(n,"_sentryCaptured",!0),r&&!r._sentryId&&es(r,"_sentryId",Zr());const s=n.type==="keypress"?"input":n.type;NH(n)||(e({event:n,name:s,global:t}),Ny=n.type,By=r?r._sentryId:void 0),clearTimeout(Rk),Rk=Ze.setTimeout(()=>{By=void 0,Ny=void 0},FH)}}function VH(e){try{return e.target}catch{return null}}let Hf;function Nm(e){const t="history";ia(t,e),oa(t,UH)}function UH(){if(Ze.addEventListener("popstate",()=>{const t=Ze.location.href,n=Hf;if(Hf=t,n===t)return;ms("history",{from:n,to:t})}),!cz())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const s=Hf,i=zH(String(r));if(Hf=i,s===i)return t.apply(this,n);ms("history",{from:s,to:i})}return t.apply(this,n)}}Lr(Ze.history,"pushState",e),Lr(Ze.history,"replaceState",e)}function zH(e){try{return new URL(e,Ze.location.origin).toString()}catch{return e}}const Fh={};function OA(e){const t=Fh[e];if(t)return t;let n=Ze[e];if(Oy(n))return Fh[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!=null&&i[e]&&(n=i[e]),r.head.removeChild(s)}catch(s){cl&&Ae.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,s)}return n&&(Fh[e]=n.bind(Ze))}function HH(e){Fh[e]=void 0}function wf(...e){return OA("setTimeout")(...e)}const Ra="__sentry_xhr_v3__";function DA(e){const t="xhr";ia(t,e),oa(t,jH)}function jH(){if(!Ze.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const s=new Error,i=_n()*1e3,o=ji(r[0])?r[0].toUpperCase():void 0,a=WH(r[1]);if(!o||!a)return t.apply(n,r);n[Ra]={method:o,url:a,request_headers:{}},o==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const l=()=>{const u=n[Ra];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const c={endTimestamp:_n()*1e3,startTimestamp:i,xhr:n,virtualError:s};ms("xhr",c)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,c,d){return l(),u.apply(c,d)}}):n.addEventListener("readystatechange",l),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,c,d){const[f,h]=d,g=c[Ra];return g&&ji(f)&&ji(h)&&(g.request_headers[f.toLowerCase()]=h),u.apply(c,d)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const s=n[Ra];if(!s)return t.apply(n,r);r[0]!==void 0&&(s.body=r[0]);const i={startTimestamp:_n()*1e3,xhr:n};return ms("xhr",i),t.apply(n,r)}})}function WH(e){if(ji(e))return e;try{return e.toString()}catch{}}const qH=Symbol.for("sentry__originalRequestBody");function MA(e){return new URLSearchParams(e).toString()}function LA(e,t=Ae){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[MA(e)];if(!e)return[void 0]}catch(n){return cl&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return cl&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function FA(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][qH];return n!==void 0?n:void 0}}function $A(e){let t;try{t=e.getAllResponseHeaders()}catch(n){return cl&&Ae.error(n,"Failed to get xhr response headers",e),{}}return t?t.split(`\r
|
|
56
|
+
`).reduce((n,r)=>{const[s,i]=r.split(": ");return i&&(n[s.toLowerCase()]=i),n},{}):{}}const rv=[],$h=new Map,Il=new Map,GH=60;function KH(){if(bf()&&qr()){const t=YH();return()=>{t()}}return()=>{}}const Vy={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 YH(){return EA(XH)}const XH=({metric:e})=>{if(e.value==null)return;const t=vn(e.value);if(t>GH)return;const n=e.entries.find(g=>g.duration===e.value&&Vy[g.name]);if(!n)return;const{interactionId:r}=n,s=Vy[n.name],i=vn(qr()+n.startTime),o=er(),a=o?Yn(o):void 0,l=r!=null?$h.get(r):void 0,u=(l==null?void 0:l.span)||a,c=u?bt(u).description:Dt().getScopeData().transactionName,d=(l==null?void 0:l.elementName)||Hr(n.target),f={[dn]:"auto.http.browser.inp",[io]:`ui.interaction.${s}`,[lc]:n.duration},h=c1({name:d,transaction:c,attributes:f,startTime:i});h&&(h.addEvent("inp",{[ff]:"millisecond",[hf]:e.value}),h.end(i+t))};function QH(){const e=Object.keys(Vy);Dy()&&e.forEach(s=>{Ze.addEventListener(s,t,{capture:!0,passive:!0})});function t(s){const i=s.target;if(!i)return;const o=Hr(i),a=Math.round(s.timeStamp);if(Il.set(a,o),Il.size>50){const l=Il.keys().next().value;l!==void 0&&Il.delete(l)}}function n(s){const i=Math.round(s.startTime);let o=Il.get(i);if(!o)for(let a=-5;a<=5;a++){const l=Il.get(i+a);if(l){o=l;break}}return o||"<unknown>"}const r=({entries:s})=>{const i=er(),o=i&&Yn(i);s.forEach(a=>{if(!aH(a))return;const l=a.interactionId;if(l==null||$h.has(l))return;const u=a.target?Hr(a.target):n(a);if(rv.length>10){const c=rv.shift();$h.delete(c)}rv.push(l),$h.set(l,{span:o,elementName:u})})};dl("event",r),dl("first-input",r)}const JH=40;function ZH(e,t=OA("fetch")){let n=0,r=0;async function s(i){const o=i.body.length;n+=o,r++;const a={body:i.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const l=await t(e.url,a);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 HH("fetch"),l}finally{n-=o,r--}}return d4(e,s,J0(e.bufferSize||JH))}const ys=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,e8=30,t8=50;function Uy(e,t,n,r){const s={filename:e,function:t==="<anonymous>"?ll:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const n8=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,r8=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,s8=/\((\S*)(?::(\d+))(?::(\d+))\)/,i8=/at (.+?) ?\(data:(.+?),/,o8=e=>{const t=e.match(i8);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=n8.exec(e);if(n){const[,s,i,o]=n;return Uy(s,ll,+i,+o)}const r=r8.exec(e);if(r){if(r[2]&&r[2].indexOf("eval")===0){const a=s8.exec(r[2]);a&&(r[2]=a[1],r[3]=a[2],r[4]=a[3])}const[i,o]=NA(r[1]||ll,r[2]);return Uy(o,i,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},a8=[e8,o8],l8=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,u8=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,c8=e=>{const t=l8.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=u8.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]||ll;return[s,r]=NA(s,r),Uy(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},d8=[t8,c8],f8=[a8,d8],h8=aI(...f8),NA=(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]:ll,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},jf=1024,p8="Breadcrumbs",m8=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:p8,setup(n){t.console&&Y4(b8(n)),t.dom&&AA(y8(n,t.dom)),t.xhr&&DA(w8(n)),t.fetch&&dA(S8(n)),t.history&&Nm(_8(n)),t.sentry&&n.on("beforeSendEvent",v8(n))}}},g8=m8;function v8(e){return function(n){mt()===e&&Jo({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:Ea(n)},{event:n})}}function y8(e,t){return function(r){if(mt()!==e)return;let s,i,o=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>jf&&(ys&&Ae.warn(`\`dom.maxStringLength\` cannot exceed ${jf}, but a value of ${a} was configured. Sentry will use ${jf} instead.`),a=jf),typeof o=="string"&&(o=[o]);try{const u=r.event,c=k8(u)?u.target:u;s=Hr(c,{keyAttrs:o,maxStringLength:a}),i=pI(c)}catch{s="<unknown>"}if(s.length===0)return;const l={category:`ui.${r.name}`,message:s};i&&(l.data={"ui.component_name":i}),Jo(l,{event:r.event,name:r.name,global:r.global})}}function b8(e){return function(n){if(mt()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:aA(n.level),message:V_(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${V_(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Jo(r,{input:n.args,level:n.level})}}function w8(e){return function(n){if(mt()!==e)return;const{startTimestamp:r,endTimestamp:s}=n,i=n.xhr[Ra];if(!r||!s||!i)return;const{method:o,url:a,status_code:l,body:u}=i,c={method:o,url:a,status_code:l},d={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s},f={category:"xhr",data:c,type:"http",level:cA(l)};e.emit("beforeOutgoingRequestBreadcrumb",f,d),Jo(f,d)}}function S8(e){return function(n){if(mt()!==e)return;const{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){const i=n.fetchData,o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s},a={category:"fetch",data:i,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",a,o),Jo(a,o)}else{const i=n.response,o={...n.fetchData,status_code:i==null?void 0:i.status};n.fetchData.request_body_size,n.fetchData.response_body_size,i==null||i.status;const a={input:n.args,response:i,startTimestamp:r,endTimestamp:s},l={category:"fetch",data:o,type:"http",level:cA(o.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",l,a),Jo(l,a)}}}function _8(e){return function(n){if(mt()!==e)return;let r=n.from,s=n.to;const i=Qa(Et.location.href);let o=r?Qa(r):void 0;const a=Qa(s);o!=null&&o.path||(o=i),i.protocol===a.protocol&&i.host===a.host&&(s=a.relative),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),Jo({category:"navigation",data:{from:r,to:s}})}}function k8(e){return!!e&&!!e.target}const x8=["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"],E8="BrowserApiErrors",C8=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:E8,setupOnce(){t.setTimeout&&Lr(Et,"setTimeout",Ik),t.setInterval&&Lr(Et,"setInterval",Ik),t.requestAnimationFrame&&Lr(Et,"requestAnimationFrame",R8),t.XMLHttpRequest&&"XMLHttpRequest"in Et&&Lr(XMLHttpRequest.prototype,"send",P8);const n=t.eventTarget;n&&(Array.isArray(n)?n:x8).forEach(s=>I8(s,t))}}},T8=C8;function Ik(e){return function(...t){const n=t[0];return t[0]=Ou(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${no(e)}`}}),e.apply(this,t)}}function R8(e){return function(t){return e.apply(this,[Ou(t,{mechanism:{data:{handler:no(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function P8(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&Lr(n,s,function(i){const o={mechanism:{data:{handler:no(i)},handled:!1,type:`auto.browser.browserapierrors.xhr.${s}`}},a=V0(i);return a&&(o.mechanism.data.handler=no(a)),Ou(i,o)})}),e.apply(this,t)}}function I8(e,t){var s,i;const r=(s=Et[e])==null?void 0:s.prototype;(i=r==null?void 0:r.hasOwnProperty)!=null&&i.call(r,"addEventListener")&&(Lr(r,"addEventListener",function(o){return function(a,l,u){try{A8(l)&&(l.handleEvent=Ou(l.handleEvent,{mechanism:{data:{handler:no(l),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&O8(this,a,l),o.apply(this,[a,Ou(l,{mechanism:{data:{handler:no(l),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),u])}}),Lr(r,"removeEventListener",function(o){return function(a,l,u){try{const c=l.__sentry_wrapped__;c&&o.call(this,a,c,u)}catch{}return o.call(this,a,l,u)}}))}function A8(e){return typeof e.handleEvent=="function"}function O8(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const D8=()=>({name:"BrowserSession",setupOnce(){if(typeof Et.document>"u"){ys&&Ae.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}lk({ignoreDuration:!0}),uk(),Nm(({from:e,to:t})=>{e!==void 0&&e!==t&&(lk({ignoreDuration:!0}),uk())})}}),M8="GlobalHandlers",L8=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:M8,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&($8(n),Ak("onerror")),t.onunhandledrejection&&(N8(n),Ak("onunhandledrejection"))}}},F8=L8;function $8(e){uI(t=>{const{stackParser:n,attachStacktrace:r}=BA();if(mt()!==e||hA())return;const{msg:s,url:i,line:o,column:a,error:l}=t,u=U8(s1(n,l||s,void 0,r,!1),i,o,a);u.level="error",HI(u,{originalException:l,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function N8(e){cI(t=>{const{stackParser:n,attachStacktrace:r}=BA();if(mt()!==e||hA())return;const s=B8(t),i=Tu(s)?V8(s):s1(n,s,void 0,r,!0);i.level="error",HI(i,{originalException:s,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function B8(e){if(Tu(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 V8(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function U8(e,t,n,r){const s=e.exception=e.exception||{},i=s.values=s.values||[],o=i[0]=i[0]||{},a=o.stacktrace=o.stacktrace||{},l=a.frames=a.frames||[],u=r,c=n,d=z8(t)??oc();return l.length===0&&l.push({colno:u,filename:d,function:ll,in_app:!0,lineno:c}),e}function Ak(e){ys&&Ae.log(`Global Handler attached: ${e}`)}function BA(){const e=mt();return(e==null?void 0:e.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}function z8(e){if(!(!ji(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 H8=()=>({name:"HttpContext",preprocessEvent(e){var r;if(!Et.navigator&&!Et.location&&!Et.document)return;const t=t1(),n={...t.headers,...(r=e.request)==null?void 0:r.headers};e.request={...t,...e.request,headers:n}}}),j8="cause",W8=5,q8="LinkedErrors",G8=(e={})=>{const t=e.limit||W8,n=e.key||j8;return{name:q8,preprocessEvent(r,s,i){const o=i.getOptions();K4(n1,o.stackParser,n,t,r,s)}}},K8=G8;function Y8(){return X8()?(ys&&co(()=>{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 X8(){var i;if(typeof Et.window>"u")return!1;const e=Et;if(e.nw)return!1;const t=e.chrome||e.browser;if(!((i=t==null?void 0:t.runtime)!=null&&i.id))return!1;const n=oc(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(Et===Et.top&&r.some(o=>n.startsWith(`${o}://`)))}function VA(e){return[V4(),F4(),T8(),g8(),F8(),K8(),Z4(),H8(),D8()]}function Q8(e={}){const t=!e.skipBrowserExtensionCheck&&Y8();let n=e.defaultIntegrations==null?VA():e.defaultIntegrations;const r={...e,enabled:t?!1:e.enabled,stackParser:jU(e.stackParser||h8),integrations:e4({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||ZH};return S4(Mz,r)}const Kt=pt,d1="sentryReplaySession",J8="replay_event",f1="Unable to send Replay",Z8=3e5,ej=9e5,tj=5e3,nj=5500,rj=6e4,sj=5e3,ij=3,Ok=15e4,Wf=5e3,oj=3e3,aj=300,h1=2e7,lj=4999,uj=5e4,Dk=36e5;var cj=Object.defineProperty,dj=(e,t,n)=>t in e?cj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mk=(e,t,n)=>dj(e,typeof t!="symbol"?t+"":t,n),xn=(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))(xn||{});function fj(e){return e.nodeType===e.ELEMENT_NODE}function td(e){const t=e==null?void 0:e.host;return(t==null?void 0:t.shadowRoot)===e}function nd(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function hj(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 pj(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 Pp(e){try{const t=e.rules||e.cssRules;return t?hj(Array.from(t,UA).join("")):null}catch{return null}}function mj(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 UA(e){let t;if(vj(e))try{t=Pp(e.styleSheet)||pj(e)}catch{}else if(yj(e)){let n=e.cssText;const r=e.selectorText.includes(":"),s=typeof e.style.all=="string"&&e.style.all;if(s&&(n=mj(e)),r&&(n=gj(n)),r||s)return n}return t||e.cssText}function gj(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function vj(e){return"styleSheet"in e}function yj(e){return"selectorText"in e}class zA{constructor(){Mk(this,"idNodeMap",new Map),Mk(this,"nodeMetaMap",new WeakMap)}getId(t){var r;return t?((r=this.getMeta(t))==null?void 0:r.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(n,s)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function bj(){return new zA}function Bm({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function Td({isMasked:e,element:t,value:n,maskInputFn:r}){let s=n||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function Du(e){return e.toLowerCase()}function zy(e){return e.toUpperCase()}const Lk="__rrweb_original__";function wj(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let s=0;s<e.height;s+=n){const i=t.getImageData,o=Lk in i?i[Lk]:i;if(new Uint32Array(o.call(t,r,s,Math.min(n,e.width-r),Math.min(n,e.height-s)).data.buffer).some(l=>l!==0))return!1}return!0}function p1(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Du(t):null}function Ip(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function HA(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i,s=n.pathname.match(r);return(s==null?void 0:s[1])??null}const Fk={};function jA(e){const t=Fk[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 Fk[e]=r.bind(window)}function Hy(...e){return jA("setTimeout")(...e)}function WA(...e){return jA("clearTimeout")(...e)}function qA(e){try{return e.contentDocument}catch{}}let Sj=1;const _j=new RegExp("[^a-z0-9-_:]"),Rd=-2;function m1(){return Sj++}function kj(e){if(e instanceof HTMLFormElement)return"form";const t=Du(e.tagName);return _j.test(t)?"div":t}function xj(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let Al,$k;const Ej=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Cj=/^(?:[a-z+]+:)?\/\//i,Tj=/^www\..*/i,Rj=/^(data:)([^,]*),(.*)/i;function Pj(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 o=s.slice(0,i).trim();t.has(o)||r.push(s)}return r.join("; ")+(r.length>0&&e.endsWith(";")?";":"")}catch(n){return console.warn("Error filtering CSS properties:",n),e}}function Ap(e,t){return(e||"").replace(Ej,(n,r,s,i,o,a)=>{const l=s||o||a,u=r||i||"";if(!l)return n;if(Cj.test(l)||Tj.test(l))return`url(${u}${l}${u})`;if(Rj.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${xj(t)+l}${u})`;const c=t.split("/"),d=l.split("/");c.pop();for(const f of d)f!=="."&&(f===".."?c.pop():c.push(f));return`url(${u}${c.join("/")}${u})`})}const Ij=/^[^ \t\n\r\u000c]+/,Aj=/^[, \t\n\r\u000c]+/;function Oj(e,t){if(t.trim()==="")return t;let n=0;function r(i){let o;const a=i.exec(t.substring(n));return a?(o=a[0],n+=o.length,o):""}const s=[];for(;r(Aj),!(n>=t.length);){let i=r(Ij);if(i.slice(-1)===",")i=ql(e,i.substring(0,i.length-1)),s.push(i);else{let o="";i=ql(e,i);let a=!1;for(;;){const l=t.charAt(n);if(l===""){s.push((i+o).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){n+=1,s.push((i+o).trim());break}else l==="("&&(a=!0);o+=l,n+=1}}}return s.join(", ")}const Nk=new WeakMap;function ql(e,t){return!t||t.trim()===""?t:Vm(e,t)}function Dj(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Vm(e,t){let n=Nk.get(e);if(n||(n=e.createElement("a"),Nk.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function GA(e,t,n,r,s,i,o){if(!r)return r;if(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#"))return ql(e,r);if(n==="xlink:href"&&r[0]!=="#")return ql(e,r);if(n==="background"&&(t==="table"||t==="td"||t==="th"))return ql(e,r);if(n==="srcset")return Oj(e,r);if(n==="style"){let a=Ap(r,Vm(e));return o&&o.size>0&&(a=Pj(a,o)),a}else if(t==="object"&&n==="data")return ql(e,r);return typeof i=="function"?i(n,r,s):r}function KA(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function Mj(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 Lj(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Pa(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Pa(e.parentNode,t,n,r+1)}function Gl(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(Lj(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function Mu(e,t,n,r,s,i){try{const o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(o===null)return!1;if(o.tagName==="INPUT"){const u=o.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let a=-1,l=-1;if(i){if(l=Pa(o,Gl(r,s)),l<0)return!0;a=Pa(o,Gl(t,n),l>=0?l:1/0)}else{if(a=Pa(o,Gl(t,n)),a<0)return!1;l=Pa(o,Gl(r,s),a>=0?a:1/0)}return a>=0?l>=0?a<=l:!0:l>=0?!1:!!i}catch{}return!!i}function Fj(e,t,n){const r=e.contentWindow;if(!r)return;let s=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){const a=Hy(()=>{s||(t(),s=!0)},n);e.addEventListener("load",()=>{WA(a),s=!0,t()});return}const o="about:blank";if(r.location.href!==o||e.src===o||e.src==="")return Hy(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function $j(e,t,n){let r=!1,s;try{s=e.sheet}catch{return}if(s)return;const i=Hy(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{WA(i),r=!0,t()})}function Nj(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskAttributeFn:l,maskTextClass:u,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:h,maskInputOptions:g={},maskTextFn:m,maskInputFn:y,dataURLOptions:w={},inlineImages:b,recordCanvas:S,keepIframeSrcFn:_,newlyAddedElement:k=!1,ignoreCSSAttributes:T}=t,R=Bj(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:xn.Document,childNodes:[],compatMode:e.compatMode}:{type:xn.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:xn.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:R};case e.ELEMENT_NODE:return Uj(e,{doc:n,blockClass:s,blockSelector:i,unblockSelector:o,inlineStylesheet:h,maskAttributeFn:l,maskInputOptions:g,maskInputFn:y,dataURLOptions:w,inlineImages:b,recordCanvas:S,keepIframeSrcFn:_,newlyAddedElement:k,rootId:R,maskTextClass:u,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:f,ignoreCSSAttributes:T});case e.TEXT_NODE:return Vj(e,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:m,maskInputOptions:g,maskInputFn:y,rootId:R});case e.CDATA_SECTION_NODE:return{type:xn.CDATA,textContent:"",rootId:R};case e.COMMENT_NODE:return{type:xn.Comment,textContent:e.textContent||"",rootId:R};default:return!1}}function Bj(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function Vj(e,t){var w;const{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:i,unmaskTextSelector:o,maskTextFn:a,maskInputOptions:l,maskInputFn:u,rootId:c}=t,d=e.parentNode&&e.parentNode.tagName;let f=e.textContent;const h=d==="STYLE"?!0:void 0,g=d==="SCRIPT"?!0:void 0,m=d==="TEXTAREA"?!0:void 0;if(h&&f){try{e.nextSibling||e.previousSibling||(w=e.parentNode.sheet)!=null&&w.cssRules&&(f=Pp(e.parentNode.sheet))}catch(b){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${b}`,e)}f=Ap(f,Vm(t.doc))}g&&(f="SCRIPT_PLACEHOLDER");const y=Mu(e,r,i,s,o,n);if(!h&&!g&&!m&&f&&y&&(f=a?a(f,e.parentElement):f.replace(/[\S]/g,"*")),m&&f&&(l.textarea||y)&&(f=u?u(f,e.parentNode):f.replace(/[\S]/g,"*")),d==="OPTION"&&f){const b=Bm({type:null,tagName:d,maskInputOptions:l});f=Td({isMasked:Mu(e,r,i,s,o,b),element:e,value:f,maskInputFn:u})}return{type:xn.Text,textContent:f||"",isStyle:h,rootId:c}}function Uj(e,t){const{doc:n,blockClass:r,blockSelector:s,unblockSelector:i,inlineStylesheet:o,maskInputOptions:a={},maskAttributeFn:l,maskInputFn:u,dataURLOptions:c={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:h,newlyAddedElement:g=!1,rootId:m,maskTextClass:y,unmaskTextClass:w,maskTextSelector:b,unmaskTextSelector:S,ignoreCSSAttributes:_}=t,k=Mj(e,r,s,i),T=kj(e);let R={};const x=e.attributes.length;for(let P=0;P<x;P++){const A=e.attributes[P];A.name&&!KA(T,A.name,A.value)&&(R[A.name]=GA(n,T,Du(A.name),A.value,e,l,_))}if(T==="link"&&o){const P=Array.from(n.styleSheets).find(L=>L.href===e.href);let A=null;P&&(A=Pp(P)),A&&(R.rel=null,R.href=null,R.crossorigin=null,R._cssText=Ap(A,P.href))}if(T==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const P=Pp(e.sheet);P&&(R._cssText=Ap(P,Vm(n)))}if(T==="input"||T==="textarea"||T==="select"||T==="option"){const P=e,A=p1(P),L=Ip(P,zy(T),A),B=P.checked;if(A!=="submit"&&A!=="button"&&L){const O=Mu(P,y,b,w,S,Bm({type:A,tagName:zy(T),maskInputOptions:a}));R.value=Td({isMasked:O,element:P,value:L,maskInputFn:u})}B&&(R.checked=B)}if(T==="option"&&(e.selected&&!a.select?R.selected=!0:delete R.selected),T==="canvas"&&f){if(e.__context==="2d")wj(e)||(R.rr_dataURL=e.toDataURL(c.type,c.quality));else if(!("__context"in e)){const P=e.toDataURL(c.type,c.quality),A=n.createElement("canvas");A.width=e.width,A.height=e.height;const L=A.toDataURL(c.type,c.quality);P!==L&&(R.rr_dataURL=P)}}if(T==="img"&&d){Al||(Al=n.createElement("canvas"),$k=Al.getContext("2d"));const P=e,A=P.currentSrc||P.getAttribute("src")||"<unknown-src>",L=P.crossOrigin,B=()=>{P.removeEventListener("load",B);try{Al.width=P.naturalWidth,Al.height=P.naturalHeight,$k.drawImage(P,0,0),R.rr_dataURL=Al.toDataURL(c.type,c.quality)}catch(O){if(P.crossOrigin!=="anonymous"){P.crossOrigin="anonymous",P.complete&&P.naturalWidth!==0?B():P.addEventListener("load",B);return}else console.warn(`Cannot inline img src=${A}! Error: ${O}`)}P.crossOrigin==="anonymous"&&(L?R.crossOrigin=L:P.removeAttribute("crossorigin"))};P.complete&&P.naturalWidth!==0?B():P.addEventListener("load",B)}if((T==="audio"||T==="video")&&(R.rr_mediaState=e.paused?"paused":"played",R.rr_mediaCurrentTime=e.currentTime),g||(e.scrollLeft&&(R.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(R.rr_scrollTop=e.scrollTop)),k){const{width:P,height:A}=e.getBoundingClientRect();R={class:R.class,rr_width:`${P}px`,rr_height:`${A}px`}}T==="iframe"&&!h(R.src)&&(!k&&!qA(e)&&(R.rr_src=R.src),delete R.src);let I;try{customElements.get(T)&&(I=!0)}catch{}return{type:xn.Element,tagName:T,attributes:R,childNodes:[],isSVG:Dj(e)||void 0,needBlock:k,rootId:m,isCustom:I}}function qt(e){return e==null?"":e.toLowerCase()}function zj(e,t){if(t.comment&&e.type===xn.Comment)return!0;if(e.type===xn.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"&&HA(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(qt(e.attributes.name).match(/^msapplication-tile(image|color)$/)||qt(e.attributes.name)==="application-name"||qt(e.attributes.rel)==="icon"||qt(e.attributes.rel)==="apple-touch-icon"||qt(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&qt(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(qt(e.attributes.property).match(/^(og|twitter|fb):/)||qt(e.attributes.name).match(/^(og|twitter):/)||qt(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(qt(e.attributes.name)==="robots"||qt(e.attributes.name)==="googlebot"||qt(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(qt(e.attributes.name)==="author"||qt(e.attributes.name)==="generator"||qt(e.attributes.name)==="framework"||qt(e.attributes.name)==="publisher"||qt(e.attributes.name)==="progid"||qt(e.attributes.property).match(/^article:/)||qt(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(qt(e.attributes.name)==="google-site-verification"||qt(e.attributes.name)==="yandex-verification"||qt(e.attributes.name)==="csrf-token"||qt(e.attributes.name)==="p:domain_verify"||qt(e.attributes.name)==="verify-v1"||qt(e.attributes.name)==="verification"||qt(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Kl(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,skipChild:f=!1,inlineStylesheet:h=!0,maskInputOptions:g={},maskAttributeFn:m,maskTextFn:y,maskInputFn:w,slimDOMOptions:b,dataURLOptions:S={},inlineImages:_=!1,recordCanvas:k=!1,onSerialize:T,onIframeLoad:R,iframeLoadTimeout:x=5e3,onBlockedImageLoad:I,onStylesheetLoad:P,stylesheetLoadTimeout:A=5e3,keepIframeSrcFn:L=()=>!1,newlyAddedElement:B=!1,ignoreCSSAttributes:O}=t;let{preserveWhiteSpace:F=!0}=t;const W=Nj(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,inlineStylesheet:h,maskInputOptions:g,maskAttributeFn:m,maskTextFn:y,maskInputFn:w,dataURLOptions:S,inlineImages:_,recordCanvas:k,keepIframeSrcFn:L,newlyAddedElement:B,ignoreCSSAttributes:O});if(!W)return console.warn(e,"not serialized"),null;let X;r.hasNode(e)?X=r.getId(e):zj(W,b)||!F&&W.type===xn.Text&&!W.isStyle&&!W.textContent.replace(/^\s+|\s+$/gm,"").length?X=Rd:X=m1();const V=Object.assign(W,{id:X});if(r.add(e,V),X===Rd)return null;T&&T(e);let z=!f;if(V.type===xn.Element){z=z&&!V.needBlock;const M=e.shadowRoot;M&&nd(M)&&(V.isShadowHost=!0)}if((V.type===xn.Document||V.type===xn.Element)&&z){b.headWhitespace&&V.type===xn.Element&&V.tagName==="head"&&(F=!1);const M={doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,skipChild:f,inlineStylesheet:h,maskInputOptions:g,maskAttributeFn:m,maskTextFn:y,maskInputFn:w,slimDOMOptions:b,dataURLOptions:S,inlineImages:_,recordCanvas:k,preserveWhiteSpace:F,onSerialize:T,onIframeLoad:R,iframeLoadTimeout:x,onBlockedImageLoad:I,onStylesheetLoad:P,stylesheetLoadTimeout:A,keepIframeSrcFn:L,ignoreCSSAttributes:O},re=e.childNodes?Array.from(e.childNodes):[];for(const H of re){const j=Kl(H,M);j&&V.childNodes.push(j)}if(fj(e)&&e.shadowRoot)for(const H of Array.from(e.shadowRoot.childNodes)){const j=Kl(H,M);j&&(nd(e.shadowRoot)&&(j.isShadow=!0),V.childNodes.push(j))}}if(e.parentNode&&td(e.parentNode)&&nd(e.parentNode)&&(V.isShadow=!0),V.type===xn.Element&&V.tagName==="iframe"&&!V.needBlock&&Fj(e,()=>{const M=qA(e);if(M&&R){const re=Kl(M,{doc:M,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:g,maskAttributeFn:m,maskTextFn:y,maskInputFn:w,slimDOMOptions:b,dataURLOptions:S,inlineImages:_,recordCanvas:k,preserveWhiteSpace:F,onSerialize:T,onIframeLoad:R,iframeLoadTimeout:x,onStylesheetLoad:P,stylesheetLoadTimeout:A,keepIframeSrcFn:L,ignoreCSSAttributes:O});re&&R(e,re)}},x),V.type===xn.Element&&V.tagName==="img"&&!e.complete&&V.needBlock){const M=e,re=()=>{if(M.isConnected&&!M.complete&&I)try{const H=M.getBoundingClientRect();H.width>0&&H.height>0&&I(M,V,H)}catch{}M.removeEventListener("load",re)};M.isConnected&&M.addEventListener("load",re)}return V.type===xn.Element&&V.tagName==="link"&&typeof V.attributes.rel=="string"&&(V.attributes.rel==="stylesheet"||V.attributes.rel==="preload"&&typeof V.attributes.href=="string"&&HA(V.attributes.href)==="css")&&$j(e,()=>{if(P){const M=Kl(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:g,maskAttributeFn:m,maskTextFn:y,maskInputFn:w,slimDOMOptions:b,dataURLOptions:S,inlineImages:_,recordCanvas:k,preserveWhiteSpace:F,onSerialize:T,onIframeLoad:R,iframeLoadTimeout:x,onStylesheetLoad:P,stylesheetLoadTimeout:A,keepIframeSrcFn:L,ignoreCSSAttributes:O});M&&P(e,M)}},A),V.type===xn.Element&&delete V.needBlock,V}function Hj(e,t){const{mirror:n=new zA,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:i=null,maskAllText:o=!1,maskTextClass:a="rr-mask",unmaskTextClass:l=null,maskTextSelector:u=null,unmaskTextSelector:c=null,inlineStylesheet:d=!0,inlineImages:f=!1,recordCanvas:h=!1,maskAllInputs:g=!1,maskAttributeFn:m,maskTextFn:y,maskInputFn:w,slimDOM:b=!1,dataURLOptions:S,preserveWhiteSpace:_,onSerialize:k,onIframeLoad:T,iframeLoadTimeout:R,onBlockedImageLoad:x,onStylesheetLoad:I,stylesheetLoadTimeout:P,keepIframeSrcFn:A=()=>!1,ignoreCSSAttributes:L=new Set([])}=t||{};return Kl(e,{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,maskAllText:o,maskTextClass:a,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:c,skipChild:!1,inlineStylesheet:d,maskInputOptions:g===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:g===!1?{}:g,maskAttributeFn:m,maskTextFn:y,maskInputFn:w,slimDOMOptions:b===!0||b==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:b==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:b===!1?{}:b,dataURLOptions:S,inlineImages:f,recordCanvas:h,preserveWhiteSpace:_,onSerialize:k,onIframeLoad:T,iframeLoadTimeout:R,onBlockedImageLoad:x,onStylesheetLoad:I,stylesheetLoadTimeout:P,keepIframeSrcFn:A,newlyAddedElement:!1,ignoreCSSAttributes:L})}function br(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Vl=`Please stop import mirror directly. Instead of that,\r
|
|
57
|
+
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
58
|
+
or you can use record.mirror to access the mirror instance during recording.`;let Bk={map:{},getId(){return console.error(Vl),-1},getNode(){return console.error(Vl),null},removeNodeFromMap(){console.error(Vl)},has(){return console.error(Vl),!1},reset(){console.error(Vl)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Bk=new Proxy(Bk,{get(e,t,n){return t==="map"&&console.error(Vl),Reflect.get(e,t,n)}}));function Pd(e,t,n={}){let r=null,s=0;return function(...i){const o=Date.now();!s&&n.leading===!1&&(s=o);const a=t-(o-s),l=this;a<=0||a>t?(r&&(Xj(r),r=null),s=o,e.apply(l,i)):!r&&n.trailing!==!1&&(r=Um(()=>{s=n.leading===!1?0:Date.now(),r=null,e.apply(l,i)},a))}}function YA(e,t,n,r,s=window){const i=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(o){Um(()=>{n.set.call(this,o)},0),i&&i.set&&i.set.call(this,o)}}),()=>YA(e,t,i||{},!0)}function g1(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 Op=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Op=()=>new Date().getTime());function XA(e){var n,r,s,i,o,a;const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:(t==null?void 0:t.documentElement.scrollLeft)||((r=(n=t==null?void 0:t.body)==null?void 0:n.parentElement)==null?void 0:r.scrollLeft)||((s=t==null?void 0:t.body)==null?void 0:s.scrollLeft)||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(t==null?void 0:t.documentElement.scrollTop)||((o=(i=t==null?void 0:t.body)==null?void 0:i.parentElement)==null?void 0:o.scrollTop)||((a=t==null?void 0:t.body)==null?void 0:a.scrollTop)||0}}function QA(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function JA(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ZA(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Yr(e,t,n,r,s){if(!e)return!1;const i=ZA(e);if(!i)return!1;const o=Gl(t,n);if(!s){const u=r&&i.matches(r);return o(i)&&!u}const a=Pa(i,o);let l=-1;return a<0?!1:(r&&(l=Pa(i,Gl(null,r))),a>-1&&l<0?!0:a<l)}function jj(e,t){return t.getId(e)!==-1}function sv(e,t){return t.getId(e)===Rd}function eO(e,t){if(td(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?eO(e.parentNode,t):!0:!0}function jy(e){return!!e.changedTouches}function Wj(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 tO(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function nO(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Wy(e){return!!(e!=null&&e.shadowRoot)}class qj{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 rO(e){var n,r;let t=null;return((r=(n=e.getRootNode)==null?void 0:n.call(e))==null?void 0:r.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function Gj(e){let t=e,n;for(;n=rO(t);)t=n;return t}function Kj(e){const t=e.ownerDocument;if(!t)return!1;const n=Gj(e);return t.contains(n)}function sO(e){const t=e.ownerDocument;return t?t.contains(e)||Kj(e):!1}const Vk={};function v1(e){const t=Vk[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 Vk[e]=r.bind(window)}function Yj(...e){return v1("requestAnimationFrame")(...e)}function Um(...e){return v1("setTimeout")(...e)}function Xj(...e){return v1("clearTimeout")(...e)}var ct=(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))(ct||{}),tt=(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))(tt||{}),hr=(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))(hr||{}),Ii=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Ii||{}),Ul=(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))(Ul||{});function y1(e){try{return e.contentDocument}catch{}}function Qj(e){try{return e.contentWindow}catch{}}function Uk(e){return"__ln"in e}class Jj{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=(n==null?void 0:n.next)||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&Uk(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&&Uk(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 zk=(e,t)=>`${e}@${t}`;class Zj{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 Jj,s=l=>{let u=l,c=Rd;for(;c===Rd;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},i=l=>{if(!l.parentNode||!sO(l))return;const u=td(l.parentNode)?this.mirror.getId(rO(l)):this.mirror.getId(l.parentNode),c=s(l);if(u===-1||c===-1)return r.addNode(l);const d=Kl(l,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:f=>{tO(f,this.mirror)&&!Yr(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(f),nO(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),Wy(l)&&this.shadowDomManager.addShadowRoot(l.shadowRoot,this.doc)},onIframeLoad:(f,h)=>{Yr(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(f,h),f.contentWindow&&this.canvasManager.addWindow(f.contentWindow),this.shadowDomManager.observeAttachShadow(f))},onStylesheetLoad:(f,h)=>{this.stylesheetManager.attachLinkElement(f,h)},onBlockedImageLoad:(f,h,{width:g,height:m})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:h.id,attributes:{style:{width:`${g}px`,height:`${m}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});d&&(t.push({parentId:u,nextId:c,node:d}),n.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const l of this.movedSet)Hk(this.removes,l,this.mirror)&&!this.movedSet.has(l.parentNode)||i(l);for(const l of this.addedSet)!jk(this.droppedSet,l)&&!Hk(this.removes,l,this.mirror)||jk(this.movedSet,l)?i(l):this.droppedSet.add(l);let o=null;for(;r.length;){let l=null;if(o){const u=this.mirror.getId(o.value.parentNode),c=s(o.value);u!==-1&&c!==-1&&(l=o)}if(!l){let u=r.tail;for(;u;){const c=u;if(u=u.previous,c){const d=this.mirror.getId(c.value.parentNode);if(s(c.value)===-1)continue;if(d!==-1){l=c;break}else{const h=c.value;if(h.parentNode&&h.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const g=h.parentNode.host;if(this.mirror.getId(g)!==-1){l=c;break}}}}}}if(!l){for(;r.head;)r.removeNode(r.head.value);break}o=l.previous,r.removeNode(l.value),i(l.value)}const a={texts:this.texts.map(l=>({id:this.mirror.getId(l.node),value:l.value})).filter(l=>!n.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{const{attributes:u}=l;if(typeof u.style=="string"){const c=JSON.stringify(l.styleDiff),d=JSON.stringify(l._unchangedStyles);c.length<u.style.length&&(c+d).split("var(").length===u.style.split("var(").length&&(u.style=l.styleDiff)}return{id:this.mirror.getId(l.node),attributes:u}}).filter(l=>!n.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!sv(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Yr(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:Mu(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,ZA(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,s=t.target.getAttribute(r);if(r==="value"){const o=p1(n),a=n.tagName;s=Ip(n,a,o);const l=Bm({maskInputOptions:this.maskInputOptions,tagName:a,type:o}),u=Mu(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,l);s=Td({isMasked:u,element:n,value:s,maskInputFn:this.maskInputFn})}if(Yr(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(!y1(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"),!KA(n.tagName,r)&&(i.attributes[r]=GA(this.doc,Du(n.tagName),Du(r),s,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");t.oldValue&&o.setAttribute("style",t.oldValue);for(const a of Array.from(n.style)){const l=n.style.getPropertyValue(a),u=n.style.getPropertyPriority(a);l!==o.style.getPropertyValue(a)||u!==o.style.getPropertyPriority(a)?u===""?i.styleDiff[a]=l:i.styleDiff[a]=[l,u]:i._unchangedStyles[a]=[l,u]}for(const a of Array.from(o.style))n.style.getPropertyValue(a)===""&&(i.styleDiff[a]=!1)}break}case"childList":{if(Yr(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=td(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Yr(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||sv(n,this.mirror)||!jj(n,this.mirror)||(this.addedSet.has(n)?(qy(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||eO(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[zk(r,s)]?qy(this.movedSet,n):this.removes.push({parentId:s,id:r,isShadow:td(t.target)&&nd(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(sv(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[zk(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Yr(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEach(r=>this.genAdds(r)),Wy(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 qy(e,t){var n;e.delete(t),(n=t.childNodes)==null||n.forEach(r=>qy(e,r))}function Hk(e,t,n){return e.length===0?!1:e6(e,t,n)}function e6(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 jk(e,t){return e.size===0?!1:iO(e,t)}function iO(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:iO(e,n):!1}let rd;function t6(e){rd=e}function n6(){rd=void 0}const St=e=>rd?(...n)=>{try{return e(...n)}catch(r){if(rd&&rd(r)===!0)return()=>{};throw r}}:e,Yl=[];function Sf(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 oO(e,t){var o,a;const n=new Zj;Yl.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const s=(a=(o=window==null?void 0:window.Zone)==null?void 0:o.__symbol__)==null?void 0:a.call(o,"MutationObserver");s&&window[s]&&(r=window[s]);const i=new r(St(l=>{e.onMutation&&e.onMutation(l)===!1||n.processMutations.bind(n)(l)}));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function r6({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const s=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let o=[],a;const l=Pd(St(d=>{const f=Date.now()-a;e(o.map(h=>(h.timeOffset-=f,h)),d),o=[],a=null}),i),u=St(Pd(St(d=>{const f=Sf(d),{clientX:h,clientY:g}=jy(d)?d.changedTouches[0]:d;a||(a=Op()),o.push({x:h,y:g,id:r.getId(f),timeOffset:Op()-a}),l(typeof DragEvent<"u"&&d instanceof DragEvent?tt.Drag:d instanceof MouseEvent?tt.MouseMove:tt.TouchMove)}),s,{trailing:!1})),c=[br("mousemove",u,n),br("touchmove",u,n),br("drag",u,n)];return St(()=>{c.forEach(d=>d())})}function s6({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const a=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,l=[];let u=null;const c=d=>f=>{const h=Sf(f);if(Yr(h,r,s,i,!0))return;let g=null,m=d;if("pointerType"in f){switch(f.pointerType){case"mouse":g=Ii.Mouse;break;case"touch":g=Ii.Touch;break;case"pen":g=Ii.Pen;break}g===Ii.Touch?hr[d]===hr.MouseDown?m="TouchStart":hr[d]===hr.MouseUp&&(m="TouchEnd"):Ii.Pen}else jy(f)&&(g=Ii.Touch);g!==null?(u=g,(m.startsWith("Touch")&&g===Ii.Touch||m.startsWith("Mouse")&&g===Ii.Mouse)&&(g=null)):hr[d]===hr.Click&&(g=u,u=null);const y=jy(f)?f.changedTouches[0]:f;if(!y)return;const w=n.getId(h),{clientX:b,clientY:S}=y;St(e)({type:hr[m],id:w,x:b,y:S,...g!==null&&{pointerType:g}})};return Object.keys(hr).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&a[d]!==!1).forEach(d=>{let f=Du(d);const h=c(d);if(window.PointerEvent)switch(hr[d]){case hr.MouseDown:case hr.MouseUp:f=f.replace("mouse","pointer");break;case hr.TouchStart:case hr.TouchEnd:return}l.push(br(f,h,t))}),St(()=>{l.forEach(d=>d())})}function aO({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){const a=St(Pd(St(l=>{const u=Sf(l);if(!u||Yr(u,r,s,i,!0))return;const c=n.getId(u);if(u===t&&t.defaultView){const d=XA(t.defaultView);e({id:c,x:d.left,y:d.top})}else e({id:c,x:u.scrollLeft,y:u.scrollTop})}),o.scroll||100));return br("scroll",a,t)}function i6({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const s=St(Pd(St(()=>{const i=QA(),o=JA();(n!==i||r!==o)&&(e({width:Number(o),height:Number(i)}),n=i,r=o)}),200));return br("resize",s,t)}const o6=["INPUT","TEXTAREA","SELECT"],Wk=new WeakMap;function a6({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,ignoreClass:o,ignoreSelector:a,maskInputOptions:l,maskInputFn:u,sampling:c,userTriggeredOnInput:d,maskTextClass:f,unmaskTextClass:h,maskTextSelector:g,unmaskTextSelector:m}){function y(R){let x=Sf(R);const I=R.isTrusted,P=x&&zy(x.tagName);if(P==="OPTION"&&(x=x.parentElement),!x||!P||o6.indexOf(P)<0||Yr(x,r,s,i,!0))return;const A=x;if(A.classList.contains(o)||a&&A.matches(a))return;const L=p1(x);let B=Ip(A,P,L),O=!1;const F=Bm({maskInputOptions:l,tagName:P,type:L}),W=Mu(x,f,g,h,m,F);(L==="radio"||L==="checkbox")&&(O=x.checked),B=Td({isMasked:W,element:x,value:B,maskInputFn:u}),w(x,d?{text:B,isChecked:O,userTriggered:I}:{text:B,isChecked:O});const X=x.name;L==="radio"&&X&&O&&t.querySelectorAll(`input[type="radio"][name="${X}"]`).forEach(V=>{if(V!==x){const z=Td({isMasked:W,element:V,value:Ip(V,P,L),maskInputFn:u});w(V,d?{text:z,isChecked:!O,userTriggered:!1}:{text:z,isChecked:!O})}})}function w(R,x){const I=Wk.get(R);if(!I||I.text!==x.text||I.isChecked!==x.isChecked){Wk.set(R,x);const P=n.getId(R);St(e)({...x,id:P})}}const S=(c.input==="last"?["change"]:["input","change"]).map(R=>br(R,St(y),t)),_=t.defaultView;if(!_)return()=>{S.forEach(R=>R())};const k=_.Object.getOwnPropertyDescriptor(_.HTMLInputElement.prototype,"value"),T=[[_.HTMLInputElement.prototype,"value"],[_.HTMLInputElement.prototype,"checked"],[_.HTMLSelectElement.prototype,"value"],[_.HTMLTextAreaElement.prototype,"value"],[_.HTMLSelectElement.prototype,"selectedIndex"],[_.HTMLOptionElement.prototype,"selected"]];return k&&k.set&&S.push(...T.map(R=>YA(R[0],R[1],{set(){St(y)({target:this,isTrusted:!1})}},!1,_))),St(()=>{S.forEach(R=>R())})}function Dp(e){const t=[];function n(r,s){if(qf("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||qf("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||qf("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||qf("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const o=Array.from(r.parentRule.cssRules).indexOf(r);s.unshift(o)}else if(r.parentStyleSheet){const o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);s.unshift(o)}return s}return n(e,t)}function xo(e,t,n){let r,s;return e?(e.ownerNode?r=t.getId(e.ownerNode):s=n.getId(e),{styleId:s,id:r}):{}}function l6({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:St((c,d,f)=>{const[h,g]=f,{id:m,styleId:y}=xo(d,t,n.styleMirror);return(m&&m!==-1||y&&y!==-1)&&e({id:m,styleId:y,adds:[{rule:h,index:g}]}),c.apply(d,f)})});const i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:St((c,d,f)=>{const[h]=f,{id:g,styleId:m}=xo(d,t,n.styleMirror);return(g&&g!==-1||m&&m!==-1)&&e({id:g,styleId:m,removes:[{index:h}]}),c.apply(d,f)})});let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:St((c,d,f)=>{const[h]=f,{id:g,styleId:m}=xo(d,t,n.styleMirror);return(g&&g!==-1||m&&m!==-1)&&e({id:g,styleId:m,replace:h}),c.apply(d,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:St((c,d,f)=>{const[h]=f,{id:g,styleId:m}=xo(d,t,n.styleMirror);return(g&&g!==-1||m&&m!==-1)&&e({id:g,styleId:m,replaceSync:h}),c.apply(d,f)})}));const l={};Gf("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(Gf("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),Gf("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),Gf("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(l).forEach(([c,d])=>{u[c]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(u[c].insertRule,{apply:St((f,h,g)=>{const[m,y]=g,{id:w,styleId:b}=xo(h.parentStyleSheet,t,n.styleMirror);return(w&&w!==-1||b&&b!==-1)&&e({id:w,styleId:b,adds:[{rule:m,index:[...Dp(h),y||0]}]}),f.apply(h,g)})}),d.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:St((f,h,g)=>{const[m]=g,{id:y,styleId:w}=xo(h.parentStyleSheet,t,n.styleMirror);return(y&&y!==-1||w&&w!==-1)&&e({id:y,styleId:w,removes:[{index:[...Dp(h),m]}]}),f.apply(h,g)})})}),St(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=i,o&&(r.CSSStyleSheet.prototype.replace=o),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([c,d])=>{d.prototype.insertRule=u[c].insertRule,d.prototype.deleteRule=u[c].deleteRule})})}function lO({mirror:e,stylesheetManager:t},n){var o,a,l;let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const s=n.nodeName==="#document"?(o=n.defaultView)==null?void 0:o.Document:(l=(a=n.ownerDocument)==null?void 0:a.defaultView)==null?void 0:l.ShadowRoot,i=s!=null&&s.prototype?Object.getOwnPropertyDescriptor(s==null?void 0:s.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!s||!i?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){var u;return(u=i.get)==null?void 0:u.call(this)},set(u){var d;const c=(d=i.set)==null?void 0:d.call(this,u);if(r!==null&&r!==-1)try{t.adoptStyleSheets(u,r)}catch{}return c}}),St(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function u6({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const i=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:St((a,l,u)=>{var m;const[c,d,f]=u;if(n.has(c))return i.apply(l,[c,d,f]);const{id:h,styleId:g}=xo((m=l.parentRule)==null?void 0:m.parentStyleSheet,t,r.styleMirror);return(h&&h!==-1||g&&g!==-1)&&e({id:h,styleId:g,set:{property:c,value:d,priority:f},index:Dp(l.parentRule)}),a.apply(l,u)})});const o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:St((a,l,u)=>{var h;const[c]=u;if(n.has(c))return o.apply(l,[c]);const{id:d,styleId:f}=xo((h=l.parentRule)==null?void 0:h.parentStyleSheet,t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,remove:{property:c},index:Dp(l.parentRule)}),a.apply(l,u)})}),St(()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=o})}function c6({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:s,sampling:i,doc:o}){const a=St(u=>Pd(St(c=>{const d=Sf(c);if(!d||Yr(d,t,n,r,!0))return;const{currentTime:f,volume:h,muted:g,playbackRate:m}=d;e({type:u,id:s.getId(d),currentTime:f,volume:h,muted:g,playbackRate:m})}),i.media||500)),l=[br("play",a(Ul.Play),o),br("pause",a(Ul.Pause),o),br("seeked",a(Ul.Seeked),o),br("volumechange",a(Ul.VolumeChange),o),br("ratechange",a(Ul.RateChange),o)];return St(()=>{l.forEach(u=>u())})}function d6({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,i=n.FontFace;n.FontFace=function(l,u,c){const d=new i(l,u,c);return s.set(d,{family:l,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),d};const o=g1(t.fonts,"add",function(a){return function(l){return Um(St(()=>{const u=s.get(l);u&&(e(u),s.delete(l))}),0),a.apply(this,[l])}});return r.push(()=>{n.FontFace=i}),r.push(o),St(()=>{r.forEach(a=>a())})}function f6(e){const{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,selectionCb:o}=e;let a=!0;const l=St(()=>{const u=t.getSelection();if(!u||a&&(u!=null&&u.isCollapsed))return;a=u.isCollapsed||!1;const c=[],d=u.rangeCount||0;for(let f=0;f<d;f++){const h=u.getRangeAt(f),{startContainer:g,startOffset:m,endContainer:y,endOffset:w}=h;Yr(g,r,s,i,!0)||Yr(y,r,s,i,!0)||c.push({start:n.getId(g),startOffset:m,end:n.getId(y),endOffset:w})}o({ranges:c})});return l(),br("selectionchange",l)}function h6({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:g1(n.customElements,"define",function(s){return function(i,o,a){try{t({define:{name:i}})}catch{}return s.apply(this,[i,o,a])}})}function p6(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=oO(e,e.doc));const s=r6(e),i=s6(e),o=aO(e),a=i6(e,{win:n}),l=a6(e),u=c6(e);let c=()=>{},d=()=>{},f=()=>{},h=()=>{};e.recordDOM&&(c=l6(e,{win:n}),d=lO(e,e.doc),f=u6(e,{win:n}),e.collectFonts&&(h=d6(e)));const g=f6(e),m=h6(e),y=[];for(const w of e.plugins)y.push(w.observer(w.callback,n,w.options));return St(()=>{Yl.forEach(w=>w.reset()),r==null||r.disconnect(),s(),i(),o(),a(),l(),u(),c(),d(),f(),h(),g(),m(),y.forEach(w=>w())})}function qf(e){return typeof window[e]<"u"}function Gf(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Gy{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,s){const i=r||this.getIdToRemoteIdMap(t),o=s||this.getRemoteIdToIdMap(t);let a=i.get(n);return a||(a=this.generateIdFn(),i.set(n,a),o.set(a,n)),a}getIds(t,n){const r=this.getIdToRemoteIdMap(t),s=this.getRemoteIdToIdMap(t);return n.map(i=>this.getId(t,i,r,s))}getRemoteId(t,n,r){const s=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const i=s.get(n);return i||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(s=>this.getRemoteId(t,s,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}class m6{constructor(){this.crossOriginIframeMirror=new Gy(m1),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class g6{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Gy(m1),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Gy(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){var s,i;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((s=t.contentWindow)==null||s.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,t);const r=y1(t);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const s=this.crossOriginIframeMap.get(t.source);if(!s)return;const i=this.transformCrossOriginEvent(s,n.data.event);i&&this.wrappedEmit(i,n.data.isCheckout)}transformCrossOriginEvent(t,n){var r;switch(n.type){case ct.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const s=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,s),this.patchRootIdOnNode(n.data.node,s),{timestamp:n.timestamp,type:ct.IncrementalSnapshot,data:{source:tt.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case ct.Meta:case ct.Load:case ct.DomContentLoaded:return!1;case ct.Plugin:return n;case ct.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case ct.IncrementalSnapshot:switch(n.data.source){case tt.Mutation:return n.data.adds.forEach(s=>{this.replaceIds(s,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(s.node,t);const i=this.crossOriginIframeRootIdMap.get(t);i&&this.patchRootIdOnNode(s.node,i)}),n.data.removes.forEach(s=>{this.replaceIds(s,t,["parentId","id"])}),n.data.attributes.forEach(s=>{this.replaceIds(s,t,["id"])}),n.data.texts.forEach(s=>{this.replaceIds(s,t,["id"])}),n;case tt.Drag:case tt.TouchMove:case tt.MouseMove:return n.data.positions.forEach(s=>{this.replaceIds(s,t,["id"])}),n;case tt.ViewportResize:return!1;case tt.MediaInteraction:case tt.MouseInteraction:case tt.Scroll:case tt.CanvasMutation:case tt.Input:return this.replaceIds(n.data,t,["id"]),n;case tt.StyleSheetRule:case tt.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case tt.Font:return n;case tt.Selection:return n.data.ranges.forEach(s=>{this.replaceIds(s,t,["start","end"])}),n;case tt.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),(r=n.data.styles)==null||r.forEach(s=>{this.replaceStyleIds(s,t,["styleId"])}),n}}return!1}replace(t,n,r,s){for(const i of s)!Array.isArray(n[i])&&typeof n[i]!="number"||(Array.isArray(n[i])?n[i]=t.getIds(r,n[i]):n[i]=t.getId(r,n[i]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==xn.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class v6{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class y6{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(!nd(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=oO({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(aO({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),Um(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(lO({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=y1(t),r=Qj(t);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(g1(t.prototype,"attachShadow",function(s){return function(i){const o=s.call(this,i);return this.shadowRoot&&sO(this)&&r.addShadowRoot(this.shadowRoot,n),o}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}var qk="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b6=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Kf=0;Kf<qk.length;Kf++)b6[qk.charCodeAt(Kf)]=Kf;class Gk{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class w6{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new qj,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},s=[];for(const i of t){let o;this.styleMirror.has(i)?o=this.styleMirror.getId(i):(o=this.styleMirror.add(i),s.push({styleId:o,rules:Array.from(i.rules||CSSRule,(a,l)=>({rule:UA(a),index:l}))})),r.styleIds.push(o)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class S6{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,Yj(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let hn,Mp;var WC;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((WC=e.contentWindow)==null?void 0:WC.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const Ps=bj();function Gi(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:i=null,unblockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,maskAllText:u=!1,maskTextClass:c="rr-mask",unmaskTextClass:d=null,maskTextSelector:f=null,unmaskTextSelector:h=null,inlineStylesheet:g=!0,maskAllInputs:m,maskInputOptions:y,slimDOMOptions:w,maskAttributeFn:b,maskInputFn:S,maskTextFn:_,maxCanvasSize:k=null,packFn:T,sampling:R={},dataURLOptions:x={},mousemoveWait:I,recordDOM:P=!0,recordCanvas:A=!1,recordCrossOriginIframes:L=!1,recordAfter:B=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:O=!1,collectFonts:F=!1,inlineImages:W=!1,plugins:X,keepIframeSrcFn:V=()=>!1,ignoreCSSAttributes:z=new Set([]),errorHandler:M,onMutation:re,getCanvasManager:H}=e;t6(M);const j=L?window.parent===window:!0;let pe=!1;if(!j)try{window.parent.document&&(pe=!1)}catch{pe=!0}if(j&&!t)throw new Error("emit function is required");if(!j&&!pe)return()=>{};I!==void 0&&R.mousemove===void 0&&(R.mousemove=I),Ps.reset();const J=m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:y!==void 0?y:{},we=w===!0||w==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:w==="all",headMetaDescKeywords:w==="all"}:w||{};Wj();let q,he=0;const ne=be=>{for(const _e of X||[])_e.eventProcessor&&(be=_e.eventProcessor(be));return T&&!pe&&(be=T(be)),be};hn=(be,_e)=>{var Ne;const fe=be;if(fe.timestamp=Op(),(Ne=Yl[0])!=null&&Ne.isFrozen()&&fe.type!==ct.FullSnapshot&&!(fe.type===ct.IncrementalSnapshot&&fe.data.source===tt.Mutation)&&Yl.forEach(Ie=>Ie.unfreeze()),j)t==null||t(ne(fe),_e);else if(pe){const Ie={type:"rrweb",event:ne(fe),origin:window.location.origin,isCheckout:_e};window.parent.postMessage(Ie,"*")}if(fe.type===ct.FullSnapshot)q=fe,he=0;else if(fe.type===ct.IncrementalSnapshot){if(fe.data.source===tt.Mutation&&fe.data.isAttachIframe)return;he++;const Ie=r&&he>=r,Te=n&&q&&fe.timestamp-q.timestamp>n;(Ie||Te)&&Pe(!0)}};const K=be=>{hn({type:ct.IncrementalSnapshot,data:{source:tt.Mutation,...be}})},ke=be=>hn({type:ct.IncrementalSnapshot,data:{source:tt.Scroll,...be}}),Re=be=>hn({type:ct.IncrementalSnapshot,data:{source:tt.CanvasMutation,...be}}),N=be=>hn({type:ct.IncrementalSnapshot,data:{source:tt.AdoptedStyleSheet,...be}}),U=new w6({mutationCb:K,adoptedStyleSheetCb:N}),Y=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new m6:new g6({mirror:Ps,mutationCb:K,stylesheetManager:U,recordCrossOriginIframes:L,wrappedEmit:hn});for(const be of X||[])be.getMirror&&be.getMirror({nodeMirror:Ps,crossOriginIframeMirror:Y.crossOriginIframeMirror,crossOriginIframeStyleMirror:Y.crossOriginIframeStyleMirror});const le=new S6,oe=k6(H,{mirror:Ps,win:window,mutationCb:be=>hn({type:ct.IncrementalSnapshot,data:{source:tt.CanvasMutation,...be}}),recordCanvas:A,blockClass:s,blockSelector:i,unblockSelector:o,maxCanvasSize:k,sampling:R.canvas,dataURLOptions:x,errorHandler:M}),me=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new v6:new y6({mutationCb:K,scrollCb:ke,bypassOptions:{onMutation:re,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:h,inlineStylesheet:g,maskInputOptions:J,dataURLOptions:x,maskAttributeFn:b,maskTextFn:_,maskInputFn:S,recordCanvas:A,inlineImages:W,sampling:R,slimDOMOptions:we,iframeManager:Y,stylesheetManager:U,canvasManager:oe,keepIframeSrcFn:V,processedNodeManager:le,ignoreCSSAttributes:z},mirror:Ps}),Pe=(be=!1)=>{if(!P)return;hn({type:ct.Meta,data:{href:window.location.href,width:JA(),height:QA()}},be),U.reset(),me.init(),Yl.forEach(fe=>fe.lock());const _e=Hj(document,{mirror:Ps,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:h,inlineStylesheet:g,maskAllInputs:J,maskAttributeFn:b,maskInputFn:S,maskTextFn:_,slimDOM:we,dataURLOptions:x,recordCanvas:A,inlineImages:W,onSerialize:fe=>{tO(fe,Ps)&&Y.addIframe(fe),nO(fe,Ps)&&U.trackLinkElement(fe),Wy(fe)&&me.addShadowRoot(fe.shadowRoot,document)},onIframeLoad:(fe,Ne)=>{Y.attachIframe(fe,Ne),fe.contentWindow&&oe.addWindow(fe.contentWindow),me.observeAttachShadow(fe)},onStylesheetLoad:(fe,Ne)=>{U.attachLinkElement(fe,Ne)},onBlockedImageLoad:(fe,Ne,{width:Ie,height:Te})=>{K({adds:[],removes:[],texts:[],attributes:[{id:Ne.id,attributes:{style:{width:`${Ie}px`,height:`${Te}px`}}}]})},keepIframeSrcFn:V,ignoreCSSAttributes:z});if(!_e)return console.warn("Failed to snapshot the document");hn({type:ct.FullSnapshot,data:{node:_e,initialOffset:XA(window)}}),Yl.forEach(fe=>fe.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&U.adoptStyleSheets(document.adoptedStyleSheets,Ps.getId(document))};Mp=Pe;try{const be=[],_e=Ne=>{var Ie;return St(p6)({onMutation:re,mutationCb:K,mousemoveCb:(Te,Ke)=>hn({type:ct.IncrementalSnapshot,data:{source:Ke,positions:Te}}),mouseInteractionCb:Te=>hn({type:ct.IncrementalSnapshot,data:{source:tt.MouseInteraction,...Te}}),scrollCb:ke,viewportResizeCb:Te=>hn({type:ct.IncrementalSnapshot,data:{source:tt.ViewportResize,...Te}}),inputCb:Te=>hn({type:ct.IncrementalSnapshot,data:{source:tt.Input,...Te}}),mediaInteractionCb:Te=>hn({type:ct.IncrementalSnapshot,data:{source:tt.MediaInteraction,...Te}}),styleSheetRuleCb:Te=>hn({type:ct.IncrementalSnapshot,data:{source:tt.StyleSheetRule,...Te}}),styleDeclarationCb:Te=>hn({type:ct.IncrementalSnapshot,data:{source:tt.StyleDeclaration,...Te}}),canvasMutationCb:Re,fontCb:Te=>hn({type:ct.IncrementalSnapshot,data:{source:tt.Font,...Te}}),selectionCb:Te=>{hn({type:ct.IncrementalSnapshot,data:{source:tt.Selection,...Te}})},customElementCb:Te=>{hn({type:ct.IncrementalSnapshot,data:{source:tt.CustomElement,...Te}})},blockClass:s,ignoreClass:a,ignoreSelector:l,maskAllText:u,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:h,maskInputOptions:J,inlineStylesheet:g,sampling:R,recordDOM:P,recordCanvas:A,inlineImages:W,userTriggeredOnInput:O,collectFonts:F,doc:Ne,maskAttributeFn:b,maskInputFn:S,maskTextFn:_,keepIframeSrcFn:V,blockSelector:i,unblockSelector:o,slimDOMOptions:we,dataURLOptions:x,mirror:Ps,iframeManager:Y,stylesheetManager:U,shadowDomManager:me,processedNodeManager:le,canvasManager:oe,ignoreCSSAttributes:z,plugins:((Ie=X==null?void 0:X.filter(Te=>Te.observer))==null?void 0:Ie.map(Te=>({observer:Te.observer,options:Te.options,callback:Ke=>hn({type:ct.Plugin,data:{plugin:Te.name,payload:Ke}})})))||[]},{})};Y.addLoadListener(Ne=>{try{be.push(_e(Ne.contentDocument))}catch(Ie){console.warn(Ie)}});const fe=()=>{Pe(),be.push(_e(document))};return document.readyState==="interactive"||document.readyState==="complete"?fe():(be.push(br("DOMContentLoaded",()=>{hn({type:ct.DomContentLoaded,data:{}}),B==="DOMContentLoaded"&&fe()})),be.push(br("load",()=>{hn({type:ct.Load,data:{}}),B==="load"&&fe()},window))),()=>{be.forEach(Ne=>Ne()),le.destroy(),Mp=void 0,n6()}}catch(be){console.warn(be)}}function _6(e){if(!Mp)throw new Error("please take full snapshot after start recording");Mp(e)}Gi.mirror=Ps;Gi.takeFullSnapshot=_6;function k6(e,t){try{return e?e(t):new Gk}catch{return console.warn("Unable to initialize CanvasManager"),new Gk}}var Kk;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Kk||(Kk={}));const x6=3,E6=5;function b1(e){return e>9999999999?e:e*1e3}function iv(e){return e>9999999999?e/1e3:e}function _f(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:ct.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Os(t,10,1e3)}}),t.category==="console")))}const C6="button,a";function uO(e){return e.closest(C6)||e}function cO(e){const t=dO(e);return!t||!(t instanceof Element)?t:uO(t)}function dO(e){return T6(e)?e.target:e}function T6(e){return typeof e=="object"&&!!e&&"target"in e}let Eo;function R6(e){return Eo||(Eo=[],P6()),Eo.push(e),()=>{const t=Eo?Eo.indexOf(e):-1;t>-1&&Eo.splice(t,1)}}function P6(){Lr(Kt,"open",function(e){return function(...t){if(Eo)try{Eo.forEach(n=>n())}catch{}return e.apply(Kt,t)}})}const I6=new Set([tt.Mutation,tt.StyleSheetRule,tt.StyleDeclaration,tt.AdoptedStyleSheet,tt.CanvasMutation,tt.Selection,tt.MediaInteraction]);function A6(e,t,n){e.handleClick(t,n)}class O6{constructor(t,n,r=_f){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=R6(()=>{this._lastMutation=Yk()});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(M6(n,this._ignoreSelector)||!L6(t))return;const r={timestamp:iv(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=iv(t)}registerScroll(t=Date.now()){this._lastScroll=iv(t)}registerClick(t){const n=uO(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=Yk();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(const r of t){const s=this._clicks.indexOf(r);s>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(s,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,s=t.mutationAfter&&t.mutationAfter<=this._threshold,i=!r&&!s,{clickCount:o,clickBreadcrumb:a}=t;if(i){const l=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=l<this._timeout*1e3?"mutation":"timeout",c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:Kt.location.href,route:n.getCurrentRoute(),timeAfterClickMs:l,endReason:u,clickCount:o||1}};this._addBreadcrumbEvent(n,c);return}if(o>1){const l={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:Kt.location.href,route:n.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(n,l)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=wf(()=>this._checkClicks(),1e3)}}const D6=["A","BUTTON","INPUT"];function M6(e,t){return!!(!D6.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 L6(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function Yk(){return Date.now()/1e3}function F6(e,t){try{if(!$6(t))return;const{source:n}=t.data;if(I6.has(n)&&e.registerMutation(t.timestamp),n===tt.Scroll&&e.registerScroll(t.timestamp),N6(t)){const{type:r,id:s}=t.data,i=Gi.mirror.getNode(s);i instanceof HTMLElement&&r===hr.Click&&e.registerClick(i)}}catch{}}function $6(e){return e.type===x6}function N6(e){return e.data.source===tt.MouseInteraction}function pi(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var w1=(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))(w1||{});const B6=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function V6(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(B6.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const U6=e=>t=>{if(!e.isEnabled())return;const n=z6(t);if(!n)return;const r=t.name==="click",s=r?t.event:void 0;r&&e.clickDetector&&(s!=null&&s.target)&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&A6(e.clickDetector,n,cO(t.event)),_f(e,n)};function fO(e,t){const n=Gi.mirror.getId(e),r=n&&Gi.mirror.getNode(n),s=r&&Gi.mirror.getMeta(r),i=s&&j6(s)?s:null;return{message:t,data:i?{nodeId:n,node:{id:n,tagName:i.tagName,textContent:Array.from(i.childNodes).map(o=>o.type===w1.Text&&o.textContent).filter(Boolean).map(o=>o.trim()).join(""),attributes:V6(i.attributes)}}:{}}}function z6(e){const{target:t,message:n}=H6(e);return pi({category:`ui.${e.name}`,...fO(t,n)})}function H6(e){const t=e.name==="click";let n,r=null;try{r=t?cO(e.event):dO(e.event),n=Hr(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function j6(e){return e.type===w1.Element}function W6(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=q6(t);n&&_f(e,n)}function q6(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i,target:o}=e;if(!o||G6(o)||!i)return null;const a=t||r||s,l=i.length===1;if(!a&&l)return null;const u=Hr(o,{maxStringLength:200})||"<unknown>",c=fO(o,u);return pi({category:"ui.keyDown",message:u,data:{...c.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i}})}function G6(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const K6={resource:Z6,paint:Q6,navigation:J6};function ov(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function Y6(e){return e.map(X6).filter(Boolean)}function X6(e){const t=K6[e.entryType];return t?t(e):null}function Lu(e){return((qr()||Kt.performance.timeOrigin)+e)/1e3}function Q6(e){const{duration:t,entryType:n,name:r,startTime:s}=e,i=Lu(s);return{type:n,name:r,start:i,end:i+t,data:void 0}}function J6(e){const{entryType:t,name:n,decodedBodySize:r,duration:s,domComplete:i,encodedBodySize:o,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,domInteractive:u,loadEventStart:c,loadEventEnd:d,redirectCount:f,startTime:h,transferSize:g,type:m}=e;return s===0?null:{type:`${t}.${m}`,start:Lu(h),end:Lu(i),name:n,data:{size:g,decodedBodySize:r,encodedBodySize:o,duration:s,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,loadEventStart:c,loadEventEnd:d,domComplete:i,redirectCount:f}}}function Z6(e){const{entryType:t,initiatorType:n,name:r,responseEnd:s,startTime:i,decodedBodySize:o,encodedBodySize:a,responseStatus:l,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:Lu(i),end:Lu(s),name:r,data:{size:u,statusCode:l,decodedBodySize:o,encodedBodySize:a}}}function eW(e){const t=e.entries[e.entries.length-1],n=t!=null&&t.element?[t.element]:void 0;return S1(e,"largest-contentful-paint",n)}function tW(e){return e.sources!==void 0}function nW(e){const t=[],n=[];for(const r of e.entries)if(tW(r)){const s=[];for(const i of r.sources)if(i.node){n.push(i.node);const o=Gi.mirror.getId(i.node);o&&s.push(o)}t.push({value:r.value,nodeIds:s.length?s:void 0})}return S1(e,"cumulative-layout-shift",n,t)}function rW(e){const t=e.entries[e.entries.length-1],n=t!=null&&t.target?[t.target]:void 0;return S1(e,"interaction-to-next-paint",n)}function S1(e,t,n,r){const s=e.value,i=e.rating,o=Lu(s);return{type:"web-vital",name:t,start:o,end:o,data:{value:s,size:s,rating:i,nodeIds:n?n.map(a=>Gi.mirror.getId(a)):void 0,attributions:r}}}function sW(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(dl(s,n))}),r.push(u1(ov(eW,e)),l1(ov(nW,e)),EA(ov(rW,e))),()=>{r.forEach(s=>s())}}const Qe=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,iW='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 oW(){const e=new Blob([iW]);return URL.createObjectURL(e)}const Xk=["log","warn","error"],Nh="[Replay] ";function av(e,t="info"){Jo({category:"console",data:{logger:"replay"},level:t,message:`${Nh}${e}`},{level:t})}function aW(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return Qe?(Xk.forEach(r=>{n[r]=(...s)=>{Ae[r](Nh,...s),t&&av(s.join(""),aA(r))}}),n.exception=(r,...s)=>{s.length&&n.error&&n.error(...s),Ae.error(Nh,r),e?gi(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&av(r,"error")},n.infoTick=(...r)=>{Ae.log(Nh,...r),t&&setTimeout(()=>av(r[0]),0)}):Xk.forEach(r=>{n[r]=()=>{}}),n}const Je=aW();class _1 extends Error{constructor(){super(`Event buffer exceeded maximum size of ${h1}.`)}}class hO{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>h1)throw new _1;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?b1(t):null}}class lW{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(){Qe&&Je.log("Destroying compression worker"),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((s,i)=>{const o=({data:a})=>{const l=a;if(l.method===t&&l.id===r){if(this._worker.removeEventListener("message",o),!l.success){Qe&&Je.error("Error in compression worker: ",l.response),i(new Error("Error in compression worker"));return}s(l.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}}class uW{constructor(t){this._worker=new lW(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=b1(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>h1?Promise.reject(new _1):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{Qe&&Je.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 cW{constructor(t){this._fallback=new hO,this._compression=new uW(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){Qe&&Je.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){Qe&&Je.exception(i,"Failed to add events when switching buffers.")}}}function dW({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=fW(t);if(n)return n}return Qe&&Je.log("Using simple buffer"),new hO}function fW(e){try{const t=e||hW();if(!t)return;Qe&&Je.log(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new cW(n)}catch(t){Qe&&Je.exception(t,"Failed to create compression worker")}}function hW(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?oW():""}function k1(){try{return"sessionStorage"in Kt&&!!Kt.sessionStorage}catch{return!1}}function pW(e){mW(),e.session=void 0}function mW(){if(k1())try{Kt.sessionStorage.removeItem(d1)}catch{}}function pO(e){return e===void 0?!1:Math.random()<e}function zm(e){if(k1())try{Kt.sessionStorage.setItem(d1,JSON.stringify(e))}catch{}}function mO(e){const t=Date.now(),n=e.id||Zr(),r=e.started||t,s=e.lastActivity||t,i=e.segmentId||0,o=e.sampled,a=e.previousSessionId,l=e.dirty||!1;return{id:n,started:r,lastActivity:s,segmentId:i,sampled:o,previousSessionId:a,dirty:l}}function gW(e,t){return pO(e)?"session":t?"buffer":!1}function Qk({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const s=gW(e,t),i=mO({sampled:s,previousSessionId:r});return n&&zm(i),i}function vW(){if(!k1())return null;try{const e=Kt.sessionStorage.getItem(d1);if(!e)return null;const t=JSON.parse(e);return Qe&&Je.infoTick("Loading existing session"),mO(t)}catch{return null}}function Ky(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function gO(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Ky(e.started,t,r)||Ky(e.lastActivity,n,r)}function vO(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!gO(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function lv({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const s=r.stickySession&&vW();return s?vO(s,{sessionIdleExpire:e,maxReplayDuration:t})?(Qe&&Je.infoTick("Session in sessionStorage is expired, creating new one..."),Qk(r,{previousSessionId:s.id})):s:(Qe&&Je.infoTick("Creating new session"),Qk(r,{previousSessionId:n}))}function yW(e){return e.type===ct.Custom}function x1(e,t,n){return bO(e,t)?(yO(e,t,n),!0):!1}function bW(e,t,n){return bO(e,t)?yO(e,t,n):Promise.resolve(null)}async function yO(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const s=e.recordingMode==="buffer";try{n&&s&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const i=e.getOptions(),o=wW(t,i.beforeAddRecordingEvent);return o?await r.addEvent(o):void 0}catch(i){const o=i&&i instanceof _1,a=o?"addEventSizeExceeded":"addEvent",l=mt();if(l){const u=o?"buffer_overflow":"internal_sdk_error";l.recordDroppedEvent(u,"replay")}if(o&&s)return r.clear(),r.waitForCheckout=!0,null;e.handleException(i),await e.stop({reason:a})}}function bO(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=b1(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(Qe&&Je.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function wW(e,t){try{if(typeof t=="function"&&yW(e))return t(e)}catch(n){return Qe&&Je.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function E1(e){return!e.type}function Yy(e){return e.type==="transaction"}function SW(e){return e.type==="replay_event"}function Jk(e){return e.type==="feedback"}function _W(e){return(t,n)=>{if(!e.isEnabled()||!E1(t)&&!Yy(t))return;const r=n.statusCode;if(!(!r||r<200||r>=300)){if(Yy(t)){kW(e,t);return}xW(e,t)}}}function kW(e,t){var r,s;const n=e.getContext();(s=(r=t.contexts)==null?void 0:r.trace)!=null&&s.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function xW(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)||wf(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(s){e.handleException(s)}})}function EW(e){return t=>{!e.isEnabled()||!E1(t)||CW(e,t)}}function CW(e,t){var r,s,i;const n=(i=(s=(r=t.exception)==null?void 0:r.values)==null?void 0:s[0])==null?void 0:i.value;if(typeof n=="string"&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const o=pi({category:"replay.hydrate-error",data:{url:oc()}});_f(e,o)}}function TW(e){const t=mt();t&&t.on("beforeAddBreadcrumb",n=>RW(e,n))}function RW(e,t){if(!e.isEnabled()||!wO(t))return;const n=PW(t);n&&_f(e,n)}function PW(e){return!wO(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?IW(e):pi(e)}function IW(e){var s;const t=(s=e.data)==null?void 0:s.arguments;if(!Array.isArray(t)||t.length===0)return pi(e);let n=!1;const r=t.map(i=>{if(!i)return i;if(typeof i=="string")return i.length>Wf?(n=!0,`${i.slice(0,Wf)}…`):i;if(typeof i=="object")try{const o=Os(i,7);return JSON.stringify(o).length>Wf?(n=!0,`${JSON.stringify(o,null,2).slice(0,Wf)}…`):o}catch{}return i});return pi({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function wO(e){return!!e.category}function AW(e,t){var n,r,s;return e.type||!((r=(n=e.exception)==null?void 0:n.values)!=null&&r.length)?!1:!!((s=t.originalException)!=null&&s.__rrweb__)}function SO(){const e=Dt().getPropagationContext().dsc;e&&delete e.replay_id;const t=er();if(t){const n=oo(t);delete n.replay_id}}function OW(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:ct.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 DW(e,t){return e.recordingMode!=="buffer"||t.message===f1||!t.exception||t.type?!1:pO(e.getOptions().errorSampleRate)}function MW(e){return Object.assign((t,n)=>{var o;if(!e.isEnabled()||e.isPaused())return t;if(SW(t))return delete t.breadcrumbs,t;if(!E1(t)&&!Yy(t)&&!Jk(t))return t;if(!e.checkAndHandleExpiredSession())return SO(),t;if(Jk(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),OW(e,t),t;if(AW(t,n)&&!e.getOptions()._experiments.captureExceptions)return Qe&&Je.log("Ignoring error from rrweb internals",t),null;const s=DW(e,t);if((s||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),s&&e.recordingMode==="buffer"&&((o=e.session)==null?void 0:o.sampled)==="buffer"){const a=e.session;a.dirty=!0,e.getOptions().stickySession&&zm(a)}return t},{id:"Replay"})}function Hm(e,t){return t.map(({type:n,start:r,end:s,name:i,data:o})=>{const a=e.throttledAddEvent({type:ct.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:i,startTimestamp:r,endTimestamp:s,data:o}}});return typeof a=="string"?Promise.resolve(null):a})}function LW(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 FW(e){return t=>{if(!e.isEnabled())return;const n=LW(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(Hm(e,[n]),!1)))}}function $W(e,t){return Qe&&e.getOptions()._experiments.traceInternals?!1:C4(t,mt())}function _O(e,t){e.isEnabled()&&t!==null&&($W(e,t.name)||e.addUpdate(()=>(Hm(e,[t]),!0)))}function jm(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=MA(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function kO(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Lp(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 xO(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:s,method:i,statusCode:o,request:a,response:l}=t;return{type:e,start:n/1e3,end:r/1e3,name:s,data:{method:i,statusCode:o,request:a,response:l}}}function Id(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Vo(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}=NW(n);return r.body=s,i!=null&&i.length&&(r._meta={warnings:i}),r}function Xy(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 NW(e){if(!e||typeof e!="string")return{body:e};const t=e.length>Ok,n=BW(e);if(t){const r=e.slice(0,Ok);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 BW(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function Fp(e,t){const n=VW(e);return Wi(n,t)}function VW(e,t=Kt.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(Kt.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 UW(e,t,n){try{const r=await HW(e,t,n),s=xO("resource.fetch",r);_O(n.replay,s)}catch(r){Qe&&Je.exception(r,"Failed to capture fetch breadcrumb")}}function zW(e,t){const{input:n,response:r}=t,s=n?FA(n):void 0,i=jm(s),o=r?kO(r.headers.get("content-length")):void 0;i!==void 0&&(e.data.request_body_size=i),o!==void 0&&(e.data.response_body_size=o)}async function HW(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r}=t,{url:o,method:a,status_code:l=0,request_body_size:u,response_body_size:c}=e.data,d=Fp(o,n.networkDetailAllowUrls)&&!Fp(o,n.networkDetailDenyUrls),f=d?jW(n,t.input,u):Id(u),h=await WW(d,n,t.response,c);return{startTimestamp:s,endTimestamp:i,url:o,method:a,statusCode:l,request:f,response:h}}function jW({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const s=n?KW(n,t):{};if(!e)return Vo(s,r,void 0);const i=FA(n),[o,a]=LA(i,Je),l=Vo(s,r,o);return a?Lp(l,a):l}async function WW(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,s){if(!e&&s!==void 0)return Id(s);const i=r?EO(r.headers,n):{};if(!r||!t&&s!==void 0)return Vo(i,s,void 0);const[o,a]=await GW(r),l=qW(o,{networkCaptureBodies:t,responseBodySize:s,captureDetails:e,headers:i});return a?Lp(l,a):l}function qW(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:s}){try{const i=e!=null&&e.length&&n===void 0?jm(e):n;return r?t?Vo(s,i,e):Vo(s,i,void 0):Id(i)}catch(i){return Qe&&Je.exception(i,"Failed to serialize response body"),Vo(s,n,void 0)}}async function GW(e){const t=YW(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await XW(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(Qe&&Je.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(Qe&&Je.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function EO(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function KW(e,t){return e.length===1&&typeof e[0]!="string"?Zk(e[0],t):e.length===2?Zk(e[1],t):{}}function Zk(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?EO(n,t):Array.isArray(n)?{}:Xy(n,t):{}}function YW(e){try{return e.clone()}catch(t){Qe&&Je.exception(t,"Failed to clone response body")}}function XW(e){return new Promise((t,n)=>{const r=wf(()=>n(new Error("Timeout while trying to read response body")),500);QW(e).then(s=>t(s),s=>n(s)).finally(()=>clearTimeout(r))})}async function QW(e){return await e.text()}async function JW(e,t,n){try{const r=eq(e,t,n),s=xO("resource.xhr",r);_O(n.replay,s)}catch(r){Qe&&Je.exception(r,"Failed to capture xhr breadcrumb")}}function ZW(e,t){const{xhr:n,input:r}=t;if(!n)return;const s=jm(r),i=n.getResponseHeader("content-length")?kO(n.getResponseHeader("content-length")):rq(n.response,n.responseType);s!==void 0&&(e.data.request_body_size=s),i!==void 0&&(e.data.response_body_size=i)}function eq(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r,input:o,xhr:a}=t,{url:l,method:u,status_code:c=0,request_body_size:d,response_body_size:f}=e.data;if(!l)return null;if(!a||!Fp(l,n.networkDetailAllowUrls)||Fp(l,n.networkDetailDenyUrls)){const T=Id(d),R=Id(f);return{startTimestamp:s,endTimestamp:i,url:l,method:u,statusCode:c,request:T,response:R}}const h=a[Ra],g=h?Xy(h.request_headers,n.networkRequestHeaders):{},m=Xy($A(a),n.networkResponseHeaders),[y,w]=n.networkCaptureBodies?LA(o,Je):[void 0],[b,S]=n.networkCaptureBodies?tq(a):[void 0],_=Vo(g,d,y),k=Vo(m,f,b);return{startTimestamp:s,endTimestamp:i,url:l,method:u,statusCode:c,request:w?Lp(_,w):_,response:S?Lp(k,S):k}}function tq(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return nq(e.response,e.responseType)}catch(n){t.push(n)}return Qe&&Je.warn("Failed to get xhr response body",...t),[void 0]}function nq(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 Qe&&Je.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Qe&&Je.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function rq(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return jm(n)}catch{return}}function sq(e){const t=mt();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:i,networkResponseHeaders:o}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:i,networkResponseHeaders:o};t&&t.on("beforeAddBreadcrumb",(l,u)=>iq(a,l,u))}catch{}}function iq(e,t,n){if(t.data)try{oq(t)&&lq(n)&&(ZW(t,n),JW(t,n,e)),aq(t)&&uq(n)&&(zW(t,n),UW(t,n,e))}catch(r){Qe&&Je.exception(r,"Error when enriching network breadcrumb")}}function oq(e){return e.category==="xhr"}function aq(e){return e.category==="fetch"}function lq(e){return e==null?void 0:e.xhr}function uq(e){return e==null?void 0:e.response}function cq(e){const t=mt();AA(U6(e)),Nm(FW(e)),TW(e),sq(e);const n=MW(e);G5(n),t&&(t.on("beforeSendEvent",EW(e)),t.on("afterSendEvent",_W(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)=>{var o;const i=e.getSessionId();s!=null&&s.includeReplay&&e.isEnabled()&&i&&((o=r.contexts)!=null&&o.feedback)&&(r.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),r.contexts.feedback.replay_id=i)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}async function dq(e){try{return Promise.all(Hm(e,[fq(Kt.performance.memory)]))}catch{return[]}}function fq(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 hq(e,t,n){return O4(e,t,{...n,setTimeoutImpl:wf})}const is=pt.navigator;function pq(){return/iPhone|iPad|iPod/i.test((is==null?void 0:is.userAgent)??"")||/Macintosh/i.test((is==null?void 0:is.userAgent)??"")&&(is!=null&&is.maxTouchPoints)&&(is==null?void 0:is.maxTouchPoints)>1?{sampling:{mousemove:!1}}:{}}function mq(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){Qe&&Je.warn("Received replay event after session expired.");return}const s=r||!t;t=!0,e.clickDetector&&F6(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&s&&e.setInitialState(),!x1(e,n,s))return!0;if(!s)return!1;const i=e.session;if(vq(e,s),e.recordingMode==="buffer"&&i&&e.eventBuffer&&!i.dirty){const o=e.eventBuffer.getEarliestTimestamp();o&&(Qe&&Je.log(`Updating session start time to earliest event in buffer to ${new Date(o)}`),i.started=o,e.getOptions().stickySession&&zm(i))}return i!=null&&i.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function gq(e){const t=e.getOptions();return{type:ct.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 vq(e,t){!t||!e.session||e.session.segmentId!==0||x1(e,gq(e),!1)}function yq(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function bq(e,t,n,r){return la(FI(e,G0(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function wq({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
|
|
59
|
+
`;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 Sq({client:e,scope:t,replayId:n,event:r}){const s=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,i={event_id:n,integrations:s};e.emit("preprocessEvent",r,i);const o=await zI(e.getOptions(),r,i,t,e,_i());if(!o)return null;e.emit("postprocessEvent",o,i),o.platform=o.platform||"javascript";const a=e.getSdkMetadata(),{name:l,version:u,settings:c}=(a==null?void 0:a.sdk)||{};return o.sdk={...o.sdk,name:l||"sentry.javascript.unknown",version:u||"0.0.0",settings:c},o}async function _q({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:s,session:i}){const o=wq({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:l,traceIds:u,initialTimestamp:c}=r,d=mt(),f=Dt(),h=d==null?void 0:d.getTransport(),g=d==null?void 0:d.getDsn();if(!d||!h||!g||!i.sampled)return Promise.resolve({});const m={type:J8,replay_start_timestamp:c/1e3,timestamp:s/1e3,error_ids:l,trace_ids:u,urls:a,replay_id:t,segment_id:n,replay_type:i.sampled},y=await Sq({scope:f,client:d,replayId:t,event:m});if(!y)return d.recordDroppedEvent("event_processor","replay"),Qe&&Je.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete y.sdkProcessingMetadata;const w=bq(y,o,g,d.getOptions().tunnel);let b;try{b=await h.send(w)}catch(_){const k=new Error(f1);try{k.cause=_}catch{}throw k}if(typeof b.statusCode=="number"&&(b.statusCode<200||b.statusCode>=300))throw new CO(b.statusCode);const S=JI({},b);if(QI(S,"replay"))throw new C1(S);return b}class CO extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class C1 extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function TO(e,t={count:0,interval:sj}){const{recordingData:n,onError:r}=e;if(n.length)try{return await _q(e),!0}catch(s){if(s instanceof CO||s instanceof C1)throw s;if(W5("Replays",{_retryCount:t.count}),r&&r(s),t.count>=ij){const i=new Error(`${f1} - max retries exceeded`);try{i.cause=s}catch{}throw i}return t.interval*=++t.count,new Promise((i,o)=>{wf(async()=>{try{await TO(e,t),i(!0)}catch(a){o(a)}},t.interval)})}}const RO="__THROTTLED",kq="__SKIPPED";function xq(e,t,n){const r=new Map,s=a=>{const l=a-n;r.forEach((u,c)=>{c<l&&r.delete(c)})},i=()=>[...r.values()].reduce((a,l)=>a+l,0);let o=!1;return(...a)=>{const l=Math.floor(Date.now()/1e3);if(s(l),i()>=t){const c=o;return o=!0,c?kq:RO}o=!1;const u=r.get(l)||0;return r.set(l,u+1),e(...a)}}class Eq{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:Z8,sessionIdleExpire:ej},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=hq(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=xq((o,a)=>bW(this,o,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:s}=this.getOptions(),i=r?{threshold:Math.min(oj,r),timeout:r,scrollTimeout:aj,ignoreSelector:s?s.join(","):""}:void 0;if(i&&(this.clickDetector=new O6(this,i)),Qe){const o=t._experiments;Je.setConfig({captureExceptions:!!o.captureExceptions,traceInternals:!!o.traceInternals})}this._handleVisibilityChange=()=>{Kt.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const o=pi({category:"ui.blur"});this._doChangeToBackgroundTasks(o)},this._handleWindowFocus=()=>{const o=pi({category:"ui.focus"});this._doChangeToForegroundTasks(o)},this._handleKeyboardEvent=o=>{W6(this,o)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){Qe&&Je.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){Qe&&Je.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",Qe&&Je.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){Qe&&Je.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){Qe&&Je.log("Buffering is in progress, call `flush()` to save the replay");return}Qe&&Je.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=lv({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){Qe&&Je.log("Buffering is in progress, call `flush()` to save the replay");return}Qe&&Je.infoTick("Starting replay in buffer mode");const t=lv({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=Gi({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:rj}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:mq(this),...pq(),onMutation:this._onMutationHandler.bind(this),...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){var r;if(this._isEnabled){this._isEnabled=!1,this.recordingMode="buffer";try{Qe&&Je.log(`Stopping Replay${n?` triggered by ${n}`:""}`),SO(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),(r=this.eventBuffer)==null||r.destroy(),this.eventBuffer=null,pW(this)}catch(s){this.handleException(s)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),Qe&&Je.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),Qe&&Je.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();Qe&&Je.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){var n,r;if(!(t&&((n=this.session)==null?void 0:n.sampled)===!1))return(r=this.session)==null?void 0:r.id}checkAndHandleExpiredSession(){if(this._lastActivity&&Ky(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${Kt.location.pathname}${Kt.location.hash}${Kt.location.search}`,n=`${Kt.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===RO){const s=pi({category:"replay.throttled"});this.addUpdate(()=>!x1(this,{type:E6,timestamp:s.timestamp||0,data:{tag:"breadcrumb",payload:s,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||er(),n=t&&Yn(t),s=(n&&bt(n).data||{})[Fr];if(!(!n||!s||!["route","custom"].includes(s)))return bt(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=dW({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=lv({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 vO(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{Kt.document.addEventListener("visibilitychange",this._handleVisibilityChange),Kt.addEventListener("blur",this._handleWindowBlur),Kt.addEventListener("focus",this._handleWindowFocus),Kt.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(cq(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=sW(this)}_removeListeners(){try{Kt.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Kt.removeEventListener("blur",this._handleWindowBlur),Kt.removeEventListener("focus",this._handleWindowFocus),Kt.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){!this.session||gO(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()){Qe&&Je.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:ct.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=Y6(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(Hm(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){var n;const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){Qe&&Je.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!((n=this.eventBuffer)!=null&&n.hasEvents)&&(await dq(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const r=Date.now();if(r-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const s=this._popEventContext(),i=this.session.segmentId++;this._maybeSaveSession();const o=await this.eventBuffer.finish();await TO({replayId:t,recordingData:o,segmentId:i,eventContext:s,session:this.session,timestamp:r,onError:a=>this.handleException(a)})}catch(r){this.handleException(r),this.stop({reason:"sendReplay"});const s=mt();if(s){const i=r instanceof C1?"ratelimit_backoff":"send_error";s.recordDroppedEvent(i,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){Qe&&Je.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,s=Date.now()-n;this._debouncedFlush.cancel();const i=s<this._options.minReplayDuration,o=s>this._options.maxReplayDuration+5e3;if(i||o){Qe&&Je.log(`Session duration (${Math.floor(s/1e3)}s) is too ${i?"short":"long"}, not sending replay.`),i&&this._debouncedFlush();return}const a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&Qe&&Je.log("Flushing initial segment without checkout.");const l=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(u){this.handleException(u)}finally{this._flushLock=void 0,l&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&zm(this.session)}_onMutationHandler(t){const{ignoreMutations:n}=this._options._experiments;if(n!=null&&n.length&&t.some(a=>{const l=yq(a.target),u=n.join(",");return l==null?void 0:l.matches(u)}))return!1;const r=t.length,s=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,o=s&&r>s;if(r>i||o){const a=pi({category:"replay.mutations",data:{count:r,limit:o}});this._createCustomBreadcrumb(a)}return o?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function Rc(e,t){return[...e,...t].join(",")}function Cq({mask:e,unmask:t,block:n,unblock:r,ignore:s}){const i=["base","iframe[srcdoc]:not([src])"],o=Rc(e,[".sentry-mask","[data-sentry-mask]"]),a=Rc(t,[]);return{maskTextSelector:o,unmaskTextSelector:a,blockSelector:Rc(n,[".sentry-block","[data-sentry-block]",...i]),unblockSelector:Rc(r,[]),ignoreSelector:Rc(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function Tq({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 ex='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',Rq=["content-length","content-type","accept"],Pq=Symbol.for("sentry__originalRequestBody");let tx=!1,nx=!1;function Iq(){if(typeof Request>"u"||nx)return;const e=Request;try{const t=function(n,r){const s=new e(n,r);return(r==null?void 0:r.body)!=null&&(s[Pq]=r.body),s};t.prototype=e.prototype,pt.Request=t,nx=!0}catch{}}const Aq=e=>new Oq(e);class Oq{constructor({flushMinDelay:t=tj,flushMaxDelay:n=nj,minReplayDuration:r=lj,maxReplayDuration:s=Dk,stickySession:i=!0,useCompression:o=!0,workerUrl:a,_experiments:l={},maskAllText:u=!0,maskAllInputs:c=!0,blockAllMedia:d=!0,mutationBreadcrumbLimit:f=750,mutationLimit:h=1e4,slowClickTimeout:g=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:y=[],networkDetailDenyUrls:w=[],networkCaptureBodies:b=!0,networkRequestHeaders:S=[],networkResponseHeaders:_=[],mask:k=[],maskAttributes:T=["title","placeholder","aria-label"],unmask:R=[],block:x=[],unblock:I=[],ignore:P=[],maskFn:A,beforeAddRecordingEvent:L,beforeErrorSampling:B,onError:O,attachRawBodyFromRequest:F=!1}={}){this.name="Replay";const W=Cq({mask:k,unmask:R,block:x,unblock:I,ignore:P});if(this._recordingOptions={maskAllInputs:c,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:A,maskInputFn:A,maskAttributeFn:(X,V,z)=>Tq({maskAttributes:T,maskAllText:u,privacyOptions:W,key:X,value:V,el:z}),...W,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:X=>{try{X.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!l.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,uj),maxReplayDuration:Math.min(s,Dk),stickySession:i,useCompression:o,workerUrl:a,blockAllMedia:d,maskAllInputs:c,maskAllText:u,mutationBreadcrumbLimit:f,mutationLimit:h,slowClickTimeout:g,slowClickIgnoreSelectors:m,networkDetailAllowUrls:y,networkDetailDenyUrls:w,networkCaptureBodies:b,networkRequestHeaders:rx(S),networkResponseHeaders:rx(_),beforeAddRecordingEvent:L,beforeErrorSampling:B,onError:O,attachRawBodyFromRequest:F,_experiments:l},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${ex}`:ex,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&Dy())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return tx}set _isInitialized(t){tx=t}afterAllSetup(t){!Dy()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&Iq(),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){var n;if((n=this._replay)!=null&&n.isEnabled())return this._replay.getSessionId(t)}getRecordingMode(){var t;if((t=this._replay)!=null&&t.isEnabled())return this._replay.recordingMode}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=Dq(this._initialOptions,t);this._replay=new Eq({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function Dq(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},s=ul(n.replaysSessionSampleRate),i=ul(n.replaysOnErrorSampleRate);return s==null&&i==null&&co(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),s!=null&&(r.sessionSampleRate=s),i!=null&&(r.errorSampleRate=i),r}function rx(e){return[...Rq,...e.map(t=>t.toLowerCase())]}function Mq(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function PO(e){try{return new URL(e,Et.location.origin).href}catch{return}}function Lq(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function IO(e){try{return new Headers(e)}catch{return}}const sx=new WeakMap,uv=new Map,AO={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function Fq(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:s,shouldCreateSpanForRequest:i,enableHTTPTimings:o,tracePropagationTargets:a,onRequestSpanStart:l,onRequestSpanEnd:u}={...AO,...t},c=typeof i=="function"?i:g=>!0,d=g=>$q(g,a),f={},h=e.getOptions().propagateTraceparent;n&&(e.addEventProcessor(g=>(g.type==="transaction"&&g.spans&&g.spans.forEach(m=>{if(m.op==="http.client"){const y=uv.get(m.span_id);y&&(m.timestamp=y/1e3,uv.delete(m.span_id))}}),g)),s&&hz(g=>{if(g.response){const m=sx.get(g.response);m&&g.endTimestamp&&uv.set(m,g.endTimestamp)}}),dA(g=>{const m=rz(g,c,d,f,{propagateTraceparent:h,onRequestSpanEnd:u});if(g.response&&g.fetchData.__span&&sx.set(g.response,g.fetchData.__span),m){const y=PO(g.fetchData.url),w=y?Qa(y).host:void 0;m.setAttributes({"http.url":y,"server.address":w}),o&&ix(m),l==null||l(m,{headers:g.headers})}})),r&&DA(g=>{var y;const m=Nq(g,c,d,f,h,u);m&&(o&&ix(m),l==null||l(m,{headers:IO((y=g.xhr.__sentry_xhr_v3__)==null?void 0:y.request_headers)}))})}function ix(e){const{url:t}=bt(e).data;if(!t||typeof t!="string")return;const n=dl("resource",({entries:r})=>{r.forEach(s=>{Lq(s)&&s.name.endsWith(t)&&(e.setAttributes(IA(s)),setTimeout(n))})})}function $q(e,t){const n=oc();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?Wi(r.toString(),t)||i&&Wi(r.pathname,t):i}else{const r=!!e.match(/^\/(?!\/)/);return t?Wi(e,t):r}}function Nq(e,t,n,r,s,i){const o=e.xhr,a=o==null?void 0:o[Ra];if(!o||o.__sentry_own_request__||!a)return;const{url:l,method:u}=a,c=gs()&&t(l);if(e.endTimestamp&&c){const w=o.__sentry_xhr_span_id__;if(!w)return;const b=r[w];b&&a.status_code!==void 0&&(wI(b,a.status_code),b.end(),i==null||i(b,{headers:IO($A(o)),error:e.error}),delete r[w]);return}const d=PO(l),f=Qa(d||l),h=E4(l),g=!!er(),m=c&&g?Qo({name:`${u} ${h}`,attributes:{url:l,type:"xhr","http.method":u,"http.url":d,"server.address":f==null?void 0:f.host,[dn]:"auto.http.browser",[io]:"http.client",...(f==null?void 0:f.search)&&{"http.query":f==null?void 0:f.search},...(f==null?void 0:f.hash)&&{"http.fragment":f==null?void 0:f.hash}}}):new Xo;o.__sentry_xhr_span_id__=m.spanContext().spanId,r[o.__sentry_xhr_span_id__]=m,n(l)&&Bq(o,gs()&&g?m:void 0,s);const y=mt();return y&&y.emit("beforeOutgoingRequestSpan",m,e),m}function Bq(e,t,n){const{"sentry-trace":r,baggage:s,traceparent:i}=oA({span:t,propagateTraceparent:n});r&&Vq(e,r,s,i)}function Vq(e,t,n,r){var i;const s=(i=e.__sentry_xhr_v3__)==null?void 0:i.request_headers;if(!(s!=null&&s["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),r&&!(s!=null&&s.traceparent)&&e.setRequestHeader("traceparent",r),n){const o=s==null?void 0:s.baggage;(!o||!Mq(o))&&e.setRequestHeader("baggage",n)}}catch{}}function Uq(){Et.document?Et.document.addEventListener("visibilitychange",()=>{const e=er();if(!e)return;const t=Yn(e);if(Et.document.hidden&&t){const n="cancelled",{op:r,status:s}=bt(t);ys&&Ae.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),s||t.setStatus({code:Dn,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):ys&&Ae.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const zq=3600,OO="sentry_previous_trace",Hq="sentry.previous_trace";function jq(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let s=r?Gq():void 0;e.on("spanStart",o=>{if(Yn(o)!==o)return;const a=Dt().getPropagationContext();s=Wq(s,o,a),r&&qq(s)});let i=!0;n&&e.on("beforeSampling",o=>{if(!s)return;const a=Dt(),l=a.getPropagationContext();if(i&&l.parentSpanId){i=!1;return}a.setPropagationContext({...l,dsc:{...l.dsc,sample_rate:String(s.sampleRate),sampled:String(Qy(s.spanContext))},sampleRand:s.sampleRand}),o.parentSampled=Qy(s.spanContext),o.parentSampleRate=s.sampleRate,o.spanAttributes={...o.spanAttributes,[bI]:s.sampleRate}})}function Wq(e,t,n){const r=bt(t);function s(){var a,l;try{return Number((a=n.dsc)==null?void 0:a.sample_rate)??Number((l=r.data)==null?void 0:l[U0])}catch{return 0}}const i={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:s(),sampleRand:n.sampleRand};if(!e)return i;const o=e.spanContext;return o.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=zq&&(ys&&Ae.log(`Adding previous_trace \`${JSON.stringify(o)}\` link to span \`${JSON.stringify({op:r.op,...t.spanContext()})}\``),t.addLink({context:o,attributes:{[y3]:"previous_trace"}}),t.setAttribute(Hq,`${o.traceId}-${o.spanId}-${Qy(o)?1:0}`)),i)}function qq(e){try{Et.sessionStorage.setItem(OO,JSON.stringify(e))}catch(t){ys&&Ae.warn("Could not store previous trace in sessionStorage",t)}}function Gq(){var e;try{const t=(e=Et.sessionStorage)==null?void 0:e.getItem(OO);return JSON.parse(t)}catch{return}}function Qy(e){return e.traceFlags===1}const Kq="BrowserTracing",Yq={...Oh,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:{},...AO},ox=(e={})=>{const t={name:void 0,source:void 0},n=Et.document,{enableInp:r,enableElementTiming:s,enableLongTask:i,enableLongAnimationFrame:o,_experiments:{enableInteractions:a,enableStandaloneClsSpans:l,enableStandaloneLcpSpans:u},beforeStartSpan:c,idleTimeout:d,finalTimeout:f,childSpanTimeout:h,markBackgroundSpan:g,traceFetch:m,traceXHR:y,trackFetchStreamPerformance:w,shouldCreateSpanForRequest:b,enableHTTPTimings:S,ignoreResourceSpans:_,ignorePerformanceApiSpans:k,instrumentPageLoad:T,instrumentNavigation:R,detectRedirects:x,linkPreviousTrace:I,consistentTraceSampling:P,enableReportPageLoaded:A,onRequestSpanStart:L,onRequestSpanEnd:B}={...Yq,...e};let O,F,W;function X(V,z,M=!0){const re=z.op==="pageload",H=z.name,j=c?c(z):z,pe=j.attributes||{};if(H!==j.name&&(pe[Fr]="custom",j.attributes=pe),!M){const q=kl();Qo({...j,startTime:q}).end(q);return}t.name=j.name,t.source=pe[Fr];const J=UI(j,{idleTimeout:d,finalTimeout:f,childSpanTimeout:h,disableAutoFinish:re,beforeSpanEnd:q=>{O==null||O(),_H(q,{recordClsOnPageloadSpan:!l,recordLcpOnPageloadSpan:!u,ignoreResourceSpans:_,ignorePerformanceApiSpans:k}),lx(V,void 0);const he=Dt(),ne=he.getPropagationContext();he.setPropagationContext({...ne,traceId:J.spanContext().traceId,sampled:aa(J),dsc:oo(q)}),re&&(W=void 0)},trimIdleSpanEndTimestamp:!A});re&&A&&(W=J),lx(V,J);function we(){n&&["interactive","complete"].includes(n.readyState)&&V.emit("idleSpanEnableAutoFinish",J)}re&&!A&&n&&(n.addEventListener("readystatechange",()=>{we()}),we())}return{name:Kq,setup(V){if(G3(),O=mH({recordClsStandaloneSpans:l||!1,recordLcpStandaloneSpans:u||!1,client:V}),r&&KH(),s&&MH(),o&&pt.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?vH():i&&gH(),a&&yH(),x&&n){const M=()=>{F=_n()};addEventListener("click",M,{capture:!0}),addEventListener("keydown",M,{capture:!0,passive:!0})}function z(){const M=Ad(V);M&&!bt(M).timestamp&&(ys&&Ae.log(`[Tracing] Finishing current active span with op: ${bt(M).op}`),M.setAttribute(xd,"cancelled"),M.end())}V.on("startNavigationSpan",(M,re)=>{if(mt()!==V)return;if(re!=null&&re.isRedirect){ys&&Ae.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),X(V,{op:"navigation.redirect",...M},!1);return}F=void 0,z(),_i().setPropagationContext({traceId:so(),sampleRand:Math.random(),propagationSpanId:gs()?void 0:qi()});const H=Dt();H.setPropagationContext({traceId:so(),sampleRand:Math.random(),propagationSpanId:gs()?void 0:qi()}),H.setSDKProcessingMetadata({normalizedRequest:void 0}),X(V,{op:"navigation",...M,parentSpan:null,forceTransaction:!0})}),V.on("startPageLoadSpan",(M,re={})=>{if(mt()!==V)return;z();const H=re.sentryTrace||ax("sentry-trace"),j=re.baggage||ax("baggage"),pe=N3(H,j),J=Dt();J.setPropagationContext(pe),gs()||(J.getPropagationContext().propagationSpanId=qi()),J.setSDKProcessingMetadata({normalizedRequest:t1()}),X(V,{op:"pageload",...M})}),V.on("endPageloadSpan",()=>{A&&W&&(W.setAttribute(xd,"reportPageLoaded"),W.end())})},afterAllSetup(V){let z=oc();if(I!=="off"&&jq(V,{linkPreviousTrace:I,consistentTraceSampling:P}),Et.location){if(T){const M=qr();Xq(V,{name:Et.location.pathname,startTime:M?M/1e3:void 0,attributes:{[Fr]:"url",[dn]:"auto.pageload.browser"}})}R&&Nm(({to:M,from:re})=>{if(re===void 0&&(z==null?void 0:z.indexOf(M))!==-1){z=void 0;return}z=void 0;const H=e1(M),j=Ad(V),pe=j&&x&&Jq(j,F);DO(V,{name:(H==null?void 0:H.pathname)||Et.location.pathname,attributes:{[Fr]:"url",[dn]:"auto.navigation.browser"}},{url:M,isRedirect:pe})})}g&&Uq(),a&&Qq(V,d,f,h,t),r&&QH(),Fq(V,{traceFetch:m,traceXHR:y,trackFetchStreamPerformance:w,tracePropagationTargets:V.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:b,enableHTTPTimings:S,onRequestSpanStart:L,onRequestSpanEnd:B})}}};function Xq(e,t,n){e.emit("startPageLoadSpan",t,n),Dt().setTransactionName(t.name);const r=Ad(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function DO(e,t,n){const{url:r,isRedirect:s}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:s}),e.emit("startNavigationSpan",t,{isRedirect:s});const i=Dt();return i.setTransactionName(t.name),r&&!s&&i.setSDKProcessingMetadata({normalizedRequest:{...t1(),url:r}}),Ad(e)}function ax(e){const t=Et.document,n=t==null?void 0:t.querySelector(`meta[name=${e}]`);return(n==null?void 0:n.getAttribute("content"))||void 0}function Qq(e,t,n,r,s){const i=Et.document;let o;const a=()=>{const l="ui.action.click",u=Ad(e);if(u){const c=bt(u).op;if(["navigation","pageload"].includes(c)){ys&&Ae.warn(`[Tracing] Did not create ${l} span because a pageload or navigation span is in progress.`);return}}if(o&&(o.setAttribute(xd,"interactionInterrupted"),o.end(),o=void 0),!s.name){ys&&Ae.warn(`[Tracing] Did not create ${l} transaction because _latestRouteName is missing.`);return}o=UI({name:s.name,op:l,attributes:{[Fr]:s.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};i&&addEventListener("click",a,{capture:!0})}const MO="_sentry_idleSpan";function Ad(e){return e[MO]}function lx(e,t){es(e,MO,t)}const ux=1.5;function Jq(e,t){const n=bt(e),r=kl(),s=n.start_timestamp;return!(r-s>ux||t&&r-t<=ux)}const LO=["activate","mount"],FO=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Zq=/(?:^|[-_])(\w)/g,eG=e=>e.replace(Zq,t=>t.toUpperCase()).replace(/[-_]/g,""),tG="<Root>",cv="<Anonymous>",nG=(e,t)=>e.repeat(t),sd=(e,t)=>{if(!e)return cv;if(e.$root===e)return tG;if(!e.$options)return cv;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?`<${eG(r)}>`:cv)+(s&&t!==!1?` at ${s}`:"")},rG=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`
|
|
60
|
+
|
|
61
|
+
found in
|
|
62
|
+
|
|
63
|
+
${t.map((s,i)=>`${(i===0?"---> ":nG(" ",5+i*2))+(Array.isArray(s)?`${sd(s[0])}... (${s[1]} recursive calls)`:sd(s))}`).join(`
|
|
64
|
+
`)}`}return`
|
|
65
|
+
|
|
66
|
+
(found in ${sd(e)})`},sG=(e,t)=>{const{errorHandler:n}=e.config;e.config.errorHandler=(r,s,i)=>{var u;const o=sd(s,!1),a=s?rG(s):"",l={componentName:o,lifecycleHook:i,trace:a};if((t==null?void 0:t.attachProps)!==!1&&s&&((u=s.$options)!=null&&u.propsData?l.propsData=s.$options.propsData:s.$props&&(l.propsData=s.$props)),setTimeout(()=>{gi(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}},cx="ui.vue",iG={activate:["activated","deactivated"],create:["beforeCreate","created"],unmount:["beforeUnmount","unmounted"],destroy:["beforeDestroy","destroyed"],mount:["beforeMount","mounted"],update:["beforeUpdate","updated"]};function dv(e,t,n){e.$_sentryRootComponentSpanTimer&&clearTimeout(e.$_sentryRootComponentSpanTimer),e.$_sentryRootComponentSpanTimer=setTimeout(()=>{var r;(r=e.$root)!=null&&r.$_sentryRootComponentSpan&&(e.$root.$_sentryRootComponentSpan.end(t),e.$root.$_sentryRootComponentSpan=void 0)},n)}function oG(e,t){function n(s){return s.replace(/^<([^\s]*)>(?: at [^\s]*)?$/,"$1")}return e.some(s=>n(t)===n(s))}const aG=(e={})=>{const t=(e.hooks||[]).concat(LO).filter((s,i,o)=>o.indexOf(s)===i),n={},r=e.timeout||2e3;for(const s of t){const i=iG[s];if(!i){FO&&Ae.warn(`Unknown hook: ${s}`);continue}for(const o of i)n[o]=function(){var f;const a=this.$root===this;a&&(this.$_sentryRootComponentSpan=this.$_sentryRootComponentSpan||Qo({name:"Application Render",op:`${cx}.render`,attributes:{[dn]:"auto.ui.vue"},onlyIfParent:!0}),dv(this,_n(),r));const l=sd(this,!1);if(!(a||(Array.isArray(e.trackComponents)?oG(e.trackComponents,l):e.trackComponents))){dv(this,_n(),r);return}this.$_sentryComponentSpans=this.$_sentryComponentSpans||{};const c=o===i[0],d=((f=this.$root)==null?void 0:f.$_sentryRootComponentSpan)||er();if(c){if(d){const h=this.$_sentryComponentSpans[s];h&&h.end(),this.$_sentryComponentSpans[s]=Qo({name:`Vue ${l}`,op:`${cx}.${s}`,attributes:{[dn]:"auto.ui.vue"},onlyIfParent:!0})}}else{const h=this.$_sentryComponentSpans[s];if(!h)return;h.end(),dv(this,_n(),r)}}}return n},lG=pt,uG={Vue:lG.Vue,attachProps:!0,attachErrorHandler:!0,tracingOptions:{hooks:LO,timeout:2e3,trackComponents:!1}},cG="Vue",dG=(e={})=>({name:cG,setup(t){const n={...uG,...t.getOptions(),...e};if(!n.Vue&&!n.app){co(()=>{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=>dx(s,n)):n.Vue&&dx(n.Vue,n)}}),dx=(e,t)=>{var n;FO&&((n=e._instance)==null?void 0:n.isMounted)===!0&&co(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue app is already mounted. Make sure to call `app.mount()` after `Sentry.init()`.")}),t.attachErrorHandler&&sG(e,t),gs(t)&&e.mixin(aG(t.tracingOptions))};function fG(e={}){const t={defaultIntegrations:[...VA(),dG()],...e};return iA(t,"vue"),Q8(t)}function hG(e,t,n){let r=!1;e.onError(s=>gi(s,{mechanism:{handled:!1}})),e.beforeEach((s,i,o)=>{const a=r?void 0:pG(),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 f=s.query[d];f&&(l[`query.${d}`]=f)}let u=s.path,c="url";if(s.name&&t.routeLabel!=="path")u=s.name.toString(),c="custom";else if(s.matched.length>0){const d=s.matched.length-1;u=s.matched[d].path,c="route"}Dt().setTransactionName(u),t.instrumentPageLoad&&a&&(bt(a).data[Fr]!=="custom"&&(a.updateName(u),a.setAttribute(Fr,c)),a.setAttributes({...l,[dn]:"auto.pageload.vue"}),r=!0),t.instrumentNavigation&&!a&&n({name:u,op:"navigation",attributes:{...l,[dn]:"auto.navigation.vue",[Fr]:c}}),o&&o()})}function pG(){const e=er(),t=e&&Yn(e);return t&&bt(t).op==="pageload"?t:void 0}function mG(e={}){if(!e.router)return ox(e);const t=ox({...e,instrumentNavigation:!1}),{router:n,instrumentNavigation:r=!0,instrumentPageLoad:s=!0,routeLabel:i="name"}=e;return{...t,afterAllSetup(o){t.afterAllSetup(o),hG(n,{routeLabel:i,instrumentNavigation:r,instrumentPageLoad:s},l=>{DO(o,l)})}}}async function $O(){return"/"}async function sr(e=!0,t=!0){const n=bn.create({baseURL:await $O()});return n.interceptors.request.use(r=>{var s,i;return console.debug(`${(s=r.method)==null?void 0:s.toUpperCase().padEnd(6)} ${(i=r.url)==null?void 0:i.padEnd(25)} WithAuth: ${e==null?void 0:e.toString().padEnd(7)} AutoHandle401: ${t==null?void 0:t.toString().padEnd(7)} BaseURL: ${r.baseURL}`),r}),e&&n.interceptors.request.use(async r=>{const s=vs();return s.loadTokens(),s.hasAuthToken&&(r.headers.Authorization=`Bearer ${s.token}`),r},r=>(console.error("Error in axios request interceptor",r),Promise.reject(r))),t&&n.interceptors.response.use(r=>r,async r=>{var d;const{response:s,config:i}=r;if(!s)return console.error("No response was returned by axios",r),Promise.reject({message:`No response was returned by axios - URL ${i==null?void 0:i.url}`,stack:r.stack});if(s.status===Ta.FailedDependency)return Promise.reject(r);if(![Ta.Unauthorized,Ta.Forbidden].includes(s.status))return console.error("Error in axios response interceptor which is not 401 or 403",r),gi(r),Promise.reject({message:`${r.message} - URL ${i==null?void 0:i.url}`,stack:r.stack});if(s.status===Ta.Forbidden){const f=(d=r==null?void 0:r.response)==null?void 0:d.data;return console.error("[HttpClient] 403 Forbidden",f),Bn("auth:permission-denied").emit({roles:f==null?void 0:f.roles,permissions:f==null?void 0:f.permissions,error:f==null?void 0:f.error,url:i==null?void 0:i.url}),Promise.reject(r)}const o=vs();o.loadTokens();const{reasonCode:a,url:l}=o.extractSpecialReasonCode(r);if(a)return await o.logout(!1,D0(a)),console.error(`[AuthStore] 401 Unauthorized - emitting 'auth:${a}' with reason ${a}`),Bn(`auth:${a}`).emit({url:l,error:r.message,reasonCode:a}),Promise.reject(r);await o.checkAuthenticationRequirements();const{success:u,handled:c}=await o.verifyOrRefreshLoginOnceOrLogout();if(c)return Promise.reject(r);if(u){if(!(i!=null&&i.url))throw new Error("No URL in axios config, cannot retry");console.debug("Redoing request without interceptors",i==null?void 0:i.url);const f=i;return f.headers||(f.headers={}),f.headers.Authorization=`Bearer ${o.token}`,bn(f)}return console.error("[HttpClient] 401 Unauthorized - emitting 'auth:failure'"),Bn("auth:failure").emit({url:i==null?void 0:i.url,error:r.message}),Promise.reject(r)}),n}class Cr{static async get(t){return(await(await sr(!0)).get(t)).data}static async put(t,n){return(await(await sr(!0)).put(t,n)).data}static async post(t,n){return(await(await sr(!0)).post(t,n)).data}static async postUpload(t,n,r){return await(await sr(!0)).post(t,n,r)}static async getDownload(t,n){return await(await sr(!0)).request({method:"GET",url:t,data:n,responseType:"arraybuffer"})}static async delete(t,n){return(await(await sr(!0)).request({url:t,method:"delete",data:n})).data}static async patch(t,n){return(await(await sr(!0)).patch(t,n)).data}}const de=class de{};Se(de,"base","/api"),Se(de,"firstTimeSetupRoute",`${de.base}/first-time-setup`),Se(de,"completeFirstTimeSetupRoute",`${de.firstTimeSetupRoute}/complete`),Se(de,"printerRoute",`${de.base}/printer`),Se(de,"printerBatchRoute",`${de.printerRoute}/batch`),Se(de,"printerTestConnectionRoute",`${de.printerRoute}/test-connection`),Se(de,"printerSettingsRoute",`${de.base}/printer-settings`),Se(de,"floorRoute",`${de.base}/floor`),Se(de,"batchRoute",`${de.base}/batch`),Se(de,"batchGetLastPrintedFilesRoute",`${de.batchRoute}/reprint/list`),Se(de,"batchReprintFilesRoute",`${de.batchRoute}/reprint/execute`),Se(de,"printCompletionRoute",`${de.base}/print-completion`),Se(de,"printerFilesRoute",`${de.base}/printer-files`),Se(de,"printerFilesPurgeRoute",`${de.printerFilesRoute}/purge`),Se(de,"printerGroupRoute",`${de.base}/printer-group`),Se(de,"createGroupRoute",`${de.base}/printer-group`),Se(de,"customGCodeRoute",`${de.base}/custom-gcode`),Se(de,"userRoute",`${de.base}/user`),Se(de,"rolesRoute",`${de.base}/user/roles`),Se(de,"userProfileRoute",`${de.userRoute}/profile`),Se(de,"settingsRoute",`${de.base}/settings`),Se(de,"settingsSensitiveRoute",`${de.settingsRoute}/sensitive`),Se(de,"updateLoginRequiredRoute",`${de.settingsRoute}/login-required`),Se(de,"updateRegistrationEnabledRoute",`${de.settingsRoute}/registration-enabled`),Se(de,"updateCredentialSettings",`${de.settingsRoute}/credential`),Se(de,"fileCleanSettingsRoute",`${de.settingsRoute}/file-clean`),Se(de,"updateFrontendSettingsRoute",`${de.settingsRoute}/frontend`),Se(de,"updateTimeoutSettingRoute",`${de.settingsRoute}/timeout`),Se(de,"serverSentryDiagnosticsSettingRoute",`${de.settingsRoute}/sentry-diagnostics`),Se(de,"updateExperimentalMoonrakerSupportRoute",`${de.settingsRoute}/experimental-moonraker-support`),Se(de,"updateExperimentalThumbnailSupportRoute",`${de.settingsRoute}/experimental-thumbnail-support`),Se(de,"updateExperimentalClientSupportRoute",`${de.settingsRoute}/experimental-client-support`),Se(de,"updateExperimentalPrusaLinkSupportRoute",`${de.settingsRoute}/experimental-prusa-link-support`),Se(de,"deleteGroupRoute",t=>`${de.base}/printer-group/${t}`),Se(de,"updateGroupNameRoute",t=>`${de.base}/printer-group/${t}/name`),Se(de,"addPrinterToGroupRoute",t=>`${de.base}/printer-group/${t}/printer`),Se(de,"deletePrinterFromGroupRoute",de.addPrinterToGroupRoute),Se(de,"getPrinterRoute",t=>`${de.printerRoute}/${t}`),Se(de,"postPrinterDisabledReasonRoute",t=>`${de.printerRoute}/${t}/disabled-reason`),Se(de,"getPrinterLoginDetailsRoute",t=>`${de.getPrinterRoute(t)}/login-details`),Se(de,"restartOctoPrintRoute",t=>`${de.getPrinterRoute(t)}/restart-octoprint`),Se(de,"refreshSocketRoute",t=>`${de.getPrinterRoute(t)}/refresh-socket`),Se(de,"getPrinterSettingsRoute",t=>`${de.printerSettingsRoute}/${t}`),Se(de,"setPrinterSettingsGCodeAnalysisRoute",t=>`${de.getPrinterSettingsRoute(t)}/gcode-analysis`),Se(de,"syncPrinterNameSettingRoute",t=>`${de.getPrinterSettingsRoute(t)}/sync-printername`),Se(de,"getFloorRoute",t=>`${de.floorRoute}/${t}`),Se(de,"addOrRemovePrinterFromFloorRoute",t=>`${de.getFloorRoute(t)}/printer`),Se(de,"sendQuickStopM112Route",t=>`${de.customGCodeRoute}/send-emergency-m112/${t}`),Se(de,"updatePrinterFloorNameRoute",t=>`${de.getFloorRoute(t)}/name`),Se(de,"updatePrinterFloorNumberRoute",t=>`${de.getFloorRoute(t)}/floor-number`),Se(de,"printerFilesClearRoute",t=>`${de.printerFilesRoute}/${t}/clear`),Se(de,"printerFilesStartPrintRoute",t=>`${de.printerFilesRoute}/${t}/select`),Se(de,"printerFilesUploadRoute",t=>`${de.printerFilesRoute}/${t}/upload`),Se(de,"printerFilesCacheRoute",t=>`${de.printerFilesRoute}/${t}/cache`),Se(de,"printerEnabledRoute",t=>`${de.getPrinterRoute(t)}/enabled`),Se(de,"printerSerialConnectRoute",t=>`${de.getPrinterRoute(t)}/serial-connect`),Se(de,"printerJogCommandRoute",t=>`${de.getPrinterRoute(t)}/jog`),Se(de,"printerHomeCommandRoute",t=>`${de.getPrinterRoute(t)}/home`),Se(de,"printerSerialDisconnectRoute",t=>`${de.getPrinterRoute(t)}/serial-disconnect`),Se(de,"printerJobRoute",t=>`${de.getPrinterRoute(t)}/job`),Se(de,"printerStopJobRoute",t=>`${de.printerJobRoute(t)}/stop`),Se(de,"printerPauseJobRoute",t=>`${de.printerJobRoute(t)}/pause`),Se(de,"printerResumeJobRoute",t=>`${de.printerJobRoute(t)}/resume`),Se(de,"userChangeUsernameRoute",t=>`${de.userRoute}/${t}/change-username`),Se(de,"userChangePasswordRoute",t=>`${de.userRoute}/${t}/change-password`),Se(de,"userDeleteRoute",t=>`${de.userRoute}/${t}`),Se(de,"userSetVerifiedRoute",t=>`${de.userRoute}/${t}/set-verified`),Se(de,"userSetRootUserRoute",t=>`${de.userRoute}/${t}/set-root-user`),Se(de,"userSetUserRolesRoute",t=>`${de.userRoute}/${t}/set-user-roles`);let $e=de;const gG=Symbol("Progress snackbar message event symbol"),vG=Symbol("Info snackbar message event symbol"),yG=Symbol("Error snackbar message event symbol");function $t(){const{emit:e,on:t}=Bn(gG),{emit:n,on:r}=Bn(vG),{emit:s,on:i}=Bn(yG);return{openProgressMessage:(o,a,l,u)=>e({key:o,title:a,value:l,completed:u}),openInfoMessage:o=>n(o),info:(o,a,l)=>n({title:o,subtitle:a,timeout:l}),openErrorMessage:o=>s(o),error:(o,a)=>s({title:o,subtitle:a}),onProgressMessage:t,onInfoMessage:r,onErrorMessage:i}}function Jy(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 Ki extends Cr{static async getFiles(t){const n=`${$e.printerFilesRoute}/${t}`;return await this.get(n)}static async getThumbnail(t){const n=`${$e.printerFilesRoute}/${t}/thumbnail`;return await this.get(n)}static async getFileCache(t){const n=`${$e.printerFilesCacheRoute(t)}`;return await this.get(n)}static async selectAndPrintFile(t,n,r=!0){const s=$e.printerFilesStartPrintRoute(t);return await this.post(s,{filePath:n,print:r})}static async uploadFile(t,n,r=!0){const s=$e.printerFilesUploadRoute(t.id),i=new FormData;return i.append("startPrint",r.toString()),i.append("files[0]",n),this.postUpload(s,i,{onUploadProgress:o=>{$t().openProgressMessage("single-file-upload",`Uploading file ${n.name}`,100*o.loaded/o.total,!1)}})}static async clearFiles(t){const n=`${$e.printerFilesClearRoute(t)}`;return this.delete(n)}static async purgeFiles(){const t=`${$e.printerFilesPurgeRoute}`;return this.post(t)}static async deleteFileOrFolder(t,n){const r=`${$e.printerFilesRoute}/${t}?path=${encodeURIComponent(n)}`;return this.delete(r)}static async downloadFile(t,n){const r=`${$e.printerFilesRoute}/${t}/download/${encodeURIComponent(n)}`,s=await this.getDownload(r);Jy(s.data,n)}}const bG=["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"],wG=["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 fx(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function fc(){const e=Math.round(Math.random()*1124),t=Math.round(Math.random()*3260);return`${fx(bG[e])} ${fx(wG[t])}`}function Wm(e){var n,r;if(!(e!=null&&e.trim().length))return"?";const t=(r=(n=e==null?void 0:e.trim())==null?void 0:n.replace(/[^a-zA-Z ]/g,""))==null?void 0:r.split(" ").map(s=>s.length?s:"").slice(0,3).reduce((s,i)=>s+i[0],"");return t==null?void 0:t.replace("undefined","")}const Zy=()=>({id:void 0,name:fc(),apiKey:"",username:"",password:"",printerURL:"",printerType:0,enabled:!0});class tn extends Cr{static convertPrinterToCreateForm(t){const n=Zy();return n.id=t.id,n.printerURL=t.printerURL,n.name=t.name||fc(),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=$e.printerRoute;return await this.get(t)}static async getPrinterLoginDetails(t){const n=$e.getPrinterLoginDetailsRoute(t);return await this.get(n)}static async restartOctoPrint(t){const n=`${$e.restartOctoPrintRoute(t)}`;return await this.post(n)}static async refreshSocket(t){const n=`${$e.refreshSocketRoute(t)}`;return await this.post(n)}static async sendPrinterConnectCommand(t){const n=$e.printerSerialConnectRoute(t);return await this.post(n)}static async sendPrinterDisconnectCommand(t){const n=$e.printerSerialDisconnectRoute(t);return await this.post(n)}static async sendPrinterJogCommand(t,n){const r=$e.printerJogCommandRoute(t);return await this.post(r,n)}static async sendPrinterHomeCommand(t,n){const r=$e.printerHomeCommandRoute(t);return await this.post(r,n)}static async createPrinter(t,n){const r=`${$e.printerRoute}?forceSave=${n}`;return await this.post(r,t)}static async batchImportPrinters(t){const n=$e.printerBatchRoute;return await this.post(n,t)}static async deletePrinter(t){const n=$e.getPrinterRoute(t);return await this.delete(n)}static async updatePrinter(t,n,r){const i=`${$e.getPrinterRoute(t)}?forceSave=${r}`;return await this.patch(i,n)}static async updatePrinterMaintenance(t,n=null){const r=$e.postPrinterDisabledReasonRoute(t);return await this.patch(r,{disabledReason:n})}static async testConnection(t){const n=$e.printerTestConnectionRoute;return await this.post(n,t)}static async toggleEnabled(t,n){const r=$e.printerEnabledRoute(t);return await this.patch(r,{enabled:n})}}class En extends Cr{static async getSettings(){const t=$e.settingsRoute;return await this.get(t)}static async getSettingsSensitive(){const t=$e.settingsSensitiveRoute;return await this.get(t)}static async updateLoginRequiredSettings(t){const n=`${$e.updateLoginRequiredRoute}`;return await this.put(n,{loginRequired:t})}static async updateRegistrationEnabledSettings(t){const n=`${$e.updateRegistrationEnabledRoute}`;return await this.put(n,{registrationEnabled:t})}static async updateCredentialSettings(t,n,r){const s=`${$e.updateCredentialSettings}`;return await this.put(s,{jwtExpiresIn:t,refreshTokenAttempts:n,refreshTokenExpiry:r})}static async updateFrontendSettings(t){const n=`${$e.updateFrontendSettingsRoute}`;return await this.put(n,t)}static async setSentryDiagnosticsSettings(t){const n=`${$e.serverSentryDiagnosticsSettingRoute}`;return await this.patch(n,{enabled:t})}static async updateTimeoutSettings(t){const n=`${$e.updateTimeoutSettingRoute}`;return await this.put(n,t)}static async setFileCleanSettings(t){const n=`${$e.fileCleanSettingsRoute}`;return await this.put(n,t)}static async updateExperimentalMoonrakerSupport(t){const n=$e.updateExperimentalMoonrakerSupportRoute;return await this.put(n,{enabled:t})}static async updateExperimentalPrusaLinkSupport(t){const n=$e.updateExperimentalPrusaLinkSupportRoute;return await this.put(n,{enabled:t})}static async updateExperimentalClientSupport(t){const n=$e.updateExperimentalClientSupportRoute;return await this.put(n,{enabled:t})}}class Za extends Cr{static async stopPrintJob(t){const n=$e.printerStopJobRoute(t);return await this.post(n)}static async pausePrintJob(t){const n=$e.printerPauseJobRoute(t);return await this.post(n)}static async resumePrintJob(t){const n=$e.printerResumeJobRoute(t);return await this.post(n)}}const Ks=ks("Settings",{state:()=>({settings:void 0,frontendDebugSettings:{showPrinterStateUpdateSideNav:!1,showInterpretedPrinterState:!1,showJobsRendered:!1}}),actions:{async loadSettings(){const e=await En.getSettings();return this.settings=e,e},async updateFrontendSettings(e){const t=await En.updateFrontendSettings(e);return this.settings=t,t},async saveFrontendSettings(){if(!this.settings)return;const e=await En.updateFrontendSettings(this.settings.frontend);this.settings=e},async updateTimeoutSettings(e){const t=await En.updateTimeoutSettings(e);return this.settings=t,t}},getters:{serverSettings(){var e;return(e=this.settings)==null?void 0:e.server},frontendSettings(){var e;return(e=this.settings)==null?void 0:e.frontend},preferCancelOverQuickStop(){var e,t;return((t=(e=this.settings)==null?void 0:e.frontend)==null?void 0:t.tilePreferCancelOverQuickStop)||!1},thumbnailsEnabled(){var e;return((e=this.settings)==null?void 0:e.server.experimentalThumbnailSupport)||!1},largeTiles(){var e,t;return((t=(e=this.settings)==null?void 0:e.frontend)==null?void 0:t.largeTiles)||!1},gridCols(){var e,t;return((t=(e=this.settings)==null?void 0:e.frontend)==null?void 0:t.gridCols)||8},gridRows(){var e,t;return((t=(e=this.settings)==null?void 0:e.frontend)==null?void 0:t.gridRows)||8}}}),Ci={danger:"danger",dark:"dark",secondary:"secondary",success:"success"},Ti={DarkBlue:"#050c2e",Black:"#000000",DarkGray:"#262626",LightBrown:"#583c0e",Brown:"#580e47",Red:"#2e0905"},Ol={Disabled:"Disabled",Maintenance:"Maintenance",Offline:"Offline",Finding:"Finding",Disconnected:"Disconnected",Error:"Error",Paused:"Paused",Operational:"Operational",Printing:"Printing"};function NO(e,t,n){var f,h,g,m;const s=Ks().frontendDebugSettings.showInterpretedPrinterState,i={};if(!e.enabled)return(f=e.disabledReason)!=null&&f.length?{...i,color:Ci.danger,rgb:Ti.Black,text:Ol.Maintenance}:{...i,color:Ci.secondary,rgb:Ti.DarkBlue,text:Ol.Disabled};const o=(t==null?void 0:t.api)==="responding",a=(t==null?void 0:t.api)==="authFail";if(!o||!t){const y=(t==null?void 0:t.api)==="noResponse";return{...i,color:Ci.secondary,rgb:Ti.Red,text:a?"API key wrong":y?"API unreachable":(t==null?void 0:t.api)||"-"}}if(!o)return{...i,color:Ci.danger,rgb:Ti.Red,text:a?"API key wrong":"No API connection"};const l=t.socket==="authenticated",u=t.socket==="authenticating",c=(g=(h=n==null?void 0:n.current)==null?void 0:h.payload)==null?void 0:g.state,d=c==null?void 0:c.flags;if(!l||!d)return s&&console.debug(`Socket opened ${l?1:0}, socketAuthing ${u?1:0} printerState ${n?1:0},
|
|
67
|
+
currentState: ${c}, FLAGS ${d}`),{...i,color:Ci.danger,rgb:Ti.Red,text:n?"Awaiting state":"Unknown state"};if(!d){console.error("No flags",d);return}return d.error||d.closedOrError?{...i,color:Ci.danger,rgb:Ti.Red,text:((m=c.text)==null?void 0:m.replace("Offline","Disconnected"))||Ol.Error,description:c.error}:d.paused||d.pausing?{...i,color:Ci.success,rgb:Ti.Brown,text:Ol.Paused}:d.printing?{...i,color:Ci.success,rgb:Ti.LightBrown,text:Ol.Printing}:{...i,color:Ci.dark,rgb:Ti.DarkGray,text:Ol.Operational,description:c.error}}const el=e=>{var t,n;return(n=(t=e==null?void 0:e.current)==null?void 0:t.payload)==null?void 0:n.state},SG=e=>{var t;return(t=el(e))==null?void 0:t.flags.printing},_G=(e,t)=>{var n,r,s;return!qm(e)&&(e==null?void 0:e.enabled)&&!((n=el(t))!=null&&n.flags.operational)||((r=el(t))==null?void 0:r.flags.error)||((s=el(t))==null?void 0:s.flags.closedOrError)},BO=e=>!qm(e)&&!(e!=null&&e.enabled),qm=e=>{var t;return!(e!=null&&e.enabled)&&((t=e==null?void 0:e.disabledReason)==null?void 0:t.length)},kG=(e,t)=>{var n,r,s;return((n=el(t))==null?void 0:n.flags)&&!((r=el(t))!=null&&r.flags.printing)&&((s=el(t))==null?void 0:s.flags.operational)&&!BO(e)&&!qm(e)},cr=ks("PrinterState",{state:()=>({printerIds:[],printerEventsById:{},socketStatesById:{}}),getters:{operationalPrintersById(){const e=Xt(),t={};return this.printerIds.forEach(n=>{var s,i,o,a;const r=this.printerEventsById[n];if((a=(o=(i=(s=r==null?void 0:r.current)==null?void 0:s.payload)==null?void 0:i.state)==null?void 0:o.flags)!=null&&a.operational){const l=e.printer(n);if(l)t[n]=l;else throw new Error(`PrinterStore contains no printer with id ${n} but events are known`)}}),t},isPrinterOperational(){return e=>!!this.operationalPrintersById[e]},printingPrintersById(){const e={};return this.printerIds.forEach(t=>{var r,s,i,o;const n=this.printerEventsById[t];(o=(i=(s=(r=n==null?void 0:n.current)==null?void 0:r.payload)==null?void 0:s.state)==null?void 0:i.flags)!=null&&o.printing&&(e[t]=n)}),e},isPrinterPrinting(){return e=>!!this.printingPrintersById[e]},isPrinterStoppable(){return e=>{var r,s,i;const t=this.printerEventsById[e];if(!t)return!1;const n=(i=(s=(r=t==null?void 0:t.current)==null?void 0:r.payload)==null?void 0:s.state)==null?void 0:i.flags;return(n==null?void 0:n.printing)||(n==null?void 0:n.paused)||(n==null?void 0:n.pausing)}},isPrinterPaused(){return e=>{var r,s,i;const t=this.printerEventsById[e];if(!t)return!1;const n=(i=(s=(r=t==null?void 0:t.current)==null?void 0:r.payload)==null?void 0:s.state)==null?void 0:i.flags;return(n==null?void 0:n.paused)||(n==null?void 0:n.pausing)}},printerCurrentEventReceivedAtById(){const e={};return this.printerIds.forEach(t=>{var r;const n=this.printerEventsById[t];(r=n==null?void 0:n.current)!=null&&r.receivedAt&&(e[t]=n.current.receivedAt)}),e},onlinePrinters(){const e=Xt(),t={};return this.printerIds.forEach(n=>{const r=this.socketStatesById[n];if((r==null?void 0:r.api)==="responding"){const s=e.printer(n);if(s)t[n]=s;else throw new Error(`PrinterStore contains no printer with id ${n} but socket state is opened`)}}),t},onlinePrintersWithStates(){return Object.values(this.onlinePrinters).map(e=>({printer:e,printerState:this.printerEventsById[e.id]}))},printingCount(){const e=cr();return Object.values(e.onlinePrintersWithStates).filter(t=>SG(t.printerState)).length},operationalNotPrintingCount(){return this.onlinePrintersWithStates.filter(e=>kG(e.printer,e.printerState)).length},isApiResponding(){return e=>Object.keys(this.onlinePrinters).includes(e.toString())},isPrinterNotOnline(){return e=>!this.isApiResponding(e)},printerJobsById(){const e=Xt(),t=Ks().frontendDebugSettings.showJobsRendered,n={};return this.printerIds.forEach(r=>{var o,a,l,u;const s=this.printerEventsById[r],i=(l=(a=(o=s==null?void 0:s.current)==null?void 0:o.payload)==null?void 0:a.state)==null?void 0:l.flags;if(i!=null&&i.printing||i!=null&&i.paused||i!=null&&i.pausing){const c=e.printer(r);if(c)n[c.id]=(u=s==null?void 0:s.current)==null?void 0:u.payload;else throw new Error(`PrinterStore contains no printer with id ${r} but events are known`)}}),t&&console.debug("[PrinterStateStore] rendered printerJobsById",n),n},printersWithJob(){const e=Xt(),t=[];return this.printerIds.forEach(n=>{var i,o,a,l;const r=this.printerEventsById[n],s=(a=(o=(i=r==null?void 0:r.current)==null?void 0:i.payload)==null?void 0:o.state)==null?void 0:a.flags;if(s!=null&&s.printing||s!=null&&s.paused||s!=null&&s.pausing){const u=e.printer(n);if(u)t.push({printer:u,job:(l=r==null?void 0:r.current)==null?void 0:l.payload});else throw new Error(`PrinterStore contains no printer with id ${n} but events are known`)}}),t},printingFilePathsByPrinterId(){const e={};return this.printerIds.forEach(t=>{var s,i,o,a,l,u,c;const n=this.printerEventsById[t],r=(o=(i=(s=n==null?void 0:n.current)==null?void 0:s.payload)==null?void 0:i.state)==null?void 0:o.flags;(r!=null&&r.printing||r!=null&&r.paused||r!=null&&r.pausing)&&(e[t]=(c=(u=(l=(a=n==null?void 0:n.current)==null?void 0:a.payload)==null?void 0:l.job)==null?void 0:u.file)==null?void 0:c.path)}),e}},actions:{setSocketStates(e){this.socketStatesById=e,this.printerIds=Object.keys(e)},setPrinterEvents(e){this.printerEventsById=e},deletePrinterEvents(e){delete this.printerEventsById[e],this.printerIds=Object.keys(this.printerEventsById)},async selectAndPrintFile({printerId:e,fullPath:t}){if(!(!e||!Xt().printer(e))){if(this.isPrinterPrinting(e)){alert("This printer is printing or not connected! Either way printing is not an option.");return}await Ki.selectAndPrintFile(e,t,!0)}}}}),Xt=ks("Printers",{state:()=>({printers:[],printerFileCache:{},sideNavPrinter:void 0,updateDialogPrinter:void 0,selectedPrinters:[],maintenanceDialogPrinter:void 0}),getters:{printer(){return e=>this.printers.find(t=>t.id==e)},isSelectedPrinter(e){return t=>!!e.selectedPrinters.find(n=>n.id===t)},printerFiles(){return e=>this.printerFileCache[e]},disabledCount(){return this.printers.filter(BO).length},disconnectedCount(){const e=cr();return this.printers.filter(t=>_G(t,e.printerEventsById[t.id])).length},maintenanceCount(){return this.printers.filter(e=>qm(e)).length}},actions:{async createPrinter(e,t){const n=await tn.createPrinter(e,t);return this.printers.push(n),this.printers.sort((r,s)=>{var i,o,a;return(a=(i=r.name)==null?void 0:i.toLowerCase())!=null&&a.localeCompare((o=s==null?void 0:s.name)==null?void 0:o.toLowerCase())?1:-1}),n},toggleSelectedPrinter(e){const t=cr(),n=this.selectedPrinters.findIndex(r=>r.id==e.id);n===-1?t.isApiResponding(e.id)&&this.selectedPrinters.push(e):this.selectedPrinters.splice(n,1)},clearSelectedPrinters(){this.selectedPrinters=[]},setSideNavPrinter(e){this.sideNavPrinter=e},setUpdateDialogPrinter(e){this.updateDialogPrinter=e},setMaintenanceDialogPrinter(e){this.maintenanceDialogPrinter=e},async updatePrinter({printerId:e,updatedPrinter:t},n){const r=await tn.updatePrinter(e,t,n);return this._replacePrinter({printerId:e,printer:r}),r},async loadPrinters(){const e=await tn.getPrinters();return this.setPrinters(e),e},async deletePrinter(e){const t=await tn.deletePrinter(e);return this._popPrinter(e),t},setPrinters(e){var n;if(!(e!=null&&e.length)){this.printers=[];return}const t=(n=this.sideNavPrinter)==null?void 0:n.id;t&&(this.sideNavPrinter=e.find(r=>r.id===t)),this.printers=e.sort((r,s)=>{var i,o,a;return(a=(i=r.name)==null?void 0:i.toLowerCase())!=null&&a.localeCompare((o=s==null?void 0:s.name)==null?void 0:o.toLowerCase())?1:-1})},_popPrinter(e){const t=this.printers.findIndex(n=>n.id===e);t!==-1?this.printers.splice(t,1):console.warn("Printer was not popped as it did not occur in state",e)},_replacePrinter({printerId:e,printer:t}){const n=this.printers.findIndex(r=>r.id===e);n!==-1?this.printers[n]=t:console.warn("Printer was not purged as it did not occur in state",e)},async deletePrinterFiles(e){if(!e)throw new Error("No printerId was provided");const t=await Ki.clearFiles(e);if(!(t!=null&&t.failedFiles))throw new Error("No failed files were returned");this.printerFileCache[e]&&(this.printerFileCache[e]=t.failedFiles)},async loadPrinterFiles(e){const t=await Ki.getFiles(e);return t.sort((n,r)=>n.date<r.date?1:-1),this.printerFileCache[e]=t,t},async deletePrinterFile(e,t){await Ki.deleteFileOrFolder(e,t);const n=this.printerFileCache[e];if(!(n!=null&&n.length)){console.warn("Printer file list was nonexistent",e);return}const r=n.findIndex(s=>s.path===t);return r!==-1?n.splice(r,1):console.warn("File was not purged as it did not occur in state",t),this.printerFiles(e)},async sendStopJobCommand(e){const t=cr();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 Za.stopPrintJob(n.id)}}}),xG=ce({...Ge(),...gt()},"VCardActions"),zn=Ee()({name:"VCardActions",props:xG(),setup(e,t){let{slots:n}=t;return zr({VBtn:{slim:!0,variant:"text"}}),Me(()=>p(e.tag,{class:Oe(["v-card-actions",e.class]),style:Be(e.style)},n)),{}}}),EG=ce({opacity:[Number,String],...Ge(),...gt()},"VCardSubtitle"),Gm=Ee()({name:"VCardSubtitle",props:EG(),setup(e,t){let{slots:n}=t;return Me(()=>p(e.tag,{class:Oe(["v-card-subtitle",e.class]),style:Be([{"--v-card-subtitle-opacity":e.opacity},e.style])},n)),{}}}),un=Ku("v-card-title");function CG(e){return{aspectStyles:D(()=>{const t=Number(e.aspectRatio);return t?{paddingBottom:String(1/t*100)+"%"}:void 0})}}const VO=ce({aspectRatio:[String,Number],contentClass:null,inline:Boolean,...Ge(),...xr()},"VResponsive"),hx=Ee()({name:"VResponsive",props:VO(),setup(e,t){let{slots:n}=t;const{aspectStyles:r}=CG(e),{dimensionStyles:s}=Er(e);return Me(()=>{var i;return C("div",{class:Oe(["v-responsive",{"v-responsive--inline":e.inline},e.class]),style:Be([s.value,e.style])},[C("div",{class:"v-responsive__sizer",style:Be(r.value)},null),(i=n.additional)==null?void 0:i.call(n),n.default&&C("div",{class:Oe(["v-responsive__content",e.contentClass])},[n.default()])])}),{}}});function TG(e,t){if(!h0)return;const n=t.modifiers||{},r=t.value,{handler:s,options:i}=typeof r=="object"?r:{handler:r,options:{}},o=new IntersectionObserver(function(){var d;let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=arguments.length>1?arguments[1]:void 0;const u=(d=e._observe)==null?void 0:d[t.instance.$.uid];if(!u)return;const c=a.some(f=>f.isIntersecting);s&&(!n.quiet||u.init)&&(!n.once||c||u.init)&&s(c,a,l),c&&n.once?UO(e,t):u.init=!0},i);e._observe=Object(e._observe),e._observe[t.instance.$.uid]={init:!1,observer:o},o.observe(e)}function UO(e,t){var r;const n=(r=e._observe)==null?void 0:r[t.instance.$.uid];n&&(n.observer.unobserve(e),delete e._observe[t.instance.$.uid])}const Fu={mounted:TG,unmounted:UO},RG=ce({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,...VO(),...Ge(),...Hn(),...ec()},"VImg"),bs=Ee()({name:"VImg",directives:{vIntersect:Fu},props:RG(),emits:{loadstart:e=>!0,load:e=>!0,error:e=>!0},setup(e,t){let{emit:n,slots:r}=t;const{backgroundColorClasses:s,backgroundColorStyles:i}=wr(()=>e.color),{roundedClasses:o}=Zn(e),a=fn("VImg"),l=Ce(""),u=G(),c=Ce(e.eager?"loading":"idle"),d=Ce(),f=Ce(),h=D(()=>e.src&&typeof e.src=="object"?{src:e.src.src,srcset:e.srcset||e.src.srcset,lazySrc:e.lazySrc||e.src.lazySrc,aspect:Number(e.aspectRatio||e.src.aspect||0)}:{src:e.src,srcset:e.srcset,lazySrc:e.lazySrc,aspect:Number(e.aspectRatio||0)}),g=D(()=>h.value.aspect||d.value/f.value||0);xe(()=>e.src,()=>{m(c.value!=="idle")}),xe(g,(L,B)=>{!L&&B&&u.value&&_(u.value)}),Wu(()=>m());function m(L){if(!(e.eager&&L)&&!(h0&&!L&&!e.eager)){if(c.value="loading",h.value.lazySrc){const B=new Image;B.src=h.value.lazySrc,_(B,null)}h.value.src&&ht(()=>{var B;n("loadstart",((B=u.value)==null?void 0:B.currentSrc)||h.value.src),setTimeout(()=>{var O;if(!a.isUnmounted)if((O=u.value)!=null&&O.complete){if(u.value.naturalWidth||w(),c.value==="error")return;g.value||_(u.value,null),c.value==="loading"&&y()}else g.value||_(u.value),b()})})}}function y(){var L;a.isUnmounted||(b(),_(u.value),c.value="loaded",n("load",((L=u.value)==null?void 0:L.currentSrc)||h.value.src))}function w(){var L;a.isUnmounted||(c.value="error",n("error",((L=u.value)==null?void 0:L.currentSrc)||h.value.src))}function b(){const L=u.value;L&&(l.value=L.currentSrc||L.src)}let S=-1;Qn(()=>{clearTimeout(S)});function _(L){let B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:100;const O=()=>{if(clearTimeout(S),a.isUnmounted)return;const{naturalHeight:F,naturalWidth:W}=L;F||W?(d.value=W,f.value=F):!L.complete&&c.value==="loading"&&B!=null?S=window.setTimeout(O,B):(L.currentSrc.endsWith(".svg")||L.currentSrc.startsWith("data:image/svg+xml"))&&(d.value=1,f.value=1)};O()}const k=ie(()=>({"v-img__img--cover":e.cover,"v-img__img--contain":!e.cover})),T=()=>{var O;if(!h.value.src||c.value==="idle")return null;const L=C("img",{class:Oe(["v-img__img",k.value]),style:{objectPosition:e.position},crossorigin:e.crossorigin,src:h.value.src,srcset:h.value.srcset,alt:e.alt,referrerpolicy:e.referrerpolicy,draggable:e.draggable,sizes:e.sizes,ref:u,onLoad:y,onError:w},null),B=(O=r.sources)==null?void 0:O.call(r);return p(hi,{transition:e.transition,appear:!0},{default:()=>[zt(B?C("picture",{class:"v-img__picture"},[B,L]):L,[[uo,c.value==="loaded"]])]})},R=()=>p(hi,{transition:e.transition},{default:()=>[h.value.lazySrc&&c.value!=="loaded"&&C("img",{class:Oe(["v-img__img","v-img__img--preload",k.value]),style:{objectPosition:e.position},crossorigin:e.crossorigin,src:h.value.lazySrc,alt:e.alt,referrerpolicy:e.referrerpolicy,draggable:e.draggable},null)]}),x=()=>r.placeholder?p(hi,{transition:e.transition,appear:!0},{default:()=>[(c.value==="loading"||c.value==="error"&&!r.error)&&C("div",{class:"v-img__placeholder"},[r.placeholder()])]}):null,I=()=>r.error?p(hi,{transition:e.transition,appear:!0},{default:()=>[c.value==="error"&&C("div",{class:"v-img__error"},[r.error()])]}):null,P=()=>e.gradient?C("div",{class:"v-img__gradient",style:{backgroundImage:`linear-gradient(${e.gradient})`}},null):null,A=Ce(!1);{const L=xe(g,B=>{B&&(requestAnimationFrame(()=>{requestAnimationFrame(()=>{A.value=!0})}),L())})}return Me(()=>{const L=hx.filterProps(e);return zt(p(hx,ge({class:["v-img",{"v-img--absolute":e.absolute,"v-img--booting":!A.value},s.value,o.value,e.class],style:[{width:Le(e.width==="auto"?d.value:e.width)},i.value,e.style]},L,{aspectRatio:g.value,"aria-label":e.alt,role:e.alt?"img":void 0}),{additional:()=>C(De,null,[p(T,null,null),p(R,null,null),p(P,null,null),p(x,null,null),p(I,null,null)]),default:r.default}),[[Fu,{handler:m,options:e.options},null,{once:!0}]])}),{currentSrc:l,image:u,state:c,naturalWidth:d,naturalHeight:f}}}),PG=ce({start:Boolean,end:Boolean,icon:He,image:String,text:String,...xs(),...Ge(),...Jn(),...Hn(),...Xu(),...gt(),...Nt(),...Ws({variant:"flat"})},"VAvatar"),dt=Ee()({name:"VAvatar",props:PG(),setup(e,t){let{slots:n}=t;const{themeClasses:r}=nn(e),{borderClasses:s}=Hs(e),{colorClasses:i,colorStyles:o,variantClasses:a}=bl(e),{densityClasses:l}=Es(e),{roundedClasses:u}=Zn(e),{sizeClasses:c,sizeStyles:d}=rf(e);return Me(()=>p(e.tag,{class:Oe(["v-avatar",{"v-avatar--start":e.start,"v-avatar--end":e.end},r.value,s.value,i.value,l.value,u.value,c.value,a.value,e.class]),style:Be([o.value,d.value,e.style])},{default:()=>[n.default?p(Ft,{key:"content-defaults",defaults:{VImg:{cover:!0,src:e.image},VIcon:{icon:e.icon}}},{default:()=>[n.default()]}):e.image?p(bs,{key:"image",src:e.image,alt:"",cover:!0},null):e.icon?p(ee,{key:"icon",icon:e.icon},null):e.text,ra(!1,"v-avatar")]})),{}}}),IG=ce({appendAvatar:String,appendIcon:He,prependAvatar:String,prependIcon:He,subtitle:{type:[String,Number,Boolean],default:void 0},title:{type:[String,Number,Boolean],default:void 0},...Ge(),...Jn(),...gt()},"VCardItem"),AG=Ee()({name:"VCardItem",props:IG(),setup(e,t){let{slots:n}=t;return Me(()=>{const r=!!(e.prependAvatar||e.prependIcon),s=!!(r||n.prepend),i=!!(e.appendAvatar||e.appendIcon),o=!!(i||n.append),a=!!(e.title!=null||n.title),l=!!(e.subtitle!=null||n.subtitle);return p(e.tag,{class:Oe(["v-card-item",e.class]),style:Be(e.style)},{default:()=>{var u;return[s&&C("div",{key:"prepend",class:"v-card-item__prepend"},[n.prepend?p(Ft,{key:"prepend-defaults",disabled:!r,defaults:{VAvatar:{density:e.density,image:e.prependAvatar},VIcon:{density:e.density,icon:e.prependIcon}}},n.prepend):C(De,null,[e.prependAvatar&&p(dt,{key:"prepend-avatar",density:e.density,image:e.prependAvatar},null),e.prependIcon&&p(ee,{key:"prepend-icon",density:e.density,icon:e.prependIcon},null)])]),C("div",{class:"v-card-item__content"},[a&&p(un,{key:"title"},{default:()=>{var c;return[((c=n.title)==null?void 0:c.call(n))??ae(e.title)]}}),l&&p(Gm,{key:"subtitle"},{default:()=>{var c;return[((c=n.subtitle)==null?void 0:c.call(n))??ae(e.subtitle)]}}),(u=n.default)==null?void 0:u.call(n)]),o&&C("div",{key:"append",class:"v-card-item__append"},[n.append?p(Ft,{key:"append-defaults",disabled:!i,defaults:{VAvatar:{density:e.density,image:e.appendAvatar},VIcon:{density:e.density,icon:e.appendIcon}}},n.append):C(De,null,[e.appendIcon&&p(ee,{key:"append-icon",density:e.density,icon:e.appendIcon},null),e.appendAvatar&&p(dt,{key:"append-avatar",density:e.density,image:e.appendAvatar},null)])])]}})}),{}}}),OG=ce({opacity:[Number,String],...Ge(),...gt()},"VCardText"),rn=Ee()({name:"VCardText",props:OG(),setup(e,t){let{slots:n}=t;return Me(()=>p(e.tag,{class:Oe(["v-card-text",e.class]),style:Be([{"--v-card-text-opacity":e.opacity},e.style])},n)),{}}}),DG=ce({appendAvatar:String,appendIcon:He,disabled:Boolean,flat:Boolean,hover:Boolean,image:String,link:{type:Boolean,default:void 0},prependAvatar:String,prependIcon:He,ripple:{type:[Boolean,Object],default:!0},subtitle:{type:[String,Number,Boolean],default:void 0},text:{type:[String,Number,Boolean],default:void 0},title:{type:[String,Number,Boolean],default:void 0},...xs(),...Ge(),...Jn(),...xr(),...Cs(),...Sm(),...sa(),...Qu(),...Hn(),...xm(),...gt(),...Nt(),...Ws({variant:"elevated"})},"VCard"),kt=Ee()({name:"VCard",directives:{vRipple:Us},props:DG(),setup(e,t){let{attrs:n,slots:r}=t;const{themeClasses:s}=nn(e),{borderClasses:i}=Hs(e),{colorClasses:o,colorStyles:a,variantClasses:l}=bl(e),{densityClasses:u}=Es(e),{dimensionStyles:c}=Er(e),{elevationClasses:d}=js(e),{loaderClasses:f}=sf(e),{locationStyles:h}=wl(e),{positionClasses:g}=Ju(e),{roundedClasses:m}=Zn(e),y=km(e,n),w=Ce(void 0);return xe(()=>e.loading,(b,S)=>{w.value=!b&&typeof S=="string"?S:typeof b=="boolean"?void 0:b},{immediate:!0}),Me(()=>{const b=e.link!==!1&&y.isLink.value,S=!e.disabled&&e.link!==!1&&(e.link||y.isClickable.value),_=b?"a":e.tag,k=!!(r.title||e.title!=null),T=!!(r.subtitle||e.subtitle!=null),R=k||T,x=!!(r.append||e.appendAvatar||e.appendIcon),I=!!(r.prepend||e.prependAvatar||e.prependIcon),P=!!(r.image||e.image),A=R||I||x,L=!!(r.text||e.text!=null);return zt(p(_,ge(y.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},s.value,i.value,o.value,u.value,d.value,f.value,g.value,m.value,l.value,e.class],style:[a.value,c.value,h.value,e.style],onClick:S&&y.navigate,tabindex:e.disabled?-1:void 0}),{default:()=>{var B;return[P&&C("div",{key:"image",class:"v-card__image"},[r.image?p(Ft,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{cover:!0,src:e.image}}},r.image):p(bs,{key:"image-img",cover:!0,src:e.image},null)]),p(_m,{name:"v-card",active:!!e.loading,color:w.value},{default:r.loader}),A&&p(AG,{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&&p(rn,{key:"text"},{default:()=>{var O;return[((O=r.text)==null?void 0:O.call(r))??e.text]}}),(B=r.default)==null?void 0:B.call(r),r.actions&&p(zn,null,{default:r.actions}),ra(S,"v-card")]}}),[[Us,S&&e.ripple]])}),{}}}),zO=Symbol.for("vuetify:goto");function HO(){return{container:void 0,duration:300,layout:!1,offset:0,easing:"easeInOutCubic",patterns:VN}}function MG(e){return T1(e)??(document.scrollingElement||document.body)}function T1(e){return typeof e=="string"?document.querySelector(e):m0(e)}function fv(e,t,n){if(typeof e=="number")return t&&n?-e:e;let r=T1(e),s=0;for(;r;)s+=t?r.offsetLeft:r.offsetTop,r=r.offsetParent;return s}function LG(e,t){return{rtl:t.isRtl,options:lr(HO(),e)}}async function px(e,t,n,r){const s=n?"scrollLeft":"scrollTop",i=lr((r==null?void 0:r.options)??HO(),t),o=r==null?void 0:r.rtl.value,a=(typeof e=="number"?e:T1(e))??0,l=i.container==="parent"&&a instanceof HTMLElement?a.parentElement:MG(i.container),u=il()?i.patterns.instant:typeof i.easing=="function"?i.easing:i.patterns[i.easing];if(!u)throw new TypeError(`Easing function "${i.easing}" not found.`);let c;if(typeof a=="number")c=fv(a,n,o);else if(c=fv(a,n,o)-fv(l,n,o),i.layout){const g=window.getComputedStyle(a).getPropertyValue("--v-layout-top");g&&(c-=parseInt(g,10))}c+=i.offset,c=$G(l,c,!!o,!!n);const d=l[s]??0;if(c===d)return Promise.resolve(c);const f=performance.now();return new Promise(h=>requestAnimationFrame(function g(m){const w=(m-f)/i.duration,b=Math.floor(d+(c-d)*u(Un(w,0,1)));if(l[s]=b,w>=1&&Math.abs(b-l[s])<10)return h(c);if(w>2)return h(l[s]);requestAnimationFrame(g)}))}function FG(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=Xe(zO),{isRtl:n}=Wr();if(!t)throw new Error("[Vuetify] Could not find injected goto instance");const r={...t,rtl:ie(()=>t.rtl.value||n.value)};async function s(i,o){return px(i,lr(e,o),!1,r)}return s.horizontal=async(i,o)=>px(i,lr(e,o),!0,r),s}function $G(e,t,n,r){const{scrollWidth:s,scrollHeight:i}=e,[o,a]=e===document.scrollingElement?[window.innerWidth,window.innerHeight]:[e.offsetWidth,e.offsetHeight];let l,u;return r?n?(l=-(s-o),u=0):(l=0,u=s-o):(l=0,u=i+-a),Un(t,l,u)}function NG(e){let{selectedElement:t,containerElement:n,isRtl:r,isHorizontal:s}=e;const i=Od(s,n),o=jO(s,r,n),a=Od(s,t),l=WO(s,t),u=a*.4;return o>l?l-u:o+i<l+a?l-i+a+u:o}function BG(e){let{selectedElement:t,containerElement:n,isHorizontal:r}=e;const s=Od(r,n),i=WO(r,t),o=Od(r,t);return i-s/2+o/2}function mx(e,t){const n=e?"scrollWidth":"scrollHeight";return(t==null?void 0:t[n])||0}function VG(e,t){const n=e?"clientWidth":"clientHeight";return(t==null?void 0:t[n])||0}function jO(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 Od(e,t){const n=e?"offsetWidth":"offsetHeight";return(t==null?void 0:t[n])||0}function WO(e,t){const n=e?"offsetLeft":"offsetTop";return(t==null?void 0:t[n])||0}const qO=Symbol.for("vuetify:v-slide-group"),GO=ce({centerActive:Boolean,scrollToActive:{type:Boolean,default:!0},contentClass:null,direction:{type:String,default:"horizontal"},symbol:{type:null,default:qO},nextIcon:{type:He,default:"$next"},prevIcon:{type:He,default:"$prev"},showArrows:{type:[Boolean,String],validator:e=>typeof e=="boolean"||["always","desktop","mobile","never"].includes(e)},...Ge(),...Sl({mobile:null}),...gt(),...tf({selectedClass:"v-slide-group-item--active"})},"VSlideGroup"),gx=Ee()({name:"VSlideGroup",props:GO(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{isRtl:r}=Wr(),{displayClasses:s,mobile:i}=qs(e),o=Yu(e,e.symbol),a=Ce(!1),l=Ce(0),u=Ce(0),c=Ce(0),d=D(()=>e.direction==="horizontal"),{resizeRef:f,contentRect:h}=Yo(),{resizeRef:g,contentRect:m}=Yo(),y=FG(),w=D(()=>({container:f.el,duration:200,easing:"easeOutQuart"})),b=D(()=>o.selected.value.length?o.items.value.findIndex(H=>H.id===o.selected.value[0]):-1),S=D(()=>o.selected.value.length?o.items.value.findIndex(H=>H.id===o.selected.value[o.selected.value.length-1]):-1);if(Ot){let H=-1;xe(()=>[o.selected.value,h.value,m.value,d.value],()=>{cancelAnimationFrame(H),H=requestAnimationFrame(()=>{if(h.value&&m.value){const j=d.value?"width":"height";u.value=h.value[j],c.value=m.value[j],a.value=u.value+1<c.value}if(e.scrollToActive&&b.value>=0&&g.el){const j=g.el.children[S.value];k(j,e.centerActive)}})})}const _=Ce(!1);function k(H,j){let pe=0;j?pe=BG({containerElement:f.el,isHorizontal:d.value,selectedElement:H}):pe=NG({containerElement:f.el,isHorizontal:d.value,isRtl:r.value,selectedElement:H}),T(pe)}function T(H){if(!Ot||!f.el)return;const j=Od(d.value,f.el),pe=jO(d.value,r.value,f.el);if(!(mx(d.value,f.el)<=j||Math.abs(H-pe)<16)){if(d.value&&r.value&&f.el){const{scrollWidth:we,offsetWidth:q}=f.el;H=we-q-H}d.value?y.horizontal(H,w.value):y(H,w.value)}}function R(H){const{scrollTop:j,scrollLeft:pe}=H.target;l.value=d.value?pe:j}function x(H){if(_.value=!0,!(!a.value||!g.el)){for(const j of H.composedPath())for(const pe of g.el.children)if(pe===j){k(pe);return}}}function I(H){_.value=!1}let P=!1;function A(H){var j;!P&&!_.value&&!(H.relatedTarget&&((j=g.el)!=null&&j.contains(H.relatedTarget)))&&F(),P=!1}function L(){P=!0}function B(H){if(!g.el)return;function j(pe){H.preventDefault(),F(pe)}d.value?H.key==="ArrowRight"?j(r.value?"prev":"next"):H.key==="ArrowLeft"&&j(r.value?"next":"prev"):H.key==="ArrowDown"?j("next"):H.key==="ArrowUp"&&j("prev"),H.key==="Home"?j("first"):H.key==="End"&&j("last")}function O(H,j){if(!H)return;let pe=H;do pe=pe==null?void 0:pe[j==="next"?"nextElementSibling":"previousElementSibling"];while(pe!=null&&pe.hasAttribute("disabled"));return pe}function F(H){if(!g.el)return;let j;if(!H)j=qa(g.el)[0];else if(H==="next"){if(j=O(g.el.querySelector(":focus"),H),!j)return F("first")}else if(H==="prev"){if(j=O(g.el.querySelector(":focus"),H),!j)return F("last")}else H==="first"?(j=g.el.firstElementChild,j!=null&&j.hasAttribute("disabled")&&(j=O(j,"next"))):H==="last"&&(j=g.el.lastElementChild,j!=null&&j.hasAttribute("disabled")&&(j=O(j,"prev")));j&&j.focus({preventScroll:!0})}function W(H){const j=d.value&&r.value?-1:1,pe=(H==="prev"?-j:j)*u.value;let J=l.value+pe;if(d.value&&r.value&&f.el){const{scrollWidth:we,offsetWidth:q}=f.el;J+=we-q}T(J)}const X=D(()=>({next:o.next,prev:o.prev,select:o.select,isSelected:o.isSelected})),V=D(()=>a.value||Math.abs(l.value)>0),z=D(()=>{switch(e.showArrows){case"never":return!1;case"always":return!0;case"desktop":return!i.value;case!0:return V.value;case"mobile":return i.value||V.value;default:return!i.value&&V.value}}),M=D(()=>Math.abs(l.value)>1),re=D(()=>{if(!f.value||!V.value)return!1;const H=mx(d.value,f.el),j=VG(d.value,f.el);return H-j-Math.abs(l.value)>1});return Me(()=>p(e.tag,{class:Oe(["v-slide-group",{"v-slide-group--vertical":!d.value,"v-slide-group--has-affixes":z.value,"v-slide-group--is-overflowing":a.value},s.value,e.class]),style:Be(e.style),tabindex:_.value||o.selected.value.length?-1:0,onFocus:A},{default:()=>{var H,j,pe;return[z.value&&C("div",{key:"prev",class:Oe(["v-slide-group__prev",{"v-slide-group__prev--disabled":!M.value}]),onMousedown:L,onClick:()=>M.value&&W("prev")},[((H=n.prev)==null?void 0:H.call(n,X.value))??p(s_,null,{default:()=>[p(ee,{icon:r.value?e.nextIcon:e.prevIcon},null)]})]),C("div",{key:"container",ref:f,class:Oe(["v-slide-group__container",e.contentClass]),onScroll:R},[C("div",{ref:g,class:"v-slide-group__content",onFocusin:x,onFocusout:I,onKeydown:B},[(j=n.default)==null?void 0:j.call(n,X.value)])]),z.value&&C("div",{key:"next",class:Oe(["v-slide-group__next",{"v-slide-group__next--disabled":!re.value}]),onMousedown:L,onClick:()=>re.value&&W("next")},[((pe=n.next)==null?void 0:pe.call(n,X.value))??p(s_,null,{default:()=>[p(ee,{icon:r.value?e.prevIcon:e.nextIcon},null)]})])]}})),{selected:o.selected,scrollTo:W,scrollOffset:l,focus:F,hasPrev:M,hasNext:re}}}),KO=Symbol.for("vuetify:v-chip-group"),UG=ce({baseColor:String,column:Boolean,filter:Boolean,valueComparator:{type:Function,default:$r},...GO({scrollToActive:!1}),...Ge(),...tf({selectedClass:"v-chip--selected"}),...gt(),...Nt(),...Ws({variant:"tonal"})},"VChipGroup"),$p=Ee()({name:"VChipGroup",props:UG(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{themeClasses:r}=nn(e),{isSelected:s,select:i,next:o,prev:a,selected:l}=Yu(e,KO);return zr({VChip:{baseColor:ie(()=>e.baseColor),color:ie(()=>e.color),disabled:ie(()=>e.disabled),filter:ie(()=>e.filter),variant:ie(()=>e.variant)}}),Me(()=>{const u=gx.filterProps(e);return p(gx,ge(u,{class:["v-chip-group",{"v-chip-group--column":e.column},r.value,e.class],style:e.style}),{default:()=>{var c;return[(c=n.default)==null?void 0:c.call(n,{isSelected:s,select:i,next:o,prev:a,selected:l.value})]}})}),{}}}),zG=ce({activeClass:String,appendAvatar:String,appendIcon:He,baseColor:String,closable:Boolean,closeIcon:{type:He,default:"$delete"},closeLabel:{type:String,default:"$vuetify.close"},draggable:Boolean,filter:Boolean,filterIcon:{type:He,default:"$complete"},label:Boolean,link:{type:Boolean,default:void 0},pill:Boolean,prependAvatar:String,prependIcon:He,ripple:{type:[Boolean,Object],default:!0},text:{type:[String,Number,Boolean],default:void 0},modelValue:{type:Boolean,default:!0},onClick:Kn(),onClickOnce:Kn(),...xs(),...Ge(),...Jn(),...Cs(),...nf(),...Hn(),...xm(),...Xu(),...gt({tag:"span"}),...Nt(),...Ws({variant:"tonal"})},"VChip"),Cn=Ee()({name:"VChip",directives:{vRipple:Us},props:zG(),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}=ts(),{borderClasses:o}=Hs(e),{densityClasses:a}=Es(e),{elevationClasses:l}=js(e),{roundedClasses:u}=Zn(e),{sizeClasses:c}=rf(e),{themeClasses:d}=nn(e),f=lt(e,"modelValue"),h=xu(e,KO,!1),g=xu(e,qO,!1),m=km(e,n),y=ie(()=>e.link!==!1&&m.isLink.value),w=D(()=>!e.disabled&&e.link!==!1&&(!!h||e.link||m.isClickable.value)),b=ie(()=>({"aria-label":i(e.closeLabel),disabled:e.disabled,onClick(x){x.preventDefault(),x.stopPropagation(),f.value=!1,r("click:close",x)}}));xe(f,x=>{x?(h==null||h.register(),g==null||g.register()):(h==null||h.unregister(),g==null||g.unregister())});const{colorClasses:S,colorStyles:_,variantClasses:k}=bl(()=>({color:!h||h.isSelected.value?e.color??e.baseColor:e.baseColor,variant:e.variant}));function T(x){var I;r("click",x),w.value&&((I=m.navigate)==null||I.call(m,x),h==null||h.toggle())}function R(x){(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),T(x))}return()=>{var F;const x=m.isLink.value?"a":e.tag,I=!!(e.appendIcon||e.appendAvatar),P=!!(I||s.append),A=!!(s.close||e.closable),L=!!(s.filter||e.filter)&&h,B=!!(e.prependIcon||e.prependAvatar),O=!!(B||s.prepend);return f.value&&zt(p(x,ge(m.linkProps,{class:["v-chip",{"v-chip--disabled":e.disabled,"v-chip--label":e.label,"v-chip--link":w.value,"v-chip--filter":L,"v-chip--pill":e.pill,[`${e.activeClass}`]:e.activeClass&&((F=m.isActive)==null?void 0:F.value)},d.value,o.value,S.value,a.value,l.value,u.value,c.value,k.value,h==null?void 0:h.selectedClass.value,e.class],style:[_.value,e.style],disabled:e.disabled||void 0,draggable:e.draggable,tabindex:w.value?0:void 0,onClick:T,onKeydown:w.value&&!y.value&&R}),{default:()=>{var W;return[ra(w.value,"v-chip"),L&&p(kP,{key:"filter"},{default:()=>[zt(C("div",{class:"v-chip__filter"},[s.filter?p(Ft,{key:"filter-defaults",disabled:!e.filterIcon,defaults:{VIcon:{icon:e.filterIcon}}},s.filter):p(ee,{key:"filter-icon",icon:e.filterIcon},null)]),[[uo,h.isSelected.value]])]}),O&&C("div",{key:"prepend",class:"v-chip__prepend"},[s.prepend?p(Ft,{key:"prepend-defaults",disabled:!B,defaults:{VAvatar:{image:e.prependAvatar,start:!0},VIcon:{icon:e.prependIcon,start:!0}}},s.prepend):C(De,null,[e.prependIcon&&p(ee,{key:"prepend-icon",icon:e.prependIcon,start:!0},null),e.prependAvatar&&p(dt,{key:"prepend-avatar",image:e.prependAvatar,start:!0},null)])]),C("div",{class:"v-chip__content","data-no-activator":""},[((W=s.default)==null?void 0:W.call(s,{isSelected:h==null?void 0:h.isSelected.value,selectedClass:h==null?void 0:h.selectedClass.value,select:h==null?void 0:h.select,toggle:h==null?void 0:h.toggle,value:h==null?void 0:h.value.value,disabled:e.disabled}))??ae(e.text)]),P&&C("div",{key:"append",class:"v-chip__append"},[s.append?p(Ft,{key:"append-defaults",disabled:!I,defaults:{VAvatar:{end:!0,image:e.appendAvatar},VIcon:{end:!0,icon:e.appendIcon}}},s.append):C(De,null,[e.appendIcon&&p(ee,{key:"append-icon",end:!0,icon:e.appendIcon},null),e.appendAvatar&&p(dt,{key:"append-avatar",end:!0,image:e.appendAvatar},null)])]),A&&C("button",ge({key:"close",class:"v-chip__close",type:"button","data-testid":"close-chip"},b.value),[s.close?p(Ft,{key:"close-defaults",defaults:{VIcon:{icon:e.closeIcon,size:"x-small"}}},s.close):p(ee,{key:"close-icon",icon:e.closeIcon,size:"x-small"},null)])]}}),[[Us,w.value&&e.ripple,null]])}}}),HG=ce({fluid:{type:Boolean,default:!1},...Ge(),...xr(),...gt()},"VContainer"),Xn=Ee()({name:"VContainer",props:HG(),setup(e,t){let{slots:n}=t;const{rtlClasses:r}=Wr(),{dimensionStyles:s}=Er(e);return Me(()=>p(e.tag,{class:Oe(["v-container",{"v-container--fluid":e.fluid},r.value,e.class]),style:Be([s.value,e.style])},n)),{}}}),YO=Em.reduce((e,t)=>(e[t]={type:[Boolean,String,Number],default:!1},e),{}),XO=Em.reduce((e,t)=>{const n="offset"+bi(t);return e[n]={type:[String,Number],default:null},e},{}),QO=Em.reduce((e,t)=>{const n="order"+bi(t);return e[n]={type:[String,Number],default:null},e},{}),vx={col:Object.keys(YO),offset:Object.keys(XO),order:Object.keys(QO)};function jG(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 WG=["auto","start","end","center","baseline","stretch"],qG=ce({cols:{type:[Boolean,String,Number],default:!1},...YO,offset:{type:[String,Number],default:null},...XO,order:{type:[String,Number],default:null},...QO,alignSelf:{type:String,default:null,validator:e=>WG.includes(e)},...Ge(),...gt()},"VCol"),We=Ee()({name:"VCol",props:qG(),setup(e,t){let{slots:n}=t;const r=D(()=>{const s=[];let i;for(i in vx)vx[i].forEach(a=>{const l=e[a],u=jG(i,a,l);u&&s.push(u)});const o=s.some(a=>a.startsWith("v-col-"));return s.push({"v-col":!o||!e.cols,[`v-col-${e.cols}`]:e.cols,[`offset-${e.offset}`]:e.offset,[`order-${e.order}`]:e.order,[`align-self-${e.alignSelf}`]:e.alignSelf}),s});return()=>{var s;return _r(e.tag,{class:[r.value,e.class],style:e.style},(s=n.default)==null?void 0:s.call(n))}}}),R1=["start","end","center"],JO=["space-between","space-around","space-evenly"];function P1(e,t){return Em.reduce((n,r)=>{const s=e+bi(r);return n[s]=t(),n},{})}const GG=[...R1,"baseline","stretch"],ZO=e=>GG.includes(e),eD=P1("align",()=>({type:String,default:null,validator:ZO})),KG=[...R1,...JO],tD=e=>KG.includes(e),nD=P1("justify",()=>({type:String,default:null,validator:tD})),YG=[...R1,...JO,"stretch"],rD=e=>YG.includes(e),sD=P1("alignContent",()=>({type:String,default:null,validator:rD})),yx={align:Object.keys(eD),justify:Object.keys(nD),alignContent:Object.keys(sD)},XG={align:"align",justify:"justify",alignContent:"align-content"};function QG(e,t,n){let r=XG[e];if(n!=null){if(t){const s=t.replace(e,"");r+=`-${s}`}return r+=`-${n}`,r.toLowerCase()}}const JG=ce({dense:Boolean,noGutters:Boolean,align:{type:String,default:null,validator:ZO},...eD,justify:{type:String,default:null,validator:tD},...nD,alignContent:{type:String,default:null,validator:rD},...sD,...Ge(),...gt()},"VRow"),st=Ee()({name:"VRow",props:JG(),setup(e,t){let{slots:n}=t;const r=D(()=>{const s=[];let i;for(i in yx)yx[i].forEach(o=>{const a=e[o],l=QG(i,o,a);l&&s.push(l)});return s.push({"v-row--no-gutters":e.noGutters,"v-row--dense":e.dense,[`align-${e.align}`]:e.align,[`justify-${e.justify}`]:e.justify,[`align-content-${e.alignContent}`]:e.alignContent}),s});return()=>{var s;return _r(e.tag,{class:["v-row",r.value,e.class],style:e.style},(s=n.default)==null?void 0:s.call(n))}}}),Pn=Ku("v-spacer","div","VSpacer"),ZG=Ve({__name:"PrinterControlDialog",setup(e){const t=sn(on.PrinterControlDialog),n=Xt(),r=cr(),s=D(()=>{var d;return(d=t.context())==null?void 0:d.printerId}),i=D(()=>{if(s.value)return n.printer(s.value)}),o=G(10),a=D(()=>{var f,h,g,m,y,w,b,S,_,k;const d=r.printerEventsById[s.value];return(g=(h=(f=d==null?void 0:d.current)==null?void 0:f.payload)==null?void 0:h.temps)!=null&&g.length&&((b=(w=(y=(m=d==null?void 0:d.current)==null?void 0:m.payload)==null?void 0:y.temps[0])==null?void 0:w.tool0)!=null&&b.actual)?(k=(_=(S=d==null?void 0:d.current)==null?void 0:S.payload)==null?void 0:_.temps[0])==null?void 0:k.tool0:null}),l=async(d,f,h)=>{await tn.sendPrinterJogCommand(s.value,{x:d*o.value,y:f*o.value,z:h*o.value})},u=async d=>{await tn.sendPrinterHomeCommand(s.value,d)},c=()=>{t.closeDialog()};return(d,f)=>{const h=Si;return $(),te(h,{id:Z(t).dialogId,"max-width":"700px",onEscape:f[14]||(f[14]=g=>c())},{default:v(()=>[p(kt,null,{default:v(()=>[p(un,null,{default:v(()=>[...f[15]||(f[15]=[E(" Printer Controls ",-1)])]),_:1}),p(rn,null,{default:v(()=>[i.value?($(),te(Xn,{key:0},{default:v(()=>[p(st,null,{default:v(()=>[p(We,{cols:12},{default:v(()=>{var g;return[E(" Printer: "+ae((g=i.value)==null?void 0:g.name)+" ",1),f[16]||(f[16]=C("br",null,null,-1)),p(Cn,{color:"primary"},{default:v(()=>{var m,y;return[E(ae((m=a.value)==null?void 0:m.actual)+"C / "+ae((y=a.value)==null?void 0:y.target)+"C ",1)]}),_:1})]}),_:1})]),_:1}),p(st,null,{default:v(()=>[p(We,{cols:8},{default:v(()=>[f[26]||(f[26]=E(" X/Y ",-1)),f[27]||(f[27]=C("br",null,null,-1)),p(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[0]||(f[0]=g=>l(-1,1,0))},{default:v(()=>[p(ee,null,{default:v(()=>[...f[17]||(f[17]=[E("north_west",-1)])]),_:1})]),_:1}),p(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[1]||(f[1]=g=>l(0,1,0))},{default:v(()=>[p(ee,null,{default:v(()=>[...f[18]||(f[18]=[E("north",-1)])]),_:1})]),_:1}),p(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[2]||(f[2]=g=>l(1,1,0))},{default:v(()=>[p(ee,null,{default:v(()=>[...f[19]||(f[19]=[E("north_east",-1)])]),_:1})]),_:1}),f[28]||(f[28]=C("br",null,null,-1)),p(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[3]||(f[3]=g=>l(-1,0,0))},{default:v(()=>[p(ee,null,{default:v(()=>[...f[20]||(f[20]=[E("west",-1)])]),_:1})]),_:1}),p(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[4]||(f[4]=g=>u(["x","y"]))},{default:v(()=>[p(ee,null,{default:v(()=>[...f[21]||(f[21]=[E("home",-1)])]),_:1})]),_:1}),p(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[5]||(f[5]=g=>l(1,0,0))},{default:v(()=>[p(ee,null,{default:v(()=>[...f[22]||(f[22]=[E("east",-1)])]),_:1})]),_:1}),f[29]||(f[29]=C("br",null,null,-1)),p(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[6]||(f[6]=g=>l(-1,-1,0))},{default:v(()=>[p(ee,null,{default:v(()=>[...f[23]||(f[23]=[E("south_west",-1)])]),_:1})]),_:1}),p(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[7]||(f[7]=g=>l(0,-1,0))},{default:v(()=>[p(ee,null,{default:v(()=>[...f[24]||(f[24]=[E("south",-1)])]),_:1})]),_:1}),p(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[8]||(f[8]=g=>l(1,-1,0))},{default:v(()=>[p(ee,null,{default:v(()=>[...f[25]||(f[25]=[E("south_east",-1)])]),_:1})]),_:1})]),_:1}),p(We,{cols:"4"},{default:v(()=>[f[33]||(f[33]=E(" Z ",-1)),f[34]||(f[34]=C("br",null,null,-1)),p(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[9]||(f[9]=g=>l(0,0,1))},{default:v(()=>[p(ee,null,{default:v(()=>[...f[30]||(f[30]=[E("north",-1)])]),_:1})]),_:1}),f[35]||(f[35]=C("br",null,null,-1)),p(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[10]||(f[10]=g=>u(["z"]))},{default:v(()=>[p(ee,null,{default:v(()=>[...f[31]||(f[31]=[E("home",-1)])]),_:1})]),_:1}),f[36]||(f[36]=C("br",null,null,-1)),p(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[11]||(f[11]=g=>l(1,0,1))},{default:v(()=>[p(ee,null,{default:v(()=>[...f[32]||(f[32]=[E("south",-1)])]),_:1})]),_:1})]),_:1})]),_:1}),p(st,null,{default:v(()=>[p(We,{cols:"12"},{default:v(()=>[p(rP,{modelValue:o.value,"onUpdate:modelValue":f[12]||(f[12]=g=>o.value=g)},{default:v(()=>[p(se,{value:.1},{default:v(()=>[...f[37]||(f[37]=[E(" 0.1 ",-1)])]),_:1}),p(se,{value:1},{default:v(()=>[...f[38]||(f[38]=[E(" 1 ",-1)])]),_:1}),p(se,{value:10},{default:v(()=>[...f[39]||(f[39]=[E(" 10 ",-1)])]),_:1}),p(se,{value:100},{default:v(()=>[...f[40]||(f[40]=[E(" 100 ",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})):ve("",!0)]),_:1}),p(zn,null,{default:v(()=>[p(Pn),p(se,{variant:"text",onClick:f[13]||(f[13]=g=>c())},{default:v(()=>[...f[41]||(f[41]=[E(" Close ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}});class Xl extends Cr{static async batchSettingsGet(t){return await this.post("/api/batch/settings/get",{printerIds:t})}static async batchConnectUsb(t){return await this.post("/api/batch/connect/usb",{printerIds:t})}static async batchConnectSocket(t){return await this.post("/api/batch/connect/socket",{printerIds:t})}static async batchToggleEnabled(t,n){return await this.post("/api/batch/toggle-enabled",{printerIds:t,enabled:n})}static async batchGetLastPrintedFiles(t){const n=$e.batchGetLastPrintedFilesRoute;return await this.post(n,{printerIds:t})}static async batchReprintFiles(t){const n=$e.batchReprintFilesRoute;return await this.post(n,{prints:t})}}var _a=(e=>(e[e.PrinterNotAvailable=0]="PrinterNotAvailable",e[e.NoLastPrint=1]="NoLastPrint",e[e.LastPrintReady=2]="LastPrintReady",e))(_a||{});function e7(e){return e.message?`${e.message}
|
|
68
|
+
${e.stack}`:`'${e}'`}const t7=Ku("v-alert-title"),n7=ce({iconSize:[Number,String],iconSizes:{type:Array,default:()=>[["x-small",10],["small",16],["default",24],["large",28],["x-large",32]]}},"iconSize");function r7(e,t){return{iconSize:D(()=>{const r=new Map(e.iconSizes),s=e.iconSize??t()??"default";return r.has(s)?r.get(s):s})}}const s7=["success","info","warning","error"],i7=ce({border:{type:[Boolean,String],validator:e=>typeof e=="boolean"||["top","end","bottom","start"].includes(e)},borderColor:String,closable:Boolean,closeIcon:{type:He,default:"$close"},closeLabel:{type:String,default:"$vuetify.close"},icon:{type:[Boolean,String,Function,Object],default:null},modelValue:{type:Boolean,default:!0},prominent:Boolean,title:String,text:String,type:{type:String,validator:e=>s7.includes(e)},...Ge(),...Jn(),...xr(),...Cs(),...n7(),...sa(),...Qu(),...Hn(),...gt(),...Nt(),...Ws({variant:"flat"})},"VAlert"),yn=Ee()({name:"VAlert",props:i7(),emits:{"click:close":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{emit:n,slots:r}=t;const s=lt(e,"modelValue"),i=ie(()=>{if(e.icon!==!1)return e.type?e.icon??`$${e.type}`:e.icon}),{iconSize:o}=r7(e,()=>e.prominent?44:void 0),{themeClasses:a}=nn(e),{colorClasses:l,colorStyles:u,variantClasses:c}=bl(()=>({color:e.color??e.type,variant:e.variant})),{densityClasses:d}=Es(e),{dimensionStyles:f}=Er(e),{elevationClasses:h}=js(e),{locationStyles:g}=wl(e),{positionClasses:m}=Ju(e),{roundedClasses:y}=Zn(e),{textColorClasses:w,textColorStyles:b}=Vs(()=>e.borderColor),{t:S}=ts(),_=ie(()=>({"aria-label":S(e.closeLabel),onClick(k){s.value=!1,n("click:close",k)}}));return()=>{const k=!!(r.prepend||i.value),T=!!(r.title||e.title),R=!!(r.close||e.closable),x={density:e.density,icon:i.value,size:e.iconSize||e.prominent?o.value:void 0};return s.value&&p(e.tag,{class:Oe(["v-alert",e.border&&{"v-alert--border":!!e.border,[`v-alert--border-${e.border===!0?"start":e.border}`]:!0},{"v-alert--prominent":e.prominent},a.value,l.value,d.value,h.value,m.value,y.value,c.value,e.class]),style:Be([u.value,f.value,g.value,e.style]),role:"alert"},{default:()=>{var I,P;return[ra(!1,"v-alert"),e.border&&C("div",{key:"border",class:Oe(["v-alert__border",w.value]),style:Be(b.value)},null),k&&C("div",{key:"prepend",class:"v-alert__prepend"},[r.prepend?p(Ft,{key:"prepend-defaults",disabled:!i.value,defaults:{VIcon:{...x}}},r.prepend):p(ee,ge({key:"prepend-icon"},x),null)]),C("div",{class:"v-alert__content"},[T&&p(t7,{key:"title"},{default:()=>{var A;return[((A=r.title)==null?void 0:A.call(r))??e.title]}}),((I=r.text)==null?void 0:I.call(r))??e.text,(P=r.default)==null?void 0:P.call(r)]),r.append&&C("div",{key:"append",class:"v-alert__append"},[r.append()]),R&&C("div",{key:"close",class:"v-alert__close"},[r.close?p(Ft,{key:"close-defaults",defaults:{VBtn:{icon:e.closeIcon,size:"x-small",variant:"text"}}},{default:()=>{var A;return[(A=r.close)==null?void 0:A.call(r,{props:_.value})]}}):p(se,ge({key:"close-btn",icon:e.closeIcon,size:"x-small",variant:"text"},_.value),null)])]}})}}}),eb=Symbol.for("vuetify:list");function iD(){let{filterable:e}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{filterable:!1};const t=Xe(eb,{filterable:!1,hasPrepend:Ce(!1),updateHasPrepend:()=>null}),n={filterable:t.filterable||e,hasPrepend:Ce(!1),updateHasPrepend:r=>{r&&(n.hasPrepend.value=r)}};return Jt(eb,n),t}function oD(){return Xe(eb,null)}const I1=e=>{const t={activate:n=>{let{id:r,value:s,activated:i}=n;return r=Ue(r),e&&!s&&i.size===1&&i.has(r)||(s?i.add(r):i.delete(r)),i},in:(n,r,s)=>{let i=new Set;if(n!=null)for(const o of Fn(n))i=t.activate({id:o,value:!0,activated:new Set(i),children:r,parents:s});return i},out:n=>Array.from(n)};return t},aD=e=>{const t=I1(e);return{activate:r=>{let{activated:s,id:i,...o}=r;i=Ue(i);const a=s.has(i)?new Set([i]):new Set;return t.activate({...o,id:i,activated:a})},in:(r,s,i)=>{let o=new Set;if(r!=null){const a=Fn(r);a.length&&(o=t.in(a.slice(0,1),s,i))}return o},out:(r,s,i)=>t.out(r,s,i)}},o7=e=>{const t=I1(e);return{activate:r=>{let{id:s,activated:i,children:o,...a}=r;return s=Ue(s),o.has(s)?i:t.activate({id:s,activated:i,children:o,...a})},in:t.in,out:t.out}},a7=e=>{const t=aD(e);return{activate:r=>{let{id:s,activated:i,children:o,...a}=r;return s=Ue(s),o.has(s)?i:t.activate({id:s,activated:i,children:o,...a})},in:t.in,out:t.out}},l7={open:e=>{let{id:t,value:n,opened:r,parents:s}=e;if(n){const i=new Set;i.add(t);let o=s.get(t);for(;o!=null;)i.add(o),o=s.get(o);return i}else return r.delete(t),r},select:()=>null},lD={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},u7={open:lD.open,select:e=>{let{id:t,value:n,opened:r,parents:s}=e;if(!n)return r;const i=[];let o=s.get(t);for(;o!=null;)i.push(o),o=s.get(o);return new Set(i)}},A1=e=>{const t={select:n=>{let{id:r,value:s,selected:i}=n;if(r=Ue(r),e&&!s){const o=Array.from(i.entries()).reduce((a,l)=>{let[u,c]=l;return c==="on"&&a.push(u),a},[]);if(o.length===1&&o[0]===r)return i}return i.set(r,s?"on":"off"),i},in:(n,r,s,i)=>{const o=new Map;for(const a of n||[])t.select({id:a,value:!0,selected:o,children:r,parents:s,disabled:i});return o},out:n=>{const r=[];for(const[s,i]of n.entries())i==="on"&&r.push(s);return r}};return t},uD=e=>{const t=A1(e);return{select:r=>{let{selected:s,id:i,...o}=r;i=Ue(i);const a=s.has(i)?new Map([[i,s.get(i)]]):new Map;return t.select({...o,id:i,selected:a})},in:(r,s,i,o)=>r!=null&&r.length?t.in(r.slice(0,1),s,i,o):new Map,out:(r,s,i)=>t.out(r,s,i)}},c7=e=>{const t=A1(e);return{select:r=>{let{id:s,selected:i,children:o,...a}=r;return s=Ue(s),o.has(s)?i:t.select({id:s,selected:i,children:o,...a})},in:t.in,out:t.out}},d7=e=>{const t=uD(e);return{select:r=>{let{id:s,selected:i,children:o,...a}=r;return s=Ue(s),o.has(s)?i:t.select({id:s,selected:i,children:o,...a})},in:t.in,out:t.out}},cD=e=>{const t={select:n=>{let{id:r,value:s,selected:i,children:o,parents:a,disabled:l}=n;r=Ue(r);const u=new Map(i),c=[r];for(;c.length;){const f=c.shift();l.has(f)||i.set(Ue(f),s?"on":"off"),o.has(f)&&c.push(...o.get(f))}let d=Ue(a.get(r));for(;d;){let f=!0,h=!0;for(const g of o.get(d)){const m=Ue(g);if(!l.has(m)&&(i.get(m)!=="on"&&(f=!1),i.has(m)&&i.get(m)!=="off"&&(h=!1),!f&&!h))break}i.set(d,f?"on":h?"off":"indeterminate"),d=Ue(a.get(d))}return e&&!s&&Array.from(i.entries()).reduce((h,g)=>{let[m,y]=g;return y==="on"&&h.push(m),h},[]).length===0?u:i},in:(n,r,s,i)=>{let o=new Map;for(const a of n||[])o=t.select({id:a,value:!0,selected:o,children:r,parents:s,disabled:i});return o},out:(n,r)=>{const s=[];for(const[i,o]of n.entries())o==="on"&&!r.has(i)&&s.push(i);return s}};return t},f7=e=>{const t=cD(e);return{select:t.select,in:t.in,out:(r,s,i)=>{const o=[];for(const[a,l]of r.entries())if(l==="on"){if(i.has(a)){const u=i.get(a);if(r.get(u)==="on")continue}o.push(a)}return o}}},$u=Symbol.for("vuetify:nested"),dD={id:Ce(),root:{itemsRegistration:G("render"),register:()=>null,unregister:()=>null,children:G(new Map),parents:G(new Map),disabled:G(new Set),open:()=>null,openOnSelect:()=>null,activate:()=>null,select:()=>null,activatable:G(!1),selectable:G(!1),opened:G(new Set),activated:G(new Set),selected:G(new Map),selectedValues:G([]),getPath:()=>[]}},h7=ce({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"),p7=(e,t,n)=>{let r=!1;const s=Ce(new Map),i=Ce(new Map),o=Ce(new Set),a=lt(e,"opened",e.opened,S=>new Set(Array.isArray(S)?S.map(_=>Ue(_)):S),S=>[...S.values()]),l=D(()=>{if(typeof e.activeStrategy=="object")return e.activeStrategy;if(typeof e.activeStrategy=="function")return e.activeStrategy(e.mandatory);switch(e.activeStrategy){case"leaf":return o7(e.mandatory);case"single-leaf":return a7(e.mandatory);case"independent":return I1(e.mandatory);case"single-independent":default:return aD(e.mandatory)}}),u=D(()=>{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 d7(e.mandatory);case"leaf":return c7(e.mandatory);case"independent":return A1(e.mandatory);case"single-independent":return uD(e.mandatory);case"trunk":return f7(e.mandatory);case"classic":default:return cD(e.mandatory)}}),c=D(()=>{if(typeof e.openStrategy=="object")return e.openStrategy;switch(e.openStrategy){case"list":return u7;case"single":return l7;case"multiple":default:return lD}}),d=lt(e,"activated",e.activated,S=>l.value.in(S,s.value,i.value),S=>l.value.out(S,s.value,i.value)),f=lt(e,"selected",e.selected,S=>u.value.in(S,s.value,i.value,o.value),S=>u.value.out(S,s.value,i.value));Qn(()=>{r=!0});function h(S){const _=[];let k=Ue(S);for(;k!==void 0;)_.unshift(k),k=i.value.get(k);return _}const g=fn("nested"),m=new Set,y=HN(()=>{ht(()=>{s.value=new Map(s.value),i.value=new Map(i.value)})},100);xe(()=>[t.value,Qt(n)],()=>{e.itemsRegistration==="props"&&w()},{immediate:!0});function w(){const S=new Map,_=new Map,k=new Set,T=Qt(n)?I=>Ue(I.raw):I=>I.value,R=[...t.value];let x=0;for(;x<R.length;){const I=R[x++],P=T(I);if(I.children){const A=[];for(const L of I.children){const B=T(L);S.set(B,P),A.push(B),R.push(L)}_.set(P,A)}I.props.disabled&&k.add(P)}s.value=_,i.value=S,o.value=k}const b={id:Ce(),root:{opened:a,activatable:ie(()=>e.activatable),selectable:ie(()=>e.selectable),activated:d,selected:f,selectedValues:D(()=>{const S=[];for(const[_,k]of f.value.entries())k==="on"&&S.push(_);return S}),itemsRegistration:ie(()=>e.itemsRegistration),register:(S,_,k,T)=>{if(m.has(S)){h(S).map(String).join(" -> "),h(_).concat(S).map(String).join(" -> ");return}else m.add(S);_&&S!==_&&i.value.set(S,_),k&&o.value.add(S),T&&s.value.set(S,[]),_!=null&&s.value.set(_,[...s.value.get(_)||[],S]),y()},unregister:S=>{if(r)return;m.delete(S),s.value.delete(S),o.value.delete(S);const _=i.value.get(S);if(_){const k=s.value.get(_)??[];s.value.set(_,k.filter(T=>T!==S))}i.value.delete(S),y()},open:(S,_,k)=>{g.emit("click:open",{id:S,value:_,path:h(S),event:k});const T=c.value.open({id:S,value:_,opened:new Set(a.value),children:s.value,parents:i.value,event:k});T&&(a.value=T)},openOnSelect:(S,_,k)=>{const T=c.value.select({id:S,value:_,selected:new Map(f.value),opened:new Set(a.value),children:s.value,parents:i.value,event:k});T&&(a.value=T)},select:(S,_,k)=>{g.emit("click:select",{id:S,value:_,path:h(S),event:k});const T=u.value.select({id:S,value:_,selected:new Map(f.value),children:s.value,parents:i.value,disabled:o.value,event:k});T&&(f.value=T),b.root.openOnSelect(S,_,k)},activate:(S,_,k)=>{if(!e.activatable)return b.root.select(S,!0,k);g.emit("click:activate",{id:S,value:_,path:h(S),event:k});const T=l.value.activate({id:S,value:_,activated:new Set(d.value),children:s.value,parents:i.value,event:k});if(T.size!==d.value.size)d.value=T;else{for(const R of T)if(!d.value.has(R)){d.value=T;return}for(const R of d.value)if(!T.has(R)){d.value=T;return}}},children:s,parents:i,disabled:o,getPath:h}};return Jt($u,b),b.root},fD=(e,t,n)=>{const r=Xe($u,dD),s=Symbol("nested item"),i=D(()=>{const a=Ue(Qt(e));return a!==void 0?a:s}),o={...r,id:i,open:(a,l)=>r.root.open(i.value,a,l),openOnSelect:(a,l)=>r.root.openOnSelect(i.value,a,l),isOpen:D(()=>r.root.opened.value.has(i.value)),parent:D(()=>r.root.parents.value.get(i.value)),activate:(a,l)=>r.root.activate(i.value,a,l),isActivated:D(()=>r.root.activated.value.has(i.value)),select:(a,l)=>r.root.select(i.value,a,l),isSelected:D(()=>r.root.selected.value.get(i.value)==="on"),isIndeterminate:D(()=>r.root.selected.value.get(i.value)==="indeterminate"),isLeaf:D(()=>!r.root.children.value.get(i.value)),isGroupActivator:r.isGroupActivator};return Wu(()=>{r.isGroupActivator||r.root.itemsRegistration.value==="props"||ht(()=>{r.root.register(i.value,r.id.value,Qt(t),n)})}),Qn(()=>{r.isGroupActivator||r.root.itemsRegistration.value==="props"||r.root.unregister(i.value)}),xe(i,(a,l)=>{r.isGroupActivator||r.root.itemsRegistration.value==="props"||(r.root.unregister(l),ht(()=>{r.root.register(a,r.id.value,Qt(t),n)}))}),n&&Jt($u,o),o},m7=()=>{const e=Xe($u,dD);Jt($u,{...e,isGroupActivator:!0})};function kf(){const e=Ce(!1);return xt(()=>{window.requestAnimationFrame(()=>{e.value=!0})}),{ssrBootStyles:ie(()=>e.value?void 0:{transition:"none !important"}),isBooted:Ji(e)}}const g7=Gu({name:"VListGroupActivator",setup(e,t){let{slots:n}=t;return m7(),()=>{var r;return(r=n.default)==null?void 0:r.call(n)}}}),v7=ce({activeColor:String,baseColor:String,color:String,collapseIcon:{type:He,default:"$collapse"},disabled:Boolean,expandIcon:{type:He,default:"$expand"},rawId:[String,Number],prependIcon:He,appendIcon:He,fluid:Boolean,subgroup:Boolean,title:String,value:null,...Ge(),...gt()},"VListGroup"),tb=Ee()({name:"VListGroup",props:v7(),setup(e,t){let{slots:n}=t;const{isOpen:r,open:s,id:i}=fD(()=>e.value,()=>e.disabled,!0),o=D(()=>`v-list-group--id-${String(e.rawId??i.value)}`),a=oD(),{isBooted:l}=kf(),u=Xe($u),c=ie(()=>{var m;return((m=u==null?void 0:u.root)==null?void 0:m.itemsRegistration.value)==="render"});function d(m){var y;["INPUT","TEXTAREA"].includes((y=m.target)==null?void 0:y.tagName)||s(!r.value,m)}const f=D(()=>({onClick:d,class:"v-list-group__header",id:o.value})),h=D(()=>r.value?e.collapseIcon:e.expandIcon),g=D(()=>({VListItem:{activeColor:e.activeColor,baseColor:e.baseColor,color:e.color,prependIcon:e.prependIcon||e.subgroup&&h.value,appendIcon:e.appendIcon||!e.subgroup&&h.value,title:e.title,value:e.value}}));return Me(()=>p(e.tag,{class:Oe(["v-list-group",{"v-list-group--prepend":a==null?void 0:a.hasPrepend.value,"v-list-group--fluid":e.fluid,"v-list-group--subgroup":e.subgroup,"v-list-group--open":r.value},e.class]),style:Be(e.style)},{default:()=>[n.activator&&p(Ft,{defaults:g.value},{default:()=>[p(g7,null,{default:()=>[n.activator({props:f.value,isOpen:r.value})]})]}),p(hi,{transition:{component:_P},disabled:!l.value},{default:()=>{var m,y;return[c.value?zt(C("div",{class:"v-list-group__items",role:"group","aria-labelledby":o.value},[(m=n.default)==null?void 0:m.call(n)]),[[uo,r.value]]):r.value&&C("div",{class:"v-list-group__items",role:"group","aria-labelledby":o.value},[(y=n.default)==null?void 0:y.call(n)])]}})]})),{isOpen:r}}}),y7=ce({opacity:[Number,String],...Ge(),...gt()},"VListItemSubtitle"),_t=Ee()({name:"VListItemSubtitle",props:y7(),setup(e,t){let{slots:n}=t;return Me(()=>p(e.tag,{class:Oe(["v-list-item-subtitle",e.class]),style:Be([{"--v-list-item-subtitle-opacity":e.opacity},e.style])},n)),{}}}),ft=Ku("v-list-item-title"),b7=ce({active:{type:Boolean,default:void 0},activeClass:String,activeColor:String,appendAvatar:String,appendIcon:He,baseColor:String,disabled:Boolean,lines:[Boolean,String],link:{type:Boolean,default:void 0},nav:Boolean,prependAvatar:String,prependIcon:He,ripple:{type:[Boolean,Object],default:!0},slim:Boolean,prependGap:[Number,String],subtitle:{type:[String,Number,Boolean],default:void 0},title:{type:[String,Number,Boolean],default:void 0},value:null,onClick:Kn(),onClickOnce:Kn(),...xs(),...Ge(),...Jn(),...xr(),...Cs(),...Hn(),...xm(),...gt(),...Nt(),...Ws({variant:"text"})},"VListItem"),ze=Ee()({name:"VListItem",directives:{vRipple:Us},props:b7(),emits:{click:e=>!0},setup(e,t){let{attrs:n,slots:r,emit:s}=t;const i=km(e,n),o=D(()=>e.value===void 0?i.href.value:e.value),{activate:a,isActivated:l,select:u,isOpen:c,isSelected:d,isIndeterminate:f,isGroupActivator:h,root:g,parent:m,openOnSelect:y,id:w}=fD(o,()=>e.disabled,!1),b=oD(),S=D(()=>{var q;return e.active!==!1&&(e.active||((q=i.isActive)==null?void 0:q.value)||(g.activatable.value?l.value:d.value))}),_=ie(()=>e.link!==!1&&i.isLink.value),k=D(()=>!!b&&(g.selectable.value||g.activatable.value||e.value!=null)),T=D(()=>!e.disabled&&e.link!==!1&&(e.link||i.isClickable.value||k.value)),R=D(()=>b?_.value?"link":k.value?"option":"listitem":void 0),x=D(()=>{if(k.value)return g.activatable.value?l.value:g.selectable.value?d.value:S.value}),I=ie(()=>e.rounded||e.nav),P=ie(()=>e.color??e.activeColor),A=ie(()=>({color:S.value?P.value??e.baseColor:e.baseColor,variant:e.variant}));xe(()=>{var q;return(q=i.isActive)==null?void 0:q.value},q=>{q&&L()}),Wu(()=>{var q;(q=i.isActive)!=null&&q.value&&ht(()=>L())});function L(){m.value!=null&&g.open(m.value,!0),y(!0)}const{themeClasses:B}=nn(e),{borderClasses:O}=Hs(e),{colorClasses:F,colorStyles:W,variantClasses:X}=bl(A),{densityClasses:V}=Es(e),{dimensionStyles:z}=Er(e),{elevationClasses:M}=js(e),{roundedClasses:re}=Zn(I),H=ie(()=>e.lines?`v-list-item--${e.lines}-line`:void 0),j=ie(()=>e.ripple!==void 0&&e.ripple&&(b!=null&&b.filterable)?{keys:["Enter"]}:e.ripple),pe=D(()=>({isActive:S.value,select:u,isOpen:c.value,isSelected:d.value,isIndeterminate:f.value}));function J(q){var he,ne;s("click",q),!["INPUT","TEXTAREA"].includes((he=q.target)==null?void 0:he.tagName)&&T.value&&((ne=i.navigate)==null||ne.call(i,q),!h&&(g.activatable.value?a(!l.value,q):(g.selectable.value||e.value!=null&&!_.value)&&u(!d.value,q)))}function we(q){const he=q.target;["INPUT","TEXTAREA"].includes(he.tagName)||(q.key==="Enter"||q.key===" "&&!(b!=null&&b.filterable))&&(q.preventDefault(),q.stopPropagation(),q.target.dispatchEvent(new MouseEvent("click",q)))}return Me(()=>{const q=_.value?"a":e.tag,he=r.title||e.title!=null,ne=r.subtitle||e.subtitle!=null,K=!!(e.appendAvatar||e.appendIcon),ke=!!(K||r.append),Re=!!(e.prependAvatar||e.prependIcon),N=!!(Re||r.prepend);return b==null||b.updateHasPrepend(N),e.activeColor&&LR("active-color",["color","base-color"]),zt(p(q,ge(i.linkProps,{class:["v-list-item",{"v-list-item--active":S.value,"v-list-item--disabled":e.disabled,"v-list-item--link":T.value,"v-list-item--nav":e.nav,"v-list-item--slim":e.slim,[`${e.activeClass}`]:e.activeClass&&S.value},B.value,O.value,F.value,V.value,M.value,H.value,re.value,X.value,e.class],style:[{"--v-list-prepend-gap":Le(e.prependGap)},W.value,z.value,e.style],tabindex:T.value?b?-2:0:void 0,"aria-selected":x.value,role:R.value,onClick:J,onKeydown:T.value&&!_.value&&we}),{default:()=>{var U;return[ra(T.value||S.value,"v-list-item"),N&&C("div",{key:"prepend",class:"v-list-item__prepend"},[r.prepend?p(Ft,{key:"prepend-defaults",disabled:!Re,defaults:{VAvatar:{density:e.density,image:e.prependAvatar},VIcon:{density:e.density,icon:e.prependIcon},VListItemAction:{start:!0}}},{default:()=>{var Y;return[(Y=r.prepend)==null?void 0:Y.call(r,pe.value)]}}):C(De,null,[e.prependAvatar&&p(dt,{key:"prepend-avatar",density:e.density,image:e.prependAvatar},null),e.prependIcon&&p(ee,{key:"prepend-icon",density:e.density,icon:e.prependIcon},null)]),C("div",{class:"v-list-item__spacer"},null)]),C("div",{class:"v-list-item__content","data-no-activator":""},[he&&p(ft,{key:"title"},{default:()=>{var Y;return[((Y=r.title)==null?void 0:Y.call(r,{title:e.title}))??ae(e.title)]}}),ne&&p(_t,{key:"subtitle"},{default:()=>{var Y;return[((Y=r.subtitle)==null?void 0:Y.call(r,{subtitle:e.subtitle}))??ae(e.subtitle)]}}),(U=r.default)==null?void 0:U.call(r,pe.value)]),ke&&C("div",{key:"append",class:"v-list-item__append"},[r.append?p(Ft,{key:"append-defaults",disabled:!K,defaults:{VAvatar:{density:e.density,image:e.appendAvatar},VIcon:{density:e.density,icon:e.appendIcon},VListItemAction:{end:!0}}},{default:()=>{var Y;return[(Y=r.append)==null?void 0:Y.call(r,pe.value)]}}):C(De,null,[e.appendIcon&&p(ee,{key:"append-icon",density:e.density,icon:e.appendIcon},null),e.appendAvatar&&p(dt,{key:"append-avatar",density:e.density,image:e.appendAvatar},null)]),C("div",{class:"v-list-item__spacer"},null)])]}}),[[Us,T.value&&j.value]])}),{activate:a,isActivated:l,isGroupActivator:h,isSelected:d,list:b,select:u,root:g,id:w,link:i}}}),w7=ce({color:String,inset:Boolean,sticky:Boolean,title:String,...Ge(),...gt()},"VListSubheader"),Ur=Ee()({name:"VListSubheader",props:w7(),setup(e,t){let{slots:n}=t;const{textColorClasses:r,textColorStyles:s}=Vs(()=>e.color);return Me(()=>{const i=!!(n.default||e.title);return p(e.tag,{class:Oe(["v-list-subheader",{"v-list-subheader--inset":e.inset,"v-list-subheader--sticky":e.sticky},r.value,e.class]),style:Be([{textColorStyles:s},e.style])},{default:()=>{var o;return[i&&C("div",{class:"v-list-subheader__text"},[((o=n.default)==null?void 0:o.call(n))??e.title])]}})}),{}}}),S7=["dotted","dashed","solid","double"],_7=ce({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=>S7.includes(e)},...Ge(),...Nt()},"VDivider"),cn=Ee()({name:"VDivider",props:_7(),setup(e,t){let{attrs:n,slots:r}=t;const{themeClasses:s}=nn(e),{textColorClasses:i,textColorStyles:o}=Vs(()=>e.color),a=D(()=>{const u={};return e.length&&(u[e.vertical?"height":"width"]=Le(e.length)),e.thickness&&(u[e.vertical?"borderRightWidth":"borderTopWidth"]=Le(e.thickness)),u}),l=ie(()=>{const u=Array.isArray(e.contentOffset)?e.contentOffset[0]:e.contentOffset,c=Array.isArray(e.contentOffset)?e.contentOffset[1]:0;return{marginBlock:e.vertical&&u?Le(u):void 0,marginInline:!e.vertical&&u?Le(u):void 0,transform:c?`translate${e.vertical?"X":"Y"}(${Le(c)})`:void 0}});return Me(()=>{const u=C("hr",{class:Oe([{"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:Be([a.value,o.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?C("div",{class:Oe(["v-divider__wrapper",{"v-divider__wrapper--gradient":e.gradient,"v-divider__wrapper--inset":e.inset,"v-divider__wrapper--vertical":e.vertical}])},[u,C("div",{class:"v-divider__content",style:Be(l.value)},[r.default()]),u]):u}),{}}}),k7=ce({items:Array,returnObject:Boolean},"VListChildren"),hD=Ee()({name:"VListChildren",props:k7(),setup(e,t){let{slots:n}=t;return iD(),()=>{var r,s;return((r=n.default)==null?void 0:r.call(n))??((s=e.items)==null?void 0:s.map(i=>{var f,h;let{children:o,props:a,type:l,raw:u}=i;if(l==="divider")return((f=n.divider)==null?void 0:f.call(n,{props:a}))??p(cn,a,null);if(l==="subheader")return((h=n.subheader)==null?void 0:h.call(n,{props:a}))??p(Ur,a,null);const c={subtitle:n.subtitle?g=>{var m;return(m=n.subtitle)==null?void 0:m.call(n,{...g,item:u})}:void 0,prepend:n.prepend?g=>{var m;return(m=n.prepend)==null?void 0:m.call(n,{...g,item:u})}:void 0,append:n.append?g=>{var m;return(m=n.append)==null?void 0:m.call(n,{...g,item:u})}:void 0,title:n.title?g=>{var m;return(m=n.title)==null?void 0:m.call(n,{...g,item:u})}:void 0},d=tb.filterProps(a);return o?p(tb,ge(d,{value:e.returnObject?u:a==null?void 0:a.value,rawId:a==null?void 0:a.value}),{activator:g=>{let{props:m}=g;const y=ge(a,m,{value:e.returnObject?u:a.value});return n.header?n.header({props:y}):p(ze,y,c)},default:()=>p(hD,{items:o,returnObject:e.returnObject},n)}):n.item?n.item({props:a}):p(ze,ge(a,{value:e.returnObject?u:a.value}),c)}))}}}),pD=ce({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"),x7=new Set(["item","divider","subheader"]);function ru(e,t){const n=Mn(t,e.itemTitle,t),r=Mn(t,e.itemValue,n),s=Mn(t,e.itemChildren),i=e.itemProps===!0?typeof t=="object"&&t!=null&&!Array.isArray(t)?"children"in t?In(t,["children"]):t:void 0:Mn(t,e.itemProps);let o=Mn(t,e.itemType,"item");x7.has(o)||(o="item");const a={title:n,value:r,...i};return{type:o,title:String(a.title??""),value:a.value,props:a,children:o==="item"&&Array.isArray(s)?mD(e,s):void 0,raw:t}}ru.neededProps=["itemTitle","itemValue","itemChildren","itemProps","itemType"];function mD(e,t){const n=Go(e,ru.neededProps),r=[];for(const s of t)r.push(ru(n,s));return r}function E7(e){const t=D(()=>mD(e,e.items)),n=D(()=>t.value.some(a=>a.value===null)),r=Ce(new Map),s=Ce([]);Rn(()=>{const a=t.value,l=new Map,u=[];for(let c=0;c<a.length;c++){const d=a[c];if(Ko(d.value)||d.value===null){let f=l.get(d.value);f||(f=[],l.set(d.value,f)),f.push(d)}else u.push(d)}r.value=l,s.value=u});function i(a){const l=r.value,u=t.value,c=s.value,d=n.value,f=e.returnObject,h=!!e.valueComparator,g=e.valueComparator||$r,m=Go(e,ru.neededProps),y=[];e:for(const w of a){if(!d&&w===null)continue;if(f&&typeof w=="string"){y.push(ru(m,w));continue}const b=l.get(w);if(h||!b){for(const S of h?u:c)if(g(w,S.value)){y.push(S);continue e}y.push(ru(m,w));continue}y.push(...b)}return y}function o(a){return e.returnObject?a.map(l=>{let{raw:u}=l;return u}):a.map(l=>{let{value:u}=l;return u})}return{items:t,transformIn:i,transformOut:o}}const C7=new Set(["item","divider","subheader"]);function T7(e,t){const n=Ko(t)?t:Mn(t,e.itemTitle),r=Ko(t)?t:Mn(t,e.itemValue,void 0),s=Mn(t,e.itemChildren),i=e.itemProps===!0?In(t,["children"]):Mn(t,e.itemProps);let o=Mn(t,e.itemType,"item");C7.has(o)||(o="item");const a={title:n,value:r,...i};return{type:o,title:a.title,value:a.value,props:a,children:o==="item"&&s?gD(e,s):void 0,raw:t}}function gD(e,t){const n=[];for(const r of t)n.push(T7(e,r));return n}function R7(e){return{items:D(()=>gD(e,e.items))}}const P7=ce({baseColor:String,activeColor:String,activeClass:String,bgColor:String,disabled:Boolean,filterable:Boolean,expandIcon:He,collapseIcon:He,lines:{type:[Boolean,String],default:"one"},slim:Boolean,prependGap:[Number,String],indent:[Number,String],nav:Boolean,"onClick:open":Kn(),"onClick:select":Kn(),"onUpdate:opened":Kn(),...h7({selectStrategy:"single-leaf",openStrategy:"list"}),...xs(),...Ge(),...Jn(),...xr(),...Cs(),...pD(),...Hn(),...gt(),...Nt(),...Ws({variant:"text"})},"VList"),Ht=Ee()({name:"VList",props:P7(),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}=R7(e),{themeClasses:s}=nn(e),{backgroundColorClasses:i,backgroundColorStyles:o}=wr(()=>e.bgColor),{borderClasses:a}=Hs(e),{densityClasses:l}=Es(e),{dimensionStyles:u}=Er(e),{elevationClasses:c}=js(e),{roundedClasses:d}=Zn(e),{children:f,open:h,parents:g,select:m,getPath:y}=p7(e,r,()=>e.returnObject),w=ie(()=>e.lines?`v-list--${e.lines}-line`:void 0),b=ie(()=>e.activeColor),S=ie(()=>e.baseColor),_=ie(()=>e.color),k=ie(()=>e.selectable||e.activatable);iD({filterable:e.filterable}),zr({VListGroup:{activeColor:b,baseColor:S,color:_,expandIcon:ie(()=>e.expandIcon),collapseIcon:ie(()=>e.collapseIcon)},VListItem:{activeClass:ie(()=>e.activeClass),activeColor:b,baseColor:S,color:_,density:ie(()=>e.density),disabled:ie(()=>e.disabled),lines:ie(()=>e.lines),nav:ie(()=>e.nav),slim:ie(()=>e.slim),variant:ie(()=>e.variant)}});const T=Ce(!1),R=G();function x(O){T.value=!0}function I(O){T.value=!1}function P(O){var F;!T.value&&!(O.relatedTarget&&((F=R.value)!=null&&F.contains(O.relatedTarget)))&&B()}function A(O){const F=O.target;if(!(!R.value||F.tagName==="INPUT"&&["Home","End"].includes(O.key)||F.tagName==="TEXTAREA")){if(O.key==="ArrowDown")B("next");else if(O.key==="ArrowUp")B("prev");else if(O.key==="Home")B("first");else if(O.key==="End")B("last");else return;O.preventDefault()}}function L(O){T.value=!0}function B(O){if(R.value)return Zc(R.value,O)}return Me(()=>{const O=e.indent??(e.prependGap?Number(e.prependGap)+24:void 0);return p(e.tag,{ref:R,class:Oe(["v-list",{"v-list--disabled":e.disabled,"v-list--nav":e.nav,"v-list--slim":e.slim},s.value,i.value,a.value,l.value,c.value,w.value,d.value,e.class]),style:Be([{"--v-list-indent":Le(O),"--v-list-group-prepend":O?"0px":void 0,"--v-list-prepend-gap":Le(e.prependGap)},o.value,u.value,e.style]),tabindex:e.disabled?-1:0,role:k.value?"listbox":"list","aria-activedescendant":void 0,onFocusin:x,onFocusout:I,onFocus:P,onKeydown:A,onMousedown:L},{default:()=>[p(hD,{items:r.value,returnObject:e.returnObject},n)]})}),{open:h,select:m,focus:B,children:f,parents:g,getPath:y}}}),I7=ce({start:Boolean,end:Boolean,...Ge(),...gt()},"VListItemAction"),Nu=Ee()({name:"VListItemAction",props:I7(),setup(e,t){let{slots:n}=t;return Me(()=>p(e.tag,{class:Oe(["v-list-item-action",{"v-list-item-action--start":e.start,"v-list-item-action--end":e.end},e.class]),style:Be(e.style)},n)),{}}}),A7=ce({start:Boolean,end:Boolean,...Ge(),...gt()},"VListItemMedia"),O7=Ee()({name:"VListItemMedia",props:A7(),setup(e,t){let{slots:n}=t;return Me(()=>p(e.tag,{class:Oe(["v-list-item-media",{"v-list-item-media--start":e.start,"v-list-item-media--end":e.end},e.class]),style:Be(e.style)},n)),{}}}),D7={key:1},M7={key:2},L7={class:"mt-3"},F7={key:0},$7={key:1},N7={key:2},B7=Ve({__name:"BatchReprintDialog",setup(e){const t=Xt(),n=G(),r=sn(on.BatchReprintDialog),s=G(!1),i=G(!1),o=G([]),a=G([]),l=G(""),u=$t();function c(g){s.value=!0}async function d(g){n.value=g;try{const m=await Xl.batchGetLastPrintedFiles(n.value);o.value=m,a.value=m.filter(y=>y.connectionState==="Operational"&&y.reprintState==_a.LastPrintReady)}catch(m){l.value=m.code.toString()??""}s.value=!1}async function f(){i.value=!0;try{await Xl.batchReprintFiles(a.value.filter(g=>{var m;return(m=g.file)==null?void 0:m.path}).map(g=>{var m;return{printerId:g.printerId,path:((m=g.file)==null?void 0:m.path)||""}})),t.clearSelectedPrinters(),u.info("Action completed","Your reprinted jobs are starting",5e3),h()}catch(g){l.value=e7(g)}finally{i.value=!1}}function h(){r.closeDialog(r.context())}return(g,m)=>{const y=Si;return $(),te(y,{id:Z(r).dialogId,"max-width":"1000px",onBeforeOpened:c,onEscape:m[3]||(m[3]=w=>h()),onOpened:d},{default:v(()=>[p(kt,{class:"pa-4"},{default:v(()=>[p(un,null,{default:v(()=>[...m[4]||(m[4]=[C("span",{class:"text-h5"}," Batch - Submit Reprint Jobs ",-1)])]),_:1}),p(rn,null,{default:v(()=>{var w;return[(w=l.value)!=null&&w.length?($(),te(yn,{key:0,color:"error"},{default:v(()=>[E(ae(l.value),1)]),_:1})):ve("",!0),s.value?($(),ye("span",D7," Loading... ")):($(),ye("div",M7,[p(Ht,{density:"compact"},{default:v(()=>[p(Ur,null,{default:v(()=>[...m[5]||(m[5]=[E(" Reprinted Files - Select from list ",-1)])]),_:1}),p(tb,{modelValue:a.value,"onUpdate:modelValue":m[0]||(m[0]=b=>a.value=b),multiple:""},{default:v(()=>[($(!0),ye(De,null,Zt(o.value,(b,S)=>($(),te(ze,{key:S,value:b,disabled:b.connectionState!=="Operational"||b.reprintState!==Z(_a).LastPrintReady},{prepend:v(()=>[b.reprintState==Z(_a).LastPrintReady?($(),te(ee,{key:0},{default:v(()=>[...m[6]||(m[6]=[E("checklist",-1)])]),_:1})):ve("",!0),b.reprintState==Z(_a).NoLastPrint?($(),te(ee,{key:1},{default:v(()=>[...m[7]||(m[7]=[E(" question_mark ",-1)])]),_:1})):ve("",!0),b.reprintState==Z(_a).PrinterNotAvailable?($(),te(ee,{key:2},{default:v(()=>[...m[8]||(m[8]=[E(" signal_disconnected ",-1)])]),_:1})):ve("",!0)]),default:v(()=>{var _,k;return[(k=(_=b.file)==null?void 0:_.path)!=null&&k.length?($(),te(ft,{key:0},{default:v(()=>{var T;return[E(ae((T=b.file)==null?void 0:T.path)+" ",1),b.connectionState!=="Operational"?($(),te(Cn,{key:0},{default:v(()=>[...m[9]||(m[9]=[E(" Printer busy ",-1)])]),_:1})):ve("",!0)]}),_:2},1024)):b.reprintState==Z(_a).NoLastPrint?($(),te(ft,{key:1},{default:v(()=>[...m[10]||(m[10]=[E(" No file is present to print again ",-1)])]),_:1})):($(),te(ft,{key:2},{default:v(()=>[...m[11]||(m[11]=[E(" OctoPrint cant be reached ",-1)])]),_:1})),p(_t,null,{default:v(()=>{var T;return[E(" Printer '"+ae(((T=Z(t).printer(b.printerId))==null?void 0:T.name)??"Unknown printer")+"' ",1)]}),_:2},1024)]}),_:2},1032,["value","disabled"]))),128))]),_:1},8,["modelValue"])]),_:1})])),C("div",L7,[i.value?($(),ye("div",F7,[p(di,{class:"ma-3",indeterminate:"",color:"blue"}),m[12]||(m[12]=E(" Submitting ",-1))])):a.value.length>0?($(),ye("div",$7,ae(a.value.length)+" reprint selected ",1)):($(),ye("div",N7,"Must select at least one file"))]),m[14]||(m[14]=C("br",null,null,-1)),p(se,{disabled:i.value||a.value.length===0,onClick:m[1]||(m[1]=b=>f())},{default:v(()=>[...m[13]||(m[13]=[E(" Submit Batch Reprint ",-1)])]),_:1},8,["disabled"])]}),_:1}),p(zn,null,{default:v(()=>[p(Pn),p(se,{variant:"text",onClick:m[2]||(m[2]=w=>Z(r).closeDialog())},{default:v(()=>[...m[15]||(m[15]=[E(" Close ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}});function vD(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 nb="/assets/octoprint-tentacle-D_4slObB.svg",Bh=0,rb=1,Vh=2;function yD(e){return e===Bh}function Np(e){return e===rb}function Bp(e){return e===Vh}function id(e){return yD(e)?"OctoPrint":Np(e)?"Moonraker":Bp(e)?"PrusaLink":"Unknown"}function V7(e){let{rootEl:t,isSticky:n,layoutItemStyles:r}=e;const s=Ce(!1),i=Ce(0),o=D(()=>{const u=typeof s.value=="boolean"?"top":s.value;return[n.value?{top:"auto",bottom:"auto",height:void 0}:void 0,s.value?{[u]:Le(i.value)}:{top:r.value.top}]});xt(()=>{xe(n,u=>{u?window.addEventListener("scroll",l,{passive:!0}):window.removeEventListener("scroll",l)},{immediate:!0})}),Qn(()=>{window.removeEventListener("scroll",l)});let a=0;function l(){const u=a>window.scrollY?"up":"down",c=t.value.getBoundingClientRect(),d=parseFloat(r.value.top??0),f=window.scrollY-Math.max(0,i.value-d),h=c.height+Math.max(i.value,d)-window.scrollY-window.innerHeight,g=parseFloat(getComputedStyle(t.value).getPropertyValue("--v-body-scroll-y"))||0;c.height<window.innerHeight-d?(s.value="top",i.value=d):u==="up"&&s.value==="bottom"||u==="down"&&s.value==="top"?(i.value=window.scrollY+c.top-g,s.value=!0):u==="down"&&h<=0?(i.value=0,s.value="bottom"):u==="up"&&f<=0&&(g?s.value!=="top"&&(i.value=-f+g+d,s.value="top"):(i.value=c.top+f,s.value="top")),a=window.scrollY}return{isStuck:s,stickyStyles:o}}const U7=100,z7=20;function bx(e){return(e<0?-1:1)*Math.sqrt(Math.abs(e))*1.41421356237}function wx(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=bx(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 bx(t)*1e3}function H7(){const e={};function t(s){Array.from(s.changedTouches).forEach(i=>{(e[i.identifier]??(e[i.identifier]=new UR(z7))).push([s.timeStamp,i])})}function n(s){Array.from(s.changedTouches).forEach(i=>{delete e[i.identifier]})}function r(s){var u;const i=(u=e[s])==null?void 0:u.values().reverse();if(!i)throw new Error(`No samples for touch id ${s}`);const o=i[0],a=[],l=[];for(const c of i){if(o[0]-c[0]>U7)break;a.push({t:c[0],d:c[1].clientX}),l.push({t:c[0],d:c[1].clientY})}return{x:wx(a),y:wx(l),get direction(){const{x:c,y:d}=this,[f,h]=[Math.abs(c),Math.abs(d)];return f>h&&c>=0?"right":f>h&&c<=0?"left":h>f&&d>=0?"down":h>f&&d<=0?"up":j7()}}}return{addMovement:t,endTouch:n,getVelocity:r}}function j7(){throw new Error}function W7(e){let{el:t,isActive:n,isTemporary:r,width:s,touchless:i,position:o}=e;xt(()=>{window.addEventListener("touchstart",b,{passive:!0}),window.addEventListener("touchmove",S,{passive:!1}),window.addEventListener("touchend",_,{passive:!0})}),Qn(()=>{window.removeEventListener("touchstart",b),window.removeEventListener("touchmove",S),window.removeEventListener("touchend",_)});const a=D(()=>["left","right"].includes(o.value)),{addMovement:l,endTouch:u,getVelocity:c}=H7();let d=!1;const f=Ce(!1),h=Ce(0),g=Ce(0);let m;function y(T,R){return(o.value==="left"?T:o.value==="right"?document.documentElement.clientWidth-T:o.value==="top"?T:o.value==="bottom"?document.documentElement.clientHeight-T:Dl())-(R?s.value:0)}function w(T){let R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const x=o.value==="left"?(T-g.value)/s.value:o.value==="right"?(document.documentElement.clientWidth-T-g.value)/s.value:o.value==="top"?(T-g.value)/s.value:o.value==="bottom"?(document.documentElement.clientHeight-T-g.value)/s.value:Dl();return R?Un(x):x}function b(T){if(i.value)return;const R=T.changedTouches[0].clientX,x=T.changedTouches[0].clientY,I=25,P=o.value==="left"?R<I:o.value==="right"?R>document.documentElement.clientWidth-I:o.value==="top"?x<I:o.value==="bottom"?x>document.documentElement.clientHeight-I:Dl(),A=n.value&&(o.value==="left"?R<s.value:o.value==="right"?R>document.documentElement.clientWidth-s.value:o.value==="top"?x<s.value:o.value==="bottom"?x>document.documentElement.clientHeight-s.value:Dl());(P||A||n.value&&r.value)&&(m=[R,x],g.value=y(a.value?R:x,n.value),h.value=w(a.value?R:x),d=g.value>-20&&g.value<80,u(T),l(T))}function S(T){const R=T.changedTouches[0].clientX,x=T.changedTouches[0].clientY;if(d){if(!T.cancelable){d=!1;return}const P=Math.abs(R-m[0]),A=Math.abs(x-m[1]);(a.value?P>A&&P>3:A>P&&A>3)?(f.value=!0,d=!1):(a.value?A:P)>3&&(d=!1)}if(!f.value)return;T.preventDefault(),l(T);const I=w(a.value?R:x,!1);h.value=Math.max(0,Math.min(1,I)),I>1?g.value=y(a.value?R:x,!0):I<0&&(g.value=y(a.value?R:x,!1))}function _(T){if(d=!1,!f.value)return;l(T),f.value=!1;const R=c(T.changedTouches[0].identifier),x=Math.abs(R.x),I=Math.abs(R.y);(a.value?x>I&&x>400:I>x&&I>3)?n.value=R.direction===({left:"right",right:"left",top:"down",bottom:"up"}[o.value]||Dl()):n.value=h.value>.5}const k=D(()=>f.value?{transform:o.value==="left"?`translateX(calc(-100% + ${h.value*s.value}px))`:o.value==="right"?`translateX(calc(100% - ${h.value*s.value}px))`:o.value==="top"?`translateY(calc(-100% + ${h.value*s.value}px))`:o.value==="bottom"?`translateY(calc(100% - ${h.value*s.value}px))`:Dl(),transition:"none"}:void 0);return Nr(f,()=>{var x,I;const T=((x=t.value)==null?void 0:x.style.transform)??null,R=((I=t.value)==null?void 0:I.style.transition)??null;Rn(()=>{var P,A,L,B;(A=t.value)==null||A.style.setProperty("transform",((P=k.value)==null?void 0:P.transform)||"none"),(B=t.value)==null||B.style.setProperty("transition",((L=k.value)==null?void 0:L.transition)||null)}),ln(()=>{var P,A;(P=t.value)==null||P.style.setProperty("transform",T),(A=t.value)==null||A.style.setProperty("transition",R)})}),{isDragging:f,dragProgress:h,dragStyles:k}}function Dl(){throw new Error}function xf(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
|
|
69
|
+
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
|
|
70
|
+
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
|
|
71
|
+
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
|
|
72
|
+
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 q7(e,t,n){var c;const r=[];let s=[];const i=bD(e),o=wD(e),a=n??((c=xf(t))==null?void 0:c.firstDay)??0,l=(i.getDay()-a+7)%7,u=(o.getDay()-a+7)%7;for(let d=0;d<l;d++){const f=new Date(i);f.setDate(f.getDate()-(l-d)),s.push(f)}for(let d=1;d<=o.getDate();d++){const f=new Date(e.getFullYear(),e.getMonth(),d);s.push(f),s.length===7&&(r.push(s),s=[])}for(let d=1;d<7-u;d++){const f=new Date(o);f.setDate(f.getDate()+d),s.push(f)}return s.length>0&&r.push(s),r}function od(e,t,n){var i;let r=(n??((i=xf(t))==null?void 0:i.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 G7(e,t){var s;const n=new Date(e),r=((((s=xf(t))==null?void 0:s.firstDay)??0)+6)%7;for(;n.getDay()!==r;)n.setDate(n.getDate()+1);return n}function bD(e){return new Date(e.getFullYear(),e.getMonth(),1)}function wD(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function K7(e){const t=e.split("-").map(Number);return new Date(t[0],t[1]-1,t[2])}const Y7=/^([12]\d{3}-([1-9]|0[1-9]|1[0-2])-([1-9]|0[1-9]|[12]\d|3[01]))$/;function SD(e){if(e==null)return new Date;if(e instanceof Date)return e;if(typeof e=="string"){let t;if(Y7.test(e))return K7(e);if(t=Date.parse(e),!isNaN(t))return new Date(t)}return null}const Sx=new Date(2e3,0,2);function X7(e,t,n){var s;const r=t??((s=xf(e))==null?void 0:s.firstDay)??0;return Hl(7).map(i=>{const o=new Date(Sx);return o.setDate(Sx.getDate()+r+i),new Intl.DateTimeFormat(e,{weekday:n??"narrow"}).format(o)})}function Q7(e,t,n,r){const s=SD(e)??new Date,i=r==null?void 0:r[t];if(typeof i=="function")return i(s,t,n);let o={};switch(t){case"fullDate":o={year:"numeric",month:"short",day:"numeric"};break;case"fullDateWithWeekday":o={weekday:"long",year:"numeric",month:"long",day:"numeric"};break;case"normalDate":const a=s.getDate(),l=new Intl.DateTimeFormat(n,{month:"long"}).format(s);return`${a} ${l}`;case"normalDateWithWeekday":o={weekday:"short",day:"numeric",month:"short"};break;case"shortDate":o={month:"short",day:"numeric"};break;case"year":o={year:"numeric"};break;case"month":o={month:"long"};break;case"monthShort":o={month:"short"};break;case"monthAndYear":o={month:"long",year:"numeric"};break;case"monthAndDate":o={month:"long",day:"numeric"};break;case"weekday":o={weekday:"long"};break;case"weekdayShort":o={weekday:"short"};break;case"dayOfMonth":return new Intl.NumberFormat(n).format(s.getDate());case"hours12h":o={hour:"numeric",hour12:!0};break;case"hours24h":o={hour:"numeric",hour12:!1};break;case"minutes":o={minute:"numeric"};break;case"seconds":o={second:"numeric"};break;case"fullTime":o={hour:"numeric",minute:"numeric"};break;case"fullTime12h":o={hour:"numeric",minute:"numeric",hour12:!0};break;case"fullTime24h":o={hour:"numeric",minute:"numeric",hour12:!1};break;case"fullDateTime":o={year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric"};break;case"fullDateTime12h":o={year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",hour12:!0};break;case"fullDateTime24h":o={year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",hour12:!1};break;case"keyboardDate":o={year:"numeric",month:"2-digit",day:"2-digit"};break;case"keyboardDateTime":return o={year:"numeric",month:"2-digit",day:"2-digit",hour:"numeric",minute:"numeric"},new Intl.DateTimeFormat(n,o).format(s).replace(/, /g," ");case"keyboardDateTime12h":return o={year:"numeric",month:"2-digit",day:"2-digit",hour:"numeric",minute:"numeric",hour12:!0},new Intl.DateTimeFormat(n,o).format(s).replace(/, /g," ");case"keyboardDateTime24h":return o={year:"numeric",month:"2-digit",day:"2-digit",hour:"numeric",minute:"numeric",hour12:!1},new Intl.DateTimeFormat(n,o).format(s).replace(/, /g," ");default:o=i??{timeZone:"UTC",timeZoneName:"short"}}return new Intl.DateTimeFormat(n,o).format(s)}function J7(e,t){const n=e.toJsDate(t),r=n.getFullYear(),s=RS(String(n.getMonth()+1),2,"0"),i=RS(String(n.getDate()),2,"0");return`${r}-${s}-${i}`}function Z7(e){const[t,n,r]=e.split("-").map(Number);return new Date(t,n-1,r)}function e9(e,t){const n=new Date(e);return n.setMinutes(n.getMinutes()+t),n}function t9(e,t){const n=new Date(e);return n.setHours(n.getHours()+t),n}function tl(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),n}function n9(e,t){const n=new Date(e);return n.setDate(n.getDate()+t*7),n}function r9(e,t){const n=new Date(e);return n.setDate(1),n.setMonth(n.getMonth()+t),n}function Dd(e){return e.getFullYear()}function s9(e){return e.getMonth()}function i9(e,t,n,r){const s=xf(t),i=n??(s==null?void 0:s.firstDay)??0,o=(s==null?void 0:s.firstWeekSize)??1;return r!==void 0?o9(e,t,i,r):a9(e,t,i,o)}function o9(e,t,n,r){const s=(7+r-n)%7,i=od(e,t,n),o=tl(i,6);function a(f){return(7+new Date(f,0,1).getDay()-n)%7}let l=Dd(i);l<Dd(o)&&a(l+1)<=s&&l++;const u=new Date(l,0,1),c=a(l),d=c<=s?tl(u,-c):tl(u,7-c);return 1+Up(O1(i),Md(d),"weeks")}function a9(e,t,n,r){const s=od(e,t,n),i=tl(od(e,t,n),6);function o(d){const f=new Date(d,0,1);return 7-Up(f,od(f,t,n),"days")}let a=Dd(s);a<Dd(i)&&o(a+1)>=r&&a++;const l=new Date(a,0,1),u=o(a),c=u>=r?tl(l,u-7):tl(l,u);return 1+Up(O1(s),Md(c),"weeks")}function l9(e){return e.getDate()}function u9(e){return new Date(e.getFullYear(),e.getMonth()+1,1)}function c9(e){return new Date(e.getFullYear(),e.getMonth()-1,1)}function d9(e){return e.getHours()}function f9(e){return e.getMinutes()}function h9(e){return new Date(e.getFullYear(),0,1)}function p9(e){return new Date(e.getFullYear(),11,31)}function m9(e,t){return Vp(e,t[0])&&y9(e,t[1])}function g9(e){const t=new Date(e);return t instanceof Date&&!isNaN(t.getTime())}function Vp(e,t){return e.getTime()>t.getTime()}function v9(e,t){return Vp(Md(e),Md(t))}function y9(e,t){return e.getTime()<t.getTime()}function _x(e,t){return e.getTime()===t.getTime()}function b9(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function w9(e,t){return e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function S9(e,t){return e.getFullYear()===t.getFullYear()}function Up(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 _9(e,t){const n=new Date(e);return n.setHours(t),n}function k9(e,t){const n=new Date(e);return n.setMinutes(t),n}function x9(e,t){const n=new Date(e);return n.setMonth(t),n}function E9(e,t){const n=new Date(e);return n.setDate(t),n}function C9(e,t){const n=new Date(e);return n.setFullYear(t),n}function Md(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0)}function O1(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59,999)}class T9{constructor(t){this.locale=t.locale,this.formats=t.formats}date(t){return SD(t)}toJsDate(t){return t}toISO(t){return J7(this,t)}parseISO(t){return Z7(t)}addMinutes(t,n){return e9(t,n)}addHours(t,n){return t9(t,n)}addDays(t,n){return tl(t,n)}addWeeks(t,n){return n9(t,n)}addMonths(t,n){return r9(t,n)}getWeekArray(t,n){const r=n!==void 0?Number(n):void 0;return q7(t,this.locale,r)}startOfWeek(t,n){const r=n!==void 0?Number(n):void 0;return od(t,this.locale,r)}endOfWeek(t){return G7(t,this.locale)}startOfMonth(t){return bD(t)}endOfMonth(t){return wD(t)}format(t,n){return Q7(t,n,this.locale,this.formats)}isEqual(t,n){return _x(t,n)}isValid(t){return g9(t)}isWithinRange(t,n){return m9(t,n)}isAfter(t,n){return Vp(t,n)}isAfterDay(t,n){return v9(t,n)}isBefore(t,n){return!Vp(t,n)&&!_x(t,n)}isSameDay(t,n){return b9(t,n)}isSameMonth(t,n){return w9(t,n)}isSameYear(t,n){return S9(t,n)}setMinutes(t,n){return k9(t,n)}setHours(t,n){return _9(t,n)}setMonth(t,n){return x9(t,n)}setDate(t,n){return E9(t,n)}setYear(t,n){return C9(t,n)}getDiff(t,n,r){return Up(t,n,r)}getWeekdays(t,n){const r=t!==void 0?Number(t):void 0;return X7(this.locale,r,n)}getYear(t){return Dd(t)}getMonth(t){return s9(t)}getWeek(t,n,r){const s=n!==void 0?Number(n):void 0,i=r!==void 0?Number(r):void 0;return i9(t,this.locale,s,i)}getDate(t){return l9(t)}getNextMonth(t){return u9(t)}getPreviousMonth(t){return c9(t)}getHours(t){return d9(t)}getMinutes(t){return f9(t)}startOfDay(t){return Md(t)}endOfDay(t){return O1(t)}startOfYear(t){return h9(t)}endOfYear(t){return p9(t)}}const R9=Symbol.for("vuetify:date-options"),kx=Symbol.for("vuetify:date-adapter");function P9(e,t){const n=lr({adapter:T9,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:I9(n,t)}}function I9(e,t){const n=gn(typeof e.adapter=="function"?new e.adapter({locale:e.locale[t.current.value]??t.current.value,formats:e.formats}):e.adapter);return xe(t.current,r=>{n.locale=e.locale[r]??r??n.locale}),n}const Ld=Symbol.for("vuetify:layout"),_D=Symbol.for("vuetify:layout-item"),xx=1e3,kD=ce({overlaps:{type:Array,default:()=>[]},fullHeight:Boolean},"layout"),xD=ce({name:{type:String},order:{type:[Number,String],default:0},absolute:Boolean},"layout-item");function ED(){const e=Xe(Ld);if(!e)throw new Error("[Vuetify] Could not find injected layout");return{getLayoutItem:e.getLayoutItem,mainRect:e.mainRect,mainStyles:e.mainStyles}}function CD(e){const t=Xe(Ld);if(!t)throw new Error("[Vuetify] Could not find injected layout");const n=e.id??`layout-item-${jr()}`,r=fn("useLayoutItem");Jt(_D,{id:n});const s=Ce(!1);r0(()=>s.value=!0),YT(()=>s.value=!1);const{layoutItemStyles:i,layoutItemScrimStyles:o}=t.register(r,{...e,active:D(()=>s.value?!1:e.active.value),id:n});return Qn(()=>t.unregister(n)),{layoutItemStyles:i,layoutRect:t.layoutRect,layoutItemScrimStyles:o}}const A9=(e,t,n,r)=>{let s={top:0,left:0,right:0,bottom:0};const i=[{id:"",layer:{...s}}];for(const o of e){const a=t.get(o),l=n.get(o),u=r.get(o);if(!a||!l||!u)continue;const c={...s,[a.value]:parseInt(s[a.value],10)+(u.value?parseInt(l.value,10):0)};i.push({id:o,layer:c}),s=c}return i};function TD(e){const t=Xe(Ld,null),n=D(()=>t?t.rootZIndex.value-100:xx),r=G([]),s=gn(new Map),i=gn(new Map),o=gn(new Map),a=gn(new Map),l=gn(new Map),{resizeRef:u,contentRect:c}=Yo(),d=D(()=>{const T=new Map,R=e.overlaps??[];for(const x of R.filter(I=>I.includes(":"))){const[I,P]=x.split(":");if(!r.value.includes(I)||!r.value.includes(P))continue;const A=s.get(I),L=s.get(P),B=i.get(I),O=i.get(P);!A||!L||!B||!O||(T.set(P,{position:A.value,amount:parseInt(B.value,10)}),T.set(I,{position:L.value,amount:-parseInt(O.value,10)}))}return T}),f=D(()=>{const T=[...new Set([...o.values()].map(x=>x.value))].sort((x,I)=>x-I),R=[];for(const x of T){const I=r.value.filter(P=>{var A;return((A=o.get(P))==null?void 0:A.value)===x});R.push(...I)}return A9(R,s,i,a)}),h=D(()=>!Array.from(l.values()).some(T=>T.value)),g=D(()=>f.value[f.value.length-1].layer),m=ie(()=>({"--v-layout-left":Le(g.value.left),"--v-layout-right":Le(g.value.right),"--v-layout-top":Le(g.value.top),"--v-layout-bottom":Le(g.value.bottom),...h.value?void 0:{transition:"none"}})),y=D(()=>f.value.slice(1).map((T,R)=>{let{id:x}=T;const{layer:I}=f.value[R],P=i.get(x),A=s.get(x);return{id:x,...I,size:Number(P.value),position:A.value}})),w=T=>y.value.find(R=>R.id===T),b=fn("createLayout"),S=Ce(!1);xt(()=>{S.value=!0}),Jt(Ld,{register:(T,R)=>{let{id:x,order:I,position:P,layoutSize:A,elementSize:L,active:B,disableTransitions:O,absolute:F}=R;o.set(x,I),s.set(x,P),i.set(x,A),a.set(x,B),O&&l.set(x,O);const X=jl(_D,b==null?void 0:b.vnode).indexOf(T);X>-1?r.value.splice(X,0,x):r.value.push(x);const V=D(()=>y.value.findIndex(H=>H.id===x)),z=D(()=>n.value+f.value.length*2-V.value*2),M=D(()=>{const H=P.value==="left"||P.value==="right",j=P.value==="right",pe=P.value==="bottom",J=L.value??A.value,we=J===0?"%":"px",q={[P.value]:0,zIndex:z.value,transform:`translate${H?"X":"Y"}(${(B.value?0:-(J===0?100:J))*(j||pe?-1:1)}${we})`,position:F.value||n.value!==xx?"absolute":"fixed",...h.value?void 0:{transition:"none"}};if(!S.value)return q;const he=y.value[V.value],ne=d.value.get(x);return ne&&(he[ne.position]+=ne.amount),{...q,height:H?`calc(100% - ${he.top}px - ${he.bottom}px)`:L.value?`${L.value}px`:void 0,left:j?void 0:`${he.left}px`,right:j?`${he.right}px`:void 0,top:P.value!=="bottom"?`${he.top}px`:void 0,bottom:P.value!=="top"?`${he.bottom}px`:void 0,width:H?L.value?`${L.value}px`:void 0:`calc(100% - ${he.left}px - ${he.right}px)`}}),re=D(()=>({zIndex:z.value-1}));return{layoutItemStyles:M,layoutItemScrimStyles:re,zIndex:z}},unregister:T=>{o.delete(T),s.delete(T),i.delete(T),a.delete(T),l.delete(T),r.value=r.value.filter(R=>R!==T)},mainRect:g,mainStyles:m,getLayoutItem:w,items:y,layoutRect:c,rootZIndex:n});const _=ie(()=>["v-layout",{"v-layout--full-height":e.fullHeight}]),k=ie(()=>({zIndex:t?n.value:void 0,position:t?"relative":void 0,overflow:t?"hidden":void 0}));return{layoutClasses:_,layoutStyles:k,getLayoutItem:w,items:y,layoutRect:c,layoutRef:u}}const O9=["start","end","left","right","top","bottom"],D9=ce({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=>O9.includes(e)},sticky:Boolean,...xs(),...Ge(),...T0(),...Sl({mobile:null}),...Cs(),...xD(),...Hn(),...In(TP(),["disableInitialFocus"]),...gt({tag:"nav"}),...Nt()},"VNavigationDrawer"),D1=Ee()({name:"VNavigationDrawer",props:D9(),emits:{"update:modelValue":e=>!0,"update:rail":e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const{isRtl:i}=Wr(),{themeClasses:o}=nn(e),{borderClasses:a}=Hs(e),{backgroundColorClasses:l,backgroundColorStyles:u}=wr(()=>e.color),{elevationClasses:c}=js(e),{displayClasses:d,mobile:f}=qs(e),{roundedClasses:h}=Zn(e),g=cP(),m=lt(e,"modelValue",null,M=>!!M),{ssrBootStyles:y}=kf(),{scopeId:w}=Zu(),b=G(),S=Ce(!1),{runOpenDelay:_,runCloseDelay:k}=R0(e,M=>{S.value=M}),T=D(()=>e.rail&&e.expandOnHover&&S.value?Number(e.width):Number(e.rail?e.railWidth:e.width)),R=D(()=>uy(e.location,i.value)),x=ie(()=>e.persistent),I=D(()=>!e.permanent&&(f.value||e.temporary)),P=D(()=>e.sticky&&!I.value&&R.value!=="bottom");RP(e,{isActive:m,localTop:I,contentEl:b}),Nr(()=>e.expandOnHover&&e.rail!=null,()=>{xe(S,M=>r("update:rail",!M))}),Nr(()=>!e.disableResizeWatcher,()=>{xe(I,M=>!e.permanent&&ht(()=>m.value=!M))}),Nr(()=>!e.disableRouteWatcher&&!!g,()=>{xe(g.currentRoute,()=>I.value&&(m.value=!1))}),xe(()=>e.permanent,M=>{M&&(m.value=!0)}),e.modelValue==null&&!I.value&&(m.value=e.permanent||!f.value);const{isDragging:A,dragProgress:L}=W7({el:b,isActive:m,isTemporary:I,width:T,touchless:ie(()=>e.touchless),position:R}),B=D(()=>{const M=I.value?0:e.rail&&e.expandOnHover?Number(e.railWidth):T.value;return A.value?M*L.value:M}),{layoutItemStyles:O,layoutItemScrimStyles:F}=CD({id:e.name,order:D(()=>parseInt(e.order,10)),position:R,layoutSize:B,elementSize:T,active:Ji(m),disableTransitions:ie(()=>A.value),absolute:D(()=>e.absolute||P.value&&typeof W.value!="string")}),{isStuck:W,stickyStyles:X}=V7({rootEl:b,isSticky:P,layoutItemStyles:O}),V=wr(()=>typeof e.scrim=="string"?e.scrim:null),z=D(()=>({...A.value?{opacity:L.value*.2,transition:"none"}:void 0,...F.value}));return zr({VList:{bgColor:"transparent"}}),Me(()=>{const M=s.image||e.image;return C(De,null,[p(e.tag,ge({ref:b,onMouseenter:_,onMouseleave:k,class:["v-navigation-drawer",`v-navigation-drawer--${R.value}`,{"v-navigation-drawer--expand-on-hover":e.expandOnHover,"v-navigation-drawer--floating":e.floating,"v-navigation-drawer--is-hovering":S.value,"v-navigation-drawer--rail":e.rail,"v-navigation-drawer--temporary":I.value,"v-navigation-drawer--persistent":x.value,"v-navigation-drawer--active":m.value,"v-navigation-drawer--sticky":P.value},o.value,l.value,a.value,d.value,c.value,h.value,e.class],style:[u.value,O.value,y.value,X.value,e.style],inert:!m.value},w,n),{default:()=>{var re,H,j;return[M&&C("div",{key:"image",class:"v-navigation-drawer__img"},[s.image?p(Ft,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{alt:"",cover:!0,height:"inherit",src:e.image}}},s.image):p(bs,{key:"image-img",alt:"",cover:!0,height:"inherit",src:e.image},null)]),s.prepend&&C("div",{class:"v-navigation-drawer__prepend"},[(re=s.prepend)==null?void 0:re.call(s)]),C("div",{class:"v-navigation-drawer__content"},[(H=s.default)==null?void 0:H.call(s)]),s.append&&C("div",{class:"v-navigation-drawer__append"},[(j=s.append)==null?void 0:j.call(s)])]}}),p(qo,{name:"fade-transition"},{default:()=>[I.value&&(A.value||m.value)&&!!e.scrim&&C("div",ge({class:["v-navigation-drawer__scrim",V.backgroundColorClasses.value],style:[z.value,V.backgroundColorStyles.value],onClick:()=>{x.value||(m.value=!1)}},w),null)]})])}),{isStuck:W}}}),M9=ce({active:Boolean,disabled:Boolean,max:[Number,String],value:{type:[Number,String],default:0},...Ge(),...ec({transition:{component:SP}})},"VCounter"),M1=Ee()({name:"VCounter",functional:!0,props:M9(),setup(e,t){let{slots:n}=t;const r=ie(()=>e.max?`${e.value} / ${e.max}`:String(e.value));return Me(()=>p(hi,{transition:e.transition},{default:()=>[zt(C("div",{class:Oe(["v-counter",{"text-error":e.max&&!e.disabled&&parseFloat(e.value)>parseFloat(e.max)},e.class]),style:Be(e.style)},[n.default?n.default({counter:r.value,max:e.max,value:e.value}):r.value]),[[uo,e.active]])]})),{}}}),L9=ce({text:String,onClick:Kn(),...Ge(),...Nt()},"VLabel"),L1=Ee()({name:"VLabel",props:L9(),setup(e,t){let{slots:n}=t;return Me(()=>{var r;return C("label",{class:Oe(["v-label",{"v-label--clickable":!!e.onClick},e.class]),style:Be(e.style),onClick:e.onClick},[e.text,(r=n.default)==null?void 0:r.call(n)])}),{}}}),F9=ce({floating:Boolean,...Ge()},"VFieldLabel"),Yf=Ee()({name:"VFieldLabel",props:F9(),setup(e,t){let{slots:n}=t;return Me(()=>p(L1,{class:Oe(["v-field-label",{"v-field-label--floating":e.floating},e.class]),style:Be(e.style)},n)),{}}});function F1(e){const{t}=ts();function n(r){let{name:s,color:i,...o}=r;const a={prepend:"prependAction",prependInner:"prependAction",append:"appendAction",appendInner:"appendAction",clear:"clear"}[s],l=e[`onClick:${s}`];function u(d){d.key!=="Enter"&&d.key!==" "||(d.preventDefault(),d.stopPropagation(),ef(l,new PointerEvent("click",d)))}const c=l&&a?t(`$vuetify.input.${a}`,e.label??""):void 0;return p(ee,ge({icon:e[`${s}Icon`],"aria-label":c,onClick:l,onKeydown:u,color:i},o),null)}return{InputIcon:n}}const RD=ce({focused:Boolean,"onUpdate:focused":Kn()},"focus");function hc(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wi();const n=lt(e,"focused"),r=ie(()=>({[`${t}--focused`]:n.value}));function s(){n.value=!0}function i(){n.value=!1}return{focusClasses:r,isFocused:n,focus:s,blur:i}}const $9=["underlined","outlined","filled","solo","solo-inverted","solo-filled","plain"],Km=ce({appendInnerIcon:He,bgColor:String,clearable:Boolean,clearIcon:{type:He,default:"$clear"},active:Boolean,centerAffix:{type:Boolean,default:void 0},color:String,baseColor:String,dirty:Boolean,disabled:{type:Boolean,default:null},glow:Boolean,error:Boolean,flat:Boolean,iconColor:[Boolean,String],label:String,persistentClear:Boolean,prependInnerIcon:He,reverse:Boolean,singleLine:Boolean,variant:{type:String,default:"filled",validator:e=>$9.includes(e)},"onClick:clear":Kn(),"onClick:appendInner":Kn(),"onClick:prependInner":Kn(),...Ge(),...Sm(),...Hn(),...Nt()},"VField"),Bu=Ee()({name:"VField",inheritAttrs:!1,props:{id:String,details:Boolean,labelId:String,...RD(),...Km()},emits:{"update:focused":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const{themeClasses:i}=nn(e),{loaderClasses:o}=sf(e),{focusClasses:a,isFocused:l,focus:u,blur:c}=hc(e),{InputIcon:d}=F1(e),{roundedClasses:f}=Zn(e),{rtlClasses:h}=Wr(),g=ie(()=>e.dirty||e.active),m=ie(()=>!!(e.label||s.label)),y=ie(()=>!e.singleLine&&m.value),w=jr(),b=D(()=>e.id||`input-${w}`),S=ie(()=>e.details?`${b.value}-messages`:void 0),_=G(),k=G(),T=G(),R=D(()=>["plain","underlined"].includes(e.variant)),x=D(()=>e.error||e.disabled?void 0:g.value&&l.value?e.color:e.baseColor),I=D(()=>{if(!(!e.iconColor||e.glow&&!l.value))return e.iconColor===!0?x.value:e.iconColor}),{backgroundColorClasses:P,backgroundColorStyles:A}=wr(()=>e.bgColor),{textColorClasses:L,textColorStyles:B}=Vs(x);xe(g,W=>{if(y.value&&!il()){const X=_.value.$el,V=k.value.$el;requestAnimationFrame(()=>{const z=y0(X),M=V.getBoundingClientRect(),re=M.x-z.x,H=M.y-z.y-(z.height/2-M.height/2),j=M.width/.75,pe=Math.abs(j-z.width)>1?{maxWidth:Le(j)}:void 0,J=getComputedStyle(X),we=getComputedStyle(V),q=parseFloat(J.transitionDuration)*1e3||150,he=parseFloat(we.getPropertyValue("--v-field-label-scale")),ne=we.getPropertyValue("color");X.style.visibility="visible",V.style.visibility="hidden",ko(X,{transform:`translate(${re}px, ${H}px) scale(${he})`,color:ne,...pe},{duration:q,easing:pp,direction:W?"normal":"reverse"}).finished.then(()=>{X.style.removeProperty("visibility"),V.style.removeProperty("visibility")})})}},{flush:"post"});const O=D(()=>({isActive:g,isFocused:l,controlRef:T,iconColor:I,blur:c,focus:u}));function F(W){W.target!==document.activeElement&&W.preventDefault()}return Me(()=>{var re;const W=e.variant==="outlined",X=!!(s["prepend-inner"]||e.prependInnerIcon),V=!!(e.clearable||s.clear)&&!e.disabled,z=!!(s["append-inner"]||e.appendInnerIcon||V),M=()=>s.label?s.label({...O.value,label:e.label,props:{for:b.value}}):e.label;return C("div",ge({class:["v-field",{"v-field--active":g.value,"v-field--appended":z,"v-field--center-affix":e.centerAffix??!R.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":X,"v-field--reverse":e.reverse,"v-field--single-line":e.singleLine,"v-field--no-label":!M(),[`v-field--variant-${e.variant}`]:!0},i.value,P.value,a.value,o.value,f.value,h.value,e.class],style:[A.value,e.style],onClick:F},n),[C("div",{class:"v-field__overlay"},null),p(_m,{name:"v-field",active:!!e.loading,color:e.error?"error":typeof e.loading=="string"?e.loading:e.color},{default:s.loader}),X&&C("div",{key:"prepend",class:"v-field__prepend-inner"},[s["prepend-inner"]?s["prepend-inner"](O.value):e.prependInnerIcon&&p(d,{key:"prepend-icon",name:"prependInner",color:I.value},null)]),C("div",{class:"v-field__field","data-no-activator":""},[["filled","solo","solo-inverted","solo-filled"].includes(e.variant)&&y.value&&p(Yf,{key:"floating-label",ref:k,class:Oe([L.value]),floating:!0,for:b.value,"aria-hidden":!g.value,style:Be(B.value)},{default:()=>[M()]}),m.value&&p(Yf,{key:"label",ref:_,id:e.labelId,for:b.value,"aria-hidden":y.value&&g.value},{default:()=>[M()]}),((re=s.default)==null?void 0:re.call(s,{...O.value,props:{id:b.value,class:"v-field__input","aria-describedby":S.value},focus:u,blur:c}))??C("div",{id:b.value,class:"v-field__input","aria-describedby":S.value},null)]),V&&p(kP,{key:"clear"},{default:()=>[zt(C("div",{class:"v-field__clearable",onMousedown:H=>{H.preventDefault(),H.stopPropagation()}},[p(Ft,{defaults:{VIcon:{icon:e.clearIcon}}},{default:()=>[s.clear?s.clear({...O.value,props:{onFocus:u,onBlur:c,onClick:e["onClick:clear"],tabindex:-1}}):p(d,{name:"clear",onFocus:u,onBlur:c,tabindex:-1},null)]})]),[[uo,e.dirty]])]}),z&&C("div",{key:"append",class:"v-field__append-inner"},[s["append-inner"]?s["append-inner"](O.value):e.appendInnerIcon&&p(d,{key:"append-icon",name:"appendInner",color:I.value},null)]),C("div",{class:Oe(["v-field__outline",L.value]),style:Be(B.value)},[W&&C(De,null,[C("div",{class:"v-field__outline__start"},null),y.value&&C("div",{class:"v-field__outline__notch"},[p(Yf,{ref:k,floating:!0,for:b.value,"aria-hidden":!g.value},{default:()=>[M()]})]),C("div",{class:"v-field__outline__end"},null)]),R.value&&y.value&&p(Yf,{ref:k,floating:!0,for:b.value,"aria-hidden":!g.value},{default:()=>[M()]})])])}),{controlRef:T,fieldIconColor:I}}}),N9=ce({active:Boolean,color:String,messages:{type:[Array,String],default:()=>[]},...Ge(),...ec({transition:{component:SP,leaveAbsolute:!0,group:!0}})},"VMessages"),B9=Ee()({name:"VMessages",props:N9(),setup(e,t){let{slots:n}=t;const r=D(()=>Fn(e.messages)),{textColorClasses:s,textColorStyles:i}=Vs(()=>e.color);return Me(()=>p(hi,{transition:e.transition,tag:"div",class:Oe(["v-messages",s.value,e.class]),style:Be([i.value,e.style])},{default:()=>[e.active&&r.value.map((o,a)=>C("div",{class:"v-messages__message",key:`${a}-${r.value}`},[n.message?n.message({message:o}):o]))]})),{}}}),PD=Symbol.for("vuetify:form"),V9=ce({disabled:Boolean,fastFail:Boolean,readonly:Boolean,modelValue:{type:Boolean,default:null},validateOn:{type:String,default:"input"}},"form");function U9(e){const t=lt(e,"modelValue"),n=ie(()=>e.disabled),r=ie(()=>e.readonly),s=Ce(!1),i=G([]),o=G([]);async function a(){const c=[];let d=!0;o.value=[],s.value=!0;for(const f of i.value){const h=await f.validate();if(h.length>0&&(d=!1,c.push({id:f.id,errorMessages:h})),!d&&e.fastFail)break}return o.value=c,s.value=!1,{valid:d,errors:o.value}}function l(){i.value.forEach(c=>c.reset())}function u(){i.value.forEach(c=>c.resetValidation())}return xe(i,()=>{let c=0,d=0;const f=[];for(const h of i.value)h.isValid===!1?(d++,f.push({id:h.id,errorMessages:h.errorMessages})):h.isValid===!0&&c++;o.value=f,t.value=d>0?!1:c===i.value.length?!0:null},{deep:!0,flush:"post"}),Jt(PD,{register:c=>{let{id:d,vm:f,validate:h,reset:g,resetValidation:m}=c;i.value.some(y=>y.id===d),i.value.push({id:d,validate:h,reset:g,resetValidation:m,vm:dm(f),isValid:null,errorMessages:[]})},unregister:c=>{i.value=i.value.filter(d=>d.id!==c)},update:(c,d,f)=>{const h=i.value.find(g=>g.id===c);h&&(h.isValid=d,h.errorMessages=f)},isDisabled:n,isReadonly:r,isValidating:s,isValid:t,items:i,validateOn:ie(()=>e.validateOn)}),{errors:o,isDisabled:n,isReadonly:r,isValidating:s,isValid:t,items:i,validate:a,reset:l,resetValidation:u}}function ID(e){const t=Xe(PD,null);return{...t,isReadonly:D(()=>!!((e==null?void 0:e.readonly)??(t==null?void 0:t.isReadonly.value))),isDisabled:D(()=>!!((e==null?void 0:e.disabled)??(t==null?void 0:t.isDisabled.value)))}}const z9=Symbol.for("vuetify:rules");function H9(e){const t=Xe(z9,null);if(!e){if(!t)throw new Error("Could not find Vuetify rules injection");return t.aliases}return(t==null?void 0:t.resolve(e))??ie(e)}const j9=ce({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,...RD()},"validation");function W9(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wi(),n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:jr();const r=lt(e,"modelValue"),s=D(()=>e.validationValue===void 0?r.value:e.validationValue),i=ID(e),o=H9(()=>e.rules),a=G([]),l=Ce(!0),u=D(()=>!!(Fn(r.value===""?null:r.value).length||Fn(s.value===""?null:s.value).length)),c=D(()=>{var _;return(_=e.errorMessages)!=null&&_.length?Fn(e.errorMessages).concat(a.value).slice(0,Math.max(0,Number(e.maxErrors))):a.value}),d=D(()=>{var T;let _=(e.validateOn??((T=i.validateOn)==null?void 0:T.value))||"input";_==="lazy"&&(_="input lazy"),_==="eager"&&(_="input eager");const k=new Set((_==null?void 0:_.split(" "))??[]);return{input:k.has("input"),blur:k.has("blur")||k.has("input")||k.has("invalid-input"),invalidInput:k.has("invalid-input"),lazy:k.has("lazy"),eager:k.has("eager")}}),f=D(()=>{var _;return e.error||(_=e.errorMessages)!=null&&_.length?!1:e.rules.length?l.value?a.value.length||d.value.lazy?null:!0:!a.value.length:!0}),h=Ce(!1),g=D(()=>({[`${t}--error`]:f.value===!1,[`${t}--dirty`]:u.value,[`${t}--disabled`]:i.isDisabled.value,[`${t}--readonly`]:i.isReadonly.value})),m=fn("validation"),y=D(()=>e.name??Z(n));Wu(()=>{var _;(_=i.register)==null||_.call(i,{id:y.value,vm:m,validate:S,reset:w,resetValidation:b})}),Qn(()=>{var _;(_=i.unregister)==null||_.call(i,y.value)}),xt(async()=>{var _;d.value.lazy||await S(!d.value.eager),(_=i.update)==null||_.call(i,y.value,f.value,c.value)}),Nr(()=>d.value.input||d.value.invalidInput&&f.value===!1,()=>{xe(s,()=>{if(s.value!=null)S();else if(e.focused){const _=xe(()=>e.focused,k=>{k||S(),_()})}})}),Nr(()=>d.value.blur,()=>{xe(()=>e.focused,_=>{_||S()})}),xe([f,c],()=>{var _;(_=i.update)==null||_.call(i,y.value,f.value,c.value)});async function w(){r.value=null,await ht(),await b()}async function b(){l.value=!0,d.value.lazy?a.value=[]:await S(!d.value.eager)}async function S(){let _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const k=[];h.value=!0;for(const T of o.value){if(k.length>=Number(e.maxErrors??1))break;const x=await(typeof T=="function"?T:()=>T)(s.value);if(x!==!0){if(x!==!1&&typeof x!="string"){console.warn(`${x} is not a valid value. Rule functions must return boolean true or a string.`);continue}k.push(x||"")}}return a.value=k,h.value=!1,l.value=_,a.value}return{errorMessages:c,isDirty:u,isDisabled:i.isDisabled,isReadonly:i.isReadonly,isPristine:l,isValid:f,isValidating:h,reset:w,resetValidation:b,validate:S,validationClasses:g}}const xl=ce({id:String,appendIcon:He,baseColor:String,centerAffix:{type:Boolean,default:!0},color:String,glow:Boolean,iconColor:[Boolean,String],prependIcon:He,hideDetails:[Boolean,String],hideSpinButtons:Boolean,hint:String,persistentHint:Boolean,messages:{type:[Array,String],default:()=>[]},direction:{type:String,default:"horizontal",validator:e=>["horizontal","vertical"].includes(e)},"onClick:prepend":Kn(),"onClick:append":Kn(),...Ge(),...Jn(),...Go(xr(),["maxWidth","minWidth","width"]),...Nt(),...j9()},"VInput"),ws=Ee()({name:"VInput",props:{...xl()},emits:{"update:modelValue":e=>!0},setup(e,t){let{attrs:n,slots:r,emit:s}=t;const{densityClasses:i}=Es(e),{dimensionStyles:o}=Er(e),{themeClasses:a}=nn(e),{rtlClasses:l}=Wr(),{InputIcon:u}=F1(e),c=jr(),d=D(()=>e.id||`input-${c}`),{errorMessages:f,isDirty:h,isDisabled:g,isReadonly:m,isPristine:y,isValid:w,isValidating:b,reset:S,resetValidation:_,validate:k,validationClasses:T}=W9(e,"v-input",d),R=D(()=>{var O;return(O=e.errorMessages)!=null&&O.length||!y.value&&f.value.length?f.value:e.hint&&(e.persistentHint||e.focused)?e.hint:e.messages}),x=ie(()=>R.value.length>0),I=ie(()=>!e.hideDetails||e.hideDetails==="auto"&&(x.value||!!r.details)),P=D(()=>I.value?`${d.value}-messages`:void 0),A=D(()=>({id:d,messagesId:P,isDirty:h,isDisabled:g,isReadonly:m,isPristine:y,isValid:w,isValidating:b,hasDetails:I,reset:S,resetValidation:_,validate:k})),L=ie(()=>e.error||e.disabled?void 0:e.focused?e.color:e.baseColor),B=ie(()=>{if(e.iconColor)return e.iconColor===!0?L.value:e.iconColor});return Me(()=>{var W,X;const O=!!(r.prepend||e.prependIcon),F=!!(r.append||e.appendIcon);return C("div",{class:Oe(["v-input",`v-input--${e.direction}`,{"v-input--center-affix":e.centerAffix,"v-input--focused":e.focused,"v-input--glow":e.glow,"v-input--hide-spin-buttons":e.hideSpinButtons},i.value,a.value,l.value,T.value,e.class]),style:Be([o.value,e.style])},[O&&C("div",{key:"prepend",class:"v-input__prepend"},[r.prepend?r.prepend(A.value):e.prependIcon&&p(u,{key:"prepend-icon",name:"prepend",color:B.value},null)]),r.default&&C("div",{class:"v-input__control"},[(W=r.default)==null?void 0:W.call(r,A.value)]),F&&C("div",{key:"append",class:"v-input__append"},[r.append?r.append(A.value):e.appendIcon&&p(u,{key:"append-icon",name:"append",color:B.value},null)]),I.value&&C("div",{id:P.value,class:"v-input__details",role:"alert","aria-live":"polite"},[p(B9,{active:x.value,messages:R.value},{message:r.message}),(X=r.details)==null?void 0:X.call(r,A.value)])])}),{reset:S,resetValidation:_,validate:k,isValid:w,errorMessages:f}}}),AD=ce({autocomplete:String},"autocomplete");function $1(e){const t=jr(),n=Ce(0),r=ie(()=>e.autocomplete==="suppress"),s=ie(()=>{if(e.name)return r.value?`${e.name}-${t}-${n.value}`:e.name}),i=ie(()=>r.value?"off":e.autocomplete);return{isSuppressing:r,fieldAutocomplete:i,fieldName:s,update:()=>n.value=new Date().getTime()}}function OD(e){function t(n,r){if(!e.autofocus||!n)return;const s=r[0].target,i=s.matches("input,textarea")?s:s.querySelector("input,textarea");i==null||i.focus()}return{onIntersect:t}}const q9=["color","file","time","date","datetime-local","week","month"],DD=ce({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,...AD(),...xl(),...Km()},"VTextField"),at=Ee()({name:"VTextField",directives:{vIntersect:Fu},inheritAttrs:!1,props:DD(),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=lt(e,"modelValue"),{isFocused:o,focus:a,blur:l}=hc(e),{onIntersect:u}=OD(e),c=D(()=>typeof e.counterValue=="function"?e.counterValue(i.value):typeof e.counterValue=="number"?e.counterValue:(i.value??"").toString().length),d=D(()=>{if(n.maxlength)return n.maxlength;if(!(!e.counter||typeof e.counter!="number"&&typeof e.counter!="string"))return e.counter}),f=D(()=>["plain","underlined"].includes(e.variant)),h=G(),g=G(),m=G(),y=$1(e),w=D(()=>q9.includes(e.type)||e.persistentPlaceholder||o.value||e.active);function b(){y.isSuppressing.value&&y.update(),o.value||a(),ht(()=>{var R;m.value!==document.activeElement&&((R=m.value)==null||R.focus())})}function S(R){r("mousedown:control",R),R.target!==m.value&&(b(),R.preventDefault())}function _(R){r("click:control",R)}function k(R,x){R.stopPropagation(),b(),ht(()=>{x(),ef(e["onClick:clear"],R)})}function T(R){var L;const x=R.target;if(!((L=e.modelModifiers)!=null&&L.trim&&["text","search","password","tel","url"].includes(e.type))){i.value=x.value;return}const I=x.value,P=x.selectionStart,A=x.selectionEnd;i.value=I,ht(()=>{let B=0;I.trimStart().length===x.value.length&&(B=I.length-x.value.length),P!=null&&(x.selectionStart=P-B),A!=null&&(x.selectionEnd=A-B)})}return Me(()=>{const R=!!(s.counter||e.counter!==!1&&e.counter!=null),x=!!(R||s.details),[I,P]=yl(n),{modelValue:A,...L}=ws.filterProps(e),B=Bu.filterProps(e);return p(ws,ge({ref:h,modelValue:i.value,"onUpdate:modelValue":O=>i.value=O,class:["v-text-field",{"v-text-field--prefixed":e.prefix,"v-text-field--suffixed":e.suffix,"v-input--plain-underlined":f.value},e.class],style:e.style},I,L,{centerAffix:!f.value,focused:o.value}),{...s,default:O=>{let{id:F,isDisabled:W,isDirty:X,isReadonly:V,isValid:z,hasDetails:M,reset:re}=O;return p(Bu,ge({ref:g,onMousedown:S,onClick:_,"onClick:clear":H=>k(H,re),role:e.role},In(B,["onClick:clear"]),{id:F.value,labelId:`${F.value}-label`,active:w.value||X.value,dirty:X.value||e.dirty,disabled:W.value,focused:o.value,details:M.value,error:z.value===!1}),{...s,default:H=>{let{props:{class:j,...pe},controlRef:J}=H;const we=C("input",ge({ref:q=>m.value=J.value=q,value:i.value,onInput:T,autofocus:e.autofocus,readonly:V.value,disabled:W.value,name:y.fieldName.value,autocomplete:y.fieldAutocomplete.value,placeholder:e.placeholder,size:1,role:e.role,type:e.type,onFocus:a,onBlur:l,"aria-labelledby":`${F.value}-label`},pe,P),null);return C(De,null,[e.prefix&&C("span",{class:"v-text-field__prefix"},[C("span",{class:"v-text-field__prefix__text"},[e.prefix])]),zt(s.default?C("div",{class:Oe(j),"data-no-activator":""},[s.default({id:F}),we]):eo(we,{class:j}),[[Fu,u,null,{once:!0}]]),e.suffix&&C("span",{class:"v-text-field__suffix"},[C("span",{class:"v-text-field__suffix__text"},[e.suffix])])])}})},details:x?O=>{var F;return C(De,null,[(F=s.details)==null?void 0:F.call(s,O),R&&C(De,null,[C("span",null,null),p(M1,{active:e.persistentCounter||o.value,value:c.value,max:d.value,disabled:e.disabled},s.counter)])])}:void 0})}),Ts({},h,g,m)}}),G9=ce({id:String,interactive:Boolean,text:String,...In(of({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"),ot=Ee()({name:"VTooltip",props:G9(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=lt(e,"modelValue"),{scopeId:s}=Zu(),i=jr(),o=ie(()=>e.id||`v-tooltip-${i}`),a=G(),l=D(()=>e.location.split(" ").length>1?e.location:e.location+" center"),u=D(()=>e.origin==="auto"||e.origin==="overlap"||e.origin.split(" ").length>1||e.location.split(" ").length>1?e.origin:e.origin+" center"),c=ie(()=>e.transition!=null?e.transition:r.value?"scale-transition":"fade-transition"),d=D(()=>ge({"aria-describedby":o.value},e.activatorProps));return Me(()=>{const f=to.filterProps(e);return p(to,ge({ref:a,class:["v-tooltip",{"v-tooltip--interactive":e.interactive},e.class],style:e.style,id:o.value},f,{modelValue:r.value,"onUpdate:modelValue":h=>r.value=h,transition:c.value,absolute:!0,location:l.value,origin:u.value,role:"tooltip",activatorProps:d.value,_disableGlobalStack:!0},s),{activator:n.activator,default:function(){var y;for(var h=arguments.length,g=new Array(h),m=0;m<h;m++)g[m]=arguments[m];return((y=n.default)==null?void 0:y.call(n,...g))??e.text}})}),Ts({},a)}}),K9={key:0,class:"d-flex justify-center static-disabled"},Y9={key:1,class:"pulsating-red d-flex justify-center"},X9={key:0,class:"d-flex justify-center"},Q9={key:0},J9={key:1},Z9={key:1},eK={key:2},tK={key:3},nK={key:0},rK={key:1},sK={key:0},iK={key:1},oK={key:0},aK={key:1},lK={key:2},uK=Ve({__name:"FileExplorerSideNav",setup(e){const t=Xt(),n=cr(),r=G(36),s=G(void 0),i=G(void 0),o=G(!1),a=G(!0),l=D(()=>t.sideNavPrinter),u=D(()=>{var ne;return(ne=l.value)==null?void 0:ne.id}),c=D(()=>u.value?n.isApiResponding(u.value):!1),d=D(()=>{var ne;return yD((ne=l.value)==null?void 0:ne.printerType)}),f=D(()=>{var ne;return Np((ne=l.value)==null?void 0:ne.printerType)}),h=D(()=>{var ne;return Bp((ne=l.value)==null?void 0:ne.printerType)}),g=D(()=>{var ne;return id((ne=l.value)==null?void 0:ne.printerType)}),m=D(()=>u.value?n.isPrinterOperational(u.value):!1),y=D(()=>{var ne;return(ne=l.value)==null?void 0:ne.enabled}),w=D(()=>{var ne,K;return!!((K=(ne=l.value)==null?void 0:ne.disabledReason)!=null&&K.length)}),b=D(()=>u.value?n.isPrinterPrinting(u.value):!1),S=D(()=>{var ne;return(ne=i.value)!=null&&ne.length?i.value.filter(K=>{var ke;return(ke=s.value)!=null&&ke.length?`${K.path}`.toLowerCase().includes(s.value):!0})||[]:[]}),_=D(()=>!l.value||!u.value?!1:n.isPrinterStoppable(u.value)),k=D(()=>!l.value||!u.value?!1:n.isPrinterPaused(u.value)),T=D(()=>{var ne;return u.value?((ne=i.value)==null?void 0:ne.length)&&n.isApiResponding(u.value):!1}),R=D(()=>{if(!u.value)throw new Error("Printer ID not set, cannot get current job");return n.printerJobsById[u.value]}),x=D(()=>{if(!u.value)throw new Error("Printer ID not set, cannot get current printing file name");return n.printingFilePathsByPrinterId[u.value]}),I=D(()=>{var N;if(!u.value||!l.value)return null;const ne=n.printerEventsById[u.value],K=n.socketStatesById[u.value],ke=NO(l.value,K,ne);return((N=Ks().frontendDebugSettings)==null?void 0:N.showInterpretedPrinterState)&&console.debug("[FileExplorerSideNav] rendered for printerId",u.value,ke==null?void 0:ke.text,ke==null?void 0:ke.color,ke==null?void 0:ke.rgb),ke}),P=async()=>{var K;a.value=!0;const ne=(K=l.value)==null?void 0:K.id;if(ne)try{n.isApiResponding(ne)?i.value=await t.loadPrinterFiles(ne):i.value=await Ki.getFileCache(ne)}finally{a.value=!1}},A=async ne=>{u.value&&await t.deletePrinterFile(u.value,ne.path)};xe(l,async(ne,K)=>{o.value=!!ne;const ke=ne==null?void 0:ne.id;!ne||!ke||(!i.value||ne.id!==(K==null?void 0:K.id)||!K)&&await P()}),xe(o,ne=>{ne||t.setSideNavPrinter(void 0)});function L(ne){return ne?ne==null?void 0:ne.toFixed(1):""}function B(ne){return u.value?n.printingFilePathsByPrinterId[u.value]===ne.path:!1}function O(){const ne=l.value;if(ne&&o.value)return Wm(ne.name)}function F(){l.value&&(tn.openPrinterURL(l.value.printerURL),he())}function W(){if(!l.value)return;const ne=new URL(l.value.printerURL);ne.port="8080",tn.openPrinterURL(ne.toString()),he()}async function X(){if(u.value){if(n.isPrinterOperational(u.value))return await tn.sendPrinterDisconnectCommand(u.value);await tn.sendPrinterConnectCommand(u.value)}}async function V(){if(!u.value)throw new Error("Printer ID not set, cant toggle enabled");if(!l.value)throw new Error("Cant toggle enabled, sidenav printer unset");const ne=!l.value.enabled;await tn.toggleEnabled(u.value,ne)}async function z(){if(!u.value)throw new Error("Printer ID not set, cant toggle maintenance");if(!l.value)throw new Error("Cant toggle enabled, sidenav printer unset");if(w.value){await tn.updatePrinterMaintenance(u.value);return}t.setMaintenanceDialogPrinter(l.value),await sn(on.PrinterMaintenanceDialog).openDialog(),he()}async function M(){u.value&&await tn.refreshSocket(u.value)}async function re(){u.value&&confirm("Are you sure to cancel the current print job?")&&await Za.stopPrintJob(u.value)}async function H(){u.value&&await Za.pausePrintJob(u.value)}async function j(){u.value&&await Za.resumePrintJob(u.value)}async function pe(){u.value&&confirm("Are you sure to delete all files for this printer?")&&(a.value=!0,await t.deletePrinterFiles(u.value),a.value=!1,i.value=t.printerFiles(u.value))}function J(){l.value&&(t.setUpdateDialogPrinter(l.value),sn(on.AddOrUpdatePrinterDialog).openDialog(),he())}async function we(ne){u.value&&await n.selectAndPrintFile({printerId:u.value,fullPath:ne.path})}function q(ne){u.value&&Ki.downloadFile(u.value,ne)}function he(){t.setSideNavPrinter(void 0)}return(ne,K)=>{const ke=gd("drop-upload");return $(),te(D1,{modelValue:o.value,"onUpdate:modelValue":K[14]||(K[14]=Re=>o.value=Re),absolute:"",loading:"true",location:"right",scrim:"white",temporary:"",width:"700",onClose:K[15]||(K[15]=Re=>he())},{default:v(()=>{var Re,N,U;return[l.value?($(),te(ze,{key:0,lines:"two"},{prepend:v(()=>[p(ot,{location:"left"},{activator:v(({props:Y})=>[p(se,ge({size:r.value,class:"mr-4 mt-1",color:"primary",icon:""},Y,{onClick:K[0]||(K[0]=le=>F()),onMouseup:K[1]||(K[1]=Ct(le=>F(),["middle"]))}),{default:v(()=>[p(dt,{size:r.value,class:"font-weight-bold",color:"primary"},{default:v(()=>[E(ae(O()),1)]),_:1},8,["size"])]),_:1},16,["size"])]),default:v(()=>[C("span",null," Visit the "+ae(g.value)+" associated to this printer ",1)]),_:1})]),default:v(()=>[p(ft,{class:"font-weight-bold"},{default:v(()=>[E(ae(l.value.name),1)]),_:1}),p(_t),p(O7,null,{default:v(()=>{var Y,le,oe,me;return[!y.value||!c.value?($(),ye("strong",K9,ae(y.value?"Enabled":"Disabled")+" - "+ae(c.value?(le=(Y=I.value)==null?void 0:Y.text)==null?void 0:le.toUpperCase():"Offline"),1)):ve("",!0),y.value&&((oe=I.value)!=null&&oe.text)&&m.value&&c.value?($(),ye("strong",Y9," Enabled - "+ae((me=I.value)==null?void 0:me.text),1)):ve("",!0)]}),_:1}),R.value?($(),te(_t,{key:0},{default:v(()=>{var Y,le,oe,me;return[(Y=R.value)!=null&&Y.progress?($(),ye("span",X9," Progress: "+ae(L((le=R.value)==null?void 0:le.progress.completion))+"% ",1)):ve("",!0),(oe=R.value)!=null&&oe.progress?($(),te(Eu,{key:1,"model-value":L((me=R.value.progress)==null?void 0:me.completion),class:"mt-1 mb-1",height:"8px"},null,8,["model-value"])):ve("",!0),p(ot,{location:"bottom"},{activator:v(({props:Pe})=>[p(se,ge({size:"small"},Pe,{variant:"outlined"}),{default:v(()=>[E(ae(x.value),1)]),_:1},16)]),default:v(()=>[C("span",null,ae(x.value),1)]),_:1})]}),_:1})):ve("",!0)]),_:1})):ve("",!0),!y.value||!c.value?($(),te(yn,{key:1,color:"primary"},{default:v(()=>[y.value?($(),ye("span",J9,[E(" This "+ae(g.value)+" seems unreachable... Will keep trying for you ",1),p(ee,null,{default:v(()=>[...K[16]||(K[16]=[E("hourglass_top",-1)])]),_:1})])):($(),ye("span",Q9," Disabled "+ae(g.value)+", enable it first to get live updates ",1))]),_:1})):ve("",!0),!((Re=l.value)!=null&&Re.enabled)&&!((N=l.value)!=null&&N.disabledReason)?($(),te(yn,{key:2,color:"secondary"},{default:v(()=>[E(" This "+ae(g.value)+" was disabled without reason. ",1)]),_:1})):ve("",!0),(U=l.value)!=null&&U.disabledReason?($(),te(yn,{key:3,color:"black"},{default:v(()=>{var Y;return[E(" This "+ae(g.value)+" was disabled for maintenance: ",1),K[17]||(K[17]=C("br",null,null,-1)),C("small",null," "+ae((Y=l.value)==null?void 0:Y.disabledReason),1)]}),_:1})):ve("",!0),p(cn),zt(($(),te(Ht,{density:"compact"},{default:v(()=>[p(Ur,{inset:""},{default:v(()=>[...K[18]||(K[18]=[E(" Manage FDM Monster instance",-1)])]),_:1}),p(ot,{location:"left"},{activator:v(({props:Y})=>[p(ze,ge({class:"extra-dense-list-item",link:""},Y,{onClick:K[2]||(K[2]=Ct(le=>F(),["prevent","stop"]))}),{prepend:v(()=>[p(dt,{size:r.value,class:"ml-3 mr-6 ma-5"},{default:v(()=>[d.value?($(),te(bs,{key:0,src:Z(nb)},null,8,["src"])):f.value?($(),ye("span",Z9,"MR")):h.value?($(),ye("span",eK,"PL")):($(),ye("span",tK,"?"))]),_:1},8,["size"])]),default:v(()=>[C("span",null," Open "+ae(g.value),1)]),_:1},16)]),default:v(()=>[C("span",null," Visit the "+ae(g.value)+" associated to this printer ",1)]),_:1}),f.value?($(),te(ot,{key:0,location:"left"},{activator:v(({props:Y})=>[p(ze,ge({class:"extra-dense-list-item",link:""},Y,{onClick:K[3]||(K[3]=Ct(le=>W(),["prevent","stop"]))}),{prepend:v(()=>[p(dt,{size:r.value,class:"ml-3 mr-6 ma-5"},{default:v(()=>[...K[19]||(K[19]=[C("span",null,"MA",-1)])]),_:1},8,["size"])]),default:v(()=>[K[20]||(K[20]=C("span",null," Open Mainsail ",-1))]),_:1},16)]),default:v(()=>[K[21]||(K[21]=C("span",null," Visit the Mainsail for this printer ",-1))]),_:1})):ve("",!0),p(ot,{location:"left"},{activator:v(({props:Y})=>[p(ze,ge({class:"extra-dense-list-item",link:""},Y,{onClick:K[4]||(K[4]=Ct(le=>V(),["prevent","stop"]))}),{prepend:v(()=>[p(dt,{size:r.value,color:"grey-lighten-1"},{default:v(()=>[p(ee,{color:y.value?"primary":"green"},{default:v(()=>[...K[22]||(K[22]=[E(" dns",-1)])]),_:1},8,["color"])]),_:1},8,["size"])]),default:v(()=>[y.value?($(),ye("span",nK," Disable Printer Location ")):y.value?ve("",!0):($(),ye("span",rK," Enable Printer Location "))]),_:1},16)]),default:v(()=>[K[23]||(K[23]=C("span",null," Deactivate connection, without impacting print ",-1))]),_:1}),p(ot,{location:"left"},{activator:v(({props:Y})=>[p(ze,ge({class:"extra-dense-list-item",link:""},Y,{onClick:K[5]||(K[5]=Ct(le=>z(),["prevent","stop"]))}),{default:v(()=>[p(dt,{size:r.value,color:"grey-lighten-1"},{default:v(()=>[p(ee,{color:w.value?"green":"primary"},{default:v(()=>[...K[24]||(K[24]=[E(" construction ",-1)])]),_:1},8,["color"])]),_:1},8,["size"]),w.value?w.value?($(),ye("span",iK," Complete Maintenance ")):ve("",!0):($(),ye("span",sK," Enable Maintenance "))]),_:1},16)]),default:v(()=>[K[25]||(K[25]=C("span",null," Deactivate, set under repair, without impacting print ",-1))]),_:1}),p(ot,{location:"left"},{activator:v(({props:Y})=>[p(ze,ge({class:"extra-dense-list-item",link:""},Y,{onClick:K[6]||(K[6]=Ct(le=>M(),["prevent","stop"]))}),{default:v(()=>[p(dt,{size:r.value},{default:v(()=>[p(ee,{color:w.value?"green":"primary",class:"grey-lighten-1"},{default:v(()=>[...K[26]||(K[26]=[E(" autorenew ",-1)])]),_:1},8,["color"])]),_:1},8,["size"]),K[27]||(K[27]=C("span",null,[E(" Refresh State "),C("small",null," - this does not affect the print! ")],-1))]),_:1},16)]),default:v(()=>[K[28]||(K[28]=C("span",null," Let FDM Monster know you are experiencing inconsistencies, reset all volatile states ",-1))]),_:1}),p(cn),p(Ur,{inset:""},{default:v(()=>[...K[29]||(K[29]=[E(" Commands",-1)])]),_:1}),p(ot,{location:"left"},{activator:v(({props:Y})=>{var le;return[p(ze,ge({disabled:!((le=l.value)!=null&&le.enabled)||!c.value,class:"extra-dense-list-item",link:""},Y,{onClick:K[7]||(K[7]=Ct(oe=>X(),["prevent","stop"]))}),{default:v(()=>[p(dt,{size:r.value},{default:v(()=>[p(ee,null,{default:v(()=>[...K[30]||(K[30]=[E(" usb",-1)])]),_:1})]),_:1},8,["size"]),_.value?($(),ye("span",oK," Disconnect USB & Stop Print ")):m.value?($(),ye("span",aK," Disconnect USB ")):($(),ye("span",lK," Connect USB "))]),_:1},16,["disabled"])]}),default:v(()=>[K[31]||(K[31]=C("span",null," Disconnect USB, disrupting any print ",-1))]),_:1}),p(ot,{location:"left"},{activator:v(({props:Y})=>[p(ze,ge({disabled:!c.value||!b.value,class:"extra-dense-list-item",link:""},Y,{onClick:K[8]||(K[8]=Ct(le=>k.value?j():H(),["prevent","stop"]))}),{default:v(()=>[p(dt,{size:r.value},{default:v(()=>[k.value?ve("",!0):($(),te(ee,{key:0},{default:v(()=>[...K[32]||(K[32]=[E(" pause",-1)])]),_:1})),k.value?($(),te(ee,{key:1},{default:v(()=>[...K[33]||(K[33]=[E(" play_circle_outline",-1)])]),_:1})):ve("",!0)]),_:1},8,["size"]),E(" "+ae(k.value?"Resume print":"Pause print"),1)]),_:1},16,["disabled"])]),default:v(()=>[K[34]||(K[34]=C("span",null," Send Pause or Resume command ",-1))]),_:1}),p(ot,{location:"left"},{activator:v(({props:Y})=>[p(ze,ge({disabled:!_.value,class:"extra-dense-list-item",link:""},Y,{onClick:K[9]||(K[9]=Ct(le=>re(),["prevent","stop"]))}),{default:v(()=>[p(dt,{size:r.value},{default:v(()=>[p(ee,null,{default:v(()=>[...K[35]||(K[35]=[E(" stop",-1)])]),_:1})]),_:1},8,["size"]),K[36]||(K[36]=E(" Cancel print ",-1))]),_:1},16,["disabled"])]),default:v(()=>[K[37]||(K[37]=C("span",null," Cancel print gracefully ",-1))]),_:1}),p(ot,{location:"left"},{activator:v(({props:Y})=>[p(ze,ge({disabled:!T.value,class:"extra-dense-list-item",link:""},Y,{onClick:K[10]||(K[10]=Ct(le=>pe(),["prevent","stop"]))}),{default:v(()=>[p(dt,{size:r.value},{default:v(()=>[p(ee,null,{default:v(()=>[...K[38]||(K[38]=[E(" delete",-1)])]),_:1})]),_:1},8,["size"]),K[39]||(K[39]=E(" Delete files ",-1))]),_:1},16,["disabled"])]),default:v(()=>[K[40]||(K[40]=C("span",null," Clear all files present on OctoPrint (local) ",-1))]),_:1}),p(ot,{location:"left"},{activator:v(({props:Y})=>[p(ze,ge({class:"extra-dense-list-item",link:""},Y,{onClick:K[11]||(K[11]=Ct(le=>P(),["prevent","stop"]))}),{default:v(()=>[p(dt,{size:r.value},{default:v(()=>[p(ee,null,{default:v(()=>[...K[41]||(K[41]=[E(" refresh",-1)])]),_:1})]),_:1},8,["size"]),K[42]||(K[42]=E(" Refresh files ",-1))]),_:1},16)]),default:v(()=>[K[43]||(K[43]=C("span",null," Rebuild the file list on OctoPrint (local) ",-1))]),_:1}),p(ot,{location:"left"},{activator:v(({props:Y})=>[p(ze,ge({class:"extra-dense-list-item",link:""},Y,{onClick:K[12]||(K[12]=Ct(le=>J(),["prevent","stop"]))}),{default:v(()=>[p(dt,{size:r.value},{default:v(()=>[p(ee,null,{default:v(()=>[...K[44]||(K[44]=[E(" settings",-1)])]),_:1})]),_:1},8,["size"]),K[45]||(K[45]=E(" Settings ",-1))]),_:1},16)]),default:v(()=>[K[46]||(K[46]=C("span",null," Edit the printer settings ",-1))]),_:1})]),_:1})),[[ke,{printers:[l.value]}]]),p(cn),zt(($(),te(Ht,{density:"compact"},{default:v(()=>[p(Ur,{inset:""},{default:v(()=>[...K[47]||(K[47]=[E(" Files - drag 'n drop!",-1)])]),_:1}),p(at,{modelValue:s.value,"onUpdate:modelValue":K[13]||(K[13]=Y=>s.value=Y),class:"ml-5 mr-5",clearable:"",label:"Search files...","prepend-icon":"search"},null,8,["modelValue"]),S.value.length?ve("",!0):($(),te(ze,{key:0},{default:v(()=>[p(dt,{size:r.value},{default:v(()=>[p(ee,null,{default:v(()=>[...K[48]||(K[48]=[E(" clear",-1)])]),_:1})]),_:1},8,["size"]),p(ft,null,{default:v(()=>[...K[49]||(K[49]=[E(" No files to show",-1)])]),_:1})]),_:1})),a.value?($(),te(Eu,{key:1,indeterminate:""})):ve("",!0),($(!0),ye(De,null,Zt(S.value,(Y,le)=>($(),te(ze,{key:le,density:"compact",link:"",style:{"padding-top":"0"}},{default:v(()=>[p(dt,{size:r.value},{default:v(()=>[p(ot,{location:"left"},{activator:v(({props:oe})=>[p(se,ge({ref_for:!0},oe,{onClick:me=>q(Y.path)}),{default:v(()=>[p(ee,null,{default:v(()=>[...K[50]||(K[50]=[E(" download",-1)])]),_:1})]),_:1},16,["onClick"])]),default:v(()=>[K[51]||(K[51]=C("span",null," Download GCode ",-1))]),_:2},1024)]),_:2},1032,["size"]),p(Nu,null,{default:v(()=>[p(ot,{location:"left"},{activator:v(({props:oe})=>[p(se,ge({disabled:B(Y),icon:""},{ref_for:!0},oe,{onClick:me=>we(Y)}),{default:v(()=>[p(ee,null,{default:v(()=>[...K[52]||(K[52]=[E(" play_arrow",-1)])]),_:1})]),_:1},16,["disabled","onClick"])]),default:v(()=>[K[53]||(K[53]=C("span",null," Select & Print ",-1))]),_:2},1024)]),_:2},1024),p(ot,{location:"left"},{activator:v(({props:oe})=>[C("span",ge({class:{"current-file-print":B(Y)}},{ref_for:!0},oe),ae(Y.path),17)]),default:v(()=>[C("span",null,[E(" File: "+ae(Y.path)+" ",1),K[54]||(K[54]=C("br",null,null,-1)),E(" Size: "+ae(Z(vD)(Y.size))+" ",1),K[55]||(K[55]=C("br",null,null,-1)),C("strong",null,ae(B(Y)?"Printing":"Unused"),1)])]),_:2},1024),p(Nu,null,{default:v(()=>[p(ot,{location:"left"},{activator:v(({props:oe})=>[p(se,ge({disabled:B(Y)},{ref_for:!0},oe,{onClick:me=>A(Y)}),{default:v(()=>[p(ee,{color:"grey-lighten-1"},{default:v(()=>[...K[56]||(K[56]=[E(" delete",-1)])]),_:1})]),_:1},16,["disabled","onClick"])]),default:v(()=>[K[57]||(K[57]=C("span",null," Delete file ",-1))]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))]),_:1})),[[ke,{printers:[l.value]}]])]}),_:1},8,["modelValue"])}}});class zp extends Cr{static async downloadYamlExport(t){const r=await(await sr()).request({method:"POST",url:"api/server/export-printers-floors-yaml",data:t,responseType:"arraybuffer"});Jy(r.data,"export-fdm-monster-"+Date.now()+".yaml")}static async uploadAndImportYaml(t){const n=new FormData;return n.append("file",t),await this.postUpload("api/server/import-printers-floors-yaml",n,{})}static async downloadLogDump(){const n=await(await sr()).request({method:"POST",url:"api/server/dump-fdm-monster-logs",responseType:"arraybuffer"});Jy(n.data,"logs-fdm-monster-"+Date.now()+".zip")}static async clearLogFilesOlderThanWeek(){return await this.delete("api/server/clear-outdated-fdm-monster-logs")}}class Ia 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 sr(!1,!1)).get("/api/test")}}const Ym=ks("Feature",{state:()=>({features:void 0}),getters:{getFeatures(){return this.features},getFeature:e=>t=>{if(!e.features){console.warn("Feature[getFeature] store not loaded");return}return e.features[t]},hasFeature:e=>t=>{if(!e.features)return console.warn("Feature[hasFeature] store not loaded"),!1;const n=e.features[t];return n?n==null?void 0:n.available:(console.debug(`Feature ${t} not defined. Options:`,Object.keys(e.features)),!1)}},actions:{async loadFeatures(){try{const e=await Ia.getFeatures();this.setFeatures(e)}catch{this.features={}}},setFeatures(e){this.features=e}}}),MD=Symbol.for("vuetify:selection-control-group"),N1=ce({color:String,disabled:{type:Boolean,default:null},defaultsTarget:String,error:Boolean,id:String,inline:Boolean,falseIcon:He,trueIcon:He,ripple:{type:[Boolean,Object],default:!0},multiple:{type:Boolean,default:null},name:String,readonly:{type:Boolean,default:null},modelValue:null,type:String,valueComparator:{type:Function,default:$r},...Ge(),...Jn(),...Nt()},"SelectionControlGroup"),cK=ce({...N1({defaultsTarget:"VSelectionControl"})},"VSelectionControlGroup"),dK=Ee()({name:"VSelectionControlGroup",props:cK(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=lt(e,"modelValue"),s=jr(),i=ie(()=>e.id||`v-selection-control-group-${s}`),o=ie(()=>e.name||i.value),a=new Set;return Jt(MD,{modelValue:r,forceUpdate:()=>{a.forEach(l=>l())},onForceUpdate:l=>{a.add(l),ln(()=>{a.delete(l)})}}),zr({[e.defaultsTarget]:{color:ie(()=>e.color),disabled:ie(()=>e.disabled),density:ie(()=>e.density),error:ie(()=>e.error),inline:ie(()=>e.inline),modelValue:r,multiple:ie(()=>!!e.multiple||e.multiple==null&&Array.isArray(r.value)),name:o,falseIcon:ie(()=>e.falseIcon),trueIcon:ie(()=>e.trueIcon),readonly:ie(()=>e.readonly),ripple:ie(()=>e.ripple),type:ie(()=>e.type),valueComparator:ie(()=>e.valueComparator)}}),Me(()=>{var l;return C("div",{class:Oe(["v-selection-control-group",{"v-selection-control-group--inline":e.inline},e.class]),style:Be(e.style),role:e.type==="radio"?"radiogroup":void 0},[(l=n.default)==null?void 0:l.call(n)])}),{}}}),Xm=ce({label:String,baseColor:String,trueValue:null,falseValue:null,value:null,...Ge(),...N1()},"VSelectionControl");function fK(e){const t=Xe(MD,void 0),{densityClasses:n}=Es(e),r=lt(e,"modelValue"),s=D(()=>e.trueValue!==void 0?e.trueValue:e.value!==void 0?e.value:!0),i=D(()=>e.falseValue!==void 0?e.falseValue:!1),o=D(()=>!!e.multiple||e.multiple==null&&Array.isArray(r.value)),a=D({get(){const h=t?t.modelValue.value:r.value;return o.value?Fn(h).some(g=>e.valueComparator(g,s.value)):e.valueComparator(h,s.value)},set(h){if(e.readonly)return;const g=h?s.value:i.value;let m=g;o.value&&(m=h?[...Fn(r.value),g]:Fn(r.value).filter(y=>!e.valueComparator(y,s.value))),t?t.modelValue.value=m:r.value=m}}),{textColorClasses:l,textColorStyles:u}=Vs(()=>{if(!(e.error||e.disabled))return a.value?e.color:e.baseColor}),{backgroundColorClasses:c,backgroundColorStyles:d}=wr(()=>a.value&&!e.error&&!e.disabled?e.color:e.baseColor),f=D(()=>a.value?e.trueIcon:e.falseIcon);return{group:t,densityClasses:n,trueValue:s,falseValue:i,model:a,textColorClasses:l,textColorStyles:u,backgroundColorClasses:c,backgroundColorStyles:d,icon:f}}const fl=Ee()({name:"VSelectionControl",directives:{vRipple:Us},inheritAttrs:!1,props:Xm(),emits:{"update:modelValue":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const{group:s,densityClasses:i,icon:o,model:a,textColorClasses:l,textColorStyles:u,backgroundColorClasses:c,backgroundColorStyles:d,trueValue:f}=fK(e),h=jr(),g=Ce(!1),m=Ce(!1),y=G(),w=ie(()=>e.id||`input-${h}`),b=ie(()=>!e.disabled&&!e.readonly);s==null||s.onForceUpdate(()=>{y.value&&(y.value.checked=a.value)});function S(R){b.value&&(g.value=!0,fp(R.target,":focus-visible")!==!1&&(m.value=!0))}function _(){g.value=!1,m.value=!1}function k(R){R.stopPropagation()}function T(R){if(!b.value){y.value&&(y.value.checked=a.value);return}e.readonly&&s&&ht(()=>s.forceUpdate()),a.value=R.target.checked}return Me(()=>{var A,L;const R=r.label?r.label({label:e.label,props:{for:w.value}}):e.label,[x,I]=yl(n),P=C("input",ge({ref:y,checked:a.value,disabled:!!e.disabled,id:w.value,onBlur:_,onFocus:S,onInput:T,"aria-disabled":!!e.disabled,"aria-label":e.label,type:e.type,value:f.value,name:e.name,"aria-checked":e.type==="checkbox"?a.value:void 0},I),null);return C("div",ge({class:["v-selection-control",{"v-selection-control--dirty":a.value,"v-selection-control--disabled":e.disabled,"v-selection-control--error":e.error,"v-selection-control--focused":g.value,"v-selection-control--focus-visible":m.value,"v-selection-control--inline":e.inline},i.value,e.class]},x,{style:e.style}),[C("div",{class:Oe(["v-selection-control__wrapper",l.value]),style:Be(u.value)},[(A=r.default)==null?void 0:A.call(r,{backgroundColorClasses:c,backgroundColorStyles:d}),zt(C("div",{class:Oe(["v-selection-control__input"])},[((L=r.input)==null?void 0:L.call(r,{model:a,textColorClasses:l,textColorStyles:u,backgroundColorClasses:c,backgroundColorStyles:d,inputNode:P,icon:o.value,props:{onFocus:S,onBlur:_,id:w.value}}))??C(De,null,[o.value&&p(ee,{key:"icon",icon:o.value},null),P])]),[[Us,!e.disabled&&!e.readonly&&e.ripple,null,{center:!0,circle:!0}]])]),R&&p(L1,{for:w.value,onClick:k},{default:()=>[R]})])}),{isFocused:g,input:y}}}),LD=ce({indeterminate:Boolean,indeterminateIcon:{type:He,default:"$checkboxIndeterminate"},...Xm({falseIcon:"$checkboxOff",trueIcon:"$checkboxOn"})},"VCheckboxBtn"),hl=Ee()({name:"VCheckboxBtn",props:LD(),emits:{"update:modelValue":e=>!0,"update:indeterminate":e=>!0},setup(e,t){let{slots:n}=t;const r=lt(e,"indeterminate"),s=lt(e,"modelValue");function i(l){r.value&&(r.value=!1)}const o=ie(()=>r.value?e.indeterminateIcon:e.falseIcon),a=ie(()=>r.value?e.indeterminateIcon:e.trueIcon);return Me(()=>{const l=In(fl.filterProps(e),["modelValue"]);return p(fl,ge(l,{modelValue:s.value,"onUpdate:modelValue":[u=>s.value=u,i],class:["v-checkbox-btn",e.class],style:e.style,type:"checkbox",falseIcon:o.value,trueIcon:a.value,"aria-checked":r.value?"mixed":void 0}),n)}),{}}}),hK=ce({...xl(),...In(LD(),["inline"])},"VCheckbox"),wn=Ee()({name:"VCheckbox",inheritAttrs:!1,props:hK(),emits:{"update:modelValue":e=>!0,"update:focused":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const s=lt(e,"modelValue"),{isFocused:i,focus:o,blur:a}=hc(e),l=G(),u=jr();return Me(()=>{const[c,d]=yl(n),f=ws.filterProps(e),h=hl.filterProps(e);return p(ws,ge({ref:l,class:["v-checkbox",e.class]},c,f,{modelValue:s.value,"onUpdate:modelValue":g=>s.value=g,id:e.id||`checkbox-${u}`,focused:i.value,style:e.style}),{...r,default:g=>{let{id:m,messagesId:y,isDisabled:w,isReadonly:b,isValid:S}=g;return p(hl,ge(h,{id:m.value,"aria-describedby":y.value,disabled:w.value,readonly:b.value},d,{error:S.value===!1,modelValue:s.value,"onUpdate:modelValue":_=>s.value=_,onFocus:o,onBlur:a}),r)}})}),Ts({},l)}});function pK(){function e(n){var s,i;return[...((s=n.dataTransfer)==null?void 0:s.items)??[]].filter(o=>o.kind==="file").map(o=>o.webkitGetAsEntry()).filter(Boolean).length>0||[...((i=n.dataTransfer)==null?void 0:i.files)??[]].length>0}async function t(n){var i,o;const r=[],s=[...((i=n.dataTransfer)==null?void 0:i.items)??[]].filter(a=>a.kind==="file").map(a=>a.webkitGetAsEntry()).filter(Boolean);if(s.length)for(const a of s){const l=await FD(a,$D(".",a));r.push(...l.map(u=>u.file))}else r.push(...((o=n.dataTransfer)==null?void 0:o.files)??[]);return r}return{handleDrop:t,hasFilesOrFolders:e}}function FD(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 o=[];for(const a of i)o.push(...await FD(a,$D(t,a)));n(o)})})}function $D(e,t){return t.isDirectory?`${e}/${t.name}`:e}const mK=ce({filterByType:String},"file-accept");function gK(e){const t=D(()=>e.filterByType?vK(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 vK(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=>{var l,u;const o=((l=i.name.split(".").at(-1))==null?void 0:l.toLowerCase())??"",a=((u=i.type.split("/").at(0))==null?void 0:u.toLowerCase())??"";return s.includes(i.type)||n.includes(`.${o}`)||r.includes(`${a}/*`)}}const yK=ce({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},...xl({prependIcon:"$file"}),modelValue:{type:[Array,Object],default:e=>e.multiple?[]:null,validator:e=>Fn(e).every(t=>t!=null&&typeof t=="object")},...mK(),...Km({clearable:!0})},"VFileInput"),ND=Ee()({name:"VFileInput",inheritAttrs:!1,props:yK(),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}=ts(),{filterAccepted:o}=gK(e),a=lt(e,"modelValue",e.modelValue,z=>Fn(z),z=>!e.multiple&&Array.isArray(z)?z[0]:z),{isFocused:l,focus:u,blur:c}=hc(e),d=D(()=>typeof e.showSize!="boolean"?e.showSize:void 0),f=D(()=>(a.value??[]).reduce((z,M)=>{let{size:re=0}=M;return z+re},0)),h=D(()=>PS(f.value,d.value)),g=D(()=>(a.value??[]).map(z=>{const{name:M="",size:re=0}=z,H=B(M);return e.showSize?`${H} (${PS(re,d.value)})`:H})),m=D(()=>{var M;const z=((M=a.value)==null?void 0:M.length)??0;return e.showSize?i(e.counterSizeString,z,h.value):i(e.counterString,z)}),y=G(),w=G(),b=G(),S=ie(()=>l.value||e.active),_=D(()=>["plain","underlined"].includes(e.variant)),k=Ce(!1),{handleDrop:T,hasFilesOrFolders:R}=pK();function x(){var z;b.value!==document.activeElement&&((z=b.value)==null||z.focus()),l.value||u()}function I(z){var M;(M=b.value)==null||M.click()}function P(z){r("mousedown:control",z)}function A(z){var M;(M=b.value)==null||M.click(),r("click:control",z)}function L(z){z.stopPropagation(),x(),ht(()=>{a.value=[],ef(e["onClick:clear"],z)})}function B(z){if(z.length<Number(e.truncateLength))return z;const M=Math.floor((Number(e.truncateLength)-1)/2);return`${z.slice(0,M)}…${z.slice(z.length-M)}`}function O(z){z.preventDefault(),z.stopImmediatePropagation(),k.value=!0}function F(z){z.preventDefault(),k.value=!1}async function W(z){if(z.preventDefault(),z.stopImmediatePropagation(),k.value=!1,!b.value||!R(z))return;const M=await T(z);V(M)}function X(z){if(!(!z.target||z.repack))if(e.filterByType)V([...z.target.files]);else{const M=z.target;a.value=[...M.files??[]]}}function V(z){const M=new DataTransfer,{accepted:re,rejected:H}=o(z);H.length&&r("rejected",H);for(const pe of re)M.items.add(pe);b.value.files=M.files,a.value=[...M.files];const j=new Event("change",{bubbles:!0});j.repack=!0,b.value.dispatchEvent(j)}return xe(a,z=>{(!Array.isArray(z)||!z.length)&&b.value&&(b.value.value="")}),Me(()=>{const z=!!(s.counter||e.counter),M=!!(z||s.details),[re,H]=yl(n),{modelValue:j,...pe}=ws.filterProps(e),J={...Bu.filterProps(e),"onClick:clear":L},we=n.webkitdirectory!==void 0&&n.webkitdirectory!==!1,q=n.accept?String(n.accept):void 0,he=we?void 0:e.filterByType??q;return p(ws,ge({ref:y,modelValue:e.multiple?a.value:a.value[0],class:["v-file-input",{"v-file-input--chips":!!e.chips,"v-file-input--dragging":k.value,"v-file-input--hide":e.hideInput,"v-input--plain-underlined":_.value},e.class],style:e.style,"onClick:prepend":I},re,pe,{centerAffix:!_.value,focused:l.value}),{...s,default:ne=>{let{id:K,isDisabled:ke,isDirty:Re,isReadonly:N,isValid:U,hasDetails:Y}=ne;return p(Bu,ge({ref:w,prependIcon:e.prependIcon,onMousedown:P,onClick:A,"onClick:prependInner":e["onClick:prependInner"],"onClick:appendInner":e["onClick:appendInner"]},J,{id:K.value,active:S.value||Re.value,dirty:Re.value||e.dirty,disabled:ke.value,focused:l.value,details:Y.value,error:U.value===!1,onDragover:O,onDrop:W}),{...s,default:le=>{var be;let{props:{class:oe,...me},controlRef:Pe}=le;return C(De,null,[C("input",ge({ref:_e=>b.value=Pe.value=_e,type:"file",accept:he,readonly:N.value,disabled:ke.value,multiple:e.multiple,name:e.name,onClick:_e=>{_e.stopPropagation(),N.value&&_e.preventDefault(),x()},onChange:X,onDragleave:F,onFocus:x,onBlur:c},me,H),null),C("div",{class:Oe(oe)},[!!((be=a.value)!=null&&be.length)&&!e.hideInput&&(s.selection?s.selection({fileNames:g.value,totalBytes:f.value,totalBytesReadable:h.value}):e.chips?g.value.map(_e=>p(Cn,{key:_e,size:"small",text:_e},null)):g.value.join(", "))])])}})},details:M?ne=>{var K,ke;return C(De,null,[(K=s.details)==null?void 0:K.call(s,ne),z&&C(De,null,[C("span",null,null),p(M1,{active:!!((ke=a.value)!=null&&ke.length),value:m.value,disabled:e.disabled},s.counter)])])}:void 0})}),Ts({},y,w,b)}}),bK=ce({...Xm({falseIcon:"$radioOff",trueIcon:"$radioOn"})},"VRadio"),sb=Ee()({name:"VRadio",props:bK(),setup(e,t){let{slots:n}=t;return Me(()=>{const r=fl.filterProps(e);return p(fl,ge(r,{class:["v-radio",e.class],style:e.style,type:"radio"}),n)}),{}}}),wK=ce({height:{type:[Number,String],default:"auto"},...xl(),...In(N1(),["multiple"]),trueIcon:{type:He,default:"$radioOn"},falseIcon:{type:He,default:"$radioOff"},type:{type:String,default:"radio"}},"VRadioGroup"),BD=Ee()({name:"VRadioGroup",inheritAttrs:!1,props:wK(),emits:{"update:modelValue":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const s=jr(),i=D(()=>e.id||`radio-group-${s}`),o=lt(e,"modelValue"),a=G();return Me(()=>{const[l,u]=yl(n),c=ws.filterProps(e),d=fl.filterProps(e),f=r.label?r.label({label:e.label,props:{for:i.value}}):e.label;return p(ws,ge({ref:a,class:["v-radio-group",e.class],style:e.style},l,c,{modelValue:o.value,"onUpdate:modelValue":h=>o.value=h,id:i.value}),{...r,default:h=>{let{id:g,messagesId:m,isDisabled:y,isReadonly:w}=h;return C(De,null,[f&&p(L1,{id:g.value},{default:()=>[f]}),p(dK,ge(d,{id:g.value,"aria-describedby":m.value,defaultsTarget:"VRadio",trueIcon:e.trueIcon,falseIcon:e.falseIcon,type:e.type,disabled:y.value,readonly:w.value,"aria-labelledby":f?g.value:void 0,multiple:!1},u,{modelValue:o.value,"onUpdate:modelValue":b=>o.value=b}),r)])}})}),Ts({},a)}}),SK=ce({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,...AD(),...xl(),...Km()},"VTextarea"),VD=Ee()({name:"VTextarea",directives:{vIntersect:Fu},inheritAttrs:!1,props:SK(),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=lt(e,"modelValue"),{isFocused:o,focus:a,blur:l}=hc(e),{onIntersect:u}=OD(e),c=D(()=>typeof e.counterValue=="function"?e.counterValue(i.value):(i.value||"").toString().length),d=D(()=>{if(n.maxlength)return n.maxlength;if(!(!e.counter||typeof e.counter!="number"&&typeof e.counter!="string"))return e.counter}),f=G(),h=G(),g=Ce(""),m=G(),y=G(0),{platform:w}=qs(),b=$1(e),S=D(()=>e.persistentPlaceholder||o.value||e.active);function _(){var O;b.isSuppressing.value&&b.update(),m.value!==document.activeElement&&((O=m.value)==null||O.focus()),o.value||a()}function k(O){_(),r("click:control",O)}function T(O){r("mousedown:control",O)}function R(O){O.stopPropagation(),_(),ht(()=>{i.value="",ef(e["onClick:clear"],O)})}function x(O){var z;const F=O.target;if(!((z=e.modelModifiers)!=null&&z.trim)){i.value=F.value;return}const W=F.value,X=F.selectionStart,V=F.selectionEnd;i.value=W,ht(()=>{let M=0;W.trimStart().length===F.value.length&&(M=W.length-F.value.length),X!=null&&(F.selectionStart=X-M),V!=null&&(F.selectionEnd=V-M)})}const I=G(),P=G(Number(e.rows)),A=D(()=>["plain","underlined"].includes(e.variant));Rn(()=>{e.autoGrow||(P.value=Number(e.rows))});function L(){ht(()=>{if(!m.value)return;if(w.value.firefox){y.value=12;return}const{offsetWidth:O,clientWidth:F}=m.value;y.value=Math.max(0,O-F)}),e.autoGrow&&ht(()=>{if(!I.value||!h.value)return;const O=getComputedStyle(I.value),F=getComputedStyle(h.value.$el),W=parseFloat(O.getPropertyValue("--v-field-padding-top"))+parseFloat(O.getPropertyValue("--v-input-padding-top"))+parseFloat(O.getPropertyValue("--v-field-padding-bottom")),X=I.value.scrollHeight,V=parseFloat(O.lineHeight),z=Math.max(parseFloat(e.rows)*V+W,parseFloat(F.getPropertyValue("--v-input-control-height"))),M=e.maxHeight?parseFloat(e.maxHeight):parseFloat(e.maxRows)*V+W||1/0,re=Un(X??0,z,M);P.value=Math.floor((re-W)/V),g.value=Le(re)})}xt(L),xe(i,L),xe(()=>e.rows,L),xe(()=>e.maxHeight,L),xe(()=>e.maxRows,L),xe(()=>e.density,L),xe(P,O=>{r("update:rows",O)});let B;return xe(I,O=>{O?(B=new ResizeObserver(L),B.observe(I.value)):B==null||B.disconnect()}),Qn(()=>{B==null||B.disconnect()}),Me(()=>{const O=!!(s.counter||e.counter||e.counterValue),F=!!(O||s.details),[W,X]=yl(n),{modelValue:V,...z}=ws.filterProps(e),M={...Bu.filterProps(e),"onClick:clear":R};return p(ws,ge({ref:f,modelValue:i.value,"onUpdate:modelValue":re=>i.value=re,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":A.value},e.class],style:[{"--v-textarea-max-height":e.maxHeight?Le(e.maxHeight):void 0,"--v-textarea-scroll-bar-width":Le(y.value)},e.style]},W,z,{centerAffix:P.value===1&&!A.value,focused:o.value}),{...s,default:re=>{let{id:H,isDisabled:j,isDirty:pe,isReadonly:J,isValid:we,hasDetails:q}=re;return p(Bu,ge({ref:h,style:{"--v-textarea-control-height":g.value},onClick:k,onMousedown:T,"onClick:prependInner":e["onClick:prependInner"],"onClick:appendInner":e["onClick:appendInner"]},M,{id:H.value,active:S.value||pe.value,labelId:`${H.value}-label`,centerAffix:P.value===1&&!A.value,dirty:pe.value||e.dirty,disabled:j.value,focused:o.value,details:q.value,error:we.value===!1}),{...s,default:he=>{let{props:{class:ne,...K},controlRef:ke}=he;return C(De,null,[e.prefix&&C("span",{class:"v-text-field__prefix"},[e.prefix]),zt(C("textarea",ge({ref:Re=>m.value=ke.value=Re,class:ne,value:i.value,onInput:x,autofocus:e.autofocus,readonly:J.value,disabled:j.value,placeholder:e.placeholder,rows:e.rows,name:b.fieldName.value,autocomplete:b.fieldAutocomplete.value,onFocus:_,onBlur:l,"aria-labelledby":`${H.value}-label`},K,X),null),[[Fu,{handler:u},null,{once:!0}]]),e.autoGrow&&zt(C("textarea",{class:Oe([ne,"v-textarea__sizer"]),id:`${K.id}-sizer`,"onUpdate:modelValue":Re=>i.value=Re,ref:I,readonly:!0,"aria-hidden":"true"},null),[[A$,i.value]]),e.suffix&&C("span",{class:"v-text-field__suffix"},[e.suffix])])}})},details:F?re=>{var H;return C(De,null,[(H=s.details)==null?void 0:H.call(s,re),O&&C(De,null,[C("span",null,null),p(M1,{active:e.persistentCounter||o.value,value:c.value,max:d.value,disabled:e.disabled},s.counter)])])}:void 0})}),Ts({},f,h,m)}}),_K={key:0,class:"pl-2"},kK={key:1},xK=Ve({__name:"YamlImportExportDialog",setup(e){const t=Ym(),n=sn(on.YamlImportExport),r=$t(),s=G(""),i=G(""),o=G(0),a=G(!0),l=G(!0),u=G(!0),c=G(!0),d=G(void 0),f=G(""),h=D(()=>!t.hasFeature("printerGroupsApi")),g=D(()=>!!d.value),m=D(()=>o.value===0),y=async()=>{await t.loadFeatures(),u.value=t.hasFeature("printerGroupsApi")},w=async()=>{d.value=void 0,s.value="",i.value="",f.value=""},b=async()=>{l.value&&(c.value=!0),await zp.downloadYamlExport({exportPrinters:c.value,exportGroups:u.value,exportFloorGrid:l.value,printerComparisonStrategiesByPriority:["name","url"],exportFloors:a.value,floorComparisonStrategiesByPriority:"floor",notes:f.value}),r.openInfoMessage({title:"Downloaded the YAML file"}),f.value=""},S=async()=>{if(s.value="",i.value="",!d.value){s.value="The import file was not specified";return}try{await zp.uploadAndImportYaml(d.value),d.value=void 0,r.openInfoMessage({title:"Imported the YAML file"}),_()}catch(k){s.value="An error occurred uring import",i.value=k.message.toString(),d.value=void 0}},_=()=>{d.value=void 0,s.value="",i.value="",f.value="",n.closeDialog()};return(k,T)=>{const R=Si;return $(),te(R,{id:Z(n).dialogId,"max-width":"700px",onEscape:T[10]||(T[10]=x=>_()),onOpened:w,onBeforeOpened:y},{default:v(()=>[p(kt,{class:"pa-4"},{default:v(()=>[p(un,null,{default:v(()=>[...T[11]||(T[11]=[C("span",{class:"text-h5"}," YAML export and import ",-1)])]),_:1}),p(rn,null,{default:v(()=>[T[18]||(T[18]=C("div",null,"Choose mode:",-1)),p(st,null,{default:v(()=>[T[12]||(T[12]=C("br",null,null,-1)),p(BD,{modelValue:Z(o),"onUpdate:modelValue":T[0]||(T[0]=x=>nt(o)?o.value=x:null),class:"ml-3",inline:""},{default:v(()=>[p(sb,{value:0,label:"Import YAML"}),p(sb,{value:1,label:"Export YAML"})]),_:1},8,["modelValue"])]),_:1}),C("div",null,[Z(m)?($(),ye("div",_K,[p(ND,{modelValue:Z(d),"onUpdate:modelValue":T[1]||(T[1]=x=>nt(d)?d.value=x:null),accept:".yaml",label:"Select a YAML file for import *"},null,8,["modelValue"])])):($(),ye("div",kK,[p(wn,{modelValue:Z(a),"onUpdate:modelValue":T[2]||(T[2]=x=>nt(a)?a.value=x:null),class:"pa-0 ma-0 mt-2 ml-2",label:"Include floors"},null,8,["modelValue"]),p(wn,{modelValue:Z(u),"onUpdate:modelValue":T[3]||(T[3]=x=>nt(u)?u.value=x:null),disabled:Z(h),class:"pa-0 ma-0 mt-2 ml-2",label:"Include groups"},null,8,["modelValue","disabled"]),p(wn,{modelValue:Z(c),"onUpdate:modelValue":T[4]||(T[4]=x=>nt(c)?c.value=x:null),class:"pa-0 ma-0 ml-2",label:"Include printers"},null,8,["modelValue"]),p(wn,{modelValue:Z(l),"onUpdate:modelValue":T[5]||(T[5]=x=>nt(l)?l.value=x:null),class:"pa-0 ma-0 ml-2",label:"Include grid positions (auto-includes printers)"},null,8,["modelValue"]),T[13]||(T[13]=E(" Include notes (for yourself): ",-1)),p(VD,{modelValue:Z(f),"onUpdate:modelValue":T[6]||(T[6]=x=>nt(f)?f.value=x:null),rows:"1"},null,8,["modelValue"])])),Z(m)?ve("",!0):($(),te(se,{key:2,onClick:T[7]||(T[7]=x=>b())},{default:v(()=>[p(ee,null,{default:v(()=>[...T[14]||(T[14]=[E("download",-1)])]),_:1}),T[15]||(T[15]=E(" Export YAML file ",-1))]),_:1})),Z(m)?($(),te(se,{key:3,disabled:!Z(g),onClick:T[8]||(T[8]=x=>S())},{default:v(()=>[p(ee,null,{default:v(()=>[...T[16]||(T[16]=[E("upload",-1)])]),_:1}),T[17]||(T[17]=E(" Import YAML data ",-1))]),_:1},8,["disabled"])):ve("",!0)])]),_:1}),p(zn,null,{default:v(()=>[T[20]||(T[20]=C("em",{class:"text-red"}," * indicates required field ",-1)),p(Pn),p(se,{variant:"text",onClick:T[9]||(T[9]=x=>_())},{default:v(()=>[...T[19]||(T[19]=[E(" Close ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),EK="/assets/octofarm-printer-export-Dw0Zh14I.gif",B1=Symbol.for("vuetify:v-stepper"),UD=ce({color:String,disabled:{type:[Boolean,String],default:!1},prevText:{type:String,default:"$vuetify.stepper.prev"},nextText:{type:String,default:"$vuetify.stepper.next"}},"VStepperActions"),CK=Ee()({name:"VStepperActions",props:UD(),emits:{"click:prev":()=>!0,"click:next":()=>!0},setup(e,t){let{emit:n,slots:r}=t;const{t:s}=ts();function i(){n("click:prev")}function o(){n("click:next")}return Me(()=>{const a={onClick:i},l={onClick:o};return C("div",{class:"v-stepper-actions"},[p(Ft,{defaults:{VBtn:{disabled:["prev",!0].includes(e.disabled),text:s(e.prevText),variant:"text"}}},{default:()=>{var u;return[((u=r.prev)==null?void 0:u.call(r,{props:a}))??p(se,a,null)]}}),p(Ft,{defaults:{VBtn:{color:e.color,disabled:["next",!0].includes(e.disabled),text:s(e.nextText),variant:"tonal"}}},{default:()=>{var u;return[((u=r.next)==null?void 0:u.call(r,{props:l}))??p(se,l,null)]}})])}),{}}}),V1=Ku("v-stepper-header"),TK=ce({color:String,title:String,subtitle:String,complete:Boolean,completeIcon:{type:He,default:"$complete"},editable:Boolean,editIcon:{type:He,default:"$edit"},error:Boolean,errorIcon:{type:He,default:"$error"},icon:He,ripple:{type:[Boolean,Object],default:!0},rules:{type:Array,default:()=>[]}},"StepperItem"),RK=ce({...TK(),...nf()},"VStepperItem"),Uh=Ee()({name:"VStepperItem",directives:{vRipple:Us},props:RK(),emits:{"group:selected":e=>!0},setup(e,t){let{slots:n}=t;const r=xu(e,B1,!0),s=D(()=>(r==null?void 0:r.value.value)??e.value),i=D(()=>e.rules.every(f=>f()===!0)),o=D(()=>!e.disabled&&e.editable),a=D(()=>!e.disabled&&e.editable),l=D(()=>e.error||!i.value),u=D(()=>e.complete||e.rules.length>0&&i.value),c=D(()=>l.value?e.errorIcon:u.value?e.completeIcon:r.isSelected.value&&e.editable?e.editIcon:e.icon),d=D(()=>({canEdit:a.value,hasError:l.value,hasCompleted:u.value,title:e.title,subtitle:e.subtitle,step:s.value,value:e.value}));return Me(()=>{var y,w,b;const f=(!r||r.isSelected.value||u.value||a.value)&&!l.value&&!e.disabled,h=!!(e.title!=null||n.title),g=!!(e.subtitle!=null||n.subtitle);function m(){r==null||r.toggle()}return zt(C("button",{class:Oe(["v-stepper-item",{"v-stepper-item--complete":u.value,"v-stepper-item--disabled":e.disabled,"v-stepper-item--error":l.value},r==null?void 0:r.selectedClass.value]),disabled:!e.editable,type:"button",onClick:m},[o.value&&ra(!0,"v-stepper-item"),p(dt,{key:"stepper-avatar",class:"v-stepper-item__avatar",color:f?e.color:void 0,size:24},{default:()=>{var S;return[((S=n.icon)==null?void 0:S.call(n,d.value))??(c.value?p(ee,{icon:c.value},null):s.value)]}}),C("div",{class:"v-stepper-item__content"},[h&&C("div",{key:"title",class:"v-stepper-item__title"},[((y=n.title)==null?void 0:y.call(n,d.value))??e.title]),g&&C("div",{key:"subtitle",class:"v-stepper-item__subtitle"},[((w=n.subtitle)==null?void 0:w.call(n,d.value))??e.subtitle]),(b=n.default)==null?void 0:b.call(n,d.value)])]),[[Us,e.editable&&e.ripple,null]])}),{}}}),PK=e=>{const{touchstartX:t,touchendX:n,touchstartY:r,touchendY:s}=e,i=.5,o=16;e.offsetX=n-t,e.offsetY=s-r,Math.abs(e.offsetY)<i*Math.abs(e.offsetX)&&(e.left&&n<t-o&&e.left(e),e.right&&n>t+o&&e.right(e)),Math.abs(e.offsetX)<i*Math.abs(e.offsetY)&&(e.up&&s<r-o&&e.up(e),e.down&&s>r+o&&e.down(e))};function IK(e,t){var r;const n=e.changedTouches[0];t.touchstartX=n.clientX,t.touchstartY=n.clientY,(r=t.start)==null||r.call(t,{originalEvent:e,...t})}function AK(e,t){var r;const n=e.changedTouches[0];t.touchendX=n.clientX,t.touchendY=n.clientY,(r=t.end)==null||r.call(t,{originalEvent:e,...t}),PK(t)}function OK(e,t){var r;const n=e.changedTouches[0];t.touchmoveX=n.clientX,t.touchmoveY=n.clientY,(r=t.move)==null||r.call(t,{originalEvent:e,...t})}function DK(){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=>IK(n,t),touchend:n=>AK(n,t),touchmove:n=>OK(n,t)}}function MK(e,t){var a;const n=t.value,r=n!=null&&n.parent?e.parentElement:e,s=(n==null?void 0:n.options)??{passive:!0},i=(a=t.instance)==null?void 0:a.$.uid;if(!r||i===void 0)return;const o=DK(t.value);r._touchHandlers=r._touchHandlers??Object.create(null),r._touchHandlers[i]=o,NR(o).forEach(l=>{r.addEventListener(l,o[l],s)})}function LK(e,t){var i,o;const n=(i=t.value)!=null&&i.parent?e.parentElement:e,r=(o=t.instance)==null?void 0:o.$.uid;if(!(n!=null&&n._touchHandlers)||r===void 0)return;const s=n._touchHandlers[r];NR(s).forEach(a=>{n.removeEventListener(a,s[a])}),delete n._touchHandlers[r]}const ib={mounted:MK,unmounted:LK},zD=Symbol.for("vuetify:v-window"),HD=Symbol.for("vuetify:v-window-group"),jD=ce({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,...Ge(),...gt(),...Nt()},"VWindow"),Ex=Ee()({name:"VWindow",directives:{vTouch:ib},props:jD(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{themeClasses:r}=nn(e),{isRtl:s}=Wr(),{t:i}=ts(),o=Yu(e,HD),a=G(),l=D(()=>s.value?!e.reverse:e.reverse),u=Ce(!1),c=D(()=>{if(e.crossfade)return"v-window-crossfade-transition";const _=e.direction==="vertical"?"y":"x",T=(l.value?!u.value:u.value)?"-reverse":"";return`v-window-${_}${T}-transition`}),d=Ce(0),f=G(void 0),h=D(()=>o.items.value.findIndex(_=>o.selected.value.includes(_.id)));xe(h,(_,k)=>{let T;const R={left:0,top:0};Ot&&k>=0&&(T=S0(a.value),R.left=T==null?void 0:T.scrollLeft,R.top=T==null?void 0:T.scrollTop);const x=o.items.value.length,I=x-1;x<=2?u.value=_<k:_===I&&k===0?u.value=!1:_===0&&k===I?u.value=!0:u.value=_<k,ht(()=>{if(!Ot||!T)return;T.scrollTop!==R.top&&T.scrollTo({...R,behavior:"instant"}),requestAnimationFrame(()=>{if(!T)return;T.scrollTop!==R.top&&T.scrollTo({...R,behavior:"instant"})})})},{flush:"sync"}),Jt(zD,{transition:c,isReversed:u,transitionCount:d,transitionHeight:f,rootRef:a});const g=ie(()=>e.continuous||h.value!==0),m=ie(()=>e.continuous||h.value!==o.items.value.length-1);function y(){g.value&&o.prev()}function w(){m.value&&o.next()}const b=D(()=>{const _=[],k={icon:s.value?e.nextIcon:e.prevIcon,class:`v-window__${l.value?"right":"left"}`,onClick:o.prev,"aria-label":i("$vuetify.carousel.prev")};_.push(g.value?n.prev?n.prev({props:k}):p(se,k,null):C("div",null,null));const T={icon:s.value?e.prevIcon:e.nextIcon,class:`v-window__${l.value?"left":"right"}`,onClick:o.next,"aria-label":i("$vuetify.carousel.next")};return _.push(m.value?n.next?n.next({props:T}):p(se,T,null):C("div",null,null)),_}),S=D(()=>e.touch===!1?e.touch:{...{left:()=>{l.value?y():w()},right:()=>{l.value?w():y()},start:k=>{let{originalEvent:T}=k;T.stopPropagation()}},...e.touch===!0?{}:e.touch});return Me(()=>zt(p(e.tag,{ref:a,class:Oe(["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:Be([e.style,{"--v-window-transition-duration":il()?null:Le(e.transitionDuration,"ms")}])},{default:()=>{var _,k;return[C("div",{class:"v-window__container",style:{height:f.value}},[(_=n.default)==null?void 0:_.call(n,{group:o}),e.showArrows!==!1&&C("div",{class:Oe(["v-window__controls",{"v-window__controls--left":e.verticalArrows==="left"||e.verticalArrows===!0},{"v-window__controls--right":e.verticalArrows==="right"}])},[b.value])]),(k=n.additional)==null?void 0:k.call(n,{group:o})]}}),[[ib,S.value]])),{group:o}}}),FK=ce({...In(jD(),["continuous","nextIcon","prevIcon","showArrows","touch","mandatory"])},"VStepperWindow"),WD=Ee()({name:"VStepperWindow",props:FK(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=Xe(B1,null),s=lt(e,"modelValue"),i=D({get(){var o;return s.value!=null||!r?s.value:(o=r.items.value.find(a=>r.selected.value.includes(a.id)))==null?void 0:o.value},set(o){s.value=o}});return Me(()=>{const o=Ex.filterProps(e);return p(Ex,ge({_as:"VStepperWindow"},o,{modelValue:i.value,"onUpdate:modelValue":a=>i.value=a,class:["v-stepper-window",e.class],style:e.style,mandatory:!1,touch:!1}),n)}),{}}}),qD=ce({reverseTransition:{type:[Boolean,String],default:void 0},transition:{type:[Boolean,String],default:void 0},...Ge(),...nf(),...PP()},"VWindowItem"),Cx=Ee()({name:"VWindowItem",directives:{vTouch:ib},props:qD(),emits:{"group:selected":e=>!0},setup(e,t){let{slots:n}=t;const r=Xe(zD),s=xu(e,HD),{isBooted:i}=kf();if(!r||!s)throw new Error("[Vuetify] VWindowItem must be used inside VWindow");const o=Ce(!1),a=D(()=>i.value&&(r.isReversed.value?e.reverseTransition!==!1:e.transition!==!1));function l(){!o.value||!r||(o.value=!1,r.transitionCount.value>0&&(r.transitionCount.value-=1,r.transitionCount.value===0&&(r.transitionHeight.value=void 0)))}function u(){var g;o.value||!r||(o.value=!0,r.transitionCount.value===0&&(r.transitionHeight.value=Le((g=r.rootRef.value)==null?void 0:g.clientHeight)),r.transitionCount.value+=1)}function c(){l()}function d(g){o.value&&ht(()=>{!a.value||!o.value||!r||(r.transitionHeight.value=Le(g.clientHeight))})}const f=D(()=>{const g=r.isReversed.value?e.reverseTransition:e.transition;return a.value?{name:typeof g!="string"?r.transition.value:g,onBeforeEnter:u,onAfterEnter:l,onEnterCancelled:c,onBeforeLeave:u,onAfterLeave:l,onLeaveCancelled:c,onEnter:d}:!1}),{hasContent:h}=IP(e,s.isSelected);return Me(()=>p(hi,{transition:f.value,disabled:!i.value},{default:()=>{var g;return[zt(C("div",{class:Oe(["v-window-item",s.selectedClass.value,e.class]),style:Be(e.style)},[h.value&&((g=n.default)==null?void 0:g.call(n))]),[[uo,s.isSelected.value]])]}})),{groupItem:s}}}),$K=ce({...qD()},"VStepperWindowItem"),zh=Ee()({name:"VStepperWindowItem",props:$K(),setup(e,t){let{slots:n}=t;return Me(()=>{const r=Cx.filterProps(e);return p(Cx,ge({_as:"VStepperWindowItem"},r,{class:["v-stepper-window-item",e.class],style:e.style}),n)}),{}}}),GD=ce({color:String,...xs(),...Ge(),...xr(),...Cs(),...sa(),...Qu(),...Hn(),...gt(),...Nt()},"VSheet"),Fd=Ee()({name:"VSheet",props:GD(),setup(e,t){let{slots:n}=t;const{themeClasses:r}=nn(e),{backgroundColorClasses:s,backgroundColorStyles:i}=wr(()=>e.color),{borderClasses:o}=Hs(e),{dimensionStyles:a}=Er(e),{elevationClasses:l}=js(e),{locationStyles:u}=wl(e),{positionClasses:c}=Ju(e),{roundedClasses:d}=Zn(e);return Me(()=>p(e.tag,{class:Oe(["v-sheet",r.value,s.value,o.value,l.value,c.value,d.value,e.class]),style:Be([i.value,a.value,u.value,e.style])},n)),{}}}),NK=ce({altLabels:Boolean,bgColor:String,completeIcon:He,editIcon:He,editable:Boolean,errorIcon:He,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,...Sl()},"Stepper"),BK=ce({...NK(),...tf({mandatory:"force",selectedClass:"v-stepper-item--selected"}),...GD(),...Go(UD(),["prevText","nextText"])},"VStepper"),KD=Ee()({name:"VStepper",props:BK(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{items:r,next:s,prev:i,selected:o}=Yu(e,B1),{displayClasses:a,mobile:l}=qs(e),{completeIcon:u,editIcon:c,errorIcon:d,color:f,editable:h,prevText:g,nextText:m}=vl(e),y=D(()=>e.items.map((S,_)=>{const k=Mn(S,e.itemTitle,S),T=Mn(S,e.itemValue,_+1),R=e.itemProps===!0?S:Mn(S,e.itemProps),x={title:k,value:T,...R};return{title:x.title,value:x.value,props:x,raw:S}})),w=D(()=>r.value.findIndex(S=>o.value.includes(S.id))),b=D(()=>e.disabled?e.disabled:w.value===0?"prev":w.value===r.value.length-1?"next":!1);return zr({VStepperItem:{editable:h,errorIcon:d,completeIcon:u,editIcon:c,prevText:g,nextText:m},VStepperActions:{color:f,disabled:b,prevText:g,nextText:m}}),Me(()=>{const S=Fd.filterProps(e),_=!!(n.header||e.items.length),k=e.items.length>0,T=!e.hideActions&&!!(k||n.actions);return p(Fd,ge(S,{color:e.bgColor,class:["v-stepper",{"v-stepper--alt-labels":e.altLabels,"v-stepper--flat":e.flat,"v-stepper--non-linear":e.nonLinear,"v-stepper--mobile":l.value},a.value,e.class],style:e.style}),{default:()=>{var R,x;return[_&&p(V1,{key:"stepper-header"},{default:()=>[y.value.map((I,P)=>{let{raw:A,...L}=I;return C(De,null,[!!P&&p(cn,null,null),p(Uh,L.props,{default:n[`header-item.${L.value}`]??n.header,icon:n.icon,title:n.title,subtitle:n.subtitle})])})]}),k&&p(WD,{key:"stepper-window"},{default:()=>[y.value.map(I=>p(zh,{value:I.value},{default:()=>{var P,A;return((P=n[`item.${I.value}`])==null?void 0:P.call(n,I))??((A=n.item)==null?void 0:A.call(n,I))}}))]}),(R=n.default)==null?void 0:R.call(n,{prev:i,next:s}),T&&(((x=n.actions)==null?void 0:x.call(n,{next:s,prev:i}))??p(CK,{key:"stepper-actions","onClick:prev":i,"onClick:next":s},n))]}})}),{prev:i,next:s}}}),VK={class:"my-3"},UK={key:0},zK={key:1},HK={class:"my-2"},jK={key:0},WK={class:"mr-4"},qK={class:"mr-4"},GK={class:"mr-4"},KK={class:"my-3"},YK={key:0,class:"mb-5 mt-10"},XK={key:1},QK={class:"ml-5 mt-2"},JK={key:0,class:"ml-5 mt-2"},ZK=Ve({__name:"OctoFarmImportDialog",setup(e){const t=G(),n=G(!1),r=G(!1),s=G(""),i=G(""),o=G(),a=G(0),l=G([]),u=G([]),c=G(!1),d=sn(on.ImportOctoFarmDialog);function f(){}async function h(){}const g=async()=>{if(!o.value){n.value=!1;return}const _=JSON.parse(await o.value.text());if(!_||!Array.isArray(_))return[];if(!(_!=null&&_.length))return[];let k=_;_.length===1&&Array.isArray(_[0])&&(k=_[0]),k=k.map(x=>{var I,P;return x._id&&delete x._id,x.apikey&&(x.apiKey=x.apikey,delete x.apikey),x.settingsApperance&&(x.settingsAppearance=x.settingsApperance,delete x.settingsApperance),(I=x.settingsAppearance)!=null&&I.name?(x.name=(P=x.settingsAppearance)==null?void 0:P.name,delete x.settingsAppearance):x.name=x.printerURL,{enabled:!x.disabled,apiKey:x.apiKey,printerURL:x.printerURL,name:x.name}});let T=!1;const R=[];s.value="",i.value="";for(const x of k){const I=Object.keys(x);I.includes("enabled")&&(x.enabled===!1||x.enabled===!0)&&I.includes("apiKey")&&x.apiKey.length&&I.includes("printerURL")&&x.printerURL.length&&I.includes("name")&&x.name||(R.push(x.name||x.printerURL||"No name known for printer"),T||(T=!0))}return n.value=!T,T&&(s.value="Imported file failed the validation step",i.value="These printers failed validation: "+R.join(", ")),k},m=async()=>{const _=await g();_!=null&&_.length&&(u.value=[...Array(_.length)].map((k,T)=>T),l.value=_||[],t.value=2)},y=()=>{u.value.length?u.value=[]:u.value=[...Array(l.value.length)].map((k,T)=>T)},w=async()=>{var _;a.value=((_=await g())==null?void 0:_.length)||0},b=async()=>{t.value=3;const _=l.value.filter((k,T)=>u.value.includes(T));if(_!=null&&_.length)try{await tn.batchImportPrinters(_),c.value=!0}catch(k){c.value=!1,o.value=void 0,s.value="An error occurred",i.value=k.message.toString()}},S=()=>{o.value=void 0,d.closeDialog(),t.value=1};return(_,k)=>{const T=Vn("v-subheader"),R=Vn("v-list-item-content"),x=Vn("v-list-item-group"),I=Si;return $(),te(I,{id:Z(d).dialogId,"max-width":"700px",onBeforeOpened:k[8]||(k[8]=P=>void 0),onEscape:k[9]||(k[9]=P=>S()),onOpened:k[10]||(k[10]=P=>h())},{default:v(()=>[p(kt,{class:"pa-4"},{default:v(()=>[p(un,null,{default:v(()=>[...k[11]||(k[11]=[C("span",{class:"text-h5"}," Import OctoFarm Printers ",-1)])]),_:1}),p(rn,null,{default:v(()=>[p(st,null,{default:v(()=>[p(We,{cols:"12"},{default:v(()=>[p(KD,{modelValue:Z(t),"onUpdate:modelValue":k[6]||(k[6]=P=>nt(t)?t.value=P:null),"non-linear":""},{default:v(()=>[p(V1,null,{default:v(()=>[p(Uh,{complete:Z(t)>1,value:"1",editable:""},{default:v(()=>[...k[12]||(k[12]=[E(" Export PrintersDB from OctoFarm ",-1)])]),_:1},8,["complete"]),p(Uh,{complete:Z(t)>2,value:"2",editable:""},{default:v(()=>[...k[13]||(k[13]=[E(" Show printers & decide ",-1)])]),_:1},8,["complete"]),p(Uh,{complete:Z(t)>3,value:"3",editable:""},{default:v(()=>[...k[14]||(k[14]=[E(" Import printers into FDM Monster ",-1)])]),_:1},8,["complete"])]),_:1}),p(WD,null,{default:v(()=>[p(zh,{value:"1"},{default:v(()=>[p(ND,{class:"mt-2",style:{"max-width":"400px"},modelValue:Z(o),"onUpdate:modelValue":k[0]||(k[0]=P=>nt(o)?o.value=P:null),filled:"",accept:".json",clearable:"",label:"Upload PrintersDB.json file",onChange:k[1]||(k[1]=P=>w())},null,8,["modelValue"]),C("ol",null,[C("li",null,[C("h4",null,[p(ee,null,{default:v(()=>[...k[15]||(k[15]=[E("navigation",-1)])]),_:1}),k[16]||(k[16]=E(" Go to your OctoFarm System page ",-1))])]),C("li",null,[C("h4",null,[p(ee,null,{default:v(()=>[...k[17]||(k[17]=[E("mouse",-1)])]),_:1}),k[18]||(k[18]=E(" Click 'Database' ",-1))])]),C("li",null,[C("h4",null,[p(ee,null,{default:v(()=>[...k[19]||(k[19]=[E("mouse",-1)])]),_:1}),k[20]||(k[20]=E(" Click the button 'Export Printers' ",-1))])]),C("li",null,[C("h4",null,[p(ee,null,{default:v(()=>[...k[21]||(k[21]=[E("upload",-1)])]),_:1}),k[22]||(k[22]=E(" Upload 'PrintersDB.json' above ",-1))])])]),C("div",VK,[p(ee,{class:"pr-2"},{default:v(()=>[...k[23]||(k[23]=[E("info",-1)])]),_:1}),k[25]||(k[25]=E(' OctoFarm printers should be exported as a JSON file. Please upload the correct "PrintersDB.json" database file using the steps provided. ',-1)),p(se,{small:"",class:"ml-2",color:"success",onClick:k[2]||(k[2]=P=>r.value=!Z(r))},{default:v(()=>[p(ee,{class:"pr-2"},{default:v(()=>[...k[24]||(k[24]=[E("gif",-1)])]),_:1}),Z(r)?($(),ye("span",zK,"Hide GIF")):($(),ye("span",UK,"Show GIF"))]),_:1})]),Z(r)?($(),te(bs,{key:0,class:"my-4",src:Z(EK),style:{border:"3px solid dimgray","max-width":"800px"},elevation:"10"},null,8,["src"])):ve("",!0),k[27]||(k[27]=C("br",null,null,-1)),p(se,{color:"primary",onClick:k[3]||(k[3]=P=>m()),disabled:!Z(o)},{default:v(()=>[...k[26]||(k[26]=[E(" Validate ",-1)])]),_:1},8,["disabled"])]),_:1}),p(zh,{value:"2"},{default:v(()=>{var P;return[C("div",HK,[p(ee,{class:"pr-2"},{default:v(()=>[...k[28]||(k[28]=[E("info",-1)])]),_:1}),E(" Import state: "+ae(Z(n)?"success":"failed")+" - "+ae(Z(a))+" printer(s) found ",1)]),Z(s)?($(),te(yn,{key:0,class:"my-2",type:"error"},{default:v(()=>{var A,L;return[E(ae(Z(s))+" ",1),k[29]||(k[29]=C("br",null,null,-1)),E(" Details: "+ae((A=Z(i))==null?void 0:A.slice(0,75))+" ",1),((L=Z(i))==null?void 0:L.length)>75?($(),ye("span",jK,"...")):ve("",!0)]}),_:1})):ve("",!0),p(cn,{class:"mt-2"}),p(Ht,{"two-line":"",flat:"",subheader:"",dense:"",class:"mt-2"},{default:v(()=>[p(T,null,{default:v(()=>[...k[30]||(k[30]=[E("Found printers",-1)])]),_:1}),p(x,{modelValue:Z(u),"onUpdate:modelValue":k[4]||(k[4]=A=>nt(u)?u.value=A:null),multiple:""},{default:v(()=>[($(!0),ye(De,null,Zt(Z(l),A=>($(),te(ze,{dense:"",key:A.name,title:A.name},{default:v(({isActive:L})=>[p(Nu,null,{default:v(()=>[p(wn,{"input-value":L},null,8,["input-value"])]),_:2},1024),p(R,null,{default:v(()=>[p(ft,null,{default:v(()=>[E(ae(A.name),1)]),_:2},1024),p(_t,null,{default:v(()=>[C("span",WK,"URL: "+ae(A.printerURL),1),C("span",qK,"Enabled: "+ae(A.enabled),1),C("span",GK,"API Key: "+ae(A.apiKey),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["title"]))),128))]),_:1},8,["modelValue"]),p(T,null,{default:v(()=>[p(se,{onClick:y,class:"my-2",small:""},{default:v(()=>[p(ee,{class:"mr-2"},{default:v(()=>[...k[31]||(k[31]=[E("check",-1)])]),_:1}),k[32]||(k[32]=E(" Toggle selection ",-1))]),_:1})]),_:1})]),_:1}),C("div",KK,[p(ee,{class:"pr-2"},{default:v(()=>[...k[33]||(k[33]=[E("info",-1)])]),_:1}),k[34]||(k[34]=E(" At this moment, the following properties will be imported: enabled, name, printerURL and apiKey ",-1))]),p(se,{class:"my-2",color:"primary",onClick:k[5]||(k[5]=A=>b()),disabled:!((P=Z(u))!=null&&P.length)},{default:v(()=>{var A;return[E(" Submit "+ae((A=Z(u))==null?void 0:A.length)+" printers ",1)]}),_:1},8,["disabled"])]}),_:1}),p(zh,{value:"3"},{default:v(()=>{var P,A;return[Z(c)?($(),ye("div",YK,[p(ee,{size:"100",class:"mr-5",color:"green circle"},{default:v(()=>[...k[35]||(k[35]=[E("check_circle",-1)])]),_:1}),k[36]||(k[36]=E(" Import Completed ",-1))])):($(),ye("div",XK,[p(ee,{size:"100",class:"mr-5",color:"red circle"},{default:v(()=>[...k[37]||(k[37]=[E("error",-1)])]),_:1}),E(" Something went wrong: "+ae(Z(s))+" ",1),k[38]||(k[38]=C("br",null,null,-1)),C("span",QK," Details: "+ae((P=Z(i))==null?void 0:P.slice(0,75)),1),((A=Z(i))==null?void 0:A.length)>75?($(),ye("span",JK,"...")):ve("",!0)]))]}),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1}),p(se,{class:"mt-2"},{default:v(()=>[...k[39]||(k[39]=[E(" Validate printers ",-1)])]),_:1})]),_:1}),p(zn,null,{default:v(()=>[p(Pn),p(se,{onClick:k[7]||(k[7]=P=>S())},{default:v(()=>[p(ee,{class:"mr-2"},{default:v(()=>[...k[40]||(k[40]=[E("close",-1)])]),_:1}),k[41]||(k[41]=E(" Close ",-1))]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),eY=ce({id:String,submenu:Boolean,...In(of({captureFocus:!0,closeDelay:250,closeOnContentClick:!0,locationStrategy:"connected",location:void 0,openDelay:300,scrim:!1,scrollStrategy:"reposition",transition:{component:E0}}),["absolute"])},"VMenu"),Qm=Ee()({name:"VMenu",props:eY(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=lt(e,"modelValue"),{scopeId:s}=Zu(),{isRtl:i}=Wr(),o=jr(),a=ie(()=>e.id||`v-menu-${o}`),l=G(),u=Xe(gy,null),c=Ce(new Set);Jt(gy,{register(){c.value.add(o)},unregister(){c.value.delete(o)},closeParents(m){setTimeout(()=>{var y;!c.value.size&&!e.persistent&&(m==null||(y=l.value)!=null&&y.contentEl&&!iN(m,l.value.contentEl))&&(r.value=!1,u==null||u.closeParents())},40)}}),Qn(()=>u==null?void 0:u.unregister()),r0(()=>r.value=!1),xe(r,m=>{m?u==null||u.register():u==null||u.unregister()},{immediate:!0});function d(m){u==null||u.closeParents(m)}function f(m){var y,w,b,S,_;if(!e.disabled)if(m.key==="Tab"||m.key==="Enter"&&!e.closeOnContentClick){if(m.key==="Enter"&&(m.target instanceof HTMLTextAreaElement||m.target instanceof HTMLInputElement&&m.target.closest("form")))return;m.key==="Enter"&&m.preventDefault(),!HR(qa((y=l.value)==null?void 0:y.contentEl,!1),m.shiftKey?"prev":"next",T=>T.tabIndex>=0)&&!e.retainFocus&&(r.value=!1,(b=(w=l.value)==null?void 0:w.activatorEl)==null||b.focus())}else e.submenu&&m.key===(i.value?"ArrowRight":"ArrowLeft")&&(r.value=!1,(_=(S=l.value)==null?void 0:S.activatorEl)==null||_.focus())}function h(m){var w;if(e.disabled)return;const y=(w=l.value)==null?void 0:w.contentEl;y&&r.value?m.key==="ArrowDown"?(m.preventDefault(),m.stopImmediatePropagation(),Zc(y,"next")):m.key==="ArrowUp"?(m.preventDefault(),m.stopImmediatePropagation(),Zc(y,"prev")):e.submenu&&(m.key===(i.value?"ArrowRight":"ArrowLeft")?r.value=!1:m.key===(i.value?"ArrowLeft":"ArrowRight")&&(m.preventDefault(),Zc(y,"first"))):(e.submenu?m.key===(i.value?"ArrowLeft":"ArrowRight"):["ArrowDown","ArrowUp"].includes(m.key))&&(r.value=!0,m.preventDefault(),setTimeout(()=>setTimeout(()=>h(m))))}const g=D(()=>ge({"aria-haspopup":"menu","aria-expanded":String(r.value),"aria-controls":a.value,"aria-owns":a.value,onKeydown:h},e.activatorProps));return Me(()=>{const m=to.filterProps(e);return p(to,ge({ref:l,id:a.value,class:["v-menu",e.class],style:e.style},m,{modelValue:r.value,"onUpdate:modelValue":y=>r.value=y,absolute:!0,activatorProps:g.value,location:e.location??(e.submenu?"end":"bottom"),"onClick:outside":d,onKeydown:f},s),{activator:n.activator,default:function(){for(var y=arguments.length,w=new Array(y),b=0;b<y;b++)w[b]=arguments[b];return p(Ft,{root:"VMenu"},{default:()=>{var S;return[(S=n.default)==null?void 0:S.call(n,...w)]}})}})}),Ts({id:a,ΨopenChildren:c},l)}}),tY=ce({renderless:Boolean,...Ge()},"VVirtualScrollItem"),nY=Ee()({name:"VVirtualScrollItem",inheritAttrs:!1,props:tY(),emits:{"update:height":e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const{resizeRef:i,contentRect:o}=Yo(void 0,"border");xe(()=>{var a;return(a=o.value)==null?void 0:a.height},a=>{a!=null&&r("update:height",a)}),Me(()=>{var a,l;return e.renderless?C(De,null,[(a=s.default)==null?void 0:a.call(s,{itemRef:i})]):C("div",ge({ref:i,class:["v-virtual-scroll__item",e.class],style:e.style},n),[(l=s.default)==null?void 0:l.call(s)])})}}),rY=-1,sY=1,hv=100,iY=ce({itemHeight:{type:[Number,String],default:null},itemKey:{type:[String,Array,Function],default:null},height:[Number,String]},"virtual");function oY(e,t){const n=qs(),r=Ce(0);Rn(()=>{r.value=parseFloat(e.itemHeight||0)});const s=Ce(0),i=Ce(Math.ceil((parseInt(e.height)||n.height.value)/(r.value||16))||1),o=Ce(0),a=Ce(0),l=G(),u=G();let c=0;const{resizeRef:d,contentRect:f}=Yo();Rn(()=>{d.value=l.value});const h=D(()=>{var M;return l.value===document.documentElement?n.height.value:((M=f.value)==null?void 0:M.height)||parseInt(e.height)||0}),g=D(()=>!!(l.value&&u.value&&h.value&&r.value));let m=Array.from({length:t.value.length}),y=Array.from({length:t.value.length});const w=Ce(0);let b=-1;function S(M){return m[M]||r.value}const _=nN(()=>{const M=performance.now();y[0]=0;const re=t.value.length;for(let H=1;H<=re;H++)y[H]=(y[H-1]||0)+S(H-1);w.value=Math.max(w.value,performance.now()-M)},w),k=xe(g,M=>{M&&(k(),c=u.value.offsetTop,_.immediate(),W(),~b&&ht(()=>{Ot&&window.requestAnimationFrame(()=>{V(b),b=-1})}))});ln(()=>{_.clear()});function T(M,re){const H=m[M],j=r.value;r.value=j?Math.min(r.value,re):re,(H!==re||j!==r.value)&&(m[M]=re,_())}function R(M){M=Un(M,0,t.value.length);const re=Math.floor(M),H=M%1,j=re+1,pe=y[re]||0,J=y[j]||pe;return pe+(J-pe)*H}function x(M){return aY(y,M)}let I=0,P=0,A=0;xe(h,(M,re)=>{W(),M<re&&requestAnimationFrame(()=>{P=0,W()})});let L=-1;function B(){if(!l.value||!u.value)return;const M=l.value.scrollTop,re=performance.now();re-A>500?(P=Math.sign(M-I),c=u.value.offsetTop):P=M-I,I=M,A=re,window.clearTimeout(L),L=window.setTimeout(O,500),W()}function O(){!l.value||!u.value||(P=0,A=0,window.clearTimeout(L),W())}let F=-1;function W(){cancelAnimationFrame(F),F=requestAnimationFrame(X)}function X(){if(!l.value||!h.value||!r.value)return;const M=I-c,re=Math.sign(P),H=Math.max(0,M-hv),j=Un(x(H),0,t.value.length),pe=M+h.value+hv,J=Un(x(pe)+1,j+1,t.value.length);if((re!==rY||j<s.value)&&(re!==sY||J>i.value)){const we=R(s.value)-R(j),q=R(J)-R(i.value);Math.max(we,q)>hv?(s.value=j,i.value=J):(j<=0&&(s.value=j),J>=t.value.length&&(i.value=J))}o.value=R(s.value),a.value=R(t.value.length)-R(i.value)}function V(M){const re=R(M);!l.value||M&&!re?b=M:l.value.scrollTop=re}const z=D(()=>t.value.slice(s.value,i.value).map((M,re)=>{const H=re+s.value;return{raw:M,index:H,key:Mn(M,e.itemKey,H)}}));return xe(t,()=>{m=Array.from({length:t.value.length}),y=Array.from({length:t.value.length}),_.immediate(),W()},{deep:1}),{calculateVisibleItems:W,containerRef:l,markerRef:u,computedItems:z,paddingTop:o,paddingBottom:a,scrollToIndex:V,handleScroll:B,handleScrollend:O,handleItemResize:T}}function aY(e,t){let n=e.length-1,r=0,s=0,i=null,o=-1;if(e[n]<t)return n;for(;r<=n;)if(s=r+n>>1,i=e[s],i>t)n=s-1;else if(i<t)o=s,r=s+1;else return i===t?s:r;return o}const lY=ce({items:{type:Array,default:()=>[]},renderless:Boolean,...iY(),...Ge(),...xr()},"VVirtualScroll"),uY=Ee()({name:"VVirtualScroll",props:lY(),setup(e,t){let{slots:n}=t;const r=fn("VVirtualScroll"),{dimensionStyles:s}=Er(e),{calculateVisibleItems:i,containerRef:o,markerRef:a,handleScroll:l,handleScrollend:u,handleItemResize:c,scrollToIndex:d,paddingTop:f,paddingBottom:h,computedItems:g}=oY(e,ie(()=>e.items));return Nr(()=>e.renderless,()=>{function m(){var b,S;const w=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)?"addEventListener":"removeEventListener";o.value===document.documentElement?(document[w]("scroll",l,{passive:!0}),document[w]("scrollend",u)):((b=o.value)==null||b[w]("scroll",l,{passive:!0}),(S=o.value)==null||S[w]("scrollend",u))}xt(()=>{o.value=S0(r.vnode.el,!0),m(!0)}),ln(m)}),Me(()=>{const m=g.value.map(y=>p(nY,{key:y.key,renderless:e.renderless,"onUpdate:height":w=>c(y.index,w)},{default:w=>{var b;return(b=n.default)==null?void 0:b.call(n,{item:y.raw,index:y.index,...w})}}));return e.renderless?C(De,null,[C("div",{ref:a,class:"v-virtual-scroll__spacer",style:{paddingTop:Le(f.value)}},null),m,C("div",{class:"v-virtual-scroll__spacer",style:{paddingBottom:Le(h.value)}},null)]):C("div",{ref:o,class:Oe(["v-virtual-scroll",e.class]),onScrollPassive:l,onScrollend:u,style:Be([s.value,e.style])},[C("div",{ref:a,class:"v-virtual-scroll__container",style:{paddingTop:Le(f.value),paddingBottom:Le(h.value)}},[m])])}),{calculateVisibleItems:i,scrollToIndex:d}}});function cY(e,t){const n=Ce(!1);let r;function s(a){cancelAnimationFrame(r),n.value=!0,r=requestAnimationFrame(()=>{r=requestAnimationFrame(()=>{n.value=!1})})}async function i(){await new Promise(a=>requestAnimationFrame(a)),await new Promise(a=>requestAnimationFrame(a)),await new Promise(a=>requestAnimationFrame(a)),await new Promise(a=>{if(n.value){const l=xe(n,()=>{l(),a()})}else a()})}async function o(a){var c,d;if(a.key==="Tab"&&((c=t.value)==null||c.focus()),!["PageDown","PageUp","Home","End"].includes(a.key))return;const l=(d=e.value)==null?void 0:d.$el;if(!l)return;(a.key==="Home"||a.key==="End")&&l.scrollTo({top:a.key==="Home"?0:l.scrollHeight,behavior:"smooth"}),await i();const u=l.querySelectorAll(":scope > :not(.v-virtual-scroll__spacer)");if(a.key==="PageDown"||a.key==="Home"){const f=l.getBoundingClientRect().top;for(const h of u)if(h.getBoundingClientRect().top>=f){h.focus();break}}else{const f=l.getBoundingClientRect().bottom;for(const h of[...u].reverse())if(h.getBoundingClientRect().bottom<=f){h.focus();break}}}return{onScrollPassive:s,onKeydown:o}}const dY=ce({closeText:{type:String,default:"$vuetify.close"},openText:{type:String,default:"$vuetify.open"}},"autocomplete");function fY(e,t){const n=jr(),r=D(()=>`menu-${n}`),s=ie(()=>Qt(t)),i=ie(()=>r.value);return{menuId:r,ariaExpanded:s,ariaControls:i}}const hY=ce({chips:Boolean,closableChips:Boolean,eager:Boolean,hideNoData:Boolean,hideSelected:Boolean,listProps:{type:Object},menu:Boolean,menuIcon:{type:He,default:"$dropdown"},menuProps:{type:Object},multiple:Boolean,noDataText:{type:String,default:"$vuetify.noDataText"},openOnClear:Boolean,itemColor:String,noAutoScroll:Boolean,...dY(),...pD({itemChildren:!1})},"Select"),pY=ce({...hY(),...In(DD({modelValue:null,role:"combobox"}),["validationValue","dirty"]),...ec({transition:{component:E0}})},"VSelect"),ea=Ee()({name:"VSelect",props:pY(),emits:{"update:focused":e=>!0,"update:modelValue":e=>!0,"update:menu":e=>!0},setup(e,t){let{slots:n}=t;const{t:r}=ts(),s=G(),i=G(),o=G(),{items:a,transformIn:l,transformOut:u}=E7(e),c=lt(e,"modelValue",[],J=>l(J===null?[null]:Fn(J)),J=>{const we=u(J);return e.multiple?we:we[0]??null}),d=D(()=>typeof e.counterValue=="function"?e.counterValue(c.value):typeof e.counterValue=="number"?e.counterValue:c.value.length),f=ID(e),h=$1(e),g=D(()=>c.value.map(J=>J.value)),m=Ce(!1),y=ie(()=>e.closableChips&&!f.isReadonly.value&&!f.isDisabled.value),{InputIcon:w}=F1(e);let b="",S=0,_;const k=D(()=>e.hideSelected?a.value.filter(J=>!c.value.some(we=>(e.valueComparator||$r)(we,J))):a.value),T=D(()=>e.hideNoData&&!k.value.length||f.isReadonly.value||f.isDisabled.value),R=lt(e,"menu"),x=D({get:()=>R.value,set:J=>{var we;R.value&&!J&&((we=i.value)!=null&&we.ΨopenChildren.size)||J&&T.value||(R.value=J)}}),{menuId:I,ariaExpanded:P,ariaControls:A}=fY(e,x),L=D(()=>{var J;return{...e.menuProps,activatorProps:{...((J=e.menuProps)==null?void 0:J.activatorProps)||{},"aria-haspopup":"listbox"}}}),B=G(),O=cY(B,s);function F(J){e.openOnClear&&(x.value=!0)}function W(){T.value||(x.value=!x.value)}function X(J){AS(J)&&V(J)}function V(J){var U,Y,le;if(!J.key||f.isReadonly.value)return;if(["Enter"," ","ArrowDown","ArrowUp","Home","End"].includes(J.key)&&J.preventDefault(),["Enter","ArrowDown"," "].includes(J.key)&&(x.value=!0),["Escape","Tab"].includes(J.key)&&(x.value=!1),e.clearable&&J.key==="Backspace"){J.preventDefault(),c.value=[],F();return}J.key==="Home"?(U=B.value)==null||U.focus("first"):J.key==="End"&&((Y=B.value)==null||Y.focus("last"));const we=1e3;if(!AS(J))return;const q=performance.now();q-_>we&&(b="",S=0),b+=J.key.toLowerCase(),_=q;const he=k.value;function ne(){let oe=K();return oe||b.at(-1)===b.at(-2)&&(b=b.slice(0,-1),S++,oe=K(),oe)||(S=0,oe=K(),oe)?oe:(b=J.key.toLowerCase(),K())}function K(){for(let oe=S;oe<he.length;oe++){const me=he[oe];if(me.title.toLowerCase().startsWith(b))return[me,oe]}}const ke=ne();if(!ke)return;const[Re,N]=ke;S=N,(le=B.value)==null||le.focus(N),e.multiple||(c.value=[Re])}function z(J){let we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!J.props.disabled)if(e.multiple){const q=c.value.findIndex(ne=>(e.valueComparator||$r)(ne.value,J.value)),he=we??!~q;if(~q){const ne=he?[...c.value,J]:[...c.value];ne.splice(q,1),c.value=ne}else he&&(c.value=[...c.value,J])}else{const q=we!==!1;c.value=q?[J]:[],ht(()=>{x.value=!1})}}function M(J){var we;(we=B.value)!=null&&we.$el.contains(J.relatedTarget)||(x.value=!1)}function re(){var J;e.eager&&((J=o.value)==null||J.calculateVisibleItems())}function H(){var J;m.value&&((J=s.value)==null||J.focus())}function j(J){m.value=!0}function pe(J){if(J==null)c.value=[];else if(fp(s.value,":autofill")||fp(s.value,":-webkit-autofill")){const we=a.value.find(q=>q.title===J);we&&z(we)}else s.value&&(s.value.value="")}return xe(x,()=>{if(!e.hideSelected&&x.value&&c.value.length){const J=k.value.findIndex(we=>c.value.some(q=>(e.valueComparator||$r)(q.value,we.value)));Ot&&!e.noAutoScroll&&window.requestAnimationFrame(()=>{var we;J>=0&&((we=o.value)==null||we.scrollToIndex(J))})}}),xe(a,(J,we)=>{x.value||m.value&&e.hideNoData&&!we.length&&J.length&&(x.value=!0)}),Me(()=>{const J=!!(e.chips||n.chip),we=!!(!e.hideNoData||k.value.length||n["prepend-item"]||n["append-item"]||n["no-data"]),q=c.value.length>0,he=at.filterProps(e),ne=q||!m.value&&e.label&&!e.persistentPlaceholder?void 0:e.placeholder;return p(at,ge({ref:s},he,{modelValue:c.value.map(K=>K.props.title).join(", "),name:void 0,"onUpdate:modelValue":pe,focused:m.value,"onUpdate:focused":K=>m.value=K,validationValue:c.externalValue,counterValue:d.value,dirty:q,class:["v-select",{"v-select--active-menu":x.value,"v-select--chips":!!e.chips,[`v-select--${e.multiple?"multiple":"single"}`]:!0,"v-select--selected":c.value.length,"v-select--selection-slot":!!n.selection},e.class],style:e.style,inputmode:"none",placeholder:ne,"onClick:clear":F,"onMousedown:control":W,onBlur:M,onKeydown:V,"aria-expanded":P.value,"aria-controls":A.value}),{...n,default:K=>{let{id:ke}=K;return C(De,null,[C("select",{hidden:!0,multiple:e.multiple,name:h.fieldName.value},[a.value.map(Re=>C("option",{key:Re.value,value:Re.value,selected:g.value.includes(Re.value)},null))]),p(Qm,ge({id:I.value,ref:i,modelValue:x.value,"onUpdate:modelValue":Re=>x.value=Re,activator:"parent",contentClass:"v-select__content",disabled:T.value,eager:e.eager,maxHeight:310,openOnClick:!1,closeOnContentClick:!1,transition:e.transition,onAfterEnter:re,onAfterLeave:H},L.value),{default:()=>[we&&p(Ht,ge({ref:B,selected:g.value,selectStrategy:e.multiple?"independent":"single-independent",onMousedown:Re=>Re.preventDefault(),onKeydown:X,onFocusin:j,tabindex:"-1",selectable:!0,"aria-live":"polite","aria-labelledby":`${ke.value}-label`,"aria-multiselectable":e.multiple,color:e.itemColor??e.color},O,e.listProps),{default:()=>{var Re,N,U;return[(Re=n["prepend-item"])==null?void 0:Re.call(n),!k.value.length&&!e.hideNoData&&(((N=n["no-data"])==null?void 0:N.call(n))??p(ze,{key:"no-data",title:r(e.noDataText)},null)),p(uY,{ref:o,renderless:!0,items:k.value,itemKey:"value"},{default:Y=>{var _e,fe,Ne;let{item:le,index:oe,itemRef:me}=Y;const Pe=oN(le.props),be=ge(le.props,{ref:me,key:le.value,onClick:()=>z(le,null),"aria-posinset":oe+1,"aria-setsize":k.value.length});return le.type==="divider"?((_e=n.divider)==null?void 0:_e.call(n,{props:le.raw,index:oe}))??p(cn,ge(le.props,{key:`divider-${oe}`}),null):le.type==="subheader"?((fe=n.subheader)==null?void 0:fe.call(n,{props:le.raw,index:oe}))??p(Ur,ge(le.props,{key:`subheader-${oe}`}),null):((Ne=n.item)==null?void 0:Ne.call(n,{item:le,index:oe,props:be}))??p(ze,ge(be,{role:"option"}),{prepend:Ie=>{let{isSelected:Te}=Ie;return C(De,null,[e.multiple&&!e.hideSelected?p(hl,{key:le.value,modelValue:Te,ripple:!1,tabindex:"-1","aria-hidden":!0,onClick:Ke=>Ke.preventDefault()},null):void 0,Pe.prependAvatar&&p(dt,{image:Pe.prependAvatar},null),Pe.prependIcon&&p(ee,{icon:Pe.prependIcon},null)])}})}}),(U=n["append-item"])==null?void 0:U.call(n)]}})]}),c.value.map((Re,N)=>{function U(me){me.stopPropagation(),me.preventDefault(),z(Re,!1)}const Y=ge(Cn.filterProps(Re.props),{"onClick:close":U,onKeydown(me){me.key!=="Enter"&&me.key!==" "||(me.preventDefault(),me.stopPropagation(),U(me))},onMousedown(me){me.preventDefault(),me.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0}),le=J?!!n.chip:!!n.selection,oe=le?jR(J?n.chip({item:Re,index:N,props:Y}):n.selection({item:Re,index:N})):void 0;if(!(le&&!oe))return C("div",{key:Re.value,class:"v-select__selection"},[J?n.chip?p(Ft,{key:"chip-defaults",defaults:{VChip:{closable:y.value,size:"small",text:Re.title}}},{default:()=>[oe]}):p(Cn,ge({key:"chip",closable:y.value,size:"small",text:Re.title,disabled:Re.props.disabled},Y),null):oe??C("span",{class:"v-select__selection-text"},[Re.title,e.multiple&&N<c.value.length-1&&C("span",{class:"v-select__selection-comma"},[E(",")])])])})])},"append-inner":function(){var N,U;for(var K=arguments.length,ke=new Array(K),Re=0;Re<K;Re++)ke[Re]=arguments[Re];return C(De,null,[(N=n["append-inner"])==null?void 0:N.call(n,...ke),e.menuIcon?p(ee,{class:"v-select__menu-icon",color:(U=s.value)==null?void 0:U.fieldIconColor,icon:e.menuIcon,"aria-hidden":!0},null):void 0,e.appendInnerIcon&&p(w,{key:"append-icon",name:"appendInner",color:ke[0].iconColor.value},null)])}})}),Ts({isFocused:m,menu:x,select:z},s)}}),mY={class:"text-h5"},gY=Ve({__name:"PrinterMaintenanceDialog",setup(e){const t=G([]),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=G({}),s=Xt(),i=sn(on.PrinterMaintenanceDialog),o=D(()=>s.maintenanceDialogPrinter),a=()=>{r.value.disabledReason=t.value.join(", ")},l=async()=>{var f;const c=(f=o.value)==null?void 0:f.id;if(!c){r.value={},u();return}const d=r.value.disabledReason;await tn.updatePrinterMaintenance(c,d),r.value={},u()},u=()=>{t.value=[],i.closeDialog(),s.setMaintenanceDialogPrinter()};return(c,d)=>{const f=Si;return $(),te(f,{id:Z(i).dialogId,"max-width":"700px",onEscape:d[5]||(d[5]=h=>u())},{default:v(()=>[p(kt,{class:"pa-4"},{default:v(()=>[p(un,null,{default:v(()=>{var h;return[C("span",mY," Mark '"+ae((h=o.value)==null?void 0:h.name)+"' for maintenance ",1)]}),_:1}),p(yn,{color:"secondary"},{default:v(()=>[...d[6]||(d[6]=[E(" Keep this info clear and stick to convention ",-1)])]),_:1}),p(rn,null,{default:v(()=>[p(st,null,{default:v(()=>[p(We,{cols:"12"},{default:v(()=>[p(ea,{modelValue:t.value,"onUpdate:modelValue":[d[0]||(d[0]=h=>t.value=h),d[1]||(d[1]=h=>a())],chips:!0,items:n,"menu-props":{closeOnBack:!0,closeOnContentClick:!0},clearable:"",color:"primary",multiple:"",placeholder:"Quick select reason"},null,8,["modelValue"]),p(VD,{modelValue:r.value.disabledReason,"onUpdate:modelValue":d[2]||(d[2]=h=>r.value.disabledReason=h),"data-vv-validate-on":"change|blur"},{label:v(()=>[...d[7]||(d[7]=[C("div",null,"Type the reason*",-1)])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),p(zn,null,{default:v(()=>[d[10]||(d[10]=C("em",{class:"text-red"}," * indicates required field ",-1)),p(Pn),p(se,{variant:"text",onClick:d[3]||(d[3]=h=>u())},{default:v(()=>[...d[8]||(d[8]=[E(" Close ",-1)])]),_:1}),p(se,{color:"blue-darken-1",variant:"text",onClick:d[4]||(d[4]=h=>l())},{default:v(()=>[...d[9]||(d[9]=[E(" Save ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),vY=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],yY=[1,2,3,4,5,6,7,8,9,10,11,12],YD=Ve({__name:"GridSettingsList",setup(e){const t=Ks(),n=$t(),r=D(()=>t.largeTiles),s=D(()=>t.preferCancelOverQuickStop);async function i(u){if(u)return l(u,t.gridRows)}async function o(u){if(u)return l(t.gridCols,u)}async function a(){return l(t.gridCols,t.gridRows)}async function l(u,c){await t.updateFrontendSettings({gridCols:c,gridRows:u,largeTiles:r.value,tilePreferCancelOverQuickStop:s.value}),n.info("Grid settings updated")}return(u,c)=>($(),ye("div",null,[p(rn,null,{default:v(()=>[p(Ht,{subheader:"",lines:"three"},{default:v(()=>{var d;return[p(Ur,null,{default:v(()=>[...c[2]||(c[2]=[E(" Grid Rows and Columns ",-1)])]),_:1}),(d=Z(t).settings)!=null&&d.frontend?($(),te(ze,{key:0},{default:v(()=>[p(st,null,{default:v(()=>[p(We,{cols:"3"},{default:v(()=>[p(ea,{type:"number","onUpdate:modelValue":o,value:Z(t).settings.frontend.gridRows,items:Z(vY),label:"Set the grid rows"},null,8,["value","items"])]),_:1}),p(We,{cols:"3"},{default:v(()=>[p(ea,{type:"number","onUpdate:modelValue":i,value:Z(t).settings.frontend.gridCols,items:Z(yY),label:"Set the grid columns"},null,8,["value","items"])]),_:1})]),_:1})]),_:1})):ve("",!0)]}),_:1}),p(cn),p(Ht,{subheader:"",lines:"three"},{default:v(()=>[p(Ur,null,{default:v(()=>[...c[3]||(c[3]=[E(" Large or Compact Tiles ",-1)])]),_:1}),p(ze,null,{default:v(()=>{var d;return[(d=Z(t).settings)!=null&&d.frontend?($(),te(st,{key:0},{default:v(()=>[p(We,{cols:"5"},{default:v(()=>[p(wn,{onChange:a,modelValue:Z(t).settings.frontend.largeTiles,"onUpdate:modelValue":c[0]||(c[0]=f=>Z(t).settings.frontend.largeTiles=f),label:"Large tiles"},null,8,["modelValue"])]),_:1})]),_:1})):ve("",!0)]}),_:1})]),_:1}),p(cn),p(Ht,{subheader:"","three-line":""},{default:v(()=>[p(Ur,null,{default:v(()=>[...c[4]||(c[4]=[E("Large or Compact Tiles",-1)])]),_:1}),p(ze,null,{default:v(()=>{var d;return[(d=Z(t).settings)!=null&&d.frontend?($(),te(st,{key:0},{default:v(()=>[p(We,{cols:"5"},{default:v(()=>[p(wn,{onChange:a,modelValue:Z(t).settings.frontend.tilePreferCancelOverQuickStop,"onUpdate:modelValue":c[1]||(c[1]=f=>Z(t).settings.frontend.tilePreferCancelOverQuickStop=f),label:"Print tile - show cancel instead of quick stop"},null,8,["modelValue"])]),_:1})]),_:1})):ve("",!0)]}),_:1})]),_:1})]),_:1})]))}}),bY={class:"text-h5"},wY=Ve({__name:"GridSettingsDialog",setup(e){const t=sn(on.GridSettingsDialog);function n(){t.closeDialog(t.context())}return(r,s)=>{const i=Si;return $(),te(i,{id:Z(t).dialogId,"max-width":"1000px",onEscape:s[1]||(s[1]=o=>n())},{default:v(()=>[p(kt,{class:"pa-4"},{default:v(()=>[p(un,null,{default:v(()=>[C("span",bY,[s[4]||(s[4]=E(" Grid Settings ",-1)),p(ot,{top:""},{activator:v(({props:o})=>[p(se,ge(o,{class:"ma-2",fab:"","x-small":""}),{default:v(()=>[p(ee,null,{default:v(()=>[...s[2]||(s[2]=[E("question_mark",-1)])]),_:1})]),_:1},16)]),default:v(()=>[...s[3]||(s[3]=[E(" Change your grid rows, columns and tile settings. ",-1)])]),_:1})])]),_:1}),p(YD),p(zn,null,{default:v(()=>[p(Pn),p(se,{onClick:s[0]||(s[0]=o=>Z(t).closeDialog())},{default:v(()=>[...s[5]||(s[5]=[E("Close",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}});class us extends Cr{static async createUser(t){const n=$e.userRoute;return await this.post(n,t)}static async listUsers(){const t=$e.userRoute;return await this.get(t)}static async listRoles(){const t=$e.rolesRoute;return await this.get(t)}static async getProfile(){const t=$e.userProfileRoute;return await this.get(t)}static async changePassword(t,n,r){const s=$e.userChangePasswordRoute(t);return await this.post(s,{oldPassword:n,newPassword:r})}static async changeUsername(t,n){const r=$e.userChangeUsernameRoute(t);return await this.post(r,{username:n})}static async deleteUser(t){const n=$e.userDeleteRoute(t);return await this.delete(n)}static async setUserVerified(t,n){const r=$e.userSetVerifiedRoute(t);return await this.post(r,{isVerified:n})}static async setRootUser(t,n){const r=$e.userSetRootUserRoute(t);return await this.post(r,{isRootUser:n})}static async setUserRoles(t,n){const r=$e.userSetUserRolesRoute(t);return await this.post(r,{roleIds:n})}}const SY={class:"text-h5"},_Y={class:"pl-5"},kY=Ve({__name:"CreateUserDialog",setup(e){const t=sn(on.CreateUserDialog),n=Xe("appConstants"),r=$t(),s=G({username:"",password:"",roleIds:[]}),i=G(""),o=G([]),a=D(()=>{var f,h;return(h=(f=s.value)==null?void 0:f.username)!=null&&h.length?Wm(s.value.username):"??"}),l={required:f=>!!f||"Required field",minLength:f=>f.length>=n.minUsernameLength||`Minimum ${n.minUsernameLength} characters`,password:f=>f.length>=8?!0:"Password must be at least 8 characters",passwordMatch:f=>f===s.value.password||"Passwords must match"},u=()=>!s.value.username||s.value.username.length<n.minUsernameLength?(r.openErrorMessage({title:"Invalid username"}),!1):!s.value.password||l.password(s.value.password)!==!0?(r.openErrorMessage({title:"Invalid password"}),!1):s.value.password!==i.value?(r.openErrorMessage({title:"Passwords do not match"}),!1):s.value.roleIds.length?!0:(r.openErrorMessage({title:"Please select a role"}),!1),c=async()=>{if(u())try{await us.createUser(s.value),r.openInfoMessage({title:`User ${s.value.username} created successfully`}),d()}catch(f){r.openErrorMessage({title:"Failed to create user",subtitle:f instanceof Error?f.message:"Unknown error"})}},d=()=>{s.value={username:"",password:"",roleIds:[]},i.value="",t.closeDialog()};return xt(async()=>{try{o.value=await us.listRoles()}catch(f){r.openErrorMessage({title:"Failed to load roles",subtitle:f instanceof Error?f.message:"Unknown error"})}}),(f,h)=>{const g=Si;return $(),te(g,{id:Z(t).dialogId,"max-width":"700px",onEscape:d},{default:v(()=>[p(kt,{class:"pa-4"},{default:v(()=>[p(un,null,{default:v(()=>[C("span",SY,[p(dt,{color:"primary",size:"56"},{default:v(()=>[E(ae(a.value),1)]),_:1}),C("span",_Y,[h[6]||(h[6]=E("New verified User ",-1)),p(ot,{top:""},{activator:v(({props:m})=>[p(se,ge({class:"ma-2",fab:""},m,{"x-small":""}),{default:v(()=>[p(ee,null,{default:v(()=>[...h[4]||(h[4]=[E("question_mark",-1)])]),_:1})]),_:1},16)]),default:v(()=>[...h[5]||(h[5]=[E(" The user will be set to verified and assigned roles. Please share the username and password with them manually. ",-1)])]),_:1})])])]),_:1}),p(rn,null,{default:v(()=>[p(st,null,{default:v(()=>[p(We,{cols:12},{default:v(()=>[p(Xn,null,{default:v(()=>[p(st,null,{default:v(()=>[p(We,{cols:"12",md:"6"},{default:v(()=>[p(at,{modelValue:s.value.username,"onUpdate:modelValue":h[0]||(h[0]=m=>s.value.username=m),rules:[l.required,l.minLength],autofocus:"",label:"Username*","prepend-icon":"person",required:""},null,8,["modelValue","rules"]),p(at,{modelValue:s.value.password,"onUpdate:modelValue":h[1]||(h[1]=m=>s.value.password=m),rules:[l.required,l.password],label:"Password*","prepend-icon":"lock",required:"",type:"password"},null,8,["modelValue","rules"]),p(at,{modelValue:i.value,"onUpdate:modelValue":h[2]||(h[2]=m=>i.value=m),rules:[l.required,l.passwordMatch],label:"Confirm Password*","prepend-icon":"lock",required:"",type:"password"},null,8,["modelValue","rules"]),p(ea,{modelValue:s.value.roleIds,"onUpdate:modelValue":h[3]||(h[3]=m=>s.value.roleIds=m),items:o.value.map(m=>({text:m.name,value:m.id})),rules:[l.required],label:"Roles*",multiple:"","prepend-icon":"shield",required:""},null,8,["modelValue","items","rules"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),p(zn,null,{default:v(()=>[h[9]||(h[9]=C("em",{class:"text-red"}," * indicates required field ",-1)),p(Pn),p(se,{variant:"text",onClick:d},{default:v(()=>[...h[7]||(h[7]=[E("Close",-1)])]),_:1}),p(se,{color:"blue-darken-1",variant:"text",onClick:c},{default:v(()=>[...h[8]||(h[8]=[E("Create",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),XD=()=>({id:void 0,name:fc(),floor:"1",printers:[]});class cs extends Cr{static convertPrinterFloorToCreateForm(t){const n=XD();return n.id=t==null?void 0:t.id,n.name=(t==null?void 0:t.name)||fc(),n.printers=[],n.floor=((t==null?void 0:t.floor)||1).toString(),n}static convertCreateFormToFloor(t){const n={...t};if(n.floor=parseInt(n.floor),Number.isNaN(n.floor))throw new Error("Floor number did not convert to number.");return n}static async getFloors(){const t=`${$e.floorRoute}/`;return await this.get(t)}static async createFloor(t){const n=`${$e.floorRoute}/`;return await this.post(n,t)}static async updateFloorName(t,n){const r=`${$e.updatePrinterFloorNameRoute(t)}/`;return await this.patch(r,{name:n})}static async updateFloorNumber(t,n){const r=`${$e.updatePrinterFloorNumberRoute(t)}/`;return await this.patch(r,{floor:n})}static async deleteFloor(t){const n=`${$e.getFloorRoute(t)}/`;return await this.delete(n)}static async addPrinterToFloor(t,n){const r=`${$e.addOrRemovePrinterFromFloorRoute(t)}/`;return await this.post(r,n)}static async deletePrinterFromFloor(t,n){const r=`${$e.addOrRemovePrinterFromFloorRoute(t)}/`;return await this.delete(r,{printerId:n})}}const fo=ks("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 Xt().printers.filter(n=>!e.floors.find(r=>r.printers.find(s=>s.printerId===n.id)))},gridSortedPrinters(){const e=Ks(),t=e.gridCols,n=e.gridRows,s=Xt().printers;if(!s.length)return[];if(!this.selectedFloor)return[];const i=this.selectedFloor.printers,o=[];for(let a=0;a<t;a++){const l=[];o.push(l);for(let u=0;u<n;u++){const c=i.find(d=>d.x===a&&d.y===u);if(!c)l.push(void 0);else{const d=s.find(f=>f.id===c.printerId);l.push(d)}}}return o}},actions:{async loadFloors(){const e=await cs.getFloors();return this.saveFloors(e),e},async createFloor(e){const t=await cs.createFloor(e);return this.floors.push(t),t},saveFloors(e){var r;if(!(e!=null&&e.length))return;this.floors=e.sort((s,i)=>s.floor-i.floor);const t=(r=this.selectedFloor)==null?void 0:r.id,n=this.floors.findIndex(s=>s.id===t);this.selectedFloorIndex=n===-1?0:n},async deleteFloor(e){await cs.deleteFloor(e),this._popPrinterFloor(e)},async updateFloorName({floorId:e,name:t}){const n=await cs.updateFloorName(e,t);return this._replaceFloor(n),n},async updateFloorNumber({floorId:e,floorNumber:t}){const n=await cs.updateFloorNumber(e,t);return this._replaceFloor(n),n},async addPrinterToFloor({floorId:e,printerId:t,x:n,y:r}){const s=await cs.addPrinterToFloor(e,{printerId:t,x:n,y:r});this._replaceFloor(s)},async changeSelectedFloorByIndex(e){var n;if(!((n=this.floors)!=null&&n.length))return;if(this.floors.length<=e){console.warn("Selected floor index exceeds floors array"),this.selectedFloorIndex=0;return}if(!this.floors[e]){console.warn("Selected floor index did not exist in floors array"),this.selectedFloorIndex=0;return}this.selectedFloorIndex=e},async deletePrinterFromFloor({floorId:e,printerId:t}){const n=await cs.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)}}}),xY={class:"text-h5"},EY=Ve({__name:"AddOrUpdateFloorDialog",setup(e){const t=sn(on.AddOrUpdateFloorDialog),n=fo(),r=Xe("appConstants"),s=$t(),i=G(XD()),o=D(()=>{var d;return(d=t.context())==null?void 0:d.printerFloorId}),a=D(()=>i.value?Wm(i.value.name):""),l=()=>!i.value.name||i.value.name.length<r.minPrinterFloorNameLength?(s.openErrorMessage({title:"Invalid floor name"}),!1):Number.isInteger(Number(i.value.floor))?!0:(s.openErrorMessage({title:"Floor number must be an integer"}),!1),u=async()=>{if(!l())return;const d=cs.convertCreateFormToFloor(i.value);await n.createFloor(d),s.openInfoMessage({title:`Floor ${d.name} created`}),i.value.name=fc();const f=Math.max(...n.floors.map(h=>h.floor))+1;i.value.floor=f.toString(),c()},c=()=>{t.closeDialog()};return xe(o,d=>{if(d){const f=n.floor(d);i.value=cs.convertPrinterFloorToCreateForm(f)}}),xt(()=>{var d;if(o.value){const f=n.floor(o.value);i.value=cs.convertPrinterFloorToCreateForm(f)}else if((d=n.floors)!=null&&d.length){const f=Math.max(...n.floors.map(h=>h.floor))+1;i.value.floor=f.toString()}}),(d,f)=>{const h=Si;return $(),te(h,{id:Z(t).dialogId,"max-width":"700px",onEscape:c},{default:v(()=>[p(kt,null,{default:v(()=>[p(un,null,{default:v(()=>[C("span",xY,[p(dt,{color:"primary",size:"56"},{default:v(()=>[E(ae(a.value),1)]),_:1}),f[2]||(f[2]=E(" New Floor ",-1))])]),_:1}),p(rn,null,{default:v(()=>[p(st,null,{default:v(()=>[p(We,{cols:12},{default:v(()=>[p(Xn,null,{default:v(()=>[p(st,null,{default:v(()=>[i.value?($(),te(We,{key:0,cols:"12",md:"6"},{default:v(()=>[p(at,{modelValue:i.value.name,"onUpdate:modelValue":f[0]||(f[0]=g=>i.value.name=g),autofocus:"",label:"Floor name*",required:""},null,8,["modelValue"]),p(at,{modelValue:i.value.floor,"onUpdate:modelValue":f[1]||(f[1]=g=>i.value.floor=g),label:"Floor number",required:"",type:"number"},null,8,["modelValue"])]),_:1})):ve("",!0)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),p(zn,null,{default:v(()=>[f[5]||(f[5]=C("em",{class:"text-red"}," * indicates required field ",-1)),p(Pn),p(se,{variant:"text",onClick:c},{default:v(()=>[...f[3]||(f[3]=[E("Close",-1)])]),_:1}),p(se,{color:"blue-darken-1",variant:"text",onClick:u},{default:v(()=>[...f[4]||(f[4]=[E("Create",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}});class Hp 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}`)}}var pc=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(){}},CY={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},To,jb,qC,TY=(qC=class{constructor(){qe(this,To,CY);qe(this,jb,!1)}setTimeoutProvider(e){Fe(this,To,e)}setTimeout(e,t){return Q(this,To).setTimeout(e,t)}clearTimeout(e){Q(this,To).clearTimeout(e)}setInterval(e,t){return Q(this,To).setInterval(e,t)}clearInterval(e){Q(this,To).clearInterval(e)}},To=new WeakMap,jb=new WeakMap,qC),Aa=new TY;function RY(e){setTimeout(e,0)}var pl=typeof window>"u"||"Deno"in globalThis;function ls(){}function PY(e,t){return typeof e=="function"?e(t):e}function ob(e){return typeof e=="number"&&e>=0&&e!==1/0}function QD(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Uo(e,t){return typeof e=="function"?e(t):e}function ds(e,t){return typeof e=="function"?e(t):e}function Tx(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==U1(o,t.options))return!1}else if(!$d(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||i&&!i(t))}function Rx(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(ml(t.options.mutationKey)!==ml(i))return!1}else if(!$d(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function U1(e,t){return((t==null?void 0:t.queryKeyHashFn)||ml)(e)}function ml(e){return JSON.stringify(e,(t,n)=>ab(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function $d(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>$d(e[n],t[n])):!1}var IY=Object.prototype.hasOwnProperty;function JD(e,t){if(e===t)return e;const n=Px(e)&&Px(t);if(!n&&!(ab(e)&&ab(t)))return t;const s=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),o=i.length,a=n?new Array(o):{};let l=0;for(let u=0;u<o;u++){const c=n?u:i[u],d=e[c],f=t[c];if(d===f){a[c]=d,(n?u<s:IY.call(e,c))&&l++;continue}if(d===null||f===null||typeof d!="object"||typeof f!="object"){a[c]=f;continue}const h=JD(d,f);a[c]=h,h===d&&l++}return s===o&&l===s?e:a}function jp(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 Px(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ab(e){if(!Ix(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Ix(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Ix(e){return Object.prototype.toString.call(e)==="[object Object]"}function AY(e){return new Promise(t=>{Aa.setTimeout(t,e)})}function lb(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?JD(e,t):t}function OY(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function DY(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var z1=Symbol();function ZD(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===z1?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function ub(e,t){return typeof e=="function"?e(...t):!!e}var Ma,Ro,au,GC,MY=(GC=class extends pc{constructor(){super();qe(this,Ma);qe(this,Ro);qe(this,au);Fe(this,au,t=>{if(!pl&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){Q(this,Ro)||this.setEventListener(Q(this,au))}onUnsubscribe(){var t;this.hasListeners()||((t=Q(this,Ro))==null||t.call(this),Fe(this,Ro,void 0))}setEventListener(t){var n;Fe(this,au,t),(n=Q(this,Ro))==null||n.call(this),Fe(this,Ro,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){Q(this,Ma)!==t&&(Fe(this,Ma,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof Q(this,Ma)=="boolean"?Q(this,Ma):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ma=new WeakMap,Ro=new WeakMap,au=new WeakMap,GC),H1=new MY;function cb(){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 LY=RY;function FY(){let e=[],t=0,n=a=>{a()},r=a=>{a()},s=LY;const i=a=>{t?e.push(a):s(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&s(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var Wn=FY(),lu,Po,uu,KC,$Y=(KC=class extends pc{constructor(){super();qe(this,lu,!0);qe(this,Po);qe(this,uu);Fe(this,uu,t=>{if(!pl&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){Q(this,Po)||this.setEventListener(Q(this,uu))}onUnsubscribe(){var t;this.hasListeners()||((t=Q(this,Po))==null||t.call(this),Fe(this,Po,void 0))}setEventListener(t){var n;Fe(this,uu,t),(n=Q(this,Po))==null||n.call(this),Fe(this,Po,t(this.setOnline.bind(this)))}setOnline(t){Q(this,lu)!==t&&(Fe(this,lu,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return Q(this,lu)}},lu=new WeakMap,Po=new WeakMap,uu=new WeakMap,KC),Wp=new $Y;function NY(e){return Math.min(1e3*2**e,3e4)}function eM(e){return(e??"online")==="online"?Wp.isOnline():!0}var db=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function tM(e){let t=!1,n=0,r;const s=cb(),i=()=>s.status!=="pending",o=m=>{var y;if(!i()){const w=new db(m);f(w),(y=e.onCancel)==null||y.call(e,w)}},a=()=>{t=!0},l=()=>{t=!1},u=()=>H1.isFocused()&&(e.networkMode==="always"||Wp.isOnline())&&e.canRun(),c=()=>eM(e.networkMode)&&e.canRun(),d=m=>{i()||(r==null||r(),s.resolve(m))},f=m=>{i()||(r==null||r(),s.reject(m))},h=()=>new Promise(m=>{var y;r=w=>{(i()||u())&&m(w)},(y=e.onPause)==null||y.call(e)}).then(()=>{var m;r=void 0,i()||(m=e.onContinue)==null||m.call(e)}),g=()=>{if(i())return;let m;const y=n===0?e.initialPromise:void 0;try{m=y??e.fn()}catch(w){m=Promise.reject(w)}Promise.resolve(m).then(d).catch(w=>{var T;if(i())return;const b=e.retry??(pl?0:3),S=e.retryDelay??NY,_=typeof S=="function"?S(n,w):S,k=b===!0||typeof b=="number"&&n<b||typeof b=="function"&&b(n,w);if(t||!k){f(w);return}n++,(T=e.onFail)==null||T.call(e,n,w),AY(_).then(()=>u()?void 0:h()).then(()=>{t?f(w):g()})})};return{promise:s,status:()=>s.status,cancel:o,continue:()=>(r==null||r(),s),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?g():h().then(g),s)}}var La,YC,nM=(YC=class{constructor(){qe(this,La)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ob(this.gcTime)&&Fe(this,La,Aa.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(pl?1/0:5*60*1e3))}clearGcTimeout(){Q(this,La)&&(Aa.clearTimeout(Q(this,La)),Fe(this,La,void 0))}},La=new WeakMap,YC),Fa,cu,as,$a,Nn,Wd,Na,Is,Ai,XC,BY=(XC=class extends nM{constructor(t){super();qe(this,Is);qe(this,Fa);qe(this,cu);qe(this,as);qe(this,$a);qe(this,Nn);qe(this,Wd);qe(this,Na);Fe(this,Na,!1),Fe(this,Wd,t.defaultOptions),this.setOptions(t.options),this.observers=[],Fe(this,$a,t.client),Fe(this,as,Q(this,$a).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Fe(this,Fa,Ox(this.options)),this.state=t.state??Q(this,Fa),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=Q(this,Nn))==null?void 0:t.promise}setOptions(t){if(this.options={...Q(this,Wd),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Ox(this.options);n.data!==void 0&&(this.setState(Ax(n.data,n.dataUpdatedAt)),Fe(this,Fa,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&Q(this,as).remove(this)}setData(t,n){const r=lb(this.state.data,t,this.options);return it(this,Is,Ai).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){it(this,Is,Ai).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=Q(this,Nn))==null?void 0:r.promise;return(s=Q(this,Nn))==null||s.cancel(t),n?n.then(ls).catch(ls):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(Q(this,Fa))}isActive(){return this.observers.some(t=>ds(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===z1||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Uo(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!QD(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=Q(this,Nn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=Q(this,Nn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),Q(this,as).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(Q(this,Nn)&&(Q(this,Na)?Q(this,Nn).cancel({revert:!0}):Q(this,Nn).cancelRetry()),this.scheduleGc()),Q(this,as).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||it(this,Is,Ai).call(this,{type:"invalidate"})}async fetch(t,n){var l,u,c,d,f,h,g,m,y,w,b,S;if(this.state.fetchStatus!=="idle"&&((l=Q(this,Nn))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(Q(this,Nn))return Q(this,Nn).continueRetry(),Q(this,Nn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const _=this.observers.find(k=>k.options.queryFn);_&&this.setOptions(_.options)}const r=new AbortController,s=_=>{Object.defineProperty(_,"signal",{enumerable:!0,get:()=>(Fe(this,Na,!0),r.signal)})},i=()=>{const _=ZD(this.options,n),T=(()=>{const R={client:Q(this,$a),queryKey:this.queryKey,meta:this.meta};return s(R),R})();return Fe(this,Na,!1),this.options.persister?this.options.persister(_,T,this):_(T)},a=(()=>{const _={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:Q(this,$a),state:this.state,fetchFn:i};return s(_),_})();(u=this.options.behavior)==null||u.onFetch(a,this),Fe(this,cu,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&it(this,Is,Ai).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta}),Fe(this,Nn,tM({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,onCancel:_=>{_ instanceof db&&_.revert&&this.setState({...Q(this,cu),fetchStatus:"idle"}),r.abort()},onFail:(_,k)=>{it(this,Is,Ai).call(this,{type:"failed",failureCount:_,error:k})},onPause:()=>{it(this,Is,Ai).call(this,{type:"pause"})},onContinue:()=>{it(this,Is,Ai).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{const _=await Q(this,Nn).start();if(_===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(_),(h=(f=Q(this,as).config).onSuccess)==null||h.call(f,_,this),(m=(g=Q(this,as).config).onSettled)==null||m.call(g,_,this.state.error,this),_}catch(_){if(_ instanceof db){if(_.silent)return Q(this,Nn).promise;if(_.revert){if(this.state.data===void 0)throw _;return this.state.data}}throw it(this,Is,Ai).call(this,{type:"error",error:_}),(w=(y=Q(this,as).config).onError)==null||w.call(y,_,this),(S=(b=Q(this,as).config).onSettled)==null||S.call(b,this.state.data,_,this),_}finally{this.scheduleGc()}}},Fa=new WeakMap,cu=new WeakMap,as=new WeakMap,$a=new WeakMap,Nn=new WeakMap,Wd=new WeakMap,Na=new WeakMap,Is=new WeakSet,Ai=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...rM(r.data,this.options),fetchMeta:t.meta??null};case"success":const s={...r,...Ax(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Fe(this,cu,t.manual?s:void 0),s;case"error":const i=t.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Wn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),Q(this,as).notify({query:this,type:"updated",action:t})})},XC);function rM(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:eM(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Ax(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ox(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 Ar,vt,qd,pr,Ba,du,$i,Io,Gd,fu,hu,Va,Ua,Ao,pu,At,Vc,fb,hb,pb,mb,gb,vb,yb,sM,QC,VY=(QC=class extends pc{constructor(t,n){super();qe(this,At);qe(this,Ar);qe(this,vt);qe(this,qd);qe(this,pr);qe(this,Ba);qe(this,du);qe(this,$i);qe(this,Io);qe(this,Gd);qe(this,fu);qe(this,hu);qe(this,Va);qe(this,Ua);qe(this,Ao);qe(this,pu,new Set);this.options=n,Fe(this,Ar,t),Fe(this,Io,null),Fe(this,$i,cb()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(Q(this,vt).addObserver(this),Dx(Q(this,vt),this.options)?it(this,At,Vc).call(this):this.updateResult(),it(this,At,mb).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return bb(Q(this,vt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return bb(Q(this,vt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,it(this,At,gb).call(this),it(this,At,vb).call(this),Q(this,vt).removeObserver(this)}setOptions(t){const n=this.options,r=Q(this,vt);if(this.options=Q(this,Ar).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ds(this.options.enabled,Q(this,vt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");it(this,At,yb).call(this),Q(this,vt).setOptions(this.options),n._defaulted&&!jp(this.options,n)&&Q(this,Ar).getQueryCache().notify({type:"observerOptionsUpdated",query:Q(this,vt),observer:this});const s=this.hasListeners();s&&Mx(Q(this,vt),r,this.options,n)&&it(this,At,Vc).call(this),this.updateResult(),s&&(Q(this,vt)!==r||ds(this.options.enabled,Q(this,vt))!==ds(n.enabled,Q(this,vt))||Uo(this.options.staleTime,Q(this,vt))!==Uo(n.staleTime,Q(this,vt)))&&it(this,At,fb).call(this);const i=it(this,At,hb).call(this);s&&(Q(this,vt)!==r||ds(this.options.enabled,Q(this,vt))!==ds(n.enabled,Q(this,vt))||i!==Q(this,Ao))&&it(this,At,pb).call(this,i)}getOptimisticResult(t){const n=Q(this,Ar).getQueryCache().build(Q(this,Ar),t),r=this.createResult(n,t);return zY(this,r)&&(Fe(this,pr,r),Fe(this,du,this.options),Fe(this,Ba,Q(this,vt).state)),r}getCurrentResult(){return Q(this,pr)}trackResult(t,n){return new Proxy(t,{get:(r,s)=>(this.trackProp(s),n==null||n(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&Q(this,$i).status==="pending"&&Q(this,$i).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,s))})}trackProp(t){Q(this,pu).add(t)}getCurrentQuery(){return Q(this,vt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=Q(this,Ar).defaultQueryOptions(t),r=Q(this,Ar).getQueryCache().build(Q(this,Ar),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return it(this,At,Vc).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),Q(this,pr)))}createResult(t,n){var I;const r=Q(this,vt),s=this.options,i=Q(this,pr),o=Q(this,Ba),a=Q(this,du),u=t!==r?t.state:Q(this,qd),{state:c}=t;let d={...c},f=!1,h;if(n._optimisticResults){const P=this.hasListeners(),A=!P&&Dx(t,n),L=P&&Mx(t,r,n,s);(A||L)&&(d={...d,...rM(c.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:g,errorUpdatedAt:m,status:y}=d;h=d.data;let w=!1;if(n.placeholderData!==void 0&&h===void 0&&y==="pending"){let P;i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(P=i.data,w=!0):P=typeof n.placeholderData=="function"?n.placeholderData((I=Q(this,hu))==null?void 0:I.state.data,Q(this,hu)):n.placeholderData,P!==void 0&&(y="success",h=lb(i==null?void 0:i.data,P,n),f=!0)}if(n.select&&h!==void 0&&!w)if(i&&h===(o==null?void 0:o.data)&&n.select===Q(this,Gd))h=Q(this,fu);else try{Fe(this,Gd,n.select),h=n.select(h),h=lb(i==null?void 0:i.data,h,n),Fe(this,fu,h),Fe(this,Io,null)}catch(P){Fe(this,Io,P)}Q(this,Io)&&(g=Q(this,Io),h=Q(this,fu),m=Date.now(),y="error");const b=d.fetchStatus==="fetching",S=y==="pending",_=y==="error",k=S&&b,T=h!==void 0,x={status:y,fetchStatus:d.fetchStatus,isPending:S,isSuccess:y==="success",isError:_,isInitialLoading:k,isLoading:k,data:h,dataUpdatedAt:d.dataUpdatedAt,error:g,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:b,isRefetching:b&&!S,isLoadingError:_&&!T,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:_&&T,isStale:j1(t,n),refetch:this.refetch,promise:Q(this,$i),isEnabled:ds(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const P=B=>{x.status==="error"?B.reject(x.error):x.data!==void 0&&B.resolve(x.data)},A=()=>{const B=Fe(this,$i,x.promise=cb());P(B)},L=Q(this,$i);switch(L.status){case"pending":t.queryHash===r.queryHash&&P(L);break;case"fulfilled":(x.status==="error"||x.data!==L.value)&&A();break;case"rejected":(x.status!=="error"||x.error!==L.reason)&&A();break}}return x}updateResult(){const t=Q(this,pr),n=this.createResult(Q(this,vt),this.options);if(Fe(this,Ba,Q(this,vt).state),Fe(this,du,this.options),Q(this,Ba).data!==void 0&&Fe(this,hu,Q(this,vt)),jp(n,t))return;Fe(this,pr,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!Q(this,pu).size)return!0;const o=new Set(i??Q(this,pu));return this.options.throwOnError&&o.add("error"),Object.keys(Q(this,pr)).some(a=>{const l=a;return Q(this,pr)[l]!==t[l]&&o.has(l)})};it(this,At,sM).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&it(this,At,mb).call(this)}},Ar=new WeakMap,vt=new WeakMap,qd=new WeakMap,pr=new WeakMap,Ba=new WeakMap,du=new WeakMap,$i=new WeakMap,Io=new WeakMap,Gd=new WeakMap,fu=new WeakMap,hu=new WeakMap,Va=new WeakMap,Ua=new WeakMap,Ao=new WeakMap,pu=new WeakMap,At=new WeakSet,Vc=function(t){it(this,At,yb).call(this);let n=Q(this,vt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(ls)),n},fb=function(){it(this,At,gb).call(this);const t=Uo(this.options.staleTime,Q(this,vt));if(pl||Q(this,pr).isStale||!ob(t))return;const r=QD(Q(this,pr).dataUpdatedAt,t)+1;Fe(this,Va,Aa.setTimeout(()=>{Q(this,pr).isStale||this.updateResult()},r))},hb=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(Q(this,vt)):this.options.refetchInterval)??!1},pb=function(t){it(this,At,vb).call(this),Fe(this,Ao,t),!(pl||ds(this.options.enabled,Q(this,vt))===!1||!ob(Q(this,Ao))||Q(this,Ao)===0)&&Fe(this,Ua,Aa.setInterval(()=>{(this.options.refetchIntervalInBackground||H1.isFocused())&&it(this,At,Vc).call(this)},Q(this,Ao)))},mb=function(){it(this,At,fb).call(this),it(this,At,pb).call(this,it(this,At,hb).call(this))},gb=function(){Q(this,Va)&&(Aa.clearTimeout(Q(this,Va)),Fe(this,Va,void 0))},vb=function(){Q(this,Ua)&&(Aa.clearInterval(Q(this,Ua)),Fe(this,Ua,void 0))},yb=function(){const t=Q(this,Ar).getQueryCache().build(Q(this,Ar),this.options);if(t===Q(this,vt))return;const n=Q(this,vt);Fe(this,vt,t),Fe(this,qd,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},sM=function(t){Wn.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(Q(this,pr))}),Q(this,Ar).getQueryCache().notify({query:Q(this,vt),type:"observerResultsUpdated"})})},QC);function UY(e,t){return ds(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Dx(e,t){return UY(e,t)||e.state.data!==void 0&&bb(e,t,t.refetchOnMount)}function bb(e,t,n){if(ds(t.enabled,e)!==!1&&Uo(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&j1(e,t)}return!1}function Mx(e,t,n,r){return(e!==t||ds(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&j1(e,n)}function j1(e,t){return ds(t.enabled,e)!==!1&&e.isStaleByTime(Uo(t.staleTime,e))}function zY(e,t){return!jp(e.getCurrentResult(),t)}function Lx(e){return{onFetch:(t,n)=>{var c,d,f,h,g;const r=t.options,s=(f=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,i=((h=t.state.data)==null?void 0:h.pages)||[],o=((g=t.state.data)==null?void 0:g.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let m=!1;const y=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},w=ZD(t.options,t.fetchOptions),b=async(S,_,k)=>{if(m)return Promise.reject();if(_==null&&S.pages.length)return Promise.resolve(S);const R=(()=>{const A={client:t.client,queryKey:t.queryKey,pageParam:_,direction:k?"backward":"forward",meta:t.options.meta};return y(A),A})(),x=await w(R),{maxPages:I}=t.options,P=k?DY:OY;return{pages:P(S.pages,x,I),pageParams:P(S.pageParams,_,I)}};if(s&&i.length){const S=s==="backward",_=S?HY:Fx,k={pages:i,pageParams:o},T=_(r,k);a=await b(k,T,S)}else{const S=e??i.length;do{const _=l===0?o[0]??r.initialPageParam:Fx(r,a);if(l>0&&_==null)break;a=await b(a,_),l++}while(l<S)}return a};t.options.persister?t.fetchFn=()=>{var m,y;return(y=(m=t.options).persister)==null?void 0:y.call(m,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Fx(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 HY(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Kd,ai,mr,za,li,bo,JC,jY=(JC=class extends nM{constructor(t){super();qe(this,li);qe(this,Kd);qe(this,ai);qe(this,mr);qe(this,za);Fe(this,Kd,t.client),this.mutationId=t.mutationId,Fe(this,mr,t.mutationCache),Fe(this,ai,[]),this.state=t.state||iM(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){Q(this,ai).includes(t)||(Q(this,ai).push(t),this.clearGcTimeout(),Q(this,mr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Fe(this,ai,Q(this,ai).filter(n=>n!==t)),this.scheduleGc(),Q(this,mr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){Q(this,ai).length||(this.state.status==="pending"?this.scheduleGc():Q(this,mr).remove(this))}continue(){var t;return((t=Q(this,za))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,a,l,u,c,d,f,h,g,m,y,w,b,S,_,k,T,R,x,I;const n=()=>{it(this,li,bo).call(this,{type:"continue"})},r={client:Q(this,Kd),meta:this.options.meta,mutationKey:this.options.mutationKey};Fe(this,za,tM({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(P,A)=>{it(this,li,bo).call(this,{type:"failed",failureCount:P,error:A})},onPause:()=>{it(this,li,bo).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>Q(this,mr).canRun(this)}));const s=this.state.status==="pending",i=!Q(this,za).canStart();try{if(s)n();else{it(this,li,bo).call(this,{type:"pending",variables:t,isPaused:i}),await((a=(o=Q(this,mr).config).onMutate)==null?void 0:a.call(o,t,this,r));const A=await((u=(l=this.options).onMutate)==null?void 0:u.call(l,t,r));A!==this.state.context&&it(this,li,bo).call(this,{type:"pending",context:A,variables:t,isPaused:i})}const P=await Q(this,za).start();return await((d=(c=Q(this,mr).config).onSuccess)==null?void 0:d.call(c,P,t,this.state.context,this,r)),await((h=(f=this.options).onSuccess)==null?void 0:h.call(f,P,t,this.state.context,r)),await((m=(g=Q(this,mr).config).onSettled)==null?void 0:m.call(g,P,null,this.state.variables,this.state.context,this,r)),await((w=(y=this.options).onSettled)==null?void 0:w.call(y,P,null,t,this.state.context,r)),it(this,li,bo).call(this,{type:"success",data:P}),P}catch(P){try{throw await((S=(b=Q(this,mr).config).onError)==null?void 0:S.call(b,P,t,this.state.context,this,r)),await((k=(_=this.options).onError)==null?void 0:k.call(_,P,t,this.state.context,r)),await((R=(T=Q(this,mr).config).onSettled)==null?void 0:R.call(T,void 0,P,this.state.variables,this.state.context,this,r)),await((I=(x=this.options).onSettled)==null?void 0:I.call(x,void 0,P,t,this.state.context,r)),P}finally{it(this,li,bo).call(this,{type:"error",error:P})}}finally{Q(this,mr).runNext(this)}}},Kd=new WeakMap,ai=new WeakMap,mr=new WeakMap,za=new WeakMap,li=new WeakSet,bo=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Wn.batch(()=>{Q(this,ai).forEach(r=>{r.onMutationUpdate(t)}),Q(this,mr).notify({mutation:this,type:"updated",action:t})})},JC);function iM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ni,As,Yd,ZC,oM=(ZC=class extends pc{constructor(n={}){super();qe(this,Ni);qe(this,As);qe(this,Yd);this.config=n,Fe(this,Ni,new Set),Fe(this,As,new Map),Fe(this,Yd,0)}build(n,r,s){const i=new jY({client:n,mutationCache:this,mutationId:++Rf(this,Yd)._,options:n.defaultMutationOptions(r),state:s});return this.add(i),i}add(n){Q(this,Ni).add(n);const r=Xf(n);if(typeof r=="string"){const s=Q(this,As).get(r);s?s.push(n):Q(this,As).set(r,[n])}this.notify({type:"added",mutation:n})}remove(n){if(Q(this,Ni).delete(n)){const r=Xf(n);if(typeof r=="string"){const s=Q(this,As).get(r);if(s)if(s.length>1){const i=s.indexOf(n);i!==-1&&s.splice(i,1)}else s[0]===n&&Q(this,As).delete(r)}}this.notify({type:"removed",mutation:n})}canRun(n){const r=Xf(n);if(typeof r=="string"){const s=Q(this,As).get(r),i=s==null?void 0:s.find(o=>o.state.status==="pending");return!i||i===n}else return!0}runNext(n){var s;const r=Xf(n);if(typeof r=="string"){const i=(s=Q(this,As).get(r))==null?void 0:s.find(o=>o!==n&&o.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Wn.batch(()=>{Q(this,Ni).forEach(n=>{this.notify({type:"removed",mutation:n})}),Q(this,Ni).clear(),Q(this,As).clear()})}getAll(){return Array.from(Q(this,Ni))}find(n){const r={exact:!0,...n};return this.getAll().find(s=>Rx(r,s))}findAll(n={}){return this.getAll().filter(r=>Rx(n,r))}notify(n){Wn.batch(()=>{this.listeners.forEach(r=>{r(n)})})}resumePausedMutations(){const n=this.getAll().filter(r=>r.state.isPaused);return Wn.batch(()=>Promise.all(n.map(r=>r.continue().catch(ls))))}},Ni=new WeakMap,As=new WeakMap,Yd=new WeakMap,ZC);function Xf(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Bi,Oo,Or,Vi,Yi,Hh,wb,eT,WY=(eT=class extends pc{constructor(n,r){super();qe(this,Yi);qe(this,Bi);qe(this,Oo);qe(this,Or);qe(this,Vi);Fe(this,Bi,n),this.setOptions(r),this.bindMethods(),it(this,Yi,Hh).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const r=this.options;this.options=Q(this,Bi).defaultMutationOptions(n),jp(this.options,r)||Q(this,Bi).getMutationCache().notify({type:"observerOptionsUpdated",mutation:Q(this,Or),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&ml(r.mutationKey)!==ml(this.options.mutationKey)?this.reset():((s=Q(this,Or))==null?void 0:s.state.status)==="pending"&&Q(this,Or).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=Q(this,Or))==null||n.removeObserver(this)}onMutationUpdate(n){it(this,Yi,Hh).call(this),it(this,Yi,wb).call(this,n)}getCurrentResult(){return Q(this,Oo)}reset(){var n;(n=Q(this,Or))==null||n.removeObserver(this),Fe(this,Or,void 0),it(this,Yi,Hh).call(this),it(this,Yi,wb).call(this)}mutate(n,r){var s;return Fe(this,Vi,r),(s=Q(this,Or))==null||s.removeObserver(this),Fe(this,Or,Q(this,Bi).getMutationCache().build(Q(this,Bi),this.options)),Q(this,Or).addObserver(this),Q(this,Or).execute(n)}},Bi=new WeakMap,Oo=new WeakMap,Or=new WeakMap,Vi=new WeakMap,Yi=new WeakSet,Hh=function(){var r;const n=((r=Q(this,Or))==null?void 0:r.state)??iM();Fe(this,Oo,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},wb=function(n){Wn.batch(()=>{var r,s,i,o,a,l,u,c;if(Q(this,Vi)&&this.hasListeners()){const d=Q(this,Oo).variables,f=Q(this,Oo).context,h={client:Q(this,Bi),meta:this.options.meta,mutationKey:this.options.mutationKey};(n==null?void 0:n.type)==="success"?((s=(r=Q(this,Vi)).onSuccess)==null||s.call(r,n.data,d,f,h),(o=(i=Q(this,Vi)).onSettled)==null||o.call(i,n.data,null,d,f,h)):(n==null?void 0:n.type)==="error"&&((l=(a=Q(this,Vi)).onError)==null||l.call(a,n.error,d,f,h),(c=(u=Q(this,Vi)).onSettled)==null||c.call(u,void 0,n.error,d,f,h))}this.listeners.forEach(d=>{d(Q(this,Oo))})})},eT),ui,tT,aM=(tT=class extends pc{constructor(n={}){super();qe(this,ui);this.config=n,Fe(this,ui,new Map)}build(n,r,s){const i=r.queryKey,o=r.queryHash??U1(i,r);let a=this.get(o);return a||(a=new BY({client:n,queryKey:i,queryHash:o,options:n.defaultQueryOptions(r),state:s,defaultOptions:n.getQueryDefaults(i)}),this.add(a)),a}add(n){Q(this,ui).has(n.queryHash)||(Q(this,ui).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const r=Q(this,ui).get(n.queryHash);r&&(n.destroy(),r===n&&Q(this,ui).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){Wn.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return Q(this,ui).get(n)}getAll(){return[...Q(this,ui).values()]}find(n){const r={exact:!0,...n};return this.getAll().find(s=>Tx(r,s))}findAll(n={}){const r=this.getAll();return Object.keys(n).length>0?r.filter(s=>Tx(n,s)):r}notify(n){Wn.batch(()=>{this.listeners.forEach(r=>{r(n)})})}onFocus(){Wn.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){Wn.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},ui=new WeakMap,tT),pn,Do,Mo,mu,gu,Lo,vu,yu,nT,qY=(nT=class{constructor(t={}){qe(this,pn);qe(this,Do);qe(this,Mo);qe(this,mu);qe(this,gu);qe(this,Lo);qe(this,vu);qe(this,yu);Fe(this,pn,t.queryCache||new aM),Fe(this,Do,t.mutationCache||new oM),Fe(this,Mo,t.defaultOptions||{}),Fe(this,mu,new Map),Fe(this,gu,new Map),Fe(this,Lo,0)}mount(){Rf(this,Lo)._++,Q(this,Lo)===1&&(Fe(this,vu,H1.subscribe(async t=>{t&&(await this.resumePausedMutations(),Q(this,pn).onFocus())})),Fe(this,yu,Wp.subscribe(async t=>{t&&(await this.resumePausedMutations(),Q(this,pn).onOnline())})))}unmount(){var t,n;Rf(this,Lo)._--,Q(this,Lo)===0&&((t=Q(this,vu))==null||t.call(this),Fe(this,vu,void 0),(n=Q(this,yu))==null||n.call(this),Fe(this,yu,void 0))}isFetching(t){return Q(this,pn).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return Q(this,Do).findAll({...t,status:"pending"}).length}getQueryData(t){var r;const n=this.defaultQueryOptions({queryKey:t});return(r=Q(this,pn).get(n.queryHash))==null?void 0:r.state.data}ensureQueryData(t){const n=this.defaultQueryOptions(t),r=Q(this,pn).build(this,n),s=r.state.data;return s===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(Uo(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(s))}getQueriesData(t){return Q(this,pn).findAll(t).map(({queryKey:n,state:r})=>{const s=r.data;return[n,s]})}setQueryData(t,n,r){const s=this.defaultQueryOptions({queryKey:t}),i=Q(this,pn).get(s.queryHash),o=i==null?void 0:i.state.data,a=PY(n,o);if(a!==void 0)return Q(this,pn).build(this,s).setData(a,{...r,manual:!0})}setQueriesData(t,n,r){return Wn.batch(()=>Q(this,pn).findAll(t).map(({queryKey:s})=>[s,this.setQueryData(s,n,r)]))}getQueryState(t){var r;const n=this.defaultQueryOptions({queryKey:t});return(r=Q(this,pn).get(n.queryHash))==null?void 0:r.state}removeQueries(t){const n=Q(this,pn);Wn.batch(()=>{n.findAll(t).forEach(r=>{n.remove(r)})})}resetQueries(t,n){const r=Q(this,pn);return Wn.batch(()=>(r.findAll(t).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...t},n)))}cancelQueries(t,n={}){const r={revert:!0,...n},s=Wn.batch(()=>Q(this,pn).findAll(t).map(i=>i.cancel(r)));return Promise.all(s).then(ls).catch(ls)}invalidateQueries(t,n={}){return Wn.batch(()=>(Q(this,pn).findAll(t).forEach(r=>{r.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},n)))}refetchQueries(t,n={}){const r={...n,cancelRefetch:n.cancelRefetch??!0},s=Wn.batch(()=>Q(this,pn).findAll(t).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,r);return r.throwOnError||(o=o.catch(ls)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(s).then(ls)}fetchQuery(t){const n=this.defaultQueryOptions(t);n.retry===void 0&&(n.retry=!1);const r=Q(this,pn).build(this,n);return r.isStaleByTime(Uo(n.staleTime,r))?r.fetch(n):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(ls).catch(ls)}fetchInfiniteQuery(t){return t.behavior=Lx(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(ls).catch(ls)}ensureInfiniteQueryData(t){return t.behavior=Lx(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Wp.isOnline()?Q(this,Do).resumePausedMutations():Promise.resolve()}getQueryCache(){return Q(this,pn)}getMutationCache(){return Q(this,Do)}getDefaultOptions(){return Q(this,Mo)}setDefaultOptions(t){Fe(this,Mo,t)}setQueryDefaults(t,n){Q(this,mu).set(ml(t),{queryKey:t,defaultOptions:n})}getQueryDefaults(t){const n=[...Q(this,mu).values()],r={};return n.forEach(s=>{$d(t,s.queryKey)&&Object.assign(r,s.defaultOptions)}),r}setMutationDefaults(t,n){Q(this,gu).set(ml(t),{mutationKey:t,defaultOptions:n})}getMutationDefaults(t){const n=[...Q(this,gu).values()],r={};return n.forEach(s=>{$d(t,s.mutationKey)&&Object.assign(r,s.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const n={...Q(this,Mo).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return n.queryHash||(n.queryHash=U1(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===z1&&(n.enabled=!1),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...Q(this,Mo).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){Q(this,pn).clear(),Q(this,Do).clear()}},pn=new WeakMap,Do=new WeakMap,Mo=new WeakMap,mu=new WeakMap,gu=new WeakMap,Lo=new WeakMap,vu=new WeakMap,yu=new WeakMap,nT),GY="VUE_QUERY_CLIENT";function lM(e){const t=e?`:${e}`:"";return`${GY}${t}`}function Sb(e,t){Object.keys(e).forEach(n=>{e[n]=t[n]})}function _b(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)=>_b(s,t,String(i),r+1));if(typeof e=="object"&&YY(e)){const s=Object.entries(e).map(([i,o])=>[i,_b(o,t,i,r+1)]);return Object.fromEntries(s)}return e}function KY(e,t){return _b(e,t)}function ut(e,t=!1){return KY(e,(n,r,s)=>{if(s===1&&r==="queryKey")return ut(n,!0);if(t&&XY(n))return ut(n(),t);if(nt(n))return ut(Z(n),t)})}function YY(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function XY(e){return typeof e=="function"}function W1(e=""){if(!$T())throw new Error("vue-query hooks can only be used inside setup() function or functions that support injection context.");const t=lM(e),n=Xe(t);if(!n)throw new Error("No 'queryClient' found in Vue context, use 'VueQueryPlugin' to properly initialize the library.");return n}var QY=class extends aM{find(e){return super.find(ut(e))}findAll(e={}){return super.findAll(ut(e))}},JY=class extends oM{find(e){return super.find(ut(e))}findAll(e={}){return super.findAll(ut(e))}},ZY=class extends qY{constructor(e={}){const t={defaultOptions:e.defaultOptions,queryCache:e.queryCache||new QY,mutationCache:e.mutationCache||new JY};super(t),this.isRestoring=G(!1)}isFetching(e={}){return super.isFetching(ut(e))}isMutating(e={}){return super.isMutating(ut(e))}getQueryData(e){return super.getQueryData(ut(e))}ensureQueryData(e){return super.ensureQueryData(ut(e))}getQueriesData(e){return super.getQueriesData(ut(e))}setQueryData(e,t,n={}){return super.setQueryData(ut(e),t,ut(n))}setQueriesData(e,t,n={}){return super.setQueriesData(ut(e),t,ut(n))}getQueryState(e){return super.getQueryState(ut(e))}removeQueries(e={}){return super.removeQueries(ut(e))}resetQueries(e={},t={}){return super.resetQueries(ut(e),ut(t))}cancelQueries(e={},t={}){return super.cancelQueries(ut(e),ut(t))}invalidateQueries(e={},t={}){const n=ut(e),r=ut(t);if(super.invalidateQueries({...n,refetchType:"none"},r),n.refetchType==="none")return Promise.resolve();const s={...n,type:n.refetchType??n.type??"active"};return ht().then(()=>super.refetchQueries(s,r))}refetchQueries(e={},t={}){return super.refetchQueries(ut(e),ut(t))}fetchQuery(e){return super.fetchQuery(ut(e))}prefetchQuery(e){return super.prefetchQuery(ut(e))}fetchInfiniteQuery(e){return super.fetchInfiniteQuery(ut(e))}prefetchInfiniteQuery(e){return super.prefetchInfiniteQuery(ut(e))}setDefaultOptions(e){super.setDefaultOptions(ut(e))}setQueryDefaults(e,t){super.setQueryDefaults(ut(e),ut(t))}getQueryDefaults(e){return super.getQueryDefaults(ut(e))}setMutationDefaults(e,t){super.setMutationDefaults(ut(e),ut(t))}getMutationDefaults(e){return super.getMutationDefaults(ut(e))}},eX={install:(e,t={})=>{const n=lM(t.queryClientKey);let r;if("queryClient"in t&&t.queryClient)r=t.queryClient;else{const o="queryClientConfig"in t?t.queryClientConfig:void 0;r=new ZY(o)}pl||r.mount();let s=()=>{};if(t.clientPersister){r.isRestoring&&(r.isRestoring.value=!0);const[o,a]=t.clientPersister(r);s=o,a.then(()=>{var l;r.isRestoring&&(r.isRestoring.value=!1),(l=t.clientPersisterOnSuccess)==null||l.call(t,r)})}const i=()=>{r.unmount(),s()};if(e.onUnmount)e.onUnmount(i);else{const o=e.unmount;e.unmount=function(){i(),o()}}e.provide(n,r)}};function tX(e,t,n){const r=W1(),s=D(()=>{var y;let h=t;typeof h=="function"&&(h=h());const g=ut(h);typeof g.enabled=="function"&&(g.enabled=g.enabled());const m=r.defaultQueryOptions(g);return m._optimisticResults=(y=r.isRestoring)!=null&&y.value?"isRestoring":"optimistic",m}),i=new e(r,s.value),o=s.value.shallow?um(i.getCurrentResult()):gn(i.getCurrentResult());let a=()=>{};r.isRestoring&&xe(r.isRestoring,h=>{h||(a(),a=i.subscribe(g=>{Sb(o,g)}))},{immediate:!0});const l=()=>{i.setOptions(s.value),Sb(o,i.getCurrentResult())};xe(s,l),ln(()=>{a()});const u=(...h)=>(l(),o.refetch(...h)),c=()=>new Promise((h,g)=>{let m=()=>{};const y=()=>{if(s.value.enabled!==!1){i.setOptions(s.value);const w=i.getOptimisticResult(s.value);w.isStale?(m(),i.fetchOptimistic(s.value).then(h,b=>{ub(s.value.throwOnError,[b,i.getCurrentQuery()])?g(b):h(i.getCurrentResult())})):(m(),h(w))}};y(),m=xe(s,y)});xe(()=>o.error,h=>{if(o.isError&&!o.isFetching&&ub(s.value.throwOnError,[h,i.getCurrentQuery()]))throw h});const d=s.value.shallow?Zb(o):Ji(o),f=vl(d);for(const h in o)typeof o[h]=="function"&&(f[h]=o[h]);return f.suspense=c,f.refetch=u,f}function Jm(e,t){return tX(VY,e)}function nX(e,t){const n=W1(),r=D(()=>{const c=typeof e=="function"?e():e;return n.defaultMutationOptions(ut(c))}),s=new WY(n,r.value),i=r.value.shallow?um(s.getCurrentResult()):gn(s.getCurrentResult()),o=s.subscribe(c=>{Sb(i,c)}),a=(c,d)=>{s.mutate(c,d).catch(()=>{})};xe(r,()=>{s.setOptions(r.value)}),ln(()=>{o()});const l=r.value.shallow?Zb(i):Ji(i),u=vl(l);return xe(()=>i.error,c=>{if(c&&ub(r.value.throwOnError,[c]))throw c}),{...u,mutate:a,mutateAsync:i.mutate,reset:i.reset}}const rX=ce({...Ge(),...xr(),...kD()},"VLayout"),Zm=Ee()({name:"VLayout",props:rX(),setup(e,t){let{slots:n}=t;const{layoutClasses:r,layoutStyles:s,getLayoutItem:i,items:o,layoutRef:a}=TD(e),{dimensionStyles:l}=Er(e);return Me(()=>{var u;return C("div",{ref:a,class:Oe([r.value,e.class]),style:Be([l.value,s.value,e.style])},[(u=n.default)==null?void 0:u.call(n)])}),{getLayoutItem:i,items:o}}}),sX={class:"text-h5"},iX={key:0},oX={key:1},aX=Ve({__name:"AddOrUpdateCameraStreamDialog",setup(e){const t=W1(),n=sn(on.AddOrUpdateCameraDialog),r=D(()=>"C"),s=G({name:"",streamURL:""}),i=()=>{var d;return((d=n.context())==null?void 0:d.addOrUpdate)==="update"},o=D(()=>i());xe(()=>n.context(),d=>{var h;if(!d||(d==null?void 0:d.addOrUpdate)!=="update"){s.value.streamURL="",s.value.name="";return}const f=(h=t.getQueryData(["cameraStream"]))==null?void 0:h.find(g=>g.cameraStream.id===d.cameraId);s.value.name=f==null?void 0:f.cameraStream.name,s.value.streamURL=(f==null?void 0:f.cameraStream.streamURL)||""});function a(){n.closeDialog()}async function l(){await Hp.createCameraStream({streamURL:s.value.streamURL,name:s.value.name}),await t.refetchQueries({queryKey:["cameraStream"]}),n.closeDialog()}async function u(){var d;await Hp.updateCameraStream((d=n.context())==null?void 0:d.cameraId,{streamURL:s.value.streamURL,name:s.value.name}),await t.refetchQueries({queryKey:["cameraStream"]}),n.closeDialog()}function c(){n.closeDialog()}return(d,f)=>{const h=Si;return $(),te(h,{id:Z(n).dialogId,"max-width":"800px",onEscape:f[3]||(f[3]=g=>a())},{default:v(()=>[p(kt,null,{default:v(()=>[p(un,null,{default:v(()=>[C("span",sX,[p(dt,{class:"mr-2",color:"primary",size:"56"},{default:v(()=>[E(ae(r.value),1)]),_:1}),o.value?($(),ye("span",iX," Updating Camera ")):($(),ye("span",oX," New Camera "))])]),_:1}),p(rn,null,{default:v(()=>[p(Xn,{"grid-list-md":""},{default:v(()=>[p(Zm,{wrap:""},{default:v(()=>[p(at,{modelValue:s.value.name,"onUpdate:modelValue":f[0]||(f[0]=g=>s.value.name=g),label:"Name",required:""},null,8,["modelValue"]),p(at,{modelValue:s.value.streamURL,"onUpdate:modelValue":f[1]||(f[1]=g=>s.value.streamURL=g),label:"Url (MJPEG)",required:""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),p(zn,null,{default:v(()=>[p(Pn),p(se,{color:"primary-darken-2",onClick:c},{default:v(()=>[...f[4]||(f[4]=[E(" Cancel ",-1)])]),_:1}),p(se,{color:"primary",onClick:f[2]||(f[2]=g=>o.value?u():l())},{default:v(()=>[E(ae(o.value?"Update":"Create"),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),q1=ks("TestPrinter",{state:()=>({currentCorrelationToken:void 0,testPrinter:void 0,testPrinterEvents:[]}),getters:{getEvents(){return()=>{var e;return(((e=this.testPrinterEvents)==null?void 0:e.filter(t=>t.correlationToken===this.currentCorrelationToken))||[]).filter(t=>(t.event!=="API_STATE_UPDATED"||t.payload!=="unset")&&(t.event!=="WS_STATE_UPDATED"||t.payload!=="unopened")).map(t=>{var r,s,i;return{event:t.event.startsWith("WS_")?"Socket":"API",payload:(s=(r=t.payload)==null?void 0:r.toString())==null?void 0:s.replace("noResponse","unreachable").replace("authFail","authentication failure"),failure:["authFail","noResponse","aborted","globalKey","error","connection error","closed","connection closed"].includes((i=t.payload)==null?void 0:i.toString())}})}}},actions:{clearEvents(){this.testPrinterEvents=[]},async createTestPrinter(e){return this.testPrinter=e,await tn.testConnection(e)},saveEvent(e){var t;(t=this.testPrinterEvents)==null||t.push(e)}}}),lX="error",uX="success",cX=Ve({__name:"PrinterChecksPanel",setup(e){const t=q1(),n=G(4);function r(){return t.getEvents().map(s=>({label:s.event,text:s.payload,color:s.failure?lX:uX}))}return(s,i)=>($(),te(We,{cols:Z(n)},{default:v(()=>[i[0]||(i[0]=C("strong",null," Checks: ",-1)),($(!0),ye(De,null,Zt(r(),(o,a)=>($(),te(yn,{key:a,type:o.color,density:"compact"},{default:v(()=>[C("small",null,ae(o.label)+" "+ae(o.text),1)]),_:2},1032,["type"]))),128))]),_:1},8,["cols"]))}}),dX="/assets/klipper-logo-B1Hu-a1R.svg",fX="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",uM=Symbol.for("vuetify:v-item-group"),hX=ce({...Ge(),...tf({selectedClass:"v-item--selected"}),...gt(),...Nt()},"VItemGroup"),pX=Ee()({name:"VItemGroup",props:hX(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{themeClasses:r}=nn(e),{isSelected:s,select:i,next:o,prev:a,selected:l}=Yu(e,uM);return()=>p(e.tag,{class:Oe(["v-item-group",r.value,e.class]),style:Be(e.style)},{default:()=>{var u;return[(u=n.default)==null?void 0:u.call(n,{isSelected:s,select:i,next:o,prev:a,selected:l.value})]}})}}),mX=Ee()({name:"VItem",props:nf(),emits:{"group:selected":e=>!0},setup(e,t){let{slots:n}=t;const{isSelected:r,select:s,toggle:i,selectedClass:o,value:a,disabled:l}=xu(e,uM);return()=>{var u;return(u=n.default)==null?void 0:u.call(n,{isSelected:r.value,selectedClass:o.value,select:s,toggle:i,value:a.value,disabled:l.value})}}}),gX={class:"text-h5"},vX={key:0},yX={key:1},bX={class:"ml-3 align-center"},wX=Ve({__name:"AddOrUpdatePrinterDialog",setup(e){const t=sn(on.AddOrUpdatePrinterDialog),n=Xt(),r=q1(),s=Ym(),i=Xe("appConstants"),o=$t(),a=G(null),l=G(!1),u=G(!1),c=G(!1),d=G(""),f=G(Zy()),h=D(()=>{var O,F,W,X;if(s.hasFeature("multiplePrinterServices")){const V=s.getFeature("multiplePrinterServices"),z=(F=(O=V==null?void 0:V.subFeatures)==null?void 0:O.types)==null?void 0:F.includes("klipper"),M=(X=(W=V==null?void 0:V.subFeatures)==null?void 0:W.types)==null?void 0:X.includes("prusaLink");return[{name:id(Bh),logo:nb,height:"60px"},...z?[{name:id(rb),logo:dX,height:"60px"}]:[],...M?[{name:id(Vh),logo:fX,height:"20px"}]:[]]}return[{name:"OctoPrint",logo:nb,height:"75px"}]}),g=D(()=>{var O;return(O=n.updateDialogPrinter)==null?void 0:O.id});xt(async()=>{if(g.value){const O=n.printer(g.value);f.value=tn.convertPrinterToCreateForm(O)}}),xe(g,O=>{if(!O)return;const F=n.printer(O);f.value=tn.convertPrinterToCreateForm(F)});const m=D(()=>n.updateDialogPrinter),y=D(()=>!!m.value),w=D(()=>y?"Save":"Create"),b=D(()=>{var O;return f?Wm((O=f.value)==null?void 0:O.name):"?"}),S=D(()=>({required:!0,max:i.maxPrinterNameLength})),_=D(()=>({required:!0,length:i.apiKeyLength,alpha_num:!0}));function k(){f.value=Zy()}function T(){c.value=!0}async function R(){if(!x())return;r.clearEvents(),T();const{correlationToken:O}=await r.createTestPrinter(f.value);r.currentCorrelationToken=O}const x=()=>{var F,W,X,V,z,M,re,H,j;const O=f.value;return O?Np(O.printerType)?((F=O.printerURL)==null?void 0:F.length)&&((W=O.name)==null?void 0:W.length):Bp(O.printerType)?((X=O.printerURL)==null?void 0:X.length)&&((V=O.name)==null?void 0:V.length)&&((z=O.username)==null?void 0:z.length)&&((M=O.password)==null?void 0:M.length):((re=O.printerURL)==null?void 0:re.length)&&((H=O.name)==null?void 0:H.length)&&((j=O.apiKey)==null?void 0:j.length):!1};async function I(O){await n.createPrinter(O,u.value),o.openInfoMessage({title:`Printer ${O.name} created`})}async function P(O){const F=O.id;await n.updatePrinter({printerId:F,updatedPrinter:O},u.value),o.openInfoMessage({title:`Printer ${O.name} updated`})}async function A(){var F,W,X,V,z;if(!x())return;a.value=null,l.value=!0,(F=f.value.printerURL)!=null&&F.length&&!((W=f.value.printerURL)!=null&&W.startsWith("http://"))&&!((X=f.value.printerURL)!=null&&X.startsWith("https://"))&&(f.value.printerURL+="https://");const O=f.value;(Np(O.printerType)||Bp(O.printerType))&&(O.apiKey="");try{y.value?await P(O):await I(O),B()}catch(M){M instanceof sI?(a.value=((z=(V=M.response)==null?void 0:V.data)==null?void 0:z.error)||M.message,o.error("Validation Failed",M.message)):(a.value=M.message,o.error("Error",M.message))}finally{l.value=!1,u.value=!1}}async function L(){f.value.name=fc(),n.updateDialogPrinter=void 0,a.value=null,u.value=!1,a.value=null}function B(){t.closeDialog(),u.value=!1,a.value=null,c.value=!1,r.clearEvents(),k(),n.updateDialogPrinter=void 0,d.value=""}return(O,F)=>{const W=cX,X=Si;return $(),te(X,{id:Z(t).dialogId,"max-width":Z(c)?"900px":"700px",onEscape:F[13]||(F[13]=V=>B())},{default:v(()=>[p(kt,{class:"pa-4"},{default:v(()=>[p(un,null,{default:v(()=>[C("span",gX,[p(dt,{color:"primary",size:"56"},{default:v(()=>[E(ae(Z(b)),1)]),_:1}),Z(y)?($(),ye("span",vX," Updating Printer ")):($(),ye("span",yX," New Printer "))])]),_:1}),p(rn,null,{default:v(()=>{var V;return[F[16]||(F[16]=C("h4",null,"Printer type",-1)),p(pX,{modelValue:Z(f).printerType,"onUpdate:modelValue":F[0]||(F[0]=z=>Z(f).printerType=z),mandatory:""},{default:v(()=>[p(Xn,null,{default:v(()=>[p(st,null,{default:v(()=>[($(!0),ye(De,null,Zt(Z(h),z=>($(),te(We,{key:z.name,cols:"4",md:"4"},{default:v(()=>[p(mX,null,{default:v(({isSelected:M,toggle:re})=>[p(kt,{color:M?"primary":"blue-grey darken-4",class:"d-flex align-center justify-center elevation-8",height:"60px",width:"225px",onClick:re},{default:v(()=>[p(bs,{height:z.height,src:z.logo,"max-width":"100px",width:"125px"},null,8,["height","src"]),p(OB,null,{default:v(()=>[C("h3",bX,ae(z.name),1)]),_:2},1024)]),_:2},1032,["color","onClick"])]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"]),p(st,null,{default:v(()=>[p(We,{cols:Z(c)?8:12},{default:v(()=>[Z(f)?($(),te(st,{key:0},{default:v(()=>[p(We,null,{default:v(()=>[p(at,{modelValue:Z(f).name,"onUpdate:modelValue":F[1]||(F[1]=z=>Z(f).name=z),counter:Z(S).max,autofocus:"",class:"ma-1",label:"Printer name*",required:""},null,8,["modelValue","counter"])]),_:1}),p(We,null,{default:v(()=>[p(wn,{modelValue:Z(f).enabled,"onUpdate:modelValue":F[2]||(F[2]=z=>Z(f).enabled=z),hint:"Disabling makes the printer passive",label:"Enabled*","persistent-hint":"",required:""},null,8,["modelValue"])]),_:1})]),_:1})):ve("",!0),p(at,{modelValue:Z(f).printerURL,"onUpdate:modelValue":F[3]||(F[3]=z=>Z(f).printerURL=z),class:"ma-1",hint:"F.e. 'octopi.local' or 'https://my.printer.com'",label:"Printer URL*"},null,8,["modelValue"]),Z(f).printerType===Z(Bh)?($(),te(at,{key:1,modelValue:Z(f).apiKey,"onUpdate:modelValue":F[4]||(F[4]=z=>Z(f).apiKey=z),counter:Z(_).length,class:"ma-1",hint:"User or Application Key with 32 or 43 characters (Global API key will fail)",label:Z(f).printerType===Z(Bh)||Z(f).printerType===Z(rb)?"API Key (unsupported)":"API Key (required)*","persistent-hint":"",required:""},null,8,["modelValue","counter","label"])):ve("",!0),Z(f).printerType===Z(Vh)?($(),te(at,{key:2,modelValue:Z(f).username,"onUpdate:modelValue":F[5]||(F[5]=z=>Z(f).username=z),class:"ma-1",hint:"Username (often 'maker')",label:"Username","persistent-hint":"",required:""},null,8,["modelValue"])):ve("",!0),Z(f).printerType===Z(Vh)?($(),te(at,{key:3,modelValue:Z(f).password,"onUpdate:modelValue":F[6]||(F[6]=z=>Z(f).password=z),class:"ma-1",hint:"Password (visit your printer settings)",label:"Password","persistent-hint":"",required:""},null,8,["modelValue"])):ve("",!0)]),_:1},8,["cols"]),Z(c)?($(),te(W,{key:0,cols:4},{default:v(()=>[p(se,{onClick:F[7]||(F[7]=z=>c.value=!1)},{default:v(()=>[...F[14]||(F[14]=[E(" Hide checks",-1)])]),_:1})]),_:1})):ve("",!0)]),_:1}),(V=Z(a))!=null&&V.length?($(),te(yn,{key:0,class:"my-3",color:"primary"},{default:v(()=>[E(ae(Z(a))+" ",1),p(wn,{modelValue:Z(u),"onUpdate:modelValue":F[8]||(F[8]=z=>nt(u)?u.value=z:null),color:"warning",label:"Force save"},null,8,["modelValue"])]),_:1})):ve("",!0),Z(l)?($(),te(yn,{key:1,class:"my-3"},{default:v(()=>[F[15]||(F[15]=E(" Validating printer ",-1)),p(di,{indeterminate:""})]),_:1})):ve("",!0)]}),_:1}),p(zn,null,{default:v(()=>[F[20]||(F[20]=C("em",{class:"text-red"}," * indicates required field ",-1)),p(Pn),p(se,{variant:"text",onClick:F[9]||(F[9]=V=>B())},{default:v(()=>[...F[17]||(F[17]=[E(" Close ",-1)])]),_:1}),Z(y)?($(),te(se,{key:0,color:"gray",variant:"text",onClick:F[10]||(F[10]=V=>L())},{default:v(()=>[...F[18]||(F[18]=[E(" Duplicate ",-1)])]),_:1})):ve("",!0),p(se,{color:"warning",variant:"text",onClick:F[11]||(F[11]=V=>R())},{default:v(()=>[...F[19]||(F[19]=[E(" Test connection ",-1)])]),_:1}),p(se,{color:"blue-darken-1",variant:"text",onClick:F[12]||(F[12]=V=>A())},{default:v(()=>[E(ae(Z(w)),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["id","max-width"])}}}),SX=ce({text:String,...Ge(),...gt()},"VToolbarTitle"),$n=Ee()({name:"VToolbarTitle",props:SX(),setup(e,t){let{slots:n}=t;return Me(()=>{const r=!!(n.default||n.text||e.text);return p(e.tag,{class:Oe(["v-toolbar-title",e.class]),style:Be(e.style)},{default:()=>{var s;return[r&&C("div",{class:"v-toolbar-title__placeholder"},[n.text?n.text():e.text,(s=n.default)==null?void 0:s.call(n)])]}})}),{}}}),_X=[null,"prominent","default","comfortable","compact"],cM=ce({absolute:Boolean,collapse:Boolean,collapsePosition:{type:String,default:"start"},color:String,density:{type:String,default:"default",validator:e=>_X.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,...xs(),...Ge(),...Cs(),...Hn(),...gt({tag:"header"}),...Nt()},"VToolbar"),kr=Ee()({name:"VToolbar",props:cM(),setup(e,t){var h;let{slots:n}=t;const{backgroundColorClasses:r,backgroundColorStyles:s}=wr(()=>e.color),{borderClasses:i}=Hs(e),{elevationClasses:o}=js(e),{roundedClasses:a}=Zn(e),{themeClasses:l}=nn(e),{rtlClasses:u}=Wr(),c=Ce(e.extended===null?!!((h=n.extension)!=null&&h.call(n)):e.extended),d=D(()=>parseInt(Number(e.height)+(e.density==="prominent"?Number(e.height):0)-(e.density==="comfortable"?8:0)-(e.density==="compact"?16:0),10)),f=D(()=>c.value?parseInt(Number(e.extensionHeight)+(e.density==="prominent"?Number(e.extensionHeight):0)-(e.density==="comfortable"?4:0)-(e.density==="compact"?8:0),10):0);return zr({VBtn:{variant:"text"}}),Me(()=>{var w;const g=!!(e.title||n.title),m=!!(n.image||e.image),y=(w=n.extension)==null?void 0:w.call(n);return c.value=e.extended===null?!!y:e.extended,p(e.tag,{class:Oe(["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,o.value,a.value,l.value,u.value,e.class]),style:Be([s.value,e.style])},{default:()=>[m&&C("div",{key:"image",class:"v-toolbar__image"},[n.image?p(Ft,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{cover:!0,src:e.image}}},n.image):p(bs,{key:"image-img",cover:!0,src:e.image},null)]),p(Ft,{defaults:{VTabs:{height:Le(d.value)}}},{default:()=>{var b,S,_;return[C("div",{class:"v-toolbar__content",style:{height:Le(d.value)}},[n.prepend&&C("div",{class:"v-toolbar__prepend"},[(b=n.prepend)==null?void 0:b.call(n)]),g&&p($n,{key:"title",text:e.title},{text:n.title}),(S=n.default)==null?void 0:S.call(n),n.append&&C("div",{class:"v-toolbar__append"},[(_=n.append)==null?void 0:_.call(n)])])]}}),p(Ft,{defaults:{VTabs:{height:Le(f.value)}}},{default:()=>[p(_P,null,{default:()=>[c.value&&C("div",{class:"v-toolbar__extension",style:{height:Le(f.value)}},[y])]})]})]})}),{contentHeight:d,extensionHeight:f}}}),kX=Ve({__name:"HelpOverlay",setup(e){const t=G(!1);return(n,r)=>($(),te(DP,{modelValue:Z(t),"onUpdate:modelValue":r[0]||(r[0]=s=>nt(t)?t.value=s:null),fullscreen:"",eager:"",transition:"dialog-bottom-transition",width:"100%"},{activator:v(({props:s})=>[p(ot,{location:"top"},{activator:v(({props:i})=>[p(se,ge({icon:"help"},{...s,...i}),{default:v(()=>[p(ee,null,{default:v(()=>[...r[1]||(r[1]=[E("help",-1)])]),_:1})]),_:1},16)]),default:v(()=>[r[2]||(r[2]=C("span",null," Load the online documentation webpage ",-1))]),_:2},1024)]),default:v(({isActive:s})=>[p(kt,{height:"100%",width:"100%"},{default:v(()=>[p(kr,{color:"primary"},{default:v(()=>[p(ee,{class:"ml-5"},{default:v(()=>[...r[3]||(r[3]=[E("help",-1)])]),_:1}),r[6]||(r[6]=C("h2",{class:"ml-10"},"FDM Monster Documentation",-1)),p(Pn),r[7]||(r[7]=C("span",{class:"mr-10"}," docs.fdm-monster.net ",-1)),p(se,{variant:"flat",onClick:i=>s.value=!1},{default:v(()=>[p(ee,{class:"mr-2"},{default:v(()=>[...r[4]||(r[4]=[E("close",-1)])]),_:1}),r[5]||(r[5]=E(" Close help ",-1))]),_:1},8,["onClick"])]),_:2},1024),r[8]||(r[8]=C("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"]))}}),xX=Ve({__name:"TooltipButton",props:{tooltip:{},color:{default:"white"},icon:{default:""},iconClass:{default:""},text:{default:""},location:{default:"bottom"}},emits:["click"],setup(e){const t=e;return(n,r)=>($(),te(ot,{location:t.location},{activator:v(({props:s})=>[p(se,ge(s,{variant:"outlined",class:"ml-2",color:e.color,onClick:r[0]||(r[0]=i=>n.$emit("click"))}),{default:v(()=>[gm(n.$slots,"default",{},()=>{var i;return[(i=t.icon)!=null&&i.length?($(),te(ee,{key:0,class:Oe("mr-2 "+t.iconClass)},{default:v(()=>[E(ae(t.icon),1)]),_:1},8,["class"])):ve("",!0),E(" "+ae(t.text),1)]})]),_:3},16,["color"])]),default:v(()=>[C("span",null,ae(t.tooltip),1)]),_:3},8,["location"]))}});/*!
|
|
73
|
+
* vue-router v4.6.4
|
|
74
|
+
* (c) 2025 Eduardo San Martin Morote
|
|
75
|
+
* @license MIT
|
|
76
|
+
*/const zl=typeof document<"u";function dM(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function EX(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&dM(e.default)}const Pt=Object.assign;function pv(e,t){const n={};for(const r in t){const s=t[r];n[r]=zs(s)?s.map(e):e(s)}return n}const ad=()=>{},zs=Array.isArray;function $x(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}const fM=/#/g,CX=/&/g,TX=/\//g,RX=/=/g,PX=/\?/g,hM=/\+/g,IX=/%5B/g,AX=/%5D/g,pM=/%5E/g,OX=/%60/g,mM=/%7B/g,DX=/%7C/g,gM=/%7D/g,MX=/%20/g;function G1(e){return e==null?"":encodeURI(""+e).replace(DX,"|").replace(IX,"[").replace(AX,"]")}function LX(e){return G1(e).replace(mM,"{").replace(gM,"}").replace(pM,"^")}function kb(e){return G1(e).replace(hM,"%2B").replace(MX,"+").replace(fM,"%23").replace(CX,"%26").replace(OX,"`").replace(mM,"{").replace(gM,"}").replace(pM,"^")}function FX(e){return kb(e).replace(RX,"%3D")}function $X(e){return G1(e).replace(fM,"%23").replace(PX,"%3F")}function NX(e){return $X(e).replace(TX,"%2F")}function Nd(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const BX=/\/$/,VX=e=>e.replace(BX,"");function mv(e,t,n="/"){let r,s={},i="",o="";const a=t.indexOf("#");let l=t.indexOf("?");return l=a>=0&&l>a?-1:l,l>=0&&(r=t.slice(0,l),i=t.slice(l,a>0?a:t.length),s=e(i.slice(1))),a>=0&&(r=r||t.slice(0,a),o=t.slice(a,t.length)),r=jX(r??t,n),{fullPath:r+i+o,path:r,query:s,hash:Nd(o)}}function UX(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Nx(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function zX(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&Vu(t.matched[r],n.matched[s])&&vM(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Vu(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function vM(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!HX(e[n],t[n]))return!1;return!0}function HX(e,t){return zs(e)?Bx(e,t):zs(t)?Bx(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function Bx(e,t){return zs(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function jX(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),s=r[r.length-1];(s===".."||s===".")&&r.push("");let i=n.length-1,o,a;for(o=0;o<r.length;o++)if(a=r[o],a!==".")if(a==="..")i>1&&i--;else break;return n.slice(0,i).join("/")+"/"+r.slice(o).join("/")}const mo={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let xb=function(e){return e.pop="pop",e.push="push",e}({}),gv=function(e){return e.back="back",e.forward="forward",e.unknown="",e}({});function WX(e){if(!e)if(zl){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),VX(e)}const qX=/^[^#]+#/;function GX(e,t){return e.replace(qX,"#")+t}function KX(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 eg=()=>({left:window.scrollX,top:window.scrollY});function YX(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=KX(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 Vx(e,t){return(history.state?history.state.position-t:-1)+e}const Eb=new Map;function XX(e,t){Eb.set(e,t)}function QX(e){const t=Eb.get(e);return Eb.delete(e),t}function JX(e){return typeof e=="string"||e&&typeof e=="object"}function yM(e){return typeof e=="string"||typeof e=="symbol"}let mn=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 bM=Symbol("");mn.MATCHER_NOT_FOUND+"",mn.NAVIGATION_GUARD_REDIRECT+"",mn.NAVIGATION_ABORTED+"",mn.NAVIGATION_CANCELLED+"",mn.NAVIGATION_DUPLICATED+"";function Uu(e,t){return Pt(new Error,{type:e,[bM]:!0},t)}function Ri(e,t){return e instanceof Error&&bM in e&&(t==null||!!(e.type&t))}const ZX=["params","query","hash"];function eQ(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of ZX)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function tQ(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(hM," "),i=s.indexOf("="),o=Nd(i<0?s:s.slice(0,i)),a=i<0?null:Nd(s.slice(i+1));if(o in t){let l=t[o];zs(l)||(l=t[o]=[l]),l.push(a)}else t[o]=a}return t}function Ux(e){let t="";for(let n in e){const r=e[n];if(n=FX(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(zs(r)?r.map(s=>s&&kb(s)):[r&&kb(r)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function nQ(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=zs(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}const rQ=Symbol(""),zx=Symbol(""),tg=Symbol(""),K1=Symbol(""),Cb=Symbol("");function Pc(){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 Co(e,t,n,r,s,i=o=>o()){const o=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((a,l)=>{const u=f=>{f===!1?l(Uu(mn.NAVIGATION_ABORTED,{from:n,to:t})):f instanceof Error?l(f):JX(f)?l(Uu(mn.NAVIGATION_GUARD_REDIRECT,{from:t,to:f})):(o&&r.enterCallbacks[s]===o&&typeof f=="function"&&o.push(f),a())},c=i(()=>e.call(r&&r.instances[s],t,n,u));let d=Promise.resolve(c);e.length<3&&(d=d.then(u)),d.catch(f=>l(f))})}function vv(e,t,n,r,s=i=>i()){const i=[];for(const o of e)for(const a in o.components){let l=o.components[a];if(!(t!=="beforeRouteEnter"&&!o.instances[a]))if(dM(l)){const u=(l.__vccOpts||l)[t];u&&i.push(Co(u,n,r,o,a,s))}else{let u=l();i.push(()=>u.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const d=EX(c)?c.default:c;o.mods[a]=c,o.components[a]=d;const f=(d.__vccOpts||d)[t];return f&&Co(f,n,r,o,a,s)()}))}}return i}function sQ(e,t){const n=[],r=[],s=[],i=Math.max(t.matched.length,e.matched.length);for(let o=0;o<i;o++){const a=t.matched[o];a&&(e.matched.find(u=>Vu(u,a))?r.push(a):n.push(a));const l=e.matched[o];l&&(t.matched.find(u=>Vu(u,l))||s.push(l))}return[n,r,s]}/*!
|
|
77
|
+
* vue-router v4.6.4
|
|
78
|
+
* (c) 2025 Eduardo San Martin Morote
|
|
79
|
+
* @license MIT
|
|
80
|
+
*/let iQ=()=>location.protocol+"//"+location.host;function wM(e,t){const{pathname:n,search:r,hash:s}=t,i=e.indexOf("#");if(i>-1){let o=s.includes(e.slice(i))?e.slice(i).length:1,a=s.slice(o);return a[0]!=="/"&&(a="/"+a),Nx(a,"")}return Nx(n,e)+r+s}function oQ(e,t,n,r){let s=[],i=[],o=null;const a=({state:f})=>{const h=wM(e,location),g=n.value,m=t.value;let y=0;if(f){if(n.value=h,t.value=f,o&&o===g){o=null;return}y=m?f.position-m.position:0}else r(h);s.forEach(w=>{w(n.value,g,{delta:y,type:xb.pop,direction:y?y>0?gv.forward:gv.back:gv.unknown})})};function l(){o=n.value}function u(f){s.push(f);const h=()=>{const g=s.indexOf(f);g>-1&&s.splice(g,1)};return i.push(h),h}function c(){if(document.visibilityState==="hidden"){const{history:f}=window;if(!f.state)return;f.replaceState(Pt({},f.state,{scroll:eg()}),"")}}function d(){for(const f of i)f();i=[],window.removeEventListener("popstate",a),window.removeEventListener("pagehide",c),document.removeEventListener("visibilitychange",c)}return window.addEventListener("popstate",a),window.addEventListener("pagehide",c),document.addEventListener("visibilitychange",c),{pauseListeners:l,listen:u,destroy:d}}function Hx(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?eg():null}}function aQ(e){const{history:t,location:n}=window,r={value:wM(e,n)},s={value:t.state};s.value||i(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(l,u,c){const d=e.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+l:iQ()+e+l;try{t[c?"replaceState":"pushState"](u,"",f),s.value=u}catch(h){console.error(h),n[c?"replace":"assign"](f)}}function o(l,u){i(l,Pt({},t.state,Hx(s.value.back,l,s.value.forward,!0),u,{position:s.value.position}),!0),r.value=l}function a(l,u){const c=Pt({},s.value,t.state,{forward:l,scroll:eg()});i(c.current,c,!0),i(l,Pt({},Hx(r.value,l,null),{position:c.position+1},u),!1),r.value=l}return{location:r,state:s,push:a,replace:o}}function lQ(e){e=WX(e);const t=aQ(e),n=oQ(e,t.state,t.location,t.replace);function r(i,o=!0){o||n.pauseListeners(),history.go(i)}const s=Pt({location:"",base:e,go:r,createHref:GX.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 Oa=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var An=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}(An||{});const uQ={type:Oa.Static,value:""},cQ=/[a-zA-Z0-9_]/;function dQ(e){if(!e)return[[]];if(e==="/")return[[uQ]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(h){throw new Error(`ERR (${n})/"${u}": ${h}`)}let n=An.Static,r=n;const s=[];let i;function o(){i&&s.push(i),i=[]}let a=0,l,u="",c="";function d(){u&&(n===An.Static?i.push({type:Oa.Static,value:u}):n===An.Param||n===An.ParamRegExp||n===An.ParamRegExpEnd?(i.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),i.push({type:Oa.Param,value:u,regexp:c,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),u="")}function f(){u+=l}for(;a<e.length;){if(l=e[a++],l==="\\"&&n!==An.ParamRegExp){r=n,n=An.EscapeNext;continue}switch(n){case An.Static:l==="/"?(u&&d(),o()):l===":"?(d(),n=An.Param):f();break;case An.EscapeNext:f(),n=r;break;case An.Param:l==="("?n=An.ParamRegExp:cQ.test(l)?f():(d(),n=An.Static,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case An.ParamRegExp:l===")"?c[c.length-1]=="\\"?c=c.slice(0,-1)+l:n=An.ParamRegExpEnd:c+=l;break;case An.ParamRegExpEnd:d(),n=An.Static,l!=="*"&&l!=="?"&&l!=="+"&&a--,c="";break;default:t("Unknown state");break}}return n===An.ParamRegExp&&t(`Unfinished custom RegExp for param "${u}"`),d(),o(),s}const jx="[^/]+?",fQ={sensitive:!1,strict:!1,start:!0,end:!0};var vr=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}(vr||{});const hQ=/[.+*?^${}()[\]/\\]/g;function pQ(e,t){const n=Pt({},fQ,t),r=[];let s=n.start?"^":"";const i=[];for(const u of e){const c=u.length?[]:[vr.Root];n.strict&&!u.length&&(s+="/");for(let d=0;d<u.length;d++){const f=u[d];let h=vr.Segment+(n.sensitive?vr.BonusCaseSensitive:0);if(f.type===Oa.Static)d||(s+="/"),s+=f.value.replace(hQ,"\\$&"),h+=vr.Static;else if(f.type===Oa.Param){const{value:g,repeatable:m,optional:y,regexp:w}=f;i.push({name:g,repeatable:m,optional:y});const b=w||jx;if(b!==jx){h+=vr.BonusCustomRegExp;try{`${b}`}catch(_){throw new Error(`Invalid custom RegExp for param "${g}" (${b}): `+_.message)}}let S=m?`((?:${b})(?:/(?:${b}))*)`:`(${b})`;d||(S=y&&u.length<2?`(?:/${S})`:"/"+S),y&&(S+="?"),s+=S,h+=vr.Dynamic,y&&(h+=vr.BonusOptional),m&&(h+=vr.BonusRepeatable),b===".*"&&(h+=vr.BonusWildcard)}c.push(h)}r.push(c)}if(n.strict&&n.end){const u=r.length-1;r[u][r[u].length-1]+=vr.BonusStrict}n.strict||(s+="/?"),n.end?s+="$":n.strict&&!s.endsWith("/")&&(s+="(?:/|$)");const o=new RegExp(s,n.sensitive?"":"i");function a(u){const c=u.match(o),d={};if(!c)return null;for(let f=1;f<c.length;f++){const h=c[f]||"",g=i[f-1];d[g.name]=h&&g.repeatable?h.split("/"):h}return d}function l(u){let c="",d=!1;for(const f of e){(!d||!c.endsWith("/"))&&(c+="/"),d=!1;for(const h of f)if(h.type===Oa.Static)c+=h.value;else if(h.type===Oa.Param){const{value:g,repeatable:m,optional:y}=h,w=g in u?u[g]:"";if(zs(w)&&!m)throw new Error(`Provided param "${g}" is an array but it is not repeatable (* or + modifiers)`);const b=zs(w)?w.join("/"):w;if(!b)if(y)f.length<2&&(c.endsWith("/")?c=c.slice(0,-1):d=!0);else throw new Error(`Missing required param "${g}"`);c+=b}}return c||"/"}return{re:o,score:r,keys:i,parse:a,stringify:l}}function mQ(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]===vr.Static+vr.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===vr.Static+vr.Segment?1:-1:0}function SM(e,t){let n=0;const r=e.score,s=t.score;for(;n<r.length&&n<s.length;){const i=mQ(r[n],s[n]);if(i)return i;n++}if(Math.abs(s.length-r.length)===1){if(Wx(r))return 1;if(Wx(s))return-1}return s.length-r.length}function Wx(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const gQ={strict:!1,end:!0,sensitive:!1};function vQ(e,t,n){const r=pQ(dQ(e.path),n),s=Pt(r,{record:e,parent:t,children:[],alias:[]});return t&&!s.record.aliasOf==!t.record.aliasOf&&t.children.push(s),s}function yQ(e,t){const n=[],r=new Map;t=$x(gQ,t);function s(d){return r.get(d)}function i(d,f,h){const g=!h,m=Gx(d);m.aliasOf=h&&h.record;const y=$x(t,d),w=[m];if("alias"in d){const _=typeof d.alias=="string"?[d.alias]:d.alias;for(const k of _)w.push(Gx(Pt({},m,{components:h?h.record.components:m.components,path:k,aliasOf:h?h.record:m})))}let b,S;for(const _ of w){const{path:k}=_;if(f&&k[0]!=="/"){const T=f.record.path,R=T[T.length-1]==="/"?"":"/";_.path=f.record.path+(k&&R+k)}if(b=vQ(_,f,y),h?h.alias.push(b):(S=S||b,S!==b&&S.alias.push(b),g&&d.name&&!Kx(b)&&o(d.name)),_M(b)&&l(b),m.children){const T=m.children;for(let R=0;R<T.length;R++)i(T[R],b,h&&h.children[R])}h=h||b}return S?()=>{o(S)}:ad}function o(d){if(yM(d)){const f=r.get(d);f&&(r.delete(d),n.splice(n.indexOf(f),1),f.children.forEach(o),f.alias.forEach(o))}else{const f=n.indexOf(d);f>-1&&(n.splice(f,1),d.record.name&&r.delete(d.record.name),d.children.forEach(o),d.alias.forEach(o))}}function a(){return n}function l(d){const f=SQ(d,n);n.splice(f,0,d),d.record.name&&!Kx(d)&&r.set(d.record.name,d)}function u(d,f){let h,g={},m,y;if("name"in d&&d.name){if(h=r.get(d.name),!h)throw Uu(mn.MATCHER_NOT_FOUND,{location:d});y=h.record.name,g=Pt(qx(f.params,h.keys.filter(S=>!S.optional).concat(h.parent?h.parent.keys.filter(S=>S.optional):[]).map(S=>S.name)),d.params&&qx(d.params,h.keys.map(S=>S.name))),m=h.stringify(g)}else if(d.path!=null)m=d.path,h=n.find(S=>S.re.test(m)),h&&(g=h.parse(m),y=h.record.name);else{if(h=f.name?r.get(f.name):n.find(S=>S.re.test(f.path)),!h)throw Uu(mn.MATCHER_NOT_FOUND,{location:d,currentLocation:f});y=h.record.name,g=Pt({},f.params,d.params),m=h.stringify(g)}const w=[];let b=h;for(;b;)w.unshift(b.record),b=b.parent;return{name:y,path:m,params:g,matched:w,meta:wQ(w)}}e.forEach(d=>i(d));function c(){n.length=0,r.clear()}return{addRoute:i,resolve:u,removeRoute:o,clearRoutes:c,getRoutes:a,getRecordMatcher:s}}function qx(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function Gx(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:bQ(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 bQ(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 Kx(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function wQ(e){return e.reduce((t,n)=>Pt(t,n.meta),{})}function SQ(e,t){let n=0,r=t.length;for(;n!==r;){const i=n+r>>1;SM(e,t[i])<0?r=i:n=i+1}const s=_Q(e);return s&&(r=t.lastIndexOf(s,r-1)),r}function _Q(e){let t=e;for(;t=t.parent;)if(_M(t)&&SM(e,t)===0)return t}function _M({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Yx(e){const t=Xe(tg),n=Xe(K1),r=D(()=>{const l=Z(e.to);return t.resolve(l)}),s=D(()=>{const{matched:l}=r.value,{length:u}=l,c=l[u-1],d=n.matched;if(!c||!d.length)return-1;const f=d.findIndex(Vu.bind(null,c));if(f>-1)return f;const h=Xx(l[u-2]);return u>1&&Xx(c)===h&&d[d.length-1].path!==h?d.findIndex(Vu.bind(null,l[u-2])):f}),i=D(()=>s.value>-1&&TQ(n.params,r.value.params)),o=D(()=>s.value>-1&&s.value===n.matched.length-1&&vM(n.params,r.value.params));function a(l={}){if(CQ(l)){const u=t[Z(e.replace)?"replace":"push"](Z(e.to)).catch(ad);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:r,href:D(()=>r.value.href),isActive:i,isExactActive:o,navigate:a}}function kQ(e){return e.length===1?e[0]:e}const xQ=Ve({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:Yx,setup(e,{slots:t}){const n=gn(Yx(e)),{options:r}=Xe(tg),s=D(()=>({[Qx(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[Qx(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&kQ(t.default(n));return e.custom?i:_r("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},i)}}}),EQ=xQ;function CQ(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 TQ(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(!zs(s)||s.length!==r.length||r.some((i,o)=>i.valueOf()!==s[o].valueOf()))return!1}return!0}function Xx(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Qx=(e,t,n)=>e??t??n,RQ=Ve({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=Xe(Cb),s=D(()=>e.route||r.value),i=Xe(zx,0),o=D(()=>{let u=Z(i);const{matched:c}=s.value;let d;for(;(d=c[u])&&!d.components;)u++;return u}),a=D(()=>s.value.matched[o.value]);Jt(zx,D(()=>o.value+1)),Jt(rQ,a),Jt(Cb,s);const l=G();return xe(()=>[l.value,a.value,e.name],([u,c,d],[f,h,g])=>{c&&(c.instances[d]=u,h&&h!==c&&u&&u===f&&(c.leaveGuards.size||(c.leaveGuards=h.leaveGuards),c.updateGuards.size||(c.updateGuards=h.updateGuards))),u&&c&&(!h||!Vu(c,h)||!f)&&(c.enterCallbacks[d]||[]).forEach(m=>m(u))},{flush:"post"}),()=>{const u=s.value,c=e.name,d=a.value,f=d&&d.components[c];if(!f)return Jx(n.default,{Component:f,route:u});const h=d.props[c],g=h?h===!0?u.params:typeof h=="function"?h(u):h:null,y=_r(f,Pt({},g,t,{onVnodeUnmounted:w=>{w.component.isUnmounted&&(d.instances[c]=null)},ref:l}));return Jx(n.default,{Component:y,route:u})||y}}});function Jx(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const PQ=RQ;function IQ(e){const t=yQ(e.routes,e),n=e.parseQuery||tQ,r=e.stringifyQuery||Ux,s=e.history,i=Pc(),o=Pc(),a=Pc(),l=Ce(mo);let u=mo;zl&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=pv.bind(null,q=>""+q),d=pv.bind(null,NX),f=pv.bind(null,Nd);function h(q,he){let ne,K;return yM(q)?(ne=t.getRecordMatcher(q),K=he):K=q,t.addRoute(K,ne)}function g(q){const he=t.getRecordMatcher(q);he&&t.removeRoute(he)}function m(){return t.getRoutes().map(q=>q.record)}function y(q){return!!t.getRecordMatcher(q)}function w(q,he){if(he=Pt({},he||l.value),typeof q=="string"){const U=mv(n,q,he.path),Y=t.resolve({path:U.path},he),le=s.createHref(U.fullPath);return Pt(U,Y,{params:f(Y.params),hash:Nd(U.hash),redirectedFrom:void 0,href:le})}let ne;if(q.path!=null)ne=Pt({},q,{path:mv(n,q.path,he.path).path});else{const U=Pt({},q.params);for(const Y in U)U[Y]==null&&delete U[Y];ne=Pt({},q,{params:d(U)}),he.params=d(he.params)}const K=t.resolve(ne,he),ke=q.hash||"";K.params=c(f(K.params));const Re=UX(r,Pt({},q,{hash:LX(ke),path:K.path})),N=s.createHref(Re);return Pt({fullPath:Re,hash:ke,query:r===Ux?nQ(q.query):q.query||{}},K,{redirectedFrom:void 0,href:N})}function b(q){return typeof q=="string"?mv(n,q,l.value.path):Pt({},q)}function S(q,he){if(u!==q)return Uu(mn.NAVIGATION_CANCELLED,{from:he,to:q})}function _(q){return R(q)}function k(q){return _(Pt(b(q),{replace:!0}))}function T(q,he){const ne=q.matched[q.matched.length-1];if(ne&&ne.redirect){const{redirect:K}=ne;let ke=typeof K=="function"?K(q,he):K;return typeof ke=="string"&&(ke=ke.includes("?")||ke.includes("#")?ke=b(ke):{path:ke},ke.params={}),Pt({query:q.query,hash:q.hash,params:ke.path!=null?{}:q.params},ke)}}function R(q,he){const ne=u=w(q),K=l.value,ke=q.state,Re=q.force,N=q.replace===!0,U=T(ne,K);if(U)return R(Pt(b(U),{state:typeof U=="object"?Pt({},ke,U.state):ke,force:Re,replace:N}),he||ne);const Y=ne;Y.redirectedFrom=he;let le;return!Re&&zX(r,K,ne)&&(le=Uu(mn.NAVIGATION_DUPLICATED,{to:Y,from:K}),re(K,K,!0,!1)),(le?Promise.resolve(le):P(Y,K)).catch(oe=>Ri(oe)?Ri(oe,mn.NAVIGATION_GUARD_REDIRECT)?oe:M(oe):V(oe,Y,K)).then(oe=>{if(oe){if(Ri(oe,mn.NAVIGATION_GUARD_REDIRECT))return R(Pt({replace:N},b(oe.to),{state:typeof oe.to=="object"?Pt({},ke,oe.to.state):ke,force:Re}),he||Y)}else oe=L(Y,K,!0,N,ke);return A(Y,K,oe),oe})}function x(q,he){const ne=S(q,he);return ne?Promise.reject(ne):Promise.resolve()}function I(q){const he=pe.values().next().value;return he&&typeof he.runWithContext=="function"?he.runWithContext(q):q()}function P(q,he){let ne;const[K,ke,Re]=sQ(q,he);ne=vv(K.reverse(),"beforeRouteLeave",q,he);for(const U of K)U.leaveGuards.forEach(Y=>{ne.push(Co(Y,q,he))});const N=x.bind(null,q,he);return ne.push(N),we(ne).then(()=>{ne=[];for(const U of i.list())ne.push(Co(U,q,he));return ne.push(N),we(ne)}).then(()=>{ne=vv(ke,"beforeRouteUpdate",q,he);for(const U of ke)U.updateGuards.forEach(Y=>{ne.push(Co(Y,q,he))});return ne.push(N),we(ne)}).then(()=>{ne=[];for(const U of Re)if(U.beforeEnter)if(zs(U.beforeEnter))for(const Y of U.beforeEnter)ne.push(Co(Y,q,he));else ne.push(Co(U.beforeEnter,q,he));return ne.push(N),we(ne)}).then(()=>(q.matched.forEach(U=>U.enterCallbacks={}),ne=vv(Re,"beforeRouteEnter",q,he,I),ne.push(N),we(ne))).then(()=>{ne=[];for(const U of o.list())ne.push(Co(U,q,he));return ne.push(N),we(ne)}).catch(U=>Ri(U,mn.NAVIGATION_CANCELLED)?U:Promise.reject(U))}function A(q,he,ne){a.list().forEach(K=>I(()=>K(q,he,ne)))}function L(q,he,ne,K,ke){const Re=S(q,he);if(Re)return Re;const N=he===mo,U=zl?history.state:{};ne&&(K||N?s.replace(q.fullPath,Pt({scroll:N&&U&&U.scroll},ke)):s.push(q.fullPath,ke)),l.value=q,re(q,he,ne,N),M()}let B;function O(){B||(B=s.listen((q,he,ne)=>{if(!J.listening)return;const K=w(q),ke=T(K,J.currentRoute.value);if(ke){R(Pt(ke,{replace:!0,force:!0}),K).catch(ad);return}u=K;const Re=l.value;zl&&XX(Vx(Re.fullPath,ne.delta),eg()),P(K,Re).catch(N=>Ri(N,mn.NAVIGATION_ABORTED|mn.NAVIGATION_CANCELLED)?N:Ri(N,mn.NAVIGATION_GUARD_REDIRECT)?(R(Pt(b(N.to),{force:!0}),K).then(U=>{Ri(U,mn.NAVIGATION_ABORTED|mn.NAVIGATION_DUPLICATED)&&!ne.delta&&ne.type===xb.pop&&s.go(-1,!1)}).catch(ad),Promise.reject()):(ne.delta&&s.go(-ne.delta,!1),V(N,K,Re))).then(N=>{N=N||L(K,Re,!1),N&&(ne.delta&&!Ri(N,mn.NAVIGATION_CANCELLED)?s.go(-ne.delta,!1):ne.type===xb.pop&&Ri(N,mn.NAVIGATION_ABORTED|mn.NAVIGATION_DUPLICATED)&&s.go(-1,!1)),A(K,Re,N)}).catch(ad)}))}let F=Pc(),W=Pc(),X;function V(q,he,ne){M(q);const K=W.list();return K.length?K.forEach(ke=>ke(q,he,ne)):console.error(q),Promise.reject(q)}function z(){return X&&l.value!==mo?Promise.resolve():new Promise((q,he)=>{F.add([q,he])})}function M(q){return X||(X=!q,O(),F.list().forEach(([he,ne])=>q?ne(q):he()),F.reset()),q}function re(q,he,ne,K){const{scrollBehavior:ke}=e;if(!zl||!ke)return Promise.resolve();const Re=!ne&&QX(Vx(q.fullPath,0))||(K||!ne)&&history.state&&history.state.scroll||null;return ht().then(()=>ke(q,he,Re)).then(N=>N&&YX(N)).catch(N=>V(N,q,he))}const H=q=>s.go(q);let j;const pe=new Set,J={currentRoute:l,listening:!0,addRoute:h,removeRoute:g,clearRoutes:t.clearRoutes,hasRoute:y,getRoutes:m,resolve:w,options:e,push:_,replace:k,go:H,back:()=>H(-1),forward:()=>H(1),beforeEach:i.add,beforeResolve:o.add,afterEach:a.add,onError:W.add,isReady:z,install(q){q.component("RouterLink",EQ),q.component("RouterView",PQ),q.config.globalProperties.$router=J,Object.defineProperty(q.config.globalProperties,"$route",{enumerable:!0,get:()=>Z(l)}),zl&&!j&&l.value===mo&&(j=!0,_(s.location).catch(K=>{}));const he={};for(const K in mo)Object.defineProperty(he,K,{get:()=>l.value[K],enumerable:!0});q.provide(tg,J),q.provide(K1,um(he)),q.provide(Cb,l);const ne=q.unmount;pe.add(q),q.unmount=function(){pe.delete(q),pe.size<1&&(u=mo,B&&B(),B=null,l.value=mo,j=!1,X=!1),ne()}}};function we(q){return q.reduce((he,ne)=>he.then(()=>I(ne)),Promise.resolve())}return J}function ua(){return Xe(tg)}function kM(e){return Xe(K1)}const AQ={class:"text-center"},OQ={class:"float-end"},DQ=Ve({__name:"PrintJobsMenu",setup(e){const t=cr(),n=G(""),r=G(!1),s=D(()=>t.printersWithJob.filter(a=>{var h,g,m,y;const l=(g=(h=a.job)==null?void 0:h.job)==null?void 0:g.file.name,u=(l==null?void 0:l.toLowerCase())||"",c=((m=a.printer.printerURL)==null?void 0:m.toLowerCase())||"",d=((y=a.printer.name)==null?void 0:y.toLowerCase())||"",f=`${u} ${c} ${d}`;return!n.value||f.includes(n.value.toLowerCase())})),i=D(()=>s.value.length||0);function o(a){return a?a==null?void 0:a.toFixed(0):""}return xe(r,()=>{n.value=""}),(a,l)=>($(),ye("div",AQ,[p(Qm,{modelValue:Z(r),"onUpdate:modelValue":l[3]||(l[3]=u=>nt(r)?r.value=u:null),"close-on-content-click":!1,"nudge-width":400,location:"bottom right","offset-x":"","offset-y":"",transition:"slide-x-transition"},{activator:v(({props:u})=>[p(se,ge({color:Z(i)?"green":"secondary",dark:""},u),{default:v(()=>[C("span",null," Print jobs "+ae(Z(i)?`(${Z(i)})`:""),1),p(ee,{end:""},{default:v(()=>[...l[4]||(l[4]=[E(" work ",-1)])]),_:1})]),_:1},16,["color"])]),default:v(()=>[p(kt,{class:"d-flex flex-column","min-width":"300"},{default:v(()=>[p(Ht,{style:{"overflow-y":"hidden","flex-shrink":"0"}},{default:v(()=>[p(ze,null,{prepend:v(()=>[p(dt,{class:"font-weight-bold",color:"primary",size:"44"},{default:v(()=>[E(ae(Z(i)),1)]),_:1})]),default:v(()=>[p(ft,null,{default:v(()=>[l[7]||(l[7]=E(" Print Jobs ",-1)),C("span",OQ,[p(se,{variant:"tonal",onClick:l[0]||(l[0]=u=>r.value=!1)},{default:v(()=>[p(ee,null,{default:v(()=>[...l[5]||(l[5]=[E("close",-1)])]),_:1}),l[6]||(l[6]=E("Close ",-1))]),_:1})])]),_:1}),p(Nu,{class:"mt-2"},{default:v(()=>[p(at,{modelValue:Z(n),"onUpdate:modelValue":l[1]||(l[1]=u=>nt(n)?n.value=u:null),autofocus:"",class:"p-2",clearable:"",label:"Search jobs or printers","persistent-placeholder":"",placeholder:"Type part of a filename or printer name to search","prepend-icon":"search",style:{"min-width":"900px"}},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),p(cn),p(Ht,{style:{"overflow-y":"auto","flex-shrink":"1"}},{default:v(()=>[Z(i)?ve("",!0):($(),te(ze,{key:0},{default:v(()=>[...l[8]||(l[8]=[E(" No active prints ",-1)])]),_:1})),($(!0),ye(De,null,Zt(Z(s),({printer:u,job:c})=>($(),te(ze,{key:u.id,lines:"two"},{prepend:v(()=>[p(dt,{size:"70"},{default:v(()=>{var d;return[p(di,{"model-value":(d=c==null?void 0:c.progress)==null?void 0:d.completion,width:5,color:"green",size:"50"},{default:v(()=>{var f;return[E(ae(o((f=c.progress)==null?void 0:f.completion)+"%"||""),1)]}),_:2},1032,["model-value"])]}),_:2},1024)]),default:v(()=>[p(ft,null,{default:v(()=>{var d,f;return[E(ae((f=(d=c.job)==null?void 0:d.file)==null?void 0:f.name),1)]}),_:2},1024),p(_t,null,{default:v(()=>[E(" Elapsed: "+ae(Math.round((c==null?void 0:c.progress.printTime)??0/60))+" minutes ",1),l[9]||(l[9]=C("br",null,null,-1)),E(" Printer: "+ae(u.name),1)]),_:2},1024)]),_:2},1024))),128))]),_:1}),p(zn,null,{default:v(()=>[p(Pn),p(se,{onClick:l[2]||(l[2]=u=>r.value=!1)},{default:v(()=>[...l[10]||(l[10]=[E(" Close ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])]))}}),Y1=ks("profile",{state:()=>({username:null,isDemoUser:null,userId:null}),actions:{async getProfile(){return await us.getProfile().then(e=>{this.username=e.username,this.userId=e.id,this.isDemoUser=e.isDemoUser})}}}),Yt={Home:"Home",Login:"Login",Registration:"Registration",PrintersView:"PrintersView",Settings:"Settings",CameraGridView:"CameraGridView",PrintStatistics:"Print Statistics",About:"About",PermissionDenied:"PermissionDenied",NotFound:"NotFound",FirstTimeSetup:"FirstTimeSetup",ServerProtection:"ServerProtection"};async function MQ(e,t){return e.push({name:t})}async function xM(e){if(e.currentRoute.value.path==="/login"){console.log("routeToLogin: already at login page");return}return MQ(e,Yt.Login)}const Zx=!0,LQ=()=>Object.freeze({apiKeyLength:43,maxPort:65535,maxPrinterNameLength:25,maxPrinterGroupNameLength:30,maxPrinterGroupLocationX:4,maxPrinterGroupLocationY:4,minPrinterFloorNameLength:3,minUsernameLength:3}),FQ=ks("tracked-uploads",()=>{const e=G([]),t=D(()=>e.value.filter(r=>!r.completed));function n(r){e.value.splice(0),e.value.push(...r)}return{current:e,setUploads:n,activeUploads:t}}),yi=Object.create(null);yi.open="0";yi.close="1";yi.ping="2";yi.pong="3";yi.message="4";yi.upgrade="5";yi.noop="6";const jh=Object.create(null);Object.keys(yi).forEach(e=>{jh[yi[e]]=e});const Tb={type:"error",data:"parser error"},EM=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",CM=typeof ArrayBuffer=="function",TM=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,X1=({type:e,data:t},n,r)=>EM&&t instanceof Blob?n?r(t):eE(t,r):CM&&(t instanceof ArrayBuffer||TM(t))?n?r(t):eE(new Blob([t]),r):r(yi[e]+(t||"")),eE=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function tE(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let yv;function $Q(e,t){if(EM&&e.data instanceof Blob)return e.data.arrayBuffer().then(tE).then(t);if(CM&&(e.data instanceof ArrayBuffer||TM(e.data)))return t(tE(e.data));X1(e,!1,n=>{yv||(yv=new TextEncoder),t(yv.encode(n))})}const nE="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Uc=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<nE.length;e++)Uc[nE.charCodeAt(e)]=e;const NQ=e=>{let t=e.length*.75,n=e.length,r,s=0,i,o,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),c=new Uint8Array(u);for(r=0;r<n;r+=4)i=Uc[e.charCodeAt(r)],o=Uc[e.charCodeAt(r+1)],a=Uc[e.charCodeAt(r+2)],l=Uc[e.charCodeAt(r+3)],c[s++]=i<<2|o>>4,c[s++]=(o&15)<<4|a>>2,c[s++]=(a&3)<<6|l&63;return u},BQ=typeof ArrayBuffer=="function",Q1=(e,t)=>{if(typeof e!="string")return{type:"message",data:RM(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:VQ(e.substring(1),t)}:jh[n]?e.length>1?{type:jh[n],data:e.substring(1)}:{type:jh[n]}:Tb},VQ=(e,t)=>{if(BQ){const n=NQ(e);return RM(n,t)}else return{base64:!0,data:e}},RM=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},PM="",UQ=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((i,o)=>{X1(i,!1,a=>{r[o]=a,++s===n&&t(r.join(PM))})})},zQ=(e,t)=>{const n=e.split(PM),r=[];for(let s=0;s<n.length;s++){const i=Q1(n[s],t);if(r.push(i),i.type==="error")break}return r};function HQ(){return new TransformStream({transform(e,t){$Q(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 bv;function Qf(e){return e.reduce((t,n)=>t+n.length,0)}function Jf(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 jQ(e,t){bv||(bv=new TextDecoder);const n=[];let r=0,s=-1,i=!1;return new TransformStream({transform(o,a){for(n.push(o);;){if(r===0){if(Qf(n)<1)break;const l=Jf(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(Qf(n)<2)break;const l=Jf(n,2);s=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(Qf(n)<8)break;const l=Jf(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),c=u.getUint32(0);if(c>Math.pow(2,21)-1){a.enqueue(Tb);break}s=c*Math.pow(2,32)+u.getUint32(4),r=3}else{if(Qf(n)<s)break;const l=Jf(n,s);a.enqueue(Q1(i?l:bv.decode(l),t)),r=0}if(s===0||s>e){a.enqueue(Tb);break}}}})}const IM=4;function Tn(e){if(e)return WQ(e)}function WQ(e){for(var t in Tn.prototype)e[t]=Tn.prototype[t];return e}Tn.prototype.on=Tn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Tn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Tn.prototype.off=Tn.prototype.removeListener=Tn.prototype.removeAllListeners=Tn.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};Tn.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};Tn.prototype.emitReserved=Tn.prototype.emit;Tn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Tn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const ng=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),fs=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),qQ="arraybuffer";function AM(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const GQ=fs.setTimeout,KQ=fs.clearTimeout;function rg(e,t){t.useNativeTimers?(e.setTimeoutFn=GQ.bind(fs),e.clearTimeoutFn=KQ.bind(fs)):(e.setTimeoutFn=fs.setTimeout.bind(fs),e.clearTimeoutFn=fs.clearTimeout.bind(fs))}const YQ=1.33;function XQ(e){return typeof e=="string"?QQ(e):Math.ceil((e.byteLength||e.size)*YQ)}function QQ(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 OM(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function JQ(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function ZQ(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 eJ extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class J1 extends Tn{constructor(t){super(),this.writable=!1,rg(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 eJ(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=Q1(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=JQ(t);return n.length?"?"+n:""}}class tJ extends J1{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)};zQ(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,UQ(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]=OM()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let DM=!1;try{DM=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const nJ=DM;function rJ(){}class sJ extends tJ{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 su=class Wh extends Tn{constructor(t,n,r){super(),this.createRequest=t,rg(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=AM(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=Wh.requestsCount++,Wh.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=rJ,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Wh.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()}};su.requestsCount=0;su.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",rE);else if(typeof addEventListener=="function"){const e="onpagehide"in fs?"pagehide":"unload";addEventListener(e,rE,!1)}}function rE(){for(let e in su.requests)su.requests.hasOwnProperty(e)&&su.requests[e].abort()}const iJ=function(){const e=MM({xdomain:!1});return e&&e.responseType!==null}();class oJ extends sJ{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=iJ&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new su(MM,this.uri(),t)}}function MM(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||nJ))return new XMLHttpRequest}catch{}if(!t)try{return new fs[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const LM=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class aJ extends J1{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=LM?{}:AM(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;X1(r,this.supportsBinary,i=>{try{this.doWrite(r,i)}catch{}s&&ng(()=>{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]=OM()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const wv=fs.WebSocket||fs.MozWebSocket;class lJ extends aJ{createSocket(t,n,r){return LM?new wv(t,n,r):n?new wv(t,n):new wv(t)}doWrite(t,n){this.ws.send(n)}}class uJ extends J1{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=jQ(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=HQ();s.readable.pipeTo(t.writable),this._writer=s.writable.getWriter();const i=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),i())}).catch(a=>{})};i();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;this._writer.write(r).then(()=>{s&&ng(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const cJ={websocket:lJ,webtransport:uJ,polling:oJ},dJ=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,fJ=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Rb(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=dJ.exec(e||""),i={},o=14;for(;o--;)i[fJ[o]]=s[o]||"";return n!=-1&&r!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=hJ(i,i.path),i.queryKey=pJ(i,i.query),i}function hJ(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 pJ(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,i){s&&(n[s]=i)}),n}const Pb=typeof addEventListener=="function"&&typeof removeEventListener=="function",qh=[];Pb&&addEventListener("offline",()=>{qh.forEach(e=>e())},!1);class zo extends Tn{constructor(t,n){if(super(),this.binaryType=qQ,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=Rb(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=Rb(n.host).host);rg(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=ZQ(this.opts.query)),Pb&&(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"})},qh.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=IM,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&&zo.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",zo.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+=XQ(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,ng(()=>{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(zo.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(),Pb&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=qh.indexOf(this._offlineEventListener);r!==-1&&qh.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}zo.protocol=IM;class mJ extends zo{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;zo.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;zo.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(c(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const f=new Error("probe error");f.transport=n.name,this.emitReserved("upgradeError",f)}}))};function i(){r||(r=!0,c(),n.close(),n=null)}const o=d=>{const f=new Error("probe error: "+d);f.transport=n.name,i(),this.emitReserved("upgradeError",f)};function a(){o("transport closed")}function l(){o("socket closed")}function u(d){n&&d.name!==n.name&&i()}const c=()=>{n.removeListener("open",s),n.removeListener("error",o),n.removeListener("close",a),this.off("close",l),this.off("upgrading",u)};n.once("open",s),n.once("error",o),n.once("close",a),this.once("close",l),this.once("upgrading",u),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let gJ=class extends mJ{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=>cJ[s]).filter(s=>!!s)),super(t,r)}};function vJ(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=Rb(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 yJ=typeof ArrayBuffer=="function",bJ=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,FM=Object.prototype.toString,wJ=typeof Blob=="function"||typeof Blob<"u"&&FM.call(Blob)==="[object BlobConstructor]",SJ=typeof File=="function"||typeof File<"u"&&FM.call(File)==="[object FileConstructor]";function Z1(e){return yJ&&(e instanceof ArrayBuffer||bJ(e))||wJ&&e instanceof Blob||SJ&&e instanceof File}function Gh(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Gh(e[n]))return!0;return!1}if(Z1(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Gh(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Gh(e[n]))return!0;return!1}function _J(e){const t=[],n=e.data,r=e;return r.data=Ib(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Ib(e,t){if(!e)return e;if(Z1(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]=Ib(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]=Ib(e[r],t));return n}return e}function kJ(e,t){return e.data=Ab(e.data,t),delete e.attachments,e}function Ab(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]=Ab(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Ab(e[n],t));return e}const xJ=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],EJ=5;var yt;(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"})(yt||(yt={}));class CJ{constructor(t){this.replacer=t}encode(t){return(t.type===yt.EVENT||t.type===yt.ACK)&&Gh(t)?this.encodeAsBinary({type:t.type===yt.EVENT?yt.BINARY_EVENT:yt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===yt.BINARY_EVENT||t.type===yt.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=_J(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}function sE(e){return Object.prototype.toString.call(e)==="[object Object]"}class ew extends Tn{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===yt.BINARY_EVENT;r||n.type===yt.BINARY_ACK?(n.type=r?yt.EVENT:yt.ACK,this.reconstructor=new TJ(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Z1(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(yt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===yt.BINARY_EVENT||r.type===yt.BINARY_ACK){const i=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const o=t.substring(i,n);if(o!=Number(o)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(o)}if(t.charAt(n+1)==="/"){const i=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(i,n)}else r.nsp="/";const s=t.charAt(n+1);if(s!==""&&Number(s)==s){const i=n+1;for(;++n;){const o=t.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===t.length)break}r.id=Number(t.substring(i,n+1))}if(t.charAt(++n)){const i=this.tryParse(t.substr(n));if(ew.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 yt.CONNECT:return sE(n);case yt.DISCONNECT:return n===void 0;case yt.CONNECT_ERROR:return typeof n=="string"||sE(n);case yt.EVENT:case yt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&xJ.indexOf(n[0])===-1);case yt.ACK:case yt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class TJ{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=kJ(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const RJ=Object.freeze(Object.defineProperty({__proto__:null,Decoder:ew,Encoder:CJ,get PacketType(){return yt},protocol:EJ},Symbol.toStringTag,{value:"Module"}));function Ms(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const PJ=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class $M extends Tn{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=[Ms(t,"open",this.onopen.bind(this)),Ms(t,"packet",this.onpacket.bind(this)),Ms(t,"error",this.onerror.bind(this)),Ms(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(PJ.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const o={type:yt.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const c=this.ids++,d=n.pop();this._registerAckCallback(c,d),o.id=c}const a=(s=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||s===void 0?void 0:s.writable,l=this.connected&&!(!((i=this.io.engine)===null||i===void 0)&&i._hasPingExpired());return this.flags.volatile&&!a||(l?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,n){var r;const s=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(s===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},s),o=(...a)=>{this.io.clearTimeoutFn(i),n.apply(this,a)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...n){return new Promise((r,s)=>{const i=(o,a)=>o?s(o):r(a);i.withError=!0,n.push(i),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((s,...i)=>(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:yt.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 yt.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 yt.EVENT:case yt.BINARY_EVENT:this.onevent(t);break;case yt.ACK:case yt.BINARY_ACK:this.onack(t);break;case yt.DISCONNECT:this.ondisconnect();break;case yt.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:yt.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:yt.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 mc(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}mc.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};mc.prototype.reset=function(){this.attempts=0};mc.prototype.setMin=function(e){this.ms=e};mc.prototype.setMax=function(e){this.max=e};mc.prototype.setJitter=function(e){this.jitter=e};class Ob extends Tn{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,rg(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 mc({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||RJ;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 gJ(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=Ms(n,"open",function(){r.onopen(),t&&t()}),i=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=Ms(n,"error",i);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{s(),i(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(s),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Ms(t,"ping",this.onping.bind(this)),Ms(t,"data",this.ondata.bind(this)),Ms(t,"error",this.onerror.bind(this)),Ms(t,"close",this.onclose.bind(this)),Ms(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){ng(()=>{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 $M(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 Ic={};function Kh(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=vJ(e,t.path||"/socket.io"),r=n.source,s=n.id,i=n.path,o=Ic[s]&&i in Ic[s].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new Ob(r,t):(Ic[s]||(Ic[s]=new Ob(r,t)),l=Ic[s]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(Kh,{Manager:Ob,Socket:$M,io:Kh,connect:Kh});let Bt=null;const On=gn({connected:!1,setup:!1,id:"",active:!1});class IJ{constructor(){Se(this,"printerStore",Xt());Se(this,"floorStore",fo());Se(this,"printerStateStore",cr());Se(this,"testPrinterStore",q1());Se(this,"trackedUploadsStore",FQ());Se(this,"snackbar",$t());Se(this,"authStore",vs())}socketState(){return Bt?{setup:!0,connected:Bt.connected,active:Bt.active,id:Bt.id}:(console.debug("Returning default socket state, socket was not set up"),{setup:!1})}async setupSocketConnection(){if(console.debug("Setting up socket.io client"),On.setup)throw new Error("Cant setup socket, socket already created");On.setup=!1;const t=await $O();this.authStore.loadTokens(),Bt=Kh(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(),On.setup=!0}disconnect(){if(!Bt)throw new Error("Cant disconnect socket, socket not created");Bt.close(),Bt=null,On.setup=!1,On.connected=!1,On.active=!1,On.id=""}reconnect(){if(!Bt)throw new Error("Cant reconnect socket, socket not created");console.debug("Resetting socket connection. Previous state:",{connected:Bt.connected,active:Bt.active,id:Bt.id}),Bt.close(),Bt.connect()}onMessage(t){var n,r,s;(n=t.trackedUploads.current)!=null&&n.length&&(this.trackedUploadsStore.setUploads(t==null?void 0:t.trackedUploads.current),this.trackedUploadsStore.activeUploads.forEach(i=>{this.snackbar.openProgressMessage(i.correlationToken,i.multerFile.originalname,(i.progress||0)*100,i.completed)})),(r=t.floors)!=null&&r.length&&this.floorStore.saveFloors(t.floors),(s=t.printers)!=null&&s.length&&this.printerStore.setPrinters(t.printers),t.socketStates&&this.printerStateStore.setSocketStates(t.socketStates),t.printerEvents&&this.printerStateStore.setPrinterEvents(t.printerEvents)}setupConnectionHandlers(){if(!Bt)throw new Error("Cant bind socket events, socket not created");Bt.on("connect",()=>{On.id=(Bt==null?void 0:Bt.id)??"",On.connected=!0,On.active=(Bt==null?void 0:Bt.active)??!1,console.debug("Socket connected:",On.id,"Active:",On.active),Bn("server:connected").emit({})}),Bt.on("disconnect",()=>{On.id="",On.connected=!1,On.active=!1,console.debug("Socket disconnected"),Bn("server:disconnected").emit({})}),Bt.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 Bn("server:disconnected").emit({})})}registerMessageHandlers(){if(!Bt)throw new Error("Cant bind socket app events, socket not created");Bt.on("legacy-update",t=>this.onMessage(t)),Bt.on("test-printer-state",t=>{this.testPrinterStore.saveEvent(t)})}}const AJ=ce({scrollTarget:{type:String},scrollThreshold:{type:[String,Number],default:300}},"scroll");function OJ(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{canScroll:n,layoutSize:r}=t;let s=0,i=0;const o=G(null),a=Ce(0),l=Ce(0),u=Ce(0),c=Ce(!1),d=Ce(!1),f=Ce(!1),h=Ce(!1),g=Ce(!0),m=D(()=>Number(e.scrollThreshold)),y=D(()=>Un((m.value-a.value)/m.value||0));function w(k){const T="window"in k?window.innerHeight:k.clientHeight,R="window"in k?document.documentElement.scrollHeight:k.scrollHeight;return{clientHeight:T,scrollHeight:R}}function b(){const k=o.value;if(!k)return;const{clientHeight:T,scrollHeight:R}=w(k),x=R-T,I=(r==null?void 0:r.value)||0,P=m.value+I;g.value=x>P}function S(){b()}function _(){const k=o.value;if(!k||n&&!n.value)return;s=a.value,a.value="window"in k?k.pageYOffset:k.scrollTop;const T=k instanceof Window?document.documentElement.scrollHeight:k.scrollHeight;i!==T&&(T>i&&b(),i=T),d.value=a.value<s,u.value=Math.abs(a.value-m.value);const{clientHeight:R,scrollHeight:x}=w(k),I=a.value+R>=x-5;!d.value&&I&&a.value>=m.value&&g.value&&(h.value=!0);const P=Math.abs(a.value-s)>100,A=a.value<=5;(d.value&&s-a.value>1&&!I||P&&a.value<m.value||A)&&(h.value=!1),f.value=I}return xe(d,()=>{l.value=l.value||a.value}),xe(c,()=>{l.value=0}),xt(()=>{xe(()=>e.scrollTarget,k=>{var R;const T=k?document.querySelector(k):window;T&&T!==o.value&&((R=o.value)==null||R.removeEventListener("scroll",_),o.value=T,o.value.addEventListener("scroll",_,{passive:!0}),Promise.resolve().then(()=>{b()}))},{immediate:!0}),window.addEventListener("resize",S,{passive:!0})}),Qn(()=>{var k;(k=o.value)==null||k.removeEventListener("scroll",_),window.removeEventListener("resize",S)}),n&&xe(n,_,{immediate:!0}),{scrollThreshold:m,currentScroll:a,currentThreshold:u,isScrollActive:c,scrollRatio:y,isScrollingUp:d,savedScroll:l,isAtBottom:f,reachedBottomWhileScrollingDown:h,hasEnoughScrollableSpace:g}}const DJ=ce({scrollBehavior:String,modelValue:{type:Boolean,default:!0},location:{type:String,default:"top",validator:e=>["top","bottom"].includes(e)},...cM(),...xD(),...AJ(),height:{type:[Number,String],default:64}},"VAppBar"),NM=Ee()({name:"VAppBar",props:DJ(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=G(),s=lt(e,"modelValue"),i=D(()=>{var R;const T=new Set(((R=e.scrollBehavior)==null?void 0:R.split(" "))??[]);return{hide:T.has("hide"),fullyHide:T.has("fully-hide"),inverted:T.has("inverted"),collapse:T.has("collapse"),elevate:T.has("elevate"),fadeImage:T.has("fade-image")}}),o=D(()=>{const T=i.value;return T.hide||T.fullyHide||T.inverted||T.collapse||T.elevate||T.fadeImage||!s.value}),a=D(()=>{var x,I;const T=((x=r.value)==null?void 0:x.contentHeight)??0,R=((I=r.value)==null?void 0:I.extensionHeight)??0;return T+R}),{currentScroll:l,scrollThreshold:u,isScrollingUp:c,scrollRatio:d,isAtBottom:f,reachedBottomWhileScrollingDown:h,hasEnoughScrollableSpace:g}=OJ(e,{canScroll:o,layoutSize:a}),m=ie(()=>i.value.hide||i.value.fullyHide),y=D(()=>e.collapse||i.value.collapse&&(i.value.inverted?d.value>0:d.value===0)),w=D(()=>e.flat||i.value.fullyHide&&!s.value||i.value.elevate&&(i.value.inverted?l.value>0:l.value===0)),b=D(()=>i.value.fadeImage?i.value.inverted?1-d.value:d.value:void 0),S=D(()=>{var x,I;if(i.value.hide&&i.value.inverted)return 0;const T=((x=r.value)==null?void 0:x.contentHeight)??0,R=((I=r.value)==null?void 0:I.extensionHeight)??0;return m.value?l.value<u.value||i.value.fullyHide?T+R:T:T+R});Nr(()=>!!e.scrollBehavior,()=>{Rn(()=>{if(!m.value){s.value=!0;return}if(i.value.inverted){s.value=l.value>u.value;return}if(!g.value){s.value=!0;return}if(h.value){s.value=!1;return}s.value=c.value&&!f.value||l.value<u.value})});const{ssrBootStyles:_}=kf(),{layoutItemStyles:k}=CD({id:e.name,order:D(()=>parseInt(e.order,10)),position:ie(()=>e.location),layoutSize:S,elementSize:Ce(void 0),active:s,absolute:ie(()=>e.absolute)});return Me(()=>{const T=kr.filterProps(e);return p(kr,ge({ref:r,class:["v-app-bar",{"v-app-bar--bottom":e.location==="bottom"},e.class],style:[{...k.value,"--v-toolbar-image-opacity":b.value,height:void 0,..._.value},e.style]},T,{collapse:y.value,flat:w.value}),n)}),{}}}),MJ=ce({...In(yP({icon:"$menu",variant:"text"}),["spaced"])},"VAppBarNavIcon"),LJ=Ee()({name:"VAppBarNavIcon",props:MJ(),setup(e,t){let{slots:n}=t;return Me(()=>p(se,ge(e,{class:["v-app-bar-nav-icon"]}),n)),{}}}),FJ={key:1,class:"text-uppercase text--white"},$J={key:3,class:"ml-2"},NJ={key:4,class:"ml-2"},BJ=Ve({__name:"TopBar",setup(e){const t=Y1(),n=vs(),r=ua(),s=[{title:"Open Profile",icon:"person",path:"/settings/account"}],i=G(Date.now());G$(()=>{i.value=Date.now()},1e3);const o=D(()=>{var d;if(!((d=n.tokenClaims)!=null&&d.exp))return"";const c=n.tokenClaims.exp-i.value/1e3;return`${Math.round(c)}s`}),a=D(()=>t.username),l=D(()=>n.isDemoMode);async function u(){await n.logout(!0),await xM(r)}return(c,d)=>{const f=xX,h=kX;return $(),te(NM,{elevation:"0"},{default:v(()=>[p($n,{class:"text-uppercase text-white"},{default:v(()=>[...d[1]||(d[1]=[C("span",{class:"font-weight-light"}," FDM ",-1),C("strong",null," Monster ",-1)])]),_:1}),l.value?($(),te(Pn,{key:0})):ve("",!0),l.value?($(),ye("h2",FJ," DEMO MODE ")):ve("",!0),p(Pn),p(DQ),Z(n).hasAuthToken&&!Z(n).isLoginExpired?($(),te(Qm,{key:2,"close-on-content-click":!1,location:"bottom right","open-on-hover":"",transition:"slide-y-transition"},{activator:v(({props:g})=>[p(se,ge({class:"ml-2",color:"secondary",theme:"dark"},g),{default:v(()=>[p(ee,{class:"mr-2"},{default:v(()=>[...d[2]||(d[2]=[E("person",-1)])]),_:1}),E(" "+ae(a.value),1)]),_:1},16)]),default:v(()=>[p(Ht,null,{default:v(()=>[($(),ye(De,null,Zt(s,(g,m)=>p(ze,{key:m,to:g.path,title:g.title,"prepend-avatar":g.icon,link:""},null,8,["to","title","prepend-avatar"])),64))]),_:1})]),_:1})):ve("",!0),Z(Zx)&&o.value?($(),ye("span",$J," AuthExp "+ae(o.value),1)):ve("",!0),Z(Zx)?($(),ye("span",NJ,[C("small",null," S"+ae(Z(On).setup?1:0)+" C"+ae(Z(On).connected?1:0)+" A"+ae(Z(On).active?1:0)+" "+ae(Z(On).id),1)])):ve("",!0),Z(n).loginRequired===!0?($(),te(f,{key:5,tooltip:"Go back to login",text:"Logout",color:"secondary",icon:"logout",onClick:d[0]||(d[0]=g=>u())})):ve("",!0),Z(n).loginRequired===!0?($(),te(se,{key:6,class:"ml-2"},{default:v(()=>[p(ee,{class:"mr-2"},{default:v(()=>[...d[3]||(d[3]=[E("logout",-1)])]),_:1}),d[4]||(d[4]=E(" Logout ",-1))]),_:1})):ve("",!0),p(h)]),_:1})}}}),tw="/assets/logo-CJVdjy51.png",VJ=Ve({__name:"NavigationBar",setup(e){const t=[["home","Devices","/"],["print","Printers","/printers"],["camera_alt","CameraGridView","/cameras"],["settings","Settings","/settings"],["timeline","PrintStatistics","/statistics"],["contact_support","About","/about"]];return(n,r)=>($(),te(D1,{permanent:"",rail:""},{default:v(()=>[p(LJ,{class:"ml-1 mt-2"},{default:v(()=>[p(bs,{alt:"FDM Monster Logo",src:Z(tw),class:"shrink mr-1 pt-3 ml-1",transition:"scale-transition",width:"40"},null,8,["src"])]),_:1}),p(cn),p(Ht,{density:"compact",nav:""},{default:v(()=>[($(),ye(De,null,Zt(t,([s,i,o],a)=>p(ze,{key:a,to:o,"prepend-icon":s,title:i,density:"comfortable","router-link":""},null,8,["to","prepend-icon","title"])),64))]),_:1})]),_:1}))}});function UJ(e){const t=Ce(e());let n=-1;function r(){clearInterval(n)}function s(){r(),ht(()=>t.value=e())}function i(o){const a=o?getComputedStyle(o):{transitionDuration:.2},l=parseFloat(a.transitionDuration)*1e3||200;if(r(),t.value<=0)return;const u=performance.now();n=window.setInterval(()=>{const c=performance.now()-u+l;t.value=Math.max(e()-c,0),t.value<=0&&r()},l)}return ln(r),{clear:r,time:t,start:i,reset:s}}const zJ=ce({multiLine:Boolean,text:String,timer:[Boolean,String],timeout:{type:[Number,String],default:5e3},vertical:Boolean,...sa({location:"bottom"}),...Qu(),...Hn(),...Ws(),...Nt(),...In(of({transition:"v-snackbar-transition"}),["persistent","noClickAnimation","retainFocus","captureFocus","disableInitialFocus","scrim","scrollStrategy","stickToTarget","viewportMargin"])},"VSnackbar"),nw=Ee()({name:"VSnackbar",props:zJ(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=lt(e,"modelValue"),{positionClasses:s}=Ju(e),{scopeId:i}=Zu(),{themeClasses:o}=nn(e),{colorClasses:a,colorStyles:l,variantClasses:u}=bl(e),{roundedClasses:c}=Zn(e),d=UJ(()=>Number(e.timeout)),f=G(),h=G(),g=Ce(!1),m=Ce(0),y=G(),w=Xe(Ld,void 0);Nr(()=>!!w,()=>{const A=ED();Rn(()=>{y.value=A.mainStyles.value})}),xe(r,S),xe(()=>e.timeout,S),xt(()=>{r.value&&S()});let b=-1;function S(){d.reset(),window.clearTimeout(b);const A=Number(e.timeout);if(!r.value||A===-1)return;const L=m0(h.value);d.start(L),b=window.setTimeout(()=>{r.value=!1},A)}function _(){d.reset(),window.clearTimeout(b)}function k(){g.value=!0,_()}function T(){g.value=!1,S()}function R(A){m.value=A.touches[0].clientY}function x(A){Math.abs(m.value-A.changedTouches[0].clientY)>50&&(r.value=!1)}function I(){g.value&&T()}const P=D(()=>e.location.split(" ").reduce((A,L)=>(A[`v-snackbar--${L}`]=!0,A),{}));return Me(()=>{const A=to.filterProps(e),L=!!(n.default||n.text||e.text);return p(to,ge({ref:f,class:["v-snackbar",{"v-snackbar--active":r.value,"v-snackbar--multi-line":e.multiLine&&!e.vertical,"v-snackbar--timer":!!e.timer,"v-snackbar--vertical":e.vertical},P.value,s.value,e.class],style:[y.value,e.style]},A,{modelValue:r.value,"onUpdate:modelValue":B=>r.value=B,contentProps:ge({class:["v-snackbar__wrapper",o.value,a.value,c.value,u.value],style:[l.value],onPointerenter:k,onPointerleave:T},A.contentProps),persistent:!0,noClickAnimation:!0,scrim:!1,scrollStrategy:"none",_disableGlobalStack:!0,onTouchstartPassive:R,onTouchend:x,onAfterLeave:I},i),{default:()=>{var B,O;return[ra(!1,"v-snackbar"),e.timer&&!g.value&&C("div",{key:"timer",class:"v-snackbar__timer"},[p(Eu,{ref:h,color:typeof e.timer=="string"?e.timer:"info",max:e.timeout,modelValue:d.time.value},null)]),L&&C("div",{key:"content",class:"v-snackbar__content",role:"status","aria-live":"polite"},[((B=n.text)==null?void 0:B.call(n))??e.text,(O=n.default)==null?void 0:O.call(n)]),n.actions&&p(Ft,{defaults:{VBtn:{variant:"text",ripple:!1,slim:!0}}},{default:()=>[C("div",{class:"v-snackbar__actions"},[n.actions({isActive:r})])]})]},activator:n.activator})}),Ts({},f)}}),HJ={style:{width:"100%"}},jJ={class:"font-weight-bold text-button"},WJ=Ve({__name:"AppProgressSnackbar",setup(e){const t=$t(),n=G(!1),r=G(""),s=G([]),i=G(100);function o(u){return s.value.find(c=>c.key===u)}function a(u,c,d=0,f=!1,h=Date.now()+1500){console.log(`[AppProgressSnackbar] Adding ${u} tracker with progress ${d}`),s.value.push({key:u,title:c,value:d,completed:f,startedAt:Date.now(),expiresAt:h,timeoutAt:void 0})}function l(u){s.value=s.value.filter(c=>c.key!==u)}return xt(()=>{setInterval(()=>{if(s.value.length){for(const u of s.value){const{value:c,completed:d,expiresAt:f,key:h}=u;(d||c>=100)&&f<Date.now()||u.timeoutAt&&u.timeoutAt<Date.now()?l(h):!u.timeoutAt&&f<Date.now()&&(u.timeoutAt=Date.now()+5e3)}s.value.length?(i.value=-1,n.value=!0):(i.value=2e3,r.value="Upload ended",console.debug(`[AppSnackbars] Setting timeout to ${i.value}`))}},1e3),t.onProgressMessage(u=>{const{key:c,value:d,title:f,completed:h}=u,g=o(c);if(g)Math.min(100,d)>=g.value&&(g.expiresAt=Date.now()+1500,g.value=d,g.completed=h);else{if(d>=100)return;a(c,f,d,!1,Date.now()+1500)}r.value="Uploading files"})}),(u,c)=>($(),te(nw,{modelValue:n.value,"onUpdate:modelValue":c[1]||(c[1]=d=>n.value=d),timeout:i.value,absolute:"",location:"bottom right",class:"ma-3 elevation-24","min-width":"450px","multi-line":"",rounded:"pill",style:{"z-index":"1000"}},{default:v(()=>[p(st,null,{default:v(()=>[p(We,{cols:"2"},{default:v(()=>[p(se,{icon:"file_upload",size:"large"})]),_:1}),p(We,{class:"d-flex align-center flex-row",cols:"8"},{default:v(()=>[C("div",HJ,[C("span",jJ,ae(r.value),1),($(!0),ye(De,null,Zt(s.value,(d,f)=>($(),ye("div",{key:f,class:"mb-2"},[d.completed?($(),te(ee,{key:0},{default:v(()=>[...c[2]||(c[2]=[E("check",-1)])]),_:1})):d.timeoutAt?($(),te(ee,{key:1},{default:v(()=>[...c[3]||(c[3]=[E("pause",-1)])]),_:1})):($(),te(ee,{key:2},{default:v(()=>[...c[4]||(c[4]=[E("hourglass_bottom",-1)])]),_:1})),E(" "+ae(d.title)+" "+ae((d.completed?100:d.value).toFixed(1))+"% ",1),c[5]||(c[5]=C("br",null,null,-1)),($(),te(Eu,{key:d.key,"model-value":d.completed?100:d.value,color:d.timeoutAt?"red":"success"},null,8,["model-value","color"]))]))),128))])]),_:1}),p(We,{cols:"1"},{default:v(()=>[p(se,{icon:"close",size:"large",onClick:c[0]||(c[0]=d=>n.value=!1)})]),_:1})]),_:1})]),_:1},8,["modelValue","timeout"]))}}),qJ={class:"font-weight-bold text-button"},GJ={key:0},KJ=Ve({__name:"AppErrorSnackbar",setup(e){const t=$t(),n=G(-1),r=G(!1),s=G(""),i=G("");return xt(()=>{t.onErrorMessage(o=>{s.value=o.title,i.value=o.subtitle??"",r.value=!0,n.value=o.timeout??1e4})}),(o,a)=>($(),te(nw,{modelValue:r.value,"onUpdate:modelValue":a[1]||(a[1]=l=>r.value=l),timeout:n.value,absolute:"",location:"bottom",class:"ml-16 mb-16 ma-3 elevation-24",color:"error-darken-1",rounded:"pill","multi-line":"",style:{"z-index":"1000"},width:"450"},{default:v(()=>[p(st,null,{default:v(()=>[p(We,{cols:"2"},{default:v(()=>[p(se,{icon:"error"})]),_:1}),p(We,{class:"d-flex align-center flex-row",cols:"8"},{default:v(()=>{var l;return[C("div",null,[C("span",qJ,ae(s.value),1),(l=i.value)!=null&&l.length?($(),ye("div",GJ,ae(i.value),1)):ve("",!0)])]}),_:1}),p(We,{cols:"1"},{default:v(()=>[p(se,{icon:"close",onClick:a[0]||(a[0]=l=>r.value=!1)})]),_:1})]),_:1})]),_:1},8,["modelValue","timeout"]))}}),YJ={class:"font-weight-bold text-button"},XJ={key:0},QJ=Ve({__name:"AppInfoSnackbar",setup(e){const t=$t(),n=G(!1),r=G(""),s=G(""),i=G(2e3),o=G(!1);return xt(()=>{t.onInfoMessage(a=>{r.value=a.title,s.value=a.subtitle??"",o.value=a.warning??!1,i.value=a.timeout??2e3,n.value=!0})}),(a,l)=>($(),te(nw,{modelValue:n.value,"onUpdate:modelValue":l[1]||(l[1]=u=>n.value=u),absolute:"",location:"bottom",color:o.value?"warning darken-2":"success",class:"ma-3 elevation-24",rounded:"pill",timeout:i.value,style:{"z-index":"1000"},"multi-line":""},{default:v(()=>[p(st,null,{default:v(()=>[p(We,{cols:"2"},{default:v(()=>[p(se,{icon:"info"})]),_:1}),p(We,{cols:"8",class:"d-flex align-center flex-row"},{default:v(()=>{var u;return[C("div",null,[C("span",YJ,ae(r.value),1),(u=s.value)!=null&&u.length?($(),ye("div",XJ,ae(s.value),1)):ve("",!0)])]}),_:1}),p(We,{cols:"2"},{default:v(()=>[p(se,{icon:"close",onClick:l[0]||(l[0]=u=>n.value=!1)})]),_:1})]),_:1})]),_:1},8,["modelValue","color","timeout"]))}}),rw=ks("Uploads",{state:()=>({queuedUploads:[],failedUploads:[],uploadingNow:!1}),getters:{hasPendingUploads(e){var t;return((t=e.queuedUploads)==null?void 0:t.length)>0},isUploadingNow(e){return e.uploadingNow},nextUpload(e){return e.queuedUploads[0]}},actions:{queueUploads(e){this.failedUploads=[],this.queuedUploads.push(...e)},cancelUploads(){this.queuedUploads=[],this.failedUploads=[]},async handleNextUpload(){var s;const e=$t();if(!((s=this.queuedUploads)!=null&&s.length))return;this.uploadingNow=!0;const{file:t,printer:n,startPrint:r}=this.nextUpload;this.queuedUploads.splice(0,1);try{await Ki.uploadFile(n,t,r)}catch(i){if(i.isAxiosError){const o={file:t,printer:n,error:i,startPrint:!1};this.failedUploads.push(o),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}}}),iE="/img/OIG.JYDC2RaWdz7g9.jpg",El=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},JJ=e=>Math.random()*e,ZJ={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:JJ,getWrapperStyle(){return{width:`${parseFloat(this.size)*3+parseFloat(this.margin)*6}${this.sizeUnit}`,fontSize:0}},getCircleStyle(e){const t=`grid ${e/100+.6}s ${e/100-.2}s infinite ease`;return{display:"inline-block",backgroundColor:this.color,width:`${this.size}${this.sizeUnit}`,height:`${this.size}${this.sizeUnit}`,margin:this.margin,borderRadius:"100%",animationFillMode:"both",animation:t}}}};function eZ(e,t,n,r,s,i){return n.loading?($(),ye("div",{key:0,style:Be(i.getWrapperStyle())},[($(),ye(De,null,Zt(9,o=>C("div",{key:o,style:Be(i.getCircleStyle(i.random(100)))},null,4)),64))],4)):ve("",!0)}const BM=El(ZJ,[["render",eZ]]);function VM(e){const t=mt();t.getOptions().enabled=e,console.warn("Sentry enabled:",e)}const tZ=e=>new Promise(t=>setTimeout(t,e)),nZ={key:1},rZ={key:2,style:{margin:"50px"}},sZ={class:"mt-2 mb-2"},iZ={key:0,class:"mt-2 mb-2"},oZ={key:1,class:"mt-2 mb-2"},aZ={key:3,style:{animation:"fadeIn 0.75s"}},lZ=Ve({__name:"AppLoader",setup(e){const t=vs(),n=Ks(),r=Ym(),s=Y1(),i=G(!1),o=ua(),a=G(""),l=G(!0),u=G(),c=G(),d=G(),f=G(),h=$t(),g=new IJ;function m(){window.location.reload()}function y(){navigator.clipboard.writeText(JSON.stringify(u.value)),h.openInfoMessage({title:"Copied",subtitle:"Error copied to clipboard"})}function w(P,A=""){P?(a.value=A,u.value=null,d.value=null,f.value=null):a.value="",i.value=P}async function b(){var P;try{await n.loadSettings(),await r.loadFeatures(),await s.getProfile();const A=(P=n.serverSettings)==null?void 0:P.sentryDiagnosticsEnabled;VM(!!A)}catch(A){console.log("Error when loading settings.",A),h.openErrorMessage({title:"Error",subtitle:"Error when loading settings, features and/or profile."}),gi(A)}g.socketState().setup?g.reconnect():await g.setupSocketConnection(),l.value=!1,w(!1)}return Bn("auth:permission-denied").on(async P=>{console.log("[AppLoader] Permission denied, going to permission denied page"),w(!0,"Permission denied"),await o.push({name:Yt.PermissionDenied,query:{roles:P==null?void 0:P.roles,page:String(o.currentRoute.value.name),permissions:P==null?void 0:P.permissions,error:P==null?void 0:P.error,url:P==null?void 0:P.url}}),w(!1)}),Bn("auth:failure").on(async P=>{console.debug(`[AppLoader] Event received: 'auth:failure', going back to login, context: ${P}`),w(!0,"Authentication failed, going back to login"),o.currentRoute.value.name!==Yt.Login&&await o.push({name:Yt.Login}),w(!1)}),Bn("auth:login").on(async()=>{console.debug("[AppLoader] Event received: 'auth:login', loading app"),w(!0,"Loading app"),await b()}),Bn(`auth:${Dr.AccountNotVerified}`).on(async()=>{console.debug(`[AppLoader] Event received: 'auth:${Dr.AccountNotVerified}', going to login`),h.error("Account not verified, please ask an administrator to verify your account."),w(!0,"Account not verified, please ask an administrator to verify your account."),o.currentRoute.value.name!==Yt.Login&&await o.push({name:Yt.Login}),w(!1)}),Bn(`auth:${Dr.PasswordChangeRequired}`).on(async()=>{console.debug(`[AppLoader] Event received: 'auth:${Dr.PasswordChangeRequired}', going to login`),h.error("Password change required, please change your password."),w(!0,"Password change required, please change your password."),o.currentRoute.value.name!==Yt.Login&&await o.push({name:Yt.Login}),w(!1)}),Bn("server:disconnected").on(async P=>{w(!0),c.value=!0,l.value=!0}),Bn("server:connected").on(async P=>{w(!1),c.value=!1,l.value=!1}),mm(()=>{g.socketState().setup&&g.disconnect()}),Wu(async()=>{var O,F;l.value=!0;const P=["Loading FDM Monster","Loading it all","Loading features","Loading what needs to be loaded","Farming potatoes","Wiping the floor","Cleaning cobwebs","Loading filament.dll","Loading 3D_printer.exe","Loading spools"],A=P[Math.floor(Math.random()*P.length)];w(!0,A);try{await Ia.test()}catch(W){l.value=!1,c.value=!0,gi(W);return}const{loginRequired:L,wizardState:B}=await t.checkAuthenticationRequirements();if(!B.wizardCompleted){console.debug("[AppLoader] Wizard not completed, going to wizard"),await t.logout(!1),o.currentRoute.value.name!==Yt.FirstTimeSetup&&await o.replace({name:Yt.FirstTimeSetup}),w(!1);return}if(!L)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"),w(!1);w(!0,"Refreshing login"),console.debug("[AppLoader] Verifying or refreshing login once");try{const{success:W,handled:X}=await t.verifyOrRefreshLoginOnceOrLogout();if(X){console.debug("[AppLoader] received handled event, hiding overlay");return}if(!W){console.debug("[AppLoader] No success refreshing"),w(!0,"Login expired, going back to login"),await tZ(500),o.currentRoute.value.name!==Yt.Login&&await o.push({name:Yt.Login}),w(!1);return}}catch(W){console.log("[AppLoader] Error when refreshing login",W),l.value=!1,u.value=W.message,d.value=(O=W.config)==null?void 0:O.url,f.value=(F=W.response)==null?void 0:F.data,gi(W);return}console.debug("[AppLoader] Loading app"),await b()}),(P,A)=>($(),ye(De,null,[p(to,{modelValue:i.value,"onUpdate:modelValue":A[3]||(A[3]=L=>i.value=L),opacity:"0.98",style:{"z-index":"7"}},{default:v(()=>[l.value?($(),te(BM,{key:0,size:20,class:"ma-auto",color:"#a70015"})):ve("",!0),A[31]||(A[31]=C("br",null,null,-1)),c.value?($(),ye("div",nZ,[A[13]||(A[13]=C("h1",null,"FDM Monster Server Disconnected",-1)),A[14]||(A[14]=C("p",null,"Did not receive an answer from the server. Please ensure the server is started and reload the page.",-1)),p(Fd,{class:"pa-4 rounded",color:"grey darken-3",width:"100%"},{default:v(()=>[p(st,null,{default:v(()=>[p(We,null,{default:v(()=>[...A[4]||(A[4]=[C("img",{class:"justify-center align-center align-content-center rounded-pill mt-8 ma-4",src:iE,style:{opacity:"0.9"},width:"200"},null,-1)])]),_:1}),p(We,{class:"justify-center align-center align-content-center"},{default:v(()=>[p(se,{color:"primary mb-2",onClick:A[0]||(A[0]=L=>m())},{default:v(()=>[p(ee,{class:"mr-2"},{default:v(()=>[...A[5]||(A[5]=[E("refresh",-1)])]),_:1}),A[6]||(A[6]=E(" reload the page ",-1))]),_:1}),A[11]||(A[11]=C("br",null,null,-1)),p(se,{color:"darken-2 mb-2",href:"https://docs.fdm-monster.net",style:{color:"white"},target:"_blank"},{default:v(()=>[p(ee,{class:"mr-2"},{default:v(()=>[...A[7]||(A[7]=[E("menu_book",-1)])]),_:1}),A[8]||(A[8]=E(" view documentation ",-1))]),_:1}),A[12]||(A[12]=C("br",null,null,-1)),p(se,{color:"purple darken-4",href:"https://discord.gg/mwA8uP8CMc",style:{color:"white"},target:"_blank"},{default:v(()=>[p(ee,{class:"mr-2"},{default:v(()=>[...A[9]||(A[9]=[E("chat",-1)])]),_:1}),A[10]||(A[10]=E(" join our Discord ",-1))]),_:1})]),_:1})]),_:1})]),_:1})])):ve("",!0),u.value?($(),ye("div",rZ,[A[28]||(A[28]=C("h1",null,"FDM Monster Server Error",-1)),A[29]||(A[29]=C("p",null," Did not expect this answer from the server. Please check your configuration and logs. ",-1)),p(Fd,{class:"pa-4 rounded",color:"grey-darken-2",width:"80%"},{default:v(()=>[A[23]||(A[23]=E(" Details: ",-1)),C("div",sZ,ae(JSON.stringify(u.value,null,4)),1),d.value?($(),ye("div",iZ," Original URL: "+ae(d.value),1)):ve("",!0),f.value?($(),ye("div",oZ," Response body: "+ae(f.value),1)):ve("",!0),A[24]||(A[24]=C("br",null,null,-1)),p(se,{class:"mb-2",color:"secondary",onClick:A[1]||(A[1]=L=>y())},{default:v(()=>[p(ee,{class:"mr-2"},{default:v(()=>[...A[15]||(A[15]=[E("content_copy",-1)])]),_:1}),A[16]||(A[16]=E(" Copy error details ",-1))]),_:1}),A[25]||(A[25]=C("br",null,null,-1)),p(se,{color:"primary mb-2",onClick:A[2]||(A[2]=L=>m())},{default:v(()=>[p(ee,{class:"mr-2"},{default:v(()=>[...A[17]||(A[17]=[E("refresh",-1)])]),_:1}),A[18]||(A[18]=E(" reload the page ",-1))]),_:1}),A[26]||(A[26]=C("br",null,null,-1)),p(se,{color:"darken-2 mb-2",href:"https://docs.fdm-monster.net",style:{color:"white"},target:"_blank"},{default:v(()=>[p(ee,{class:"mr-2"},{default:v(()=>[...A[19]||(A[19]=[E("menu_book",-1)])]),_:1}),A[20]||(A[20]=E(" view documentation ",-1))]),_:1}),A[27]||(A[27]=C("br",null,null,-1)),p(se,{color:"purple-darken-4",href:"https://discord.gg/mwA8uP8CMc",style:{color:"white"},target:"_blank"},{default:v(()=>[p(ee,{class:"mr-2"},{default:v(()=>[...A[21]||(A[21]=[E("chat",-1)])]),_:1}),A[22]||(A[22]=E(" join our Discord ",-1))]),_:1})]),_:1}),A[30]||(A[30]=C("img",{class:"justify-center align-center align-content-center rounded-pill mt-8 ma-4",src:iE,style:{opacity:"0.9"},width:"400"},null,-1))])):ve("",!0),l.value?($(),ye("div",aZ,ae(a.value),1)):ve("",!0)]),_:1},8,["modelValue"]),i.value?ve("",!0):gm(P.$slots,"default",{key:0})],64))}});async function uZ(){const e="vpss",t=document.getElementById(e),n=document.getElementById(`${e}-style`);if(!t||!n){console.error("Splash screen not found. Did you forget to add the `vite-plugin-splash-screen` plugin?");return}const r=window.__VPSS__||{};if(t.addEventListener("animationend",s=>{s.animationName==="vpss-hide"&&(t.remove(),n.remove())}),"minDurationMs"in r&&"renderedAt"in r){const s=new Date().getTime()-r.renderedAt,i=Math.max(r.minDurationMs-s,0);await new Promise(o=>setTimeout(o,i))}t.classList.add(`${e}-hidden`)}const cZ=ce({...Ge(),...In(kD(),["fullHeight"]),...Nt()},"VApp"),dZ=Ee()({name:"VApp",props:cZ(),setup(e,t){let{slots:n}=t;const r=nn(e),{layoutClasses:s,getLayoutItem:i,items:o,layoutRef:a}=TD({...e,fullHeight:!0}),{rtlClasses:l}=Wr();return Me(()=>{var u;return C("div",{ref:a,class:Oe(["v-application",r.themeClasses.value,s.value,l.value,e.class]),style:Be([e.style])},[C("div",{class:"v-application__wrap"},[(u=n.default)==null?void 0:u.call(n)])])}),{getLayoutItem:i,items:o,theme:r}}}),fZ=ce({scrollable:Boolean,...Ge(),...xr(),...gt({tag:"main"})},"VMain"),hZ=Ee()({name:"VMain",props:fZ(),setup(e,t){let{slots:n}=t;const{dimensionStyles:r}=Er(e),{mainStyles:s}=ED(),{ssrBootStyles:i}=kf();return Me(()=>p(e.tag,{class:Oe(["v-main",{"v-main--scrollable":e.scrollable},e.class]),style:Be([s.value,i.value,r.value,e.style])},{default:()=>{var o,a;return[e.scrollable?C("div",{class:"v-main__scroller"},[(o=n.default)==null?void 0:o.call(n)]):(a=n.default)==null?void 0:a.call(n)]}})),{}}}),pZ=Ve({__name:"App",setup(e){const t=rw(),n=vs(),r=t.queuedUploads;return xe(r,async()=>{await t.handleNextUpload()}),xt(()=>{uZ(),console.debug(`App.vue mounted. Logged in: ${n.hasAuthToken}, Expired: ${n.isLoginExpired}`)}),(s,i)=>{const o=QJ,a=KJ,l=WJ,u=VJ,c=BJ,d=Vn("router-view"),f=wX,h=aX,g=EY,m=kY,y=wY,w=gY,b=ZK,S=xK,_=uK,k=B7,T=ZG;return $(),te(dZ,null,{default:v(()=>[p(o),p(a),p(l),Z(n).hasAuthToken&&!Z(n).isLoginExpired||!Z(n).loginRequired?($(),te(u,{key:0})):ve("",!0),Z(n).hasAuthToken&&!Z(n).isLoginExpired||!Z(n).loginRequired?($(),te(c,{key:1})):ve("",!0),p(lZ,null,{default:v(()=>[p(hZ,null,{default:v(()=>[p(d)]),_:1})]),_:1}),p(f),p(h),p(g),p(m),p(y),p(w),p(b),p(S),p(_),p(k),p(T)]),_:1})}}}),sw="/img/logo.svg",UM=Ve({__name:"PrinterCreateAction",props:{floorId:{},floorX:{},floorY:{}},setup(e){const t=e,n=sn(on.AddOrUpdatePrinterDialog);function r(){n.openDialog(t)}return(s,i)=>($(),te(se,{class:"ma-2",color:"primary",size:"small",rounded:"",onClickCapture:i[0]||(i[0]=Ct(o=>r(),["stop"]))},{default:v(()=>[p(ee,null,{default:v(()=>[...i[1]||(i[1]=[E("add",-1)])]),_:1}),i[2]||(i[2]=E(" New printer ",-1))]),_:1}))}});class zM extends Cr{static async postQuickStopM112Command(t){const n=$e.sendQuickStopM112Route(t);return await this.post(n)}}const sg=ks("GridStore",{state:()=>({gridEditMode:!1})}),mZ="thumbnail",gZ=(e,t)=>Jm({queryKey:[mZ,e],queryFn:async()=>e.value?Ki.getThumbnail(e.value).then(n=>n.thumbnailBase64||""):"",enabled:!!e&&!!t}),vZ={class:"d-flex flex flex-column justify-center",style:{height:"100%"}},yZ={key:1,class:"printer-file-or-stream-viewer"},bZ={key:2,class:"printer-file-or-stream-viewer"},wZ={key:3,class:"printer-menu"},SZ={class:"file-name"},_Z={key:5,class:"centered-controls"},kZ={key:0},xZ={key:1},oE="rgba(100,100,100,0.1)",EZ=Ve({__name:"PrinterGridTile",props:{printer:{type:Object,required:!1},x:{type:Number,required:!0},y:{type:Number,required:!0}},setup(e){const t=e,n=Xt(),r=cr(),s=fo(),i=Ks(),o=sg(),a=sn(on.PrinterControlDialog),l=sn(on.AddOrUpdatePrinterDialog),u=$t(),c=D(()=>{var z;return(z=t.printer)==null?void 0:z.id}),d=D(()=>i.largeTiles),f=D(()=>d.value?"80px":"40px"),{data:h}=gZ(c,i.thumbnailsEnabled),g=D(()=>c.value?r.isApiResponding(c.value):!1),m=D(()=>c.value?r.isPrinterOperational(c.value):!1),y=D(()=>c.value?r.isPrinterPrinting(c.value):!1),w=D(()=>c.value?r.isPrinterPaused(c.value):!1),b=D(()=>c.value?n.isSelectedPrinter(c.value):!1),S=D(()=>{var z;return((z=n.selectedPrinters)==null?void 0:z.length)&&!b.value}),_=D(()=>i.preferCancelOverQuickStop),k=D(()=>{if(!c.value)return;const z=n.printer(c.value);if(!z)return;const M=r.printerEventsById[c.value],re=r.socketStatesById[c.value];return NO(z,re,M)}),T=D(()=>{const z=k.value;return z&&z.rgb||oE}),R=D(()=>{if(c.value)return r.printerJobsById[c.value]}),x=D(()=>{if(c.value)return r.printingFilePathsByPrinterId[c.value]}),I=async()=>{c.value&&confirm("Are you sure to cancel the current print job?")&&await Za.stopPrintJob(c.value)},P=async()=>{c.value&&await Za.pausePrintJob(c.value)},A=async()=>{c.value&&await Za.resumePrintJob(c.value)},L=()=>{n.setSideNavPrinter(t.printer)},B=async()=>{c.value&&(await tn.refreshSocket(c.value),u.openInfoMessage({title:"Refreshing connection state"}))},O=()=>{n.setUpdateDialogPrinter(t.printer),l.openDialog()},F=async()=>{if(!c.value)throw new Error("PrinterId not set, cant open dialog");await a.openDialog({printerId:c})},W=async()=>{c.value&&confirm("Are you sure to abort the print in Quick Stop mode? Please reconnect after.")&&await zM.postQuickStopM112Command(c.value)},X=async()=>{c.value&&await tn.sendPrinterConnectCommand(c.value)},V=async()=>{var z;if(!(!t.printer||!c.value)){if(o.gridEditMode){const M=(z=s.selectedFloor)==null?void 0:z.id;if(!M)throw new Error("Cant clear printer, floor not selected");await cs.deletePrinterFromFloor(M,c.value);return}n.toggleSelectedPrinter(t.printer)}};return(z,M)=>{const re=UM,H=gd("drop-upload"),j=gd("drop-printer-position");return zt(($(),ye("div",null,[zt(($(),te(kt,{class:Oe([{"tile-large":d.value,"tile-selected":b.value,"tile-unselected":S.value,"tile-no-printer":!e.printer},"tile colored-tile rounded-lg"]),elevation:"5",onClick:M[8]||(M[8]=pe=>V())},{default:v(()=>{var pe,J,we,q,he,ne,K;return[zt(C("div",{class:"printer-title"},ae(((pe=e.printer)==null?void 0:pe.name)??" "),513),[[uo,e.printer]]),!e.printer||Z(o).gridEditMode?($(),ye("div",{key:0,style:Be([{height:d.value?"calc(120px - 20px)":"calc(84px - 20px)"},{position:"absolute"}]),class:"plus-hover-icon"},[C("div",vZ,[e.printer?ve("",!0):($(),te(re,{key:0,"floor-id":(J=Z(s).selectedFloor)==null?void 0:J.id,"floor-x":e.x,"floor-y":e.y},null,8,["floor-id","floor-x","floor-y"])),e.printer?($(),te(se,{key:1,color:"error",rounded:"",small:"",onClickCapture:M[0]||(M[0]=Ct(ke=>V(),["stop"]))},{default:v(()=>[p(ee,null,{default:v(()=>[...M[9]||(M[9]=[E("clear",-1)])]),_:1}),M[10]||(M[10]=E(" Clear position ",-1))]),_:1})):ve("",!0)])],4)):ve("",!0),e.printer&&g.value?($(),ye("div",yZ,[(we=Z(h))!=null&&we.length?($(),te(bs,{key:1,src:"data:image/png;base64,"+(Z(h)??""),width:f.value},null,8,["src","width"])):($(),te(bs,{key:0,src:Z(tw),width:f.value,alt:"No thumbnail was found in GCode",style:{opacity:"0.3",filter:"grayscale(100%)"}},null,8,["src","width"]))])):e.printer?($(),ye("div",bZ,[(q=k.value)!=null&&q.text.includes("API")?($(),te(ee,{key:0,size:f.value,color:"secondary"},{default:v(()=>[...M[11]||(M[11]=[E(" wifi_off ",-1)])]),_:1},8,["size"])):ve("",!0),e.printer.enabled?ve("",!0):($(),te(ee,{key:1,size:f.value,color:"secondary"},{default:v(()=>[...M[12]||(M[12]=[E(" disabled_by_default ",-1)])]),_:1},8,["size"])),(he=k.value)!=null&&he.text.includes("unset")?($(),te(ee,{key:2,size:f.value,color:"secondary"},{default:v(()=>[...M[13]||(M[13]=[E(" question_mark ",-1)])]),_:1},8,["size"])):ve("",!0)])):ve("",!0),e.printer&&!Z(o).gridEditMode?($(),ye("div",wZ,[p(ot,{top:""},{activator:v(({props:ke})=>[p(se,ge({color:"darkgray",elevation:"0",small:"",style:{"border-radius":"7px"}},ke,{onClick:M[1]||(M[1]=Ct(Re=>L(),["prevent","stop"]))}),{default:v(()=>[p(ee,{dark:""},{default:v(()=>[...M[14]||(M[14]=[E("menu",-1)])]),_:1})]),_:1},16)]),default:v(()=>[...M[15]||(M[15]=[E("Open printer details",-1)])]),_:1})])):ve("",!0),e.printer&&!Z(o).gridEditMode?($(),ye("div",{key:4,style:Be([{position:d.value?"inherit":"absolute",top:d.value?"inherit":"30px"},{overflow:"clip"}]),class:"printer-controls"},[C("small",SZ,ae(x.value??" "),1)],4)):ve("",!0),e.printer&&!Z(o).gridEditMode?($(),ye("div",_Z,[p(ot,{top:""},{activator:v(({props:ke})=>[p(se,ge({disabled:!g.value||!m.value,size:d.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},ke,{onClick:M[2]||(M[2]=Ct(Re=>F(),["prevent","stop"]))}),{default:v(()=>[p(ee,null,{default:v(()=>[...M[16]||(M[16]=[E("open_with",-1)])]),_:1})]),_:1},16,["disabled","size"])]),default:v(()=>[...M[17]||(M[17]=[E("Move and home printer",-1)])]),_:1}),p(ot,{top:""},{activator:v(({props:ke})=>[!m.value&&g.value?($(),te(se,ge({key:0,size:d.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},ke,{onClick:M[3]||(M[3]=Ct(Re=>X(),["prevent","stop"]))}),{default:v(()=>[p(ee,null,{default:v(()=>[...M[18]||(M[18]=[E("usb",-1)])]),_:1})]),_:1},16,["size"])):ve("",!0)]),default:v(()=>[...M[19]||(M[19]=[E("Connect USB (only for OctoPrint)",-1)])]),_:1}),p(ot,{top:""},{activator:v(({props:ke})=>[p(se,ge({size:d.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},ke,{onClick:M[4]||(M[4]=Ct(Re=>B(),["prevent","stop"]))}),{default:v(()=>[p(ee,null,{default:v(()=>[...M[20]||(M[20]=[E("refresh",-1)])]),_:1})]),_:1},16,["size"])]),default:v(()=>[...M[21]||(M[21]=[E("Reload printer websocket and refresh all states ",-1)])]),_:1}),p(ot,{top:""},{activator:v(({props:ke})=>[p(se,ge({disabled:!g.value||!w.value&&!y.value,size:d.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},ke,{onClick:M[5]||(M[5]=Ct(Re=>w.value?A():P(),["prevent","stop"]))}),{default:v(()=>[w.value?ve("",!0):($(),te(ee,{key:0},{default:v(()=>[...M[22]||(M[22]=[E("pause",-1)])]),_:1})),w.value?($(),te(ee,{key:1},{default:v(()=>[...M[23]||(M[23]=[E("play_arrow",-1)])]),_:1})):ve("",!0)]),_:1},16,["disabled","size"])]),default:v(()=>[E(ae(w.value?"Resume print":"Pause print"),1)]),_:1}),p(ot,{top:""},{activator:v(({props:ke})=>[p(se,ge({disabled:!g.value||_.value&&!y.value&&!w.value,size:d.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},ke,{onClick:M[6]||(M[6]=Ct(Re=>_.value?I():W(),["prevent","stop"]))}),{default:v(()=>[p(ee,null,{default:v(()=>[E(ae(_.value?"stop":"dangerous"),1)]),_:1})]),_:1},16,["disabled","size"])]),default:v(()=>[E(ae(_.value?"Cancel current print gracefully":"Perform quick stop of printer"),1)]),_:1}),p(ot,{top:""},{activator:v(({props:ke})=>[p(se,ge({size:d.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},ke,{onClick:M[7]||(M[7]=Ct(Re=>O(),["prevent","stop"]))}),{default:v(()=>[p(ee,null,{default:v(()=>[...M[24]||(M[24]=[E("settings",-1)])]),_:1})]),_:1},16,["size"])]),default:v(()=>[...M[25]||(M[25]=[E("Open printer settings",-1)])]),_:1})])):ve("",!0),e.printer&&!Z(o).gridEditMode?($(),te(Eu,{key:6,value:(K=(ne=R.value)==null?void 0:ne.progress)==null?void 0:K.completion,"background-color":"dark-gray",class:"progress-bar",height:"14"},{default:v(({value:ke})=>{var Re;return[C("strong",null,ae((ke==null?void 0:ke.toFixed(1))+"%"),1),p(ot,{disabled:(Re=e.printer)==null?void 0:Re.enabled,"close-delay":"100",color:"danger","open-delay":"0",top:""},{activator:v(({props:N})=>{var U,Y,le;return[C("span",ge({class:"xsmall-resized-font text--secondary ml-sm-2"},N),[(U=e.printer)!=null&&U.disabledReason?($(),ye("span",kZ,[M[27]||(M[27]=C("small",null," MAINTENANCE",-1)),p(ee,{class:"d-none d-xl-inline",color:"primary",small:""},{default:v(()=>[...M[26]||(M[26]=[E("info",-1)])]),_:1})])):($(),ye("span",xZ,[C("small",{style:Be({"background-color":T.value+"99","border-left":"5px solid "+T.value+"ff",padding:"5px"})},ae((le=(Y=k.value)==null?void 0:Y.text)==null?void 0:le.toUpperCase()),5)]))],16)]}),default:v(()=>{var N;return[C("span",null,ae(((N=e.printer)==null?void 0:N.disabledReason)??"Printer disabled"),1)]}),_:1},8,["disabled"])]}),_:1},8,["value"])):ve("",!0)]}),_:1},8,["class"])),[[H,{printers:[e.printer]}]])])),[[j,{x:e.x,y:e.y,printerSet:e.printer}]])}}}),HM="FDM-Monster-Client-Vue2";var jM=(e=>(e.PRINTER_PLACE="PRINTER_PLACE",e))(jM||{});function CZ(e){var t,n;return!((t=e==null?void 0:e.appId)!=null&&t.length)||!((n=e==null?void 0:e.intent)!=null&&n.length)?!1:e.appId===HM&&e.intent==="PRINTER_PLACE"}const TZ=ce({color:String,density:String,...Ge()},"VBannerActions"),RZ=Ee()({name:"VBannerActions",props:TZ(),setup(e,t){let{slots:n}=t;return zr({VBtn:{color:e.color,density:e.density,slim:!0,variant:"text"}}),Me(()=>{var r;return C("div",{class:Oe(["v-banner-actions",e.class]),style:Be(e.style)},[(r=n.default)==null?void 0:r.call(n)])}),{}}}),PZ=Ku("v-banner-text"),IZ=ce({avatar:String,bgColor:String,color:String,icon:He,lines:String,stacked:Boolean,sticky:Boolean,text:String,...xs(),...Ge(),...Jn(),...xr(),...Sl({mobile:null}),...Cs(),...sa(),...Qu(),...Hn(),...gt(),...Nt()},"VBanner"),WM=Ee()({name:"VBanner",props:IZ(),setup(e,t){let{slots:n}=t;const{backgroundColorClasses:r,backgroundColorStyles:s}=wr(()=>e.bgColor),{borderClasses:i}=Hs(e),{densityClasses:o}=Es(e),{displayClasses:a,mobile:l}=qs(e),{dimensionStyles:u}=Er(e),{elevationClasses:c}=js(e),{locationStyles:d}=wl(e),{positionClasses:f}=Ju(e),{roundedClasses:h}=Zn(e),{themeClasses:g}=nn(e),m=ie(()=>e.color),y=ie(()=>e.density);zr({VBannerActions:{color:m,density:y}}),Me(()=>{const w=!!(e.text||n.text),b=!!(e.avatar||e.icon),S=!!(b||n.prepend);return p(e.tag,{class:Oe(["v-banner",{"v-banner--stacked":e.stacked||l.value,"v-banner--sticky":e.sticky,[`v-banner--${e.lines}-line`]:!!e.lines},g.value,r.value,i.value,o.value,a.value,c.value,f.value,h.value,e.class]),style:Be([s.value,u.value,d.value,e.style]),role:"banner"},{default:()=>{var _;return[S&&C("div",{key:"prepend",class:"v-banner__prepend"},[n.prepend?p(Ft,{key:"prepend-defaults",disabled:!b,defaults:{VAvatar:{color:m.value,density:y.value,icon:e.icon,image:e.avatar}}},n.prepend):p(dt,{key:"prepend-avatar",color:m.value,density:y.value,icon:e.icon,image:e.avatar},null)]),C("div",{class:"v-banner__content"},[w&&p(PZ,{key:"text"},{default:()=>{var k;return[((k=n.text)==null?void 0:k.call(n))??e.text]}}),(_=n.default)==null?void 0:_.call(n)]),n.actions&&p(RZ,{key:"actions"},n.actions)]}})})}}),AZ={class:"printer-grid-container"},OZ={key:0,class:"d-flex flex-row justify-start",style:{gap:"10px",width:"100%"}},DZ={key:0,class:"d-flex flex-column justify-start",style:{gap:"10px","margin-top":"10px"}},MZ=Ve({__name:"PrinterGrid",props:{gap:{type:String,default:"4px"}},setup(e){const t=Xt(),n=fo(),r=Ks(),s=sg();xt(async()=>{await t.loadPrinters(),await n.loadFloors()});const i=e,o=D(()=>n.gridSortedPrinters),a=D(()=>r.gridCols),l=D(()=>r.gridRows),u=D(()=>r.largeTiles),c=D(()=>l.value*a.value),d=D(()=>({display:"grid",gridTemplateColumns:`repeat(${a.value}, 1fr)`,gap:i.gap})),f=_=>_%a.value,h=_=>Math.floor(_/a.value);function g(_,k){k.dataTransfer&&_.id&&k.dataTransfer.setData("text",JSON.stringify({appId:HM,intent:jM.PRINTER_PLACE,printerId:_.id}))}function m(_,k){var x;const T=_,R=k;if(!(!((x=o.value)!=null&&x.length)||!o.value[T]))return o.value[T][R]}async function y(){!s.gridEditMode||!r.frontendSettings||r.frontendSettings.gridRows>=16||(r.frontendSettings.gridRows++,await r.saveFrontendSettings())}async function w(){!s.gridEditMode||!r.frontendSettings||r.frontendSettings.gridCols>=12||(r.frontendSettings.gridCols++,await r.saveFrontendSettings())}async function b(){!s.gridEditMode||!r.frontendSettings||r.frontendSettings.gridRows!=1&&(r.frontendSettings.gridRows--,await r.saveFrontendSettings())}async function S(){!s.gridEditMode||!r.frontendSettings||r.frontendSettings.gridCols!=1&&(r.frontendSettings.gridCols--,await r.saveFrontendSettings())}return(_,k)=>($(),ye("div",null,[Z(s).gridEditMode?($(),te(WM,{key:0},{default:v(()=>[p(st,{style:{"margin-bottom":"-5px"}},{default:v(()=>[p(We,null,{default:v(()=>[C("span",null," Drag "+ae(Z(n).floorlessPrinters.length)+" unplaced printer(s) from here to place it on the grid. ",1),p($p,null,{default:v(()=>[($(!0),ye(De,null,Zt(Z(n).floorlessPrinters,T=>($(),te(Cn,{key:T.id,draggable:"",size:"small",style:{cursor:"move"},onDragstart:R=>g(T,R)},{default:v(()=>[E(ae(T.name),1)]),_:2},1032,["onDragstart"]))),128))]),_:1})]),_:1}),p(We,null,{default:v(()=>[C("div",null,[k[6]||(k[6]=E(" Clear printers by clicking on ",-1)),C("strong",null,[p(ee,null,{default:v(()=>[...k[4]||(k[4]=[E("disabled_visible",-1)])]),_:1}),k[5]||(k[5]=E(" Click to clear ",-1))])])]),_:1})]),_:1})]),_:1})):ve("",!0),C("div",AZ,[C("div",{class:"printer-grid",style:Be(d.value)},[($(!0),ye(De,null,Zt(c.value,T=>($(),ye("div",{key:`printer-${f(T-1)}-${h(T-1)}`,class:Oe(["printer-cell",{"printer-cell-large":u.value}])},[p(EZ,{printer:m(f(T-1),h(T-1)),x:f(T-1),y:h(T-1)},null,8,["printer","x","y"])],2))),128)),Z(s).gridEditMode?($(),ye("div",OZ,[k[9]||(k[9]=E(" Columns ",-1)),p(se,{"x-small":"",rounded:"",disabled:Z(r).gridCols<=1,onClick:k[0]||(k[0]=T=>S())},{default:v(()=>[p(ee,null,{default:v(()=>[...k[7]||(k[7]=[E("remove",-1)])]),_:1})]),_:1},8,["disabled"]),p(se,{"x-small":"",rounded:"",disabled:Z(r).gridCols>=12,onClick:k[1]||(k[1]=T=>w())},{default:v(()=>[p(ee,null,{default:v(()=>[...k[8]||(k[8]=[E("add",-1)])]),_:1})]),_:1},8,["disabled"])])):ve("",!0)],4),Z(s).gridEditMode?($(),ye("div",DZ,[k[12]||(k[12]=E(" Rows ",-1)),p(se,{"x-small":"",rounded:"",disabled:Z(r).gridRows<=1,onClick:k[2]||(k[2]=T=>b())},{default:v(()=>[p(ee,null,{default:v(()=>[...k[10]||(k[10]=[E("remove",-1)])]),_:1})]),_:1},8,["disabled"]),p(se,{"x-small":"",rounded:"",disabled:Z(r).gridRows>=16,onClick:k[3]||(k[3]=T=>y())},{default:v(()=>[p(ee,null,{default:v(()=>[...k[11]||(k[11]=[E("add",-1)])]),_:1})]),_:1},8,["disabled"])])):ve("",!0)]),k[13]||(k[13]=C("img",{alt:"FDM Monster Background",class:"grid-bg-img align-content-center",src:sw,style:{opacity:"0.08","pointer-events":"none"}},null,-1))]))}}),LZ=El(MZ,[["__scopeId","data-v-0a20edf3"]]);function FZ(e,t,n=!0){return e?t.map(r=>({file:r,printer:e,startPrint:n})):[]}function qM(e,t,n=!0){return!(e!=null&&e.length)||!t?[]:e.map(r=>({file:t,printer:r,startPrint:n}))}const $Z=ce({indeterminate:Boolean,inset:Boolean,flat:Boolean,loading:{type:[Boolean,String],default:!1},...xl(),...Xm()},"VSwitch"),qp=Ee()({name:"VSwitch",inheritAttrs:!1,props:$Z(),emits:{"update:focused":e=>!0,"update:modelValue":e=>!0,"update:indeterminate":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const s=lt(e,"indeterminate"),i=lt(e,"modelValue"),{loaderClasses:o}=sf(e),{isFocused:a,focus:l,blur:u}=hc(e),c=G(),d=G(),f=p0&&window.matchMedia("(forced-colors: active)").matches,h=ie(()=>typeof e.loading=="string"&&e.loading!==""?e.loading:e.color),g=jr(),m=ie(()=>e.id||`switch-${g}`);function y(){s.value&&(s.value=!1)}function w(b){var S,_;b.stopPropagation(),b.preventDefault(),(_=(S=c.value)==null?void 0:S.input)==null||_.click()}return Me(()=>{const[b,S]=yl(n),_=ws.filterProps(e),k=fl.filterProps(e);return p(ws,ge({ref:d,class:["v-switch",{"v-switch--flat":e.flat},{"v-switch--inset":e.inset},{"v-switch--indeterminate":s.value},o.value,e.class]},b,_,{modelValue:i.value,"onUpdate:modelValue":T=>i.value=T,id:m.value,focused:a.value,style:e.style}),{...r,default:T=>{let{id:R,messagesId:x,isDisabled:I,isReadonly:P,isValid:A}=T;const L={model:i,isValid:A};return p(fl,ge({ref:c},k,{modelValue:i.value,"onUpdate:modelValue":[B=>i.value=B,y],id:R.value,"aria-describedby":x.value,type:"checkbox","aria-checked":s.value?"mixed":void 0,disabled:I.value,readonly:P.value,onFocus:l,onBlur:u},S),{...r,default:B=>{let{backgroundColorClasses:O,backgroundColorStyles:F}=B;return C("div",{class:Oe(["v-switch__track",f?void 0:O.value]),style:Be(F.value),onClick:w},[r["track-true"]&&C("div",{key:"prepend",class:"v-switch__track-true"},[r["track-true"](L)]),r["track-false"]&&C("div",{key:"append",class:"v-switch__track-false"},[r["track-false"](L)])])},input:B=>{let{inputNode:O,icon:F,backgroundColorClasses:W,backgroundColorStyles:X}=B;return C(De,null,[O,C("div",{class:Oe(["v-switch__thumb",{"v-switch__thumb--filled":F||e.loading},e.inset||f?void 0:W.value]),style:Be(e.inset?void 0:X.value)},[r.thumb?p(Ft,{defaults:{VIcon:{icon:F,size:"x-small"}}},{default:()=>[r.thumb({...L,icon:F})]}):p(AB,null,{default:()=>[e.loading?p(_m,{name:"v-switch",active:!0,color:A.value===!1?void 0:h.value},{default:V=>r.loader?r.loader(V):p(di,{active:V.isActive,color:V.color,indeterminate:!0,size:"16",width:"2"},null)}):F&&p(ee,{key:String(F),icon:F,size:"x-small"},null)]})])])}})}})}),Ts({},d)}}),NZ={class:"d-flex flex-wrap gap-2"},BZ={class:"pr-2"},VZ={class:"pr-2"},UZ={class:"pr-2"},zZ={class:"pr-2"},HZ={class:"pr-2"},jZ={class:"ma-4 pt-6"},WZ=Ve({__name:"HomeToolbar",setup(e){const t=Xt(),n=cr(),r=fo(),s=sg(),i=D(()=>r.selectedFloorIndex),o=D(()=>r.floors);function a(l){r.changeSelectedFloorByIndex(l)}return(l,u)=>($(),te(kr,{flat:""},{default:v(()=>{var c;return[p(rP,{"model-value":i.value,class:"ml-7",mandatory:"",rounded:"","onUpdate:modelValue":a},{default:v(()=>[($(!0),ye(De,null,Zt(o.value,d=>($(),te(se,{key:d.id,size:"small"},{default:v(()=>[p(ee,null,{default:v(()=>[...u[2]||(u[2]=[E("layers",-1)])]),_:1}),E(" "+ae(d.name),1)]),_:2},1024))),128))]),_:1},8,["model-value"]),(c=Z(t).printers)!=null&&c.length?ve("",!0):($(),te(se,{key:0,class:"mt-0 ml-6",color:"primary",to:"/printers"},{default:v(()=>[...u[3]||(u[3]=[E(" You have no printers. Click here to start! ",-1)])]),_:1})),Z(r).floorlessPrinters.length?($(),te(yn,{key:1,class:"ml-4"},{default:v(()=>[p(ee,null,{default:v(()=>[...u[4]||(u[4]=[E("warning",-1)])]),_:1}),E(" "+ae(Z(r).floorlessPrinters.length)+" unplaced printer(s)! ",1)]),_:1})):ve("",!0),p(Pn),C("span",NZ,[C("span",BZ,[p(ee,null,{default:v(()=>[...u[5]||(u[5]=[E("print",-1)])]),_:1}),E(" "+ae(Z(n).printingCount),1)]),C("span",VZ,[p(ee,null,{default:v(()=>[...u[6]||(u[6]=[E("ac_unit",-1)])]),_:1}),E(" "+ae(Z(n).operationalNotPrintingCount),1)]),C("span",UZ,[p(ee,null,{default:v(()=>[...u[7]||(u[7]=[E("handyman",-1)])]),_:1}),E(" "+ae(Z(t).maintenanceCount),1)]),C("span",zZ,[p(ee,null,{default:v(()=>[...u[8]||(u[8]=[E("usb_off",-1)])]),_:1}),E(" "+ae(Z(t).disconnectedCount),1)]),C("span",HZ,[p(ee,null,{default:v(()=>[...u[9]||(u[9]=[E("print_disabled",-1)])]),_:1}),E(" "+ae(Z(t).disabledCount),1)])]),p(se,{elevation:"2",small:"",class:"ml-6",icon:"",onClick:u[0]||(u[0]=d=>Z(sn)(Z(on).GridSettingsDialog).openDialog())},{default:v(()=>[p(ee,null,{default:v(()=>[...u[10]||(u[10]=[E("settings",-1)])]),_:1})]),_:1}),C("div",jZ,[p(qp,{modelValue:Z(s).gridEditMode,"onUpdate:modelValue":u[1]||(u[1]=d=>Z(s).gridEditMode=d),label:"Grid Edit Mode"},null,8,["modelValue"])])]}),_:1}))}}),qZ={class:"pl-1"},GZ=Ve({__name:"PrinterGridView",setup(e){const t=sg(),n=Xt(),r=cr(),s=rw(),i=$t(),o=G(void 0),a=D(()=>n.selectedPrinters.length>0),l=D(()=>n.selectedPrinters),u=G(null),c=()=>{u.value&&(u.value.value="",o.value=void 0)},d=()=>{n.clearSelectedPrinters()},f=async()=>{var b;const w=await sn(on.BatchReprintDialog).handleAsync((b=n.selectedPrinters)==null?void 0:b.map(S=>S.id));console.log("[PrinterGridView] Dialog completed",w)},h=w=>{const b=l.value,S=b.filter(T=>r.isApiResponding(T.id));if(!o.value)return;const _=b.length-S.length;_>0&&i.openInfoMessage({title:`${_} printers inaccessible`,subtitle:"These were skipped from uploading."});const k=qM(S,o.value,w);s.queueUploads(k),u.value&&(u.value.value=""),d()},g=()=>{u.value&&u.value.files?o.value=u.value.files[0]:o.value=void 0},m=w=>{n.toggleSelectedPrinter(w)},y=w=>{tn.openPrinterURL(w.printerURL)};return(w,b)=>{const S=gd("drop-upload");return $(),ye("div",null,[p(WZ),Z(t).gridEditMode?ve("",!0):zt(($(),te(WM,{key:0},{default:v(()=>[p(st,{style:{"margin-bottom":"-5px"}},{default:v(()=>[p(We,{style:{padding:"5px 0 0 15px"}},{default:v(()=>[p($p,{class:"d-inline-block"},{default:v(()=>[l.value.length===0?($(),te(Cn,{key:0,size:"small"},{default:v(()=>[...b[7]||(b[7]=[E(" No selected printers ",-1)])]),_:1})):ve("",!0),($(!0),ye(De,null,Zt(l.value,_=>($(),te(Cn,{key:_.id,closable:"",color:"primary",size:"small",onClick:k=>y(_),"onClick:close":k=>m(_)},{default:v(()=>[E(ae(_.name),1)]),_:2},1032,["onClick","onClick:close"]))),128))]),_:1})]),_:1}),p(We,{align:"right",style:{padding:"0"}},{default:v(()=>[o.value?($(),te($p,{key:0,class:"float-end"},{default:v(()=>[p(Cn,{closable:"","onClick:close":b[0]||(b[0]=_=>c())},{default:v(()=>[E(ae(o.value.name)+" ",1),C("strong",qZ,ae(Z(vD)(o.value.size)),1)]),_:1})]),_:1})):ve("",!0),b[14]||(b[14]=C("br",null,null,-1)),p(se,{disabled:!a.value,color:"primary",size:"x-small",onClick:b[1]||(b[1]=_=>f())},{default:v(()=>[p(ee,{class:"pr-2",size:"small"},{default:v(()=>[...b[8]||(b[8]=[E(" refresh ",-1)])]),_:1}),b[9]||(b[9]=E(" Batch reprint ",-1))]),_:1},8,["disabled"]),p(se,{color:a.value?"primary":"secondary",class:"ml-2",size:"x-small",onClick:b[2]||(b[2]=_=>d())},{default:v(()=>[p(ee,{class:"pr-2",size:"small"},{default:v(()=>[...b[10]||(b[10]=[E(" delete ",-1)])]),_:1}),E(" Clear all ("+ae(l.value.length)+") ",1)]),_:1},8,["color"]),p(se,{class:"ml-2",color:"primary",size:"x-small",onClick:b[3]||(b[3]=_=>{var k;return(k=u.value)==null?void 0:k.click()})},{default:v(()=>[...b[11]||(b[11]=[E(" Select gcode file ",-1)])]),_:1}),p(se,{disabled:!o.value,class:"ml-2 mr-5",color:"green",size:"x-small",onClick:b[4]||(b[4]=_=>h(!1))},{default:v(()=>[...b[12]||(b[12]=[E(" Upload only ",-1)])]),_:1},8,["disabled"]),p(se,{disabled:!o.value,class:"ml-2 mr-5",color:"green",size:"x-small",onClick:b[5]||(b[5]=_=>h(!0))},{default:v(()=>[...b[13]||(b[13]=[E(" Upload and print ",-1)])]),_:1},8,["disabled"]),C("input",{ref_key:"fileUpload",ref:u,multiple:!1,accept:".gcode",style:{display:"none"},type:"file",onChange:b[6]||(b[6]=_=>g())},null,544)]),_:1})]),_:1})]),_:1})),[[S,{printers:l.value}]]),p(LZ,{class:"ma-2"})])}}}),KZ=Ve({name:"RefreshFilesAction",components:{},props:{printer:Object},setup:()=>({printersStore:Xt()}),methods:{async getFiles(){this.printer&&await this.printersStore.loadPrinterFiles(this.printer.id)}}});function YZ(e,t,n,r,s,i){return $(),te(se,{color:"secondary",onClick:t[0]||(t[0]=o=>e.getFiles())},{default:v(()=>[p(ee,null,{default:v(()=>[...t[1]||(t[1]=[E("refresh",-1)])]),_:1}),t[2]||(t[2]=C("span",{class:"d-none d-lg-inline"}," Refresh files ",-1))]),_:1})}const GM=El(KZ,[["render",YZ]]),XZ=Ve({name:"PrinterDetails",components:{RefreshFilesAction:GM},props:{printer:Object},setup:()=>({printersStore:Xt(),printerStateStore:cr()}),data:()=>({dragging:!1}),computed:{printerId(){var e;return(e=this.printer)==null?void 0:e.id},socketState(){var e;if(this.printerId)return(e=this.printerStateStore.socketStatesById[this.printerId])==null?void 0:e.socket},apiState(){var e;if(this.printerId)return(e=this.printerStateStore.socketStatesById[this.printerId])==null?void 0:e.api},printerTextState(){var e,t,n;if(this.printerId)return(n=(t=(e=this.printerStateStore.printerEventsById[this.printerId])==null?void 0:e.current)==null?void 0:t.payload)==null?void 0:n.state.text}}});function QZ(e,t,n,r,s,i){const o=GM,a=gd("drop-upload");return e.printer?zt(($(),te(Xn,{key:0,style:Be(e.dragging?"background-color:red":""),transition:"scale-transition"},{default:v(()=>[p(st,null,{default:v(()=>[p(We,null,{default:v(()=>[E(" Name: "+ae(e.printer.name)+" ",1),t[0]||(t[0]=C("br",null,null,-1)),E(" URL: "+ae(e.printer.printerURL)+" ",1),t[1]||(t[1]=C("br",null,null,-1)),t[2]||(t[2]=E(" Host: ",-1)),p(Cn,{size:"small"},{default:v(()=>[E(ae(e.apiState),1)]),_:1}),t[3]||(t[3]=C("br",null,null,-1)),t[4]||(t[4]=E(" WebSocket: ",-1)),p(Cn,{size:"small"},{default:v(()=>[E(ae(e.socketState),1)]),_:1}),t[5]||(t[5]=C("br",null,null,-1)),t[6]||(t[6]=E(" Printer: ",-1)),p(Cn,{size:"small"},{default:v(()=>[E(ae(e.printerTextState),1)]),_:1})]),_:1}),p(We,null,{default:v(()=>[p(o,{printer:e.printer,class:"d-flex justify-end"},null,8,["printer"])]),_:1})]),_:1})]),_:1},8,["style"])),[[a,{printers:[e.printer]}]]):ve("",!0)}const JZ=El(XZ,[["render",QZ]]),ZZ=Ve({__name:"PrinterUrlAction",props:{printer:{}},setup(e){const t=e;async function n(){tn.openPrinterURL(t.printer.printerURL)}return(r,s)=>($(),te(ot,{location:"top"},{activator:v(({props:i})=>[p(se,ge(i,{color:"secondary",rounded:"",size:"small",onClickCapture:s[0]||(s[0]=Ct(o=>n(),["stop"]))}),{default:v(()=>[p(ee,null,{default:v(()=>[...s[1]||(s[1]=[E("directions",-1)])]),_:1})]),_:1},16)]),default:v(()=>[...s[2]||(s[2]=[E("Visit printer service",-1)])]),_:1}))}}),eee=Ve({name:"PrinterSettingsAction",props:{printer:Object},computed:{printerId(){return this.printer.id}},methods:{openSettings(){this.$emit("update:show",this.printer.id)}}});function tee(e,t,n,r,s,i){return $(),te(ot,{location:"top"},{activator:v(({props:o})=>[p(se,ge(o,{color:"secondary",class:"ma-2",size:"small",rounded:"",onClickCapture:t[0]||(t[0]=Ct(a=>e.openSettings(),["stop"]))}),{default:v(()=>[p(ee,null,{default:v(()=>[...t[1]||(t[1]=[E("settings",-1)])]),_:1})]),_:1},16)]),default:v(()=>[...t[2]||(t[2]=[E("Update printer settings",-1)])]),_:1})}const nee=El(eee,[["render",tee]]),ree=ce({bordered:Boolean,color:String,content:[Number,String],dot:Boolean,floating:Boolean,icon:He,inline:Boolean,label:{type:String,default:"$vuetify.badge"},max:[Number,String],modelValue:{type:Boolean,default:!0},offsetX:[Number,String],offsetY:[Number,String],textColor:String,...Ge(),...sa({location:"top end"}),...Hn(),...gt(),...Nt(),...ec({transition:"scale-rotate-transition"}),...xr()},"VBadge"),KM=Ee()({name:"VBadge",inheritAttrs:!1,props:ree(),setup(e,t){const{backgroundColorClasses:n,backgroundColorStyles:r}=wr(()=>e.color),{roundedClasses:s}=Zn(e),{t:i}=ts(),{textColorClasses:o,textColorStyles:a}=Vs(()=>e.textColor),{themeClasses:l}=ZR(),{locationStyles:u}=wl(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:c}=Er(e);return Me(()=>{const d=Number(e.content),f=!e.max||isNaN(d)?e.content:d<=Number(e.max)?d:`${e.max}+`,[h,g]=oy(t.attrs,["aria-atomic","aria-label","aria-live","role","title"]);return p(e.tag,ge({class:["v-badge",{"v-badge--bordered":e.bordered,"v-badge--dot":e.dot,"v-badge--floating":e.floating,"v-badge--inline":e.inline},e.class]},g,{style:e.style}),{default:()=>{var m,y;return[C("div",{class:"v-badge__wrapper"},[(y=(m=t.slots).default)==null?void 0:y.call(m),p(hi,{transition:e.transition},{default:()=>{var w,b;return[zt(C("span",ge({class:["v-badge__badge",l.value,n.value,s.value,o.value],style:[r.value,a.value,c.value,e.inline?{}:u.value],"aria-atomic":"true","aria-label":i(e.label,d),"aria-live":"polite",role:"status"},h),[e.dot?void 0:t.slots.badge?(b=(w=t.slots).badge)==null?void 0:b.call(w):e.icon?p(ee,{icon:e.icon},null):f]),[[uo,e.modelValue]])]}})])]}})}),{}}}),see=Ve({__name:"PrinterConnectionAction",props:{printer:{}},setup(e){const t=e,n=cr();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 tn.sendPrinterDisconnectCommand(t.printer.id);await tn.sendPrinterConnectCommand(t.printer.id)}return(o,a)=>($(),te(ot,{location:"top"},{activator:v(({props:l})=>[e.printer.enabled?($(),te(KM,{key:0,color:r()?"green":"red",class:"pa-2"},{badge:v(()=>[r()?($(),te(ee,{key:0},{default:v(()=>[...a[0]||(a[0]=[E("check",-1)])]),_:1})):($(),te(ee,{key:1},{default:v(()=>[...a[1]||(a[1]=[E("close",-1)])]),_:1}))]),default:v(()=>[p(se,ge({disabled:s()},l,{color:"secondary",rounded:"",size:"small",onClick:Ct(i,["stop"])}),{default:v(()=>[p(ee,null,{default:v(()=>[...a[2]||(a[2]=[E("usb",-1)])]),_:1})]),_:1},16,["disabled"])]),_:2},1032,["color"])):ve("",!0)]),default:v(()=>[...a[3]||(a[3]=[E("Connect USB (OctoPrint only)",-1)])]),_:1}))}}),iee=Ve({__name:"PrinterQuickStopAction",props:{printer:{}},setup(e){const t=e;async function n(){confirm("Are you sure to quick stop this printer?")&&await zM.postQuickStopM112Command(t.printer.id)}return(r,s)=>($(),te(ot,{location:"top"},{activator:v(({props:i})=>[e.printer.enabled?($(),te(KM,{key:0,class:"ma-2"},{badge:v(()=>[p(ee,null,{default:v(()=>[...s[0]||(s[0]=[E("bolt",-1)])]),_:1})]),default:v(()=>[p(se,ge(i,{color:"secondary",size:"small",rounded:"",onClick:Ct(n,["stop"])}),{default:v(()=>[p(ee,null,{default:v(()=>[...s[1]||(s[1]=[E("dangerous",-1)])]),_:1})]),_:1},16)]),_:2},1024)):ve("",!0)]),default:v(()=>[...s[2]||(s[2]=[E("Perform quick stop of printer",-1)])]),_:1}))}});class YM extends Cr{static async getSettings(t){const n=`${$e.getPrinterSettingsRoute(t)}`;return await this.get(n)}static async setGCodeAnalysis(t,n=!1){const r=`${$e.setPrinterSettingsGCodeAnalysisRoute(t)}`;return await this.post(r,{enabled:n})}static async syncPrinterName(t){const n=`${$e.syncPrinterNameSettingRoute(t)}`;return await this.post(n)}}const oee=Ve({__name:"SyncPrinterNameAction",props:{printer:{}},setup(e){const t=e,n=$t();async function r(){await YM.syncPrinterName(t.printer.id),n.openInfoMessage({title:"Synced printer name to OctoPrint"})}return(s,i)=>($(),te(ot,{location:"top"},{activator:v(({props:o})=>[p(se,ge(o,{color:"secondary",size:"small",rounded:"",onClickCapture:i[0]||(i[0]=Ct(a=>r(),["stop"]))}),{default:v(()=>[p(ee,null,{default:v(()=>[...i[1]||(i[1]=[E("badge",-1)])]),_:1})]),_:1},16)]),default:v(()=>[...i[2]||(i[2]=[E(" Set OctoPrints name to the FDM Monster Name ",-1)])]),_:1}))}}),aee=Ve({__name:"PrinterDeleteAction",props:{printer:{}},setup(e){const t=e,n=Xt(),r=cr();async function s(){confirm("Are you sure to delete this printer?")&&(await n.deletePrinter(t.printer.id),r.deletePrinterEvents(t.printer.id))}return(i,o)=>($(),te(ot,{location:"top"},{activator:v(({props:a})=>[p(se,ge(a,{class:"ms-4",color:"secondary",size:"small",rounded:"",onClick:Ct(s,["prevent","stop"])}),{default:v(()=>[p(ee,null,{default:v(()=>[...o[0]||(o[0]=[E("delete",-1)])]),_:1})]),_:1},16)]),default:v(()=>[...o[1]||(o[1]=[E("Delete printer",-1)])]),_:1}))}});class Ml extends Cr{static async createGroup(t){const n=`${$e.createGroupRoute}`,r={name:t};return await this.post(n,r)}static async deleteGroup(t){const n=`${$e.deleteGroupRoute(t)}`;return await this.delete(n)}static async getGroupsWithPrinters(){const t=`${$e.printerGroupRoute}`;return await this.get(t)}static async addPrinterToGroup(t,n){const r=`${$e.addPrinterToGroupRoute(t)}`,s={printerId:n};return await this.post(r,s)}static async deletePrinterFromGroup(t,n){const r=`${$e.deletePrinterFromGroupRoute(t)}`,s={printerId:n};return await this.delete(r,s)}static async updateGroupName(t,n){const r=`${$e.updateGroupNameRoute(t)}`,s={name:n};return await this.patch(r,s)}}const lee=(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 Sv(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 uee=ce({customFilter:Function,customKeyFilter:Object,filterKeys:[Array,String],filterMode:{type:String,default:"intersection"},noFilter:Boolean},"filter");function cee(e,t,n){var l;const r=[],s=(n==null?void 0:n.default)??lee,i=n!=null&&n.filterKeys?Fn(n.filterKeys):!1,o=Object.keys((n==null?void 0:n.customKeyFilter)??{}).length;if(!(e!=null&&e.length))return r;let a=null;e:for(let u=0;u<e.length;u++){const[c,d=c]=Fn(e[u]),f={},h={};let g=-1;if((t||o>0)&&!(n!=null&&n.noFilter)){let m=!1;if(typeof c=="object"){if(c.type==="divider"||c.type==="subheader"){(a==null?void 0:a.type)==="divider"&&c.type==="subheader"&&r.push(a),a={index:u,matches:{},type:c.type};continue}const b=i||Object.keys(d);m=b.length===o;for(const S of b){const _=Mn(d,S),k=(l=n==null?void 0:n.customKeyFilter)==null?void 0:l[S];if(g=k?k(_,t,c):s(_,t,c),g!==-1&&g!==!1)k?f[S]=Sv(g,t):h[S]=Sv(g,t);else if((n==null?void 0:n.filterMode)==="every")continue e}}else g=s(c,t,c),g!==-1&&g!==!1&&(h.title=Sv(g,t));const y=Object.keys(h).length,w=Object.keys(f).length;if(!y&&!w||(n==null?void 0:n.filterMode)==="union"&&w!==o&&!y||(n==null?void 0:n.filterMode)==="intersection"&&(w!==o||!y&&o>0&&!m))continue}a&&(r.push(a),a=null),r.push({index:u,matches:{...h,...f}})}return r}function dee(e,t,n,r){const s=Ce([]),i=Ce(new Map),o=D(()=>r!=null&&r.transform?Z(t).map(l=>[l,r.transform(l)]):Z(t));Rn(()=>{const l=typeof n=="function"?n():Z(n),u=typeof l!="string"&&typeof l!="number"?"":String(l),c=cee(o.value,u,{customKeyFilter:{...e.customKeyFilter,...Z(r==null?void 0:r.customKeyFilter)},default:e.customFilter,filterKeys:e.filterKeys,filterMode:e.filterMode,noFilter:e.noFilter}),d=Z(t),f=[],h=new Map;c.forEach(g=>{let{index:m,matches:y}=g;const w=d[m];f.push(w),h.set(w.value,y)}),s.value=f,i.value=h});function a(l){return i.value.get(l.value)}return{filteredItems:s,filteredMatches:i,getMatches:a}}const fee=ce({expandOnClick:Boolean,showExpand:Boolean,expanded:{type:Array,default:()=>[]}},"DataTable-expand"),XM=Symbol.for("vuetify:datatable:expanded");function hee(e){const t=ie(()=>e.expandOnClick),n=lt(e,"expanded",e.expanded,a=>new Set(a),a=>[...a.values()]);function r(a,l){const u=new Set(n.value),c=Ue(a.value);if(l)u.add(c);else{const d=[...n.value].find(f=>Ue(f)===c);u.delete(d)}n.value=u}function s(a){const l=Ue(a.value);return[...n.value].some(u=>Ue(u)===l)}function i(a){r(a,!s(a))}const o={expand:r,expanded:n,expandOnClick:t,isExpanded:s,toggleExpand:i};return Jt(XM,o),o}function QM(){const e=Xe(XM);if(!e)throw new Error("foo");return e}const pee=ce({groupBy:{type:Array,default:()=>[]}},"DataTable-group"),JM=Symbol.for("vuetify:data-table-group");function mee(e){return{groupBy:lt(e,"groupBy")}}function gee(e){const{disableSort:t,groupBy:n,sortBy:r}=e,s=G(new Set),i=D(()=>n.value.map(c=>({...c,order:c.order??!1})).concat(t!=null&&t.value?[]:r.value));function o(c){return s.value.has(c.id)}function a(c){const d=new Set(s.value);o(c)?d.delete(c.id):d.add(c.id),s.value=d}function l(c){function d(f){const h=[];for(const g of f.items)"type"in g&&g.type==="group"?h.push(...d(g)):h.push(g);return[...new Set(h)]}return d({type:"group",items:c,id:"dummy",key:"dummy",value:"dummy",depth:0})}const u={sortByWithGroups:i,toggleGroup:a,opened:s,groupBy:n,extractRows:l,isGroupOpen:o};return Jt(JM,u),u}function ZM(){const e=Xe(JM);if(!e)throw new Error("Missing group!");return e}function vee(e,t){if(!e.length)return[];const n=new Map;for(const r of e){const s=ol(r.raw,t);n.has(s)||n.set(s,[]),n.get(s).push(r)}return n}function e2(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=vee(e,t[0]),i=[],o=t.slice(1);return s.forEach((a,l)=>{const u=t[0],c=`${r}_${u}_${l}`;i.push({depth:n,id:c,key:u,value:l,items:o.length?e2(a,o,n+1,c):a,type:"group"})}),i}function t2(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(...t2(s.items,t,n)),n&&r.push({...s,type:"group-summary"}))):r.push(s);return r}function yee(e,t,n,r){return{flatItems:D(()=>{if(!t.value.length)return e.value;const i=e2(e.value,t.value.map(o=>o.key));return t2(i,n.value,Qt(r))})}}function bee(e){let{page:t,itemsPerPage:n,sortBy:r,groupBy:s,search:i}=e;const o=fn("VDataTable"),a=()=>({page:t.value,itemsPerPage:n.value,sortBy:r.value,groupBy:s.value,search:i.value});let l=null;xe(a,u=>{$r(l,u)||(l&&l.search!==u.search&&(t.value=1),o.emit("update:options",u),l=u)},{deep:!0,immediate:!0})}const wee=ce({page:{type:[Number,String],default:1},itemsPerPage:{type:[Number,String],default:10}},"DataTable-paginate"),n2=Symbol.for("vuetify:data-table-pagination");function See(e){const t=lt(e,"page",void 0,r=>Number(r??1)),n=lt(e,"itemsPerPage",void 0,r=>Number(r??10));return{page:t,itemsPerPage:n}}function _ee(e){const{page:t,itemsPerPage:n,itemsLength:r}=e,s=D(()=>n.value===-1?0:n.value*(t.value-1)),i=D(()=>n.value===-1?r.value:Math.min(r.value,s.value+n.value)),o=D(()=>n.value===-1||r.value===0?1:Math.ceil(r.value/n.value));xe([t,o],()=>{t.value>o.value&&(t.value=o.value)});function a(f){n.value=f,t.value=1}function l(){t.value=Un(t.value+1,1,o.value)}function u(){t.value=Un(t.value-1,1,o.value)}function c(f){t.value=Un(f,1,o.value)}const d={page:t,itemsPerPage:n,startIndex:s,stopIndex:i,pageCount:o,itemsLength:r,nextPage:l,prevPage:u,setPage:c,setItemsPerPage:a};return Jt(n2,d),d}function kee(){const e=Xe(n2);if(!e)throw new Error("Missing pagination!");return e}function xee(e){const t=fn("usePaginatedItems"),{items:n,startIndex:r,stopIndex:s,itemsPerPage:i}=e,o=D(()=>i.value<=0?n.value:n.value.slice(r.value,s.value));return xe(o,a=>{t.emit("update:currentItems",a)},{immediate:!0}),{paginatedItems:o}}const Eee={showSelectAll:!1,allSelected:()=>[],select:e=>{var r;let{items:t,value:n}=e;return new Set(n?[(r=t[0])==null?void 0:r.value]:[])},selectAll:e=>{let{selected:t}=e;return t}},r2={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 r2.select({items:n,value:t,selected:r})}},Cee={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):[])}},Tee=ce({showSelect:Boolean,selectStrategy:{type:[String,Object],default:"page"},modelValue:{type:Array,default:()=>[]},valueComparator:Function},"DataTable-select"),s2=Symbol.for("vuetify:data-table-selection");function Ree(e,t){let{allItems:n,currentPage:r}=t;const s=lt(e,"modelValue",e.modelValue,b=>{const S=e.valueComparator;return S?new Set(Fn(b).map(_=>{var k;return((k=n.value.find(T=>S(_,T.value)))==null?void 0:k.value)??_})):new Set(Fn(b).map(_=>{var k,T;return Ko(_)?((k=n.value.find(R=>_===R.value))==null?void 0:k.value)??_:((T=n.value.find(R=>$r(_,R.value)))==null?void 0:T.value)??_}))},b=>[...b.values()]),i=D(()=>n.value.filter(b=>b.selectable)),o=D(()=>r.value.filter(b=>b.selectable)),a=D(()=>{if(typeof e.selectStrategy=="object")return e.selectStrategy;switch(e.selectStrategy){case"single":return Eee;case"all":return Cee;case"page":default:return r2}}),l=Ce(null);function u(b){return Fn(b).every(S=>s.value.has(S.value))}function c(b){return Fn(b).some(S=>s.value.has(S.value))}function d(b,S){const _=a.value.select({items:b,value:S,selected:new Set(s.value)});s.value=_}function f(b,S,_){const k=[];if(S=S??r.value.findIndex(T=>T.value===b.value),e.selectStrategy!=="single"&&(_!=null&&_.shiftKey)&&l.value!==null){const[T,R]=[l.value,S].sort((x,I)=>x-I);k.push(...r.value.slice(T,R+1).filter(x=>x.selectable))}else k.push(b),l.value=S;d(k,!u([b]))}function h(b){const S=a.value.selectAll({value:b,allItems:i.value,currentPage:o.value,selected:new Set(s.value)});s.value=S}const g=D(()=>s.value.size>0),m=D(()=>{const b=a.value.allSelected({allItems:i.value,currentPage:o.value});return!!b.length&&u(b)}),y=ie(()=>a.value.showSelectAll),w={toggleSelect:f,select:d,selectAll:h,isSelected:u,isSomeSelected:c,someSelected:g,allSelected:m,showSelectAll:y,lastSelectedIndex:l,selectStrategy:a};return Jt(s2,w),w}function ig(){const e=Xe(s2);if(!e)throw new Error("Missing selection!");return e}const Pee=ce({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"),i2=Symbol.for("vuetify:data-table-sort");function Iee(e){const t=ie(()=>e.initialSortOrder),n=lt(e,"sortBy"),r=ie(()=>e.mustSort),s=ie(()=>e.multiSort);return{initialSortOrder:t,sortBy:n,multiSort:s,mustSort:r}}function Aee(e,t){if(!_u(e))return{active:!!e};const{key:n,mode:r,modifier:s}=e,i=s==="alt"&&(t==null?void 0:t.altKey)||s==="shift"&&(t==null?void 0:t.shiftKey);return{active:!n||(t==null?void 0:t.ctrlKey)||(t==null?void 0:t.metaKey)||!1,mode:i?r==="append"?"prepend":"append":r}}function Oee(e){const{initialSortOrder:t,sortBy:n,mustSort:r,multiSort:s,page:i}=e,o=(u,c)=>{if(u.key==null)return;let d=n.value.map(m=>({...m}))??[];const f=d.find(m=>m.key===u.key),h=t.value,g=t.value==="desc"?"asc":"desc";if(f)f.order===g?r.value&&d.length===1?f.order=t.value:d=d.filter(m=>m.key!==u.key):f.order=g;else{const{active:m,mode:y}=Aee(s.value,c);m?y==="prepend"?d.unshift({key:u.key,order:h}):d.push({key:u.key,order:h}):d=[{key:u.key,order:h}]}n.value=d,i&&(i.value=1)};function a(u){return!!n.value.find(c=>c.key===u.key)}const l={sortBy:n,toggleSort:o,isSorted:a};return Jt(i2,l),l}function o2(){const e=Xe(i2);if(!e)throw new Error("Missing sort!");return e}function Dee(e,t,n,r){const s=ts();return{sortedItems:D(()=>{var o,a;return n.value.length?Mee(t.value,n.value,s.current.value,{transform:r==null?void 0:r.transform,sortFunctions:{...e.customKeySort,...(o=r==null?void 0:r.sortFunctions)==null?void 0:o.value},sortRawFunctions:(a=r==null?void 0:r.sortRawFunctions)==null?void 0:a.value}):t.value})}}function Mee(e,t,n,r){const s=new Intl.Collator(n,{sensitivity:"accent",usage:"sort"});return e.map(o=>[o,r!=null&&r.transform?r.transform(o):o]).sort((o,a)=>{var l,u;for(let c=0;c<t.length;c++){let d=!1;const f=t[c].key,h=t[c].order??"asc";if(h===!1)continue;let g=ol(o[1],f),m=ol(a[1],f),y=o[0].raw,w=a[0].raw;if(h==="desc"&&([g,m]=[m,g],[y,w]=[w,y]),(l=r==null?void 0:r.sortRawFunctions)!=null&&l[f]){const b=r.sortRawFunctions[f](y,w);if(b==null)continue;if(d=!0,b)return b}if((u=r==null?void 0:r.sortFunctions)!=null&&u[f]){const b=r.sortFunctions[f](g,m);if(b==null)continue;if(d=!0,b)return b}if(!d&&(g instanceof Date&&m instanceof Date&&(g=g.getTime(),m=m.getTime()),[g,m]=[g,m].map(b=>b!=null?b.toString().toLocaleLowerCase():b),g!==m))return Mf(g)&&Mf(m)?0:Mf(g)?-1:Mf(m)?1:!isNaN(g)&&!isNaN(m)?Number(g)-Number(m):s.compare(g,m)}return 0}).map(o=>{let[a]=o;return a})}function Lee(){const e=G([]);QT(()=>e.value=[]);function t(n,r){e.value[r]=n}return{refs:e,updateRef:t}}const Fee=ce({activeColor:String,start:{type:[Number,String],default:1},modelValue:{type:Number,default:e=>e.start},disabled:Boolean,length:{type:[Number,String],default:1,validator:e=>e%1===0},totalVisible:[Number,String],firstIcon:{type:He,default:"$first"},prevIcon:{type:He,default:"$prev"},nextIcon:{type:He,default:"$next"},lastIcon:{type:He,default:"$last"},ariaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.root"},pageAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.page"},currentPageAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.currentPage"},firstAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.first"},previousAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.previous"},nextAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.next"},lastAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.last"},ellipsis:{type:String,default:"..."},showFirstLastPage:Boolean,...xs(),...Ge(),...Jn(),...Cs(),...Hn(),...Xu(),...gt({tag:"nav"}),...Nt(),...Ws({variant:"text"})},"VPagination"),aE=Ee()({name:"VPagination",props:Fee(),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=lt(e,"modelValue"),{t:i,n:o}=ts(),{isRtl:a}=Wr(),{themeClasses:l}=nn(e),{width:u}=qs(),c=Ce(-1);zr(void 0,{scoped:!0});const{resizeRef:d}=Yo(x=>{if(!x.length)return;const{target:I,contentRect:P}=x[0],A=I.querySelector(".v-pagination__list > *");if(!A)return;const L=P.width,B=A.offsetWidth+parseFloat(getComputedStyle(A).marginRight)*2;c.value=m(L,B)}),f=D(()=>parseInt(e.length,10)),h=D(()=>parseInt(e.start,10)),g=D(()=>e.totalVisible!=null?parseInt(e.totalVisible,10):c.value>=0?c.value:m(u.value,58));function m(x,I){const P=e.showFirstLastPage?5:3;return Math.max(0,Math.floor(Number(((x-I*P)/I).toFixed(2))))}const y=D(()=>{if(f.value<=0||isNaN(f.value)||f.value>Number.MAX_SAFE_INTEGER)return[];if(g.value<=0)return[];if(g.value===1)return[s.value];if(f.value<=g.value)return Hl(f.value,h.value);const x=g.value%2===0,I=x?g.value/2:Math.floor(g.value/2),P=x?I:I+1,A=f.value-I;if(P-s.value>=0)return[...Hl(Math.max(1,g.value-1),h.value),e.ellipsis,f.value];if(s.value-A>=(x?1:0)){const L=g.value-1,B=f.value-L+h.value;return[h.value,e.ellipsis,...Hl(L,B)]}else{const L=Math.max(1,g.value-2),B=L===1?s.value:s.value-Math.ceil(L/2)+h.value;return[h.value,e.ellipsis,...Hl(L,B),e.ellipsis,f.value]}});function w(x,I,P){x.preventDefault(),s.value=I,P&&r(P,I)}const{refs:b,updateRef:S}=Lee();zr({VPaginationBtn:{color:ie(()=>e.color),border:ie(()=>e.border),density:ie(()=>e.density),size:ie(()=>e.size),variant:ie(()=>e.variant),rounded:ie(()=>e.rounded),elevation:ie(()=>e.elevation)}});const _=D(()=>y.value.map((x,I)=>{const P=A=>S(A,I);if(typeof x=="string")return{isActive:!1,key:`ellipsis-${I}`,page:x,props:{ref:P,ellipsis:!0,icon:!0,disabled:!0}};{const A=x===s.value;return{isActive:A,key:x,page:o(x),props:{ref:P,ellipsis:!1,icon:!0,disabled:!!e.disabled||Number(e.length)<2,color:A?e.activeColor:e.color,"aria-current":A,"aria-label":i(A?e.currentPageAriaLabel:e.pageAriaLabel,x),onClick:L=>w(L,x)}}}})),k=D(()=>{const x=!!e.disabled||s.value<=h.value,I=!!e.disabled||s.value>=h.value+f.value-1;return{first:e.showFirstLastPage?{icon:a.value?e.lastIcon:e.firstIcon,onClick:P=>w(P,h.value,"first"),disabled:x,"aria-label":i(e.firstAriaLabel),"aria-disabled":x}:void 0,prev:{icon:a.value?e.nextIcon:e.prevIcon,onClick:P=>w(P,s.value-1,"prev"),disabled:x,"aria-label":i(e.previousAriaLabel),"aria-disabled":x},next:{icon:a.value?e.prevIcon:e.nextIcon,onClick:P=>w(P,s.value+1,"next"),disabled:I,"aria-label":i(e.nextAriaLabel),"aria-disabled":I},last:e.showFirstLastPage?{icon:a.value?e.firstIcon:e.lastIcon,onClick:P=>w(P,h.value+f.value-1,"last"),disabled:I,"aria-label":i(e.lastAriaLabel),"aria-disabled":I}:void 0}});function T(){var I;const x=s.value-h.value;(I=b.value[x])==null||I.$el.focus()}function R(x){x.key===CS.left&&!e.disabled&&s.value>Number(e.start)?(s.value=s.value-1,ht(T)):x.key===CS.right&&!e.disabled&&s.value<h.value+f.value-1&&(s.value=s.value+1,ht(T))}return Me(()=>p(e.tag,{ref:d,class:Oe(["v-pagination",l.value,e.class]),style:Be(e.style),role:"navigation","aria-label":i(e.ariaLabel),onKeydown:R,"data-test":"v-pagination-root"},{default:()=>[C("ul",{class:"v-pagination__list"},[e.showFirstLastPage&&C("li",{key:"first",class:"v-pagination__first","data-test":"v-pagination-first"},[n.first?n.first(k.value.first):p(se,ge({_as:"VPaginationBtn"},k.value.first),null)]),C("li",{key:"prev",class:"v-pagination__prev","data-test":"v-pagination-prev"},[n.prev?n.prev(k.value.prev):p(se,ge({_as:"VPaginationBtn"},k.value.prev),null)]),_.value.map((x,I)=>C("li",{key:x.key,class:Oe(["v-pagination__item",{"v-pagination__item--is-active":x.isActive}]),"data-test":"v-pagination-item"},[n.item?n.item(x):p(se,ge({_as:"VPaginationBtn"},x.props),{default:()=>[x.page]})])),C("li",{key:"next",class:"v-pagination__next","data-test":"v-pagination-next"},[n.next?n.next(k.value.next):p(se,ge({_as:"VPaginationBtn"},k.value.next),null)]),e.showFirstLastPage&&C("li",{key:"last",class:"v-pagination__last","data-test":"v-pagination-last"},[n.last?n.last(k.value.last):p(se,ge({_as:"VPaginationBtn"},k.value.last),null)])])]})),{}}}),a2=ce({color:String,prevIcon:{type:He,default:"$prev"},nextIcon:{type:He,default:"$next"},firstIcon:{type:He,default:"$first"},lastIcon:{type:He,default:"$last"},itemsPerPageText:{type:String,default:"$vuetify.dataFooter.itemsPerPageText"},pageText:{type:String,default:"$vuetify.dataFooter.pageText"},firstPageLabel:{type:String,default:"$vuetify.dataFooter.firstPage"},prevPageLabel:{type:String,default:"$vuetify.dataFooter.prevPage"},nextPageLabel:{type:String,default:"$vuetify.dataFooter.nextPage"},lastPageLabel:{type:String,default:"$vuetify.dataFooter.lastPage"},itemsPerPageOptions:{type:Array,default:()=>[{value:10,title:"10"},{value:25,title:"25"},{value:50,title:"50"},{value:100,title:"100"},{value:-1,title:"$vuetify.dataFooter.itemsPerPageAll"}]},showCurrentPage:Boolean},"VDataTableFooter"),lE=Ee()({name:"VDataTableFooter",props:a2(),setup(e,t){let{slots:n}=t;const{t:r}=ts(),{page:s,pageCount:i,startIndex:o,stopIndex:a,itemsLength:l,itemsPerPage:u,setItemsPerPage:c}=kee(),d=D(()=>e.itemsPerPageOptions.map(f=>typeof f=="number"?{value:f,title:f===-1?r("$vuetify.dataFooter.itemsPerPageAll"):String(f)}:{...f,title:isNaN(Number(f.title))?r(f.title):f.title}));return Me(()=>{var h;const f=aE.filterProps(e);return C("div",{class:"v-data-table-footer"},[(h=n.prepend)==null?void 0:h.call(n),C("div",{class:"v-data-table-footer__items-per-page"},[C("span",null,[r(e.itemsPerPageText)]),p(ea,{items:d.value,itemColor:e.color,modelValue:u.value,"onUpdate:modelValue":g=>c(Number(g)),density:"compact",variant:"outlined","aria-label":r(e.itemsPerPageText),hideDetails:!0},null)]),C("div",{class:"v-data-table-footer__info"},[C("div",null,[r(e.pageText,l.value?o.value+1:0,a.value,l.value)])]),C("div",{class:"v-data-table-footer__pagination"},[p(aE,ge({modelValue:s.value,"onUpdate:modelValue":g=>s.value=g,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"},In(f,["color"])),null)])])}),{}}}),Bd=$N({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 p(r,{class:Oe(["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:Le(e.height),width:Le(e.width),maxWidth:Le(e.maxWidth),left:s==="start"?Le(e.fixedOffset||null):void 0,right:s==="end"?Le(e.fixedEndOffset||null):void 0,paddingInlineStart:e.indent?Le(e.indent):void 0}},{default:()=>{var i;return[(i=n.default)==null?void 0:i.call(n)]}})}),$ee=ce({headers:Array},"DataTable-header"),l2=Symbol.for("vuetify:data-table-headers"),u2={title:"",sortable:!1},Nee={...u2,width:48};function Bee(){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 Db(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)Db(n,t);return t}function c2(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&&c2(n.children,t);return t}function Vee(e){if(e.key){if(e.key==="data-table-group")return u2;if(["data-table-expand","data-table-select"].includes(e.key))return Nee}}function iw(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.children?Math.max(t,...e.children.map(n=>iw(n,t+1))):t}function Uee(e){let t=!1;function n(i,o){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"none";if(i)if(a!=="none"&&(i.fixed=a),i.fixed===!0&&(i.fixed="start"),i.fixed===o)if(i.children)if(o==="start")for(let l=i.children.length-1;l>=0;l--)n(i.children[l],o,o);else for(let l=0;l<i.children.length;l++)n(i.children[l],o,o);else!t&&o==="start"?i.lastFixed=!0:!t&&o==="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(o==="start")for(let l=i.children.length-1;l>=0;l--)n(i.children[l],o);else for(let l=0;l<i.children.length;l++)n(i.children[l],o);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=d2(e[i],r);let s=0;for(let i=e.length-1;i>=0;i--)s=f2(e[i],s)}function d2(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=d2(n,t)}else e.fixed&&e.fixed!=="end"&&(e.fixedOffset=t,t+=parseFloat(e.width||"0")||0);return t}function f2(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=f2(n,t)}else e.fixed==="end"&&(e.fixedEndOffset=t,t+=parseFloat(e.width||"0")||0);return t}function zee(e,t){const n=[];let r=0;const s=Bee(e);for(;s.size()>0;){let o=s.count();const a=[];let l=1;for(;o>0;){const{element:u,priority:c}=s.dequeue(),d=t-r-iw(u);if(a.push({...u,rowspan:d??1,colspan:u.children?Db(u).length:1}),u.children)for(const f of u.children){const h=c%1+l/Math.pow(10,r+2);s.enqueue(f,r+d+h)}l+=1,o-=1}r+=1,n.push(a)}return{columns:e.map(o=>Db(o)).flat(),headers:n}}function h2(e){const t=[];for(const n of e){const r={...Vee(n),...n},s=r.key??(typeof r.value=="string"?r.value:null),i=r.value??s??null,o={...r,key:s,value:i,sortable:r.sortable??(r.key!=null||!!r.sort),children:r.children?h2(r.children):void 0};t.push(o)}return t}function Hee(e,t){const n=G([]),r=G([]),s=G({}),i=G({}),o=G({});Rn(()=>{var m,y,w;const u=(e.headers||Object.keys(e.items[0]??{}).map(b=>({key:b,title:bi(b)}))).slice(),c=c2(u);(m=t==null?void 0:t.groupBy)!=null&&m.value.length&&!c.has("data-table-group")&&u.unshift({key:"data-table-group",title:"Group"}),(y=t==null?void 0:t.showSelect)!=null&&y.value&&!c.has("data-table-select")&&u.unshift({key:"data-table-select"}),(w=t==null?void 0:t.showExpand)!=null&&w.value&&!c.has("data-table-expand")&&u.push({key:"data-table-expand"});const d=h2(u);Uee(d);const f=Math.max(...d.map(b=>iw(b)))+1,h=zee(d,f);n.value=h.headers,r.value=h.columns;const g=h.headers.flat(1);for(const b of g)b.key&&(b.sortable&&(b.sort&&(s.value[b.key]=b.sort),b.sortRaw&&(i.value[b.key]=b.sortRaw)),b.filter&&(o.value[b.key]=b.filter))});const a={headers:n,columns:r,sortFunctions:s,sortRawFunctions:i,filterFunctions:o};return Jt(l2,a),a}function og(){const e=Xe(l2);if(!e)throw new Error("Missing headers!");return e}const p2=ce({color:String,disableSort:Boolean,fixedHeader:Boolean,multiSort:Boolean,initialSortOrder:String,sortAscIcon:{type:He,default:"$sortAsc"},sortDescIcon:{type:He,default:"$sortDesc"},headerProps:{type:Object},sticky:Boolean,...Jn(),...Sl(),...Sm()},"VDataTableHeaders"),uE=Ee()({name:"VDataTableHeaders",props:p2(),setup(e,t){let{slots:n}=t;const{t:r}=ts(),{toggleSort:s,sortBy:i,isSorted:o}=o2(),{someSelected:a,allSelected:l,selectAll:u,showSelectAll:c}=ig(),{columns:d,headers:f}=og(),{loaderClasses:h}=sf(e);function g(I,P){if(!(e.sticky||e.fixedHeader)&&!I.fixed)return;const A=typeof I.fixed=="string"?I.fixed:I.fixed?"start":"none";return{position:"sticky",left:A==="start"?Le(I.fixedOffset):void 0,right:A==="end"?Le(I.fixedEndOffset):void 0,top:e.sticky||e.fixedHeader?`calc(var(--v-table-header-height) * ${P})`:void 0}}function m(I,P){I.key==="Enter"&&!e.disableSort&&s(P,I)}function y(I){const P=i.value.find(A=>A.key===I.key);return!P&&e.initialSortOrder==="asc"||(P==null?void 0:P.order)==="asc"?e.sortAscIcon:e.sortDescIcon}const{backgroundColorClasses:w,backgroundColorStyles:b}=wr(()=>e.color),{displayClasses:S,mobile:_}=qs(e),k=D(()=>({headers:f.value,columns:d.value,toggleSort:s,isSorted:o,sortBy:i.value,someSelected:a.value,allSelected:l.value,selectAll:u,getSortIcon:y})),T=D(()=>["v-data-table__th",{"v-data-table__th--sticky":e.sticky||e.fixedHeader},S.value,h.value]),R=I=>{let{column:P,x:A,y:L}=I;const B=P.key==="data-table-select"||P.key==="data-table-expand",O=P.key==="data-table-group"&&P.width===0&&!P.title,F=ge(e.headerProps??{},P.headerProps??{});return p(Bd,ge({tag:"th",align:P.align,class:[{"v-data-table__th--sortable":P.sortable&&!e.disableSort,"v-data-table__th--sorted":o(P),"v-data-table__th--fixed":P.fixed},...T.value],style:{width:Le(P.width),minWidth:Le(P.minWidth),maxWidth:Le(P.maxWidth),...g(P,L)},colspan:P.colspan,rowspan:P.rowspan,fixed:P.fixed,nowrap:P.nowrap,lastFixed:P.lastFixed,firstFixedEnd:P.firstFixedEnd,noPadding:B,empty:O,tabindex:P.sortable?0:void 0,onClick:P.sortable?W=>s(P,W):void 0,onKeydown:P.sortable?W=>m(W,P):void 0},F),{default:()=>{var V;const W=`header.${P.key}`,X={column:P,selectAll:u,isSorted:o,toggleSort:s,sortBy:i.value,someSelected:a.value,allSelected:l.value,getSortIcon:y};return n[W]?n[W](X):O?"":P.key==="data-table-select"?((V=n["header.data-table-select"])==null?void 0:V.call(n,X))??(c.value&&p(hl,{color:e.color,density:e.density,modelValue:l.value,indeterminate:a.value&&!l.value,"onUpdate:modelValue":u},null)):C("div",{class:"v-data-table-header__content"},[C("span",null,[P.title]),P.sortable&&!e.disableSort&&p(ee,{key:"icon",class:"v-data-table-header__sort-icon",icon:y(P)},null),e.multiSort&&o(P)&&C("div",{key:"badge",class:Oe(["v-data-table-header__sort-badge",...w.value]),style:Be(b.value)},[i.value.findIndex(z=>z.key===P.key)+1])])}})},x=()=>{const I=D(()=>d.value.filter(A=>(A==null?void 0:A.sortable)&&!e.disableSort)),P=d.value.find(A=>A.key==="data-table-select");return p(Bd,ge({tag:"th",class:[...T.value],colspan:f.value.length+1},e.headerProps),{default:()=>[C("div",{class:"v-data-table-header__content"},[p(ea,{chips:!0,color:e.color,class:"v-data-table__td-sort-select",clearable:!0,density:"default",items:I.value,label:r("$vuetify.dataTable.sortBy"),multiple:e.multiSort,variant:"underlined","onClick:clear":()=>i.value=[]},{append:P?()=>p(hl,{color:e.color,density:"compact",modelValue:l.value,indeterminate:a.value&&!l.value,"onUpdate:modelValue":()=>u(!l.value)},null):void 0,chip:A=>{var L;return p(Cn,{onClick:(L=A.item.raw)!=null&&L.sortable?()=>s(A.item.raw):void 0,onMousedown:B=>{B.preventDefault(),B.stopPropagation()}},{default:()=>[A.item.title,p(ee,{class:Oe(["v-data-table__td-sort-icon",o(A.item.raw)&&"v-data-table__td-sort-icon-active"]),icon:y(A.item.raw),size:"small"},null)]})}})])]})};Me(()=>_.value?C("tr",null,[p(x,null,null)]):C(De,null,[n.headers?n.headers(k.value):f.value.map((I,P)=>C("tr",null,[I.map((A,L)=>p(R,{column:A,x:L,y:P},null))])),e.loading&&C("tr",{class:"v-data-table-progress"},[C("th",{colspan:d.value.length},[p(_m,{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})])])]))}}),m2=ce({item:{type:Object,required:!0},groupCollapseIcon:{type:He,default:"$tableGroupCollapse"},groupExpandIcon:{type:He,default:"$tableGroupExpand"},...Jn()},"VDataTableGroupHeaderRow"),jee=Ee()({name:"VDataTableGroupHeaderRow",props:m2(),setup(e,t){let{slots:n}=t;const{isGroupOpen:r,toggleGroup:s,extractRows:i}=ZM(),{isSelected:o,isSomeSelected:a,select:l}=ig(),{columns:u}=og(),c=D(()=>i([e.item])),d=ie(()=>u.value.length-(u.value.some(f=>f.key==="data-table-select")?1:0));return()=>C("tr",{class:"v-data-table-group-header-row",style:{"--v-data-table-group-header-row-depth":e.item.depth}},[u.value.map(f=>{var h,g;if(f.key==="data-table-group"){const m=r(e.item)?e.groupCollapseIcon:e.groupExpandIcon,y=()=>s(e.item);return((h=n["data-table-group"])==null?void 0:h.call(n,{item:e.item,count:c.value.length,props:{icon:m,onClick:y}}))??p(Bd,{class:"v-data-table-group-header-row__column",colspan:d.value},{default:()=>[p(se,{size:"small",variant:"text",icon:m,onClick:y},null),C("span",null,[e.item.value]),C("span",null,[E("("),c.value.length,E(")")])]})}else if(f.key==="data-table-select"){const m=c.value.filter(S=>S.selectable),y=m.length>0&&o(m),w=a(m)&&!y,b=S=>l(m,S);return((g=n["data-table-select"])==null?void 0:g.call(n,{props:{modelValue:y,indeterminate:w,"onUpdate:modelValue":b}}))??p(Bd,{class:"v-data-table__td--select-row",noPadding:!0},{default:()=>[p(hl,{density:e.density,disabled:m.length===0,modelValue:y,indeterminate:w,"onUpdate:modelValue":b},null)]})}return""})])}}),g2=ce({color:String,index:Number,item:Object,cellProps:[Object,Function],collapseIcon:{type:He,default:"$collapse"},expandIcon:{type:He,default:"$expand"},onClick:Kn(),onContextmenu:Kn(),onDblclick:Kn(),...Jn(),...Sl()},"VDataTableRow"),Wee=Ee()({name:"VDataTableRow",props:g2(),setup(e,t){let{slots:n}=t;const{displayClasses:r,mobile:s}=qs(e,"v-data-table__tr"),{isSelected:i,toggleSelect:o,someSelected:a,allSelected:l,selectAll:u}=ig(),{isExpanded:c,toggleExpand:d}=QM(),{toggleSort:f,sortBy:h,isSorted:g}=o2(),{columns:m}=og();Me(()=>C("tr",{class:Oe(["v-data-table__tr",{"v-data-table__tr--clickable":!!(e.onClick||e.onContextmenu||e.onDblclick)},r.value]),onClick:e.onClick,onContextmenu:e.onContextmenu,onDblclick:e.onDblclick},[e.item&&m.value.map((y,w)=>{const b=e.item,S=`item.${y.key}`,_=`header.${y.key}`,k={index:e.index,item:b.raw,internalItem:b,value:ol(b.columns,y.key),column:y,isSelected:i,toggleSelect:o,isExpanded:c,toggleExpand:d},T={column:y,selectAll:u,isSorted:g,toggleSort:f,sortBy:h.value,someSelected:a.value,allSelected:l.value,getSortIcon:()=>""},R=typeof e.cellProps=="function"?e.cellProps({index:k.index,item:k.item,internalItem:k.internalItem,value:k.value,column:y}):e.cellProps,x=typeof y.cellProps=="function"?y.cellProps({index:k.index,item:k.item,internalItem:k.internalItem,value:k.value}):y.cellProps,I=y.key==="data-table-select"||y.key==="data-table-expand",P=y.key==="data-table-group"&&y.width===0&&!y.title;return p(Bd,ge({align:y.align,indent:y.indent,class:{"v-data-table__td--expanded-row":y.key==="data-table-expand","v-data-table__td--select-row":y.key==="data-table-select"},fixed:y.fixed,fixedOffset:y.fixedOffset,fixedEndOffset:y.fixedEndOffset,lastFixed:y.lastFixed,firstFixedEnd:y.firstFixedEnd,maxWidth:s.value?void 0:y.maxWidth,noPadding:I,empty:P,nowrap:y.nowrap,width:s.value?void 0:y.width},R,x),{default:()=>{var L,B,O,F;if(y.key==="data-table-select")return((L=n["item.data-table-select"])==null?void 0:L.call(n,{...k,props:{color:e.color,disabled:!b.selectable,modelValue:i([b]),onClick:Ct(()=>o(b),["stop"])}}))??p(hl,{color:e.color,disabled:!b.selectable,density:e.density,modelValue:i([b]),onClick:Ct(W=>o(b,e.index,W),["stop"])},null);if(y.key==="data-table-expand")return((B=n["item.data-table-expand"])==null?void 0:B.call(n,{...k,props:{icon:c(b)?e.collapseIcon:e.expandIcon,size:"small",variant:"text",onClick:Ct(()=>d(b),["stop"])}}))??p(se,{icon:c(b)?e.collapseIcon:e.expandIcon,size:"small",variant:"text",onClick:Ct(()=>d(b),["stop"])},null);if(n[S]&&!s.value)return n[S](k);const A=ae(k.value);return s.value?C(De,null,[C("div",{class:"v-data-table__td-title"},[((O=n[_])==null?void 0:O.call(n,T))??y.title]),C("div",{class:"v-data-table__td-value"},[((F=n[S])==null?void 0:F.call(n,k))??A])]):A}})})]))}}),v2=ce({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],...Go(g2(),["collapseIcon","expandIcon","density"]),...Go(m2(),["groupCollapseIcon","groupExpandIcon","density"]),...Sl()},"VDataTableRows"),cE=Ee()({name:"VDataTableRows",inheritAttrs:!1,props:v2(),setup(e,t){let{attrs:n,slots:r}=t;const{columns:s}=og(),{expandOnClick:i,toggleExpand:o,isExpanded:a}=QM(),{isSelected:l,toggleSelect:u}=ig(),{toggleGroup:c,isGroupOpen:d}=ZM(),{t:f}=ts(),{mobile:h}=qs(e);return Me(()=>{var m,y;const g=Go(e,["groupCollapseIcon","groupExpandIcon","density"]);return e.loading&&(!e.items.length||r.loading)?C("tr",{class:"v-data-table-rows-loading",key:"loading"},[C("td",{colspan:s.value.length},[((m=r.loading)==null?void 0:m.call(r))??f(e.loadingText)])]):!e.loading&&!e.items.length&&!e.hideNoData?C("tr",{class:"v-data-table-rows-no-data",key:"no-data"},[C("td",{colspan:s.value.length},[((y=r["no-data"])==null?void 0:y.call(r))??f(e.noDataText)])]):C(De,null,[e.items.map((w,b)=>{var k,T;if(w.type==="group"){const R={index:b,item:w,columns:s.value,isExpanded:a,toggleExpand:o,isSelected:l,toggleSelect:u,toggleGroup:c,isGroupOpen:d};return r["group-header"]?r["group-header"](R):p(jee,ge({key:`group-header_${w.id}`,item:w},GS(n,":groupHeader",()=>R),g),r)}if(w.type==="group-summary"){const R={index:b,item:w,columns:s.value,toggleGroup:c};return((k=r["group-summary"])==null?void 0:k.call(r,R))??""}const S={index:b,item:w.raw,internalItem:w,columns:s.value,isExpanded:a,toggleExpand:o,isSelected:l,toggleSelect:u},_={...S,props:ge({key:`item_${w.key??w.index}`,onClick:i.value?()=>{o(w)}:void 0,index:b,item:w,color:e.color,cellProps:e.cellProps,collapseIcon:e.collapseIcon,expandIcon:e.expandIcon,density:e.density,mobile:h.value},GS(n,":row",()=>S),typeof e.rowProps=="function"?e.rowProps({item:S.item,index:S.index,internalItem:S.internalItem}):e.rowProps)};return C(De,{key:_.props.key},[r.item?r.item(_):p(Wee,_.props,r),a(w)&&((T=r["expanded-row"])==null?void 0:T.call(r,S))])})])}),{}}}),y2=ce({fixedHeader:Boolean,fixedFooter:Boolean,height:[Number,String],hover:Boolean,striped:{type:String,default:null,validator:e=>["even","odd"].includes(e)},...Ge(),...Jn(),...gt(),...Nt()},"VTable"),Mb=Ee()({name:"VTable",props:y2(),setup(e,t){let{slots:n,emit:r}=t;const{themeClasses:s}=nn(e),{densityClasses:i}=Es(e);return Me(()=>p(e.tag,{class:Oe(["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:Be(e.style)},{default:()=>{var o,a,l;return[(o=n.top)==null?void 0:o.call(n),n.default?C("div",{class:"v-table__wrapper",style:{height:Le(e.height)}},[C("table",null,[n.default()])]):(a=n.wrapper)==null?void 0:a.call(n),(l=n.bottom)==null?void 0:l.call(n)]}})),{}}}),qee=ce({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 Gee(e,t,n,r){const s=e.returnObject?t:Mn(t,e.itemValue),i=Mn(t,e.itemSelectable,!0),o=r.reduce((a,l)=>(l.key!=null&&(a[l.key]=Mn(t,l.value)),a),{});return{type:"item",key:e.returnObject?Mn(t,e.itemValue):s,index:n,value:s,selectable:i,columns:o,raw:t}}function Kee(e,t,n){return t.map((r,s)=>Gee(e,r,s,n))}function Yee(e,t){return{items:D(()=>Kee(e,e.items,t.value))}}const Xee=ce({...v2(),hideDefaultBody:Boolean,hideDefaultFooter:Boolean,hideDefaultHeader:Boolean,width:[String,Number],search:String,...fee(),...pee(),...$ee(),...qee(),...Tee(),...Pee(),...In(p2(),["multiSort","initialSortOrder"]),...y2()},"DataTable"),Qee=ce({...wee(),...Xee(),...uee(),...a2()},"VDataTable"),Jee=Ee()({name:"VDataTable",props:Qee(),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}=mee(e),{initialSortOrder:i,sortBy:o,multiSort:a,mustSort:l}=Iee(e),{page:u,itemsPerPage:c}=See(e),{disableSort:d}=vl(e),{columns:f,headers:h,sortFunctions:g,sortRawFunctions:m,filterFunctions:y}=Hee(e,{groupBy:s,showSelect:ie(()=>e.showSelect),showExpand:ie(()=>e.showExpand)}),{items:w}=Yee(e,f),b=ie(()=>e.search),{filteredItems:S}=dee(e,w,b,{transform:he=>he.columns,customKeyFilter:y}),{toggleSort:_}=Oee({initialSortOrder:i,sortBy:o,multiSort:a,mustSort:l,page:u}),{sortByWithGroups:k,opened:T,extractRows:R,isGroupOpen:x,toggleGroup:I}=gee({groupBy:s,sortBy:o,disableSort:d}),{sortedItems:P}=Dee(e,S,k,{transform:he=>({...he.raw,...he.columns}),sortFunctions:g,sortRawFunctions:m}),{flatItems:A}=yee(P,s,T,()=>!!r["group-summary"]),L=D(()=>A.value.length),{startIndex:B,stopIndex:O,pageCount:F,setItemsPerPage:W}=_ee({page:u,itemsPerPage:c,itemsLength:L}),{paginatedItems:X}=xee({items:A,startIndex:B,stopIndex:O,itemsPerPage:c}),V=D(()=>R(X.value)),{isSelected:z,select:M,selectAll:re,toggleSelect:H,someSelected:j,allSelected:pe}=Ree(e,{allItems:w,currentPage:V}),{isExpanded:J,toggleExpand:we}=hee(e);bee({page:u,itemsPerPage:c,sortBy:o,groupBy:s,search:b}),zr({VDataTableRows:{hideNoData:ie(()=>e.hideNoData),noDataText:ie(()=>e.noDataText),loading:ie(()=>e.loading),loadingText:ie(()=>e.loadingText)}});const q=D(()=>({page:u.value,itemsPerPage:c.value,sortBy:o.value,pageCount:F.value,toggleSort:_,setItemsPerPage:W,someSelected:j.value,allSelected:pe.value,isSelected:z,select:M,selectAll:re,toggleSelect:H,isExpanded:J,toggleExpand:we,isGroupOpen:x,toggleGroup:I,items:V.value.map(he=>he.raw),internalItems:V.value,groupedItems:X.value,columns:f.value,headers:h.value}));return Me(()=>{const he=lE.filterProps(e),ne=uE.filterProps(In(e,["multiSort"])),K=cE.filterProps(e),ke=Mb.filterProps(e);return p(Mb,ge({class:["v-data-table",{"v-data-table--show-select":e.showSelect,"v-data-table--loading":e.loading},e.class],style:e.style},ke,{fixedHeader:e.fixedHeader||e.sticky}),{top:()=>{var Re;return(Re=r.top)==null?void 0:Re.call(r,q.value)},default:()=>{var Re,N,U,Y,le,oe;return r.default?r.default(q.value):C(De,null,[(Re=r.colgroup)==null?void 0:Re.call(r,q.value),!e.hideDefaultHeader&&C("thead",{key:"thead"},[p(uE,ge(ne,{multiSort:!!e.multiSort}),r)]),(N=r.thead)==null?void 0:N.call(r,q.value),!e.hideDefaultBody&&C("tbody",null,[(U=r["body.prepend"])==null?void 0:U.call(r,q.value),r.body?r.body(q.value):p(cE,ge(n,K,{items:X.value}),r),(Y=r["body.append"])==null?void 0:Y.call(r,q.value)]),(le=r.tbody)==null?void 0:le.call(r,q.value),(oe=r.tfoot)==null?void 0:oe.call(r,q.value)])},bottom:()=>r.bottom?r.bottom(q.value):!e.hideDefaultFooter&&C(De,null,[p(cn,null,null),p(lE,he,{prepend:r["footer.prepend"]})])})}),{}}}),Zee=ce({...Ge(),...V9()},"VForm"),ow=Ee()({name:"VForm",props:Zee(),emits:{"update:modelValue":e=>!0,submit:e=>!0},setup(e,t){let{slots:n,emit:r}=t;const s=U9(e),i=G();function o(l){l.preventDefault(),s.reset()}function a(l){const u=l,c=s.validate();u.then=c.then.bind(c),u.catch=c.catch.bind(c),u.finally=c.finally.bind(c),r("submit",u),u.defaultPrevented||c.then(d=>{var h;let{valid:f}=d;f&&((h=i.value)==null||h.submit())}),u.preventDefault()}return Me(()=>{var l;return C("form",{ref:i,class:Oe(["v-form",e.class]),style:Be(e.style),novalidate:!0,onReset:o,onSubmit:a},[(l=n.default)==null?void 0:l.call(n,s)])}),Ts(s,i)}}),ete=ce({disabled:Boolean,modelValue:{type:Boolean,default:null},...T0()},"VHover"),dE=Ee()({name:"VHover",props:ete(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=lt(e,"modelValue"),{runOpenDelay:s,runCloseDelay:i}=R0(e,o=>!e.disabled&&(r.value=o));return()=>{var o;return(o=n.default)==null?void 0:o.call(n,{isHovering:r.value,props:{onMouseenter:s,onMouseleave:i}})}}}),tte={class:"mt-4 mb-4"},nte={key:0},rte={key:1},ste={key:0},ite={key:1},ote=["colspan"],ate=Ve({__name:"PrintersView",setup(e){const t=$t(),n=Xt(),r=G(!1),s=cr(),i=fo(),o=Ym(),a=sn(on.AddOrUpdatePrinterDialog),l=G([]),u=G([]),c=G(""),d=G(""),f=G(),h=G(""),g=G([]),m=D(()=>o.hasFeature("printerGroupsApi")),y=D(()=>[{title:"Enabled",key:"enabled"},{title:"Type",key:"printerType"},{title:"Printer Name",align:"start",sortable:!0,key:"name"},{title:"Floor",key:"floor",sortable:!1},...o.hasFeature("printerGroupsApi")?[{title:"Group(s)",key:"group",sortable:!0}]:[],{title:"Actions",key:"actions",sortable:!1},{title:"Socket Update",key:"socketupdate",sortable:!1},{title:"",key:"data-table-expand"}]);async function w(){return r.value=!0,await o.loadFeatures(),o.hasFeature("printerGroupsApi")&&(l.value=await Ml.getGroupsWithPrinters()),r.value=!1,l}const b=Jm({queryKey:["printerGroups"],queryFn:w}),S=D(()=>{var j;if(!o.hasFeature("printerGroupsApi")||!((j=u.value)!=null&&j.length))return n.printers;const H=u.value.flatMap(pe=>pe.printers.map(J=>J.printerId))||[];return n.printers.filter(pe=>H.includes(pe.id))}),_=D(()=>s.printerCurrentEventReceivedAtById),k=D(()=>{if(!(!f.value&&f.value!==0))return l.value[f.value]}),T=H=>H?(Date.now()-H)/1e3:void 0,R=H=>l.value.filter(j=>j.printers.find(pe=>pe.printerId===H)),x=H=>l.value.filter(j=>!j.printers.find(pe=>pe.printerId===H)),I=H=>i.floorOfPrinter(H),P=H=>{n.setUpdateDialogPrinter(H),a.openDialog(H)},A=()=>{a.openDialog()},L=(H,j)=>{if(console.log(H,j),j.isExpanded){const pe=g.value.findIndex(J=>J===H.id);g.value.splice(pe,1)}else g.value.push(H.id.toString())},B=()=>{sn(on.ImportOctoFarmDialog).openDialog()},O=()=>{sn(on.YamlImportExport).openDialog()},F=async()=>{var H,j;if(!((j=(H=c.value)==null?void 0:H.trim())!=null&&j.length))throw new Error("Please set a non-empty group name");await Ml.createGroup(c.value.trim()),await b.refetch(),c.value="",t.info("Created group")},W=()=>{var H;k.value&&(d.value=(H=k.value)==null?void 0:H.name)},X=async H=>{var pe,J;if(!(H!=null&&H.id))throw new Error("Group id was not defined");if(!l.value.find(we=>we.id===H.id))throw new Error("Group was not found, please reload the page");if(!((J=(pe=d.value)==null?void 0:pe.trim())!=null&&J.length))throw new Error("Please set a non-empty group name");await Ml.updateGroupName(H.id,d.value.trim()),await b.refetch()},V=async H=>{const j=l.value.find(J=>J.id===H);if(!j)throw new Error("Group was not found, please reload the page");const pe=j.printers.length;pe>0&&!confirm(`This group contains ${pe} printers, are you sure to delete it?`)||(await Ml.deleteGroup(H),await b.refetch(),t.info("Deleted group"))},z=async(H,j)=>{await Ml.addPrinterToGroup(H,j),await b.refetch(),t.info("Added printer to group")},M=async(H,j)=>{await Ml.deletePrinterFromGroup(H,j),await b.refetch(),t.info("Removed printer from group")},re=async H=>{if(!H.id)throw new Error("Printer ID not set, cant toggle enabled");H.enabled=!H.enabled,await tn.toggleEnabled(H.id,H.enabled)};return(H,j)=>{const pe=Vn("v-list-item-group");return $(),ye("div",null,[p(kt,null,{default:v(()=>[p(un,null,{default:v(()=>[j[11]||(j[11]=E(" Printers ",-1)),p(Pn),m.value&&l.value.length?($(),te(ea,{key:0,modelValue:u.value,"onUpdate:modelValue":j[0]||(j[0]=J=>u.value=J),items:l.value,"return-object":!0,"item-title":"name",label:"Filter by groups",multiple:"",placeholder:"Select group to filter by","prepend-icon":"filter_list"},null,8,["modelValue","items"])):ve("",!0),p(at,{modelValue:h.value,"onUpdate:modelValue":j[1]||(j[1]=J=>h.value=J),class:"p-2",clearable:"",label:"Printer search","prepend-icon":"search","single-line":""},null,8,["modelValue"])]),_:1}),p(Z(Jee),{expanded:g.value,headers:y.value,items:S.value,search:h.value,class:"elevation-1","item-key":"id","show-expand":"","single-expand":"","onClick:row":L},JT({"no-data":v(()=>[C("div",tte,[S.value.length===0?($(),ye("h3",nte," No printer has been created yet. Create one here: ")):($(),ye("h3",rte," No printer has been found. Adjust your filters or search criteria. ")),p(UM)])]),top:v(()=>[p(kr,{flat:""},{default:v(()=>[p($n,null,{default:v(()=>[E(" Showing "+ae(S.value.length||0)+" printers ",1)]),_:1}),p(se,{class:"ml-3",type:"button",variant:"outlined",onClick:j[2]||(j[2]=J=>B())},{default:v(()=>[p(ee,null,{default:v(()=>[...j[12]||(j[12]=[E("publish",-1)])]),_:1}),j[13]||(j[13]=E(" Import OctoFarm Printers ",-1))]),_:1}),p(se,{class:"ml-3",type:"button",variant:"outlined",onClick:j[3]||(j[3]=J=>A())},{default:v(()=>[p(ee,null,{default:v(()=>[...j[14]||(j[14]=[E("add",-1)])]),_:1}),j[15]||(j[15]=E(" Create Printer ",-1))]),_:1}),p(se,{class:"ml-3",color:"primary",type:"button",onClick:j[4]||(j[4]=J=>O())},{default:v(()=>[p(ee,null,{default:v(()=>[...j[16]||(j[16]=[E("publish",-1)])]),_:1}),j[17]||(j[17]=E(" Import/Export YAML ",-1))]),_:1}),p(Pn)]),_:1})]),"item.enabled":v(({item:J})=>[p(qp,{modelValue:J.enabled,"onUpdate:modelValue":we=>J.enabled=we,color:"primary",inset:"",onClickCapture:Ct(we=>re(J),["stop"])},{default:v(()=>[E(ae(J.enabled),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onClickCapture"])]),"item.printerType":v(({item:J})=>[E(ae(Z(id)(J.printerType)),1)]),"item.name":v(({item:J})=>[p(Cn,null,{default:v(()=>[E(ae(J.name||J.printerURL),1)]),_:2},1024)]),"item.floor":v(({item:J})=>[J.id?($(),te(Cn,{key:0},{default:v(()=>{var we;return[E(ae((we=I(J.id))==null?void 0:we.name),1)]}),_:2},1024)):ve("",!0)]),"item.actions":v(({item:J})=>[p(ZZ,{printer:J},null,8,["printer"]),p(see,{printer:J},null,8,["printer"]),p(iee,{printer:J},null,8,["printer"]),p(oee,{printer:J},null,8,["printer"]),p(aee,{printer:J},null,8,["printer"]),p(nee,{printer:J,"onUpdate:show":we=>P(J)},null,8,["printer","onUpdate:show"])]),"item.socketupdate":v(({item:J})=>[_.value[J.id]?($(),ye("span",ste," Updated "+ae(T(_.value[J.id]))+" seconds ago ",1)):($(),ye("span",ite," No update received (silence) "))]),"expanded-row":v(({item:J,columns:we})=>[C("td",{colspan:we.length},[p(JZ,{printer:J},null,8,["printer"])],8,ote)]),_:2},[m.value?{name:"item.group",fn:v(({item:J})=>[($(!0),ye(De,null,Zt(R(J.id),we=>($(),te(Cn,{key:we.id,class:"ml-2",closable:"",size:"small","onClick:close":q=>M(we.id,J.id)},{default:v(()=>[E(ae(we.name),1)]),_:2},1032,["onClick:close"]))),128)),p(Qm,{"offset-y":""},{activator:v(({props:we})=>[p(Cn,ge({disabled:!l.value.length,class:"ml-2",size:"small"},we),{default:v(()=>[p(ee,{size:"small"},{default:v(()=>[...j[18]||(j[18]=[E("add",-1)])]),_:1})]),_:1},16,["disabled"])]),default:v(()=>[p(Ht,{density:"compact",style:{border:"1px solid dimgray"}},{default:v(()=>[p(Ur,null,{default:v(()=>[...j[19]||(j[19]=[E(" ADD TO GROUP",-1)])]),_:1}),p(pe,null,{default:v(()=>[($(!0),ye(De,null,Zt(x(J.id),(we,q)=>($(),te(ze,{key:q,onClick:he=>z(we.id,J.id)},{default:v(()=>[p(ft,null,{default:v(()=>[E(ae(we.name),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:2},1024)]),_:2},1024)]),_:2},1024)]),key:"0"}:void 0]),1032,["expanded","headers","items","search"])]),_:1}),m.value?($(),te(kt,{key:0,class:"mt-4"},{default:v(()=>[p(un,null,{default:v(()=>[...j[20]||(j[20]=[E(" Printer Groups ",-1)])]),_:1}),p(rn,null,{default:v(()=>[j[26]||(j[26]=C("h3",null,"Existing groups:",-1)),p(Xn,null,{default:v(()=>[p($p,{modelValue:f.value,"onUpdate:modelValue":[j[5]||(j[5]=J=>f.value=J),j[6]||(j[6]=J=>W())],column:"","selected-class":"primary--text"},{default:v(()=>[($(!0),ye(De,null,Zt(l.value,J=>($(),te(Cn,{key:J.id,class:"mr-3",closable:"",size:"small","onClick:close":we=>V(J.id)},{default:v(()=>[E(ae(J.name),1)]),_:2},1032,["onClick:close"]))),128))]),_:1},8,["modelValue"])]),_:1}),j[27]||(j[27]=C("h3",{class:"mt-3"},"Update group name",-1)),p(Xn,null,{default:v(()=>[k.value?ve("",!0):($(),te(yn,{key:0},{default:v(()=>[...j[21]||(j[21]=[E(" Select a group to update its name. ",-1)])]),_:1})),p(at,{modelValue:d.value,"onUpdate:modelValue":j[7]||(j[7]=J=>d.value=J),disabled:!k.value,label:"Group Name",placeholder:"Type group name here"},{default:v(()=>[...j[22]||(j[22]=[E(" Name ",-1)])]),_:1},8,["modelValue","disabled"]),p(se,{onClick:j[8]||(j[8]=J=>X(k.value))},{default:v(()=>[...j[23]||(j[23]=[E(" Update name ",-1)])]),_:1})]),_:1}),j[28]||(j[28]=C("h3",{class:"mt-3"},"Add group",-1)),p(Xn,null,{default:v(()=>[p(at,{modelValue:c.value,"onUpdate:modelValue":j[9]||(j[9]=J=>c.value=J),label:"Group Name",placeholder:"Type group name here"},{default:v(()=>[...j[24]||(j[24]=[E(" Name ",-1)])]),_:1},8,["modelValue"]),p(se,{onClick:j[10]||(j[10]=J=>F())},{default:v(()=>[...j[25]||(j[25]=[E(" Create new group",-1)])]),_:1})]),_:1})]),_:1})]),_:1})):ve("",!0)])}}}),ei={grid:"grid",floors:"floors",printer:"printer",emergencyCommands:"emergencyCommands",users:"users",account:"account",serverProtection:"serverProtection",softwareUpgrade:"softwareUpgrade",diagnostics:"diagnostics",experimental:"experimental"},lte={[ei.grid]:{title:"Grid",icon:"grid_on",path:"/settings/grid",divider:!1},[ei.floors]:{title:"Floors",icon:"house_siding",path:"/settings/floors",divider:!0},[ei.printer]:{title:"Printer",icon:"local_print_shop",path:"/settings/printer",divider:!1},[ei.emergencyCommands]:{title:"Emergency Commands",icon:"warning",path:"/settings/emergency-commands",divider:!0},[ei.users]:{title:"Users",icon:"group",path:"/settings/user-management",divider:!1},[ei.account]:{title:"Account",icon:"account_circle",path:"/settings/account",divider:!1},[ei.serverProtection]:{title:"Server Protection",icon:"security",path:"/settings/server-protection",divider:!0},[ei.softwareUpgrade]:{title:"Software Upgrade",icon:"upgrade",path:"/settings/software-upgrade",divider:!1},[ei.diagnostics]:{title:"Diagnostics",icon:"bug_report",path:"/settings/diagnostics",divider:!1},[ei.experimental]:{title:"Experimental",icon:"settings_applications",path:"/settings/experimental",divider:!1}},ute=Ve({__name:"SettingsView",setup(e){const t=G(lte);return(n,r)=>{const s=Vn("router-view");return $(),ye("div",null,[p(st,{"no-gutters":""},{default:v(()=>[p(D1,{permanent:!0},{default:v(()=>[p(ze,null,{default:v(()=>[p(ft,{class:"text-h6"},{default:v(()=>[...r[0]||(r[0]=[E(" Settings ",-1)])]),_:1}),p(_t,null,{default:v(()=>[...r[1]||(r[1]=[E(" Adjust your FDM Monster ",-1)])]),_:1})]),_:1}),p(cn),p(Ht,{density:"compact",nav:""},{default:v(()=>[($(!0),ye(De,null,Zt(Z(t),i=>($(),te(ze,{key:i.title,to:i.path,link:"","prepend-icon":i.icon,title:i.title,"router-link":"",style:Be(i.divider?"border-bottom: 1px solid gray":"")},null,8,["to","prepend-icon","title","style"]))),128))]),_:1})]),_:1}),p(We,null,{default:v(()=>[p(s)]),_:1})]),_:1})])}}});function cte(e){const t=new Date(e);return new Intl.DateTimeFormat("default",{dateStyle:"long"}).format(t)}const dte={key:0,class:"text--primary float-end mr-5 mt-2"},fte={class:"text-grey-darken-4"},hte={key:0,class:"text-success"},pte={key:1,class:"text-error"},mte={key:0},gte={key:0},vte={key:0},yte={key:1},bte={key:0},wte={key:1},Ste=Ve({__name:"UserManagementSettings",setup(e){const t=$t(),n=G(!1),r=G(),s=G([]),i=G([]);async function o(){n.value=!0;try{r.value=await us.getProfile(),i.value=await us.listRoles(),s.value=await us.listUsers()}catch(m){throw n.value=!1,console.error(m),m}return n.value=!1,{users:s,roles:i,profile:r}}const a=Jm({queryKey:["userRolesProfile"],queryFn:o});function l(m){return m.map(y=>{var w;return(w=i.value.find(b=>b.id==y))==null?void 0:w.name})}function u(m){var y;return m.id==((y=r.value)==null?void 0:y.id)}async function c(m){if(confirm(`Are you sure you want to delete ${m.username}?`)){try{n.value=!0,await us.deleteUser(m.id),await a.refetch()}catch(y){throw n.value=!1,console.error(y),y}n.value=!1,t.info(`User ${m.username} deleted`)}}async function d(m,y=!0){if(m.isRootUser){t.error("You are not allowed to do perform this action on an owner");return}if(confirm(`Are you sure you want to ${y?"verify":"unverify"} ${m.username}?`)){try{n.value=!0,await us.setUserVerified(m.id,y),await a.refetch()}catch(w){throw n.value=!1,console.error(w),w}n.value=!1,t.info(y?`User ${m.username} verified`:`User ${m.username} unverified`)}}async function f(m,y=!0){var w;if((w=r.value)!=null&&w.isRootUser||t.error("You are not allowed to do perform this action as you're not an owner"),!!confirm(`You are about to ${y?"set":"remove"} owner rights on ${m.username}. Are you sure?`)){try{n.value=!0,await us.setRootUser(m.id,y),await a.refetch()}catch(b){throw n.value=!1,console.error(b),b}n.value=!1,t.info(y?`User ${m.username} set to owner`:`User ${m.username} is no longer owner`)}}async function h(m){try{n.value=!0,console.log(m.roles),console.log(m.roles.map(y=>typeof y)),await us.setUserRoles(m.id,m.roles),await a.refetch(),t.info(`Roles updated for ${m.username}`)}catch(y){throw n.value=!1,console.error(y),t.error(`Failed to update roles for ${m.username}`),y}n.value=!1}async function g(){await sn(on.CreateUserDialog).openDialog()}return(m,y)=>{const w=Vn("v-list-item-content");return $(),te(kt,null,{default:v(()=>[p(kr,{color:"primary"},{default:v(()=>{var b;return[p(dt,null,{default:v(()=>[p(ee,null,{default:v(()=>[...y[1]||(y[1]=[E("settings",-1)])]),_:1})]),_:1}),p($n,null,{default:v(()=>[...y[2]||(y[2]=[E(" Users ",-1)])]),_:1}),p(Pn),p(se,{disabled:!((b=r.value)!=null&&b.isRootUser),class:"mt-2",color:"primary",onClick:y[0]||(y[0]=S=>g())},{default:v(()=>[p(ee,{class:"mr-2"},{default:v(()=>[...y[3]||(y[3]=[E("verified_user",-1)])]),_:1}),y[4]||(y[4]=C("span",null,"Create verified user",-1))]),_:1},8,["disabled"])]}),_:1}),n.value?($(),te(BM,{key:0,size:20,color:"#a70015",style:{margin:"250px",position:"absolute"}})):ve("",!0),p(Ht,{lines:"three"},{default:v(()=>[p(Ur,null,{default:v(()=>[...y[5]||(y[5]=[E(" Showing all users ",-1)])]),_:1}),($(!0),ye(De,null,Zt(s.value,(b,S)=>($(),te(ze,{key:S,class:"pl-6",style:{"max-width":"800px","border-top":"1px solid grey","border-bottom":"1px solid grey"}},{default:v(()=>[p(w,{class:Oe(u(b)?"pl-6 grey darken-3":"pl-6 grey darken-4")},{default:v(()=>[p(ft,null,{default:v(()=>[E(" User '"+ae(b.username)+"' ",1),u(b)?($(),ye("strong",dte," Your account ")):ve("",!0)]),_:2},1024),p(_t),C("span",fte,[C("ul",null,[C("li",null,[b.isVerified?($(),ye("span",hte," Account verified ")):($(),ye("span",pte," Account not verified "))]),C("li",null,"Created at "+ae(Z(cte)(b.createdAt)),1),b.isDemoUser?($(),ye("li",mte,"Demo user account")):ve("",!0),C("li",null,[y[7]||(y[7]=E(" Role(s) ",-1)),C("ul",null,[b.isRootUser?($(),ye("li",gte,[p(Cn,{class:"mb-2 mt-2",size:"small"},{default:v(()=>[...y[6]||(y[6]=[E(" OWNER ",-1)])]),_:1})])):ve("",!0),($(!0),ye(De,null,Zt(l(b.roles),_=>($(),ye("li",{key:_},[p(Cn,{class:"mb-2 mt-2",size:"small"},{default:v(()=>[E(ae(_),1)]),_:2},1024)]))),128))])])])])]),_:2},1032,["class"]),p(Nu,null,{default:v(()=>{var _,k;return[p(se,{disabled:u(b)||b.isRootUser,color:b.isVerified?"error darken-4":"success",onClick:T=>d(b,!b.isVerified)},{default:v(()=>[p(ee,{class:"mr-2"},{default:v(()=>[...y[8]||(y[8]=[E("shield",-1)])]),_:1}),b.isVerified?ve("",!0):($(),ye("span",vte," Verify account ")),b.isVerified?($(),ye("span",yte," Un-verify account ")):ve("",!0)]),_:2},1032,["disabled","color","onClick"]),p(se,{color:b.isRootUser?"error darken-4":"success",disabled:u(b)||!((_=r.value)!=null&&_.isRootUser),class:"mt-2",onClick:T=>f(b,!b.isRootUser)},{default:v(()=>[p(ee,{class:"mr-2"},{default:v(()=>[...y[9]||(y[9]=[E("key",-1)])]),_:1}),b.isRootUser?($(),ye("span",bte," Remove owner ")):ve("",!0),b.isRootUser?ve("",!0):($(),ye("span",wte," Set owner "))]),_:2},1032,["color","disabled","onClick"]),(k=r.value)!=null&&k.isRootUser?($(),te(ea,{key:0,items:i.value.map(T=>({text:T.name,value:T.id})),modelValue:b.roles,"onUpdate:modelValue":T=>b.roles=T,multiple:"",label:"Select roles",onChange:T=>h(b),class:"pt-6",style:{width:"15rem"}},null,8,["items","modelValue","onUpdate:modelValue","onChange"])):ve("",!0),p(se,{disabled:u(b)||b.isRootUser,class:"mt-2",color:"error-darken-2",onClick:T=>c(b)},{default:v(()=>[p(ee,{class:"mr-2"},{default:v(()=>[...y[10]||(y[10]=[E("delete",-1)])]),_:1}),y[11]||(y[11]=E(" Delete ",-1))]),_:1},8,["disabled","onClick"])]}),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1})}}}),_te=Ve({__name:"PrinterSettings",setup(e){const t=Ks(),n=cr(),r=$t(),s=G({autoRemoveOldFilesBeforeUpload:!1,autoRemoveOldFilesAtBoot:!1,autoRemoveOldFilesCriteriumDays:7}),i=G({fileCleanSettings:!1,timeoutSettings:!1,purgeFiles:!1,bulkDisableGCodeAnalysis:!1});xt(async()=>{const c=await En.getSettings();s.value=c.printerFileClean});async function o(){var c,d;if(t.settings.timeout.apiTimeout=parseInt(t.settings.timeout.apiTimeout.toString()),t.settings.timeout.apiUploadTimeout=parseInt(t.settings.timeout.apiUploadTimeout.toString()),!((d=(c=t.settings)==null?void 0:c.timeout)!=null&&d.apiTimeout)){r.error("Timeout not set");return}if(t.settings.timeout.apiTimeout<1e3&&(r.error("Timeout is too low - please set it to at least 1000 milliseconds"),t.settings.timeout.apiTimeout=1e3),t.settings.timeout.apiUploadTimeout<1e4)r.error("Upload timeout is too low - please set it to at least 10000 milliseconds"),t.settings.timeout.apiUploadTimeout=1e4;else{i.value.timeoutSettings=!0;try{await t.updateTimeoutSettings(t.settings.timeout),r.info("Timeout settings updated")}finally{i.value.timeoutSettings=!1}}}async function a(){i.value.fileCleanSettings=!0;try{const c=await En.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 Ki.purgeFiles(),r.openInfoMessage({title:"Successfully purged all references to printer files!"})}finally{i.value.purgeFiles=!1}}async function u(){i.value.bulkDisableGCodeAnalysis=!0;try{const c=n.onlinePrinters;for(const d of Object.values(c))await YM.setGCodeAnalysis(d.id,!1);r.openInfoMessage({title:`Finished disabling GCode analysis for ${c.length} online printers.`})}finally{i.value.bulkDisableGCodeAnalysis=!1}}return(c,d)=>($(),te(kt,null,{default:v(()=>[p(kr,{color:"primary"},{default:v(()=>[p(dt,null,{default:v(()=>[p(ee,null,{default:v(()=>[...d[10]||(d[10]=[E("settings",-1)])]),_:1})]),_:1}),p($n,null,{default:v(()=>[...d[11]||(d[11]=[E(" Printer Settings ",-1)])]),_:1})]),_:1}),p(Ht,{lines:"three"},{default:v(()=>[p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...d[12]||(d[12]=[E(" Pre-upload file cleanup ",-1)])]),_:1}),p(_t,null,{default:v(()=>[d[14]||(d[14]=E(" Automatically cleanup old files to ensure the SD card has enough space. ",-1)),d[15]||(d[15]=C("br",null,null,-1)),p(wn,{modelValue:s.value.autoRemoveOldFilesBeforeUpload,"onUpdate:modelValue":d[0]||(d[0]=f=>s.value.autoRemoveOldFilesBeforeUpload=f),label:"Remove old file before upload"},null,8,["modelValue"]),p(at,{modelValue:s.value.autoRemoveOldFilesCriteriumDays,"onUpdate:modelValue":d[1]||(d[1]=f=>s.value.autoRemoveOldFilesCriteriumDays=f),disabled:!s.value.autoRemoveOldFilesBeforeUpload,label:"Amount of days to keep files",min:"0",variant:"outlined",type:"number"},null,8,["modelValue","disabled"]),p(wn,{modelValue:s.value.autoRemoveOldFilesAtBoot,"onUpdate:modelValue":d[2]||(d[2]=f=>s.value.autoRemoveOldFilesAtBoot=f),label:"Remove old files when (re)booting the server"},null,8,["modelValue"]),p(se,{color:"primary",onClick:d[3]||(d[3]=f=>a())},{default:v(()=>[...d[13]||(d[13]=[E(" save file clean settings ",-1)])]),_:1})]),_:1})]),_:1}),p(ze,null,{default:v(()=>{var f;return[p(ft,null,{default:v(()=>[...d[16]||(d[16]=[E(" Connection Timeout ",-1)])]),_:1}),(f=Z(t).settings)!=null&&f.timeout?($(),te(_t,{key:0},{default:v(()=>[d[18]||(d[18]=E(" Set the server default REST API timeout in milliseconds. ",-1)),p(at,{modelValue:Z(t).settings.timeout.apiTimeout,"onUpdate:modelValue":d[4]||(d[4]=h=>Z(t).settings.timeout.apiTimeout=h),label:"Connection Timeout",min:"0",variant:"outlined",type:"number"},null,8,["modelValue"]),p(se,{color:"primary",onClick:d[5]||(d[5]=h=>o())},{default:v(()=>[...d[17]||(d[17]=[E(" save connection timeout ",-1)])]),_:1})]),_:1})):ve("",!0)]}),_:1}),p(ze,null,{default:v(()=>{var f;return[p(ft,null,{default:v(()=>[...d[19]||(d[19]=[E(" Upload Timeout ",-1)])]),_:1}),(f=Z(t).settings)!=null&&f.timeout?($(),te(_t,{key:0},{default:v(()=>[d[21]||(d[21]=E(" Set the server REST API file upload timeout in milliseconds. ",-1)),p(at,{modelValue:Z(t).settings.timeout.apiUploadTimeout,"onUpdate:modelValue":d[6]||(d[6]=h=>Z(t).settings.timeout.apiUploadTimeout=h),label:"Upload Timeout",min:"0",variant:"outlined",type:"number"},null,8,["modelValue"]),p(se,{color:"primary",onClick:d[7]||(d[7]=h=>o())},{default:v(()=>[...d[20]||(d[20]=[E(" save upload timeout ",-1)])]),_:1})]),_:1})):ve("",!0)]}),_:1}),p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...d[22]||(d[22]=[E(" Clean file references ",-1)])]),_:1}),p(_t,null,{default:v(()=>[d[24]||(d[24]=E(" Clear out the file references for all printers - this does not remove them from OctoPrint! ",-1)),d[25]||(d[25]=C("br",null,null,-1)),p(se,{color:"primary",onClick:d[8]||(d[8]=f=>l())},{default:v(()=>[...d[23]||(d[23]=[E(" Purge file references ",-1)])]),_:1})]),_:1})]),_:1}),p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...d[26]||(d[26]=[E(" Disable inefficient GCode analysis ",-1)])]),_:1}),p(_t,null,{default:v(()=>[d[28]||(d[28]=E(" Disable GCode analysis on all printers at once, preventing CPU intensive and inaccurate time/size estimates. ",-1)),d[29]||(d[29]=C("br",null,null,-1)),p(se,{color:"primary",onClick:d[9]||(d[9]=f=>u())},{default:v(()=>[...d[27]||(d[27]=[E(" Bulk disable GCode Analysis ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}}),b2=Ve({__name:"SettingsToolbar",props:["icon","title"],setup(e){const t=e;return(n,r)=>($(),te(kr,null,{default:v(()=>[p(dt,null,{default:v(()=>[p(ee,null,{default:v(()=>[E(ae(t.icon),1)]),_:1})]),_:1}),p($n,null,{default:v(()=>[E(ae(t.title),1)]),_:1}),gm(n.$slots,"default")]),_:3}))}}),kte=Ve({name:"FloorSettings",props:{},setup:()=>({printersStore:Xt(),floorStore:fo(),addOrUpdateFloorDialog:sn(on.AddOrUpdateFloorDialog),snackbar:$t()}),data:()=>({selectedItem:0,editedFloorName:"",editedFloorNumber:0}),computed:{floors(){return this.floorStore.floors},selectedFloor(){return this.floorStore.floors[this.selectedItem]},showAddedPrinters(){var e;return((e=this.selectedFloor.printers)==null?void 0:e.length)+1}},methods:{printerInFloor(e,t){if(!(e!=null&&e.printers))return;const n=e.printers[t-1];if(n)return this.printersStore.printer(n.printerId)},async createFloor(){await this.addOrUpdateFloorDialog.openDialog()},setEditedPrinterFloorName(){this.editedFloorName=this.selectedFloor.name},setEditedPrinterFloorNumber(){this.editedFloorNumber=this.selectedFloor.floor},async updatePrinterFloorName(){var t;if(!((t=this.selectedFloor)!=null&&t.id))return;const{id:e}=this.selectedFloor;await this.floorStore.updateFloorName({floorId:e,name:this.editedFloorName}),this.snackbar.info("Floor name updated")},async updatePrinterFloorNumber(){var t;if(!((t=this.selectedFloor)!=null&&t.id))return;const{id:e}=this.selectedFloor;await this.floorStore.updateFloorNumber({floorId:e,floorNumber:this.editedFloorNumber}),this.snackbar.info("Floor level updated"),this.selectedItem=-1},async clickDeleteFloor(){var e;(e=this.selectedFloor)!=null&&e.id&&(await this.floorStore.deleteFloor(this.selectedFloor.id),this.snackbar.info("Floor deleted"))},async deletePrinterFromFloor(e,t){const n=this.printerInFloor(e,t);!(e!=null&&e.id)||!(n!=null&&n.id)||(await this.floorStore.deletePrinterFromFloor({floorId:e.id,printerId:n.id}),this.snackbar.info("Printer removed from floor"))}}}),xte={key:1};function Ete(e,t,n,r,s,i){const o=b2,a=Vn("v-list-item-action-text"),l=Vn("v-list-item-group"),u=Vn("v-edit-dialog"),c=Vn("v-list-item-content");return $(),te(kt,null,{default:v(()=>[p(o,{icon:"house_siding",title:"Floors"}),p(Ht,{subheader:"",lines:"three"},{default:v(()=>[p(Ur,null,{default:v(()=>[...t[7]||(t[7]=[E("Floors",-1)])]),_:1}),p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...t[8]||(t[8]=[E(" Create new floor ",-1)])]),_:1}),p(_t,null,{default:v(()=>[t[10]||(t[10]=E(" Creates an empty department/floor to view printer groups ",-1)),t[11]||(t[11]=C("br",null,null,-1)),p(se,{color:"primary",onClick:t[0]||(t[0]=d=>e.createFloor())},{default:v(()=>[...t[9]||(t[9]=[E(" Create floor ",-1)])]),_:1})]),_:1})]),_:1})]),_:1}),p(cn),p(st,{"no-gutters":""},{default:v(()=>[p(We,null,{default:v(()=>[p(Ht,{density:"compact"},{default:v(()=>[p(l,{modelValue:e.selectedItem,"onUpdate:modelValue":t[1]||(t[1]=d=>e.selectedItem=d)},{default:v(()=>[($(!0),ye(De,null,Zt(e.floors,d=>($(),te(ze,{key:d.id},{default:v(()=>[p(ft,null,{default:v(()=>[E(ae(d.name),1)]),_:2},1024),p(_t,null,{default:v(()=>[E(ae(d.printers.length||0)+" assigned ",1)]),_:2},1024),p(a,null,{default:v(()=>[E(" Floor number: "+ae(d.floor),1)]),_:2},1024)]),_:2},1024))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),p(We,null,{default:v(()=>[p(kr,null,{default:v(()=>[p(dE,null,{default:v(({isHovering:d,props:f})=>[p($n,jv(ap(f)),{default:v(()=>[e.selectedFloor?($(),te(u,{key:0,onOpen:e.setEditedPrinterFloorName,onSave:e.updatePrinterFloorName},{input:v(()=>[p(at,{modelValue:e.editedFloorName,"onUpdate:modelValue":t[2]||(t[2]=h=>e.editedFloorName=h),"return-value":e.editedFloorName,"onUpdate:returnValue":t[3]||(t[3]=h=>e.editedFloorName=h),counter:"",label:"Edit","single-line":""},null,8,["modelValue","return-value"])]),default:v(()=>[p(se,{color:"secondary"},{default:v(()=>[d?($(),te(ee,{key:0,size:"small"},{default:v(()=>[...t[12]||(t[12]=[E(" edit ",-1)])]),_:1})):ve("",!0),E(" "+ae(e.selectedFloor.name),1)]),_:2},1024)]),_:2},1032,["onOpen","onSave"])):($(),ye("span",xte," Select a floor on the left "))]),_:2},1040)]),_:1}),p(dE,null,{default:v(({isHovering:d,props:f})=>[p($n,jv(ap(f)),{default:v(()=>[e.selectedFloor?($(),te(u,{key:0,onOpen:e.setEditedPrinterFloorNumber,onSave:e.updatePrinterFloorNumber},{input:v(()=>[p(at,{modelValue:e.editedFloorNumber,"onUpdate:modelValue":t[4]||(t[4]=h=>e.editedFloorNumber=h),"return-value":e.editedFloorNumber,"onUpdate:returnValue":t[5]||(t[5]=h=>e.editedFloorNumber=h),label:"Edit","single-line":"",type:"number"},null,8,["modelValue","return-value"])]),default:v(()=>[p(se,{color:"secondary"},{default:v(()=>[d?($(),te(ee,{key:0,size:"small"},{default:v(()=>[...t[13]||(t[13]=[E(" edit ",-1)])]),_:1})):ve("",!0),E(" "+ae(e.selectedFloor.floor),1)]),_:2},1024)]),_:2},1032,["onOpen","onSave"])):ve("",!0)]),_:2},1040)]),_:1}),p(Pn),e.selectedFloor?($(),te(se,{key:0,color:"primary",onClick:t[6]||(t[6]=d=>e.clickDeleteFloor())},{default:v(()=>[p(ee,null,{default:v(()=>[...t[14]||(t[14]=[E("delete",-1)])]),_:1}),t[15]||(t[15]=E(" Delete floor ",-1))]),_:1})):ve("",!0)]),_:1}),e.selectedFloor?($(),te(Ht,{key:0},{default:v(()=>[($(!0),ye(De,null,Zt(e.showAddedPrinters,d=>($(),te(ze,{key:d},{default:v(()=>[e.printerInFloor(e.selectedFloor,d)?($(),te(c,{key:0},{default:v(()=>[p(ft,null,{default:v(()=>{var f;return[E(ae((f=e.printerInFloor(e.selectedFloor,d))==null?void 0:f.name),1)]}),_:2},1024)]),_:2},1024)):ve("",!0),e.printerInFloor(e.selectedFloor,d)?($(),te(Nu,{key:1},{default:v(()=>[p(se,{onClick:f=>e.deletePrinterFromFloor(e.selectedFloor,d)},{default:v(()=>[p(ee,null,{default:v(()=>[...t[16]||(t[16]=[E("close",-1)])]),_:1}),t[17]||(t[17]=E(" Clear ",-1))]),_:1},8,["onClick"])]),_:2},1024)):ve("",!0)]),_:2},1024))),128))]),_:1})):ve("",!0)]),_:1})]),_:1})]),_:1})}const Cte=El(kte,[["render",Ete]]),Tte="/img/DavidZwart.jpg",w2="0.0.23",Rte={key:0},Pte={key:1},Ite=Ve({__name:"AboutView",setup(e){const t=G(""),n=G(""),r=G(w2);return xt(async()=>{const s=await Ia.getVersion();t.value=s.version,n.value=s.monsterPi}),(s,i)=>($(),te(kt,null,{default:v(()=>[p(un,null,{default:v(()=>[...i[0]||(i[0]=[E(" About FDM Monster",-1),C("strong",null," © ",-1)])]),_:1}),p(rn,null,{default:v(()=>[...i[1]||(i[1]=[E(" The first prototype of FDM Monster",-1),C("strong",null," © ",-1),E(" was created by David Zwart in 2021 in collaboration with ",-1),C("strong",null,[C("a",{href:"https://mtb3d.com"}," MTB3D ")],-1),E(". This open-source prototype proved a strong factor in process and logistics optimization for a 3D Printing company with 100+ printers. Due to it's success, we decided to keep it open-source and free! ",-1)])]),_:1}),p(rn,null,{default:v(()=>[i[4]||(i[4]=E(" The latest 3D Printing Farm server named FDM Monster has been tested for 2 years using a custom image for running 4 OctoPrint images on a Raspberry Pi. ",-1)),i[5]||(i[5]=C("br",null,null,-1)),i[6]||(i[6]=E(" This version uses the famous ",-1)),i[7]||(i[7]=C("a",{href:"https://nodejs.org/en",target:"_blank"},[C("strong",null," Node.js framework ")],-1)),i[8]||(i[8]=E(" together with Awilix and ExpressJS for its server, and ",-1)),i[9]||(i[9]=C("a",{href:"https://vuejs.org/",target:"_blank"},[C("strong",null," Vue 2 ")],-1)),i[10]||(i[10]=E(" and ",-1)),i[11]||(i[11]=C("a",{href:"https://next.vuetifyjs.com/",target:"_blank"},[C("strong",null," Vuetify 2 ")],-1)),i[12]||(i[12]=E(" to set a base for FDM Monster Client",-1)),i[13]||(i[13]=C("strong",null," © ",-1)),i[14]||(i[14]=E(" - the webapp. ",-1)),i[15]||(i[15]=C("br",null,null,-1)),i[16]||(i[16]=C("br",null,null,-1)),C("strong",null," Your server's version is: "+ae(t.value),1),i[17]||(i[17]=C("br",null,null,-1)),C("strong",null," Your clients's version is: "+ae(r.value),1),i[18]||(i[18]=C("br",null,null,-1)),n.value?($(),ye("strong",Rte,[E(" Your MonsterPi version is: "+ae(n.value),1),i[2]||(i[2]=C("br",null,null,-1))])):($(),ye("strong",Pte," No MonsterPi distro detected. ")),i[19]||(i[19]=C("br",null,null,-1)),p(se,{class:"mt-3",variant:"outlined",to:"/settings/software-upgrade"},{default:v(()=>[...i[3]||(i[3]=[E(" Visit Upgrade Settings ",-1)])]),_:1})]),_:1}),p(un,null,{default:v(()=>[...i[20]||(i[20]=[E(" Documentation ",-1)])]),_:1}),p(rn,null,{default:v(()=>[C("strong",null,[p(se,{color:"primary",href:"https://docs.fdm-monster.net",style:{color:"white"},target:"_blank"},{default:v(()=>[p(ee,{class:"mr-2"},{default:v(()=>[...i[21]||(i[21]=[E("menu_book",-1)])]),_:1}),i[22]||(i[22]=E(" FDM Monster documentation site ",-1))]),_:1})]),i[23]||(i[23]=C("br",null,null,-1))]),_:1}),p(un,null,{default:v(()=>[i[25]||(i[25]=E(" Bug reports ",-1)),p(ee,null,{default:v(()=>[...i[24]||(i[24]=[E("bug",-1)])]),_:1})]),_:1}),p(rn,null,{default:v(()=>[...i[26]||(i[26]=[E(" Did you find a bug, or a feature that needs work? We would love to hear about it! ",-1),C("br",null,null,-1),C("strong",null," We have multiple ways to report it: ",-1),C("h3",null,[C("ul",{class:"ml-5"},[C("li",null,"Mail to davidzwa@gmail.com"),C("li",null,[C("a",{href:"https://discord.gg/mwA8uP8CMc",style:{color:"white"},target:"_blank"}," Discord server ")]),C("li",null,[C("strong",null,[C("a",{href:"https://github.com/fdm-monster/fdm-monster/issues",style:{color:"white"},target:"_blank"},[E(" FDM Monster "),C("strong",null," © "),E(" Github Issues ")])])]),C("li",null,[C("a",{href:"https://fdm-monster.net",style:{color:"white"},target:"_blank"}," Website ")])])],-1)])]),_:1}),p(un,null,{default:v(()=>[...i[27]||(i[27]=[E(" About me ",-1)])]),_:1}),p(rn,null,{default:v(()=>[...i[28]||(i[28]=[C("img",{src:Tte,width:"150px"},null,-1),C("h4",{class:"mt-2"},[C("a",{href:"https://www.linkedin.com/in/david-zwart-88514083/",style:{color:"white"},target:"_blank"}," LinkedIn "),C("a",{class:"ml-2",href:"https://github.com/davidzwa",style:{color:"white"},target:"_blank"}," Github Profile ")],-1),E(" David Zwart MSc., post-graduate from the TU Delft (Embedded Systems), author of FDM Monster",-1),C("strong",null," © ",-1)])]),_:1})]),_:1}))}});/*!
|
|
81
|
+
* @kurkle/color v0.3.2
|
|
82
|
+
* https://github.com/kurkle/color#readme
|
|
83
|
+
* (c) 2023 Jukka Kurkela
|
|
84
|
+
* Released under the MIT License
|
|
85
|
+
*/function Ef(e){return e+.5|0}const Fo=(e,t,n)=>Math.max(Math.min(e,n),t);function zc(e){return Fo(Ef(e*2.55),0,255)}function Ho(e){return Fo(Ef(e*255),0,255)}function Fi(e){return Fo(Ef(e/2.55)/100,0,1)}function fE(e){return Fo(Ef(e*100),0,100)}const os={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Lb=[..."0123456789ABCDEF"],Ate=e=>Lb[e&15],Ote=e=>Lb[(e&240)>>4]+Lb[e&15],Zf=e=>(e&240)>>4===(e&15),Dte=e=>Zf(e.r)&&Zf(e.g)&&Zf(e.b)&&Zf(e.a);function Mte(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&os[e[1]]*17,g:255&os[e[2]]*17,b:255&os[e[3]]*17,a:t===5?os[e[4]]*17:255}:(t===7||t===9)&&(n={r:os[e[1]]<<4|os[e[2]],g:os[e[3]]<<4|os[e[4]],b:os[e[5]]<<4|os[e[6]],a:t===9?os[e[7]]<<4|os[e[8]]:255})),n}const Lte=(e,t)=>e<255?t(e):"";function Fte(e){var t=Dte(e)?Ate:Ote;return e?"#"+t(e.r)+t(e.g)+t(e.b)+Lte(e.a,t):void 0}const $te=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function S2(e,t,n){const r=t*Math.min(n,1-n),s=(i,o=(i+e/30)%12)=>n-r*Math.max(Math.min(o-3,9-o,1),-1);return[s(0),s(8),s(4)]}function Nte(e,t,n){const r=(s,i=(s+e/60)%6)=>n-n*t*Math.max(Math.min(i,4-i,1),0);return[r(5),r(3),r(1)]}function Bte(e,t,n){const r=S2(e,1,.5);let s;for(t+n>1&&(s=1/(t+n),t*=s,n*=s),s=0;s<3;s++)r[s]*=1-t-n,r[s]+=t;return r}function Vte(e,t,n,r,s){return e===s?(t-n)/r+(t<n?6:0):t===s?(n-e)/r+2:(e-t)/r+4}function aw(e){const n=e.r/255,r=e.g/255,s=e.b/255,i=Math.max(n,r,s),o=Math.min(n,r,s),a=(i+o)/2;let l,u,c;return i!==o&&(c=i-o,u=a>.5?c/(2-i-o):c/(i+o),l=Vte(n,r,s,c,i),l=l*60+.5),[l|0,u||0,a]}function lw(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(Ho)}function uw(e,t,n){return lw(S2,e,t,n)}function Ute(e,t,n){return lw(Bte,e,t,n)}function zte(e,t,n){return lw(Nte,e,t,n)}function _2(e){return(e%360+360)%360}function Hte(e){const t=$te.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?zc(+t[5]):Ho(+t[5]));const s=_2(+t[2]),i=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?r=Ute(s,i,o):t[1]==="hsv"?r=zte(s,i,o):r=uw(s,i,o),{r:r[0],g:r[1],b:r[2],a:n}}function jte(e,t){var n=aw(e);n[0]=_2(n[0]+t),n=uw(n),e.r=n[0],e.g=n[1],e.b=n[2]}function Wte(e){if(!e)return;const t=aw(e),n=t[0],r=fE(t[1]),s=fE(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${s}%, ${Fi(e.a)})`:`hsl(${n}, ${r}%, ${s}%)`}const hE={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},pE={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function qte(){const e={},t=Object.keys(pE),n=Object.keys(hE);let r,s,i,o,a;for(r=0;r<t.length;r++){for(o=a=t[r],s=0;s<n.length;s++)i=n[s],a=a.replace(i,hE[i]);i=parseInt(pE[o],16),e[a]=[i>>16&255,i>>8&255,i&255]}return e}let eh;function Gte(e){eh||(eh=qte(),eh.transparent=[0,0,0,0]);const t=eh[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const Kte=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Yte(e){const t=Kte.exec(e);let n=255,r,s,i;if(t){if(t[7]!==r){const o=+t[7];n=t[8]?zc(o):Fo(o*255,0,255)}return r=+t[1],s=+t[3],i=+t[5],r=255&(t[2]?zc(r):Fo(r,0,255)),s=255&(t[4]?zc(s):Fo(s,0,255)),i=255&(t[6]?zc(i):Fo(i,0,255)),{r,g:s,b:i,a:n}}}function Xte(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Fi(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const _v=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,Ll=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function Qte(e,t,n){const r=Ll(Fi(e.r)),s=Ll(Fi(e.g)),i=Ll(Fi(e.b));return{r:Ho(_v(r+n*(Ll(Fi(t.r))-r))),g:Ho(_v(s+n*(Ll(Fi(t.g))-s))),b:Ho(_v(i+n*(Ll(Fi(t.b))-i))),a:e.a+n*(t.a-e.a)}}function th(e,t,n){if(e){let r=aw(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=uw(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function k2(e,t){return e&&Object.assign(t||{},e)}function mE(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=Ho(e[3]))):(t=k2(e,{r:0,g:0,b:0,a:1}),t.a=Ho(t.a)),t}function Jte(e){return e.charAt(0)==="r"?Yte(e):Hte(e)}class Vd{constructor(t){if(t instanceof Vd)return t;const n=typeof t;let r;n==="object"?r=mE(t):n==="string"&&(r=Mte(t)||Gte(t)||Jte(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=k2(this._rgb);return t&&(t.a=Fi(t.a)),t}set rgb(t){this._rgb=mE(t)}rgbString(){return this._valid?Xte(this._rgb):void 0}hexString(){return this._valid?Fte(this._rgb):void 0}hslString(){return this._valid?Wte(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,s=t.rgb;let i;const o=n===i?.5:n,a=2*o-1,l=r.a-s.a,u=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;i=1-u,r.r=255&u*r.r+i*s.r+.5,r.g=255&u*r.g+i*s.g+.5,r.b=255&u*r.b+i*s.b+.5,r.a=o*r.a+(1-o)*s.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=Qte(this._rgb,t._rgb,n)),this}clone(){return new Vd(this.rgb)}alpha(t){return this._rgb.a=Ho(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=Ef(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return th(this._rgb,2,t),this}darken(t){return th(this._rgb,2,-t),this}saturate(t){return th(this._rgb,1,t),this}desaturate(t){return th(this._rgb,1,-t),this}rotate(t){return jte(this._rgb,t),this}}/*!
|
|
86
|
+
* Chart.js v4.5.1
|
|
87
|
+
* https://www.chartjs.org
|
|
88
|
+
* (c) 2025 Chart.js Contributors
|
|
89
|
+
* Released under the MIT License
|
|
90
|
+
*/function Pi(){}const Zte=(()=>{let e=0;return()=>e++})();function Ut(e){return e==null}function Ln(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function Tt(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function Ss(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function ti(e,t){return Ss(e)?e:t}function Rt(e,t){return typeof e>"u"?t:e}const ene=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function en(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function Lt(e,t,n,r){let s,i,o;if(Ln(e))for(i=e.length,s=0;s<i;s++)t.call(n,e[s],s);else if(Tt(e))for(o=Object.keys(e),i=o.length,s=0;s<i;s++)t.call(n,e[o[s]],o[s])}function Gp(e,t){let n,r,s,i;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(s=e[n],i=t[n],s.datasetIndex!==i.datasetIndex||s.index!==i.index)return!1;return!0}function Kp(e){if(Ln(e))return e.map(Kp);if(Tt(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let s=0;for(;s<r;++s)t[n[s]]=Kp(e[n[s]]);return t}return e}function x2(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function tne(e,t,n,r){if(!x2(e))return;const s=t[e],i=n[e];Tt(s)&&Tt(i)?Ud(s,i,r):t[e]=Kp(i)}function Ud(e,t,n){const r=Ln(t)?t:[t],s=r.length;if(!Tt(e))return e;n=n||{};const i=n.merger||tne;let o;for(let a=0;a<s;++a){if(o=r[a],!Tt(o))continue;const l=Object.keys(o);for(let u=0,c=l.length;u<c;++u)i(l[u],e,o,n)}return e}function ld(e,t){return Ud(e,t,{merger:nne})}function nne(e,t,n){if(!x2(e))return;const r=t[e],s=n[e];Tt(r)&&Tt(s)?ld(r,s):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Kp(s))}const gE={"":e=>e,x:e=>e.x,y:e=>e.y};function rne(e){const t=e.split("."),n=[];let r="";for(const s of t)r+=s,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function sne(e){const t=rne(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function zu(e,t){return(gE[t]||(gE[t]=sne(t)))(e)}function cw(e){return e.charAt(0).toUpperCase()+e.slice(1)}const zd=e=>typeof e<"u",ta=e=>typeof e=="function",vE=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function ine(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const dr=Math.PI,jo=2*dr,Yp=Number.POSITIVE_INFINITY,one=dr/180,Ls=dr/2,ga=dr/4,yE=dr*2/3,Fb=Math.log10,Wo=Math.sign;function Yh(e,t,n){return Math.abs(e-t)<n}function bE(e){const t=Math.round(e);e=Yh(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(Fb(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function ane(e){const t=[],n=Math.sqrt(e);let r;for(r=1;r<n;r++)e%r===0&&(t.push(r),t.push(e/r));return n===(n|0)&&t.push(n),t.sort((s,i)=>s-i).pop(),t}function lne(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function Xp(e){return!lne(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function une(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function cne(e,t,n){let r,s,i;for(r=0,s=e.length;r<s;r++)i=e[r][n],isNaN(i)||(t.min=Math.min(t.min,i),t.max=Math.max(t.max,i))}function Da(e){return e*(dr/180)}function dne(e){return e*(180/dr)}function wE(e){if(!Ss(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function fne(e,t){const n=t.x-e.x,r=t.y-e.y,s=Math.sqrt(n*n+r*r);let i=Math.atan2(r,n);return i<-.5*dr&&(i+=jo),{angle:i,distance:s}}function hne(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function va(e){return(e%jo+jo)%jo}function pne(e,t,n,r){const s=va(e),i=va(t),o=va(n),a=va(i-s),l=va(o-s),u=va(s-i),c=va(s-o);return s===i||s===o||r&&i===o||a>l&&u<c}function Fs(e,t,n){return Math.max(t,Math.min(n,e))}function mne(e){return Fs(e,-32768,32767)}function Ql(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function dw(e,t,n){n=n||(o=>e[o]<t);let r=e.length-1,s=0,i;for(;r-s>1;)i=s+r>>1,n(i)?s=i:r=i;return{lo:s,hi:r}}const $b=(e,t,n,r)=>dw(e,n,r?s=>{const i=e[s][t];return i<n||i===n&&e[s+1][t]===n}:s=>e[s][t]<n),gne=(e,t,n)=>dw(e,n,r=>e[r][t]>=n);function vne(e,t,n){let r=0,s=e.length;for(;r<s&&e[r]<t;)r++;for(;s>r&&e[s-1]>n;)s--;return r>0||s<e.length?e.slice(r,s):e}const E2=["push","pop","shift","splice","unshift"];function yne(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),E2.forEach(n=>{const r="_onData"+cw(n),s=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...i){const o=s.apply(this,i);return e._chartjs.listeners.forEach(a=>{typeof a[r]=="function"&&a[r](...i)}),o}})})}function SE(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,s=r.indexOf(t);s!==-1&&r.splice(s,1),!(r.length>0)&&(E2.forEach(i=>{delete e[i]}),delete e._chartjs)}function C2(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const T2=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function R2(e,t){let n=[],r=!1;return function(...s){n=s,r||(r=!0,T2.call(window,()=>{r=!1,e.apply(t,n)}))}}function bne(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const fw=e=>e==="start"?"left":e==="end"?"right":"center",nr=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,wne=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t,nh=e=>e===0||e===1,_E=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*jo/n)),kE=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*jo/n)+1,ud={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*Ls)+1,easeOutSine:e=>Math.sin(e*Ls),easeInOutSine:e=>-.5*(Math.cos(dr*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>nh(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>nh(e)?e:_E(e,.075,.3),easeOutElastic:e=>nh(e)?e:kE(e,.075,.3),easeInOutElastic(e){return nh(e)?e:e<.5?.5*_E(e*2,.1125,.45):.5+.5*kE(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-ud.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?ud.easeInBounce(e*2)*.5:ud.easeOutBounce(e*2-1)*.5+.5};function P2(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function xE(e){return P2(e)?e:new Vd(e)}function kv(e){return P2(e)?e:new Vd(e).saturate(.5).darken(.1).hexString()}const Sne=["x","y","borderWidth","radius","tension"],_ne=["color","borderColor","backgroundColor"];function kne(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:_ne},numbers:{type:"number",properties:Sne}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function xne(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const EE=new Map;function Ene(e,t){t=t||{};const n=e+JSON.stringify(t);let r=EE.get(n);return r||(r=new Intl.NumberFormat(e,t),EE.set(n,r)),r}function I2(e,t,n){return Ene(t,n).format(e)}const A2={values(e){return Ln(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let s,i=e;if(n.length>1){const u=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(u<1e-4||u>1e15)&&(s="scientific"),i=Cne(e,n)}const o=Fb(Math.abs(i)),a=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),I2(e,r,l)},logarithmic(e,t,n){if(e===0)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor(Fb(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?A2.numeric.call(this,e,t,n):""}};function Cne(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var O2={formatters:A2};function Tne(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:O2.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const gl=Object.create(null),Nb=Object.create(null);function cd(e,t){if(!t)return e;const n=t.split(".");for(let r=0,s=n.length;r<s;++r){const i=n[r];e=e[i]||(e[i]=Object.create(null))}return e}function xv(e,t,n){return typeof t=="string"?Ud(cd(e,t),n):Ud(cd(e,""),t)}class Rne{constructor(t,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=r=>r.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,s)=>kv(s.backgroundColor),this.hoverBorderColor=(r,s)=>kv(s.borderColor),this.hoverColor=(r,s)=>kv(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return xv(this,t,n)}get(t){return cd(this,t)}describe(t,n){return xv(Nb,t,n)}override(t,n){return xv(gl,t,n)}route(t,n,r,s){const i=cd(this,t),o=cd(this,r),a="_"+n;Object.defineProperties(i,{[a]:{value:i[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],u=o[s];return Tt(l)?Object.assign({},u,l):Rt(l,u)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}}var Sn=new Rne({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[kne,xne,Tne]);function Pne(e){return!e||Ut(e.size)||Ut(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function CE(e,t,n,r,s){let i=t[s];return i||(i=t[s]=e.measureText(s).width,n.push(s)),i>r&&(r=i),r}function ya(e,t,n){const r=e.currentDevicePixelRatio,s=n!==0?Math.max(n/2,.5):0;return Math.round((t-s)*r)/r+s}function TE(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function RE(e,t,n,r){D2(e,t,n,r,null)}function D2(e,t,n,r,s){let i,o,a,l,u,c,d,f;const h=t.pointStyle,g=t.rotation,m=t.radius;let y=(g||0)*one;if(h&&typeof h=="object"&&(i=h.toString(),i==="[object HTMLImageElement]"||i==="[object HTMLCanvasElement]")){e.save(),e.translate(n,r),e.rotate(y),e.drawImage(h,-h.width/2,-h.height/2,h.width,h.height),e.restore();return}if(!(isNaN(m)||m<=0)){switch(e.beginPath(),h){default:s?e.ellipse(n,r,s/2,m,0,0,jo):e.arc(n,r,m,0,jo),e.closePath();break;case"triangle":c=s?s/2:m,e.moveTo(n+Math.sin(y)*c,r-Math.cos(y)*m),y+=yE,e.lineTo(n+Math.sin(y)*c,r-Math.cos(y)*m),y+=yE,e.lineTo(n+Math.sin(y)*c,r-Math.cos(y)*m),e.closePath();break;case"rectRounded":u=m*.516,l=m-u,o=Math.cos(y+ga)*l,d=Math.cos(y+ga)*(s?s/2-u:l),a=Math.sin(y+ga)*l,f=Math.sin(y+ga)*(s?s/2-u:l),e.arc(n-d,r-a,u,y-dr,y-Ls),e.arc(n+f,r-o,u,y-Ls,y),e.arc(n+d,r+a,u,y,y+Ls),e.arc(n-f,r+o,u,y+Ls,y+dr),e.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*m,c=s?s/2:l,e.rect(n-c,r-l,2*c,2*l);break}y+=ga;case"rectRot":d=Math.cos(y)*(s?s/2:m),o=Math.cos(y)*m,a=Math.sin(y)*m,f=Math.sin(y)*(s?s/2:m),e.moveTo(n-d,r-a),e.lineTo(n+f,r-o),e.lineTo(n+d,r+a),e.lineTo(n-f,r+o),e.closePath();break;case"crossRot":y+=ga;case"cross":d=Math.cos(y)*(s?s/2:m),o=Math.cos(y)*m,a=Math.sin(y)*m,f=Math.sin(y)*(s?s/2:m),e.moveTo(n-d,r-a),e.lineTo(n+d,r+a),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o);break;case"star":d=Math.cos(y)*(s?s/2:m),o=Math.cos(y)*m,a=Math.sin(y)*m,f=Math.sin(y)*(s?s/2:m),e.moveTo(n-d,r-a),e.lineTo(n+d,r+a),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o),y+=ga,d=Math.cos(y)*(s?s/2:m),o=Math.cos(y)*m,a=Math.sin(y)*m,f=Math.sin(y)*(s?s/2:m),e.moveTo(n-d,r-a),e.lineTo(n+d,r+a),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o);break;case"line":o=s?s/2:Math.cos(y)*m,a=Math.sin(y)*m,e.moveTo(n-o,r-a),e.lineTo(n+o,r+a);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(y)*(s?s/2:m),r+Math.sin(y)*m);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function M2(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function hw(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function pw(e){e.restore()}function Ine(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),Ut(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function Ane(e,t,n,r,s){if(s.strikethrough||s.underline){const i=e.measureText(r),o=t-i.actualBoundingBoxLeft,a=t+i.actualBoundingBoxRight,l=n-i.actualBoundingBoxAscent,u=n+i.actualBoundingBoxDescent,c=s.strikethrough?(l+u)/2:u;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=s.decorationWidth||2,e.moveTo(o,c),e.lineTo(a,c),e.stroke()}}function One(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function Hd(e,t,n,r,s,i={}){const o=Ln(t)?t:[t],a=i.strokeWidth>0&&i.strokeColor!=="";let l,u;for(e.save(),e.font=s.string,Ine(e,i),l=0;l<o.length;++l)u=o[l],i.backdrop&&One(e,i.backdrop),a&&(i.strokeColor&&(e.strokeStyle=i.strokeColor),Ut(i.strokeWidth)||(e.lineWidth=i.strokeWidth),e.strokeText(u,n,r,i.maxWidth)),e.fillText(u,n,r,i.maxWidth),Ane(e,n,r,u,i),r+=Number(s.lineHeight);e.restore()}function Qp(e,t){const{x:n,y:r,w:s,h:i,radius:o}=t;e.arc(n+o.topLeft,r+o.topLeft,o.topLeft,1.5*dr,dr,!0),e.lineTo(n,r+i-o.bottomLeft),e.arc(n+o.bottomLeft,r+i-o.bottomLeft,o.bottomLeft,dr,Ls,!0),e.lineTo(n+s-o.bottomRight,r+i),e.arc(n+s-o.bottomRight,r+i-o.bottomRight,o.bottomRight,Ls,0,!0),e.lineTo(n+s,r+o.topRight),e.arc(n+s-o.topRight,r+o.topRight,o.topRight,0,-Ls,!0),e.lineTo(n+o.topLeft,r)}const Dne=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Mne=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Lne(e,t){const n=(""+e).match(Dne);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const Fne=e=>+e||0;function L2(e,t){const n={},r=Tt(t),s=r?Object.keys(t):t,i=Tt(e)?r?o=>Rt(e[o],e[t[o]]):o=>e[o]:()=>e;for(const o of s)n[o]=Fne(i(o));return n}function F2(e){return L2(e,{top:"y",right:"x",bottom:"y",left:"x"})}function iu(e){return L2(e,["topLeft","topRight","bottomLeft","bottomRight"])}function _s(e){const t=F2(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function ur(e,t){e=e||{},t=t||Sn.font;let n=Rt(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=Rt(e.style,t.style);r&&!(""+r).match(Mne)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const s={family:Rt(e.family,t.family),lineHeight:Lne(Rt(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:Rt(e.weight,t.weight),string:""};return s.string=Pne(s),s}function rh(e,t,n,r){let s,i,o;for(s=0,i=e.length;s<i;++s)if(o=e[s],o!==void 0&&o!==void 0)return o}function $ne(e,t,n){const{min:r,max:s}=e,i=ene(t,(s-r)/2),o=(a,l)=>n&&a===0?0:a+l;return{min:o(r,-Math.abs(i)),max:o(s,i)}}function gc(e,t){return Object.assign(Object.create(e),t)}function mw(e,t=[""],n,r,s=()=>e[0]){const i=n||e;typeof r>"u"&&(r=V2("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:i,_fallback:r,_getTarget:s,override:a=>mw([a,...e],t,i,r)};return new Proxy(o,{deleteProperty(a,l){return delete a[l],delete a._keys,delete e[0][l],!0},get(a,l){return N2(a,l,()=>Wne(l,t,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return IE(a).includes(l)},ownKeys(a){return IE(a)},set(a,l,u){const c=a._storage||(a._storage=s());return a[l]=c[l]=u,delete a._keys,!0}})}function Hu(e,t,n,r){const s={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:$2(e,r),setContext:i=>Hu(e,i,n,r),override:i=>Hu(e.override(i),t,n,r)};return new Proxy(s,{deleteProperty(i,o){return delete i[o],delete e[o],!0},get(i,o,a){return N2(i,o,()=>Bne(i,o,a))},getOwnPropertyDescriptor(i,o){return i._descriptors.allKeys?Reflect.has(e,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,o)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(i,o){return Reflect.has(e,o)},ownKeys(){return Reflect.ownKeys(e)},set(i,o,a){return e[o]=a,delete i[o],!0}})}function $2(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:s=t.allKeys}=e;return{allKeys:s,scriptable:n,indexable:r,isScriptable:ta(n)?n:()=>n,isIndexable:ta(r)?r:()=>r}}const Nne=(e,t)=>e?e+cw(t):t,gw=(e,t)=>Tt(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function N2(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const r=n();return e[t]=r,r}function Bne(e,t,n){const{_proxy:r,_context:s,_subProxy:i,_descriptors:o}=e;let a=r[t];return ta(a)&&o.isScriptable(t)&&(a=Vne(t,a,e,n)),Ln(a)&&a.length&&(a=Une(t,a,e,o.isIndexable)),gw(t,a)&&(a=Hu(a,s,i&&i[t],o)),a}function Vne(e,t,n,r){const{_proxy:s,_context:i,_subProxy:o,_stack:a}=n;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);a.add(e);let l=t(i,o||r);return a.delete(e),gw(e,l)&&(l=vw(s._scopes,s,e,l)),l}function Une(e,t,n,r){const{_proxy:s,_context:i,_subProxy:o,_descriptors:a}=n;if(typeof i.index<"u"&&r(e))return t[i.index%t.length];if(Tt(t[0])){const l=t,u=s._scopes.filter(c=>c!==l);t=[];for(const c of l){const d=vw(u,s,e,c);t.push(Hu(d,i,o&&o[e],a))}}return t}function B2(e,t,n){return ta(e)?e(t,n):e}const zne=(e,t)=>e===!0?t:typeof e=="string"?zu(t,e):void 0;function Hne(e,t,n,r,s){for(const i of t){const o=zne(n,i);if(o){e.add(o);const a=B2(o._fallback,n,s);if(typeof a<"u"&&a!==n&&a!==r)return a}else if(o===!1&&typeof r<"u"&&n!==r)return null}return!1}function vw(e,t,n,r){const s=t._rootScopes,i=B2(t._fallback,n,r),o=[...e,...s],a=new Set;a.add(r);let l=PE(a,o,n,i||n,r);return l===null||typeof i<"u"&&i!==n&&(l=PE(a,o,i,l,r),l===null)?!1:mw(Array.from(a),[""],s,i,()=>jne(t,n,r))}function PE(e,t,n,r,s){for(;n;)n=Hne(e,t,n,r,s);return n}function jne(e,t,n){const r=e._getTarget();t in r||(r[t]={});const s=r[t];return Ln(s)&&Tt(n)?n:s||{}}function Wne(e,t,n,r){let s;for(const i of t)if(s=V2(Nne(i,e),n),typeof s<"u")return gw(e,s)?vw(n,r,e,s):s}function V2(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function IE(e){let t=e._keys;return t||(t=e._keys=qne(e._scopes)),t}function qne(e){const t=new Set;for(const n of e)for(const r of Object.keys(n).filter(s=>!s.startsWith("_")))t.add(r);return Array.from(t)}function yw(){return typeof window<"u"&&typeof document<"u"}function bw(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Jp(e,t,n){let r;return typeof e=="string"?(r=parseInt(e,10),e.indexOf("%")!==-1&&(r=r/100*t.parentNode[n])):r=e,r}const ag=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function Gne(e,t){return ag(e).getPropertyValue(t)}const Kne=["top","right","bottom","left"];function nl(e,t,n){const r={};n=n?"-"+n:"";for(let s=0;s<4;s++){const i=Kne[s];r[i]=parseFloat(e[t+"-"+i+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const Yne=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function Xne(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:s,offsetY:i}=r;let o=!1,a,l;if(Yne(s,i,e.target))a=s,l=i;else{const u=t.getBoundingClientRect();a=r.clientX-u.left,l=r.clientY-u.top,o=!0}return{x:a,y:l,box:o}}function ka(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,s=ag(n),i=s.boxSizing==="border-box",o=nl(s,"padding"),a=nl(s,"border","width"),{x:l,y:u,box:c}=Xne(e,n),d=o.left+(c&&a.left),f=o.top+(c&&a.top);let{width:h,height:g}=t;return i&&(h-=o.width+a.width,g-=o.height+a.height),{x:Math.round((l-d)/h*n.width/r),y:Math.round((u-f)/g*n.height/r)}}function Qne(e,t,n){let r,s;if(t===void 0||n===void 0){const i=e&&bw(e);if(!i)t=e.clientWidth,n=e.clientHeight;else{const o=i.getBoundingClientRect(),a=ag(i),l=nl(a,"border","width"),u=nl(a,"padding");t=o.width-u.width-l.width,n=o.height-u.height-l.height,r=Jp(a.maxWidth,i,"clientWidth"),s=Jp(a.maxHeight,i,"clientHeight")}}return{width:t,height:n,maxWidth:r||Yp,maxHeight:s||Yp}}const $o=e=>Math.round(e*10)/10;function Jne(e,t,n,r){const s=ag(e),i=nl(s,"margin"),o=Jp(s.maxWidth,e,"clientWidth")||Yp,a=Jp(s.maxHeight,e,"clientHeight")||Yp,l=Qne(e,t,n);let{width:u,height:c}=l;if(s.boxSizing==="content-box"){const f=nl(s,"border","width"),h=nl(s,"padding");u-=h.width+f.width,c-=h.height+f.height}return u=Math.max(0,u-i.width),c=Math.max(0,r?u/r:c-i.height),u=$o(Math.min(u,o,l.maxWidth)),c=$o(Math.min(c,a,l.maxHeight)),u&&!c&&(c=$o(u/2)),(t!==void 0||n!==void 0)&&r&&l.height&&c>l.height&&(c=l.height,u=$o(Math.floor(c*r))),{width:u,height:c}}function AE(e,t,n){const r=t||1,s=$o(e.height*r),i=$o(e.width*r);e.height=$o(e.height),e.width=$o(e.width);const o=e.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||o.height!==s||o.width!==i?(e.currentDevicePixelRatio=r,o.height=s,o.width=i,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const Zne=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};yw()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e}();function OE(e,t){const n=Gne(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}const ere=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},tre=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function ou(e,t,n){return e?ere(t,n):tre()}function U2(e,t){let n,r;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function z2(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function sh(e,t,n){return e.options.clip?e[n]:t[n]}function nre(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:sh(n,t,"left"),right:sh(n,t,"right"),top:sh(r,t,"top"),bottom:sh(r,t,"bottom")}:t}function rre(e,t){const n=t._clip;if(n.disabled)return!1;const r=nre(t,e.chartArea);return{left:n.left===!1?0:r.left-(n.left===!0?0:n.left),right:n.right===!1?e.width:r.right+(n.right===!0?0:n.right),top:n.top===!1?0:r.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?e.height:r.bottom+(n.bottom===!0?0:n.bottom)}}/*!
|
|
91
|
+
* Chart.js v4.5.1
|
|
92
|
+
* https://www.chartjs.org
|
|
93
|
+
* (c) 2025 Chart.js Contributors
|
|
94
|
+
* Released under the MIT License
|
|
95
|
+
*/class sre{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,s){const i=n.listeners[s],o=n.duration;i.forEach(a=>a({chart:t,initial:n.initial,numSteps:o,currentStep:Math.min(r-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=T2.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,s)=>{if(!r.running||!r.items.length)return;const i=r.items;let o=i.length-1,a=!1,l;for(;o>=0;--o)l=i[o],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),a=!0):(i[o]=i[i.length-1],i.pop());a&&(s.draw(),this._notify(s,r,t,"progress")),i.length||(r.running=!1,this._notify(s,r,t,"complete"),r.initial=!1),n+=i.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,s)=>Math.max(r,s._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let s=r.length-1;for(;s>=0;--s)r[s].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Oi=new sre;const DE="transparent",ire={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=xE(e||DE),s=r.valid&&xE(t||DE);return s&&s.valid?s.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class ore{constructor(t,n,r,s){const i=n[r];s=rh([t.to,s,i,t.from]);const o=rh([t.from,i,s]);this._active=!0,this._fn=t.fn||ire[t.type||typeof o],this._easing=ud[t.easing]||ud.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const s=this._target[this._prop],i=r-this._start,o=this._duration-i;this._start=r,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=i,this._loop=!!t.loop,this._to=rh([t.to,n,s,t.from]),this._from=rh([t.from,s,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,s=this._prop,i=this._from,o=this._loop,a=this._to;let l;if(this._active=i!==a&&(o||n<r),!this._active){this._target[s]=a,this._notify(!0);return}if(n<0){this._target[s]=i;return}l=n/r%2,l=o&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(i,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let s=0;s<r.length;s++)r[s][n]()}}class H2{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Tt(t))return;const n=Object.keys(Sn.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{const i=t[s];if(!Tt(i))return;const o={};for(const a of n)o[a]=i[a];(Ln(i.properties)&&i.properties||[s]).forEach(a=>{(a===s||!r.has(a))&&r.set(a,o)})})}_animateOptions(t,n){const r=n.options,s=lre(t,r);if(!s)return[];const i=this._createAnimations(s,r);return r.$shared&&are(t.options.$animations,r).then(()=>{t.options=r},()=>{}),i}_createAnimations(t,n){const r=this._properties,s=[],i=t.$animations||(t.$animations={}),o=Object.keys(n),a=Date.now();let l;for(l=o.length-1;l>=0;--l){const u=o[l];if(u.charAt(0)==="$")continue;if(u==="options"){s.push(...this._animateOptions(t,n));continue}const c=n[u];let d=i[u];const f=r.get(u);if(d)if(f&&d.active()){d.update(f,c,a);continue}else d.cancel();if(!f||!f.duration){t[u]=c;continue}i[u]=d=new ore(f,t,u,c),s.push(d)}return s}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return Oi.add(this._chart,r),!0}}function are(e,t){const n=[],r=Object.keys(t);for(let s=0;s<r.length;s++){const i=e[r[s]];i&&i.active()&&n.push(i.wait())}return Promise.all(n)}function lre(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function ME(e,t){const n=e&&e.options||{},r=n.reverse,s=n.min===void 0?t:0,i=n.max===void 0?t:0;return{start:r?i:s,end:r?s:i}}function ure(e,t,n){if(n===!1)return!1;const r=ME(e,n),s=ME(t,n);return{top:s.end,right:r.end,bottom:s.start,left:r.start}}function cre(e){let t,n,r,s;return Tt(e)?(t=e.top,n=e.right,r=e.bottom,s=e.left):t=n=r=s=e,{top:t,right:n,bottom:r,left:s,disabled:e===!1}}function j2(e,t){const n=[],r=e._getSortedDatasetMetas(t);let s,i;for(s=0,i=r.length;s<i;++s)n.push(r[s].index);return n}function LE(e,t,n,r={}){const s=e.keys,i=r.mode==="single";let o,a,l,u;if(t===null)return;let c=!1;for(o=0,a=s.length;o<a;++o){if(l=+s[o],l===n){if(c=!0,r.all)continue;break}u=e.values[l],Ss(u)&&(i||t===0||Wo(t)===Wo(u))&&(t+=u)}return!c&&!r.all?0:t}function dre(e,t){const{iScale:n,vScale:r}=t,s=n.axis==="x"?"x":"y",i=r.axis==="x"?"x":"y",o=Object.keys(e),a=new Array(o.length);let l,u,c;for(l=0,u=o.length;l<u;++l)c=o[l],a[l]={[s]:c,[i]:e[c]};return a}function Ev(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function fre(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function hre(e){const{min:t,max:n,minDefined:r,maxDefined:s}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:s?n:Number.POSITIVE_INFINITY}}function pre(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function FE(e,t,n,r){for(const s of t.getMatchingVisibleMetas(r).reverse()){const i=e[s.index];if(n&&i>0||!n&&i<0)return s.index}return null}function $E(e,t){const{chart:n,_cachedMeta:r}=e,s=n._stacks||(n._stacks={}),{iScale:i,vScale:o,index:a}=r,l=i.axis,u=o.axis,c=fre(i,o,r),d=t.length;let f;for(let h=0;h<d;++h){const g=t[h],{[l]:m,[u]:y}=g,w=g._stacks||(g._stacks={});f=w[u]=pre(s,c,m),f[a]=y,f._top=FE(f,o,!0,r.type),f._bottom=FE(f,o,!1,r.type);const b=f._visualValues||(f._visualValues={});b[a]=y}}function Cv(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function mre(e,t){return gc(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function gre(e,t,n){return gc(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function Ac(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const s of t){const i=s._stacks;if(!i||i[r]===void 0||i[r][n]===void 0)return;delete i[r][n],i[r]._visualValues!==void 0&&i[r]._visualValues[n]!==void 0&&delete i[r]._visualValues[n]}}}const Tv=e=>e==="reset"||e==="none",NE=(e,t)=>t?e:Object.assign({},e),vre=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:j2(n,!0),values:null};class dd{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Ev(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Ac(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),s=(d,f,h,g)=>d==="x"?f:d==="r"?g:h,i=n.xAxisID=Rt(r.xAxisID,Cv(t,"x")),o=n.yAxisID=Rt(r.yAxisID,Cv(t,"y")),a=n.rAxisID=Rt(r.rAxisID,Cv(t,"r")),l=n.indexAxis,u=n.iAxisID=s(l,i,o,a),c=n.vAxisID=s(l,o,i,a);n.xScale=this.getScaleForId(i),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(u),n.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&SE(this._data,this),t._stacked&&Ac(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(Tt(n)){const s=this._cachedMeta;this._data=dre(n,s)}else if(r!==n){if(r){SE(r,this);const s=this._cachedMeta;Ac(s),s._parsed=[]}n&&Object.isExtensible(n)&&yne(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let s=!1;this._dataCheck();const i=n._stacked;n._stacked=Ev(n.vScale,n),n.stack!==r.stack&&(s=!0,Ac(n),n.stack=r.stack),this._resyncElements(t),(s||i!==n._stacked)&&($E(this,n._parsed),n._stacked=Ev(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:s}=this,{iScale:i,_stacked:o}=r,a=i.axis;let l=t===0&&n===s.length?!0:r._sorted,u=t>0&&r._parsed[t-1],c,d,f;if(this._parsing===!1)r._parsed=s,r._sorted=!0,f=s;else{Ln(s[t])?f=this.parseArrayData(r,s,t,n):Tt(s[t])?f=this.parseObjectData(r,s,t,n):f=this.parsePrimitiveData(r,s,t,n);const h=()=>d[a]===null||u&&d[a]<u[a];for(c=0;c<n;++c)r._parsed[c+t]=d=f[c],l&&(h()&&(l=!1),u=d);r._sorted=l}o&&$E(this,f)}parsePrimitiveData(t,n,r,s){const{iScale:i,vScale:o}=t,a=i.axis,l=o.axis,u=i.getLabels(),c=i===o,d=new Array(s);let f,h,g;for(f=0,h=s;f<h;++f)g=f+r,d[f]={[a]:c||i.parse(u[g],g),[l]:o.parse(n[g],g)};return d}parseArrayData(t,n,r,s){const{xScale:i,yScale:o}=t,a=new Array(s);let l,u,c,d;for(l=0,u=s;l<u;++l)c=l+r,d=n[c],a[l]={x:i.parse(d[0],c),y:o.parse(d[1],c)};return a}parseObjectData(t,n,r,s){const{xScale:i,yScale:o}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,u=new Array(s);let c,d,f,h;for(c=0,d=s;c<d;++c)f=c+r,h=n[f],u[c]={x:i.parse(zu(h,a),f),y:o.parse(zu(h,l),f)};return u}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){const s=this.chart,i=this._cachedMeta,o=n[t.axis],a={keys:j2(s,!0),values:n._stacks[t.axis]._visualValues};return LE(a,o,i.index,{mode:r})}updateRangeFromParsed(t,n,r,s){const i=r[n.axis];let o=i===null?NaN:i;const a=s&&r._stacks[n.axis];s&&a&&(s.values=a,o=LE(s,i,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,n){const r=this._cachedMeta,s=r._parsed,i=r._sorted&&t===r.iScale,o=s.length,a=this._getOtherScale(t),l=vre(n,r,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:d}=hre(a);let f,h;function g(){h=s[f];const m=h[a.axis];return!Ss(h[t.axis])||c>m||d<m}for(f=0;f<o&&!(!g()&&(this.updateRangeFromParsed(u,t,h,l),i));++f);if(i){for(f=o-1;f>=0;--f)if(!g()){this.updateRangeFromParsed(u,t,h,l);break}}return u}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let s,i,o;for(s=0,i=n.length;s<i;++s)o=n[s][t.axis],Ss(o)&&r.push(o);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,r=n.iScale,s=n.vScale,i=this.getParsed(t);return{label:r?""+r.getLabelForValue(i[r.axis]):"",value:s?""+s.getLabelForValue(i[s.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=cre(Rt(this.options.clip,ure(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,r=this._cachedMeta,s=r.data||[],i=n.chartArea,o=[],a=this._drawStart||0,l=this._drawCount||s.length-a,u=this.options.drawActiveElementsOnTop;let c;for(r.dataset&&r.dataset.draw(t,i,a,l),c=a;c<a+l;++c){const d=s[c];d.hidden||(d.active&&u?o.push(d):d.draw(t,i))}for(c=0;c<o.length;++c)o[c].draw(t,i)}getStyle(t,n){const r=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,n,r){const s=this.getDataset();let i;if(t>=0&&t<this._cachedMeta.data.length){const o=this._cachedMeta.data[t];i=o.$context||(o.$context=gre(this.getContext(),t,o)),i.parsed=this.getParsed(t),i.raw=s.data[t],i.index=i.dataIndex=t}else i=this.$context||(this.$context=mre(this.chart.getContext(),this.index)),i.dataset=s,i.index=i.datasetIndex=this.index;return i.active=!!n,i.mode=r,i}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",r){const s=n==="active",i=this._cachedDataOpts,o=t+"-"+n,a=i[o],l=this.enableOptionSharing&&zd(r);if(a)return NE(a,l);const u=this.chart.config,c=u.datasetElementScopeKeys(this._type,t),d=s?[`${t}Hover`,"hover",t,""]:[t,""],f=u.getOptionScopes(this.getDataset(),c),h=Object.keys(Sn.elements[t]),g=()=>this.getContext(r,s,n),m=u.resolveNamedOptions(f,h,g,d);return m.$shared&&(m.$shared=l,i[o]=Object.freeze(NE(m,l))),m}_resolveAnimations(t,n,r){const s=this.chart,i=this._cachedDataOpts,o=`animation-${n}`,a=i[o];if(a)return a;let l;if(s.options.animation!==!1){const c=this.chart.config,d=c.datasetAnimationScopeKeys(this._type,n),f=c.getOptionScopes(this.getDataset(),d);l=c.createResolver(f,this.getContext(t,r,n))}const u=new H2(s,l&&l.animations);return l&&l._cacheable&&(i[o]=Object.freeze(u)),u}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||Tv(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),s=this._sharedOptions,i=this.getSharedOptions(r),o=this.includeOptions(n,i)||i!==s;return this.updateSharedOptions(i,n,r),{sharedOptions:i,includeOptions:o}}updateElement(t,n,r,s){Tv(s)?Object.assign(t,r):this._resolveAnimations(n,s).update(t,r)}updateSharedOptions(t,n,r){t&&!Tv(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,s){t.active=s;const i=this.getStyle(n,s);this._resolveAnimations(n,r,s).update(t,{options:!s&&this.getSharedOptions(i)||i})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[a,l,u]of this._syncList)this[a](l,u);this._syncList=[];const s=r.length,i=n.length,o=Math.min(i,s);o&&this.parse(0,o),i>s?this._insertElements(s,i-s,t):i<s&&this._removeElements(i,s-i)}_insertElements(t,n,r=!0){const s=this._cachedMeta,i=s.data,o=t+n;let a;const l=u=>{for(u.length+=n,a=u.length-1;a>=o;a--)u[a]=u[a-n]};for(l(i),a=t;a<o;++a)i[a]=new this.dataElementType;this._parsing&&l(s._parsed),this.parse(t,n),r&&this.updateElements(i,t,n,"reset")}updateElements(t,n,r,s){}_removeElements(t,n){const r=this._cachedMeta;if(this._parsing){const s=r._parsed.splice(t,n);r._stacked&&Ac(r,s)}r.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,r,s]=t;this[n](r,s)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}Se(dd,"defaults",{}),Se(dd,"datasetElementType",null),Se(dd,"dataElementType",null);function yre(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let r=[];for(let s=0,i=n.length;s<i;s++)r=r.concat(n[s].controller.getAllParsedValues(e));e._cache.$bar=C2(r.sort((s,i)=>s-i))}return e._cache.$bar}function bre(e){const t=e.iScale,n=yre(t,e.type);let r=t._length,s,i,o,a;const l=()=>{o===32767||o===-32768||(zd(a)&&(r=Math.min(r,Math.abs(o-a)||r)),a=o)};for(s=0,i=n.length;s<i;++s)o=t.getPixelForValue(n[s]),l();for(a=void 0,s=0,i=t.ticks.length;s<i;++s)o=t.getPixelForTick(s),l();return r}function wre(e,t,n,r){const s=n.barThickness;let i,o;return Ut(s)?(i=t.min*n.categoryPercentage,o=n.barPercentage):(i=s*r,o=1),{chunk:i/r,ratio:o,start:t.pixels[e]-i/2}}function Sre(e,t,n,r){const s=t.pixels,i=s[e];let o=e>0?s[e-1]:null,a=e<s.length-1?s[e+1]:null;const l=n.categoryPercentage;o===null&&(o=i-(a===null?t.end-t.start:a-i)),a===null&&(a=i+i-o);const u=i-(i-Math.min(o,a))/2*l;return{chunk:Math.abs(a-o)/2*l/r,ratio:n.barPercentage,start:u}}function _re(e,t,n,r){const s=n.parse(e[0],r),i=n.parse(e[1],r),o=Math.min(s,i),a=Math.max(s,i);let l=o,u=a;Math.abs(o)>Math.abs(a)&&(l=a,u=o),t[n.axis]=u,t._custom={barStart:l,barEnd:u,start:s,end:i,min:o,max:a}}function W2(e,t,n,r){return Ln(e)?_re(e,t,n,r):t[n.axis]=n.parse(e,r),t}function BE(e,t,n,r){const s=e.iScale,i=e.vScale,o=s.getLabels(),a=s===i,l=[];let u,c,d,f;for(u=n,c=n+r;u<c;++u)f=t[u],d={},d[s.axis]=a||s.parse(o[u],u),l.push(W2(f,d,i,u));return l}function Rv(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function kre(e,t,n){return e!==0?Wo(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function xre(e){let t,n,r,s,i;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.base<e.y,n="bottom",r="top"),t?(s="end",i="start"):(s="start",i="end"),{start:n,end:r,reverse:t,top:s,bottom:i}}function Ere(e,t,n,r){let s=t.borderSkipped;const i={};if(!s){e.borderSkipped=i;return}if(s===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:o,end:a,reverse:l,top:u,bottom:c}=xre(e);s==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?s=u:(n._bottom||0)===r?s=c:(i[VE(c,o,a,l)]=!0,s=u)),i[VE(s,o,a,l)]=!0,e.borderSkipped=i}function VE(e,t,n,r){return r?(e=Cre(e,t,n),e=UE(e,n,t)):e=UE(e,t,n),e}function Cre(e,t,n){return e===t?n:e===n?t:e}function UE(e,t,n){return e==="start"?t:e==="end"?n:e}function Tre(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class Xh extends dd{parsePrimitiveData(t,n,r,s){return BE(t,n,r,s)}parseArrayData(t,n,r,s){return BE(t,n,r,s)}parseObjectData(t,n,r,s){const{iScale:i,vScale:o}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,u=i.axis==="x"?a:l,c=o.axis==="x"?a:l,d=[];let f,h,g,m;for(f=r,h=r+s;f<h;++f)m=n[f],g={},g[i.axis]=i.parse(zu(m,u),f),d.push(W2(zu(m,c),g,o,f));return d}updateRangeFromParsed(t,n,r,s){super.updateRangeFromParsed(t,n,r,s);const i=r._custom;i&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,i.min),t.max=Math.max(t.max,i.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:r,vScale:s}=n,i=this.getParsed(t),o=i._custom,a=Rv(o)?"["+o.start+", "+o.end+"]":""+s.getLabelForValue(i[s.axis]);return{label:""+r.getLabelForValue(i[r.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,r,s){const i=s==="reset",{index:o,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),u=a.isHorizontal(),c=this._getRuler(),{sharedOptions:d,includeOptions:f}=this._getSharedOptions(n,s);for(let h=n;h<n+r;h++){const g=this.getParsed(h),m=i||Ut(g[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(h),y=this._calculateBarIndexPixels(h,c),w=(g._stacks||{})[a.axis],b={horizontal:u,base:m.base,enableBorderRadius:!w||Rv(g._custom)||o===w._top||o===w._bottom,x:u?m.head:y.center,y:u?y.center:m.head,height:u?y.size:Math.abs(m.size),width:u?Math.abs(m.size):y.size};f&&(b.options=d||this.resolveDataElementOptions(h,t[h].active?"active":s));const S=b.options||t[h].options;Ere(b,S,w,o),Tre(b,S,c.ratio),this.updateElement(t[h],h,b,s)}}_getStacks(t,n){const{iScale:r}=this._cachedMeta,s=r.getMatchingVisibleMetas(this._type).filter(c=>c.controller.options.grouped),i=r.options.stacked,o=[],a=this._cachedMeta.controller.getParsed(n),l=a&&a[r.axis],u=c=>{const d=c._parsed.find(h=>h[r.axis]===l),f=d&&d[c.vScale.axis];if(Ut(f)||isNaN(f))return!0};for(const c of s)if(!(n!==void 0&&u(c))&&((i===!1||o.indexOf(c.stack)===-1||i===void 0&&c.stack===void 0)&&o.push(c.stack),c.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(t).filter(r=>t[r].axis===n).shift()}_getAxis(){const t={},n=this.getFirstScaleIdForIndexAxis();for(const r of this.chart.data.datasets)t[Rt(this.chart.options.indexAxis==="x"?r.xAxisID:r.yAxisID,n)]=!0;return Object.keys(t)}_getStackIndex(t,n,r){const s=this._getStacks(t,r),i=n!==void 0?s.indexOf(n):-1;return i===-1?s.length-1:i}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,s=[];let i,o;for(i=0,o=n.data.length;i<o;++i)s.push(r.getPixelForValue(this.getParsed(i)[r.axis],i));const a=t.barThickness;return{min:a||bre(n),pixels:s,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:r,index:s},options:{base:i,minBarLength:o}}=this,a=i||0,l=this.getParsed(t),u=l._custom,c=Rv(u);let d=l[n.axis],f=0,h=r?this.applyStack(n,l,r):d,g,m;h!==d&&(f=h-d,h=d),c&&(d=u.barStart,h=u.barEnd-u.barStart,d!==0&&Wo(d)!==Wo(u.barEnd)&&(f=0),f+=d);const y=!Ut(i)&&!c?i:f;let w=n.getPixelForValue(y);if(this.chart.getDataVisibility(t)?g=n.getPixelForValue(f+h):g=w,m=g-w,Math.abs(m)<o){m=kre(m,n,a)*o,d===a&&(w-=m/2);const b=n.getPixelForDecimal(0),S=n.getPixelForDecimal(1),_=Math.min(b,S),k=Math.max(b,S);w=Math.max(Math.min(w,k),_),g=w+m,r&&!c&&(l._stacks[n.axis]._visualValues[s]=n.getValueForPixel(g)-n.getValueForPixel(w))}if(w===n.getPixelForValue(a)){const b=Wo(m)*n.getLineWidthForValue(a)/2;w+=b,m-=b}return{size:m,base:w,head:g,center:g+m/2}}_calculateBarIndexPixels(t,n){const r=n.scale,s=this.options,i=s.skipNull,o=Rt(s.maxBarThickness,1/0);let a,l;const u=this._getAxisCount();if(n.grouped){const c=i?this._getStackCount(t):n.stackCount,d=s.barThickness==="flex"?Sre(t,n,s,c*u):wre(t,n,s,c*u),f=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,h=this._getAxis().indexOf(Rt(f,this.getFirstScaleIdForIndexAxis())),g=this._getStackIndex(this.index,this._cachedMeta.stack,i?t:void 0)+h;a=d.start+d.chunk*g+d.chunk/2,l=Math.min(o,d.chunk*d.ratio)}else a=r.getPixelForValue(this.getParsed(t)[r.axis],t),l=Math.min(o,n.min*n.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const t=this._cachedMeta,n=t.vScale,r=t.data,s=r.length;let i=0;for(;i<s;++i)this.getParsed(i)[n.axis]!==null&&!r[i].hidden&&r[i].draw(this._ctx)}}Se(Xh,"id","bar"),Se(Xh,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),Se(Xh,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});function ba(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class ww{constructor(t){Se(this,"options");this.options=t||{}}static override(t){Object.assign(ww.prototype,t)}init(){}formats(){return ba()}parse(){return ba()}format(){return ba()}add(){return ba()}diff(){return ba()}startOf(){return ba()}endOf(){return ba()}}var Rre={_date:ww};function Pre(e,t,n,r){const{controller:s,data:i,_sorted:o}=e,a=s._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(a&&t===a.axis&&t!=="r"&&o&&i.length){const u=a._reversePixels?gne:$b;if(r){if(s._sharedOptions){const c=i[0],d=typeof c.getRange=="function"&&c.getRange(t);if(d){const f=u(i,t,n-d),h=u(i,t,n+d);return{lo:f.lo,hi:h.hi}}}}else{const c=u(i,t,n);if(l){const{vScale:d}=s._cachedMeta,{_parsed:f}=e,h=f.slice(0,c.lo+1).reverse().findIndex(m=>!Ut(m[d.axis]));c.lo-=Math.max(0,h);const g=f.slice(c.hi).findIndex(m=>!Ut(m[d.axis]));c.hi+=Math.max(0,g)}return c}}return{lo:0,hi:i.length-1}}function Cf(e,t,n,r,s){const i=e.getSortedVisibleDatasetMetas(),o=n[t];for(let a=0,l=i.length;a<l;++a){const{index:u,data:c}=i[a],{lo:d,hi:f}=Pre(i[a],t,o,s);for(let h=d;h<=f;++h){const g=c[h];g.skip||r(g,u,h)}}}function Ire(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,s){const i=t?Math.abs(r.x-s.x):0,o=n?Math.abs(r.y-s.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(o,2))}}function Pv(e,t,n,r,s){const i=[];return!s&&!e.isPointInArea(t)||Cf(e,n,t,function(a,l,u){!s&&!M2(a,e.chartArea,0)||a.inRange(t.x,t.y,r)&&i.push({element:a,datasetIndex:l,index:u})},!0),i}function Are(e,t,n,r){let s=[];function i(o,a,l){const{startAngle:u,endAngle:c}=o.getProps(["startAngle","endAngle"],r),{angle:d}=fne(o,{x:t.x,y:t.y});pne(d,u,c)&&s.push({element:o,datasetIndex:a,index:l})}return Cf(e,n,t,i),s}function Ore(e,t,n,r,s,i){let o=[];const a=Ire(n);let l=Number.POSITIVE_INFINITY;function u(c,d,f){const h=c.inRange(t.x,t.y,s);if(r&&!h)return;const g=c.getCenterPoint(s);if(!(!!i||e.isPointInArea(g))&&!h)return;const y=a(t,g);y<l?(o=[{element:c,datasetIndex:d,index:f}],l=y):y===l&&o.push({element:c,datasetIndex:d,index:f})}return Cf(e,n,t,u),o}function Iv(e,t,n,r,s,i){return!i&&!e.isPointInArea(t)?[]:n==="r"&&!r?Are(e,t,n,s):Ore(e,t,n,r,s,i)}function zE(e,t,n,r,s){const i=[],o=n==="x"?"inXRange":"inYRange";let a=!1;return Cf(e,n,t,(l,u,c)=>{l[o]&&l[o](t[n],s)&&(i.push({element:l,datasetIndex:u,index:c}),a=a||l.inRange(t.x,t.y,s))}),r&&!a?[]:i}var Dre={evaluateInteractionItems:Cf,modes:{index(e,t,n,r){const s=ka(t,e),i=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?Pv(e,s,i,r,o):Iv(e,s,i,!1,r,o),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(u=>{const c=a[0].index,d=u.data[c];d&&!d.skip&&l.push({element:d,datasetIndex:u.index,index:c})}),l):[]},dataset(e,t,n,r){const s=ka(t,e),i=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?Pv(e,s,i,r,o):Iv(e,s,i,!1,r,o);if(a.length>0){const l=a[0].datasetIndex,u=e.getDatasetMeta(l).data;a=[];for(let c=0;c<u.length;++c)a.push({element:u[c],datasetIndex:l,index:c})}return a},point(e,t,n,r){const s=ka(t,e),i=n.axis||"xy",o=n.includeInvisible||!1;return Pv(e,s,i,r,o)},nearest(e,t,n,r){const s=ka(t,e),i=n.axis||"xy",o=n.includeInvisible||!1;return Iv(e,s,i,n.intersect,r,o)},x(e,t,n,r){const s=ka(t,e);return zE(e,s,"x",n.intersect,r)},y(e,t,n,r){const s=ka(t,e);return zE(e,s,"y",n.intersect,r)}}};const q2=["left","top","right","bottom"];function Oc(e,t){return e.filter(n=>n.pos===t)}function HE(e,t){return e.filter(n=>q2.indexOf(n.pos)===-1&&n.box.axis===t)}function Dc(e,t){return e.sort((n,r)=>{const s=t?r:n,i=t?n:r;return s.weight===i.weight?s.index-i.index:s.weight-i.weight})}function Mre(e){const t=[];let n,r,s,i,o,a;for(n=0,r=(e||[]).length;n<r;++n)s=e[n],{position:i,options:{stack:o,stackWeight:a=1}}=s,t.push({index:n,box:s,pos:i,horizontal:s.isHorizontal(),weight:s.weight,stack:o&&i+o,stackWeight:a});return t}function Lre(e){const t={};for(const n of e){const{stack:r,pos:s,stackWeight:i}=n;if(!r||!q2.includes(s))continue;const o=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=i}return t}function Fre(e,t){const n=Lre(e),{vBoxMaxWidth:r,hBoxMaxHeight:s}=t;let i,o,a;for(i=0,o=e.length;i<o;++i){a=e[i];const{fullSize:l}=a.box,u=n[a.stack],c=u&&a.stackWeight/u.weight;a.horizontal?(a.width=c?c*r:l&&t.availableWidth,a.height=s):(a.width=r,a.height=c?c*s:l&&t.availableHeight)}return n}function $re(e){const t=Mre(e),n=Dc(t.filter(u=>u.box.fullSize),!0),r=Dc(Oc(t,"left"),!0),s=Dc(Oc(t,"right")),i=Dc(Oc(t,"top"),!0),o=Dc(Oc(t,"bottom")),a=HE(t,"x"),l=HE(t,"y");return{fullSize:n,leftAndTop:r.concat(i),rightAndBottom:s.concat(l).concat(o).concat(a),chartArea:Oc(t,"chartArea"),vertical:r.concat(s).concat(l),horizontal:i.concat(o).concat(a)}}function jE(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function G2(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function Nre(e,t,n,r){const{pos:s,box:i}=n,o=e.maxPadding;if(!Tt(s)){n.size&&(e[s]-=n.size);const d=r[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?i.height:i.width),n.size=d.size/d.count,e[s]+=n.size}i.getPadding&&G2(o,i.getPadding());const a=Math.max(0,t.outerWidth-jE(o,e,"left","right")),l=Math.max(0,t.outerHeight-jE(o,e,"top","bottom")),u=a!==e.w,c=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:u,other:c}:{same:c,other:u}}function Bre(e){const t=e.maxPadding;function n(r){const s=Math.max(t[r]-e[r],0);return e[r]+=s,s}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function Vre(e,t){const n=t.maxPadding;function r(s){const i={left:0,top:0,right:0,bottom:0};return s.forEach(o=>{i[o]=Math.max(t[o],n[o])}),i}return r(e?["left","right"]:["top","bottom"])}function Hc(e,t,n,r){const s=[];let i,o,a,l,u,c;for(i=0,o=e.length,u=0;i<o;++i){a=e[i],l=a.box,l.update(a.width||t.w,a.height||t.h,Vre(a.horizontal,t));const{same:d,other:f}=Nre(t,n,a,r);u|=d&&s.length,c=c||f,l.fullSize||s.push(a)}return u&&Hc(s,t,n,r)||c}function ih(e,t,n,r,s){e.top=n,e.left=t,e.right=t+r,e.bottom=n+s,e.width=r,e.height=s}function WE(e,t,n,r){const s=n.padding;let{x:i,y:o}=t;for(const a of e){const l=a.box,u=r[a.stack]||{count:1,placed:0,weight:1},c=a.stackWeight/u.weight||1;if(a.horizontal){const d=t.w*c,f=u.size||l.height;zd(u.start)&&(o=u.start),l.fullSize?ih(l,s.left,o,n.outerWidth-s.right-s.left,f):ih(l,t.left+u.placed,o,d,f),u.start=o,u.placed+=d,o=l.bottom}else{const d=t.h*c,f=u.size||l.width;zd(u.start)&&(i=u.start),l.fullSize?ih(l,i,s.top,f,n.outerHeight-s.bottom-s.top):ih(l,i,t.top+u.placed,f,d),u.start=i,u.placed+=d,i=l.right}}t.x=i,t.y=o}var ps={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;const s=_s(e.options.layout.padding),i=Math.max(t-s.width,0),o=Math.max(n-s.height,0),a=$re(e.boxes),l=a.vertical,u=a.horizontal;Lt(e.boxes,m=>{typeof m.beforeLayout=="function"&&m.beforeLayout()});const c=l.reduce((m,y)=>y.box.options&&y.box.options.display===!1?m:m+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:s,availableWidth:i,availableHeight:o,vBoxMaxWidth:i/2/c,hBoxMaxHeight:o/2}),f=Object.assign({},s);G2(f,_s(r));const h=Object.assign({maxPadding:f,w:i,h:o,x:s.left,y:s.top},s),g=Fre(l.concat(u),d);Hc(a.fullSize,h,d,g),Hc(l,h,d,g),Hc(u,h,d,g)&&Hc(l,h,d,g),Bre(h),WE(a.leftAndTop,h,d,g),h.x+=h.w,h.y+=h.h,WE(a.rightAndBottom,h,d,g),e.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},Lt(a.chartArea,m=>{const y=m.box;Object.assign(y,e.chartArea),y.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class K2{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,s){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,s?Math.floor(n/s):r)}}isAttached(t){return!0}updateConfig(t){}}class Ure extends K2{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Qh="$chartjs",zre={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},qE=e=>e===null||e==="";function Hre(e,t){const n=e.style,r=e.getAttribute("height"),s=e.getAttribute("width");if(e[Qh]={initial:{height:r,width:s,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",qE(s)){const i=OE(e,"width");i!==void 0&&(e.width=i)}if(qE(r))if(e.style.height==="")e.height=e.width/(t||2);else{const i=OE(e,"height");i!==void 0&&(e.height=i)}return e}const Y2=Zne?{passive:!0}:!1;function jre(e,t,n){e&&e.addEventListener(t,n,Y2)}function Wre(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,Y2)}function qre(e,t){const n=zre[e.type]||e.type,{x:r,y:s}=ka(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:s!==void 0?s:null}}function Zp(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function Gre(e,t,n){const r=e.canvas,s=new MutationObserver(i=>{let o=!1;for(const a of i)o=o||Zp(a.addedNodes,r),o=o&&!Zp(a.removedNodes,r);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}function Kre(e,t,n){const r=e.canvas,s=new MutationObserver(i=>{let o=!1;for(const a of i)o=o||Zp(a.removedNodes,r),o=o&&!Zp(a.addedNodes,r);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}const jd=new Map;let GE=0;function X2(){const e=window.devicePixelRatio;e!==GE&&(GE=e,jd.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function Yre(e,t){jd.size||window.addEventListener("resize",X2),jd.set(e,t)}function Xre(e){jd.delete(e),jd.size||window.removeEventListener("resize",X2)}function Qre(e,t,n){const r=e.canvas,s=r&&bw(r);if(!s)return;const i=R2((a,l)=>{const u=s.clientWidth;n(a,l),u<s.clientWidth&&n()},window),o=new ResizeObserver(a=>{const l=a[0],u=l.contentRect.width,c=l.contentRect.height;u===0&&c===0||i(u,c)});return o.observe(s),Yre(e,i),o}function Av(e,t,n){n&&n.disconnect(),t==="resize"&&Xre(e)}function Jre(e,t,n){const r=e.canvas,s=R2(i=>{e.ctx!==null&&n(qre(i,e))},e);return jre(r,t,s),s}class Zre extends K2{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(Hre(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[Qh])return!1;const r=n[Qh].initial;["height","width"].forEach(i=>{const o=r[i];Ut(o)?n.removeAttribute(i):n.setAttribute(i,o)});const s=r.style||{};return Object.keys(s).forEach(i=>{n.style[i]=s[i]}),n.width=n.width,delete n[Qh],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const s=t.$proxies||(t.$proxies={}),o={attach:Gre,detach:Kre,resize:Qre}[n]||Jre;s[n]=o(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),s=r[n];if(!s)return;({attach:Av,detach:Av,resize:Av}[n]||Wre)(t,n,s),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,s){return Jne(t,n,r,s)}isAttached(t){const n=t&&bw(t);return!!(n&&n.isConnected)}}function ese(e){return!yw()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?Ure:Zre}var vh;let vc=(vh=class{constructor(){Se(this,"x");Se(this,"y");Se(this,"active",!1);Se(this,"options");Se(this,"$animations")}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return Xp(this.x)&&Xp(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const s={};return t.forEach(i=>{s[i]=r[i]&&r[i].active()?r[i]._to:this[i]}),s}},Se(vh,"defaults",{}),Se(vh,"defaultRoutes"),vh);function tse(e,t){const n=e.options.ticks,r=nse(e),s=Math.min(n.maxTicksLimit||r,r),i=n.major.enabled?sse(t):[],o=i.length,a=i[0],l=i[o-1],u=[];if(o>s)return ise(t,u,i,o/s),u;const c=rse(i,t,s);if(o>0){let d,f;const h=o>1?Math.round((l-a)/(o-1)):null;for(oh(t,u,c,Ut(h)?0:a-h,a),d=0,f=o-1;d<f;d++)oh(t,u,c,i[d],i[d+1]);return oh(t,u,c,l,Ut(h)?t.length:l+h),u}return oh(t,u,c),u}function nse(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),s=e._maxLength/n;return Math.floor(Math.min(r,s))}function rse(e,t,n){const r=ose(e),s=t.length/n;if(!r)return Math.max(s,1);const i=ane(r);for(let o=0,a=i.length-1;o<a;o++){const l=i[o];if(l>s)return l}return Math.max(s,1)}function sse(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function ise(e,t,n,r){let s=0,i=n[0],o;for(r=Math.ceil(r),o=0;o<e.length;o++)o===i&&(t.push(e[o]),s++,i=n[s*r])}function oh(e,t,n,r,s){const i=Rt(r,0),o=Math.min(Rt(s,e.length),e.length);let a=0,l,u,c;for(n=Math.ceil(n),s&&(l=s-r,n=l/Math.floor(l/n)),c=i;c<0;)a++,c=Math.round(i+a*n);for(u=Math.max(i,0);u<o;u++)u===c&&(t.push(e[u]),a++,c=Math.round(i+a*n))}function ose(e){const t=e.length;let n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}const ase=e=>e==="left"?"right":e==="right"?"left":e,KE=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,YE=(e,t)=>Math.min(t||e,e);function XE(e,t){const n=[],r=e.length/t,s=e.length;let i=0;for(;i<s;i+=r)n.push(e[Math.floor(i)]);return n}function lse(e,t,n){const r=e.ticks.length,s=Math.min(t,r-1),i=e._startPixel,o=e._endPixel,a=1e-6;let l=e.getPixelForTick(s),u;if(!(n&&(r===1?u=Math.max(l-i,o-l):t===0?u=(e.getPixelForTick(1)-l)/2:u=(l-e.getPixelForTick(s-1))/2,l+=s<t?u:-u,l<i-a||l>o+a)))return l}function use(e,t){Lt(e,n=>{const r=n.gc,s=r.length/2;let i;if(s>t){for(i=0;i<s;++i)delete n.data[r[i]];r.splice(0,s)}})}function Mc(e){return e.drawTicks?e.tickLength:0}function QE(e,t){if(!e.display)return 0;const n=ur(e.font,t),r=_s(e.padding);return(Ln(e.text)?e.text.length:1)*n.lineHeight+r.height}function cse(e,t){return gc(e,{scale:t,type:"scale"})}function dse(e,t,n){return gc(e,{tick:n,index:t,type:"tick"})}function fse(e,t,n){let r=fw(e);return(n&&t!=="right"||!n&&t==="right")&&(r=ase(r)),r}function hse(e,t,n,r){const{top:s,left:i,bottom:o,right:a,chart:l}=e,{chartArea:u,scales:c}=l;let d=0,f,h,g;const m=o-s,y=a-i;if(e.isHorizontal()){if(h=nr(r,i,a),Tt(n)){const w=Object.keys(n)[0],b=n[w];g=c[w].getPixelForValue(b)+m-t}else n==="center"?g=(u.bottom+u.top)/2+m-t:g=KE(e,n,t);f=a-i}else{if(Tt(n)){const w=Object.keys(n)[0],b=n[w];h=c[w].getPixelForValue(b)-y+t}else n==="center"?h=(u.left+u.right)/2-y+t:h=KE(e,n,t);g=nr(r,o,s),d=n==="left"?-Ls:Ls}return{titleX:h,titleY:g,maxWidth:f,rotation:d}}class yc extends vc{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:r,_suggestedMax:s}=this;return t=ti(t,Number.POSITIVE_INFINITY),n=ti(n,Number.NEGATIVE_INFINITY),r=ti(r,Number.POSITIVE_INFINITY),s=ti(s,Number.NEGATIVE_INFINITY),{min:ti(t,r),max:ti(n,s),minDefined:Ss(t),maxDefined:Ss(n)}}getMinMax(t){let{min:n,max:r,minDefined:s,maxDefined:i}=this.getUserBounds(),o;if(s&&i)return{min:n,max:r};const a=this.getMatchingVisibleMetas();for(let l=0,u=a.length;l<u;++l)o=a[l].controller.getMinMax(this,t),s||(n=Math.min(n,o.min)),i||(r=Math.max(r,o.max));return n=i&&n>r?r:n,r=s&&n>r?n:r,{min:ti(n,ti(r,n)),max:ti(r,ti(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){en(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:s,grace:i,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=$ne(this,i,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?XE(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=tse(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,t=!t),this._startPixel=n,this._endPixel=r,this._reversePixels=t,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){en(this.options.afterUpdate,[this])}beforeSetDimensions(){en(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){en(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),en(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){en(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let r,s,i;for(r=0,s=t.length;r<s;r++)i=t[r],i.label=en(n.callback,[i.value,r,t],this)}afterTickToLabelConversion(){en(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){en(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=YE(this.ticks.length,t.ticks.maxTicksLimit),s=n.minRotation||0,i=n.maxRotation;let o=s,a,l,u;if(!this._isVisible()||!n.display||s>=i||r<=1||!this.isHorizontal()){this.labelRotation=s;return}const c=this._getLabelSizes(),d=c.widest.width,f=c.highest.height,h=Fs(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/r:h/(r-1),d+6>a&&(a=h/(r-(t.offset?.5:1)),l=this.maxHeight-Mc(t.grid)-n.padding-QE(t.title,this.chart.options.font),u=Math.sqrt(d*d+f*f),o=dne(Math.min(Math.asin(Fs((c.highest.height+6)/a,-1,1)),Math.asin(Fs(l/u,-1,1))-Math.asin(Fs(f/u,-1,1)))),o=Math.max(s,Math.min(i,o))),this.labelRotation=o}afterCalculateLabelRotation(){en(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){en(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:s,grid:i}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const l=QE(s,n.options.font);if(a?(t.width=this.maxWidth,t.height=Mc(i)+l):(t.height=this.maxHeight,t.width=Mc(i)+l),r.display&&this.ticks.length){const{first:u,last:c,widest:d,highest:f}=this._getLabelSizes(),h=r.padding*2,g=Da(this.labelRotation),m=Math.cos(g),y=Math.sin(g);if(a){const w=r.mirror?0:y*d.width+m*f.height;t.height=Math.min(this.maxHeight,t.height+w+h)}else{const w=r.mirror?0:m*d.width+y*f.height;t.width=Math.min(this.maxWidth,t.width+w+h)}this._calculatePadding(u,c,y,m)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,s){const{ticks:{align:i,padding:o},position:a}=this.options,l=this.labelRotation!==0,u=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const c=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,h=0;l?u?(f=s*t.width,h=r*n.height):(f=r*t.height,h=s*n.width):i==="start"?h=n.width:i==="end"?f=t.width:i!=="inner"&&(f=t.width/2,h=n.width/2),this.paddingLeft=Math.max((f-c+o)*this.width/(this.width-c),0),this.paddingRight=Math.max((h-d+o)*this.width/(this.width-d),0)}else{let c=n.height/2,d=t.height/2;i==="start"?(c=0,d=t.height):i==="end"&&(c=n.height,d=0),this.paddingTop=c+o,this.paddingBottom=d+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){en(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n<r;n++)Ut(t[n].label)&&(t.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=XE(r,n)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,r){const{ctx:s,_longestTextCache:i}=this,o=[],a=[],l=Math.floor(n/YE(n,r));let u=0,c=0,d,f,h,g,m,y,w,b,S,_,k;for(d=0;d<n;d+=l){if(g=t[d].label,m=this._resolveTickFontOptions(d),s.font=y=m.string,w=i[y]=i[y]||{data:{},gc:[]},b=m.lineHeight,S=_=0,!Ut(g)&&!Ln(g))S=CE(s,w.data,w.gc,S,g),_=b;else if(Ln(g))for(f=0,h=g.length;f<h;++f)k=g[f],!Ut(k)&&!Ln(k)&&(S=CE(s,w.data,w.gc,S,k),_+=b);o.push(S),a.push(_),u=Math.max(S,u),c=Math.max(_,c)}use(i,n);const T=o.indexOf(u),R=a.indexOf(c),x=I=>({width:o[I]||0,height:a[I]||0});return{first:x(0),last:x(n-1),widest:x(T),highest:x(R),widths:o,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return mne(this._alignToPixels?ya(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const r=n[t];return r.$context||(r.$context=dse(this.getContext(),t,r))}return this.$context||(this.$context=cse(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=Da(this.labelRotation),r=Math.abs(Math.cos(n)),s=Math.abs(Math.sin(n)),i=this._getLabelSizes(),o=t.autoSkipPadding||0,a=i?i.widest.width+o:0,l=i?i.highest.height+o:0;return this.isHorizontal()?l*r>a*s?a/r:l/s:l*s<a*r?l/r:a/s}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,r=this.chart,s=this.options,{grid:i,position:o,border:a}=s,l=i.offset,u=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=Mc(i),h=[],g=a.setContext(this.getContext()),m=g.display?g.width:0,y=m/2,w=function(W){return ya(r,W,m)};let b,S,_,k,T,R,x,I,P,A,L,B;if(o==="top")b=w(this.bottom),R=this.bottom-f,I=b-y,A=w(t.top)+y,B=t.bottom;else if(o==="bottom")b=w(this.top),A=t.top,B=w(t.bottom)-y,R=b+y,I=this.top+f;else if(o==="left")b=w(this.right),T=this.right-f,x=b-y,P=w(t.left)+y,L=t.right;else if(o==="right")b=w(this.left),P=t.left,L=w(t.right)-y,T=b+y,x=this.left+f;else if(n==="x"){if(o==="center")b=w((t.top+t.bottom)/2+.5);else if(Tt(o)){const W=Object.keys(o)[0],X=o[W];b=w(this.chart.scales[W].getPixelForValue(X))}A=t.top,B=t.bottom,R=b+y,I=R+f}else if(n==="y"){if(o==="center")b=w((t.left+t.right)/2);else if(Tt(o)){const W=Object.keys(o)[0],X=o[W];b=w(this.chart.scales[W].getPixelForValue(X))}T=b-y,x=T-f,P=t.left,L=t.right}const O=Rt(s.ticks.maxTicksLimit,d),F=Math.max(1,Math.ceil(d/O));for(S=0;S<d;S+=F){const W=this.getContext(S),X=i.setContext(W),V=a.setContext(W),z=X.lineWidth,M=X.color,re=V.dash||[],H=V.dashOffset,j=X.tickWidth,pe=X.tickColor,J=X.tickBorderDash||[],we=X.tickBorderDashOffset;_=lse(this,S,l),_!==void 0&&(k=ya(r,_,z),u?T=x=P=L=k:R=I=A=B=k,h.push({tx1:T,ty1:R,tx2:x,ty2:I,x1:P,y1:A,x2:L,y2:B,width:z,color:M,borderDash:re,borderDashOffset:H,tickWidth:j,tickColor:pe,tickBorderDash:J,tickBorderDashOffset:we}))}return this._ticksLength=d,this._borderValue=b,h}_computeLabelItems(t){const n=this.axis,r=this.options,{position:s,ticks:i}=r,o=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:u,padding:c,mirror:d}=i,f=Mc(r.grid),h=f+c,g=d?-c:h,m=-Da(this.labelRotation),y=[];let w,b,S,_,k,T,R,x,I,P,A,L,B="middle";if(s==="top")T=this.bottom-g,R=this._getXAxisLabelAlignment();else if(s==="bottom")T=this.top+g,R=this._getXAxisLabelAlignment();else if(s==="left"){const F=this._getYAxisLabelAlignment(f);R=F.textAlign,k=F.x}else if(s==="right"){const F=this._getYAxisLabelAlignment(f);R=F.textAlign,k=F.x}else if(n==="x"){if(s==="center")T=(t.top+t.bottom)/2+h;else if(Tt(s)){const F=Object.keys(s)[0],W=s[F];T=this.chart.scales[F].getPixelForValue(W)+h}R=this._getXAxisLabelAlignment()}else if(n==="y"){if(s==="center")k=(t.left+t.right)/2-h;else if(Tt(s)){const F=Object.keys(s)[0],W=s[F];k=this.chart.scales[F].getPixelForValue(W)}R=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?B="top":l==="end"&&(B="bottom"));const O=this._getLabelSizes();for(w=0,b=a.length;w<b;++w){S=a[w],_=S.label;const F=i.setContext(this.getContext(w));x=this.getPixelForTick(w)+i.labelOffset,I=this._resolveTickFontOptions(w),P=I.lineHeight,A=Ln(_)?_.length:1;const W=A/2,X=F.color,V=F.textStrokeColor,z=F.textStrokeWidth;let M=R;o?(k=x,R==="inner"&&(w===b-1?M=this.options.reverse?"left":"right":w===0?M=this.options.reverse?"right":"left":M="center"),s==="top"?u==="near"||m!==0?L=-A*P+P/2:u==="center"?L=-O.highest.height/2-W*P+P:L=-O.highest.height+P/2:u==="near"||m!==0?L=P/2:u==="center"?L=O.highest.height/2-W*P:L=O.highest.height-A*P,d&&(L*=-1),m!==0&&!F.showLabelBackdrop&&(k+=P/2*Math.sin(m))):(T=x,L=(1-A)*P/2);let re;if(F.showLabelBackdrop){const H=_s(F.backdropPadding),j=O.heights[w],pe=O.widths[w];let J=L-H.top,we=0-H.left;switch(B){case"middle":J-=j/2;break;case"bottom":J-=j;break}switch(R){case"center":we-=pe/2;break;case"right":we-=pe;break;case"inner":w===b-1?we-=pe:w>0&&(we-=pe/2);break}re={left:we,top:J,width:pe+H.width,height:j+H.height,color:F.backdropColor}}y.push({label:_,font:I,textOffset:L,options:{rotation:m,color:X,strokeColor:V,strokeWidth:z,textAlign:M,textBaseline:B,translation:[k,T],backdrop:re}})}return y}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Da(this.labelRotation))return t==="top"?"left":"right";let s="center";return n.align==="start"?s="left":n.align==="end"?s="right":n.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:r,mirror:s,padding:i}}=this.options,o=this._getLabelSizes(),a=t+i,l=o.widest.width;let u,c;return n==="left"?s?(c=this.right+i,r==="near"?u="left":r==="center"?(u="center",c+=l/2):(u="right",c+=l)):(c=this.right-a,r==="near"?u="right":r==="center"?(u="center",c-=l/2):(u="left",c=this.left)):n==="right"?s?(c=this.left+i,r==="near"?u="right":r==="center"?(u="center",c-=l/2):(u="left",c-=l)):(c=this.left+a,r==="near"?u="left":r==="center"?(u="center",c+=l/2):(u="right",c=this.right)):u="right",{textAlign:u,x:c}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:r,top:s,width:i,height:o}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,s,i,o),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const s=this.ticks.findIndex(i=>i.value===t);return s>=0?n.setContext(this.getContext(s)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let i,o;const a=(l,u,c)=>{!c.width||!c.color||(r.save(),r.lineWidth=c.width,r.strokeStyle=c.color,r.setLineDash(c.borderDash||[]),r.lineDashOffset=c.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(u.x,u.y),r.stroke(),r.restore())};if(n.display)for(i=0,o=s.length;i<o;++i){const l=s[i];n.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:r,grid:s}}=this,i=r.setContext(this.getContext()),o=r.display?i.width:0;if(!o)return;const a=s.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let u,c,d,f;this.isHorizontal()?(u=ya(t,this.left,o)-o/2,c=ya(t,this.right,a)+a/2,d=f=l):(d=ya(t,this.top,o)-o/2,f=ya(t,this.bottom,a)+a/2,u=c=l),n.save(),n.lineWidth=i.width,n.strokeStyle=i.color,n.beginPath(),n.moveTo(u,d),n.lineTo(c,f),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,s=this._computeLabelArea();s&&hw(r,s);const i=this.getLabelItems(t);for(const o of i){const a=o.options,l=o.font,u=o.label,c=o.textOffset;Hd(r,u,0,c,l,a)}s&&pw(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:s}}=this;if(!r.display)return;const i=ur(r.font),o=_s(r.padding),a=r.align;let l=i.lineHeight/2;n==="bottom"||n==="center"||Tt(n)?(l+=o.bottom,Ln(r.text)&&(l+=i.lineHeight*(r.text.length-1))):l+=o.top;const{titleX:u,titleY:c,maxWidth:d,rotation:f}=hse(this,l,n,a);Hd(t,r.text,0,0,i,{color:r.color,maxWidth:d,rotation:f,textAlign:fse(a,n,s),textBaseline:"middle",translation:[u,c]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,r=Rt(t.grid&&t.grid.z,-1),s=Rt(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==yc.prototype.draw?[{z:n,draw:i=>{this.draw(i)}}]:[{z:r,draw:i=>{this.drawBackground(),this.drawGrid(i),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:n,draw:i=>{this.drawLabels(i)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",s=[];let i,o;for(i=0,o=n.length;i<o;++i){const a=n[i];a[r]===this.id&&(!t||a.type===t)&&s.push(a)}return s}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return ur(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class ah{constructor(t,n,r){this.type=t,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let r;gse(n)&&(r=this.register(n));const s=this.items,i=t.id,o=this.scope+"."+i;if(!i)throw new Error("class does not have id: "+t);return i in s||(s[i]=t,pse(t,o,r),this.override&&Sn.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const n=this.items,r=t.id,s=this.scope;r in n&&delete n[r],s&&r in Sn[s]&&(delete Sn[s][r],this.override&&delete gl[r])}}function pse(e,t,n){const r=Ud(Object.create(null),[n?Sn.get(n):{},Sn.get(t),e.defaults]);Sn.set(t,r),e.defaultRoutes&&mse(t,e.defaultRoutes),e.descriptors&&Sn.describe(t,e.descriptors)}function mse(e,t){Object.keys(t).forEach(n=>{const r=n.split("."),s=r.pop(),i=[e].concat(r).join("."),o=t[n].split("."),a=o.pop(),l=o.join(".");Sn.route(i,s,l,a)})}function gse(e){return"id"in e&&"defaults"in e}class vse{constructor(){this.controllers=new ah(dd,"datasets",!0),this.elements=new ah(vc,"elements"),this.plugins=new ah(Object,"plugins"),this.scales=new ah(yc,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(s=>{const i=r||this._getRegistryForType(s);r||i.isForType(s)||i===this.plugins&&s.id?this._exec(t,i,s):Lt(s,o=>{const a=r||this._getRegistryForType(o);this._exec(t,a,o)})})}_exec(t,n,r){const s=cw(t);en(r["before"+s],[],r),n[t](r),en(r["after"+s],[],r)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(t))return r}return this.plugins}_get(t,n,r){const s=n.get(t);if(s===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return s}}var oi=new vse;class yse{constructor(){this._init=void 0}notify(t,n,r,s){if(n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),this._init===void 0)return;const i=s?this._descriptors(t).filter(s):this._descriptors(t),o=this._notify(i,t,n,r);return n==="afterDestroy"&&(this._notify(i,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),o}_notify(t,n,r,s){s=s||{};for(const i of t){const o=i.plugin,a=o[r],l=[n,s,i.options];if(en(a,l,o)===!1&&s.cancelable)return!1}return!0}invalidate(){Ut(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const r=t&&t.config,s=Rt(r.options&&r.options.plugins,{}),i=bse(r);return s===!1&&!n?[]:Sse(t,i,s,n)}_notifyStateChanges(t){const n=this._oldCache||[],r=this._cache,s=(i,o)=>i.filter(a=>!o.some(l=>a.plugin.id===l.plugin.id));this._notify(s(n,r),t,"stop"),this._notify(s(r,n),t,"start")}}function bse(e){const t={},n=[],r=Object.keys(oi.plugins.items);for(let i=0;i<r.length;i++)n.push(oi.getPlugin(r[i]));const s=e.plugins||[];for(let i=0;i<s.length;i++){const o=s[i];n.indexOf(o)===-1&&(n.push(o),t[o.id]=!0)}return{plugins:n,localIds:t}}function wse(e,t){return!t&&e===!1?null:e===!0?{}:e}function Sse(e,{plugins:t,localIds:n},r,s){const i=[],o=e.getContext();for(const a of t){const l=a.id,u=wse(r[l],s);u!==null&&i.push({plugin:a,options:_se(e.config,{plugin:a,local:n[l]},u,o)})}return i}function _se(e,{plugin:t,local:n},r,s){const i=e.pluginScopeKeys(t),o=e.getOptionScopes(r,i);return n&&t.defaults&&o.push(t.defaults),e.createResolver(o,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Bb(e,t){const n=Sn.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function kse(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function xse(e,t){return e===t?"_index_":"_value_"}function JE(e){if(e==="x"||e==="y"||e==="r")return e}function Ese(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Vb(e,...t){if(JE(e))return e;for(const n of t){const r=n.axis||Ese(n.position)||e.length>1&&JE(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function ZE(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function Cse(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return ZE(e,"x",n[0])||ZE(e,"y",n[0])}return{}}function Tse(e,t){const n=gl[e.type]||{scales:{}},r=t.scales||{},s=Bb(e.type,t),i=Object.create(null);return Object.keys(r).forEach(o=>{const a=r[o];if(!Tt(a))return console.error(`Invalid scale configuration for scale: ${o}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const l=Vb(o,a,Cse(o,e),Sn.scales[a.type]),u=xse(l,s),c=n.scales||{};i[o]=ld(Object.create(null),[{axis:l},a,c[l],c[u]])}),e.data.datasets.forEach(o=>{const a=o.type||e.type,l=o.indexAxis||Bb(a,t),c=(gl[a]||{}).scales||{};Object.keys(c).forEach(d=>{const f=kse(d,l),h=o[f+"AxisID"]||f;i[h]=i[h]||Object.create(null),ld(i[h],[{axis:f},r[h],c[d]])})}),Object.keys(i).forEach(o=>{const a=i[o];ld(a,[Sn.scales[a.type],Sn.scale])}),i}function Q2(e){const t=e.options||(e.options={});t.plugins=Rt(t.plugins,{}),t.scales=Tse(e,t)}function J2(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function Rse(e){return e=e||{},e.data=J2(e.data),Q2(e),e}const eC=new Map,Z2=new Set;function lh(e,t){let n=eC.get(e);return n||(n=t(),eC.set(e,n),Z2.add(n)),n}const Lc=(e,t,n)=>{const r=zu(t,n);r!==void 0&&e.add(r)};class Pse{constructor(t){this._config=Rse(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=J2(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Q2(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return lh(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return lh(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return lh(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return lh(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let s=r.get(t);return(!s||n)&&(s=new Map,r.set(t,s)),s}getOptionScopes(t,n,r){const{options:s,type:i}=this,o=this._cachedScopes(t,r),a=o.get(n);if(a)return a;const l=new Set;n.forEach(c=>{t&&(l.add(t),c.forEach(d=>Lc(l,t,d))),c.forEach(d=>Lc(l,s,d)),c.forEach(d=>Lc(l,gl[i]||{},d)),c.forEach(d=>Lc(l,Sn,d)),c.forEach(d=>Lc(l,Nb,d))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),Z2.has(n)&&o.set(n,u),u}chartOptionScopes(){const{options:t,type:n}=this;return[t,gl[n]||{},Sn.datasets[n]||{},{type:n},Sn,Nb]}resolveNamedOptions(t,n,r,s=[""]){const i={$shared:!0},{resolver:o,subPrefixes:a}=tC(this._resolverCache,t,s);let l=o;if(Ase(o,n)){i.$shared=!1,r=ta(r)?r():r;const u=this.createResolver(t,r,a);l=Hu(o,r,u)}for(const u of n)i[u]=l[u];return i}createResolver(t,n,r=[""],s){const{resolver:i}=tC(this._resolverCache,t,r);return Tt(n)?Hu(i,n,void 0,s):i}}function tC(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const s=n.join();let i=r.get(s);return i||(i={resolver:mw(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(s,i)),i}const Ise=e=>Tt(e)&&Object.getOwnPropertyNames(e).some(t=>ta(e[t]));function Ase(e,t){const{isScriptable:n,isIndexable:r}=$2(e);for(const s of t){const i=n(s),o=r(s),a=(o||i)&&e[s];if(i&&(ta(a)||Ise(a))||o&&Ln(a))return!0}return!1}var Ose="4.5.1";const Dse=["top","bottom","left","right","chartArea"];function nC(e,t){return e==="top"||e==="bottom"||Dse.indexOf(e)===-1&&t==="x"}function rC(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function sC(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),en(n&&n.onComplete,[e],t)}function Mse(e){const t=e.chart,n=t.options.animation;en(n&&n.onProgress,[e],t)}function eL(e){return yw()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Jh={},iC=e=>{const t=eL(e);return Object.values(Jh).filter(n=>n.canvas===t).pop()};function Lse(e,t,n){const r=Object.keys(e);for(const s of r){const i=+s;if(i>=t){const o=e[s];delete e[s],(n>0||i>t)&&(e[i+n]=o)}}}function Fse(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}var go;let lg=(go=class{static register(...t){oi.add(...t),oC()}static unregister(...t){oi.remove(...t),oC()}constructor(t,n){const r=this.config=new Pse(n),s=eL(t),i=iC(s);if(i)throw new Error("Canvas is already in use. Chart with ID '"+i.id+"' must be destroyed before the canvas with ID '"+i.canvas.id+"' can be reused.");const o=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||ese(s)),this.platform.updateConfig(r);const a=this.platform.acquireContext(s,o.aspectRatio),l=a&&a.canvas,u=l&&l.height,c=l&&l.width;if(this.id=Zte(),this.ctx=a,this.canvas=l,this.width=c,this.height=u,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new yse,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=bne(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],Jh[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Oi.listen(this,"complete",sC),Oi.listen(this,"progress",Mse),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:s,_aspectRatio:i}=this;return Ut(t)?n&&i?i:s?r/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return oi}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():AE(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return TE(this.canvas,this.ctx),this}stop(){return Oi.stop(this),this}resize(t,n){Oi.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,s=this.canvas,i=r.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,t,n,i),a=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,AE(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),en(r.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Lt(n,(r,s)=>{r.id=s})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,s=Object.keys(r).reduce((o,a)=>(o[a]=!1,o),{});let i=[];n&&(i=i.concat(Object.keys(n).map(o=>{const a=n[o],l=Vb(o,a),u=l==="r",c=l==="x";return{options:a,dposition:u?"chartArea":c?"bottom":"left",dtype:u?"radialLinear":c?"category":"linear"}}))),Lt(i,o=>{const a=o.options,l=a.id,u=Vb(l,a),c=Rt(a.type,o.dtype);(a.position===void 0||nC(a.position,u)!==nC(o.dposition))&&(a.position=o.dposition),s[l]=!0;let d=null;if(l in r&&r[l].type===c)d=r[l];else{const f=oi.getScale(c);d=new f({id:l,type:c,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(a,t)}),Lt(s,(o,a)=>{o||delete r[a]}),Lt(r,o=>{ps.configure(this,o,o.options),ps.addBox(this,o)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((s,i)=>s.index-i.index),r>n){for(let s=n;s<r;++s)this._destroyDatasetMeta(s);t.splice(n,r-n)}this._sortedMetasets=t.slice(0).sort(rC("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,s)=>{n.filter(i=>i===r._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,s;for(this._removeUnreferencedMetasets(),r=0,s=n.length;r<s;r++){const i=n[r];let o=this.getDatasetMeta(r);const a=i.type||this.config.type;if(o.type&&o.type!==a&&(this._destroyDatasetMeta(r),o=this.getDatasetMeta(r)),o.type=a,o.indexAxis=i.indexAxis||Bb(a,this.options),o.order=i.order||0,o.index=r,o.label=""+i.label,o.visible=this.isDatasetVisible(r),o.controller)o.controller.updateIndex(r),o.controller.linkScales();else{const l=oi.getController(a),{datasetElementType:u,dataElementType:c}=Sn.datasets[a];Object.assign(l,{dataElementType:oi.getElement(c),datasetElementType:u&&oi.getElement(u)}),o.controller=new l(this,r),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){Lt(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const i=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let u=0,c=this.data.datasets.length;u<c;u++){const{controller:d}=this.getDatasetMeta(u),f=!s&&i.indexOf(d)===-1;d.buildOrUpdateElements(f),o=Math.max(+d.getMaxOverflow(),o)}o=this._minPadding=r.layout.autoPadding?o:0,this._updateLayout(o),s||Lt(i,u=>{u.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(rC("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){Lt(this.scales,t=>{ps.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!vE(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:s,count:i}of n){const o=r==="_removeElements"?-i:i;Lse(t,s,o)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=i=>new Set(t.filter(o=>o[0]===i).map((o,a)=>a+","+o.splice(1).join(","))),s=r(0);for(let i=1;i<n;i++)if(!vE(s,r(i)))return;return Array.from(s).map(i=>i.split(",")).map(i=>({method:i[1],start:+i[2],count:+i[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;ps.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Lt(this.boxes,s=>{r&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,i)=>{s._idx=i}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,ta(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const r=this.getDatasetMeta(t),s={meta:r,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(r.controller._update(n),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Oi.has(this)?this.attached&&!Oi.running(this)&&Oi.start(this):(this.draw(),sC({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:s}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,s)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,r=[];let s,i;for(s=0,i=n.length;s<i;++s){const o=n[s];(!t||o.visible)&&r.push(o)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r={meta:t,index:t.index,cancelable:!0},s=rre(this,t);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(s&&hw(n,s),t.controller.draw(),s&&pw(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return M2(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,s){const i=Dre.modes[n];return typeof i=="function"?i(this,t,r,s):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let s=r.filter(i=>i&&i._dataset===n).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(s)),s}getContext(){return this.$context||(this.$context=gc(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const s=r?"show":"hide",i=this.getDatasetMeta(t),o=i.controller._resolveAnimations(void 0,s);zd(n)?(i.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),o.update(i,{visible:r}),this.update(a=>a.datasetIndex===t?s:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),Oi.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),TE(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Jh[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,r=(i,o)=>{n.addEventListener(this,i,o),t[i]=o},s=(i,o,a)=>{i.offsetX=o,i.offsetY=a,this._eventHandler(i)};Lt(this.options.events,i=>r(i,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,u)=>{n.addEventListener(this,l,u),t[l]=u},s=(l,u)=>{t[l]&&(n.removeEventListener(this,l,u),delete t[l])},i=(l,u)=>{this.canvas&&this.resize(l,u)};let o;const a=()=>{s("attach",a),this.attached=!0,this.resize(),r("resize",i),r("detach",o)};o=()=>{this.attached=!1,s("resize",i),this._stop(),this._resize(0,0),r("attach",a)},n.isAttached(this.canvas)?a():o()}unbindEvents(){Lt(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Lt(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const s=r?"set":"remove";let i,o,a,l;for(n==="dataset"&&(i=this.getDatasetMeta(t[0].datasetIndex),i.controller["_"+s+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){o=t[a];const u=o&&this.getDatasetMeta(o.datasetIndex).controller;u&&u[s+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],r=t.map(({datasetIndex:i,index:o})=>{const a=this.getDatasetMeta(i);if(!a)throw new Error("No dataset found at index "+i);return{datasetIndex:i,element:a.data[o],index:o}});!Gp(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const s=this.options.hover,i=(l,u)=>l.filter(c=>!u.some(d=>c.datasetIndex===d.datasetIndex&&c.index===d.index)),o=i(n,t),a=r?t:i(t,n);o.length&&this.updateHoverStyle(o,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},s=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,s)===!1)return;const i=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,s),(i||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:s=[],options:i}=this,o=n,a=this._getActiveElements(t,s,r,o),l=ine(t),u=Fse(t,this._lastEvent,r,l);r&&(this._lastEvent=null,en(i.onHover,[t,a,this],this),l&&en(i.onClick,[t,a,this],this));const c=!Gp(a,s);return(c||n)&&(this._active=a,this._updateHoverStyles(a,s,n)),this._lastEvent=u,c}_getActiveElements(t,n,r,s){if(t.type==="mouseout")return[];if(!r)return n;const i=this.options.hover;return this.getElementsAtEventForMode(t,i.mode,i,s)}},Se(go,"defaults",Sn),Se(go,"instances",Jh),Se(go,"overrides",gl),Se(go,"registry",oi),Se(go,"version",Ose),Se(go,"getChart",iC),go);function oC(){return Lt(lg.instances,e=>e._plugins.invalidate())}function tL(e,t){const{x:n,y:r,base:s,width:i,height:o}=e.getProps(["x","y","base","width","height"],t);let a,l,u,c,d;return e.horizontal?(d=o/2,a=Math.min(n,s),l=Math.max(n,s),u=r-d,c=r+d):(d=i/2,a=n-d,l=n+d,u=Math.min(r,s),c=Math.max(r,s)),{left:a,top:u,right:l,bottom:c}}function No(e,t,n,r){return e?0:Fs(t,n,r)}function $se(e,t,n){const r=e.options.borderWidth,s=e.borderSkipped,i=F2(r);return{t:No(s.top,i.top,0,n),r:No(s.right,i.right,0,t),b:No(s.bottom,i.bottom,0,n),l:No(s.left,i.left,0,t)}}function Nse(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),s=e.options.borderRadius,i=iu(s),o=Math.min(t,n),a=e.borderSkipped,l=r||Tt(s);return{topLeft:No(!l||a.top||a.left,i.topLeft,0,o),topRight:No(!l||a.top||a.right,i.topRight,0,o),bottomLeft:No(!l||a.bottom||a.left,i.bottomLeft,0,o),bottomRight:No(!l||a.bottom||a.right,i.bottomRight,0,o)}}function Bse(e){const t=tL(e),n=t.right-t.left,r=t.bottom-t.top,s=$se(e,n/2,r/2),i=Nse(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:i},inner:{x:t.left+s.l,y:t.top+s.t,w:n-s.l-s.r,h:r-s.t-s.b,radius:{topLeft:Math.max(0,i.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,i.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,i.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,i.bottomRight-Math.max(s.b,s.r))}}}}function Ov(e,t,n,r){const s=t===null,i=n===null,a=e&&!(s&&i)&&tL(e,r);return a&&(s||Ql(t,a.left,a.right))&&(i||Ql(n,a.top,a.bottom))}function Vse(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function Use(e,t){e.rect(t.x,t.y,t.w,t.h)}function Dv(e,t,n={}){const r=e.x!==n.x?-t:0,s=e.y!==n.y?-t:0,i=(e.x+e.w!==n.x+n.w?t:0)-r,o=(e.y+e.h!==n.y+n.h?t:0)-s;return{x:e.x+r,y:e.y+s,w:e.w+i,h:e.h+o,radius:e.radius}}class Zh extends vc{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:n,options:{borderColor:r,backgroundColor:s}}=this,{inner:i,outer:o}=Bse(this),a=Vse(o.radius)?Qp:Use;t.save(),(o.w!==i.w||o.h!==i.h)&&(t.beginPath(),a(t,Dv(o,n,i)),t.clip(),a(t,Dv(i,-n,o)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),a(t,Dv(i,n)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,n,r){return Ov(this,t,n,r)}inXRange(t,n){return Ov(this,t,null,n)}inYRange(t,n){return Ov(this,null,t,n)}getCenterPoint(t){const{x:n,y:r,base:s,horizontal:i}=this.getProps(["x","y","base","horizontal"],t);return{x:i?(n+s)/2:n,y:i?r:(r+s)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}Se(Zh,"id","bar"),Se(Zh,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),Se(Zh,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});const aC=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},zse=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class lC extends vc{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=en(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,s)=>t.sort(r,s,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,s=ur(r.font),i=s.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=aC(r,i);let u,c;n.font=s.string,this.isHorizontal()?(u=this.maxWidth,c=this._fitRows(o,i,a,l)+10):(c=this.maxHeight,u=this._fitCols(o,s,a,l)+10),this.width=Math.min(u,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,s){const{ctx:i,maxWidth:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],u=this.lineWidths=[0],c=s+a;let d=t;i.textAlign="left",i.textBaseline="middle";let f=-1,h=-c;return this.legendItems.forEach((g,m)=>{const y=r+n/2+i.measureText(g.text).width;(m===0||u[u.length-1]+y+2*a>o)&&(d+=c,u[u.length-(m>0?0:1)]=0,h+=c,f++),l[m]={left:0,top:h,row:f,width:y,height:s},u[u.length-1]+=y+a}),d}_fitCols(t,n,r,s){const{ctx:i,maxHeight:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],u=this.columnSizes=[],c=o-t;let d=a,f=0,h=0,g=0,m=0;return this.legendItems.forEach((y,w)=>{const{itemWidth:b,itemHeight:S}=Hse(r,n,i,y,s);w>0&&h+S+2*a>c&&(d+=f+a,u.push({width:f,height:h}),g+=f+a,m++,f=h=0),l[w]={left:g,top:h,col:m,width:b,height:S},f=Math.max(f,b),h+=S+a}),d+=f,u.push({width:f,height:h}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:s},rtl:i}}=this,o=ou(i,this.left,this.width);if(this.isHorizontal()){let a=0,l=nr(r,this.left+s,this.right-this.lineWidths[a]);for(const u of n)a!==u.row&&(a=u.row,l=nr(r,this.left+s,this.right-this.lineWidths[a])),u.top+=this.top+t+s,u.left=o.leftForLtr(o.x(l),u.width),l+=u.width+s}else{let a=0,l=nr(r,this.top+t+s,this.bottom-this.columnSizes[a].height);for(const u of n)u.col!==a&&(a=u.col,l=nr(r,this.top+t+s,this.bottom-this.columnSizes[a].height)),u.top=l,u.left+=this.left+s,u.left=o.leftForLtr(o.x(u.left),u.width),l+=u.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;hw(t,this),this._draw(),pw(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:s}=this,{align:i,labels:o}=t,a=Sn.color,l=ou(t.rtl,this.left,this.width),u=ur(o.font),{padding:c}=o,d=u.size,f=d/2;let h;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=u.string;const{boxWidth:g,boxHeight:m,itemHeight:y}=aC(o,d),w=function(T,R,x){if(isNaN(g)||g<=0||isNaN(m)||m<0)return;s.save();const I=Rt(x.lineWidth,1);if(s.fillStyle=Rt(x.fillStyle,a),s.lineCap=Rt(x.lineCap,"butt"),s.lineDashOffset=Rt(x.lineDashOffset,0),s.lineJoin=Rt(x.lineJoin,"miter"),s.lineWidth=I,s.strokeStyle=Rt(x.strokeStyle,a),s.setLineDash(Rt(x.lineDash,[])),o.usePointStyle){const P={radius:m*Math.SQRT2/2,pointStyle:x.pointStyle,rotation:x.rotation,borderWidth:I},A=l.xPlus(T,g/2),L=R+f;D2(s,P,A,L,o.pointStyleWidth&&g)}else{const P=R+Math.max((d-m)/2,0),A=l.leftForLtr(T,g),L=iu(x.borderRadius);s.beginPath(),Object.values(L).some(B=>B!==0)?Qp(s,{x:A,y:P,w:g,h:m,radius:L}):s.rect(A,P,g,m),s.fill(),I!==0&&s.stroke()}s.restore()},b=function(T,R,x){Hd(s,x.text,T,R+y/2,u,{strikethrough:x.hidden,textAlign:l.textAlign(x.textAlign)})},S=this.isHorizontal(),_=this._computeTitleHeight();S?h={x:nr(i,this.left+c,this.right-r[0]),y:this.top+c+_,line:0}:h={x:this.left+c,y:nr(i,this.top+_+c,this.bottom-n[0].height),line:0},U2(this.ctx,t.textDirection);const k=y+c;this.legendItems.forEach((T,R)=>{s.strokeStyle=T.fontColor,s.fillStyle=T.fontColor;const x=s.measureText(T.text).width,I=l.textAlign(T.textAlign||(T.textAlign=o.textAlign)),P=g+f+x;let A=h.x,L=h.y;l.setWidth(this.width),S?R>0&&A+P+c>this.right&&(L=h.y+=k,h.line++,A=h.x=nr(i,this.left+c,this.right-r[h.line])):R>0&&L+k>this.bottom&&(A=h.x=A+n[h.line].width+c,h.line++,L=h.y=nr(i,this.top+_+c,this.bottom-n[h.line].height));const B=l.x(A);if(w(B,L,T),A=wne(I,A+g+f,S?A+P:this.right,t.rtl),b(l.x(A),L,T),S)h.x+=P+c;else if(typeof T.text!="string"){const O=u.lineHeight;h.y+=nL(T,O)+c}else h.y+=k}),z2(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=ur(n.font),s=_s(n.padding);if(!n.display)return;const i=ou(t.rtl,this.left,this.width),o=this.ctx,a=n.position,l=r.size/2,u=s.top+l;let c,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),c=this.top+u,d=nr(t.align,d,this.right-f);else{const g=this.columnSizes.reduce((m,y)=>Math.max(m,y.height),0);c=u+nr(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}const h=nr(a,d,d+f);o.textAlign=i.textAlign(fw(a)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=r.string,Hd(o,n.text,h,c,r)}_computeTitleHeight(){const t=this.options.title,n=ur(t.font),r=_s(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,s,i;if(Ql(t,this.left,this.right)&&Ql(n,this.top,this.bottom)){for(i=this.legendHitBoxes,r=0;r<i.length;++r)if(s=i[r],Ql(t,s.left,s.left+s.width)&&Ql(n,s.top,s.top+s.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!qse(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const s=this._hoveredItem,i=zse(s,r);s&&!i&&en(n.onLeave,[t,s,this],this),this._hoveredItem=r,r&&!i&&en(n.onHover,[t,r,this],this)}else r&&en(n.onClick,[t,r,this],this)}}function Hse(e,t,n,r,s){const i=jse(r,e,t,n),o=Wse(s,r,t.lineHeight);return{itemWidth:i,itemHeight:o}}function jse(e,t,n,r){let s=e.text;return s&&typeof s!="string"&&(s=s.reduce((i,o)=>i.length>o.length?i:o)),t+n.size/2+r.measureText(s).width}function Wse(e,t,n){let r=e;return typeof t.text!="string"&&(r=nL(t,n)),r}function nL(e,t){const n=e.text?e.text.length:0;return t*n}function qse(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var Gse={id:"legend",_element:lC,start(e,t,n){const r=e.legend=new lC({ctx:e.ctx,options:n,chart:e});ps.configure(e,r,n),ps.addBox(e,r)},stop(e){ps.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;ps.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,s=n.chart;s.isDatasetVisible(r)?(s.hide(r),t.hidden=!0):(s.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:s,color:i,useBorderRadius:o,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const u=l.controller.getStyle(n?0:void 0),c=_s(u.borderWidth);return{text:t[l.index].label,fillStyle:u.backgroundColor,fontColor:i,hidden:!l.visible,lineCap:u.borderCapStyle,lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:u.borderColor,pointStyle:r||u.pointStyle,rotation:u.rotation,textAlign:s||u.textAlign,borderRadius:o&&(a||u.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class rL extends vc{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const s=Ln(r.text)?r.text.length:1;this._padding=_s(r.padding);const i=s*ur(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=i:this.width=i}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:s,right:i,options:o}=this,a=o.align;let l=0,u,c,d;return this.isHorizontal()?(c=nr(a,r,i),d=n+t,u=i-r):(o.position==="left"?(c=r+t,d=nr(a,s,n),l=dr*-.5):(c=i-t,d=nr(a,n,s),l=dr*.5),u=s-n),{titleX:c,titleY:d,maxWidth:u,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=ur(n.font),i=r.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:u}=this._drawArgs(i);Hd(t,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:u,textAlign:fw(n.align),textBaseline:"middle",translation:[o,a]})}}function Kse(e,t){const n=new rL({ctx:e.ctx,options:t,chart:e});ps.configure(e,n,t),ps.addBox(e,n),e.titleBlock=n}var Yse={id:"title",_element:rL,start(e,t,n){Kse(e,n)},stop(e){const t=e.titleBlock;ps.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;ps.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const jc={average(e){if(!e.length)return!1;let t,n,r=new Set,s=0,i=0;for(t=0,n=e.length;t<n;++t){const a=e[t].element;if(a&&a.hasValue()){const l=a.tooltipPosition();r.add(l.x),s+=l.y,++i}}return i===0||r.size===0?!1:{x:[...r].reduce((a,l)=>a+l)/r.size,y:s/i}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,s=Number.POSITIVE_INFINITY,i,o,a;for(i=0,o=e.length;i<o;++i){const l=e[i].element;if(l&&l.hasValue()){const u=l.getCenterPoint(),c=hne(t,u);c<s&&(s=c,a=l)}}if(a){const l=a.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function ri(e,t){return t&&(Ln(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Di(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
96
|
+
`)>-1?e.split(`
|
|
97
|
+
`):e}function Xse(e,t){const{element:n,datasetIndex:r,index:s}=t,i=e.getDatasetMeta(r).controller,{label:o,value:a}=i.getLabelAndValue(s);return{chart:e,label:o,parsed:i.getParsed(s),raw:e.data.datasets[r].data[s],formattedValue:a,dataset:i.getDataset(),dataIndex:s,datasetIndex:r,element:n}}function uC(e,t){const n=e.chart.ctx,{body:r,footer:s,title:i}=e,{boxWidth:o,boxHeight:a}=t,l=ur(t.bodyFont),u=ur(t.titleFont),c=ur(t.footerFont),d=i.length,f=s.length,h=r.length,g=_s(t.padding);let m=g.height,y=0,w=r.reduce((_,k)=>_+k.before.length+k.lines.length+k.after.length,0);if(w+=e.beforeBody.length+e.afterBody.length,d&&(m+=d*u.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),w){const _=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=h*_+(w-h)*l.lineHeight+(w-1)*t.bodySpacing}f&&(m+=t.footerMarginTop+f*c.lineHeight+(f-1)*t.footerSpacing);let b=0;const S=function(_){y=Math.max(y,n.measureText(_).width+b)};return n.save(),n.font=u.string,Lt(e.title,S),n.font=l.string,Lt(e.beforeBody.concat(e.afterBody),S),b=t.displayColors?o+2+t.boxPadding:0,Lt(r,_=>{Lt(_.before,S),Lt(_.lines,S),Lt(_.after,S)}),b=0,n.font=c.string,Lt(e.footer,S),n.restore(),y+=g.width,{width:y,height:m}}function Qse(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function Jse(e,t,n,r){const{x:s,width:i}=r,o=n.caretSize+n.caretPadding;if(e==="left"&&s+i+o>t.width||e==="right"&&s-i-o<0)return!0}function Zse(e,t,n,r){const{x:s,width:i}=n,{width:o,chartArea:{left:a,right:l}}=e;let u="center";return r==="center"?u=s<=(a+l)/2?"left":"right":s<=i/2?u="left":s>=o-i/2&&(u="right"),Jse(u,e,t,n)&&(u="center"),u}function cC(e,t,n){const r=n.yAlign||t.yAlign||Qse(e,n);return{xAlign:n.xAlign||t.xAlign||Zse(e,t,n,r),yAlign:r}}function eie(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function tie(e,t,n){let{y:r,height:s}=e;return t==="top"?r+=n:t==="bottom"?r-=s+n:r-=s/2,r}function dC(e,t,n,r){const{caretSize:s,caretPadding:i,cornerRadius:o}=e,{xAlign:a,yAlign:l}=n,u=s+i,{topLeft:c,topRight:d,bottomLeft:f,bottomRight:h}=iu(o);let g=eie(t,a);const m=tie(t,l,u);return l==="center"?a==="left"?g+=u:a==="right"&&(g-=u):a==="left"?g-=Math.max(c,f)+s:a==="right"&&(g+=Math.max(d,h)+s),{x:Fs(g,0,r.width-t.width),y:Fs(m,0,r.height-t.height)}}function uh(e,t,n){const r=_s(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function fC(e){return ri([],Di(e))}function nie(e,t,n){return gc(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function hC(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const sL={beforeTitle:Pi,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:Pi,beforeBody:Pi,beforeLabel:Pi,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return Ut(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Pi,afterBody:Pi,beforeFooter:Pi,footer:Pi,afterFooter:Pi};function Pr(e,t,n,r){const s=e[t].call(n,r);return typeof s>"u"?sL[t].call(n,r):s}var Hv;let pC=(Hv=class extends vc{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),s=r.enabled&&n.options.animation&&r.animations,i=new H2(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=nie(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,s=Pr(r,"beforeTitle",this,t),i=Pr(r,"title",this,t),o=Pr(r,"afterTitle",this,t);let a=[];return a=ri(a,Di(s)),a=ri(a,Di(i)),a=ri(a,Di(o)),a}getBeforeBody(t,n){return fC(Pr(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,s=[];return Lt(t,i=>{const o={before:[],lines:[],after:[]},a=hC(r,i);ri(o.before,Di(Pr(a,"beforeLabel",this,i))),ri(o.lines,Pr(a,"label",this,i)),ri(o.after,Di(Pr(a,"afterLabel",this,i))),s.push(o)}),s}getAfterBody(t,n){return fC(Pr(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,s=Pr(r,"beforeFooter",this,t),i=Pr(r,"footer",this,t),o=Pr(r,"afterFooter",this,t);let a=[];return a=ri(a,Di(s)),a=ri(a,Di(i)),a=ri(a,Di(o)),a}_createItems(t){const n=this._active,r=this.chart.data,s=[],i=[],o=[];let a=[],l,u;for(l=0,u=n.length;l<u;++l)a.push(Xse(this.chart,n[l]));return t.filter&&(a=a.filter((c,d,f)=>t.filter(c,d,f,r))),t.itemSort&&(a=a.sort((c,d)=>t.itemSort(c,d,r))),Lt(a,c=>{const d=hC(t.callbacks,c);s.push(Pr(d,"labelColor",this,c)),i.push(Pr(d,"labelPointStyle",this,c)),o.push(Pr(d,"labelTextColor",this,c))}),this.labelColors=s,this.labelPointStyles=i,this.labelTextColors=o,this.dataPoints=a,a}update(t,n){const r=this.options.setContext(this.getContext()),s=this._active;let i,o=[];if(!s.length)this.opacity!==0&&(i={opacity:0});else{const a=jc[r.position].call(this,s,this._eventPosition);o=this._createItems(r),this.title=this.getTitle(o,r),this.beforeBody=this.getBeforeBody(o,r),this.body=this.getBody(o,r),this.afterBody=this.getAfterBody(o,r),this.footer=this.getFooter(o,r);const l=this._size=uC(this,r),u=Object.assign({},a,l),c=cC(this.chart,r,u),d=dC(r,u,c,this.chart);this.xAlign=c.xAlign,this.yAlign=c.yAlign,i={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=o,this.$context=void 0,i&&this._resolveAnimations().update(this,i),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,s){const i=this.getCaretPosition(t,r,s);n.lineTo(i.x1,i.y1),n.lineTo(i.x2,i.y2),n.lineTo(i.x3,i.y3)}getCaretPosition(t,n,r){const{xAlign:s,yAlign:i}=this,{caretSize:o,cornerRadius:a}=r,{topLeft:l,topRight:u,bottomLeft:c,bottomRight:d}=iu(a),{x:f,y:h}=t,{width:g,height:m}=n;let y,w,b,S,_,k;return i==="center"?(_=h+m/2,s==="left"?(y=f,w=y-o,S=_+o,k=_-o):(y=f+g,w=y+o,S=_-o,k=_+o),b=y):(s==="left"?w=f+Math.max(l,c)+o:s==="right"?w=f+g-Math.max(u,d)-o:w=this.caretX,i==="top"?(S=h,_=S-o,y=w-o,b=w+o):(S=h+m,_=S+o,y=w+o,b=w-o),k=S),{x1:y,x2:w,x3:b,y1:S,y2:_,y3:k}}drawTitle(t,n,r){const s=this.title,i=s.length;let o,a,l;if(i){const u=ou(r.rtl,this.x,this.width);for(t.x=uh(this,r.titleAlign,r),n.textAlign=u.textAlign(r.titleAlign),n.textBaseline="middle",o=ur(r.titleFont),a=r.titleSpacing,n.fillStyle=r.titleColor,n.font=o.string,l=0;l<i;++l)n.fillText(s[l],u.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+a,l+1===i&&(t.y+=r.titleMarginBottom-a)}}_drawColorBox(t,n,r,s,i){const o=this.labelColors[r],a=this.labelPointStyles[r],{boxHeight:l,boxWidth:u}=i,c=ur(i.bodyFont),d=uh(this,"left",i),f=s.x(d),h=l<c.lineHeight?(c.lineHeight-l)/2:0,g=n.y+h;if(i.usePointStyle){const m={radius:Math.min(u,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},y=s.leftForLtr(f,u)+u/2,w=g+l/2;t.strokeStyle=i.multiKeyBackground,t.fillStyle=i.multiKeyBackground,RE(t,m,y,w),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,RE(t,m,y,w)}else{t.lineWidth=Tt(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const m=s.leftForLtr(f,u),y=s.leftForLtr(s.xPlus(f,1),u-2),w=iu(o.borderRadius);Object.values(w).some(b=>b!==0)?(t.beginPath(),t.fillStyle=i.multiKeyBackground,Qp(t,{x:m,y:g,w:u,h:l,radius:w}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),Qp(t,{x:y,y:g+1,w:u-2,h:l-2,radius:w}),t.fill()):(t.fillStyle=i.multiKeyBackground,t.fillRect(m,g,u,l),t.strokeRect(m,g,u,l),t.fillStyle=o.backgroundColor,t.fillRect(y,g+1,u-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:s}=this,{bodySpacing:i,bodyAlign:o,displayColors:a,boxHeight:l,boxWidth:u,boxPadding:c}=r,d=ur(r.bodyFont);let f=d.lineHeight,h=0;const g=ou(r.rtl,this.x,this.width),m=function(x){n.fillText(x,g.x(t.x+h),t.y+f/2),t.y+=f+i},y=g.textAlign(o);let w,b,S,_,k,T,R;for(n.textAlign=o,n.textBaseline="middle",n.font=d.string,t.x=uh(this,y,r),n.fillStyle=r.bodyColor,Lt(this.beforeBody,m),h=a&&y!=="right"?o==="center"?u/2+c:u+2+c:0,_=0,T=s.length;_<T;++_){for(w=s[_],b=this.labelTextColors[_],n.fillStyle=b,Lt(w.before,m),S=w.lines,a&&S.length&&(this._drawColorBox(n,t,_,g,r),f=Math.max(d.lineHeight,l)),k=0,R=S.length;k<R;++k)m(S[k]),f=d.lineHeight;Lt(w.after,m)}h=0,f=d.lineHeight,Lt(this.afterBody,m),t.y-=i}drawFooter(t,n,r){const s=this.footer,i=s.length;let o,a;if(i){const l=ou(r.rtl,this.x,this.width);for(t.x=uh(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",o=ur(r.footerFont),n.fillStyle=r.footerColor,n.font=o.string,a=0;a<i;++a)n.fillText(s[a],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+r.footerSpacing}}drawBackground(t,n,r,s){const{xAlign:i,yAlign:o}=this,{x:a,y:l}=t,{width:u,height:c}=r,{topLeft:d,topRight:f,bottomLeft:h,bottomRight:g}=iu(s.cornerRadius);n.fillStyle=s.backgroundColor,n.strokeStyle=s.borderColor,n.lineWidth=s.borderWidth,n.beginPath(),n.moveTo(a+d,l),o==="top"&&this.drawCaret(t,n,r,s),n.lineTo(a+u-f,l),n.quadraticCurveTo(a+u,l,a+u,l+f),o==="center"&&i==="right"&&this.drawCaret(t,n,r,s),n.lineTo(a+u,l+c-g),n.quadraticCurveTo(a+u,l+c,a+u-g,l+c),o==="bottom"&&this.drawCaret(t,n,r,s),n.lineTo(a+h,l+c),n.quadraticCurveTo(a,l+c,a,l+c-h),o==="center"&&i==="left"&&this.drawCaret(t,n,r,s),n.lineTo(a,l+d),n.quadraticCurveTo(a,l,a+d,l),n.closePath(),n.fill(),s.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,s=r&&r.x,i=r&&r.y;if(s||i){const o=jc[t.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=uC(this,t),l=Object.assign({},o,this._size),u=cC(n,t,l),c=dC(t,l,u,n);(s._to!==c.x||i._to!==c.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const s={width:this.width,height:this.height},i={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const o=_s(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(t.save(),t.globalAlpha=r,this.drawBackground(i,t,s,n),U2(t,n.textDirection),i.y+=o.top,this.drawTitle(i,t,n),this.drawBody(i,t,n),this.drawFooter(i,t,n),z2(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,s=t.map(({datasetIndex:a,index:l})=>{const u=this.chart.getDatasetMeta(a);if(!u)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:u.data[l],index:l}}),i=!Gp(r,s),o=this._positionChanged(s,n);(i||o)&&(this._active=s,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,i=this._active||[],o=this._getActiveElements(t,i,n,r),a=this._positionChanged(o,t),l=n||!Gp(o,i)||a;return l&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,s){const i=this.options;if(t.type==="mouseout")return[];if(!s)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const o=this.chart.getElementsAtEventForMode(t,i.mode,i,r);return i.reverse&&o.reverse(),o}_positionChanged(t,n){const{caretX:r,caretY:s,options:i}=this,o=jc[i.position].call(this,t,n);return o!==!1&&(r!==o.x||s!==o.y)}},Se(Hv,"positioners",jc),Hv);var rie={id:"tooltip",_element:pC,positioners:jc,afterInit(e,t,n){n&&(e.tooltip=new pC({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:sL},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const sie=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function iie(e,t,n,r){const s=e.indexOf(t);if(s===-1)return sie(e,t,n,r);const i=e.lastIndexOf(t);return s!==i?n:s}const oie=(e,t)=>e===null?null:Fs(Math.round(e),0,t);function mC(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Ub extends yc{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:s,label:i}of n)r[s]===i&&r.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(Ut(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:iie(r,t,Rt(n,t),this._addedLabels),oie(n,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(s=this.getLabels().length-1)),this.min=r,this.max=s}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,s=[];let i=this.getLabels();i=t===0&&n===i.length-1?i:i.slice(t,n+1),this._valueRange=Math.max(i.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let o=t;o<=n;o++)s.push({value:o});return s}getLabelForValue(t){return mC.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}Se(Ub,"id","category"),Se(Ub,"defaults",{ticks:{callback:mC}});function aie(e,t){const n=[],{bounds:s,step:i,min:o,max:a,precision:l,count:u,maxTicks:c,maxDigits:d,includeBounds:f}=e,h=i||1,g=c-1,{min:m,max:y}=t,w=!Ut(o),b=!Ut(a),S=!Ut(u),_=(y-m)/(d+1);let k=bE((y-m)/g/h)*h,T,R,x,I;if(k<1e-14&&!w&&!b)return[{value:m},{value:y}];I=Math.ceil(y/k)-Math.floor(m/k),I>g&&(k=bE(I*k/g/h)*h),Ut(l)||(T=Math.pow(10,l),k=Math.ceil(k*T)/T),s==="ticks"?(R=Math.floor(m/k)*k,x=Math.ceil(y/k)*k):(R=m,x=y),w&&b&&i&&une((a-o)/i,k/1e3)?(I=Math.round(Math.min((a-o)/k,c)),k=(a-o)/I,R=o,x=a):S?(R=w?o:R,x=b?a:x,I=u-1,k=(x-R)/I):(I=(x-R)/k,Yh(I,Math.round(I),k/1e3)?I=Math.round(I):I=Math.ceil(I));const P=Math.max(wE(k),wE(R));T=Math.pow(10,Ut(l)?P:l),R=Math.round(R*T)/T,x=Math.round(x*T)/T;let A=0;for(w&&(f&&R!==o?(n.push({value:o}),R<o&&A++,Yh(Math.round((R+A*k)*T)/T,o,gC(o,_,e))&&A++):R<o&&A++);A<I;++A){const L=Math.round((R+A*k)*T)/T;if(b&&L>a)break;n.push({value:L})}return b&&f&&x!==a?n.length&&Yh(n[n.length-1].value,a,gC(a,_,e))?n[n.length-1].value=a:n.push({value:a}):(!b||x===a)&&n.push({value:x}),n}function gC(e,t,{horizontal:n,minRotation:r}){const s=Da(r),i=(n?Math.sin(s):Math.cos(s))||.001,o=.75*t*(""+e).length;return Math.min(t/i,o)}class lie extends yc{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return Ut(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:s,max:i}=this;const o=l=>s=n?s:l,a=l=>i=r?i:l;if(t){const l=Wo(s),u=Wo(i);l<0&&u<0?a(0):l>0&&u>0&&o(0)}if(s===i){let l=i===0?1:Math.abs(i*.05);a(i+l),t||o(s-l)}this.min=s,this.max=i}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,s;return r?(s=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),n=n||11),n&&(s=Math.min(n,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const s={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},i=this._range||this,o=aie(s,i);return t.bounds==="ticks"&&cne(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const s=(r-n)/Math.max(t.length-1,1)/2;n-=s,r+=s}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return I2(t,this.chart.options.locale,this.options.ticks.format)}}class zb extends lie{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Ss(t)?t:0,this.max=Ss(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=Da(this.options.ticks.minRotation),s=(t?Math.sin(r):Math.cos(r))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,i.lineHeight/s))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}Se(zb,"id","linear"),Se(zb,"defaults",{ticks:{callback:O2.formatters.numeric}});const ug={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Mr=Object.keys(ug);function vC(e,t){return e-t}function yC(e,t){if(Ut(t))return null;const n=e._adapter,{parser:r,round:s,isoWeekday:i}=e._parseOpts;let o=t;return typeof r=="function"&&(o=r(o)),Ss(o)||(o=typeof r=="string"?n.parse(o,r):n.parse(o)),o===null?null:(s&&(o=s==="week"&&(Xp(i)||i===!0)?n.startOf(o,"isoWeek",i):n.startOf(o,s)),+o)}function bC(e,t,n,r){const s=Mr.length;for(let i=Mr.indexOf(e);i<s-1;++i){const o=ug[Mr[i]],a=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-t)/(a*o.size))<=r)return Mr[i]}return Mr[s-1]}function uie(e,t,n,r,s){for(let i=Mr.length-1;i>=Mr.indexOf(n);i--){const o=Mr[i];if(ug[o].common&&e._adapter.diff(s,r,o)>=t-1)return o}return Mr[n?Mr.indexOf(n):0]}function cie(e){for(let t=Mr.indexOf(e)+1,n=Mr.length;t<n;++t)if(ug[Mr[t]].common)return Mr[t]}function wC(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:s}=dw(n,t),i=n[r]>=t?n[r]:n[s];e[i]=!0}}function die(e,t,n,r){const s=e._adapter,i=+s.startOf(t[0].value,r),o=t[t.length-1].value;let a,l;for(a=i;a<=o;a=+s.add(a,1,r))l=n[a],l>=0&&(t[l].major=!0);return t}function SC(e,t,n){const r=[],s={},i=t.length;let o,a;for(o=0;o<i;++o)a=t[o],s[a]=o,r.push({value:a,major:!1});return i===0||!n?r:die(e,r,s,n)}class em extends yc{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const r=t.time||(t.time={}),s=this._adapter=new Rre._date(t.adapters.date);s.init(n),ld(r.displayFormats,s.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:yC(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:s,max:i,minDefined:o,maxDefined:a}=this.getUserBounds();function l(u){!o&&!isNaN(u.min)&&(s=Math.min(s,u.min)),!a&&!isNaN(u.max)&&(i=Math.max(i,u.max))}(!o||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),s=Ss(s)&&!isNaN(s)?s:+n.startOf(Date.now(),r),i=Ss(i)&&!isNaN(i)?i:+n.endOf(Date.now(),r)+1,this.min=Math.min(s,i-1),this.max=Math.max(s+1,i)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,s=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const i=this.min,o=this.max,a=vne(s,i,o);return this._unit=n.unit||(r.autoSkip?bC(n.minUnit,this.min,this.max,this._getLabelCapacity(i)):uie(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:cie(this._unit),this.initOffsets(s),t.reverse&&a.reverse(),SC(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,s,i;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),t.length===1?n=1-s:n=(this.getDecimalForValue(t[1])-s)/2,i=this.getDecimalForValue(t[t.length-1]),t.length===1?r=i:r=(i-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;n=Fs(n,0,o),r=Fs(r,0,o),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,s=this.options,i=s.time,o=i.unit||bC(i.minUnit,n,r,this._getLabelCapacity(n)),a=Rt(s.ticks.stepSize,1),l=o==="week"?i.isoWeekday:!1,u=Xp(l)||l===!0,c={};let d=n,f,h;if(u&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,u?"day":o),t.diff(r,n,o)>1e5*a)throw new Error(n+" and "+r+" are too far apart with stepSize of "+a+" "+o);const g=s.ticks.source==="data"&&this.getDataTimestamps();for(f=d,h=0;f<r;f=+t.add(f,a,o),h++)wC(c,f,g);return(f===r||s.bounds==="ticks"||h===1)&&wC(c,f,g),Object.keys(c).sort(vC).map(m=>+m)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const s=this.options.time.displayFormats,i=this._unit,o=n||s[i];return this._adapter.format(t,o)}_tickFormatFunction(t,n,r,s){const i=this.options,o=i.ticks.callback;if(o)return en(o,[t,n,r],this);const a=i.time.displayFormats,l=this._unit,u=this._majorUnit,c=l&&a[l],d=u&&a[u],f=r[n],h=u&&d&&f&&f.major;return this._adapter.format(t,s||(h?d:c))}generateTickLabels(t){let n,r,s;for(n=0,r=t.length;n<r;++n)s=t[n],s.label=this._tickFormatFunction(s.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,r=this.ctx.measureText(t).width,s=Da(this.isHorizontal()?n.maxRotation:n.minRotation),i=Math.cos(s),o=Math.sin(s),a=this._resolveTickFontOptions(0).size;return{w:r*i+a*o,h:r*o+a*i}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,s=r[n.unit]||r.millisecond,i=this._tickFormatFunction(t,0,SC(this,[t],this._majorUnit),s),o=this._getLabelSize(i),a=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(n=0,r=s.length;n<r;++n)t=t.concat(s[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,r;if(t.length)return t;const s=this.getLabels();for(n=0,r=s.length;n<r;++n)t.push(yC(this,s[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return C2(t.sort(vC))}}Se(em,"id","time"),Se(em,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function ch(e,t,n){let r=0,s=e.length-1,i,o,a,l;n?(t>=e[r].pos&&t<=e[s].pos&&({lo:r,hi:s}=$b(e,"pos",t)),{pos:i,time:a}=e[r],{pos:o,time:l}=e[s]):(t>=e[r].time&&t<=e[s].time&&({lo:r,hi:s}=$b(e,"time",t)),{time:i,pos:a}=e[r],{time:o,pos:l}=e[s]);const u=o-i;return u?a+(l-a)*(t-i)/u:a}class _C extends em{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=ch(n,this.min),this._tableRange=ch(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,s=[],i=[];let o,a,l,u,c;for(o=0,a=t.length;o<a;++o)u=t[o],u>=n&&u<=r&&s.push(u);if(s.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(o=0,a=s.length;o<a;++o)c=s[o+1],l=s[o-1],u=s[o],Math.round((c+l)/2)!==u&&i.push({time:u,pos:o/(a-1)});return i}_generate(){const t=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((s,i)=>s-i)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(ch(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return ch(this._table,r*this._tableRange+this._minPos,!0)}}Se(_C,"id","timeseries"),Se(_C,"defaults",em.defaults);const iL={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},fie={ariaLabel:{type:String},ariaDescribedby:{type:String}},hie={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...iL,...fie},pie=yR[0]==="2"?(e,t)=>Object.assign(e,{attrs:t}):(e,t)=>Object.assign(e,t);function Fl(e){return ju(e)?Ue(e):e}function mie(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e;return ju(t)?new Proxy(e,{}):e}function gie(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function oL(e,t){e.labels=t}function aL(e,t,n){const r=[];e.datasets=t.map(s=>{const i=e.datasets.find(o=>o[n]===s[n]);return!i||!s.data||r.includes(i)?{...s}:(r.push(i),Object.assign(i,s),i)})}function vie(e,t){const n={labels:[],datasets:[]};return oL(n,e.labels),aL(n,e.datasets,t),n}const yie=Ve({props:hie,setup(e,t){let{expose:n,slots:r}=t;const s=G(null),i=Ce(null);n({chart:i});const o=()=>{if(!s.value)return;const{type:u,data:c,options:d,plugins:f,datasetIdKey:h}=e,g=vie(c,h),m=mie(g,c);i.value=new lg(s.value,{type:u,data:m,options:{...d},plugins:f})},a=()=>{const u=Ue(i.value);u&&(e.destroyDelay>0?setTimeout(()=>{u.destroy(),i.value=null},e.destroyDelay):(u.destroy(),i.value=null))},l=u=>{u.update(e.updateMode)};return xt(o),mm(a),xe([()=>e.options,()=>e.data],(u,c)=>{let[d,f]=u,[h,g]=c;const m=Ue(i.value);if(!m)return;let y=!1;if(d){const w=Fl(d),b=Fl(h);w&&w!==b&&(gie(m,w),y=!0)}if(f){const w=Fl(f.labels),b=Fl(g.labels),S=Fl(f.datasets),_=Fl(g.datasets);w!==b&&(oL(m.config.data,w),y=!0),S&&S!==_&&(aL(m.config.data,S,e.datasetIdKey),y=!0)}y&&ht(()=>{l(m)})},{deep:!0}),()=>_r("canvas",{role:"img","aria-label":e.ariaLabel,"aria-describedby":e.ariaDescribedby,ref:s},[_r("p",{},[r.default?r.default():""])])}});function bie(e,t){return lg.register(t),Ve({props:iL,setup(n,r){let{expose:s}=r;const i=Ce(null),o=a=>{i.value=a==null?void 0:a.chart};return s({chart:i}),()=>_r(yie,pie({ref:o},{type:e,...n}))}})}const wie=bie("bar",Xh);function Sie(e,t){const n=typeof e=="string"?Vn(e):e,r=_ie(n,t);return{mounted:r,updated:r,unmounted(s){RR(null,s)}}}function _ie(e,t){return function(n,r,s){var d,f,h;const i=typeof t=="function"?t(r):t,o=((d=r.value)==null?void 0:d.text)??r.value??(i==null?void 0:i.text),a=_u(r.value)?r.value:{},l=()=>o??n.textContent,u=(s.ctx===r.instance.$?(f=kie(s,r.instance.$))==null?void 0:f.provides:(h=s.ctx)==null?void 0:h.provides)??r.instance.$.provides,c=_r(e,ge(i,a),l);c.appContext=Object.assign(Object.create(null),r.instance.$.appContext,{provides:u}),RR(c,n)}}function kie(e,t){const n=new Set,r=i=>{var o,a;for(const l of i){if(!l)continue;if(l===e||l.el&&e.el&&l.el===e.el)return!0;n.add(l);let u;if(l.suspense?u=r([l.ssContent]):Array.isArray(l.children)?u=r(l.children):(o=l.component)!=null&&o.vnode&&(u=r([(a=l.component)==null?void 0:a.subTree])),u)return u;n.delete(l)}return!1};if(!r([t.subTree]))return t;const s=Array.from(n).reverse();for(const i of s)if(i.component)return i.component;return t}const xie=Sie(ot,e=>{var n;return{activator:(_u(e.value)?!e.value.text:["",!1,null].includes(e.value))?null:"parent",location:(n=e.arg)==null?void 0:n.replace("-"," "),text:typeof e.value=="boolean"?void 0:e.value}}),Eie={class:"ma-3"},Cie={class:"ml-6"},Tie={class:"ml-7 mt-3"},Rie={key:0},Pie={key:2},Iie=Ve({__name:"EmergencyCommands",setup(e){lg.register(Ub,zb,Zh,Yse,rie,Gse);const t=Xt(),n=G(!1),r=G(!1),s=G([]),i=G([]),o=G(NaN),a=G(NaN),l=G(NaN),u=G({labels:[],datasets:[{label:"OctoPrint Settings response times (ms)",data:[],borderColor:"#FF6384",backgroundColor:"#ffffff"}]}),c={color:"white",plugins:{title:{color:"red",text:"Response times (ms)",display:!0}},responsive:!0},d=D(()=>t.printers.length===0||t.printers.every(w=>!w.enabled)),f=D(()=>t.printers.length===0||t.printers.every(w=>!!w.enabled));async function h(){try{n.value=!0;const w=t.printers.map(T=>T.id),b=await Xl.batchSettingsGet(w),S=b.map(T=>{var R,x;return((x=(R=T.value)==null?void 0:R.appearance)==null?void 0:x.name)||"ERROR"});i.value=b.filter(T=>!T.success).map(T=>({message:T.error}));const _=b.map(T=>T.time),k=b.map(T=>{var R,x;return((x=(R=T.value)==null?void 0:R.appearance)==null?void 0:x.name)??""});o.value=_.reduce((T,R)=>T+R,0)/_.length,l.value=Math.min(..._),a.value=Math.max(..._),u.value={labels:k,datasets:[{label:"OctoPrint Settings response times (ms)",data:_,borderColor:"#FF6384",backgroundColor:"#ffffff"}]},r.value=!0,s.value=S}finally{n.value=!1}}async function g(w){if(confirm("Are you sure you want to toggle all printers?")){n.value=!0;try{await Xl.batchToggleEnabled(t.printers.map(b=>b.id),w)}finally{n.value=!1}}}async function m(){if(confirm("Are you sure you want to connect all USBs?"))try{await Xl.batchConnectUsb(t.printers.map(w=>w.id))}finally{n.value=!1}}async function y(){confirm("Are you sure you want to connect all sockets?")&&(n.value=!0,await Xl.batchConnectSocket(t.printers.map(w=>w.id)),n.value=!1)}return(w,b)=>($(),te(kt,null,{default:v(()=>[p(kr,{color:"primary"},{default:v(()=>[p(dt,null,{default:v(()=>[p(ee,null,{default:v(()=>[...b[3]||(b[3]=[E("settings",-1)])]),_:1})]),_:1}),p($n,null,{default:v(()=>[...b[4]||(b[4]=[E(" Emergency Commands",-1)])]),_:1})]),_:1}),p(Ht,{lines:"three",subheader:""},{default:v(()=>[p(Ur,null,{default:v(()=>[...b[5]||(b[5]=[E(" Emergency Commands to rectify problematic situations ",-1)])]),_:1}),p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...b[6]||(b[6]=[E(" Batch disabling",-1)])]),_:1}),p(_t,null,{default:v(()=>[b[9]||(b[9]=E(" Disable all printers in batch (will not affect print) ",-1)),b[10]||(b[10]=C("br",null,null,-1)),p(se,{disabled:n.value||d.value,class:"ml-4",color:"primary",onClick:b[0]||(b[0]=S=>g(!1))},{default:v(()=>[...b[7]||(b[7]=[E(" Batch disable ",-1)])]),_:1},8,["disabled"]),n.value?($(),te(di,{key:0,class:"ml-2",indeterminate:"",size:"30",width:"4"})):ve("",!0),d.value?($(),te(ee,{key:1,class:"ml-2",color:"warning"},{default:v(()=>[...b[8]||(b[8]=[E(" warning ",-1)])]),_:1})):ve("",!0)]),_:1})]),_:1}),p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...b[11]||(b[11]=[E(" Batch enabling",-1)])]),_:1}),p(_t,null,{default:v(()=>[b[14]||(b[14]=E(" Enabling all printers in batch (will not affect print and it will skip printers in maintenance mode) ",-1)),b[15]||(b[15]=C("br",null,null,-1)),p(se,{disabled:n.value||f.value,class:"ml-4",color:"primary",onClick:b[1]||(b[1]=S=>g(!0))},{default:v(()=>[...b[12]||(b[12]=[E(" Batch enable ",-1)])]),_:1},8,["disabled"]),n.value?($(),te(di,{key:0,class:"ml-2",indeterminate:"",size:"30",width:"4"})):ve("",!0),f.value?zt(($(),te(ee,{key:1,class:"ml-2",color:"warning"},{default:v(()=>[...b[13]||(b[13]=[E("warning ",-1)])]),_:1})),[[xie,"No printers available",void 0,{bottom:!0}]]):ve("",!0)]),_:1})]),_:1}),p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...b[16]||(b[16]=[E(" Batch USB connect",-1)])]),_:1}),p(_t,null,{default:v(()=>[b[19]||(b[19]=E(" Connect all USB devices ",-1)),b[20]||(b[20]=C("br",null,null,-1)),p(se,{disabled:n.value||d.value,class:"ml-4",color:"primary",onClick:m},{default:v(()=>[p(ee,{class:"mr-2"},{default:v(()=>[...b[17]||(b[17]=[E("usb",-1)])]),_:1}),b[18]||(b[18]=E(" Connect USBs ",-1))]),_:1},8,["disabled"]),n.value?($(),te(di,{key:0,class:"ml-2",indeterminate:"",size:"30",width:"4"})):ve("",!0)]),_:1}),p(_t,{class:"mt-2"},{default:v(()=>[b[23]||(b[23]=E(" Connect all Sockets ",-1)),b[24]||(b[24]=C("br",null,null,-1)),p(se,{disabled:n.value||d.value,class:"ml-4",color:"primary",onClick:y},{default:v(()=>[p(ee,{class:"mr-2"},{default:v(()=>[...b[21]||(b[21]=[E("hub",-1)])]),_:1}),b[22]||(b[22]=E(" Connect Sockets ",-1))]),_:1},8,["disabled"])]),_:1}),n.value?($(),te(di,{key:0,class:"ml-2",indeterminate:"",size:"30",width:"4"})):ve("",!0)]),_:1})]),_:1}),C("div",Eie,[p(yn,null,{default:v(()=>[...b[25]||(b[25]=[E(" Test all OctoPrint response times",-1)])]),_:1}),C("div",Cie,[p(se,{loading:n.value,color:"primary",onClick:b[2]||(b[2]=S=>h())},{default:v(()=>[...b[26]||(b[26]=[E(" Measure network response times ",-1)])]),_:1},8,["loading"])]),C("div",Tie,[r.value?($(),ye("span",Rie," Response times: ")):ve("",!0),r.value?($(),te(Z(wie),{key:1,data:u.value,options:c,height:"100",style:{"background-color":"#272727"}},null,8,["data"])):($(),ye("span",Pie,"A graph will be shown, presenting the times in milliseconds (ms)")),n.value?($(),te(di,{key:3,class:"ml-2",indeterminate:"",size:"30",width:"4"})):ve("",!0)])])]),_:1}))}}),Aie={class:"text-center"},Oie=Ve({__name:"NotFoundView",setup(e){const t=ua(),n=()=>{t.go(-1)};return(r,s)=>($(),te(Xn,null,{default:v(()=>[s[6]||(s[6]=C("h2",{class:"text-center mt-lg-12"},"This page was not found.",-1)),s[7]||(s[7]=C("h1",{class:"text-center"},": (",-1)),s[8]||(s[8]=C("br",null,null,-1)),C("h4",Aie,[p(se,{class:"align-center",color:"primary",to:"/",variant:"elevated"},{default:v(()=>[p(ee,{class:"mr-2"},{default:v(()=>[...s[1]||(s[1]=[E("home",-1)])]),_:1}),s[2]||(s[2]=E(" Go home ",-1))]),_:1}),s[5]||(s[5]=C("span",{class:"pa-5"}," or ",-1)),p(se,{class:"align-center",variant:"elevated",onClick:s[0]||(s[0]=i=>n())},{default:v(()=>[p(ee,{class:"mr-2"},{default:v(()=>[...s[3]||(s[3]=[E("arrow_left",-1)])]),_:1}),s[4]||(s[4]=E(" Go back ",-1))]),_:1})])]),_:1}))}}),Die={key:0},Mie={key:1},Lie={key:2},Fie={key:3},$ie={key:4},Nie=Ve({__name:"PermissionDenied",setup(e){const t=kM(),n=D(()=>t.query);return(r,s)=>($(),te(Xn,{"fill-height":"",fluid:""},{default:v(()=>[p(NM,{color:"primary"},{default:v(()=>[p($n,{class:"text-uppercase text-white"},{default:v(()=>[...s[0]||(s[0]=[C("span",{class:"font-weight-light"}," FDM ",-1),C("strong",null," Monster ",-1)])]),_:1})]),_:1}),s[11]||(s[11]=C("img",{alt:"FDM Monster Background",class:"grid-bg-img align-content-center",src:sw,style:{opacity:"0.06"}},null,-1)),p(Zm,{"align-center":"",column:"","justify-center":""},{default:v(()=>[p(kt,{class:"flex align-center justify-center pa-lg-16 pa-sm-10",style:{width:"80%"}},{default:v(()=>[p(un,null,{default:v(()=>[p(ee,{class:"mr-4",size:"50"},{default:v(()=>[...s[1]||(s[1]=[E(" lock ",-1)])]),_:1}),s[2]||(s[2]=C("h3",null,"Permission Denied",-1))]),_:1}),p(Gm,{class:"mt-1"},{default:v(()=>[...s[3]||(s[3]=[E(" You do not have permission to access a specific resource on this page. ",-1)])]),_:1}),n.value?($(),te(rn,{key:0},{default:v(()=>{var i,o;return[n.value.page?($(),ye("div",Die,[s[4]||(s[4]=E(" Page: ",-1)),C("strong",null,ae((i=n.value)==null?void 0:i.page),1)])):ve("",!0),n.value.permissions?($(),ye("div",Mie,[s[5]||(s[5]=E(" Required permission(s): ",-1)),($(!0),ye(De,null,Zt(n.value.permissions,a=>($(),ye("strong",{key:a},ae(a),1))),128))])):ve("",!0),n.value.roles?($(),ye("div",Lie,[s[6]||(s[6]=E(" Usable roles: ",-1)),C("strong",null,ae((o=n.value.roles)==null?void 0:o.join(", ")),1)])):ve("",!0),n.value.url?($(),ye("div",Fie,[s[7]||(s[7]=E(" Problematic API path: ",-1)),C("strong",null,ae(n.value.url),1)])):ve("",!0),n.value.error?($(),ye("div",$ie,[s[8]||(s[8]=E(" Error: ",-1)),C("strong",null,ae(n.value.error),1)])):ve("",!0)]}),_:1})):ve("",!0),p(zn,{class:"mt-6"},{default:v(()=>[p(se,{class:"align-center",color:"primary",to:"/",variant:"elevated"},{default:v(()=>[p(ee,{class:"mr-2"},{default:v(()=>[...s[9]||(s[9]=[E("home",-1)])]),_:1}),s[10]||(s[10]=E(" Go home ",-1))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}}),Bie=Ve({__name:"Logo",setup(e){return(t,n)=>($(),te(bs,{src:Z(tw),class:"shrink mr-1 pt-3 ml-1",contain:"",style:{opacity:"0.85"},width:"150"},null,8,["src"]))}}),Vie=Ve({__name:"LoginForm",setup(e){const t=vs(),n=G(""),r=G(""),s=G(!1),i=G(""),o=ua(),a=kM(),l=G(!1),u=Bn("auth:login"),c=$t(),d=D(()=>{var m;return((m=r.value??"")==null?void 0:m.length)<3||(i.value??"").length<3});xt(async()=>{if(t.loadTokens(),await t.checkAuthenticationRequirements(),t.loginRequired===!1)return console.debug("LoginView, no login required, redirecting to",a.query.redirect,"or home"),u.emit(!0),await g();if(!t.hasRefreshToken)return;await t.verifyOrRefreshLoginOnceOrLogout()&&await g()});async function f(){return await o.push({name:Yt.Registration})}async function h(){var m,y,w,b;try{l.value=!0,await t.login(r.value,i.value),t.lastLogoutReason=null,i.value="",l.value=!1}catch(S){if(l.value=!1,((m=S==null?void 0:S.response)==null?void 0:m.status)===401){i.value="";const _=(w=(y=S==null?void 0:S.response)==null?void 0:y.data)==null?void 0:w.reasonCode,k=D0(_);_===Dr.AccountNotVerified?c.error(k,"Please ask your administrator to verify your account and try again."):_===Dr.PasswordChangeRequired&&c.error(k,"Your password needs to be changed. This feature is sadly not finished"),n.value=k;return}c.openErrorMessage({title:"Error logging in",subtitle:"Please test your connection and try again."}),n.value="Error logging in - status code "+((b=S==null?void 0:S.response)==null?void 0:b.status),i.value="";return}return n.value="",u.emit(!0),await g()}async function g(){const m=a.query.redirect;if(m){console.debug("[LoginForm] Redirecting to ",m),await o.push({path:m});return}else{console.debug("[LoginForm] Redirecting to home"),await o.push({name:Yt.Home});return}}return(m,y)=>($(),te(kt,{class:"pa-4",elevation:"10",style:{"border-radius":"10px"}},{default:v(()=>[p(rn,null,{default:v(()=>[p(ow,null,{default:v(()=>[y[7]||(y[7]=C("label",null," Username ",-1)),p(at,{modelValue:r.value,"onUpdate:modelValue":y[0]||(y[0]=w=>r.value=w),"prepend-icon":"person",autofocus:"",label:"Username",name:"login",type:"text",variant:"underlined",onKeyup:y[1]||(y[1]=ny(w=>d.value||h(),["enter"]))},null,8,["modelValue"]),p(at,{modelValue:i.value,"onUpdate:modelValue":y[2]||(y[2]=w=>i.value=w),"append-inner-icon":s.value?"visibility_off":"visibility","onClick:appendInner":y[3]||(y[3]=w=>s.value=!s.value),type:s.value?"text":"password",label:"Password",name:"password",password:"","prepend-icon":"lock",variant:"underlined",onKeyup:y[4]||(y[4]=ny(w=>d.value||h(),["enter"]))},null,8,["modelValue","append-inner-icon","type"]),n.value?($(),te(yn,{key:0,class:"mt-6",color:"error",density:"compact",variant:"outlined"},{default:v(()=>[E(ae(n.value),1)]),_:1})):ve("",!0),Z(t).lastLogoutReason?($(),te(yn,{key:1,class:"mt-6",color:"error-darken-1",density:"compact",variant:"outlined"},{default:v(()=>[E(" Reason for automatic logout: "+ae(Z(t).lastLogoutReason),1)]),_:1})):ve("",!0)]),_:1})]),_:1}),p(zn,null,{default:v(()=>[p(se,{loading:l.value,class:"pa-4",color:"primary",size:"lg",variant:"flat",style:{width:"100%"},onClick:y[5]||(y[5]=w=>h())},{default:v(()=>[...y[8]||(y[8]=[E(" Login ",-1)])]),_:1},8,["loading"])]),_:1}),p(zn,null,{default:v(()=>[p(se,{disabled:!Z(t).registration,class:"pa-4",size:"lg",variant:"flat",style:{width:"100%"},onClick:y[6]||(y[6]=w=>f())},{default:v(()=>[E(" Register new account "+ae(Z(t).registration?"":"(not enabled)")+" ",1),p(ee,{class:"pl-5",icon:"right"})]),_:1},8,["disabled"])]),_:1})]),_:1}))}}),Uie={class:"d-flex align-center",style:{"min-height":"calc(100vh - 148px)"}},zie={class:"pt-6 pl-6 d-flex flex-column align-center"},Hie=Ve({__name:"LoginView",setup(e){return(t,n)=>{const r=Bie;return $(),te(st,{class:"position-relative","no-gutters":""},{default:v(()=>[p(We,{cols:"12",lg:"12"},{default:v(()=>[p(Xn,null,{default:v(()=>[C("div",Uie,[p(st,{justify:"center",class:"align-content-center"},{default:v(()=>[C("div",zie,[p(r),p($n,{class:"text-uppercase text-red"},{default:v(()=>[...n[0]||(n[0]=[C("strong",null," FDM ",-1),C("strong",null," Monster ",-1)])]),_:1}),p($n,{class:"mt-lg-6 mt-sm-5 mb-md-5"},{default:v(()=>[...n[1]||(n[1]=[E(" Login to your account ",-1)])]),_:1}),p(Gm,{class:"text-grey mb-md-5"},{default:v(()=>[...n[2]||(n[2]=[E(" Welcome back! Please enter your details ",-1)])]),_:1})]),p(We,{cols:"12",md:"12"},{default:v(()=>[p(Vie,{class:"login-card"})]),_:1})]),_:1})])]),_:1})]),_:1})]),_:1})}}}),jie={class:"d-flex flex-column align-center"},Wie=Ve({__name:"RegistrationForm",setup(e){const t=vs(),n=ua(),r=G(""),s=G(""),i=G(!1),o=G(!1),a=G(""),l=G(""),u=G(!1),c=$t();async function d(){return await n.push({name:Yt.Login})}const f=D(()=>{var g;return((g=s.value??"")==null?void 0:g.length)<3||(a.value??"").length<3||a.value!=l.value});xt(async()=>{await t.logout(),await t.checkAuthenticationRequirements(),t.registration||(c.info("Registration is disabled, please contact your administrator"),await n.push({name:Yt.Login}))});async function h(){var g;try{u.value=!0,await Sa.registerAccount(s.value,a.value),u.value=!1}catch(m){if(u.value=!1,((g=m==null?void 0:m.response)==null?void 0:g.status)===401){r.value="Invalid credentials";return}c.openErrorMessage({title:"Error logging in",subtitle:"Please test your connection and try again."});return}r.value="",c.info("Account created, please login"),await d()}return(g,m)=>{const y=Vn("v-flex");return $(),te(Xn,{"fill-height":"",fluid:""},{default:v(()=>[p(Zm,{"align-content-center":"","justify-center":""},{default:v(()=>[p(y,{class:"d-flex flex-column align-content-center",md4:"",sm8:"",style:{"max-width":"450px","margin-top":"10%"},xs12:""},{default:v(()=>[C("div",jie,[p(bs,{src:require("@/assets/logo.png"),class:"shrink mr-1 pt-3 ml-1",contain:"",style:{opacity:"0.85"},width:"150"},null,8,["src"]),p($n,{class:"text-uppercase text-red"},{default:v(()=>[...m[8]||(m[8]=[C("strong",null," FDM ",-1),C("strong",null," Monster ",-1)])]),_:1}),p($n,{class:"mt-lg-6 mt-sm-5"},{default:v(()=>[...m[9]||(m[9]=[E(" Register new account ",-1)])]),_:1}),p(Gm,{class:"text-grey"},{default:v(()=>[...m[10]||(m[10]=[E(" Welcome! Please register your guest account ",-1)])]),_:1})]),p(kt,{class:"elevation-4 pa-4",style:{"border-radius":"10px"}},{default:v(()=>[p(rn,null,{default:v(()=>[p(ow,null,{default:v(()=>[m[11]||(m[11]=C("label",null," Username ",-1)),p(at,{modelValue:s.value,"onUpdate:modelValue":m[0]||(m[0]=w=>s.value=w),rules:[w=>!!w||"Username is required",w=>((w==null?void 0:w.length)??0)>=3||"Username must be of length 3 or greater",w=>!w.toLowerCase().includes("admin")||"Username may not contain the word admin",w=>!w.toLowerCase().includes("root")||"Username may not contain the word root",w=>w.toLowerCase()!=="demo"||"Username may not equal the word demo"],autofocus:"",name:"login",label:"Username","prepend-icon":"person",type:"text"},null,8,["modelValue","rules"]),p(at,{id:"password",modelValue:a.value,"onUpdate:modelValue":m[1]||(m[1]=w=>a.value=w),"append-icon":i.value?"visibility":"visibility_off",type:i.value?"text":"password",label:"Password",name:"password",rules:[w=>!!w||"Password is required",w=>!!w&&(w==null?void 0:w.length)>=8||"Password must be of length 8 or greater"],password:"","prepend-icon":"lock","onClick:append":m[2]||(m[2]=w=>i.value=!i.value)},null,8,["modelValue","append-icon","type","rules"]),p(at,{id:"password",modelValue:l.value,"onUpdate:modelValue":m[3]||(m[3]=w=>l.value=w),"append-icon":o.value?"visibility":"visibility_off",type:o.value?"text":"password",rules:[w=>!!w||"Repeated password is required",w=>w===a.value||"Passwords are not equal"],label:"Repeated Password",name:"password",password:"","prepend-icon":"lock","onClick:append":m[4]||(m[4]=w=>o.value=!o.value),onKeyup:m[5]||(m[5]=ny(w=>f.value||h(),["enter"]))},null,8,["modelValue","append-icon","type","rules"]),r.value?($(),te(yn,{key:0,class:"mt-6",color:"error",density:"compact",variant:"outlined"},{default:v(()=>[E(ae(r.value),1)]),_:1})):ve("",!0)]),_:1})]),_:1}),p(zn,null,{default:v(()=>[p(se,{loading:u.value,class:"pa-4",color:"primary",size:"large",style:{width:"100%"},onClick:m[6]||(m[6]=w=>h())},{default:v(()=>[...m[12]||(m[12]=[E(" Register account ",-1)])]),_:1},8,["loading"])]),_:1}),p(zn,null,{default:v(()=>[p(se,{style:{width:"100%"},class:"pa-4",size:"large",onClick:m[7]||(m[7]=w=>d())},{default:v(()=>[p(ee,{class:"mr-2"},{default:v(()=>[...m[13]||(m[13]=[E("arrow_left",-1)])]),_:1}),m[14]||(m[14]=E("Back to Login ",-1))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}}}),qie=Ve({__name:"RegistrationView",setup(e){return(t,n)=>($(),te(Xn,{"fill-height":"",fluid:""},{default:v(()=>[p(Zm,{"align-center":"","justify-center":""},{default:v(()=>[p(Wie)]),_:1})]),_:1}))}}),Gie=["src"],Kie=Ve({__name:"CameraGridView",setup(e){const t=Xt(),n=sn(on.AddOrUpdateCameraDialog),s=Jm({queryKey:["cameraStream"],queryFn:async()=>(await Hp.listCameraStreams()).map(c=>({printer:t.printers.find(d=>d.id===c.printerId),cameraStream:c}))}),i=nX({mutationFn:u=>Hp.deleteCameraStream(u),onSuccess:()=>s.refetch()});function o(){n.openDialog({addOrUpdate:"add"})}function a(u){u&&n.openDialog({addOrUpdate:"update",cameraId:u})}function l(u){u&&i.mutateAsync(u)}return(u,c)=>($(),ye("div",null,[p(kr,null,{default:v(()=>[p($n,{class:"mr-4"},{default:v(()=>[...c[1]||(c[1]=[E(" Camera Overview ",-1)])]),_:1}),p(se,{color:"primary",onClick:c[0]||(c[0]=d=>o())},{default:v(()=>[p(ee,{class:"mr-2"},{default:v(()=>[...c[2]||(c[2]=[E("add",-1)])]),_:1}),c[3]||(c[3]=E(" Add camera ",-1))]),_:1})]),_:1}),p(st,{class:"ma-0"},{default:v(()=>[($(!0),ye(De,null,Zt(Z(s).data.value,d=>($(),ye("div",{key:d.cameraStream.id,class:"ma-4",style:{border:"1px solid grey",margin:"0"},width:"300"},[p(kt,{class:"pb-2 pl-2 pr-2",width:"300"},{default:v(()=>{var f;return[p(un,null,{default:v(()=>{var h;return[d.cameraStream.printerId?($(),te(ee,{key:0,class:"mr-2",size:"small"},{default:v(()=>[...c[4]||(c[4]=[E(" print ",-1)])]),_:1})):($(),te(ee,{key:1,class:"mr-2",size:"small"},{default:v(()=>[...c[5]||(c[5]=[E(" camera_alt ",-1)])]),_:1})),E(" "+ae((d==null?void 0:d.cameraStream.name)??((h=d==null?void 0:d.printer)==null?void 0:h.name)??"Camera"),1)]}),_:2},1024),C("img",{src:(f=d.cameraStream)==null?void 0:f.streamURL,width:"100%"},null,8,Gie),c[10]||(c[10]=C("br",null,null,-1)),p(se,{class:"mr-1",size:"small",onClick:h=>a(d.cameraStream.id)},{default:v(()=>[p(ee,{class:"mr-2"},{default:v(()=>[...c[6]||(c[6]=[E("edit",-1)])]),_:1}),c[7]||(c[7]=E(" Update ",-1))]),_:1},8,["onClick"]),p(se,{size:"small",onClick:h=>l(d.cameraStream.id)},{default:v(()=>[p(ee,{class:"mr-2"},{default:v(()=>[...c[8]||(c[8]=[E("delete",-1)])]),_:1}),c[9]||(c[9]=E(" Delete ",-1))]),_:1},8,["onClick"])]}),_:2},1024)]))),128))]),_:1})]))}}),Yie="/img/OIG.jpg";class Xie extends Cr{static async postFirstTimeSetup(t){const n=$e.completeFirstTimeSetupRoute;return await this.post(n,t)}}const Qie={class:"mt-6 border_all"},Jie={class:"d-flex flex-row align-center"},Zie={class:"d-flex flex-row align-center"},eoe={class:"d-flex flex-row align-center"},toe={class:"d-flex flex-row align-center"},noe={class:"mt-4"},roe={class:"mt-4"},soe={class:"mt-14"},ioe={class:"mb-5 mt-10"},ooe={class:"mt-14"},aoe=Ve({__name:"FirstTimeSetupView",setup(e){const t=ua(),n=$t(),r=G(!1),s=vs(),i=G({loginRequired:!0,registration:!1}),o=G({rootUsername:"admin",rootPassword:"",rootPassword2:""}),a=G(1);xt(async()=>{var c;await s.checkAuthenticationRequirements(),(c=s.wizardState)!=null&&c.wizardCompleted&&(n.info("Setup already completed."),s.loginRequired?await t.push({name:"Login"}):await t.push({name:"Home"}))});async function l(){if(!r.value){n.error("Please fill out all required fields.");return}const c=i.value,d=o.value;await Xie.postFirstTimeSetup({loginRequired:c.loginRequired,registration:c.registration,rootUsername:d.rootUsername,rootPassword:d.rootPassword}),n.openInfoMessage({title:"Setup completed"}),a.value=3}async function u(){await t.push({name:"Login"})}return(c,d)=>{const f=Vn("v-stepper-step"),h=Vn("v-stepper-content"),g=Vn("v-stepper-items");return $(),te(Xn,null,{default:v(()=>[d[46]||(d[46]=C("img",{alt:"FDM Monster Background",class:"grid-bg-img align-content-center",src:sw,style:{opacity:"0.08"}},null,-1)),p(KD,{modelValue:a.value,"onUpdate:modelValue":d[10]||(d[10]=m=>a.value=m),class:"bg-grey-darken-4"},{default:v(()=>[p(V1,null,{default:v(()=>[p(f,{complete:a.value>1,step:"1"},{default:v(()=>[...d[11]||(d[11]=[E(" Introduction ",-1)])]),_:1},8,["complete"]),p(cn),p(f,{complete:a.value>2,step:"2"},{default:v(()=>[...d[12]||(d[12]=[E(" Login and registration ",-1)])]),_:1},8,["complete"]),p(cn),p(f,{step:"3"},{default:v(()=>[...d[13]||(d[13]=[E(" Summary ",-1)])]),_:1})]),_:1}),p(g,null,{default:v(()=>[p(h,{class:"align-content-center align-center text-center",step:"1"},{default:v(()=>[d[17]||(d[17]=C("div",{class:"align-content-center align-center text-center"},[C("img",{class:"rounded-pill ma-4",src:Yie,style:{opacity:"0.7"},width:"400"}),E(" /> "),C("h1",null,"FDM Monster"),C("small",null," This server is still unconfigured. ")],-1)),p(se,{class:"mt-14 mb-14",color:"primary",onClick:d[0]||(d[0]=m=>a.value=2)},{default:v(()=>[...d[14]||(d[14]=[E(" Start Setup ",-1)])]),_:1}),C("div",Qie,[p(ee,{class:"mr-6"},{default:v(()=>[...d[15]||(d[15]=[E("question_mark",-1)])]),_:1}),d[16]||(d[16]=C("small",null,[E(" If you have questions at any point, reach out on "),C("a",{href:"https://github.com/fdm-monster/fdm-monster/issues"}," Github "),E(" or on "),C("a",{href:"https://discord.gg/mwA8uP8CMc"}," Discord "),E(". ")],-1))])]),_:1}),p(h,{class:"align-content-center align-center text-center",step:"2"},{default:v(()=>[C("h4",null,[p(ee,{class:"mr-2"},{default:v(()=>[...d[18]||(d[18]=[E("settings",-1)])]),_:1}),d[19]||(d[19]=E(" Login",-1))]),p(ow,{modelValue:r.value,"onUpdate:modelValue":d[6]||(d[6]=m=>r.value=m)},{default:v(()=>[p(qp,{modelValue:i.value.loginRequired,"onUpdate:modelValue":d[1]||(d[1]=m=>i.value.loginRequired=m),class:"mt-5"},{message:v(()=>[C("span",Jie,[p(ee,{color:i.value.loginRequired?"success":"",disabled:!i.value.loginRequired,class:"ml-3 mr-3"},{default:v(()=>[...d[20]||(d[20]=[E(" check ",-1)])]),_:1},8,["color","disabled"]),d[21]||(d[21]=E(" Login is required. ",-1))]),C("span",Zie,[p(ee,{color:i.value.loginRequired?"":"error",disabled:i.value.loginRequired,class:"ml-3 mr-3"},{default:v(()=>[...d[22]||(d[22]=[E(" close ",-1)])]),_:1},8,["color","disabled"]),d[23]||(d[23]=E(" No login is required. The admin role is assumed. ",-1))])]),label:v(()=>[...d[24]||(d[24]=[E(" Enable Login ",-1)])]),_:1},8,["modelValue"]),i.value.loginRequired?ve("",!0):($(),te(yn,{key:0,color:"error-darken-4"},{default:v(()=>[...d[25]||(d[25]=[E(" You might be exposing your FDM Monster server publicly. Please take care evaluating the ",-1),C("strong",null," Enable Login ",-1),E(" option. ",-1)])]),_:1})),p(qp,{modelValue:i.value.registration,"onUpdate:modelValue":d[2]||(d[2]=m=>i.value.registration=m),class:"mt-10 mb-10"},{message:v(()=>[C("span",eoe,[p(ee,{color:i.value.registration?"success":"",disabled:!i.value.registration,class:"ml-3 mr-3"},{default:v(()=>[...d[26]||(d[26]=[E(" check ",-1)])]),_:1},8,["color","disabled"]),d[27]||(d[27]=E(" Accounts can be registered with a guest role. ",-1))]),C("span",toe,[p(ee,{color:i.value.registration?"":"error",disabled:i.value.registration,class:"ml-3 mr-3"},{default:v(()=>[...d[28]||(d[28]=[E(" close ",-1)])]),_:1},8,["color","disabled"]),d[29]||(d[29]=E(" No other accounts can be registered. ",-1))])]),label:v(()=>[...d[30]||(d[30]=[E(" Enable Registration ",-1)])]),_:1},8,["modelValue"]),p(cn),C("h4",noe,[p(ee,{class:"mr-2"},{default:v(()=>[...d[31]||(d[31]=[E("shield",-1)])]),_:1}),d[32]||(d[32]=E(" Admin account ",-1))]),p(at,{modelValue:o.value.rootUsername,"onUpdate:modelValue":d[3]||(d[3]=m=>o.value.rootUsername=m),rules:[m=>!!m||"Username is required"],class:"mt-5",label:"Username","prepend-icon":"person"},{prepend:v(()=>[p(ee,null,{default:v(()=>[...d[33]||(d[33]=[E("person",-1)])]),_:1})]),_:1},8,["modelValue","rules"]),p(at,{modelValue:o.value.rootPassword,"onUpdate:modelValue":d[4]||(d[4]=m=>o.value.rootPassword=m),type:"password","prepend-icon":"lock",rules:[m=>!!m||"Password is required",m=>!!m&&(m==null?void 0:m.length)>=8||"Password must be of length 8 or greater"],class:"mt-5",label:"Password"},{prepend:v(()=>[p(ee,null,{default:v(()=>[...d[34]||(d[34]=[E("password",-1)])]),_:1})]),_:1},8,["modelValue","rules"]),p(at,{modelValue:o.value.rootPassword2,"onUpdate:modelValue":d[5]||(d[5]=m=>o.value.rootPassword2=m),type:"password","prepend-icon":"lock",rules:[m=>!!m||"Repeated password is required",m=>m===o.value.rootPassword||"Passwords are not equal"],class:"mt-5",label:"Repeated Password"},{prepend:v(()=>[p(ee,null,{default:v(()=>[...d[35]||(d[35]=[E("password",-1)])]),_:1})]),_:1},8,["modelValue","rules"])]),_:1},8,["modelValue"]),C("div",roe,[p(se,{class:"mr-4",onClick:d[7]||(d[7]=m=>a.value=1)},{default:v(()=>[...d[36]||(d[36]=[E(" Back ",-1)])]),_:1}),p(se,{disabled:!r.value,color:"primary",onClick:d[8]||(d[8]=m=>l())},{default:v(()=>[...d[37]||(d[37]=[E(" Verify & Submit ",-1)])]),_:1},8,["disabled"])]),p(cn,{class:"mt-4"}),C("div",soe,[p(ee,{class:"mr-6"},{default:v(()=>[...d[38]||(d[38]=[E("question_mark",-1)])]),_:1}),d[39]||(d[39]=C("small",null,[E(" If you have questions at any point, reach out on "),C("a",{href:"https://github.com/fdm-monster/fdm-monster/issues"}," Github "),E(" or on "),C("a",{href:"https://discord.gg/mwA8uP8CMc"}," Discord "),E(". ")],-1))])]),_:1}),p(h,{class:"align-content-center align-center text-center",step:"3"},{default:v(()=>[C("div",ioe,[p(ee,{size:"100",class:"mr-5",color:"green circle"},{default:v(()=>[...d[40]||(d[40]=[E(" check_circle ",-1)])]),_:1}),d[41]||(d[41]=E(" Setup Completed ",-1))]),d[45]||(d[45]=C("br",null,null,-1)),p(se,{color:"primary",class:"mr-4",onClick:d[9]||(d[9]=m=>u())},{default:v(()=>[...d[42]||(d[42]=[E(" Let's continue ",-1)])]),_:1}),C("div",ooe,[p(ee,{class:"mr-6"},{default:v(()=>[...d[43]||(d[43]=[E("question_mark",-1)])]),_:1}),d[44]||(d[44]=C("small",null,[E(" If you have questions at any point, reach out on "),C("a",{href:"https://github.com/fdm-monster/fdm-monster/issues"}," Github "),E(" or on "),C("a",{href:"https://discord.gg/mwA8uP8CMc"}," Discord "),E(". ")],-1))])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})}}}),loe={class:"ml-4 mb-4"},uoe={class:"ml-4 mb-4"},coe=Ve({__name:"AccountSettings",setup(e){const t=Ks(),n=Y1(),r=vs(),s=ua(),i=$t(),o=G(),a=G(""),l=G({username:"",newPassword:"",oldPassword:"",repeatPassword:""});xt(async()=>{var d;await t.loadSettings(),o.value=(d=t.settings)==null?void 0:d.server.loginRequired,await n.getProfile(),l.value.username=n.username,a.value=n.userId});async function u(){var d,f;if(!((f=(d=a.value)==null?void 0:d.toString())!=null&&f.length)){i.openErrorMessage({title:"User not loaded"});return}await us.changeUsername(a.value,l.value.username),await n.getProfile(),l.value.username=n.username,i.openInfoMessage({title:"Username changed"})}async function c(){var d,f;if(!((f=(d=a.value)==null?void 0:d.toString())!=null&&f.length)){i.openErrorMessage({title:"User not loaded"});return}if(l.value.newPassword!==l.value.repeatPassword){i.openErrorMessage({title:"Passwords do not match"});return}await us.changePassword(a.value,l.value.oldPassword,l.value.newPassword),l.value.oldPassword="",l.value.newPassword="",l.value.repeatPassword="",i.openInfoMessage({title:"Password changed"}),await r.logout(!0),await xM(s)}return(d,f)=>{const h=Vn("v-list-item-content"),g=Vn("v-list-item-action-text");return $(),te(kt,null,{default:v(()=>[p(kr,{color:"primary"},{default:v(()=>[p(dt,null,{default:v(()=>[p(ee,null,{default:v(()=>[...f[6]||(f[6]=[E("account_circle",-1)])]),_:1})]),_:1}),p($n,null,{default:v(()=>[...f[7]||(f[7]=[E(" Account Settings ",-1)])]),_:1})]),_:1}),p(Ht,{subheader:"",lines:"three"},{default:v(()=>[p(ze,null,{default:v(()=>[o.value?ve("",!0):($(),te(h,{key:0},{default:v(()=>[p(yn,{color:"primary"},{default:v(()=>[...f[8]||(f[8]=[E(" 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})]),_:1}))]),_:1})]),_:1}),p(Ht,{subheader:"",lines:"three"},{default:v(()=>[p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...f[9]||(f[9]=[E(" Username ",-1)])]),_:1}),p(g,null,{default:v(()=>[p(at,{modelValue:l.value.username,"onUpdate:modelValue":f[0]||(f[0]=m=>l.value.username=m),disabled:!o.value,label:"Fill in your username"},null,8,["modelValue","disabled"])]),_:1})]),_:1}),C("div",loe,[p(se,{disabled:!o.value,color:"primary",onClick:f[1]||(f[1]=m=>u())},{default:v(()=>[...f[10]||(f[10]=[E(" Change username ",-1)])]),_:1},8,["disabled"])]),p(cn),f[14]||(f[14]=C("br",null,null,-1)),p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...f[11]||(f[11]=[E(" Old Password ",-1)])]),_:1}),p(g,null,{default:v(()=>[p(at,{modelValue:l.value.oldPassword,"onUpdate:modelValue":f[2]||(f[2]=m=>l.value.oldPassword=m),disabled:!o.value,placeholder:"Old password",type:"password"},null,8,["modelValue","disabled"])]),_:1})]),_:1}),p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...f[12]||(f[12]=[E(" New Password ",-1)])]),_:1}),p(g,null,{default:v(()=>[p(at,{modelValue:l.value.newPassword,"onUpdate:modelValue":f[3]||(f[3]=m=>l.value.newPassword=m),disabled:!o.value,placeholder:"New password",type:"password"},null,8,["modelValue","disabled"])]),_:1})]),_:1}),p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...f[13]||(f[13]=[E(" Repeat New Password ",-1)])]),_:1}),p(g,null,{default:v(()=>[p(at,{modelValue:l.value.repeatPassword,"onUpdate:modelValue":f[4]||(f[4]=m=>l.value.repeatPassword=m),disabled:!o.value,placeholder:"Repeat new password",type:"password"},null,8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1}),C("div",uoe,[p(se,{disabled:!o.value,color:"primary",onClick:f[5]||(f[5]=m=>c())},{default:v(()=>[...f[15]||(f[15]=[E(" Change password ",-1)])]),_:1},8,["disabled"])]),p(cn)]),_:1})}}}),doe=Ve({__name:"GridSettings",setup(e){return(t,n)=>($(),te(st,null,{default:v(()=>[p(We,{cols:"12"},{default:v(()=>[p(kt,null,{default:v(()=>[p(b2,{icon:"grid_on",title:"Grid"}),p(YD)]),_:1})]),_:1})]),_:1}))}}),foe=Ve({__name:"ServerProtectionSettings",setup(e){const t=ua(),n=$t(),r=vs(),s=G(""),i=G(!1),o=G(!1),a=G(3200),l=G(!1),u=G(-1),c=G(14);async function d(){var S;const w=await En.getSettings();i.value=w.server.loginRequired,o.value=w.server.registration,s.value=((S=w.connection)==null?void 0:S.clientIp)??"127.0.0.1";const b=await En.getSettingsSensitive();a.value=b.credentials.jwtExpiresIn/60,l.value=b.credentials.refreshTokenAttempts!==-1,u.value=b.credentials.refreshTokenAttempts,c.value=b.credentials.refreshTokenExpiry/24/3600}xt(async()=>{await d()});function f(){l.value||(u.value=-1)}async function h(){const w=i.value;!w&&!confirm("Disabling login will expose your server. Continue?")||(await En.updateLoginRequiredSettings(w),await r.logout(!0),await r.checkAuthenticationRequirements(),w?await t.push({name:Yt.Login}):await t.push({name:Yt.Home}),n.info("Login Required settings updated"))}async function g(){await En.updateRegistrationEnabledSettings(o.value),await r.checkAuthenticationRequirements(),n.info("Registration settings updated")}async function m(){a.value=120,l.value=!1,u.value=-1,c.value=14,await y(),n.info("Login expiry settings reset to default")}async function y(){if(a.value<2||a.value>120)throw new Error("JWT Expiry must be between 2 and 120 minutes");if(l.value&&(u.value<1||u.value>50))throw new Error("Refresh Token Attempts must be between 1 and 50");if(c.value<1||c.value>30)throw new Error("Refresh Token Expiry must be between 1 and 30 days");await En.updateCredentialSettings(a.value*60,u.value,c.value*24*3600),n.info("Login expiry settings updated")}return(w,b)=>($(),te(kt,null,{default:v(()=>[p(kr,{color:"primary"},{default:v(()=>[p(dt,null,{default:v(()=>[p(ee,null,{default:v(()=>[...b[11]||(b[11]=[E("settings",-1)])]),_:1})]),_:1}),p($n,null,{default:v(()=>[...b[12]||(b[12]=[E(" Server Protection Settings ",-1)])]),_:1})]),_:1}),p(Ht,{lines:"three"},{default:v(()=>[p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...b[13]||(b[13]=[E(" Login Required ",-1)])]),_:1}),p(_t,null,{default:v(()=>[p(st,null,{default:v(()=>[p(We,{cols:"12",md:"2"},{default:v(()=>[p(wn,{modelValue:i.value,"onUpdate:modelValue":b[0]||(b[0]=S=>i.value=S),label:"Require Login"},null,8,["modelValue"])]),_:1})]),_:1}),p(st,null,{default:v(()=>[p(We,null,{default:v(()=>[p(se,{color:"primary",onClick:b[1]||(b[1]=S=>h())},{default:v(()=>[...b[14]||(b[14]=[E(" save login required setting ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...b[15]||(b[15]=[E(" Registration Enabled ",-1)])]),_:1}),p(_t,null,{default:v(()=>[p(st,null,{default:v(()=>[p(We,{cols:"12",md:"2"},{default:v(()=>[p(wn,{modelValue:o.value,"onUpdate:modelValue":b[2]||(b[2]=S=>o.value=S),label:"Enable Registration"},null,8,["modelValue"])]),_:1})]),_:1}),p(st,null,{default:v(()=>[p(We,null,{default:v(()=>[p(se,{color:"primary",onClick:b[3]||(b[3]=S=>g())},{default:v(()=>[...b[16]||(b[16]=[E(" save registration enabled setting ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...b[17]||(b[17]=[E(" Login Expiry Settings (advanced) ",-1)])]),_:1}),p(_t,null,{default:v(()=>[p(st,null,{default:v(()=>[p(We,{cols:"12",md:"2"},{default:v(()=>[p(at,{modelValue:a.value,"onUpdate:modelValue":b[4]||(b[4]=S=>a.value=S),rules:[S=>!!S&&S>=2&&S<=120],label:"JWT Expiry (minutes)"},null,8,["modelValue","rules"])]),_:1})]),_:1}),p(st,null,{default:v(()=>[p(We,{cols:"12",md:"2"},{default:v(()=>[p(wn,{modelValue:l.value,"onUpdate:modelValue":[b[5]||(b[5]=S=>l.value=S),b[6]||(b[6]=S=>f())],label:"Enable Refresh Token Attempts"},null,8,["modelValue"])]),_:1})]),_:1}),p(st,null,{default:v(()=>[p(We,{cols:"12",md:"2"},{default:v(()=>[p(at,{modelValue:u.value,"onUpdate:modelValue":b[7]||(b[7]=S=>u.value=S),disabled:!l.value,rules:[S=>!!S&&S>=1],label:"Refresh Token Attempts (disabled: -1, range: 1 to 50)",type:"number"},null,8,["modelValue","disabled","rules"])]),_:1})]),_:1}),p(st,null,{default:v(()=>[p(We,{cols:"12",md:"2"},{default:v(()=>[p(at,{modelValue:c.value,"onUpdate:modelValue":b[8]||(b[8]=S=>c.value=S),rules:[S=>!!S&&S>=1&&S<=30],label:"Refresh Token Expiry (days)"},null,8,["modelValue","rules"])]),_:1})]),_:1}),p(yn,{color:"secondary"},{default:v(()=>[p(ee,null,{default:v(()=>[...b[18]||(b[18]=[E("info",-1)])]),_:1}),b[19]||(b[19]=E(" Be cautious, setting the wrong expiry could make you lose access to the server or make your user experience highly degraded! ",-1))]),_:1}),p(st,null,{default:v(()=>[p(We,null,{default:v(()=>[p(se,{color:"primary",onClick:b[9]||(b[9]=S=>y())},{default:v(()=>[...b[20]||(b[20]=[E(" save login expiry settings ",-1)])]),_:1}),p(se,{color:"default",onClick:b[10]||(b[10]=S=>m())},{default:v(()=>[...b[21]||(b[21]=[E(" reset to default ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}});var Hb={exports:{}};const hoe="2.0.0",lL=256,poe=Number.MAX_SAFE_INTEGER||9007199254740991,moe=16,goe=lL-6,voe=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var cg={MAX_LENGTH:lL,MAX_SAFE_COMPONENT_LENGTH:moe,MAX_SAFE_BUILD_LENGTH:goe,MAX_SAFE_INTEGER:poe,RELEASE_TYPES:voe,SEMVER_SPEC_VERSION:hoe,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Mv={};const yoe=typeof process=="object"&&Mv&&Mv.NODE_DEBUG&&/\bsemver\b/i.test(Mv.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var dg=yoe;(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:s}=cg,i=dg;t=e.exports={};const o=t.re=[],a=t.safeRe=[],l=t.src=[],u=t.safeSrc=[],c=t.t={};let d=0;const f="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",s],[f,r]],g=y=>{for(const[w,b]of h)y=y.split(`${w}*`).join(`${w}{0,${b}}`).split(`${w}+`).join(`${w}{1,${b}}`);return y},m=(y,w,b)=>{const S=g(w),_=d++;i(y,_,w),c[y]=_,l[_]=w,u[_]=S,o[_]=new RegExp(w,b?"g":void 0),a[_]=new RegExp(S,b?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),m("MAINVERSION",`(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${l[c.NONNUMERICIDENTIFIER]}|${l[c.NUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${l[c.NONNUMERICIDENTIFIER]}|${l[c.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASE",`(?:-(${l[c.PRERELEASEIDENTIFIER]}(?:\\.${l[c.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${l[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[c.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${f}+`),m("BUILD",`(?:\\+(${l[c.BUILDIDENTIFIER]}(?:\\.${l[c.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${l[c.MAINVERSION]}${l[c.PRERELEASE]}?${l[c.BUILD]}?`),m("FULL",`^${l[c.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${l[c.MAINVERSIONLOOSE]}${l[c.PRERELEASELOOSE]}?${l[c.BUILD]}?`),m("LOOSE",`^${l[c.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${l[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${l[c.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:${l[c.PRERELEASE]})?${l[c.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:${l[c.PRERELEASELOOSE]})?${l[c.BUILD]}?)?)?`),m("XRANGE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),m("COERCE",`${l[c.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",l[c.COERCEPLAIN]+`(?:${l[c.PRERELEASE]})?(?:${l[c.BUILD]})?(?:$|[^\\d])`),m("COERCERTL",l[c.COERCE],!0),m("COERCERTLFULL",l[c.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${l[c.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",m("TILDE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${l[c.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",m("CARET",`^${l[c.LONECARET]}${l[c.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${l[c.LONECARET]}${l[c.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${l[c.GTLT]}\\s*(${l[c.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]}|${l[c.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${l[c.XRANGEPLAIN]})\\s+-\\s+(${l[c.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${l[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[c.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Hb,Hb.exports);var Tf=Hb.exports;const boe=Object.freeze({loose:!0}),woe=Object.freeze({}),Soe=e=>e?typeof e!="object"?boe:e:woe;var Sw=Soe;const kC=/^[0-9]+$/,uL=(e,t)=>{if(typeof e=="number"&&typeof t=="number")return e===t?0:e<t?-1:1;const n=kC.test(e),r=kC.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1},_oe=(e,t)=>uL(t,e);var cL={compareIdentifiers:uL,rcompareIdentifiers:_oe};const dh=dg,{MAX_LENGTH:xC,MAX_SAFE_INTEGER:fh}=cg,{safeRe:hh,t:ph}=Tf,koe=Sw,{compareIdentifiers:Lv}=cL;let xoe=class si{constructor(t,n){if(n=koe(n),t instanceof si){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>xC)throw new TypeError(`version is longer than ${xC} characters`);dh("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const r=t.trim().match(n.loose?hh[ph.LOOSE]:hh[ph.FULL]);if(!r)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>fh||this.major<0)throw new TypeError("Invalid major version");if(this.minor>fh||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>fh||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){const i=+s;if(i>=0&&i<fh)return i}return s}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(dh("SemVer.compare",this.version,this.options,t),!(t instanceof si)){if(typeof t=="string"&&t===this.version)return 0;t=new si(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof si||(t=new si(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:this.patch>t.patch?1:0}comparePre(t){if(t instanceof si||(t=new si(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{const r=this.prerelease[n],s=t.prerelease[n];if(dh("prerelease compare",n,r,s),r===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(r===void 0)return-1;if(r===s)continue;return Lv(r,s)}while(++n)}compareBuild(t){t instanceof si||(t=new si(t,this.options));let n=0;do{const r=this.build[n],s=t.build[n];if(dh("build compare",n,r,s),r===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(r===void 0)return-1;if(r===s)continue;return Lv(r,s)}while(++n)}inc(t,n,r){if(t.startsWith("pre")){if(!n&&r===!1)throw new Error("invalid increment argument: identifier is empty");if(n){const s=`-${n}`.match(this.options.loose?hh[ph.PRERELEASELOOSE]:hh[ph.PRERELEASE]);if(!s||s[1]!==n)throw new Error(`invalid identifier: ${n}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,r),this.inc("pre",n,r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,r),this.inc("pre",n,r);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const s=Number(r)?1:0;if(this.prerelease.length===0)this.prerelease=[s];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(n===this.prerelease.join(".")&&r===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(n){let i=[n,s];r===!1&&(i=[n]),Lv(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var Tr=xoe;const EC=Tr,Eoe=(e,t,n=!1)=>{if(e instanceof EC)return e;try{return new EC(e,t)}catch(r){if(!n)return null;throw r}};var bc=Eoe;const Coe=bc,Toe=(e,t)=>{const n=Coe(e,t);return n?n.version:null};var Roe=Toe;const Poe=bc,Ioe=(e,t)=>{const n=Poe(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};var Aoe=Ioe;const CC=Tr,Ooe=(e,t,n,r,s)=>{typeof n=="string"&&(s=r,r=n,n=void 0);try{return new CC(e instanceof CC?e.version:e,n).inc(t,r,s).version}catch{return null}};var Doe=Ooe;const TC=bc,Moe=(e,t)=>{const n=TC(e,null,!0),r=TC(t,null,!0),s=n.compare(r);if(s===0)return null;const i=s>0,o=i?n:r,a=i?r:n,l=!!o.prerelease.length;if(!!a.prerelease.length&&!l){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0)return a.minor&&!a.patch?"minor":"patch"}const c=l?"pre":"";return n.major!==r.major?c+"major":n.minor!==r.minor?c+"minor":n.patch!==r.patch?c+"patch":"prerelease"};var Loe=Moe;const Foe=Tr,$oe=(e,t)=>new Foe(e,t).major;var Noe=$oe;const Boe=Tr,Voe=(e,t)=>new Boe(e,t).minor;var Uoe=Voe;const zoe=Tr,Hoe=(e,t)=>new zoe(e,t).patch;var joe=Hoe;const Woe=bc,qoe=(e,t)=>{const n=Woe(e,t);return n&&n.prerelease.length?n.prerelease:null};var Goe=qoe;const RC=Tr,Koe=(e,t,n)=>new RC(e,n).compare(new RC(t,n));var Ys=Koe;const Yoe=Ys,Xoe=(e,t,n)=>Yoe(t,e,n);var Qoe=Xoe;const Joe=Ys,Zoe=(e,t)=>Joe(e,t,!0);var eae=Zoe;const PC=Tr,tae=(e,t,n)=>{const r=new PC(e,n),s=new PC(t,n);return r.compare(s)||r.compareBuild(s)};var _w=tae;const nae=_w,rae=(e,t)=>e.sort((n,r)=>nae(n,r,t));var sae=rae;const iae=_w,oae=(e,t)=>e.sort((n,r)=>iae(r,n,t));var aae=oae;const lae=Ys,uae=(e,t,n)=>lae(e,t,n)>0;var fg=uae;const cae=Ys,dae=(e,t,n)=>cae(e,t,n)<0;var kw=dae;const fae=Ys,hae=(e,t,n)=>fae(e,t,n)===0;var dL=hae;const pae=Ys,mae=(e,t,n)=>pae(e,t,n)!==0;var fL=mae;const gae=Ys,vae=(e,t,n)=>gae(e,t,n)>=0;var xw=vae;const yae=Ys,bae=(e,t,n)=>yae(e,t,n)<=0;var Ew=bae;const wae=dL,Sae=fL,_ae=fg,kae=xw,xae=kw,Eae=Ew,Cae=(e,t,n,r)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e===n;case"!==":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e!==n;case"":case"=":case"==":return wae(e,n,r);case"!=":return Sae(e,n,r);case">":return _ae(e,n,r);case">=":return kae(e,n,r);case"<":return xae(e,n,r);case"<=":return Eae(e,n,r);default:throw new TypeError(`Invalid operator: ${t}`)}};var hL=Cae;const Tae=Tr,Rae=bc,{safeRe:mh,t:gh}=Tf,Pae=(e,t)=>{if(e instanceof Tae)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let n=null;if(!t.rtl)n=e.match(t.includePrerelease?mh[gh.COERCEFULL]:mh[gh.COERCE]);else{const l=t.includePrerelease?mh[gh.COERCERTLFULL]:mh[gh.COERCERTL];let u;for(;(u=l.exec(e))&&(!n||n.index+n[0].length!==e.length);)(!n||u.index+u[0].length!==n.index+n[0].length)&&(n=u),l.lastIndex=u.index+u[1].length+u[2].length;l.lastIndex=-1}if(n===null)return null;const r=n[2],s=n[3]||"0",i=n[4]||"0",o=t.includePrerelease&&n[5]?`-${n[5]}`:"",a=t.includePrerelease&&n[6]?`+${n[6]}`:"";return Rae(`${r}.${s}.${i}${o}${a}`,t)};var Iae=Pae;class Aae{constructor(){this.max=1e3,this.map=new Map}get(t){const n=this.map.get(t);if(n!==void 0)return this.map.delete(t),this.map.set(t,n),n}delete(t){return this.map.delete(t)}set(t,n){if(!this.delete(t)&&n!==void 0){if(this.map.size>=this.max){const s=this.map.keys().next().value;this.delete(s)}this.map.set(t,n)}return this}}var Oae=Aae,Fv,IC;function Xs(){if(IC)return Fv;IC=1;const e=/\s+/g;class t{constructor(F,W){if(W=s(W),F instanceof t)return F.loose===!!W.loose&&F.includePrerelease===!!W.includePrerelease?F:new t(F.raw,W);if(F instanceof i)return this.raw=F.value,this.set=[[F]],this.formatted=void 0,this;if(this.options=W,this.loose=!!W.loose,this.includePrerelease=!!W.includePrerelease,this.raw=F.trim().replace(e," "),this.set=this.raw.split("||").map(X=>this.parseRange(X.trim())).filter(X=>X.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const X=this.set[0];if(this.set=this.set.filter(V=>!m(V[0])),this.set.length===0)this.set=[X];else if(this.set.length>1){for(const V of this.set)if(V.length===1&&y(V[0])){this.set=[V];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let F=0;F<this.set.length;F++){F>0&&(this.formatted+="||");const W=this.set[F];for(let X=0;X<W.length;X++)X>0&&(this.formatted+=" "),this.formatted+=W[X].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(F){const X=((this.options.includePrerelease&&h)|(this.options.loose&&g))+":"+F,V=r.get(X);if(V)return V;const z=this.options.loose,M=z?l[u.HYPHENRANGELOOSE]:l[u.HYPHENRANGE];F=F.replace(M,L(this.options.includePrerelease)),o("hyphen replace",F),F=F.replace(l[u.COMPARATORTRIM],c),o("comparator trim",F),F=F.replace(l[u.TILDETRIM],d),o("tilde trim",F),F=F.replace(l[u.CARETTRIM],f),o("caret trim",F);let re=F.split(" ").map(J=>b(J,this.options)).join(" ").split(/\s+/).map(J=>A(J,this.options));z&&(re=re.filter(J=>(o("loose invalid filter",J,this.options),!!J.match(l[u.COMPARATORLOOSE])))),o("range list",re);const H=new Map,j=re.map(J=>new i(J,this.options));for(const J of j){if(m(J))return[J];H.set(J.value,J)}H.size>1&&H.has("")&&H.delete("");const pe=[...H.values()];return r.set(X,pe),pe}intersects(F,W){if(!(F instanceof t))throw new TypeError("a Range is required");return this.set.some(X=>w(X,W)&&F.set.some(V=>w(V,W)&&X.every(z=>V.every(M=>z.intersects(M,W)))))}test(F){if(!F)return!1;if(typeof F=="string")try{F=new a(F,this.options)}catch{return!1}for(let W=0;W<this.set.length;W++)if(B(this.set[W],F,this.options))return!0;return!1}}Fv=t;const n=Oae,r=new n,s=Sw,i=hg(),o=dg,a=Tr,{safeRe:l,t:u,comparatorTrimReplace:c,tildeTrimReplace:d,caretTrimReplace:f}=Tf,{FLAG_INCLUDE_PRERELEASE:h,FLAG_LOOSE:g}=cg,m=O=>O.value==="<0.0.0-0",y=O=>O.value==="",w=(O,F)=>{let W=!0;const X=O.slice();let V=X.pop();for(;W&&X.length;)W=X.every(z=>V.intersects(z,F)),V=X.pop();return W},b=(O,F)=>(O=O.replace(l[u.BUILD],""),o("comp",O,F),O=T(O,F),o("caret",O),O=_(O,F),o("tildes",O),O=x(O,F),o("xrange",O),O=P(O,F),o("stars",O),O),S=O=>!O||O.toLowerCase()==="x"||O==="*",_=(O,F)=>O.trim().split(/\s+/).map(W=>k(W,F)).join(" "),k=(O,F)=>{const W=F.loose?l[u.TILDELOOSE]:l[u.TILDE];return O.replace(W,(X,V,z,M,re)=>{o("tilde",O,X,V,z,M,re);let H;return S(V)?H="":S(z)?H=`>=${V}.0.0 <${+V+1}.0.0-0`:S(M)?H=`>=${V}.${z}.0 <${V}.${+z+1}.0-0`:re?(o("replaceTilde pr",re),H=`>=${V}.${z}.${M}-${re} <${V}.${+z+1}.0-0`):H=`>=${V}.${z}.${M} <${V}.${+z+1}.0-0`,o("tilde return",H),H})},T=(O,F)=>O.trim().split(/\s+/).map(W=>R(W,F)).join(" "),R=(O,F)=>{o("caret",O,F);const W=F.loose?l[u.CARETLOOSE]:l[u.CARET],X=F.includePrerelease?"-0":"";return O.replace(W,(V,z,M,re,H)=>{o("caret",O,V,z,M,re,H);let j;return S(z)?j="":S(M)?j=`>=${z}.0.0${X} <${+z+1}.0.0-0`:S(re)?z==="0"?j=`>=${z}.${M}.0${X} <${z}.${+M+1}.0-0`:j=`>=${z}.${M}.0${X} <${+z+1}.0.0-0`:H?(o("replaceCaret pr",H),z==="0"?M==="0"?j=`>=${z}.${M}.${re}-${H} <${z}.${M}.${+re+1}-0`:j=`>=${z}.${M}.${re}-${H} <${z}.${+M+1}.0-0`:j=`>=${z}.${M}.${re}-${H} <${+z+1}.0.0-0`):(o("no pr"),z==="0"?M==="0"?j=`>=${z}.${M}.${re}${X} <${z}.${M}.${+re+1}-0`:j=`>=${z}.${M}.${re}${X} <${z}.${+M+1}.0-0`:j=`>=${z}.${M}.${re} <${+z+1}.0.0-0`),o("caret return",j),j})},x=(O,F)=>(o("replaceXRanges",O,F),O.split(/\s+/).map(W=>I(W,F)).join(" ")),I=(O,F)=>{O=O.trim();const W=F.loose?l[u.XRANGELOOSE]:l[u.XRANGE];return O.replace(W,(X,V,z,M,re,H)=>{o("xRange",O,X,V,z,M,re,H);const j=S(z),pe=j||S(M),J=pe||S(re),we=J;return V==="="&&we&&(V=""),H=F.includePrerelease?"-0":"",j?V===">"||V==="<"?X="<0.0.0-0":X="*":V&&we?(pe&&(M=0),re=0,V===">"?(V=">=",pe?(z=+z+1,M=0,re=0):(M=+M+1,re=0)):V==="<="&&(V="<",pe?z=+z+1:M=+M+1),V==="<"&&(H="-0"),X=`${V+z}.${M}.${re}${H}`):pe?X=`>=${z}.0.0${H} <${+z+1}.0.0-0`:J&&(X=`>=${z}.${M}.0${H} <${z}.${+M+1}.0-0`),o("xRange return",X),X})},P=(O,F)=>(o("replaceStars",O,F),O.trim().replace(l[u.STAR],"")),A=(O,F)=>(o("replaceGTE0",O,F),O.trim().replace(l[F.includePrerelease?u.GTE0PRE:u.GTE0],"")),L=O=>(F,W,X,V,z,M,re,H,j,pe,J,we)=>(S(X)?W="":S(V)?W=`>=${X}.0.0${O?"-0":""}`:S(z)?W=`>=${X}.${V}.0${O?"-0":""}`:M?W=`>=${W}`:W=`>=${W}${O?"-0":""}`,S(j)?H="":S(pe)?H=`<${+j+1}.0.0-0`:S(J)?H=`<${j}.${+pe+1}.0-0`:we?H=`<=${j}.${pe}.${J}-${we}`:O?H=`<${j}.${pe}.${+J+1}-0`:H=`<=${H}`,`${W} ${H}`.trim()),B=(O,F,W)=>{for(let X=0;X<O.length;X++)if(!O[X].test(F))return!1;if(F.prerelease.length&&!W.includePrerelease){for(let X=0;X<O.length;X++)if(o(O[X].semver),O[X].semver!==i.ANY&&O[X].semver.prerelease.length>0){const V=O[X].semver;if(V.major===F.major&&V.minor===F.minor&&V.patch===F.patch)return!0}return!1}return!0};return Fv}var $v,AC;function hg(){if(AC)return $v;AC=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(c,d){if(d=n(d),c instanceof t){if(c.loose===!!d.loose)return c;c=c.value}c=c.trim().split(/\s+/).join(" "),o("comparator",c,d),this.options=d,this.loose=!!d.loose,this.parse(c),this.semver===e?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(c){const d=this.options.loose?r[s.COMPARATORLOOSE]:r[s.COMPARATOR],f=c.match(d);if(!f)throw new TypeError(`Invalid comparator: ${c}`);this.operator=f[1]!==void 0?f[1]:"",this.operator==="="&&(this.operator=""),f[2]?this.semver=new a(f[2],this.options.loose):this.semver=e}toString(){return this.value}test(c){if(o("Comparator.test",c,this.options.loose),this.semver===e||c===e)return!0;if(typeof c=="string")try{c=new a(c,this.options)}catch{return!1}return i(c,this.operator,this.semver,this.options)}intersects(c,d){if(!(c instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new l(c.value,d).test(this.value):c.operator===""?c.value===""?!0:new l(this.value,d).test(c.semver):(d=n(d),d.includePrerelease&&(this.value==="<0.0.0-0"||c.value==="<0.0.0-0")||!d.includePrerelease&&(this.value.startsWith("<0.0.0")||c.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&c.operator.startsWith(">")||this.operator.startsWith("<")&&c.operator.startsWith("<")||this.semver.version===c.semver.version&&this.operator.includes("=")&&c.operator.includes("=")||i(this.semver,"<",c.semver,d)&&this.operator.startsWith(">")&&c.operator.startsWith("<")||i(this.semver,">",c.semver,d)&&this.operator.startsWith("<")&&c.operator.startsWith(">")))}}$v=t;const n=Sw,{safeRe:r,t:s}=Tf,i=hL,o=dg,a=Tr,l=Xs();return $v}const Dae=Xs(),Mae=(e,t,n)=>{try{t=new Dae(t,n)}catch{return!1}return t.test(e)};var pg=Mae;const Lae=Xs(),Fae=(e,t)=>new Lae(e,t).set.map(n=>n.map(r=>r.value).join(" ").trim().split(" "));var $ae=Fae;const Nae=Tr,Bae=Xs(),Vae=(e,t,n)=>{let r=null,s=null,i=null;try{i=new Bae(t,n)}catch{return null}return e.forEach(o=>{i.test(o)&&(!r||s.compare(o)===-1)&&(r=o,s=new Nae(r,n))}),r};var Uae=Vae;const zae=Tr,Hae=Xs(),jae=(e,t,n)=>{let r=null,s=null,i=null;try{i=new Hae(t,n)}catch{return null}return e.forEach(o=>{i.test(o)&&(!r||s.compare(o)===1)&&(r=o,s=new zae(r,n))}),r};var Wae=jae;const Nv=Tr,qae=Xs(),OC=fg,Gae=(e,t)=>{e=new qae(e,t);let n=new Nv("0.0.0");if(e.test(n)||(n=new Nv("0.0.0-0"),e.test(n)))return n;n=null;for(let r=0;r<e.set.length;++r){const s=e.set[r];let i=null;s.forEach(o=>{const a=new Nv(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!i||OC(a,i))&&(i=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),i&&(!n||OC(n,i))&&(n=i)}return n&&e.test(n)?n:null};var Kae=Gae;const Yae=Xs(),Xae=(e,t)=>{try{return new Yae(e,t).range||"*"}catch{return null}};var Qae=Xae;const Jae=Tr,pL=hg(),{ANY:Zae}=pL,ele=Xs(),tle=pg,DC=fg,MC=kw,nle=Ew,rle=xw,sle=(e,t,n,r)=>{e=new Jae(e,r),t=new ele(t,r);let s,i,o,a,l;switch(n){case">":s=DC,i=nle,o=MC,a=">",l=">=";break;case"<":s=MC,i=rle,o=DC,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(tle(e,t,r))return!1;for(let u=0;u<t.set.length;++u){const c=t.set[u];let d=null,f=null;if(c.forEach(h=>{h.semver===Zae&&(h=new pL(">=0.0.0")),d=d||h,f=f||h,s(h.semver,d.semver,r)?d=h:o(h.semver,f.semver,r)&&(f=h)}),d.operator===a||d.operator===l||(!f.operator||f.operator===a)&&i(e,f.semver))return!1;if(f.operator===l&&o(e,f.semver))return!1}return!0};var Cw=sle;const ile=Cw,ole=(e,t,n)=>ile(e,t,">",n);var ale=ole;const lle=Cw,ule=(e,t,n)=>lle(e,t,"<",n);var cle=ule;const LC=Xs(),dle=(e,t,n)=>(e=new LC(e,n),t=new LC(t,n),e.intersects(t,n));var fle=dle;const hle=pg,ple=Ys;var mle=(e,t,n)=>{const r=[];let s=null,i=null;const o=e.sort((c,d)=>ple(c,d,n));for(const c of o)hle(c,t,n)?(i=c,s||(s=c)):(i&&r.push([s,i]),i=null,s=null);s&&r.push([s,null]);const a=[];for(const[c,d]of r)c===d?a.push(c):!d&&c===o[0]?a.push("*"):d?c===o[0]?a.push(`<=${d}`):a.push(`${c} - ${d}`):a.push(`>=${c}`);const l=a.join(" || "),u=typeof t.raw=="string"?t.raw:String(t);return l.length<u.length?l:t};const FC=Xs(),Tw=hg(),{ANY:Bv}=Tw,Fc=pg,Rw=Ys,gle=(e,t,n={})=>{if(e===t)return!0;e=new FC(e,n),t=new FC(t,n);let r=!1;e:for(const s of e.set){for(const i of t.set){const o=yle(s,i,n);if(r=r||o!==null,o)continue e}if(r)return!1}return!0},vle=[new Tw(">=0.0.0-0")],$C=[new Tw(">=0.0.0")],yle=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===Bv){if(t.length===1&&t[0].semver===Bv)return!0;n.includePrerelease?e=vle:e=$C}if(t.length===1&&t[0].semver===Bv){if(n.includePrerelease)return!0;t=$C}const r=new Set;let s,i;for(const h of e)h.operator===">"||h.operator===">="?s=NC(s,h,n):h.operator==="<"||h.operator==="<="?i=BC(i,h,n):r.add(h.semver);if(r.size>1)return null;let o;if(s&&i){if(o=Rw(s.semver,i.semver,n),o>0)return null;if(o===0&&(s.operator!==">="||i.operator!=="<="))return null}for(const h of r){if(s&&!Fc(h,String(s),n)||i&&!Fc(h,String(i),n))return null;for(const g of t)if(!Fc(h,String(g),n))return!1;return!0}let a,l,u,c,d=i&&!n.includePrerelease&&i.semver.prerelease.length?i.semver:!1,f=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1;d&&d.prerelease.length===1&&i.operator==="<"&&d.prerelease[0]===0&&(d=!1);for(const h of t){if(c=c||h.operator===">"||h.operator===">=",u=u||h.operator==="<"||h.operator==="<=",s){if(f&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===f.major&&h.semver.minor===f.minor&&h.semver.patch===f.patch&&(f=!1),h.operator===">"||h.operator===">="){if(a=NC(s,h,n),a===h&&a!==s)return!1}else if(s.operator===">="&&!Fc(s.semver,String(h),n))return!1}if(i){if(d&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===d.major&&h.semver.minor===d.minor&&h.semver.patch===d.patch&&(d=!1),h.operator==="<"||h.operator==="<="){if(l=BC(i,h,n),l===h&&l!==i)return!1}else if(i.operator==="<="&&!Fc(i.semver,String(h),n))return!1}if(!h.operator&&(i||s)&&o!==0)return!1}return!(s&&u&&!i&&o!==0||i&&c&&!s&&o!==0||f||d)},NC=(e,t,n)=>{if(!e)return t;const r=Rw(e.semver,t.semver,n);return r>0?e:r<0||t.operator===">"&&e.operator===">="?t:e},BC=(e,t,n)=>{if(!e)return t;const r=Rw(e.semver,t.semver,n);return r<0?e:r>0||t.operator==="<"&&e.operator==="<="?t:e};var ble=gle;const Vv=Tf,VC=cg,wle=Tr,UC=cL,Sle=bc,_le=Roe,kle=Aoe,xle=Doe,Ele=Loe,Cle=Noe,Tle=Uoe,Rle=joe,Ple=Goe,Ile=Ys,Ale=Qoe,Ole=eae,Dle=_w,Mle=sae,Lle=aae,Fle=fg,$le=kw,Nle=dL,Ble=fL,Vle=xw,Ule=Ew,zle=hL,Hle=Iae,jle=hg(),Wle=Xs(),qle=pg,Gle=$ae,Kle=Uae,Yle=Wae,Xle=Kae,Qle=Qae,Jle=Cw,Zle=ale,eue=cle,tue=fle,nue=mle,rue=ble;var $c={parse:Sle,valid:_le,clean:kle,inc:xle,diff:Ele,major:Cle,minor:Tle,patch:Rle,prerelease:Ple,compare:Ile,rcompare:Ale,compareLoose:Ole,compareBuild:Dle,sort:Mle,rsort:Lle,gt:Fle,lt:$le,eq:Nle,neq:Ble,gte:Vle,lte:Ule,cmp:zle,coerce:Hle,Comparator:jle,Range:Wle,satisfies:qle,toComparators:Gle,maxSatisfying:Kle,minSatisfying:Yle,minVersion:Xle,validRange:Qle,outside:Jle,gtr:Zle,ltr:eue,intersects:tue,simplifyRange:nue,subset:rue,SemVer:wle,re:Vv.re,src:Vv.src,tokens:Vv.t,SEMVER_SPEC_VERSION:VC.SEMVER_SPEC_VERSION,RELEASE_TYPES:VC.RELEASE_TYPES,compareIdentifiers:UC.compareIdentifiers,rcompareIdentifiers:UC.rcompareIdentifiers};const sue={key:0},iue={key:1},oue={key:0},aue=Ve({__name:"SoftwareUpgradeSettings",setup(e){const t=G(""),n=G(!0),r=G(!1),s=G(!1),i=G(""),o=G(""),a=G(w2),l=G(),u=G(),c=G(),d=G(!1),f=G([]);xt(async()=>{var I;await h();const x=await Ia.getVersion();i.value=x.version,o.value=((I=x.monsterPi)==null?void 0:I.trim())||""});async function h(){n.value=!0,t.value="",r.value=!1;try{const x=await Ia.getGithubRateLimit();if(x.rate.remaining===0){const P=new Date(x.rate.reset).toLocaleTimeString(),A=x.rate.reset*1e3-Date.now(),L=Math.ceil(A/6e4);t.value=`Server has reached a rate limit of the Github API. This limit will be reset at ${P} (in ${L} minutes)`,n.value=!1,r.value=!0;return}}catch{n.value=!1;return}try{const x=await Ia.getClientReleases();l.value=x.current,u.value=x.minimum,f.value=x.releases}catch(x){t.value="An error occurred loading the releases: "+x.message}finally{n.value=!1}}const g=D(()=>f.value.filter(x=>{const I=$c.minor(x.tag_name)===$c.minor(u.value.tag_name),P=S(x),A=x.draft;return I&&(y()||d.value||!P)&&!A})),m=D(()=>y());function y(){const x=l.value;return S(x)}function w(x){return T(x)||!k(x,l.value)||_(x)}function b(x){const I=S(x)?`${x.tag_name}, unstable`:x.tag_name;return T(x)?`${I}, currently installed`:_(x)?`${I}, below minimum`:k(x,l.value)?I:`${I}, downgrade not allowed`}function S(x){var I;return(I=x==null?void 0:x.tag_name)!=null&&I.length?x.prerelease||x.tag_name.includes("rc")||x.tag_name.includes("unstable"):!1}function _(x){return $c.compare(x.tag_name,u.value.tag_name)===-1}function k(x,I){if(!I)throw new Error("No current release is known, cannot compare.");return s.value?!0:$c.compare(x.tag_name,I.tag_name)!==-1&&$c.compare(x.tag_name,u.value.tag_name)!==-1}function T(x){var I;return x.tag_name===((I=l.value)==null?void 0:I.tag_name)}async function R(x){confirm("Are you sure? This might cause breaking changes, if the server is outdated")&&(await Ia.updateClientDistGithub(x,s.value),location.reload())}return(x,I)=>($(),te(kt,null,{default:v(()=>[p(kr,{color:"primary"},{default:v(()=>[p(dt,null,{default:v(()=>[p(ee,null,{default:v(()=>[...I[5]||(I[5]=[E("upgrade",-1)])]),_:1})]),_:1}),p($n,null,{default:v(()=>[...I[6]||(I[6]=[E(" Software Upgrade",-1)])]),_:1})]),_:1}),p(Ht,{lines:"three"},{default:v(()=>[p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...I[7]||(I[7]=[E(" Current versions in use:",-1)])]),_:1}),p(_t,null,{default:v(()=>[E(" Your server's version is: "+ae(i.value),1)]),_:1}),p(_t,null,{default:v(()=>[E(" Your client's version is: "+ae(a.value),1)]),_:1}),p(_t,null,{default:v(()=>[o.value?($(),ye("div",sue,[I[8]||(I[8]=E(" MonsterPi: ",-1)),I[9]||(I[9]=C("div",null,"Your MonsterPi version is:",-1)),E(" "+ae(o.value),1)])):($(),ye("div",iue,[...I[10]||(I[10]=[E(" MonsterPi: ",-1),C("div",null,"No MonsterPi distro was detected.",-1)])]))]),_:1})]),_:1})]),_:1}),p(cn),p(Ht,{lines:"three",subheader:""},{default:v(()=>[p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...I[11]||(I[11]=[E(" Server upgrade",-1)])]),_:1}),p(_t,null,{default:v(()=>[...I[12]||(I[12]=[E(" Please visit ",-1),C("a",{href:"https://docs.fdm-monster.net/docs/installing/"}," the installation documentation ",-1),E(" for instructions on how to upgrade the server. ",-1)])]),_:1})]),_:1})]),_:1}),p(cn),p(Ht,{lines:"three"},{default:v(()=>[p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...I[13]||(I[13]=[E(" Client upgrade",-1)])]),_:1}),p(_t,null,{default:v(()=>[...I[14]||(I[14]=[E(" Please visit ",-1),C("a",{href:"https://docs.fdm-monster.net/docs/configuration/updating_client_bundle"}," the installation documentation ",-1),E(" for instructions on how to upgrade the client bundle. ",-1)])]),_:1}),p(_t,null,{default:v(()=>[...I[15]||(I[15]=[E(" Upgrade the client webapp for quickly retrieving small fixes and features ",-1)])]),_:1})]),_:1}),p(ze,null,{default:v(()=>{var P,A,L;return[p(ft,null,{default:v(()=>[...I[16]||(I[16]=[E(" Select a release to upgrade to:",-1)])]),_:1}),p(_t,{class:"mt-2"},{default:v(()=>{var B;return[E(" Minimum required version: "+ae((B=u.value)==null?void 0:B.tag_name),1)]}),_:1}),n.value?($(),ye("span",oue,[p(yn,null,{default:v(()=>[...I[17]||(I[17]=[E(" Loading releases... ",-1)])]),_:1})])):ve("",!0),!n.value&&!((P=g.value)!=null&&P.length)?($(),te(yn,{key:1},{default:v(()=>[...I[18]||(I[18]=[E(" No releases to show. ",-1)])]),_:1})):ve("",!0),p(BD,{modelValue:c.value,"onUpdate:modelValue":I[0]||(I[0]=B=>c.value=B)},{default:v(()=>[($(!0),ye(De,null,Zt(g.value,B=>($(),te(sb,{key:B.tag_name,disabled:w(B),label:b(B),value:B.tag_name},null,8,["disabled","label","value"]))),128))]),_:1},8,["modelValue"]),C("div",null,[d.value?($(),te(yn,{key:0,color:"primary","max-width":"500px"},{default:v(()=>[...I[19]||(I[19]=[E(" You are viewing prereleases, please install such versions at your own risk! ",-1)])]),_:1})):ve("",!0)]),C("div",null,[p(wn,{modelValue:s.value,"onUpdate:modelValue":I[1]||(I[1]=B=>s.value=B),label:"Allow downgrade"},null,8,["modelValue"]),p(wn,{modelValue:d.value,"onUpdate:modelValue":I[2]||(I[2]=B=>d.value=B),disabled:m.value,label:m.value?"Show prerelease versions (Currently already on prerelease version)":"Show prerelease versions"},null,8,["modelValue","disabled","label"])]),p(se,{class:"mt-2 mr-4",color:"secondary",onClick:I[3]||(I[3]=B=>h())},{default:v(()=>[...I[20]||(I[20]=[E(" Reload release version list ",-1)])]),_:1}),p(se,{disabled:!((A=c.value)!=null&&A.length)||c.value===((L=l.value)==null?void 0:L.tag_name),class:"mt-2",color:"primary",variant:"flat",onClick:I[4]||(I[4]=B=>R(c.value))},{default:v(()=>[p(ee,null,{default:v(()=>[...I[21]||(I[21]=[E("upgrade",-1)])]),_:1}),I[22]||(I[22]=E(" Upgrade/downgrade client ",-1))]),_:1},8,["disabled"])]}),_:1})]),_:1})]),_:1}))}}),lue=Ve({__name:"DiagnosticsSettings",setup(e){const t=$t(),n=Ks(),r=G(!1);xt(async()=>{var l;await n.loadSettings(),r.value=((l=n.serverSettings)==null?void 0:l.sentryDiagnosticsEnabled)||!1});async function s(){await En.setSentryDiagnosticsSettings(r.value),VM(r.value)}async function i(){const l=`Test Error ${Date.now()} Sentry enabled: ${r.value}`;try{throw new Error(l)}catch(u){gi(u),t.openInfoMessage({title:"Test report was sent",subtitle:`Content: ${l}`})}}async function o(){await zp.downloadLogDump()}async function a(){await zp.clearLogFilesOlderThanWeek(),t.openInfoMessage({title:"Action success",subtitle:"Log files older than a week have been deleted"})}return(l,u)=>($(),te(kt,null,{default:v(()=>[p(kr,{color:"primary"},{default:v(()=>[p(dt,null,{default:v(()=>[p(ee,null,{default:v(()=>[...u[5]||(u[5]=[E("bug_report",-1)])]),_:1})]),_:1}),p($n,null,{default:v(()=>[...u[6]||(u[6]=[E(" Diagnostics",-1)])]),_:1})]),_:1}),p(Ht,{lines:"three",subheader:""},{default:v(()=>[p(Ur,null,{default:v(()=>[...u[7]||(u[7]=[E(" Diagnostics to provide bug reports to the developers of this software ",-1)])]),_:1}),p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...u[8]||(u[8]=[E(" Remote Sentry diagnostic reports: ",-1)])]),_:1}),p(_t,null,{default:v(()=>[p(wn,{modelValue:r.value,"onUpdate:modelValue":u[0]||(u[0]=c=>r.value=c),label:"Enable remote Sentry diagnostic reports"},null,8,["modelValue"])]),_:1}),p(_t,null,{default:v(()=>[p(se,{color:"primary",onClick:u[1]||(u[1]=c=>s())},{default:v(()=>[p(ee,{class:"pr-2"},{default:v(()=>[...u[9]||(u[9]=[E("save",-1)])]),_:1}),u[10]||(u[10]=E(" Save ",-1))]),_:1}),p(se,{color:"secondary",onClick:u[2]||(u[2]=c=>i())},{default:v(()=>[p(ee,{class:"pr-2"},{default:v(()=>[...u[11]||(u[11]=[E("bug_report",-1)])]),_:1}),u[12]||(u[12]=E(" Test Error ",-1))]),_:1})]),_:1})]),_:1}),p(cn),p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...u[13]||(u[13]=[E(" Logs Dump",-1)])]),_:1}),p(_t,null,{default:v(()=>[...u[14]||(u[14]=[E(" Download a .zip file containing all logs from the server ",-1)])]),_:1}),p(_t,null,{default:v(()=>[u[17]||(u[17]=C("br",null,null,-1)),p(se,{color:"primary",onClick:u[3]||(u[3]=c=>o())},{default:v(()=>[p(ee,null,{default:v(()=>[...u[15]||(u[15]=[E("download",-1)])]),_:1}),u[16]||(u[16]=E(" Download Log Files (.zip) ",-1))]),_:1})]),_:1})]),_:1}),p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...u[18]||(u[18]=[E(" Clear log files",-1)])]),_:1}),p(_t,null,{default:v(()=>[u[21]||(u[21]=C("br",null,null,-1)),p(se,{color:"default",onClick:u[4]||(u[4]=c=>a())},{default:v(()=>[p(ee,null,{default:v(()=>[...u[19]||(u[19]=[E("download",-1)])]),_:1}),u[20]||(u[20]=E(" Clear log files older than a week ",-1))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}});class uue extends Cr{static async getCompletions(){const t=`${$e.printCompletionRoute}`;return await this.get(t)}}const mL=Ve({__name:"PrintStatistics",setup(e){const t=G([]),n=G([]),r=G(""),s=Xt(),i=fo();xt(async()=>{await o()}),xe([()=>r.value],()=>{u()});const o=async()=>{t.value=[],n.value=[],t.value=await uue.getCompletions(),u()},a=c=>s.printer(c),l=c=>i.floorOfPrinter(c),u=()=>{var h;const c=s.printers.map(g=>g.id),d=c.length?t.value.filter(g=>c.includes(g.printerId)):t.value,f=(h=r.value)!=null&&h.length?d.filter(g=>{const m=s.printers.find(y=>y.id===g.printerId);return m?(m.name+m.printerURL).toLowerCase().includes(r.value.toLowerCase()):!1}):d;n.value=f.sort((g,m)=>g.failureCount===m.failureCount?g.printCount>m.printCount?-1:1:g.failureCount>m.failureCount?-1:1)};return(c,d)=>($(),te(Fd,{height:"100%",width:"100%"},{default:v(()=>[p(Xn,null,{default:v(()=>[p(st,null,{default:v(()=>[p(We,null,{default:v(()=>[p(ee,null,{default:v(()=>[...d[2]||(d[2]=[E("filter_list",-1)])]),_:1}),d[3]||(d[3]=E(" Filter by printer name (optional) ",-1))]),_:1}),p(We,null,{default:v(()=>[p(at,{modelValue:r.value,"onUpdate:modelValue":d[0]||(d[0]=f=>r.value=f),class:"p-2",clearable:"",label:"Search","prepend-icon":"search","single-line":""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),p(yn,null,{default:v(()=>[d[5]||(d[5]=E(" Please reload here if you want updated results: ",-1)),p(se,{color:"primary",size:"x-small",onClick:d[1]||(d[1]=f=>o())},{default:v(()=>[...d[4]||(d[4]=[E(" Reload ",-1)])]),_:1})]),_:1}),p(Mb,{dark:""},{default:v(()=>[d[11]||(d[11]=C("thead",null,[C("tr",null,[C("th",{class:"text-left"},"Printer name"),C("th",{class:"text-left"},"Floor"),C("th",{class:"text-left"},"Fail/ Success/ Total"),C("th",{class:"text-left"},"Last success"),C("th",{class:"text-left"},"Last failure"),C("th",{class:"text-left"},"Successes (week/48H/24H)"),C("th",{class:"text-left"},"Failures (week/48H/24H)")])],-1)),C("tbody",null,[($(!0),ye(De,null,Zt(n.value,f=>{var h,g,m,y;return $(),ye("tr",{key:f.printerId},[C("td",null,ae(((h=a(f.printerId))==null?void 0:h.name)??"?"),1),C("td",null,ae(((g=l(f.printerId))==null?void 0:g.name)??"?"),1),C("td",null,[E(" × "+ae(f.failureCount)+" / 🗸 "+ae(f.successCount)+" ",1),C("strong",null," ~"+ae(f.printCount),1)]),C("td",null,ae(Date.now()-((m=f.lastSuccess)==null?void 0:m.createdAt)||"-"),1),C("td",null,[p(ot,{location:"bottom"},JT({default:v(()=>{var w,b,S,_;return[C("span",null,[E(ae(((w=f.lastFailure)==null?void 0:w.status)||"-")+" ",1),d[7]||(d[7]=C("br",null,null,-1)),E(" "+ae((b=f.lastFailure)==null?void 0:b.createdAt)+" ",1),d[8]||(d[8]=C("br",null,null,-1)),C("small",null,ae((S=f.lastFailure)==null?void 0:S.fileName),1),d[9]||(d[9]=C("br",null,null,-1)),C("strong",null,ae((_=f.lastFailure)==null?void 0:_.completionLog),1),d[10]||(d[10]=C("br",null,null,-1))])]}),_:2},[(y=f.lastFailure)!=null&&y.status?{name:"activator",fn:v(({props:w})=>[p(ee,ge({ref_for:!0},w),{default:v(()=>[...d[6]||(d[6]=[E("info",-1)])]),_:1},16)]),key:"0"}:void 0]),1024)]),C("td",null,ae(f.successEventsLastWeek)+" "+ae(f.successEventsLast48H)+" "+ae(f.successEventsLast24H),1),C("td",null,ae(f.failureEventsLastWeek)+" "+ae(f.failureEventsLast48H)+" "+ae(f.failureEventsLast24H),1)])}),128))])]),_:1})]),_:1}))}}),cue=Ve({name:"PrintStatisticsView",components:{PrintStatistics:mL}});function due(e,t,n,r,s,i){const o=mL;return $(),te(Xn,null,{default:v(()=>[p(o)]),_:1})}const fue=El(cue,[["render",due]]),hue=Ve({__name:"ExperimentalSettings",setup(e){const t=G(!1),n=G(!1),r=G(!1),s=G(!1);async function i(){const u=await En.getSettings();t.value=u.server.experimentalMoonrakerSupport,n.value=u.server.experimentalPrusaLinkSupport,r.value=u.server.experimentalTypeormSupport,s.value=u.server.experimentalClientSupport}xt(async()=>{await i()});const o=async()=>{await En.updateExperimentalMoonrakerSupport(t.value),await En.updateExperimentalPrusaLinkSupport(n.value),await En.updateExperimentalClientSupport(s.value),await i()},a=async()=>{await En.updateExperimentalMoonrakerSupport(!1),await En.updateExperimentalPrusaLinkSupport(!1),await En.updateExperimentalClientSupport(!1),await i()},l=async()=>{await En.updateExperimentalClientSupport(s.value),window.location.reload()};return(u,c)=>($(),te(st,null,{default:v(()=>[p(We,{cols:"12"},{default:v(()=>[p(kt,null,{default:v(()=>[p(un,null,{default:v(()=>[...c[4]||(c[4]=[C("h2",null,"Settings",-1)])]),_:1}),p(rn,null,{default:v(()=>[p(st,null,{default:v(()=>[p(We,{cols:"12",md:"6"},{default:v(()=>[p(kt,null,{default:v(()=>[p(un,null,{default:v(()=>[C("h3",null,[c[7]||(c[7]=E(" Experimental Features ",-1)),p(ot,{bottom:""},{activator:v(({props:d})=>[p(ee,ge({class:"help-icon"},d),{default:v(()=>[...c[5]||(c[5]=[E("help_outline",-1)])]),_:1},16)]),default:v(()=>[c[6]||(c[6]=C("span",{class:"tooltip-content"}," Moonraker support is currently in beta, use at your own risk. ",-1))]),_:1})])]),_:1}),p(rn,null,{default:v(()=>[p(wn,{modelValue:t.value,"onUpdate:modelValue":c[0]||(c[0]=d=>t.value=d),label:"Enable Experimental Moonraker Support","hide-details":""},{label:v(()=>[...c[8]||(c[8]=[C("span",null,"Enable Experimental Moonraker Support",-1)])]),_:1},8,["modelValue"]),p(wn,{modelValue:n.value,"onUpdate:modelValue":c[1]||(c[1]=d=>n.value=d),label:"Enable Experimental PrusaLink Support","hide-details":""},{label:v(()=>[...c[9]||(c[9]=[C("span",null,"Enable Experimental PrusaLink Support",-1)])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),p(We,{cols:"12",md:"6"},{default:v(()=>[p(kt,null,{default:v(()=>[p(un,null,{default:v(()=>[C("h3",null,[c[12]||(c[12]=E(" Database Settings ",-1)),p(ot,{bottom:""},{activator:v(({props:d})=>[p(ee,jv(ap(d)),{default:v(()=>[...c[10]||(c[10]=[E("help_outline",-1)])]),_:1},16)]),default:v(()=>[c[11]||(c[11]=C("span",{class:"tooltip-content"}," By enabling this setting you will set FDM Monster to SQLite as a database source (standalone mode). Please set 'ENABLE_EXPERIMENTAL_TYPEORM' to 'true' to enable this feature. ",-1))]),_:1})])]),_:1}),p(rn,null,{default:v(()=>[p(wn,{modelValue:r.value,"onUpdate:modelValue":c[2]||(c[2]=d=>r.value=d),label:"Enable TypeORM Support","hide-details":"",disabled:""},{label:v(()=>[...c[13]||(c[13]=[C("span",null,"Enable TypeORM Support",-1)])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),p(We,{cols:"12",md:"6"},{default:v(()=>[p(kt,null,{default:v(()=>[p(un,null,{default:v(()=>[C("h3",null,[c[16]||(c[16]=E(" Experimental Features ",-1)),p(ot,{bottom:""},{activator:v(({props:d})=>[p(ee,ge({class:"help-icon"},d),{default:v(()=>[...c[14]||(c[14]=[E("help_outline",-1)])]),_:1},16)]),default:v(()=>[c[15]||(c[15]=C("span",{class:"tooltip-content"}," Enables the next version of the FDM Monster UI (experimental). ",-1))]),_:1})])]),_:1}),p(rn,null,{default:v(()=>[p(wn,{modelValue:s.value,"onUpdate:modelValue":c[3]||(c[3]=d=>s.value=d),label:"Enable Next Client Version (Experimental)","hide-details":"",onChange:l},{label:v(()=>[...c[17]||(c[17]=[C("span",null,"Enable Next Client Version (Experimental)",-1)])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),p(zn,null,{default:v(()=>[p(Pn),p(se,{color:"primary",onClick:o},{default:v(()=>[...c[18]||(c[18]=[E("Save Settings",-1)])]),_:1}),p(se,{onClick:a},{default:v(()=>[...c[19]||(c[19]=[E("Reset to Default",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}}),jn={requiresAuth:!0},Uv={requiresAuth:!1},Pw=IQ({history:lQ("/"),routes:[{path:"/",name:Yt.Home,meta:jn,component:GZ},{path:"/first-time-setup",name:Yt.FirstTimeSetup,meta:Uv,component:aoe},{path:"/login",name:Yt.Login,meta:Uv,component:Hie},{path:"/registration",name:Yt.Registration,meta:Uv,component:qie},{path:"/printers",name:Yt.PrintersView,meta:jn,component:ate},{path:"/cameras",name:Yt.CameraGridView,meta:jn,component:Kie},{path:"/settings",component:ute,meta:jn,children:[{path:"",meta:jn,redirect:"/settings/grid"},{path:"account",meta:jn,component:coe},{path:"server-protection",meta:jn,component:foe},{path:"grid",meta:jn,component:doe},{path:"floors",meta:jn,component:Cte},{path:"user-management",meta:jn,component:Ste},{path:"printer",meta:jn,component:_te},{path:"emergency-commands",meta:jn,component:Iie},{path:"software-upgrade",meta:jn,component:aue},{path:"diagnostics",meta:jn,component:lue},{path:"experimental",meta:jn,component:hue}]},{path:"/statistics",name:Yt.PrintStatistics,meta:jn,component:fue},{path:"/about",name:"About",component:Ite},{path:"/permission-denied",name:Yt.PermissionDenied,meta:jn,component:Nie},{path:"/:pathMatch(.*)*",name:"NotFound",component:Oie}]});Pw.beforeEach(async(e,t,n)=>{var s,i;const r=vs();if(!((s=e==null?void 0:e.meta)!=null&&s.requiresAuth)||r.loginRequired===!1)return console.debug(`No auth required on route ${e.fullPath}`),n();if(console.debug(`Auth required on route ${e.fullPath} (loginRequired=${r.loginRequired}, registration=${r.registration}, wizardState=${r.wizardState}, requiresAuth=${(i=e==null?void 0:e.meta)==null?void 0:i.requiresAuth})`),r.loadTokens(),!r.hasAuthToken&&!r.hasRefreshToken){if(console.debug("Not logged in, redirecting to login page"),t.path=="/login")throw new Error("Already on login page, cannot redirect");return n({path:"/login",query:{redirect:e.fullPath}})}return n()});const pue={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"},mue={component:e=>_r(iB,{...e,class:"material-icons"})},gue={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"},vue={component:e=>_r(iP,{...e,class:"mdi"})};function yue(){return{svg:{component:sP},class:{component:iP}}}function bue(e){const t=yue(),n=(e==null?void 0:e.defaultSet)??"mdi";return n==="mdi"&&!t.mdi&&(t.mdi=vue),lr({defaultSet:n,sets:t,aliases:{...gue,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 gL(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{blueprint:t,...n}=e,r=lr(t,n),{aliases:s={},components:i={},directives:o={}}=r,a=rl();return a.run(()=>{const l=MN(r.defaults),u=YB(r.display,r.ssr),c=JN(r.theme),d=bue(r.icons),f=hB(r.locale),h=P9(r.date,f),g=LG(r.goTo,f);function m(w){for(const S in o)w.directive(S,o[S]);for(const S in i)w.component(S,i[S]);for(const S in s)w.component(S,Gu({...s[S],name:S,aliasName:s[S].name}));const b=rl();if(b.run(()=>{c.install(w)}),w.onUnmount(()=>b.stop()),w.provide(ku,l),w.provide(vy,u),w.provide(wd,c),w.provide(dy,d),w.provide(gp,f),w.provide(R9,h.options),w.provide(kx,h.instance),w.provide(zO,g),Ot&&r.ssr)if(w.$nuxt)w.$nuxt.hook("app:suspense:resolve",()=>{u.update()});else{const{mount:S}=w;w.mount=function(){const _=S(...arguments);return ht(()=>u.update()),w.mount=S,_}}w.mixin({computed:{$vuetify(){return gn({defaults:$l.call(this,ku),display:$l.call(this,vy),theme:$l.call(this,wd),icons:$l.call(this,dy),locale:$l.call(this,gp),date:$l.call(this,kx)})}}})}function y(){a.stop()}return{install:m,unmount:y,defaults:l,display:u,theme:c,icons:d,locale:f,date:h,goTo:g}})}const wue="3.11.4";gL.version=wue;function $l(e){var r,s;const t=this.$,n=((r=t.parent)==null?void 0:r.provides)??((s=t.vnode.appContext)==null?void 0:s.provides);if(n&&e in n)return n[e]}const Sue=gL({theme:{defaultTheme:"dark",themes:{dark:{dark:!0,colors:{primary:"#1eb6c3",secondary:"#424242",accent:"#82B1FF",error:"#FF5252",info:"#2196F3",success:"#4CAF50",warning:"#FFC107"}},light:{dark:!1,colors:{primary:"#9B0505",secondary:"#424242",accent:"#82B1FF",error:"#FF5252",info:"#2196F3",success:"#4CAF50",warning:"#FFC107"}}}},icons:{defaultSet:"md",aliases:pue,sets:{md:mue}}}),_ue=B$();function kue(e){e.use(Sue).use(eX).use(_ue)}const zC=(e,t,n)=>{const r=Xt(),s=rw(),i=$t();if(t!=null&&t.length){const o=t.length===1,a=t[0];e.ondrop=async l=>{var f;l.preventDefault(),e.style.border=tm;const u=(f=l.dataTransfer)==null?void 0:f.files;if(!(u!=null&&u.length))return;const c=[...Array.from(u)];let d=[];if(o){const h=c.length===1?c[0].name:null;console.debug("Single printer upload mode",t.length,c.length,h),d=FZ(a,c,!0)}else{if(c.length>1)throw"Cannot upload multiple files to multiple printers";console.debug("Multi printer upload mode",t.length,c.length);const h=c[0];d=qM(t,h,!0)}s.queueUploads(d),r.clearSelectedPrinters()}}else e.ondrop=async o=>{o.preventDefault(),e.style.border=tm,i.openInfoMessage({title:"No action performed",subtitle:"Please select one or more printers",warning:!0})}},tm="1px solid #2b2a27",xue="background-color 0.5s ease",HC="1px solid red";function Eue(){return{mounted:(e,t,n)=>{var r;e.style.border=tm,e.style.transition=xue,e.ondragenter=s=>{s.preventDefault(),e.style.border=HC},e.ondragover=s=>{s.preventDefault(),e.style.border=HC},e.ondragleave=s=>{s.preventDefault(),e.style.border=tm},zC(e,(r=t.value)==null?void 0:r.printers,n.appContext)},beforeUpdate:(e,t,n)=>{zC(e,t.value,n.appContext)}}}const zv="1px solid #2b2a27",Cue="1px solid gray",jC=(e,t,n)=>{const r=t==null?void 0:t.printerSet,s=fo();if(r){e.ondrop=null,e.ondragover=null,e.ondragleave=null;return}e.style.border=zv,e.ondrop=async i=>{var d;if(e.style.border=zv,i.preventDefault(),!i.dataTransfer)return;const o=i.dataTransfer.getData("text"),a=JSON.parse(o);if(!CZ(a)){console.debug("Drop not recognized",a);return}const u=(d=s.selectedFloor)==null?void 0:d.id;if(!u)throw new Error("Floor is not set");const c=a.printerId;if(!c)throw new Error("PrinterId was not provided");await cs.addPrinterToFloor(u,{printerId:c,x:t.x,y:t.y})},e.ondragover=i=>{i!=null&&i.dataTransfer&&(i.dataTransfer&&Array.from(i.dataTransfer.items).filter(o=>o.kind==="file").length||(e.style.border=Cue,i.preventDefault()))},e.ondragleave=i=>{e.style.border=zv,i.preventDefault()}};function Tue(){return{mounted:(e,t,n)=>{jC(e,t.value,n.appContext)},beforeUpdate:(e,t,n)=>{jC(e,t.value,n.appContext)}}}const ca=F$(pZ);console.log("[DEV: false][PROD: true]","0.0.23");fG({app:ca,dsn:"https://f64683e8d1cb4ac291434993cff1bf9b@o4503975545733120.ingest.sentry.io/4503975546912768",integrations:[mG({router:Pw}),Aq()],release:"0.0.23",environment:"production",enabled:!0,tracesSampleRate:1,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1});ca.config.errorHandler=e=>{var t;if(e instanceof sI){console.error(`An error was caught [${e.name}]:
|
|
98
|
+
${e.message}
|
|
99
|
+
${(t=e.config)==null?void 0:t.url}
|
|
100
|
+
${e.stack}`),$t().openErrorMessage({title:"An error occurred",subtitle:e.message,timeout:5e3});return}else console.error(`An error was caught [${e.name}]:
|
|
101
|
+
${e.message}
|
|
102
|
+
${e.stack}`);$t().openErrorMessage({title:"An error occurred",subtitle:e.message,timeout:5e3}),gi(e)};ca.directive("drop-upload",Eue());ca.directive("drop-printer-position",Tue());kue(ca);ca.provide("appConstants",LQ());ca.use(Pw);ca.mount("#app");
|
|
103
|
+
//# sourceMappingURL=index-Bj2_diIZ.js.map
|