106 lines
308 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* @vue/shared v3.5.22
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function an(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Ne={},gi=[],Mt=()=>{},pi=()=>!1,Vs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Vc=e=>e.startsWith("onUpdate:"),Me=Object.assign,Wc=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},fw=Object.prototype.hasOwnProperty,$e=(e,t)=>fw.call(e,t),se=Array.isArray,vi=e=>Li(e)==="[object Map]",Ws=e=>Li(e)==="[object Set]",ud=e=>Li(e)==="[object Date]",dw=e=>Li(e)==="[object RegExp]",be=e=>typeof e=="function",Ee=e=>typeof e=="string",Xt=e=>typeof e=="symbol",je=e=>e!==null&&typeof e=="object",qc=e=>(je(e)||be(e))&&be(e.then)&&be(e.catch),vh=Object.prototype.toString,Li=e=>vh.call(e),hw=e=>Li(e).slice(8,-1),Ra=e=>Li(e)==="[object Object]",zc=e=>Ee(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,fs=an(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),pw=an("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),Aa=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},mw=/-\w/g,Ge=Aa(e=>e.replace(mw,t=>t.slice(1).toUpperCase())),gw=/\B([A-Z])/g,Gt=Aa(e=>e.replace(gw,"-$1").toLowerCase()),vs=Aa(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ps=Aa(e=>e?`on${vs(e)}`:""),Ut=(e,t)=>!Object.is(e,t),yi=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},yh=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},sa=e=>{const t=parseFloat(e);return isNaN(t)?e:t},ia=e=>{const t=Ee(e)?Number(e):NaN;return isNaN(t)?e:t};let fd;const Ma=()=>fd||(fd=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function vw(e,t){return e+JSON.stringify(t,(n,s)=>typeof s=="function"?s.toString():s)}const yw="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",Sw=an(yw);function Fi(e){if(se(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],i=Ee(s)?Sh(s):Fi(s);if(i)for(const r in i)t[r]=i[r]}return t}else if(Ee(e)||je(e))return e}const ww=/;(?![^(]*\))/g,bw=/:([^]+)/,Tw=/\/\*[^]*?\*\//g;function Sh(e){const t={};return e.replace(Tw,"").split(ww).forEach(n=>{if(n){const s=n.split(bw);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Di(e){let t="";if(Ee(e))t=e;else if(se(e))for(let n=0;n<e.length;n++){const s=Di(e[n]);s&&(t+=s+" ")}else if(je(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function wh(e){if(!e)return null;let{class:t,style:n}=e;return t&&!Ee(t)&&(e.class=Di(t)),n&&(e.style=Fi(n)),e}const _w="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",Ew="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",Cw="annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics",kw="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",xw=an(_w),Rw=an(Ew),Aw=an(Cw),Mw=an(kw),Ow="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Iw=an(Ow);function bh(e){return!!e||e===""}function Nw(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=ms(e[s],t[s]);return n}function ms(e,t){if(e===t)return!0;let n=ud(e),s=ud(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=Xt(e),s=Xt(t),n||s)return e===t;if(n=se(e),s=se(t),n||s)return n&&s?Nw(e,t):!1;if(n=je(e),s=je(t),n||s){if(!n||!s)return!1;const i=Object.keys(e).length,r=Object.keys(t).length;if(i!==r)return!1;for(const o in e){const l=e.hasOwnProperty(o),c=t.hasOwnProperty(o);if(l&&!c||!l&&c||!ms(e[o],t[o]))return!1}}return String(e)===String(t)}function Oa(e,t){return e.findIndex(n=>ms(n,t))}const Th=e=>!!(e&&e.__v_isRef===!0),Kc=e=>Ee(e)?e:e==null?"":se(e)||je(e)&&(e.toString===vh||!be(e.toString))?Th(e)?Kc(e.value):JSON.stringify(e,_h,2):String(e),_h=(e,t)=>Th(t)?_h(e,t.value):vi(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,i],r)=>(n[Hl(s,r)+" =>"]=i,n),{})}:Ws(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Hl(n))}:Xt(t)?Hl(t):je(t)&&!se(t)&&!Ra(t)?String(t):t,Hl=(e,t="")=>{var n;return Xt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};function Pw(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:String(e)}/**
* @vue/reactivity v3.5.22
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Pt;class Ia{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Pt,!t&&Pt&&(this.index=(Pt.scopes||(Pt.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=Pt;try{return Pt=this,t()}finally{Pt=n}}}on(){++this._on===1&&(this.prevScope=Pt,Pt=this)}off(){this._on>0&&--this._on===0&&(Pt=this.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){for(n=0,s=this.scopes.length;n<s;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0}}}function Eh(e){return new Ia(e)}function Jc(){return Pt}function Ch(e,t=!1){Pt&&Pt.cleanups.push(e)}let Ke;const Ul=new WeakSet;class _i{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,Pt&&Pt.active&&Pt.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ul.has(this)&&(Ul.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||xh(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,dd(this),Rh(this);const t=Ke,n=bn;Ke=this,bn=!0;try{return this.fn()}finally{Ah(this),Ke=t,bn=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Yc(t);this.deps=this.depsTail=void 0,dd(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ul.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){ic(this)&&this.run()}get dirty(){return ic(this)}}let kh=0,gr,vr;function xh(e,t=!1){if(e.flags|=8,t){e.next=vr,vr=e;return}e.next=gr,gr=e}function Gc(){kh++}function Qc(){if(--kh>0)return;if(vr){let t=vr;for(vr=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;gr;){let t=gr;for(gr=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 Rh(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ah(e){let t,n=e.depsTail,s=n;for(;s;){const i=s.prevDep;s.version===-1?(s===n&&(n=i),Yc(s),Lw(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=i}e.deps=t,e.depsTail=n}function ic(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Mh(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Mh(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===_r)||(e.globalVersion=_r,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!ic(e))))return;e.flags|=2;const t=e.dep,n=Ke,s=bn;Ke=e,bn=!0;try{Rh(e);const i=e.fn(e._value);(t.version===0||Ut(i,e._value))&&(e.flags|=128,e._value=i,t.version++)}catch(i){throw t.version++,i}finally{Ke=n,bn=s,Ah(e),e.flags&=-3}}function Yc(e,t=!1){const{dep:n,prevSub:s,nextSub:i}=e;if(s&&(s.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let r=n.computed.deps;r;r=r.nextDep)Yc(r,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Lw(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function Oh(e,t){e.effect instanceof _i&&(e=e.effect.fn);const n=new _i(e);t&&Me(n,t);try{n.run()}catch(i){throw n.stop(),i}const s=n.run.bind(n);return s.effect=n,s}function Ih(e){e.effect.stop()}let bn=!0;const Nh=[];function Jn(){Nh.push(bn),bn=!1}function Gn(){const e=Nh.pop();bn=e===void 0?!0:e}function dd(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ke;Ke=void 0;try{t()}finally{Ke=n}}}let _r=0;class Fw{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 Na{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(!Ke||!bn||Ke===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ke)n=this.activeLink=new Fw(Ke,this),Ke.deps?(n.prevDep=Ke.depsTail,Ke.depsTail.nextDep=n,Ke.depsTail=n):Ke.deps=Ke.depsTail=n,Ph(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=Ke.depsTail,n.nextDep=void 0,Ke.depsTail.nextDep=n,Ke.depsTail=n,Ke.deps===n&&(Ke.deps=s)}return n}trigger(t){this.version++,_r++,this.notify(t)}notify(t){Gc();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Qc()}}}function Ph(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)Ph(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const ra=new WeakMap,Ls=Symbol(""),rc=Symbol(""),Er=Symbol("");function Ft(e,t,n){if(bn&&Ke){let s=ra.get(e);s||ra.set(e,s=new Map);let i=s.get(n);i||(s.set(n,i=new Na),i.map=s,i.key=n),i.track()}}function Hn(e,t,n,s,i,r){const o=ra.get(e);if(!o){_r++;return}const l=c=>{c&&c.trigger()};if(Gc(),t==="clear")o.forEach(l);else{const c=se(e),h=c&&zc(n);if(c&&n==="length"){const f=Number(s);o.forEach((u,m)=>{(m==="length"||m===Er||!Xt(m)&&m>=f)&&l(u)})}else switch((n!==void 0||o.has(void 0))&&l(o.get(n)),h&&l(o.get(Er)),t){case"add":c?h&&l(o.get("length")):(l(o.get(Ls)),vi(e)&&l(o.get(rc)));break;case"delete":c||(l(o.get(Ls)),vi(e)&&l(o.get(rc)));break;case"set":vi(e)&&l(o.get(Ls));break}}Qc()}function Dw(e,t){const n=ra.get(e);return n&&n.get(t)}function li(e){const t=Pe(e);return t===e?t:(Ft(t,"iterate",Er),Yt(e)?t:t.map(xt))}function Pa(e){return Ft(e=Pe(e),"iterate",Er),e}const $w={__proto__:null,[Symbol.iterator](){return Vl(this,Symbol.iterator,xt)},concat(...e){return li(this).concat(...e.map(t=>se(t)?li(t):t))},entries(){return Vl(this,"entries",e=>(e[1]=xt(e[1]),e))},every(e,t){return Fn(this,"every",e,t,void 0,arguments)},filter(e,t){return Fn(this,"filter",e,t,n=>n.map(xt),arguments)},find(e,t){return Fn(this,"find",e,t,xt,arguments)},findIndex(e,t){return Fn(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Fn(this,"findLast",e,t,xt,arguments)},findLastIndex(e,t){return Fn(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Fn(this,"forEach",e,t,void 0,arguments)},includes(...e){return Wl(this,"includes",e)},indexOf(...e){return Wl(this,"indexOf",e)},join(e){return li(this).join(e)},lastIndexOf(...e){return Wl(this,"lastIndexOf",e)},map(e,t){return Fn(this,"map",e,t,void 0,arguments)},pop(){return ar(this,"pop")},push(...e){return ar(this,"push",e)},reduce(e,...t){return hd(this,"reduce",e,t)},reduceRight(e,...t){return hd(this,"reduceRight",e,t)},shift(){return ar(this,"shift")},some(e,t){return Fn(this,"some",e,t,void 0,arguments)},splice(...e){return ar(this,"splice",e)},toReversed(){return li(this).toReversed()},toSorted(e){return li(this).toSorted(e)},toSpliced(...e){return li(this).toSpliced(...e)},unshift(...e){return ar(this,"unshift",e)},values(){return Vl(this,"values",xt)}};function Vl(e,t,n){const s=Pa(e),i=s[t]();return s!==e&&!Yt(e)&&(i._next=i.next,i.next=()=>{const r=i._next();return r.done||(r.value=n(r.value)),r}),i}const Bw=Array.prototype;function Fn(e,t,n,s,i,r){const o=Pa(e),l=o!==e&&!Yt(e),c=o[t];if(c!==Bw[t]){const u=c.apply(e,r);return l?xt(u):u}let h=n;o!==e&&(l?h=function(u,m){return n.call(this,xt(u),m,e)}:n.length>2&&(h=function(u,m){return n.call(this,u,m,e)}));const f=c.call(o,h,s);return l&&i?i(f):f}function hd(e,t,n,s){const i=Pa(e);let r=n;return i!==e&&(Yt(e)?n.length>3&&(r=function(o,l,c){return n.call(this,o,l,c,e)}):r=function(o,l,c){return n.call(this,o,xt(l),c,e)}),i[t](r,...s)}function Wl(e,t,n){const s=Pe(e);Ft(s,"iterate",Er);const i=s[t](...n);return(i===-1||i===!1)&&jr(n[0])?(n[0]=Pe(n[0]),s[t](...n)):i}function ar(e,t,n=[]){Jn(),Gc();const s=Pe(e)[t].apply(e,n);return Qc(),Gn(),s}const jw=an("__proto__,__v_isRef,__isVue"),Lh=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Xt));function Hw(e){Xt(e)||(e=String(e));const t=Pe(this);return Ft(t,"has",e),t.hasOwnProperty(e)}class Fh{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const i=this._isReadonly,r=this._isShallow;if(n==="__v_isReactive")return!i;if(n==="__v_isReadonly")return i;if(n==="__v_isShallow")return r;if(n==="__v_raw")return s===(i?r?Uh:Hh:r?jh:Bh).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=se(t);if(!i){let c;if(o&&(c=$w[n]))return c;if(n==="hasOwnProperty")return Hw}const l=Reflect.get(t,n,pt(t)?t:s);if((Xt(n)?Lh.has(n):jw(n))||(i||Ft(t,"get",n),r))return l;if(pt(l)){const c=o&&zc(n)?l:l.value;return i&&je(c)?Cr(c):c}return je(l)?i?Cr(l):Br(l):l}}class Dh extends Fh{constructor(t=!1){super(!1,t)}set(t,n,s,i){let r=t[n];if(!this._isShallow){const c=An(r);if(!Yt(s)&&!An(s)&&(r=Pe(r),s=Pe(s)),!se(t)&&pt(r)&&!pt(s))return c||(r.value=s),!0}const o=se(t)&&zc(n)?Number(n)<t.length:$e(t,n),l=Reflect.set(t,n,s,pt(t)?t:i);return t===Pe(i)&&(o?Ut(s,r)&&Hn(t,"set",n,s):Hn(t,"add",n,s)),l}deleteProperty(t,n){const s=$e(t,n);t[n];const i=Reflect.deleteProperty(t,n);return i&&s&&Hn(t,"delete",n,void 0),i}has(t,n){const s=Reflect.has(t,n);return(!Xt(n)||!Lh.has(n))&&Ft(t,"has",n),s}ownKeys(t){return Ft(t,"iterate",se(t)?"length":Ls),Reflect.ownKeys(t)}}class $h extends Fh{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Uw=new Dh,Vw=new $h,Ww=new Dh(!0),qw=new $h(!0),oc=e=>e,No=e=>Reflect.getPrototypeOf(e);function zw(e,t,n){return function(...s){const i=this.__v_raw,r=Pe(i),o=vi(r),l=e==="entries"||e===Symbol.iterator&&o,c=e==="keys"&&o,h=i[e](...s),f=n?oc:t?oa:xt;return!t&&Ft(r,"iterate",c?rc:Ls),{next(){const{value:u,done:m}=h.next();return m?{value:u,done:m}:{value:l?[f(u[0]),f(u[1])]:f(u),done:m}},[Symbol.iterator](){return this}}}}function Po(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Kw(e,t){const n={get(i){const r=this.__v_raw,o=Pe(r),l=Pe(i);e||(Ut(i,l)&&Ft(o,"get",i),Ft(o,"get",l));const{has:c}=No(o),h=t?oc:e?oa:xt;if(c.call(o,i))return h(r.get(i));if(c.call(o,l))return h(r.get(l));r!==o&&r.get(i)},get size(){const i=this.__v_raw;return!e&&Ft(Pe(i),"iterate",Ls),i.size},has(i){const r=this.__v_raw,o=Pe(r),l=Pe(i);return e||(Ut(i,l)&&Ft(o,"has",i),Ft(o,"has",l)),i===l?r.has(i):r.has(i)||r.has(l)},forEach(i,r){const o=this,l=o.__v_raw,c=Pe(l),h=t?oc:e?oa:xt;return!e&&Ft(c,"iterate",Ls),l.forEach((f,u)=>i.call(r,h(f),h(u),o))}};return Me(n,e?{add:Po("add"),set:Po("set"),delete:Po("delete"),clear:Po("clear")}:{add(i){!t&&!Yt(i)&&!An(i)&&(i=Pe(i));const r=Pe(this);return No(r).has.call(r,i)||(r.add(i),Hn(r,"add",i,i)),this},set(i,r){!t&&!Yt(r)&&!An(r)&&(r=Pe(r));const o=Pe(this),{has:l,get:c}=No(o);let h=l.call(o,i);h||(i=Pe(i),h=l.call(o,i));const f=c.call(o,i);return o.set(i,r),h?Ut(r,f)&&Hn(o,"set",i,r):Hn(o,"add",i,r),this},delete(i){const r=Pe(this),{has:o,get:l}=No(r);let c=o.call(r,i);c||(i=Pe(i),c=o.call(r,i)),l&&l.call(r,i);const h=r.delete(i);return c&&Hn(r,"delete",i,void 0),h},clear(){const i=Pe(this),r=i.size!==0,o=i.clear();return r&&Hn(i,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(i=>{n[i]=zw(i,e,t)}),n}function La(e,t){const n=Kw(e,t);return(s,i,r)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?s:Reflect.get($e(n,i)&&i in s?n:s,i,r)}const Jw={get:La(!1,!1)},Gw={get:La(!1,!0)},Qw={get:La(!0,!1)},Yw={get:La(!0,!0)},Bh=new WeakMap,jh=new WeakMap,Hh=new WeakMap,Uh=new WeakMap;function Xw(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Zw(e){return e.__v_skip||!Object.isExtensible(e)?0:Xw(hw(e))}function Br(e){return An(e)?e:Fa(e,!1,Uw,Jw,Bh)}function Xc(e){return Fa(e,!1,Ww,Gw,jh)}function Cr(e){return Fa(e,!0,Vw,Qw,Hh)}function Vh(e){return Fa(e,!0,qw,Yw,Uh)}function Fa(e,t,n,s,i){if(!je(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=Zw(e);if(r===0)return e;const o=i.get(e);if(o)return o;const l=new Proxy(e,r===2?s:n);return i.set(e,l),l}function Wn(e){return An(e)?Wn(e.__v_raw):!!(e&&e.__v_isReactive)}function An(e){return!!(e&&e.__v_isReadonly)}function Yt(e){return!!(e&&e.__v_isShallow)}function jr(e){return e?!!e.__v_raw:!1}function Pe(e){const t=e&&e.__v_raw;return t?Pe(t):e}function Zc(e){return!$e(e,"__v_skip")&&Object.isExtensible(e)&&yh(e,"__v_skip",!0),e}const xt=e=>je(e)?Br(e):e,oa=e=>je(e)?Cr(e):e;function pt(e){return e?e.__v_isRef===!0:!1}function de(e){return Wh(e,!1)}function eu(e){return Wh(e,!0)}function Wh(e,t){return pt(e)?e:new eb(e,t)}class eb{constructor(t,n){this.dep=new Na,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Pe(t),this._value=n?t:xt(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||Yt(t)||An(t);t=s?t:Pe(t),Ut(t,n)&&(this._rawValue=t,this._value=s?t:xt(t),this.dep.trigger())}}function qh(e){e.dep&&e.dep.trigger()}function Hr(e){return pt(e)?e.value:e}function zh(e){return be(e)?e():Hr(e)}const tb={get:(e,t,n)=>t==="__v_raw"?e:Hr(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const i=e[t];return pt(i)&&!pt(n)?(i.value=n,!0):Reflect.set(e,t,n,s)}};function Da(e){return Wn(e)?e:new Proxy(e,tb)}class nb{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new Na,{get:s,set:i}=t(n.track.bind(n),n.trigger.bind(n));this._get=s,this._set=i}get value(){return this._value=this._get()}set value(t){this._set(t)}}function tu(e){return new nb(e)}function Kh(e){const t=se(e)?new Array(e.length):{};for(const n in e)t[n]=Gh(e,n);return t}class sb{constructor(t,n,s){this._object=t,this._key=n,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return Dw(Pe(this._object),this._key)}}class ib{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Jh(e,t,n){return pt(e)?e:be(e)?new ib(e):je(e)&&arguments.length>1?Gh(e,t,n):de(e)}function Gh(e,t,n){const s=e[t];return pt(s)?s:new sb(e,t,n)}class rb{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Na(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=_r-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Ke!==this)return xh(this,!0),!0}get value(){const t=this.dep.track();return Mh(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function ob(e,t,n=!1){let s,i;return be(e)?s=e:(s=e.get,i=e.set),new rb(s,i,n)}const Qh={GET:"get",HAS:"has",ITERATE:"iterate"},Yh={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},Lo={},aa=new WeakMap;let as;function Xh(){return as}function nu(e,t=!1,n=as){if(n){let s=aa.get(n);s||aa.set(n,s=[]),s.push(e)}}function ab(e,t,n=Ne){const{immediate:s,deep:i,once:r,scheduler:o,augmentJob:l,call:c}=n,h=_=>i?_:Yt(_)||i===!1||i===0?Un(_,1):Un(_);let f,u,m,v,w=!1,b=!1;if(pt(e)?(u=()=>e.value,w=Yt(e)):Wn(e)?(u=()=>h(e),w=!0):se(e)?(b=!0,w=e.some(_=>Wn(_)||Yt(_)),u=()=>e.map(_=>{if(pt(_))return _.value;if(Wn(_))return h(_);if(be(_))return c?c(_,2):_()})):be(e)?t?u=c?()=>c(e,2):e:u=()=>{if(m){Jn();try{m()}finally{Gn()}}const _=as;as=f;try{return c?c(e,3,[v]):e(v)}finally{as=_}}:u=Mt,t&&i){const _=u,x=i===!0?1/0:i;u=()=>Un(_(),x)}const H=Jc(),P=()=>{f.stop(),H&&H.active&&Wc(H.effects,f)};if(r&&t){const _=t;t=(...x)=>{_(...x),P()}}let M=b?new Array(e.length).fill(Lo):Lo;const S=_=>{if(!(!(f.flags&1)||!f.dirty&&!_))if(t){const x=f.run();if(i||w||(b?x.some((C,V)=>Ut(C,M[V])):Ut(x,M))){m&&m();const C=as;as=f;try{const V=[x,M===Lo?void 0:b&&M[0]===Lo?[]:M,v];M=x,c?c(t,3,V):t(...V)}finally{as=C}}}else f.run()};return l&&l(S),f=new _i(u),f.scheduler=o?()=>o(S,!1):S,v=_=>nu(_,!1,f),m=f.onStop=()=>{const _=aa.get(f);if(_){if(c)c(_,4);else for(const x of _)x();aa.delete(f)}},t?s?S(!0):M=f.run():o?o(S.bind(null,!0),!0):f.run(),P.pause=f.pause.bind(f),P.resume=f.resume.bind(f),P.stop=P,P}function Un(e,t=1/0,n){if(t<=0||!je(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,pt(e))Un(e.value,t,n);else if(se(e))for(let s=0;s<e.length;s++)Un(e[s],t,n);else if(Ws(e)||vi(e))e.forEach(s=>{Un(s,t,n)});else if(Ra(e)){for(const s in e)Un(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Un(e[s],t,n)}return e}/**
* @vue/runtime-core v3.5.22
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const Zh=[];function lb(e){Zh.push(e)}function cb(){Zh.pop()}function ep(e,t){}const tp={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},ub={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function qs(e,t,n,s){try{return s?e(...s):e()}catch(i){ys(i,t,n)}}function on(e,t,n,s){if(be(e)){const i=qs(e,t,n,s);return i&&qc(i)&&i.catch(r=>{ys(r,t,n)}),i}if(se(e)){const i=[];for(let r=0;r<e.length;r++)i.push(on(e[r],t,n,s));return i}}function ys(e,t,n,s=!0){const i=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||Ne;if(t){let l=t.parent;const c=t.proxy,h=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){const f=l.ec;if(f){for(let u=0;u<f.length;u++)if(f[u](e,c,h)===!1)return}l=l.parent}if(r){Jn(),qs(r,null,10,[e,c,h]),Gn();return}}fb(e,n,i,s,o)}function fb(e,t,n,s=!0,i=!1){if(i)throw e;console.error(e)}const Vt=[];let xn=-1;const Si=[];let ls=null,di=0;const np=Promise.resolve();let la=null;function Ss(e){const t=la||np;return e?t.then(this?e.bind(this):e):t}function db(e){let t=xn+1,n=Vt.length;for(;t<n;){const s=t+n>>>1,i=Vt[s],r=kr(i);r<e||r===e&&i.flags&2?t=s+1:n=s}return t}function su(e){if(!(e.flags&1)){const t=kr(e),n=Vt[Vt.length-1];!n||!(e.flags&2)&&t>=kr(n)?Vt.push(e):Vt.splice(db(t),0,e),e.flags|=1,sp()}}function sp(){la||(la=np.then(ip))}function Ei(e){se(e)?Si.push(...e):ls&&e.id===-1?ls.splice(di+1,0,e):e.flags&1||(Si.push(e),e.flags|=1),sp()}function pd(e,t,n=xn+1){for(;n<Vt.length;n++){const s=Vt[n];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;Vt.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function ca(e){if(Si.length){const t=[...new Set(Si)].sort((n,s)=>kr(n)-kr(s));if(Si.length=0,ls){ls.push(...t);return}for(ls=t,di=0;di<ls.length;di++){const n=ls[di];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}ls=null,di=0}}const kr=e=>e.id==null?e.flags&2?-1:1/0:e.id;function ip(e){try{for(xn=0;xn<Vt.length;xn++){const t=Vt[xn];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),qs(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;xn<Vt.length;xn++){const t=Vt[xn];t&&(t.flags&=-2)}xn=-1,Vt.length=0,ca(),la=null,(Vt.length||Si.length)&&ip()}}let hi,Fo=[];function rp(e,t){var n,s;hi=e,hi?(hi.enabled=!0,Fo.forEach(({event:i,args:r})=>hi.emit(i,...r)),Fo=[]):typeof window<"u"&&window.HTMLElement&&!((s=(n=window.navigator)==null?void 0:n.userAgent)!=null&&s.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(r=>{rp(r,t)}),setTimeout(()=>{hi||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Fo=[])},3e3)):Fo=[]}let At=null,$a=null;function xr(e){const t=At;return At=e,$a=e&&e.type.__scopeId||null,t}function op(e){$a=e}function ap(){$a=null}const lp=e=>Ba;function Ba(e,t=At,n){if(!t||e._n)return e;const s=(...i)=>{s._d&&ki(-1);const r=xr(t);let o;try{o=e(...i)}finally{xr(r),s._d&&ki(1)}return o};return s._n=!0,s._c=!0,s._d=!0,s}function cp(e,t){if(At===null)return e;const n=Jr(At),s=e.dirs||(e.dirs=[]);for(let i=0;i<t.length;i++){let[r,o,l,c=Ne]=t[i];r&&(be(r)&&(r={mounted:r,updated:r}),r.deep&&Un(o),s.push({dir:r,instance:n,value:o,oldValue:void 0,arg:l,modifiers:c}))}return e}function Rn(e,t,n,s){const i=e.dirs,r=t&&t.dirs;for(let o=0;o<i.length;o++){const l=i[o];r&&(l.oldValue=r[o].value);let c=l.dir[s];c&&(Jn(),on(c,n,8,[e.el,l,e,t]),Gn())}}const up=Symbol("_vte"),fp=e=>e.__isTeleport,yr=e=>e&&(e.disabled||e.disabled===""),md=e=>e&&(e.defer||e.defer===""),gd=e=>typeof SVGElement<"u"&&e instanceof SVGElement,vd=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,ac=(e,t)=>{const n=e&&e.to;return Ee(n)?t?t(n):null:n},dp={name:"Teleport",__isTeleport:!0,process(e,t,n,s,i,r,o,l,c,h){const{mc:f,pc:u,pbc:m,o:{insert:v,querySelector:w,createText:b,createComment:H}}=h,P=yr(t.props);let{shapeFlag:M,children:S,dynamicChildren:_}=t;if(e==null){const x=t.el=b(""),C=t.anchor=b("");v(x,n,s),v(C,n,s);const V=(R,N)=>{M&16&&f(S,R,N,i,r,o,l,c)},F=()=>{const R=t.target=ac(t.props,w),N=pp(R,t,b,v);R&&(o!=="svg"&&gd(R)?o="svg":o!=="mathml"&&vd(R)&&(o="mathml"),i&&i.isCE&&(i.ce._teleportTargets||(i.ce._teleportTargets=new Set)).add(R),P||(V(R,N),zo(t,!1)))};P&&(V(n,C),zo(t,!0)),md(t.props)?(t.el.__isMounted=!1,St(()=>{F(),delete t.el.__isMounted},r)):F()}else{if(md(t.props)&&e.el.__isMounted===!1){St(()=>{dp.process(e,t,n,s,i,r,o,l,c,h)},r);return}t.el=e.el,t.targetStart=e.targetStart;const x=t.anchor=e.anchor,C=t.target=e.target,V=t.targetAnchor=e.targetAnchor,F=yr(e.props),R=F?n:C,N=F?x:V;if(o==="svg"||gd(C)?o="svg":(o==="mathml"||vd(C))&&(o="mathml"),_?(m(e.dynamicChildren,_,R,i,r,o,l),Tu(e,t,!0)):c||u(e,t,R,N,i,r,o,l,!1),P)F?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Do(t,n,x,h,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const B=t.target=ac(t.props,w);B&&Do(t,B,null,h,0)}else F&&Do(t,C,V,h,1);zo(t,P)}},remove(e,t,n,{um:s,o:{remove:i}},r){const{shapeFlag:o,children:l,anchor:c,targetStart:h,targetAnchor:f,target:u,props:m}=e;if(u&&(i(h),i(f)),r&&i(c),o&16){const v=r||!yr(m);for(let w=0;w<l.length;w++){const b=l[w];s(b,t,n,v,!!b.dynamicChildren)}}},move:Do,hydrate:hb};function Do(e,t,n,{o:{insert:s},m:i},r=2){r===0&&s(e.targetAnchor,t,n);const{el:o,anchor:l,shapeFlag:c,children:h,props:f}=e,u=r===2;if(u&&s(o,t,n),(!u||yr(f))&&c&16)for(let m=0;m<h.length;m++)i(h[m],t,n,2);u&&s(l,t,n)}function hb(e,t,n,s,i,r,{o:{nextSibling:o,parentNode:l,querySelector:c,insert:h,createText:f}},u){function m(b,H,P,M){H.anchor=u(o(b),H,l(b),n,s,i,r),H.targetStart=P,H.targetAnchor=M}const v=t.target=ac(t.props,c),w=yr(t.props);if(v){const b=v._lpa||v.firstChild;if(t.shapeFlag&16)if(w)m(e,t,b,b&&o(b));else{t.anchor=o(e);let H=b;for(;H;){if(H&&H.nodeType===8){if(H.data==="teleport start anchor")t.targetStart=H;else if(H.data==="teleport anchor"){t.targetAnchor=H,v._lpa=t.targetAnchor&&o(t.targetAnchor);break}}H=o(H)}t.targetAnchor||pp(v,t,f,h),u(b&&o(b),t,v,n,s,i,r)}zo(t,w)}else w&&t.shapeFlag&16&&m(e,t,e,o(e));return t.anchor&&o(t.anchor)}const hp=dp;function zo(e,t){const n=e.ctx;if(n&&n.ut){let s,i;for(t?(s=e.el,i=e.anchor):(s=e.targetStart,i=e.targetAnchor);s&&s!==i;)s.nodeType===1&&s.setAttribute("data-v-owner",n.uid),s=s.nextSibling;n.ut()}}function pp(e,t,n,s){const i=t.targetStart=n(""),r=t.targetAnchor=n("");return i[up]=r,e&&(s(i,e),s(r,e)),r}const jn=Symbol("_leaveCb"),$o=Symbol("_enterCb");function ja(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return $i(()=>{e.isMounted=!0}),qr(()=>{e.isUnmounting=!0}),e}const fn=[Function,Array],Ha={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:fn,onEnter:fn,onAfterEnter:fn,onEnterCancelled:fn,onBeforeLeave:fn,onLeave:fn,onAfterLeave:fn,onLeaveCancelled:fn,onBeforeAppear:fn,onAppear:fn,onAfterAppear:fn,onAppearCancelled:fn},mp=e=>{const t=e.subTree;return t.component?mp(t.component):t},pb={name:"BaseTransition",props:Ha,setup(e,{slots:t}){const n=Wt(),s=ja();return()=>{const i=t.default&&Ur(t.default(),!0);if(!i||!i.length)return;const r=gp(i),o=Pe(e),{mode:l}=o;if(s.isLeaving)return ql(r);const c=yd(r);if(!c)return ql(r);let h=Bs(c,o,s,n,u=>h=u);c.type!==at&&Mn(c,h);let f=n.subTree&&yd(n.subTree);if(f&&f.type!==at&&!Sn(f,c)&&mp(n).type!==at){let u=Bs(f,o,s,n);if(Mn(f,u),l==="out-in"&&c.type!==at)return s.isLeaving=!0,u.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete u.afterLeave,f=void 0},ql(r);l==="in-out"&&c.type!==at?u.delayLeave=(m,v,w)=>{const b=vp(s,f);b[String(f.key)]=f,m[jn]=()=>{v(),m[jn]=void 0,delete h.delayedLeave,f=void 0},h.delayedLeave=()=>{w(),delete h.delayedLeave,f=void 0}}:f=void 0}else f&&(f=void 0);return r}}};function gp(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==at){t=n;break}}return t}const iu=pb;function vp(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 Bs(e,t,n,s,i){const{appear:r,mode:o,persisted:l=!1,onBeforeEnter:c,onEnter:h,onAfterEnter:f,onEnterCancelled:u,onBeforeLeave:m,onLeave:v,onAfterLeave:w,onLeaveCancelled:b,onBeforeAppear:H,onAppear:P,onAfterAppear:M,onAppearCancelled:S}=t,_=String(e.key),x=vp(n,e),C=(R,N)=>{R&&on(R,s,9,N)},V=(R,N)=>{const B=N[1];C(R,N),se(R)?R.every(A=>A.length<=1)&&B():R.length<=1&&B()},F={mode:o,persisted:l,beforeEnter(R){let N=c;if(!n.isMounted)if(r)N=H||c;else return;R[jn]&&R[jn](!0);const B=x[_];B&&Sn(e,B)&&B.el[jn]&&B.el[jn](),C(N,[R])},enter(R){let N=h,B=f,A=u;if(!n.isMounted)if(r)N=P||h,B=M||f,A=S||u;else return;let K=!1;const re=R[$o]=oe=>{K||(K=!0,oe?C(A,[R]):C(B,[R]),F.delayedLeave&&F.delayedLeave(),R[$o]=void 0)};N?V(N,[R,re]):re()},leave(R,N){const B=String(e.key);if(R[$o]&&R[$o](!0),n.isUnmounting)return N();C(m,[R]);let A=!1;const K=R[jn]=re=>{A||(A=!0,N(),re?C(b,[R]):C(w,[R]),R[jn]=void 0,x[B]===e&&delete x[B])};x[B]=e,v?V(v,[R,K]):K()},clone(R){const N=Bs(R,t,n,s,i);return i&&i(N),N}};return F}function ql(e){if(Vr(e))return e=_n(e),e.children=null,e}function yd(e){if(!Vr(e))return fp(e.type)&&e.children?gp(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&&be(n.default))return n.default()}}function Mn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Mn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Ur(e,t=!1,n){let s=[],i=0;for(let r=0;r<e.length;r++){let o=e[r];const l=n==null?o.key:String(n)+String(o.key!=null?o.key:r);o.type===wt?(o.patchFlag&128&&i++,s=s.concat(Ur(o.children,t,l))):(t||o.type!==at)&&s.push(l!=null?_n(o,{key:l}):o)}if(i>1)for(let r=0;r<s.length;r++)s[r].patchFlag=-2;return s}function Ua(e,t){return be(e)?Me({name:e.name},t,{setup:e}):e}function yp(){const e=Wt();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function ru(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Sp(e){const t=Wt(),n=eu(null);if(t){const i=t.refs===Ne?t.refs={}:t.refs;Object.defineProperty(i,e,{enumerable:!0,get:()=>n.value,set:r=>n.value=r})}return n}const ua=new WeakMap;function wi(e,t,n,s,i=!1){if(se(e)){e.forEach((w,b)=>wi(w,t&&(se(t)?t[b]:t),n,s,i));return}if(ds(s)&&!i){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&wi(e,t,n,s.component.subTree);return}const r=s.shapeFlag&4?Jr(s.component):s.el,o=i?null:r,{i:l,r:c}=e,h=t&&t.r,f=l.refs===Ne?l.refs={}:l.refs,u=l.setupState,m=Pe(u),v=u===Ne?pi:w=>$e(m,w);if(h!=null&&h!==c){if(Sd(t),Ee(h))f[h]=null,v(h)&&(u[h]=null);else if(pt(h)){h.value=null;const w=t;w.k&&(f[w.k]=null)}}if(be(c))qs(c,l,12,[o,f]);else{const w=Ee(c),b=pt(c);if(w||b){const H=()=>{if(e.f){const P=w?v(c)?u[c]:f[c]:c.value;if(i)se(P)&&Wc(P,r);else if(se(P))P.includes(r)||P.push(r);else if(w)f[c]=[r],v(c)&&(u[c]=f[c]);else{const M=[r];c.value=M,e.k&&(f[e.k]=M)}}else w?(f[c]=o,v(c)&&(u[c]=o)):b&&(c.value=o,e.k&&(f[e.k]=o))};if(o){const P=()=>{H(),ua.delete(e)};P.id=-1,ua.set(e,P),St(P,n)}else Sd(e),H()}}}function Sd(e){const t=ua.get(e);t&&(t.flags|=8,ua.delete(e))}let wd=!1;const ci=()=>{wd||(console.error("Hydration completed but contains mismatches."),wd=!0)},mb=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",gb=e=>e.namespaceURI.includes("MathML"),Bo=e=>{if(e.nodeType===1){if(mb(e))return"svg";if(gb(e))return"mathml"}},mi=e=>e.nodeType===8;function vb(e){const{mt:t,p:n,o:{patchProp:s,createText:i,nextSibling:r,parentNode:o,remove:l,insert:c,createComment:h}}=e,f=(S,_)=>{if(!_.hasChildNodes()){n(null,S,_),ca(),_._vnode=S;return}u(_.firstChild,S,null,null,null),ca(),_._vnode=S},u=(S,_,x,C,V,F=!1)=>{F=F||!!_.dynamicChildren;const R=mi(S)&&S.data==="[",N=()=>b(S,_,x,C,V,R),{type:B,ref:A,shapeFlag:K,patchFlag:re}=_;let oe=S.nodeType;_.el=S,re===-2&&(F=!1,_.dynamicChildren=null);let J=null;switch(B){case qn:oe!==3?_.children===""?(c(_.el=i(""),o(S),S),J=S):J=N():(S.data!==_.children&&(ci(),S.data=_.children),J=r(S));break;case at:M(S)?(J=r(S),P(_.el=S.content.firstChild,S,x)):oe!==8||R?J=N():J=r(S);break;case hs:if(R&&(S=r(S),oe=S.nodeType),oe===1||oe===3){J=S;const fe=!_.children.length;for(let Z=0;Z<_.staticCount;Z++)fe&&(_.children+=J.nodeType===1?J.outerHTML:J.data),Z===_.staticCount-1&&(_.anchor=J),J=r(J);return R?r(J):J}else N();break;case wt:R?J=w(S,_,x,C,V,F):J=N();break;default:if(K&1)(oe!==1||_.type.toLowerCase()!==S.tagName.toLowerCase())&&!M(S)?J=N():J=m(S,_,x,C,V,F);else if(K&6){_.slotScopeIds=V;const fe=o(S);if(R?J=H(S):mi(S)&&S.data==="teleport start"?J=H(S,S.data,"teleport end"):J=r(S),t(_,fe,null,x,C,Bo(fe),F),ds(_)&&!_.type.__asyncResolved){let Z;R?(Z=Je(wt),Z.anchor=J?J.previousSibling:fe.lastChild):Z=S.nodeType===3?Ja(""):Je("div"),Z.el=S,_.component.subTree=Z}}else K&64?oe!==8?J=N():J=_.type.hydrate(S,_,x,C,V,F,e,v):K&128&&(J=_.type.hydrate(S,_,x,C,Bo(o(S)),V,F,e,u))}return A!=null&&wi(A,null,C,_),J},m=(S,_,x,C,V,F)=>{F=F||!!_.dynamicChildren;const{type:R,props:N,patchFlag:B,shapeFlag:A,dirs:K,transition:re}=_,oe=R==="input"||R==="option";if(oe||B!==-1){K&&Rn(_,null,x,"created");let J=!1;if(M(S)){J=am(null,re)&&x&&x.vnode.props&&x.vnode.props.appear;const Z=S.content.firstChild;if(J){const Ae=Z.getAttribute("class");Ae&&(Z.$cls=Ae),re.beforeEnter(Z)}P(Z,S,x),_.el=S=Z}if(A&16&&!(N&&(N.innerHTML||N.textContent))){let Z=v(S.firstChild,_,S,x,C,V,F);for(;Z;){jo(S,1)||ci();const Ae=Z;Z=Z.nextSibling,l(Ae)}}else if(A&8){let Z=_.children;Z[0]===`
`&&(S.tagName==="PRE"||S.tagName==="TEXTAREA")&&(Z=Z.slice(1)),S.textContent!==Z&&(jo(S,0)||ci(),S.textContent=_.children)}if(N){if(oe||!F||B&48){const Z=S.tagName.includes("-");for(const Ae in N)(oe&&(Ae.endsWith("value")||Ae==="indeterminate")||Vs(Ae)&&!fs(Ae)||Ae[0]==="."||Z)&&s(S,Ae,null,N[Ae],void 0,x)}else if(N.onClick)s(S,"onClick",null,N.onClick,void 0,x);else if(B&4&&Wn(N.style))for(const Z in N.style)N.style[Z]}let fe;(fe=N&&N.onVnodeBeforeMount)&&Kt(fe,x,_),K&&Rn(_,null,x,"beforeMount"),((fe=N&&N.onVnodeMounted)||K||J)&&vm(()=>{fe&&Kt(fe,x,_),J&&re.enter(S),K&&Rn(_,null,x,"mounted")},C)}return S.nextSibling},v=(S,_,x,C,V,F,R)=>{R=R||!!_.dynamicChildren;const N=_.children,B=N.length;for(let A=0;A<B;A++){const K=R?N[A]:N[A]=Jt(N[A]),re=K.type===qn;S?(re&&!R&&A+1<B&&Jt(N[A+1]).type===qn&&(c(i(S.data.slice(K.children.length)),x,r(S)),S.data=K.children),S=u(S,K,C,V,F,R)):re&&!K.children?c(K.el=i(""),x):(jo(x,1)||ci(),n(null,K,x,null,C,V,Bo(x),F))}return S},w=(S,_,x,C,V,F)=>{const{slotScopeIds:R}=_;R&&(V=V?V.concat(R):R);const N=o(S),B=v(r(S),_,N,x,C,V,F);return B&&mi(B)&&B.data==="]"?r(_.anchor=B):(ci(),c(_.anchor=h("]"),N,B),B)},b=(S,_,x,C,V,F)=>{if(jo(S.parentElement,1)||ci(),_.el=null,F){const B=H(S);for(;;){const A=r(S);if(A&&A!==B)l(A);else break}}const R=r(S),N=o(S);return l(S),n(null,_,N,R,x,C,Bo(N),V),x&&(x.vnode.el=_.el,za(x,_.el)),R},H=(S,_="[",x="]")=>{let C=0;for(;S;)if(S=r(S),S&&mi(S)&&(S.data===_&&C++,S.data===x)){if(C===0)return r(S);C--}return S},P=(S,_,x)=>{const C=_.parentNode;C&&C.replaceChild(S,_);let V=x;for(;V;)V.vnode.el===_&&(V.vnode.el=V.subTree.el=S),V=V.parent},M=S=>S.nodeType===1&&S.tagName==="TEMPLATE";return[f,u]}const bd="data-allow-mismatch",yb={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function jo(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(bd);)e=e.parentElement;const n=e&&e.getAttribute(bd);if(n==null)return!1;if(n==="")return!0;{const s=n.split(",");return t===0&&s.includes("children")?!0:s.includes(yb[t])}}const Sb=Ma().requestIdleCallback||(e=>setTimeout(e,1)),wb=Ma().cancelIdleCallback||(e=>clearTimeout(e)),wp=(e=1e4)=>t=>{const n=Sb(t,{timeout:e});return()=>wb(n)};function bb(e){const{top:t,left:n,bottom:s,right:i}=e.getBoundingClientRect(),{innerHeight:r,innerWidth:o}=window;return(t>0&&t<r||s>0&&s<r)&&(n>0&&n<o||i>0&&i<o)}const bp=e=>(t,n)=>{const s=new IntersectionObserver(i=>{for(const r of i)if(r.isIntersecting){s.disconnect(),t();break}},e);return n(i=>{if(i instanceof Element){if(bb(i))return t(),s.disconnect(),!1;s.observe(i)}}),()=>s.disconnect()},Tp=e=>t=>{if(e){const n=matchMedia(e);if(n.matches)t();else return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t)}},_p=(e=[])=>(t,n)=>{Ee(e)&&(e=[e]);let s=!1;const i=o=>{s||(s=!0,r(),t(),o.target.dispatchEvent(new o.constructor(o.type,o)))},r=()=>{n(o=>{for(const l of e)o.removeEventListener(l,i)})};return n(o=>{for(const l of e)o.addEventListener(l,i,{once:!0})}),r};function Tb(e,t){if(mi(e)&&e.data==="["){let n=1,s=e.nextSibling;for(;s;){if(s.nodeType===1){if(t(s)===!1)break}else if(mi(s))if(s.data==="]"){if(--n===0)break}else s.data==="["&&n++;s=s.nextSibling}}else t(e)}const ds=e=>!!e.type.__asyncLoader;function Ep(e){be(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:s,delay:i=200,hydrate:r,timeout:o,suspensible:l=!0,onError:c}=e;let h=null,f,u=0;const m=()=>(u++,h=null,v()),v=()=>{let w;return h||(w=h=t().catch(b=>{if(b=b instanceof Error?b:new Error(String(b)),c)return new Promise((H,P)=>{c(b,()=>H(m()),()=>P(b),u+1)});throw b}).then(b=>w!==h&&h?h:(b&&(b.__esModule||b[Symbol.toStringTag]==="Module")&&(b=b.default),f=b,b)))};return Ua({name:"AsyncComponentWrapper",__asyncLoader:v,__asyncHydrate(w,b,H){let P=!1;(b.bu||(b.bu=[])).push(()=>P=!0);const M=()=>{P||H()},S=r?()=>{const _=r(M,x=>Tb(w,x));_&&(b.bum||(b.bum=[])).push(_)}:M;f?S():v().then(()=>!b.isUnmounted&&S())},get __asyncResolved(){return f},setup(){const w=Rt;if(ru(w),f)return()=>zl(f,w);const b=S=>{h=null,ys(S,w,13,!s)};if(l&&w.suspense||xi)return v().then(S=>()=>zl(S,w)).catch(S=>(b(S),()=>s?Je(s,{error:S}):null));const H=de(!1),P=de(),M=de(!!i);return i&&setTimeout(()=>{M.value=!1},i),o!=null&&setTimeout(()=>{if(!H.value&&!P.value){const S=new Error(`Async component timed out after ${o}ms.`);b(S),P.value=S}},o),v().then(()=>{H.value=!0,w.parent&&Vr(w.parent.vnode)&&w.parent.update()}).catch(S=>{b(S),P.value=S}),()=>{if(H.value&&f)return zl(f,w);if(P.value&&s)return Je(s,{error:P.value});if(n&&!M.value)return Je(n)}}})}function zl(e,t){const{ref:n,props:s,children:i,ce:r}=t.vnode,o=Je(e,s,i);return o.ref=n,o.ce=r,delete t.vnode.ce,o}const Vr=e=>e.type.__isKeepAlive,_b={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Wt(),s=n.ctx;if(!s.renderer)return()=>{const M=t.default&&t.default();return M&&M.length===1?M[0]:M};const i=new Map,r=new Set;let o=null;const l=n.suspense,{renderer:{p:c,m:h,um:f,o:{createElement:u}}}=s,m=u("div");s.activate=(M,S,_,x,C)=>{const V=M.component;h(M,S,_,0,l),c(V.vnode,M,S,_,V,l,x,M.slotScopeIds,C),St(()=>{V.isDeactivated=!1,V.a&&yi(V.a);const F=M.props&&M.props.onVnodeMounted;F&&Kt(F,V.parent,M)},l)},s.deactivate=M=>{const S=M.component;da(S.m),da(S.a),h(M,m,null,1,l),St(()=>{S.da&&yi(S.da);const _=M.props&&M.props.onVnodeUnmounted;_&&Kt(_,S.parent,M),S.isDeactivated=!0},l)};function v(M){Kl(M),f(M,n,l,!0)}function w(M){i.forEach((S,_)=>{const x=yc(S.type);x&&!M(x)&&b(_)})}function b(M){const S=i.get(M);S&&(!o||!Sn(S,o))?v(S):o&&Kl(o),i.delete(M),r.delete(M)}wn(()=>[e.include,e.exclude],([M,S])=>{M&&w(_=>ur(M,_)),S&&w(_=>!ur(S,_))},{flush:"post",deep:!0});let H=null;const P=()=>{H!=null&&(ha(n.subTree.type)?St(()=>{i.set(H,Ho(n.subTree))},n.subTree.suspense):i.set(H,Ho(n.subTree)))};return $i(P),Wr(P),qr(()=>{i.forEach(M=>{const{subTree:S,suspense:_}=n,x=Ho(S);if(M.type===x.type&&M.key===x.key){Kl(x);const C=x.component.da;C&&St(C,_);return}v(M)})}),()=>{if(H=null,!t.default)return o=null;const M=t.default(),S=M[0];if(M.length>1)return o=null,M;if(!On(S)||!(S.shapeFlag&4)&&!(S.shapeFlag&128))return o=null,S;let _=Ho(S);if(_.type===at)return o=null,_;const x=_.type,C=yc(ds(_)?_.type.__asyncResolved||{}:x),{include:V,exclude:F,max:R}=e;if(V&&(!C||!ur(V,C))||F&&C&&ur(F,C))return _.shapeFlag&=-257,o=_,S;const N=_.key==null?x:_.key,B=i.get(N);return _.el&&(_=_n(_),S.shapeFlag&128&&(S.ssContent=_)),H=N,B?(_.el=B.el,_.component=B.component,_.transition&&Mn(_,_.transition),_.shapeFlag|=512,r.delete(N),r.add(N)):(r.add(N),R&&r.size>parseInt(R,10)&&b(r.values().next().value)),_.shapeFlag|=256,o=_,ha(S.type)?S:_}}},Cp=_b;function ur(e,t){return se(e)?e.some(n=>ur(n,t)):Ee(e)?e.split(",").includes(t):dw(e)?(e.lastIndex=0,e.test(t)):!1}function ou(e,t){kp(e,"a",t)}function au(e,t){kp(e,"da",t)}function kp(e,t,n=Rt){const s=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Va(t,s,n),n){let i=n.parent;for(;i&&i.parent;)Vr(i.parent.vnode)&&Eb(s,t,n,i),i=i.parent}}function Eb(e,t,n,s){const i=Va(t,e,s,!0);zr(()=>{Wc(s[t],i)},n)}function Kl(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Ho(e){return e.shapeFlag&128?e.ssContent:e}function Va(e,t,n=Rt,s=!1){if(n){const i=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...o)=>{Jn();const l=Hs(n),c=on(t,n,e,o);return l(),Gn(),c});return s?i.unshift(r):i.push(r),r}}const Qn=e=>(t,n=Rt)=>{(!xi||e==="sp")&&Va(e,(...s)=>t(...s),n)},lu=Qn("bm"),$i=Qn("m"),Wa=Qn("bu"),Wr=Qn("u"),qr=Qn("bum"),zr=Qn("um"),cu=Qn("sp"),uu=Qn("rtg"),fu=Qn("rtc");function du(e,t=Rt){Va("ec",e,t)}const hu="components",Cb="directives";function xp(e,t){return pu(hu,e,!0,t)||e}const Rp=Symbol.for("v-ndc");function Ap(e){return Ee(e)?pu(hu,e,!1)||e:e||Rp}function Mp(e){return pu(Cb,e)}function pu(e,t,n=!0,s=!1){const i=At||Rt;if(i){const r=i.type;if(e===hu){const l=yc(r,!1);if(l&&(l===t||l===Ge(t)||l===vs(Ge(t))))return r}const o=Td(i[e]||r[e],t)||Td(i.appContext[e],t);return!o&&s?r:o}}function Td(e,t){return e&&(e[t]||e[Ge(t)]||e[vs(Ge(t))])}function Op(e,t,n,s){let i;const r=n&&n[s],o=se(e);if(o||Ee(e)){const l=o&&Wn(e);let c=!1,h=!1;l&&(c=!Yt(e),h=An(e),e=Pa(e)),i=new Array(e.length);for(let f=0,u=e.length;f<u;f++)i[f]=t(c?h?oa(xt(e[f])):xt(e[f]):e[f],f,void 0,r&&r[f])}else if(typeof e=="number"){i=new Array(e);for(let l=0;l<e;l++)i[l]=t(l+1,l,void 0,r&&r[l])}else if(je(e))if(e[Symbol.iterator])i=Array.from(e,(l,c)=>t(l,c,void 0,r&&r[c]));else{const l=Object.keys(e);i=new Array(l.length);for(let c=0,h=l.length;c<h;c++){const f=l[c];i[c]=t(e[f],f,c,r&&r[c])}}else i=[];return n&&(n[s]=i),i}function Ip(e,t){for(let n=0;n<t.length;n++){const s=t[n];if(se(s))for(let i=0;i<s.length;i++)e[s[i].name]=s[i].fn;else s&&(e[s.name]=s.key?(...i)=>{const r=s.fn(...i);return r&&(r.key=s.key),r}:s.fn)}return e}function Np(e,t,n={},s,i){if(At.ce||At.parent&&ds(At.parent)&&At.parent.ce){const h=Object.keys(n).length>0;return t!=="default"&&(n.name=t),Ci(),Mr(wt,null,[Je("slot",n,s&&s())],h?-2:64)}let r=e[t];r&&r._c&&(r._d=!1),Ci();const o=r&&mu(r(n)),l=n.key||o&&o.key,c=Mr(wt,{key:(l&&!Xt(l)?l:`_${t}`)+(!o&&s?"_fb":"")},o||(s?s():[]),o&&e._===1?64:-2);return!i&&c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),r&&r._c&&(r._d=!0),c}function mu(e){return e.some(t=>On(t)?!(t.type===at||t.type===wt&&!mu(t.children)):!0)?e:null}function Pp(e,t){const n={};for(const s in e)n[t&&/[A-Z]/.test(s)?`on:${s}`:Ps(s)]=e[s];return n}const lc=e=>e?km(e)?Jr(e):lc(e.parent):null,Sr=Me(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=>lc(e.parent),$root:e=>lc(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>gu(e),$forceUpdate:e=>e.f||(e.f=()=>{su(e.update)}),$nextTick:e=>e.n||(e.n=Ss.bind(e.proxy)),$watch:e=>Hb.bind(e)}),Jl=(e,t)=>e!==Ne&&!e.__isScriptSetup&&$e(e,t),cc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:i,props:r,accessCache:o,type:l,appContext:c}=e;let h;if(t[0]!=="$"){const v=o[t];if(v!==void 0)switch(v){case 1:return s[t];case 2:return i[t];case 4:return n[t];case 3:return r[t]}else{if(Jl(s,t))return o[t]=1,s[t];if(i!==Ne&&$e(i,t))return o[t]=2,i[t];if((h=e.propsOptions[0])&&$e(h,t))return o[t]=3,r[t];if(n!==Ne&&$e(n,t))return o[t]=4,n[t];uc&&(o[t]=0)}}const f=Sr[t];let u,m;if(f)return t==="$attrs"&&Ft(e.attrs,"get",""),f(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(n!==Ne&&$e(n,t))return o[t]=4,n[t];if(m=c.config.globalProperties,$e(m,t))return m[t]},set({_:e},t,n){const{data:s,setupState:i,ctx:r}=e;return Jl(i,t)?(i[t]=n,!0):s!==Ne&&$e(s,t)?(s[t]=n,!0):$e(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:i,propsOptions:r,type:o}},l){let c,h;return!!(n[l]||e!==Ne&&l[0]!=="$"&&$e(e,l)||Jl(t,l)||(c=r[0])&&$e(c,l)||$e(s,l)||$e(Sr,l)||$e(i.config.globalProperties,l)||(h=o.__cssModules)&&h[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:$e(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},kb=Me({},cc,{get(e,t){if(t!==Symbol.unscopables)return cc.get(e,t,e)},has(e,t){return t[0]!=="_"&&!Sw(t)}});function Lp(){return null}function Fp(){return null}function Dp(e){}function $p(e){}function Bp(){return null}function jp(){}function Hp(e,t){return null}function Up(){return Wp().slots}function Vp(){return Wp().attrs}function Wp(e){const t=Wt();return t.setupContext||(t.setupContext=Mm(t))}function Rr(e){return se(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function qp(e,t){const n=Rr(e);for(const s in t){if(s.startsWith("__skip"))continue;let i=n[s];i?se(i)||be(i)?i=n[s]={type:i,default:t[s]}:i.default=t[s]:i===null&&(i=n[s]={default:t[s]}),i&&t[`__skip_${s}`]&&(i.skipFactory=!0)}return n}function zp(e,t){return!e||!t?e||t:se(e)&&se(t)?e.concat(t):Me({},Rr(e),Rr(t))}function Kp(e,t){const n={};for(const s in e)t.includes(s)||Object.defineProperty(n,s,{enumerable:!0,get:()=>e[s]});return n}function Jp(e){const t=Wt();let n=e();return mc(),qc(n)&&(n=n.catch(s=>{throw Hs(t),s})),[n,()=>Hs(t)]}let uc=!0;function xb(e){const t=gu(e),n=e.proxy,s=e.ctx;uc=!1,t.beforeCreate&&_d(t.beforeCreate,e,"bc");const{data:i,computed:r,methods:o,watch:l,provide:c,inject:h,created:f,beforeMount:u,mounted:m,beforeUpdate:v,updated:w,activated:b,deactivated:H,beforeDestroy:P,beforeUnmount:M,destroyed:S,unmounted:_,render:x,renderTracked:C,renderTriggered:V,errorCaptured:F,serverPrefetch:R,expose:N,inheritAttrs:B,components:A,directives:K,filters:re}=t;if(h&&Rb(h,s,null),o)for(const fe in o){const Z=o[fe];be(Z)&&(s[fe]=Z.bind(n))}if(i){const fe=i.call(n,n);je(fe)&&(e.data=Br(fe))}if(uc=!0,r)for(const fe in r){const Z=r[fe],Ae=be(Z)?Z.bind(n,n):be(Z.get)?Z.get.bind(n,n):Mt,ft=!be(Z)&&be(Z.set)?Z.set.bind(n):Mt,_e=zn({get:Ae,set:ft});Object.defineProperty(s,fe,{enumerable:!0,configurable:!0,get:()=>_e.value,set:He=>_e.value=He})}if(l)for(const fe in l)Gp(l[fe],s,n,fe);if(c){const fe=be(c)?c.call(n):c;Reflect.ownKeys(fe).forEach(Z=>{vu(Z,fe[Z])})}f&&_d(f,e,"c");function J(fe,Z){se(Z)?Z.forEach(Ae=>fe(Ae.bind(n))):Z&&fe(Z.bind(n))}if(J(lu,u),J($i,m),J(Wa,v),J(Wr,w),J(ou,b),J(au,H),J(du,F),J(fu,C),J(uu,V),J(qr,M),J(zr,_),J(cu,R),se(N))if(N.length){const fe=e.exposed||(e.exposed={});N.forEach(Z=>{Object.defineProperty(fe,Z,{get:()=>n[Z],set:Ae=>n[Z]=Ae,enumerable:!0})})}else e.exposed||(e.exposed={});x&&e.render===Mt&&(e.render=x),B!=null&&(e.inheritAttrs=B),A&&(e.components=A),K&&(e.directives=K),R&&ru(e)}function Rb(e,t,n=Mt){se(e)&&(e=fc(e));for(const s in e){const i=e[s];let r;je(i)?"default"in i?r=bi(i.from||s,i.default,!0):r=bi(i.from||s):r=bi(i),pt(r)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>r.value,set:o=>r.value=o}):t[s]=r}}function _d(e,t,n){on(se(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Gp(e,t,n,s){let i=s.includes(".")?fm(n,s):()=>n[s];if(Ee(e)){const r=t[e];be(r)&&wn(i,r)}else if(be(e))wn(i,e.bind(n));else if(je(e))if(se(e))e.forEach(r=>Gp(r,t,n,s));else{const r=be(e.handler)?e.handler.bind(n):t[e.handler];be(r)&&wn(i,r,e)}}function gu(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:i,optionsCache:r,config:{optionMergeStrategies:o}}=e.appContext,l=r.get(t);let c;return l?c=l:!i.length&&!n&&!s?c=t:(c={},i.length&&i.forEach(h=>fa(c,h,o,!0)),fa(c,t,o)),je(t)&&r.set(t,c),c}function fa(e,t,n,s=!1){const{mixins:i,extends:r}=t;r&&fa(e,r,n,!0),i&&i.forEach(o=>fa(e,o,n,!0));for(const o in t)if(!(s&&o==="expose")){const l=Ab[o]||n&&n[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const Ab={data:Ed,props:Cd,emits:Cd,methods:fr,computed:fr,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:fr,directives:fr,watch:Ob,provide:Ed,inject:Mb};function Ed(e,t){return t?e?function(){return Me(be(e)?e.call(this,this):e,be(t)?t.call(this,this):t)}:t:e}function Mb(e,t){return fr(fc(e),fc(t))}function fc(e){if(se(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 fr(e,t){return e?Me(Object.create(null),e,t):t}function Cd(e,t){return e?se(e)&&se(t)?[...new Set([...e,...t])]:Me(Object.create(null),Rr(e),Rr(t??{})):t}function Ob(e,t){if(!e)return t;if(!t)return e;const n=Me(Object.create(null),e);for(const s in t)n[s]=Ht(e[s],t[s]);return n}function Qp(){return{app:null,config:{isNativeTag:pi,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 Ib=0;function Nb(e,t){return function(s,i=null){be(s)||(s=Me({},s)),i!=null&&!je(i)&&(i=null);const r=Qp(),o=new WeakSet,l=[];let c=!1;const h=r.app={_uid:Ib++,_component:s,_props:i,_container:null,_context:r,_instance:null,version:Iu,get config(){return r.config},set config(f){},use(f,...u){return o.has(f)||(f&&be(f.install)?(o.add(f),f.install(h,...u)):be(f)&&(o.add(f),f(h,...u))),h},mixin(f){return r.mixins.includes(f)||r.mixins.push(f),h},component(f,u){return u?(r.components[f]=u,h):r.components[f]},directive(f,u){return u?(r.directives[f]=u,h):r.directives[f]},mount(f,u,m){if(!c){const v=h._ceVNode||Je(s,i);return v.appContext=r,m===!0?m="svg":m===!1&&(m=void 0),u&&t?t(v,f):e(v,f,m),c=!0,h._container=f,f.__vue_app__=h,Jr(v.component)}},onUnmount(f){l.push(f)},unmount(){c&&(on(l,h._instance,16),e(null,h._container),delete h._container.__vue_app__)},provide(f,u){return r.provides[f]=u,h},runWithContext(f){const u=Fs;Fs=h;try{return f()}finally{Fs=u}}};return h}}let Fs=null;function vu(e,t){if(Rt){let n=Rt.provides;const s=Rt.parent&&Rt.parent.provides;s===n&&(n=Rt.provides=Object.create(s)),n[e]=t}}function bi(e,t,n=!1){const s=Wt();if(s||Fs){let i=Fs?Fs._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&be(t)?t.call(s&&s.proxy):t}}function Yp(){return!!(Wt()||Fs)}const Xp={},Zp=()=>Object.create(Xp),em=e=>Object.getPrototypeOf(e)===Xp;function Pb(e,t,n,s=!1){const i={},r=Zp();e.propsDefaults=Object.create(null),tm(e,t,i,r);for(const o in e.propsOptions[0])o in i||(i[o]=void 0);n?e.props=s?i:Xc(i):e.type.props?e.props=i:e.props=r,e.attrs=r}function Lb(e,t,n,s){const{props:i,attrs:r,vnode:{patchFlag:o}}=e,l=Pe(i),[c]=e.propsOptions;let h=!1;if((s||o>0)&&!(o&16)){if(o&8){const f=e.vnode.dynamicProps;for(let u=0;u<f.length;u++){let m=f[u];if(qa(e.emitsOptions,m))continue;const v=t[m];if(c)if($e(r,m))v!==r[m]&&(r[m]=v,h=!0);else{const w=Ge(m);i[w]=dc(c,l,w,v,e,!1)}else v!==r[m]&&(r[m]=v,h=!0)}}}else{tm(e,t,i,r)&&(h=!0);let f;for(const u in l)(!t||!$e(t,u)&&((f=Gt(u))===u||!$e(t,f)))&&(c?n&&(n[u]!==void 0||n[f]!==void 0)&&(i[u]=dc(c,l,u,void 0,e,!0)):delete i[u]);if(r!==l)for(const u in r)(!t||!$e(t,u))&&(delete r[u],h=!0)}h&&Hn(e.attrs,"set","")}function tm(e,t,n,s){const[i,r]=e.propsOptions;let o=!1,l;if(t)for(let c in t){if(fs(c))continue;const h=t[c];let f;i&&$e(i,f=Ge(c))?!r||!r.includes(f)?n[f]=h:(l||(l={}))[f]=h:qa(e.emitsOptions,c)||(!(c in s)||h!==s[c])&&(s[c]=h,o=!0)}if(r){const c=Pe(n),h=l||Ne;for(let f=0;f<r.length;f++){const u=r[f];n[u]=dc(i,c,u,h[u],e,!$e(h,u))}}return o}function dc(e,t,n,s,i,r){const o=e[n];if(o!=null){const l=$e(o,"default");if(l&&s===void 0){const c=o.default;if(o.type!==Function&&!o.skipFactory&&be(c)){const{propsDefaults:h}=i;if(n in h)s=h[n];else{const f=Hs(i);s=h[n]=c.call(null,t),f()}}else s=c;i.ce&&i.ce._setProp(n,s)}o[0]&&(r&&!l?s=!1:o[1]&&(s===""||s===Gt(n))&&(s=!0))}return s}const Fb=new WeakMap;function nm(e,t,n=!1){const s=n?Fb:t.propsCache,i=s.get(e);if(i)return i;const r=e.props,o={},l=[];let c=!1;if(!be(e)){const f=u=>{c=!0;const[m,v]=nm(u,t,!0);Me(o,m),v&&l.push(...v)};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!r&&!c)return je(e)&&s.set(e,gi),gi;if(se(r))for(let f=0;f<r.length;f++){const u=Ge(r[f]);kd(u)&&(o[u]=Ne)}else if(r)for(const f in r){const u=Ge(f);if(kd(u)){const m=r[f],v=o[u]=se(m)||be(m)?{type:m}:Me({},m),w=v.type;let b=!1,H=!0;if(se(w))for(let P=0;P<w.length;++P){const M=w[P],S=be(M)&&M.name;if(S==="Boolean"){b=!0;break}else S==="String"&&(H=!1)}else b=be(w)&&w.name==="Boolean";v[0]=b,v[1]=H,(b||$e(v,"default"))&&l.push(u)}}const h=[o,l];return je(e)&&s.set(e,h),h}function kd(e){return e[0]!=="$"&&!fs(e)}const yu=e=>e==="_"||e==="_ctx"||e==="$stable",Su=e=>se(e)?e.map(Jt):[Jt(e)],Db=(e,t,n)=>{if(t._n)return t;const s=Ba((...i)=>Su(t(...i)),n);return s._c=!1,s},sm=(e,t,n)=>{const s=e._ctx;for(const i in e){if(yu(i))continue;const r=e[i];if(be(r))t[i]=Db(i,r,s);else if(r!=null){const o=Su(r);t[i]=()=>o}}},im=(e,t)=>{const n=Su(t);e.slots.default=()=>n},rm=(e,t,n)=>{for(const s in t)(n||!yu(s))&&(e[s]=t[s])},$b=(e,t,n)=>{const s=e.slots=Zp();if(e.vnode.shapeFlag&32){const i=t._;i?(rm(s,t,n),n&&yh(s,"_",i,!0)):sm(t,s)}else t&&im(e,t)},Bb=(e,t,n)=>{const{vnode:s,slots:i}=e;let r=!0,o=Ne;if(s.shapeFlag&32){const l=t._;l?n&&l===1?r=!1:rm(i,t,n):(r=!t.$stable,sm(t,i)),o=t}else t&&(im(e,t),o={default:1});if(r)for(const l in i)!yu(l)&&o[l]==null&&delete i[l]},St=vm;function wu(e){return om(e)}function bu(e){return om(e,vb)}function om(e,t){const n=Ma();n.__VUE__=!0;const{insert:s,remove:i,patchProp:r,createElement:o,createText:l,createComment:c,setText:h,setElementText:f,parentNode:u,nextSibling:m,setScopeId:v=Mt,insertStaticContent:w}=e,b=(g,T,I,j=null,U=null,W=null,G=void 0,z=null,q=!!T.dynamicChildren)=>{if(g===T)return;g&&!Sn(g,T)&&(j=Qe(g),He(g,U,W,!0),g=null),T.patchFlag===-2&&(q=!1,T.dynamicChildren=null);const{type:$,ref:ae,shapeFlag:Y}=T;switch($){case qn:H(g,T,I,j);break;case at:P(g,T,I,j);break;case hs:g==null&&M(T,I,j,G);break;case wt:A(g,T,I,j,U,W,G,z,q);break;default:Y&1?x(g,T,I,j,U,W,G,z,q):Y&6?K(g,T,I,j,U,W,G,z,q):(Y&64||Y&128)&&$.process(g,T,I,j,U,W,G,z,q,Zt)}ae!=null&&U?wi(ae,g&&g.ref,W,T||g,!T):ae==null&&g&&g.ref!=null&&wi(g.ref,null,W,g,!0)},H=(g,T,I,j)=>{if(g==null)s(T.el=l(T.children),I,j);else{const U=T.el=g.el;T.children!==g.children&&h(U,T.children)}},P=(g,T,I,j)=>{g==null?s(T.el=c(T.children||""),I,j):T.el=g.el},M=(g,T,I,j)=>{[g.el,g.anchor]=w(g.children,T,I,j,g.el,g.anchor)},S=({el:g,anchor:T},I,j)=>{let U;for(;g&&g!==T;)U=m(g),s(g,I,j),g=U;s(T,I,j)},_=({el:g,anchor:T})=>{let I;for(;g&&g!==T;)I=m(g),i(g),g=I;i(T)},x=(g,T,I,j,U,W,G,z,q)=>{T.type==="svg"?G="svg":T.type==="math"&&(G="mathml"),g==null?C(T,I,j,U,W,G,z,q):R(g,T,U,W,G,z,q)},C=(g,T,I,j,U,W,G,z)=>{let q,$;const{props:ae,shapeFlag:Y,transition:pe,dirs:ye}=g;if(q=g.el=o(g.type,W,ae&&ae.is,ae),Y&8?f(q,g.children):Y&16&&F(g.children,q,null,j,U,Gl(g,W),G,z),ye&&Rn(g,null,j,"created"),V(q,g,g.scopeId,G,j),ae){for(const Le in ae)Le!=="value"&&!fs(Le)&&r(q,Le,null,ae[Le],W,j);"value"in ae&&r(q,"value",null,ae.value,W),($=ae.onVnodeBeforeMount)&&Kt($,j,g)}ye&&Rn(g,null,j,"beforeMount");const xe=am(U,pe);xe&&pe.beforeEnter(q),s(q,T,I),(($=ae&&ae.onVnodeMounted)||xe||ye)&&St(()=>{$&&Kt($,j,g),xe&&pe.enter(q),ye&&Rn(g,null,j,"mounted")},U)},V=(g,T,I,j,U)=>{if(I&&v(g,I),j)for(let W=0;W<j.length;W++)v(g,j[W]);if(U){let W=U.subTree;if(T===W||ha(W.type)&&(W.ssContent===T||W.ssFallback===T)){const G=U.vnode;V(g,G,G.scopeId,G.slotScopeIds,U.parent)}}},F=(g,T,I,j,U,W,G,z,q=0)=>{for(let $=q;$<g.length;$++){const ae=g[$]=z?cs(g[$]):Jt(g[$]);b(null,ae,T,I,j,U,W,G,z)}},R=(g,T,I,j,U,W,G)=>{const z=T.el=g.el;let{patchFlag:q,dynamicChildren:$,dirs:ae}=T;q|=g.patchFlag&16;const Y=g.props||Ne,pe=T.props||Ne;let ye;if(I&&As(I,!1),(ye=pe.onVnodeBeforeUpdate)&&Kt(ye,I,T,g),ae&&Rn(T,g,I,"beforeUpdate"),I&&As(I,!0),(Y.innerHTML&&pe.innerHTML==null||Y.textContent&&pe.textContent==null)&&f(z,""),$?N(g.dynamicChildren,$,z,I,j,Gl(T,U),W):G||Z(g,T,z,null,I,j,Gl(T,U),W,!1),q>0){if(q&16)B(z,Y,pe,I,U);else if(q&2&&Y.class!==pe.class&&r(z,"class",null,pe.class,U),q&4&&r(z,"style",Y.style,pe.style,U),q&8){const xe=T.dynamicProps;for(let Le=0;Le<xe.length;Le++){const Ce=xe[Le],_t=Y[Ce],We=pe[Ce];(We!==_t||Ce==="value")&&r(z,Ce,_t,We,U,I)}}q&1&&g.children!==T.children&&f(z,T.children)}else!G&&$==null&&B(z,Y,pe,I,U);((ye=pe.onVnodeUpdated)||ae)&&St(()=>{ye&&Kt(ye,I,T,g),ae&&Rn(T,g,I,"updated")},j)},N=(g,T,I,j,U,W,G)=>{for(let z=0;z<T.length;z++){const q=g[z],$=T[z],ae=q.el&&(q.type===wt||!Sn(q,$)||q.shapeFlag&198)?u(q.el):I;b(q,$,ae,null,j,U,W,G,!0)}},B=(g,T,I,j,U)=>{if(T!==I){if(T!==Ne)for(const W in T)!fs(W)&&!(W in I)&&r(g,W,T[W],null,U,j);for(const W in I){if(fs(W))continue;const G=I[W],z=T[W];G!==z&&W!=="value"&&r(g,W,z,G,U,j)}"value"in I&&r(g,"value",T.value,I.value,U)}},A=(g,T,I,j,U,W,G,z,q)=>{const $=T.el=g?g.el:l(""),ae=T.anchor=g?g.anchor:l("");let{patchFlag:Y,dynamicChildren:pe,slotScopeIds:ye}=T;ye&&(z=z?z.concat(ye):ye),g==null?(s($,I,j),s(ae,I,j),F(T.children||[],I,ae,U,W,G,z,q)):Y>0&&Y&64&&pe&&g.dynamicChildren?(N(g.dynamicChildren,pe,I,U,W,G,z),(T.key!=null||U&&T===U.subTree)&&Tu(g,T,!0)):Z(g,T,I,ae,U,W,G,z,q)},K=(g,T,I,j,U,W,G,z,q)=>{T.slotScopeIds=z,g==null?T.shapeFlag&512?U.ctx.activate(T,I,j,G,q):re(T,I,j,U,W,G,q):oe(g,T,q)},re=(g,T,I,j,U,W,G)=>{const z=g.component=Cm(g,j,U);if(Vr(g)&&(z.ctx.renderer=Zt),xm(z,!1,G),z.asyncDep){if(U&&U.registerDep(z,J,G),!g.el){const q=z.subTree=Je(at);P(null,q,T,I),g.placeholder=q.el}}else J(z,g,T,I,U,W,G)},oe=(g,T,I)=>{const j=T.component=g.component;if(Kb(g,T,I))if(j.asyncDep&&!j.asyncResolved){fe(j,T,I);return}else j.next=T,j.update();else T.el=g.el,j.vnode=T},J=(g,T,I,j,U,W,G)=>{const z=()=>{if(g.isMounted){let{next:Y,bu:pe,u:ye,parent:xe,vnode:Le}=g;{const st=lm(g);if(st){Y&&(Y.el=Le.el,fe(g,Y,G)),st.asyncDep.then(()=>{g.isUnmounted||z()});return}}let Ce=Y,_t;As(g,!1),Y?(Y.el=Le.el,fe(g,Y,G)):Y=Le,pe&&yi(pe),(_t=Y.props&&Y.props.onVnodeBeforeUpdate)&&Kt(_t,xe,Y,Le),As(g,!0);const We=Ko(g),lt=g.subTree;g.subTree=We,b(lt,We,u(lt.el),Qe(lt),g,U,W),Y.el=We.el,Ce===null&&za(g,We.el),ye&&St(ye,U),(_t=Y.props&&Y.props.onVnodeUpdated)&&St(()=>Kt(_t,xe,Y,Le),U)}else{let Y;const{el:pe,props:ye}=T,{bm:xe,m:Le,parent:Ce,root:_t,type:We}=g,lt=ds(T);if(As(g,!1),xe&&yi(xe),!lt&&(Y=ye&&ye.onVnodeBeforeMount)&&Kt(Y,Ce,T),As(g,!0),pe&&En){const st=()=>{g.subTree=Ko(g),En(pe,g.subTree,g,U,null)};lt&&We.__asyncHydrate?We.__asyncHydrate(pe,g,st):st()}else{_t.ce&&_t.ce._def.shadowRoot!==!1&&_t.ce._injectChildStyle(We);const st=g.subTree=Ko(g);b(null,st,I,j,g,U,W),T.el=st.el}if(Le&&St(Le,U),!lt&&(Y=ye&&ye.onVnodeMounted)){const st=T;St(()=>Kt(Y,Ce,st),U)}(T.shapeFlag&256||Ce&&ds(Ce.vnode)&&Ce.vnode.shapeFlag&256)&&g.a&&St(g.a,U),g.isMounted=!0,T=I=j=null}};g.scope.on();const q=g.effect=new _i(z);g.scope.off();const $=g.update=q.run.bind(q),ae=g.job=q.runIfDirty.bind(q);ae.i=g,ae.id=g.uid,q.scheduler=()=>su(ae),As(g,!0),$()},fe=(g,T,I)=>{T.component=g;const j=g.vnode.props;g.vnode=T,g.next=null,Lb(g,T.props,j,I),Bb(g,T.children,I),Jn(),pd(g),Gn()},Z=(g,T,I,j,U,W,G,z,q=!1)=>{const $=g&&g.children,ae=g?g.shapeFlag:0,Y=T.children,{patchFlag:pe,shapeFlag:ye}=T;if(pe>0){if(pe&128){ft($,Y,I,j,U,W,G,z,q);return}else if(pe&256){Ae($,Y,I,j,U,W,G,z,q);return}}ye&8?(ae&16&&Se($,U,W),Y!==$&&f(I,Y)):ae&16?ye&16?ft($,Y,I,j,U,W,G,z,q):Se($,U,W,!0):(ae&8&&f(I,""),ye&16&&F(Y,I,j,U,W,G,z,q))},Ae=(g,T,I,j,U,W,G,z,q)=>{g=g||gi,T=T||gi;const $=g.length,ae=T.length,Y=Math.min($,ae);let pe;for(pe=0;pe<Y;pe++){const ye=T[pe]=q?cs(T[pe]):Jt(T[pe]);b(g[pe],ye,I,null,U,W,G,z,q)}$>ae?Se(g,U,W,!0,!1,Y):F(T,I,j,U,W,G,z,q,Y)},ft=(g,T,I,j,U,W,G,z,q)=>{let $=0;const ae=T.length;let Y=g.length-1,pe=ae-1;for(;$<=Y&&$<=pe;){const ye=g[$],xe=T[$]=q?cs(T[$]):Jt(T[$]);if(Sn(ye,xe))b(ye,xe,I,null,U,W,G,z,q);else break;$++}for(;$<=Y&&$<=pe;){const ye=g[Y],xe=T[pe]=q?cs(T[pe]):Jt(T[pe]);if(Sn(ye,xe))b(ye,xe,I,null,U,W,G,z,q);else break;Y--,pe--}if($>Y){if($<=pe){const ye=pe+1,xe=ye<ae?T[ye].el:j;for(;$<=pe;)b(null,T[$]=q?cs(T[$]):Jt(T[$]),I,xe,U,W,G,z,q),$++}}else if($>pe)for(;$<=Y;)He(g[$],U,W,!0),$++;else{const ye=$,xe=$,Le=new Map;for($=xe;$<=pe;$++){const Ct=T[$]=q?cs(T[$]):Jt(T[$]);Ct.key!=null&&Le.set(Ct.key,$)}let Ce,_t=0;const We=pe-xe+1;let lt=!1,st=0;const gn=new Array(We);for($=0;$<We;$++)gn[$]=0;for($=ye;$<=Y;$++){const Ct=g[$];if(_t>=We){He(Ct,U,W,!0);continue}let qt;if(Ct.key!=null)qt=Le.get(Ct.key);else for(Ce=xe;Ce<=pe;Ce++)if(gn[Ce-xe]===0&&Sn(Ct,T[Ce])){qt=Ce;break}qt===void 0?He(Ct,U,W,!0):(gn[qt-xe]=$+1,qt>=st?st=qt:lt=!0,b(Ct,T[qt],I,null,U,W,G,z,q),_t++)}const ws=lt?jb(gn):gi;for(Ce=ws.length-1,$=We-1;$>=0;$--){const Ct=xe+$,qt=T[Ct],bs=T[Ct+1],Ts=Ct+1<ae?bs.el||bs.placeholder:j;gn[$]===0?b(null,qt,I,Ts,U,W,G,z,q):lt&&(Ce<0||$!==ws[Ce]?_e(qt,I,Ts,2):Ce--)}}},_e=(g,T,I,j,U=null)=>{const{el:W,type:G,transition:z,children:q,shapeFlag:$}=g;if($&6){_e(g.component.subTree,T,I,j);return}if($&128){g.suspense.move(T,I,j);return}if($&64){G.move(g,T,I,Zt);return}if(G===wt){s(W,T,I);for(let Y=0;Y<q.length;Y++)_e(q[Y],T,I,j);s(g.anchor,T,I);return}if(G===hs){S(g,T,I);return}if(j!==2&&$&1&&z)if(j===0)z.beforeEnter(W),s(W,T,I),St(()=>z.enter(W),U);else{const{leave:Y,delayLeave:pe,afterLeave:ye}=z,xe=()=>{g.ctx.isUnmounted?i(W):s(W,T,I)},Le=()=>{W._isLeaving&&W[jn](!0),Y(W,()=>{xe(),ye&&ye()})};pe?pe(W,xe,Le):Le()}else s(W,T,I)},He=(g,T,I,j=!1,U=!1)=>{const{type:W,props:G,ref:z,children:q,dynamicChildren:$,shapeFlag:ae,patchFlag:Y,dirs:pe,cacheIndex:ye}=g;if(Y===-2&&(U=!1),z!=null&&(Jn(),wi(z,null,I,g,!0),Gn()),ye!=null&&(T.renderCache[ye]=void 0),ae&256){T.ctx.deactivate(g);return}const xe=ae&1&&pe,Le=!ds(g);let Ce;if(Le&&(Ce=G&&G.onVnodeBeforeUnmount)&&Kt(Ce,T,g),ae&6)he(g.component,I,j);else{if(ae&128){g.suspense.unmount(I,j);return}xe&&Rn(g,null,T,"beforeUnmount"),ae&64?g.type.remove(g,T,I,Zt,j):$&&!$.hasOnce&&(W!==wt||Y>0&&Y&64)?Se($,T,I,!1,!0):(W===wt&&Y&384||!U&&ae&16)&&Se(q,T,I),j&&ie(g)}(Le&&(Ce=G&&G.onVnodeUnmounted)||xe)&&St(()=>{Ce&&Kt(Ce,T,g),xe&&Rn(g,null,T,"unmounted")},I)},ie=g=>{const{type:T,el:I,anchor:j,transition:U}=g;if(T===wt){ne(I,j);return}if(T===hs){_(g);return}const W=()=>{i(I),U&&!U.persisted&&U.afterLeave&&U.afterLeave()};if(g.shapeFlag&1&&U&&!U.persisted){const{leave:G,delayLeave:z}=U,q=()=>G(I,W);z?z(g.el,W,q):q()}else W()},ne=(g,T)=>{let I;for(;g!==T;)I=m(g),i(g),g=I;i(T)},he=(g,T,I)=>{const{bum:j,scope:U,job:W,subTree:G,um:z,m:q,a:$}=g;da(q),da($),j&&yi(j),U.stop(),W&&(W.flags|=8,He(G,g,T,I)),z&&St(z,T),St(()=>{g.isUnmounted=!0},T)},Se=(g,T,I,j=!1,U=!1,W=0)=>{for(let G=W;G<g.length;G++)He(g[G],T,I,j,U)},Qe=g=>{if(g.shapeFlag&6)return Qe(g.component.subTree);if(g.shapeFlag&128)return g.suspense.next();const T=m(g.anchor||g.el),I=T&&T[up];return I?m(I):T};let Ye=!1;const mn=(g,T,I)=>{g==null?T._vnode&&He(T._vnode,null,null,!0):b(T._vnode||null,g,T,null,null,null,I),T._vnode=g,Ye||(Ye=!0,pd(),ca(),Ye=!1)},Zt={p:b,um:He,m:_e,r:ie,mt:re,mc:F,pc:Z,pbc:N,n:Qe,o:e};let In,En;return t&&([In,En]=t(Zt)),{render:mn,hydrate:In,createApp:Nb(mn,In)}}function Gl({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 As({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function am(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Tu(e,t,n=!1){const s=e.children,i=t.children;if(se(s)&&se(i))for(let r=0;r<s.length;r++){const o=s[r];let l=i[r];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=i[r]=cs(i[r]),l.el=o.el),!n&&l.patchFlag!==-2&&Tu(o,l)),l.type===qn&&l.patchFlag!==-1&&(l.el=o.el),l.type===at&&!l.el&&(l.el=o.el)}}function jb(e){const t=e.slice(),n=[0];let s,i,r,o,l;const c=e.length;for(s=0;s<c;s++){const h=e[s];if(h!==0){if(i=n[n.length-1],e[i]<h){t[s]=i,n.push(s);continue}for(r=0,o=n.length-1;r<o;)l=r+o>>1,e[n[l]]<h?r=l+1:o=l;h<e[n[r]]&&(r>0&&(t[s]=n[r-1]),n[r]=s)}}for(r=n.length,o=n[r-1];r-- >0;)n[r]=o,o=t[o];return n}function lm(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:lm(t)}function da(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const _u=Symbol.for("v-scx"),Eu=()=>bi(_u);function cm(e,t){return Kr(e,null,t)}function um(e,t){return Kr(e,null,{flush:"post"})}function Cu(e,t){return Kr(e,null,{flush:"sync"})}function wn(e,t,n){return Kr(e,t,n)}function Kr(e,t,n=Ne){const{immediate:s,deep:i,flush:r,once:o}=n,l=Me({},n),c=t&&s||!t&&r!=="post";let h;if(xi){if(r==="sync"){const v=Eu();h=v.__watcherHandles||(v.__watcherHandles=[])}else if(!c){const v=()=>{};return v.stop=Mt,v.resume=Mt,v.pause=Mt,v}}const f=Rt;l.call=(v,w,b)=>on(v,f,w,b);let u=!1;r==="post"?l.scheduler=v=>{St(v,f&&f.suspense)}:r!=="sync"&&(u=!0,l.scheduler=(v,w)=>{w?v():su(v)}),l.augmentJob=v=>{t&&(v.flags|=4),u&&(v.flags|=2,f&&(v.id=f.uid,v.i=f))};const m=ab(e,t,l);return xi&&(h?h.push(m):c&&m()),m}function Hb(e,t,n){const s=this.proxy,i=Ee(e)?e.includes(".")?fm(s,e):()=>s[e]:e.bind(s,s);let r;be(t)?r=t:(r=t.handler,n=t);const o=Hs(this),l=Kr(i,r.bind(s),n);return o(),l}function fm(e,t){const n=t.split(".");return()=>{let s=e;for(let i=0;i<n.length&&s;i++)s=s[n[i]];return s}}function dm(e,t,n=Ne){const s=Wt(),i=Ge(t),r=Gt(t),o=hm(e,i),l=tu((c,h)=>{let f,u=Ne,m;return Cu(()=>{const v=e[i];Ut(f,v)&&(f=v,h())}),{get(){return c(),n.get?n.get(f):f},set(v){const w=n.set?n.set(v):v;if(!Ut(w,f)&&!(u!==Ne&&Ut(v,u)))return;const b=s.vnode.props;b&&(t in b||i in b||r in b)&&(`onUpdate:${t}`in b||`onUpdate:${i}`in b||`onUpdate:${r}`in b)||(f=v,h()),s.emit(`update:${t}`,w),Ut(v,w)&&Ut(v,u)&&!Ut(w,m)&&h(),u=v,m=w}}});return l[Symbol.iterator]=()=>{let c=0;return{next(){return c<2?{value:c++?o||Ne:l,done:!1}:{done:!0}}}},l}const hm=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ge(t)}Modifiers`]||e[`${Gt(t)}Modifiers`];function Ub(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||Ne;let i=n;const r=t.startsWith("update:"),o=r&&hm(s,t.slice(7));o&&(o.trim&&(i=n.map(f=>Ee(f)?f.trim():f)),o.number&&(i=n.map(sa)));let l,c=s[l=Ps(t)]||s[l=Ps(Ge(t))];!c&&r&&(c=s[l=Ps(Gt(t))]),c&&on(c,e,6,i);const h=s[l+"Once"];if(h){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,on(h,e,6,i)}}const Vb=new WeakMap;function pm(e,t,n=!1){const s=n?Vb:t.emitsCache,i=s.get(e);if(i!==void 0)return i;const r=e.emits;let o={},l=!1;if(!be(e)){const c=h=>{const f=pm(h,t,!0);f&&(l=!0,Me(o,f))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!r&&!l?(je(e)&&s.set(e,null),null):(se(r)?r.forEach(c=>o[c]=null):Me(o,r),je(e)&&s.set(e,o),o)}function qa(e,t){return!e||!Vs(t)?!1:(t=t.slice(2).replace(/Once$/,""),$e(e,t[0].toLowerCase()+t.slice(1))||$e(e,Gt(t))||$e(e,t))}function Ko(e){const{type:t,vnode:n,proxy:s,withProxy:i,propsOptions:[r],slots:o,attrs:l,emit:c,render:h,renderCache:f,props:u,data:m,setupState:v,ctx:w,inheritAttrs:b}=e,H=xr(e);let P,M;try{if(n.shapeFlag&4){const _=i||s,x=_;P=Jt(h.call(x,_,f,u,v,m,w)),M=l}else{const _=t;P=Jt(_.length>1?_(u,{attrs:l,slots:o,emit:c}):_(u,null)),M=t.props?l:qb(l)}}catch(_){wr.length=0,ys(_,e,1),P=Je(at)}let S=P;if(M&&b!==!1){const _=Object.keys(M),{shapeFlag:x}=S;_.length&&x&7&&(r&&_.some(Vc)&&(M=zb(M,r)),S=_n(S,M,!1,!0))}return n.dirs&&(S=_n(S,null,!1,!0),S.dirs=S.dirs?S.dirs.concat(n.dirs):n.dirs),n.transition&&Mn(S,n.transition),P=S,xr(H),P}function Wb(e,t=!0){let n;for(let s=0;s<e.length;s++){const i=e[s];if(On(i)){if(i.type!==at||i.children==="v-if"){if(n)return;n=i}}else return}return n}const qb=e=>{let t;for(const n in e)(n==="class"||n==="style"||Vs(n))&&((t||(t={}))[n]=e[n]);return t},zb=(e,t)=>{const n={};for(const s in e)(!Vc(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Kb(e,t,n){const{props:s,children:i,component:r}=e,{props:o,children:l,patchFlag:c}=t,h=r.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?xd(s,o,h):!!o;if(c&8){const f=t.dynamicProps;for(let u=0;u<f.length;u++){const m=f[u];if(o[m]!==s[m]&&!qa(h,m))return!0}}}else return(i||l)&&(!l||!l.$stable)?!0:s===o?!1:s?o?xd(s,o,h):!0:!!o;return!1}function xd(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let i=0;i<s.length;i++){const r=s[i];if(t[r]!==e[r]&&!qa(n,r))return!0}return!1}function za({vnode:e,parent:t},n){for(;t;){const s=t.subTree;if(s.suspense&&s.suspense.activeBranch===e&&(s.el=e.el),s===e)(e=t.vnode).el=n,t=t.parent;else break}}const ha=e=>e.__isSuspense;let hc=0;const Jb={name:"Suspense",__isSuspense:!0,process(e,t,n,s,i,r,o,l,c,h){if(e==null)Gb(t,n,s,i,r,o,l,c,h);else{if(r&&r.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}Qb(e,t,n,s,i,o,l,c,h)}},hydrate:Yb,normalize:Xb},mm=Jb;function Ar(e,t){const n=e.props&&e.props[t];be(n)&&n()}function Gb(e,t,n,s,i,r,o,l,c){const{p:h,o:{createElement:f}}=c,u=f("div"),m=e.suspense=gm(e,i,s,t,u,n,r,o,l,c);h(null,m.pendingBranch=e.ssContent,u,null,s,m,r,o),m.deps>0?(Ar(e,"onPending"),Ar(e,"onFallback"),h(null,e.ssFallback,t,n,s,null,r,o),Ti(m,e.ssFallback)):m.resolve(!1,!0)}function Qb(e,t,n,s,i,r,o,l,{p:c,um:h,o:{createElement:f}}){const u=t.suspense=e.suspense;u.vnode=t,t.el=e.el;const m=t.ssContent,v=t.ssFallback,{activeBranch:w,pendingBranch:b,isInFallback:H,isHydrating:P}=u;if(b)u.pendingBranch=m,Sn(b,m)?(c(b,m,u.hiddenContainer,null,i,u,r,o,l),u.deps<=0?u.resolve():H&&(P||(c(w,v,n,s,i,null,r,o,l),Ti(u,v)))):(u.pendingId=hc++,P?(u.isHydrating=!1,u.activeBranch=b):h(b,i,u),u.deps=0,u.effects.length=0,u.hiddenContainer=f("div"),H?(c(null,m,u.hiddenContainer,null,i,u,r,o,l),u.deps<=0?u.resolve():(c(w,v,n,s,i,null,r,o,l),Ti(u,v))):w&&Sn(w,m)?(c(w,m,n,s,i,u,r,o,l),u.resolve(!0)):(c(null,m,u.hiddenContainer,null,i,u,r,o,l),u.deps<=0&&u.resolve()));else if(w&&Sn(w,m))c(w,m,n,s,i,u,r,o,l),Ti(u,m);else if(Ar(t,"onPending"),u.pendingBranch=m,m.shapeFlag&512?u.pendingId=m.component.suspenseId:u.pendingId=hc++,c(null,m,u.hiddenContainer,null,i,u,r,o,l),u.deps<=0)u.resolve();else{const{timeout:M,pendingId:S}=u;M>0?setTimeout(()=>{u.pendingId===S&&u.fallback(v)},M):M===0&&u.fallback(v)}}function gm(e,t,n,s,i,r,o,l,c,h,f=!1){const{p:u,m,um:v,n:w,o:{parentNode:b,remove:H}}=h;let P;const M=Zb(e);M&&t&&t.pendingBranch&&(P=t.pendingId,t.deps++);const S=e.props?ia(e.props.timeout):void 0,_=r,x={vnode:e,parent:t,parentComponent:n,namespace:o,container:s,hiddenContainer:i,deps:0,pendingId:hc++,timeout:typeof S=="number"?S:-1,activeBranch:null,pendingBranch:null,isInFallback:!f,isHydrating:f,isUnmounted:!1,effects:[],resolve(C=!1,V=!1){const{vnode:F,activeBranch:R,pendingBranch:N,pendingId:B,effects:A,parentComponent:K,container:re}=x;let oe=!1;x.isHydrating?x.isHydrating=!1:C||(oe=R&&N.transition&&N.transition.mode==="out-in",oe&&(R.transition.afterLeave=()=>{B===x.pendingId&&(m(N,re,r===_?w(R):r,0),Ei(A))}),R&&(b(R.el)===re&&(r=w(R)),v(R,K,x,!0)),oe||m(N,re,r,0)),Ti(x,N),x.pendingBranch=null,x.isInFallback=!1;let J=x.parent,fe=!1;for(;J;){if(J.pendingBranch){J.effects.push(...A),fe=!0;break}J=J.parent}!fe&&!oe&&Ei(A),x.effects=[],M&&t&&t.pendingBranch&&P===t.pendingId&&(t.deps--,t.deps===0&&!V&&t.resolve()),Ar(F,"onResolve")},fallback(C){if(!x.pendingBranch)return;const{vnode:V,activeBranch:F,parentComponent:R,container:N,namespace:B}=x;Ar(V,"onFallback");const A=w(F),K=()=>{x.isInFallback&&(u(null,C,N,A,R,null,B,l,c),Ti(x,C))},re=C.transition&&C.transition.mode==="out-in";re&&(F.transition.afterLeave=K),x.isInFallback=!0,v(F,R,null,!0),re||K()},move(C,V,F){x.activeBranch&&m(x.activeBranch,C,V,F),x.container=C},next(){return x.activeBranch&&w(x.activeBranch)},registerDep(C,V,F){const R=!!x.pendingBranch;R&&x.deps++;const N=C.vnode.el;C.asyncDep.catch(B=>{ys(B,C,0)}).then(B=>{if(C.isUnmounted||x.isUnmounted||x.pendingId!==C.suspenseId)return;C.asyncResolved=!0;const{vnode:A}=C;gc(C,B,!1),N&&(A.el=N);const K=!N&&C.subTree.el;V(C,A,b(N||C.subTree.el),N?null:w(C.subTree),x,o,F),K&&H(K),za(C,A.el),R&&--x.deps===0&&x.resolve()})},unmount(C,V){x.isUnmounted=!0,x.activeBranch&&v(x.activeBranch,n,C,V),x.pendingBranch&&v(x.pendingBranch,n,C,V)}};return x}function Yb(e,t,n,s,i,r,o,l,c){const h=t.suspense=gm(t,s,n,e.parentNode,document.createElement("div"),null,i,r,o,l,!0),f=c(e,h.pendingBranch=t.ssContent,n,h,r,o);return h.deps===0&&h.resolve(!1,!0),f}function Xb(e){const{shapeFlag:t,children:n}=e,s=t&32;e.ssContent=Rd(s?n.default:n),e.ssFallback=s?Rd(n.fallback):Je(at)}function Rd(e){let t;if(be(e)){const n=js&&e._c;n&&(e._d=!1,Ci()),e=e(),n&&(e._d=!0,t=Dt,ym())}return se(e)&&(e=Wb(e)),e=Jt(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function vm(e,t){t&&t.pendingBranch?se(e)?t.effects.push(...e):t.effects.push(e):Ei(e)}function Ti(e,t){e.activeBranch=t;const{vnode:n,parentComponent:s}=e;let i=t.el;for(;!i&&t.component;)t=t.component.subTree,i=t.el;n.el=i,s&&s.subTree===n&&(s.vnode.el=i,za(s,i))}function Zb(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const wt=Symbol.for("v-fgt"),qn=Symbol.for("v-txt"),at=Symbol.for("v-cmt"),hs=Symbol.for("v-stc"),wr=[];let Dt=null;function Ci(e=!1){wr.push(Dt=e?null:[])}function ym(){wr.pop(),Dt=wr[wr.length-1]||null}let js=1;function ki(e,t=!1){js+=e,e<0&&Dt&&t&&(Dt.hasOnce=!0)}function Sm(e){return e.dynamicChildren=js>0?Dt||gi:null,ym(),js>0&&Dt&&Dt.push(e),e}function wm(e,t,n,s,i,r){return Sm(Ka(e,t,n,s,i,r,!0))}function Mr(e,t,n,s,i){return Sm(Je(e,t,n,s,i,!0))}function On(e){return e?e.__v_isVNode===!0:!1}function Sn(e,t){return e.type===t.type&&e.key===t.key}function bm(e){}const Tm=({key:e})=>e??null,Jo=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ee(e)||pt(e)||be(e)?{i:At,r:e,k:t,f:!!n}:e:null);function Ka(e,t=null,n=null,s=0,i=null,r=e===wt?0:1,o=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Tm(t),ref:t&&Jo(t),scopeId:$a,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:r,patchFlag:s,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:At};return l?(xu(c,n),r&128&&e.normalize(c)):n&&(c.shapeFlag|=Ee(n)?8:16),js>0&&!o&&Dt&&(c.patchFlag>0||r&6)&&c.patchFlag!==32&&Dt.push(c),c}const Je=e0;function e0(e,t=null,n=null,s=0,i=null,r=!1){if((!e||e===Rp)&&(e=at),On(e)){const l=_n(e,t,!0);return n&&xu(l,n),js>0&&!r&&Dt&&(l.shapeFlag&6?Dt[Dt.indexOf(e)]=l:Dt.push(l)),l.patchFlag=-2,l}if(r0(e)&&(e=e.__vccOpts),t){t=ku(t);let{class:l,style:c}=t;l&&!Ee(l)&&(t.class=Di(l)),je(c)&&(jr(c)&&!se(c)&&(c=Me({},c)),t.style=Fi(c))}const o=Ee(e)?1:ha(e)?128:fp(e)?64:je(e)?4:be(e)?2:0;return Ka(e,t,n,s,i,o,r,!0)}function ku(e){return e?jr(e)||em(e)?Me({},e):e:null}function _n(e,t,n=!1,s=!1){const{props:i,ref:r,patchFlag:o,children:l,transition:c}=e,h=t?Ru(i||{},t):i,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:h,key:h&&Tm(h),ref:t&&t.ref?n&&r?se(r)?r.concat(Jo(t)):[r,Jo(t)]:Jo(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==wt?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&_n(e.ssContent),ssFallback:e.ssFallback&&_n(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&s&&Mn(f,c.clone(f)),f}function Ja(e=" ",t=0){return Je(qn,null,e,t)}function _m(e,t){const n=Je(hs,null,e);return n.staticCount=t,n}function Em(e="",t=!1){return t?(Ci(),Mr(at,null,e)):Je(at,null,e)}function Jt(e){return e==null||typeof e=="boolean"?Je(at):se(e)?Je(wt,null,e.slice()):On(e)?cs(e):Je(qn,null,String(e))}function cs(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:_n(e)}function xu(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(se(t))n=16;else if(typeof t=="object")if(s&65){const i=t.default;i&&(i._c&&(i._d=!1),xu(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!em(t)?t._ctx=At:i===3&&At&&(At.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else be(t)?(t={default:t,_ctx:At},n=32):(t=String(t),s&64?(n=16,t=[Ja(t)]):n=8);e.children=t,e.shapeFlag|=n}function Ru(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const i in s)if(i==="class")t.class!==s.class&&(t.class=Di([t.class,s.class]));else if(i==="style")t.style=Fi([t.style,s.style]);else if(Vs(i)){const r=t[i],o=s[i];o&&r!==o&&!(se(r)&&r.includes(o))&&(t[i]=r?[].concat(r,o):o)}else i!==""&&(t[i]=s[i])}return t}function Kt(e,t,n,s=null){on(e,t,7,[n,s])}const t0=Qp();let n0=0;function Cm(e,t,n){const s=e.type,i=(t?t.appContext:e.appContext)||t0,r={uid:n0++,vnode:e,type:s,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ia(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:nm(s,i),emitsOptions:pm(s,i),emit:null,emitted:null,propsDefaults:Ne,inheritAttrs:s.inheritAttrs,ctx:Ne,data:Ne,props:Ne,attrs:Ne,slots:Ne,refs:Ne,setupState:Ne,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 r.ctx={_:r},r.root=t?t.root:r,r.emit=Ub.bind(null,r),e.ce&&e.ce(r),r}let Rt=null;const Wt=()=>Rt||At;let pa,pc;{const e=Ma(),t=(n,s)=>{let i;return(i=e[n])||(i=e[n]=[]),i.push(s),r=>{i.length>1?i.forEach(o=>o(r)):i[0](r)}};pa=t("__VUE_INSTANCE_SETTERS__",n=>Rt=n),pc=t("__VUE_SSR_SETTERS__",n=>xi=n)}const Hs=e=>{const t=Rt;return pa(e),e.scope.on(),()=>{e.scope.off(),pa(t)}},mc=()=>{Rt&&Rt.scope.off(),pa(null)};function km(e){return e.vnode.shapeFlag&4}let xi=!1;function xm(e,t=!1,n=!1){t&&pc(t);const{props:s,children:i}=e.vnode,r=km(e);Pb(e,s,r,t),$b(e,i,n||t);const o=r?s0(e,t):void 0;return t&&pc(!1),o}function s0(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,cc);const{setup:s}=n;if(s){Jn();const i=e.setupContext=s.length>1?Mm(e):null,r=Hs(e),o=qs(s,e,0,[e.props,i]),l=qc(o);if(Gn(),r(),(l||e.sp)&&!ds(e)&&ru(e),l){if(o.then(mc,mc),t)return o.then(c=>{gc(e,c,t)}).catch(c=>{ys(c,e,0)});e.asyncDep=o}else gc(e,o,t)}else Am(e,t)}function gc(e,t,n){be(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:je(t)&&(e.setupState=Da(t)),Am(e,n)}let ma,vc;function Au(e){ma=e,vc=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,kb))}}const Rm=()=>!ma;function Am(e,t,n){const s=e.type;if(!e.render){if(!t&&ma&&!s.render){const i=s.template||gu(e).template;if(i){const{isCustomElement:r,compilerOptions:o}=e.appContext.config,{delimiters:l,compilerOptions:c}=s,h=Me(Me({isCustomElement:r,delimiters:l},o),c);s.render=ma(i,h)}}e.render=s.render||Mt,vc&&vc(e)}{const i=Hs(e);Jn();try{xb(e)}finally{Gn(),i()}}}const i0={get(e,t){return Ft(e,"get",""),e[t]}};function Mm(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,i0),slots:e.slots,emit:e.emit,expose:t}}function Jr(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Da(Zc(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Sr)return Sr[n](e)},has(t,n){return n in t||n in Sr}})):e.proxy}function yc(e,t=!0){return be(e)?e.displayName||e.name:e.name||t&&e.__name}function r0(e){return be(e)&&"__vccOpts"in e}const zn=(e,t)=>ob(e,t,xi);function Mu(e,t,n){try{ki(-1);const s=arguments.length;return s===2?je(t)&&!se(t)?On(t)?Je(e,null,[t]):Je(e,t):Je(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&On(n)&&(n=[n]),Je(e,t,n))}finally{ki(1)}}function Om(){}function Im(e,t,n,s){const i=n[s];if(i&&Ou(i,e))return i;const r=t();return r.memo=e.slice(),r.cacheIndex=s,n[s]=r}function Ou(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let s=0;s<n.length;s++)if(Ut(n[s],t[s]))return!1;return js>0&&Dt&&Dt.push(e),!0}const Iu="3.5.22",Nm=Mt,Pm=ub,Lm=hi,Fm=rp,o0={createComponentInstance:Cm,setupComponent:xm,renderComponentRoot:Ko,setCurrentRenderingInstance:xr,isVNode:On,normalizeVNode:Jt,getComponentPublicInstance:Jr,ensureValidVNode:mu,pushWarningContext:lb,popWarningContext:cb},Dm=o0,$m=null,Bm=null,jm=null;/**
* @vue/runtime-dom v3.5.22
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Sc;const Ad=typeof window<"u"&&window.trustedTypes;if(Ad)try{Sc=Ad.createPolicy("vue",{createHTML:e=>e})}catch{}const Hm=Sc?e=>Sc.createHTML(e):e=>e,a0="http://www.w3.org/2000/svg",l0="http://www.w3.org/1998/Math/MathML",Bn=typeof document<"u"?document:null,Md=Bn&&Bn.createElement("template"),c0={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 i=t==="svg"?Bn.createElementNS(a0,e):t==="mathml"?Bn.createElementNS(l0,e):n?Bn.createElement(e,{is:n}):Bn.createElement(e);return e==="select"&&s&&s.multiple!=null&&i.setAttribute("multiple",s.multiple),i},createText:e=>Bn.createTextNode(e),createComment:e=>Bn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Bn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,i,r){const o=n?n.previousSibling:t.lastChild;if(i&&(i===r||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===r||!(i=i.nextSibling)););else{Md.innerHTML=Hm(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const l=Md.content;if(s==="svg"||s==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},ss="transition",lr="animation",Ri=Symbol("_vtc"),Um={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},Vm=Me({},Ha,Um),u0=e=>(e.displayName="Transition",e.props=Vm,e),Wm=u0((e,{slots:t})=>Mu(iu,qm(e),t)),Ms=(e,t=[])=>{se(e)?e.forEach(n=>n(...t)):e&&e(...t)},Od=e=>e?se(e)?e.some(t=>t.length>1):e.length>1:!1;function qm(e){const t={};for(const A in e)A in Um||(t[A]=e[A]);if(e.css===!1)return t;const{name:n="v",type:s,duration:i,enterFromClass:r=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=r,appearActiveClass:h=o,appearToClass:f=l,leaveFromClass:u=`${n}-leave-from`,leaveActiveClass:m=`${n}-leave-active`,leaveToClass:v=`${n}-leave-to`}=e,w=f0(i),b=w&&w[0],H=w&&w[1],{onBeforeEnter:P,onEnter:M,onEnterCancelled:S,onLeave:_,onLeaveCancelled:x,onBeforeAppear:C=P,onAppear:V=M,onAppearCancelled:F=S}=t,R=(A,K,re,oe)=>{A._enterCancelled=oe,rs(A,K?f:l),rs(A,K?h:o),re&&re()},N=(A,K)=>{A._isLeaving=!1,rs(A,u),rs(A,v),rs(A,m),K&&K()},B=A=>(K,re)=>{const oe=A?V:M,J=()=>R(K,A,re);Ms(oe,[K,J]),Id(()=>{rs(K,A?c:r),kn(K,A?f:l),Od(oe)||Nd(K,s,b,J)})};return Me(t,{onBeforeEnter(A){Ms(P,[A]),kn(A,r),kn(A,o)},onBeforeAppear(A){Ms(C,[A]),kn(A,c),kn(A,h)},onEnter:B(!1),onAppear:B(!0),onLeave(A,K){A._isLeaving=!0;const re=()=>N(A,K);kn(A,u),A._enterCancelled?(kn(A,m),wc(A)):(wc(A),kn(A,m)),Id(()=>{A._isLeaving&&(rs(A,u),kn(A,v),Od(_)||Nd(A,s,H,re))}),Ms(_,[A,re])},onEnterCancelled(A){R(A,!1,void 0,!0),Ms(S,[A])},onAppearCancelled(A){R(A,!0,void 0,!0),Ms(F,[A])},onLeaveCancelled(A){N(A),Ms(x,[A])}})}function f0(e){if(e==null)return null;if(je(e))return[Ql(e.enter),Ql(e.leave)];{const t=Ql(e);return[t,t]}}function Ql(e){return ia(e)}function kn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Ri]||(e[Ri]=new Set)).add(t)}function rs(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[Ri];n&&(n.delete(t),n.size||(e[Ri]=void 0))}function Id(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let d0=0;function Nd(e,t,n,s){const i=e._endId=++d0,r=()=>{i===e._endId&&s()};if(n!=null)return setTimeout(r,n);const{type:o,timeout:l,propCount:c}=zm(e,t);if(!o)return s();const h=o+"end";let f=0;const u=()=>{e.removeEventListener(h,m),r()},m=v=>{v.target===e&&++f>=c&&u()};setTimeout(()=>{f<c&&u()},l+1),e.addEventListener(h,m)}function zm(e,t){const n=window.getComputedStyle(e),s=w=>(n[w]||"").split(", "),i=s(`${ss}Delay`),r=s(`${ss}Duration`),o=Pd(i,r),l=s(`${lr}Delay`),c=s(`${lr}Duration`),h=Pd(l,c);let f=null,u=0,m=0;t===ss?o>0&&(f=ss,u=o,m=r.length):t===lr?h>0&&(f=lr,u=h,m=c.length):(u=Math.max(o,h),f=u>0?o>h?ss:lr:null,m=f?f===ss?r.length:c.length:0);const v=f===ss&&/\b(?:transform|all)(?:,|$)/.test(s(`${ss}Property`).toString());return{type:f,timeout:u,propCount:m,hasTransform:v}}function Pd(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,s)=>Ld(n)+Ld(e[s])))}function Ld(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function wc(e){return(e?e.ownerDocument:document).body.offsetHeight}function h0(e,t,n){const s=e[Ri];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const ga=Symbol("_vod"),Km=Symbol("_vsh"),Nu={name:"show",beforeMount(e,{value:t},{transition:n}){e[ga]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):cr(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),cr(e,!0),s.enter(e)):s.leave(e,()=>{cr(e,!1)}):cr(e,t))},beforeUnmount(e,{value:t}){cr(e,t)}};function cr(e,t){e.style.display=t?e[ga]:"none",e[Km]=!t}function p0(){Nu.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const Jm=Symbol("");function Gm(e){const t=Wt();if(!t)return;const n=t.ut=(i=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(r=>va(r,i))},s=()=>{const i=e(t.proxy);t.ce?va(t.ce,i):bc(t.subTree,i),n(i)};Wa(()=>{Ei(s)}),$i(()=>{wn(s,Mt,{flush:"post"});const i=new MutationObserver(s);i.observe(t.subTree.el.parentNode,{childList:!0}),zr(()=>i.disconnect())})}function bc(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{bc(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)va(e.el,t);else if(e.type===wt)e.children.forEach(n=>bc(n,t));else if(e.type===hs){let{el:n,anchor:s}=e;for(;n&&(va(n,t),n!==s);)n=n.nextSibling}}function va(e,t){if(e.nodeType===1){const n=e.style;let s="";for(const i in t){const r=Pw(t[i]);n.setProperty(`--${i}`,r),s+=`--${i}: ${r};`}n[Jm]=s}}const m0=/(?:^|;)\s*display\s*:/;function g0(e,t,n){const s=e.style,i=Ee(n);let r=!1;if(n&&!i){if(t)if(Ee(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();n[l]==null&&Go(s,l,"")}else for(const o in t)n[o]==null&&Go(s,o,"");for(const o in n)o==="display"&&(r=!0),Go(s,o,n[o])}else if(i){if(t!==n){const o=s[Jm];o&&(n+=";"+o),s.cssText=n,r=m0.test(n)}}else t&&e.removeAttribute("style");ga in e&&(e[ga]=r?s.display:"",e[Km]&&(s.display="none"))}const Fd=/\s*!important$/;function Go(e,t,n){if(se(n))n.forEach(s=>Go(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=v0(e,t);Fd.test(n)?e.setProperty(Gt(s),n.replace(Fd,""),"important"):e[s]=n}}const Dd=["Webkit","Moz","ms"],Yl={};function v0(e,t){const n=Yl[t];if(n)return n;let s=Ge(t);if(s!=="filter"&&s in e)return Yl[t]=s;s=vs(s);for(let i=0;i<Dd.length;i++){const r=Dd[i]+s;if(r in e)return Yl[t]=r}return t}const $d="http://www.w3.org/1999/xlink";function Bd(e,t,n,s,i,r=Iw(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS($d,t.slice(6,t.length)):e.setAttributeNS($d,t,n):n==null||r&&!bh(n)?e.removeAttribute(t):e.setAttribute(t,r?"":Xt(n)?String(n):n)}function jd(e,t,n,s,i){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Hm(n):n);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const l=r==="OPTION"?e.getAttribute("value")||"":e.value,c=n==null?e.type==="checkbox"?"on":"":String(n);(l!==c||!("_value"in e))&&(e.value=c),n==null&&e.removeAttribute(t),e._value=n;return}let o=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=bh(n):n==null&&l==="string"?(n="",o=!0):l==="number"&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(i||t)}function Vn(e,t,n,s){e.addEventListener(t,n,s)}function y0(e,t,n,s){e.removeEventListener(t,n,s)}const Hd=Symbol("_vei");function S0(e,t,n,s,i=null){const r=e[Hd]||(e[Hd]={}),o=r[t];if(s&&o)o.value=s;else{const[l,c]=w0(t);if(s){const h=r[t]=_0(s,i);Vn(e,l,h,c)}else o&&(y0(e,l,o,c),r[t]=void 0)}}const Ud=/(?:Once|Passive|Capture)$/;function w0(e){let t;if(Ud.test(e)){t={};let s;for(;s=e.match(Ud);)e=e.slice(0,e.length-s[0].length),t[s[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Gt(e.slice(2)),t]}let Xl=0;const b0=Promise.resolve(),T0=()=>Xl||(b0.then(()=>Xl=0),Xl=Date.now());function _0(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;on(E0(s,n.value),t,5,[s])};return n.value=e,n.attached=T0(),n}function E0(e,t){if(se(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>i=>!i._stopped&&s&&s(i))}else return t}const Vd=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,C0=(e,t,n,s,i,r)=>{const o=i==="svg";t==="class"?h0(e,s,o):t==="style"?g0(e,n,s):Vs(t)?Vc(t)||S0(e,t,n,s,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):k0(e,t,s,o))?(jd(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Bd(e,t,s,o,r,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Ee(s))?jd(e,Ge(t),s,r,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Bd(e,t,s,o))};function k0(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Vd(t)&&be(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return Vd(t)&&Ee(n)?!1:t in e}const Wd={};function Pu(e,t,n){let s=Ua(e,t);Ra(s)&&(s=Me({},s,t));class i extends Gr{constructor(o){super(s,o,n)}}return i.def=s,i}const Qm=(e,t)=>Pu(e,t,Bu),x0=typeof HTMLElement<"u"?HTMLElement:class{};class Gr extends x0{constructor(t,n={},s=Sa){super(),this._def=t,this._props=n,this._createApp=s,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&s!==Sa?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(Me({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof Gr){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,Ss(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(t){for(const n of t)this._setAttr(n.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let s=0;s<this.attributes.length;s++)this._setAttr(this.attributes[s].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});const t=(s,i=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:r,styles:o}=s;let l;if(r&&!se(r))for(const c in r){const h=r[c];(h===Number||h&&h.type===Number)&&(c in this._props&&(this._props[c]=ia(this._props[c])),(l||(l=Object.create(null)))[Ge(c)]=!0)}this._numberProps=l,this._resolveProps(s),this.shadowRoot&&this._applyStyles(o),this._mount(s)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(s=>{s.configureApp=this._def.configureApp,t(this._def=s,!0)}):t(this._def)}_mount(t){this._app=this._createApp(t),this._inheritParentContext(),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const s in n)$e(this,s)||Object.defineProperty(this,s,{get:()=>Hr(n[s])})}_resolveProps(t){const{props:n}=t,s=se(n)?n:Object.keys(n||{});for(const i of Object.keys(this))i[0]!=="_"&&s.includes(i)&&this._setProp(i,this[i]);for(const i of s.map(Ge))Object.defineProperty(this,i,{get(){return this._getProp(i)},set(r){this._setProp(i,r,!0,!0)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const n=this.hasAttribute(t);let s=n?this.getAttribute(t):Wd;const i=Ge(t);n&&this._numberProps&&this._numberProps[i]&&(s=ia(s)),this._setProp(i,s,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,n,s=!0,i=!1){if(n!==this._props[t]&&(n===Wd?delete this._props[t]:(this._props[t]=n,t==="key"&&this._app&&(this._app._ceVNode.key=n)),i&&this._instance&&this._update(),s)){const r=this._ob;r&&(this._processMutations(r.takeRecords()),r.disconnect()),n===!0?this.setAttribute(Gt(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(Gt(t),n+""):n||this.removeAttribute(Gt(t)),r&&r.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),$u(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=Je(this._def,Me(t,this._props));return this._instance||(n.ce=s=>{this._instance=s,s.ce=this,s.isCE=!0;const i=(r,o)=>{this.dispatchEvent(new CustomEvent(r,Ra(o[0])?Me({detail:o},o[0]):{detail:o}))};s.emit=(r,...o)=>{i(r,o),Gt(r)!==r&&i(Gt(r),o)},this._setParent()}),n}_applyStyles(t,n){if(!t)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const s=this._nonce;for(let i=t.length-1;i>=0;i--){const r=document.createElement("style");s&&r.setAttribute("nonce",s),r.textContent=t[i],this.shadowRoot.prepend(r)}}_parseSlots(){const t=this._slots={};let n;for(;n=this.firstChild;){const s=n.nodeType===1&&n.getAttribute("slot")||"default";(t[s]||(t[s]=[])).push(n),this.removeChild(n)}}_renderSlots(){const t=this._getSlots(),n=this._instance.type.__scopeId;for(let s=0;s<t.length;s++){const i=t[s],r=i.getAttribute("name")||"default",o=this._slots[r],l=i.parentNode;if(o)for(const c of o){if(n&&c.nodeType===1){const h=n+"-s",f=document.createTreeWalker(c,1);c.setAttribute(h,"");let u;for(;u=f.nextNode();)u.setAttribute(h,"")}l.insertBefore(c,i)}else for(;i.firstChild;)l.insertBefore(i.firstChild,i);l.removeChild(i)}}_getSlots(){const t=[this];return this._teleportTargets&&t.push(...this._teleportTargets),t.reduce((n,s)=>(n.push(...Array.from(s.querySelectorAll("slot"))),n),[])}_injectChildStyle(t){this._applyStyles(t.styles,t)}_removeChildStyle(t){}}function Lu(e){const t=Wt(),n=t&&t.ce;return n||null}function Ym(){const e=Lu();return e&&e.shadowRoot}function Xm(e="$style"){{const t=Wt();if(!t)return Ne;const n=t.type.__cssModules;if(!n)return Ne;const s=n[e];return s||Ne}}const Zm=new WeakMap,eg=new WeakMap,ya=Symbol("_moveCb"),qd=Symbol("_enterCb"),R0=e=>(delete e.props.mode,e),A0=R0({name:"TransitionGroup",props:Me({},Vm,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Wt(),s=ja();let i,r;return Wr(()=>{if(!i.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!N0(i[0].el,n.vnode.el,o)){i=[];return}i.forEach(M0),i.forEach(O0);const l=i.filter(I0);wc(n.vnode.el),l.forEach(c=>{const h=c.el,f=h.style;kn(h,o),f.transform=f.webkitTransform=f.transitionDuration="";const u=h[ya]=m=>{m&&m.target!==h||(!m||m.propertyName.endsWith("transform"))&&(h.removeEventListener("transitionend",u),h[ya]=null,rs(h,o))};h.addEventListener("transitionend",u)}),i=[]}),()=>{const o=Pe(e),l=qm(o);let c=o.tag||wt;if(i=[],r)for(let h=0;h<r.length;h++){const f=r[h];f.el&&f.el instanceof Element&&(i.push(f),Mn(f,Bs(f,l,s,n)),Zm.set(f,f.el.getBoundingClientRect()))}r=t.default?Ur(t.default()):[];for(let h=0;h<r.length;h++){const f=r[h];f.key!=null&&Mn(f,Bs(f,l,s,n))}return Je(c,null,r)}}}),tg=A0;function M0(e){const t=e.el;t[ya]&&t[ya](),t[qd]&&t[qd]()}function O0(e){eg.set(e,e.el.getBoundingClientRect())}function I0(e){const t=Zm.get(e),n=eg.get(e),s=t.left-n.left,i=t.top-n.top;if(s||i){const r=e.el.style;return r.transform=r.webkitTransform=`translate(${s}px,${i}px)`,r.transitionDuration="0s",e}}function N0(e,t,n){const s=e.cloneNode(),i=e[Ri];i&&i.forEach(l=>{l.split(/\s+/).forEach(c=>c&&s.classList.remove(c))}),n.split(/\s+/).forEach(l=>l&&s.classList.add(l)),s.style.display="none";const r=t.nodeType===1?t:t.parentNode;r.appendChild(s);const{hasTransform:o}=zm(s);return r.removeChild(s),o}const gs=e=>{const t=e.props["onUpdate:modelValue"]||!1;return se(t)?n=>yi(t,n):t};function P0(e){e.target.composing=!0}function zd(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const pn=Symbol("_assign"),Or={created(e,{modifiers:{lazy:t,trim:n,number:s}},i){e[pn]=gs(i);const r=s||i.props&&i.props.type==="number";Vn(e,t?"change":"input",o=>{if(o.target.composing)return;let l=e.value;n&&(l=l.trim()),r&&(l=sa(l)),e[pn](l)}),n&&Vn(e,"change",()=>{e.value=e.value.trim()}),t||(Vn(e,"compositionstart",P0),Vn(e,"compositionend",zd),Vn(e,"change",zd))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:i,number:r}},o){if(e[pn]=gs(o),e.composing)return;const l=(r||e.type==="number")&&!/^0\d/.test(e.value)?sa(e.value):e.value,c=t??"";l!==c&&(document.activeElement===e&&e.type!=="range"&&(s&&t===n||i&&e.value.trim()===c)||(e.value=c))}},Ga={deep:!0,created(e,t,n){e[pn]=gs(n),Vn(e,"change",()=>{const s=e._modelValue,i=Ai(e),r=e.checked,o=e[pn];if(se(s)){const l=Oa(s,i),c=l!==-1;if(r&&!c)o(s.concat(i));else if(!r&&c){const h=[...s];h.splice(l,1),o(h)}}else if(Ws(s)){const l=new Set(s);r?l.add(i):l.delete(i),o(l)}else o(ng(e,r))})},mounted:Kd,beforeUpdate(e,t,n){e[pn]=gs(n),Kd(e,t,n)}};function Kd(e,{value:t,oldValue:n},s){e._modelValue=t;let i;if(se(t))i=Oa(t,s.props.value)>-1;else if(Ws(t))i=t.has(s.props.value);else{if(t===n)return;i=ms(t,ng(e,!0))}e.checked!==i&&(e.checked=i)}const Qa={created(e,{value:t},n){e.checked=ms(t,n.props.value),e[pn]=gs(n),Vn(e,"change",()=>{e[pn](Ai(e))})},beforeUpdate(e,{value:t,oldValue:n},s){e[pn]=gs(s),t!==n&&(e.checked=ms(t,s.props.value))}},Fu={deep:!0,created(e,{value:t,modifiers:{number:n}},s){const i=Ws(t);Vn(e,"change",()=>{const r=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>n?sa(Ai(o)):Ai(o));e[pn](e.multiple?i?new Set(r):r:r[0]),e._assigning=!0,Ss(()=>{e._assigning=!1})}),e[pn]=gs(s)},mounted(e,{value:t}){Jd(e,t)},beforeUpdate(e,t,n){e[pn]=gs(n)},updated(e,{value:t}){e._assigning||Jd(e,t)}};function Jd(e,t){const n=e.multiple,s=se(t);if(!(n&&!s&&!Ws(t))){for(let i=0,r=e.options.length;i<r;i++){const o=e.options[i],l=Ai(o);if(n)if(s){const c=typeof l;c==="string"||c==="number"?o.selected=t.some(h=>String(h)===String(l)):o.selected=Oa(t,l)>-1}else o.selected=t.has(l);else if(ms(Ai(o),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ai(e){return"_value"in e?e._value:e.value}function ng(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Du={created(e,t,n){Uo(e,t,n,null,"created")},mounted(e,t,n){Uo(e,t,n,null,"mounted")},beforeUpdate(e,t,n,s){Uo(e,t,n,s,"beforeUpdate")},updated(e,t,n,s){Uo(e,t,n,s,"updated")}};function sg(e,t){switch(e){case"SELECT":return Fu;case"TEXTAREA":return Or;default:switch(t){case"checkbox":return Ga;case"radio":return Qa;default:return Or}}}function Uo(e,t,n,s,i){const o=sg(e.tagName,n.props&&n.props.type)[i];o&&o(e,t,n,s)}function L0(){Or.getSSRProps=({value:e})=>({value:e}),Qa.getSSRProps=({value:e},t)=>{if(t.props&&ms(t.props.value,e))return{checked:!0}},Ga.getSSRProps=({value:e},t)=>{if(se(e)){if(t.props&&Oa(e,t.props.value)>-1)return{checked:!0}}else if(Ws(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},Du.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=sg(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const F0=["ctrl","shift","alt","meta"],D0={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)=>F0.some(n=>e[`${n}Key`]&&!t.includes(n))},ig=(e,t)=>{const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(i,...r)=>{for(let o=0;o<t.length;o++){const l=D0[t[o]];if(l&&l(i,t))return}return e(i,...r)})},$0={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},rg=(e,t)=>{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=i=>{if(!("key"in i))return;const r=Gt(i.key);if(t.some(o=>o===r||$0[o]===r))return e(i)})},og=Me({patchProp:C0},c0);let br,Gd=!1;function ag(){return br||(br=wu(og))}function lg(){return br=Gd?br:bu(og),Gd=!0,br}const $u=(...e)=>{ag().render(...e)},cg=(...e)=>{lg().hydrate(...e)},Sa=(...e)=>{const t=ag().createApp(...e),{mount:n}=t;return t.mount=s=>{const i=fg(s);if(!i)return;const r=t._component;!be(r)&&!r.render&&!r.template&&(r.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const o=n(i,!1,ug(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),o},t},Bu=(...e)=>{const t=lg().createApp(...e),{mount:n}=t;return t.mount=s=>{const i=fg(s);if(i)return n(i,!0,ug(i))},t};function ug(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function fg(e){return Ee(e)?document.querySelector(e):e}let Qd=!1;const dg=()=>{Qd||(Qd=!0,L0(),p0())},B0=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:iu,BaseTransitionPropsValidators:Ha,Comment:at,DeprecationTypes:jm,EffectScope:Ia,ErrorCodes:tp,ErrorTypeStrings:Pm,Fragment:wt,KeepAlive:Cp,ReactiveEffect:_i,Static:hs,Suspense:mm,Teleport:hp,Text:qn,TrackOpTypes:Qh,Transition:Wm,TransitionGroup:tg,TriggerOpTypes:Yh,VueElement:Gr,assertNumber:ep,callWithAsyncErrorHandling:on,callWithErrorHandling:qs,camelize:Ge,capitalize:vs,cloneVNode:_n,compatUtils:Bm,computed:zn,createApp:Sa,createBlock:Mr,createCommentVNode:Em,createElementBlock:wm,createElementVNode:Ka,createHydrationRenderer:bu,createPropsRestProxy:Kp,createRenderer:wu,createSSRApp:Bu,createSlots:Ip,createStaticVNode:_m,createTextVNode:Ja,createVNode:Je,customRef:tu,defineAsyncComponent:Ep,defineComponent:Ua,defineCustomElement:Pu,defineEmits:Fp,defineExpose:Dp,defineModel:jp,defineOptions:$p,defineProps:Lp,defineSSRCustomElement:Qm,defineSlots:Bp,devtools:Lm,effect:Oh,effectScope:Eh,getCurrentInstance:Wt,getCurrentScope:Jc,getCurrentWatcher:Xh,getTransitionRawChildren:Ur,guardReactiveProps:ku,h:Mu,handleError:ys,hasInjectionContext:Yp,hydrate:cg,hydrateOnIdle:wp,hydrateOnInteraction:_p,hydrateOnMediaQuery:Tp,hydrateOnVisible:bp,initCustomFormatter:Om,initDirectivesForSSR:dg,inject:bi,isMemoSame:Ou,isProxy:jr,isReactive:Wn,isReadonly:An,isRef:pt,isRuntimeOnly:Rm,isShallow:Yt,isVNode:On,markRaw:Zc,mergeDefaults:qp,mergeModels:zp,mergeProps:Ru,nextTick:Ss,normalizeClass:Di,normalizeProps:wh,normalizeStyle:Fi,onActivated:ou,onBeforeMount:lu,onBeforeUnmount:qr,onBeforeUpdate:Wa,onDeactivated:au,onErrorCaptured:du,onMounted:$i,onRenderTracked:fu,onRenderTriggered:uu,onScopeDispose:Ch,onServerPrefetch:cu,onUnmounted:zr,onUpdated:Wr,onWatcherCleanup:nu,openBlock:Ci,popScopeId:ap,provide:vu,proxyRefs:Da,pushScopeId:op,queuePostFlushCb:Ei,reactive:Br,readonly:Cr,ref:de,registerRuntimeCompiler:Au,render:$u,renderList:Op,renderSlot:Np,resolveComponent:xp,resolveDirective:Mp,resolveDynamicComponent:Ap,resolveFilter:$m,resolveTransitionHooks:Bs,setBlockTracking:ki,setDevtoolsHook:Fm,setTransitionHooks:Mn,shallowReactive:Xc,shallowReadonly:Vh,shallowRef:eu,ssrContextKey:_u,ssrUtils:Dm,stop:Ih,toDisplayString:Kc,toHandlerKey:Ps,toHandlers:Pp,toRaw:Pe,toRef:Jh,toRefs:Kh,toValue:zh,transformVNodeArgs:bm,triggerRef:qh,unref:Hr,useAttrs:Vp,useCssModule:Xm,useCssVars:Gm,useHost:Lu,useId:yp,useModel:dm,useSSRContext:Eu,useShadowRoot:Ym,useSlots:Up,useTemplateRef:Sp,useTransitionState:ja,vModelCheckbox:Ga,vModelDynamic:Du,vModelRadio:Qa,vModelSelect:Fu,vModelText:Or,vShow:Nu,version:Iu,warn:Nm,watch:wn,watchEffect:cm,watchPostEffect:um,watchSyncEffect:Cu,withAsyncContext:Jp,withCtx:Ba,withDefaults:Hp,withDirectives:cp,withKeys:rg,withMemo:Im,withModifiers:ig,withScopeId:lp},Symbol.toStringTag,{value:"Module"}));/**
* @vue/compiler-core v3.5.22
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const Ir=Symbol(""),Tr=Symbol(""),ju=Symbol(""),wa=Symbol(""),hg=Symbol(""),Us=Symbol(""),pg=Symbol(""),mg=Symbol(""),Hu=Symbol(""),Uu=Symbol(""),Qr=Symbol(""),Vu=Symbol(""),gg=Symbol(""),Wu=Symbol(""),qu=Symbol(""),zu=Symbol(""),Ku=Symbol(""),Ju=Symbol(""),Gu=Symbol(""),vg=Symbol(""),yg=Symbol(""),Ya=Symbol(""),ba=Symbol(""),Qu=Symbol(""),Yu=Symbol(""),Nr=Symbol(""),Yr=Symbol(""),Xu=Symbol(""),Tc=Symbol(""),j0=Symbol(""),_c=Symbol(""),Ta=Symbol(""),H0=Symbol(""),U0=Symbol(""),Zu=Symbol(""),V0=Symbol(""),W0=Symbol(""),ef=Symbol(""),Sg=Symbol(""),Mi={[Ir]:"Fragment",[Tr]:"Teleport",[ju]:"Suspense",[wa]:"KeepAlive",[hg]:"BaseTransition",[Us]:"openBlock",[pg]:"createBlock",[mg]:"createElementBlock",[Hu]:"createVNode",[Uu]:"createElementVNode",[Qr]:"createCommentVNode",[Vu]:"createTextVNode",[gg]:"createStaticVNode",[Wu]:"resolveComponent",[qu]:"resolveDynamicComponent",[zu]:"resolveDirective",[Ku]:"resolveFilter",[Ju]:"withDirectives",[Gu]:"renderList",[vg]:"renderSlot",[yg]:"createSlots",[Ya]:"toDisplayString",[ba]:"mergeProps",[Qu]:"normalizeClass",[Yu]:"normalizeStyle",[Nr]:"normalizeProps",[Yr]:"guardReactiveProps",[Xu]:"toHandlers",[Tc]:"camelize",[j0]:"capitalize",[_c]:"toHandlerKey",[Ta]:"setBlockTracking",[H0]:"pushScopeId",[U0]:"popScopeId",[Zu]:"withCtx",[V0]:"unref",[W0]:"isRef",[ef]:"withMemo",[Sg]:"isMemoSame"};function q0(e){Object.getOwnPropertySymbols(e).forEach(t=>{Mi[t]=e[t]})}const ln={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function z0(e,t=""){return{type:0,source:t,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:ln}}function Pr(e,t,n,s,i,r,o,l=!1,c=!1,h=!1,f=ln){return e&&(l?(e.helper(Us),e.helper(Ni(e.inSSR,h))):e.helper(Ii(e.inSSR,h)),o&&e.helper(Ju)),{type:13,tag:t,props:n,children:s,patchFlag:i,dynamicProps:r,directives:o,isBlock:l,disableTracking:c,isComponent:h,loc:f}}function Ds(e,t=ln){return{type:17,loc:t,elements:e}}function hn(e,t=ln){return{type:15,loc:t,properties:e}}function ht(e,t){return{type:16,loc:ln,key:Ee(e)?ke(e,!0):e,value:t}}function ke(e,t=!1,n=ln,s=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:s}}function Tn(e,t=ln){return{type:8,loc:t,children:e}}function bt(e,t=[],n=ln){return{type:14,loc:n,callee:e,arguments:t}}function Oi(e,t=void 0,n=!1,s=!1,i=ln){return{type:18,params:e,returns:t,newline:n,isSlot:s,loc:i}}function Ec(e,t,n,s=!0){return{type:19,test:e,consequent:t,alternate:n,newline:s,loc:ln}}function K0(e,t,n=!1,s=!1){return{type:20,index:e,value:t,needPauseTracking:n,inVOnce:s,needArraySpread:!1,loc:ln}}function J0(e){return{type:21,body:e,loc:ln}}function Ii(e,t){return e||t?Hu:Uu}function Ni(e,t){return e||t?pg:mg}function tf(e,{helper:t,removeHelper:n,inSSR:s}){e.isBlock||(e.isBlock=!0,n(Ii(s,e.isComponent)),t(Us),t(Ni(s,e.isComponent)))}const Yd=new Uint8Array([123,123]),Xd=new Uint8Array([125,125]);function Zd(e){return e>=97&&e<=122||e>=65&&e<=90}function nn(e){return e===32||e===10||e===9||e===12||e===13}function is(e){return e===47||e===62||nn(e)}function _a(e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}const Nt={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};class G0{constructor(t,n){this.stack=t,this.cbs=n,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=Yd,this.delimiterClose=Xd,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return this.mode===2&&this.stack.length===0}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=Yd,this.delimiterClose=Xd}getPos(t){let n=1,s=t+1;for(let i=this.newlines.length-1;i>=0;i--){const r=this.newlines[i];if(t>r){n=i+2,s=t-r;break}}return{column:s,line:n,offset:t}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(t){t===60?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):!this.inVPre&&t===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(t))}stateInterpolationOpen(t){if(t===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const n=this.index+1-this.delimiterOpen.length;n>this.sectionStart&&this.cbs.ontext(this.sectionStart,n),this.state=3,this.sectionStart=n}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(t)):(this.state=1,this.stateText(t))}stateInterpolation(t){t===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(t))}stateInterpolationClose(t){t===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(t))}stateSpecialStartSequence(t){const n=this.sequenceIndex===this.currentSequence.length;if(!(n?is(t):(t|32)===this.currentSequence[this.sequenceIndex]))this.inRCDATA=!1;else if(!n){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=6,this.stateInTagName(t)}stateInRCDATA(t){if(this.sequenceIndex===this.currentSequence.length){if(t===62||nn(t)){const n=this.index-this.currentSequence.length;if(this.sectionStart<n){const s=this.index;this.index=n,this.cbs.ontext(this.sectionStart,n),this.index=s}this.sectionStart=n+2,this.stateInClosingTagName(t),this.inRCDATA=!1;return}this.sequenceIndex=0}(t|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===Nt.TitleEnd||this.currentSequence===Nt.TextareaEnd&&!this.inSFCRoot?!this.inVPre&&t===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(t)):this.fastForwardTo(60)&&(this.sequenceIndex=1):this.sequenceIndex=+(t===60)}stateCDATASequence(t){t===Nt.Cdata[this.sequenceIndex]?++this.sequenceIndex===Nt.Cdata.length&&(this.state=28,this.currentSequence=Nt.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(t))}fastForwardTo(t){for(;++this.index<this.buffer.length;){const n=this.buffer.charCodeAt(this.index);if(n===10&&this.newlines.push(this.index),n===t)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(t){t===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===Nt.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index-2):this.cbs.oncomment(this.sectionStart,this.index-2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=1):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):t!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(t,n){this.enterRCDATA(t,n),this.state=31}enterRCDATA(t,n){this.inRCDATA=!0,this.currentSequence=t,this.sequenceIndex=n}stateBeforeTagName(t){t===33?(this.state=22,this.sectionStart=this.index+1):t===63?(this.state=24,this.sectionStart=this.index+1):Zd(t)?(this.sectionStart=this.index,this.mode===0?this.state=6:this.inSFCRoot?this.state=34:this.inXML?this.state=6:t===116?this.state=30:this.state=t===115?29:6):t===47?this.state=8:(this.state=1,this.stateText(t))}stateInTagName(t){is(t)&&this.handleTagName(t)}stateInSFCRootTagName(t){if(is(t)){const n=this.buffer.slice(this.sectionStart,this.index);n!=="template"&&this.enterRCDATA(_a("</"+n),0),this.handleTagName(t)}}handleTagName(t){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(t)}stateBeforeClosingTagName(t){nn(t)||(t===62?(this.state=1,this.sectionStart=this.index+1):(this.state=Zd(t)?9:27,this.sectionStart=this.index))}stateInClosingTagName(t){(t===62||nn(t))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(t))}stateAfterClosingTagName(t){t===62&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(t){t===62?(this.cbs.onopentagend(this.index),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):t===47?this.state=7:t===60&&this.peek()===47?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):nn(t)||this.handleAttrStart(t)}handleAttrStart(t){t===118&&this.peek()===45?(this.state=13,this.sectionStart=this.index):t===46||t===58||t===64||t===35?(this.cbs.ondirname(this.index,this.index+1),this.state=14,this.sectionStart=this.index+1):(this.state=12,this.sectionStart=this.index)}stateInSelfClosingTag(t){t===62?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):nn(t)||(this.state=11,this.stateBeforeAttrName(t))}stateInAttrName(t){(t===61||is(t))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(t))}stateInDirName(t){t===61||is(t)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(t)):t===58?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):t===46&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(t){t===61||is(t)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(t)):t===91?this.state=15:t===46&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(t){t===93?this.state=14:(t===61||is(t))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(t))}stateInDirModifier(t){t===61||is(t)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(t)):t===46&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(t){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(t)}stateAfterAttrName(t){t===61?this.state=18:t===47||t===62?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(t)):nn(t)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(t))}stateBeforeAttrValue(t){t===34?(this.state=19,this.sectionStart=this.index+1):t===39?(this.state=20,this.sectionStart=this.index+1):nn(t)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(t))}handleInAttrValue(t,n){(t===n||this.fastForwardTo(n))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(n===34?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(t){this.handleInAttrValue(t,34)}stateInAttrValueSingleQuotes(t){this.handleInAttrValue(t,39)}stateInAttrValueNoQuotes(t){nn(t)||t===62?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(t)):(t===39||t===60||t===61||t===96)&&this.cbs.onerr(18,this.index)}stateBeforeDeclaration(t){t===91?(this.state=26,this.sequenceIndex=0):this.state=t===45?25:23}stateInDeclaration(t){(t===62||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(t){(t===62||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(t){t===45?(this.state=28,this.currentSequence=Nt.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(t){(t===62||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(t){t===Nt.ScriptEnd[3]?this.startSpecial(Nt.ScriptEnd,4):t===Nt.StyleEnd[3]?this.startSpecial(Nt.StyleEnd,4):(this.state=6,this.stateInTagName(t))}stateBeforeSpecialT(t){t===Nt.TitleEnd[3]?this.startSpecial(Nt.TitleEnd,4):t===Nt.TextareaEnd[3]?this.startSpecial(Nt.TextareaEnd,4):(this.state=6,this.stateInTagName(t))}startEntity(){}stateInEntity(){}parse(t){for(this.buffer=t;this.index<this.buffer.length;){const n=this.buffer.charCodeAt(this.index);switch(n===10&&this.state!==33&&this.newlines.push(this.index),this.state){case 1:{this.stateText(n);break}case 2:{this.stateInterpolationOpen(n);break}case 3:{this.stateInterpolation(n);break}case 4:{this.stateInterpolationClose(n);break}case 31:{this.stateSpecialStartSequence(n);break}case 32:{this.stateInRCDATA(n);break}case 26:{this.stateCDATASequence(n);break}case 19:{this.stateInAttrValueDoubleQuotes(n);break}case 12:{this.stateInAttrName(n);break}case 13:{this.stateInDirName(n);break}case 14:{this.stateInDirArg(n);break}case 15:{this.stateInDynamicDirArg(n);break}case 16:{this.stateInDirModifier(n);break}case 28:{this.stateInCommentLike(n);break}case 27:{this.stateInSpecialComment(n);break}case 11:{this.stateBeforeAttrName(n);break}case 6:{this.stateInTagName(n);break}case 34:{this.stateInSFCRootTagName(n);break}case 9:{this.stateInClosingTagName(n);break}case 5:{this.stateBeforeTagName(n);break}case 17:{this.stateAfterAttrName(n);break}case 20:{this.stateInAttrValueSingleQuotes(n);break}case 18:{this.stateBeforeAttrValue(n);break}case 8:{this.stateBeforeClosingTagName(n);break}case 10:{this.stateAfterClosingTagName(n);break}case 29:{this.stateBeforeSpecialS(n);break}case 30:{this.stateBeforeSpecialT(n);break}case 21:{this.stateInAttrValueNoQuotes(n);break}case 7:{this.stateInSelfClosingTag(n);break}case 23:{this.stateInDeclaration(n);break}case 22:{this.stateBeforeDeclaration(n);break}case 25:{this.stateBeforeComment(n);break}case 24:{this.stateInProcessingInstruction(n);break}case 33:{this.stateInEntity();break}}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(this.state===1||this.state===32&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===19||this.state===20||this.state===21)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}finish(){this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const t=this.buffer.length;this.sectionStart>=t||(this.state===28?this.currentSequence===Nt.CdataEnd?this.cbs.oncdata(this.sectionStart,t):this.cbs.oncomment(this.sectionStart,t):this.state===6||this.state===11||this.state===18||this.state===17||this.state===12||this.state===13||this.state===14||this.state===15||this.state===16||this.state===20||this.state===19||this.state===21||this.state===9||this.cbs.ontext(this.sectionStart,t))}emitCodePoint(t,n){}}function eh(e,{compatConfig:t}){const n=t&&t[e];return e==="MODE"?n||3:n}function $s(e,t){const n=eh("MODE",t),s=eh(e,t);return n===3?s===!0:s!==!1}function Lr(e,t,n,...s){return $s(e,t)}function nf(e){throw e}function wg(e){}function nt(e,t,n,s){const i=`https://vuejs.org/error-reference/#compiler-${e}`,r=new SyntaxError(String(i));return r.code=e,r.loc=t,r}const Qt=e=>e.type===4&&e.isStatic;function bg(e){switch(e){case"Teleport":case"teleport":return Tr;case"Suspense":case"suspense":return ju;case"KeepAlive":case"keep-alive":return wa;case"BaseTransition":case"base-transition":return hg}}const Q0=/^$|^\d|[^\$\w\xA0-\uFFFF]/,sf=e=>!Q0.test(e),Tg=/[A-Za-z_$\xA0-\uFFFF]/,Y0=/[\.\?\w$\xA0-\uFFFF]/,X0=/\s+[.[]\s*|\s*[.[]\s+/g,_g=e=>e.type===4?e.content:e.loc.source,Z0=e=>{const t=_g(e).trim().replace(X0,l=>l.trim());let n=0,s=[],i=0,r=0,o=null;for(let l=0;l<t.length;l++){const c=t.charAt(l);switch(n){case 0:if(c==="[")s.push(n),n=1,i++;else if(c==="(")s.push(n),n=2,r++;else if(!(l===0?Tg:Y0).test(c))return!1;break;case 1:c==="'"||c==='"'||c==="`"?(s.push(n),n=3,o=c):c==="["?i++:c==="]"&&(--i||(n=s.pop()));break;case 2:if(c==="'"||c==='"'||c==="`")s.push(n),n=3,o=c;else if(c==="(")r++;else if(c===")"){if(l===t.length-1)return!1;--r||(n=s.pop())}break;case 3:c===o&&(n=s.pop(),o=null);break}}return!i&&!r},Eg=Z0,eT=/^\s*(?:async\s*)?(?:\([^)]*?\)|[\w$_]+)\s*(?::[^=]+)?=>|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/,tT=e=>eT.test(_g(e)),nT=tT;function dn(e,t,n=!1){for(let s=0;s<e.props.length;s++){const i=e.props[s];if(i.type===7&&(n||i.exp)&&(Ee(t)?i.name===t:t.test(i.name)))return i}}function Xa(e,t,n=!1,s=!1){for(let i=0;i<e.props.length;i++){const r=e.props[i];if(r.type===6){if(n)continue;if(r.name===t&&(r.value||s))return r}else if(r.name==="bind"&&(r.exp||s)&&Is(r.arg,t))return r}}function Is(e,t){return!!(e&&Qt(e)&&e.content===t)}function sT(e){return e.props.some(t=>t.type===7&&t.name==="bind"&&(!t.arg||t.arg.type!==4||!t.arg.isStatic))}function Zl(e){return e.type===5||e.type===2}function th(e){return e.type===7&&e.name==="pre"}function iT(e){return e.type===7&&e.name==="slot"}function Ea(e){return e.type===1&&e.tagType===3}function Ca(e){return e.type===1&&e.tagType===2}const rT=new Set([Nr,Yr]);function Cg(e,t=[]){if(e&&!Ee(e)&&e.type===14){const n=e.callee;if(!Ee(n)&&rT.has(n))return Cg(e.arguments[0],t.concat(e))}return[e,t]}function ka(e,t,n){let s,i=e.type===13?e.props:e.arguments[2],r=[],o;if(i&&!Ee(i)&&i.type===14){const l=Cg(i);i=l[0],r=l[1],o=r[r.length-1]}if(i==null||Ee(i))s=hn([t]);else if(i.type===14){const l=i.arguments[0];!Ee(l)&&l.type===15?nh(t,l)||l.properties.unshift(t):i.callee===Xu?s=bt(n.helper(ba),[hn([t]),i]):i.arguments.unshift(hn([t])),!s&&(s=i)}else i.type===15?(nh(t,i)||i.properties.unshift(t),s=i):(s=bt(n.helper(ba),[hn([t]),i]),o&&o.callee===Yr&&(o=r[r.length-2]));e.type===13?o?o.arguments[0]=s:e.props=s:o?o.arguments[0]=s:e.arguments[2]=s}function nh(e,t){let n=!1;if(e.key.type===4){const s=e.key.content;n=t.properties.some(i=>i.key.type===4&&i.key.content===s)}return n}function Fr(e,t){return`_${t}_${e.replace(/[^\w]/g,(n,s)=>n==="-"?"_":e.charCodeAt(s).toString())}`}function oT(e){return e.type===14&&e.callee===ef?e.arguments[1].returns:e}const aT=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/,kg={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:pi,isPreTag:pi,isIgnoreNewlineTag:pi,isCustomElement:pi,onError:nf,onWarn:wg,comments:!1,prefixIdentifiers:!1};let Be=kg,Dr=null,Kn="",Lt=null,Ie=null,zt="",$n=-1,Os=-1,rf=0,us=!1,Cc=null;const tt=[],ot=new G0(tt,{onerr:Dn,ontext(e,t){Vo(kt(e,t),e,t)},ontextentity(e,t,n){Vo(e,t,n)},oninterpolation(e,t){if(us)return Vo(kt(e,t),e,t);let n=e+ot.delimiterOpen.length,s=t-ot.delimiterClose.length;for(;nn(Kn.charCodeAt(n));)n++;for(;nn(Kn.charCodeAt(s-1));)s--;let i=kt(n,s);i.includes("&")&&(i=Be.decodeEntities(i,!1)),kc({type:5,content:Yo(i,!1,ut(n,s)),loc:ut(e,t)})},onopentagname(e,t){const n=kt(e,t);Lt={type:1,tag:n,ns:Be.getNamespace(n,tt[0],Be.ns),tagType:0,props:[],children:[],loc:ut(e-1,t),codegenNode:void 0}},onopentagend(e){ih(e)},onclosetag(e,t){const n=kt(e,t);if(!Be.isVoidTag(n)){let s=!1;for(let i=0;i<tt.length;i++)if(tt[i].tag.toLowerCase()===n.toLowerCase()){s=!0,i>0&&Dn(24,tt[0].loc.start.offset);for(let o=0;o<=i;o++){const l=tt.shift();Qo(l,t,o<i)}break}s||Dn(23,xg(e,60))}},onselfclosingtag(e){const t=Lt.tag;Lt.isSelfClosing=!0,ih(e),tt[0]&&tt[0].tag===t&&Qo(tt.shift(),e)},onattribname(e,t){Ie={type:6,name:kt(e,t),nameLoc:ut(e,t),value:void 0,loc:ut(e)}},ondirname(e,t){const n=kt(e,t),s=n==="."||n===":"?"bind":n==="@"?"on":n==="#"?"slot":n.slice(2);if(!us&&s===""&&Dn(26,e),us||s==="")Ie={type:6,name:n,nameLoc:ut(e,t),value:void 0,loc:ut(e)};else if(Ie={type:7,name:s,rawName:n,exp:void 0,arg:void 0,modifiers:n==="."?[ke("prop")]:[],loc:ut(e)},s==="pre"){us=ot.inVPre=!0,Cc=Lt;const i=Lt.props;for(let r=0;r<i.length;r++)i[r].type===7&&(i[r]=yT(i[r]))}},ondirarg(e,t){if(e===t)return;const n=kt(e,t);if(us&&!th(Ie))Ie.name+=n,Ns(Ie.nameLoc,t);else{const s=n[0]!=="[";Ie.arg=Yo(s?n:n.slice(1,-1),s,ut(e,t),s?3:0)}},ondirmodifier(e,t){const n=kt(e,t);if(us&&!th(Ie))Ie.name+="."+n,Ns(Ie.nameLoc,t);else if(Ie.name==="slot"){const s=Ie.arg;s&&(s.content+="."+n,Ns(s.loc,t))}else{const s=ke(n,!0,ut(e,t));Ie.modifiers.push(s)}},onattribdata(e,t){zt+=kt(e,t),$n<0&&($n=e),Os=t},onattribentity(e,t,n){zt+=e,$n<0&&($n=t),Os=n},onattribnameend(e){const t=Ie.loc.start.offset,n=kt(t,e);Ie.type===7&&(Ie.rawName=n),Lt.props.some(s=>(s.type===7?s.rawName:s.name)===n)&&Dn(2,t)},onattribend(e,t){if(Lt&&Ie){if(Ns(Ie.loc,t),e!==0)if(zt.includes("&")&&(zt=Be.decodeEntities(zt,!0)),Ie.type===6)Ie.name==="class"&&(zt=Ag(zt).trim()),e===1&&!zt&&Dn(13,t),Ie.value={type:2,content:zt,loc:e===1?ut($n,Os):ut($n-1,Os+1)},ot.inSFCRoot&&Lt.tag==="template"&&Ie.name==="lang"&&zt&&zt!=="html"&&ot.enterRCDATA(_a("</template"),0);else{let n=0;Ie.exp=Yo(zt,!1,ut($n,Os),0,n),Ie.name==="for"&&(Ie.forParseResult=cT(Ie.exp));let s=-1;Ie.name==="bind"&&(s=Ie.modifiers.findIndex(i=>i.content==="sync"))>-1&&Lr("COMPILER_V_BIND_SYNC",Be,Ie.loc,Ie.arg.loc.source)&&(Ie.name="model",Ie.modifiers.splice(s,1))}(Ie.type!==7||Ie.name!=="pre")&&Lt.props.push(Ie)}zt="",$n=Os=-1},oncomment(e,t){Be.comments&&kc({type:3,content:kt(e,t),loc:ut(e-4,t+3)})},onend(){const e=Kn.length;for(let t=0;t<tt.length;t++)Qo(tt[t],e-1),Dn(24,tt[t].loc.start.offset)},oncdata(e,t){tt[0].ns!==0?Vo(kt(e,t),e,t):Dn(1,e-9)},onprocessinginstruction(e){(tt[0]?tt[0].ns:Be.ns)===0&&Dn(21,e-1)}}),sh=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,lT=/^\(|\)$/g;function cT(e){const t=e.loc,n=e.content,s=n.match(aT);if(!s)return;const[,i,r]=s,o=(u,m,v=!1)=>{const w=t.start.offset+m,b=w+u.length;return Yo(u,!1,ut(w,b),0,v?1:0)},l={source:o(r.trim(),n.indexOf(r,i.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let c=i.trim().replace(lT,"").trim();const h=i.indexOf(c),f=c.match(sh);if(f){c=c.replace(sh,"").trim();const u=f[1].trim();let m;if(u&&(m=n.indexOf(u,h+c.length),l.key=o(u,m,!0)),f[2]){const v=f[2].trim();v&&(l.index=o(v,n.indexOf(v,l.key?m+u.length:h+c.length),!0))}}return c&&(l.value=o(c,h,!0)),l}function kt(e,t){return Kn.slice(e,t)}function ih(e){ot.inSFCRoot&&(Lt.innerLoc=ut(e+1,e+1)),kc(Lt);const{tag:t,ns:n}=Lt;n===0&&Be.isPreTag(t)&&rf++,Be.isVoidTag(t)?Qo(Lt,e):(tt.unshift(Lt),(n===1||n===2)&&(ot.inXML=!0)),Lt=null}function Vo(e,t,n){{const r=tt[0]&&tt[0].tag;r!=="script"&&r!=="style"&&e.includes("&")&&(e=Be.decodeEntities(e,!1))}const s=tt[0]||Dr,i=s.children[s.children.length-1];i&&i.type===2?(i.content+=e,Ns(i.loc,n)):s.children.push({type:2,content:e,loc:ut(t,n)})}function Qo(e,t,n=!1){n?Ns(e.loc,xg(t,60)):Ns(e.loc,uT(t,62)+1),ot.inSFCRoot&&(e.children.length?e.innerLoc.end=Me({},e.children[e.children.length-1].loc.end):e.innerLoc.end=Me({},e.innerLoc.start),e.innerLoc.source=kt(e.innerLoc.start.offset,e.innerLoc.end.offset));const{tag:s,ns:i,children:r}=e;if(us||(s==="slot"?e.tagType=2:rh(e)?e.tagType=3:dT(e)&&(e.tagType=1)),ot.inRCDATA||(e.children=Rg(r)),i===0&&Be.isIgnoreNewlineTag(s)){const o=r[0];o&&o.type===2&&(o.content=o.content.replace(/^\r?\n/,""))}i===0&&Be.isPreTag(s)&&rf--,Cc===e&&(us=ot.inVPre=!1,Cc=null),ot.inXML&&(tt[0]?tt[0].ns:Be.ns)===0&&(ot.inXML=!1);{const o=e.props;if(!ot.inSFCRoot&&$s("COMPILER_NATIVE_TEMPLATE",Be)&&e.tag==="template"&&!rh(e)){const c=tt[0]||Dr,h=c.children.indexOf(e);c.children.splice(h,1,...e.children)}const l=o.find(c=>c.type===6&&c.name==="inline-template");l&&Lr("COMPILER_INLINE_TEMPLATE",Be,l.loc)&&e.children.length&&(l.value={type:2,content:kt(e.children[0].loc.start.offset,e.children[e.children.length-1].loc.end.offset),loc:l.loc})}}function uT(e,t){let n=e;for(;Kn.charCodeAt(n)!==t&&n<Kn.length-1;)n++;return n}function xg(e,t){let n=e;for(;Kn.charCodeAt(n)!==t&&n>=0;)n--;return n}const fT=new Set(["if","else","else-if","for","slot"]);function rh({tag:e,props:t}){if(e==="template"){for(let n=0;n<t.length;n++)if(t[n].type===7&&fT.has(t[n].name))return!0}return!1}function dT({tag:e,props:t}){if(Be.isCustomElement(e))return!1;if(e==="component"||hT(e.charCodeAt(0))||bg(e)||Be.isBuiltInComponent&&Be.isBuiltInComponent(e)||Be.isNativeTag&&!Be.isNativeTag(e))return!0;for(let n=0;n<t.length;n++){const s=t[n];if(s.type===6){if(s.name==="is"&&s.value){if(s.value.content.startsWith("vue:"))return!0;if(Lr("COMPILER_IS_ON_ELEMENT",Be,s.loc))return!0}}else if(s.name==="bind"&&Is(s.arg,"is")&&Lr("COMPILER_IS_ON_ELEMENT",Be,s.loc))return!0}return!1}function hT(e){return e>64&&e<91}const pT=/\r\n/g;function Rg(e){const t=Be.whitespace!=="preserve";let n=!1;for(let s=0;s<e.length;s++){const i=e[s];if(i.type===2)if(rf)i.content=i.content.replace(pT,`
`);else if(mT(i.content)){const r=e[s-1]&&e[s-1].type,o=e[s+1]&&e[s+1].type;!r||!o||t&&(r===3&&(o===3||o===1)||r===1&&(o===3||o===1&&gT(i.content)))?(n=!0,e[s]=null):i.content=" "}else t&&(i.content=Ag(i.content))}return n?e.filter(Boolean):e}function mT(e){for(let t=0;t<e.length;t++)if(!nn(e.charCodeAt(t)))return!1;return!0}function gT(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n===10||n===13)return!0}return!1}function Ag(e){let t="",n=!1;for(let s=0;s<e.length;s++)nn(e.charCodeAt(s))?n||(t+=" ",n=!0):(t+=e[s],n=!1);return t}function kc(e){(tt[0]||Dr).children.push(e)}function ut(e,t){return{start:ot.getPos(e),end:t==null?t:ot.getPos(t),source:t==null?t:kt(e,t)}}function vT(e){return ut(e.start.offset,e.end.offset)}function Ns(e,t){e.end=ot.getPos(t),e.source=kt(e.start.offset,t)}function yT(e){const t={type:6,name:e.rawName,nameLoc:ut(e.loc.start.offset,e.loc.start.offset+e.rawName.length),value:void 0,loc:e.loc};if(e.exp){const n=e.exp.loc;n.end.offset<e.loc.end.offset&&(n.start.offset--,n.start.column--,n.end.offset++,n.end.column++),t.value={type:2,content:e.exp.content,loc:n}}return t}function Yo(e,t=!1,n,s=0,i=0){return ke(e,t,n,s)}function Dn(e,t,n){Be.onError(nt(e,ut(t,t)))}function ST(){ot.reset(),Lt=null,Ie=null,zt="",$n=-1,Os=-1,tt.length=0}function wT(e,t){if(ST(),Kn=e,Be=Me({},kg),t){let i;for(i in t)t[i]!=null&&(Be[i]=t[i])}ot.mode=Be.parseMode==="html"?1:Be.parseMode==="sfc"?2:0,ot.inXML=Be.ns===1||Be.ns===2;const n=t&&t.delimiters;n&&(ot.delimiterOpen=_a(n[0]),ot.delimiterClose=_a(n[1]));const s=Dr=z0([],e);return ot.parse(Kn),s.loc=ut(0,e.length),s.children=Rg(s.children),Dr=null,s}function bT(e,t){Xo(e,void 0,t,!!Mg(e))}function Mg(e){const t=e.children.filter(n=>n.type!==3);return t.length===1&&t[0].type===1&&!Ca(t[0])?t[0]:null}function Xo(e,t,n,s=!1,i=!1){const{children:r}=e,o=[];for(let f=0;f<r.length;f++){const u=r[f];if(u.type===1&&u.tagType===0){const m=s?0:sn(u,n);if(m>0){if(m>=2){u.codegenNode.patchFlag=-1,o.push(u);continue}}else{const v=u.codegenNode;if(v.type===13){const w=v.patchFlag;if((w===void 0||w===512||w===1)&&Ig(u,n)>=2){const b=Ng(u);b&&(v.props=n.hoist(b))}v.dynamicProps&&(v.dynamicProps=n.hoist(v.dynamicProps))}}}else if(u.type===12&&(s?0:sn(u,n))>=2){u.codegenNode.type===14&&u.codegenNode.arguments.length>0&&u.codegenNode.arguments.push("-1"),o.push(u);continue}if(u.type===1){const m=u.tagType===1;m&&n.scopes.vSlot++,Xo(u,e,n,!1,i),m&&n.scopes.vSlot--}else if(u.type===11)Xo(u,e,n,u.children.length===1,!0);else if(u.type===9)for(let m=0;m<u.branches.length;m++)Xo(u.branches[m],e,n,u.branches[m].children.length===1,i)}let l=!1;if(o.length===r.length&&e.type===1){if(e.tagType===0&&e.codegenNode&&e.codegenNode.type===13&&se(e.codegenNode.children))e.codegenNode.children=c(Ds(e.codegenNode.children)),l=!0;else if(e.tagType===1&&e.codegenNode&&e.codegenNode.type===13&&e.codegenNode.children&&!se(e.codegenNode.children)&&e.codegenNode.children.type===15){const f=h(e.codegenNode,"default");f&&(f.returns=c(Ds(f.returns)),l=!0)}else if(e.tagType===3&&t&&t.type===1&&t.tagType===1&&t.codegenNode&&t.codegenNode.type===13&&t.codegenNode.children&&!se(t.codegenNode.children)&&t.codegenNode.children.type===15){const f=dn(e,"slot",!0),u=f&&f.arg&&h(t.codegenNode,f.arg);u&&(u.returns=c(Ds(u.returns)),l=!0)}}if(!l)for(const f of o)f.codegenNode=n.cache(f.codegenNode);function c(f){const u=n.cache(f);return u.needArraySpread=!0,u}function h(f,u){if(f.children&&!se(f.children)&&f.children.type===15){const m=f.children.properties.find(v=>v.key===u||v.key.content===u);return m&&m.value}}o.length&&n.transformHoist&&n.transformHoist(r,n,e)}function sn(e,t){const{constantCache:n}=t;switch(e.type){case 1:if(e.tagType!==0)return 0;const s=n.get(e);if(s!==void 0)return s;const i=e.codegenNode;if(i.type!==13||i.isBlock&&e.tag!=="svg"&&e.tag!=="foreignObject"&&e.tag!=="math")return 0;if(i.patchFlag===void 0){let o=3;const l=Ig(e,t);if(l===0)return n.set(e,0),0;l<o&&(o=l);for(let c=0;c<e.children.length;c++){const h=sn(e.children[c],t);if(h===0)return n.set(e,0),0;h<o&&(o=h)}if(o>1)for(let c=0;c<e.props.length;c++){const h=e.props[c];if(h.type===7&&h.name==="bind"&&h.exp){const f=sn(h.exp,t);if(f===0)return n.set(e,0),0;f<o&&(o=f)}}if(i.isBlock){for(let c=0;c<e.props.length;c++)if(e.props[c].type===7)return n.set(e,0),0;t.removeHelper(Us),t.removeHelper(Ni(t.inSSR,i.isComponent)),i.isBlock=!1,t.helper(Ii(t.inSSR,i.isComponent))}return n.set(e,o),o}else return n.set(e,0),0;case 2:case 3:return 3;case 9:case 11:case 10:return 0;case 5:case 12:return sn(e.content,t);case 4:return e.constType;case 8:let r=3;for(let o=0;o<e.children.length;o++){const l=e.children[o];if(Ee(l)||Xt(l))continue;const c=sn(l,t);if(c===0)return 0;c<r&&(r=c)}return r;case 20:return 2;default:return 0}}const TT=new Set([Qu,Yu,Nr,Yr]);function Og(e,t){if(e.type===14&&!Ee(e.callee)&&TT.has(e.callee)){const n=e.arguments[0];if(n.type===4)return sn(n,t);if(n.type===14)return Og(n,t)}return 0}function Ig(e,t){let n=3;const s=Ng(e);if(s&&s.type===15){const{properties:i}=s;for(let r=0;r<i.length;r++){const{key:o,value:l}=i[r],c=sn(o,t);if(c===0)return c;c<n&&(n=c);let h;if(l.type===4?h=sn(l,t):l.type===14?h=Og(l,t):h=0,h===0)return h;h<n&&(n=h)}}return n}function Ng(e){const t=e.codegenNode;if(t.type===13)return t.props}function _T(e,{filename:t="",prefixIdentifiers:n=!1,hoistStatic:s=!1,hmr:i=!1,cacheHandlers:r=!1,nodeTransforms:o=[],directiveTransforms:l={},transformHoist:c=null,isBuiltInComponent:h=Mt,isCustomElement:f=Mt,expressionPlugins:u=[],scopeId:m=null,slotted:v=!0,ssr:w=!1,inSSR:b=!1,ssrCssVars:H="",bindingMetadata:P=Ne,inline:M=!1,isTS:S=!1,onError:_=nf,onWarn:x=wg,compatConfig:C}){const V=t.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),F={filename:t,selfName:V&&vs(Ge(V[1])),prefixIdentifiers:n,hoistStatic:s,hmr:i,cacheHandlers:r,nodeTransforms:o,directiveTransforms:l,transformHoist:c,isBuiltInComponent:h,isCustomElement:f,expressionPlugins:u,scopeId:m,slotted:v,ssr:w,inSSR:b,ssrCssVars:H,bindingMetadata:P,inline:M,isTS:S,onError:_,onWarn:x,compatConfig:C,root:e,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],cached:[],constantCache:new WeakMap,temps:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,grandParent:null,currentNode:e,childIndex:0,inVOnce:!1,helper(R){const N=F.helpers.get(R)||0;return F.helpers.set(R,N+1),R},removeHelper(R){const N=F.helpers.get(R);if(N){const B=N-1;B?F.helpers.set(R,B):F.helpers.delete(R)}},helperString(R){return`_${Mi[F.helper(R)]}`},replaceNode(R){F.parent.children[F.childIndex]=F.currentNode=R},removeNode(R){const N=F.parent.children,B=R?N.indexOf(R):F.currentNode?F.childIndex:-1;!R||R===F.currentNode?(F.currentNode=null,F.onNodeRemoved()):F.childIndex>B&&(F.childIndex--,F.onNodeRemoved()),F.parent.children.splice(B,1)},onNodeRemoved:Mt,addIdentifiers(R){},removeIdentifiers(R){},hoist(R){Ee(R)&&(R=ke(R)),F.hoists.push(R);const N=ke(`_hoisted_${F.hoists.length}`,!1,R.loc,2);return N.hoisted=R,N},cache(R,N=!1,B=!1){const A=K0(F.cached.length,R,N,B);return F.cached.push(A),A}};return F.filters=new Set,F}function ET(e,t){const n=_T(e,t);Za(e,n),t.hoistStatic&&bT(e,n),t.ssr||CT(e,n),e.helpers=new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.transformed=!0,e.filters=[...n.filters]}function CT(e,t){const{helper:n}=t,{children:s}=e;if(s.length===1){const i=Mg(e);if(i&&i.codegenNode){const r=i.codegenNode;r.type===13&&tf(r,t),e.codegenNode=r}else e.codegenNode=s[0]}else if(s.length>1){let i=64;e.codegenNode=Pr(t,n(Ir),void 0,e.children,i,void 0,void 0,!0,void 0,!1)}}function kT(e,t){let n=0;const s=()=>{n--};for(;n<e.children.length;n++){const i=e.children[n];Ee(i)||(t.grandParent=t.parent,t.parent=e,t.childIndex=n,t.onNodeRemoved=s,Za(i,t))}}function Za(e,t){t.currentNode=e;const{nodeTransforms:n}=t,s=[];for(let r=0;r<n.length;r++){const o=n[r](e,t);if(o&&(se(o)?s.push(...o):s.push(o)),t.currentNode)e=t.currentNode;else return}switch(e.type){case 3:t.ssr||t.helper(Qr);break;case 5:t.ssr||t.helper(Ya);break;case 9:for(let r=0;r<e.branches.length;r++)Za(e.branches[r],t);break;case 10:case 11:case 1:case 0:kT(e,t);break}t.currentNode=e;let i=s.length;for(;i--;)s[i]()}function Pg(e,t){const n=Ee(e)?s=>s===e:s=>e.test(s);return(s,i)=>{if(s.type===1){const{props:r}=s;if(s.tagType===3&&r.some(iT))return;const o=[];for(let l=0;l<r.length;l++){const c=r[l];if(c.type===7&&n(c.name)){r.splice(l,1),l--;const h=t(s,c,i);h&&o.push(h)}}return o}}}const el="/*@__PURE__*/",Lg=e=>`${Mi[e]}: _${Mi[e]}`;function xT(e,{mode:t="function",prefixIdentifiers:n=t==="module",sourceMap:s=!1,filename:i="template.vue.html",scopeId:r=null,optimizeImports:o=!1,runtimeGlobalName:l="Vue",runtimeModuleName:c="vue",ssrRuntimeModuleName:h="vue/server-renderer",ssr:f=!1,isTS:u=!1,inSSR:m=!1}){const v={mode:t,prefixIdentifiers:n,sourceMap:s,filename:i,scopeId:r,optimizeImports:o,runtimeGlobalName:l,runtimeModuleName:c,ssrRuntimeModuleName:h,ssr:f,isTS:u,inSSR:m,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper(b){return`_${Mi[b]}`},push(b,H=-2,P){v.code+=b},indent(){w(++v.indentLevel)},deindent(b=!1){b?--v.indentLevel:w(--v.indentLevel)},newline(){w(v.indentLevel)}};function w(b){v.push(`
`+" ".repeat(b),0)}return v}function RT(e,t={}){const n=xT(e,t);t.onContextCreated&&t.onContextCreated(n);const{mode:s,push:i,prefixIdentifiers:r,indent:o,deindent:l,newline:c,scopeId:h,ssr:f}=n,u=Array.from(e.helpers),m=u.length>0,v=!r&&s!=="module";AT(e,n);const b=f?"ssrRender":"render",P=(f?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(i(`function ${b}(${P}) {`),o(),v&&(i("with (_ctx) {"),o(),m&&(i(`const { ${u.map(Lg).join(", ")} } = _Vue
`,-1),c())),e.components.length&&(ec(e.components,"component",n),(e.directives.length||e.temps>0)&&c()),e.directives.length&&(ec(e.directives,"directive",n),e.temps>0&&c()),e.filters&&e.filters.length&&(c(),ec(e.filters,"filter",n),c()),e.temps>0){i("let ");for(let M=0;M<e.temps;M++)i(`${M>0?", ":""}_temp${M}`)}return(e.components.length||e.directives.length||e.temps)&&(i(`
`,0),c()),f||i("return "),e.codegenNode?$t(e.codegenNode,n):i("null"),v&&(l(),i("}")),l(),i("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function AT(e,t){const{ssr:n,prefixIdentifiers:s,push:i,newline:r,runtimeModuleName:o,runtimeGlobalName:l,ssrRuntimeModuleName:c}=t,h=l,f=Array.from(e.helpers);if(f.length>0&&(i(`const _Vue = ${h}
`,-1),e.hoists.length)){const u=[Hu,Uu,Qr,Vu,gg].filter(m=>f.includes(m)).map(Lg).join(", ");i(`const { ${u} } = _Vue
`,-1)}MT(e.hoists,t),r(),i("return ")}function ec(e,t,{helper:n,push:s,newline:i,isTS:r}){const o=n(t==="filter"?Ku:t==="component"?Wu:zu);for(let l=0;l<e.length;l++){let c=e[l];const h=c.endsWith("__self");h&&(c=c.slice(0,-6)),s(`const ${Fr(c,t)} = ${o}(${JSON.stringify(c)}${h?", true":""})${r?"!":""}`),l<e.length-1&&i()}}function MT(e,t){if(!e.length)return;t.pure=!0;const{push:n,newline:s}=t;s();for(let i=0;i<e.length;i++){const r=e[i];r&&(n(`const _hoisted_${i+1} = `),$t(r,t),s())}t.pure=!1}function of(e,t){const n=e.length>3||!1;t.push("["),n&&t.indent(),Xr(e,t,n),n&&t.deindent(),t.push("]")}function Xr(e,t,n=!1,s=!0){const{push:i,newline:r}=t;for(let o=0;o<e.length;o++){const l=e[o];Ee(l)?i(l,-3):se(l)?of(l,t):$t(l,t),o<e.length-1&&(n?(s&&i(","),r()):s&&i(", "))}}function $t(e,t){if(Ee(e)){t.push(e,-3);return}if(Xt(e)){t.push(t.helper(e));return}switch(e.type){case 1:case 9:case 11:$t(e.codegenNode,t);break;case 2:OT(e,t);break;case 4:Fg(e,t);break;case 5:IT(e,t);break;case 12:$t(e.codegenNode,t);break;case 8:Dg(e,t);break;case 3:PT(e,t);break;case 13:LT(e,t);break;case 14:DT(e,t);break;case 15:$T(e,t);break;case 17:BT(e,t);break;case 18:jT(e,t);break;case 19:HT(e,t);break;case 20:UT(e,t);break;case 21:Xr(e.body,t,!0,!1);break}}function OT(e,t){t.push(JSON.stringify(e.content),-3,e)}function Fg(e,t){const{content:n,isStatic:s}=e;t.push(s?JSON.stringify(n):n,-3,e)}function IT(e,t){const{push:n,helper:s,pure:i}=t;i&&n(el),n(`${s(Ya)}(`),$t(e.content,t),n(")")}function Dg(e,t){for(let n=0;n<e.children.length;n++){const s=e.children[n];Ee(s)?t.push(s,-3):$t(s,t)}}function NT(e,t){const{push:n}=t;if(e.type===8)n("["),Dg(e,t),n("]");else if(e.isStatic){const s=sf(e.content)?e.content:JSON.stringify(e.content);n(s,-2,e)}else n(`[${e.content}]`,-3,e)}function PT(e,t){const{push:n,helper:s,pure:i}=t;i&&n(el),n(`${s(Qr)}(${JSON.stringify(e.content)})`,-3,e)}function LT(e,t){const{push:n,helper:s,pure:i}=t,{tag:r,props:o,children:l,patchFlag:c,dynamicProps:h,directives:f,isBlock:u,disableTracking:m,isComponent:v}=e;let w;c&&(w=String(c)),f&&n(s(Ju)+"("),u&&n(`(${s(Us)}(${m?"true":""}), `),i&&n(el);const b=u?Ni(t.inSSR,v):Ii(t.inSSR,v);n(s(b)+"(",-2,e),Xr(FT([r,o,l,w,h]),t),n(")"),u&&n(")"),f&&(n(", "),$t(f,t),n(")"))}function FT(e){let t=e.length;for(;t--&&e[t]==null;);return e.slice(0,t+1).map(n=>n||"null")}function DT(e,t){const{push:n,helper:s,pure:i}=t,r=Ee(e.callee)?e.callee:s(e.callee);i&&n(el),n(r+"(",-2,e),Xr(e.arguments,t),n(")")}function $T(e,t){const{push:n,indent:s,deindent:i,newline:r}=t,{properties:o}=e;if(!o.length){n("{}",-2,e);return}const l=o.length>1||!1;n(l?"{":"{ "),l&&s();for(let c=0;c<o.length;c++){const{key:h,value:f}=o[c];NT(h,t),n(": "),$t(f,t),c<o.length-1&&(n(","),r())}l&&i(),n(l?"}":" }")}function BT(e,t){of(e.elements,t)}function jT(e,t){const{push:n,indent:s,deindent:i}=t,{params:r,returns:o,body:l,newline:c,isSlot:h}=e;h&&n(`_${Mi[Zu]}(`),n("(",-2,e),se(r)?Xr(r,t):r&&$t(r,t),n(") => "),(c||l)&&(n("{"),s()),o?(c&&n("return "),se(o)?of(o,t):$t(o,t)):l&&$t(l,t),(c||l)&&(i(),n("}")),h&&(e.isNonScopedSlot&&n(", undefined, true"),n(")"))}function HT(e,t){const{test:n,consequent:s,alternate:i,newline:r}=e,{push:o,indent:l,deindent:c,newline:h}=t;if(n.type===4){const u=!sf(n.content);u&&o("("),Fg(n,t),u&&o(")")}else o("("),$t(n,t),o(")");r&&l(),t.indentLevel++,r||o(" "),o("? "),$t(s,t),t.indentLevel--,r&&h(),r||o(" "),o(": ");const f=i.type===19;f||t.indentLevel++,$t(i,t),f||t.indentLevel--,r&&c(!0)}function UT(e,t){const{push:n,helper:s,indent:i,deindent:r,newline:o}=t,{needPauseTracking:l,needArraySpread:c}=e;c&&n("[...("),n(`_cache[${e.index}] || (`),l&&(i(),n(`${s(Ta)}(-1`),e.inVOnce&&n(", true"),n("),"),o(),n("(")),n(`_cache[${e.index}] = `),$t(e.value,t),l&&(n(`).cacheIndex = ${e.index},`),o(),n(`${s(Ta)}(1),`),o(),n(`_cache[${e.index}]`),r()),n(")"),c&&n(")]")}new RegExp("\\b"+"arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b")+"\\b");const VT=Pg(/^(?:if|else|else-if)$/,(e,t,n)=>WT(e,t,n,(s,i,r)=>{const o=n.parent.children;let l=o.indexOf(s),c=0;for(;l-->=0;){const h=o[l];h&&h.type===9&&(c+=h.branches.length)}return()=>{if(r)s.codegenNode=ah(i,c,n);else{const h=qT(s.codegenNode);h.alternate=ah(i,c+s.branches.length-1,n)}}}));function WT(e,t,n,s){if(t.name!=="else"&&(!t.exp||!t.exp.content.trim())){const i=t.exp?t.exp.loc:e.loc;n.onError(nt(28,t.loc)),t.exp=ke("true",!1,i)}if(t.name==="if"){const i=oh(e,t),r={type:9,loc:vT(e.loc),branches:[i]};if(n.replaceNode(r),s)return s(r,i,!0)}else{const i=n.parent.children;let r=i.indexOf(e);for(;r-->=-1;){const o=i[r];if(o&&o.type===3){n.removeNode(o);continue}if(o&&o.type===2&&!o.content.trim().length){n.removeNode(o);continue}if(o&&o.type===9){(t.name==="else-if"||t.name==="else")&&o.branches[o.branches.length-1].condition===void 0&&n.onError(nt(30,e.loc)),n.removeNode();const l=oh(e,t);o.branches.push(l);const c=s&&s(o,l,!1);Za(l,n),c&&c(),n.currentNode=null}else n.onError(nt(30,e.loc));break}}}function oh(e,t){const n=e.tagType===3;return{type:10,loc:e.loc,condition:t.name==="else"?void 0:t.exp,children:n&&!dn(e,"for")?e.children:[e],userKey:Xa(e,"key"),isTemplateIf:n}}function ah(e,t,n){return e.condition?Ec(e.condition,lh(e,t,n),bt(n.helper(Qr),['""',"true"])):lh(e,t,n)}function lh(e,t,n){const{helper:s}=n,i=ht("key",ke(`${t}`,!1,ln,2)),{children:r}=e,o=r[0];if(r.length!==1||o.type!==1)if(r.length===1&&o.type===11){const c=o.codegenNode;return ka(c,i,n),c}else return Pr(n,s(Ir),hn([i]),r,64,void 0,void 0,!0,!1,!1,e.loc);else{const c=o.codegenNode,h=oT(c);return h.type===13&&tf(h,n),ka(h,i,n),c}}function qT(e){for(;;)if(e.type===19)if(e.alternate.type===19)e=e.alternate;else return e;else e.type===20&&(e=e.value)}const zT=Pg("for",(e,t,n)=>{const{helper:s,removeHelper:i}=n;return KT(e,t,n,r=>{const o=bt(s(Gu),[r.source]),l=Ea(e),c=dn(e,"memo"),h=Xa(e,"key",!1,!0);h&&h.type;let f=h&&(h.type===6?h.value?ke(h.value.content,!0):void 0:h.exp);const u=h&&f?ht("key",f):null,m=r.source.type===4&&r.source.constType>0,v=m?64:h?128:256;return r.codegenNode=Pr(n,s(Ir),void 0,o,v,void 0,void 0,!0,!m,!1,e.loc),()=>{let w;const{children:b}=r,H=b.length!==1||b[0].type!==1,P=Ca(e)?e:l&&e.children.length===1&&Ca(e.children[0])?e.children[0]:null;if(P?(w=P.codegenNode,l&&u&&ka(w,u,n)):H?w=Pr(n,s(Ir),u?hn([u]):void 0,e.children,64,void 0,void 0,!0,void 0,!1):(w=b[0].codegenNode,l&&u&&ka(w,u,n),w.isBlock!==!m&&(w.isBlock?(i(Us),i(Ni(n.inSSR,w.isComponent))):i(Ii(n.inSSR,w.isComponent))),w.isBlock=!m,w.isBlock?(s(Us),s(Ni(n.inSSR,w.isComponent))):s(Ii(n.inSSR,w.isComponent))),c){const M=Oi(xc(r.parseResult,[ke("_cached")]));M.body=J0([Tn(["const _memo = (",c.exp,")"]),Tn(["if (_cached",...f?[" && _cached.key === ",f]:[],` && ${n.helperString(Sg)}(_cached, _memo)) return _cached`]),Tn(["const _item = ",w]),ke("_item.memo = _memo"),ke("return _item")]),o.arguments.push(M,ke("_cache"),ke(String(n.cached.length))),n.cached.push(null)}else o.arguments.push(Oi(xc(r.parseResult),w,!0))}})});function KT(e,t,n,s){if(!t.exp){n.onError(nt(31,t.loc));return}const i=t.forParseResult;if(!i){n.onError(nt(32,t.loc));return}$g(i);const{addIdentifiers:r,removeIdentifiers:o,scopes:l}=n,{source:c,value:h,key:f,index:u}=i,m={type:11,loc:t.loc,source:c,valueAlias:h,keyAlias:f,objectIndexAlias:u,parseResult:i,children:Ea(e)?e.children:[e]};n.replaceNode(m),l.vFor++;const v=s&&s(m);return()=>{l.vFor--,v&&v()}}function $g(e,t){e.finalized||(e.finalized=!0)}function xc({value:e,key:t,index:n},s=[]){return JT([e,t,n,...s])}function JT(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map((n,s)=>n||ke("_".repeat(s+1),!1))}const ch=ke("undefined",!1),GT=(e,t)=>{if(e.type===1&&(e.tagType===1||e.tagType===3)){const n=dn(e,"slot");if(n)return n.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},QT=(e,t,n,s)=>Oi(e,n,!1,!0,n.length?n[0].loc:s);function YT(e,t,n=QT){t.helper(Zu);const{children:s,loc:i}=e,r=[],o=[];let l=t.scopes.vSlot>0||t.scopes.vFor>0;const c=dn(e,"slot",!0);if(c){const{arg:H,exp:P}=c;H&&!Qt(H)&&(l=!0),r.push(ht(H||ke("default",!0),n(P,void 0,s,i)))}let h=!1,f=!1;const u=[],m=new Set;let v=0;for(let H=0;H<s.length;H++){const P=s[H];let M;if(!Ea(P)||!(M=dn(P,"slot",!0))){P.type!==3&&u.push(P);continue}if(c){t.onError(nt(37,M.loc));break}h=!0;const{children:S,loc:_}=P,{arg:x=ke("default",!0),exp:C,loc:V}=M;let F;Qt(x)?F=x?x.content:"default":l=!0;const R=dn(P,"for"),N=n(C,R,S,_);let B,A;if(B=dn(P,"if"))l=!0,o.push(Ec(B.exp,Wo(x,N,v++),ch));else if(A=dn(P,/^else(?:-if)?$/,!0)){let K=H,re;for(;K--&&(re=s[K],!(re.type!==3&&Rc(re))););if(re&&Ea(re)&&dn(re,/^(?:else-)?if$/)){let oe=o[o.length-1];for(;oe.alternate.type===19;)oe=oe.alternate;oe.alternate=A.exp?Ec(A.exp,Wo(x,N,v++),ch):Wo(x,N,v++)}else t.onError(nt(30,A.loc))}else if(R){l=!0;const K=R.forParseResult;K?($g(K),o.push(bt(t.helper(Gu),[K.source,Oi(xc(K),Wo(x,N),!0)]))):t.onError(nt(32,R.loc))}else{if(F){if(m.has(F)){t.onError(nt(38,V));continue}m.add(F),F==="default"&&(f=!0)}r.push(ht(x,N))}}if(!c){const H=(P,M)=>{const S=n(P,void 0,M,i);return t.compatConfig&&(S.isNonScopedSlot=!0),ht("default",S)};h?u.length&&u.some(P=>Rc(P))&&(f?t.onError(nt(39,u[0].loc)):r.push(H(void 0,u))):r.push(H(void 0,s))}const w=l?2:Zo(e.children)?3:1;let b=hn(r.concat(ht("_",ke(w+"",!1))),i);return o.length&&(b=bt(t.helper(yg),[b,Ds(o)])),{slots:b,hasDynamicSlots:l}}function Wo(e,t,n){const s=[ht("name",e),ht("fn",t)];return n!=null&&s.push(ht("key",ke(String(n),!0))),hn(s)}function Zo(e){for(let t=0;t<e.length;t++){const n=e[t];switch(n.type){case 1:if(n.tagType===2||Zo(n.children))return!0;break;case 9:if(Zo(n.branches))return!0;break;case 10:case 11:if(Zo(n.children))return!0;break}}return!1}function Rc(e){return e.type!==2&&e.type!==12?!0:e.type===2?!!e.content.trim():Rc(e.content)}const Bg=new WeakMap,XT=(e,t)=>function(){if(e=t.currentNode,!(e.type===1&&(e.tagType===0||e.tagType===1)))return;const{tag:s,props:i}=e,r=e.tagType===1;let o=r?ZT(e,t):`"${s}"`;const l=je(o)&&o.callee===qu;let c,h,f=0,u,m,v,w=l||o===Tr||o===ju||!r&&(s==="svg"||s==="foreignObject"||s==="math");if(i.length>0){const b=jg(e,t,void 0,r,l);c=b.props,f=b.patchFlag,m=b.dynamicPropNames;const H=b.directives;v=H&&H.length?Ds(H.map(P=>t_(P,t))):void 0,b.shouldUseBlock&&(w=!0)}if(e.children.length>0)if(o===wa&&(w=!0,f|=1024),r&&o!==Tr&&o!==wa){const{slots:H,hasDynamicSlots:P}=YT(e,t);h=H,P&&(f|=1024)}else if(e.children.length===1&&o!==Tr){const H=e.children[0],P=H.type,M=P===5||P===8;M&&sn(H,t)===0&&(f|=1),M||P===2?h=H:h=e.children}else h=e.children;m&&m.length&&(u=n_(m)),e.codegenNode=Pr(t,o,c,h,f===0?void 0:f,u,v,!!w,!1,r,e.loc)};function ZT(e,t,n=!1){let{tag:s}=e;const i=Ac(s),r=Xa(e,"is",!1,!0);if(r)if(i||$s("COMPILER_IS_ON_ELEMENT",t)){let l;if(r.type===6?l=r.value&&ke(r.value.content,!0):(l=r.exp,l||(l=ke("is",!1,r.arg.loc))),l)return bt(t.helper(qu),[l])}else r.type===6&&r.value.content.startsWith("vue:")&&(s=r.value.content.slice(4));const o=bg(s)||t.isBuiltInComponent(s);return o?(n||t.helper(o),o):(t.helper(Wu),t.components.add(s),Fr(s,"component"))}function jg(e,t,n=e.props,s,i,r=!1){const{tag:o,loc:l,children:c}=e;let h=[];const f=[],u=[],m=c.length>0;let v=!1,w=0,b=!1,H=!1,P=!1,M=!1,S=!1,_=!1;const x=[],C=N=>{h.length&&(f.push(hn(uh(h),l)),h=[]),N&&f.push(N)},V=()=>{t.scopes.vFor>0&&h.push(ht(ke("ref_for",!0),ke("true")))},F=({key:N,value:B})=>{if(Qt(N)){const A=N.content,K=Vs(A);if(K&&(!s||i)&&A.toLowerCase()!=="onclick"&&A!=="onUpdate:modelValue"&&!fs(A)&&(M=!0),K&&fs(A)&&(_=!0),K&&B.type===14&&(B=B.arguments[0]),B.type===20||(B.type===4||B.type===8)&&sn(B,t)>0)return;A==="ref"?b=!0:A==="class"?H=!0:A==="style"?P=!0:A!=="key"&&!x.includes(A)&&x.push(A),s&&(A==="class"||A==="style")&&!x.includes(A)&&x.push(A)}else S=!0};for(let N=0;N<n.length;N++){const B=n[N];if(B.type===6){const{loc:A,name:K,nameLoc:re,value:oe}=B;let J=!0;if(K==="ref"&&(b=!0,V()),K==="is"&&(Ac(o)||oe&&oe.content.startsWith("vue:")||$s("COMPILER_IS_ON_ELEMENT",t)))continue;h.push(ht(ke(K,!0,re),ke(oe?oe.content:"",J,oe?oe.loc:A)))}else{const{name:A,arg:K,exp:re,loc:oe,modifiers:J}=B,fe=A==="bind",Z=A==="on";if(A==="slot"){s||t.onError(nt(40,oe));continue}if(A==="once"||A==="memo"||A==="is"||fe&&Is(K,"is")&&(Ac(o)||$s("COMPILER_IS_ON_ELEMENT",t))||Z&&r)continue;if((fe&&Is(K,"key")||Z&&m&&Is(K,"vue:before-update"))&&(v=!0),fe&&Is(K,"ref")&&V(),!K&&(fe||Z)){if(S=!0,re)if(fe){if(C(),$s("COMPILER_V_BIND_OBJECT_ORDER",t)){f.unshift(re);continue}V(),C(),f.push(re)}else C({type:14,loc:oe,callee:t.helper(Xu),arguments:s?[re]:[re,"true"]});else t.onError(nt(fe?34:35,oe));continue}fe&&J.some(ft=>ft.content==="prop")&&(w|=32);const Ae=t.directiveTransforms[A];if(Ae){const{props:ft,needRuntime:_e}=Ae(B,e,t);!r&&ft.forEach(F),Z&&K&&!Qt(K)?C(hn(ft,l)):h.push(...ft),_e&&(u.push(B),Xt(_e)&&Bg.set(B,_e))}else pw(A)||(u.push(B),m&&(v=!0))}}let R;if(f.length?(C(),f.length>1?R=bt(t.helper(ba),f,l):R=f[0]):h.length&&(R=hn(uh(h),l)),S?w|=16:(H&&!s&&(w|=2),P&&!s&&(w|=4),x.length&&(w|=8),M&&(w|=32)),!v&&(w===0||w===32)&&(b||_||u.length>0)&&(w|=512),!t.inSSR&&R)switch(R.type){case 15:let N=-1,B=-1,A=!1;for(let oe=0;oe<R.properties.length;oe++){const J=R.properties[oe].key;Qt(J)?J.content==="class"?N=oe:J.content==="style"&&(B=oe):J.isHandlerKey||(A=!0)}const K=R.properties[N],re=R.properties[B];A?R=bt(t.helper(Nr),[R]):(K&&!Qt(K.value)&&(K.value=bt(t.helper(Qu),[K.value])),re&&(P||re.value.type===4&&re.value.content.trim()[0]==="["||re.value.type===17)&&(re.value=bt(t.helper(Yu),[re.value])));break;case 14:break;default:R=bt(t.helper(Nr),[bt(t.helper(Yr),[R])]);break}return{props:R,directives:u,patchFlag:w,dynamicPropNames:x,shouldUseBlock:v}}function uh(e){const t=new Map,n=[];for(let s=0;s<e.length;s++){const i=e[s];if(i.key.type===8||!i.key.isStatic){n.push(i);continue}const r=i.key.content,o=t.get(r);o?(r==="style"||r==="class"||Vs(r))&&e_(o,i):(t.set(r,i),n.push(i))}return n}function e_(e,t){e.value.type===17?e.value.elements.push(t.value):e.value=Ds([e.value,t.value],e.loc)}function t_(e,t){const n=[],s=Bg.get(e);s?n.push(t.helperString(s)):(t.helper(zu),t.directives.add(e.name),n.push(Fr(e.name,"directive")));const{loc:i}=e;if(e.exp&&n.push(e.exp),e.arg&&(e.exp||n.push("void 0"),n.push(e.arg)),Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));const r=ke("true",!1,i);n.push(hn(e.modifiers.map(o=>ht(o,r)),i))}return Ds(n,e.loc)}function n_(e){let t="[";for(let n=0,s=e.length;n<s;n++)t+=JSON.stringify(e[n]),n<s-1&&(t+=", ");return t+"]"}function Ac(e){return e==="component"||e==="Component"}const s_=(e,t)=>{if(Ca(e)){const{children:n,loc:s}=e,{slotName:i,slotProps:r}=i_(e,t),o=[t.prefixIdentifiers?"_ctx.$slots":"$slots",i,"{}","undefined","true"];let l=2;r&&(o[2]=r,l=3),n.length&&(o[3]=Oi([],n,!1,!1,s),l=4),t.scopeId&&!t.slotted&&(l=5),o.splice(l),e.codegenNode=bt(t.helper(vg),o,s)}};function i_(e,t){let n='"default"',s;const i=[];for(let r=0;r<e.props.length;r++){const o=e.props[r];if(o.type===6)o.value&&(o.name==="name"?n=JSON.stringify(o.value.content):(o.name=Ge(o.name),i.push(o)));else if(o.name==="bind"&&Is(o.arg,"name")){if(o.exp)n=o.exp;else if(o.arg&&o.arg.type===4){const l=Ge(o.arg.content);n=o.exp=ke(l,!1,o.arg.loc)}}else o.name==="bind"&&o.arg&&Qt(o.arg)&&(o.arg.content=Ge(o.arg.content)),i.push(o)}if(i.length>0){const{props:r,directives:o}=jg(e,t,i,!1,!1);s=r,o.length&&t.onError(nt(36,o[0].loc))}return{slotName:n,slotProps:s}}const Hg=(e,t,n,s)=>{const{loc:i,modifiers:r,arg:o}=e;!e.exp&&!r.length&&n.onError(nt(35,i));let l;if(o.type===4)if(o.isStatic){let u=o.content;u.startsWith("vue:")&&(u=`vnode-${u.slice(4)}`);const m=t.tagType!==0||u.startsWith("vnode")||!/[A-Z]/.test(u)?Ps(Ge(u)):`on:${u}`;l=ke(m,!0,o.loc)}else l=Tn([`${n.helperString(_c)}(`,o,")"]);else l=o,l.children.unshift(`${n.helperString(_c)}(`),l.children.push(")");let c=e.exp;c&&!c.content.trim()&&(c=void 0);let h=n.cacheHandlers&&!c&&!n.inVOnce;if(c){const u=Eg(c),m=!(u||nT(c)),v=c.content.includes(";");(m||h&&u)&&(c=Tn([`${m?"$event":"(...args)"} => ${v?"{":"("}`,c,v?"}":")"]))}let f={props:[ht(l,c||ke("() => {}",!1,i))]};return s&&(f=s(f)),h&&(f.props[0].value=n.cache(f.props[0].value)),f.props.forEach(u=>u.key.isHandlerKey=!0),f},r_=(e,t,n)=>{const{modifiers:s,loc:i}=e,r=e.arg;let{exp:o}=e;return o&&o.type===4&&!o.content.trim()&&(o=void 0),r.type!==4?(r.children.unshift("("),r.children.push(') || ""')):r.isStatic||(r.content=r.content?`${r.content} || ""`:'""'),s.some(l=>l.content==="camel")&&(r.type===4?r.isStatic?r.content=Ge(r.content):r.content=`${n.helperString(Tc)}(${r.content})`:(r.children.unshift(`${n.helperString(Tc)}(`),r.children.push(")"))),n.inSSR||(s.some(l=>l.content==="prop")&&fh(r,"."),s.some(l=>l.content==="attr")&&fh(r,"^")),{props:[ht(r,o)]}},fh=(e,t)=>{e.type===4?e.isStatic?e.content=t+e.content:e.content=`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},o_=(e,t)=>{if(e.type===0||e.type===1||e.type===11||e.type===10)return()=>{const n=e.children;let s,i=!1;for(let r=0;r<n.length;r++){const o=n[r];if(Zl(o)){i=!0;for(let l=r+1;l<n.length;l++){const c=n[l];if(Zl(c))s||(s=n[r]=Tn([o],o.loc)),s.children.push(" + ",c),n.splice(l,1),l--;else{s=void 0;break}}}}if(!(!i||n.length===1&&(e.type===0||e.type===1&&e.tagType===0&&!e.props.find(r=>r.type===7&&!t.directiveTransforms[r.name])&&e.tag!=="template")))for(let r=0;r<n.length;r++){const o=n[r];if(Zl(o)||o.type===8){const l=[];(o.type!==2||o.content!==" ")&&l.push(o),!t.ssr&&sn(o,t)===0&&l.push("1"),n[r]={type:12,content:o,loc:o.loc,codegenNode:bt(t.helper(Vu),l)}}}}},dh=new WeakSet,a_=(e,t)=>{if(e.type===1&&dn(e,"once",!0))return dh.has(e)||t.inVOnce||t.inSSR?void 0:(dh.add(e),t.inVOnce=!0,t.helper(Ta),()=>{t.inVOnce=!1;const n=t.currentNode;n.codegenNode&&(n.codegenNode=t.cache(n.codegenNode,!0,!0))})},Ug=(e,t,n)=>{const{exp:s,arg:i}=e;if(!s)return n.onError(nt(41,e.loc)),qo();const r=s.loc.source.trim(),o=s.type===4?s.content:r,l=n.bindingMetadata[r];if(l==="props"||l==="props-aliased")return n.onError(nt(44,s.loc)),qo();if(!o.trim()||!Eg(s))return n.onError(nt(42,s.loc)),qo();const c=i||ke("modelValue",!0),h=i?Qt(i)?`onUpdate:${Ge(i.content)}`:Tn(['"onUpdate:" + ',i]):"onUpdate:modelValue";let f;const u=n.isTS?"($event: any)":"$event";f=Tn([`${u} => ((`,s,") = $event)"]);const m=[ht(c,e.exp),ht(h,f)];if(e.modifiers.length&&t.tagType===1){const v=e.modifiers.map(b=>b.content).map(b=>(sf(b)?b:JSON.stringify(b))+": true").join(", "),w=i?Qt(i)?`${i.content}Modifiers`:Tn([i,' + "Modifiers"']):"modelModifiers";m.push(ht(w,ke(`{ ${v} }`,!1,e.loc,2)))}return qo(m)};function qo(e=[]){return{props:e}}const l_=/[\w).+\-_$\]]/,c_=(e,t)=>{$s("COMPILER_FILTERS",t)&&(e.type===5?xa(e.content,t):e.type===1&&e.props.forEach(n=>{n.type===7&&n.name!=="for"&&n.exp&&xa(n.exp,t)}))};function xa(e,t){if(e.type===4)hh(e,t);else for(let n=0;n<e.children.length;n++){const s=e.children[n];typeof s=="object"&&(s.type===4?hh(s,t):s.type===8?xa(e,t):s.type===5&&xa(s.content,t))}}function hh(e,t){const n=e.content;let s=!1,i=!1,r=!1,o=!1,l=0,c=0,h=0,f=0,u,m,v,w,b=[];for(v=0;v<n.length;v++)if(m=u,u=n.charCodeAt(v),s)u===39&&m!==92&&(s=!1);else if(i)u===34&&m!==92&&(i=!1);else if(r)u===96&&m!==92&&(r=!1);else if(o)u===47&&m!==92&&(o=!1);else if(u===124&&n.charCodeAt(v+1)!==124&&n.charCodeAt(v-1)!==124&&!l&&!c&&!h)w===void 0?(f=v+1,w=n.slice(0,v).trim()):H();else{switch(u){case 34:i=!0;break;case 39:s=!0;break;case 96:r=!0;break;case 40:h++;break;case 41:h--;break;case 91:c++;break;case 93:c--;break;case 123:l++;break;case 125:l--;break}if(u===47){let P=v-1,M;for(;P>=0&&(M=n.charAt(P),M===" ");P--);(!M||!l_.test(M))&&(o=!0)}}w===void 0?w=n.slice(0,v).trim():f!==0&&H();function H(){b.push(n.slice(f,v).trim()),f=v+1}if(b.length){for(v=0;v<b.length;v++)w=u_(w,b[v],t);e.content=w,e.ast=void 0}}function u_(e,t,n){n.helper(Ku);const s=t.indexOf("(");if(s<0)return n.filters.add(t),`${Fr(t,"filter")}(${e})`;{const i=t.slice(0,s),r=t.slice(s+1);return n.filters.add(i),`${Fr(i,"filter")}(${e}${r!==")"?","+r:r}`}}const ph=new WeakSet,f_=(e,t)=>{if(e.type===1){const n=dn(e,"memo");return!n||ph.has(e)||t.inSSR?void 0:(ph.add(e),()=>{const s=e.codegenNode||t.currentNode.codegenNode;s&&s.type===13&&(e.tagType!==1&&tf(s,t),e.codegenNode=bt(t.helper(ef),[n.exp,Oi(void 0,s),"_cache",String(t.cached.length)]),t.cached.push(null))})}},d_=(e,t)=>{if(e.type===1){for(const n of e.props)if(n.type===7&&n.name==="bind"&&!n.exp){const s=n.arg;if(s.type!==4||!s.isStatic)t.onError(nt(52,s.loc)),n.exp=ke("",!0,s.loc);else{const i=Ge(s.content);(Tg.test(i[0])||i[0]==="-")&&(n.exp=ke(i,!1,s.loc))}}}};function h_(e){return[[d_,a_,VT,f_,zT,c_,s_,XT,GT,o_],{on:Hg,bind:r_,model:Ug}]}function p_(e,t={}){const n=t.onError||nf,s=t.mode==="module";t.prefixIdentifiers===!0?n(nt(47)):s&&n(nt(48));const i=!1;t.cacheHandlers&&n(nt(49)),t.scopeId&&!s&&n(nt(50));const r=Me({},t,{prefixIdentifiers:i}),o=Ee(e)?wT(e,r):e,[l,c]=h_();return ET(o,Me({},r,{nodeTransforms:[...l,...t.nodeTransforms||[]],directiveTransforms:Me({},c,t.directiveTransforms||{})})),RT(o,r)}const m_=()=>({props:[]});/**
* @vue/compiler-dom v3.5.22
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const Vg=Symbol(""),Wg=Symbol(""),qg=Symbol(""),zg=Symbol(""),Mc=Symbol(""),Kg=Symbol(""),Jg=Symbol(""),Gg=Symbol(""),Qg=Symbol(""),Yg=Symbol("");q0({[Vg]:"vModelRadio",[Wg]:"vModelCheckbox",[qg]:"vModelText",[zg]:"vModelSelect",[Mc]:"vModelDynamic",[Kg]:"withModifiers",[Jg]:"withKeys",[Gg]:"vShow",[Qg]:"Transition",[Yg]:"TransitionGroup"});let ui;function g_(e,t=!1){return ui||(ui=document.createElement("div")),t?(ui.innerHTML=`<div foo="${e.replace(/"/g,"&quot;")}">`,ui.children[0].getAttribute("foo")):(ui.innerHTML=e,ui.textContent)}const v_={parseMode:"html",isVoidTag:Mw,isNativeTag:e=>xw(e)||Rw(e)||Aw(e),isPreTag:e=>e==="pre",isIgnoreNewlineTag:e=>e==="pre"||e==="textarea",decodeEntities:g_,isBuiltInComponent:e=>{if(e==="Transition"||e==="transition")return Qg;if(e==="TransitionGroup"||e==="transition-group")return Yg},getNamespace(e,t,n){let s=t?t.ns:n;if(t&&s===2)if(t.tag==="annotation-xml"){if(e==="svg")return 1;t.props.some(i=>i.type===6&&i.name==="encoding"&&i.value!=null&&(i.value.content==="text/html"||i.value.content==="application/xhtml+xml"))&&(s=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&e!=="mglyph"&&e!=="malignmark"&&(s=0);else t&&s===1&&(t.tag==="foreignObject"||t.tag==="desc"||t.tag==="title")&&(s=0);if(s===0){if(e==="svg")return 1;if(e==="math")return 2}return s}},y_=e=>{e.type===1&&e.props.forEach((t,n)=>{t.type===6&&t.name==="style"&&t.value&&(e.props[n]={type:7,name:"bind",arg:ke("style",!0,t.loc),exp:S_(t.value.content,t.loc),modifiers:[],loc:t.loc})})},S_=(e,t)=>{const n=Sh(e);return ke(JSON.stringify(n),!1,t,3)};function ps(e,t){return nt(e,t)}const w_=(e,t,n)=>{const{exp:s,loc:i}=e;return s||n.onError(ps(53,i)),t.children.length&&(n.onError(ps(54,i)),t.children.length=0),{props:[ht(ke("innerHTML",!0,i),s||ke("",!0))]}},b_=(e,t,n)=>{const{exp:s,loc:i}=e;return s||n.onError(ps(55,i)),t.children.length&&(n.onError(ps(56,i)),t.children.length=0),{props:[ht(ke("textContent",!0),s?sn(s,n)>0?s:bt(n.helperString(Ya),[s],i):ke("",!0))]}},T_=(e,t,n)=>{const s=Ug(e,t,n);if(!s.props.length||t.tagType===1)return s;e.arg&&n.onError(ps(58,e.arg.loc));const{tag:i}=t,r=n.isCustomElement(i);if(i==="input"||i==="textarea"||i==="select"||r){let o=qg,l=!1;if(i==="input"||r){const c=Xa(t,"type");if(c){if(c.type===7)o=Mc;else if(c.value)switch(c.value.content){case"radio":o=Vg;break;case"checkbox":o=Wg;break;case"file":l=!0,n.onError(ps(59,e.loc));break}}else sT(t)&&(o=Mc)}else i==="select"&&(o=zg);l||(s.needRuntime=n.helper(o))}else n.onError(ps(57,e.loc));return s.props=s.props.filter(o=>!(o.key.type===4&&o.key.content==="modelValue")),s},__=an("passive,once,capture"),E_=an("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),C_=an("left,right"),Xg=an("onkeyup,onkeydown,onkeypress"),k_=(e,t,n,s)=>{const i=[],r=[],o=[];for(let l=0;l<t.length;l++){const c=t[l].content;c==="native"&&Lr("COMPILER_V_ON_NATIVE",n)||__(c)?o.push(c):C_(c)?Qt(e)?Xg(e.content.toLowerCase())?i.push(c):r.push(c):(i.push(c),r.push(c)):E_(c)?r.push(c):i.push(c)}return{keyModifiers:i,nonKeyModifiers:r,eventOptionModifiers:o}},mh=(e,t)=>Qt(e)&&e.content.toLowerCase()==="onclick"?ke(t,!0):e.type!==4?Tn(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,x_=(e,t,n)=>Hg(e,t,n,s=>{const{modifiers:i}=e;if(!i.length)return s;let{key:r,value:o}=s.props[0];const{keyModifiers:l,nonKeyModifiers:c,eventOptionModifiers:h}=k_(r,i,n,e.loc);if(c.includes("right")&&(r=mh(r,"onContextmenu")),c.includes("middle")&&(r=mh(r,"onMouseup")),c.length&&(o=bt(n.helper(Kg),[o,JSON.stringify(c)])),l.length&&(!Qt(r)||Xg(r.content.toLowerCase()))&&(o=bt(n.helper(Jg),[o,JSON.stringify(l)])),h.length){const f=h.map(vs).join("");r=Qt(r)?ke(`${r.content}${f}`,!0):Tn(["(",r,`) + "${f}"`])}return{props:[ht(r,o)]}}),R_=(e,t,n)=>{const{exp:s,loc:i}=e;return s||n.onError(ps(61,i)),{props:[],needRuntime:n.helper(Gg)}},A_=(e,t)=>{e.type===1&&e.tagType===0&&(e.tag==="script"||e.tag==="style")&&t.removeNode()},M_=[y_],O_={cloak:m_,html:w_,text:b_,model:T_,on:x_,show:R_};function I_(e,t={}){return p_(e,Me({},v_,t,{nodeTransforms:[A_,...M_,...t.nodeTransforms||[]],directiveTransforms:Me({},O_,t.directiveTransforms||{}),transformHoist:null}))}/**
* vue v3.5.22
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const gh=Object.create(null);function Zg(e,t){if(!Ee(e))if(e.nodeType)e=e.innerHTML;else return Mt;const n=vw(e,t),s=gh[n];if(s)return s;if(e[0]==="#"){const l=document.querySelector(e);e=l?l.innerHTML:""}const i=Me({hoistStatic:!0,onError:void 0,onWarn:Mt},t);!i.isCustomElement&&typeof customElements<"u"&&(i.isCustomElement=l=>!!customElements.get(l));const{code:r}=I_(e,i),o=new Function("Vue",r)(B0);return o._rc=!0,gh[n]=o}Au(Zg);const N_=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:iu,BaseTransitionPropsValidators:Ha,Comment:at,DeprecationTypes:jm,EffectScope:Ia,ErrorCodes:tp,ErrorTypeStrings:Pm,Fragment:wt,KeepAlive:Cp,ReactiveEffect:_i,Static:hs,Suspense:mm,Teleport:hp,Text:qn,TrackOpTypes:Qh,Transition:Wm,TransitionGroup:tg,TriggerOpTypes:Yh,VueElement:Gr,assertNumber:ep,callWithAsyncErrorHandling:on,callWithErrorHandling:qs,camelize:Ge,capitalize:vs,cloneVNode:_n,compatUtils:Bm,compile:Zg,computed:zn,createApp:Sa,createBlock:Mr,createCommentVNode:Em,createElementBlock:wm,createElementVNode:Ka,createHydrationRenderer:bu,createPropsRestProxy:Kp,createRenderer:wu,createSSRApp:Bu,createSlots:Ip,createStaticVNode:_m,createTextVNode:Ja,createVNode:Je,customRef:tu,defineAsyncComponent:Ep,defineComponent:Ua,defineCustomElement:Pu,defineEmits:Fp,defineExpose:Dp,defineModel:jp,defineOptions:$p,defineProps:Lp,defineSSRCustomElement:Qm,defineSlots:Bp,devtools:Lm,effect:Oh,effectScope:Eh,getCurrentInstance:Wt,getCurrentScope:Jc,getCurrentWatcher:Xh,getTransitionRawChildren:Ur,guardReactiveProps:ku,h:Mu,handleError:ys,hasInjectionContext:Yp,hydrate:cg,hydrateOnIdle:wp,hydrateOnInteraction:_p,hydrateOnMediaQuery:Tp,hydrateOnVisible:bp,initCustomFormatter:Om,initDirectivesForSSR:dg,inject:bi,isMemoSame:Ou,isProxy:jr,isReactive:Wn,isReadonly:An,isRef:pt,isRuntimeOnly:Rm,isShallow:Yt,isVNode:On,markRaw:Zc,mergeDefaults:qp,mergeModels:zp,mergeProps:Ru,nextTick:Ss,normalizeClass:Di,normalizeProps:wh,normalizeStyle:Fi,onActivated:ou,onBeforeMount:lu,onBeforeUnmount:qr,onBeforeUpdate:Wa,onDeactivated:au,onErrorCaptured:du,onMounted:$i,onRenderTracked:fu,onRenderTriggered:uu,onScopeDispose:Ch,onServerPrefetch:cu,onUnmounted:zr,onUpdated:Wr,onWatcherCleanup:nu,openBlock:Ci,popScopeId:ap,provide:vu,proxyRefs:Da,pushScopeId:op,queuePostFlushCb:Ei,reactive:Br,readonly:Cr,ref:de,registerRuntimeCompiler:Au,render:$u,renderList:Op,renderSlot:Np,resolveComponent:xp,resolveDirective:Mp,resolveDynamicComponent:Ap,resolveFilter:$m,resolveTransitionHooks:Bs,setBlockTracking:ki,setDevtoolsHook:Fm,setTransitionHooks:Mn,shallowReactive:Xc,shallowReadonly:Vh,shallowRef:eu,ssrContextKey:_u,ssrUtils:Dm,stop:Ih,toDisplayString:Kc,toHandlerKey:Ps,toHandlers:Pp,toRaw:Pe,toRef:Jh,toRefs:Kh,toValue:zh,transformVNodeArgs:bm,triggerRef:qh,unref:Hr,useAttrs:Vp,useCssModule:Xm,useCssVars:Gm,useHost:Lu,useId:yp,useModel:dm,useSSRContext:Eu,useShadowRoot:Ym,useSlots:Up,useTemplateRef:Sp,useTransitionState:ja,vModelCheckbox:Ga,vModelDynamic:Du,vModelRadio:Qa,vModelSelect:Fu,vModelText:Or,vShow:Nu,version:Iu,warn:Nm,watch:wn,watchEffect:cm,watchPostEffect:um,watchSyncEffect:Cu,withAsyncContext:Jp,withCtx:Ba,withDefaults:Hp,withDirectives:cp,withKeys:rg,withMemo:Im,withModifiers:ig,withScopeId:lp},Symbol.toStringTag,{value:"Module"}));class P_{constructor(){var t;this.token=(t=document.querySelector('meta[name="csrf-token"]'))==null?void 0:t.getAttribute("content"),this.refreshPromise=null,this.setupFetchInterceptor()}async refreshToken(){if(this.refreshPromise)return this.refreshPromise;this.refreshPromise=this.performTokenRefresh();try{return await this.refreshPromise}finally{this.refreshPromise=null}}async performTokenRefresh(){try{console.log("Refreshing CSRF token...");const n=await(window.originalFetch||fetch)("/api/csrf-token",{method:"GET",credentials:"same-origin",headers:{Accept:"application/json"}});if(!n.ok)throw new Error(`Failed to refresh CSRF token: ${n.status} ${n.statusText}`);const s=n.headers.get("content-type");if(!s||!s.includes("application/json")){const r=await n.text();throw new Error(`Expected JSON response but got ${s}. Response: ${r.substring(0,200)}`)}const i=await n.json();if(i.csrf_token){this.token=i.csrf_token;const r=document.querySelector('meta[name="csrf-token"]');return r&&r.setAttribute("content",this.token),window.app&&window.app.csrfToken!==void 0&&(window.app.csrfToken=this.token),console.log("CSRF token refreshed successfully"),this.token}else throw new Error("No CSRF token in response")}catch(t){throw console.error("Failed to refresh CSRF token:",t),t}}setupFetchInterceptor(){window.originalFetch||(window.originalFetch=window.fetch);const t=window.originalFetch,n=this;window.fetch=async function(s,i={}){if(s.includes("/api/csrf-token"))return t(s,i);const r={...i};(s.startsWith("/api/")||s.startsWith("/upload")||s.startsWith("/save")||s.startsWith("/recording/")||s.startsWith("/chat")||s.startsWith("/speakers"))&&(r.headers={"X-CSRFToken":n.token,...r.headers});let o=await t(s,r);if((o.status===400||o.status===403)&&(s.startsWith("/api/")||s.startsWith("/upload")||s.startsWith("/save")||s.startsWith("/recording/")||s.startsWith("/chat")||s.startsWith("/speakers")))try{const l=o.clone();let c=!1;try{const f=(await l.json()).error||"";c=f.toLowerCase().includes("csrf")||f.toLowerCase().includes("token")}catch{const f=await o.clone().text();c=f.toLowerCase().includes("csrf")||f.toLowerCase().includes("token")||f.includes("<!doctype")||f.includes("<html")}if(c){console.log("CSRF token expired, attempting refresh and retry...");try{await n.refreshToken(),r.headers["X-CSRFToken"]=n.token,o=await t(s,r),o.ok?console.log("Request succeeded after CSRF token refresh"):console.warn("Request still failed after CSRF token refresh:",o.status)}catch(h){console.error("Failed to refresh CSRF token during retry:",h)}}}catch(l){console.warn("Could not parse error response for CSRF check:",l)}return o}}getToken(){return this.token}async manualRefresh(){try{return await this.refreshToken(),!0}catch(t){return console.error("Manual CSRF token refresh failed:",t),!1}}}document.addEventListener("DOMContentLoaded",()=>{window.csrfManager=new P_,setInterval(()=>{window.csrfManager&&(console.log("Performing periodic CSRF token refresh..."),window.csrfManager.manualRefresh())},45*60*1e3)});class L_{constructor(){this.translations={},this.currentLocale="en",this.fallbackLocale="en",this.loadedLocales=new Set}async init(t="en"){const n=localStorage.getItem("preferredLanguage"),s=navigator.language.split("-")[0];this.currentLocale=n||t||s||"en",await this.loadLocale(this.currentLocale),this.currentLocale!==this.fallbackLocale&&await this.loadLocale(this.fallbackLocale)}async loadLocale(t){if(!this.loadedLocales.has(t))try{const n=await fetch(`/tool/speakr/static/locales/${t}.json`);if(!n.ok)throw new Error(`Failed to load locale: ${t}`);const s=await n.json();this.translations[t]=s,this.loadedLocales.add(t),console.log(`Loaded locale: ${t}`)}catch(n){console.error(`Error loading locale ${t}:`,n),t!==this.fallbackLocale&&(console.log(`Failed to load ${t}, will use ${this.fallbackLocale} as fallback`),await this.loadLocale(this.fallbackLocale))}}async setLocale(t){await this.loadLocale(t),this.currentLocale=t,localStorage.setItem("preferredLanguage",t),window.dispatchEvent(new CustomEvent("localeChanged",{detail:{locale:t}}))}getLocale(){return this.currentLocale}getAvailableLocales(){return[{code:"en",name:"English",nativeName:"English"},{code:"es",name:"Spanish",nativeName:"Español"},{code:"fr",name:"French",nativeName:"Français"},{code:"zh",name:"Chinese",nativeName:"中文"}]}t(t,n={},s=null){const i=s||this.currentLocale;let r=this.getNestedTranslation(i,t);return!r&&i!==this.fallbackLocale&&(r=this.getNestedTranslation(this.fallbackLocale,t)),r?this.interpolate(r,n):(console.warn(`Translation not found for key: ${t}`),t)}getNestedTranslation(t,n){if(!this.translations[t])return null;const s=n.split(".");let i=this.translations[t];for(const r of s)if(i&&typeof i=="object"&&r in i)i=i[r];else return null;return typeof i=="string"?i:null}interpolate(t,n){return t.replace(/\{\{(\w+)\}\}/g,(s,i)=>n.hasOwnProperty(i)?n[i]:s)}tc(t,n,s={}){const i=n===1?t:`${t}Plural`;return this.t(i,{...s,count:n})}formatDate(t,n={}){const s=t instanceof Date?t:new Date(t);return new Intl.DateTimeFormat(this.currentLocale,n).format(s)}formatNumber(t,n={}){return new Intl.NumberFormat(this.currentLocale,n).format(t)}formatFileSize(t){const n=["bytes","kilobytes","megabytes","gigabytes"],s=[1,1024,1048576,1073741824];let i=0;for(let o=s.length-1;o>=0;o--)if(t>=s[o]){i=o;break}const r=Math.round(t/s[i]*10)/10;return this.t(`fileSize.${n[i]}`,{count:r})}formatDuration(t){if(t<60)return this.tc("duration.seconds",Math.round(t),{count:Math.round(t)});if(t<3600){const n=Math.round(t/60);return this.tc("duration.minutes",n,{count:n})}else{const n=Math.round(t/3600*10)/10;return this.tc("duration.hours",n,{count:n})}}formatRelativeTime(t){const n=t instanceof Date?t:new Date(t),i=Math.floor((new Date-n)/1e3);if(i<60)return this.t("time.justNow");if(i<3600){const r=Math.floor(i/60);return r===1?this.t("time.minuteAgo"):this.t("time.minutesAgo",{count:r})}else if(i<86400){const r=Math.floor(i/3600);return r===1?this.t("time.hourAgo"):this.t("time.hoursAgo",{count:r})}else if(i<604800){const r=Math.floor(i/86400);return r===1?this.t("time.dayAgo"):this.t("time.daysAgo",{count:r})}else if(i<2592e3){const r=Math.floor(i/604800);return r===1?this.t("time.weekAgo"):this.t("time.weeksAgo",{count:r})}else if(i<31536e3){const r=Math.floor(i/2592e3);return r===1?this.t("time.monthAgo"):this.t("time.monthsAgo",{count:r})}else{const r=Math.floor(i/31536e3);return r===1?this.t("time.yearAgo"):this.t("time.yearsAgo",{count:r})}}}const F_=new L_;typeof window<"u"&&(window.i18n=F_,window.i18n.t||(window.i18n.t=function(e,t){return console.warn("i18n.t called before initialization, returning key:",e),e}));const af=typeof window<"u"?window:globalThis,Oc=af.Recorder,dr=af.EasyMDE,ev=af.marked;function D_(){const e=[];Oc||e.push("Recorder"),dr||e.push("EasyMDE"),ev||e.push("marked"),e.length>0&&console.error(`Missing index vendor globals: ${e.join(", ")}`)}function $_(e,t="cg"){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/tool/speakr/ws/asr/live?mode=${encodeURIComponent(e||"online")}&scene=${encodeURIComponent(t||"cg")}`}function Ic(e){var t,n=e.msgHandle,s=e.stateHandle,i=e.getScene||(()=>"cg");let r="offline";var o=[],l=!1,c=1e3,h=500,f=0,u=null,m=null;function v(){if(o.length<=c)return!1;const C=o.length-c;return console.warn(`⚠️ 发送队列超过最大限制 (${c}),丢弃最旧的 ${C} 个数据包`),o=o.slice(-c),!0}function w(C){o.push(C),v(),o.length>h&&console.warn(`⚠️ WebSocket发送队列堆积: ${o.length} 个数据包待发送`)}this.wsStart=function(C){t&&t.close(),C==="offline"||C&&C!=="online"?r="offline":r="online";var V=$_(r,i());if(V.match(/wss:\S*|ws:\S*/))console.log("Uri"+V);else return alert("请检查wss地址正确性"),0;return"WebSocket"in window?(t=new WebSocket(V),t.onopen=function(F){M(F)},t.onclose=function(F){console.log("onclose ws!"),S()},t.onmessage=function(F){_(F)},t.onerror=function(F){x(F)},1):(alert("当前浏览器不支持 WebSocket"),0)};function b(){m&&(clearTimeout(m),m=null),u&&(u(),u=null)}function H(){if(t!=null){try{t.close()}catch(C){console.warn("Failed to close WebSocket",C)}t=void 0}o=[],l=!1}this.wsStop=function(){if(t!=null){console.log("stop ws!");try{t.readyState===1&&t.send(JSON.stringify({type:"stop",is_speaking:!1}))}catch(C){console.warn("Failed to send WebSocket stop frame",C)}}b(),H()},this.wsFinish=function(C=3e3){return t==null||t.readyState>=2?(b(),Promise.resolve()):(o=[],l=!1,new Promise(V=>{u=V,m=setTimeout(()=>{b()},C);try{t.readyState===1&&t.send(JSON.stringify({type:"stop",is_speaking:!1}))}catch(F){console.warn("Failed to send WebSocket finish frame",F),b()}}))};function P(){if(l||o.length===0||!t||t.readyState!==1)return;l=!0;const C=o.shift();try{t.send(C),l=!1,o.length>h&&console.warn(`⚠️ WebSocket发送队列堆积: ${o.length} 个数据包待发送`),o.length>0&&setTimeout(()=>P(),0)}catch(V){console.error("❌ WebSocket发送失败数据已放回队列:",V),o.unshift(C),l=!1,v()}}this.wsSend=function(C){if(t==null)return w(C),!0;if(t.readyState===1){if(o.length>0)return w(C),P(),!0;try{return t.send(C),!0}catch(F){return console.error("❌ WebSocket直接发送失败加入队列:",F),w(C),P(),!0}}else{if(t.readyState===0)return w(C),!0;var V=Date.now();return V-f>5e3&&(console.warn("⚠️ WebSocket未连接数据无法发送 (state:",t.readyState,")"),f=V),!1}},this.getQueueStatus=function(){return{length:o.length,isSending:l,readyState:t?t.readyState:-1}};function M(C){console.log(C,"e"),console.log("WebSocket connected to backend ASR proxy"),s(0),o.length>0&&(console.log(`Processing ${o.length} queued audio chunks`),P())}function S(C){b(),t=void 0,s(1)}function _(C){n(C);try{const V=JSON.parse(C.data);(V&&V.type==="state"&&V.state==="closed"||V&&(V.mode==="2pass-offline"||V.mode==="offline-speaker"))&&b()}catch{}}function x(C){console.log(C),s(2)}}typeof window<"u"&&(window.WebSocketConnectMethod=Ic);const tc=960,B_=2e4,nc=16e3*5;function fi(){}function j_(e,t){const n=new Int16Array(e.length+t.length);return n.set(e,0),n.set(t,e.length),n}function H_(){const e=window.AudioContext||window.webkitAudioContext;return new e}class U_{constructor({getMicStream:t,getSystemStream:n,getPausedTranscription:s,setPausedTranscription:i,getShowSpeaker:r,getConfigWords:o,getScene:l=()=>"cg",getLastTimer:c,setLastTimer:h,onMainTextChange:f=fi,onPreviewTextChange:u=fi,onOfflineTextChange:m=fi,onActiveChange:v=fi,onPendingCorrectionCountChange:w=fi,onError:b=fi,fetchImpl:H=window.fetch.bind(window),correctUrl:P="/tool/speakr/api/asr/correct",sourceKind:M="mixed"}){this.getMicStream=t,this.getSystemStream=n,this.getPausedTranscription=s,this.setPausedTranscription=i,this.getShowSpeaker=r,this.getConfigWords=o,this.getScene=l,this.getLastTimer=c,this.setLastTimer=h,this.onMainTextChange=f,this.onPreviewTextChange=u,this.onOfflineTextChange=m,this.onActiveChange=v,this.onPendingCorrectionCountChange=w,this.onError=b,this.fetchImpl=H,this.correctUrl=P,this.sourceKind=M,this.wsOnline=null,this.wsOffline=null,this.recOnline=null,this.recOffline=null,this.audioContextOnline=null,this.audioContextOffline=null,this.sampleBufOnline=new Int16Array,this.sampleBufOffline=new Int16Array,this.segmentList=[],this.segmentRenderStartIndex=0,this.pendingSentenceQueue=[],this.pendingSentenceSequence=0,this.pendingCorrectionCount=0,this.recText="",this.recTextOnline="",this.offlineSentenceHandoffText="",this.lastOnlineTimestamp=null,this.liveTranscriptionEpoch=0,this.realtimeTimestampBarrierMs=-1,this.realtimeEditCarryover=null,this.editModeBufferStartIndex=0,this.active=!1,this.disposed=!1,this.createSockets()}createSockets(){this.wsOnline=new Ic({msgHandle:t=>this.handleOnlineMessage(t),stateHandle:t=>this.handleOnlineState(t),getScene:()=>this.getScene()}),this.wsOffline=new Ic({msgHandle:t=>this.handleOfflineMessage(t),stateHandle:t=>this.handleOfflineState(t),getScene:()=>this.getScene()})}start(){var s,i;this.disposed=!1;const t=((s=this.wsOnline)==null?void 0:s.wsStart())===1,n=((i=this.wsOffline)==null?void 0:i.wsStart("offline"))===1;return this.setActive(t||n),t||n?1:0}stop(){var t,n;this.setActive(!1),(t=this.wsOnline)==null||t.wsStop(),(n=this.wsOffline)==null||n.wsStop(),this.closeRecorders()}async finish(t=3e3){var s,i;this.setActive(!1),this.closeRecorders();const n=[];this.wsOnline&&typeof this.wsOnline.wsFinish=="function"?n.push(this.wsOnline.wsFinish(t)):(s=this.wsOnline)==null||s.wsStop(),this.wsOffline&&typeof this.wsOffline.wsFinish=="function"?n.push(this.wsOffline.wsFinish(t)):(i=this.wsOffline)==null||i.wsStop(),n.length>0&&await Promise.allSettled(n)}dispose(){this.disposed=!0,this.stop(),this.wsOnline=null,this.wsOffline=null}isActive(){return this.active}setActive(t){this.active=t,this.onActiveChange(t)}setPendingCorrectionCount(t){this.pendingCorrectionCount=Math.max(0,t),this.onPendingCorrectionCountChange(this.pendingCorrectionCount)}getPendingCorrectionCount(){return this.pendingCorrectionCount}async waitForCorrections(t=8e3,n=200){const s=Date.now();for(;this.pendingCorrectionCount>0&&Date.now()-s<t;)await new Promise(i=>setTimeout(i,n));return this.pendingCorrectionCount}startNewEpoch({barrierTimestampMs:t=null,clearTimestampBarrier:n=!1,clearEditCarryover:s=!0}={}){this.liveTranscriptionEpoch+=1,s&&(this.realtimeEditCarryover=null),n?this.realtimeTimestampBarrierMs=-1:Number.isFinite(t)&&(this.realtimeTimestampBarrierMs=Math.max(this.realtimeTimestampBarrierMs,t)),this.clearRealtimePipeline({preserveTimestampBarrier:!n})}resetTranscript({clearTimestampBarrier:t=!1}={}){this.segmentList=[],this.segmentRenderStartIndex=0,this.setPendingCorrectionCount(0),this.startNewEpoch({clearTimestampBarrier:t})}prepareForResume(){this.segmentRenderStartIndex=this.segmentList.length,this.editModeBufferStartIndex=this.segmentList.length,this.sampleBufOnline=new Int16Array,this.sampleBufOffline=new Int16Array,this.recText="",this.recTextOnline="",this.offlineSentenceHandoffText="",this.pendingSentenceQueue=[],this.pendingSentenceSequence=0,this.lastOnlineTimestamp=null,this.onPreviewTextChange(""),this.onOfflineTextChange(""),this.liveTranscriptionEpoch+=1,this.renderFullText(),this.syncRealtimePreview()}enterEditMode(t){this.editModeBufferStartIndex=this.segmentList.length;const n=this.getLatestRealtimeTimestamp();this.startNewEpoch({barrierTimestampMs:n,clearEditCarryover:!1}),this.realtimeEditCarryover=this.buildRealtimeEditCarryover(t)}applyEditedText(t){this.setPausedTranscription(t),this.segmentRenderStartIndex=this.editModeBufferStartIndex,this.recText="",this.recTextOnline="",this.offlineSentenceHandoffText="",this.onPreviewTextChange(""),this.onOfflineTextChange(""),this.onMainTextChange(t),this.renderFullText()}ensureRecorders(){}closeRecorders(){if(this.recOnline){try{this.recOnline.close()}catch(t){console.warn("Failed to close online Recorder:",t)}this.recOnline=null}if(this.recOffline){try{this.recOffline.close()}catch(t){console.warn("Failed to close offline Recorder:",t)}this.recOffline=null}this.closeAudioContexts()}closeAudioContexts(){if(this.audioContextOnline){try{this.audioContextOnline.close()}catch{}this.audioContextOnline=null}if(this.audioContextOffline){try{this.audioContextOffline.close()}catch{}this.audioContextOffline=null}}handleOnlineState(t){t===0?this.openMixedStream("online"):t===2&&this.stop()}handleOfflineState(t){t===0?this.openMixedStream("offline"):t===2&&this.stop()}async openMixedStream(t){try{const n=t==="online"?await this.getMicrophoneInfo():null;n&&console.log("Current microphone:",n.name,n);const s=this.getMicStream(),i=this.getSystemStream(),r=s&&s.getAudioTracks().length>0,o=i&&i.getAudioTracks().length>0;if(this.sourceKind==="mic"&&!r)throw new Error("No microphone stream is available for realtime ASR.");if(this.sourceKind==="system"&&!o)throw new Error("No system audio stream is available for realtime ASR.");if(this.sourceKind==="mixed"&&!r&&!o)throw new Error("No audio stream is available for realtime ASR.");if(t==="online"&&this.audioContextOnline)try{this.audioContextOnline.close()}catch{}if(t==="offline"&&this.audioContextOffline)try{this.audioContextOffline.close()}catch{}const l=H_();t==="online"?this.audioContextOnline=l:this.audioContextOffline=l;const c=l.createMediaStreamDestination();(this.sourceKind==="mixed"||this.sourceKind==="mic")&&r&&l.createMediaStreamSource(s).connect(c),(this.sourceKind==="mixed"||this.sourceKind==="system")&&o?l.createMediaStreamSource(i).connect(c):this.sourceKind==="mixed"&&!r&&console.log("No system audio detected for realtime ASR.");const h=t==="online"?this.recOnline:this.recOffline;if(h)try{h.close()}catch{}const f=Oc({type:"pcm",bitRate:16,sampleRate:16e3,sourceStream:c.stream,onProcess:(...u)=>this.processRecorderFrame(t,...u)});t==="online"?this.recOnline=f:this.recOffline=f,f.open(()=>{f.start()},u=>{console.error("Recorder permission denied:",u),this.onError(u)})}catch(n){console.error("Failed to initialize realtime ASR recorder:",n),this.onError(n)}}processRecorderFrame(t,n,s,i,r){if(!this.active||this.disposed||!n||n.length===0)return;const o=n[n.length-1],l=Oc.SampleData([o],r,16e3).data,c=t==="online",h=c?this.wsOnline:this.wsOffline,f=c?"Online":"Offline";let u=c?this.sampleBufOnline:this.sampleBufOffline;if(u=j_(u,l),u.length>nc){const m=u.length-nc;console.warn(`[${f}] Dropping excess realtime ASR audio buffer: ${m} samples`),u=u.slice(-nc)}for(;u.length>=tc;){const m=u.slice(0,tc);if(!(h==null?void 0:h.wsSend(m)))break;u=u.slice(tc)}u.length>B_&&console.warn(`[${f}] Realtime ASR audio buffer is high: ${u.length} samples (${(u.length/16e3).toFixed(2)}s)`),c?this.sampleBufOnline=u:this.sampleBufOffline=u}async getMicrophoneInfo(){if(!navigator.mediaDevices||!navigator.mediaDevices.enumerateDevices)return console.warn("Browser does not support enumerating audio devices."),null;const n=(await navigator.mediaDevices.enumerateDevices()).filter(i=>i.kind==="audioinput"),s=n.find(i=>i.deviceId==="default")||n[0];return{name:(s==null?void 0:s.label)||"Unknown microphone",deviceId:(s==null?void 0:s.deviceId)||"",all:n.map(i=>({name:i.label,deviceId:i.deviceId}))}}clearRealtimePipeline({preserveTimestampBarrier:t=!1}={}){this.sampleBufOnline=new Int16Array,this.sampleBufOffline=new Int16Array,this.recText="",this.recTextOnline="",this.offlineSentenceHandoffText="",this.pendingSentenceQueue=[],this.pendingSentenceSequence=0,this.lastOnlineTimestamp=null,this.onPreviewTextChange(""),this.onOfflineTextChange(""),t||(this.realtimeTimestampBarrierMs=-1),this.syncRealtimePreview()}extractTimestampMs(t){if(!t)return null;try{const n=typeof t=="string"?JSON.parse(t):t;if(!Array.isArray(n)||n.length===0)return null;const s=n[n.length-1];if(!Array.isArray(s)||s.length===0)return null;const i=s.length>1?Number(s[1]):Number(s[0]);return Number.isFinite(i)?i:null}catch{return null}}getLatestRealtimeTimestamp(){const t=this.segmentList.reduce((i,r)=>Number.isFinite(r==null?void 0:r.timestampMs)?Math.max(i,r.timestampMs):i,-1),n=this.pendingSentenceQueue.reduce((i,r)=>Number.isFinite(r.timestampMs)?Math.max(i,r.timestampMs):i,-1),s=Number.isFinite(this.lastOnlineTimestamp)?this.lastOnlineTimestamp:-1;return Math.max(t,n,s)}getRealtimeCarryoverTail(t,n=160){return(t||"").slice(-n)}buildRealtimeEditCarryover(t){const n=this.getRealtimeCarryoverTail(t);return n.length<4?null:{tailText:n}}trimOfflineTextWithCarryover(t){const n=t||"";if(!this.realtimeEditCarryover||!n)return n;const s=this.realtimeEditCarryover.tailText||"",i=4,r=Math.min(80,s.length,n.length);for(let o=r;o>=i;o--){const l=s.slice(-o),c=n.lastIndexOf(l);if(c===-1)continue;const h=n.slice(c+l.length);return this.realtimeEditCarryover.tailText=this.getRealtimeCarryoverTail(s+h),h}return this.realtimeEditCarryover=null,n}isStaleRealtimeMessage(t,n){return n!==this.liveTranscriptionEpoch?!0:Number.isFinite(t)&&this.realtimeTimestampBarrierMs>=0&&t<=this.realtimeTimestampBarrierMs}getPendingSentencePreviewText(){return this.pendingSentenceQueue.filter(t=>t.epoch===this.liveTranscriptionEpoch).map(t=>t.correctedText||t.rawText).join("")}syncRealtimePreview(){const t=this._deduplicateConsecutivePunctuation(this.getPendingSentencePreviewText()+this.offlineSentenceHandoffText+this.recTextOnline);this.onPreviewTextChange(t)}findPendingSentenceBySource(t,n,s){const i=t||"",r=n||"";return this.pendingSentenceQueue.find(o=>o.epoch===s&&o.sourceText===i&&o.timestamp===r)||this.segmentList.find(o=>o.epoch===s&&o.sourceText===i&&o.timestamp===r)||null}ensurePendingSentence(t,n,s){const i=this.extractTimestampMs(n);if(this.isStaleRealtimeMessage(i,s))return null;const r=this.findPendingSentenceBySource(t,n,s);if(r)return r;const o=this.trimOfflineTextWithCarryover(t||"");if(!o)return this.syncRealtimePreview(),null;const l={id:this.pendingSentenceSequence++,sourceText:t||"",rawText:o,timestamp:n||"",timestampMs:i,correctedText:"",processed:!1,correctionRequested:!1,epoch:s},c=this.pendingSentenceQueue.findIndex(h=>h.timestampMs>i);return c===-1?this.pendingSentenceQueue.push(l):this.pendingSentenceQueue.splice(c,0,l),this.syncRealtimePreview(),l}flushProcessedPendingSentences(){var n,s;let t=!1;for(;this.pendingSentenceQueue.length>0;){if(this.pendingSentenceQueue[0].epoch!==this.liveTranscriptionEpoch){this.pendingSentenceQueue.shift();continue}if(!this.pendingSentenceQueue[0].processed)break;const i=this.pendingSentenceQueue.shift(),o={text:i.correctedText||i.rawText||"",sourceText:i.sourceText,timestamp:i.timestamp,timestampMs:i.timestampMs,speaker:null,processed:!0,epoch:i.epoch},l=this.segmentList.findIndex(h=>h.timestampMs>o.timestampMs);l===-1?this.segmentList.push(o):this.segmentList.splice(l,0,o);const c=this.segmentList.indexOf(o);if(c>0){const u=(n=(this.segmentList[c-1].text||"").match(/[。!?.!?]+$/))==null?void 0:n[0],m=(s=o.text.match(/^[,。!?、;:,.!?;:]+/))==null?void 0:s[0];u&&m&&(o.text=o.text.replace(/^[,。!?、;:,.!?;:]+/,""))}t=!0}t?this.renderFullText():this.syncRealtimePreview()}finalizePendingSentence(t,n,s){const i=this.pendingSentenceQueue.find(o=>o.id===t&&o.epoch===s);if(!i)return;let r=n||i.rawText||"";r=this._deduplicateEndingPunctuation(r),i.correctedText=r,i.processed=!0,i.correctionRequested=!1,this.flushProcessedPendingSentences()}async _requestCorrection(t){const n=t.epoch;try{const s=await this.fetchImpl(this.correctUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:t.rawText,scene:this.getScene()})});if(!s.ok)throw new Error("ASR correction failed");const r=(await s.json()).corrected_text||t.rawText;this.finalizePendingSentence(t.id,r,n)}catch(s){this.finalizePendingSentence(t.id,t.rawText,n),console.error("ASR correction failed:",s)}finally{this.setPendingCorrectionCount(this.pendingCorrectionCount-1)}}async finalizeRemainingSentences(t=8e3){const n=this.pendingSentenceQueue.filter(r=>r.epoch===this.liveTranscriptionEpoch&&!r.correctionRequested&&!r.processed);for(const r of n)r.correctionRequested=!0,this.setPendingCorrectionCount(this.pendingCorrectionCount+1),this._requestCorrection(r);const s=(this.recTextOnline||"")+(this.offlineSentenceHandoffText||"");if(s.trim()){const r=this.liveTranscriptionEpoch,o=this.getLatestRealtimeTimestamp()||Date.now(),l={id:this.pendingSentenceSequence++,sourceText:s,rawText:s,timestamp:"",timestampMs:o,correctedText:"",processed:!1,correctionRequested:!0,epoch:r};this.pendingSentenceQueue.push(l),this.setPendingCorrectionCount(this.pendingCorrectionCount+1),this._requestCorrection(l)}await this.waitForCorrections(t);const i=this.pendingSentenceQueue.filter(r=>r.epoch===this.liveTranscriptionEpoch&&!r.processed);for(const r of i)this.finalizePendingSentence(r.id,r.rawText,r.epoch),this.setPendingCorrectionCount(Math.max(0,this.pendingCorrectionCount-1));this.flushProcessedPendingSentences(),this.recTextOnline="",this.offlineSentenceHandoffText="",this.renderFullText(),this.syncRealtimePreview()}_deduplicateEndingPunctuation(t){var i;if(!t)return t;const n=/[。!?.!?]+$/,s=((i=t.match(n))==null?void 0:i[0])||"";if(s.length>=2){const r=s.slice(-1);return t.replace(n,r)}return t}_deduplicateConsecutivePunctuation(t){if(!t)return t;let n=t.replace(/([。!?.!?,、;:,;:])\s*\n\s*[。!?.!?,、;:,;:]/g,`$1
`);return n=n.replace(/([。!?.!?,、;:,;:])(?:[。!?.!?,、;:,;:])+/g,"$1"),n}handleWithTimestamp(t,n,s,i,r=""){if(!n||t.length<=0)return t;const l=(s||"").split(",").map(v=>v.trim()).filter(v=>v.length>0).map(v=>new RegExp(v)),c=t.match(/[^。!?.!?]+[。!?.!?]?/g)||[],h=JSON.parse(n);let f=0,u="";const m=v=>v.replace(/^[,。!?、;:,\.!?;:]+/,"");for(let v=0;v<c.length;v++){const w=c[v];if(!w||w==="undefined")continue;const b=h[f][0]/1e3,H=this.getLastTimer();if(H>0&&b-H>i){const P=u.slice(-1)||r,M=/[。!?.!?,、;:,;:]/.test(P),S=m(w),_=/^[,。!?、;:,.!?;:]+/.test(S);u+=(M||_?`
`:`
`)+S}else l.some(M=>M.test(w))||(u+=w);this.setLastTimer(b),f++}return u}getSpeakerBeforeIndex(t){let n=null;for(let s=0;s<t;s++)this.segmentList[s]&&this.segmentList[s].speaker&&(n=this.segmentList[s].speaker);return n}buildSegmentText(t,n=null){let s="",i=n,r="";return t.forEach(o=>{this.getShowSpeaker()&&(o.speaker&&o.speaker!==i&&!o.speaker.includes("SPK")||o.speaker&&o.speaker!==i)&&(s+=(s?`
`:"")+o.speaker+`:
`,i=o.speaker);const l=this.handleWithTimestamp(o.text,o.timestamp,this.getConfigWords(),6,r);s+=l;const c=l.replace(/\s+$/,"");c.length>0&&(r=c.slice(-1))}),s}renderFullText(){const t=this.segmentRenderStartIndex>0?this.getSpeakerBeforeIndex(this.segmentRenderStartIndex):null,n=this.buildSegmentText(this.segmentList.slice(this.segmentRenderStartIndex),t);this.recText=n;const s=this._deduplicateConsecutivePunctuation(this.getPausedTranscription()+this.recText);this.onMainTextChange(s),this.syncRealtimePreview()}handleOnlineMessage(t){if(this.disposed)return;const n=JSON.parse(t.data),s=""+n.text,i=n.mode,r=n.timestamp,o=this.liveTranscriptionEpoch;if(i==="2pass-online"){const l=this.extractTimestampMs(r);if(this.isStaleRealtimeMessage(l,o)){this.syncRealtimePreview();return}let c=!1;this.lastOnlineTimestamp!==null&&l!==null&&(l-this.lastOnlineTimestamp)/1e3>=3&&/。\s*$/.test(s)&&(c=!0),this.recTextOnline+=c?s+`
`:s,this.lastOnlineTimestamp=l}else i==="2pass-offline"&&(this.recTextOnline="",this.offlineSentenceHandoffText=s||this.recTextOnline||"",this.recTextOnline="",this.lastOnlineTimestamp=null);this.syncRealtimePreview()}async handleOfflineMessage(t){if(this.disposed)return;const n=JSON.parse(t.data),s=n.mode,i=n.timestamp,r=this.liveTranscriptionEpoch,o=this.extractTimestampMs(i);if(s==="2pass-offline"){if(this.isStaleRealtimeMessage(o,r))return;const l=""+n.text;this.recTextOnline="",this.lastOnlineTimestamp=null;const c=this.ensurePendingSentence(l,i,r);if(this.offlineSentenceHandoffText="",this.syncRealtimePreview(),!c||c.processed||c.correctionRequested)return;c.correctionRequested=!0,this.setPendingCorrectionCount(this.pendingCorrectionCount+1),await this._requestCorrection(c)}else if(s==="offline-speaker"){if(this.isStaleRealtimeMessage(o,r))return;const l=n.segments&&n.segments[0]&&n.segments[0].speaker||"未命名演讲者";let c=-1;for(let h=this.segmentList.length-1;h>=0;h--){const f=this.segmentList[h];if(!(!f||f.epoch!==r)){if(f.speaker===null&&Number.isFinite(o)&&Number.isFinite(f.timestampMs)&&f.timestampMs===o){c=h;break}c===-1&&f.speaker===null&&(c=h)}}c!==-1&&(this.segmentList[c].speaker=l,this.renderFullText())}}}function V_({recordings:e,selectedRecording:t,selectedTab:n,uploadQueue:s,currentlyProcessingFile:i,processingProgress:r,processingMessage:o,progressPopupMinimized:l,progressPopupClosed:c,identifiedSpeakers:h,processedTranscription:f,showToast:u,setGlobalError:m,resetCurrentFileProcessingState:v,speakerMap:w,highlightedSpeaker:b,showSpeakerModal:H,showResetModal:P,showReprocessModal:M,showTextEditorModal:S,showAsrEditorModal:_,editingTranscriptionContent:x,editingSegments:C,availableSpeakers:V,speakerDisplayMap:F,modalSpeakers:R,regenerateSummaryAfterSpeakerUpdate:N,speakerSuggestions:B,loadingSuggestions:A,activeSpeakerInput:K,isAutoIdentifying:re,currentSpeakerGroupIndex:oe,speakerGroups:J,recordingToReset:fe,reprocessType:Z,reprocessRecording:Ae,asrReprocessOptions:ft}){const _e=de(new Map),He=zn(()=>{var E;return(E=f.value)!=null&&E.speakers?f.value.speakers:[]}),ie=zn(()=>Object.values(w.value).some(E=>E.name&&E.name.trim()!=="")),ne=zn(()=>{var Q;if(!((Q=t.value)!=null&&Q.transcription))return"";let E=t.value.transcription;E=E.replace(/</g,"<").replace(/>/g,">"),E=E.replace(/\n/g,"<br>");const D={};return w.value&&Object.keys(w.value).forEach((te,le)=>{D[te]=w.value[te].color||`speaker-color-${le%8+1}`}),E=E.replace(/\[([^\]]+)\]/g,(te,le)=>{var Ze;const Re=le===b.value,Oe=D[le]||"",qe=`[${((Ze=w.value[le])==null?void 0:Ze.name)||le}]`;return`<span class="speaker-tag ${Oe} ${Re?"speaker-highlight":""}" data-speaker-id="${le}">${qe}</span>`}),E}),he=E=>{const D=e.value.find(Q=>Q.id===E)||t.value;Qe("transcription",D)},Se=E=>{const D=e.value.find(Q=>Q.id===E)||t.value;Qe("summary",D)},Qe=(E,D)=>{Z.value=E,Ae.value=D,M.value=!0},Ye=()=>{M.value=!1,Z.value=null,Ae.value=null},mn=async()=>{if(!Ae.value||!Z.value)return;const E=Ae.value.id,D=Z.value;Ye(),D==="transcription"?await Zt(E,ft.value.language,ft.value.min_speakers,ft.value.max_speakers):D==="summary"&&await In(E)},Zt=async(E,D,Q,te)=>{var le;if(!E){m("No recording ID provided for reprocessing.");return}try{const Re={language:D,min_speakers:Q,max_speakers:te},Oe=await fetch(`/tool/speakr/recording/${E}/reprocess_transcription`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Re)}),Xe=await Oe.json();if(!Oe.ok)throw new Error(Xe.error||"Failed to start transcription reprocessing");Xe.recording&&Xe.recording.status!=="PROCESSING"&&(console.warn(`Warning: Reprocess transcription returned unexpected status: ${Xe.recording.status}`),Xe.recording.status="PROCESSING");const qe=e.value.findIndex(Ze=>Ze.id===E);qe!==-1&&(e.value[qe]=Xe.recording),((le=t.value)==null?void 0:le.id)===E&&(t.value=Xe.recording),u("Transcription reprocessing started","fa-sync-alt"),n.value="summary",En(E,"transcription"),g(E)}catch(Re){console.error("Reprocess Transcription Error:",Re),m(`Failed to start transcription reprocessing: ${Re.message}`)}},In=async E=>{var D;if(!E){m("No recording ID provided for reprocessing.");return}try{const Q=await fetch(`/tool/speakr/recording/${E}/reprocess_summary`,{method:"POST",headers:{"Content-Type":"application/json"}}),te=await Q.json();if(!Q.ok)throw new Error(te.error||"Failed to start summary reprocessing");te.recording&&te.recording.status!=="SUMMARIZING"&&(console.warn(`Warning: Reprocess summary returned unexpected status: ${te.recording.status}`),te.recording.status="SUMMARIZING");const le=e.value.findIndex(Re=>Re.id===E);le!==-1&&(e.value[le]=te.recording),((D=t.value)==null?void 0:D.id)===E&&(t.value=te.recording),u("Summary reprocessing started","fa-sync-alt"),n.value="summary",En(E,"summary"),g(E)}catch(Q){console.error("Reprocess Summary Error:",Q),m(`Failed to start summary reprocessing: ${Q.message}`)}},En=(E,D)=>{const Q=e.value.find(le=>le.id===E);if(!Q)return;const te={file:{name:Q.title||`Recording ${E}`,size:Q.file_size||0},status:"pending",recordingId:E,clientId:`reprocess-${D}-${E}-${Date.now()}`,error:null,isReprocessing:!0,reprocessType:D};s.value.unshift(te),l.value=!1,c.value=!1,i.value=te,r.value=10,o.value=D==="transcription"?"Starting transcription reprocessing...":"Starting summary reprocessing..."},g=E=>{_e.value.has(E)&&clearInterval(_e.value.get(E));const D=setInterval(async()=>{var Q,te,le;try{const Re=await fetch(`/tool/speakr/status/${E}`);if(!Re.ok){console.error(`Status check failed for recording ${E}`),I(E);return}const Oe=await Re.json(),Xe=e.value.findIndex(Ze=>Ze.id===E);Xe!==-1&&(e.value[Xe]=Oe),((Q=t.value)==null?void 0:Q.id)===E&&(t.value=Oe);const qe=s.value.find(Ze=>Ze.recordingId===E);qe&&(qe.status=Oe.status,qe.displayName=Oe.title||Oe.original_filename||qe.file.name),qe&&((te=i.value)==null?void 0:te.clientId)===qe.clientId&&T(Oe.status,qe),(Oe.status==="COMPLETED"||Oe.status==="FAILED")&&(console.log(`Reprocessing ${Oe.status.toLowerCase()} for recording ${E}`),I(E),qe&&(qe.status=Oe.status==="COMPLETED"?"completed":"failed",Oe.status==="FAILED"&&(qe.error=Oe.error_message||"Reprocessing failed")),((le=i.value)==null?void 0:le.recordingId)===E&&v(),Oe.status==="COMPLETED"?u("Reprocessing completed successfully","fa-check-circle"):u("Reprocessing failed","fa-exclamation-circle"))}catch(Re){console.error(`Error polling status for recording ${E}:`,Re),I(E)}},3e3);_e.value.set(E,D)},T=(E,D)=>{switch(E){case"PENDING":r.value=20,o.value=`Waiting to start ${D.reprocessType} reprocessing...`;break;case"PROCESSING":r.value=Math.round(Math.min(70,r.value+Math.random()*10)),o.value=D.reprocessType==="transcription"?"Reprocessing transcription...":"Processing audio...";break;case"SUMMARIZING":r.value=Math.round(Math.min(90,r.value+Math.random()*10)),o.value=D.reprocessType==="summary"?"Regenerating summary...":"Generating title and summary...";break;case"COMPLETED":r.value=100,o.value="Reprocessing completed!";break;case"FAILED":r.value=100,o.value="Reprocessing failed.";break;default:r.value=15,o.value="Starting reprocessing..."}},I=E=>{_e.value.has(E)&&(clearInterval(_e.value.get(E)),_e.value.delete(E),console.log(`Stopped reprocessing poll for recording ${E}`))},j=async()=>{var E;if(t.value)try{const D=(E=document.querySelector('meta[name="csrf-token"]'))==null?void 0:E.getAttribute("content"),Q=await fetch(`/tool/speakr/recording/${t.value.id}/generate_summary`,{method:"POST",headers:{"Content-Type":"application/json","X-CSRFToken":D}}),te=await Q.json();if(!Q.ok)throw new Error(te.error||"Failed to generate summary");t.value.status="SUMMARIZING";const le=e.value.find(Re=>Re.id===t.value.id);le&&(le.status="SUMMARIZING"),u("Summary generation started","success")}catch(D){console.error("Error generating summary:",D),m(`Failed to generate summary: ${D.message}`)}},U=async E=>{var Q;const D=e.value.find(te=>te.id===E);if(D)try{const te=await fetch(`/tool/speakr/recording/${D.id}/reset_status`,{method:"POST",headers:{"Content-Type":"application/json"}}),le=await te.json();if(!te.ok)throw new Error(le.error||"Failed to reset status");const Re=e.value.findIndex(Oe=>Oe.id===D.id);Re!==-1&&(e.value[Re]=le.recording),((Q=t.value)==null?void 0:Q.id)===D.id&&(t.value=le.recording),u("Recording status has been reset.","fa-check-circle")}catch(te){m(`Failed to reset status: ${te.message}`)}},W=E=>{fe.value=E,P.value=!0},G=()=>{P.value=!1,fe.value=null},z=async()=>{var D;if(!fe.value)return;const E=fe.value.id;G();try{const Q=await fetch(`/tool/speakr/recording/${E}/reset_status`,{method:"POST",headers:{"Content-Type":"application/json"}}),te=await Q.json();if(!Q.ok)throw new Error(te.error||"Failed to reset status");const le=e.value.findIndex(Re=>Re.id===E);le!==-1&&(e.value[le]=te.recording),((D=t.value)==null?void 0:D.id)===E&&(t.value=te.recording),u("Recording status has been reset.","fa-check-circle")}catch(Q){console.error("Reset Status Error:",Q),m(`Failed to reset status: ${Q.message}`)}},q=()=>{f.value.isJson?pe():$()},$=()=>{t.value&&(x.value=t.value.transcription,S.value=!0)},ae=()=>{S.value=!1,x.value=""},Y=async()=>{t.value&&(await ws(x.value),ae())},pe=async()=>{if(t.value)try{const E=JSON.parse(t.value.transcription);C.value=E.map((Re,Oe)=>({...Re,id:Oe,showSuggestions:!1,filteredSpeakers:[]}));const D=[...new Set(E.map(Re=>Re.speaker))],le=(await(await fetch("/tool/speakr/speakers")).json()).map(Re=>Re.name);V.value=[...new Set([...D,...le])].sort(),_.value=!0}catch(E){console.error("Could not parse transcription as JSON for ASR editor:",E),m("This transcription is not in the correct format for the ASR editor.")}},ye=()=>{_.value=!1,C.value=[],V.value=[]},xe=async()=>{const E=JSON.stringify(C.value.map(({id:D,showSuggestions:Q,filteredSpeakers:te,...le})=>le));await ws(E),ye()},Le=(E,D,Q)=>{C.value[E]&&(C.value[E][D]=parseFloat((C.value[E][D]+Q).toFixed(3)))},Ce=E=>{const D=C.value[E];if(D){const Q=D.speaker.toLowerCase();D.filteredSpeakers=V.value.filter(te=>te.toLowerCase().includes(Q))}},_t=E=>{C.value[E]&&(C.value[E].showSuggestions=!0,Ce(E))},We=E=>{C.value[E]&&window.setTimeout(()=>{C.value[E]&&(C.value[E].showSuggestions=!1)},200)},lt=(E,D)=>{C.value[E]&&(C.value[E].speaker=D,C.value[E].showSuggestions=!1)},st=()=>{const E=C.value[C.value.length-1];C.value.push({id:Date.now(),speaker:E?E.speaker:"SPEAKER_00",start_time:E?E.end_time:0,end_time:E?E.end_time+1:1,sentence:""})},gn=E=>{C.value.splice(E,1)},ws=async E=>{if(t.value)try{const D=await fetch(`/tool/speakr/recording/${t.value.id}/update_transcription`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({transcription:E})}),Q=await D.json();if(!D.ok)throw new Error(Q.error||"Failed to update transcription");const te=e.value.findIndex(le=>le.id===t.value.id);te!==-1&&(e.value[te]=Q.recording),t.value=Q.recording,u("Transcription updated successfully!","fa-check-circle")}catch(D){console.error("Save Transcription Error:",D),m(`Failed to save transcription: ${D.message}`)}},Ct=async(E,D)=>{if(!E||E.length<2){B.value[D]=[];return}A.value[D]=!0;try{const Q=await fetch(`/tool/speakr/speakers/search?q=${encodeURIComponent(E)}`);if(!Q.ok)throw new Error("Failed to search speakers");const te=await Q.json();B.value[D]=te}catch(Q){console.error("Error searching speakers:",Q),B.value[D]=[]}finally{A.value[D]=!1}},qt=(E,D)=>{w.value[E]&&(w.value[E].name=D.name,B.value[E]=[])},bs=E=>{const D=E.target.closest('input[type="text"]'),Q=E.target.closest(".absolute.z-10");!D&&!Q&&Object.keys(B.value).forEach(te=>{B.value[te]=[]})},Ts=()=>{var Q;w.value={},F.value={};const E=(Q=t.value)==null?void 0:Q.transcription;let D=[];if(E)try{const te=JSON.parse(E);te&&Array.isArray(te)&&(D=[...new Set(te.map(le=>le.speaker).filter(Boolean))])}catch{D=h.value}R.value=D,w.value=D.reduce((te,le,Re)=>(te[le]={name:"",isMe:!1,color:`speaker-color-${Re%8+1}`},F.value[le]=le,te),{}),b.value=null,B.value={},A.value={},re.value=!1,H.value=!0},Bi=()=>{if(H.value=!1,b.value=null,w.value={},B.value={},A.value={},window.speakerModalClickHandler){const E=document.querySelector(".modal-content");E&&E.removeEventListener("click",window.speakerModalClickHandler),delete window.speakerModalClickHandler}},cn=async()=>{if(!t.value)return;const E=Object.entries(w.value).reduce((D,[Q,te])=>(te.name&&te.name.trim()!==""&&(D[Q]=te),D),{});try{const D=await fetch(`/tool/speakr/recording/${t.value.id}/update_speakers`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({speaker_map:E,regenerate_summary:N.value})}),Q=await D.json();if(!D.ok)throw new Error(Q.error||"Failed to update speakers");Bi();const te=e.value.findIndex(le=>le.id===t.value.id);te!==-1&&(e.value[te]=Q.recording),t.value=Q.recording,u("Speaker names updated successfully!","fa-check-circle"),N.value&&g(t.value.id)}catch(D){console.error("Save Speaker Names Error:",D),m(`Failed to save speaker names: ${D.message}`)}},Bt=E=>{if(!E)return[];const D=[],Q=document.querySelector("div.speaker-modal-transcript"),te=document.querySelector(".transcription-simple-view, .transcription-with-speakers, .transcription-content"),le=Q||te;if(!le)return[];const Re=le.querySelectorAll(".speaker-segment");if(Re.length>0){let Oe=null,Xe=null;Re.forEach(qe=>{const Ze=qe.querySelector("[data-speaker-id]"),Ks=Ze==null?void 0:Ze.dataset.speakerId;Ks===E&&(Xe!==E?(Oe={startElement:qe,elements:[qe]},D.push(Oe)):Oe&&Oe.elements.push(qe)),Xe=Ks})}else{const Oe=le.querySelectorAll("[data-speaker-id]");let Xe=null;Oe.forEach(qe=>{if(qe.dataset.speakerId===E){const Ze=qe.closest(".speaker-segment")||qe.parentElement;!Xe||!Xe.lastElement||!Ze.previousElementSibling||Ze.previousElementSibling!==Xe.lastElement?(Xe={startElement:Ze,elements:[Ze],lastElement:Ze},D.push(Xe)):(Xe.elements.push(Ze),Xe.lastElement=Ze)}})}return D},vn=async E=>{if(b.value=E,E){if(await Ss(),J.value=Bt(E),oe.value=0,J.value.length>0){const D=J.value[0];D&&D.startElement&&D.startElement.scrollIntoView({behavior:"smooth",block:"center"})}}else J.value=[],oe.value=-1},ji=()=>{if(J.value.length===0)return;oe.value=(oe.value+1)%J.value.length;const E=J.value[oe.value];E&&E.startElement&&E.startElement.scrollIntoView({behavior:"smooth",block:"center"})},zs=()=>{if(J.value.length===0)return;oe.value=oe.value<=0?J.value.length-1:oe.value-1;const E=J.value[oe.value];E&&E.startElement&&E.startElement.scrollIntoView({behavior:"smooth",block:"center"})},il=E=>{K.value=E,b.value!==E&&vn(E)},_s=()=>{setTimeout(()=>{K.value=null,B.value={}},200),Yn()},Yn=()=>{b.value=null};return{showReprocessModal:M,reprocessType:Z,reprocessRecording:Ae,asrReprocessOptions:ft,showTextEditorModal:S,editingTranscriptionContent:x,showAsrEditorModal:_,editingSegments:C,availableSpeakers:V,showSpeakerModal:H,speakerMap:w,speakerDisplayMap:F,modalSpeakers:R,regenerateSummaryAfterSpeakerUpdate:N,speakerSuggestions:B,loadingSuggestions:A,activeSpeakerInput:K,isAutoIdentifying:re,highlightedSpeaker:b,currentSpeakerGroupIndex:oe,speakerGroups:J,recordingToReset:fe,showResetModal:P,identifiedSpeakersInOrder:He,hasSpeakerNames:ie,highlightedTranscript:ne,reprocessTranscription:he,reprocessSummary:Se,confirmReprocess:Qe,cancelReprocess:Ye,executeReprocess:mn,openTranscriptionEditor:q,openTextEditorModal:$,closeTextEditorModal:ae,saveTranscription:Y,openAsrEditorModal:pe,closeAsrEditorModal:ye,saveAsrTranscription:xe,adjustTime:Le,filterSpeakers:Ce,openSpeakerSuggestions:_t,closeSpeakerSuggestions:We,selectSpeaker:lt,addSegment:st,removeSegment:gn,searchSpeakers:Ct,selectSpeakerSuggestion:qt,closeSpeakerSuggestionsOnClick:bs,openSpeakerModal:Ts,closeSpeakerModal:Bi,saveSpeakerNames:cn,highlightSpeakerInTranscript:vn,focusSpeaker:il,blurSpeaker:_s,clearSpeakerHighlight:Yn,navigateToNextSpeakerGroup:ji,navigateToPrevSpeakerGroup:zs,autoIdentifySpeakers:async()=>{if(!t.value){u("No recording selected.","fa-exclamation-circle");return}re.value=!0,u("Starting automatic speaker identification...","fa-magic");try{const E=await fetch(`/tool/speakr/recording/${t.value.id}/auto_identify_speakers`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({current_speaker_map:w.value})}),D=await E.json();if(!E.ok)throw new Error(D.error||"Unknown error occurred during auto-identification.");if(D.message){u(D.message,"fa-info-circle");return}let Q=0;for(const te in D.speaker_map){const le=D.speaker_map[te];w.value[te]&&le&&le.trim()!==""&&(w.value[te].name=le,Q++)}Q>0?u(`${Q} speaker(s) identified successfully!`,"fa-check-circle"):u("No speakers could be identified from the context.","fa-info-circle")}catch(E){console.error("Auto Identify Speakers Error:",E),u(`Error: ${E.message}`,"fa-exclamation-circle",5e3)}finally{re.value=!1}},generateSummary:j,resetRecordingStatus:U,confirmReset:W,cancelReset:G,executeReset:z,toggleInbox:async E=>{if(!(!E||!E.id))try{const D=await fetch(`/tool/speakr/recording/${E.id}/toggle_inbox`,{method:"POST",headers:{"Content-Type":"application/json"}}),Q=await D.json();if(!D.ok)throw new Error(Q.error||"Failed to toggle inbox status");E.is_inbox=Q.is_inbox;const te=e.value.findIndex(le=>le.id===E.id);te!==-1&&(e.value[te].is_inbox=Q.is_inbox),u(`Recording ${Q.is_inbox?"moved to inbox":"marked as read"}`)}catch(D){console.error("Toggle Inbox Error:",D),m(`Failed to toggle inbox status: ${D.message}`)}},toggleHighlight:async E=>{if(!(!E||!E.id))try{const D=await fetch(`/tool/speakr/recording/${E.id}/toggle_highlight`,{method:"POST",headers:{"Content-Type":"application/json"}}),Q=await D.json();if(!D.ok)throw new Error(Q.error||"Failed to toggle highlighted status");E.is_highlighted=Q.is_highlighted;const te=e.value.findIndex(le=>le.id===E.id);te!==-1&&(e.value[te].is_highlighted=Q.is_highlighted),u(`Recording ${Q.is_highlighted?"highlighted":"unhighlighted"}`)}catch(D){console.error("Toggle Highlight Error:",D),m(`Failed to toggle highlighted status: ${D.message}`)}},startReprocessingPoll:g,stopReprocessingPoll:I}}const W_=de(!1),tv=de(!1),q_=de(!1),z_=de(!1),os=de(null),tl=de([]),lf=de(null),nl=de(0),rn=de(null),K_=de(navigator.mediaDevices&&navigator.mediaDevices.getUserMedia),J_=de(!1),G_=de(!1),Q_=de(""),cf=de(""),Y_=de(!1),X_=de(""),Z_=de(""),eE=de(""),Tt=de(null),hr=de(null),pr=de(null),mr=de(null),tE=de(null),nE=de(null),sE=de(null),ea=de(null),iE=de("microphone"),Pi=de([]);let dt=null,yt=null;const rE=de(0),oE=de(!1),aE=de("optimized"),nv=de(0),lE=de(200),ta=de(null),uf=de(!1),ff=de(null),df=de(0),hf=de(""),cE=de([]),uE=de(!0),pf=de(""),mf=de(""),gf=de(""),sl=de(!1),$r=de(null);function sv(){Pi.value.forEach(e=>{e.getTracks().forEach(t=>t.stop())}),Pi.value=[],Tt.value&&(Tt.value.close().catch(e=>{console.error("Error closing AudioContext:",e)}),Tt.value=null),ea.value&&(cancelAnimationFrame(ea.value),ea.value=null),rn.value&&(clearInterval(rn.value),rn.value=null),ta.value&&(clearInterval(ta.value),ta.value=null)}function iv(){tl.value=[],lf.value=null,cf.value="",Pi.value=[],yt=null,dt=null,ff.value=null,uf.value=!1,df.value=0,hf.value="",pf.value="",mf.value="",gf.value="",nl.value=0,tv.value=!1,rn.value&&(clearInterval(rn.value),rn.value=null)}function Nc(e){yt=e}function na(e){dt=e}function rv(){rn.value&&clearInterval(rn.value),rn.value=setInterval(()=>nl.value++,1e3)}function Pc(){rn.value&&(clearInterval(rn.value),rn.value=null)}function Lc(){tl.value=[],lf.value=null,uf.value=!1,ff.value=null,df.value=0,hf.value="",nl.value=0,cf.value="",pf.value="",mf.value="",gf.value="",sv()}async function Fc(){const e=await navigator.mediaDevices.getUserMedia({audio:!0});return yt=e,Pi.value.push(e),e}async function Dc(){const e=await navigator.mediaDevices.getDisplayMedia({audio:!0,video:!0});if(e.getAudioTracks().length===0)throw e.getVideoTracks().forEach(t=>t.stop()),new Error('System audio permission was not granted. Please ensure you check the "Share system audio" box.');return dt=e,Pi.value.push(e),e}function $c(e,t){Tt.value||(Tt.value=new(window.AudioContext||window.webkitAudioContext));const n=Tt.value.createMediaStreamSource(e),s=Tt.value.createMediaStreamSource(t),i=Tt.value.createMediaStreamDestination();n.connect(i),s.connect(i);const r=i.stream.getAudioTracks()[0];if(!r)throw new Error("Failed to create mixed audio track");return new MediaStream([r])}function Bc(e){const t=e.getAudioTracks();if(t.length===0)throw new Error("System stream has no audio tracks");return new MediaStream(t)}function ov(){return[{mimeType:"audio/webm;codecs=opus",audioBitsPerSecond:32e3,description:"Optimized (32kbps Opus)"},{mimeType:"audio/webm;codecs=opus",audioBitsPerSecond:64e3,description:"Good quality (64kbps Opus)"},{mimeType:"audio/webm",audioBitsPerSecond:64e3,description:"Standard WebM (64kbps)"},{mimeType:"audio/mp4",audioBitsPerSecond:64e3,description:"Standard MP4 (64kbps)"},{mimeType:"audio/webm;codecs=opus",description:"Opus codec (default bitrate)"},{mimeType:"audio/webm",description:"WebM (default bitrate)"}]}function av(){const e=ov();for(const t of e)if(MediaRecorder.isTypeSupported(t.mimeType))return t;return null}function jc(e,t){let n=!1;const s=av();let i=0,r=128e3;for(;!n&&i<5;)try{i++,s&&i===1?(os.value=new MediaRecorder(e,s),r=s.audioBitsPerSecond||64e3):s&&i===2&&s.audioBitsPerSecond?(os.value=new MediaRecorder(e,{mimeType:s.mimeType}),r=128e3):(os.value=new MediaRecorder(e),r=128e3),n=!0}catch(o){if(console.warn(`MediaRecorder creation attempt ${i} failed:`,o),os.value=null,i>=5)throw new Error(`Failed to create MediaRecorder: ${o.message}`)}if(!os.value)throw new Error("Failed to create MediaRecorder with any configuration");return nv.value=r,t&&t(r),os.value.ondataavailable=o=>{tl.value.push(o.data)},os.value}function Hc(e){return Tt.value||(Tt.value=new(window.AudioContext||window.webkitAudioContext)),hr.value=Tt.value.createAnalyser(),hr.value.fftSize=256,Tt.value.createMediaStreamSource(e).connect(hr.value),hr.value}function Uc(e,t){return Tt.value||(Tt.value=new(window.AudioContext||window.webkitAudioContext)),pr.value=Tt.value.createAnalyser(),pr.value.fftSize=256,Tt.value.createMediaStreamSource(e).connect(pr.value),mr.value=Tt.value.createAnalyser(),mr.value.fftSize=256,Tt.value.createMediaStreamSource(t).connect(mr.value),{micAnalyser:pr.value,systemAnalyser:mr.value}}function lv(e){$r.value=e,sl.value=!0}function cv(){const e=$r.value;return $r.value=null,sl.value=!1,e}function uv(){$r.value=null,sl.value=!1}const fE=Object.freeze(Object.defineProperty({__proto__:null,acceptDisclaimer:cv,activeStreams:Pi,actualBitrate:nv,analyser:hr,animationFrameId:ea,asrLanguage:X_,asrMaxSpeakers:eE,asrMinSpeakers:Z_,asrResult:pf,asrResultOffline:gf,asrResultOnline:mf,audioBlobURL:lf,audioChunks:tl,audioContext:Tt,canRecordAudio:K_,canRecordSystemAudio:J_,cancelDisclaimer:uv,cleanupRecording:sv,combineAudioStreams:$c,createAudioOnlyStream:Bc,createMediaRecorderWithFallback:jc,currentDraftId:ff,discardRecordingState:Lc,draftRecordings:cE,draftsExpanded:uE,estimatedFileSize:rE,fileSizeWarningShown:oE,getFirstSupportedRecorderOption:av,getMicrophoneStream:Fc,getRecorderOptionsList:ov,getSystemAudioStream:Dc,initRecordingState:iv,isPaused:uf,isPausingRecording:q_,isRecording:W_,isStoppingRecording:tv,is_final:z_,maxRecordingMB:lE,mediaRecorder:os,micAnalyser:pr,get micStream(){return yt},micVisualizer:nE,pausedDuration:df,pausedTranscription:hf,pendingRecordingMode:$r,recordingInterval:rn,recordingMode:iE,recordingNotes:cf,recordingQuality:aE,recordingTime:nl,setMicStream:Nc,setSystemStream:na,setupDualVisualizer:Uc,setupSingleVisualizer:Hc,showDisclaimer:lv,showRecordingDisclaimerModal:sl,showSystemAudioHelp:Y_,sizeCheckInterval:ta,startRecordingTimer:rv,stopRecordingTimer:Pc,systemAnalyser:mr,systemAudioError:Q_,systemAudioSupported:G_,get systemStream(){return dt},systemVisualizer:sE,visualizer:tE},Symbol.toStringTag,{value:"Module"}));function dE({t:e,filteredRecordings:t,loadRecordings:n,showToast:s,currentPage:i,hasNextPage:r,isLoadingMore:o,searchQuery:l,availableTags:c,draftNameInput:h}){const f=de(!1),u=de(!1),m=de([]),v=de({start:"",end:""}),w=de(""),b=de(""),H=de("created_at"),P=de(null),M=de(""),S=de(null),_=zn(()=>[{value:"today",label:e("sidebar.today")},{value:"yesterday",label:e("sidebar.yesterday")},{value:"thisweek",label:e("sidebar.thisWeek")},{value:"lastweek",label:e("sidebar.lastWeek")},{value:"thismonth",label:e("sidebar.thisMonth")},{value:"lastmonth",label:e("sidebar.lastMonth")}]),x=(ie,ne)=>ie.getFullYear()===ne.getFullYear()&&ie.getMonth()===ne.getMonth()&&ie.getDate()===ne.getDate(),C=ie=>x(ie,new Date),V=ie=>{const ne=new Date;return ne.setDate(ne.getDate()-1),x(ie,ne)},F=ie=>{const ne=new Date,he=new Date(ne),Se=ne.getDay(),Qe=ne.getDate()-Se+(Se===0?-6:1);he.setDate(Qe),he.setHours(0,0,0,0);const Ye=new Date(he);return Ye.setDate(he.getDate()+6),Ye.setHours(23,59,59,999),ie>=he&&ie<=Ye},R=ie=>{const ne=new Date,he=new Date(ne),Se=ne.getDay(),Qe=ne.getDate()-Se+(Se===0?-6:1)-7;he.setDate(Qe),he.setHours(0,0,0,0);const Ye=new Date(he);return Ye.setDate(he.getDate()+6),Ye.setHours(23,59,59,999),ie>=he&&ie<=Ye},N=ie=>{const ne=new Date;return ie.getFullYear()===ne.getFullYear()&&ie.getMonth()===ne.getMonth()},B=ie=>{const ne=new Date,he=new Date(ne.getFullYear(),ne.getMonth()-1,1);return ie.getFullYear()===he.getFullYear()&&ie.getMonth()===he.getMonth()},A=ie=>{const ne=H.value==="meeting_date"?ie.meeting_date:ie.created_at;return ne?new Date(ne):null},K=zn(()=>{const ie=[...t.value].sort((he,Se)=>{const Qe=A(he),Ye=A(Se);return!Qe&&!Ye?0:Qe?Ye?Ye-Qe:-1:1}),ne={today:[],yesterday:[],thisWeek:[],lastWeek:[],thisMonth:[],lastMonth:[],older:[]};return ie.forEach(he=>{const Se=A(he);if(!Se){ne.older.push(he);return}C(Se)?ne.today.push(he):V(Se)?ne.yesterday.push(he):F(Se)?ne.thisWeek.push(he):R(Se)?ne.lastWeek.push(he):N(Se)?ne.thisMonth.push(he):B(Se)?ne.lastMonth.push(he):ne.older.push(he)}),[{title:e("sidebar.today"),items:ne.today},{title:e("sidebar.yesterday"),items:ne.yesterday},{title:e("sidebar.thisWeek"),items:ne.thisWeek},{title:e("sidebar.lastWeek"),items:ne.lastWeek},{title:e("sidebar.thisMonth"),items:ne.thisMonth},{title:e("sidebar.lastMonth"),items:ne.lastMonth},{title:e("sidebar.older"),items:ne.older}].filter(he=>he.items.length>0)}),re=()=>{f.value=!f.value},oe=()=>{let ie=[];if(b.value.trim()&&ie.push(b.value.trim()),m.value.length>0){const ne=m.value.map(he=>{const Se=c.value.find(Qe=>Qe.id===he);return Se?`tag:${Se.name.replace(/\s+/g,"_")}`:""}).filter(Boolean);ie.push(...ne)}return w.value?ie.push(`date:${w.value}`):(v.value.start||v.value.end)&&(v.value.start&&ie.push(`date_from:${v.value.start}`),v.value.end&&ie.push(`date_to:${v.value.end}`)),ie.join(" ")},J=()=>{l.value=oe()},fe=()=>{m.value=[],v.value={start:"",end:""},w.value="",b.value="",l.value=""},Z=ie=>{m.value=[ie.id],J()},Ae=()=>{l.value="",fe()},ft=async()=>{!r.value||o.value||await n(i.value+1,!0,l.value)},_e=ie=>{P.value=ie.id,M.value=ie.name,Ss(()=>{h.value&&h.value[0]?h.value[0].focus():h.value&&h.value.focus()})},He=async ie=>{if(!P.value)return;const ne=M.value.trim();if(P.value=null,!(!ne||ne===ie.name))try{const Se=await(await fetch(`/tool/speakr/api/draft/${ie.id}/rename`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:ne})})).json();if(Se.success)ie.name=ne,s("重命名成功","fa-check");else throw new Error(Se.error)}catch(he){console.error("Error renaming draft:",he),s(`重命名失败: ${he.message}`,"fa-exclamation-circle")}};return wn(m,()=>{J()},{deep:!0}),wn(w,()=>{J()}),wn(v,()=>{J()},{deep:!0}),wn(b,ie=>{clearTimeout(S.value),S.value=setTimeout(()=>{J()},300)}),{isSidebarCollapsed:f,showAdvancedFilters:u,filterTags:m,filterDateRange:v,filterDatePreset:w,filterTextQuery:b,sortBy:H,editingDraftId:P,editingDraftName:M,datePresetOptions:_,groupedRecordings:K,toggleSidebar:re,buildSearchQuery:oe,applyAdvancedFilters:J,clearAllFilters:fe,filterByTag:Z,clearTagFilter:Ae,loadMoreRecordings:ft,startDraftRename:_e,saveDraftRename:He}}const{createApp:hE,ref:k,reactive:sc,computed:vt,onMounted:pE,watch:Et,nextTick:et}=N_;D_();document.addEventListener("DOMContentLoaded",async()=>{var r;if(window.i18n){const o=document.getElementById("app"),l=(o==null?void 0:o.dataset.userLanguage)||localStorage.getItem("preferredLanguage")||"en";await window.i18n.init(l),console.log("i18n initialized with language:",l)}const e=k((r=document.querySelector('meta[name="csrf-token"]'))==null?void 0:r.getAttribute("content"));"serviceWorker"in navigator&&window.isSecureContext&&window.location.hostname!=="localhost"&&window.addEventListener("load",()=>{navigator.serviceWorker.register("/tool/speakr/static/sw.js").then(o=>{console.log("ServiceWorker registration successful with scope: ",o.scope)}).catch(o=>{console.log("ServiceWorker registration failed: ",o)})});const t=(o,l={})=>!window.i18n||!window.i18n.t?o:window.i18n.t(o,l);let n=null,s=null;const i=hE({setup(){let o=!1,l="";const c=k("upload"),h=k(!1),f=k([]),u=k(null),m=k("summary"),v=k(""),w=k(!0),b=k(null),H=k(1),P=k(25),M=k(0),S=k(0),_=k(!1),x=k(!1),C=k(!1),V=k(null);k(null);const F=k("unknown"),R=k(!1),N=k(!1),B=k(!1),A=k("blue"),K=k(!1),re=k(window.innerWidth),oe=k("transcript"),J=k(!1),fe=k("en"),Z=k("English"),Ae=k([]),ft=k(!1),_e=k([]),He=k(null),ie=k(0),ne=k(""),he=k(!1),Se=k(null),Qe=k(!1),Ye=k(!1),mn=k(250),Zt=k(!0),In=k("size"),En=k(20),g=k("20MB"),T=k(""),I=k(null),{isRecording:j,isStoppingRecording:U,isPausingRecording:W,is_final:G,mediaRecorder:z,audioChunks:q,audioBlobURL:$,recordingTime:ae,recordingInterval:Y,canRecordAudio:pe,canRecordSystemAudio:ye,systemAudioSupported:xe,systemAudioError:Le,recordingNotes:Ce,showSystemAudioHelp:_t,asrLanguage:We,asrMinSpeakers:lt,asrMaxSpeakers:st,audioContext:gn,analyser:ws,micAnalyser:Ct,systemAnalyser:qt,visualizer:bs,micVisualizer:Ts,systemVisualizer:Bi,animationFrameId:cn,recordingMode:Bt,activeStreams:vn,estimatedFileSize:ji,fileSizeWarningShown:zs,recordingQuality:il,actualBitrate:_s,maxRecordingMB:Yn,sizeCheckInterval:Xn,isPaused:jt,currentDraftId:mt,pausedDuration:E,pausedTranscription:D,draftRecordings:Q,draftsExpanded:te,asrResult:le,asrResultOnline:Re,asrResultOffline:Oe,showRecordingDisclaimerModal:Xe}=fE,qe=k(!1),Ze=k(""),Ks=k(""),rl=k(""),yn=k([]),Nn=k([]),ol=k(""),Es=vt(()=>Nn.value.map(a=>yn.value.find(d=>d.id==a)).filter(Boolean)),fv=vt(()=>{const a=Cn.value;return a.includes("#")||a.includes("**")||a.includes("```")||a.includes("* ")||a.includes("- ")}),dv=zn(()=>window.marked.parse(Cn.value||"",{breaks:!0})),hv=vt(()=>{const a=yn.value.filter(p=>!Nn.value.includes(p.id));if(!ol.value)return a;const d=ol.value.toLowerCase();return a.filter(p=>p.name.toLowerCase().includes(d))}),Zr=k(!1),eo=k(!1),al=k(!1),Hi=k(""),to=k(""),pv=k(!1),mv=k(!1),vf=k(!1),ll=k(!1),cl=k(!1),gv=k(!1),vv=k(!1),ct=k(null),yv=k(""),Sv=k([]),wv=k([]),Ui=k(null),Js=sc({share_summary:!0,share_notes:!0}),Gs=k(""),Vi=k(!1),Wi=k([]),ul=k(!1),Qs=k(null),no=k(!1),Ys=k(null),bv=k(null),Tv=k(null),_v=k(null),Ev=k(!1),Cv=k({language:"zh",min_speakers:1,max_speakers:10}),Cs=k({}),kv=k(!1),fl=k({}),xv=k({}),Rv=k(null),Av=k({}),Mv=k([]),Ov=k(-1),Iv=k([]),Xs=k(!1),Zs=k(!1),Ot=k(!1),It=k(!1),so=k(""),io=k(""),ei=k(null),yf=2e3,dl=k(null),it=k(null),hl=k(null),rt=k(null),pl=k(null),Pn=k(null),qi=k("simple"),Nv=k(!1),Pv=k(null),ro=k(!1),ti=k(!1),en=k([]),oo=k(""),ni=k(!1),ks=k(null),ao=k(1),zi=k(60),lo=k(40),co=k(!1),Ki=k(!1),Ji=k(""),Gi=k(""),Zn=k(""),uo=k(""),Sf=k({name:"领导发言稿",fontSize:40}),ml=k(!1),Qi=k(null),Cn=k(""),wf=k(!1),bf=k(!1),gl=k(0),vl=k(0),yl=k("获取链接中..."),Tf=k(""),Yi=k(!1),_f=k(!0),Sl=k((localStorage.getItem("selectedScene")||"cg").toLowerCase()==="yl"?"yl":"cg"),Ln=k(!1),wl=k(""),fo=k(""),ho=k(""),po=k(""),Xi=k(""),Zi=k(""),Ef=k(null),Cf=k(null),bl=k(null),kf=k(66.67),mo=k(!1);let go=null;const si=vt(()=>(le.value||"")+(Oe.value||"")+(Re.value||"")),er=vt(()=>(fo.value||"")+(po.value||"")+(ho.value||"")),Tl=vt(()=>Bt.value==="both"),Lv=vt(()=>{if(!Tl.value)return si.value;const a=si.value||"",d=er.value||"",p=[];return a&&p.push(`[MIC]
`+a),d&&p.push(`[SYSTEM]
`+d),p.join(`
`)});function xf(a,d=go||bl.value){if(!d)return;const p=d.getBoundingClientRect();if(!p.height)return;const y=(a-p.top)/p.height*100;kf.value=Math.min(80,Math.max(35,y))}function _l(){mo.value&&(mo.value=!1,go=null,window.removeEventListener("mousemove",Rf),window.removeEventListener("mouseup",_l))}function Rf(a){mo.value&&xf(a.clientY)}function Fv(a){var d,p,y;Tl.value&&(a.preventDefault(),go=((p=(d=a.currentTarget)==null?void 0:d.closest)==null?void 0:p.call(d,".dual-transcript-stack"))||((y=a.currentTarget)==null?void 0:y.parentElement)||bl.value,mo.value=!0,xf(a.clientY,go),window.addEventListener("mousemove",Rf),window.addEventListener("mouseup",_l))}function El(){fo.value="",ho.value="",po.value="",Xi.value="",Zi.value="",vl.value=0}function Af(){return Lv.value||""}function Dv(){return Bt.value==="system"?"system":"mic"}function vo(){o=!!(n!=null&&n.isActive()||s!=null&&s.isActive())}function xs(){return[n,s].filter(Boolean)}function Mf(a,d){return new U_({getMicStream:()=>yt,getSystemStream:()=>dt,getPausedTranscription:d.getPausedTranscription,setPausedTranscription:d.setPausedTranscription,getShowSpeaker:()=>_f.value,getConfigWords:()=>l,getScene:()=>Sl.value,getLastTimer:()=>d.getLastTimer?d.getLastTimer():gl.value||0,setLastTimer:p=>{d.setLastTimer?d.setLastTimer(p):gl.value=p},onMainTextChange:d.onMainTextChange,onPreviewTextChange:d.onPreviewTextChange,onOfflineTextChange:d.onOfflineTextChange,onActiveChange:vo,onError:p=>{console.error(`Realtime ASR pipeline (${a}) error:`,p)},sourceKind:a})}function ii(a={}){xs().forEach(d=>d.resetTranscript(a)),(a.clearTimestampBarrier||!s)&&El()}function $v(){xs().forEach(a=>a.prepareForResume())}function Of(){xs().forEach(a=>a.dispose()),n=null,s=null,o=!1}function Cl(){return Of(),n=Mf(Dv(),{getPausedTranscription:()=>D.value||"",setPausedTranscription:a=>{D.value=a||""},onMainTextChange:a=>{le.value=a||""},onPreviewTextChange:a=>{Re.value=a||""},onOfflineTextChange:a=>{Oe.value=a||""}}),Bt.value==="both"?s=Mf("system",{getPausedTranscription:()=>Xi.value||"",setPausedTranscription:a=>{Xi.value=a||""},getLastTimer:()=>vl.value||0,setLastTimer:a=>{vl.value=a},onMainTextChange:a=>{fo.value=a||""},onPreviewTextChange:a=>{ho.value=a||""},onOfflineTextChange:a=>{po.value=a||""}}):El(),n}function Bv(){return!n||Bt.value==="both"&&!s||Bt.value!=="both"&&s?Cl():n}function If(){Bv();const a=xs().map(d=>d.start()).some(d=>d===1);return vo(),a?1:0}async function jv(a=2e4){const d=xs();await Promise.allSettled(d.map(p=>p.finish(a))),vo()}function Hv(){xs().forEach(a=>a.stop()),vo()}function Uv(a){return String(a||"cg").trim().toLowerCase()==="yl"?"yl":"cg"}function Vv(a){const d=Uv(a);if(j.value||jt.value||U.value||o===!0){ee("录音中无法切换场景","error");return}Sl.value=d,localStorage.setItem("selectedScene",d)}async function Wv(a=8e3){await Promise.all(xs().map(d=>d.finalizeRemainingSentences(a)))}const Rs=vt(()=>re.value<1024),qv=vt(()=>[{value:"",label:gt("form.autoDetect")},{value:"en",label:gt("languages.en")},{value:"es",label:gt("languages.es")},{value:"fr",label:gt("languages.fr")},{value:"de",label:gt("languages.de")},{value:"it",label:gt("languages.it")},{value:"pt",label:gt("languages.pt")},{value:"nl",label:gt("languages.nl")},{value:"ru",label:gt("languages.ru")},{value:"zh",label:gt("languages.zh")},{value:"ja",label:gt("languages.ja")},{value:"ko",label:gt("languages.ko")}]),Nf=vt(()=>f.value),zv=vt(()=>{if(!u.value)return[];const a=u.value,d=[];if(a.created_at&&d.push({icon:"fas fa-history",text:$f(a.created_at)}),a.file_size&&d.push({icon:"fas fa-file-audio",text:nr(a.file_size)}),a.duration&&d.push({icon:"fas fa-clock",text:Bf(a.duration)}),a.original_filename){const y=a.original_filename.length>30?a.original_filename.substring(0,30)+"...":a.original_filename;d.push({icon:"fas fa-file",text:y,fullText:a.original_filename})}return a.tags&&a.tags.length>0&&d.push({icon:"fas fa-tags",text:"",tags:a.tags,isTagItem:!0}),d}),Pf=vt(()=>_e.value.length),Lf=vt(()=>_e.value.filter(a=>a.status==="completed"||a.status==="failed").length),Kv=vt(()=>_e.value.filter(a=>["completed","failed"].includes(a.status))),Jv=vt(()=>c.value!=="recording"||!j.value&&!jt.value&&!!$.value?!1:j.value||jt.value||U.value?!0:!$.value&&(vn.value.length>0||ae.value>0||!!mt.value)),Gv=()=>{_e.value=_e.value.filter(a=>!["completed","failed"].includes(a.status))},kl=vt(()=>{var p;if(!((p=u.value)!=null&&p.transcription))return[];const a=u.value.transcription;let d;try{d=JSON.parse(a)}catch{d=null}if(d&&Array.isArray(d)){const y=[],O=new Set;return d.forEach(L=>{L.speaker&&String(L.speaker).trim()&&!O.has(L.speaker)&&(O.add(L.speaker),y.push(L.speaker))}),y}else if(typeof a=="string"){const y=/\[([^\]]+)\]:/g,O=[],L=new Set;let X;for(;(X=y.exec(a))!==null;){const me=X[1].trim();me&&!L.has(me)&&(L.add(me),O.push(me))}return O}return[]});vt(()=>kl.value);const Ff=vt(()=>{var p,y,O;if(!((p=u.value)!=null&&p.transcription))return{hasDialogue:!1,content:"",speakers:[],simpleSegments:[],bubbleRows:[]};const a=u.value.transcription;let d;try{d=JSON.parse(a)}catch{d=null}if(d&&Array.isArray(d)){if(!d.some(ue=>ue.speaker)){const ue=d.map(De=>({sentence:De.sentence,startTime:De.start_time}));return{hasDialogue:!1,isJson:!0,content:ue.map(De=>De.sentence).join(`
`),simpleSegments:ue,speakers:[],bubbleRows:[]}}const X=[...new Set(d.map(ue=>ue.speaker).filter(Boolean))],me={};X.forEach((ue,De)=>{me[ue]=`speaker-color-${De%8+1}`});const ge=d.map(ue=>{var De;return{speakerId:ue.speaker,speaker:((De=Cs.value[ue.speaker])==null?void 0:De.name)||ue.speaker,sentence:ue.sentence,startTime:ue.start_time||ue.startTime,endTime:ue.end_time||ue.endTime,color:me[ue.speaker]||"speaker-color-1"}}),ve=[];let Te=null;ge.forEach(ue=>{ve.push({...ue,showSpeaker:ue.speakerId!==Te}),Te=ue.speakerId});const we=[];let Fe=null;return ge.forEach(ue=>{(we.length===0||ue.speakerId!==Fe)&&(we.push({speaker:ue.speaker,color:ue.color,isMe:ue.speaker&&typeof ue.speaker=="string"&&ue.speaker.toLowerCase().includes("me"),bubbles:[]}),Fe=ue.speakerId),we[we.length-1].bubbles.push({sentence:ue.sentence,startTime:ue.startTime||ue.start_time,color:ue.color})}),{hasDialogue:!0,isJson:!0,segments:ge,simpleSegments:ve,bubbleRows:we,speakers:X.map(ue=>{var De;return{name:((De=Cs.value[ue])==null?void 0:De.name)||ue,color:me[ue]}})}}else{const L=/\[([^\]]+)\]:\s*/g;if(!L.test(a))return{hasDialogue:!1,isJson:!1,content:a,speakers:[],simpleSegments:[],bubbleRows:[]};L.lastIndex=0;const me=new Set;let ge;for(;(ge=L.exec(a))!==null;)me.add(ge[1]);const ve=Array.from(me),Te={};ve.forEach((ze,ns)=>{Te[ze]=`speaker-color-${ns%8+1}`});const we=[],Fe=a.split(`
`);let ue=null,De="";for(const ze of Fe){const ns=ze.match(/^\[([^\]]+)\]:\s*(.*)$/);ns?(ue&&De.trim()&&we.push({speakerId:ue,speaker:((y=Cs.value[ue])==null?void 0:y.name)||ue,sentence:De.trim(),color:Te[ue]||"speaker-color-1"}),ue=ns[1],De=ns[2]):ue&&ze.trim()?De+=" "+ze.trim():!ue&&ze.trim()&&we.push({speakerId:null,speaker:null,sentence:ze.trim(),color:"speaker-color-1"})}ue&&De.trim()&&we.push({speakerId:ue,speaker:((O=Cs.value[ue])==null?void 0:O.name)||ue,sentence:De.trim(),color:Te[ue]||"speaker-color-1"});const ai=[];let cd=null;we.forEach(ze=>{ai.push({...ze,showSpeaker:ze.speakerId!==cd,sentence:ze.sentence||ze.text}),cd=ze.speakerId});const jl=[];let ts=null;return we.forEach(ze=>{(!ts||ts.speakerId!==ze.speakerId)&&(ts&&jl.push(ts),ts={speakerId:ze.speakerId,speaker:ze.speaker,color:ze.color,bubbles:[],isMe:ze.speaker&&ze.speaker.toLowerCase().includes("me")}),ts.bubbles.push({sentence:ze.sentence,color:ze.color})}),ts&&jl.push(ts),{hasDialogue:!0,isJson:!1,segments:we,simpleSegments:ai,bubbleRows:jl,speakers:ve.map(ze=>{var ns;return{name:((ns=Cs.value[ze])==null?void 0:ns.name)||ze,color:Te[ze]||"speaker-color-1"}})}}}),tr={light:[{id:"blue",name:"Ocean Blue",description:"Classic blue theme with professional appeal",class:""},{id:"emerald",name:"Forest Emerald",description:"Fresh green theme for a natural feel",class:"theme-light-emerald"},{id:"purple",name:"Royal Purple",description:"Elegant purple theme with sophistication",class:"theme-light-purple"},{id:"rose",name:"Sunset Rose",description:"Warm pink theme with gentle energy",class:"theme-light-rose"},{id:"amber",name:"Golden Amber",description:"Warm yellow theme for brightness",class:"theme-light-amber"},{id:"teal",name:"Ocean Teal",description:"Cool teal theme for tranquility",class:"theme-light-teal"}],dark:[{id:"blue",name:"Midnight Blue",description:"Deep blue theme for focused work",class:""},{id:"emerald",name:"Dark Forest",description:"Rich green theme for comfortable viewing",class:"theme-dark-emerald"},{id:"purple",name:"Deep Purple",description:"Mysterious purple theme for creativity",class:"theme-dark-purple"},{id:"rose",name:"Dark Rose",description:"Muted pink theme with subtle warmth",class:"theme-dark-rose"},{id:"amber",name:"Dark Amber",description:"Warm brown theme for cozy sessions",class:"theme-dark-amber"},{id:"teal",name:"Deep Teal",description:"Dark teal theme for calm focus",class:"theme-dark-teal"}]},Df=async a=>{yl.value="获取链接中...",ml.value=!0;const p=await fetch("/tool/speakr/api/external/summarize_text",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input_str:le.value,prompt_id:a?a.id:""})}),y=await p.json();if(p&&(Tf.value=y.string,yl.value="点击打开投屏页面",console.log(y.value,"urlinfo.value",p,y)),!p.ok)throw new Error(y.error||"Failed to reset status")},Qv=async()=>{Yi.value=!0;let a="/tool/speakr/api/external/submit";try{const d=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input_str:Cn.value})}),p=await d.json();if(d&&(window.open(p.string,"_blank"),Yi.value=!1),!d.ok)throw Yi.value=!1,new Error(p.error||"Failed to reset status")}catch(d){console.error("接口请求失败:",d),Yi.value=!1}},Yv=()=>{ml.value=!1},Ue=(a,d=7e3)=>{b.value=a,d>0&&setTimeout(()=>{b.value===a&&(b.value=null)},d)},nr=a=>{if(a==null||a===0)return"0 Bytes";const d=1024,p=["Bytes","KB","MB","GB","TB"];a<0&&(a=0);const y=a===0?0:Math.max(0,Math.floor(Math.log(a)/Math.log(d)));return(y===0?a:parseFloat((a/Math.pow(d,y)).toFixed(2)))+" "+p[y]},$f=a=>{if(!a)return"";try{let d=new Date(a);if(isNaN(d.getTime()))if(/^\d{4}-\d{2}-\d{2}$/.test(a))d=new Date(a+"T00:00:00");else return a;return isNaN(d.getTime())?a:d.toLocaleDateString("zh-CN",{year:"numeric",month:"long",day:"numeric"})}catch(d){return console.error("Error formatting date:",d),a}},Xv=a=>!a||a==="COMPLETED"?"":{PENDING:gt("status.queued"),PROCESSING:gt("status.processing"),TRANSCRIBING:gt("status.transcribing"),SUMMARIZING:gt("status.summarizing"),FAILED:gt("status.failed"),UPLOADING:gt("status.uploading")}[a]||a.charAt(0).toUpperCase()+a.slice(1).toLowerCase(),Zv=a=>{switch(a){case"PENDING":return"status-pending";case"PROCESSING":return"status-processing";case"SUMMARIZING":return"status-summarizing";case"COMPLETED":return"";case"FAILED":return"status-failed";default:return"status-pending"}},ey=a=>{const d=Math.floor(a/60),p=a%60;return`${d.toString().padStart(2,"0")}:${p.toString().padStart(2,"0")}`},Bf=a=>{if(a==null||a<0)return"N/A";if(a<1)return`${a.toFixed(2)} seconds`;if(a=Math.round(a),a<60)return`${a} sec`;const d=Math.floor(a/3600),p=Math.floor(a%3600/60),y=a%60;let O=[];return d>0&&O.push(`${d} hr`),p>0&&O.push(`${p} min`),d===0&&y>0&&O.push(`${y} sec`),O.join(" ")},jf=()=>`录音_${new Date().toISOString().replace(/[:.]/g,"-")}.webm`,yo=(a,d)=>{if(!a)return d;const p=/filename\*=utf-8''([^;]+)/i.exec(a);if(p&&p[1])return decodeURIComponent(p[1]);const y=/filename="([^"]+)"/i.exec(a);return y&&y[1]?y[1]:d},Hf=()=>{if(!j.value||!_s.value)return;const a=ae.value,p=_s.value*a/8;ji.value=p;const y=p/(1024*1024),O=Yn.value*.8;y>O&&!zs.value&&(zs.value=!0,ee(`Recording size is ${nr(p)}. Consider stopping soon to avoid auto-stop at ${Yn.value}MB.`,"fa-exclamation-triangle",5e3)),y>Yn.value&&(console.log(`Auto-stopping recording: size ${nr(p)} exceeds limit of ${Yn.value}MB`),Co(),ee(`Recording automatically stopped at ${nr(p)} to prevent excessive file size.`,"fa-stop-circle",7e3))},xl=()=>{Xn.value&&clearInterval(Xn.value),ji.value=0,zs.value=!1,Xn.value=setInterval(Hf,5e3)},So=()=>{Xn.value&&(clearInterval(Xn.value),Xn.value=null)},wo=k(!1),Rl=k([]),Al=k(null),Ml=k(""),Ol=k(""),bo=k(localStorage.getItem("selected_prompt_id")||null);let Uf="";const ty=a=>{Uf=a,Al.value=null,Ml.value="",Ol.value="",wo.value=!0,sy(),iy()},ny=()=>{wo.value=!1},sy=async a=>{try{const p=await(await fetch("/tool/speakr/api/external/prompts/list",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({skip:0,limit:999})})).json();Rl.value=p.prompt_list||[]}catch(d){console.error("提示词加载失败",d)}},iy=async a=>{try{const p=await(await fetch("/tool/speakr/api/external/recommend_prompts",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input_str:le.value})})).json();Al.value=p.id,Ml.value=p.name,Ol.value=p.reason}catch(d){console.error("获取推荐失败",d)}},ry=()=>{bo.value&&localStorage.setItem("selected_prompt_id",bo.value);const a=Rl.value.find(d=>d.id==bo.value);console.log("选中的提示词:",a),Uf==="zj"?Vf(a):Df(a),wo.value=!1},Vf=async a=>{wf.value=!0;try{Cn.value="思考中...";const d=await fetch("/tool/speakr/api/external/summarize_text_stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input_str:le.value,prompt_id:a?a.id:""})});if(!d.ok){const O=await d.json();throw new Error(O.error||"Failed to create share link")}Cn.value="";const p=d.body.getReader(),y=new TextDecoder;for(;;){const{done:O,value:L}=await p.read();if(O)break;const me=y.decode(L,{stream:!0}).split(`
`);for(const ge of me)if(ge.startsWith("data: "))try{const ve=JSON.parse(ge.slice(6));if(ve.content&&(Cn.value+=ve.content),ve.finished){console.log(Cn.value,"analysisResult.value"),ee("总结完成!","fa-check-circle");break}}catch(ve){console.log("解析流数据出错:",ve)}}}catch(d){Ue(`Failed to create share link: ${d.message}`)}},un=()=>{Se.value&&clearInterval(Se.value),Se.value=null,He.value=null,ie.value=0,ne.value=""},ce=V_({recordings:f,selectedRecording:u,selectedTab:m,uploadQueue:_e,currentlyProcessingFile:He,processingProgress:ie,processingMessage:ne,progressPopupMinimized:Qe,progressPopupClosed:Ye,identifiedSpeakers:kl,processedTranscription:Ff,showToast:ee,setGlobalError:Ue,resetCurrentFileProcessingState:un,speakerMap:Cs,highlightedSpeaker:Pv,showSpeakerModal:vf,showResetModal:mv,showReprocessModal:pv,showTextEditorModal:gv,showAsrEditorModal:vv,editingTranscriptionContent:yv,editingSegments:Sv,availableSpeakers:wv,speakerDisplayMap:Av,modalSpeakers:Mv,regenerateSummaryAfterSpeakerUpdate:kv,speakerSuggestions:fl,loadingSuggestions:xv,activeSpeakerInput:Rv,isAutoIdentifying:Ev,currentSpeakerGroupIndex:Ov,speakerGroups:Iv,recordingToReset:bv,reprocessType:Tv,reprocessRecording:_v,asrReprocessOptions:Cv}),oy=ce.reprocessTranscription,ay=ce.reprocessSummary,ly=ce.generateSummary,cy=ce.resetRecordingStatus,uy=ce.cancelReprocess,fy=ce.executeReprocess,dy=ce.openTranscriptionEditor,hy=ce.openTextEditorModal,py=ce.closeTextEditorModal,my=ce.saveTranscription,gy=ce.openAsrEditorModal,vy=ce.closeAsrEditorModal,yy=ce.saveAsrTranscription,Sy=ce.adjustTime,wy=ce.filterSpeakers,by=ce.openSpeakerSuggestions,Ty=ce.closeSpeakerSuggestions,_y=ce.selectSpeaker,Ey=ce.addSegment,Cy=ce.removeSegment,ky=ce.confirmReset,xy=ce.cancelReset,Ry=ce.executeReset,Ay=ce.searchSpeakers,My=ce.selectSpeakerSuggestion,Oy=ce.closeSpeakerSuggestionsOnClick,Iy=ce.openSpeakerModal,Ny=ce.closeSpeakerModal,Py=ce.saveSpeakerNames,Ly=ce.highlightSpeakerInTranscript,Fy=ce.focusSpeaker,Dy=ce.blurSpeaker,$y=ce.clearSpeakerHighlight,By=ce.navigateToNextSpeakerGroup,jy=ce.navigateToPrevSpeakerGroup,Hy=ce.autoIdentifySpeakers,Uy=ce.toggleInbox,Vy=ce.toggleHighlight,Wy=()=>{B.value=!B.value,B.value?(document.documentElement.classList.add("dark"),localStorage.setItem("darkMode","true")):(document.documentElement.classList.remove("dark"),localStorage.setItem("darkMode","false"))},qy=()=>{const a=window.matchMedia("(prefers-color-scheme: dark)").matches,d=localStorage.getItem("darkMode");d==="true"||d===null&&a?(B.value=!0,document.documentElement.classList.add("dark")):(B.value=!1,document.documentElement.classList.remove("dark"))},sr=(a,d=null)=>{const p=d||(B.value?"dark":"light"),y=tr[p].find(L=>L.id===a);if(!y){console.warn(`Color scheme '${a}' not found for mode '${p}'`);return}const O=[...tr.light.map(L=>L.class),...tr.dark.map(L=>L.class)].filter(L=>L!=="");document.documentElement.classList.remove(...O),y.class&&document.documentElement.classList.add(y.class),A.value=a,localStorage.setItem("colorScheme",a)},Wf=()=>{const a=localStorage.getItem("colorScheme")||"blue";A.value=a,sr(a)},zy=()=>{K.value=!0},qf=()=>{K.value=!1},Ky=a=>{var d;sr(a),ee(`Applied ${(d=tr[B.value?"dark":"light"].find(p=>p.id===a))==null?void 0:d.name} theme`,"fa-palette")},Jy=()=>{sr("blue"),ee("Reset to default Ocean Blue theme","fa-undo")};Et(B,()=>{sr(A.value)});function To(){return new Promise(a=>{if(document.getElementById("recording-confirm-mask"))return;const d=document.createElement("div");d.id="recording-confirm-mask",d.style.cssText=`
position: fixed;
inset: 0;
background: rgba(0,0,0,0.45);
z-index: 9999;
display: flex;
align-items: center;
justify-content: center;
`;const p=document.createElement("div");p.style.cssText=`
width: 360px;
background: #1f2937;
color: #fff;
border-radius: 12px;
padding: 20px;
box-shadow: 0 10px 30px rgba(0,0,0,.3);
font-family: system-ui;
`,p.innerHTML=`
<div style="font-size:16px;font-weight:600;margin-bottom:10px;">
确认停止录音
</div>
<div style="font-size:14px;color:#d1d5db;margin-bottom:20px;line-height:1.6;">
当前正在录音,切换页面将会停止录音,是否继续?
</div>
<div style="display:flex;justify-content:flex-end;gap:12px;">
<button id="confirm-cancel"
style="padding:6px 14px;border-radius:6px;border:1px solid #4b5563;background:#374151;color:#fff;cursor:pointer;">
继续录音
</button>
<button id="confirm-ok"
style="padding:6px 14px;border-radius:6px;border:none;background:#ef4444;color:#fff;cursor:pointer;">
停止并切换
</button>
</div>
`,d.appendChild(p),document.body.appendChild(d);const y=()=>{document.body.removeChild(d)};p.querySelector("#confirm-ok").onclick=()=>{y(),a(!0)},p.querySelector("#confirm-cancel").onclick=()=>{y(),a(!1)},d.onclick=O=>{O.target===d&&(y(),a(!1))}})}const Gy=async()=>{if(c.value==="recording"&&o===!0){if(!await To())return;Lc(),ii({clearTimestampBarrier:!0}),c.value="upload",u.value=null,Rs.value&&(Ve.isSidebarCollapsed.value=!0)}else Lc(),ii({clearTimestampBarrier:!0}),c.value="upload",u.value=null,Rs.value&&(Ve.isSidebarCollapsed.value=!0)},zf=async a=>{if(c.value==="recording"&&j.value){Ue("请先停止当前录音,再选择其他录音。");return}if(u.value=a,c.value==="recording"&&o===!0){if(!await To())return;if(c.value==="recording"&&o===!0){if(!await To())return;c.value="detail"}else c.value="detail";a&&a.id?localStorage.setItem("lastSelectedRecordingId",a.id):localStorage.removeItem("lastSelectedRecordingId"),Rs.value&&(Ve.isSidebarCollapsed.value=!0)}else{if(c.value==="recording"&&o===!0){if(!await To())return;c.value="detail"}else c.value="detail";a&&a.id?localStorage.setItem("lastSelectedRecordingId",a.id):localStorage.removeItem("lastSelectedRecordingId"),Rs.value&&(Ve.isSidebarCollapsed.value=!0)}},Qy=a=>{a.preventDefault(),h.value=!0},Yy=a=>{a.relatedTarget&&a.currentTarget.contains(a.relatedTarget)||(h.value=!1)},Xy=a=>{a.preventDefault(),h.value=!1,_o(a.dataTransfer.files)},Zy=a=>{_o(a.target.files),a.target.value=null},_o=a=>{let d=0;for(const p of a){const y=p.file?p.file:p,O=p.notes||null,L=p.tags||Es.value||[],X=p.asrOptions||{language:We.value,min_speakers:lt.value,max_speakers:st.value};if(y&&(y.type.startsWith("audio/")||y.type==="video/mp4"||y.type==="video/quicktime"||y.type==="video/x-msvideo"||y.type==="video/webm"||y.name.toLowerCase().endsWith(".amr")||y.name.toLowerCase().endsWith(".3gp")||y.name.toLowerCase().endsWith(".3gpp")||y.name.toLowerCase().endsWith(".mp4")||y.name.toLowerCase().endsWith(".mov")||y.name.toLowerCase().endsWith(".avi")||y.name.toLowerCase().endsWith(".mkv")||y.name.toLowerCase().endsWith(".webm"))){if(y.size>mn.value*1024*1024){Ue(`File "${y.name}" exceeds the maximum size of ${mn.value} MB and was skipped.`);continue}const ge=`client-${Date.now()}-${Math.random().toString(36).substring(2,9)}`;_e.value.push({file:y,notes:O,tags:L,asrOptions:X,status:"queued",recordingId:null,clientId:ge,error:null,willAutoSummarize:!0}),d++}else y&&Ue(`Invalid file type "${y.name}". Only audio files and video containers with audio (MP3, WAV, MP4, MOV, AVI, etc.) are accepted. File skipped.`)}d>0&&(console.log(`Added ${d} file(s) to the queue.`),Qe.value=!1,Ye.value=!1,he.value||tn())},tn=async()=>{var d;if(console.log("Attempting to start processing queue..."),he.value){console.log("Queue processor already active.");return}he.value=!0,un();const a=_e.value.find(p=>p.status==="queued");if(a){if(console.log(`Processing next file: ${a.file.name} (Client ID: ${a.clientId})`),He.value=a,a.clientId.startsWith("reload-")){console.log(`Skipping upload for existing recording: ${a.recordingId}`),a.status="processing",eS(a,a.recordingId);return}a.status="uploading",ne.value="Preparing upload...",ie.value=5;try{const p=new FormData;if(p.append("file",a.file),a.notes&&p.append("notes",a.notes),(a.tags||Es.value||[]).forEach((X,me)=>{const ge=X.id||X;p.append(`tag_ids[${me}]`,ge)}),Ki.value){const X=a.asrOptions||{},me=X.language||Ze.value,ge=X.min_speakers||Ks.value,ve=X.max_speakers||rl.value;me&&p.append("language",me),ge&&ge!==""&&p.append("min_speakers",ge.toString()),ve&&ve!==""&&p.append("max_speakers",ve.toString())}ne.value="Uploading file...",ie.value=10;const O=await fetch("/tool/speakr/upload",{method:"POST",body:p}),L=await O.json();if(!O.ok){let X=L.error||`Upload failed with status ${O.status}`;throw O.status===413&&(X=L.error||`File too large. Max: ${((d=L.max_size_mb)==null?void 0:d.toFixed(0))||mn.value} MB.`),new Error(X)}if(O.status===202&&L.id)console.log(`File ${a.file.name} uploaded. Recording ID: ${L.id}. Starting status poll.`),a.status="pending",a.recordingId=L.id,ne.value="Upload complete. Waiting for processing...",ie.value=30,f.value.unshift(L),M.value++,Kf(a);else throw new Error("Unexpected success response from server after upload.")}catch(p){console.error(`Upload/Processing Error for ${a.file.name} (Client ID: ${a.clientId}):`,p),a.status="failed",a.error=p.message;const y=f.value.findIndex(O=>O.id===a.recordingId);y!==-1?(f.value[y].status="FAILED",f.value[y].transcription=`Upload/Processing failed: ${p.message}`):Ue(`Failed to process "${a.file.name}": ${p.message}`),un(),he.value=!1,await et(),tn()}}else console.log("Upload queue is empty or no files are queued."),he.value=!1},eS=(a,d)=>{a.recordingId=d,Kf(a)},Kf=a=>{Se.value&&clearInterval(Se.value);const d=a.recordingId;if(!d){console.error("Cannot poll status without recording ID for",a.file.name),a.status="failed",a.error="Internal error: Missing recording ID for polling.",un(),he.value=!1,et(tn);return}ne.value="Waiting for transcription...",ie.value=40,Se.value=setInterval(async()=>{var y;if(!He.value||He.value.clientId!==a.clientId||a.status==="failed"||a.status==="completed"&&(!a.willAutoSummarize||a.summaryCompleted)){console.log(`Polling stopped for ${a.clientId} as it's no longer active or finished.`),clearInterval(Se.value),Se.value=null,He.value&&He.value.clientId===a.clientId&&(un(),he.value=!1,await et(),tn());return}try{console.log(`Polling status for recording ID: ${d} (${a.file.name})`);const O=await fetch(`/tool/speakr/status/${d}`);if(!O.ok)throw new Error(`Status check failed with status ${O.status}`);const L=await O.json(),X=f.value.findIndex(ge=>ge.id===d);X!==-1&&(f.value[X]=L,((y=u.value)==null?void 0:y.id)===d&&(u.value=L));const me=a.status;if(a.status=L.status,a.displayName=L.title||L.original_filename||a.file.name,L.status==="COMPLETED"){if(console.log(`Processing COMPLETED for ${a.file.name} (ID: ${d})`),me==="summarizing"){console.log(`Auto-summary completed for ${a.file.name}`),ne.value="Processing complete!",ie.value=100,a.status="completed",a.summaryCompleted=!0,clearInterval(Se.value),Se.value=null,un(),he.value=!1,console.log(`Completed item ${a.clientId} will remain visible in queue`),tn();return}else if(a.willAutoSummarize&&!a.hasCheckedForAutoSummary)ne.value="Transcription complete!",ie.value=85,a.status="awaiting_summary";else{ne.value="Processing complete!",ie.value=100,a.status="completed",a.summaryCompleted=!0,clearInterval(Se.value),Se.value=null,un(),he.value=!1,console.log(`Completed item ${a.clientId} will remain visible in queue`),tn();return}if(a.willAutoSummarize&&!a.hasCheckedForAutoSummary){a.hasCheckedForAutoSummary=!0,a.autoSummaryStartTime=Date.now(),console.log(`Auto-summary expected for ${a.file.name}, continuing to poll...`);return}if(a.willAutoSummarize&&a.hasCheckedForAutoSummary)if(Date.now()-a.autoSummaryStartTime>6e4)console.log(`Auto-summary timeout for ${a.file.name}, completing...`),ne.value="Processing complete!",ie.value=100,a.status="completed",a.summaryCompleted=!0,clearInterval(Se.value),Se.value=null,un(),he.value=!1,console.log(`Timed-out item ${a.clientId} will remain visible in queue`),tn();else return;clearInterval(Se.value),Se.value=null,un(),he.value=!1;const ge=_e.value.findIndex(ve=>ve.clientId===a.clientId);ge!==-1&&(_e.value.splice(ge,1),console.log(`Removed completed item ${a.clientId} from queue immediately`)),tn()}else if(L.status==="FAILED")console.log(`Processing FAILED for ${a.file.name} (ID: ${d})`),ne.value="Processing failed.",ie.value=100,a.status="failed",a.error=L.transcription||L.summary||"Processing failed on server.",Ue(`Processing failed for "${L.title||a.file.name}".`),clearInterval(Se.value),Se.value=null,un(),he.value=!1,await et(),tn();else if(L.status==="PROCESSING")if(Zt.value&&!Ki.value)if(In.value==="size"){const ve=En.value*1024*1024;if(a.file.size>ve){ne.value="Processing large file (chunking in progress)...";const we=a.willAutoSummarize?70:80;ie.value=Math.round(Math.min(we,ie.value+Math.random()*3))}else{ne.value="转录进行中...";const we=a.willAutoSummarize?65:75;ie.value=Math.round(Math.min(we,ie.value+Math.random()*5))}}else{ne.value="Processing file (chunking determined server-side)...";const ve=a.willAutoSummarize?70:80;ie.value=Math.round(Math.min(ve,ie.value+Math.random()*3))}else{ne.value="转录进行中...";const ve=a.willAutoSummarize?65:75;ie.value=Math.round(Math.min(ve,ie.value+Math.random()*5))}else L.status==="SUMMARIZING"?(console.log(`Auto-summary started for ${a.file.name}`),ne.value="Generating summary...",ie.value=90,a.status="summarizing"):(ne.value="Waiting in queue...",ie.value=45)}catch(O){console.error(`Polling Error for ${a.file.name} (ID: ${d}):`,O),a.status="failed",a.error=`Error checking status: ${O.message}`,Ue(`Error checking status for "${a.file.name}": ${O.message}.`);const L=f.value.findIndex(X=>X.id===d);L!==-1&&(f.value[L].status="FAILED"),clearInterval(Se.value),Se.value=null,un(),he.value=!1,await et(),tn()}},5e3)},Eo=async(a=1,d=!1,p="")=>{b.value=null,d?C.value=!0:w.value=!0;try{const y=new URLSearchParams({page:a.toString(),per_page:P.value.toString()});p.trim()&&y.set("q",p.trim());const O=await fetch(`/tool/speakr/api/recordings?${y}`),L=await O.json();if(!O.ok)throw new Error(L.error||"Failed to load recordings");if(H.value=L.pagination.page,M.value=L.pagination.total,S.value=L.pagination.total_pages,_.value=L.pagination.has_next,x.value=L.pagination.has_prev,d)f.value=[...f.value,...L.recordings];else{f.value=L.recordings;const me=localStorage.getItem("lastSelectedRecordingId");if(me&&L.recordings.length>0){const ge=L.recordings.find(ve=>ve.id==me);ge&&zf(ge)}}const X=L.recordings.filter(me=>["PENDING","PROCESSING","SUMMARIZING"].includes(me.status));if(X.length>0&&!he.value){console.warn(`Found ${X.length} incomplete recording(s) on load.`);for(const me of X){let ge=_e.value.find(ve=>ve.recordingId===me.id);ge||(ge={file:{name:me.title||`Recording ${me.id}`,size:me.file_size},status:"queued",recordingId:me.id,clientId:`reload-${me.id}`,error:null},_e.value.unshift(ge),he.value||tn())}}}catch(y){console.error("Load Recordings Error:",y),Ue(`Failed to load recordings: ${y.message}`),d||(f.value=[])}finally{w.value=!1,C.value=!1}},Ve=dE({t,filteredRecordings:Nf,loadRecordings:Eo,showToast:ee,currentPage:H,hasNextPage:_,isLoadingMore:C,searchQuery:v,availableTags:yn,draftNameInput:I}),Jf=async(a="")=>{H.value=1,await Eo(1,!1,a)},Gf=a=>{V.value&&clearTimeout(V.value),V.value=setTimeout(()=>{Jf(a)},300)},Qf=async()=>{try{const a=await fetch("/tool/speakr/api/tags");a.ok?yn.value=await a.json():(console.warn("Failed to load tags:",a.status),yn.value=[])}catch(a){console.warn("Error loading tags:",a),yn.value=[]}},tS=a=>{Nn.value.includes(a)||(Nn.value.push(a),Il())},nS=a=>{const d=Nn.value.indexOf(a);d>-1&&(Nn.value.splice(d,1),Il())},Il=()=>{const a=Es.value[0];a&&Ki.value&&(a.default_language&&(Ze.value=a.default_language),a.default_min_speakers&&(Ks.value=a.default_min_speakers),a.default_max_speakers&&(rl.value=a.default_max_speakers))},sS=Il,Yf=a=>!a||!a.tags?[]:a.tags||[],Xf=a=>{if(!a||!yn.value)return[];const d=Yf(a).map(p=>p.id);return yn.value.filter(p=>!d.includes(p.id))},iS=vt(()=>{if(!ct.value)return[];const a=Xf(ct.value);if(!to.value)return a;const d=to.value.toLowerCase();return a.filter(p=>p.name.toLowerCase().includes(d))}),rS=a=>{ct.value=a,Hi.value="",al.value=!0},oS=()=>{al.value=!1,ct.value=null,Hi.value="",to.value=""},aS=async(a=null)=>{var p;const d=a||Hi.value;if(!(!d||!ct.value))try{const y=(p=document.querySelector('meta[name="csrf-token"]'))==null?void 0:p.getAttribute("content"),O=await fetch(`/tool/speakr/api/recordings/${ct.value.id}/tags`,{method:"POST",headers:{"Content-Type":"application/json","X-CSRFToken":y},body:JSON.stringify({tag_id:d})});if(!O.ok){const X=await O.json();throw new Error(X.error||"Failed to add tag")}const L=yn.value.find(X=>X.id==d);if(L){ct.value.tags||(ct.value.tags=[]),ct.value.tags.push(L);const X=f.value.find(me=>me.id===ct.value.id);X&&X!==ct.value&&(X.tags||(X.tags=[]),X.tags.push(L))}Hi.value=""}catch(y){console.error("Error adding tag to recording:",y),Ue(`Failed to add tag: ${y.message}`)}},lS=async a=>{var d;if(ct.value)try{const p=(d=document.querySelector('meta[name="csrf-token"]'))==null?void 0:d.getAttribute("content"),y=await fetch(`/tool/speakr/api/recordings/${ct.value.id}/tags/${a}`,{method:"DELETE",headers:{"X-CSRFToken":p}});if(!y.ok){const L=await y.json();throw new Error(L.error||"Failed to remove tag")}ct.value.tags=ct.value.tags.filter(L=>L.id!==a);const O=f.value.find(L=>L.id===ct.value.id);O&&O!==ct.value&&O.tags&&(O.tags=O.tags.filter(L=>L.id!==a))}catch(p){console.error("Error removing tag from recording:",p),Ue(`Failed to remove tag: ${p.message}`)}};debugger;const cS=async(a="microphone")=>{var d;(d=T.value)!=null&&d.trim()?lv(a):await Zf(a)},uS=async()=>{const a=cv();a&&await Zf(a)},fS=()=>{uv()},dS=cS,Zf=async(a="microphone")=>{Bt.value=a;try{yn.value.length===0&&await Qf(),iv(),Es.value=[],We.value="",lt.value="",st.value="",Ln.value=!1,ii({clearTimestampBarrier:!0});let d=null;if(a==="microphone"||a==="both"){if(!pe.value)throw new Error("Microphone recording is not supported");await Fc(),ee("Microphone access granted","fa-microphone")}if(a==="system"||a==="both"){if(!ye.value)throw new Error("System audio recording is not supported");try{await Dc(),ee("System audio access granted","fa-desktop")}catch(p){if(a==="system")throw p;ee("System audio denied, using microphone only","fa-exclamation-triangle"),a="microphone",Bt.value=a,na(null)}}if(yt&&dt)try{d=$c(yt,dt),ee("Recording both microphone and system audio","fa-microphone")}catch(p){console.error("Failed to combine audio streams:",p),d=dt,ee("Failed to combine audio, using system audio only","fa-exclamation-triangle")}else if(dt)d=Bc(dt),ee("Recording system audio only","fa-desktop");else if(yt)d=yt,ee("Recording microphone only","fa-microphone");else throw new Error("No audio streams available for recording.");if(jc(d,p=>{_s.value=p,ee(p<=32e3?"Recording: Optimized (32kbps Opus)":p<=64e3?"Recording: Good quality (64kbps)":"Recording with browser default settings",p<=64e3?"fa-compress-alt":"fa-microphone",3e3)}),!z.value)throw new Error("Failed to create MediaRecorder with any configuration");if(console.log(`Recording with estimated bitrate: ${_s.value} bps`),z.value.ondataavailable=p=>q.value.push(p.data),z.value.onstop=()=>{const p=new Blob(q.value,{type:"audio/webm"});$.value=URL.createObjectURL(p),So(),vn.value.forEach(y=>{y.getTracks().forEach(O=>O.stop())}),vn.value=[],Nc(null),na(null),gn.value&&(gn.value.close().catch(y=>console.error("Error closing AudioContext:",y)),gn.value=null),cancelAnimationFrame(cn.value),Pc()},a==="both"&&yt&&dt)Uc(yt,dt);else{const p=a==="microphone"?yt:dt;p&&Hc(p)}z.value.start(),j.value=!0,rv(),xl(),c.value="recording",Ll(),Ue(null)}catch(d){console.error("Error starting recording:",d),Ue(`Could not start recording: ${d.message}`),j.value=!1,vn.value.forEach(p=>{p.getTracks().forEach(y=>y.stop())}),vn.value=[]}},Co=async()=>{if(!(U.value||!(j.value||jt.value||q.value.length>0||mt.value||vn.value.length>0))){U.value=!0;try{if(o=!1,z.value&&j.value&&(G.value=!0,z.value.stop(),j.value=!1,So(),cancelAnimationFrame(cn.value),cn.value=null,Y.value&&(clearInterval(Y.value),Y.value=null)),await jv(2e4),await new Promise(d=>setTimeout(d,500)),mt.value)try{if(!jt.value&&q.value.length>0){const p=new Blob(q.value,{type:"audio/webm"}),y=new FormData;y.append("audio",p),y.append("duration",ae.value-E.value),y.append("transcription",Af()),await fetch(`/tool/speakr/api/draft/${mt.value}/segment`,{method:"POST",body:y}),q.value=[]}const d=await fetch(`/tool/speakr/api/draft/${mt.value}/download`);if(d.ok){const p=await d.blob();$.value=URL.createObjectURL(p)}jt.value=!1}catch(d){console.error("Error saving final segment:",d),Ue(`保存片段失败: ${d.message}`)}else if(q.value.length>0){const d=new Blob(q.value,{type:"audio/webm"});$.value=URL.createObjectURL(d)}Rs.value&&(Ve.isSidebarCollapsed.value=!0)}finally{U.value=!1}}},hS=async()=>{if(!(!j.value||jt.value||W.value)){W.value=!0;try{if(o=!1,Hv(),z.value&&z.value.state==="recording"&&z.value.stop(),cancelAnimationFrame(cn.value),cn.value=null,await new Promise(a=>setTimeout(a,500)),Ln.value&&ld(),await Wv(8e3),!mt.value){const d=await(await fetch("/tool/speakr/api/draft/create",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({recording_mode:Bt.value,notes:Ce.value})})).json();if(d.success)mt.value=d.draft.id;else throw new Error(d.error||"创建草稿失败")}if(q.value.length>0){const a=new Blob(q.value,{type:"audio/webm"}),d=new FormData;d.append("audio",a),d.append("duration",ae.value-E.value);const p=Af();d.append("transcription",p),await fetch(`/tool/speakr/api/draft/${mt.value}/segment`,{method:"POST",body:d}),q.value=[]}jt.value=!0,E.value=ae.value,D.value=si.value||"",Xi.value=er.value||"",j.value=!1,Pc(),cancelAnimationFrame(cn.value),So(),vn.value.forEach(a=>{a.getTracks().forEach(d=>d.stop())}),vn.value=[],Nc(null),na(null),ee("录音已暂停","fa-pause"),ri()}catch(a){console.error("Error pausing recording:",a),Ue(`暂停录音失败: ${a.message}`)}finally{W.value=!1}}},pS=async()=>{if(!(!jt.value||!mt.value))try{q.value=[],$v(),Ln.value=!1;let a=null;const d=Bt.value;if((d==="microphone"||d==="both")&&await Fc(),d==="system"||d==="both")try{await Dc()}catch(y){if(d==="system")throw y;ee("系统音频权限被拒绝,仅使用麦克风","fa-exclamation-triangle"),Bt.value="microphone"}if(yt&&dt)a=$c(yt,dt);else if(dt)a=Bc(dt);else if(yt)a=yt;else throw new Error("无可用音频流");if(jc(a),z.value.ondataavailable=y=>q.value.push(y.data),z.value.onstop=()=>{const y=new Blob(q.value,{type:"audio/webm"});$.value=URL.createObjectURL(y)},d==="both"&&yt&&dt)Uc(yt,dt);else{const y=yt||dt;y&&Hc(y)}z.value.start(),jt.value=!1,j.value=!0,Y.value=setInterval(()=>ae.value++,1e3),Ll(),xl(),console.log("Resuming realtime ASR pipeline..."),Re.value="",If()===1&&(o=!0),ee("录音已恢复","fa-play")}catch(a){console.error("Error resuming recording:",a),Ue(`恢复录音失败: ${a.message}`)}},ri=async()=>{try{const d=await(await fetch("/tool/speakr/api/draft/list")).json();Q.value=Array.isArray(d)?d:[]}catch(a){console.error("Error loading drafts:",a)}},ed=async a=>{try{const p=await(await fetch(`/tool/speakr/api/draft/${a}`)).json();if(p.error)throw new Error(p.error);mt.value=a,Bt.value=p.recording_mode||"microphone",ae.value=Math.round(p.total_duration||0),E.value=ae.value,Ce.value=p.notes||"",console.log("Loading draft transcription:",p.combined_transcription?p.combined_transcription.length:0,"chars"),le.value=p.combined_transcription||"",Re.value="",Oe.value="",D.value=p.combined_transcription||"",ii({clearTimestampBarrier:!0}),jt.value=!0,j.value=!1,c.value="recording",ee("草稿已加载,点击恢复继续录音","fa-folder-open")}catch(d){console.error("Error continuing draft:",d),Ue(`加载草稿失败: ${d.message}`)}},Nl=async a=>{if(!confirm("确定要删除这个草稿吗?此操作不可撤销。"))return!1;try{const p=await(await fetch(`/tool/speakr/api/draft/${a}`,{method:"DELETE"})).json();if(p.success)return ee("草稿已删除","fa-trash"),ri(),mt.value===a&&(mt.value=null,jt.value=!1,E.value=0,D.value="",ii({clearTimestampBarrier:!0})),!0;throw new Error(p.error)}catch(d){return console.error("Error deleting draft:",d),Ue(`删除草稿失败: ${d.message}`),!1}},mS=async()=>{if(mt.value){try{ee("Finalizing draft...","fa-spinner fa-spin",0);const O=Ce.value,L=[...Es.value],X={language:We.value,min_speakers:lt.value,max_speakers:st.value},me=await fetch(`/tool/speakr/api/draft/${mt.value}/finalize`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({notes:O,tag_ids:L.map(Fe=>Fe.id||Fe),...X})}),ge=await me.json();if(!me.ok||!ge.success||!ge.recording)throw new Error(ge.error||"Finalize draft failed");const ve=ge.recording,Te=f.value.findIndex(Fe=>Fe.id===ve.id);Te===-1?(f.value.unshift(ve),M.value+=1):f.value[Te]=ve;const we={file:{name:ve.original_filename||ve.title||`draft-${ve.id}.webm`,size:ve.file_size||0},notes:O,tags:L,asrOptions:X,status:"queued",recordingId:ve.id,clientId:`reload-draft-${ve.id}`,error:null,willAutoSummarize:!0};_e.value.push(we),Qe.value=!1,Ye.value=!1,mt.value=null,E.value=0,D.value="",ii({clearTimestampBarrier:!0}),ri(),$.value&&URL.revokeObjectURL($.value),$.value=null,q.value=[],j.value=!1,Ce.value="",Nn.value=[],We.value="",lt.value="",st.value="",ae.value=0,c.value="upload",u.value=null,he.value||tn(),ee("Draft submitted for processing","fa-check-circle")}catch(O){console.error("Error finalizing draft:",O),Ue(`Upload failed: ${O.message}`)}return}if(!$.value){Ue("No recorded audio to upload.");return}const a=_e.value.length,d=new File(q.value,jf(),{type:"audio/webm"});if(_o([{file:d,notes:Ce.value,tags:Es.value,asrOptions:{language:We.value,min_speakers:lt.value,max_speakers:st.value}}]),_e.value.length===a)return;const p=_e.value[_e.value.length-1];ee("正在上传录音至服务器,请稍候...","fa-spinner fa-spin",0);const y=()=>new Promise((O,L)=>{const X=setInterval(()=>{if(!p||p.status==="failed"){clearInterval(X),L(new Error((p==null?void 0:p.error)||"Upload failed"));return}["pending","processing","transcribing","summarizing","completed"].includes(p.status)&&(clearInterval(X),O(!0))},200)});try{await y(),td(),o===!0&&typeof Co=="function"&&Co(),c.value="upload",u.value=null,Rs.value&&(Ve.isSidebarCollapsed.value=!0),ee("上传成功,正在处理中...","fa-check-circle")}catch(O){console.error("Server upload failed:",O),ee(`上传失败: ${O.message||"请检查网络"}`,"fa-exclamation-triangle",4e3)}},gS=()=>{if(!$.value){ee("No recording available to download","fa-exclamation-circle");return}const a=jf(),d=document.createElement("a");d.style.display="none",d.href=$.value,d.download=a,document.body.appendChild(d),d.click(),setTimeout(()=>{document.body.removeChild(d)},100),ee("录音已开始下载","fa-download")},td=async()=>{mt.value&&!await Nl(mt.value)||($.value&&URL.revokeObjectURL($.value),$.value=null,q.value=[],j.value=!1,ae.value=0,Y.value&&clearInterval(Y.value),Ce.value="",Nn.value=[],We.value="",lt.value="",st.value="")},Pl=(a,d)=>{if(!a||!d)return;const p=a.frequencyBinCount,y=new Uint8Array(p);a.getByteFrequencyData(y);const O=d.getContext("2d"),L=d.width,X=d.height;O.clearRect(0,0,L,X);const me=L/p*1.5;let ge,ve=0;const Te=getComputedStyle(document.documentElement).getPropertyValue("--bg-button").trim(),we=getComputedStyle(document.documentElement).getPropertyValue("--bg-button-hover").trim(),Fe=O.createLinearGradient(0,0,0,X);B.value?(Fe.addColorStop(0,Te),Fe.addColorStop(.6,we),Fe.addColorStop(1,"rgba(0, 0, 0, 0.2)")):(Fe.addColorStop(0,Te),Fe.addColorStop(.5,we),Fe.addColorStop(1,"rgba(0, 0, 0, 0.1)"));for(let ue=0;ue<p;ue++)ge=y[ue]/2.5,O.fillStyle=Fe,O.fillRect(ve,X-ge,me,ge),ve+=me+2},Ll=()=>{if(!j.value){cn.value&&(cancelAnimationFrame(cn.value),cn.value=null);return}cn.value=requestAnimationFrame(Ll),Bt.value==="both"?(Pl(Ct.value,Ts.value),Pl(qt.value,Bi.value)):Pl(ws.value,bs.value)},Fl=async a=>{var d;if(b.value=null,!a||!a.id)return null;console.log("Saving metadata for:",a.id);try{const p={id:a.id,title:a.title,participants:a.participants,notes:a.notes,summary:a.summary,meeting_date:a.meeting_date},y=await fetch("/tool/speakr/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(p)}),O=await y.json();if(!y.ok)throw new Error(O.error||"Failed to save metadata");console.log("Save successful:",O.recording.id);const L=f.value.findIndex(X=>X.id===O.recording.id);return L!==-1&&(f.value[L].title=p.title,f.value[L].participants=p.participants,f.value[L].notes=p.notes,f.value[L].notes_html=O.recording.notes_html,f.value[L].summary=p.summary,f.value[L].summary_html=O.recording.summary_html,f.value[L].meeting_date=p.meeting_date),((d=u.value)==null?void 0:d.id)===O.recording.id&&(u.value.title=p.title,u.value.participants=p.participants,u.value.notes=p.notes,u.value.notes_html=O.recording.notes_html,u.value.summary=p.summary,u.value.summary_html=O.recording.summary_html,u.value.meeting_date=p.meeting_date),O.recording}catch(p){return console.error("Save Metadata Error:",p),Ue(`Save failed: ${p.message}`),null}},vS=a=>{ct.value=JSON.parse(JSON.stringify(a)),Zr.value=!0},Dl=()=>{Zr.value=!1,ct.value=null},yS=async()=>{await Fl(ct.value)&&Dl()},SS=a=>{Ys.value=a,eo.value=!0},ko=()=>{eo.value=!1,Ys.value=null},wS=async()=>{var p,y;if(b.value=null,!Ys.value)return;const a=Ys.value.id,d=Ys.value.title;try{const O=await fetch(`/tool/speakr/recording/${a}`,{method:"DELETE"}),L=await O.json();if(!O.ok)throw new Error(L.error||"Failed to delete recording");f.value=f.value.filter(me=>me.id!==a),M.value--;const X=_e.value.findIndex(me=>me.recordingId===a);if(X!==-1){const me=_e.value.splice(X,1)[0];console.log(`Removed item ${me.clientId} from queue.`),((p=He.value)==null?void 0:p.clientId)===me.clientId&&(console.log(`Deleting currently processing file: ${d}. Stopping poll and moving to next.`),clearInterval(Se.value),Se.value=null,un(),he.value=!1,await et(),tn())}((y=u.value)==null?void 0:y.id)===a&&(u.value=null),ko(),console.log(`Successfully deleted recording ${a} (${d})`)}catch(O){console.error("Delete Error:",O),Ue(`Failed to delete recording "${d}": ${O.message}`),ko()}},bS=()=>{Xs.value=!Xs.value,Xs.value||ir("participants")},TS=()=>{Zs.value=!Zs.value,Zs.value||ir("meeting_date")},nd=()=>{Ot.value=!Ot.value,Ot.value&&(io.value=u.value.summary||"",et(()=>{Bl()}))},_S=()=>{rt.value&&(rt.value.toTextArea(),rt.value=null),Ot.value=!1,u.value&&(u.value.summary=io.value)},sd=async()=>{rt.value&&(u.value.summary=rt.value.value(),rt.value.toTextArea(),rt.value=null),Ot.value=!1,await ir("summary")},id=()=>{It.value=!It.value,It.value&&(so.value=u.value.notes||"",et(()=>{Ao()}))},ES=()=>{it.value&&(it.value.toTextArea(),it.value=null),It.value=!1,u.value&&(u.value.notes=so.value)},rd=async()=>{it.value&&(u.value.notes=it.value.value(),it.value.toTextArea(),it.value=null),It.value=!1,await ir("notes")},CS=()=>{var a;!It.value&&(!((a=u.value)!=null&&a.notes)||u.value.notes.trim()==="")&&id()},kS=()=>{var a;!Ot.value&&(!((a=u.value)!=null&&a.summary)||u.value.summary.trim()==="")&&nd()},xo=async()=>{if(it.value&&It.value){u.value.notes=it.value.value();try{const a={id:u.value.id,title:u.value.title,participants:u.value.participants,notes:u.value.notes,summary:u.value.summary,meeting_date:u.value.meeting_date},d=await fetch("/tool/speakr/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),p=await d.json();d.ok&&p.recording?p.recording.notes_html&&(u.value.notes_html=p.recording.notes_html):console.error("Failed to auto-save notes")}catch(a){console.error("Error auto-saving notes:",a)}}},Ro=async()=>{if(rt.value&&Ot.value){u.value.summary=rt.value.value();try{const a={id:u.value.id,title:u.value.title,participants:u.value.participants,notes:u.value.notes,summary:u.value.summary,meeting_date:u.value.meeting_date},d=await fetch("/tool/speakr/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),p=await d.json();d.ok&&p.recording?p.recording.summary_html&&(u.value.summary_html=p.recording.summary_html):console.error("Failed to auto-save summary")}catch(a){console.error("Error auto-saving summary:",a)}}},Ao=()=>{var a;if(dl.value)try{it.value=new dr({element:dl.value,spellChecker:!1,autofocus:!0,placeholder:"以Markdown格式输入笔记...",initialValue:((a=u.value)==null?void 0:a.notes)||"",status:!1,toolbar:["bold","italic","heading","|","quote","unordered-list","ordered-list","|","link","image","|","preview","side-by-side","fullscreen","|","guide"],previewClass:["editor-preview","notes-preview"],theme:B.value?"dark":"light"}),it.value.codemirror.on("change",()=>{ei.value&&clearTimeout(ei.value),ei.value=setTimeout(()=>{xo()},yf)})}catch(d){console.error("Failed to initialize markdown editor:",d),It.value=!0}},xS=async()=>{try{const d=await(await fetch("getUserConfig",{method:"GET"})).json();d.LEADER_SPEECH_BUTTON&&(Sf.value={name:d.LEADER_SPEECH_BUTTON,fontSize:d.LEADER_SPEECH_TEXT_SIZE}),l=d.END_PHRASE_PATTERNS||""}catch(a){console.error("获取基础配置出错:",a),l=""}},RS=()=>{if(!pl.value){console.log("Recording notes editor ref not found");return}if(typeof dr>"u"){console.error("EasyMDE is not loaded");return}Pn.value&&(Pn.value.toTextArea(),Pn.value=null);try{console.log("Initializing recording markdown editor"),Pn.value=new dr({element:pl.value,spellChecker:!1,autofocus:!1,placeholder:"Type your notes in Markdown format...",status:!1,toolbar:["bold","italic","heading","|","quote","unordered-list","ordered-list","|","link","|","preview","guide"],previewClass:["editor-preview","notes-preview"],theme:B.value?"dark":"light",initialValue:Ce.value||"",maxHeight:"300px",minHeight:"150px"}),Pn.value.codemirror.on("change",()=>{Ce.value=Pn.value.value()}),console.log("Recording markdown editor initialized successfully")}catch(a){console.error("Failed to initialize recording markdown editor:",a)}},AS=()=>{qi.value=qi.value==="simple"?"bubble":"simple",localStorage.setItem("transcriptionViewMode",qi.value)},MS=()=>{ti.value?ti.value=!1:(ti.value=!0,ro.value||(ro.value=!0))},ir=async a=>{if(!u.value)return;const d={id:u.value.id,title:u.value.title,participants:u.value.participants,notes:u.value.notes,summary:u.value.summary,meeting_date:u.value.meeting_date};try{const p=await Fl(d);if(p){switch(a==="notes"?u.value.notes_html=p.notes_html:a==="summary"&&(u.value.summary_html=p.summary_html),a){case"participants":Xs.value=!1;break;case"meeting_date":Zs.value=!1;break;case"summary":Ot.value=!1;break;case"notes":It.value=!1;break}ee(`${a.charAt(0).toUpperCase()+a.slice(1).replace("_"," ")} updated successfully`)}}catch(p){console.error(`Save ${a} Error:`,p),Ue(`Failed to save ${a}: ${p.message}`)}},Mo=()=>{if(!ks.value)return!0;const{scrollTop:a,scrollHeight:d,clientHeight:p}=ks.value,y=d-p;return y<=0?!0:a/y>=.95},rr=()=>{ks.value&&requestAnimationFrame(()=>{ks.value&&(ks.value.scrollTop=ks.value.scrollHeight)})},od=async()=>{if(!oo.value.trim()||ni.value||!u.value||u.value.status!=="COMPLETED")return;const a=oo.value.trim();Array.isArray(en.value)||(en.value=[]),en.value.push({role:"user",content:a}),oo.value="",ni.value=!0,await et(),rr();let d=null;try{const p=en.value.slice(0,-1).map(ge=>({role:ge.role,content:ge.content})),y=await fetch("/tool/speakr/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({recording_id:u.value.id,message:a,message_history:p})});if(!y.ok){const ge=await y.json();throw new Error(ge.error||"Failed to get chat response")}const O=y.body.getReader(),L=new TextDecoder;let X="";await(async()=>{let ge=!0;for(;;){const{done:ve,value:Te}=await O.read();if(ve)break;X+=L.decode(Te,{stream:!0});const we=X.split(`
`);X=we.pop();for(const Fe of we)if(Fe.startsWith("data: ")){const ue=Fe.substring(6);if(ue)try{const De=JSON.parse(ue);if(De.thinking){const ai=Mo();ge?(ni.value=!1,d=sc({role:"assistant",content:"",html:"",thinking:De.thinking,thinkingExpanded:!1}),en.value.push(d),ge=!1):d&&(d.thinking?d.thinking+=`
`+De.thinking:d.thinking=De.thinking),ai&&(await et(),rr())}if(De.delta){const ai=Mo();ge&&(ni.value=!1,d=sc({role:"assistant",content:"",html:"",thinking:"",thinkingExpanded:!1}),en.value.push(d),ge=!1),d.content+=De.delta,d.html=ev.parse(d.content),ai&&(await et(),rr())}if(De.end_of_stream)return;if(De.error)throw new Error(De.error)}catch(De){console.error("Error parsing stream data:",De)}}}})()}catch(p){console.error("Chat Error:",p),d?(d.content=`Error: ${p.message}`,d.html=`<span class="text-red-500">Error: ${p.message}</span>`):en.value.push({role:"assistant",content:`Error: ${p.message}`,html:`<span class="text-red-500">Error: ${p.message}</span>`})}finally{ni.value=!1,await et(),Mo()&&rr()}},OS=a=>{co.value=!0;const d=a.clientX,p=zi.value,y=L=>{if(!co.value)return;const X=document.getElementById("mainContentColumns");if(!X)return;const me=X.getBoundingClientRect(),ge=L.clientX-d,ve=me.width,Te=ge/ve*100;let we=p+Te;we=Math.max(20,Math.min(80,we)),zi.value=we,lo.value=100-we},O=()=>{co.value=!1,document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",O),localStorage.setItem("transcriptColumnWidth",zi.value),localStorage.setItem("summaryColumnWidth",lo.value)};document.addEventListener("mousemove",y),document.addEventListener("mouseup",O),a.preventDefault()},IS=a=>{if(a.key==="Enter"){if(a.ctrlKey||a.shiftKey)return;a.preventDefault(),od()}},ad=(a,d="main")=>{let p=null;if(d==="modal"?p=document.querySelector("audio.speaker-modal-transcript"):p=document.querySelector(".main-content-area audio"),p){const y=!p.paused;p.currentTime=a,y&&p.play()}else{console.warn(`Audio player not found for context: ${d}`);const y=document.querySelector("audio");if(y){const O=!y.paused;y.currentTime=a,O&&y.play()}}},NS=a=>{const d=a.target.closest("[data-start-time]");if(!d)return;const p=parseFloat(d.dataset.startTime);if(isNaN(p))return;const O=a.target.closest(".speaker-modal-transcript")!==null?"modal":"main";ad(p,O)},PS=a=>{const d=a.target.volume;ao.value=d,localStorage.setItem("playerVolume",d)},gt=t,LS=(a,d,p={})=>window.i18n?window.i18n.tc(a,d,p):a,FS=async a=>{if(window.i18n){await window.i18n.setLocale(a),fe.value=a;const d=Ae.value.find(p=>p.code===a);Z.value=d?d.nativeName:"English",ft.value=!1,N.value=!1;try{await fetch("/tool/speakr/api/user/preferences",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":e.value},body:JSON.stringify({language:a})})}catch(p){console.error("Failed to save language preference:",p)}}};function ee(a,d="fa-check-circle",p=2e3){const y=document.getElementById("toastContainer"),O=document.createElement("div");O.className="toast",O.innerHTML=`<i class="fas ${d}"></i> ${a}`,y.appendChild(O),setTimeout(()=>{O.classList.add("show")},10),setTimeout(()=>{O.classList.remove("show"),setTimeout(()=>{y.removeChild(O)},300)},p)}const or=a=>{a.classList.add("copy-success");const d=a.innerHTML;a.innerHTML='<i class="fas fa-check"></i>',setTimeout(()=>{a.classList.remove("copy-success"),a.innerHTML=d},1500)},DS=(a,d)=>{const p=d.currentTarget;navigator.clipboard&&window.isSecureContext?navigator.clipboard.writeText(a).then(()=>{ee("Copied to clipboard!"),or(p)}).catch(y=>{console.error("Copy failed:",y),ee("Failed to copy: "+y.message,"fa-exclamation-circle"),es(a,p)}):es(a,p)},es=(a,d=null)=>{try{const p=document.createElement("textarea");p.value=a,p.style.position="fixed",p.style.left="-999999px",p.style.top="-999999px",document.body.appendChild(p),p.focus(),p.select();const y=document.execCommand("copy");document.body.removeChild(p),y?(ee("Copied to clipboard!"),d&&or(d)):ee("Copy failed. Your browser may not support this feature.","fa-exclamation-circle")}catch(p){console.error("Fallback copy failed:",p),ee("Unable to copy: "+p.message,"fa-exclamation-circle")}},$S=a=>{if(!u.value||!u.value.transcription){ee("No transcription available to copy.","fa-exclamation-circle");return}const d=a.currentTarget;let p="";try{const y=JSON.parse(u.value.transcription);Array.isArray(y)?y.some(L=>L.speaker)?p=y.map(L=>`[${L.speaker}]: ${L.sentence}`).join(`
`):p=y.map(L=>L.sentence).join(`
`):p=u.value.transcription}catch{p=u.value.transcription}or(d),navigator.clipboard&&window.isSecureContext?navigator.clipboard.writeText(p).then(()=>{ee("转录内容已复制到剪贴板!")}).catch(y=>{console.error("Copy failed:",y),ee("Failed to copy: "+y.message,"fa-exclamation-circle"),es(p)}):es(p)},BS=a=>{if(!u.value||!u.value.summary){ee("No summary available to copy.","fa-exclamation-circle");return}const d=a.currentTarget,p=u.value.summary;or(d),navigator.clipboard&&window.isSecureContext?navigator.clipboard.writeText(p).then(()=>{ee("摘要已复制到剪贴板!")}).catch(y=>{console.error("Copy failed:",y),ee("Failed to copy: "+y.message,"fa-exclamation-circle"),es(p)}):es(p)},jS=a=>{if(!u.value||!u.value.notes){ee("No notes available to copy.","fa-exclamation-circle");return}const d=a.currentTarget,p=u.value.notes;or(d),navigator.clipboard&&window.isSecureContext?navigator.clipboard.writeText(p).then(()=>{ee("Notes copied to clipboard!")}).catch(y=>{console.error("Copy failed:",y),ee("Failed to copy: "+y.message,"fa-exclamation-circle"),es(p)}):es(p)},HS=async()=>{if(!u.value||!u.value.summary){ee("No summary available to download.","fa-exclamation-circle");return}try{const a=await fetch(`/tool/speakr/recording/${u.value.id}/download/summary`);if(!a.ok){const X=await a.json();ee(X.error||"Failed to download summary","fa-exclamation-circle");return}const d=await a.blob(),p=window.URL.createObjectURL(d),y=document.createElement("a");y.style.display="none",y.href=p;const O=a.headers.get("Content-Disposition"),L=yo(O,"摘要.docx");y.download=L,document.body.appendChild(y),y.click(),window.URL.revokeObjectURL(p),document.body.removeChild(y),ee("Summary downloaded successfully!")}catch(a){console.error("Download failed:",a),ee("Failed to download summary","fa-exclamation-circle")}},US=async()=>{if(!u.value||!u.value.transcription){ee("No transcription available to download.","fa-exclamation-circle");return}try{const a=await fetch("/tool/speakr/api/transcript-templates");let d=[];a.ok&&(d=await a.json());let p=null;if(d.length>0){const Te=document.createElement("div");if(Te.className="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",Te.innerHTML=`
<div class="bg-[var(--bg-secondary)] rounded-lg p-6 max-w-md w-full mx-4">
<h3 class="text-lg font-semibold mb-4">Select Template</h3>
<div class="space-y-2 max-h-60 overflow-y-auto">
${d.map(we=>`
<button class="template-option w-full text-left p-3 rounded border border-[var(--border-primary)] hover:bg-[var(--bg-tertiary)] ${we.is_default?"ring-2 ring-[var(--ring-focus)]":""}" data-template-id="${we.id}">
<div class="font-medium">${we.name}</div>
${we.description?`<div class="text-sm text-[var(--text-muted)]">${we.description}</div>`:""}
${we.is_default?'<div class="text-xs text-[var(--text-accent)] mt-1"><i class="fas fa-star mr-1"></i>Default</div>':""}
</button>
`).join("")}
</div>
<div class="mt-4 flex gap-2">
<button class="cancel-btn px-4 py-2 bg-[var(--bg-tertiary)] text-[var(--text-secondary)] rounded hover:bg-[var(--bg-accent-light)]">取消</button>
<button class="download-without-template-btn px-4 py-2 bg-[var(--bg-accent)] text-white rounded hover:bg-[var(--bg-accent-hover)]">Download without template</button>
</div>
</div>
`,document.body.appendChild(Te),await new Promise(we=>{Te.querySelectorAll(".template-option").forEach(Fe=>{Fe.addEventListener("click",()=>{p=Fe.dataset.templateId,Te.remove(),we()})}),Te.querySelector(".cancel-btn").addEventListener("click",()=>{p="cancelled",Te.remove(),we()}),Te.querySelector(".download-without-template-btn").addEventListener("click",()=>{p="none",Te.remove(),we()}),Te.addEventListener("click",Fe=>{Fe.target===Te&&(p="cancelled",Te.remove(),we())})}),p==null||p==="cancelled")return}const y=p&&p!=="none"?`/tool/speakr/recording/${u.value.id}/download/transcript?template_id=${p}`:`/tool/speakr/recording/${u.value.id}/download/transcript?template_id=none`,O=await fetch(y);if(!O.ok)throw new Error("Failed to download transcript");const L=await O.blob(),X=O.headers.get("content-disposition"),me=yo(X,"转录稿.docx"),ge=URL.createObjectURL(L),ve=document.createElement("a");ve.href=ge,ve.download=me,document.body.appendChild(ve),ve.click(),document.body.removeChild(ve),URL.revokeObjectURL(ge),ee("Transcript downloaded successfully!")}catch(a){console.error("Error downloading transcript:",a),ee("Failed to download transcript","fa-exclamation-circle")}},VS=async()=>{if(!u.value||!u.value.notes){ee("No notes available to download.","fa-exclamation-circle");return}try{const a=await fetch(`/tool/speakr/recording/${u.value.id}/download/notes`);if(!a.ok){const X=await a.json();ee(X.error||"Failed to download notes","fa-exclamation-circle");return}const d=await a.blob(),p=window.URL.createObjectURL(d),y=document.createElement("a");y.style.display="none",y.href=p;const O=a.headers.get("Content-Disposition"),L=yo(O,"笔记.docx");y.download=L,document.body.appendChild(y),y.click(),window.URL.revokeObjectURL(p),document.body.removeChild(y),ee("Notes downloaded successfully!","fa-check-circle")}catch(a){console.error("Download failed:",a),ee("Failed to download notes","fa-exclamation-circle")}},WS=async a=>{if(!a||!a.id){ee("Invalid event data","fa-exclamation-circle");return}try{const d=await fetch(`/tool/speakr/api/event/${a.id}/ics`);if(!d.ok){const L=await d.json();ee(L.error||"Failed to download event","fa-exclamation-circle");return}const p=await d.blob(),y=window.URL.createObjectURL(p),O=document.createElement("a");O.style.display="none",O.href=y,O.download=`${a.title||"event"}.ics`,document.body.appendChild(O),O.click(),window.URL.revokeObjectURL(y),document.body.removeChild(O),ee(`Event "${a.title}" downloaded. Open the file to add to your calendar.`,"fa-calendar-check",3e3)}catch(d){console.error("Download failed:",d),ee("Failed to download event","fa-exclamation-circle")}},qS=async()=>{if(!u.value||!u.value.events||u.value.events.length===0){ee("No events to export","fa-exclamation-circle");return}try{const a=await fetch(`/tool/speakr/api/recording/${u.value.id}/events/ics`);if(!a.ok){const O=await a.json();ee(O.error||"Failed to export events","fa-exclamation-circle");return}const d=await a.blob(),p=window.URL.createObjectURL(d),y=document.createElement("a");y.style.display="none",y.href=p,y.download=`events-${u.value.title||u.value.id}.ics`,document.body.appendChild(y),y.click(),window.URL.revokeObjectURL(p),document.body.removeChild(y),ee(`Exported ${u.value.events.length} events`,"fa-calendar-check")}catch(a){console.error("Download all events ICS error:",a),ee("Failed to export events","fa-exclamation-circle")}},zS=a=>{if(!a)return"";try{const d=new Date(a),p={weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"};return d.toLocaleString(void 0,p)}catch{return a}},KS=async()=>{if(!u.value||en.value.length===0){ee("No chat messages to download.","fa-exclamation-circle");return}try{const a=await fetch(`/tool/speakr/recording/${u.value.id}/download/chat`,{method:"POST",headers:{"Content-Type":"application/json","X-CSRFToken":e.value},body:JSON.stringify({messages:en.value})});if(!a.ok){const X=await a.json();ee(X.error||"Failed to download chat","fa-exclamation-circle");return}const d=await a.blob(),p=window.URL.createObjectURL(d),y=document.createElement("a");y.style.display="none",y.href=p;const O=a.headers.get("Content-Disposition"),L=yo(O,"对话记录.docx");y.download=L,document.body.appendChild(y),y.click(),window.URL.revokeObjectURL(p),document.body.removeChild(y),ee("Notes downloaded successfully!")}catch(a){console.error("Download failed:",a),ee("Failed to download notes","fa-exclamation-circle")}},JS=()=>{en.value.length>0&&(en.value=[],ee("Chat cleared","fa-broom"))},GS=async a=>{Ui.value=a,Js.share_summary=!0,Js.share_notes=!0,Gs.value="",Vi.value=!1,ll.value=!0;try{const d=await fetch(`/tool/speakr/api/recording/${a.id}/share`,{method:"GET"}),p=await d.json();d.ok&&p.exists&&(Gs.value=p.share_url,Vi.value=!0,Js.share_summary=p.share.share_summary,Js.share_notes=p.share.share_notes)}catch(d){console.error("Error checking for existing share:",d)}},QS=()=>{ll.value=!1,Ui.value=null,Vi.value=!1},YS=async(a=!1)=>{if(Ui.value)try{const d=await fetch(`/tool/speakr/api/recording/${Ui.value.id}/share`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...Js,force_new:a})}),p=await d.json();if(!d.ok)throw new Error(p.error||"Failed to create share link");Gs.value=p.share_url,Vi.value=p.existing&&!a,p.existing&&!a?ee("Using existing share link","fa-link"):ee("Share link created successfully!","fa-check-circle")}catch(d){Ue(`Failed to create share link: ${d.message}`)}},XS=()=>{Gs.value&&navigator.clipboard.writeText(Gs.value).then(()=>{ee("Share link copied to clipboard!")})},ZS=async()=>{ul.value=!0,cl.value=!0;try{const a=await fetch("/tool/speakr/api/shares"),d=await a.json();if(!a.ok)throw new Error(d.error||"Failed to load shared items");Wi.value=d}catch(a){Ue(`Failed to load shared items: ${a.message}`)}finally{ul.value=!1}},ew=()=>{cl.value=!1,Wi.value=[]},tw=async a=>{try{const d=await fetch(`/tool/speakr/api/share/${a.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({share_summary:a.share_summary,share_notes:a.share_notes})}),p=await d.json();if(!d.ok)throw new Error(p.error||"Failed to update share");ee("Share permissions updated.","fa-check-circle")}catch(d){Ue(`Failed to update share: ${d.message}`)}},nw=a=>{Qs.value=a,no.value=!0},sw=()=>{Qs.value=null,no.value=!1},iw=async()=>{if(!Qs.value)return;const a=Qs.value.id;try{const d=await fetch(`/tool/speakr/api/share/${a}`,{method:"DELETE"}),p=await d.json();if(!d.ok)throw new Error(p.error||"Failed to delete share");Wi.value=Wi.value.filter(y=>y.id!==a),ee("Share link deleted successfully.","fa-check-circle"),no.value=!1,Qs.value=null}catch(d){Ue(`Failed to delete share: ${d.message}`)}};Et(_e,(a,d)=>{a.length===0&&d.length>0&&!he.value&&(console.log("Upload queue processing finished."),setTimeout(()=>Qe.value=!0,500),setTimeout(()=>{Lf.value===Pf.value&&!he.value&&(Ye.value=!0)},2e3))},{deep:!0}),Et(Cs,a=>{a&&Object.keys(a).forEach(d=>{const p=a[d];p.isMe&&Ji.value&&!p.name?p.name=Ji.value:!p.isMe&&p.name===Ji.value&&(p.name="")})},{deep:!0}),Et(m,(a,d)=>{if(ti.value&&(ti.value=!1),d==="notes"&&It.value&&it.value){const p=it.value.value();u.value.notes=p,xo(),so.value=p}if(d==="summary"&&Ot.value&&rt.value){const p=rt.value.value();u.value.summary=p,Ro(),io.value=p}a==="notes"&&It.value&&(it.value&&(it.value.toTextArea(),it.value=null),et(()=>{Ao()})),a==="summary"&&Ot.value&&(rt.value&&(rt.value.toTextArea(),rt.value=null),et(()=>{Bl()}))}),Et(oe,(a,d)=>{if(d==="notes"&&It.value&&it.value){const p=it.value.value();u.value.notes=p,xo(),so.value=p}if(d==="summary"&&Ot.value&&rt.value){const p=rt.value.value();u.value.summary=p,Ro(),io.value=p}a==="notes"&&It.value&&(it.value&&(it.value.toTextArea(),it.value=null),et(()=>{Ao()})),a==="summary"&&Ot.value&&(rt.value&&(rt.value.toTextArea(),rt.value=null),et(()=>{Bl()}))}),Et(u,(a,d)=>{(a==null?void 0:a.id)!==(d==null?void 0:d.id)&&(It.value&&it.value&&(d!=null&&d.id)&&(u.value=d,rd(),u.value=a),Ot.value&&rt.value&&(d!=null&&d.id)&&(u.value=d,sd(),u.value=a),en.value=[],ro.value=!1,m.value="summary",Xs.value=!1,Zs.value=!1,Ot.value=!1,It.value=!1,a!=null&&a.id&&et(()=>{document.querySelectorAll("audio").forEach(y=>{if(y.src&&y.src.includes(`tool/speakr/audio/${a.id}`)){const O=()=>{(!isFinite(y.duration)||y.duration===0)&&(y.currentTime=1e101,y.addEventListener("timeupdate",function L(){y.currentTime=0,y.removeEventListener("timeupdate",L)},{once:!0}))};y.addEventListener("loadedmetadata",O,{once:!0}),y.readyState>=1&&O()}})}))}),Et(c,a=>{a==="recording"?et(()=>{if(RS(),xS(),G.value=!1,Re.value="",Cl(),jt.value||If(),$.value){const d=document.querySelector('audio[src*="blob:"]');if(d){const p=()=>{if(!isFinite(d.duration)||d.duration===0){const y=d.currentTime;d.currentTime=1e101,d.addEventListener("timeupdate",function O(){d.currentTime=y,d.removeEventListener("timeupdate",O)},{once:!0})}};d.addEventListener("loadedmetadata",p,{once:!0}),d.addEventListener("canplay",p,{once:!0}),d.readyState>=1&&setTimeout(p,100)}}}):(Of(),Cn.value="",le.value="",D.value="",El(),Ln.value=!1,G.value=!1,Pn.value&&(Pn.value.toTextArea(),Pn.value=null))}),Et(le,async()=>{await et(),Qi.value&&(Qi.value.scrollTop=Qi.value.scrollHeight),Gi.value&&(Gi.value.scrollTop=Gi.value.scrollHeight)}),Et(Re,async()=>{await et(),Zn.value&&(Zn.value.scrollTop=Zn.value.scrollHeight)}),Et(Oe,async()=>{await et(),Zn.value&&(Zn.value.scrollTop=Zn.value.scrollHeight)});let oi=null;const rw=a=>{a&&(a.scrollTop=a.scrollHeight)},$l=()=>{[Qi.value,Gi.value,Zn.value,Ef.value,Cf.value].forEach(rw)},Oo=async(a=!1)=>{Ln.value&&!a||(await et(),$l(),!(typeof window>"u"||typeof window.requestAnimationFrame!="function")&&(oi!==null&&(window.cancelAnimationFrame(oi),oi=null),oi=window.requestAnimationFrame(()=>{$l(),oi=window.requestAnimationFrame(()=>{$l(),oi=null})})))};Et(si,()=>{Oo()}),Et(er,()=>{Oo()}),Et(Ln,()=>{Oo(!0)}),Et(bf,a=>{a&&Oo(!0)}),Et(Cn,async()=>{await et(),uo.value&&(uo.value.scrollTop=uo.value.scrollHeight)}),Et($,a=>{a&&et(()=>{const d=document.querySelector('audio[src*="blob:"]');if(d){const p=()=>{if(!isFinite(d.duration)||d.duration===0){const y=d.currentTime;d.currentTime=y+.01,d.addEventListener("timeupdate",function O(){d.currentTime=y,d.removeEventListener("timeupdate",O)},{once:!0})}};d.addEventListener("loadedmetadata",p,{once:!0}),d.addEventListener("loadeddata",p,{once:!0}),d.addEventListener("canplay",p,{once:!0}),d.readyState>=1&&setTimeout(p,100)}})}),Et(ao,a=>{document.querySelectorAll("audio").forEach(p=>{p.volume!==a&&(p.volume=a)})}),Et(v,a=>{Gf(a)});const ow=async()=>{try{const a=await fetch("/tool/speakr/api/config");if(a.ok){const d=await a.json();mn.value=d.max_file_size_mb||250,Zt.value=d.chunking_enabled!==void 0?d.chunking_enabled:!0,In.value=d.chunking_mode||"size",En.value=d.chunking_limit||20,g.value=d.chunking_limit_display||"20MB",T.value=d.recording_disclaimer||"",console.log(`Loaded configuration: max size ${mn.value}MB, chunking ${Zt.value?"enabled":"disabled"} (${g.value})`)}else console.warn("Failed to load configuration, using default values")}catch(a){console.error("Error loading configuration:",a)}},Bl=()=>{var a;if(hl.value)try{rt.value=new dr({element:hl.value,spellChecker:!1,autofocus:!0,placeholder:"Enter summary in Markdown format...",initialValue:((a=u.value)==null?void 0:a.summary)||"",status:!1,toolbar:["bold","italic","heading","|","quote","unordered-list","ordered-list","|","link","image","|","preview","side-by-side","fullscreen","|","guide"],previewClass:["editor-preview","notes-preview"],theme:B.value?"dark":"light"}),rt.value.codemirror.on("change",()=>{ei.value&&clearTimeout(ei.value),ei.value=setTimeout(()=>{Ro()},yf)})}catch(d){console.error("Failed to initialize summary markdown editor:",d),Ot.value=!0}},aw=async()=>{try{const a=await fetch("/tool/speakr/api/inbox_recordings");if(!a.ok)return;const d=await a.json();d&&d.length>0&&d.forEach(p=>{f.value.find(me=>me.id===p.id)||(f.value.unshift(p),M.value++);const O=_e.value.find(me=>me.recordingId===p.id),L=He.value&&He.value.recordingId===p.id;if(O||L){O&&O.status!==p.status&&console.log(`Updating status for existing recording ${p.original_filename}: ${O.status} -> ${p.status}`);return}if(p.status==="COMPLETED"){console.log(`Skipping completed inbox recording: ${p.original_filename}`);return}if(console.log(`Found new inbox recording: ${p.original_filename} (status: ${p.status})`),p.status==="SUMMARIZING"&&he.value){console.log(`Skipping ${p.original_filename} - already in summarization phase of main processing`);return}const X={file:{name:p.original_filename||`Recording ${p.id}`,size:p.file_size||0},status:"pending",recordingId:p.id,clientId:`inbox-${p.id}-${Date.now()}`,error:null,isReprocessing:!0,reprocessType:"transcription"};_e.value.unshift(X),!he.value&&!He.value&&(He.value=X),Qe.value=!1,Ye.value=!1,startReprocessingPoll(p.id)})}catch(a){console.error("Error polling for inbox recordings:",a)}},lw=async()=>{if(xe.value=!1,ye.value=!1,Le.value="",!navigator.mediaDevices||!navigator.mediaDevices.getDisplayMedia){Le.value="getDisplayMedia API not supported";return}try{xe.value=!0,ye.value=!0,Le.value=""}catch(a){Le.value=a.message,console.warn("System audio detection failed:",a)}},cw=()=>{const a=navigator.userAgent;a.includes("Firefox")?F.value="firefox":a.includes("Chrome")?F.value="chrome":a.includes("Safari")?F.value="safari":a.includes("MSIE")||a.includes("Trident/")?F.value="ie":F.value="unknown"};pE(async()=>{const a=document.getElementById("loader"),d=document.getElementById("app");a&&(a.style.opacity="0",setTimeout(()=>{a.style.display="none"},500)),d&&(d.style.opacity="1");const p=document.getElementById("app");if(p){const Te=p.dataset.useAsrEndpoint;Ki.value=Te==="True"||Te==="true",Ji.value=p.dataset.currentUserName||""}if(await ow(),await lw(),cw(),localStorage.getItem("ui_language_changed")==="true"){localStorage.removeItem("ui_language_changed"),window.location.reload();return}if(window.i18n){fe.value=window.i18n.getLocale(),Ae.value=window.i18n.getAvailableLocales();const Te=Ae.value.find(we=>we.code===fe.value);Z.value=Te?Te.nativeName:"English",window.addEventListener("localeChanged",we=>{fe.value=we.detail.locale;const Fe=Ae.value.find(ue=>ue.code===fe.value);Z.value=Fe?Fe.nativeName:"English"})}Eo(),Qf(),ri(),qy(),Wf();const y=localStorage.getItem("playerVolume");y!==null&&(ao.value=parseFloat(y));const O=localStorage.getItem("transcriptionViewMode");O&&(qi.value=O);const L=localStorage.getItem("transcriptColumnWidth"),X=localStorage.getItem("summaryColumnWidth");L&&X&&(zi.value=parseFloat(L),lo.value=parseFloat(X));const me=()=>{re.value=window.innerWidth};window.addEventListener("resize",me),me(),setInterval(aw,1e4);const ge=Te=>{Te.key==="Escape"&&(K.value&&qf(),Zr.value&&Dl(),eo.value&&ko(),showSortOptions.value&&(showSortOptions.value=!1))};document.addEventListener("keydown",ge);const ve=Te=>{if(N.value){const we=Te.target.closest('button[class*="flex items-center gap"]'),Fe=Te.target.closest('div[class*="absolute right-0"]');!(we&&we.querySelector("i.fa-user-circle"))&&!Fe&&(N.value=!1)}if(vf.value){const we=Te.target.closest('input[type="text"]'),Fe=Te.target.closest('[class*="absolute z-10"]');!we&&!Fe&&Object.keys(fl.value).forEach(ue=>{fl.value[ue]=[]})}};document.addEventListener("click",ve),window.addEventListener("beforeunload",_l)});let Io="";function uw(){Io=si.value||"",wl.value=Io,Zi.value=er.value||"",n==null||n.enterEditMode(Io),s==null||s.enterEditMode(Zi.value),Ln.value=!0}function ld(){const a=wl.value??"",d=Zi.value??"";Ln.value=!1,n?n.applyEditedText(a):(D.value=a,le.value=a,Re.value="",Oe.value=""),s?s.applyEditedText(d):(Xi.value=d,fo.value=d,ho.value="",po.value=""),Io=a}return{currentView:c,dragover:h,recordings:f,selectedRecording:u,selectedTab:m,searchQuery:v,isLoadingRecordings:w,globalError:b,maxFileSizeMB:mn,chunkingEnabled:Zt,chunkingMode:In,chunkingLimit:En,chunkingLimitDisplay:g,sortBy:Ve.sortBy,showAdvancedFilters:Ve.showAdvancedFilters,filterTags:Ve.filterTags,filterDateRange:Ve.filterDateRange,filterDatePreset:Ve.filterDatePreset,filterTextQuery:Ve.filterTextQuery,currentPage:H,perPage:P,totalRecordings:M,totalPages:S,hasNextPage:_,hasPrevPage:x,isLoadingMore:C,browser:F,isSidebarCollapsed:Ve.isSidebarCollapsed,searchTipsExpanded:R,isUserMenuOpen:N,isDarkMode:B,currentColorScheme:A,showColorSchemeModal:K,windowWidth:re,isMobileScreen:Rs,mobileTab:oe,isMetadataExpanded:J,currentLanguage:fe,currentLanguageName:Z,availableLanguages:Ae,showLanguageMenu:ft,uploadQueue:_e,currentlyProcessingFile:He,processingProgress:ie,processingMessage:ne,isProcessingActive:he,progressPopupMinimized:Qe,progressPopupClosed:Ye,totalInQueue:Pf,completedInQueue:Lf,finishedFilesInQueue:Kv,clearCompletedUploads:Gv,editingDraftId:Ve.editingDraftId,editingDraftName:Ve.editingDraftName,isRecording:j,canRecordAudio:pe,canRecordSystemAudio:ye,systemAudioSupported:xe,systemAudioError:Le,audioBlobURL:$,recordingTime:ae,recordingNotes:Ce,visualizer:bs,micVisualizer:Ts,systemVisualizer:Bi,recordingMode:Bt,recordingDisclaimer:T,showRecordingDisclaimerModal:Xe,acceptRecordingDisclaimer:uS,cancelRecordingDisclaimer:fS,showAdvancedOptions:qe,uploadLanguage:Ze,uploadMinSpeakers:Ks,uploadMaxSpeakers:rl,asrLanguage:We,asrMinSpeakers:lt,asrMaxSpeakers:st,availableTags:yn,selectedTagIds:Nn,selectedTags:Es,uploadTagSearchFilter:ol,filteredAvailableTagsForUpload:hv,onTagSelected:sS,addTagToSelection:tS,removeTagFromSelection:nS,showSystemAudioHelp:_t,isPaused:jt,isStoppingRecording:U,isPausingRecording:W,currentDraftId:mt,showRecordingControls:Jv,pausedDuration:E,pausedTranscription:D,draftRecordings:Q,draftsExpanded:te,pauseRecording:hS,resumeRecording:pS,loadDrafts:ri,continueDraftRecording:ed,deleteDraft:Nl,showEditModal:Zr,showDeleteModal:eo,showResetModal:ce.showResetModal,editingRecording:ct,recordingToDelete:Ys,showEditTagsModal:al,selectedNewTagId:Hi,tagSearchFilter:to,filteredAvailableTagsForModal:iS,editRecordingTags:rS,closeEditTagsModal:oS,addTagToRecording:aS,removeTagFromRecording:lS,getRecordingTags:Yf,getAvailableTagsForRecording:Xf,filterByTag:Ve.filterByTag,clearTagFilter:Ve.clearTagFilter,applyAdvancedFilters:Ve.applyAdvancedFilters,clearAllFilters:Ve.clearAllFilters,showTextEditorModal:ce.showTextEditorModal,showAsrEditorModal:ce.showAsrEditorModal,editingTranscriptionContent:ce.editingTranscriptionContent,editingSegments:ce.editingSegments,availableSpeakers:ce.availableSpeakers,editingParticipants:Xs,editingMeetingDate:Zs,editingSummary:Ot,editingNotes:It,notesMarkdownEditor:dl,markdownEditorInstance:it,summaryMarkdownEditor:hl,summaryMarkdownEditorInstance:rt,recordingNotesEditor:pl,transcriptionViewMode:qi,legendExpanded:Nv,highlightedSpeaker:ce.highlightedSpeaker,processedTranscription:Ff,showChat:ro,isChatMaximized:ti,toggleChatMaximize:MS,chatMessages:en,chatInput:oo,isChatLoading:ni,chatMessagesRef:ks,playerVolume:ao,leftColumnWidth:zi,rightColumnWidth:lo,isResizing:co,useAsrEndpoint:Ki,currentUserName:Ji,filteredRecordings:Nf,groupedRecordings:Ve.groupedRecordings,activeRecordingMetadata:zv,datePresetOptions:Ve.datePresetOptions,languageOptions:qv,colorSchemes:tr,asrResult:le,asrResultOnline:Re,asrResultOffline:Oe,fullRealtimeTranscription:si,fullSystemRealtimeTranscription:er,isDualRealtimeTranscription:Tl,systemEditableText:Zi,dualTranscriptContainer:bl,dualTranscriptTopPercent:kf,startDualTranscriptResize:Fv,asrTextarea:Qi,asrResultTextarea:Gi,asrResultTextareaOnline:Zn,systemAsrResultTextarea:Ef,systemAsrResultTextareaOnline:Cf,analysisResult:Cn,sumupResultTextarea:uo,isDialogVisible:wf,isyjDialogVisible:bf,baseInfo:Sf,isModalOpen:ml,urlinfo:Tf,urlmsg:yl,zjloding:Yi,openmodel:Df,openzjmodel:Qv,closeModal:Yv,setGlobalError:Ue,formatFileSize:nr,formatDisplayDate:$f,formatStatus:Xv,getStatusClass:Zv,formatTime:ey,t:gt,tc:LS,changeLanguage:FS,toggleDarkMode:Wy,applyColorScheme:sr,initializeColorScheme:Wf,openColorSchemeModal:zy,closeColorSchemeModal:qf,selectColorScheme:Ky,resetColorScheme:Jy,toggleSidebar:Ve.toggleSidebar,switchToUploadView:Gy,selectRecording:zf,handleDragOver:Qy,handleDragLeave:Yy,handleDrop:Xy,handleFileSelect:Zy,addFilesToQueue:_o,startRecording:dS,stopRecording:Co,uploadRecordedAudio:mS,discardRecording:td,downloadRecordedAudio:gS,loadRecordings:Eo,loadMoreRecordings:Ve.loadMoreRecordings,performSearch:Jf,debouncedSearch:Gf,saveMetadata:Fl,editRecording:vS,cancelEdit:Dl,saveEdit:yS,confirmDelete:SS,cancelDelete:ko,deleteRecording:wS,toggleEditParticipants:bS,toggleEditMeetingDate:TS,toggleEditSummary:nd,cancelEditSummary:_S,saveEditSummary:sd,toggleEditNotes:id,cancelEditNotes:ES,saveEditNotes:rd,initializeMarkdownEditor:Ao,saveInlineEdit:ir,clickToEditNotes:CS,clickToEditSummary:kS,autoSaveNotes:xo,autoSaveSummary:Ro,sendChatMessage:od,isChatScrolledToBottom:Mo,scrollChatToBottom:rr,startColumnResize:OS,handleChatKeydown:IS,seekAudio:ad,seekAudioFromEvent:NS,onPlayerVolumeChange:PS,showToast:ee,copyMessage:DS,copyTranscription:$S,copySummary:BS,copyNotes:jS,downloadSummary:HS,downloadTranscript:US,downloadNotes:VS,downloadChat:KS,clearChat:JS,downloadEventICS:WS,downloadICS:qS,formatEventDateTime:zS,toggleInbox:Uy,toggleHighlight:Vy,toggleTranscriptionViewMode:AS,reprocessTranscription:oy,reprocessSummary:ay,generateSummary:ly,resetRecordingStatus:cy,confirmReset:ky,cancelReset:xy,executeReset:Ry,openTranscriptionEditor:dy,openTextEditorModal:hy,closeTextEditorModal:py,saveTranscription:my,openAsrEditorModal:gy,closeAsrEditorModal:vy,saveAsrTranscription:yy,adjustTime:Sy,filterSpeakers:wy,openSpeakerSuggestions:by,closeSpeakerSuggestions:Ty,selectSpeaker:_y,addSegment:Ey,removeSegment:Cy,showReprocessModal:ce.showReprocessModal,reprocessType:ce.reprocessType,reprocessRecording:ce.reprocessRecording,cancelReprocess:uy,executeReprocess:fy,asrReprocessOptions:ce.asrReprocessOptions,showSpeakerModal:ce.showSpeakerModal,showShareModal:ll,recordingToShare:Ui,shareOptions:Js,generatedShareLink:Gs,existingShareDetected:Vi,userShares:Wi,isLoadingShares:ul,showSharesListModal:cl,shareToDelete:Qs,showShareDeleteModal:no,confirmDeleteShare:nw,cancelDeleteShare:sw,speakerMap:ce.speakerMap,speakerDisplayMap:ce.speakerDisplayMap,modalSpeakers:ce.modalSpeakers,regenerateSummaryAfterSpeakerUpdate:ce.regenerateSummaryAfterSpeakerUpdate,identifiedSpeakers:kl,identifiedSpeakersInOrder:ce.identifiedSpeakersInOrder,hasSpeakerNames:ce.hasSpeakerNames,openSpeakerModal:Iy,closeSpeakerModal:Ny,saveSpeakerNames:Py,highlightedTranscript:ce.highlightedTranscript,highlightedSpeaker:ce.highlightedSpeaker,highlightSpeakerInTranscript:Ly,focusSpeaker:Fy,blurSpeaker:Dy,clearSpeakerHighlight:$y,currentSpeakerGroupIndex:ce.currentSpeakerGroupIndex,speakerGroups:ce.speakerGroups,navigateToNextSpeakerGroup:By,navigateToPrevSpeakerGroup:jy,speakerSuggestions:ce.speakerSuggestions,loadingSuggestions:ce.loadingSuggestions,activeSpeakerInput:ce.activeSpeakerInput,searchSpeakers:Ay,selectSpeakerSuggestion:My,closeSpeakerSuggestionsOnClick:Oy,autoIdentifySpeakers:Hy,isAutoIdentifying:ce.isAutoIdentifying,formatDuration:Bf,openShareModal:GS,closeShareModal:QS,createShare:YS,openSharesList:ZS,closeSharesList:ew,updateShare:tw,deleteShare:iw,copyShareLink:XS,startDraftRename:Ve.startDraftRename,saveDraftRename:Ve.saveDraftRename,editingDraftId:Ve.editingDraftId,editingDraftName:Ve.editingDraftName,draftNameInput:I,draftRecordings:Q,deleteDraft:Nl,continueDraftRecording:ed,loadDrafts:ri,estimatedFileSize:ji,fileSizeWarningShown:zs,recordingQuality:il,actualBitrate:_s,maxRecordingMB:Yn,sizeCheckInterval:Xn,updateFileSizeEstimate:Hf,startSizeMonitoring:xl,stopSizeMonitoring:So,sumupResult:Vf,lastTimer:gl,promptVisible:wo,promptList:Rl,openPromptModal:ty,closePromptModal:ny,confirmPromptSelection:ry,selectedPromptId:bo,recommendPromptId:Al,recommendPromptName:Ml,isMarkdown:fv,renderedMarkdown:dv,recommendPromptReason:Ol,selectedScene:Sl,setSelectedScene:Vv,showSpeaker:_f,isEditingTranscription:Ln,editableText:wl,enterEditMode:uw,exitEditMode:ld}},delimiters:["${","}"]});i.config.globalProperties.t=t,i.config.globalProperties.tc=(o,l,c={})=>!window.i18n||!window.i18n.tc?o:window.i18n.tc(o,l,c),i.provide("t",t),i.provide("tc",(o,l,c={})=>!window.i18n||!window.i18n.tc?o:window.i18n.tc(o,l,c)),i.mount("#app"),Ss(()=>{const o=document.querySelector(".app-loading-overlay");o?setTimeout(()=>{o.classList.add("fade-out"),setTimeout(()=>{o.remove(),document.body.classList.remove("app-loading")},300)},100):document.body.classList.remove("app-loading")})});
//# sourceMappingURL=index.js.map