wevu 1.1.4 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { t as WeappIntrinsicElements } from "./weappIntrinsicElements-zTAqU5H3.mjs";
2
- import { Ref as Ref$1, ShallowRef as ShallowRef$1 } from "./vue-types";
3
- import { AllowedComponentProps as AllowedComponentProps$1, ComponentCustomProps as ComponentCustomProps$1, ComponentOptionsMixin as ComponentOptionsMixin$1, ComputedOptions, DefineComponent as DefineComponent$1, EmitsOptions as EmitsOptions$1, MethodOptions, ObjectDirective as ObjectDirective$1, PublicProps as PublicProps$1, ShallowUnwrapRef as ShallowUnwrapRef$1, SlotsType, VNode as VNode$1, VNodeProps as VNodeProps$1 } from "./vue-types";
2
+ import { AllowedComponentProps as AllowedComponentProps$1, ComponentCustomProps as ComponentCustomProps$1, ComponentOptionsMixin as ComponentOptionsMixin$1, ComputedOptions, DefineComponent as DefineComponent$1, EmitsOptions as EmitsOptions$1, MethodOptions, ObjectDirective as ObjectDirective$1, PublicProps as PublicProps$1, Ref as Ref$1, ShallowRef as ShallowRef$1, ShallowUnwrapRef as ShallowUnwrapRef$1, SlotsType, VNode as VNode$1, VNodeProps as VNodeProps$1 } from "vue";
4
3
 
5
4
  //#region src/reactivity/ref.d.ts
6
5
  type Ref<T$1 = any, S = T$1> = Ref$2<T$1, S>;
@@ -249,7 +248,7 @@ interface MiniProgramAdapter {
249
248
  }
250
249
  type MiniProgramComponentBehaviorOptions = WechatMiniprogram.Component.ComponentOptions;
251
250
  type MpComponentOptions = WechatMiniprogram.Component.TrivialOption;
