var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));function u(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var d={},f=[],p=()=>{},m=()=>!1,h=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),g=e=>e.startsWith(`onUpdate:`),_=Object.assign,v=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},y=Object.prototype.hasOwnProperty,b=(e,t)=>y.call(e,t),x=Array.isArray,S=e=>ne(e)===`[object Map]`,C=e=>ne(e)===`[object Set]`,w=e=>typeof e==`function`,T=e=>typeof e==`string`,E=e=>typeof e==`symbol`,D=e=>typeof e==`object`&&!!e,ee=e=>(D(e)||w(e))&&w(e.then)&&w(e.catch),te=Object.prototype.toString,ne=e=>te.call(e),re=e=>ne(e).slice(8,-1),ie=e=>ne(e)===`[object Object]`,ae=e=>T(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,oe=u(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),O=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},se=/-\w/g,k=O(e=>e.replace(se,e=>e.slice(1).toUpperCase())),ce=/\B([A-Z])/g,le=O(e=>e.replace(ce,`-$1`).toLowerCase()),ue=O(e=>e.charAt(0).toUpperCase()+e.slice(1)),de=O(e=>e?`on${ue(e)}`:``),A=(e,t)=>!Object.is(e,t),fe=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},me=e=>{let t=parseFloat(e);return isNaN(t)?e:t},he,ge=()=>he||(he=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{});function _e(e){if(x(e)){let t={};for(let n=0;n{if(e){let n=e.split(ye);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Se(e){let t=``;if(T(e))t=e;else if(x(e))for(let n=0;n!!(e&&e.__v_isRef===!0),De=e=>T(e)?e:e==null?``:x(e)||D(e)&&(e.toString===te||!w(e.toString))?Ee(e)?De(e.value):JSON.stringify(e,Oe,2):String(e),Oe=(e,t)=>Ee(t)?Oe(e,t.value):S(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[ke(t,r)+` =>`]=n,e),{})}:C(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>ke(e))}:E(t)?ke(t):D(t)&&!x(t)&&!ie(t)?String(t):t,ke=(e,t=``)=>E(e)?`Symbol(${e.description??t})`:e,j,Ae=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=j,!e&&j&&(this.index=(j.scopes||(j.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e0&&--this._on===0&&(j=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t0)return;if(Le){let e=Le;for(Le=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;Ie;){let t=Ie;for(Ie=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||(e=t)}t=n}}if(e)throw e}function Ve(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function He(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),Ge(r),Ke(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function Ue(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(We(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function We(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ze)||(e.globalVersion=Ze,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ue(e))))return;e.flags|=2;let t=e.dep,n=M,r=N;M=e,N=!0;try{Ve(e);let n=e.fn(e._value);(t.version===0||A(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{M=n,N=r,He(e),e.flags&=-3}}function Ge(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)Ge(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Ke(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var N=!0,qe=[];function Je(){qe.push(N),N=!1}function Ye(){let e=qe.pop();N=e===void 0?!0:e}function Xe(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=M;M=void 0;try{t()}finally{M=e}}}var Ze=0,Qe=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},$e=class{constructor(e){this.computed=e,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(e){if(!M||!N||M===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==M)t=this.activeLink=new Qe(M,this),M.deps?(t.prevDep=M.depsTail,M.depsTail.nextDep=t,M.depsTail=t):M.deps=M.depsTail=t,et(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=M.depsTail,t.nextDep=void 0,M.depsTail.nextDep=t,M.depsTail=t,M.deps===t&&(M.deps=e)}return t}trigger(e){this.version++,Ze++,this.notify(e)}notify(e){ze();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Be()}}};function et(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)et(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var tt=new WeakMap,nt=Symbol(``),rt=Symbol(``),it=Symbol(``);function P(e,t,n){if(N&&M){let t=tt.get(e);t||tt.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new $e),r.map=t,r.key=n),r.track()}}function at(e,t,n,r,i,a){let o=tt.get(e);if(!o){Ze++;return}let s=e=>{e&&e.trigger()};if(ze(),t===`clear`)o.forEach(s);else{let i=x(e),a=i&&ae(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===it||!E(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(it)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(nt)),S(e)&&s(o.get(rt)));break;case`delete`:i||(s(o.get(nt)),S(e)&&s(o.get(rt)));break;case`set`:S(e)&&s(o.get(nt));break}}Be()}function ot(e){let t=I(e);return t===e?t:(P(t,`iterate`,it),F(e)?t:t.map(L))}function st(e){return P(e=I(e),`iterate`,it),e}var ct={__proto__:null,[Symbol.iterator](){return lt(this,Symbol.iterator,L)},concat(...e){return ot(this).concat(...e.map(e=>x(e)?ot(e):e))},entries(){return lt(this,`entries`,e=>(e[1]=L(e[1]),e))},every(e,t){return dt(this,`every`,e,t,void 0,arguments)},filter(e,t){return dt(this,`filter`,e,t,e=>e.map(L),arguments)},find(e,t){return dt(this,`find`,e,t,L,arguments)},findIndex(e,t){return dt(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return dt(this,`findLast`,e,t,L,arguments)},findLastIndex(e,t){return dt(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return dt(this,`forEach`,e,t,void 0,arguments)},includes(...e){return pt(this,`includes`,e)},indexOf(...e){return pt(this,`indexOf`,e)},join(e){return ot(this).join(e)},lastIndexOf(...e){return pt(this,`lastIndexOf`,e)},map(e,t){return dt(this,`map`,e,t,void 0,arguments)},pop(){return mt(this,`pop`)},push(...e){return mt(this,`push`,e)},reduce(e,...t){return ft(this,`reduce`,e,t)},reduceRight(e,...t){return ft(this,`reduceRight`,e,t)},shift(){return mt(this,`shift`)},some(e,t){return dt(this,`some`,e,t,void 0,arguments)},splice(...e){return mt(this,`splice`,e)},toReversed(){return ot(this).toReversed()},toSorted(e){return ot(this).toSorted(e)},toSpliced(...e){return ot(this).toSpliced(...e)},unshift(...e){return mt(this,`unshift`,e)},values(){return lt(this,`values`,L)}};function lt(e,t,n){let r=st(e),i=r[t]();return r!==e&&!F(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}var ut=Array.prototype;function dt(e,t,n,r,i,a){let o=st(e),s=o!==e&&!F(e),c=o[t];if(c!==ut[t]){let t=c.apply(e,a);return s?L(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,L(t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function ft(e,t,n,r){let i=st(e),a=n;return i!==e&&(F(e)?n.length>3&&(a=function(t,r,i){return n.call(this,t,r,i,e)}):a=function(t,r,i){return n.call(this,t,L(r),i,e)}),i[t](a,...r)}function pt(e,t,n){let r=I(e);P(r,`iterate`,it);let i=r[t](...n);return(i===-1||i===!1)&&Gt(n[0])?(n[0]=I(n[0]),r[t](...n)):i}function mt(e,t,n=[]){Je(),ze();let r=I(e)[t].apply(e,n);return Be(),Ye(),r}var ht=u(`__proto__,__v_isRef,__isVue`),gt=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(E));function _t(e){E(e)||(e=String(e));let t=I(this);return P(t,`has`,e),t.hasOwnProperty(e)}var vt=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?It:Ft:i?Pt:Nt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=x(e);if(!r){let e;if(a&&(e=ct[t]))return e;if(t===`hasOwnProperty`)return _t}let o=Reflect.get(e,t,R(e)?e:n);if((E(t)?gt.has(t):ht(t))||(r||P(e,`get`,t),i))return o;if(R(o)){let e=a&&ae(t)?o:o.value;return r&&D(e)?Vt(e):e}return D(o)?r?Vt(o):zt(o):o}},yt=class extends vt{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t];if(!this._isShallow){let t=Wt(i);if(!F(n)&&!Wt(n)&&(i=I(i),n=I(n)),!x(e)&&R(i)&&!R(n))return t||(i.value=n),!0}let a=x(e)&&ae(t)?Number(t)e,Tt=e=>Reflect.getPrototypeOf(e);function Et(e,t,n){return function(...r){let i=this.__v_raw,a=I(i),o=S(a),s=e===`entries`||e===Symbol.iterator&&o,c=e===`keys`&&o,l=i[e](...r),u=n?wt:t?qt:L;return!t&&P(a,`iterate`,c?rt:nt),{next(){let{value:e,done:t}=l.next();return t?{value:e,done:t}:{value:s?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function Dt(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function Ot(e,t){let n={get(n){let r=this.__v_raw,i=I(r),a=I(n);e||(A(n,a)&&P(i,`get`,n),P(i,`get`,a));let{has:o}=Tt(i),s=t?wt:e?qt:L;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&P(I(t),`iterate`,nt),t.size},has(t){let n=this.__v_raw,r=I(n),i=I(t);return e||(A(t,i)&&P(r,`has`,t),P(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=I(a),s=t?wt:e?qt:L;return!e&&P(o,`iterate`,nt),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return _(n,e?{add:Dt(`add`),set:Dt(`set`),delete:Dt(`delete`),clear:Dt(`clear`)}:{add(e){!t&&!F(e)&&!Wt(e)&&(e=I(e));let n=I(this);return Tt(n).has.call(n,e)||(n.add(e),at(n,`add`,e,e)),this},set(e,n){!t&&!F(n)&&!Wt(n)&&(n=I(n));let r=I(this),{has:i,get:a}=Tt(r),o=i.call(r,e);o||(e=I(e),o=i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?A(n,s)&&at(r,`set`,e,n,s):at(r,`add`,e,n),this},delete(e){let t=I(this),{has:n,get:r}=Tt(t),i=n.call(t,e);i||(e=I(e),i=n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&at(t,`delete`,e,void 0,a),o},clear(){let e=I(this),t=e.size!==0,n=e.clear();return t&&at(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=Et(r,e,t)}),n}function kt(e,t){let n=Ot(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(b(n,r)&&r in t?n:t,r,i)}var At={get:kt(!1,!1)},jt={get:kt(!1,!0)},Mt={get:kt(!0,!1)},Nt=new WeakMap,Pt=new WeakMap,Ft=new WeakMap,It=new WeakMap;function Lt(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function Rt(e){return e.__v_skip||!Object.isExtensible(e)?0:Lt(re(e))}function zt(e){return Wt(e)?e:Ht(e,!1,xt,At,Nt)}function Bt(e){return Ht(e,!1,Ct,jt,Pt)}function Vt(e){return Ht(e,!0,St,Mt,Ft)}function Ht(e,t,n,r,i){if(!D(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let a=Rt(e);if(a===0)return e;let o=i.get(e);if(o)return o;let s=new Proxy(e,a===2?r:n);return i.set(e,s),s}function Ut(e){return Wt(e)?Ut(e.__v_raw):!!(e&&e.__v_isReactive)}function Wt(e){return!!(e&&e.__v_isReadonly)}function F(e){return!!(e&&e.__v_isShallow)}function Gt(e){return e?!!e.__v_raw:!1}function I(e){let t=e&&e.__v_raw;return t?I(t):e}function Kt(e){return!b(e,`__v_skip`)&&Object.isExtensible(e)&&pe(e,`__v_skip`,!0),e}var L=e=>D(e)?zt(e):e,qt=e=>D(e)?Vt(e):e;function R(e){return e?e.__v_isRef===!0:!1}function Jt(e){return Yt(e,!1)}function Yt(e,t){return R(e)?e:new Xt(e,t)}var Xt=class{constructor(e,t){this.dep=new $e,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:I(e),this._value=t?e:L(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||F(e)||Wt(e);e=n?e:I(e),A(e,t)&&(this._rawValue=e,this._value=n?e:L(e),this.dep.trigger())}};function Zt(e){return R(e)?e.value:e}var Qt={get:(e,t,n)=>t===`__v_raw`?e:Zt(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return R(i)&&!R(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function $t(e){return Ut(e)?e:new Proxy(e,Qt)}var en=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new $e(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ze-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&M!==this)return Re(this,!0),!0}get value(){let e=this.dep.track();return We(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function tn(e,t,n=!1){let r,i;return w(e)?r=e:(r=e.get,i=e.set),new en(r,i,n)}var nn={},rn=new WeakMap,an=void 0;function on(e,t=!1,n=an){if(n){let t=rn.get(n);t||rn.set(n,t=[]),t.push(e)}}function sn(e,t,n=d){let{immediate:r,deep:i,once:a,scheduler:o,augmentJob:s,call:c}=n,l=e=>i?e:F(e)||i===!1||i===0?cn(e,1):cn(e),u,f,m,h,g=!1,_=!1;if(R(e)?(f=()=>e.value,g=F(e)):Ut(e)?(f=()=>l(e),g=!0):x(e)?(_=!0,g=e.some(e=>Ut(e)||F(e)),f=()=>e.map(e=>{if(R(e))return e.value;if(Ut(e))return l(e);if(w(e))return c?c(e,2):e()})):f=w(e)?t?c?()=>c(e,2):e:()=>{if(m){Je();try{m()}finally{Ye()}}let t=an;an=u;try{return c?c(e,3,[h]):e(h)}finally{an=t}}:p,t&&i){let e=f,t=i===!0?1/0:i;f=()=>cn(e(),t)}let y=je(),b=()=>{u.stop(),y&&y.active&&v(y.effects,u)};if(a&&t){let e=t;t=(...t)=>{e(...t),b()}}let S=_?Array(e.length).fill(nn):nn,C=e=>{if(!(!(u.flags&1)||!u.dirty&&!e))if(t){let e=u.run();if(i||g||(_?e.some((e,t)=>A(e,S[t])):A(e,S))){m&&m();let n=an;an=u;try{let n=[e,S===nn?void 0:_&&S[0]===nn?[]:S,h];S=e,c?c(t,3,n):t(...n)}finally{an=n}}}else u.run()};return s&&s(C),u=new Pe(f),u.scheduler=o?()=>o(C,!1):C,h=e=>on(e,!1,u),m=u.onStop=()=>{let e=rn.get(u);if(e){if(c)c(e,4);else for(let t of e)t();rn.delete(u)}},t?r?C(!0):S=u.run():o?o(C.bind(null,!0),!0):u.run(),b.pause=u.pause.bind(u),b.resume=u.resume.bind(u),b.stop=b,b}function cn(e,t=1/0,n){if(t<=0||!D(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,R(e))cn(e.value,t,n);else if(x(e))for(let r=0;r{cn(e,t,n)});else if(ie(e)){for(let r in e)cn(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&cn(e[r],t,n)}return e}function ln(e,t,n,r){try{return r?e(...r):e()}catch(e){dn(e,t,n)}}function un(e,t,n,r){if(w(e)){let i=ln(e,t,n,r);return i&&ee(i)&&i.catch(e=>{dn(e,t,n)}),i}if(x(e)){let i=[];for(let a=0;a>>1,i=z[r],a=Tn(i);a=Tn(n)?z.push(e):z.splice(yn(t),0,e),e.flags|=1,xn()}}function xn(){_n||(_n=gn.then(En))}function Sn(e){x(e)?pn.push(...e):mn&&e.id===-1?mn.splice(hn+1,0,e):e.flags&1||(pn.push(e),e.flags|=1),xn()}function Cn(e,t,n=B+1){for(;nTn(e)-Tn(t));if(pn.length=0,mn){mn.push(...e);return}for(mn=e,hn=0;hne.id==null?e.flags&2?-1:1/0:e.id;function En(e){try{for(B=0;B{r._d&&Wi(-1);let i=On(t),a;try{a=e(...n)}finally{On(i),r._d&&Wi(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function An(e,t){if(V===null)return e;let n=Da(V),r=e.dirs||(e.dirs=[]);for(let e=0;ee.__isTeleport,Pn=Symbol(`_leaveCb`);function Fn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Fn(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 In(e,t){return w(e)?_({name:e.name},t,{setup:e}):e}function Ln(e){e.ids=[e.ids[0]+ e.ids[2]+++`-`,0,0]}var Rn=new WeakMap;function zn(e,t,n,r,i=!1){if(x(e)){e.forEach((e,a)=>zn(e,t&&(x(t)?t[a]:t),n,r,i));return}if(Un(r)&&!i){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&zn(e,t,n,r.component.subTree);return}let a=r.shapeFlag&4?Da(r.component):r.el,o=i?null:a,{i:s,r:c}=e,l=t&&t.r,u=s.refs===d?s.refs={}:s.refs,f=s.setupState,p=I(f),h=f===d?m:e=>b(p,e),g=e=>!0;if(l!=null&&l!==c){if(Bn(t),T(l))u[l]=null,h(l)&&(f[l]=null);else if(R(l)){g(l)&&(l.value=null);let e=t;e.k&&(u[e.k]=null)}}if(w(c))ln(c,s,12,[o,u]);else{let t=T(c),r=R(c);if(t||r){let s=()=>{if(e.f){let n=t?h(c)?f[c]:u[c]:g(c)||!e.k?c.value:u[e.k];if(i)x(n)&&v(n,a);else if(x(n))n.includes(a)||n.push(a);else if(t)u[c]=[a],h(c)&&(f[c]=u[c]);else{let t=[a];g(c)&&(c.value=t),e.k&&(u[e.k]=t)}}else t?(u[c]=o,h(c)&&(f[c]=o)):r&&(g(c)&&(c.value=o),e.k&&(u[e.k]=o))};if(o){let t=()=>{s(),Rn.delete(e)};t.id=-1,Rn.set(e,t),U(t,n)}else Bn(e),s()}}}function Bn(e){let t=Rn.get(e);t&&(t.flags|=8,Rn.delete(e))}var Vn=e=>e.nodeType===8;ge().requestIdleCallback,ge().cancelIdleCallback;function Hn(e,t){if(Vn(e)&&e.data===`[`){let n=1,r=e.nextSibling;for(;r;){if(r.nodeType===1){if(t(r)===!1)break}else if(Vn(r))if(r.data===`]`){if(--n===0)break}else r.data===`[`&&n++;r=r.nextSibling}}else t(e)}var Un=e=>!!e.type.__asyncLoader;function Wn(e){w(e)&&(e={loader:e});let{loader:t,loadingComponent:n,errorComponent:r,delay:i=200,hydrate:a,timeout:o,suspensible:s=!0,onError:c}=e,l=null,u,d=0,f=()=>(d++,l=null,p()),p=()=>{let e;return l||(e=l=t().catch(e=>{if(e=e instanceof Error?e:Error(String(e)),c)return new Promise((t,n)=>{c(e,()=>t(f()),()=>n(e),d+1)});throw e}).then(t=>e!==l&&l?l:(t&&(t.__esModule||t[Symbol.toStringTag]===`Module`)&&(t=t.default),u=t,t)))};return In({name:`AsyncComponentWrapper`,__asyncLoader:p,__asyncHydrate(e,t,n){let r=!1;(t.bu||(t.bu=[])).push(()=>r=!0);let i=()=>{r||n()},o=a?()=>{let n=a(i,t=>Hn(e,t));n&&(t.bum||(t.bum=[])).push(n)}:i;u?o():p().then(()=>!t.isUnmounted&&o())},get __asyncResolved(){return u},setup(){let e=q;if(Ln(e),u)return()=>Gn(u,e);let t=t=>{l=null,dn(t,e,13,!r)};if(s&&e.suspense||va)return p().then(t=>()=>Gn(t,e)).catch(e=>(t(e),()=>r?K(r,{error:e}):null));let a=Jt(!1),c=Jt(),d=Jt(!!i);return i&&setTimeout(()=>{d.value=!1},i),o!=null&&setTimeout(()=>{if(!a.value&&!c.value){let e=Error(`Async component timed out after ${o}ms.`);t(e),c.value=e}},o),p().then(()=>{a.value=!0,e.parent&&Kn(e.parent.vnode)&&e.parent.update()}).catch(e=>{t(e),c.value=e}),()=>{if(a.value&&u)return Gn(u,e);if(c.value&&r)return K(r,{error:c.value});if(n&&!d.value)return Gn(n,e)}}})}function Gn(e,t){let{ref:n,props:r,children:i,ce:a}=t.vnode,o=K(e,r,i);return o.ref=n,o.ce=a,delete t.vnode.ce,o}var Kn=e=>e.type.__isKeepAlive;function qn(e,t){Yn(e,`a`,t)}function Jn(e,t){Yn(e,`da`,t)}function Yn(e,t,n=q){let r=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(Zn(t,r,n),n){let e=n.parent;for(;e&&e.parent;)Kn(e.parent.vnode)&&Xn(r,t,n,e),e=e.parent}}function Xn(e,t,n,r){let i=Zn(t,e,r,!0);ir(()=>{v(r[t],i)},n)}function Zn(e,t,n=q,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||(t.__weh=(...r)=>{Je();let i=ha(n),a=un(t,n,e,r);return i(),Ye(),a});return r?i.unshift(a):i.push(a),a}}var Qn=e=>(t,n=q)=>{(!va||e===`sp`)&&Zn(e,(...e)=>t(...e),n)},$n=Qn(`bm`),er=Qn(`m`),tr=Qn(`bu`),nr=Qn(`u`),rr=Qn(`bum`),ir=Qn(`um`),ar=Qn(`sp`),or=Qn(`rtg`),sr=Qn(`rtc`);function cr(e,t=q){Zn(`ec`,e,t)}var lr=`components`,ur=`directives`,dr=Symbol.for(`v-ndc`);function fr(e){return T(e)?mr(lr,e,!1)||e:e||dr}function pr(e){return mr(ur,e)}function mr(e,t,n=!0,r=!1){let i=V||q;if(i){let n=i.type;if(e===lr){let e=Oa(n,!1);if(e&&(e===t||e===k(t)||e===ue(k(t))))return n}let a=hr(i[e]||n[e],t)||hr(i.appContext[e],t);return!a&&r?n:a}}function hr(e,t){return e&&(e[t]||e[k(t)]||e[ue(k(t))])}function gr(e,t,n,r){let i,a=n&&n[r],o=x(e);if(o||T(e)){let n=o&&Ut(e),r=!1,s=!1;n&&(r=!F(e),s=Wt(e),e=st(e)),i=Array(e.length);for(let n=0,o=e.length;nt(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;r0;return t!==`default`&&(n.name=t),Vi(),qi(W,null,[K(`slot`,n,r&&r())],e?-2:64)}let a=e[t];a&&a._c&&(a._d=!1),Vi();let o=a&&vr(a(n)),s=n.key||o&&o.key,c=qi(W,{key:(s&&!E(s)?s:`_${t}`)+(!o&&r?`_fb`:``)},o||(r?r():[]),o&&e._===1?64:-2);return!i&&c.scopeId&&(c.slotScopeIds=[c.scopeId+`-s`]),a&&a._c&&(a._d=!0),c}function vr(e){return e.some(e=>Ji(e)?!(e.type===Ri||e.type===W&&!vr(e.children)):!0)?e:null}var yr=e=>e?_a(e)?Da(e):yr(e.parent):null,br=_(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=>yr(e.parent),$root:e=>yr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>kr(e),$forceUpdate:e=>e.f||(e.f=()=>{bn(e.update)}),$nextTick:e=>e.n||(e.n=vn.bind(e.proxy)),$watch:e=>Si.bind(e)}),xr=(e,t)=>e!==d&&!e.__isScriptSetup&&b(e,t),Sr={get({_:e},t){if(t===`__v_skip`)return!0;let{ctx:n,setupState:r,data:i,props:a,accessCache:o,type:s,appContext:c}=e,l;if(t[0]!==`$`){let s=o[t];if(s!==void 0)switch(s){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return a[t]}else if(xr(r,t))return o[t]=1,r[t];else if(i!==d&&b(i,t))return o[t]=2,i[t];else if((l=e.propsOptions[0])&&b(l,t))return o[t]=3,a[t];else if(n!==d&&b(n,t))return o[t]=4,n[t];else wr&&(o[t]=0)}let u=br[t],f,p;if(u)return t===`$attrs`&&P(e.attrs,`get`,``),u(e);if((f=s.__cssModules)&&(f=f[t]))return f;if(n!==d&&b(n,t))return o[t]=4,n[t];if(p=c.config.globalProperties,b(p,t))return p[t]},set({_:e},t,n){let{data:r,setupState:i,ctx:a}=e;return xr(i,t)?(i[t]=n,!0):r!==d&&b(r,t)?(r[t]=n,!0):b(e.props,t)||t[0]===`$`&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:a,type:o}},s){let c,l;return!!(n[s]||e!==d&&s[0]!==`$`&&b(e,s)||xr(t,s)||(c=a[0])&&b(c,s)||b(r,s)||b(br,s)||b(i.config.globalProperties,s)||(l=o.__cssModules)&&l[s])},defineProperty(e,t,n){return n.get==null?b(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function Cr(e){return x(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}var wr=!0;function Tr(e){let t=kr(e),n=e.proxy,r=e.ctx;wr=!1,t.beforeCreate&&Dr(t.beforeCreate,e,`bc`);let{data:i,computed:a,methods:o,watch:s,provide:c,inject:l,created:u,beforeMount:d,mounted:f,beforeUpdate:m,updated:h,activated:g,deactivated:_,beforeDestroy:v,beforeUnmount:y,destroyed:b,unmounted:S,render:C,renderTracked:T,renderTriggered:E,errorCaptured:ee,serverPrefetch:te,expose:ne,inheritAttrs:re,components:ie,directives:ae,filters:oe}=t;if(l&&Er(l,r,null),o)for(let e in o){let t=o[e];w(t)&&(r[e]=t.bind(n))}if(i){let t=i.call(n,n);D(t)&&(e.data=zt(t))}if(wr=!0,a)for(let e in a){let t=a[e],i=Aa({get:w(t)?t.bind(n,n):w(t.get)?t.get.bind(n,n):p,set:!w(t)&&w(t.set)?t.set.bind(n):p});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e})}if(s)for(let e in s)Or(s[e],r,n,e);if(c){let e=w(c)?c.call(n):c;Reflect.ownKeys(e).forEach(t=>{Hr(t,e[t])})}u&&Dr(u,e,`c`);function O(e,t){x(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(O($n,d),O(er,f),O(tr,m),O(nr,h),O(qn,g),O(Jn,_),O(cr,ee),O(sr,T),O(or,E),O(rr,y),O(ir,S),O(ar,te),x(ne))if(ne.length){let t=e.exposed||(e.exposed={});ne.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||(e.exposed={});C&&e.render===p&&(e.render=C),re!=null&&(e.inheritAttrs=re),ie&&(e.components=ie),ae&&(e.directives=ae),te&&Ln(e)}function Er(e,t,n=p){x(e)&&(e=Pr(e));for(let n in e){let r=e[n],i;i=D(r)?`default`in r?Ur(r.from||n,r.default,!0):Ur(r.from||n):Ur(r),R(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function Dr(e,t,n){un(x(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function Or(e,t,n,r){let i=r.includes(`.`)?Ci(n,r):()=>n[r];if(T(e)){let n=t[e];w(n)&&bi(i,n)}else if(w(e))bi(i,e.bind(n));else if(D(e))if(x(e))e.forEach(e=>Or(e,t,n,r));else{let r=w(e.handler)?e.handler.bind(n):t[e.handler];w(r)&&bi(i,r,e)}}function kr(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>Ar(c,e,o,!0)),Ar(c,t,o)),D(t)&&a.set(t,c),c}function Ar(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&Ar(e,a,n,!0),i&&i.forEach(t=>Ar(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=jr[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var jr={data:Mr,props:Ir,emits:Ir,methods:Fr,computed:Fr,beforeCreate:H,created:H,beforeMount:H,mounted:H,beforeUpdate:H,updated:H,beforeDestroy:H,beforeUnmount:H,destroyed:H,unmounted:H,activated:H,deactivated:H,errorCaptured:H,serverPrefetch:H,components:Fr,directives:Fr,watch:Lr,provide:Mr,inject:Nr};function Mr(e,t){return t?e?function(){return _(w(e)?e.call(this,this):e,w(t)?t.call(this,this):t)}:t:e}function Nr(e,t){return Fr(Pr(e),Pr(t))}function Pr(e){if(x(e)){let t={};for(let n=0;n1)return n&&w(t)?t.call(r&&r.proxy):t}}var Wr={},Gr=()=>Object.create(Wr),Kr=e=>Object.getPrototypeOf(e)===Wr;function qr(e,t,n,r=!1){let i={},a=Gr();e.propsDefaults=Object.create(null),Yr(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);n?e.props=r?i:Bt(i):e.type.props?e.props=i:e.props=a,e.attrs=a}function Jr(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=I(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r{c=!0;let[n,r]=Qr(e,t,!0);_(o,n),r&&s.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!a&&!c)return D(e)&&r.set(e,f),f;if(x(a))for(let e=0;ee===`_`||e===`_ctx`||e===`$stable`,ti=e=>x(e)?e.map(ia):[ia(e)],ni=(e,t,n)=>{if(t._n)return t;let r=kn((...e)=>ti(t(...e)),n);return r._c=!1,r},ri=(e,t,n)=>{let r=e._ctx;for(let n in e){if(ei(n))continue;let i=e[n];if(w(i))t[n]=ni(n,i,r);else if(i!=null){let e=ti(i);t[n]=()=>e}}},ii=(e,t)=>{let n=ti(t);e.slots.default=()=>n},ai=(e,t,n)=>{for(let r in t)(n||!ei(r))&&(e[r]=t[r])},oi=(e,t,n)=>{let r=e.slots=Gr();if(e.vnode.shapeFlag&32){let e=t._;e?(ai(r,t,n),n&&pe(r,`_`,e,!0)):ri(t,r)}else t&&ii(e,t)},si=(e,t,n)=>{let{vnode:r,slots:i}=e,a=!0,o=d;if(r.shapeFlag&32){let e=t._;e?n&&e===1?a=!1:ai(i,t,n):(a=!t.$stable,ri(t,i)),o=t}else t&&(ii(e,t),o={default:1});if(a)for(let e in i)!ei(e)&&o[e]==null&&delete i[e]},U=Ii;function ci(e){return li(e)}function li(e,t){let n=ge();n.__VUE__=!0;let{insert:r,remove:i,patchProp:a,createElement:o,createText:s,createComment:c,setText:l,setElementText:u,parentNode:m,nextSibling:h,setScopeId:g=p,insertStaticContent:_}=e,v=(e,t,n,r=null,i=null,a=null,o=void 0,s=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!Yi(e,t)&&(r=ve(e),A(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null);let{type:l,ref:u,shapeFlag:d}=t;switch(l){case Li:y(e,t,n,r);break;case Ri:b(e,t,n,r);break;case zi:e??x(t,n,r,o);break;case W:re(e,t,n,r,i,a,o,s,c);break;default:d&1?w(e,t,n,r,i,a,o,s,c):d&6?ie(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,xe)}u!=null&&i?zn(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&zn(e.ref,null,a,e,!0)},y=(e,t,n,i)=>{if(e==null)r(t.el=s(t.children),n,i);else{let n=t.el=e.el;t.children!==e.children&&l(n,t.children)}},b=(e,t,n,i)=>{e==null?r(t.el=c(t.children||``),n,i):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},S=({el:e,anchor:t},n,i)=>{let a;for(;e&&e!==t;)a=h(e),r(e,n,i),e=a;r(t,n,i)},C=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),i(e),e=n;i(t)},w=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)T(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),ee(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},T=(e,t,n,i,s,c,l,d)=>{let f,p,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(f=e.el=o(e.type,c,m&&m.is,m),h&8?u(f,e.children):h&16&&D(e.children,f,null,i,s,ui(e,c),l,d),_&&jn(e,null,i,`created`),E(f,e,e.scopeId,l,i),m){for(let e in m)e!==`value`&&!oe(e)&&a(f,e,null,m[e],c,i);`value`in m&&a(f,`value`,null,m.value,c),(p=m.onVnodeBeforeMount)&&ca(p,i,e)}_&&jn(e,null,i,`beforeMount`);let v=fi(s,g);v&&g.beforeEnter(f),r(f,t,n),((p=m&&m.onVnodeMounted)||v||_)&&U(()=>{p&&ca(p,i,e),v&&g.enter(f),_&&jn(e,null,i,`mounted`)},s)},E=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t{for(let l=c;l{let c=t.el=e.el,{patchFlag:l,dynamicChildren:f,dirs:p}=t;l|=e.patchFlag&16;let m=e.props||d,h=t.props||d,g;if(n&&di(n,!1),(g=h.onVnodeBeforeUpdate)&&ca(g,n,t,e),p&&jn(t,e,n,`beforeUpdate`),n&&di(n,!0),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&u(c,``),f?te(e.dynamicChildren,f,c,n,r,ui(t,i),o):s||ce(e,t,c,null,n,r,ui(t,i),o,!1),l>0){if(l&16)ne(c,m,h,n,i);else if(l&2&&m.class!==h.class&&a(c,`class`,null,h.class,i),l&4&&a(c,`style`,m.style,h.style,i),l&8){let e=t.dynamicProps;for(let t=0;t{g&&ca(g,n,t,e),p&&jn(t,e,n,`updated`)},r)},te=(e,t,n,r,i,a,o)=>{for(let s=0;s{if(t!==n){if(t!==d)for(let o in t)!oe(o)&&!(o in n)&&a(e,o,t[o],null,i,r);for(let o in n){if(oe(o))continue;let s=n[o],c=t[o];s!==c&&o!==`value`&&a(e,o,c,s,i,r)}`value`in n&&a(e,`value`,t.value,n.value,i)}},re=(e,t,n,i,a,o,c,l,u)=>{let d=t.el=e?e.el:s(``),f=t.anchor=e?e.anchor:s(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(l=l?l.concat(h):h),e==null?(r(d,n,i),r(f,n,i),D(t.children||[],n,f,a,o,c,l,u)):p>0&&p&64&&m&&e.dynamicChildren?(te(e.dynamicChildren,m,n,a,o,c,l),(t.key!=null||a&&t===a.subTree)&&pi(e,t,!0)):ce(e,t,n,f,a,o,c,l,u)},ie=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):ae(t,n,r,i,a,o,c):O(e,t,c)},ae=(e,t,n,r,i,a,o)=>{let s=e.component=da(e,r,i);if(Kn(e)&&(s.ctx.renderer=xe),ya(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,se,o),!e.el){let r=s.subTree=K(Ri);b(null,r,t,n),e.placeholder=r.el}}else se(s,e,t,n,i,a,o)},O=(e,t,n)=>{let r=t.component=e.component;if(Mi(e,t,n))if(r.asyncDep&&!r.asyncResolved){k(r,t,n);return}else r.next=t,r.update();else t.el=e.el,r.vnode=t},se=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:c,vnode:l}=e;{let n=hi(e);if(n){t&&(t.el=l.el,k(e,t,o)),n.asyncDep.then(()=>{e.isUnmounted||s()});return}}let u=t,d;di(e,!1),t?(t.el=l.el,k(e,t,o)):t=l,n&&fe(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&ca(d,c,t,l),di(e,!0);let f=ki(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el),ve(p),e,i,a),t.el=f.el,u===null&&Pi(e,f.el),r&&U(r,i),(d=t.props&&t.props.onVnodeUpdated)&&U(()=>ca(d,c,t,l),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=Un(t);if(di(e,!1),l&&fe(l),!m&&(o=c&&c.onVnodeBeforeMount)&&ca(o,d,t),di(e,!0),s&&Ce){let t=()=>{e.subTree=ki(e),Ce(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._def.shadowRoot!==!1&&f.ce._injectChildStyle(p);let o=e.subTree=ki(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&U(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;U(()=>ca(o,d,e),i)}(t.shapeFlag&256||d&&Un(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&U(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new Pe(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>bn(u),di(e,!0),l()},k=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,Jr(e,t.props,r,n),si(e,t.children,n),Je(),Cn(e),Ye()},ce=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,d=e?e.shapeFlag:0,f=t.children,{patchFlag:p,shapeFlag:m}=t;if(p>0){if(p&128){ue(l,f,n,r,i,a,o,s,c);return}else if(p&256){le(l,f,n,r,i,a,o,s,c);return}}m&8?(d&16&&_e(l,i,a),f!==l&&u(n,f)):d&16?m&16?ue(l,f,n,r,i,a,o,s,c):_e(l,i,a,!0):(d&8&&u(n,``),m&16&&D(f,n,r,i,a,o,s,c))},le=(e,t,n,r,i,a,o,s,c)=>{e=e||f,t=t||f;let l=e.length,u=t.length,d=Math.min(l,u),p;for(p=0;pu?_e(e,i,a,!0,!1,d):D(t,n,r,i,a,o,s,c,d)},ue=(e,t,n,r,i,a,o,s,c)=>{let l=0,u=t.length,d=e.length-1,p=u-1;for(;l<=d&&l<=p;){let r=e[l],u=t[l]=c?aa(t[l]):ia(t[l]);if(Yi(r,u))v(r,u,n,null,i,a,o,s,c);else break;l++}for(;l<=d&&l<=p;){let r=e[d],l=t[p]=c?aa(t[p]):ia(t[p]);if(Yi(r,l))v(r,l,n,null,i,a,o,s,c);else break;d--,p--}if(l>d){if(l<=p){let e=p+1,d=ep)for(;l<=d;)A(e[l],i,a,!0),l++;else{let m=l,h=l,g=new Map;for(l=h;l<=p;l++){let e=t[l]=c?aa(t[l]):ia(t[l]);e.key!=null&&g.set(e.key,l)}let _,y=0,b=p-h+1,x=!1,S=0,C=Array(b);for(l=0;l=b){A(r,i,a,!0);continue}let u;if(r.key!=null)u=g.get(r.key);else for(_=h;_<=p;_++)if(C[_-h]===0&&Yi(r,t[_])){u=_;break}u===void 0?A(r,i,a,!0):(C[u-h]=l+1,u>=S?S=u:x=!0,v(r,t[u],n,null,i,a,o,s,c),y++)}let w=x?mi(C):f;for(_=w.length-1,l=b-1;l>=0;l--){let e=h+l,d=t[e],f=t[e+1],p=e+1{let{el:s,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){de(e.component.subTree,t,n,a);return}if(d&128){e.suspense.move(t,n,a);return}if(d&64){c.move(e,t,n,xe);return}if(c===W){r(s,t,n);for(let e=0;el.enter(s),o);else{let{leave:a,delayLeave:o,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?i(s):r(s,t,n)},d=()=>{s._isLeaving&&s[Pn](!0),a(s,()=>{u(),c&&c()})};o?o(s,u,d):d()}else r(s,t,n)},A=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p}=e;if(d===-2&&(i=!1),s!=null&&(Je(),zn(s,null,n,e,!0),Ye()),p!=null&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let m=u&1&&f,h=!Un(e),g;if(h&&(g=o&&o.onVnodeBeforeUnmount)&&ca(g,t,e),u&6)he(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}m&&jn(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,xe,r):l&&!l.hasOnce&&(a!==W||d>0&&d&64)?_e(l,t,n,!1,!0):(a===W&&d&384||!i&&u&16)&&_e(c,t,n),r&&pe(e)}(h&&(g=o&&o.onVnodeUnmounted)||m)&&U(()=>{g&&ca(g,t,e),m&&jn(e,null,t,`unmounted`)},n)},pe=e=>{let{type:t,el:n,anchor:r,transition:a}=e;if(t===W){me(n,r);return}if(t===zi){C(e);return}let o=()=>{i(n),a&&!a.persisted&&a.afterLeave&&a.afterLeave()};if(e.shapeFlag&1&&a&&!a.persisted){let{leave:t,delayLeave:r}=a,i=()=>t(n,o);r?r(e.el,o,i):i()}else o()},me=(e,t)=>{let n;for(;e!==t;)n=h(e),i(e),e=n;i(t)},he=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;gi(c),gi(l),r&&fe(r),i.stop(),a&&(a.flags|=8,A(o,e,t,n)),s&&U(s,t),U(()=>{e.isUnmounted=!0},t)},_e=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o{if(e.shapeFlag&6)return ve(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[Mn];return n?h(n):t},ye=!1,be=(e,t,n)=>{e==null?t._vnode&&A(t._vnode,null,null,!0):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e,ye||(ye=!0,Cn(),wn(),ye=!1)},xe={p:v,um:A,m:de,r:pe,mt:ae,mc:D,pc:ce,pbc:te,n:ve,o:e},Se,Ce;return t&&([Se,Ce]=t(xe)),{render:be,hydrate:Se,createApp:Br(be,Se)}}function ui({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 di({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function fi(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function pi(e,t,n=!1){let r=e.children,i=t.children;if(x(r)&&x(i))for(let e=0;e>1,e[n[s]]0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-- >0;)n[a]=o,o=t[o];return n}function hi(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:hi(t)}function gi(e){if(e)for(let t=0;tUr(_i);function yi(e,t){return xi(e,null,t)}function bi(e,t,n){return xi(e,t,n)}function xi(e,t,n=d){let{immediate:r,deep:i,flush:a,once:o}=n,s=_({},n),c=t&&r||!t&&a!==`post`,l;if(va){if(a===`sync`){let e=vi();l=e.__watcherHandles||(e.__watcherHandles=[])}else if(!c){let e=()=>{};return e.stop=p,e.resume=p,e.pause=p,e}}let u=q;s.call=(e,t,n)=>un(e,u,t,n);let f=!1;a===`post`?s.scheduler=e=>{U(e,u&&u.suspense)}:a!==`sync`&&(f=!0,s.scheduler=(e,t)=>{t?e():bn(e)}),s.augmentJob=e=>{t&&(e.flags|=4),f&&(e.flags|=2,u&&(e.id=u.uid,e.i=u))};let m=sn(e,t,s);return va&&(l?l.push(m):c&&m()),m}function Si(e,t,n){let r=this.proxy,i=T(e)?e.includes(`.`)?Ci(r,e):()=>r[e]:e.bind(r,r),a;w(t)?a=t:(a=t.handler,n=t);let o=ha(this),s=xi(i,a.bind(r),n);return o(),s}function Ci(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;et===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${k(t)}Modifiers`]||e[`${le(t)}Modifiers`];function Ti(e,t,...n){if(e.isUnmounted)return;let r=e.vnode.props||d,i=n,a=t.startsWith(`update:`),o=a&&wi(r,t.slice(7));o&&(o.trim&&(i=n.map(e=>T(e)?e.trim():e)),o.number&&(i=n.map(me)));let s,c=r[s=de(t)]||r[s=de(k(t))];!c&&a&&(c=r[s=de(le(t))]),c&&un(c,e,6,i);let l=r[s+`Once`];if(l){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,un(l,e,6,i)}}var Ei=new WeakMap;function Di(e,t,n=!1){let r=n?Ei:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},s=!1;if(!w(e)){let r=e=>{let n=Di(e,t,!0);n&&(s=!0,_(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!s?(D(e)&&r.set(e,null),null):(x(a)?a.forEach(e=>o[e]=null):_(o,a),D(e)&&r.set(e,o),o)}function Oi(e,t){return!e||!h(t)?!1:(t=t.slice(2).replace(/Once$/,``),b(e,t[0].toLowerCase()+t.slice(1))||b(e,le(t))||b(e,t))}function ki(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:o,attrs:s,emit:c,render:l,renderCache:u,props:d,data:f,setupState:p,ctx:m,inheritAttrs:h}=e,_=On(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=ia(l.call(t,e,u,d,p,f,m)),y=s}else{let e=t;v=ia(e.length>1?e(d,{attrs:s,slots:o,emit:c}):e(d,null)),y=t.props?s:Ai(s)}}catch(t){Bi.length=0,dn(t,e,1),v=K(Ri)}let b=v;if(y&&h!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(g)&&(y=ji(y,a)),b=ta(b,y,!1,!0))}return n.dirs&&(b=ta(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&Fn(b,n.transition),v=b,On(_),v}var Ai=e=>{let t;for(let n in e)(n===`class`||n===`style`||h(n))&&((t||(t={}))[n]=e[n]);return t},ji=(e,t)=>{let n={};for(let r in e)(!g(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Mi(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?Ni(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;te.__isSuspense;function Ii(e,t){t&&t.pendingBranch?x(e)?t.effects.push(...e):t.effects.push(e):Sn(e)}var W=Symbol.for(`v-fgt`),Li=Symbol.for(`v-txt`),Ri=Symbol.for(`v-cmt`),zi=Symbol.for(`v-stc`),Bi=[],G=null;function Vi(e=!1){Bi.push(G=e?null:[])}function Hi(){Bi.pop(),G=Bi[Bi.length-1]||null}var Ui=1;function Wi(e,t=!1){Ui+=e,e<0&&G&&t&&(G.hasOnce=!0)}function Gi(e){return e.dynamicChildren=Ui>0?G||f:null,Hi(),Ui>0&&G&&G.push(e),e}function Ki(e,t,n,r,i,a){return Gi(Qi(e,t,n,r,i,a,!0))}function qi(e,t,n,r,i){return Gi(K(e,t,n,r,i,!0))}function Ji(e){return e?e.__v_isVNode===!0:!1}function Yi(e,t){return e.type===t.type&&e.key===t.key}var Xi=({key:e})=>e??null,Zi=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:T(e)||R(e)||w(e)?{i:V,r:e,k:t,f:!!n}:e);function Qi(e,t=null,n=null,r=0,i=null,a=e===W?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Xi(t),ref:t&&Zi(t),scopeId:Dn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:V};return s?(oa(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=T(n)?8:16),Ui>0&&!o&&G&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&G.push(c),c}var K=$i;function $i(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===dr)&&(e=Ri),Ji(e)){let r=ta(e,t,!0);return n&&oa(r,n),Ui>0&&!a&&G&&(r.shapeFlag&6?G[G.indexOf(e)]=r:G.push(r)),r.patchFlag=-2,r}if(ka(e)&&(e=e.__vccOpts),t){t=ea(t);let{class:e,style:n}=t;e&&!T(e)&&(t.class=Se(e)),D(n)&&(Gt(n)&&!x(n)&&(n=_({},n)),t.style=_e(n))}let o=T(e)?1:Fi(e)?128:Nn(e)?64:D(e)?4:w(e)?2:0;return Qi(e,t,n,r,i,o,a,!0)}function ea(e){return e?Gt(e)||Kr(e)?_({},e):e:null}function ta(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?sa(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Xi(l),ref:t&&t.ref?n&&a?x(a)?a.concat(Zi(t)):[a,Zi(t)]:Zi(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==W?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&&ta(e.ssContent),ssFallback:e.ssFallback&&ta(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&Fn(u,c.clone(u)),u}function na(e=` `,t=0){return K(Li,null,e,t)}function ra(e=``,t=!1){return t?(Vi(),qi(Ri,null,e)):K(Ri,null,e)}function ia(e){return e==null||typeof e==`boolean`?K(Ri):x(e)?K(W,null,e.slice()):Ji(e)?aa(e):K(Li,null,String(e))}function aa(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ta(e)}function oa(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(x(t))n=16;else if(typeof t==`object`)if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),oa(e,n()),n._c&&(n._d=!0));return}else{n=32;let r=t._;!r&&!Kr(t)?t._ctx=V:r===3&&V&&(V.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else w(t)?(t={default:t,_ctx:V},n=32):(t=String(t),r&64?(n=16,t=[na(t)]):n=8);e.children=t,e.shapeFlag|=n}function sa(...e){let t={};for(let n=0;nq||V,pa,ma;{let e=ge(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};pa=t(`__VUE_INSTANCE_SETTERS__`,e=>q=e),ma=t(`__VUE_SSR_SETTERS__`,e=>va=e)}var ha=e=>{let t=q;return pa(e),e.scope.on(),()=>{e.scope.off(),pa(t)}},ga=()=>{q&&q.scope.off(),pa(null)};function _a(e){return e.vnode.shapeFlag&4}var va=!1;function ya(e,t=!1,n=!1){t&&ma(t);let{props:r,children:i}=e.vnode,a=_a(e);qr(e,r,a,t),oi(e,i,n||t);let o=a?ba(e,t):void 0;return t&&ma(!1),o}function ba(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Sr);let{setup:r}=n;if(r){Je();let n=e.setupContext=r.length>1?Ea(e):null,i=ha(e),a=ln(r,e,0,[e.props,n]),o=ee(a);if(Ye(),i(),(o||e.sp)&&!Un(e)&&Ln(e),o){if(a.then(ga,ga),t)return a.then(n=>{xa(e,n,t)}).catch(t=>{dn(t,e,0)});e.asyncDep=a}else xa(e,a,t)}else wa(e,t)}function xa(e,t,n){w(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:D(t)&&(e.setupState=$t(t)),wa(e,n)}var Sa,Ca;function wa(e,t,n){let r=e.type;if(!e.render){if(!t&&Sa&&!r.render){let t=r.template||kr(e).template;if(t){let{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:o}=r;r.render=Sa(t,_(_({isCustomElement:n,delimiters:a},i),o))}}e.render=r.render||p,Ca&&Ca(e)}{let t=ha(e);Je();try{Tr(e)}finally{Ye(),t()}}}var Ta={get(e,t){return P(e,`get`,``),e[t]}};function Ea(e){return{attrs:new Proxy(e.attrs,Ta),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function Da(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy($t(Kt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in br)return br[n](e)},has(e,t){return t in e||t in br}})):e.proxy}function Oa(e,t=!0){return w(e)?e.displayName||e.name:e.name||t&&e.__name}function ka(e){return w(e)&&`__vccOpts`in e}var Aa=(e,t)=>tn(e,t,va);function ja(e,t,n){try{Wi(-1);let r=arguments.length;return r===2?D(t)&&!x(t)?Ji(t)?K(e,null,[t]):K(e,t):K(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Ji(n)&&(n=[n]),K(e,t,n))}finally{Wi(1)}}var Ma=`3.5.24`,Na=o(((e,t)=>{var n=typeof Reflect==`object`?Reflect:null,r=n&&typeof n.apply==`function`?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},i=n&&typeof n.ownKeys==`function`?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};function a(e){console&&console.warn&&console.warn(e)}var o=Number.isNaN||function(e){return e!==e};function s(){s.init.call(this)}t.exports=s,t.exports.once=y,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function l(e){if(typeof e!=`function`)throw TypeError(`The "listener" argument must be of type Function. Received type `+typeof e)}Object.defineProperty(s,`defaultMaxListeners`,{enumerable:!0,get:function(){return c},set:function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received `+e+`.`);c=e}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "n" is out of range. It must be a non-negative number. Received `+e+`.`);return this._maxListeners=e,this};function u(e){return e._maxListeners===void 0?s.defaultMaxListeners:e._maxListeners}s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],n=1;n0&&(o=t[0]),o instanceof Error)throw o;var s=Error(`Unhandled error.`+(o?` (`+o.message+`)`:``));throw s.context=o,s}var c=a[e];if(c===void 0)return!1;if(typeof c==`function`)r(c,this,t);else for(var l=c.length,u=g(c,l),n=0;n0&&s.length>i&&!s.warned){s.warned=!0;var c=Error(`Possible EventEmitter memory leak detected. `+s.length+` `+String(t)+` listeners added. Use emitter.setMaxListeners() to increase limit`);c.name=`MaxListenersExceededWarning`,c.emitter=e,c.type=t,c.count=s.length,a(c)}return e}s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)};function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}s.prototype.once=function(e,t){return l(t),this.on(e,p(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,p(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,a,o;if(l(t),r=this._events,r===void 0||(n=r[e],n===void 0))return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit(`removeListener`,e,n.listener||t));else if(typeof n!=`function`){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():_(n,i),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit(`removeListener`,e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n=this._events,r;if(n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var i=Object.keys(n),a;for(r=0;r=0;r--)this.removeListener(e,t[r]);return this};function m(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i==`function`?n?[i.listener||i]:[i]:n?v(i):g(i,i.length)}s.prototype.listeners=function(e){return m(this,e,!0)},s.prototype.rawListeners=function(e){return m(this,e,!1)},s.listenerCount=function(e,t){return typeof e.listenerCount==`function`?e.listenerCount(t):h.call(e,t)},s.prototype.listenerCount=h;function h(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n==`function`)return 1;if(n!==void 0)return n.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};function g(e,t){for(var n=Array(t),r=0;r0){if(++t>=No)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Lo(e){return function(){return e}}var Ro=function(){try{var e=Eo(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),zo=Io(Ro?function(e,t){return Ro(e,`toString`,{configurable:!0,enumerable:!1,value:Lo(t),writable:!0})}:ao);function Bo(e,t){for(var n=-1,r=e==null?0:e.length;++n-1}var Ko=9007199254740991,qo=/^(?:0|[1-9]\d*)$/;function Jo(e,t){var n=typeof e;return t=t??Ko,!!t&&(n==`number`||n!=`symbol`&&qo.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=rs}function as(e){return e!=null&&is(e.length)&&!uo(e)}var os=Object.prototype;function ss(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||os)}function cs(e,t){for(var n=-1,r=Array(e);++n-1}function kc(e,t){var n=this.__data__,r=wc(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Ac(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0&&n(s)?t>1?el(s,t-1,n,r,i):Zc(i,s):r||(i[i.length]=s)}return i}var tl=ec(Object.getPrototypeOf,Object);function nl(){this.__data__=new Ac,this.size=0}function rl(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function il(e){return this.__data__.get(e)}function al(e){return this.__data__.has(e)}var ol=200;function sl(e,t){var n=this.__data__;if(n instanceof Ac){var r=n.__data__;if(!jc||r.length=Ed){var l=t?null:Td(e);if(l)return fd(l);o=!1,i=dd,c=new ud}else c=t?[]:s;outer:for(;++re.useInEditor)?.data||this.getDefaultData(),t=X(this.mockData);else if(typeof e.useMock==`boolean`&&e.useMock)this.mockData=X(e.schema.mocks||[]).find(e=>e.enable)?.data,t=X(this.mockData)||this.getDefaultData();else if(!e.initialData)t=this.getDefaultData();else{Rd(Hd,this,new n(e.initialData??{})),this.isInit=!0;return}Rd(Hd,this,new n(t??{}))}get id(){return Q(Bd,this)}get type(){return Q(zd,this)}get schema(){return Q(Vd,this)}get fields(){return Q(Ud,this)}get methods(){return Q(Wd,this)}setFields(e){Rd(Ud,this,e)}setMethods(e){Rd(Wd,this,e)}get data(){return Q(Hd,this).getData(``)}setData(e,t){Q(Hd,this).update(e,t);let n={updateData:e,path:t};this.emit(`change`,n)}setValue(e,t){return this.setData(t,e)}onDataChange(e,t,n){Q(Hd,this).on(e,t,n)}offDataChange(e,t){Q(Hd,this).off(e,t)}getDefaultData(){return Hf(Q(Ud,this))}async init(){this.isInit=!0}destroy(){Rd(Ud,this,[]),this.removeAllListeners(),Q(Hd,this).destroy()}},Kd=e=>Object.entries(e).reduce((e,[t,n])=>{let r=n;return typeof n==`object`&&(r=JSON.stringify(n)),n===void 0?e:`${e}${e?`&`:``}${globalThis.encodeURIComponent(t)}=${globalThis.encodeURIComponent(`${r}`)}`},``),qd=async e=>{let{url:t,method:n=`GET`,headers:r={},params:i={},data:a={},...o}=e,s=Kd(i),c=JSON.stringify(a);return r[`Content-Type`]?.includes(`application/x-www-form-urlencoded`)&&(c=Kd(a)),(await globalThis.fetch(s?`${t}?${s}`:t,{method:n,headers:r,body:n===`GET`?void 0:c,...o})).json()},Jd=new WeakMap,Yd=new WeakMap,Xd=new WeakMap,Zd=new WeakMap,Qd=class extends Gd{constructor(e){let{options:t}=e.schema;super(e),Z(this,`isLoading`,!1),Z(this,`error`,void 0),Z(this,`httpOptions`,void 0),Id(this,Jd,void 0),Id(this,Yd,[]),Id(this,Xd,[]),Id(this,Zd,`http`),this.httpOptions=t,typeof e.request==`function`?Rd(Jd,this,e.request):typeof globalThis.fetch==`function`&&Rd(Jd,this,qd),this.methods.forEach(e=>{typeof e.content==`function`&&(e.timing===`beforeRequest`&&Q(Yd,this).push(e.content),e.timing===`afterRequest`&&Q(Xd,this).push(e.content))})}get type(){return Q(Zd,this)}async init(){this.schema.autoFetch&&await this.request(),super.init()}async request(e={}){this.isLoading=!0;let{url:t,params:n,data:r,headers:i,...a}=this.httpOptions,o={url:typeof t==`function`?t({app:this.app,dataSource:this}):t,params:typeof n==`function`?n({app:this.app,dataSource:this}):n,data:typeof r==`function`?r({app:this.app,dataSource:this}):r,headers:typeof i==`function`?i({app:this.app,dataSource:this}):i,...a,...e};try{for(let e of Q(Yd,this))await e({options:o,params:{},dataSource:this,app:this.app});if(typeof this.schema.beforeRequest==`function`&&(o=await this.schema.beforeRequest(o,{app:this.app,dataSource:this})),this.mockData)this.setData(this.mockData);else{let e=await Q(Jd,this)?.call(this,o);for(let t of Q(Xd,this))await t({res:e,options:o,params:{},dataSource:this,app:this.app});if(typeof this.schema.afterResponse==`function`&&(e=await this.schema.afterResponse(e,{app:this.app,dataSource:this,options:o})),this.schema.responseOptions?.dataPath){let t=jf(this.schema.responseOptions.dataPath,e);this.setData(t)}else this.setData(e)}this.error=void 0}catch(e){this.error={msg:e.message},this.emit(`error`,e)}this.isLoading=!1}get(e){return this.request({...e,method:`GET`})}post(e){return this.request({...e,method:`POST`})}},$d=new Map,ef=(e,t,n)=>{let r;if(n){let n=[];t.forEach(e=>{Kf(e,e=>{n.push(e.id)})}),r=`${e.id}:${n.join(`:`)}`}else r=`${e.id}:${t.map(e=>e.id).join(`:`)}`;if($d.has(r))return $d.get(r);let i=new mp;i.addTarget(new op({id:e.id,type:`data-source`,isTarget:(t,n)=>`${t}`.includes(`__tmagic__`)?!1:dp(e,t,n,!0)})),i.addTarget(new op({id:e.id,type:`cond`,isTarget:(t,n)=>fp(e,t,n,!0)})),i.collect(t,{},!0);let{deps:a}=i.getTarget(e.id,`data-source`),{deps:o}=i.getTarget(e.id,`cond`),s={deps:a,condDeps:o};return $d.set(r,s),s},tf=(e,t)=>{let n=!0;for(let{op:r,value:i,range:a,field:o}of e){let[e,...s]=o,c=t[e];if(!c||!s.length)break;try{if(!Vf(r,jf(s.join(`.`),c),i,a)){n=!1;break}}catch(e){console.warn(e)}}return n},nf=(e,t)=>{if(!e.displayConds||!Array.isArray(e.displayConds)||!e.displayConds.length)return!0;for(let{cond:n}of e[hf])if(n&&tf(n,t))return!0;return!1},rf=(e,t)=>{if(Df(e)||Of(e)){let n=t.items?.findIndex(t=>t.id===e.id);t.items.splice(n,1,e)}else If(e,t.items)},af=(e,t,n=[],r={})=>{let i={...r,[t]:{}},a=X(r[t]),o=i[t];return n.forEach((t,r)=>{if(Object.assign(o,a),r===n.length-1){o[t]=e;return}Array.isArray(a[t])&&(a[t]={},o[t]={}),a=a[t],o=o[t]}),i},of=(e,t)=>{let[n,...r]=e,i=n.indexOf(Uf);if(i>-1){let a=t[n.substring(i+Uf.length)];if(!a)return e;try{return jf(r.join(`.`),a)}catch{return e}}return e},sf=(e,t)=>e.replace(Wf,(e,n)=>{try{return jf(n,t)}catch{return e}}),cf=(e,t)=>typeof e==`string`?sf(e,t):e?.isBindDataSource&&e.dataSourceId?t[e.dataSourceId]:e?.isBindDataSourceField&&e.dataSourceId&&typeof e.template==`string`?sf(e.template,t[e.dataSourceId]):Array.isArray(e)&&typeof e[0]==`string`?of(e,t):e,lf=({compile:e,dsId:t,item:n,deps:r,condDeps:i,inEditor:a,ctxData:o})=>{let{items:s,...c}=n,l=X(c);return i[c.id]?.keys.length&&!a&&(l.condResult=nf(c,o)),Array.isArray(s)&&s.length?l.items=s.map(n=>lf({compile:e,dsId:t,item:n,deps:r,condDeps:i,inEditor:a,ctxData:o})):s&&(l.items=s),r[l.id]?.keys.length?Bf(e,l,{[t]:r},t):l},uf=async(e,t)=>{let{dataSourceMethodsDeps:n={},dataSourceCondDeps:r={},dataSourceDeps:i={},dataSources:a=[]}=e,o={};a.forEach(e=>{let a=r[e.id]||{};Object.keys(a).length||(a=i[e.id]||{}),Object.keys(a).length||(a=n[e.id]||{}),Object.keys(a).length&&t[e.type]&&(o[e.type]=t[e.type])});let s=await Promise.all(Object.values(o).map(e=>e())),c={};return s.forEach((e,t)=>{let n=Object.keys(o)[t];c[n]=e.default}),c},df=class e extends Nd.default{static register(t,n){e.dataSourceClassMap.set(t,n),e.waitInitSchemaList?.forEach((e,n)=>{let r=e[t]||[];for(let e=r.shift();e;e=r.shift()){let t=n.addDataSource(e);t&&n.init(t)}})}static getDataSourceClass(t){return e.dataSourceClassMap.get(t)}static clearDataSourceClass(){e.dataSourceClassMap.clear(),e.dataSourceClassMap.set(`base`,Gd),e.dataSourceClassMap.set(`http`,Qd)}static registerObservedData(t){e.ObservedDataClass=t}constructor({app:t,useMock:n,initialData:r}){super(),Z(this,`app`,void 0),Z(this,`dataSourceMap`,new Map),Z(this,`data`,{}),Z(this,`initialData`,{}),Z(this,`useMock`,!1),e.waitInitSchemaList.set(this,{}),this.app=t,this.useMock=n,r&&(this.initialData=r,this.data={...r}),t.dsl?.dataSources?.forEach(e=>{this.addDataSource(e)}),this.isAllDataSourceRegistered()?this.callDsInit():this.on(`registered-all`,()=>{this.callDsInit()})}async init(e){if(!e.isInit&&!(this.app.jsEngine&&e.schema.disabledInitInJsEngine?.includes(this.app.jsEngine))){for(let t of e.methods){if(typeof t.content!=`function`)return;t.timing===`beforeInit`&&await t.content({params:{},dataSource:e,app:this.app})}await e.init();for(let t of e.methods){if(typeof t.content!=`function`)return;t.timing===`afterInit`&&await t.content({params:{},dataSource:e,app:this.app})}}}get(e){return this.dataSourceMap.get(e)}addDataSource(t){if(!t)return;let n=e.dataSourceClassMap.get(t.type);if(!n){let n=e.waitInitSchemaList.get(this);n||(n={},e.waitInitSchemaList.set(this,n)),n[t.type]?n[t.type].push(t):n[t.type]=[t],this.data[t.id]=this.initialData[t.id]??Hf(t.fields);return}let r=new n({app:this.app,schema:t,request:this.app.request,useMock:this.useMock,initialData:this.initialData[t.id],ObservedDataClass:e.ObservedDataClass});return this.dataSourceMap.set(t.id,r),this.data[r.id]=r.data,r.on(`change`,e=>{this.setData(r,e)}),this.isAllDataSourceRegistered()&&this.emit(`registered-all`),r}setData(e,t){this.data[e.id]=e.data,this.emit(`change`,e.id,t)}removeDataSource(e){this.get(e)?.destroy(),delete this.data[e],this.dataSourceMap.delete(e)}updateSchema(e){for(let t of e){if(!this.get(t.id))return;this.removeDataSource(t.id)}for(let t of e){this.addDataSource(X(t));let e=this.get(t.id);e&&this.init(e)}}compiledNode(e,t,n=!1){if(e._tmagic_node_disabled_data_source)return e;let{items:r,...i}=e,a=X(i);return r&&(a.items=Array.isArray(r)&&n?r.map(e=>this.compiledNode(e,t,n)):r),i.condResult===!1||i.condResult===void 0&&i.displayCondsResultReverse?a:Bf(e=>cf(e,this.data),a,this.app.dsl?.dataSourceDeps||{},t)}compliedConds(e,t=this.data){if(e._tmagic_node_disabled_data_source)return!0;let n=nf(e,t);return e.displayCondsResultReverse?!n:n}compliedIteratorItemConds(e,t,n=[]){let[r,...i]=n,a=this.get(r);if(!a)return!0;let o=af(e,a.id,i,this.data);return this.compliedConds(t,o)}compliedIteratorItems(e,t,n=[]){let[r,...i]=n,a=this.get(r);if(!a)return t;let o=this.app.platform===`editor`,s=af(e,a.id,i,this.data),{deps:c={},condDeps:l={}}=ef(a.schema,t,o);return!Object.keys(c).length&&!Object.keys(l).length?t:t.map(e=>lf({compile:e=>cf(e,s),dsId:a.id,item:e,deps:c,condDeps:l,inEditor:o,ctxData:s}))}isAllDataSourceRegistered(){return!this.app.dsl?.dataSources?.length||this.dataSourceMap.size===this.app.dsl.dataSources.length}destroy(){this.removeAllListeners(),this.data={},this.initialData={},this.dataSourceMap.forEach(e=>{e.destroy()}),this.dataSourceMap.clear(),e.waitInitSchemaList.delete(this)}onDataChange(e,t,n,r){return this.get(e)?.onDataChange(t,n,r)}offDataChange(e,t,n){return this.get(e)?.offDataChange(t,n)}callDsInit(){let e=Array.from(this.dataSourceMap);typeof Promise.allSettled==`function`?Promise.allSettled(e.map(([,e])=>this.init(e))).then(t=>{let n={},r={};t.forEach((t,i)=>{let a=e[i][0];t.status===`fulfilled`?this.data[a]?n[a]=this.data[a]:delete n[a]:t.status===`rejected`&&(delete n[a],r[a]=t.reason)}),this.emit(`init`,n,r)}):Promise.all(e.map(([,e])=>this.init(e))).then(()=>{this.emit(`init`,this.data)}).catch(()=>{this.emit(`init`,this.data)})}};Z(df,`dataSourceClassMap`,new Map([[`base`,Gd],[`http`,Qd]])),Z(df,`ObservedDataClass`,Pd),Z(df,`waitInitSchemaList`,new Map);var ff=(e,t,n)=>{let{dsl:r,platform:i}=e;if(!r?.dataSources)return;let a=new df({app:e,useMock:t,initialData:n});return r.dataSources&&r.dataSourceCondDeps&&i!==`editor`&&Nf(Ff(r.dataSourceCondDeps),r.items).forEach(e=>{e.condResult=a.compliedConds(e),rf(e,r)}),r.dataSources&&r.dataSourceDeps&&Nf(Ff(r.dataSourceDeps),r.items).forEach(e=>{rf(a.compiledNode(e),r)}),e.jsEngine===`nodejs`||a.on(`change`,(t,n)=>{let i=r.dataSourceDeps?.[t]||{},o=r.dataSourceCondDeps?.[t]||{},s=Od([...Object.keys(o),...Object.keys(i)]);for(let i of r.items)if(e.platform===`editor`||Df(i)&&i.id===e.page?.data.id||Of(i)){let r=Nf(s,[i]).map(t=>{e.platform!==`editor`&&(t.condResult=a.compliedConds(t));let n=a.compiledNode(t);if(typeof e.page?.setData==`function`){Df(n)?e.page.setData(n):i.id===e.page.data.id&&!e.page.instance&&If(n,[e.page.data]),e.getNode(t.id,{strict:!0})?.setData(n);for(let[,t]of e.pageFragments)t.data.id===n.id?t.setData(X(n)):t.data.id===i.id&&(t.getNode(n.id,{strict:!0})?.setData(X(n)),t.instance||If(X(n),[t.data]))}return n});r.length&&a.emit(`update-data`,r,t,n,i.id)}}),a},pf=class{constructor(e=globalThis.navigator?.userAgent??``,t={}){Z(this,`isIos`,!1),Z(this,`isIphone`,!1),Z(this,`isIpad`,!1),Z(this,`isAndroid`,!1),Z(this,`isAndroidPad`,!1),Z(this,`isMac`,!1),Z(this,`isWin`,!1),Z(this,`isMqq`,!1),Z(this,`isWechat`,!1),Z(this,`isWeb`,!1),Z(this,`isOpenHarmony`,!1),e&&(this.isIphone=e.indexOf(`iPhone`)>=0,this.isIpad=/(iPad).*OS\s([\d_]+)/.test(e),this.isIos=this.isIphone||this.isIpad,this.isAndroid=e.indexOf(`Android`)>=0,this.isAndroidPad=this.isAndroid&&e.indexOf(`Mobile`)<0,this.isMac=e.indexOf(`Macintosh`)>=0,this.isWin=e.indexOf(`Windows`)>=0,this.isMqq=/QQ\/([\d.]+)/.test(e),this.isWechat=e.indexOf(`MicroMessenger`)>=0&&e.indexOf(`wxwork`)<0,this.isOpenHarmony=e.includes(`OpenHarmony`),this.isWeb=!this.isIos&&!this.isAndroid&&!this.isOpenHarmony&&!/(WebOS|BlackBerry)/.test(e),Object.entries(t).forEach(([e,t])=>{this[e]=t}))}},mf=function(e){return e.CONTAINER=`container`,e.PAGE=`page`,e.ROOT=`app`,e.PAGE_FRAGMENT=`page-fragment`,e}({}),hf=`displayConds`,gf=`displayCondsResultReverse`,_f=function(e){return e.COMP=`comp`,e.CODE=`code`,e.DATA_SOURCE=`data-source`,e}({}),vf=function(e){return e.CODE=`code`,e}({}),yf=function(e){return e.CODE=`code`,e.DATA_SOURCE_METHOD=`data-source-method`,e}({}),bf=(()=>{let e=new Map;return(t,n,r=globalThis.document)=>{let i=e.get(r);if(i||(i=new Map,e.set(r,i)),i.get(t))return i.get(t);let a=new Promise((e,i)=>{let a=r.createElement(`script`);a.type=`text/javascript`,n&&(a.crossOrigin=n),a.src=t,r.body.appendChild(a),a.onload=()=>{e()},a.onerror=()=>{i(Error(`加载失败`))},setTimeout(()=>{i(Error(`timeout`))},60*1e3)}).catch(e=>{throw i.delete(t),e});return i.set(t,a),i.get(t)}})(),xf=(()=>{let e=new Map;return(t,n=globalThis.document)=>{let r=e.get(n);if(r||(r=new Map,e.set(n,r)),r.get(t))return r.get(t);let i=new Promise((e,r)=>{let i=n.createElement(`link`);i.rel=`stylesheet`,i.href=t,n.head.appendChild(i),i.onload=()=>{e()},i.onerror=()=>{r(Error(`加载失败`))},setTimeout(()=>{r(Error(`timeout`))},60*1e3)}).catch(e=>{throw r.delete(t),e});return r.set(t,i),r.get(t)}})(),Sf=(e=``)=>e.replace(/\B([A-Z])/g,`-$1`).toLowerCase(),Cf=(e,t=[])=>{let n=[],r=function(e,t){if(!Array.isArray(t))return null;for(let i=0,a=t.length;ie.replace(//g,`>`).replace(/"/g,`"`).replace(/'/g,`'`),Tf=(e,t)=>{let n=t||location.href,r=RegExp(`[?&#]${e}=([^&#]+)`,`gi`),i=n.match(r),a;return i&&i.length>0?(a=i[i.length-1].split(`=`),a&&a.length>1?wf(a[1]):``):``},Ef=e=>Object.prototype.toString.call(e)===`[object Object]`,Df=e=>e?e.type?.toLowerCase()===mf.PAGE:!1,Of=e=>e?e.type?.toLowerCase()===mf.PAGE_FRAGMENT:!1,kf=e=>typeof e==`number`&&!isNaN(e)||/^(-?\d+)(\.\d+)?$/.test(`${e}`),Af=e=>`${e}`.replace(/\[(\d+)\]/g,`.$1`).split(`.`),jf=(e=``,t={})=>(Array.isArray(e)?e:Af(e)).reduce((n,r)=>{if(Ef(n)||Array.isArray(n)&&/^\d*$/.test(`${r}`))return n[r];throw Error(`${t}中不存在${e}`)},t),Mf=(e,t,n={})=>wd(n,e,t),Nf=(e,t=[])=>{let n=[],r=function(e,t){if(Array.isArray(t))for(let i of t){let t=e.findIndex(e=>`${e}`==`${i.id}`);t>-1&&(e.splice(t,1),n.push(i)),i.items&&r(e,i.items)}};return r(e,t),n},Pf=(e={},t)=>Array.from(Object.values(e).reduce((e,n)=>((n[t]?.keys||[]).forEach(t=>e.add(t)),e),new Set)),Ff=(e={})=>Array.from(Object.values(e).reduce((e,t)=>(Object.keys(t).forEach(t=>{e.add(t)}),e),new Set)),If=(e,t,n)=>{let r=Cf(e.id,t),i=r.pop(),a=r.pop();if(n&&(a=Cf(n,t).pop()),!i){console.warn(`未找到目标节点(${e.id})`);return}if(!a){console.warn(`未找到父节点(${e.id})`);return}let o=a.items?.findIndex(e=>e.id===i.id);a.items.splice(o,1,e)},Lf=`__tmagic__`,Rf=`__tmagic__dslNode`,zf=`tmagic-page-fragment-container-id`,Bf=(e,t,n={},r)=>{let i=[];return i=r?n[r]?.[t.id].keys||[]:Pf(n,t.id),i.forEach(n=>{let r=Af(n),i=r.map((e,t)=>t{switch(typeof t==`string`&&n===void 0&&(n=``),e){case`is`:return t===n;case`not`:return t!==n;case`=`:return t===n;case`!=`:return t!==n;case`>`:return t>n;case`>=`:return t>=n;case`<`:return t1&&t>=r[0]&&t<=r[1];case`not_between`:return r.length<2||tr[1];case`include`:return t?.includes?.(n);case`not_include`:return t===void 0||!t.includes?.(n);default:break}return!1},Hf=e=>{let t={},n={string:void 0,object:{},array:[],boolean:void 0,number:void 0,null:null,any:void 0};return e.forEach(e=>{if(e.defaultValue!==void 0){if(e.type===`array`&&!Array.isArray(e.defaultValue)){t[e.name]=n.array;return}if(e.type===`object`&&!Ef(e.defaultValue)){if(typeof e.defaultValue==`string`){try{t[e.name]=JSON.parse(e.defaultValue)}catch(r){t[e.name]=n.object,console.warn(`defaultValue 解析失败`,e.defaultValue,r)}return}t[e.name]=n.object;return}t[e.name]=X(e.defaultValue);return}if(e.type===`object`){t[e.name]=e.fields?Hf(e.fields):n.object;return}if(e.type){t[e.name]=n[e.type];return}t[e.name]=void 0}),t},Uf=`ds-field::`,Wf=/\$\{([\s\S]+?)\}/g,Gf=e=>e.__tmagic__dslNode===void 0||e.__tmagic__dslNode===!0,Kf=(e,t,n=[],r=!1)=>{r||t(e,n),Array.isArray(e.items)&&e.items.length&&(n.push(e),e.items.forEach(e=>{Kf(e,t,[...n],r)})),r&&t(e,n)},qf=class{constructor(){Z(this,`isAbort`,void 0),this.isAbort=!1}abort(){this.isAbort=!0}reset(){this.isAbort=!1}},Jf=class extends Nd.EventEmitter{constructor({app:e,beforeEventHandler:t,afterEventHandler:n}){super(),Z(this,`app`,void 0),Z(this,`eventQueue`,[]),Z(this,`nodeEventList`,new Map),Z(this,`dataSourceEventList`,new Map),Z(this,`beforeEventHandler`,void 0),Z(this,`afterEventHandler`,void 0),this.beforeEventHandler=t,this.afterEventHandler=n,this.app=e}destroy(){this.removeNodeEvents(),this.removeAllListeners(),this.nodeEventList.clear(),this.dataSourceEventList.clear()}initEvents(){if(this.removeNodeEvents(),this.app.page)for(let[,e]of this.app.page.nodes)this.bindNodeEvents(e);for(let[,e]of this.app.pageFragments)for(let[,t]of e.nodes)this.bindNodeEvents(t)}bindNodeEvents(e){e.events?.forEach((t,n)=>{if(!t.name)return;let r=`${t.name}_${e.data.id}`,i=t.name.split(`.`);i.length>1&&(r=`${i[1]}_${i[0]}`);let a=Symbol(r);e.eventKeys.has(r)?a=e.eventKeys.get(r):e.eventKeys.set(r,a);let o=(t,...r)=>{this.eventHandler(n,e,r)};this.nodeEventList.set(o,a),this.on(a,o)})}removeNodeEvents(){for(let e of Array.from(this.nodeEventList.keys())){let t=this.nodeEventList.get(e);t&&this.off(t,e)}this.nodeEventList.clear()}bindDataSourceEvents(){let e=Array.from(this.app.dataSourceManager?.dataSourceMap.values()||[]);this.removeDataSourceEvents(e);for(let t of e){let e=this.dataSourceEventList.get(t.id)??new Map;for(let n of t.schema.events||[]){let[r,...i]=n.name?.split(`.`)||[];if(!r)return;let a=(...e)=>{this.eventHandler(n,t,e)};e.set(n.name,a),r===`ds-field-changed`?t?.onDataChange(i.join(`.`),a):t.on(r,a)}this.dataSourceEventList.set(t.id,e)}}removeDataSourceEvents(e){if(this.dataSourceEventList.size){for(let t of e){let e=this.dataSourceEventList.get(t.id);if(!e)return;for(let n of Array.from(e.keys())){let[r,...i]=n.split(`.`);r===`ds-field-changed`?t.offDataChange(i.join(`.`),e.get(n)):t.off(r,e.get(n))}}this.dataSourceEventList.clear()}}getEventQueue(){return this.eventQueue}addEventToQueue(e){this.eventQueue.push(e)}async eventHandler(e,t,n){let r=typeof e==`number`?t.events[e]:e;if(typeof this.beforeEventHandler==`function`&&this.beforeEventHandler({eventConfig:r,source:t,args:n}),vd(r,`actions`)){let i=new qf,{actions:a}=r;for(let r=0;r{clearTimeout(this.tid),this.tid=setTimeout(()=>{this.refreshRem(),this.tid=void 0},300)}),Z(this,`pageshowHandler`,e=>{e.persisted&&this.resizeHandler()}),globalThis.document.readyState===`complete`?this.setBodyFontSize():globalThis.document.addEventListener(`DOMContentLoaded`,this.setBodyFontSize,!1),globalThis.addEventListener(`resize`,this.resizeHandler,!1),globalThis.addEventListener(`pageshow`,this.pageshowHandler,!1),e?.designWidth!==void 0&&this.setDesignWidth(e.designWidth)}destroy(){globalThis.document.removeEventListener(`DOMContentLoaded`,this.setBodyFontSize,!1),globalThis.removeEventListener(`resize`,this.resizeHandler,!1),globalThis.removeEventListener(`pageshow`,this.pageshowHandler,!1)}setDesignWidth(e){this.designWidth=e,this.refreshRem()}setBodyFontSize(){globalThis.document.body.style.fontSize=`.12rem`}refreshRem(){let{width:e}=document.documentElement.getBoundingClientRect(),t=e/(this.designWidth/100);globalThis.document.documentElement.style.fontSize=`${t}px`,globalThis.document.documentElement.style.fontSize=`${this.correctRem(t)}px`}correctRem(e){let{document:t}=globalThis,n=t.createElement(`div`);n.style.cssText=`width:1rem;height:0;overflow:hidden;position:absolute;z-index:-1;visibility:hidden;`,t.documentElement.appendChild(n);let r=n.offsetWidth;return t.documentElement.removeChild(n),Math.abs(r-e)>1?e**2/r:e}},Xf=class{constructor({initialData:e={}}={}){Z(this,`data`,void 0),this.data=e}set(e,t){this.data[e]=t}get(e){return this.data[e]}},Zf=class extends Nd.EventEmitter{constructor(e){super(),Z(this,`data`,void 0),Z(this,`style`,void 0),Z(this,`events`,[]),Z(this,`instance`,null),Z(this,`page`,void 0),Z(this,`parent`,void 0),Z(this,`app`,void 0),Z(this,`store`,void 0),Z(this,`eventKeys`,new Map),Z(this,`eventQueue`,[]),this.store=new Xf({initialData:e.app.nodeStoreInitialData?.()||{}}),this.page=e.page,this.parent=e.parent,this.app=e.app,this.setData(e.config),this.listenLifeSafe()}setData(e){this.data=e;let{events:t,style:n}=e;this.events=t||[],this.style=n||{};try{this.instance&&!Object.isFrozen(this.instance)&&Object.getOwnPropertyDescriptor(this.instance,`config`)?.writable!==!1&&!this.instance.__isVue&&(this.instance.config=e)}catch{}this.emit(`update-data`,e)}addEventToQueue(e){this.eventQueue.push(e)}registerMethod(e){if(e){this.instance||(this.instance={});for(let[t,n]of Object.entries(e))typeof n==`function`&&(this.instance[t]=n)}}setInstance(e){this.instance=e}async runHookCode(e,t){if(typeof this.data[e]==`function`){await this.data[e](this);return}let n=this.data[e];if(n?.hookType===vf.CODE)for(let e of n.hookData){let{codeType:n=yf.CODE,codeId:r,params:i={}}=e;n===yf.CODE&&typeof r==`string`?await this.app.runCode(r,t||i,[],void 0,this):n===yf.DATA_SOURCE_METHOD&&Array.isArray(r)&&r.length>1&&await this.app.runDataSourceMethod(r[0],r[1],t||i,[],void 0,this)}}destroy(){this.eventQueue.length=0,this.instance=null,this.events=[],this.style={},this.removeAllListeners()}listenLifeSafe(){this.once(`created`,e=>{this.once(`destroy`,()=>{this.instance=null,this.data._tmagic_node_disabled_code_block!==!0&&this.runHookCode(`destroy`),this.listenLifeSafe()}),e&&this.setInstance(e),this.data._tmagic_node_disabled_code_block!==!0&&this.runHookCode(`created`)}),this.once(`mounted`,e=>{(async()=>{e&&this.setInstance(e);for(let t=this.eventQueue.shift();t;t=this.eventQueue.shift())typeof e[t.method]==`function`&&await e[t.method](t.fromCpt,...t.args);if(this.app.eventHelper){for(let t of this.app.eventHelper.getEventQueue())for(let[,n]of this.app.pageFragments){let r=n.getNode(t.toId,{strict:!0});r&&r===this&&(typeof e[t.method]==`function`&&await e[t.method](t.fromCpt,...t.args),t.handled=!0)}this.app.eventHelper.eventQueue=this.app.eventHelper.getEventQueue().filter(e=>!e.handled)}this.data._tmagic_node_disabled_code_block!==!0&&this.runHookCode(`mounted`)})()})}},Qf=class e extends Zf{constructor(...e){super(...e),Z(this,`nodes`,[])}setData(e){this.resetNodes(),super.setData(e)}resetNodes(){this.nodes?.forEach(e=>{e.forEach(e=>{e.destroy()})}),this.nodes=[]}initNode(t,n,r){if(r.has(t.id)&&r.get(t.id)?.destroy(),t.type&&this.app.iteratorContainerType.has(t.type)){let i=new e({config:t,parent:n,page:this.page,app:this.app});r.set(t.id,i),this.app.eventHelper?.bindNodeEvents(i);return}let i=new Zf({config:t,parent:n,page:this.page,app:this.app});if(this.app.eventHelper?.bindNodeEvents(i),r.set(t.id,i),t.type&&this.app.pageFragmentContainerType.has(t.type)&&t.pageFragmentId){let e=this.app.dsl?.items?.find(e=>e.id===t.pageFragmentId);e&&(t.items=[e])}t.items?.forEach(e=>{this.initNode(e,i,r)})}setNodes(e,t){let n=this.nodes[t]||new Map;e.forEach(e=>{this.initNode(e,this,n)}),this.nodes[t]=n}getNode(e,t){return this.nodes[t]?.get(e)}destroy(){super.destroy(),this.resetNodes()}},$f=class e extends Zf{constructor(e){super(e),Z(this,`nodes`,new Map),this.setNode(e.config.id,this),e.config.items.forEach(e=>{this.initNode(e,this)})}initNode(t,n){if(t.type&&this.app.iteratorContainerType.has(t.type)){this.setNode(t.id,new Qf({config:t,parent:n,page:this,app:this.app}));return}let r=new(t.type&&(ap.nodeClassMap.get(t.type))||Zf)({config:t,parent:n,page:this,app:this.app});if(this.setNode(t.id,r),t.type&&this.app.pageFragmentContainerType.has(t.type)&&t.pageFragmentId){let n=this.app.dsl?.items?.find(e=>e.id===t.pageFragmentId);n&&this.app.pageFragments.set(t.id,new e({config:X(n),app:this.app}))}t.items?.forEach(e=>{this.initNode(e,r)})}getNode(e,{iteratorContainerId:t,iteratorIndex:n,pageFragmentContainerId:r,strict:i}={}){if(this.nodes.has(e))return this.nodes.get(e);if(r)return this.app.pageFragments.get(r)?.getNode(e,{iteratorContainerId:t,iteratorIndex:n,strict:!0});if(Array.isArray(t)&&t.length&&Array.isArray(n)){let r=this.nodes.get(t[0]);for(let e=1,i=t.length;e{e!==this&&e.destroy()}),this.nodes.clear(),super.destroy()}},ep=e=>{if(typeof e!=`string`)return e;let t={};return e.split(`;`).forEach(e=>{if(!e)return;let n=e.split(`:`),r=n.shift(),i=n.join(`:`);r&&(r=r.replace(/^\s*/,``).replace(/\s*$/,``),i=i.replace(/^\s*/,``).replace(/\s*$/,``),r=r.split(`-`).map((e,t)=>t>0?`${e[0].toUpperCase()}${e.substr(1)}`:e).join(``),t[r]=i)}),t},tp=e=>e&&!/^url/.test(e)&&!/^linear-gradient/.test(e)?`url(${e})`:e,np=(e,t)=>{if(!e)return[];let n=Object.entries(e).map(([e,n])=>n.trim()?(e===`rotate`&&kf(n)&&(n=`${n}deg`),t===`hippy`?{[e]:n}:`${e}(${n})`):``);if(t===`hippy`)return n;let r=n.join(` `);return r.trim()?r:`none`},rp=(e,t)=>{if(!e)return{};let n={},r={};n=typeof e==`string`?ep(e):{...e};let i=t===`hippy`,a=[`zIndex`,`opacity`,`fontWeight`];return Object.entries(n).forEach(([e,n])=>{e===`scale`&&!r.transform&&i?r.transform=[{scale:n}]:e===`backgroundImage`&&!i?n&&(r[e]=tp(n)):e===`transform`&&typeof n!=`string`?r[e]=np(n,t):!a.includes(e)&&n&&/^[-]?[0-9]*[.]?[0-9]*$/.test(n)?r[e]=i?n:`${n/100}rem`:r[e]=n}),r},ip=`magic:common:events:`,ap=class e extends Nd.EventEmitter{static registerNode(t,n){e.nodeClassMap.set(t,n)}constructor(e){super(),Z(this,`env`,void 0),Z(this,`dsl`,void 0),Z(this,`codeDsl`,void 0),Z(this,`dataSourceManager`,void 0),Z(this,`page`,void 0),Z(this,`pageFragments`,new Map),Z(this,`useMock`,!1),Z(this,`platform`,`mobile`),Z(this,`jsEngine`,`browser`),Z(this,`components`,new Map),Z(this,`pageFragmentContainerType`,new Set([`page-fragment-container`])),Z(this,`iteratorContainerType`,new Set([`iterator-container`])),Z(this,`request`,void 0),Z(this,`transformStyle`,void 0),Z(this,`eventHelper`,void 0),Z(this,`errorHandler`,void 0),Z(this,`nodeStoreInitialData`,void 0),Z(this,`flexible`,void 0),e.env?this.setEnv(e.env):this.setEnv(e.ua),this.errorHandler=e.errorHandler,this.codeDsl=e.config?.codeBlocks,e.platform&&(this.platform=e.platform),e.jsEngine&&(this.jsEngine=e.jsEngine),e.nodeStoreInitialData&&(this.nodeStoreInitialData=e.nodeStoreInitialData),e.pageFragmentContainerType&&(Array.isArray(e.pageFragmentContainerType)?e.pageFragmentContainerType:[e.pageFragmentContainerType]).forEach(e=>{this.pageFragmentContainerType.add(e)}),e.iteratorContainerType&&(Array.isArray(e.iteratorContainerType)?e.iteratorContainerType:[e.iteratorContainerType]).forEach(e=>{this.iteratorContainerType.add(e)}),typeof e.useMock==`boolean`&&(this.useMock=e.useMock),this.jsEngine===`browser`&&!e.disabledFlexible&&(this.flexible=new Yf({designWidth:e.designWidth})),this.platform!==`editor`&&(this.eventHelper=new Jf({app:this,beforeEventHandler:e.beforeEventHandler,afterEventHandler:e.afterEventHandler})),this.transformStyle=e.transformStyle||(e=>rp(e,this.jsEngine)),e.request&&(this.request=e.request),e.config&&this.setConfig(e.config,e.curPage,e.dataSourceManagerInitialData)}setEnv(e){!e||typeof e==`string`?this.env=new pf(e):this.env=e}setDesignWidth(e){this.flexible?.setDesignWidth(e)}setConfig(e,t,n){this.dsl=e,!t&&e.items.length&&(t=e.items[0].id),this.dataSourceManager&&this.dataSourceManager.destroy(),this.dataSourceManager=ff(this,this.useMock,n),this.codeDsl=e.codeBlocks;let r=t||this.page?.data?.id;super.emit(`dsl-change`,{dsl:e,curPage:r}),this.pageFragments.forEach(e=>{e.destroy()}),this.pageFragments.clear(),this.setPage(r),this.dataSourceManager&&(this.dataSourceManager.isAllDataSourceRegistered()?this.eventHelper?.bindDataSourceEvents():this.dataSourceManager.once(`registered-all`,()=>{this.eventHelper?.bindDataSourceEvents()}))}setPage(e){let t=this.dsl?.items.find(t=>`${t.id}`==`${e}`);if(!t){this.deletePage(),super.emit(`page-change`);return}if(this.page){if(t===this.page.data)return;this.page.destroy()}this.page=new $f({config:t,app:this}),this.eventHelper?.initEvents(),super.emit(`page-change`,this.page)}deletePage(){this.page?.destroy(),this.eventHelper?.removeNodeEvents(),this.page=void 0}getPage(e){if(!e||this.page&&`${this.page.data.id}`==`${e}`)return this.page}getNode(e,t){return this.page?.getNode(e,t)}registerComponent(e,t){this.components.set(e,t)}unregisterComponent(e){this.components.delete(e)}resolveComponent(e){return this.components.get(e)}emit(e,...t){let[n,...r]=t;return this.eventHelper&&n instanceof Zf&&n.data?.id&&n.eventKeys.has(`${String(e)}_${n.data.id}`)?this.eventHelper.emit(n.eventKeys.get(`${String(e)}_${n.data.id}`),n,...r):super.emit(e,...t)}async runCode(e,t,n,r,i){if(!e||Sd(this.codeDsl))return;let a=this.codeDsl?.[e]?.content;if(typeof a==`function`)try{await a({app:this,params:t,eventParams:n,flowState:r,node:i})}catch(a){if(this.errorHandler)this.errorHandler(a,void 0,{type:`run-code`,codeId:e,params:t,eventParams:n,flowState:r,node:i});else throw a}}async runDataSourceMethod(e,t,n,r,i,a){if(!e||!t)return;let o=this.dataSourceManager?.get(e);if(o)try{let e=(o.methods||[]).find(e=>e.name===t);if(e&&typeof e.content==`function`)return await e.content({app:this,params:n,dataSource:o,eventParams:r,flowState:i,node:a});if(typeof o[t]==`function`)return await o[t]()}catch(e){if(this.errorHandler)this.errorHandler(e,o,{type:`data-source-method`,params:n,eventParams:r,flowState:i,node:a});else throw e}}destroy(){this.removeAllListeners(),this.page?.destroy(),this.page=void 0,this.pageFragments.forEach(e=>{e.destroy()}),this.pageFragments.clear(),this.flexible?.destroy(),this.flexible=void 0,this.eventHelper?.destroy(),this.dsl=void 0,this.dataSourceManager?.destroy(),this.dataSourceManager=void 0,this.codeDsl=void 0,this.components.clear(),this.nodeStoreInitialData=void 0}};Z(ap,`nodeClassMap`,new Map);var $=function(e){return e.DEFAULT=`default`,e.CODE_BLOCK=`code-block`,e.DATA_SOURCE=`data-source`,e.DATA_SOURCE_METHOD=`data-source-method`,e.DATA_SOURCE_COND=`data-source-cond`,e}({}),op=class{constructor(e){Z(this,`isTarget`,void 0),Z(this,`id`,void 0),Z(this,`name`,void 0),Z(this,`type`,$.DEFAULT),Z(this,`deps`,{}),Z(this,`isCollectByDefault`,void 0),this.isTarget=e.isTarget,this.id=e.id,this.name=e.name,this.isCollectByDefault=e.isCollectByDefault??!0,e.type&&(this.type=e.type),e.initialDeps&&(this.deps=e.initialDeps)}updateDep({id:e,name:t,key:n,data:r}){let i=this.deps[e]||{name:t,keys:[]};i.name=t,i.data=r,this.deps[e]=i,i.keys.indexOf(n)===-1&&i.keys.push(n)}removeDep(e,t){if(e===void 0){Object.keys(this.deps).forEach(e=>{delete this.deps[e]});return}let n=this.deps[e];if(n)if(t){let r=n.keys.indexOf(t);n.keys.splice(r,1),n.keys.length===0&&delete this.deps[e]}else delete this.deps[e]}hasDep(e,t){return!!this.deps[e]?.keys.find(e=>e===t)}destroy(){this.deps={}}},sp=(e,t)=>{let n=t;return e.some((t,r)=>{let i=n.find(({name:e})=>e===t);return n=i?.fields||[],i?.type===`array`&&/^(?!\d+$).*$/.test(`${e[r+1]}`)&&r{let r=e.match(Wf)||[];if(r.length<=0)return!1;let i=[],a=[];return r.forEach(e=>{let n=Af(e.substring(2,e.length-1)),r=n.shift();!r||r!==t.id||(sp(n,t.fields)?i.push(e):a.push(e))}),n?i.length>0:a.length>0},lp=(e,t)=>e?.isBindDataSourceField&&e.dataSourceId&&e.dataSourceId===t&&typeof e.template==`string`,up=(e,t)=>{if(!Array.isArray(e)||typeof e[0]!=`string`)return!1;let[n]=e,r=n.indexOf(Uf);return r===-1?!1:n.substring(r+Uf.length)===t},dp=(e,t,n,r=!1)=>{if(!n||![`string`,`object`].includes(typeof n)||`${t}`.startsWith(`displayConds`))return!1;if(typeof n==`string`)return cp(n,e,r);if(Ef(n)&&n?.isBindDataSource&&n.dataSourceId&&n.dataSourceId===e.id||lp(n,e.id))return!0;if(up(n,e.id)){let[,...t]=n,i=sp(t,e.fields);return r?i:!i}return!1},fp=(e,t,n,r=!1)=>{if(!Array.isArray(n)||!e)return!1;let[i,...a]=n;if(i!==e.id||!`${t}`.startsWith(`displayConds`))return!1;if(e.fields?.find(e=>e.name===a[0])){let t=sp(a,e.fields);return r?t:!t}return!1},pp=(e,t,n)=>{for(let r of Object.values(e))for(let e of Object.values(r))n&&e.type!==n||t(e)},mp=class{constructor(e){Z(this,`targetsList`,{}),Z(this,`childrenProp`,`items`),Z(this,`idProp`,`id`),Z(this,`nameProp`,`name`),e?.initialTargets&&(this.targetsList=e.initialTargets),e?.childrenProp&&(this.childrenProp=e.childrenProp)}getTargetsList(){return this.targetsList}getTargets(e=$.DEFAULT){return this.targetsList[e]||{}}addTarget(e){let t=this.getTargets(e.type)||{};this.targetsList[e.type]=t,t[e.id]=e}getTarget(e,t=$.DEFAULT){return this.getTargets(t)[e]}hasTarget(e,t=$.DEFAULT){return!!this.getTarget(e,t)}hasSpecifiedTypeTarget(e=$.DEFAULT){return Object.keys(this.getTargets(e)).length>0}removeTarget(e,t=$.DEFAULT){let n=this.getTargets(t);n[e]&&(n[e].destroy(),delete n[e])}removeTargets(e=$.DEFAULT){let t=this.targetsList[e];if(t){for(let e of Object.values(t))e.destroy();delete this.targetsList[e]}}clearTargets(){for(let e of Object.keys(this.targetsList))delete this.targetsList[e]}collect(e,t={},n=!1,r){this.collectByCallback(e,r,({node:e,target:r})=>{this.removeTargetDep(r,e),this.collectItem(e,r,t,n)})}collectByCallback(e,t,n){pp(this.targetsList,r=>{if(!(!t&&!r.isCollectByDefault))for(let t of e)n({node:t,target:r})},t)}clear(e,t){let{targetsList:n}=this;t&&(n={[t]:this.getTargets(t)});let r=[];pp(n,t=>{if(e)for(let n of e)t.removeDep(n[this.idProp]),Array.isArray(n[this.childrenProp])&&n[this.childrenProp].length&&!r.includes(n[this.idProp])&&(r.push(n[this.idProp]),this.clear(n[this.childrenProp]));else t.removeDep()})}clearByType(e,t){this.clear(t,e)}collectItem(e,t,n={},r=!1){let i=[$.DATA_SOURCE,$.DATA_SOURCE_COND,$.DATA_SOURCE_METHOD];if(e._tmagic_node_disabled_data_source&&i.includes(t.type)||e._tmagic_node_disabled_code_block&&t.type===$.CODE_BLOCK)return;let a=(i,o=``)=>{let s=(i,s)=>{let c=i===this.childrenProp,l=o?`${o}.${i}`:i;if(t.isTarget(l,s))t.updateDep({id:e[this.idProp],name:`${e[this.nameProp]||e[this.idProp]}`,data:n,key:l});else if(!c&&Array.isArray(s))for(let e=0,t=s.length;e