@vue-mini/core 1.3.0-alpha.1 → 1.3.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vue-mini.cjs.js +1711 -1814
- package/dist/vue-mini.cjs.prod.js +2 -2
- package/dist/vue-mini.d.ts +2 -2
- package/dist/vue-mini.esm-bundler.js +3 -7
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* vue-mini v1.3.0-
|
|
2
|
+
* vue-mini v1.3.0-beta.1
|
|
3
3
|
* https://github.com/vue-mini/vue-mini
|
|
4
4
|
* (c) 2019-present Yang Mingshan
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
"use strict";function t(t){const e=Object.create(null);for(const s of t.split(","))e[s]=1;return t=>t in e}const e={},s=()=>{},n=Object.assign,i=Object.prototype.hasOwnProperty,o=(t,e)=>i.call(t,e),r=Array.isArray,c=t=>"[object Map]"===_(t),a=t=>"function"==typeof t,u=t=>"symbol"==typeof t,l=t=>null!==t&&"object"==typeof t,h=Object.prototype.toString,_=t=>h.call(t),f=t=>"string"==typeof t&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,d=(t,e)=>!Object.is(t,e);var p=(t=>(t[t.None=0]="None",t[t.Mutable=1]="Mutable",t[t.Watching=2]="Watching",t[t.RecursedCheck=4]="RecursedCheck",t[t.Recursed=8]="Recursed",t[t.Dirty=16]="Dirty",t[t.Pending=32]="Pending",t))(p||{});const E=[];let v,O=0,g=0,S=0,N=0;function b(t){try{return v}finally{v=t}}function R(){++O}function A(){! --O&&N&&P()}function T(t,e){const s=e.depsTail;if(void 0!==s&&s.dep===t)return;const n=void 0!==s?s.nextDep:e.deps;if(void 0!==n&&n.dep===t)return n.version=g,void(e.depsTail=n);const i=t.subsTail;if(void 0!==i&&i.version===g&&i.sub===e)return;const o=e.depsTail=t.subsTail={version:g,dep:t,sub:e,prevDep:s,nextDep:n,prevSub:i,nextSub:void 0};void 0!==n&&(n.prevDep=o),void 0!==s?s.nextDep=o:e.deps=o,void 0!==i?i.nextSub=o:t.subs=o}function y(t,e=t.sub){const s=t.dep,n=t.prevDep,i=t.nextDep,o=t.nextSub,r=t.prevSub;if(void 0!==i?i.prevDep=n:e.depsTail=n,void 0!==n?n.nextDep=i:e.deps=i,void 0!==o?o.prevSub=r:s.subsTail=r,void 0!==r)r.nextSub=o;else if(void 0===(s.subs=o)){let t=s.deps;if(void 0!==t){do{t=y(t,s)}while(void 0!==t);s.flags|=16}}return i}function D(t){let e,s=t.nextSub;t:for(;;){const n=t.sub;let i=n.flags;if(3&i&&(60&i?12&i?4&i?48&i||!L(t,n)?i=0:(n.flags=40|i,i&=1):n.flags=-9&i|32:i=0:n.flags=32|i,2&i&&(E[N++]=n),1&i)){const i=n.subs;if(void 0!==i){t=i,void 0!==i.nextSub&&(e={value:s,prev:e},s=t.nextSub);continue}}if(void 0===(t=s)){for(;void 0!==e;)if(t=e.value,e=e.prev,void 0!==t){s=t.nextSub;continue t}break}s=t.nextSub}}function m(t){return++g,t.depsTail=void 0,t.flags=-57&t.flags|4,b(t)}function x(t,e){v=e;const s=t.depsTail;let n=void 0!==s?s.nextDep:t.deps;for(;void 0!==n;)n=y(n,t);t.flags&=-5}function P(){for(;S<N;){const t=E[S];E[S++]=void 0,t.notify()}S=0,N=0}function w(t,e){let s,n=0;t:for(;;){const i=t.dep,o=i.flags;let r=!1;if(16&e.flags)r=!0;else if(17&~o){if(!(33&~o)){void 0===t.nextSub&&void 0===t.prevSub||(s={value:t,prev:s}),t=i.deps,e=i,++n;continue}}else if(i.update()){const t=i.subs;void 0!==t.nextSub&&I(t),r=!0}if(r||void 0===t.nextDep){for(;n;){--n;const i=e.subs,o=void 0!==i.nextSub;if(o?(t=s.value,s=s.prev):t=i,r){if(e.update()){o&&I(i),e=t.sub;continue}}else e.flags&=-33;if(e=t.sub,void 0!==t.nextDep){t=t.nextDep;continue t}r=!1}return r}t=t.nextDep}}function I(t){do{const e=t.sub,s=t.nextSub,n=e.flags;32==(48&n)&&(e.flags=16|n),t=s}while(void 0!==t)}function L(t,e){let s=e.depsTail;for(;void 0!==s;){if(s===t)return!0;s=s.prevDep}return!1}class H{constructor(t,e){this.map=t,this.key=e,this._subs=void 0,this.subsTail=void 0,this.flags=p.None}get subs(){return this._subs}set subs(t){this._subs=t,void 0===t&&this.map.delete(this.key)}}const C=new WeakMap,M=Symbol(""),U=Symbol(""),j=Symbol("");function k(t,e,s){if(void 0!==v){let e=C.get(t);e||C.set(t,e=new Map);let n=e.get(s);n||e.set(s,n=new H(e,s)),T(n,v)}}function W(t,e,s,n,i,o){const a=C.get(t);if(!a)return;const l=t=>{void 0!==t&&void 0!==t.subs&&(D(t.subs),I(t.subs))};if(R(),"clear"===e)a.forEach(l);else{const i=r(t),o=i&&f(s);if(i&&"length"===s){const t=Number(n);a.forEach((e,s)=>{("length"===s||s===j||!u(s)&&s>=t)&&l(e)})}else switch((void 0!==s||a.has(void 0))&&l(a.get(s)),o&&l(a.get(j)),e){case"add":i?o&&l(a.get("length")):(l(a.get(M)),c(t)&&l(a.get(U)));break;case"delete":i||(l(a.get(M)),c(t)&&l(a.get(U)));break;case"set":c(t)&&l(a.get(M))}}A()}function V(t){const e=xt(t);return e===t?e:(k(e,0,j),Dt(t)?e:e.map(Pt))}function G(t){return k(t=xt(t),0,j),t}function F(t,e){return yt(t)?Tt(t)?wt(Pt(e)):wt(e):Pt(e)}const B={__proto__:null,[Symbol.iterator](){return Q(this,Symbol.iterator,t=>F(this,t))},concat(...t){return V(this).concat(...t.map(t=>r(t)?V(t):t))},entries(){return Q(this,"entries",t=>(t[1]=F(this,t[1]),t))},every(t,e){return X(this,"every",t,e,void 0,arguments)},filter(t,e){return X(this,"filter",t,e,t=>t.map(t=>F(this,t)),arguments)},find(t,e){return X(this,"find",t,e,t=>F(this,t),arguments)},findIndex(t,e){return X(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return X(this,"findLast",t,e,t=>F(this,t),arguments)},findLastIndex(t,e){return X(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return X(this,"forEach",t,e,void 0,arguments)},includes(...t){return z(this,"includes",t)},indexOf(...t){return z(this,"indexOf",t)},join(t){return V(this).join(t)},lastIndexOf(...t){return z(this,"lastIndexOf",t)},map(t,e){return X(this,"map",t,e,void 0,arguments)},pop(){return J(this,"pop")},push(...t){return J(this,"push",t)},reduce(t,...e){return Z(this,"reduce",t,e)},reduceRight(t,...e){return Z(this,"reduceRight",t,e)},shift(){return J(this,"shift")},some(t,e){return X(this,"some",t,e,void 0,arguments)},splice(...t){return J(this,"splice",t)},toReversed(){return V(this).toReversed()},toSorted(t){return V(this).toSorted(t)},toSpliced(...t){return V(this).toSpliced(...t)},unshift(...t){return J(this,"unshift",t)},values(){return Q(this,"values",t=>F(this,t))}};function Q(t,e,s){const n=G(t),i=n[e]();return n===t||Dt(t)||(i._next=i.next,i.next=()=>{const t=i._next();return t.done||(t.value=s(t.value)),t}),i}const Y=Array.prototype;function X(t,e,s,n,i,o){const r=G(t),c=r!==t&&!Dt(t),a=r[e];if(a!==Y[e]){const e=a.apply(t,o);return c?Pt(e):e}let u=s;r!==t&&(c?u=function(e,n){return s.call(this,F(t,e),n,t)}:s.length>2&&(u=function(e,n){return s.call(this,e,n,t)}));const l=a.call(r,u,n);return c&&i?i(l):l}function Z(t,e,s,n){const i=G(t);let o=s;return i!==t&&(Dt(t)?s.length>3&&(o=function(e,n,i){return s.call(this,e,n,i,t)}):o=function(e,n,i){return s.call(this,e,F(t,n),i,t)}),i[e](o,...n)}function z(t,e,s){const n=xt(t);k(n,0,j);const i=n[e](...s);return-1!==i&&!1!==i||!mt(s[0])?i:(s[0]=xt(s[0]),n[e](...s))}function J(t,e,s=[]){R();const n=b(),i=xt(t)[e].apply(t,s);return b(n),A(),i}const K=t("__proto__,__v_isRef,__isVue"),$=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>"arguments"!==t&&"caller"!==t).map(t=>Symbol[t]).filter(u));function q(t){u(t)||(t=String(t));const e=xt(this);return k(e,0,t),e.hasOwnProperty(t)}class tt{constructor(t=!1,e=!1){this._isReadonly=t,this._isShallow=e}get(t,e,s){if("__v_skip"===e)return t.__v_skip;const n=this._isReadonly,i=this._isShallow;if("__v_isReactive"===e)return!n;if("__v_isReadonly"===e)return n;if("__v_isShallow"===e)return i;if("__v_raw"===e)return s===(n?i?gt:Ot:i?vt:Et).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=r(t);if(!n){let t;if(o&&(t=B[e]))return t;if("hasOwnProperty"===e)return q}const c=It(t),a=Reflect.get(t,e,c?t:s);if(c&&"value"!==e)return a;if(u(e)?$.has(e):K(e))return a;if(n||k(t,0,e),i)return a;if(It(a)){const t=o&&f(e)?a:a.value;return n&&l(t)?Rt(t):t}return l(a)?n?Rt(a):Nt(a):a}}class et extends tt{constructor(t=!1){super(!1,t)}set(t,e,s,n){let i=t[e];const c=r(t)&&f(e);if(!this._isShallow){const t=yt(i);if(Dt(s)||yt(s)||(i=xt(i),s=xt(s)),!c&&It(i)&&!It(s))return t||(i.value=s),!0}const a=c?Number(e)<t.length:o(t,e),u=Reflect.set(t,e,s,It(t)?t:n);return t===xt(n)&&(a?d(s,i)&&W(t,"set",e,s):W(t,"add",e,s)),u}deleteProperty(t,e){const s=o(t,e),n=Reflect.deleteProperty(t,e);return n&&s&&W(t,"delete",e,void 0),n}has(t,e){const s=Reflect.has(t,e);return u(e)&&$.has(e)||k(t,0,e),s}ownKeys(t){return k(t,0,r(t)?"length":M),Reflect.ownKeys(t)}}class st extends tt{constructor(t=!1){super(!0,t)}set(t,e){return!0}deleteProperty(t,e){return!0}}const nt=new et,it=new st,ot=new et(!0),rt=new st(!0),ct=t=>t,at=t=>Reflect.getPrototypeOf(t);function ut(t){return function(...e){return"delete"!==t&&("clear"===t?void 0:this)}}function lt(t,e){const s={get(s){const n=this.__v_raw,i=xt(n),o=xt(s);t||(d(s,o)&&k(i,0,s),k(i,0,o));const{has:r}=at(i),c=e?ct:t?wt:Pt;return r.call(i,s)?c(n.get(s)):r.call(i,o)?c(n.get(o)):void(n!==i&&n.get(s))},get size(){const e=this.__v_raw;return!t&&k(xt(e),0,M),e.size},has(e){const s=this.__v_raw,n=xt(s),i=xt(e);return t||(d(e,i)&&k(n,0,e),k(n,0,i)),e===i?s.has(e):s.has(e)||s.has(i)},forEach(s,n){const i=this,o=i.__v_raw,r=xt(o),c=e?ct:t?wt:Pt;return!t&&k(r,0,M),o.forEach((t,e)=>s.call(n,c(t),c(e),i))}};n(s,t?{add:ut("add"),set:ut("set"),delete:ut("delete"),clear:ut("clear")}:{add(t){e||Dt(t)||yt(t)||(t=xt(t));const s=xt(this);return at(s).has.call(s,t)||(s.add(t),W(s,"add",t,t)),this},set(t,s){e||Dt(s)||yt(s)||(s=xt(s));const n=xt(this),{has:i,get:o}=at(n);let r=i.call(n,t);r||(t=xt(t),r=i.call(n,t));const c=o.call(n,t);return n.set(t,s),r?d(s,c)&&W(n,"set",t,s):W(n,"add",t,s),this},delete(t){const e=xt(this),{has:s,get:n}=at(e);let i=s.call(e,t);i||(t=xt(t),i=s.call(e,t)),n&&n.call(e,t);const o=e.delete(t);return i&&W(e,"delete",t,void 0),o},clear(){const t=xt(this),e=0!==t.size,s=t.clear();return e&&W(t,"clear",void 0,void 0),s}});return["keys","values","entries",Symbol.iterator].forEach(n=>{s[n]=function(t,e,s){return function(...n){const i=this.__v_raw,o=xt(i),r=c(o),a="entries"===t||t===Symbol.iterator&&r,u="keys"===t&&r,l=i[t](...n),h=s?ct:e?wt:Pt;return!e&&k(o,0,u?U:M),{next(){const{value:t,done:e}=l.next();return e?{value:t,done:e}:{value:a?[h(t[0]),h(t[1])]:h(t),done:e}},[Symbol.iterator](){return this}}}}(n,t,e)}),s}function ht(t,e){const s=lt(t,e);return(e,n,i)=>"__v_isReactive"===n?!t:"__v_isReadonly"===n?t:"__v_raw"===n?e:Reflect.get(o(s,n)&&n in e?s:e,n,i)}const _t={get:ht(!1,!1)},ft={get:ht(!1,!0)},dt={get:ht(!0,!1)},pt={get:ht(!0,!0)},Et=new WeakMap,vt=new WeakMap,Ot=new WeakMap,gt=new WeakMap;function St(t){return t.__v_skip||!Object.isExtensible(t)?0:function(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((t=>_(t).slice(8,-1))(t))}function Nt(t){return yt(t)?t:At(t,!1,nt,_t,Et)}function bt(t){return At(t,!1,ot,ft,vt)}function Rt(t){return At(t,!0,it,dt,Ot)}function At(t,e,s,n,i){if(!l(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const o=St(t);if(0===o)return t;const r=i.get(t);if(r)return r;const c=new Proxy(t,2===o?n:s);return i.set(t,c),c}function Tt(t){return yt(t)?Tt(t.__v_raw):!(!t||!t.__v_isReactive)}function yt(t){return!(!t||!t.__v_isReadonly)}function Dt(t){return!(!t||!t.__v_isShallow)}function mt(t){return!!t&&!!t.__v_raw}function xt(t){const e=t&&t.__v_raw;return e?xt(e):t}const Pt=t=>l(t)?Nt(t):t,wt=t=>l(t)?Rt(t):t;function It(t){return!!t&&!0===t.__v_isRef}function Lt(t){return Ht(t,Pt)}function Ht(t,e){return It(t)?t:new Ct(t,e)}class Ct{constructor(t,e){this.subs=void 0,this.subsTail=void 0,this.flags=p.Mutable,this.__v_isRef=!0,this.__v_isShallow=!1,this._oldValue=this._rawValue=e?xt(t):t,this._value=e?e(t):t,this._wrap=e,this.__v_isShallow=!e}get dep(){return this}get value(){if(Ut(this),this.flags&p.Dirty&&this.update()){const t=this.subs;void 0!==t&&I(t)}return this._value}set value(t){const e=this._rawValue,s=this.__v_isShallow||Dt(t)||yt(t);if(t=s?t:xt(t),d(t,e)){this.flags|=p.Dirty,this._rawValue=t,this._value=!s&&this._wrap?this._wrap(t):t;const e=this.subs;void 0!==e&&(D(e),O||P())}}update(){return this.flags&=~p.Dirty,d(this._oldValue,this._oldValue=this._rawValue)}}function Mt(t){const e=t.dep;void 0!==e&&void 0!==e.subs&&(D(e.subs),I(e.subs),O||P())}function Ut(t){void 0!==v&&T(t,v)}function jt(t){return It(t)?t.value:t}const kt={get:(t,e,s)=>"__v_raw"===e?t:jt(Reflect.get(t,e,s)),set:(t,e,s,n)=>{const i=t[e];return It(i)&&!It(s)?(i.value=s,!0):Reflect.set(t,e,s,n)}};class Wt{constructor(t){this.subs=void 0,this.subsTail=void 0,this.flags=p.None,this.__v_isRef=!0,this._value=void 0;const{get:e,set:s}=t(()=>Ut(this),()=>Mt(this));this._get=e,this._set=s}get dep(){return this}get value(){return this._value=this._get()}set value(t){this._set(t)}}class Vt{constructor(t,e,s){this._object=t,this._key=e,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._raw=xt(t);let n=!0,i=t;if(!r(t)||!f(String(e)))do{n=!mt(i)||Dt(i)}while(n&&(i=i.__v_raw));this._shallow=n}get value(){let t=this._object[this._key];return this._shallow&&(t=jt(t)),this._value=void 0===t?this._defaultValue:t}set value(t){if(this._shallow&&It(this._raw[this._key])){const e=this._object[this._key];if(It(e))return void(e.value=t)}this._object[this._key]=t}get dep(){return function(t,e){const s=C.get(t);return s&&s.get(e)}(this._raw,this._key)}}class Gt{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 Ft(t,e,s){return new Vt(t,e,s)}const Bt=128,Qt=256;class Yt{constructor(t){this.deps=void 0,this.depsTail=void 0,this.subs=void 0,this.subsTail=void 0,this.flags=p.Watching|p.Dirty,this.cleanups=[],this.cleanupsLength=0,void 0!==t&&(this.fn=t),Zt&&T(this,Zt)}fn(){}get active(){return!(1024&this.flags)}pause(){this.flags|=256}resume(){(this.flags&=-257)&(p.Dirty|p.Pending)&&this.notify()}notify(){256&this.flags||!this.dirty||this.run()}run(){if(!this.active)return this.fn();Xt(this);const t=m(this);try{return this.fn()}finally{x(this,t);const e=this.flags;(e&(128|p.Recursed))==(128|p.Recursed)&&(this.flags=e&~p.Recursed,this.notify())}}stop(){if(!this.active)return;this.flags=1024;let t=this.deps;for(;void 0!==t;)t=y(t,this);const e=this.subs;void 0!==e&&y(e),Xt(this)}get dirty(){const t=this.flags;if(t&p.Dirty)return!0;if(t&p.Pending){if(w(this.deps,this))return this.flags=t|p.Dirty,!0;this.flags=t&~p.Pending}return!1}}function Xt(t){const e=t.cleanupsLength;if(e){for(let s=0;s<e;s++)t.cleanups[s]();t.cleanupsLength=0}}let Zt;class zt{constructor(t=!1){this.deps=void 0,this.depsTail=void 0,this.subs=void 0,this.subsTail=void 0,this.flags=0,this.cleanups=[],this.cleanupsLength=0,!t&&Zt&&T(this,Zt)}get active(){return!(1024&this.flags)}pause(){if(!(256&this.flags)){this.flags|=256;for(let t=this.deps;void 0!==t;t=t.nextDep){const e=t.dep;"pause"in e&&e.pause()}}}resume(){const t=this.flags;if(256&t){this.flags=-257&t;for(let t=this.deps;void 0!==t;t=t.nextDep){const e=t.dep;"resume"in e&&e.resume()}}}run(t){const e=Zt;try{return Zt=this,t()}finally{Zt=e}}stop(){if(!this.active)return;this.flags=1024;let t=this.deps;for(;void 0!==t;){const e=t.dep;"stop"in e?(t=t.nextDep,e.stop()):t=y(t,this)}const e=this.subs;void 0!==e&&y(e),Xt(this)}}function Jt(t){try{return Zt}finally{Zt=t}}class Kt{constructor(t,e){this.fn=t,this.setter=e,this._value=void 0,this.subs=void 0,this.subsTail=void 0,this.deps=void 0,this.depsTail=void 0,this.flags=p.Mutable|p.Dirty,this.__v_isRef=!0,this.__v_isReadonly=!e}get effect(){return this}get dep(){return this}get _dirty(){const t=this.flags;if(t&p.Dirty)return!0;if(t&p.Pending){if(w(this.deps,this))return this.flags=t|p.Dirty,!0;this.flags=t&~p.Pending}return!1}set _dirty(t){t?this.flags|=p.Dirty:this.flags&=~(p.Dirty|p.Pending)}get value(){const t=this.flags;if(t&p.Dirty||t&p.Pending&&w(this.deps,this)){if(this.update()){const t=this.subs;void 0!==t&&I(t)}}else t&p.Pending&&(this.flags=t&~p.Pending);return void 0!==v?T(this,v):void 0!==Zt&&T(this,Zt),this._value}set value(t){this.setter&&this.setter(t)}update(){const t=m(this);try{const t=this._value,e=this.fn(t);return!!d(t,e)&&(this._value=e,!0)}finally{x(this,t)}}}const $t={};let qt;function te(t,e=!1,s=qt){if(s){const{call:e}=s.options;s.cleanups[s.cleanupsLength++]=e?()=>e(t,4):t}}class ee extends Yt{constructor(t,n,i=e){const{deep:o,once:c,call:u}=i;let l,h=!1,_=!1;if(It(t)?(l=()=>t.value,h=Dt(t)):Tt(t)?(l=()=>se(t,o),h=!0):r(t)?(_=!0,h=t.some(t=>Tt(t)||Dt(t)),l=()=>t.map(t=>It(t)?t.value:Tt(t)?se(t,o):a(t)?u?u(t,2):t():void 0)):l=a(t)?n?u?()=>u(t,2):t:()=>{if(this.cleanupsLength){const t=b();try{Xt(this)}finally{b(t)}}const e=qt;qt=this;try{return u?u(t,3,[this.boundCleanup]):t(this.boundCleanup)}finally{qt=e}}:s,n&&o){const t=l,e=!0===o?1/0:o;l=()=>ne(t(),e)}if(super(l),this.cb=n,this.options=i,this.boundCleanup=t=>te(t,!1,this),this.forceTrigger=h,this.isMultiSource=_,c&&n){const t=n;n=(...e)=>{t(...e),this.stop()}}this.cb=n,this.oldValue=_?new Array(t.length).fill($t):$t}run(t=!1){const e=this.oldValue,s=this.oldValue=super.run();if(!this.cb)return;const{immediate:n,deep:i,call:o}=this.options;if((!t||n)&&(i||this.forceTrigger||(this.isMultiSource?s.some((t,s)=>d(t,e[s])):d(s,e)))){Xt(this);const t=qt;qt=this;try{const t=[s,e===$t?void 0:this.isMultiSource&&e[0]===$t?[]:e,this.boundCleanup];o?o(this.cb,3,t):this.cb(...t)}finally{qt=t}}}}function se(t,e){return e?t:Dt(t)||!1===e||0===e?ne(t,1):ne(t)}function ne(t,e=1/0,s){if(e<=0||!l(t)||t.__v_skip)return t;if(((s=s||new Map).get(t)||0)>=e)return t;if(s.set(t,e),e--,It(t))ne(t.value,e,s);else if(r(t))for(let n=0;n<t.length;n++)ne(t[n],e,s);else if("[object Set]"===_(t)||c(t))t.forEach(t=>{ne(t,e,s)});else if((t=>"[object Object]"===_(t))(t)){for(const n in t)ne(t[n],e,s);for(const n of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,n)&&ne(t[n],e,s)}return t}var ie;!function(t){t[t.QUEUED=1]="QUEUED",t[t.ALLOW_RECURSE=2]="ALLOW_RECURSE"}(ie||(ie={}));const oe=[];let re=[],ce=null,ae=null,ue=0,le=0,he=0;const _e=Promise.resolve();function fe(t){de(t,oe,ue)&&(ue++,ae||(ae=_e.then(ve)))}function de(t,e,s){const n=t.flags;return!(n&ie.QUEUED)&&(t.flags=n|ie.QUEUED,e[s]=t,!0)}function pe(t){de(t,re,re.length)}function Ee(){if(re.length){for(ce=re,re=[];he<ce.length;){const t=ce[he++];t.flags&ie.ALLOW_RECURSE&&(t.flags&=~ie.QUEUED);try{t()}finally{t.flags&=~ie.QUEUED}}ce=null,he=0}}function ve(){try{for(;le<ue;){const t=oe[le];oe[le++]=void 0,t.flags&ie.ALLOW_RECURSE&&(t.flags&=~ie.QUEUED);try{t()}finally{t.flags&ie.ALLOW_RECURSE||(t.flags&=~ie.QUEUED)}}}finally{for(;le<ue;)oe[le].flags&=~ie.QUEUED,oe[le++]=void 0;le=0,ue=0,ae=null}}const Oe={},ge=Array.isArray,Se=Object.assign;function Ne(t,e){const s={};return Object.keys(t).forEach(n=>{e.includes(n)||(s[n]=t[n])}),s}function be(t){return Object.prototype.toString.call(t).slice(8,-1)}function Re(t){return"function"==typeof t}function Ae(t){return`__${t}__`}function Te(t,e,s){return De(t,e,s)}class ye extends ee{constructor(t,e,s,n){super(t,e,s),this.flush=n;const i=()=>{this.dirty&&this.run()};e&&(this.flags|=Bt,i.flags|=ie.ALLOW_RECURSE),this.job=i}notify(){if(!(this.flags&Qt)){const t=this.flush,e=this.job;"post"===t?pe(e):"pre"===t?fe(e):e()}}}function De(t,e,s=Oe){const{flush:n="pre"}=s,i=Se({},s),o=new ye(t,e,i,n);e?o.run(!0):"post"===n?pe(o.job):o.run(!0);const r=o.stop.bind(o);return r.pause=o.pause.bind(o),r.resume=o.resume.bind(o),r.stop=r,r}const me=Object.create(null);let xe=null,Pe=null,we=null;function Ie(){return Pe||we}var Le,He,Ce;function Me(t,e){const s=t[e];return function(...t){const n=this[Ae(e)];n&&n.forEach(e=>e(...t)),void 0!==s&&s.call(this,...t)}}function Ue(t){if(function(t){const e=new Set(["undefined","boolean","number","string"]);return null===t||e.has(typeof t)}(t)||Re(t))return t;if(It(t))return Ue(t.value);if(mt(t))return Ue(xt(t));if(ge(t))return t.map(t=>Ue(t));if(function(t){return"Object"===be(t)}(t)){const e={};return Object.keys(t).forEach(s=>{e[s]=Ue(t[s])}),e}throw new TypeError(`${be(t)} value is not supported`)}function je(t,e){var s;null!==(s=e)&&"object"==typeof s&&Te(It(e)?e:()=>e,()=>{this.setData({[t]:Ue(e)},Ee)},{deep:!0})}function ke(t,e){const s=t[e];return function(...t){const n=this[Ae(e)];n&&n.forEach(e=>e(...t)),void 0!==s&&s.call(this,...t)}}!function(t){t.ON_LAUNCH="onLaunch",t.ON_SHOW="onShow",t.ON_HIDE="onHide",t.ON_ERROR="onError",t.ON_PAGE_NOT_FOUND="onPageNotFound",t.ON_UNHANDLED_REJECTION="onUnhandledRejection",t.ON_THEME_CHANGE="onThemeChange"}(Le||(Le={})),function(t){t.ON_LOAD="onLoad",t.ON_SHOW="onShow",t.ON_READY="onReady",t.ON_HIDE="onHide",t.ON_UNLOAD="onUnload",t.ON_ROUTE_DONE="onRouteDone",t.ON_PULL_DOWN_REFRESH="onPullDownRefresh",t.ON_REACH_BOTTOM="onReachBottom",t.ON_PAGE_SCROLL="onPageScroll",t.ON_SHARE_APP_MESSAGE="onShareAppMessage",t.ON_SHARE_TIMELINE="onShareTimeline",t.ON_ADD_TO_FAVORITES="onAddToFavorites",t.ON_RESIZE="onResize",t.ON_TAB_ITEM_TAP="onTabItemTap",t.ON_SAVE_EXIT_STATE="onSaveExitState"}(He||(He={})),function(t){t.ATTACHED="attached",t.READY="ready",t.MOVED="moved",t.DETACHED="detached",t.ERROR="error"}(Ce||(Ce={}));const We={[He.ON_SHOW]:"show",[He.ON_HIDE]:"hide",[He.ON_RESIZE]:"resize",[He.ON_ROUTE_DONE]:"routeDone",[Ce.READY]:He.ON_READY};function Ve(t,e){return Be(e,t.lifetimes[e]||t[e])}function Ge(t,e){return Be(e,t.methods[e])}function Fe(t,e){return Be(e,t.pageLifetimes[We[e]])}function Be(t,e){const s=Ae(t);return function(...t){const n=this[s];n&&n.forEach(e=>e(...t)),void 0!==e&&e.call(this,...t)}}const Qe=us(Le.ON_SHOW),Ye=us(Le.ON_HIDE),Xe=us(Le.ON_ERROR),Ze=us(Le.ON_PAGE_NOT_FOUND),ze=us(Le.ON_UNHANDLED_REJECTION),Je=us(Le.ON_THEME_CHANGE),Ke=ls(He.ON_SHOW),$e=ls(He.ON_HIDE),qe=ls(He.ON_UNLOAD),ts=ls(He.ON_ROUTE_DONE),es=ls(He.ON_PULL_DOWN_REFRESH),ss=ls(He.ON_REACH_BOTTOM),ns=ls(He.ON_RESIZE),is=ls(He.ON_TAB_ITEM_TAP),os=hs(He.ON_LOAD),rs=hs(Ce.MOVED),cs=hs(Ce.DETACHED),as=hs(Ce.ERROR);function us(t){return e=>{xe&&_s(xe,t,e)}}function ls(t){return e=>{const s=Ie();s&&_s(s,t,e)}}function hs(t){return e=>{we&&_s(we,t,e)}}function _s(t,e,s){const n=Ae(e);void 0===t[n]&&(t[n]=[]),t[n].push(s)}exports.EffectScope=zt,exports.ReactiveEffect=Yt,exports.TrackOpTypes={GET:"get",HAS:"has",ITERATE:"iterate"},exports.TriggerOpTypes={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},exports.computed=function(t,e,s=!1){let n,i;return a(t)?n=t:(n=t.get,i=t.set),new Kt(n,i)},exports.createApp=function(t){let e,s;if(Re(t))e=t,s={};else{if(void 0===t.setup)return void App(t);e=t.setup,s=Ne(t,["setup"])}const n=s[Le.ON_LAUNCH];s[Le.ON_LAUNCH]=function(t){xe=this;const s=e(t);void 0!==s&&Object.keys(s).forEach(t=>{this[t]=s[t]}),xe=null,void 0!==n&&n.call(this,t)},s[Le.ON_SHOW]=Me(s,Le.ON_SHOW),s[Le.ON_HIDE]=Me(s,Le.ON_HIDE),s[Le.ON_ERROR]=Me(s,Le.ON_ERROR),s[Le.ON_PAGE_NOT_FOUND]=Me(s,Le.ON_PAGE_NOT_FOUND),s[Le.ON_UNHANDLED_REJECTION]=Me(s,Le.ON_UNHANDLED_REJECTION),s[Le.ON_THEME_CHANGE]=Me(s,Le.ON_THEME_CHANGE),App(s)},exports.customRef=function(t){return new Wt(t)},exports.defineComponent=function(t,e){let s,n;e=Se({listenPageScroll:!1,canShareToOthers:!1,canShareToTimeline:!1},e);let i=null;if(Re(t))s=t,n={};else{if(void 0===t.setup)return Component(t);s=t.setup,n=Ne(t,["setup"]),n.properties&&(i=Object.keys(n.properties))}void 0===n.lifetimes&&(n.lifetimes={});const o=n.lifetimes[Ce.ATTACHED]||n[Ce.ATTACHED];n.lifetimes[Ce.ATTACHED]=function(){this.__scope__=new zt;const t=(we=e=this,Jt(e.__scope__));var e;const n={};i&&i.forEach(t=>{n[t]=this.data[t]}),this.__props__=bt(n);const r={is:this.is,id:this.id,dataset:this.dataset,exitState:this.exitState,router:this.router,pageRouter:this.pageRouter,renderer:this.renderer,triggerEvent:this.triggerEvent.bind(this),createSelectorQuery:this.createSelectorQuery.bind(this),createIntersectionObserver:this.createIntersectionObserver.bind(this),createMediaQueryObserver:this.createMediaQueryObserver.bind(this),selectComponent:this.selectComponent.bind(this),selectAllComponents:this.selectAllComponents.bind(this),selectOwnerComponent:this.selectOwnerComponent.bind(this),getRelationNodes:this.getRelationNodes.bind(this),getTabBar:this.getTabBar.bind(this),getPageId:this.getPageId.bind(this),animate:this.animate.bind(this),clearAnimation:this.clearAnimation.bind(this),getOpenerEventChannel:this.getOpenerEventChannel.bind(this),applyAnimatedStyle:this.applyAnimatedStyle.bind(this),clearAnimatedStyle:this.clearAnimatedStyle.bind(this),setUpdatePerformanceListener:this.setUpdatePerformanceListener.bind(this),getPassiveEvent:this.getPassiveEvent.bind(this),setPassiveEvent:this.setPassiveEvent.bind(this),setInitialRenderingCache:this.setInitialRenderingCache.bind(this),getAppBar:this.getAppBar&&this.getAppBar.bind(this)},c=s(this.__props__,r);if(void 0!==c){let t;Object.keys(c).forEach(e=>{const s=c[e];Re(s)?this[e]=s:(t=t||{},t[e]=Ue(s),je.call(this,e,s))}),void 0!==t&&this.setData(t,Ee)}!function(t){Jt(t),we=null}(t),void 0!==o&&o.call(this)};const r=Ve(n,Ce.DETACHED);return n.lifetimes[Ce.DETACHED]=function(){r.call(this),this.__scope__.stop()},n.lifetimes[Ce.READY]=Be(We[Ce.READY],n.lifetimes[Ce.READY]||n[Ce.READY]),n.lifetimes[Ce.MOVED]=Ve(n,Ce.MOVED),n.lifetimes[Ce.ERROR]=Ve(n,Ce.ERROR),void 0===n.methods&&(n.methods={}),(n.methods[He.ON_PAGE_SCROLL]||e.listenPageScroll)&&(n.methods[He.ON_PAGE_SCROLL]=Ge(n,He.ON_PAGE_SCROLL),n.methods.__listenPageScroll__=()=>!0),void 0===n.methods[He.ON_SHARE_APP_MESSAGE]&&e.canShareToOthers&&(n.methods[He.ON_SHARE_APP_MESSAGE]=function(t){const e=this[Ae(He.ON_SHARE_APP_MESSAGE)];return e?e(t):{}},n.methods.__isInjectedShareToOthersHook__=()=>!0),void 0===n.methods[He.ON_SHARE_TIMELINE]&&e.canShareToTimeline&&(n.methods[He.ON_SHARE_TIMELINE]=function(){const t=this[Ae(He.ON_SHARE_TIMELINE)];return t?t():{}},n.methods.__isInjectedShareToTimelineHook__=()=>!0),void 0===n.methods[He.ON_ADD_TO_FAVORITES]&&(n.methods[He.ON_ADD_TO_FAVORITES]=function(t){const e=this[Ae(He.ON_ADD_TO_FAVORITES)];return e?e(t):{}},n.methods.__isInjectedFavoritesHook__=()=>!0),void 0===n.methods[He.ON_SAVE_EXIT_STATE]&&(n.methods[He.ON_SAVE_EXIT_STATE]=function(){const t=this[Ae(He.ON_SAVE_EXIT_STATE)];return t?t():{data:void 0}},n.methods.__isInjectedExitStateHook__=()=>!0),n.methods[He.ON_LOAD]=Ge(n,He.ON_LOAD),n.methods[He.ON_PULL_DOWN_REFRESH]=Ge(n,He.ON_PULL_DOWN_REFRESH),n.methods[He.ON_REACH_BOTTOM]=Ge(n,He.ON_REACH_BOTTOM),n.methods[He.ON_TAB_ITEM_TAP]=Ge(n,He.ON_TAB_ITEM_TAP),void 0===n.pageLifetimes&&(n.pageLifetimes={}),n.pageLifetimes[We[He.ON_SHOW]]=Fe(n,He.ON_SHOW),n.pageLifetimes[We[He.ON_HIDE]]=Fe(n,He.ON_HIDE),n.pageLifetimes[We[He.ON_RESIZE]]=Fe(n,He.ON_RESIZE),n.pageLifetimes[We[He.ON_ROUTE_DONE]]=Fe(n,He.ON_ROUTE_DONE),i&&(void 0===n.observers&&(n.observers={}),i.forEach(t=>{const e=n.observers[t];n.observers[t]=function(s){this.__props__&&(this.__props__[t]=s),void 0!==e&&e.call(this,s)}})),Component(n)},exports.definePage=function(t,e){let s,n;if(e=Se({listenPageScroll:!1,canShareToOthers:!1,canShareToTimeline:!1},e),Re(t))s=t,n={};else{if(void 0===t.setup)return void Page(t);s=t.setup,n=Ne(t,["setup"])}const i=n[He.ON_LOAD];n[He.ON_LOAD]=function(t){this.__scope__=new zt;const e=(Pe=n=this,Jt(n.__scope__));var n;const o={is:this.is,route:this.route,options:this.options,exitState:this.exitState,router:this.router,pageRouter:this.pageRouter,renderer:this.renderer,createSelectorQuery:this.createSelectorQuery.bind(this),createIntersectionObserver:this.createIntersectionObserver.bind(this),createMediaQueryObserver:this.createMediaQueryObserver.bind(this),selectComponent:this.selectComponent.bind(this),selectAllComponents:this.selectAllComponents.bind(this),getTabBar:this.getTabBar.bind(this),getPageId:this.getPageId.bind(this),animate:this.animate.bind(this),clearAnimation:this.clearAnimation.bind(this),getOpenerEventChannel:this.getOpenerEventChannel.bind(this),applyAnimatedStyle:this.applyAnimatedStyle.bind(this),clearAnimatedStyle:this.clearAnimatedStyle.bind(this),setUpdatePerformanceListener:this.setUpdatePerformanceListener.bind(this),getPassiveEvent:this.getPassiveEvent.bind(this),setPassiveEvent:this.setPassiveEvent.bind(this),setInitialRenderingCache:this.setInitialRenderingCache.bind(this),getAppBar:this.getAppBar&&this.getAppBar.bind(this)},r=s(t,o);if(void 0!==r){let t;Object.keys(r).forEach(e=>{const s=r[e];Re(s)?this[e]=s:(t=t||{},t[e]=Ue(s),je.call(this,e,s))}),void 0!==t&&this.setData(t,Ee)}!function(t){Jt(t),Pe=null}(e),void 0!==i&&i.call(this,t)};const o=ke(n,He.ON_UNLOAD);n[He.ON_UNLOAD]=function(){o.call(this),this.__scope__.stop()},(n[He.ON_PAGE_SCROLL]||e.listenPageScroll)&&(n[He.ON_PAGE_SCROLL]=ke(n,He.ON_PAGE_SCROLL),n.__listenPageScroll__=()=>!0),void 0===n[He.ON_SHARE_APP_MESSAGE]&&e.canShareToOthers&&(n[He.ON_SHARE_APP_MESSAGE]=function(t){const e=this[Ae(He.ON_SHARE_APP_MESSAGE)];return e?e(t):{}},n.__isInjectedShareToOthersHook__=()=>!0),void 0===n[He.ON_SHARE_TIMELINE]&&e.canShareToTimeline&&(n[He.ON_SHARE_TIMELINE]=function(){const t=this[Ae(He.ON_SHARE_TIMELINE)];return t?t():{}},n.__isInjectedShareToTimelineHook__=()=>!0),void 0===n[He.ON_ADD_TO_FAVORITES]&&(n[He.ON_ADD_TO_FAVORITES]=function(t){const e=this[Ae(He.ON_ADD_TO_FAVORITES)];return e?e(t):{}},n.__isInjectedFavoritesHook__=()=>!0),void 0===n[He.ON_SAVE_EXIT_STATE]&&(n[He.ON_SAVE_EXIT_STATE]=function(){const t=this[Ae(He.ON_SAVE_EXIT_STATE)];return t?t():{data:void 0}},n.__isInjectedExitStateHook__=()=>!0),n[He.ON_SHOW]=ke(n,He.ON_SHOW),n[He.ON_READY]=ke(n,He.ON_READY),n[He.ON_HIDE]=ke(n,He.ON_HIDE),n[He.ON_ROUTE_DONE]=ke(n,He.ON_ROUTE_DONE),n[He.ON_PULL_DOWN_REFRESH]=ke(n,He.ON_PULL_DOWN_REFRESH),n[He.ON_REACH_BOTTOM]=ke(n,He.ON_REACH_BOTTOM),n[He.ON_RESIZE]=ke(n,He.ON_RESIZE),n[He.ON_TAB_ITEM_TAP]=ke(n,He.ON_TAB_ITEM_TAP),Page(n)},exports.effect=function(t,e){t.effect instanceof Yt&&(t=t.effect.fn);const s=new Yt(t);if(e){const{onStop:t,scheduler:i}=e;if(t){e.onStop=void 0;const n=s.stop.bind(s);s.stop=()=>{n(),t()}}i&&(e.scheduler=void 0,s.notify=()=>{256&s.flags||i()}),n(s,e)}try{s.run()}catch(t){throw s.stop(),t}const i=s.run.bind(s);return i.effect=s,i},exports.effectScope=function(t){return new zt(t)},exports.getCurrentScope=function(){return Zt},exports.getCurrentWatcher=function(){return qt},exports.inject=function(t,e,s=!1){return t in me?me[t]:arguments.length>1?s&&Re(e)?e():e:void 0},exports.isProxy=mt,exports.isReactive=Tt,exports.isReadonly=yt,exports.isRef=It,exports.isShallow=Dt,exports.markRaw=function(t){return!o(t,"__v_skip")&&Object.isExtensible(t)&&((t,e,s,n=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:n,value:s})})(t,"__v_skip",!0),t},exports.nextTick=function(t){const e=ae||_e;return t?e.then(t):e},exports.onAddToFavorites=t=>{const e=Ie();if(e&&e.__isInjectedFavoritesHook__){const s=Ae(He.ON_ADD_TO_FAVORITES);void 0===e[s]&&(e[s]=t)}},exports.onAppError=Xe,exports.onAppHide=Ye,exports.onAppShow=Qe,exports.onDetach=cs,exports.onError=as,exports.onHide=$e,exports.onLoad=os,exports.onMove=rs,exports.onPageNotFound=Ze,exports.onPageScroll=t=>{const e=Ie();e&&e.__listenPageScroll__&&_s(e,He.ON_PAGE_SCROLL,t)},exports.onPullDownRefresh=es,exports.onReachBottom=ss,exports.onReady=t=>{const e=Ie();e&&_s(e,He.ON_READY,t)},exports.onResize=ns,exports.onRouteDone=ts,exports.onSaveExitState=t=>{const e=Ie();if(e&&e.__isInjectedExitStateHook__){const s=Ae(He.ON_SAVE_EXIT_STATE);void 0===e[s]&&(e[s]=t)}},exports.onScopeDispose=function(t,e=!1){void 0!==Zt&&(Zt.cleanups[Zt.cleanupsLength++]=t)},exports.onShareAppMessage=t=>{const e=Ie();if(e&&e[He.ON_SHARE_APP_MESSAGE]&&e.__isInjectedShareToOthersHook__){const s=Ae(He.ON_SHARE_APP_MESSAGE);void 0===e[s]&&(e[s]=t)}},exports.onShareTimeline=t=>{const e=Ie();if(e&&e[He.ON_SHARE_TIMELINE]&&e.__isInjectedShareToTimelineHook__){const s=Ae(He.ON_SHARE_TIMELINE);void 0===e[s]&&(e[s]=t)}},exports.onShow=Ke,exports.onTabItemTap=is,exports.onThemeChange=Je,exports.onUnhandledRejection=ze,exports.onUnload=qe,exports.onWatcherCleanup=te,exports.provide=function(t,e){me[t]=e},exports.proxyRefs=function(t){return Tt(t)?t:new Proxy(t,kt)},exports.reactive=Nt,exports.readonly=Rt,exports.ref=Lt,exports.shallowReactive=bt,exports.shallowReadonly=function(t){return At(t,!0,rt,pt,gt)},exports.shallowRef=function(t){return Ht(t)},exports.stop=function(t){t.effect.stop()},exports.toRaw=xt,exports.toRef=function(t,e,s){return It(t)?t:a(t)?new Gt(t):l(t)&&arguments.length>1?Ft(t,e,s):Lt(t)},exports.toRefs=function(t){const e=r(t)?new Array(t.length):{};for(const s in t)e[s]=Ft(t,s);return e},exports.toValue=function(t){return a(t)?t():jt(t)},exports.triggerRef=Mt,exports.unref=jt,exports.watch=Te,exports.watchEffect=function(t,e){return De(t,null,e)},exports.watchPostEffect=function(t,e){return De(t,null,{flush:"post"})},exports.watchSyncEffect=function(t,e){return De(t,null,{flush:"sync"})};
|
|
7
|
+
"use strict";function t(t){const e=Object.create(null);for(const s of t.split(","))e[s]=1;return t=>t in e}const e={},s=()=>{},n=Object.assign,i=Object.prototype.hasOwnProperty,o=(t,e)=>i.call(t,e),r=Array.isArray,a=t=>"[object Map]"===_(t),c=t=>"function"==typeof t,u=t=>"symbol"==typeof t,l=t=>null!==t&&"object"==typeof t,h=Object.prototype.toString,_=t=>h.call(t),f=t=>"string"==typeof t&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,d=(t,e)=>!Object.is(t,e),p=0,v=1,E=16,O=32,g=[];let S,A=0,N=0,b=0,R=0;function T(t){try{return S}finally{S=t}}function y(){++A}function m(){! --A&&R&&H()}function D(t,e){const s=e.depsTail;if(void 0!==s&&s.dep===t)return;const n=void 0!==s?s.nextDep:e.deps;if(void 0!==n&&n.dep===t)return n.version=N,void(e.depsTail=n);const i=t.subsTail;if(void 0!==i&&i.version===N&&i.sub===e)return;const o=e.depsTail=t.subsTail={version:N,dep:t,sub:e,prevDep:s,nextDep:n,prevSub:i,nextSub:void 0};void 0!==n&&(n.prevDep=o),void 0!==s?s.nextDep=o:e.deps=o,void 0!==i?i.nextSub=o:t.subs=o}function x(t,e=t.sub){const s=t.dep,n=t.prevDep,i=t.nextDep,o=t.nextSub,r=t.prevSub;if(void 0!==i?i.prevDep=n:e.depsTail=n,void 0!==n?n.nextDep=i:e.deps=i,void 0!==o?o.prevSub=r:s.subsTail=r,void 0!==r)r.nextSub=o;else if(void 0===(s.subs=o)){let t=s.deps;if(void 0!==t){do{t=x(t,s)}while(void 0!==t);s.flags|=16}}return i}function w(t){let e,s=t.nextSub;t:for(;;){const n=t.sub;let i=n.flags;if(3&i&&(60&i?12&i?4&i?48&i||!U(t,n)?i=0:(n.flags=40|i,i&=1):n.flags=-9&i|32:i=0:n.flags=32|i,2&i&&(g[R++]=n),1&i)){const i=n.subs;if(void 0!==i){t=i,void 0!==i.nextSub&&(e={value:s,prev:e},s=t.nextSub);continue}}if(void 0===(t=s)){for(;void 0!==e;)if(t=e.value,e=e.prev,void 0!==t){s=t.nextSub;continue t}break}s=t.nextSub}}function I(t){return++N,t.depsTail=void 0,t.flags=-57&t.flags|4,T(t)}function L(t,e){S=e;const s=t.depsTail;let n=void 0!==s?s.nextDep:t.deps;for(;void 0!==n;)n=x(n,t);t.flags&=-5}function H(){for(;b<R;){const t=g[b];g[b++]=void 0,t.notify()}b=0,R=0}function P(t,e){let s,n=0;t:for(;;){const i=t.dep,o=i.flags;let r=!1;if(16&e.flags)r=!0;else if(17&~o){if(!(33&~o)){void 0===t.nextSub&&void 0===t.prevSub||(s={value:t,prev:s}),t=i.deps,e=i,++n;continue}}else if(i.update()){const t=i.subs;void 0!==t.nextSub&&C(t),r=!0}if(r||void 0===t.nextDep){for(;n;){--n;const i=e.subs,o=void 0!==i.nextSub;if(o?(t=s.value,s=s.prev):t=i,r){if(e.update()){o&&C(i),e=t.sub;continue}}else e.flags&=-33;if(e=t.sub,void 0!==t.nextDep){t=t.nextDep;continue t}r=!1}return r}t=t.nextDep}}function C(t){do{const e=t.sub,s=t.nextSub,n=e.flags;32==(48&n)&&(e.flags=16|n),t=s}while(void 0!==t)}function U(t,e){let s=e.depsTail;for(;void 0!==s;){if(s===t)return!0;s=s.prevDep}return!1}var M=class{constructor(t,e){this.map=t,this.key=e,this._subs=void 0,this.subsTail=void 0,this.flags=0}get subs(){return this._subs}set subs(t){this._subs=t,void 0===t&&this.map.delete(this.key)}};const j=new WeakMap,k=Symbol(""),V=Symbol(""),W=Symbol("");function G(t,e,s){if(void 0!==S){let e=j.get(t);e||j.set(t,e=new Map);let n=e.get(s);n||e.set(s,n=new M(e,s)),D(n,S)}}function F(t,e,s,n,i,o){const c=j.get(t);if(!c)return;const l=t=>{void 0!==t&&void 0!==t.subs&&(w(t.subs),C(t.subs))};if(y(),"clear"===e)c.forEach(l);else{const i=r(t),o=i&&f(s);if(i&&"length"===s){const t=Number(n);c.forEach((e,s)=>{("length"===s||s===W||!u(s)&&s>=t)&&l(e)})}else switch((void 0!==s||c.has(void 0))&&l(c.get(s)),o&&l(c.get(W)),e){case"add":i?o&&l(c.get("length")):(l(c.get(k)),a(t)&&l(c.get(V)));break;case"delete":i||(l(c.get(k)),a(t)&&l(c.get(V)));break;case"set":a(t)&&l(c.get(k))}}m()}function B(t){const e=Lt(t);return e===t?e:(G(e,0,W),wt(t)?e:e.map(Ht))}function Q(t){return G(t=Lt(t),0,W),t}function Y(t,e){return xt(t)?Pt(Dt(t)?Ht(e):e):Ht(e)}const X={__proto__:null,[Symbol.iterator](){return Z(this,Symbol.iterator,t=>Y(this,t))},concat(...t){return B(this).concat(...t.map(t=>r(t)?B(t):t))},entries(){return Z(this,"entries",t=>(t[1]=Y(this,t[1]),t))},every(t,e){return J(this,"every",t,e,void 0,arguments)},filter(t,e){return J(this,"filter",t,e,t=>t.map(t=>Y(this,t)),arguments)},find(t,e){return J(this,"find",t,e,t=>Y(this,t),arguments)},findIndex(t,e){return J(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return J(this,"findLast",t,e,t=>Y(this,t),arguments)},findLastIndex(t,e){return J(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return J(this,"forEach",t,e,void 0,arguments)},includes(...t){return $(this,"includes",t)},indexOf(...t){return $(this,"indexOf",t)},join(t){return B(this).join(t)},lastIndexOf(...t){return $(this,"lastIndexOf",t)},map(t,e){return J(this,"map",t,e,void 0,arguments)},pop(){return q(this,"pop")},push(...t){return q(this,"push",t)},reduce(t,...e){return K(this,"reduce",t,e)},reduceRight(t,...e){return K(this,"reduceRight",t,e)},shift(){return q(this,"shift")},some(t,e){return J(this,"some",t,e,void 0,arguments)},splice(...t){return q(this,"splice",t)},toReversed(){return B(this).toReversed()},toSorted(t){return B(this).toSorted(t)},toSpliced(...t){return B(this).toSpliced(...t)},unshift(...t){return q(this,"unshift",t)},values(){return Z(this,"values",t=>Y(this,t))}};function Z(t,e,s){const n=Q(t),i=n[e]();return n===t||wt(t)||(i._next=i.next,i.next=()=>{const t=i._next();return t.done||(t.value=s(t.value)),t}),i}const z=Array.prototype;function J(t,e,s,n,i,o){const r=Q(t),a=r!==t&&!wt(t),c=r[e];if(c!==z[e]){const e=c.apply(t,o);return a?Ht(e):e}let u=s;r!==t&&(a?u=function(e,n){return s.call(this,Y(t,e),n,t)}:s.length>2&&(u=function(e,n){return s.call(this,e,n,t)}));const l=c.call(r,u,n);return a&&i?i(l):l}function K(t,e,s,n){const i=Q(t);let o=s;return i!==t&&(wt(t)?s.length>3&&(o=function(e,n,i){return s.call(this,e,n,i,t)}):o=function(e,n,i){return s.call(this,e,Y(t,n),i,t)}),i[e](o,...n)}function $(t,e,s){const n=Lt(t);G(n,0,W);const i=n[e](...s);return-1!==i&&!1!==i||!It(s[0])?i:(s[0]=Lt(s[0]),n[e](...s))}function q(t,e,s=[]){y();const n=T(),i=Lt(t)[e].apply(t,s);return T(n),m(),i}const tt=t("__proto__,__v_isRef,__isVue"),et=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>"arguments"!==t&&"caller"!==t).map(t=>Symbol[t]).filter(u));function st(t){u(t)||(t=String(t));const e=Lt(this);return G(e,0,t),e.hasOwnProperty(t)}var nt=class{constructor(t=!1,e=!1){this._isReadonly=t,this._isShallow=e}get(t,e,s){if("__v_skip"===e)return t.__v_skip;const n=this._isReadonly,i=this._isShallow;if("__v_isReactive"===e)return!n;if("__v_isReadonly"===e)return n;if("__v_isShallow"===e)return i;if("__v_raw"===e)return s===(n?i?Nt:At:i?St:gt).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=r(t);if(!n){let t;if(o&&(t=X[e]))return t;if("hasOwnProperty"===e)return st}const a=Ct(t),c=Reflect.get(t,e,a?t:s);if(a&&"value"!==e)return c;if(u(e)?et.has(e):tt(e))return c;if(n||G(t,0,e),i)return c;if(Ct(c)){const t=o&&f(e)?c:c.value;return n&&l(t)?yt(t):t}return l(c)?n?yt(c):Rt(c):c}},it=class extends nt{constructor(t=!1){super(!1,t)}set(t,e,s,n){let i=t[e];const a=r(t)&&f(e);if(!this._isShallow){const t=xt(i);if(wt(s)||xt(s)||(i=Lt(i),s=Lt(s)),!a&&Ct(i)&&!Ct(s))return t||(i.value=s),!0}const c=a?Number(e)<t.length:o(t,e),u=Reflect.set(t,e,s,Ct(t)?t:n);return t===Lt(n)&&(c?d(s,i)&&F(t,"set",e,s):F(t,"add",e,s)),u}deleteProperty(t,e){const s=o(t,e),n=Reflect.deleteProperty(t,e);return n&&s&&F(t,"delete",e,void 0),n}has(t,e){const s=Reflect.has(t,e);return u(e)&&et.has(e)||G(t,0,e),s}ownKeys(t){return G(t,0,r(t)?"length":k),Reflect.ownKeys(t)}},ot=class extends nt{constructor(t=!1){super(!0,t)}set(t,e){return!0}deleteProperty(t,e){return!0}};const rt=new it,at=new ot,ct=new it(!0),ut=new ot(!0),lt=t=>t,ht=t=>Reflect.getPrototypeOf(t);function _t(t){return function(...e){return"delete"!==t&&("clear"===t?void 0:this)}}function ft(t,e){const s={get(s){const n=this.__v_raw,i=Lt(n),o=Lt(s);t||(d(s,o)&&G(i,0,s),G(i,0,o));const{has:r}=ht(i),a=e?lt:t?Pt:Ht;return r.call(i,s)?a(n.get(s)):r.call(i,o)?a(n.get(o)):void(n!==i&&n.get(s))},get size(){const e=this.__v_raw;return!t&&G(Lt(e),0,k),e.size},has(e){const s=this.__v_raw,n=Lt(s),i=Lt(e);return t||(d(e,i)&&G(n,0,e),G(n,0,i)),e===i?s.has(e):s.has(e)||s.has(i)},forEach(s,n){const i=this,o=i.__v_raw,r=e?lt:t?Pt:Ht;return!t&&G(Lt(o),0,k),o.forEach((t,e)=>s.call(n,r(t),r(e),i))}};return n(s,t?{add:_t("add"),set:_t("set"),delete:_t("delete"),clear:_t("clear")}:{add(t){e||wt(t)||xt(t)||(t=Lt(t));const s=Lt(this);return ht(s).has.call(s,t)||(s.add(t),F(s,"add",t,t)),this},set(t,s){e||wt(s)||xt(s)||(s=Lt(s));const n=Lt(this),{has:i,get:o}=ht(n);let r=i.call(n,t);r||(r=i.call(n,t=Lt(t)));const a=o.call(n,t);return n.set(t,s),r?d(s,a)&&F(n,"set",t,s):F(n,"add",t,s),this},delete(t){const e=Lt(this),{has:s,get:n}=ht(e);let i=s.call(e,t);i||(i=s.call(e,t=Lt(t))),n&&n.call(e,t);const o=e.delete(t);return i&&F(e,"delete",t,void 0),o},clear(){const t=Lt(this),e=0!==t.size,s=t.clear();return e&&F(t,"clear",void 0,void 0),s}}),["keys","values","entries",Symbol.iterator].forEach(i=>{s[i]=function(t,e,s){return function(...i){const o=this.__v_raw,r=Lt(o),c=a(r),u="entries"===t||t===Symbol.iterator&&c,l="keys"===t&&c,h=o[t](...i),_=s?lt:e?Pt:Ht;return!e&&G(r,0,l?V:k),n(Object.create(h),{next(){const{value:t,done:e}=h.next();return e?{value:t,done:e}:{value:u?[_(t[0]),_(t[1])]:_(t),done:e}}})}}(i,t,e)}),s}function dt(t,e){const s=ft(t,e);return(e,n,i)=>"__v_isReactive"===n?!t:"__v_isReadonly"===n?t:"__v_raw"===n?e:Reflect.get(o(s,n)&&n in e?s:e,n,i)}const pt={get:dt(!1,!1)},vt={get:dt(!1,!0)},Et={get:dt(!0,!1)},Ot={get:dt(!0,!0)},gt=new WeakMap,St=new WeakMap,At=new WeakMap,Nt=new WeakMap;function bt(t){return t.__v_skip||!Object.isExtensible(t)?0:function(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((t=>_(t).slice(8,-1))(t))}function Rt(t){return xt(t)?t:mt(t,!1,rt,pt,gt)}function Tt(t){return mt(t,!1,ct,vt,St)}function yt(t){return mt(t,!0,at,Et,At)}function mt(t,e,s,n,i){if(!l(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const o=bt(t);if(0===o)return t;const r=i.get(t);if(r)return r;const a=new Proxy(t,2===o?n:s);return i.set(t,a),a}function Dt(t){return xt(t)?Dt(t.__v_raw):!(!t||!t.__v_isReactive)}function xt(t){return!(!t||!t.__v_isReadonly)}function wt(t){return!(!t||!t.__v_isShallow)}function It(t){return!!t&&!!t.__v_raw}function Lt(t){const e=t&&t.__v_raw;return e?Lt(e):t}const Ht=t=>l(t)?Rt(t):t,Pt=t=>l(t)?yt(t):t;function Ct(t){return!!t&&!0===t.__v_isRef}function Ut(t){return Mt(t,Ht)}function Mt(t,e){return Ct(t)?t:new jt(t,e)}var jt=class{constructor(t,e){this.subs=void 0,this.subsTail=void 0,this.flags=v,this.__v_isRef=!0,this.__v_isShallow=!1,this._oldValue=this._rawValue=e?Lt(t):t,this._value=e?e(t):t,this._wrap=e,this.__v_isShallow=!e}get dep(){return this}get value(){if(Vt(this),this.flags&E&&this.update()){const t=this.subs;void 0!==t&&C(t)}return this._value}set value(t){const e=this._rawValue,s=this.__v_isShallow||wt(t)||xt(t);if(d(t=s?t:Lt(t),e)){this.flags|=E,this._rawValue=t,this._value=!s&&this._wrap?this._wrap(t):t;const e=this.subs;void 0!==e&&(w(e),A||H())}}update(){return this.flags&=-17,d(this._oldValue,this._oldValue=this._rawValue)}};function kt(t){const e=t.dep;void 0!==e&&void 0!==e.subs&&(w(e.subs),C(e.subs),A||H())}function Vt(t){void 0!==S&&D(t,S)}function Wt(t){return Ct(t)?t.value:t}const Gt={get:(t,e,s)=>"__v_raw"===e?t:Wt(Reflect.get(t,e,s)),set:(t,e,s,n)=>{const i=t[e];return Ct(i)&&!Ct(s)?(i.value=s,!0):Reflect.set(t,e,s,n)}};var Ft=class{constructor(t){this.subs=void 0,this.subsTail=void 0,this.flags=p,this.__v_isRef=!0,this._value=void 0;const{get:e,set:s}=t(()=>Vt(this),()=>kt(this));this._get=e,this._set=s}get dep(){return this}get value(){return this._value=this._get()}set value(t){this._set(t)}};var Bt=class{constructor(t,e,s){this._object=t,this._key=e,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._raw=Lt(t);let n=!0,i=t;if(!r(t)||!f(String(e)))do{n=!It(i)||wt(i)}while(n&&(i=i.__v_raw));this._shallow=n}get value(){let t=this._object[this._key];return this._shallow&&(t=Wt(t)),this._value=void 0===t?this._defaultValue:t}set value(t){if(this._shallow&&Ct(this._raw[this._key])){const e=this._object[this._key];if(Ct(e))return void(e.value=t)}this._object[this._key]=t}get dep(){return function(t,e){const s=j.get(t);return s&&s.get(e)}(this._raw,this._key)}},Qt=class{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 Yt(t,e,s){return new Bt(t,e,s)}const Xt=128,Zt=256;var zt=class{fn(){}constructor(t){this.deps=void 0,this.depsTail=void 0,this.subs=void 0,this.subsTail=void 0,this.flags=18,this.cleanups=[],this.cleanupsLength=0,void 0!==t&&(this.fn=t),Kt&&D(this,Kt)}get active(){return!(1024&this.flags)}pause(){this.flags|=256}resume(){48&(this.flags&=-257)&&this.notify()}notify(){256&this.flags||!this.dirty||this.run()}run(){if(!this.active)return this.fn();Jt(this);const t=I(this);try{return this.fn()}finally{L(this,t);const e=this.flags;136&~e||(this.flags=-9&e,this.notify())}}stop(){if(!this.active)return;this.flags=1024;let t=this.deps;for(;void 0!==t;)t=x(t,this);const e=this.subs;void 0!==e&&x(e),Jt(this)}get dirty(){const t=this.flags;if(16&t)return!0;if(32&t){if(P(this.deps,this))return this.flags=16|t,!0;this.flags=-33&t}return!1}};function Jt(t){const e=t.cleanupsLength;if(e){for(let s=0;s<e;s++)t.cleanups[s]();t.cleanupsLength=0}}let Kt;var $t=class{constructor(t=!1){this.deps=void 0,this.depsTail=void 0,this.subs=void 0,this.subsTail=void 0,this.flags=0,this.cleanups=[],this.cleanupsLength=0,!t&&Kt&&D(this,Kt)}get active(){return!(1024&this.flags)}pause(){if(!(256&this.flags)){this.flags|=256;for(let t=this.deps;void 0!==t;t=t.nextDep){const e=t.dep;"pause"in e&&e.pause()}}}resume(){const t=this.flags;if(256&t){this.flags=-257&t;for(let t=this.deps;void 0!==t;t=t.nextDep){const e=t.dep;"resume"in e&&e.resume()}}}run(t){const e=Kt;try{return Kt=this,t()}finally{Kt=e}}stop(){if(!this.active)return;this.flags=1024,this.reset();const t=this.subs;void 0!==t&&x(t)}reset(){let t=this.deps;for(;void 0!==t;){const e=t.dep;"stop"in e?(t=t.nextDep,e.stop()):t=x(t,this)}Jt(this)}};function qt(t){try{return Kt}finally{Kt=t}}var te=class{get effect(){return this}get dep(){return this}get _dirty(){const t=this.flags;if(t&E)return!0;if(t&O){if(P(this.deps,this))return this.flags=t|E,!0;this.flags=-33&t}return!1}set _dirty(t){t?this.flags|=E:this.flags&=-49}constructor(t,e){this.fn=t,this.setter=e,this._value=void 0,this.subs=void 0,this.subsTail=void 0,this.deps=void 0,this.depsTail=void 0,this.flags=v|E,this.__v_isRef=!0,this.__v_isReadonly=!e}get value(){const t=this.flags;if(t&E||t&O&&P(this.deps,this)){if(this.update()){const t=this.subs;void 0!==t&&C(t)}}else t&O&&(this.flags=-33&t);return void 0!==S?D(this,S):void 0!==Kt&&D(this,Kt),this._value}set value(t){this.setter&&this.setter(t)}update(){const t=I(this);try{const t=this._value,e=this.fn(t);return!!d(t,e)&&(this._value=e,!0)}finally{L(this,t)}}};const ee={};let se;function ne(t,e=!1,s=se){if(s){const{call:e}=s.options;s.cleanups[s.cleanupsLength++]=e?()=>e(t,4):t}}var ie,oe=class extends zt{constructor(t,n,i=e){const{deep:o,once:a,call:u}=i;let l,h=!1,_=!1;if(Ct(t)?(l=()=>t.value,h=wt(t)):Dt(t)?(l=()=>re(t,o),h=!0):r(t)?(_=!0,h=t.some(t=>Dt(t)||wt(t)),l=()=>t.map(t=>Ct(t)?t.value:Dt(t)?re(t,o):c(t)?u?u(t,2):t():void 0)):l=c(t)?n?u?()=>u(t,2):t:()=>{if(this.cleanupsLength){const t=T();try{Jt(this)}finally{T(t)}}const e=se;se=this;try{return u?u(t,3,[this.boundCleanup]):t(this.boundCleanup)}finally{se=e}}:s,n&&o){const t=l,e=!0===o?1/0:o;l=()=>ae(t(),e)}if(super(l),this.cb=n,this.options=i,this.boundCleanup=t=>ne(t,!1,this),this.forceTrigger=h,this.isMultiSource=_,a&&n){const t=n;n=(...e)=>{t(...e),this.stop()}}this.cb=n,this.oldValue=_?new Array(t.length).fill(ee):ee}run(t=!1){const e=this.oldValue,s=this.oldValue=super.run();if(!this.cb)return;const{immediate:n,deep:i,call:o}=this.options;if((!t||n)&&(i||this.forceTrigger||(this.isMultiSource?s.some((t,s)=>d(t,e[s])):d(s,e)))){Jt(this);const t=se;se=this;try{const t=[s,e===ee?void 0:this.isMultiSource&&e[0]===ee?[]:e,this.boundCleanup];o?o(this.cb,3,t):this.cb(...t)}finally{se=t}}}};function re(t,e){return e?t:wt(t)||!1===e||0===e?ae(t,1):ae(t)}function ae(t,e=1/0,s){if(e<=0||!l(t)||t.__v_skip)return t;if(((s=s||new Map).get(t)||0)>=e)return t;if(s.set(t,e),e--,Ct(t))ae(t.value,e,s);else if(r(t))for(let n=0;n<t.length;n++)ae(t[n],e,s);else if("[object Set]"===_(t)||a(t))t.forEach(t=>{ae(t,e,s)});else if((t=>"[object Object]"===_(t))(t)){for(const n in t)ae(t[n],e,s);for(const n of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,n)&&ae(t[n],e,s)}return t}!function(t){t[t.QUEUED=1]="QUEUED",t[t.ALLOW_RECURSE=2]="ALLOW_RECURSE"}(ie||(ie={}));const ce=[];let ue=[],le=null,he=null,_e=0,fe=0,de=0;const pe=Promise.resolve();function ve(t){Ee(t,ce,_e)&&(_e++,he||(he=pe.then(Se)))}function Ee(t,e,s){const n=t.flags;return!(n&ie.QUEUED)&&(t.flags=n|ie.QUEUED,e[s]=t,!0)}function Oe(t){Ee(t,ue,ue.length)}function ge(){if(ue.length){for(le=ue,ue=[];de<le.length;){const t=le[de++];t.flags&ie.ALLOW_RECURSE&&(t.flags&=~ie.QUEUED);try{t()}finally{t.flags&=~ie.QUEUED}}le=null,de=0}}function Se(){try{for(;fe<_e;){const t=ce[fe];ce[fe++]=void 0,t.flags&ie.ALLOW_RECURSE&&(t.flags&=~ie.QUEUED);try{t()}finally{t.flags&ie.ALLOW_RECURSE||(t.flags&=~ie.QUEUED)}}}finally{for(;fe<_e;)ce[fe].flags&=~ie.QUEUED,ce[fe++]=void 0;fe=0,_e=0,he=null}}const Ae={},Ne=Array.isArray,be=Object.assign;function Re(t,e){const s={};return Object.keys(t).forEach(n=>{e.includes(n)||(s[n]=t[n])}),s}function Te(t){return Object.prototype.toString.call(t).slice(8,-1)}function ye(t){return"function"==typeof t}function me(t){return`__${t}__`}function De(t,e,s){return we(t,e,s)}class xe extends oe{constructor(t,e,s,n){super(t,e,s),this.flush=n;const i=()=>{this.dirty&&this.run()};e&&(this.flags|=Xt,i.flags|=ie.ALLOW_RECURSE),this.job=i}notify(){if(!(this.flags&Zt)){const t=this.flush,e=this.job;"post"===t?Oe(e):"pre"===t?ve(e):e()}}}function we(t,e,s=Ae){const{flush:n="pre"}=s,i=be({},s),o=new xe(t,e,i,n);e?o.run(!0):"post"===n?Oe(o.job):o.run(!0);const r=o.stop.bind(o);return r.pause=o.pause.bind(o),r.resume=o.resume.bind(o),r.stop=r,r}const Ie=Object.create(null);let Le=null,He=null,Pe=null;function Ce(){return He||Pe}var Ue,Me,je;function ke(t,e){const s=t[e];return function(...t){const n=this[me(e)];n&&n.forEach(e=>e(...t)),void 0!==s&&s.call(this,...t)}}function Ve(t){if(function(t){const e=new Set(["undefined","boolean","number","string"]);return null===t||e.has(typeof t)}(t)||ye(t))return t;if(Ct(t))return Ve(t.value);if(It(t))return Ve(Lt(t));if(Ne(t))return t.map(t=>Ve(t));if(function(t){return"Object"===Te(t)}(t)){const e={};return Object.keys(t).forEach(s=>{e[s]=Ve(t[s])}),e}throw new TypeError(`${Te(t)} value is not supported`)}function We(t,e){var s;null!==(s=e)&&"object"==typeof s&&De(Ct(e)?e:()=>e,()=>{this.setData({[t]:Ve(e)},ge)},{deep:!0})}function Ge(t,e){const s=t[e];return function(...t){const n=this[me(e)];n&&n.forEach(e=>e(...t)),void 0!==s&&s.call(this,...t)}}!function(t){t.ON_LAUNCH="onLaunch",t.ON_SHOW="onShow",t.ON_HIDE="onHide",t.ON_ERROR="onError",t.ON_PAGE_NOT_FOUND="onPageNotFound",t.ON_UNHANDLED_REJECTION="onUnhandledRejection",t.ON_THEME_CHANGE="onThemeChange"}(Ue||(Ue={})),function(t){t.ON_LOAD="onLoad",t.ON_SHOW="onShow",t.ON_READY="onReady",t.ON_HIDE="onHide",t.ON_UNLOAD="onUnload",t.ON_ROUTE_DONE="onRouteDone",t.ON_PULL_DOWN_REFRESH="onPullDownRefresh",t.ON_REACH_BOTTOM="onReachBottom",t.ON_PAGE_SCROLL="onPageScroll",t.ON_SHARE_APP_MESSAGE="onShareAppMessage",t.ON_SHARE_TIMELINE="onShareTimeline",t.ON_ADD_TO_FAVORITES="onAddToFavorites",t.ON_RESIZE="onResize",t.ON_TAB_ITEM_TAP="onTabItemTap",t.ON_SAVE_EXIT_STATE="onSaveExitState"}(Me||(Me={})),function(t){t.ATTACHED="attached",t.READY="ready",t.MOVED="moved",t.DETACHED="detached",t.ERROR="error"}(je||(je={}));const Fe={[Me.ON_SHOW]:"show",[Me.ON_HIDE]:"hide",[Me.ON_RESIZE]:"resize",[Me.ON_ROUTE_DONE]:"routeDone",[je.READY]:Me.ON_READY};function Be(t,e){return Xe(e,t.lifetimes[e]||t[e])}function Qe(t,e){return Xe(e,t.methods[e])}function Ye(t,e){return Xe(e,t.pageLifetimes[Fe[e]])}function Xe(t,e){const s=me(t);return function(...t){const n=this[s];n&&n.forEach(e=>e(...t)),void 0!==e&&e.call(this,...t)}}const Ze=_s(Ue.ON_SHOW),ze=_s(Ue.ON_HIDE),Je=_s(Ue.ON_ERROR),Ke=_s(Ue.ON_PAGE_NOT_FOUND),$e=_s(Ue.ON_UNHANDLED_REJECTION),qe=_s(Ue.ON_THEME_CHANGE),ts=fs(Me.ON_SHOW),es=fs(Me.ON_HIDE),ss=fs(Me.ON_UNLOAD),ns=fs(Me.ON_ROUTE_DONE),is=fs(Me.ON_PULL_DOWN_REFRESH),os=fs(Me.ON_REACH_BOTTOM),rs=fs(Me.ON_RESIZE),as=fs(Me.ON_TAB_ITEM_TAP),cs=ds(Me.ON_LOAD),us=ds(je.MOVED),ls=ds(je.DETACHED),hs=ds(je.ERROR);function _s(t){return e=>{Le&&ps(Le,t,e)}}function fs(t){return e=>{const s=Ce();s&&ps(s,t,e)}}function ds(t){return e=>{Pe&&ps(Pe,t,e)}}function ps(t,e,s){const n=me(e);void 0===t[n]&&(t[n]=[]),t[n].push(s)}exports.EffectScope=$t,exports.ReactiveEffect=zt,exports.TrackOpTypes={GET:"get",HAS:"has",ITERATE:"iterate"},exports.TriggerOpTypes={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},exports.computed=function(t,e,s=!1){let n,i;return c(t)?n=t:(n=t.get,i=t.set),new te(n,i)},exports.createApp=function(t){let e,s;if(ye(t))e=t,s={};else{if(void 0===t.setup)return void App(t);e=t.setup,s=Re(t,["setup"])}const n=s[Ue.ON_LAUNCH];s[Ue.ON_LAUNCH]=function(t){Le=this;const s=e(t);void 0!==s&&Object.keys(s).forEach(t=>{this[t]=s[t]}),Le=null,void 0!==n&&n.call(this,t)},s[Ue.ON_SHOW]=ke(s,Ue.ON_SHOW),s[Ue.ON_HIDE]=ke(s,Ue.ON_HIDE),s[Ue.ON_ERROR]=ke(s,Ue.ON_ERROR),s[Ue.ON_PAGE_NOT_FOUND]=ke(s,Ue.ON_PAGE_NOT_FOUND),s[Ue.ON_UNHANDLED_REJECTION]=ke(s,Ue.ON_UNHANDLED_REJECTION),s[Ue.ON_THEME_CHANGE]=ke(s,Ue.ON_THEME_CHANGE),App(s)},exports.customRef=function(t){return new Ft(t)},exports.defineComponent=function(t,e){let s,n;e=be({listenPageScroll:!1,canShareToOthers:!1,canShareToTimeline:!1},e);let i=null;if(ye(t))s=t,n={};else{if(void 0===t.setup)return Component(t);s=t.setup,n=Re(t,["setup"]),n.properties&&(i=Object.keys(n.properties))}void 0===n.lifetimes&&(n.lifetimes={});const o=n.lifetimes[je.ATTACHED]||n[je.ATTACHED];n.lifetimes[je.ATTACHED]=function(){this.__scope__=new $t;const t=(Pe=e=this,qt(e.__scope__));var e;const n={};i&&i.forEach(t=>{n[t]=this.data[t]}),this.__props__=Tt(n);const r={is:this.is,id:this.id,dataset:this.dataset,exitState:this.exitState,router:this.router,pageRouter:this.pageRouter,renderer:this.renderer,triggerEvent:this.triggerEvent.bind(this),createSelectorQuery:this.createSelectorQuery.bind(this),createIntersectionObserver:this.createIntersectionObserver.bind(this),createMediaQueryObserver:this.createMediaQueryObserver.bind(this),selectComponent:this.selectComponent.bind(this),selectAllComponents:this.selectAllComponents.bind(this),selectOwnerComponent:this.selectOwnerComponent.bind(this),getRelationNodes:this.getRelationNodes.bind(this),getTabBar:this.getTabBar.bind(this),getPageId:this.getPageId.bind(this),animate:this.animate.bind(this),clearAnimation:this.clearAnimation.bind(this),getOpenerEventChannel:this.getOpenerEventChannel.bind(this),applyAnimatedStyle:this.applyAnimatedStyle.bind(this),clearAnimatedStyle:this.clearAnimatedStyle.bind(this),setUpdatePerformanceListener:this.setUpdatePerformanceListener.bind(this),getPassiveEvent:this.getPassiveEvent.bind(this),setPassiveEvent:this.setPassiveEvent.bind(this),setInitialRenderingCache:this.setInitialRenderingCache.bind(this),getAppBar:this.getAppBar&&this.getAppBar.bind(this)},a=s(this.__props__,r);if(void 0!==a){let t;Object.keys(a).forEach(e=>{const s=a[e];ye(s)?this[e]=s:(t=t||{},t[e]=Ve(s),We.call(this,e,s))}),void 0!==t&&this.setData(t,ge)}!function(t){qt(t),Pe=null}(t),void 0!==o&&o.call(this)};const r=Be(n,je.DETACHED);return n.lifetimes[je.DETACHED]=function(){r.call(this),this.__scope__.stop()},n.lifetimes[je.READY]=Xe(Fe[je.READY],n.lifetimes[je.READY]||n[je.READY]),n.lifetimes[je.MOVED]=Be(n,je.MOVED),n.lifetimes[je.ERROR]=Be(n,je.ERROR),void 0===n.methods&&(n.methods={}),(n.methods[Me.ON_PAGE_SCROLL]||e.listenPageScroll)&&(n.methods[Me.ON_PAGE_SCROLL]=Qe(n,Me.ON_PAGE_SCROLL),n.methods.__listenPageScroll__=()=>!0),void 0===n.methods[Me.ON_SHARE_APP_MESSAGE]&&e.canShareToOthers&&(n.methods[Me.ON_SHARE_APP_MESSAGE]=function(t){const e=this[me(Me.ON_SHARE_APP_MESSAGE)];return e?e(t):{}},n.methods.__isInjectedShareToOthersHook__=()=>!0),void 0===n.methods[Me.ON_SHARE_TIMELINE]&&e.canShareToTimeline&&(n.methods[Me.ON_SHARE_TIMELINE]=function(){const t=this[me(Me.ON_SHARE_TIMELINE)];return t?t():{}},n.methods.__isInjectedShareToTimelineHook__=()=>!0),void 0===n.methods[Me.ON_ADD_TO_FAVORITES]&&(n.methods[Me.ON_ADD_TO_FAVORITES]=function(t){const e=this[me(Me.ON_ADD_TO_FAVORITES)];return e?e(t):{}},n.methods.__isInjectedFavoritesHook__=()=>!0),void 0===n.methods[Me.ON_SAVE_EXIT_STATE]&&(n.methods[Me.ON_SAVE_EXIT_STATE]=function(){const t=this[me(Me.ON_SAVE_EXIT_STATE)];return t?t():{data:void 0}},n.methods.__isInjectedExitStateHook__=()=>!0),n.methods[Me.ON_LOAD]=Qe(n,Me.ON_LOAD),n.methods[Me.ON_PULL_DOWN_REFRESH]=Qe(n,Me.ON_PULL_DOWN_REFRESH),n.methods[Me.ON_REACH_BOTTOM]=Qe(n,Me.ON_REACH_BOTTOM),n.methods[Me.ON_TAB_ITEM_TAP]=Qe(n,Me.ON_TAB_ITEM_TAP),void 0===n.pageLifetimes&&(n.pageLifetimes={}),n.pageLifetimes[Fe[Me.ON_SHOW]]=Ye(n,Me.ON_SHOW),n.pageLifetimes[Fe[Me.ON_HIDE]]=Ye(n,Me.ON_HIDE),n.pageLifetimes[Fe[Me.ON_RESIZE]]=Ye(n,Me.ON_RESIZE),n.pageLifetimes[Fe[Me.ON_ROUTE_DONE]]=Ye(n,Me.ON_ROUTE_DONE),i&&(void 0===n.observers&&(n.observers={}),i.forEach(t=>{const e=n.observers[t];n.observers[t]=function(s){this.__props__&&(this.__props__[t]=s),void 0!==e&&e.call(this,s)}})),Component(n)},exports.definePage=function(t,e){let s,n;if(e=be({listenPageScroll:!1,canShareToOthers:!1,canShareToTimeline:!1},e),ye(t))s=t,n={};else{if(void 0===t.setup)return void Page(t);s=t.setup,n=Re(t,["setup"])}const i=n[Me.ON_LOAD];n[Me.ON_LOAD]=function(t){this.__scope__=new $t;const e=(He=n=this,qt(n.__scope__));var n;const o={is:this.is,route:this.route,options:this.options,exitState:this.exitState,router:this.router,pageRouter:this.pageRouter,renderer:this.renderer,createSelectorQuery:this.createSelectorQuery.bind(this),createIntersectionObserver:this.createIntersectionObserver.bind(this),createMediaQueryObserver:this.createMediaQueryObserver.bind(this),selectComponent:this.selectComponent.bind(this),selectAllComponents:this.selectAllComponents.bind(this),getTabBar:this.getTabBar.bind(this),getPageId:this.getPageId.bind(this),animate:this.animate.bind(this),clearAnimation:this.clearAnimation.bind(this),getOpenerEventChannel:this.getOpenerEventChannel.bind(this),applyAnimatedStyle:this.applyAnimatedStyle.bind(this),clearAnimatedStyle:this.clearAnimatedStyle.bind(this),setUpdatePerformanceListener:this.setUpdatePerformanceListener.bind(this),getPassiveEvent:this.getPassiveEvent.bind(this),setPassiveEvent:this.setPassiveEvent.bind(this),setInitialRenderingCache:this.setInitialRenderingCache.bind(this),getAppBar:this.getAppBar&&this.getAppBar.bind(this)},r=s(t,o);if(void 0!==r){let t;Object.keys(r).forEach(e=>{const s=r[e];ye(s)?this[e]=s:(t=t||{},t[e]=Ve(s),We.call(this,e,s))}),void 0!==t&&this.setData(t,ge)}!function(t){qt(t),He=null}(e),void 0!==i&&i.call(this,t)};const o=Ge(n,Me.ON_UNLOAD);n[Me.ON_UNLOAD]=function(){o.call(this),this.__scope__.stop()},(n[Me.ON_PAGE_SCROLL]||e.listenPageScroll)&&(n[Me.ON_PAGE_SCROLL]=Ge(n,Me.ON_PAGE_SCROLL),n.__listenPageScroll__=()=>!0),void 0===n[Me.ON_SHARE_APP_MESSAGE]&&e.canShareToOthers&&(n[Me.ON_SHARE_APP_MESSAGE]=function(t){const e=this[me(Me.ON_SHARE_APP_MESSAGE)];return e?e(t):{}},n.__isInjectedShareToOthersHook__=()=>!0),void 0===n[Me.ON_SHARE_TIMELINE]&&e.canShareToTimeline&&(n[Me.ON_SHARE_TIMELINE]=function(){const t=this[me(Me.ON_SHARE_TIMELINE)];return t?t():{}},n.__isInjectedShareToTimelineHook__=()=>!0),void 0===n[Me.ON_ADD_TO_FAVORITES]&&(n[Me.ON_ADD_TO_FAVORITES]=function(t){const e=this[me(Me.ON_ADD_TO_FAVORITES)];return e?e(t):{}},n.__isInjectedFavoritesHook__=()=>!0),void 0===n[Me.ON_SAVE_EXIT_STATE]&&(n[Me.ON_SAVE_EXIT_STATE]=function(){const t=this[me(Me.ON_SAVE_EXIT_STATE)];return t?t():{data:void 0}},n.__isInjectedExitStateHook__=()=>!0),n[Me.ON_SHOW]=Ge(n,Me.ON_SHOW),n[Me.ON_READY]=Ge(n,Me.ON_READY),n[Me.ON_HIDE]=Ge(n,Me.ON_HIDE),n[Me.ON_ROUTE_DONE]=Ge(n,Me.ON_ROUTE_DONE),n[Me.ON_PULL_DOWN_REFRESH]=Ge(n,Me.ON_PULL_DOWN_REFRESH),n[Me.ON_REACH_BOTTOM]=Ge(n,Me.ON_REACH_BOTTOM),n[Me.ON_RESIZE]=Ge(n,Me.ON_RESIZE),n[Me.ON_TAB_ITEM_TAP]=Ge(n,Me.ON_TAB_ITEM_TAP),Page(n)},exports.effect=function(t,e){t.effect instanceof zt&&(t=t.effect.fn);const s=new zt(t);if(e){const{onStop:t,scheduler:i}=e;if(t){e.onStop=void 0;const n=s.stop.bind(s);s.stop=()=>{n(),t()}}i&&(e.scheduler=void 0,s.notify=()=>{256&s.flags||i()}),n(s,e)}try{s.run()}catch(t){throw s.stop(),t}const i=s.run.bind(s);return i.effect=s,i},exports.effectScope=function(t){return new $t(t)},exports.getCurrentScope=function(){return Kt},exports.getCurrentWatcher=function(){return se},exports.inject=function(t,e,s=!1){return t in Ie?Ie[t]:arguments.length>1?s&&ye(e)?e():e:void 0},exports.isProxy=It,exports.isReactive=Dt,exports.isReadonly=xt,exports.isRef=Ct,exports.isShallow=wt,exports.markRaw=function(t){return!o(t,"__v_skip")&&Object.isExtensible(t)&&((t,e,s,n=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:n,value:s})})(t,"__v_skip",!0),t},exports.nextTick=function(t){const e=he||pe;return t?e.then(t):e},exports.onAddToFavorites=t=>{const e=Ce();if(e&&e.__isInjectedFavoritesHook__){const s=me(Me.ON_ADD_TO_FAVORITES);void 0===e[s]&&(e[s]=t)}},exports.onAppError=Je,exports.onAppHide=ze,exports.onAppShow=Ze,exports.onDetach=ls,exports.onError=hs,exports.onHide=es,exports.onLoad=cs,exports.onMove=us,exports.onPageNotFound=Ke,exports.onPageScroll=t=>{const e=Ce();e&&e.__listenPageScroll__&&ps(e,Me.ON_PAGE_SCROLL,t)},exports.onPullDownRefresh=is,exports.onReachBottom=os,exports.onReady=t=>{const e=Ce();e&&ps(e,Me.ON_READY,t)},exports.onResize=rs,exports.onRouteDone=ns,exports.onSaveExitState=t=>{const e=Ce();if(e&&e.__isInjectedExitStateHook__){const s=me(Me.ON_SAVE_EXIT_STATE);void 0===e[s]&&(e[s]=t)}},exports.onScopeDispose=function(t,e=!1){void 0!==Kt&&(Kt.cleanups[Kt.cleanupsLength++]=t)},exports.onShareAppMessage=t=>{const e=Ce();if(e&&e[Me.ON_SHARE_APP_MESSAGE]&&e.__isInjectedShareToOthersHook__){const s=me(Me.ON_SHARE_APP_MESSAGE);void 0===e[s]&&(e[s]=t)}},exports.onShareTimeline=t=>{const e=Ce();if(e&&e[Me.ON_SHARE_TIMELINE]&&e.__isInjectedShareToTimelineHook__){const s=me(Me.ON_SHARE_TIMELINE);void 0===e[s]&&(e[s]=t)}},exports.onShow=ts,exports.onTabItemTap=as,exports.onThemeChange=qe,exports.onUnhandledRejection=$e,exports.onUnload=ss,exports.onWatcherCleanup=ne,exports.provide=function(t,e){Ie[t]=e},exports.proxyRefs=function(t){return Dt(t)?t:new Proxy(t,Gt)},exports.reactive=Rt,exports.readonly=yt,exports.ref=Ut,exports.shallowReactive=Tt,exports.shallowReadonly=function(t){return mt(t,!0,ut,Ot,Nt)},exports.shallowRef=function(t){return Mt(t)},exports.stop=function(t){t.effect.stop()},exports.toRaw=Lt,exports.toRef=function(t,e,s){return Ct(t)?t:c(t)?new Qt(t):l(t)&&arguments.length>1?Yt(t,e,s):Ut(t)},exports.toRefs=function(t){const e=r(t)?new Array(t.length):{};for(const s in t)e[s]=Yt(t,s);return e},exports.toValue=function(t){return c(t)?t():Wt(t)},exports.triggerRef=kt,exports.unref=Wt,exports.watch=De,exports.watchEffect=function(t,e){return we(t,null,e)},exports.watchPostEffect=function(t,e){return we(t,null,{flush:"post"})},exports.watchSyncEffect=function(t,e){return we(t,null,{flush:"sync"})};
|
package/dist/vue-mini.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="miniprogram-api-typings" />
|
|
2
|
-
import { WatchSource,
|
|
2
|
+
import { WatchSource, DebuggerOptions, WatchCallback, WatchHandle, ReactiveMarker, WatchEffect } from '@vue/reactivity';
|
|
3
3
|
export { ComputedGetter, ComputedRef, ComputedSetter, CustomRefFactory, DebuggerEvent, DebuggerEventExtraInfo, DebuggerOptions, DeepReadonly, EffectScheduler, EffectScope, MaybeRef, MaybeRefOrGetter, Raw, Reactive, ReactiveEffect, ReactiveEffectOptions, ReactiveEffectRunner, ReactiveFlags, Ref, ShallowReactive, ShallowRef, ShallowUnwrapRef, ToRef, ToRefs, TrackOpTypes, TriggerOpTypes, UnwrapNestedRefs, UnwrapRef, WatchCallback, WatchEffect, WatchHandle, WatchSource, WatchStopHandle, WritableComputedOptions, WritableComputedRef, computed, customRef, effect, effectScope, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, onWatcherCleanup, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';
|
|
4
4
|
|
|
5
5
|
type MaybeUndefined<T, I> = I extends true ? T | undefined : T;
|
|
@@ -94,7 +94,7 @@ declare const onReady: (hook: () => unknown) => void;
|
|
|
94
94
|
declare const onLoad: (hook: (query: Query) => unknown) => void;
|
|
95
95
|
declare const onMove: (hook: () => unknown) => void;
|
|
96
96
|
declare const onDetach: (hook: () => unknown) => void;
|
|
97
|
-
declare const onError: (hook: (error:
|
|
97
|
+
declare const onError: (hook: (error: Error) => unknown) => void;
|
|
98
98
|
|
|
99
99
|
export { createApp, defineComponent, definePage, inject, nextTick, onAddToFavorites, onAppError, onAppHide, onAppShow, onDetach, onError, onHide, onLoad, onMove, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, provide, watch, watchEffect, watchPostEffect, watchSyncEffect };
|
|
100
100
|
export type { AppOptions, AppSetup, Bindings, ComponentContext, ComponentOptions, ComponentSetup, Config, InjectionKey, MultiWatchSources, PageContext, PageOptions, PageSetup, Query, WatchOptions, WatchEffectOptions as WatchOptionsBase };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* vue-mini v1.3.0-
|
|
2
|
+
* vue-mini v1.3.0-beta.1
|
|
3
3
|
* https://github.com/vue-mini/vue-mini
|
|
4
4
|
* (c) 2019-present Yang Mingshan
|
|
5
5
|
* @license MIT
|
|
@@ -177,9 +177,7 @@ function watch(source, cb, options) {
|
|
|
177
177
|
return doWatch(source, cb, options);
|
|
178
178
|
}
|
|
179
179
|
class RenderWatcherEffect extends WatcherEffect {
|
|
180
|
-
constructor(
|
|
181
|
-
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
182
|
-
source, cb, options, flush) {
|
|
180
|
+
constructor(source, cb, options, flush) {
|
|
183
181
|
super(source, cb, options);
|
|
184
182
|
this.flush = flush;
|
|
185
183
|
const job = () => {
|
|
@@ -212,9 +210,7 @@ class RenderWatcherEffect extends WatcherEffect {
|
|
|
212
210
|
}
|
|
213
211
|
}
|
|
214
212
|
}
|
|
215
|
-
function doWatch(
|
|
216
|
-
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
217
|
-
source, cb, options = EMPTY_OBJ) {
|
|
213
|
+
function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
218
214
|
const { immediate, deep, flush = 'pre', once } = options;
|
|
219
215
|
if ((process.env.NODE_ENV !== 'production') && !cb) {
|
|
220
216
|
if (immediate !== undefined) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue-mini/core",
|
|
3
|
-
"version": "1.3.0-
|
|
3
|
+
"version": "1.3.0-beta.1",
|
|
4
4
|
"description": "基于 Vue 3 的小程序框架。简单,强大,高性能。 ",
|
|
5
5
|
"main": "dist/vue-mini.cjs.js",
|
|
6
6
|
"module": "dist/vue-mini.esm-bundler.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"小程序"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@vue/reactivity": "3.6.0-
|
|
36
|
-
"miniprogram-api-typings": "~
|
|
35
|
+
"@vue/reactivity": "3.6.0-beta.7",
|
|
36
|
+
"miniprogram-api-typings": "~5.1.1"
|
|
37
37
|
}
|
|
38
38
|
}
|