@vue-mini/core 1.0.3 → 1.1.0

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.
@@ -1,8 +1,8 @@
1
1
  /*!
2
- * vue-mini v1.0.3
2
+ * vue-mini v1.1.0
3
3
  * https://github.com/vue-mini/vue-mini
4
4
  * (c) 2019-present Yang Mingshan
5
5
  * @license MIT
6
6
  */
7
7
  "use strict";
8
- /*! #__NO_SIDE_EFFECTS__ */function e(e,t){const n=new Set(e.split(","));return e=>n.has(e)}const t=()=>{},n=Object.assign,s=Object.prototype.hasOwnProperty,i=(e,t)=>s.call(e,t),o=Array.isArray,r=e=>"[object Map]"===l(e),c=e=>"function"==typeof e,_=e=>"symbol"==typeof e,a=e=>null!==e&&"object"==typeof e,h=Object.prototype.toString,l=e=>h.call(e),u=e=>l(e).slice(8,-1),f=e=>"string"==typeof e&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,d=(e,t)=>!Object.is(e,t);let p,O;class E{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=p,!e&&p&&(this.index=(p.scopes||(p.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const t=p;try{return p=this,e()}finally{p=t}}}on(){p=this}off(){p=this.parent}stop(e){if(this._active){let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);if(!this.detached&&this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0,this._active=!1}}}function v(e,t=p){t&&t.active&&t.effects.push(e)}function S(){return p}class N{constructor(e,t,n,s){this.fn=e,this.trigger=t,this.scheduler=n,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,v(this,s)}get dirty(){if(2===this._dirtyLevel||3===this._dirtyLevel){this._dirtyLevel=1,I();for(let e=0;e<this._depsLength;e++){const t=this.deps[e];if(t.computed&&(A(t.computed),this._dirtyLevel>=4))break}1===this._dirtyLevel&&(this._dirtyLevel=0),D()}return this._dirtyLevel>=4}set dirty(e){this._dirtyLevel=e?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=y,t=O;try{return y=!0,O=this,this._runnings++,R(this),this.fn()}finally{g(this),this._runnings--,O=t,y=e}}stop(){this.active&&(R(this),g(this),this.onStop&&this.onStop(),this.active=!1)}}function A(e){return e.value}function R(e){e._trackId++,e._depsLength=0}function g(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)T(e.deps[t],e);e.deps.length=e._depsLength}}function T(e,t){const n=e.get(t);void 0!==n&&t._trackId!==n&&(e.delete(t),0===e.size&&e.cleanup())}let y=!0,m=0;const b=[];function I(){b.push(y),y=!1}function D(){const e=b.pop();y=void 0===e||e}function L(){m++}function P(){for(m--;!m&&x.length;)x.shift()()}function H(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const n=e.deps[e._depsLength];n!==t?(n&&T(n,e),e.deps[e._depsLength++]=t):e._depsLength++}}const x=[];function w(e,t,n){L();for(const n of e.keys()){let s;n._dirtyLevel<t&&(null!=s?s:s=e.get(n)===n._trackId)&&(n._shouldSchedule||(n._shouldSchedule=0===n._dirtyLevel),n._dirtyLevel=t),n._shouldSchedule&&(null!=s?s:s=e.get(n)===n._trackId)&&(n.trigger(),n._runnings&&!n.allowRecurse||2===n._dirtyLevel||(n._shouldSchedule=!1,n.scheduler&&x.push(n.scheduler)))}P()}const M=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},C=new WeakMap,k=Symbol(""),j=Symbol("");function U(e,t,n){if(y&&O){let t=C.get(e);t||C.set(e,t=new Map);let s=t.get(n);s||t.set(n,s=M((()=>t.delete(n)))),H(O,s)}}function V(e,t,n,s,i,c){const a=C.get(e);if(!a)return;let h=[];if("clear"===t)h=[...a.values()];else if("length"===n&&o(e)){const e=Number(s);a.forEach(((t,n)=>{("length"===n||!_(n)&&n>=e)&&h.push(t)}))}else switch(void 0!==n&&h.push(a.get(n)),t){case"add":o(e)?f(n)&&h.push(a.get("length")):(h.push(a.get(k)),r(e)&&h.push(a.get(j)));break;case"delete":o(e)||(h.push(a.get(k)),r(e)&&h.push(a.get(j)));break;case"set":r(e)&&h.push(a.get(k))}L();for(const e of h)e&&w(e,4);P()}const F=e("__proto__,__v_isRef,__isVue"),G=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(_)),W=B();function B(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=xe(this);for(let e=0,t=this.length;e<t;e++)U(n,0,e+"");const s=n[t](...e);return-1===s||!1===s?n[t](...e.map(xe)):s}})),["push","pop","shift","unshift","splice"].forEach((t=>{e[t]=function(...e){I(),L();const n=xe(this)[t].apply(this,e);return P(),D(),n}})),e}function Y(e){_(e)||(e=String(e));const t=xe(this);return U(t,0,e),t.hasOwnProperty(e)}class z{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){const s=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!s;if("__v_isReadonly"===t)return s;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(s?r?Te:ge:r?Re:Ae).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const c=o(e);if(!s){if(c&&i(W,t))return Reflect.get(W,t,n);if("hasOwnProperty"===t)return Y}const h=Reflect.get(e,t,n);return(_(t)?G.has(t):F(t))?h:(s||U(e,0,t),r?h:Ue(h)?c&&f(t)?h:h.value:a(h)?s?be(h):ye(h):h)}}class Q extends z{constructor(e=!1){super(!1,e)}set(e,t,n,s){let r=e[t];if(!this._isShallow){const t=Le(r);if(Pe(n)||Le(n)||(r=xe(r),n=xe(n)),!o(e)&&Ue(r)&&!Ue(n))return!t&&(r.value=n,!0)}const c=o(e)&&f(t)?Number(t)<e.length:i(e,t),_=Reflect.set(e,t,n,s);return e===xe(s)&&(c?d(n,r)&&V(e,"set",t,n):V(e,"add",t,n)),_}deleteProperty(e,t){const n=i(e,t),s=Reflect.deleteProperty(e,t);return s&&n&&V(e,"delete",t,void 0),s}has(e,t){const n=Reflect.has(e,t);return _(t)&&G.has(t)||U(e,0,t),n}ownKeys(e){return U(e,0,o(e)?"length":k),Reflect.ownKeys(e)}}class X extends z{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}const Z=new Q,J=new X,K=new Q(!0),$=new X(!0),q=e=>e,ee=e=>Reflect.getPrototypeOf(e);function te(e,t,n=!1,s=!1){const i=xe(e=e.__v_raw),o=xe(t);n||(d(t,o)&&U(i,0,t),U(i,0,o));const{has:r}=ee(i),c=s?q:n?Me:we;return r.call(i,t)?c(e.get(t)):r.call(i,o)?c(e.get(o)):void(e!==i&&e.get(t))}function ne(e,t=!1){const n=this.__v_raw,s=xe(n),i=xe(e);return t||(d(e,i)&&U(s,0,e),U(s,0,i)),e===i?n.has(e):n.has(e)||n.has(i)}function se(e,t=!1){return e=e.__v_raw,!t&&U(xe(e),0,k),Reflect.get(e,"size",e)}function ie(e,t=!1){t||Pe(e)||Le(e)||(e=xe(e));const n=xe(this);return ee(n).has.call(n,e)||(n.add(e),V(n,"add",e,e)),this}function oe(e,t,n=!1){n||Pe(t)||Le(t)||(t=xe(t));const s=xe(this),{has:i,get:o}=ee(s);let r=i.call(s,e);r||(e=xe(e),r=i.call(s,e));const c=o.call(s,e);return s.set(e,t),r?d(t,c)&&V(s,"set",e,t):V(s,"add",e,t),this}function re(e){const t=xe(this),{has:n,get:s}=ee(t);let i=n.call(t,e);i||(e=xe(e),i=n.call(t,e)),s&&s.call(t,e);const o=t.delete(e);return i&&V(t,"delete",e,void 0),o}function ce(){const e=xe(this),t=0!==e.size,n=e.clear();return t&&V(e,"clear",void 0,void 0),n}function _e(e,t){return function(n,s){const i=this,o=i.__v_raw,r=xe(o),c=t?q:e?Me:we;return!e&&U(r,0,k),o.forEach(((e,t)=>n.call(s,c(e),c(t),i)))}}function ae(e,t,n){return function(...s){const i=this.__v_raw,o=xe(i),c=r(o),_="entries"===e||e===Symbol.iterator&&c,a="keys"===e&&c,h=i[e](...s),l=n?q:t?Me:we;return!t&&U(o,0,a?j:k),{next(){const{value:e,done:t}=h.next();return t?{value:e,done:t}:{value:_?[l(e[0]),l(e[1])]:l(e),done:t}},[Symbol.iterator](){return this}}}}function he(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function le(){const e={get(e){return te(this,e)},get size(){return se(this)},has:ne,add:ie,set:oe,delete:re,clear:ce,forEach:_e(!1,!1)},t={get(e){return te(this,e,!1,!0)},get size(){return se(this)},has:ne,add(e){return ie.call(this,e,!0)},set(e,t){return oe.call(this,e,t,!0)},delete:re,clear:ce,forEach:_e(!1,!0)},n={get(e){return te(this,e,!0)},get size(){return se(this,!0)},has(e){return ne.call(this,e,!0)},add:he("add"),set:he("set"),delete:he("delete"),clear:he("clear"),forEach:_e(!0,!1)},s={get(e){return te(this,e,!0,!0)},get size(){return se(this,!0)},has(e){return ne.call(this,e,!0)},add:he("add"),set:he("set"),delete:he("delete"),clear:he("clear"),forEach:_e(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((i=>{e[i]=ae(i,!1,!1),n[i]=ae(i,!0,!1),t[i]=ae(i,!1,!0),s[i]=ae(i,!0,!0)})),[e,n,t,s]}const[ue,fe,de,pe]=le();function Oe(e,t){const n=t?e?pe:de:e?fe:ue;return(t,s,o)=>"__v_isReactive"===s?!e:"__v_isReadonly"===s?e:"__v_raw"===s?t:Reflect.get(i(n,s)&&s in t?n:t,s,o)}const Ee={get:Oe(!1,!1)},ve={get:Oe(!1,!0)},Se={get:Oe(!0,!1)},Ne={get:Oe(!0,!0)},Ae=new WeakMap,Re=new WeakMap,ge=new WeakMap,Te=new WeakMap;function ye(e){return Le(e)?e:Ie(e,!1,Z,Ee,Ae)}function me(e){return Ie(e,!1,K,ve,Re)}function be(e){return Ie(e,!0,J,Se,ge)}function Ie(e,t,n,s,i){if(!a(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const o=i.get(e);if(o)return o;const r=(c=e).__v_skip||!Object.isExtensible(c)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(u(c));var c;if(0===r)return e;const _=new Proxy(e,2===r?s:n);return i.set(e,_),_}function De(e){return Le(e)?De(e.__v_raw):!(!e||!e.__v_isReactive)}function Le(e){return!(!e||!e.__v_isReadonly)}function Pe(e){return!(!e||!e.__v_isShallow)}function He(e){return!!e&&!!e.__v_raw}function xe(e){const t=e&&e.__v_raw;return t?xe(t):e}const we=e=>a(e)?ye(e):e,Me=e=>a(e)?be(e):e;class Ce{constructor(e,t,n,s){this.getter=e,this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new N((()=>e(this._value)),(()=>je(this,2===this.effect._dirtyLevel?2:3))),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=n}get value(){const e=xe(this);return e._cacheable&&!e.effect.dirty||!d(e._value,e._value=e.effect.run())||je(e,4),ke(e),e.effect._dirtyLevel>=2&&je(e,2),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function ke(e){var t;y&&O&&(e=xe(e),H(O,null!=(t=e.dep)?t:e.dep=M((()=>e.dep=void 0),e instanceof Ce?e:void 0)))}function je(e,t=4,n,s){const i=(e=xe(e)).dep;i&&w(i,t)}function Ue(e){return!(!e||!0!==e.__v_isRef)}function Ve(e){return Fe(e,!1)}function Fe(e,t){return Ue(e)?e:new Ge(e,t)}class Ge{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:xe(e),this._value=t?e:we(e)}get value(){return ke(this),this._value}set value(e){const t=this.__v_isShallow||Pe(e)||Le(e);e=t?e:xe(e),d(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:we(e),je(this,4))}}function We(e){return Ue(e)?e.value:e}const Be={get:(e,t,n)=>We(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const i=e[t];return Ue(i)&&!Ue(n)?(i.value=n,!0):Reflect.set(e,t,n,s)}};class Ye{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:n}=e((()=>ke(this)),(()=>je(this)));this._get=t,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}class ze{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return function(e,t){const n=C.get(e);return n&&n.get(t)}(xe(this._object),this._key)}}class Qe{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Xe(e,t,n){const s=e[t];return Ue(s)?s:new ze(e,t,n)}const Ze={SKIP:"__v_skip",IS_REACTIVE:"__v_isReactive",IS_READONLY:"__v_isReadonly",IS_SHALLOW:"__v_isShallow",RAW:"__v_raw"},Je=()=>{},{isArray:Ke}=Array,$e=Object.assign;function qe(e,t){const n={};return Object.keys(e).forEach((s=>{t.includes(s)||(n[s]=e[s])})),n}function et(e){return Object.prototype.toString.call(e).slice(8,-1)}function tt(e){return null!==e&&"object"==typeof e}function nt(e){return"Object"===et(e)}function st(e){return"function"==typeof e}function it(e,t){return e!==t&&(e==e||t==t)}function ot(e){return`__${e}__`}let rt=!1,ct=!1;const _t=[];let at=0;const ht=[];let lt=null,ut=0;const ft=Promise.resolve();let dt=null;function pt(e){0!==_t.length&&_t.includes(e,rt&&e.allowRecurse?at+1:at)||(_t.push(e),rt||ct||(ct=!0,dt=ft.then(Et)))}function Ot(){if(ht.length>0){for(lt=[...new Set(ht)],ht.length=0,ut=0;ut<lt.length;ut++){const e=lt[ut];!1!==e.active&&e()}lt=null,ut=0}}function Et(e){ct=!1,rt=!0;try{for(at=0;at<_t.length;at++){const e=_t[at];!1!==e.active&&e()}}finally{at=0,_t.length=0,rt=!1,dt=null}}const vt={};function St(e,t,n){return Nt(e,t,n)}function Nt(e,t,{immediate:n,deep:s,flush:i,once:o}={}){if(t&&o){const e=t;t=(...t)=>{e(...t),E()}}const r=e=>!0===s?e:At(e,!1===s?1:void 0);let c,_,a=!1,h=!1;if(Ue(e)?(c=()=>e.value,a=Pe(e)):De(e)?(c=()=>r(e),a=!0):Ke(e)?(h=!0,a=e.some((e=>De(e)||Pe(e))),c=()=>e.map((e=>Ue(e)?e.value:De(e)?r(e):st(e)?e():void 0))):c=st(e)?t?()=>e():()=>(_&&_(),e(l)):Je,t&&s){const e=c;c=()=>At(e())}const l=e=>{_=p.onStop=()=>{e(),_=p.onStop=void 0}};let u=h?Array.from({length:e.length}).fill(vt):vt;const f=()=>{if(p.active&&p.dirty)if(t){const e=p.run();(s||a||(h?e.some(((e,t)=>it(e,u[t]))):it(e,u)))&&(_&&_(),t(e,u===vt?void 0:h&&u[0]===vt?[]:u,l),u=e)}else p.run()};let d;f.allowRecurse=Boolean(t),d="sync"===i?f:"post"===i?()=>{!function(e){lt&&lt.includes(e,e.allowRecurse?ut+1:ut)||ht.push(e)}(f)}:()=>{pt(f)};const p=new N(c,Je,d),O=S(),E=()=>{p.stop(),O&&function(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}(O.effects,p)};return t?n?f():u=p.run():p.run(),E}function At(e,t=Number.POSITIVE_INFINITY,n){if(t<=0||!tt(e)||e[Ze.SKIP])return e;if((n=n||new Set).has(e))return e;if(n.add(e),t--,Ue(e))At(e.value,t,n);else if(Ke(e))for(let s=0;s<e.length;s++)At(e[s],t,n);else if("Set"===et(e)||function(e){return"Map"===et(e)}(e))e.forEach((e=>{At(e,t,n)}));else if(nt(e)){for(const s in e)At(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&At(e[s],t,n)}return e}const Rt=Object.create(null);let gt=null,Tt=null,yt=null;function mt(){return Tt||yt}var bt,It,Dt;function Lt(e,t){const n=e[t];return function(...e){const s=this[ot(t)];s&&s.forEach((t=>t(...e))),void 0!==n&&n.call(this,...e)}}function Pt(e){if(function(e){const t=new Set(["undefined","boolean","number","string"]);return null===e||t.has(typeof e)}(e)||st(e))return e;if(Ue(e))return Pt(e.value);if(He(e))return Pt(xe(e));if(Ke(e))return e.map((e=>Pt(e)));if(nt(e)){const t={};return Object.keys(e).forEach((n=>{t[n]=Pt(e[n])})),t}throw new TypeError(`${et(e)} value is not supported`)}function Ht(e,t){tt(t)&&St(Ue(t)?t:()=>t,(()=>{this.setData({[e]:Pt(t)},Ot)}),{deep:!0})}function xt(e,t){const n=e[t];return function(...e){const s=this[ot(t)];s&&s.forEach((t=>t(...e))),void 0!==n&&n.call(this,...e)}}!function(e){e.ON_LAUNCH="onLaunch",e.ON_SHOW="onShow",e.ON_HIDE="onHide",e.ON_ERROR="onError",e.ON_PAGE_NOT_FOUND="onPageNotFound",e.ON_UNHANDLED_REJECTION="onUnhandledRejection",e.ON_THEME_CHANGE="onThemeChange"}(bt||(bt={})),function(e){e.ON_LOAD="onLoad",e.ON_SHOW="onShow",e.ON_READY="onReady",e.ON_HIDE="onHide",e.ON_UNLOAD="onUnload",e.ON_ROUTE_DONE="onRouteDone",e.ON_PULL_DOWN_REFRESH="onPullDownRefresh",e.ON_REACH_BOTTOM="onReachBottom",e.ON_PAGE_SCROLL="onPageScroll",e.ON_SHARE_APP_MESSAGE="onShareAppMessage",e.ON_SHARE_TIMELINE="onShareTimeline",e.ON_ADD_TO_FAVORITES="onAddToFavorites",e.ON_RESIZE="onResize",e.ON_TAB_ITEM_TAP="onTabItemTap",e.ON_SAVE_EXIT_STATE="onSaveExitState"}(It||(It={})),function(e){e.ATTACHED="attached",e.READY="ready",e.MOVED="moved",e.DETACHED="detached",e.ERROR="error"}(Dt||(Dt={}));const wt={[It.ON_SHOW]:"show",[It.ON_HIDE]:"hide",[It.ON_RESIZE]:"resize",[It.ON_ROUTE_DONE]:"routeDone",[Dt.READY]:It.ON_READY};function Mt(e,t){return jt(t,e.lifetimes[t]||e[t])}function Ct(e,t){return jt(t,e.methods[t])}function kt(e,t){return jt(t,e.pageLifetimes[wt[t]])}function jt(e,t){const n=ot(e);return function(...e){const s=this[n];s&&s.forEach((t=>t(...e))),void 0!==t&&t.call(this,...e)}}const Ut=sn(bt.ON_SHOW),Vt=sn(bt.ON_HIDE),Ft=sn(bt.ON_ERROR),Gt=sn(bt.ON_PAGE_NOT_FOUND),Wt=sn(bt.ON_UNHANDLED_REJECTION),Bt=sn(bt.ON_THEME_CHANGE),Yt=on(It.ON_SHOW),zt=on(It.ON_HIDE),Qt=on(It.ON_UNLOAD),Xt=on(It.ON_ROUTE_DONE),Zt=on(It.ON_PULL_DOWN_REFRESH),Jt=on(It.ON_REACH_BOTTOM),Kt=on(It.ON_RESIZE),$t=on(It.ON_TAB_ITEM_TAP),qt=rn(It.ON_LOAD),en=rn(Dt.MOVED),tn=rn(Dt.DETACHED),nn=rn(Dt.ERROR);function sn(e){return t=>{gt&&cn(gt,e,t)}}function on(e){return t=>{const n=mt();n&&cn(n,e,t)}}function rn(e){return t=>{yt&&cn(yt,e,t)}}function cn(e,t,n){const s=ot(t);void 0===e[s]&&(e[s]=[]),e[s].push(n)}exports.EffectScope=E,exports.ReactiveEffect=N,exports.TrackOpTypes={GET:"get",HAS:"has",ITERATE:"iterate"},exports.TriggerOpTypes={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},exports.computed=function(e,n,s=!1){let i,o;const r=c(e);return r?(i=e,o=t):(i=e.get,o=e.set),new Ce(i,o,r||!o,s)},exports.createApp=function(e){let t,n;if(st(e))t=e,n={};else{if(void 0===e.setup)return void App(e);t=e.setup,n=qe(e,["setup"])}const s=n[bt.ON_LAUNCH];n[bt.ON_LAUNCH]=function(e){gt=this;const n=t(e);void 0!==n&&Object.keys(n).forEach((e=>{this[e]=n[e]})),gt=null,void 0!==s&&s.call(this,e)},n[bt.ON_SHOW]=Lt(n,bt.ON_SHOW),n[bt.ON_HIDE]=Lt(n,bt.ON_HIDE),n[bt.ON_ERROR]=Lt(n,bt.ON_ERROR),n[bt.ON_PAGE_NOT_FOUND]=Lt(n,bt.ON_PAGE_NOT_FOUND),n[bt.ON_UNHANDLED_REJECTION]=Lt(n,bt.ON_UNHANDLED_REJECTION),n[bt.ON_THEME_CHANGE]=Lt(n,bt.ON_THEME_CHANGE),App(n)},exports.customRef=function(e){return new Ye(e)},exports.defineComponent=function(e,t){let n,s;t=$e({listenPageScroll:!1,canShareToOthers:!1,canShareToTimeline:!1},t);let i=null;if(st(e))n=e,s={};else{if(void 0===e.setup)return Component(e);n=e.setup,s=qe(e,["setup"]),s.properties&&(i=Object.keys(s.properties))}void 0===s.lifetimes&&(s.lifetimes={});const o=s.lifetimes[Dt.ATTACHED]||s[Dt.ATTACHED];s.lifetimes[Dt.ATTACHED]=function(){var e;this.__scope__=new E,yt=e=this,e.__scope__.on();const t={};i&&i.forEach((e=>{t[e]=this.data[e]})),this.__props__=me(t);const s={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)},r=n(this.__props__,s);void 0!==r&&Object.keys(r).forEach((e=>{const t=r[e];st(t)?this[e]=t:(this.setData({[e]:Pt(t)}),Ht.call(this,e,t))})),yt&&yt.__scope__.off(),yt=null,void 0!==o&&o.call(this)};const r=Mt(s,Dt.DETACHED);return s.lifetimes[Dt.DETACHED]=function(){r.call(this),this.__scope__.stop()},s.lifetimes[Dt.READY]=jt(wt[Dt.READY],s.lifetimes[Dt.READY]||s[Dt.READY]),s.lifetimes[Dt.MOVED]=Mt(s,Dt.MOVED),s.lifetimes[Dt.ERROR]=Mt(s,Dt.ERROR),void 0===s.methods&&(s.methods={}),(s.methods[It.ON_PAGE_SCROLL]||t.listenPageScroll)&&(s.methods[It.ON_PAGE_SCROLL]=Ct(s,It.ON_PAGE_SCROLL),s.methods.__listenPageScroll__=()=>!0),void 0===s.methods[It.ON_SHARE_APP_MESSAGE]&&t.canShareToOthers&&(s.methods[It.ON_SHARE_APP_MESSAGE]=function(e){const t=this[ot(It.ON_SHARE_APP_MESSAGE)];return t?t(e):{}},s.methods.__isInjectedShareToOthersHook__=()=>!0),void 0===s.methods[It.ON_SHARE_TIMELINE]&&t.canShareToTimeline&&(s.methods[It.ON_SHARE_TIMELINE]=function(){const e=this[ot(It.ON_SHARE_TIMELINE)];return e?e():{}},s.methods.__isInjectedShareToTimelineHook__=()=>!0),void 0===s.methods[It.ON_ADD_TO_FAVORITES]&&(s.methods[It.ON_ADD_TO_FAVORITES]=function(e){const t=this[ot(It.ON_ADD_TO_FAVORITES)];return t?t(e):{}},s.methods.__isInjectedFavoritesHook__=()=>!0),void 0===s.methods[It.ON_SAVE_EXIT_STATE]&&(s.methods[It.ON_SAVE_EXIT_STATE]=function(){const e=this[ot(It.ON_SAVE_EXIT_STATE)];return e?e():{data:void 0}},s.methods.__isInjectedExitStateHook__=()=>!0),s.methods[It.ON_LOAD]=Ct(s,It.ON_LOAD),s.methods[It.ON_PULL_DOWN_REFRESH]=Ct(s,It.ON_PULL_DOWN_REFRESH),s.methods[It.ON_REACH_BOTTOM]=Ct(s,It.ON_REACH_BOTTOM),s.methods[It.ON_TAB_ITEM_TAP]=Ct(s,It.ON_TAB_ITEM_TAP),void 0===s.pageLifetimes&&(s.pageLifetimes={}),s.pageLifetimes[wt[It.ON_SHOW]]=kt(s,It.ON_SHOW),s.pageLifetimes[wt[It.ON_HIDE]]=kt(s,It.ON_HIDE),s.pageLifetimes[wt[It.ON_RESIZE]]=kt(s,It.ON_RESIZE),s.pageLifetimes[wt[It.ON_ROUTE_DONE]]=kt(s,It.ON_ROUTE_DONE),i&&(void 0===s.observers&&(s.observers={}),i.forEach((e=>{const t=s.observers[e];s.observers[e]=function(n){this.__props__&&(this.__props__[e]=n),void 0!==t&&t.call(this,n)}}))),Component(s)},exports.definePage=function(e,t){let n,s;if(t=$e({listenPageScroll:!1,canShareToOthers:!1,canShareToTimeline:!1},t),st(e))n=e,s={};else{if(void 0===e.setup)return void Page(e);n=e.setup,s=qe(e,["setup"])}const i=s[It.ON_LOAD];s[It.ON_LOAD]=function(e){var t;this.__scope__=new E,Tt=t=this,t.__scope__.on();const s={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)},o=n(e,s);void 0!==o&&Object.keys(o).forEach((e=>{const t=o[e];st(t)?this[e]=t:(this.setData({[e]:Pt(t)}),Ht.call(this,e,t))})),Tt&&Tt.__scope__.off(),Tt=null,void 0!==i&&i.call(this,e)};const o=xt(s,It.ON_UNLOAD);s[It.ON_UNLOAD]=function(){o.call(this),this.__scope__.stop()},(s[It.ON_PAGE_SCROLL]||t.listenPageScroll)&&(s[It.ON_PAGE_SCROLL]=xt(s,It.ON_PAGE_SCROLL),s.__listenPageScroll__=()=>!0),void 0===s[It.ON_SHARE_APP_MESSAGE]&&t.canShareToOthers&&(s[It.ON_SHARE_APP_MESSAGE]=function(e){const t=this[ot(It.ON_SHARE_APP_MESSAGE)];return t?t(e):{}},s.__isInjectedShareToOthersHook__=()=>!0),void 0===s[It.ON_SHARE_TIMELINE]&&t.canShareToTimeline&&(s[It.ON_SHARE_TIMELINE]=function(){const e=this[ot(It.ON_SHARE_TIMELINE)];return e?e():{}},s.__isInjectedShareToTimelineHook__=()=>!0),void 0===s[It.ON_ADD_TO_FAVORITES]&&(s[It.ON_ADD_TO_FAVORITES]=function(e){const t=this[ot(It.ON_ADD_TO_FAVORITES)];return t?t(e):{}},s.__isInjectedFavoritesHook__=()=>!0),void 0===s[It.ON_SAVE_EXIT_STATE]&&(s[It.ON_SAVE_EXIT_STATE]=function(){const e=this[ot(It.ON_SAVE_EXIT_STATE)];return e?e():{data:void 0}},s.__isInjectedExitStateHook__=()=>!0),s[It.ON_SHOW]=xt(s,It.ON_SHOW),s[It.ON_READY]=xt(s,It.ON_READY),s[It.ON_HIDE]=xt(s,It.ON_HIDE),s[It.ON_ROUTE_DONE]=xt(s,It.ON_ROUTE_DONE),s[It.ON_PULL_DOWN_REFRESH]=xt(s,It.ON_PULL_DOWN_REFRESH),s[It.ON_REACH_BOTTOM]=xt(s,It.ON_REACH_BOTTOM),s[It.ON_RESIZE]=xt(s,It.ON_RESIZE),s[It.ON_TAB_ITEM_TAP]=xt(s,It.ON_TAB_ITEM_TAP),Page(s)},exports.effect=function(e,s){e.effect instanceof N&&(e=e.effect.fn);const i=new N(e,t,(()=>{i.dirty&&i.run()}));s&&(n(i,s),s.scope&&v(i,s.scope)),s&&s.lazy||i.run();const o=i.run.bind(i);return o.effect=i,o},exports.effectScope=function(e){return new E(e)},exports.getCurrentScope=S,exports.inject=function(e,t,n=!1){return e in Rt?Rt[e]:arguments.length>1?n&&st(t)?t():t:void 0},exports.isProxy=He,exports.isReactive=De,exports.isReadonly=Le,exports.isRef=Ue,exports.isShallow=Pe,exports.markRaw=function(e){return Object.isExtensible(e)&&((e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})})(e,"__v_skip",!0),e},exports.nextTick=function(e){const t=dt||ft;return e?t.then(e):t},exports.onAddToFavorites=e=>{const t=mt();if(t&&t.__isInjectedFavoritesHook__){const n=ot(It.ON_ADD_TO_FAVORITES);void 0===t[n]&&(t[n]=e)}},exports.onAppError=Ft,exports.onAppHide=Vt,exports.onAppShow=Ut,exports.onDetach=tn,exports.onError=nn,exports.onHide=zt,exports.onLoad=qt,exports.onMove=en,exports.onPageNotFound=Gt,exports.onPageScroll=e=>{const t=mt();t&&t.__listenPageScroll__&&cn(t,It.ON_PAGE_SCROLL,e)},exports.onPullDownRefresh=Zt,exports.onReachBottom=Jt,exports.onReady=e=>{const t=mt();t&&cn(t,It.ON_READY,e)},exports.onResize=Kt,exports.onRouteDone=Xt,exports.onSaveExitState=e=>{const t=mt();if(t&&t.__isInjectedExitStateHook__){const n=ot(It.ON_SAVE_EXIT_STATE);void 0===t[n]&&(t[n]=e)}},exports.onScopeDispose=function(e){p&&p.cleanups.push(e)},exports.onShareAppMessage=e=>{const t=mt();if(t&&t[It.ON_SHARE_APP_MESSAGE]&&t.__isInjectedShareToOthersHook__){const n=ot(It.ON_SHARE_APP_MESSAGE);void 0===t[n]&&(t[n]=e)}},exports.onShareTimeline=e=>{const t=mt();if(t&&t[It.ON_SHARE_TIMELINE]&&t.__isInjectedShareToTimelineHook__){const n=ot(It.ON_SHARE_TIMELINE);void 0===t[n]&&(t[n]=e)}},exports.onShow=Yt,exports.onTabItemTap=$t,exports.onThemeChange=Bt,exports.onUnhandledRejection=Wt,exports.onUnload=Qt,exports.provide=function(e,t){Rt[e]=t},exports.proxyRefs=function(e){return De(e)?e:new Proxy(e,Be)},exports.reactive=ye,exports.readonly=be,exports.ref=Ve,exports.shallowReactive=me,exports.shallowReadonly=function(e){return Ie(e,!0,$,Ne,Te)},exports.shallowRef=function(e){return Fe(e,!0)},exports.stop=function(e){e.effect.stop()},exports.toRaw=xe,exports.toRef=function(e,t,n){return Ue(e)?e:c(e)?new Qe(e):a(e)&&arguments.length>1?Xe(e,t,n):Ve(e)},exports.toRefs=function(e){const t=o(e)?new Array(e.length):{};for(const n in e)t[n]=Xe(e,n);return t},exports.toValue=function(e){return c(e)?e():We(e)},exports.triggerRef=function(e){je(e,4)},exports.unref=We,exports.watch=St,exports.watchEffect=function(e,t){return Nt(e,null,t)},exports.watchPostEffect=function(e,t){return Nt(e,null,{flush:"post"})},exports.watchSyncEffect=function(e,t){return Nt(e,null,{flush:"sync"})};
8
+ /*! #__NO_SIDE_EFFECTS__ */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=(t,e)=>{const s=t.indexOf(e);s>-1&&t.splice(s,1)},o=Object.prototype.hasOwnProperty,r=(t,e)=>o.call(t,e),c=Array.isArray,a=t=>"[object Map]"===p(t),l=t=>"[object Set]"===p(t),u=t=>"function"==typeof t,h=t=>"symbol"==typeof t,_=t=>null!==t&&"object"==typeof t,f=Object.prototype.toString,p=t=>f.call(t),d=t=>p(t).slice(8,-1),E=t=>"[object Object]"===p(t),O=t=>"string"==typeof t&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,v=(t,e)=>!Object.is(t,e);let g,S;class N{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=g,!t&&g&&(this.index=(g.scopes||(g.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let t,e;if(this._isPaused=!0,this.scopes)for(t=0,e=this.scopes.length;t<e;t++)this.scopes[t].pause();for(t=0,e=this.effects.length;t<e;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){let t,e;if(this._isPaused=!1,this.scopes)for(t=0,e=this.scopes.length;t<e;t++)this.scopes[t].resume();for(t=0,e=this.effects.length;t<e;t++)this.effects[t].resume()}}run(t){if(this._active){const e=g;try{return g=this,t()}finally{g=e}}}on(){g=this}off(){g=this.parent}stop(t){if(this._active){let e,s;for(e=0,s=this.effects.length;e<s;e++)this.effects[e].stop();for(e=0,s=this.cleanups.length;e<s;e++)this.cleanups[e]();if(this.scopes)for(e=0,s=this.scopes.length;e<s;e++)this.scopes[e].stop(!0);if(!this.detached&&this.parent&&!t){const t=this.parent.scopes.pop();t&&t!==this&&(this.parent.scopes[this.index]=t,t.index=this.index)}this.parent=void 0,this._active=!1}}}function A(){return g}const R=new WeakSet;class T{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.nextEffect=void 0,this.cleanup=void 0,this.scheduler=void 0,g&&g.active&&g.effects.push(this)}pause(){this.flags|=64}resume(){64&this.flags&&(this.flags&=-65,R.has(this)&&(R.delete(this),this.trigger()))}notify(){2&this.flags&&!(32&this.flags)||8&this.flags||(this.flags|=8,this.nextEffect=b,b=this)}run(){if(!(1&this.flags))return this.fn();this.flags|=2,j(this),x(this);const t=S,e=U;S=this,U=!0;try{return this.fn()}finally{I(this),S=t,U=e,this.flags&=-3}}stop(){if(1&this.flags){for(let t=this.deps;t;t=t.nextDep)w(t);this.deps=this.depsTail=void 0,j(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?R.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){P(this)&&this.run()}get dirty(){return P(this)}}let b,m=0;function D(){m++}function y(){if(--m>0)return;let t;for(;b;){let e=b;for(b=void 0;e;){const s=e.nextEffect;if(e.nextEffect=void 0,e.flags&=-9,1&e.flags)try{e.trigger()}catch(e){t||(t=e)}e=s}}if(t)throw t}function x(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function I(t){let e,s=t.depsTail,n=s;for(;n;){const t=n.prevDep;-1===n.version?(n===s&&(s=t),w(n),H(n)):e=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=t}t.deps=e,t.depsTail=s}function P(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&L(e.dep.computed)||e.dep.version!==e.version)return!0;return!!t._dirty}function L(t){if(4&t.flags&&!(16&t.flags))return;if(t.flags&=-17,t.globalVersion===W)return;t.globalVersion=W;const e=t.dep;if(t.flags|=2,e.version>0&&!t.isSSR&&!P(t))return void(t.flags&=-3);const s=S,n=U;S=t,U=!0;try{x(t);const s=t.fn(t._value);(0===e.version||v(s,t._value))&&(t._value=s,e.version++)}catch(t){throw e.version++,t}finally{S=s,U=n,I(t),t.flags&=-3}}function w(t){const{dep:e,prevSub:s,nextSub:n}=t;if(s&&(s.nextSub=n,t.prevSub=void 0),n&&(n.prevSub=s,t.nextSub=void 0),e.subs===t&&(e.subs=s),!e.subs&&e.computed){e.computed.flags&=-5;for(let t=e.computed.deps;t;t=t.nextDep)w(t)}}function H(t){const{prevDep:e,nextDep:s}=t;e&&(e.nextDep=s,t.prevDep=void 0),s&&(s.prevDep=e,t.nextDep=void 0)}let U=!0;const C=[];function k(){C.push(U),U=!1}function M(){const t=C.pop();U=void 0===t||t}function j(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const t=S;S=void 0;try{e()}finally{S=t}}}let W=0;class V{constructor(t,e){this.sub=t,this.dep=e,this.version=e.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class G{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0}track(t){if(!S||!U||S===this.computed)return;let e=this.activeLink;if(void 0===e||e.sub!==S)e=this.activeLink=new V(S,this),S.deps?(e.prevDep=S.depsTail,S.depsTail.nextDep=e,S.depsTail=e):S.deps=S.depsTail=e,4&S.flags&&F(e);else if(-1===e.version&&(e.version=this.version,e.nextDep)){const t=e.nextDep;t.prevDep=e.prevDep,e.prevDep&&(e.prevDep.nextDep=t),e.prevDep=S.depsTail,e.nextDep=void 0,S.depsTail.nextDep=e,S.depsTail=e,S.deps===e&&(S.deps=t)}return e}trigger(t){this.version++,W++,this.notify(t)}notify(t){D();try{0;for(let t=this.subs;t;t=t.prevSub)t.sub.notify()}finally{y()}}}function F(t){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let t=e.deps;t;t=t.nextDep)F(t)}const s=t.dep.subs;s!==t&&(t.prevSub=s,s&&(s.nextSub=t)),t.dep.subs=t}const Q=new WeakMap,B=Symbol(""),Y=Symbol(""),z=Symbol("");function X(t,e,s){if(U&&S){let e=Q.get(t);e||Q.set(t,e=new Map);let n=e.get(s);n||e.set(s,n=new G),n.track()}}function Z(t,e,s,n,i,o){const r=Q.get(t);if(!r)return void W++;const l=t=>{t&&t.trigger()};if(D(),"clear"===e)r.forEach(l);else{const i=c(t),o=i&&O(s);if(i&&"length"===s){const t=Number(n);r.forEach(((e,s)=>{("length"===s||s===z||!h(s)&&s>=t)&&l(e)}))}else switch(void 0!==s&&l(r.get(s)),o&&l(r.get(z)),e){case"add":i?o&&l(r.get("length")):(l(r.get(B)),a(t)&&l(r.get(Y)));break;case"delete":i||(l(r.get(B)),a(t)&&l(r.get(Y)));break;case"set":a(t)&&l(r.get(B))}}y()}function J(t){const e=Zt(t);return e===t?e:(X(e,0,z),zt(t)?e:e.map(Jt))}function K(t){return X(t=Zt(t),0,z),t}const $={__proto__:null,[Symbol.iterator](){return q(this,Symbol.iterator,Jt)},concat(...t){return J(this).concat(...t.map((t=>c(t)?J(t):t)))},entries(){return q(this,"entries",(t=>(t[1]=Jt(t[1]),t)))},every(t,e){return et(this,"every",t,e,void 0,arguments)},filter(t,e){return et(this,"filter",t,e,(t=>t.map(Jt)),arguments)},find(t,e){return et(this,"find",t,e,Jt,arguments)},findIndex(t,e){return et(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return et(this,"findLast",t,e,Jt,arguments)},findLastIndex(t,e){return et(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return et(this,"forEach",t,e,void 0,arguments)},includes(...t){return nt(this,"includes",t)},indexOf(...t){return nt(this,"indexOf",t)},join(t){return J(this).join(t)},lastIndexOf(...t){return nt(this,"lastIndexOf",t)},map(t,e){return et(this,"map",t,e,void 0,arguments)},pop(){return it(this,"pop")},push(...t){return it(this,"push",t)},reduce(t,...e){return st(this,"reduce",t,e)},reduceRight(t,...e){return st(this,"reduceRight",t,e)},shift(){return it(this,"shift")},some(t,e){return et(this,"some",t,e,void 0,arguments)},splice(...t){return it(this,"splice",t)},toReversed(){return J(this).toReversed()},toSorted(t){return J(this).toSorted(t)},toSpliced(...t){return J(this).toSpliced(...t)},unshift(...t){return it(this,"unshift",t)},values(){return q(this,"values",Jt)}};function q(t,e,s){const n=K(t),i=n[e]();return n===t||zt(t)||(i._next=i.next,i.next=()=>{const t=i._next();return t.value&&(t.value=s(t.value)),t}),i}const tt=Array.prototype;function et(t,e,s,n,i,o){const r=K(t),c=r!==t&&!zt(t),a=r[e];if(a!==tt[e]){const e=a.apply(t,o);return c?Jt(e):e}let l=s;r!==t&&(c?l=function(e,n){return s.call(this,Jt(e),n,t)}:s.length>2&&(l=function(e,n){return s.call(this,e,n,t)}));const u=a.call(r,l,n);return c&&i?i(u):u}function st(t,e,s,n){const i=K(t);let o=s;return i!==t&&(zt(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,Jt(n),i,t)}),i[e](o,...n)}function nt(t,e,s){const n=Zt(t);X(n,0,z);const i=n[e](...s);return-1!==i&&!1!==i||!Xt(s[0])?i:(s[0]=Zt(s[0]),n[e](...s))}function it(t,e,s=[]){k(),D();const n=Zt(t)[e].apply(t,s);return y(),M(),n}const ot=t("__proto__,__v_isRef,__isVue"),rt=new Set(Object.getOwnPropertyNames(Symbol).filter((t=>"arguments"!==t&&"caller"!==t)).map((t=>Symbol[t])).filter(h));function ct(t){h(t)||(t=String(t));const e=Zt(this);return X(e,0,t),e.hasOwnProperty(t)}class at{constructor(t=!1,e=!1){this._isReadonly=t,this._isShallow=e}get(t,e,s){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?Wt:jt:i?Mt:kt).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=c(t);if(!n){let t;if(o&&(t=$[e]))return t;if("hasOwnProperty"===e)return ct}const r=Reflect.get(t,e,$t(t)?t:s);return(h(e)?rt.has(e):ot(e))?r:(n||X(t,0,e),i?r:$t(r)?o&&O(e)?r:r.value:_(r)?n?Ft(r):Vt(r):r)}}class lt extends at{constructor(t=!1){super(!1,t)}set(t,e,s,n){let i=t[e];if(!this._isShallow){const e=Yt(i);if(zt(s)||Yt(s)||(i=Zt(i),s=Zt(s)),!c(t)&&$t(i)&&!$t(s))return!e&&(i.value=s,!0)}const o=c(t)&&O(e)?Number(e)<t.length:r(t,e),a=Reflect.set(t,e,s,$t(t)?t:n);return t===Zt(n)&&(o?v(s,i)&&Z(t,"set",e,s):Z(t,"add",e,s)),a}deleteProperty(t,e){const s=r(t,e),n=Reflect.deleteProperty(t,e);return n&&s&&Z(t,"delete",e,void 0),n}has(t,e){const s=Reflect.has(t,e);return h(e)&&rt.has(e)||X(t,0,e),s}ownKeys(t){return X(t,0,c(t)?"length":B),Reflect.ownKeys(t)}}class ut extends at{constructor(t=!1){super(!0,t)}set(t,e){return!0}deleteProperty(t,e){return!0}}const ht=new lt,_t=new ut,ft=new lt(!0),pt=new ut(!0),dt=t=>t,Et=t=>Reflect.getPrototypeOf(t);function Ot(t,e,s=!1,n=!1){const i=Zt(t=t.__v_raw),o=Zt(e);s||(v(e,o)&&X(i,0,e),X(i,0,o));const{has:r}=Et(i),c=n?dt:s?Kt:Jt;return r.call(i,e)?c(t.get(e)):r.call(i,o)?c(t.get(o)):void(t!==i&&t.get(e))}function vt(t,e=!1){const s=this.__v_raw,n=Zt(s),i=Zt(t);return e||(v(t,i)&&X(n,0,t),X(n,0,i)),t===i?s.has(t):s.has(t)||s.has(i)}function gt(t,e=!1){return t=t.__v_raw,!e&&X(Zt(t),0,B),Reflect.get(t,"size",t)}function St(t,e=!1){e||zt(t)||Yt(t)||(t=Zt(t));const s=Zt(this);return Et(s).has.call(s,t)||(s.add(t),Z(s,"add",t,t)),this}function Nt(t,e,s=!1){s||zt(e)||Yt(e)||(e=Zt(e));const n=Zt(this),{has:i,get:o}=Et(n);let r=i.call(n,t);r||(t=Zt(t),r=i.call(n,t));const c=o.call(n,t);return n.set(t,e),r?v(e,c)&&Z(n,"set",t,e):Z(n,"add",t,e),this}function At(t){const e=Zt(this),{has:s,get:n}=Et(e);let i=s.call(e,t);i||(t=Zt(t),i=s.call(e,t)),n&&n.call(e,t);const o=e.delete(t);return i&&Z(e,"delete",t,void 0),o}function Rt(){const t=Zt(this),e=0!==t.size,s=t.clear();return e&&Z(t,"clear",void 0,void 0),s}function Tt(t,e){return function(s,n){const i=this,o=i.__v_raw,r=Zt(o),c=e?dt:t?Kt:Jt;return!t&&X(r,0,B),o.forEach(((t,e)=>s.call(n,c(t),c(e),i)))}}function bt(t,e,s){return function(...n){const i=this.__v_raw,o=Zt(i),r=a(o),c="entries"===t||t===Symbol.iterator&&r,l="keys"===t&&r,u=i[t](...n),h=s?dt:e?Kt:Jt;return!e&&X(o,0,l?Y:B),{next(){const{value:t,done:e}=u.next();return e?{value:t,done:e}:{value:c?[h(t[0]),h(t[1])]:h(t),done:e}},[Symbol.iterator](){return this}}}}function mt(t){return function(...e){return"delete"!==t&&("clear"===t?void 0:this)}}function Dt(){const t={get(t){return Ot(this,t)},get size(){return gt(this)},has:vt,add:St,set:Nt,delete:At,clear:Rt,forEach:Tt(!1,!1)},e={get(t){return Ot(this,t,!1,!0)},get size(){return gt(this)},has:vt,add(t){return St.call(this,t,!0)},set(t,e){return Nt.call(this,t,e,!0)},delete:At,clear:Rt,forEach:Tt(!1,!0)},s={get(t){return Ot(this,t,!0)},get size(){return gt(this,!0)},has(t){return vt.call(this,t,!0)},add:mt("add"),set:mt("set"),delete:mt("delete"),clear:mt("clear"),forEach:Tt(!0,!1)},n={get(t){return Ot(this,t,!0,!0)},get size(){return gt(this,!0)},has(t){return vt.call(this,t,!0)},add:mt("add"),set:mt("set"),delete:mt("delete"),clear:mt("clear"),forEach:Tt(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((i=>{t[i]=bt(i,!1,!1),s[i]=bt(i,!0,!1),e[i]=bt(i,!1,!0),n[i]=bt(i,!0,!0)})),[t,s,e,n]}const[yt,xt,It,Pt]=Dt();function Lt(t,e){const s=e?t?Pt:It:t?xt:yt;return(e,n,i)=>"__v_isReactive"===n?!t:"__v_isReadonly"===n?t:"__v_raw"===n?e:Reflect.get(r(s,n)&&n in e?s:e,n,i)}const wt={get:Lt(!1,!1)},Ht={get:Lt(!1,!0)},Ut={get:Lt(!0,!1)},Ct={get:Lt(!0,!0)},kt=new WeakMap,Mt=new WeakMap,jt=new WeakMap,Wt=new WeakMap;function Vt(t){return Yt(t)?t:Qt(t,!1,ht,wt,kt)}function Gt(t){return Qt(t,!1,ft,Ht,Mt)}function Ft(t){return Qt(t,!0,_t,Ut,jt)}function Qt(t,e,s,n,i){if(!_(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const o=i.get(t);if(o)return o;const r=(c=t).__v_skip||!Object.isExtensible(c)?0:function(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(d(c));var c;if(0===r)return t;const a=new Proxy(t,2===r?n:s);return i.set(t,a),a}function Bt(t){return Yt(t)?Bt(t.__v_raw):!(!t||!t.__v_isReactive)}function Yt(t){return!(!t||!t.__v_isReadonly)}function zt(t){return!(!t||!t.__v_isShallow)}function Xt(t){return!!t&&!!t.__v_raw}function Zt(t){const e=t&&t.__v_raw;return e?Zt(e):t}const Jt=t=>_(t)?Vt(t):t,Kt=t=>_(t)?Ft(t):t;function $t(t){return!!t&&!0===t.__v_isRef}function qt(t){return te(t,!1)}function te(t,e){return $t(t)?t:new ee(t,e)}class ee{constructor(t,e){this.dep=new G,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=e?t:Zt(t),this._value=e?t:Jt(t),this.__v_isShallow=e}get value(){return this.dep.track(),this._value}set value(t){const e=this._rawValue,s=this.__v_isShallow||zt(t)||Yt(t);t=s?t:Zt(t),v(t,e)&&(this._rawValue=t,this._value=s?t:Jt(t),this.dep.trigger())}}function se(t){return $t(t)?t.value:t}const ne={get:(t,e,s)=>"__v_raw"===e?t:se(Reflect.get(t,e,s)),set:(t,e,s,n)=>{const i=t[e];return $t(i)&&!$t(s)?(i.value=s,!0):Reflect.set(t,e,s,n)}};class ie{constructor(t){this.__v_isRef=!0,this._value=void 0;const e=this.dep=new G,{get:s,set:n}=t(e.track.bind(e),e.trigger.bind(e));this._get=s,this._set=n}get value(){return this._value=this._get()}set value(t){this._set(t)}}class oe{constructor(t,e,s){this._object=t,this._key=e,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=void 0===t?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return t=Zt(this._object),e=this._key,null==(s=Q.get(t))?void 0:s.get(e);var t,e,s}}class re{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 ce(t,e,s){const n=t[e];return $t(n)?n:new oe(t,e,s)}class ae{constructor(t,e,s){this.fn=t,this.setter=e,this._value=void 0,this.dep=new G(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=W-1,this.effect=this,this.__v_isReadonly=!e,this.isSSR=s}notify(){this.flags|=16,S!==this&&this.dep.notify()}get value(){const t=this.dep.track();return L(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}const le={},ue=new WeakMap;let he;function _e(t,e=!1,s=he){if(s){let e=ue.get(s);e||ue.set(s,e=[]),e.push(t)}}function fe(t,e=1/0,s){if(e<=0||!_(t)||t.__v_skip)return t;if((s=s||new Set).has(t))return t;if(s.add(t),e--,$t(t))fe(t.value,e,s);else if(c(t))for(let n=0;n<t.length;n++)fe(t[n],e,s);else if(l(t)||a(t))t.forEach((t=>{fe(t,e,s)}));else if(E(t)){for(const n in t)fe(t[n],e,s);for(const n of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,n)&&fe(t[n],e,s)}return t}const pe={},{isArray:de}=Array,Ee=Object.assign;function Oe(t,e){const s={};return Object.keys(t).forEach((n=>{e.includes(n)||(s[n]=t[n])})),s}function ve(t){return Object.prototype.toString.call(t).slice(8,-1)}function ge(t){return"function"==typeof t}function Se(t){return`__${t}__`}var Ne;!function(t){t[t.QUEUED=1]="QUEUED",t[t.ALLOW_RECURSE=4]="ALLOW_RECURSE"}(Ne||(Ne={}));let Ae=!1,Re=!1;const Te=[];let be=0;const me=[];let De=null,ye=0;const xe=Promise.resolve();let Ie=null;function Pe(t){t.flags&Ne.QUEUED||(Te.push(t),t.flags|=Ne.QUEUED,Ae||Re||(Re=!0,Ie=xe.then(we)))}function Le(){if(me.length>0){for(De=[...new Set(me)],me.length=0,ye=0;ye<De.length;ye++){const t=De[ye];t.flags&Ne.ALLOW_RECURSE&&(t.flags&=~Ne.QUEUED),t(),t.flags&=~Ne.QUEUED}De=null,ye=0}}function we(t){Re=!1,Ae=!0;try{for(be=0;be<Te.length;be++){const t=Te[be];0,t.flags&Ne.ALLOW_RECURSE&&(t.flags&=~Ne.QUEUED),t(),t.flags&=~Ne.QUEUED}}finally{for(;be<Te.length;be++){Te[be].flags&=~Ne.QUEUED}be=0,Te.length=0,Ae=!1,Ie=null}}function He(t,e,s){return Ue(t,e,s)}function Ue(t,n,o=pe){const{flush:r}=o,a=Ee({},o);"post"===r?a.scheduler=t=>{!function(t){t.flags&Ne.QUEUED||(me.push(t),t.flags|=Ne.QUEUED)}(t)}:"sync"!==r&&(a.scheduler=(t,e)=>{e?t():Pe(t)}),a.augmentJob=t=>{n&&(t.flags|=Ne.ALLOW_RECURSE)};const l=function(t,n,o=e){const{immediate:r,deep:a,once:l,scheduler:h,augmentJob:_,call:f}=o,p=t=>a?t:zt(t)||!1===a||0===a?fe(t,1):fe(t);let d,E,O,g,S=!1,N=!1;if($t(t)?(E=()=>t.value,S=zt(t)):Bt(t)?(E=()=>p(t),S=!0):c(t)?(N=!0,S=t.some((t=>Bt(t)||zt(t))),E=()=>t.map((t=>$t(t)?t.value:Bt(t)?p(t):u(t)?f?f(t,2):t():void 0))):E=u(t)?n?f?()=>f(t,2):t:()=>{if(O){k();try{O()}finally{M()}}const e=he;he=d;try{return f?f(t,3,[g]):t(g)}finally{he=e}}:s,n&&a){const t=E,e=!0===a?1/0:a;E=()=>fe(t(),e)}const R=A(),b=()=>{d.stop(),R&&i(R.effects,d)};if(l)if(n){const t=n;n=(...e)=>{t(...e),b()}}else{const t=E;E=()=>{t(),b()}}let m=N?new Array(t.length).fill(le):le;const D=t=>{if(1&d.flags&&(d.dirty||t))if(n){const t=d.run();if(a||S||(N?t.some(((t,e)=>v(t,m[e]))):v(t,m))){O&&O();const e=he;he=d;try{const e=[t,m===le?void 0:N&&m[0]===le?[]:m,g];f?f(n,3,e):n(...e),m=t}finally{he=e}}}else d.run()};return _&&_(D),d=new T(E),d.scheduler=h?()=>h(D,!1):D,g=t=>_e(t,!1,d),O=d.onStop=()=>{const t=ue.get(d);if(t){if(f)f(t,4);else for(const e of t)e();ue.delete(d)}},n?r?D(!0):m=d.run():h?h(D.bind(null,!0),!0):d.run(),b.pause=d.pause.bind(d),b.resume=d.resume.bind(d),b.stop=b,b}(t,n,a);return l}const Ce=Object.create(null);let ke=null,Me=null,je=null;function We(){return Me||je}var Ve,Ge,Fe;function Qe(t,e){const s=t[e];return function(...t){const n=this[Se(e)];n&&n.forEach((e=>e(...t))),void 0!==s&&s.call(this,...t)}}function Be(t){if(function(t){const e=new Set(["undefined","boolean","number","string"]);return null===t||e.has(typeof t)}(t)||ge(t))return t;if($t(t))return Be(t.value);if(Xt(t))return Be(Zt(t));if(de(t))return t.map((t=>Be(t)));if(function(t){return"Object"===ve(t)}(t)){const e={};return Object.keys(t).forEach((s=>{e[s]=Be(t[s])})),e}throw new TypeError(`${ve(t)} value is not supported`)}function Ye(t,e){var s;null!==(s=e)&&"object"==typeof s&&He($t(e)?e:()=>e,(()=>{this.setData({[t]:Be(e)},Le)}),{deep:!0})}function ze(t,e){const s=t[e];return function(...t){const n=this[Se(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"}(Ve||(Ve={})),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"}(Ge||(Ge={})),function(t){t.ATTACHED="attached",t.READY="ready",t.MOVED="moved",t.DETACHED="detached",t.ERROR="error"}(Fe||(Fe={}));const Xe={[Ge.ON_SHOW]:"show",[Ge.ON_HIDE]:"hide",[Ge.ON_RESIZE]:"resize",[Ge.ON_ROUTE_DONE]:"routeDone",[Fe.READY]:Ge.ON_READY};function Ze(t,e){return $e(e,t.lifetimes[e]||t[e])}function Je(t,e){return $e(e,t.methods[e])}function Ke(t,e){return $e(e,t.pageLifetimes[Xe[e]])}function $e(t,e){const s=Se(t);return function(...t){const n=this[s];n&&n.forEach((e=>e(...t))),void 0!==e&&e.call(this,...t)}}const qe=Os(Ve.ON_SHOW),ts=Os(Ve.ON_HIDE),es=Os(Ve.ON_ERROR),ss=Os(Ve.ON_PAGE_NOT_FOUND),ns=Os(Ve.ON_UNHANDLED_REJECTION),is=Os(Ve.ON_THEME_CHANGE),os=vs(Ge.ON_SHOW),rs=vs(Ge.ON_HIDE),cs=vs(Ge.ON_UNLOAD),as=vs(Ge.ON_ROUTE_DONE),ls=vs(Ge.ON_PULL_DOWN_REFRESH),us=vs(Ge.ON_REACH_BOTTOM),hs=vs(Ge.ON_RESIZE),_s=vs(Ge.ON_TAB_ITEM_TAP),fs=gs(Ge.ON_LOAD),ps=gs(Fe.MOVED),ds=gs(Fe.DETACHED),Es=gs(Fe.ERROR);function Os(t){return e=>{ke&&Ss(ke,t,e)}}function vs(t){return e=>{const s=We();s&&Ss(s,t,e)}}function gs(t){return e=>{je&&Ss(je,t,e)}}function Ss(t,e,s){const n=Se(e);void 0===t[n]&&(t[n]=[]),t[n].push(s)}exports.EffectScope=N,exports.ReactiveEffect=T,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 u(t)?n=t:(n=t.get,i=t.set),new ae(n,i,s)},exports.createApp=function(t){let e,s;if(ge(t))e=t,s={};else{if(void 0===t.setup)return void App(t);e=t.setup,s=Oe(t,["setup"])}const n=s[Ve.ON_LAUNCH];s[Ve.ON_LAUNCH]=function(t){ke=this;const s=e(t);void 0!==s&&Object.keys(s).forEach((t=>{this[t]=s[t]})),ke=null,void 0!==n&&n.call(this,t)},s[Ve.ON_SHOW]=Qe(s,Ve.ON_SHOW),s[Ve.ON_HIDE]=Qe(s,Ve.ON_HIDE),s[Ve.ON_ERROR]=Qe(s,Ve.ON_ERROR),s[Ve.ON_PAGE_NOT_FOUND]=Qe(s,Ve.ON_PAGE_NOT_FOUND),s[Ve.ON_UNHANDLED_REJECTION]=Qe(s,Ve.ON_UNHANDLED_REJECTION),s[Ve.ON_THEME_CHANGE]=Qe(s,Ve.ON_THEME_CHANGE),App(s)},exports.customRef=function(t){return new ie(t)},exports.defineComponent=function(t,e){let s,n;e=Ee({listenPageScroll:!1,canShareToOthers:!1,canShareToTimeline:!1},e);let i=null;if(ge(t))s=t,n={};else{if(void 0===t.setup)return Component(t);s=t.setup,n=Oe(t,["setup"]),n.properties&&(i=Object.keys(n.properties))}void 0===n.lifetimes&&(n.lifetimes={});const o=n.lifetimes[Fe.ATTACHED]||n[Fe.ATTACHED];n.lifetimes[Fe.ATTACHED]=function(){var t;this.__scope__=new N,je=t=this,t.__scope__.on();const e={};i&&i.forEach((t=>{e[t]=this.data[t]})),this.__props__=Gt(e);const n={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)},r=s(this.__props__,n);if(void 0!==r){let t;Object.keys(r).forEach((e=>{const s=r[e];ge(s)?this[e]=s:(t=t||{},t[e]=Be(s),Ye.call(this,e,s))})),void 0!==t&&this.setData(t,Le)}je&&je.__scope__.off(),je=null,void 0!==o&&o.call(this)};const r=Ze(n,Fe.DETACHED);return n.lifetimes[Fe.DETACHED]=function(){r.call(this),this.__scope__.stop()},n.lifetimes[Fe.READY]=$e(Xe[Fe.READY],n.lifetimes[Fe.READY]||n[Fe.READY]),n.lifetimes[Fe.MOVED]=Ze(n,Fe.MOVED),n.lifetimes[Fe.ERROR]=Ze(n,Fe.ERROR),void 0===n.methods&&(n.methods={}),(n.methods[Ge.ON_PAGE_SCROLL]||e.listenPageScroll)&&(n.methods[Ge.ON_PAGE_SCROLL]=Je(n,Ge.ON_PAGE_SCROLL),n.methods.__listenPageScroll__=()=>!0),void 0===n.methods[Ge.ON_SHARE_APP_MESSAGE]&&e.canShareToOthers&&(n.methods[Ge.ON_SHARE_APP_MESSAGE]=function(t){const e=this[Se(Ge.ON_SHARE_APP_MESSAGE)];return e?e(t):{}},n.methods.__isInjectedShareToOthersHook__=()=>!0),void 0===n.methods[Ge.ON_SHARE_TIMELINE]&&e.canShareToTimeline&&(n.methods[Ge.ON_SHARE_TIMELINE]=function(){const t=this[Se(Ge.ON_SHARE_TIMELINE)];return t?t():{}},n.methods.__isInjectedShareToTimelineHook__=()=>!0),void 0===n.methods[Ge.ON_ADD_TO_FAVORITES]&&(n.methods[Ge.ON_ADD_TO_FAVORITES]=function(t){const e=this[Se(Ge.ON_ADD_TO_FAVORITES)];return e?e(t):{}},n.methods.__isInjectedFavoritesHook__=()=>!0),void 0===n.methods[Ge.ON_SAVE_EXIT_STATE]&&(n.methods[Ge.ON_SAVE_EXIT_STATE]=function(){const t=this[Se(Ge.ON_SAVE_EXIT_STATE)];return t?t():{data:void 0}},n.methods.__isInjectedExitStateHook__=()=>!0),n.methods[Ge.ON_LOAD]=Je(n,Ge.ON_LOAD),n.methods[Ge.ON_PULL_DOWN_REFRESH]=Je(n,Ge.ON_PULL_DOWN_REFRESH),n.methods[Ge.ON_REACH_BOTTOM]=Je(n,Ge.ON_REACH_BOTTOM),n.methods[Ge.ON_TAB_ITEM_TAP]=Je(n,Ge.ON_TAB_ITEM_TAP),void 0===n.pageLifetimes&&(n.pageLifetimes={}),n.pageLifetimes[Xe[Ge.ON_SHOW]]=Ke(n,Ge.ON_SHOW),n.pageLifetimes[Xe[Ge.ON_HIDE]]=Ke(n,Ge.ON_HIDE),n.pageLifetimes[Xe[Ge.ON_RESIZE]]=Ke(n,Ge.ON_RESIZE),n.pageLifetimes[Xe[Ge.ON_ROUTE_DONE]]=Ke(n,Ge.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=Ee({listenPageScroll:!1,canShareToOthers:!1,canShareToTimeline:!1},e),ge(t))s=t,n={};else{if(void 0===t.setup)return void Page(t);s=t.setup,n=Oe(t,["setup"])}const i=n[Ge.ON_LOAD];n[Ge.ON_LOAD]=function(t){var e;this.__scope__=new N,Me=e=this,e.__scope__.on();const n={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)},o=s(t,n);if(void 0!==o){let t;Object.keys(o).forEach((e=>{const s=o[e];ge(s)?this[e]=s:(t=t||{},t[e]=Be(s),Ye.call(this,e,s))})),void 0!==t&&this.setData(t,Le)}Me&&Me.__scope__.off(),Me=null,void 0!==i&&i.call(this,t)};const o=ze(n,Ge.ON_UNLOAD);n[Ge.ON_UNLOAD]=function(){o.call(this),this.__scope__.stop()},(n[Ge.ON_PAGE_SCROLL]||e.listenPageScroll)&&(n[Ge.ON_PAGE_SCROLL]=ze(n,Ge.ON_PAGE_SCROLL),n.__listenPageScroll__=()=>!0),void 0===n[Ge.ON_SHARE_APP_MESSAGE]&&e.canShareToOthers&&(n[Ge.ON_SHARE_APP_MESSAGE]=function(t){const e=this[Se(Ge.ON_SHARE_APP_MESSAGE)];return e?e(t):{}},n.__isInjectedShareToOthersHook__=()=>!0),void 0===n[Ge.ON_SHARE_TIMELINE]&&e.canShareToTimeline&&(n[Ge.ON_SHARE_TIMELINE]=function(){const t=this[Se(Ge.ON_SHARE_TIMELINE)];return t?t():{}},n.__isInjectedShareToTimelineHook__=()=>!0),void 0===n[Ge.ON_ADD_TO_FAVORITES]&&(n[Ge.ON_ADD_TO_FAVORITES]=function(t){const e=this[Se(Ge.ON_ADD_TO_FAVORITES)];return e?e(t):{}},n.__isInjectedFavoritesHook__=()=>!0),void 0===n[Ge.ON_SAVE_EXIT_STATE]&&(n[Ge.ON_SAVE_EXIT_STATE]=function(){const t=this[Se(Ge.ON_SAVE_EXIT_STATE)];return t?t():{data:void 0}},n.__isInjectedExitStateHook__=()=>!0),n[Ge.ON_SHOW]=ze(n,Ge.ON_SHOW),n[Ge.ON_READY]=ze(n,Ge.ON_READY),n[Ge.ON_HIDE]=ze(n,Ge.ON_HIDE),n[Ge.ON_ROUTE_DONE]=ze(n,Ge.ON_ROUTE_DONE),n[Ge.ON_PULL_DOWN_REFRESH]=ze(n,Ge.ON_PULL_DOWN_REFRESH),n[Ge.ON_REACH_BOTTOM]=ze(n,Ge.ON_REACH_BOTTOM),n[Ge.ON_RESIZE]=ze(n,Ge.ON_RESIZE),n[Ge.ON_TAB_ITEM_TAP]=ze(n,Ge.ON_TAB_ITEM_TAP),Page(n)},exports.effect=function(t,e){t.effect instanceof T&&(t=t.effect.fn);const s=new T(t);e&&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 N(t)},exports.getCurrentScope=A,exports.getCurrentWatcher=function(){return he},exports.inject=function(t,e,s=!1){return t in Ce?Ce[t]:arguments.length>1?s&&ge(e)?e():e:void 0},exports.isProxy=Xt,exports.isReactive=Bt,exports.isReadonly=Yt,exports.isRef=$t,exports.isShallow=zt,exports.markRaw=function(t){return!r(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=Ie||xe;return t?e.then(t):e},exports.onAddToFavorites=t=>{const e=We();if(e&&e.__isInjectedFavoritesHook__){const s=Se(Ge.ON_ADD_TO_FAVORITES);void 0===e[s]&&(e[s]=t)}},exports.onAppError=es,exports.onAppHide=ts,exports.onAppShow=qe,exports.onDetach=ds,exports.onError=Es,exports.onHide=rs,exports.onLoad=fs,exports.onMove=ps,exports.onPageNotFound=ss,exports.onPageScroll=t=>{const e=We();e&&e.__listenPageScroll__&&Ss(e,Ge.ON_PAGE_SCROLL,t)},exports.onPullDownRefresh=ls,exports.onReachBottom=us,exports.onReady=t=>{const e=We();e&&Ss(e,Ge.ON_READY,t)},exports.onResize=hs,exports.onRouteDone=as,exports.onSaveExitState=t=>{const e=We();if(e&&e.__isInjectedExitStateHook__){const s=Se(Ge.ON_SAVE_EXIT_STATE);void 0===e[s]&&(e[s]=t)}},exports.onScopeDispose=function(t,e=!1){g&&g.cleanups.push(t)},exports.onShareAppMessage=t=>{const e=We();if(e&&e[Ge.ON_SHARE_APP_MESSAGE]&&e.__isInjectedShareToOthersHook__){const s=Se(Ge.ON_SHARE_APP_MESSAGE);void 0===e[s]&&(e[s]=t)}},exports.onShareTimeline=t=>{const e=We();if(e&&e[Ge.ON_SHARE_TIMELINE]&&e.__isInjectedShareToTimelineHook__){const s=Se(Ge.ON_SHARE_TIMELINE);void 0===e[s]&&(e[s]=t)}},exports.onShow=os,exports.onTabItemTap=_s,exports.onThemeChange=is,exports.onUnhandledRejection=ns,exports.onUnload=cs,exports.onWatcherCleanup=_e,exports.provide=function(t,e){Ce[t]=e},exports.proxyRefs=function(t){return Bt(t)?t:new Proxy(t,ne)},exports.reactive=Vt,exports.readonly=Ft,exports.ref=qt,exports.shallowReactive=Gt,exports.shallowReadonly=function(t){return Qt(t,!0,pt,Ct,Wt)},exports.shallowRef=function(t){return te(t,!0)},exports.stop=function(t){t.effect.stop()},exports.toRaw=Zt,exports.toRef=function(t,e,s){return $t(t)?t:u(t)?new re(t):_(t)&&arguments.length>1?ce(t,e,s):qt(t)},exports.toRefs=function(t){const e=c(t)?new Array(t.length):{};for(const s in t)e[s]=ce(t,s);return e},exports.toValue=function(t){return u(t)?t():se(t)},exports.triggerRef=function(t){t.dep.trigger()},exports.unref=se,exports.watch=He,exports.watchEffect=function(t,e){return Ue(t,null,e)},exports.watchPostEffect=function(t,e){return Ue(t,null,{flush:"post"})},exports.watchSyncEffect=function(t,e){return Ue(t,null,{flush:"sync"})};
@@ -1,37 +1,33 @@
1
1
  /// <reference types="miniprogram-api-typings" />
2
- import { Ref, ComputedRef, DebuggerOptions, ReactiveMarker } from '@vue/reactivity';
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, WritableComputedOptions, WritableComputedRef, computed, customRef, effect, effectScope, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';
2
+ import { DebuggerOptions, WatchEffect, WatchHandle, WatchSource, WatchCallback, ReactiveMarker } from '@vue/reactivity';
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
- type WatchEffect = (onCleanup: OnCleanup) => void;
6
- type WatchSource<T = any> = Ref<T> | ComputedRef<T> | (() => T);
7
- type WatchCallback<V = any, OV = any> = (value: V, oldValue: OV, onCleanup: OnCleanup) => any;
8
5
  type MaybeUndefined<T, I> = I extends true ? T | undefined : T;
9
6
  type MapSources<T, Immediate> = {
10
7
  [K in keyof T]: T[K] extends WatchSource<infer V> ? MaybeUndefined<V, Immediate> : T[K] extends object ? MaybeUndefined<T[K], Immediate> : never;
11
8
  };
12
- type OnCleanup = (cleanupFn: () => void) => void;
13
- interface WatchOptionsBase extends DebuggerOptions {
9
+ interface WatchEffectOptions extends DebuggerOptions {
14
10
  flush?: 'pre' | 'post' | 'sync';
15
11
  }
16
- interface WatchOptions<Immediate = boolean> extends WatchOptionsBase {
12
+ interface WatchOptions<Immediate = boolean> extends WatchEffectOptions {
17
13
  immediate?: Immediate;
18
- deep?: boolean;
14
+ deep?: boolean | number;
19
15
  once?: boolean;
20
16
  }
21
- type WatchStopHandle = () => void;
22
- declare function watchEffect(effect: WatchEffect, options?: WatchOptionsBase): WatchStopHandle;
23
- declare function watchPostEffect(effect: WatchEffect, options?: DebuggerOptions): WatchStopHandle;
24
- declare function watchSyncEffect(effect: WatchEffect, options?: DebuggerOptions): WatchStopHandle;
17
+ declare function watchEffect(effect: WatchEffect, options?: WatchEffectOptions): WatchHandle;
18
+ declare function watchPostEffect(effect: WatchEffect, options?: DebuggerOptions): WatchHandle;
19
+ declare function watchSyncEffect(effect: WatchEffect, options?: DebuggerOptions): WatchHandle;
25
20
  type MultiWatchSources = Array<WatchSource<unknown> | object>;
26
- declare function watch<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, MaybeUndefined<T, Immediate>>, options?: WatchOptions<Immediate>): WatchStopHandle;
27
- declare function watch<T extends Readonly<MultiWatchSources>, Immediate extends Readonly<boolean> = false>(sources: readonly [...T] | T, cb: [T] extends [ReactiveMarker] ? WatchCallback<T, MaybeUndefined<T, Immediate>> : WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>, options?: WatchOptions<Immediate>): WatchStopHandle;
28
- declare function watch<T extends MultiWatchSources, Immediate extends Readonly<boolean> = false>(sources: [...T], cb: WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>, options?: WatchOptions<Immediate>): WatchStopHandle;
29
- declare function watch<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, MaybeUndefined<T, Immediate>>, options?: WatchOptions<Immediate>): WatchStopHandle;
21
+ declare function watch<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, MaybeUndefined<T, Immediate>>, options?: WatchOptions<Immediate>): WatchHandle;
22
+ declare function watch<T extends Readonly<MultiWatchSources>, Immediate extends Readonly<boolean> = false>(sources: readonly [...T] | T, cb: [T] extends [ReactiveMarker] ? WatchCallback<T, MaybeUndefined<T, Immediate>> : WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>, options?: WatchOptions<Immediate>): WatchHandle;
23
+ declare function watch<T extends MultiWatchSources, Immediate extends Readonly<boolean> = false>(sources: [...T], cb: WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>, options?: WatchOptions<Immediate>): WatchHandle;
24
+ declare function watch<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, MaybeUndefined<T, Immediate>>, options?: WatchOptions<Immediate>): WatchHandle;
30
25
 
31
26
  declare function nextTick<R = void>(fn?: () => R): Promise<Awaited<R>>;
32
27
 
33
- interface InjectionKey<T> extends Symbol {
28
+ interface InjectionConstraint<T> {
34
29
  }
30
+ type InjectionKey<T> = symbol & InjectionConstraint<T>;
35
31
  declare function provide<T, K = InjectionKey<T> | string>(key: K, value: K extends InjectionKey<infer V> ? V : T): void;
36
32
  declare function inject<T>(key: InjectionKey<T> | string): T | undefined;
37
33
  declare function inject<T>(key: InjectionKey<T> | string, defaultValue: T, treatDefaultAsFactory?: false): T;
@@ -105,4 +101,4 @@ declare const onMove: (hook: () => unknown) => void;
105
101
  declare const onDetach: (hook: () => unknown) => void;
106
102
  declare const onError: (hook: (error: WechatMiniprogram.Error) => unknown) => void;
107
103
 
108
- export { type AppOptions, type AppSetup, type Bindings, type ComponentContext, type ComponentOptionsWithProps, type ComponentOptionsWithoutProps, type ComponentSetup, type Config, type InjectionKey, type PageContext, type PageOptions, type PageSetup, type Query, type WatchCallback, type WatchEffect, type WatchOptions, type WatchOptionsBase, type WatchSource, type WatchStopHandle, 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 };
104
+ export { type AppOptions, type AppSetup, type Bindings, type ComponentContext, type ComponentOptionsWithProps, type ComponentOptionsWithoutProps, type ComponentSetup, type Config, type InjectionKey, type MultiWatchSources, type PageContext, type PageOptions, type PageSetup, type Query, type WatchOptions, type WatchEffectOptions as WatchOptionsBase, 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 };
@@ -1,12 +1,14 @@
1
1
  /*!
2
- * vue-mini v1.0.3
2
+ * vue-mini v1.1.0
3
3
  * https://github.com/vue-mini/vue-mini
4
4
  * (c) 2019-present Yang Mingshan
5
5
  * @license MIT
6
6
  */
7
- import { isRef, isShallow, isReactive, ReactiveEffect, getCurrentScope, ReactiveFlags, isProxy, toRaw, EffectScope, shallowReactive, shallowReadonly } from '@vue/reactivity';
8
- export { EffectScope, ReactiveEffect, TrackOpTypes, TriggerOpTypes, computed, customRef, effect, effectScope, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';
7
+ import { watch as watch$1, isRef, isProxy, toRaw, EffectScope, shallowReactive, shallowReadonly } from '@vue/reactivity';
8
+ export { EffectScope, ReactiveEffect, TrackOpTypes, TriggerOpTypes, 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';
9
9
 
10
+ const EMPTY_OBJ = (process.env.NODE_ENV !== 'production') ? Object.freeze({}) : /* istanbul ignore next -- @preserve */ {};
11
+ /* istanbul ignore next -- @preserve */
10
12
  // eslint-disable-next-line @typescript-eslint/no-empty-function
11
13
  const NOOP = () => { };
12
14
  const { isArray } = Array;
@@ -36,27 +38,16 @@ function isPlainObject(x) {
36
38
  function isFunction(x) {
37
39
  return typeof x === 'function';
38
40
  }
39
- function isMap(x) {
40
- return getType(x) === 'Map';
41
- }
42
- function isSet(x) {
43
- return getType(x) === 'Set';
44
- }
45
- // Compare whether a value has changed, accounting for NaN.
46
- function hasChanged(value, oldValue) {
47
- // eslint-disable-next-line no-self-compare
48
- return value !== oldValue && (value === value || oldValue === oldValue);
49
- }
50
- function remove(arr, el) {
51
- const i = arr.indexOf(el);
52
- if (i > -1) {
53
- arr.splice(i, 1);
54
- }
55
- }
56
41
  function toHiddenField(name) {
57
42
  return `__${name}__`;
58
43
  }
59
44
 
45
+ /* eslint-disable no-bitwise, unicorn/prefer-math-trunc, @typescript-eslint/prefer-literal-enum-member */
46
+ var SchedulerJobFlags;
47
+ (function (SchedulerJobFlags) {
48
+ SchedulerJobFlags[SchedulerJobFlags["QUEUED"] = 1] = "QUEUED";
49
+ SchedulerJobFlags[SchedulerJobFlags["ALLOW_RECURSE"] = 4] = "ALLOW_RECURSE";
50
+ })(SchedulerJobFlags || (SchedulerJobFlags = {}));
60
51
  let isFlushing = false;
61
52
  let isFlushPending = false;
62
53
  const queue = [];
@@ -65,7 +56,7 @@ const pendingPostFlushCbs = [];
65
56
  let activePostFlushCbs = null;
66
57
  let postFlushIndex = 0;
67
58
  // eslint-disable-next-line spaced-comment
68
- const resolvedPromise = /*#__PURE__*/ Promise.resolve();
59
+ const resolvedPromise = /*@__PURE__*/ Promise.resolve();
69
60
  let currentFlushPromise = null;
70
61
  const RECURSION_LIMIT = 100;
71
62
  function nextTick(fn) {
@@ -74,15 +65,9 @@ function nextTick(fn) {
74
65
  return fn ? p.then(fn) : p;
75
66
  }
76
67
  function queueJob(job) {
77
- // The dedupe search uses the startIndex argument of Array.includes()
78
- // by default the search index includes the current job that is being run
79
- // so it cannot recursively trigger itself again.
80
- // if the job is a watch() callback, the search will start with a +1 index to
81
- // allow it recursively trigger itself - it is the user's responsibility to
82
- // ensure it doesn't end up in an infinite loop.
83
- if (queue.length === 0 ||
84
- !queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) {
68
+ if (!(job.flags & SchedulerJobFlags.QUEUED)) {
85
69
  queue.push(job);
70
+ job.flags |= SchedulerJobFlags.QUEUED;
86
71
  queueFlush();
87
72
  }
88
73
  }
@@ -94,9 +79,9 @@ function queueFlush() {
94
79
  }
95
80
  }
96
81
  function queuePostFlushCb(cb) {
97
- if (!activePostFlushCbs ||
98
- !activePostFlushCbs.includes(cb, cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex)) {
82
+ if (!(cb.flags & SchedulerJobFlags.QUEUED)) {
99
83
  pendingPostFlushCbs.push(cb);
84
+ cb.flags |= SchedulerJobFlags.QUEUED;
100
85
  }
101
86
  }
102
87
  function flushPostFlushCbs() {
@@ -105,8 +90,11 @@ function flushPostFlushCbs() {
105
90
  pendingPostFlushCbs.length = 0;
106
91
  for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
107
92
  const cb = activePostFlushCbs[postFlushIndex];
108
- if (cb.active !== false)
109
- cb();
93
+ if (cb.flags & SchedulerJobFlags.ALLOW_RECURSE) {
94
+ cb.flags &= ~SchedulerJobFlags.QUEUED;
95
+ }
96
+ cb();
97
+ cb.flags &= ~SchedulerJobFlags.QUEUED;
110
98
  }
111
99
  activePostFlushCbs = null;
112
100
  postFlushIndex = 0;
@@ -130,16 +118,23 @@ function flushJobs(seen) {
130
118
  try {
131
119
  for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
132
120
  const job = queue[flushIndex];
133
- if (job.active !== false) {
134
- /* istanbul ignore if -- @preserve */
135
- if ((process.env.NODE_ENV !== 'production') && check(job)) {
136
- continue;
137
- }
138
- job();
121
+ /* istanbul ignore if -- @preserve */
122
+ if ((process.env.NODE_ENV !== 'production') && check(job)) {
123
+ continue;
139
124
  }
125
+ if (job.flags & SchedulerJobFlags.ALLOW_RECURSE) {
126
+ job.flags &= ~SchedulerJobFlags.QUEUED;
127
+ }
128
+ job();
129
+ job.flags &= ~SchedulerJobFlags.QUEUED;
140
130
  }
141
131
  }
142
132
  finally {
133
+ // If there was an error we still need to clear the QUEUED flags
134
+ for (; flushIndex < queue.length; flushIndex++) {
135
+ const job = queue[flushIndex];
136
+ job.flags &= ~SchedulerJobFlags.QUEUED;
137
+ }
143
138
  flushIndex = 0;
144
139
  queue.length = 0;
145
140
  isFlushing = false;
@@ -173,8 +168,6 @@ function watchSyncEffect(effect, options) {
173
168
  extend({}, options, { flush: 'sync' })
174
169
  : /* istanbul ignore next -- @preserve */ { flush: 'sync' });
175
170
  }
176
- // Initial value for watchers to trigger on undefined initial values
177
- const INITIAL_WATCHER_VALUE = {};
178
171
  // Implementation
179
172
  function watch(source, cb, options) {
180
173
  if ((process.env.NODE_ENV !== 'production') && !isFunction(cb)) {
@@ -184,19 +177,8 @@ function watch(source, cb, options) {
184
177
  }
185
178
  return doWatch(source, cb, options);
186
179
  }
187
- // eslint-disable-next-line complexity
188
- function doWatch(source, cb, { immediate, deep, flush, once, onTrack, onTrigger } = {}) {
189
- if (cb && once) {
190
- const _cb = cb;
191
- cb = (...args) => {
192
- _cb(...args);
193
- unwatch();
194
- };
195
- }
196
- if ((process.env.NODE_ENV !== 'production') && deep !== undefined && typeof deep === 'number') {
197
- console.warn(`watch() "deep" option with number value will be used as watch depth in future versions. ` +
198
- `Please use a boolean instead to avoid potential breakage.`);
199
- }
180
+ function doWatch(source, cb, options = EMPTY_OBJ) {
181
+ const { immediate, deep, flush, once } = options;
200
182
  if ((process.env.NODE_ENV !== 'production') && !cb) {
201
183
  if (immediate !== undefined) {
202
184
  console.warn(`watch() "immediate" option is only respected when using the ` +
@@ -211,193 +193,34 @@ function doWatch(source, cb, { immediate, deep, flush, once, onTrack, onTrigger
211
193
  `watch(source, callback, options?) signature.`);
212
194
  }
213
195
  }
214
- const warnInvalidSource = (s) => {
215
- console.warn(`Invalid watch source:`, s, `A watch source can only be a getter/effect function, a ref, ` +
216
- `a reactive object, or an array of these types.`);
217
- };
218
- const reactiveGetter = (source) => deep === true ?
219
- source // Traverse will happen in wrapped getter below
220
- // For deep: false, only traverse root-level properties
221
- : traverse(source, deep === false ? 1 : undefined);
222
- let getter;
223
- let forceTrigger = false;
224
- let isMultiSource = false;
225
- if (isRef(source)) {
226
- getter = () => source.value;
227
- forceTrigger = isShallow(source);
228
- }
229
- else if (isReactive(source)) {
230
- getter = () => reactiveGetter(source);
231
- forceTrigger = true;
232
- }
233
- else if (isArray(source)) {
234
- isMultiSource = true;
235
- forceTrigger = source.some((s) => isReactive(s) || isShallow(s));
236
- getter = () => source.map((s) => {
237
- if (isRef(s)) {
238
- return s.value;
239
- }
240
- if (isReactive(s)) {
241
- return reactiveGetter(s);
242
- }
243
- if (isFunction(s)) {
244
- return s();
245
- }
246
- /* istanbul ignore else -- @preserve */
247
- if ((process.env.NODE_ENV !== 'production')) {
248
- warnInvalidSource(s);
249
- }
250
- return undefined;
251
- });
252
- }
253
- else if (isFunction(source)) {
254
- if (cb) {
255
- // Getter with cb
256
- getter = () => source();
257
- }
258
- else {
259
- // No cb -> simple effect
260
- getter = () => {
261
- if (cleanup) {
262
- cleanup();
263
- }
264
- return source(onCleanup);
265
- };
266
- }
267
- }
268
- else {
269
- getter = NOOP;
270
- /* istanbul ignore else -- @preserve */
271
- if ((process.env.NODE_ENV !== 'production')) {
272
- warnInvalidSource(source);
273
- }
274
- }
275
- if (cb && deep) {
276
- const baseGetter = getter;
277
- getter = () => traverse(baseGetter());
278
- }
279
- let cleanup;
280
- const onCleanup = (fn) => {
281
- // eslint-disable-next-line no-multi-assign
282
- cleanup = effect.onStop = () => {
283
- fn();
284
- // eslint-disable-next-line no-multi-assign
285
- cleanup = effect.onStop = undefined;
286
- };
287
- };
288
- let oldValue = isMultiSource ?
289
- Array.from({ length: source.length }).fill(INITIAL_WATCHER_VALUE)
290
- : INITIAL_WATCHER_VALUE;
291
- const job = () => {
292
- if (!effect.active || !effect.dirty) {
293
- return;
294
- }
295
- if (cb) {
296
- // Watch(source, cb)
297
- const newValue = effect.run();
298
- if (deep ||
299
- forceTrigger ||
300
- (isMultiSource ?
301
- newValue.some((v, i) => hasChanged(v, oldValue[i]))
302
- : hasChanged(newValue, oldValue))) {
303
- // Cleanup before running cb again
304
- if (cleanup) {
305
- cleanup();
306
- }
307
- cb(newValue,
308
- // Pass undefined as the old value when it's changed for the first time
309
- oldValue === INITIAL_WATCHER_VALUE ? undefined
310
- : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? []
311
- : oldValue, onCleanup);
312
- oldValue = newValue;
313
- }
314
- }
315
- else {
316
- // WatchEffect
317
- effect.run();
318
- }
319
- };
320
- // Important: mark the job as a watcher callback so that scheduler knows
321
- // it is allowed to self-trigger
322
- job.allowRecurse = Boolean(cb);
323
- let scheduler;
324
- if (flush === 'sync') {
325
- scheduler = job; // The scheduler function gets called directly
326
- }
327
- else if (flush === 'post') {
328
- scheduler = () => {
196
+ const baseWatchOptions = extend({}, options);
197
+ // Scheduler
198
+ if (flush === 'post') {
199
+ baseWatchOptions.scheduler = (job) => {
329
200
  queuePostFlushCb(job);
330
201
  };
331
202
  }
332
- else {
333
- scheduler = () => {
334
- queueJob(job);
203
+ else if (flush !== 'sync') {
204
+ baseWatchOptions.scheduler = (job, isFirstRun) => {
205
+ if (isFirstRun) {
206
+ job();
207
+ }
208
+ else {
209
+ queueJob(job);
210
+ }
335
211
  };
336
212
  }
337
- const effect = new ReactiveEffect(getter, NOOP, scheduler);
338
- const scope = getCurrentScope();
339
- const unwatch = () => {
340
- effect.stop();
341
- if (scope) {
342
- // @ts-expect-error
343
- remove(scope.effects, effect);
213
+ // @ts-expect-error
214
+ baseWatchOptions.augmentJob = (job) => {
215
+ // Important: mark the job as a watcher callback so that scheduler knows
216
+ // it is allowed to self-trigger
217
+ if (cb) {
218
+ // eslint-disable-next-line no-bitwise
219
+ job.flags |= SchedulerJobFlags.ALLOW_RECURSE;
344
220
  }
345
221
  };
346
- /* istanbul ignore else -- @preserve */
347
- if ((process.env.NODE_ENV !== 'production')) {
348
- effect.onTrack = onTrack;
349
- effect.onTrigger = onTrigger;
350
- }
351
- // Initial run
352
- if (cb) {
353
- if (immediate) {
354
- job();
355
- }
356
- else {
357
- oldValue = effect.run();
358
- }
359
- }
360
- else {
361
- effect.run();
362
- }
363
- return unwatch;
364
- }
365
- function traverse(value, depth = Number.POSITIVE_INFINITY, seen) {
366
- if (depth <= 0 || !isObject(value) || value[ReactiveFlags.SKIP]) {
367
- return value;
368
- }
369
- seen = seen || new Set();
370
- if (seen.has(value)) {
371
- return value;
372
- }
373
- seen.add(value);
374
- depth--;
375
- /* istanbul ignore else -- @preserve */
376
- if (isRef(value)) {
377
- traverse(value.value, depth, seen);
378
- }
379
- else if (isArray(value)) {
380
- for (let i = 0; i < value.length; i++) {
381
- traverse(value[i], depth, seen);
382
- }
383
- }
384
- else if (isSet(value) || isMap(value)) {
385
- value.forEach((v) => {
386
- traverse(v, depth, seen);
387
- });
388
- }
389
- else if (isPlainObject(value)) {
390
- // eslint-disable-next-line guard-for-in
391
- for (const key in value) {
392
- traverse(value[key], depth, seen);
393
- }
394
- for (const key of Object.getOwnPropertySymbols(value)) {
395
- if (Object.prototype.propertyIsEnumerable.call(value, key)) {
396
- traverse(value[key], depth, seen);
397
- }
398
- }
399
- }
400
- return value;
222
+ const watchHandle = watch$1(source, cb, baseWatchOptions);
223
+ return watchHandle;
401
224
  }
402
225
 
403
226
  const provides = Object.create(null);
@@ -623,15 +446,20 @@ function definePage(optionsOrSetup, config) {
623
446
  };
624
447
  const bindings = setup(query, context);
625
448
  if (bindings !== undefined) {
449
+ let data;
626
450
  Object.keys(bindings).forEach((key) => {
627
451
  const value = bindings[key];
628
452
  if (isFunction(value)) {
629
453
  this[key] = value;
630
454
  return;
631
455
  }
632
- this.setData({ [key]: deepToRaw(value) });
456
+ data = data || {};
457
+ data[key] = deepToRaw(value);
633
458
  deepWatch.call(this, key, value);
634
459
  });
460
+ if (data !== undefined) {
461
+ this.setData(data, flushPostFlushCbs);
462
+ }
635
463
  }
636
464
  unsetCurrentPage();
637
465
  if (originOnLoad !== undefined) {
@@ -803,15 +631,20 @@ function defineComponent(optionsOrSetup, config) {
803
631
  shallowReadonly(this.__props__)
804
632
  : /* istanbul ignore next -- @preserve */ this.__props__, context);
805
633
  if (bindings !== undefined) {
634
+ let data;
806
635
  Object.keys(bindings).forEach((key) => {
807
636
  const value = bindings[key];
808
637
  if (isFunction(value)) {
809
638
  this[key] = value;
810
639
  return;
811
640
  }
812
- this.setData({ [key]: deepToRaw(value) });
641
+ data = data || {};
642
+ data[key] = deepToRaw(value);
813
643
  deepWatch.call(this, key, value);
814
644
  });
645
+ if (data !== undefined) {
646
+ this.setData(data, flushPostFlushCbs);
647
+ }
815
648
  }
816
649
  unsetCurrentComponent();
817
650
  if (originAttached !== undefined) {