wevu 6.16.37 → 6.16.40

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.
Files changed (32) hide show
  1. package/dist/dev/{base-CoF39as1.mjs → base-BPG0sDu-.mjs} +2 -2
  2. package/dist/dev/{base-CoF39as1.mjs.map → base-BPG0sDu-.mjs.map} +1 -1
  3. package/dist/dev/{computed-DBCuiNOA.mjs → computed-njo5yWBk.mjs} +2 -2
  4. package/dist/dev/{computed-DBCuiNOA.mjs.map → computed-njo5yWBk.mjs.map} +1 -1
  5. package/dist/dev/index.mjs +10 -10
  6. package/dist/dev/internal-reactivity.mjs +5 -5
  7. package/dist/dev/internal-runtime.mjs +3 -3
  8. package/dist/dev/internal-template.mjs +1 -1
  9. package/dist/dev/{ref-BoBfMdVt.mjs → ref-DJZWB2im.mjs} +5 -5
  10. package/dist/dev/{ref-BoBfMdVt.mjs.map → ref-DJZWB2im.mjs.map} +1 -1
  11. package/dist/dev/{router-C_io1Bpp.mjs → router-pDQKAVqU.mjs} +2 -2
  12. package/dist/dev/{router-C_io1Bpp.mjs.map → router-pDQKAVqU.mjs.map} +1 -1
  13. package/dist/dev/router.mjs +3 -3
  14. package/dist/dev/router.mjs.map +1 -1
  15. package/dist/dev/{src-YafqvC_l.mjs → src-HtRlku0K.mjs} +9 -9
  16. package/dist/dev/{store-BWZEkK8F.mjs → store-D_seGoEN.mjs} +3 -3
  17. package/dist/dev/{store-BWZEkK8F.mjs.map → store-D_seGoEN.mjs.map} +1 -1
  18. package/dist/dev/store.mjs +1 -1
  19. package/dist/dev/{template-BeuoC58i.mjs → template-D4K5xTD2.mjs} +2 -2
  20. package/dist/dev/{template-BeuoC58i.mjs.map → template-D4K5xTD2.mjs.map} +1 -1
  21. package/dist/dev/{templateRef-GsGuFvwE.mjs → templateRef-3tUik_sj.mjs} +7 -7
  22. package/dist/dev/{templateRef-GsGuFvwE.mjs.map → templateRef-3tUik_sj.mjs.map} +1 -1
  23. package/dist/dev/{toRefs-DrE7KHlW.mjs → toRefs-C9gCs6N3.mjs} +2 -2
  24. package/dist/dev/{toRefs-DrE7KHlW.mjs.map → toRefs-C9gCs6N3.mjs.map} +1 -1
  25. package/dist/dev/vue-demi.mjs +10 -10
  26. package/dist/dev/{watch-CqXsBjp3.mjs → watch-CJiD9u34.mjs} +3 -3
  27. package/dist/dev/{watch-CqXsBjp3.mjs.map → watch-CJiD9u34.mjs.map} +1 -1
  28. package/dist/index.mjs +1 -1
  29. package/dist/internal-runtime.mjs +1 -1
  30. package/dist/{templateRef-D5kOrMIX.mjs → templateRef-DH3fN9wZ.mjs} +1 -1
  31. package/dist/vue-demi.mjs +1 -1
  32. package/package.json +2 -2
