"use strict"; /** * @vue/shared v3.4.21 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/ function e(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}const t={},n=[],o=()=>{},s=()=>!1,r=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),i=e=>e.startsWith("onUpdate:"),a=Object.assign,c=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},u=Object.prototype.hasOwnProperty,l=(e,t)=>u.call(e,t),h=Array.isArray,f=e=>"[object Map]"===w(e),p=e=>"[object Set]"===w(e),d=e=>"function"==typeof e,g=e=>"string"==typeof e,m=e=>"symbol"==typeof e,y=e=>null!==e&&"object"==typeof e,_=e=>(y(e)||d(e))&&d(e.then)&&d(e.catch),v=Object.prototype.toString,w=e=>v.call(e),b=e=>"[object Object]"===w(e),x=e=>g(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,S=e(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),k=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},T=/-(\w)/g,P=k((e=>e.replace(T,((e,t)=>t?t.toUpperCase():"")))),I=/\B([A-Z])/g,A=k((e=>e.replace(I,"-$1").toLowerCase())),O=k((e=>e.charAt(0).toUpperCase()+e.slice(1))),C=k((e=>e?`on${O(e)}`:"")),E=(e,t)=>!Object.is(e,t),L=(e,t)=>{for(let n=0;n{const t=parseFloat(e);return isNaN(t)?e:t};let R;function j(e){if(h(e)){const t={};for(let n=0;n{if(e){const n=e.split(U);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function B(e){let t="";if(g(e))t=e;else if(h(e))for(let n=0;nt&&t.__v_isRef?F(e,t.value):f(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n],o)=>(e[q(t,o)+" =>"]=n,e)),{})}:p(t)?{[`Set(${t.size})`]:[...t.values()].map((e=>q(e)))}:m(t)?q(t):!y(t)||h(t)||b(t)?t:String(t),q=(e,t="")=>{var n;return m(e)?`Symbol(${null!=(n=e.description)?n:t})`:e},H=/:/g;function V(e,t=null){let n;return(...o)=>(e&&(n=e.apply(t,o),e=null),n)}function K(e,t){if(!g(t))return;const n=(t=t.replace(/\[(\d+)\]/g,".$1")).split(".");let o=n[0];return e||(e={}),1===n.length?e[o]:K(e[o],n.slice(1).join("."))}function W(e){let t={};return b(e)&&Object.keys(e).sort().forEach((n=>{const o=n;t[o]=e[o]})),Object.keys(t)?t:e}const z=encodeURIComponent;function J(e,t=z){const n=e?Object.keys(e).map((n=>{let o=e[n];return void 0===typeof o||null===o?o="":b(o)&&(o=JSON.stringify(o)),t(n)+"="+t(o)})).filter((e=>e.length>0)).join("&"):null;return n?`?${n}`:""}const G=["onInit","onLoad","onShow","onHide","onUnload","onBackPress","onPageScroll","onTabItemTap","onReachBottom","onPullDownRefresh","onShareTimeline","onShareAppMessage","onAddToFavorites","onSaveExitState","onNavigationBarButtonTap","onNavigationBarSearchInputClicked","onNavigationBarSearchInputChanged","onNavigationBarSearchInputConfirmed","onNavigationBarSearchInputFocusChanged"];const Q=["onShow","onHide","onLaunch","onError","onThemeChange","onPageNotFound","onUnhandledRejection","onExit","onInit","onLoad","onReady","onUnload","onResize","onBackPress","onPageScroll","onTabItemTap","onReachBottom","onPullDownRefresh","onShareTimeline","onAddToFavorites","onShareAppMessage","onSaveExitState","onNavigationBarButtonTap","onNavigationBarSearchInputClicked","onNavigationBarSearchInputChanged","onNavigationBarSearchInputConfirmed","onNavigationBarSearchInputFocusChanged"],Y=(()=>({onPageScroll:1,onShareAppMessage:2,onShareTimeline:4}))();function X(e,t,n=!0){return!(n&&!d(t))&&(Q.indexOf(e)>-1||0===e.indexOf("on"))}let Z;const ee=[];const te=V(((e,t)=>{if(d(e._component.onError))return t(e)})),ne=function(){};ne.prototype={on:function(e,t,n){var o=this.e||(this.e={});return(o[e]||(o[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var o=this;function s(){o.off(e,s),t.apply(n,arguments)}return s._=t,this.on(e,s,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),o=0,s=n.length;o=0;r--)if(o[r].fn===t||o[r].fn._===t){o.splice(r,1);break}s=o}return s.length?n[e]=s:delete n[e],this}};var oe=ne;const se=["{","}"];const re=/^(?:\d)+/,ie=/^(?:\w)+/;const ae=Object.prototype.hasOwnProperty,ce=(e,t)=>ae.call(e,t),ue=new class{constructor(){this._caches=Object.create(null)}interpolate(e,t,n=se){if(!t)return[e];let o=this._caches[e];return o||(o=function(e,[t,n]){const o=[];let s=0,r="";for(;s-1?"zh-Hans":e.indexOf("-hant")>-1?"zh-Hant":(n=e,["-tw","-hk","-mo","-cht"].find((e=>-1!==n.indexOf(e)))?"zh-Hant":"zh-Hans");var n;let o=["en","fr","es"];t&&Object.keys(t).length>0&&(o=Object.keys(t));const s=function(e,t){return t.find((t=>0===e.indexOf(t)))}(e,o);return s||void 0}class he{constructor({locale:e,fallbackLocale:t,messages:n,watcher:o,formater:s}){this.locale="en",this.fallbackLocale="en",this.message={},this.messages={},this.watchers=[],t&&(this.fallbackLocale=t),this.formater=s||ue,this.messages=n||{},this.setLocale(e||"en"),o&&this.watchLocale(o)}setLocale(e){const t=this.locale;this.locale=le(e,this.messages)||this.fallbackLocale,this.messages[this.locale]||(this.messages[this.locale]={}),this.message=this.messages[this.locale],t!==this.locale&&this.watchers.forEach((e=>{e(this.locale,t)}))}getLocale(){return this.locale}watchLocale(e){const t=this.watchers.push(e)-1;return()=>{this.watchers.splice(t,1)}}add(e,t,n=!0){const o=this.messages[e];o?n?Object.assign(o,t):Object.keys(t).forEach((e=>{ce(o,e)||(o[e]=t[e])})):this.messages[e]=t}f(e,t,n){return this.formater.interpolate(e,t,n).join("")}t(e,t,n){let o=this.message;return"string"==typeof t?(t=le(t,this.messages))&&(o=this.messages[t]):n=t,ce(o,e)?this.formater.interpolate(o[e],n).join(""):(console.warn(`Cannot translate the value of keypath ${e}. Use the value of keypath as default.`),e)}}function fe(e){return function(){try{return e.apply(e,arguments)}catch(gc){console.error(gc)}}}let pe=1;const de={};function ge(e,t,n){if("number"==typeof e){const o=de[e];if(o)return o.keepAlive||delete de[e],o.callback(t,n)}return t}const me="success",ye="fail",_e="complete";function ve(e,t={},{beforeAll:n,beforeSuccess:o}={}){b(t)||(t={});const{success:s,fail:r,complete:i}=function(e){const t={};for(const n in e){const o=e[n];d(o)&&(t[n]=fe(o),delete e[n])}return t}(t),a=d(s),c=d(r),u=d(i),l=pe++;return function(e,t,n,o=!1){de[e]={name:t,keepAlive:o,callback:n}}(l,e,(l=>{(l=l||{}).errMsg=function(e,t){return e&&-1!==e.indexOf(":fail")?t+e.substring(e.indexOf(":fail")):t+":ok"}(l.errMsg,e),d(n)&&n(l),l.errMsg===e+":ok"?(d(o)&&o(l,t),a&&s(l)):c&&r(l),u&&i(l)})),l}const we="success",be="fail",xe="complete",Se={},ke={};function Te(e,t){return function(n){return e(n,t)||n}}function Pe(e,t,n){let o=!1;for(let s=0;se(t),catch(){}}}function Ie(e,t={}){return[we,be,xe].forEach((n=>{const o=e[n];if(!h(o))return;const s=t[n];t[n]=function(e){Pe(o,e,t).then((e=>d(s)&&s(e)||e))}})),t}function Ae(e,t){const n=[];h(Se.returnValue)&&n.push(...Se.returnValue);const o=ke[e];return o&&h(o.returnValue)&&n.push(...o.returnValue),n.forEach((e=>{t=e(t)||t})),t}function Oe(e){const t=Object.create(null);Object.keys(Se).forEach((e=>{"returnValue"!==e&&(t[e]=Se[e].slice())}));const n=ke[e];return n&&Object.keys(n).forEach((e=>{"returnValue"!==e&&(t[e]=(t[e]||[]).concat(n[e]))})),t}function Ce(e,t,n,o){const s=Oe(e);if(s&&Object.keys(s).length){if(h(s.invoke)){return Pe(s.invoke,n).then((n=>t(Ie(Oe(e),n),...o)))}return t(Ie(s,n),...o)}return t(n,...o)}function Ee(e,t){return(n={},...o)=>function(e){return!(!b(e)||![me,ye,_e].find((t=>d(e[t]))))}(n)?Ae(e,Ce(e,t,n,o)):Ae(e,new Promise(((s,r)=>{Ce(e,t,a(n,{success:s,fail:r}),o)})))}function Le(e,t,n,o={}){const s=t+":fail"+(n?" "+n:"");return delete o.errCode,ge(e,a({errMsg:s},o))}function $e(e,t,n,o){if(o&&o.beforeInvoke){const e=o.beforeInvoke(t);if(g(e))return e}const s=function(e,t){const n=e[0];if(!t||!t.formatArgs||!b(t.formatArgs)&&b(n))return;const o=t.formatArgs,s=Object.keys(o);for(let r=0;r{const s=ve(e,n,o),r=$e(0,[n],0,o);return r?Le(s,e,r):t(n,{resolve:t=>function(e,t,n){return ge(e,a(n||{},{errMsg:t+":ok"}))}(s,e,t),reject:(t,n)=>Le(s,e,function(e){return!e||g(e)?e:e.stack?(console.error(e.message+"\n"+e.stack),e.message):e}(t),n)})}}function je(e,t,n,o){return function(e,t,n,o){return(...e)=>{const n=$e(0,e,0,o);if(n)throw new Error(n);return t.apply(null,e)}}(0,t,0,o)}let Me=!1,Ue=0,Ne=0;function De(){const{platform:e,pixelRatio:t,windowWidth:n}=wx.getSystemInfoSync();Ue=n,Ne=t,Me="ios"===e}const Be=je(0,((e,t)=>{if(0===Ue&&De(),0===(e=Number(e)))return 0;let n=e/750*(t||Ue);return n<0&&(n=-n),n=Math.floor(n+1e-4),0===n&&(n=1!==Ne&&Me?.5:1),e<0?-n:n}));function Fe(e,t){Object.keys(t).forEach((n=>{d(t[n])&&(e[n]=function(e,t){const n=t?e?e.concat(t):h(t)?t:[t]:e;return n?function(e){const t=[];for(let n=0;n{const o=e[n],s=t[n];h(o)&&d(s)&&c(o,s)}))}const He=je(0,((e,t)=>{g(e)&&b(t)?Fe(ke[e]||(ke[e]={}),t):b(e)&&Fe(Se,e)})),Ve=je(0,((e,t)=>{g(e)?b(t)?qe(ke[e],t):delete ke[e]:b(e)&&qe(Se,e)})),Ke=new oe,We=je(0,((e,t)=>(Ke.on(e,t),()=>Ke.off(e,t)))),ze=je(0,((e,t)=>(Ke.once(e,t),()=>Ke.off(e,t)))),Je=je(0,((e,t)=>{e?(h(e)||(e=[e]),e.forEach((e=>Ke.off(e,t)))):Ke.e={}})),Ge=je(0,((e,...t)=>{Ke.emit(e,...t)}));let Qe,Ye,Xe;function Ze(e){try{return JSON.parse(e)}catch(gc){}return e}const et=[];function tt(e,t){et.forEach((n=>{n(e,t)})),et.length=0}const nt=Ee(ot="getPushClientId",function(e,t,n,o){return Re(e,t,0,o)}(ot,((e,{resolve:t,reject:n})=>{Promise.resolve().then((()=>{void 0===Xe&&(Xe=!1,Qe="",Ye="uniPush is not enabled"),et.push(((e,o)=>{e?t({cid:e}):n(o)})),void 0!==Qe&&tt(Qe,Ye)}))}),0,st));var ot,st;const rt=[],it=/^\$|getLocale|setLocale|sendNativeEvent|restoreGlobal|requireGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getDeviceInfo|getAppBaseInfo|getWindowInfo|getSystemSetting|getAppAuthorizeSetting/,at=/^create|Manager$/,ct=["createBLEConnection"],ut=["createBLEConnection"],lt=/^on|^off/;function ht(e){return at.test(e)&&-1===ct.indexOf(e)}function ft(e){return it.test(e)&&-1===ut.indexOf(e)}function pt(e){return!(ht(e)||ft(e)||function(e){return lt.test(e)&&"onPush"!==e}(e))}function dt(e,t){return pt(e)&&d(t)?function(n={},...o){return d(n.success)||d(n.fail)||d(n.complete)?Ae(e,Ce(e,t,n,o)):Ae(e,new Promise(((s,r)=>{Ce(e,t,a({},n,{success:s,fail:r}),o)})))}:t}Promise.prototype.finally||(Promise.prototype.finally=function(e){const t=this.constructor;return this.then((n=>t.resolve(e&&e()).then((()=>n))),(n=>t.resolve(e&&e()).then((()=>{throw n}))))});const gt=["success","fail","cancel","complete"];const mt=()=>{const e=d(getApp)&&getApp({allowDefault:!0});return e&&e.$vm?e.$vm.$locale:le(wx.getSystemInfoSync().language)||"en"},yt=[];"undefined"!=typeof global&&(global.getLocale=mt);let _t;function vt(e=wx){return function(t,n){_t=_t||e.getStorageSync("__DC_STAT_UUID"),_t||(_t=Date.now()+""+Math.floor(1e7*Math.random()),wx.setStorage({key:"__DC_STAT_UUID",data:_t})),n.deviceId=_t}}function wt(e,t){if(e.safeArea){const n=e.safeArea;t.safeAreaInsets={top:n.top,left:n.left,right:e.windowWidth-n.right,bottom:e.screenHeight-n.bottom}}}function bt(e,t){let n=e.deviceType||"phone";{const e={ipad:"pad",windows:"pc",mac:"pc"},o=Object.keys(e),s=t.toLocaleLowerCase();for(let t=0;t{wt(e,t),vt()(e,t),function(e,t){const{brand:n="",model:o="",system:s="",language:r="",theme:i,version:c,platform:u,fontSizeSetting:l,SDKVersion:h,pixelRatio:f,deviceOrientation:p}=e;let d="",g="";d=s.split(" ")[0]||"",g=s.split(" ")[1]||"";let m=c,y=bt(e,o),_=xt(n),v=kt(e),w=p,b=f,x=h;const S=r.replace(/_/g,"-"),k={appId:"__UNI__E097FA0",appName:"星动能源",appVersion:"1.0.0",appVersionCode:"100",appLanguage:St(S),uniCompileVersion:"4.29",uniRuntimeVersion:"4.29",uniPlatform:"mp-weixin",deviceBrand:_,deviceModel:o,deviceType:y,devicePixelRatio:b,deviceOrientation:w,osName:d.toLocaleLowerCase(),osVersion:g,hostTheme:i,hostVersion:m,hostLanguage:S,hostName:v,hostSDKVersion:x,hostFontSizeSetting:l,windowTop:0,windowBottom:0,osLanguage:void 0,osTheme:void 0,ua:void 0,hostPackageName:void 0,browserName:void 0,browserVersion:void 0};a(t,k)}(e,t)}},Pt=Tt,It={args(e,t){let n=parseInt(e.current);if(isNaN(n))return;const o=e.urls;if(!h(o))return;const s=o.length;return s?(n<0?n=0:n>=s&&(n=s-1),n>0?(t.current=o[n],t.urls=o.filter(((e,t)=>!(t{const{brand:n,model:o}=e;let s=bt(e,o),r=xt(n);vt()(e,t),t=W(a(t,{deviceType:s,deviceBrand:r,deviceModel:o}))}},Ct={returnValue:(e,t)=>{const{version:n,language:o,SDKVersion:s,theme:r}=e;let i=kt(e),c=o.replace(/_/g,"-");t=W(a(t,{hostVersion:n,hostLanguage:c,hostName:i,hostSDKVersion:s,hostTheme:r,appId:"__UNI__E097FA0",appName:"星动能源",appVersion:"1.0.0",appVersionCode:"100",appLanguage:St(c)}))}},Et={returnValue:(e,t)=>{wt(e,t),t=W(a(t,{windowTop:0,windowBottom:0}))}},Lt={$on:We,$off:Je,$once:ze,$emit:Ge,upx2px:Be,interceptors:{},addInterceptor:He,removeInterceptor:Ve,onCreateVueApp:function(e){if(Z)return e(Z);ee.push(e)},invokeCreateVueAppHook:function(e){Z=e,ee.forEach((t=>t(e)))},getLocale:mt,setLocale:e=>{const t=d(getApp)&&getApp();if(!t)return!1;return t.$vm.$locale!==e&&(t.$vm.$locale=e,yt.forEach((t=>t({locale:e}))),!0)},onLocaleChange:e=>{-1===yt.indexOf(e)&&yt.push(e)},getPushClientId:nt,onPushMessage:e=>{-1===rt.indexOf(e)&&rt.push(e)},offPushMessage:e=>{if(e){const t=rt.indexOf(e);t>-1&&rt.splice(t,1)}else rt.length=0},invokePushCallback:function(e){if("enabled"===e.type)Xe=!0;else if("clientId"===e.type)Qe=e.cid,Ye=e.errMsg,tt(Qe,e.errMsg);else if("pushMsg"===e.type){const t={type:"receive",data:Ze(e.message)};for(let e=0;e{t({type:"click",data:Ze(e.message)})}))}};const $t=["qy","env","error","version","lanDebug","cloud","serviceMarket","router","worklet","__webpack_require_UNI_MP_PLUGIN__"],Rt=["lanDebug","router","worklet"],jt=wx.getLaunchOptionsSync?wx.getLaunchOptionsSync():null;function Mt(e){return(!jt||1154!==jt.scene||!Rt.includes(e))&&($t.indexOf(e)>-1||"function"==typeof wx[e])}function Ut(){const e={};for(const t in wx)Mt(t)&&(e[t]=wx[t]);return"undefined"!=typeof globalThis&&"undefined"==typeof requireMiniProgram&&(globalThis.wx=e),e}const Nt=["__route__","__wxExparserNodeId__","__wxWebviewId__"],Dt=(Bt={oauth:["weixin"],share:["weixin"],payment:["wxpay"],push:["weixin"]},function({service:e,success:t,fail:n,complete:o}){let s;Bt[e]?(s={errMsg:"getProvider:ok",service:e,provider:Bt[e]},d(t)&&t(s)):(s={errMsg:"getProvider:fail:服务["+e+"]不存在"},d(n)&&n(s)),d(o)&&o(s)});var Bt;const Ft=Ut();let qt=Ft.getAppBaseInfo&&Ft.getAppBaseInfo();qt||(qt=Ft.getSystemInfoSync());const Ht=qt?qt.host:null,Vt=Ht&&"SAAASDK"===Ht.env?Ft.miniapp.shareVideoMessage:Ft.shareVideoMessage;var Kt=Object.freeze({__proto__:null,createSelectorQuery:function(){const e=Ft.createSelectorQuery(),t=e.in;return e.in=function(e){return t.call(this,function(e){const t=Object.create(null);return Nt.forEach((n=>{t[n]=e[n]})),t}(e))},e},getProvider:Dt,shareVideoMessage:Vt});const Wt={args(e,t){e.compressedHeight&&!t.compressHeight&&(t.compressHeight=e.compressedHeight),e.compressedWidth&&!t.compressWidth&&(t.compressWidth=e.compressedWidth)}};var zt=Object.freeze({__proto__:null,compressImage:Wt,getAppAuthorizeSetting:{returnValue:function(e,t){const{locationReducedAccuracy:n}=e;t.locationAccuracy="unsupported",!0===n?t.locationAccuracy="reduced":!1===n&&(t.locationAccuracy="full")}},getAppBaseInfo:Ct,getDeviceInfo:Ot,getSystemInfo:Tt,getSystemInfoSync:Pt,getWindowInfo:Et,previewImage:It,redirectTo:{},showActionSheet:At});const Jt=Ut();var Gt=function(e,t,n=wx){const o=function(e){function t(e,t,n){return function(s){return t(o(e,s,n))}}function n(e,n,o={},s={},r=!1){if(b(n)){const i=!0===r?n:{};d(o)&&(o=o(n,i)||{});for(const a in n)if(l(o,a)){let t=o[a];d(t)&&(t=t(n[a],n,i)),t?g(t)?i[t]=n[a]:b(t)&&(i[t.name?t.name:a]=t.value):console.warn(`微信小程序 ${e} 暂不支持 ${a}`)}else if(-1!==gt.indexOf(a)){const o=n[a];d(o)&&(i[a]=t(e,o,s))}else r||l(i,a)||(i[a]=n[a]);return i}return d(n)&&(n=t(e,n,s)),n}function o(t,o,s,r=!1){return d(e.returnValue)&&(o=e.returnValue(t,o)),n(t,o,s,{},r)}return function(t,s){if(!l(e,t))return s;const r=e[t];return r?function(e,s){let i=r;d(r)&&(i=r(e));const a=[e=n(t,e,i.args,i.returnValue)];void 0!==s&&a.push(s);const c=wx[i.name||t].apply(wx,a);return ft(t)?o(t,c,i.returnValue,ht(t)):c}:function(){console.error(`微信小程序 暂不支持${t}`)}}}(t);return new Proxy({},{get:(t,s)=>l(t,s)?t[s]:l(e,s)?dt(s,e[s]):l(Lt,s)?dt(s,Lt[s]):dt(s,o(s,n[s]))})}(Kt,zt,Jt);new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(m));{const e=R||(R="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}),t=(t,n)=>{let o;return(o=e[t])||(o=e[t]=[]),o.push(n),e=>{o.length>1?o.forEach((t=>t(e))):o[0](e)}};t("__VUE_INSTANCE_SETTERS__",(e=>e)),t("__VUE_SSR_SETTERS__",(e=>e))}let Qt,Yt;class Xt{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Qt,!e&&Qt&&(this.index=(Qt.scopes||(Qt.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const t=Qt;try{return Qt=this,e()}finally{Qt=t}}}on(){Qt=this}off(){Qt=this.parent}stop(e){if(this._active){let t,n;for(t=0,n=this.effects.length;t=4))break}1===this._dirtyLevel&&(this._dirtyLevel=0),cn()}return this._dirtyLevel>=4}set dirty(e){this._dirtyLevel=e?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=on,t=Yt;try{return on=!0,Yt=this,this._runnings++,en(this),this.fn()}finally{tn(this),this._runnings--,Yt=t,on=e}}stop(){var e;this.active&&(en(this),tn(this),null==(e=this.onStop)||e.call(this),this.active=!1)}}function en(e){e._trackId++,e._depsLength=0}function tn(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t{const n=new Map;return n.cleanup=e,n.computed=t,n},gn=new WeakMap,mn=Symbol(""),yn=Symbol("");function _n(e,t,n){if(on&&Yt){let t=gn.get(e);t||gn.set(e,t=new Map);let o=t.get(n);o||t.set(n,o=dn((()=>t.delete(n)))),hn(Yt,o)}}function vn(e,t,n,o,s,r){const i=gn.get(e);if(!i)return;let a=[];if("clear"===t)a=[...i.values()];else if("length"===n&&h(e)){const e=Number(o);i.forEach(((t,n)=>{("length"===n||!m(n)&&n>=e)&&a.push(t)}))}else switch(void 0!==n&&a.push(i.get(n)),t){case"add":h(e)?x(n)&&a.push(i.get("length")):(a.push(i.get(mn)),f(e)&&a.push(i.get(yn)));break;case"delete":h(e)||(a.push(i.get(mn)),f(e)&&a.push(i.get(yn)));break;case"set":f(e)&&a.push(i.get(mn))}un();for(const c of a)c&&pn(c,4);ln()}const wn=e("__proto__,__v_isRef,__isVue"),bn=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(m)),xn=Sn();function Sn(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=uo(this);for(let t=0,s=this.length;t{e[t]=function(...e){an(),un();const n=uo(this)[t].apply(this,e);return ln(),cn(),n}})),e}function kn(e){const t=uo(this);return _n(t,0,e),t.hasOwnProperty(e)}class Tn{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){const o=this._isReadonly,s=this._isShallow;if("__v_isReactive"===t)return!o;if("__v_isReadonly"===t)return o;if("__v_isShallow"===t)return s;if("__v_raw"===t)return n===(o?s?to:eo:s?Zn:Xn).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const r=h(e);if(!o){if(r&&l(xn,t))return Reflect.get(xn,t,n);if("hasOwnProperty"===t)return kn}const i=Reflect.get(e,t,n);return(m(t)?bn.has(t):wn(t))?i:(o||_n(e,0,t),s?i:yo(i)?r&&x(t)?i:i.value:y(i)?o?so(i):oo(i):i)}}class Pn extends Tn{constructor(e=!1){super(!1,e)}set(e,t,n,o){let s=e[t];if(!this._isShallow){const t=ao(s);if(co(n)||ao(n)||(s=uo(s),n=uo(n)),!h(e)&&yo(s)&&!yo(n))return!t&&(s.value=n,!0)}const r=h(e)&&x(t)?Number(t)e,Ln=e=>Reflect.getPrototypeOf(e);function $n(e,t,n=!1,o=!1){const s=uo(e=e.__v_raw),r=uo(t);n||(E(t,r)&&_n(s,0,t),_n(s,0,r));const{has:i}=Ln(s),a=o?En:n?fo:ho;return i.call(s,t)?a(e.get(t)):i.call(s,r)?a(e.get(r)):void(e!==s&&e.get(t))}function Rn(e,t=!1){const n=this.__v_raw,o=uo(n),s=uo(e);return t||(E(e,s)&&_n(o,0,e),_n(o,0,s)),e===s?n.has(e):n.has(e)||n.has(s)}function jn(e,t=!1){return e=e.__v_raw,!t&&_n(uo(e),0,mn),Reflect.get(e,"size",e)}function Mn(e){e=uo(e);const t=uo(this);return Ln(t).has.call(t,e)||(t.add(e),vn(t,"add",e,e)),this}function Un(e,t){t=uo(t);const n=uo(this),{has:o,get:s}=Ln(n);let r=o.call(n,e);r||(e=uo(e),r=o.call(n,e));const i=s.call(n,e);return n.set(e,t),r?E(t,i)&&vn(n,"set",e,t):vn(n,"add",e,t),this}function Nn(e){const t=uo(this),{has:n,get:o}=Ln(t);let s=n.call(t,e);s||(e=uo(e),s=n.call(t,e)),o&&o.call(t,e);const r=t.delete(e);return s&&vn(t,"delete",e,void 0),r}function Dn(){const e=uo(this),t=0!==e.size,n=e.clear();return t&&vn(e,"clear",void 0,void 0),n}function Bn(e,t){return function(n,o){const s=this,r=s.__v_raw,i=uo(r),a=t?En:e?fo:ho;return!e&&_n(i,0,mn),r.forEach(((e,t)=>n.call(o,a(e),a(t),s)))}}function Fn(e,t,n){return function(...o){const s=this.__v_raw,r=uo(s),i=f(r),a="entries"===e||e===Symbol.iterator&&i,c="keys"===e&&i,u=s[e](...o),l=n?En:t?fo:ho;return!t&&_n(r,0,c?yn:mn),{next(){const{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:a?[l(e[0]),l(e[1])]:l(e),done:t}},[Symbol.iterator](){return this}}}}function qn(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function Hn(){const e={get(e){return $n(this,e)},get size(){return jn(this)},has:Rn,add:Mn,set:Un,delete:Nn,clear:Dn,forEach:Bn(!1,!1)},t={get(e){return $n(this,e,!1,!0)},get size(){return jn(this)},has:Rn,add:Mn,set:Un,delete:Nn,clear:Dn,forEach:Bn(!1,!0)},n={get(e){return $n(this,e,!0)},get size(){return jn(this,!0)},has(e){return Rn.call(this,e,!0)},add:qn("add"),set:qn("set"),delete:qn("delete"),clear:qn("clear"),forEach:Bn(!0,!1)},o={get(e){return $n(this,e,!0,!0)},get size(){return jn(this,!0)},has(e){return Rn.call(this,e,!0)},add:qn("add"),set:qn("set"),delete:qn("delete"),clear:qn("clear"),forEach:Bn(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((s=>{e[s]=Fn(s,!1,!1),n[s]=Fn(s,!0,!1),t[s]=Fn(s,!1,!0),o[s]=Fn(s,!0,!0)})),[e,n,t,o]}const[Vn,Kn,Wn,zn]=Hn();function Jn(e,t){const n=t?e?zn:Wn:e?Kn:Vn;return(t,o,s)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(l(n,o)&&o in t?n:t,o,s)}const Gn={get:Jn(!1,!1)},Qn={get:Jn(!1,!0)},Yn={get:Jn(!0,!1)},Xn=new WeakMap,Zn=new WeakMap,eo=new WeakMap,to=new WeakMap;function no(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>w(e).slice(8,-1))(e))}function oo(e){return ao(e)?e:ro(e,!1,An,Gn,Xn)}function so(e){return ro(e,!0,On,Yn,eo)}function ro(e,t,n,o,s){if(!y(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const r=s.get(e);if(r)return r;const i=no(e);if(0===i)return e;const a=new Proxy(e,2===i?o:n);return s.set(e,a),a}function io(e){return ao(e)?io(e.__v_raw):!(!e||!e.__v_isReactive)}function ao(e){return!(!e||!e.__v_isReadonly)}function co(e){return!(!e||!e.__v_isShallow)}function uo(e){const t=e&&e.__v_raw;return t?uo(t):e}function lo(e){return Object.isExtensible(e)&&((e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})})(e,"__v_skip",!0),e}const ho=e=>y(e)?oo(e):e,fo=e=>y(e)?so(e):e;class po{constructor(e,t,n,o){this.getter=e,this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Zt((()=>e(this._value)),(()=>mo(this,2===this.effect._dirtyLevel?2:3))),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=n}get value(){const e=uo(this);return e._cacheable&&!e.effect.dirty||!E(e._value,e._value=e.effect.run())||mo(e,4),go(e),e.effect._dirtyLevel>=2&&mo(e,2),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function go(e){var t;on&&Yt&&(e=uo(e),hn(Yt,null!=(t=e.dep)?t:e.dep=dn((()=>e.dep=void 0),e instanceof po?e:void 0)))}function mo(e,t=4,n){const o=(e=uo(e)).dep;o&&pn(o,t)}function yo(e){return!(!e||!0!==e.__v_isRef)}function _o(e){return function(e,t){if(yo(e))return e;return new vo(e,t)}(e,!1)}class vo{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:uo(e),this._value=t?e:ho(e)}get value(){return go(this),this._value}set value(e){const t=this.__v_isShallow||co(e)||ao(e);e=t?e:uo(e),E(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:ho(e),mo(this,4))}}function wo(e){return yo(e)?e.value:e}const bo={get:(e,t,n)=>wo(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const s=e[t];return yo(s)&&!yo(n)?(s.value=n,!0):Reflect.set(e,t,n,o)}};function xo(e){return io(e)?e:new Proxy(e,bo)}function So(e,t,n,o){try{return o?e(...o):e()}catch(s){To(s,t,n)}}function ko(e,t,n,o){if(d(e)){const s=So(e,t,n,o);return s&&_(s)&&s.catch((e=>{To(e,t,n)})),s}const s=[];for(let r=0;r>>1,s=Ao[o],r=Bo(s);rnull==e.id?1/0:e.id,Fo=(e,t)=>{const n=Bo(e)-Bo(t);if(0===n){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function qo(e){Io=!1,Po=!0,Ao.sort(Fo);try{for(Oo=0;OoBo(e)-Bo(t)));if(Co.length=0,Eo)return void Eo.push(...e);for(Eo=e,Lo=0;Log(e)?e.trim():e))),n&&(r=o.map($))}let c,u=s[c=C(n)]||s[c=C(P(n))];!u&&i&&(u=s[c=C(A(n))]),u&&ko(u,e,6,r);const l=s[c+"Once"];if(l){if(e.emitted){if(e.emitted[c])return}else e.emitted={};e.emitted[c]=!0,ko(l,e,6,r)}}function Vo(e,t,n=!1){const o=t.emitsCache,s=o.get(e);if(void 0!==s)return s;const r=e.emits;let i={},c=!1;if(!d(e)){const o=e=>{const n=Vo(e,t,!0);n&&(c=!0,a(i,n))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return r||c?(h(r)?r.forEach((e=>i[e]=null)):a(i,r),y(e)&&o.set(e,i),i):(y(e)&&o.set(e,null),null)}function Ko(e,t){return!(!e||!r(t))&&(t=t.slice(2).replace(/Once$/,""),l(e,t[0].toLowerCase()+t.slice(1))||l(e,A(t))||l(e,t))}let Wo=null;function zo(e){const t=Wo;return Wo=e,e&&e.type.__scopeId,t}function Jo(e,t){return e&&(e[t]||e[P(t)]||e[O(P(t))])}const Go={};function Qo(e,t,n){return Yo(e,t,n)}function Yo(e,n,{immediate:s,deep:r,flush:i,once:a,onTrack:u,onTrigger:l}=t){if(n&&a){const e=n;n=(...t)=>{e(...t),T()}}const f=Ys,p=e=>!0===r?e:es(e,!1===r?1:void 0);let g,m,y=!1,_=!1;if(yo(e)?(g=()=>e.value,y=co(e)):io(e)?(g=()=>p(e),y=!0):h(e)?(_=!0,y=e.some((e=>io(e)||co(e))),g=()=>e.map((e=>yo(e)?e.value:io(e)?p(e):d(e)?So(e,f,2):void 0))):g=d(e)?n?()=>So(e,f,2):()=>(m&&m(),ko(e,f,3,[v])):o,n&&r){const e=g;g=()=>es(e())}let v=e=>{m=S.onStop=()=>{So(e,f,4),m=S.onStop=void 0}},w=_?new Array(e.length).fill(Go):Go;const b=()=>{if(S.active&&S.dirty)if(n){const e=S.run();(r||y||(_?e.some(((e,t)=>E(e,w[t]))):E(e,w)))&&(m&&m(),ko(n,f,3,[e,w===Go?void 0:_&&w[0]===Go?[]:w,v]),w=e)}else S.run()};let x;b.allowRecurse=!!n,"sync"===i?x=b:"post"===i?x=()=>Ws(b,f&&f.suspense):(b.pre=!0,f&&(b.id=f.uid),x=()=>Mo(b));const S=new Zt(g,o,x),k=Qt,T=()=>{S.stop(),k&&c(k.effects,S)};return n?s?b():w=S.run():"post"===i?Ws(S.run.bind(S),f&&f.suspense):S.run(),T}function Xo(e,t,n){const o=this.proxy,s=g(e)?e.includes(".")?Zo(o,e):()=>o[e]:e.bind(o,o);let r;d(t)?r=t:(r=t.handler,n=t);const i=tr(this),a=Yo(s,r.bind(o),n);return i(),a}function Zo(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e0){if(n>=t)return e;n++}if((o=o||new Set).has(e))return e;if(o.add(e),yo(e))es(e.value,t,n,o);else if(h(e))for(let s=0;s{es(e,t,n,o)}));else if(b(e))for(const s in e)es(e[s],t,n,o);return e}function ts(){return{app:null,config:{isNativeTag:s,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let ns=0;let os=null;function ss(e,t,n=!1){const o=Ys||Wo;if(o||os){const s=o?null==o.parent?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:os._context.provides;if(s&&e in s)return s[e];if(arguments.length>1)return n&&d(t)?t.call(o&&o.proxy):t}}function rs(e,t){as(e,"a",t)}function is(e,t){as(e,"da",t)}function as(e,t,n=Ys){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(us(t,o,n),n){let e=n.parent;for(;e&&e.parent;)e.parent.vnode.type.__isKeepAlive&&cs(o,t,n,e),e=e.parent}}function cs(e,t,n,o){const s=us(t,e,o,!0);ms((()=>{c(o[t],s)}),n)}function us(e,t,n=Ys,o=!1){if(n){(function(e){return G.indexOf(e)>-1})(e)&&(n=n.root);const s=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;an();const s=tr(n),r=ko(t,n,e,o);return s(),cn(),r});return o?s.unshift(r):s.push(r),r}}const ls=e=>(t,n=Ys)=>(!sr||"sp"===e)&&us(e,((...e)=>t(...e)),n),hs=ls("bm"),fs=ls("m"),ps=ls("bu"),ds=ls("u"),gs=ls("bum"),ms=ls("um"),ys=ls("sp"),_s=ls("rtg"),vs=ls("rtc");function ws(e,t=Ys){us("ec",e,t)}const bs=e=>e?or(e)?ar(e)||e.proxy:bs(e.parent):null,xs=a(Object.create(null),{$:e=>e,$el:e=>e.__$el||(e.__$el={}),$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>bs(e.parent),$root:e=>bs(e.root),$emit:e=>e.emit,$options:e=>Cs(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,Mo(e.update)}),$watch:e=>Xo.bind(e)}),Ss=(e,n)=>e!==t&&!e.__isScriptSetup&&l(e,n),ks={get({_:e},n){const{ctx:o,setupState:s,data:r,props:i,accessCache:a,type:c,appContext:u}=e;let h;if("$"!==n[0]){const c=a[n];if(void 0!==c)switch(c){case 1:return s[n];case 2:return r[n];case 4:return o[n];case 3:return i[n]}else{if(Ss(s,n))return a[n]=1,s[n];if(r!==t&&l(r,n))return a[n]=2,r[n];if((h=e.propsOptions[0])&&l(h,n))return a[n]=3,i[n];if(o!==t&&l(o,n))return a[n]=4,o[n];Ps&&(a[n]=0)}}const f=xs[n];let p,d;return f?("$attrs"===n&&_n(e,0,n),f(e)):(p=c.__cssModules)&&(p=p[n])?p:o!==t&&l(o,n)?(a[n]=4,o[n]):(d=u.config.globalProperties,l(d,n)?d[n]:void 0)},set({_:e},n,o){const{data:s,setupState:r,ctx:i}=e;return Ss(r,n)?(r[n]=o,!0):s!==t&&l(s,n)?(s[n]=o,!0):!l(e.props,n)&&(("$"!==n[0]||!(n.slice(1)in e))&&(i[n]=o,!0))},has({_:{data:e,setupState:n,accessCache:o,ctx:s,appContext:r,propsOptions:i}},a){let c;return!!o[a]||e!==t&&l(e,a)||Ss(n,a)||(c=i[0])&&l(c,a)||l(s,a)||l(xs,a)||l(r.config.globalProperties,a)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:l(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Ts(e){return h(e)?e.reduce(((e,t)=>(e[t]=null,e)),{}):e}let Ps=!0;function Is(e){const t=Cs(e),n=e.proxy,s=e.ctx;Ps=!1,t.beforeCreate&&As(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:a,watch:c,provide:u,inject:l,created:f,beforeMount:p,mounted:g,beforeUpdate:m,updated:_,activated:v,deactivated:w,beforeDestroy:b,beforeUnmount:x,destroyed:S,unmounted:k,render:T,renderTracked:P,renderTriggered:I,errorCaptured:A,serverPrefetch:O,expose:C,inheritAttrs:E,components:L,directives:$,filters:R}=t;if(l&&function(e,t,n=o){h(e)&&(e=Rs(e));for(const o in e){const n=e[o];let s;s=y(n)?"default"in n?ss(n.from||o,n.default,!0):ss(n.from||o):ss(n),yo(s)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e}):t[o]=s}}(l,s,null),a)for(const o in a){const e=a[o];d(e)&&(s[o]=e.bind(n))}if(r){const t=r.call(n,n);y(t)&&(e.data=oo(t))}if(Ps=!0,i)for(const h in i){const e=i[h],t=d(e)?e.bind(n,n):d(e.get)?e.get.bind(n,n):o,r=!d(e)&&d(e.set)?e.set.bind(n):o,a=cr({get:t,set:r});Object.defineProperty(s,h,{enumerable:!0,configurable:!0,get:()=>a.value,set:e=>a.value=e})}if(c)for(const o in c)Os(c[o],s,n,o);if(u){const e=d(u)?u.call(n):u;Reflect.ownKeys(e).forEach((t=>{!function(e,t){if(Ys){let n=Ys.provides;const o=Ys.parent&&Ys.parent.provides;o===n&&(n=Ys.provides=Object.create(o)),n[e]=t,"app"===Ys.type.mpType&&Ys.appContext.app.provide(e,t)}}(t,e[t])}))}function j(e,t){h(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(f&&As(f,e,"c"),j(hs,p),j(fs,g),j(ps,m),j(ds,_),j(rs,v),j(is,w),j(ws,A),j(vs,P),j(_s,I),j(gs,x),j(ms,k),j(ys,O),h(C))if(C.length){const t=e.exposed||(e.exposed={});C.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});T&&e.render===o&&(e.render=T),null!=E&&(e.inheritAttrs=E),L&&(e.components=L),$&&(e.directives=$),e.ctx.$onApplyOptions&&e.ctx.$onApplyOptions(t,e,n)}function As(e,t,n){ko(h(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function Os(e,t,n,o){const s=o.includes(".")?Zo(n,o):()=>n[o];if(g(e)){const n=t[e];d(n)&&Qo(s,n)}else if(d(e))Qo(s,e.bind(n));else if(y(e))if(h(e))e.forEach((e=>Os(e,t,n,o)));else{const o=d(e.handler)?e.handler.bind(n):t[e.handler];d(o)&&Qo(s,o,e)}}function Cs(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:s,optionsCache:r,config:{optionMergeStrategies:i}}=e.appContext,a=r.get(t);let c;return a?c=a:s.length||n||o?(c={},s.length&&s.forEach((e=>Es(c,e,i,!0))),Es(c,t,i)):c=t,y(t)&&r.set(t,c),c}function Es(e,t,n,o=!1){const{mixins:s,extends:r}=t;r&&Es(e,r,n,!0),s&&s.forEach((t=>Es(e,t,n,!0)));for(const i in t)if(o&&"expose"===i);else{const o=Ls[i]||n&&n[i];e[i]=o?o(e[i],t[i]):t[i]}return e}const Ls={data:$s,props:Us,emits:Us,methods:Ms,computed:Ms,beforeCreate:js,created:js,beforeMount:js,mounted:js,beforeUpdate:js,updated:js,beforeDestroy:js,beforeUnmount:js,destroyed:js,unmounted:js,activated:js,deactivated:js,errorCaptured:js,serverPrefetch:js,components:Ms,directives:Ms,watch:function(e,t){if(!e)return t;if(!t)return e;const n=a(Object.create(null),e);for(const o in t)n[o]=js(e[o],t[o]);return n},provide:$s,inject:function(e,t){return Ms(Rs(e),Rs(t))}};function $s(e,t){return t?e?function(){return a(d(e)?e.call(this,this):e,d(t)?t.call(this,this):t)}:t:e}function Rs(e){if(h(e)){const t={};for(let n=0;n{p=!0;const[t,n]=Fs(e,o,!0);a(u,t),n&&f.push(...n)};!s&&o.mixins.length&&o.mixins.forEach(t),e.extends&&t(e.extends),e.mixins&&e.mixins.forEach(t)}if(!c&&!p)return y(e)&&r.set(e,n),n;if(h(c))for(let n=0;n-1,o[1]=n<0||t-1||l(o,"default"))&&f.push(e)}}}const g=[u,f];return y(e)&&r.set(e,g),g}function qs(e){return"$"!==e[0]&&!S(e)}function Hs(e){if(null===e)return"null";if("function"==typeof e)return e.name||"";if("object"==typeof e){return e.constructor&&e.constructor.name||""}return""}function Vs(e,t){return Hs(e)===Hs(t)}function Ks(e,t){return h(t)?t.findIndex((t=>Vs(t,e))):d(t)&&Vs(t,e)?0:-1}const Ws=No;function zs(e){return e?io(t=e)||ao(t)||"__vInternal"in e?a({},e):e:null;var t}const Js=ts();let Gs=0;function Qs(e,n,o){const s=e.type,r=(n?n.appContext:e.appContext)||Js,i={uid:Gs++,vnode:e,type:s,parent:n,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,scope:new Xt(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:n?n.provides:Object.create(r.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Fs(s,r),emitsOptions:Vo(s,r),emit:null,emitted:null,propsDefaults:t,inheritAttrs:s.inheritAttrs,ctx:t,data:t,props:t,attrs:t,slots:t,refs:t,setupState:t,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:o,suspenseId:o?o.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=n?n.root:i,i.emit=Ho.bind(null,i),e.ce&&e.ce(i),i}let Ys=null;const Xs=()=>Ys||Wo;let Zs,er;Zs=e=>{Ys=e},er=e=>{sr=e};const tr=e=>{const t=Ys;return Zs(e),e.scope.on(),()=>{e.scope.off(),Zs(t)}},nr=()=>{Ys&&Ys.scope.off(),Zs(null)};function or(e){return 4&e.vnode.shapeFlag}let sr=!1;function rr(e,t=!1){t&&er(t);const{props:n}=e.vnode,o=or(e);Ns(e,n,o,t);const s=o?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=lo(new Proxy(e.ctx,ks));const{setup:o}=n;if(o){const t=e.setupContext=o.length>1?function(e){const t=t=>{e.exposed=t||{}};return{get attrs(){return function(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get:(t,n)=>(_n(e,0,"$attrs"),t[n])}))}(e)},slots:e.slots,emit:e.emit,expose:t}}(e):null,n=tr(e);an();const s=So(o,e,0,[e.props,t]);cn(),n(),_(s)?s.then(nr,nr):function(e,t,n){d(t)?e.render=t:y(t)&&(e.setupState=xo(t));ir(e)}(e,s)}else ir(e)}(e):void 0;return t&&er(!1),s}function ir(e,t,n){const s=e.type;e.render||(e.render=s.render||o);{const t=tr(e);an();try{Is(e)}finally{cn(),t()}}}function ar(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(xo(lo(e.exposed)),{get:(t,n)=>n in t?t[n]:e.proxy[n],has:(e,t)=>t in e||t in xs}))}const cr=(e,t)=>{const n=function(e,t,n=!1){let s,r;const i=d(e);return i?(s=e,r=o):(s=e.get,r=e.set),new po(s,r,i||!r,n)}(e,0,sr);return n},ur="3.4.21";function lr(e){return wo(e)}const hr="[object Array]",fr="[object Object]";function pr(e,t){const n={};return dr(e,t),gr(e,t,"",n),n}function dr(e,t){if((e=lr(e))===t)return;const n=w(e),o=w(t);if(n==fr&&o==fr)for(let s in t){const n=e[s];void 0===n?e[s]=null:dr(n,t[s])}else n==hr&&o==hr&&e.length>=t.length&&t.forEach(((t,n)=>{dr(e[n],t)}))}function gr(e,t,n,o){if((e=lr(e))===t)return;const s=w(e),r=w(t);if(s==fr)if(r!=fr||Object.keys(e).length{gr(e,r[t],(""==n?"":n+".")+i+"["+t+"]",o)}));else if(a==fr)if(c!=fr||Object.keys(s).length{gr(e,t[s],n+"["+s+"]",o)})):mr(o,n,e)}function mr(e,t,n){e[t]=n}function yr(e){const t=e.ctx.__next_tick_callbacks;if(t&&t.length){const e=t.slice(0);t.length=0;for(let t=0;t{t?So(t.bind(e.proxy),e,14):o&&o(e.proxy)})),new Promise((e=>{o=e}))}function vr(e,t){const n=typeof(e=lr(e));if("object"===n&&null!==e){let n=t.get(e);if(void 0!==n)return n;if(h(e)){const o=e.length;n=new Array(o),t.set(e,n);for(let s=0;s{o[e]=n[e]})),o}(s,r));Object.keys(i).length?(o.__next_tick_pending=!0,s.setData(i,(()=>{o.__next_tick_pending=!1,yr(e)})),Do()):yr(e)}}function xr(e,t,n){t.appContext.config.globalProperties.$applyOptions(e,t,n);const o=e.computed;if(o){const e=Object.keys(o);if(e.length){const n=t.ctx;n.$computedKeys||(n.$computedKeys=[]),n.$computedKeys.push(...e)}}delete t.ctx.$onApplyOptions}function Sr(e,t=!1){const{setupState:n,$templateRefs:o,ctx:{$scope:s,$mpPlatform:r}}=e;if("mp-alipay"===r)return;if(!o||!s)return;if(t)return o.forEach((e=>kr(e,null,n)));const i="mp-baidu"===r||"mp-toutiao"===r,a=e=>{const t=(s.selectAllComponents(".r")||[]).concat(s.selectAllComponents(".r-i-f")||[]);return e.filter((e=>{const o=function(e,t){const n=e.find((e=>e&&(e.properties||e.props).uI===t));if(n){const e=n.$vm;return e?ar(e.$)||e:function(e){y(e)&&lo(e);return e}(n)}return null}(t,e.i);return!(!i||null!==o)||(kr(e,o,n),!1)}))},c=()=>{const t=a(o);t.length&&e.proxy&&e.proxy.$scope&&e.proxy.$scope.setData({r1:1},(()=>{a(t)}))};s._$setRef?s._$setRef(c):_r(e,c)}function kr({r:e,f:t},n,o){if(d(e))e(n,{});else{const s=g(e),r=yo(e);if(s||r)if(t){if(!r)return;h(e.value)||(e.value=[]);const t=e.value;if(-1===t.indexOf(n)){if(t.push(n),!n)return;gs((()=>c(t,n)),n.$)}}else s?l(o,e)&&(o[e]=n):yo(e)&&(e.value=n)}}const Tr=No;function Pr(e,t){const n=e.component=Qs(e,t.parentComponent,null);return n.ctx.$onApplyOptions=xr,n.ctx.$children=[],"app"===t.mpType&&(n.render=o),t.onBeforeSetup&&t.onBeforeSetup(n,t),rr(n),t.parentComponent&&n.proxy&&t.parentComponent.ctx.$children.push(ar(n)||n.proxy),function(e){const t=Or.bind(e);e.$updateScopedSlots=()=>jo((()=>Mo(t)));const n=()=>{if(e.isMounted){const{next:t,bu:n,u:o}=e;Cr(e,!1),an(),Do(),cn(),n&&L(n),Cr(e,!0),br(e,Ir(e)),o&&Tr(o)}else gs((()=>{Sr(e,!0)}),e),br(e,Ir(e))},s=e.effect=new Zt(n,o,(()=>Mo(r)),e.scope),r=e.update=()=>{s.dirty&&s.run()};r.id=e.uid,Cr(e,!0),r()}(n),n.proxy}function Ir(e){const{type:t,vnode:n,proxy:o,withProxy:s,props:i,propsOptions:[a],slots:c,attrs:u,emit:l,render:h,renderCache:f,data:p,setupState:d,ctx:g,uid:m,appContext:{app:{config:{globalProperties:{pruneComponentPropsCache:y}}}},inheritAttrs:_}=e;let v;e.$templateRefs=[],e.$ei=0,y(m),e.__counter=0===e.__counter?1:0;const w=zo(e);try{if(4&n.shapeFlag){Ar(_,i,a,u);const e=s||o;v=h.call(e,e,f,i,d,p,g)}else{Ar(_,i,a,t.props?u:(e=>{let t;for(const n in e)("class"===n||"style"===n||r(n))&&((t||(t={}))[n]=e[n]);return t})(u));const e=t;v=e.length>1?e(i,{attrs:u,slots:c,emit:l}):e(i,null)}}catch(b){To(b,e,1),v=!1}return Sr(e),zo(w),v}function Ar(e,t,n,o){if(t&&o&&!1!==e){const e=Object.keys(o).filter((e=>"class"!==e&&"style"!==e));if(!e.length)return;n&&e.some(i)?e.forEach((e=>{i(e)&&e.slice(9)in n||(t[e]=o[e])})):e.forEach((e=>t[e]=o[e]))}}function Or(){const e=this.$scopedSlotsData;if(!e||0===e.length)return;const t=this.ctx.$scope,n=t.data,o=Object.create(null);e.forEach((({path:e,index:t,data:s})=>{const r=K(n,e),i=g(t)?`${e}.${t}`:`${e}[${t}]`;if(void 0===r||void 0===r[t])o[i]=s;else{const e=pr(s,r[t]);Object.keys(e).forEach((t=>{o[i+"."+t]=e[t]}))}})),e.length=0,Object.keys(o).length&&t.setData(o)}function Cr({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}const Er=function(e,t=null){d(e)||(e=a({},e)),null==t||y(t)||(t=null);const n=ts(),o=new WeakSet,s=n.app={_uid:ns++,_component:e,_props:t,_container:null,_context:n,_instance:null,version:ur,get config(){return n.config},set config(e){},use:(e,...t)=>(o.has(e)||(e&&d(e.install)?(o.add(e),e.install(s,...t)):d(e)&&(o.add(e),e(s,...t))),s),mixin:e=>(n.mixins.includes(e)||n.mixins.push(e),s),component:(e,t)=>t?(n.components[e]=t,s):n.components[e],directive:(e,t)=>t?(n.directives[e]=t,s):n.directives[e],mount(){},unmount(){},provide:(e,t)=>(n.provides[e]=t,s),runWithContext(e){const t=os;os=s;try{return e()}finally{os=t}}};return s};function Lr(e,t=null){("undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof my?my:void 0).__VUE__=!0;const n=Er(e,t),s=n._context;s.config.globalProperties.$nextTick=function(e){return _r(this.$,e)};const r=e=>(e.appContext=s,e.shapeFlag=6,e),i=function(e,t){return Pr(r(e),t)},a=function(e){return e&&function(e){const{bum:t,scope:n,update:o,um:s}=e;t&&L(t),n.stop(),o&&(o.active=!1),s&&Tr(s),Tr((()=>{e.isUnmounted=!0}))}(e.$)};return n.mount=function(){e.render=o;const t=Pr(r({type:e}),{mpType:"app",mpInstance:null,parentComponent:null,slots:[],props:null});return n._instance=t.$,t.$app=n,t.$createComponent=i,t.$destroyComponent=a,s.$appInstance=t,t},n.unmount=function(){},n}function $r(e,t,n,o){d(t)&&us(e,t.bind(n),o)}function Rr(e,t,n){!function(e,t,n){const o=e.mpType||n.$mpType;o&&"component"!==o&&Object.keys(e).forEach((o=>{if(X(o,e[o],!1)){const s=e[o];h(s)?s.forEach((e=>$r(o,e,n,t))):$r(o,s,n,t)}}))}(e,t,n)}function jr(e,t,n){return e[t]=n}function Mr(e,...t){const n=this[e];return n?n(...t):(console.error(`method ${e} not found`),null)}function Ur(e){return function(t,n,o){if(!n)throw t;const s=e._instance;if(!s||!s.proxy)throw t;s.proxy.$callHook("onError",t)}}function Nr(e,t){return e?[...new Set([].concat(e,t))]:t}let Dr;const Br="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Fr=/^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;function qr(){const e=Gt.getStorageSync("uni_id_token")||"",t=e.split(".");if(!e||3!==t.length)return{uid:null,role:[],permission:[],tokenExpired:0};let n;try{n=JSON.parse((o=t[1],decodeURIComponent(Dr(o).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))))}catch(s){throw new Error("获取当前用户信息出错,详细错误信息为:"+s.message)}var o;return n.tokenExpired=1e3*n.exp,delete n.exp,delete n.iat,n}function Hr(e){const t=e._context.config;var n;t.errorHandler=te(e,Ur),n=t.optionMergeStrategies,Q.forEach((e=>{n[e]=Nr}));const o=t.globalProperties;!function(e){e.uniIDHasRole=function(e){const{role:t}=qr();return t.indexOf(e)>-1},e.uniIDHasPermission=function(e){const{permission:t}=qr();return this.uniIDHasRole("admin")||t.indexOf(e)>-1},e.uniIDTokenValid=function(){const{tokenExpired:e}=qr();return e>Date.now()}}(o),o.$set=jr,o.$applyOptions=Rr,o.$callMethod=Mr,Gt.invokeCreateVueAppHook(e)}Dr="function"!=typeof atob?function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!Fr.test(e))throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");var t;e+="==".slice(2-(3&e.length));for(var n,o,s="",r=0;r>16&255):64===o?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return s}:atob;const Vr=Object.create(null);function Kr(e){delete Vr[e]}function Wr(e){if(!e)return;const[t,n]=e.split(",");return Vr[t]?Vr[t][parseInt(n)]:void 0}var zr={install(e){Hr(e),e.config.globalProperties.pruneComponentPropsCache=Kr;const t=e.mount;e.mount=function(n){const o=t.call(e,n),s=function(){const e="createApp";if("undefined"!=typeof global&&void 0!==global[e])return global[e];if("undefined"!=typeof my)return my[e]}();return s?s(o):"undefined"!=typeof createMiniProgramApp&&createMiniProgramApp(o),o}}};function Jr(e,t){const n=Xs(),s=n.ctx,r=void 0===t||"mp-weixin"!==s.$mpPlatform&&"mp-qq"!==s.$mpPlatform&&"mp-xhs"!==s.$mpPlatform||!g(t)&&"number"!=typeof t?"":"_"+t,i="e"+n.$ei+++r,c=s.$scope;if(!e)return delete c[i],i;const u=c[i];return u?u.value=e:c[i]=function(e,t){const n=e=>{var s;(s=e).type&&s.target&&(s.preventDefault=o,s.stopPropagation=o,s.stopImmediatePropagation=o,l(s,"detail")||(s.detail={}),l(s,"markerId")&&(s.detail="object"==typeof s.detail?s.detail:{},s.detail.markerId=s.markerId),b(s.detail)&&l(s.detail,"checked")&&!l(s.detail,"value")&&(s.detail.value=s.detail.checked),b(s.detail)&&(s.target=a({},s.target,s.detail)));let r=[e];e.detail&&e.detail.__args__&&(r=e.detail.__args__);const i=n.value,c=()=>ko(function(e,t){if(h(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n&&n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e(t)))}return t}(e,i),t,5,r),u=e.target,f=!!u&&(!!u.dataset&&"true"===String(u.dataset.eventsync));if(!Gr.includes(e.type)||f){const t=c();if("input"===e.type&&(h(t)||_(t)))return;return t}setTimeout(c)};return n.value=e,n}(e,n),i}const Gr=["tap","longpress","longtap","transitionend","animationstart","animationiteration","animationend","touchforcechange"];function Qr(e,t={},n){const o=Xs(),{parent:s,isMounted:r,ctx:{$scope:i}}=o,a=(i.properties||i.props).uI;if(!a)return;if(!s&&!r)return void fs((()=>{Qr(e,t,n)}),o);const c=function(e,t){let n=t.parent;for(;n;){const t=n.$ssi;if(t&&t[e])return t[e];n=n.parent}}(a,o);c&&c(e,t,n)}function Yr(e){return g(e)?e:function(e){let t="";if(!e||g(e))return t;for(const n in e)t+=`${n.startsWith("--")?n:A(n)}:${e[n]};`;return t}(j(e))}const Xr=function(e,t=null){return e&&(e.mpType="app"),Lr(e,t).use(zr)},Zr=["createSelectorQuery","createIntersectionObserver","selectAllComponents","selectComponent"];function ei(e,t){const n=e.ctx;n.mpType=t.mpType,n.$mpType=t.mpType,n.$mpPlatform="mp-weixin",n.$scope=t.mpInstance,n.$mp={},n._self={},e.slots={},h(t.slots)&&t.slots.length&&(t.slots.forEach((t=>{e.slots[t]=!0})),e.slots.d&&(e.slots.default=!0)),n.getOpenerEventChannel=function(){return t.mpInstance.getOpenerEventChannel()},n.$hasHook=ti,n.$callHook=ni,e.emit=function(e,t){return function(n,...o){const s=t.$scope;if(s&&n){const e={__args__:o};s.triggerEvent(n,e)}return e.apply(this,[n,...o])}}(e.emit,n)}function ti(e){const t=this.$[e];return!(!t||!t.length)}function ni(e,t){"mounted"===e&&(ni.call(this,"bm"),this.$.isMounted=!0,e="m");const n=this.$[e];return n&&((e,t)=>{let n;for(let o=0;o{X(n,e[n])&&t.add(n)}));{const{extends:n,mixins:o}=e;o&&o.forEach((e=>si(e,t))),n&&si(n,t)}}return t}function ri(e,t,n){-1!==n.indexOf(t)||l(e,t)||(e[t]=function(e){return this.$vm&&this.$vm.$callHook(t,e)})}const ii=["onReady"];function ai(e,t,n=ii){t.forEach((t=>ri(e,t,n)))}function ci(e,t,n=ii){si(t).forEach((t=>ri(e,t,n)))}const ui=V((()=>{const e=[],t=d(getApp)&&getApp({allowDefault:!0});if(t&&t.$vm&&t.$vm.$){const n=t.$vm.$.appContext.mixins;if(h(n)){const t=Object.keys(Y);n.forEach((n=>{t.forEach((t=>{l(n,t)&&!e.includes(t)&&e.push(t)}))}))}}return e}));const li=["onShow","onHide","onError","onThemeChange","onPageNotFound","onUnhandledRejection"];function hi(e,t){const n=e.$,o={globalData:e.$options&&e.$options.globalData||{},$vm:e,onLaunch(t){this.$vm=e;const o=n.ctx;this.$vm&&o.$scope||(ei(n,{mpType:"app",mpInstance:this,slots:[]}),o.globalData=this.globalData,e.$callHook("onLaunch",t))}},{onError:s}=n;s&&(n.appContext.config.errorHandler=t=>{e.$callHook("onError",t)}),function(e){const t=_o(le(wx.getSystemInfoSync().language)||"en");Object.defineProperty(e,"$locale",{get:()=>t.value,set(e){t.value=e}})}(e);const r=e.$.type;ai(o,li),ci(o,r);{const e=r.methods;e&&a(o,e)}return t&&t.parse(o),o}function fi(e,t){if(d(e.onLaunch)){const t=wx.getLaunchOptionsSync&&wx.getLaunchOptionsSync();e.onLaunch(t)}d(e.onShow)&&wx.onAppShow&&wx.onAppShow((e=>{t.$callHook("onShow",e)})),d(e.onHide)&&wx.onAppHide&&wx.onAppHide((e=>{t.$callHook("onHide",e)}))}const pi=["externalClasses"];const di=/_(.*)_worklet_factory_/;function gi(e,t){const n=e.$children;for(let s=n.length-1;s>=0;s--){const e=n[s];if(e.$scope._$vueId===t)return e}let o;for(let s=n.length-1;s>=0;s--)if(o=gi(n[s],t),o)return o}const mi=["eO","uR","uRIF","uI","uT","uP","uS"];function yi(e){e.properties||(e.properties={}),a(e.properties,function(e,t=!1){const n={};return t||(mi.forEach((e=>{n[e]={type:null,value:""}})),n.uS={type:null,value:[],observer:function(e){const t=Object.create(null);e&&e.forEach((e=>{t[e]=!0})),this.setData({$slots:t})}}),e.behaviors&&e.behaviors.includes("wx://form-field")&&(e.properties&&e.properties.name||(n.name={type:null,value:""}),e.properties&&e.properties.value||(n.value={type:null,value:""})),n}(e),function(e){const t={};return e&&e.virtualHost&&(t.virtualHostStyle={type:null,value:""},t.virtualHostClass={type:null,value:""}),t}(e.options))}const _i=[String,Number,Boolean,Object,Array,null];function vi(e,t){const n=function(e,t){return h(e)&&1===e.length?e[0]:e}(e);return-1!==_i.indexOf(n)?n:null}function wi(e,t){return(t?function(e){const t={};b(e)&&Object.keys(e).forEach((n=>{-1===mi.indexOf(n)&&(t[n]=e[n])}));return t}(e):Wr(e.uP))||{}}function bi(e){const t=function(){const e=this.properties.uP;e&&(this.$vm?function(e,t){const n=uo(t.props),o=Wr(e)||{};xi(n,o)&&(!function(e,t,n,o){const{props:s,attrs:r,vnode:{patchFlag:i}}=e,a=uo(s),[c]=e.propsOptions;let u=!1;if(!(o||i>0)||16&i){let o;Ds(e,t,s,r)&&(u=!0);for(const r in a)t&&(l(t,r)||(o=A(r))!==r&&l(t,o))||(c?!n||void 0===n[r]&&void 0===n[o]||(s[r]=Bs(c,a,r,void 0,e,!0)):delete s[r]);if(r!==a)for(const e in r)t&&l(t,e)||(delete r[e],u=!0)}else if(8&i){const n=e.vnode.dynamicProps;for(let o=0;o-1&&function(e){const t=Ao.indexOf(e);t>Oo&&Ao.splice(t,1)}(t.update),t.update());var s}(e,this.$vm.$):"m"===this.properties.uT&&function(e,t){const n=t.properties,o=Wr(e)||{};xi(n,o,!1)&&t.setData(o)}(e,this))};e.observers||(e.observers={}),e.observers.uP=t}function xi(e,t,n=!0){const o=Object.keys(t);if(n&&o.length!==Object.keys(e).length)return!0;for(let s=0;s{o.push(e.replace("uni://","wx://")),"uni://form-field"===e&&(h(n)?(n.push("name"),n.push("modelValue")):(n.name={type:String,default:""},n.modelValue={type:[String,Number,Boolean,Array,Object,Date],default:""}))})),o}(t)}function ki(e,{parse:t,mocks:n,isPage:o,initRelation:s,handleLink:r,initLifetimes:i}){e=e.default||e;const c={multipleSlots:!0,addGlobalClass:!0,pureDataPattern:/^uP$/};h(e.mixins)&&e.mixins.forEach((e=>{y(e.options)&&a(c,e.options)})),e.options&&a(c,e.options);const u={options:c,lifetimes:i({mocks:n,isPage:o,initRelation:s,vueOptions:e}),pageLifetimes:{show(){this.$vm&&this.$vm.$callHook("onPageShow")},hide(){this.$vm&&this.$vm.$callHook("onPageHide")},resize(e){this.$vm&&this.$vm.$callHook("onPageResize",e)}},methods:{__l:r}};var f,p,d,g;return Si(u,e),yi(u),bi(u),function(e,t){pi.forEach((n=>{l(t,n)&&(e[n]=t[n])}))}(u,e),f=u.methods,p=e.wxsCallMethods,h(p)&&p.forEach((e=>{f[e]=function(t){return this.$vm[e](t)}})),d=u.methods,(g=e.methods)&&Object.keys(g).forEach((e=>{const t=e.match(di);if(t){const n=t[1];d[e]=g[e],d[n]=g[n]}})),t&&t(u,{handleLink:r}),u}let Ti,Pi;function Ii(){return getApp().$vm}function Ai(e,t){const{parse:n,mocks:o,isPage:s,initRelation:r,handleLink:i,initLifetimes:a}=t,c=ki(e,{mocks:o,isPage:s,initRelation:r,handleLink:i,initLifetimes:a});!function({properties:e},t){h(t)?t.forEach((t=>{e[t]={type:String,value:""}})):b(t)&&Object.keys(t).forEach((n=>{const o=t[n];if(b(o)){let t=o.default;d(t)&&(t=t());const s=o.type;o.type=vi(s),e[n]={type:o.type,value:t}}else e[n]={type:vi(o)}}))}(c,(e.default||e).props);const u=c.methods;return u.onLoad=function(e){var t;return this.options=e,this.$page={fullPath:(t=this.route+J(e),function(e){return 0===e.indexOf("/")}(t)?t:"/"+t)},this.$vm&&this.$vm.$callHook("onLoad",e)},ai(u,oi),ci(u,e),function(e,t){if(!t)return;Object.keys(Y).forEach((n=>{t&Y[n]&&ri(e,n,[])}))}(u,e.__runtimeHooks),ai(u,ui()),n&&n(c,{handleLink:i}),c}const Oi=Page,Ci=Component;function Ei(e){const t=e.triggerEvent,n=function(n,...o){return t.apply(e,[(s=n,P(s.replace(H,"-"))),...o]);var s};try{e.triggerEvent=n}catch(o){e._triggerEvent=n}}function Li(e,t,n){const o=t[e];t[e]=o?function(...e){return Ei(this),o.apply(this,e)}:function(){Ei(this)}}Page=function(e){return Li("onLoad",e),Oi(e)},Component=function(e){Li("created",e);return e.properties&&e.properties.uP||(yi(e),bi(e)),Ci(e)};var $i=Object.freeze({__proto__:null,handleLink:function(e){const t=e.detail||e.value,n=t.vuePid;let o;n&&(o=gi(this.$vm,n)),o||(o=this.$vm),t.parent=o},initLifetimes:function({mocks:e,isPage:t,initRelation:n,vueOptions:o}){return{attached(){let s=this.properties;!function(e,t){if(!e)return;const n=e.split(","),o=n.length;1===o?t._$vueId=n[0]:2===o&&(t._$vueId=n[0],t._$vuePid=n[1])}(s.uI,this);const r={vuePid:this._$vuePid};n(this,r);const i=this,a=t(i);let c=s;this.$vm=function(e,t){Ti||(Ti=Ii().$createComponent);const n=Ti(e,t);return ar(n.$)||n}({type:o,props:wi(c,a)},{mpType:a?"page":"component",mpInstance:i,slots:s.uS||{},parentComponent:r.parent&&r.parent.$,onBeforeSetup(t,n){!function(e,t){Object.defineProperty(e,"refs",{get(){const e={};return function(e,t,n){e.selectAllComponents(t).forEach((e=>{const t=e.properties.uR;n[t]=e.$vm||e}))}(t,".r",e),t.selectAllComponents(".r-i-f").forEach((t=>{const n=t.properties.uR;n&&(e[n]||(e[n]=[]),e[n].push(t.$vm||t))})),e}})}(t,i),function(e,t,n){const o=e.ctx;n.forEach((n=>{l(t,n)&&(e[n]=o[n]=t[n])}))}(t,i,e),function(e,t){ei(e,t);const n=e.ctx;Zr.forEach((e=>{n[e]=function(...t){const o=n.$scope;if(o&&o[e])return o[e].apply(o,t)}}))}(t,n)}}),a||function(e){const t=e.$options;h(t.behaviors)&&t.behaviors.includes("uni://form-field")&&e.$watch("modelValue",(()=>{e.$scope&&e.$scope.setData({name:e.name,value:e.modelValue})}),{immediate:!0})}(this.$vm)},ready(){this.$vm&&(this.$vm.$callHook("mounted"),this.$vm.$callHook("onReady"))},detached(){var e;this.$vm&&(Kr(this.$vm.$.uid),e=this.$vm,Pi||(Pi=Ii().$destroyComponent),Pi(e))}}},initRelation:function(e,t){e.triggerEvent("__l",t)},isPage:function(e){return!!e.route},mocks:["__route__","__wxExparserNodeId__","__wxWebviewId__"]});const Ri=function(e){return App(hi(e,ji))};var ji;const Mi=(Ui=$i,function(e){return Component(Ai(e,Ui))});var Ui;const Ni=function(e){return function(t){return Component(ki(t,e))}}($i),Di=function(e){return function(t){fi(hi(t,e),t)}}(),Bi=function(e){return function(t){const n=hi(t,e),o=d(getApp)&&getApp({allowDefault:!0});if(!o)return;t.$.ctx.$scope=o;const s=o.globalData;s&&Object.keys(n.globalData).forEach((e=>{l(s,e)||(s[e]=n.globalData[e])})),Object.keys(n).forEach((e=>{l(o,e)||(o[e]=n[e])})),fi(n,t)}}();wx.createApp=global.createApp=Ri,wx.createPage=Mi,wx.createComponent=Ni,wx.createPluginApp=global.createPluginApp=Di,wx.createSubpackageApp=global.createSubpackageApp=Bi;function Fi(e,t){Object.keys(e).forEach((function(n){return t(e[n],n)}))}function qi(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function Hi(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;Ki(e,n,[],e._modules.root,!0),Vi(e,n,t)}function Vi(e,t,n){var o=e._state,s=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var r=e._wrappedGetters,i={},a={},c=new Xt(!0);c.run((function(){Fi(r,(function(t,n){i[n]=function(e,t){return function(){return e(t)}}(t,e),a[n]=cr((function(){return i[n]()})),Object.defineProperty(e.getters,n,{get:function(){return a[n].value},enumerable:!0})}))})),e._state=oo({data:t}),e._scope=c,e.strict&&function(e){Qo((function(){return e._state.data}),(function(){}),{deep:!0,flush:"sync"})}(e),o&&n&&e._withCommit((function(){o.data=null})),s&&s.stop()}function Ki(e,t,n,o,s){var r=!n.length,i=e._modules.getNamespace(n);if(o.namespaced&&(e._modulesNamespaceMap[i],e._modulesNamespaceMap[i]=o),!r&&!s){var a=Wi(t,n.slice(0,-1)),c=n[n.length-1];e._withCommit((function(){a[c]=o.state}))}var u=o.context=function(e,t,n){var o=""===t,s={dispatch:o?e.dispatch:function(n,o,s){var r=zi(n,o,s),i=r.payload,a=r.options,c=r.type;return a&&a.root||(c=t+c),e.dispatch(c,i)},commit:o?e.commit:function(n,o,s){var r=zi(n,o,s),i=r.payload,a=r.options,c=r.type;a&&a.root||(c=t+c),e.commit(c,i,a)}};return Object.defineProperties(s,{getters:{get:o?function(){return e.getters}:function(){return function(e,t){if(!e._makeLocalGettersCache[t]){var n={},o=t.length;Object.keys(e.getters).forEach((function(s){if(s.slice(0,o)===t){var r=s.slice(o);Object.defineProperty(n,r,{get:function(){return e.getters[s]},enumerable:!0})}})),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}(e,t)}},state:{get:function(){return Wi(e.state,n)}}}),s}(e,i,n);o.forEachMutation((function(t,n){!function(e,t,n,o){(e._mutations[t]||(e._mutations[t]=[])).push((function(t){n.call(e,o.state,t)}))}(e,i+n,t,u)})),o.forEachAction((function(t,n){var o=t.root?n:i+n,s=t.handler||t;!function(e,t,n,o){(e._actions[t]||(e._actions[t]=[])).push((function(t){var s,r=n.call(e,{dispatch:o.dispatch,commit:o.commit,getters:o.getters,state:o.state,rootGetters:e.getters,rootState:e.state},t);return(s=r)&&"function"==typeof s.then||(r=Promise.resolve(r)),e._devtoolHook?r.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):r}))}(e,o,s,u)})),o.forEachGetter((function(t,n){!function(e,t,n,o){if(e._wrappedGetters[t])return;e._wrappedGetters[t]=function(e){return n(o.state,o.getters,e.state,e.getters)}}(e,i+n,t,u)})),o.forEachChild((function(o,r){Ki(e,t,n.concat(r),o,s)}))}function Wi(e,t){return t.reduce((function(e,t){return e[t]}),e)}function zi(e,t,n){var o;return null!==(o=e)&&"object"==typeof o&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}var Ji=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var n=e.state;this.state=("function"==typeof n?n():n)||{}},Gi={namespaced:{configurable:!0}};Gi.namespaced.get=function(){return!!this._rawModule.namespaced},Ji.prototype.addChild=function(e,t){this._children[e]=t},Ji.prototype.removeChild=function(e){delete this._children[e]},Ji.prototype.getChild=function(e){return this._children[e]},Ji.prototype.hasChild=function(e){return e in this._children},Ji.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},Ji.prototype.forEachChild=function(e){Fi(this._children,e)},Ji.prototype.forEachGetter=function(e){this._rawModule.getters&&Fi(this._rawModule.getters,e)},Ji.prototype.forEachAction=function(e){this._rawModule.actions&&Fi(this._rawModule.actions,e)},Ji.prototype.forEachMutation=function(e){this._rawModule.mutations&&Fi(this._rawModule.mutations,e)},Object.defineProperties(Ji.prototype,Gi);var Qi=function(e){this.register([],e,!1)};function Yi(e,t,n){if(t.update(n),n.modules)for(var o in n.modules){if(!t.getChild(o))return;Yi(e.concat(o),t.getChild(o),n.modules[o])}}Qi.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},Qi.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,n){return e+((t=t.getChild(n)).namespaced?n+"/":"")}),"")},Qi.prototype.update=function(e){Yi([],this.root,e)},Qi.prototype.register=function(e,t,n){var o=this;void 0===n&&(n=!0);var s=new Ji(t,n);0===e.length?this.root=s:this.get(e.slice(0,-1)).addChild(e[e.length-1],s);t.modules&&Fi(t.modules,(function(t,s){o.register(e.concat(s),t,n)}))},Qi.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1],o=t.getChild(n);o&&o.runtime&&t.removeChild(n)},Qi.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1];return!!t&&t.hasChild(n)};var Xi=function(e){var t=this;void 0===e&&(e={});var n=e.plugins;void 0===n&&(n=[]);var o=e.strict;void 0===o&&(o=!1);var s=e.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new Qi(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=s;var r=this,i=this.dispatch,a=this.commit;this.dispatch=function(e,t){return i.call(r,e,t)},this.commit=function(e,t,n){return a.call(r,e,t,n)},this.strict=o;var c=this._modules.root.state;Ki(this,c,[],this._modules.root),Vi(this,c),n.forEach((function(e){return e(t)}))},Zi={state:{configurable:!0}};Xi.prototype.install=function(e,t){e.provide(t||"store",this),e.config.globalProperties.$store=this,void 0!==this._devtools&&this._devtools},Zi.state.get=function(){return this._state.data},Zi.state.set=function(e){},Xi.prototype.commit=function(e,t,n){var o=this,s=zi(e,t,n),r=s.type,i=s.payload,a={type:r,payload:i},c=this._mutations[r];c&&(this._withCommit((function(){c.forEach((function(e){e(i)}))})),this._subscribers.slice().forEach((function(e){return e(a,o.state)})))},Xi.prototype.dispatch=function(e,t){var n=this,o=zi(e,t),s=o.type,r=o.payload,i={type:s,payload:r},a=this._actions[s];if(a){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(i,n.state)}))}catch(gc){}var c=a.length>1?Promise.all(a.map((function(e){return e(r)}))):a[0](r);return new Promise((function(e,t){c.then((function(t){try{n._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(i,n.state)}))}catch(gc){}e(t)}),(function(e){try{n._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(i,n.state,e)}))}catch(gc){}t(e)}))}))}},Xi.prototype.subscribe=function(e,t){return qi(e,this._subscribers,t)},Xi.prototype.subscribeAction=function(e,t){return qi("function"==typeof e?{before:e}:e,this._actionSubscribers,t)},Xi.prototype.watch=function(e,t,n){var o=this;return Qo((function(){return e(o.state,o.getters)}),t,Object.assign({},n))},Xi.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._state.data=e}))},Xi.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"==typeof e&&(e=[e]),this._modules.register(e,t),Ki(this,this.state,e,this._modules.get(e),n.preserveState),Vi(this,this.state)},Xi.prototype.unregisterModule=function(e){var t=this;"string"==typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){delete Wi(t.state,e.slice(0,-1))[e[e.length-1]]})),Hi(this)},Xi.prototype.hasModule=function(e){return"string"==typeof e&&(e=[e]),this._modules.isRegistered(e)},Xi.prototype.hotUpdate=function(e){this._modules.update(e),Hi(this,!0)},Xi.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(Xi.prototype,Zi);const ea=e=>(t,n=Xs())=>{!sr&&us(e,t,n)},ta=ea("onShow"),na=ea("onLoad"),oa=ea("onPageScroll"),sa=ea("onReachBottom"),ra=ea("onPullDownRefresh"),ia={easycom:{autoscan:!0,custom:{"^u--(.*)":"@/uni_modules/uview-plus/components/u-$1/u-$1.vue","^up-(.*)":"@/uni_modules/uview-plus/components/u-$1/u-$1.vue","^u-([^-].*)":"@/uni_modules/uview-plus/components/u-$1/u-$1.vue"}},pages:[{path:"pages/index/index",style:{navigationBarTitleText:"",navigationStyle:"custom","mp-alipay":{transparentTitle:"always",titlePenetrate:"YES"}}},{path:"pages/market/market",style:{navigationBarTitleText:"",navigationStyle:"custom","mp-alipay":{transparentTitle:"always",titlePenetrate:"YES"}}},{path:"pages/mine/mine",style:{navigationBarTitleText:"",navigationStyle:"custom","mp-alipay":{transparentTitle:"always",titlePenetrate:"YES"}}},{path:"pages/piles/piles",style:{navigationBarTitleText:"我的充电桩"}},{path:"pages/wallet/wallet",style:{navigationBarTitleText:"钱包"}},{path:"pages/login/login",style:{navigationBarTitleText:"",navigationStyle:"custom","mp-alipay":{transparentTitle:"always",titlePenetrate:"YES"}}},{path:"pages/shop/shop",style:{navigationBarTitleText:"商品详情"}},{path:"pages/mine/earnings",style:{navigationBarTitleText:"收益"}},{path:"pages/wallet/withdraw",style:{navigationBarTitleText:"提现"}},{path:"pages/wallet/bankCard",style:{navigationBarTitleText:"银行卡"}},{path:"pages/wallet/addBankCard",style:{navigationBarTitleText:"添加银行卡"}},{path:"pages/login/register",style:{navigationBarTitleText:"",navigationStyle:"custom","mp-alipay":{transparentTitle:"always",titlePenetrate:"YES"}}},{path:"pages/order/order",style:{navigationBarTitleText:"订单"}},{path:"pages/shop/affirm",style:{navigationBarTitleText:"确定订单"}},{path:"pages/order/pay",style:{navigationBarTitleText:"确认订单"}},{path:"pages/setMeal/setMeal",style:{navigationBarTitleText:"套餐详情"}},{path:"pages/setMeal/affirm",style:{navigationBarTitleText:"确定订单"}},{path:"pages/setMealList/setMealList",style:{navigationBarTitleText:"组合套餐"}},{path:"pages/order/success",style:{navigationBarTitleText:""}},{path:"pages/agreement/agreement",style:{navigationBarTitleText:""}},{path:"pages/login/getBack",style:{navigationBarTitleText:"",navigationStyle:"custom","mp-alipay":{transparentTitle:"always",titlePenetrate:"YES"}}},{path:"pages/mine/topUp",style:{navigationBarTitleText:"增值收益充值"}},{path:"pages/mine/transferBalance",style:{navigationBarTitleText:"转入增值收益"}},{path:"pages/market/detail",style:{navigationBarTitleText:""}},{path:"pages/mine/setting",style:{navigationBarTitleText:""}},{path:"pages/mine/phone",style:{navigationBarTitleText:""}},{path:"pages/wallet/withdrawList",style:{navigationBarTitleText:"提现明细"}},{path:"pages/wallet/incomeList",style:{navigationBarTitleText:"收支明细"}},{path:"pages/mine/balanceIncome",style:{navigationBarTitleText:""}},{path:"pages/shareList/shareList",style:{navigationBarTitleText:"邀请记录"}},{path:"pages/mine/share",style:{navigationBarTitleText:"邀请码"}},{path:"pages/protocol/buy",style:{navigationBarTitleText:""}},{path:"pages/protocol/trusteeship",style:{navigationBarTitleText:""}},{path:"pages/activity/index",style:{navigationBarTitleText:"活动中心"}},{path:"pages/activity/detail813",style:{navigationBarTitleText:"活动"}},{path:"pages/activity/detail513",style:{navigationBarTitleText:"活动"}},{path:"pages/activity/shop/index",style:{navigationBarTitleText:"参与记录"}},{path:"pages/order/details",style:{navigationBarTitleText:"订单详情",enablePullDownRefresh:!0}},{path:"pages/mine/toUser",style:{navigationBarTitleText:"基础收益转赠"}},{path:"pages/mine/toUser2",style:{navigationBarTitleText:"增值收益转赠"}},{path:"pages/wallet/freezeMoney",style:{navigationBarTitleText:"冻结增值收益"}},{path:"pages/wallet/freezeEarnings",style:{navigationBarTitleText:"冻结基础收益"}},{path:"pages/shareList/detail",style:{navigationBarTitleText:""}},{path:"pages/login/getBackAccout",style:{navigationBarTitleText:"",navigationStyle:"custom","mp-alipay":{transparentTitle:"always",titlePenetrate:"YES"}}},{path:"pages/webView/webView",style:{navigationBarTitleText:""}}],globalStyle:{navigationBarTextStyle:"black",navigationBarTitleText:"uni-app",navigationBarBackgroundColor:"#F8F8F8",backgroundColor:"#F8F8F8","mp-alipay":{titleBarColor:"#fff"}},uniIdRouter:{},tabBar:{color:"#999999",selectedColor:"#999999",borderStyle:"black",backgroundColor:"#ffffff",height:"60px",list:[{pagePath:"pages/index/index",text:"首页"},{pagePath:"pages/market/market",text:"公告"},{pagePath:"pages/mine/mine",text:"我的"}]}};function aa(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var ca=aa((function(e,t){var n;e.exports=(n=n||function(e,t){var n=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),o={},s=o.lib={},r=s.Base={extend:function(e){var t=n(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},i=s.WordArray=r.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||c).stringify(this)},concat:function(e){var t=this.words,n=e.words,o=this.sigBytes,s=e.sigBytes;if(this.clamp(),o%4)for(var r=0;r>>2]>>>24-r%4*8&255;t[o+r>>>2]|=i<<24-(o+r)%4*8}else for(r=0;r>>2]=n[r>>>2];return this.sigBytes+=s,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=r.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,o=[],s=function(t){var n=987654321,o=4294967295;return function(){var s=((n=36969*(65535&n)+(n>>16)&o)<<16)+(t=18e3*(65535&t)+(t>>16)&o)&o;return s/=4294967296,(s+=.5)*(e.random()>.5?1:-1)}},r=0;r>>2]>>>24-s%4*8&255;o.push((r>>>4).toString(16)),o.push((15&r).toString(16))}return o.join("")},parse:function(e){for(var t=e.length,n=[],o=0;o>>3]|=parseInt(e.substr(o,2),16)<<24-o%8*4;return new i.init(n,t/2)}},u=a.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,o=[],s=0;s>>2]>>>24-s%4*8&255;o.push(String.fromCharCode(r))}return o.join("")},parse:function(e){for(var t=e.length,n=[],o=0;o>>2]|=(255&e.charCodeAt(o))<<24-o%4*8;return new i.init(n,t)}},l=a.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},h=s.BufferedBlockAlgorithm=r.extend({reset:function(){this._data=new i.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,o=n.words,s=n.sigBytes,r=this.blockSize,a=s/(4*r),c=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*r,u=e.min(4*c,s);if(c){for(var l=0;l>>24)|4278255360&(s<<24|s>>>8)}var r=this._hash.words,i=e[t+0],c=e[t+1],p=e[t+2],d=e[t+3],g=e[t+4],m=e[t+5],y=e[t+6],_=e[t+7],v=e[t+8],w=e[t+9],b=e[t+10],x=e[t+11],S=e[t+12],k=e[t+13],T=e[t+14],P=e[t+15],I=r[0],A=r[1],O=r[2],C=r[3];I=u(I,A,O,C,i,7,a[0]),C=u(C,I,A,O,c,12,a[1]),O=u(O,C,I,A,p,17,a[2]),A=u(A,O,C,I,d,22,a[3]),I=u(I,A,O,C,g,7,a[4]),C=u(C,I,A,O,m,12,a[5]),O=u(O,C,I,A,y,17,a[6]),A=u(A,O,C,I,_,22,a[7]),I=u(I,A,O,C,v,7,a[8]),C=u(C,I,A,O,w,12,a[9]),O=u(O,C,I,A,b,17,a[10]),A=u(A,O,C,I,x,22,a[11]),I=u(I,A,O,C,S,7,a[12]),C=u(C,I,A,O,k,12,a[13]),O=u(O,C,I,A,T,17,a[14]),I=l(I,A=u(A,O,C,I,P,22,a[15]),O,C,c,5,a[16]),C=l(C,I,A,O,y,9,a[17]),O=l(O,C,I,A,x,14,a[18]),A=l(A,O,C,I,i,20,a[19]),I=l(I,A,O,C,m,5,a[20]),C=l(C,I,A,O,b,9,a[21]),O=l(O,C,I,A,P,14,a[22]),A=l(A,O,C,I,g,20,a[23]),I=l(I,A,O,C,w,5,a[24]),C=l(C,I,A,O,T,9,a[25]),O=l(O,C,I,A,d,14,a[26]),A=l(A,O,C,I,v,20,a[27]),I=l(I,A,O,C,k,5,a[28]),C=l(C,I,A,O,p,9,a[29]),O=l(O,C,I,A,_,14,a[30]),I=h(I,A=l(A,O,C,I,S,20,a[31]),O,C,m,4,a[32]),C=h(C,I,A,O,v,11,a[33]),O=h(O,C,I,A,x,16,a[34]),A=h(A,O,C,I,T,23,a[35]),I=h(I,A,O,C,c,4,a[36]),C=h(C,I,A,O,g,11,a[37]),O=h(O,C,I,A,_,16,a[38]),A=h(A,O,C,I,b,23,a[39]),I=h(I,A,O,C,k,4,a[40]),C=h(C,I,A,O,i,11,a[41]),O=h(O,C,I,A,d,16,a[42]),A=h(A,O,C,I,y,23,a[43]),I=h(I,A,O,C,w,4,a[44]),C=h(C,I,A,O,S,11,a[45]),O=h(O,C,I,A,P,16,a[46]),I=f(I,A=h(A,O,C,I,p,23,a[47]),O,C,i,6,a[48]),C=f(C,I,A,O,_,10,a[49]),O=f(O,C,I,A,T,15,a[50]),A=f(A,O,C,I,m,21,a[51]),I=f(I,A,O,C,S,6,a[52]),C=f(C,I,A,O,d,10,a[53]),O=f(O,C,I,A,b,15,a[54]),A=f(A,O,C,I,c,21,a[55]),I=f(I,A,O,C,v,6,a[56]),C=f(C,I,A,O,P,10,a[57]),O=f(O,C,I,A,y,15,a[58]),A=f(A,O,C,I,k,21,a[59]),I=f(I,A,O,C,g,6,a[60]),C=f(C,I,A,O,x,10,a[61]),O=f(O,C,I,A,p,15,a[62]),A=f(A,O,C,I,w,21,a[63]),r[0]=r[0]+I|0,r[1]=r[1]+A|0,r[2]=r[2]+O|0,r[3]=r[3]+C|0},_doFinalize:function(){var t=this._data,n=t.words,o=8*this._nDataBytes,s=8*t.sigBytes;n[s>>>5]|=128<<24-s%32;var r=e.floor(o/4294967296),i=o;n[15+(s+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),n[14+(s+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),t.sigBytes=4*(n.length+1),this._process();for(var a=this._hash,c=a.words,u=0;u<4;u++){var l=c[u];c[u]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return a},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}});function u(e,t,n,o,s,r,i){var a=e+(t&n|~t&o)+s+i;return(a<>>32-r)+t}function l(e,t,n,o,s,r,i){var a=e+(t&o|n&~o)+s+i;return(a<>>32-r)+t}function h(e,t,n,o,s,r,i){var a=e+(t^n^o)+s+i;return(a<>>32-r)+t}function f(e,t,n,o,s,r,i){var a=e+(n^(t|~o))+s+i;return(a<>>32-r)+t}t.MD5=r._createHelper(c),t.HmacMD5=r._createHmacHelper(c)}(Math),n.MD5)})),aa((function(e,t){var n,o,s;e.exports=(o=(n=ua).lib.Base,s=n.enc.Utf8,void(n.algo.HMAC=o.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=s.parse(t));var n=e.blockSize,o=4*n;t.sigBytes>o&&(t=e.finalize(t)),t.clamp();for(var r=this._oKey=t.clone(),i=this._iKey=t.clone(),a=r.words,c=i.words,u=0;u>>2]>>>24-r%4*8&255)<<16|(t[r+1>>>2]>>>24-(r+1)%4*8&255)<<8|t[r+2>>>2]>>>24-(r+2)%4*8&255,a=0;a<4&&r+.75*a>>6*(3-a)&63));var c=o.charAt(64);if(c)for(;s.length%4;)s.push(c);return s.join("")},parse:function(e){var t=e.length,n=this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var r=0;r>>6-i%4*2;o[r>>>2]|=(a|c)<<24-r%4*8,r++}return s.create(o,r)}(e,t,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},n.enc.Base64)}));const pa="FUNCTION",da="pending",ga="rejected";function ma(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function ya(e){return"object"===ma(e)}function _a(e){return"function"==typeof e}function va(e){return function(){try{return e.apply(e,arguments)}catch(t){console.error(t)}}}const wa="REJECTED",ba="NOT_PENDING";class xa{constructor({createPromise:e,retryRule:t=wa}={}){this.createPromise=e,this.status=null,this.promise=null,this.retryRule=t}get needRetry(){if(!this.status)return!0;switch(this.retryRule){case wa:return this.status===ga;case ba:return this.status!==da}}exec(){return this.needRetry?(this.status=da,this.promise=this.createPromise().then((e=>(this.status="fulfilled",Promise.resolve(e))),(e=>(this.status=ga,Promise.reject(e)))),this.promise):this.promise}}function Sa(e){return e&&"string"==typeof e?JSON.parse(e):e}const ka=Sa([]),Ta="mp-weixin";Sa("");const Pa=Sa("[]")||[];let Ia="";try{Ia="__UNI__E097FA0"}catch(gc){}let Aa={};function Oa(e,t={}){var n,o;return n=Aa,o=e,Object.prototype.hasOwnProperty.call(n,o)||(Aa[e]=t),Aa[e]}const Ca=["invoke","success","fail","complete"],Ea=Oa("_globalUniCloudInterceptor");function La(e,t){Ea[e]||(Ea[e]={}),ya(t)&&Object.keys(t).forEach((n=>{Ca.indexOf(n)>-1&&function(e,t,n){let o=Ea[e][t];o||(o=Ea[e][t]=[]),-1===o.indexOf(n)&&_a(n)&&o.push(n)}(e,n,t[n])}))}function $a(e,t){Ea[e]||(Ea[e]={}),ya(t)?Object.keys(t).forEach((n=>{Ca.indexOf(n)>-1&&function(e,t,n){const o=Ea[e][t];if(!o)return;const s=o.indexOf(n);s>-1&&o.splice(s,1)}(e,n,t[n])})):delete Ea[e]}function Ra(e,t){return e&&0!==e.length?e.reduce(((e,n)=>e.then((()=>n(t)))),Promise.resolve()):Promise.resolve()}function ja(e,t){return Ea[e]&&Ea[e][t]||[]}function Ma(e){La("callObject",e)}const Ua=Oa("_globalUniCloudListener"),Na="response",Da="needLogin",Ba="refreshToken",Fa="clientdb",qa="cloudfunction",Ha="cloudobject";function Va(e){return Ua[e]||(Ua[e]=[]),Ua[e]}function Ka(e,t){const n=Va(e);n.includes(t)||n.push(t)}function Wa(e,t){const n=Va(e),o=n.indexOf(t);-1!==o&&n.splice(o,1)}function za(e,t){const n=Va(e);for(let o=0;o{Ga&&e(),function t(){if("function"==typeof getCurrentPages){const t=getCurrentPages();t&&t[0]&&(Ga=!0,e())}Ga||setTimeout((()=>{t()}),30)}()})),Ja)}function Ya(e){const t={};for(const n in e){const o=e[n];_a(o)&&(t[n]=va(o))}return t}class Xa extends Error{constructor(e){super(e.message),this.errMsg=e.message||e.errMsg||"unknown system error",this.code=this.errCode=e.code||e.errCode||"SYSTEM_ERROR",this.errSubject=this.subject=e.subject||e.errSubject,this.cause=e.cause,this.requestId=e.requestId}toJson(e=0){if(!(e>=10))return e++,{errCode:this.errCode,errMsg:this.errMsg,errSubject:this.errSubject,cause:this.cause&&this.cause.toJson?this.cause.toJson(e):this.cause}}}var Za={request:e=>Gt.request(e),uploadFile:e=>Gt.uploadFile(e),setStorageSync:(e,t)=>Gt.setStorageSync(e,t),getStorageSync:e=>Gt.getStorageSync(e),removeStorageSync:e=>Gt.removeStorageSync(e),clearStorageSync:()=>Gt.clearStorageSync(),connectSocket:e=>Gt.connectSocket(e)};function ec(e){return e&&ec(e.__v_raw)||e}function tc(){return{token:Za.getStorageSync("uni_id_token")||Za.getStorageSync("uniIdToken"),tokenExpired:Za.getStorageSync("uni_id_token_expired")}}function nc({token:e,tokenExpired:t}={}){e&&Za.setStorageSync("uni_id_token",e),t&&Za.setStorageSync("uni_id_token_expired",t)}let oc,sc;function rc(){return oc||(oc=Gt.getSystemInfoSync()),oc}function ic(){let e,t;try{if(Gt.getLaunchOptionsSync){if(Gt.getLaunchOptionsSync.toString().indexOf("not yet implemented")>-1)return;const{scene:n,channel:o}=Gt.getLaunchOptionsSync();e=o,t=n}}catch(n){}return{channel:e,scene:t}}let ac={};function cc(){const e=Gt.getLocale&&Gt.getLocale()||"en";if(sc)return{...ac,...sc,locale:e,LOCALE:e};const t=rc(),{deviceId:n,osName:o,uniPlatform:s,appId:r}=t,i=["appId","appLanguage","appName","appVersion","appVersionCode","appWgtVersion","browserName","browserVersion","deviceBrand","deviceId","deviceModel","deviceType","osName","osVersion","romName","romVersion","ua","hostName","hostVersion","uniPlatform","uniRuntimeVersion","uniRuntimeVersionCode","uniCompilerVersion","uniCompilerVersionCode"];for(const a in t)Object.hasOwnProperty.call(t,a)&&-1===i.indexOf(a)&&delete t[a];return sc={PLATFORM:s,OS:o,APPID:r,DEVICEID:n,...ic(),...t},{...ac,...sc,locale:e,LOCALE:e}}var uc=function(e,t){let n="";return Object.keys(e).sort().forEach((function(t){e[t]&&(n=n+"&"+t+"="+e[t])})),n=n.slice(1),la(n,t).toString()},lc=function(e,t){return new Promise(((n,o)=>{t(Object.assign(e,{complete(e){e||(e={});const t=e.data&&e.data.header&&e.data.header["x-serverless-request-id"]||e.header&&e.header["request-id"];if(!e.statusCode||e.statusCode>=400){const n=e.data&&e.data.error&&e.data.error.code||"SYS_ERR",s=e.data&&e.data.error&&e.data.error.message||e.errMsg||"request:fail";return o(new Xa({code:n,message:s,requestId:t}))}const s=e.data;if(s.error)return o(new Xa({code:s.error.code,message:s.error.message,requestId:t}));s.result=s.data,s.requestId=t,delete s.data,n(s)}}))}))},hc=function(e){return fa.stringify(ha.parse(e))},fc={init(e){const t=new class{constructor(e){["spaceId","clientSecret"].forEach((t=>{if(!Object.prototype.hasOwnProperty.call(e,t))throw new Error(`${t} required`)})),this.config=Object.assign({},{endpoint:0===e.spaceId.indexOf("mp-")?"https://api.next.bspapp.com":"https://api.bspapp.com"},e),this.config.provider="aliyun",this.config.requestUrl=this.config.endpoint+"/client",this.config.envType=this.config.envType||"public",this.config.accessTokenKey="access_token_"+this.config.spaceId,this.adapter=Za,this._getAccessTokenPromiseHub=new xa({createPromise:()=>this.requestAuth(this.setupRequest({method:"serverless.auth.user.anonymousAuthorize",params:"{}"},"auth")).then((e=>{if(!e.result||!e.result.accessToken)throw new Xa({code:"AUTH_FAILED",message:"获取accessToken失败"});this.setAccessToken(e.result.accessToken)})),retryRule:ba})}get hasAccessToken(){return!!this.accessToken}setAccessToken(e){this.accessToken=e}requestWrapped(e){return lc(e,this.adapter.request)}requestAuth(e){return this.requestWrapped(e)}request(e,t){return Promise.resolve().then((()=>this.hasAccessToken?t?this.requestWrapped(e):this.requestWrapped(e).catch((t=>new Promise(((e,n)=>{!t||"GATEWAY_INVALID_TOKEN"!==t.code&&"InvalidParameter.InvalidToken"!==t.code?n(t):e()})).then((()=>this.getAccessToken())).then((()=>{const t=this.rebuildRequest(e);return this.request(t,!0)})))):this.getAccessToken().then((()=>{const t=this.rebuildRequest(e);return this.request(t,!0)}))))}rebuildRequest(e){const t=Object.assign({},e);return t.data.token=this.accessToken,t.header["x-basement-token"]=this.accessToken,t.header["x-serverless-sign"]=uc(t.data,this.config.clientSecret),t}setupRequest(e,t){const n=Object.assign({},e,{spaceId:this.config.spaceId,timestamp:Date.now()}),o={"Content-Type":"application/json"};return"auth"!==t&&(n.token=this.accessToken,o["x-basement-token"]=this.accessToken),o["x-serverless-sign"]=uc(n,this.config.clientSecret),{url:this.config.requestUrl,method:"POST",data:n,dataType:"json",header:o}}getAccessToken(){return this._getAccessTokenPromiseHub.exec()}async authorize(){await this.getAccessToken()}callFunction(e){const t={method:"serverless.function.runtime.invoke",params:JSON.stringify({functionTarget:e.name,functionArgs:e.data||{}})};return this.request({...this.setupRequest(t),timeout:e.timeout})}getOSSUploadOptionsFromPath(e){const t={method:"serverless.file.resource.generateProximalSign",params:JSON.stringify(e)};return this.request(this.setupRequest(t))}uploadFileToOSS({url:e,formData:t,name:n,filePath:o,fileType:s,onUploadProgress:r}){return new Promise(((i,a)=>{const c=this.adapter.uploadFile({url:e,formData:t,name:n,filePath:o,fileType:s,header:{"X-OSS-server-side-encrpytion":"AES256"},success(e){e&&e.statusCode<400?i(e):a(new Xa({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail(e){a(new Xa({code:e.code||"UPLOAD_FAILED",message:e.message||e.errMsg||"文件上传失败"}))}});"function"==typeof r&&c&&"function"==typeof c.onProgressUpdate&&c.onProgressUpdate((e=>{r({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})}))}))}reportOSSUpload(e){const t={method:"serverless.file.resource.report",params:JSON.stringify(e)};return this.request(this.setupRequest(t))}async uploadFile({filePath:e,cloudPath:t,fileType:n="image",cloudPathAsRealPath:o=!1,onUploadProgress:s,config:r}){if("string"!==ma(t))throw new Xa({code:"INVALID_PARAM",message:"cloudPath必须为字符串类型"});if(!(t=t.trim()))throw new Xa({code:"INVALID_PARAM",message:"cloudPath不可为空"});if(/:\/\//.test(t))throw new Xa({code:"INVALID_PARAM",message:"cloudPath不合法"});const i=r&&r.envType||this.config.envType;if(o&&("/"!==t[0]&&(t="/"+t),t.indexOf("\\")>-1))throw new Xa({code:"INVALID_PARAM",message:"使用cloudPath作为路径时,cloudPath不可包含“\\”"});const a=(await this.getOSSUploadOptionsFromPath({env:i,filename:o?t.split("/").pop():t,fileId:o?t:void 0})).result,c="https://"+a.cdnDomain+"/"+a.ossPath,{securityToken:u,accessKeyId:l,signature:h,host:f,ossPath:p,id:d,policy:g,ossCallbackUrl:m}=a,y={"Cache-Control":"max-age=2592000","Content-Disposition":"attachment",OSSAccessKeyId:l,Signature:h,host:f,id:d,key:p,policy:g,success_action_status:200};if(u&&(y["x-oss-security-token"]=u),m){const e=JSON.stringify({callbackUrl:m,callbackBody:JSON.stringify({fileId:d,spaceId:this.config.spaceId}),callbackBodyType:"application/json"});y.callback=hc(e)}const _={url:"https://"+a.host,formData:y,fileName:"file",name:"file",filePath:e,fileType:n};if(await this.uploadFileToOSS(Object.assign({},_,{onUploadProgress:s})),m)return{success:!0,filePath:e,fileID:c};if((await this.reportOSSUpload({id:d})).success)return{success:!0,filePath:e,fileID:c};throw new Xa({code:"UPLOAD_FAILED",message:"文件上传失败"})}getTempFileURL({fileList:e}={}){return new Promise(((t,n)=>{Array.isArray(e)&&0!==e.length||n(new Xa({code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"})),t({fileList:e.map((e=>({fileID:e,tempFileURL:e})))})}))}async getFileInfo({fileList:e}={}){if(!Array.isArray(e)||0===e.length)throw new Xa({code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"});const t={method:"serverless.file.resource.info",params:JSON.stringify({id:e.map((e=>e.split("?")[0])).join(",")})};return{fileList:(await this.request(this.setupRequest(t))).result}}}(e),n={signInAnonymously:function(){return t.authorize()},getLoginState:function(){return Promise.resolve(!1)}};return t.auth=function(){return n},t.customAuth=t.auth,t}};const pc="undefined"!=typeof location&&"http:"===location.protocol?"http:":"https:";var dc,gc;(gc=dc||(dc={})).local="local",gc.none="none",gc.session="session";var mc=function(){},yc=aa((function(e,t){var n;e.exports=(n=ua,function(e){var t=n,o=t.lib,s=o.WordArray,r=o.Hasher,i=t.algo,a=[],c=[];!function(){function t(t){for(var n=e.sqrt(t),o=2;o<=n;o++)if(!(t%o))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var o=2,s=0;s<64;)t(o)&&(s<8&&(a[s]=n(e.pow(o,.5))),c[s]=n(e.pow(o,1/3)),s++),o++}();var u=[],l=i.SHA256=r.extend({_doReset:function(){this._hash=new s.init(a.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,o=n[0],s=n[1],r=n[2],i=n[3],a=n[4],l=n[5],h=n[6],f=n[7],p=0;p<64;p++){if(p<16)u[p]=0|e[t+p];else{var d=u[p-15],g=(d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3,m=u[p-2],y=(m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10;u[p]=g+u[p-7]+y+u[p-16]}var _=o&s^o&r^s&r,v=(o<<30|o>>>2)^(o<<19|o>>>13)^(o<<10|o>>>22),w=f+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&l^~a&h)+c[p]+u[p];f=h,h=l,l=a,a=i+w|0,i=r,r=s,s=o,o=w+(v+_)|0}n[0]=n[0]+o|0,n[1]=n[1]+s|0,n[2]=n[2]+r|0,n[3]=n[3]+i|0,n[4]=n[4]+a|0,n[5]=n[5]+l|0,n[6]=n[6]+h|0,n[7]=n[7]+f|0},_doFinalize:function(){var t=this._data,n=t.words,o=8*this._nDataBytes,s=8*t.sigBytes;return n[s>>>5]|=128<<24-s%32,n[14+(s+64>>>9<<4)]=e.floor(o/4294967296),n[15+(s+64>>>9<<4)]=o,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=r._createHelper(l),t.HmacSHA256=r._createHmacHelper(l)}(Math),n.SHA256)})),_c=yc,vc=aa((function(e,t){e.exports=ua.HmacSHA256}));const wc=()=>{let e;if(!Promise){e=()=>{},e.promise={};const t=()=>{throw new Xa({message:'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.'})};return Object.defineProperty(e.promise,"then",{get:t}),Object.defineProperty(e.promise,"catch",{get:t}),e}const t=new Promise(((t,n)=>{e=(e,o)=>e?n(e):t(o)}));return e.promise=t,e};function bc(e){return void 0===e}function xc(e){return"[object Null]"===Object.prototype.toString.call(e)}var Sc;!function(e){e.WEB="web",e.WX_MP="wx_mp"}(Sc||(Sc={}));const kc={adapter:null,runtime:void 0},Tc=["anonymousUuidKey"];class Pc extends mc{constructor(){super(),kc.adapter.root.tcbObject||(kc.adapter.root.tcbObject={})}setItem(e,t){kc.adapter.root.tcbObject[e]=t}getItem(e){return kc.adapter.root.tcbObject[e]}removeItem(e){delete kc.adapter.root.tcbObject[e]}clear(){delete kc.adapter.root.tcbObject}}function Ic(e,t){switch(e){case"local":return t.localStorage||new Pc;case"none":return new Pc;default:return t.sessionStorage||new Pc}}class Ac{constructor(e){if(!this._storage){this._persistence=kc.adapter.primaryStorage||e.persistence,this._storage=Ic(this._persistence,kc.adapter);const t=`access_token_${e.env}`,n=`access_token_expire_${e.env}`,o=`refresh_token_${e.env}`,s=`anonymous_uuid_${e.env}`,r=`login_type_${e.env}`,i=`user_info_${e.env}`;this.keys={accessTokenKey:t,accessTokenExpireKey:n,refreshTokenKey:o,anonymousUuidKey:s,loginTypeKey:r,userInfoKey:i}}}updatePersistence(e){if(e===this._persistence)return;const t="local"===this._persistence;this._persistence=e;const n=Ic(e,kc.adapter);for(const o in this.keys){const e=this.keys[o];if(t&&Tc.includes(o))continue;const s=this._storage.getItem(e);bc(s)||xc(s)||(n.setItem(e,s),this._storage.removeItem(e))}this._storage=n}setStore(e,t,n){if(!this._storage)return;const o={version:n||"localCachev1",content:t},s=JSON.stringify(o);try{this._storage.setItem(e,s)}catch(r){throw r}}getStore(e,t){try{if(!this._storage)return}catch(o){return""}t=t||"localCachev1";const n=this._storage.getItem(e);return n&&n.indexOf(t)>=0?JSON.parse(n).content:""}removeStore(e){this._storage.removeItem(e)}}const Oc={},Cc={};function Ec(e){return Oc[e]}class Lc{constructor(e,t){this.data=t||null,this.name=e}}class $c extends Lc{constructor(e,t){super("error",{error:e,data:t}),this.error=e}}const Rc=new class{constructor(){this._listeners={}}on(e,t){return n=e,o=t,(s=this._listeners)[n]=s[n]||[],s[n].push(o),this;var n,o,s}off(e,t){return function(e,t,n){if(n&&n[e]){const o=n[e].indexOf(t);-1!==o&&n[e].splice(o,1)}}(e,t,this._listeners),this}fire(e,t){if(e instanceof $c)return console.error(e.error),this;const n="string"==typeof e?new Lc(e,t||{}):e,o=n.name;if(this._listens(o)){n.target=this;const e=this._listeners[o]?[...this._listeners[o]]:[];for(const t of e)t.call(this,n)}return this}_listens(e){return this._listeners[e]&&this._listeners[e].length>0}};function jc(e,t){Rc.on(e,t)}function Mc(e,t={}){Rc.fire(e,t)}function Uc(e,t){Rc.off(e,t)}const Nc="loginStateChanged",Dc="loginStateExpire",Bc="loginTypeChanged",Fc="anonymousConverted",qc="refreshAccessToken";var Hc;!function(e){e.ANONYMOUS="ANONYMOUS",e.WECHAT="WECHAT",e.WECHAT_PUBLIC="WECHAT-PUBLIC",e.WECHAT_OPEN="WECHAT-OPEN",e.CUSTOM="CUSTOM",e.EMAIL="EMAIL",e.USERNAME="USERNAME",e.NULL="NULL"}(Hc||(Hc={}));const Vc=["auth.getJwt","auth.logout","auth.signInWithTicket","auth.signInAnonymously","auth.signIn","auth.fetchAccessTokenWithRefreshToken","auth.signUpWithEmailAndPassword","auth.activateEndUserMail","auth.sendPasswordResetEmail","auth.resetPasswordWithToken","auth.isUsernameRegistered"],Kc={"X-SDK-Version":"1.3.5"};function Wc(e,t,n){const o=e[t];e[t]=function(t){const s={},r={};n.forEach((n=>{const{data:o,headers:i}=n.call(e,t);Object.assign(s,o),Object.assign(r,i)}));const i=t.data;return i&&(()=>{var e;if(e=i,"[object FormData]"!==Object.prototype.toString.call(e))t.data={...i,...s};else for(const t in s)i.append(t,s[t])})(),t.headers={...t.headers||{},...r},o.call(e,t)}}function zc(){const e=Math.random().toString(16).slice(2);return{data:{seqId:e},headers:{...Kc,"x-seqid":e}}}class Jc{constructor(e={}){var t;this.config=e,this._reqClass=new kc.adapter.reqClass({timeout:this.config.timeout,timeoutMsg:`请求在${this.config.timeout/1e3}s内未完成,已中断`,restrictedMethods:["post"]}),this._cache=Ec(this.config.env),this._localCache=(t=this.config.env,Cc[t]),Wc(this._reqClass,"post",[zc]),Wc(this._reqClass,"upload",[zc]),Wc(this._reqClass,"download",[zc])}async post(e){return await this._reqClass.post(e)}async upload(e){return await this._reqClass.upload(e)}async download(e){return await this._reqClass.download(e)}async refreshAccessToken(){let e,t;this._refreshAccessTokenPromise||(this._refreshAccessTokenPromise=this._refreshAccessToken());try{e=await this._refreshAccessTokenPromise}catch(n){t=n}if(this._refreshAccessTokenPromise=null,this._shouldRefreshAccessTokenHook=null,t)throw t;return e}async _refreshAccessToken(){const{accessTokenKey:e,accessTokenExpireKey:t,refreshTokenKey:n,loginTypeKey:o,anonymousUuidKey:s}=this._cache.keys;this._cache.removeStore(e),this._cache.removeStore(t);let r=this._cache.getStore(n);if(!r)throw new Xa({message:"未登录CloudBase"});const i={refresh_token:r},a=await this.request("auth.fetchAccessTokenWithRefreshToken",i);if(a.data.code){const{code:e}=a.data;if("SIGN_PARAM_INVALID"===e||"REFRESH_TOKEN_EXPIRED"===e||"INVALID_REFRESH_TOKEN"===e){if(this._cache.getStore(o)===Hc.ANONYMOUS&&"INVALID_REFRESH_TOKEN"===e){const e=this._cache.getStore(s),t=this._cache.getStore(n),o=await this.send("auth.signInAnonymously",{anonymous_uuid:e,refresh_token:t});return this.setRefreshToken(o.refresh_token),this._refreshAccessToken()}Mc(Dc),this._cache.removeStore(n)}throw new Xa({code:a.data.code,message:`刷新access token失败:${a.data.code}`})}if(a.data.access_token)return Mc(qc),this._cache.setStore(e,a.data.access_token),this._cache.setStore(t,a.data.access_token_expire+Date.now()),{accessToken:a.data.access_token,accessTokenExpire:a.data.access_token_expire};a.data.refresh_token&&(this._cache.removeStore(n),this._cache.setStore(n,a.data.refresh_token),this._refreshAccessToken())}async getAccessToken(){const{accessTokenKey:e,accessTokenExpireKey:t,refreshTokenKey:n}=this._cache.keys;if(!this._cache.getStore(n))throw new Xa({message:"refresh token不存在,登录状态异常"});let o=this._cache.getStore(e),s=this._cache.getStore(t),r=!0;return this._shouldRefreshAccessTokenHook&&!(await this._shouldRefreshAccessTokenHook(o,s))&&(r=!1),(!o||!s||s{e.wxOpenId&&e.wxPublicId&&(t=!0)})),{users:n,hasPrimaryUid:t}}setPrimaryUid(e){return this._request.send("auth.setPrimaryUid",{uid:e})}unlink(e){return this._request.send("auth.unlink",{platform:e})}async update(e){const{nickName:t,gender:n,avatarUrl:o,province:s,country:r,city:i}=e,{data:a}=await this._request.send("auth.updateUserInfo",{nickName:t,gender:n,avatarUrl:o,province:s,country:r,city:i});this.setLocalUserInfo(a)}async refresh(){const{data:e}=await this._request.send("auth.getUserInfo",{});return this.setLocalUserInfo(e),e}setUserInfo(){const{userInfoKey:e}=this._cache.keys,t=this._cache.getStore(e);["uid","loginType","openid","wxOpenId","wxPublicId","unionId","qqMiniOpenId","email","hasPassword","customUserId","nickName","gender","avatarUrl"].forEach((e=>{this[e]=t[e]})),this.location={country:t.country,province:t.province,city:t.city}}setLocalUserInfo(e){const{userInfoKey:t}=this._cache.keys;this._cache.setStore(t,e),this.setUserInfo()}}class Zc{constructor(e){if(!e)throw new Xa({code:"PARAM_ERROR",message:"envId is not defined"});this._cache=Ec(e);const{refreshTokenKey:t,accessTokenKey:n,accessTokenExpireKey:o}=this._cache.keys,s=this._cache.getStore(t),r=this._cache.getStore(n),i=this._cache.getStore(o);this.credential={refreshToken:s,accessToken:r,accessTokenExpire:i},this.user=new Xc(e)}get isAnonymousAuth(){return this.loginType===Hc.ANONYMOUS}get isCustomAuth(){return this.loginType===Hc.CUSTOM}get isWeixinAuth(){return this.loginType===Hc.WECHAT||this.loginType===Hc.WECHAT_OPEN||this.loginType===Hc.WECHAT_PUBLIC}get loginType(){return this._cache.getStore(this._cache.keys.loginTypeKey)}}class eu extends Yc{async signIn(){this._cache.updatePersistence("local");const{anonymousUuidKey:e,refreshTokenKey:t}=this._cache.keys,n=this._cache.getStore(e)||void 0,o=this._cache.getStore(t)||void 0,s=await this._request.send("auth.signInAnonymously",{anonymous_uuid:n,refresh_token:o});if(s.uuid&&s.refresh_token){this._setAnonymousUUID(s.uuid),this.setRefreshToken(s.refresh_token),await this._request.refreshAccessToken(),Mc(Nc),Mc(Bc,{env:this.config.env,loginType:Hc.ANONYMOUS,persistence:"local"});const e=new Zc(this.config.env);return await e.user.refresh(),e}throw new Xa({message:"匿名登录失败"})}async linkAndRetrieveDataWithTicket(e){const{anonymousUuidKey:t,refreshTokenKey:n}=this._cache.keys,o=this._cache.getStore(t),s=this._cache.getStore(n),r=await this._request.send("auth.linkAndRetrieveDataWithTicket",{anonymous_uuid:o,refresh_token:s,ticket:e});if(r.refresh_token)return this._clearAnonymousUUID(),this.setRefreshToken(r.refresh_token),await this._request.refreshAccessToken(),Mc(Fc,{env:this.config.env}),Mc(Bc,{loginType:Hc.CUSTOM,persistence:"local"}),{credential:{refreshToken:r.refresh_token}};throw new Xa({message:"匿名转化失败"})}_setAnonymousUUID(e){const{anonymousUuidKey:t,loginTypeKey:n}=this._cache.keys;this._cache.removeStore(t),this._cache.setStore(t,e),this._cache.setStore(n,Hc.ANONYMOUS)}_clearAnonymousUUID(){this._cache.removeStore(this._cache.keys.anonymousUuidKey)}}class tu extends Yc{async signIn(e){if("string"!=typeof e)throw new Xa({code:"PARAM_ERROR",message:"ticket must be a string"});const{refreshTokenKey:t}=this._cache.keys,n=await this._request.send("auth.signInWithTicket",{ticket:e,refresh_token:this._cache.getStore(t)||""});if(n.refresh_token)return this.setRefreshToken(n.refresh_token),await this._request.refreshAccessToken(),Mc(Nc),Mc(Bc,{env:this.config.env,loginType:Hc.CUSTOM,persistence:this.config.persistence}),await this.refreshUserInfo(),new Zc(this.config.env);throw new Xa({message:"自定义登录失败"})}}class nu extends Yc{async signIn(e,t){if("string"!=typeof e)throw new Xa({code:"PARAM_ERROR",message:"email must be a string"});const{refreshTokenKey:n}=this._cache.keys,o=await this._request.send("auth.signIn",{loginType:"EMAIL",email:e,password:t,refresh_token:this._cache.getStore(n)||""}),{refresh_token:s,access_token:r,access_token_expire:i}=o;if(s)return this.setRefreshToken(s),r&&i?this.setAccessToken(r,i):await this._request.refreshAccessToken(),await this.refreshUserInfo(),Mc(Nc),Mc(Bc,{env:this.config.env,loginType:Hc.EMAIL,persistence:this.config.persistence}),new Zc(this.config.env);throw o.code?new Xa({code:o.code,message:`邮箱登录失败: ${o.message}`}):new Xa({message:"邮箱登录失败"})}async activate(e){return this._request.send("auth.activateEndUserMail",{token:e})}async resetPasswordWithToken(e,t){return this._request.send("auth.resetPasswordWithToken",{token:e,newPassword:t})}}class ou extends Yc{async signIn(e,t){if("string"!=typeof e)throw new Xa({code:"PARAM_ERROR",message:"username must be a string"});"string"!=typeof t&&(t="",console.warn("password is empty"));const{refreshTokenKey:n}=this._cache.keys,o=await this._request.send("auth.signIn",{loginType:Hc.USERNAME,username:e,password:t,refresh_token:this._cache.getStore(n)||""}),{refresh_token:s,access_token_expire:r,access_token:i}=o;if(s)return this.setRefreshToken(s),i&&r?this.setAccessToken(i,r):await this._request.refreshAccessToken(),await this.refreshUserInfo(),Mc(Nc),Mc(Bc,{env:this.config.env,loginType:Hc.USERNAME,persistence:this.config.persistence}),new Zc(this.config.env);throw o.code?new Xa({code:o.code,message:`用户名密码登录失败: ${o.message}`}):new Xa({message:"用户名密码登录失败"})}}class su{constructor(e){this.config=e,this._cache=Ec(e.env),this._request=Qc(e.env),this._onAnonymousConverted=this._onAnonymousConverted.bind(this),this._onLoginTypeChanged=this._onLoginTypeChanged.bind(this),jc(Bc,this._onLoginTypeChanged)}get currentUser(){const e=this.hasLoginState();return e&&e.user||null}get loginType(){return this._cache.getStore(this._cache.keys.loginTypeKey)}anonymousAuthProvider(){return new eu(this.config)}customAuthProvider(){return new tu(this.config)}emailAuthProvider(){return new nu(this.config)}usernameAuthProvider(){return new ou(this.config)}async signInAnonymously(){return new eu(this.config).signIn()}async signInWithEmailAndPassword(e,t){return new nu(this.config).signIn(e,t)}signInWithUsernameAndPassword(e,t){return new ou(this.config).signIn(e,t)}async linkAndRetrieveDataWithTicket(e){return this._anonymousAuthProvider||(this._anonymousAuthProvider=new eu(this.config)),jc(Fc,this._onAnonymousConverted),await this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e)}async signOut(){if(this.loginType===Hc.ANONYMOUS)throw new Xa({message:"匿名用户不支持登出操作"});const{refreshTokenKey:e,accessTokenKey:t,accessTokenExpireKey:n}=this._cache.keys,o=this._cache.getStore(e);if(!o)return;const s=await this._request.send("auth.logout",{refresh_token:o});return this._cache.removeStore(e),this._cache.removeStore(t),this._cache.removeStore(n),Mc(Nc),Mc(Bc,{env:this.config.env,loginType:Hc.NULL,persistence:this.config.persistence}),s}async signUpWithEmailAndPassword(e,t){return this._request.send("auth.signUpWithEmailAndPassword",{email:e,password:t})}async sendPasswordResetEmail(e){return this._request.send("auth.sendPasswordResetEmail",{email:e})}onLoginStateChanged(e){jc(Nc,(()=>{const t=this.hasLoginState();e.call(this,t)}));const t=this.hasLoginState();e.call(this,t)}onLoginStateExpired(e){jc(Dc,e.bind(this))}onAccessTokenRefreshed(e){jc(qc,e.bind(this))}onAnonymousConverted(e){jc(Fc,e.bind(this))}onLoginTypeChanged(e){jc(Bc,(()=>{const t=this.hasLoginState();e.call(this,t)}))}async getAccessToken(){return{accessToken:(await this._request.getAccessToken()).accessToken,env:this.config.env}}hasLoginState(){const{refreshTokenKey:e}=this._cache.keys;return this._cache.getStore(e)?new Zc(this.config.env):null}async isUsernameRegistered(e){if("string"!=typeof e)throw new Xa({code:"PARAM_ERROR",message:"username must be a string"});const{data:t}=await this._request.send("auth.isUsernameRegistered",{username:e});return t&&t.isRegistered}getLoginState(){return Promise.resolve(this.hasLoginState())}async signInWithTicket(e){return new tu(this.config).signIn(e)}shouldRefreshAccessToken(e){this._request._shouldRefreshAccessTokenHook=e.bind(this)}getUserInfo(){return this._request.send("auth.getUserInfo",{}).then((e=>e.code?e:{...e.data,requestId:e.seqId}))}getAuthHeader(){const{refreshTokenKey:e,accessTokenKey:t}=this._cache.keys,n=this._cache.getStore(e);return{"x-cloudbase-credentials":this._cache.getStore(t)+"/@@/"+n}}_onAnonymousConverted(e){const{env:t}=e.data;t===this.config.env&&this._cache.updatePersistence(this.config.persistence)}_onLoginTypeChanged(e){const{loginType:t,persistence:n,env:o}=e.data;o===this.config.env&&(this._cache.updatePersistence(n),this._cache.setStore(this._cache.keys.loginTypeKey,t))}}const ru=function(e,t){t=t||wc();const n=Qc(this.config.env),{cloudPath:o,filePath:s,onUploadProgress:r,fileType:i="image"}=e;return n.send("storage.getUploadMetadata",{path:o}).then((e=>{const{data:{url:a,authorization:c,token:u,fileId:l,cosFileId:h},requestId:f}=e,p={key:o,signature:c,"x-cos-meta-fileid":h,success_action_status:"201","x-cos-security-token":u};n.upload({url:a,data:p,file:s,name:o,fileType:i,onUploadProgress:r}).then((e=>{201===e.statusCode?t(null,{fileID:l,requestId:f}):t(new Xa({code:"STORAGE_REQUEST_FAIL",message:`STORAGE_REQUEST_FAIL: ${e.data}`}))})).catch((e=>{t(e)}))})).catch((e=>{t(e)})),t.promise},iu=function(e,t){t=t||wc();const n=Qc(this.config.env),{cloudPath:o}=e;return n.send("storage.getUploadMetadata",{path:o}).then((e=>{t(null,e)})).catch((e=>{t(e)})),t.promise},au=function({fileList:e},t){if(t=t||wc(),!e||!Array.isArray(e))return{code:"INVALID_PARAM",message:"fileList必须是非空的数组"};for(let o of e)if(!o||"string"!=typeof o)return{code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"};const n={fileid_list:e};return Qc(this.config.env).send("storage.batchDeleteFile",n).then((e=>{e.code?t(null,e):t(null,{fileList:e.data.delete_list,requestId:e.requestId})})).catch((e=>{t(e)})),t.promise},cu=function({fileList:e},t){t=t||wc(),e&&Array.isArray(e)||t(null,{code:"INVALID_PARAM",message:"fileList必须是非空的数组"});let n=[];for(let s of e)"object"==typeof s?(s.hasOwnProperty("fileID")&&s.hasOwnProperty("maxAge")||t(null,{code:"INVALID_PARAM",message:"fileList的元素必须是包含fileID和maxAge的对象"}),n.push({fileid:s.fileID,max_age:s.maxAge})):"string"==typeof s?n.push({fileid:s}):t(null,{code:"INVALID_PARAM",message:"fileList的元素必须是字符串"});const o={file_list:n};return Qc(this.config.env).send("storage.batchGetDownloadUrl",o).then((e=>{e.code?t(null,e):t(null,{fileList:e.data.download_list,requestId:e.requestId})})).catch((e=>{t(e)})),t.promise},uu=async function({fileID:e},t){const n=(await cu.call(this,{fileList:[{fileID:e,maxAge:600}]})).fileList[0];if("SUCCESS"!==n.code)return t?t(n):new Promise((e=>{e(n)}));const o=Qc(this.config.env);let s=n.download_url;if(s=encodeURI(s),!t)return o.download({url:s});t(await o.download({url:s}))},lu=function({name:e,data:t,query:n,parse:o,search:s,timeout:r},i){const a=i||wc();let c;try{c=t?JSON.stringify(t):""}catch(l){return Promise.reject(l)}if(!e)return Promise.reject(new Xa({code:"PARAM_ERROR",message:"函数名不能为空"}));const u={inQuery:n,parse:o,search:s,function_name:e,request_data:c};return Qc(this.config.env).send("functions.invokeFunction",u,{timeout:r}).then((e=>{if(e.code)a(null,e);else{let n=e.data.response_data;if(o)a(null,{result:n,requestId:e.requestId});else try{n=JSON.parse(e.data.response_data),a(null,{result:n,requestId:e.requestId})}catch(t){a(new Xa({message:"response data must be json"}))}}return a.promise})).catch((e=>{a(e)})),a.promise},hu={timeout:15e3,persistence:"session"},fu={};class pu{constructor(e){this.config=e||this.config,this.authObj=void 0}init(e){switch(kc.adapter||(this.requestClient=new kc.adapter.reqClass({timeout:e.timeout||5e3,timeoutMsg:`请求在${(e.timeout||5e3)/1e3}s内未完成,已中断`})),this.config={...hu,...e},!0){case this.config.timeout>6e5:console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"),this.config.timeout=6e5;break;case this.config.timeout<100:console.warn("timeout小于可配置下限[100ms],已重置为下限数值"),this.config.timeout=100}return new pu(this.config)}auth({persistence:e}={}){if(this.authObj)return this.authObj;const t=e||kc.adapter.primaryStorage||hu.persistence;var n;return t!==this.config.persistence&&(this.config.persistence=t),function(e){const{env:t}=e;Oc[t]=new Ac(e),Cc[t]=new Ac({...e,persistence:"local"})}(this.config),n=this.config,Gc[n.env]=new Jc(n),this.authObj=new su(this.config),this.authObj}on(e,t){return jc.apply(this,[e,t])}off(e,t){return Uc.apply(this,[e,t])}callFunction(e,t){return lu.apply(this,[e,t])}deleteFile(e,t){return au.apply(this,[e,t])}getTempFileURL(e,t){return cu.apply(this,[e,t])}downloadFile(e,t){return uu.apply(this,[e,t])}uploadFile(e,t){return ru.apply(this,[e,t])}getUploadMetadata(e,t){return iu.apply(this,[e,t])}registerExtension(e){fu[e.name]=e}async invokeExtension(e,t){const n=fu[e];if(!n)throw new Xa({message:`扩展${e} 必须先注册`});return await n.invoke(t,this)}useAdapters(e){const{adapter:t,runtime:n}=function(e){const t=(n=e,"[object Array]"===Object.prototype.toString.call(n)?e:[e]);var n;for(const o of t){const{isMatch:e,genAdapter:t,runtime:n}=o;if(e())return{adapter:t(),runtime:n}}}(e)||{};t&&(kc.adapter=t),n&&(kc.runtime=n)}}var du=new pu;function gu(e,t,n){void 0===n&&(n={});var o=/\?/.test(t),s="";for(var r in n)""===s?!o&&(t+="?"):s+="&",s+=r+"="+encodeURIComponent(n[r]);return/^http(s)?:\/\//.test(t+=s)?t:""+e+t}class mu{post(e){const{url:t,data:n,headers:o,timeout:s}=e;return new Promise(((e,r)=>{Za.request({url:gu("https:",t),data:n,method:"POST",header:o,timeout:s,success(t){e(t)},fail(e){r(e)}})}))}upload(e){return new Promise(((t,n)=>{const{url:o,file:s,data:r,headers:i,fileType:a}=e,c=Za.uploadFile({url:gu("https:",o),name:"file",formData:Object.assign({},r),filePath:s,fileType:a,header:i,success(e){const n={statusCode:e.statusCode,data:e.data||{}};200===e.statusCode&&r.success_action_status&&(n.statusCode=parseInt(r.success_action_status,10)),t(n)},fail(e){n(new Error(e.errMsg||"uploadFile:fail"))}});"function"==typeof e.onUploadProgress&&c&&"function"==typeof c.onProgressUpdate&&c.onProgressUpdate((t=>{e.onUploadProgress({loaded:t.totalBytesSent,total:t.totalBytesExpectedToSend})}))}))}}const yu={setItem(e,t){Za.setStorageSync(e,t)},getItem:e=>Za.getStorageSync(e),removeItem(e){Za.removeStorageSync(e)},clear(){Za.clearStorageSync()}};var _u={genAdapter:function(){return{root:{},reqClass:mu,localStorage:yu,primaryStorage:"local"}},isMatch:function(){return!0},runtime:"uni_app"};du.useAdapters(_u);const vu=du,wu=vu.init;vu.init=function(e){e.env=e.spaceId;const t=wu.call(this,e);t.config.provider="tencent",t.config.spaceId=e.spaceId;const n=t.auth;return t.auth=function(e){const t=n.call(this,e);return["linkAndRetrieveDataWithTicket","signInAnonymously","signOut","getAccessToken","getLoginState","signInWithTicket","getUserInfo"].forEach((e=>{var n;t[e]=(n=t[e],function(e){e=e||{};const{success:t,fail:o,complete:s}=Ya(e);if(!(t||o||s))return n.call(this,e);n.call(this,e).then((e=>{t&&t(e),s&&s(e)}),(e=>{o&&o(e),s&&s(e)}))}).bind(t)})),t},t.customAuth=t.auth,t};var bu=vu;async function xu(e,t){const n=`http://${e}:${t}/system/ping`;try{const e=await(o={url:n,timeout:500},new Promise(((e,t)=>{Za.request({...o,success(t){e(t)},fail(e){t(e)}})})));return!(!e.data||0!==e.data.code)}catch(s){return!1}var o}const Su={"serverless.file.resource.generateProximalSign":"storage/generate-proximal-sign","serverless.file.resource.report":"storage/report","serverless.file.resource.delete":"storage/delete","serverless.file.resource.getTempFileURL":"storage/get-temp-file-url"};var ku={init(e){const t=new class{constructor(e){if(["spaceId","clientSecret"].forEach((t=>{if(!Object.prototype.hasOwnProperty.call(e,t))throw new Error(`${t} required`)})),!e.endpoint)throw new Error("集群空间未配置ApiEndpoint,配置后需要重新关联服务空间后生效");this.config=Object.assign({},e),this.config.provider="dcloud",this.config.requestUrl=this.config.endpoint+"/client",this.config.envType=this.config.envType||"public",this.adapter=Za}async request(e,t=!0){return e=this.setupRequest(e),Promise.resolve().then((()=>lc(e,this.adapter.request)))}requestLocal(e){return new Promise(((t,n)=>{this.adapter.request(Object.assign(e,{complete(e){if(e||(e={}),!e.statusCode||e.statusCode>=400){const t=e.data&&e.data.code||"SYS_ERR",o=e.data&&e.data.message||"request:fail";return n(new Xa({code:t,message:o}))}t({success:!0,result:e.data})}}))}))}setupRequest(e){const t=Object.assign({},e,{spaceId:this.config.spaceId,timestamp:Date.now()}),n={"Content-Type":"application/json"};n["x-serverless-sign"]=uc(t,this.config.clientSecret);const o=cc();n["x-client-info"]=encodeURIComponent(JSON.stringify(o));const{token:s}=tc();return n["x-client-token"]=s,{url:this.config.requestUrl,method:"POST",data:t,dataType:"json",header:JSON.parse(JSON.stringify(n))}}async setupLocalRequest(e){const t=cc(),{token:n}=tc(),o=Object.assign({},e,{spaceId:this.config.spaceId,timestamp:Date.now(),clientInfo:t,token:n}),{address:s,servePort:r}=this.__dev__&&this.__dev__.debugInfo||{},{address:i}=await async function(e,t){let n;for(let o=0;o{const{url:r,formData:i,name:a}=t.result;return s=t.result.fileUrl,new Promise(((t,s)=>{const c=this.adapter.uploadFile({url:r,formData:i,name:a,filePath:e,fileType:n,success(e){e&&e.statusCode<400?t(e):s(new Xa({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail(e){s(new Xa({code:e.code||"UPLOAD_FAILED",message:e.message||e.errMsg||"文件上传失败"}))}});"function"==typeof o&&c&&"function"==typeof c.onProgressUpdate&&c.onProgressUpdate((e=>{o({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})}))}))})).then((()=>this.reportUploadFile({cloudPath:t}))).then((t=>new Promise(((n,o)=>{t.success?n({success:!0,filePath:e,fileID:s}):o(new Xa({code:"UPLOAD_FAILED",message:"文件上传失败"}))}))))}deleteFile({fileList:e}){const t={method:"serverless.file.resource.delete",params:JSON.stringify({fileList:e})};return this.request(t).then((e=>{if(e.success)return e.result;throw new Xa({code:"DELETE_FILE_FAILED",message:"删除文件失败"})}))}getTempFileURL({fileList:e,maxAge:t}={}){if(!Array.isArray(e)||0===e.length)throw new Xa({code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"});const n={method:"serverless.file.resource.getTempFileURL",params:JSON.stringify({fileList:e,maxAge:t})};return this.request(n).then((e=>{if(e.success)return{fileList:e.result.fileList.map((e=>({fileID:e.fileID,tempFileURL:e.tempFileURL})))};throw new Xa({code:"GET_TEMP_FILE_URL_FAILED",message:"获取临时文件链接失败"})}))}}(e),n={signInAnonymously:function(){return Promise.resolve()},getLoginState:function(){return Promise.resolve(!1)}};return t.auth=function(){return n},t.customAuth=t.auth,t}},Tu=aa((function(e,t){e.exports=ua.enc.Hex}));function Pu(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function Iu(e="",t={}){const{data:n,functionName:o,method:s,headers:r,signHeaderKeys:i=[],config:a}=t,c=Date.now(),u=Pu(),l=Object.assign({},r,{"x-from-app-id":a.spaceAppId,"x-from-env-id":a.spaceId,"x-to-env-id":a.spaceId,"x-from-instance-id":c,"x-from-function-name":o,"x-client-timestamp":c,"x-alipay-source":"client","x-request-id":u,"x-alipay-callid":u,"x-trace-id":u}),h=["x-from-app-id","x-from-env-id","x-to-env-id","x-from-instance-id","x-from-function-name","x-client-timestamp"].concat(i),[f="",p=""]=e.split("?")||[],d=function(e){const t=e.signedHeaders.join(";"),n=e.signedHeaders.map((t=>`${t.toLowerCase()}:${e.headers[t]}\n`)).join(""),o=_c(e.body).toString(Tu),s=`${e.method.toUpperCase()}\n${e.path}\n${e.query}\n${n}\n${t}\n${o}\n`,r=_c(s).toString(Tu),i=`HMAC-SHA256\n${e.timestamp}\n${r}\n`,a=vc(i,e.secretKey).toString(Tu);return`HMAC-SHA256 Credential=${e.secretId}, SignedHeaders=${t}, Signature=${a}`}({path:f,query:p,method:s,headers:l,timestamp:c,body:JSON.stringify(n),secretId:a.accessKey,secretKey:a.secretKey,signedHeaders:h.sort()});return{url:`${a.endpoint}${e}`,headers:Object.assign({},l,{Authorization:d})}}function Au({url:e,data:t,method:n="POST",headers:o={},timeout:s}){return new Promise(((r,i)=>{Za.request({url:e,method:n,data:"object"==typeof t?JSON.stringify(t):t,header:o,dataType:"json",timeout:s,complete:(e={})=>{const t=o["x-trace-id"]||"";if(!e.statusCode||e.statusCode>=400){const{message:n,errMsg:o,trace_id:s}=e.data||{};return i(new Xa({code:"SYS_ERR",message:n||o||"request:fail",requestId:s||t}))}r({status:e.statusCode,data:e.data,headers:e.header,requestId:t})}})}))}function Ou(e,t){const{path:n,data:o,method:s="GET"}=e,{url:r,headers:i}=Iu(n,{functionName:"",data:o,method:s,headers:{"x-alipay-cloud-mode":"oss","x-data-api-type":"oss","x-expire-timestamp":Date.now()+6e4},signHeaderKeys:["x-data-api-type","x-expire-timestamp"],config:t});return Au({url:r,data:o,method:s,headers:i}).then((e=>{const t=e.data||{};if(!t.success)throw new Xa({code:e.errCode,message:e.errMsg,requestId:e.requestId});return t.data||{}})).catch((e=>{throw new Xa({code:e.errCode,message:e.errMsg,requestId:e.requestId})}))}function Cu(e=""){const t=e.trim().replace(/^cloud:\/\//,""),n=t.indexOf("/");if(n<=0)throw new Xa({code:"INVALID_PARAM",message:"fileID不合法"});const o=t.substring(0,n),s=t.substring(n+1);return o!==this.config.spaceId&&console.warn("file ".concat(e," does not belong to env ").concat(this.config.spaceId)),s}function Eu(e=""){return"cloud://".concat(this.config.spaceId,"/").concat(e.replace(/^\/+/,""))}class Lu{constructor(e){this.config=e}signedURL(e,t={}){const n=`/ws/function/${e}`,o=this.config.wsEndpoint.replace(/^ws(s)?:\/\//,""),s=Object.assign({},t,{accessKeyId:this.config.accessKey,signatureNonce:Pu(),timestamp:""+Date.now()}),r=[n,["accessKeyId","authorization","signatureNonce","timestamp"].sort().map((function(e){return s[e]?"".concat(e,"=").concat(s[e]):null})).filter(Boolean).join("&"),`host:${o}`].join("\n"),i=["HMAC-SHA256",_c(r).toString(Tu)].join("\n"),a=vc(i,this.config.secretKey).toString(Tu),c=Object.keys(s).map((e=>`${e}=${encodeURIComponent(s[e])}`)).join("&");return`${this.config.wsEndpoint}${n}?${c}&signature=${a}`}}var $u={init:e=>{e.provider="alipay";const t=new class{constructor(e){if(["spaceId","spaceAppId","accessKey","secretKey"].forEach((t=>{if(!Object.prototype.hasOwnProperty.call(e,t))throw new Error(`${t} required`)})),e.endpoint){if("string"!=typeof e.endpoint)throw new Error("endpoint must be string");if(!/^https:\/\//.test(e.endpoint))throw new Error("endpoint must start with https://");e.endpoint=e.endpoint.replace(/\/$/,"")}this.config=Object.assign({},e,{endpoint:e.endpoint||`https://${e.spaceId}.api-hz.cloudbasefunction.cn`,wsEndpoint:e.wsEndpoint||`wss://${e.spaceId}.api-hz.cloudbasefunction.cn`}),this._websocket=new Lu(this.config)}callFunction(e){return function(e,t){const{name:n,data:o,async:s=!1,timeout:r}=e,i="POST",a={"x-to-function-name":n};s&&(a["x-function-invoke-type"]="async");const{url:c,headers:u}=Iu("/functions/invokeFunction",{functionName:n,data:o,method:i,headers:a,signHeaderKeys:["x-to-function-name"],config:t});return Au({url:c,data:o,method:i,headers:u,timeout:r}).then((e=>{let t=0;if(s){const n=e.data||{};t="200"===n.errCode?0:n.errCode,e.data=n.data||{},e.errMsg=n.errMsg}if(0!==t)throw new Xa({code:t,message:e.errMsg,requestId:e.requestId});return{errCode:t,success:0===t,requestId:e.requestId,result:e.data}})).catch((e=>{throw new Xa({code:e.errCode,message:e.errMsg,requestId:e.requestId})}))}(e,this.config)}uploadFileToOSS({url:e,filePath:t,fileType:n,formData:o,onUploadProgress:s}){return new Promise(((r,i)=>{const a=Za.uploadFile({url:e,filePath:t,fileType:n,formData:o,name:"file",success(e){e&&e.statusCode<400?r(e):i(new Xa({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail(e){i(new Xa({code:e.code||"UPLOAD_FAILED",message:e.message||e.errMsg||"文件上传失败"}))}});"function"==typeof s&&a&&"function"==typeof a.onProgressUpdate&&a.onProgressUpdate((e=>{s({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})}))}))}async uploadFile({filePath:e,cloudPath:t="",fileType:n="image",onUploadProgress:o}){if("string"!==ma(t))throw new Xa({code:"INVALID_PARAM",message:"cloudPath必须为字符串类型"});if(!(t=t.trim()))throw new Xa({code:"INVALID_PARAM",message:"cloudPath不可为空"});if(/:\/\//.test(t))throw new Xa({code:"INVALID_PARAM",message:"cloudPath不合法"});const s=await Ou({path:"/".concat(t.replace(/^\//,""),"?post_url")},this.config),{file_id:r,upload_url:i,form_data:a}=s,c=a&&a.reduce(((e,t)=>(e[t.key]=t.value,e)),{});return this.uploadFileToOSS({url:i,filePath:e,fileType:n,formData:c,onUploadProgress:o}).then((()=>({fileID:r})))}async getTempFileURL({fileList:e}){return new Promise(((t,n)=>{(!e||e.length<0)&&n(new Xa({errCode:"INVALID_PARAM",errMsg:"fileList不能为空数组"})),e.length>50&&n(new Xa({errCode:"INVALID_PARAM",errMsg:"fileList数组长度不能超过50"}));const o=[];for(const s of e){"string"!==ma(s)&&n(new Xa({errCode:"INVALID_PARAM",errMsg:"fileList的元素必须是非空的字符串"}));const e=Cu.call(this,s);o.push({file_id:e,expire:600})}Ou({path:"/?download_url",data:{file_list:o},method:"POST"},this.config).then((e=>{const{file_list:n=[]}=e;t({fileList:n.map((e=>({fileID:Eu.call(this,e.file_id),tempFileURL:e.download_url})))})})).catch((e=>n(e)))}))}async connectWebSocket(e){const{name:t,query:n}=e;return Za.connectSocket({url:this._websocket.signedURL(t,n),complete:()=>{}})}}(e);return t.auth=function(){return{signInAnonymously:function(){return Promise.resolve()},getLoginState:function(){return Promise.resolve(!0)}}},t}};function Ru({data:e}){let t;t=cc();const n=JSON.parse(JSON.stringify(e||{}));if(Object.assign(n,{clientInfo:t}),!n.uniIdToken){const{token:e}=tc();e&&(n.uniIdToken=e)}return n}const ju=[{rule:/fc_function_not_found|FUNCTION_NOT_FOUND/,content:",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间",mode:"append"}];var Mu=/[\\^$.*+?()[\]{}|]/g,Uu=RegExp(Mu.source);function Nu(e,t,n){return e.replace(new RegExp((o=t)&&Uu.test(o)?o.replace(Mu,"\\$&"):o,"g"),n);var o}const Du=2e4,Bu={code:20101,message:"Invalid client"};function Fu(e){const{errSubject:t,subject:n,errCode:o,errMsg:s,code:r,message:i,cause:a}=e||{};return new Xa({subject:t||n||"uni-secure-network",code:o||r||Du,message:s||i,cause:a})}let qu;function Hu({secretType:e}={}){return"request"===e||"response"===e||"both"===e}function Vu({functionName:e,result:t,logPvd:n}){}function Ku(e){const t=e.callFunction,n=function(n){const o=n.name;n.data=Ru.call(e,{data:n.data});const s={aliyun:"aliyun",tencent:"tcb",tcb:"tcb",alipay:"alipay",dcloud:"dcloud"}[this.config.provider],r=Hu(n)||false;return t.call(this,n).then((e=>(e.errCode=0,!r&&Vu.call(this,{functionName:o,result:e,logPvd:s}),Promise.resolve(e))),(e=>(!r&&Vu.call(this,{functionName:o,result:e,logPvd:s}),e&&e.message&&(e.message=function({message:e="",extraInfo:t={},formatter:n=[]}={}){for(let o=0;on.provider===e&&n.spaceId===t));return o&&o.config}({provider:e,spaceId:t});if(!a||!a.accessControl||!a.accessControl.enable)return!1;const c=a.accessControl.function||{},u=Object.keys(c);if(0===u.length)return!0;const l=function(e,t){let n,o,s;for(let r=0;re.trim())).indexOf(t)>-1&&(o=i):s=i:n=i}return n||o||s}(u,n);if(!l)return!1;if((c[l]||[]).find(((e={})=>e.appId===o&&(e.platform||"").toLowerCase()===i.toLowerCase())))return!0;throw console.error(`此应用[appId: ${o}, platform: ${i}]不在云端配置的允许访问的应用列表内,参考:https://uniapp.dcloud.net.cn/uniCloud/secure-network.html#verify-client`),Fu(Bu)}({provider:o,spaceId:s,functionName:r})?new qu({secretType:t.secretType,uniCloudIns:e}).wrapVerifyClientCallFunction(n.bind(e))(t):i(t),Object.defineProperty(a,"result",{get:()=>(console.warn("当前返回结果为Promise类型,不可直接访问其result属性,详情请参考:https://uniapp.dcloud.net.cn/uniCloud/faq?id=promise"),{})}),a.then((e=>("undefined"!=typeof UTSJSONObject&&(e.result=new UTSJSONObject(e.result)),e)))}}qu=class{constructor(){throw Fu({message:`Platform ${Ta} is not enabled, please check whether secure network module is enabled in your manifest.json`})}};const Wu=Symbol("CLIENT_DB_INTERNAL");function zu(e,t){return e.then="DoNotReturnProxyWithAFunctionNamedThen",e._internalType=Wu,e.inspect=null,e.__v_raw=void 0,new Proxy(e,{get(e,n,o){if("_uniClient"===n)return null;if("symbol"==typeof n)return e[n];if(n in e||"string"!=typeof n){const t=e[n];return"function"==typeof t?t.bind(e):t}return t.get(e,n,o)}})}function Ju(e){return{on:(t,n)=>{e[t]=e[t]||[],e[t].indexOf(n)>-1||e[t].push(n)},off:(t,n)=>{e[t]=e[t]||[];const o=e[t].indexOf(n);-1!==o&&e[t].splice(o,1)}}}const Gu=["db.Geo","db.command","command.aggregate"];function Qu(e,t){return Gu.indexOf(`${e}.${t}`)>-1}function Yu(e){switch(ma(e=ec(e))){case"array":return e.map((e=>Yu(e)));case"object":return e._internalType===Wu||Object.keys(e).forEach((t=>{e[t]=Yu(e[t])})),e;case"regexp":return{$regexp:{source:e.source,flags:e.flags}};case"date":return{$date:e.toISOString()};default:return e}}function Xu(e){return e&&e.content&&e.content.$method}class Zu{constructor(e,t,n){this.content=e,this.prevStage=t||null,this.udb=null,this._database=n}toJSON(){let e=this;const t=[e.content];for(;e.prevStage;)e=e.prevStage,t.push(e.content);return{$db:t.reverse().map((e=>({$method:e.$method,$param:Yu(e.$param)})))}}toString(){return JSON.stringify(this.toJSON())}getAction(){const e=this.toJSON().$db.find((e=>"action"===e.$method));return e&&e.$param&&e.$param[0]}getCommand(){return{$db:this.toJSON().$db.filter((e=>"action"!==e.$method))}}get isAggregate(){let e=this;for(;e;){const t=Xu(e),n=Xu(e.prevStage);if("aggregate"===t&&"collection"===n||"pipeline"===t)return!0;e=e.prevStage}return!1}get isCommand(){let e=this;for(;e;){if("command"===Xu(e))return!0;e=e.prevStage}return!1}get isAggregateCommand(){let e=this;for(;e;){const t=Xu(e),n=Xu(e.prevStage);if("aggregate"===t&&"command"===n)return!0;e=e.prevStage}return!1}getNextStageFn(e){const t=this;return function(){return el({$method:e,$param:Yu(Array.from(arguments))},t,t._database)}}get count(){return this.isAggregate?this.getNextStageFn("count"):function(){return this._send("count",Array.from(arguments))}}get remove(){return this.isCommand?this.getNextStageFn("remove"):function(){return this._send("remove",Array.from(arguments))}}get(){return this._send("get",Array.from(arguments))}get add(){return this.isCommand?this.getNextStageFn("add"):function(){return this._send("add",Array.from(arguments))}}update(){return this._send("update",Array.from(arguments))}end(){return this._send("end",Array.from(arguments))}get set(){return this.isCommand?this.getNextStageFn("set"):function(){throw new Error("JQL禁止使用set方法")}}_send(e,t){const n=this.getAction(),o=this.getCommand();return o.$db.push({$method:e,$param:Yu(t)}),this._database._callCloudFunction({action:n,command:o})}}function el(e,t,n){return zu(new Zu(e,t,n),{get(e,t){let o="db";return e&&e.content&&(o=e.content.$method),Qu(o,t)?el({$method:t},e,n):function(){return el({$method:t,$param:Yu(Array.from(arguments))},e,n)}}})}function tl({path:e,method:t}){return class{constructor(){this.param=Array.from(arguments)}toJSON(){return{$newDb:[...e.map((e=>({$method:e}))),{$method:t,$param:this.param}]}}toString(){return JSON.stringify(this.toJSON())}}}function nl(e,t={}){return zu(new e(t),{get:(e,t)=>Qu("db",t)?el({$method:t},null,e):function(){return el({$method:t,$param:Yu(Array.from(arguments))},null,e)}})}class ol extends class{constructor({uniClient:e={},isJQL:t=!1}={}){this._uniClient=e,this._authCallBacks={},this._dbCallBacks={},e._isDefault&&(this._dbCallBacks=Oa("_globalUniCloudDatabaseCallback")),t||(this.auth=Ju(this._authCallBacks)),this._isJQL=t,Object.assign(this,Ju(this._dbCallBacks)),this.env=zu({},{get:(e,t)=>({$env:t})}),this.Geo=zu({},{get:(e,t)=>tl({path:["Geo"],method:t})}),this.serverDate=tl({path:[],method:"serverDate"}),this.RegExp=tl({path:[],method:"RegExp"})}getCloudEnv(e){if("string"!=typeof e||!e.trim())throw new Error("getCloudEnv参数错误");return{$env:e.replace("$cloudEnv_","")}}_callback(e,t){const n=this._dbCallBacks;n[e]&&n[e].forEach((e=>{e(...t)}))}_callbackAuth(e,t){const n=this._authCallBacks;n[e]&&n[e].forEach((e=>{e(...t)}))}multiSend(){const e=Array.from(arguments),t=e.map((e=>{const t=e.getAction(),n=e.getCommand();if("getTemp"!==n.$db[n.$db.length-1].$method)throw new Error("multiSend只支持子命令内使用getTemp");return{action:t,command:n}}));return this._callCloudFunction({multiCommand:t,queryList:e})}}{_parseResult(e){return this._isJQL?e.result:e}_callCloudFunction({action:e,command:t,multiCommand:n,queryList:o}){function s(e,t){if(n&&o)for(let n=0;nRa(ja(i,"complete"),e))).then((()=>(s(null,e),za(Na,{type:Fa,content:e}),Promise.reject(e))))}const c=Ra(ja(i,"invoke")),u=this._uniClient;return c.then((()=>u.callFunction({name:"DCloud-clientDB",type:"CLIENT_DB",data:{action:e,command:t,multiCommand:n}}))).then((e=>{const{code:t,message:n,token:o,tokenExpired:c,systemInfo:u=[]}=e.result;if(u)for(let s=0;s(console.warn(n),o)})}}return h=e,Ra(ja(i,"success"),h).then((()=>Ra(ja(i,"complete"),h))).then((()=>{s(h,null);const e=r._parseResult(h);return za(Na,{type:Fa,content:e}),Promise.resolve(e)}));var h}),(e=>(/fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e.message)&&console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB"),a(new Xa({code:e.code||"SYSTEM_ERROR",message:e.message,requestId:e.requestId})))))}}const sl="token无效,跳转登录页面",rl="token过期,跳转登录页面",il={TOKEN_INVALID_TOKEN_EXPIRED:rl,TOKEN_INVALID_INVALID_CLIENTID:sl,TOKEN_INVALID:sl,TOKEN_INVALID_WRONG_TOKEN:sl,TOKEN_INVALID_ANONYMOUS_USER:sl},al={"uni-id-token-expired":rl,"uni-id-check-token-failed":sl,"uni-id-token-not-exist":sl,"uni-id-check-device-feature-failed":sl};function cl(e,t){let n="";return n=e?`${e}/${t}`:t,n.replace(/^\//,"")}function ul(e=[],t=""){const n=[],o=[];return e.forEach((e=>{!0===e.needLogin?n.push(cl(t,e.path)):!1===e.needLogin&&o.push(cl(t,e.path))})),{needLoginPage:n,notNeedLoginPage:o}}function ll(e){return e.split("?")[0].replace(/^\//,"")}function hl(){return function(e){let t=e&&e.$page&&e.$page.fullPath||"";return t?("/"!==t.charAt(0)&&(t="/"+t),t):t}(function(){const e=getCurrentPages();return e[e.length-1]}())}function fl(){return ll(hl())}function pl(e="",t={}){if(!e)return!1;if(!(t&&t.list&&t.list.length))return!1;const n=t.list,o=ll(e);return n.some((e=>e.pagePath===o))}const dl=!!ia.uniIdRouter,{loginPage:gl,routerNeedLogin:ml,resToLogin:yl,needLoginPage:_l,notNeedLoginPage:vl,loginPageInTabBar:wl}=function({pages:e=[],subPackages:t=[],uniIdRouter:n={},tabBar:o={}}=ia){const{loginPage:s,needLogin:r=[],resToLogin:i=!0}=n,{needLoginPage:a,notNeedLoginPage:c}=ul(e),{needLoginPage:u,notNeedLoginPage:l}=function(e=[]){const t=[],n=[];return e.forEach((e=>{const{root:o,pages:s=[]}=e,{needLoginPage:r,notNeedLoginPage:i}=ul(s,o);t.push(...r),n.push(...i)})),{needLoginPage:t,notNeedLoginPage:n}}(t);return{loginPage:s,routerNeedLogin:r,resToLogin:i,needLoginPage:[...a,...u],notNeedLoginPage:[...c,...l],loginPageInTabBar:pl(s,o)}}();if(_l.indexOf(gl)>-1)throw new Error(`Login page [${gl}] should not be "needLogin", please check your pages.json`);function bl(e){const t=fl();if("/"===e.charAt(0))return e;const[n,o]=e.split("?"),s=n.replace(/^\//,"").split("/"),r=t.split("/");r.pop();for(let i=0;i-1?o+`&uniIdRedirectUrl=${encodeURIComponent(s)}`:o+`?uniIdRedirectUrl=${encodeURIComponent(s)}`:o);var o,s;wl?"navigateTo"!==e&&"redirectTo"!==e||(e="switchTab"):"switchTab"===e&&(e="navigateTo");const r={navigateTo:Gt.navigateTo,redirectTo:Gt.redirectTo,switchTab:Gt.switchTab,reLaunch:Gt.reLaunch};setTimeout((()=>{r[e]({url:n})}),0)}function kl({url:e}={}){const t={abortLoginPageJump:!1,autoToLoginPage:!1},n=function(){const{token:e,tokenExpired:t}=tc();let n;if(e){if(t-1)&&(_l.indexOf(t)>-1||ml.some((t=>{return n=e,new RegExp(t).test(n);var n})))}(e)&&n){if(n.uniIdRedirectUrl=e,Va(Da).length>0)return setTimeout((()=>{za(Da,n)}),0),t.abortLoginPageJump=!0,t;t.autoToLoginPage=!0}return t}function Tl(){!function(){const e=hl(),{abortLoginPageJump:t,autoToLoginPage:n}=kl({url:e});t||n&&Sl({api:"redirectTo",redirect:e})}();const e=["navigateTo","redirectTo","reLaunch","switchTab"];for(let t=0;t{const{type:t,content:n}=e;let o=!1;switch(t){case"cloudobject":o=function(e){if("object"!=typeof e)return!1;const{errCode:t}=e||{};return t in al}(n);break;case"clientdb":o=function(e){if("object"!=typeof e)return!1;const{errCode:t}=e||{};return t in il}(n)}o&&function(e={}){const t=Va(Da);Qa().then((()=>{const n=hl();if(n&&xl({redirect:n}))return t.length>0?za(Da,Object.assign({uniIdRedirectUrl:n},e)):void(gl&&Sl({api:"navigateTo",redirect:n}))}))}(n)}))}function Il(e){var t;(t=e).onResponse=function(e){Ka(Na,e)},t.offResponse=function(e){Wa(Na,e)},function(e){e.onNeedLogin=function(e){Ka(Da,e)},e.offNeedLogin=function(e){Wa(Da,e)},dl&&(Oa("_globalUniCloudStatus").needLoginInit||(Oa("_globalUniCloudStatus").needLoginInit=!0,Qa().then((()=>{Tl.call(e)})),yl&&Pl.call(e)))}(e),function(e){e.onRefreshToken=function(e){Ka(Ba,e)},e.offRefreshToken=function(e){Wa(Ba,e)}}(e)}let Al;const Ol="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Cl=/^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;function El(){const e=tc().token||"",t=e.split(".");if(!e||3!==t.length)return{uid:null,role:[],permission:[],tokenExpired:0};let n;try{n=JSON.parse((o=t[1],decodeURIComponent(Al(o).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))))}catch(s){throw new Error("获取当前用户信息出错,详细错误信息为:"+s.message)}var o;return n.tokenExpired=1e3*n.exp,delete n.exp,delete n.iat,n}Al="function"!=typeof atob?function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!Cl.test(e))throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");var t;e+="==".slice(2-(3&e.length));for(var n,o,s="",r=0;r>16&255):64===o?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return s}:atob;var Ll=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(aa((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n="chooseAndUploadFile:ok",o="chooseAndUploadFile:fail";function s(e,t){return e.tempFiles.forEach(((e,n)=>{e.name||(e.name=e.path.substring(e.path.lastIndexOf("/")+1)),t&&(e.fileType=t),e.cloudPath=Date.now()+"_"+n+e.name.substring(e.name.lastIndexOf("."))})),e.tempFilePaths||(e.tempFilePaths=e.tempFiles.map((e=>e.path))),e}function r(e,t,{onChooseFile:o,onUploadProgress:s}){return t.then((e=>{if(o){const t=o(e);if(void 0!==t)return Promise.resolve(t).then((t=>void 0===t?e:t))}return e})).then((t=>!1===t?{errMsg:n,tempFilePaths:[],tempFiles:[]}:function(e,t,o=5,s){(t=Object.assign({},t)).errMsg=n;const r=t.tempFiles,i=r.length;let a=0;return new Promise((n=>{for(;a=i)return void(!r.find((e=>!e.url&&!e.errMsg))&&n(t));const u=r[o];e.uploadFile({provider:u.provider,filePath:u.path,cloudPath:u.cloudPath,fileType:u.fileType,cloudPathAsRealPath:u.cloudPathAsRealPath,onUploadProgress(e){e.index=o,e.tempFile=u,e.tempFilePath=u.path,s&&s(e)}}).then((e=>{u.url=e.fileID,o{u.errMsg=e.errMsg||e.message,o{Gt.chooseImage({count:t,sizeType:n,sourceType:r,extension:i,success(t){e(s(t,"image"))},fail(e){a({errMsg:e.errMsg.replace("chooseImage:fail",o)})}})}))}(t),t):"video"===t.type?r(e,function(e){const{camera:t,compressed:n,maxDuration:r,sourceType:i=["album","camera"],extension:a}=e;return new Promise(((e,c)=>{Gt.chooseVideo({camera:t,compressed:n,maxDuration:r,sourceType:i,extension:a,success(t){const{tempFilePath:n,duration:o,size:r,height:i,width:a}=t;e(s({errMsg:"chooseVideo:ok",tempFilePaths:[n],tempFiles:[{name:t.tempFile&&t.tempFile.name||"",path:n,size:r,type:t.tempFile&&t.tempFile.type||"",width:a,height:i,duration:o,fileType:"video",cloudPath:""}]},"video"))},fail(e){c({errMsg:e.errMsg.replace("chooseVideo:fail",o)})}})}))}(t),t):r(e,function(e){const{count:t,extension:n}=e;return new Promise(((e,r)=>{let i=Gt.chooseFile;if(void 0!==Jt&&"function"==typeof Jt.chooseMessageFile&&(i=Jt.chooseMessageFile),"function"!=typeof i)return r({errMsg:o+" 请指定 type 类型,该平台仅支持选择 image 或 video。"});i({type:"all",count:t,extension:n,success(t){e(s(t))},fail(e){r({errMsg:e.errMsg.replace("chooseFile:fail",o)})}})}))}(t),t)}}})));function $l(e){return{props:{localdata:{type:Array,default:()=>[]},options:{type:[Object,Array],default:()=>({})},spaceInfo:{type:Object,default:()=>({})},collection:{type:[String,Array],default:""},action:{type:String,default:""},field:{type:String,default:""},orderby:{type:String,default:""},where:{type:[String,Object],default:""},pageData:{type:String,default:"add"},pageCurrent:{type:Number,default:1},pageSize:{type:Number,default:20},getcount:{type:[Boolean,String],default:!1},gettree:{type:[Boolean,String],default:!1},gettreepath:{type:[Boolean,String],default:!1},startwith:{type:String,default:""},limitlevel:{type:Number,default:10},groupby:{type:String,default:""},groupField:{type:String,default:""},distinct:{type:[Boolean,String],default:!1},foreignKey:{type:String,default:""},loadtime:{type:String,default:"auto"},manual:{type:Boolean,default:!1}},data:()=>({mixinDatacomLoading:!1,mixinDatacomHasMore:!1,mixinDatacomResData:[],mixinDatacomErrorMessage:"",mixinDatacomPage:{},mixinDatacomError:null}),created(){this.mixinDatacomPage={current:this.pageCurrent,size:this.pageSize,count:0},this.$watch((()=>{var e=[];return["pageCurrent","pageSize","localdata","collection","action","field","orderby","where","getont","getcount","gettree","groupby","groupField","distinct"].forEach((t=>{e.push(this[t])})),e}),((e,t)=>{if("manual"===this.loadtime)return;let n=!1;const o=[];for(let s=2;s{this.mixinDatacomLoading=!1;const{data:o,count:s}=n.result;this.getcount&&(this.mixinDatacomPage.count=s),this.mixinDatacomHasMore=o.length{this.mixinDatacomLoading=!1,this.mixinDatacomErrorMessage=e,this.mixinDatacomError=e,n&&n(e)})))},mixinDatacomGet(t={}){let n;t=t||{},n="undefined"!=typeof __uniX&&__uniX?e.databaseForJQL(this.spaceInfo):e.database(this.spaceInfo);const o=t.action||this.action;o&&(n=n.action(o));const s=t.collection||this.collection;n=Array.isArray(s)?n.collection(...s):n.collection(s);const r=t.where||this.where;r&&Object.keys(r).length&&(n=n.where(r));const i=t.field||this.field;i&&(n=n.field(i));const a=t.foreignKey||this.foreignKey;a&&(n=n.foreignKey(a));const c=t.groupby||this.groupby;c&&(n=n.groupBy(c));const u=t.groupField||this.groupField;u&&(n=n.groupField(u)),!0===(void 0!==t.distinct?t.distinct:this.distinct)&&(n=n.distinct());const l=t.orderby||this.orderby;l&&(n=n.orderBy(l));const h=void 0!==t.pageCurrent?t.pageCurrent:this.mixinDatacomPage.current,f=void 0!==t.pageSize?t.pageSize:this.mixinDatacomPage.size,p=void 0!==t.getcount?t.getcount:this.getcount,d=void 0!==t.gettree?t.gettree:this.gettree,g=void 0!==t.gettreepath?t.gettreepath:this.gettreepath,m={getCount:p},y={limitLevel:void 0!==t.limitlevel?t.limitlevel:this.limitlevel,startWith:void 0!==t.startwith?t.startwith:this.startwith};return d&&(m.getTree=y),g&&(m.getTreePath=y),n=n.skip(f*(h-1)).limit(f).get(m),n}}}}function Rl(e){return Oa("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}",e.config.spaceId))}async function jl({openid:e,callLoginByWeixin:t=!1}={}){const n=Rl(this);if(e&&t)throw new Error("[SecureNetwork] openid and callLoginByWeixin cannot be passed at the same time");if(e)return n.mpWeixinOpenid=e,{};const o=await new Promise(((e,t)=>{Gt.login({success(t){e(t.code)},fail(e){t(new Error(e.errMsg))}})})),s=this.importObject("uni-id-co",{customUI:!0});return await s.secureNetworkHandshakeByWeixin({code:o,callLoginByWeixin:t}),n.mpWeixinCode=o,{code:o}}async function Ml(e){const t=Rl(this);return t.initPromise||(t.initPromise=jl.call(this,e).then((e=>e)).catch((e=>{throw delete t.initPromise,e}))),t.initPromise}function Ul(e){ac=e}function Nl(e){const t={getSystemInfo:Gt.getSystemInfo,getPushClientId:Gt.getPushClientId};return function(n){return new Promise(((o,s)=>{t[e]({...n,success(e){o(e)},fail(e){s(e)}})}))}}class Dl extends class{constructor(){this._callback={}}addListener(e,t){this._callback[e]||(this._callback[e]=[]),this._callback[e].push(t)}on(e,t){return this.addListener(e,t)}removeListener(e,t){if(!t)throw new Error('The "listener" argument must be of type function. Received undefined');const n=this._callback[e];if(!n)return;const o=function(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]===t)return n;return-1}(n,t);n.splice(o,1)}off(e,t){return this.removeListener(e,t)}removeAllListener(e){delete this._callback[e]}emit(e,...t){const n=this._callback[e];if(n)for(let o=0;o{if(!e)throw new Error("Invalid appId, please check the manifest.json file");if(!t)throw new Error("Invalid push client id");this._appId=e,this._pushClientId=t,this._seqId=Date.now()+"-"+Math.floor(9e5*Math.random()+1e5),this.emit("open"),this._initMessageListener()}),(e=>{throw this.emit("error",e),this.close(),e}))}async open(){return this.init()}_isUniCloudSSE(e){if("receive"!==e.type)return!1;const t=e&&e.data&&e.data.payload;return!(!t||"UNI_CLOUD_SSE"!==t.channel||t.seqId!==this._seqId)}_receivePushMessage(e){if(!this._isUniCloudSSE(e))return;const t=e&&e.data&&e.data.payload,{action:n,messageId:o,message:s}=t;this._payloadQueue.push({action:n,messageId:o,message:s}),this._consumMessage()}_consumMessage(){for(;;){const e=this._payloadQueue.find((e=>e.messageId===this._currentMessageId+1));if(!e)break;this._currentMessageId++,this._parseMessagePayload(e)}}_parseMessagePayload(e){const{action:t,messageId:n,message:o}=e;"end"===t?this._end({messageId:n,message:o}):"message"===t&&this._appendMessage({messageId:n,message:o})}_appendMessage({messageId:e,message:t}={}){this.emit("message",t)}_end({messageId:e,message:t}={}){this.emit("end",t),this.close()}_initMessageListener(){Gt.onPushMessage(this._uniPushMessageCallback)}_destroy(){Gt.offPushMessage(this._uniPushMessageCallback)}toJSON(){return{appId:this._appId,pushClientId:this._pushClientId,seqId:this._seqId}}close(){this._destroy(),this.emit("close")}}const Bl={tcb:bu,tencent:bu,aliyun:fc,private:ku,dcloud:ku,alipay:$u};let Fl=new class{init(e){let t={};const n=Bl[e.provider];if(!n)throw new Error("未提供正确的provider参数");var o;return t=n.init(e),function(e){e._initPromiseHub||(e._initPromiseHub=new xa({createPromise:function(){let t=Promise.resolve();t=new Promise((e=>{setTimeout((()=>{e()}),1)}));const n=e.auth();return t.then((()=>n.getLoginState())).then((e=>e?Promise.resolve():n.signInAnonymously()))}}))}(t),Ku(t),function(e){const t=e.uploadFile;e.uploadFile=function(e){return t.call(this,e)}}(t),(o=t).database=function(e){if(e&&Object.keys(e).length>0)return o.init(e).database();if(this._database)return this._database;const t=nl(ol,{uniClient:o});return this._database=t,t},o.databaseForJQL=function(e){if(e&&Object.keys(e).length>0)return o.init(e).databaseForJQL();if(this._databaseForJQL)return this._databaseForJQL;const t=nl(ol,{uniClient:o,isJQL:!0});return this._databaseForJQL=t,t},function(e){e.getCurrentUserInfo=El,e.chooseAndUploadFile=Ll.initChooseAndUploadFile(e),Object.assign(e,{get mixinDatacom(){return $l(e)}}),e.SSEChannel=Dl,e.initSecureNetworkByWeixin=function(e){return function({openid:t,callLoginByWeixin:n=!1}={}){return Ml.call(e,{openid:t,callLoginByWeixin:n})}}(e),e.setCustomClientInfo=Ul,e.importObject=function(t){return function(n,o={}){o=function(e,t={}){return e.customUI=t.customUI||e.customUI,e.parseSystemError=t.parseSystemError||e.parseSystemError,Object.assign(e.loadingOptions,t.loadingOptions),Object.assign(e.errorOptions,t.errorOptions),"object"==typeof t.secretMethods&&(e.secretMethods=t.secretMethods),e}({customUI:!1,loadingOptions:{title:"加载中...",mask:!0},errorOptions:{type:"modal",retry:!1}},o);const{customUI:s,loadingOptions:r,errorOptions:i,parseSystemError:a}=o,c=!s;return new Proxy({},{get(s,u){switch(u){case"toString":return"[object UniCloudObject]";case"toJSON":return{}}return function({fn:e,interceptorName:t,getCallbackArgs:n}={}){return async function(...o){const s=n?n({params:o}):{};let r,i;try{return await Ra(ja(t,"invoke"),{...s}),r=await e(...o),await Ra(ja(t,"success"),{...s,result:r}),r}catch(a){throw i=a,await Ra(ja(t,"fail"),{...s,error:i}),i}finally{await Ra(ja(t,"complete"),i?{...s,error:i}:{...s,result:r})}}}({fn:async function s(...l){let h;c&&Gt.showLoading({title:r.title,mask:r.mask});const f={name:n,type:"OBJECT",data:{method:u,params:l}};"object"==typeof o.secretMethods&&function(e,t){const n=t.data.method,o=e.secretMethods||{},s=o[n]||o["*"];s&&(t.secretType=s)}(o,f);let p=!1;try{h=await t.callFunction(f)}catch(e){p=!0,h={result:new Xa(e)}}const{errSubject:d,errCode:g,errMsg:m,newToken:y}=h.result||{};if(c&&Gt.hideLoading(),y&&y.token&&y.tokenExpired&&(nc(y),za(Ba,{...y})),g){let e=m;if(p&&a&&(e=(await a({objectName:n,methodName:u,params:l,errSubject:d,errCode:g,errMsg:m})).errMsg||m),c)if("toast"===i.type)Gt.showToast({title:e,icon:"none"});else{if("modal"!==i.type)throw new Error(`Invalid errorOptions.type: ${i.type}`);{const{confirm:t}=await async function({title:e,content:t,showCancel:n,cancelText:o,confirmText:s}={}){return new Promise(((r,i)=>{Gt.showModal({title:e,content:t,showCancel:n,cancelText:o,confirmText:s,success(e){r(e)},fail(){r({confirm:!1,cancel:!0})}})}))}({title:"提示",content:e,showCancel:i.retry,cancelText:"取消",confirmText:i.retry?"重试":"确定"});if(i.retry&&t)return s(...l)}}const t=new Xa({subject:d,code:g,message:m,requestId:h.requestId});throw t.detail=h.result,za(Na,{type:Ha,content:t}),t}return za(Na,{type:Ha,content:h.result}),h.result},interceptorName:"callObject",getCallbackArgs:function({params:e}={}){return{objectName:n,methodName:u,params:e}}})}})}}(e)}(t),["callFunction","uploadFile","deleteFile","getTempFileURL","downloadFile","chooseAndUploadFile"].forEach((e=>{if(!t[e])return;const n=t[e];t[e]=function(){return n.apply(t,Array.from(arguments))},t[e]=function(e,t){return function(n){let o=!1;if("callFunction"===t){const e=n&&n.type||pa;o=e!==pa}const s="callFunction"===t&&!o,r=this._initPromiseHub.exec();n=n||{};const{success:i,fail:a,complete:c}=Ya(n),u=r.then((()=>o?Promise.resolve():Ra(ja(t,"invoke"),n))).then((()=>e.call(this,n))).then((e=>o?Promise.resolve(e):Ra(ja(t,"success"),e).then((()=>Ra(ja(t,"complete"),e))).then((()=>(s&&za(Na,{type:qa,content:e}),Promise.resolve(e))))),(e=>o?Promise.reject(e):Ra(ja(t,"fail"),e).then((()=>Ra(ja(t,"complete"),e))).then((()=>(za(Na,{type:qa,content:e}),Promise.reject(e))))));if(!(i||a||c))return u;u.then((e=>{i&&i(e),c&&c(e),s&&za(Na,{type:qa,content:e})}),(e=>{a&&a(e),c&&c(e),s&&za(Na,{type:qa,content:e})}))}}(t[e],e).bind(t)})),t.init=this.init,t}};(()=>{const e=Pa;let t={};if(e&&1===e.length)t=e[0],Fl=Fl.init(t),Fl._isDefault=!0;else{const t=["auth","callFunction","uploadFile","deleteFile","getTempFileURL","downloadFile","database","getCurrentUSerInfo","importObject"];let n;n=e&&e.length>0?"应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间":"应用未关联服务空间,请在uniCloud目录右键关联服务空间",t.forEach((e=>{Fl[e]=function(){return console.error(n),Promise.reject(new Xa({code:"SYS_ERR",message:n}))}}))}Object.assign(Fl,{get mixinDatacom(){return $l(Fl)}}),Il(Fl),Fl.addInterceptor=La,Fl.removeInterceptor=$a,Fl.interceptObject=Ma})();var ql=Fl;exports.Ys=ql,exports._export_sfc=(e,t)=>{const n=e.__vccOpts||e;for(const[o,s]of t)n[o]=s;return n},exports.computed=cr,exports.createSSRApp=Xr,exports.createStore=function(e){return new Xi(e)},exports.e=(e,...t)=>a(e,...t),exports.f=(e,t)=>function(e,t){let n;if(h(e)||g(e)){n=new Array(e.length);for(let o=0,s=e.length;ot(e,n,n)));else{const o=Object.keys(e);n=new Array(o.length);for(let s=0,r=o.length;s{if("function"!=typeof getApp)r=function(e,t){return s.t(e,t)};else{let e=!1;r=function(t,n){const o=getApp().$vm;return o&&(o.$locale,e||(e=!0,function(e,t){e.$watchLocale?e.$watchLocale((e=>{t.setLocale(e)})):e.$watch((()=>e.$locale),(e=>{t.setLocale(e)}))}(o,s))),s.t(t,n)}}return r(e,t)};return{i18n:s,f:(e,t,n)=>s.f(e,t,n),t:(e,t)=>r(e,t),add:(e,t,n=!0)=>s.add(e,t,n),watch:e=>s.watchLocale(e),getLocale:()=>s.getLocale(),setLocale:e=>s.setLocale(e)}},exports.isRef=yo,exports.n=e=>B(e),exports.nextTick$1=jo,exports.o=(e,t)=>Jr(e,t),exports.onLoad=na,exports.onPageScroll=oa,exports.onPullDownRefresh=ra,exports.onReachBottom=sa,exports.onShow=ta,exports.p=e=>function(e){const{uid:t,__counter:n}=Xs();return t+","+((Vr[t]||(Vr[t]=[])).push(zs(e))-1)+","+n}(e),exports.r=(e,t,n)=>Qr(e,t,n),exports.reactive=oo,exports.ref=_o,exports.resolveComponent=function(e,t){return function(e,t,n=!0,o=!1){const s=Wo||Ys;if(s){const n=s.type;if("components"===e){const e=function(e,t=!0){return d(e)?e.displayName||e.name:e.name||t&&e.__name}(n,!1);if(e&&(e===t||e===P(t)||e===O(P(t))))return n}const r=Jo(s[e]||n[e],t)||Jo(s.appContext[e],t);return!r&&o?n:r}}("components",e,!0,t)||e},exports.s=e=>Yr(e),exports.sr=(e,t,n)=>function(e,t,n={}){const{$templateRefs:o}=Xs();o.push({i:t,r:e,k:n.k,f:n.f})}(e,t,n),exports.t=e=>(e=>g(e)?e:null==e?"":h(e)||y(e)&&(e.toString===v||!d(e.toString))?JSON.stringify(e,F,2):String(e))(e),exports.unref=wo,exports.wx$1=Jt;