@52css/mp-vue3
Advanced tools
| interface RequestOptions extends WechatMiniprogram.RequestOption { | ||
| success?: (res: WechatMiniprogram.RequestSuccessCallbackResult) => void; | ||
| fail?: (err: WechatMiniprogram.RequestFailCallbackErr | Error) => void; | ||
| complete?: (res: any) => void; | ||
| } | ||
| type RequestInterceptor = (options: RequestOptions) => RequestOptions | Promise<RequestOptions>; | ||
| type ResponseInterceptor = (response: WechatMiniprogram.RequestSuccessCallbackResult) => WechatMiniprogram.RequestSuccessCallbackResult | Promise<WechatMiniprogram.RequestSuccessCallbackResult>; | ||
| declare class Request { | ||
| private requestInterceptor?; | ||
| private responseInterceptor?; | ||
| private defaultOptions; | ||
| private baseUrl; | ||
| constructor(); | ||
| /** | ||
| * 设置全局的基础 URL | ||
| * @param url 基础 URL | ||
| */ | ||
| setBaseUrl(url: string): void; | ||
| setRequestInterceptor(interceptor: RequestInterceptor): void; | ||
| setResponseInterceptor(interceptor: ResponseInterceptor): void; | ||
| /** | ||
| * 核心请求方法 | ||
| * @param options 请求选项 | ||
| * @returns Promise | ||
| */ | ||
| request(options: RequestOptions): Promise<WechatMiniprogram.RequestSuccessCallbackResult>; | ||
| /** | ||
| * 将参数对象序列化为查询字符串 | ||
| * @param params 参数对象 | ||
| * @returns 查询字符串 | ||
| */ | ||
| private serializeParams; | ||
| /** | ||
| * GET 方法 | ||
| * @param url 请求 URL | ||
| * @param params 查询参数 | ||
| * @param options 请求选项 | ||
| * @returns Promise | ||
| */ | ||
| get(url: string, params?: Record<string, any>, options?: Omit<RequestOptions, "method" | "url">): Promise<WechatMiniprogram.RequestSuccessCallbackResult>; | ||
| /** | ||
| * POST 方法 | ||
| * @param url 请求 URL | ||
| * @param data 请求体数据 | ||
| * @param options 请求选项 | ||
| * @returns Promise | ||
| */ | ||
| post(url: string, data?: any, options?: Omit<RequestOptions, "method" | "url" | "data">): Promise<WechatMiniprogram.RequestSuccessCallbackResult>; | ||
| /** | ||
| * OPTIONS 方法 | ||
| * @param url 请求 URL | ||
| * @param params 查询参数 | ||
| * @param options 请求选项 | ||
| * @returns Promise | ||
| */ | ||
| options(url: string, params?: Record<string, any>, options?: Omit<RequestOptions, "method" | "url">): Promise<WechatMiniprogram.RequestSuccessCallbackResult>; | ||
| /** | ||
| * HEAD 方法 | ||
| * @param url 请求 URL | ||
| * @param params 查询参数 | ||
| * @param options 请求选项 | ||
| * @returns Promise | ||
| */ | ||
| head(url: string, params?: Record<string, any>, options?: Omit<RequestOptions, "method" | "url">): Promise<WechatMiniprogram.RequestSuccessCallbackResult>; | ||
| /** | ||
| * PUT 方法 | ||
| * @param url 请求 URL | ||
| * @param data 请求体数据 | ||
| * @param options 请求选项 | ||
| * @returns Promise | ||
| */ | ||
| put(url: string, data?: any, options?: Omit<RequestOptions, "method" | "url" | "data">): Promise<WechatMiniprogram.RequestSuccessCallbackResult>; | ||
| /** | ||
| * DELETE 方法 | ||
| * @param url 请求 URL | ||
| * @param data 请求体数据 | ||
| * @param options 请求选项 | ||
| * @returns Promise | ||
| */ | ||
| delete(url: string, data?: any, options?: Omit<RequestOptions, "method" | "url" | "data">): Promise<WechatMiniprogram.RequestSuccessCallbackResult>; | ||
| /** | ||
| * TRACE 方法 | ||
| * @param url 请求 URL | ||
| * @param params 查询参数 | ||
| * @param options 请求选项 | ||
| * @returns Promise | ||
| */ | ||
| trace(url: string, params?: Record<string, any>, options?: Omit<RequestOptions, "method" | "url">): Promise<WechatMiniprogram.RequestSuccessCallbackResult>; | ||
| /** | ||
| * CONNECT 方法 | ||
| * @param url 请求 URL | ||
| * @param data 请求体数据 | ||
| * @param options 请求选项 | ||
| * @returns Promise | ||
| */ | ||
| connect(url: string, data?: any, options?: Omit<RequestOptions, "method" | "url" | "data">): Promise<WechatMiniprogram.RequestSuccessCallbackResult>; | ||
| } | ||
| export declare const request: Request; | ||
| export {}; |
@@ -7,3 +7,3 @@ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).MpVue3={})}(this,(function(e){"use strict"; | ||
| **/ | ||
| /*! #__NO_SIDE_EFFECTS__ */function t(e,t){const n=new Set(e.split(","));return e=>n.has(e)}const n={},s=()=>{},i=Object.assign,r=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},o=Object.prototype.hasOwnProperty,c=(e,t)=>o.call(e,t),a=Array.isArray,u=e=>"[object Map]"===v(e),h=e=>"[object Set]"===v(e),l=e=>"function"==typeof e,f=e=>"symbol"==typeof e,p=e=>null!==e&&"object"==typeof e,d=Object.prototype.toString,v=e=>d.call(e),_=e=>v(e).slice(8,-1),g=e=>"[object Object]"===v(e),y=e=>"string"==typeof e&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,w=(e,t)=>!Object.is(e,t); | ||
| /*! #__NO_SIDE_EFFECTS__ */function t(e,t){const n=new Set(e.split(","));return e=>n.has(e)}const n={},s=()=>{},i=Object.assign,r=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},o=Object.prototype.hasOwnProperty,c=(e,t)=>o.call(e,t),a=Array.isArray,u=e=>"[object Map]"===v(e),h=e=>"[object Set]"===v(e),l=e=>"function"==typeof e,f=e=>"symbol"==typeof e,p=e=>null!==e&&"object"==typeof e,d=Object.prototype.toString,v=e=>d.call(e),_=e=>v(e).slice(8,-1),g=e=>"[object Object]"===v(e),y=e=>"string"==typeof e&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,b=(e,t)=>!Object.is(e,t); | ||
| /** | ||
@@ -14,2 +14,2 @@ * @vue/reactivity v3.5.1 | ||
| **/ | ||
| let b,m;class S{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=b,!e&&b&&(this.index=(b.scopes||(b.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){let e,t;if(this._isPaused=!1,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){const t=b;try{return b=this,e()}finally{b=t}}}on(){b=this}off(){b=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 R(e){return new S(e)}function x(){return b}const $=new WeakSet;class k{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.nextEffect=void 0,this.cleanup=void 0,this.scheduler=void 0,b&&b.active&&b.effects.push(this)}pause(){this.flags|=64}resume(){64&this.flags&&(this.flags&=-65,$.has(this)&&($.delete(this),this.trigger()))}notify(){2&this.flags&&!(32&this.flags)||8&this.flags||(this.flags|=8,this.nextEffect=P,P=this)}run(){if(!(1&this.flags))return this.fn();this.flags|=2,U(this),T(this);const e=m,t=q;m=this,q=!0;try{return this.fn()}finally{E(this),m=e,q=t,this.flags&=-3}}stop(){if(1&this.flags){for(let e=this.deps;e;e=e.nextDep)I(e);this.deps=this.depsTail=void 0,U(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?$.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){A(this)&&this.run()}get dirty(){return A(this)}}let P,j=0;function D(){j++}function O(){if(--j>0)return;let e;for(;P;){let t=P;for(P=void 0;t;){const n=t.nextEffect;if(t.nextEffect=void 0,t.flags&=-9,1&t.flags)try{t.trigger()}catch(t){e||(e=t)}t=n}}if(e)throw e}function T(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function E(e){let t,n=e.depsTail;for(let e=n;e;e=e.prevDep)-1===e.version?(e===n&&(n=e.prevDep),I(e),M(e)):t=e,e.dep.activeLink=e.prevActiveLink,e.prevActiveLink=void 0;e.deps=t,e.depsTail=n}function A(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&!1===L(t.dep.computed)||t.dep.version!==t.version)return!0;return!!e._dirty}function L(e){if(2&e.flags)return!1;if(4&e.flags&&!(16&e.flags))return;if(e.flags&=-17,e.globalVersion===V)return;e.globalVersion=V;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&!A(e))return void(e.flags&=-3);const n=m,s=q;m=e,q=!0;try{T(e);const n=e.fn();(0===t.version||w(n,e._value))&&(e._value=n,t.version++)}catch(e){throw t.version++,e}finally{m=n,q=s,E(e),e.flags&=-3}}function I(e){const{dep:t,prevSub:n,nextSub:s}=e;if(n&&(n.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=n,e.nextSub=void 0),t.subs===e&&(t.subs=n),!t.subs&&t.computed){t.computed.flags&=-5;for(let e=t.computed.deps;e;e=e.nextDep)I(e)}}function M(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let q=!0;const C=[];function N(){C.push(q),q=!1}function z(){const e=C.pop();q=void 0===e||e}function U(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const e=m;m=void 0;try{t()}finally{m=e}}}let V=0;class W{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0}track(e){if(!m||!q)return;let t=this.activeLink;if(void 0===t||t.sub!==m)t=this.activeLink={dep:this,sub:m,version:this.version,nextDep:void 0,prevDep:void 0,nextSub:void 0,prevSub:void 0,prevActiveLink:void 0},m.deps?(t.prevDep=m.depsTail,m.depsTail.nextDep=t,m.depsTail=t):m.deps=m.depsTail=t,4&m.flags&&F(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){const e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=m.depsTail,t.nextDep=void 0,m.depsTail.nextDep=t,m.depsTail=t,m.deps===t&&(m.deps=e)}return t}trigger(e){this.version++,V++,this.notify(e)}notify(e){D();try{0;for(let e=this.subs;e;e=e.prevSub)e.sub.notify()}finally{O()}}}function F(e){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)F(e)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}const B=new WeakMap,H=Symbol(""),J=Symbol(""),K=Symbol("");function Q(e,t,n){if(q&&m){let t=B.get(e);t||B.set(e,t=new Map);let s=t.get(n);s||t.set(n,s=new W),s.track()}}function G(e,t,n,s,i,r){const o=B.get(e);if(!o)return void V++;let c=[];if("clear"===t)c=[...o.values()];else{const i=a(e),r=i&&y(n);if(i&&"length"===n){const e=Number(s);o.forEach(((t,n)=>{("length"===n||n===K||!f(n)&&n>=e)&&c.push(t)}))}else{const s=e=>e&&c.push(e);switch(void 0!==n&&s(o.get(n)),r&&s(o.get(K)),t){case"add":i?r&&s(o.get("length")):(s(o.get(H)),u(e)&&s(o.get(J)));break;case"delete":i||(s(o.get(H)),u(e)&&s(o.get(J)));break;case"set":u(e)&&s(o.get(H))}}}D();for(const e of c)e.trigger();O()}function X(e){const t=Ge(e);return t===e?t:(Q(t,0,K),Ke(e)?t:t.map(Xe))}function Y(e){return Q(e=Ge(e),0,K),e}const Z={__proto__:null,[Symbol.iterator](){return ee(this,Symbol.iterator,Xe)},concat(...e){return X(this).concat(...e.map((e=>a(e)?X(e):e)))},entries(){return ee(this,"entries",(e=>(e[1]=Xe(e[1]),e)))},every(e,t){return ne(this,"every",e,t,void 0,arguments)},filter(e,t){return ne(this,"filter",e,t,(e=>e.map(Xe)),arguments)},find(e,t){return ne(this,"find",e,t,Xe,arguments)},findIndex(e,t){return ne(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return ne(this,"findLast",e,t,Xe,arguments)},findLastIndex(e,t){return ne(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return ne(this,"forEach",e,t,void 0,arguments)},includes(...e){return ie(this,"includes",e)},indexOf(...e){return ie(this,"indexOf",e)},join(e){return X(this).join(e)},lastIndexOf(...e){return ie(this,"lastIndexOf",e)},map(e,t){return ne(this,"map",e,t,void 0,arguments)},pop(){return re(this,"pop")},push(...e){return re(this,"push",e)},reduce(e,...t){return se(this,"reduce",e,t)},reduceRight(e,...t){return se(this,"reduceRight",e,t)},shift(){return re(this,"shift")},some(e,t){return ne(this,"some",e,t,void 0,arguments)},splice(...e){return re(this,"splice",e)},toReversed(){return X(this).toReversed()},toSorted(e){return X(this).toSorted(e)},toSpliced(...e){return X(this).toSpliced(...e)},unshift(...e){return re(this,"unshift",e)},values(){return ee(this,"values",Xe)}};function ee(e,t,n){const s=Y(e),i=s[t]();return s===e||Ke(e)||(i._next=i.next,i.next=()=>{const e=i._next();return e.value&&(e.value=n(e.value)),e}),i}const te=Array.prototype;function ne(e,t,n,s,i,r){const o=Y(e),c=o!==e&&!Ke(e),a=o[t];if(a!==te[t]){const t=a.apply(e,r);return c?Xe(t):t}let u=n;o!==e&&(c?u=function(t,s){return n.call(this,Xe(t),s,e)}:n.length>2&&(u=function(t,s){return n.call(this,t,s,e)}));const h=a.call(o,u,s);return c&&i?i(h):h}function se(e,t,n,s){const i=Y(e);let r=n;return i!==e&&(Ke(e)?n.length>3&&(r=function(t,s,i){return n.call(this,t,s,i,e)}):r=function(t,s,i){return n.call(this,t,Xe(s),i,e)}),i[t](r,...s)}function ie(e,t,n){const s=Ge(e);Q(s,0,K);const i=s[t](...n);return-1!==i&&!1!==i||!Qe(n[0])?i:(n[0]=Ge(n[0]),s[t](...n))}function re(e,t,n=[]){N(),D();const s=Ge(e)[t].apply(e,n);return O(),z(),s}const oe=t("__proto__,__v_isRef,__isVue"),ce=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(f));function ae(e){f(e)||(e=String(e));const t=Ge(this);return Q(t,0,e),t.hasOwnProperty(e)}class ue{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){const s=this._isReadonly,i=this._isShallow;if("__v_isReactive"===t)return!s;if("__v_isReadonly"===t)return s;if("__v_isShallow"===t)return i;if("__v_raw"===t)return n===(s?i?Ue:ze:i?Ne:Ce).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const r=a(e);if(!s){let e;if(r&&(e=Z[t]))return e;if("hasOwnProperty"===t)return ae}const o=Reflect.get(e,t,Ze(e)?e:n);return(f(t)?ce.has(t):oe(t))?o:(s||Q(e,0,t),i?o:Ze(o)?r&&y(t)?o:o.value:p(o)?s?Fe(o):Ve(o):o)}}class he extends ue{constructor(e=!1){super(!1,e)}set(e,t,n,s){let i=e[t];if(!this._isShallow){const t=Je(i);if(Ke(n)||Je(n)||(i=Ge(i),n=Ge(n)),!a(e)&&Ze(i)&&!Ze(n))return!t&&(i.value=n,!0)}const r=a(e)&&y(t)?Number(t)<e.length:c(e,t),o=Reflect.set(e,t,n,Ze(e)?e:s);return e===Ge(s)&&(r?w(n,i)&&G(e,"set",t,n):G(e,"add",t,n)),o}deleteProperty(e,t){const n=c(e,t);e[t];const s=Reflect.deleteProperty(e,t);return s&&n&&G(e,"delete",t,void 0),s}has(e,t){const n=Reflect.has(e,t);return f(t)&&ce.has(t)||Q(e,0,t),n}ownKeys(e){return Q(e,0,a(e)?"length":H),Reflect.ownKeys(e)}}class le extends ue{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}const fe=new he,pe=new le,de=new he(!0),ve=new le(!0),_e=e=>e,ge=e=>Reflect.getPrototypeOf(e);function ye(e,t,n=!1,s=!1){const i=Ge(e=e.__v_raw),r=Ge(t);n||(w(t,r)&&Q(i,0,t),Q(i,0,r));const{has:o}=ge(i),c=s?_e:n?Ye:Xe;return o.call(i,t)?c(e.get(t)):o.call(i,r)?c(e.get(r)):void(e!==i&&e.get(t))}function we(e,t=!1){const n=this.__v_raw,s=Ge(n),i=Ge(e);return t||(w(e,i)&&Q(s,0,e),Q(s,0,i)),e===i?n.has(e):n.has(e)||n.has(i)}function be(e,t=!1){return e=e.__v_raw,!t&&Q(Ge(e),0,H),Reflect.get(e,"size",e)}function me(e,t=!1){t||Ke(e)||Je(e)||(e=Ge(e));const n=Ge(this);return ge(n).has.call(n,e)||(n.add(e),G(n,"add",e,e)),this}function Se(e,t,n=!1){n||Ke(t)||Je(t)||(t=Ge(t));const s=Ge(this),{has:i,get:r}=ge(s);let o=i.call(s,e);o||(e=Ge(e),o=i.call(s,e));const c=r.call(s,e);return s.set(e,t),o?w(t,c)&&G(s,"set",e,t):G(s,"add",e,t),this}function Re(e){const t=Ge(this),{has:n,get:s}=ge(t);let i=n.call(t,e);i||(e=Ge(e),i=n.call(t,e)),s&&s.call(t,e);const r=t.delete(e);return i&&G(t,"delete",e,void 0),r}function xe(){const e=Ge(this),t=0!==e.size,n=e.clear();return t&&G(e,"clear",void 0,void 0),n}function $e(e,t){return function(n,s){const i=this,r=i.__v_raw,o=Ge(r),c=t?_e:e?Ye:Xe;return!e&&Q(o,0,H),r.forEach(((e,t)=>n.call(s,c(e),c(t),i)))}}function ke(e,t,n){return function(...s){const i=this.__v_raw,r=Ge(i),o=u(r),c="entries"===e||e===Symbol.iterator&&o,a="keys"===e&&o,h=i[e](...s),l=n?_e:t?Ye:Xe;return!t&&Q(r,0,a?J:H),{next(){const{value:e,done:t}=h.next();return t?{value:e,done:t}:{value:c?[l(e[0]),l(e[1])]:l(e),done:t}},[Symbol.iterator](){return this}}}}function Pe(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function je(){const e={get(e){return ye(this,e)},get size(){return be(this)},has:we,add:me,set:Se,delete:Re,clear:xe,forEach:$e(!1,!1)},t={get(e){return ye(this,e,!1,!0)},get size(){return be(this)},has:we,add(e){return me.call(this,e,!0)},set(e,t){return Se.call(this,e,t,!0)},delete:Re,clear:xe,forEach:$e(!1,!0)},n={get(e){return ye(this,e,!0)},get size(){return be(this,!0)},has(e){return we.call(this,e,!0)},add:Pe("add"),set:Pe("set"),delete:Pe("delete"),clear:Pe("clear"),forEach:$e(!0,!1)},s={get(e){return ye(this,e,!0,!0)},get size(){return be(this,!0)},has(e){return we.call(this,e,!0)},add:Pe("add"),set:Pe("set"),delete:Pe("delete"),clear:Pe("clear"),forEach:$e(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((i=>{e[i]=ke(i,!1,!1),n[i]=ke(i,!0,!1),t[i]=ke(i,!1,!0),s[i]=ke(i,!0,!0)})),[e,n,t,s]}const[De,Oe,Te,Ee]=je();function Ae(e,t){const n=t?e?Ee:Te:e?Oe:De;return(t,s,i)=>"__v_isReactive"===s?!e:"__v_isReadonly"===s?e:"__v_raw"===s?t:Reflect.get(c(n,s)&&s in t?n:t,s,i)}const Le={get:Ae(!1,!1)},Ie={get:Ae(!1,!0)},Me={get:Ae(!0,!1)},qe={get:Ae(!0,!0)},Ce=new WeakMap,Ne=new WeakMap,ze=new WeakMap,Ue=new WeakMap;function Ve(e){return Je(e)?e:Be(e,!1,fe,Le,Ce)}function We(e){return Be(e,!1,de,Ie,Ne)}function Fe(e){return Be(e,!0,pe,Me,ze)}function Be(e,t,n,s,i){if(!p(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const r=i.get(e);if(r)return r;const o=(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}}(_(c));var c;if(0===o)return e;const a=new Proxy(e,2===o?s:n);return i.set(e,a),a}function He(e){return Je(e)?He(e.__v_raw):!(!e||!e.__v_isReactive)}function Je(e){return!(!e||!e.__v_isReadonly)}function Ke(e){return!(!e||!e.__v_isShallow)}function Qe(e){return!!e&&!!e.__v_raw}function Ge(e){const t=e&&e.__v_raw;return t?Ge(t):e}const Xe=e=>p(e)?Ve(e):e,Ye=e=>p(e)?Fe(e):e;function Ze(e){return!!e&&!0===e.__v_isRef}function et(e){return tt(e,!1)}function tt(e,t){return Ze(e)?e:new nt(e,t)}class nt{constructor(e,t){this.dep=new W,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:Ge(e),this._value=t?e:Xe(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,n=this.__v_isShallow||Ke(e)||Je(e);e=n?e:Ge(e),w(e,t)&&(this._rawValue=e,this._value=n?e:Xe(e),this.dep.trigger())}}function st(e){return Ze(e)?e.value:e}const it={get:(e,t,n)=>st(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const i=e[t];return Ze(i)&&!Ze(n)?(i.value=n,!0):Reflect.set(e,t,n,s)}};class rt{constructor(e){this.__v_isRef=!0,this._value=void 0;const t=this.dep=new W,{get:n,set:s}=e(t.track.bind(t),t.trigger.bind(t));this._get=n,this._set=s}get value(){return this._value=this._get()}set value(e){this._set(e)}}class ot{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0}get value(){const e=this._object[this._key];return this._value=void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return e=Ge(this._object),t=this._key,null==(n=B.get(e))?void 0:n.get(t);var e,t,n}}class ct{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function at(e,t,n){return Ze(e)?e:l(e)?new ct(e):p(e)&&arguments.length>1?ut(e,t,n):et(e)}function ut(e,t,n){const s=e[t];return Ze(s)?s:new ot(e,t,n)}class ht{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new W(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=V-1,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){m!==this&&(this.flags|=16,this.dep.notify())}get value(){const e=this.dep.track();return L(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}const lt={},ft=new WeakMap;let pt;function dt(e,t,i=n){const{immediate:o,deep:c,once:u,scheduler:h,augmentJob:f,call:p}=i,d=e=>c?e:Ke(e)||!1===c||0===c?vt(e,1):vt(e);let v,_,g,y,b=!1,m=!1;if(Ze(e)?(_=()=>e.value,b=Ke(e)):He(e)?(_=()=>d(e),b=!0):a(e)?(m=!0,b=e.some((e=>He(e)||Ke(e))),_=()=>e.map((e=>Ze(e)?e.value:He(e)?d(e):l(e)?p?p(e,2):e():void 0))):_=l(e)?t?p?()=>p(e,2):e:()=>{if(g){N();try{g()}finally{z()}}const t=pt;pt=v;try{return p?p(e,3,[y]):e(y)}finally{pt=t}}:s,t&&c){const e=_,t=!0===c?1/0:c;_=()=>vt(e(),t)}const S=x(),R=()=>{v.stop(),S&&r(S.effects,v)};if(u)if(t){const e=t;t=(...t)=>{e(...t),R()}}else{const e=_;_=()=>{e(),R()}}let $=m?new Array(e.length).fill(lt):lt;const P=e=>{if(1&v.flags&&(v.dirty||e))if(t){const e=v.run();if(c||b||(m?e.some(((e,t)=>w(e,$[t]))):w(e,$))){g&&g();const n=pt;pt=v;try{const n=[e,$===lt?void 0:m&&$[0]===lt?[]:$,y];p?p(t,3,n):t(...n),$=e}finally{pt=n}}}else v.run()};return f&&f(P),v=new k(_),v.scheduler=h?()=>h(P,!1):P,y=e=>function(e,t=!1,n=pt){if(n){let t=ft.get(n);t||ft.set(n,t=[]),t.push(e)}}(e,!1,v),g=v.onStop=()=>{const e=ft.get(v);if(e){if(p)p(e,4);else for(const t of e)t();ft.delete(v)}},t?o?P(!0):$=v.run():h?h(P.bind(null,!0),!0):v.run(),R.pause=v.pause.bind(v),R.resume=v.resume.bind(v),R.stop=R,R}function vt(e,t=1/0,n){if(t<=0||!p(e)||e.__v_skip)return e;if((n=n||new Set).has(e))return e;if(n.add(e),t--,Ze(e))vt(e.value,t,n);else if(a(e))for(let s=0;s<e.length;s++)vt(e[s],t,n);else if(h(e)||u(e))e.forEach((e=>{vt(e,t,n)}));else if(g(e)){for(const s in e)vt(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&vt(e[s],t,n)}return e}const{isArray:_t}=Array;function gt(e){return Object.prototype.toString.call(e).slice(8,-1)}function yt(e){return"function"==typeof e}function wt(e){if(function(e){const t=new Set(["undefined","boolean","number","string"]);return null===e||t.has(typeof e)}(e)||yt(e))return e;if(Ze(e))return wt(e.value);if(Qe(e))return wt(Ge(e));if(_t(e))return e.map((e=>wt(e)));if(function(e){return"Object"===gt(e)}(e)){const t={};return Object.keys(e).forEach((n=>{t[n]=wt(e[n])})),t}throw new TypeError(`${gt(e)} value is not supported`)}function bt(e,t,n){var s;null!==(s=n)&&"object"==typeof s&&dt(Ze(n)?n:()=>n,(()=>{e.setData({[t]:wt(n)})}),{deep:!0})}e._instance=null;const mt=t=>{e._instance=t},St=(e,t,n,...s)=>{if(t&&t[n]&&t[n].apply(e,s),!e[`$${n}`])return;const i={onLoad:"onUnload",onShow:"onHide",attached:"detached",show:"hide"}[n];e[`$${n}`].forEach((t=>{if(i){const n=e[`$${i}`]&&e[`$${i}`].find((e=>e.front===t));n&&n()}const n=t.apply(e,s);if(i&&"function"==typeof n){e[`$${i}`]&&e[`$${i}`].find((e=>e.front===t))||(n.front,e[`$${i}`]||(e[`$${i}`]=[]),e[`$${i}`].push(n))}}))},Rt=(e,t,n,...s)=>{if(t&&t[n])return t[n].apply(e,s);if(e[`$${n}`]){if(e[`$${n}`].length)throw new Error(`一个page只能配置一个${n}`);return e[`$${n}`][0].apply(e,s)}},xt=(e,t,n)=>{e&&(e[`$${t}`]||(e[`$${t}`]=[]),e[`$${t}`].push(n.bind(e)))};e.launchPromise=Promise.resolve(!0);const $t=e=>e?Object.keys(e).map((t=>{let n=e[t];return"object"==typeof e[t]&&(n=encodeURIComponent(JSON.stringify(e[t]))),`${t}=${n}`})).join("&"):"";e._queries={};const kt=t=>{e._queries=t},Pt=(e,t)=>{if(!t)return e;let n={};for(let s in e)if(s in t){const i=e[s],r=t[s];if(!r){n[s]=i;break}const o=r.type||r,c=e=>"formatter"in r&&void 0!==r.formatter?r.formatter(e):o===Boolean?!!e:o===Number?Number(e):o===Object?e?JSON.parse(decodeURIComponent(e)):{}:o===Array?e?JSON.parse(decodeURIComponent(e)):[]:(null===o||o===String||console.error("未知的·type·",o),e);n[s]=c(i)}else n[s]=e[s];return n};function jt(t){e.activePinia=t}e.activePinia=void 0,e.ReactiveEffect=k,e.attached=t=>xt(e._instance,"attached",t),e.computed=function(e,t,n=!1){let s,i;return l(e)?s=e:(s=e.get,i=e.set),new ht(s,i,n)},e.createApp=t=>{if(!t)return App({});let n={};if("function"!=typeof t){const{setup:e,...s}=t;n=s,t=e}return t?App({...n,onLaunch(s){e.launchPromise=new Promise((async e=>{mt(this);const i=await t.call(this,s);void 0!==i&&Object.keys(i).forEach((e=>{this[e]=i[e]})),St(this,n,"onLaunch",s),mt(null),e(!0)}))},onShow(e){St(this,n,"onShow",e)},onHide(){St(this,n,"onHide")},onError(e){St(this,n,"onError",e)},onPageNotFound(e){St(this,n,"onPageNotFound",e)},onUnhandledRejection(e){St(this,n,"onUnhandledRejection",e)},onThemeChange(e){St(this,n,"onThemeChange",e)}}):App(n)},e.createPinia=function(){const e=R(!0),t=e.run((()=>et({}))),n={install(){jt(n)},scope:e,state:t,stores:{}};return n},e.createQuery=Pt,e.customRef=function(e){return new rt(e)},e.deepToRaw=wt,e.deepWatch=bt,e.defineComponent=t=>{if(!t)return Component({});let n={};if("function"!=typeof t){const{setup:e,...s}=t;n=s,t=e}if(!t)return Component(n);let s=null;return n.properties&&(s=Object.keys(n.properties)),s&&s.forEach((e=>{void 0===n.observers&&(n.observers={});const t=n.observers[e];n.observers[e]=function(n){this.$props&&(this.$props[e]=n),void 0!==t&&t.call(this,n)}})),Component({...n,lifetimes:{attached(){e.launchPromise.then((()=>{mt(this),this.$scope=R();const e={};s&&s.forEach((t=>{e[t]=this.data[t]})),this.$props=We(e),this.$context={emit:(e,...t)=>{this.triggerEvent(e,{value:t[0]})}},this.$scope.run((()=>{const e=t.call(this,this.$props,this.$context);void 0!==e&&Object.keys(e).forEach((t=>{const n=e[t];yt(n)?this[t]=n:(this.setData({[t]:wt(n)}),bt(this,t,n))})),St(this,n,"attached")})),mt(null)}))},ready(){St(this,n,"ready")},moved(){St(this,n,"moved")},detached(){St(this,n,"detached"),this.$scope&&this.$scope.stop(),Object.keys(this).forEach((e=>{try{/^$/.test(e)&&delete this[e]}catch(e){console.error("销毁异常",e)}}))},error(e){St(this,n,"error",e)}},pageLifetimes:{show(){St(this,n,"show")},hide(){St(this,n,"hide")},resize(e){St(this,n,"resize",e)},routeDone(){St(this,n,"routeDone")}}})},e.definePage=t=>{if(!t)return Page({});let n={};if("function"!=typeof t){const{setup:e,...s}=t;n=s||{},t=e}if(!t)return Page(n);const{queries:s,...i}=n;return Page({...i,onLoad(i){e.launchPromise.then((()=>{mt(this),kt(s),this.$scope=R(),this.$query=Pt(i,s),this.$context={},this.$scope.run((()=>{const e=t.call(this,this.$query,this.$context);void 0!==e&&Object.keys(e).forEach((t=>{const n=e[t];yt(n)?this[t]=n:(this.setData({[t]:wt(n)}),bt(this,t,n))})),St(this,n,"onLoad",i)})),kt({}),mt(null)}))},onShow(){St(this,n,"onShow")},onReady(){St(this,n,"onReady")},onHide(){St(this,n,"onHide")},onUnload(){St(this,n,"onUnload"),this.$scope&&this.$scope.stop(),Object.keys(this).forEach((e=>{try{/^$/.test(e)&&delete this[e]}catch(e){console.error("销毁异常",e)}}))},onRouteDone(){St(this,n,"onRouteDone")},onPullDownRefresh(){St(this,n,"onPullDownRefresh")},onReachBottom(){St(this,n,"onReachBottom")},onPageScroll(e){St(this,n,"onPageScroll",e)},onAddToFavorites(e){return Rt(this,n,"onAddToFavorites",e)},onShareAppMessage(e){return Rt(this,n,"onShareAppMessage",e)},onShareTimeline(){return Rt(this,n,"onShareTimeline")},onResize(e){St(this,n,"onResize",e)},onTabItemTap(e){St(this,n,"onTabItemTap",e)},onSaveExitState(){St(this,n,"onSaveExitState")}})},e.defineStore=function(t,n,s){return function(i){if(i&&jt(i),!(i=e.activePinia))throw new Error("no active pinia");return i.stores[t]||function(e,t,n,s){const i={},r=e.scope.run(n);Object.assign(i,r),e.stores[t]=i;const o="PINIA_"+t;s&&s.persist&&s.persist.forEach((n=>{const s=`${o}_${n}`,i=wx.getStorageSync(s),r=wx.getStorageInfoSync().keys.includes(s);e.stores[t][n]&&r&&(Ze(e.stores[t][n])?e.stores[t][n].value=i:Object.keys(i).forEach((s=>{e.stores[t][n][s]=i[s]}))),dt(Ze(e.stores[t][n])?e.stores[t][n]:()=>e.stores[t][n],(e=>{wx.setStorageSync(s,e)}),{deep:!0})}))}(i,t,n,s),i.stores[t]}},e.detached=t=>xt(e._instance,"detached",t),e.effect=function(e,t){e.effect instanceof k&&(e=e.effect.fn);const n=new k(e);t&&i(n,t);try{n.run()}catch(e){throw n.stop(),e}const s=n.run.bind(n);return s.effect=n,s},e.effectScope=R,e.error=t=>xt(e._instance,"error",t),e.getCurrentPage=()=>{const e=getCurrentPages();return e&&e[e.length-1]},e.getCurrentScope=x,e.hide=t=>xt(e._instance,"hide",t),e.isProxy=Qe,e.isReactive=He,e.isReadonly=Je,e.isRef=Ze,e.isShallow=Ke,e.lifetimeEmit=St,e.lifetimeEmitOnce=Rt,e.lifetimeOn=xt,e.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},e.moved=t=>xt(e._instance,"moved",t),e.onAddToFavorites=t=>xt(e._instance,"onAddToFavorites",t),e.onError=t=>xt(e._instance,"onError",t),e.onHide=t=>xt(e._instance,"onHide",t),e.onLaunch=t=>xt(e._instance,"onLaunch",t),e.onLoad=t=>xt(e._instance,"onLoad",t),e.onPageNotFound=t=>xt(e._instance,"onPageNotFound",t),e.onPageScroll=t=>xt(e._instance,"onPageScroll",t),e.onPullDownRefresh=t=>xt(e._instance,"onPullDownRefresh",t),e.onReachBottom=t=>xt(e._instance,"onReachBottom",t),e.onReady=t=>xt(e._instance,"onReady",t),e.onResize=t=>xt(e._instance,"onResize",t),e.onRouteDone=t=>xt(e._instance,"onRouteDone",t),e.onSaveExitState=t=>xt(e._instance,"onSaveExitState",t),e.onScopeDispose=function(e,t=!1){b&&b.cleanups.push(e)},e.onShareAppMessage=t=>xt(e._instance,"onShareAppMessage",t),e.onShareTimeline=t=>xt(e._instance,"onShareTimeline",t),e.onShow=t=>xt(e._instance,"onShow",t),e.onTabItemTap=t=>xt(e._instance,"onTabItemTap",t),e.onThemeChange=t=>xt(e._instance,"onThemeChange",t),e.onUnhandledRejection=t=>xt(e._instance,"onUnhandledRejection",t),e.onUnload=t=>xt(e._instance,"onUnload",t),e.proxyRefs=function(e){return He(e)?e:new Proxy(e,it)},e.reactive=Ve,e.readonly=Fe,e.ready=t=>xt(e._instance,"ready",t),e.ref=et,e.resize=t=>xt(e._instance,"resize",t),e.routeDone=t=>xt(e._instance,"routeDone",t),e.setActivatePinia=jt,e.setInstance=mt,e.setQueries=kt,e.shallowReactive=We,e.shallowReadonly=function(e){return Be(e,!0,ve,qe,Ue)},e.shallowRef=function(e){return tt(e,!0)},e.show=t=>xt(e._instance,"show",t),e.stop=function(e){e.effect.stop()},e.storeToRefs=function(e){e=Ge(e);const t={};for(const n in e){const s=e[n];(Ze(s)||He(s))&&(t[n]=at(e,n))}return t},e.toRaw=Ge,e.toRef=at,e.toRefs=function(e){const t=a(e)?new Array(e.length):{};for(const n in e)t[n]=ut(e,n);return t},e.toValue=function(e){return l(e)?e():st(e)},e.triggerRef=function(e){e.dep.trigger()},e.unref=st,e.useInstance=()=>e._instance,e.useRoute=()=>{const t=getCurrentPages(),n=t[t.length-1];return{path:n.route,query:Pt(n.options,e._queries)}},e.useRouter=()=>({push:e=>{if("string"==typeof e)return wx.navigateTo({url:e});let t;return t="path"in e?e.query?`${e.path}?${$t(e.query)}`:e.path:e.url,wx.navigateTo({url:t,...e})},replace:e=>{if("string"==typeof e)return wx.redirectTo({url:e});let t;return t="path"in e?e.query?`${e.path}?${$t(e.query)}`:e.path:e.url,wx.redirectTo({url:t,...e})},go:e=>{if(!(e>0))return wx.navigateBack({delta:Math.abs(e)});console.warn("微信小程序不支持前进历史记录")},back:e=>wx.navigateBack(e),switchTab:e=>{if("string"==typeof e)return wx.switchTab({url:e});let t;return t="path"in e?e.query?`${e.path}?${$t(e.query)}`:e.path:e.url,wx.switchTab({url:t,...e})},reLaunch:e=>{if("string"==typeof e)return wx.reLaunch({url:e});let t;return t="path"in e?e.query?`${e.path}?${$t(e.query)}`:e.path:e.url,wx.reLaunch({url:t,...e})}}),e.watch=dt})); | ||
| let w,m;class S{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=w,!e&&w&&(this.index=(w.scopes||(w.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){let e,t;if(this._isPaused=!1,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){const t=w;try{return w=this,e()}finally{w=t}}}on(){w=this}off(){w=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 R(e){return new S(e)}function $(){return w}const x=new WeakSet;class P{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.nextEffect=void 0,this.cleanup=void 0,this.scheduler=void 0,w&&w.active&&w.effects.push(this)}pause(){this.flags|=64}resume(){64&this.flags&&(this.flags&=-65,x.has(this)&&(x.delete(this),this.trigger()))}notify(){2&this.flags&&!(32&this.flags)||8&this.flags||(this.flags|=8,this.nextEffect=O,O=this)}run(){if(!(1&this.flags))return this.fn();this.flags|=2,M(this),E(this);const e=m,t=C;m=this,C=!0;try{return this.fn()}finally{D(this),m=e,C=t,this.flags&=-3}}stop(){if(1&this.flags){for(let e=this.deps;e;e=e.nextDep)A(e);this.deps=this.depsTail=void 0,M(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?x.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){I(this)&&this.run()}get dirty(){return I(this)}}let O,k=0;function j(){k++}function T(){if(--k>0)return;let e;for(;O;){let t=O;for(O=void 0;t;){const n=t.nextEffect;if(t.nextEffect=void 0,t.flags&=-9,1&t.flags)try{t.trigger()}catch(t){e||(e=t)}t=n}}if(e)throw e}function E(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function D(e){let t,n=e.depsTail;for(let e=n;e;e=e.prevDep)-1===e.version?(e===n&&(n=e.prevDep),A(e),L(e)):t=e,e.dep.activeLink=e.prevActiveLink,e.prevActiveLink=void 0;e.deps=t,e.depsTail=n}function I(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&!1===q(t.dep.computed)||t.dep.version!==t.version)return!0;return!!e._dirty}function q(e){if(2&e.flags)return!1;if(4&e.flags&&!(16&e.flags))return;if(e.flags&=-17,e.globalVersion===W)return;e.globalVersion=W;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&!I(e))return void(e.flags&=-3);const n=m,s=C;m=e,C=!0;try{E(e);const n=e.fn();(0===t.version||b(n,e._value))&&(e._value=n,t.version++)}catch(e){throw t.version++,e}finally{m=n,C=s,D(e),e.flags&=-3}}function A(e){const{dep:t,prevSub:n,nextSub:s}=e;if(n&&(n.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=n,e.nextSub=void 0),t.subs===e&&(t.subs=n),!t.subs&&t.computed){t.computed.flags&=-5;for(let e=t.computed.deps;e;e=e.nextDep)A(e)}}function L(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let C=!0;const U=[];function z(){U.push(C),C=!1}function N(){const e=U.pop();C=void 0===e||e}function M(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const e=m;m=void 0;try{t()}finally{m=e}}}let W=0;class V{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0}track(e){if(!m||!C)return;let t=this.activeLink;if(void 0===t||t.sub!==m)t=this.activeLink={dep:this,sub:m,version:this.version,nextDep:void 0,prevDep:void 0,nextSub:void 0,prevSub:void 0,prevActiveLink:void 0},m.deps?(t.prevDep=m.depsTail,m.depsTail.nextDep=t,m.depsTail=t):m.deps=m.depsTail=t,4&m.flags&&B(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){const e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=m.depsTail,t.nextDep=void 0,m.depsTail.nextDep=t,m.depsTail=t,m.deps===t&&(m.deps=e)}return t}trigger(e){this.version++,W++,this.notify(e)}notify(e){j();try{0;for(let e=this.subs;e;e=e.prevSub)e.sub.notify()}finally{T()}}}function B(e){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)B(e)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}const F=new WeakMap,H=Symbol(""),J=Symbol(""),K=Symbol("");function Q(e,t,n){if(C&&m){let t=F.get(e);t||F.set(e,t=new Map);let s=t.get(n);s||t.set(n,s=new V),s.track()}}function G(e,t,n,s,i,r){const o=F.get(e);if(!o)return void W++;let c=[];if("clear"===t)c=[...o.values()];else{const i=a(e),r=i&&y(n);if(i&&"length"===n){const e=Number(s);o.forEach(((t,n)=>{("length"===n||n===K||!f(n)&&n>=e)&&c.push(t)}))}else{const s=e=>e&&c.push(e);switch(void 0!==n&&s(o.get(n)),r&&s(o.get(K)),t){case"add":i?r&&s(o.get("length")):(s(o.get(H)),u(e)&&s(o.get(J)));break;case"delete":i||(s(o.get(H)),u(e)&&s(o.get(J)));break;case"set":u(e)&&s(o.get(H))}}}j();for(const e of c)e.trigger();T()}function X(e){const t=Ge(e);return t===e?t:(Q(t,0,K),Ke(e)?t:t.map(Xe))}function Y(e){return Q(e=Ge(e),0,K),e}const Z={__proto__:null,[Symbol.iterator](){return ee(this,Symbol.iterator,Xe)},concat(...e){return X(this).concat(...e.map((e=>a(e)?X(e):e)))},entries(){return ee(this,"entries",(e=>(e[1]=Xe(e[1]),e)))},every(e,t){return ne(this,"every",e,t,void 0,arguments)},filter(e,t){return ne(this,"filter",e,t,(e=>e.map(Xe)),arguments)},find(e,t){return ne(this,"find",e,t,Xe,arguments)},findIndex(e,t){return ne(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return ne(this,"findLast",e,t,Xe,arguments)},findLastIndex(e,t){return ne(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return ne(this,"forEach",e,t,void 0,arguments)},includes(...e){return ie(this,"includes",e)},indexOf(...e){return ie(this,"indexOf",e)},join(e){return X(this).join(e)},lastIndexOf(...e){return ie(this,"lastIndexOf",e)},map(e,t){return ne(this,"map",e,t,void 0,arguments)},pop(){return re(this,"pop")},push(...e){return re(this,"push",e)},reduce(e,...t){return se(this,"reduce",e,t)},reduceRight(e,...t){return se(this,"reduceRight",e,t)},shift(){return re(this,"shift")},some(e,t){return ne(this,"some",e,t,void 0,arguments)},splice(...e){return re(this,"splice",e)},toReversed(){return X(this).toReversed()},toSorted(e){return X(this).toSorted(e)},toSpliced(...e){return X(this).toSpliced(...e)},unshift(...e){return re(this,"unshift",e)},values(){return ee(this,"values",Xe)}};function ee(e,t,n){const s=Y(e),i=s[t]();return s===e||Ke(e)||(i._next=i.next,i.next=()=>{const e=i._next();return e.value&&(e.value=n(e.value)),e}),i}const te=Array.prototype;function ne(e,t,n,s,i,r){const o=Y(e),c=o!==e&&!Ke(e),a=o[t];if(a!==te[t]){const t=a.apply(e,r);return c?Xe(t):t}let u=n;o!==e&&(c?u=function(t,s){return n.call(this,Xe(t),s,e)}:n.length>2&&(u=function(t,s){return n.call(this,t,s,e)}));const h=a.call(o,u,s);return c&&i?i(h):h}function se(e,t,n,s){const i=Y(e);let r=n;return i!==e&&(Ke(e)?n.length>3&&(r=function(t,s,i){return n.call(this,t,s,i,e)}):r=function(t,s,i){return n.call(this,t,Xe(s),i,e)}),i[t](r,...s)}function ie(e,t,n){const s=Ge(e);Q(s,0,K);const i=s[t](...n);return-1!==i&&!1!==i||!Qe(n[0])?i:(n[0]=Ge(n[0]),s[t](...n))}function re(e,t,n=[]){z(),j();const s=Ge(e)[t].apply(e,n);return T(),N(),s}const oe=t("__proto__,__v_isRef,__isVue"),ce=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(f));function ae(e){f(e)||(e=String(e));const t=Ge(this);return Q(t,0,e),t.hasOwnProperty(e)}class ue{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){const s=this._isReadonly,i=this._isShallow;if("__v_isReactive"===t)return!s;if("__v_isReadonly"===t)return s;if("__v_isShallow"===t)return i;if("__v_raw"===t)return n===(s?i?Me:Ne:i?ze:Ue).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const r=a(e);if(!s){let e;if(r&&(e=Z[t]))return e;if("hasOwnProperty"===t)return ae}const o=Reflect.get(e,t,Ze(e)?e:n);return(f(t)?ce.has(t):oe(t))?o:(s||Q(e,0,t),i?o:Ze(o)?r&&y(t)?o:o.value:p(o)?s?Be(o):We(o):o)}}class he extends ue{constructor(e=!1){super(!1,e)}set(e,t,n,s){let i=e[t];if(!this._isShallow){const t=Je(i);if(Ke(n)||Je(n)||(i=Ge(i),n=Ge(n)),!a(e)&&Ze(i)&&!Ze(n))return!t&&(i.value=n,!0)}const r=a(e)&&y(t)?Number(t)<e.length:c(e,t),o=Reflect.set(e,t,n,Ze(e)?e:s);return e===Ge(s)&&(r?b(n,i)&&G(e,"set",t,n):G(e,"add",t,n)),o}deleteProperty(e,t){const n=c(e,t);e[t];const s=Reflect.deleteProperty(e,t);return s&&n&&G(e,"delete",t,void 0),s}has(e,t){const n=Reflect.has(e,t);return f(t)&&ce.has(t)||Q(e,0,t),n}ownKeys(e){return Q(e,0,a(e)?"length":H),Reflect.ownKeys(e)}}class le extends ue{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}const fe=new he,pe=new le,de=new he(!0),ve=new le(!0),_e=e=>e,ge=e=>Reflect.getPrototypeOf(e);function ye(e,t,n=!1,s=!1){const i=Ge(e=e.__v_raw),r=Ge(t);n||(b(t,r)&&Q(i,0,t),Q(i,0,r));const{has:o}=ge(i),c=s?_e:n?Ye:Xe;return o.call(i,t)?c(e.get(t)):o.call(i,r)?c(e.get(r)):void(e!==i&&e.get(t))}function be(e,t=!1){const n=this.__v_raw,s=Ge(n),i=Ge(e);return t||(b(e,i)&&Q(s,0,e),Q(s,0,i)),e===i?n.has(e):n.has(e)||n.has(i)}function we(e,t=!1){return e=e.__v_raw,!t&&Q(Ge(e),0,H),Reflect.get(e,"size",e)}function me(e,t=!1){t||Ke(e)||Je(e)||(e=Ge(e));const n=Ge(this);return ge(n).has.call(n,e)||(n.add(e),G(n,"add",e,e)),this}function Se(e,t,n=!1){n||Ke(t)||Je(t)||(t=Ge(t));const s=Ge(this),{has:i,get:r}=ge(s);let o=i.call(s,e);o||(e=Ge(e),o=i.call(s,e));const c=r.call(s,e);return s.set(e,t),o?b(t,c)&&G(s,"set",e,t):G(s,"add",e,t),this}function Re(e){const t=Ge(this),{has:n,get:s}=ge(t);let i=n.call(t,e);i||(e=Ge(e),i=n.call(t,e)),s&&s.call(t,e);const r=t.delete(e);return i&&G(t,"delete",e,void 0),r}function $e(){const e=Ge(this),t=0!==e.size,n=e.clear();return t&&G(e,"clear",void 0,void 0),n}function xe(e,t){return function(n,s){const i=this,r=i.__v_raw,o=Ge(r),c=t?_e:e?Ye:Xe;return!e&&Q(o,0,H),r.forEach(((e,t)=>n.call(s,c(e),c(t),i)))}}function Pe(e,t,n){return function(...s){const i=this.__v_raw,r=Ge(i),o=u(r),c="entries"===e||e===Symbol.iterator&&o,a="keys"===e&&o,h=i[e](...s),l=n?_e:t?Ye:Xe;return!t&&Q(r,0,a?J:H),{next(){const{value:e,done:t}=h.next();return t?{value:e,done:t}:{value:c?[l(e[0]),l(e[1])]:l(e),done:t}},[Symbol.iterator](){return this}}}}function Oe(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function ke(){const e={get(e){return ye(this,e)},get size(){return we(this)},has:be,add:me,set:Se,delete:Re,clear:$e,forEach:xe(!1,!1)},t={get(e){return ye(this,e,!1,!0)},get size(){return we(this)},has:be,add(e){return me.call(this,e,!0)},set(e,t){return Se.call(this,e,t,!0)},delete:Re,clear:$e,forEach:xe(!1,!0)},n={get(e){return ye(this,e,!0)},get size(){return we(this,!0)},has(e){return be.call(this,e,!0)},add:Oe("add"),set:Oe("set"),delete:Oe("delete"),clear:Oe("clear"),forEach:xe(!0,!1)},s={get(e){return ye(this,e,!0,!0)},get size(){return we(this,!0)},has(e){return be.call(this,e,!0)},add:Oe("add"),set:Oe("set"),delete:Oe("delete"),clear:Oe("clear"),forEach:xe(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((i=>{e[i]=Pe(i,!1,!1),n[i]=Pe(i,!0,!1),t[i]=Pe(i,!1,!0),s[i]=Pe(i,!0,!0)})),[e,n,t,s]}const[je,Te,Ee,De]=ke();function Ie(e,t){const n=t?e?De:Ee:e?Te:je;return(t,s,i)=>"__v_isReactive"===s?!e:"__v_isReadonly"===s?e:"__v_raw"===s?t:Reflect.get(c(n,s)&&s in t?n:t,s,i)}const qe={get:Ie(!1,!1)},Ae={get:Ie(!1,!0)},Le={get:Ie(!0,!1)},Ce={get:Ie(!0,!0)},Ue=new WeakMap,ze=new WeakMap,Ne=new WeakMap,Me=new WeakMap;function We(e){return Je(e)?e:Fe(e,!1,fe,qe,Ue)}function Ve(e){return Fe(e,!1,de,Ae,ze)}function Be(e){return Fe(e,!0,pe,Le,Ne)}function Fe(e,t,n,s,i){if(!p(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const r=i.get(e);if(r)return r;const o=(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}}(_(c));var c;if(0===o)return e;const a=new Proxy(e,2===o?s:n);return i.set(e,a),a}function He(e){return Je(e)?He(e.__v_raw):!(!e||!e.__v_isReactive)}function Je(e){return!(!e||!e.__v_isReadonly)}function Ke(e){return!(!e||!e.__v_isShallow)}function Qe(e){return!!e&&!!e.__v_raw}function Ge(e){const t=e&&e.__v_raw;return t?Ge(t):e}const Xe=e=>p(e)?We(e):e,Ye=e=>p(e)?Be(e):e;function Ze(e){return!!e&&!0===e.__v_isRef}function et(e){return tt(e,!1)}function tt(e,t){return Ze(e)?e:new nt(e,t)}class nt{constructor(e,t){this.dep=new V,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:Ge(e),this._value=t?e:Xe(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,n=this.__v_isShallow||Ke(e)||Je(e);e=n?e:Ge(e),b(e,t)&&(this._rawValue=e,this._value=n?e:Xe(e),this.dep.trigger())}}function st(e){return Ze(e)?e.value:e}const it={get:(e,t,n)=>st(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const i=e[t];return Ze(i)&&!Ze(n)?(i.value=n,!0):Reflect.set(e,t,n,s)}};class rt{constructor(e){this.__v_isRef=!0,this._value=void 0;const t=this.dep=new V,{get:n,set:s}=e(t.track.bind(t),t.trigger.bind(t));this._get=n,this._set=s}get value(){return this._value=this._get()}set value(e){this._set(e)}}class ot{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0}get value(){const e=this._object[this._key];return this._value=void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return e=Ge(this._object),t=this._key,null==(n=F.get(e))?void 0:n.get(t);var e,t,n}}class ct{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function at(e,t,n){return Ze(e)?e:l(e)?new ct(e):p(e)&&arguments.length>1?ut(e,t,n):et(e)}function ut(e,t,n){const s=e[t];return Ze(s)?s:new ot(e,t,n)}class ht{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new V(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=!t,this.isSSR=n}notify(){m!==this&&(this.flags|=16,this.dep.notify())}get value(){const e=this.dep.track();return q(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}const lt={},ft=new WeakMap;let pt;function dt(e,t,i=n){const{immediate:o,deep:c,once:u,scheduler:h,augmentJob:f,call:p}=i,d=e=>c?e:Ke(e)||!1===c||0===c?vt(e,1):vt(e);let v,_,g,y,w=!1,m=!1;if(Ze(e)?(_=()=>e.value,w=Ke(e)):He(e)?(_=()=>d(e),w=!0):a(e)?(m=!0,w=e.some((e=>He(e)||Ke(e))),_=()=>e.map((e=>Ze(e)?e.value:He(e)?d(e):l(e)?p?p(e,2):e():void 0))):_=l(e)?t?p?()=>p(e,2):e:()=>{if(g){z();try{g()}finally{N()}}const t=pt;pt=v;try{return p?p(e,3,[y]):e(y)}finally{pt=t}}:s,t&&c){const e=_,t=!0===c?1/0:c;_=()=>vt(e(),t)}const S=$(),R=()=>{v.stop(),S&&r(S.effects,v)};if(u)if(t){const e=t;t=(...t)=>{e(...t),R()}}else{const e=_;_=()=>{e(),R()}}let x=m?new Array(e.length).fill(lt):lt;const O=e=>{if(1&v.flags&&(v.dirty||e))if(t){const e=v.run();if(c||w||(m?e.some(((e,t)=>b(e,x[t]))):b(e,x))){g&&g();const n=pt;pt=v;try{const n=[e,x===lt?void 0:m&&x[0]===lt?[]:x,y];p?p(t,3,n):t(...n),x=e}finally{pt=n}}}else v.run()};return f&&f(O),v=new P(_),v.scheduler=h?()=>h(O,!1):O,y=e=>function(e,t=!1,n=pt){if(n){let t=ft.get(n);t||ft.set(n,t=[]),t.push(e)}}(e,!1,v),g=v.onStop=()=>{const e=ft.get(v);if(e){if(p)p(e,4);else for(const t of e)t();ft.delete(v)}},t?o?O(!0):x=v.run():h?h(O.bind(null,!0),!0):v.run(),R.pause=v.pause.bind(v),R.resume=v.resume.bind(v),R.stop=R,R}function vt(e,t=1/0,n){if(t<=0||!p(e)||e.__v_skip)return e;if((n=n||new Set).has(e))return e;if(n.add(e),t--,Ze(e))vt(e.value,t,n);else if(a(e))for(let s=0;s<e.length;s++)vt(e[s],t,n);else if(h(e)||u(e))e.forEach((e=>{vt(e,t,n)}));else if(g(e)){for(const s in e)vt(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&vt(e[s],t,n)}return e}const{isArray:_t}=Array;function gt(e){return Object.prototype.toString.call(e).slice(8,-1)}function yt(e){return"function"==typeof e}function bt(e){if(function(e){const t=new Set(["undefined","boolean","number","string"]);return null===e||t.has(typeof e)}(e)||yt(e))return e;if(Ze(e))return bt(e.value);if(Qe(e))return bt(Ge(e));if(_t(e))return e.map((e=>bt(e)));if(function(e){return"Object"===gt(e)}(e)){const t={};return Object.keys(e).forEach((n=>{t[n]=bt(e[n])})),t}throw new TypeError(`${gt(e)} value is not supported`)}function wt(e,t,n){var s;null!==(s=n)&&"object"==typeof s&&dt(Ze(n)?n:()=>n,(()=>{e.setData({[t]:bt(n)})}),{deep:!0})}e._instance=null;const mt=t=>{e._instance=t},St=(e,t,n,...s)=>{if(t&&t[n]&&t[n].apply(e,s),!e[`$${n}`])return;const i={onLoad:"onUnload",onShow:"onHide",attached:"detached",show:"hide"}[n];e[`$${n}`].forEach((t=>{if(i){const n=e[`$${i}`]&&e[`$${i}`].find((e=>e.front===t));n&&n()}const n=t.apply(e,s);if(i&&"function"==typeof n){e[`$${i}`]&&e[`$${i}`].find((e=>e.front===t))||(n.front,e[`$${i}`]||(e[`$${i}`]=[]),e[`$${i}`].push(n))}}))},Rt=(e,t,n,...s)=>{if(t&&t[n])return t[n].apply(e,s);if(e[`$${n}`]){if(e[`$${n}`].length)throw new Error(`一个page只能配置一个${n}`);return e[`$${n}`][0].apply(e,s)}},$t=(e,t,n)=>{e&&(e[`$${t}`]||(e[`$${t}`]=[]),e[`$${t}`].push(n.bind(e)))};e.launchPromise=Promise.resolve(!0);const xt=e=>e?Object.keys(e).map((t=>{let n=e[t];return"object"==typeof e[t]&&(n=encodeURIComponent(JSON.stringify(e[t]))),`${t}=${n}`})).join("&"):"";e._queries={};const Pt=t=>{e._queries=t},Ot=(e,t)=>{if(!t)return e;let n={};for(let s in e)if(s in t){const i=e[s],r=t[s];if(!r){n[s]=i;break}const o=r.type||r,c=e=>"formatter"in r&&void 0!==r.formatter?r.formatter(e):o===Boolean?!!e:o===Number?Number(e):o===Object?e?JSON.parse(decodeURIComponent(e)):{}:o===Array?e?JSON.parse(decodeURIComponent(e)):[]:(null===o||o===String||console.error("未知的·type·",o),e);n[s]=c(i)}else n[s]=e[s];return n};function kt(t){e.activePinia=t}e.activePinia=void 0;const jt=new class{constructor(){this.defaultOptions={header:{"Content-Type":"application/json"}},this.baseUrl="/api"}setBaseUrl(e){this.baseUrl=e}setRequestInterceptor(e){this.requestInterceptor=e}setResponseInterceptor(e){this.responseInterceptor=e}async request(e){const t=/^http/.test(e.url)?e.url:this.baseUrl.endsWith("/")||e.url.startsWith("/")?`${this.baseUrl}${e.url}`:`${this.baseUrl}/${e.url}`;let n={...this.defaultOptions,...e,url:t};return this.requestInterceptor&&(n=await this.requestInterceptor(n)),new Promise(((e,t)=>{const{success:s,fail:i,complete:r,...o}=n;wx.request({...o,success:async n=>{try{if(this.responseInterceptor&&(n=await this.responseInterceptor(n)),n.statusCode>=200&&n.statusCode<300)"function"==typeof s&&s(n),e(n);else{const e=new Error(`请求失败,状态码:${n.statusCode}`);"function"==typeof i&&i(e),t(e)}}catch(e){"function"==typeof i&&i(e),t(e)}},fail:e=>{"function"==typeof i&&i(e),t(e)},complete:e=>{"function"==typeof r&&r(e)}})}))}serializeParams(e){return Object.keys(e).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`)).join("&")}get(e,t,n){let s=e;if(t&&Object.keys(t).length>0){const n=this.serializeParams(t);s+=e.includes("?")?`&${n}`:`?${n}`}return this.request({...n,method:"GET",url:s})}post(e,t,n){return this.request({...n,method:"POST",url:e,data:t})}options(e,t,n){let s=e;if(t&&Object.keys(t).length>0){const n=this.serializeParams(t);s+=e.includes("?")?`&${n}`:`?${n}`}return this.request({...n,method:"OPTIONS",url:s})}head(e,t,n){let s=e;if(t&&Object.keys(t).length>0){const n=this.serializeParams(t);s+=e.includes("?")?`&${n}`:`?${n}`}return this.request({...n,method:"HEAD",url:s})}put(e,t,n){return this.request({...n,method:"PUT",url:e,data:t})}delete(e,t,n){return this.request({...n,method:"DELETE",url:e,data:t})}trace(e,t,n){let s=e;if(t&&Object.keys(t).length>0){const n=this.serializeParams(t);s+=e.includes("?")?`&${n}`:`?${n}`}return this.request({...n,method:"TRACE",url:s})}connect(e,t,n){return this.request({...n,method:"CONNECT",url:e,data:t})}};e.ReactiveEffect=P,e.attached=t=>$t(e._instance,"attached",t),e.computed=function(e,t,n=!1){let s,i;return l(e)?s=e:(s=e.get,i=e.set),new ht(s,i,n)},e.createApp=t=>{if(!t)return App({});let n={};if("function"!=typeof t){const{setup:e,...s}=t;n=s,t=e}return t?App({...n,onLaunch(s){e.launchPromise=new Promise((async e=>{mt(this);const i=await t.call(this,s);void 0!==i&&Object.keys(i).forEach((e=>{this[e]=i[e]})),St(this,n,"onLaunch",s),mt(null),e(!0)}))},onShow(e){St(this,n,"onShow",e)},onHide(){St(this,n,"onHide")},onError(e){St(this,n,"onError",e)},onPageNotFound(e){St(this,n,"onPageNotFound",e)},onUnhandledRejection(e){St(this,n,"onUnhandledRejection",e)},onThemeChange(e){St(this,n,"onThemeChange",e)}}):App(n)},e.createPinia=function(){const e=R(!0),t=e.run((()=>et({}))),n={install(){kt(n)},scope:e,state:t,stores:{}};return n},e.createQuery=Ot,e.customRef=function(e){return new rt(e)},e.deepToRaw=bt,e.deepWatch=wt,e.defineComponent=t=>{if(!t)return Component({});let n={};if("function"!=typeof t){const{setup:e,...s}=t;n=s,t=e}if(!t)return Component(n);let s=null;return n.properties&&(s=Object.keys(n.properties)),s&&s.forEach((e=>{void 0===n.observers&&(n.observers={});const t=n.observers[e];n.observers[e]=function(n){this.$props&&(this.$props[e]=n),void 0!==t&&t.call(this,n)}})),Component({...n,lifetimes:{attached(){e.launchPromise.then((()=>{mt(this),this.$scope=R();const e={};s&&s.forEach((t=>{e[t]=this.data[t]})),this.$props=Ve(e),this.$context={emit:(e,...t)=>{this.triggerEvent(e,{value:t[0]})}},this.$scope.run((()=>{const e=t.call(this,this.$props,this.$context);void 0!==e&&Object.keys(e).forEach((t=>{const n=e[t];yt(n)?this[t]=n:(this.setData({[t]:bt(n)}),wt(this,t,n))})),St(this,n,"attached")})),mt(null)}))},ready(){St(this,n,"ready")},moved(){St(this,n,"moved")},detached(){St(this,n,"detached"),this.$scope&&this.$scope.stop(),Object.keys(this).forEach((e=>{try{/^$/.test(e)&&delete this[e]}catch(e){console.error("销毁异常",e)}}))},error(e){St(this,n,"error",e)}},pageLifetimes:{show(){St(this,n,"show")},hide(){St(this,n,"hide")},resize(e){St(this,n,"resize",e)},routeDone(){St(this,n,"routeDone")}}})},e.definePage=t=>{if(!t)return Page({});let n={};if("function"!=typeof t){const{setup:e,...s}=t;n=s||{},t=e}if(!t)return Page(n);const{queries:s,...i}=n;return Page({...i,onLoad(i){e.launchPromise.then((()=>{mt(this),Pt(s),this.$scope=R(),this.$query=Ot(i,s),this.$context={},this.$scope.run((()=>{const e=t.call(this,this.$query,this.$context);void 0!==e&&Object.keys(e).forEach((t=>{const n=e[t];yt(n)?this[t]=n:(this.setData({[t]:bt(n)}),wt(this,t,n))})),St(this,n,"onLoad",i)})),Pt({}),mt(null)}))},onShow(){St(this,n,"onShow")},onReady(){St(this,n,"onReady")},onHide(){St(this,n,"onHide")},onUnload(){St(this,n,"onUnload"),this.$scope&&this.$scope.stop(),Object.keys(this).forEach((e=>{try{/^$/.test(e)&&delete this[e]}catch(e){console.error("销毁异常",e)}}))},onRouteDone(){St(this,n,"onRouteDone")},onPullDownRefresh(){St(this,n,"onPullDownRefresh")},onReachBottom(){St(this,n,"onReachBottom")},onPageScroll(e){St(this,n,"onPageScroll",e)},onAddToFavorites(e){return Rt(this,n,"onAddToFavorites",e)},onShareAppMessage(e){return Rt(this,n,"onShareAppMessage",e)},onShareTimeline(){return Rt(this,n,"onShareTimeline")},onResize(e){St(this,n,"onResize",e)},onTabItemTap(e){St(this,n,"onTabItemTap",e)},onSaveExitState(){St(this,n,"onSaveExitState")}})},e.defineStore=function(t,n,s){return function(i){if(i&&kt(i),!(i=e.activePinia))throw new Error("no active pinia");return i.stores[t]||function(e,t,n,s){const i={},r=e.scope.run(n);Object.assign(i,r),e.stores[t]=i;const o="PINIA_"+t;s&&s.persist&&s.persist.forEach((n=>{const s=`${o}_${n}`,i=wx.getStorageSync(s),r=wx.getStorageInfoSync().keys.includes(s);e.stores[t][n]&&r&&(Ze(e.stores[t][n])?e.stores[t][n].value=i:Object.keys(i).forEach((s=>{e.stores[t][n][s]=i[s]}))),dt(Ze(e.stores[t][n])?e.stores[t][n]:()=>e.stores[t][n],(e=>{wx.setStorageSync(s,e)}),{deep:!0})}))}(i,t,n,s),i.stores[t]}},e.detached=t=>$t(e._instance,"detached",t),e.effect=function(e,t){e.effect instanceof P&&(e=e.effect.fn);const n=new P(e);t&&i(n,t);try{n.run()}catch(e){throw n.stop(),e}const s=n.run.bind(n);return s.effect=n,s},e.effectScope=R,e.error=t=>$t(e._instance,"error",t),e.getCurrentPage=()=>{const e=getCurrentPages();return e&&e[e.length-1]},e.getCurrentScope=$,e.hide=t=>$t(e._instance,"hide",t),e.isProxy=Qe,e.isReactive=He,e.isReadonly=Je,e.isRef=Ze,e.isShallow=Ke,e.lifetimeEmit=St,e.lifetimeEmitOnce=Rt,e.lifetimeOn=$t,e.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},e.moved=t=>$t(e._instance,"moved",t),e.onAddToFavorites=t=>$t(e._instance,"onAddToFavorites",t),e.onError=t=>$t(e._instance,"onError",t),e.onHide=t=>$t(e._instance,"onHide",t),e.onLaunch=t=>$t(e._instance,"onLaunch",t),e.onLoad=t=>$t(e._instance,"onLoad",t),e.onPageNotFound=t=>$t(e._instance,"onPageNotFound",t),e.onPageScroll=t=>$t(e._instance,"onPageScroll",t),e.onPullDownRefresh=t=>$t(e._instance,"onPullDownRefresh",t),e.onReachBottom=t=>$t(e._instance,"onReachBottom",t),e.onReady=t=>$t(e._instance,"onReady",t),e.onResize=t=>$t(e._instance,"onResize",t),e.onRouteDone=t=>$t(e._instance,"onRouteDone",t),e.onSaveExitState=t=>$t(e._instance,"onSaveExitState",t),e.onScopeDispose=function(e,t=!1){w&&w.cleanups.push(e)},e.onShareAppMessage=t=>$t(e._instance,"onShareAppMessage",t),e.onShareTimeline=t=>$t(e._instance,"onShareTimeline",t),e.onShow=t=>$t(e._instance,"onShow",t),e.onTabItemTap=t=>$t(e._instance,"onTabItemTap",t),e.onThemeChange=t=>$t(e._instance,"onThemeChange",t),e.onUnhandledRejection=t=>$t(e._instance,"onUnhandledRejection",t),e.onUnload=t=>$t(e._instance,"onUnload",t),e.proxyRefs=function(e){return He(e)?e:new Proxy(e,it)},e.reactive=We,e.readonly=Be,e.ready=t=>$t(e._instance,"ready",t),e.ref=et,e.request=jt,e.resize=t=>$t(e._instance,"resize",t),e.routeDone=t=>$t(e._instance,"routeDone",t),e.setActivatePinia=kt,e.setInstance=mt,e.setQueries=Pt,e.shallowReactive=Ve,e.shallowReadonly=function(e){return Fe(e,!0,ve,Ce,Me)},e.shallowRef=function(e){return tt(e,!0)},e.show=t=>$t(e._instance,"show",t),e.stop=function(e){e.effect.stop()},e.storeToRefs=function(e){e=Ge(e);const t={};for(const n in e){const s=e[n];(Ze(s)||He(s))&&(t[n]=at(e,n))}return t},e.toRaw=Ge,e.toRef=at,e.toRefs=function(e){const t=a(e)?new Array(e.length):{};for(const n in e)t[n]=ut(e,n);return t},e.toValue=function(e){return l(e)?e():st(e)},e.triggerRef=function(e){e.dep.trigger()},e.unref=st,e.useInstance=()=>e._instance,e.useRoute=()=>{const t=getCurrentPages(),n=t[t.length-1];return{path:n.route,query:Ot(n.options,e._queries)}},e.useRouter=()=>({push:e=>{if("string"==typeof e)return wx.navigateTo({url:e});let t;return t="path"in e?e.query?`${e.path}?${xt(e.query)}`:e.path:e.url,wx.navigateTo({url:t,...e})},replace:e=>{if("string"==typeof e)return wx.redirectTo({url:e});let t;return t="path"in e?e.query?`${e.path}?${xt(e.query)}`:e.path:e.url,wx.redirectTo({url:t,...e})},go:e=>{if(!(e>0))return wx.navigateBack({delta:Math.abs(e)});console.warn("微信小程序不支持前进历史记录")},back:e=>wx.navigateBack(e),switchTab:e=>{if("string"==typeof e)return wx.switchTab({url:e});let t;return t="path"in e?e.query?`${e.path}?${xt(e.query)}`:e.path:e.url,wx.switchTab({url:t,...e})},reLaunch:e=>{if("string"==typeof e)return wx.reLaunch({url:e});let t;return t="path"in e?e.query?`${e.path}?${xt(e.query)}`:e.path:e.url,wx.reLaunch({url:t,...e})}}),e.watch=dt})); |
+1
-1
| { | ||
| "name": "@52css/mp-vue3", | ||
| "version": "1.1.2", | ||
| "version": "1.1.3", | ||
| "description": "基于 Vue 3 的小程序框架:轻松构建高效应用", | ||
@@ -5,0 +5,0 @@ "type": "module", |
+5
-2
@@ -23,4 +23,7 @@ # MP-VUE3 | ||
| * [x] Component [attached](https://52css.github.io/mp-vue3/%E6%A1%86%E6%9E%B6%E6%8E%A5%E5%8F%A3/%E7%BB%84%E4%BB%B6%20Component/attached%20-%20%E2%9C%A8.html)、[detached](https://52css.github.io/mp-vue3/%E6%A1%86%E6%9E%B6%E6%8E%A5%E5%8F%A3/%E7%BB%84%E4%BB%B6%20Component/detached.html)、[error](https://52css.github.io/mp-vue3/%E6%A1%86%E6%9E%B6%E6%8E%A5%E5%8F%A3/%E7%BB%84%E4%BB%B6%20Component/error.html)、[hide](https://52css.github.io/mp-vue3/%E6%A1%86%E6%9E%B6%E6%8E%A5%E5%8F%A3/%E7%BB%84%E4%BB%B6%20Component/hide.html)、[moved](https://52css.github.io/mp-vue3/%E6%A1%86%E6%9E%B6%E6%8E%A5%E5%8F%A3/%E7%BB%84%E4%BB%B6%20Component/moved.html)、[ready](https://52css.github.io/mp-vue3/%E6%A1%86%E6%9E%B6%E6%8E%A5%E5%8F%A3/%E7%BB%84%E4%BB%B6%20Component/ready.html)、[resize](https://52css.github.io/mp-vue3/%E6%A1%86%E6%9E%B6%E6%8E%A5%E5%8F%A3/%E7%BB%84%E4%BB%B6%20Component/resize.html)、[routeDone](https://52css.github.io/mp-vue3/%E6%A1%86%E6%9E%B6%E6%8E%A5%E5%8F%A3/%E7%BB%84%E4%BB%B6%20Component/routeDone.html)、[show](https://52css.github.io/mp-vue3/%E6%A1%86%E6%9E%B6%E6%8E%A5%E5%8F%A3/%E7%BB%84%E4%BB%B6%20Component/show.html) | ||
| * [ ] 支持 `Router` 目前使用原生`wx.navigateTo`跳转,页面支持[queries](https://52css.github.io/mp-vue3/%E6%A1%86%E6%9E%B6%E6%8E%A5%E5%8F%A3/%E9%A1%B5%E9%9D%A2%20Page/definePage%20-%20%F0%9F%94%A5%20%E2%9C%A8.html#%F0%9F%91%8D-%E5%AF%B9%E8%B1%A1%E9%BB%98%E8%AE%A4%E4%B8%8B%E6%89%A9%E5%85%85-setup-%E6%96%B9%E6%B3%95)定义页面接收参数,并格式化 | ||
| * [x] 支持 `Request` 目前使用原生`wx.request` | ||
| * [x] 支持 `Router` 路由 | ||
| * [x] [useRouter](https://52css.github.io/mp-vue3/%E6%A1%86%E6%9E%B6%E6%8E%A5%E5%8F%A3/%E8%B7%AF%E7%94%B1%20Router/useRouter.html) | ||
| * [x] [useRoute](https://52css.github.io/mp-vue3/%E6%A1%86%E6%9E%B6%E6%8E%A5%E5%8F%A3/%E8%B7%AF%E7%94%B1%20Router/useRoute.html) | ||
| * [x] 支持 `Request` 请求 | ||
| * [x] 支持[request](https://52css.github.io/mp-vue3/%E6%A1%86%E6%9E%B6%E6%8E%A5%E5%8F%A3/%E8%AF%B7%E6%B1%82%20Request/request.html) | ||
@@ -27,0 +30,0 @@ ## 性能 |
+1
-0
@@ -9,1 +9,2 @@ export { computed, reactive, ref, readonly, unref, proxyRefs, isRef, toRef, toValue, toRefs, isProxy, isReactive, isReadonly, isShallow, customRef, triggerRef, shallowRef, shallowReactive, shallowReadonly, markRaw, toRaw, effect, stop, ReactiveEffect, effectScope, getCurrentScope, onScopeDispose, type Ref, type UnwrapRef, type Reactive, type ComputedRef, type WritableComputedRef, type ShallowRef, type ToRefs, type UnwrapNestedRefs, type ShallowReactive, type DeepReadonly, type ToRef, type ShallowUnwrapRef, type CustomRefFactory, type RefUnwrapBailTypes, type Raw, type TrackOpTypes, type TriggerOpTypes, type EffectScope, type ReactiveMarker, type DebuggerOptions, watch, } from "@vue/reactivity"; | ||
| export * from "./router"; | ||
| export * from "./request"; |
896948
0.67%17
6.25%522
26.09%43
7.5%