25 lines
300 KiB
JavaScript
25 lines
300 KiB
JavaScript
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const c of a.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&s(c)}).observe(document,{childList:!0,subtree:!0});function n(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function s(o){if(o.ep)return;o.ep=!0;const a=n(o);fetch(o.href,a)}})();/**
|
||
* @vue/shared v3.5.44
|
||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||
* @license MIT
|
||
**/function Ma(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ct={},Ar=[],En=()=>{},Du=()=>!1,Jo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Xo=e=>e.startsWith("onUpdate:"),Et=Object.assign,Ia=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Jf=Object.prototype.hasOwnProperty,st=(e,t)=>Jf.call(e,t),Le=Array.isArray,rr=e=>Fs(e)==="[object Map]",Bn=e=>Fs(e)==="[object Set]",Kl=e=>Fs(e)==="[object Date]",He=e=>typeof e=="function",bt=e=>typeof e=="string",$n=e=>typeof e=="symbol",at=e=>e!==null&&typeof e=="object",Ru=e=>(at(e)||He(e))&&He(e.then)&&He(e.catch),Lu=Object.prototype.toString,Fs=e=>Lu.call(e),Xf=e=>Fs(e).slice(8,-1),Ku=e=>Fs(e)==="[object Object]",ja=e=>bt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,bs=Ma(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Qo=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Qf=/-\w/g,hn=Qo(e=>e.replace(Qf,t=>t.slice(1).toUpperCase())),Zf=/\B([A-Z])/g,cr=Qo(e=>e.replace(Zf,"-$1").toLowerCase()),Fu=Qo(e=>e.charAt(0).toUpperCase()+e.slice(1)),zi=Qo(e=>e?`on${Fu(e)}`:""),Cn=(e,t)=>!Object.is(e,t),So=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Nu=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Zo=e=>{const t=parseFloat(e);return isNaN(t)?e:t},ed=e=>{const t=bt(e)?Number(e):NaN;return isNaN(t)?e:t};let Fl;const ei=()=>Fl||(Fl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function sr(e){if(Le(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],o=bt(s)?sd(s):sr(s);if(o)for(const a in o)t[a]=o[a]}return t}else if(bt(e)||at(e))return e}const td=/;(?![^(]*\))/g,nd=/:([^]+)/,rd=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function sd(e){const t={};return e.replace(rd,n=>n.startsWith("/*")?"":n).split(td).forEach(n=>{if(n){const s=n.split(nd);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function et(e){let t="";if(bt(e))t=e;else if(Le(e))for(let n=0;n<e.length;n++){const s=et(e[n]);s&&(t+=s+" ")}else if(at(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const od="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly",id=Ma(od);function Vu(e){return!!e||e===""}function ad(e,t,n){if(e.length!==t.length)return!1;let s=!0;for(let o=0;s&&o<e.length;o++)s=Un(e[o],t[o],n);return s}function Nl(e,t,n){if(e.size!==t.size)return!1;const s=Array.from(t),o=new Uint8Array(s.length);for(const a of e){let c=-1;for(let d=0;d<s.length;d++)if(!o[d]&&Un(a,s[d],n)){c=d;break}if(c<0)return!1;o[c]=1}return!0}function ld(e,t,n){let s=rr(e),o=rr(t);if(s||o||(s=Bn(e),o=Bn(t),s||o))return s&&o?Nl(e,t,n):!1;const a=Object.keys(e).length,c=Object.keys(t).length;if(a!==c)return!1;for(const d in e){const h=e.hasOwnProperty(d),g=t.hasOwnProperty(d);if(h&&!g||!h&&g||!Un(e[d],t[d],n))return!1}return String(e)===String(t)}function Vl(e,t,n,s){n||(n=[new Map,new Map]);const[o,a]=n;if(o.has(e)||a.has(t))return o.get(e)===t&&a.get(t)===e;o.set(e,t),a.set(t,e);const c=s(e,t,n);return o.delete(e),a.delete(t),c}function Un(e,t,n){if(e===t)return!0;let s=Kl(e),o=Kl(t);return s||o?s&&o?e.getTime()===t.getTime():!1:(s=$n(e),o=$n(t),s||o?e===t:(s=Le(e),o=Le(t),s||o?s&&o?Vl(e,t,n,ad):!1:(s=at(e),o=at(t),s||o?!s||!o?!1:Vl(e,t,n,ld):String(e)===String(t))))}function Da(e,t){return e.findIndex(n=>Un(n,t))}const Bu=e=>!!(e&&e.__v_isRef===!0),re=e=>bt(e)?e:e==null?"":Le(e)||at(e)&&(e.toString===Lu||!He(e.toString))?Bu(e)?re(e.value):JSON.stringify(e,Uu,2):String(e),Uu=(e,t)=>Bu(t)?Uu(e,t.value):rr(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o],a)=>(n[Gi(s,a)+" =>"]=o,n),{})}:Bn(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Gi(n))}:$n(t)?Gi(t):at(t)&&!Le(t)&&!Ku(t)?String(t):t,Gi=(e,t="")=>{var n;return $n(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
|
||
* @vue/reactivity v3.5.44
|
||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||
* @license MIT
|
||
**/let Mt;class ud{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Mt&&(Mt.active?(this.parent=Mt,this.index=(Mt.scopes||(Mt.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const s=this.scopes.slice();for(t=0,n=s.length;t<n;t++)s[t].pause()}for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes){const o=this.scopes.slice();for(t=0,n=o.length;t<n;t++)o[t].resume()}const s=this.effects.slice();for(t=0,n=s.length;t<n;t++)s[t].resume()}}run(t){if(this._active){const n=Mt;try{return Mt=this,t()}finally{Mt=n}}}on(){++this._on===1&&(this.prevScope=Mt,Mt=this)}off(){if(this._on>0&&--this._on===0){if(Mt===this)Mt=this.prevScope;else{let t=Mt;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(this.effects.length=0,n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){const o=this.scopes.slice();for(n=0,s=o.length;n<s;n++)o[n].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 cd(){return Mt}let dt;const Yi=new WeakSet;class qu{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,Mt&&(Mt.active?Mt.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Yi.has(this)&&(Yi.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Wu(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Bl(this),zu(this);const t=dt,n=vn;dt=this,vn=!0;try{return this.fn()}finally{Gu(this),dt=t,vn=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Ka(t);this.deps=this.depsTail=void 0,Bl(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Yi.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){ua(this)&&this.run()}get dirty(){return ua(this)}}let Hu=0,ws,_s;function Wu(e,t=!1){if(e.flags|=8,t){e.next=_s,_s=e;return}e.next=ws,ws=e}function Ra(){Hu++}function La(){if(--Hu>0)return;if(_s){let t=_s;for(_s=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;ws;){let t=ws;for(ws=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function zu(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Gu(e){let t,n=e.depsTail,s=n;for(;s;){const o=s.prevDep;s.version===-1?(s===n&&(n=o),Ka(s),fd(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=o}e.deps=t,e.depsTail=n}function ua(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Yu(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Yu(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===As)||(e.globalVersion=As,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!ua(e))))return;e.flags|=2;const t=e.dep,n=dt,s=vn;dt=e,vn=!0;try{zu(e);const o=e.fn(e._value);(t.version===0||Cn(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{dt=n,vn=s,Gu(e),e.flags&=-3}}function Ka(e,t=!1){const{dep:n,prevSub:s,nextSub:o}=e;if(s&&(s.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let a=n.computed.deps;a;a=a.nextDep)Ka(a,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function fd(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let vn=!0;const Ju=[];function An(){Ju.push(vn),vn=!1}function Pn(){const e=Ju.pop();vn=e===void 0?!0:e}function Bl(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=dt;dt=void 0;try{t()}finally{dt=n}}}let As=0;class dd{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Fa{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(!dt||!vn||dt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==dt)n=this.activeLink=new dd(dt,this),dt.deps?(n.prevDep=dt.depsTail,dt.depsTail.nextDep=n,dt.depsTail=n):dt.deps=dt.depsTail=n,Xu(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=dt.depsTail,n.nextDep=void 0,dt.depsTail.nextDep=n,dt.depsTail=n,dt.deps===n&&(dt.deps=s)}return n}trigger(t){this.version++,As++,this.notify(t)}notify(t){Ra();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{La()}}}function Xu(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Xu(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const ca=new WeakMap,Pr=Symbol(""),fa=Symbol(""),Ps=Symbol("");function Kt(e,t,n){if(vn&&dt){let s=ca.get(e);s||ca.set(e,s=new Map);let o=s.get(n);o||(s.set(n,o=new Fa),o.map=s,o.key=n),o.track()}}function Rn(e,t,n,s,o,a){const c=ca.get(e);if(!c){As++;return}const d=h=>{h&&h.trigger()};if(Ra(),t==="clear")c.forEach(d);else{const h=Le(e),g=h&&ja(n);if(h&&n==="length"){const y=Number(s);c.forEach((k,j)=>{(j==="length"||j===Ps||!$n(j)&&j>=y)&&d(k)})}else switch((n!==void 0||c.has(void 0))&&d(c.get(n)),g&&d(c.get(Ps)),t){case"add":h?g&&d(c.get("length")):(d(c.get(Pr)),rr(e)&&d(c.get(fa)));break;case"delete":h||(d(c.get(Pr)),rr(e)&&d(c.get(fa)));break;case"set":rr(e)&&d(c.get(Pr));break}}La()}function qr(e){const t=rt(e);return t===e||(Kt(t,"iterate",Ps),ln(e))?t:Tn(e)?or(e)?t.map(n=>ir(un(n))):t.map(ir):t.map(un)}function ti(e){return Kt(e=rt(e),"iterate",Ps),e}function _n(e,t){return Tn(e)?ir(or(e)?un(t):t):un(t)}const pd={__proto__:null,[Symbol.iterator](){return Ji(this,Symbol.iterator,e=>_n(this,e))},concat(...e){return qr(this).concat(...e.map(t=>Le(t)?qr(t):t))},entries(){return Ji(this,"entries",e=>(e[1]=_n(this,e[1]),e))},every(e,t){return In(this,"every",e,t,void 0,arguments)},filter(e,t){return In(this,"filter",e,t,n=>n.map(s=>_n(this,s)),arguments)},find(e,t){return In(this,"find",e,t,n=>_n(this,n),arguments)},findIndex(e,t){return In(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return In(this,"findLast",e,t,n=>_n(this,n),arguments)},findLastIndex(e,t){return In(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return In(this,"forEach",e,t,void 0,arguments)},includes(...e){return Xi(this,"includes",e)},indexOf(...e){return Xi(this,"indexOf",e)},join(e){return qr(this).join(e)},lastIndexOf(...e){return Xi(this,"lastIndexOf",e)},map(e,t){return In(this,"map",e,t,void 0,arguments)},pop(){return ps(this,"pop")},push(...e){return ps(this,"push",e)},reduce(e,...t){return ql(this,"reduce",e,t)},reduceRight(e,...t){return ql(this,"reduceRight",e,t)},shift(){return ps(this,"shift")},some(e,t){return In(this,"some",e,t,void 0,arguments)},splice(...e){return ps(this,"splice",e)},toReversed(){return qr(this).toReversed()},toSorted(e){return qr(this).toSorted(e)},toSpliced(...e){return qr(this).toSpliced(...e)},unshift(...e){return ps(this,"unshift",e)},values(){return Ji(this,"values",e=>_n(this,e))}};function Ji(e,t,n){const s=ti(e),o=s[t],a=o.call(s);if(s!==e&&!ln(e)){if(a[Symbol.toStringTag]==="Array Iterator"){const c=Object.create(Object.getPrototypeOf(a));return c.next=()=>Ul(a.next(),n),o!==Qu[t]&&Object.defineProperties(c,{return:{get(){const d=a.return;return typeof d=="function"?d.bind(a):d}},throw:{get(){const d=a.throw;return typeof d=="function"?d.bind(a):d}}}),c}a._next=a.next,a.next=()=>Ul(a._next(),n)}return a}function Ul(e,t){return e.done||(e.value=t(e.value)),e}const Qu=Array.prototype;function In(e,t,n,s,o,a){const c=ti(e),d=c!==e&&!ln(e),h=c[t];if(h!==Qu[t]){const k=h.apply(e,a);return d?un(k):k}let g=n;c!==e&&(d?g=function(k,j){return n.call(this,_n(e,k),j,e)}:n.length>2&&(g=function(k,j){return n.call(this,k,j,e)}));const y=h.call(c,g,s);return d&&o?o(y):y}function ql(e,t,n,s){const o=ti(e),a=o!==e&&!ln(e);let c=n,d=!1;o!==e&&(a?(d=s.length===0,c=function(g,y,k){return d&&(d=!1,g=_n(e,g)),n.call(this,g,_n(e,y),k,e)}):n.length>3&&(c=function(g,y,k){return n.call(this,g,y,k,e)}));const h=o[t](c,...s);return d?_n(e,h):h}function Xi(e,t,n){const s=rt(e);Kt(s,"iterate",Ps);const o=s[t](...n);return(o===-1||o===!1)&&Ua(n[0])?(n[0]=rt(n[0]),s[t](...n)):o}function ps(e,t,n=[]){An(),Ra();const s=rt(e)[t].apply(e,n);return La(),Pn(),s}const hd=Ma("__proto__,__v_isRef,__isVue"),Zu=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter($n));function vd(e){$n(e)||(e=String(e));const t=rt(this);return Kt(t,"has",e),t.hasOwnProperty(e)}class ec{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,a=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return a;if(n==="__v_raw")return s===(o?a?Sd:sc:a?rc:nc).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const c=Le(t);if(!o){let h;if(c&&(h=pd[n]))return h;if(n==="hasOwnProperty")return vd}const d=Reflect.get(t,n,Nt(t)?t:s);if(($n(n)?Zu.has(n):hd(n))||(o||Kt(t,"get",n),a))return d;if(Nt(d)){const h=c&&ja(n)?d:d.value;return o&&at(h)?pa(h):h}return at(d)?o?pa(d):Va(d):d}}class tc extends ec{constructor(t=!1){super(!1,t)}set(t,n,s,o){let a=t[n];const c=Le(t)&&ja(n);if(!this._isShallow){const g=Tn(a);if(!ln(s)&&!Tn(s)&&(a=rt(a),s=rt(s)),!c&&Nt(a)&&!Nt(s))return g||(a.value=s),!0}const d=c?Number(n)<t.length:st(t,n),h=Reflect.set(t,n,s,Nt(t)?t:o);return t===rt(o)&&h&&(d?Cn(s,a)&&Rn(t,"set",n,s):Rn(t,"add",n,s)),h}deleteProperty(t,n){const s=st(t,n);t[n];const o=Reflect.deleteProperty(t,n);return o&&s&&Rn(t,"delete",n,void 0),o}has(t,n){const s=Reflect.has(t,n);return(!$n(n)||!Zu.has(n))&&Kt(t,"has",n),s}ownKeys(t){return Kt(t,"iterate",Le(t)?"length":Pr),Reflect.ownKeys(t)}}class md extends ec{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const yd=new tc,gd=new md,bd=new tc(!0);const da=e=>e,go=e=>Reflect.getPrototypeOf(e);function wd(e,t,n){return function(...s){const o=this.__v_raw,a=rt(o),c=rr(a),d=e==="entries"||e===Symbol.iterator&&c,h=e==="keys"&&c,g=o[e](...s),y=n?da:t?ir:un;return!t&&Kt(a,"iterate",h?fa:Pr),Et(Object.create(g),{next(){const{value:k,done:j}=g.next();return j?{value:k,done:j}:{value:d?[y(k[0]),y(k[1])]:y(k),done:j}}})}}function bo(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function _d(e,t){const n={get(o){const a=this.__v_raw,c=rt(a),d=rt(o);e||(Cn(o,d)&&Kt(c,"get",o),Kt(c,"get",d));const{has:h}=go(c),g=t?da:e?ir:un;if(h.call(c,o))return g(a.get(o));if(h.call(c,d))return g(a.get(d));a!==c&&a.get(o)},get size(){const o=this.__v_raw;return!e&&Kt(rt(o),"iterate",Pr),o.size},has(o){const a=this.__v_raw,c=rt(a),d=rt(o);return e||(Cn(o,d)&&Kt(c,"has",o),Kt(c,"has",d)),o===d?a.has(o):a.has(o)||a.has(d)},forEach(o,a){const c=this,d=c.__v_raw,h=rt(d),g=t?da:e?ir:un;return!e&&Kt(h,"iterate",Pr),d.forEach((y,k)=>o.call(a,g(y),g(k),c))}};return Et(n,e?{add:bo("add"),set:bo("set"),delete:bo("delete"),clear:bo("clear")}:{add(o){const a=rt(this),c=go(a),d=rt(o),h=!t&&!ln(o)&&!Tn(o)?d:o;return c.has.call(a,h)||Cn(o,h)&&c.has.call(a,o)||Cn(d,h)&&c.has.call(a,d)||(a.add(h),Rn(a,"add",h,h)),this},set(o,a){!t&&!ln(a)&&!Tn(a)&&(a=rt(a));const c=rt(this),{has:d,get:h}=go(c);let g=d.call(c,o);g||(o=rt(o),g=d.call(c,o));const y=h.call(c,o);return c.set(o,a),g?Cn(a,y)&&Rn(c,"set",o,a):Rn(c,"add",o,a),this},delete(o){const a=rt(this),{has:c,get:d}=go(a);let h=c.call(a,o);h||(o=rt(o),h=c.call(a,o)),d&&d.call(a,o);const g=a.delete(o);return h&&Rn(a,"delete",o,void 0),g},clear(){const o=rt(this),a=o.size!==0,c=o.clear();return a&&Rn(o,"clear",void 0,void 0),c}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=wd(o,e,t)}),n}function Na(e,t){const n=_d(e,t);return(s,o,a)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_isShallow"?t:o==="__v_raw"?s:Reflect.get(st(n,o)&&o in s?n:s,o,a)}const kd={get:Na(!1,!1)},xd={get:Na(!1,!0)},Cd={get:Na(!0,!1)};const nc=new WeakMap,rc=new WeakMap,sc=new WeakMap,Sd=new WeakMap;function Ed(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Va(e){return Tn(e)?e:Ba(e,!1,yd,kd,nc)}function $d(e){return Ba(e,!1,bd,xd,rc)}function pa(e){return Ba(e,!0,gd,Cd,sc)}function Ba(e,t,n,s,o){if(!at(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const a=o.get(e);if(a)return a;const c=Ed(Xf(e));if(c===0)return e;const d=new Proxy(e,c===2?s:n);return o.set(e,d),d}function or(e){return Tn(e)?or(e.__v_raw):!!(e&&e.__v_isReactive)}function Tn(e){return!!(e&&e.__v_isReadonly)}function ln(e){return!!(e&&e.__v_isShallow)}function Ua(e){return e?!!e.__v_raw:!1}function rt(e){const t=e&&e.__v_raw;return t?rt(t):e}function Ad(e){return!st(e,"__v_skip")&&Object.isExtensible(e)&&Nu(e,"__v_skip",!0),e}const un=e=>at(e)?Va(e):e,ir=e=>at(e)?pa(e):e;function Nt(e){return e?e.__v_isRef===!0:!1}function F(e){return Pd(e,!1)}function Pd(e,t){return Nt(e)?e:new Td(e,t)}class Td{constructor(t,n){this.dep=new Fa,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:rt(t),this._value=n?t:un(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||ln(t)||Tn(t);t=s?t:rt(t),Cn(t,n)&&(this._rawValue=t,this._value=s?t:un(t),this.dep.trigger())}}function nn(e){return Nt(e)?e.value:e}const Od={get:(e,t,n)=>t==="__v_raw"?e:nn(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return Nt(o)&&!Nt(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function oc(e){return or(e)?e:new Proxy(e,Od)}class Md{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Fa(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=As-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&dt!==this)return Wu(this,!0),!0}get value(){const t=this.dep.track();return Yu(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Id(e,t,n=!1){let s,o;return He(e)?s=e:(s=e.get,o=e.set),new Md(s,o,n)}const wo={},Oo=new WeakMap;let Cr;function jd(e,t=!1,n=Cr){if(n){let s=Oo.get(n);s||Oo.set(n,s=[]),s.push(e)}}function Dd(e,t,n=ct){const{immediate:s,deep:o,once:a,scheduler:c,augmentJob:d,call:h}=n,g=Y=>o?Y:ln(Y)||o===!1||o===0?Ln(Y,1):Ln(Y);let y,k,j,T,L=!1,H=!1;if(Nt(e)?(k=()=>e.value,L=ln(e)):or(e)?(k=()=>g(e),L=!0):Le(e)?(H=!0,L=e.some(Y=>or(Y)||ln(Y)),k=()=>e.map(Y=>{if(Nt(Y))return Y.value;if(or(Y))return g(Y);if(He(Y))return h?h(Y,2):Y()})):He(e)?t?k=h?()=>h(e,2):e:k=()=>{if(j){An();try{j()}finally{Pn()}}const Y=Cr;Cr=y;try{return h?h(e,3,[T]):e(T)}finally{Cr=Y}}:k=En,t&&o){const Y=k,le=o===!0?1/0:o;k=()=>Ln(Y(),le)}const fe=cd(),ee=()=>{y.stop(),fe&&fe.active&&Ia(fe.effects,y)};if(a&&t){const Y=t;t=(...le)=>{try{return Y(...le)}finally{ee()}}}let E=H?new Array(e.length).fill(wo):wo;const R=Y=>{if(!(!(y.flags&1)||!y.dirty&&!Y))if(t){const le=y.run();if(Y||o||L||(H?le.some((ie,Z)=>Cn(ie,E[Z])):Cn(le,E))){const ie=Cr;An();try{j&&j(),Cr=y;const Z=[le,E===wo?void 0:H&&E[0]===wo?[]:E,T];E=le,h?h(t,3,Z):t(...Z)}finally{Cr=ie,Pn()}}}else y.run()};return d&&d(R),y=new qu(k),y.scheduler=c?()=>c(R,!1):R,T=Y=>jd(Y,!1,y),j=y.onStop=()=>{const Y=Oo.get(y);if(Y){if(h)h(Y,4);else for(const le of Y)le();Oo.delete(y)}},t?s?R(!0):E=y.run():c?c(R.bind(null,!0),!0):y.run(),ee.pause=y.pause.bind(y),ee.resume=y.resume.bind(y),ee.stop=ee,ee}function Ln(e,t=1/0,n){if(t<=0||!at(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Nt(e))Ln(e.value,t,n);else if(Le(e))for(let s=0;s<e.length;s++)Ln(e[s],t,n);else if(Bn(e)||rr(e))e.forEach(s=>{Ln(s,t,n)});else if(Ku(e)){for(const s in e)Ln(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Ln(e[s],t,n)}return e}/**
|
||
* @vue/runtime-core v3.5.44
|
||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||
* @license MIT
|
||
**/function Ns(e,t,n,s){try{return s?e(...s):e()}catch(o){ni(o,t,n)}}function cn(e,t,n,s){if(He(e)){const o=Ns(e,t,n,s);return o&&Ru(o)&&o.catch(a=>{ni(a,t,n)}),o}if(Le(e)){const o=[];for(let a=0;a<e.length;a++)o.push(cn(e[a],t,n,s));return o}}function ni(e,t,n,s=!0){const o=t?t.vnode:null,{errorHandler:a,throwUnhandledErrorInProduction:c}=t&&t.appContext.config||ct;if(t){let d=t.parent;const h=t.proxy,g=`https://vuejs.org/error-reference/#runtime-${n}`;for(;d;){const y=d.ec;if(y){for(let k=0;k<y.length;k++)if(y[k](e,h,g)===!1)return}d=d.parent}if(a){An(),Ns(a,null,10,[e,h,g]),Pn();return}}Rd(e,n,o,s,c)}function Rd(e,t,n,s=!0,o=!1){if(o)throw e;console.error(e)}const zt=[];let pn=-1;const kn=[];let tr=null,Hr=0;const ic=Promise.resolve();let Mo=null;function ts(e){const t=Mo||ic;return e?t.then(this?e.bind(this):e):t}function Ld(e){let t=pn+1,n=zt.length;for(;t<n;){const s=t+n>>>1,o=zt[s],a=Ts(o);a<e||a===e&&o.flags&2?t=s+1:n=s}return t}function qa(e){if(!(e.flags&1)){const t=Ts(e),n=zt[zt.length-1];!n||!(e.flags&2)&&t>=Ts(n)?zt.push(e):zt.splice(Ld(t),0,e),e.flags|=1,ac()}}function ac(){Mo||(Mo=ic.then(cc))}function Kd(e){if(!Le(e))tr&&e.id===-1?tr.splice(Hr+1,0,e):e.flags&1||(kn.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)kn.push(e[t]);ac()}function lc(e,t,n,s=pn+1){for(;s<zt.length;s++){const o=zt[s];if(o&&o.flags&2){if(e&&o.id!==e.uid||t!==void 0&&!(o.id>=t))continue;zt.splice(s,1),s=e?s-1:pn,o.flags&4&&(o.flags&=-2),o(),o.flags&4||(o.flags&=-2)}}}function uc(e,t,n=0){if(kn.length){let s=kn,o=0;if(t){s=[];for(let c=0;c<kn.length;c++){const d=kn[c];(d.i!==void 0?!d.i||d.i.uid<n:t.has(d))?kn[o++]=d:s.push(d)}}const a=[...new Set(s)].sort((c,d)=>Ts(c)-Ts(d));if(kn.length=o,tr){for(let c=0;c<a.length;c++)tr.push(a[c]);return}for(tr=a,Hr=0;Hr<tr.length;Hr++){const c=tr[Hr];c.flags&4&&(c.flags&=-2),c.flags&8||c(),c.flags&=-2}tr=null,Hr=0}}let Qi=!1;function Fd(e,t){if(Qi){e();return}const n=t===void 0?void 0:new Set(kn);e(),Qi=!0;try{lc(void 0,t),uc(void 0,n,t)}finally{Qi=!1}}const Ts=e=>e.id==null?e.flags&2?-1:1/0:e.id;function cc(e){try{for(pn=0;pn<zt.length;pn++){const t=zt[pn];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Ns(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;pn<zt.length;pn++){const t=zt[pn];t&&(t.flags&=-2)}pn=-1,zt.length=0,uc(),Mo=null,(zt.length||kn.length)&&cc()}}let an=null,fc=null;function Io(e){const t=an;return an=e,fc=e&&e.type.__scopeId||null,t}function fr(e,t=an,n){if(!t||e._n)return e;const s=(...o)=>{s._d&&Lo(-1);const a=Io(t),c=Tr.length;let d;try{d=e(...o)}finally{for(let h=Tr.length;h>c;h--)Fc();Io(a),s._d&&Lo(1)}return d};return s._n=!0,s._c=!0,s._d=!0,s}function Ae(e,t){if(an===null)return e;const n=li(an),s=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[a,c,d,h=ct]=t[o];a&&(He(a)&&(a={mounted:a,updated:a}),a.deep&&Ln(c),s.push({dir:a,instance:n,value:c,oldValue:void 0,arg:d,modifiers:h}))}return e}function _r(e,t,n,s){const o=e.dirs,a=t&&t.dirs;for(let c=0;c<o.length;c++){const d=o[c];a&&(d.oldValue=a[c].value);let h=d.dir[s];h&&(An(),cn(h,n,8,[e.el,d,e,t]),Pn())}}function Nd(e,t){if(Gt){let n=Gt.provides;const s=Gt.parent&&Gt.parent.provides;s===n&&(n=Gt.provides=Object.create(s)),n[e]=t}}function Eo(e,t,n=!1){const s=Ya();if(s||zr){let o=zr?zr._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return n&&He(t)?t.call(s&&s.proxy):t}}const Vd=Symbol.for("v-scx"),Bd=()=>Eo(Vd);function gt(e,t,n){return dc(e,t,n)}function dc(e,t,n=ct){const{immediate:s,deep:o,flush:a,once:c}=n,d=Et({},n),h=t&&s||!t&&a!=="post";let g;if(Rs){if(a==="sync"){const T=Bd();g=T.__watcherHandles||(T.__watcherHandles=[])}else if(!h){const T=()=>{};return T.stop=En,T.resume=En,T.pause=En,T}}const y=Gt;d.call=(T,L,H)=>cn(T,y,L,H);let k=!1;a==="post"?d.scheduler=T=>{T.i=y,Wt(T,y&&y.suspense)}:a!=="sync"&&(k=!0,d.scheduler=(T,L)=>{L?T():qa(T)}),d.augmentJob=T=>{t&&(T.flags|=4),k&&(T.flags|=2,y&&(T.id=y.uid,T.i=y))};const j=Dd(e,t,d);return Rs&&(g?g.push(j):h&&j()),j}function Ud(e,t,n){const s=this.proxy,o=bt(e)?e.includes(".")?pc(s,e):()=>s[e]:e.bind(s,s);let a;He(t)?a=t:(a=t.handler,n=t);const c=Bs(this),d=dc(o,a.bind(s),n);return c(),d}function pc(e,t){const n=t.split(".");return()=>{let s=e;for(let o=0;o<n.length&&s;o++)s=s[n[o]];return s}}const Zn=new WeakMap,hc=Symbol("_vte"),ri=e=>e.__isTeleport,Er=e=>e&&(e.disabled||e.disabled===""),qd=e=>e&&(e.defer||e.defer===""),Hl=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Wl=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,ha=(e,t)=>{const n=e&&e.to;return bt(n)?t?t(n):null:n},Hd={name:"Teleport",__isTeleport:!0,process(e,t,n,s,o,a,c,d,h,g){const{mc:y,pc:k,pbc:j,o:{insert:T,querySelector:L,createText:H,createComment:fe,parentNode:ee}}=g,E=Er(t.props);let{dynamicChildren:R}=t;const Y=(Z,A,x)=>{Z.shapeFlag&16&&y(Z.children,A,x,o,a,c,d,h)},le=(Z=t)=>{const A=Er(Z.props),x=Z.target=ha(Z.props,L),oe=va(x,Z,H,T);x&&(c!=="svg"&&Hl(x)?c="svg":c!=="mathml"&&Wl(x)&&(c="mathml"),o&&o.isCE&&(o.ce._teleportTargets||(o.ce._teleportTargets=new Set)).add(x),A||(Y(Z,x,oe),ms(Z,!1)))},ie=Z=>{const A=()=>{if(Zn.get(Z)===A){if(Zn.delete(Z),Er(Z.props)){const x=ee(Z.el)||n;Y(Z,x,Z.anchor),ms(Z,!0)}le(Z)}};Zn.set(Z,A),Wt(A,a)};if(e==null){const Z=t.el=H(""),A=t.anchor=H("");if(T(Z,n,s),T(A,n,s),qd(t.props)||a&&a.pendingBranch){ie(t);return}E&&(Y(t,n,A),ms(t,!0)),le()}else{t.el=e.el;const Z=t.anchor=e.anchor,A=Zn.get(e);if(A){A.flags|=8,Zn.delete(e),ie(t);return}t.targetStart=e.targetStart;const x=t.target=e.target,oe=t.targetAnchor=e.targetAnchor,Ce=Er(e.props),J=Ce?n:x,Se=Ce?Z:oe;if(c==="svg"||Hl(x)?c="svg":(c==="mathml"||Wl(x))&&(c="mathml"),R?(j(e.dynamicChildren,R,J,o,a,c,d),Ga(e,t,!0)):h||k(e,t,J,Se,o,a,c,d,!1),E)Ce?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):_o(t,n,Z,g,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Ve=ha(t.props,L);Ve&&(t.target=Ve,_o(t,Ve,null,g,0))}else Ce&&_o(t,x,oe,g,1);ms(t,E)}},remove(e,t,n,{um:s,o:{remove:o}},a){const{shapeFlag:c,children:d,anchor:h,targetStart:g,targetAnchor:y,target:k,props:j}=e,T=Er(j),L=a||!T,H=Zn.get(e);if(H&&(H.flags|=8,Zn.delete(e)),k&&(o(g),o(y)),a&&o(h),!H&&(T||k)&&c&16)for(let fe=0;fe<d.length;fe++){const ee=d[fe];s(ee,t,n,L,!!ee.dynamicChildren)}},move:_o,hydrate:Wd};function _o(e,t,n,{o:{insert:s},m:o},a=2){a===0&&(e.targetStart&&s(e.targetStart,t,n),s(e.targetAnchor,t,n),n=e.targetAnchor);const{el:c,anchor:d,shapeFlag:h,children:g,props:y}=e,k=a===2;if(k&&s(c,t,n),!Zn.has(e)&&(!k||Er(y))&&h&16)for(let j=0;j<g.length;j++)o(g[j],t,n,2);k&&s(d,t,n)}function Wd(e,t,n,s,o,a,{o:{nextSibling:c,parentNode:d,querySelector:h,insert:g,createText:y}},k){function j(fe,ee){let E=ee;for(;E;){if(E&&E.nodeType===8){if(E.data==="teleport start anchor")t.targetStart=E;else if(E.data==="teleport anchor"){t.targetAnchor=E,fe._lpa=t.targetAnchor&&c(t.targetAnchor);break}}E=c(E)}}function T(fe,ee){ee.anchor=k(c(fe),ee,d(fe),n,s,o,a)}const L=t.target=ha(t.props,h),H=Er(t.props);if(L){const fe=L._lpa||L.firstChild;t.shapeFlag&16&&(H?(T(e,t),j(L,fe),t.targetAnchor||va(L,t,y,g,d(e)===L?e:null)):(t.anchor=c(e),j(L,fe),t.targetAnchor||va(L,t,y,g),k(fe&&c(fe),t,L,n,s,o,a))),ms(t,H)}else H&&t.shapeFlag&16&&(T(e,t),t.targetStart=e,t.targetAnchor=c(e));return t.anchor&&c(t.anchor)}const Vs=Hd;function ms(e,t){const n=e.ctx;if(n&&n.ut){let s,o;for(t?(s=e.el,o=e.anchor):(s=e.targetStart,o=e.targetAnchor);s&&s!==o;)s.nodeType===1&&s.setAttribute("data-v-owner",n.uid),s=s.nextSibling;n.ut()}}function va(e,t,n,s,o=null){const a=t.targetStart=n(""),c=t.targetAnchor=n("");return a[hc]=c,e&&(s(a,e,o),s(c,e,o)),c}const on=Symbol("_leaveCb"),hs=Symbol("_enterCb");function vc(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return fn(()=>{e.isMounted=!0}),kc(()=>{e.isUnmounting=!0}),e}const sn=[Function,Array],mc={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:sn,onEnter:sn,onAfterEnter:sn,onEnterCancelled:sn,onBeforeLeave:sn,onLeave:sn,onAfterLeave:sn,onLeaveCancelled:sn,onBeforeAppear:sn,onAppear:sn,onAfterAppear:sn,onAppearCancelled:sn},zd={name:"BaseTransition",props:mc,setup(e,{slots:t}){const n=Ya(),s=vc();return()=>{const o=t.default&&Ha(t.default(),!0),a=o&&o.length?yc(o):n.subTree?$e():void 0;if(!a)return;const c=rt(e),{mode:d}=c;if(s.isLeaving)return Zi(a);const h=jo(a);if(!h)return Zi(a);let g=Os(h,c,s,n,k=>g=k);h.type!==Ft&&ar(h,g);let y=n.subTree&&jo(n.subTree);if(y&&y.type!==Ft&&!$r(y,h)&&Ms(n.subTree)){let k=Os(y,c,s,n);if(ar(y,k),d==="out-in"&&h.type!==Ft)return s.isLeaving=!0,k.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete k.afterLeave,y=void 0},Zi(a);d==="in-out"&&h.type!==Ft?k.delayLeave=(j,T,L)=>{const H=gc(s,y);H[String(y.key)]=y,j[on]=()=>{T(),j[on]=void 0,delete g.delayedLeave,y=void 0},g.delayedLeave=()=>{L(),delete g.delayedLeave,y=void 0}}:y=void 0}else y&&(y=void 0);return a}}};function yc(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Ft){t=n;break}}return t}const Gd=zd;function gc(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function Os(e,t,n,s,o){const{appear:a,mode:c,persisted:d=!1,onBeforeEnter:h,onEnter:g,onAfterEnter:y,onEnterCancelled:k,onBeforeLeave:j,onLeave:T,onAfterLeave:L,onLeaveCancelled:H,onBeforeAppear:fe,onAppear:ee,onAfterAppear:E,onAppearCancelled:R}=t,Y=String(e.key),le=gc(n,e),ie=(x,oe)=>{x&&cn(x,s,9,oe)},Z=(x,oe)=>{const Ce=oe[1];ie(x,oe),Le(x)?x.every(J=>J.length<=1)&&Ce():x.length<=1&&Ce()},A={mode:c,persisted:d,beforeEnter(x){let oe=h;if(!n.isMounted)if(a)oe=fe||h;else return;x[on]&&x[on](!0);const Ce=le[Y];if(Ce&&$r(e,Ce)){let J=Ce.el[on];if(!J){const Se=Ms(Ce);J=Se&&Se.el[on]}J&&J()}ie(oe,[x])},enter(x){if(le[Y]===e)return;let oe=g,Ce=y,J=k;if(!n.isMounted)if(a)oe=ee||g,Ce=E||y,J=R||k;else return;let Se=!1;x[hs]=Xe=>{Se||(Se=!0,Xe?ie(J,[x]):ie(Ce,[x]),A.delayedLeave&&A.delayedLeave(),x[hs]=void 0)};const Ve=x[hs].bind(null,!1);oe?Z(oe,[x,Ve]):Ve()},leave(x,oe){const Ce=String(e.key);if(x[hs]&&x[hs](!0),n.isUnmounting)return oe();ie(j,[x]);let J=!1;x[on]=Ve=>{J||(J=!0,oe(),Ve?ie(H,[x]):ie(L,[x]),x[on]=void 0,le[Ce]===e&&delete le[Ce])};const Se=x[on].bind(null,!1);le[Ce]=e,T?Z(T,[x,Se]):Se()},clone(x){const oe=Os(x,t,n,s,o);return o&&o(oe),oe}};return A}function Zi(e){if(si(e))return e=lr(e),e.children=null,e}function jo(e){if(!si(e))return ri(e.type)&&e.children?yc(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&He(n.default))return n.default()}}function ar(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;ar(ri(n.type)&&jo(n)||n,t)}else if(e.shapeFlag&128)e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback);else if(e.transition=t,e.type===Re&&Le(e.children)){const n=$c(e.children,!1);n&&ar(n,t)}}function Ha(e,t=!1,n){let s=[],o=0;for(let a=0;a<e.length;a++){let c=e[a];const d=n==null?c.key:String(n)+String(c.key!=null?c.key:a);c.type===Re?(c.patchFlag&128&&o++,s=s.concat(Ha(c.children,t,d))):(t||c.type!==Ft)&&s.push(d!=null?lr(c,{key:d}):c)}if(o>1)for(let a=0;a<s.length;a++)s[a].patchFlag=-2;return s}function Ms(e){if(e.component)return Ms(e.component.subTree);if(e.type===Re){const t=Le(e.children)&&$c(e.children,!1);return t?Ms(t):void 0}if(e.type!==Ft)return e}function Vt(e,t){return He(e)?Et({name:e.name},t,{setup:e}):e}function bc(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function zl(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Do=new WeakMap;function ks(e,t,n,s,o=!1){if(Le(e)){e.forEach((H,fe)=>ks(H,t&&(Le(t)?t[fe]:t),n,s,o));return}if(xs(s)&&!o){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&ks(e,t,n,s.component.subTree);return}const a=s.shapeFlag&4?li(s.component):s.el,c=o?null:a,{i:d,r:h}=e,g=t&&t.r,y=d.refs===ct?d.refs={}:d.refs,k=d.setupState,j=rt(k),T=k===ct?Du:H=>zl(y,H)?!1:st(j,H),L=(H,fe)=>!(fe&&zl(y,fe));if(g!=null&&g!==h){if(Gl(t),bt(g))y[g]=null,T(g)&&(k[g]=null);else if(Nt(g)){const H=t;L(g,H.k)&&(g.value=null),H.k&&(y[H.k]=null)}}if(He(h))Ns(h,d,12,[c,y]);else{const H=bt(h),fe=Nt(h);if(H||fe){const ee=()=>{if(e.f){const E=H?T(h)?k[h]:y[h]:L()||!e.k?h.value:y[e.k];if(o)Le(E)&&Ia(E,a);else if(Le(E))E.includes(a)||E.push(a);else if(H)y[h]=[a],T(h)&&(k[h]=y[h]);else{const R=[a];L(h,e.k)&&(h.value=R),e.k&&(y[e.k]=R)}}else H?(y[h]=c,T(h)&&(k[h]=c)):fe&&(L(h,e.k)&&(h.value=c),e.k&&(y[e.k]=c))};if(c){const E=()=>{ee(),Do.delete(e)};E.id=-1,Do.set(e,E),Wt(E,n)}else Gl(e),ee()}}}function Gl(e){const t=Do.get(e);t&&(t.flags|=8,Do.delete(e))}ei().requestIdleCallback;ei().cancelIdleCallback;const xs=e=>!!e.type.__asyncLoader,si=e=>e.type.__isKeepAlive;function Yd(e,t){wc(e,"a",t)}function Jd(e,t){wc(e,"da",t)}function wc(e,t,n=Gt){const s=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(oi(t,s,n),n){let o=n.parent;for(;o&&o.parent;)si(o.parent.vnode)&&Xd(s,t,n,o),o=o.parent}}function Xd(e,t,n,s){const o=oi(t,e,s,!0);dr(()=>{Ia(s[t],o)},n)}function oi(e,t,n=Gt,s=!1){if(n){const o=n[e]||(n[e]=[]),a=t.__weh||(t.__weh=(...c)=>{An();const d=Bs(n),h=cn(t,n,e,c);return d(),Pn(),h});return s?o.unshift(a):o.push(a),a}}const qn=e=>(t,n=Gt)=>{(!Rs||e==="sp")&&oi(e,(...s)=>t(...s),n)},Qd=qn("bm"),fn=qn("m"),Zd=qn("bu"),_c=qn("u"),kc=qn("bum"),dr=qn("um"),ep=qn("sp"),tp=qn("rtg"),np=qn("rtc");function rp(e,t=Gt){oi("ec",e,t)}const sp=Symbol.for("v-ndc");function ut(e,t,n,s){let o;const a=n,c=Le(e);if(c||bt(e)){const d=c&&or(e);let h=!1,g=!1;d&&(h=!ln(e),g=Tn(e),e=ti(e)),o=new Array(e.length);for(let y=0,k=e.length;y<k;y++)o[y]=t(h?g?ir(un(e[y])):un(e[y]):e[y],y,void 0,a)}else if(typeof e=="number")if(!Number.isInteger(e)||e<0)o=[];else{o=new Array(e);for(let d=0;d<e;d++)o[d]=t(d+1,d,void 0,a)}else if(at(e))if(e[Symbol.iterator])o=Array.from(e,(d,h)=>t(d,h,void 0,a));else{const d=Object.keys(e);o=new Array(d.length);for(let h=0,g=d.length;h<g;h++){const y=d[h];o[h]=t(e[y],y,h,a)}}else o=[];return o}const ma=e=>e?Uc(e)?li(e):ma(e.parent):null,Cs=Et(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=>ma(e.parent),$root:e=>ma(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Cc(e),$forceUpdate:e=>e.f||(e.f=()=>{qa(e.update)}),$nextTick:e=>e.n||(e.n=ts.bind(e.proxy)),$watch:e=>Ud.bind(e)}),ea=(e,t)=>e!==ct&&!e.__isScriptSetup&&st(e,t),op={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:o,props:a,accessCache:c,type:d,appContext:h}=e;if(t[0]!=="$"){const j=c[t];if(j!==void 0)switch(j){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return a[t]}else{if(ea(s,t))return c[t]=1,s[t];if(o!==ct&&st(o,t))return c[t]=2,o[t];if(st(a,t))return c[t]=3,a[t];if(n!==ct&&st(n,t))return c[t]=4,n[t];ya&&(c[t]=0)}}const g=Cs[t];let y,k;if(g)return t==="$attrs"&&Kt(e.attrs,"get",""),g(e);if((y=d.__cssModules)&&(y=y[t]))return y;if(n!==ct&&st(n,t))return c[t]=4,n[t];if(k=h.config.globalProperties,st(k,t))return k[t]},set({_:e},t,n){const{data:s,setupState:o,ctx:a}=e;return ea(o,t)?(o[t]=n,!0):s!==ct&&st(s,t)?(s[t]=n,!0):st(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:o,props:a,type:c}},d){let h;return!!(n[d]||e!==ct&&d[0]!=="$"&&st(e,d)||ea(t,d)||st(a,d)||st(s,d)||st(Cs,d)||st(o.config.globalProperties,d)||(h=c.__cssModules)&&h[d])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:st(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Yl(e){return Le(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let ya=!0;function ip(e){const t=Cc(e),n=e.proxy,s=e.ctx;ya=!1,t.beforeCreate&&Jl(t.beforeCreate,e,"bc");const{data:o,computed:a,methods:c,watch:d,provide:h,inject:g,created:y,beforeMount:k,mounted:j,beforeUpdate:T,updated:L,activated:H,deactivated:fe,beforeDestroy:ee,beforeUnmount:E,destroyed:R,unmounted:Y,render:le,renderTracked:ie,renderTriggered:Z,errorCaptured:A,serverPrefetch:x,expose:oe,inheritAttrs:Ce,components:J,directives:Se,filters:Ve}=t;if(g&&ap(g,s,null),c)for(const We in c){const be=c[We];He(be)&&(s[We]=be.bind(n))}if(o){const We=o.call(n,n);at(We)&&(e.data=Va(We))}if(ya=!0,a)for(const We in a){const be=a[We],Ie=He(be)?be.bind(n,n):He(be.get)?be.get.bind(n,n):En,Ke=!He(be)&&He(be.set)?be.set.bind(n):En,de=it({get:Ie,set:Ke});Object.defineProperty(s,We,{enumerable:!0,configurable:!0,get:()=>de.value,set:X=>de.value=X})}if(d)for(const We in d)xc(d[We],s,n,We);if(h){const We=He(h)?h.call(n):h;Reflect.ownKeys(We).forEach(be=>{Nd(be,We[be])})}y&&Jl(y,e,"c");function Ne(We,be){Le(be)?be.forEach(Ie=>We(Ie.bind(n))):be&&We(be.bind(n))}if(Ne(Qd,k),Ne(fn,j),Ne(Zd,T),Ne(_c,L),Ne(Yd,H),Ne(Jd,fe),Ne(rp,A),Ne(np,ie),Ne(tp,Z),Ne(kc,E),Ne(dr,Y),Ne(ep,x),Le(oe))if(oe.length){const We=e.exposed||(e.exposed={});oe.forEach(be=>{Object.defineProperty(We,be,{get:()=>n[be],set:Ie=>n[be]=Ie,enumerable:!0})})}else e.exposed||(e.exposed={});le&&e.render===En&&(e.render=le),Ce!=null&&(e.inheritAttrs=Ce),J&&(e.components=J),Se&&(e.directives=Se),x&&bc(e)}function ap(e,t,n=En){Le(e)&&(e=ga(e));for(const s in e){const o=e[s];let a;at(o)?"default"in o?a=Eo(o.from||s,o.default,!0):a=Eo(o.from||s):a=Eo(o),Nt(a)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>a.value,set:c=>a.value=c}):t[s]=a}}function Jl(e,t,n){cn(Le(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function xc(e,t,n,s){let o=s.includes(".")?pc(n,s):()=>n[s];if(bt(e)){const a=t[e];He(a)&>(o,a)}else if(He(e))gt(o,e.bind(n));else if(at(e))if(Le(e))e.forEach(a=>xc(a,t,n,s));else{const a=He(e.handler)?e.handler.bind(n):t[e.handler];He(a)&>(o,a,e)}}function Cc(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:a,config:{optionMergeStrategies:c}}=e.appContext,d=a.get(t);let h;return d?h=d:!o.length&&!n&&!s?h=t:(h={},o.length&&o.forEach(g=>Ro(h,g,c,!0)),Ro(h,t,c)),at(t)&&a.set(t,h),h}function Ro(e,t,n,s=!1){const{mixins:o,extends:a}=t;a&&Ro(e,a,n,!0),o&&o.forEach(c=>Ro(e,c,n,!0));for(const c in t)if(!(s&&c==="expose")){const d=lp[c]||n&&n[c];e[c]=d?d(e[c],t[c]):t[c]}return e}const lp={data:Xl,props:Ql,emits:Ql,methods:ys,computed:ys,beforeCreate:Ht,created:Ht,beforeMount:Ht,mounted:Ht,beforeUpdate:Ht,updated:Ht,beforeDestroy:Ht,beforeUnmount:Ht,destroyed:Ht,unmounted:Ht,activated:Ht,deactivated:Ht,errorCaptured:Ht,serverPrefetch:Ht,components:ys,directives:ys,watch:cp,provide:Xl,inject:up};function Xl(e,t){return t?e?function(){return Et(He(e)?e.call(this,this):e,He(t)?t.call(this,this):t)}:t:e}function up(e,t){return ys(ga(e),ga(t))}function ga(e){if(Le(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Ht(e,t){return e?[...new Set([].concat(e,t))]:t}function ys(e,t){return e?Et(Object.create(null),e,t):t}function Ql(e,t){return e?Le(e)&&Le(t)?[...new Set([...e,...t])]:Et(Object.create(null),Yl(e),Yl(t??{})):t}function cp(e,t){if(!e)return t;if(!t)return e;const n=Et(Object.create(null),e);for(const s in t)n[s]=Ht(e[s],t[s]);return n}function Sc(){return{app:null,config:{isNativeTag:Du,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 fp=0;function dp(e,t){return function(s,o=null){He(s)||(s=Et({},s)),o!=null&&!at(o)&&(o=null);const a=Sc(),c=new WeakSet,d=[];let h=!1;const g=a.app={_uid:fp++,_component:s,_props:o,_container:null,_context:a,_instance:null,version:qp,get config(){return a.config},set config(y){},use(y,...k){return c.has(y)||(y&&He(y.install)?(c.add(y),y.install(g,...k)):He(y)&&(c.add(y),y(g,...k))),g},mixin(y){return a.mixins.includes(y)||a.mixins.push(y),g},component(y,k){return k?(a.components[y]=k,g):a.components[y]},directive(y,k){return k?(a.directives[y]=k,g):a.directives[y]},mount(y,k,j){if(!h){const T=g._ceVNode||Me(s,o);return T.appContext=a,j===!0?j="svg":j===!1&&(j=void 0),e(T,y,j),h=!0,g._container=y,y.__vue_app__=g,li(T.component)}},onUnmount(y){d.push(y)},unmount(){h&&(cn(d,g._instance,16),e(null,g._container),delete g._container.__vue_app__)},provide(y,k){return a.provides[y]=k,g},runWithContext(y){const k=zr;zr=g;try{return y()}finally{zr=k}}};return g}}let zr=null;const pp=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${hn(t)}Modifiers`]||e[`${cr(t)}Modifiers`];function hp(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||ct;let o=n;const a=t.startsWith("update:"),c=a&&pp(s,t.slice(7));c&&(c.trim&&(o=n.map(y=>bt(y)?y.trim():y)),c.number&&(o=o.map(Zo)));let d,h=s[d=zi(t)]||s[d=zi(hn(t))];!h&&a&&(h=s[d=zi(cr(t))]),h&&cn(h,e,6,o);const g=s[d+"Once"];if(g){if(!e.emitted)e.emitted={};else if(e.emitted[d])return;e.emitted[d]=!0,cn(g,e,6,o)}}const vp=new WeakMap;function Ec(e,t,n=!1){const s=n?vp:t.emitsCache,o=s.get(e);if(o!==void 0)return o;const a=e.emits;let c={},d=!1;if(!He(e)){const h=g=>{const y=Ec(g,t,!0);y&&(d=!0,Et(c,y))};!n&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}return!a&&!d?(at(e)&&s.set(e,null),null):(Le(a)?a.forEach(h=>c[h]=null):Et(c,a),at(e)&&s.set(e,c),c)}function ii(e,t){return!e||!Jo(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),st(e,t[0].toLowerCase()+t.slice(1))||st(e,cr(t))||st(e,t))}function Zl(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[a],slots:c,attrs:d,emit:h,render:g,renderCache:y,props:k,data:j,setupState:T,ctx:L,inheritAttrs:H}=e,fe=Io(e);let ee,E;try{if(n.shapeFlag&4){const Y=o||s,le=Y;ee=xn(g.call(le,Y,y,k,T,j,L)),E=d}else{const Y=t;ee=xn(Y.length>1?Y(k,{attrs:d,slots:c,emit:h}):Y(k,null)),E=t.props?d:mp(d)}}catch(Y){Tr.length=0,ni(Y,e,1),ee=Me(Ft)}let R=ee;if(E&&H!==!1){const Y=Object.keys(E),{shapeFlag:le}=R;Y.length&&le&7&&(a&&Y.some(Xo)&&(E=yp(E,a)),R=lr(R,E,!1,!0))}if(n.dirs&&(R=lr(R,null,!1,!0),R.dirs=R.dirs?R.dirs.concat(n.dirs):n.dirs),n.transition){const Y=ri(R.type)&&jo(R)||R;ar(Y,n.transition)}return ee=R,Io(fe),ee}function $c(e,t=!0){let n;for(let s=0;s<e.length;s++){const o=e[s];if(js(o)){if(o.type!==Ft||o.children==="v-if"){if(n)return;n=o}}else return}return n}const mp=e=>{let t;for(const n in e)(n==="class"||n==="style"||Jo(n))&&((t||(t={}))[n]=e[n]);return t},yp=(e,t)=>{const n={};for(const s in e)(!Xo(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function gp(e,t,n){const{props:s,children:o,component:a}=e,{props:c,children:d,patchFlag:h}=t,g=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&h>=0){if(h&1024)return!0;if(h&16)return s?eu(s,c,g):!!c;if(h&8){const y=t.dynamicProps;for(let k=0;k<y.length;k++){const j=y[k];if(Ac(c,s,j)&&!ii(g,j))return!0}}}else return(o||d)&&(!d||!d.$stable)?!0:s===c?!1:s?c?eu(s,c,g):!0:!!c;return!1}function eu(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let o=0;o<s.length;o++){const a=s[o];if(!st(e,a)||Ac(t,e,a)&&!ii(n,a))return!0}return!1}function Ac(e,t,n){const s=e[n],o=t[n];return n==="style"&&at(s)&&at(o)?!Un(s,o):s!==o}function bp({vnode:e,parent:t,suspense:n},s){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.suspense.vnode.el=o.el=s,e=o),o===e)(e=t.vnode).el=s,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=s)}const Pc={},Tc=()=>Object.create(Pc),Oc=e=>Object.getPrototypeOf(e)===Pc;function wp(e,t,n,s=!1){const o={},a=Tc();e.propsDefaults=Object.create(null),Mc(e,t,o,a);for(const c in e.propsOptions[0])c in o||(o[c]=void 0);n?e.props=s?o:$d(o):e.type.props?e.props=o:e.props=a,e.attrs=a}function _p(e,t,n,s){const{props:o,attrs:a,vnode:{patchFlag:c}}=e,d=rt(o),[h]=e.propsOptions;let g=!1;if((s||c>0)&&!(c&16)){if(c&8){const y=e.vnode.dynamicProps;for(let k=0;k<y.length;k++){let j=y[k];if(ii(e.emitsOptions,j))continue;const T=t[j];if(h)if(st(a,j))T!==a[j]&&(a[j]=T,g=!0);else{const L=hn(j);o[L]=ba(h,d,L,T,e,!1)}else T!==a[j]&&(a[j]=T,g=!0)}}}else{Mc(e,t,o,a)&&(g=!0);let y;for(const k in d)(!t||!st(t,k)&&((y=cr(k))===k||!st(t,y)))&&(h?n&&(n[k]!==void 0||n[y]!==void 0)&&(o[k]=ba(h,d,k,void 0,e,!0)):delete o[k]);if(a!==d)for(const k in a)(!t||!st(t,k))&&(delete a[k],g=!0)}g&&Rn(e.attrs,"set","")}function Mc(e,t,n,s){const[o,a]=e.propsOptions;let c=!1,d;if(t)for(let h in t){if(bs(h))continue;const g=t[h];let y;o&&st(o,y=hn(h))?!a||!a.includes(y)?n[y]=g:(d||(d={}))[y]=g:ii(e.emitsOptions,h)||(!(h in s)||g!==s[h])&&(s[h]=g,c=!0)}if(a){const h=rt(n),g=d||ct;for(let y=0;y<a.length;y++){const k=a[y];n[k]=ba(o,h,k,g[k],e,!st(g,k))}}return c}function ba(e,t,n,s,o,a){const c=e[n];if(c!=null){const d=st(c,"default");if(d&&s===void 0){const h=c.default;if(c.type!==Function&&!c.skipFactory&&He(h)){const{propsDefaults:g}=o;if(n in g)s=g[n];else{const y=Bs(o);s=g[n]=h.call(null,t),y()}}else s=h;o.ce&&o.ce._setProp(n,s)}c[0]&&(a&&!d?s=!1:c[1]&&(s===""||s===cr(n))&&(s=!0))}return s}const kp=new WeakMap;function Ic(e,t,n=!1){const s=n?kp:t.propsCache,o=s.get(e);if(o)return o;const a=e.props,c={},d=[];let h=!1;if(!He(e)){const y=k=>{h=!0;const[j,T]=Ic(k,t,!0);Et(c,j),T&&d.push(...T)};!n&&t.mixins.length&&t.mixins.forEach(y),e.extends&&y(e.extends),e.mixins&&e.mixins.forEach(y)}if(!a&&!h)return at(e)&&s.set(e,Ar),Ar;if(Le(a))for(let y=0;y<a.length;y++){const k=hn(a[y]);tu(k)&&(c[k]=ct)}else if(a)for(const y in a){const k=hn(y);if(tu(k)){const j=a[y],T=c[k]=Le(j)||He(j)?{type:j}:Et({},j),L=T.type;let H=!1,fe=!0;if(Le(L))for(let ee=0;ee<L.length;++ee){const E=L[ee],R=He(E)&&E.name;if(R==="Boolean"){H=!0;break}else R==="String"&&(fe=!1)}else H=He(L)&&L.name==="Boolean";T[0]=H,T[1]=fe,(H||st(T,"default"))&&d.push(k)}}const g=[c,d];return at(e)&&s.set(e,g),g}function tu(e){return e[0]!=="$"&&!bs(e)}const Wa=e=>e==="_"||e==="_ctx"||e==="$stable",za=e=>Le(e)?e.map(xn):[xn(e)],xp=(e,t,n)=>{if(t._n)return t;const s=fr((...o)=>za(t(...o)),n);return s._c=!1,s},jc=(e,t,n)=>{const s=e._ctx;for(const o in e){if(Wa(o))continue;const a=e[o];if(He(a))t[o]=xp(o,a,s);else if(a!=null){const c=za(a);t[o]=()=>c}}},Dc=(e,t)=>{const n=za(t);e.slots.default=()=>n},Rc=(e,t,n)=>{for(const s in t)(n||!Wa(s))&&(e[s]=t[s])},Cp=(e,t,n)=>{const s=e.slots=Tc();if(e.vnode.shapeFlag&32){const o=t._;o?(Rc(s,t,n),n&&Nu(s,"_",o,!0)):jc(t,s)}else t&&Dc(e,t)},Sp=(e,t,n)=>{const{vnode:s,slots:o}=e;let a=!0,c=ct;if(s.shapeFlag&32){const d=t._;d?n&&d===1?a=!1:Rc(o,t,n):(a=!t.$stable,jc(t,o)),c=t}else t&&(Dc(e,t),c={default:1});if(a)for(const d in o)!Wa(d)&&c[d]==null&&delete o[d]},Wt=Tp;function Ep(e){return $p(e)}function $p(e,t){const n=ei();n.__VUE__=!0;const{insert:s,remove:o,patchProp:a,createElement:c,createText:d,createComment:h,setText:g,setElementText:y,parentNode:k,nextSibling:j,setScopeId:T=En,insertStaticContent:L}=e,H=(m,_,W,ce=null,se=null,ae=null,ue=void 0,ye=null,ke=!!_.dynamicChildren)=>{if(m===_)return;m&&!$r(m,_)&&(ce=ht(m),X(m,se,ae,!0),m=null),_.patchFlag===-2&&(ke=!1,_.dynamicChildren=null),_.dynamicChildren&&m&&m.dynamicChildren&&m.dynamicChildren.hasOnce&&(_.dynamicChildren===Ar&&(_.dynamicChildren=[]),_.dynamicChildren.hasOnce=!0);const{type:q,ref:B,shapeFlag:G}=_;switch(q){case ai:fe(m,_,W,ce);break;case Ft:ee(m,_,W,ce);break;case $o:m==null&&E(_,W,ce,ue);break;case Re:J(m,_,W,ce,se,ae,ue,ye,ke);break;default:G&1?le(m,_,W,ce,se,ae,ue,ye,ke):G&6?Se(m,_,W,ce,se,ae,ue,ye,ke):(G&64||G&128)&&q.process(m,_,W,ce,se,ae,ue,ye,ke,Bt)}B!=null&&se?ks(B,m&&m.ref,ae,_||m,!_):B==null&&m&&m.ref!=null&&ks(m.ref,null,ae,m,!0)},fe=(m,_,W,ce)=>{if(m==null)s(_.el=d(_.children),W,ce);else{const se=_.el=m.el;_.children!==m.children&&g(se,_.children)}},ee=(m,_,W,ce)=>{m==null?s(_.el=h(_.children||""),W,ce):_.el=m.el},E=(m,_,W,ce)=>{[m.el,m.anchor]=L(m.children,_,W,ce,m.el,m.anchor)},R=({el:m,anchor:_},W,ce)=>{let se;for(;m&&m!==_;)se=j(m),s(m,W,ce),m=se;s(_,W,ce)},Y=({el:m,anchor:_})=>{let W;for(;m&&m!==_;)W=j(m),o(m),m=W;o(_)},le=(m,_,W,ce,se,ae,ue,ye,ke)=>{if(_.type==="svg"?ue="svg":_.type==="math"&&(ue="mathml"),m==null)ie(_,W,ce,se,ae,ue,ye,ke);else{const q=m.el&&m.el._isVueCE?m.el:null;try{q&&q._beginPatch(),x(m,_,se,ae,ue,ye,ke)}finally{q&&q._endPatch()}}},ie=(m,_,W,ce,se,ae,ue,ye)=>{let ke,q;const{props:B,shapeFlag:G,transition:Pe,dirs:Fe}=m;if(ke=m.el=c(m.type,ae,B&&B.is,B),G&8?y(ke,m.children):G&16&&A(m.children,ke,null,ce,se,ta(m,ae),ue,ye),Fe&&_r(m,null,ce,"created"),Z(ke,m,m.scopeId,ue,ce),B){for(const Ye in B)Ye!=="value"&&!bs(Ye)&&a(ke,Ye,null,B[Ye],ae,ce);"value"in B&&a(ke,"value",null,B.value,ae),(q=B.onVnodeBeforeMount)&&gn(q,ce,m)}Fe&&_r(m,null,ce,"beforeMount");const Je=Ap(se,Pe);Je&&Pe.beforeEnter(ke),s(ke,_,W),((q=B&&B.onVnodeMounted)||Je||Fe)&&Wt(()=>{try{q&&gn(q,ce,m),Je&&Pe.enter(ke),Fe&&_r(m,null,ce,"mounted")}finally{}},se)},Z=(m,_,W,ce,se)=>{if(W&&T(m,W),ce)for(let ae=0;ae<ce.length;ae++)T(m,ce[ae]);if(se){let ae=se.subTree;if(_===ae||Kc(ae.type)&&(ae.ssContent===_||ae.ssFallback===_)){const ue=se.vnode;Z(m,ue,ue.scopeId,ue.slotScopeIds,se.parent)}}},A=(m,_,W,ce,se,ae,ue,ye,ke=0)=>{for(let q=ke;q<m.length;q++){const B=m[q]=ye?Dn(m[q]):xn(m[q]);H(null,B,_,W,ce,se,ae,ue,ye)}},x=(m,_,W,ce,se,ae,ue)=>{const ye=_.el=m.el;let{patchFlag:ke,dynamicChildren:q,dirs:B}=_;ke|=m.patchFlag&16;const G=m.props||ct,Pe=_.props||ct;let Fe;if(W&&kr(W,!1),(Fe=Pe.onVnodeBeforeUpdate)&&gn(Fe,W,_,m),B&&_r(_,m,W,"beforeUpdate"),W&&kr(W,!0),q&&(!m.dynamicChildren||m.dynamicChildren.length!==q.length)&&(ke=0,ue=!1,q=null),(G.innerHTML&&Pe.innerHTML==null||G.textContent&&Pe.textContent==null)&&y(ye,""),q?oe(m.dynamicChildren,q,ye,W,ce,ta(_,se),ae):ue||be(m,_,ye,null,W,ce,ta(_,se),ae,!1),ke>0){if(ke&16)Ce(ye,G,Pe,W,se);else if(ke&2&&G.class!==Pe.class&&a(ye,"class",null,Pe.class,se),ke&4&&a(ye,"style",G.style,Pe.style,se),ke&8){const Je=_.dynamicProps;for(let Ye=0;Ye<Je.length;Ye++){const Qe=Je[Ye],vt=G[Qe],_t=Pe[Qe];(_t!==vt||Qe==="value")&&a(ye,Qe,vt,_t,se,W)}}ke&1&&m.children!==_.children&&y(ye,_.children)}else!ue&&q==null&&Ce(ye,G,Pe,W,se);((Fe=Pe.onVnodeUpdated)||B)&&Wt(()=>{Fe&&gn(Fe,W,_,m),B&&_r(_,m,W,"updated")},ce)},oe=(m,_,W,ce,se,ae,ue)=>{for(let ye=0;ye<_.length;ye++){const ke=m[ye],q=_[ye],B=ke.el||wa(ke),G=B&&(ke.type===Re||!$r(ke,q)||ke.shapeFlag&198)?k(B):W;H(ke,q,G,null,ce,se,ae,ue,!0)}},Ce=(m,_,W,ce,se)=>{if(_!==W){if(_!==ct)for(const ae in _)!bs(ae)&&!(ae in W)&&a(m,ae,_[ae],null,se,ce);for(const ae in W){if(bs(ae))continue;const ue=W[ae],ye=_[ae];ue!==ye&&ae!=="value"&&a(m,ae,ye,ue,se,ce)}"value"in W&&a(m,"value",_.value,W.value,se)}},J=(m,_,W,ce,se,ae,ue,ye,ke)=>{const q=_.el=m?m.el:d(""),B=_.anchor=m?m.anchor:d("");let{patchFlag:G,dynamicChildren:Pe,slotScopeIds:Fe}=_;Fe&&(ye=ye?ye.concat(Fe):Fe),m==null?(s(q,W,ce),s(B,W,ce),A(_.children||[],W,B,se,ae,ue,ye,ke)):G>0&&G&64&&Pe&&m.dynamicChildren&&m.dynamicChildren.length===Pe.length?(oe(m.dynamicChildren,Pe,W,se,ae,ue,ye),(_.key!=null||se&&_===se.subTree)&&Ga(m,_,!0)):be(m,_,W,B,se,ae,ue,ye,ke)},Se=(m,_,W,ce,se,ae,ue,ye,ke)=>{_.slotScopeIds=ye,m==null?_.shapeFlag&512?se.ctx.activate(_,W,ce,ue,ke):Ve(_,W,ce,se,ae,ue,ke):Xe(m,_,ke)},Ve=(m,_,W,ce,se,ae,ue)=>{const ye=m.component=Lp(m,ce,se);if(si(m)&&(ye.ctx.renderer=Bt),Kp(ye,!1,ue),ye.asyncDep){if(se&&se.registerDep(ye,Ne,ue,ae),!m.el){const ke=ye.subTree=Me(Ft);ee(null,ke,_,W),m.placeholder=ke.el}}else Ne(ye,m,_,W,se,ae,ue)},Xe=(m,_,W)=>{const ce=_.component=m.component;if(gp(m,_,W))if(ce.asyncDep&&!ce.asyncResolved){_.el=m.el,_.placeholder=m.placeholder,We(ce,_,W);return}else ce.next=_,ce.update();else _.el=m.el,_.placeholder=m.placeholder,ce.vnode=_},Ne=(m,_,W,ce,se,ae,ue)=>{const ye=()=>{if(m.isMounted){let{next:G,bu:Pe,u:Fe,parent:Je,vnode:Ye}=m;{const Ut=Lc(m);if(Ut){G&&(G.el=Ye.el,We(m,G,ue)),Ut.asyncDep.then(()=>{Wt(()=>{m.isUnmounted||q()},se)});return}}let Qe=G,vt;kr(m,!1),G?(G.el=Ye.el,We(m,G,ue)):G=Ye,Pe&&So(Pe),(vt=G.props&&G.props.onVnodeBeforeUpdate)&&gn(vt,Je,G,Ye),kr(m,!0);const _t=Zl(m),Xt=m.subTree;m.subTree=_t,H(Xt,_t,k(Xt.el),ht(Xt),m,se,ae),G.el=_t.el,Qe===null&&bp(m,_t.el),Fe&&Wt(Fe,se),(vt=G.props&&G.props.onVnodeUpdated)&&Wt(()=>gn(vt,Je,G,Ye),se)}else{let G;const{el:Pe,props:Fe}=_,{bm:Je,m:Ye,parent:Qe,root:vt,type:_t}=m,Xt=xs(_);kr(m,!1),Je&&So(Je),!Xt&&(G=Fe&&Fe.onVnodeBeforeMount)&&gn(G,Qe,_),kr(m,!0);{vt.ce&&vt.ce._hasShadowRoot()&&vt.ce._injectChildStyle(_t,m.parent?m.parent.type:void 0);const Ut=m.subTree=Zl(m);H(null,Ut,W,ce,m,se,ae),_.el=Ut.el}if(Ye&&Wt(Ye,se),!Xt&&(G=Fe&&Fe.onVnodeMounted)){const Ut=_;Wt(()=>gn(G,Qe,Ut),se)}(_.shapeFlag&256||Qe&&xs(Qe.vnode)&&Qe.vnode.shapeFlag&256)&&m.a&&Wt(m.a,se),m.isMounted=!0,_=W=ce=null}};m.scope.on();const ke=m.effect=new qu(ye);m.scope.off();const q=m.update=ke.run.bind(ke),B=m.job=ke.runIfDirty.bind(ke);B.i=m,B.id=m.uid,ke.scheduler=()=>qa(B),kr(m,!0),q()},We=(m,_,W)=>{_.component=m;const ce=m.vnode.props;m.vnode=_,m.next=null,_p(m,_.props,ce,W),Sp(m,_.children,W),An(),lc(m),Pn()},be=(m,_,W,ce,se,ae,ue,ye,ke=!1)=>{const q=m&&m.children,B=m?m.shapeFlag:0,G=_.children,{patchFlag:Pe,shapeFlag:Fe}=_;if(Pe>0){if(Pe&128){Ke(q,G,W,ce,se,ae,ue,ye,ke);return}else if(Pe&256){Ie(q,G,W,ce,se,ae,ue,ye,ke);return}}Fe&8?(B&16&&pt(q,se,ae),G!==q&&y(W,G)):B&16?Fe&16?Ke(q,G,W,ce,se,ae,ue,ye,ke):pt(q,se,ae,!0):(B&8&&y(W,""),Fe&16&&A(G,W,ce,se,ae,ue,ye,ke))},Ie=(m,_,W,ce,se,ae,ue,ye,ke)=>{m=m||Ar,_=_||Ar;const q=m.length,B=_.length,G=Math.min(q,B);let Pe;for(Pe=0;Pe<G;Pe++){const Fe=_[Pe]=ke?Dn(_[Pe]):xn(_[Pe]);H(m[Pe],Fe,W,null,se,ae,ue,ye,ke)}q>B?pt(m,se,ae,!0,!1,G):A(_,W,ce,se,ae,ue,ye,ke,G)},Ke=(m,_,W,ce,se,ae,ue,ye,ke)=>{let q=0;const B=_.length;let G=m.length-1,Pe=B-1;for(;q<=G&&q<=Pe;){const Fe=m[q],Je=_[q]=ke?Dn(_[q]):xn(_[q]);if($r(Fe,Je))H(Fe,Je,W,null,se,ae,ue,ye,ke);else break;q++}for(;q<=G&&q<=Pe;){const Fe=m[G],Je=_[Pe]=ke?Dn(_[Pe]):xn(_[Pe]);if($r(Fe,Je))H(Fe,Je,W,null,se,ae,ue,ye,ke);else break;G--,Pe--}if(q>G){if(q<=Pe){const Fe=Pe+1,Je=Fe<B?_[Fe].el:ce;for(;q<=Pe;)H(null,_[q]=ke?Dn(_[q]):xn(_[q]),W,Je,se,ae,ue,ye,ke),q++}}else if(q>Pe)for(;q<=G;)X(m[q],se,ae,!0),q++;else{const Fe=q,Je=q,Ye=new Map;for(q=Je;q<=Pe;q++){const Ot=_[q]=ke?Dn(_[q]):xn(_[q]);Ot.key!=null&&Ye.set(Ot.key,q)}let Qe,vt=0;const _t=Pe-Je+1;let Xt=!1,Ut=0;const Qt=new Array(_t);for(q=0;q<_t;q++)Qt[q]=0;for(q=Fe;q<=G;q++){const Ot=m[q];if(vt>=_t){X(Ot,se,ae,!0);continue}let $t;if(Ot.key!=null)$t=Ye.get(Ot.key);else for(Qe=Je;Qe<=Pe;Qe++)if(Qt[Qe-Je]===0&&$r(Ot,_[Qe])){$t=Qe;break}$t===void 0?X(Ot,se,ae,!0):(Qt[$t-Je]=q+1,$t>=Ut?Ut=$t:Xt=!0,H(Ot,_[$t],W,null,se,ae,ue,ye,ke),vt++)}const pr=Xt?Pp(Qt):Ar;for(Qe=pr.length-1,q=_t-1;q>=0;q--){const Ot=Je+q,$t=_[Ot],je=_[Ot+1],Hn=Ot+1<B?je.el||wa(je):ce;Qt[q]===0?H(null,$t,W,Hn,se,ae,ue,ye,ke):Xt&&(Qe<0||q!==pr[Qe]?de($t,W,Hn,2):Qe--)}}},de=(m,_,W,ce,se=null)=>{const{el:ae,type:ue,transition:ye,children:ke,shapeFlag:q}=m;if(q&6){de(m.component.subTree,_,W,ce);return}if(q&128){m.suspense.move(_,W,ce);return}if(q&64){ue.move(m,_,W,Bt);return}if(ue===Re){s(ae,_,W);for(let G=0;G<ke.length;G++)de(ke[G],_,W,ce);s(m.anchor,_,W);return}if(ue===$o){R(m,_,W);return}if(ce!==2&&q&1&&ye)if(ce===0)ye.persisted&&!ae[on]?s(ae,_,W):(ye.beforeEnter(ae),s(ae,_,W),Wt(()=>ye.enter(ae),se));else{const{leave:G,delayLeave:Pe,afterLeave:Fe}=ye,Je=()=>{m.ctx.isUnmounted?o(ae):s(ae,_,W)},Ye=()=>{const Qe=ae._isLeaving||!!ae[on];ae._isLeaving&&ae[on](!0),ye.persisted&&!Qe?Je():G(ae,()=>{Je(),Fe&&Fe()})};Pe?Pe(ae,Je,Ye):Ye()}else s(ae,_,W)},X=(m,_,W,ce=!1,se=!1)=>{const{type:ae,props:ue,ref:ye,children:ke,dynamicChildren:q,shapeFlag:B,patchFlag:G,dirs:Pe,cacheIndex:Fe,memo:Je}=m;if((G===-2||q&&q.hasOnce)&&(se=!1),ye!=null&&(An(),ks(ye,null,W,m,!0),Pn()),Fe!=null&&(!m.ctx||m.ctx===_)&&(_.renderCache[Fe]=void 0),B&256){_.ctx.deactivate(m);return}const Ye=B&1&&Pe,Qe=!xs(m);let vt;if(Qe&&(vt=ue&&ue.onVnodeBeforeUnmount)&&gn(vt,_,m),B&6)ot(m.component,W,ce);else{if(B&128){m.suspense.unmount(W,ce);return}Ye&&_r(m,null,_,"beforeUnmount"),B&64?m.type.remove(m,_,W,Bt,ce):q&&!q.hasOnce&&(ae!==Re||G>0&&G&64)?pt(q,_,W,!1,!0):(ae===Re&&G&384||!se&&B&16)&&pt(ke,_,W),ce&&Q(m)}const _t=Je!=null&&Fe==null;(Qe&&(vt=ue&&ue.onVnodeUnmounted)||Ye||_t)&&Wt(()=>{vt&&gn(vt,_,m),Ye&&_r(m,null,_,"unmounted"),_t&&(m.el=null)},W)},Q=m=>{const{type:_,el:W,anchor:ce,transition:se}=m,ae=_===Re;if(ae&&!se){xe(W,ce);return}if(_===$o){Y(m),se&&!se.persisted&&se.afterLeave&&se.afterLeave();return}const ue=ae?Ms(m):m,ye=()=>{ae?k(W)&&xe(W,ce):o(W),se&&!se.persisted&&se.afterLeave&&se.afterLeave()};if(ue&&ue.shapeFlag&1&&se&&!se.persisted){const{leave:ke,delayLeave:q}=se,B=ue.el,G=()=>ke(B,ye);q?q(B,ye,G):G()}else ye()},xe=(m,_)=>{let W;for(;m!==_;)W=j(m),o(m),m=W;o(_)},ot=(m,_,W)=>{const{bum:ce,scope:se,job:ae,subTree:ue,um:ye,m:ke,a:q}=m;nu(ke),nu(q),ce&&So(ce),se.stop(),ae?(ae.flags|=8,X(ue,m,_,W)):m.vnode.el&&ue&&(ue.transition=m.vnode.transition,X(ue,m,_,W)),ye&&Wt(ye,_),Wt(()=>{m.isUnmounted=!0},_)},pt=(m,_,W,ce=!1,se=!1,ae=0)=>{for(let ue=ae;ue<m.length;ue++)X(m[ue],_,W,ce,se)},ht=m=>{if(m.shapeFlag&6)return ht(m.component.subTree);if(m.shapeFlag&128)return m.suspense.next();const _=j(m.anchor||m.el),W=_&&_[hc];return W?j(W):_},Jt=(m,_,W)=>{const ce=m&&_._vnode?void 0:m&&m.component?m.component.uid:Rp();Fd(()=>{m==null?_._vnode&&X(_._vnode,null,null,!0):H(_._vnode||null,m,_,null,null,null,W),_._vnode=m},ce)},Bt={p:H,um:X,m:de,r:Q,mt:Ve,mc:A,pc:be,pbc:oe,n:ht,o:e};return{render:Jt,hydrate:void 0,createApp:dp(Jt)}}function ta({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function kr({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Ap(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ga(e,t,n=!1){const s=e.children,o=t.children;if(Le(s)&&Le(o))for(let a=0;a<s.length;a++){const c=s[a];let d=o[a];d.shapeFlag&1&&!d.dynamicChildren&&((d.patchFlag<=0||d.patchFlag===32)&&(d=o[a]=Dn(o[a]),d.el=c.el),!n&&d.patchFlag!==-2&&Ga(c,d)),d.type===ai&&(d.patchFlag===-1&&(d=o[a]=Dn(d)),d.el=c.el),d.type===Ft&&!d.el&&(d.el=c.el)}}function Pp(e){const t=e.slice(),n=[0];let s,o,a,c,d;const h=e.length;for(s=0;s<h;s++){const g=e[s];if(g!==0){if(o=n[n.length-1],e[o]<g){t[s]=o,n.push(s);continue}for(a=0,c=n.length-1;a<c;)d=a+c>>1,e[n[d]]<g?a=d+1:c=d;g<e[n[a]]&&(a>0&&(t[s]=n[a-1]),n[a]=s)}}for(a=n.length,c=n[a-1];a-- >0;)n[a]=c,c=t[c];return n}function Lc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Lc(t)}function nu(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function wa(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?wa(t.subTree):null}const Kc=e=>e.__isSuspense;function Tp(e,t){t&&t.pendingBranch?Le(e)?t.effects.push(...e):t.effects.push(e):Kd(e)}const Re=Symbol.for("v-fgt"),ai=Symbol.for("v-txt"),Ft=Symbol.for("v-cmt"),$o=Symbol.for("v-stc"),Tr=[];let rn=null;function K(e=!1){Tr.push(rn=e?null:[])}function Fc(){Tr.pop(),rn=Tr[Tr.length-1]||null}let Is=1;function Lo(e,t=!1){Is+=e,e<0&&rn&&t&&(rn.hasOnce=!0)}function Nc(e){return e.dynamicChildren=Is>0?rn||Ar:null,Fc(),Is>0&&rn&&rn.push(e),e}function U(e,t,n,s,o,a){return Nc(u(e,t,n,s,o,a,!0))}function It(e,t,n,s,o){return Nc(Me(e,t,n,s,o,!0))}function js(e){return e?e.__v_isVNode===!0:!1}function $r(e,t){return e.type===t.type&&e.key===t.key}const Vc=({key:e})=>e??null,Ao=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?bt(e)||Nt(e)||He(e)?{i:an,r:e,k:t,f:!!n}:e:null);function u(e,t=null,n=null,s=0,o=null,a=e===Re?0:1,c=!1,d=!1){const h={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Vc(t),ref:t&&Ao(t),scopeId:fc,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:s,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:an};return d?(Ko(h,n),a&128&&e.normalize(h)):n&&(h.shapeFlag|=bt(n)?8:16),Is>0&&!c&&rn&&(h.patchFlag>0||a&6)&&h.patchFlag!==32&&rn.push(h),h}const Me=Op;function Op(e,t=null,n=null,s=0,o=null,a=!1){if((!e||e===sp)&&(e=Ft),js(e)){const d=lr(e,t,!0);return n&&Ko(d,n),Is>0&&!a&&rn&&(d.shapeFlag&6?rn[rn.indexOf(e)]=d:rn.push(d)),d.patchFlag=-2,d}if(Bp(e)&&(e=e.__vccOpts),t){t=Mp(t);let{class:d,style:h}=t;d&&!bt(d)&&(t.class=et(d)),at(h)&&(Ua(h)&&!Le(h)&&(h=Et({},h)),t.style=sr(h))}const c=bt(e)?1:Kc(e)?128:ri(e)?64:at(e)?4:He(e)?2:0;return u(e,t,n,s,o,c,a,!0)}function Mp(e){return e?Ua(e)||Oc(e)?Et({},e):e:null}function lr(e,t,n=!1,s=!1){const{props:o,ref:a,patchFlag:c,children:d,transition:h}=e,g=t?jp(o||{},t):o,y={__v_isVNode:!0,__v_skip:!0,type:e.type,props:g,key:g&&Vc(g),ref:t&&t.ref?n&&a?Le(a)?a.concat(Ao(t)):[a,Ao(t)]:Ao(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:d,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Re?c===-1?16:c|16:c,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:h,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&lr(e.ssContent),ssFallback:e.ssFallback&&lr(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return h&&s&&ar(y,h.clone(y)),y}function tn(e=" ",t=0){return Me(ai,null,e,t)}function Ip(e,t){const n=Me($o,null,e);return n.staticCount=t,n}function $e(e="",t=!1){return t?(K(),It(Ft,null,e)):Me(Ft,null,e)}function xn(e){return e==null||typeof e=="boolean"?Me(Ft):Le(e)?Me(Re,null,e.slice()):js(e)?Dn(e):Me(ai,null,String(e))}function Dn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:lr(e)}function Ko(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(Le(t))n=16;else if(typeof t=="object")if(s&65){const o=t.default;o&&(o._c&&(o._d=!1),Ko(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!Oc(t)?t._ctx=an:o===3&&an&&(an.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(He(t)){if(s&65){Ko(e,{default:t});return}t={default:t,_ctx:an},n=32}else t=String(t),s&64?(n=16,t=[tn(t)]):n=8;e.children=t,e.shapeFlag|=n}function jp(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const o in s)if(o==="class")t.class!==s.class&&(t.class=et([t.class,s.class]));else if(o==="style")t.style=sr([t.style,s.style]);else if(Jo(o)){const a=t[o],c=s[o];c&&a!==c&&!(Le(a)&&a.includes(c))?t[o]=a?[].concat(a,c):c:c==null&&a==null&&!Xo(o)&&(t[o]=c)}else o!==""&&(t[o]=s[o])}return t}function gn(e,t,n,s=null){cn(e,t,7,[n,s])}const Dp=Sc();let Bc=0;function Rp(){return Bc}function Lp(e,t,n){const s=e.type,o=(t?t.appContext:e.appContext)||Dp,a={uid:Bc++,vnode:e,type:s,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new ud(!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:Ic(s,o),emitsOptions:Ec(s,o),emit:null,emitted:null,propsDefaults:ct,inheritAttrs:s.inheritAttrs,ctx:ct,data:ct,props:ct,attrs:ct,slots:ct,refs:ct,setupState:ct,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return a.ctx={_:a},a.root=t?t.root:a,a.emit=hp.bind(null,a),e.ce&&e.ce(a),a}let Gt=null;const Ya=()=>Gt||an;let Fo,Ds;{const e=ei(),t=(n,s)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(s),a=>{o.length>1?o.forEach(c=>c(a)):o[0](a)}};Fo=t("__VUE_INSTANCE_SETTERS__",n=>Gt=n),Ds=t("__VUE_SSR_SETTERS__",n=>Rs=n)}const Bs=e=>{const t=Gt;return Fo(e),e.scope.on(),()=>{e.scope.off(),Fo(t)}},ru=()=>{Gt&&Gt.scope.off(),Fo(null)};function Uc(e){return e.vnode.shapeFlag&4}let Rs=!1;function Kp(e,t=!1,n=!1){t&&Ds(t);const{props:s,children:o}=e.vnode,a=Uc(e);wp(e,s,a,t),Cp(e,o,n||t);const c=a?Fp(e,t):void 0;return t&&Ds(!1),c}function Fp(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,op);const{setup:s}=n;if(s){An();const o=e.setupContext=s.length>1?Vp(e):null,a=Bs(e),c=Ns(s,e,0,[e.props,o]),d=Ru(c);if(Pn(),a(),(d||e.sp)&&!xs(e)&&bc(e),d){if(c.then(ru,ru),t)return c.then(h=>{Ds(!0);try{su(e,h,t)}finally{Ds(!1)}}).catch(h=>{ni(h,e,0)});e.asyncDep=c}else su(e,c)}else qc(e)}function su(e,t,n){He(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:at(t)&&(e.setupState=oc(t)),qc(e)}function qc(e,t,n){const s=e.type;e.render||(e.render=s.render||En);{const o=Bs(e);An();try{ip(e)}finally{Pn(),o()}}}const Np={get(e,t){return Kt(e,"get",""),e[t]}};function Vp(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Np),slots:e.slots,emit:e.emit,expose:t}}function li(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(oc(Ad(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Cs)return Cs[n](e)},has(t,n){return n in t||n in Cs}})):e.proxy}function Bp(e){return He(e)&&"__vccOpts"in e}const it=(e,t)=>Id(e,t,Rs);function Up(e,t,n){try{Lo(-1);const s=arguments.length;return s===2?at(t)&&!Le(t)?js(t)?Me(e,null,[t]):Me(e,t):Me(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&js(n)&&(n=[n]),Me(e,t,n))}finally{Lo(1)}}const qp="3.5.44";/**
|
||
* @vue/runtime-dom v3.5.44
|
||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||
* @license MIT
|
||
**/let _a;const ou=typeof window<"u"&&window.trustedTypes;if(ou)try{_a=ou.createPolicy("vue",{createHTML:e=>e})}catch{}const Hc=_a?e=>_a.createHTML(e):e=>e,Hp="http://www.w3.org/2000/svg",Wp="http://www.w3.org/1998/Math/MathML",jn=typeof document<"u"?document:null,iu=jn&&jn.createElement("template"),zp={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const o=t==="svg"?jn.createElementNS(Hp,e):t==="mathml"?jn.createElementNS(Wp,e):n?jn.createElement(e,{is:n}):jn.createElement(e);return e==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:e=>jn.createTextNode(e),createComment:e=>jn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>jn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,o,a){const c=n?n.previousSibling:t.lastChild;if(o&&(o===a||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===a||!(o=o.nextSibling)););else{iu.innerHTML=Hc(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const d=iu.content;if(s==="svg"||s==="mathml"){const h=d.firstChild;for(;h.firstChild;)d.appendChild(h.firstChild);d.removeChild(h)}t.insertBefore(d,n)}return[c?c.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Qn="transition",vs="animation",Jr=Symbol("_vtc"),Wc={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},zc=Et({},mc,Wc),Gp=e=>(e.displayName="Transition",e.props=zc,e),ns=Gp((e,{slots:t})=>Up(Gd,Gc(e),t)),xr=(e,t=[])=>{Le(e)?e.forEach(n=>n(...t)):e&&e(...t)},au=e=>e?Le(e)?e.some(t=>t.length>1):e.length>1:!1;function Gc(e){const t={};for(const J in e)J in Wc||(t[J]=e[J]);if(e.css===!1)return t;const{name:n="v",type:s,duration:o,enterFromClass:a=`${n}-enter-from`,enterActiveClass:c=`${n}-enter-active`,enterToClass:d=`${n}-enter-to`,appearFromClass:h=a,appearActiveClass:g=c,appearToClass:y=d,leaveFromClass:k=`${n}-leave-from`,leaveActiveClass:j=`${n}-leave-active`,leaveToClass:T=`${n}-leave-to`}=e,L=Yp(o),H=L&&L[0],fe=L&&L[1],{onBeforeEnter:ee,onEnter:E,onEnterCancelled:R,onLeave:Y,onLeaveCancelled:le,onBeforeAppear:ie=ee,onAppear:Z=E,onAppearCancelled:A=R}=t,x=(J,Se,Ve,Xe)=>{J._enterCancelled=Xe,er(J,Se?y:d),er(J,Se?g:c),Ve&&Ve()},oe=(J,Se)=>{J._isLeaving=!1,er(J,k),er(J,T),er(J,j),Se&&Se()},Ce=J=>(Se,Ve)=>{const Xe=J?Z:E,Ne=()=>x(Se,J,Ve);xr(Xe,[Se,Ne]),lu(()=>{er(Se,J?h:a),bn(Se,J?y:d),au(Xe)||uu(Se,s,H,Ne)})};return Et(t,{onBeforeEnter(J){xr(ee,[J]),bn(J,a),bn(J,c)},onBeforeAppear(J){xr(ie,[J]),bn(J,h),bn(J,g)},onEnter:Ce(!1),onAppear:Ce(!0),onLeave(J,Se){J._isLeaving=!0;const Ve=()=>oe(J,Se);bn(J,k),J._enterCancelled?(bn(J,j),ka(J)):(ka(J),bn(J,j)),lu(()=>{J._isLeaving&&(er(J,k),bn(J,T),au(Y)||uu(J,s,fe,Ve))}),xr(Y,[J,Ve])},onEnterCancelled(J){x(J,!1,void 0,!0),xr(R,[J])},onAppearCancelled(J){x(J,!0,void 0,!0),xr(A,[J])},onLeaveCancelled(J){oe(J),xr(le,[J])}})}function Yp(e){if(e==null)return null;if(at(e))return[na(e.enter),na(e.leave)];{const t=na(e);return[t,t]}}function na(e){return ed(e)}function bn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Jr]||(e[Jr]=new Set)).add(t)}function er(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[Jr];n&&(n.delete(t),n.size||(e[Jr]=void 0))}function lu(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Jp=0;function uu(e,t,n,s){const o=e._endId=++Jp,a=()=>{o===e._endId&&s()};if(n!=null)return setTimeout(a,n);const{type:c,timeout:d,propCount:h}=Yc(e,t);if(!c)return s();const g=c+"end";let y=0;const k=()=>{e.removeEventListener(g,j),a()},j=T=>{T.target===e&&++y>=h&&k()};setTimeout(()=>{y<h&&k()},d+1),e.addEventListener(g,j)}function Yc(e,t){const n=window.getComputedStyle(e),s=L=>(n[L]||"").split(", "),o=s(`${Qn}Delay`),a=s(`${Qn}Duration`),c=cu(o,a),d=s(`${vs}Delay`),h=s(`${vs}Duration`),g=cu(d,h);let y=null,k=0,j=0;t===Qn?c>0&&(y=Qn,k=c,j=a.length):t===vs?g>0&&(y=vs,k=g,j=h.length):(k=Math.max(c,g),y=k>0?c>g?Qn:vs:null,j=y?y===Qn?a.length:h.length:0);const T=y===Qn&&/\b(?:transform|all)(?:,|$)/.test(s(`${Qn}Property`).toString());return{type:y,timeout:k,propCount:j,hasTransform:T}}function cu(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,s)=>fu(n)+fu(e[s])))}function fu(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function ka(e){return(e?e.ownerDocument:document).body.offsetHeight}function Xp(e,t,n){const s=e[Jr];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const du=Symbol("_vod"),Jc=Symbol("_vsh"),Qp=Symbol(""),Zp=/(?:^|;)\s*display\s*:/;function eh(e,t,n){const s=e.style,o=bt(n);let a=!1;if(n&&!o){if(t)if(bt(t))for(const c of t.split(";")){const d=c.slice(0,c.indexOf(":")).trim();n[d]==null&&gs(s,d,"")}else for(const c in t)n[c]==null&&gs(s,c,"");for(const c in n){c==="display"&&(a=!0);const d=n[c];d!=null?nh(e,c,!bt(t)&&t?t[c]:void 0,d)||gs(s,c,d):gs(s,c,"")}}else if(o){if(t!==n){const c=s[Qp];c&&(n+=";"+c),s.cssText=n,a=Zp.test(n)}}else t&&e.removeAttribute("style");du in e&&((!o||t!==n)&&(e[du]=a?s.display:""),e[Jc]&&(s.display="none"))}const ko=/\s*!important$/;function gs(e,t,n){if(Le(n))n.forEach(s=>gs(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))ko.test(n)?e.setProperty(t,n.replace(ko,""),"important"):e.setProperty(t,n);else{const s=th(e,t);ko.test(n)?e.setProperty(cr(s),n.replace(ko,""),"important"):e[s]=n}}const pu=["Webkit","Moz","ms"],ra={};function th(e,t){const n=ra[t];if(n)return n;let s=hn(t);if(s!=="filter"&&s in e)return ra[t]=s;s=Fu(s);for(let o=0;o<pu.length;o++){const a=pu[o]+s;if(a in e)return ra[t]=a}return t}function nh(e,t,n,s){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&bt(s)&&n===s}const hu="http://www.w3.org/1999/xlink";function vu(e,t,n,s,o,a=id(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(hu,t.slice(6,t.length)):e.setAttributeNS(hu,t,n):n==null||a&&!Vu(n)?e.removeAttribute(t):e.setAttribute(t,a?"":$n(n)?String(n):n)}function mu(e,t,n,s,o){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Hc(n):n);return}const a=e.tagName;if(t==="value"&&a!=="PROGRESS"&&!a.includes("-")){const d=a==="OPTION"?e.getAttribute("value")||"":e.value,h=n==null?e.type==="checkbox"?"on":"":String(n);(d!==h||!("_value"in e))&&(e.value=h),n==null&&e.removeAttribute(t),e._value=n;return}let c=!1;if(n===""||n==null){const d=typeof e[t];d==="boolean"?n=Vu(n):n==null&&d==="string"?(n="",c=!0):d==="number"&&(n=0,c=!0)}try{e[t]=n}catch{}c&&e.removeAttribute(o||t)}function nr(e,t,n,s){e.addEventListener(t,n,s)}function rh(e,t,n,s){e.removeEventListener(t,n,s)}const yu=Symbol("_vei");function sh(e,t,n,s,o=null){const a=e[yu]||(e[yu]={}),c=a[t];if(s&&c)c.value=s;else{const[d,h]=ah(t);if(s){const g=a[t]=ch(s,o);nr(e,d,g,h)}else c&&(rh(e,d,c,h),a[t]=void 0)}}const oh=/(Once|Passive|Capture)$/,ih=/^on:?(?:Once|Passive|Capture)$/;function ah(e){let t,n;for(;(n=e.match(oh))&&!ih.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):cr(e.slice(2)),t]}let sa=0;const lh=Promise.resolve(),uh=()=>sa||(lh.then(()=>sa=0),sa=Date.now());function ch(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const o=n.value;if(Le(o)){const a=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{a.call(s),s._stopped=!0};const c=o.slice(),d=[s];for(let h=0;h<c.length&&!s._stopped;h++){const g=c[h];g&&cn(g,t,5,d)}}else cn(o,t,5,[s])};return n.value=e,n.attached=uh(),n}const gu=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,fh=(e,t,n,s,o,a)=>{const c=o==="svg";t==="class"?Xp(e,s,c):t==="style"?eh(e,n,s):Jo(t)?Xo(t)||sh(e,t,n,s,a):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):dh(e,t,s,c))?(mu(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&vu(e,t,s,c,a,t!=="value")):e._isVueCE&&(ph(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!bt(s)))?mu(e,hn(t),s,a,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),vu(e,t,s,c))};function dh(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&gu(t)&&He(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return gu(t)&&bt(n)?!1:t in e}function ph(e,t){const n=e._def.props;if(!n)return!1;const s=hn(t);return Array.isArray(n)?n.some(o=>hn(o)===s):Object.keys(n).some(o=>hn(o)===s)}const Xc=new WeakMap,Qc=new WeakMap,No=Symbol("_moveCb"),bu=Symbol("_enterCb"),xa=new WeakMap,hh=e=>(delete e.props.mode,e),vh=hh({name:"TransitionGroup",props:Et({},zc,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Ya(),s=vc();let o,a,c,d;const h=()=>(d===void 0&&(d=o.length>0&&xh(o[0].el,n.vnode.el,wu(e))),d);return _c(()=>{if(xa.delete(n),!h()){o=[],c=void 0;return}const g=wu(e);o.forEach(yh);const y=c&&kh(c,n.vnode.el);c=void 0,o.forEach(j=>gh(j,y));const k=o.filter(bh);ka(n.vnode.el),k.forEach(j=>{const T=j.el,L=T.style;bn(T,g),L.transform=L.webkitTransform=L.transitionDuration="";const H=T[No]=fe=>{fe&&fe.target!==T||(!fe||fe.propertyName.endsWith("transform"))&&(T.removeEventListener("transitionend",H),T[No]=null,er(T,g))};T.addEventListener("transitionend",H)}),o=[]}),()=>{const g=rt(e),y=Gc(g);let k=g.tag||Re;if(o=[],d=void 0,a)for(let j=0;j<a.length;j++){const T=a[j];T.el&&T.el instanceof Element&&!T.el[Jc]&&(o.push(T),ar(T,Os(T,y,s,n)),Xc.set(T,ui(T.el)))}a=t.default?Ha(t.default()):[];for(let j=0;j<a.length;j++){const T=a[j];T.key!=null&&ar(T,Os(T,y,s,n))}return o.length&&(c=wh(n),xa.set(n,h)),Me(k,null,a)}}}),mh=vh;function yh(e){const t=e.el;t[No]&&t[No](),t[bu]&&t[bu]()}function wu(e){return e.moveClass||`${e.name||"v"}-move`}function gh(e,t){Qc.set(e,ui(e.el,t))}function bh(e){const t=Xc.get(e),n=Qc.get(e),s=t.left-n.left,o=t.top-n.top;if(s||o){const a=e.el,c=a.style,d=a.getBoundingClientRect();let h=1,g=1;return a.offsetWidth&&(h=d.width/a.offsetWidth),a.offsetHeight&&(g=d.height/a.offsetHeight),(!Number.isFinite(h)||h===0)&&(h=1),(!Number.isFinite(g)||g===0)&&(g=1),Math.abs(h-1)<.01&&(h=1),Math.abs(g-1)<.01&&(g=1),c.transform=c.webkitTransform=`translate(${s/h}px,${o/g}px)`,c.transitionDuration="0s",e}}function ui(e,t){const n=e.getBoundingClientRect();return{left:n.left-(t?t.left:0),top:n.top-(t?t.top:0)}}function wh(e){let t;for(let n=e.parent;n;n=n.parent){const s=xa.get(n);if(s){const o=_h(n.vnode.el,e.vnode.el);o&&(t||(t=[])).push(Et(ui(o),{item:o,willMove:s}))}}return t}function _h(e,t){const n=e.nodeType===1?e:e.parentNode;for(;t&&t.parentNode!==n;)t=t.parentNode;if(t&&t.nodeType===1)return t}function kh(e,t){const n=e.find(s=>s.willMove()&&s.item.contains(t));return n&&ui(n.item,n)}function xh(e,t,n){const s=e.cloneNode(),o=e[Jr];o&&o.forEach(d=>{d.split(/\s+/).forEach(h=>h&&s.classList.remove(h))}),n.split(/\s+/).forEach(d=>d&&s.classList.add(d)),s.style.display="none";const a=t.nodeType===1?t:t.parentNode;a.appendChild(s);const{hasTransform:c}=Yc(s);return a.removeChild(s),c}const Xr=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Le(t)?n=>So(t,n):t};function Ch(e){e.target.composing=!0}function _u(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Sn=Symbol("_assign"),xo=Symbol("_initialValue");function oa(e,t,n){return t&&(e=e.trim()),n&&(e=Zo(e)),e}const De={created(e,{modifiers:{lazy:t,trim:n,number:s}},o){e.parentNode&&(e.type==="text"?e[xo]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[xo]=e.defaultValue.replace(/\r\n?/g,`
|
||
`))),e[Sn]=Xr(o);const a=s||o.props&&o.props.type==="number";nr(e,t?"change":"input",c=>{c.target.composing||e[Sn](oa(e.value,n,a))}),(n||a)&&nr(e,"change",()=>{e.value=oa(e.value,n,a)}),t||(nr(e,"compositionstart",Ch),nr(e,"compositionend",_u),nr(e,"change",_u))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const o=t??"",a=e[xo];delete e[xo],a!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==a?e[Sn](oa(e.value,n,s)):e.value=o},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:o,number:a}},c){if(e[Sn]=Xr(c),e.composing)return;const d=(a||e.type==="number")&&!/^0\d/.test(e.value)?Zo(e.value):e.value,h=t??"";if(d===h)return;const g=e.getRootNode();(g instanceof Document||g instanceof ShadowRoot)&&g.activeElement===e&&e.type!=="range"&&(s&&t===n||o&&e.value.trim()===h)||(e.value=h)}},Sh={deep:!0,created(e,t,n){e[Sn]=Xr(n),nr(e,"change",()=>{const s=e._modelValue,o=Ls(e),a=e.checked,c=e[Sn];if(Le(s)){const d=Da(s,o),h=d!==-1;if(a&&!h)c(s.concat(o));else if(!a&&h){const g=[...s];g.splice(d,1),c(g)}}else if(Bn(s)){const d=new Set(s);a?d.add(o):d.delete(o),c(d)}else c(Zc(e,a))})},mounted:ku,beforeUpdate(e,t,n){e[Sn]=Xr(n),ku(e,t,n)}};function ku(e,{value:t,oldValue:n},s){e._modelValue=t;let o;if(Le(t))o=Da(t,s.props.value)>-1;else if(Bn(t))o=t.has(s.props.value);else{if(t===n)return;o=Un(t,Zc(e,!0))}e.checked!==o&&(e.checked=o)}const Fn={deep:!0,created(e,{value:t,modifiers:{number:n}},s){e._modelValue=t,nr(e,"change",()=>{const o=Array.prototype.filter.call(e.options,h=>h.selected).map(h=>n?Zo(Ls(h)):Ls(h)),a=e.multiple,c=a?Bn(e._modelValue)?new Set(o):o:o[0],d=e._pendingValue=[a,a?Le(c)?o.slice():o:c];try{e[Sn](c)}finally{ts(()=>{e._pendingValue===d&&(e._pendingValue=void 0)})}}),e[Sn]=Xr(s)},mounted(e,{value:t}){xu(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Sn]=Xr(n)},updated(e,{value:t}){const n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!Eh(t,n[1],n[0]))&&xu(e,t)}};function Eh(e,t,n){if(!n||Le(e))return Un(e,t);if(Bn(e)){if(e.size!==t.length)return!1;for(const s of t)if(!e.has(s))return!1;return!0}return!1}function xu(e,t){const n=e.multiple,s=Le(t);if(!(n&&!s&&!Bn(t))){for(let o=0,a=e.options.length;o<a;o++){const c=e.options[o],d=Ls(c);if(n)if(s){const h=typeof d;h==="string"||h==="number"?c.selected=t.some(g=>String(g)===String(d)):c.selected=Da(t,d)>-1}else c.selected=t.has(d);else if(Un(Ls(c),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ls(e){return"_value"in e?e._value:e.value}function Zc(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const $h=["ctrl","shift","alt","meta"],Ah={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)=>$h.some(n=>e[`${n}Key`]&&!t.includes(n))},Mr=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(o,...a)=>{for(let c=0;c<t.length;c++){const d=Ah[t[c]];if(d&&d(o,t))return}return e(o,...a)})},Ph={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},jt=(e,t)=>{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=o=>{if(!("key"in o))return;const a=cr(o.key);if(t.some(c=>c===a||Ph[c]===a))return e(o)})},Th=Et({patchProp:fh},zp);let Cu;function Oh(){return Cu||(Cu=Ep(Th))}const Mh=(...e)=>{const t=Oh().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=jh(s);if(!o)return;const a=t._component;!He(a)&&!a.render&&!a.template&&(a.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const c=n(o,!1,Ih(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),c},t};function Ih(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function jh(e){return bt(e)?document.querySelector(e):e}function At(e){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">'+e+"</svg>"}const Dh={calendar:At('<rect x="4" y="5.5" width="16" height="14" rx="2"/><path d="M8.5 3.5v3.5M15.5 3.5v3.5M4 10.5h16"/>'),clock:At('<circle cx="12" cy="12" r="8.25"/><path d="M12 7.75V12l2.75 1.75"/>'),"check-circle":At('<circle cx="12" cy="12" r="8.25"/><path d="M8.5 12.4l2.4 2.4 4.6-5.2"/>'),edit:At('<path d="M4.5 19.5v-3.2L16 4.8a1.9 1.9 0 0 1 2.7 2.7L7.2 19l-2.7.5z"/>'),tag:At('<path d="M4.5 5.5a1 1 0 0 1 1-1h5.6l8.4 8.4-6.6 6.6-8.4-8.4V5.5z"/><circle cx="8.8" cy="8.8" r="1.1"/>'),star:At('<path d="M12 4l2.5 5.1 5.6.8-4 3.9.9 5.6-5-2.7-5 2.7.9-5.6-4-3.9 5.6-.8L12 4z"/>'),close:At('<path d="M6.5 6.5l11 11M17.5 6.5l-11 11"/>'),flag:At('<path d="M6.5 21V4"/><path d="M6.5 4.5h10.8l-2.6 3.7 2.6 3.7H6.5"/>'),chart:At('<path d="M4.5 19.5h15"/><path d="M7.5 19.5V12M12 19.5V6.5M16.5 19.5V9.5"/>'),export:At('<path d="M12 4.5V14M8.25 10.25L12 14l3.75-3.75"/><path d="M5 19.5h14"/>'),"chevron-left":At('<path d="M14.5 6l-6 6 6 6"/>'),"chevron-right":At('<path d="M9.5 6l6 6-6 6"/>'),"chevron-down":At('<path d="M6 9.5l6 6 6-6"/>'),plus:At('<path d="M12 5.5v13M5.5 12h13"/>'),search:At('<circle cx="11" cy="11" r="6.5"/><path d="M15.8 15.8L20 20"/>'),settings:At('<circle cx="12" cy="12" r="3"/><path d="M12 4.5v2.2M12 17.3v2.2M4.5 12h2.2M17.3 12h2.2M6.8 6.8l1.6 1.6M15.6 15.6l1.6 1.6M17.2 6.8l-1.6 1.6M8.4 15.6l-1.6 1.6"/>'),memo:At('<path d="M6.5 3.5h7.5L18.5 8v11a1 1 0 0 1-1 1h-11a1 1 0 0 1-1-1v-15a1 1 0 0 1 1-1z"/><path d="M14 3.5V8h4.5M9.5 12h5M9.5 15.5h5"/>'),lock:At('<rect x="5.5" y="10.5" width="13" height="9.5" rx="1.5"/><path d="M8.5 10.5V8a3.5 3.5 0 0 1 7 0v2.5"/>'),wallet:At('<rect x="3.5" y="6" width="17" height="12.5" rx="2"/><path d="M3.5 10h17"/><circle cx="16.4" cy="14.2" r="1.1"/>')},Rh=["innerHTML"],lt=Vt({__name:"Icon",props:{name:{},size:{default:16}},setup(e){const t=e,n=it(()=>Dh[t.name]||"");return(s,o)=>(K(),U("span",{class:"icon",style:sr({width:e.size+"px",height:e.size+"px"}),innerHTML:n.value},null,12,Rh))}}),Lh=["aria-label"],Kh={class:"dialog-title"},Fh={class:"dialog-msg"},Nh={class:"dialog-btns"},Vh=Vt({__name:"ConfirmDialog",props:{open:{type:Boolean},title:{},message:{},confirmText:{default:"确认"},cancelText:{default:"取消"},danger:{type:Boolean,default:!1}},emits:["cancel","confirm"],setup(e,{emit:t}){const n=e,s=t;function o(a){n.open&&a.key==="Escape"&&s("cancel")}return gt(()=>n.open,a=>{a?window.addEventListener("keydown",o):window.removeEventListener("keydown",o)}),dr(()=>window.removeEventListener("keydown",o)),(a,c)=>(K(),It(Vs,{to:"body"},[Me(ns,{name:"modal"},{default:fr(()=>[e.open?(K(),U("div",{key:0,class:"mask",onClick:c[2]||(c[2]=Mr(d=>s("cancel"),["self"]))},[u("div",{class:"dialog",role:"dialog","aria-label":e.title},[u("div",Kh,re(e.title),1),u("div",Fh,re(e.message),1),u("div",Nh,[u("button",{class:"btn btn-sm",onClick:c[0]||(c[0]=d=>s("cancel"))},re(e.cancelText),1),u("button",{class:et(["btn btn-sm",e.danger?"btn-danger-solid":"btn-primary"]),onClick:c[1]||(c[1]=d=>s("confirm"))},re(e.confirmText),3)])],8,Lh)])):$e("",!0)]),_:1})]))}}),Yt=(e,t)=>{const n=e.__vccOpts||e;for(const[s,o]of t)n[s]=o;return n},ur=Yt(Vh,[["__scopeId","data-v-f27041d4"]]);var Su=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ef={exports:{}};(function(e,t){((n,s)=>{e.exports=s()})(Su,function(){var n=function(r,i){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(l,f){l.__proto__=f}:function(l,f){for(var p in f)Object.prototype.hasOwnProperty.call(f,p)&&(l[p]=f[p])}))(r,i)},s=function(){return(s=Object.assign||function(r){for(var i,l=1,f=arguments.length;l<f;l++)for(var p in i=arguments[l])Object.prototype.hasOwnProperty.call(i,p)&&(r[p]=i[p]);return r}).apply(this,arguments)};function o(r,i,l){for(var f,p=0,v=i.length;p<v;p++)!f&&p in i||((f=f||Array.prototype.slice.call(i,0,p))[p]=i[p]);return r.concat(f||Array.prototype.slice.call(i))}var a=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:Su,c=Object.keys,d=Array.isArray;function h(r,i){return typeof i=="object"&&c(i).forEach(function(l){r[l]=i[l]}),r}typeof Promise>"u"||a.Promise||(a.Promise=Promise);var g=Object.getPrototypeOf,y={}.hasOwnProperty;function k(r,i){return y.call(r,i)}function j(r,i){typeof i=="function"&&(i=i(g(r))),(typeof Reflect>"u"?c:Reflect.ownKeys)(i).forEach(function(l){L(r,l,i[l])})}var T=Object.defineProperty;function L(r,i,l,f){T(r,i,h(l&&k(l,"get")&&typeof l.get=="function"?{get:l.get,set:l.set,configurable:!0}:{value:l,configurable:!0,writable:!0},f))}function H(r){return{from:function(i){return r.prototype=Object.create(i.prototype),L(r.prototype,"constructor",r),{extend:j.bind(null,r.prototype)}}}}var fe=Object.getOwnPropertyDescriptor,ee=[].slice;function E(r,i,l){return ee.call(r,i,l)}function R(r,i){return i(r)}function Y(r){if(!r)throw new Error("Assertion Failed")}function le(r){a.setImmediate?setImmediate(r):setTimeout(r,0)}function ie(r,i){if(typeof i=="string"&&k(r,i))return r[i];if(!i)return r;if(typeof i!="string"){for(var l=[],f=0,p=i.length;f<p;++f){var v=ie(r,i[f]);l.push(v)}return l}var b,w=i.indexOf(".");return w===-1||(b=r[i.substr(0,w)])==null?void 0:ie(b,i.substr(w+1))}function Z(r,i,l){if(r&&i!==void 0&&!("isFrozen"in Object&&Object.isFrozen(r)))if(typeof i!="string"&&"length"in i){Y(typeof l!="string"&&"length"in l);for(var f=0,p=i.length;f<p;++f)Z(r,i[f],l[f])}else{var v=i.indexOf(".");if(v!==-1){var b=i.substr(0,v),v=i.substr(v+1);if(v==="")l===void 0?d(r)&&!isNaN(parseInt(b))?r.splice(b,1):delete r[b]:r[b]=l;else{var w=r[b];if(!w||!k(r,b)){if(l===void 0)return;w=r[b]={}}Z(w,v,l)}}else l===void 0?d(r)&&!isNaN(parseInt(i))?r.splice(i,1):delete r[i]:r[i]=l}}function A(r){var i,l={};for(i in r)k(r,i)&&(l[i]=r[i]);return l}var x=[].concat;function oe(r){return x.apply([],r)}var X="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(oe([8,16,32,64].map(function(r){return["Int","Uint","Float"].map(function(i){return i+r+"Array"})}))).filter(function(r){return a[r]}),Ce=new Set(X.map(function(r){return a[r]})),J=null;function Se(r){return J=new WeakMap,r=function i(l){if(!l||typeof l!="object")return l;var f=J.get(l);if(f)return f;if(d(l)){f=[],J.set(l,f);for(var p=0,v=l.length;p<v;++p)f.push(i(l[p]))}else if(Ce.has(l.constructor))f=l;else{var b,w=g(l);for(b in f=w===Object.prototype?{}:Object.create(w),J.set(l,f),l)k(l,b)&&(f[b]=i(l[b]))}return f}(r),J=null,r}var Ve={}.toString;function Xe(r){return Ve.call(r).slice(8,-1)}var Ne=typeof Symbol<"u"?Symbol.iterator:"@@iterator",We=typeof Ne=="symbol"?function(r){var i;return r!=null&&(i=r[Ne])&&i.apply(r)}:function(){return null};function be(r,i){i=r.indexOf(i),0<=i&&r.splice(i,1)}var Ie={};function Ke(r){var i,l,f,p;if(arguments.length===1){if(d(r))return r.slice();if(this===Ie&&typeof r=="string")return[r];if(p=We(r))for(l=[];!(f=p.next()).done;)l.push(f.value);else{if(r==null)return[r];if(typeof(i=r.length)!="number")return[r];for(l=new Array(i);i--;)l[i]=r[i]}}else for(i=arguments.length,l=new Array(i);i--;)l[i]=arguments[i];return l}var de=typeof Symbol<"u"?function(r){return r[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},X=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Ye=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(X),Q={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function xe(r,i){this.name=r,this.message=i}function ot(r,i){return r+". Errors: "+Object.keys(i).map(function(l){return i[l].toString()}).filter(function(l,f,p){return p.indexOf(l)===f}).join(`
|
||
`)}function pt(r,i,l,f){this.failures=i,this.failedKeys=f,this.successCount=l,this.message=ot(r,i)}function ht(r,i){this.name="BulkError",this.failures=Object.keys(i).map(function(l){return i[l]}),this.failuresByPos=i,this.message=ot(r,this.failures)}H(xe).from(Error).extend({toString:function(){return this.name+": "+this.message}}),H(pt).from(xe),H(ht).from(xe);var Jt=Ye.reduce(function(r,i){return r[i]=i+"Error",r},{}),Bt=xe,he=Ye.reduce(function(r,i){var l=i+"Error";function f(p,v){this.name=l,p?typeof p=="string"?(this.message="".concat(p).concat(v?`
|
||
`+v:""),this.inner=v||null):typeof p=="object"&&(this.message="".concat(p.name," ").concat(p.message),this.inner=p):(this.message=Q[i]||l,this.inner=null)}return H(f).from(Bt),r[i]=f,r},{}),m=(he.Syntax=SyntaxError,he.Type=TypeError,he.Range=RangeError,X.reduce(function(r,i){return r[i+"Error"]=he[i],r},{}));X=Ye.reduce(function(r,i){return["Syntax","Type","Range"].indexOf(i)===-1&&(r[i+"Error"]=he[i]),r},{});function _(){}function W(r){return r}function ce(r,i){return r==null||r===W?i:function(l){return i(r(l))}}function se(r,i){return function(){r.apply(this,arguments),i.apply(this,arguments)}}function ae(r,i){return r===_?i:function(){var l=r.apply(this,arguments),f=(l!==void 0&&(arguments[0]=l),this.onsuccess),p=this.onerror,v=(this.onsuccess=null,this.onerror=null,i.apply(this,arguments));return f&&(this.onsuccess=this.onsuccess?se(f,this.onsuccess):f),p&&(this.onerror=this.onerror?se(p,this.onerror):p),v!==void 0?v:l}}function ue(r,i){return r===_?i:function(){r.apply(this,arguments);var l=this.onsuccess,f=this.onerror;this.onsuccess=this.onerror=null,i.apply(this,arguments),l&&(this.onsuccess=this.onsuccess?se(l,this.onsuccess):l),f&&(this.onerror=this.onerror?se(f,this.onerror):f)}}function ye(r,i){return r===_?i:function(){var l=r.apply(this,arguments),f=(h(arguments[0],l),this.onsuccess),p=this.onerror,v=(this.onsuccess=null,this.onerror=null,i.apply(this,arguments));return f&&(this.onsuccess=this.onsuccess?se(f,this.onsuccess):f),p&&(this.onerror=this.onerror?se(p,this.onerror):p),l===void 0?v===void 0?void 0:v:h(l,v)}}function ke(r,i){return r===_?i:function(){return i.apply(this,arguments)!==!1&&r.apply(this,arguments)}}function q(r,i){return r===_?i:function(){var l=r.apply(this,arguments);if(l&&typeof l.then=="function"){for(var f=this,p=arguments.length,v=new Array(p);p--;)v[p]=arguments[p];return l.then(function(){return i.apply(f,v)})}return i.apply(this,arguments)}}X.ModifyError=pt,X.DexieError=xe,X.BulkError=ht;var B=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function G(r){B=r}var Pe={},Fe=100,Je=typeof Promise>"u"?[]:(Ye=Promise.resolve(),typeof crypto<"u"&&crypto.subtle?[Je=crypto.subtle.digest("SHA-512",new Uint8Array([0])),g(Je),Ye]:[Ye,g(Ye),Ye]),Ye=Je[0],Br=Je[1],Br=Br&&Br.then,Qe=Ye&&Ye.constructor,vt=!!Je[2],_t=function(r,i){Hn.push([r,i]),Ut&&(queueMicrotask(Ef),Ut=!1)},Xt=!0,Ut=!0,Qt=[],pr=[],Ot=W,$t={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:_,pgp:!1,env:{},finalize:_},je=$t,Hn=[],hr=0,Ws=[];function Ee(r){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var i=this._PSD=je;if(typeof r!="function"){if(r!==Pe)throw new TypeError("Not a function");this._state=arguments[1],this._value=arguments[2],this._state===!1&&yi(this,this._value)}else this._state=null,this._value=null,++i.ref,function l(f,p){try{p(function(v){if(f._state===null){if(v===f)throw new TypeError("A promise cannot be resolved with itself.");var b=f._lib&&Rr();v&&typeof v.then=="function"?l(f,function(w,S){v instanceof Ee?v._then(w,S):v.then(w,S)}):(f._state=!0,f._value=v,il(f)),b&&Lr()}},yi.bind(null,f))}catch(v){yi(f,v)}}(this,r)}var mi={get:function(){var r=je,i=Js;function l(f,p){var v=this,b=!r.global&&(r!==je||i!==Js),w=b&&!zn(),S=new Ee(function(N,P){gi(v,new ol(ll(f,r,b,w),ll(p,r,b,w),N,P,r))});return this._consoleTask&&(S._consoleTask=this._consoleTask),S}return l.prototype=Pe,l},set:function(r){L(this,"then",r&&r.prototype===Pe?mi:{get:function(){return r},set:mi.set})}};function ol(r,i,l,f,p){this.onFulfilled=typeof r=="function"?r:null,this.onRejected=typeof i=="function"?i:null,this.resolve=l,this.reject=f,this.psd=p}function yi(r,i){var l,f;pr.push(i),r._state===null&&(l=r._lib&&Rr(),i=Ot(i),r._state=!1,r._value=i,f=r,Qt.some(function(p){return p._value===f._value})||Qt.push(f),il(r),l)&&Lr()}function il(r){var i=r._listeners;r._listeners=[];for(var l=0,f=i.length;l<f;++l)gi(r,i[l]);var p=r._PSD;--p.ref||p.finalize(),hr===0&&(++hr,_t(function(){--hr==0&&bi()},[]))}function gi(r,i){if(r._state===null)r._listeners.push(i);else{var l=r._state?i.onFulfilled:i.onRejected;if(l===null)return(r._state?i.resolve:i.reject)(r._value);++i.psd.ref,++hr,_t(Sf,[l,r,i])}}function Sf(r,i,l){try{var f,p=i._value;!i._state&&pr.length&&(pr=[]),f=B&&i._consoleTask?i._consoleTask.run(function(){return r(p)}):r(p),i._state||pr.indexOf(p)!==-1||(v=>{for(var b=Qt.length;b;)if(Qt[--b]._value===v._value)return Qt.splice(b,1)})(i),l.resolve(f)}catch(v){l.reject(v)}finally{--hr==0&&bi(),--l.psd.ref||l.psd.finalize()}}function Ef(){vr($t,function(){Rr()&&Lr()})}function Rr(){var r=Xt;return Ut=Xt=!1,r}function Lr(){var r,i,l;do for(;0<Hn.length;)for(r=Hn,Hn=[],l=r.length,i=0;i<l;++i){var f=r[i];f[0].apply(null,f[1])}while(0<Hn.length);Ut=Xt=!0}function bi(){for(var r=Qt,i=(Qt=[],r.forEach(function(f){f._PSD.onunhandled.call(null,f._value,f)}),Ws.slice(0)),l=i.length;l;)i[--l]()}function zs(r){return new Ee(Pe,!1,r)}function mt(r,i){var l=je;return function(){var f=Rr(),p=je;try{return Gn(l,!0),r.apply(this,arguments)}catch(v){i&&i(v)}finally{Gn(p,!1),f&&Lr()}}}j(Ee.prototype,{then:mi,_then:function(r,i){gi(this,new ol(null,null,r,i,je))},catch:function(r){var i,l;return arguments.length===1?this.then(null,r):(i=r,l=arguments[1],typeof i=="function"?this.then(null,function(f){return(f instanceof i?l:zs)(f)}):this.then(null,function(f){return(f&&f.name===i?l:zs)(f)}))},finally:function(r){return this.then(function(i){return Ee.resolve(r()).then(function(){return i})},function(i){return Ee.resolve(r()).then(function(){return zs(i)})})},timeout:function(r,i){var l=this;return r<1/0?new Ee(function(f,p){var v=setTimeout(function(){return p(new he.Timeout(i))},r);l.then(f,p).finally(clearTimeout.bind(null,v))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&L(Ee.prototype,Symbol.toStringTag,"Dexie.Promise"),$t.env=al(),j(Ee,{all:function(){var r=Ke.apply(null,arguments).map(Xs);return new Ee(function(i,l){r.length===0&&i([]);var f=r.length;r.forEach(function(p,v){return Ee.resolve(p).then(function(b){r[v]=b,--f||i(r)},l)})})},resolve:function(r){return r instanceof Ee?r:r&&typeof r.then=="function"?new Ee(function(i,l){r.then(i,l)}):new Ee(Pe,!0,r)},reject:zs,race:function(){var r=Ke.apply(null,arguments).map(Xs);return new Ee(function(i,l){r.map(function(f){return Ee.resolve(f).then(i,l)})})},PSD:{get:function(){return je},set:function(r){return je=r}},totalEchoes:{get:function(){return Js}},newPSD:Wn,usePSD:vr,scheduler:{get:function(){return _t},set:function(r){_t=r}},rejectionMapper:{get:function(){return Ot},set:function(r){Ot=r}},follow:function(r,i){return new Ee(function(l,f){return Wn(function(p,v){var b=je;b.unhandleds=[],b.onunhandled=v,b.finalize=se(function(){var w,S=this;w=function(){S.unhandleds.length===0?p():v(S.unhandleds[0])},Ws.push(function N(){w(),Ws.splice(Ws.indexOf(N),1)}),++hr,_t(function(){--hr==0&&bi()},[])},b.finalize),r()},i,l,f)})}}),Qe&&(Qe.allSettled&&L(Ee,"allSettled",function(){var r=Ke.apply(null,arguments).map(Xs);return new Ee(function(i){r.length===0&&i([]);var l=r.length,f=new Array(l);r.forEach(function(p,v){return Ee.resolve(p).then(function(b){return f[v]={status:"fulfilled",value:b}},function(b){return f[v]={status:"rejected",reason:b}}).then(function(){return--l||i(f)})})})}),Qe.any&&typeof AggregateError<"u"&&L(Ee,"any",function(){var r=Ke.apply(null,arguments).map(Xs);return new Ee(function(i,l){r.length===0&&l(new AggregateError([]));var f=r.length,p=new Array(f);r.forEach(function(v,b){return Ee.resolve(v).then(function(w){return i(w)},function(w){p[b]=w,--f||l(new AggregateError(p))})})})}),Qe.withResolvers)&&(Ee.withResolvers=Qe.withResolvers);var Pt={awaits:0,echoes:0,id:0},$f=0,Gs=[],Ys=0,Js=0,Af=0;function Wn(r,b,l,f){var p=je,v=Object.create(p),b=(v.parent=p,v.ref=0,v.global=!1,v.id=++Af,$t.env,v.env=vt?{Promise:Ee,PromiseProp:{value:Ee,configurable:!0,writable:!0},all:Ee.all,race:Ee.race,allSettled:Ee.allSettled,any:Ee.any,resolve:Ee.resolve,reject:Ee.reject}:{},b&&h(v,b),++p.ref,v.finalize=function(){--this.parent.ref||this.parent.finalize()},vr(v,r,l,f));return v.ref===0&&v.finalize(),b}function Kr(){return Pt.id||(Pt.id=++$f),++Pt.awaits,Pt.echoes+=Fe,Pt.id}function zn(){return!!Pt.awaits&&(--Pt.awaits==0&&(Pt.id=0),Pt.echoes=Pt.awaits*Fe,!0)}function Xs(r){return Pt.echoes&&r&&r.constructor===Qe?(Kr(),r.then(function(i){return zn(),i},function(i){return zn(),Ct(i)})):r}function Pf(){var r=Gs[Gs.length-1];Gs.pop(),Gn(r,!1)}function Gn(r,i){var l,f,p=je;(i?!Pt.echoes||Ys++&&r===je:!Ys||--Ys&&r===je)||queueMicrotask(i?(function(v){++Js,Pt.echoes&&--Pt.echoes!=0||(Pt.echoes=Pt.awaits=Pt.id=0),Gs.push(je),Gn(v,!0)}).bind(null,r):Pf),r!==je&&(je=r,p===$t&&($t.env=al()),vt)&&(l=$t.env.Promise,f=r.env,p.global||r.global)&&(Object.defineProperty(a,"Promise",f.PromiseProp),l.all=f.all,l.race=f.race,l.resolve=f.resolve,l.reject=f.reject,f.allSettled&&(l.allSettled=f.allSettled),f.any)&&(l.any=f.any)}function al(){var r=a.Promise;return vt?{Promise:r,PromiseProp:Object.getOwnPropertyDescriptor(a,"Promise"),all:r.all,race:r.race,allSettled:r.allSettled,any:r.any,resolve:r.resolve,reject:r.reject}:{}}function vr(r,i,l,f,p){var v=je;try{return Gn(r,!0),i(l,f,p)}finally{Gn(v,!1)}}function ll(r,i,l,f){return typeof r!="function"?r:function(){var p=je;l&&Kr(),Gn(i,!0);try{return r.apply(this,arguments)}finally{Gn(p,!1),f&&queueMicrotask(zn)}}}function wi(r){Promise===Qe&&Pt.echoes===0?Ys===0?r():enqueueNativeMicroTask(r):setTimeout(r,0)}(""+Br).indexOf("[native code]")===-1&&(Kr=zn=_);var Ct=Ee.reject,mr="",On="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",ul="String expected.",Qs="__dbnames",_i="readonly",ki="readwrite";function yr(r,i){return r?i?function(){return r.apply(this,arguments)&&i.apply(this,arguments)}:r:i}var cl={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Zs(r){return typeof r!="string"||/\./.test(r)?function(i){return i}:function(i){return i[r]===void 0&&r in i&&delete(i=Se(i))[r],i}}function fl(){throw he.Type("Entity instances must never be new:ed. Instances are generated by the framework bypassing the constructor.")}function tt(r,i){try{var l=dl(r),f=dl(i);if(l!==f)return l==="Array"?1:f==="Array"?-1:l==="binary"?1:f==="binary"?-1:l==="string"?1:f==="string"?-1:l==="Date"?1:f!=="Date"?NaN:-1;switch(l){case"number":case"Date":case"string":return i<r?1:r<i?-1:0;case"binary":for(var p=pl(r),v=pl(i),b=p.length,w=v.length,S=b<w?b:w,N=0;N<S;++N)if(p[N]!==v[N])return p[N]<v[N]?-1:1;return b===w?0:b<w?-1:1;case"Array":for(var P=r,C=i,$=P.length,D=C.length,M=$<D?$:D,O=0;O<M;++O){var I=tt(P[O],C[O]);if(I!==0)return I}return $===D?0:$<D?-1:1}}catch{}return NaN}function dl(r){var i=typeof r;return i=="object"&&(ArrayBuffer.isView(r)||(i=Xe(r))==="ArrayBuffer")?"binary":i}function pl(r){return r instanceof Uint8Array?r:ArrayBuffer.isView(r)?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):new Uint8Array(r)}function eo(r,i,l){var f=r.schema.yProps;return f?(i&&0<l.numFailures&&(i=i.filter(function(p,v){return!l.failures[v]})),Promise.all(f.map(function(p){return p=p.updatesTable,i?r.db.table(p).where("k").anyOf(i).delete():r.db.table(p).clear()})).then(function(){return l})):l}hl.prototype.execute=function(r){var i=this["@@propmod"];if(i.add!==void 0){var l=i.add;if(d(l))return o(o([],d(r)?r:[],!0),l).sort();if(typeof l=="number")return(Number(r)||0)+l;if(typeof l=="bigint")try{return BigInt(r)+l}catch{return BigInt(0)+l}throw new TypeError("Invalid term ".concat(l))}if(i.remove!==void 0){var f=i.remove;if(d(f))return d(r)?r.filter(function(p){return!f.includes(p)}).sort():[];if(typeof f=="number")return Number(r)-f;if(typeof f=="bigint")try{return BigInt(r)-f}catch{return BigInt(0)-f}throw new TypeError("Invalid subtrahend ".concat(f))}return l=(l=i.replacePrefix)==null?void 0:l[0],l&&typeof r=="string"&&r.startsWith(l)?i.replacePrefix[1]+r.substring(l.length):r};var ss=hl;function hl(r){this["@@propmod"]=r}function vl(r,i){for(var l=c(i),f=l.length,p=!1,v=0;v<f;++v){var b=l[v],w=i[b],S=ie(r,b);w instanceof ss?(Z(r,b,w.execute(S)),p=!0):S!==w&&(Z(r,b,w),p=!0)}return p}ft.prototype._trans=function(r,i,l){var f=this._tx||je.trans,p=this.name,v=B&&typeof console<"u"&&console.createTask&&console.createTask("Dexie: ".concat(r==="readonly"?"read":"write"," ").concat(this.name));function b(N,P,C){if(C.schema[p])return i(C.idbtrans,C);throw new he.NotFound("Table "+p+" not part of transaction")}var w=Rr();try{var S=f&&f.db._novip===this.db._novip?f===je.trans?f._promise(r,b,l):Wn(function(){return f._promise(r,b,l)},{trans:f,transless:je.transless||je}):function N(P,C,$,D){if(P.idbdb&&(P._state.openComplete||je.letThrough||P._vip)){var M=P._createTransaction(C,$,P._dbSchema);try{M.create(),P._state.PR1398_maxLoop=3}catch(O){return O.name===Jt.InvalidState&&P.isOpen()&&0<--P._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),P.close({disableAutoOpen:!1}),P.open().then(function(){return N(P,C,$,D)})):Ct(O)}return M._promise(C,function(O,I){return Wn(function(){return je.trans=M,D(O,I,M)})}).then(function(O){if(C==="readwrite")try{M.idbtrans.commit()}catch{}return C==="readonly"?O:M._completion.then(function(){return O})})}if(P._state.openComplete)return Ct(new he.DatabaseClosed(P._state.dbOpenError));if(!P._state.isBeingOpened){if(!P._state.autoOpen)return Ct(new he.DatabaseClosed);P.open().catch(_)}return P._state.dbReadyPromise.then(function(){return N(P,C,$,D)})}(this.db,r,[this.name],b);return v&&(S._consoleTask=v,S=S.catch(function(N){return console.trace(N),Ct(N)})),S}finally{w&&Lr()}},ft.prototype.get=function(r,i){var l=this;return r&&r.constructor===Object?this.where(r).first(i):r==null?Ct(new he.Type("Invalid argument to Table.get()")):this._trans("readonly",function(f){return l.core.get({trans:f,key:r}).then(function(p){return l.hook.reading.fire(p)})}).then(i)},ft.prototype.where=function(r){if(typeof r=="string")return new this.db.WhereClause(this,r);if(d(r))return new this.db.WhereClause(this,"[".concat(r.join("+"),"]"));var i=c(r);if(i.length===1)return this.where(i[0]).equals(r[i[0]]);var l=this.schema.indexes.concat(this.schema.primKey).filter(function(w){if(w.compound&&i.every(function(N){return 0<=w.keyPath.indexOf(N)})){for(var S=0;S<i.length;++S)if(i.indexOf(w.keyPath[S])===-1)return!1;return!0}return!1}).sort(function(w,S){return w.keyPath.length-S.keyPath.length})[0];if(l&&this.db._maxKey!==mr)return b=l.keyPath.slice(0,i.length),this.where(b).equals(b.map(function(w){return r[w]}));!l&&B&&console.warn("The query ".concat(JSON.stringify(r)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(i.join("+"),"]"));var f=this.schema.idxByName;function p(w,S){return tt(w,S)===0}var b=i.reduce(function(P,S){var N=P[0],P=P[1],C=f[S],$=r[S];return[N||C,N||!C?yr(P,C&&C.multi?function(D){return D=ie(D,S),d(D)&&D.some(function(M){return p($,M)})}:function(D){return p($,ie(D,S))}):P]},[null,null]),v=b[0],b=b[1];return v?this.where(v.name).equals(r[v.keyPath]).filter(b):l?this.filter(b):this.where(i).equals("")},ft.prototype.filter=function(r){return this.toCollection().and(r)},ft.prototype.count=function(r){return this.toCollection().count(r)},ft.prototype.offset=function(r){return this.toCollection().offset(r)},ft.prototype.limit=function(r){return this.toCollection().limit(r)},ft.prototype.each=function(r){return this.toCollection().each(r)},ft.prototype.toArray=function(r){return this.toCollection().toArray(r)},ft.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},ft.prototype.orderBy=function(r){return new this.db.Collection(new this.db.WhereClause(this,d(r)?"[".concat(r.join("+"),"]"):r))},ft.prototype.reverse=function(){return this.toCollection().reverse()},ft.prototype.mapToClass=function(r){for(var i=this.db,l=this.name,f=((this.schema.mappedClass=r).prototype instanceof fl&&(r=(b=>{var w=P,S=b;if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");function N(){this.constructor=w}function P(){return b!==null&&b.apply(this,arguments)||this}return n(w,S),w.prototype=S===null?Object.create(S):(N.prototype=S.prototype,new N),Object.defineProperty(P.prototype,"db",{get:function(){return i},enumerable:!1,configurable:!0}),P.prototype.table=function(){return l},P})(r)),new Set),p=r.prototype;p;p=g(p))Object.getOwnPropertyNames(p).forEach(function(b){return f.add(b)});function v(b){if(!b)return b;var w,S=Object.create(r.prototype);for(w in b)if(!f.has(w))try{S[w]=b[w]}catch{}return S}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=v,this.hook("reading",v),r},ft.prototype.defineClass=function(){return this.mapToClass(function(r){h(this,r)})},ft.prototype.add=function(r,i){var l=this,f=this.schema.primKey,p=f.auto,v=f.keyPath,b=r;return v&&p&&(b=Zs(v)(r)),this._trans("readwrite",function(w){return l.core.mutate({trans:w,type:"add",keys:i!=null?[i]:null,values:[b]})}).then(function(w){return w.numFailures?Ee.reject(w.failures[0]):w.lastResult}).then(function(w){if(v)try{Z(r,v,w)}catch{}return w})},ft.prototype.upsert=function(r,i){var l=this,f=this.schema.primKey.keyPath;return this._trans("readwrite",function(p){return l.core.get({trans:p,key:r}).then(function(v){var b=v??{};return vl(b,i),f&&Z(b,f,r),l.core.mutate({trans:p,type:"put",values:[b],keys:[r],upsert:!0,updates:{keys:[r],changeSpecs:[i]}}).then(function(w){return w.numFailures?Ee.reject(w.failures[0]):!!v})})})},ft.prototype.update=function(r,i){return typeof r!="object"||d(r)?this.where(":id").equals(r).modify(i):(r=ie(r,this.schema.primKey.keyPath))===void 0?Ct(new he.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(r).modify(i)},ft.prototype.put=function(r,i){var l=this,f=this.schema.primKey,p=f.auto,v=f.keyPath,b=r;return v&&p&&(b=Zs(v)(r)),this._trans("readwrite",function(w){return l.core.mutate({trans:w,type:"put",values:[b],keys:i!=null?[i]:null})}).then(function(w){return w.numFailures?Ee.reject(w.failures[0]):w.lastResult}).then(function(w){if(v)try{Z(r,v,w)}catch{}return w})},ft.prototype.delete=function(r){var i=this;return this._trans("readwrite",function(l){return i.core.mutate({trans:l,type:"delete",keys:[r]}).then(function(f){return eo(i,[r],f)}).then(function(f){return f.numFailures?Ee.reject(f.failures[0]):void 0})})},ft.prototype.clear=function(){var r=this;return this._trans("readwrite",function(i){return r.core.mutate({trans:i,type:"deleteRange",range:cl}).then(function(l){return eo(r,null,l)})}).then(function(i){return i.numFailures?Ee.reject(i.failures[0]):void 0})},ft.prototype.bulkGet=function(r){var i=this;return this._trans("readonly",function(l){return i.core.getMany({keys:r,trans:l}).then(function(f){return f.map(function(p){return i.hook.reading.fire(p)})})})},ft.prototype.bulkAdd=function(r,i,l){var f=this,p=Array.isArray(i)?i:void 0,v=(l=l||(p?void 0:i))?l.allKeys:void 0;return this._trans("readwrite",function(b){var w=f.schema.primKey,N=w.auto,w=w.keyPath;if(w&&p)throw new he.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(p&&p.length!==r.length)throw new he.InvalidArgument("Arguments objects and keys must have the same length");var S=r.length,N=w&&N?r.map(Zs(w)):r;return f.core.mutate({trans:b,type:"add",keys:p,values:N,wantResults:v}).then(function(P){var C=P.numFailures,$=P.failures;if(C===0)return v?P.results:P.lastResult;throw new ht("".concat(f.name,".bulkAdd(): ").concat(C," of ").concat(S," operations failed"),$)})})},ft.prototype.bulkPut=function(r,i,l){var f=this,p=Array.isArray(i)?i:void 0,v=(l=l||(p?void 0:i))?l.allKeys:void 0;return this._trans("readwrite",function(b){var w=f.schema.primKey,N=w.auto,w=w.keyPath;if(w&&p)throw new he.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(p&&p.length!==r.length)throw new he.InvalidArgument("Arguments objects and keys must have the same length");var S=r.length,N=w&&N?r.map(Zs(w)):r;return f.core.mutate({trans:b,type:"put",keys:p,values:N,wantResults:v}).then(function(P){var C=P.numFailures,$=P.failures;if(C===0)return v?P.results:P.lastResult;throw new ht("".concat(f.name,".bulkPut(): ").concat(C," of ").concat(S," operations failed"),$)})})},ft.prototype.bulkUpdate=function(r){var i=this,l=this.core,f=r.map(function(b){return b.key}),p=r.map(function(b){return b.changes}),v=[];return this._trans("readwrite",function(b){return l.getMany({trans:b,keys:f,cache:"clone"}).then(function(w){var S=[],N=[],P=(r.forEach(function(C,$){var D=C.key,M=C.changes,O=w[$];if(O){for(var I=0,z=Object.keys(M);I<z.length;I++){var V=z[I],te=M[V];if(V===i.schema.primKey.keyPath){if(tt(te,D)!==0)throw new he.Constraint("Cannot update primary key in bulkUpdate()")}else Z(O,V,te)}v.push($),S.push(D),N.push(O)}}),S.length);return l.mutate({trans:b,type:"put",keys:S,values:N,updates:{keys:f,changeSpecs:p}}).then(function(C){var $=C.numFailures,D=C.failures;if($===0)return P;for(var M=0,O=Object.keys(D);M<O.length;M++){var I,z=O[M],V=v[Number(z)];V!=null&&(I=D[z],delete D[z],D[V]=I)}throw new ht("".concat(i.name,".bulkUpdate(): ").concat($," of ").concat(P," operations failed"),D)})})})},ft.prototype.bulkDelete=function(r){var i=this,l=r.length;return this._trans("readwrite",function(f){return i.core.mutate({trans:f,type:"delete",keys:r}).then(function(p){return eo(i,r,p)})}).then(function(f){var p=f.numFailures,v=f.failures;if(p===0)return f.lastResult;throw new ht("".concat(i.name,".bulkDelete(): ").concat(p," of ").concat(l," operations failed"),v)})};var ml=ft;function ft(){}function os(r){function i(b,w){if(w){for(var S=arguments.length,N=new Array(S-1);--S;)N[S-1]=arguments[S];return l[b].subscribe.apply(null,N),r}if(typeof b=="string")return l[b]}var l={};i.addEventType=v;for(var f=1,p=arguments.length;f<p;++f)v(arguments[f]);return i;function v(b,w,S){var N,P;if(typeof b!="object")return w=w||ke,P={subscribers:[],fire:S=S||_,subscribe:function(C){P.subscribers.indexOf(C)===-1&&(P.subscribers.push(C),P.fire=w(P.fire,C))},unsubscribe:function(C){P.subscribers=P.subscribers.filter(function($){return $!==C}),P.fire=P.subscribers.reduce(w,S)}},l[b]=i[b]=P;c(N=b).forEach(function(C){var $=N[C];if(d($))v(C,N[C][0],N[C][1]);else{if($!=="asap")throw new he.InvalidArgument("Invalid event config");var D=v(C,W,function(){for(var M=arguments.length,O=new Array(M);M--;)O[M]=arguments[M];D.subscribers.forEach(function(I){le(function(){I.apply(null,O)})})})}})}}function is(r,i){return H(i).from({prototype:r}),i}function Fr(r,i){return!(r.filter||r.algorithm||r.or)&&(i?r.justLimit:!r.replayFilter)}function xi(r,i){r.filter=yr(r.filter,i)}function Ci(r,i,l){var f=r.replayFilter;r.replayFilter=f?function(){return yr(f(),i())}:i,r.justLimit=l&&!f}function to(r,i){if(r.isPrimKey)return i.primaryKey;var l=i.getIndexByKeyPath(r.index);if(l)return l;throw new he.Schema("KeyPath "+r.index+" on object store "+i.name+" is not indexed")}function yl(r,i,l){var f=to(r,i.schema);return i.openCursor({trans:l,values:!r.keysOnly,reverse:r.dir==="prev",unique:!!r.unique,query:{index:f,range:r.range}})}function no(r,i,l,f){var p,v,b=r.replayFilter?yr(r.filter,r.replayFilter()):r.filter;return r.or?(p={},v=function(w,S,N){var P,C;b&&!b(S,N,function($){return S.stop($)},function($){return S.fail($)})||((C=""+(P=S.primaryKey))=="[object ArrayBuffer]"&&(C=""+new Uint8Array(P)),k(p,C))||(p[C]=!0,i(w,S,N))},Promise.all([r.or._iterate(v,l),gl(yl(r,f,l),r.algorithm,v,!r.keysOnly&&r.valueMapper)])):gl(yl(r,f,l),yr(r.algorithm,b),i,!r.keysOnly&&r.valueMapper)}function gl(r,i,l,f){var p=mt(f?function(v,b,w){return l(f(v),b,w)}:l);return r.then(function(v){if(v)return v.start(function(){var b=function(){return v.continue()};i&&!i(v,function(w){return b=w},function(w){v.stop(w),b=_},function(w){v.fail(w),b=_})||p(v.value,v,function(w){return b=w}),b()})})}nt.prototype._read=function(r,i){var l=this._ctx;return l.error?l.table._trans(null,Ct.bind(null,l.error)):l.table._trans("readonly",r).then(i)},nt.prototype._write=function(r){var i=this._ctx;return i.error?i.table._trans(null,Ct.bind(null,i.error)):i.table._trans("readwrite",r,"locked")},nt.prototype._addAlgorithm=function(r){var i=this._ctx;i.algorithm=yr(i.algorithm,r)},nt.prototype._iterate=function(r,i){return no(this._ctx,r,i,this._ctx.table.core)},nt.prototype.clone=function(r){var i=Object.create(this.constructor.prototype),l=Object.create(this._ctx);return r&&h(l,r),i._ctx=l,i},nt.prototype.raw=function(){return this._ctx.valueMapper=null,this},nt.prototype.each=function(r){var i=this._ctx;return this._read(function(l){return no(i,r,l,i.table.core)})},nt.prototype.count=function(r){var i=this;return this._read(function(l){var f,p=i._ctx,v=p.table.core;return Fr(p,!0)?v.count({trans:l,query:{index:to(p,v.schema),range:p.range}}).then(function(b){return Math.min(b,p.limit)}):(f=0,no(p,function(){return++f,!1},l,v).then(function(){return f}))}).then(r)},nt.prototype.sortBy=function(r,i){var l=r.split(".").reverse(),f=l[0],p=l.length-1;function v(S,N){return N?v(S[l[N]],N-1):S[f]}var b=this._ctx.dir==="next"?1:-1;function w(S,N){return tt(v(S,p),v(N,p))*b}return this.toArray(function(S){return S.slice().sort(w)}).then(i)},nt.prototype.toArray=function(r){var i=this;return this._read(function(l){var f,p,v,b=i._ctx;return Fr(b,!0)&&0<b.limit?(f=b.valueMapper,p=to(b,b.table.core.schema),b.table.core.query({trans:l,limit:b.limit,values:!0,direction:b.dir==="prev"?"prev":void 0,query:{index:p,range:b.range}}).then(function(w){return w=w.result,f?w.map(f):w})):(v=[],no(b,function(w){return v.push(w)},l,b.table.core).then(function(){return v}))},r)},nt.prototype.offset=function(r){var i=this._ctx;return r<=0||(i.offset+=r,Fr(i)?Ci(i,function(){var l=r;return function(f,p){return l===0||(l===1?--l:p(function(){f.advance(l),l=0}),!1)}}):Ci(i,function(){var l=r;return function(){return--l<0}})),this},nt.prototype.limit=function(r){return this._ctx.limit=Math.min(this._ctx.limit,r),Ci(this._ctx,function(){var i=r;return function(l,f,p){return--i<=0&&f(p),0<=i}},!0),this},nt.prototype.until=function(r,i){return xi(this._ctx,function(l,f,p){return!r(l.value)||(f(p),i)}),this},nt.prototype.first=function(r){return this.limit(1).toArray(function(i){return i[0]}).then(r)},nt.prototype.last=function(r){return this.reverse().first(r)},nt.prototype.filter=function(r){var i;return xi(this._ctx,function(l){return r(l.value)}),(i=this._ctx).isMatch=yr(i.isMatch,r),this},nt.prototype.and=function(r){return this.filter(r)},nt.prototype.or=function(r){return new this.db.WhereClause(this._ctx.table,r,this)},nt.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},nt.prototype.desc=function(){return this.reverse()},nt.prototype.eachKey=function(r){var i=this._ctx;return i.keysOnly=!i.isMatch,this.each(function(l,f){r(f.key,f)})},nt.prototype.eachUniqueKey=function(r){return this._ctx.unique="unique",this.eachKey(r)},nt.prototype.eachPrimaryKey=function(r){var i=this._ctx;return i.keysOnly=!i.isMatch,this.each(function(l,f){r(f.primaryKey,f)})},nt.prototype.keys=function(r){var i=this._ctx,l=(i.keysOnly=!i.isMatch,[]);return this.each(function(f,p){l.push(p.key)}).then(function(){return l}).then(r)},nt.prototype.primaryKeys=function(r){var i=this._ctx;if(Fr(i,!0)&&0<i.limit)return this._read(function(f){var p=to(i,i.table.core.schema);return i.table.core.query({trans:f,values:!1,limit:i.limit,direction:i.dir==="prev"?"prev":void 0,query:{index:p,range:i.range}})}).then(function(f){return f.result}).then(r);i.keysOnly=!i.isMatch;var l=[];return this.each(function(f,p){l.push(p.primaryKey)}).then(function(){return l}).then(r)},nt.prototype.uniqueKeys=function(r){return this._ctx.unique="unique",this.keys(r)},nt.prototype.firstKey=function(r){return this.limit(1).keys(function(i){return i[0]}).then(r)},nt.prototype.lastKey=function(r){return this.reverse().firstKey(r)},nt.prototype.distinct=function(){var r,i=this._ctx,i=i.index&&i.table.schema.idxByName[i.index];return i&&i.multi&&(r={},xi(this._ctx,function(f){var f=f.primaryKey.toString(),p=k(r,f);return r[f]=!0,!p})),this},nt.prototype.modify=function(r){var i=this,l=this._ctx;return this._write(function(f){function p(O,I){var z=I.failures;$+=O-I.numFailures;for(var V=0,te=c(z);V<te.length;V++){var pe=te[V];C.push(z[pe])}}var v=typeof r=="function"?r:function(O){return vl(O,r)},b=l.table.core,P=b.schema.primaryKey,w=P.outbound,S=P.extractKey,N=200,P=i.db._options.modifyChunkSize,C=(P&&(N=typeof P=="object"?P[b.name]||P["*"]||200:P),[]),$=0,D=[],M=r===bl;return i.clone().primaryKeys().then(function(O){function I(V){var te=Math.min(N,O.length-V),pe=O.slice(V,V+te);return(M?Promise.resolve([]):b.getMany({trans:f,keys:pe,cache:"immutable"})).then(function(me){var _e=[],ge=[],Te=w?[]:null,we=M?pe:[];if(!M)for(var Oe=0;Oe<te;++Oe){var ve=me[Oe],Be={value:Se(ve),primKey:O[V+Oe]};v.call(Be,Be.value,Be)!==!1&&(Be.value==null?we.push(O[V+Oe]):w||tt(S(ve),S(Be.value))===0?(ge.push(Be.value),w&&Te.push(O[V+Oe])):(we.push(O[V+Oe]),_e.push(Be.value)))}return Promise.resolve(0<_e.length&&b.mutate({trans:f,type:"add",values:_e}).then(function(Ue){for(var ze in Ue.failures)we.splice(parseInt(ze),1);p(_e.length,Ue)})).then(function(){return(0<ge.length||z&&typeof r=="object")&&b.mutate({trans:f,type:"put",keys:Te,values:ge,criteria:z,changeSpec:typeof r!="function"&&r,isAdditionalChunk:0<V}).then(function(Ue){return p(ge.length,Ue)})}).then(function(){return(0<we.length||z&&M)&&b.mutate({trans:f,type:"delete",keys:we,criteria:z,isAdditionalChunk:0<V}).then(function(Ue){return eo(l.table,we,Ue)}).then(function(Ue){return p(we.length,Ue)})}).then(function(){return O.length>V+te&&I(V+N)})})}var z=Fr(l)&&l.limit===1/0&&(typeof r!="function"||M)&&{index:l.index,range:l.range};return I(0).then(function(){if(0<C.length)throw new pt("Error modifying one or more objects",C,$,D);return O.length})})})},nt.prototype.delete=function(){var r=this._ctx,i=r.range;return!Fr(r)||r.table.schema.yProps||!r.isPrimKey&&i.type!==3?this.modify(bl):this._write(function(l){var f=r.table.core.schema.primaryKey,p=i;return r.table.core.count({trans:l,query:{index:f,range:p}}).then(function(v){return r.table.core.mutate({trans:l,type:"deleteRange",range:p}).then(function(S){var w=S.failures,S=S.numFailures;if(S)throw new pt("Could not delete some values",Object.keys(w).map(function(N){return w[N]}),v-S);return v-S})})})};var Tf=nt;function nt(){}var bl=function(r,i){return i.value=null};function Of(r,i){return r<i?-1:r===i?0:1}function Mf(r,i){return i<r?-1:r===i?0:1}function Zt(r,i,l){return r=r instanceof _l?new r.Collection(r):r,r._ctx.error=new(l||TypeError)(i),r}function Nr(r){return new r.Collection(r,function(){return wl("")}).limit(0)}function ro(D,i,l,f){var p,v,b,w,S,N,P,C=l.length;if(!l.every(function(O){return typeof O=="string"}))return Zt(D,ul);function $(O){p=O==="next"?function(z){return z.toUpperCase()}:function(z){return z.toLowerCase()},v=O==="next"?function(z){return z.toLowerCase()}:function(z){return z.toUpperCase()},b=O==="next"?Of:Mf;var I=l.map(function(z){return{lower:v(z),upper:p(z)}}).sort(function(z,V){return b(z.lower,V.lower)});w=I.map(function(z){return z.upper}),S=I.map(function(z){return z.lower}),P=(N=O)==="next"?"":f}$("next");var D=new D.Collection(D,function(){return Yn(w[0],S[C-1]+f)}),M=(D._ondirectionchange=function(O){$(O)},0);return D._addAlgorithm(function(O,I,z){var V=O.key;if(typeof V=="string"){var te=v(V);if(i(te,S,M))return!0;for(var pe=null,me=M;me<C;++me){var _e=((ge,Te,we,Oe,ve,Be)=>{for(var Ue=Math.min(ge.length,Oe.length),ze=-1,Ze=0;Ze<Ue;++Ze){var en=Te[Ze];if(en!==Oe[Ze])return ve(ge[Ze],we[Ze])<0?ge.substr(0,Ze)+we[Ze]+we.substr(Ze+1):ve(ge[Ze],Oe[Ze])<0?ge.substr(0,Ze)+Oe[Ze]+we.substr(Ze+1):0<=ze?ge.substr(0,ze)+Te[ze]+we.substr(ze+1):null;ve(ge[Ze],en)<0&&(ze=Ze)}return Ue<Oe.length&&Be==="next"?ge+we.substr(ge.length):Ue<ge.length&&Be==="prev"?ge.substr(0,we.length):ze<0?null:ge.substr(0,ze)+Oe[ze]+we.substr(ze+1)})(V,te,w[me],S[me],b,N);_e===null&&pe===null?M=me+1:(pe===null||0<b(pe,_e))&&(pe=_e)}I(pe!==null?function(){O.continue(pe+P)}:z)}return!1}),D}function Yn(r,i,l,f){return{type:2,lower:r,upper:i,lowerOpen:l,upperOpen:f}}function wl(r){return{type:1,lower:r,upper:r}}Object.defineProperty(Tt.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),Tt.prototype.between=function(r,i,l,f){l=l!==!1,f=f===!0;try{return 0<this._cmp(r,i)||this._cmp(r,i)===0&&(l||f)&&(!l||!f)?Nr(this):new this.Collection(this,function(){return Yn(r,i,!l,!f)})}catch{return Zt(this,On)}},Tt.prototype.equals=function(r){return r==null?Zt(this,On):new this.Collection(this,function(){return wl(r)})},Tt.prototype.above=function(r){return r==null?Zt(this,On):new this.Collection(this,function(){return Yn(r,void 0,!0)})},Tt.prototype.aboveOrEqual=function(r){return r==null?Zt(this,On):new this.Collection(this,function(){return Yn(r,void 0,!1)})},Tt.prototype.below=function(r){return r==null?Zt(this,On):new this.Collection(this,function(){return Yn(void 0,r,!1,!0)})},Tt.prototype.belowOrEqual=function(r){return r==null?Zt(this,On):new this.Collection(this,function(){return Yn(void 0,r)})},Tt.prototype.startsWith=function(r){return typeof r!="string"?Zt(this,ul):this.between(r,r+mr,!0,!0)},Tt.prototype.startsWithIgnoreCase=function(r){return r===""?this.startsWith(r):ro(this,function(i,l){return i.indexOf(l[0])===0},[r],mr)},Tt.prototype.equalsIgnoreCase=function(r){return ro(this,function(i,l){return i===l[0]},[r],"")},Tt.prototype.anyOfIgnoreCase=function(){var r=Ke.apply(Ie,arguments);return r.length===0?Nr(this):ro(this,function(i,l){return l.indexOf(i)!==-1},r,"")},Tt.prototype.startsWithAnyOfIgnoreCase=function(){var r=Ke.apply(Ie,arguments);return r.length===0?Nr(this):ro(this,function(i,l){return l.some(function(f){return i.indexOf(f)===0})},r,mr)},Tt.prototype.anyOf=function(){var r,i,l=this,f=Ke.apply(Ie,arguments),p=this._cmp;try{f.sort(p)}catch{return Zt(this,On)}return f.length===0?Nr(this):((r=new this.Collection(this,function(){return Yn(f[0],f[f.length-1])}))._ondirectionchange=function(v){p=v==="next"?l._ascending:l._descending,f.sort(p)},i=0,r._addAlgorithm(function(v,b,w){for(var S=v.key;0<p(S,f[i]);)if(++i===f.length)return b(w),!1;return p(S,f[i])===0||(b(function(){v.continue(f[i])}),!1)}),r)},Tt.prototype.notEqual=function(r){return this.inAnyRange([[-1/0,r],[r,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},Tt.prototype.noneOf=function(){var r=Ke.apply(Ie,arguments);if(r.length===0)return new this.Collection(this);try{r.sort(this._ascending)}catch{return Zt(this,On)}var i=r.reduce(function(l,f){return l?l.concat([[l[l.length-1][1],f]]):[[-1/0,f]]},null);return i.push([r[r.length-1],this.db._maxKey]),this.inAnyRange(i,{includeLowers:!1,includeUppers:!1})},Tt.prototype.inAnyRange=function(r,z){var l=this,f=this._cmp,p=this._ascending,v=this._descending,b=this._min,w=this._max;if(r.length===0)return Nr(this);if(!r.every(function(V){return V[0]!==void 0&&V[1]!==void 0&&p(V[0],V[1])<=0}))return Zt(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",he.InvalidArgument);var S=!z||z.includeLowers!==!1,N=z&&z.includeUppers===!0,P,C=p;function $(V,te){return C(V[0],te[0])}try{(P=r.reduce(function(V,te){for(var pe=0,me=V.length;pe<me;++pe){var _e=V[pe];if(f(te[0],_e[1])<0&&0<f(te[1],_e[0])){_e[0]=b(_e[0],te[0]),_e[1]=w(_e[1],te[1]);break}}return pe===me&&V.push(te),V},[])).sort($)}catch{return Zt(this,On)}var D=0,M=N?function(V){return 0<p(V,P[D][1])}:function(V){return 0<=p(V,P[D][1])},O=S?function(V){return 0<v(V,P[D][0])}:function(V){return 0<=v(V,P[D][0])},I=M,z=new this.Collection(this,function(){return Yn(P[0][0],P[P.length-1][1],!S,!N)});return z._ondirectionchange=function(V){C=V==="next"?(I=M,p):(I=O,v),P.sort($)},z._addAlgorithm(function(V,te,pe){for(var me,_e=V.key;I(_e);)if(++D===P.length)return te(pe),!1;return!M(me=_e)&&!O(me)||(l._cmp(_e,P[D][1])===0||l._cmp(_e,P[D][0])===0||te(function(){C===p?V.continue(P[D][0]):V.continue(P[D][1])}),!1)}),z},Tt.prototype.startsWithAnyOf=function(){var r=Ke.apply(Ie,arguments);return r.every(function(i){return typeof i=="string"})?r.length===0?Nr(this):this.inAnyRange(r.map(function(i){return[i,i+mr]})):Zt(this,"startsWithAnyOf() only works with strings")};var _l=Tt;function Tt(){}function dn(r){return mt(function(i){return as(i),r(i.target.error),!1})}function as(r){r.stopPropagation&&r.stopPropagation(),r.preventDefault&&r.preventDefault()}var so="storagemutated",Si="x-storagemutated-1",Jn=os(null,so),If=(yn.prototype._lock=function(){return Y(!je.global),++this._reculock,this._reculock!==1||je.global||(je.lockOwnerFor=this),this},yn.prototype._unlock=function(){if(Y(!je.global),--this._reculock==0)for(je.global||(je.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var r=this._blockedFuncs.shift();try{vr(r[1],r[0])}catch{}}return this},yn.prototype._locked=function(){return this._reculock&&je.lockOwnerFor!==this},yn.prototype.create=function(r){var i=this;if(this.mode){var l=this.db.idbdb,f=this.db._state.dbOpenError;if(Y(!this.idbtrans),!r&&!l)switch(f&&f.name){case"DatabaseClosedError":throw new he.DatabaseClosed(f);case"MissingAPIError":throw new he.MissingAPI(f.message,f);default:throw new he.OpenFailed(f)}if(!this.active)throw new he.TransactionInactive;Y(this._completion._state===null),(r=this.idbtrans=r||(this.db.core||l).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=mt(function(p){as(p),i._reject(r.error)}),r.onabort=mt(function(p){as(p),i.active&&i._reject(new he.Abort(r.error)),i.active=!1,i.on("abort").fire(p)}),r.oncomplete=mt(function(){i.active=!1,i._resolve(),"mutatedParts"in r&&Jn.storagemutated.fire(r.mutatedParts)})}return this},yn.prototype._promise=function(r,i,l){var f,p=this;return r==="readwrite"&&this.mode!=="readwrite"?Ct(new he.ReadOnly("Transaction is readonly")):this.active?this._locked()?new Ee(function(v,b){p._blockedFuncs.push([function(){p._promise(r,i,l).then(v,b)},je])}):l?Wn(function(){var v=new Ee(function(b,w){p._lock();var S=i(b,w,p);S&&S.then&&S.then(b,w)});return v.finally(function(){return p._unlock()}),v._lib=!0,v}):((f=new Ee(function(v,b){var w=i(v,b,p);w&&w.then&&w.then(v,b)}))._lib=!0,f):Ct(new he.TransactionInactive)},yn.prototype._root=function(){return this.parent?this.parent._root():this},yn.prototype.waitFor=function(r){var i,l=this._root(),f=Ee.resolve(r),p=(l._waitingFor?l._waitingFor=l._waitingFor.then(function(){return f}):(l._waitingFor=f,l._waitingQueue=[],i=l.idbtrans.objectStore(l.storeNames[0]),function v(){for(++l._spinCount;l._waitingQueue.length;)l._waitingQueue.shift()();l._waitingFor&&(i.get(-1/0).onsuccess=v)}()),l._waitingFor);return new Ee(function(v,b){f.then(function(w){return l._waitingQueue.push(mt(v.bind(null,w)))},function(w){return l._waitingQueue.push(mt(b.bind(null,w)))}).finally(function(){l._waitingFor===p&&(l._waitingFor=null)})})},yn.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new he.Abort))},yn.prototype.table=function(r){var i=this._memoizedTables||(this._memoizedTables={});if(k(i,r))return i[r];var l=this.schema[r];if(l)return(l=new this.db.Table(r,l,this)).core=this.db.core.table(r),i[r]=l;throw new he.NotFound("Table "+r+" not part of transaction")},yn);function yn(){}function Ei(r,i,l,f,p,v,b,w){return{name:r,keyPath:i,unique:l,multi:f,auto:p,compound:v,src:(l&&!b?"&":"")+(f?"*":"")+(p?"++":"")+kl(i),type:w}}function kl(r){return typeof r=="string"?r:r?"["+[].join.call(r,"+")+"]":""}function $i(r,i,l){return{name:r,primKey:i,indexes:l,mappedClass:null,idxByName:(f=function(p){return[p.name,p]},l.reduce(function(p,v,b){return v=f(v,b),v&&(p[v[0]]=v[1]),p},{}))};var f}var ls=function(r){try{return r.only([[]]),ls=function(){return[[]]},[[]]}catch{return ls=function(){return mr},mr}};function Ai(r){return r==null?function(){}:typeof r=="string"?(i=r).split(".").length===1?function(l){return l[i]}:function(l){return ie(l,i)}:function(l){return ie(l,r)};var i}function xl(r){return[].slice.call(r)}var jf=0;function us(r){return r==null?":id":typeof r=="string"?r:"[".concat(r.join("+"),"]")}function Df(r,i,b){function f(I){if(I.type===3)return null;if(I.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var D=I.lower,M=I.upper,O=I.lowerOpen,I=I.upperOpen;return D===void 0?M===void 0?null:i.upperBound(M,!!I):M===void 0?i.lowerBound(D,!!O):i.bound(D,M,!!O,!!I)}function p($){var D,M,O=$.name;return{name:O,schema:$,mutate:function(I){var z=I.trans,V=I.type,te=I.keys,pe=I.values,me=I.range;return new Promise(function(_e,ge){_e=mt(_e);var Te=z.objectStore(O),we=Te.keyPath==null,Oe=V==="put"||V==="add";if(!Oe&&V!=="delete"&&V!=="deleteRange")throw new Error("Invalid operation type: "+V);var ve,Be=(te||pe||{length:1}).length;if(te&&pe&&te.length!==pe.length)throw new Error("Given keys array must have same length as given values array.");if(Be===0)return _e({numFailures:0,failures:{},results:[],lastResult:void 0});function Ue(qt){++en,as(qt)}var ze=[],Ze=[],en=0;if(V==="deleteRange"){if(me.type===4)return _e({numFailures:en,failures:Ze,results:[],lastResult:void 0});me.type===3?ze.push(ve=Te.clear()):ze.push(ve=Te.delete(f(me)))}else{var we=Oe?we?[pe,te]:[pe,null]:[te,null],qe=we[0],Rt=we[1];if(Oe)for(var Lt=0;Lt<Be;++Lt)ze.push(ve=Rt&&Rt[Lt]!==void 0?Te[V](qe[Lt],Rt[Lt]):Te[V](qe[Lt])),ve.onerror=Ue;else for(Lt=0;Lt<Be;++Lt)ze.push(ve=Te[V](qe[Lt])),ve.onerror=Ue}function yo(qt){qt=qt.target.result,ze.forEach(function(wr,Wi){return wr.error!=null&&(Ze[Wi]=wr.error)}),_e({numFailures:en,failures:Ze,results:V==="delete"?te:ze.map(function(wr){return wr.result}),lastResult:qt})}ve.onerror=function(qt){Ue(qt),yo(qt)},ve.onsuccess=yo})},getMany:function(I){var z=I.trans,V=I.keys;return new Promise(function(te,pe){te=mt(te);for(var me,_e=z.objectStore(O),ge=V.length,Te=new Array(ge),we=0,Oe=0,ve=function(ze){ze=ze.target,Te[ze._pos]=ze.result,++Oe===we&&te(Te)},Be=dn(pe),Ue=0;Ue<ge;++Ue)V[Ue]!=null&&((me=_e.get(V[Ue]))._pos=Ue,me.onsuccess=ve,me.onerror=Be,++we);we===0&&te(Te)})},get:function(I){var z=I.trans,V=I.key;return new Promise(function(te,pe){te=mt(te);var me=z.objectStore(O).get(V);me.onsuccess=function(_e){return te(_e.target.result)},me.onerror=dn(pe)})},query:(D=S,M=N,function(I){return new Promise(function(z,V){z=mt(z);var te,pe,me,_e,Be=I.trans,ge=I.values,Te=I.limit,ve=I.query,we=(we=I.direction)!=null?we:"next",Oe=Te===1/0?void 0:Te,Ue=ve.index,ve=ve.range,Be=Be.objectStore(O),Be=Ue.isPrimaryKey?Be:Be.index(Ue.name),Ue=f(ve);if(Te===0)return z({result:[]});M?(ve={query:Ue,count:Oe,direction:we},(te=ge?Be.getAll(ve):Be.getAllKeys(ve)).onsuccess=function(ze){return z({result:ze.target.result})},te.onerror=dn(V)):D&&we==="next"?((te=ge?Be.getAll(Ue,Oe):Be.getAllKeys(Ue,Oe)).onsuccess=function(ze){return z({result:ze.target.result})},te.onerror=dn(V)):(pe=0,me=!ge&&"openKeyCursor"in Be?Be.openKeyCursor(Ue,we):Be.openCursor(Ue,we),_e=[],me.onsuccess=function(){var ze=me.result;return!ze||(_e.push(ge?ze.value:ze.primaryKey),++pe===Te)?z({result:_e}):void ze.continue()},me.onerror=dn(V))})}),openCursor:function(I){var z=I.trans,V=I.values,te=I.query,pe=I.reverse,me=I.unique;return new Promise(function(_e,ge){_e=mt(_e);var Oe=te.index,Te=te.range,we=z.objectStore(O),we=Oe.isPrimaryKey?we:we.index(Oe.name),Oe=pe?me?"prevunique":"prev":me?"nextunique":"next",ve=!V&&"openKeyCursor"in we?we.openKeyCursor(f(Te),Oe):we.openCursor(f(Te),Oe);ve.onerror=dn(ge),ve.onsuccess=mt(function(Be){var Ue,ze,Ze,en,qe=ve.result;qe?(qe.___id=++jf,qe.done=!1,Ue=qe.continue.bind(qe),ze=(ze=qe.continuePrimaryKey)&&ze.bind(qe),Ze=qe.advance.bind(qe),en=function(){throw new Error("Cursor not stopped")},qe.trans=z,qe.stop=qe.continue=qe.continuePrimaryKey=qe.advance=function(){throw new Error("Cursor not started")},qe.fail=mt(ge),qe.next=function(){var Rt=this,Lt=1;return this.start(function(){return Lt--?Rt.continue():Rt.stop()}).then(function(){return Rt})},qe.start=function(Rt){function Lt(){if(ve.result)try{Rt()}catch(qt){qe.fail(qt)}else qe.done=!0,qe.start=function(){throw new Error("Cursor behind last entry")},qe.stop()}var yo=new Promise(function(qt,wr){qt=mt(qt),ve.onerror=dn(wr),qe.fail=wr,qe.stop=function(Wi){qe.stop=qe.continue=qe.continuePrimaryKey=qe.advance=en,qt(Wi)}});return ve.onsuccess=mt(function(qt){ve.onsuccess=Lt,Lt()}),qe.continue=Ue,qe.continuePrimaryKey=ze,qe.advance=Ze,Lt(),yo},_e(qe)):_e(null)},ge)})},count:function(I){var z=I.query,V=I.trans,te=z.index,pe=z.range;return new Promise(function(me,_e){var ge=V.objectStore(O),ge=te.isPrimaryKey?ge:ge.index(te.name),Te=f(pe),Te=Te?ge.count(Te):ge.count();Te.onsuccess=mt(function(we){return me(we.target.result)}),Te.onerror=dn(_e)})}}}v=b,w=xl((b=r).objectStoreNames),P=0<w.length?v.objectStore(w[0]):{};var v,b={schema:{name:b.name,tables:w.map(function($){return v.objectStore($)}).map(function($){var D=$.keyPath,M=$.autoIncrement,I=d(D),O={},I={name:$.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:D==null,compound:I,keyPath:D,autoIncrement:M,unique:!0,extractKey:Ai(D)},indexes:xl($.indexNames).map(function(z){return $.index(z)}).map(function(pe){var me=pe.name,V=pe.unique,te=pe.multiEntry,pe=pe.keyPath,me={name:me,compound:d(pe),keyPath:pe,unique:V,multiEntry:te,extractKey:Ai(pe)};return O[us(pe)]=me}),getIndexByKeyPath:function(z){return O[us(z)]}};return O[":id"]=I.primaryKey,D!=null&&(O[us(D)]=I.primaryKey),I})},hasGetAll:0<w.length&&"getAll"in P&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604),hasIdb3Features:"getAllRecords"in P},w=b.schema,S=b.hasGetAll,N=b.hasIdb3Features,P=w.tables.map(p),C={};return P.forEach(function($){return C[$.name]=$}),{stack:"dbcore",transaction:r.transaction.bind(r),table:function($){if(C[$])return C[$];throw new Error("Table '".concat($,"' not found"))},MIN_KEY:-1/0,MAX_KEY:ls(i),schema:w}}function Rf(r,i,l,f){return l=l.IDBKeyRange,i=Df(i,l,f),{dbcore:r.dbcore.reduce(function(p,v){return v=v.create,s(s({},p),v(p))},i)}}function oo(r,i){var l=i.db,l=Rf(r._middlewares,l,r._deps,i);r.core=l.dbcore,r.tables.forEach(function(f){var p=f.name;r.core.schema.tables.some(function(v){return v.name===p})&&(f.core=r.core.table(p),r[p]instanceof r.Table)&&(r[p].core=f.core)})}function io(r,i,l,f){l.forEach(function(p){var v=f[p];i.forEach(function(b){var w=function S(N,P){return fe(N,P)||(N=g(N))&&S(N,P)}(b,p);(!w||"value"in w&&w.value===void 0)&&(b===r.Transaction.prototype||b instanceof r.Transaction?L(b,p,{get:function(){return this.table(p)},set:function(S){T(this,p,{value:S,writable:!0,configurable:!0,enumerable:!0})}}):b[p]=new r.Table(p,v))})})}function Pi(r,i){i.forEach(function(l){for(var f in l)l[f]instanceof r.Table&&delete l[f]})}function Lf(r,i){return r._cfg.version-i._cfg.version}function Kf(r,i,l,f){var p=r._dbSchema,v=(l.objectStoreNames.contains("$meta")&&!p.$meta&&(p.$meta=$i("$meta",Sl("")[0],[]),r._storeNames.push("$meta")),r._createTransaction("readwrite",r._storeNames,p)),b=(v.create(l),v._completion.catch(f),v._reject.bind(v)),w=je.transless||je;Wn(function(){if(je.trans=v,je.transless=w,i!==0)return oo(r,l),N=i,((S=v).storeNames.includes("$meta")?S.table("$meta").get("version").then(function(P){return P??N}):Ee.resolve(N)).then(function(I){var C=r,$=I,D=v,M=l,O=[],I=C._versions,z=C._dbSchema=lo(0,C.idbdb,M);return(I=I.filter(function(V){return V._cfg.version>=$})).length===0?Ee.resolve():(I.forEach(function(V){O.push(function(){var te,pe,me,_e=z,ge=V._cfg.dbschema,Te=(uo(C,_e,M),uo(C,ge,M),z=C._dbSchema=ge,Ti(_e,ge)),we=(Te.add.forEach(function(Oe){Oi(M,Oe[0],Oe[1].primKey,Oe[1].indexes)}),Te.change.forEach(function(Oe){if(Oe.recreate)throw new he.Upgrade("Not yet support for changing primary key");var ve=M.objectStore(Oe.name);Oe.add.forEach(function(Be){return ao(ve,Be)}),Oe.change.forEach(function(Be){ve.deleteIndex(Be.name),ao(ve,Be)}),Oe.del.forEach(function(Be){return ve.deleteIndex(Be)})}),V._cfg.contentUpgrade);if(we&&V._cfg.version>$)return oo(C,M),D._memoizedTables={},te=A(ge),Te.del.forEach(function(Oe){te[Oe]=_e[Oe]}),Pi(C,[C.Transaction.prototype]),io(C,[C.Transaction.prototype],c(te),te),D.schema=te,(pe=de(we))&&Kr(),ge=Ee.follow(function(){var Oe;(me=we(D))&&pe&&(Oe=zn.bind(null,null),me.then(Oe,Oe))}),me&&typeof me.then=="function"?Ee.resolve(me):ge.then(function(){return me})}),O.push(function(te){var pe,me,_e=V._cfg.dbschema;pe=_e,me=te,[].slice.call(me.db.objectStoreNames).forEach(function(ge){return pe[ge]==null&&me.db.deleteObjectStore(ge)}),Pi(C,[C.Transaction.prototype]),io(C,[C.Transaction.prototype],C._storeNames,C._dbSchema),D.schema=C._dbSchema}),O.push(function(te){C.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(C.idbdb.version/10)===V._cfg.version?(C.idbdb.deleteObjectStore("$meta"),delete C._dbSchema.$meta,C._storeNames=C._storeNames.filter(function(pe){return pe!=="$meta"})):te.objectStore("$meta").put(V._cfg.version,"version"))})}),function V(){return O.length?Ee.resolve(O.shift()(D.idbtrans)).then(V):Ee.resolve()}().then(function(){Cl(z,M)}))}).catch(b);var S,N;c(p).forEach(function(P){Oi(l,P,p[P].primKey,p[P].indexes)}),oo(r,l),Ee.follow(function(){return r.on.populate.fire(v)}).catch(b)})}function Ff(r,i){Cl(r._dbSchema,i),i.db.version%10!=0||i.objectStoreNames.contains("$meta")||i.db.createObjectStore("$meta").add(Math.ceil(i.db.version/10-1),"version");var l=lo(0,r.idbdb,i);uo(r,r._dbSchema,i);for(var f=0,p=Ti(l,r._dbSchema).change;f<p.length;f++){var v=(b=>{if(b.change.length||b.recreate)return console.warn("Unable to patch indexes of table ".concat(b.name," because it has changes on the type of index or primary key.")),{value:void 0};var w=i.objectStore(b.name);b.add.forEach(function(S){B&&console.debug("Dexie upgrade patch: Creating missing index ".concat(b.name,".").concat(S.src)),ao(w,S)})})(p[f]);if(typeof v=="object")return v.value}}function Ti(r,i){var l,f={del:[],add:[],change:[]};for(l in r)i[l]||f.del.push(l);for(l in i){var p=r[l],v=i[l];if(p){var b={name:l,def:v,recreate:!1,del:[],add:[],change:[]};if(""+(p.primKey.keyPath||"")!=""+(v.primKey.keyPath||"")||p.primKey.auto!==v.primKey.auto)b.recreate=!0,f.change.push(b);else{var w=p.idxByName,S=v.idxByName,N=void 0;for(N in w)S[N]||b.del.push(N);for(N in S){var P=w[N],C=S[N];P?P.src!==C.src&&b.change.push(C):b.add.push(C)}(0<b.del.length||0<b.add.length||0<b.change.length)&&f.change.push(b)}}else f.add.push([l,v])}return f}function Oi(r,i,l,f){var p=r.db.createObjectStore(i,l.keyPath?{keyPath:l.keyPath,autoIncrement:l.auto}:{autoIncrement:l.auto});f.forEach(function(v){return ao(p,v)})}function Cl(r,i){c(r).forEach(function(l){i.db.objectStoreNames.contains(l)||(B&&console.debug("Dexie: Creating missing table",l),Oi(i,l,r[l].primKey,r[l].indexes))})}function ao(r,i){r.createIndex(i.name,i.keyPath,{unique:i.unique,multiEntry:i.multi})}function lo(r,i,l){var f={};return E(i.objectStoreNames,0).forEach(function(p){for(var v=l.objectStore(p),b=Ei(kl(N=v.keyPath),N||"",!0,!1,!!v.autoIncrement,N&&typeof N!="string",!0),w=[],S=0;S<v.indexNames.length;++S){var P=v.index(v.indexNames[S]),N=P.keyPath,P=Ei(P.name,N,!!P.unique,!!P.multiEntry,!1,N&&typeof N!="string",!1);w.push(P)}f[p]=$i(p,b,w)}),f}function uo(r,i,l){for(var f=l.db.objectStoreNames,p=0;p<f.length;++p){var v=f[p],b=l.objectStore(v);r._hasGetAll="getAll"in b;for(var w=0;w<b.indexNames.length;++w){var S,N=b.indexNames[w],P=b.index(N).keyPath,P=typeof P=="string"?P:"["+E(P).join("+")+"]";i[v]&&(S=i[v].idxByName[P])&&(S.name=N,delete i[v].idxByName[P],i[v].idxByName[N]=S)}}typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&a.WorkerGlobalScope&&a instanceof a.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(r._hasGetAll=!1)}function Sl(r){return r.split(",").map(function(i,l){var p=i.split(":"),f=(f=p[1])==null?void 0:f.trim(),p=(i=p[0].trim()).replace(/([&*]|\+\+)/g,""),v=/^\[/.test(p)?p.match(/^\[(.*)\]$/)[1].split("+"):p;return Ei(p,v||null,/\&/.test(i),/\*/.test(i),/\+\+/.test(i),d(v),l===0,f)})}Vr.prototype._createTableSchema=$i,Vr.prototype._parseIndexSyntax=Sl,Vr.prototype._parseStoresSpec=function(r,i){var l=this;c(r).forEach(function(f){if(r[f]!==null){var p=l._parseIndexSyntax(r[f]),v=p.shift();if(!v)throw new he.Schema("Invalid schema for table "+f+": "+r[f]);if(v.unique=!0,v.multi)throw new he.Schema("Primary key cannot be multiEntry*");p.forEach(function(b){if(b.auto)throw new he.Schema("Only primary key can be marked as autoIncrement (++)");if(!b.keyPath)throw new he.Schema("Index must have a name and cannot be an empty string")}),v=l._createTableSchema(f,v,p),i[f]=v}})},Vr.prototype.stores=function(l){var i=this.db,l=(this._cfg.storesSource=this._cfg.storesSource?h(this._cfg.storesSource,l):l,i._versions),f={},p={};return l.forEach(function(v){h(f,v._cfg.storesSource),p=v._cfg.dbschema={},v._parseStoresSpec(f,p)}),i._dbSchema=p,Pi(i,[i._allTables,i,i.Transaction.prototype]),io(i,[i._allTables,i,i.Transaction.prototype,this._cfg.tables],c(p),p),i._storeNames=c(p),this},Vr.prototype.upgrade=function(r){return this._cfg.contentUpgrade=q(this._cfg.contentUpgrade||_,r),this};var Nf=Vr;function Vr(){}var cs=(()=>{var r,i,l;return typeof FinalizationRegistry<"u"&&typeof WeakRef<"u"?(r=new Set,i=new FinalizationRegistry(function(f){r.delete(f)}),{toArray:function(){return Array.from(r).map(function(f){return f.deref()}).filter(function(f){return f!==void 0})},add:function(f){var p=new WeakRef(f._novip);r.add(p),i.register(f._novip,p,p),r.size>f._options.maxConnections&&(p=r.values().next().value,r.delete(p),i.unregister(p))},remove:function(f){if(f)for(var p=r.values(),v=p.next();!v.done;){var b=v.value;if(b.deref()===f._novip)return r.delete(b),void i.unregister(b);v=p.next()}}}):(l=[],{toArray:function(){return l},add:function(f){l.push(f._novip)},remove:function(f){f&&(f=l.indexOf(f._novip))!==-1&&l.splice(f,1)}})})();function Mi(r,i){var l=r._dbNamesDB;return l||(l=r._dbNamesDB=new Mn(Qs,{addons:[],indexedDB:r,IDBKeyRange:i})).version(1).stores({dbnames:"name"}),l.table("dbnames")}function Ii(r){return r&&typeof r.databases=="function"}function ji(r){return Wn(function(){return je.letThrough=!0,r()})}function Di(r){return!("from"in r)}var Dt=function(r,i){var l;if(!this)return l=new Dt,r&&"d"in r&&h(l,r),l;h(this,arguments.length?{d:1,from:r,to:1<arguments.length?i:r}:{d:0})};function fs(r,i,l){var f=tt(i,l);if(!isNaN(f)){if(0<f)throw RangeError();if(Di(r))return h(r,{from:i,to:l,d:1});var f=r.l,p=r.r;if(tt(l,r.from)<0)return f?fs(f,i,l):r.l={from:i,to:l,d:1,l:null,r:null},$l(r);if(0<tt(i,r.to))return p?fs(p,i,l):r.r={from:i,to:l,d:1,l:null,r:null},$l(r);tt(i,r.from)<0&&(r.from=i,r.l=null,r.d=p?p.d+1:1),0<tt(l,r.to)&&(r.to=l,r.r=null,r.d=r.l?r.l.d+1:1),i=!r.r,f&&!r.l&&ds(r,f),p&&i&&ds(r,p)}}function ds(r,i){Di(i)||function l(f,p){var v=p.from,b=p.l,w=p.r;fs(f,v,p.to),b&&l(f,b),w&&l(f,w)}(r,i)}function El(r,i){var l=co(i),f=l.next();if(!f.done)for(var p=f.value,v=co(r),b=v.next(p.from),w=b.value;!f.done&&!b.done;){if(tt(w.from,p.to)<=0&&0<=tt(w.to,p.from))return!0;tt(p.from,w.from)<0?p=(f=l.next(w.from)).value:w=(b=v.next(p.from)).value}return!1}function co(r){var i=Di(r)?null:{s:0,n:r};return{next:function(l){for(var f=0<arguments.length;i;)switch(i.s){case 0:if(i.s=1,f)for(;i.n.l&&tt(l,i.n.from)<0;)i={up:i,n:i.n.l,s:1};else for(;i.n.l;)i={up:i,n:i.n.l,s:1};case 1:if(i.s=2,!f||tt(l,i.n.to)<=0)return{value:i.n,done:!1};case 2:if(i.n.r){i.s=3,i={up:i,n:i.n.r,s:0};continue}case 3:i=i.up}return{done:!0}}}}function $l(r){var i,l,f,p=(((p=r.r)==null?void 0:p.d)||0)-(((p=r.l)==null?void 0:p.d)||0),p=1<p?"r":p<-1?"l":"";p&&(i=p=="r"?"l":"r",l=s({},r),f=r[p],r.from=f.from,r.to=f.to,r[p]=f[p],l[p]=f[i],(r[i]=l).d=Al(l)),r.d=Al(r)}function Al(l){var i=l.r,l=l.l;return(i?l?Math.max(i.d,l.d):i.d:l?l.d:0)+1}function fo(r,i){return c(i).forEach(function(l){r[l]?ds(r[l],i[l]):r[l]=function f(p){var v,b,w={};for(v in p)k(p,v)&&(b=p[v],w[v]=!b||typeof b!="object"||Ce.has(b.constructor)?b:f(b));return w}(i[l])}),r}function Ri(r,i){return r.all||i.all||Object.keys(r).some(function(l){return i[l]&&El(i[l],r[l])})}j(Dt.prototype,((Ye={add:function(r){return ds(this,r),this},addKey:function(r){return fs(this,r,r),this},addKeys:function(r){var i=this;return r.forEach(function(l){return fs(i,l,l)}),this},hasKey:function(r){var i=co(this).next(r).value;return i&&tt(i.from,r)<=0&&0<=tt(i.to,r)}})[Ne]=function(){return co(this)},Ye));var gr={},Li={},Ki=!1;function po(r){fo(Li,r),Ki||(Ki=!0,setTimeout(function(){Ki=!1,Fi(Li,!(Li={}))},0))}function Fi(r,i){i===void 0&&(i=!1);var l=new Set;if(r.all)for(var f=0,p=Object.values(gr);f<p.length;f++)Pl(w=p[f],r,l,i);else for(var v in r){var b,w,v=/^idb\:\/\/(.*)\/(.*)\//.exec(v);v&&(b=v[1],v=v[2],w=gr["idb://".concat(b,"/").concat(v)])&&Pl(w,r,l,i)}l.forEach(function(S){return S()})}function Pl(r,i,l,f){for(var p=[],v=0,b=Object.entries(r.queries.query);v<b.length;v++){for(var w=b[v],S=w[0],N=[],P=0,C=w[1];P<C.length;P++){var $=C[P];Ri(i,$.obsSet)?$.subscribers.forEach(function(I){return l.add(I)}):f&&N.push($)}f&&p.push([S,N])}if(f)for(var D=0,M=p;D<M.length;D++){var O=M[D],S=O[0],N=O[1];r.queries.query[S]=N}}function Vf(r){var i=r._state,l=r._deps.indexedDB;if(i.isBeingOpened||r.idbdb)return i.dbReadyPromise.then(function(){return i.dbOpenError?Ct(i.dbOpenError):r});i.isBeingOpened=!0,i.dbOpenError=null,i.openComplete=!1;var f=i.openCanceller,p=Math.round(10*r.verno),v=!1;function b(){if(i.openCanceller!==f)throw new he.DatabaseClosed("db.open() was cancelled")}function w(){return new Ee(function($,D){if(b(),!l)throw new he.MissingAPI;var M=r.name,O=i.autoSchema||!p?l.open(M):l.open(M,p);if(!O)throw new he.MissingAPI;O.onerror=dn(D),O.onblocked=mt(r._fireOnBlocked),O.onupgradeneeded=mt(function(I){var z;P=O.transaction,i.autoSchema&&!r._options.allowEmptyDB?(O.onerror=as,P.abort(),O.result.close(),(z=l.deleteDatabase(M)).onsuccess=z.onerror=mt(function(){D(new he.NoSuchDatabase("Database ".concat(M," doesnt exist")))})):(P.onerror=dn(D),z=I.oldVersion>Math.pow(2,62)?0:I.oldVersion,C=z<1,r.idbdb=O.result,v&&Ff(r,P),Kf(r,z/10,P,D))},D),O.onsuccess=mt(function(){P=null;var I,z,V,te,pe,me,_e=r.idbdb=O.result,ge=E(_e.objectStoreNames);if(0<ge.length)try{var Te=_e.transaction((pe=ge).length===1?pe[0]:pe,"readonly");if(i.autoSchema)me=_e,te=Te,(V=r).verno=me.version/10,te=V._dbSchema=lo(0,me,te),V._storeNames=E(me.objectStoreNames,0),io(V,[V._allTables],c(te),te);else if(uo(r,r._dbSchema,Te),z=Te,((z=Ti(lo(0,(I=r).idbdb,z),I._dbSchema)).add.length||z.change.some(function(we){return we.add.length||we.change.length}))&&!v)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),_e.close(),p=_e.version+1,v=!0,$(w());oo(r,Te)}catch{}cs.add(r),_e.onversionchange=mt(function(we){i.vcFired=!0,r.on("versionchange").fire(we)}),_e.onclose=mt(function(){r.close({disableAutoOpen:!1})}),C&&(ge=r._deps,pe=M,Ii(me=ge.indexedDB)||pe===Qs||Mi(me,ge.IDBKeyRange).put({name:pe}).catch(_)),$()},D)}).catch(function($){switch($==null?void 0:$.name){case"UnknownError":if(0<i.PR1398_maxLoop)return i.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),w();break;case"VersionError":if(0<p)return p=0,w()}return Ee.reject($)})}var S,N=i.dbReadyResolve,P=null,C=!1;return Ee.race([f,(typeof navigator>"u"?Ee.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function($){function D(){return indexedDB.databases().finally($)}S=setInterval(D,100),D()}).finally(function(){return clearInterval(S)}):Promise.resolve()).then(w)]).then(function(){return b(),i.onReadyBeingFired=[],Ee.resolve(ji(function(){return r.on.ready.fire(r.vip)})).then(function $(){var D;if(0<i.onReadyBeingFired.length)return D=i.onReadyBeingFired.reduce(q,_),i.onReadyBeingFired=[],Ee.resolve(ji(function(){return D(r.vip)})).then($)})}).finally(function(){i.openCanceller===f&&(i.onReadyBeingFired=null,i.isBeingOpened=!1)}).catch(function($){i.dbOpenError=$;try{P&&P.abort()}catch{}return f===i.openCanceller&&r._close(),Ct($)}).finally(function(){i.openComplete=!0,N()}).then(function(){var $;return C&&($={},r.tables.forEach(function(D){D.schema.indexes.forEach(function(M){M.name&&($["idb://".concat(r.name,"/").concat(D.name,"/").concat(M.name)]=new Dt(-1/0,[[[]]]))}),$["idb://".concat(r.name,"/").concat(D.name,"/")]=$["idb://".concat(r.name,"/").concat(D.name,"/:dels")]=new Dt(-1/0,[[[]]])}),Jn(so).fire($),Fi($,!0)),r})}function Ni(r){function i(v){return r.next(v)}var l=p(i),f=p(function(v){return r.throw(v)});function p(v){return function(w){var w=v(w),S=w.value;return w.done?S:S&&typeof S.then=="function"?S.then(l,f):d(S)?Promise.all(S).then(l,f):l(S)}}return p(i)()}function ho(r,i,l){for(var f=d(r)?r.slice():[r],p=0;p<l;++p)f.push(i);return f}var Bf={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(r){return s(s({},r),{table:function(f){var l=r.table(f),f=l.schema,p=Object.create(null),v=[];function b($,D,M){var V=us($),O=p[V]=p[V]||[],I=$==null?0:typeof $=="string"?1:$.length,z=0<D,V=s(s({},M),{name:z?"".concat(V,"(virtual-from:").concat(M.name,")"):M.name,lowLevelIndex:M,isVirtual:z,keyTail:D,keyLength:I,extractKey:Ai($),unique:!z&&M.unique});return O.push(V),V.isPrimaryKey||v.push(V),1<I&&b(I===2?$[0]:$.slice(0,I-1),D+1,M),O.sort(function(te,pe){return te.keyTail-pe.keyTail}),V}var w=b(f.primaryKey.keyPath,0,f.primaryKey);p[":id"]=[w];for(var S=0,N=f.indexes;S<N.length;S++){var P=N[S];b(P.keyPath,0,P)}function C($){var D,M=$.query.index;return M.isVirtual?s(s({},$),{query:{index:M.lowLevelIndex,range:(D=$.query.range,M=M.keyTail,{type:D.type===1?2:D.type,lower:ho(D.lower,D.lowerOpen?r.MAX_KEY:r.MIN_KEY,M),lowerOpen:!0,upper:ho(D.upper,D.upperOpen?r.MIN_KEY:r.MAX_KEY,M),upperOpen:!0})}}):$}return s(s({},l),{schema:s(s({},f),{primaryKey:w,indexes:v,getIndexByKeyPath:function($){return($=p[us($)])&&$[0]}}),count:function($){return l.count(C($))},query:function($){return l.query(C($))},openCursor:function($){var D=$.query.index,M=D.keyTail,O=D.keyLength;return D.isVirtual?l.openCursor(C($)).then(function(z){return z&&I(z)}):l.openCursor($);function I(z){return Object.create(z,{continue:{value:function(V){V!=null?z.continue(ho(V,$.reverse?r.MAX_KEY:r.MIN_KEY,M)):$.unique?z.continue(z.key.slice(0,O).concat($.reverse?r.MIN_KEY:r.MAX_KEY,M)):z.continue()}},continuePrimaryKey:{value:function(V,te){z.continuePrimaryKey(ho(V,r.MAX_KEY,M),te)}},primaryKey:{get:function(){return z.primaryKey}},key:{get:function(){var V=z.key;return O===1?V[0]:V.slice(0,O)}},value:{get:function(){return z.value}}})}}})}})}};function Vi(r,i,l,f){return l=l||{},f=f||"",c(r).forEach(function(p){var v,b,w;k(i,p)?(v=r[p],b=i[p],typeof v=="object"&&typeof b=="object"&&v&&b?(w=Xe(v))!==Xe(b)?l[f+p]=i[p]:w==="Object"?Vi(v,b,l,f+p+"."):v!==b&&(l[f+p]=i[p]):v!==b&&(l[f+p]=i[p])):l[f+p]=void 0}),c(i).forEach(function(p){k(r,p)||(l[f+p]=i[p])}),l}function Bi(r,i){return i.type==="delete"?i.keys:i.keys||i.values.map(r.extractKey)}var Uf={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(r){return s(s({},r),{table:function(i){var l=r.table(i),f=l.schema.primaryKey;return s(s({},l),{mutate:function(p){var v=je.trans,b=v.table(i).hook,w=b.deleting,S=b.creating,N=b.updating;switch(p.type){case"add":if(S.fire===_)break;return v._promise("readwrite",function(){return P(p)},!0);case"put":if(S.fire===_&&N.fire===_)break;return v._promise("readwrite",function(){return P(p)},!0);case"delete":if(w.fire===_)break;return v._promise("readwrite",function(){return P(p)},!0);case"deleteRange":if(w.fire===_)break;return v._promise("readwrite",function(){return function C($,D,M){return l.query({trans:$,values:!1,query:{index:f,range:D},limit:M}).then(function(O){var I=O.result;return P({type:"delete",keys:I,trans:$}).then(function(z){return 0<z.numFailures?Promise.reject(z.failures[0]):I.length<M?{failures:[],numFailures:0,lastResult:void 0}:C($,s(s({},D),{lower:I[I.length-1],lowerOpen:!0}),M)})})}(p.trans,p.range,1e4)},!0)}return l.mutate(p);function P(C){var $,D,M,O=je.trans,I=C.keys||Bi(f,C);if(I)return(C=C.type==="add"||C.type==="put"?s(s({},C),{keys:I}):s({},C)).type!=="delete"&&(C.values=o([],C.values)),C.keys&&(C.keys=o([],C.keys)),$=l,M=I,((D=C).type==="add"?Promise.resolve([]):$.getMany({trans:D.trans,keys:M,cache:"immutable"})).then(function(z){var V=I.map(function(te,pe){var me,_e,ge,Te=z[pe],we={onerror:null,onsuccess:null};return C.type==="delete"?w.fire.call(we,te,Te,O):C.type==="add"||Te===void 0?(me=S.fire.call(we,te,C.values[pe],O),te==null&&me!=null&&(C.keys[pe]=te=me,f.outbound||Z(C.values[pe],f.keyPath,te))):(me=Vi(Te,C.values[pe]),(_e=N.fire.call(we,me,te,Te,O))&&(ge=C.values[pe],Object.keys(_e).forEach(function(Oe){k(ge,Oe)?ge[Oe]=_e[Oe]:Z(ge,Oe,_e[Oe])}))),we});return l.mutate(C).then(function(te){for(var pe=te.failures,me=te.results,_e=te.numFailures,te=te.lastResult,ge=0;ge<I.length;++ge){var Te=(me||I)[ge],we=V[ge];Te==null?we.onerror&&we.onerror(pe[ge]):we.onsuccess&&we.onsuccess(C.type==="put"&&z[ge]?C.values[ge]:Te)}return{failures:pe,results:me,numFailures:_e,lastResult:te}}).catch(function(te){return V.forEach(function(pe){return pe.onerror&&pe.onerror(te)}),Promise.reject(te)})});throw new Error("Keys missing")}}})}})}};function Tl(r,i,l){try{if(!i||i.keys.length<r.length)return null;for(var f=[],p=0,v=0;p<i.keys.length&&v<r.length;++p)tt(i.keys[p],r[v])===0&&(f.push(l?Se(i.values[p]):i.values[p]),++v);return f.length===r.length?f:null}catch{return null}}var qf={stack:"dbcore",level:-1,create:function(r){return{table:function(i){var l=r.table(i);return s(s({},l),{getMany:function(f){var p;return f.cache?(p=Tl(f.keys,f.trans._cache,f.cache==="clone"))?Ee.resolve(p):l.getMany(f).then(function(v){return f.trans._cache={keys:f.keys,values:f.cache==="clone"?Se(v):v},v}):l.getMany(f)},mutate:function(f){return f.type!=="add"&&(f.trans._cache=null),l.mutate(f)}})}}}};function Ol(r,i){return r.trans.mode==="readonly"&&!!r.subscr&&!r.trans.explicit&&r.trans.db._options.cache!=="disabled"&&!i.schema.primaryKey.outbound}function Ml(r,i){switch(r){case"query":return i.values&&!i.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var Hf={stack:"dbcore",level:0,name:"Observability",create:function(r){var i=r.schema.name,l=new Dt(r.MIN_KEY,r.MAX_KEY);return s(s({},r),{transaction:function(f,p,v){if(je.subscr&&p!=="readonly")throw new he.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(je.querier));return r.transaction(f,p,v)},table:function(f){function p(I){var O,I=I.query;return[O=I.index,new Dt((O=(I=I.range).lower)!=null?O:r.MIN_KEY,(O=I.upper)!=null?O:r.MAX_KEY)]}var v=r.table(f),b=v.schema,w=b.primaryKey,S=b.indexes,N=w.extractKey,P=w.outbound,C=w.autoIncrement&&S.filter(function(M){return M.compound&&M.keyPath.includes(w.keyPath)}),$=s(s({},v),{mutate:function(M){function O(ve){return ve="idb://".concat(i,"/").concat(f,"/").concat(ve),pe[ve]||(pe[ve]=new Dt)}var I,z,V,te=M.trans,pe=M.mutatedParts||(M.mutatedParts={}),me=O(""),_e=O(":dels"),ge=M.type,we=M.type==="deleteRange"?[M.range]:M.type==="delete"?[M.keys]:M.values.length<50?[Bi(w,M).filter(function(ve){return ve}),M.values]:[],Te=we[0],we=we[1],Oe=M.trans._cache;return d(Te)?(me.addKeys(Te),(ge=ge==="delete"||Te.length===we.length?Tl(Te,Oe):null)||_e.addKeys(Te),(ge||we)&&(I=O,z=ge,V=we,b.indexes.forEach(function(ve){var Be=I(ve.name||"");function Ue(Ze){return Ze!=null?ve.extractKey(Ze):null}function ze(Ze){ve.multiEntry&&d(Ze)?Ze.forEach(function(en){return Be.addKey(en)}):Be.addKey(Ze)}(z||V).forEach(function(Ze,Rt){var qe=z&&Ue(z[Rt]),Rt=V&&Ue(V[Rt]);tt(qe,Rt)!==0&&(qe!=null&&ze(qe),Rt!=null)&&ze(Rt)})}))):Te?(we={from:(Oe=Te.lower)!=null?Oe:r.MIN_KEY,to:(ge=Te.upper)!=null?ge:r.MAX_KEY},_e.add(we),me.add(we)):(me.add(l),_e.add(l),b.indexes.forEach(function(ve){return O(ve.name).add(l)})),v.mutate(M).then(function(ve){return!Te||M.type!=="add"&&M.type!=="put"||(me.addKeys(ve.results),C&&C.forEach(function(Be){for(var Ue=M.values.map(function(qe){return Be.extractKey(qe)}),ze=Be.keyPath.findIndex(function(qe){return qe===w.keyPath}),Ze=0,en=ve.results.length;Ze<en;++Ze)Ue[Ze][ze]=ve.results[Ze];O(Be.name).addKeys(Ue)})),te.mutatedParts=fo(te.mutatedParts||{},pe),ve})}}),D={get:function(M){return[w,new Dt(M.key)]},getMany:function(M){return[w,new Dt().addKeys(M.keys)]},count:p,query:p,openCursor:p};return c(D).forEach(function(M){$[M]=function(O){var I=je.subscr,z=!!I,V=Ol(je,v)&&Ml(M,O)?O.obsSet={}:I;if(z){var te,I=function(we){return we="idb://".concat(i,"/").concat(f,"/").concat(we),V[we]||(V[we]=new Dt)},pe=I(""),me=I(":dels"),z=D[M](O),_e=z[0],z=z[1];if((M==="query"&&_e.isPrimaryKey&&!O.values?me:I(_e.name||"")).add(z),!_e.isPrimaryKey){if(M!=="count")return te=M==="query"&&P&&O.values&&v.query(s(s({},O),{values:!1})),v[M].apply(this,arguments).then(function(we){if(M==="query"){if(P&&O.values)return te.then(function(Ue){return Ue=Ue.result,pe.addKeys(Ue),we});var Oe=O.values?we.result.map(N):we.result;(O.values?pe:me).addKeys(Oe)}else{var ve,Be;if(M==="openCursor")return Be=O.values,(ve=we)&&Object.create(ve,{key:{get:function(){return me.addKey(ve.primaryKey),ve.key}},primaryKey:{get:function(){var Ue=ve.primaryKey;return me.addKey(Ue),Ue}},value:{get:function(){return Be&&pe.addKey(ve.primaryKey),ve.value}}})}return we});me.add(l)}}return v[M].apply(this,arguments)}}),$}})}};function Il(r,i,l){var f;return l.numFailures===0?i:i.type==="deleteRange"||(f=i.keys?i.keys.length:"values"in i&&i.values?i.values.length:1,l.numFailures===f)?null:(f=s({},i),d(f.keys)&&(f.keys=f.keys.filter(function(p,v){return!(v in l.failures)})),"values"in f&&d(f.values)&&(f.values=f.values.filter(function(p,v){return!(v in l.failures)})),f)}function Ui(r,i){return l=r,((f=i).lower===void 0||(f.lowerOpen?0<tt(l,f.lower):0<=tt(l,f.lower)))&&(l=r,(f=i).upper===void 0||(f.upperOpen?tt(l,f.upper)<0:tt(l,f.upper)<=0));var l,f}function jl(r,i,l,f,p,v){var b,w,S,N,P,C,$;return!l||l.length===0||(b=i.query.index,w=b.multiEntry,S=i.query.range,N=f.schema.primaryKey.extractKey,P=b.extractKey,C=(b.lowLevelIndex||b).extractKey,(f=l.reduce(function(D,M){var O=D,I=[];if(M.type==="add"||M.type==="put")for(var z=new Dt,V=M.values.length-1;0<=V;--V){var te,pe=M.values[V],me=N(pe);!z.hasKey(me)&&(te=P(pe),w&&d(te)?te.some(function(Oe){return Ui(Oe,S)}):Ui(te,S))&&(z.addKey(me),I.push(pe))}switch(M.type){case"add":var _e=new Dt().addKeys(i.values?D.map(function(ve){return N(ve)}):D),O=D.concat(i.values?I.filter(function(ve){return ve=N(ve),!_e.hasKey(ve)&&(_e.addKey(ve),!0)}):I.map(function(ve){return N(ve)}).filter(function(ve){return!_e.hasKey(ve)&&(_e.addKey(ve),!0)}));break;case"put":var ge=new Dt().addKeys(M.values.map(function(ve){return N(ve)}));O=D.filter(function(ve){return!ge.hasKey(i.values?N(ve):ve)}).concat(i.values?I:I.map(function(ve){return N(ve)}));break;case"delete":var Te=new Dt().addKeys(M.keys);O=D.filter(function(ve){return!Te.hasKey(i.values?N(ve):ve)});break;case"deleteRange":var we=M.range;O=D.filter(function(ve){return!Ui(N(ve),we)})}return O},r))===r)?r:($=function(D,M){return tt(C(D),C(M))||tt(N(D),N(M))},f.sort(i.direction==="prev"||i.direction==="prevunique"?function(D,M){return $(M,D)}:$),i.limit&&i.limit<1/0&&(f.length>i.limit?f.length=i.limit:r.length===i.limit&&f.length<i.limit&&(p.dirty=!0)),v?Object.freeze(f):f)}function Dl(r,i){return tt(r.lower,i.lower)===0&&tt(r.upper,i.upper)===0&&!!r.lowerOpen==!!i.lowerOpen&&!!r.upperOpen==!!i.upperOpen}function Wf(r,i){return((l,f,p,v)=>{if(l===void 0)return f!==void 0?-1:0;if(f===void 0)return 1;if((l=tt(l,f))===0){if(p&&v)return 0;if(p)return 1;if(v)return-1}return l})(r.lower,i.lower,r.lowerOpen,i.lowerOpen)<=0&&0<=((l,f,p,v)=>{if(l===void 0)return f!==void 0?1:0;if(f===void 0)return-1;if((l=tt(l,f))===0){if(p&&v)return 0;if(p)return-1;if(v)return 1}return l})(r.upper,i.upper,r.upperOpen,i.upperOpen)}function zf(r,i,l,f){r.subscribers.add(l),f.addEventListener("abort",function(){var p,v;r.subscribers.delete(l),r.subscribers.size===0&&(p=r,v=i,setTimeout(function(){p.subscribers.size===0&&be(v,p)},3e3))})}var Gf={stack:"dbcore",level:0,name:"Cache",create:function(r){var i=r.schema.name;return s(s({},r),{transaction:function(l,f,p){var v,b,w=r.transaction(l,f,p);return f==="readwrite"&&(p=(v=new AbortController).signal,w.addEventListener("abort",(b=function(S){return function(){if(v.abort(),f==="readwrite"){for(var N=new Set,P=0,C=l;P<C.length;P++){var $=C[P],D=gr["idb://".concat(i,"/").concat($)];if(D){var M=r.table($),O=D.optimisticOps.filter(function(ve){return ve.trans===w});if(w._explicit&&S&&w.mutatedParts)for(var I=0,z=Object.values(D.queries.query);I<z.length;I++)for(var V=0,te=(_e=z[I]).slice();V<te.length;V++)Ri((ge=te[V]).obsSet,w.mutatedParts)&&(be(_e,ge),ge.subscribers.forEach(function(ve){return N.add(ve)}));else if(0<O.length){D.optimisticOps=D.optimisticOps.filter(function(ve){return ve.trans!==w});for(var pe=0,me=Object.values(D.queries.query);pe<me.length;pe++)for(var _e,ge,Te,we=0,Oe=(_e=me[pe]).slice();we<Oe.length;we++)(ge=Oe[we]).res!=null&&w.mutatedParts&&(S&&!ge.dirty?(Te=Object.isFrozen(ge.res),Te=jl(ge.res,ge.req,O,M,ge,Te),ge.dirty?(be(_e,ge),ge.subscribers.forEach(function(ve){return N.add(ve)})):Te!==ge.res&&(ge.res=Te,ge.promise=Ee.resolve({result:Te}))):(ge.dirty&&be(_e,ge),ge.subscribers.forEach(function(ve){return N.add(ve)})))}}}N.forEach(function(ve){return ve()})}}})(!1),{signal:p}),w.addEventListener("error",b(!1),{signal:p}),w.addEventListener("complete",b(!0),{signal:p})),w},table:function(l){var f=r.table(l),p=f.schema.primaryKey;return s(s({},f),{mutate:function(v){var b,w=je.trans;return!p.outbound&&w.db._options.cache!=="disabled"&&!w.explicit&&w.idbtrans.mode==="readwrite"&&(b=gr["idb://".concat(i,"/").concat(l)])?(w=f.mutate(v),v.type!=="add"&&v.type!=="put"||!(50<=v.values.length||Bi(p,v).some(function(S){return S==null}))?(b.optimisticOps.push(v),v.mutatedParts&&po(v.mutatedParts),w.then(function(S){0<S.numFailures&&(be(b.optimisticOps,v),(S=Il(0,v,S))&&b.optimisticOps.push(S),v.mutatedParts)&&po(v.mutatedParts)}),w.catch(function(){be(b.optimisticOps,v),v.mutatedParts&&po(v.mutatedParts)})):w.then(function(S){var N=Il(0,s(s({},v),{values:v.values.map(function(P,C){var $;return S.failures[C]?P:(Z($=($=p.keyPath)!=null&&$.includes(".")?Se(P):s({},P),p.keyPath,S.results[C]),$)})}),S);b.optimisticOps.push(N),queueMicrotask(function(){return v.mutatedParts&&po(v.mutatedParts)})}),w):f.mutate(v)},query:function(v){var b,w,S,N,P,C,$;return Ol(je,f)&&Ml("query",v)?(b=((S=je.trans)==null?void 0:S.db._options.cache)==="immutable",w=(S=je).requery,S=S.signal,C=((D,M,O,I)=>{var z=gr["idb://".concat(D,"/").concat(M)];if(!z)return[];if(!(D=z.queries[O]))return[null,!1,z,null];var V=D[(I.query?I.query.index.name:null)||""];if(!V)return[null,!1,z,null];switch(O){case"query":var te=(pe=I.direction)!=null?pe:"next",pe=V.find(function(me){var _e;return me.req.limit===I.limit&&me.req.values===I.values&&((_e=me.req.direction)!=null?_e:"next")===te&&Dl(me.req.query.range,I.query.range)});return pe?[pe,!0,z,V]:[V.find(function(me){var _e;return("limit"in me.req?me.req.limit:1/0)>=I.limit&&((_e=me.req.direction)!=null?_e:"next")===te&&(!I.values||me.req.values)&&Wf(me.req.query.range,I.query.range)}),!1,z,V];case"count":return pe=V.find(function(me){return Dl(me.req.query.range,I.query.range)}),[pe,!!pe,z,V]}})(i,l,"query",v),$=C[0],N=C[2],P=C[3],$&&C[1]?$.obsSet=v.obsSet:(C=f.query(v).then(function(D){var M=D.result;if($&&($.res=M),b){for(var O=0,I=M.length;O<I;++O)Object.freeze(M[O]);Object.freeze(M)}return D}).catch(function(D){return P&&$&&be(P,$),Promise.reject(D)}),$={obsSet:v.obsSet,promise:C,subscribers:new Set,type:"query",req:v,dirty:!1},P?P.push($):(P=[$],(N=N||(gr["idb://".concat(i,"/").concat(l)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[v.query.index.name||""]=P)),zf($,P,w,S),$.promise.then(function(D){return D=jl(D.result,v,N==null?void 0:N.optimisticOps,f,$,b),{result:b?D:Se(D)}})):f.query(v)}})}})}};function vo(r,i){return new Proxy(r,{get:function(l,f,p){return f==="db"?i:Reflect.get(l,f,p)}})}St.prototype.version=function(r){if(isNaN(r)||r<.1)throw new he.Type("Given version is not a positive number");if(r=Math.round(10*r)/10,this.idbdb||this._state.isBeingOpened)throw new he.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,r);var i=this._versions,l=i.filter(function(f){return f._cfg.version===r})[0];return l||(l=new this.Version(r),i.push(l),i.sort(Lf),l.stores({}),this._state.autoSchema=!1),l},St.prototype._whenReady=function(r){var i=this;return this.idbdb&&(this._state.openComplete||je.letThrough||this._vip)?r():new Ee(function(l,f){if(i._state.openComplete)return f(new he.DatabaseClosed(i._state.dbOpenError));if(!i._state.isBeingOpened){if(!i._state.autoOpen)return void f(new he.DatabaseClosed);i.open().catch(_)}i._state.dbReadyPromise.then(l,f)}).then(r)},St.prototype.use=function(p){var i=p.stack,l=p.create,f=p.level,p=p.name,v=(p&&this.unuse({stack:i,name:p}),this._middlewares[i]||(this._middlewares[i]=[]));return v.push({stack:i,create:l,level:f??10,name:p}),v.sort(function(b,w){return b.level-w.level}),this},St.prototype.unuse=function(r){var i=r.stack,l=r.name,f=r.create;return i&&this._middlewares[i]&&(this._middlewares[i]=this._middlewares[i].filter(function(p){return f?p.create!==f:!!l&&p.name!==l})),this},St.prototype.open=function(){var r=this;return vr($t,function(){return Vf(r)})},St.prototype._close=function(){this.on.close.fire(new CustomEvent("close"));var r=this._state;if(cs.remove(this),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}r.isBeingOpened||(r.dbReadyPromise=new Ee(function(i){r.dbReadyResolve=i}),r.openCanceller=new Ee(function(i,l){r.cancelOpen=l}))},St.prototype.close=function(i){var i=(i===void 0?{disableAutoOpen:!0}:i).disableAutoOpen,l=this._state;i?(l.isBeingOpened&&l.cancelOpen(new he.DatabaseClosed),this._close(),l.autoOpen=!1,l.dbOpenError=new he.DatabaseClosed):(this._close(),l.autoOpen=this._options.autoOpen||l.isBeingOpened,l.openComplete=!1,l.dbOpenError=null)},St.prototype.delete=function(r){var i=this,l=(r===void 0&&(r={disableAutoOpen:!0}),0<arguments.length&&typeof arguments[0]!="object"),f=this._state;return new Ee(function(p,v){function b(){i.close(r);var w=i._deps.indexedDB.deleteDatabase(i.name);w.onsuccess=mt(function(){var S,N,P;S=i._deps,N=i.name,Ii(P=S.indexedDB)||N===Qs||Mi(P,S.IDBKeyRange).delete(N).catch(_),p()}),w.onerror=dn(v),w.onblocked=i._fireOnBlocked}if(l)throw new he.InvalidArgument("Invalid closeOptions argument to db.delete()");f.isBeingOpened?f.dbReadyPromise.then(b):b()})},St.prototype.backendDB=function(){return this.idbdb},St.prototype.isOpen=function(){return this.idbdb!==null},St.prototype.hasBeenClosed=function(){var r=this._state.dbOpenError;return r&&r.name==="DatabaseClosed"},St.prototype.hasFailed=function(){return this._state.dbOpenError!==null},St.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(St.prototype,"tables",{get:function(){var r=this;return c(this._allTables).map(function(i){return r._allTables[i]})},enumerable:!1,configurable:!0}),St.prototype.transaction=function(){var r=(function(i,l,f){var p=arguments.length;if(p<2)throw new he.InvalidArgument("Too few arguments");for(var v=new Array(p-1);--p;)v[p-1]=arguments[p];return f=v.pop(),[i,oe(v),f]}).apply(this,arguments);return this._transaction.apply(this,r)},St.prototype._transaction=function(r,i,l){var f,p,v=this,b=je.trans,w=(b&&b.db===this&&r.indexOf("!")===-1||(b=null),r.indexOf("?")!==-1);r=r.replace("!","").replace("?","");try{if(p=i.map(function(N){if(N=N instanceof v.Table?N.name:N,typeof N!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return N}),r=="r"||r===_i)f=_i;else{if(r!="rw"&&r!=ki)throw new he.InvalidArgument("Invalid transaction mode: "+r);f=ki}if(b){if(b.mode===_i&&f===ki){if(!w)throw new he.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");b=null}b&&p.forEach(function(N){if(b&&b.storeNames.indexOf(N)===-1){if(!w)throw new he.SubTransaction("Table "+N+" not included in parent transaction.");b=null}}),w&&b&&!b.active&&(b=null)}}catch(N){return b?b._promise(null,function(P,C){C(N)}):Ct(N)}var S=(function N(P,C,$,D,M){return Ee.resolve().then(function(){var V=je.transless||je,O=P._createTransaction(C,$,P._dbSchema,D),V=(O.explicit=!0,{trans:O,transless:V});if(D)O.idbtrans=D.idbtrans;else try{O.create(),O.idbtrans._explicit=!0,P._state.PR1398_maxLoop=3}catch(te){return te.name===Jt.InvalidState&&P.isOpen()&&0<--P._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),P.close({disableAutoOpen:!1}),P.open().then(function(){return N(P,C,$,null,M)})):Ct(te)}var I,z=de(M),V=(z&&Kr(),Ee.follow(function(){var te;(I=M.call(O,O))&&(z?(te=zn.bind(null,null),I.then(te,te)):typeof I.next=="function"&&typeof I.throw=="function"&&(I=Ni(I)))},V));return(I&&typeof I.then=="function"?Ee.resolve(I).then(function(te){return O.active?te:Ct(new he.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):V.then(function(){return I})).then(function(te){return D&&O._resolve(),O._completion.then(function(){return te})}).catch(function(te){return O._reject(te),Ct(te)})})}).bind(null,this,f,p,b,l);return b?b._promise(f,S,"lock"):je.trans?vr(je.transless,function(){return v._whenReady(S)}):this._whenReady(S)},St.prototype.table=function(r){if(k(this._allTables,r))return this._allTables[r];throw new he.InvalidTable("Table ".concat(r," does not exist"))};var Mn=St;function St(r,i){var l,f,p,v,b,w=this,S=(this._middlewares={},this.verno=0,St.dependencies),S=(this._options=i=s({addons:St.addons,autoOpen:!0,indexedDB:S.indexedDB,IDBKeyRange:S.IDBKeyRange,cache:"cloned",maxConnections:1e3},i),this._deps={indexedDB:i.indexedDB,IDBKeyRange:i.IDBKeyRange},i.addons),N=(this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this,{dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:_,dbReadyPromise:null,cancelOpen:_,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:i.autoOpen}),P=(N.dbReadyPromise=new Ee(function(C){N.dbReadyResolve=C}),N.openCanceller=new Ee(function(C,$){N.cancelOpen=$}),this._state=N,this.name=r,this.on=os(this,"populate","blocked","versionchange","close",{ready:[q,_]}),this.once=function(C,$){var D=function(){for(var M=[],O=0;O<arguments.length;O++)M[O]=arguments[O];w.on(C).unsubscribe(D),$.apply(w,M)};return w.on(C,D)},this.on.ready.subscribe=R(this.on.ready.subscribe,function(C){return function($,D){St.vip(function(){var M,O=w._state;O.openComplete?(O.dbOpenError||Ee.resolve().then($),D&&C($)):O.onReadyBeingFired?(O.onReadyBeingFired.push($),D&&C($)):(C($),M=w,D||C(function I(){M.on.ready.unsubscribe($),M.on.ready.unsubscribe(I)}))})}}),this.Collection=(l=this,is(Tf.prototype,function(I,O){this.db=l;var D=cl,M=null;if(O)try{D=O()}catch(V){M=V}var O=I._ctx,I=O.table,z=I.hook.reading.fire;this._ctx={table:I,index:O.index,isPrimKey:!O.index||I.schema.primKey.keyPath&&O.index===I.schema.primKey.name,range:D,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:M,or:O.or,valueMapper:z!==W?z:null}})),this.Table=(f=this,is(ml.prototype,function(C,$,D){this.db=f,this._tx=D,this.name=C,this.schema=$,this.hook=f._allTables[C]?f._allTables[C].hook:os(null,{creating:[ae,_],reading:[ce,W],updating:[ye,_],deleting:[ue,_]})})),this.Transaction=(p=this,is(If.prototype,function(C,$,D,M,O){var I=this;C!=="readonly"&&$.forEach(function(z){z=(z=D[z])==null?void 0:z.yProps,z&&($=$.concat(z.map(function(V){return V.updatesTable})))}),this.db=p,this.mode=C,this.storeNames=$,this.schema=D,this.chromeTransactionDurability=M,this.idbtrans=null,this.on=os(this,"complete","error","abort"),this.parent=O||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new Ee(function(z,V){I._resolve=z,I._reject=V}),this._completion.then(function(){I.active=!1,I.on.complete.fire()},function(z){var V=I.active;return I.active=!1,I.on.error.fire(z),I.parent?I.parent._reject(z):V&&I.idbtrans&&I.idbtrans.abort(),Ct(z)})})),this.Version=(v=this,is(Nf.prototype,function(C){this.db=v,this._cfg={version:C,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(b=this,is(_l.prototype,function(C,$,D){if(this.db=b,this._ctx={table:C,index:$===":id"?null:$,or:D},this._cmp=this._ascending=tt,this._descending=function(M,O){return tt(O,M)},this._max=function(M,O){return 0<tt(M,O)?M:O},this._min=function(M,O){return tt(M,O)<0?M:O},this._IDBKeyRange=b._deps.IDBKeyRange,!this._IDBKeyRange)throw new he.MissingAPI})),this.on("versionchange",function(C){0<C.newVersion?console.warn("Another connection wants to upgrade database '".concat(w.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(w.name,"'. Closing db now to resume the delete request.")),w.close({disableAutoOpen:!1})}),this.on("blocked",function(C){!C.newVersion||C.newVersion<C.oldVersion?console.warn("Dexie.delete('".concat(w.name,"') was blocked")):console.warn("Upgrade '".concat(w.name,"' blocked by other connection holding version ").concat(C.oldVersion/10))}),this._maxKey=ls(i.IDBKeyRange),this._createTransaction=function(C,$,D,M){return new w.Transaction(C,$,D,w._options.chromeTransactionDurability,M)},this._fireOnBlocked=function(C){w.on("blocked").fire(C),cs.toArray().filter(function($){return $.name===w.name&&$!==w&&!$._state.vcFired}).map(function($){return $.on("versionchange").fire(C)})},this.use(qf),this.use(Gf),this.use(Hf),this.use(Bf),this.use(Uf),new Proxy(this,{get:function(C,$,D){var M;return $==="_vip"||($==="table"?function(O){return vo(w.table(O),P)}:(M=Reflect.get(C,$,D))instanceof ml?vo(M,P):$==="tables"?M.map(function(O){return vo(O,P)}):$==="_createTransaction"?function(){return vo(M.apply(this,arguments),P)}:M)}}));this.vip=P,S.forEach(function(C){return C(w)})}var mo,Br=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",Yf=(qi.prototype.subscribe=function(r,i,l){return this._subscribe(r&&typeof r!="function"?r:{next:r,error:i,complete:l})},qi.prototype[Br]=function(){return this},qi);function qi(r){this._subscribe=r}try{mo={indexedDB:a.indexedDB||a.mozIndexedDB||a.webkitIndexedDB||a.msIndexedDB,IDBKeyRange:a.IDBKeyRange||a.webkitIDBKeyRange}}catch{mo={indexedDB:null,IDBKeyRange:null}}function Rl(r){var i,l=!1,f=new Yf(function(p){var v=de(r),b,w=!1,S={},N={},P={get closed(){return w},unsubscribe:function(){w||(w=!0,b&&b.abort(),C&&Jn.storagemutated.unsubscribe(M))}},C=(p.start&&p.start(P),!1),$=function(){return wi(O)};function D(){return Ri(N,S)}var M=function(I){fo(S,I),D()&&$()},O=function(){var I,z,V;!w&&mo.indexedDB&&(S={},I={},b&&b.abort(),b=new AbortController,V=(te=>{var pe=Rr();try{v&&Kr();var me=Wn(r,te);return me=v?me.finally(zn):me}finally{pe&&Lr()}})(z={subscr:I,signal:b.signal,requery:$,querier:r,trans:null}),C||(Jn.storagemutated.subscribe(M),C=!0),Promise.resolve(V).then(function(te){l=!0,i=te,w||z.signal.aborted||(D()||(N=I,D())?$():(S={},wi(function(){return!w&&p.next&&p.next(te)})))},function(te){l=!1,["DatabaseClosedError","AbortError"].includes(te==null?void 0:te.name)||w||wi(function(){w||p.error&&p.error(te)})}))};return setTimeout($,0),P});return f.hasValue=function(){return l},f.getValue=function(){return i},f}var br=Mn;function Hi(r){var i=Xn;try{Xn=!0,Jn.storagemutated.fire(r),Fi(r,!0)}finally{Xn=i}}j(br,s(s({},X),{delete:function(r){return new br(r,{addons:[]}).delete()},exists:function(r){return new br(r,{addons:[]}).open().then(function(i){return i.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(r){try{return i=br.dependencies,l=i.indexedDB,i=i.IDBKeyRange,(Ii(l)?Promise.resolve(l.databases()).then(function(f){return f.map(function(p){return p.name}).filter(function(p){return p!==Qs})}):Mi(l,i).toCollection().primaryKeys()).then(r)}catch{return Ct(new he.MissingAPI)}var i,l},defineClass:function(){return function(r){h(this,r)}},ignoreTransaction:function(r){return je.trans?vr(je.transless||$t,r):r()},vip:ji,async:function(r){return function(){try{var i=Ni(r.apply(this,arguments));return i&&typeof i.then=="function"?i:Ee.resolve(i)}catch(l){return Ct(l)}}},spawn:function(r,i,l){try{var f=Ni(r.apply(l,i||[]));return f&&typeof f.then=="function"?f:Ee.resolve(f)}catch(p){return Ct(p)}},currentTransaction:{get:function(){return je.trans||null}},waitFor:function(r,i){return r=Ee.resolve(typeof r=="function"?br.ignoreTransaction(r):r).timeout(i||6e4),je.trans?je.trans.waitFor(r):r},Promise:Ee,debug:{get:function(){return B},set:function(r){G(r)}},derive:H,extend:h,props:j,override:R,Events:os,on:Jn,liveQuery:Rl,extendObservabilitySet:fo,getByKeyPath:ie,setByKeyPath:Z,delByKeyPath:function(r,i){typeof i=="string"?Z(r,i,void 0):"length"in i&&[].map.call(i,function(l){Z(r,l,void 0)})},shallowClone:A,deepClone:Se,getObjectDiff:Vi,cmp:tt,asap:le,minKey:-1/0,addons:[],connections:{get:cs.toArray},errnames:Jt,dependencies:mo,cache:gr,semVer:"4.4.6",version:"4.4.6".split(".").map(function(r){return parseInt(r)}).reduce(function(r,i,l){return r+i/Math.pow(10,2*l)})})),br.maxKey=ls(br.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(Jn(so,function(r){Xn||(r=new CustomEvent(Si,{detail:r}),Xn=!0,dispatchEvent(r),Xn=!1)}),addEventListener(Si,function(r){r=r.detail,Xn||Hi(r)}));var Ur,Xn=!1,Ll=function(){};return typeof BroadcastChannel<"u"&&((Ll=function(){(Ur=new BroadcastChannel(Si)).onmessage=function(r){return r.data&&Hi(r.data)}})(),typeof Ur.unref=="function"&&Ur.unref(),Jn(so,function(r){Xn||Ur.postMessage(r)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(r){if(!Mn.disableBfCache&&r.persisted){B&&console.debug("Dexie: handling persisted pagehide"),Ur!=null&&Ur.close();for(var i=0,l=cs.toArray();i<l.length;i++)l[i].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(r){!Mn.disableBfCache&&r.persisted&&(B&&console.debug("Dexie: handling persisted pageshow"),Ll(),Hi({all:new Dt(-1/0,[[]])}))})),Ee.rejectionMapper=function(r,i){return!r||r instanceof xe||r instanceof TypeError||r instanceof SyntaxError||!r.name||!m[r.name]?r:(i=new m[r.name](i||r.message,r),"stack"in r&&L(i,"stack",{get:function(){return this.inner.stack}}),i)},G(B),s(Mn,Object.freeze({__proto__:null,DEFAULT_MAX_CONNECTIONS:1e3,Dexie:Mn,Entity:fl,PropModification:ss,RangeSet:Dt,add:function(r){return new ss({add:r})},cmp:tt,default:Mn,liveQuery:Rl,mergeRanges:ds,rangesOverlap:El,remove:function(r){return new ss({remove:r})},replacePrefix:function(r,i){return new ss({replacePrefix:[r,i]})}}),{default:Mn}),Mn})})(ef);var Uh=ef.exports;const Ca=Bh(Uh),Eu=Symbol.for("Dexie"),Ir=globalThis[Eu]||(globalThis[Eu]=Ca);if(Ca.semVer!==Ir.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${Ca.semVer} and ${Ir.semVer}`);const{liveQuery:_0,mergeRanges:k0,rangesOverlap:x0,RangeSet:C0,cmp:S0,Entity:E0,PropModification:$0,replacePrefix:A0,add:P0,remove:T0,DexieYProvider:O0}=Ir;class tf extends Ir{constructor(t="intern_worklog"){super(t),this.version(1).stores({project:"++id, &name, archived",work_log:"++id, &date",log_item:"++id, work_log_id, project_id, category",attendance:"++id, &date",weekly_note:"++id, &week_start",setting:"key"}),this.version(2).stores({memo:"++id, updated_at",credential:"++id, system, updated_at"}),this.version(3).stores({transaction:"++id, date, type, category"}),this.version(4).stores({sync_mirror:"++id, table, uuid",tombstone:"++id, table, uuid, deleted_at"})}}let ne;function qh(e){ne=e}function nf(){ne&&ne.close(),ne=void 0}const Hh=4,Wr=["餐饮","交通","住房","通讯","学习","娱乐","其他"],Vo=["工资","报销","其他"],$u=["公司","客户现场","出差","居家办公"],Us=[{key:"dev",label:"开发"},{key:"bugfix",label:"BUG修复"},{key:"test",label:"测试"},{key:"learning",label:"学习成长"},{key:"meeting",label:"会议沟通"},{key:"doc",label:"文档输出"},{key:"other",label:"其他"}];function Ja(e){const t=Us.find(n=>n.key===e);return t?t.label:"其他"}const Wh={class:"dialog",role:"dialog","aria-label":"编辑工作记录"},zh={class:"dialog-head"},Gh={key:0,class:"muted dialog-sub"},Yh={class:"dialog-body"},Jh={class:"form-grid"},Xh={class:"field span2"},Qh={key:0,class:"form-error"},Zh={class:"field"},ev=["value"],tv={class:"field"},nv=["value"],rv={class:"field"},sv={class:"field"},ov={class:"field span2"},iv={class:"field"},av={class:"field"},lv={class:"dialog-btns"},uv=Vt({__name:"EditLogDialog",props:{open:{type:Boolean},item:{},projects:{},date:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,s=t,o=F(""),a=F(null),c=F("dev"),d=F(null),h=F(""),g=F(""),y=F(0),k=F(0),j=F(""),T=F(null),L=it(()=>{var R;const ee=n.projects.filter(Y=>Y.archived!==1),E=(R=n.item)==null?void 0:R.project_id;if(E&&!ee.some(Y=>Y.id===E)){const Y=n.projects.find(ie=>ie.id===E),le=ee.slice();return Y&&le.unshift({...Y,name:Y.name+"(已归档)"}),le}return ee});function H(ee){n.open&&ee.key==="Escape"&&s("cancel")}gt(()=>n.open,async ee=>{var E;if(ee){const R=n.item;o.value=(R==null?void 0:R.content)??"",a.value=(R==null?void 0:R.project_id)??null,c.value=(R==null?void 0:R.category)??"dev",d.value=(R==null?void 0:R.minutes)??null,h.value=(R==null?void 0:R.takeaway)??"",g.value=(R==null?void 0:R.remark)??"",y.value=(R==null?void 0:R.is_milestone)??0,k.value=(R==null?void 0:R.needs_followup)??0,j.value="",window.addEventListener("keydown",H),await ts(),(E=T.value)==null||E.focus()}else window.removeEventListener("keydown",H)}),dr(()=>window.removeEventListener("keydown",H)),gt(o,()=>{j.value&&(j.value="")});function fe(){const ee=o.value.trim();if(!ee){j.value="请填写工作内容";return}if(!n.item||!n.item.id){s("cancel");return}s("save",{id:n.item.id,content:ee,project_id:a.value,category:c.value,minutes:d.value&&d.value>0?d.value:null,takeaway:h.value.trim()||null,remark:g.value.trim()||null,is_milestone:y.value?1:0,needs_followup:k.value?1:0})}return(ee,E)=>(K(),It(Vs,{to:"body"},[Me(ns,{name:"modal"},{default:fr(()=>[e.open?(K(),U("div",{key:0,class:"mask",onClick:E[10]||(E[10]=Mr(R=>s("cancel"),["self"]))},[u("div",Wh,[u("div",zh,[u("div",null,[E[11]||(E[11]=u("div",{class:"dialog-title"},"编辑工作记录",-1)),e.date?(K(),U("div",Gh,re(e.date),1)):$e("",!0)]),u("button",{class:"icon-btn",title:"关闭",onClick:E[0]||(E[0]=R=>s("cancel"))},[Me(lt,{name:"close",size:16})])]),u("div",Yh,[u("div",Jh,[u("div",Xh,[E[12]||(E[12]=u("label",null,"工作内容(必填)",-1)),Ae(u("input",{ref_key:"contentInput",ref:T,class:et(["input",{invalid:j.value}]),"onUpdate:modelValue":E[1]||(E[1]=R=>o.value=R),onKeydown:jt(fe,["enter"])},null,34),[[De,o.value]]),j.value?(K(),U("div",Qh,re(j.value),1)):$e("",!0)]),u("div",Zh,[E[14]||(E[14]=u("label",null,"所属项目",-1)),Ae(u("select",{class:"select","onUpdate:modelValue":E[2]||(E[2]=R=>a.value=R)},[E[13]||(E[13]=u("option",{value:null},"无项目",-1)),(K(!0),U(Re,null,ut(L.value,R=>(K(),U("option",{key:R.id,value:R.id},re(R.name),9,ev))),128))],512),[[Fn,a.value]])]),u("div",tv,[E[15]||(E[15]=u("label",null,"工作分类",-1)),Ae(u("select",{class:"select","onUpdate:modelValue":E[3]||(E[3]=R=>c.value=R)},[(K(!0),U(Re,null,ut(nn(Us),R=>(K(),U("option",{key:R.key,value:R.key},re(R.label),9,nv))),128))],512),[[Fn,c.value]])]),u("div",rv,[E[16]||(E[16]=u("label",null,"耗时(分钟)",-1)),Ae(u("input",{class:"input",type:"number",min:"0","onUpdate:modelValue":E[4]||(E[4]=R=>d.value=R),placeholder:"选填"},null,512),[[De,d.value,void 0,{number:!0}]])]),u("div",sv,[E[17]||(E[17]=u("label",null,"主要收获",-1)),Ae(u("input",{class:"input","onUpdate:modelValue":E[5]||(E[5]=R=>h.value=R),placeholder:"一句话:学到了什么"},null,512),[[De,h.value]])]),u("div",ov,[E[18]||(E[18]=u("label",null,"备注",-1)),Ae(u("textarea",{class:"textarea","onUpdate:modelValue":E[6]||(E[6]=R=>g.value=R),placeholder:"背景、链接、未决事项(选填)"},null,512),[[De,g.value]])]),u("div",iv,[E[19]||(E[19]=u("label",null,"成果标记",-1)),u("button",{class:et(["toggle-btn",{on:y.value===1}]),onClick:E[7]||(E[7]=R=>y.value=y.value===1?0:1)},re(y.value===1?"已标记为成果":"未标记"),3)]),u("div",av,[E[20]||(E[20]=u("label",null,"待跟进",-1)),u("button",{class:et(["toggle-btn",{onwarn:k.value===1}]),onClick:E[8]||(E[8]=R=>k.value=k.value===1?0:1)},re(k.value===1?"需要跟进":"无需跟进"),3)])])]),u("div",lv,[u("button",{class:"btn btn-sm",onClick:E[9]||(E[9]=R=>s("cancel"))},"取消"),u("button",{class:"btn btn-primary btn-sm",onClick:fe},"保存修改")])])])):$e("",!0)]),_:1})]))}}),cv=Yt(uv,[["__scopeId","data-v-63bc0b48"]]);function Ss(e){return e<10?"0"+e:String(e)}function Nn(e){return e.getFullYear()+"-"+Ss(e.getMonth()+1)+"-"+Ss(e.getDate())}function xt(){return Nn(new Date)}function wt(){const e=new Date;return Nn(e)+"T"+Ss(e.getHours())+":"+Ss(e.getMinutes())+":"+Ss(e.getSeconds())}function Vn(e){if(!e)return"--:--";const t=e.indexOf("T");return t>=0?e.slice(t+1,t+6):e.slice(0,5)}function rs(e){const t=e.split("-").map(Number);return new Date(t[0],t[1]-1,t[2])}function Kn(e,t){const n=rs(e);return n.setDate(n.getDate()+t),Nn(n)}function Bo(e,t){const n=rs(e),s=n.getDate();n.setDate(1),n.setMonth(n.getMonth()+t);const o=new Date(n.getFullYear(),n.getMonth()+1,0).getDate();return n.setDate(Math.min(s,o)),Nn(n)}function Es(e){const t=rs(e),n=(t.getDay()+6)%7;return t.setDate(t.getDate()-n),Nn(t)}function fv(e){const t=rs(e).getDay();return t===0||t===6}function dv(e,t){return Math.round((new Date(t).getTime()-new Date(e).getTime())/6e4)}function rf(e){const t=rs(e),n=["周日","周一","周二","周三","周四","周五","周六"];return t.getFullYear()+" 年 "+(t.getMonth()+1)+" 月 "+t.getDate()+" 日 "+n[t.getDay()]}async function yt(e,t){const n=await ne.setting.get(e);return n?n.value:t}async function kt(e,t){await ne.setting.put({key:e,value:t})}async function jr(){const e=await Promise.all([yt("work_start","09:00"),yt("work_end","18:00"),yt("grace_minutes","10"),yt("lunch_minutes","60"),yt("remind_weekly","friday")]);return{work_start:e[0],work_end:e[1],grace_minutes:Number(e[2])||0,lunch_minutes:Number(e[3])||0,remind_weekly:e[4]}}async function pv(){const e=await yt("last_project",""),t=await yt("last_category","dev");return{project_id:e?Number(e):null,category:t||"dev"}}async function hv(){return yt("last_location","")}async function vv(e,t){const n=t.trim();await kt("last_location",n),n&&await Uo(n);const s=await mn(e);s&&s.id?await ne.attendance.update(s.id,{location:n||null}):n&&await ne.attendance.add({date:e,clock_in_at:null,clock_out_at:null,kind:"normal",note:null,location:n,created_at:wt()})}async function Xa(){const e=await yt("location_presets","");if(!e)return $u.slice();try{const t=JSON.parse(e);if(Array.isArray(t))return t.filter(n=>typeof n=="string"&&n.trim()).map(n=>n.trim())}catch{}return $u.slice()}async function sf(e){const t=Array.from(new Set(e.map(n=>n.trim()).filter(Boolean)));await kt("location_presets",JSON.stringify(t))}async function Uo(e){const t=e.trim();if(!t)return;const n=await Xa();n.includes(t)||await sf([...n,t])}async function Ks(e=!1){const t=await ne.project.orderBy("name").toArray();return e?t:t.filter(n=>n.archived!==1)}async function mv(e){await ne.project.add({name:e.trim(),archived:0,created_at:wt()})}async function yv(e,t){await ne.project.update(e,{name:t.trim()})}async function gv(e,t){await ne.project.update(e,{archived:t?1:0})}async function mn(e){return ne.attendance.where("date").equals(e).first()}async function of(e,t){const n=((t===void 0?await yt("last_location",""):t)||"").trim(),s=await mn(e);if(s&&s.id){if(!s.clock_in_at){const o={clock_in_at:wt()};n&&(o.location=n),await ne.attendance.update(s.id,o)}n&&(await kt("last_location",n),await Uo(n));return}await ne.attendance.add({date:e,clock_in_at:wt(),clock_out_at:null,kind:"normal",note:null,location:n||null,created_at:wt()}),n&&(await kt("last_location",n),await Uo(n))}async function bv(e){const t=await mn(e);t&&t.id&&t.clock_in_at&&!t.clock_out_at&&await ne.attendance.update(t.id,{clock_out_at:wt()})}async function wv(){const e=new Date,t=Nn(e);if(e.getHours()<4){const s=await mn(Kn(t,-1));if(s&&s.id&&s.clock_in_at&&!s.clock_out_at)return await ne.attendance.update(s.id,{clock_out_at:wt()}),s.date}const n=await mn(t);if(n&&n.id&&n.clock_in_at&&!n.clock_out_at)return await ne.attendance.update(n.id,{clock_out_at:wt()}),n.date;throw new Error("没有进行中的打卡")}async function _v(e,t,n,s,o){(o||"").trim()&&await Uo(o);const a=await mn(e),c={date:e,clock_in_at:t,clock_out_at:n,kind:"makeup",note:s||null,location:(o||"").trim()||null,created_at:wt()};a&&a.id?await ne.attendance.update(a.id,c):await ne.attendance.add(c)}async function kv(e,t,n){const s=(n||"").trim();if(!s)return;const o=await mn(e);o&&o.id&&await ne.attendance.update(o.id,{[t]:e+"T"+s+":00"})}async function ci(e,t){return ne.attendance.where("date").between(e,t,!0,!0).toArray()}async function xv(e,t){const n=await mn(e);if(t){const s={date:e,kind:"leave",clock_in_at:null,clock_out_at:null,created_at:wt()};n&&n.id?await ne.attendance.update(n.id,s):await ne.attendance.add({...s,note:null,location:null})}else n&&n.id&&await ne.attendance.update(n.id,{kind:"normal"})}async function Cv(e){const t=await ne.work_log.where("date").equals(e).first();return t||{id:await ne.work_log.add({date:e,created_at:wt()}),date:e,created_at:wt()}}async function Sv(e){return ne.work_log.where("date").equals(e).first()}async function Ev(e){const t=await Sv(e);return!t||!t.id?[]:(await ne.log_item.where("work_log_id").equals(t.id).toArray()).sort((s,o)=>o.id-s.id)}async function $v(e,t){const n=await Cv(e);await ne.log_item.add({work_log_id:n.id,content:t.content,project_id:t.project_id,category:t.category,minutes:t.minutes,is_milestone:0,needs_followup:0,takeaway:t.takeaway,remark:t.remark,sort_order:0,created_at:wt()}),await kt("last_project",t.project_id?String(t.project_id):""),await kt("last_category",t.category)}async function ia(e,t){await ne.log_item.update(e,t)}async function Av(e){await ne.log_item.delete(e)}async function fi(e,t){const n=await ne.work_log.where("date").between(e,t,!0,!0).toArray();if(!n.length)return[];const s=new Map(n.map(a=>[a.id,a.date]));return(await ne.log_item.where("work_log_id").anyOf(n.map(a=>a.id)).toArray()).map(a=>({...a,date:s.get(a.work_log_id)||""})).sort((a,c)=>a.date===c.date?a.id-c.id:a.date<c.date?-1:1)}async function Qa(e){return ne.weekly_note.where("week_start").equals(e).first()}async function Pv(e,t){const n=await Qa(e);n&&n.id?await ne.weekly_note.update(n.id,t):await ne.weekly_note.add({week_start:e,highlights:t.highlights??null,challenges:t.challenges??null,plan_next:t.plan_next??null,created_at:wt()})}async function Tv(e,t){return ne.weekly_note.where("week_start").between(e,t,!0,!0).toArray()}async function Ov(){return(await ne.memo.toArray()).sort((t,n)=>t.updated_at<n.updated_at?1:-1)}async function Mv(e,t){const n=wt();return{id:await ne.memo.add({title:e.trim(),content:t,created_at:n,updated_at:n}),title:e.trim(),content:t,created_at:n,updated_at:n}}async function Iv(e,t,n){await ne.memo.update(e,{title:t.trim(),content:n,updated_at:wt()})}async function jv(e){await ne.memo.delete(e)}async function Dv(e,t=8){const n=e.trim().toLowerCase();if(!n)return[];const s=await ne.work_log.toArray(),o=new Map(s.map(c=>[c.id,c.date]));return(await ne.log_item.toArray()).filter(c=>((c.content||"")+" "+(c.takeaway||"")+" "+(c.remark||"")).toLowerCase().includes(n)).sort((c,d)=>d.id-c.id).slice(0,t).map(c=>({...c,date:o.get(c.work_log_id)||""}))}async function Rv(e,t=4){const n=e.trim().toLowerCase();return n?(await ne.memo.toArray()).filter(o=>((o.title||"")+" "+(o.content||"")).toLowerCase().includes(n)).sort((o,a)=>o.updated_at<a.updated_at?1:-1).slice(0,t):[]}async function Lv(e,t){return ne.transaction.where("date").between(e,t,!0,!0).toArray()}async function Kv(e){await ne.transaction.add({...e,created_at:wt()})}async function Fv(e,t){await ne.transaction.update(e,{...t})}async function Nv(e){await ne.transaction.delete(e)}async function Vv(e,t){await ne.transaction.update(e,{reimbursed:1})}async function Bv(){const e=await Promise.all([ne.project.toArray(),ne.work_log.toArray(),ne.log_item.toArray(),ne.attendance.toArray(),ne.weekly_note.toArray(),ne.setting.toArray(),ne.memo.toArray(),ne.credential.toArray(),ne.transaction.toArray()]);return JSON.stringify({schema_version:Hh,exported_at:wt(),data:{project:e[0],work_log:e[1],log_item:e[2],attendance:e[3],weekly_note:e[4],setting:e[5],memo:e[6],credential:e[7],transaction:e[8]}},null,2)}async function Uv(e){let t=null;try{t=JSON.parse(e)}catch{throw new Error("不是有效的 JSON 文件")}if(!t||t.schema_version!==1&&t.schema_version!==2&&t.schema_version!==3||!t.data)throw new Error("文件格式或 schema 版本不匹配");const n=t.data;await ne.transaction("rw",[ne.project,ne.work_log,ne.log_item,ne.attendance,ne.weekly_note,ne.setting,ne.memo,ne.credential,ne.transaction],async()=>{await Promise.all([ne.project.clear(),ne.work_log.clear(),ne.log_item.clear(),ne.attendance.clear(),ne.weekly_note.clear(),ne.setting.clear(),ne.memo.clear(),ne.credential.clear(),ne.transaction.clear()]),n.project&&n.project.length&&await ne.project.bulkAdd(n.project),n.work_log&&n.work_log.length&&await ne.work_log.bulkAdd(n.work_log),n.log_item&&n.log_item.length&&await ne.log_item.bulkAdd(n.log_item),n.attendance&&n.attendance.length&&await ne.attendance.bulkAdd(n.attendance),n.weekly_note&&n.weekly_note.length&&await ne.weekly_note.bulkAdd(n.weekly_note),n.setting&&n.setting.length&&await ne.setting.bulkAdd(n.setting),n.memo&&n.memo.length&&await ne.memo.bulkAdd(n.memo),n.credential&&n.credential.length&&await ne.credential.bulkAdd(n.credential),n.transaction&&n.transaction.length&&await ne.transaction.bulkAdd(n.transaction)})}function Co(e){const t=e.split(":");return Number(t[0])*60+Number(t[1])}function qs(e,t,n,s){if(e&&e.kind==="leave")return{status:"leave",label:"请假",makeup:!1,workedMinutes:null};if(fv(t))return{status:"rest",label:"休息日",makeup:!1,workedMinutes:null};if(!e||!e.clock_in_at)return s?{status:"none",label:"未打卡",makeup:!1,workedMinutes:null}:{status:"absent",label:"缺勤",makeup:!!(e&&e.kind==="makeup"),workedMinutes:null};const o=e.kind==="makeup";if(!e.clock_out_at)return{status:"incomplete",label:s?"进行中":"未完成",makeup:o,workedMinutes:null};const a=Co(Vn(e.clock_in_at)),c=Co(Vn(e.clock_out_at)),d=Co(n.work_start),h=Co(n.work_end);let g="normal";!o&&a>d+n.grace_minutes?g="late":!o&&c<h&&(g="early");const y=dv(e.clock_in_at,e.clock_out_at),k=Math.max(0,y-n.lunch_minutes);return{status:g,label:o?"补卡":g==="late"?"迟到":g==="early"?"早退":"正常",makeup:o,workedMinutes:k}}const Po=F([]);let qv=0;function Ge(e){const t=++qv;Po.value.push({id:t,text:e}),setTimeout(()=>{Po.value=Po.value.filter(n=>n.id!==t)},2e3)}function Hv(){return Po}const Sa=F(null),Ea=F(null),Hs=F(0);function Sr(){Hs.value++}const Wv={class:"day-panel"},zv={class:"dp-head"},Gv={class:"dp-date"},Yv={class:"card sec"},Jv={class:"att-grid"},Xv={class:"att-cell"},Qv={key:0,class:"edit-row"},Zv={key:1,class:"att-val"},em={class:"att-cell"},tm={key:0,class:"edit-row"},nm={key:1,class:"att-val"},rm={class:"att-cell"},sm=["list"],om=["id"],im=["value"],am={class:"att-cell"},lm={class:"att-val status-val"},um={key:0,class:"tag"},cm={key:1,class:"muted"},fm={key:0,class:"att-note muted"},dm={class:"att-actions"},pm=["disabled"],hm=["disabled"],vm=["disabled"],mm=["disabled"],ym={key:0,class:"card sec makeup"},gm={class:"form-grid"},bm={class:"field"},wm={class:"field"},_m={class:"field span2"},km=["list"],xm={class:"field span2"},Cm={key:0,class:"form-error"},Sm={class:"form-footer"},Em={class:"card sec"},$m={class:"form-grid"},Am={class:"field span2"},Pm={key:0,class:"form-error"},Tm={class:"field"},Om=["value"],Mm={class:"field"},Im=["value"],jm={class:"field"},Dm={class:"field"},Rm={class:"field span2"},Lm={class:"form-footer"},Km=["disabled"],Fm=["disabled"],Nm={class:"list-sec"},Vm={class:"sec-title"},Bm={key:0,class:"empty muted"},Um={class:"item-main"},qm={class:"tag"},Hm=["onClick"],Wm={key:0,class:"muted item-meta"},zm={key:1,class:"muted num item-meta"},Gm=["onClick"],Ym=["onClick"],Jm=["onClick"],Xm=["onClick"],Qm={key:0,class:"item-sub"},Zm={key:0,class:"muted2"},ey={key:1,class:"muted"},ty={key:1,class:"dp-foot muted num"},ny=Vt({__name:"DayPanel",props:{date:{}},setup(e){const t=e,n=F(!0),s=F(null),o=F(void 0),a=F([]),c=F([]),d=F(""),h=F([]),g=it(()=>"loc-list-"+t.date),y=it(()=>t.date===xt());async function k(){n.value=!0,s.value=await jr(),o.value=await mn(t.date),a.value=await Ev(t.date),c.value=await Ks(!0),h.value=await Xa(),d.value=o.value&&o.value.location||await hv(),n.value=!1}fn(k),gt(()=>t.date,k),gt(Hs,()=>{k()});const j=it(()=>c.value.filter(q=>q.archived!==1));function T(q){if(!q)return"";const B=c.value.find(G=>G.id===q);return B?B.name:"已删除项目"}const L=it(()=>s.value?qs(o.value,t.date,s.value,y.value):null),H=it(()=>a.value.reduce((q,B)=>q+(B.minutes||0),0)),fe=F(!1);async function ee(){fe.value||(fe.value=!0,await of(t.date,d.value),await k(),Sr(),Ge("上班打卡成功"),fe.value=!1)}async function E(){fe.value||(fe.value=!0,await bv(t.date),await k(),Sr(),Ge("下班打卡成功"),fe.value=!1)}async function R(){await vv(t.date,d.value),Sr(),Ge("地点已更新")}const Y=F(!1),le=it(()=>{var q;return((q=o.value)==null?void 0:q.kind)==="leave"});function ie(){if(o.value&&o.value.clock_in_at){Y.value=!0;return}Z(!0)}async function Z(q){Y.value=!1,await xv(t.date,q),await k(),Sr(),Ge(q?"已标记为休假":"已取消休假")}const A=F(null),x=F(""),oe=F(null);gt(A,async q=>{var B;q&&(await ts(),(B=oe.value)==null||B.focus())});function Ce(q){var G,Pe;const B=q==="in"?(G=o.value)==null?void 0:G.clock_in_at:(Pe=o.value)==null?void 0:Pe.clock_out_at;A.value=q,x.value=B?Vn(B):q==="in"?"09:00":"18:00"}function J(){A.value=null}async function Se(){const q=A.value;q&&(A.value=null,x.value&&(await kv(t.date,q==="in"?"clock_in_at":"clock_out_at",x.value),await k(),Sr(),Ge("打卡时间已修改")))}const Ve=F(!1),Xe=F("09:00"),Ne=F("18:00"),We=F(""),be=F(""),Ie=F("");function Ke(){be.value=d.value,Ie.value="",Ve.value=!Ve.value}async function de(){if(!Xe.value||!Ne.value){Ie.value="请填写上班与下班时间";return}await _v(t.date,t.date+"T"+Xe.value+":00",t.date+"T"+Ne.value+":00",We.value.trim(),be.value),Ve.value=!1,We.value="",Ie.value="",await k(),Sr(),Ge("补卡已保存")}const X=F(""),Q=F("");gt(X,()=>{Q.value&&(Q.value="")});const xe=F(null),ot=F("dev"),pt=F(null),ht=F(""),Jt=F(""),Bt=F(!1),he=it(()=>!!(X.value.trim()||pt.value||ht.value.trim()||Jt.value.trim()));fn(async()=>{const q=await pv();xe.value=q.project_id,ot.value=q.category});function m(){X.value="",pt.value=null,ht.value="",Jt.value="",Q.value=""}async function _(){const q=X.value.trim();if(!q){Q.value="请填写工作内容";return}Bt.value||(Bt.value=!0,await $v(t.date,{content:q,project_id:xe.value,category:ot.value,minutes:pt.value&&pt.value>0?pt.value:null,takeaway:ht.value.trim()||null,remark:Jt.value.trim()||null}),m(),await k(),Ge("记录已添加"),Bt.value=!1)}const W=F(null);function ce(q){W.value=q}async function se(q){const B=q.id,G={content:q.content,project_id:q.project_id,category:q.category,minutes:q.minutes,takeaway:q.takeaway,remark:q.remark,is_milestone:q.is_milestone,needs_followup:q.needs_followup};await ia(B,G),W.value=null,await k(),Ge("修改已保存")}async function ae(q){await ia(q.id,{is_milestone:q.is_milestone?0:1}),await k()}async function ue(q){await ia(q.id,{needs_followup:q.needs_followup?0:1}),await k()}const ye=F(null);async function ke(){ye.value&&ye.value.id&&await Av(ye.value.id),ye.value=null,await k(),Ge("记录已删除")}return(q,B)=>(K(),U("div",Wv,[u("div",zv,[u("div",Gv,re(nn(rf)(e.date)),1)]),u("div",Yv,[B[25]||(B[25]=u("div",{class:"sec-title"},"出勤信息",-1)),u("div",Jv,[u("div",Xv,[B[21]||(B[21]=u("label",null,"上班时间",-1)),A.value==="in"?(K(),U("div",Qv,[Ae(u("input",{ref_key:"timeInput",ref:oe,type:"time",class:"input time-input","onUpdate:modelValue":B[0]||(B[0]=G=>x.value=G),onKeydown:[jt(Se,["enter"]),jt(J,["esc"])]},null,544),[[De,x.value]]),u("button",{class:"btn btn-primary btn-sm",onClick:Se},"确认"),u("button",{class:"btn btn-sm",onClick:J},"取消")])):(K(),U("div",Zv,[u("span",{class:et(["num",{"val-empty":!(o.value&&o.value.clock_in_at)}])},re(o.value&&o.value.clock_in_at?nn(Vn)(o.value.clock_in_at):"未打卡"),3),o.value&&o.value.id?(K(),U("button",{key:0,class:"icon-btn",title:"修改上班时间",onClick:B[1]||(B[1]=G=>Ce("in"))},[Me(lt,{name:"edit",size:13})])):$e("",!0)]))]),u("div",em,[B[22]||(B[22]=u("label",null,"下班时间",-1)),A.value==="out"?(K(),U("div",tm,[Ae(u("input",{ref_key:"timeInput",ref:oe,type:"time",class:"input time-input","onUpdate:modelValue":B[2]||(B[2]=G=>x.value=G),onKeydown:[jt(Se,["enter"]),jt(J,["esc"])]},null,544),[[De,x.value]]),u("button",{class:"btn btn-primary btn-sm",onClick:Se},"确认"),u("button",{class:"btn btn-sm",onClick:J},"取消")])):(K(),U("div",nm,[u("span",{class:et(["num",{"val-empty":!(o.value&&o.value.clock_out_at)}])},re(o.value&&o.value.clock_out_at?nn(Vn)(o.value.clock_out_at):"未打卡"),3),o.value&&o.value.id?(K(),U("button",{key:0,class:"icon-btn",title:"修改下班时间",onClick:B[3]||(B[3]=G=>Ce("out"))},[Me(lt,{name:"edit",size:13})])):$e("",!0)]))]),u("div",rm,[B[23]||(B[23]=u("label",null,"上班地点",-1)),Ae(u("input",{class:"input","onUpdate:modelValue":B[4]||(B[4]=G=>d.value=G),list:g.value,placeholder:"可直接输入",title:"上班地点,可自由输入",onChange:R},null,40,sm),[[De,d.value]]),u("datalist",{id:g.value},[(K(!0),U(Re,null,ut(h.value,G=>(K(),U("option",{key:G,value:G},null,8,im))),128))],8,om)]),u("div",am,[B[24]||(B[24]=u("label",null,"考勤状态",-1)),u("div",lm,[L.value?(K(),U(Re,{key:0},[u("span",{class:et(["dot",L.value.status])},null,2),u("span",null,re(L.value.label),1),o.value&&o.value.kind==="makeup"?(K(),U("span",um,"补卡")):$e("",!0)],64)):(K(),U("span",cm,"--"))])])]),o.value&&o.value.note?(K(),U("div",fm,"补卡说明:"+re(o.value.note),1)):$e("",!0),u("div",dm,[y.value&&(!o.value||!o.value.clock_in_at)?(K(),U("button",{key:0,class:"btn btn-primary btn-sm",disabled:fe.value,onClick:ee},"上班打卡",8,pm)):y.value&&o.value&&o.value.clock_in_at&&!o.value.clock_out_at?(K(),U("button",{key:1,class:"btn btn-primary btn-sm",disabled:fe.value,onClick:E},"下班打卡",8,hm)):$e("",!0),!y.value&&(!o.value||!o.value.clock_in_at)?(K(),U("button",{key:2,class:"btn btn-sm",onClick:Ke},"补卡")):$e("",!0),le.value?(K(),U("button",{key:4,class:"btn btn-sm",disabled:fe.value,onClick:B[5]||(B[5]=G=>Z(!1))},"取消休假",8,mm)):(K(),U("button",{key:3,class:"btn btn-sm",disabled:fe.value,onClick:ie},"标记休假",8,vm))])]),Ve.value?(K(),U("div",ym,[B[30]||(B[30]=u("div",{class:"sec-title"},"补卡登记",-1)),u("div",gm,[u("div",bm,[B[26]||(B[26]=u("label",null,"上班时间",-1)),Ae(u("input",{type:"time",class:"input","onUpdate:modelValue":B[6]||(B[6]=G=>Xe.value=G)},null,512),[[De,Xe.value]])]),u("div",wm,[B[27]||(B[27]=u("label",null,"下班时间",-1)),Ae(u("input",{type:"time",class:"input","onUpdate:modelValue":B[7]||(B[7]=G=>Ne.value=G)},null,512),[[De,Ne.value]])]),u("div",_m,[B[28]||(B[28]=u("label",null,"上班地点",-1)),Ae(u("input",{class:"input",list:g.value,"onUpdate:modelValue":B[8]||(B[8]=G=>be.value=G),placeholder:"可直接输入"},null,8,km),[[De,be.value]])]),u("div",xm,[B[29]||(B[29]=u("label",null,"补卡原因",-1)),Ae(u("input",{class:"input","onUpdate:modelValue":B[9]||(B[9]=G=>We.value=G),placeholder:"如:外出拜访客户忘记打卡"},null,512),[[De,We.value]])])]),Ie.value?(K(),U("div",Cm,re(Ie.value),1)):$e("",!0),u("div",Sm,[u("button",{class:"btn btn-sm",onClick:B[10]||(B[10]=G=>Ve.value=!1)},"取消"),u("button",{class:"btn btn-primary btn-sm",onClick:de},"保存补卡")])])):$e("",!0),u("div",Em,[B[38]||(B[38]=u("div",{class:"sec-head"},[u("span",{class:"sec-title"},"新增工作记录"),u("span",{class:"muted form-hint"},"内容必填,其余选填")],-1)),u("div",$m,[u("div",Am,[B[31]||(B[31]=u("label",null,"工作内容(必填)",-1)),Ae(u("input",{class:et(["input",{invalid:Q.value}]),"onUpdate:modelValue":B[11]||(B[11]=G=>X.value=G),placeholder:"做了什么,一句话一条",onKeydown:jt(_,["enter"])},null,34),[[De,X.value]]),Q.value?(K(),U("div",Pm,re(Q.value),1)):$e("",!0)]),u("div",Tm,[B[33]||(B[33]=u("label",null,"所属项目",-1)),Ae(u("select",{class:"select","onUpdate:modelValue":B[12]||(B[12]=G=>xe.value=G)},[B[32]||(B[32]=u("option",{value:null},"无项目",-1)),(K(!0),U(Re,null,ut(j.value,G=>(K(),U("option",{key:G.id,value:G.id},re(G.name),9,Om))),128))],512),[[Fn,xe.value]])]),u("div",Mm,[B[34]||(B[34]=u("label",null,"工作分类",-1)),Ae(u("select",{class:"select","onUpdate:modelValue":B[13]||(B[13]=G=>ot.value=G)},[(K(!0),U(Re,null,ut(nn(Us),G=>(K(),U("option",{key:G.key,value:G.key},re(G.label),9,Im))),128))],512),[[Fn,ot.value]])]),u("div",jm,[B[35]||(B[35]=u("label",null,"耗时(分钟)",-1)),Ae(u("input",{class:"input",type:"number",min:"0","onUpdate:modelValue":B[14]||(B[14]=G=>pt.value=G),placeholder:"选填"},null,512),[[De,pt.value,void 0,{number:!0}]])]),u("div",Dm,[B[36]||(B[36]=u("label",null,"主要收获",-1)),Ae(u("input",{class:"input","onUpdate:modelValue":B[15]||(B[15]=G=>ht.value=G),placeholder:"一句话:学到了什么"},null,512),[[De,ht.value]])]),u("div",Rm,[B[37]||(B[37]=u("label",null,"备注",-1)),Ae(u("textarea",{class:"textarea","onUpdate:modelValue":B[16]||(B[16]=G=>Jt.value=G),placeholder:"背景、链接、未决事项(选填)"},null,512),[[De,Jt.value]])])]),u("div",Lm,[u("button",{class:"btn btn-sm",disabled:!he.value,onClick:m},"重置",8,Km),u("button",{class:"btn btn-primary btn-sm",disabled:Bt.value,onClick:_},"添加记录",8,Fm)])]),u("div",Nm,[u("div",Vm,"工作记录("+re(a.value.length)+")",1),!a.value.length&&!n.value?(K(),U("div",Bm,"暂无记录")):$e("",!0),(K(!0),U(Re,null,ut(a.value,G=>(K(),U("div",{key:G.id,class:"item"},[u("div",Um,[u("span",qm,re(nn(Ja)(G.category)),1),u("span",{class:"item-content",title:"点击编辑",onClick:Pe=>ce(G)},re(G.content),9,Hm),G.project_id?(K(),U("span",Wm,re(T(G.project_id)),1)):$e("",!0),G.minutes?(K(),U("span",zm,re(G.minutes)+" 分钟",1)):$e("",!0),B[39]||(B[39]=u("span",{class:"flex1"},null,-1)),u("button",{class:"icon-btn",title:"编辑完整信息",onClick:Pe=>ce(G)},[Me(lt,{name:"edit",size:14})],8,Gm),u("button",{class:et(["icon-btn",{active:G.is_milestone===1}]),title:"成果标记",onClick:Pe=>ae(G)},[Me(lt,{name:"star",size:14})],10,Ym),u("button",{class:et(["icon-btn",{"active-warn":G.needs_followup===1}]),title:"待跟进",onClick:Pe=>ue(G)},[Me(lt,{name:"flag",size:14})],10,Jm),u("button",{class:"icon-btn",title:"删除",onClick:Pe=>ye.value=G},[Me(lt,{name:"close",size:14})],8,Xm)]),G.takeaway||G.remark?(K(),U("div",Qm,[G.takeaway?(K(),U("div",Zm,"收获:"+re(G.takeaway),1)):$e("",!0),G.remark?(K(),U("div",ey,"备注:"+re(G.remark),1)):$e("",!0)])):$e("",!0)]))),128)),a.value.length?(K(),U("div",ty,[tn(" 共 "+re(a.value.length)+" 条事项 ",1),H.value?(K(),U(Re,{key:0},[tn(" · "+re((H.value/60).toFixed(1))+" 小时",1)],64)):$e("",!0)])):$e("",!0)]),Me(ur,{open:!!ye.value,title:"删除确认",message:ye.value?"将删除工作记录「"+ye.value.content+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:B[17]||(B[17]=G=>ye.value=null),onConfirm:ke},null,8,["open","message"]),Me(ur,{open:Y.value,title:"标记休假确认",message:"该日已有打卡记录,标记休假将清空上下班时间。是否继续?","confirm-text":"标记休假",danger:"",onCancel:B[18]||(B[18]=G=>Y.value=!1),onConfirm:B[19]||(B[19]=G=>Z(!0))},null,8,["open"]),Me(cv,{open:!!W.value,item:W.value,projects:c.value,date:e.date,onCancel:B[20]||(B[20]=G=>W.value=null),onSave:se},null,8,["open","item","projects","date"])]))}}),af=Yt(ny,[["__scopeId","data-v-2e90c9d8"]]),ry={class:"cal-page"},sy={class:"cal-toolbar"},oy={class:"cal-title num"},iy={class:"cal-head"},ay={class:"cal-grid"},ly=["title","onClick"],uy={class:"cal-marks"},cy={key:0,class:"drawer"},fy={class:"drawer-head"},dy={class:"drawer-body"},py=Vt({__name:"CalendarView",setup(e){const t=F(xt()),n=it(()=>Number(t.value.slice(0,4))),s=it(()=>Number(t.value.slice(5,7))-1),o=it(()=>n.value+" 年 "+(s.value+1)+" 月"),a=["一","二","三","四","五","六","日"],c=it(()=>{const Y=(new Date(n.value,s.value,1).getDay()+6)%7,le=new Date(n.value,s.value+1,0).getDate(),ie=[];for(let Z=0;Z<Y;Z++)ie.push({date:"",inMonth:!1,weekend:!1});for(let Z=1;Z<=le;Z++){const A=new Date(n.value,s.value,Z),x=A.getDay();ie.push({date:Nn(A),inMonth:!0,weekend:x===0||x===6})}return ie}),d=F(new Map),h=xt();async function g(){var oe;const R=Nn(new Date(n.value,s.value,1)),Y=Nn(new Date(n.value,s.value+1,0)),le=await Promise.all([jr(),ci(R,Y),fi(R,Y)]),ie=le[0],Z=new Map(le[1].map(Ce=>[Ce.date,Ce])),A=le[2],x=new Map;for(const Ce of c.value){if(!Ce.inMonth)continue;const J=qs(Z.get(Ce.date),Ce.date,ie,Ce.date===h),Se=A.filter(Ve=>Ve.date===Ce.date);x.set(Ce.date,{status:J.status,label:J.label,location:((oe=Z.get(Ce.date))==null?void 0:oe.location)||"",hasLog:Se.length>0,hasMilestone:Se.some(Ve=>Ve.is_milestone===1)})}d.value=x}gt([n,s],g,{immediate:!0}),gt(Hs,()=>{g()});function y(R){var Y;return((Y=d.value.get(R))==null?void 0:Y.status)??""}function k(R){const Y=d.value.get(R);return Y?R+" · "+Y.label+(Y.location?" · "+Y.location:""):R}function j(R){var Y;return!!((Y=d.value.get(R))!=null&&Y.hasLog)}function T(R){var Y;return!!((Y=d.value.get(R))!=null&&Y.hasMilestone)}function L(){t.value=Bo(t.value,-1)}function H(){t.value=Bo(t.value,1)}function fe(){t.value=xt()}const ee=F(null);function E(R,Y){Y&&(ee.value=R)}return gt(Sa,R=>{R&&(t.value=R,ee.value=R,Sa.value=null)},{immediate:!0}),(R,Y)=>(K(),U("div",ry,[u("div",sy,[u("button",{class:"icon-btn",onClick:L},[Me(lt,{name:"chevron-left",size:16})]),u("span",oy,re(o.value),1),u("button",{class:"icon-btn",onClick:H},[Me(lt,{name:"chevron-right",size:16})]),u("button",{class:"btn btn-sm",onClick:fe},"回到今天")]),u("div",iy,[(K(),U(Re,null,ut(a,le=>u("span",{key:le,class:"cal-week muted"},re(le),1)),64))]),u("div",ay,[(K(!0),U(Re,null,ut(c.value,(le,ie)=>(K(),U("button",{key:ie,class:et(["cal-cell",{blank:!le.inMonth,weekend:le.weekend,selected:ee.value===le.date}]),title:le.inMonth?k(le.date):void 0,onClick:Z=>E(le.date,le.inMonth)},[le.inMonth?(K(),U(Re,{key:0},[u("span",{class:et(["daynum num",{today:le.date===nn(h)}])},re(Number(le.date.slice(8,10))),3),u("span",uy,[y(le.date)?(K(),U("span",{key:0,class:et(["dot",y(le.date)])},null,2)):$e("",!0),j(le.date)?(K(),It(lt,{key:1,name:"check-circle",size:12,class:"mark-log"})):$e("",!0),T(le.date)?(K(),It(lt,{key:2,name:"star",size:12,class:"mark-star"})):$e("",!0)])],64)):$e("",!0)],10,ly))),128))]),Me(ns,{name:"drawer"},{default:fr(()=>[ee.value?(K(),U("aside",cy,[u("div",fy,[Y[1]||(Y[1]=u("span",{class:"drawer-title"},"当日详情",-1)),u("button",{class:"icon-btn",onClick:Y[0]||(Y[0]=le=>ee.value=null)},[Me(lt,{name:"close",size:16})])]),u("div",dy,[Me(af,{date:ee.value},null,8,["date"])])])):$e("",!0)]),_:1})]))}}),hy=Yt(py,[["__scopeId","data-v-6a6322fa"]]),vy={class:"detail-page"},my={class:"detail-toolbar"},yy=["value"],gy=["disabled"],by=Vt({__name:"TodayView",setup(e){const t=F(xt()),n=it(()=>t.value===xt());function s(){t.value=Kn(t.value,-1)}function o(){t.value=Kn(t.value,1)}function a(){t.value=xt()}function c(d){const h=d.target.value;h&&(t.value=h)}return(d,h)=>(K(),U("div",vy,[u("div",my,[u("button",{class:"icon-btn",title:"前一天",onClick:s},[Me(lt,{name:"chevron-left",size:16})]),u("span",{class:et(["date-title num",{"is-today":n.value}])},re(nn(rf)(t.value)),3),u("button",{class:"icon-btn",title:"后一天",onClick:o},[Me(lt,{name:"chevron-right",size:16})]),u("input",{type:"date",class:"input w-date",value:t.value,onChange:c},null,40,yy),u("button",{class:"btn btn-sm",disabled:n.value,onClick:a},"回到今天",8,gy)]),Me(af,{date:t.value},null,8,["date"])]))}}),wy=Yt(by,[["__scopeId","data-v-ac366cf6"]]),_y={class:"stats"},ky={class:"cards"},xy={class:"card stat-card"},Cy={class:"stat-num num"},Sy={class:"card stat-card"},Ey={class:"stat-num num"},$y={class:"card stat-card"},Ay={class:"stat-num num"},Py={class:"card stat-card"},Ty={class:"stat-num num"},Oy={class:"card section"},My={class:"heat"},Iy=["title"],jy={class:"two-col"},Dy={class:"card section"},Ry={class:"bar-label"},Ly={class:"bar-track"},Ky={class:"muted num bar-num"},Fy={key:0,class:"muted"},Ny={class:"card section"},Vy={class:"bar-label"},By={class:"bar-track"},Uy={class:"muted num bar-num"},qy={key:0,class:"muted"},Hy={class:"card section"},Wy={class:"bar-label loc-label"},zy={class:"bar-track"},Gy={class:"muted num bar-num"},Yy={key:0,class:"muted"},Jy=Vt({__name:"StatsView",setup(e){const t=F({attendDays:0,totalHours:"0",itemCount:0,streak:0}),n=F([]),s=F([]),o=F([]),a=F([]);async function c(){const g=xt(),y="2000-01-01",k=await Promise.all([jr(),ci(y,g),fi(y,g),Ks(!0)]),j=k[0],T=k[1],L=k[2],H=k[3],fe=T.filter(J=>J.clock_in_at||J.kind==="makeup");let ee=0;for(const J of fe){const Se=qs(J,J.date,j,J.date===g);ee+=Se.workedMinutes??0}const E=new Set(L.map(J=>J.date));let R=0,Y=g;for(E.has(Y)||(Y=Kn(g,-1));E.has(Y);)R++,Y=Kn(Y,-1);t.value={attendDays:fe.length,totalHours:(ee/60).toFixed(1),itemCount:L.length,streak:R};const le=new Map;for(const J of fe){const Se=J.location||"未记录";le.set(Se,(le.get(Se)||0)+1)}a.value=Array.from(le.entries()).map(J=>({name:J[0],count:J[1],percent:Math.round(J[1]/(fe.length||1)*100)})).sort((J,Se)=>Se.count-J.count);const ie=L.length||1;s.value=Us.map(J=>{const Se=L.filter(Ve=>Ve.category===J.key).length;return{key:J.key,label:J.label,count:Se,percent:Math.round(Se/ie*100)}}).filter(J=>J.count>0).sort((J,Se)=>Se.count-J.count);const Z=new Map(H.map(J=>[J.id,J.name])),A=new Map;for(const J of L){const Se=J.project_id?Z.get(J.project_id)||"已删除项目":"无项目";A.set(Se,(A.get(Se)||0)+1)}o.value=Array.from(A.entries()).map(J=>({name:J[0],count:J[1],percent:Math.round(J[1]/ie*100)})).sort((J,Se)=>Se.count-J.count);const x=new Map;for(const J of L)x.set(J.date,(x.get(J.date)||0)+1);const oe=Es(g),Ce=[];for(let J=11;J>=0;J--){const Se=Kn(oe,-7*J),Ve=[];for(let Xe=0;Xe<7;Xe++){const Ne=Kn(Se,Xe);Ve.push({date:Ne,count:x.get(Ne)||0})}Ce.push(Ve)}n.value=Ce}fn(async()=>{await c()}),gt(Hs,()=>{c()});function d(g){return g===0?0:g===1?1:g<=3?2:g<=5?3:4}function h(g,y){return g+" · "+(y?y+" 条":"无记录")}return(g,y)=>(K(),U("div",_y,[u("div",ky,[u("div",xy,[y[0]||(y[0]=u("div",{class:"muted"},"出勤天数",-1)),u("div",Cy,re(t.value.attendDays),1)]),u("div",Sy,[y[1]||(y[1]=u("div",{class:"muted"},"累计工时(小时)",-1)),u("div",Ey,re(t.value.totalHours),1)]),u("div",$y,[y[2]||(y[2]=u("div",{class:"muted"},"记录条数",-1)),u("div",Ay,re(t.value.itemCount),1)]),u("div",Py,[y[3]||(y[3]=u("div",{class:"muted"},"连续记录(天)",-1)),u("div",Ty,re(t.value.streak),1)])]),u("div",Oy,[y[4]||(y[4]=u("div",{class:"section-title"},"记录热力图(近 12 周)",-1)),u("div",My,[(K(!0),U(Re,null,ut(n.value,(k,j)=>(K(),U("div",{key:j,class:"heat-col"},[(K(!0),U(Re,null,ut(k,T=>(K(),U("span",{key:T.date,class:et(["heat-cell","lv"+d(T.count)]),title:h(T.date,T.count)},null,10,Iy))),128))]))),128))]),y[5]||(y[5]=Ip('<div class="heat-legend muted" data-v-73e5ba49><span data-v-73e5ba49>少</span><span class="heat-cell lv0" data-v-73e5ba49></span><span class="heat-cell lv1" data-v-73e5ba49></span><span class="heat-cell lv2" data-v-73e5ba49></span><span class="heat-cell lv3" data-v-73e5ba49></span><span class="heat-cell lv4" data-v-73e5ba49></span><span data-v-73e5ba49>多</span></div>',1))]),u("div",jy,[u("div",Dy,[y[6]||(y[6]=u("div",{class:"section-title"},"分类分布",-1)),(K(!0),U(Re,null,ut(s.value,k=>(K(),U("div",{key:k.key,class:"bar-row"},[u("span",Ry,re(k.label),1),u("span",Ly,[u("span",{class:"bar-fill",style:sr({width:k.percent+"%"})},null,4)]),u("span",Ky,re(k.count)+" 条 · "+re(k.percent)+"%",1)]))),128)),s.value.length?$e("",!0):(K(),U("div",Fy,"暂无数据"))]),u("div",Ny,[y[7]||(y[7]=u("div",{class:"section-title"},"项目投入",-1)),(K(!0),U(Re,null,ut(o.value,k=>(K(),U("div",{key:k.name,class:"bar-row"},[u("span",Vy,re(k.name),1),u("span",By,[u("span",{class:"bar-fill",style:sr({width:k.percent+"%"})},null,4)]),u("span",Uy,re(k.count)+" 条 · "+re(k.percent)+"%",1)]))),128)),o.value.length?$e("",!0):(K(),U("div",qy,"暂无数据"))])]),u("div",Hy,[y[8]||(y[8]=u("div",{class:"section-title"},"地点分布(按出勤天)",-1)),(K(!0),U(Re,null,ut(a.value,k=>(K(),U("div",{key:k.name,class:"bar-row"},[u("span",Wy,re(k.name),1),u("span",zy,[u("span",{class:"bar-fill",style:sr({width:k.percent+"%"})},null,4)]),u("span",Gy,re(k.count)+" 天 · "+re(k.percent)+"%",1)]))),128)),a.value.length?$e("",!0):(K(),U("div",Yy,"暂无数据"))])]))}}),Xy=Yt(Jy,[["__scopeId","data-v-73e5ba49"]]);async function Qy(e,t,n){const s=xt(),o=await Promise.all([jr(),ci(e,t),fi(e,t),Ks(!0),Tv(e,t)]),a=o[0],c=o[1],d=o[2],h=o[3],g=o[4];let y=0,k=0,j=0;for(const A of c){(A.clock_in_at||A.kind==="makeup")&&y++,A.kind==="makeup"&&j++;const x=qs(A,A.date,a,A.date===s);k+=x.workedMinutes??0}const T=new Map;for(const A of c){if(!(A.clock_in_at||A.kind==="makeup"))continue;const x=A.location||"未记录";T.set(x,(T.get(x)||0)+1)}const L=Array.from(T.entries()).map(A=>({name:A[0],count:A[1]})).sort((A,x)=>x.count-A.count),H=d.length||1,fe=Us.map(A=>{const x=d.filter(oe=>oe.category===A.key).length;return{key:A.key,label:A.label,count:x,percent:Math.round(x/H*100)}}).filter(A=>A.count>0).sort((A,x)=>x.count-A.count),ee=new Map(h.map(A=>[A.id,A.name])),E=new Map;for(const A of d){const x=A.project_id?ee.get(A.project_id)||"已删除项目":"无项目";E.set(x,(E.get(x)||0)+1)}const R=Array.from(E.entries()).map(A=>({name:A[0],count:A[1]})).sort((A,x)=>x.count-A.count),Y=d.filter(A=>A.is_milestone===1).map(A=>({date:A.date,content:A.content})),le=d.filter(A=>A.needs_followup===1).map(A=>({date:A.date,content:A.content,remark:A.remark||""})),ie=d.filter(A=>!!A.takeaway).map(A=>({date:A.date,text:A.takeaway})),Z=g.map(A=>({weekStart:A.week_start,highlights:A.highlights||"",challenges:A.challenges||"",plan_next:A.plan_next||""}));return{range:{start:e,end:t,label:n},attendDays:y,totalHours:(k/60).toFixed(1),makeupCount:j,leaveCount:c.filter(A=>A.kind==="leave").length,itemCount:d.length,categoryStats:fe,projectStats:R,locationStats:L,milestones:Y,followups:le,takeaways:ie,weekNotes:Z}}function Zy(e){const t=[];t.push("# 实习工作总结("+e.range.start+" ~ "+e.range.end+")"),t.push(""),t.push("## 一、考勤概况"),t.push(""),t.push("出勤 "+e.attendDays+" 天,累计工时 "+e.totalHours+" 小时,补卡 "+e.makeupCount+" 次"+(e.leaveCount?",请假 "+e.leaveCount+" 天":""));const n=e.locationStats.filter(s=>s.name!=="未记录");n.length&&t.push("其中:"+n.map(s=>s.name+" "+s.count+" 天").join(",")),t.push(""),t.push("## 二、工作内容分布"),t.push(""),t.push(e.categoryStats.length?e.categoryStats.map(s=>s.label+" "+s.percent+"%("+s.count+" 条)").join(","):"(无记录)"),t.push(""),t.push("## 三、项目投入"),t.push(""),t.push(e.projectStats.length?e.projectStats.map(s=>s.name+" "+s.count+" 条").join(","):"(无记录)"),t.push(""),t.push("## 四、主要成果"),t.push(""),e.milestones.length?e.milestones.forEach((s,o)=>t.push(o+1+". 【成果】"+s.content+"("+s.date+")")):t.push("(无)"),t.push(""),t.push("## 五、待跟进事项"),t.push(""),e.followups.length?e.followups.forEach(s=>t.push("- 【待跟进】"+s.content+(s.remark?"("+s.date+" 备注:"+s.remark+")":"("+s.date+")"))):t.push("(无)"),t.push(""),t.push("## 六、学习与成长"),t.push(""),e.takeaways.length?e.takeaways.forEach(s=>t.push("- "+s.text+"("+s.date+")")):t.push("(无)");for(const s of e.weekNotes)t.push(""),t.push("### 周记("+s.weekStart+" 起)"),t.push(""),t.push("- 本周亮点:"+(s.highlights||"(无)")),t.push("- 踩的坑:"+(s.challenges||"(无)")),t.push("- 下周计划:"+(s.plan_next||"(无)"));return t.push(""),t.join(`
|
||
`)}const eg="modulepreload",tg=function(e,t){return new URL(e,t).href},Au={},lf=function(t,n,s){let o=Promise.resolve();if(n&&n.length>0){const c=document.getElementsByTagName("link"),d=document.querySelector("meta[property=csp-nonce]"),h=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));o=Promise.allSettled(n.map(g=>{if(g=tg(g,s),g in Au)return;Au[g]=!0;const y=g.endsWith(".css"),k=y?'[rel="stylesheet"]':"";if(!!s)for(let L=c.length-1;L>=0;L--){const H=c[L];if(H.href===g&&(!y||H.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${g}"]${k}`))return;const T=document.createElement("link");if(T.rel=y?"stylesheet":eg,y||(T.as="script"),T.crossOrigin="",T.href=g,h&&T.setAttribute("nonce",h),document.head.appendChild(T),y)return new Promise((L,H)=>{T.addEventListener("load",L),T.addEventListener("error",()=>H(new Error(`Unable to preload CSS for ${g}`)))})}))}function a(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return o.then(c=>{for(const d of c||[])d.status==="rejected"&&a(d.reason);return t().catch(a)})};/*! Capacitor: https://capacitorjs.com/ - MIT License */const ng=e=>{const t=new Map;t.set("web",{name:"web"});const n=e.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:t},s=(a,c)=>{n.platforms.set(a,c)},o=a=>{n.platforms.has(a)&&(n.currentPlatform=n.platforms.get(a))};return n.addPlatform=s,n.setPlatform=o,n},rg=e=>e.CapacitorPlatforms=ng(e),uf=rg(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});uf.addPlatform;uf.setPlatform;var Qr;(function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"})(Qr||(Qr={}));class aa extends Error{constructor(t,n,s){super(t),this.message=t,this.code=n,this.data=s}}const sg=e=>{var t,n;return e!=null&&e.androidBridge?"android":!((n=(t=e==null?void 0:e.webkit)===null||t===void 0?void 0:t.messageHandlers)===null||n===void 0)&&n.bridge?"ios":"web"},og=e=>{var t,n,s,o,a;const c=e.CapacitorCustomPlatform||null,d=e.Capacitor||{},h=d.Plugins=d.Plugins||{},g=e.CapacitorPlatforms,y=()=>c!==null?c.name:sg(e),k=((t=g==null?void 0:g.currentPlatform)===null||t===void 0?void 0:t.getPlatform)||y,j=()=>k()!=="web",T=((n=g==null?void 0:g.currentPlatform)===null||n===void 0?void 0:n.isNativePlatform)||j,L=Z=>{const A=Y.get(Z);return!!(A!=null&&A.platforms.has(k())||ee(Z))},H=((s=g==null?void 0:g.currentPlatform)===null||s===void 0?void 0:s.isPluginAvailable)||L,fe=Z=>{var A;return(A=d.PluginHeaders)===null||A===void 0?void 0:A.find(x=>x.name===Z)},ee=((o=g==null?void 0:g.currentPlatform)===null||o===void 0?void 0:o.getPluginHeader)||fe,E=Z=>e.console.error(Z),R=(Z,A,x)=>Promise.reject(`${x} does not have an implementation of "${A}".`),Y=new Map,le=(Z,A={})=>{const x=Y.get(Z);if(x)return console.warn(`Capacitor plugin "${Z}" already registered. Cannot register plugins twice.`),x.proxy;const oe=k(),Ce=ee(Z);let J;const Se=async()=>(!J&&oe in A?J=typeof A[oe]=="function"?J=await A[oe]():J=A[oe]:c!==null&&!J&&"web"in A&&(J=typeof A.web=="function"?J=await A.web():J=A.web),J),Ve=(Ke,de)=>{var X,Q;if(Ce){const xe=Ce==null?void 0:Ce.methods.find(ot=>de===ot.name);if(xe)return xe.rtype==="promise"?ot=>d.nativePromise(Z,de.toString(),ot):(ot,pt)=>d.nativeCallback(Z,de.toString(),ot,pt);if(Ke)return(X=Ke[de])===null||X===void 0?void 0:X.bind(Ke)}else{if(Ke)return(Q=Ke[de])===null||Q===void 0?void 0:Q.bind(Ke);throw new aa(`"${Z}" plugin is not implemented on ${oe}`,Qr.Unimplemented)}},Xe=Ke=>{let de;const X=(...Q)=>{const xe=Se().then(ot=>{const pt=Ve(ot,Ke);if(pt){const ht=pt(...Q);return de=ht==null?void 0:ht.remove,ht}else throw new aa(`"${Z}.${Ke}()" is not implemented on ${oe}`,Qr.Unimplemented)});return Ke==="addListener"&&(xe.remove=async()=>de()),xe};return X.toString=()=>`${Ke.toString()}() { [capacitor code] }`,Object.defineProperty(X,"name",{value:Ke,writable:!1,configurable:!1}),X},Ne=Xe("addListener"),We=Xe("removeListener"),be=(Ke,de)=>{const X=Ne({eventName:Ke},de),Q=async()=>{const ot=await X;We({eventName:Ke,callbackId:ot},de)},xe=new Promise(ot=>X.then(()=>ot({remove:Q})));return xe.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await Q()},xe},Ie=new Proxy({},{get(Ke,de){switch(de){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return Ce?be:Ne;case"removeListener":return We;default:return Xe(de)}}});return h[Z]=Ie,Y.set(Z,{name:Z,proxy:Ie,platforms:new Set([...Object.keys(A),...Ce?[oe]:[]])}),Ie},ie=((a=g==null?void 0:g.currentPlatform)===null||a===void 0?void 0:a.registerPlugin)||le;return d.convertFileSrc||(d.convertFileSrc=Z=>Z),d.getPlatform=k,d.handleError=E,d.isNativePlatform=T,d.isPluginAvailable=H,d.pluginMethodNoop=R,d.registerPlugin=ie,d.Exception=aa,d.DEBUG=!!d.DEBUG,d.isLoggingEnabled=!!d.isLoggingEnabled,d.platform=d.getPlatform(),d.isNative=d.isNativePlatform(),d},ig=e=>e.Capacitor=og(e),Zr=ig(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),cf=Zr.registerPlugin;Zr.Plugins;class ff{constructor(t){this.listeners={},this.retainedEventArguments={},this.windowListeners={},t&&(console.warn(`Capacitor WebPlugin "${t.name}" config object was deprecated in v3 and will be removed in v4.`),this.config=t)}addListener(t,n){let s=!1;this.listeners[t]||(this.listeners[t]=[],s=!0),this.listeners[t].push(n);const a=this.windowListeners[t];a&&!a.registered&&this.addWindowListener(a),s&&this.sendRetainedArgumentsForEvent(t);const c=async()=>this.removeListener(t,n);return Promise.resolve({remove:c})}async removeAllListeners(){this.listeners={};for(const t in this.windowListeners)this.removeWindowListener(this.windowListeners[t]);this.windowListeners={}}notifyListeners(t,n,s){const o=this.listeners[t];if(!o){if(s){let a=this.retainedEventArguments[t];a||(a=[]),a.push(n),this.retainedEventArguments[t]=a}return}o.forEach(a=>a(n))}hasListeners(t){return!!this.listeners[t].length}registerWindowListener(t,n){this.windowListeners[n]={registered:!1,windowEventName:t,pluginEventName:n,handler:s=>{this.notifyListeners(n,s)}}}unimplemented(t="not implemented"){return new Zr.Exception(t,Qr.Unimplemented)}unavailable(t="not available"){return new Zr.Exception(t,Qr.Unavailable)}async removeListener(t,n){const s=this.listeners[t];if(!s)return;const o=s.indexOf(n);this.listeners[t].splice(o,1),this.listeners[t].length||this.removeWindowListener(this.windowListeners[t])}addWindowListener(t){window.addEventListener(t.windowEventName,t.handler),t.registered=!0}removeWindowListener(t){t&&(window.removeEventListener(t.windowEventName,t.handler),t.registered=!1)}sendRetainedArgumentsForEvent(t){const n=this.retainedEventArguments[t];n&&(delete this.retainedEventArguments[t],n.forEach(s=>{this.notifyListeners(t,s)}))}}const Pu=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),Tu=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class ag extends ff{async getCookies(){const t=document.cookie,n={};return t.split(";").forEach(s=>{if(s.length<=0)return;let[o,a]=s.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");o=Tu(o).trim(),a=Tu(a).trim(),n[o]=a}),n}async setCookie(t){try{const n=Pu(t.key),s=Pu(t.value),o=`; expires=${(t.expires||"").replace("expires=","")}`,a=(t.path||"/").replace("path=",""),c=t.url!=null&&t.url.length>0?`domain=${t.url}`:"";document.cookie=`${n}=${s||""}${o}; path=${a}; ${c};`}catch(n){return Promise.reject(n)}}async deleteCookie(t){try{document.cookie=`${t.key}=; Max-Age=0`}catch(n){return Promise.reject(n)}}async clearCookies(){try{const t=document.cookie.split(";")||[];for(const n of t)document.cookie=n.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(t){return Promise.reject(t)}}async clearAllCookies(){try{await this.clearCookies()}catch(t){return Promise.reject(t)}}}cf("CapacitorCookies",{web:()=>new ag});const lg=async e=>new Promise((t,n)=>{const s=new FileReader;s.onload=()=>{const o=s.result;t(o.indexOf(",")>=0?o.split(",")[1]:o)},s.onerror=o=>n(o),s.readAsDataURL(e)}),ug=(e={})=>{const t=Object.keys(e);return Object.keys(e).map(o=>o.toLocaleLowerCase()).reduce((o,a,c)=>(o[a]=e[t[c]],o),{})},cg=(e,t=!0)=>e?Object.entries(e).reduce((s,o)=>{const[a,c]=o;let d,h;return Array.isArray(c)?(h="",c.forEach(g=>{d=t?encodeURIComponent(g):g,h+=`${a}=${d}&`}),h.slice(0,-1)):(d=t?encodeURIComponent(c):c,h=`${a}=${d}`),`${s}&${h}`},"").substr(1):null,fg=(e,t={})=>{const n=Object.assign({method:e.method||"GET",headers:e.headers},t),o=ug(e.headers)["content-type"]||"";if(typeof e.data=="string")n.body=e.data;else if(o.includes("application/x-www-form-urlencoded")){const a=new URLSearchParams;for(const[c,d]of Object.entries(e.data||{}))a.set(c,d);n.body=a.toString()}else if(o.includes("multipart/form-data")||e.data instanceof FormData){const a=new FormData;if(e.data instanceof FormData)e.data.forEach((d,h)=>{a.append(h,d)});else for(const d of Object.keys(e.data))a.append(d,e.data[d]);n.body=a;const c=new Headers(n.headers);c.delete("content-type"),n.headers=c}else(o.includes("application/json")||typeof e.data=="object")&&(n.body=JSON.stringify(e.data));return n};class dg extends ff{async request(t){const n=fg(t,t.webFetchExtra),s=cg(t.params,t.shouldEncodeUrlParams),o=s?`${t.url}?${s}`:t.url,a=await fetch(o,n),c=a.headers.get("content-type")||"";let{responseType:d="text"}=a.ok?t:{};c.includes("application/json")&&(d="json");let h,g;switch(d){case"arraybuffer":case"blob":g=await a.blob(),h=await lg(g);break;case"json":h=await a.json();break;case"document":case"text":default:h=await a.text()}const y={};return a.headers.forEach((k,j)=>{y[j]=k}),{data:h,headers:y,status:a.status,url:a.url}}async get(t){return this.request(Object.assign(Object.assign({},t),{method:"GET"}))}async post(t){return this.request(Object.assign(Object.assign({},t),{method:"POST"}))}async put(t){return this.request(Object.assign(Object.assign({},t),{method:"PUT"}))}async patch(t){return this.request(Object.assign(Object.assign({},t),{method:"PATCH"}))}async delete(t){return this.request(Object.assign(Object.assign({},t),{method:"DELETE"}))}}cf("CapacitorHttp",{web:()=>new dg});async function Za(e,t){if(Zr.isNativePlatform()){const{Filesystem:a,Directory:c,Encoding:d}=await lf(async()=>{const{Filesystem:h,Directory:g,Encoding:y}=await import("./index-B_4Yi4Y9.js");return{Filesystem:h,Directory:g,Encoding:y}},[],import.meta.url);try{return(await a.writeFile({path:e,data:t,directory:c.Documents,encoding:d.UTF8,recursive:!0})).uri}catch{return(await a.writeFile({path:e,data:t,directory:c.Cache,encoding:d.UTF8,recursive:!0})).uri}}const n=new Blob([t],{type:"text/plain;charset=utf-8"}),s=URL.createObjectURL(n),o=document.createElement("a");return o.href=s,o.download=e,o.click(),window.setTimeout(()=>URL.revokeObjectURL(s),1e4),""}const pg=Object.freeze(Object.defineProperty({__proto__:null,downloadText:Za},Symbol.toStringTag,{value:"Module"}));async function $a(e){try{await navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}}async function hg(e){const t=await Promise.all([yt("ai_base_url",""),yt("ai_api_key",""),yt("ai_model","")]),n=t[0].trim().replace(/\/+$/,""),s=t[1].trim(),o=t[2].trim();if(!n||!o)throw new Error("请先在设置页配置 AI 接口地址与模型名称");const a=n+"/chat/completions",c={"Content-Type":"application/json"};s&&(c.Authorization="Bearer "+s);const h=JSON.stringify({model:o,messages:[{role:"system",content:"你是一名严谨的中文助理。请将用户提供的工作总结 Markdown 草稿润色为通顺、专业、简洁的工作总结。要求:保留原有章节结构与全部事实数据(数字、日期、条目),不得虚构或遗漏内容,只输出 Markdown 正文。"},{role:"user",content:e}],temperature:.3});let g;try{g=await fetch(a,{method:"POST",headers:c,body:h})}catch{throw new Error("无法访问 AI 接口:请检查地址是否正确、服务端是否允许浏览器跨域访问")}if(!g.ok){let j="接口返回 "+g.status;try{const T=await g.json();T&&T.error&&T.error.message&&(j+=":"+T.error.message)}catch{}throw new Error(j)}const y=await g.json(),k=y&&y.choices&&y.choices[0]&&y.choices[0].message&&y.choices[0].message.content;if(!k)throw new Error("接口未返回内容");return String(k)}const vg={class:"report"},mg={class:"report-toolbar"},yg={class:"seg"},gg=["onClick"],bg=["disabled"],wg=["disabled"],_g={key:0,class:"ai-error"},kg={class:"report-grid"},xg={class:"report-left"},Cg={class:"card section"},Sg={class:"section-title"},Eg={class:"muted note-saved"},$g={class:"card section"},Ag={class:"report-right"},Pg={key:0,class:"card section"},Tg={class:"sum-row"},Og={class:"num"},Mg={class:"sum-row"},Ig={class:"num"},jg={class:"sum-row"},Dg={class:"num"},Rg={class:"sum-row"},Lg={class:"num"},Kg={class:"sum-row"},Fg={class:"num"},Ng={class:"muted"},Vg={class:"num"},Bg={key:0,class:"muted sum-empty"},Ug={class:"muted"},qg={key:1,class:"muted sum-empty"},Hg={class:"muted"},Wg={key:2,class:"muted sum-empty"},zg={class:"muted"},Gg={key:3,class:"muted sum-empty"},Yg=Vt({__name:"ReportView",setup(e){const t=[{key:"week",label:"本周"},{key:"month",label:"本月"},{key:"all",label:"全部"},{key:"custom",label:"自定义"}],n=F("week"),s=F(Es(xt())),o=F(xt()),a=F(null),c=F(""),d=F(!1),h=F(!1),g=F(null),y=F(""),k=F(Es(xt())),j=F(""),T=F(""),L=F(""),H=F(!1);async function fe(){const A=await Qa(k.value);j.value=(A==null?void 0:A.highlights)||"",T.value=(A==null?void 0:A.challenges)||"",L.value=(A==null?void 0:A.plan_next)||"",H.value=!1}async function ee(){await Pv(k.value,{highlights:j.value.trim()||null,challenges:T.value.trim()||null,plan_next:L.value.trim()||null}),H.value=!0,await R()}function E(A){const x=xt();if(A==="week"){const oe=Es(x);return{start:oe,end:Kn(oe,6),label:"本周"}}if(A==="month"){const oe=x.slice(0,7);return{start:oe+"-01",end:x,label:oe+" 本月"}}return A==="all"?{start:"2000-01-01",end:x,label:"全部实习期"}:{start:s.value,end:o.value,label:s.value+" ~ "+o.value}}async function R(){d.value=!0;const A=E(n.value),x=await Qy(A.start,A.end,A.label);a.value=x,c.value=Zy(x),d.value=!1}gt(n,R),gt([s,o],()=>{n.value==="custom"&&R()}),fn(async()=>{await fe(),await R()});async function Y(){const A=xt().replace(/-/g,""),x=await Za("实习工作总结_"+A+".md",c.value);Ge(x?"总结已导出到:"+x:"总结已导出到系统下载目录")}async function le(){await $a(c.value),Ge("总结已复制到剪贴板")}async function ie(){if(h.value)return;y.value="";const A=c.value.trim();if(!A){y.value="当前草稿为空,无法润色";return}h.value=!0;try{g.value=c.value,c.value=await hg(A),Ge("AI 润色完成")}catch(x){g.value=null,y.value=x instanceof Error?x.message:"润色失败"}h.value=!1}function Z(){g.value!==null&&(c.value=g.value),g.value=null}return(A,x)=>(K(),U("div",vg,[u("div",mg,[u("div",yg,[(K(),U(Re,null,ut(t,oe=>u("button",{key:oe.key,class:et(["seg-btn",{active:n.value===oe.key}]),onClick:Ce=>n.value=oe.key},re(oe.label),11,gg)),64))]),n.value==="custom"?(K(),U(Re,{key:0},[Ae(u("input",{type:"date",class:"input w-date","onUpdate:modelValue":x[0]||(x[0]=oe=>s.value=oe)},null,512),[[De,s.value]]),x[6]||(x[6]=u("span",{class:"muted"},"至",-1)),Ae(u("input",{type:"date",class:"input w-date","onUpdate:modelValue":x[1]||(x[1]=oe=>o.value=oe)},null,512),[[De,o.value]])],64)):$e("",!0),x[10]||(x[10]=u("span",{class:"flex1"},null,-1)),u("button",{class:"btn btn-sm",disabled:h.value,onClick:ie},[Me(lt,{name:"edit",size:14}),x[7]||(x[7]=tn("AI 润色 ",-1))],8,bg),g.value!==null?(K(),U("button",{key:1,class:"btn btn-sm",onClick:Z},"还原润色前")):$e("",!0),u("button",{class:"btn btn-sm",disabled:d.value,onClick:R},[Me(lt,{name:"edit",size:14}),x[8]||(x[8]=tn("重新生成 ",-1))],8,wg),u("button",{class:"btn btn-sm",onClick:le},"复制"),u("button",{class:"btn btn-primary btn-sm",onClick:Y},[Me(lt,{name:"export",size:14}),x[9]||(x[9]=tn("导出 Markdown ",-1))])]),y.value?(K(),U("div",_g,re(y.value),1)):$e("",!0),u("div",kg,[u("div",xg,[u("div",Cg,[u("div",Sg,"本周周记("+re(k.value)+" 起)",1),x[11]||(x[11]=u("label",{class:"note-label muted"},"本周亮点",-1)),Ae(u("textarea",{class:"textarea","onUpdate:modelValue":x[2]||(x[2]=oe=>j.value=oe),placeholder:"本周最有价值的一件事",onBlur:ee},null,544),[[De,j.value]]),x[12]||(x[12]=u("label",{class:"note-label muted"},"踩的坑",-1)),Ae(u("textarea",{class:"textarea","onUpdate:modelValue":x[3]||(x[3]=oe=>T.value=oe),placeholder:"遇到的问题与教训",onBlur:ee},null,544),[[De,T.value]]),x[13]||(x[13]=u("label",{class:"note-label muted"},"下周计划",-1)),Ae(u("textarea",{class:"textarea","onUpdate:modelValue":x[4]||(x[4]=oe=>L.value=oe),placeholder:"下周准备做什么",onBlur:ee},null,544),[[De,L.value]]),u("div",Eg,re(H.value?"已保存":"失焦自动保存"),1)]),u("div",$g,[x[14]||(x[14]=u("div",{class:"section-title"},"总结草稿(可编辑)",-1)),Ae(u("textarea",{class:"textarea md-editor","onUpdate:modelValue":x[5]||(x[5]=oe=>c.value=oe),spellcheck:"false"},null,512),[[De,c.value]])])]),u("div",Ag,[a.value?(K(),U("div",Pg,[x[20]||(x[20]=u("div",{class:"section-title"},"数据摘要",-1)),u("div",Tg,[x[15]||(x[15]=u("span",{class:"muted"},"出勤",-1)),u("span",Og,re(a.value.attendDays)+" 天",1)]),u("div",Mg,[x[16]||(x[16]=u("span",{class:"muted"},"工时",-1)),u("span",Ig,re(a.value.totalHours)+" 小时",1)]),u("div",jg,[x[17]||(x[17]=u("span",{class:"muted"},"补卡",-1)),u("span",Dg,re(a.value.makeupCount)+" 次",1)]),u("div",Rg,[x[18]||(x[18]=u("span",{class:"muted"},"请假",-1)),u("span",Lg,re(a.value.leaveCount)+" 天",1)]),u("div",Kg,[x[19]||(x[19]=u("span",{class:"muted"},"记录",-1)),u("span",Fg,re(a.value.itemCount)+" 条",1)]),x[21]||(x[21]=u("div",{class:"section-sub"},"分类分布",-1)),(K(!0),U(Re,null,ut(a.value.categoryStats,oe=>(K(),U("div",{key:oe.key,class:"sum-row"},[u("span",Ng,re(oe.label),1),u("span",Vg,re(oe.count)+" 条 · "+re(oe.percent)+"%",1)]))),128)),a.value.categoryStats.length?$e("",!0):(K(),U("div",Bg,"(无)")),x[22]||(x[22]=u("div",{class:"section-sub"},"主要成果",-1)),(K(!0),U(Re,null,ut(a.value.milestones,(oe,Ce)=>(K(),U("div",{key:"m"+Ce,class:"sum-item"},[tn(re(oe.content),1),u("span",Ug,"("+re(oe.date)+")",1)]))),128)),a.value.milestones.length?$e("",!0):(K(),U("div",qg,"(无)")),x[23]||(x[23]=u("div",{class:"section-sub"},"待跟进",-1)),(K(!0),U(Re,null,ut(a.value.followups,(oe,Ce)=>(K(),U("div",{key:"f"+Ce,class:"sum-item"},[tn(re(oe.content),1),u("span",Hg,"("+re(oe.date)+")",1)]))),128)),a.value.followups.length?$e("",!0):(K(),U("div",Wg,"(无)")),x[24]||(x[24]=u("div",{class:"section-sub"},"学习与成长",-1)),(K(!0),U(Re,null,ut(a.value.takeaways,(oe,Ce)=>(K(),U("div",{key:"t"+Ce,class:"sum-item"},[tn(re(oe.text),1),u("span",zg,"("+re(oe.date)+")",1)]))),128)),a.value.takeaways.length?$e("",!0):(K(),U("div",Gg,"(无)"))])):$e("",!0)])])]))}}),Jg=Yt(Yg,[["__scopeId","data-v-43f9c59b"]]),Xg=["aria-label"],Qg={class:"dialog-head"},Zg={class:"dialog-title"},eb={class:"dialog-body"},tb={class:"form-grid"},nb={class:"field span2"},rb={class:"seg"},sb={class:"field"},ob={class:"field"},ib={class:"field"},ab=["value"],lb={key:0,class:"field"},ub={class:"seg"},cb={class:"field span2"},fb={key:0,class:"form-error"},db={class:"dialog-btns"},pb=Vt({__name:"TransactionDialog",props:{open:{type:Boolean},title:{},initial:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,s=t,o=F("expense"),a=F("餐饮"),c=F(""),d=F(""),h=F(""),g=F(!1),y=F(!1),k=F(""),j=F(null);function T(ee){n.open&&ee.key==="Escape"&&s("cancel")}gt(()=>n.open,async ee=>{var E;ee?(o.value=n.initial.type==="income"?"income":"expense",a.value=n.initial.category,c.value=n.initial.amountYuan,d.value=n.initial.date,h.value=n.initial.note,g.value=n.initial.reimbursable===1,y.value=n.initial.reimbursed===1,k.value="",window.addEventListener("keydown",T),await ts(),(E=j.value)==null||E.focus()):window.removeEventListener("keydown",T)}),dr(()=>window.removeEventListener("keydown",T)),gt(o,ee=>{a.value=ee==="expense"?Wr[0]:Vo[0]});const L=it(()=>o.value==="expense"?Wr:Vo);function H(){return a.value&&L.value.includes(a.value)?a.value:L.value[0]}function fe(){const ee=Number(c.value);if(!c.value.trim()||!isFinite(ee)||ee<=0){k.value="请填写大于 0 的金额";return}if(!d.value){k.value="请选择日期";return}const E=o.value==="expense"&&g.value?1:0;s("save",{type:o.value,category:H(),amount:Math.round(ee*100),date:d.value,note:h.value.trim(),reimbursable:E,reimbursed:E&&y.value?1:0})}return(ee,E)=>(K(),It(Vs,{to:"body"},[Me(ns,{name:"modal"},{default:fr(()=>[e.open?(K(),U("div",{key:0,class:"mask",onClick:E[11]||(E[11]=Mr(R=>s("cancel"),["self"]))},[u("div",{class:"dialog",role:"dialog","aria-label":e.title},[u("div",Qg,[u("span",Zg,re(e.title),1),u("button",{class:"icon-btn",title:"关闭",onClick:E[0]||(E[0]=R=>s("cancel"))},[Me(lt,{name:"close",size:16})])]),u("div",eb,[u("div",tb,[u("div",nb,[E[12]||(E[12]=u("label",null,"类型",-1)),u("div",rb,[u("button",{class:et(["seg-btn",{active:o.value==="expense"}]),onClick:E[1]||(E[1]=R=>o.value="expense")},"支出",2),u("button",{class:et(["seg-btn",{active:o.value==="income"}]),onClick:E[2]||(E[2]=R=>o.value="income")},"收入",2)])]),u("div",sb,[E[13]||(E[13]=u("label",null,"金额(元,必填)",-1)),Ae(u("input",{ref_key:"amountInput",ref:j,class:et(["input",{invalid:k.value}]),"onUpdate:modelValue":E[3]||(E[3]=R=>c.value=R),type:"number",min:"0",step:"0.01",placeholder:"0.00"},null,2),[[De,c.value]])]),u("div",ob,[E[14]||(E[14]=u("label",null,"日期(必填)",-1)),Ae(u("input",{class:"input",type:"date","onUpdate:modelValue":E[4]||(E[4]=R=>d.value=R)},null,512),[[De,d.value]])]),u("div",ib,[E[15]||(E[15]=u("label",null,"分类",-1)),Ae(u("select",{class:"select","onUpdate:modelValue":E[5]||(E[5]=R=>a.value=R)},[(K(!0),U(Re,null,ut(L.value,R=>(K(),U("option",{key:R,value:R},re(R),9,ab))),128))],512),[[Fn,a.value]])]),o.value==="expense"?(K(),U("div",lb,[E[16]||(E[16]=u("label",null,"报销状态",-1)),u("div",ub,[u("button",{class:et(["seg-btn",{active:!g.value}]),onClick:E[6]||(E[6]=R=>{g.value=!1,y.value=!1})},"无需报销",2),u("button",{class:et(["seg-btn",{active:g.value&&!y.value}]),onClick:E[7]||(E[7]=R=>{g.value=!0,y.value=!1})},"待报销",2),u("button",{class:et(["seg-btn",{active:g.value&&y.value}]),onClick:E[8]||(E[8]=R=>{g.value=!0,y.value=!0})},"已报销",2)])])):$e("",!0),u("div",cb,[E[17]||(E[17]=u("label",null,"备注",-1)),Ae(u("textarea",{class:"textarea","onUpdate:modelValue":E[9]||(E[9]=R=>h.value=R),placeholder:"选填"},null,512),[[De,h.value]])])]),k.value?(K(),U("div",fb,re(k.value),1)):$e("",!0)]),u("div",db,[u("button",{class:"btn btn-sm",onClick:E[10]||(E[10]=R=>s("cancel"))},"取消"),u("button",{class:"btn btn-primary btn-sm",onClick:fe},"保存")])],8,Xg)])):$e("",!0)]),_:1})]))}}),hb=Yt(pb,[["__scopeId","data-v-e3568c0d"]]),vb={class:"ledger-page"},mb={class:"ledger-toolbar"},yb={class:"month-title num"},gb={class:"cards"},bb={class:"card stat-card"},wb={class:"stat-num num amt-income"},_b={class:"card stat-card"},kb={class:"stat-num num"},xb={class:"card stat-card"},Cb={class:"card stat-card"},Sb={class:"stat-num num amt-warn"},Eb={class:"card sec"},$b={class:"form-grid"},Ab={class:"field span2"},Pb={class:"seg"},Tb={class:"field"},Ob={class:"field"},Mb={class:"field"},Ib=["value"],jb={key:0,class:"field"},Db={class:"field span2"},Rb={key:0,class:"form-error"},Lb={class:"form-footer"},Kb=["disabled"],Fb=["disabled"],Nb={key:0,class:"card sec"},Vb={class:"bar-label"},Bb={class:"bar-track"},Ub={class:"muted num bar-num"},qb={class:"card table-card"},Hb={class:"tx-table"},Wb={class:"num"},zb={class:"tag"},Gb={class:"td-note"},Yb={key:0,class:"muted"},Jb={key:1,class:"tx-done"},Xb={key:2,class:"tx-pending"},Qb={class:"ops"},Zb=["onClick"],ew=["onClick"],tw=["onClick"],nw={key:0},rw={class:"muted vault-note num"},sw=Vt({__name:"LedgerView",setup(e){const t=F(xt()),n=F([]),s=F(!0),o=F("expense"),a=F(""),c=F(Wr[0]),d=F(xt()),h=F(""),g=F(!1),y=F(""),k=F(!1),j=F(!1),T=F(null),L=F({type:"expense",category:Wr[0],amountYuan:"",date:xt(),note:"",reimbursable:0,reimbursed:0}),H=F(null),fe=it(()=>t.value.slice(0,7)+"-01"),ee=it(()=>{const de=Number(t.value.slice(0,4)),X=Number(t.value.slice(5,7))-1,Q=new Date(de,X+1,0).getDate();return t.value.slice(0,7)+"-"+(Q<10?"0"+Q:String(Q))}),E=it(()=>Number(t.value.slice(0,4))+" 年 "+Number(t.value.slice(5,7))+" 月");async function R(){s.value=!0,n.value=await Lv(fe.value,ee.value),s.value=!1}fn(R),gt(t,R),gt(o,de=>{c.value=de==="expense"?Wr[0]:Vo[0]});const Y=it(()=>n.value.slice().sort((de,X)=>de.date===X.date?X.id-de.id:de.date<X.date?1:-1)),le=it(()=>{let de=0,X=0,Q=0;for(const xe of n.value)xe.type==="income"?de+=xe.amount:(X+=xe.amount,xe.reimbursable===1&&xe.reimbursed!==1&&(Q+=xe.amount));return{income:de,expense:X,pending:Q,balance:de-X}}),ie=F("all"),Z=F("all"),A=it(()=>Y.value.filter(de=>!(ie.value!=="all"&&de.type!==ie.value||Z.value==="pending"&&!(de.type==="expense"&&de.reimbursable===1&&de.reimbursed!==1)||Z.value==="done"&&!(de.reimbursable===1&&de.reimbursed===1)))),x=it(()=>{const de=new Map;let X=0;for(const xe of n.value)xe.type==="expense"&&(de.set(xe.category,(de.get(xe.category)||0)+xe.amount),X+=xe.amount);const Q=X||1;return Array.from(de.entries()).map(xe=>({name:xe[0],amount:xe[1],percent:Math.round(xe[1]/Q*100)})).sort((xe,ot)=>ot.amount-xe.amount)});function oe(de){return(de/100).toFixed(2)}function Ce(de){return(de.type==="income"?"+":"-")+oe(de.amount)}function J(){t.value=Bo(t.value,-1)}function Se(){t.value=Bo(t.value,1)}function Ve(){t.value=xt()}gt(a,()=>{y.value&&(y.value="")});async function Xe(){const de=Number(a.value);if(!a.value.trim()||!isFinite(de)||de<=0){y.value="请填写大于 0 的金额";return}if(!d.value){y.value="请选择日期";return}k.value||(k.value=!0,await Kv({type:o.value,category:c.value,amount:Math.round(de*100),date:d.value,note:h.value.trim(),reimbursable:o.value==="expense"&&g.value?1:0,reimbursed:0}),a.value="",h.value="",g.value=!1,y.value="",await R(),Ge("记账已添加"),k.value=!1)}function Ne(){a.value="",h.value="",g.value=!1,y.value=""}async function We(de){await Vv(de.id),await R(),Ge("已标记为已报销")}function be(de){T.value=de.id,L.value={type:de.type,category:de.category,amountYuan:oe(de.amount),date:de.date,note:de.note||"",reimbursable:de.reimbursable,reimbursed:de.reimbursed},j.value=!0}async function Ie(de){const X=T.value;await Fv(X,de),j.value=!1,await R(),Ge("账目已更新")}async function Ke(){H.value&&H.value.id&&await Nv(H.value.id),H.value=null,await R(),Ge("账目已删除")}return(de,X)=>(K(),U("div",vb,[u("div",mb,[u("button",{class:"icon-btn",onClick:J},[Me(lt,{name:"chevron-left",size:16})]),u("span",yb,re(E.value),1),u("button",{class:"icon-btn",onClick:Se},[Me(lt,{name:"chevron-right",size:16})]),u("button",{class:"btn btn-sm",onClick:Ve},"回到本月"),X[13]||(X[13]=u("span",{class:"flex1"},null,-1)),Ae(u("select",{class:"select w-filter","onUpdate:modelValue":X[0]||(X[0]=Q=>ie.value=Q)},[...X[11]||(X[11]=[u("option",{value:"all"},"全部类型",-1),u("option",{value:"expense"},"仅支出",-1),u("option",{value:"income"},"仅收入",-1)])],512),[[Fn,ie.value]]),Ae(u("select",{class:"select w-filter","onUpdate:modelValue":X[1]||(X[1]=Q=>Z.value=Q)},[...X[12]||(X[12]=[u("option",{value:"all"},"全部报销",-1),u("option",{value:"pending"},"待报销",-1),u("option",{value:"done"},"已报销",-1)])],512),[[Fn,Z.value]])]),u("div",gb,[u("div",bb,[X[14]||(X[14]=u("div",{class:"muted"},"本月收入(元)",-1)),u("div",wb,re(oe(le.value.income)),1)]),u("div",_b,[X[15]||(X[15]=u("div",{class:"muted"},"本月支出(元)",-1)),u("div",kb,re(oe(le.value.expense)),1)]),u("div",xb,[X[16]||(X[16]=u("div",{class:"muted"},"本月结余(元)",-1)),u("div",{class:et(["stat-num num",{"amt-income":le.value.balance>=0,"amt-expense":le.value.balance<0}])},re(oe(le.value.balance)),3)]),u("div",Cb,[X[17]||(X[17]=u("div",{class:"muted"},"待报销(元)",-1)),u("div",Sb,re(oe(le.value.pending)),1)])]),u("div",Eb,[X[24]||(X[24]=u("div",{class:"sec-head"},[u("span",{class:"sec-title"},"新增一笔"),u("span",{class:"muted form-hint"},"金额必填,回车快速添加")],-1)),u("div",$b,[u("div",Ab,[X[18]||(X[18]=u("label",null,"类型",-1)),u("div",Pb,[u("button",{class:et(["seg-btn",{active:o.value==="expense"}]),onClick:X[2]||(X[2]=Q=>o.value="expense")},"支出",2),u("button",{class:et(["seg-btn",{active:o.value==="income"}]),onClick:X[3]||(X[3]=Q=>o.value="income")},"收入",2)])]),u("div",Tb,[X[19]||(X[19]=u("label",null,"金额(元,必填)",-1)),Ae(u("input",{class:et(["input",{invalid:y.value}]),"onUpdate:modelValue":X[4]||(X[4]=Q=>a.value=Q),type:"number",min:"0",step:"0.01",placeholder:"0.00",onKeydown:jt(Xe,["enter"])},null,34),[[De,a.value]])]),u("div",Ob,[X[20]||(X[20]=u("label",null,"日期",-1)),Ae(u("input",{class:"input",type:"date","onUpdate:modelValue":X[5]||(X[5]=Q=>d.value=Q)},null,512),[[De,d.value]])]),u("div",Mb,[X[21]||(X[21]=u("label",null,"分类",-1)),Ae(u("select",{class:"select","onUpdate:modelValue":X[6]||(X[6]=Q=>c.value=Q)},[(K(!0),U(Re,null,ut(o.value==="expense"?nn(Wr):nn(Vo),Q=>(K(),U("option",{key:Q,value:Q},re(Q),9,Ib))),128))],512),[[Fn,c.value]])]),o.value==="expense"?(K(),U("div",jb,[X[22]||(X[22]=u("label",null,"报销",-1)),u("button",{class:et(["toggle-btn",{on:g.value}]),onClick:X[7]||(X[7]=Q=>g.value=!g.value)},re(g.value?"需要报销":"无需报销"),3)])):$e("",!0),u("div",Db,[X[23]||(X[23]=u("label",null,"备注",-1)),Ae(u("input",{class:"input","onUpdate:modelValue":X[8]||(X[8]=Q=>h.value=Q),placeholder:"选填,如:客户现场午餐",onKeydown:jt(Xe,["enter"])},null,544),[[De,h.value]])])]),y.value?(K(),U("div",Rb,re(y.value),1)):$e("",!0),u("div",Lb,[u("button",{class:"btn btn-sm",disabled:!(a.value.trim()||h.value.trim()),onClick:Ne},"重置",8,Kb),u("button",{class:"btn btn-primary btn-sm",disabled:k.value,onClick:Xe},"添加记录",8,Fb)])]),x.value.length?(K(),U("div",Nb,[X[25]||(X[25]=u("div",{class:"sec-title"},"本月支出分类",-1)),(K(!0),U(Re,null,ut(x.value,Q=>(K(),U("div",{key:Q.name,class:"bar-row"},[u("span",Vb,re(Q.name),1),u("span",Bb,[u("span",{class:"bar-fill",style:sr({width:Q.percent+"%"})},null,4)]),u("span",Ub,re(oe(Q.amount))+" 元 · "+re(Q.percent)+"%",1)]))),128))])):$e("",!0),u("div",qb,[u("table",Hb,[X[27]||(X[27]=u("thead",null,[u("tr",null,[u("th",null,"日期"),u("th",null,"分类"),u("th",null,"金额(元)"),u("th",null,"备注"),u("th",null,"报销"),u("th",{class:"th-ops"},"操作")])],-1)),u("tbody",null,[(K(!0),U(Re,null,ut(A.value,Q=>(K(),U("tr",{key:Q.id},[u("td",Wb,re(Q.date),1),u("td",null,[u("span",zb,re(Q.category),1)]),u("td",{class:et(["num",Q.type==="income"?"amt-income":"amt-expense"])},re(Ce(Q)),3),u("td",Gb,re(Q.note||"--"),1),u("td",null,[Q.type!=="expense"||Q.reimbursable!==1?(K(),U("span",Yb,"--")):Q.reimbursed===1?(K(),U("span",Jb,"已报销")):(K(),U("span",Xb,"待报销"))]),u("td",null,[u("div",Qb,[Q.type==="expense"&&Q.reimbursable===1&&Q.reimbursed!==1?(K(),U("button",{key:0,class:"btn btn-xs",onClick:xe=>We(Q)},"标记已报销",8,Zb)):$e("",!0),u("button",{class:"btn btn-xs",onClick:xe=>be(Q)},"编辑",8,ew),u("button",{class:"btn btn-xs",onClick:xe=>H.value=Q},"删除",8,tw)])])]))),128)),!A.value.length&&!s.value?(K(),U("tr",nw,[...X[26]||(X[26]=[u("td",{colspan:"6",class:"empty muted"},"本月暂无账目",-1)])])):$e("",!0)])])]),u("div",rw,"筛选结果 "+re(A.value.length)+" 条 / 本月共 "+re(n.value.length)+" 条",1),Me(hb,{open:j.value,title:(T.value,"编辑账目"),initial:L.value,onCancel:X[9]||(X[9]=Q=>j.value=!1),onSave:Ie},null,8,["open","title","initial"]),Me(ur,{open:!!H.value,title:"删除确认",message:H.value?"将删除 "+H.value.date+" 的账目("+H.value.category+" "+oe(H.value.amount)+" 元)。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:X[10]||(X[10]=Q=>H.value=null),onConfirm:Ke},null,8,["open","message"])]))}}),ow=Yt(sw,[["__scopeId","data-v-8acec676"]]),iw={class:"memo-page"},aw={class:"card memo-list"},lw={class:"pane-head"},uw={class:"pane-title"},cw={class:"memo-scroll"},fw=["onClick"],dw={class:"memo-item-title"},pw={class:"muted memo-item-sub"},hw={class:"muted num memo-item-time"},vw={key:0,class:"muted empty"},mw={class:"card memo-editor"},yw={class:"editor-foot"},gw={class:"muted foot-info"},bw=["disabled"],ww=["disabled"],_w={key:1,class:"empty muted editor-empty"},kw=Vt({__name:"MemoView",setup(e){const t=F([]),n=F(null),s=F(!1),o=F(""),a=F(""),c=F(null),d=F(null);async function h(){if(t.value=await Ov(),n.value&&n.value.id){const ie=t.value.find(Z=>Z.id===n.value.id);ie&&(n.value=ie)}}fn(async()=>{await h(),t.value.length&&k(t.value[0]),window.addEventListener("keydown",g)}),dr(()=>window.removeEventListener("keydown",g)),gt(Ea,async ie=>{if(!ie)return;t.value.length||await h();const Z=t.value.find(A=>A.id===ie);Ea.value=null,Z&&j(Z)},{immediate:!0});function g(ie){(ie.ctrlKey||ie.metaKey)&&ie.key.toLowerCase()==="s"&&s.value&&y.value&&(ie.preventDefault(),fe())}const y=it(()=>{if(!s.value)return!1;const ie=n.value?n.value.title:"",Z=n.value?n.value.content:"";return o.value!==ie||a.value!==Z});function k(ie){n.value=ie,s.value=!0,o.value=ie.title,a.value=ie.content}function j(ie){if(!(s.value&&n.value&&n.value.id===ie.id)){if(y.value){d.value={type:"select",memo:ie};return}k(ie)}}function T(){if(y.value){d.value={type:"new"};return}L()}function L(){n.value=null,s.value=!0,o.value="",a.value=""}function H(){n.value?k(n.value):L()}async function fe(){if(!o.value.trim()&&!a.value.trim()){Ge("标题与内容不能都为空");return}if(n.value&&n.value.id)await Iv(n.value.id,o.value,a.value),Ge("备忘已保存");else{const ie=await Mv(o.value,a.value);n.value=ie,o.value=ie.title,a.value=ie.content,Ge("备忘已创建")}await h()}function ee(){n.value&&n.value.id&&(c.value=n.value)}async function E(){c.value&&c.value.id&&(await jv(c.value.id),Ge("备忘已删除")),c.value=null,await h(),L()}function R(){const ie=d.value;d.value=null,ie&&(ie.type==="select"?k(ie.memo):L())}function Y(ie){return(ie.content||"").replace(/\s+/g," ").slice(0,30)}function le(ie){return ie.replace("T"," ").slice(0,16)}return(ie,Z)=>(K(),U("div",iw,[u("aside",aw,[u("div",lw,[u("span",uw,"备忘录("+re(t.value.length)+")",1),u("button",{class:"btn btn-primary btn-sm",onClick:T},"新建")]),u("div",cw,[(K(!0),U(Re,null,ut(t.value,A=>(K(),U("div",{key:A.id,class:et(["memo-item",{active:s.value&&n.value&&n.value.id===A.id}]),onClick:x=>j(A)},[u("div",dw,re(A.title||"无标题"),1),u("div",pw,re(Y(A)||"空"),1),u("div",hw,re(le(A.updated_at)),1)],10,fw))),128)),t.value.length?$e("",!0):(K(),U("div",vw,"暂无备忘"))])]),u("section",mw,[s.value?(K(),U(Re,{key:0},[Ae(u("input",{class:"input title-input","onUpdate:modelValue":Z[0]||(Z[0]=A=>o.value=A),placeholder:"标题"},null,512),[[De,o.value]]),Ae(u("textarea",{class:"textarea content-textarea","onUpdate:modelValue":Z[1]||(Z[1]=A=>a.value=A),placeholder:"内容"},null,512),[[De,a.value]]),u("div",yw,[u("span",gw,[y.value?(K(),U(Re,{key:0},[tn("有未保存修改")],64)):n.value&&n.value.id?(K(),U(Re,{key:1},[tn("更新于 "+re(le(n.value.updated_at)),1)],64)):(K(),U(Re,{key:2},[tn("新备忘")],64))]),Z[4]||(Z[4]=u("span",{class:"flex1"},null,-1)),n.value&&n.value.id?(K(),U("button",{key:0,class:"btn btn-sm",onClick:ee},"删除")):$e("",!0),u("button",{class:"btn btn-sm",disabled:!y.value,onClick:H},"放弃修改",8,bw),u("button",{class:"btn btn-primary btn-sm",disabled:!y.value,onClick:fe},"保存",8,ww)])],64)):(K(),U("div",_w,"选择左侧备忘,或点击右上角新建"))]),Me(ur,{open:!!c.value,title:"删除确认",message:c.value?"将删除备忘「"+(c.value.title||"无标题")+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:Z[2]||(Z[2]=A=>c.value=null),onConfirm:E},null,8,["open","message"]),Me(ur,{open:!!d.value,title:"未保存提示",message:"当前备忘有未保存的修改,继续操作将丢失这些修改。","confirm-text":"放弃修改并继续",onCancel:Z[3]||(Z[3]=A=>d.value=null),onConfirm:R},null,8,["open"])]))}}),xw=Yt(kw,[["__scopeId","data-v-74d60dba"]]),Cw=["aria-label"],Sw={class:"dialog-head"},Ew={class:"dialog-title"},$w={class:"dialog-body"},Aw={class:"form-grid"},Pw={class:"field span2"},Tw={class:"field span2"},Ow={class:"field span2"},Mw={class:"pwd-row"},Iw={class:"field span2"},jw={key:0,class:"form-error"},Dw={class:"dialog-btns"},Rw=Vt({__name:"CredentialDialog",props:{open:{type:Boolean},title:{},initial:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,s=t,o=F(""),a=F(""),c=F(""),d=F(""),h=F(""),g=F(null);function y(T){n.open&&T.key==="Escape"&&s("cancel")}gt(()=>n.open,async T=>{var L;T?(o.value=n.initial.system,a.value=n.initial.account,c.value=n.initial.password,d.value=n.initial.remark,h.value="",window.addEventListener("keydown",y),await ts(),(L=g.value)==null||L.focus()):window.removeEventListener("keydown",y)}),dr(()=>window.removeEventListener("keydown",y));function k(){const T="ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789",L="!@#$%^&*",H=crypto.getRandomValues(new Uint8Array(14));let fe="";for(let ee=0;ee<H.length;ee++)fe+=T[H[ee]%T.length];fe+=L[crypto.getRandomValues(new Uint8Array(1))[0]%L.length],c.value=fe,h.value=""}function j(){if(!o.value.trim()||!a.value.trim()||!c.value){h.value="系统名称、账号、密码为必填项";return}s("save",{system:o.value.trim(),account:a.value.trim(),password:c.value,remark:d.value.trim()})}return(T,L)=>(K(),It(Vs,{to:"body"},[Me(ns,{name:"modal"},{default:fr(()=>[e.open?(K(),U("div",{key:0,class:"mask",onClick:L[6]||(L[6]=Mr(H=>s("cancel"),["self"]))},[u("div",{class:"dialog",role:"dialog","aria-label":e.title},[u("div",Sw,[u("span",Ew,re(e.title),1),u("button",{class:"icon-btn",title:"关闭",onClick:L[0]||(L[0]=H=>s("cancel"))},[Me(lt,{name:"close",size:16})])]),u("div",$w,[u("div",Aw,[u("div",Pw,[L[7]||(L[7]=u("label",null,"系统名称(必填)",-1)),Ae(u("input",{ref_key:"systemInput",ref:g,class:"input","onUpdate:modelValue":L[1]||(L[1]=H=>o.value=H),placeholder:"如:企业邮箱 / OA / VPN"},null,512),[[De,o.value]])]),u("div",Tw,[L[8]||(L[8]=u("label",null,"账号(必填)",-1)),Ae(u("input",{class:"input","onUpdate:modelValue":L[2]||(L[2]=H=>a.value=H),placeholder:"用户名、工号或邮箱"},null,512),[[De,a.value]])]),u("div",Ow,[L[9]||(L[9]=u("label",null,"密码(必填)",-1)),u("div",Mw,[Ae(u("input",{class:"input","onUpdate:modelValue":L[3]||(L[3]=H=>c.value=H),placeholder:"输入或点击生成"},null,512),[[De,c.value]]),u("button",{class:"btn btn-sm",onClick:k},"生成")])]),u("div",Iw,[L[10]||(L[10]=u("label",null,"备注",-1)),Ae(u("textarea",{class:"textarea","onUpdate:modelValue":L[4]||(L[4]=H=>d.value=H),placeholder:"用途、到期时间、负责人等(选填)"},null,512),[[De,d.value]])])]),h.value?(K(),U("div",jw,re(h.value),1)):$e("",!0)]),u("div",Dw,[u("button",{class:"btn btn-sm",onClick:L[5]||(L[5]=H=>s("cancel"))},"取消"),u("button",{class:"btn btn-primary btn-sm",onClick:j},"保存")])],8,Cw)])):$e("",!0)]),_:1})]))}}),Lw=Yt(Rw,[["__scopeId","data-v-f383b0a6"]]),df=15e4;function qo(e){const t=new Uint8Array(e);let n="";for(let s=0;s<t.length;s++)n+=String.fromCharCode(t[s]);return btoa(n)}function Ho(e){const t=atob(e),n=new Uint8Array(t.length);for(let s=0;s<t.length;s++)n[s]=t.charCodeAt(s);return n}function el(){return qo(crypto.getRandomValues(new Uint8Array(16)).buffer)}async function Wo(e,t){const n=new TextEncoder,s=await crypto.subtle.importKey("raw",n.encode(e),"PBKDF2",!1,["deriveBits"]),o=await crypto.subtle.deriveBits({name:"PBKDF2",salt:Ho(t),iterations:df,hash:"SHA-256"},s,256);return qo(o)}async function zo(e,t){const n=new TextEncoder,s=await crypto.subtle.importKey("raw",n.encode(e),"PBKDF2",!1,["deriveKey"]);return crypto.subtle.deriveKey({name:"PBKDF2",salt:Ho(t),iterations:df,hash:"SHA-256"},s,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}async function Go(e,t){const n=crypto.getRandomValues(new Uint8Array(12)),s=await crypto.subtle.encrypt({name:"AES-GCM",iv:n},e,new TextEncoder().encode(t));return qo(n.buffer)+":"+qo(s)}async function di(e,t){const n=t.split(":");if(n.length!==2)throw new Error("密文格式错误");const s=await crypto.subtle.decrypt({name:"AES-GCM",iv:Ho(n[0])},e,Ho(n[1]));return new TextDecoder().decode(s)}const pf="intern-log-vault-verify",es="enc:v1:";let Dr=null;function Kw(){return Dr!==null}function Yo(){Dr=null}async function hf(){return await yt("pwd_salt","")!==""}async function Fw(e){if(e.length<6)throw new Error("主密码至少 6 位");if(await hf())throw new Error("主密码已设置");const t=el(),n=await zo(e,t),s=await Go(n,pf);await kt("pwd_salt",t),await kt("pwd_verifier",s),Dr=n}async function Nw(e){const t=await yt("pwd_salt","");if(!t)throw new Error("主密码尚未设置");const n=await zo(e,t),s=await yt("pwd_verifier","");try{await di(n,s)}catch{throw new Error("主密码不正确")}Dr=n}async function vf(){if(!Dr)throw new Error("密码库未解锁");return Dr}async function Vw(e){const t=await vf();return es+await Go(t,e)}async function Bw(e){if(!e)return"";if(!e.startsWith(es))return e;const t=await vf();return di(t,e.slice(es.length))}async function Uw(){return ne.credential.orderBy("system").toArray()}async function qw(e,t){const n=await Vw(e.password),s={system:e.system.trim(),account:e.account.trim(),password:n,remark:e.remark.trim()};t?await ne.credential.update(t,{...s,updated_at:wt()}):await ne.credential.add({...s,created_at:wt(),updated_at:wt()})}async function Hw(e){await ne.credential.delete(e)}async function la(e){const t=await ne.credential.get(e);if(!t)throw new Error("记录不存在");return Bw(t.password)}async function Ww(e,t){if(!e)throw new Error("请输入旧主密码");if(t.length<6)throw new Error("新主密码至少 6 位");if(t===e)throw new Error("新主密码不能与旧主密码相同");const n=await yt("pwd_salt","");if(!n)throw new Error("密码库尚未初始化");const s=await zo(e,n),o=await yt("pwd_verifier","");try{await di(s,o)}catch{throw new Error("旧主密码不正确")}const a=await zo(t,n),c=await ne.credential.toArray();let d=0;for(const h of c){if(h.id==null)continue;const g=await zw(h.password,s),y=es+await Go(a,g);await ne.credential.update(h.id,{password:y}),d++}return await kt("pwd_verifier",await Go(a,pf)),Dr=a,d}async function zw(e,t){return e?e.startsWith(es)?di(t,e.slice(es.length)):e:""}const Gw={class:"vault-page"},Yw={key:0,class:"empty muted"},Jw={key:1,class:"card lock-card"},Xw={class:"lock-badge"},Qw={key:0,class:"form-error"},Zw=["disabled"],e_={key:0,class:"form-error"},t_=["disabled"],n_={class:"vault-toolbar"},r_={class:"search-wrap"},s_={class:"card table-card"},o_={class:"cred-table"},i_={class:"td-system"},a_=["onClick"],l_={class:"pwd-cell"},u_={class:"num pwd-text"},c_=["onClick"],f_=["onClick"],d_={class:"td-remark"},p_={class:"ops"},h_=["onClick"],v_=["onClick"],m_={key:0},y_={class:"muted vault-note num"},g_={class:"dialog pwd-dialog"},b_={class:"dialog-head"},w_={class:"dialog-body"},__={class:"vp-field"},k_={class:"vp-field"},x_={class:"vp-field"},C_={key:0,class:"form-error"},S_={class:"dialog-btns"},E_=5*60*1e3,$_=Vt({__name:"VaultView",setup(e){const t=F(null),n=F(Kw()),s=F(!1),o=F(""),a=F(""),c=F(""),d=F(""),h=F(""),g=F([]),y=F(""),k=F({}),j=F(!1),T=F(null),L=F({system:"",account:"",password:"",remark:""}),H=F(null),fe=F(!1),ee=F(""),E=F(""),R=F(""),Y=F("");async function le(){g.value=await Uw(),k.value={}}let ie=null;function Z(){ie!==null&&window.clearTimeout(ie),ie=window.setTimeout(()=>{n.value&&(Yo(),n.value=!1,g.value=[],k.value={},Ge("长时间未操作,密码库已自动锁定"))},E_)}function A(){n.value&&Z()}fn(async()=>{t.value=await hf(),window.addEventListener("click",A),window.addEventListener("keydown",A),n.value&&Z()}),dr(()=>{window.removeEventListener("click",A),window.removeEventListener("keydown",A),ie!==null&&window.clearTimeout(ie)});const x=it(()=>{const X=y.value.trim().toLowerCase();return X?g.value.filter(Q=>(Q.system+" "+Q.account+" "+(Q.remark||"")).toLowerCase().includes(X)):g.value});async function oe(){if(!s.value){if(c.value="",!o.value){c.value="请输入主密码";return}if(o.value.length<6){c.value="主密码至少 6 位";return}if(o.value!==a.value){c.value="两次输入的主密码不一致";return}s.value=!0;try{await Fw(o.value),o.value="",a.value="",n.value=!0,Z(),await le(),Ge("主密码已设置,密码库已解锁")}catch(X){c.value=X instanceof Error?X.message:"设置失败"}s.value=!1}}async function Ce(){if(!s.value){if(h.value="",!d.value){h.value="请输入主密码";return}s.value=!0;try{await Nw(d.value),d.value="",n.value=!0,Z(),await le()}catch(X){h.value=X instanceof Error?X.message:"解锁失败"}s.value=!1}}function J(){Yo(),n.value=!1,g.value=[],k.value={},ie!==null&&window.clearTimeout(ie),Ge("密码库已锁定")}async function Se(X){const Q=X.id;if(k.value[Q]){k.value[Q]=!1;return}try{X.passwordPlain=await la(Q),k.value[Q]=!0}catch(xe){Ge(xe instanceof Error?xe.message:"解密失败")}}async function Ve(X){try{const Q=await la(X.id);await $a(Q),Ge("密码已复制")}catch(Q){Ge(Q instanceof Error?Q.message:"复制失败")}}async function Xe(X){await $a(X.account),Ge("账号已复制")}function Ne(){T.value=null,L.value={system:"",account:"",password:"",remark:""},j.value=!0}async function We(X){try{const Q=await la(X.id);T.value=X.id,L.value={system:X.system,account:X.account,password:Q,remark:X.remark||""},j.value=!0}catch(Q){Ge(Q instanceof Error?Q.message:"解密失败")}}async function be(X){const Q=T.value??void 0;await qw(X,Q),j.value=!1,await le(),Ge(Q?"账号已更新":"账号已添加")}async function Ie(){H.value&&H.value.id&&(await Hw(H.value.id),Ge("账号已删除")),H.value=null,await le()}function Ke(){ee.value="",E.value="",R.value="",Y.value="",fe.value=!0}async function de(){Y.value="";try{const X=await Ww(ee.value,E.value);fe.value=!1,ee.value="",E.value="",R.value="",Ge("主密码已修改,"+X+" 条账号密码已重新加密")}catch(X){Y.value=X instanceof Error?X.message:"修改失败"}}return(X,Q)=>(K(),U("div",Gw,[t.value===null?(K(),U("div",Yw,"加载中")):n.value?(K(),U(Re,{key:2},[u("div",n_,[u("div",r_,[Me(lt,{name:"search",size:14,class:"search-icon"}),Ae(u("input",{class:"input","onUpdate:modelValue":Q[3]||(Q[3]=xe=>y.value=xe),placeholder:"搜索系统名称、账号或备注"},null,512),[[De,y.value]])]),Q[16]||(Q[16]=u("span",{class:"flex1"},null,-1)),u("button",{class:"btn btn-sm",onClick:Ke},"修改主密码"),u("button",{class:"btn btn-sm",onClick:J},"锁定"),u("button",{class:"btn btn-primary btn-sm",onClick:Ne},"新增账号")]),u("div",s_,[u("table",o_,[Q[18]||(Q[18]=u("thead",null,[u("tr",null,[u("th",null,"系统名称"),u("th",null,"账号"),u("th",null,"密码"),u("th",null,"备注"),u("th",{class:"th-ops"},"操作")])],-1)),u("tbody",null,[(K(!0),U(Re,null,ut(x.value,xe=>(K(),U("tr",{key:xe.id},[u("td",i_,re(xe.system),1),u("td",null,[u("span",{class:"copyable",title:"点击复制账号",onClick:ot=>Xe(xe)},re(xe.account),9,a_)]),u("td",null,[u("div",l_,[u("span",u_,re(k.value[xe.id]?xe.passwordPlain:"........"),1),u("button",{class:"btn btn-xs",onClick:ot=>Se(xe)},re(k.value[xe.id]?"隐藏":"显示"),9,c_),u("button",{class:"btn btn-xs",onClick:ot=>Ve(xe)},"复制",8,f_)])]),u("td",d_,re(xe.remark||"--"),1),u("td",null,[u("div",p_,[u("button",{class:"btn btn-xs",onClick:ot=>We(xe)},"编辑",8,h_),u("button",{class:"btn btn-xs",onClick:ot=>H.value=xe},"删除",8,v_)])])]))),128)),x.value.length?$e("",!0):(K(),U("tr",m_,[...Q[17]||(Q[17]=[u("td",{colspan:"5",class:"empty muted"},"暂无账号,点击右上角新增",-1)])]))])])]),u("div",y_,"共 "+re(g.value.length)+" 条账号记录 · 密码以 AES-256-GCM 加密存储于本机",1)],64)):(K(),U("div",Jw,[u("div",Xw,[Me(lt,{name:"lock",size:26})]),t.value===!1?(K(),U(Re,{key:0},[Q[12]||(Q[12]=u("div",{class:"lock-title"},"设置主密码",-1)),Q[13]||(Q[13]=u("div",{class:"muted lock-tip"},"主密码用于加密保存在本机的账号密码,遗忘后无法找回,请务必牢记",-1)),Ae(u("input",{type:"password",class:"input","onUpdate:modelValue":Q[0]||(Q[0]=xe=>o.value=xe),placeholder:"设置主密码(至少 6 位)",onKeydown:jt(oe,["enter"])},null,544),[[De,o.value]]),Ae(u("input",{type:"password",class:"input","onUpdate:modelValue":Q[1]||(Q[1]=xe=>a.value=xe),placeholder:"再次输入主密码",onKeydown:jt(oe,["enter"])},null,544),[[De,a.value]]),c.value?(K(),U("div",Qw,re(c.value),1)):$e("",!0),u("button",{class:"btn btn-primary lock-btn",disabled:s.value,onClick:oe},"完成设置并解锁",8,Zw)],64)):(K(),U(Re,{key:1},[Q[14]||(Q[14]=u("div",{class:"lock-title"},"密码库已锁定",-1)),Q[15]||(Q[15]=u("div",{class:"muted lock-tip"},"输入主密码解锁后查看与复制密码",-1)),Ae(u("input",{type:"password",class:"input","onUpdate:modelValue":Q[2]||(Q[2]=xe=>d.value=xe),placeholder:"主密码",onKeydown:jt(Ce,["enter"])},null,544),[[De,d.value]]),h.value?(K(),U("div",e_,re(h.value),1)):$e("",!0),u("button",{class:"btn btn-primary lock-btn",disabled:s.value,onClick:Ce},"解锁",8,t_)],64))])),Me(Lw,{open:j.value,title:T.value?"编辑账号":"新增账号",initial:L.value,onCancel:Q[4]||(Q[4]=xe=>j.value=!1),onSave:be},null,8,["open","title","initial"]),Me(ur,{open:!!H.value,title:"删除确认",message:H.value?"将删除系统「"+H.value.system+"」的账号记录。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:Q[5]||(Q[5]=xe=>H.value=null),onConfirm:Ie},null,8,["open","message"]),(K(),It(Vs,{to:"body"},[Me(ns,{name:"modal"},{default:fr(()=>[fe.value?(K(),U("div",{key:0,class:"mask",onClick:Q[11]||(Q[11]=Mr(xe=>fe.value=!1,["self"]))},[u("div",g_,[u("div",b_,[Q[19]||(Q[19]=u("span",{class:"dialog-title"},"修改主密码",-1)),u("button",{class:"icon-btn",title:"关闭",onClick:Q[6]||(Q[6]=xe=>fe.value=!1)},[Me(lt,{name:"close",size:16})])]),u("div",w_,[u("div",__,[Q[20]||(Q[20]=u("label",null,"旧主密码",-1)),Ae(u("input",{type:"password",class:"input","onUpdate:modelValue":Q[7]||(Q[7]=xe=>ee.value=xe)},null,512),[[De,ee.value]])]),u("div",k_,[Q[21]||(Q[21]=u("label",null,"新主密码(至少 6 位)",-1)),Ae(u("input",{type:"password",class:"input","onUpdate:modelValue":Q[8]||(Q[8]=xe=>E.value=xe)},null,512),[[De,E.value]])]),u("div",x_,[Q[22]||(Q[22]=u("label",null,"确认新主密码",-1)),Ae(u("input",{type:"password",class:"input","onUpdate:modelValue":Q[9]||(Q[9]=xe=>R.value=xe)},null,512),[[De,R.value]])]),Y.value?(K(),U("div",C_,re(Y.value),1)):$e("",!0),Q[23]||(Q[23]=u("div",{class:"muted vp-tip"},"确认后所有账号密码将使用新主密码重新加密",-1))]),u("div",S_,[u("button",{class:"btn btn-sm",onClick:Q[10]||(Q[10]=xe=>fe.value=!1)},"取消"),u("button",{class:"btn btn-primary btn-sm",onClick:de},"确认修改")])])])):$e("",!0)]),_:1})]))]))}}),A_=Yt($_,[["__scopeId","data-v-6820bc9c"]]);function P_(e){return'"'+(e==null?"":String(e)).replace(/"/g,'""')+'"'}async function Ou(e,t){const s="\uFEFF"+t.map(d=>d.map(P_).join(",")).join(`\r
|
||
`);if(Zr.isNativePlatform()){const{downloadText:d}=await lf(async()=>{const{downloadText:h}=await Promise.resolve().then(()=>pg);return{downloadText:h}},void 0,import.meta.url);return d(e,s)}const o=new Blob([s],{type:"text/csv;charset=utf-8"}),a=URL.createObjectURL(o),c=document.createElement("a");return c.href=a,c.download=e,c.click(),window.setTimeout(()=>URL.revokeObjectURL(a),1e4),""}class T_ extends Ir{constructor(){super("intern_worklog_users"),this.version(1).stores({user:"id, &username"})}}const Or=new T_,pi="intern_worklog",tl="dsh_session_user";function hi(){try{const e=localStorage.getItem(tl);if(!e)return null;const t=JSON.parse(e);if(t&&t.userId&&t.username)return t}catch{}return null}function mf(e){localStorage.setItem(tl,JSON.stringify(e))}function yf(){localStorage.removeItem(tl)}const nl="dsh_cloud_creds";function gf(e,t){localStorage.setItem(nl,JSON.stringify({username:e,password:t}))}function vi(){try{const e=localStorage.getItem(nl);if(!e)return null;const t=JSON.parse(e);if(t&&t.username&&t.password)return t}catch{}return null}function bf(){localStorage.removeItem(nl)}function rl(e){qh(new tf(pi+"_"+e))}async function O_(e,t,n){const s=e.trim();if(s.length<2||s.length>20)throw new Error("用户名需 2 到 20 个字符");if(t.length<6)throw new Error("登录密码至少 6 位");if(await Or.user.where("username").equals(s).first())throw new Error("用户名已存在");const a=el(),c=await Wo(t,a),d="u_"+Date.now().toString(36)+"_"+Math.random().toString(36).slice(2,6);await Or.user.add({id:d,username:s,pwd_hash:c,pwd_salt:a,created_at:new Date().toISOString()}),rl(d);let h=0;n&&await wf()&&(h=await R_(),await Or.user.update(d,{legacy_imported_at:new Date().toISOString()}));const g={userId:d,username:s};return mf(g),gf(g.username,t),h&&L_(h),g}async function M_(e,t){const n=e.trim(),s=await Or.user.where("username").equals(n).first();if(!s)throw new Error("用户不存在");if(await Wo(t,s.pwd_salt)!==s.pwd_hash)throw new Error("密码不正确");rl(s.id);const a={userId:s.id,username:s.username};return mf(a),gf(a.username,t),a}async function I_(){Yo(),nf(),yf(),bf()}async function j_(e,t){const n=hi();if(!n)throw new Error("未登录");if(t.length<6)throw new Error("新密码至少 6 位");const s=await Or.user.get(n.userId);if(!s)throw new Error("用户不存在");if(await Wo(e,s.pwd_salt)!==s.pwd_hash)throw new Error("旧密码不正确");const a=el(),c=await Wo(t,a);await Or.user.update(s.id,{pwd_hash:c,pwd_salt:a})}async function D_(){const e=hi();if(!e)throw new Error("未登录");Yo(),nf(),await Ir.delete(pi+"_"+e.userId),await Or.user.delete(e.userId),yf(),bf()}async function wf(){return Ir.exists(pi)}async function R_(){if(!ne)throw new Error("用户数据库未就绪");const e=new tf(pi),t=await Promise.all([e.project.toArray(),e.work_log.toArray(),e.log_item.toArray(),e.attendance.toArray(),e.weekly_note.toArray(),e.setting.toArray(),e.memo.toArray(),e.credential.toArray()]);await ne.transaction("rw",[ne.project,ne.work_log,ne.log_item,ne.attendance,ne.weekly_note,ne.setting,ne.memo,ne.credential],async()=>{await Promise.all([ne.project.clear(),ne.work_log.clear(),ne.log_item.clear(),ne.attendance.clear(),ne.weekly_note.clear(),ne.setting.clear(),ne.memo.clear(),ne.credential.clear()]),t[0].length&&await ne.project.bulkAdd(t[0]),t[1].length&&await ne.work_log.bulkAdd(t[1]),t[2].length&&await ne.log_item.bulkAdd(t[2]),t[3].length&&await ne.attendance.bulkAdd(t[3]),t[4].length&&await ne.weekly_note.bulkAdd(t[4]),t[5].length&&await ne.setting.bulkAdd(t[5]),t[6].length&&await ne.memo.bulkAdd(t[6]),t[7].length&&await ne.credential.bulkAdd(t[7])});const n=t[0].length+t[1].length+t[2].length+t[3].length+t[4].length+t[6].length+t[7].length;return e.close(),n}function L_(e){try{sessionStorage.setItem("dsh_migrate_toast",String(e))}catch{}}const K_="https://daywk.linyux.cn",Aa=["project","work_log","log_item","attendance","weekly_note","setting","memo","credential","transaction"],Pa=new Set(["sync_cursor","sync_last_time","sync_token","last_project","last_category"]);function F_(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function Mu(e){const t={...e};return delete t.id,t}function Iu(e){return JSON.stringify(e)}async function N_(e){return ne[e].toArray()}async function V_(){for(const e of Aa){const t=ne[e],n=await t.toArray();for(const s of n){if(e==="setting"&&Pa.has(s.key))continue;const o={};s.uuid||(o.uuid=F_()),s.updated_at||(o.updated_at=s.created_at||wt()),Object.keys(o).length&&await t.update(s.id,o)}}}async function sl(){return await yt("sync_base_url","")||K_}async function _f(){const e=vi();if(!e)throw new Error("未登录,无法同步");return{baseUrl:await sl(),username:e.username,password:e.password}}async function B_(){return Cf(await _f())}async function kf(){const e=vi();if(!e)throw new Error("未登录");const t=await sl(),n={"Content-Type":"application/json"},s=JSON.stringify({username:e.username,password:e.password});let o=await fetch(t+"/api/auth/register",{method:"POST",headers:n,body:s});if(o.status===409){if(o=await fetch(t+"/api/auth/login",{method:"POST",headers:n,body:s}),!o.ok)throw new Error("云端已存在同名账号且密码不一致,请检查")}else if(!o.ok)throw new Error("云端绑定失败:"+o.status)}async function U_(){return vi()!=null}async function q_(){return yt("sync_last_time","")}async function xf(e,t){const n=await fetch(e+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:t.username.trim(),password:t.password})});if(!n.ok)throw new Error("云端账号或密码不正确");const s=await n.json();if(!s||!s.token)throw new Error("云端登录异常");return String(s.token)}async function H_(e,t){let n=await yt("sync_token","");return n||(n=await xf(e,t),await kt("sync_token",n),n)}let $s=!1,To=!1,Ta=!1,Gr=null,wn=null,Oa="",ju=!1;async function Yr(){if($s){To=!0;return}try{if(!await U_())return;await Cf(await _f())}catch{}}function W_(){ju||(ju=!0,ne.on("changes",()=>{Ta||$s||(Gr&&window.clearTimeout(Gr),Gr=window.setTimeout(()=>{Yr()},3e3))}))}function z_(){wn&&(wn.close(),wn=null,Oa=""),Gr&&(window.clearTimeout(Gr),Gr=null)}function G_(e,t){const n=e+"|"+t;if(!(wn&&Oa===n)){wn&&(wn.close(),wn=null);try{wn=new EventSource(e+"/api/events?token="+encodeURIComponent(t)),Oa=n,wn.onmessage=()=>{Yr()}}catch{wn=null}}}async function Cf(e){if($s)return To=!0,{pushed:0,pulled:0,removed:0,at:""};$s=!0,Ta=!0;try{const t=await Y_(e);return To&&(To=!1,window.setTimeout(()=>{Yr()},800)),t}finally{$s=!1,Ta=!1}}async function Y_(e){const t=e.baseUrl.trim().replace(/\/+$/,"");if(!t)throw new Error("请先配置同步服务地址");await V_();const n=await ne.sync_mirror.toArray(),s=new Map;for(const ee of n)s.set(ee.table+"|"+ee.uuid,ee);const o={},a=[];let c=0;for(const ee of Aa){let E=await N_(ee);ee==="setting"&&(E=E.filter(Y=>!Pa.has(Y.key)));const R=new Map;for(const Y of E)R.set(Y.uuid,Y);for(const[Y,le]of R){const ie=Mu(le),Z=Iu(ie),A=s.get(ee+"|"+Y);(!A||A.hash!==Z)&&(o[ee]=o[ee]||[],o[ee].push(ie),c++)}for(const[Y,le]of s)Y.startsWith(ee+"|")&&!R.has(le.uuid)&&a.push({table:ee,uuid:le.uuid,deleted_at:wt()});o[ee]=o[ee]||[]}const d=await H_(t,e),h=ee=>fetch(t+"/api/sync",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+ee},body:JSON.stringify({device:"client",tables:o,tombstones:a})});let g=await h(d);if(g.status===401){await kt("sync_token","");const ee=await xf(t,e);await kt("sync_token",ee),g=await h(ee)}if(!g.ok)throw new Error("同步服务返回 "+g.status);const y=await g.json(),k=y.tables||{},j=y.tombstones||[];let T=0,L=0;const H=[];for(const ee of Aa){const E=ne[ee],R=await E.toArray(),Y=new Map;for(const x of R)Y.set(x.uuid,x);const le=k[ee]||[],ie=new Map;for(const x of le)ie.set(x.uuid,x);const Z=new Set(j.filter(x=>x.table===ee).map(x=>x.uuid));for(const[x,oe]of Y)Z.has(x)&&(await E.delete(oe.id),L++);for(const[x,oe]of le){if(Z.has(x))continue;const Ce=Y.get(x);if(!Ce)await E.add({...oe}),T++;else{const J=String(Ce.updated_at||"");String(oe.updated_at||"")>J&&(await E.update(Ce.id,{...oe}),T++)}}const A=await E.toArray();for(const x of A)ee==="setting"&&Pa.has(x.key)||H.push({table:ee,uuid:x.uuid,hash:Iu(Mu(x))})}await ne.sync_mirror.clear(),H.length&&await ne.sync_mirror.bulkAdd(H.map(ee=>({...ee}))),G_(t,d);const fe=wt();return await kt("sync_last_time",fe),{pushed:c,pulled:T,removed:L,at:fe}}const J_={class:"settings"},X_={class:"card section"},Q_={class:"muted acc-line"},Z_={class:"ai-grid"},e1={class:"rule-item"},t1={class:"rule-item"},n1={class:"rule-item"},r1={key:0,class:"form-error"},s1={class:"rule-save"},o1={class:"card section"},i1={class:"rule-grid"},a1={class:"rule-item"},l1={class:"rule-item"},u1={class:"rule-item"},c1={class:"rule-item"},f1={class:"rule-item"},d1={class:"card section"},p1={class:"proj-add"},h1={key:0,class:"muted proj-tip"},v1=["onKeydown"],m1=["onClick"],y1=["onClick"],g1=["onClick"],b1={key:1,class:"muted"},w1={class:"card section"},_1={class:"card section"},k1={class:"muted acc-line"},x1={class:"rule-item"},C1={class:"rule-save"},S1=["disabled"],E1={key:0,class:"muted acc-line"},$1={key:1,class:"form-error"},A1={class:"card section"},P1={class:"ai-grid"},T1={class:"rule-item"},O1={class:"rule-item"},M1={class:"rule-item"},I1={class:"card section"},j1={class:"backup-row"},D1={key:0,class:"import-error"},R1=Vt({__name:"SettingsView",setup(e){var Bt;const t=F({work_start:"09:00",work_end:"18:00",grace_minutes:10,lunch_minutes:60,remind_weekly:"friday"}),n=F([]),s=F(""),o=F(""),a=F(""),c=F(""),d=F(""),h=F(""),g=F(null),y=F(""),k=F(null),j=F(null),T=F(""),L=F(((Bt=hi())==null?void 0:Bt.username)||""),H=F(""),fe=F(""),ee=F(""),E=F(""),R=F(!1),Y=F(""),le=F(""),ie=F(""),Z=F(""),A=F(!1),x=F("");async function oe(){var he;Y.value=await sl(),le.value=((he=vi())==null?void 0:he.username)||"",x.value=await q_()}async function Ce(){await kt("sync_base_url",Y.value.trim()),Ge("同步地址已保存")}async function J(){Z.value="";try{await kf(),Ge("云端绑定已重建")}catch(he){Z.value=he instanceof Error?he.message:"绑定失败"}}async function Se(){if(!A.value){Z.value="",A.value=!0;try{await Ce();const he=await B_();x.value=he.at,ie.value="推送 "+he.pushed+" 条 · 拉取 "+he.pulled+" 条 · 删除 "+he.removed+" 条",Ge("同步完成")}catch(he){Z.value=he instanceof Error?he.message:"同步失败"}A.value=!1}}async function Ve(){if(E.value="",fe.value!==ee.value){E.value="两次输入的新密码不一致";return}try{await j_(H.value,fe.value),H.value="",fe.value="",ee.value="",Ge("登录密码已修改")}catch(he){E.value=he instanceof Error?he.message:"修改失败"}}async function Xe(){await D_(),window.location.reload()}async function Ne(){t.value=await jr(),n.value=await Ks(!0),a.value=(await Xa()).join(`
|
||
`),c.value=await yt("ai_base_url",""),d.value=await yt("ai_api_key",""),h.value=await yt("ai_model",""),await oe()}async function We(){await kt("ai_base_url",c.value.trim()),await kt("ai_api_key",d.value.trim()),await kt("ai_model",h.value.trim()),Ge("AI 配置已保存")}async function be(){const he=xt(),m=await Promise.all([fi("2000-01-01",he),Ks(!0)]),_=m[0],W=m[1],ce=new Map(W.map(ue=>[ue.id,ue.name])),se=[["日期","分类","项目","内容","耗时(分钟)","成果","待跟进","收获","备注"]];for(const ue of _)se.push([ue.date,Ja(ue.category),ue.project_id&&ce.get(ue.project_id)||"",ue.content,ue.minutes==null?"":ue.minutes,ue.is_milestone?"是":"",ue.needs_followup?"是":"",ue.takeaway||"",ue.remark||""]);const ae=await Ou("工作记录_"+he.replace(/-/g,"")+".csv",se);Ge(ae?"CSV 已导出到:"+ae:"CSV 已导出到系统下载目录")}async function Ie(){const he=xt(),m=await Promise.all([jr(),ci("2000-01-01",he)]),_=m[0],W=m[1],ce=["周日","周一","周二","周三","周四","周五","周六"],se=[["日期","星期","状态","上班时间","下班时间","地点","类型","说明"]];for(const ue of W){const ye=qs(ue,ue.date,_,ue.date===he);se.push([ue.date,ce[rs(ue.date).getDay()],ye.label,ue.clock_in_at?Vn(ue.clock_in_at):"",ue.clock_out_at?Vn(ue.clock_out_at):"",ue.location||"",ue.kind==="makeup"?"补卡":ue.kind==="leave"?"休假":"正常",ue.note||""])}const ae=await Ou("考勤记录_"+he.replace(/-/g,"")+".csv",se);Ge(ae?"CSV 已导出到:"+ae:"CSV 已导出到系统下载目录")}fn(Ne);async function Ke(){await kt("work_start",t.value.work_start),await kt("work_end",t.value.work_end),await kt("grace_minutes",String(t.value.grace_minutes)),await kt("lunch_minutes",String(t.value.lunch_minutes)),await kt("remind_weekly",t.value.remind_weekly),Ge("打卡规则已保存")}async function de(){await sf(a.value.split(`
|
||
`)),Ge("常用地点已保存")}async function X(){const he=s.value.trim();if(he){try{await mv(he),o.value="",s.value=""}catch{o.value="项目名已存在"}await Ne()}}function Q(he){g.value=he.id,y.value=he.name}async function xe(he){const m=y.value.trim();if(m)try{await yv(he.id,m),o.value=""}catch{o.value="项目名已存在"}g.value=null,await Ne()}async function ot(he){await gv(he.id,he.archived!==1),await Ne()}async function pt(){const he=await Bv(),m=await Za("实习日志备份_"+xt().replace(/-/g,"")+".json",he);Ge(m?"备份已导出到:"+m:"备份已导出到系统下载目录")}function ht(he){const m=he.target,_=m.files&&m.files[0];if(T.value="",!_)return;const W=_.name;_.text().then(ce=>{j.value={name:W,text:ce}}),m.value=""}async function Jt(){if(j.value)try{await Uv(j.value.text),j.value=null,T.value="",await Ne(),Ge("数据导入完成")}catch(he){j.value=null,T.value=he instanceof Error?he.message:"导入失败"}}return(he,m)=>(K(),U("div",J_,[u("div",X_,[m[23]||(m[23]=u("div",{class:"section-title"},"账号与隐私",-1)),u("div",Q_,"当前用户:"+re(L.value)+" · 每位用户独立数据库隔离存储于本机 · 登录密码仅保存 PBKDF2 哈希",1),u("div",Z_,[u("div",e1,[m[20]||(m[20]=u("label",null,"旧登录密码",-1)),Ae(u("input",{type:"password",class:"input","onUpdate:modelValue":m[0]||(m[0]=_=>H.value=_)},null,512),[[De,H.value]])]),u("div",t1,[m[21]||(m[21]=u("label",null,"新登录密码(至少 6 位)",-1)),Ae(u("input",{type:"password",class:"input","onUpdate:modelValue":m[1]||(m[1]=_=>fe.value=_)},null,512),[[De,fe.value]])]),u("div",n1,[m[22]||(m[22]=u("label",null,"确认新登录密码",-1)),Ae(u("input",{type:"password",class:"input","onUpdate:modelValue":m[2]||(m[2]=_=>ee.value=_)},null,512),[[De,ee.value]])])]),E.value?(K(),U("div",r1,re(E.value),1)):$e("",!0),u("div",s1,[u("button",{class:"btn btn-primary btn-sm",onClick:Ve},"修改登录密码"),u("button",{class:"btn btn-sm btn-danger",onClick:m[3]||(m[3]=_=>R.value=!0)},"删除此用户及全部数据")])]),u("div",o1,[m[30]||(m[30]=u("div",{class:"section-title"},"打卡规则",-1)),u("div",i1,[u("div",a1,[m[24]||(m[24]=u("label",null,"上班时间",-1)),Ae(u("input",{type:"time",class:"input","onUpdate:modelValue":m[4]||(m[4]=_=>t.value.work_start=_)},null,512),[[De,t.value.work_start]])]),u("div",l1,[m[25]||(m[25]=u("label",null,"下班时间",-1)),Ae(u("input",{type:"time",class:"input","onUpdate:modelValue":m[5]||(m[5]=_=>t.value.work_end=_)},null,512),[[De,t.value.work_end]])]),u("div",u1,[m[26]||(m[26]=u("label",null,"迟到宽限(分钟)",-1)),Ae(u("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":m[6]||(m[6]=_=>t.value.grace_minutes=_)},null,512),[[De,t.value.grace_minutes,void 0,{number:!0}]])]),u("div",c1,[m[27]||(m[27]=u("label",null,"午休扣除(分钟)",-1)),Ae(u("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":m[7]||(m[7]=_=>t.value.lunch_minutes=_)},null,512),[[De,t.value.lunch_minutes,void 0,{number:!0}]])]),u("div",f1,[m[29]||(m[29]=u("label",null,"周记提醒",-1)),Ae(u("select",{class:"select","onUpdate:modelValue":m[8]||(m[8]=_=>t.value.remind_weekly=_)},[...m[28]||(m[28]=[u("option",{value:"friday"},"每周五提醒",-1),u("option",{value:"off"},"关闭",-1)])],512),[[Fn,t.value.remind_weekly]])])]),u("div",{class:"rule-save"},[u("button",{class:"btn btn-primary btn-sm",onClick:Ke},"保存规则")])]),u("div",d1,[m[31]||(m[31]=u("div",{class:"section-title"},"项目管理",-1)),u("div",p1,[Ae(u("input",{class:"input","onUpdate:modelValue":m[9]||(m[9]=_=>s.value=_),placeholder:"新项目名称",onKeydown:jt(X,["enter"])},null,544),[[De,s.value]]),u("button",{class:"btn btn-sm",onClick:X},"添加")]),o.value?(K(),U("div",h1,re(o.value),1)):$e("",!0),(K(!0),U(Re,null,ut(n.value,_=>(K(),U("div",{key:_.id,class:"proj-row"},[g.value===_.id?(K(),U(Re,{key:0},[Ae(u("input",{class:"input","onUpdate:modelValue":m[10]||(m[10]=W=>y.value=W),onKeydown:jt(W=>xe(_),["enter"])},null,40,v1),[[De,y.value]]),u("button",{class:"btn btn-sm",onClick:W=>xe(_)},"保存",8,m1),u("button",{class:"btn btn-sm",onClick:m[11]||(m[11]=W=>g.value=null)},"取消")],64)):(K(),U(Re,{key:1},[u("span",{class:et(["proj-name",{archived:_.archived===1}])},re(_.name),3),u("button",{class:"icon-btn",title:"重命名",onClick:W=>Q(_)},[Me(lt,{name:"edit",size:14})],8,y1),u("button",{class:"btn btn-sm",onClick:W=>ot(_)},re(_.archived===1?"恢复":"归档"),9,g1)],64))]))),128)),n.value.length?$e("",!0):(K(),U("div",b1,"暂无项目,先添加一个"))]),u("div",w1,[m[33]||(m[33]=u("div",{class:"section-title"},"常用地点",-1)),Ae(u("textarea",{class:"textarea","onUpdate:modelValue":m[12]||(m[12]=_=>a.value=_),placeholder:"每行一个地点,如:公司、客户现场、出差、居家办公"},null,512),[[De,a.value]]),u("div",{class:"rule-save"},[u("button",{class:"btn btn-primary btn-sm",onClick:de},"保存地点"),m[32]||(m[32]=u("span",{class:"muted loc-note"},"打卡时可直接输入新地点,保存后自动加入列表",-1))])]),u("div",_1,[m[35]||(m[35]=u("div",{class:"section-title"},"多端数据同步",-1)),u("div",k1,"云端账号:"+re(le.value||"未绑定")+" · 登录即自动绑定并同步(变更实时推送 + 每 5 分钟兜底);密码库以密文同步,主密码永不出本机",1),u("div",x1,[m[34]||(m[34]=u("label",null,"同步服务地址(默认即可)",-1)),Ae(u("input",{class:"input","onUpdate:modelValue":m[13]||(m[13]=_=>Y.value=_),placeholder:"https://daywk.linyux.cn"},null,512),[[De,Y.value]])]),u("div",C1,[u("button",{class:"btn btn-sm",onClick:Ce},"保存地址"),u("button",{class:"btn btn-primary btn-sm",disabled:A.value,onClick:Se},re(A.value?"同步中":"立即同步"),9,S1),u("button",{class:"btn btn-sm",onClick:J},"重建云端绑定")]),ie.value?(K(),U("div",E1,"上次同步:"+re(x.value||"--")+" · "+re(ie.value),1)):$e("",!0),Z.value?(K(),U("div",$1,re(Z.value),1)):$e("",!0)]),u("div",A1,[m[40]||(m[40]=u("div",{class:"section-title"},"AI 润色配置(可选)",-1)),u("div",P1,[u("div",T1,[m[36]||(m[36]=u("label",null,"接口地址(OpenAI 兼容,到 /v1 为止)",-1)),Ae(u("input",{class:"input","onUpdate:modelValue":m[14]||(m[14]=_=>c.value=_),placeholder:"https://api.example.com/v1"},null,512),[[De,c.value]])]),u("div",O1,[m[37]||(m[37]=u("label",null,"API Key",-1)),Ae(u("input",{class:"input","onUpdate:modelValue":m[15]||(m[15]=_=>d.value=_),placeholder:"sk-..."},null,512),[[De,d.value]])]),u("div",M1,[m[38]||(m[38]=u("label",null,"模型名称",-1)),Ae(u("input",{class:"input","onUpdate:modelValue":m[16]||(m[16]=_=>h.value=_),placeholder:"如:deepseek-chat"},null,512),[[De,h.value]])])]),u("div",{class:"rule-save"},[u("button",{class:"btn btn-primary btn-sm",onClick:We},"保存 AI 配置"),m[39]||(m[39]=u("span",{class:"muted loc-note"},"配置仅保存在本机浏览器;总结页可用 AI 润色草稿,需服务端允许浏览器跨域",-1))])]),u("div",I1,[m[41]||(m[41]=u("div",{class:"section-title"},"数据备份",-1)),u("div",j1,[u("button",{class:"btn btn-sm",onClick:pt},"导出 JSON 备份"),u("button",{class:"btn btn-sm",onClick:m[17]||(m[17]=_=>{var W;return(W=k.value)==null?void 0:W.click()})},"导入 JSON 备份"),u("button",{class:"btn btn-sm",onClick:be},"导出工作记录 CSV"),u("button",{class:"btn btn-sm",onClick:Ie},"导出考勤 CSV"),u("input",{ref_key:"fileInput",ref:k,type:"file",accept:"application/json,.json",style:{display:"none"},onChange:ht},null,544)]),T.value?(K(),U("div",D1,re(T.value),1)):$e("",!0),m[42]||(m[42]=u("div",{class:"muted backup-note"},"数据保存在浏览器 IndexedDB 中,建议定期导出 JSON 备份。",-1))]),Me(ur,{open:!!j.value,title:"导入确认",message:j.value?"将从文件「"+j.value.name+"」导入备份。现有全部数据将被覆盖,且不可恢复,请先确认已导出当前备份。":"","confirm-text":"覆盖导入",danger:"",onCancel:m[18]||(m[18]=_=>j.value=null),onConfirm:Jt},null,8,["open","message"]),Me(ur,{open:R.value,title:"删除用户确认",message:"将永久删除用户「"+L.value+"」及其全部数据:工作日志、考勤、备忘录、账号密码库都将被清除,且不可恢复。请确认。","confirm-text":"永久删除",danger:"",onCancel:m[19]||(m[19]=_=>R.value=!1),onConfirm:Xe},null,8,["open","message"])]))}}),L1=Yt(R1,[["__scopeId","data-v-a31266da"]]),K1={class:"login-page"},F1={class:"card login-card"},N1={class:"login-brand"},V1={class:"brand-icon"},B1={class:"seg"},U1=["placeholder"],q1={key:1,class:"mig-row"},H1={key:2,class:"form-error"},W1=["disabled"],z1=Vt({__name:"LoginView",emits:["login"],setup(e,{emit:t}){const n=t,s=F("login"),o=F(""),a=F(""),c=F(""),d=F(!0),h=F(!1),g=F(""),y=F(!1);fn(async()=>{h.value=await wf()});function k(T){s.value=T,g.value="",c.value=""}async function j(){if(!y.value){g.value="",y.value=!0;try{let T;if(s.value==="login")T=await M_(o.value,a.value);else{if(a.value.length<6){g.value="登录密码至少 6 位",y.value=!1;return}if(a.value!==c.value){g.value="两次输入的密码不一致",y.value=!1;return}T=await O_(o.value,a.value,d.value)}n("login",T)}catch(T){g.value=T instanceof Error?T.message:"操作失败"}y.value=!1}}return(T,L)=>(K(),U("div",K1,[u("div",F1,[u("div",N1,[u("div",V1,[Me(lt,{name:"calendar",size:22})]),L[6]||(L[6]=u("div",{class:"login-title"},"实习工作日志",-1)),L[7]||(L[7]=u("div",{class:"muted login-sub"},"打卡 · 记录 · 总结 · 备忘录 · 密码库",-1)),L[8]||(L[8]=u("div",{class:"muted login-sub"},"每位用户独立数据库,数据彼此隔离并保存在本机",-1))]),u("div",B1,[u("button",{class:et(["seg-btn",{active:s.value==="login"}]),onClick:L[0]||(L[0]=H=>k("login"))},"登录",2),u("button",{class:et(["seg-btn",{active:s.value==="create"}]),onClick:L[1]||(L[1]=H=>k("create"))},"创建用户",2)]),Ae(u("input",{class:"input","onUpdate:modelValue":L[2]||(L[2]=H=>o.value=H),placeholder:"用户名(2 到 20 个字符)",onKeydown:jt(j,["enter"])},null,544),[[De,o.value]]),Ae(u("input",{type:"password",class:"input","onUpdate:modelValue":L[3]||(L[3]=H=>a.value=H),placeholder:s.value==="login"?"登录密码":"设置登录密码(至少 6 位)",onKeydown:jt(j,["enter"])},null,40,U1),[[De,a.value]]),s.value==="create"?Ae((K(),U("input",{key:0,type:"password",class:"input","onUpdate:modelValue":L[4]||(L[4]=H=>c.value=H),placeholder:"再次输入密码",onKeydown:jt(j,["enter"])},null,544)),[[De,c.value]]):$e("",!0),s.value==="create"&&h.value?(K(),U("label",q1,[Ae(u("input",{type:"checkbox","onUpdate:modelValue":L[5]||(L[5]=H=>d.value=H)},null,512),[[Sh,d.value]]),L[9]||(L[9]=u("span",null,"导入本机原有工作日志数据到此用户(原数据保留不删除)",-1))])):$e("",!0),g.value?(K(),U("div",H1,re(g.value),1)):$e("",!0),u("button",{class:"btn btn-primary login-btn",disabled:y.value,onClick:j},re(s.value==="login"?"登录":"创建并进入"),9,W1),L[10]||(L[10]=u("div",{class:"muted login-note"}," 登录后自动开启云端同步(密码会保存在本机用于云同步);系统只保存密码哈希,忘记密码将无法访问该用户数据 ",-1))])]))}}),G1=Yt(z1,[["__scopeId","data-v-d3d6c8cb"]]),Y1={key:1,class:"app"},J1={class:"side"},X1=["data-tip","onClick"],Q1={class:"main"},Z1={class:"topbar"},e0={class:"title"},t0={class:"gsearch"},n0={key:0,class:"gs-panel"},r0={key:0,class:"gs-group muted"},s0=["onMousedown"],o0={class:"tag"},i0={class:"gs-text"},a0={class:"muted num gs-date"},l0={key:1,class:"gs-group muted"},u0=["onMousedown"],c0={class:"gs-text"},f0={class:"muted gs-sub"},d0={key:1,class:"gs-empty muted"},p0={class:"user-chip num"},h0=["disabled"],v0={class:"num"},m0={class:"content"},y0={class:"content-inner"},g0={class:"toast-wrap"},b0=Vt({__name:"App",setup(e){const t=Hv(),n=F(hi());async function s(be){n.value=be,location.hash="#/calendar",le.value="calendar",await Ce(),await We(),c();try{await kf(),await Yr()}catch{}showToast("欢迎,"+be.username);const Ie=sessionStorage.getItem("dsh_migrate_toast");Ie&&(sessionStorage.removeItem("dsh_migrate_toast"),showToast("已迁移原有数据 "+Ie+" 条"))}async function o(){z_(),a!==null&&(window.clearInterval(a),a=null),await I_(),n.value=null,le.value="calendar",location.hash="#/calendar",showToast("已退出登录")}let a=null;function c(){W_(),a!==null&&window.clearInterval(a),a=window.setInterval(()=>{Yr()},60*1e3),Yr()}const d=F(null),h=F(""),g=F(!1),y=F({logs:[],memos:[]});let k=null;const j=it(()=>!!(y.value.logs.length||y.value.memos.length));function T(){k&&window.clearTimeout(k);const be=h.value;k=window.setTimeout(async()=>{const Ie=be.trim();if(!Ie){y.value={logs:[],memos:[]};return}const Ke=await Promise.all([Dv(Ie,8),Rv(Ie,4)]);y.value={logs:Ke[0],memos:Ke[1]}},200)}function L(){h.value="",y.value={logs:[],memos:[]},g.value=!1}function H(be){Sa.value=be.date,ie("calendar"),L()}function fe(be){Ea.value=be.id,ie("memo"),L()}function ee(){window.setTimeout(()=>{g.value=!1},150)}function E(be){var Ie;(be.ctrlKey||be.metaKey)&&be.key.toLowerCase()==="k"&&(be.preventDefault(),(Ie=d.value)==null||Ie.focus())}const R=[{key:"calendar",name:"日历",icon:"calendar"},{key:"today",name:"详情",icon:"edit"},{key:"stats",name:"统计",icon:"chart"},{key:"report",name:"总结",icon:"export"},{key:"ledger",name:"记账",icon:"wallet"},{key:"memo",name:"备忘录",icon:"memo"},{key:"vault",name:"密码库",icon:"lock"},{key:"settings",name:"设置",icon:"settings"}];function Y(){const be=(location.hash||"").replace("#/","");return R.some(Ie=>Ie.key===be)?be:"calendar"}const le=F(Y());window.addEventListener("hashchange",()=>{le.value=Y()});function ie(be){location.hash="#/"+be}const Z=it(()=>R.find(be=>be.key===le.value)||R[0]),A=F(xt()),x=F(void 0),oe=F(!1);async function Ce(){if(x.value=await mn(A.value),oe.value=!1,new Date().getHours()<4){const Ie=await mn(Kn(A.value,-1));oe.value=!!(Ie&&Ie.clock_in_at&&!Ie.clock_out_at)}}const J=it(()=>{const be=x.value;return be&&be.clock_in_at&&!be.clock_out_at?!0:oe.value&&!(be&&be.clock_in_at)}),Se=it(()=>{const be=x.value;return!!(be&&be.clock_in_at&&be.clock_out_at)}),Ve=it(()=>{const be=x.value;return J.value?"下班打卡":Se.value?"已打卡 "+Vn(be==null?void 0:be.clock_in_at)+" - "+Vn(be==null?void 0:be.clock_out_at):"上班打卡"});async function Xe(){if(J.value)try{await wv()}catch{}else await of(A.value);await Ce(),Sr()}gt(Hs,()=>{n.value&&Ce()});const Ne=F(!1);async function We(){if((await jr()).remind_weekly==="off"){Ne.value=!1;return}const Ie=new Date().getDay();if(Ie===5||Ie===6||Ie===0){const Ke=await Qa(Es(A.value));Ne.value=!Ke||!Ke.highlights&&!Ke.challenges&&!Ke.plan_next}else Ne.value=!1}return fn(async()=>{window.addEventListener("keydown",E),n.value&&(rl(n.value.userId),await Ce(),await We(),c())}),(be,Ie)=>{var Ke;return n.value?(K(),U("div",Y1,[u("nav",J1,[(K(),U(Re,null,ut(R,de=>u("button",{key:de.key,class:et(["nav-btn",{active:le.value===de.key}]),"data-tip":de.name,onClick:X=>ie(de.key)},[Me(lt,{name:de.icon,size:18},null,8,["name"])],10,X1)),64))]),u("div",Q1,[u("header",Z1,[u("span",e0,re(Z.value.name),1),u("div",t0,[Me(lt,{name:"search",size:14,class:"gs-icon"}),Ae(u("input",{ref_key:"gsInput",ref:d,class:"input gs-input","onUpdate:modelValue":Ie[0]||(Ie[0]=de=>h.value=de),placeholder:"搜索工作记录与备忘录(Ctrl+K)",onInput:T,onFocus:Ie[1]||(Ie[1]=de=>g.value=!0),onBlur:ee,onKeydown:jt(L,["esc"])},null,544),[[De,h.value]]),g.value&&h.value.trim()?(K(),U("div",n0,[j.value?(K(),U(Re,{key:0},[y.value.logs.length?(K(),U("div",r0,"工作记录")):$e("",!0),(K(!0),U(Re,null,ut(y.value.logs,de=>(K(),U("div",{key:"l"+de.id,class:"gs-item",onMousedown:Mr(X=>H(de),["prevent"])},[u("span",o0,re(nn(Ja)(de.category)),1),u("span",i0,re(de.content),1),u("span",a0,re(de.date),1)],40,s0))),128)),y.value.memos.length?(K(),U("div",l0,"备忘录")):$e("",!0),(K(!0),U(Re,null,ut(y.value.memos,de=>(K(),U("div",{key:"m"+de.id,class:"gs-item",onMousedown:Mr(X=>fe(de),["prevent"])},[u("span",c0,re(de.title||"无标题"),1),u("span",f0,re(de.content),1)],40,u0))),128))],64)):(K(),U("div",d0,"无匹配结果"))])):$e("",!0)]),Ie[4]||(Ie[4]=u("span",{class:"flex1"},null,-1)),Ne.value?(K(),U("button",{key:0,class:"week-tip",onClick:Ie[2]||(Ie[2]=de=>ie("report"))},[...Ie[3]||(Ie[3]=[u("span",{class:"dot",style:{background:"var(--warn)"}},null,-1),tn(" 填写本周周记 ",-1)])])):$e("",!0),u("span",p0,re((Ke=n.value)==null?void 0:Ke.username),1),u("button",{class:"btn btn-sm",onClick:o},"退出"),u("button",{class:"btn btn-primary btn-sm",disabled:Se.value,onClick:Xe},[Me(lt,{name:Se.value?"check-circle":"clock",size:14},null,8,["name"]),u("span",v0,re(Ve.value),1)],8,h0)]),u("main",m0,[u("div",y0,[le.value==="calendar"?(K(),It(hy,{key:0})):le.value==="today"?(K(),It(wy,{key:1})):le.value==="stats"?(K(),It(Xy,{key:2})):le.value==="report"?(K(),It(Jg,{key:3})):le.value==="ledger"?(K(),It(ow,{key:4})):le.value==="memo"?(K(),It(xw,{key:5})):le.value==="vault"?(K(),It(A_,{key:6})):(K(),It(L1,{key:7}))])])]),u("div",g0,[Me(mh,{name:"toast"},{default:fr(()=>[(K(!0),U(Re,null,ut(nn(t),de=>(K(),U("div",{key:de.id,class:"toast"},re(de.text),1))),128))]),_:1})])])):(K(),It(G1,{key:0,onLogin:s}))}}}),w0=Yt(b0,[["__scopeId","data-v-219a8436"]]);Mh(w0).mount("#app");"serviceWorker"in navigator&&location.protocol.startsWith("http")&&window.addEventListener("load",()=>{navigator.serviceWorker.register("sw.js").catch(()=>{})});export{ff as W,lf as _,fg as b,cf as r};
|