252
- type MiniProgramBehaviorIdentifier = WechatMiniprogram.Behavior.BehaviorIdentifier | string;
251
+ type MiniProgramBehaviorIdentifier = WechatMiniprogram.Behavior.Identifier | string;
253
252
  interface MiniProgramComponentOptions {
254
253
  /**
255
254
  * 类似于 mixins/traits 的组件间代码复用机制(behaviors)。
@@ -720,6 +719,12 @@ declare global {
720
719
  interface HTMLElementTagNameMap extends WeappTemplateRefElements {}
721
720
  }
722
721
  //#endregion
722
+ //#region src/vue-augment.d.ts
723
+ declare module '@vue/runtime-core' {
724
+ interface GlobalComponents extends GlobalComponents {}
725
+ interface GlobalDirectives extends GlobalDirectives {}
726
+ }
727
+ //#endregion
723
728
  //#region src/runtime/app.d.ts
724
729
  declare function createApp<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions>(options: CreateAppOptions<D, C, M>): RuntimeApp<D, C, M>;
725
730
  //#endregion
@@ -1174,7 +1179,7 @@ declare function defineSlots<T$1 extends Record<string, any> = Record<string, an
1174
1179
  declare function defineModel<T$1 = any>(name?: string, options?: Record<string, any>): Ref<T$1 | undefined>;
1175
1180
  //#endregion
1176
1181
  //#region src/store/types.d.ts
1177
- type MutationType = 'patch object' | 'patch function';
1182
+ type MutationType = 'patch object' | 'patch function' | 'direct';
1178
1183
  interface SubscriptionCallback<S = any> {
1179
1184
  (mutation: {
1180
1185
  type: MutationType;
@@ -1213,6 +1218,7 @@ type SetupDefinition<T$1> = () => T$1;
1213
1218
  declare function defineStore<T$1 extends Record<string, any>>(id: string, setup: SetupDefinition<T$1>): () => T$1 & {
1214
1219
  $id: string;
1215
1220
  $patch: (patch: Record<string, any> | ((state: any) => void)) => void;
1221
+ $reset: () => void;
1216
1222
  $subscribe: (cb: (mutation: {
1217
1223
  type: MutationType;
1218
1224
  storeId: string;
@@ -1242,9 +1248,4 @@ declare function createStore(): StoreManager;
1242
1248
  type StoreToRefsResult<T$1 extends Record<string, any>> = { [K in keyof T$1]: T$1[K] extends ((...args: any[]) => any) ? T$1[K] : T$1[K] extends Ref<infer V> ? Ref<V> : Ref<T$1[K]> };
1243
1249
  declare function storeToRefs<T$1 extends Record<string, any>>(store: T$1): StoreToRefsResult<T$1>;
1244
1250
  //#endregion
1245
- //#region src/index.d.ts
1246
- declare module './vue-types' {
1247
- export * from 'wevu';
1248
- }
1249
- //#endregion
1250
1251
  export { ActionSubscriber, type AllowedComponentProps, type AppConfig, type ComponentCustomProps, ComponentDefinition, type ComponentOptionsMixin, type ComponentPropsOptions, type ComponentPublicInstance, type ComputedDefinitions, ComputedGetter, ComputedRef, ComputedSetter, type CreateAppOptions, type DefineAppOptions, type DefineComponent, type DefineComponentOptions, DefineStoreOptions, EffectScope, EmitsOptions, type ExtractComputed, type ExtractDefaultPropTypes, type ExtractMethods, type ExtractPropTypes, type ExtractPublicPropTypes, GlobalComponents, GlobalDirectives, type InferPropType, type InferProps, type InternalRuntimeState, type InternalRuntimeStateFields, type MethodDefinitions, type MiniProgramAdapter, type MiniProgramAppOptions, type MiniProgramBehaviorIdentifier, type MiniProgramComponentBehaviorOptions, type MiniProgramComponentOptions, type MiniProgramComponentRawOptions, type MiniProgramInstance, type MiniProgramPageLifetimes, type ModelBinding, type ModelBindingOptions, type ModelBindingPayload, type MutationKind, type MutationOp, type MutationRecord, MutationType, type ObjectDirective, type PageFeatures, type PrelinkReactiveTreeOptions, type PropConstructor, type PropOptions, type PropType, type PublicProps, Ref, type RuntimeApp, type RuntimeInstance, type SetDataDebugInfo, type SetDataSnapshotOptions, type SetupContext, type SetupFunction, ShallowRef, type ShallowUnwrapRef, StoreManager, SubscriptionCallback, TemplateRef, TemplateRefValue, TemplateRefs, ToRefs, type TriggerEventOptions, type VNode, type VNodeProps, WatchOptions, WatchStopHandle, WevuDefaults, type WevuPlugin, WritableComputedOptions, WritableComputedRef, addMutationRecorder, batch, callHookList, callHookReturn, callUpdateHooks, computed, createApp, createStore, createWevuComponent, createWevuScopedSlotComponent, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSlots, defineStore, effect, effectScope, endBatch, getCurrentInstance, getCurrentScope, getCurrentSetupContext, getDeepWatchStrategy, getReactiveVersion, inject, injectGlobal, isNoSetData, isRaw, isReactive, isRef, isShallowReactive, isShallowRef, markNoSetData, markRaw, mergeModels, mountRuntimeInstance, nextTick, normalizeClass, normalizeStyle, onActivated, onAddToFavorites, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onError, onErrorCaptured, onHide, onLaunch, onLoad, onMounted, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onScopeDispose, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, prelinkReactiveTree, provide, provideGlobal, reactive, readonly, ref, registerApp, registerComponent, removeMutationRecorder, resetWevuDefaults, runSetupFunction, setCurrentInstance, setCurrentSetupContext, setDeepWatchStrategy, setWevuDefaults, shallowReactive, shallowRef, startBatch, stop, storeToRefs, teardownRuntimeInstance, toRaw, toRef, toRefs, touchReactive, traverse, triggerRef, unref, useAttrs, useBindModel, useModel, useSlots, useTemplateRef, watch, watchEffect, withDefaults };
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- const e=Promise.resolve(),t=new Set;let n=!1,r=!1;function i(){r=!1,n=!0;try{t.forEach(e=>e())}finally{t.clear(),n=!1}}function a(a){t.add(a),!n&&!r&&(r=!0,e.then(i))}function o(t){return t?e.then(t):e}const s=new WeakMap;let c=null;const l=[];let u=0;const d=new Set;function f(){u++}function p(){for(;d.size;){let e=Array.from(d);d.clear();for(let t of e)t()}}function m(){u!==0&&(u--,u===0&&p())}function h(e){f();try{return e()}finally{m()}}function g(e){let{deps:t}=e;for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}function _(e){e.active&&(e.active=!1,g(e),e.onStop?.())}let v;var y=class{active=!0;effects=[];cleanups=[];parent;scopes;constructor(e=!1){this.detached=e,!e&&v&&(this.parent=v,(v.scopes||=[]).push(this))}run(e){if(!this.active)return;let t=v;v=this;try{return e()}finally{v=t}}stop(){if(this.active){this.active=!1;for(let e of this.effects)_(e);this.effects.length=0;for(let e of this.cleanups)e();if(this.cleanups.length=0,this.scopes){for(let e of this.scopes)e.stop();this.scopes.length=0}if(this.parent?.scopes){let e=this.parent.scopes.indexOf(this);e>=0&&this.parent.scopes.splice(e,1)}this.parent=void 0}}};function b(e=!1){return new y(e)}function x(){return v}function S(e){v?.active&&v.cleanups.push(e)}function C(e){v?.active&&v.effects.push(e)}function w(e,t={}){let n=function(){if(!n.active||n._running)return e();g(n);try{return n._running=!0,l.push(n),c=n,e()}finally{l.pop(),c=l[l.length-1]??null,n._running=!1}};return n.deps=[],n.scheduler=t.scheduler,n.onStop=t.onStop,n.active=!0,n._running=!1,n._fn=e,n}function T(e,t={}){let n=w(e,t);return C(n),t.lazy||n(),n}function E(e,t){if(!c)return;let n=s.get(e);n||(n=new Map,s.set(e,n));let r=n.get(t);r||(r=new Set,n.set(t,r)),r.has(c)||(r.add(c),c.deps.push(r))}function D(e){if(e.scheduler){e.scheduler();return}if(u>0){d.add(e);return}e()}function O(e,t){let n=s.get(e);if(!n)return;let r=n.get(t);if(!r)return;let i=new Set;r.forEach(e=>{e!==c&&i.add(e)}),i.forEach(D)}function k(e){c&&(e.has(c)||(e.add(c),c.deps.push(e)))}function A(e){new Set(e).forEach(D)}const j=new Set;function M(e){j.add(e)}function N(e){j.delete(e)}const P=new WeakMap,F=new WeakMap,I=new WeakMap,L=new WeakMap,R=new WeakSet,z=new WeakMap,ee=new WeakMap;function te(e){let t=ee.get(e);return t||(t=new Set,ee.set(e,t)),t}function B(e,t){te(e).add(t)}function V(e){F.set(e,(F.get(e)??0)+1)}function ne(e){return F.get(e)??0}function re(e){let t=new Set,n=[e];for(let e=0;e<2e3&&n.length;e++){let e=n.pop(),r=L.get(e);if(r)for(let e of r.keys())t.has(e)||(t.add(e),V(e),n.push(e))}}function ie(e){let t=L.get(e);if(!t){R.delete(e),I.delete(e);return}let n,r,i=0;for(let[e,a]of t){for(let t of a){if(i+=1,i>1)break;n=e,r=t}if(i>1)break}if(i===1&&n&&r){R.delete(e),I.set(e,{parent:n,key:r});return}R.add(e),I.delete(e)}function ae(e,t,n){if(typeof n!=`string`){R.add(e),I.delete(e);return}if(j.size){let n=P.get(t)??t;B(n,t),B(n,e)}let r=L.get(e);r||(r=new Map,L.set(e,r));let i=r.get(t);i||(i=new Set,r.set(t,i)),i.add(n),ie(e)}function oe(e,t,n){let r=L.get(e);if(!r)return;let i=r.get(t);i&&(i.delete(n),i.size||r.delete(t),r.size||L.delete(e),ie(e))}function se(e,t){if(t===e)return[];if(R.has(t))return;let n=[],r=t;for(let t=0;t<2e3;t++){if(r===e)return n.reverse();if(R.has(r))return;let t=I.get(r);if(!t||typeof t.key!=`string`)return;n.push(t.key),r=t.parent}}let H=function(e){return e.IS_REACTIVE=`__r_isReactive`,e.RAW=`__r_raw`,e.SKIP=`__r_skip`,e}({});function U(e){return typeof e==`object`&&!!e}const W=Symbol(`wevu.version`);function ce(e){if(!e)return!1;let t=e.charCodeAt(0);if(t<48||t>57)return!1;let n=Number(e);return Number.isInteger(n)&&n>=0&&String(n)===e}function G(e){return e?.[H.RAW]??e}const le=new WeakMap,ue=new WeakMap,de=new WeakMap;function fe(e,t){let n=G(e);z.set(n,``),B(n,n);let r=t?.shouldIncludeTopKey,i=typeof t?.maxDepth==`number`?Math.max(0,Math.floor(t.maxDepth)):1/0,a=typeof t?.maxKeys==`number`?Math.max(0,Math.floor(t.maxKeys)):1/0,o=new WeakSet,s=[{current:n,path:``,depth:0}],c=0;for(;s.length;){let e=s.pop();if(o.has(e.current)||(o.add(e.current),z.set(e.current,e.path),B(n,e.current),c+=1,c>=a)||e.depth>=i||Array.isArray(e.current))continue;let t=Object.entries(e.current);for(let[i,a]of t){if(e.path===``&&r&&!r(i)||!U(a)||a[H.SKIP])continue;let t=G(a);if(P.has(t)||P.set(t,n),ae(t,e.current,i),!R.has(t)){let n=e.path?`${e.path}.${i}`:i;z.set(t,n)}B(n,t),s.push({current:t,path:e.path?`${e.path}.${i}`:i,depth:e.depth+1})}}}function pe(e){let t=G(e),n=ee.get(t);if(!n){z.delete(t);return}for(let e of n)I.delete(e),L.delete(e),z.delete(e),R.delete(e),P.delete(e),F.delete(e);ee.delete(t)}function me(e){E(G(e),W)}const he={get(e,t,n){if(t===H.IS_REACTIVE)return!0;if(t===H.RAW)return e;let r=Reflect.get(e,t,n);return E(e,t),r},set(e,t,n,r){let i=Reflect.get(e,t,r),a=Reflect.set(e,t,n,r);return Object.is(i,n)||(O(e,t),O(e,W),V(e)),a},deleteProperty(e,t){let n=Object.prototype.hasOwnProperty.call(e,t),r=Reflect.deleteProperty(e,t);return n&&r&&(O(e,t),O(e,W),V(e)),r},ownKeys(e){return E(e,Symbol.iterator),E(e,W),Reflect.ownKeys(e)}};function ge(e){if(!U(e))return e;let t=de.get(e);if(t)return t;if(e[H.IS_REACTIVE])return e;let n=new Proxy(e,he);return de.set(e,n),ue.set(n,e),F.has(e)||F.set(e,0),n}function _e(e){let t=G(e);return de.has(t)}function ve(e){return ne(G(e))}function ye(e,t,n){if(!j.size||typeof t!=`string`||t.startsWith(`__r_`))return;let r=P.get(e)??e,i=Array.isArray(e)&&(t===`length`||ce(t))?`array`:`property`,a=se(r,e);if(!a){let a=new Set,o=L.get(e);if(o)for(let[e,t]of o){let n=z.get(e),i=n?n.split(`.`,1)[0]:void 0,o=i?void 0:se(r,e)?.[0];for(let e of t)typeof e==`string`&&a.add(i??o??e)}else a.add(t);for(let e of j)e({root:r,kind:i,op:n,path:void 0,fallbackTopKeys:a.size?Array.from(a):void 0});return}let o=a.findIndex(e=>ce(e));if(o!==-1){let e=a.slice(0,o).join(`.`)||void 0;for(let t of j)t({root:r,kind:`array`,op:n,path:e});return}let s=a.length?a.join(`.`):``,c=i===`array`?s||void 0:s?`${s}.${t}`:t;for(let e of j)e({root:r,kind:i,op:n,path:c})}const be={get(e,t,n){if(t===H.IS_REACTIVE)return!0;if(t===H.RAW)return e;let r=Reflect.get(e,t,n);if(E(e,t),U(r)){if(r[H.SKIP])return r;let n=P.get(e)??e,i=r?.[H.RAW]??r;P.has(i)||P.set(i,n),ae(i,e,t);let a=z.get(e);if(j.size&&typeof t==`string`&&a!=null&&!R.has(i)){let e=a?`${a}.${t}`:t;z.set(i,e)}return xe(r)}return r},set(e,t,n,r){let i=Array.isArray(e),a=i?e.length:0,o=Reflect.get(e,t,r),s=Reflect.set(e,t,n,r);if(!Object.is(o,n)){let r=U(o)?o?.[H.RAW]??o:void 0;if(r&&oe(r,e,t),U(n)&&!n[H.SKIP]){let r=P.get(e)??e,i=n?.[H.RAW]??n;P.has(i)||P.set(i,r),ae(i,e,t);let a=z.get(e);if(j.size&&typeof t==`string`&&a!=null&&!R.has(i)){let e=a?`${a}.${t}`:t;z.set(i,e)}}O(e,t),i&&typeof t==`string`&&ce(t)&&Number(t)>=a&&O(e,`length`),O(e,W),V(e),re(e);let s=P.get(e);s&&s!==e&&(O(s,W),V(s)),ye(e,t,`set`)}return s},deleteProperty(e,t){let n=Object.prototype.hasOwnProperty.call(e,t),r=n?e[t]:void 0,i=Reflect.deleteProperty(e,t);if(n&&i){let n=U(r)?r?.[H.RAW]??r:void 0;n&&oe(n,e,t),O(e,t),O(e,W),V(e),re(e);let i=P.get(e);i&&i!==e&&(O(i,W),V(i)),ye(e,t,`delete`)}return i},ownKeys(e){return E(e,Symbol.iterator),E(e,W),Reflect.ownKeys(e)}};function xe(e){if(!U(e))return e;let t=le.get(e);if(t)return t;if(e[H.IS_REACTIVE])return e;let n=new Proxy(e,be);return le.set(e,n),ue.set(n,e),F.has(e)||F.set(e,0),P.has(e)||P.set(e,e),n}function K(e){return!!(e&&e[H.IS_REACTIVE])}function Se(e){return U(e)?xe(e):e}function Ce(e){return U(e)&&Object.defineProperty(e,H.SKIP,{value:!0,configurable:!0,enumerable:!1,writable:!0}),e}function we(e){return U(e)&&H.SKIP in e}const Te=`__v_isRef`;function Ee(e){try{Object.defineProperty(e,Te,{value:!0,configurable:!0})}catch{e[Te]=!0}return e}function q(e){return!!(e&&typeof e==`object`&&e[Te]===!0)}var De=class{_value;_rawValue;dep;constructor(e){Ee(this),this._rawValue=e,this._value=Se(e)}get value(){return this.dep||=new Set,k(this.dep),this._value}set value(e){Object.is(e,this._rawValue)||(this._rawValue=e,this._value=Se(e),this.dep&&A(this.dep))}};function Oe(e){return q(e)?e:Ce(new De(e))}function ke(e){return q(e)?e.value:e}var Ae=class{_getValue;_setValue;dep;constructor(e,t){Ee(this);let n=t,r=()=>{this.dep||=new Set,k(this.dep)},i=()=>{this.dep&&A(this.dep)},a=e=>e===void 0&&n!==void 0?n:e;if(typeof e==`function`){let t=e(r,i);this._getValue=()=>a(t.get()),this._setValue=e=>t.set(e);return}let o=e;this._getValue=()=>(r(),a(o.get())),this._setValue=e=>{o.set(e),i()}}get value(){return this._getValue()}set value(e){this._setValue(e)}};function je(e,t){return Ce(new Ae(e,t))}function Me(e){let t,n;typeof e==`function`?(t=e,n=()=>{throw Error(`计算属性是只读的`)}):(t=e.get,n=e.set);let r,i=!0,a,o={get value(){return i&&=(r=a(),!1),E(o,`value`),r},set value(e){n(e)}};return Ee(o),a=T(t,{lazy:!0,scheduler:()=>{i||(i=!0,O(o,`value`))}}),o}function Ne(e){if(q(e)){let t=e;return Ee({get value(){return t.value},set value(e){throw Error(`无法给只读 ref 赋值`)}})}return U(e)?new Proxy(e,{set(){throw Error(`无法在只读对象上设置属性`)},deleteProperty(){throw Error(`无法在只读对象上删除属性`)},defineProperty(){throw Error(`无法在只读对象上定义属性`)},get(e,t,n){return Reflect.get(e,t,n)}}):e}function Pe(e,t){return je((t,n)=>({get(){return t(),e},set(t){Object.is(e,t)||(e=t,n())}}),t)}function Fe(e){return q(e)&&typeof e.value!=`function`}function Ie(e){if(q(e)){let t=e.dep;if(t){A(t);return}e.value=e.value}}function Le(e,t,n){let r=e[t];return q(r)?r:je((n,r)=>({get(){return n(),e[t]},set(n){e[t]=n,r()}}),n)}function Re(e){K(e)||console.warn(`toRefs() 需要响应式对象,但收到的是普通对象。`);let t=Array.isArray(e)?Array.from({length:e.length}):{};for(let n in e)t[n]=Le(e,n);return t}function ze(e,t=new Set){if(!U(e)||t.has(e))return e;for(let n in t.add(e),e)ze(e[n],t);return e}let Be=`version`;function Ve(e){Be=e}function He(){return Be}function Ue(e,t,n={}){let r,i=K(e),o=Array.isArray(e)&&!i,s=e=>{if(typeof e==`function`)return e();if(q(e))return e.value;if(K(e))return e;throw Error(`无效的 watch 源`)};if(o){let t=e;r=()=>t.map(e=>s(e))}else if(typeof e==`function`)r=e;else if(q(e))r=()=>e.value;else if(i)r=()=>e;else throw Error(`无效的 watch 源`);let c=o?e.some(e=>K(e)):i;if(n.deep??c){let e=r;r=()=>{let t=e();return o&&Array.isArray(t)?t.map(e=>Be===`version`&&K(e)?(me(e),e):ze(e)):Be===`version`&&K(t)?(me(t),t):ze(t)}}let l,u=e=>{l=e},d,f,p=()=>{if(!f.active)return;let e=f();l?.(),t(e,d,u),d=e};f=T(()=>r(),{scheduler:()=>a(p),lazy:!0}),n.immediate?p():d=f();let m=()=>{l?.(),l=void 0,_(f)};return S(m),m}function We(e){let t,n=e=>{t=e},r,i=()=>{r.active&&r()};r=T(()=>{t?.(),t=void 0,e(n)},{lazy:!0,scheduler:()=>a(i)}),r();let o=()=>{t?.(),t=void 0,_(r)};return S(o),o}function Ge(e,t,n){let r=e[t];if(!r)throw Error(`计算属性 "${t}" 是只读的`);r(n)}function Ke(e){if(e==null)return e;if(typeof e==`object`){if(`detail`in e&&e.detail&&`value`in e.detail)return e.detail.value;if(`target`in e&&e.target&&`value`in e.target)return e.target.value}return e}function qe(e){let t=Object.create(null),n=Object.create(null),r=new Set;return{computedRefs:t,computedSetters:n,dirtyComputedKeys:r,createTrackedComputed:(t,n,i)=>{let a,o=!0,s,c={get value(){return o&&=(a=s(),!1),E(c,`value`),a},set value(e){if(!i)throw Error(`计算属性是只读的`);i(e)}};return Ee(c),s=T(n,{lazy:!0,scheduler:()=>{o||(o=!0,e.setDataStrategy===`patch`&&e.includeComputed&&r.add(t),O(c,`value`))}}),c},computedProxy:new Proxy({},{get(e,n){if(typeof n==`string`&&t[n])return t[n].value},has(e,n){return typeof n==`string`&&!!t[n]},ownKeys(){return Object.keys(t)},getOwnPropertyDescriptor(e,n){if(typeof n==`string`&&t[n])return{configurable:!0,enumerable:!0,value:t[n].value}}})}}function Je(e){let{state:t,computedDefs:n,methodDefs:r,appConfig:i,includeComputed:a,setDataStrategy:o}=e,s={},{computedRefs:c,computedSetters:l,dirtyComputedKeys:u,createTrackedComputed:d,computedProxy:f}=qe({includeComputed:a,setDataStrategy:o}),p=new Proxy(t,{get(e,n,r){if(typeof n==`string`){if(n===`$state`)return t;if(n===`$computed`)return f;if(Object.prototype.hasOwnProperty.call(s,n))return s[n];if(c[n])return c[n].value;if(Object.prototype.hasOwnProperty.call(i.globalProperties,n))return i.globalProperties[n]}return Reflect.get(e,n,r)},set(e,t,n,r){return typeof t==`string`&&c[t]?(Ge(l,t,n),!0):Reflect.set(e,t,n,r)},has(e,t){return typeof t==`string`&&(c[t]||Object.prototype.hasOwnProperty.call(s,t))?!0:Reflect.has(e,t)},ownKeys(e){let t=new Set;return Reflect.ownKeys(e).forEach(e=>{t.add(e)}),Object.keys(s).forEach(e=>t.add(e)),Object.keys(c).forEach(e=>t.add(e)),Array.from(t)},getOwnPropertyDescriptor(e,t){if(Reflect.has(e,t))return Object.getOwnPropertyDescriptor(e,t);if(typeof t==`string`){if(c[t])return{configurable:!0,enumerable:!0,get(){return c[t].value},set(e){Ge(l,t,e)}};if(Object.prototype.hasOwnProperty.call(s,t))return{configurable:!0,enumerable:!1,value:s[t]}}}});return Object.keys(r).forEach(e=>{let t=r[e];typeof t==`function`&&(s[e]=(...e)=>t.apply(p,e))}),Object.keys(n).forEach(e=>{let t=n[e];if(typeof t==`function`)c[e]=d(e,()=>t.call(p));else{let n=t.get?.bind(p);if(!n)throw Error(`计算属性 "${e}" 需要提供 getter`);let r=t.set?.bind(p);r?(l[e]=r,c[e]=d(e,n,r)):c[e]=d(e,n)}}),{boundMethods:s,computedRefs:c,computedSetters:l,dirtyComputedKeys:u,computedProxy:f,publicInstance:p}}const Ye=Symbol(`wevu.noSetData`);function J(e){return Object.defineProperty(e,Ye,{value:!0,configurable:!0,enumerable:!1,writable:!1}),e}function Xe(e){return typeof e==`object`&&!!e&&e[Ye]===!0}function Ze(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function Y(e,t=new WeakMap,n){let r=ke(e);if(typeof r==`bigint`){let e=Number(r);return Number.isSafeInteger(e)?e:r.toString()}if(typeof r==`symbol`)return r.toString();if(typeof r==`function`)return;if(typeof r!=`object`||!r)return r;if(Xe(r))return;let i=K(r)?G(r):r,a=n?._depth??(typeof n?.maxDepth==`number`?Math.max(0,Math.floor(n.maxDepth)):1/0),o=n?._budget??(typeof n?.maxKeys==`number`?{keys:Math.max(0,Math.floor(n.maxKeys))}:{keys:1/0});if(a<=0||o.keys<=0)return i;let s=n?.cache;if(s){let e=ve(i),t=s.get(i);if(t&&t.version===e)return t.value}if(t.has(i))return t.get(i);if(i instanceof Date)return i.getTime();if(i instanceof RegExp)return i.toString();if(i instanceof Map){let e=[];return t.set(i,e),i.forEach((n,r)=>{e.push([Y(r,t),Y(n,t)])}),e}if(i instanceof Set){let e=[];return t.set(i,e),i.forEach(n=>{e.push(Y(n,t))}),e}if(typeof ArrayBuffer<`u`){if(i instanceof ArrayBuffer)return i.byteLength;if(ArrayBuffer.isView(i)){let e=i;if(typeof e[Symbol.iterator]==`function`){let n=Array.from(e);return t.set(i,n),n.map(e=>Y(e,t))}let n=Array.from(new Uint8Array(e.buffer,e.byteOffset,e.byteLength));return t.set(i,n),n}}if(i instanceof Error)return{name:i.name,message:i.message};if(Array.isArray(i)){let e=[];return t.set(i,e),i.forEach((r,i)=>{let s=Y(r,t,{...n,_depth:a-1,_budget:o});e[i]=s===void 0?null:s}),s&&s.set(i,{version:ve(i),value:e}),e}let c={};return t.set(i,c),Object.keys(i).forEach(e=>{if(--o.keys,o.keys<=0)return;let r=Y(i[e],t,{...n,_depth:a-1,_budget:o});r!==void 0&&(c[e]=r)}),s&&s.set(i,{version:ve(i),value:c}),c}function Qe(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function $e(e,t,n){let r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(let i of r)if(!Object.prototype.hasOwnProperty.call(t,i)||!n(e[i],t[i]))return!1;return!0}function et(e,t){return Object.is(e,t)?!0:Array.isArray(e)&&Array.isArray(t)?Qe(e,t,et):Ze(e)&&Ze(t)?$e(e,t,et):!1}function tt(e){return e===void 0?null:e}function nt(e,t,n,r){if(!et(e,t)){if(Ze(e)&&Ze(t)){for(let i of Object.keys(t)){if(!Object.prototype.hasOwnProperty.call(e,i)){r[`${n}.${i}`]=tt(t[i]);continue}nt(e[i],t[i],`${n}.${i}`,r)}for(let i of Object.keys(e))Object.prototype.hasOwnProperty.call(t,i)||(r[`${n}.${i}`]=null);return}if(Array.isArray(e)&&Array.isArray(t)){Qe(e,t,et)||(r[n]=tt(t));return}r[n]=tt(t)}}function rt(e,t){let n={};for(let r of Object.keys(t))nt(e[r],t[r],r,n);for(let r of Object.keys(e))Object.prototype.hasOwnProperty.call(t,r)||(n[r]=null);return n}function it(e){let t=Object.keys(e).sort();if(t.length<=1)return e;let n=Object.create(null),r=[];for(let i of t){for(;r.length;){let e=r[r.length-1];if(i.startsWith(e))break;r.pop()}r.length||(n[i]=e[i],r.push(`${i}.`))}return n}function at(e,t,n){if(t<=0)return t+1;if(e===null)return 4;let r=typeof e;if(r===`string`)return 2+e.length;if(r===`number`)return Number.isFinite(e)?String(e).length:4;if(r===`boolean`)return e?4:5;if(r===`undefined`||r===`function`||r===`symbol`||r!==`object`||n.has(e))return 4;if(n.add(e),Array.isArray(e)){let r=2;for(let i=0;i<e.length;i++)if(i&&(r+=1),r+=at(e[i],t-r,n),r>t)return r;return r}let i=2;for(let[r,a]of Object.entries(e))if(i>2&&(i+=1),i+=2+r.length+1,i+=at(a,t-i,n),i>t)return i;return i}function ot(e,t){if(t===1/0)return{fallback:!1,estimatedBytes:void 0,bytes:void 0};let n=t,r=Object.keys(e).length,i=at(e,n+1,new WeakSet);if(i>n)return{fallback:!0,estimatedBytes:i,bytes:void 0};if(i>=n*.85&&r>2)try{let t=JSON.stringify(e).length;return{fallback:t>n,estimatedBytes:i,bytes:t}}catch{return{fallback:!1,estimatedBytes:i,bytes:void 0}}return{fallback:!1,estimatedBytes:i,bytes:void 0}}function st(e){let{input:t,entryMap:n,getPlainByPath:r,mergeSiblingThreshold:i,mergeSiblingSkipArray:a,mergeSiblingMaxParentBytes:o,mergeSiblingMaxInflationRatio:s}=e;if(!i)return{out:t,merged:0};let c=Object.keys(t);if(c.length<i)return{out:t,merged:0};let l=new Map,u=new Set;for(let e of c){let r=n.get(e);if(!r)continue;if(t[e]===null||r.op===`delete`){let t=e.lastIndexOf(`.`);t>0&&u.add(e.slice(0,t));continue}let i=e.lastIndexOf(`.`);if(i<=0)continue;let a=e.slice(0,i),o=l.get(a)??[];o.push(e),l.set(a,o)}let d=Array.from(l.entries()).filter(([e,t])=>t.length>=i&&!u.has(e)).sort((e,t)=>t[0].split(`.`).length-e[0].split(`.`).length);if(!d.length)return{out:t,merged:0};let f=Object.create(null);Object.assign(f,t);let p=0,m=new WeakMap,h=e=>{if(e&&typeof e==`object`){let t=m.get(e);if(t!==void 0)return t;let n=at(e,1/0,new WeakSet);return m.set(e,n),n}return at(e,1/0,new WeakSet)},g=(e,t)=>2+e.length+1+h(t);for(let[e,t]of d){if(Object.prototype.hasOwnProperty.call(f,e))continue;let n=t.filter(e=>Object.prototype.hasOwnProperty.call(f,e));if(n.length<i)continue;let c=r(e);if(!(a&&Array.isArray(c))&&!(o!==1/0&&g(e,c)>o)){if(s!==1/0){let t=0;for(let e of n)t+=g(e,f[e]);if(g(e,c)>t*s)continue}f[e]=c;for(let e of n)delete f[e];p+=1}}return{out:f,merged:p}}function ct(e){return e===void 0?null:e}function lt(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function ut(e,t){if(Object.is(e,t))return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!1;return!0}if(!lt(e)||!lt(t))return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}function dt(e,t,n,r){if(Object.is(e,t))return!0;if(n<=0)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!dt(e[i],t[i],n-1,r))return!1;return!0}if(!lt(e)||!lt(t))return!1;let i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(let a of i)if(--r.keys,r.keys<=0||!Object.prototype.hasOwnProperty.call(t,a)||!dt(e[a],t[a],n-1,r))return!1;return!0}function ft(e,t,n,r){let i=t.split(`.`).filter(Boolean);if(!i.length)return;let a=e;for(let e=0;e<i.length-1;e++){let t=i[e];(!Object.prototype.hasOwnProperty.call(a,t)||a[t]==null||typeof a[t]!=`object`)&&(a[t]=Object.create(null)),a=a[t]}let o=i[i.length-1];if(r===`delete`)try{delete a[o]}catch{a[o]=null}else a[o]=n}function pt(e){let{state:t,computedRefs:n,includeComputed:r,shouldIncludeKey:i,plainCache:a,toPlainMaxDepth:o,toPlainMaxKeys:s}=e,c=new WeakMap,l=Object.create(null),u=Number.isFinite(s)?{keys:s}:void 0,d=K(t)?G(t):t,f=Object.keys(d),p=r?Object.keys(n):[];for(let e of f)i(e)&&(l[e]=Y(d[e],c,{cache:a,maxDepth:o,_budget:u}));for(let e of p)i(e)&&(l[e]=Y(n[e].value,c,{cache:a,maxDepth:o,_budget:u}));return l}function mt(e){let{state:t,computedRefs:n,dirtyComputedKeys:r,includeComputed:i,computedCompare:a,computedCompareMaxDepth:o,computedCompareMaxKeys:s,currentAdapter:c,shouldIncludeKey:l,maxPatchKeys:u,maxPayloadBytes:d,mergeSiblingThreshold:f,mergeSiblingMaxInflationRatio:p,mergeSiblingMaxParentBytes:m,mergeSiblingSkipArray:h,elevateTopKeyThreshold:g,toPlainMaxDepth:_,toPlainMaxKeys:v,plainCache:y,pendingPatches:b,fallbackTopKeys:x,latestSnapshot:S,latestComputedSnapshot:C,needsFullSnapshot:w,emitDebug:T,runDiffUpdate:E}=e;if(b.size>u){w.value=!0;let e=b.size;b.clear(),r.clear(),T({mode:`diff`,reason:`maxPatchKeys`,pendingPatchKeys:e,payloadKeys:0}),E(`maxPatchKeys`);return}let D=new WeakMap,O=new Map,k=Object.create(null),A=Array.from(b.entries());if(Number.isFinite(g)&&g>0){let e=new Map;for(let[t]of A){let n=t.split(`.`,1)[0];e.set(n,(e.get(n)??0)+1)}for(let[t,n]of e)n>=g&&x.add(t)}let j=A.filter(([e])=>{for(let t of x)if(e===t||e.startsWith(`${t}.`))return!1;return!0}),M=new Map(j);b.clear();let N=e=>{let n=e.split(`.`).filter(Boolean),r=t;for(let e of n){if(r==null)return r;r=r[e]}return r},P=e=>{if(O.has(e))return O.get(e);let t=ct(Y(N(e),D,{cache:y,maxDepth:_,maxKeys:v}));return O.set(e,t),t};if(x.size){for(let e of x)l(e)&&(k[e]=P(e),M.set(e,{kind:`property`,op:`set`}));x.clear()}for(let[e,t]of j){if((t.kind===`array`?`set`:t.op)===`delete`){k[e]=null;continue}k[e]=P(e)}let F=0;if(i&&r.size){let e=Object.create(null),t=Array.from(r);r.clear(),F=t.length;for(let r of t){if(!l(r))continue;let t=Y(n[r].value,D,{cache:y,maxDepth:_,maxKeys:v}),i=C[r];(a===`deep`?dt(i,t,o,{keys:s}):a===`shallow`?ut(i,t):Object.is(i,t))||(e[r]=ct(t),C[r]=t)}Object.assign(k,e)}let I=it(k),L=0;if(f){let e=st({input:I,entryMap:M,getPlainByPath:P,mergeSiblingThreshold:f,mergeSiblingSkipArray:h,mergeSiblingMaxParentBytes:m,mergeSiblingMaxInflationRatio:p});L=e.merged,I=it(e.out)}let R=ot(I,d),z=R.fallback;if(T({mode:z?`diff`:`patch`,reason:z?`maxPayloadBytes`:`patch`,pendingPatchKeys:j.length,payloadKeys:Object.keys(I).length,mergedSiblingParents:L||void 0,computedDirtyKeys:F||void 0,estimatedBytes:R.estimatedBytes,bytes:R.bytes}),z){w.value=!0,b.clear(),r.clear(),E(`maxPayloadBytes`);return}if(Object.keys(I).length){for(let[e,t]of Object.entries(I)){let n=M.get(e);n?ft(S,e,t,n.kind===`array`?`set`:n.op):ft(S,e,t,`set`)}if(typeof c.setData==`function`){let e=c.setData(I);e&&typeof e.then==`function`&&e.catch(()=>{})}T({mode:`patch`,reason:`patch`,pendingPatchKeys:j.length,payloadKeys:Object.keys(I).length})}}function ht(e){let{state:t,computedRefs:n,dirtyComputedKeys:r,includeComputed:i,setDataStrategy:a,computedCompare:o,computedCompareMaxDepth:s,computedCompareMaxKeys:c,currentAdapter:l,shouldIncludeKey:u,maxPatchKeys:d,maxPayloadBytes:f,mergeSiblingThreshold:p,mergeSiblingMaxInflationRatio:m,mergeSiblingMaxParentBytes:h,mergeSiblingSkipArray:g,elevateTopKeyThreshold:_,toPlainMaxDepth:v,toPlainMaxKeys:y,debug:b,debugWhen:x,debugSampleRate:S,runTracker:C,isMounted:w}=e,T=new WeakMap,E={},D=Object.create(null),O={value:a===`patch`},k=new Map,A=new Set,j=e=>{if(!b)return;let t=e.reason!==`patch`&&e.reason!==`diff`;if(!(x===`fallback`&&!t)&&!(S<1&&Math.random()>S))try{b(e)}catch{}},M=()=>pt({state:t,computedRefs:n,includeComputed:i,shouldIncludeKey:u,plainCache:T,toPlainMaxDepth:v,toPlainMaxKeys:y}),N=(e=`diff`)=>{let t=M(),o=rt(E,t);if(E=t,O.value=!1,k.clear(),a===`patch`&&i){D=Object.create(null);for(let e of Object.keys(n))u(e)&&(D[e]=t[e]);r.clear()}if(Object.keys(o).length){if(typeof l.setData==`function`){let e=l.setData(o);e&&typeof e.then==`function`&&e.catch(()=>{})}j({mode:`diff`,reason:e,pendingPatchKeys:0,payloadKeys:Object.keys(o).length})}};return{job:e=>{w()&&(C(),a===`patch`&&!O.value?mt({state:t,computedRefs:n,dirtyComputedKeys:r,includeComputed:i,computedCompare:o,computedCompareMaxDepth:s,computedCompareMaxKeys:c,currentAdapter:l,shouldIncludeKey:u,maxPatchKeys:d,maxPayloadBytes:f,mergeSiblingThreshold:p,mergeSiblingMaxInflationRatio:m,mergeSiblingMaxParentBytes:h,mergeSiblingSkipArray:g,elevateTopKeyThreshold:_,toPlainMaxDepth:v,toPlainMaxKeys:y,plainCache:T,pendingPatches:k,fallbackTopKeys:A,latestSnapshot:E,latestComputedSnapshot:D,needsFullSnapshot:O,emitDebug:j,runDiffUpdate:N}):N(O.value?`needsFullSnapshot`:`diff`))},mutationRecorder:(e,t)=>{if(!w()||e.root!==t)return;if(!e.path){if(Array.isArray(e.fallbackTopKeys)&&e.fallbackTopKeys.length)for(let t of e.fallbackTopKeys)A.add(t);else O.value=!0;return}let n=e.path.split(`.`,1)[0];u(n)&&k.set(e.path,{kind:e.kind,op:e.op})},snapshot:()=>a===`patch`?M():{...E},getLatestSnapshot:()=>E}}function gt(e){let t=e?.includeComputed??!0,n=e?.strategy??`diff`,r=typeof e?.maxPatchKeys==`number`?Math.max(0,e.maxPatchKeys):1/0,i=typeof e?.maxPayloadBytes==`number`?Math.max(0,e.maxPayloadBytes):1/0,a=typeof e?.mergeSiblingThreshold==`number`?Math.max(2,Math.floor(e.mergeSiblingThreshold)):0,o=typeof e?.mergeSiblingMaxInflationRatio==`number`?Math.max(0,e.mergeSiblingMaxInflationRatio):1.25,s=typeof e?.mergeSiblingMaxParentBytes==`number`?Math.max(0,e.mergeSiblingMaxParentBytes):1/0,c=e?.mergeSiblingSkipArray??!0,l=e?.computedCompare??(n===`patch`?`deep`:`reference`),u=typeof e?.computedCompareMaxDepth==`number`?Math.max(0,Math.floor(e.computedCompareMaxDepth)):4,d=typeof e?.computedCompareMaxKeys==`number`?Math.max(0,Math.floor(e.computedCompareMaxKeys)):200,f=e?.prelinkMaxDepth,p=e?.prelinkMaxKeys,m=e?.debug,h=e?.debugWhen??`fallback`,g=typeof e?.debugSampleRate==`number`?Math.min(1,Math.max(0,e.debugSampleRate)):1,_=typeof e?.elevateTopKeyThreshold==`number`?Math.max(0,Math.floor(e.elevateTopKeyThreshold)):1/0,v=typeof e?.toPlainMaxDepth==`number`?Math.max(0,Math.floor(e.toPlainMaxDepth)):1/0,y=typeof e?.toPlainMaxKeys==`number`?Math.max(0,Math.floor(e.toPlainMaxKeys)):1/0,b=Array.isArray(e?.pick)&&e.pick.length>0?new Set(e.pick):void 0,x=Array.isArray(e?.omit)&&e.omit.length>0?new Set(e.omit):void 0;return{includeComputed:t,setDataStrategy:n,maxPatchKeys:r,maxPayloadBytes:i,mergeSiblingThreshold:a,mergeSiblingMaxInflationRatio:o,mergeSiblingMaxParentBytes:s,mergeSiblingSkipArray:c,computedCompare:l,computedCompareMaxDepth:u,computedCompareMaxKeys:d,prelinkMaxDepth:f,prelinkMaxKeys:p,debug:m,debugWhen:h,debugSampleRate:g,elevateTopKeyThreshold:_,toPlainMaxDepth:v,toPlainMaxKeys:y,pickSet:b,omitSet:x,shouldIncludeKey:e=>!(b&&!b.has(e)||x&&x.has(e))}}function _t(e){return e?e.charAt(0).toUpperCase()+e.slice(1):``}function vt(e){return e?e.split(`.`).map(e=>e.trim()).filter(Boolean):[]}function yt(e,t,n){let r=e;for(let e=0;e<t.length-1;e++){let n=t[e];(r[n]==null||typeof r[n]!=`object`)&&(r[n]={}),r=r[n]}r[t[t.length-1]]=n}function bt(e,t,n,r,i){if(!r.length)return;let[a,...o]=r;if(!o.length){if(t[a])Ge(n,a,i);else{let t=e[a];q(t)?t.value=i:e[a]=i}return}if(t[a]){Ge(n,a,i);return}(e[a]==null||typeof e[a]!=`object`)&&(e[a]={}),yt(e[a],o,i)}function xt(e,t){return t.reduce((e,t)=>e==null?e:e[t],e)}function St(e){return Ke(e)}function Ct(e,t,n,r){return(i,a)=>{let o=vt(i);if(!o.length)throw Error(`bindModel 需要非空路径`);let s=()=>xt(e,o),c=e=>{bt(t,n,r,o,e)},l={event:`input`,valueProp:`value`,parser:St,formatter:e=>e,...a};return{get value(){return s()},set value(e){c(e)},update(e){c(e)},model(e){let t={...l,...e},n=`on${_t(t.event)}`,r=e=>{c(t.parser(e))};return{[t.valueProp]:t.formatter(s()),[n]:r}}}}}const wt=`__wevuDefaultsScope`;let Tt={};function Et(e){if(!(!e||typeof e!=`object`||Array.isArray(e)))return e}function Dt(e,t){if(!e)return t;if(!t)return e;let n={...e,...t},r=Et(e.setData),i=Et(t.setData);(r||i)&&(n.setData={...r??{},...i??{}});let a=Et(e.options),o=Et(t.options);return(a||o)&&(n.options={...a??{},...o??{}}),n}function Ot(e,t){return Dt(e,t)}function kt(e,t){return{app:Dt(e.app,t.app),component:Dt(e.component,t.component)}}function At(e){Tt=kt(Tt,e)}function jt(){Tt={}}function Mt(e){return Ot(Tt.app,e)}function Nt(e){return Ot(Tt.component,e)}let Pt,Ft;function It(){return Pt}function Lt(e){Pt=e}function Rt(){return Ft}function zt(e){Ft=e}function X(e){if(!Pt)throw Error(`${e}() 必须在 setup() 的同步阶段调用`);return Pt}function Bt(e){return e.__wevuHooks||=Object.create(null),e.__wevuHooks}function Z(e,t,n,{single:r=!1}={}){let i=Bt(e);r?i[t]=n:(i[t]??(i[t]=[])).push(n)}function Q(e,t,n=[]){let r=e.__wevuHooks;if(!r)return;let i=r[t];if(!i)return;let a=e.__wevu?.proxy??e;if(Array.isArray(i))for(let e of i)try{e.apply(a,n)}catch{}else if(typeof i==`function`)try{i.apply(a,n)}catch{}}function Vt(e,t,n=[]){let r=e.__wevuHooks;if(!r)return;let i=r[t];if(!i)return;let a=e.__wevu?.proxy??e;if(typeof i==`function`)try{return i.apply(a,n)}catch{return}if(Array.isArray(i)){let e;for(let t of i)try{e=t.apply(a,n)}catch{}return e}}function Ht(e){Z(X(`onLaunch`),`onLaunch`,e)}function Ut(e){Z(X(`onPageNotFound`),`onPageNotFound`,e)}function Wt(e){Z(X(`onUnhandledRejection`),`onUnhandledRejection`,e)}function Gt(e){Z(X(`onThemeChange`),`onThemeChange`,e)}function Kt(e){Z(X(`onShow`),`onShow`,e)}function qt(e){Z(X(`onLoad`),`onLoad`,e)}function Jt(e){Z(X(`onHide`),`onHide`,e)}function Yt(e){Z(X(`onUnload`),`onUnload`,e)}function Xt(e){Z(X(`onReady`),`onReady`,e)}function Zt(e){Z(X(`onPullDownRefresh`),`onPullDownRefresh`,e)}function Qt(e){Z(X(`onReachBottom`),`onReachBottom`,e)}function $t(e){Z(X(`onPageScroll`),`onPageScroll`,e)}function en(e){Z(X(`onRouteDone`),`onRouteDone`,e)}function tn(e){Z(X(`onTabItemTap`),`onTabItemTap`,e)}function nn(e){Z(X(`onResize`),`onResize`,e)}function rn(e){Z(X(`onMoved`),`onMoved`,e)}function an(e){Z(X(`onError`),`onError`,e)}function on(e){Z(X(`onSaveExitState`),`onSaveExitState`,e,{single:!0})}function sn(e){Z(X(`onShareAppMessage`),`onShareAppMessage`,e,{single:!0})}function cn(e){Z(X(`onShareTimeline`),`onShareTimeline`,e,{single:!0})}function ln(e){Z(X(`onAddToFavorites`),`onAddToFavorites`,e,{single:!0})}function un(e){Z(X(`onMounted`),`onReady`,e)}function dn(e){Z(X(`onUpdated`),`__wevuOnUpdated`,e)}function fn(e){X(`onBeforeUnmount`),e()}function pn(e){Z(X(`onUnmounted`),`onUnload`,e)}function mn(e){X(`onBeforeMount`),e()}function hn(e){Z(X(`onBeforeUpdate`),`__wevuOnBeforeUpdate`,e)}function gn(e){let t=X(`onErrorCaptured`);Z(t,`onError`,n=>e(n,t,``))}function _n(e){Z(X(`onActivated`),`onShow`,e)}function vn(e){Z(X(`onDeactivated`),`onHide`,e)}function yn(e){X(`onServerPrefetch`)}function bn(e,t){Q(e,t===`before`?`__wevuOnBeforeUpdate`:`__wevuOnUpdated`)}function xn(e){return e.replace(/&amp;/g,`&`).replace(/&quot;/g,`"`).replace(/&#34;/g,`"`).replace(/&apos;/g,`'`).replace(/&#39;/g,`'`).replace(/&lt;/g,`<`).replace(/&gt;/g,`>`)}function Sn(e,t,n){let r=typeof t==`string`?t:void 0;if(!r)return;let i=(n?.currentTarget)?.dataset?.wvArgs??(n?.target)?.dataset?.wvArgs,a=[];if(typeof i==`string`)try{a=JSON.parse(i)}catch{try{a=JSON.parse(xn(i))}catch{a=[]}}Array.isArray(a)||(a=[]);let o=a.map(e=>e===`$event`?n:e),s=e?.[r];if(typeof s==`function`)return s.apply(e,o)}const $=new Map;let Cn=0;function wn(){return Cn+=1,`wv${Cn}`}function Tn(e,t,n){let r=$.get(e)??{snapshot:{},proxy:n,subscribers:new Set};if(r.snapshot=t,r.proxy=n,$.set(e,r),r.subscribers.size)for(let e of r.subscribers)try{e(t,n)}catch{}}function En(e){$.delete(e)}function Dn(e,t){let n=$.get(e)??{snapshot:{},proxy:void 0,subscribers:new Set};return n.subscribers.add(t),$.set(e,n),()=>{let n=$.get(e);n&&n.subscribers.delete(t)}}function On(e){return $.get(e)?.proxy}function kn(e){return $.get(e)?.snapshot}function An(e,t,n){try{t.state.__wvOwnerId=n}catch{}try{e.__wvOwnerId=n}catch{}let r=typeof t.snapshot==`function`?t.snapshot():{},i=e.__wevuProps??e.properties;if(i&&typeof i==`object`)for(let[e,t]of Object.entries(i))r[e]=t;Tn(n,r,t.proxy)}function jn(e){return e.kind===`component`}function Mn(e){return new Proxy(e,{get(e,t,n){let r=Reflect.get(e,t,n);return q(r)?r.value:r},set(e,t,n,r){let i=e[t];return q(i)&&!q(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}})}function Nn(e,t){let n=e.__wevuExposeProxy;if(n&&e.__wevuExposeRaw===t)return n;let r=Mn(t);try{Object.defineProperty(e,`__wevuExposeProxy`,{value:r,configurable:!0,enumerable:!1,writable:!1}),Object.defineProperty(e,`__wevuExposeRaw`,{value:t,configurable:!0,enumerable:!1,writable:!1})}catch{e.__wevuExposeProxy=r,e.__wevuExposeRaw=t}return r}function Pn(e,t){if(!t||typeof t!=`object`)return e;let n=t;return J(new Proxy(e,{get(e,t,r){return Reflect.has(e,t)?Reflect.get(e,t,r):n[t]},set(e,t,r,i){return t in n?(n[t]=r,!0):Reflect.set(e,t,r,i)},has(e,t){return Reflect.has(e,t)||t in n},ownKeys(e){return Array.from(new Set([...Reflect.ownKeys(e),...Reflect.ownKeys(n)]))},getOwnPropertyDescriptor(e,t){return Reflect.has(e,t)?Object.getOwnPropertyDescriptor(e,t):Object.getOwnPropertyDescriptor(n,t)}}))}function Fn(e){if(!e||typeof e!=`object`)return e??null;let t=e,n=t.__wevuExposed;return n&&typeof n==`object`?Nn(t,n):t.__wevu?.proxy?t.__wevu.proxy:e}function In(e,t){let n=e;if(!n)return t.inFor?J([]):null;if(t.inFor){if(typeof n.selectAllComponents==`function`){let r=n.selectAllComponents(t.selector);return J((Array.isArray(r)?r:[]).map((n,r)=>Pn(Un(e,t.selector,{multiple:!0,index:r}),Fn(n))))}return J([])}let r=Un(e,t.selector,{multiple:!1});return typeof n.selectComponent==`function`?Pn(r,Fn(n.selectComponent(t.selector))):r}function Ln(e){return e.__wevuTemplateRefMap}function Rn(e,t,n){if(!e)return;let r=e.get(t);r&&(r.value=n)}function zn(e,t){let n=e.__wevu?.proxy??e,r;if(t.get)try{r=t.get.call(n)}catch{r=void 0}return r==null&&t.name&&(r=t.name),typeof r==`function`?{type:`function`,fn:r}:q(r)?{type:`ref`,ref:r}:typeof r==`string`&&r?{type:`name`,name:r}:t.name?{type:`name`,name:t.name}:{type:`skip`}}function Bn(e){let t=e.__wevu?.state??e,n=t.$refs;if(n&&typeof n==`object`)return n;let r=J(Object.create(null));return Object.defineProperty(t,`$refs`,{value:r,configurable:!0,enumerable:!1,writable:!1}),r}function Vn(e){let t=e;return t&&typeof t.createSelectorQuery==`function`?t.createSelectorQuery():typeof wx<`u`&&typeof wx.createSelectorQuery==`function`?wx.createSelectorQuery().in(t):null}function Hn(e,t,n,r,i){let a=Vn(e);return a?(r(n.multiple?a.selectAll(t):a.select(t)),new Promise(e=>{a.exec(t=>{let r=Array.isArray(t)?t[0]:null;n.index!=null&&Array.isArray(r)&&(r=r[n.index]??null),i&&i(r??null),e(r??null)})})):(i&&i(null),Promise.resolve(null))}function Un(e,t,n){return J({selector:t,boundingClientRect:r=>Hn(e,t,n,e=>e.boundingClientRect(),r),scrollOffset:r=>Hn(e,t,n,e=>e.scrollOffset(),r),fields:(r,i)=>Hn(e,t,n,e=>e.fields(r),i),node:r=>Hn(e,t,n,e=>e.node(),r)})}function Wn(e,t,n){return t.inFor?J((Array.isArray(n)?n:[]).map((n,r)=>Un(e,t.selector,{multiple:!0,index:r}))):n?Un(e,t.selector,{multiple:!1}):null}function Gn(e,t){let n=e.__wevuTemplateRefs;if(!n||!n.length){t?.();return}if(!e.__wevuReadyCalled){t?.();return}if(!e.__wevu){t?.();return}let r=Ln(e),i=n.filter(e=>!jn(e)),a=n.filter(e=>jn(e)).map(t=>({binding:t,value:In(e,t)})),o=n=>{let i=Bn(e),a=new Map,o=new Set,s=e.__wevu?.proxy??e;n.forEach(t=>{let n=t.binding,r=t.value,i=zn(e,n);if(i.type===`function`){n.inFor&&Array.isArray(r)?r.length?r.forEach(e=>i.fn.call(s,e)):i.fn.call(s,null):i.fn.call(s,r??null);return}if(i.type===`ref`){i.ref.value=r;return}if(i.type===`name`){o.add(i.name);let e=a.get(i.name)??{values:[],count:0,hasFor:!1};e.count+=1,e.hasFor=e.hasFor||n.inFor,n.inFor?Array.isArray(r)&&e.values.push(...r):r!=null&&e.values.push(r),a.set(i.name,e)}});for(let[e,t]of a){let n;n=t.values.length?t.hasFor||t.values.length>1||t.count>1?J(t.values):t.values[0]:t.hasFor?J([]):null,i[e]=n,Rn(r,e,n)}for(let e of Object.keys(i))o.has(e)||delete i[e];t?.()};if(!i.length){o(a);return}let s=Vn(e);if(!s){o(a);return}let c=[];for(let e of i)(e.inFor?s.selectAll(e.selector):s.select(e.selector)).boundingClientRect(),c.push({binding:e});s.exec(t=>{let n=c.map((n,r)=>{let i=Array.isArray(t)?t[r]:null;return{binding:n.binding,value:Wn(e,n.binding,i)}});o([...a,...n])})}function Kn(e,t){let n=e.__wevuTemplateRefs;if(!n||!n.length){t?.();return}if(t){let n=e.__wevuTemplateRefsCallbacks??[];n.push(t),e.__wevuTemplateRefsCallbacks||Object.defineProperty(e,`__wevuTemplateRefsCallbacks`,{value:n,configurable:!0,enumerable:!1,writable:!0})}e.__wevuTemplateRefsPending||(e.__wevuTemplateRefsPending=!0,o(()=>{e.__wevuTemplateRefsPending=!1,Gn(e,()=>{let t=e.__wevuTemplateRefsCallbacks;!t||!t.length||t.splice(0).forEach(e=>{try{e()}catch{}})})}))}function qn(e){let t=e.__wevuTemplateRefs;if(!t||!t.length)return;let n=Bn(e),r=e.__wevu?.proxy??e,i=new Set,a=Ln(e);for(let o of t){let t=zn(e,o),s=o.inFor?J([]):null;if(t.type===`function`){t.fn.call(r,null);continue}if(t.type===`ref`){t.ref.value=s;continue}t.type===`name`&&(i.add(t.name),n[t.name]=s,Rn(a,t.name,s))}for(let e of Object.keys(n))i.has(e)||delete n[e]}function Jn(e,t,n){if(typeof e!=`function`)return;let r=n?.runtime??{methods:Object.create(null),state:{},proxy:{},watch:()=>()=>{},bindModel:()=>{}};n&&(n.runtime=r);let i={...n??{},runtime:r};return e.length>=2?e(t,i):e(i)}function Yn(e,t,n){if(typeof e==`function`)return{handler:e.bind(t.proxy),options:{}};if(typeof e==`string`){let r=t.methods?.[e]??n[e];return typeof r==`function`?{handler:r.bind(t.proxy),options:{}}:void 0}if(!e||typeof e!=`object`)return;let r=Yn(e.handler,t,n);if(!r)return;let i={...r.options};return e.immediate!==void 0&&(i.immediate=e.immediate),e.deep!==void 0&&(i.deep=e.deep),{handler:r.handler,options:i}}function Xn(e,t){let n=t.split(`.`).map(e=>e.trim()).filter(Boolean);return n.length?()=>{let t=e;for(let e of n){if(t==null)return t;t=t[e]}return t}:()=>e}function Zn(e,t,n){let r=[],i=e.proxy;for(let[a,o]of Object.entries(t)){let t=Yn(o,e,n);if(!t)continue;let s=Xn(i,a),c=e.watch(s,t.handler,t.options);r.push(c)}return r}function Qn(e,t,n,r,i){if(e.__wevu)return e.__wevu;let a=wn(),o=i?.deferSetData?(e=>{let t,n=!1,r={setData(r){if(!n){t={...t??{},...r};return}if(typeof e.setData==`function`)return e.setData(r)}};return r.__wevu_enableSetData=()=>{if(n=!0,t&&Object.keys(t).length&&typeof e.setData==`function`){let n=t;t=void 0,e.setData(n)}},r})(e):{setData(t){if(typeof e.setData==`function`)return e.setData(t)}},s,c=()=>{if(!s||typeof s.snapshot!=`function`)return;let t=s.snapshot(),n=e.__wevuProps??e.properties;if(n&&typeof n==`object`)for(let[e,r]of Object.entries(n))t[e]=r;Tn(a,t,s.proxy)},l={...o,setData(t){let n=o.setData(t);return c(),Kn(e),n}},u=t.mount({...l});s=u;let d=u?.proxy??{},f=u?.state??{};if(!u?.methods)try{u.methods=Object.create(null)}catch{}let p=u?.methods??Object.create(null),m=u?.watch??(()=>()=>{}),h=u?.bindModel??(()=>{}),g={...u??{},state:f,proxy:d,methods:p,watch:m,bindModel:h};if(Object.defineProperty(e,`$wevu`,{value:g,configurable:!0,enumerable:!1,writable:!1}),e.__wevu=g,An(e,g,a),n){let t=Zn(g,n,e);t.length&&(e.__wevuWatchStops=t)}if(r){let t=ge({...e.properties||{}});try{Object.defineProperty(e,`__wevuProps`,{value:t,configurable:!0,enumerable:!1,writable:!1})}catch{e.__wevuProps=t}let n={props:t,runtime:g,state:f,proxy:d,bindModel:h.bind(g),watch:m.bind(g),instance:e,emit:(t,n,r)=>{typeof e.triggerEvent==`function`&&e.triggerEvent(t,n,r)},expose:t=>{e.__wevuExposed=t},attrs:{},slots:Object.create(null)};Lt(e),zt(n);try{let e=Jn(r,t,n);e&&typeof e==`object`&&Object.keys(e).forEach(t=>{let n=e[t];typeof n==`function`?u.methods[t]=(...e)=>n.apply(u.proxy,e):u.state[t]=n})}finally{zt(void 0),Lt(void 0)}}try{let t=u.methods;for(let n of Object.keys(t))typeof e[n]!=`function`&&(e[n]=function(...e){let t=this.$wevu?.methods?.[n];if(typeof t==`function`)return t.apply(this.$wevu.proxy,e)})}catch{}return u}function $n(e){let t=e.__wevu?.adapter;t&&typeof t.__wevu_enableSetData==`function`&&t.__wevu_enableSetData()}function er(e){let t=e.__wevu,n=e.__wvOwnerId;n&&En(n),qn(e),t&&e.__wevuHooks&&Q(e,`onUnload`,[]),e.__wevuHooks&&=void 0;let r=e.__wevuWatchStops;if(Array.isArray(r))for(let e of r)try{e()}catch{}e.__wevuWatchStops=void 0,t&&t.unmount(),delete e.__wevu,`$wevu`in e&&delete e.$wevu}function tr(e,t,n,r,i){if(typeof App!=`function`)throw TypeError(`createApp 需要全局 App 构造器可用`);let a=Object.keys(t??{}),o={...i};o.globalData=o.globalData??{},o.__weapp_vite_inline||=function(e){let t=e?.currentTarget?.dataset?.wvHandler??e?.target?.dataset?.wvHandler;return Sn(this.__wevu?.proxy??this,t,e)};let s=o.onLaunch;o.onLaunch=function(...t){Qn(this,e,n,r),Q(this,`onLaunch`,t),typeof s==`function`&&s.apply(this,t)};let c=o.onShow;o.onShow=function(...e){Q(this,`onShow`,e),typeof c==`function`&&c.apply(this,e)};let l=o.onHide;o.onHide=function(...e){Q(this,`onHide`,e),typeof l==`function`&&l.apply(this,e)};let u=o.onError;o.onError=function(...e){Q(this,`onError`,e),typeof u==`function`&&u.apply(this,e)};let d=o.onPageNotFound;o.onPageNotFound=function(...e){Q(this,`onPageNotFound`,e),typeof d==`function`&&d.apply(this,e)};let f=o.onUnhandledRejection;o.onUnhandledRejection=function(...e){Q(this,`onUnhandledRejection`,e),typeof f==`function`&&f.apply(this,e)};let p=o.onThemeChange;o.onThemeChange=function(...e){Q(this,`onThemeChange`,e),typeof p==`function`&&p.apply(this,e)};for(let e of a){let t=o[e];o[e]=function(...n){let r=this.__wevu,i,a=r?.methods?.[e];return a&&(i=a.apply(r.proxy,n)),typeof t==`function`?t.apply(this,n):i}}App(o)}function nr(e){let{features:t,userOnSaveExitState:n,userOnPullDownRefresh:r,userOnReachBottom:i,userOnPageScroll:a,userOnRouteDone:o,userOnTabItemTap:s,userOnResize:c,userOnShareAppMessage:l,userOnShareTimeline:u,userOnAddToFavorites:d}=e,f=typeof r==`function`||!!t.enableOnPullDownRefresh,p=typeof i==`function`||!!t.enableOnReachBottom,m=typeof a==`function`||!!t.enableOnPageScroll,h=typeof o==`function`||!!t.enableOnRouteDone,g=typeof s==`function`||!!t.enableOnTabItemTap,_=typeof c==`function`||!!t.enableOnResize,v=typeof l==`function`||!!t.enableOnShareAppMessage,y=typeof u==`function`||!!t.enableOnShareTimeline,b=typeof d==`function`||!!t.enableOnAddToFavorites,x=typeof n==`function`||!!t.enableOnSaveExitState,S=()=>{};return{enableOnPullDownRefresh:f,enableOnReachBottom:p,enableOnPageScroll:m,enableOnRouteDone:h,enableOnTabItemTap:g,enableOnResize:_,enableOnShareAppMessage:v,enableOnShareTimeline:y,enableOnAddToFavorites:b,enableOnSaveExitState:x,effectiveOnSaveExitState:typeof n==`function`?n:(()=>({data:void 0})),effectiveOnPullDownRefresh:typeof r==`function`?r:S,effectiveOnReachBottom:typeof i==`function`?i:S,effectiveOnPageScroll:typeof a==`function`?a:S,effectiveOnRouteDone:typeof o==`function`?o:S,effectiveOnTabItemTap:typeof s==`function`?s:S,effectiveOnResize:typeof c==`function`?c:S,effectiveOnShareAppMessage:typeof l==`function`?l:()=>({}),effectiveOnShareTimeline:typeof u==`function`?u:()=>({}),effectiveOnAddToFavorites:typeof d==`function`?d:(()=>({}))}}function rr(e){let{runtimeApp:t,watch:n,setup:r,userOnLoad:i,userOnUnload:a,userOnShow:o,userOnHide:s,userOnReady:c,enableOnSaveExitState:l,enableOnPullDownRefresh:u,enableOnReachBottom:d,enableOnPageScroll:f,enableOnRouteDone:p,enableOnTabItemTap:m,enableOnResize:h,enableOnShareAppMessage:g,enableOnShareTimeline:_,enableOnAddToFavorites:v,effectiveOnSaveExitState:y,effectiveOnPullDownRefresh:b,effectiveOnReachBottom:x,effectiveOnPageScroll:S,effectiveOnRouteDone:C,effectiveOnTabItemTap:w,effectiveOnResize:T,effectiveOnShareAppMessage:E,effectiveOnShareTimeline:D,effectiveOnAddToFavorites:O,hasHook:k}=e,A={onLoad(...e){if(Qn(this,t,n,r),$n(this),Q(this,`onLoad`,e),typeof i==`function`)return i.apply(this,e)},onUnload(...e){if(er(this),typeof a==`function`)return a.apply(this,e)},onShow(...e){if(Q(this,`onShow`,e),typeof o==`function`)return o.apply(this,e)},onHide(...e){if(Q(this,`onHide`,e),typeof s==`function`)return s.apply(this,e)},onReady(...e){if(!this.__wevuReadyCalled){this.__wevuReadyCalled=!0,Kn(this,()=>{Q(this,`onReady`,e),typeof c==`function`&&c.apply(this,e)});return}if(typeof c==`function`)return c.apply(this,e)}};return l&&(A.onSaveExitState=function(...e){let t=Vt(this,`onSaveExitState`,e);return t===void 0?y.apply(this,e):t}),u&&(A.onPullDownRefresh=function(...e){if(Q(this,`onPullDownRefresh`,e),!k(this,`onPullDownRefresh`))return b.apply(this,e)}),d&&(A.onReachBottom=function(...e){if(Q(this,`onReachBottom`,e),!k(this,`onReachBottom`))return x.apply(this,e)}),f&&(A.onPageScroll=function(...e){if(Q(this,`onPageScroll`,e),!k(this,`onPageScroll`))return S.apply(this,e)}),p&&(A.onRouteDone=function(...e){if(Q(this,`onRouteDone`,e),!k(this,`onRouteDone`))return C.apply(this,e)}),m&&(A.onTabItemTap=function(...e){if(Q(this,`onTabItemTap`,e),!k(this,`onTabItemTap`))return w.apply(this,e)}),h&&(A.onResize=function(...e){if(Q(this,`onResize`,e),!k(this,`onResize`))return T.apply(this,e)}),g&&(A.onShareAppMessage=function(...e){let t=Vt(this,`onShareAppMessage`,e);return t===void 0?E.apply(this,e):t}),_&&(A.onShareTimeline=function(...e){let t=Vt(this,`onShareTimeline`,e);return t===void 0?D.apply(this,e):t}),v&&(A.onAddToFavorites=function(...e){let t=Vt(this,`onAddToFavorites`,e);return t===void 0?O.apply(this,e):t}),A}function ir(e){let{userMethods:t,runtimeMethods:n}=e,r={...t};r.__weapp_vite_inline||=function(e){let t=e?.currentTarget?.dataset?.wvHandler??e?.target?.dataset?.wvHandler;return Sn(this.__wevu?.proxy??this,t,e)},r.__weapp_vite_model||=function(e){let t=e?.currentTarget?.dataset?.wvModel??e?.target?.dataset?.wvModel;if(typeof t!=`string`||!t)return;let n=this.__wevu;if(!n||typeof n.bindModel!=`function`)return;let r=Ke(e);try{n.bindModel(t).update(r)}catch{}},!r.__weapp_vite_owner&&typeof n?.__weapp_vite_owner==`function`&&(r.__weapp_vite_owner=n.__weapp_vite_owner);let i=Object.keys(n??{});for(let e of i){if(e.startsWith(`__weapp_vite_`))continue;let t=r[e];r[e]=function(...n){let r=this.__wevu,i,a=r?.methods?.[e];if(a&&(i=a.apply(r.proxy,n)),typeof t==`function`){let e=t.apply(this,n);return e===void 0?i:e}return i}}return{finalMethods:r}}function ar(e){let t=e.__wevu,n=e.__wvOwnerId;if(!t||!n||typeof t.snapshot!=`function`)return;let r=t.snapshot(),i=e.__wevuProps??e.properties;if(i&&typeof i==`object`)for(let[e,t]of Object.entries(i))r[e]=t;Tn(n,r,t.proxy)}function or(e){let{restOptions:t,userObservers:n}=e,r=e=>{let t=e.__wevuProps,n=e.properties;if(!t||typeof t!=`object`||!n||typeof n!=`object`)return;let r=n,i=Object.keys(t);for(let e of i)if(!Object.prototype.hasOwnProperty.call(r,e))try{delete t[e]}catch{}for(let[e,n]of Object.entries(r))try{t[e]=n}catch{}ar(e)},i=(e,t,n)=>{let r=e.__wevuProps;if(!(!r||typeof r!=`object`)){try{r[t]=n}catch{}ar(e)}},a=t.properties&&typeof t.properties==`object`?Object.keys(t.properties):[],o={};if(a.length)for(let e of a)o[e]=function(t){i(this,e,t)};let s={...n??{}};for(let[e,t]of Object.entries(o)){let n=s[e];typeof n==`function`?s[e]=function(...e){n.apply(this,e),t.apply(this,e)}:s[e]=t}return{syncWevuPropsFromInstance:r,finalObservers:s}}function sr(e,t,n,r,i){let{methods:a={},lifetimes:o={},pageLifetimes:s={},options:c={},...l}=i,u=l.onLoad,d=l.onUnload,f=l.onShow,p=l.onHide,m=l.onReady,h=l.onSaveExitState,g=l.onPullDownRefresh,_=l.onReachBottom,v=l.onPageScroll,y=l.onRouteDone,b=l.onTabItemTap,x=l.onResize,S=l.onShareAppMessage,C=l.onShareTimeline,w=l.onAddToFavorites,T=l.features??{},E={...l},D=E.__wevuTemplateRefs;delete E.__wevuTemplateRefs;let O=E.observers,k=E.created;delete E.features,delete E.created,delete E.onLoad,delete E.onUnload,delete E.onShow,delete E.onHide,delete E.onReady;let{enableOnPullDownRefresh:A,enableOnReachBottom:j,enableOnPageScroll:M,enableOnRouteDone:N,enableOnTabItemTap:P,enableOnResize:F,enableOnShareAppMessage:I,enableOnShareTimeline:L,enableOnAddToFavorites:R,enableOnSaveExitState:z,effectiveOnSaveExitState:ee,effectiveOnPullDownRefresh:te,effectiveOnReachBottom:B,effectiveOnPageScroll:V,effectiveOnRouteDone:ne,effectiveOnTabItemTap:re,effectiveOnResize:ie,effectiveOnShareAppMessage:ae,effectiveOnShareTimeline:oe,effectiveOnAddToFavorites:se}=nr({features:T,userOnSaveExitState:h,userOnPullDownRefresh:g,userOnReachBottom:_,userOnPageScroll:v,userOnRouteDone:y,userOnTabItemTap:b,userOnResize:x,userOnShareAppMessage:S,userOnShareTimeline:C,userOnAddToFavorites:w}),H=(e,t)=>{let n=e.__wevuHooks;if(!n)return!1;let r=n[t];return r?Array.isArray(r)?r.length>0:typeof r==`function`:!1};{let e=E.export;E.export=function(){let t=this.__wevuExposed??{},n=typeof e==`function`?e.call(this):{};return n&&typeof n==`object`&&!Array.isArray(n)?{...t,...n}:n??t}}let U={multipleSlots:c.multipleSlots??!0,...c},{syncWevuPropsFromInstance:W,finalObservers:ce}=or({restOptions:E,userObservers:O}),{finalMethods:G}=ir({userMethods:a,runtimeMethods:t}),le=rr({runtimeApp:e,watch:n,setup:r,userOnLoad:u,userOnUnload:d,userOnShow:f,userOnHide:p,userOnReady:m,enableOnSaveExitState:z,enableOnPullDownRefresh:A,enableOnReachBottom:j,enableOnPageScroll:M,enableOnRouteDone:N,enableOnTabItemTap:P,enableOnResize:F,enableOnShareAppMessage:I,enableOnShareTimeline:L,enableOnAddToFavorites:R,effectiveOnSaveExitState:ee,effectiveOnPullDownRefresh:te,effectiveOnReachBottom:B,effectiveOnPageScroll:V,effectiveOnRouteDone:ne,effectiveOnTabItemTap:re,effectiveOnResize:ie,effectiveOnShareAppMessage:ae,effectiveOnShareTimeline:oe,effectiveOnAddToFavorites:se,hasHook:H});Component({...E,...le,observers:ce,lifetimes:{...o,created:function(...t){Array.isArray(D)&&D.length&&Object.defineProperty(this,`__wevuTemplateRefs`,{value:D,configurable:!0,enumerable:!1,writable:!1}),Qn(this,e,n,r,{deferSetData:!0}),W(this),typeof k==`function`&&k.apply(this,t),typeof o.created==`function`&&o.created.apply(this,t)},moved:function(...e){Q(this,`onMoved`,e),typeof o.moved==`function`&&o.moved.apply(this,e)},attached:function(...t){Array.isArray(D)&&D.length&&!this.__wevuTemplateRefs&&Object.defineProperty(this,`__wevuTemplateRefs`,{value:D,configurable:!0,enumerable:!1,writable:!1}),Qn(this,e,n,r),W(this),$n(this),typeof o.attached==`function`&&o.attached.apply(this,t)},ready:function(...e){if(!this.__wevuReadyCalled){this.__wevuReadyCalled=!0,W(this),Kn(this,()=>{Q(this,`onReady`,e),typeof o.ready==`function`&&o.ready.apply(this,e)});return}typeof o.ready==`function`&&o.ready.apply(this,e)},detached:function(...e){qn(this),er(this),typeof o.detached==`function`&&o.detached.apply(this,e)},error:function(...e){Q(this,`onError`,e),typeof o.error==`function`&&o.error.apply(this,e)}},pageLifetimes:{...s,show:function(...e){Q(this,`onShow`,e),typeof s.show==`function`&&s.show.apply(this,e)},hide:function(...e){Q(this,`onHide`,e),typeof s.hide==`function`&&s.hide.apply(this,e)},resize:function(...e){Q(this,`onResize`,e),typeof s.resize==`function`&&s.resize.apply(this,e)}},methods:G,options:U})}function cr(e){let{[wt]:t,data:n,computed:r,methods:i,setData:o,watch:s,setup:c,...l}=e[wt]===`component`?e:Mt(e),u=i??{},d=r??{},f=new Set,p={globalProperties:{}},m={mount(e){let t=xe((n??(()=>({})))()),r=d,i=u,s=!0,c=[],{includeComputed:l,setDataStrategy:f,maxPatchKeys:m,maxPayloadBytes:h,mergeSiblingThreshold:g,mergeSiblingMaxInflationRatio:v,mergeSiblingMaxParentBytes:y,mergeSiblingSkipArray:b,computedCompare:x,computedCompareMaxDepth:S,computedCompareMaxKeys:C,prelinkMaxDepth:w,prelinkMaxKeys:E,debug:D,debugWhen:O,debugSampleRate:k,elevateTopKeyThreshold:A,toPlainMaxDepth:j,toPlainMaxKeys:P,shouldIncludeKey:F}=gt(o),{boundMethods:I,computedRefs:L,computedSetters:R,dirtyComputedKeys:z,computedProxy:ee,publicInstance:te}=Je({state:t,computedDefs:r,methodDefs:i,appConfig:p,includeComputed:l,setDataStrategy:f}),B=e??{setData:()=>{}},V=G(t),ne,re=ht({state:t,computedRefs:L,dirtyComputedKeys:z,includeComputed:l,setDataStrategy:f,computedCompare:x,computedCompareMaxDepth:S,computedCompareMaxKeys:C,currentAdapter:B,shouldIncludeKey:F,maxPatchKeys:m,maxPayloadBytes:h,mergeSiblingThreshold:g,mergeSiblingMaxInflationRatio:v,mergeSiblingMaxParentBytes:y,mergeSiblingSkipArray:b,elevateTopKeyThreshold:A,toPlainMaxDepth:j,toPlainMaxKeys:P,debug:D,debugWhen:O,debugSampleRate:k,runTracker:()=>ne?.(),isMounted:()=>s}),ie=()=>re.job(V),ae=e=>re.mutationRecorder(e,V);ne=T(()=>{me(t),Object.keys(t).forEach(e=>{let n=t[e];q(n)?n.value:K(n)&&me(n)})},{lazy:!0,scheduler:()=>a(ie)}),ie(),c.push(()=>_(ne)),f===`patch`&&(fe(t,{shouldIncludeTopKey:F,maxDepth:w,maxKeys:E}),M(ae),c.push(()=>N(ae)),c.push(()=>pe(t)));function oe(e,t,n){let r=Ue(e,(e,n)=>t(e,n),n);return c.push(r),()=>{r();let e=c.indexOf(r);e>=0&&c.splice(e,1)}}return{get state(){return t},get proxy(){return te},get methods(){return I},get computed(){return ee},get adapter(){return B},bindModel:Ct(te,t,L,R),watch:oe,snapshot:()=>re.snapshot(),unmount:()=>{s&&(s=!1,c.forEach(e=>{try{e()}catch{}}),c.length=0)}}},use(e,...t){if(!e||f.has(e))return m;if(f.add(e),typeof e==`function`)e(m,...t);else if(typeof e.install==`function`)e.install(m,...t);else throw TypeError(`插件必须是函数,或包含 install 方法的对象`);return m},config:p};if(typeof globalThis.App==`function`){let e=globalThis,t=e.__wxConfig!==void 0,n=`__wevuAppRegistered`;(!t||!e[n])&&(t&&(e[n]=!0),tr(m,i??{},s,c,l))}return m}function lr(e,t,n){let r=e.properties,i=n??(r&&typeof r==`object`?r:void 0),a=e=>{let t={...e??{}};return Object.prototype.hasOwnProperty.call(t,`__wvSlotOwnerId`)||(t.__wvSlotOwnerId={type:String,value:``}),Object.prototype.hasOwnProperty.call(t,`__wvSlotScope`)||(t.__wvSlotScope={type:null,value:null}),t};if(i||!t){let{properties:t,...n}=e;return{...n,properties:a(i)}}let o={};return Object.entries(t).forEach(([e,t])=>{if(t!=null){if(Array.isArray(t)||typeof t==`function`){o[e]={type:t};return}if(typeof t==`object`){if(e.endsWith(`Modifiers`)&&Object.keys(t).length===0){o[e]={type:Object,value:{}};return}let n={};`type`in t&&t.type!==void 0&&(n.type=t.type);let r=`default`in t?t.default:t.value;r!==void 0&&(n.value=typeof r==`function`?r():r),o[e]=n}}}),{...e,properties:a(o)}}function ur(e){return e.replace(/&amp;/g,`&`).replace(/&quot;/g,`"`).replace(/&#34;/g,`"`).replace(/&apos;/g,`'`).replace(/&#39;/g,`'`).replace(/&lt;/g,`<`).replace(/&gt;/g,`>`)}function dr(e){let t=e?.currentTarget?.dataset?.wvArgs??e?.target?.dataset?.wvArgs,n=[];if(typeof t==`string`)try{n=JSON.parse(t)}catch{try{n=JSON.parse(ur(t))}catch{n=[]}}return Array.isArray(n)||(n=[]),n.map(t=>t===`$event`?e:t)}function fr(e){if(!e||typeof e!=`object`)return{};if(Array.isArray(e)){let t={};for(let n=0;n<e.length;n+=2){let r=e[n];typeof r==`string`&&r&&(t[r]=e[n+1])}return t}return e}function pr(e,t){let n=Object.prototype.hasOwnProperty.call(t??{},`__wvSlotScope`)?t.__wvSlotScope:e?.properties?.__wvSlotScope,r=Object.prototype.hasOwnProperty.call(t??{},`__wvSlotProps`)?t.__wvSlotProps:e?.properties?.__wvSlotProps,i=fr(n),a=fr(r),o={...i,...a};typeof e?.setData==`function`&&e.setData({__wvSlotPropsData:o})}function mr(e){let t={properties:{__wvOwnerId:{type:String,value:``},__wvSlotProps:{type:null,value:null,observer(e){pr(this,{__wvSlotProps:e})}},__wvSlotScope:{type:null,value:null,observer(e){pr(this,{__wvSlotScope:e})}}},data:()=>({__wvOwner:{},__wvSlotPropsData:{}}),lifetimes:{attached(){let e=this.properties?.__wvOwnerId??``;if(pr(this),!e)return;let t=(e,t)=>{this.__wvOwnerProxy=t,typeof this.setData==`function`&&this.setData({__wvOwner:e||{}})};this.__wvOwnerUnsub=Dn(e,t);let n=kn(e);n&&t(n,On(e))},detached(){typeof this.__wvOwnerUnsub==`function`&&this.__wvOwnerUnsub(),this.__wvOwnerUnsub=void 0,this.__wvOwnerProxy=void 0}},methods:{__weapp_vite_owner(e){let t=e?.currentTarget?.dataset?.wvHandler??e?.target?.dataset?.wvHandler;if(typeof t!=`string`||!t)return;let n=this.__wvOwnerProxy,r=n?.[t];if(typeof r!=`function`)return;let i=dr(e);return r.apply(n,i)}}};return e?.computed&&Object.keys(e.computed).length>0&&(t.computed=e.computed),t}function hr(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function gr(e){return typeof e!=`object`||!e||q(e)||K(e)||Array.isArray(e)?!0:hr(e)}function _r(e,t,n){let r=e?.methods??Object.create(null),i=e?.state??Object.create(null),a=K(i)?G(i):i;if(e&&!e.methods)try{e.methods=r}catch{}if(e&&!e.state)try{e.state=i}catch{}Object.keys(n).forEach(o=>{let s=n[o];if(typeof s==`function`)r[o]=(...t)=>s.apply(e?.proxy??e,t);else if(s===t||!gr(s))try{Object.defineProperty(a,o,{value:s,configurable:!0,enumerable:!1,writable:!0})}catch{i[o]=s}else i[o]=s}),e&&(e.methods=e.methods??r,e.state=e.state??i)}let vr;function yr(){let e=typeof globalThis<`u`?globalThis:void 0;if(!e)return;let t=e;!t.__weapp_vite_createScopedSlotComponent&&vr&&(t.__weapp_vite_createScopedSlotComponent=vr)}function br(e){yr();let{data:t,computed:n,methods:r,setData:i,watch:a,setup:o,props:s,...c}=Nt(e),l=cr({data:t,computed:n,methods:r,setData:i,[wt]:`component`}),u=(e,t)=>{let n=Jn(o,e,t);return n&&t&&_r(t.runtime,t.instance,n),n},d=lr(c,s),f={data:t,computed:n,methods:r,setData:i,watch:a,setup:u,mpOptions:d};return sr(l,r??{},a,u,d),{__wevu_runtime:l,__wevu_options:f}}function xr(e){yr();let{properties:t,props:n,...r}=e;br(lr(r,n,t))}function Sr(e){xr(mr(e))}vr=Sr,yr();const Cr=Symbol(`wevu.provideScope`),wr=new Map;function Tr(e,t){let n=It();if(n){let r=n[Cr];r||(r=new Map,n[Cr]=r),r.set(e,t)}else wr.set(e,t)}function Er(e,t){let n=It();if(n){let t=n;for(;t;){let n=t[Cr];if(n&&n.has(e))return n.get(e);t=null}}if(wr.has(e))return wr.get(e);if(arguments.length>=2)return t;throw Error(`wevu.inject:未找到对应 key 的值`)}function Dr(e,t){wr.set(e,t)}function Or(e,t){if(wr.has(e))return wr.get(e);if(arguments.length>=2)return t;throw Error(`injectGlobal():未找到对应 key 的 provider:${String(e)}`)}const kr=/\B([A-Z])/g;function Ar(e){return e?e.startsWith(`--`)?e:e.replace(kr,`-$1`).toLowerCase():``}function jr(e,t){if(!t)return e;if(!e)return t;let n=e;n.endsWith(`;`)||(n+=`;`);let r=t.startsWith(`;`)?t.slice(1):t;return n+r}function Mr(e){let t=``;for(let n of Object.keys(e)){let r=e[n];if(r==null)continue;let i=Ar(n);if(Array.isArray(r))for(let e of r)e!=null&&(t=jr(t,`${i}:${e}`));else t=jr(t,`${i}:${r}`)}return t}function Nr(e){if(e==null)return``;if(typeof e==`string`)return e;if(Array.isArray(e)){let t=``;for(let n of e){let e=Nr(n);e&&(t=jr(t,e))}return t}return typeof e==`object`?Mr(e):``}function Pr(e){let t=``;if(!e)return t;if(typeof e==`string`)return e;if(Array.isArray(e)){for(let n of e){let e=Pr(n);e&&(t+=`${e} `)}return t.trim()}if(typeof e==`object`){for(let n of Object.keys(e))e[n]&&(t+=`${n} `);return t.trim()}return t}function Fr(){let e=Rt();if(!e)throw Error(`useAttrs() 必须在 setup() 的同步阶段调用`);return e.attrs??{}}function Ir(){let e=Rt();if(!e)throw Error(`useSlots() 必须在 setup() 的同步阶段调用`);return e.slots??Object.create(null)}function Lr(e){let t=e.__wevuTemplateRefMap;if(t)return t;let n=new Map;try{Object.defineProperty(e,`__wevuTemplateRefMap`,{value:n,configurable:!0,enumerable:!1,writable:!1})}catch{e.__wevuTemplateRefMap=n}return n}function Rr(e){let t=It();if(!t)throw Error(`useTemplateRef() 必须在 setup() 的同步阶段调用`);let n=typeof e==`string`?e.trim():``;if(!n)throw Error(`useTemplateRef() 需要传入有效的模板 ref 名称`);let r=Lr(t),i=r.get(n);if(i)return i;let a=Pe(null);return r.set(n,a),a}function zr(e,t){let n=Rt();if(!n)throw Error(`useModel() 必须在 setup() 的同步阶段调用`);let r=n.emit,i=`update:${t}`;return je({get:()=>e?.[t],set:e=>{r?.(i,e)}})}function Br(e){let t=It();if(!t?.__wevu||typeof t.__wevu.bindModel!=`function`)throw Error(`useBindModel() 必须在 setup() 的同步阶段调用`);let n=t.__wevu.bindModel.bind(t.__wevu),r=((t,r)=>e?n(t,{...e,...r}):n(t,r));return r.model=(e,t)=>r(e).model(t),r.value=(t,n)=>{let i={...e,...n}?.valueProp??`value`;return r.model(t,n)[i]},r.on=(t,n)=>{let i=`on${_t({...e,...n}?.event??`input`)}`;return r.model(t,n)[i]},r}function Vr(e,t){return e==null?t:t==null?e:Array.isArray(e)&&Array.isArray(t)?Array.from(new Set([...e,...t])):typeof e==`object`&&typeof t==`object`?{...e,...t}:t}function Hr(e,t,n,r){return function(...i){let a=[],o=[],s=e=>a.push(e),c=e=>o.push(e);r.forEach(n=>{try{n({name:t,store:e,args:i,after:s,onError:c})}catch{}});let l;try{l=n.apply(e,i)}catch(e){throw o.forEach(t=>t(e)),e}let u=e=>(a.forEach(t=>t(e)),e);return l&&typeof l.then==`function`?l.then(e=>u(e),e=>(o.forEach(t=>t(e)),Promise.reject(e))):u(l)}}function Ur(e){return typeof e==`object`&&!!e}function Wr(e,t){for(let n in t)e[n]=t[n]}function Gr(e,t,n,r){let i={$id:e};Object.defineProperty(i,`$state`,{get(){return t},set(e){t&&Ur(e)&&(Wr(t,e),n(`patch object`))}}),i.$patch=e=>{if(!t){typeof e==`function`?(e(i),n(`patch function`)):(Wr(i,e),n(`patch object`));return}typeof e==`function`?(e(t),n(`patch function`)):(Wr(t,e),n(`patch object`))},r&&(i.$reset=()=>r());let a=new Set;i.$subscribe=(e,t)=>(a.add(e),()=>a.delete(e));let o=new Set;return i.$onAction=e=>(o.add(e),()=>o.delete(e)),{api:i,subs:a,actionSubs:o}}function Kr(){let e={_stores:new Map,_plugins:[],install(e){},use(t){return typeof t==`function`&&e._plugins.push(t),e}};return Kr._instance=e,e}function qr(e,t){let n,r=!1,i=Kr._instance;return function(){if(r&&n)return n;if(r=!0,typeof t==`function`){let r=t(),a=()=>{},o=Gr(e,void 0,e=>a(e));a=t=>{o.subs.forEach(r=>{try{r({type:t,storeId:e},n)}catch{}})},n=Object.assign({},r);for(let e of Object.getOwnPropertyNames(o.api)){let t=Object.getOwnPropertyDescriptor(o.api,e);t&&Object.defineProperty(n,e,t)}Object.keys(r).forEach(e=>{let t=r[e];typeof t==`function`&&!e.startsWith(`$`)&&(n[e]=Hr(n,e,t,o.actionSubs))});let s=i?._plugins??[];for(let e of s)try{e({store:n})}catch{}return n}let a=t,o=a.state?a.state():{},s=xe(o),c={...G(o)},l=()=>{},u=Gr(e,s,e=>l(e),()=>{Wr(s,c),l(`patch object`)});l=t=>{u.subs.forEach(n=>{try{n({type:t,storeId:e},s)}catch{}})};let d={};for(let e of Object.getOwnPropertyNames(u.api)){let t=Object.getOwnPropertyDescriptor(u.api,e);t&&Object.defineProperty(d,e,t)}let f=a.getters??{},p={};Object.keys(f).forEach(e=>{let t=f[e];if(typeof t==`function`){let n=Me(()=>t.call(d,s));p[e]=n,Object.defineProperty(d,e,{enumerable:!0,configurable:!0,get(){return n.value}})}});let m=a.actions??{};Object.keys(m).forEach(e=>{let t=m[e];typeof t==`function`&&(d[e]=Hr(d,e,(...e)=>t.apply(d,e),u.actionSubs))}),Object.keys(s).forEach(e=>{Object.defineProperty(d,e,{enumerable:!0,configurable:!0,get(){return s[e]},set(t){s[e]=t}})}),n=d;let h=i?._plugins??[];for(let e of h)try{e({store:n})}catch{}return n}}function Jr(e){let t={};for(let n in e){let r=e[n];if(typeof r==`function`){t[n]=r;continue}q(r)?t[n]=r:t[n]=Me({get:()=>e[n],set:t=>{e[n]=t}})}return t}export{M as addMutationRecorder,h as batch,Q as callHookList,Vt as callHookReturn,bn as callUpdateHooks,Me as computed,cr as createApp,Kr as createStore,xr as createWevuComponent,Sr as createWevuScopedSlotComponent,br as defineComponent,qr as defineStore,T as effect,b as effectScope,m as endBatch,It as getCurrentInstance,x as getCurrentScope,Rt as getCurrentSetupContext,He as getDeepWatchStrategy,ve as getReactiveVersion,Er as inject,Or as injectGlobal,Xe as isNoSetData,we as isRaw,K as isReactive,q as isRef,_e as isShallowReactive,Fe as isShallowRef,J as markNoSetData,Ce as markRaw,Vr as mergeModels,Qn as mountRuntimeInstance,o as nextTick,Pr as normalizeClass,Nr as normalizeStyle,_n as onActivated,ln as onAddToFavorites,mn as onBeforeMount,fn as onBeforeUnmount,hn as onBeforeUpdate,vn as onDeactivated,an as onError,gn as onErrorCaptured,Jt as onHide,Ht as onLaunch,qt as onLoad,un as onMounted,rn as onMoved,Ut as onPageNotFound,$t as onPageScroll,Zt as onPullDownRefresh,Qt as onReachBottom,Xt as onReady,nn as onResize,en as onRouteDone,on as onSaveExitState,S as onScopeDispose,yn as onServerPrefetch,sn as onShareAppMessage,cn as onShareTimeline,Kt as onShow,tn as onTabItemTap,Gt as onThemeChange,Wt as onUnhandledRejection,Yt as onUnload,pn as onUnmounted,dn as onUpdated,fe as prelinkReactiveTree,Tr as provide,Dr as provideGlobal,xe as reactive,Ne as readonly,Oe as ref,tr as registerApp,sr as registerComponent,N as removeMutationRecorder,jt as resetWevuDefaults,Jn as runSetupFunction,Lt as setCurrentInstance,zt as setCurrentSetupContext,Ve as setDeepWatchStrategy,At as setWevuDefaults,ge as shallowReactive,Pe as shallowRef,f as startBatch,_ as stop,Jr as storeToRefs,er as teardownRuntimeInstance,G as toRaw,Le as toRef,Re as toRefs,me as touchReactive,ze as traverse,Ie as triggerRef,ke as unref,Fr as useAttrs,Br as useBindModel,zr as useModel,Ir as useSlots,Rr as useTemplateRef,Ue as watch,We as watchEffect};
1
+ const e=Promise.resolve(),t=new Set;let n=!1,r=!1;function i(){r=!1,n=!0;try{t.forEach(e=>e())}finally{t.clear(),n=!1}}function a(a){t.add(a),!n&&!r&&(r=!0,e.then(i))}function o(t){return t?e.then(t):e}const s=new WeakMap;let c=null;const l=[];let u=0;const d=new Set;function f(){u++}function p(){for(;d.size;){let e=Array.from(d);d.clear();for(let t of e)t()}}function m(){u!==0&&(u--,u===0&&p())}function h(e){f();try{return e()}finally{m()}}function g(e){let{deps:t}=e;for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}function _(e){e.active&&(e.active=!1,g(e),e.onStop?.())}let v;var y=class{active=!0;effects=[];cleanups=[];parent;scopes;constructor(e=!1){this.detached=e,!e&&v&&(this.parent=v,(v.scopes||=[]).push(this))}run(e){if(!this.active)return;let t=v;v=this;try{return e()}finally{v=t}}stop(){if(this.active){this.active=!1;for(let e of this.effects)_(e);this.effects.length=0;for(let e of this.cleanups)e();if(this.cleanups.length=0,this.scopes){for(let e of this.scopes)e.stop();this.scopes.length=0}if(this.parent?.scopes){let e=this.parent.scopes.indexOf(this);e>=0&&this.parent.scopes.splice(e,1)}this.parent=void 0}}};function b(e=!1){return new y(e)}function x(){return v}function S(e){v?.active&&v.cleanups.push(e)}function ee(e){v?.active&&v.effects.push(e)}function C(e,t={}){let n=function(){if(!n.active||n._running)return e();g(n);try{return n._running=!0,l.push(n),c=n,e()}finally{l.pop(),c=l[l.length-1]??null,n._running=!1}};return n.deps=[],n.scheduler=t.scheduler,n.onStop=t.onStop,n.active=!0,n._running=!1,n._fn=e,n}function w(e,t={}){let n=C(e,t);return ee(n),t.lazy||n(),n}function T(e,t){if(!c)return;let n=s.get(e);n||(n=new Map,s.set(e,n));let r=n.get(t);r||(r=new Set,n.set(t,r)),r.has(c)||(r.add(c),c.deps.push(r))}function E(e){if(e.scheduler){e.scheduler();return}if(u>0){d.add(e);return}e()}function D(e,t){let n=s.get(e);if(!n)return;let r=n.get(t);if(!r)return;let i=new Set;r.forEach(e=>{e!==c&&i.add(e)}),i.forEach(E)}function O(e){c&&(e.has(c)||(e.add(c),c.deps.push(e)))}function k(e){new Set(e).forEach(E)}const A=new Set;function j(e){A.add(e)}function te(e){A.delete(e)}const M=new WeakMap,N=new WeakMap,P=new WeakMap,F=new WeakMap,I=new WeakSet,L=new WeakMap,ne=new WeakMap;function re(e){let t=ne.get(e);return t||(t=new Set,ne.set(e,t)),t}function R(e,t){re(e).add(t)}function z(e){N.set(e,(N.get(e)??0)+1)}function ie(e){return N.get(e)??0}function ae(e){let t=new Set,n=[e];for(let e=0;e<2e3&&n.length;e++){let e=n.pop(),r=F.get(e);if(r)for(let e of r.keys())t.has(e)||(t.add(e),z(e),n.push(e))}}function oe(e){let t=F.get(e);if(!t){I.delete(e),P.delete(e);return}let n,r,i=0;for(let[e,a]of t){for(let t of a){if(i+=1,i>1)break;n=e,r=t}if(i>1)break}if(i===1&&n&&r){I.delete(e),P.set(e,{parent:n,key:r});return}I.add(e),P.delete(e)}function se(e,t,n){if(typeof n!=`string`){I.add(e),P.delete(e);return}if(A.size){let n=M.get(t)??t;R(n,t),R(n,e)}let r=F.get(e);r||(r=new Map,F.set(e,r));let i=r.get(t);i||(i=new Set,r.set(t,i)),i.add(n),oe(e)}function ce(e,t,n){let r=F.get(e);if(!r)return;let i=r.get(t);i&&(i.delete(n),i.size||r.delete(t),r.size||F.delete(e),oe(e))}function le(e,t){if(t===e)return[];if(I.has(t))return;let n=[],r=t;for(let t=0;t<2e3;t++){if(r===e)return n.reverse();if(I.has(r))return;let t=P.get(r);if(!t||typeof t.key!=`string`)return;n.push(t.key),r=t.parent}}let B=function(e){return e.IS_REACTIVE=`__r_isReactive`,e.RAW=`__r_raw`,e.SKIP=`__r_skip`,e}({});function V(e){return typeof e==`object`&&!!e}const H=Symbol(`wevu.version`);function ue(e){if(!e)return!1;let t=e.charCodeAt(0);if(t<48||t>57)return!1;let n=Number(e);return Number.isInteger(n)&&n>=0&&String(n)===e}function U(e){return e?.[B.RAW]??e}const de=new WeakMap,fe=new WeakMap,pe=new WeakMap;function me(e,t){let n=U(e);L.set(n,``),R(n,n);let r=t?.shouldIncludeTopKey,i=typeof t?.maxDepth==`number`?Math.max(0,Math.floor(t.maxDepth)):1/0,a=typeof t?.maxKeys==`number`?Math.max(0,Math.floor(t.maxKeys)):1/0,o=new WeakSet,s=[{current:n,path:``,depth:0}],c=0;for(;s.length;){let e=s.pop();if(o.has(e.current)||(o.add(e.current),L.set(e.current,e.path),R(n,e.current),c+=1,c>=a)||e.depth>=i||Array.isArray(e.current))continue;let t=Object.entries(e.current);for(let[i,a]of t){if(e.path===``&&r&&!r(i)||!V(a)||a[B.SKIP])continue;let t=U(a);if(M.has(t)||M.set(t,n),se(t,e.current,i),!I.has(t)){let n=e.path?`${e.path}.${i}`:i;L.set(t,n)}R(n,t),s.push({current:t,path:e.path?`${e.path}.${i}`:i,depth:e.depth+1})}}}function he(e){let t=U(e),n=ne.get(t);if(!n){L.delete(t);return}for(let e of n)P.delete(e),F.delete(e),L.delete(e),I.delete(e),M.delete(e),N.delete(e);ne.delete(t)}function W(e){T(U(e),H)}const ge={get(e,t,n){if(t===B.IS_REACTIVE)return!0;if(t===B.RAW)return e;let r=Reflect.get(e,t,n);return T(e,t),r},set(e,t,n,r){let i=Reflect.get(e,t,r),a=Reflect.set(e,t,n,r);return Object.is(i,n)||(D(e,t),D(e,H),z(e)),a},deleteProperty(e,t){let n=Object.prototype.hasOwnProperty.call(e,t),r=Reflect.deleteProperty(e,t);return n&&r&&(D(e,t),D(e,H),z(e)),r},ownKeys(e){return T(e,Symbol.iterator),T(e,H),Reflect.ownKeys(e)}};function _e(e){if(!V(e))return e;let t=pe.get(e);if(t)return t;if(e[B.IS_REACTIVE])return e;let n=new Proxy(e,ge);return pe.set(e,n),fe.set(n,e),N.has(e)||N.set(e,0),n}function ve(e){let t=U(e);return pe.has(t)}function ye(e){return ie(U(e))}function be(e,t,n){if(!A.size||typeof t!=`string`||t.startsWith(`__r_`))return;let r=M.get(e)??e,i=Array.isArray(e)&&(t===`length`||ue(t))?`array`:`property`,a=le(r,e);if(!a){let a=new Set,o=F.get(e);if(o)for(let[e,t]of o){let n=L.get(e),i=n?n.split(`.`,1)[0]:void 0,o=i?void 0:le(r,e)?.[0];for(let e of t)typeof e==`string`&&a.add(i??o??e)}else a.add(t);for(let e of A)e({root:r,kind:i,op:n,path:void 0,fallbackTopKeys:a.size?Array.from(a):void 0});return}let o=a.findIndex(e=>ue(e));if(o!==-1){let e=a.slice(0,o).join(`.`)||void 0;for(let t of A)t({root:r,kind:`array`,op:n,path:e});return}let s=a.length?a.join(`.`):``,c=i===`array`?s||void 0:s?`${s}.${t}`:t;for(let e of A)e({root:r,kind:i,op:n,path:c})}const xe={get(e,t,n){if(t===B.IS_REACTIVE)return!0;if(t===B.RAW)return e;let r=Reflect.get(e,t,n);if(T(e,t),V(r)){if(r[B.SKIP])return r;let n=M.get(e)??e,i=r?.[B.RAW]??r;M.has(i)||M.set(i,n),se(i,e,t);let a=L.get(e);if(A.size&&typeof t==`string`&&a!=null&&!I.has(i)){let e=a?`${a}.${t}`:t;L.set(i,e)}return Se(r)}return r},set(e,t,n,r){let i=Array.isArray(e),a=i?e.length:0,o=Reflect.get(e,t,r),s=Reflect.set(e,t,n,r);if(!Object.is(o,n)){let r=V(o)?o?.[B.RAW]??o:void 0;if(r&&ce(r,e,t),V(n)&&!n[B.SKIP]){let r=M.get(e)??e,i=n?.[B.RAW]??n;M.has(i)||M.set(i,r),se(i,e,t);let a=L.get(e);if(A.size&&typeof t==`string`&&a!=null&&!I.has(i)){let e=a?`${a}.${t}`:t;L.set(i,e)}}D(e,t),i&&typeof t==`string`&&ue(t)&&Number(t)>=a&&D(e,`length`),D(e,H),z(e),ae(e);let s=M.get(e);s&&s!==e&&(D(s,H),z(s)),be(e,t,`set`)}return s},deleteProperty(e,t){let n=Object.prototype.hasOwnProperty.call(e,t),r=n?e[t]:void 0,i=Reflect.deleteProperty(e,t);if(n&&i){let n=V(r)?r?.[B.RAW]??r:void 0;n&&ce(n,e,t),D(e,t),D(e,H),z(e),ae(e);let i=M.get(e);i&&i!==e&&(D(i,H),z(i)),be(e,t,`delete`)}return i},ownKeys(e){return T(e,Symbol.iterator),T(e,H),Reflect.ownKeys(e)}};function Se(e){if(!V(e))return e;let t=de.get(e);if(t)return t;if(e[B.IS_REACTIVE])return e;let n=new Proxy(e,xe);return de.set(e,n),fe.set(n,e),N.has(e)||N.set(e,0),M.has(e)||M.set(e,e),n}function G(e){return!!(e&&e[B.IS_REACTIVE])}function Ce(e){return V(e)?Se(e):e}function we(e){return V(e)&&Object.defineProperty(e,B.SKIP,{value:!0,configurable:!0,enumerable:!1,writable:!0}),e}function Te(e){return V(e)&&B.SKIP in e}const Ee=`__v_isRef`;function De(e){try{Object.defineProperty(e,Ee,{value:!0,configurable:!0})}catch{e[Ee]=!0}return e}function K(e){return!!(e&&typeof e==`object`&&e[Ee]===!0)}var Oe=class{_value;_rawValue;dep;constructor(e){De(this),this._rawValue=e,this._value=Ce(e)}get value(){return this.dep||=new Set,O(this.dep),this._value}set value(e){Object.is(e,this._rawValue)||(this._rawValue=e,this._value=Ce(e),this.dep&&k(this.dep))}};function ke(e){return K(e)?e:we(new Oe(e))}function Ae(e){return K(e)?e.value:e}var je=class{_getValue;_setValue;dep;constructor(e,t){De(this);let n=t,r=()=>{this.dep||=new Set,O(this.dep)},i=()=>{this.dep&&k(this.dep)},a=e=>e===void 0&&n!==void 0?n:e;if(typeof e==`function`){let t=e(r,i);this._getValue=()=>a(t.get()),this._setValue=e=>t.set(e);return}let o=e;this._getValue=()=>(r(),a(o.get())),this._setValue=e=>{o.set(e),i()}}get value(){return this._getValue()}set value(e){this._setValue(e)}};function Me(e,t){return we(new je(e,t))}function Ne(e){let t,n;typeof e==`function`?(t=e,n=()=>{throw Error(`计算属性是只读的`)}):(t=e.get,n=e.set);let r,i=!0,a,o={get value(){return i&&=(r=a(),!1),T(o,`value`),r},set value(e){n(e)}};return De(o),a=w(t,{lazy:!0,scheduler:()=>{i||(i=!0,D(o,`value`))}}),o}function Pe(e){if(K(e)){let t=e;return De({get value(){return t.value},set value(e){throw Error(`无法给只读 ref 赋值`)}})}return V(e)?new Proxy(e,{set(){throw Error(`无法在只读对象上设置属性`)},deleteProperty(){throw Error(`无法在只读对象上删除属性`)},defineProperty(){throw Error(`无法在只读对象上定义属性`)},get(e,t,n){return Reflect.get(e,t,n)}}):e}function Fe(e,t){return Me((t,n)=>({get(){return t(),e},set(t){Object.is(e,t)||(e=t,n())}}),t)}function Ie(e){return K(e)&&typeof e.value!=`function`}function Le(e){if(K(e)){let t=e.dep;if(t){k(t);return}e.value=e.value}}function Re(e,t,n){let r=e[t];return K(r)?r:Me((n,r)=>({get(){return n(),e[t]},set(n){e[t]=n,r()}}),n)}function ze(e){G(e)||console.warn(`toRefs() 需要响应式对象,但收到的是普通对象。`);let t=Array.isArray(e)?Array.from({length:e.length}):{};for(let n in e)t[n]=Re(e,n);return t}function Be(e,t=new Set){if(!V(e)||t.has(e))return e;for(let n in t.add(e),e)Be(e[n],t);return e}let Ve=`version`;function He(e){Ve=e}function Ue(){return Ve}function We(e,t,n={}){let r,i=G(e),o=Array.isArray(e)&&!i,s=e=>{if(typeof e==`function`)return e();if(K(e))return e.value;if(G(e))return e;throw Error(`无效的 watch 源`)};if(o){let t=e;r=()=>t.map(e=>s(e))}else if(typeof e==`function`)r=e;else if(K(e))r=()=>e.value;else if(i)r=()=>e;else throw Error(`无效的 watch 源`);let c=o?e.some(e=>G(e)):i;if(n.deep??c){let e=r;r=()=>{let t=e();return o&&Array.isArray(t)?t.map(e=>Ve===`version`&&G(e)?(W(e),e):Be(e)):Ve===`version`&&G(t)?(W(t),t):Be(t)}}let l,u=e=>{l=e},d,f,p=()=>{if(!f.active)return;let e=f();l?.(),t(e,d,u),d=e};f=w(()=>r(),{scheduler:()=>a(p),lazy:!0}),n.immediate?p():d=f();let m=()=>{l?.(),l=void 0,_(f)};return S(m),m}function Ge(e){let t,n=e=>{t=e},r,i=()=>{r.active&&r()};r=w(()=>{t?.(),t=void 0,e(n)},{lazy:!0,scheduler:()=>a(i)}),r();let o=()=>{t?.(),t=void 0,_(r)};return S(o),o}function Ke(e,t,n){let r=e[t];if(!r)throw Error(`计算属性 "${t}" 是只读的`);r(n)}function qe(e){if(e==null)return e;if(typeof e==`object`){if(`detail`in e&&e.detail&&`value`in e.detail)return e.detail.value;if(`target`in e&&e.target&&`value`in e.target)return e.target.value}return e}function Je(e){let t=Object.create(null),n=Object.create(null),r=new Set;return{computedRefs:t,computedSetters:n,dirtyComputedKeys:r,createTrackedComputed:(t,n,i)=>{let a,o=!0,s,c={get value(){return o&&=(a=s(),!1),T(c,`value`),a},set value(e){if(!i)throw Error(`计算属性是只读的`);i(e)}};return De(c),s=w(n,{lazy:!0,scheduler:()=>{o||(o=!0,e.setDataStrategy===`patch`&&e.includeComputed&&r.add(t),D(c,`value`))}}),c},computedProxy:new Proxy({},{get(e,n){if(typeof n==`string`&&t[n])return t[n].value},has(e,n){return typeof n==`string`&&!!t[n]},ownKeys(){return Object.keys(t)},getOwnPropertyDescriptor(e,n){if(typeof n==`string`&&t[n])return{configurable:!0,enumerable:!0,value:t[n].value}}})}}function Ye(e){let{state:t,computedDefs:n,methodDefs:r,appConfig:i,includeComputed:a,setDataStrategy:o}=e,s={},{computedRefs:c,computedSetters:l,dirtyComputedKeys:u,createTrackedComputed:d,computedProxy:f}=Je({includeComputed:a,setDataStrategy:o}),p=new Proxy(t,{get(e,n,r){if(typeof n==`string`){if(n===`$state`)return t;if(n===`$computed`)return f;if(Object.prototype.hasOwnProperty.call(s,n))return s[n];if(c[n])return c[n].value;if(Object.prototype.hasOwnProperty.call(i.globalProperties,n))return i.globalProperties[n]}return Reflect.get(e,n,r)},set(e,t,n,r){return typeof t==`string`&&c[t]?(Ke(l,t,n),!0):Reflect.set(e,t,n,r)},has(e,t){return typeof t==`string`&&(c[t]||Object.prototype.hasOwnProperty.call(s,t))?!0:Reflect.has(e,t)},ownKeys(e){let t=new Set;return Reflect.ownKeys(e).forEach(e=>{t.add(e)}),Object.keys(s).forEach(e=>t.add(e)),Object.keys(c).forEach(e=>t.add(e)),Array.from(t)},getOwnPropertyDescriptor(e,t){if(Reflect.has(e,t))return Object.getOwnPropertyDescriptor(e,t);if(typeof t==`string`){if(c[t])return{configurable:!0,enumerable:!0,get(){return c[t].value},set(e){Ke(l,t,e)}};if(Object.prototype.hasOwnProperty.call(s,t))return{configurable:!0,enumerable:!1,value:s[t]}}}});return Object.keys(r).forEach(e=>{let t=r[e];typeof t==`function`&&(s[e]=(...e)=>t.apply(p,e))}),Object.keys(n).forEach(e=>{let t=n[e];if(typeof t==`function`)c[e]=d(e,()=>t.call(p));else{let n=t.get?.bind(p);if(!n)throw Error(`计算属性 "${e}" 需要提供 getter`);let r=t.set?.bind(p);r?(l[e]=r,c[e]=d(e,n,r)):c[e]=d(e,n)}}),{boundMethods:s,computedRefs:c,computedSetters:l,dirtyComputedKeys:u,computedProxy:f,publicInstance:p}}const Xe=Symbol(`wevu.noSetData`);function q(e){return Object.defineProperty(e,Xe,{value:!0,configurable:!0,enumerable:!1,writable:!1}),e}function Ze(e){return typeof e==`object`&&!!e&&e[Xe]===!0}function Qe(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function J(e,t=new WeakMap,n){let r=Ae(e);if(typeof r==`bigint`){let e=Number(r);return Number.isSafeInteger(e)?e:r.toString()}if(typeof r==`symbol`)return r.toString();if(typeof r==`function`)return;if(typeof r!=`object`||!r)return r;if(Ze(r))return;let i=G(r)?U(r):r,a=n?._depth??(typeof n?.maxDepth==`number`?Math.max(0,Math.floor(n.maxDepth)):1/0),o=n?._budget??(typeof n?.maxKeys==`number`?{keys:Math.max(0,Math.floor(n.maxKeys))}:{keys:1/0});if(a<=0||o.keys<=0)return i;let s=n?.cache;if(s){let e=ye(i),t=s.get(i);if(t&&t.version===e)return t.value}if(t.has(i))return t.get(i);if(i instanceof Date)return i.getTime();if(i instanceof RegExp)return i.toString();if(i instanceof Map){let e=[];return t.set(i,e),i.forEach((n,r)=>{e.push([J(r,t),J(n,t)])}),e}if(i instanceof Set){let e=[];return t.set(i,e),i.forEach(n=>{e.push(J(n,t))}),e}if(typeof ArrayBuffer<`u`){if(i instanceof ArrayBuffer)return i.byteLength;if(ArrayBuffer.isView(i)){let e=i;if(typeof e[Symbol.iterator]==`function`){let n=Array.from(e);return t.set(i,n),n.map(e=>J(e,t))}let n=Array.from(new Uint8Array(e.buffer,e.byteOffset,e.byteLength));return t.set(i,n),n}}if(i instanceof Error)return{name:i.name,message:i.message};if(Array.isArray(i)){let e=[];return t.set(i,e),i.forEach((r,i)=>{let s=J(r,t,{...n,_depth:a-1,_budget:o});e[i]=s===void 0?null:s}),s&&s.set(i,{version:ye(i),value:e}),e}let c={};return t.set(i,c),Object.keys(i).forEach(e=>{if(--o.keys,o.keys<=0)return;let r=J(i[e],t,{...n,_depth:a-1,_budget:o});r!==void 0&&(c[e]=r)}),s&&s.set(i,{version:ye(i),value:c}),c}function $e(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function et(e,t,n){let r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(let i of r)if(!Object.prototype.hasOwnProperty.call(t,i)||!n(e[i],t[i]))return!1;return!0}function tt(e,t){return Object.is(e,t)?!0:Array.isArray(e)&&Array.isArray(t)?$e(e,t,tt):Qe(e)&&Qe(t)?et(e,t,tt):!1}function nt(e){return e===void 0?null:e}function rt(e,t,n,r){if(!tt(e,t)){if(Qe(e)&&Qe(t)){for(let i of Object.keys(t)){if(!Object.prototype.hasOwnProperty.call(e,i)){r[`${n}.${i}`]=nt(t[i]);continue}rt(e[i],t[i],`${n}.${i}`,r)}for(let i of Object.keys(e))Object.prototype.hasOwnProperty.call(t,i)||(r[`${n}.${i}`]=null);return}if(Array.isArray(e)&&Array.isArray(t)){$e(e,t,tt)||(r[n]=nt(t));return}r[n]=nt(t)}}function it(e,t){let n={};for(let r of Object.keys(t))rt(e[r],t[r],r,n);for(let r of Object.keys(e))Object.prototype.hasOwnProperty.call(t,r)||(n[r]=null);return n}function at(e){let t=Object.keys(e).sort();if(t.length<=1)return e;let n=Object.create(null),r=[];for(let i of t){for(;r.length;){let e=r[r.length-1];if(i.startsWith(e))break;r.pop()}r.length||(n[i]=e[i],r.push(`${i}.`))}return n}function ot(e,t,n){if(t<=0)return t+1;if(e===null)return 4;let r=typeof e;if(r===`string`)return 2+e.length;if(r===`number`)return Number.isFinite(e)?String(e).length:4;if(r===`boolean`)return e?4:5;if(r===`undefined`||r===`function`||r===`symbol`||r!==`object`||n.has(e))return 4;if(n.add(e),Array.isArray(e)){let r=2;for(let i=0;i<e.length;i++)if(i&&(r+=1),r+=ot(e[i],t-r,n),r>t)return r;return r}let i=2;for(let[r,a]of Object.entries(e))if(i>2&&(i+=1),i+=2+r.length+1,i+=ot(a,t-i,n),i>t)return i;return i}function st(e,t){if(t===1/0)return{fallback:!1,estimatedBytes:void 0,bytes:void 0};let n=t,r=Object.keys(e).length,i=ot(e,n+1,new WeakSet);if(i>n)return{fallback:!0,estimatedBytes:i,bytes:void 0};if(i>=n*.85&&r>2)try{let t=JSON.stringify(e).length;return{fallback:t>n,estimatedBytes:i,bytes:t}}catch{return{fallback:!1,estimatedBytes:i,bytes:void 0}}return{fallback:!1,estimatedBytes:i,bytes:void 0}}function ct(e){let{input:t,entryMap:n,getPlainByPath:r,mergeSiblingThreshold:i,mergeSiblingSkipArray:a,mergeSiblingMaxParentBytes:o,mergeSiblingMaxInflationRatio:s}=e;if(!i)return{out:t,merged:0};let c=Object.keys(t);if(c.length<i)return{out:t,merged:0};let l=new Map,u=new Set;for(let e of c){let r=n.get(e);if(!r)continue;if(t[e]===null||r.op===`delete`){let t=e.lastIndexOf(`.`);t>0&&u.add(e.slice(0,t));continue}let i=e.lastIndexOf(`.`);if(i<=0)continue;let a=e.slice(0,i),o=l.get(a)??[];o.push(e),l.set(a,o)}let d=Array.from(l.entries()).filter(([e,t])=>t.length>=i&&!u.has(e)).sort((e,t)=>t[0].split(`.`).length-e[0].split(`.`).length);if(!d.length)return{out:t,merged:0};let f=Object.create(null);Object.assign(f,t);let p=0,m=new WeakMap,h=e=>{if(e&&typeof e==`object`){let t=m.get(e);if(t!==void 0)return t;let n=ot(e,1/0,new WeakSet);return m.set(e,n),n}return ot(e,1/0,new WeakSet)},g=(e,t)=>2+e.length+1+h(t);for(let[e,t]of d){if(Object.prototype.hasOwnProperty.call(f,e))continue;let n=t.filter(e=>Object.prototype.hasOwnProperty.call(f,e));if(n.length<i)continue;let c=r(e);if(!(a&&Array.isArray(c))&&!(o!==1/0&&g(e,c)>o)){if(s!==1/0){let t=0;for(let e of n)t+=g(e,f[e]);if(g(e,c)>t*s)continue}f[e]=c;for(let e of n)delete f[e];p+=1}}return{out:f,merged:p}}function lt(e){return e===void 0?null:e}function ut(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function dt(e,t){if(Object.is(e,t))return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!1;return!0}if(!ut(e)||!ut(t))return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}function ft(e,t,n,r){if(Object.is(e,t))return!0;if(n<=0)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!ft(e[i],t[i],n-1,r))return!1;return!0}if(!ut(e)||!ut(t))return!1;let i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(let a of i)if(--r.keys,r.keys<=0||!Object.prototype.hasOwnProperty.call(t,a)||!ft(e[a],t[a],n-1,r))return!1;return!0}function pt(e,t,n,r){let i=t.split(`.`).filter(Boolean);if(!i.length)return;let a=e;for(let e=0;e<i.length-1;e++){let t=i[e];(!Object.prototype.hasOwnProperty.call(a,t)||a[t]==null||typeof a[t]!=`object`)&&(a[t]=Object.create(null)),a=a[t]}let o=i[i.length-1];if(r===`delete`)try{delete a[o]}catch{a[o]=null}else a[o]=n}function mt(e){let{state:t,computedRefs:n,includeComputed:r,shouldIncludeKey:i,plainCache:a,toPlainMaxDepth:o,toPlainMaxKeys:s}=e,c=new WeakMap,l=Object.create(null),u=Number.isFinite(s)?{keys:s}:void 0,d=G(t)?U(t):t,f=Object.keys(d),p=r?Object.keys(n):[];for(let e of f)i(e)&&(l[e]=J(d[e],c,{cache:a,maxDepth:o,_budget:u}));for(let e of p)i(e)&&(l[e]=J(n[e].value,c,{cache:a,maxDepth:o,_budget:u}));return l}function ht(e){let{state:t,computedRefs:n,dirtyComputedKeys:r,includeComputed:i,computedCompare:a,computedCompareMaxDepth:o,computedCompareMaxKeys:s,currentAdapter:c,shouldIncludeKey:l,maxPatchKeys:u,maxPayloadBytes:d,mergeSiblingThreshold:f,mergeSiblingMaxInflationRatio:p,mergeSiblingMaxParentBytes:m,mergeSiblingSkipArray:h,elevateTopKeyThreshold:g,toPlainMaxDepth:_,toPlainMaxKeys:v,plainCache:y,pendingPatches:b,fallbackTopKeys:x,latestSnapshot:S,latestComputedSnapshot:ee,needsFullSnapshot:C,emitDebug:w,runDiffUpdate:T}=e;if(b.size>u){C.value=!0;let e=b.size;b.clear(),r.clear(),w({mode:`diff`,reason:`maxPatchKeys`,pendingPatchKeys:e,payloadKeys:0}),T(`maxPatchKeys`);return}let E=new WeakMap,D=new Map,O=Object.create(null),k=Array.from(b.entries());if(Number.isFinite(g)&&g>0){let e=new Map;for(let[t]of k){let n=t.split(`.`,1)[0];e.set(n,(e.get(n)??0)+1)}for(let[t,n]of e)n>=g&&x.add(t)}let A=k.filter(([e])=>{for(let t of x)if(e===t||e.startsWith(`${t}.`))return!1;return!0}),j=new Map(A);b.clear();let te=e=>{let n=e.split(`.`).filter(Boolean),r=t;for(let e of n){if(r==null)return r;r=r[e]}return r},M=e=>{if(D.has(e))return D.get(e);let t=lt(J(te(e),E,{cache:y,maxDepth:_,maxKeys:v}));return D.set(e,t),t};if(x.size){for(let e of x)l(e)&&(O[e]=M(e),j.set(e,{kind:`property`,op:`set`}));x.clear()}for(let[e,t]of A){if((t.kind===`array`?`set`:t.op)===`delete`){O[e]=null;continue}O[e]=M(e)}let N=0;if(i&&r.size){let e=Object.create(null),t=Array.from(r);r.clear(),N=t.length;for(let r of t){if(!l(r))continue;let t=J(n[r].value,E,{cache:y,maxDepth:_,maxKeys:v}),i=ee[r];(a===`deep`?ft(i,t,o,{keys:s}):a===`shallow`?dt(i,t):Object.is(i,t))||(e[r]=lt(t),ee[r]=t)}Object.assign(O,e)}let P=at(O),F=0;if(f){let e=ct({input:P,entryMap:j,getPlainByPath:M,mergeSiblingThreshold:f,mergeSiblingSkipArray:h,mergeSiblingMaxParentBytes:m,mergeSiblingMaxInflationRatio:p});F=e.merged,P=at(e.out)}let I=st(P,d),L=I.fallback;if(w({mode:L?`diff`:`patch`,reason:L?`maxPayloadBytes`:`patch`,pendingPatchKeys:A.length,payloadKeys:Object.keys(P).length,mergedSiblingParents:F||void 0,computedDirtyKeys:N||void 0,estimatedBytes:I.estimatedBytes,bytes:I.bytes}),L){C.value=!0,b.clear(),r.clear(),T(`maxPayloadBytes`);return}if(Object.keys(P).length){for(let[e,t]of Object.entries(P)){let n=j.get(e);n?pt(S,e,t,n.kind===`array`?`set`:n.op):pt(S,e,t,`set`)}if(typeof c.setData==`function`){let e=c.setData(P);e&&typeof e.then==`function`&&e.catch(()=>{})}w({mode:`patch`,reason:`patch`,pendingPatchKeys:A.length,payloadKeys:Object.keys(P).length})}}function gt(e){let{state:t,computedRefs:n,dirtyComputedKeys:r,includeComputed:i,setDataStrategy:a,computedCompare:o,computedCompareMaxDepth:s,computedCompareMaxKeys:c,currentAdapter:l,shouldIncludeKey:u,maxPatchKeys:d,maxPayloadBytes:f,mergeSiblingThreshold:p,mergeSiblingMaxInflationRatio:m,mergeSiblingMaxParentBytes:h,mergeSiblingSkipArray:g,elevateTopKeyThreshold:_,toPlainMaxDepth:v,toPlainMaxKeys:y,debug:b,debugWhen:x,debugSampleRate:S,runTracker:ee,isMounted:C}=e,w=new WeakMap,T={},E=Object.create(null),D={value:a===`patch`},O=new Map,k=new Set,A=e=>{if(!b)return;let t=e.reason!==`patch`&&e.reason!==`diff`;if(!(x===`fallback`&&!t)&&!(S<1&&Math.random()>S))try{b(e)}catch{}},j=()=>mt({state:t,computedRefs:n,includeComputed:i,shouldIncludeKey:u,plainCache:w,toPlainMaxDepth:v,toPlainMaxKeys:y}),te=(e=`diff`)=>{let t=j(),o=it(T,t);if(T=t,D.value=!1,O.clear(),a===`patch`&&i){E=Object.create(null);for(let e of Object.keys(n))u(e)&&(E[e]=t[e]);r.clear()}if(Object.keys(o).length){if(typeof l.setData==`function`){let e=l.setData(o);e&&typeof e.then==`function`&&e.catch(()=>{})}A({mode:`diff`,reason:e,pendingPatchKeys:0,payloadKeys:Object.keys(o).length})}};return{job:e=>{C()&&(ee(),a===`patch`&&!D.value?ht({state:t,computedRefs:n,dirtyComputedKeys:r,includeComputed:i,computedCompare:o,computedCompareMaxDepth:s,computedCompareMaxKeys:c,currentAdapter:l,shouldIncludeKey:u,maxPatchKeys:d,maxPayloadBytes:f,mergeSiblingThreshold:p,mergeSiblingMaxInflationRatio:m,mergeSiblingMaxParentBytes:h,mergeSiblingSkipArray:g,elevateTopKeyThreshold:_,toPlainMaxDepth:v,toPlainMaxKeys:y,plainCache:w,pendingPatches:O,fallbackTopKeys:k,latestSnapshot:T,latestComputedSnapshot:E,needsFullSnapshot:D,emitDebug:A,runDiffUpdate:te}):te(D.value?`needsFullSnapshot`:`diff`))},mutationRecorder:(e,t)=>{if(!C()||e.root!==t)return;if(!e.path){if(Array.isArray(e.fallbackTopKeys)&&e.fallbackTopKeys.length)for(let t of e.fallbackTopKeys)k.add(t);else D.value=!0;return}let n=e.path.split(`.`,1)[0];u(n)&&O.set(e.path,{kind:e.kind,op:e.op})},snapshot:()=>a===`patch`?j():{...T},getLatestSnapshot:()=>T}}function _t(e){let t=e?.includeComputed??!0,n=e?.strategy??`diff`,r=typeof e?.maxPatchKeys==`number`?Math.max(0,e.maxPatchKeys):1/0,i=typeof e?.maxPayloadBytes==`number`?Math.max(0,e.maxPayloadBytes):1/0,a=typeof e?.mergeSiblingThreshold==`number`?Math.max(2,Math.floor(e.mergeSiblingThreshold)):0,o=typeof e?.mergeSiblingMaxInflationRatio==`number`?Math.max(0,e.mergeSiblingMaxInflationRatio):1.25,s=typeof e?.mergeSiblingMaxParentBytes==`number`?Math.max(0,e.mergeSiblingMaxParentBytes):1/0,c=e?.mergeSiblingSkipArray??!0,l=e?.computedCompare??(n===`patch`?`deep`:`reference`),u=typeof e?.computedCompareMaxDepth==`number`?Math.max(0,Math.floor(e.computedCompareMaxDepth)):4,d=typeof e?.computedCompareMaxKeys==`number`?Math.max(0,Math.floor(e.computedCompareMaxKeys)):200,f=e?.prelinkMaxDepth,p=e?.prelinkMaxKeys,m=e?.debug,h=e?.debugWhen??`fallback`,g=typeof e?.debugSampleRate==`number`?Math.min(1,Math.max(0,e.debugSampleRate)):1,_=typeof e?.elevateTopKeyThreshold==`number`?Math.max(0,Math.floor(e.elevateTopKeyThreshold)):1/0,v=typeof e?.toPlainMaxDepth==`number`?Math.max(0,Math.floor(e.toPlainMaxDepth)):1/0,y=typeof e?.toPlainMaxKeys==`number`?Math.max(0,Math.floor(e.toPlainMaxKeys)):1/0,b=Array.isArray(e?.pick)&&e.pick.length>0?new Set(e.pick):void 0,x=Array.isArray(e?.omit)&&e.omit.length>0?new Set(e.omit):void 0;return{includeComputed:t,setDataStrategy:n,maxPatchKeys:r,maxPayloadBytes:i,mergeSiblingThreshold:a,mergeSiblingMaxInflationRatio:o,mergeSiblingMaxParentBytes:s,mergeSiblingSkipArray:c,computedCompare:l,computedCompareMaxDepth:u,computedCompareMaxKeys:d,prelinkMaxDepth:f,prelinkMaxKeys:p,debug:m,debugWhen:h,debugSampleRate:g,elevateTopKeyThreshold:_,toPlainMaxDepth:v,toPlainMaxKeys:y,pickSet:b,omitSet:x,shouldIncludeKey:e=>!(b&&!b.has(e)||x&&x.has(e))}}function vt(e){return e?e.charAt(0).toUpperCase()+e.slice(1):``}function yt(e){return e?e.split(`.`).map(e=>e.trim()).filter(Boolean):[]}function bt(e,t,n){let r=e;for(let e=0;e<t.length-1;e++){let n=t[e];(r[n]==null||typeof r[n]!=`object`)&&(r[n]={}),r=r[n]}r[t[t.length-1]]=n}function xt(e,t,n,r,i){if(!r.length)return;let[a,...o]=r;if(!o.length){if(t[a])Ke(n,a,i);else{let t=e[a];K(t)?t.value=i:e[a]=i}return}if(t[a]){Ke(n,a,i);return}(e[a]==null||typeof e[a]!=`object`)&&(e[a]={}),bt(e[a],o,i)}function St(e,t){return t.reduce((e,t)=>e==null?e:e[t],e)}function Ct(e){return qe(e)}function wt(e,t,n,r){return(i,a)=>{let o=yt(i);if(!o.length)throw Error(`bindModel 需要非空路径`);let s=()=>St(e,o),c=e=>{xt(t,n,r,o,e)},l={event:`input`,valueProp:`value`,parser:Ct,formatter:e=>e,...a};return{get value(){return s()},set value(e){c(e)},update(e){c(e)},model(e){let t={...l,...e},n=`on${vt(t.event)}`,r=e=>{c(t.parser(e))};return{[t.valueProp]:t.formatter(s()),[n]:r}}}}}const Tt=`__wevuDefaultsScope`;let Et={};function Dt(e){if(!(!e||typeof e!=`object`||Array.isArray(e)))return e}function Ot(e,t){if(!e)return t;if(!t)return e;let n={...e,...t},r=Dt(e.setData),i=Dt(t.setData);(r||i)&&(n.setData={...r??{},...i??{}});let a=Dt(e.options),o=Dt(t.options);return(a||o)&&(n.options={...a??{},...o??{}}),n}function kt(e,t){return Ot(e,t)}function At(e,t){return{app:Ot(e.app,t.app),component:Ot(e.component,t.component)}}function jt(e){Et=At(Et,e)}function Mt(){Et={}}function Nt(e){return kt(Et.app,e)}function Pt(e){return kt(Et.component,e)}let Ft,It;function Lt(){return Ft}function Rt(e){Ft=e}function zt(){return It}function Bt(e){It=e}function Y(e){if(!Ft)throw Error(`${e}() 必须在 setup() 的同步阶段调用`);return Ft}function Vt(e){return e.__wevuHooks||=Object.create(null),e.__wevuHooks}function X(e,t,n,{single:r=!1}={}){let i=Vt(e);r?i[t]=n:(i[t]??(i[t]=[])).push(n)}function Z(e,t,n=[]){let r=e.__wevuHooks;if(!r)return;let i=r[t];if(!i)return;let a=e.__wevu?.proxy??e;if(Array.isArray(i))for(let e of i)try{e.apply(a,n)}catch{}else if(typeof i==`function`)try{i.apply(a,n)}catch{}}function Ht(e,t,n=[]){let r=e.__wevuHooks;if(!r)return;let i=r[t];if(!i)return;let a=e.__wevu?.proxy??e;if(typeof i==`function`)try{return i.apply(a,n)}catch{return}if(Array.isArray(i)){let e;for(let t of i)try{e=t.apply(a,n)}catch{}return e}}function Ut(e){X(Y(`onLaunch`),`onLaunch`,e)}function Wt(e){X(Y(`onPageNotFound`),`onPageNotFound`,e)}function Gt(e){X(Y(`onUnhandledRejection`),`onUnhandledRejection`,e)}function Kt(e){X(Y(`onThemeChange`),`onThemeChange`,e)}function qt(e){X(Y(`onShow`),`onShow`,e)}function Jt(e){X(Y(`onLoad`),`onLoad`,e)}function Yt(e){X(Y(`onHide`),`onHide`,e)}function Xt(e){X(Y(`onUnload`),`onUnload`,e)}function Zt(e){X(Y(`onReady`),`onReady`,e)}function Qt(e){X(Y(`onPullDownRefresh`),`onPullDownRefresh`,e)}function $t(e){X(Y(`onReachBottom`),`onReachBottom`,e)}function en(e){X(Y(`onPageScroll`),`onPageScroll`,e)}function tn(e){X(Y(`onRouteDone`),`onRouteDone`,e)}function nn(e){X(Y(`onTabItemTap`),`onTabItemTap`,e)}function rn(e){X(Y(`onResize`),`onResize`,e)}function an(e){X(Y(`onMoved`),`onMoved`,e)}function on(e){X(Y(`onError`),`onError`,e)}function sn(e){X(Y(`onSaveExitState`),`onSaveExitState`,e,{single:!0})}function cn(e){X(Y(`onShareAppMessage`),`onShareAppMessage`,e,{single:!0})}function ln(e){X(Y(`onShareTimeline`),`onShareTimeline`,e,{single:!0})}function un(e){X(Y(`onAddToFavorites`),`onAddToFavorites`,e,{single:!0})}function dn(e){X(Y(`onMounted`),`onReady`,e)}function fn(e){X(Y(`onUpdated`),`__wevuOnUpdated`,e)}function pn(e){Y(`onBeforeUnmount`),e()}function mn(e){X(Y(`onUnmounted`),`onUnload`,e)}function hn(e){Y(`onBeforeMount`),e()}function gn(e){X(Y(`onBeforeUpdate`),`__wevuOnBeforeUpdate`,e)}function _n(e){let t=Y(`onErrorCaptured`);X(t,`onError`,n=>e(n,t,``))}function vn(e){X(Y(`onActivated`),`onShow`,e)}function yn(e){X(Y(`onDeactivated`),`onHide`,e)}function bn(e){Y(`onServerPrefetch`)}function xn(e,t){Z(e,t===`before`?`__wevuOnBeforeUpdate`:`__wevuOnUpdated`)}function Sn(e){return e.replace(/&amp;/g,`&`).replace(/&quot;/g,`"`).replace(/&#34;/g,`"`).replace(/&apos;/g,`'`).replace(/&#39;/g,`'`).replace(/&lt;/g,`<`).replace(/&gt;/g,`>`)}function Cn(e,t,n){let r=typeof t==`string`?t:void 0;if(!r)return;let i=(n?.currentTarget)?.dataset?.wvArgs??(n?.target)?.dataset?.wvArgs,a=[];if(typeof i==`string`)try{a=JSON.parse(i)}catch{try{a=JSON.parse(Sn(i))}catch{a=[]}}Array.isArray(a)||(a=[]);let o=a.map(e=>e===`$event`?n:e),s=e?.[r];if(typeof s==`function`)return s.apply(e,o)}const Q=new Map;let wn=0;function Tn(){return wn+=1,`wv${wn}`}function En(e,t,n){let r=Q.get(e)??{snapshot:{},proxy:n,subscribers:new Set};if(r.snapshot=t,r.proxy=n,Q.set(e,r),r.subscribers.size)for(let e of r.subscribers)try{e(t,n)}catch{}}function Dn(e){Q.delete(e)}function On(e,t){let n=Q.get(e)??{snapshot:{},proxy:void 0,subscribers:new Set};return n.subscribers.add(t),Q.set(e,n),()=>{let n=Q.get(e);n&&n.subscribers.delete(t)}}function kn(e){return Q.get(e)?.proxy}function An(e){return Q.get(e)?.snapshot}function jn(e,t,n){try{t.state.__wvOwnerId=n}catch{}try{e.__wvOwnerId=n}catch{}let r=typeof t.snapshot==`function`?t.snapshot():{},i=e.__wevuProps??e.properties;if(i&&typeof i==`object`)for(let[e,t]of Object.entries(i))r[e]=t;En(n,r,t.proxy)}function Mn(e){return e.kind===`component`}function Nn(e){return new Proxy(e,{get(e,t,n){let r=Reflect.get(e,t,n);return K(r)?r.value:r},set(e,t,n,r){let i=e[t];return K(i)&&!K(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}})}function Pn(e,t){let n=e.__wevuExposeProxy;if(n&&e.__wevuExposeRaw===t)return n;let r=Nn(t);try{Object.defineProperty(e,`__wevuExposeProxy`,{value:r,configurable:!0,enumerable:!1,writable:!1}),Object.defineProperty(e,`__wevuExposeRaw`,{value:t,configurable:!0,enumerable:!1,writable:!1})}catch{e.__wevuExposeProxy=r,e.__wevuExposeRaw=t}return r}function Fn(e,t){if(!t||typeof t!=`object`)return e;let n=t;return q(new Proxy(e,{get(e,t,r){return Reflect.has(e,t)?Reflect.get(e,t,r):n[t]},set(e,t,r,i){return t in n?(n[t]=r,!0):Reflect.set(e,t,r,i)},has(e,t){return Reflect.has(e,t)||t in n},ownKeys(e){return Array.from(new Set([...Reflect.ownKeys(e),...Reflect.ownKeys(n)]))},getOwnPropertyDescriptor(e,t){return Reflect.has(e,t)?Object.getOwnPropertyDescriptor(e,t):Object.getOwnPropertyDescriptor(n,t)}}))}function In(e){if(!e||typeof e!=`object`)return e??null;let t=e,n=t.__wevuExposed;return n&&typeof n==`object`?Pn(t,n):t.__wevu?.proxy?t.__wevu.proxy:e}function Ln(e,t){let n=e;if(!n)return t.inFor?q([]):null;if(t.inFor){if(typeof n.selectAllComponents==`function`){let r=n.selectAllComponents(t.selector);return q((Array.isArray(r)?r:[]).map((n,r)=>Fn(Wn(e,t.selector,{multiple:!0,index:r}),In(n))))}return q([])}let r=Wn(e,t.selector,{multiple:!1});return typeof n.selectComponent==`function`?Fn(r,In(n.selectComponent(t.selector))):r}function Rn(e){return e.__wevuTemplateRefMap}function zn(e,t,n){if(!e)return;let r=e.get(t);r&&(r.value=n)}function Bn(e,t){let n=e.__wevu?.proxy??e,r;if(t.get)try{r=t.get.call(n)}catch{r=void 0}return r==null&&t.name&&(r=t.name),typeof r==`function`?{type:`function`,fn:r}:K(r)?{type:`ref`,ref:r}:typeof r==`string`&&r?{type:`name`,name:r}:t.name?{type:`name`,name:t.name}:{type:`skip`}}function Vn(e){let t=e.__wevu?.state??e,n=t.$refs;if(n&&typeof n==`object`)return n;let r=q(Object.create(null));return Object.defineProperty(t,`$refs`,{value:r,configurable:!0,enumerable:!1,writable:!1}),r}function Hn(e){let t=e;return t&&typeof t.createSelectorQuery==`function`?t.createSelectorQuery():typeof wx<`u`&&typeof wx.createSelectorQuery==`function`?wx.createSelectorQuery().in(t):null}function Un(e,t,n,r,i){let a=Hn(e);return a?(r(n.multiple?a.selectAll(t):a.select(t)),new Promise(e=>{a.exec(t=>{let r=Array.isArray(t)?t[0]:null;n.index!=null&&Array.isArray(r)&&(r=r[n.index]??null),i&&i(r??null),e(r??null)})})):(i&&i(null),Promise.resolve(null))}function Wn(e,t,n){return q({selector:t,boundingClientRect:r=>Un(e,t,n,e=>e.boundingClientRect(),r),scrollOffset:r=>Un(e,t,n,e=>e.scrollOffset(),r),fields:(r,i)=>Un(e,t,n,e=>e.fields(r),i),node:r=>Un(e,t,n,e=>e.node(),r)})}function Gn(e,t,n){return t.inFor?q((Array.isArray(n)?n:[]).map((n,r)=>Wn(e,t.selector,{multiple:!0,index:r}))):n?Wn(e,t.selector,{multiple:!1}):null}function Kn(e,t){let n=e.__wevuTemplateRefs;if(!n||!n.length){t?.();return}if(!e.__wevuReadyCalled){t?.();return}if(!e.__wevu){t?.();return}let r=Rn(e),i=n.filter(e=>!Mn(e)),a=n.filter(e=>Mn(e)).map(t=>({binding:t,value:Ln(e,t)})),o=n=>{let i=Vn(e),a=new Map,o=new Set,s=e.__wevu?.proxy??e;n.forEach(t=>{let n=t.binding,r=t.value,i=Bn(e,n);if(i.type===`function`){n.inFor&&Array.isArray(r)?r.length?r.forEach(e=>i.fn.call(s,e)):i.fn.call(s,null):i.fn.call(s,r??null);return}if(i.type===`ref`){i.ref.value=r;return}if(i.type===`name`){o.add(i.name);let e=a.get(i.name)??{values:[],count:0,hasFor:!1};e.count+=1,e.hasFor=e.hasFor||n.inFor,n.inFor?Array.isArray(r)&&e.values.push(...r):r!=null&&e.values.push(r),a.set(i.name,e)}});for(let[e,t]of a){let n;n=t.values.length?t.hasFor||t.values.length>1||t.count>1?q(t.values):t.values[0]:t.hasFor?q([]):null,i[e]=n,zn(r,e,n)}for(let e of Object.keys(i))o.has(e)||delete i[e];t?.()};if(!i.length){o(a);return}let s=Hn(e);if(!s){o(a);return}let c=[];for(let e of i)(e.inFor?s.selectAll(e.selector):s.select(e.selector)).boundingClientRect(),c.push({binding:e});s.exec(t=>{let n=c.map((n,r)=>{let i=Array.isArray(t)?t[r]:null;return{binding:n.binding,value:Gn(e,n.binding,i)}});o([...a,...n])})}function qn(e,t){let n=e.__wevuTemplateRefs;if(!n||!n.length){t?.();return}if(t){let n=e.__wevuTemplateRefsCallbacks??[];n.push(t),e.__wevuTemplateRefsCallbacks||Object.defineProperty(e,`__wevuTemplateRefsCallbacks`,{value:n,configurable:!0,enumerable:!1,writable:!0})}e.__wevuTemplateRefsPending||(e.__wevuTemplateRefsPending=!0,o(()=>{e.__wevuTemplateRefsPending=!1,Kn(e,()=>{let t=e.__wevuTemplateRefsCallbacks;!t||!t.length||t.splice(0).forEach(e=>{try{e()}catch{}})})}))}function Jn(e){let t=e.__wevuTemplateRefs;if(!t||!t.length)return;let n=Vn(e),r=e.__wevu?.proxy??e,i=new Set,a=Rn(e);for(let o of t){let t=Bn(e,o),s=o.inFor?q([]):null;if(t.type===`function`){t.fn.call(r,null);continue}if(t.type===`ref`){t.ref.value=s;continue}t.type===`name`&&(i.add(t.name),n[t.name]=s,zn(a,t.name,s))}for(let e of Object.keys(n))i.has(e)||delete n[e]}function Yn(e,t,n){if(typeof e!=`function`)return;let r=n?.runtime??{methods:Object.create(null),state:{},proxy:{},watch:()=>()=>{},bindModel:()=>{}};n&&(n.runtime=r);let i={...n??{},runtime:r};return e.length>=2?e(t,i):e(i)}function Xn(e,t,n){if(typeof e==`function`)return{handler:e.bind(t.proxy),options:{}};if(typeof e==`string`){let r=t.methods?.[e]??n[e];return typeof r==`function`?{handler:r.bind(t.proxy),options:{}}:void 0}if(!e||typeof e!=`object`)return;let r=Xn(e.handler,t,n);if(!r)return;let i={...r.options};return e.immediate!==void 0&&(i.immediate=e.immediate),e.deep!==void 0&&(i.deep=e.deep),{handler:r.handler,options:i}}function Zn(e,t){let n=t.split(`.`).map(e=>e.trim()).filter(Boolean);return n.length?()=>{let t=e;for(let e of n){if(t==null)return t;t=t[e]}return t}:()=>e}function Qn(e,t,n){let r=[],i=e.proxy;for(let[a,o]of Object.entries(t)){let t=Xn(o,e,n);if(!t)continue;let s=Zn(i,a),c=e.watch(s,t.handler,t.options);r.push(c)}return r}function $n(e,t,n,r,i){if(e.__wevu)return e.__wevu;let a=Tn(),o=i?.deferSetData?(e=>{let t,n=!1,r={setData(r){if(!n){t={...t??{},...r};return}if(typeof e.setData==`function`)return e.setData(r)}};return r.__wevu_enableSetData=()=>{if(n=!0,t&&Object.keys(t).length&&typeof e.setData==`function`){let n=t;t=void 0,e.setData(n)}},r})(e):{setData(t){if(typeof e.setData==`function`)return e.setData(t)}},s,c=()=>{if(!s||typeof s.snapshot!=`function`)return;let t=s.snapshot(),n=e.__wevuProps??e.properties;if(n&&typeof n==`object`)for(let[e,r]of Object.entries(n))t[e]=r;En(a,t,s.proxy)},l={...o,setData(t){let n=o.setData(t);return c(),qn(e),n}},u=t.mount({...l});s=u;let d=u?.proxy??{},f=u?.state??{};if(!u?.methods)try{u.methods=Object.create(null)}catch{}let p=u?.methods??Object.create(null),m=u?.watch??(()=>()=>{}),h=u?.bindModel??(()=>{}),g={...u??{},state:f,proxy:d,methods:p,watch:m,bindModel:h};if(Object.defineProperty(e,`$wevu`,{value:g,configurable:!0,enumerable:!1,writable:!1}),e.__wevu=g,jn(e,g,a),n){let t=Qn(g,n,e);t.length&&(e.__wevuWatchStops=t)}if(r){let t=_e({...e.properties||{}});try{Object.defineProperty(e,`__wevuProps`,{value:t,configurable:!0,enumerable:!1,writable:!1})}catch{e.__wevuProps=t}let n={props:t,runtime:g,state:f,proxy:d,bindModel:h.bind(g),watch:m.bind(g),instance:e,emit:(t,n,r)=>{typeof e.triggerEvent==`function`&&e.triggerEvent(t,n,r)},expose:t=>{e.__wevuExposed=t},attrs:{},slots:Object.create(null)};Rt(e),Bt(n);try{let e=Yn(r,t,n);e&&typeof e==`object`&&Object.keys(e).forEach(t=>{let n=e[t];typeof n==`function`?u.methods[t]=(...e)=>n.apply(u.proxy,e):u.state[t]=n})}finally{Bt(void 0),Rt(void 0)}}try{let t=u.methods;for(let n of Object.keys(t))typeof e[n]!=`function`&&(e[n]=function(...e){let t=this.$wevu?.methods?.[n];if(typeof t==`function`)return t.apply(this.$wevu.proxy,e)})}catch{}return u}function er(e){let t=e.__wevu?.adapter;t&&typeof t.__wevu_enableSetData==`function`&&t.__wevu_enableSetData()}function tr(e){let t=e.__wevu,n=e.__wvOwnerId;n&&Dn(n),Jn(e),t&&e.__wevuHooks&&Z(e,`onUnload`,[]),e.__wevuHooks&&=void 0;let r=e.__wevuWatchStops;if(Array.isArray(r))for(let e of r)try{e()}catch{}e.__wevuWatchStops=void 0,t&&t.unmount(),delete e.__wevu,`$wevu`in e&&delete e.$wevu}function nr(e,t,n,r,i){if(typeof App!=`function`)throw TypeError(`createApp 需要全局 App 构造器可用`);let a=Object.keys(t??{}),o={...i};o.globalData=o.globalData??{},o.__weapp_vite_inline||=function(e){let t=e?.currentTarget?.dataset?.wvHandler??e?.target?.dataset?.wvHandler;return Cn(this.__wevu?.proxy??this,t,e)};let s=o.onLaunch;o.onLaunch=function(...t){$n(this,e,n,r),Z(this,`onLaunch`,t),typeof s==`function`&&s.apply(this,t)};let c=o.onShow;o.onShow=function(...e){Z(this,`onShow`,e),typeof c==`function`&&c.apply(this,e)};let l=o.onHide;o.onHide=function(...e){Z(this,`onHide`,e),typeof l==`function`&&l.apply(this,e)};let u=o.onError;o.onError=function(...e){Z(this,`onError`,e),typeof u==`function`&&u.apply(this,e)};let d=o.onPageNotFound;o.onPageNotFound=function(...e){Z(this,`onPageNotFound`,e),typeof d==`function`&&d.apply(this,e)};let f=o.onUnhandledRejection;o.onUnhandledRejection=function(...e){Z(this,`onUnhandledRejection`,e),typeof f==`function`&&f.apply(this,e)};let p=o.onThemeChange;o.onThemeChange=function(...e){Z(this,`onThemeChange`,e),typeof p==`function`&&p.apply(this,e)};for(let e of a){let t=o[e];o[e]=function(...n){let r=this.__wevu,i,a=r?.methods?.[e];return a&&(i=a.apply(r.proxy,n)),typeof t==`function`?t.apply(this,n):i}}App(o)}function rr(e){let{features:t,userOnSaveExitState:n,userOnPullDownRefresh:r,userOnReachBottom:i,userOnPageScroll:a,userOnRouteDone:o,userOnTabItemTap:s,userOnResize:c,userOnShareAppMessage:l,userOnShareTimeline:u,userOnAddToFavorites:d}=e,f=typeof r==`function`||!!t.enableOnPullDownRefresh,p=typeof i==`function`||!!t.enableOnReachBottom,m=typeof a==`function`||!!t.enableOnPageScroll,h=typeof o==`function`||!!t.enableOnRouteDone,g=typeof s==`function`||!!t.enableOnTabItemTap,_=typeof c==`function`||!!t.enableOnResize,v=typeof l==`function`||!!t.enableOnShareAppMessage,y=typeof u==`function`||!!t.enableOnShareTimeline,b=typeof d==`function`||!!t.enableOnAddToFavorites,x=typeof n==`function`||!!t.enableOnSaveExitState,S=()=>{};return{enableOnPullDownRefresh:f,enableOnReachBottom:p,enableOnPageScroll:m,enableOnRouteDone:h,enableOnTabItemTap:g,enableOnResize:_,enableOnShareAppMessage:v,enableOnShareTimeline:y,enableOnAddToFavorites:b,enableOnSaveExitState:x,effectiveOnSaveExitState:typeof n==`function`?n:(()=>({data:void 0})),effectiveOnPullDownRefresh:typeof r==`function`?r:S,effectiveOnReachBottom:typeof i==`function`?i:S,effectiveOnPageScroll:typeof a==`function`?a:S,effectiveOnRouteDone:typeof o==`function`?o:S,effectiveOnTabItemTap:typeof s==`function`?s:S,effectiveOnResize:typeof c==`function`?c:S,effectiveOnShareAppMessage:typeof l==`function`?l:()=>({}),effectiveOnShareTimeline:typeof u==`function`?u:()=>({}),effectiveOnAddToFavorites:typeof d==`function`?d:(()=>({}))}}function ir(e){let{runtimeApp:t,watch:n,setup:r,userOnLoad:i,userOnUnload:a,userOnShow:o,userOnHide:s,userOnReady:c,enableOnSaveExitState:l,enableOnPullDownRefresh:u,enableOnReachBottom:d,enableOnPageScroll:f,enableOnRouteDone:p,enableOnTabItemTap:m,enableOnResize:h,enableOnShareAppMessage:g,enableOnShareTimeline:_,enableOnAddToFavorites:v,effectiveOnSaveExitState:y,effectiveOnPullDownRefresh:b,effectiveOnReachBottom:x,effectiveOnPageScroll:S,effectiveOnRouteDone:ee,effectiveOnTabItemTap:C,effectiveOnResize:w,effectiveOnShareAppMessage:T,effectiveOnShareTimeline:E,effectiveOnAddToFavorites:D,hasHook:O}=e,k={onLoad(...e){if($n(this,t,n,r),er(this),Z(this,`onLoad`,e),typeof i==`function`)return i.apply(this,e)},onUnload(...e){if(tr(this),typeof a==`function`)return a.apply(this,e)},onShow(...e){if(Z(this,`onShow`,e),typeof o==`function`)return o.apply(this,e)},onHide(...e){if(Z(this,`onHide`,e),typeof s==`function`)return s.apply(this,e)},onReady(...e){if(!this.__wevuReadyCalled){this.__wevuReadyCalled=!0,qn(this,()=>{Z(this,`onReady`,e),typeof c==`function`&&c.apply(this,e)});return}if(typeof c==`function`)return c.apply(this,e)}};return l&&(k.onSaveExitState=function(...e){let t=Ht(this,`onSaveExitState`,e);return t===void 0?y.apply(this,e):t}),u&&(k.onPullDownRefresh=function(...e){if(Z(this,`onPullDownRefresh`,e),!O(this,`onPullDownRefresh`))return b.apply(this,e)}),d&&(k.onReachBottom=function(...e){if(Z(this,`onReachBottom`,e),!O(this,`onReachBottom`))return x.apply(this,e)}),f&&(k.onPageScroll=function(...e){if(Z(this,`onPageScroll`,e),!O(this,`onPageScroll`))return S.apply(this,e)}),p&&(k.onRouteDone=function(...e){if(Z(this,`onRouteDone`,e),!O(this,`onRouteDone`))return ee.apply(this,e)}),m&&(k.onTabItemTap=function(...e){if(Z(this,`onTabItemTap`,e),!O(this,`onTabItemTap`))return C.apply(this,e)}),h&&(k.onResize=function(...e){if(Z(this,`onResize`,e),!O(this,`onResize`))return w.apply(this,e)}),g&&(k.onShareAppMessage=function(...e){let t=Ht(this,`onShareAppMessage`,e);return t===void 0?T.apply(this,e):t}),_&&(k.onShareTimeline=function(...e){let t=Ht(this,`onShareTimeline`,e);return t===void 0?E.apply(this,e):t}),v&&(k.onAddToFavorites=function(...e){let t=Ht(this,`onAddToFavorites`,e);return t===void 0?D.apply(this,e):t}),k}function ar(e){let{userMethods:t,runtimeMethods:n}=e,r={...t};r.__weapp_vite_inline||=function(e){let t=e?.currentTarget?.dataset?.wvHandler??e?.target?.dataset?.wvHandler;return Cn(this.__wevu?.proxy??this,t,e)},r.__weapp_vite_model||=function(e){let t=e?.currentTarget?.dataset?.wvModel??e?.target?.dataset?.wvModel;if(typeof t!=`string`||!t)return;let n=this.__wevu;if(!n||typeof n.bindModel!=`function`)return;let r=qe(e);try{n.bindModel(t).update(r)}catch{}},!r.__weapp_vite_owner&&typeof n?.__weapp_vite_owner==`function`&&(r.__weapp_vite_owner=n.__weapp_vite_owner);let i=Object.keys(n??{});for(let e of i){if(e.startsWith(`__weapp_vite_`))continue;let t=r[e];r[e]=function(...n){let r=this.__wevu,i,a=r?.methods?.[e];if(a&&(i=a.apply(r.proxy,n)),typeof t==`function`){let e=t.apply(this,n);return e===void 0?i:e}return i}}return{finalMethods:r}}function or(e){let t=e.__wevu,n=e.__wvOwnerId;if(!t||!n||typeof t.snapshot!=`function`)return;let r=t.snapshot(),i=e.__wevuProps??e.properties;if(i&&typeof i==`object`)for(let[e,t]of Object.entries(i))r[e]=t;En(n,r,t.proxy)}function sr(e){let{restOptions:t,userObservers:n}=e,r=e=>{let t=e.__wevuProps,n=e.properties;if(!t||typeof t!=`object`||!n||typeof n!=`object`)return;let r=n,i=Object.keys(t);for(let e of i)if(!Object.prototype.hasOwnProperty.call(r,e))try{delete t[e]}catch{}for(let[e,n]of Object.entries(r))try{t[e]=n}catch{}or(e)},i=(e,t,n)=>{let r=e.__wevuProps;if(!(!r||typeof r!=`object`)){try{r[t]=n}catch{}or(e)}},a=t.properties&&typeof t.properties==`object`?Object.keys(t.properties):[],o={};if(a.length)for(let e of a)o[e]=function(t){i(this,e,t)};let s={...n??{}};for(let[e,t]of Object.entries(o)){let n=s[e];typeof n==`function`?s[e]=function(...e){n.apply(this,e),t.apply(this,e)}:s[e]=t}return{syncWevuPropsFromInstance:r,finalObservers:s}}function cr(e,t,n,r,i){let{methods:a={},lifetimes:o={},pageLifetimes:s={},options:c={},...l}=i,u=l.onLoad,d=l.onUnload,f=l.onShow,p=l.onHide,m=l.onReady,h=l.onSaveExitState,g=l.onPullDownRefresh,_=l.onReachBottom,v=l.onPageScroll,y=l.onRouteDone,b=l.onTabItemTap,x=l.onResize,S=l.onShareAppMessage,ee=l.onShareTimeline,C=l.onAddToFavorites,w=l.features??{},T={...l},E=T.__wevuTemplateRefs;delete T.__wevuTemplateRefs;let D=T.observers,O=T.created;delete T.features,delete T.created,delete T.onLoad,delete T.onUnload,delete T.onShow,delete T.onHide,delete T.onReady;let{enableOnPullDownRefresh:k,enableOnReachBottom:A,enableOnPageScroll:j,enableOnRouteDone:te,enableOnTabItemTap:M,enableOnResize:N,enableOnShareAppMessage:P,enableOnShareTimeline:F,enableOnAddToFavorites:I,enableOnSaveExitState:L,effectiveOnSaveExitState:ne,effectiveOnPullDownRefresh:re,effectiveOnReachBottom:R,effectiveOnPageScroll:z,effectiveOnRouteDone:ie,effectiveOnTabItemTap:ae,effectiveOnResize:oe,effectiveOnShareAppMessage:se,effectiveOnShareTimeline:ce,effectiveOnAddToFavorites:le}=rr({features:w,userOnSaveExitState:h,userOnPullDownRefresh:g,userOnReachBottom:_,userOnPageScroll:v,userOnRouteDone:y,userOnTabItemTap:b,userOnResize:x,userOnShareAppMessage:S,userOnShareTimeline:ee,userOnAddToFavorites:C}),B=(e,t)=>{let n=e.__wevuHooks;if(!n)return!1;let r=n[t];return r?Array.isArray(r)?r.length>0:typeof r==`function`:!1};{let e=T.export;T.export=function(){let t=this.__wevuExposed??{},n=typeof e==`function`?e.call(this):{};return n&&typeof n==`object`&&!Array.isArray(n)?{...t,...n}:n??t}}let V={multipleSlots:c.multipleSlots??!0,...c},{syncWevuPropsFromInstance:H,finalObservers:ue}=sr({restOptions:T,userObservers:D}),{finalMethods:U}=ar({userMethods:a,runtimeMethods:t}),de=ir({runtimeApp:e,watch:n,setup:r,userOnLoad:u,userOnUnload:d,userOnShow:f,userOnHide:p,userOnReady:m,enableOnSaveExitState:L,enableOnPullDownRefresh:k,enableOnReachBottom:A,enableOnPageScroll:j,enableOnRouteDone:te,enableOnTabItemTap:M,enableOnResize:N,enableOnShareAppMessage:P,enableOnShareTimeline:F,enableOnAddToFavorites:I,effectiveOnSaveExitState:ne,effectiveOnPullDownRefresh:re,effectiveOnReachBottom:R,effectiveOnPageScroll:z,effectiveOnRouteDone:ie,effectiveOnTabItemTap:ae,effectiveOnResize:oe,effectiveOnShareAppMessage:se,effectiveOnShareTimeline:ce,effectiveOnAddToFavorites:le,hasHook:B});Component({...T,...de,observers:ue,lifetimes:{...o,created:function(...t){Array.isArray(E)&&E.length&&Object.defineProperty(this,`__wevuTemplateRefs`,{value:E,configurable:!0,enumerable:!1,writable:!1}),$n(this,e,n,r,{deferSetData:!0}),H(this),typeof O==`function`&&O.apply(this,t),typeof o.created==`function`&&o.created.apply(this,t)},moved:function(...e){Z(this,`onMoved`,e),typeof o.moved==`function`&&o.moved.apply(this,e)},attached:function(...t){Array.isArray(E)&&E.length&&!this.__wevuTemplateRefs&&Object.defineProperty(this,`__wevuTemplateRefs`,{value:E,configurable:!0,enumerable:!1,writable:!1}),$n(this,e,n,r),H(this),er(this),typeof o.attached==`function`&&o.attached.apply(this,t)},ready:function(...e){if(!this.__wevuReadyCalled){this.__wevuReadyCalled=!0,H(this),qn(this,()=>{Z(this,`onReady`,e),typeof o.ready==`function`&&o.ready.apply(this,e)});return}typeof o.ready==`function`&&o.ready.apply(this,e)},detached:function(...e){Jn(this),tr(this),typeof o.detached==`function`&&o.detached.apply(this,e)},error:function(...e){Z(this,`onError`,e),typeof o.error==`function`&&o.error.apply(this,e)}},pageLifetimes:{...s,show:function(...e){Z(this,`onShow`,e),typeof s.show==`function`&&s.show.apply(this,e)},hide:function(...e){Z(this,`onHide`,e),typeof s.hide==`function`&&s.hide.apply(this,e)},resize:function(...e){Z(this,`onResize`,e),typeof s.resize==`function`&&s.resize.apply(this,e)}},methods:U,options:V})}function lr(e){let{[Tt]:t,data:n,computed:r,methods:i,setData:o,watch:s,setup:c,...l}=e[Tt]===`component`?e:Nt(e),u=i??{},d=r??{},f=new Set,p={globalProperties:{}},m={mount(e){let t=Se((n??(()=>({})))()),r=d,i=u,s=!0,c=[],{includeComputed:l,setDataStrategy:f,maxPatchKeys:m,maxPayloadBytes:h,mergeSiblingThreshold:g,mergeSiblingMaxInflationRatio:v,mergeSiblingMaxParentBytes:y,mergeSiblingSkipArray:b,computedCompare:x,computedCompareMaxDepth:S,computedCompareMaxKeys:ee,prelinkMaxDepth:C,prelinkMaxKeys:T,debug:E,debugWhen:D,debugSampleRate:O,elevateTopKeyThreshold:k,toPlainMaxDepth:A,toPlainMaxKeys:M,shouldIncludeKey:N}=_t(o),{boundMethods:P,computedRefs:F,computedSetters:I,dirtyComputedKeys:L,computedProxy:ne,publicInstance:re}=Ye({state:t,computedDefs:r,methodDefs:i,appConfig:p,includeComputed:l,setDataStrategy:f}),R=e??{setData:()=>{}},z=U(t),ie,ae=gt({state:t,computedRefs:F,dirtyComputedKeys:L,includeComputed:l,setDataStrategy:f,computedCompare:x,computedCompareMaxDepth:S,computedCompareMaxKeys:ee,currentAdapter:R,shouldIncludeKey:N,maxPatchKeys:m,maxPayloadBytes:h,mergeSiblingThreshold:g,mergeSiblingMaxInflationRatio:v,mergeSiblingMaxParentBytes:y,mergeSiblingSkipArray:b,elevateTopKeyThreshold:k,toPlainMaxDepth:A,toPlainMaxKeys:M,debug:E,debugWhen:D,debugSampleRate:O,runTracker:()=>ie?.(),isMounted:()=>s}),oe=()=>ae.job(z),se=e=>ae.mutationRecorder(e,z);ie=w(()=>{W(t),Object.keys(t).forEach(e=>{let n=t[e];K(n)?n.value:G(n)&&W(n)})},{lazy:!0,scheduler:()=>a(oe)}),oe(),c.push(()=>_(ie)),f===`patch`&&(me(t,{shouldIncludeTopKey:N,maxDepth:C,maxKeys:T}),j(se),c.push(()=>te(se)),c.push(()=>he(t)));function ce(e,t,n){let r=We(e,(e,n)=>t(e,n),n);return c.push(r),()=>{r();let e=c.indexOf(r);e>=0&&c.splice(e,1)}}return{get state(){return t},get proxy(){return re},get methods(){return P},get computed(){return ne},get adapter(){return R},bindModel:wt(re,t,F,I),watch:ce,snapshot:()=>ae.snapshot(),unmount:()=>{s&&(s=!1,c.forEach(e=>{try{e()}catch{}}),c.length=0)}}},use(e,...t){if(!e||f.has(e))return m;if(f.add(e),typeof e==`function`)e(m,...t);else if(typeof e.install==`function`)e.install(m,...t);else throw TypeError(`插件必须是函数,或包含 install 方法的对象`);return m},config:p};if(typeof globalThis.App==`function`){let e=globalThis,t=e.__wxConfig!==void 0,n=`__wevuAppRegistered`;(!t||!e[n])&&(t&&(e[n]=!0),nr(m,i??{},s,c,l))}return m}function ur(e,t,n){let r=e.properties,i=n??(r&&typeof r==`object`?r:void 0),a=e=>{let t={...e??{}};return Object.prototype.hasOwnProperty.call(t,`__wvSlotOwnerId`)||(t.__wvSlotOwnerId={type:String,value:``}),Object.prototype.hasOwnProperty.call(t,`__wvSlotScope`)||(t.__wvSlotScope={type:null,value:null}),t};if(i||!t){let{properties:t,...n}=e;return{...n,properties:a(i)}}let o={};return Object.entries(t).forEach(([e,t])=>{if(t!=null){if(Array.isArray(t)||typeof t==`function`){o[e]={type:t};return}if(typeof t==`object`){if(e.endsWith(`Modifiers`)&&Object.keys(t).length===0){o[e]={type:Object,value:{}};return}let n={};`type`in t&&t.type!==void 0&&(n.type=t.type);let r=`default`in t?t.default:t.value;r!==void 0&&(n.value=typeof r==`function`?r():r),o[e]=n}}}),{...e,properties:a(o)}}function dr(e){return e.replace(/&amp;/g,`&`).replace(/&quot;/g,`"`).replace(/&#34;/g,`"`).replace(/&apos;/g,`'`).replace(/&#39;/g,`'`).replace(/&lt;/g,`<`).replace(/&gt;/g,`>`)}function fr(e){let t=e?.currentTarget?.dataset?.wvArgs??e?.target?.dataset?.wvArgs,n=[];if(typeof t==`string`)try{n=JSON.parse(t)}catch{try{n=JSON.parse(dr(t))}catch{n=[]}}return Array.isArray(n)||(n=[]),n.map(t=>t===`$event`?e:t)}function pr(e){if(!e||typeof e!=`object`)return{};if(Array.isArray(e)){let t={};for(let n=0;n<e.length;n+=2){let r=e[n];typeof r==`string`&&r&&(t[r]=e[n+1])}return t}return e}function mr(e,t){let n=Object.prototype.hasOwnProperty.call(t??{},`__wvSlotScope`)?t.__wvSlotScope:e?.properties?.__wvSlotScope,r=Object.prototype.hasOwnProperty.call(t??{},`__wvSlotProps`)?t.__wvSlotProps:e?.properties?.__wvSlotProps,i=pr(n),a=pr(r),o={...i,...a};typeof e?.setData==`function`&&e.setData({__wvSlotPropsData:o})}function hr(e){let t={properties:{__wvOwnerId:{type:String,value:``},__wvSlotProps:{type:null,value:null,observer(e){mr(this,{__wvSlotProps:e})}},__wvSlotScope:{type:null,value:null,observer(e){mr(this,{__wvSlotScope:e})}}},data:()=>({__wvOwner:{},__wvSlotPropsData:{}}),lifetimes:{attached(){let e=this.properties?.__wvOwnerId??``;if(mr(this),!e)return;let t=(e,t)=>{this.__wvOwnerProxy=t,typeof this.setData==`function`&&this.setData({__wvOwner:e||{}})};this.__wvOwnerUnsub=On(e,t);let n=An(e);n&&t(n,kn(e))},detached(){typeof this.__wvOwnerUnsub==`function`&&this.__wvOwnerUnsub(),this.__wvOwnerUnsub=void 0,this.__wvOwnerProxy=void 0}},methods:{__weapp_vite_owner(e){let t=e?.currentTarget?.dataset?.wvHandler??e?.target?.dataset?.wvHandler;if(typeof t!=`string`||!t)return;let n=this.__wvOwnerProxy,r=n?.[t];if(typeof r!=`function`)return;let i=fr(e);return r.apply(n,i)}}};return e?.computed&&Object.keys(e.computed).length>0&&(t.computed=e.computed),t}function gr(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function _r(e){return typeof e!=`object`||!e||K(e)||G(e)||Array.isArray(e)?!0:gr(e)}function vr(e,t,n){let r=e?.methods??Object.create(null),i=e?.state??Object.create(null),a=G(i)?U(i):i;if(e&&!e.methods)try{e.methods=r}catch{}if(e&&!e.state)try{e.state=i}catch{}Object.keys(n).forEach(o=>{let s=n[o];if(typeof s==`function`)r[o]=(...t)=>s.apply(e?.proxy??e,t);else if(s===t||!_r(s))try{Object.defineProperty(a,o,{value:s,configurable:!0,enumerable:!1,writable:!0})}catch{i[o]=s}else i[o]=s}),e&&(e.methods=e.methods??r,e.state=e.state??i)}let yr;function br(){let e=typeof globalThis<`u`?globalThis:void 0;if(!e)return;let t=e;!t.__weapp_vite_createScopedSlotComponent&&yr&&(t.__weapp_vite_createScopedSlotComponent=yr)}function xr(e){br();let{data:t,computed:n,methods:r,setData:i,watch:a,setup:o,props:s,...c}=Pt(e),l=lr({data:t,computed:n,methods:r,setData:i,[Tt]:`component`}),u=(e,t)=>{let n=Yn(o,e,t);return n&&t&&vr(t.runtime,t.instance,n),n},d=ur(c,s),f={data:t,computed:n,methods:r,setData:i,watch:a,setup:u,mpOptions:d};return cr(l,r??{},a,u,d),{__wevu_runtime:l,__wevu_options:f}}function Sr(e){br();let{properties:t,props:n,...r}=e;xr(ur(r,n,t))}function Cr(e){Sr(hr(e))}yr=Cr,br();const wr=Symbol(`wevu.provideScope`),Tr=new Map;function Er(e,t){let n=Lt();if(n){let r=n[wr];r||(r=new Map,n[wr]=r),r.set(e,t)}else Tr.set(e,t)}function Dr(e,t){let n=Lt();if(n){let t=n;for(;t;){let n=t[wr];if(n&&n.has(e))return n.get(e);t=null}}if(Tr.has(e))return Tr.get(e);if(arguments.length>=2)return t;throw Error(`wevu.inject:未找到对应 key 的值`)}function Or(e,t){Tr.set(e,t)}function kr(e,t){if(Tr.has(e))return Tr.get(e);if(arguments.length>=2)return t;throw Error(`injectGlobal():未找到对应 key 的 provider:${String(e)}`)}const Ar=/\B([A-Z])/g;function jr(e){return e?e.startsWith(`--`)?e:e.replace(Ar,`-$1`).toLowerCase():``}function Mr(e,t){if(!t)return e;if(!e)return t;let n=e;n.endsWith(`;`)||(n+=`;`);let r=t.startsWith(`;`)?t.slice(1):t;return n+r}function Nr(e){let t=``;for(let n of Object.keys(e)){let r=e[n];if(r==null)continue;let i=jr(n);if(Array.isArray(r))for(let e of r)e!=null&&(t=Mr(t,`${i}:${e}`));else t=Mr(t,`${i}:${r}`)}return t}function Pr(e){if(e==null)return``;if(typeof e==`string`)return e;if(Array.isArray(e)){let t=``;for(let n of e){let e=Pr(n);e&&(t=Mr(t,e))}return t}return typeof e==`object`?Nr(e):``}function Fr(e){let t=``;if(!e)return t;if(typeof e==`string`)return e;if(Array.isArray(e)){for(let n of e){let e=Fr(n);e&&(t+=`${e} `)}return t.trim()}if(typeof e==`object`){for(let n of Object.keys(e))e[n]&&(t+=`${n} `);return t.trim()}return t}function Ir(){let e=zt();if(!e)throw Error(`useAttrs() 必须在 setup() 的同步阶段调用`);return e.attrs??{}}function Lr(){let e=zt();if(!e)throw Error(`useSlots() 必须在 setup() 的同步阶段调用`);return e.slots??Object.create(null)}function Rr(e){let t=e.__wevuTemplateRefMap;if(t)return t;let n=new Map;try{Object.defineProperty(e,`__wevuTemplateRefMap`,{value:n,configurable:!0,enumerable:!1,writable:!1})}catch{e.__wevuTemplateRefMap=n}return n}function zr(e){let t=Lt();if(!t)throw Error(`useTemplateRef() 必须在 setup() 的同步阶段调用`);let n=typeof e==`string`?e.trim():``;if(!n)throw Error(`useTemplateRef() 需要传入有效的模板 ref 名称`);let r=Rr(t),i=r.get(n);if(i)return i;let a=Fe(null);return r.set(n,a),a}function Br(e,t){let n=zt();if(!n)throw Error(`useModel() 必须在 setup() 的同步阶段调用`);let r=n.emit,i=`update:${t}`;return Me({get:()=>e?.[t],set:e=>{r?.(i,e)}})}function Vr(e){let t=Lt();if(!t?.__wevu||typeof t.__wevu.bindModel!=`function`)throw Error(`useBindModel() 必须在 setup() 的同步阶段调用`);let n=t.__wevu.bindModel.bind(t.__wevu),r=((t,r)=>e?n(t,{...e,...r}):n(t,r));return r.model=(e,t)=>r(e).model(t),r.value=(t,n)=>{let i={...e,...n}?.valueProp??`value`;return r.model(t,n)[i]},r.on=(t,n)=>{let i=`on${vt({...e,...n}?.event??`input`)}`;return r.model(t,n)[i]},r}function Hr(e,t){return e==null?t:t==null?e:Array.isArray(e)&&Array.isArray(t)?Array.from(new Set([...e,...t])):typeof e==`object`&&typeof t==`object`?{...e,...t}:t}function Ur(e,t,n,r){return function(...i){let a=[],o=[],s=e=>a.push(e),c=e=>o.push(e);r.forEach(n=>{try{n({name:t,store:e,args:i,after:s,onError:c})}catch{}});let l;try{l=n.apply(e,i)}catch(e){throw o.forEach(t=>t(e)),e}let u=e=>(a.forEach(t=>t(e)),e);return l&&typeof l.then==`function`?l.then(e=>u(e),e=>(o.forEach(t=>t(e)),Promise.reject(e))):u(l)}}function Wr(e){return typeof e==`object`&&!!e}function Gr(e){if(!Wr(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Kr(e,t){for(let n in t)e[n]=t[n]}function $(e){if(Array.isArray(e))return e.map(e=>$(e));if(Gr(e)){let t={};for(let n in e)t[n]=$(e[n]);return t}return e}function qr(e,t){if(Array.isArray(e)&&Array.isArray(t)){e.length=0,t.forEach((t,n)=>{e[n]=$(t)});return}if(Wr(t)){for(let n in e)n in t||delete e[n];for(let n in t){let r=t[n],i=e[n];if(Array.isArray(r)&&Array.isArray(i)){qr(i,r);continue}if(Gr(r)&&Gr(i)){qr(i,r);continue}e[n]=$(r)}}}function Jr(e,t,n,r){let i={$id:e};Object.defineProperty(i,`$state`,{get(){return t},set(e){t&&Wr(e)&&(Kr(t,e),n(`patch object`))}}),i.$patch=e=>{if(!t){typeof e==`function`?(e(i),n(`patch function`)):(Kr(i,e),n(`patch object`));return}typeof e==`function`?(e(t),n(`patch function`)):(Kr(t,e),n(`patch object`))},r&&(i.$reset=()=>r());let a=new Set;i.$subscribe=(e,t)=>(a.add(e),()=>a.delete(e));let o=new Set;return i.$onAction=e=>(o.add(e),()=>o.delete(e)),{api:i,subs:a,actionSubs:o}}function Yr(){let e={_stores:new Map,_plugins:[],install(e){},use(t){return typeof t==`function`&&e._plugins.push(t),e}};return Yr._instance=e,e}const Xr=Object.prototype.hasOwnProperty;function Zr(e){return K(e)&&Xr.call(e,`dep`)}function Qr(e){return G(e)?$(U(e)):Zr(e)?$(e.value):$(e)}function $r(e,t){let n,r=!1,i=Yr._instance;return function(){if(r&&n)return n;if(r=!0,typeof t==`function`){let r=t(),a=()=>{},o=new Map;Object.keys(r).forEach(e=>{let t=r[e];typeof t==`function`||e.startsWith(`$`)||K(t)&&!Zr(t)||o.set(e,Qr(t))});let s=Jr(e,void 0,e=>a(e),()=>{o.forEach((e,t)=>{let r=n[t];if(Zr(r)){r.value=$(e);return}if(G(r)){qr(r,e);return}K(r)||(n[t]=$(e))}),a(`patch object`)}),c=!1,l=s.api.$patch;if(s.api.$patch=e=>{c=!0;try{l(e)}finally{c=!1}},typeof s.api.$reset==`function`){let e=s.api.$reset;s.api.$reset=()=>{c=!0;try{e()}finally{c=!1}}}a=t=>{s.subs.forEach(r=>{try{r({type:t,storeId:e},n)}catch{}})},n=Object.assign({},r);for(let e of Object.getOwnPropertyNames(s.api)){let t=Object.getOwnPropertyDescriptor(s.api,e);t&&(e===`$state`?Object.defineProperty(n,e,{enumerable:t.enumerable,configurable:t.configurable,get(){return s.api.$state},set(e){c=!0;try{s.api.$state=e}finally{c=!1}}}):Object.defineProperty(n,e,t))}let u=[];if(Object.keys(r).forEach(e=>{let t=r[e];if(typeof t==`function`&&!e.startsWith(`$`)){n[e]=Ur(n,e,t,s.actionSubs);return}if(Zr(t)){u.push(t);return}if(G(t)){u.push(t);return}if(!K(t)&&!e.startsWith(`$`)){let r=t;Object.defineProperty(n,e,{enumerable:!0,configurable:!0,get(){return r},set(e){r=e,c||a(`direct`)}})}}),u.length>0){let e=!1;w(()=>{if(u.forEach(e=>{Zr(e)?e.value:W(e)}),!e){e=!0;return}c||a(`direct`)})}let d=i?._plugins??[];for(let e of d)try{e({store:n})}catch{}return n}let a=t,o=a.state?a.state():{},s=Se(o),c=$(U(o)),l=()=>{},u=Jr(e,s,e=>l(e),()=>{qr(s,c),l(`patch object`)}),d=!1,f=u.api.$patch;if(u.api.$patch=e=>{d=!0;try{f(e)}finally{d=!1}},typeof u.api.$reset==`function`){let e=u.api.$reset;u.api.$reset=()=>{d=!0;try{e()}finally{d=!1}}}l=t=>{u.subs.forEach(n=>{try{n({type:t,storeId:e},s)}catch{}})};let p={};for(let e of Object.getOwnPropertyNames(u.api)){let t=Object.getOwnPropertyDescriptor(u.api,e);t&&(e===`$state`?Object.defineProperty(p,e,{enumerable:t.enumerable,configurable:t.configurable,get(){return u.api.$state},set(e){d=!0;try{u.api.$state=e}finally{d=!1}}}):Object.defineProperty(p,e,t))}let m=a.getters??{},h={};Object.keys(m).forEach(e=>{let t=m[e];if(typeof t==`function`){let n=Ne(()=>t.call(p,s));h[e]=n,Object.defineProperty(p,e,{enumerable:!0,configurable:!0,get(){return n.value}})}});let g=a.actions??{};Object.keys(g).forEach(e=>{let t=g[e];typeof t==`function`&&(p[e]=Ur(p,e,(...e)=>t.apply(p,e),u.actionSubs))}),Object.keys(s).forEach(e=>{Object.defineProperty(p,e,{enumerable:!0,configurable:!0,get(){return s[e]},set(t){s[e]=t}})});let _=!1;w(()=>{if(W(s),!_){_=!0;return}d||l(`direct`)}),n=p;let v=i?._plugins??[];for(let e of v)try{e({store:n})}catch{}return n}}function ei(e){let t={};for(let n in e){let r=e[n];if(typeof r==`function`){t[n]=r;continue}K(r)?t[n]=r:t[n]=Ne({get:()=>e[n],set:t=>{e[n]=t}})}return t}export{j as addMutationRecorder,h as batch,Z as callHookList,Ht as callHookReturn,xn as callUpdateHooks,Ne as computed,lr as createApp,Yr as createStore,Sr as createWevuComponent,Cr as createWevuScopedSlotComponent,xr as defineComponent,$r as defineStore,w as effect,b as effectScope,m as endBatch,Lt as getCurrentInstance,x as getCurrentScope,zt as getCurrentSetupContext,Ue as getDeepWatchStrategy,ye as getReactiveVersion,Dr as inject,kr as injectGlobal,Ze as isNoSetData,Te as isRaw,G as isReactive,K as isRef,ve as isShallowReactive,Ie as isShallowRef,q as markNoSetData,we as markRaw,Hr as mergeModels,$n as mountRuntimeInstance,o as nextTick,Fr as normalizeClass,Pr as normalizeStyle,vn as onActivated,un as onAddToFavorites,hn as onBeforeMount,pn as onBeforeUnmount,gn as onBeforeUpdate,yn as onDeactivated,on as onError,_n as onErrorCaptured,Yt as onHide,Ut as onLaunch,Jt as onLoad,dn as onMounted,an as onMoved,Wt as onPageNotFound,en as onPageScroll,Qt as onPullDownRefresh,$t as onReachBottom,Zt as onReady,rn as onResize,tn as onRouteDone,sn as onSaveExitState,S as onScopeDispose,bn as onServerPrefetch,cn as onShareAppMessage,ln as onShareTimeline,qt as onShow,nn as onTabItemTap,Kt as onThemeChange,Gt as onUnhandledRejection,Xt as onUnload,mn as onUnmounted,fn as onUpdated,me as prelinkReactiveTree,Er as provide,Or as provideGlobal,Se as reactive,Pe as readonly,ke as ref,nr as registerApp,cr as registerComponent,te as removeMutationRecorder,Mt as resetWevuDefaults,Yn as runSetupFunction,Rt as setCurrentInstance,Bt as setCurrentSetupContext,He as setDeepWatchStrategy,jt as setWevuDefaults,_e as shallowReactive,Fe as shallowRef,f as startBatch,_ as stop,ei as storeToRefs,tr as teardownRuntimeInstance,U as toRaw,Re as toRef,ze as toRefs,W as touchReactive,Be as traverse,Le as triggerRef,Ae as unref,Ir as useAttrs,Vr as useBindModel,Br as useModel,Lr as useSlots,zr as useTemplateRef,We as watch,Ge as watchEffect};
@@ -10,12 +10,8 @@ declare namespace JSX {
10
10
  interface ElementAttributesProperty {
11
11
  $props: Record<string, any>;
12
12
  }
13
- interface IntrinsicAttributes {
14
- [key: string]: any;
15
- }
16
- interface IntrinsicElements extends GlobalComponents, WeappIntrinsicElements {
17
- [key: string]: any;
18
- }
13
+ interface IntrinsicAttributes {}
14
+ interface IntrinsicElements extends GlobalComponents, WeappIntrinsicElements {}
19
15
  }
20
16
  //#endregion
21
17
  export { JSX };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wevu",
3
3
  "type": "module",
4
- "version": "1.1.4",
4
+ "version": "1.2.1",
5
5
  "description": "Vue 3 风格的小程序运行时,包含响应式、diff+setData 与轻量状态管理",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -65,11 +65,14 @@
65
65
  "peerDependencies": {
66
66
  "miniprogram-api-typings": "^5.0.0"
67
67
  },
68
+ "dependencies": {
69
+ "vue": "^3.5.27"
70
+ },
68
71
  "devDependencies": {},
69
72
  "scripts": {
70
73
  "dev": "tsdown -w",
71
- "build": "tsdown && node scripts/vendor-vue-dts.mjs && rollup -c rollup.types.config.mjs && node scripts/patch-vue-dts.mjs",
72
- "build:types": "node scripts/vendor-vue-dts.mjs && rollup -c rollup.types.config.mjs && node scripts/patch-vue-dts.mjs",
74
+ "build": "tsdown",
75
+ "build:types": "tsdown --dts",
73
76
  "test": "vitest run",
74
77
  "test:dev": "vitest",
75
78
  "test:types": "tsd",