22 lines
133 KiB
JavaScript
22 lines
133 KiB
JavaScript
/**
|
|
* @vue/shared v3.5.22
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/function Fn(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const ae={},Mt=[],Xe=()=>{},yr=()=>!1,Os=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),jn=e=>e.startsWith("onUpdate:"),$e=Object.assign,Un=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},Wi=Object.prototype.hasOwnProperty,se=(e,t)=>Wi.call(e,t),B=Array.isArray,Lt=e=>as(e)==="[object Map]",Nt=e=>as(e)==="[object Set]",ho=e=>as(e)==="[object Date]",W=e=>typeof e=="function",_e=e=>typeof e=="string",et=e=>typeof e=="symbol",ce=e=>e!==null&&typeof e=="object",wr=e=>(ce(e)||W(e))&&W(e.then)&&W(e.catch),xr=Object.prototype.toString,as=e=>xr.call(e),Ki=e=>as(e).slice(8,-1),Sr=e=>as(e)==="[object Object]",Vn=e=>_e(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Kt=Fn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ms=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},Gi=/-\w/g,_t=Ms(e=>e.replace(Gi,t=>t.slice(1).toUpperCase())),Ji=/\B([A-Z])/g,kt=Ms(e=>e.replace(Ji,"-$1").toLowerCase()),zr=Ms(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ws=Ms(e=>e?`on${zr(e)}`:""),bt=(e,t)=>!Object.is(e,t),gs=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},Cr=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},ws=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let po;const Ls=()=>po||(po=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function qn(e){if(B(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],o=_e(n)?Xi(n):qn(n);if(o)for(const r in o)t[r]=o[r]}return t}else if(_e(e)||ce(e))return e}const Yi=/;(?![^(]*\))/g,Zi=/:([^]+)/,Qi=/\/\*[^]*?\*\//g;function Xi(e){const t={};return e.replace(Qi,"").split(Yi).forEach(s=>{if(s){const n=s.split(Zi);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Ne(e){let t="";if(_e(e))t=e;else if(B(e))for(let s=0;s<e.length;s++){const n=Ne(e[s]);n&&(t+=n+" ")}else if(ce(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const el="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",tl=Fn(el);function $r(e){return!!e||e===""}function sl(e,t){if(e.length!==t.length)return!1;let s=!0;for(let n=0;s&&n<e.length;n++)s=cs(e[n],t[n]);return s}function cs(e,t){if(e===t)return!0;let s=ho(e),n=ho(t);if(s||n)return s&&n?e.getTime()===t.getTime():!1;if(s=et(e),n=et(t),s||n)return e===t;if(s=B(e),n=B(t),s||n)return s&&n?sl(e,t):!1;if(s=ce(e),n=ce(t),s||n){if(!s||!n)return!1;const o=Object.keys(e).length,r=Object.keys(t).length;if(o!==r)return!1;for(const i in e){const l=e.hasOwnProperty(i),c=t.hasOwnProperty(i);if(l&&!c||!l&&c||!cs(e[i],t[i]))return!1}}return String(e)===String(t)}function Bn(e,t){return e.findIndex(s=>cs(s,t))}const Pr=e=>!!(e&&e.__v_isRef===!0),N=e=>_e(e)?e:e==null?"":B(e)||ce(e)&&(e.toString===xr||!W(e.toString))?Pr(e)?N(e.value):JSON.stringify(e,kr,2):String(e),kr=(e,t)=>Pr(t)?kr(e,t.value):Lt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,o],r)=>(s[Ks(n,r)+" =>"]=o,s),{})}:Nt(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Ks(s))}:et(t)?Ks(t):ce(t)&&!B(t)&&!Sr(t)?String(t):t,Ks=(e,t="")=>{var s;return et(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};/**
|
|
* @vue/reactivity v3.5.22
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/let ze;class Er{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=ze,!t&&ze&&(this.index=(ze.scopes||(ze.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].pause();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].resume();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].resume()}}run(t){if(this._active){const s=ze;try{return ze=this,t()}finally{ze=s}}}on(){++this._on===1&&(this.prevScope=ze,ze=this)}off(){this._on>0&&--this._on===0&&(ze=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let s,n;for(s=0,n=this.effects.length;s<n;s++)this.effects[s].stop();for(this.effects.length=0,s=0,n=this.cleanups.length;s<n;s++)this.cleanups[s]();if(this.cleanups.length=0,this.scopes){for(s=0,n=this.scopes.length;s<n;s++)this.scopes[s].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function Rr(e){return new Er(e)}function Hn(){return ze}function Or(e,t=!1){ze&&ze.cleanups.push(e)}let fe;const Gs=new WeakSet;class Mr{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,ze&&ze.active&&ze.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Gs.has(this)&&(Gs.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Tr(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,go(this),Ar(this);const t=fe,s=Be;fe=this,Be=!0;try{return this.fn()}finally{Ir(this),fe=t,Be=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Gn(t);this.deps=this.depsTail=void 0,go(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Gs.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Cn(this)&&this.run()}get dirty(){return Cn(this)}}let Lr=0,Gt,Jt;function Tr(e,t=!1){if(e.flags|=8,t){e.next=Jt,Jt=e;return}e.next=Gt,Gt=e}function Wn(){Lr++}function Kn(){if(--Lr>0)return;if(Jt){let t=Jt;for(Jt=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;Gt;){let t=Gt;for(Gt=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=s}}if(e)throw e}function Ar(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ir(e){let t,s=e.depsTail,n=s;for(;n;){const o=n.prevDep;n.version===-1?(n===s&&(s=o),Gn(n),nl(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=o}e.deps=t,e.depsTail=s}function Cn(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Dr(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Dr(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===ss)||(e.globalVersion=ss,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Cn(e))))return;e.flags|=2;const t=e.dep,s=fe,n=Be;fe=e,Be=!0;try{Ar(e);const o=e.fn(e._value);(t.version===0||bt(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{fe=s,Be=n,Ir(e),e.flags&=-3}}function Gn(e,t=!1){const{dep:s,prevSub:n,nextSub:o}=e;if(n&&(n.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let r=s.computed.deps;r;r=r.nextDep)Gn(r,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function nl(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let Be=!0;const Nr=[];function ut(){Nr.push(Be),Be=!1}function ft(){const e=Nr.pop();Be=e===void 0?!0:e}function go(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=fe;fe=void 0;try{t()}finally{fe=s}}}let ss=0;class ol{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Jn{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(!fe||!Be||fe===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==fe)s=this.activeLink=new ol(fe,this),fe.deps?(s.prevDep=fe.depsTail,fe.depsTail.nextDep=s,fe.depsTail=s):fe.deps=fe.depsTail=s,Fr(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const n=s.nextDep;n.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=n),s.prevDep=fe.depsTail,s.nextDep=void 0,fe.depsTail.nextDep=s,fe.depsTail=s,fe.deps===s&&(fe.deps=n)}return s}trigger(t){this.version++,ss++,this.notify(t)}notify(t){Wn();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{Kn()}}}function Fr(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)Fr(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const xs=new WeakMap,Ct=Symbol(""),$n=Symbol(""),ns=Symbol("");function Ce(e,t,s){if(Be&&fe){let n=xs.get(e);n||xs.set(e,n=new Map);let o=n.get(s);o||(n.set(s,o=new Jn),o.map=n,o.key=s),o.track()}}function rt(e,t,s,n,o,r){const i=xs.get(e);if(!i){ss++;return}const l=c=>{c&&c.trigger()};if(Wn(),t==="clear")i.forEach(l);else{const c=B(e),d=c&&Vn(s);if(c&&s==="length"){const u=Number(n);i.forEach((h,v)=>{(v==="length"||v===ns||!et(v)&&v>=u)&&l(h)})}else switch((s!==void 0||i.has(void 0))&&l(i.get(s)),d&&l(i.get(ns)),t){case"add":c?d&&l(i.get("length")):(l(i.get(Ct)),Lt(e)&&l(i.get($n)));break;case"delete":c||(l(i.get(Ct)),Lt(e)&&l(i.get($n)));break;case"set":Lt(e)&&l(i.get(Ct));break}}Kn()}function rl(e,t){const s=xs.get(e);return s&&s.get(t)}function Et(e){const t=Q(e);return t===e?t:(Ce(t,"iterate",ns),qe(e)?t:t.map(xe))}function Ts(e){return Ce(e=Q(e),"iterate",ns),e}const il={__proto__:null,[Symbol.iterator](){return Js(this,Symbol.iterator,xe)},concat(...e){return Et(this).concat(...e.map(t=>B(t)?Et(t):t))},entries(){return Js(this,"entries",e=>(e[1]=xe(e[1]),e))},every(e,t){return nt(this,"every",e,t,void 0,arguments)},filter(e,t){return nt(this,"filter",e,t,s=>s.map(xe),arguments)},find(e,t){return nt(this,"find",e,t,xe,arguments)},findIndex(e,t){return nt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return nt(this,"findLast",e,t,xe,arguments)},findLastIndex(e,t){return nt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return nt(this,"forEach",e,t,void 0,arguments)},includes(...e){return Ys(this,"includes",e)},indexOf(...e){return Ys(this,"indexOf",e)},join(e){return Et(this).join(e)},lastIndexOf(...e){return Ys(this,"lastIndexOf",e)},map(e,t){return nt(this,"map",e,t,void 0,arguments)},pop(){return Ut(this,"pop")},push(...e){return Ut(this,"push",e)},reduce(e,...t){return mo(this,"reduce",e,t)},reduceRight(e,...t){return mo(this,"reduceRight",e,t)},shift(){return Ut(this,"shift")},some(e,t){return nt(this,"some",e,t,void 0,arguments)},splice(...e){return Ut(this,"splice",e)},toReversed(){return Et(this).toReversed()},toSorted(e){return Et(this).toSorted(e)},toSpliced(...e){return Et(this).toSpliced(...e)},unshift(...e){return Ut(this,"unshift",e)},values(){return Js(this,"values",xe)}};function Js(e,t,s){const n=Ts(e),o=n[t]();return n!==e&&!qe(e)&&(o._next=o.next,o.next=()=>{const r=o._next();return r.done||(r.value=s(r.value)),r}),o}const ll=Array.prototype;function nt(e,t,s,n,o,r){const i=Ts(e),l=i!==e&&!qe(e),c=i[t];if(c!==ll[t]){const h=c.apply(e,r);return l?xe(h):h}let d=s;i!==e&&(l?d=function(h,v){return s.call(this,xe(h),v,e)}:s.length>2&&(d=function(h,v){return s.call(this,h,v,e)}));const u=c.call(i,d,n);return l&&o?o(u):u}function mo(e,t,s,n){const o=Ts(e);let r=s;return o!==e&&(qe(e)?s.length>3&&(r=function(i,l,c){return s.call(this,i,l,c,e)}):r=function(i,l,c){return s.call(this,i,xe(l),c,e)}),o[t](r,...n)}function Ys(e,t,s){const n=Q(e);Ce(n,"iterate",ns);const o=n[t](...s);return(o===-1||o===!1)&&Yn(s[0])?(s[0]=Q(s[0]),n[t](...s)):o}function Ut(e,t,s=[]){ut(),Wn();const n=Q(e)[t].apply(e,s);return Kn(),ft(),n}const al=Fn("__proto__,__v_isRef,__isVue"),jr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(et));function cl(e){et(e)||(e=String(e));const t=Q(this);return Ce(t,"has",e),t.hasOwnProperty(e)}class Ur{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const o=this._isReadonly,r=this._isShallow;if(s==="__v_isReactive")return!o;if(s==="__v_isReadonly")return o;if(s==="__v_isShallow")return r;if(s==="__v_raw")return n===(o?r?Kr:Wr:r?Hr:Br).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const i=B(t);if(!o){let c;if(i&&(c=il[s]))return c;if(s==="hasOwnProperty")return cl}const l=Reflect.get(t,s,de(t)?t:n);if((et(s)?jr.has(s):al(s))||(o||Ce(t,"get",s),r))return l;if(de(l)){const c=i&&Vn(s)?l:l.value;return o&&ce(c)?kn(c):c}return ce(l)?o?kn(l):Is(l):l}}class Vr extends Ur{constructor(t=!1){super(!1,t)}set(t,s,n,o){let r=t[s];if(!this._isShallow){const c=yt(r);if(!qe(n)&&!yt(n)&&(r=Q(r),n=Q(n)),!B(t)&&de(r)&&!de(n))return c||(r.value=n),!0}const i=B(t)&&Vn(s)?Number(s)<t.length:se(t,s),l=Reflect.set(t,s,n,de(t)?t:o);return t===Q(o)&&(i?bt(n,r)&&rt(t,"set",s,n):rt(t,"add",s,n)),l}deleteProperty(t,s){const n=se(t,s);t[s];const o=Reflect.deleteProperty(t,s);return o&&n&&rt(t,"delete",s,void 0),o}has(t,s){const n=Reflect.has(t,s);return(!et(s)||!jr.has(s))&&Ce(t,"has",s),n}ownKeys(t){return Ce(t,"iterate",B(t)?"length":Ct),Reflect.ownKeys(t)}}class qr extends Ur{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const ul=new Vr,fl=new qr,dl=new Vr(!0),hl=new qr(!0),Pn=e=>e,ds=e=>Reflect.getPrototypeOf(e);function pl(e,t,s){return function(...n){const o=this.__v_raw,r=Q(o),i=Lt(r),l=e==="entries"||e===Symbol.iterator&&i,c=e==="keys"&&i,d=o[e](...n),u=s?Pn:t?Ss:xe;return!t&&Ce(r,"iterate",c?$n:Ct),{next(){const{value:h,done:v}=d.next();return v?{value:h,done:v}:{value:l?[u(h[0]),u(h[1])]:u(h),done:v}},[Symbol.iterator](){return this}}}}function hs(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function gl(e,t){const s={get(o){const r=this.__v_raw,i=Q(r),l=Q(o);e||(bt(o,l)&&Ce(i,"get",o),Ce(i,"get",l));const{has:c}=ds(i),d=t?Pn:e?Ss:xe;if(c.call(i,o))return d(r.get(o));if(c.call(i,l))return d(r.get(l));r!==i&&r.get(o)},get size(){const o=this.__v_raw;return!e&&Ce(Q(o),"iterate",Ct),o.size},has(o){const r=this.__v_raw,i=Q(r),l=Q(o);return e||(bt(o,l)&&Ce(i,"has",o),Ce(i,"has",l)),o===l?r.has(o):r.has(o)||r.has(l)},forEach(o,r){const i=this,l=i.__v_raw,c=Q(l),d=t?Pn:e?Ss:xe;return!e&&Ce(c,"iterate",Ct),l.forEach((u,h)=>o.call(r,d(u),d(h),i))}};return $e(s,e?{add:hs("add"),set:hs("set"),delete:hs("delete"),clear:hs("clear")}:{add(o){!t&&!qe(o)&&!yt(o)&&(o=Q(o));const r=Q(this);return ds(r).has.call(r,o)||(r.add(o),rt(r,"add",o,o)),this},set(o,r){!t&&!qe(r)&&!yt(r)&&(r=Q(r));const i=Q(this),{has:l,get:c}=ds(i);let d=l.call(i,o);d||(o=Q(o),d=l.call(i,o));const u=c.call(i,o);return i.set(o,r),d?bt(r,u)&&rt(i,"set",o,r):rt(i,"add",o,r),this},delete(o){const r=Q(this),{has:i,get:l}=ds(r);let c=i.call(r,o);c||(o=Q(o),c=i.call(r,o)),l&&l.call(r,o);const d=r.delete(o);return c&&rt(r,"delete",o,void 0),d},clear(){const o=Q(this),r=o.size!==0,i=o.clear();return r&&rt(o,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(o=>{s[o]=pl(o,e,t)}),s}function As(e,t){const s=gl(e,t);return(n,o,r)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?n:Reflect.get(se(s,o)&&o in n?s:n,o,r)}const ml={get:As(!1,!1)},vl={get:As(!1,!0)},bl={get:As(!0,!1)},_l={get:As(!0,!0)},Br=new WeakMap,Hr=new WeakMap,Wr=new WeakMap,Kr=new WeakMap;function yl(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function wl(e){return e.__v_skip||!Object.isExtensible(e)?0:yl(Ki(e))}function Is(e){return yt(e)?e:Ds(e,!1,ul,ml,Br)}function xl(e){return Ds(e,!1,dl,vl,Hr)}function kn(e){return Ds(e,!0,fl,bl,Wr)}function Sl(e){return Ds(e,!0,hl,_l,Kr)}function Ds(e,t,s,n,o){if(!ce(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=wl(e);if(r===0)return e;const i=o.get(e);if(i)return i;const l=new Proxy(e,r===2?n:s);return o.set(e,l),l}function at(e){return yt(e)?at(e.__v_raw):!!(e&&e.__v_isReactive)}function yt(e){return!!(e&&e.__v_isReadonly)}function qe(e){return!!(e&&e.__v_isShallow)}function Yn(e){return e?!!e.__v_raw:!1}function Q(e){const t=e&&e.__v_raw;return t?Q(t):e}function Zn(e){return!se(e,"__v_skip")&&Object.isExtensible(e)&&Cr(e,"__v_skip",!0),e}const xe=e=>ce(e)?Is(e):e,Ss=e=>ce(e)?kn(e):e;function de(e){return e?e.__v_isRef===!0:!1}function oe(e){return Jr(e,!1)}function Gr(e){return Jr(e,!0)}function Jr(e,t){return de(e)?e:new zl(e,t)}class zl{constructor(t,s){this.dep=new Jn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:Q(t),this._value=s?t:xe(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||qe(t)||yt(t);t=n?t:Q(t),bt(t,s)&&(this._rawValue=t,this._value=n?t:xe(t),this.dep.trigger())}}function ie(e){return de(e)?e.value:e}function ms(e){return W(e)?e():ie(e)}const Cl={get:(e,t,s)=>t==="__v_raw"?e:ie(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const o=e[t];return de(o)&&!de(s)?(o.value=s,!0):Reflect.set(e,t,s,n)}};function Yr(e){return at(e)?e:new Proxy(e,Cl)}function $l(e){const t=B(e)?new Array(e.length):{};for(const s in e)t[s]=Zr(e,s);return t}class Pl{constructor(t,s,n){this._object=t,this._key=s,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return rl(Q(this._object),this._key)}}class kl{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 El(e,t,s){return de(e)?e:W(e)?new kl(e):ce(e)&&arguments.length>1?Zr(e,t,s):oe(e)}function Zr(e,t,s){const n=e[t];return de(n)?n:new Pl(e,t,s)}class Rl{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new Jn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=ss-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&fe!==this)return Tr(this,!0),!0}get value(){const t=this.dep.track();return Dr(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Ol(e,t,s=!1){let n,o;return W(e)?n=e:(n=e.get,o=e.set),new Rl(n,o,s)}const ps={},zs=new WeakMap;let zt;function Ml(e,t=!1,s=zt){if(s){let n=zs.get(s);n||zs.set(s,n=[]),n.push(e)}}function Ll(e,t,s=ae){const{immediate:n,deep:o,once:r,scheduler:i,augmentJob:l,call:c}=s,d=C=>o?C:qe(C)||o===!1||o===0?it(C,1):it(C);let u,h,v,_,I=!1,A=!1;if(de(e)?(h=()=>e.value,I=qe(e)):at(e)?(h=()=>d(e),I=!0):B(e)?(A=!0,I=e.some(C=>at(C)||qe(C)),h=()=>e.map(C=>{if(de(C))return C.value;if(at(C))return d(C);if(W(C))return c?c(C,2):C()})):W(e)?t?h=c?()=>c(e,2):e:h=()=>{if(v){ut();try{v()}finally{ft()}}const C=zt;zt=u;try{return c?c(e,3,[_]):e(_)}finally{zt=C}}:h=Xe,t&&o){const C=h,R=o===!0?1/0:o;h=()=>it(C(),R)}const T=Hn(),g=()=>{u.stop(),T&&T.active&&Un(T.effects,u)};if(r&&t){const C=t;t=(...R)=>{C(...R),g()}}let m=A?new Array(e.length).fill(ps):ps;const x=C=>{if(!(!(u.flags&1)||!u.dirty&&!C))if(t){const R=u.run();if(o||I||(A?R.some((te,he)=>bt(te,m[he])):bt(R,m))){v&&v();const te=zt;zt=u;try{const he=[R,m===ps?void 0:A&&m[0]===ps?[]:m,_];m=R,c?c(t,3,he):t(...he)}finally{zt=te}}}else u.run()};return l&&l(x),u=new Mr(h),u.scheduler=i?()=>i(x,!1):x,_=C=>Ml(C,!1,u),v=u.onStop=()=>{const C=zs.get(u);if(C){if(c)c(C,4);else for(const R of C)R();zs.delete(u)}},t?n?x(!0):m=u.run():i?i(x.bind(null,!0),!0):u.run(),g.pause=u.pause.bind(u),g.resume=u.resume.bind(u),g.stop=g,g}function it(e,t=1/0,s){if(t<=0||!ce(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,de(e))it(e.value,t,s);else if(B(e))for(let n=0;n<e.length;n++)it(e[n],t,s);else if(Nt(e)||Lt(e))e.forEach(n=>{it(n,t,s)});else if(Sr(e)){for(const n in e)it(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&it(e[n],t,s)}return e}/**
|
|
* @vue/runtime-core v3.5.22
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/function us(e,t,s,n){try{return n?e(...n):e()}catch(o){Ns(o,t,s)}}function tt(e,t,s,n){if(W(e)){const o=us(e,t,s,n);return o&&wr(o)&&o.catch(r=>{Ns(r,t,s)}),o}if(B(e)){const o=[];for(let r=0;r<e.length;r++)o.push(tt(e[r],t,s,n));return o}}function Ns(e,t,s,n=!0){const o=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||ae;if(t){let l=t.parent;const c=t.proxy,d=`https://vuejs.org/error-reference/#runtime-${s}`;for(;l;){const u=l.ec;if(u){for(let h=0;h<u.length;h++)if(u[h](e,c,d)===!1)return}l=l.parent}if(r){ut(),us(r,null,10,[e,c,d]),ft();return}}Tl(e,s,o,n,i)}function Tl(e,t,s,n=!0,o=!1){if(o)throw e;console.error(e)}const Ee=[];let Ye=-1;const Tt=[];let gt=null,Ot=0;const Qr=Promise.resolve();let Cs=null;function At(e){const t=Cs||Qr;return e?t.then(this?e.bind(this):e):t}function Al(e){let t=Ye+1,s=Ee.length;for(;t<s;){const n=t+s>>>1,o=Ee[n],r=os(o);r<e||r===e&&o.flags&2?t=n+1:s=n}return t}function Qn(e){if(!(e.flags&1)){const t=os(e),s=Ee[Ee.length-1];!s||!(e.flags&2)&&t>=os(s)?Ee.push(e):Ee.splice(Al(t),0,e),e.flags|=1,Xr()}}function Xr(){Cs||(Cs=Qr.then(ti))}function Il(e){B(e)?Tt.push(...e):gt&&e.id===-1?gt.splice(Ot+1,0,e):e.flags&1||(Tt.push(e),e.flags|=1),Xr()}function vo(e,t,s=Ye+1){for(;s<Ee.length;s++){const n=Ee[s];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;Ee.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function ei(e){if(Tt.length){const t=[...new Set(Tt)].sort((s,n)=>os(s)-os(n));if(Tt.length=0,gt){gt.push(...t);return}for(gt=t,Ot=0;Ot<gt.length;Ot++){const s=gt[Ot];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}gt=null,Ot=0}}const os=e=>e.id==null?e.flags&2?-1:1/0:e.id;function ti(e){try{for(Ye=0;Ye<Ee.length;Ye++){const t=Ee[Ye];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),us(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Ye<Ee.length;Ye++){const t=Ee[Ye];t&&(t.flags&=-2)}Ye=-1,Ee.length=0,ei(),Cs=null,(Ee.length||Tt.length)&&ti()}}let Ve=null,si=null;function $s(e){const t=Ve;return Ve=e,si=e&&e.type.__scopeId||null,t}function Dl(e,t=Ve,s){if(!t||e._n)return e;const n=(...o)=>{n._d&&Po(-1);const r=$s(t);let i;try{i=e(...o)}finally{$s(r),n._d&&Po(1)}return i};return n._n=!0,n._c=!0,n._d=!0,n}function lt(e,t){if(Ve===null)return e;const s=qs(Ve),n=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[r,i,l,c=ae]=t[o];r&&(W(r)&&(r={mounted:r,updated:r}),r.deep&&it(i),n.push({dir:r,instance:s,value:i,oldValue:void 0,arg:l,modifiers:c}))}return e}function xt(e,t,s,n){const o=e.dirs,r=t&&t.dirs;for(let i=0;i<o.length;i++){const l=o[i];r&&(l.oldValue=r[i].value);let c=l.dir[n];c&&(ut(),tt(c,s,8,[e.el,l,e,t]),ft())}}const Nl=Symbol("_vte"),Fl=e=>e.__isTeleport,jl=Symbol("_leaveCb");function Xn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Xn(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 Ft(e,t){return W(e)?$e({name:e.name},t,{setup:e}):e}function ni(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const Ps=new WeakMap;function Yt(e,t,s,n,o=!1){if(B(e)){e.forEach((I,A)=>Yt(I,t&&(B(t)?t[A]:t),s,n,o));return}if(Zt(n)&&!o){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Yt(e,t,s,n.component.subTree);return}const r=n.shapeFlag&4?qs(n.component):n.el,i=o?null:r,{i:l,r:c}=e,d=t&&t.r,u=l.refs===ae?l.refs={}:l.refs,h=l.setupState,v=Q(h),_=h===ae?yr:I=>se(v,I);if(d!=null&&d!==c){if(bo(t),_e(d))u[d]=null,_(d)&&(h[d]=null);else if(de(d)){d.value=null;const I=t;I.k&&(u[I.k]=null)}}if(W(c))us(c,l,12,[i,u]);else{const I=_e(c),A=de(c);if(I||A){const T=()=>{if(e.f){const g=I?_(c)?h[c]:u[c]:c.value;if(o)B(g)&&Un(g,r);else if(B(g))g.includes(r)||g.push(r);else if(I)u[c]=[r],_(c)&&(h[c]=u[c]);else{const m=[r];c.value=m,e.k&&(u[e.k]=m)}}else I?(u[c]=i,_(c)&&(h[c]=i)):A&&(c.value=i,e.k&&(u[e.k]=i))};if(i){const g=()=>{T(),Ps.delete(e)};g.id=-1,Ps.set(e,g),De(g,s)}else bo(e),T()}}}function bo(e){const t=Ps.get(e);t&&(t.flags|=8,Ps.delete(e))}Ls().requestIdleCallback;Ls().cancelIdleCallback;const Zt=e=>!!e.type.__asyncLoader,oi=e=>e.type.__isKeepAlive;function Ul(e,t){ri(e,"a",t)}function Vl(e,t){ri(e,"da",t)}function ri(e,t,s=Re){const n=e.__wdc||(e.__wdc=()=>{let o=s;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Fs(t,n,s),s){let o=s.parent;for(;o&&o.parent;)oi(o.parent.vnode)&&ql(n,t,s,o),o=o.parent}}function ql(e,t,s,n){const o=Fs(t,e,n,!0);ii(()=>{Un(n[t],o)},s)}function Fs(e,t,s=Re,n=!1){if(s){const o=s[e]||(s[e]=[]),r=t.__weh||(t.__weh=(...i)=>{ut();const l=fs(s),c=tt(t,s,e,i);return l(),ft(),c});return n?o.unshift(r):o.push(r),r}}const dt=e=>(t,s=Re)=>{(!is||e==="sp")&&Fs(e,(...n)=>t(...n),s)},Bl=dt("bm"),js=dt("m"),Hl=dt("bu"),Wl=dt("u"),Kl=dt("bum"),ii=dt("um"),Gl=dt("sp"),Jl=dt("rtg"),Yl=dt("rtc");function Zl(e,t=Re){Fs("ec",e,t)}const Ql=Symbol.for("v-ndc");function Fe(e,t,s,n){let o;const r=s,i=B(e);if(i||_e(e)){const l=i&&at(e);let c=!1,d=!1;l&&(c=!qe(e),d=yt(e),e=Ts(e)),o=new Array(e.length);for(let u=0,h=e.length;u<h;u++)o[u]=t(c?d?Ss(xe(e[u])):xe(e[u]):e[u],u,void 0,r)}else if(typeof e=="number"){o=new Array(e);for(let l=0;l<e;l++)o[l]=t(l+1,l,void 0,r)}else if(ce(e))if(e[Symbol.iterator])o=Array.from(e,(l,c)=>t(l,c,void 0,r));else{const l=Object.keys(e);o=new Array(l.length);for(let c=0,d=l.length;c<d;c++){const u=l[c];o[c]=t(e[u],u,c,r)}}else o=[];return o}const En=e=>e?Ei(e)?qs(e):En(e.parent):null,Qt=$e(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=>En(e.parent),$root:e=>En(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ai(e),$forceUpdate:e=>e.f||(e.f=()=>{Qn(e.update)}),$nextTick:e=>e.n||(e.n=At.bind(e.proxy)),$watch:e=>wa.bind(e)}),Zs=(e,t)=>e!==ae&&!e.__isScriptSetup&&se(e,t),Xl={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:o,props:r,accessCache:i,type:l,appContext:c}=e;let d;if(t[0]!=="$"){const _=i[t];if(_!==void 0)switch(_){case 1:return n[t];case 2:return o[t];case 4:return s[t];case 3:return r[t]}else{if(Zs(n,t))return i[t]=1,n[t];if(o!==ae&&se(o,t))return i[t]=2,o[t];if((d=e.propsOptions[0])&&se(d,t))return i[t]=3,r[t];if(s!==ae&&se(s,t))return i[t]=4,s[t];Rn&&(i[t]=0)}}const u=Qt[t];let h,v;if(u)return t==="$attrs"&&Ce(e.attrs,"get",""),u(e);if((h=l.__cssModules)&&(h=h[t]))return h;if(s!==ae&&se(s,t))return i[t]=4,s[t];if(v=c.config.globalProperties,se(v,t))return v[t]},set({_:e},t,s){const{data:n,setupState:o,ctx:r}=e;return Zs(o,t)?(o[t]=s,!0):n!==ae&&se(n,t)?(n[t]=s,!0):se(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:o,propsOptions:r,type:i}},l){let c,d;return!!(s[l]||e!==ae&&l[0]!=="$"&&se(e,l)||Zs(t,l)||(c=r[0])&&se(c,l)||se(n,l)||se(Qt,l)||se(o.config.globalProperties,l)||(d=i.__cssModules)&&d[l])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:se(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function _o(e){return B(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let Rn=!0;function ea(e){const t=ai(e),s=e.proxy,n=e.ctx;Rn=!1,t.beforeCreate&&yo(t.beforeCreate,e,"bc");const{data:o,computed:r,methods:i,watch:l,provide:c,inject:d,created:u,beforeMount:h,mounted:v,beforeUpdate:_,updated:I,activated:A,deactivated:T,beforeDestroy:g,beforeUnmount:m,destroyed:x,unmounted:C,render:R,renderTracked:te,renderTriggered:he,errorCaptured:K,serverPrefetch:J,expose:le,inheritAttrs:be,components:Pe,directives:Te,filters:st}=t;if(d&&ta(d,n,null),i)for(const G in i){const Y=i[G];W(Y)&&(n[G]=Y.bind(s))}if(o){const G=o.call(s,s);ce(G)&&(e.data=Is(G))}if(Rn=!0,r)for(const G in r){const Y=r[G],E=W(Y)?Y.bind(s,s):W(Y.get)?Y.get.bind(s,s):Xe,$=!W(Y)&&W(Y.set)?Y.set.bind(s):Xe,D=Ue({get:E,set:$});Object.defineProperty(n,G,{enumerable:!0,configurable:!0,get:()=>D.value,set:q=>D.value=q})}if(l)for(const G in l)li(l[G],n,s,G);if(c){const G=W(c)?c.call(s):c;Reflect.ownKeys(G).forEach(Y=>{la(Y,G[Y])})}u&&yo(u,e,"c");function re(G,Y){B(Y)?Y.forEach(E=>G(E.bind(s))):Y&&G(Y.bind(s))}if(re(Bl,h),re(js,v),re(Hl,_),re(Wl,I),re(Ul,A),re(Vl,T),re(Zl,K),re(Yl,te),re(Jl,he),re(Kl,m),re(ii,C),re(Gl,J),B(le))if(le.length){const G=e.exposed||(e.exposed={});le.forEach(Y=>{Object.defineProperty(G,Y,{get:()=>s[Y],set:E=>s[Y]=E,enumerable:!0})})}else e.exposed||(e.exposed={});R&&e.render===Xe&&(e.render=R),be!=null&&(e.inheritAttrs=be),Pe&&(e.components=Pe),Te&&(e.directives=Te),J&&ni(e)}function ta(e,t,s=Xe){B(e)&&(e=On(e));for(const n in e){const o=e[n];let r;ce(o)?"default"in o?r=Xt(o.from||n,o.default,!0):r=Xt(o.from||n):r=Xt(o),de(r)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r.value,set:i=>r.value=i}):t[n]=r}}function yo(e,t,s){tt(B(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function li(e,t,s,n){let o=n.includes(".")?wi(s,n):()=>s[n];if(_e(e)){const r=t[e];W(r)&&Pt(o,r)}else if(W(e))Pt(o,e.bind(s));else if(ce(e))if(B(e))e.forEach(r=>li(r,t,s,n));else{const r=W(e.handler)?e.handler.bind(s):t[e.handler];W(r)&&Pt(o,r,e)}}function ai(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:o,optionsCache:r,config:{optionMergeStrategies:i}}=e.appContext,l=r.get(t);let c;return l?c=l:!o.length&&!s&&!n?c=t:(c={},o.length&&o.forEach(d=>ks(c,d,i,!0)),ks(c,t,i)),ce(t)&&r.set(t,c),c}function ks(e,t,s,n=!1){const{mixins:o,extends:r}=t;r&&ks(e,r,s,!0),o&&o.forEach(i=>ks(e,i,s,!0));for(const i in t)if(!(n&&i==="expose")){const l=sa[i]||s&&s[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const sa={data:wo,props:xo,emits:xo,methods:Wt,computed:Wt,beforeCreate:ke,created:ke,beforeMount:ke,mounted:ke,beforeUpdate:ke,updated:ke,beforeDestroy:ke,beforeUnmount:ke,destroyed:ke,unmounted:ke,activated:ke,deactivated:ke,errorCaptured:ke,serverPrefetch:ke,components:Wt,directives:Wt,watch:oa,provide:wo,inject:na};function wo(e,t){return t?e?function(){return $e(W(e)?e.call(this,this):e,W(t)?t.call(this,this):t)}:t:e}function na(e,t){return Wt(On(e),On(t))}function On(e){if(B(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function ke(e,t){return e?[...new Set([].concat(e,t))]:t}function Wt(e,t){return e?$e(Object.create(null),e,t):t}function xo(e,t){return e?B(e)&&B(t)?[...new Set([...e,...t])]:$e(Object.create(null),_o(e),_o(t??{})):t}function oa(e,t){if(!e)return t;if(!t)return e;const s=$e(Object.create(null),e);for(const n in t)s[n]=ke(e[n],t[n]);return s}function ci(){return{app:null,config:{isNativeTag:yr,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 ra=0;function ia(e,t){return function(n,o=null){W(n)||(n=$e({},n)),o!=null&&!ce(o)&&(o=null);const r=ci(),i=new WeakSet,l=[];let c=!1;const d=r.app={_uid:ra++,_component:n,_props:o,_container:null,_context:r,_instance:null,version:qa,get config(){return r.config},set config(u){},use(u,...h){return i.has(u)||(u&&W(u.install)?(i.add(u),u.install(d,...h)):W(u)&&(i.add(u),u(d,...h))),d},mixin(u){return r.mixins.includes(u)||r.mixins.push(u),d},component(u,h){return h?(r.components[u]=h,d):r.components[u]},directive(u,h){return h?(r.directives[u]=h,d):r.directives[u]},mount(u,h,v){if(!c){const _=d._ceVNode||Le(n,o);return _.appContext=r,v===!0?v="svg":v===!1&&(v=void 0),e(_,u,v),c=!0,d._container=u,u.__vue_app__=d,qs(_.component)}},onUnmount(u){l.push(u)},unmount(){c&&(tt(l,d._instance,16),e(null,d._container),delete d._container.__vue_app__)},provide(u,h){return r.provides[u]=h,d},runWithContext(u){const h=$t;$t=d;try{return u()}finally{$t=h}}};return d}}let $t=null;function la(e,t){if(Re){let s=Re.provides;const n=Re.parent&&Re.parent.provides;n===s&&(s=Re.provides=Object.create(n)),s[e]=t}}function Xt(e,t,s=!1){const n=ki();if(n||$t){let o=$t?$t._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return s&&W(t)?t.call(n&&n.proxy):t}}function aa(){return!!(ki()||$t)}const ui={},fi=()=>Object.create(ui),di=e=>Object.getPrototypeOf(e)===ui;function ca(e,t,s,n=!1){const o={},r=fi();e.propsDefaults=Object.create(null),hi(e,t,o,r);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);s?e.props=n?o:xl(o):e.type.props?e.props=o:e.props=r,e.attrs=r}function ua(e,t,s,n){const{props:o,attrs:r,vnode:{patchFlag:i}}=e,l=Q(o),[c]=e.propsOptions;let d=!1;if((n||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let h=0;h<u.length;h++){let v=u[h];if(Us(e.emitsOptions,v))continue;const _=t[v];if(c)if(se(r,v))_!==r[v]&&(r[v]=_,d=!0);else{const I=_t(v);o[I]=Mn(c,l,I,_,e,!1)}else _!==r[v]&&(r[v]=_,d=!0)}}}else{hi(e,t,o,r)&&(d=!0);let u;for(const h in l)(!t||!se(t,h)&&((u=kt(h))===h||!se(t,u)))&&(c?s&&(s[h]!==void 0||s[u]!==void 0)&&(o[h]=Mn(c,l,h,void 0,e,!0)):delete o[h]);if(r!==l)for(const h in r)(!t||!se(t,h))&&(delete r[h],d=!0)}d&&rt(e.attrs,"set","")}function hi(e,t,s,n){const[o,r]=e.propsOptions;let i=!1,l;if(t)for(let c in t){if(Kt(c))continue;const d=t[c];let u;o&&se(o,u=_t(c))?!r||!r.includes(u)?s[u]=d:(l||(l={}))[u]=d:Us(e.emitsOptions,c)||(!(c in n)||d!==n[c])&&(n[c]=d,i=!0)}if(r){const c=Q(s),d=l||ae;for(let u=0;u<r.length;u++){const h=r[u];s[h]=Mn(o,c,h,d[h],e,!se(d,h))}}return i}function Mn(e,t,s,n,o,r){const i=e[s];if(i!=null){const l=se(i,"default");if(l&&n===void 0){const c=i.default;if(i.type!==Function&&!i.skipFactory&&W(c)){const{propsDefaults:d}=o;if(s in d)n=d[s];else{const u=fs(o);n=d[s]=c.call(null,t),u()}}else n=c;o.ce&&o.ce._setProp(s,n)}i[0]&&(r&&!l?n=!1:i[1]&&(n===""||n===kt(s))&&(n=!0))}return n}const fa=new WeakMap;function pi(e,t,s=!1){const n=s?fa:t.propsCache,o=n.get(e);if(o)return o;const r=e.props,i={},l=[];let c=!1;if(!W(e)){const u=h=>{c=!0;const[v,_]=pi(h,t,!0);$e(i,v),_&&l.push(..._)};!s&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!r&&!c)return ce(e)&&n.set(e,Mt),Mt;if(B(r))for(let u=0;u<r.length;u++){const h=_t(r[u]);So(h)&&(i[h]=ae)}else if(r)for(const u in r){const h=_t(u);if(So(h)){const v=r[u],_=i[h]=B(v)||W(v)?{type:v}:$e({},v),I=_.type;let A=!1,T=!0;if(B(I))for(let g=0;g<I.length;++g){const m=I[g],x=W(m)&&m.name;if(x==="Boolean"){A=!0;break}else x==="String"&&(T=!1)}else A=W(I)&&I.name==="Boolean";_[0]=A,_[1]=T,(A||se(_,"default"))&&l.push(h)}}const d=[i,l];return ce(e)&&n.set(e,d),d}function So(e){return e[0]!=="$"&&!Kt(e)}const eo=e=>e==="_"||e==="_ctx"||e==="$stable",to=e=>B(e)?e.map(Ze):[Ze(e)],da=(e,t,s)=>{if(t._n)return t;const n=Dl((...o)=>to(t(...o)),s);return n._c=!1,n},gi=(e,t,s)=>{const n=e._ctx;for(const o in e){if(eo(o))continue;const r=e[o];if(W(r))t[o]=da(o,r,n);else if(r!=null){const i=to(r);t[o]=()=>i}}},mi=(e,t)=>{const s=to(t);e.slots.default=()=>s},vi=(e,t,s)=>{for(const n in t)(s||!eo(n))&&(e[n]=t[n])},ha=(e,t,s)=>{const n=e.slots=fi();if(e.vnode.shapeFlag&32){const o=t._;o?(vi(n,t,s),s&&Cr(n,"_",o,!0)):gi(t,n)}else t&&mi(e,t)},pa=(e,t,s)=>{const{vnode:n,slots:o}=e;let r=!0,i=ae;if(n.shapeFlag&32){const l=t._;l?s&&l===1?r=!1:vi(o,t,s):(r=!t.$stable,gi(t,o)),i=t}else t&&(mi(e,t),i={default:1});if(r)for(const l in o)!eo(l)&&i[l]==null&&delete o[l]},De=Ea;function ga(e){return ma(e)}function ma(e,t){const s=Ls();s.__VUE__=!0;const{insert:n,remove:o,patchProp:r,createElement:i,createText:l,createComment:c,setText:d,setElementText:u,parentNode:h,nextSibling:v,setScopeId:_=Xe,insertStaticContent:I}=e,A=(f,p,w,O=null,b=null,y=null,L=void 0,M=null,k=!!p.dynamicChildren)=>{if(f===p)return;f&&!Vt(f,p)&&(O=ye(f),q(f,b,y,!0),f=null),p.patchFlag===-2&&(k=!1,p.dynamicChildren=null);const{type:P,ref:U,shapeFlag:F}=p;switch(P){case Vs:T(f,p,w,O);break;case wt:g(f,p,w,O);break;case vs:f==null&&m(p,w,O,L);break;case ge:Pe(f,p,w,O,b,y,L,M,k);break;default:F&1?R(f,p,w,O,b,y,L,M,k):F&6?Te(f,p,w,O,b,y,L,M,k):(F&64||F&128)&&P.process(f,p,w,O,b,y,L,M,k,Ae)}U!=null&&b?Yt(U,f&&f.ref,y,p||f,!p):U==null&&f&&f.ref!=null&&Yt(f.ref,null,y,f,!0)},T=(f,p,w,O)=>{if(f==null)n(p.el=l(p.children),w,O);else{const b=p.el=f.el;p.children!==f.children&&d(b,p.children)}},g=(f,p,w,O)=>{f==null?n(p.el=c(p.children||""),w,O):p.el=f.el},m=(f,p,w,O)=>{[f.el,f.anchor]=I(f.children,p,w,O,f.el,f.anchor)},x=({el:f,anchor:p},w,O)=>{let b;for(;f&&f!==p;)b=v(f),n(f,w,O),f=b;n(p,w,O)},C=({el:f,anchor:p})=>{let w;for(;f&&f!==p;)w=v(f),o(f),f=w;o(p)},R=(f,p,w,O,b,y,L,M,k)=>{p.type==="svg"?L="svg":p.type==="math"&&(L="mathml"),f==null?te(p,w,O,b,y,L,M,k):J(f,p,b,y,L,M,k)},te=(f,p,w,O,b,y,L,M)=>{let k,P;const{props:U,shapeFlag:F,transition:V,dirs:H}=f;if(k=f.el=i(f.type,y,U&&U.is,U),F&8?u(k,f.children):F&16&&K(f.children,k,null,O,b,Qs(f,y),L,M),H&&xt(f,null,O,"created"),he(k,f,f.scopeId,L,O),U){for(const ue in U)ue!=="value"&&!Kt(ue)&&r(k,ue,null,U[ue],y,O);"value"in U&&r(k,"value",null,U.value,y),(P=U.onVnodeBeforeMount)&&Je(P,O,f)}H&&xt(f,null,O,"beforeMount");const Z=va(b,V);Z&&V.beforeEnter(k),n(k,p,w),((P=U&&U.onVnodeMounted)||Z||H)&&De(()=>{P&&Je(P,O,f),Z&&V.enter(k),H&&xt(f,null,O,"mounted")},b)},he=(f,p,w,O,b)=>{if(w&&_(f,w),O)for(let y=0;y<O.length;y++)_(f,O[y]);if(b){let y=b.subTree;if(p===y||Si(y.type)&&(y.ssContent===p||y.ssFallback===p)){const L=b.vnode;he(f,L,L.scopeId,L.slotScopeIds,b.parent)}}},K=(f,p,w,O,b,y,L,M,k=0)=>{for(let P=k;P<f.length;P++){const U=f[P]=M?mt(f[P]):Ze(f[P]);A(null,U,p,w,O,b,y,L,M)}},J=(f,p,w,O,b,y,L)=>{const M=p.el=f.el;let{patchFlag:k,dynamicChildren:P,dirs:U}=p;k|=f.patchFlag&16;const F=f.props||ae,V=p.props||ae;let H;if(w&&St(w,!1),(H=V.onVnodeBeforeUpdate)&&Je(H,w,p,f),U&&xt(p,f,w,"beforeUpdate"),w&&St(w,!0),(F.innerHTML&&V.innerHTML==null||F.textContent&&V.textContent==null)&&u(M,""),P?le(f.dynamicChildren,P,M,w,O,Qs(p,b),y):L||Y(f,p,M,null,w,O,Qs(p,b),y,!1),k>0){if(k&16)be(M,F,V,w,b);else if(k&2&&F.class!==V.class&&r(M,"class",null,V.class,b),k&4&&r(M,"style",F.style,V.style,b),k&8){const Z=p.dynamicProps;for(let ue=0;ue<Z.length;ue++){const ne=Z[ue],Oe=F[ne],Me=V[ne];(Me!==Oe||ne==="value")&&r(M,ne,Oe,Me,b,w)}}k&1&&f.children!==p.children&&u(M,p.children)}else!L&&P==null&&be(M,F,V,w,b);((H=V.onVnodeUpdated)||U)&&De(()=>{H&&Je(H,w,p,f),U&&xt(p,f,w,"updated")},O)},le=(f,p,w,O,b,y,L)=>{for(let M=0;M<p.length;M++){const k=f[M],P=p[M],U=k.el&&(k.type===ge||!Vt(k,P)||k.shapeFlag&198)?h(k.el):w;A(k,P,U,null,O,b,y,L,!0)}},be=(f,p,w,O,b)=>{if(p!==w){if(p!==ae)for(const y in p)!Kt(y)&&!(y in w)&&r(f,y,p[y],null,b,O);for(const y in w){if(Kt(y))continue;const L=w[y],M=p[y];L!==M&&y!=="value"&&r(f,y,M,L,b,O)}"value"in w&&r(f,"value",p.value,w.value,b)}},Pe=(f,p,w,O,b,y,L,M,k)=>{const P=p.el=f?f.el:l(""),U=p.anchor=f?f.anchor:l("");let{patchFlag:F,dynamicChildren:V,slotScopeIds:H}=p;H&&(M=M?M.concat(H):H),f==null?(n(P,w,O),n(U,w,O),K(p.children||[],w,U,b,y,L,M,k)):F>0&&F&64&&V&&f.dynamicChildren?(le(f.dynamicChildren,V,w,b,y,L,M),(p.key!=null||b&&p===b.subTree)&&bi(f,p,!0)):Y(f,p,w,U,b,y,L,M,k)},Te=(f,p,w,O,b,y,L,M,k)=>{p.slotScopeIds=M,f==null?p.shapeFlag&512?b.ctx.activate(p,w,O,L,k):st(p,w,O,b,y,L,k):Se(f,p,k)},st=(f,p,w,O,b,y,L)=>{const M=f.component=Da(f,O,b);if(oi(f)&&(M.ctx.renderer=Ae),Na(M,!1,L),M.asyncDep){if(b&&b.registerDep(M,re,L),!f.el){const k=M.subTree=Le(wt);g(null,k,p,w),f.placeholder=k.el}}else re(M,f,p,w,b,y,L)},Se=(f,p,w)=>{const O=p.component=f.component;if(Pa(f,p,w))if(O.asyncDep&&!O.asyncResolved){G(O,p,w);return}else O.next=p,O.update();else p.el=f.el,O.vnode=p},re=(f,p,w,O,b,y,L)=>{const M=()=>{if(f.isMounted){let{next:F,bu:V,u:H,parent:Z,vnode:ue}=f;{const Ke=_i(f);if(Ke){F&&(F.el=ue.el,G(f,F,L)),Ke.asyncDep.then(()=>{f.isUnmounted||M()});return}}let ne=F,Oe;St(f,!1),F?(F.el=ue.el,G(f,F,L)):F=ue,V&&gs(V),(Oe=F.props&&F.props.onVnodeBeforeUpdate)&&Je(Oe,Z,F,ue),St(f,!0);const Me=Co(f),We=f.subTree;f.subTree=Me,A(We,Me,h(We.el),ye(We),f,b,y),F.el=Me.el,ne===null&&ka(f,Me.el),H&&De(H,b),(Oe=F.props&&F.props.onVnodeUpdated)&&De(()=>Je(Oe,Z,F,ue),b)}else{let F;const{el:V,props:H}=p,{bm:Z,m:ue,parent:ne,root:Oe,type:Me}=f,We=Zt(p);St(f,!1),Z&&gs(Z),!We&&(F=H&&H.onVnodeBeforeMount)&&Je(F,ne,p),St(f,!0);{Oe.ce&&Oe.ce._def.shadowRoot!==!1&&Oe.ce._injectChildStyle(Me);const Ke=f.subTree=Co(f);A(null,Ke,w,O,f,b,y),p.el=Ke.el}if(ue&&De(ue,b),!We&&(F=H&&H.onVnodeMounted)){const Ke=p;De(()=>Je(F,ne,Ke),b)}(p.shapeFlag&256||ne&&Zt(ne.vnode)&&ne.vnode.shapeFlag&256)&&f.a&&De(f.a,b),f.isMounted=!0,p=w=O=null}};f.scope.on();const k=f.effect=new Mr(M);f.scope.off();const P=f.update=k.run.bind(k),U=f.job=k.runIfDirty.bind(k);U.i=f,U.id=f.uid,k.scheduler=()=>Qn(U),St(f,!0),P()},G=(f,p,w)=>{p.component=f;const O=f.vnode.props;f.vnode=p,f.next=null,ua(f,p.props,O,w),pa(f,p.children,w),ut(),vo(f),ft()},Y=(f,p,w,O,b,y,L,M,k=!1)=>{const P=f&&f.children,U=f?f.shapeFlag:0,F=p.children,{patchFlag:V,shapeFlag:H}=p;if(V>0){if(V&128){$(P,F,w,O,b,y,L,M,k);return}else if(V&256){E(P,F,w,O,b,y,L,M,k);return}}H&8?(U&16&&pe(P,b,y),F!==P&&u(w,F)):U&16?H&16?$(P,F,w,O,b,y,L,M,k):pe(P,b,y,!0):(U&8&&u(w,""),H&16&&K(F,w,O,b,y,L,M,k))},E=(f,p,w,O,b,y,L,M,k)=>{f=f||Mt,p=p||Mt;const P=f.length,U=p.length,F=Math.min(P,U);let V;for(V=0;V<F;V++){const H=p[V]=k?mt(p[V]):Ze(p[V]);A(f[V],H,w,null,b,y,L,M,k)}P>U?pe(f,b,y,!0,!1,F):K(p,w,O,b,y,L,M,k,F)},$=(f,p,w,O,b,y,L,M,k)=>{let P=0;const U=p.length;let F=f.length-1,V=U-1;for(;P<=F&&P<=V;){const H=f[P],Z=p[P]=k?mt(p[P]):Ze(p[P]);if(Vt(H,Z))A(H,Z,w,null,b,y,L,M,k);else break;P++}for(;P<=F&&P<=V;){const H=f[F],Z=p[V]=k?mt(p[V]):Ze(p[V]);if(Vt(H,Z))A(H,Z,w,null,b,y,L,M,k);else break;F--,V--}if(P>F){if(P<=V){const H=V+1,Z=H<U?p[H].el:O;for(;P<=V;)A(null,p[P]=k?mt(p[P]):Ze(p[P]),w,Z,b,y,L,M,k),P++}}else if(P>V)for(;P<=F;)q(f[P],b,y,!0),P++;else{const H=P,Z=P,ue=new Map;for(P=Z;P<=V;P++){const Ie=p[P]=k?mt(p[P]):Ze(p[P]);Ie.key!=null&&ue.set(Ie.key,P)}let ne,Oe=0;const Me=V-Z+1;let We=!1,Ke=0;const jt=new Array(Me);for(P=0;P<Me;P++)jt[P]=0;for(P=H;P<=F;P++){const Ie=f[P];if(Oe>=Me){q(Ie,b,y,!0);continue}let Ge;if(Ie.key!=null)Ge=ue.get(Ie.key);else for(ne=Z;ne<=V;ne++)if(jt[ne-Z]===0&&Vt(Ie,p[ne])){Ge=ne;break}Ge===void 0?q(Ie,b,y,!0):(jt[Ge-Z]=P+1,Ge>=Ke?Ke=Ge:We=!0,A(Ie,p[Ge],w,null,b,y,L,M,k),Oe++)}const co=We?ba(jt):Mt;for(ne=co.length-1,P=Me-1;P>=0;P--){const Ie=Z+P,Ge=p[Ie],uo=p[Ie+1],fo=Ie+1<U?uo.el||uo.placeholder:O;jt[P]===0?A(null,Ge,w,fo,b,y,L,M,k):We&&(ne<0||P!==co[ne]?D(Ge,w,fo,2):ne--)}}},D=(f,p,w,O,b=null)=>{const{el:y,type:L,transition:M,children:k,shapeFlag:P}=f;if(P&6){D(f.component.subTree,p,w,O);return}if(P&128){f.suspense.move(p,w,O);return}if(P&64){L.move(f,p,w,Ae);return}if(L===ge){n(y,p,w);for(let F=0;F<k.length;F++)D(k[F],p,w,O);n(f.anchor,p,w);return}if(L===vs){x(f,p,w);return}if(O!==2&&P&1&&M)if(O===0)M.beforeEnter(y),n(y,p,w),De(()=>M.enter(y),b);else{const{leave:F,delayLeave:V,afterLeave:H}=M,Z=()=>{f.ctx.isUnmounted?o(y):n(y,p,w)},ue=()=>{y._isLeaving&&y[jl](!0),F(y,()=>{Z(),H&&H()})};V?V(y,Z,ue):ue()}else n(y,p,w)},q=(f,p,w,O=!1,b=!1)=>{const{type:y,props:L,ref:M,children:k,dynamicChildren:P,shapeFlag:U,patchFlag:F,dirs:V,cacheIndex:H}=f;if(F===-2&&(b=!1),M!=null&&(ut(),Yt(M,null,w,f,!0),ft()),H!=null&&(p.renderCache[H]=void 0),U&256){p.ctx.deactivate(f);return}const Z=U&1&&V,ue=!Zt(f);let ne;if(ue&&(ne=L&&L.onVnodeBeforeUnmount)&&Je(ne,p,f),U&6)we(f.component,w,O);else{if(U&128){f.suspense.unmount(w,O);return}Z&&xt(f,null,p,"beforeUnmount"),U&64?f.type.remove(f,p,w,Ae,O):P&&!P.hasOnce&&(y!==ge||F>0&&F&64)?pe(P,p,w,!1,!0):(y===ge&&F&384||!b&&U&16)&&pe(k,p,w),O&&j(f)}(ue&&(ne=L&&L.onVnodeUnmounted)||Z)&&De(()=>{ne&&Je(ne,p,f),Z&&xt(f,null,p,"unmounted")},w)},j=f=>{const{type:p,el:w,anchor:O,transition:b}=f;if(p===ge){ee(w,O);return}if(p===vs){C(f);return}const y=()=>{o(w),b&&!b.persisted&&b.afterLeave&&b.afterLeave()};if(f.shapeFlag&1&&b&&!b.persisted){const{leave:L,delayLeave:M}=b,k=()=>L(w,y);M?M(f.el,y,k):k()}else y()},ee=(f,p)=>{let w;for(;f!==p;)w=v(f),o(f),f=w;o(p)},we=(f,p,w)=>{const{bum:O,scope:b,job:y,subTree:L,um:M,m:k,a:P}=f;zo(k),zo(P),O&&gs(O),b.stop(),y&&(y.flags|=8,q(L,f,p,w)),M&&De(M,p),De(()=>{f.isUnmounted=!0},p)},pe=(f,p,w,O=!1,b=!1,y=0)=>{for(let L=y;L<f.length;L++)q(f[L],p,w,O,b)},ye=f=>{if(f.shapeFlag&6)return ye(f.component.subTree);if(f.shapeFlag&128)return f.suspense.next();const p=v(f.anchor||f.el),w=p&&p[Nl];return w?v(w):p};let me=!1;const ht=(f,p,w)=>{f==null?p._vnode&&q(p._vnode,null,null,!0):A(p._vnode||null,f,p,null,null,null,w),p._vnode=f,me||(me=!0,vo(),ei(),me=!1)},Ae={p:A,um:q,m:D,r:j,mt:st,mc:K,pc:Y,pbc:le,n:ye,o:e};return{render:ht,hydrate:void 0,createApp:ia(ht)}}function Qs({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function St({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function va(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function bi(e,t,s=!1){const n=e.children,o=t.children;if(B(n)&&B(o))for(let r=0;r<n.length;r++){const i=n[r];let l=o[r];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=o[r]=mt(o[r]),l.el=i.el),!s&&l.patchFlag!==-2&&bi(i,l)),l.type===Vs&&l.patchFlag!==-1&&(l.el=i.el),l.type===wt&&!l.el&&(l.el=i.el)}}function ba(e){const t=e.slice(),s=[0];let n,o,r,i,l;const c=e.length;for(n=0;n<c;n++){const d=e[n];if(d!==0){if(o=s[s.length-1],e[o]<d){t[n]=o,s.push(n);continue}for(r=0,i=s.length-1;r<i;)l=r+i>>1,e[s[l]]<d?r=l+1:i=l;d<e[s[r]]&&(r>0&&(t[n]=s[r-1]),s[r]=n)}}for(r=s.length,i=s[r-1];r-- >0;)s[r]=i,i=t[i];return s}function _i(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:_i(t)}function zo(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const _a=Symbol.for("v-scx"),ya=()=>Xt(_a);function Pt(e,t,s){return yi(e,t,s)}function yi(e,t,s=ae){const{immediate:n,deep:o,flush:r,once:i}=s,l=$e({},s),c=t&&n||!t&&r!=="post";let d;if(is){if(r==="sync"){const _=ya();d=_.__watcherHandles||(_.__watcherHandles=[])}else if(!c){const _=()=>{};return _.stop=Xe,_.resume=Xe,_.pause=Xe,_}}const u=Re;l.call=(_,I,A)=>tt(_,u,I,A);let h=!1;r==="post"?l.scheduler=_=>{De(_,u&&u.suspense)}:r!=="sync"&&(h=!0,l.scheduler=(_,I)=>{I?_():Qn(_)}),l.augmentJob=_=>{t&&(_.flags|=4),h&&(_.flags|=2,u&&(_.id=u.uid,_.i=u))};const v=Ll(e,t,l);return is&&(d?d.push(v):c&&v()),v}function wa(e,t,s){const n=this.proxy,o=_e(e)?e.includes(".")?wi(n,e):()=>n[e]:e.bind(n,n);let r;W(t)?r=t:(r=t.handler,s=t);const i=fs(this),l=yi(o,r.bind(n),s);return i(),l}function wi(e,t){const s=t.split(".");return()=>{let n=e;for(let o=0;o<s.length&&n;o++)n=n[s[o]];return n}}const xa=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${_t(t)}Modifiers`]||e[`${kt(t)}Modifiers`];function Sa(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||ae;let o=s;const r=t.startsWith("update:"),i=r&&xa(n,t.slice(7));i&&(i.trim&&(o=s.map(u=>_e(u)?u.trim():u)),i.number&&(o=s.map(ws)));let l,c=n[l=Ws(t)]||n[l=Ws(_t(t))];!c&&r&&(c=n[l=Ws(kt(t))]),c&&tt(c,e,6,o);const d=n[l+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,tt(d,e,6,o)}}const za=new WeakMap;function xi(e,t,s=!1){const n=s?za:t.emitsCache,o=n.get(e);if(o!==void 0)return o;const r=e.emits;let i={},l=!1;if(!W(e)){const c=d=>{const u=xi(d,t,!0);u&&(l=!0,$e(i,u))};!s&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!r&&!l?(ce(e)&&n.set(e,null),null):(B(r)?r.forEach(c=>i[c]=null):$e(i,r),ce(e)&&n.set(e,i),i)}function Us(e,t){return!e||!Os(t)?!1:(t=t.slice(2).replace(/Once$/,""),se(e,t[0].toLowerCase()+t.slice(1))||se(e,kt(t))||se(e,t))}function Co(e){const{type:t,vnode:s,proxy:n,withProxy:o,propsOptions:[r],slots:i,attrs:l,emit:c,render:d,renderCache:u,props:h,data:v,setupState:_,ctx:I,inheritAttrs:A}=e,T=$s(e);let g,m;try{if(s.shapeFlag&4){const C=o||n,R=C;g=Ze(d.call(R,C,u,h,_,v,I)),m=l}else{const C=t;g=Ze(C.length>1?C(h,{attrs:l,slots:i,emit:c}):C(h,null)),m=t.props?l:Ca(l)}}catch(C){es.length=0,Ns(C,e,1),g=Le(wt)}let x=g;if(m&&A!==!1){const C=Object.keys(m),{shapeFlag:R}=x;C.length&&R&7&&(r&&C.some(jn)&&(m=$a(m,r)),x=It(x,m,!1,!0))}return s.dirs&&(x=It(x,null,!1,!0),x.dirs=x.dirs?x.dirs.concat(s.dirs):s.dirs),s.transition&&Xn(x,s.transition),g=x,$s(T),g}const Ca=e=>{let t;for(const s in e)(s==="class"||s==="style"||Os(s))&&((t||(t={}))[s]=e[s]);return t},$a=(e,t)=>{const s={};for(const n in e)(!jn(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function Pa(e,t,s){const{props:n,children:o,component:r}=e,{props:i,children:l,patchFlag:c}=t,d=r.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&c>=0){if(c&1024)return!0;if(c&16)return n?$o(n,i,d):!!i;if(c&8){const u=t.dynamicProps;for(let h=0;h<u.length;h++){const v=u[h];if(i[v]!==n[v]&&!Us(d,v))return!0}}}else return(o||l)&&(!l||!l.$stable)?!0:n===i?!1:n?i?$o(n,i,d):!0:!!i;return!1}function $o(e,t,s){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let o=0;o<n.length;o++){const r=n[o];if(t[r]!==e[r]&&!Us(s,r))return!0}return!1}function ka({vnode:e,parent:t},s){for(;t;){const n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.el=e.el),n===e)(e=t.vnode).el=s,t=t.parent;else break}}const Si=e=>e.__isSuspense;function Ea(e,t){t&&t.pendingBranch?B(e)?t.effects.push(...e):t.effects.push(e):Il(e)}const ge=Symbol.for("v-fgt"),Vs=Symbol.for("v-txt"),wt=Symbol.for("v-cmt"),vs=Symbol.for("v-stc"),es=[];let je=null;function S(e=!1){es.push(je=e?null:[])}function Ra(){es.pop(),je=es[es.length-1]||null}let rs=1;function Po(e,t=!1){rs+=e,e<0&&je&&t&&(je.hasOnce=!0)}function zi(e){return e.dynamicChildren=rs>0?je||Mt:null,Ra(),rs>0&&je&&je.push(e),e}function z(e,t,s,n,o,r){return zi(a(e,t,s,n,o,r,!0))}function Ci(e,t,s,n,o){return zi(Le(e,t,s,n,o,!0))}function $i(e){return e?e.__v_isVNode===!0:!1}function Vt(e,t){return e.type===t.type&&e.key===t.key}const Pi=({key:e})=>e??null,bs=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?_e(e)||de(e)||W(e)?{i:Ve,r:e,k:t,f:!!s}:e:null);function a(e,t=null,s=null,n=0,o=null,r=e===ge?0:1,i=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Pi(t),ref:t&&bs(t),scopeId:si,slotScopeIds:null,children:s,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:r,patchFlag:n,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Ve};return l?(so(c,s),r&128&&e.normalize(c)):s&&(c.shapeFlag|=_e(s)?8:16),rs>0&&!i&&je&&(c.patchFlag>0||r&6)&&c.patchFlag!==32&&je.push(c),c}const Le=Oa;function Oa(e,t=null,s=null,n=0,o=null,r=!1){if((!e||e===Ql)&&(e=wt),$i(e)){const l=It(e,t,!0);return s&&so(l,s),rs>0&&!r&&je&&(l.shapeFlag&6?je[je.indexOf(e)]=l:je.push(l)),l.patchFlag=-2,l}if(Va(e)&&(e=e.__vccOpts),t){t=Ma(t);let{class:l,style:c}=t;l&&!_e(l)&&(t.class=Ne(l)),ce(c)&&(Yn(c)&&!B(c)&&(c=$e({},c)),t.style=qn(c))}const i=_e(e)?1:Si(e)?128:Fl(e)?64:ce(e)?4:W(e)?2:0;return a(e,t,s,n,o,i,r,!0)}function Ma(e){return e?Yn(e)||di(e)?$e({},e):e:null}function It(e,t,s=!1,n=!1){const{props:o,ref:r,patchFlag:i,children:l,transition:c}=e,d=t?Ta(o||{},t):o,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&Pi(d),ref:t&&t.ref?s&&r?B(r)?r.concat(bs(t)):[r,bs(t)]:bs(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ge?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&It(e.ssContent),ssFallback:e.ssFallback&&It(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&n&&Xn(u,c.clone(u)),u}function ve(e=" ",t=0){return Le(Vs,null,e,t)}function La(e,t){const s=Le(vs,null,e);return s.staticCount=t,s}function X(e="",t=!1){return t?(S(),Ci(wt,null,e)):Le(wt,null,e)}function Ze(e){return e==null||typeof e=="boolean"?Le(wt):B(e)?Le(ge,null,e.slice()):$i(e)?mt(e):Le(Vs,null,String(e))}function mt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:It(e)}function so(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(B(t))s=16;else if(typeof t=="object")if(n&65){const o=t.default;o&&(o._c&&(o._d=!1),so(e,o()),o._c&&(o._d=!0));return}else{s=32;const o=t._;!o&&!di(t)?t._ctx=Ve:o===3&&Ve&&(Ve.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else W(t)?(t={default:t,_ctx:Ve},s=32):(t=String(t),n&64?(s=16,t=[ve(t)]):s=8);e.children=t,e.shapeFlag|=s}function Ta(...e){const t={};for(let s=0;s<e.length;s++){const n=e[s];for(const o in n)if(o==="class")t.class!==n.class&&(t.class=Ne([t.class,n.class]));else if(o==="style")t.style=qn([t.style,n.style]);else if(Os(o)){const r=t[o],i=n[o];i&&r!==i&&!(B(r)&&r.includes(i))&&(t[o]=r?[].concat(r,i):i)}else o!==""&&(t[o]=n[o])}return t}function Je(e,t,s,n=null){tt(e,t,7,[s,n])}const Aa=ci();let Ia=0;function Da(e,t,s){const n=e.type,o=(t?t.appContext:e.appContext)||Aa,r={uid:Ia++,vnode:e,type:n,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Er(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:pi(n,o),emitsOptions:xi(n,o),emit:null,emitted:null,propsDefaults:ae,inheritAttrs:n.inheritAttrs,ctx:ae,data:ae,props:ae,attrs:ae,slots:ae,refs:ae,setupState:ae,setupContext:null,suspense:s,suspenseId:s?s.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 r.ctx={_:r},r.root=t?t.root:r,r.emit=Sa.bind(null,r),e.ce&&e.ce(r),r}let Re=null;const ki=()=>Re||Ve;let Es,Ln;{const e=Ls(),t=(s,n)=>{let o;return(o=e[s])||(o=e[s]=[]),o.push(n),r=>{o.length>1?o.forEach(i=>i(r)):o[0](r)}};Es=t("__VUE_INSTANCE_SETTERS__",s=>Re=s),Ln=t("__VUE_SSR_SETTERS__",s=>is=s)}const fs=e=>{const t=Re;return Es(e),e.scope.on(),()=>{e.scope.off(),Es(t)}},ko=()=>{Re&&Re.scope.off(),Es(null)};function Ei(e){return e.vnode.shapeFlag&4}let is=!1;function Na(e,t=!1,s=!1){t&&Ln(t);const{props:n,children:o}=e.vnode,r=Ei(e);ca(e,n,r,t),ha(e,o,s||t);const i=r?Fa(e,t):void 0;return t&&Ln(!1),i}function Fa(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Xl);const{setup:n}=s;if(n){ut();const o=e.setupContext=n.length>1?Ua(e):null,r=fs(e),i=us(n,e,0,[e.props,o]),l=wr(i);if(ft(),r(),(l||e.sp)&&!Zt(e)&&ni(e),l){if(i.then(ko,ko),t)return i.then(c=>{Eo(e,c)}).catch(c=>{Ns(c,e,0)});e.asyncDep=i}else Eo(e,i)}else Ri(e)}function Eo(e,t,s){W(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ce(t)&&(e.setupState=Yr(t)),Ri(e)}function Ri(e,t,s){const n=e.type;e.render||(e.render=n.render||Xe);{const o=fs(e);ut();try{ea(e)}finally{ft(),o()}}}const ja={get(e,t){return Ce(e,"get",""),e[t]}};function Ua(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,ja),slots:e.slots,emit:e.emit,expose:t}}function qs(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Yr(Zn(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Qt)return Qt[s](e)},has(t,s){return s in t||s in Qt}})):e.proxy}function Va(e){return W(e)&&"__vccOpts"in e}const Ue=(e,t)=>Ol(e,t,is),qa="3.5.22";/**
|
|
* @vue/runtime-dom v3.5.22
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/let Tn;const Ro=typeof window<"u"&&window.trustedTypes;if(Ro)try{Tn=Ro.createPolicy("vue",{createHTML:e=>e})}catch{}const Oi=Tn?e=>Tn.createHTML(e):e=>e,Ba="http://www.w3.org/2000/svg",Ha="http://www.w3.org/1998/Math/MathML",ot=typeof document<"u"?document:null,Oo=ot&&ot.createElement("template"),Wa={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const o=t==="svg"?ot.createElementNS(Ba,e):t==="mathml"?ot.createElementNS(Ha,e):s?ot.createElement(e,{is:s}):ot.createElement(e);return e==="select"&&n&&n.multiple!=null&&o.setAttribute("multiple",n.multiple),o},createText:e=>ot.createTextNode(e),createComment:e=>ot.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ot.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,o,r){const i=s?s.previousSibling:t.lastChild;if(o&&(o===r||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),s),!(o===r||!(o=o.nextSibling)););else{Oo.innerHTML=Oi(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const l=Oo.content;if(n==="svg"||n==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,s)}return[i?i.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Ka=Symbol("_vtc");function Ga(e,t,s){const n=e[Ka];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Rs=Symbol("_vod"),Mi=Symbol("_vsh"),Mo={name:"show",beforeMount(e,{value:t},{transition:s}){e[Rs]=e.style.display==="none"?"":e.style.display,s&&t?s.beforeEnter(e):qt(e,t)},mounted(e,{value:t},{transition:s}){s&&t&&s.enter(e)},updated(e,{value:t,oldValue:s},{transition:n}){!t!=!s&&(n?t?(n.beforeEnter(e),qt(e,!0),n.enter(e)):n.leave(e,()=>{qt(e,!1)}):qt(e,t))},beforeUnmount(e,{value:t}){qt(e,t)}};function qt(e,t){e.style.display=t?e[Rs]:"none",e[Mi]=!t}const Ja=Symbol(""),Ya=/(?:^|;)\s*display\s*:/;function Za(e,t,s){const n=e.style,o=_e(s);let r=!1;if(s&&!o){if(t)if(_e(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();s[l]==null&&_s(n,l,"")}else for(const i in t)s[i]==null&&_s(n,i,"");for(const i in s)i==="display"&&(r=!0),_s(n,i,s[i])}else if(o){if(t!==s){const i=n[Ja];i&&(s+=";"+i),n.cssText=s,r=Ya.test(s)}}else t&&e.removeAttribute("style");Rs in e&&(e[Rs]=r?n.display:"",e[Mi]&&(n.display="none"))}const Lo=/\s*!important$/;function _s(e,t,s){if(B(s))s.forEach(n=>_s(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Qa(e,t);Lo.test(s)?e.setProperty(kt(n),s.replace(Lo,""),"important"):e[n]=s}}const To=["Webkit","Moz","ms"],Xs={};function Qa(e,t){const s=Xs[t];if(s)return s;let n=_t(t);if(n!=="filter"&&n in e)return Xs[t]=n;n=zr(n);for(let o=0;o<To.length;o++){const r=To[o]+n;if(r in e)return Xs[t]=r}return t}const Ao="http://www.w3.org/1999/xlink";function Io(e,t,s,n,o,r=tl(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(Ao,t.slice(6,t.length)):e.setAttributeNS(Ao,t,s):s==null||r&&!$r(s)?e.removeAttribute(t):e.setAttribute(t,r?"":et(s)?String(s):s)}function Do(e,t,s,n,o){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?Oi(s):s);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const l=r==="OPTION"?e.getAttribute("value")||"":e.value,c=s==null?e.type==="checkbox"?"on":"":String(s);(l!==c||!("_value"in e))&&(e.value=c),s==null&&e.removeAttribute(t),e._value=s;return}let i=!1;if(s===""||s==null){const l=typeof e[t];l==="boolean"?s=$r(s):s==null&&l==="string"?(s="",i=!0):l==="number"&&(s=0,i=!0)}try{e[t]=s}catch{}i&&e.removeAttribute(o||t)}function vt(e,t,s,n){e.addEventListener(t,s,n)}function Xa(e,t,s,n){e.removeEventListener(t,s,n)}const No=Symbol("_vei");function ec(e,t,s,n,o=null){const r=e[No]||(e[No]={}),i=r[t];if(n&&i)i.value=n;else{const[l,c]=tc(t);if(n){const d=r[t]=oc(n,o);vt(e,l,d,c)}else i&&(Xa(e,l,i,c),r[t]=void 0)}}const Fo=/(?:Once|Passive|Capture)$/;function tc(e){let t;if(Fo.test(e)){t={};let n;for(;n=e.match(Fo);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):kt(e.slice(2)),t]}let en=0;const sc=Promise.resolve(),nc=()=>en||(sc.then(()=>en=0),en=Date.now());function oc(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;tt(rc(n,s.value),t,5,[n])};return s.value=e,s.attached=nc(),s}function rc(e,t){if(B(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>o=>!o._stopped&&n&&n(o))}else return t}const jo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ic=(e,t,s,n,o,r)=>{const i=o==="svg";t==="class"?Ga(e,n,i):t==="style"?Za(e,s,n):Os(t)?jn(t)||ec(e,t,s,n,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):lc(e,t,n,i))?(Do(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Io(e,t,n,i,r,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!_e(n))?Do(e,_t(t),n,r,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Io(e,t,n,i))};function lc(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&jo(t)&&W(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return jo(t)&&_e(s)?!1:t in e}const Dt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return B(t)?s=>gs(t,s):t};function ac(e){e.target.composing=!0}function Uo(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ct=Symbol("_assign"),ys={created(e,{modifiers:{lazy:t,trim:s,number:n}},o){e[ct]=Dt(o);const r=n||o.props&&o.props.type==="number";vt(e,t?"change":"input",i=>{if(i.target.composing)return;let l=e.value;s&&(l=l.trim()),r&&(l=ws(l)),e[ct](l)}),s&&vt(e,"change",()=>{e.value=e.value.trim()}),t||(vt(e,"compositionstart",ac),vt(e,"compositionend",Uo),vt(e,"change",Uo))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:o,number:r}},i){if(e[ct]=Dt(i),e.composing)return;const l=(r||e.type==="number")&&!/^0\d/.test(e.value)?ws(e.value):e.value,c=t??"";l!==c&&(document.activeElement===e&&e.type!=="range"&&(n&&t===s||o&&e.value.trim()===c)||(e.value=c))}},cc={deep:!0,created(e,t,s){e[ct]=Dt(s),vt(e,"change",()=>{const n=e._modelValue,o=ls(e),r=e.checked,i=e[ct];if(B(n)){const l=Bn(n,o),c=l!==-1;if(r&&!c)i(n.concat(o));else if(!r&&c){const d=[...n];d.splice(l,1),i(d)}}else if(Nt(n)){const l=new Set(n);r?l.add(o):l.delete(o),i(l)}else i(Ti(e,r))})},mounted:Vo,beforeUpdate(e,t,s){e[ct]=Dt(s),Vo(e,t,s)}};function Vo(e,{value:t,oldValue:s},n){e._modelValue=t;let o;if(B(t))o=Bn(t,n.props.value)>-1;else if(Nt(t))o=t.has(n.props.value);else{if(t===s)return;o=cs(t,Ti(e,!0))}e.checked!==o&&(e.checked=o)}const Li={deep:!0,created(e,{value:t,modifiers:{number:s}},n){const o=Nt(t);vt(e,"change",()=>{const r=Array.prototype.filter.call(e.options,i=>i.selected).map(i=>s?ws(ls(i)):ls(i));e[ct](e.multiple?o?new Set(r):r:r[0]),e._assigning=!0,At(()=>{e._assigning=!1})}),e[ct]=Dt(n)},mounted(e,{value:t}){qo(e,t)},beforeUpdate(e,t,s){e[ct]=Dt(s)},updated(e,{value:t}){e._assigning||qo(e,t)}};function qo(e,t){const s=e.multiple,n=B(t);if(!(s&&!n&&!Nt(t))){for(let o=0,r=e.options.length;o<r;o++){const i=e.options[o],l=ls(i);if(s)if(n){const c=typeof l;c==="string"||c==="number"?i.selected=t.some(d=>String(d)===String(l)):i.selected=Bn(t,l)>-1}else i.selected=t.has(l);else if(cs(ls(i),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ls(e){return"_value"in e?e._value:e.value}function Ti(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const uc=["ctrl","shift","alt","meta"],fc={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)=>uc.some(s=>e[`${s}Key`]&&!t.includes(s))},An=(e,t)=>{const s=e._withMods||(e._withMods={}),n=t.join(".");return s[n]||(s[n]=((o,...r)=>{for(let i=0;i<t.length;i++){const l=fc[t[i]];if(l&&l(o,t))return}return e(o,...r)}))},dc=$e({patchProp:ic},Wa);let Bo;function hc(){return Bo||(Bo=ga(dc))}const pc=((...e)=>{const t=hc().createApp(...e),{mount:s}=t;return t.mount=n=>{const o=mc(n);if(!o)return;const r=t._component;!W(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=s(o,!1,gc(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t});function gc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function mc(e){return _e(e)?document.querySelector(e):e}/*!
|
|
* pinia v3.0.3
|
|
* (c) 2025 Eduardo San Martin Morote
|
|
* @license MIT
|
|
*/let Ai;const Bs=e=>Ai=e,Ii=Symbol();function In(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var ts;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(ts||(ts={}));function vc(){const e=Rr(!0),t=e.run(()=>oe({}));let s=[],n=[];const o=Zn({install(r){Bs(o),o._a=r,r.provide(Ii,o),r.config.globalProperties.$pinia=o,n.forEach(i=>s.push(i)),n=[]},use(r){return this._a?s.push(r):n.push(r),this},_p:s,_a:null,_e:e,_s:new Map,state:t});return o}const Di=()=>{};function Ho(e,t,s,n=Di){e.push(t);const o=()=>{const r=e.indexOf(t);r>-1&&(e.splice(r,1),n())};return!s&&Hn()&&Or(o),o}function Rt(e,...t){e.slice().forEach(s=>{s(...t)})}const bc=e=>e(),Wo=Symbol(),tn=Symbol();function Dn(e,t){e instanceof Map&&t instanceof Map?t.forEach((s,n)=>e.set(n,s)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const s in t){if(!t.hasOwnProperty(s))continue;const n=t[s],o=e[s];In(o)&&In(n)&&e.hasOwnProperty(s)&&!de(n)&&!at(n)?e[s]=Dn(o,n):e[s]=n}return e}const _c=Symbol();function yc(e){return!In(e)||!Object.prototype.hasOwnProperty.call(e,_c)}const{assign:pt}=Object;function wc(e){return!!(de(e)&&e.effect)}function xc(e,t,s,n){const{state:o,actions:r,getters:i}=t,l=s.state.value[e];let c;function d(){l||(s.state.value[e]=o?o():{});const u=$l(s.state.value[e]);return pt(u,r,Object.keys(i||{}).reduce((h,v)=>(h[v]=Zn(Ue(()=>{Bs(s);const _=s._s.get(e);return i[v].call(_,_)})),h),{}))}return c=Ni(e,d,t,s,n,!0),c}function Ni(e,t,s={},n,o,r){let i;const l=pt({actions:{}},s),c={deep:!0};let d,u,h=[],v=[],_;const I=n.state.value[e];!r&&!I&&(n.state.value[e]={}),oe({});let A;function T(K){let J;d=u=!1,typeof K=="function"?(K(n.state.value[e]),J={type:ts.patchFunction,storeId:e,events:_}):(Dn(n.state.value[e],K),J={type:ts.patchObject,payload:K,storeId:e,events:_});const le=A=Symbol();At().then(()=>{A===le&&(d=!0)}),u=!0,Rt(h,J,n.state.value[e])}const g=r?function(){const{state:J}=s,le=J?J():{};this.$patch(be=>{pt(be,le)})}:Di;function m(){i.stop(),h=[],v=[],n._s.delete(e)}const x=(K,J="")=>{if(Wo in K)return K[tn]=J,K;const le=function(){Bs(n);const be=Array.from(arguments),Pe=[],Te=[];function st(G){Pe.push(G)}function Se(G){Te.push(G)}Rt(v,{args:be,name:le[tn],store:R,after:st,onError:Se});let re;try{re=K.apply(this&&this.$id===e?this:R,be)}catch(G){throw Rt(Te,G),G}return re instanceof Promise?re.then(G=>(Rt(Pe,G),G)).catch(G=>(Rt(Te,G),Promise.reject(G))):(Rt(Pe,re),re)};return le[Wo]=!0,le[tn]=J,le},C={_p:n,$id:e,$onAction:Ho.bind(null,v),$patch:T,$reset:g,$subscribe(K,J={}){const le=Ho(h,K,J.detached,()=>be()),be=i.run(()=>Pt(()=>n.state.value[e],Pe=>{(J.flush==="sync"?u:d)&&K({storeId:e,type:ts.direct,events:_},Pe)},pt({},c,J)));return le},$dispose:m},R=Is(C);n._s.set(e,R);const he=(n._a&&n._a.runWithContext||bc)(()=>n._e.run(()=>(i=Rr()).run(()=>t({action:x}))));for(const K in he){const J=he[K];if(de(J)&&!wc(J)||at(J))r||(I&&yc(J)&&(de(J)?J.value=I[K]:Dn(J,I[K])),n.state.value[e][K]=J);else if(typeof J=="function"){const le=x(J,K);he[K]=le,l.actions[K]=J}}return pt(R,he),pt(Q(R),he),Object.defineProperty(R,"$state",{get:()=>n.state.value[e],set:K=>{T(J=>{pt(J,K)})}}),n._p.forEach(K=>{pt(R,i.run(()=>K({store:R,app:n._a,pinia:n,options:l})))}),I&&r&&s.hydrate&&s.hydrate(R.$state,I),d=!0,u=!0,R}/*! #__NO_SIDE_EFFECTS__ */function no(e,t,s){let n;const o=typeof t=="function";n=o?s:t;function r(i,l){const c=aa();return i=i||(c?Xt(Ii,null):null),i&&Bs(i),i=Ai,i._s.has(e)||(o?Ni(e,t,n,i):xc(e,n,i)),i._s.get(e)}return r.$id=e,r}function oo(e){const t=Q(e),s={};for(const n in t){const o=t[n];o.effect?s[n]=Ue({get:()=>e[n],set(r){e[n]=r}}):(de(o)||at(o))&&(s[n]=El(e,n))}return s}const Ko="/api";class Sc{async request(t,s={}){try{const n=await fetch(`${Ko}${t}`,{headers:{"Content-Type":"application/json",...s.headers},...s}),o=await n.json();return n.ok?{data:o,status:n.status}:{error:o.detail||`HTTP ${n.status}`,status:n.status}}catch(n){return{error:n instanceof Error?n.message:"Network error",status:0}}}async uploadRequest(t,s){try{const n=await fetch(`${Ko}${t}`,{method:"POST",body:s}),o=await n.json();return n.ok?{data:o,status:n.status}:{error:o.detail||`HTTP ${n.status}`,status:n.status}}catch(n){return{error:n instanceof Error?n.message:"Network error",status:0}}}async getPuzzles(){return this.request("/submissions/puzzles")}async getSubmissions(t=20,s=0){return this.request(`/submissions/submissions?limit=${t}&offset=${s}`)}async getSubmission(t){return this.request(`/submissions/submissions/${t}`)}async createSubmission(t,s){const n=new FormData;return n.append("data",JSON.stringify(t)),s.forEach(o=>{n.append("files",o)}),this.uploadRequest("/submissions/submissions",n)}async validateResponse(t,s){return this.request(`/submissions/responses/${t}/validate`,{method:"PUT",body:JSON.stringify(s)})}async autoValidateResponses(t){return this.request(`/submissions/responses/${t}/validate/auto`,{method:"PUT"})}async getResponsesNeedingValidation(){return this.request("/submissions/responses/needs-validation")}async validateSubmission(t){return this.request(`/submissions/submissions/${t}/validate`,{method:"POST"})}async deleteSubmission(t){return this.request(`/submissions/submissions/${t}`,{method:"DELETE"})}async getStats(){return this.request("/submissions/stats")}async healthCheck(){return this.request("/health")}async getUserInfo(){return this.request("/user")}}const Qe=new Sc,zc={async loadPuzzles(){const e=await Qe.getPuzzles();return e.error?(console.error("Failed to load puzzles:",e.error),[]):e.data||[]},findPuzzleByName(e,t){if(!t)return null;let s=e.find(n=>n.title.toLowerCase()===t.toLowerCase());return s||(s=e.find(n=>n.title.toLowerCase().includes(t.toLowerCase())||t.toLowerCase().includes(n.title.toLowerCase()))),s||null}},Go={async createFromFiles(e,t,s,n){const o=e.map(i=>{const l=zc.findPuzzleByName(t,i.ocrData?.puzzle||"");if(l)return{puzzle_id:l.id,puzzle_name:i.ocrData?.puzzle||"",cost:i.ocrData?.cost,cycles:i.ocrData?.cycles,area:i.ocrData?.area,needs_manual_validation:(i.ocrData?.confidence.overall??0)<=.8,ocr_confidence_cost:i.ocrData?.confidence?.cost||0,ocr_confidence_cycles:i.ocrData?.confidence?.cycles||0,ocr_confidence_area:i.ocrData?.confidence?.area||0}}).filter(i=>i!==void 0),r=e.map(i=>i.file);return Qe.createSubmission({notes:s,manual_validation_requested:n,responses:o},r)},async loadSubmissions(e=20,t=0){const s=await Qe.getSubmissions(e,t);return s.error?(console.error("Failed to load submissions:",s.error),[]):s.data?.items||[]}},Fi={getErrorMessage(e){return typeof e=="string"?e:e instanceof Error?e.message:typeof e=="object"&&e!==null&&"detail"in e?String(e.detail):"An unknown error occurred"},isNetworkError(e){return typeof e=="string"&&e.includes("Network")},isValidationError(e){return e===400},isAuthError(e){return e===401||e===403}},Hs=no("puzzles",()=>{const e=oe([]),t=oe(!1),s=oe(""),n=Ue(()=>e.value.map(l=>l.title)),o=Ue(()=>l=>{if(!l)return null;const c=e.value.find(u=>u.title.toLowerCase()===l.toLowerCase());return c||e.value.find(u=>u.title.toLowerCase().includes(l.toLowerCase())||l.toLowerCase().includes(u.title.toLowerCase()))||null}),r=async()=>{if(!(e.value.length>0))try{t.value=!0,s.value="";const l=await Qe.getPuzzles();if(l.error){s.value=l.error,console.error("Failed to load puzzles:",l.error);return}l.data&&(e.value=l.data)}catch(l){s.value="Failed to load puzzles",console.error("Error loading puzzles:",l)}finally{t.value=!1}};return{puzzles:e,isLoading:t,error:s,puzzleNames:n,findPuzzleByName:o,loadPuzzles:r,refreshPuzzles:async()=>{e.value=[],await r()}}}),ro=no("submissions",()=>{const e=oe([]),t=oe(!1),s=oe(""),n=oe(!1),o=Hs(),{puzzles:r}=oo(o),i=async(v=20,_=0)=>{try{t.value=!0,s.value="";const I=await Go.loadSubmissions(v,_);_===0?e.value=I:e.value.push(...I)}catch(I){s.value="Failed to load submissions",console.error("Error loading submissions:",I)}finally{t.value=!1}},l=async(v,_,I)=>{try{t.value=!0,s.value="";const A=await Go.createFromFiles(v,r.value,_,I);if(A.error)throw s.value=A.error,new Error(A.error);return A.data?(e.value.unshift(A.data),A.data):void 0}catch(A){throw s.value=A instanceof Error?A.message:"Failed to create submission",A}finally{t.value=!1}},c=()=>{n.value=!0},d=()=>{n.value=!1};return{submissions:e,isLoading:t,error:s,isSubmissionModalOpen:n,loadSubmissions:i,createSubmission:l,openSubmissionModal:c,closeSubmissionModal:d,refreshSubmissions:async()=>{e.value=[],await i()},handleSubmission:async v=>{try{t.value=!0,s.value="";const _=await l(v.files,v.notes,v.manualValidationRequested);if(_){const I=_.responses.map(A=>A.puzzle_name).join(", ");alert(`Solutions submitted successfully for puzzles: ${I}`)}else alert("Submission created successfully!");d()}catch(_){const I=Fi.getErrorMessage(_);s.value=I,alert(`Submission failed: ${I}`),console.error("Submission error:",_)}finally{t.value=!1}}}}),Cc={class:"card-body"},$c={class:"flex items-start justify-between"},Pc={class:"flex-1"},kc={class:"card-title text-lg font-bold"},Ec={class:"text-sm text-base-content/70 mb-2"},Rc={class:"flex items-center gap-2 mb-3"},Oc={class:"badge badge-primary badge-sm"},Mc={class:"badge badge-ghost badge-sm"},Lc={key:0,class:"text-sm text-base-content/80 mb-4"},Tc={key:1,class:"flex flex-wrap gap-1 mb-4"},Ac={key:0,class:"badge badge-outline badge-xs"},Ic={class:"flex flex-col items-end gap-2"},Dc={class:"tooltip","data-tip":"View on Steam Workshop"},Nc=["href"],Fc={key:0,class:"mt-6"},jc={class:"divider"},Uc={class:"text-sm font-medium"},Vc={class:"table table-xs"},qc={key:0,class:"badge badge-success badge-xs"},Bc={key:1,class:"text-base-content/50"},Hc={key:0,class:"badge badge-info badge-xs"},Wc={key:1,class:"text-base-content/50"},Kc={key:0,class:"badge badge-warning badge-xs"},Gc={key:1,class:"text-base-content/50"},Jc={class:"flex items-center gap-1"},Yc={class:"badge badge-ghost badge-xs"},Zc=["data-tip"],Qc={key:1,class:"tooltip","data-tip":"Needs manual validation"},Xc=Ft({__name:"PuzzleCard",props:{puzzle:{},responses:{}},setup(e){const{openSubmissionModal:t}=ro();return(s,n)=>(S(),z("div",{class:Ne(["card bg-base-100 shadow-lg hover:shadow-2xl transition-shadow duration-300",e.responses?.length==0?"shadow-red-900":"shadow-primary-300"])},[a("div",Cc,[a("div",$c,[a("div",Pc,[a("h3",kc,N(e.puzzle.title),1),a("p",Ec," by "+N(e.puzzle.author_name),1),a("div",Rc,[a("div",Oc,N(e.puzzle.steam_item_id),1),a("div",Mc,"ID: "+N(e.puzzle.id),1)]),e.puzzle.description?(S(),z("p",Lc,N(e.puzzle.description),1)):X("",!0),e.puzzle.tags&&e.puzzle.tags.length>0?(S(),z("div",Tc,[(S(!0),z(ge,null,Fe(e.puzzle.tags.slice(0,3),o=>(S(),z("span",{key:o,class:"badge badge-outline badge-xs"},N(o),1))),128)),e.puzzle.tags.length>3?(S(),z("span",Ac," +"+N(e.puzzle.tags.length-3)+" more ",1)):X("",!0)])):X("",!0)]),a("div",Ic,[a("div",Dc,[a("a",{href:`https://steamcommunity.com/workshop/filedetails/?id=${e.puzzle.steam_item_id}`,target:"_blank",class:"btn btn-ghost btn-sm btn-square"},[...n[1]||(n[1]=[a("i",{class:"mdi mdi-steam text-lg"},null,-1)])],8,Nc)])])]),e.responses&&e.responses.length>0?(S(),z("div",Fc,[a("div",jc,[a("span",Uc,"Solutions ("+N(e.responses.length)+")",1)]),a("div",null,[a("table",Vc,[n[4]||(n[4]=a("thead",null,[a("tr",null,[a("th",null,"Cost"),a("th",null,"Cycles"),a("th",null,"Area"),a("th",null,"Files")])],-1)),a("tbody",null,[(S(!0),z(ge,null,Fe(e.responses,o=>(S(),z("tr",{key:o.id,class:"hover"},[a("td",null,[o.final_cost||o.cost?(S(),z("span",qc,N(o.final_cost||o.cost),1)):(S(),z("span",Bc,"-"))]),a("td",null,[o.final_cycles||o.cycles?(S(),z("span",Hc,N(o.final_cycles||o.cycles),1)):(S(),z("span",Wc,"-"))]),a("td",null,[o.final_area||o.area?(S(),z("span",Kc,N(o.final_area||o.area),1)):(S(),z("span",Gc,"-"))]),a("td",null,[a("div",Jc,[a("span",Yc,N(o.files?.length||0),1),o.files?.length?(S(),z("div",{key:0,class:"tooltip","data-tip":o.files.map(r=>r.original_filename||r.file?.name).join(", ")},[...n[2]||(n[2]=[a("i",{class:"mdi mdi-information-outline text-xs"},null,-1)])],8,Zc)):X("",!0),o.needs_manual_validation?(S(),z("div",Qc,[...n[3]||(n[3]=[a("i",{class:"mdi mdi-alert-circle text-xs text-warning"},null,-1)])])):X("",!0)])])]))),128))])])])])):(S(),z("div",{key:1,class:"mt-6 text-center py-4 border-2 border-dashed border-base-300 rounded-lg hover:border-primary transition-colors duration-300 cursor-pointer",onClick:n[0]||(n[0]=(...o)=>ie(t)&&ie(t)(...o))},[...n[5]||(n[5]=[a("i",{class:"mdi mdi-upload text-2xl text-base-content/40"},null,-1),a("p",{class:"text-sm text-base-content/60 mt-2"},"No solutions yet",-1),a("p",{class:"text-xs text-base-content/40"}," Upload solutions using the submit button ",-1)])]))])],2))}});var sn={exports:{}},Jo;function eu(){return Jo||(Jo=1,(function(e){var t=(function(s){var n=Object.prototype,o=n.hasOwnProperty,r=Object.defineProperty||function(E,$,D){E[$]=D.value},i,l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",d=l.asyncIterator||"@@asyncIterator",u=l.toStringTag||"@@toStringTag";function h(E,$,D){return Object.defineProperty(E,$,{value:D,enumerable:!0,configurable:!0,writable:!0}),E[$]}try{h({},"")}catch{h=function($,D,q){return $[D]=q}}function v(E,$,D,q){var j=$&&$.prototype instanceof x?$:x,ee=Object.create(j.prototype),we=new re(q||[]);return r(ee,"_invoke",{value:Pe(E,D,we)}),ee}s.wrap=v;function _(E,$,D){try{return{type:"normal",arg:E.call($,D)}}catch(q){return{type:"throw",arg:q}}}var I="suspendedStart",A="suspendedYield",T="executing",g="completed",m={};function x(){}function C(){}function R(){}var te={};h(te,c,function(){return this});var he=Object.getPrototypeOf,K=he&&he(he(G([])));K&&K!==n&&o.call(K,c)&&(te=K);var J=R.prototype=x.prototype=Object.create(te);C.prototype=R,r(J,"constructor",{value:R,configurable:!0}),r(R,"constructor",{value:C,configurable:!0}),C.displayName=h(R,u,"GeneratorFunction");function le(E){["next","throw","return"].forEach(function($){h(E,$,function(D){return this._invoke($,D)})})}s.isGeneratorFunction=function(E){var $=typeof E=="function"&&E.constructor;return $?$===C||($.displayName||$.name)==="GeneratorFunction":!1},s.mark=function(E){return Object.setPrototypeOf?Object.setPrototypeOf(E,R):(E.__proto__=R,h(E,u,"GeneratorFunction")),E.prototype=Object.create(J),E},s.awrap=function(E){return{__await:E}};function be(E,$){function D(ee,we,pe,ye){var me=_(E[ee],E,we);if(me.type==="throw")ye(me.arg);else{var ht=me.arg,Ae=ht.value;return Ae&&typeof Ae=="object"&&o.call(Ae,"__await")?$.resolve(Ae.__await).then(function(He){D("next",He,pe,ye)},function(He){D("throw",He,pe,ye)}):$.resolve(Ae).then(function(He){ht.value=He,pe(ht)},function(He){return D("throw",He,pe,ye)})}}var q;function j(ee,we){function pe(){return new $(function(ye,me){D(ee,we,ye,me)})}return q=q?q.then(pe,pe):pe()}r(this,"_invoke",{value:j})}le(be.prototype),h(be.prototype,d,function(){return this}),s.AsyncIterator=be,s.async=function(E,$,D,q,j){j===void 0&&(j=Promise);var ee=new be(v(E,$,D,q),j);return s.isGeneratorFunction($)?ee:ee.next().then(function(we){return we.done?we.value:ee.next()})};function Pe(E,$,D){var q=I;return function(ee,we){if(q===T)throw new Error("Generator is already running");if(q===g){if(ee==="throw")throw we;return Y()}for(D.method=ee,D.arg=we;;){var pe=D.delegate;if(pe){var ye=Te(pe,D);if(ye){if(ye===m)continue;return ye}}if(D.method==="next")D.sent=D._sent=D.arg;else if(D.method==="throw"){if(q===I)throw q=g,D.arg;D.dispatchException(D.arg)}else D.method==="return"&&D.abrupt("return",D.arg);q=T;var me=_(E,$,D);if(me.type==="normal"){if(q=D.done?g:A,me.arg===m)continue;return{value:me.arg,done:D.done}}else me.type==="throw"&&(q=g,D.method="throw",D.arg=me.arg)}}}function Te(E,$){var D=$.method,q=E.iterator[D];if(q===i)return $.delegate=null,D==="throw"&&E.iterator.return&&($.method="return",$.arg=i,Te(E,$),$.method==="throw")||D!=="return"&&($.method="throw",$.arg=new TypeError("The iterator does not provide a '"+D+"' method")),m;var j=_(q,E.iterator,$.arg);if(j.type==="throw")return $.method="throw",$.arg=j.arg,$.delegate=null,m;var ee=j.arg;if(!ee)return $.method="throw",$.arg=new TypeError("iterator result is not an object"),$.delegate=null,m;if(ee.done)$[E.resultName]=ee.value,$.next=E.nextLoc,$.method!=="return"&&($.method="next",$.arg=i);else return ee;return $.delegate=null,m}le(J),h(J,u,"Generator"),h(J,c,function(){return this}),h(J,"toString",function(){return"[object Generator]"});function st(E){var $={tryLoc:E[0]};1 in E&&($.catchLoc=E[1]),2 in E&&($.finallyLoc=E[2],$.afterLoc=E[3]),this.tryEntries.push($)}function Se(E){var $=E.completion||{};$.type="normal",delete $.arg,E.completion=$}function re(E){this.tryEntries=[{tryLoc:"root"}],E.forEach(st,this),this.reset(!0)}s.keys=function(E){var $=Object(E),D=[];for(var q in $)D.push(q);return D.reverse(),function j(){for(;D.length;){var ee=D.pop();if(ee in $)return j.value=ee,j.done=!1,j}return j.done=!0,j}};function G(E){if(E){var $=E[c];if($)return $.call(E);if(typeof E.next=="function")return E;if(!isNaN(E.length)){var D=-1,q=function j(){for(;++D<E.length;)if(o.call(E,D))return j.value=E[D],j.done=!1,j;return j.value=i,j.done=!0,j};return q.next=q}}return{next:Y}}s.values=G;function Y(){return{value:i,done:!0}}return re.prototype={constructor:re,reset:function(E){if(this.prev=0,this.next=0,this.sent=this._sent=i,this.done=!1,this.delegate=null,this.method="next",this.arg=i,this.tryEntries.forEach(Se),!E)for(var $ in this)$.charAt(0)==="t"&&o.call(this,$)&&!isNaN(+$.slice(1))&&(this[$]=i)},stop:function(){this.done=!0;var E=this.tryEntries[0],$=E.completion;if($.type==="throw")throw $.arg;return this.rval},dispatchException:function(E){if(this.done)throw E;var $=this;function D(ye,me){return ee.type="throw",ee.arg=E,$.next=ye,me&&($.method="next",$.arg=i),!!me}for(var q=this.tryEntries.length-1;q>=0;--q){var j=this.tryEntries[q],ee=j.completion;if(j.tryLoc==="root")return D("end");if(j.tryLoc<=this.prev){var we=o.call(j,"catchLoc"),pe=o.call(j,"finallyLoc");if(we&&pe){if(this.prev<j.catchLoc)return D(j.catchLoc,!0);if(this.prev<j.finallyLoc)return D(j.finallyLoc)}else if(we){if(this.prev<j.catchLoc)return D(j.catchLoc,!0)}else if(pe){if(this.prev<j.finallyLoc)return D(j.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(E,$){for(var D=this.tryEntries.length-1;D>=0;--D){var q=this.tryEntries[D];if(q.tryLoc<=this.prev&&o.call(q,"finallyLoc")&&this.prev<q.finallyLoc){var j=q;break}}j&&(E==="break"||E==="continue")&&j.tryLoc<=$&&$<=j.finallyLoc&&(j=null);var ee=j?j.completion:{};return ee.type=E,ee.arg=$,j?(this.method="next",this.next=j.finallyLoc,m):this.complete(ee)},complete:function(E,$){if(E.type==="throw")throw E.arg;return E.type==="break"||E.type==="continue"?this.next=E.arg:E.type==="return"?(this.rval=this.arg=E.arg,this.method="return",this.next="end"):E.type==="normal"&&$&&(this.next=$),m},finish:function(E){for(var $=this.tryEntries.length-1;$>=0;--$){var D=this.tryEntries[$];if(D.finallyLoc===E)return this.complete(D.completion,D.afterLoc),Se(D),m}},catch:function(E){for(var $=this.tryEntries.length-1;$>=0;--$){var D=this.tryEntries[$];if(D.tryLoc===E){var q=D.completion;if(q.type==="throw"){var j=q.arg;Se(D)}return j}}throw new Error("illegal catch attempt")},delegateYield:function(E,$,D){return this.delegate={iterator:G(E),resultName:$,nextLoc:D},this.method==="next"&&(this.arg=i),m}},s})(e.exports);try{regeneratorRuntime=t}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}})(sn)),sn.exports}var nn,Yo;function io(){return Yo||(Yo=1,nn=(e,t)=>`${e}-${t}-${Math.random().toString(16).slice(3,8)}`),nn}var on,Zo;function ji(){if(Zo)return on;Zo=1;const e=io();let t=0;return on=({id:s,action:n,payload:o={}})=>{let r=s;return typeof r>"u"&&(r=e("Job",t),t+=1),{id:r,action:n,payload:o}},on}var Bt={},Qo;function lo(){if(Qo)return Bt;Qo=1;let e=!1;return Bt.logging=e,Bt.setLogging=t=>{e=t},Bt.log=(...t)=>e?console.log.apply(this,t):null,Bt}var rn,Xo;function tu(){if(Xo)return rn;Xo=1;const e=ji(),{log:t}=lo(),s=io();let n=0;return rn=()=>{const o=s("Scheduler",n),r={},i={};let l=[];n+=1;const c=()=>l.length,d=()=>Object.keys(r).length,u=()=>{if(l.length!==0){const A=Object.keys(r);for(let T=0;T<A.length;T+=1)if(typeof i[A[T]]>"u"){l[0](r[A[T]]);break}}},h=(A,T)=>new Promise((g,m)=>{const x=e({action:A,payload:T});l.push(async C=>{l.shift(),i[C.id]=x;try{g(await C[A].apply(this,[...T,x.id]))}catch(R){m(R)}finally{delete i[C.id],u()}}),t(`[${o}]: Add ${x.id} to JobQueue`),t(`[${o}]: JobQueue length=${l.length}`),u()});return{addWorker:A=>(r[A.id]=A,t(`[${o}]: Add ${A.id}`),t(`[${o}]: Number of workers=${d()}`),u(),A.id),addJob:async(A,...T)=>{if(d()===0)throw Error(`[${o}]: You need to have at least one worker before adding jobs`);return h(A,T)},terminate:async()=>{Object.keys(r).forEach(async A=>{await r[A].terminate()}),l=[]},getQueueLen:c,getNumWorkers:d}},rn}function su(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ln,er;function nu(){if(er)return ln;er=1;function e(){return!!(typeof window<"u"&&typeof window.process=="object"&&window.process.type==="renderer"||typeof process<"u"&&typeof process.versions=="object"&&process.versions.electron||typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Electron")>=0)}return ln=e,ln}var an,tr;function ou(){if(tr)return an;tr=1;const e=nu();return an=t=>{const s={};return typeof WorkerGlobalScope<"u"?s.type="webworker":e()?s.type="electron":typeof document=="object"?s.type="browser":typeof process=="object"&&typeof su=="function"&&(s.type="node"),typeof t>"u"?s:s[t]},an}var cn,sr;function ru(){if(sr)return cn;sr=1;const t=ou()("type")==="browser"?s=>new URL(s,window.location.href).href:s=>s;return cn=s=>{const n={...s};return["corePath","workerPath","langPath"].forEach(o=>{s[o]&&(n[o]=t(n[o]))}),n},cn}var un,nr;function iu(){return nr||(nr=1,un=e=>{const t=[],s=[],n=[],o=[],r=[];return e.blocks&&e.blocks.forEach(i=>{i.paragraphs.forEach(l=>{l.lines.forEach(c=>{c.words.forEach(d=>{d.symbols.forEach(u=>{r.push({...u,page:e,block:i,paragraph:l,line:c,word:d})}),o.push({...d,page:e,block:i,paragraph:l,line:c})}),n.push({...c,page:e,block:i,paragraph:l})}),s.push({...l,page:e,block:i})}),t.push({...i,page:e})}),{...e,blocks:t,paragraphs:s,lines:n,words:o,symbols:r}}),un}var fn,or;function Ui(){return or||(or=1,fn={TESSERACT_ONLY:0,LSTM_ONLY:1,TESSERACT_LSTM_COMBINED:2,DEFAULT:3}),fn}const lu="5.1.1",au={version:lu};var dn,rr;function cu(){return rr||(rr=1,dn={workerBlobURL:!0,logger:()=>{}}),dn}var hn,ir;function uu(){if(ir)return hn;ir=1;const e=au.version;return hn={...cu(),workerPath:`https://cdn.jsdelivr.net/npm/tesseract.js@v${e}/dist/worker.min.js`},hn}var pn,lr;function fu(){return lr||(lr=1,pn=({workerPath:e,workerBlobURL:t})=>{let s;if(Blob&&URL&&t){const n=new Blob([`importScripts("${e}");`],{type:"application/javascript"});s=new Worker(URL.createObjectURL(n))}else s=new Worker(e);return s}),pn}var gn,ar;function du(){return ar||(ar=1,gn=e=>{e.terminate()}),gn}var mn,cr;function hu(){return cr||(cr=1,mn=(e,t)=>{e.onmessage=({data:s})=>{t(s)}}),mn}var vn,ur;function pu(){return ur||(ur=1,vn=async(e,t)=>{e.postMessage(t)}),vn}var bn,fr;function gu(){if(fr)return bn;fr=1;const e=s=>new Promise((n,o)=>{const r=new FileReader;r.onload=()=>{n(r.result)},r.onerror=({target:{error:{code:i}}})=>{o(Error(`File could not be read! Code=${i}`))},r.readAsArrayBuffer(s)}),t=async s=>{let n=s;if(typeof s>"u")return"undefined";if(typeof s=="string")/data:image\/([a-zA-Z]*);base64,([^"]*)/.test(s)?n=atob(s.split(",")[1]).split("").map(o=>o.charCodeAt(0)):n=await(await fetch(s)).arrayBuffer();else if(typeof HTMLElement<"u"&&s instanceof HTMLElement)s.tagName==="IMG"&&(n=await t(s.src)),s.tagName==="VIDEO"&&(n=await t(s.poster)),s.tagName==="CANVAS"&&await new Promise(o=>{s.toBlob(async r=>{n=await e(r),o()})});else if(typeof OffscreenCanvas<"u"&&s instanceof OffscreenCanvas){const o=await s.convertToBlob();n=await e(o)}else(s instanceof File||s instanceof Blob)&&(n=await e(s));return new Uint8Array(n)};return bn=t,bn}var _n,dr;function mu(){if(dr)return _n;dr=1;const e=uu(),t=fu(),s=du(),n=hu(),o=pu(),r=gu();return _n={defaultOptions:e,spawnWorker:t,terminateWorker:s,onMessage:n,send:o,loadImage:r},_n}var yn,hr;function Vi(){if(hr)return yn;hr=1;const e=ru(),t=iu(),s=ji(),{log:n}=lo(),o=io(),r=Ui(),{defaultOptions:i,spawnWorker:l,terminateWorker:c,onMessage:d,loadImage:u,send:h}=mu();let v=0;return yn=async(_="eng",I=r.LSTM_ONLY,A={},T={})=>{const g=o("Worker",v),{logger:m,errorHandler:x,...C}=e({...i,...A}),R={},te={},he=typeof _=="string"?_.split("+"):_;let K=I,J=T;const le=[r.DEFAULT,r.LSTM_ONLY].includes(I)&&!C.legacyCore;let be,Pe;const Te=new Promise((b,y)=>{Pe=b,be=y}),st=b=>{be(b.message)};let Se=l(C);Se.onerror=st,v+=1;const re=(b,y)=>{R[b]=y},G=(b,y)=>{te[b]=y},Y=({id:b,action:y,payload:L})=>new Promise((M,k)=>{n(`[${g}]: Start ${b}, action=${y}`);const P=`${y}-${b}`;re(P,M),G(P,k),h(Se,{workerId:g,jobId:b,action:y,payload:L})}),E=()=>console.warn("`load` is depreciated and should be removed from code (workers now come pre-loaded)"),$=b=>Y(s({id:b,action:"load",payload:{options:{lstmOnly:le,corePath:C.corePath,logging:C.logging}}})),D=(b,y,L)=>Y(s({id:L,action:"FS",payload:{method:"writeFile",args:[b,y]}})),q=(b,y)=>Y(s({id:y,action:"FS",payload:{method:"readFile",args:[b,{encoding:"utf8"}]}})),j=(b,y)=>Y(s({id:y,action:"FS",payload:{method:"unlink",args:[b]}})),ee=(b,y,L)=>Y(s({id:L,action:"FS",payload:{method:b,args:y}})),we=()=>console.warn("`loadLanguage` is depreciated and should be removed from code (workers now come with language pre-loaded)"),pe=(b,y)=>Y(s({id:y,action:"loadLanguage",payload:{langs:b,options:{langPath:C.langPath,dataPath:C.dataPath,cachePath:C.cachePath,cacheMethod:C.cacheMethod,gzip:C.gzip,lstmOnly:[r.DEFAULT,r.LSTM_ONLY].includes(K)&&!C.legacyLang}}})),ye=()=>console.warn("`initialize` is depreciated and should be removed from code (workers now come pre-initialized)"),me=(b,y,L,M)=>Y(s({id:M,action:"initialize",payload:{langs:b,oem:y,config:L}})),ht=(b="eng",y,L,M)=>{if(le&&[r.TESSERACT_ONLY,r.TESSERACT_LSTM_COMBINED].includes(y))throw Error("Legacy model requested but code missing.");const k=y||K;K=k;const P=L||J;J=P;const F=(typeof b=="string"?b.split("+"):b).filter(V=>!he.includes(V));return he.push(...F),F.length>0?pe(F,M).then(()=>me(b,k,P,M)):me(b,k,P,M)},Ae=(b={},y)=>Y(s({id:y,action:"setParameters",payload:{params:b}})),He=async(b,y={},L={blocks:!0,text:!0,hocr:!0,tsv:!0},M)=>Y(s({id:M,action:"recognize",payload:{image:await u(b),options:y,output:L}})),f=(b="Tesseract OCR Result",y=!1,L)=>(console.log("`getPDF` function is depreciated. `recognize` option `savePDF` should be used instead."),Y(s({id:L,action:"getPDF",payload:{title:b,textonly:y}}))),p=async(b,y)=>{if(le)throw Error("`worker.detect` requires Legacy model, which was not loaded.");return Y(s({id:y,action:"detect",payload:{image:await u(b)}}))},w=async()=>(Se!==null&&(c(Se),Se=null),Promise.resolve());d(Se,({workerId:b,jobId:y,status:L,action:M,data:k})=>{const P=`${M}-${y}`;if(L==="resolve"){n(`[${b}]: Complete ${y}`);let U=k;M==="recognize"?U=t(k):M==="getPDF"&&(U=Array.from({...k,length:Object.keys(k).length})),R[P]({jobId:y,data:U})}else if(L==="reject")if(te[P](k),M==="load"&&be(k),x)x(k);else throw Error(k);else L==="progress"&&m({...k,userJobId:y})});const O={id:g,worker:Se,setResolve:re,setReject:G,load:E,writeText:D,readText:q,removeFile:j,FS:ee,loadLanguage:we,initialize:ye,reinitialize:ht,setParameters:Ae,recognize:He,getPDF:f,detect:p,terminate:w};return $().then(()=>pe(_)).then(()=>me(_,I,T)).then(()=>Pe(O)).catch(()=>{}),Te},yn}var wn,pr;function vu(){if(pr)return wn;pr=1;const e=Vi();return wn={recognize:async(n,o,r)=>{const i=await e(o,1,r);return i.recognize(n).finally(async()=>{await i.terminate()})},detect:async(n,o)=>{const r=await e("osd",0,o);return r.detect(n).finally(async()=>{await r.terminate()})}},wn}var xn,gr;function bu(){return gr||(gr=1,xn={AFR:"afr",AMH:"amh",ARA:"ara",ASM:"asm",AZE:"aze",AZE_CYRL:"aze_cyrl",BEL:"bel",BEN:"ben",BOD:"bod",BOS:"bos",BUL:"bul",CAT:"cat",CEB:"ceb",CES:"ces",CHI_SIM:"chi_sim",CHI_TRA:"chi_tra",CHR:"chr",CYM:"cym",DAN:"dan",DEU:"deu",DZO:"dzo",ELL:"ell",ENG:"eng",ENM:"enm",EPO:"epo",EST:"est",EUS:"eus",FAS:"fas",FIN:"fin",FRA:"fra",FRK:"frk",FRM:"frm",GLE:"gle",GLG:"glg",GRC:"grc",GUJ:"guj",HAT:"hat",HEB:"heb",HIN:"hin",HRV:"hrv",HUN:"hun",IKU:"iku",IND:"ind",ISL:"isl",ITA:"ita",ITA_OLD:"ita_old",JAV:"jav",JPN:"jpn",KAN:"kan",KAT:"kat",KAT_OLD:"kat_old",KAZ:"kaz",KHM:"khm",KIR:"kir",KOR:"kor",KUR:"kur",LAO:"lao",LAT:"lat",LAV:"lav",LIT:"lit",MAL:"mal",MAR:"mar",MKD:"mkd",MLT:"mlt",MSA:"msa",MYA:"mya",NEP:"nep",NLD:"nld",NOR:"nor",ORI:"ori",PAN:"pan",POL:"pol",POR:"por",PUS:"pus",RON:"ron",RUS:"rus",SAN:"san",SIN:"sin",SLK:"slk",SLV:"slv",SPA:"spa",SPA_OLD:"spa_old",SQI:"sqi",SRP:"srp",SRP_LATN:"srp_latn",SWA:"swa",SWE:"swe",SYR:"syr",TAM:"tam",TEL:"tel",TGK:"tgk",TGL:"tgl",THA:"tha",TIR:"tir",TUR:"tur",UIG:"uig",UKR:"ukr",URD:"urd",UZB:"uzb",UZB_CYRL:"uzb_cyrl",VIE:"vie",YID:"yid"}),xn}var Sn,mr;function _u(){return mr||(mr=1,Sn={OSD_ONLY:"0",AUTO_OSD:"1",AUTO_ONLY:"2",AUTO:"3",SINGLE_COLUMN:"4",SINGLE_BLOCK_VERT_TEXT:"5",SINGLE_BLOCK:"6",SINGLE_LINE:"7",SINGLE_WORD:"8",CIRCLE_WORD:"9",SINGLE_CHAR:"10",SPARSE_TEXT:"11",SPARSE_TEXT_OSD:"12",RAW_LINE:"13"}),Sn}var zn,vr;function yu(){if(vr)return zn;vr=1,eu();const e=tu(),t=Vi(),s=vu(),n=bu(),o=Ui(),r=_u(),{setLogging:i}=lo();return zn={languages:n,OEM:o,PSM:r,createScheduler:e,createWorker:t,setLogging:i,...s},zn}var wu=yu();class ao{worker=null;availablePuzzleNames=[];regions={puzzle:{x:15,y:600,width:330,height:28},cost:{x:412,y:603,width:65,height:22},cycles:{x:577,y:603,width:65,height:22},area:{x:739,y:603,width:65,height:22}};async initialize(){this.worker||(this.worker=await wu.createWorker("eng"),await this.worker.setParameters({tessedit_ocr_engine_mode:"3",tessedit_pageseg_mode:7}))}setAvailablePuzzleNames(t){this.availablePuzzleNames=t,console.log("OCR service updated with puzzle names:",t)}async configurePuzzleOCR(){this.worker&&(await this.worker.setParameters({load_system_dawg:"0",load_freq_dawg:"0",load_punc_dawg:"0",load_number_dawg:"0",load_unambig_dawg:"0",load_bigram_dawg:"0",load_fixed_length_dawgs:"0",tessedit_char_whitelist:this.getPuzzleCharacterSet(),tessedit_pageseg_mode:8,segment_penalty_dict_nonword:"2.0",segment_penalty_dict_frequent_word:"0.001",segment_penalty_dict_case_ok:"0.001",segment_penalty_dict_case_bad:"0.1",classify_enable_learning:"0",classify_enable_adaptive_matcher:"1",preserve_interword_spaces:"1"}),console.log("OCR configured for puzzle names with character set:",this.getPuzzleCharacterSet()))}getPuzzleCharacterSet(){if(this.availablePuzzleNames.length===0)return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 -";const t=new Set;return this.availablePuzzleNames.forEach(s=>{for(const n of s)t.add(n)}),Array.from(t).join("")}async extractOpusMagnumData(t){this.worker||await this.initialize();const s=URL.createObjectURL(t),n=new Image;return new Promise((o,r)=>{n.onload=async()=>{try{const i=document.createElement("canvas"),l=i.getContext("2d");i.width=n.width,i.height=n.height,l.drawImage(n,0,0);const c={},d={};for(const[v,_]of Object.entries(this.regions)){const I=document.createElement("canvas"),A=I.getContext("2d");I.width=_.width,I.height=_.height,A.drawImage(i,_.x,_.y,_.width,_.height,0,0,_.width,_.height);const T=A.getImageData(0,0,_.width,_.height);this.preprocessImage(T),A.putImageData(T,0,0),v==="cost"?await this.worker.setParameters({tessedit_char_whitelist:"0123456789G"}):v==="cycles"||v==="area"?await this.worker.setParameters({tessedit_char_whitelist:"0123456789"}):v==="puzzle"?await this.configurePuzzleOCR():await this.worker.setParameters({tessedit_char_whitelist:""});const{data:{text:g,confidence:m}}=await this.worker.recognize(I);let x=g.trim();if(d[v]=m/100,v==="cost"){if(x.endsWith("6")&&x.length>1){const C=x.slice(0,-1);/^\d+$/.test(C)&&(x=C)}x=x.replace(/G+$/g,""),x=x.replace(/[^0-9]/g,"")}else if(v==="cycles"||v==="area")x=x.replace(/[^0-9]/g,"");else if(v==="puzzle"&&(x=this.findBestPuzzleMatch(x),this.availablePuzzleNames.length>0&&!this.availablePuzzleNames.includes(x))){const C=this.findBestPuzzleMatchForced(x);C&&(x=C,console.log(`Forced OCR match: "${g.trim()}" -> "${x}"`))}c[v]=x}URL.revokeObjectURL(s);const u=Object.values(d),h=u.length>0?u.reduce((v,_)=>v+_,0)/u.length:0;o({puzzle:c.puzzle||"",cost:parseInt(c.cost||""),cycles:parseInt(c.cycles||""),area:parseInt(c.area||""),confidence:{puzzle:d.puzzle||0,cost:d.cost||0,cycles:d.cycles||0,area:d.area||0,overall:h}})}catch(i){URL.revokeObjectURL(s),r(i)}},n.onerror=()=>{URL.revokeObjectURL(s),r(new Error("Failed to load image"))},n.src=s})}preprocessImage(t){const s=t.data;for(let n=0;n<s.length;n+=4){const r=255-Math.round(.299*s[n]+.587*s[n+1]+.114*s[n+2]);s[n]=r,s[n+1]=r,s[n+2]=r}}levenshteinDistance(t,s){const n=Array(s.length+1).fill(null).map(()=>Array(t.length+1).fill(null));for(let o=0;o<=t.length;o++)n[0][o]=o;for(let o=0;o<=s.length;o++)n[o][0]=o;for(let o=1;o<=s.length;o++)for(let r=1;r<=t.length;r++){const i=t[r-1]===s[o-1]?0:1;n[o][r]=Math.min(n[o][r-1]+1,n[o-1][r]+1,n[o-1][r-1]+i)}return n[s.length][t.length]}findBestPuzzleMatch(t){if(!this.availablePuzzleNames.length)return t.trim();const s=t.trim();if(!s)return"";const n=this.availablePuzzleNames.find(l=>l.toLowerCase()===s.toLowerCase());if(n)return n;const o=this.availablePuzzleNames.find(l=>l.toLowerCase().includes(s.toLowerCase())||s.toLowerCase().includes(l.toLowerCase()));if(o)return o;let r=s,i=0;for(const l of this.availablePuzzleNames){const c=[this.calculateLevenshteinSimilarity(s,l),this.calculateJaroWinklerSimilarity(s,l),this.calculateNGramSimilarity(s,l,2)],d=Math.max(...c);d>i&&d>.4&&(i=d,r=l)}if(i<.6){const l=this.findBestCharacterMatch(s);l&&(r=l)}return r}calculateLevenshteinSimilarity(t,s){const n=this.levenshteinDistance(t.toLowerCase(),s.toLowerCase()),o=Math.max(t.length,s.length);return o===0?1:1-n/o}calculateJaroWinklerSimilarity(t,s){const n=t.toLowerCase(),o=s.toLowerCase();if(n===o)return 1;const r=Math.floor(Math.max(n.length,o.length)/2)-1;if(r<0)return 0;const i=new Array(n.length).fill(!1),l=new Array(o.length).fill(!1);let c=0,d=0;for(let _=0;_<n.length;_++){const I=Math.max(0,_-r),A=Math.min(_+r+1,o.length);for(let T=I;T<A;T++)if(!(l[T]||n[_]!==o[T])){i[_]=!0,l[T]=!0,c++;break}}if(c===0)return 0;let u=0;for(let _=0;_<n.length;_++)if(i[_]){for(;!l[u];)u++;n[_]!==o[u]&&d++,u++}const h=(c/n.length+c/o.length+(c-d/2)/c)/3;let v=0;for(let _=0;_<Math.min(n.length,o.length,4)&&n[_]===o[_];_++)v++;return h+.1*v*(1-h)}calculateNGramSimilarity(t,s,n){const o=t.toLowerCase(),r=s.toLowerCase();if(o===r)return 1;if(o.length<n||r.length<n)return 0;const i=new Set,l=new Set;for(let u=0;u<=o.length-n;u++)i.add(o.substr(u,n));for(let u=0;u<=r.length-n;u++)l.add(r.substr(u,n));const c=new Set([...i].filter(u=>l.has(u))),d=new Set([...i,...l]);return c.size/d.size}findBestCharacterMatch(t){let s=null,n=0;for(const o of this.availablePuzzleNames){const r=this.calculateCharacterFrequencyScore(t.toLowerCase(),o.toLowerCase());r>n&&r>.3&&(n=r,s=o)}return s}calculateCharacterFrequencyScore(t,s){const n=new Map,o=new Map;for(const c of t)n.set(c,(n.get(c)||0)+1);for(const c of s)o.set(c,(o.get(c)||0)+1);const r=new Set([...n.keys(),...o.keys()]);let i=0,l=0;for(const c of r){const d=n.get(c)||0,u=o.get(c)||0;i+=Math.min(d,u),l+=Math.max(d,u)}return l===0?0:i/l}findBestPuzzleMatchForced(t){if(!this.availablePuzzleNames.length||!t.trim())return null;const s=t.trim().toLowerCase();let n=this.availablePuzzleNames[0],o=0;for(const r of this.availablePuzzleNames){const i=[this.calculateLevenshteinSimilarity(s,r),this.calculateJaroWinklerSimilarity(s,r),this.calculateNGramSimilarity(s,r,2),this.calculateCharacterFrequencyScore(s,r.toLowerCase()),this.calculateLengthSimilarity(s,r.toLowerCase())],l=i[0]*.25+i[1]*.25+i[2]*.2+i[3]*.2+i[4]*.1;l>o&&(o=l,n=r)}return console.log(`Forced match for "${t}": "${n}" (score: ${o.toFixed(3)})`),n}calculateLengthSimilarity(t,s){const n=t.length,o=s.length,r=Math.max(n,o),i=Math.min(n,o);return r===0?1:i/r}async terminate(){this.worker&&(await this.worker.terminate(),this.worker=null)}static isValidOpusMagnumImage(t){return["image/jpeg","image/jpg","image/png","image/gif"].includes(t.type)}static drawDebugRegions(t){return new Promise((s,n)=>{const o=URL.createObjectURL(t),r=new Image;r.onload=()=>{const i=document.createElement("canvas"),l=i.getContext("2d");i.width=r.width,i.height=r.height,l.drawImage(r,0,0),l.strokeStyle="#00ff00",l.lineWidth=2;const c=new ao;Object.values(c.regions).forEach(d=>{l.strokeRect(d.x,d.y,d.width,d.height)}),URL.revokeObjectURL(o),s(i.toDataURL())},r.onerror=()=>{URL.revokeObjectURL(o),n(new Error("Failed to load image for debug"))},r.src=o})}}const Nn=new ao,Ht=.8,qi=no("uploads",()=>{const e=oe([]),t=Ue(()=>e.value.some(c=>c.ocrProcessing)),s=Ue(()=>e.value.some(c=>o(c))),n=Ue(()=>e.value.filter(c=>c.needsManualPuzzleSelection)),o=c=>c.ocrData?.confidence?c.ocrData.confidence.cost<Ht||c.ocrData.confidence.cycles<Ht||c.ocrData.confidence.area<Ht:!1,r=async c=>{for(;t.value;){const u=Math.floor(Math.random()*400)+100;console.log(`OCR is already processing, waiting ${u}ms...`),await new Promise(h=>setTimeout(h,u))}const d=e.value.indexOf(c);e.value[d].ocrProcessing=!0,e.value[d].ocrError=void 0,e.value[d].ocrData=void 0;try{console.log("Starting OCR processing for:",c.file.name),await Nn.initialize();const u=await Nn.extractOpusMagnumData(c.file);console.log("OCR completed:",u),await At(),e.value[d].ocrData=u,u.confidence.puzzle<Ht?(e.value[d].needsManualPuzzleSelection=!0,console.log(`Low puzzle confidence (${Math.round(u.confidence.puzzle*100)}%) for ${c.file.name}, requiring manual selection`)):e.value[d].needsManualPuzzleSelection=!1,await At()}catch(u){console.error("OCR processing failed:",u),e.value[d].ocrError="Failed to extract puzzle data"}finally{e.value[d].ocrProcessing=!1}};return{submissionFiles:e,submissionFilesNeedingManualSelection:n,processOCR:r,processLowConfidenceOCRFiles:async()=>{const c=e.value.filter(d=>o(d));for(const d of c)r(d)},clearFiles:()=>{e.value=[]},isProcessingOCR:t,hasLowConfidence:s,CONFIDENCE_VALUE:Ht}}),xu={class:"form-control w-full"},Su={key:0,class:"space-y-4"},zu={key:1,class:"space-y-4"},Cu={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-2 gap-4"},$u={class:"aspect-square rounded-lg overflow-hidden bg-base-200"},Pu=["src","alt"],ku={class:"absolute inset-0 bg-black/80 opacity-0 group-hover:opacity-100 transition-opacity duration-200 rounded-lg flex items-center justify-center"},Eu=["onClick"],Ru={class:"mt-2"},Ou={class:"text-xs font-medium truncate"},Mu={class:"text-xs text-base-content/60"},Lu={key:0,class:"mt-1 flex items-center gap-1"},Tu={key:1,class:"mt-1"},Au={class:"text-xs text-error"},Iu={key:2,class:"mt-1 space-y-1"},Du={class:"text-xs flex items-center justify-between"},Nu={class:"flex items-center gap-2"},Fu=["title"],ju=["onClick"],Uu={class:"text-xs space-y-1 bg-base-200 p-2 rounded"},Vu={key:0},qu=["title"],Bu={key:1},Hu=["title"],Wu={key:2},Ku=["title"],Gu={key:3},Ju=["title"],Yu={key:3,class:"mt-2"},Zu={class:"mt-2"},Qu=["onUpdate:modelValue","onChange"],Xu=["value"],ef={key:4,class:"mt-1"},tf=["onClick"],sf={class:"flex justify-center"},nf={key:0,class:"label"},of={class:"label-text-alt text-error"},rf=Ft({__name:"FileUpload",setup(e){const t=Hs(),{submissionFiles:s,processOCR:n}=qi(),o=oe(),r=oe(!1),i=oe("");Pt(()=>t.puzzles,g=>{g&&g.length>0&&Nn.setAvailablePuzzleNames(t.puzzleNames)},{immediate:!0});const l=g=>{const m=g.target;m.files&&d(Array.from(m.files))},c=g=>{g.preventDefault(),r.value=!1,g.dataTransfer?.files&&d(Array.from(g.dataTransfer.files))},d=async g=>{i.value="";for(const m of g)if(u(m))try{const x=await h(m),C=m.type.startsWith("image/gif")?"gif":"image",R={file:m,file_url:"",preview:x,type:C,ocrProcessing:!1,ocrError:void 0,ocrData:void 0};s.push(R),I(m)&&At(()=>{n(R)})}catch{i.value=`Failed to process ${m.name}`}},u=g=>g.type.startsWith("image/")?g.size>256*1024*1024?(i.value=`${g.name} is too large (max 256MB)`,!1):!0:(i.value=`${g.name} is not a valid image file`,!1),h=g=>new Promise((m,x)=>{const C=new FileReader;C.onload=R=>m(R.target?.result),C.onerror=x,C.readAsDataURL(g)}),v=g=>{s.splice(g,1)},_=g=>{if(g===0)return"0 Bytes";const m=1024,x=["Bytes","KB","MB","GB"],C=Math.floor(Math.log(g)/Math.log(m));return parseFloat((g/Math.pow(m,C)).toFixed(2))+" "+x[C]},I=g=>g.type.startsWith("image/")&&g.size>5e4,A=g=>g>=.8?"badge-success":g>=.6?"badge-warning":"badge-error",T=g=>{const m=s.findIndex(x=>x.file===g.file);m!==-1&&s[m].manualPuzzleSelection&&(s[m].needsManualPuzzleSelection=!1,console.log(`Manual puzzle selection: ${g.file.name} -> ${s[m].manualPuzzleSelection}`))};return(g,m)=>(S(),z("div",xu,[m[19]||(m[19]=a("label",{class:"label"},[a("span",{class:"label-text font-medium"},"Upload Solution Files"),a("span",{class:"label-text-alt text-xs"},"Images or GIFs only")],-1)),a("div",{class:Ne(["border-2 border-dashed border-base-300 rounded-lg p-6 text-center hover:border-primary transition-colors duration-300",{"border-primary bg-primary/5":r.value}]),onDrop:c,onDragover:m[2]||(m[2]=An(x=>r.value=!0,["prevent"])),onDragleave:m[3]||(m[3]=x=>r.value=!1),onDragenter:m[4]||(m[4]=An(()=>{},["prevent"]))},[a("input",{ref_key:"fileInput",ref:o,type:"file",multiple:"",accept:"image/*,.gif",class:"hidden",onChange:l},null,544),ie(s).length===0?(S(),z("div",Su,[m[6]||(m[6]=a("div",{class:"mx-auto w-12 h-12 text-base-content/40 flex items-center justify-center"},[a("i",{class:"mdi mdi-cloud-upload text-5xl"})],-1)),a("div",null,[m[5]||(m[5]=a("p",{class:"text-base-content/70 mb-2"},"Drop your files here or",-1)),a("button",{type:"button",onClick:m[0]||(m[0]=x=>o.value?.click()),class:"btn btn-primary btn-sm"}," Choose Files ")]),m[7]||(m[7]=a("p",{class:"text-xs text-base-content/50"}," Supported formats: JPG, PNG, GIF (max 256MB each) ",-1))])):(S(),z("div",zu,[a("div",Cu,[(S(!0),z(ge,null,Fe(ie(s),(x,C)=>(S(),z("div",{key:C,class:"relative group"},[a("div",$u,[a("img",{src:x.preview,alt:x.file.name,class:"w-full h-full object-cover"},null,8,Pu)]),a("div",ku,[a("button",{onClick:R=>v(C),class:"btn btn-error btn-lg btn-circle"},[...m[8]||(m[8]=[a("i",{class:"mdi mdi-close"},null,-1)])],8,Eu)]),a("div",Ru,[a("p",Ou,N(x.file.name),1),a("p",Mu,N(_(x.file.size))+" • "+N(x.type.toUpperCase()),1),x.ocrProcessing?(S(),z("div",Lu,[...m[9]||(m[9]=[a("span",{class:"loading loading-spinner loading-xs"},null,-1),a("span",{class:"text-xs text-info"},"Extracting puzzle data...",-1)])])):x.ocrError?(S(),z("div",Tu,[a("p",Au,N(x.ocrError),1)])):x.ocrData?(S(),z("div",Iu,[a("div",Du,[a("div",Nu,[m[10]||(m[10]=a("span",{class:"font-medium text-success"},"✓ OCR Complete",-1)),x.ocrData.confidence?(S(),z("span",{key:0,class:Ne(["badge badge-xs",A(x.ocrData.confidence.overall)]),title:`Overall confidence: ${Math.round(x.ocrData.confidence.overall*100)}%`},N(Math.round(x.ocrData.confidence.overall*100))+"% ",11,Fu)):X("",!0)]),a("button",{onClick:R=>ie(n)(x),class:"btn btn-xs btn-ghost",title:"Retry OCR"},[...m[11]||(m[11]=[a("i",{class:"mdi mdi-refresh"},null,-1)])],8,ju)]),a("div",Uu,[x.ocrData.puzzle?(S(),z("div",Vu,[m[12]||(m[12]=a("strong",null,"Puzzle:",-1)),ve(" "+N(x.ocrData.puzzle)+" ",1),x.ocrData.confidence?.puzzle?(S(),z("span",{key:0,class:"ml-2 opacity-60",title:`Puzzle confidence: ${Math.round(x.ocrData.confidence.puzzle*100)}%`}," ("+N(Math.round(x.ocrData.confidence.puzzle*100))+"%) ",9,qu)):X("",!0)])):X("",!0),x.ocrData.cost?(S(),z("div",Bu,[m[13]||(m[13]=a("strong",null,"Cost:",-1)),ve(" "+N(x.ocrData.cost)+" ",1),x.ocrData.confidence?.cost?(S(),z("span",{key:0,class:"ml-2 opacity-60",title:`Cost confidence: ${Math.round(x.ocrData.confidence.cost*100)}%`}," ("+N(Math.round(x.ocrData.confidence.cost*100))+"%) ",9,Hu)):X("",!0)])):X("",!0),x.ocrData.cycles?(S(),z("div",Wu,[m[14]||(m[14]=a("strong",null,"Cycles:",-1)),ve(" "+N(x.ocrData.cycles)+" ",1),x.ocrData.confidence?.cycles?(S(),z("span",{key:0,class:"ml-2 opacity-60",title:`Cycles confidence: ${Math.round(x.ocrData.confidence.cycles*100)}%`}," ("+N(Math.round(x.ocrData.confidence.cycles*100))+"%) ",9,Ku)):X("",!0)])):X("",!0),x.ocrData.area?(S(),z("div",Gu,[m[15]||(m[15]=a("strong",null,"Area:",-1)),ve(" "+N(x.ocrData.area)+" ",1),x.ocrData.confidence?.area?(S(),z("span",{key:0,class:"ml-2 opacity-60",title:`Area confidence: ${Math.round(x.ocrData.confidence.area*100)}%`}," ("+N(Math.round(x.ocrData.confidence.area*100))+"%) ",9,Ju)):X("",!0)])):X("",!0)])])):X("",!0),x.needsManualPuzzleSelection?(S(),z("div",Yu,[m[17]||(m[17]=La('<div class="alert alert-warning alert-sm"><i class="mdi mdi-alert-circle text-lg"></i><div class="flex-1"><div class="font-medium">Low OCR Confidence</div><div class="text-xs"> Please select the correct puzzle manually </div></div></div>',1)),a("div",Zu,[lt(a("select",{"onUpdate:modelValue":R=>x.manualPuzzleSelection=R,class:"select select-bordered select-sm w-full",onChange:R=>T(x)},[m[16]||(m[16]=a("option",{value:""},"Select puzzle...",-1)),(S(!0),z(ge,null,Fe(ie(t).puzzles,R=>(S(),z("option",{key:R.id,value:R.title},N(R.title),9,Xu))),128))],40,Qu),[[Li,x.manualPuzzleSelection]])])])):!x.ocrProcessing&&!x.ocrError&&!x.ocrData?(S(),z("div",ef,[a("button",{onClick:R=>ie(n)(x),class:"btn btn-xs btn-outline"},[...m[18]||(m[18]=[a("i",{class:"mdi mdi-text-recognition"},null,-1),ve(" Extract Puzzle Data ",-1)])],8,tf)])):X("",!0)])]))),128))]),a("div",sf,[a("button",{type:"button",onClick:m[1]||(m[1]=x=>o.value?.click()),class:"btn btn-outline btn-sm"}," Add More Files ")])]))],34),i.value?(S(),z("div",nf,[a("span",of,N(i.value),1)])):X("",!0)]))}}),lf={class:"card bg-base-100 shadow-xl"},af={class:"card-body"},cf={key:0,class:"alert alert-info"},uf={class:"flex-1"},ff={class:"font-bold"},df={class:"text-sm space-y-1 mt-1"},hf={class:"badge badge-ghost badge-sm ml-2"},pf={key:1,class:"alert alert-warning"},gf={class:"flex-1"},mf={class:"text-sm"},vf={class:"form-control"},bf={class:"flex-1"},_f={class:"flex label"},yf={class:"label-text-alt"},wf={class:"form-control"},xf={class:"label cursor-pointer justify-start gap-3"},Sf=["disabled"],zf={class:"card-actions justify-end"},Cf=["disabled"],$f={key:0,class:"loading loading-spinner loading-sm"},Pf={key:1},kf={key:2},Ef={key:3},Rf=Ft({__name:"SubmissionForm",props:{puzzles:{},findPuzzleByName:{type:Function}},setup(e){const t=e,s=qi(),{submissionFiles:n,hasLowConfidence:o,submissionFilesNeedingManualSelection:r}=oo(s),{clearFiles:i,processLowConfidenceOCRFiles:l}=s,{handleSubmission:c}=ro(),d=oe(""),u=oe(!1),h=oe(!1),v=Ue(()=>d.value.length),_=Ue(()=>{const T=n.value.length>0,g=!n.value.some(m=>m.needsManualPuzzleSelection);return T&&!h.value&&g});Pt(o,T=>{T&&(u.value=!0)});const I=Ue(()=>{const T={};return n.value.forEach(g=>{const m=g.manualPuzzleSelection||g.ocrData?.puzzle;m&&(T[m]||(T[m]={puzzle:t.findPuzzleByName(m),files:[]}),T[m].files.push(g))}),T}),A=async()=>{if(_.value){h.value=!0;try{c({files:n.value,notes:d.value.trim()||void 0,manualValidationRequested:o.value||u.value}),i(),d.value="",u.value=!1}catch(T){console.error("Submission error:",T)}finally{h.value=!1}}};return(T,g)=>(S(),z("div",lf,[a("div",af,[g[9]||(g[9]=a("h2",{class:"card-title text-xl mb-6"},[a("i",{class:"mdi mdi-check-circle text-2xl text-primary"}),ve(" Submit Solution ")],-1)),a("form",{onSubmit:An(A,["prevent"]),class:"space-y-6"},[Object.keys(I.value).length>0?(S(),z("div",cf,[g[3]||(g[3]=a("i",{class:"mdi mdi-information-outline text-xl"},null,-1)),a("div",uf,[a("h4",ff," Detected Puzzles ("+N(Object.keys(I.value).length)+") ",1),a("div",df,[(S(!0),z(ge,null,Fe(I.value,(m,x)=>(S(),z("div",{key:x,class:"flex justify-between"},[a("span",null,N(x),1),a("span",hf,N(m.files.length)+" file(s)",1)]))),128))])])])):X("",!0),Le(rf),ie(r).length>0?(S(),z("div",pf,[g[6]||(g[6]=a("i",{class:"mdi mdi-alert-circle text-xl"},null,-1)),a("div",gf,[g[5]||(g[5]=a("div",{class:"font-bold"},"Manual Puzzle Selection Required",-1)),a("div",mf,N(ie(r).length)+" file(s) have low OCR confidence for puzzle names. Please select the correct puzzle for each file before submitting. ",1),a("button",{class:"btn mt-3 w-full",onClick:g[0]||(g[0]=(...m)=>ie(l)&&ie(l)(...m))},[...g[4]||(g[4]=[a("span",{class:"mdi mdi-reload text-2xl"},null,-1),ve(" Retry OCR on low confidence puzzle ",-1)])])])])):X("",!0),a("div",vf,[a("div",bf,[a("label",_f,[g[7]||(g[7]=a("span",{class:"label-text font-medium"},"Notes (Optional)",-1)),a("span",yf,N(v.value)+"/500",1)]),lt(a("textarea",{"onUpdate:modelValue":g[1]||(g[1]=m=>d.value=m),class:"flex textarea textarea-bordered h-24 w-full resize-none",placeholder:"Add any notes about your solution, approach, or interesting findings...",maxlength:"500"},null,512),[[ys,d.value]])])]),a("div",wf,[a("label",xf,[lt(a("input",{type:"checkbox","onUpdate:modelValue":g[2]||(g[2]=m=>u.value=m),class:"checkbox checkbox-primary",disabled:ie(o)},null,8,Sf),[[cc,u.value]]),g[8]||(g[8]=a("div",{class:"flex-1"},[a("span",{class:"label-text font-medium"},"Request manual validation"),a("div",{class:"label-text-alt text-xs opacity-70 mt-1"},[ve(" Check this if you want an admin to manually review your submission, even if OCR confidence is high. "),a("br"),a("em",null,"Note: This will be automatically checked if any OCR confidence is below 80%.")])],-1))])]),a("div",zf,[a("button",{type:"submit",class:"btn btn-primary",disabled:!_.value},[h.value?(S(),z("span",$f)):X("",!0),h.value?(S(),z("span",Pf,"Submitting...")):ie(r).length>0?(S(),z("span",kf," Select Puzzles ("+N(ie(r).length)+" remaining) ",1)):(S(),z("span",Ef,"Submit Solution"))],8,Cf)])],32)])]))}}),Of={class:"card bg-base-100 shadow-xl"},Mf={class:"card-body"},Lf={class:"stats stats-vertical lg:stats-horizontal shadow mb-6"},Tf={class:"stat"},Af={class:"stat-value text-primary"},If={class:"stat"},Df={class:"stat-value text-secondary"},Nf={class:"stat"},Ff={class:"stat-value text-warning"},jf={class:"stat"},Uf={class:"stat-value text-success"},Vf={key:0},qf={class:"overflow-x-auto"},Bf={class:"table table-zebra"},Hf={class:"font-bold"},Wf={class:"text-sm opacity-50"},Kf={class:"text-sm space-y-1"},Gf={class:"flex justify-between items-center"},Jf={class:"flex justify-between items-center"},Yf={class:"flex justify-between items-center"},Zf={class:"badge badge-warning badge-sm"},Qf=["onClick"],Xf=["onClick"],ed={key:1,class:"text-center py-8"},td={key:0,class:"modal modal-open"},sd={class:"modal-box w-11/12 max-w-5xl"},nd=["src"],od={key:0,class:"space-y-4"},rd={class:"alert alert-info"},id={class:"font-bold"},ld={class:"grid grid-cols-4 gap-4"},ad={class:"form-control"},cd=["value"],ud={class:"form-control"},fd=["placeholder"],dd={class:"form-control"},hd=["placeholder"],pd={class:"form-control"},gd=["placeholder"],md={class:"modal-action"},vd=["disabled"],bd={key:0,class:"loading loading-spinner loading-sm"},_d={class:"mockup-code w-full"},yd=Ft({__name:"AdminPanel",setup(e,{expose:t}){const s=Hs(),n=oe({total_submissions:0,total_responses:0,needs_validation:0,validated_submissions:0,validation_rate:0}),o=oe([]),r=oe(!1),i=oe(!1),l=oe({show:!1,response:null,data:{puzzle:-1,validated_cost:0,validated_cycles:0,validated_area:0}}),c=async()=>{try{r.value=!0;try{const g=await Qe.getStats();g.data&&(n.value=g.data)}catch(g){console.warn("Stats endpoint not available:",g),n.value={total_submissions:0,total_responses:0,needs_validation:0,validated_submissions:0,validation_rate:0}}const T=await Qe.getResponsesNeedingValidation();T.data&&(o.value=T.data)}catch(T){console.error("Failed to load admin data:",T)}finally{r.value=!1}},d=async()=>{for(const T of Array.from(o.value)){if(!T.id)continue;const{data:g,error:m}=await Qe.autoValidateResponses(T.id);if(g&&!g.needs_manual_validation)o.value=o.value.filter(x=>x.id!==T.id),n.value.needs_validation-=1;else if(m)break}},u=T=>{l.value.response=T,l.value.data={puzzle:T.puzzle_id||-1,validated_cost:T.cost||0,validated_cycles:T.cycles||0,validated_area:T.area||0},l.value.show=!0},h=()=>{l.value.show=!1,l.value.response=null,l.value.data={puzzle:-1,validated_cost:0,validated_cycles:0,validated_area:0}},v=async T=>{const{data:g}=await Qe.autoValidateResponses(T);console.log(g),g&&!g.needs_manual_validation&&(o.value=o.value.filter(m=>m.id!==T),console.log(n.value),n.value.needs_validation-=1,console.log(n.value))},_=async()=>{if(l.value.response?.id)try{i.value=!0;const T=await Qe.validateResponse(l.value.response.id,l.value.data);if(T.error){alert(`Validation failed: ${T.error}`);return}o.value=o.value.filter(g=>g.id!==l.value.response?.id),n.value.needs_validation=Math.max(0,n.value.needs_validation-1),h()}catch(T){console.error("Validation error:",T),alert("Validation failed")}finally{i.value=!1}};js(()=>{c()});const I=T=>T>=.8?"badge-success":T>=.6?"badge-warning":"badge-error",A=T=>{const g=[T.ocr_confidence_cost,T.ocr_confidence_cycles,T.ocr_confidence_area].filter(x=>x!=null);if(g.length===0)return 0;const m=g.reduce((x,C)=>x+C,0)/g.length;return Math.round(m*100)};return t({refresh:c}),(T,g)=>(S(),z(ge,null,[a("div",Of,[a("div",Mf,[g[14]||(g[14]=a("h2",{class:"card-title"},[a("i",{class:"mdi mdi-shield-account text-2xl text-warning"}),ve(" Admin Panel ")],-1)),a("div",Lf,[a("div",Tf,[g[4]||(g[4]=a("div",{class:"stat-title"},"Total Submissions",-1)),a("div",Af,N(n.value.total_submissions),1)]),a("div",If,[g[5]||(g[5]=a("div",{class:"stat-title"},"Total Responses",-1)),a("div",Df,N(n.value.total_responses),1)]),a("div",Nf,[g[6]||(g[6]=a("div",{class:"stat-title"},"Need Validation",-1)),a("div",Ff,N(n.value.needs_validation),1)]),a("div",jf,[g[7]||(g[7]=a("div",{class:"stat-title"},"Validation Rate",-1)),a("div",Uf,N(Math.round(n.value.validation_rate*100))+"% ",1)])]),a("button",{class:"btn btn-sm btn-primary",onClick:d},[...g[8]||(g[8]=[a("i",{class:"mdi mdi-check-circle mr-1"},null,-1),ve(" Auto validation for all responses ",-1)])]),o.value.length>0?(S(),z("div",Vf,[g[12]||(g[12]=a("h3",{class:"text-lg font-bold mb-4"},"Responses Needing Validation",-1)),a("div",qf,[a("table",Bf,[g[11]||(g[11]=a("thead",null,[a("tr",null,[a("th",null,"Puzzle"),a("th",null,"OCR Data"),a("th",null,"Confidence"),a("th",null,"Actions")])],-1)),a("tbody",null,[(S(!0),z(ge,null,Fe(o.value,m=>(S(),z("tr",{key:m.id},[a("td",null,[a("div",Hf,N(m.puzzle_name),1),a("div",Wf,"ID: "+N(m.id),1)]),a("td",null,[a("div",Kf,[a("div",Gf,[a("span",null,"Cost: "+N(m.cost||"-"),1),m.ocr_confidence_cost?(S(),z("span",{key:0,class:Ne(["badge badge-xs",I(m.ocr_confidence_cost)])},N(Math.round(m.ocr_confidence_cost*100))+"% ",3)):X("",!0)]),a("div",Jf,[a("span",null,"Cycles: "+N(m.cycles||"-"),1),m.ocr_confidence_cycles?(S(),z("span",{key:0,class:Ne(["badge badge-xs",I(m.ocr_confidence_cycles)])},N(Math.round(m.ocr_confidence_cycles*100))+"% ",3)):X("",!0)]),a("div",Yf,[a("span",null,"Area: "+N(m.area||"-"),1),m.ocr_confidence_area?(S(),z("span",{key:0,class:Ne(["badge badge-xs",I(m.ocr_confidence_area)])},N(Math.round(m.ocr_confidence_area*100))+"% ",3)):X("",!0)])])]),a("td",null,[a("div",Zf,N(A(m))+"% ",1)]),a("td",null,[a("button",{onClick:x=>u(m),class:"btn btn-sm btn-primary mr-2"},[...g[9]||(g[9]=[a("i",{class:"mdi mdi-check-circle mr-1"},null,-1),ve(" Validate ",-1)])],8,Qf),m.id?(S(),z("button",{key:0,onClick:x=>v(m.id),class:"btn btn-sm btn-warning"},[...g[10]||(g[10]=[a("i",{class:"mdi mdi-check-circle mr-1"},null,-1),ve(" Auto Validation ",-1)])],8,Xf)):X("",!0)])]))),128))])])])])):(S(),z("div",ed,[...g[13]||(g[13]=[a("i",{class:"mdi mdi-check-all text-6xl text-success opacity-50"},null,-1),a("p",{class:"text-lg font-medium mt-2"},"All responses validated!",-1),a("p",{class:"text-sm opacity-70"}," No responses currently need manual validation. ",-1)])]))])]),l.value.show?(S(),z("div",td,[a("div",sd,[g[22]||(g[22]=a("h3",{class:"font-bold text-lg mb-4"},"Validate Response",-1)),(S(!0),z(ge,null,Fe(l.value.response?.files??[],m=>(S(),z("div",null,[a("img",{src:m.file_url},null,8,nd)]))),256)),l.value.response?(S(),z("div",od,[a("div",rd,[g[16]||(g[16]=a("i",{class:"mdi mdi-information-outline"},null,-1)),a("div",null,[a("div",id,N(l.value.response.puzzle_name),1),g[15]||(g[15]=a("div",{class:"text-sm"},"Review and correct the OCR data below",-1))])]),a("div",ld,[a("div",ad,[g[18]||(g[18]=a("label",{class:"label"},[a("span",{class:"label-text"},"Puzzle")],-1)),lt(a("select",{"onUpdate:modelValue":g[0]||(g[0]=m=>l.value.data.puzzle=m),class:"select select-bordered select-sm w-full"},[g[17]||(g[17]=a("option",{value:""},"Select puzzle...",-1)),(S(!0),z(ge,null,Fe(ie(s).puzzles,m=>(S(),z("option",{key:m.id,value:m.id},N(m.title),9,cd))),128))],512),[[Li,l.value.data.puzzle]])]),a("div",ud,[g[19]||(g[19]=a("label",{class:"label"},[a("span",{class:"label-text"},"Cost")],-1)),lt(a("input",{"onUpdate:modelValue":g[1]||(g[1]=m=>l.value.data.validated_cost=m),type:"text",class:"input input-bordered input-sm",placeholder:l.value.response.cost?.toString()||"Enter cost"},null,8,fd),[[ys,l.value.data.validated_cost]])]),a("div",dd,[g[20]||(g[20]=a("label",{class:"label"},[a("span",{class:"label-text"},"Cycles")],-1)),lt(a("input",{"onUpdate:modelValue":g[2]||(g[2]=m=>l.value.data.validated_cycles=m),type:"text",class:"input input-bordered input-sm",placeholder:l.value.response.cycles?.toString()||"Enter cycles"},null,8,hd),[[ys,l.value.data.validated_cycles]])]),a("div",pd,[g[21]||(g[21]=a("label",{class:"label"},[a("span",{class:"label-text"},"Area")],-1)),lt(a("input",{"onUpdate:modelValue":g[3]||(g[3]=m=>l.value.data.validated_area=m),type:"text",class:"input input-bordered input-sm",placeholder:l.value.response.area?.toString()||"Enter area"},null,8,gd),[[ys,l.value.data.validated_area]])])]),a("div",md,[a("button",{onClick:h,class:"btn btn-ghost"}," Cancel "),a("button",{onClick:_,class:"btn btn-primary",disabled:i.value},[i.value?(S(),z("span",bd)):X("",!0),ve(" "+N(i.value?"Validating...":"Validate"),1)],8,vd)]),a("div",_d,[a("pre",null,[a("code",null,N(l.value),1)])])])):X("",!0)]),a("div",{class:"modal-backdrop",onClick:h})])):X("",!0)],64))}}),wd={class:"mb-8"},xd={class:"card bg-base-100 shadow-lg"},Sd={class:"card-body"},zd={key:0,class:"flex justify-center py-8"},Cd={key:1,class:"text-center py-8"},$d={key:2,class:"space-y-6"},Pd={class:"tabs tabs-boxed"},kd={class:"space-y-4"},Ed={key:0,class:"text-center py-8"},Rd={key:1,class:"overflow-x-auto"},Od={class:"table table-zebra w-full"},Md={class:"font-bold"},Ld={key:0,class:"badge badge-warning badge-lg"},Td={key:1,class:"badge badge-lg"},Ad={key:2,class:"badge badge-lg"},Id={key:3},Dd={class:"font-medium"},Nd={class:"text-right"},Fd={class:"text-right font-bold"},jd={class:"space-y-6"},Ud=["onClick"],Vd={class:"ml-auto badge badge-sm"},qd={key:0,class:"card-body"},Bd={key:0,class:"text-center py-8"},Hd={key:1,class:"space-y-6"},Wd={class:"grid grid-cols-1 md:grid-cols-3 gap-4"},Kd={class:"card-body p-4"},Gd={class:"text-xs text-base-content/70 font-bold"},Jd={class:"font-bold text-lg"},Yd={class:"space-y-2 text-sm"},Zd={class:"flex justify-between"},Qd={class:"badge badge-sm"},Xd={class:"flex justify-between"},eh={class:"badge badge-sm"},th={class:"flex justify-between"},sh={class:"badge badge-sm"},nh={class:"flex justify-between pt-2 border-t"},oh={class:"badge badge-sm"},rh={class:"flex justify-between pt-2 border-t"},ih={class:"badge badge-primary"},lh={class:"overflow-x-auto"},ah={class:"table table-zebra w-full table-sm"},ch={class:"font-bold"},uh={key:0,class:"badge badge-warning"},fh={key:1,class:"badge"},dh={key:2,class:"badge"},hh={key:3},ph={class:"font-medium"},gh={class:"text-center"},mh={key:0,class:"badge badge-sm"},vh={key:1,class:"text-base-content/40"},bh={class:"text-center"},_h={key:0,class:"badge badge-sm"},yh={key:1,class:"text-base-content/40"},wh={class:"text-center"},xh={key:0,class:"badge badge-sm"},Sh={key:1,class:"text-base-content/40"},zh={class:"text-center"},Ch={key:0,class:"badge badge-sm"},$h={key:1,class:"text-base-content/40"},Ph={class:"text-right font-bold text-primary text-lg"},kh=Ft({__name:"Results",setup(e){const t=oe(!0),s=oe(null),n=oe("overall"),o=oe(null),r=async()=>{t.value=!0;try{const d=await fetch("/api/results/results");if(!d.ok)throw new Error("Failed to fetch results");s.value=await d.json()}catch(d){console.error("Error fetching results:",d)}finally{t.value=!1}},i=()=>s.value?s.value.users.map(u=>{const h=s.value.responses_by_userid[u.id]||[],v=h.reduce((I,A)=>I+(A.rank_points||0),0),_=h.length;return{username:u.username,totalPoints:v,puzzlesSolved:_}}).sort((u,h)=>h.totalPoints-u.totalPoints):[],l=d=>s.value?(s.value.ranking_by_puzzle[d]||[]).map(h=>(console.log(h),{username:s.value.users.find(_=>_.id===h.user_id)?.username||"Unknown",cost:h.final_cost,cycles:h.final_cycles,area:h.final_area,points:h.points,rank_points:h.rank_points||0})):[],c=d=>{o.value=o.value===d?null:d};return js(()=>{r()}),(d,u)=>(S(),z("div",wd,[a("div",xd,[a("div",Sd,[u[16]||(u[16]=a("h2",{class:"card-title text-2xl mb-6"},[a("i",{class:"mdi mdi-trophy text-yellow-500 mr-2"}),ve(" General Results ")],-1)),t.value?(S(),z("div",zd,[...u[2]||(u[2]=[a("span",{class:"loading loading-spinner loading-lg"},null,-1)])])):s.value?(S(),z("div",$d,[a("div",Pd,[a("button",{onClick:u[0]||(u[0]=h=>n.value="overall"),class:Ne(["tab",n.value==="overall"?"tab-active":""])},[...u[4]||(u[4]=[a("i",{class:"mdi mdi-chart-line mr-2"},null,-1),ve(" Overall Ranking ",-1)])],2),a("button",{onClick:u[1]||(u[1]=h=>n.value="byPuzzle"),class:Ne(["tab",n.value==="byPuzzle"?"tab-active":""])},[...u[5]||(u[5]=[a("i",{class:"mdi mdi-puzzle mr-2"},null,-1),ve(" By Puzzle ",-1)])],2)]),lt(a("div",kd,[i().length===0?(S(),z("div",Ed,[...u[6]||(u[6]=[a("p",{class:"text-base-content/70"},"No submissions yet",-1)])])):(S(),z("div",Rd,[a("table",Od,[u[7]||(u[7]=a("thead",null,[a("tr",null,[a("th",null,"Rank"),a("th",null,"Player"),a("th",{class:"text-right"},"Puzzles Solved"),a("th",{class:"text-right"},"Total Points")])],-1)),a("tbody",null,[(S(!0),z(ge,null,Fe(i(),(h,v)=>(S(),z("tr",{key:h.username},[a("td",Md,[v===0?(S(),z("span",Ld," 🏆 #1 ")):v===1?(S(),z("span",Td," 🥈 #2 ")):v===2?(S(),z("span",Ad," 🥉 #3 ")):(S(),z("span",Id,"#"+N(v+1),1))]),a("td",Dd,N(h.username),1),a("td",Nd,N(h.puzzlesSolved),1),a("td",Fd,N(h.totalPoints),1)]))),128))])])]))],512),[[Mo,n.value==="overall"]]),lt(a("div",jd,[(S(!0),z(ge,null,Fe(s.value.puzzles,h=>(S(),z("div",{key:h.id,class:"card bg-base-100 border border-base-300"},[a("button",{onClick:v=>c(h.id),class:"btn btn-ghost btn-lg w-full justify-start text-lg font-bold hover:bg-primary/20 rounded-b-none"},[a("i",{class:Ne(["mdi mr-2",o.value===h.id?"mdi-chevron-down":"mdi-chevron-right"])},null,2),ve(" "+N(h.title)+" ",1),a("span",Vd,N(l(h.id).length)+" submissions ",1)],8,Ud),o.value===h.id?(S(),z("div",qd,[l(h.id).length===0?(S(),z("div",Bd,[...u[8]||(u[8]=[a("p",{class:"text-base-content/70 text-lg"},"No submissions yet",-1)])])):(S(),z("div",Hd,[a("div",Wd,[(S(!0),z(ge,null,Fe(l(h.id).slice(0,3),(v,_)=>(S(),z("div",{key:_,class:"card bg-base-200"},[a("div",Kd,[a("div",Gd,N(_===0?"🏆 1st Place":_===1?"🥈 2nd Place":"🥉 3rd Place"),1),a("h4",Jd,N(v.username),1),u[14]||(u[14]=a("div",{class:"divider my-2"},null,-1)),a("div",Yd,[a("div",Zd,[u[9]||(u[9]=a("span",null,"Cost",-1)),a("span",Qd,N(v.cost||"N/A"),1)]),a("div",Xd,[u[10]||(u[10]=a("span",null,"Cycles",-1)),a("span",eh,N(v.cycles||"N/A"),1)]),a("div",th,[u[11]||(u[11]=a("span",null,"Area",-1)),a("span",sh,N(v.area||"N/A"),1)]),a("div",nh,[u[12]||(u[12]=a("span",null,"Total (with coef.)",-1)),a("span",oh,N(v.points||"N/A"),1)]),a("div",rh,[u[13]||(u[13]=a("span",{class:"font-bold"},"Points",-1)),a("span",ih,N(v.rank_points)+" pts",1)])])])]))),128))]),a("div",lh,[a("table",ah,[u[15]||(u[15]=a("thead",null,[a("tr",null,[a("th",{class:"w-12"},"Rank"),a("th",null,"Player"),a("th",{class:"text-center"},"Cost"),a("th",{class:"text-center"},"Cycles"),a("th",{class:"text-center"},"Area"),a("th",{class:"text-center"},"Total (with coef.)"),a("th",{class:"text-right"},"Points")])],-1)),a("tbody",null,[(S(!0),z(ge,null,Fe(l(h.id),(v,_)=>(S(),z("tr",{key:_,class:Ne({"bg-primary/10":_<3})},[a("td",ch,[_===0?(S(),z("span",uh,"🏆")):_===1?(S(),z("span",fh,"🥈")):_===2?(S(),z("span",dh,"🥉")):(S(),z("span",hh,"#"+N(_+1),1))]),a("td",ph,N(v.username),1),a("td",gh,[v.cost?(S(),z("span",mh,N(v.cost),1)):(S(),z("span",vh,"—"))]),a("td",bh,[v.cycles?(S(),z("span",_h,N(v.cycles),1)):(S(),z("span",yh,"—"))]),a("td",wh,[v.area?(S(),z("span",xh,N(v.area),1)):(S(),z("span",Sh,"—"))]),a("td",zh,[v.points?(S(),z("span",Ch,N(v.points),1)):(S(),z("span",$h,"—"))]),a("td",Ph,N(v.rank_points),1)],2))),128))])])])]))])):X("",!0)]))),128))],512),[[Mo,n.value==="byPuzzle"]])])):(S(),z("div",Cd,[...u[3]||(u[3]=[a("p",{class:"text-base-content/70"},"No results available yet",-1)])]))])])]))}});function br(e,t){return Hn()?(Or(e,t),!0):!1}const _r=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function Eh(e,t=1e3,s={}){const{immediate:n=!0,immediateCallback:o=!1}=s;let r=null;const i=Gr(!1);function l(){r&&(clearInterval(r),r=null)}function c(){i.value=!1,l()}function d(){const u=ms(t);u<=0||(i.value=!0,o&&e(),l(),i.value&&(r=setInterval(e,u)))}return n&&_r&&d(),(de(t)||typeof t=="function")&&br(Pt(t,()=>{i.value&&_r&&d()})),br(c),{isActive:Sl(i),pause:c,resume:d}}function Rh(e,t){var s,n;const o=Gr(ms(e)),r=Eh(()=>{var u;const h=o.value-1;if(o.value=h<0?0:h,t==null||(u=t.onTick)===null||u===void 0||u.call(t),o.value<=0){var v;r.pause(),t==null||(v=t.onComplete)===null||v===void 0||v.call(t)}},(s=t?.interval)!==null&&s!==void 0?s:1e3,{immediate:(n=t?.immediate)!==null&&n!==void 0?n:!1}),i=u=>{var h;o.value=(h=ms(u))!==null&&h!==void 0?h:ms(e)},l=()=>{r.pause(),i()},c=()=>{r.isActive.value||o.value>0&&r.resume()};return{remaining:o,reset:i,stop:l,start:u=>{i(u),r.resume()},pause:r.pause,resume:c,isActive:r.isActive}}const Oh={class:"min-h-screen bg-base-200"},Mh={class:"navbar bg-base-100 shadow-lg"},Lh={class:"container mx-auto w-full flex items-center gap-4"},Th={class:"flex items-center gap-4"},Ah={key:0,class:"flex items-center gap-2"},Ih={class:"text-sm"},Dh={class:"font-medium"},Nh={key:0,class:"badge badge-warning badge-xs ml-1"},Fh={key:1,class:"text-sm text-base-content/70"},jh={class:"container mx-auto px-4 py-8"},Uh={key:0,class:"flex justify-center"},Vh={class:"text-center"},qh={class:"mb-6 text-base-content/70"},Bh={key:1,class:"flex justify-center items-center min-h-[400px]"},Hh={key:2,class:"alert alert-error max-w-2xl mx-auto"},Wh={class:"text-sm"},Kh={key:3,class:"space-y-8"},Gh={class:"mb-8"},Jh={class:"card bg-base-100 shadow-lg"},Yh={class:"card-body"},Zh={class:"card-title text-2xl"},Qh={class:"text-base-content/70"},Xh={class:"flex flex-wrap gap-4 mt-4"},ep={key:0},tp={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"},sp={key:1,class:"text-center py-12"},np={key:0,class:"modal modal-open"},op={class:"modal-box max-w-6xl"},rp={class:"flex justify-between items-center mb-4"},ip=Ft({__name:"OpusMagnum",props:{collectionTitle:{},collectionUrl:{},collectionDescription:{}},setup(e){const t=e,s=Hs(),n=ro(),{submissions:o,isSubmissionModalOpen:r}=oo(n),{openSubmissionModal:i,loadSubmissions:l,closeSubmissionModal:c}=n,d=oe(null),u=oe(!0),h=oe(""),v=Ue(()=>d.value?.is_superuser||!1),_=Ue(()=>{const C={};return o.value.forEach(R=>{R.responses.forEach(te=>{C[te.puzzle_id]||(C[te.puzzle_id]=[]),C[te.puzzle_id].push(te)})}),C});async function I(){try{u.value=!0,h.value="",console.log("Starting data load..."),console.log("Loading user info...");const C=await Qe.getUserInfo();C.data?(d.value=C.data,console.log("User info loaded:",C.data)):C.error&&console.warn("User info error:",C.error),console.log("Loading puzzles..."),await s.loadPuzzles(),console.log("Puzzles loaded:",s.puzzles.length),console.log("Loading submissions..."),await l(),console.log("Submissions loaded:",o.value.length),console.log("Data load complete!")}catch(C){h.value=Fi.getErrorMessage(C),console.error("Failed to load data:",C)}finally{u.value=!1,console.log("Loading state set to false")}d.value?.is_superuser&&T()}const{remaining:A,start:T}=Rh(60,{onComplete(){I()}});js(async()=>{await I()});const g=C=>s.findPuzzleByName(C),m=()=>{window.location.reload()},x=()=>{window.location.href="/"};return(C,R)=>(S(),z("div",Oh,[a("div",Mh,[a("div",Lh,[a("button",{onClick:x,class:"btn btn-primary btn-sm"},[...R[3]||(R[3]=[a("i",{class:"mdi mdi-arrow-left"},null,-1),ve(" Back ",-1)])]),R[6]||(R[6]=a("h1",{class:"text-xl font-bold"},"Opus Magnum Puzzle Submitter",-1)),R[7]||(R[7]=a("div",{class:"flex-1"},null,-1)),a("div",Th,[d.value?.is_authenticated?(S(),z("div",Ah,[a("div",Ih,[a("span",Dh,N(d.value.username),1),d.value.is_superuser?(S(),z("span",Nh,"Admin")):X("",!0)])])):(S(),z("div",Fh,"Not logged in")),R[4]||(R[4]=a("a",{href:"/api/docs",class:"btn btn-xs"},"API docs",-1)),R[5]||(R[5]=a("a",{href:"/admin",class:"btn btn-xs btn-warning"},"Admin panel",-1))])])]),a("div",jh,[d.value?.is_superuser?(S(),z("div",Uh,[a("div",Vh,[a("p",qh,[R[8]||(R[8]=a("span",{class:"loading loading-spinner loading-lg"},null,-1)),ve(" Auto reload page in "+N(ie(A))+" seconds ... ",1)])])])):X("",!0),u.value?(S(),z("div",Bh,[...R[9]||(R[9]=[a("div",{class:"text-center"},[a("span",{class:"loading loading-spinner loading-lg"}),a("p",{class:"mt-4 text-base-content/70"},"Loading puzzles...")],-1)])])):h.value?(S(),z("div",Hh,[R[12]||(R[12]=a("i",{class:"mdi mdi-alert-circle text-xl"},null,-1)),a("div",null,[R[10]||(R[10]=a("h3",{class:"font-bold"},"Error Loading Data",-1)),a("div",Wh,N(h.value),1)]),a("button",{onClick:m,class:"btn btn-sm btn-outline"},[...R[11]||(R[11]=[a("i",{class:"mdi mdi-refresh mr-1"},null,-1),ve(" Retry ",-1)])])])):(S(),z("div",Kh,[a("div",Gh,[a("div",Jh,[a("div",Yh,[a("h2",Zh,N(t.collectionTitle),1),a("p",Qh,N(t.collectionDescription),1),a("div",Xh,[a("button",{onClick:R[0]||(R[0]=(...te)=>ie(i)&&ie(i)(...te)),class:"btn btn-primary"},[...R[13]||(R[13]=[a("i",{class:"mdi mdi-plus mr-2"},null,-1),ve(" Submit Solution ",-1)])])])])])]),Le(kh),v.value?(S(),z("div",ep,[Le(yd)])):X("",!0),a("div",tp,[(S(!0),z(ge,null,Fe(ie(s).puzzles,te=>(S(),Ci(Xc,{key:te.id,puzzle:te,responses:_.value[te.id]||[]},null,8,["puzzle","responses"]))),128))]),ie(s).puzzles.length===0?(S(),z("div",sp,[...R[14]||(R[14]=[a("div",{class:"text-6xl mb-4"},"🧩",-1),a("h3",{class:"text-xl font-bold mb-2"},"No Puzzles Available",-1),a("p",{class:"text-base-content/70"}," Check back later for new puzzle collections! ",-1)])])):X("",!0)]))]),ie(r)?(S(),z("div",np,[a("div",op,[a("div",rp,[R[16]||(R[16]=a("h3",{class:"font-bold text-lg"},"Submit Solution",-1)),a("button",{onClick:R[1]||(R[1]=(...te)=>ie(c)&&ie(c)(...te)),class:"btn btn-sm btn-circle btn-ghost"},[...R[15]||(R[15]=[a("i",{class:"mdi mdi-close"},null,-1)])])]),Le(Rf,{puzzles:ie(s).puzzles,"find-puzzle-by-name":g},null,8,["puzzles"])]),a("div",{class:"modal-backdrop",onClick:R[2]||(R[2]=(...te)=>ie(c)&&ie(c)(...te))})])):X("",!0)]))}}),lp=vc(),Bi="#app",ap=document.querySelector(Bi),Hi=pc(ip,{...ap?.dataset});Hi.use(lp);Hi.mount(Bi);
|