wevu 1.1.0 → 1.1.2

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,8 +1,10 @@
1
- import { Ref as Ref$1 } from "@vue/reactivity";
1
+ import { t as WeappIntrinsicElements } from "./weappIntrinsicElements-zTAqU5H3.mjs";
2
+ import { Ref as Ref$1, ShallowRef as ShallowRef$1 } from "@vue/reactivity";
2
3
  import { AllowedComponentProps, ComponentCustomProps, ComponentOptionsMixin, DefineComponent, ObjectDirective, PublicProps, ShallowUnwrapRef, VNode, VNodeProps } from "vue";
3
4
 
4
5
  //#region src/reactivity/ref.d.ts
5
6
  type Ref<T$1 = any, S = T$1> = Ref$1<T$1, S>;
7
+ type ShallowRef<T$1 = any> = ShallowRef$1<T$1>;
6
8
  declare function isRef(value: unknown): value is Ref<any>;
7
9
  declare function ref<T$1>(value: T$1): Ref<T$1>;
8
10
  declare function unref<T$1>(value: T$1 | Ref<T$1>): T$1;
@@ -369,6 +371,9 @@ interface InternalRuntimeStateFields {
369
371
  $wevu?: RuntimeInstance<any, any, any>;
370
372
  __wevuHooks?: Record<string, any>;
371
373
  __wevuExposed?: Record<string, any>;
374
+ __wevuTemplateRefs?: unknown[];
375
+ __wevuTemplateRefMap?: Map<string, Ref<any>>;
376
+ __wevuTemplateRefsPending?: boolean;
372
377
  }
373
378
  type InternalRuntimeState = InternalRuntimeStateFields & Partial<MiniProgramInstance>;
374
379
  //#endregion
@@ -416,7 +421,7 @@ type InferPropConstructor<T$1> = T$1 extends readonly any[] ? InferPropConstruct
416
421
  type InferProps<P$1 extends ComponentPropsOptions = ComponentPropsOptions> = { [K in keyof Pick<P$1, RequiredKeys<P$1>>]: HasDefault<P$1[K]> extends true ? Exclude<InferPropType<P$1[K]>, undefined> : InferPropType<P$1[K]> } & { [K in keyof Pick<P$1, OptionalKeys<P$1>>]?: InferPropType<P$1[K]> };
417
422
  type ExtractPropTypes<P$1 extends ComponentPropsOptions = ComponentPropsOptions> = InferProps<P$1>;
418
423
  type ExtractPublicPropTypes<P$1 extends ComponentPropsOptions = ComponentPropsOptions> = InferProps<P$1>;