@@ -1 +1 @@
1
- import{A as e,C as t,N as n,P as r,a as i,b as a,d as o,g as s,h as c,i as l,j as u,k as d,l as f,m as p,n as m,o as h,p as g,r as _,s as v,t as y,w as b,x,y as S}from"./ref-CRwjgX_d.mjs";import{t as C}from"./computed-DdPJb4_M.mjs";import{_ as w,c as T,d as E,g as D,h as O,l as k,m as A,n as j,p as M,r as N,s as P,t as F,u as I,v as L,x as R}from"./base-D-o2Hv6z.mjs";import{l as z,t as B}from"./watch-6_s3_f8q.mjs";import{C as V,D as H,E as ee,H as te,M as U,N as W,O as G,S as ne,T as re,V as ie,X as ae,b as oe,et as K,k as se,w as ce,x as le,y as ue}from"./router-BiJKkvy7.mjs";import{WEVU_ATTRS_KEY as de,WEVU_EFFECT_SCOPE_KEY as fe,WEVU_EXPOSED_KEY as pe,WEVU_FUNCTION_PROP_PATHS_KEY as me,WEVU_HOOKS_KEY as he,WEVU_INLINE_HANDLER as ge,WEVU_INLINE_MAP_KEY as _e,WEVU_IS_APP_INSTANCE_KEY as ve,WEVU_LAYOUT_BRIDGE_PAGE_KEYS as ye,WEVU_LAYOUT_HOST_BRIDGE_KEY as q,WEVU_MODEL_HANDLER as be,WEVU_NATIVE_INSTANCE_KEY as J,WEVU_ON_BEFORE_UPDATE_HOOK as xe,WEVU_ON_LOAD_CALLED_KEY as Se,WEVU_ON_UPDATED_HOOK as Y,WEVU_OWNER_HANDLER as Ce,WEVU_PAGE_LAYOUT_NAME_KEY as we,WEVU_PAGE_LAYOUT_NONE as Te,WEVU_PAGE_LAYOUT_PROPS_KEY as Ee,WEVU_PAGE_LAYOUT_SETTER_KEY as De,WEVU_PAGE_SCROLL_HOOK_DEPTH_KEY as Oe,WEVU_PARENT_INSTANCE_KEY as ke,WEVU_PENDING_PROP_VALUES_KEY as Ae,WEVU_PROPS_ALIASES_KEY as je,WEVU_PROPS_DERIVED_KEYS_KEY as X,WEVU_PROPS_KEY as Z,WEVU_PROP_KEYS_KEY as Me,WEVU_PUBLIC_RUNTIME_KEY as Ne,WEVU_READY_CALLED_KEY as Pe,WEVU_RESERVED_METHOD_PREFIX as Fe,WEVU_ROUTE_DONE_CALLED_KEY as Ie,WEVU_ROUTE_DONE_IN_TICK_KEY as Le,WEVU_RUNTIME_APP_KEY as Re,WEVU_RUNTIME_KEY as ze,WEVU_SCOPED_SLOT_CREATOR_KEY as Be,WEVU_SCOPED_SLOT_OWNER_SEED_KEY as Ve,WEVU_SCOPED_SLOT_OWNER_STORE_KEY as He,WEVU_SETUP_CONTEXT_INSTANCE_KEY as Ue,WEVU_SETUP_STATE_KEY as We,WEVU_SLOT_NAMES_PROP as Ge,WEVU_SLOT_OWNER_ID_KEY as Ke,WEVU_SLOT_OWNER_ID_PROP as qe,WEVU_SLOT_OWNER_KEY as Je,WEVU_SLOT_OWNER_PROXY_KEY as Ye,WEVU_SLOT_PROPS_DATA_KEY as Xe,WEVU_SLOT_PROPS_KEY as Ze,WEVU_SLOT_SCOPE_KEY as Qe,WEVU_TEMPLATE_REFS_CALLBACKS_KEY as $e,WEVU_TEMPLATE_REFS_KEY as et,WEVU_TEMPLATE_REFS_PENDING_KEY as tt,WEVU_TEMPLATE_REF_MAP_KEY as nt,WEVU_WATCH_STOPS_KEY as rt}from"@weapp-core/constants";import{resolveMiniProgramPageKeys as it}from"@weapp-core/shared";import{wpi as at}from"@wevu/api";function ot(e){k(F(`onMounted`),`onReady`,e)}function st(e){k(F(`onUpdated`),Y,e)}function ct(e){F(`onBeforeUnmount`),e()}function lt(e){k(F(`onUnmounted`),`onUnload`,e)}function ut(e){F(`onBeforeMount`),e()}function dt(e){k(F(`onBeforeUpdate`),xe,e)}function ft(e){let t=F(`onErrorCaptured`);k(t,`onError`,n=>e(n,t,``))}function pt(e){k(F(`onActivated`),`onShow`,e)}function mt(e){k(F(`onDeactivated`),`onHide`,e)}function ht(e){F(`onServerPrefetch`)}function gt(e,t){j(e,t===`before`?xe:Y)}const _t=`6.16.37`;function vt(e){return e?e.charAt(0).toUpperCase()+e.slice(1):``}function yt(e){return e?e.split(`.`).map(e=>e.trim()).filter(Boolean):[]}function Q(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function bt(e,t,n){let r=e[t];if(!r)throw Error(`计算属性 "${t}" 是只读的`);r(n)}function xt(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 St(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 Ct(e,t,n,r,i,a){if(!i.length)return;let[o,...s]=i;if(!s.length){if(n[o])bt(r,o,a);else{let n=t&&Object.prototype.hasOwnProperty.call(t,o)?t:e,r=n[o];m(r)?r.value=a:n[o]=a}return}if(n[o]){bt(r,o,a);return}let c=t&&Object.prototype.hasOwnProperty.call(t,o)?t:e;(c[o]==null||typeof c[o]!=`object`)&&(c[o]={}),St(c[o],s,a)}function wt(e,t){return t.reduce((e,t)=>e==null?e:e[t],e)}function Tt(e){return xt(e)}function Et(e,t,n,r,i){return(a,o)=>{let s=yt(a);if(!s.length)throw Error(`bindModel 需要非空路径`);let c=()=>wt(e,s),l=e=>{Ct(t,i,n,r,s,e)},u={event:`input`,valueProp:`value`,parser:Tt,formatter:e=>e,...o};return{get value(){return c()},set value(e){l(e)},update(e){l(e)},model(e){let t={...u,...e},n=`on${vt(t.event)}`,r=e=>{l(t.parser(e))};return{[t.valueProp]:t.formatter(c()),[n]:r}}}}}function Dt(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function Ot(e){return Array.isArray(e)||Dt(e)}function kt(e){if(Array.isArray(e))return e;let t=[];for(let n of Object.keys(e)){let r=Object.getOwnPropertyDescriptor(e,n);!r||typeof r.get==`function`||t.push(r.value)}return t}function At(e,t=new WeakSet){return m(e)||f(e)?!0:!e||typeof e!=`object`||t.has(e)||(t.add(e),!Ot(e))?!1:kt(e).some(e=>At(e,t))}function jt(e,t=new WeakSet){if(m(e)){let n=e.value;f(n)&&s(n),jt(n,t);return}if(f(e)){s(e),jt(S(e),t);return}!e||typeof e!=`object`||t.has(e)||!Ot(e)||(t.add(e),kt(e).forEach(e=>jt(e,t)))}const Mt=`__wevu_native_bridge__`;function Nt(e){try{Object.defineProperty(e,Mt,{value:!0,configurable:!1,enumerable:!1,writable:!1})}catch(t){e[Mt]=!0}}function Pt(e){return typeof e==`function`&&!!e[Mt]}function Ft(n){let r=Object.create(null),i=Object.create(null),a=new Set;return{computedRefs:r,computedSetters:i,dirtyComputedKeys:a,createTrackedComputed:(r,i,o)=>{let s,c=!0,l,d={get value(){return c&&(s=l(),c=!1),e(d,`value`),s},set value(e){if(!o)throw Error(`计算属性是只读的`);o(e)}};return _(d),l=t(i,{lazy:!0,scheduler:()=>{c||(c=!0,n.setDataStrategy===`patch`&&n.includeComputed&&a.add(r),u(d,`value`))}}),d},computedProxy:new Proxy({},{get(e,t){if(typeof t==`string`&&r[t])return r[t].value},has(e,t){return typeof t==`string`&&!!r[t]},ownKeys(){return Object.keys(r)},getOwnPropertyDescriptor(e,t){if(typeof t==`string`&&r[t])return{configurable:!0,enumerable:!0,value:r[t].value}}})}}function It(e){let{state:t,setupState:n,computedDefs:r,methodDefs:i,appConfig:a,includeComputed:o,setDataStrategy:s}=e,c={},{computedRefs:u,computedSetters:d,dirtyComputedKeys:f,createTrackedComputed:p,computedProxy:h}=Ft({includeComputed:o,setDataStrategy:s}),g=l(0),_=(e,t)=>{let n=S(e),r=n[ze],i=r==null?void 0:r.proxy,a=(e,t)=>{let n=e[t];return Pt(n)},o=n=>!(!n||typeof n!=`object`||n===e||n===t||n===i||a(n,`triggerEvent`)||a(n,`createSelectorQuery`)||a(n,`createIntersectionObserver`)||a(n,`setData`)),s=n[J];if(o(s))return s;let c=r==null?void 0:r.instance;if(o(c))return c},v=e=>{if(Q(c,e))return;let n=(...n)=>{let r=_(t,t);if(!r)return;let i=Reflect.get(r,e);if(typeof i==`function`)return i.apply(r,n)};Nt(n),c[e]=n},y=new Proxy(t,{get(e,r,i){if(typeof r==`string`){if(g.value,Q(n,r))return Reflect.get(n,r,i);if(r===`props`){let t=e[Z];if(t&&typeof t==`object`)return t}if(r===`data`||r===`$state`)return t;if(r===`$computed`)return h;if(Q(c,r))return c[r];if(u[r])return u[r].value;if(Q(a.globalProperties,r))return a.globalProperties[r]}if(!Reflect.has(e,r)){let t=_(e,i);if(t&&Reflect.has(t,r)){let e=Reflect.get(t,r);return typeof e==`function`?e.bind(t):e}}let o=Reflect.get(e,r,i);return typeof r==`string`&&Q(n,r)?Reflect.get(n,r,i):o},set(e,t,r,i){if(typeof t==`string`&&u[t])return bt(d,t,r),!0;if(Q(n,t)){let e=Reflect.get(n,t,i);return m(e)&&!m(r)?(e.value=r,!0):Reflect.set(n,t,r,i)}if(Reflect.has(e,t)){var a;let o=Reflect.get(e,t,i);return m(o)&&!m(r)?(o.value=r,!0):Q((a=e[Z])==null?{}:a,t)?Reflect.set(n,t,r,i):Reflect.set(e,t,r,i)}let o=_(e,i);return o&&Reflect.has(o,t)?Reflect.set(o,t,r):Reflect.set(e,t,r,i)},has(e,t){if(t===`data`||typeof t==`string`&&(Q(n,t)||u[t]||Q(c,t)))return!0;let r=_(e,e);return r&&Reflect.has(r,t)?!0:Reflect.has(e,t)},ownKeys(e){let t=new Set;return Reflect.ownKeys(e).forEach(e=>{t.add(e)}),Reflect.ownKeys(n).forEach(e=>{t.add(e)}),Object.keys(c).forEach(e=>t.add(e)),Object.keys(u).forEach(e=>t.add(e)),[...t]},getOwnPropertyDescriptor(e,r){if(typeof r==`string`&&Q(n,r))return Object.getOwnPropertyDescriptor(n,r);if(Reflect.has(e,r))return Object.getOwnPropertyDescriptor(e,r);if(typeof r==`string`){if(r===`data`)return{configurable:!0,enumerable:!1,get(){return t}};if(u[r])return{configurable:!0,enumerable:!0,get(){return u[r].value},set(e){bt(d,r,e)}};if(Q(c,r))return{configurable:!0,enumerable:!1,value:c[r]}}}});return Object.keys(i).forEach(e=>{let t=i[e];if(typeof t==`function`){c[e]=(...e)=>t.apply(y,e);return}e===_e&&t&&typeof t==`object`&&(c[e]=t)}),v(`triggerEvent`),v(`createSelectorQuery`),v(`createIntersectionObserver`),v(`setData`),Object.keys(r).forEach(e=>{let t=r[e];if(typeof t==`function`)u[e]=p(e,()=>t.call(y));else{var n,i;let r=(n=t.get)==null?void 0:n.bind(y);if(!r)throw Error(`计算属性 "${e}" 需要提供 getter`);let a=(i=t.set)==null?void 0:i.bind(y);a?(d[e]=a,u[e]=p(e,r,a)):u[e]=p(e,r)}}),{boundMethods:c,computedRefs:u,computedSetters:d,dirtyComputedKeys:f,computedProxy:h,publicInstance:y,touchSetupMethodsVersion(){g.value+=1}}}function Lt(e){return e!==`patch`&&e!==`diff`}function Rt(e){if(e!==`off`)return t=>{if(e===`fallback`&&!Lt(t.reason))return;let n=typeof t.bytes==`number`?t.bytes:t.estimatedBytes,r=typeof n==`number`?`${n}B`:`unknown`,i=[`mode=${t.mode}`,`reason=${t.reason}`,`pending=${t.pendingPatchKeys}`,`keys=${t.payloadKeys}`,`bytes=${r}`];typeof t.mergedSiblingParents==`number`&&i.push(`mergedParents=${t.mergedSiblingParents}`),typeof t.computedDirtyKeys==`number`&&i.push(`computedDirty=${t.computedDirtyKeys}`);let a=`[wevu:setData] ${i.join(` `)}`;if(Lt(t.reason)){console.warn(a);return}console.info(a)}}const zt=Symbol(`wevu.noSetData`);function $(e){return Object.defineProperty(e,zt,{value:!0,configurable:!0,enumerable:!1,writable:!1}),e}function Bt(e){return typeof e==`object`&&!!e&&e[zt]===!0}function Vt(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function Ht(e,t,n,r,i,a,o,s,c,l){let u=h(e);if(typeof u==`bigint`){let e=Number(u);return Number.isSafeInteger(e)?e:u.toString()}if(typeof u==`symbol`)return u.toString();if(typeof u==`function`)return s||c!=null&&c.has(l)?u:void 0;if(typeof u!=`object`||!u)return u;if(Bt(u))return;let d=f(u),p=d?S(u):u,m=!!r&&d;if(r&&!m){let e=i==null?void 0:i.get(p);m=e==null?!At(p):e,i==null||i.set(p,m)}let g=m?r:void 0;if(a<=0||o.keys<=0)return p;if(g){let e=v(p),t=g.get(p);if(t&&t.version===e)return t.value}if(n.has(p))return;if(t.has(p))return t.get(p);if(p instanceof Date)return p.getTime();if(p instanceof RegExp)return p.toString();if(p instanceof Map){let e=[];return t.set(p,e),n.add(p),p.forEach((r,i)=>{e.push([Ht(i,t,n,void 0,void 0,1/0,{keys:1/0},s,void 0,``),Ht(r,t,n,void 0,void 0,1/0,{keys:1/0},s,void 0,``)])}),n.delete(p),e}if(p instanceof Set){let e=[];return t.set(p,e),n.add(p),p.forEach(r=>{e.push(Ht(r,t,n,void 0,void 0,1/0,{keys:1/0},s,void 0,``))}),n.delete(p),e}if(typeof ArrayBuffer<`u`){if(p instanceof ArrayBuffer)return p.byteLength;if(ArrayBuffer.isView(p)){let e=p;if(typeof e[Symbol.iterator]==`function`){let r=[...e];return t.set(p,r),r.map(e=>Ht(e,t,n,void 0,void 0,1/0,{keys:1/0},s,void 0,``))}let r=[...new Uint8Array(e.buffer,e.byteOffset,e.byteLength)];return t.set(p,r),r}}if(p instanceof Error)return{name:p.name,message:p.message};if(Array.isArray(p)){let e=[];t.set(p,e),n.add(p);let u=a-1;for(let a=0;a<p.length;a+=1){let d=l?`${l}.${a}`:String(a),f=Ht(p[a],t,n,r,i,u,o,s,c,d);e[a]=f===void 0?null:f}return n.delete(p),g&&g.set(p,{version:v(p),value:e}),e}let _={};t.set(p,_),n.add(p);let y=a-1;for(let e of Object.keys(p)){if(--o.keys,o.keys<=0)break;let a=l?`${l}.${e}`:e,u=Ht(p[e],t,n,r,i,y,o,s,c,a);u!==void 0&&(_[e]=u)}return n.delete(p),g&&g.set(p,{version:v(p),value:_}),_}function Ut(e,t=new WeakMap,n){var r,i,a;let o=(r=n==null?void 0:n._depth)==null?typeof(n==null?void 0:n.maxDepth)==`number`?Math.max(0,Math.floor(n.maxDepth)):1/0:r,s=(i=n==null?void 0:n._budget)==null?typeof(n==null?void 0:n.maxKeys)==`number`?{keys:Math.max(0,Math.floor(n.maxKeys))}:{keys:1/0}:i,c=Array.isArray(n==null?void 0:n.functionPaths)&&n.functionPaths.length?new Set(n.functionPaths):void 0;return Ht(e,t,new WeakSet,n==null?void 0:n.cache,n==null?void 0:n.cacheEligibility,o,s,!!(n!=null&&n.includeFunctions),c,(a=n==null?void 0:n._path)==null?``:a)}function Wt(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 Gt(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(!Q(t,i)||!n(e[i],t[i]))return!1;return!0}function Kt(e,t){return Object.is(e,t)?!0:Array.isArray(e)&&Array.isArray(t)?Wt(e,t,Kt):Vt(e)&&Vt(t)?Gt(e,t,Kt):!1}function qt(e){return e===void 0?null:e}function Jt(e,t,n,r){if(!Kt(e,t)){if(Vt(e)&&Vt(t)){for(let i of Object.keys(t)){if(!Q(e,i)){r[`${n}.${i}`]=qt(t[i]);continue}Jt(e[i],t[i],`${n}.${i}`,r)}for(let i of Object.keys(e))Q(t,i)||(r[`${n}.${i}`]=null);return}if(Array.isArray(e)&&Array.isArray(t)){Wt(e,t,Kt)||(r[n]=qt(t));return}r[n]=qt(t)}}function Yt(e,t,n){let r={},i=n==null?void 0:n.skipKeys;for(let n of Object.keys(t))i!=null&&i.has(n)||Jt(e[n],t[n],n,r);for(let n of Object.keys(e))i!=null&&i.has(n)||Q(t,n)||(r[n]=null);return r}function Xt(e){let t=Object.keys(e).sort();if(t.length<=1)return e;let n={},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 Zt(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+=Zt(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+=Zt(a,t-i,n),i>t)return i;return i}function Qt(e,t){if(t===1/0)return{fallback:!1,estimatedBytes:void 0,bytes:void 0};let n=t,r=Object.keys(e).length,i=Zt(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(e){return{fallback:!1,estimatedBytes:i,bytes:void 0}}return{fallback:!1,estimatedBytes:i,bytes:void 0}}function $t(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){var d;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=(d=l.get(a))==null?[]:d;o.push(e),l.set(a,o)}let f=[...l.entries()].filter(([e,t])=>t.length>=i&&!u.has(e)).sort((e,t)=>t[0].split(`.`).length-e[0].split(`.`).length);if(!f.length)return{out:t,merged:0};let p={};Object.assign(p,t);let m=0,h=new WeakMap,g=e=>{if(e&&typeof e==`object`){let t=h.get(e);if(t!==void 0)return t;let n=Zt(e,1/0,new WeakSet);return h.set(e,n),n}return Zt(e,1/0,new WeakSet)},_=(e,t)=>2+e.length+1+g(t);for(let[e,t]of f){if(Q(p,e))continue;let n=t.filter(e=>Q(p,e));if(n.length<i)continue;let c=r(e);if(!(a&&Array.isArray(c))&&!(o!==1/0&&_(e,c)>o)){if(s!==1/0){let t=0;for(let e of n)t+=_(e,p[e]);if(_(e,c)>t*s)continue}p[e]=c;for(let e of n)delete p[e];m+=1}}return{out:p,merged:m}}function en(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function tn(e){return e===void 0?null:e}function nn(e){if(Array.isArray(e))return e.map(e=>nn(e));if(!en(e))return e;let t={};for(let n of Object.keys(e))t[n]=nn(e[n]);return t}function rn(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(!en(e)||!en(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(!Q(t,r)||!Object.is(e[r],t[r]))return!1;return!0}function an(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(!an(e[i],t[i],n-1,r))return!1;return!0}if(!en(e)||!en(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||!Q(t,a)||!an(e[a],t[a],n-1,r))return!1;return!0}function on(e,t,n,r,i){var a;let o=(a=i==null?void 0:i.cloneValue)==null?!0:a,s=t.split(`.`).filter(Boolean);if(!s.length)return;let c=e;for(let e=0;e<s.length-1;e++){let t=s[e];(!Q(c,t)||c[t]==null||typeof c[t]!=`object`)&&(c[t]={}),c=c[t]}let l=s[s.length-1];if(r===`delete`)try{delete c[l]}catch(e){c[l]=null}else c[l]=o?nn(n):n}function sn(e){let{state:t,setupState:n,computedRefs:r,includeComputed:i,shouldIncludeKey:a,plainCache:o,plainCacheEligibility:s,toPlainMaxDepth:c,toPlainMaxKeys:l,includeFunctions:u=!1,functionPaths:d=[]}=e,p=new WeakMap,m={},h=Number.isFinite(l)?{keys:l}:void 0,g=f(t)?S(t):t,_=n&&typeof n==`object`?f(n)?S(n):n:void 0,v=Object.keys(g),y=_?Object.keys(_):[],b=i?Object.keys(r):[];for(let e of v)a(e)&&(m[e]=Ut(g[e],p,{cache:o,cacheEligibility:s,maxDepth:c,includeFunctions:u,functionPaths:d,_budget:h,_path:e}));for(let e of y)a(e)&&(m[e]=Ut(_[e],p,{cache:o,cacheEligibility:s,maxDepth:c,includeFunctions:u,functionPaths:d,_budget:h,_path:e}));for(let e of b)a(e)&&(m[e]=Ut(r[e].value,p,{cache:o,cacheEligibility:s,maxDepth:c,includeFunctions:u,functionPaths:d,_budget:h,_path:e}));return m}function cn(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,includeFunctions:y=!1,functionPaths:b,plainCache:x,plainCacheEligibility:S,pendingPatches:C,fallbackTopKeys:w,latestSnapshot:T,latestComputedSnapshot:E,needsFullSnapshot:D,emitDebug:O,runDiffUpdate:k}=e;if(C.size>u){D.value=!0;let e=C.size;C.clear(),r.clear(),O({mode:`diff`,reason:`maxPatchKeys`,pendingPatchKeys:e,payloadKeys:0}),k(`maxPatchKeys`);return}let A=new WeakMap,j=new Map,M=Object.create(null),N=[...C.entries()];if(Number.isFinite(g)&&g>0){let e=new Map;for(let[t]of N){var P;let n=t.split(`.`,1)[0];e.set(n,((P=e.get(n))==null?0:P)+1)}for(let[t,n]of e)n>=g&&w.add(t)}let F=N.filter(([e])=>{for(let t of w)if(e===t||e.startsWith(`${t}.`))return!1;return!0}),I=new Map(F);C.clear();let L=e=>{let n=e.split(`.`).filter(Boolean),r=t;for(let e of n){if(r==null)return r;r=r[e]}return r},R=e=>{if(j.has(e))return j.get(e);let t=tn(Ut(L(e),A,{cache:x,cacheEligibility:S,maxDepth:_,maxKeys:v,includeFunctions:y,functionPaths:b,_path:e}));return j.set(e,t),t};if(w.size){for(let e of w)l(e)&&(M[e]=R(e),I.set(e,{kind:`property`,op:`set`}));w.clear()}for(let[e,t]of F){if((t.kind===`array`?`set`:t.op)===`delete`){M[e]=null;continue}M[e]=R(e)}let z=0;if(i&&r.size){let e=Object.create(null),t=[...r];r.clear(),z=t.length;for(let r of t){if(!l(r))continue;let t=Ut(n[r].value,A,{cache:x,cacheEligibility:S,maxDepth:_,maxKeys:v,includeFunctions:y,functionPaths:b,_path:r}),i=E[r];(a===`deep`?an(i,t,o,{keys:s}):a===`shallow`?rn(i,t):Object.is(i,t))||(e[r]=tn(t),E[r]=nn(t))}Object.assign(M,e)}let B=Xt(M),V=0;if(f){let e=$t({input:B,entryMap:I,getPlainByPath:R,mergeSiblingThreshold:f,mergeSiblingSkipArray:h,mergeSiblingMaxParentBytes:m,mergeSiblingMaxInflationRatio:p});V=e.merged,B=Xt(e.out)}let H=Qt(B,d),ee=H.fallback;if(O({mode:ee?`diff`:`patch`,reason:ee?`maxPayloadBytes`:`patch`,pendingPatchKeys:F.length,payloadKeys:Object.keys(B).length,mergedSiblingParents:V||void 0,computedDirtyKeys:z||void 0,estimatedBytes:H.estimatedBytes,bytes:H.bytes}),ee){D.value=!0,C.clear(),r.clear(),k(`maxPayloadBytes`);return}if(Object.keys(B).length){for(let[e,t]of Object.entries(B)){let n=I.get(e);n?on(T,e,t,n.kind===`array`?`set`:n.op,{cloneValue:!1}):on(T,e,t,`set`,{cloneValue:!1})}if(typeof c.setData==`function`){let e=c.setData(B);e&&typeof e.then==`function`&&e.catch(()=>{})}O({mode:`patch`,reason:`patch`,pendingPatchKeys:F.length,payloadKeys:Object.keys(B).length})}}function ln(e){let{state:t,setupState:n,snapshotOmitKeys:r,computedRefs:i,dirtyComputedKeys:a,includeComputed:o,setDataStrategy:s,computedCompare:c,computedCompareMaxDepth:l,computedCompareMaxKeys:u,currentAdapter:d,shouldIncludeKey:p,maxPatchKeys:h,maxPayloadBytes:g,mergeSiblingThreshold:_,mergeSiblingMaxInflationRatio:y,mergeSiblingMaxParentBytes:b,mergeSiblingSkipArray:x,elevateTopKeyThreshold:C,toPlainMaxDepth:w,toPlainMaxKeys:T,includeFunctions:E=!1,functionPaths:D,debug:O,debugWhen:k,debugSampleRate:A,runTracker:j,isMounted:M,initialSnapshot:N}=e,P=new WeakMap,F=new WeakMap,I={},L=Object.create(null),R=Object.create(null),z=Object.create(null),B={value:s===`patch`},V=new Map,H=new Set,ee=e=>{if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype},te=(e,t)=>{if(Object.is(e,t))return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length?e.every((e,n)=>te(e,t[n])):!1;if(ee(e)&&ee(t)){let n=Object.keys(e),r=Object.keys(t);return n.length===r.length?n.every(n=>Q(t,n)&&te(e[n],t[n])):!1}return!1},U=e=>{let t=m(e)?e.value:e;if(typeof t!=`object`||!t)return t;if(!f(t)&&At(t))return{snapshot:Ut(t,new WeakMap,{cacheEligibility:F,maxDepth:w,maxKeys:T,includeFunctions:E,functionPaths:D})};let n=f(t)?S(t):t;return{raw:n,version:v(n)}},W=(e,t)=>Object.is(e,t)?!0:!e||!t||typeof e!=`object`||typeof t!=`object`||!Q(e,`raw`)||!Q(t,`raw`)?e&&t&&typeof e==`object`&&typeof t==`object`&&Q(e,`snapshot`)&&Q(t,`snapshot`)?te(e.snapshot,t.snapshot):!1:e.raw===t.raw&&e.version===t.version,G=e=>p(e)&&!(r!=null&&r.has(e));if(N)for(let[e,t]of Object.entries(N))G(e)&&(I[e]=t);let ne=()=>{if(!N)return;let e=f(t)?S(t):t,r=n&&typeof n==`object`?f(n)?S(n):n:void 0;for(let t of Object.keys(N))if(G(t)){if(r&&Q(r,t)){R[t]=U(r[t]);continue}Q(e,t)&&(e[t]=N[t],R[t]=U(e[t]))}},re=e=>{let r=[],i=n&&typeof n==`object`?f(n)?S(n):n:void 0;for(let n of new Set([...Object.keys(t),...i?Object.keys(i):[]])){if(!G(n))continue;let a=i&&Q(i,n)?i[n]:t[n],o=m(a)?a.value:a;!o||typeof o!=`object`||S(o)===e&&r.push(n)}return r},ie=e=>{if(!O)return;let t=e.reason!==`patch`&&e.reason!==`diff`;if(!(k===`fallback`&&!t)&&!(A<1&&Math.random()>A))try{O(e)}catch(e){}},ae=()=>sn({state:t,setupState:n,computedRefs:i,includeComputed:o,shouldIncludeKey:G,plainCache:P,plainCacheEligibility:F,toPlainMaxDepth:w,toPlainMaxKeys:T,includeFunctions:E,functionPaths:D});ne();let oe=()=>{let e=f(t)?S(t):t,r=n&&typeof n==`object`?f(n)?S(n):n:void 0,a={...I},s=new WeakMap,c=new Set,l=new Set,u=new Set;for(let t of new Set([...Object.keys(e),...r?Object.keys(r):[]])){if(!G(t))continue;c.add(t);let n=r&&Q(r,t)?r:e,i=U(n[t]),o=R[t];o&&i&&typeof o==`object`&&typeof i==`object`&&Q(o,`raw`)&&Q(i,`raw`)&&Array.isArray(o.raw)&&Array.isArray(i.raw)&&o.raw!==i.raw&&u.add(t),(!W(o,i)||!Q(I,t))&&(a[t]=Ut(n[t],s,{cache:P,cacheEligibility:F,maxDepth:w,maxKeys:T,includeFunctions:E,functionPaths:D,_path:t})),R[t]=i}for(let e of Object.keys(R))c.has(e)||(delete R[e],(!o||!Q(i,e))&&delete a[e]);if(!o){for(let e of Object.keys(z))delete z[e];return{snapshot:a,replacedTopLevelKeys:u}}for(let e of Object.keys(i)){if(!G(e))continue;l.add(e);let t=i[e].value,n=U(t);(!W(z[e],n)||!Q(I,e))&&(a[e]=Ut(t,s,{cache:P,cacheEligibility:F,maxDepth:w,maxKeys:T,includeFunctions:E,functionPaths:D,_path:e})),z[e]=n}for(let t of Object.keys(z))l.has(t)||(delete z[t],(!Q(e,t)||!G(t))&&delete a[t]);return{snapshot:a,replacedTopLevelKeys:u}},K=(e=`diff`)=>{var t;let n=s===`diff`?oe():void 0,r=(t=n==null?void 0:n.snapshot)==null?ae():t,c=n?(()=>{let e={};for(let t of n.replacedTopLevelKeys)e[t]=r[t];return{...Yt(I,r,{skipKeys:n.replacedTopLevelKeys}),...e}})():Yt(I,r);if(I=r,B.value=!1,V.clear(),s===`patch`&&o){L=Object.create(null);for(let e of Object.keys(i))G(e)&&(L[e]=r[e]);a.clear()}if(Object.keys(c).length){if(typeof d.setData==`function`){let e=d.setData(c);e&&typeof e.then==`function`&&e.catch(()=>{})}ie({mode:`diff`,reason:e,pendingPatchKeys:0,payloadKeys:Object.keys(c).length})}};return{job:e=>{if(M())if(j(),s===`patch`&&!B.value){if(!(V.size>0||H.size>0||o&&a.size>0)){K(`diff`);return}cn({state:t,computedRefs:i,dirtyComputedKeys:a,includeComputed:o,computedCompare:c,computedCompareMaxDepth:l,computedCompareMaxKeys:u,currentAdapter:d,shouldIncludeKey:G,maxPatchKeys:h,maxPayloadBytes:g,mergeSiblingThreshold:_,mergeSiblingMaxInflationRatio:y,mergeSiblingMaxParentBytes:b,mergeSiblingSkipArray:x,elevateTopKeyThreshold:C,toPlainMaxDepth:w,toPlainMaxKeys:T,includeFunctions:E,functionPaths:D,plainCache:P,plainCacheEligibility:F,pendingPatches:V,fallbackTopKeys:H,latestSnapshot:I,latestComputedSnapshot:L,needsFullSnapshot:B,emitDebug:ie,runDiffUpdate:K})}else K(B.value?`needsFullSnapshot`:`diff`)},mutationRecorder:(e,t)=>{if(!M())return;if(e.root!==t){let t=re(e.root);if(t.length)for(let e of t)H.add(e);return}if(!e.path){if(Array.isArray(e.fallbackTopKeys)&&e.fallbackTopKeys.length)for(let t of e.fallbackTopKeys)H.add(t);else B.value=!0;return}let n=e.path.split(`.`,1)[0];G(n)&&V.set(e.path,{kind:e.kind,op:e.op})},snapshot:()=>s===`patch`?ae():{...I},cloneLatestSnapshot:()=>({...I}),getLatestSnapshot:()=>I}}function un(e){var t,n,r,i,a,o,s;let c=(t=e==null?void 0:e.includeComputed)==null?!0:t,l=(n=e==null?void 0:e.suspendWhenHidden)==null?!1:n,u=(r=e==null?void 0:e.strategy)==null?`diff`:r,d=typeof(e==null?void 0:e.maxPatchKeys)==`number`?Math.max(0,e.maxPatchKeys):1/0,f=typeof(e==null?void 0:e.maxPayloadBytes)==`number`?Math.max(0,e.maxPayloadBytes):1/0,p=typeof(e==null?void 0:e.mergeSiblingThreshold)==`number`?Math.max(2,Math.floor(e.mergeSiblingThreshold)):0,m=typeof(e==null?void 0:e.mergeSiblingMaxInflationRatio)==`number`?Math.max(0,e.mergeSiblingMaxInflationRatio):1.25,h=typeof(e==null?void 0:e.mergeSiblingMaxParentBytes)==`number`?Math.max(0,e.mergeSiblingMaxParentBytes):1/0,g=(i=e==null?void 0:e.mergeSiblingSkipArray)==null?!0:i,_=(a=e==null?void 0:e.computedCompare)==null?u===`patch`?`deep`:`reference`:a,v=typeof(e==null?void 0:e.computedCompareMaxDepth)==`number`?Math.max(0,Math.floor(e.computedCompareMaxDepth)):4,y=typeof(e==null?void 0:e.computedCompareMaxKeys)==`number`?Math.max(0,Math.floor(e.computedCompareMaxKeys)):200,b=e==null?void 0:e.prelinkMaxDepth,x=e==null?void 0:e.prelinkMaxKeys,S=e==null?void 0:e.debug,C=(o=e==null?void 0:e.diagnostics)==null?`off`:o,w=(s=e==null?void 0:e.debugWhen)==null?`fallback`:s,T=typeof(e==null?void 0:e.debugSampleRate)==`number`?Math.min(1,Math.max(0,e.debugSampleRate)):1,E=typeof(e==null?void 0:e.elevateTopKeyThreshold)==`number`?Math.max(0,Math.floor(e.elevateTopKeyThreshold)):1/0,D=typeof(e==null?void 0:e.toPlainMaxDepth)==`number`?Math.max(0,Math.floor(e.toPlainMaxDepth)):1/0,O=typeof(e==null?void 0:e.toPlainMaxKeys)==`number`?Math.max(0,Math.floor(e.toPlainMaxKeys)):1/0,k=!!(e!=null&&e.includeFunctions),A=Array.isArray(e==null?void 0:e.functionPaths)?[...new Set(e.functionPaths.filter(e=>typeof e==`string`&&e.length>0))]:[],j=Array.isArray(e==null?void 0:e.pick)&&e.pick.length>0?new Set(e.pick):void 0,M=Array.isArray(e==null?void 0:e.omit)&&e.omit.length>0?new Set(e.omit):void 0;return{includeComputed:c,suspendWhenHidden:l,setDataStrategy:u,maxPatchKeys:d,maxPayloadBytes:f,mergeSiblingThreshold:p,mergeSiblingMaxInflationRatio:m,mergeSiblingMaxParentBytes:h,mergeSiblingSkipArray:g,computedCompare:_,computedCompareMaxDepth:v,computedCompareMaxKeys:y,prelinkMaxDepth:b,prelinkMaxKeys:x,debug:S,diagnostics:C,debugWhen:w,debugSampleRate:T,elevateTopKeyThreshold:E,toPlainMaxDepth:D,toPlainMaxKeys:O,includeFunctions:k,functionPaths:A,pickSet:j,omitSet:M,shouldIncludeKey:e=>!(j&&!j.has(e)||M&&M.has(e))}}function dn(e,t){let n=(()=>{e()});return n.stop=()=>n(),n.pause=()=>{var e;t==null||(e=t.pause)==null||e.call(t)},n.resume=()=>{var e;t==null||(e=t.resume)==null||e.call(t)},n}function fn(e){return typeof e==`function`?e():e==null?{}:e}function pn(e){let{data:n,resolvedComputed:i,resolvedMethods:l,appConfig:u,setDataOptions:m}=e;return e=>{let h=fn(n);if(h&&typeof h==`object`&&!Q(h,Z))try{Object.defineProperty(h,Z,{value:g(Object.create(null)),configurable:!0,enumerable:!1,writable:!1})}catch(e){}let _=o(h),v=o(Object.create(null)),y=e==null?void 0:e.__wevu_snapshotOmitKeys,b=!!(e!=null&&e.__wevu_deferInitialSnapshot),C=e==null?void 0:e.__wevu_initialSnapshot,w=new Set(y instanceof Set||Array.isArray(y)?y:[]);if(h&&typeof h==`object`&&!Q(h,We))try{Object.defineProperty(h,We,{value:v,configurable:!0,enumerable:!1,writable:!1})}catch(e){}let T=i,E=l,D=!0,O=[],k=new Set;Object.keys(_).forEach(e=>{let t=_[e];At(t)&&k.add(e)});let{includeComputed:A,setDataStrategy:j,maxPatchKeys:M,maxPayloadBytes:N,mergeSiblingThreshold:P,mergeSiblingMaxInflationRatio:F,mergeSiblingMaxParentBytes:I,mergeSiblingSkipArray:L,computedCompare:R,computedCompareMaxDepth:z,computedCompareMaxKeys:V,prelinkMaxDepth:H,prelinkMaxKeys:ee,debug:te,diagnostics:U,debugWhen:W,debugSampleRate:G,elevateTopKeyThreshold:ne,toPlainMaxDepth:re,toPlainMaxKeys:ie,includeFunctions:ae,functionPaths:oe,shouldIncludeKey:K}=un(m),se=Rt(U),ce=te||se?e=>{typeof te==`function`&&te(e),se==null||se(e)}:void 0,le=U===`always`?`always`:W,{boundMethods:ue,computedRefs:fe,computedSetters:pe,dirtyComputedKeys:me,computedProxy:he,publicInstance:ge,touchSetupMethodsVersion:_e}=It({state:_,setupState:v,computedDefs:T,methodDefs:E,appConfig:u,includeComputed:A,setDataStrategy:j}),ve=e==null?{setData:()=>{}}:e,ye=S(_),q,be=ln({state:_,setupState:v,snapshotOmitKeys:w,computedRefs:fe,dirtyComputedKeys:me,includeComputed:A,setDataStrategy:j,computedCompare:R,computedCompareMaxDepth:z,computedCompareMaxKeys:V,currentAdapter:ve,shouldIncludeKey:K,maxPatchKeys:M,maxPayloadBytes:N,mergeSiblingThreshold:P,mergeSiblingMaxInflationRatio:F,mergeSiblingMaxParentBytes:I,mergeSiblingSkipArray:L,elevateTopKeyThreshold:ne,toPlainMaxDepth:re,toPlainMaxKeys:ie,includeFunctions:ae,functionPaths:oe,debug:ce,debugWhen:le,debugSampleRate:G,runTracker:()=>q==null?void 0:q(),isMounted:()=>D,initialSnapshot:C&&typeof C==`object`?C:void 0}),J=()=>be.job(ye),xe=e=>be.mutationRecorder(e,ye);q=t(()=>{s(_);let e=_[Z];f(e)&&s(e);let t=_[de];f(t)&&s(t),k.forEach(e=>{var t;jt((t=v[e])==null?_[e]:t)})},{lazy:!0,scheduler:()=>r(J)}),b||J(),O.push(dn(()=>d(q))),j===`patch`&&(c(_,{shouldIncludeTopKey:K,maxDepth:H,maxKeys:ee}),a(xe),O.push(dn(()=>x(xe))),O.push(dn(()=>p(_))));function Se(e,t,n){let r=B(e,(e,n)=>t(e,n),n);return O.push(r),dn(()=>{r();let e=O.indexOf(r);e>=0&&O.splice(e,1)},r)}let Y={get state(){return _},get setupState(){return v},get proxy(){return ge},get methods(){return ue},get computed(){return he},get adapter(){return ve},bindModel:Et(ge,_,fe,pe,v),watch:Se,snapshot:()=>be.snapshot(),unmount:()=>{D&&(D=!1,O.forEach(e=>{try{e()}catch(e){}}),O.length=0)}};try{Object.defineProperty(Y,"__wevu_touchSetupMethodsVersion",{value:_e,configurable:!0,enumerable:!1,writable:!1})}catch(e){Y.__wevu_touchSetupMethodsVersion=_e}try{Object.defineProperty(Y,"__wevu_flushSetupSnapshotSync",{value:J,configurable:!0,enumerable:!1,writable:!1})}catch(e){Y.__wevu_flushSetupSnapshotSync=J}try{Object.defineProperty(Y,"__wevu_cloneLatestSnapshot",{value:be.cloneLatestSnapshot,configurable:!0,enumerable:!1,writable:!1})}catch(e){Y.__wevu_cloneLatestSnapshot=be.cloneLatestSnapshot}try{Object.defineProperty(Y,"__wevu_trackSetupReactiveKey",{value:e=>{k.add(e)},configurable:!0,enumerable:!1,writable:!1})}catch(e){Y.__wevu_trackSetupReactiveKey=e=>{k.add(e)}}try{Object.defineProperty(Y,X,{value:w,configurable:!0,enumerable:!1,writable:!1})}catch(e){Y[X]=w}return Y}}const mn=`__wevuDefaultsScope`;let hn={};function gn(e){if(!(!e||typeof e!=`object`||Array.isArray(e)))return e}function _n(e,t){if(!e)return t;if(!t)return e;let n={...e,...t},r=gn(e.setData),i=gn(t.setData);(r||i)&&(n.setData={...r==null?{}:r,...i==null?{}:i});let a=gn(e.options),o=gn(t.options);return(a||o)&&(n.options={...a==null?{}:a,...o==null?{}:o}),n}function vn(e,t){return _n(e,t)}function yn(e,t){return{app:_n(e.app,t.app),component:_n(e.component,t.component)}}function bn(e){hn=yn(hn,e)}function xn(){hn={}}function Sn(e){return vn(hn.app,e)}function Cn(e){return vn(hn.component,e)}const wn=/&amp;/g,Tn=/&quot;/g,En=/&#34;/g,Dn=/&apos;/g,On=/&#39;/g,kn=/&lt;/g,An=/&gt;/g;function jn(e){return e.replace(wn,`&`).replace(Tn,`"`).replace(En,`"`).replace(Dn,`'`).replace(On,`'`).replace(kn,`<`).replace(An,`>`)}function Mn(e){if(typeof e==`number`&&Number.isFinite(e))return e;if(typeof e==`string`&&e.trim()){let t=Number(e);if(Number.isFinite(t))return t}}const Nn=/[^a-z0-9]+/gi,Pn=/^-+|-+$/g;function Fn(e){return e.trim().replace(Nn,`-`).replace(Pn,``).toLowerCase()}const In=/-([a-z0-9])/g;function Ln(e,t){let n=Fn(typeof(t==null?void 0:t.type)==`string`?t.type:``);if(!n)return;let r=n.replace(In,(e,t)=>t.toUpperCase());if(r)return`${e}${r[0].toUpperCase()}${r.slice(1)}`}const Rn={wvEventDetail:[`wd`,`wvEventDetail`],wvHandler:[`wh`,`wvHandler`],wvInlineId:[`wi`,`wvInlineId`]};function zn(e,t,n){var r;let i=(r=Rn[t])==null?[t]:r;for(let t of i){let r=Ln(t,n);if(r&&(e==null?void 0:e[r])!==void 0)return e[r]}for(let t of i)if((e==null?void 0:e[t])!==void 0)return e[t]}function Bn(e,t,n){return zn(e,t,n)}function Vn(e,t){let n=Bn(e,`wvEventDetail`,t);return n===!0||n===1||n===`1`||n===`true`}function Hn(e,t){if(!Vn(t,e))return e;if(!(!e||typeof e!=`object`||!(`detail`in e)))return e.detail}function Un(e,t){if(!t)return;let n=t.split(`.`).filter(Boolean),r=m(e)?e.value:e;for(let e of n){if(m(r)&&(r=r.value),r==null)return;r=r[e]}return m(r)?r.value:r}function Wn(e){if(typeof e!=`object`||!e||m(e)||f(e))return e;try{return o(e)}catch(t){return e}}function Gn(e,t,n,r){var i,a,o,s;let c=(i=(a=n==null||(o=n.currentTarget)==null?void 0:o.dataset)==null?n==null||(s=n.target)==null?void 0:s.dataset:a)==null?{}:i,l=Hn(n,c),u=Bn(c,`wvInlineId`,n);if(u&&r){let t=r[u];if(t&&typeof t.fn==`function`){let n={},r=Array.isArray(t.keys)?t.keys:[];for(let e=0;e<r.length;e+=1){let t=r[e];n[t]=c==null?void 0:c[`wvS${e}`]}let i=Array.isArray(t.indexKeys)?t.indexKeys:[];for(let e=0;e<i.length;e+=1){let t=i[e],r=Mn(c==null?void 0:c[`wvI${e}`]);r!==void 0&&(n[t]=r)}let a=Array.isArray(t.scopeResolvers)?t.scopeResolvers:[];for(let t=0;t<r.length;t+=1){let i=r[t],o=a[t];try{let t;if(typeof o==`function`)t=o(e,n,l);else if(o&&typeof o==`object`&&o.type===`for-item`){let r=n[o.indexKey],i=Un(e,o.path);t=i==null?void 0:i[r]}else continue;t!==void 0&&(n[i]=Wn(t))}catch(e){}}let o=t.fn(e,n,l);return typeof o==`function`?o.call(e,l):o}}let d=Bn(c,`wvHandler`,n),f=typeof t==`string`&&t?t:typeof d==`string`?d:void 0;if(!f)return;let p=Bn(c,`wvArgs`,n),m=[];if(Array.isArray(p))m=p;else if(typeof p==`string`)try{m=JSON.parse(p)}catch(e){try{m=JSON.parse(jn(p))}catch(e){m=[]}}Array.isArray(m)||(m=[]);let h=m.map(e=>e===`$event`?l:e),g=e==null?void 0:e[f];if(typeof g==`function`)return g.apply(e,h)}function Kn(){let e=ne();if(e)return e;let t=A();return t[t.length-1]}function qn(e){return e===Te?!1:e}function Jn(){var e,t;if(!T())throw Error(`usePageLayout() 必须在 setup() 的同步阶段调用`);let n=P(),r=n==null||(e=n.__wevu)==null?void 0:e.state,i=o({name:qn(r==null?void 0:r[we]),props:{...(t=r==null?void 0:r[Ee])==null?{}:t}});return n&&(n.__wevuPageLayoutState=i),R(i)}function Yn(e,t,n){let r=e.__wevuPageLayoutState;r&&(r.name=t,r.props={...n})}function Xn(e){var t,n;let r=e.__wevuPageLayoutState,i=(t=e.__wevu)==null?void 0:t.state;!r||!i||(r.name=qn(i[we]),r.props={...(n=i[Ee])==null?{}:n})}function Zn(e,t){let n=P(),r=n==null?void 0:n[De];if(typeof r==`function`){r(e,t);return}let i=Kn(),a=i==null?void 0:i[De];if(typeof a==`function`){a(e,t);return}throw Error(`setPageLayout() 未找到当前页面实例。请在页面 setup()、事件回调或当前页面上下文中调用。`)}function Qn(e){return e===!1?Te:e}function $n(){let e=globalThis;return e[He]instanceof Map||(e[He]=new Map),typeof e[Ve]!=`number`&&(e[Ve]=0),{globalObject:e,ownerStore:e[He]}}function er(){let{globalObject:e}=$n();return e[Ve]+=1,`wv${e[Ve]}`}function tr(e,t,n){var r;let{ownerStore:i}=$n(),a=(r=i.get(e))==null?{snapshot:{},proxy:n,subscribers:new Set}:r;if(a.snapshot=t,a.proxy=n,i.set(e,a),a.subscribers.size)for(let e of a.subscribers)try{e(t,n)}catch(e){}}function nr(e){let{ownerStore:t}=$n();t.delete(e)}function rr(e,t){var n;let{ownerStore:r}=$n(),i=(n=r.get(e))==null?{snapshot:{},proxy:void 0,subscribers:new Set}:n;return i.subscribers.add(t),r.set(e,i),()=>{let n=r.get(e);n&&n.subscribers.delete(t)}}function ir(e){var t;let{ownerStore:n}=$n();return(t=n.get(e))==null?void 0:t.proxy}function ar(e){var t;let{ownerStore:n}=$n();return(t=n.get(e))==null?void 0:t.snapshot}function or(e){let t=e.__wevu_cloneLatestSnapshot;return typeof t==`function`?t():typeof e.snapshot==`function`?e.snapshot():{}}function sr(e,t){let n=e[X];return!(n instanceof Set&&n.has(t))}function cr(e,t,n){if(!(!t||typeof t!=`object`))for(let[r,i]of Object.entries(t))sr(n,r)&&(e[r]=i)}function lr(e,t,n){var r;try{t.state[Ke]=n}catch(e){}try{e[Ke]=n}catch(e){}try{let t=e.data;t&&typeof t==`object`&&(t[Ke]=n)}catch(e){}let i=or(t);cr(i,(r=e[Z])==null?e.properties:r,t),tr(n,i,t.proxy)}function ur(e){return e.kind===`component`}function dr(e){return new Proxy(e,{get(e,t,n){let r=Reflect.get(e,t,n);return m(r)?r.value:r},set(e,t,n,r){let i=e[t];return m(i)&&!m(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}})}function fr(e,t){let n=e.__wevuExposeProxy;if(n&&e.__wevuExposeRaw===t)return n;let r=dr(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(n){e.__wevuExposeProxy=r,e.__wevuExposeRaw=t}return r}function pr(e,t){if(!t||typeof t!=`object`)return e;let n=t;return $(new Proxy(e,{get(e,t,r){if(Reflect.has(e,t))return Reflect.get(e,t,r);let i=n[t];return typeof i==`function`?i.bind(n):i},set(e,t,r,i){return Reflect.has(e,t)?Reflect.set(e,t,r,i):(t in n,n[t]=r,!0)},has(e,t){return Reflect.has(e,t)||t in n},ownKeys(e){return[...new Set([...Reflect.ownKeys(e),...Reflect.ownKeys(n)])]},getOwnPropertyDescriptor(e,t){if(Reflect.has(e,t))return Object.getOwnPropertyDescriptor(e,t);let r=Object.getOwnPropertyDescriptor(n,t);return r&&{...r,configurable:!0}}}))}function mr(e){var t;if(!e||typeof e!=`object`)return e==null?null:e;let n=e,r=n[pe];return r&&typeof r==`object`?fr(n,r):(t=n[Ne])!=null&&t.proxy?n[Ne].proxy:e}function hr(e){return e[nt]}function gr(e,t,n){if(!e)return;let r=e.get(t);r&&(r.value=n)}function _r(e,t){var n,r;let i=(n=(r=e.__wevu)==null?void 0:r.proxy)==null?e:n,a;if(t.get)try{a=t.get.call(i)}catch(e){a=void 0}return a==null&&t.name&&(a=t.name),typeof a==`function`?{type:`function`,fn:a}:m(a)?{type:`ref`,ref:a}:typeof a==`string`&&a?{type:`name`,name:a}:t.name?{type:`name`,name:t.name}:{type:`skip`}}function vr(e){var t,n;let r=(t=(n=e.__wevu)==null?void 0:n.state)==null?e:t,i=r.$refs;if(i&&typeof i==`object`)return i;let a=$(Object.create(null));return Object.defineProperty(r,"$refs",{value:a,configurable:!0,enumerable:!1,writable:!1}),a}function yr(e){let t=e;if(t&&typeof t.createSelectorQuery==`function`)return t.createSelectorQuery();if(!L(`globalCreateSelectorQuery`))return null;let n=D();if(n&&typeof n.createSelectorQuery==`function`){let e=n.createSelectorQuery();return e?O().selectorQueryScopeByIn&&typeof e.in==`function`?e.in(t):e:null}return null}function br(e,t,n,r,i){let a=yr(e);return a?(r(n.multiple?a.selectAll(t):a.select(t)),new Promise(e=>{a.exec(t=>{var r;let a=Array.isArray(t)?t[0]:null;if(n.index!=null&&Array.isArray(a)){var o;a=(o=a[n.index])==null?null:o}if(i){var s;i((s=a)==null?null:s)}e((r=a)==null?null:r)})})):(i&&i(null),Promise.resolve(null))}function xr(e,t,n){return $({selector:t,boundingClientRect:r=>br(e,t,n,e=>e.boundingClientRect(),r),scrollOffset:r=>br(e,t,n,e=>e.scrollOffset(),r),fields:(r,i)=>br(e,t,n,e=>e.fields(r),i),node:r=>br(e,t,n,e=>e.node(),r)})}function Sr(e,t){let n=e;if(!n)return t.inFor?$([]):null;if(t.inFor){if(typeof n.selectAllComponents==`function`){let r=n.selectAllComponents(t.selector);return $((Array.isArray(r)?r:[]).map((n,r)=>pr(xr(e,t.selector,{multiple:!0,index:r}),mr(n))))}return $([])}let r=xr(e,t.selector,{multiple:!1});return typeof n.selectComponent==`function`?pr(r,mr(n.selectComponent(t.selector))):r}function Cr(e,t,n){return t.inFor?$((Array.isArray(n)?n:[]).map((n,r)=>xr(e,t.selector,{multiple:!0,index:r}))):n?xr(e,t.selector,{multiple:!1}):null}function wr(e,t){let n=e[et];if(!n||!n.length){t==null||t();return}if(!e[Pe]){t==null||t();return}if(!e.__wevu){t==null||t();return}let r=hr(e),i=n.filter(e=>!ur(e)),a=n.filter(e=>ur(e)).map(t=>({binding:t,value:Sr(e,t)})),o=n=>{var i,a;let o=vr(e),s=new Map,c=new Set,l=(i=(a=e.__wevu)==null?void 0:a.proxy)==null?e:i;n.forEach(t=>{let n=t.binding,r=t.value,i=_r(e,n);if(i.type===`function`){n.inFor&&Array.isArray(r)?r.length?r.forEach(e=>i.fn.call(l,e)):i.fn.call(l,null):i.fn.call(l,r==null?null:r);return}if(i.type===`ref`){i.ref.value=r;return}if(i.type===`name`){var a;c.add(i.name);let e=(a=s.get(i.name))==null?{values:[],count:0,hasFor:!1}:a;e.count+=1,e.hasFor=e.hasFor||n.inFor,n.inFor?Array.isArray(r)&&e.values.push(...r):r!=null&&e.values.push(r),s.set(i.name,e)}});for(let[e,t]of s){let n;n=t.values.length?t.hasFor||t.values.length>1||t.count>1?$(t.values):t.values[0]:t.hasFor?$([]):null,o[e]=n,gr(r,e,n)}for(let e of Object.keys(o))c.has(e)||delete o[e];t==null||t()};if(!i.length){o(a);return}let s=yr(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:Cr(e,n.binding,i)}});o([...a,...n])})}function Tr(e,t){let r=e[et];if(!r||!r.length){t==null||t();return}if(t){var i;let n=(i=e[$e])==null?[]:i;n.push(t),e[$e]||Object.defineProperty(e,$e,{value:n,configurable:!0,enumerable:!1,writable:!0})}e[tt]||(e[tt]=!0,n(()=>{e[tt]=!1,wr(e,()=>{let t=e[$e];!t||!t.length||t.splice(0).forEach(e=>{try{e()}catch(e){}})})}))}function Er(e){var t,n;let r=e[et];if(!r||!r.length)return;let i=vr(e),a=(t=(n=e.__wevu)==null?void 0:n.proxy)==null?e:t,o=new Set,s=hr(e);for(let t of r){let n=_r(e,t),r=t.inFor?$([]):null;if(n.type===`function`){n.fn.call(a,null);continue}if(n.type===`ref`){n.ref.value=r;continue}n.type===`name`&&(o.add(n.name),i[n.name]=r,gr(s,n.name,r))}for(let e of Object.keys(i))o.has(e)||delete i[e]}const Dr=[`triggerEvent`,`createSelectorQuery`,`createIntersectionObserver`,`setData`,`setUpdatePerformanceListener`];function Or(){return Object.freeze(Object.create(null))}const kr=()=>[];function Ar(e){return Array.isArray(e)?[...new Set(e.filter(e=>typeof e==`string`&&e.length>0))]:!e||typeof e!=`object`?[]:Object.entries(e).filter(([,e])=>!!e).map(([e])=>e)}function jr(e){if(!Q(e,Ge))return Or();let t=()=>Ar(e[Ge]),n=e=>typeof e==`string`&&t().includes(e);return new Proxy(Object.create(null),{get(e,t){if(n(t))return kr},has(e,t){return n(t)},ownKeys(){return t()},getOwnPropertyDescriptor(e,t){if(n(t))return{configurable:!0,enumerable:!0,value:kr}},set(){return!1},deleteProperty(){return!1}})}function Mr(){let e=(()=>{});return e.stop=()=>{},e.pause=()=>{},e.resume=()=>{},e}function Nr(e){try{return $(e)}catch(t){return e}}function Pr(e){return!e||typeof e!=`object`||Array.isArray(e)?!1:Q(e,`bubbles`)||Q(e,`composed`)||Q(e,`capturePhase`)}function Fr(e){if(e.length===0)return{detail:void 0,options:void 0};if(e.length===1)return{detail:e[0],options:void 0};let t=e[e.length-1];if(Pr(t)){let n=e.slice(0,-1);return{detail:n.length<=1?n[0]:n,options:t}}return{detail:e,options:void 0}}function Ir(e,t,n){let r=e==null?void 0:e.state,i=r&&typeof r==`object`?S(r):void 0,a=e==null?void 0:e.proxy,o=e=>{let r=e[n];if(typeof r!=`function`)return!1;if(Pt(r))return!0;let i=t[n];return typeof i==`function`&&r===i},s=e=>!e||typeof e!=`object`||e===t||e===a||o(e)?!1:typeof e[n]==`function`,c=i?i[J]:void 0;if(s(c))return c;let l=e==null?void 0:e.instance;if(s(l))return l}function Lr(e,t,n){Nt(n);try{Object.defineProperty(e,t,{value:n,configurable:!0,enumerable:!1,writable:!0})}catch(r){e[t]=n}}function Rr(e,t){let n=e[Ue];if(n&&typeof n==`object`)return n;let r=Object.create(null),i=n=>{let r=Ir(t,e,n);if(r)return r;let i=e[n];if(typeof i==`function`&&!Pt(i))return e};Lr(r,`triggerEvent`,(...e)=>{let[t,n,r]=e,a=i(`triggerEvent`);a&&typeof a.triggerEvent==`function`&&(e.length>=3?a.triggerEvent(t,n,r):a.triggerEvent(t,n))}),Lr(r,`createSelectorQuery`,()=>{var n;let r=i(`createSelectorQuery`);if(r&&typeof r.createSelectorQuery==`function`)return r.createSelectorQuery();let a=D();if(!L(`globalCreateSelectorQuery`)||!a||typeof a.createSelectorQuery!=`function`)return;let o=a.createSelectorQuery();if(!o||!O().selectorQueryScopeByIn||typeof o.in!=`function`)return o;let s=(n=Ir(t,e,`setData`))==null?e:n;return o.in(s)}),Lr(r,`createIntersectionObserver`,n=>{var r;let a=i(`createIntersectionObserver`);if(a&&typeof a.createIntersectionObserver==`function`)return a.createIntersectionObserver(n==null?{}:n);let o=D();if(!L(`globalCreateIntersectionObserver`)||!o||typeof o.createIntersectionObserver!=`function`)return;let s=(r=Ir(t,e,`setData`))==null?e:r;return O().intersectionObserverScopeByParameter?o.createIntersectionObserver(s,n==null?{}:n):o.createIntersectionObserver(n==null?{}:n)}),Lr(r,`setData`,(e,n)=>{let r=i(`setData`);if(r&&typeof r.setData==`function`)return r.setData(e,n);let a=t==null?void 0:t.adapter,o=typeof(a==null?void 0:a.setData)==`function`?a.setData(e):void 0;return typeof n==`function`&&n(),o}),Lr(r,`setUpdatePerformanceListener`,e=>{let t=i(`setUpdatePerformanceListener`);if(t&&typeof t.setUpdatePerformanceListener==`function`)return t.setUpdatePerformanceListener(e)});let a=Nr(new Proxy(r,{get(t,n,r){if(Reflect.has(t,n))return Reflect.get(t,n,r);let i=e[n];return typeof i==`function`?i.bind(e):i},has(t,n){return Reflect.has(t,n)||n in e},set(t,n,r){return Reflect.has(t,n)?(t[n]=r,!0):(e[n]=r,!0)}}));try{Object.defineProperty(e,Ue,{value:a,configurable:!0,enumerable:!1,writable:!0})}catch(t){e[Ue]=a}return a}function zr(e){return!e||typeof e!=`object`?!1:typeof e.triggerEvent==`function`||typeof e.createSelectorQuery==`function`||typeof e.createIntersectionObserver==`function`||typeof e.setData==`function`}function Br(e,t,n){let r=t==null?void 0:t[n];if(typeof r!=`function`)return!1;if(Pt(r))return!0;let i=e==null?void 0:e.proxy;return typeof(i==null?void 0:i[n])==`function`&&r===i[n]}function Vr(e,t){if(!e||!zr(t)||t===e.proxy)return;let n=t;if(Br(e,n,`triggerEvent`)||Br(e,n,`createSelectorQuery`)||Br(e,n,`createIntersectionObserver`)||Br(e,n,`setData`))return;let r=e.state;if(!(!r||typeof r!=`object`))try{Object.defineProperty(r,J,{value:n,configurable:!0,enumerable:!1,writable:!0})}catch(e){r[J]=n}}function Hr(e,t){try{let n=t.methods;for(let t of Object.keys(n))Dr.includes(t)||typeof e[t]!=`function`&&(e[t]=function(...n){var r,i;let a=(r=this[Ne])==null?e[Ne]:r;Vr(a,this);let o=a==null||(i=a.methods)==null?void 0:i[t];if(typeof o==`function`)return o.apply(a.proxy,n)})}catch(e){}}let Ur=e=>e.startsWith(`layouts/`);function Wr(e){let t=e.is;return typeof t==`string`&&Ur(t,e)}function Gr(e){if(Wr(e))return;let t=e[ke];if(t&&typeof t==`object`)return t;let n=e.selectOwnerComponent;if(typeof n==`function`)try{let t=n.call(e);if(t&&t!==e&&typeof t==`object`&&t.__wevu)return t}catch(e){}let r=A(),i=r[r.length-1];if(i&&i!==e&&typeof i==`object`&&i.__wevu)return i}function Kr(e){if(!Wr(e))return;let t=A(),n=t[t.length-1];n&&n!==e&&typeof n==`object`&&n.__wevu&&ee(e,n)}function qr(e,t){e[Re]=t,H(e,t,Gr(e)),Kr(e)}function Jr(e,t,n){var r;if(typeof e!=`function`)return;let i=(r=n==null?void 0:n.runtime)==null?{methods:Object.create(null),state:{},setupState:{},proxy:{},watch:()=>()=>{},bindModel:()=>{}}:r;return n&&(n.runtime=i),e(t,{...n==null?{}:n,runtime:i})}function Yr(e,t){try{Object.defineProperty(e,Z,{value:t,configurable:!0,enumerable:!1,writable:!1})}catch(n){e[Z]=t}}function Xr(e,t){try{Object.defineProperty(e,We,{value:t,configurable:!0,enumerable:!1,writable:!1})}catch(n){e[We]=t}}function Zr(e,t){try{Object.defineProperty(e,J,{value:t,configurable:!0,enumerable:!1,writable:!0})}catch(n){e[J]=t}}function Qr(e,t){try{Object.defineProperty(e,ze,{value:t,configurable:!0,enumerable:!1,writable:!0})}catch(n){e[ze]=t}}function $r(e,t){try{Object.defineProperty(e,"instance",{value:t,configurable:!0,enumerable:!1,writable:!0})}catch(n){try{e.instance=t}catch(e){}}}function ei(e){let t=e[Ue],n=t&&typeof t.setData==`function`?t.setData:void 0;if(typeof n==`function`&&!Pt(n))return n;let r=e.setData;if(typeof r==`function`&&!Pt(r))return r}function ti(e){let t=e.route;if(typeof t==`string`&&t)return t;let n=e.is;return typeof n==`string`&&n?n:`unknown`}function ni(e,t,n){try{return t.call(e,n)}catch(t){let n=ti(e);throw Error(`[wevu] setData failed (${n}): ${t instanceof Error?t.message:String(t)}`)}}function ri(e,t){let n=Object.keys(e);for(let r of n)if(!Q(t,r))try{delete e[r]}catch(e){}for(let[n,r]of Object.entries(t))e[n]=r}function ii(e,t,n=e.properties||{}){let r=t&&typeof t==`object`?t[Z]:void 0,i=r&&typeof r==`object`?r:g({});ri(i,n),t&&typeof t==`object`&&Yr(t,i);try{Object.defineProperty(e,Z,{value:i,configurable:!0,enumerable:!1,writable:!0})}catch(t){e[Z]=i}return i}function ai(e){return e.includes(`:`)?e.replaceAll(`:`,`-`).toLowerCase():e}function oi(e){return e.startsWith(`__wv_`)}function si(e){var t;let{target:n,runtime:r,runtimeWithDefaults:i,runtimeState:a,runtimeProxy:o,setup:s}=e,c=ii(n,a,n.properties||{}),l=g(Object.create(null)),u=new Set(Array.isArray(n[Me])?n[Me]:[]),d=e=>typeof a==`object`&&!!a&&Q(a,e);(()=>{let e=n.properties&&typeof n.properties==`object`?n.properties:void 0;for(let t of Object.keys(l))(!e||!Q(e,t)||oi(t)||u.has(t)||d(t))&&delete l[t];if(e)for(let[t,n]of Object.entries(e))oi(t)||u.has(t)||d(t)||(l[t]=n)})();try{Object.defineProperty(n,de,{value:l,configurable:!0,enumerable:!1,writable:!1})}catch(e){n[de]=l}let p=Rr(n,i),m=jr(c);Xr(a,(t=i.setupState)==null?Object.create(null):t);try{Object.defineProperty(a,"$slots",{value:m,configurable:!0,enumerable:!1,writable:!1})}catch(e){a.$slots=m}let h=Nr({props:c,runtime:i,state:a,proxy:o,bindModel:r.bindModel.bind(i),watch:r.watch.bind(i),instance:p,emit:(e,...t)=>{let{detail:n,options:r}=Fr(t),i=ai(e);p.triggerEvent(i,n,r)},expose:e=>{n[pe]=e},attrs:l,slots:m}),_=b(!0);n[fe]=_,I(n),E(h);try{let e=_.run(()=>Jr(s,c,h)),t=!1;if(e&&typeof e==`object`){let n=r.setupState&&typeof r.setupState==`object`?f(r.setupState)?S(r.setupState):r.setupState:Object.create(null);Object.keys(e).forEach(i=>{let a=e[i];if(typeof a==`function`)r.methods[i]=(...e)=>a.apply(r.proxy,e),r.state[i]=(...e)=>a.apply(r.proxy,e),t=!0;else{if(At(a)){var o;(o=r.__wevu_trackSetupReactiveKey)==null||o.call(r,i)}r.state[i]=a,n[i]=a}})}if(t){var v;(v=r.__wevu_touchSetupMethodsVersion)==null||v.call(r)}}catch(e){throw _.stop(),n[fe]=void 0,e}finally{E(void 0),I(void 0)}}function ci(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function li(e){var t,n,r;let i={devOnly:!0,sampleWindowMs:1e3,maxCalls:30,coolDownMs:5e3,warnOnPageScroll:!0,pageScrollCoolDownMs:2e3};return e===void 0||e===!1?{...i,enabled:!1}:e===!0?{...i,enabled:!0}:ci(e)?{enabled:(t=e.enabled)==null?!0:t,devOnly:(n=e.devOnly)==null?i.devOnly:n,sampleWindowMs:typeof e.sampleWindowMs==`number`?Math.max(100,Math.floor(e.sampleWindowMs)):i.sampleWindowMs,maxCalls:typeof e.maxCalls==`number`?Math.max(1,Math.floor(e.maxCalls)):i.maxCalls,coolDownMs:typeof e.coolDownMs==`number`?Math.max(0,Math.floor(e.coolDownMs)):i.coolDownMs,warnOnPageScroll:(r=e.warnOnPageScroll)==null?i.warnOnPageScroll:r,pageScrollCoolDownMs:typeof e.pageScrollCoolDownMs==`number`?Math.max(0,Math.floor(e.pageScrollCoolDownMs)):i.pageScrollCoolDownMs}:{...i,enabled:!1}}function ui(){let e=M();if((e==null?void 0:e.debug)===!0||(e==null?void 0:e.envVersion)===`develop`)return!0;let t=D();try{var n;if((t==null||(n=t.getAccountInfoSync)==null||(n=n.call(t))==null||(n=n.miniProgram)==null?void 0:n.envVersion)===`develop`)return!0}catch(e){}return!1}function di(e){var t,n;let r=li(e.option);if(!r.enabled)return;let i=ui();if(r.devOnly&&!i)return;let a=(t=e.now)==null?(()=>Date.now()):t,o=(n=e.logger)==null?(e=>{var t;let n=(t=globalThis)==null||(t=t.console)==null?void 0:t.warn;typeof n==`function`&&n(e)}):n,s=[],c=-1/0,l=-1/0;return()=>{var t,n;let i=a();s.push(i);let u=i-r.sampleWindowMs;for(;s.length>0&&s[0]<u;)s.shift();let d=(t=(n=e.isInPageScrollHook)==null?void 0:n.call(e))==null?!1:t;r.warnOnPageScroll&&d&&(r.pageScrollCoolDownMs<=0||i-l>=r.pageScrollCoolDownMs)&&(l=i,o(`[wevu:setData] 检测到 onPageScroll 回调内调用 setData(${e.targetLabel})。建议改用 IntersectionObserver 监听可见性,或对滚动更新做节流。`)),!(s.length<=r.maxCalls)&&(r.coolDownMs>0&&i-c<r.coolDownMs||(c=i,o(`[wevu:setData] 检测到高频 setData 调用:${s.length} 次/${r.sampleWindowMs}ms(${e.targetLabel})。建议合并更新或降低调用频率。`)))}}function fi(e,t,n){if(typeof e==`function`)return{handler:e.bind(t.proxy),options:{}};if(typeof e==`string`){var r,i;let a=(r=(i=t.methods)==null?void 0:i[e])==null?n[e]:r;return typeof a==`function`?{handler:a.bind(t.proxy),options:{}}:void 0}if(!e||typeof e!=`object`)return;let a=fi(e.handler,t,n);if(!a)return;let o={...a.options};return e.immediate!==void 0&&(o.immediate=e.immediate),e.deep!==void 0&&(o.deep=e.deep),{handler:a.handler,options:o}}function pi(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 mi(e,t,n){let r=[],i=e.proxy;for(let[a,o]of Object.entries(t)){let t=fi(o,e,n);if(!t)continue;let s=pi(i,a),c=e.watch(s,t.handler,t.options);r.push(c)}return r}function hi(e,t=new WeakMap){if(!e||typeof e!=`object`)return e;if(t.has(e))return t.get(e);if(Array.isArray(e)){let n=[];t.set(e,n);for(let r of e)n.push(hi(r,t));return n}let n={};t.set(e,n);for(let[r,i]of Object.entries(e))n[r]=hi(i,t);return n}function gi(e,t,n){let r=e.data;if((!r||typeof r!=`object`)&&(!n||!Object.keys(n).length))return;let i=Array.isArray(t)&&t.length?new Set(t):void 0,a={};if(r&&typeof r==`object`)for(let[e,t]of Object.entries(r))i!=null&&i.has(e)||(a[e]=hi(t));if(n)for(let[e,t]of Object.entries(n))i!=null&&i.has(e)||(a[e]=hi(t));return a}function _i(e){return!!(e!=null&&e.__wevuHasTemplateRuntimeBindings)}function vi(e){typeof e.route!=`string`||!e.route||(e[De]=(t,n)=>{var r;let i=(r=e.__wevu)==null?void 0:r.state;if(!i||typeof i!=`object`)return;i[we]=Qn(t);let a=t===!1||n==null?{}:n;i[Ee]=a,Yn(e,t,a)})}function yi(e,t,n,r,i){var a,o,s,c,l,u,d,f,p,m,h;if(e.__wevu)return e.__wevu;qr(e,t),Nr(e);let g=er(),_=!!(!(t==null||(a=t.__wevuSetDataOptions)==null)&&a.suspendWhenHidden),v=typeof e.route==`string`&&e.route?`page:${e.route}`:typeof e.is==`string`&&e.is?`component:${e.is}`:`unknown-target`,y=di({option:t==null||(o=t.__wevuSetDataOptions)==null?void 0:o.highFrequencyWarning,targetLabel:v,isInPageScrollHook:()=>{var t;return Number((t=e[Oe])==null?0:t)>0}}),b=i!=null&&i.deferSetData?(e=>{let t,n=!1,r={setData(r){if(!n){var i;t={...(i=t)==null?{}:i,...r};return}let a=ei(e);if(a)return ni(e,a,r)}};return r.__wevu_enableSetData=()=>{n=!0;let r=ei(e);if(t&&Object.keys(t).length&&r){let n=t;t=void 0,ni(e,r,n)}},r})(e):{setData(t){let n=ei(e);if(n)return ni(e,n,t)}},x,S=!0,C,w=(e,t)=>({...e==null?{}:e,...t}),T=()=>{var t;if(!x)return;let n=or(x);cr(n,(t=e[Z])==null?e.properties:t,x),tr(g,n,x.proxy)},E={...b,setData(t){if(y==null||y(),_&&!S){C=w(C,t),T(),Tr(e);return}let n=b.setData(t);return T(),Tr(e),n},__wevu_setVisibility(t){if(S=t,!S||!C)return;let n=C;C=void 0;let r=b.setData(n);return T(),Tr(e),r}};Array.isArray(i==null?void 0:i.snapshotOmitKeys)&&i.snapshotOmitKeys.length&&Object.defineProperty(E,"__wevu_snapshotOmitKeys",{configurable:!0,enumerable:!1,value:i.snapshotOmitKeys,writable:!1});let D=gi(e,i==null?void 0:i.snapshotOmitKeys,_i(t)?void 0:{[Ke]:g});D&&Object.keys(D).length&&Object.defineProperty(E,"__wevu_initialSnapshot",{configurable:!0,enumerable:!1,value:D,writable:!1});let O=e.properties;(r||O&&typeof O==`object`&&Object.keys(O).length>0)&&Object.defineProperty(E,"__wevu_deferInitialSnapshot",{configurable:!0,enumerable:!1,value:!0,writable:!1});let k=t.mount(E);x=k,$r(k,e);let A=(s=k==null?void 0:k.proxy)==null?{}:s,j=(c=k==null?void 0:k.state)==null?{}:c,M=(l=k==null?void 0:k.setupState)==null?Object.create(null):l;j&&typeof j==`object`&&(Qr(j,k),Zr(j,e));let N=(u=k==null?void 0:k.computed)==null?Object.create(null):u;if(!(k!=null&&k.methods))try{k.methods=Object.create(null)}catch(e){}let P=(d=k==null?void 0:k.methods)==null?Object.create(null):d,F=(f=k==null?void 0:k.watch)==null?(()=>Mr()):f,I=(p=k==null?void 0:k.bindModel)==null?(()=>{}):p,L={...k==null?{}:k,state:j,setupState:M,proxy:A,methods:P,computed:N,watch:F,bindModel:I,snapshot:(m=k==null?void 0:k.snapshot)==null?(()=>Object.create(null)):m,unmount:(h=k==null?void 0:k.unmount)==null?(()=>{}):h},R=L,z={__wevu_flushSetupSnapshotSync:k.__wevu_flushSetupSnapshotSync,__wevu_touchSetupMethodsVersion:k.__wevu_touchSetupMethodsVersion,__wevu_trackSetupReactiveKey:k.__wevu_trackSetupReactiveKey,[X]:k[X]};for(let[e,t]of Object.entries(z))t&&Object.defineProperty(L,e,{configurable:!0,enumerable:!1,value:t,writable:!0});if(Object.defineProperty(e,Ne,{value:L,configurable:!0,enumerable:!1,writable:!1}),e.__wevu=L,vi(e),ii(e,j),lr(e,L,g),n){let t=mi(L,n,e);t.length&&(e[rt]=t)}if(r){if(si({target:e,runtime:k,runtimeWithDefaults:L,runtimeState:j,runtimeProxy:A,setup:r}),!(i!=null&&i.deferSetData)){var B;(B=R.__wevu_flushSetupSnapshotSync)==null||B.call(R)}T()}else if(e.properties&&typeof e.properties==`object`&&Object.keys(e.properties).length>0){var V;(V=R.__wevu_flushSetupSnapshotSync)==null||V.call(R),T()}return Hr(e,k),k}function bi(e){var t;let n=(t=e.__wevu)==null?void 0:t.state,r=e.data;if(!(!n||typeof n!=`object`||!r||typeof r!=`object`))for(let[e,t]of Object.entries(r))Object.prototype.hasOwnProperty.call(n,e)&&(n[e]=t)}function xi(e){var t,n,r;let i=(t=e.__wevu)==null?void 0:t.adapter;bi(e),(n=e.__wevu)==null||(r=n.__wevu_flushSetupSnapshotSync)==null||r.call(n),i&&typeof i.__wevu_enableSetData==`function`&&i.__wevu_enableSetData()}function Si(e,t){var n;let r=(n=e.__wevu)==null?void 0:n.adapter;r&&typeof r.__wevu_setVisibility==`function`&&r.__wevu_setVisibility(t)}function Ci(e){var t;let n=e.__wevu,r=e[Ke];r&&nr(r),Er(e),n&&e[he]&&j(e,`onUnload`,[]),e[he]&&(e[he]=void 0);let i=e[rt];if(Array.isArray(i))for(let e of i)try{e()}catch(e){}e[rt]=void 0,(t=e[fe])==null||t.stop(),e[fe]=void 0,n&&n.unmount(),delete e.__wevu,Ne in e&&delete e[Ne]}const wi=`__wevuAppGlobalListeners`,Ti=`__wevuOnMemoryWarningListener`;function Ei(e){let t=e[he],n=!!(t!=null&&t.onMemoryWarning);if(!L(`appMemoryWarningListener`)){delete e[Ti];return}let r=D(),i=r==null?void 0:r.onMemoryWarning,a=r==null?void 0:r.offMemoryWarning;if(typeof i!=`function`)return;let o=e[Ti];if(typeof o==`function`&&typeof a==`function`)try{a(o)}catch(e){}if(!n){delete e[Ti];return}let s=t=>{j(e,`onMemoryWarning`,[t])};e[Ti]=s,i(s)}function Di(e,t){var n,r;let{hookName:i,onApiName:a,offApiName:o,capabilityName:s,userHandler:c}=t,l=e[he],u=!!(l!=null&&l[i]),d=(r=(n=e)[wi])==null?n[wi]=Object.create(null):r,f=d[i];if(!L(s)){delete d[i],delete e[i];return}let p=D(),m=p==null?void 0:p[a],h=p==null?void 0:p[o];if(typeof f==`function`&&typeof h==`function`)try{h(f)}catch(e){}if(!u&&typeof c!=`function`){delete d[i];return}let g=(...t)=>{j(e,i,t),typeof c==`function`&&c.apply(e,t)};e[i]=g,d[i]=g,typeof m==`function`&&m(g)}function Oi(e,t){Di(e,{hookName:`onError`,onApiName:`onError`,offApiName:`offError`,capabilityName:`appErrorListener`,userHandler:t.onError}),Di(e,{hookName:`onPageNotFound`,onApiName:`onPageNotFound`,offApiName:`offPageNotFound`,capabilityName:`appPageNotFoundListener`,userHandler:t.onPageNotFound}),Di(e,{hookName:`onUnhandledRejection`,onApiName:`onUnhandledRejection`,offApiName:`offUnhandledRejection`,capabilityName:`appUnhandledRejectionListener`,userHandler:t.onUnhandledRejection}),Di(e,{hookName:`onThemeChange`,onApiName:`onThemeChange`,offApiName:`offThemeChange`,capabilityName:`appThemeChangeListener`,userHandler:t.onThemeChange})}function ki(e,t,n,r,i){var a;if(typeof App!=`function`)throw TypeError(`createApp 需要全局 App 构造器可用`);let o=Object.keys(t==null?{}:t),s={...i};s.globalData=(a=s.globalData)==null?{}:a,s[ge]||(s[ge]=function(e){var t,n;let r=this.__wevu;return Gn((t=r==null?void 0:r.proxy)==null?this:t,void 0,e,r==null||(n=r.methods)==null?void 0:n[_e])});let c=s.onLaunch,l=s.onError,u=s.onPageNotFound,d=s.onUnhandledRejection,f=s.onThemeChange;s.onLaunch=function(...t){this[ve]=!0,yi(this,e,n,r),Ei(this),Oi(this,{onError:l,onPageNotFound:u,onUnhandledRejection:d,onThemeChange:f}),j(this,`onLaunch`,t),typeof c==`function`&&c.apply(this,t)};let p=s.onShow;s.onShow=function(...e){j(this,`onShow`,e),typeof p==`function`&&p.apply(this,e)};let m=s.onHide;s.onHide=function(...e){j(this,`onHide`,e),typeof m==`function`&&m.apply(this,e)},delete s.onError,delete s.onPageNotFound,delete s.onUnhandledRejection,delete s.onThemeChange;for(let e of o){let t=s[e];s[e]=function(...n){var r;let i=this.__wevu,a,o=i==null||(r=i.methods)==null?void 0:r[e];return o&&(a=o.apply(i.proxy,n)),typeof t==`function`?t.apply(this,n):a}}App(s)}function Ai(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=!!t.enableOnRouteDoneFallback,_=typeof s==`function`||!!t.enableOnTabItemTap,v=typeof c==`function`||!!t.enableOnResize,y=typeof u==`function`||!!t.enableOnShareTimeline,b=typeof l==`function`||!!t.enableOnShareAppMessage,x=typeof d==`function`||!!t.enableOnAddToFavorites,S=typeof n==`function`||!!t.enableOnSaveExitState,C=()=>{};return{enableOnPullDownRefresh:f,enableOnReachBottom:p,enableOnPageScroll:m,enableOnRouteDone:h,enableOnRouteDoneFallback:g,enableOnTabItemTap:_,enableOnResize:v,enableOnShareAppMessage:b,enableOnShareTimeline:y,enableOnAddToFavorites:x,enableOnSaveExitState:S,effectiveOnSaveExitState:typeof n==`function`?n:(()=>({data:void 0})),effectiveOnPullDownRefresh:typeof r==`function`?r:C,effectiveOnReachBottom:typeof i==`function`?i:C,effectiveOnPageScroll:typeof a==`function`?a:C,effectiveOnRouteDone:typeof o==`function`?o:C,effectiveOnTabItemTap:typeof s==`function`?s:C,effectiveOnResize:typeof c==`function`?c:C,effectiveOnShareAppMessage:typeof l==`function`?l:C,effectiveOnShareTimeline:typeof u==`function`?u:C,effectiveOnAddToFavorites:typeof d==`function`?d:(()=>({}))}}function ji(e,t){let{enableOnSaveExitState:n,enableOnPullDownRefresh:r,enableOnReachBottom:i,enableOnPageScroll:a,enableOnRouteDone:o,enableOnTabItemTap:s,enableOnResize:c,enableOnShareAppMessage:l,enableOnShareTimeline:u,enableOnAddToFavorites:d,effectiveOnSaveExitState:f,effectiveOnPullDownRefresh:p,effectiveOnReachBottom:m,effectiveOnPageScroll:h,effectiveOnRouteDone:g,effectiveOnTabItemTap:_,effectiveOnResize:v,effectiveOnShareAppMessage:y,effectiveOnShareTimeline:b,effectiveOnAddToFavorites:x,hasHook:S}=t;n&&(e.onSaveExitState=function(...e){let t=N(this,`onSaveExitState`,e);return t===void 0?f.apply(this,e):t}),r&&(e.onPullDownRefresh=function(...e){if(j(this,`onPullDownRefresh`,e),!S(this,`onPullDownRefresh`))return p.apply(this,e)}),i&&(e.onReachBottom=function(...e){if(j(this,`onReachBottom`,e),!S(this,`onReachBottom`))return m.apply(this,e)}),a&&(e.onPageScroll=function(...e){return re(this,()=>{if(j(this,`onPageScroll`,e),!S(this,`onPageScroll`))return h.apply(this,e)})}),o&&(e.onRouteDone=function(...e){if(!this[Le]&&(this[Le]=!0,Promise.resolve().then(()=>{this[Le]=!1}),this[Ie]=!0,j(this,`onRouteDone`,e),!S(this,`onRouteDone`)))return g.apply(this,e)}),s&&(e.onTabItemTap=function(...e){if(j(this,`onTabItemTap`,e),!S(this,`onTabItemTap`))return _.apply(this,e)}),c&&(e.onResize=function(...e){if(j(this,`onResize`,e),!S(this,`onResize`))return v.apply(this,e)}),l&&(e.onShareAppMessage=function(...e){let t=N(this,`onShareAppMessage`,e);return t===void 0?y.apply(this,e):t}),u&&(e.onShareTimeline=function(...e){let t=N(this,`onShareTimeline`,e);return t===void 0?b.apply(this,e):t}),d&&(e.onAddToFavorites=function(...e){let t=N(this,`onAddToFavorites`,e);return t===void 0?x.apply(this,e):t})}function Mi(e){let{runtimeApp:t,watch:n,setup:r,userOnLoad:i,userOnUnload:a,userOnShow:o,userOnHide:s,userOnReady:c,isPage:l,enableOnSaveExitState:u,enableOnPullDownRefresh:d,enableOnReachBottom:f,enableOnPageScroll:p,enableOnRouteDone:m,enableOnRouteDoneFallback:h,enableOnTabItemTap:g,enableOnResize:_,enableOnShareAppMessage:v,enableOnShareTimeline:y,enableOnAddToFavorites:b,syncWevuPropsFromValues:x,effectiveOnSaveExitState:S,effectiveOnPullDownRefresh:C,effectiveOnReachBottom:w,effectiveOnPageScroll:T,effectiveOnRouteDone:E,effectiveOnTabItemTap:D,effectiveOnResize:O,effectiveOnShareAppMessage:k,effectiveOnShareTimeline:A,effectiveOnAddToFavorites:M,hasHook:N}=e,P=e=>{var t,n;(t=e.__wevu)==null||(n=t.__wevu_flushSetupSnapshotSync)==null||n.call(t)},F={onLoad(...e){if(this[Se])return;this[Se]=!0,yi(this,t,n,r);let a=e[0]&&typeof e[0]==`object`?e[0]:ce(this);if(x==null||x(this,a),P(this),xi(this),l&&le({enableOnShareAppMessage:v,enableOnShareTimeline:y}),j(this,`onLoad`,e),typeof i==`function`)return i.apply(this,e.length?e:[a])},onUnload(...e){if(l&&V(this),Ci(this),typeof a==`function`)return a.apply(this,e)},onShow(...e){if(l&&(oe(),ue(this),this[Se]||F.onLoad.call(this,ce(this)),x==null||x(this,ce(this)),P(this),le({enableOnShareAppMessage:v,enableOnShareTimeline:y}),this[Ie]=!1),Si(this,!0),j(this,`onShow`,e),typeof o==`function`)return o.apply(this,e)},onHide(...e){if(l&&V(this),Si(this,!1),j(this,`onHide`,e),typeof s==`function`)return s.apply(this,e)},onReady(...e){if(l&&(this[Se]||F.onLoad.call(this,ce(this)),x==null||x(this,ce(this)),P(this),le({enableOnShareAppMessage:v,enableOnShareTimeline:y})),!this[Pe]){if(this[Pe]=!0,l&&m&&h){let e=this;setTimeout(()=>{if(!e[Ie]){var t;(t=F.onRouteDone)==null||t.call(e)}},0)}Tr(this,()=>{j(this,`onReady`,e),typeof c==`function`&&c.apply(this,e)});return}if(typeof c==`function`)return c.apply(this,e)}};return ji(F,{enableOnSaveExitState:u,enableOnPullDownRefresh:d,enableOnReachBottom:f,enableOnPageScroll:p,enableOnRouteDone:m,enableOnTabItemTap:g,enableOnResize:_,enableOnShareAppMessage:v,enableOnShareTimeline:y,enableOnAddToFavorites:b,effectiveOnSaveExitState:S,effectiveOnPullDownRefresh:C,effectiveOnReachBottom:w,effectiveOnPageScroll:T,effectiveOnRouteDone:E,effectiveOnTabItemTap:D,effectiveOnResize:O,effectiveOnShareAppMessage:k,effectiveOnShareTimeline:A,effectiveOnAddToFavorites:M,hasHook:N}),F}function Ni(e){let{userMethods:t,runtimeMethods:n}=e,r={...t};r[ge]||(r[ge]=function(e){var t,n;let r=this.__wevu;return Gn((t=r==null?void 0:r.proxy)==null?this:t,void 0,e,r==null||(n=r.methods)==null?void 0:n[_e])}),r[be]||(r[be]=function(e){var t,n,r;let i=(t=e==null||(n=e.currentTarget)==null||(n=n.dataset)==null?void 0:n.wvModel)==null?e==null||(r=e.target)==null||(r=r.dataset)==null?void 0:r.wvModel:t;if(typeof i!=`string`||!i)return;let a=this.__wevu;if(!a||typeof a.bindModel!=`function`)return;let o=xt(e);try{a.bindModel(i).update(o)}catch(e){}}),!r[Ce]&&typeof(n==null?void 0:n[Ce])==`function`&&(r[Ce]=n[Ce]);let i=Object.keys(n==null?{}:n);function a(e){let t=e.__wevu;if(t)return t;let n=e.$state;if(n&&typeof n==`object`)return n[ze]}function o(e,t){if((e==null?void 0:e.proxy)===t)return;let n=e==null?void 0:e.proxy,r=e=>{let r=t[e];if(typeof r!=`function`)return!1;let i=n==null?void 0:n[e];return typeof i==`function`&&r===i};if(r(`triggerEvent`)||r(`createSelectorQuery`)||r(`createIntersectionObserver`)||r(`setData`)||!(typeof t.triggerEvent==`function`||typeof t.createSelectorQuery==`function`||typeof t.createIntersectionObserver==`function`||typeof t.setData==`function`))return;let i=e==null?void 0:e.state;if(!(!i||typeof i!=`object`)&&t.$state!==i)try{Object.defineProperty(i,J,{value:t,configurable:!0,enumerable:!1,writable:!0})}catch(e){i[J]=t}}for(let e of i){if(e===_e||e.startsWith(Fe))continue;let t=r[e];r[e]=function(...n){var r;let i=a(this);o(i,this);let s,c=i==null||(r=i.methods)==null?void 0:r[e];if(c&&(s=c.apply(i.proxy,n)),typeof t==`function`){let e=t.apply(this,n);return e===void 0?s:e}return s}}return{finalMethods:r}}function Pi(e,t=new WeakMap){if(!e||typeof e!=`object`)return e;if(t.has(e))return t.get(e);if(Array.isArray(e)){let n=[];t.set(e,n);for(let r of e)n.push(Pi(r,t));return n}let n={};t.set(e,n);for(let[r,i]of Object.entries(e))n[r]=Pi(i,t);return n}function Fi(e){let t=e.route;if(typeof t==`string`&&t)return t;let n=e.is;return typeof n==`string`&&n?n:`unknown`}function Ii(e){var t;let{methods:n={},lifetimes:r={},pageLifetimes:i={},options:a={},...o}=e,s=o.onLoad,c=o.onUnload,l=o.onShow,u=o.onHide,d=o.onReady,f=o.onSaveExitState,p=o.onPullDownRefresh,m=o.onReachBottom,h=o.onPageScroll,g=o.onRouteDone,_=o.onTabItemTap,v=o.onResize,y=o.onShareAppMessage,b=o.onShareTimeline,x=o.onAddToFavorites,S=(t=o.features)==null?{}:t,C=[s,c,l,u,d,f,p,m,h,g,_,v,y,b,x].some(e=>typeof e==`function`),w=!!o.__wevu_isPage||Object.keys(S==null?{}:S).length>0||C,T={...o},E=new Set([`data`,`behaviors`,`relations`,`externalClasses`,`options`,`properties`,`observers`,`pureDataPattern`,`virtualHost`,`definitionFilter`,`export`,`__wevuTemplateRefs`,`__wevuLayoutHosts`,je,X,`setupLifecycle`,`features`,`__wevu_isPage`]),D=[];for(let[e,t]of Object.entries(T))E.has(e)||typeof t!=`function`&&(D.push([e,t]),delete T[e]);let O=e=>{if(D.length){for(let[t,n]of D)if(!Q(e,t))try{e[t]=Pi(n)}catch(e){}}},k=new Set([`data`,`export`,`definitionFilter`,`onLoad`,`onUnload`,`onShow`,`onHide`,`onReady`,`onSaveExitState`,`onPullDownRefresh`,`onReachBottom`,`onPageScroll`,`onRouteDone`,`onTabItemTap`,`onResize`,`onShareAppMessage`,`onShareTimeline`,`onAddToFavorites`]),A={};for(let[e,t]of Object.entries(T))typeof t!=`function`||k.has(e)||(A[e]=t,delete T[e]);let j=T.__wevuTemplateRefs;delete T.__wevuTemplateRefs;let M=T.__wevuLayoutHosts;delete T.__wevuLayoutHosts;let N=T[je];delete T[je];let P=T[X];delete T[X];let F=T.observers,I=T.setupLifecycle===`created`?`created`:`attached`;delete T.setupLifecycle;let L=T.created;return delete T.features,delete T.created,delete T.onLoad,delete T.onUnload,delete T.onShow,delete T.onHide,delete T.onReady,{userMethods:n,userLifetimes:r,userPageLifetimes:i,userOptions:a,restOptions:T,topLevelMethods:A,templateRefs:j,layoutHosts:M,propsAliases:N,propsDerivedKeys:P,userObservers:F,setupLifecycle:I,legacyCreated:L,isPage:w,features:S,userOnLoad:s,userOnUnload:c,userOnShow:l,userOnHide:u,userOnReady:d,userOnSaveExitState:f,userOnPullDownRefresh:p,userOnReachBottom:m,userOnPageScroll:h,userOnRouteDone:g,userOnTabItemTap:_,userOnResize:v,userOnShareAppMessage:y,userOnShareTimeline:b,userOnAddToFavorites:x,applyExtraInstanceFields:O}}function Li(e){var t;let n=e.__wevu,r=e[Ke];if(!n||!r||typeof n.snapshot!=`function`)return;let i=n.snapshot();cr(i,(t=e[Z])==null?e.properties:t,n),tr(r,i,n.proxy)}function Ri(e){let{restOptions:t,propsAliases:n,propsDerivedKeys:r,userObservers:i}=e,a=t.properties&&typeof t.properties==`object`?Object.keys(t.properties):[],o=new Set(a),s=new Set(r==null?[]:r),c=Object.entries(n==null?{}:n).filter(([e,t])=>e&&t),l=new Set(c.map(([e])=>e)),u=[...s].filter(e=>o.has(e)&&!l.has(e)),d=new Set([Ge,qe,Qe]),f=new WeakMap,p=e=>e.startsWith(`__wv_`),m=e=>{let t=e.__wevu,n=t==null?void 0:t[X];if(n instanceof Set)for(let e of u)n.add(e)},h=(e,t,n)=>Q(e,t)&&Object.is(e[t],n)?!1:(e[t]=n,!0),g=(e,t,n)=>{var r;if(!d.has(t))return;let i=(r=e.__wevu)==null?void 0:r.state;try{i&&typeof i==`object`&&h(i,t,n);let r=e.data;r&&typeof r==`object`&&h(r,t,n)}catch(e){}},_=(e,t)=>{var n;if(!c.length)return;let r=e.__wevu,i=r==null?void 0:r.setupState,a=r==null?void 0:r.state;if(!i||typeof i!=`object`)return;m(e);let o=(n=f.get(e))==null?new Set:n;f.set(e,o);for(let[e,n]of c){if(Q(i,e)&&!o.has(e))continue;let r=t[n];try{h(i,e,r),o.add(e)}catch(e){}if(a&&typeof a==`object`&&(!Q(a,e)||o.has(e)))try{h(a,e,r)}catch(e){}}},v=(e,t)=>{if(!s.size)return;let n=e.__wevu,r=n==null?void 0:n.setupState;if(!r||typeof r!=`object`)return;m(e);let i=new Map(c);for(let e of s){var a;let n=(a=i.get(e))==null?e:a;if(Q(t,n))try{h(r,e,t[n])}catch(e){}}},y=e=>{try{Object.defineProperty(e,Me,{value:a,configurable:!0,enumerable:!1,writable:!1})}catch(t){e[Me]=a}},b=e=>{let t=e[de];if(!t||typeof t!=`object`)return;let n=t=>{var n;let r=(n=e.__wevu)==null?void 0:n.state;return typeof r==`object`&&!!r&&Q(r,t)},r=e.properties,i=r&&typeof r==`object`?r:void 0,a=Object.keys(t);for(let e of a)if(!i||!Q(i,e)||p(e)||o.has(e)||n(e))try{delete t[e]}catch(e){}if(!i){Li(e);return}for(let[e,r]of Object.entries(i))if(!(p(e)||o.has(e)||n(e)))try{t[e]=r}catch(e){}Li(e)},x=e=>{let t=e[Z],n=e.properties,r=e[Ae];if(t&&typeof t==`object`&&n&&typeof n==`object`){let i=n,a=Object.keys(t);for(let e of a)if(!Q(i,e))try{delete t[e]}catch(e){}for(let[n,a]of Object.entries(i)){let i=r&&Q(r,n)?r[n]:a;try{t[n]=i}catch(e){}g(e,n,i)}if(r){for(let[n,a]of Object.entries(r))if(!Q(i,n)){try{t[n]=a}catch(e){}g(e,n,a)}}v(e,t),_(e,t),Li(e)}r&&delete e[Ae],b(e)},S=(e,t)=>{if(!t||typeof t!=`object`)return;let n=e[Z];if(!n||typeof n!=`object`)return;let r=!1;for(let i of a)if(Q(t,i)){try{n[i]=t[i],r=!0}catch(e){}g(e,i,t[i])}r&&(v(e,n),_(e,n),Li(e),b(e))},C=(e,t,n)=>{var r,i;let a=e[Z];if(!a||typeof a!=`object`)return;try{a[t]=n}catch(e){}g(e,t,n);let o=(i=(r=e)[Ae])==null?r[Ae]=Object.create(null):i;o[t]=n,v(e,a),_(e,a),Li(e),b(e)},w={};if(a.length)for(let e of a)w[e]=function(t){C(this,e,t)};let T={...i==null?{}:i};for(let[e,t]of Object.entries(w)){let n=T[e];typeof n==`function`?T[e]=function(...e){n.apply(this,e),t.apply(this,e)}:T[e]=t}let E=T[`**`];return T[`**`]=function(...e){typeof E==`function`&&E.apply(this,e),x(this)},{attachWevuPropKeys:y,directPropsDerivedKeys:u,syncWevuPropsFromInstance:x,syncWevuPropsFromValues:S,finalObservers:T}}const zi=new Map;function Bi(){let e=A();return e[e.length-1]}function Vi(e){return Array.from(new Set(Array.isArray(e)?e:[e])).filter(e=>typeof e==`string`&&e.length>0)}function Hi(e){return it(e)}function Ui(e){return e&&typeof e.__wevuSetPageLayout==`function`?e:Bi()}function Wi(e){var t,n;if(!e||typeof e!=`object`)return;let r=(t=e[Ne])==null||(t=t.state)==null?void 0:t[J];if(r&&typeof r==`object`)return r;let i=(n=e.$state)==null?void 0:n[J];return i&&typeof i==`object`?i:e[J]&&typeof e[J]==`object`?e[J]:e}function Gi(e){return typeof e==`function`?e():m(e)?e.value:e}function Ki(e,t){return e.find(e=>e.key===t)}function qi(e,t){let n=e==null?void 0:e.selectComponent;if(typeof n!=`function`)return null;try{var r;return(r=n.call(e,t))==null?null:r}catch(e){return null}}function Ji(e,t){var n,r,i,a,o,s,c,l;if(!e.refName)return null;let u=hr(t),d=(n=(r=(i=(a=t[Ne])==null||(a=a.state)==null?void 0:a.$refs)==null?(o=t.__wevu)==null||(o=o.state)==null?void 0:o.$refs:i)==null?(s=t.$state)==null?void 0:s.$refs:r)==null?t.$refs:n,f=(c=u==null||(l=u.get(e.refName))==null?void 0:l.value)==null?d==null?void 0:d[e.refName]:c;if(Array.isArray(f)){var p;return(p=f[0])==null?null:p}return f==null?null:f}function Yi(e,t){let n=Wi(t);return Object.assign(n&&typeof n==`object`?Object.create(n):{},{selectComponent(r){let i=Ki(e,r);if(!i)return null;if(i.kind===`component`||!i.kind){var a,o;return Ji(i,t)||((a=(o=qi(n,i.selector))==null?qi(Bi(),i.selector):o)==null?null:a)}return null}})}function Xi(e,t){let n=t==null?P():t,r=Ui(n),i=Hi(r);if(!n||!r||i.length===0)return!1;for(let t of i){var a;let r=(a=zi.get(t))==null?new Map:a;for(let t of Vi(e))r.set(t,n);zi.set(t,r)}return n[ye]=i,!0}function Zi(e,t){var n;let r=t==null?P():t,i=Ui(r),a=(n=r==null?void 0:r[ye])==null?Hi(i):n;if(!r||!Array.isArray(a)||a.length===0)return!1;let o=!1;for(let t of a){let n=zi.get(t);if(n){for(let t of Vi(e))n.get(t)===r&&(n.delete(t),o=!0);n.size===0&&zi.delete(t)}}return delete r[ye],o}function Qi(e,t){var n,r;let i=Hi((n=Bi())==null?Ui(t):n).map(t=>{var n;return(n=zi.get(t))==null?void 0:n.get(e)}).find(Boolean);return(r=i==null?t:i)==null?P():r}function $i(e,t={}){var n,r;let i=Qi(e,(n=t.context)==null?t.fallbackContext:n),a=i==null||(r=i.selectComponent)==null?void 0:r.call(i,e);return a==null?null:a}function ea(e,t={}){var n,r;let i=(n=t.retries)==null?20:n,a=(r=t.interval)==null?16:r,o=$i(e,t);return o||i<=0?Promise.resolve(o):new Promise(n=>{setTimeout(()=>{n(ea(e,{...t,retries:i-1}))},a)})}function ta(e,t={}){if(!T())throw Error(`useLayoutBridge() 必须在 setup() 的同步阶段调用`);let n=P(),r=Vi(e),i=t.resolveComponent,a=Wi(n),o=Object.assign(a&&typeof a==`object`?Object.create(a):{},{selectComponent(e){var t,a,o;if(!r.includes(e))return null;let s=i==null?void 0:i(e);if(s!==void 0)return s;let c=Wi(n),l=c==null||(t=c.selectComponent)==null?void 0:t.call(c,e);if(l)return l;let u=Bi();return(a=u==null||(o=u.selectComponent)==null?void 0:o.call(u,e))==null?null:a}});Xi(r,o),U(()=>{Xi(r,o)}),W(()=>{Zi(r,o)})}function na(e,t){if(!e.length)return null;let n=t==null?P():t;if(!n)return null;let r=Yi(e,n);return Xi(e.map(e=>e.key),r),r}function ra(e,t){if(!e.length)return!1;let n=t==null?P():t;return n?Zi(e.map(e=>e.key),n):!1}function ia(e){ta(Object.keys(e),{resolveComponent(t){return Gi(e[t])}})}function aa(e){let{runtimeApp:t,watch:n,setup:r,restOptions:i,pageLifecycleHooks:a,finalObservers:o,userLifetimes:s,userPageLifetimes:c,finalMethods:l,finalOptions:u,applyExtraInstanceFields:d,templateRefs:f,layoutHosts:p,attachWevuPropKeys:m,setupLifecycle:h,syncWevuPropsFromInstance:g,directPropsDerivedKeys:_,isPage:v,legacyCreated:y,getRuntimeOwnerLabel:b}=e,x={},S=e=>{if(!Array.isArray(p)||!p.length||e[q])return;let t=na(p,e);t&&(e[q]=t)},C=e=>{v&&(e[De]=(t,n)=>{var r;let i=(r=e.__wevu)==null?void 0:r.state;if(!i||typeof i!=`object`)return;i[we]=Qn(t);let a=t===!1||n==null?{}:n;i[Ee]=a,Yn(e,t,a)})};if(v)for(let e of[`onReachBottom`,`onShareAppMessage`,`onShareTimeline`,`onAddToFavorites`]){let t=a[e];typeof t==`function`&&typeof l[e]!=`function`&&(x[e]=function(...e){return t.apply(this,e)})}Component({...i,...a,observers:o,lifetimes:{...s,created:function(...e){if(d(this),Array.isArray(f)&&f.length&&Object.defineProperty(this,et,{value:f,configurable:!0,enumerable:!1,writable:!1}),m(this),h===`created`){try{yi(this,t,n,r,{deferSetData:!0,snapshotOmitKeys:_})}catch(e){let t=b(this);throw Error(`[wevu] mount runtime failed in created (${t}): ${e instanceof Error?e.message:String(e)}`)}g(this),C(this)}typeof y==`function`&&y.apply(this,e),typeof s.created==`function`&&s.created.apply(this,e)},moved:function(...e){j(this,`onMoved`,e),typeof s.moved==`function`&&s.moved.apply(this,e)},attached:function(...e){if(d(this),Array.isArray(f)&&f.length&&!this[et]&&Object.defineProperty(this,et,{value:f,configurable:!0,enumerable:!1,writable:!1}),m(this),h!==`created`||!this.__wevu)try{yi(this,t,n,r,{snapshotOmitKeys:_})}catch(e){let t=b(this);throw Error(`[wevu] mount runtime failed in attached (${t}): ${e instanceof Error?e.message:String(e)}`)}g(this),C(this),S(this),h===`created`&&xi(this),j(this,`onAttached`,e),typeof s.attached==`function`&&s.attached.apply(this,e)},ready:function(...e){if(v&&typeof a.onReady==`function`){a.onReady.call(this,...e),typeof s.ready==`function`&&s.ready.apply(this,e);return}if(!this[Pe]){this[Pe]=!0,g(this),Tr(this,()=>{j(this,`onReady`,e),typeof s.ready==`function`&&s.ready.apply(this,e)});return}typeof s.ready==`function`&&s.ready.apply(this,e)},detached:function(...e){if(j(this,`onDetached`,e),v&&typeof a.onUnload==`function`){a.onUnload.call(this,...e),typeof s.detached==`function`&&s.detached.apply(this,e);return}Er(this),Array.isArray(p)&&p.length&&this[q]&&(ra(p,this[q]),delete this[q]),Ci(this),typeof s.detached==`function`&&s.detached.apply(this,e)},error:function(...e){j(this,`onError`,e),typeof s.error==`function`&&s.error.apply(this,e)}},pageLifetimes:{...c,show:function(...e){if(v&&typeof a.onShow==`function`){a.onShow.call(this,...e),typeof c.show==`function`&&c.show.apply(this,e);return}Si(this,!0),j(this,`onShow`,e),typeof c.show==`function`&&c.show.apply(this,e)},hide:function(...e){if(v&&typeof a.onHide==`function`){a.onHide.call(this,...e),typeof c.hide==`function`&&c.hide.apply(this,e);return}Si(this,!1),j(this,`onHide`,e),typeof c.hide==`function`&&c.hide.apply(this,e)},resize:function(...e){if(v&&typeof a.onResize==`function`){a.onResize.call(this,...e),typeof c.resize==`function`&&c.resize.apply(this,e);return}j(this,`onResize`,e),typeof c.resize==`function`&&c.resize.apply(this,e)},routeDone:function(...e){if(v&&typeof a.onRouteDone==`function`){a.onRouteDone.call(this,...e),typeof c.routeDone==`function`&&c.routeDone.apply(this,e);return}j(this,`onRouteDone`,e),typeof c.routeDone==`function`&&c.routeDone.apply(this,e)}},methods:{...x,...l},options:u})}function oa(e,t,n,r,i){var a;let{userMethods:o,userLifetimes:s,userPageLifetimes:c,userOptions:l,restOptions:u,topLevelMethods:d,templateRefs:f,layoutHosts:p,propsAliases:m,propsDerivedKeys:h,userObservers:g,setupLifecycle:_,legacyCreated:v,isPage:y,features:b,userOnLoad:x,userOnUnload:S,userOnShow:C,userOnHide:w,userOnReady:T,userOnSaveExitState:E,userOnPullDownRefresh:D,userOnReachBottom:O,userOnPageScroll:k,userOnRouteDone:A,userOnTabItemTap:j,userOnResize:M,userOnShareAppMessage:N,userOnShareTimeline:P,userOnAddToFavorites:F,applyExtraInstanceFields:I}=Ii(i),{enableOnPullDownRefresh:L,enableOnReachBottom:R,enableOnPageScroll:z,enableOnRouteDone:B,enableOnRouteDoneFallback:V,enableOnTabItemTap:H,enableOnResize:ee,enableOnShareAppMessage:te,enableOnShareTimeline:U,enableOnAddToFavorites:W,enableOnSaveExitState:G,effectiveOnSaveExitState:ne,effectiveOnPullDownRefresh:re,effectiveOnReachBottom:ie,effectiveOnPageScroll:ae,effectiveOnRouteDone:oe,effectiveOnTabItemTap:K,effectiveOnResize:se,effectiveOnShareAppMessage:ce,effectiveOnShareTimeline:le,effectiveOnAddToFavorites:ue}=Ai({features:b,userOnSaveExitState:E,userOnPullDownRefresh:D,userOnReachBottom:O,userOnPageScroll:k,userOnRouteDone:A,userOnTabItemTap:j,userOnResize:M,userOnShareAppMessage:N,userOnShareTimeline:P,userOnAddToFavorites:F}),de=(e,t)=>{let n=e[he];if(!n)return!1;let r=n[t];return r?Array.isArray(r)?r.length>0:typeof r==`function`:!1};{let e=u.export;u.export=function(){var t;let n=(t=this[pe])==null?{}:t,r=typeof e==`function`?e.call(this):{};return r&&typeof r==`object`&&!Array.isArray(r)?{...n,...r}:r==null?n:r}}let fe={multipleSlots:(a=l.multipleSlots)==null?!0:a,...l},{attachWevuPropKeys:me,directPropsDerivedKeys:ge,syncWevuPropsFromInstance:_e,syncWevuPropsFromValues:ve,finalObservers:ye}=Ri({restOptions:u,propsAliases:m,propsDerivedKeys:h,userObservers:g}),{finalMethods:q}=Ni({userMethods:{...d,...o},runtimeMethods:t});aa({runtimeApp:e,watch:n,setup:r,restOptions:u,pageLifecycleHooks:Mi({runtimeApp:e,watch:n,setup:r,userOnLoad:x,userOnUnload:S,userOnShow:C,userOnHide:w,userOnReady:T,isPage:y,enableOnSaveExitState:G,enableOnPullDownRefresh:L,enableOnReachBottom:R,enableOnPageScroll:z,enableOnRouteDone:B,enableOnRouteDoneFallback:V,enableOnTabItemTap:H,enableOnResize:ee,enableOnShareAppMessage:te,enableOnShareTimeline:U,enableOnAddToFavorites:W,syncWevuPropsFromValues:ve,effectiveOnSaveExitState:ne,effectiveOnPullDownRefresh:re,effectiveOnReachBottom:ie,effectiveOnPageScroll:ae,effectiveOnRouteDone:oe,effectiveOnTabItemTap:K,effectiveOnResize:se,effectiveOnShareAppMessage:ce,effectiveOnShareTimeline:le,effectiveOnAddToFavorites:ue,hasHook:de}),finalObservers:ye,userLifetimes:s,userPageLifetimes:c,finalMethods:q,finalOptions:fe,applyExtraInstanceFields:I,templateRefs:f,layoutHosts:p,attachWevuPropKeys:me,setupLifecycle:_,syncWevuPropsFromInstance:_e,syncWevuPropsFromValues:ve,directPropsDerivedKeys:ge,isPage:y,legacyCreated:v,getRuntimeOwnerLabel:Fi})}function sa(e){let{[mn]:t,data:n,computed:r,methods:i,setData:a,watch:o,setup:s,...c}=e.__wevuDefaultsScope===`component`?e:Sn(e),l=i==null?{}:i,u=r==null?{}:r,d=new Set,f=new Set,p=!1,m={globalProperties:{}},h={mount:pn({data:n,resolvedComputed:u,resolvedMethods:l,appConfig:m,setDataOptions:a}),use(e,...t){if(!e||d.has(e))return h;if(d.add(e),typeof e==`function`)e(h,...t);else if(typeof e.install==`function`)e.install(h,...t);else throw TypeError(`插件必须是函数,或包含 install 方法的对象`);return h},provide(e,t){return se(h,e,t),h},onUnmount(e){if(typeof e!=`function`)throw TypeError(`onUnmount 只接受函数`);return p?(e(),h):(f.add(e),h)},unmount(){if(!p){p=!0;for(let e of f)e();f.clear()}},config:m,version:_t},g=typeof App==`function`;try{G(h),Object.defineProperty(h,"__wevuSetDataOptions",{value:a,configurable:!0,enumerable:!1,writable:!1}),Object.defineProperty(h,"__wevuHasTemplateRuntimeBindings",{value:Object.keys(u).some(e=>e.startsWith(`__wv_bind_`)),configurable:!0,enumerable:!1,writable:!1})}catch(e){h.__wevuSetDataOptions=a,h.__wevuHasTemplateRuntimeBindings=Object.keys(u).some(e=>e.startsWith(`__wv_bind_`))}if(g){let e=D(),t=`__wevuAppRegistered`;e&&e[t]||(e&&(e[t]=!0),ki(h,i==null?{}:i,o,s,c))}return h}var ca=class extends Error{};function la(e){if(typeof e==`function`)return e;let t=e==null?void 0:e.get;return typeof t==`function`?t:void 0}function ua(e){return e.startsWith(`__wv_bind_`)||e.startsWith(`__wv_cls_`)||e.startsWith(`__wv_style_`)}function da(e){let{data:t,computed:n,setData:r}=e,i=n?Object.keys(n):[];if(!i.length)return;let{includeComputed:a,shouldIncludeKey:o,toPlainMaxDepth:s,toPlainMaxKeys:c,includeFunctions:l,functionPaths:u}=un(r);if(!a)return;let d={},f=new Set,p,m=e=>{if(Q(t,e)||!o(e))return{ok:!1};if(Q(d,e))return{ok:!0,value:d[e]};if(f.has(e))return{ok:!1};let r=la(n[e]);if(!r)return{ok:!1};f.add(e);try{let t=r.call(p);if(t===void 0)return{ok:!1};let n=Ut(t,new WeakMap,{maxDepth:s,maxKeys:c,includeFunctions:l,functionPaths:u,_path:e});return n===void 0?{ok:!1}:(d[e]=n,{ok:!0,value:n})}catch(e){return{ok:!1}}finally{f.delete(e)}};p=new Proxy(t,{get(e,r,i){if(typeof r==`string`){if(r===`data`||r===`$state`)return t;if(r===`props`||r===`$props`||r===`$attrs`)throw new ca;if(Q(t,r))return Reflect.get(e,r,i);if(n&&Q(n,r)){let e=m(r);if(e.ok)return e.value;throw new ca}throw new ca}return Reflect.get(e,r,i)},has(e,t){return Reflect.has(e,t)||typeof t==`string`&&!!(n&&Q(n,t))}});for(let e of i)ua(e)||m(e);return Object.keys(d).length?d:void 0}function fa(e,t,n){if(!e||typeof e!=`object`)return e;let r=da({data:e,computed:t,setData:n});return r?{...e,...r}:e}const pa=`__wevu_allowNullPropInput`,ma=`allowNullPropInput`,ha=new Map([[String,String],[Number,Number],[Boolean,Boolean],[Object,Object],[Array,Array],[Function,Function],[`String`,String],[`Number`,Number],[`Boolean`,Boolean],[`Object`,Object],[`Array`,Array],[`Function`,Function],[null,null],[`null`,null],[`Null`,null]]);function ga(e){return ha.get(e)}function _a(e){if(e===void 0)return[];let t=Array.isArray(e)?e:[e],n=[];t.forEach(e=>{let t=ga(e);t!==void 0&&(n.includes(t)||n.push(t))});let r=n.filter(e=>e!==null);return r.length>0?r:(n.includes(null),[null])}function va(e,t){let n=_a(t);if(n.length!==0&&(e.type=n[0],n.length>1)){let t=[];for(let e of n.slice(1))t.includes(e)||t.push(e);t.length>0&&(e.optionalTypes=t)}}function ya(e,t){if(t===void 0||e.type===t)return;let n=Array.isArray(e.optionalTypes)?[...e.optionalTypes]:[];n.includes(t)||(n.push(t),e.optionalTypes=n)}function ba(e){if(!Array.isArray(e))return[];let t=[];return e.forEach(e=>{let n=ga(e);n==null||t.includes(n)||t.push(n)}),t}function xa(e,t){if(e===void 0)return;if(e===null)return{type:null};if(Array.isArray(e)||typeof e==`function`){let n={};return va(n,e),t&&n.type!==null&&ya(n,null),Q(n,`type`)||(n.type=null),n}if(typeof e!=`object`)return e;let n={...e};if(`type`in n){var r;let e=_a(n.type);n.type=(r=e[0])==null?null:r;let t=ba(n.optionalTypes);for(let n of e.slice(1))n!==null&&!t.includes(n)&&t.push(n);t.length>0?n.optionalTypes=t:delete n.optionalTypes}return Q(n,`type`)||(n.type=null),t&&n.type!==null&&ya(n,null),n}function Sa(e,t){let n={};return Object.entries(e).forEach(([e,r])=>{let i=xa(r,t);i!==void 0&&(n[e]=i)}),n}function Ca(e,t){let n={};return e&&Object.entries(e).forEach(([e,r])=>{if(r!==void 0){if(r===null){n[e]={type:null};return}if(Array.isArray(r)||typeof r==`function`){let i={};va(i,r),t&&i.type!==null&&ya(i,null),Q(i,`type`)||(i.type=null),n[e]=i;return}if(typeof r==`object`){if(e.endsWith(`Modifiers`)&&Object.keys(r).length===0){n[e]={type:Object,value:{}};return}let i={};if(`type`in r&&r.type!==void 0&&va(i,r.type),Array.isArray(r.optionalTypes)){let e=r.optionalTypes.map(e=>ga(e)).filter(e=>e!=null);if(e.length>0){let t=Array.isArray(i.optionalTypes)?i.optionalTypes:[];for(let n of e)n!==i.type&&(t.includes(n)||t.push(n));t.length>0&&(i.optionalTypes=t)}}`observer`in r&&(typeof r.observer==`function`||typeof r.observer==`string`)&&(i.observer=r.observer);let a=`default`in r?r.default:r.value;a!==void 0&&(i.value=typeof a==`function`?a():a),t&&i.type!==null&&ya(i,null),Q(i,`type`)||(i.type=null),n[e]=i}}}),n}function wa(e,t,n){var r;let i=!!((r=e[pa])==null?e[ma]:r),{[pa]:a,[ma]:o,...s}=e,c=e.properties,l=n==null?c&&typeof c==`object`?c:void 0:n,u=!!(t||l),d=e=>{let t={...e==null?{}:e};return u?(Q(t,qe)||(t[qe]={type:String,value:``}),Q(t,Qe)||(t[Qe]={type:null,value:null}),Q(t,Ge)||(t[Ge]={type:null,value:null}),t):t};if(l){let{properties:e,...n}=s,r=l?i?Sa(l,i):l:void 0,a=Ca(t,i);return{...n,properties:d({...a,...r})}}return{...s,properties:d(Ca(t,i))}}const Ta=[Ke,qe,Ye,Je,Xe,Ze,Qe],Ea=/&amp;/g,Da=/&quot;/g,Oa=/&#34;/g,ka=/&apos;/g,Aa=/&#39;/g,ja=/&lt;/g,Ma=/&gt;/g;function Na(e){return e.replace(Ea,`&`).replace(Da,`"`).replace(Oa,`"`).replace(ka,`'`).replace(Aa,`'`).replace(ja,`<`).replace(Ma,`>`)}function Pa(e){var t,n,r,i;let a=Bn((t=(n=e==null||(r=e.currentTarget)==null?void 0:r.dataset)==null?e==null||(i=e.target)==null?void 0:i.dataset:n)==null?{}:t,`wvArgs`,e),o=[];if(Array.isArray(a))o=a;else if(typeof a==`string`)try{o=JSON.parse(a)}catch(e){try{o=JSON.parse(Na(a))}catch(e){o=[]}}return Array.isArray(o)||(o=[]),o.map(t=>t===`$event`?e:t)}function Fa(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 Ia(e){var t,n,r,i;return(t=(n=e==null||(r=e.__wevu)==null?void 0:r.proxy)==null?e==null||(i=e[Ne])==null?void 0:i.proxy:n)==null?e:t}function La(e,t){if(!t||Object.keys(t).length===0)return;let n=Ia(e),r={};for(let[e,i]of Object.entries(t))try{let t;typeof i==`function`?t=i.call(n):typeof(i==null?void 0:i.get)==`function`&&(t=i.get.call(n)),t!==void 0&&(r[e]=t)}catch(e){}return r}function Ra(e){var t,n;e==null||(t=e.__wevu)==null||(n=t.__wevu_flushSetupSnapshotSync)==null||n.call(t)}function za(e,t){Ra(e);let n=La(e,t);n&&Object.keys(n).length>0&&typeof(e==null?void 0:e.setData)==`function`&&e.setData(n)}function Ba(e,t){var n,r,i;let a=Q(t==null?{}:t,Qe)?t[Qe]:e==null||(n=e.properties)==null?void 0:n[Qe],o=Q(t==null?{}:t,Ze)?t[Ze]:e==null||(r=e.properties)==null?void 0:r[Ze],s=Fa(a),c=Fa(o),l={...s,...c};e[Xe]=l;let u=e==null||(i=e.__wevu)==null?void 0:i.state;return u&&typeof u==`object`&&(u[Xe]=l),l}function Va(e,t,n){let r=Ba(e,n);typeof(e==null?void 0:e.setData)==`function`&&e.setData({[Xe]:r}),za(e,t)}function Ha(e,t){var n;e[Ye]=t;let r=e==null?void 0:e.data;if(r&&typeof r==`object`)try{Object.defineProperty(r,Ye,{value:t,configurable:!0,enumerable:!1,writable:!0})}catch(e){r[Ye]=t}let i=e==null||(n=e.__wevu)==null?void 0:n.state;i&&typeof i==`object`&&(i[Ye]=t)}function Ua(e,t,n,r){var i;Ha(e,n),Ba(e),e[Je]=t||{};let a=e==null||(i=e.__wevu)==null?void 0:i.state;a&&typeof a==`object`&&(a[Je]=t||{}),typeof(e==null?void 0:e.setData)==`function`&&e.setData({[Je]:t||{}}),za(e,r)}function Wa(e,t,n){if(!t){typeof(e==null?void 0:e.__wvOwnerUnsub)==`function`&&e.__wvOwnerUnsub(),e.__wvOwnerUnsub=void 0,e.__wvOwnerBoundId=``,Ha(e,void 0);return}let r=(t,r)=>{Ua(e,t,r,n)};e.__wvOwnerBoundId!==t&&(typeof e.__wvOwnerUnsub==`function`&&e.__wvOwnerUnsub(),e.__wvOwnerBoundId=t,e.__wvOwnerUnsub=rr(t,r));let i=ar(t);i&&r(i,ir(t))}function Ga(e){var t,n,r,i;return(t=(n=e==null||(r=e.properties)==null?void 0:r[qe])==null?e==null||(i=e.properties)==null?void 0:i[Ke]:n)==null?``:t}function Ka(e,t){Va(e,t);let n=Ga(e);n&&Wa(e,n,t)}function qa(){let e={[Je]:{},[Xe]:{}};return Object.defineProperty(e,Ye,{value:void 0,configurable:!0,enumerable:!1,writable:!0}),e}function Ja(e){let t=e==null?void 0:e.computed,n={options:{virtualHost:!0},setData:{omit:Ta},[X]:Ta,properties:{[qe]:{type:String,value:``,observer(e){Wa(this,e||``,t)}},[Ke]:{type:String,value:``,observer(e){Wa(this,e||``,t)}},[Ze]:{type:null,value:null,observer(e){Va(this,t,{[Ze]:e})}},[Qe]:{type:null,value:null,observer(e){Va(this,t,{[Qe]:e})}}},data:qa,lifetimes:{attached(){Ka(this,t)},ready(){Ka(this,t)},detached(){typeof this.__wvOwnerUnsub==`function`&&this.__wvOwnerUnsub(),this.__wvOwnerUnsub=void 0,this.__wvOwnerBoundId=``,Ha(this,void 0)}},methods:{[Ce](e){var t,n,r,i,a;let o=this[Ye],s=Gn(o,void 0,e,(t=this.__wevu)==null||(t=t.methods)==null?void 0:t[_e]);if(s!==void 0)return s;if(!o)return;let c=Bn((n=(r=e==null||(i=e.currentTarget)==null?void 0:i.dataset)==null?e==null||(a=e.target)==null?void 0:a.dataset:r)==null?{}:n,`wvHandler`,e);if(typeof c!=`string`||!c)return;let l=o==null?void 0:o[c];if(typeof l!=`function`)return;let u=Pa(e);return l.apply(o,u)}}};return e!=null&&e.computed&&Object.keys(e.computed).length>0&&(n.computed=e.computed),e!=null&&e.inlineMap&&Object.keys(e.inlineMap).length>0&&(n.methods={...n.methods,[_e]:e.inlineMap}),n}function Ya(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function Xa(e){return typeof e!=`object`||!e||m(e)||f(e)||Array.isArray(e)?!0:Ya(e)}function Za(e,t,n,r){var i,a,o;let s=!!(r!=null&&r.includeFunctionsInState),c=r==null?void 0:r.functionPropPaths,l=(i=e==null?void 0:e.methods)==null?Object.create(null):i,u=(a=e==null?void 0:e.state)==null?Object.create(null):a,d=(o=e==null?void 0:e.setupState)==null?Object.create(null):o,p=f(u)?S(u):u,m=!1;if(e&&!e.methods)try{e.methods=l}catch(e){}if(e&&!e.state)try{e.state=u}catch(e){}if(e&&!e.setupState)try{e.setupState=d}catch(e){}if(Object.keys(n).forEach(r=>{let i=n[r];if(typeof i==`function`){let t=(...t)=>{var n;return i.apply((n=e==null?void 0:e.proxy)==null?e:n,t)};l[r]=t,u[r]=t,(s||c!=null&&c.has(r))&&(d[r]=t),m=!0}else{if(At(i)){var a;e==null||(a=e.__wevu_trackSetupReactiveKey)==null||a.call(e,r)}if(u[r]=i,i===t||!Xa(i))try{Object.defineProperty(p,r,{value:i,configurable:!0,enumerable:!1,writable:!0})}catch(e){}d[r]=i}}),e){var h,g;if(e.methods=(h=e.methods)==null?l:h,e.state=(g=e.state)==null?u:g,m){var _;(_=e.__wevu_touchSetupMethodsVersion)==null||_.call(e)}}}let Qa;function $a(){let e=w();if(!e)return;let t=e;Qa&&t[Be]!==Qa&&(t[Be]=Qa)}function eo(e){$a();let{__typeProps:t,data:n,computed:r,methods:i,setData:a,watch:o,setup:s,props:c,allowFunctionProps:l,...u}=Cn(e),d=u[me],f=Array.isArray(d)?[...new Set(d.filter(e=>typeof e==`string`&&e.length>0))]:[];delete u[me];let p=l===!0?{...a==null?{}:a,includeFunctions:!0,functionPaths:f}:l===!1?a:f.length?{...a==null?{}:a,functionPaths:f}:a,m=new Set(f.filter(e=>!e.includes(`.`))),h=sa({data:n,computed:r,methods:i,setData:p,[mn]:`component`}),g=typeof s==`function`?((e,t)=>{let n=Jr(s,e,t);return n&&t&&Za(t.runtime,t.instance,n,{includeFunctionsInState:l===!0,functionPropPaths:l===!1?void 0:m}),n}):void 0,_=fa(typeof n==`function`?n():n,r,p),v=wa(_===void 0?u:{...u,data:_},c),y={data:n,computed:r,methods:i,setData:p,watch:o,setup:g,mpOptions:v};return oa(h,i==null?{}:i,o,g,v),{__wevu_runtime:h,__wevu_options:y}}function to(e){var t;$a();let{properties:n,props:r,...i}=e;eo(wa({...i,allowNullPropInput:(t=i.allowNullPropInput)==null?!0:t,__wevu_allowNullPropInput:!0},r,n))}function no(e){to(Ja(e))}Qa=no,$a();const ro=[`dispose`,`abort`,`cancel`,`stop`,`disconnect`,`destroy`,`close`];function io(e){if(e){if(typeof e==`function`)return e;for(let t of ro){let n=e[t];if(typeof n==`function`)return()=>n.call(e)}}}function ao(){if(!P())throw Error(`useDisposables() 必须在 setup() 的同步阶段调用`);let e=new Set,t=!1,n=n=>{let r=io(n);if(!r)return()=>{};if(t){try{r()}catch(e){}return()=>{}}return e.add(r),()=>{e.delete(r)}},r=()=>{if(t)return;t=!0;let n=[...e];e.clear();for(let e of n)try{e()}catch(e){}};return K(r),W(r),{add:n,dispose:r,setTimeout:(e,t,...r)=>{let i=setTimeout(e,t,...r);return n(()=>{clearTimeout(i)}),i},setInterval:(e,t,...r)=>{let i=setInterval(e,t,...r);return n(()=>{clearInterval(i)}),i}}}function oo(e,t){let n=e,r=n.createIntersectionObserver;if(typeof r==`function`)return r.call(n,t);if(!L(`globalCreateIntersectionObserver`))return;let i=D(),a=i==null?void 0:i.createIntersectionObserver;if(typeof a==`function`)return O().intersectionObserverScopeByParameter?a.call(i,e,t):a.call(i,t)}function so(e,t){var n;if(t===!1||typeof e.relativeToViewport!=`function`)return e;let r=t&&typeof t==`object`?t:void 0;return(n=e.relativeToViewport(r))==null?e:n}function co(e){var t;let n=(t=e.context)==null?P():t;if(!n||!T())throw Error(`useElementIntersectionObserver() 必须在 setup() 的同步阶段调用`);let r=null,a=()=>{if(r){try{r.disconnect()}catch(e){}r=null}},o=()=>{var t,o;a();let s=i(e.selector);if(!(e.enabled==null||i(e.enabled))||!s)return null;let c=oo(n,i((t=e.observerOptions)==null?{}:t));return!c||typeof c.observe!=`function`?null:(r=so(c,(o=e.relativeToViewport)==null?!0:o),r.observe(s,t=>{var n;return(n=e.onObserve)==null?void 0:n.call(e,t)}),r)};return B(()=>{var t;return[i(e.selector),e.enabled==null?!0:i(e.enabled),i((t=e.observerOptions)==null?{}:t),e.relativeToViewport]},()=>{o()},{deep:!0}),ot(o),lt(a),K(a),W(a),{disconnect:a,observe:o,get observer(){return r}}}function lo(e,t){let n=e,r=n.createIntersectionObserver;if(typeof r==`function`)return r.call(n,t)}function uo(e,t){if(!L(`globalCreateIntersectionObserver`))return;let n=D(),r=n==null?void 0:n.createIntersectionObserver;if(typeof r==`function`)return O().intersectionObserverScopeByParameter?r.call(n,e,t):r.call(n,t)}function fo(e={}){var t;let n=P();if(!n)throw Error(`useIntersectionObserver() 必须在 setup() 的同步阶段调用`);let r=(t=lo(n,e))==null?uo(n,e):t;if(!r||typeof r.disconnect!=`function`)throw Error(`当前运行环境不支持 IntersectionObserver,请检查基础库版本或平台能力`);let i=!1,a=()=>{if(!i){i=!0;try{r.disconnect()}catch(e){}}};return K(a),W(a),r}function po(e){var t,n;return e?(t=(n=e.split(`?`)[0])==null?void 0:n.replace(/^\/+/,``))==null?``:t:``}function mo(){let e=A(),t=e[e.length-1],n=e.length||1;return{canGoBack:n>1,currentRoute:po(t==null?void 0:t.route),stackLength:n}}function ho(e={}){var t;if(!T())throw Error(`usePageStack() 必须在 setup() 的同步阶段调用`);let n=mo(),r=l(n.currentRoute),i=l(n.stackLength),a=C(()=>i.value>1),o=()=>{let e=mo();r.value=e.currentRoute,i.value=e.stackLength};return((t=e.autoRefresh)==null||t)&&(U(o),ae(o)),{canGoBack:a,currentRoute:r,refresh:o,stackLength:i}}function go(e={}){var t,n;let r=(t=e.defaultStatusBarHeight)==null?20:t,i=(n=e.defaultNavigationBarHeight)==null?44:n,a=D(),o=typeof(a==null?void 0:a.getSystemInfoSync)==`function`?a.getSystemInfoSync():{},s=Number((o==null?void 0:o.statusBarHeight)||r),c;try{c=typeof(a==null?void 0:a.getMenuButtonBoundingClientRect)==`function`?a.getMenuButtonBoundingClientRect():void 0}catch(e){}let l=Number((c==null?void 0:c.top)||0),u=Number((c==null?void 0:c.height)||0),d=l>s&&u>0?(l-s)*2+u:i;return{navigationBarHeight:d,navigationHeight:s+d,statusBarHeight:s}}function _o(e={}){var t;if(!T())throw Error(`useNavigationBarMetrics() 必须在 setup() 的同步阶段调用`);let n=go(e),r=l(n.statusBarHeight),i=l(n.navigationBarHeight),a=C(()=>r.value+i.value),o=()=>{let t=go(e);r.value=t.statusBarHeight,i.value=t.navigationBarHeight};return((t=e.autoRefresh)==null||t)&&U(o),{navigationBarHeight:i,navigationHeight:a,refresh:o,statusBarHeight:r}}function vo(e){return typeof e!=`number`||!Number.isFinite(e)?80:Math.max(0,e)}function yo(e){if(!(typeof e!=`number`||!Number.isFinite(e)))return Math.max(0,e)}function bo(e,t={}){var n,r;if(!P())throw Error(`usePageScrollThrottle() 必须在 setup() 的同步阶段调用`);if(typeof e!=`function`)throw TypeError(`usePageScrollThrottle() 需要传入回调函数`);let i=vo(t.interval),a=(n=t.leading)==null?!0:n,o=(r=t.trailing)==null?!0:r,s=yo(t.maxWait),c,l,u=!1,d=0,f,p=()=>{c&&(clearTimeout(c),c=void 0)},m=()=>{l&&(clearTimeout(l),l=void 0)},h=t=>{p(),m(),f=void 0,d=Date.now(),e(t)},g=()=>{let e=f;f=void 0,c=void 0,!(!e||u)&&h(e)},_=()=>{let e=f;l=void 0,!(!e||u)&&h(e)},v=e=>{if(!o||c)return;let t=Math.max(0,i-(e-(d===0?e:d)));c=setTimeout(g,t)},y=e=>{if(typeof s!=`number`||l)return;let t=s-(e-(d===0?e:d));if(t<=0){_();return}l=setTimeout(_,t)};ie(e=>{if(u)return;if(i===0){h(e);return}let t=Date.now();if(f=e,a&&(d===0||t-d>=i)){h(e);return}if(typeof s==`number`&&t-(d===0?t:d)>=s){h(e);return}!o&&typeof s!=`number`||(v(t),y(t))});let b=()=>{u||(u=!0,f=void 0,p(),m())};return K(b),W(b),b}function xo(e,t={}){te(async()=>{try{await e()}catch(e){var n;await((n=t.onError)==null?void 0:n.call(t,e))}finally{var r;await((r=t.stopPullDownRefresh)==null?(()=>at.stopPullDownRefresh()):r)()}})}function So(e,t){let n=t==null?P():t;if(!n||!T())throw Error(`${e}() 必须在 setup() 的同步阶段调用`);return n}function Co(e,t,n,r){let i=yr(e);return!i||!t?Promise.resolve(null):(r(n?i.selectAll(t):i.select(t)),new Promise(e=>{i.exec(t=>{let n=Array.isArray(t)?t[0]:null;e(n==null?null:n)})}))}function wo(e={}){let t=So(`useSelectorQuery`,e.context);return()=>yr(t)}function To(e={}){var t;let n=So(`useBoundingClientRect`,e.context),r=(t=e.all)==null?!1:t;return e=>Co(n,e,r,e=>e.boundingClientRect())}function Eo(e){var t;let n=So(`useSelectorFields`,e.context),r=(t=e.all)==null?!1:t;return t=>Co(n,t,r,t=>t.fields(e.fields))}function Do(e={}){var t;let n=So(`useScrollOffset`,e.context),r=(t=e.all)==null?!1:t;return e=>Co(n,e,r,e=>e.scrollOffset())}function Oo(e){let t=e,n=t.setUpdatePerformanceListener;if(typeof n==`function`)return e=>{n.call(t,e)}}function ko(e){let t=P();if(!t)throw Error(`useUpdatePerformanceListener() 必须在 setup() 的同步阶段调用`);if(typeof e!=`function`)throw TypeError(`useUpdatePerformanceListener() 需要传入监听函数`);let n=Oo(t);if(!n)throw Error(`当前实例不支持 setUpdatePerformanceListener,请检查基础库版本或组件上下文`);n(e);let r=!1,i=()=>{if(!r){r=!0;try{n(void 0)}catch(e){}}};return K(i),W(i),i}function Ao(){let e=P();if(e!=null&&e[ve]&&e[Re])return e[Re];throw Error(`defineAppSetup() / use() 只能在 app setup 上下文中调用`)}function jo(e){return e(Ao())}function Mo(e,...t){return Ao().use(e,...t)}const No=Object.freeze(Object.create(null));function Po(){var e;let t=T();if(!t)throw Error(`useAttrs() 必须在 setup() 的同步阶段调用`);return(e=t.attrs)==null?{}:e}function Fo(){var e;let t=T();if(!t)throw Error(`useSlots() 必须在 setup() 的同步阶段调用`);return(e=t.slots)==null?No:e}function Io(){let e=T();if(!(e!=null&&e.instance))throw Error(`useNativeInstance() 必须在 setup() 的同步阶段调用`);return e.instance}const Lo=Object.freeze(Object.create(null));function Ro(e,t){let n=t===`modelValue`?`modelModifiers`:`${t}Modifiers`,r=e==null?void 0:e[n];return!r||typeof r!=`object`?Lo:r}function zo(e,t){let n=e;try{Object.defineProperty(n,Symbol.iterator,{configurable:!0,value:()=>{let e=0;return{next:()=>e===0?(e+=1,{value:n,done:!1}):e===1?(e+=1,{value:t(),done:!1}):{value:void 0,done:!0}}}})}catch(e){}return n}function Bo(e,t,n={}){let r=T();if(!r)throw Error(`useModel() 必须在 setup() 的同步阶段调用`);let i=r.emit,a=`update:${t}`,o=()=>Ro(e,t);return zo(y({get:()=>{let r=e==null?void 0:e[t];return n.get?n.get(r,o()):r},set:e=>{let t=n.set?n.set(e,o()):e;i==null||i(a,t)}}),o)}function Vo(e){let t=P();if(!(t!=null&&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)=>{var i;let a={...e,...n},o=(i=a==null?void 0:a.valueProp)==null?`value`:i;return r.model(t,n)[o]},r.on=(t,n)=>{var i;let a={...e,...n},o=`on${vt((i=a==null?void 0:a.event)==null?`input`:i)}`;return r.model(t,n)[o]},r}function Ho(){let e=Vo({event:`change`});return function(t,n){return e.model(t,n)}}function Uo(e,t){return e==null?t:t==null?e:Array.isArray(e)&&Array.isArray(t)?[...new Set([...e,...t])]:typeof e==`object`&&typeof t==`object`?{...e,...t}:t}function Wo(e){let t=e[nt];if(t)return t;let n=new Map;try{Object.defineProperty(e,nt,{value:n,configurable:!0,enumerable:!1,writable:!1})}catch(t){e[nt]=n}return n}function Go(e){let t=P();if(!t)throw Error(`useTemplateRef() 必须在 setup() 的同步阶段调用`);let n=typeof e==`string`?e.trim():``;if(!n)throw Error(`useTemplateRef() 需要传入有效的模板 ref 名称`);let r=Wo(t),i=r.get(n);if(i)return i;let a=z(null);return r.set(n,a),a}export{_t as $,Xi as A,yi as B,co as C,eo as D,no as E,ra as F,Zn as G,Ci as H,ta as I,Jn as J,Yn as K,ia as L,Qi as M,$i as N,sa as O,Zi as P,$ as Q,ea as R,fo as S,to as T,Jr as U,Si as V,Qn as W,bn as X,xn as Y,Bt as Z,bo as _,Bo as a,mt as at,_o as b,Fo as c,ht as ct,ko as d,gt as et,To as f,xo as g,wo as h,Ho as i,dt as it,na as j,oa as k,jo as l,lt,Eo as m,Uo as n,ut as nt,Po as o,ft as ot,Do as p,Xn as q,Vo as r,ct as rt,Io as s,ot as st,Go as t,pt as tt,Mo as u,st as ut,mo as v,ao as w,ho as x,go as y,ki as z};
1
+ import{A as e,C as t,N as n,P as r,a as i,b as a,d as o,g as s,h as c,i as l,j as u,k as d,l as f,m as p,n as m,o as h,p as g,r as _,s as v,t as y,w as b,x,y as S}from"./ref-CRwjgX_d.mjs";import{t as C}from"./computed-DdPJb4_M.mjs";import{_ as w,c as T,d as E,g as D,h as O,l as k,m as A,n as j,p as M,r as N,s as P,t as F,u as I,v as L,x as R}from"./base-D-o2Hv6z.mjs";import{l as z,t as B}from"./watch-6_s3_f8q.mjs";import{C as V,D as H,E as ee,H as te,M as U,N as W,O as G,S as ne,T as re,V as ie,X as ae,b as oe,et as K,k as se,w as ce,x as le,y as ue}from"./router-BiJKkvy7.mjs";import{WEVU_ATTRS_KEY as de,WEVU_EFFECT_SCOPE_KEY as fe,WEVU_EXPOSED_KEY as pe,WEVU_FUNCTION_PROP_PATHS_KEY as me,WEVU_HOOKS_KEY as he,WEVU_INLINE_HANDLER as ge,WEVU_INLINE_MAP_KEY as _e,WEVU_IS_APP_INSTANCE_KEY as ve,WEVU_LAYOUT_BRIDGE_PAGE_KEYS as ye,WEVU_LAYOUT_HOST_BRIDGE_KEY as q,WEVU_MODEL_HANDLER as be,WEVU_NATIVE_INSTANCE_KEY as J,WEVU_ON_BEFORE_UPDATE_HOOK as xe,WEVU_ON_LOAD_CALLED_KEY as Se,WEVU_ON_UPDATED_HOOK as Y,WEVU_OWNER_HANDLER as Ce,WEVU_PAGE_LAYOUT_NAME_KEY as we,WEVU_PAGE_LAYOUT_NONE as Te,WEVU_PAGE_LAYOUT_PROPS_KEY as Ee,WEVU_PAGE_LAYOUT_SETTER_KEY as De,WEVU_PAGE_SCROLL_HOOK_DEPTH_KEY as Oe,WEVU_PARENT_INSTANCE_KEY as ke,WEVU_PENDING_PROP_VALUES_KEY as Ae,WEVU_PROPS_ALIASES_KEY as je,WEVU_PROPS_DERIVED_KEYS_KEY as X,WEVU_PROPS_KEY as Z,WEVU_PROP_KEYS_KEY as Me,WEVU_PUBLIC_RUNTIME_KEY as Ne,WEVU_READY_CALLED_KEY as Pe,WEVU_RESERVED_METHOD_PREFIX as Fe,WEVU_ROUTE_DONE_CALLED_KEY as Ie,WEVU_ROUTE_DONE_IN_TICK_KEY as Le,WEVU_RUNTIME_APP_KEY as Re,WEVU_RUNTIME_KEY as ze,WEVU_SCOPED_SLOT_CREATOR_KEY as Be,WEVU_SCOPED_SLOT_OWNER_SEED_KEY as Ve,WEVU_SCOPED_SLOT_OWNER_STORE_KEY as He,WEVU_SETUP_CONTEXT_INSTANCE_KEY as Ue,WEVU_SETUP_STATE_KEY as We,WEVU_SLOT_NAMES_PROP as Ge,WEVU_SLOT_OWNER_ID_KEY as Ke,WEVU_SLOT_OWNER_ID_PROP as qe,WEVU_SLOT_OWNER_KEY as Je,WEVU_SLOT_OWNER_PROXY_KEY as Ye,WEVU_SLOT_PROPS_DATA_KEY as Xe,WEVU_SLOT_PROPS_KEY as Ze,WEVU_SLOT_SCOPE_KEY as Qe,WEVU_TEMPLATE_REFS_CALLBACKS_KEY as $e,WEVU_TEMPLATE_REFS_KEY as et,WEVU_TEMPLATE_REFS_PENDING_KEY as tt,WEVU_TEMPLATE_REF_MAP_KEY as nt,WEVU_WATCH_STOPS_KEY as rt}from"@weapp-core/constants";import{resolveMiniProgramPageKeys as it}from"@weapp-core/shared";import{wpi as at}from"@wevu/api";function ot(e){k(F(`onMounted`),`onReady`,e)}function st(e){k(F(`onUpdated`),Y,e)}function ct(e){F(`onBeforeUnmount`),e()}function lt(e){k(F(`onUnmounted`),`onUnload`,e)}function ut(e){F(`onBeforeMount`),e()}function dt(e){k(F(`onBeforeUpdate`),xe,e)}function ft(e){let t=F(`onErrorCaptured`);k(t,`onError`,n=>e(n,t,``))}function pt(e){k(F(`onActivated`),`onShow`,e)}function mt(e){k(F(`onDeactivated`),`onHide`,e)}function ht(e){F(`onServerPrefetch`)}function gt(e,t){j(e,t===`before`?xe:Y)}const _t=`6.16.40`;function vt(e){return e?e.charAt(0).toUpperCase()+e.slice(1):``}function yt(e){return e?e.split(`.`).map(e=>e.trim()).filter(Boolean):[]}function Q(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function bt(e,t,n){let r=e[t];if(!r)throw Error(`计算属性 "${t}" 是只读的`);r(n)}function xt(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 St(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 Ct(e,t,n,r,i,a){if(!i.length)return;let[o,...s]=i;if(!s.length){if(n[o])bt(r,o,a);else{let n=t&&Object.prototype.hasOwnProperty.call(t,o)?t:e,r=n[o];m(r)?r.value=a:n[o]=a}return}if(n[o]){bt(r,o,a);return}let c=t&&Object.prototype.hasOwnProperty.call(t,o)?t:e;(c[o]==null||typeof c[o]!=`object`)&&(c[o]={}),St(c[o],s,a)}function wt(e,t){return t.reduce((e,t)=>e==null?e:e[t],e)}function Tt(e){return xt(e)}function Et(e,t,n,r,i){return(a,o)=>{let s=yt(a);if(!s.length)throw Error(`bindModel 需要非空路径`);let c=()=>wt(e,s),l=e=>{Ct(t,i,n,r,s,e)},u={event:`input`,valueProp:`value`,parser:Tt,formatter:e=>e,...o};return{get value(){return c()},set value(e){l(e)},update(e){l(e)},model(e){let t={...u,...e},n=`on${vt(t.event)}`,r=e=>{l(t.parser(e))};return{[t.valueProp]:t.formatter(c()),[n]:r}}}}}function Dt(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function Ot(e){return Array.isArray(e)||Dt(e)}function kt(e){if(Array.isArray(e))return e;let t=[];for(let n of Object.keys(e)){let r=Object.getOwnPropertyDescriptor(e,n);!r||typeof r.get==`function`||t.push(r.value)}return t}function At(e,t=new WeakSet){return m(e)||f(e)?!0:!e||typeof e!=`object`||t.has(e)||(t.add(e),!Ot(e))?!1:kt(e).some(e=>At(e,t))}function jt(e,t=new WeakSet){if(m(e)){let n=e.value;f(n)&&s(n),jt(n,t);return}if(f(e)){s(e),jt(S(e),t);return}!e||typeof e!=`object`||t.has(e)||!Ot(e)||(t.add(e),kt(e).forEach(e=>jt(e,t)))}const Mt=`__wevu_native_bridge__`;function Nt(e){try{Object.defineProperty(e,Mt,{value:!0,configurable:!1,enumerable:!1,writable:!1})}catch(t){e[Mt]=!0}}function Pt(e){return typeof e==`function`&&!!e[Mt]}function Ft(n){let r=Object.create(null),i=Object.create(null),a=new Set;return{computedRefs:r,computedSetters:i,dirtyComputedKeys:a,createTrackedComputed:(r,i,o)=>{let s,c=!0,l,d={get value(){return c&&(s=l(),c=!1),e(d,`value`),s},set value(e){if(!o)throw Error(`计算属性是只读的`);o(e)}};return _(d),l=t(i,{lazy:!0,scheduler:()=>{c||(c=!0,n.setDataStrategy===`patch`&&n.includeComputed&&a.add(r),u(d,`value`))}}),d},computedProxy:new Proxy({},{get(e,t){if(typeof t==`string`&&r[t])return r[t].value},has(e,t){return typeof t==`string`&&!!r[t]},ownKeys(){return Object.keys(r)},getOwnPropertyDescriptor(e,t){if(typeof t==`string`&&r[t])return{configurable:!0,enumerable:!0,value:r[t].value}}})}}function It(e){let{state:t,setupState:n,computedDefs:r,methodDefs:i,appConfig:a,includeComputed:o,setDataStrategy:s}=e,c={},{computedRefs:u,computedSetters:d,dirtyComputedKeys:f,createTrackedComputed:p,computedProxy:h}=Ft({includeComputed:o,setDataStrategy:s}),g=l(0),_=(e,t)=>{let n=S(e),r=n[ze],i=r==null?void 0:r.proxy,a=(e,t)=>{let n=e[t];return Pt(n)},o=n=>!(!n||typeof n!=`object`||n===e||n===t||n===i||a(n,`triggerEvent`)||a(n,`createSelectorQuery`)||a(n,`createIntersectionObserver`)||a(n,`setData`)),s=n[J];if(o(s))return s;let c=r==null?void 0:r.instance;if(o(c))return c},v=e=>{if(Q(c,e))return;let n=(...n)=>{let r=_(t,t);if(!r)return;let i=Reflect.get(r,e);if(typeof i==`function`)return i.apply(r,n)};Nt(n),c[e]=n},y=new Proxy(t,{get(e,r,i){if(typeof r==`string`){if(g.value,Q(n,r))return Reflect.get(n,r,i);if(r===`props`){let t=e[Z];if(t&&typeof t==`object`)return t}if(r===`data`||r===`$state`)return t;if(r===`$computed`)return h;if(Q(c,r))return c[r];if(u[r])return u[r].value;if(Q(a.globalProperties,r))return a.globalProperties[r]}if(!Reflect.has(e,r)){let t=_(e,i);if(t&&Reflect.has(t,r)){let e=Reflect.get(t,r);return typeof e==`function`?e.bind(t):e}}let o=Reflect.get(e,r,i);return typeof r==`string`&&Q(n,r)?Reflect.get(n,r,i):o},set(e,t,r,i){if(typeof t==`string`&&u[t])return bt(d,t,r),!0;if(Q(n,t)){let e=Reflect.get(n,t,i);return m(e)&&!m(r)?(e.value=r,!0):Reflect.set(n,t,r,i)}if(Reflect.has(e,t)){var a;let o=Reflect.get(e,t,i);return m(o)&&!m(r)?(o.value=r,!0):Q((a=e[Z])==null?{}:a,t)?Reflect.set(n,t,r,i):Reflect.set(e,t,r,i)}let o=_(e,i);return o&&Reflect.has(o,t)?Reflect.set(o,t,r):Reflect.set(e,t,r,i)},has(e,t){if(t===`data`||typeof t==`string`&&(Q(n,t)||u[t]||Q(c,t)))return!0;let r=_(e,e);return r&&Reflect.has(r,t)?!0:Reflect.has(e,t)},ownKeys(e){let t=new Set;return Reflect.ownKeys(e).forEach(e=>{t.add(e)}),Reflect.ownKeys(n).forEach(e=>{t.add(e)}),Object.keys(c).forEach(e=>t.add(e)),Object.keys(u).forEach(e=>t.add(e)),[...t]},getOwnPropertyDescriptor(e,r){if(typeof r==`string`&&Q(n,r))return Object.getOwnPropertyDescriptor(n,r);if(Reflect.has(e,r))return Object.getOwnPropertyDescriptor(e,r);if(typeof r==`string`){if(r===`data`)return{configurable:!0,enumerable:!1,get(){return t}};if(u[r])return{configurable:!0,enumerable:!0,get(){return u[r].value},set(e){bt(d,r,e)}};if(Q(c,r))return{configurable:!0,enumerable:!1,value:c[r]}}}});return Object.keys(i).forEach(e=>{let t=i[e];if(typeof t==`function`){c[e]=(...e)=>t.apply(y,e);return}e===_e&&t&&typeof t==`object`&&(c[e]=t)}),v(`triggerEvent`),v(`createSelectorQuery`),v(`createIntersectionObserver`),v(`setData`),Object.keys(r).forEach(e=>{let t=r[e];if(typeof t==`function`)u[e]=p(e,()=>t.call(y));else{var n,i;let r=(n=t.get)==null?void 0:n.bind(y);if(!r)throw Error(`计算属性 "${e}" 需要提供 getter`);let a=(i=t.set)==null?void 0:i.bind(y);a?(d[e]=a,u[e]=p(e,r,a)):u[e]=p(e,r)}}),{boundMethods:c,computedRefs:u,computedSetters:d,dirtyComputedKeys:f,computedProxy:h,publicInstance:y,touchSetupMethodsVersion(){g.value+=1}}}function Lt(e){return e!==`patch`&&e!==`diff`}function Rt(e){if(e!==`off`)return t=>{if(e===`fallback`&&!Lt(t.reason))return;let n=typeof t.bytes==`number`?t.bytes:t.estimatedBytes,r=typeof n==`number`?`${n}B`:`unknown`,i=[`mode=${t.mode}`,`reason=${t.reason}`,`pending=${t.pendingPatchKeys}`,`keys=${t.payloadKeys}`,`bytes=${r}`];typeof t.mergedSiblingParents==`number`&&i.push(`mergedParents=${t.mergedSiblingParents}`),typeof t.computedDirtyKeys==`number`&&i.push(`computedDirty=${t.computedDirtyKeys}`);let a=`[wevu:setData] ${i.join(` `)}`;if(Lt(t.reason)){console.warn(a);return}console.info(a)}}const zt=Symbol(`wevu.noSetData`);function $(e){return Object.defineProperty(e,zt,{value:!0,configurable:!0,enumerable:!1,writable:!1}),e}function Bt(e){return typeof e==`object`&&!!e&&e[zt]===!0}function Vt(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function Ht(e,t,n,r,i,a,o,s,c,l){let u=h(e);if(typeof u==`bigint`){let e=Number(u);return Number.isSafeInteger(e)?e:u.toString()}if(typeof u==`symbol`)return u.toString();if(typeof u==`function`)return s||c!=null&&c.has(l)?u:void 0;if(typeof u!=`object`||!u)return u;if(Bt(u))return;let d=f(u),p=d?S(u):u,m=!!r&&d;if(r&&!m){let e=i==null?void 0:i.get(p);m=e==null?!At(p):e,i==null||i.set(p,m)}let g=m?r:void 0;if(a<=0||o.keys<=0)return p;if(g){let e=v(p),t=g.get(p);if(t&&t.version===e)return t.value}if(n.has(p))return;if(t.has(p))return t.get(p);if(p instanceof Date)return p.getTime();if(p instanceof RegExp)return p.toString();if(p instanceof Map){let e=[];return t.set(p,e),n.add(p),p.forEach((r,i)=>{e.push([Ht(i,t,n,void 0,void 0,1/0,{keys:1/0},s,void 0,``),Ht(r,t,n,void 0,void 0,1/0,{keys:1/0},s,void 0,``)])}),n.delete(p),e}if(p instanceof Set){let e=[];return t.set(p,e),n.add(p),p.forEach(r=>{e.push(Ht(r,t,n,void 0,void 0,1/0,{keys:1/0},s,void 0,``))}),n.delete(p),e}if(typeof ArrayBuffer<`u`){if(p instanceof ArrayBuffer)return p.byteLength;if(ArrayBuffer.isView(p)){let e=p;if(typeof e[Symbol.iterator]==`function`){let r=[...e];return t.set(p,r),r.map(e=>Ht(e,t,n,void 0,void 0,1/0,{keys:1/0},s,void 0,``))}let r=[...new Uint8Array(e.buffer,e.byteOffset,e.byteLength)];return t.set(p,r),r}}if(p instanceof Error)return{name:p.name,message:p.message};if(Array.isArray(p)){let e=[];t.set(p,e),n.add(p);let u=a-1;for(let a=0;a<p.length;a+=1){let d=l?`${l}.${a}`:String(a),f=Ht(p[a],t,n,r,i,u,o,s,c,d);e[a]=f===void 0?null:f}return n.delete(p),g&&g.set(p,{version:v(p),value:e}),e}let _={};t.set(p,_),n.add(p);let y=a-1;for(let e of Object.keys(p)){if(--o.keys,o.keys<=0)break;let a=l?`${l}.${e}`:e,u=Ht(p[e],t,n,r,i,y,o,s,c,a);u!==void 0&&(_[e]=u)}return n.delete(p),g&&g.set(p,{version:v(p),value:_}),_}function Ut(e,t=new WeakMap,n){var r,i,a;let o=(r=n==null?void 0:n._depth)==null?typeof(n==null?void 0:n.maxDepth)==`number`?Math.max(0,Math.floor(n.maxDepth)):1/0:r,s=(i=n==null?void 0:n._budget)==null?typeof(n==null?void 0:n.maxKeys)==`number`?{keys:Math.max(0,Math.floor(n.maxKeys))}:{keys:1/0}:i,c=Array.isArray(n==null?void 0:n.functionPaths)&&n.functionPaths.length?new Set(n.functionPaths):void 0;return Ht(e,t,new WeakSet,n==null?void 0:n.cache,n==null?void 0:n.cacheEligibility,o,s,!!(n!=null&&n.includeFunctions),c,(a=n==null?void 0:n._path)==null?``:a)}function Wt(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 Gt(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(!Q(t,i)||!n(e[i],t[i]))return!1;return!0}function Kt(e,t){return Object.is(e,t)?!0:Array.isArray(e)&&Array.isArray(t)?Wt(e,t,Kt):Vt(e)&&Vt(t)?Gt(e,t,Kt):!1}function qt(e){return e===void 0?null:e}function Jt(e,t,n,r){if(!Kt(e,t)){if(Vt(e)&&Vt(t)){for(let i of Object.keys(t)){if(!Q(e,i)){r[`${n}.${i}`]=qt(t[i]);continue}Jt(e[i],t[i],`${n}.${i}`,r)}for(let i of Object.keys(e))Q(t,i)||(r[`${n}.${i}`]=null);return}if(Array.isArray(e)&&Array.isArray(t)){Wt(e,t,Kt)||(r[n]=qt(t));return}r[n]=qt(t)}}function Yt(e,t,n){let r={},i=n==null?void 0:n.skipKeys;for(let n of Object.keys(t))i!=null&&i.has(n)||Jt(e[n],t[n],n,r);for(let n of Object.keys(e))i!=null&&i.has(n)||Q(t,n)||(r[n]=null);return r}function Xt(e){let t=Object.keys(e).sort();if(t.length<=1)return e;let n={},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 Zt(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+=Zt(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+=Zt(a,t-i,n),i>t)return i;return i}function Qt(e,t){if(t===1/0)return{fallback:!1,estimatedBytes:void 0,bytes:void 0};let n=t,r=Object.keys(e).length,i=Zt(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(e){return{fallback:!1,estimatedBytes:i,bytes:void 0}}return{fallback:!1,estimatedBytes:i,bytes:void 0}}function $t(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){var d;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=(d=l.get(a))==null?[]:d;o.push(e),l.set(a,o)}let f=[...l.entries()].filter(([e,t])=>t.length>=i&&!u.has(e)).sort((e,t)=>t[0].split(`.`).length-e[0].split(`.`).length);if(!f.length)return{out:t,merged:0};let p={};Object.assign(p,t);let m=0,h=new WeakMap,g=e=>{if(e&&typeof e==`object`){let t=h.get(e);if(t!==void 0)return t;let n=Zt(e,1/0,new WeakSet);return h.set(e,n),n}return Zt(e,1/0,new WeakSet)},_=(e,t)=>2+e.length+1+g(t);for(let[e,t]of f){if(Q(p,e))continue;let n=t.filter(e=>Q(p,e));if(n.length<i)continue;let c=r(e);if(!(a&&Array.isArray(c))&&!(o!==1/0&&_(e,c)>o)){if(s!==1/0){let t=0;for(let e of n)t+=_(e,p[e]);if(_(e,c)>t*s)continue}p[e]=c;for(let e of n)delete p[e];m+=1}}return{out:p,merged:m}}function en(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function tn(e){return e===void 0?null:e}function nn(e){if(Array.isArray(e))return e.map(e=>nn(e));if(!en(e))return e;let t={};for(let n of Object.keys(e))t[n]=nn(e[n]);return t}function rn(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(!en(e)||!en(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(!Q(t,r)||!Object.is(e[r],t[r]))return!1;return!0}function an(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(!an(e[i],t[i],n-1,r))return!1;return!0}if(!en(e)||!en(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||!Q(t,a)||!an(e[a],t[a],n-1,r))return!1;return!0}function on(e,t,n,r,i){var a;let o=(a=i==null?void 0:i.cloneValue)==null?!0:a,s=t.split(`.`).filter(Boolean);if(!s.length)return;let c=e;for(let e=0;e<s.length-1;e++){let t=s[e];(!Q(c,t)||c[t]==null||typeof c[t]!=`object`)&&(c[t]={}),c=c[t]}let l=s[s.length-1];if(r===`delete`)try{delete c[l]}catch(e){c[l]=null}else c[l]=o?nn(n):n}function sn(e){let{state:t,setupState:n,computedRefs:r,includeComputed:i,shouldIncludeKey:a,plainCache:o,plainCacheEligibility:s,toPlainMaxDepth:c,toPlainMaxKeys:l,includeFunctions:u=!1,functionPaths:d=[]}=e,p=new WeakMap,m={},h=Number.isFinite(l)?{keys:l}:void 0,g=f(t)?S(t):t,_=n&&typeof n==`object`?f(n)?S(n):n:void 0,v=Object.keys(g),y=_?Object.keys(_):[],b=i?Object.keys(r):[];for(let e of v)a(e)&&(m[e]=Ut(g[e],p,{cache:o,cacheEligibility:s,maxDepth:c,includeFunctions:u,functionPaths:d,_budget:h,_path:e}));for(let e of y)a(e)&&(m[e]=Ut(_[e],p,{cache:o,cacheEligibility:s,maxDepth:c,includeFunctions:u,functionPaths:d,_budget:h,_path:e}));for(let e of b)a(e)&&(m[e]=Ut(r[e].value,p,{cache:o,cacheEligibility:s,maxDepth:c,includeFunctions:u,functionPaths:d,_budget:h,_path:e}));return m}function cn(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,includeFunctions:y=!1,functionPaths:b,plainCache:x,plainCacheEligibility:S,pendingPatches:C,fallbackTopKeys:w,latestSnapshot:T,latestComputedSnapshot:E,needsFullSnapshot:D,emitDebug:O,runDiffUpdate:k}=e;if(C.size>u){D.value=!0;let e=C.size;C.clear(),r.clear(),O({mode:`diff`,reason:`maxPatchKeys`,pendingPatchKeys:e,payloadKeys:0}),k(`maxPatchKeys`);return}let A=new WeakMap,j=new Map,M=Object.create(null),N=[...C.entries()];if(Number.isFinite(g)&&g>0){let e=new Map;for(let[t]of N){var P;let n=t.split(`.`,1)[0];e.set(n,((P=e.get(n))==null?0:P)+1)}for(let[t,n]of e)n>=g&&w.add(t)}let F=N.filter(([e])=>{for(let t of w)if(e===t||e.startsWith(`${t}.`))return!1;return!0}),I=new Map(F);C.clear();let L=e=>{let n=e.split(`.`).filter(Boolean),r=t;for(let e of n){if(r==null)return r;r=r[e]}return r},R=e=>{if(j.has(e))return j.get(e);let t=tn(Ut(L(e),A,{cache:x,cacheEligibility:S,maxDepth:_,maxKeys:v,includeFunctions:y,functionPaths:b,_path:e}));return j.set(e,t),t};if(w.size){for(let e of w)l(e)&&(M[e]=R(e),I.set(e,{kind:`property`,op:`set`}));w.clear()}for(let[e,t]of F){if((t.kind===`array`?`set`:t.op)===`delete`){M[e]=null;continue}M[e]=R(e)}let z=0;if(i&&r.size){let e=Object.create(null),t=[...r];r.clear(),z=t.length;for(let r of t){if(!l(r))continue;let t=Ut(n[r].value,A,{cache:x,cacheEligibility:S,maxDepth:_,maxKeys:v,includeFunctions:y,functionPaths:b,_path:r}),i=E[r];(a===`deep`?an(i,t,o,{keys:s}):a===`shallow`?rn(i,t):Object.is(i,t))||(e[r]=tn(t),E[r]=nn(t))}Object.assign(M,e)}let B=Xt(M),V=0;if(f){let e=$t({input:B,entryMap:I,getPlainByPath:R,mergeSiblingThreshold:f,mergeSiblingSkipArray:h,mergeSiblingMaxParentBytes:m,mergeSiblingMaxInflationRatio:p});V=e.merged,B=Xt(e.out)}let H=Qt(B,d),ee=H.fallback;if(O({mode:ee?`diff`:`patch`,reason:ee?`maxPayloadBytes`:`patch`,pendingPatchKeys:F.length,payloadKeys:Object.keys(B).length,mergedSiblingParents:V||void 0,computedDirtyKeys:z||void 0,estimatedBytes:H.estimatedBytes,bytes:H.bytes}),ee){D.value=!0,C.clear(),r.clear(),k(`maxPayloadBytes`);return}if(Object.keys(B).length){for(let[e,t]of Object.entries(B)){let n=I.get(e);n?on(T,e,t,n.kind===`array`?`set`:n.op,{cloneValue:!1}):on(T,e,t,`set`,{cloneValue:!1})}if(typeof c.setData==`function`){let e=c.setData(B);e&&typeof e.then==`function`&&e.catch(()=>{})}O({mode:`patch`,reason:`patch`,pendingPatchKeys:F.length,payloadKeys:Object.keys(B).length})}}function ln(e){let{state:t,setupState:n,snapshotOmitKeys:r,computedRefs:i,dirtyComputedKeys:a,includeComputed:o,setDataStrategy:s,computedCompare:c,computedCompareMaxDepth:l,computedCompareMaxKeys:u,currentAdapter:d,shouldIncludeKey:p,maxPatchKeys:h,maxPayloadBytes:g,mergeSiblingThreshold:_,mergeSiblingMaxInflationRatio:y,mergeSiblingMaxParentBytes:b,mergeSiblingSkipArray:x,elevateTopKeyThreshold:C,toPlainMaxDepth:w,toPlainMaxKeys:T,includeFunctions:E=!1,functionPaths:D,debug:O,debugWhen:k,debugSampleRate:A,runTracker:j,isMounted:M,initialSnapshot:N}=e,P=new WeakMap,F=new WeakMap,I={},L=Object.create(null),R=Object.create(null),z=Object.create(null),B={value:s===`patch`},V=new Map,H=new Set,ee=e=>{if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype},te=(e,t)=>{if(Object.is(e,t))return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length?e.every((e,n)=>te(e,t[n])):!1;if(ee(e)&&ee(t)){let n=Object.keys(e),r=Object.keys(t);return n.length===r.length?n.every(n=>Q(t,n)&&te(e[n],t[n])):!1}return!1},U=e=>{let t=m(e)?e.value:e;if(typeof t!=`object`||!t)return t;if(!f(t)&&At(t))return{snapshot:Ut(t,new WeakMap,{cacheEligibility:F,maxDepth:w,maxKeys:T,includeFunctions:E,functionPaths:D})};let n=f(t)?S(t):t;return{raw:n,version:v(n)}},W=(e,t)=>Object.is(e,t)?!0:!e||!t||typeof e!=`object`||typeof t!=`object`||!Q(e,`raw`)||!Q(t,`raw`)?e&&t&&typeof e==`object`&&typeof t==`object`&&Q(e,`snapshot`)&&Q(t,`snapshot`)?te(e.snapshot,t.snapshot):!1:e.raw===t.raw&&e.version===t.version,G=e=>p(e)&&!(r!=null&&r.has(e));if(N)for(let[e,t]of Object.entries(N))G(e)&&(I[e]=t);let ne=()=>{if(!N)return;let e=f(t)?S(t):t,r=n&&typeof n==`object`?f(n)?S(n):n:void 0;for(let t of Object.keys(N))if(G(t)){if(r&&Q(r,t)){R[t]=U(r[t]);continue}Q(e,t)&&(e[t]=N[t],R[t]=U(e[t]))}},re=e=>{let r=[],i=n&&typeof n==`object`?f(n)?S(n):n:void 0;for(let n of new Set([...Object.keys(t),...i?Object.keys(i):[]])){if(!G(n))continue;let a=i&&Q(i,n)?i[n]:t[n],o=m(a)?a.value:a;!o||typeof o!=`object`||S(o)===e&&r.push(n)}return r},ie=e=>{if(!O)return;let t=e.reason!==`patch`&&e.reason!==`diff`;if(!(k===`fallback`&&!t)&&!(A<1&&Math.random()>A))try{O(e)}catch(e){}},ae=()=>sn({state:t,setupState:n,computedRefs:i,includeComputed:o,shouldIncludeKey:G,plainCache:P,plainCacheEligibility:F,toPlainMaxDepth:w,toPlainMaxKeys:T,includeFunctions:E,functionPaths:D});ne();let oe=()=>{let e=f(t)?S(t):t,r=n&&typeof n==`object`?f(n)?S(n):n:void 0,a={...I},s=new WeakMap,c=new Set,l=new Set,u=new Set;for(let t of new Set([...Object.keys(e),...r?Object.keys(r):[]])){if(!G(t))continue;c.add(t);let n=r&&Q(r,t)?r:e,i=U(n[t]),o=R[t];o&&i&&typeof o==`object`&&typeof i==`object`&&Q(o,`raw`)&&Q(i,`raw`)&&Array.isArray(o.raw)&&Array.isArray(i.raw)&&o.raw!==i.raw&&u.add(t),(!W(o,i)||!Q(I,t))&&(a[t]=Ut(n[t],s,{cache:P,cacheEligibility:F,maxDepth:w,maxKeys:T,includeFunctions:E,functionPaths:D,_path:t})),R[t]=i}for(let e of Object.keys(R))c.has(e)||(delete R[e],(!o||!Q(i,e))&&delete a[e]);if(!o){for(let e of Object.keys(z))delete z[e];return{snapshot:a,replacedTopLevelKeys:u}}for(let e of Object.keys(i)){if(!G(e))continue;l.add(e);let t=i[e].value,n=U(t);(!W(z[e],n)||!Q(I,e))&&(a[e]=Ut(t,s,{cache:P,cacheEligibility:F,maxDepth:w,maxKeys:T,includeFunctions:E,functionPaths:D,_path:e})),z[e]=n}for(let t of Object.keys(z))l.has(t)||(delete z[t],(!Q(e,t)||!G(t))&&delete a[t]);return{snapshot:a,replacedTopLevelKeys:u}},K=(e=`diff`)=>{var t;let n=s===`diff`?oe():void 0,r=(t=n==null?void 0:n.snapshot)==null?ae():t,c=n?(()=>{let e={};for(let t of n.replacedTopLevelKeys)e[t]=r[t];return{...Yt(I,r,{skipKeys:n.replacedTopLevelKeys}),...e}})():Yt(I,r);if(I=r,B.value=!1,V.clear(),s===`patch`&&o){L=Object.create(null);for(let e of Object.keys(i))G(e)&&(L[e]=r[e]);a.clear()}if(Object.keys(c).length){if(typeof d.setData==`function`){let e=d.setData(c);e&&typeof e.then==`function`&&e.catch(()=>{})}ie({mode:`diff`,reason:e,pendingPatchKeys:0,payloadKeys:Object.keys(c).length})}};return{job:e=>{if(M())if(j(),s===`patch`&&!B.value){if(!(V.size>0||H.size>0||o&&a.size>0)){K(`diff`);return}cn({state:t,computedRefs:i,dirtyComputedKeys:a,includeComputed:o,computedCompare:c,computedCompareMaxDepth:l,computedCompareMaxKeys:u,currentAdapter:d,shouldIncludeKey:G,maxPatchKeys:h,maxPayloadBytes:g,mergeSiblingThreshold:_,mergeSiblingMaxInflationRatio:y,mergeSiblingMaxParentBytes:b,mergeSiblingSkipArray:x,elevateTopKeyThreshold:C,toPlainMaxDepth:w,toPlainMaxKeys:T,includeFunctions:E,functionPaths:D,plainCache:P,plainCacheEligibility:F,pendingPatches:V,fallbackTopKeys:H,latestSnapshot:I,latestComputedSnapshot:L,needsFullSnapshot:B,emitDebug:ie,runDiffUpdate:K})}else K(B.value?`needsFullSnapshot`:`diff`)},mutationRecorder:(e,t)=>{if(!M())return;if(e.root!==t){let t=re(e.root);if(t.length)for(let e of t)H.add(e);return}if(!e.path){if(Array.isArray(e.fallbackTopKeys)&&e.fallbackTopKeys.length)for(let t of e.fallbackTopKeys)H.add(t);else B.value=!0;return}let n=e.path.split(`.`,1)[0];G(n)&&V.set(e.path,{kind:e.kind,op:e.op})},snapshot:()=>s===`patch`?ae():{...I},cloneLatestSnapshot:()=>({...I}),getLatestSnapshot:()=>I}}function un(e){var t,n,r,i,a,o,s;let c=(t=e==null?void 0:e.includeComputed)==null?!0:t,l=(n=e==null?void 0:e.suspendWhenHidden)==null?!1:n,u=(r=e==null?void 0:e.strategy)==null?`diff`:r,d=typeof(e==null?void 0:e.maxPatchKeys)==`number`?Math.max(0,e.maxPatchKeys):1/0,f=typeof(e==null?void 0:e.maxPayloadBytes)==`number`?Math.max(0,e.maxPayloadBytes):1/0,p=typeof(e==null?void 0:e.mergeSiblingThreshold)==`number`?Math.max(2,Math.floor(e.mergeSiblingThreshold)):0,m=typeof(e==null?void 0:e.mergeSiblingMaxInflationRatio)==`number`?Math.max(0,e.mergeSiblingMaxInflationRatio):1.25,h=typeof(e==null?void 0:e.mergeSiblingMaxParentBytes)==`number`?Math.max(0,e.mergeSiblingMaxParentBytes):1/0,g=(i=e==null?void 0:e.mergeSiblingSkipArray)==null?!0:i,_=(a=e==null?void 0:e.computedCompare)==null?u===`patch`?`deep`:`reference`:a,v=typeof(e==null?void 0:e.computedCompareMaxDepth)==`number`?Math.max(0,Math.floor(e.computedCompareMaxDepth)):4,y=typeof(e==null?void 0:e.computedCompareMaxKeys)==`number`?Math.max(0,Math.floor(e.computedCompareMaxKeys)):200,b=e==null?void 0:e.prelinkMaxDepth,x=e==null?void 0:e.prelinkMaxKeys,S=e==null?void 0:e.debug,C=(o=e==null?void 0:e.diagnostics)==null?`off`:o,w=(s=e==null?void 0:e.debugWhen)==null?`fallback`:s,T=typeof(e==null?void 0:e.debugSampleRate)==`number`?Math.min(1,Math.max(0,e.debugSampleRate)):1,E=typeof(e==null?void 0:e.elevateTopKeyThreshold)==`number`?Math.max(0,Math.floor(e.elevateTopKeyThreshold)):1/0,D=typeof(e==null?void 0:e.toPlainMaxDepth)==`number`?Math.max(0,Math.floor(e.toPlainMaxDepth)):1/0,O=typeof(e==null?void 0:e.toPlainMaxKeys)==`number`?Math.max(0,Math.floor(e.toPlainMaxKeys)):1/0,k=!!(e!=null&&e.includeFunctions),A=Array.isArray(e==null?void 0:e.functionPaths)?[...new Set(e.functionPaths.filter(e=>typeof e==`string`&&e.length>0))]:[],j=Array.isArray(e==null?void 0:e.pick)&&e.pick.length>0?new Set(e.pick):void 0,M=Array.isArray(e==null?void 0:e.omit)&&e.omit.length>0?new Set(e.omit):void 0;return{includeComputed:c,suspendWhenHidden:l,setDataStrategy:u,maxPatchKeys:d,maxPayloadBytes:f,mergeSiblingThreshold:p,mergeSiblingMaxInflationRatio:m,mergeSiblingMaxParentBytes:h,mergeSiblingSkipArray:g,computedCompare:_,computedCompareMaxDepth:v,computedCompareMaxKeys:y,prelinkMaxDepth:b,prelinkMaxKeys:x,debug:S,diagnostics:C,debugWhen:w,debugSampleRate:T,elevateTopKeyThreshold:E,toPlainMaxDepth:D,toPlainMaxKeys:O,includeFunctions:k,functionPaths:A,pickSet:j,omitSet:M,shouldIncludeKey:e=>!(j&&!j.has(e)||M&&M.has(e))}}function dn(e,t){let n=(()=>{e()});return n.stop=()=>n(),n.pause=()=>{var e;t==null||(e=t.pause)==null||e.call(t)},n.resume=()=>{var e;t==null||(e=t.resume)==null||e.call(t)},n}function fn(e){return typeof e==`function`?e():e==null?{}:e}function pn(e){let{data:n,resolvedComputed:i,resolvedMethods:l,appConfig:u,setDataOptions:m}=e;return e=>{let h=fn(n);if(h&&typeof h==`object`&&!Q(h,Z))try{Object.defineProperty(h,Z,{value:g(Object.create(null)),configurable:!0,enumerable:!1,writable:!1})}catch(e){}let _=o(h),v=o(Object.create(null)),y=e==null?void 0:e.__wevu_snapshotOmitKeys,b=!!(e!=null&&e.__wevu_deferInitialSnapshot),C=e==null?void 0:e.__wevu_initialSnapshot,w=new Set(y instanceof Set||Array.isArray(y)?y:[]);if(h&&typeof h==`object`&&!Q(h,We))try{Object.defineProperty(h,We,{value:v,configurable:!0,enumerable:!1,writable:!1})}catch(e){}let T=i,E=l,D=!0,O=[],k=new Set;Object.keys(_).forEach(e=>{let t=_[e];At(t)&&k.add(e)});let{includeComputed:A,setDataStrategy:j,maxPatchKeys:M,maxPayloadBytes:N,mergeSiblingThreshold:P,mergeSiblingMaxInflationRatio:F,mergeSiblingMaxParentBytes:I,mergeSiblingSkipArray:L,computedCompare:R,computedCompareMaxDepth:z,computedCompareMaxKeys:V,prelinkMaxDepth:H,prelinkMaxKeys:ee,debug:te,diagnostics:U,debugWhen:W,debugSampleRate:G,elevateTopKeyThreshold:ne,toPlainMaxDepth:re,toPlainMaxKeys:ie,includeFunctions:ae,functionPaths:oe,shouldIncludeKey:K}=un(m),se=Rt(U),ce=te||se?e=>{typeof te==`function`&&te(e),se==null||se(e)}:void 0,le=U===`always`?`always`:W,{boundMethods:ue,computedRefs:fe,computedSetters:pe,dirtyComputedKeys:me,computedProxy:he,publicInstance:ge,touchSetupMethodsVersion:_e}=It({state:_,setupState:v,computedDefs:T,methodDefs:E,appConfig:u,includeComputed:A,setDataStrategy:j}),ve=e==null?{setData:()=>{}}:e,ye=S(_),q,be=ln({state:_,setupState:v,snapshotOmitKeys:w,computedRefs:fe,dirtyComputedKeys:me,includeComputed:A,setDataStrategy:j,computedCompare:R,computedCompareMaxDepth:z,computedCompareMaxKeys:V,currentAdapter:ve,shouldIncludeKey:K,maxPatchKeys:M,maxPayloadBytes:N,mergeSiblingThreshold:P,mergeSiblingMaxInflationRatio:F,mergeSiblingMaxParentBytes:I,mergeSiblingSkipArray:L,elevateTopKeyThreshold:ne,toPlainMaxDepth:re,toPlainMaxKeys:ie,includeFunctions:ae,functionPaths:oe,debug:ce,debugWhen:le,debugSampleRate:G,runTracker:()=>q==null?void 0:q(),isMounted:()=>D,initialSnapshot:C&&typeof C==`object`?C:void 0}),J=()=>be.job(ye),xe=e=>be.mutationRecorder(e,ye);q=t(()=>{s(_);let e=_[Z];f(e)&&s(e);let t=_[de];f(t)&&s(t),k.forEach(e=>{var t;jt((t=v[e])==null?_[e]:t)})},{lazy:!0,scheduler:()=>r(J)}),b||J(),O.push(dn(()=>d(q))),j===`patch`&&(c(_,{shouldIncludeTopKey:K,maxDepth:H,maxKeys:ee}),a(xe),O.push(dn(()=>x(xe))),O.push(dn(()=>p(_))));function Se(e,t,n){let r=B(e,(e,n)=>t(e,n),n);return O.push(r),dn(()=>{r();let e=O.indexOf(r);e>=0&&O.splice(e,1)},r)}let Y={get state(){return _},get setupState(){return v},get proxy(){return ge},get methods(){return ue},get computed(){return he},get adapter(){return ve},bindModel:Et(ge,_,fe,pe,v),watch:Se,snapshot:()=>be.snapshot(),unmount:()=>{D&&(D=!1,O.forEach(e=>{try{e()}catch(e){}}),O.length=0)}};try{Object.defineProperty(Y,"__wevu_touchSetupMethodsVersion",{value:_e,configurable:!0,enumerable:!1,writable:!1})}catch(e){Y.__wevu_touchSetupMethodsVersion=_e}try{Object.defineProperty(Y,"__wevu_flushSetupSnapshotSync",{value:J,configurable:!0,enumerable:!1,writable:!1})}catch(e){Y.__wevu_flushSetupSnapshotSync=J}try{Object.defineProperty(Y,"__wevu_cloneLatestSnapshot",{value:be.cloneLatestSnapshot,configurable:!0,enumerable:!1,writable:!1})}catch(e){Y.__wevu_cloneLatestSnapshot=be.cloneLatestSnapshot}try{Object.defineProperty(Y,"__wevu_trackSetupReactiveKey",{value:e=>{k.add(e)},configurable:!0,enumerable:!1,writable:!1})}catch(e){Y.__wevu_trackSetupReactiveKey=e=>{k.add(e)}}try{Object.defineProperty(Y,X,{value:w,configurable:!0,enumerable:!1,writable:!1})}catch(e){Y[X]=w}return Y}}const mn=`__wevuDefaultsScope`;let hn={};function gn(e){if(!(!e||typeof e!=`object`||Array.isArray(e)))return e}function _n(e,t){if(!e)return t;if(!t)return e;let n={...e,...t},r=gn(e.setData),i=gn(t.setData);(r||i)&&(n.setData={...r==null?{}:r,...i==null?{}:i});let a=gn(e.options),o=gn(t.options);return(a||o)&&(n.options={...a==null?{}:a,...o==null?{}:o}),n}function vn(e,t){return _n(e,t)}function yn(e,t){return{app:_n(e.app,t.app),component:_n(e.component,t.component)}}function bn(e){hn=yn(hn,e)}function xn(){hn={}}function Sn(e){return vn(hn.app,e)}function Cn(e){return vn(hn.component,e)}const wn=/&amp;/g,Tn=/&quot;/g,En=/&#34;/g,Dn=/&apos;/g,On=/&#39;/g,kn=/&lt;/g,An=/&gt;/g;function jn(e){return e.replace(wn,`&`).replace(Tn,`"`).replace(En,`"`).replace(Dn,`'`).replace(On,`'`).replace(kn,`<`).replace(An,`>`)}function Mn(e){if(typeof e==`number`&&Number.isFinite(e))return e;if(typeof e==`string`&&e.trim()){let t=Number(e);if(Number.isFinite(t))return t}}const Nn=/[^a-z0-9]+/gi,Pn=/^-+|-+$/g;function Fn(e){return e.trim().replace(Nn,`-`).replace(Pn,``).toLowerCase()}const In=/-([a-z0-9])/g;function Ln(e,t){let n=Fn(typeof(t==null?void 0:t.type)==`string`?t.type:``);if(!n)return;let r=n.replace(In,(e,t)=>t.toUpperCase());if(r)return`${e}${r[0].toUpperCase()}${r.slice(1)}`}const Rn={wvEventDetail:[`wd`,`wvEventDetail`],wvHandler:[`wh`,`wvHandler`],wvInlineId:[`wi`,`wvInlineId`]};function zn(e,t,n){var r;let i=(r=Rn[t])==null?[t]:r;for(let t of i){let r=Ln(t,n);if(r&&(e==null?void 0:e[r])!==void 0)return e[r]}for(let t of i)if((e==null?void 0:e[t])!==void 0)return e[t]}function Bn(e,t,n){return zn(e,t,n)}function Vn(e,t){let n=Bn(e,`wvEventDetail`,t);return n===!0||n===1||n===`1`||n===`true`}function Hn(e,t){if(!Vn(t,e))return e;if(!(!e||typeof e!=`object`||!(`detail`in e)))return e.detail}function Un(e,t){if(!t)return;let n=t.split(`.`).filter(Boolean),r=m(e)?e.value:e;for(let e of n){if(m(r)&&(r=r.value),r==null)return;r=r[e]}return m(r)?r.value:r}function Wn(e){if(typeof e!=`object`||!e||m(e)||f(e))return e;try{return o(e)}catch(t){return e}}function Gn(e,t,n,r){var i,a,o,s;let c=(i=(a=n==null||(o=n.currentTarget)==null?void 0:o.dataset)==null?n==null||(s=n.target)==null?void 0:s.dataset:a)==null?{}:i,l=Hn(n,c),u=Bn(c,`wvInlineId`,n);if(u&&r){let t=r[u];if(t&&typeof t.fn==`function`){let n={},r=Array.isArray(t.keys)?t.keys:[];for(let e=0;e<r.length;e+=1){let t=r[e];n[t]=c==null?void 0:c[`wvS${e}`]}let i=Array.isArray(t.indexKeys)?t.indexKeys:[];for(let e=0;e<i.length;e+=1){let t=i[e],r=Mn(c==null?void 0:c[`wvI${e}`]);r!==void 0&&(n[t]=r)}let a=Array.isArray(t.scopeResolvers)?t.scopeResolvers:[];for(let t=0;t<r.length;t+=1){let i=r[t],o=a[t];try{let t;if(typeof o==`function`)t=o(e,n,l);else if(o&&typeof o==`object`&&o.type===`for-item`){let r=n[o.indexKey],i=Un(e,o.path);t=i==null?void 0:i[r]}else continue;t!==void 0&&(n[i]=Wn(t))}catch(e){}}let o=t.fn(e,n,l);return typeof o==`function`?o.call(e,l):o}}let d=Bn(c,`wvHandler`,n),f=typeof t==`string`&&t?t:typeof d==`string`?d:void 0;if(!f)return;let p=Bn(c,`wvArgs`,n),m=[];if(Array.isArray(p))m=p;else if(typeof p==`string`)try{m=JSON.parse(p)}catch(e){try{m=JSON.parse(jn(p))}catch(e){m=[]}}Array.isArray(m)||(m=[]);let h=m.map(e=>e===`$event`?l:e),g=e==null?void 0:e[f];if(typeof g==`function`)return g.apply(e,h)}function Kn(){let e=ne();if(e)return e;let t=A();return t[t.length-1]}function qn(e){return e===Te?!1:e}function Jn(){var e,t;if(!T())throw Error(`usePageLayout() 必须在 setup() 的同步阶段调用`);let n=P(),r=n==null||(e=n.__wevu)==null?void 0:e.state,i=o({name:qn(r==null?void 0:r[we]),props:{...(t=r==null?void 0:r[Ee])==null?{}:t}});return n&&(n.__wevuPageLayoutState=i),R(i)}function Yn(e,t,n){let r=e.__wevuPageLayoutState;r&&(r.name=t,r.props={...n})}function Xn(e){var t,n;let r=e.__wevuPageLayoutState,i=(t=e.__wevu)==null?void 0:t.state;!r||!i||(r.name=qn(i[we]),r.props={...(n=i[Ee])==null?{}:n})}function Zn(e,t){let n=P(),r=n==null?void 0:n[De];if(typeof r==`function`){r(e,t);return}let i=Kn(),a=i==null?void 0:i[De];if(typeof a==`function`){a(e,t);return}throw Error(`setPageLayout() 未找到当前页面实例。请在页面 setup()、事件回调或当前页面上下文中调用。`)}function Qn(e){return e===!1?Te:e}function $n(){let e=globalThis;return e[He]instanceof Map||(e[He]=new Map),typeof e[Ve]!=`number`&&(e[Ve]=0),{globalObject:e,ownerStore:e[He]}}function er(){let{globalObject:e}=$n();return e[Ve]+=1,`wv${e[Ve]}`}function tr(e,t,n){var r;let{ownerStore:i}=$n(),a=(r=i.get(e))==null?{snapshot:{},proxy:n,subscribers:new Set}:r;if(a.snapshot=t,a.proxy=n,i.set(e,a),a.subscribers.size)for(let e of a.subscribers)try{e(t,n)}catch(e){}}function nr(e){let{ownerStore:t}=$n();t.delete(e)}function rr(e,t){var n;let{ownerStore:r}=$n(),i=(n=r.get(e))==null?{snapshot:{},proxy:void 0,subscribers:new Set}:n;return i.subscribers.add(t),r.set(e,i),()=>{let n=r.get(e);n&&n.subscribers.delete(t)}}function ir(e){var t;let{ownerStore:n}=$n();return(t=n.get(e))==null?void 0:t.proxy}function ar(e){var t;let{ownerStore:n}=$n();return(t=n.get(e))==null?void 0:t.snapshot}function or(e){let t=e.__wevu_cloneLatestSnapshot;return typeof t==`function`?t():typeof e.snapshot==`function`?e.snapshot():{}}function sr(e,t){let n=e[X];return!(n instanceof Set&&n.has(t))}function cr(e,t,n){if(!(!t||typeof t!=`object`))for(let[r,i]of Object.entries(t))sr(n,r)&&(e[r]=i)}function lr(e,t,n){var r;try{t.state[Ke]=n}catch(e){}try{e[Ke]=n}catch(e){}try{let t=e.data;t&&typeof t==`object`&&(t[Ke]=n)}catch(e){}let i=or(t);cr(i,(r=e[Z])==null?e.properties:r,t),tr(n,i,t.proxy)}function ur(e){return e.kind===`component`}function dr(e){return new Proxy(e,{get(e,t,n){let r=Reflect.get(e,t,n);return m(r)?r.value:r},set(e,t,n,r){let i=e[t];return m(i)&&!m(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}})}function fr(e,t){let n=e.__wevuExposeProxy;if(n&&e.__wevuExposeRaw===t)return n;let r=dr(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(n){e.__wevuExposeProxy=r,e.__wevuExposeRaw=t}return r}function pr(e,t){if(!t||typeof t!=`object`)return e;let n=t;return $(new Proxy(e,{get(e,t,r){if(Reflect.has(e,t))return Reflect.get(e,t,r);let i=n[t];return typeof i==`function`?i.bind(n):i},set(e,t,r,i){return Reflect.has(e,t)?Reflect.set(e,t,r,i):(t in n,n[t]=r,!0)},has(e,t){return Reflect.has(e,t)||t in n},ownKeys(e){return[...new Set([...Reflect.ownKeys(e),...Reflect.ownKeys(n)])]},getOwnPropertyDescriptor(e,t){if(Reflect.has(e,t))return Object.getOwnPropertyDescriptor(e,t);let r=Object.getOwnPropertyDescriptor(n,t);return r&&{...r,configurable:!0}}}))}function mr(e){var t;if(!e||typeof e!=`object`)return e==null?null:e;let n=e,r=n[pe];return r&&typeof r==`object`?fr(n,r):(t=n[Ne])!=null&&t.proxy?n[Ne].proxy:e}function hr(e){return e[nt]}function gr(e,t,n){if(!e)return;let r=e.get(t);r&&(r.value=n)}function _r(e,t){var n,r;let i=(n=(r=e.__wevu)==null?void 0:r.proxy)==null?e:n,a;if(t.get)try{a=t.get.call(i)}catch(e){a=void 0}return a==null&&t.name&&(a=t.name),typeof a==`function`?{type:`function`,fn:a}:m(a)?{type:`ref`,ref:a}:typeof a==`string`&&a?{type:`name`,name:a}:t.name?{type:`name`,name:t.name}:{type:`skip`}}function vr(e){var t,n;let r=(t=(n=e.__wevu)==null?void 0:n.state)==null?e:t,i=r.$refs;if(i&&typeof i==`object`)return i;let a=$(Object.create(null));return Object.defineProperty(r,"$refs",{value:a,configurable:!0,enumerable:!1,writable:!1}),a}function yr(e){let t=e;if(t&&typeof t.createSelectorQuery==`function`)return t.createSelectorQuery();if(!L(`globalCreateSelectorQuery`))return null;let n=D();if(n&&typeof n.createSelectorQuery==`function`){let e=n.createSelectorQuery();return e?O().selectorQueryScopeByIn&&typeof e.in==`function`?e.in(t):e:null}return null}function br(e,t,n,r,i){let a=yr(e);return a?(r(n.multiple?a.selectAll(t):a.select(t)),new Promise(e=>{a.exec(t=>{var r;let a=Array.isArray(t)?t[0]:null;if(n.index!=null&&Array.isArray(a)){var o;a=(o=a[n.index])==null?null:o}if(i){var s;i((s=a)==null?null:s)}e((r=a)==null?null:r)})})):(i&&i(null),Promise.resolve(null))}function xr(e,t,n){return $({selector:t,boundingClientRect:r=>br(e,t,n,e=>e.boundingClientRect(),r),scrollOffset:r=>br(e,t,n,e=>e.scrollOffset(),r),fields:(r,i)=>br(e,t,n,e=>e.fields(r),i),node:r=>br(e,t,n,e=>e.node(),r)})}function Sr(e,t){let n=e;if(!n)return t.inFor?$([]):null;if(t.inFor){if(typeof n.selectAllComponents==`function`){let r=n.selectAllComponents(t.selector);return $((Array.isArray(r)?r:[]).map((n,r)=>pr(xr(e,t.selector,{multiple:!0,index:r}),mr(n))))}return $([])}let r=xr(e,t.selector,{multiple:!1});return typeof n.selectComponent==`function`?pr(r,mr(n.selectComponent(t.selector))):r}function Cr(e,t,n){return t.inFor?$((Array.isArray(n)?n:[]).map((n,r)=>xr(e,t.selector,{multiple:!0,index:r}))):n?xr(e,t.selector,{multiple:!1}):null}function wr(e,t){let n=e[et];if(!n||!n.length){t==null||t();return}if(!e[Pe]){t==null||t();return}if(!e.__wevu){t==null||t();return}let r=hr(e),i=n.filter(e=>!ur(e)),a=n.filter(e=>ur(e)).map(t=>({binding:t,value:Sr(e,t)})),o=n=>{var i,a;let o=vr(e),s=new Map,c=new Set,l=(i=(a=e.__wevu)==null?void 0:a.proxy)==null?e:i;n.forEach(t=>{let n=t.binding,r=t.value,i=_r(e,n);if(i.type===`function`){n.inFor&&Array.isArray(r)?r.length?r.forEach(e=>i.fn.call(l,e)):i.fn.call(l,null):i.fn.call(l,r==null?null:r);return}if(i.type===`ref`){i.ref.value=r;return}if(i.type===`name`){var a;c.add(i.name);let e=(a=s.get(i.name))==null?{values:[],count:0,hasFor:!1}:a;e.count+=1,e.hasFor=e.hasFor||n.inFor,n.inFor?Array.isArray(r)&&e.values.push(...r):r!=null&&e.values.push(r),s.set(i.name,e)}});for(let[e,t]of s){let n;n=t.values.length?t.hasFor||t.values.length>1||t.count>1?$(t.values):t.values[0]:t.hasFor?$([]):null,o[e]=n,gr(r,e,n)}for(let e of Object.keys(o))c.has(e)||delete o[e];t==null||t()};if(!i.length){o(a);return}let s=yr(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:Cr(e,n.binding,i)}});o([...a,...n])})}function Tr(e,t){let r=e[et];if(!r||!r.length){t==null||t();return}if(t){var i;let n=(i=e[$e])==null?[]:i;n.push(t),e[$e]||Object.defineProperty(e,$e,{value:n,configurable:!0,enumerable:!1,writable:!0})}e[tt]||(e[tt]=!0,n(()=>{e[tt]=!1,wr(e,()=>{let t=e[$e];!t||!t.length||t.splice(0).forEach(e=>{try{e()}catch(e){}})})}))}function Er(e){var t,n;let r=e[et];if(!r||!r.length)return;let i=vr(e),a=(t=(n=e.__wevu)==null?void 0:n.proxy)==null?e:t,o=new Set,s=hr(e);for(let t of r){let n=_r(e,t),r=t.inFor?$([]):null;if(n.type===`function`){n.fn.call(a,null);continue}if(n.type===`ref`){n.ref.value=r;continue}n.type===`name`&&(o.add(n.name),i[n.name]=r,gr(s,n.name,r))}for(let e of Object.keys(i))o.has(e)||delete i[e]}const Dr=[`triggerEvent`,`createSelectorQuery`,`createIntersectionObserver`,`setData`,`setUpdatePerformanceListener`];function Or(){return Object.freeze(Object.create(null))}const kr=()=>[];function Ar(e){return Array.isArray(e)?[...new Set(e.filter(e=>typeof e==`string`&&e.length>0))]:!e||typeof e!=`object`?[]:Object.entries(e).filter(([,e])=>!!e).map(([e])=>e)}function jr(e){if(!Q(e,Ge))return Or();let t=()=>Ar(e[Ge]),n=e=>typeof e==`string`&&t().includes(e);return new Proxy(Object.create(null),{get(e,t){if(n(t))return kr},has(e,t){return n(t)},ownKeys(){return t()},getOwnPropertyDescriptor(e,t){if(n(t))return{configurable:!0,enumerable:!0,value:kr}},set(){return!1},deleteProperty(){return!1}})}function Mr(){let e=(()=>{});return e.stop=()=>{},e.pause=()=>{},e.resume=()=>{},e}function Nr(e){try{return $(e)}catch(t){return e}}function Pr(e){return!e||typeof e!=`object`||Array.isArray(e)?!1:Q(e,`bubbles`)||Q(e,`composed`)||Q(e,`capturePhase`)}function Fr(e){if(e.length===0)return{detail:void 0,options:void 0};if(e.length===1)return{detail:e[0],options:void 0};let t=e[e.length-1];if(Pr(t)){let n=e.slice(0,-1);return{detail:n.length<=1?n[0]:n,options:t}}return{detail:e,options:void 0}}function Ir(e,t,n){let r=e==null?void 0:e.state,i=r&&typeof r==`object`?S(r):void 0,a=e==null?void 0:e.proxy,o=e=>{let r=e[n];if(typeof r!=`function`)return!1;if(Pt(r))return!0;let i=t[n];return typeof i==`function`&&r===i},s=e=>!e||typeof e!=`object`||e===t||e===a||o(e)?!1:typeof e[n]==`function`,c=i?i[J]:void 0;if(s(c))return c;let l=e==null?void 0:e.instance;if(s(l))return l}function Lr(e,t,n){Nt(n);try{Object.defineProperty(e,t,{value:n,configurable:!0,enumerable:!1,writable:!0})}catch(r){e[t]=n}}function Rr(e,t){let n=e[Ue];if(n&&typeof n==`object`)return n;let r=Object.create(null),i=n=>{let r=Ir(t,e,n);if(r)return r;let i=e[n];if(typeof i==`function`&&!Pt(i))return e};Lr(r,`triggerEvent`,(...e)=>{let[t,n,r]=e,a=i(`triggerEvent`);a&&typeof a.triggerEvent==`function`&&(e.length>=3?a.triggerEvent(t,n,r):a.triggerEvent(t,n))}),Lr(r,`createSelectorQuery`,()=>{var n;let r=i(`createSelectorQuery`);if(r&&typeof r.createSelectorQuery==`function`)return r.createSelectorQuery();let a=D();if(!L(`globalCreateSelectorQuery`)||!a||typeof a.createSelectorQuery!=`function`)return;let o=a.createSelectorQuery();if(!o||!O().selectorQueryScopeByIn||typeof o.in!=`function`)return o;let s=(n=Ir(t,e,`setData`))==null?e:n;return o.in(s)}),Lr(r,`createIntersectionObserver`,n=>{var r;let a=i(`createIntersectionObserver`);if(a&&typeof a.createIntersectionObserver==`function`)return a.createIntersectionObserver(n==null?{}:n);let o=D();if(!L(`globalCreateIntersectionObserver`)||!o||typeof o.createIntersectionObserver!=`function`)return;let s=(r=Ir(t,e,`setData`))==null?e:r;return O().intersectionObserverScopeByParameter?o.createIntersectionObserver(s,n==null?{}:n):o.createIntersectionObserver(n==null?{}:n)}),Lr(r,`setData`,(e,n)=>{let r=i(`setData`);if(r&&typeof r.setData==`function`)return r.setData(e,n);let a=t==null?void 0:t.adapter,o=typeof(a==null?void 0:a.setData)==`function`?a.setData(e):void 0;return typeof n==`function`&&n(),o}),Lr(r,`setUpdatePerformanceListener`,e=>{let t=i(`setUpdatePerformanceListener`);if(t&&typeof t.setUpdatePerformanceListener==`function`)return t.setUpdatePerformanceListener(e)});let a=Nr(new Proxy(r,{get(t,n,r){if(Reflect.has(t,n))return Reflect.get(t,n,r);let i=e[n];return typeof i==`function`?i.bind(e):i},has(t,n){return Reflect.has(t,n)||n in e},set(t,n,r){return Reflect.has(t,n)?(t[n]=r,!0):(e[n]=r,!0)}}));try{Object.defineProperty(e,Ue,{value:a,configurable:!0,enumerable:!1,writable:!0})}catch(t){e[Ue]=a}return a}function zr(e){return!e||typeof e!=`object`?!1:typeof e.triggerEvent==`function`||typeof e.createSelectorQuery==`function`||typeof e.createIntersectionObserver==`function`||typeof e.setData==`function`}function Br(e,t,n){let r=t==null?void 0:t[n];if(typeof r!=`function`)return!1;if(Pt(r))return!0;let i=e==null?void 0:e.proxy;return typeof(i==null?void 0:i[n])==`function`&&r===i[n]}function Vr(e,t){if(!e||!zr(t)||t===e.proxy)return;let n=t;if(Br(e,n,`triggerEvent`)||Br(e,n,`createSelectorQuery`)||Br(e,n,`createIntersectionObserver`)||Br(e,n,`setData`))return;let r=e.state;if(!(!r||typeof r!=`object`))try{Object.defineProperty(r,J,{value:n,configurable:!0,enumerable:!1,writable:!0})}catch(e){r[J]=n}}function Hr(e,t){try{let n=t.methods;for(let t of Object.keys(n))Dr.includes(t)||typeof e[t]!=`function`&&(e[t]=function(...n){var r,i;let a=(r=this[Ne])==null?e[Ne]:r;Vr(a,this);let o=a==null||(i=a.methods)==null?void 0:i[t];if(typeof o==`function`)return o.apply(a.proxy,n)})}catch(e){}}let Ur=e=>e.startsWith(`layouts/`);function Wr(e){let t=e.is;return typeof t==`string`&&Ur(t,e)}function Gr(e){if(Wr(e))return;let t=e[ke];if(t&&typeof t==`object`)return t;let n=e.selectOwnerComponent;if(typeof n==`function`)try{let t=n.call(e);if(t&&t!==e&&typeof t==`object`&&t.__wevu)return t}catch(e){}let r=A(),i=r[r.length-1];if(i&&i!==e&&typeof i==`object`&&i.__wevu)return i}function Kr(e){if(!Wr(e))return;let t=A(),n=t[t.length-1];n&&n!==e&&typeof n==`object`&&n.__wevu&&ee(e,n)}function qr(e,t){e[Re]=t,H(e,t,Gr(e)),Kr(e)}function Jr(e,t,n){var r;if(typeof e!=`function`)return;let i=(r=n==null?void 0:n.runtime)==null?{methods:Object.create(null),state:{},setupState:{},proxy:{},watch:()=>()=>{},bindModel:()=>{}}:r;return n&&(n.runtime=i),e(t,{...n==null?{}:n,runtime:i})}function Yr(e,t){try{Object.defineProperty(e,Z,{value:t,configurable:!0,enumerable:!1,writable:!1})}catch(n){e[Z]=t}}function Xr(e,t){try{Object.defineProperty(e,We,{value:t,configurable:!0,enumerable:!1,writable:!1})}catch(n){e[We]=t}}function Zr(e,t){try{Object.defineProperty(e,J,{value:t,configurable:!0,enumerable:!1,writable:!0})}catch(n){e[J]=t}}function Qr(e,t){try{Object.defineProperty(e,ze,{value:t,configurable:!0,enumerable:!1,writable:!0})}catch(n){e[ze]=t}}function $r(e,t){try{Object.defineProperty(e,"instance",{value:t,configurable:!0,enumerable:!1,writable:!0})}catch(n){try{e.instance=t}catch(e){}}}function ei(e){let t=e[Ue],n=t&&typeof t.setData==`function`?t.setData:void 0;if(typeof n==`function`&&!Pt(n))return n;let r=e.setData;if(typeof r==`function`&&!Pt(r))return r}function ti(e){let t=e.route;if(typeof t==`string`&&t)return t;let n=e.is;return typeof n==`string`&&n?n:`unknown`}function ni(e,t,n){try{return t.call(e,n)}catch(t){let n=ti(e);throw Error(`[wevu] setData failed (${n}): ${t instanceof Error?t.message:String(t)}`)}}function ri(e,t){let n=Object.keys(e);for(let r of n)if(!Q(t,r))try{delete e[r]}catch(e){}for(let[n,r]of Object.entries(t))e[n]=r}function ii(e,t,n=e.properties||{}){let r=t&&typeof t==`object`?t[Z]:void 0,i=r&&typeof r==`object`?r:g({});ri(i,n),t&&typeof t==`object`&&Yr(t,i);try{Object.defineProperty(e,Z,{value:i,configurable:!0,enumerable:!1,writable:!0})}catch(t){e[Z]=i}return i}function ai(e){return e.includes(`:`)?e.replaceAll(`:`,`-`).toLowerCase():e}function oi(e){return e.startsWith(`__wv_`)}function si(e){var t;let{target:n,runtime:r,runtimeWithDefaults:i,runtimeState:a,runtimeProxy:o,setup:s}=e,c=ii(n,a,n.properties||{}),l=g(Object.create(null)),u=new Set(Array.isArray(n[Me])?n[Me]:[]),d=e=>typeof a==`object`&&!!a&&Q(a,e);(()=>{let e=n.properties&&typeof n.properties==`object`?n.properties:void 0;for(let t of Object.keys(l))(!e||!Q(e,t)||oi(t)||u.has(t)||d(t))&&delete l[t];if(e)for(let[t,n]of Object.entries(e))oi(t)||u.has(t)||d(t)||(l[t]=n)})();try{Object.defineProperty(n,de,{value:l,configurable:!0,enumerable:!1,writable:!1})}catch(e){n[de]=l}let p=Rr(n,i),m=jr(c);Xr(a,(t=i.setupState)==null?Object.create(null):t);try{Object.defineProperty(a,"$slots",{value:m,configurable:!0,enumerable:!1,writable:!1})}catch(e){a.$slots=m}let h=Nr({props:c,runtime:i,state:a,proxy:o,bindModel:r.bindModel.bind(i),watch:r.watch.bind(i),instance:p,emit:(e,...t)=>{let{detail:n,options:r}=Fr(t),i=ai(e);p.triggerEvent(i,n,r)},expose:e=>{n[pe]=e},attrs:l,slots:m}),_=b(!0);n[fe]=_,I(n),E(h);try{let e=_.run(()=>Jr(s,c,h)),t=!1;if(e&&typeof e==`object`){let n=r.setupState&&typeof r.setupState==`object`?f(r.setupState)?S(r.setupState):r.setupState:Object.create(null);Object.keys(e).forEach(i=>{let a=e[i];if(typeof a==`function`)r.methods[i]=(...e)=>a.apply(r.proxy,e),r.state[i]=(...e)=>a.apply(r.proxy,e),t=!0;else{if(At(a)){var o;(o=r.__wevu_trackSetupReactiveKey)==null||o.call(r,i)}r.state[i]=a,n[i]=a}})}if(t){var v;(v=r.__wevu_touchSetupMethodsVersion)==null||v.call(r)}}catch(e){throw _.stop(),n[fe]=void 0,e}finally{E(void 0),I(void 0)}}function ci(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function li(e){var t,n,r;let i={devOnly:!0,sampleWindowMs:1e3,maxCalls:30,coolDownMs:5e3,warnOnPageScroll:!0,pageScrollCoolDownMs:2e3};return e===void 0||e===!1?{...i,enabled:!1}:e===!0?{...i,enabled:!0}:ci(e)?{enabled:(t=e.enabled)==null?!0:t,devOnly:(n=e.devOnly)==null?i.devOnly:n,sampleWindowMs:typeof e.sampleWindowMs==`number`?Math.max(100,Math.floor(e.sampleWindowMs)):i.sampleWindowMs,maxCalls:typeof e.maxCalls==`number`?Math.max(1,Math.floor(e.maxCalls)):i.maxCalls,coolDownMs:typeof e.coolDownMs==`number`?Math.max(0,Math.floor(e.coolDownMs)):i.coolDownMs,warnOnPageScroll:(r=e.warnOnPageScroll)==null?i.warnOnPageScroll:r,pageScrollCoolDownMs:typeof e.pageScrollCoolDownMs==`number`?Math.max(0,Math.floor(e.pageScrollCoolDownMs)):i.pageScrollCoolDownMs}:{...i,enabled:!1}}function ui(){let e=M();if((e==null?void 0:e.debug)===!0||(e==null?void 0:e.envVersion)===`develop`)return!0;let t=D();try{var n;if((t==null||(n=t.getAccountInfoSync)==null||(n=n.call(t))==null||(n=n.miniProgram)==null?void 0:n.envVersion)===`develop`)return!0}catch(e){}return!1}function di(e){var t,n;let r=li(e.option);if(!r.enabled)return;let i=ui();if(r.devOnly&&!i)return;let a=(t=e.now)==null?(()=>Date.now()):t,o=(n=e.logger)==null?(e=>{var t;let n=(t=globalThis)==null||(t=t.console)==null?void 0:t.warn;typeof n==`function`&&n(e)}):n,s=[],c=-1/0,l=-1/0;return()=>{var t,n;let i=a();s.push(i);let u=i-r.sampleWindowMs;for(;s.length>0&&s[0]<u;)s.shift();let d=(t=(n=e.isInPageScrollHook)==null?void 0:n.call(e))==null?!1:t;r.warnOnPageScroll&&d&&(r.pageScrollCoolDownMs<=0||i-l>=r.pageScrollCoolDownMs)&&(l=i,o(`[wevu:setData] 检测到 onPageScroll 回调内调用 setData(${e.targetLabel})。建议改用 IntersectionObserver 监听可见性,或对滚动更新做节流。`)),!(s.length<=r.maxCalls)&&(r.coolDownMs>0&&i-c<r.coolDownMs||(c=i,o(`[wevu:setData] 检测到高频 setData 调用:${s.length} 次/${r.sampleWindowMs}ms(${e.targetLabel})。建议合并更新或降低调用频率。`)))}}function fi(e,t,n){if(typeof e==`function`)return{handler:e.bind(t.proxy),options:{}};if(typeof e==`string`){var r,i;let a=(r=(i=t.methods)==null?void 0:i[e])==null?n[e]:r;return typeof a==`function`?{handler:a.bind(t.proxy),options:{}}:void 0}if(!e||typeof e!=`object`)return;let a=fi(e.handler,t,n);if(!a)return;let o={...a.options};return e.immediate!==void 0&&(o.immediate=e.immediate),e.deep!==void 0&&(o.deep=e.deep),{handler:a.handler,options:o}}function pi(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 mi(e,t,n){let r=[],i=e.proxy;for(let[a,o]of Object.entries(t)){let t=fi(o,e,n);if(!t)continue;let s=pi(i,a),c=e.watch(s,t.handler,t.options);r.push(c)}return r}function hi(e,t=new WeakMap){if(!e||typeof e!=`object`)return e;if(t.has(e))return t.get(e);if(Array.isArray(e)){let n=[];t.set(e,n);for(let r of e)n.push(hi(r,t));return n}let n={};t.set(e,n);for(let[r,i]of Object.entries(e))n[r]=hi(i,t);return n}function gi(e,t,n){let r=e.data;if((!r||typeof r!=`object`)&&(!n||!Object.keys(n).length))return;let i=Array.isArray(t)&&t.length?new Set(t):void 0,a={};if(r&&typeof r==`object`)for(let[e,t]of Object.entries(r))i!=null&&i.has(e)||(a[e]=hi(t));if(n)for(let[e,t]of Object.entries(n))i!=null&&i.has(e)||(a[e]=hi(t));return a}function _i(e){return!!(e!=null&&e.__wevuHasTemplateRuntimeBindings)}function vi(e){typeof e.route!=`string`||!e.route||(e[De]=(t,n)=>{var r;let i=(r=e.__wevu)==null?void 0:r.state;if(!i||typeof i!=`object`)return;i[we]=Qn(t);let a=t===!1||n==null?{}:n;i[Ee]=a,Yn(e,t,a)})}function yi(e,t,n,r,i){var a,o,s,c,l,u,d,f,p,m,h;if(e.__wevu)return e.__wevu;qr(e,t),Nr(e);let g=er(),_=!!(!(t==null||(a=t.__wevuSetDataOptions)==null)&&a.suspendWhenHidden),v=typeof e.route==`string`&&e.route?`page:${e.route}`:typeof e.is==`string`&&e.is?`component:${e.is}`:`unknown-target`,y=di({option:t==null||(o=t.__wevuSetDataOptions)==null?void 0:o.highFrequencyWarning,targetLabel:v,isInPageScrollHook:()=>{var t;return Number((t=e[Oe])==null?0:t)>0}}),b=i!=null&&i.deferSetData?(e=>{let t,n=!1,r={setData(r){if(!n){var i;t={...(i=t)==null?{}:i,...r};return}let a=ei(e);if(a)return ni(e,a,r)}};return r.__wevu_enableSetData=()=>{n=!0;let r=ei(e);if(t&&Object.keys(t).length&&r){let n=t;t=void 0,ni(e,r,n)}},r})(e):{setData(t){let n=ei(e);if(n)return ni(e,n,t)}},x,S=!0,C,w=(e,t)=>({...e==null?{}:e,...t}),T=()=>{var t;if(!x)return;let n=or(x);cr(n,(t=e[Z])==null?e.properties:t,x),tr(g,n,x.proxy)},E={...b,setData(t){if(y==null||y(),_&&!S){C=w(C,t),T(),Tr(e);return}let n=b.setData(t);return T(),Tr(e),n},__wevu_setVisibility(t){if(S=t,!S||!C)return;let n=C;C=void 0;let r=b.setData(n);return T(),Tr(e),r}};Array.isArray(i==null?void 0:i.snapshotOmitKeys)&&i.snapshotOmitKeys.length&&Object.defineProperty(E,"__wevu_snapshotOmitKeys",{configurable:!0,enumerable:!1,value:i.snapshotOmitKeys,writable:!1});let D=gi(e,i==null?void 0:i.snapshotOmitKeys,_i(t)?void 0:{[Ke]:g});D&&Object.keys(D).length&&Object.defineProperty(E,"__wevu_initialSnapshot",{configurable:!0,enumerable:!1,value:D,writable:!1});let O=e.properties;(r||O&&typeof O==`object`&&Object.keys(O).length>0)&&Object.defineProperty(E,"__wevu_deferInitialSnapshot",{configurable:!0,enumerable:!1,value:!0,writable:!1});let k=t.mount(E);x=k,$r(k,e);let A=(s=k==null?void 0:k.proxy)==null?{}:s,j=(c=k==null?void 0:k.state)==null?{}:c,M=(l=k==null?void 0:k.setupState)==null?Object.create(null):l;j&&typeof j==`object`&&(Qr(j,k),Zr(j,e));let N=(u=k==null?void 0:k.computed)==null?Object.create(null):u;if(!(k!=null&&k.methods))try{k.methods=Object.create(null)}catch(e){}let P=(d=k==null?void 0:k.methods)==null?Object.create(null):d,F=(f=k==null?void 0:k.watch)==null?(()=>Mr()):f,I=(p=k==null?void 0:k.bindModel)==null?(()=>{}):p,L={...k==null?{}:k,state:j,setupState:M,proxy:A,methods:P,computed:N,watch:F,bindModel:I,snapshot:(m=k==null?void 0:k.snapshot)==null?(()=>Object.create(null)):m,unmount:(h=k==null?void 0:k.unmount)==null?(()=>{}):h},R=L,z={__wevu_flushSetupSnapshotSync:k.__wevu_flushSetupSnapshotSync,__wevu_touchSetupMethodsVersion:k.__wevu_touchSetupMethodsVersion,__wevu_trackSetupReactiveKey:k.__wevu_trackSetupReactiveKey,[X]:k[X]};for(let[e,t]of Object.entries(z))t&&Object.defineProperty(L,e,{configurable:!0,enumerable:!1,value:t,writable:!0});if(Object.defineProperty(e,Ne,{value:L,configurable:!0,enumerable:!1,writable:!1}),e.__wevu=L,vi(e),ii(e,j),lr(e,L,g),n){let t=mi(L,n,e);t.length&&(e[rt]=t)}if(r){if(si({target:e,runtime:k,runtimeWithDefaults:L,runtimeState:j,runtimeProxy:A,setup:r}),!(i!=null&&i.deferSetData)){var B;(B=R.__wevu_flushSetupSnapshotSync)==null||B.call(R)}T()}else if(e.properties&&typeof e.properties==`object`&&Object.keys(e.properties).length>0){var V;(V=R.__wevu_flushSetupSnapshotSync)==null||V.call(R),T()}return Hr(e,k),k}function bi(e){var t;let n=(t=e.__wevu)==null?void 0:t.state,r=e.data;if(!(!n||typeof n!=`object`||!r||typeof r!=`object`))for(let[e,t]of Object.entries(r))Object.prototype.hasOwnProperty.call(n,e)&&(n[e]=t)}function xi(e){var t,n,r;let i=(t=e.__wevu)==null?void 0:t.adapter;bi(e),(n=e.__wevu)==null||(r=n.__wevu_flushSetupSnapshotSync)==null||r.call(n),i&&typeof i.__wevu_enableSetData==`function`&&i.__wevu_enableSetData()}function Si(e,t){var n;let r=(n=e.__wevu)==null?void 0:n.adapter;r&&typeof r.__wevu_setVisibility==`function`&&r.__wevu_setVisibility(t)}function Ci(e){var t;let n=e.__wevu,r=e[Ke];r&&nr(r),Er(e),n&&e[he]&&j(e,`onUnload`,[]),e[he]&&(e[he]=void 0);let i=e[rt];if(Array.isArray(i))for(let e of i)try{e()}catch(e){}e[rt]=void 0,(t=e[fe])==null||t.stop(),e[fe]=void 0,n&&n.unmount(),delete e.__wevu,Ne in e&&delete e[Ne]}const wi=`__wevuAppGlobalListeners`,Ti=`__wevuOnMemoryWarningListener`;function Ei(e){let t=e[he],n=!!(t!=null&&t.onMemoryWarning);if(!L(`appMemoryWarningListener`)){delete e[Ti];return}let r=D(),i=r==null?void 0:r.onMemoryWarning,a=r==null?void 0:r.offMemoryWarning;if(typeof i!=`function`)return;let o=e[Ti];if(typeof o==`function`&&typeof a==`function`)try{a(o)}catch(e){}if(!n){delete e[Ti];return}let s=t=>{j(e,`onMemoryWarning`,[t])};e[Ti]=s,i(s)}function Di(e,t){var n,r;let{hookName:i,onApiName:a,offApiName:o,capabilityName:s,userHandler:c}=t,l=e[he],u=!!(l!=null&&l[i]),d=(r=(n=e)[wi])==null?n[wi]=Object.create(null):r,f=d[i];if(!L(s)){delete d[i],delete e[i];return}let p=D(),m=p==null?void 0:p[a],h=p==null?void 0:p[o];if(typeof f==`function`&&typeof h==`function`)try{h(f)}catch(e){}if(!u&&typeof c!=`function`){delete d[i];return}let g=(...t)=>{j(e,i,t),typeof c==`function`&&c.apply(e,t)};e[i]=g,d[i]=g,typeof m==`function`&&m(g)}function Oi(e,t){Di(e,{hookName:`onError`,onApiName:`onError`,offApiName:`offError`,capabilityName:`appErrorListener`,userHandler:t.onError}),Di(e,{hookName:`onPageNotFound`,onApiName:`onPageNotFound`,offApiName:`offPageNotFound`,capabilityName:`appPageNotFoundListener`,userHandler:t.onPageNotFound}),Di(e,{hookName:`onUnhandledRejection`,onApiName:`onUnhandledRejection`,offApiName:`offUnhandledRejection`,capabilityName:`appUnhandledRejectionListener`,userHandler:t.onUnhandledRejection}),Di(e,{hookName:`onThemeChange`,onApiName:`onThemeChange`,offApiName:`offThemeChange`,capabilityName:`appThemeChangeListener`,userHandler:t.onThemeChange})}function ki(e,t,n,r,i){var a;if(typeof App!=`function`)throw TypeError(`createApp 需要全局 App 构造器可用`);let o=Object.keys(t==null?{}:t),s={...i};s.globalData=(a=s.globalData)==null?{}:a,s[ge]||(s[ge]=function(e){var t,n;let r=this.__wevu;return Gn((t=r==null?void 0:r.proxy)==null?this:t,void 0,e,r==null||(n=r.methods)==null?void 0:n[_e])});let c=s.onLaunch,l=s.onError,u=s.onPageNotFound,d=s.onUnhandledRejection,f=s.onThemeChange;s.onLaunch=function(...t){this[ve]=!0,yi(this,e,n,r),Ei(this),Oi(this,{onError:l,onPageNotFound:u,onUnhandledRejection:d,onThemeChange:f}),j(this,`onLaunch`,t),typeof c==`function`&&c.apply(this,t)};let p=s.onShow;s.onShow=function(...e){j(this,`onShow`,e),typeof p==`function`&&p.apply(this,e)};let m=s.onHide;s.onHide=function(...e){j(this,`onHide`,e),typeof m==`function`&&m.apply(this,e)},delete s.onError,delete s.onPageNotFound,delete s.onUnhandledRejection,delete s.onThemeChange;for(let e of o){let t=s[e];s[e]=function(...n){var r;let i=this.__wevu,a,o=i==null||(r=i.methods)==null?void 0:r[e];return o&&(a=o.apply(i.proxy,n)),typeof t==`function`?t.apply(this,n):a}}App(s)}function Ai(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=!!t.enableOnRouteDoneFallback,_=typeof s==`function`||!!t.enableOnTabItemTap,v=typeof c==`function`||!!t.enableOnResize,y=typeof u==`function`||!!t.enableOnShareTimeline,b=typeof l==`function`||!!t.enableOnShareAppMessage,x=typeof d==`function`||!!t.enableOnAddToFavorites,S=typeof n==`function`||!!t.enableOnSaveExitState,C=()=>{};return{enableOnPullDownRefresh:f,enableOnReachBottom:p,enableOnPageScroll:m,enableOnRouteDone:h,enableOnRouteDoneFallback:g,enableOnTabItemTap:_,enableOnResize:v,enableOnShareAppMessage:b,enableOnShareTimeline:y,enableOnAddToFavorites:x,enableOnSaveExitState:S,effectiveOnSaveExitState:typeof n==`function`?n:(()=>({data:void 0})),effectiveOnPullDownRefresh:typeof r==`function`?r:C,effectiveOnReachBottom:typeof i==`function`?i:C,effectiveOnPageScroll:typeof a==`function`?a:C,effectiveOnRouteDone:typeof o==`function`?o:C,effectiveOnTabItemTap:typeof s==`function`?s:C,effectiveOnResize:typeof c==`function`?c:C,effectiveOnShareAppMessage:typeof l==`function`?l:C,effectiveOnShareTimeline:typeof u==`function`?u:C,effectiveOnAddToFavorites:typeof d==`function`?d:(()=>({}))}}function ji(e,t){let{enableOnSaveExitState:n,enableOnPullDownRefresh:r,enableOnReachBottom:i,enableOnPageScroll:a,enableOnRouteDone:o,enableOnTabItemTap:s,enableOnResize:c,enableOnShareAppMessage:l,enableOnShareTimeline:u,enableOnAddToFavorites:d,effectiveOnSaveExitState:f,effectiveOnPullDownRefresh:p,effectiveOnReachBottom:m,effectiveOnPageScroll:h,effectiveOnRouteDone:g,effectiveOnTabItemTap:_,effectiveOnResize:v,effectiveOnShareAppMessage:y,effectiveOnShareTimeline:b,effectiveOnAddToFavorites:x,hasHook:S}=t;n&&(e.onSaveExitState=function(...e){let t=N(this,`onSaveExitState`,e);return t===void 0?f.apply(this,e):t}),r&&(e.onPullDownRefresh=function(...e){if(j(this,`onPullDownRefresh`,e),!S(this,`onPullDownRefresh`))return p.apply(this,e)}),i&&(e.onReachBottom=function(...e){if(j(this,`onReachBottom`,e),!S(this,`onReachBottom`))return m.apply(this,e)}),a&&(e.onPageScroll=function(...e){return re(this,()=>{if(j(this,`onPageScroll`,e),!S(this,`onPageScroll`))return h.apply(this,e)})}),o&&(e.onRouteDone=function(...e){if(!this[Le]&&(this[Le]=!0,Promise.resolve().then(()=>{this[Le]=!1}),this[Ie]=!0,j(this,`onRouteDone`,e),!S(this,`onRouteDone`)))return g.apply(this,e)}),s&&(e.onTabItemTap=function(...e){if(j(this,`onTabItemTap`,e),!S(this,`onTabItemTap`))return _.apply(this,e)}),c&&(e.onResize=function(...e){if(j(this,`onResize`,e),!S(this,`onResize`))return v.apply(this,e)}),l&&(e.onShareAppMessage=function(...e){let t=N(this,`onShareAppMessage`,e);return t===void 0?y.apply(this,e):t}),u&&(e.onShareTimeline=function(...e){let t=N(this,`onShareTimeline`,e);return t===void 0?b.apply(this,e):t}),d&&(e.onAddToFavorites=function(...e){let t=N(this,`onAddToFavorites`,e);return t===void 0?x.apply(this,e):t})}function Mi(e){let{runtimeApp:t,watch:n,setup:r,userOnLoad:i,userOnUnload:a,userOnShow:o,userOnHide:s,userOnReady:c,isPage:l,enableOnSaveExitState:u,enableOnPullDownRefresh:d,enableOnReachBottom:f,enableOnPageScroll:p,enableOnRouteDone:m,enableOnRouteDoneFallback:h,enableOnTabItemTap:g,enableOnResize:_,enableOnShareAppMessage:v,enableOnShareTimeline:y,enableOnAddToFavorites:b,syncWevuPropsFromValues:x,effectiveOnSaveExitState:S,effectiveOnPullDownRefresh:C,effectiveOnReachBottom:w,effectiveOnPageScroll:T,effectiveOnRouteDone:E,effectiveOnTabItemTap:D,effectiveOnResize:O,effectiveOnShareAppMessage:k,effectiveOnShareTimeline:A,effectiveOnAddToFavorites:M,hasHook:N}=e,P=e=>{var t,n;(t=e.__wevu)==null||(n=t.__wevu_flushSetupSnapshotSync)==null||n.call(t)},F={onLoad(...e){if(this[Se])return;this[Se]=!0,yi(this,t,n,r);let a=e[0]&&typeof e[0]==`object`?e[0]:ce(this);if(x==null||x(this,a),P(this),xi(this),l&&le({enableOnShareAppMessage:v,enableOnShareTimeline:y}),j(this,`onLoad`,e),typeof i==`function`)return i.apply(this,e.length?e:[a])},onUnload(...e){if(l&&V(this),Ci(this),typeof a==`function`)return a.apply(this,e)},onShow(...e){if(l&&(oe(),ue(this),this[Se]||F.onLoad.call(this,ce(this)),x==null||x(this,ce(this)),P(this),le({enableOnShareAppMessage:v,enableOnShareTimeline:y}),this[Ie]=!1),Si(this,!0),j(this,`onShow`,e),typeof o==`function`)return o.apply(this,e)},onHide(...e){if(l&&V(this),Si(this,!1),j(this,`onHide`,e),typeof s==`function`)return s.apply(this,e)},onReady(...e){if(l&&(this[Se]||F.onLoad.call(this,ce(this)),x==null||x(this,ce(this)),P(this),le({enableOnShareAppMessage:v,enableOnShareTimeline:y})),!this[Pe]){if(this[Pe]=!0,l&&m&&h){let e=this;setTimeout(()=>{if(!e[Ie]){var t;(t=F.onRouteDone)==null||t.call(e)}},0)}Tr(this,()=>{j(this,`onReady`,e),typeof c==`function`&&c.apply(this,e)});return}if(typeof c==`function`)return c.apply(this,e)}};return ji(F,{enableOnSaveExitState:u,enableOnPullDownRefresh:d,enableOnReachBottom:f,enableOnPageScroll:p,enableOnRouteDone:m,enableOnTabItemTap:g,enableOnResize:_,enableOnShareAppMessage:v,enableOnShareTimeline:y,enableOnAddToFavorites:b,effectiveOnSaveExitState:S,effectiveOnPullDownRefresh:C,effectiveOnReachBottom:w,effectiveOnPageScroll:T,effectiveOnRouteDone:E,effectiveOnTabItemTap:D,effectiveOnResize:O,effectiveOnShareAppMessage:k,effectiveOnShareTimeline:A,effectiveOnAddToFavorites:M,hasHook:N}),F}function Ni(e){let{userMethods:t,runtimeMethods:n}=e,r={...t};r[ge]||(r[ge]=function(e){var t,n;let r=this.__wevu;return Gn((t=r==null?void 0:r.proxy)==null?this:t,void 0,e,r==null||(n=r.methods)==null?void 0:n[_e])}),r[be]||(r[be]=function(e){var t,n,r;let i=(t=e==null||(n=e.currentTarget)==null||(n=n.dataset)==null?void 0:n.wvModel)==null?e==null||(r=e.target)==null||(r=r.dataset)==null?void 0:r.wvModel:t;if(typeof i!=`string`||!i)return;let a=this.__wevu;if(!a||typeof a.bindModel!=`function`)return;let o=xt(e);try{a.bindModel(i).update(o)}catch(e){}}),!r[Ce]&&typeof(n==null?void 0:n[Ce])==`function`&&(r[Ce]=n[Ce]);let i=Object.keys(n==null?{}:n);function a(e){let t=e.__wevu;if(t)return t;let n=e.$state;if(n&&typeof n==`object`)return n[ze]}function o(e,t){if((e==null?void 0:e.proxy)===t)return;let n=e==null?void 0:e.proxy,r=e=>{let r=t[e];if(typeof r!=`function`)return!1;let i=n==null?void 0:n[e];return typeof i==`function`&&r===i};if(r(`triggerEvent`)||r(`createSelectorQuery`)||r(`createIntersectionObserver`)||r(`setData`)||!(typeof t.triggerEvent==`function`||typeof t.createSelectorQuery==`function`||typeof t.createIntersectionObserver==`function`||typeof t.setData==`function`))return;let i=e==null?void 0:e.state;if(!(!i||typeof i!=`object`)&&t.$state!==i)try{Object.defineProperty(i,J,{value:t,configurable:!0,enumerable:!1,writable:!0})}catch(e){i[J]=t}}for(let e of i){if(e===_e||e.startsWith(Fe))continue;let t=r[e];r[e]=function(...n){var r;let i=a(this);o(i,this);let s,c=i==null||(r=i.methods)==null?void 0:r[e];if(c&&(s=c.apply(i.proxy,n)),typeof t==`function`){let e=t.apply(this,n);return e===void 0?s:e}return s}}return{finalMethods:r}}function Pi(e,t=new WeakMap){if(!e||typeof e!=`object`)return e;if(t.has(e))return t.get(e);if(Array.isArray(e)){let n=[];t.set(e,n);for(let r of e)n.push(Pi(r,t));return n}let n={};t.set(e,n);for(let[r,i]of Object.entries(e))n[r]=Pi(i,t);return n}function Fi(e){let t=e.route;if(typeof t==`string`&&t)return t;let n=e.is;return typeof n==`string`&&n?n:`unknown`}function Ii(e){var t;let{methods:n={},lifetimes:r={},pageLifetimes:i={},options:a={},...o}=e,s=o.onLoad,c=o.onUnload,l=o.onShow,u=o.onHide,d=o.onReady,f=o.onSaveExitState,p=o.onPullDownRefresh,m=o.onReachBottom,h=o.onPageScroll,g=o.onRouteDone,_=o.onTabItemTap,v=o.onResize,y=o.onShareAppMessage,b=o.onShareTimeline,x=o.onAddToFavorites,S=(t=o.features)==null?{}:t,C=[s,c,l,u,d,f,p,m,h,g,_,v,y,b,x].some(e=>typeof e==`function`),w=!!o.__wevu_isPage||Object.keys(S==null?{}:S).length>0||C,T={...o},E=new Set([`data`,`behaviors`,`relations`,`externalClasses`,`options`,`properties`,`observers`,`pureDataPattern`,`virtualHost`,`definitionFilter`,`export`,`__wevuTemplateRefs`,`__wevuLayoutHosts`,je,X,`setupLifecycle`,`features`,`__wevu_isPage`]),D=[];for(let[e,t]of Object.entries(T))E.has(e)||typeof t!=`function`&&(D.push([e,t]),delete T[e]);let O=e=>{if(D.length){for(let[t,n]of D)if(!Q(e,t))try{e[t]=Pi(n)}catch(e){}}},k=new Set([`data`,`export`,`definitionFilter`,`onLoad`,`onUnload`,`onShow`,`onHide`,`onReady`,`onSaveExitState`,`onPullDownRefresh`,`onReachBottom`,`onPageScroll`,`onRouteDone`,`onTabItemTap`,`onResize`,`onShareAppMessage`,`onShareTimeline`,`onAddToFavorites`]),A={};for(let[e,t]of Object.entries(T))typeof t!=`function`||k.has(e)||(A[e]=t,delete T[e]);let j=T.__wevuTemplateRefs;delete T.__wevuTemplateRefs;let M=T.__wevuLayoutHosts;delete T.__wevuLayoutHosts;let N=T[je];delete T[je];let P=T[X];delete T[X];let F=T.observers,I=T.setupLifecycle===`created`?`created`:`attached`;delete T.setupLifecycle;let L=T.created;return delete T.features,delete T.created,delete T.onLoad,delete T.onUnload,delete T.onShow,delete T.onHide,delete T.onReady,{userMethods:n,userLifetimes:r,userPageLifetimes:i,userOptions:a,restOptions:T,topLevelMethods:A,templateRefs:j,layoutHosts:M,propsAliases:N,propsDerivedKeys:P,userObservers:F,setupLifecycle:I,legacyCreated:L,isPage:w,features:S,userOnLoad:s,userOnUnload:c,userOnShow:l,userOnHide:u,userOnReady:d,userOnSaveExitState:f,userOnPullDownRefresh:p,userOnReachBottom:m,userOnPageScroll:h,userOnRouteDone:g,userOnTabItemTap:_,userOnResize:v,userOnShareAppMessage:y,userOnShareTimeline:b,userOnAddToFavorites:x,applyExtraInstanceFields:O}}function Li(e){var t;let n=e.__wevu,r=e[Ke];if(!n||!r||typeof n.snapshot!=`function`)return;let i=n.snapshot();cr(i,(t=e[Z])==null?e.properties:t,n),tr(r,i,n.proxy)}function Ri(e){let{restOptions:t,propsAliases:n,propsDerivedKeys:r,userObservers:i}=e,a=t.properties&&typeof t.properties==`object`?Object.keys(t.properties):[],o=new Set(a),s=new Set(r==null?[]:r),c=Object.entries(n==null?{}:n).filter(([e,t])=>e&&t),l=new Set(c.map(([e])=>e)),u=[...s].filter(e=>o.has(e)&&!l.has(e)),d=new Set([Ge,qe,Qe]),f=new WeakMap,p=e=>e.startsWith(`__wv_`),m=e=>{let t=e.__wevu,n=t==null?void 0:t[X];if(n instanceof Set)for(let e of u)n.add(e)},h=(e,t,n)=>Q(e,t)&&Object.is(e[t],n)?!1:(e[t]=n,!0),g=(e,t,n)=>{var r;if(!d.has(t))return;let i=(r=e.__wevu)==null?void 0:r.state;try{i&&typeof i==`object`&&h(i,t,n);let r=e.data;r&&typeof r==`object`&&h(r,t,n)}catch(e){}},_=(e,t)=>{var n;if(!c.length)return;let r=e.__wevu,i=r==null?void 0:r.setupState,a=r==null?void 0:r.state;if(!i||typeof i!=`object`)return;m(e);let o=(n=f.get(e))==null?new Set:n;f.set(e,o);for(let[e,n]of c){if(Q(i,e)&&!o.has(e))continue;let r=t[n];try{h(i,e,r),o.add(e)}catch(e){}if(a&&typeof a==`object`&&(!Q(a,e)||o.has(e)))try{h(a,e,r)}catch(e){}}},v=(e,t)=>{if(!s.size)return;let n=e.__wevu,r=n==null?void 0:n.setupState;if(!r||typeof r!=`object`)return;m(e);let i=new Map(c);for(let e of s){var a;let n=(a=i.get(e))==null?e:a;if(Q(t,n))try{h(r,e,t[n])}catch(e){}}},y=e=>{try{Object.defineProperty(e,Me,{value:a,configurable:!0,enumerable:!1,writable:!1})}catch(t){e[Me]=a}},b=e=>{let t=e[de];if(!t||typeof t!=`object`)return;let n=t=>{var n;let r=(n=e.__wevu)==null?void 0:n.state;return typeof r==`object`&&!!r&&Q(r,t)},r=e.properties,i=r&&typeof r==`object`?r:void 0,a=Object.keys(t);for(let e of a)if(!i||!Q(i,e)||p(e)||o.has(e)||n(e))try{delete t[e]}catch(e){}if(!i){Li(e);return}for(let[e,r]of Object.entries(i))if(!(p(e)||o.has(e)||n(e)))try{t[e]=r}catch(e){}Li(e)},x=e=>{let t=e[Z],n=e.properties,r=e[Ae];if(t&&typeof t==`object`&&n&&typeof n==`object`){let i=n,a=Object.keys(t);for(let e of a)if(!Q(i,e))try{delete t[e]}catch(e){}for(let[n,a]of Object.entries(i)){let i=r&&Q(r,n)?r[n]:a;try{t[n]=i}catch(e){}g(e,n,i)}if(r){for(let[n,a]of Object.entries(r))if(!Q(i,n)){try{t[n]=a}catch(e){}g(e,n,a)}}v(e,t),_(e,t),Li(e)}r&&delete e[Ae],b(e)},S=(e,t)=>{if(!t||typeof t!=`object`)return;let n=e[Z];if(!n||typeof n!=`object`)return;let r=!1;for(let i of a)if(Q(t,i)){try{n[i]=t[i],r=!0}catch(e){}g(e,i,t[i])}r&&(v(e,n),_(e,n),Li(e),b(e))},C=(e,t,n)=>{var r,i;let a=e[Z];if(!a||typeof a!=`object`)return;try{a[t]=n}catch(e){}g(e,t,n);let o=(i=(r=e)[Ae])==null?r[Ae]=Object.create(null):i;o[t]=n,v(e,a),_(e,a),Li(e),b(e)},w={};if(a.length)for(let e of a)w[e]=function(t){C(this,e,t)};let T={...i==null?{}:i};for(let[e,t]of Object.entries(w)){let n=T[e];typeof n==`function`?T[e]=function(...e){n.apply(this,e),t.apply(this,e)}:T[e]=t}let E=T[`**`];return T[`**`]=function(...e){typeof E==`function`&&E.apply(this,e),x(this)},{attachWevuPropKeys:y,directPropsDerivedKeys:u,syncWevuPropsFromInstance:x,syncWevuPropsFromValues:S,finalObservers:T}}const zi=new Map;function Bi(){let e=A();return e[e.length-1]}function Vi(e){return Array.from(new Set(Array.isArray(e)?e:[e])).filter(e=>typeof e==`string`&&e.length>0)}function Hi(e){return it(e)}function Ui(e){return e&&typeof e.__wevuSetPageLayout==`function`?e:Bi()}function Wi(e){var t,n;if(!e||typeof e!=`object`)return;let r=(t=e[Ne])==null||(t=t.state)==null?void 0:t[J];if(r&&typeof r==`object`)return r;let i=(n=e.$state)==null?void 0:n[J];return i&&typeof i==`object`?i:e[J]&&typeof e[J]==`object`?e[J]:e}function Gi(e){return typeof e==`function`?e():m(e)?e.value:e}function Ki(e,t){return e.find(e=>e.key===t)}function qi(e,t){let n=e==null?void 0:e.selectComponent;if(typeof n!=`function`)return null;try{var r;return(r=n.call(e,t))==null?null:r}catch(e){return null}}function Ji(e,t){var n,r,i,a,o,s,c,l;if(!e.refName)return null;let u=hr(t),d=(n=(r=(i=(a=t[Ne])==null||(a=a.state)==null?void 0:a.$refs)==null?(o=t.__wevu)==null||(o=o.state)==null?void 0:o.$refs:i)==null?(s=t.$state)==null?void 0:s.$refs:r)==null?t.$refs:n,f=(c=u==null||(l=u.get(e.refName))==null?void 0:l.value)==null?d==null?void 0:d[e.refName]:c;if(Array.isArray(f)){var p;return(p=f[0])==null?null:p}return f==null?null:f}function Yi(e,t){let n=Wi(t);return Object.assign(n&&typeof n==`object`?Object.create(n):{},{selectComponent(r){let i=Ki(e,r);if(!i)return null;if(i.kind===`component`||!i.kind){var a,o;return Ji(i,t)||((a=(o=qi(n,i.selector))==null?qi(Bi(),i.selector):o)==null?null:a)}return null}})}function Xi(e,t){let n=t==null?P():t,r=Ui(n),i=Hi(r);if(!n||!r||i.length===0)return!1;for(let t of i){var a;let r=(a=zi.get(t))==null?new Map:a;for(let t of Vi(e))r.set(t,n);zi.set(t,r)}return n[ye]=i,!0}function Zi(e,t){var n;let r=t==null?P():t,i=Ui(r),a=(n=r==null?void 0:r[ye])==null?Hi(i):n;if(!r||!Array.isArray(a)||a.length===0)return!1;let o=!1;for(let t of a){let n=zi.get(t);if(n){for(let t of Vi(e))n.get(t)===r&&(n.delete(t),o=!0);n.size===0&&zi.delete(t)}}return delete r[ye],o}function Qi(e,t){var n,r;let i=Hi((n=Bi())==null?Ui(t):n).map(t=>{var n;return(n=zi.get(t))==null?void 0:n.get(e)}).find(Boolean);return(r=i==null?t:i)==null?P():r}function $i(e,t={}){var n,r;let i=Qi(e,(n=t.context)==null?t.fallbackContext:n),a=i==null||(r=i.selectComponent)==null?void 0:r.call(i,e);return a==null?null:a}function ea(e,t={}){var n,r;let i=(n=t.retries)==null?20:n,a=(r=t.interval)==null?16:r,o=$i(e,t);return o||i<=0?Promise.resolve(o):new Promise(n=>{setTimeout(()=>{n(ea(e,{...t,retries:i-1}))},a)})}function ta(e,t={}){if(!T())throw Error(`useLayoutBridge() 必须在 setup() 的同步阶段调用`);let n=P(),r=Vi(e),i=t.resolveComponent,a=Wi(n),o=Object.assign(a&&typeof a==`object`?Object.create(a):{},{selectComponent(e){var t,a,o;if(!r.includes(e))return null;let s=i==null?void 0:i(e);if(s!==void 0)return s;let c=Wi(n),l=c==null||(t=c.selectComponent)==null?void 0:t.call(c,e);if(l)return l;let u=Bi();return(a=u==null||(o=u.selectComponent)==null?void 0:o.call(u,e))==null?null:a}});Xi(r,o),U(()=>{Xi(r,o)}),W(()=>{Zi(r,o)})}function na(e,t){if(!e.length)return null;let n=t==null?P():t;if(!n)return null;let r=Yi(e,n);return Xi(e.map(e=>e.key),r),r}function ra(e,t){if(!e.length)return!1;let n=t==null?P():t;return n?Zi(e.map(e=>e.key),n):!1}function ia(e){ta(Object.keys(e),{resolveComponent(t){return Gi(e[t])}})}function aa(e){let{runtimeApp:t,watch:n,setup:r,restOptions:i,pageLifecycleHooks:a,finalObservers:o,userLifetimes:s,userPageLifetimes:c,finalMethods:l,finalOptions:u,applyExtraInstanceFields:d,templateRefs:f,layoutHosts:p,attachWevuPropKeys:m,setupLifecycle:h,syncWevuPropsFromInstance:g,directPropsDerivedKeys:_,isPage:v,legacyCreated:y,getRuntimeOwnerLabel:b}=e,x={},S=e=>{if(!Array.isArray(p)||!p.length||e[q])return;let t=na(p,e);t&&(e[q]=t)},C=e=>{v&&(e[De]=(t,n)=>{var r;let i=(r=e.__wevu)==null?void 0:r.state;if(!i||typeof i!=`object`)return;i[we]=Qn(t);let a=t===!1||n==null?{}:n;i[Ee]=a,Yn(e,t,a)})};if(v)for(let e of[`onReachBottom`,`onShareAppMessage`,`onShareTimeline`,`onAddToFavorites`]){let t=a[e];typeof t==`function`&&typeof l[e]!=`function`&&(x[e]=function(...e){return t.apply(this,e)})}Component({...i,...a,observers:o,lifetimes:{...s,created:function(...e){if(d(this),Array.isArray(f)&&f.length&&Object.defineProperty(this,et,{value:f,configurable:!0,enumerable:!1,writable:!1}),m(this),h===`created`){try{yi(this,t,n,r,{deferSetData:!0,snapshotOmitKeys:_})}catch(e){let t=b(this);throw Error(`[wevu] mount runtime failed in created (${t}): ${e instanceof Error?e.message:String(e)}`)}g(this),C(this)}typeof y==`function`&&y.apply(this,e),typeof s.created==`function`&&s.created.apply(this,e)},moved:function(...e){j(this,`onMoved`,e),typeof s.moved==`function`&&s.moved.apply(this,e)},attached:function(...e){if(d(this),Array.isArray(f)&&f.length&&!this[et]&&Object.defineProperty(this,et,{value:f,configurable:!0,enumerable:!1,writable:!1}),m(this),h!==`created`||!this.__wevu)try{yi(this,t,n,r,{snapshotOmitKeys:_})}catch(e){let t=b(this);throw Error(`[wevu] mount runtime failed in attached (${t}): ${e instanceof Error?e.message:String(e)}`)}g(this),C(this),S(this),h===`created`&&xi(this),j(this,`onAttached`,e),typeof s.attached==`function`&&s.attached.apply(this,e)},ready:function(...e){if(v&&typeof a.onReady==`function`){a.onReady.call(this,...e),typeof s.ready==`function`&&s.ready.apply(this,e);return}if(!this[Pe]){this[Pe]=!0,g(this),Tr(this,()=>{j(this,`onReady`,e),typeof s.ready==`function`&&s.ready.apply(this,e)});return}typeof s.ready==`function`&&s.ready.apply(this,e)},detached:function(...e){if(j(this,`onDetached`,e),v&&typeof a.onUnload==`function`){a.onUnload.call(this,...e),typeof s.detached==`function`&&s.detached.apply(this,e);return}Er(this),Array.isArray(p)&&p.length&&this[q]&&(ra(p,this[q]),delete this[q]),Ci(this),typeof s.detached==`function`&&s.detached.apply(this,e)},error:function(...e){j(this,`onError`,e),typeof s.error==`function`&&s.error.apply(this,e)}},pageLifetimes:{...c,show:function(...e){if(v&&typeof a.onShow==`function`){a.onShow.call(this,...e),typeof c.show==`function`&&c.show.apply(this,e);return}Si(this,!0),j(this,`onShow`,e),typeof c.show==`function`&&c.show.apply(this,e)},hide:function(...e){if(v&&typeof a.onHide==`function`){a.onHide.call(this,...e),typeof c.hide==`function`&&c.hide.apply(this,e);return}Si(this,!1),j(this,`onHide`,e),typeof c.hide==`function`&&c.hide.apply(this,e)},resize:function(...e){if(v&&typeof a.onResize==`function`){a.onResize.call(this,...e),typeof c.resize==`function`&&c.resize.apply(this,e);return}j(this,`onResize`,e),typeof c.resize==`function`&&c.resize.apply(this,e)},routeDone:function(...e){if(v&&typeof a.onRouteDone==`function`){a.onRouteDone.call(this,...e),typeof c.routeDone==`function`&&c.routeDone.apply(this,e);return}j(this,`onRouteDone`,e),typeof c.routeDone==`function`&&c.routeDone.apply(this,e)}},methods:{...x,...l},options:u})}function oa(e,t,n,r,i){var a;let{userMethods:o,userLifetimes:s,userPageLifetimes:c,userOptions:l,restOptions:u,topLevelMethods:d,templateRefs:f,layoutHosts:p,propsAliases:m,propsDerivedKeys:h,userObservers:g,setupLifecycle:_,legacyCreated:v,isPage:y,features:b,userOnLoad:x,userOnUnload:S,userOnShow:C,userOnHide:w,userOnReady:T,userOnSaveExitState:E,userOnPullDownRefresh:D,userOnReachBottom:O,userOnPageScroll:k,userOnRouteDone:A,userOnTabItemTap:j,userOnResize:M,userOnShareAppMessage:N,userOnShareTimeline:P,userOnAddToFavorites:F,applyExtraInstanceFields:I}=Ii(i),{enableOnPullDownRefresh:L,enableOnReachBottom:R,enableOnPageScroll:z,enableOnRouteDone:B,enableOnRouteDoneFallback:V,enableOnTabItemTap:H,enableOnResize:ee,enableOnShareAppMessage:te,enableOnShareTimeline:U,enableOnAddToFavorites:W,enableOnSaveExitState:G,effectiveOnSaveExitState:ne,effectiveOnPullDownRefresh:re,effectiveOnReachBottom:ie,effectiveOnPageScroll:ae,effectiveOnRouteDone:oe,effectiveOnTabItemTap:K,effectiveOnResize:se,effectiveOnShareAppMessage:ce,effectiveOnShareTimeline:le,effectiveOnAddToFavorites:ue}=Ai({features:b,userOnSaveExitState:E,userOnPullDownRefresh:D,userOnReachBottom:O,userOnPageScroll:k,userOnRouteDone:A,userOnTabItemTap:j,userOnResize:M,userOnShareAppMessage:N,userOnShareTimeline:P,userOnAddToFavorites:F}),de=(e,t)=>{let n=e[he];if(!n)return!1;let r=n[t];return r?Array.isArray(r)?r.length>0:typeof r==`function`:!1};{let e=u.export;u.export=function(){var t;let n=(t=this[pe])==null?{}:t,r=typeof e==`function`?e.call(this):{};return r&&typeof r==`object`&&!Array.isArray(r)?{...n,...r}:r==null?n:r}}let fe={multipleSlots:(a=l.multipleSlots)==null?!0:a,...l},{attachWevuPropKeys:me,directPropsDerivedKeys:ge,syncWevuPropsFromInstance:_e,syncWevuPropsFromValues:ve,finalObservers:ye}=Ri({restOptions:u,propsAliases:m,propsDerivedKeys:h,userObservers:g}),{finalMethods:q}=Ni({userMethods:{...d,...o},runtimeMethods:t});aa({runtimeApp:e,watch:n,setup:r,restOptions:u,pageLifecycleHooks:Mi({runtimeApp:e,watch:n,setup:r,userOnLoad:x,userOnUnload:S,userOnShow:C,userOnHide:w,userOnReady:T,isPage:y,enableOnSaveExitState:G,enableOnPullDownRefresh:L,enableOnReachBottom:R,enableOnPageScroll:z,enableOnRouteDone:B,enableOnRouteDoneFallback:V,enableOnTabItemTap:H,enableOnResize:ee,enableOnShareAppMessage:te,enableOnShareTimeline:U,enableOnAddToFavorites:W,syncWevuPropsFromValues:ve,effectiveOnSaveExitState:ne,effectiveOnPullDownRefresh:re,effectiveOnReachBottom:ie,effectiveOnPageScroll:ae,effectiveOnRouteDone:oe,effectiveOnTabItemTap:K,effectiveOnResize:se,effectiveOnShareAppMessage:ce,effectiveOnShareTimeline:le,effectiveOnAddToFavorites:ue,hasHook:de}),finalObservers:ye,userLifetimes:s,userPageLifetimes:c,finalMethods:q,finalOptions:fe,applyExtraInstanceFields:I,templateRefs:f,layoutHosts:p,attachWevuPropKeys:me,setupLifecycle:_,syncWevuPropsFromInstance:_e,syncWevuPropsFromValues:ve,directPropsDerivedKeys:ge,isPage:y,legacyCreated:v,getRuntimeOwnerLabel:Fi})}function sa(e){let{[mn]:t,data:n,computed:r,methods:i,setData:a,watch:o,setup:s,...c}=e.__wevuDefaultsScope===`component`?e:Sn(e),l=i==null?{}:i,u=r==null?{}:r,d=new Set,f=new Set,p=!1,m={globalProperties:{}},h={mount:pn({data:n,resolvedComputed:u,resolvedMethods:l,appConfig:m,setDataOptions:a}),use(e,...t){if(!e||d.has(e))return h;if(d.add(e),typeof e==`function`)e(h,...t);else if(typeof e.install==`function`)e.install(h,...t);else throw TypeError(`插件必须是函数,或包含 install 方法的对象`);return h},provide(e,t){return se(h,e,t),h},onUnmount(e){if(typeof e!=`function`)throw TypeError(`onUnmount 只接受函数`);return p?(e(),h):(f.add(e),h)},unmount(){if(!p){p=!0;for(let e of f)e();f.clear()}},config:m,version:_t},g=typeof App==`function`;try{G(h),Object.defineProperty(h,"__wevuSetDataOptions",{value:a,configurable:!0,enumerable:!1,writable:!1}),Object.defineProperty(h,"__wevuHasTemplateRuntimeBindings",{value:Object.keys(u).some(e=>e.startsWith(`__wv_bind_`)),configurable:!0,enumerable:!1,writable:!1})}catch(e){h.__wevuSetDataOptions=a,h.__wevuHasTemplateRuntimeBindings=Object.keys(u).some(e=>e.startsWith(`__wv_bind_`))}if(g){let e=D(),t=`__wevuAppRegistered`;e&&e[t]||(e&&(e[t]=!0),ki(h,i==null?{}:i,o,s,c))}return h}var ca=class extends Error{};function la(e){if(typeof e==`function`)return e;let t=e==null?void 0:e.get;return typeof t==`function`?t:void 0}function ua(e){return e.startsWith(`__wv_bind_`)||e.startsWith(`__wv_cls_`)||e.startsWith(`__wv_style_`)}function da(e){let{data:t,computed:n,setData:r}=e,i=n?Object.keys(n):[];if(!i.length)return;let{includeComputed:a,shouldIncludeKey:o,toPlainMaxDepth:s,toPlainMaxKeys:c,includeFunctions:l,functionPaths:u}=un(r);if(!a)return;let d={},f=new Set,p,m=e=>{if(Q(t,e)||!o(e))return{ok:!1};if(Q(d,e))return{ok:!0,value:d[e]};if(f.has(e))return{ok:!1};let r=la(n[e]);if(!r)return{ok:!1};f.add(e);try{let t=r.call(p);if(t===void 0)return{ok:!1};let n=Ut(t,new WeakMap,{maxDepth:s,maxKeys:c,includeFunctions:l,functionPaths:u,_path:e});return n===void 0?{ok:!1}:(d[e]=n,{ok:!0,value:n})}catch(e){return{ok:!1}}finally{f.delete(e)}};p=new Proxy(t,{get(e,r,i){if(typeof r==`string`){if(r===`data`||r===`$state`)return t;if(r===`props`||r===`$props`||r===`$attrs`)throw new ca;if(Q(t,r))return Reflect.get(e,r,i);if(n&&Q(n,r)){let e=m(r);if(e.ok)return e.value;throw new ca}throw new ca}return Reflect.get(e,r,i)},has(e,t){return Reflect.has(e,t)||typeof t==`string`&&!!(n&&Q(n,t))}});for(let e of i)ua(e)||m(e);return Object.keys(d).length?d:void 0}function fa(e,t,n){if(!e||typeof e!=`object`)return e;let r=da({data:e,computed:t,setData:n});return r?{...e,...r}:e}const pa=`__wevu_allowNullPropInput`,ma=`allowNullPropInput`,ha=new Map([[String,String],[Number,Number],[Boolean,Boolean],[Object,Object],[Array,Array],[Function,Function],[`String`,String],[`Number`,Number],[`Boolean`,Boolean],[`Object`,Object],[`Array`,Array],[`Function`,Function],[null,null],[`null`,null],[`Null`,null]]);function ga(e){return ha.get(e)}function _a(e){if(e===void 0)return[];let t=Array.isArray(e)?e:[e],n=[];t.forEach(e=>{let t=ga(e);t!==void 0&&(n.includes(t)||n.push(t))});let r=n.filter(e=>e!==null);return r.length>0?r:(n.includes(null),[null])}function va(e,t){let n=_a(t);if(n.length!==0&&(e.type=n[0],n.length>1)){let t=[];for(let e of n.slice(1))t.includes(e)||t.push(e);t.length>0&&(e.optionalTypes=t)}}function ya(e,t){if(t===void 0||e.type===t)return;let n=Array.isArray(e.optionalTypes)?[...e.optionalTypes]:[];n.includes(t)||(n.push(t),e.optionalTypes=n)}function ba(e){if(!Array.isArray(e))return[];let t=[];return e.forEach(e=>{let n=ga(e);n==null||t.includes(n)||t.push(n)}),t}function xa(e,t){if(e===void 0)return;if(e===null)return{type:null};if(Array.isArray(e)||typeof e==`function`){let n={};return va(n,e),t&&n.type!==null&&ya(n,null),Q(n,`type`)||(n.type=null),n}if(typeof e!=`object`)return e;let n={...e};if(`type`in n){var r;let e=_a(n.type);n.type=(r=e[0])==null?null:r;let t=ba(n.optionalTypes);for(let n of e.slice(1))n!==null&&!t.includes(n)&&t.push(n);t.length>0?n.optionalTypes=t:delete n.optionalTypes}return Q(n,`type`)||(n.type=null),t&&n.type!==null&&ya(n,null),n}function Sa(e,t){let n={};return Object.entries(e).forEach(([e,r])=>{let i=xa(r,t);i!==void 0&&(n[e]=i)}),n}function Ca(e,t){let n={};return e&&Object.entries(e).forEach(([e,r])=>{if(r!==void 0){if(r===null){n[e]={type:null};return}if(Array.isArray(r)||typeof r==`function`){let i={};va(i,r),t&&i.type!==null&&ya(i,null),Q(i,`type`)||(i.type=null),n[e]=i;return}if(typeof r==`object`){if(e.endsWith(`Modifiers`)&&Object.keys(r).length===0){n[e]={type:Object,value:{}};return}let i={};if(`type`in r&&r.type!==void 0&&va(i,r.type),Array.isArray(r.optionalTypes)){let e=r.optionalTypes.map(e=>ga(e)).filter(e=>e!=null);if(e.length>0){let t=Array.isArray(i.optionalTypes)?i.optionalTypes:[];for(let n of e)n!==i.type&&(t.includes(n)||t.push(n));t.length>0&&(i.optionalTypes=t)}}`observer`in r&&(typeof r.observer==`function`||typeof r.observer==`string`)&&(i.observer=r.observer);let a=`default`in r?r.default:r.value;a!==void 0&&(i.value=typeof a==`function`?a():a),t&&i.type!==null&&ya(i,null),Q(i,`type`)||(i.type=null),n[e]=i}}}),n}function wa(e,t,n){var r;let i=!!((r=e[pa])==null?e[ma]:r),{[pa]:a,[ma]:o,...s}=e,c=e.properties,l=n==null?c&&typeof c==`object`?c:void 0:n,u=!!(t||l),d=e=>{let t={...e==null?{}:e};return u?(Q(t,qe)||(t[qe]={type:String,value:``}),Q(t,Qe)||(t[Qe]={type:null,value:null}),Q(t,Ge)||(t[Ge]={type:null,value:null}),t):t};if(l){let{properties:e,...n}=s,r=l?i?Sa(l,i):l:void 0,a=Ca(t,i);return{...n,properties:d({...a,...r})}}return{...s,properties:d(Ca(t,i))}}const Ta=[Ke,qe,Ye,Je,Xe,Ze,Qe],Ea=/&amp;/g,Da=/&quot;/g,Oa=/&#34;/g,ka=/&apos;/g,Aa=/&#39;/g,ja=/&lt;/g,Ma=/&gt;/g;function Na(e){return e.replace(Ea,`&`).replace(Da,`"`).replace(Oa,`"`).replace(ka,`'`).replace(Aa,`'`).replace(ja,`<`).replace(Ma,`>`)}function Pa(e){var t,n,r,i;let a=Bn((t=(n=e==null||(r=e.currentTarget)==null?void 0:r.dataset)==null?e==null||(i=e.target)==null?void 0:i.dataset:n)==null?{}:t,`wvArgs`,e),o=[];if(Array.isArray(a))o=a;else if(typeof a==`string`)try{o=JSON.parse(a)}catch(e){try{o=JSON.parse(Na(a))}catch(e){o=[]}}return Array.isArray(o)||(o=[]),o.map(t=>t===`$event`?e:t)}function Fa(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 Ia(e){var t,n,r,i;return(t=(n=e==null||(r=e.__wevu)==null?void 0:r.proxy)==null?e==null||(i=e[Ne])==null?void 0:i.proxy:n)==null?e:t}function La(e,t){if(!t||Object.keys(t).length===0)return;let n=Ia(e),r={};for(let[e,i]of Object.entries(t))try{let t;typeof i==`function`?t=i.call(n):typeof(i==null?void 0:i.get)==`function`&&(t=i.get.call(n)),t!==void 0&&(r[e]=t)}catch(e){}return r}function Ra(e){var t,n;e==null||(t=e.__wevu)==null||(n=t.__wevu_flushSetupSnapshotSync)==null||n.call(t)}function za(e,t){Ra(e);let n=La(e,t);n&&Object.keys(n).length>0&&typeof(e==null?void 0:e.setData)==`function`&&e.setData(n)}function Ba(e,t){var n,r,i;let a=Q(t==null?{}:t,Qe)?t[Qe]:e==null||(n=e.properties)==null?void 0:n[Qe],o=Q(t==null?{}:t,Ze)?t[Ze]:e==null||(r=e.properties)==null?void 0:r[Ze],s=Fa(a),c=Fa(o),l={...s,...c};e[Xe]=l;let u=e==null||(i=e.__wevu)==null?void 0:i.state;return u&&typeof u==`object`&&(u[Xe]=l),l}function Va(e,t,n){let r=Ba(e,n);typeof(e==null?void 0:e.setData)==`function`&&e.setData({[Xe]:r}),za(e,t)}function Ha(e,t){var n;e[Ye]=t;let r=e==null?void 0:e.data;if(r&&typeof r==`object`)try{Object.defineProperty(r,Ye,{value:t,configurable:!0,enumerable:!1,writable:!0})}catch(e){r[Ye]=t}let i=e==null||(n=e.__wevu)==null?void 0:n.state;i&&typeof i==`object`&&(i[Ye]=t)}function Ua(e,t,n,r){var i;Ha(e,n),Ba(e),e[Je]=t||{};let a=e==null||(i=e.__wevu)==null?void 0:i.state;a&&typeof a==`object`&&(a[Je]=t||{}),typeof(e==null?void 0:e.setData)==`function`&&e.setData({[Je]:t||{}}),za(e,r)}function Wa(e,t,n){if(!t){typeof(e==null?void 0:e.__wvOwnerUnsub)==`function`&&e.__wvOwnerUnsub(),e.__wvOwnerUnsub=void 0,e.__wvOwnerBoundId=``,Ha(e,void 0);return}let r=(t,r)=>{Ua(e,t,r,n)};e.__wvOwnerBoundId!==t&&(typeof e.__wvOwnerUnsub==`function`&&e.__wvOwnerUnsub(),e.__wvOwnerBoundId=t,e.__wvOwnerUnsub=rr(t,r));let i=ar(t);i&&r(i,ir(t))}function Ga(e){var t,n,r,i;return(t=(n=e==null||(r=e.properties)==null?void 0:r[qe])==null?e==null||(i=e.properties)==null?void 0:i[Ke]:n)==null?``:t}function Ka(e,t){Va(e,t);let n=Ga(e);n&&Wa(e,n,t)}function qa(){let e={[Je]:{},[Xe]:{}};return Object.defineProperty(e,Ye,{value:void 0,configurable:!0,enumerable:!1,writable:!0}),e}function Ja(e){let t=e==null?void 0:e.computed,n={options:{virtualHost:!0},setData:{omit:Ta},[X]:Ta,properties:{[qe]:{type:String,value:``,observer(e){Wa(this,e||``,t)}},[Ke]:{type:String,value:``,observer(e){Wa(this,e||``,t)}},[Ze]:{type:null,value:null,observer(e){Va(this,t,{[Ze]:e})}},[Qe]:{type:null,value:null,observer(e){Va(this,t,{[Qe]:e})}}},data:qa,lifetimes:{attached(){Ka(this,t)},ready(){Ka(this,t)},detached(){typeof this.__wvOwnerUnsub==`function`&&this.__wvOwnerUnsub(),this.__wvOwnerUnsub=void 0,this.__wvOwnerBoundId=``,Ha(this,void 0)}},methods:{[Ce](e){var t,n,r,i,a;let o=this[Ye],s=Gn(o,void 0,e,(t=this.__wevu)==null||(t=t.methods)==null?void 0:t[_e]);if(s!==void 0)return s;if(!o)return;let c=Bn((n=(r=e==null||(i=e.currentTarget)==null?void 0:i.dataset)==null?e==null||(a=e.target)==null?void 0:a.dataset:r)==null?{}:n,`wvHandler`,e);if(typeof c!=`string`||!c)return;let l=o==null?void 0:o[c];if(typeof l!=`function`)return;let u=Pa(e);return l.apply(o,u)}}};return e!=null&&e.computed&&Object.keys(e.computed).length>0&&(n.computed=e.computed),e!=null&&e.inlineMap&&Object.keys(e.inlineMap).length>0&&(n.methods={...n.methods,[_e]:e.inlineMap}),n}function Ya(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function Xa(e){return typeof e!=`object`||!e||m(e)||f(e)||Array.isArray(e)?!0:Ya(e)}function Za(e,t,n,r){var i,a,o;let s=!!(r!=null&&r.includeFunctionsInState),c=r==null?void 0:r.functionPropPaths,l=(i=e==null?void 0:e.methods)==null?Object.create(null):i,u=(a=e==null?void 0:e.state)==null?Object.create(null):a,d=(o=e==null?void 0:e.setupState)==null?Object.create(null):o,p=f(u)?S(u):u,m=!1;if(e&&!e.methods)try{e.methods=l}catch(e){}if(e&&!e.state)try{e.state=u}catch(e){}if(e&&!e.setupState)try{e.setupState=d}catch(e){}if(Object.keys(n).forEach(r=>{let i=n[r];if(typeof i==`function`){let t=(...t)=>{var n;return i.apply((n=e==null?void 0:e.proxy)==null?e:n,t)};l[r]=t,u[r]=t,(s||c!=null&&c.has(r))&&(d[r]=t),m=!0}else{if(At(i)){var a;e==null||(a=e.__wevu_trackSetupReactiveKey)==null||a.call(e,r)}if(u[r]=i,i===t||!Xa(i))try{Object.defineProperty(p,r,{value:i,configurable:!0,enumerable:!1,writable:!0})}catch(e){}d[r]=i}}),e){var h,g;if(e.methods=(h=e.methods)==null?l:h,e.state=(g=e.state)==null?u:g,m){var _;(_=e.__wevu_touchSetupMethodsVersion)==null||_.call(e)}}}let Qa;function $a(){let e=w();if(!e)return;let t=e;Qa&&t[Be]!==Qa&&(t[Be]=Qa)}function eo(e){$a();let{__typeProps:t,data:n,computed:r,methods:i,setData:a,watch:o,setup:s,props:c,allowFunctionProps:l,...u}=Cn(e),d=u[me],f=Array.isArray(d)?[...new Set(d.filter(e=>typeof e==`string`&&e.length>0))]:[];delete u[me];let p=l===!0?{...a==null?{}:a,includeFunctions:!0,functionPaths:f}:l===!1?a:f.length?{...a==null?{}:a,functionPaths:f}:a,m=new Set(f.filter(e=>!e.includes(`.`))),h=sa({data:n,computed:r,methods:i,setData:p,[mn]:`component`}),g=typeof s==`function`?((e,t)=>{let n=Jr(s,e,t);return n&&t&&Za(t.runtime,t.instance,n,{includeFunctionsInState:l===!0,functionPropPaths:l===!1?void 0:m}),n}):void 0,_=fa(typeof n==`function`?n():n,r,p),v=wa(_===void 0?u:{...u,data:_},c),y={data:n,computed:r,methods:i,setData:p,watch:o,setup:g,mpOptions:v};return oa(h,i==null?{}:i,o,g,v),{__wevu_runtime:h,__wevu_options:y}}function to(e){var t;$a();let{properties:n,props:r,...i}=e;eo(wa({...i,allowNullPropInput:(t=i.allowNullPropInput)==null?!0:t,__wevu_allowNullPropInput:!0},r,n))}function no(e){to(Ja(e))}Qa=no,$a();const ro=[`dispose`,`abort`,`cancel`,`stop`,`disconnect`,`destroy`,`close`];function io(e){if(e){if(typeof e==`function`)return e;for(let t of ro){let n=e[t];if(typeof n==`function`)return()=>n.call(e)}}}function ao(){if(!P())throw Error(`useDisposables() 必须在 setup() 的同步阶段调用`);let e=new Set,t=!1,n=n=>{let r=io(n);if(!r)return()=>{};if(t){try{r()}catch(e){}return()=>{}}return e.add(r),()=>{e.delete(r)}},r=()=>{if(t)return;t=!0;let n=[...e];e.clear();for(let e of n)try{e()}catch(e){}};return K(r),W(r),{add:n,dispose:r,setTimeout:(e,t,...r)=>{let i=setTimeout(e,t,...r);return n(()=>{clearTimeout(i)}),i},setInterval:(e,t,...r)=>{let i=setInterval(e,t,...r);return n(()=>{clearInterval(i)}),i}}}function oo(e,t){let n=e,r=n.createIntersectionObserver;if(typeof r==`function`)return r.call(n,t);if(!L(`globalCreateIntersectionObserver`))return;let i=D(),a=i==null?void 0:i.createIntersectionObserver;if(typeof a==`function`)return O().intersectionObserverScopeByParameter?a.call(i,e,t):a.call(i,t)}function so(e,t){var n;if(t===!1||typeof e.relativeToViewport!=`function`)return e;let r=t&&typeof t==`object`?t:void 0;return(n=e.relativeToViewport(r))==null?e:n}function co(e){var t;let n=(t=e.context)==null?P():t;if(!n||!T())throw Error(`useElementIntersectionObserver() 必须在 setup() 的同步阶段调用`);let r=null,a=()=>{if(r){try{r.disconnect()}catch(e){}r=null}},o=()=>{var t,o;a();let s=i(e.selector);if(!(e.enabled==null||i(e.enabled))||!s)return null;let c=oo(n,i((t=e.observerOptions)==null?{}:t));return!c||typeof c.observe!=`function`?null:(r=so(c,(o=e.relativeToViewport)==null?!0:o),r.observe(s,t=>{var n;return(n=e.onObserve)==null?void 0:n.call(e,t)}),r)};return B(()=>{var t;return[i(e.selector),e.enabled==null?!0:i(e.enabled),i((t=e.observerOptions)==null?{}:t),e.relativeToViewport]},()=>{o()},{deep:!0}),ot(o),lt(a),K(a),W(a),{disconnect:a,observe:o,get observer(){return r}}}function lo(e,t){let n=e,r=n.createIntersectionObserver;if(typeof r==`function`)return r.call(n,t)}function uo(e,t){if(!L(`globalCreateIntersectionObserver`))return;let n=D(),r=n==null?void 0:n.createIntersectionObserver;if(typeof r==`function`)return O().intersectionObserverScopeByParameter?r.call(n,e,t):r.call(n,t)}function fo(e={}){var t;let n=P();if(!n)throw Error(`useIntersectionObserver() 必须在 setup() 的同步阶段调用`);let r=(t=lo(n,e))==null?uo(n,e):t;if(!r||typeof r.disconnect!=`function`)throw Error(`当前运行环境不支持 IntersectionObserver,请检查基础库版本或平台能力`);let i=!1,a=()=>{if(!i){i=!0;try{r.disconnect()}catch(e){}}};return K(a),W(a),r}function po(e){var t,n;return e?(t=(n=e.split(`?`)[0])==null?void 0:n.replace(/^\/+/,``))==null?``:t:``}function mo(){let e=A(),t=e[e.length-1],n=e.length||1;return{canGoBack:n>1,currentRoute:po(t==null?void 0:t.route),stackLength:n}}function ho(e={}){var t;if(!T())throw Error(`usePageStack() 必须在 setup() 的同步阶段调用`);let n=mo(),r=l(n.currentRoute),i=l(n.stackLength),a=C(()=>i.value>1),o=()=>{let e=mo();r.value=e.currentRoute,i.value=e.stackLength};return((t=e.autoRefresh)==null||t)&&(U(o),ae(o)),{canGoBack:a,currentRoute:r,refresh:o,stackLength:i}}function go(e={}){var t,n;let r=(t=e.defaultStatusBarHeight)==null?20:t,i=(n=e.defaultNavigationBarHeight)==null?44:n,a=D(),o=typeof(a==null?void 0:a.getSystemInfoSync)==`function`?a.getSystemInfoSync():{},s=Number((o==null?void 0:o.statusBarHeight)||r),c;try{c=typeof(a==null?void 0:a.getMenuButtonBoundingClientRect)==`function`?a.getMenuButtonBoundingClientRect():void 0}catch(e){}let l=Number((c==null?void 0:c.top)||0),u=Number((c==null?void 0:c.height)||0),d=l>s&&u>0?(l-s)*2+u:i;return{navigationBarHeight:d,navigationHeight:s+d,statusBarHeight:s}}function _o(e={}){var t;if(!T())throw Error(`useNavigationBarMetrics() 必须在 setup() 的同步阶段调用`);let n=go(e),r=l(n.statusBarHeight),i=l(n.navigationBarHeight),a=C(()=>r.value+i.value),o=()=>{let t=go(e);r.value=t.statusBarHeight,i.value=t.navigationBarHeight};return((t=e.autoRefresh)==null||t)&&U(o),{navigationBarHeight:i,navigationHeight:a,refresh:o,statusBarHeight:r}}function vo(e){return typeof e!=`number`||!Number.isFinite(e)?80:Math.max(0,e)}function yo(e){if(!(typeof e!=`number`||!Number.isFinite(e)))return Math.max(0,e)}function bo(e,t={}){var n,r;if(!P())throw Error(`usePageScrollThrottle() 必须在 setup() 的同步阶段调用`);if(typeof e!=`function`)throw TypeError(`usePageScrollThrottle() 需要传入回调函数`);let i=vo(t.interval),a=(n=t.leading)==null?!0:n,o=(r=t.trailing)==null?!0:r,s=yo(t.maxWait),c,l,u=!1,d=0,f,p=()=>{c&&(clearTimeout(c),c=void 0)},m=()=>{l&&(clearTimeout(l),l=void 0)},h=t=>{p(),m(),f=void 0,d=Date.now(),e(t)},g=()=>{let e=f;f=void 0,c=void 0,!(!e||u)&&h(e)},_=()=>{let e=f;l=void 0,!(!e||u)&&h(e)},v=e=>{if(!o||c)return;let t=Math.max(0,i-(e-(d===0?e:d)));c=setTimeout(g,t)},y=e=>{if(typeof s!=`number`||l)return;let t=s-(e-(d===0?e:d));if(t<=0){_();return}l=setTimeout(_,t)};ie(e=>{if(u)return;if(i===0){h(e);return}let t=Date.now();if(f=e,a&&(d===0||t-d>=i)){h(e);return}if(typeof s==`number`&&t-(d===0?t:d)>=s){h(e);return}!o&&typeof s!=`number`||(v(t),y(t))});let b=()=>{u||(u=!0,f=void 0,p(),m())};return K(b),W(b),b}function xo(e,t={}){te(async()=>{try{await e()}catch(e){var n;await((n=t.onError)==null?void 0:n.call(t,e))}finally{var r;await((r=t.stopPullDownRefresh)==null?(()=>at.stopPullDownRefresh()):r)()}})}function So(e,t){let n=t==null?P():t;if(!n||!T())throw Error(`${e}() 必须在 setup() 的同步阶段调用`);return n}function Co(e,t,n,r){let i=yr(e);return!i||!t?Promise.resolve(null):(r(n?i.selectAll(t):i.select(t)),new Promise(e=>{i.exec(t=>{let n=Array.isArray(t)?t[0]:null;e(n==null?null:n)})}))}function wo(e={}){let t=So(`useSelectorQuery`,e.context);return()=>yr(t)}function To(e={}){var t;let n=So(`useBoundingClientRect`,e.context),r=(t=e.all)==null?!1:t;return e=>Co(n,e,r,e=>e.boundingClientRect())}function Eo(e){var t;let n=So(`useSelectorFields`,e.context),r=(t=e.all)==null?!1:t;return t=>Co(n,t,r,t=>t.fields(e.fields))}function Do(e={}){var t;let n=So(`useScrollOffset`,e.context),r=(t=e.all)==null?!1:t;return e=>Co(n,e,r,e=>e.scrollOffset())}function Oo(e){let t=e,n=t.setUpdatePerformanceListener;if(typeof n==`function`)return e=>{n.call(t,e)}}function ko(e){let t=P();if(!t)throw Error(`useUpdatePerformanceListener() 必须在 setup() 的同步阶段调用`);if(typeof e!=`function`)throw TypeError(`useUpdatePerformanceListener() 需要传入监听函数`);let n=Oo(t);if(!n)throw Error(`当前实例不支持 setUpdatePerformanceListener,请检查基础库版本或组件上下文`);n(e);let r=!1,i=()=>{if(!r){r=!0;try{n(void 0)}catch(e){}}};return K(i),W(i),i}function Ao(){let e=P();if(e!=null&&e[ve]&&e[Re])return e[Re];throw Error(`defineAppSetup() / use() 只能在 app setup 上下文中调用`)}function jo(e){return e(Ao())}function Mo(e,...t){return Ao().use(e,...t)}const No=Object.freeze(Object.create(null));function Po(){var e;let t=T();if(!t)throw Error(`useAttrs() 必须在 setup() 的同步阶段调用`);return(e=t.attrs)==null?{}:e}function Fo(){var e;let t=T();if(!t)throw Error(`useSlots() 必须在 setup() 的同步阶段调用`);return(e=t.slots)==null?No:e}function Io(){let e=T();if(!(e!=null&&e.instance))throw Error(`useNativeInstance() 必须在 setup() 的同步阶段调用`);return e.instance}const Lo=Object.freeze(Object.create(null));function Ro(e,t){let n=t===`modelValue`?`modelModifiers`:`${t}Modifiers`,r=e==null?void 0:e[n];return!r||typeof r!=`object`?Lo:r}function zo(e,t){let n=e;try{Object.defineProperty(n,Symbol.iterator,{configurable:!0,value:()=>{let e=0;return{next:()=>e===0?(e+=1,{value:n,done:!1}):e===1?(e+=1,{value:t(),done:!1}):{value:void 0,done:!0}}}})}catch(e){}return n}function Bo(e,t,n={}){let r=T();if(!r)throw Error(`useModel() 必须在 setup() 的同步阶段调用`);let i=r.emit,a=`update:${t}`,o=()=>Ro(e,t);return zo(y({get:()=>{let r=e==null?void 0:e[t];return n.get?n.get(r,o()):r},set:e=>{let t=n.set?n.set(e,o()):e;i==null||i(a,t)}}),o)}function Vo(e){let t=P();if(!(t!=null&&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)=>{var i;let a={...e,...n},o=(i=a==null?void 0:a.valueProp)==null?`value`:i;return r.model(t,n)[o]},r.on=(t,n)=>{var i;let a={...e,...n},o=`on${vt((i=a==null?void 0:a.event)==null?`input`:i)}`;return r.model(t,n)[o]},r}function Ho(){let e=Vo({event:`change`});return function(t,n){return e.model(t,n)}}function Uo(e,t){return e==null?t:t==null?e:Array.isArray(e)&&Array.isArray(t)?[...new Set([...e,...t])]:typeof e==`object`&&typeof t==`object`?{...e,...t}:t}function Wo(e){let t=e[nt];if(t)return t;let n=new Map;try{Object.defineProperty(e,nt,{value:n,configurable:!0,enumerable:!1,writable:!1})}catch(t){e[nt]=n}return n}function Go(e){let t=P();if(!t)throw Error(`useTemplateRef() 必须在 setup() 的同步阶段调用`);let n=typeof e==`string`?e.trim():``;if(!n)throw Error(`useTemplateRef() 需要传入有效的模板 ref 名称`);let r=Wo(t),i=r.get(n);if(i)return i;let a=z(null);return r.set(n,a),a}export{_t as $,Xi as A,yi as B,co as C,eo as D,no as E,ra as F,Zn as G,Ci as H,ta as I,Jn as J,Yn as K,ia as L,Qi as M,$i as N,sa as O,Zi as P,$ as Q,ea as R,fo as S,to as T,Jr as U,Si as V,Qn as W,bn as X,xn as Y,Bt as Z,bo as _,Bo as a,mt as at,_o as b,Fo as c,ht as ct,ko as d,gt as et,To as f,xo as g,wo as h,Ho as i,dt as it,na as j,oa as k,jo as l,lt,Eo as m,Uo as n,ut as nt,Po as o,ft as ot,Do as p,Xn as q,Vo as r,ct as rt,Io as s,ot as st,Go as t,pt as tt,Mo as u,st as ut,mo as v,ao as w,ho as x,go as y,ki as z};
package/dist/vue-demi.mjs CHANGED
@@ -1 +1 @@
1
- import"./chunk-CenpyGzJ.mjs";import{C as e,D as t,E as n,N as r,O as i,S as a,T as o,a as s,b as c,c as l,d as u,f as d,g as f,h as p,i as m,k as h,l as g,n as _,o as v,p as y,s as b,t as x,u as S,w as C,x as w,y as T}from"./ref-CRwjgX_d.mjs";import{t as E}from"./computed-DdPJb4_M.mjs";import{S as D,b as O,c as k,d as A,n as j,r as M,s as N,u as P,x as F,y as I}from"./base-D-o2Hv6z.mjs";import{a as L,c as R,i as z,l as B,n as V,o as H,r as U,s as W,t as G,u as K}from"./watch-6_s3_f8q.mjs";import{n as q,t as J}from"./toRefs-COgMIEoC.mjs";import{$ as Y,A as X,B as Z,F as Q,G as $,H as ee,I as te,J as ne,K as re,L as ie,M as ae,N as oe,P as se,Q as ce,R as le,U as ue,V as de,W as fe,X as pe,Y as me,Z as he,_ as ge,et as _e,g as ve,h as ye,j as be,m as xe,n as Se,q as Ce,t as we,v as Te,z as Ee}from"./router-BiJKkvy7.mjs";import{$ as De,A as Oe,B as ke,C as Ae,D as je,E as Me,F as Ne,G as Pe,H as Fe,I as Ie,J as Le,K as Re,L as ze,M as Be,N as Ve,O as He,P as Ue,Q as We,R as Ge,S as Ke,T as qe,U as Je,V as Ye,W as Xe,X as Ze,Y as Qe,Z as $e,_ as et,a as tt,at as nt,b as rt,c as it,ct as at,d as ot,et as st,f as ct,g as lt,h as ut,i as dt,it as ft,j as pt,k as mt,l as ht,lt as gt,m as _t,n as vt,nt as yt,o as bt,ot as xt,p as St,q as Ct,r as wt,rt as Tt,s as Et,st as Dt,t as Ot,tt as kt,u as At,ut as jt,v as Mt,w as Nt,x as Pt,y as Ft,z as It}from"./templateRef-D5kOrMIX.mjs";import{n as Lt,r as Rt,t as zt}from"./template-CFhlojaH.mjs";import{n as Bt,r as Vt,t as Ht}from"./store-B9C0AuaO.mjs";import"./index.mjs";export*from"@wevu/web-apis";const Ut=!1,Wt=!0,Gt=void 0;function Kt(){}export{Gt as Vue2,c as addMutationRecorder,a as batch,j as callHookList,M as callHookReturn,st as callUpdateHooks,E as computed,He as createApp,Vt as createStore,qe as createWevuComponent,Me as createWevuScopedSlotComponent,x as customRef,ht as defineAppSetup,je as defineComponent,Bt as defineStore,e as effect,C as effectScope,o as endBatch,N as getCurrentInstance,Mt as getCurrentPageStackSnapshot,n as getCurrentScope,k as getCurrentSetupContext,L as getDeepWatchStrategy,Ft as getNavigationBarMetrics,b as getReactiveVersion,xe as hasInjectionContext,ye as inject,ve as injectGlobal,Kt as install,$e as isNoSetData,I as isProxy,l as isRaw,g as isReactive,O as isReadonly,_ as isRef,d as isShallowReactive,R as isShallowRef,Ut as isVue2,Wt as isVue3,We as markNoSetData,S as markRaw,vt as mergeModels,ke as mountRuntimeInstance,r as nextTick,zt as normalizeClass,Lt as normalizeStyle,kt as onActivated,be as onAddToFavorites,ae as onAttached,yt as onBeforeMount,Tt as onBeforeUnmount,ft as onBeforeUpdate,nt as onDeactivated,oe as onDetached,se as onError,xt as onErrorCaptured,Q as onHide,te as onLaunch,ie as onLoad,le as onMemoryWarning,Dt as onMounted,Ee as onMoved,Z as onPageNotFound,de as onPageScroll,ee as onPullDownRefresh,ue as onReachBottom,fe as onReady,$ as onResize,re as onRouteDone,Ce as onSaveExitState,t as onScopeDispose,at as onServerPrefetch,ne as onShareAppMessage,me as onShareTimeline,pe as onShow,he as onTabItemTap,ce as onThemeChange,Y as onUnhandledRejection,_e as onUnload,gt as onUnmounted,jt as onUpdated,p as prelinkReactiveTree,ge as provide,Te as provideGlobal,u as reactive,F as readonly,m as ref,It as registerApp,mt as registerComponent,Oe as registerPageLayoutBridge,pt as registerRuntimeLayoutHosts,w as removeMutationRecorder,Qe as resetWevuDefaults,Be as resolveLayoutBridge,Ve as resolveLayoutHost,Rt as resolvePropValue,Xe as resolveRuntimePageLayoutName,Je as runSetupFunction,P as setCurrentInstance,A as setCurrentSetupContext,H as setDeepWatchStrategy,X as setGlobalProvidedValue,Pe as setPageLayout,Ye as setRuntimeSetDataVisibility,Ze as setWevuDefaults,y as shallowReactive,D as shallowReadonly,B as shallowRef,i as startBatch,h as stop,Ht as storeToRefs,Re as syncRuntimePageLayoutState,Ct as syncRuntimePageLayoutStateFromRuntime,Fe as teardownRuntimeInstance,T as toRaw,J as toRef,q as toRefs,s as toValue,f as touchReactive,W as traverse,K as triggerRef,v as unref,Ue as unregisterPageLayoutBridge,Ne as unregisterRuntimeLayoutHosts,At as use,lt as useAsyncPullDownRefresh,bt as useAttrs,wt as useBindModel,ct as useBoundingClientRect,dt as useChangeModel,Nt as useDisposables,Ae as useElementIntersectionObserver,Ke as useIntersectionObserver,Ie as useLayoutBridge,ze as useLayoutHosts,tt as useModel,Et as useNativeInstance,we as useNativePageRouter,Se as useNativeRouter,rt as useNavigationBarMetrics,Le as usePageLayout,et as usePageScrollThrottle,Pt as usePageStack,St as useScrollOffset,_t as useSelectorFields,ut as useSelectorQuery,it as useSlots,Ot as useTemplateRef,ot as useUpdatePerformanceListener,De as version,Ge as waitForLayoutHost,G as watch,V as watchEffect,U as watchPostEffect,z as watchSyncEffect};
1
+ import"./chunk-CenpyGzJ.mjs";import{C as e,D as t,E as n,N as r,O as i,S as a,T as o,a as s,b as c,c as l,d as u,f as d,g as f,h as p,i as m,k as h,l as g,n as _,o as v,p as y,s as b,t as x,u as S,w as C,x as w,y as T}from"./ref-CRwjgX_d.mjs";import{t as E}from"./computed-DdPJb4_M.mjs";import{S as D,b as O,c as k,d as A,n as j,r as M,s as N,u as P,x as F,y as I}from"./base-D-o2Hv6z.mjs";import{a as L,c as R,i as z,l as B,n as V,o as H,r as U,s as W,t as G,u as K}from"./watch-6_s3_f8q.mjs";import{n as q,t as J}from"./toRefs-COgMIEoC.mjs";import{$ as Y,A as X,B as Z,F as Q,G as $,H as ee,I as te,J as ne,K as re,L as ie,M as ae,N as oe,P as se,Q as ce,R as le,U as ue,V as de,W as fe,X as pe,Y as me,Z as he,_ as ge,et as _e,g as ve,h as ye,j as be,m as xe,n as Se,q as Ce,t as we,v as Te,z as Ee}from"./router-BiJKkvy7.mjs";import{$ as De,A as Oe,B as ke,C as Ae,D as je,E as Me,F as Ne,G as Pe,H as Fe,I as Ie,J as Le,K as Re,L as ze,M as Be,N as Ve,O as He,P as Ue,Q as We,R as Ge,S as Ke,T as qe,U as Je,V as Ye,W as Xe,X as Ze,Y as Qe,Z as $e,_ as et,a as tt,at as nt,b as rt,c as it,ct as at,d as ot,et as st,f as ct,g as lt,h as ut,i as dt,it as ft,j as pt,k as mt,l as ht,lt as gt,m as _t,n as vt,nt as yt,o as bt,ot as xt,p as St,q as Ct,r as wt,rt as Tt,s as Et,st as Dt,t as Ot,tt as kt,u as At,ut as jt,v as Mt,w as Nt,x as Pt,y as Ft,z as It}from"./templateRef-DH3fN9wZ.mjs";import{n as Lt,r as Rt,t as zt}from"./template-CFhlojaH.mjs";import{n as Bt,r as Vt,t as Ht}from"./store-B9C0AuaO.mjs";import"./index.mjs";export*from"@wevu/web-apis";const Ut=!1,Wt=!0,Gt=void 0;function Kt(){}export{Gt as Vue2,c as addMutationRecorder,a as batch,j as callHookList,M as callHookReturn,st as callUpdateHooks,E as computed,He as createApp,Vt as createStore,qe as createWevuComponent,Me as createWevuScopedSlotComponent,x as customRef,ht as defineAppSetup,je as defineComponent,Bt as defineStore,e as effect,C as effectScope,o as endBatch,N as getCurrentInstance,Mt as getCurrentPageStackSnapshot,n as getCurrentScope,k as getCurrentSetupContext,L as getDeepWatchStrategy,Ft as getNavigationBarMetrics,b as getReactiveVersion,xe as hasInjectionContext,ye as inject,ve as injectGlobal,Kt as install,$e as isNoSetData,I as isProxy,l as isRaw,g as isReactive,O as isReadonly,_ as isRef,d as isShallowReactive,R as isShallowRef,Ut as isVue2,Wt as isVue3,We as markNoSetData,S as markRaw,vt as mergeModels,ke as mountRuntimeInstance,r as nextTick,zt as normalizeClass,Lt as normalizeStyle,kt as onActivated,be as onAddToFavorites,ae as onAttached,yt as onBeforeMount,Tt as onBeforeUnmount,ft as onBeforeUpdate,nt as onDeactivated,oe as onDetached,se as onError,xt as onErrorCaptured,Q as onHide,te as onLaunch,ie as onLoad,le as onMemoryWarning,Dt as onMounted,Ee as onMoved,Z as onPageNotFound,de as onPageScroll,ee as onPullDownRefresh,ue as onReachBottom,fe as onReady,$ as onResize,re as onRouteDone,Ce as onSaveExitState,t as onScopeDispose,at as onServerPrefetch,ne as onShareAppMessage,me as onShareTimeline,pe as onShow,he as onTabItemTap,ce as onThemeChange,Y as onUnhandledRejection,_e as onUnload,gt as onUnmounted,jt as onUpdated,p as prelinkReactiveTree,ge as provide,Te as provideGlobal,u as reactive,F as readonly,m as ref,It as registerApp,mt as registerComponent,Oe as registerPageLayoutBridge,pt as registerRuntimeLayoutHosts,w as removeMutationRecorder,Qe as resetWevuDefaults,Be as resolveLayoutBridge,Ve as resolveLayoutHost,Rt as resolvePropValue,Xe as resolveRuntimePageLayoutName,Je as runSetupFunction,P as setCurrentInstance,A as setCurrentSetupContext,H as setDeepWatchStrategy,X as setGlobalProvidedValue,Pe as setPageLayout,Ye as setRuntimeSetDataVisibility,Ze as setWevuDefaults,y as shallowReactive,D as shallowReadonly,B as shallowRef,i as startBatch,h as stop,Ht as storeToRefs,Re as syncRuntimePageLayoutState,Ct as syncRuntimePageLayoutStateFromRuntime,Fe as teardownRuntimeInstance,T as toRaw,J as toRef,q as toRefs,s as toValue,f as touchReactive,W as traverse,K as triggerRef,v as unref,Ue as unregisterPageLayoutBridge,Ne as unregisterRuntimeLayoutHosts,At as use,lt as useAsyncPullDownRefresh,bt as useAttrs,wt as useBindModel,ct as useBoundingClientRect,dt as useChangeModel,Nt as useDisposables,Ae as useElementIntersectionObserver,Ke as useIntersectionObserver,Ie as useLayoutBridge,ze as useLayoutHosts,tt as useModel,Et as useNativeInstance,we as useNativePageRouter,Se as useNativeRouter,rt as useNavigationBarMetrics,Le as usePageLayout,et as usePageScrollThrottle,Pt as usePageStack,St as useScrollOffset,_t as useSelectorFields,ut as useSelectorQuery,it as useSlots,Ot as useTemplateRef,ot as useUpdatePerformanceListener,De as version,Ge as waitForLayoutHost,G as watch,V as watchEffect,U as watchPostEffect,z as watchSyncEffect};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wevu",
3
3
  "type": "module",
4
- "version": "6.16.37",
4
+ "version": "6.16.40",
5
5
  "description": "Vue 3 风格的小程序运行时,包含响应式、diff+setData 与轻量状态管理",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -229,7 +229,7 @@
229
229
  "@weapp-core/constants": "0.1.12",
230
230
  "@weapp-core/shared": "3.0.4",
231
231
  "@wevu/api": "0.2.9",
232
- "@wevu/compiler": "6.16.37",
232
+ "@wevu/compiler": "6.16.40",
233
233
  "@wevu/web-apis": "1.2.20"
234
234
  },
235
235
  "scripts": {