419
- type SetupFunction<P$1 extends ComponentPropsOptions, D extends object, C extends ComputedDefinitions, M extends MethodDefinitions> = (props: InferProps<P$1>, ctx: SetupContext<D, C, M, P$1>) => Record<string, any> | void;
424
+ type SetupFunction<P$1 extends ComponentPropsOptions, D extends object, C extends ComputedDefinitions, M extends MethodDefinitions, R$1 extends Record<string, any> | void = Record<string, any> | void> = (props: InferProps<P$1>, ctx: SetupContext<D, C, M, P$1>) => R$1;
420
425
  interface SetupContext<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions, P$1 extends ComponentPropsOptions = ComponentPropsOptions> {
421
426
  /**
422
427
  * 组件 props(来自小程序 properties)
@@ -581,7 +586,7 @@ interface SetDataDebugInfo {
581
586
  }
582
587
  //#endregion
583
588
  //#region src/runtime/types/options.d.ts
584
- interface DefineComponentOptions<P$1 extends ComponentPropsOptions = ComponentPropsOptions, D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions> extends MiniProgramComponentOptions, MiniProgramPageLifetimes {
589
+ interface DefineComponentOptions<P$1 extends ComponentPropsOptions = ComponentPropsOptions, D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions, S extends Record<string, any> | void = Record<string, any> | void> extends MiniProgramComponentOptions, MiniProgramPageLifetimes {
585
590
  /**
586
591
  * 页面特性开关(用于按需注入 Page 事件处理函数)。
587
592
  *
@@ -598,7 +603,7 @@ interface DefineComponentOptions<P$1 extends ComponentPropsOptions = ComponentPr
598
603
  */
599
604
  props?: P$1;
600
605
  watch?: Record<string, any>;
601
- setup?: SetupFunction<P$1, D, C, M>;
606
+ setup?: SetupFunction<P$1, D, C, M, S>;
602
607
  /**
603
608
  * 组件 data(建议使用函数返回初始值)。
604
609
  */
@@ -681,6 +686,21 @@ interface PageFeatures {
681
686
  //#region src/runtime/types.d.ts
682
687
  interface GlobalComponents {}
683
688
  interface GlobalDirectives {}
689
+ interface TemplateRefs {}
690
+ type NodesRefFields = Parameters<WechatMiniprogram.NodesRef['fields']>[0];
691
+ interface TemplateRefValue {
692
+ selector: string;
693
+ boundingClientRect: (cb?: (value: WechatMiniprogram.BoundingClientRectCallbackResult | null) => void) => Promise<WechatMiniprogram.BoundingClientRectCallbackResult | null>;
694
+ scrollOffset: (cb?: (value: WechatMiniprogram.ScrollOffsetCallbackResult | null) => void) => Promise<WechatMiniprogram.ScrollOffsetCallbackResult | null>;
695
+ fields: (fields: NodesRefFields, cb?: (value: any) => void) => Promise<any | null>;
696
+ node: (cb?: (value: any) => void) => Promise<any | null>;
697
+ }
698
+ //#endregion
699
+ //#region src/runtime/templateRefTypes.d.ts
700
+ type WeappTemplateRefElements = { [K in keyof WeappIntrinsicElements]: TemplateRefValue };
701
+ declare global {
702
+ interface HTMLElementTagNameMap extends WeappTemplateRefElements {}
703
+ }
684
704
  //#endregion
685
705
  //#region src/runtime/app.d.ts
686
706
  declare function createApp<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions>(options: CreateAppOptions<D, C, M>): RuntimeApp<D, C, M>;
@@ -717,6 +737,7 @@ interface ComponentDefinition<D extends object, C extends ComputedDefinitions, M
717
737
  mpOptions: MiniProgramComponentRawOptions;
718
738
  };
719
739
  }
740
+ type SetupBindings<S> = Exclude<S, void> extends never ? Record<string, never> : Exclude<S, void>;
720
741
  /**
721
742
  * 按 Vue 3 风格定义一个小程序组件/页面。
722
743
  *
@@ -744,7 +765,7 @@ interface ComponentDefinition<D extends object, C extends ComputedDefinitions, M
744
765
  * })
745
766
  * ```
746
767
  */
747
- declare function defineComponent<P$1 extends ComponentPropsOptions = ComponentPropsOptions, D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions>(options: DefineComponentOptions<P$1, D, C, M>): ComponentDefinition<D, C, M>;
768
+ declare function defineComponent<P$1 extends ComponentPropsOptions = ComponentPropsOptions, D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions, S extends Record<string, any> | void = Record<string, any> | void>(options: DefineComponentOptions<P$1, D, C, M, S>): DefineComponent<P$1, SetupBindings<S>, D, C, M> & ComponentDefinition<D, C, M>;
748
769
  /**
749
770
  * 从 Vue SFC 选项创建 wevu 组件,供 weapp-vite 编译产物直接调用的兼容入口。
750
771
  *
@@ -914,6 +935,9 @@ declare function normalizeClass(value: any): string;
914
935
  //#region src/runtime/vueCompat.d.ts
915
936
  declare function useAttrs(): Record<string, any>;
916
937
  declare function useSlots(): Record<string, any>;
938
+ type TemplateRef<T$1 = unknown> = Readonly<ShallowRef<T$1 | null>>;
939
+ declare function useTemplateRef<K$1 extends keyof TemplateRefs>(name: K$1): TemplateRef<TemplateRefs[K$1]>;
940
+ declare function useTemplateRef<T$1 = unknown>(name: string): TemplateRef<T$1>;
917
941
  declare function useModel<T$1 = any>(props: Record<string, any>, name: string): Ref<T$1>;
918
942
  /**
919
943
  * useBindModel 返回绑定到当前运行时实例的 bindModel。
@@ -1197,4 +1221,4 @@ declare function createStore(): StoreManager;
1197
1221
  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]> };
1198
1222
  declare function storeToRefs<T$1 extends Record<string, any>>(store: T$1): StoreToRefsResult<T$1>;
1199
1223
  //#endregion
1200
- 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 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, type ShallowUnwrapRef, StoreManager, SubscriptionCallback, 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, watch, watchEffect, withDefaults };
1224
+ 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 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,B=new WeakMap;function ee(e){let t=B.get(e);return t||(t=new Set,B.set(e,t)),t}function V(e,t){ee(e).add(t)}function H(e){F.set(e,(F.get(e)??0)+1)}function te(e){return F.get(e)??0}function ne(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),H(e),n.push(e))}}function re(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 ie(e,t,n){if(typeof n!=`string`){R.add(e),I.delete(e);return}if(j.size){let n=P.get(t)??t;V(n,t),V(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),re(e)}function ae(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),re(e))}function oe(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 U=function(e){return e.IS_REACTIVE=`__r_isReactive`,e.RAW=`__r_raw`,e.SKIP=`__r_skip`,e}({});function W(e){return typeof e==`object`&&!!e}const G=Symbol(`wevu.version`);function se(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 K(e){return e?.[U.RAW]??e}const ce=new WeakMap,le=new WeakMap,ue=new WeakMap;function de(e,t){let n=K(e);z.set(n,``),V(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),V(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)||!W(a)||a[U.SKIP])continue;let t=K(a);if(P.has(t)||P.set(t,n),ie(t,e.current,i),!R.has(t)){let n=e.path?`${e.path}.${i}`:i;z.set(t,n)}V(n,t),s.push({current:t,path:e.path?`${e.path}.${i}`:i,depth:e.depth+1})}}}function fe(e){let t=K(e),n=B.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);B.delete(t)}function pe(e){E(K(e),G)}const me={get(e,t,n){if(t===U.IS_REACTIVE)return!0;if(t===U.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,G),H(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,G),H(e)),r},ownKeys(e){return E(e,Symbol.iterator),E(e,G),Reflect.ownKeys(e)}};function he(e){if(!W(e))return e;let t=ue.get(e);if(t)return t;if(e[U.IS_REACTIVE])return e;let n=new Proxy(e,me);return ue.set(e,n),le.set(n,e),F.has(e)||F.set(e,0),n}function ge(e){let t=K(e);return ue.has(t)}function _e(e){return te(K(e))}function ve(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`||se(t))?`array`:`property`,a=oe(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:oe(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=>se(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 ye={get(e,t,n){if(t===U.IS_REACTIVE)return!0;if(t===U.RAW)return e;let r=Reflect.get(e,t,n);if(E(e,t),W(r)){if(r[U.SKIP])return r;let n=P.get(e)??e,i=r?.[U.RAW]??r;P.has(i)||P.set(i,n),ie(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 be(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=W(o)?o?.[U.RAW]??o:void 0;if(r&&ae(r,e,t),W(n)&&!n[U.SKIP]){let r=P.get(e)??e,i=n?.[U.RAW]??n;P.has(i)||P.set(i,r),ie(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`&&se(t)&&Number(t)>=a&&O(e,`length`),O(e,G),H(e),ne(e);let s=P.get(e);s&&s!==e&&(O(s,G),H(s)),ve(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=W(r)?r?.[U.RAW]??r:void 0;n&&ae(n,e,t),O(e,t),O(e,G),H(e),ne(e);let i=P.get(e);i&&i!==e&&(O(i,G),H(i)),ve(e,t,`delete`)}return i},ownKeys(e){return E(e,Symbol.iterator),E(e,G),Reflect.ownKeys(e)}};function be(e){if(!W(e))return e;let t=ce.get(e);if(t)return t;if(e[U.IS_REACTIVE])return e;let n=new Proxy(e,ye);return ce.set(e,n),le.set(n,e),F.has(e)||F.set(e,0),P.has(e)||P.set(e,e),n}function q(e){return!!(e&&e[U.IS_REACTIVE])}function xe(e){return W(e)?be(e):e}function Se(e){return W(e)&&Object.defineProperty(e,U.SKIP,{value:!0,configurable:!0,enumerable:!1,writable:!0}),e}function Ce(e){return W(e)&&U.SKIP in e}const we=`__v_isRef`;function Te(e){try{Object.defineProperty(e,we,{value:!0,configurable:!0})}catch{e[we]=!0}return e}function J(e){return!!(e&&typeof e==`object`&&e[we]===!0)}var Ee=class{_value;_rawValue;dep;constructor(e){Te(this),this._rawValue=e,this._value=xe(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=xe(e),this.dep&&A(this.dep))}};function De(e){return J(e)?e:Se(new Ee(e))}function Oe(e){return J(e)?e.value:e}var ke=class{_getValue;_setValue;dep;constructor(e,t){Te(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 Ae(e,t){return Se(new ke(e,t))}function je(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 Te(o),a=T(t,{lazy:!0,scheduler:()=>{i||(i=!0,O(o,`value`))}}),o}function Me(e){if(J(e)){let t=e;return Te({get value(){return t.value},set value(e){throw Error(`无法给只读 ref 赋值`)}})}return W(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 Ne(e,t){return Ae((t,n)=>({get(){return t(),e},set(t){Object.is(e,t)||(e=t,n())}}),t)}function Pe(e){return J(e)&&typeof e.value!=`function`}function Fe(e){if(J(e)){let t=e.dep;if(t){A(t);return}e.value=e.value}}function Ie(e,t,n){let r=e[t];return J(r)?r:Ae((n,r)=>({get(){return n(),e[t]},set(n){e[t]=n,r()}}),n)}function Le(e){q(e)||console.warn(`toRefs() 需要响应式对象,但收到的是普通对象。`);let t=Array.isArray(e)?Array.from({length:e.length}):{};for(let n in e)t[n]=Ie(e,n);return t}function Re(e,t=new Set){if(!W(e)||t.has(e))return e;for(let n in t.add(e),e)Re(e[n],t);return e}let ze=`version`;function Be(e){ze=e}function Ve(){return ze}function He(e,t,n={}){let r,i=q(e),o=Array.isArray(e)&&!i,s=e=>{if(typeof e==`function`)return e();if(J(e))return e.value;if(q(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(J(e))r=()=>e.value;else if(i)r=()=>e;else throw Error(`无效的 watch 源`);let c=o?e.some(e=>q(e)):i;if(n.deep??c){let e=r;r=()=>{let t=e();return o&&Array.isArray(t)?t.map(e=>ze===`version`&&q(e)?(pe(e),e):Re(e)):ze===`version`&&q(t)?(pe(t),t):Re(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 Ue(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 We(e,t,n){let r=e[t];if(!r)throw Error(`计算属性 "${t}" 是只读的`);r(n)}function Ge(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 Ke(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 Te(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 qe(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}=Ke({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]?(We(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){We(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 Je=Symbol(`wevu.noSetData`);function Ye(e){return Object.defineProperty(e,Je,{value:!0,configurable:!0,enumerable:!1,writable:!1}),e}function Xe(e){return typeof e==`object`&&!!e&&e[Je]===!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=Oe(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=q(r)?K(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=_e(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:_e(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:_e(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=q(t)?K(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])We(n,a,i);else{let t=e[a];J(t)?t.value=i:e[a]=i}return}if(t[a]){We(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 Ge(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,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 Mn(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=Mn(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 Nn(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 Pn(e,t,n){let r=[],i=e.proxy;for(let[a,o]of Object.entries(t)){let t=Mn(o,e,n);if(!t)continue;let s=Nn(i,a),c=e.watch(s,t.handler,t.options);r.push(c)}return r}function Fn(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(e){let t=o.setData(e);return c(),t}},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=Pn(g,n,e);t.length&&(e.__wevuWatchStops=t)}if(r){let t=he({...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 In(e){let t=e.__wevu?.adapter;t&&typeof t.__wevu_enableSetData==`function`&&t.__wevu_enableSetData()}function Ln(e){let t=e.__wevu,n=e.__wvOwnerId;n&&En(n),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 Rn(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){Fn(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 zn(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 Bn(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(Fn(this,t,n,r),In(this),Q(this,`onLoad`,e),typeof i==`function`)return i.apply(this,e)},onUnload(...e){if(Ln(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,Q(this,`onReady`,e)),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 Vn(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=Ge(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 Hn(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 Un(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{}Hn(e)},i=(e,t,n)=>{let r=e.__wevuProps;if(!(!r||typeof r!=`object`)){try{r[t]=n}catch{}Hn(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 Wn(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.observers,O=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:k,enableOnReachBottom:A,enableOnPageScroll:j,enableOnRouteDone:M,enableOnTabItemTap:N,enableOnResize:P,enableOnShareAppMessage:F,enableOnShareTimeline:I,enableOnAddToFavorites:L,enableOnSaveExitState:R,effectiveOnSaveExitState:z,effectiveOnPullDownRefresh:B,effectiveOnReachBottom:ee,effectiveOnPageScroll:V,effectiveOnRouteDone:H,effectiveOnTabItemTap:te,effectiveOnResize:ne,effectiveOnShareAppMessage:re,effectiveOnShareTimeline:ie,effectiveOnAddToFavorites:ae}=zn({features:T,userOnSaveExitState:h,userOnPullDownRefresh:g,userOnReachBottom:_,userOnPageScroll:v,userOnRouteDone:y,userOnTabItemTap:b,userOnResize:x,userOnShareAppMessage:S,userOnShareTimeline:C,userOnAddToFavorites:w}),oe=(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:G}=Un({restOptions:E,userObservers:D}),{finalMethods:se}=Vn({userMethods:a,runtimeMethods:t}),K=Bn({runtimeApp:e,watch:n,setup:r,userOnLoad:u,userOnUnload:d,userOnShow:f,userOnHide:p,userOnReady:m,enableOnSaveExitState:R,enableOnPullDownRefresh:k,enableOnReachBottom:A,enableOnPageScroll:j,enableOnRouteDone:M,enableOnTabItemTap:N,enableOnResize:P,enableOnShareAppMessage:F,enableOnShareTimeline:I,enableOnAddToFavorites:L,effectiveOnSaveExitState:z,effectiveOnPullDownRefresh:B,effectiveOnReachBottom:ee,effectiveOnPageScroll:V,effectiveOnRouteDone:H,effectiveOnTabItemTap:te,effectiveOnResize:ne,effectiveOnShareAppMessage:re,effectiveOnShareTimeline:ie,effectiveOnAddToFavorites:ae,hasHook:oe});Component({...E,...K,observers:G,lifetimes:{...o,created:function(...t){Fn(this,e,n,r,{deferSetData:!0}),W(this),typeof O==`function`&&O.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){Fn(this,e,n,r),W(this),In(this),typeof o.attached==`function`&&o.attached.apply(this,t)},ready:function(...e){this.__wevuReadyCalled||(this.__wevuReadyCalled=!0,W(this),Q(this,`onReady`,e)),typeof o.ready==`function`&&o.ready.apply(this,e)},detached:function(...e){Ln(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:se,options:U})}function Gn(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=be((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:B,publicInstance:ee}=qe({state:t,computedDefs:r,methodDefs:i,appConfig:p,includeComputed:l,setDataStrategy:f}),V=e??{setData:()=>{}},H=K(t),te,ne=ht({state:t,computedRefs:L,dirtyComputedKeys:z,includeComputed:l,setDataStrategy:f,computedCompare:x,computedCompareMaxDepth:S,computedCompareMaxKeys:C,currentAdapter:V,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:()=>te?.(),isMounted:()=>s}),re=()=>ne.job(H),ie=e=>ne.mutationRecorder(e,H);te=T(()=>{pe(t),Object.keys(t).forEach(e=>{let n=t[e];J(n)?n.value:q(n)&&pe(n)})},{lazy:!0,scheduler:()=>a(re)}),re(),c.push(()=>_(te)),f===`patch`&&(de(t,{shouldIncludeTopKey:F,maxDepth:w,maxKeys:E}),M(ie),c.push(()=>N(ie)),c.push(()=>fe(t)));function ae(e,t,n){let r=He(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 ee},get methods(){return I},get computed(){return B},get adapter(){return V},bindModel:Ct(ee,t,L,R),watch:ae,snapshot:()=>ne.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),Rn(m,i??{},s,c,l))}return m}function Kn(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 qn(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 Jn(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(qn(t))}catch{n=[]}}return Array.isArray(n)||(n=[]),n.map(t=>t===`$event`?e:t)}function Yn(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 Xn(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=Yn(n),a=Yn(r),o={...i,...a};typeof e?.setData==`function`&&e.setData({__wvSlotPropsData:o})}function Zn(e){let t={properties:{__wvOwnerId:{type:String,value:``},__wvSlotProps:{type:null,value:null,observer(e){Xn(this,{__wvSlotProps:e})}},__wvSlotScope:{type:null,value:null,observer(e){Xn(this,{__wvSlotScope:e})}}},data:()=>({__wvOwner:{},__wvSlotPropsData:{}}),lifetimes:{attached(){let e=this.properties?.__wvOwnerId??``;if(Xn(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=Jn(e);return r.apply(n,i)}}};return e?.computed&&Object.keys(e.computed).length>0&&(t.computed=e.computed),t}function Qn(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function $n(e){return typeof e!=`object`||!e||J(e)||q(e)||Array.isArray(e)?!0:Qn(e)}function er(e,t,n){let r=e?.methods??Object.create(null),i=e?.state??Object.create(null),a=q(i)?K(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||!$n(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 tr;function nr(){let e=typeof globalThis<`u`?globalThis:void 0;if(!e)return;let t=e;!t.__weapp_vite_createScopedSlotComponent&&tr&&(t.__weapp_vite_createScopedSlotComponent=tr)}function rr(e){nr();let{data:t,computed:n,methods:r,setData:i,watch:a,setup:o,props:s,...c}=Nt(e),l=Gn({data:t,computed:n,methods:r,setData:i,[wt]:`component`}),u=e=>{let t=jn(o,e?.props??{},e);t&&er(e.runtime,e.instance,t)},d=Kn(c,s),f={data:t,computed:n,methods:r,setData:i,watch:a,setup:u,mpOptions:d};return Wn(l,r??{},a,u,d),{__wevu_runtime:l,__wevu_options:f}}function ir(e){nr();let{properties:t,props:n,...r}=e;rr(Kn(r,n,t))}function ar(e){ir(Zn(e))}tr=ar,nr();const or=Symbol(`wevu.provideScope`),sr=new Map;function cr(e,t){let n=It();if(n){let r=n[or];r||(r=new Map,n[or]=r),r.set(e,t)}else sr.set(e,t)}function lr(e,t){let n=It();if(n){let t=n;for(;t;){let n=t[or];if(n&&n.has(e))return n.get(e);t=null}}if(sr.has(e))return sr.get(e);if(arguments.length>=2)return t;throw Error(`wevu.inject:未找到对应 key 的值`)}function ur(e,t){sr.set(e,t)}function dr(e,t){if(sr.has(e))return sr.get(e);if(arguments.length>=2)return t;throw Error(`injectGlobal():未找到对应 key 的 provider:${String(e)}`)}const fr=/\B([A-Z])/g;function pr(e){return e?e.startsWith(`--`)?e:e.replace(fr,`-$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 hr(e){let t=``;for(let n of Object.keys(e)){let r=e[n];if(r==null)continue;let i=pr(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 gr(e){if(e==null)return``;if(typeof e==`string`)return e;if(Array.isArray(e)){let t=``;for(let n of e){let e=gr(n);e&&(t=mr(t,e))}return t}return typeof e==`object`?hr(e):``}function _r(e){let t=``;if(!e)return t;if(typeof e==`string`)return e;if(Array.isArray(e)){for(let n of e){let e=_r(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 vr(){let e=Rt();if(!e)throw Error(`useAttrs() 必须在 setup() 的同步阶段调用`);return e.attrs??{}}function yr(){let e=Rt();if(!e)throw Error(`useSlots() 必须在 setup() 的同步阶段调用`);return e.slots??Object.create(null)}function br(e,t){let n=Rt();if(!n)throw Error(`useModel() 必须在 setup() 的同步阶段调用`);let r=n.emit,i=`update:${t}`;return Ae({get:()=>e?.[t],set:e=>{r?.(i,e)}})}function xr(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 Sr(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 Cr(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 Tr(e,t){for(let n in t)e[n]=t[n]}function Er(e,t,n,r){let i={$id:e};Object.defineProperty(i,`$state`,{get(){return t},set(e){t&&wr(e)&&(Tr(t,e),n(`patch object`))}}),i.$patch=e=>{if(!t){typeof e==`function`?(e(i),n(`patch function`)):(Tr(i,e),n(`patch object`));return}typeof e==`function`?(e(t),n(`patch function`)):(Tr(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 Dr(){let e={_stores:new Map,_plugins:[],install(e){},use(t){return typeof t==`function`&&e._plugins.push(t),e}};return Dr._instance=e,e}function Or(e,t){let n,r=!1,i=Dr._instance;return function(){if(r&&n)return n;if(r=!0,typeof t==`function`){let r=t(),a=()=>{},o=Er(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]=Cr(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=be(o),c={...K(o)},l=()=>{},u=Er(e,s,e=>l(e),()=>{Tr(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=je(()=>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]=Cr(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 kr(e){let t={};for(let n in e){let r=e[n];if(typeof r==`function`){t[n]=r;continue}J(r)?t[n]=r:t[n]=je({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,je as computed,Gn as createApp,Dr as createStore,ir as createWevuComponent,ar as createWevuScopedSlotComponent,rr as defineComponent,Or as defineStore,T as effect,b as effectScope,m as endBatch,It as getCurrentInstance,x as getCurrentScope,Rt as getCurrentSetupContext,Ve as getDeepWatchStrategy,_e as getReactiveVersion,lr as inject,dr as injectGlobal,Xe as isNoSetData,Ce as isRaw,q as isReactive,J as isRef,ge as isShallowReactive,Pe as isShallowRef,Ye as markNoSetData,Se as markRaw,Sr as mergeModels,Fn as mountRuntimeInstance,o as nextTick,_r as normalizeClass,gr 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,de as prelinkReactiveTree,cr as provide,ur as provideGlobal,be as reactive,Me as readonly,De as ref,Rn as registerApp,Wn as registerComponent,N as removeMutationRecorder,jt as resetWevuDefaults,jn as runSetupFunction,Lt as setCurrentInstance,zt as setCurrentSetupContext,Be as setDeepWatchStrategy,At as setWevuDefaults,he as shallowReactive,Ne as shallowRef,f as startBatch,_ as stop,kr as storeToRefs,Ln as teardownRuntimeInstance,K as toRaw,Ie as toRef,Le as toRefs,pe as touchReactive,Re as traverse,Fe as triggerRef,Oe as unref,vr as useAttrs,xr as useBindModel,br as useModel,yr as useSlots,He as watch,Ue 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 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};