import"./BPRC2v3K.js";/* empty css */import{S as H,a9 as S,k as x,D as L,aa as K,ab as N,Q as I,l as V,ac as U,ad as $,u as q,N as A,ae as W,h as J,m as Q,af as G,ag as D,s as X}from"./Ca9y1zsW.js";import{u as Y}from"./Ch8OMI22.js";import{E as P,i as Z}from"./Ak2swtwV.js";import{i as tt}from"./PFP8Cci7.js";const F=Object.freeze({ignoreUnknown:!1,respectType:!1,respectFunctionNames:!1,respectFunctionProperties:!1,unorderedObjects:!0,unorderedArrays:!1,unorderedSets:!1,excludeKeys:void 0,excludeValues:void 0,replacer:void 0});function et(r,a){a?a={...F,...a}:a=F;const s=j(a);return s.dispatch(r),s.toString()}const st=Object.freeze(["prototype","__proto__","constructor"]);function j(r){let a="",s=new Map;const e=t=>{a+=t};return{toString(){return a},getContext(){return s},dispatch(t){return r.replacer&&(t=r.replacer(t)),this[t===null?"null":typeof t](t)},object(t){if(t&&typeof t.toJSON=="function")return this.object(t.toJSON());const n=Object.prototype.toString.call(t);let o="";const c=n.length;c<10?o="unknown:["+n+"]":o=n.slice(8,c-1),o=o.toLowerCase();let l=null;if((l=s.get(t))===void 0)s.set(t,s.size);else return this.dispatch("[CIRCULAR:"+l+"]");if(typeof Buffer<"u"&&Buffer.isBuffer&&Buffer.isBuffer(t))return e("buffer:"),e(t.toString("utf8"));if(o!=="object"&&o!=="function"&&o!=="asyncfunction")this[o]?this[o](t):r.ignoreUnknown||this.unkown(t,o);else{let f=Object.keys(t);r.unorderedObjects&&(f=f.sort());let i=[];r.respectType!==!1&&!T(t)&&(i=st),r.excludeKeys&&(f=f.filter(u=>!r.excludeKeys(u)),i=i.filter(u=>!r.excludeKeys(u))),e("object:"+(f.length+i.length)+":");const p=u=>{this.dispatch(u),e(":"),r.excludeValues||this.dispatch(t[u]),e(",")};for(const u of f)p(u);for(const u of i)p(u)}},array(t,n){if(n=n===void 0?r.unorderedArrays!==!1:n,e("array:"+t.length+":"),!n||t.length<=1){for(const l of t)this.dispatch(l);return}const o=new Map,c=t.map(l=>{const f=j(r);f.dispatch(l);for(const[i,p]of f.getContext())o.set(i,p);return f.toString()});return s=o,c.sort(),this.array(c,!1)},date(t){return e("date:"+t.toJSON())},symbol(t){return e("symbol:"+t.toString())},unkown(t,n){if(e(n),!!t&&(e(":"),t&&typeof t.entries=="function"))return this.array(Array.from(t.entries()),!0)},error(t){return e("error:"+t.toString())},boolean(t){return e("bool:"+t)},string(t){e("string:"+t.length+":"),e(t)},function(t){e("fn:"),T(t)?this.dispatch("[native]"):this.dispatch(t.toString()),r.respectFunctionNames!==!1&&this.dispatch("function-name:"+String(t.name)),r.respectFunctionProperties&&this.object(t)},number(t){return e("number:"+t)},xml(t){return e("xml:"+t.toString())},null(){return e("Null")},undefined(){return e("Undefined")},regexp(t){return e("regex:"+t.toString())},uint8array(t){return e("uint8array:"),this.dispatch(Array.prototype.slice.call(t))},uint8clampedarray(t){return e("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(t))},int8array(t){return e("int8array:"),this.dispatch(Array.prototype.slice.call(t))},uint16array(t){return e("uint16array:"),this.dispatch(Array.prototype.slice.call(t))},int16array(t){return e("int16array:"),this.dispatch(Array.prototype.slice.call(t))},uint32array(t){return e("uint32array:"),this.dispatch(Array.prototype.slice.call(t))},int32array(t){return e("int32array:"),this.dispatch(Array.prototype.slice.call(t))},float32array(t){return e("float32array:"),this.dispatch(Array.prototype.slice.call(t))},float64array(t){return e("float64array:"),this.dispatch(Array.prototype.slice.call(t))},arraybuffer(t){return e("arraybuffer:"),this.dispatch(new Uint8Array(t))},url(t){return e("url:"+t.toString())},map(t){e("map:");const n=[...t];return this.array(n,r.unorderedSets!==!1)},set(t){e("set:");const n=[...t];return this.array(n,r.unorderedSets!==!1)},file(t){return e("file:"),this.dispatch([t.name,t.size,t.type,t.lastModfied])},blob(){if(r.ignoreUnknown)return e("[blob]");throw new Error(`Hashing Blob objects is currently not supported Use "options.replacer" or "options.ignoreUnknown" `)},domwindow(){return e("domwindow")},bigint(t){return e("bigint:"+t.toString())},process(){return e("process")},timer(){return e("timer")},pipe(){return e("pipe")},tcp(){return e("tcp")},udp(){return e("udp")},tty(){return e("tty")},statwatcher(){return e("statwatcher")},securecontext(){return e("securecontext")},connection(){return e("connection")},zlib(){return e("zlib")},context(){return e("context")},nodescript(){return e("nodescript")},httpparser(){return e("httpparser")},dataview(){return e("dataview")},signal(){return e("signal")},fsevent(){return e("fsevent")},tlswrap(){return e("tlswrap")}}}const E="[native code] }",rt=E.length;function T(r){return typeof r!="function"?!1:Function.prototype.toString.call(r).slice(-rt)===E}class w{constructor(a,s){a=this.words=a||[],this.sigBytes=s===void 0?a.length*4:s}toString(a){return(a||at).stringify(this)}concat(a){if(this.clamp(),this.sigBytes%4)for(let s=0;s>>2]>>>24-s%4*8&255;this.words[this.sigBytes+s>>>2]|=e<<24-(this.sigBytes+s)%4*8}else for(let s=0;s>>2]=a.words[s>>>2];return this.sigBytes+=a.sigBytes,this}clamp(){this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4)}clone(){return new w([...this.words])}}const at={stringify(r){const a=[];for(let s=0;s>>2]>>>24-s%4*8&255;a.push((e>>>4).toString(16),(e&15).toString(16))}return a.join("")}},nt={stringify(r){const a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",s=[];for(let e=0;e>>2]>>>24-e%4*8&255,n=r.words[e+1>>>2]>>>24-(e+1)%4*8&255,o=r.words[e+2>>>2]>>>24-(e+2)%4*8&255,c=t<<16|n<<8|o;for(let l=0;l<4&&e*8+l*6>>6*(3-l)&63))}return s.join("")}},it={parse(r){const a=r.length,s=[];for(let e=0;e>>2]|=(r.charCodeAt(e)&255)<<24-e%4*8;return new w(s,a)}},ot={parse(r){return it.parse(unescape(encodeURIComponent(r)))}};class ct{constructor(){this._data=new w,this._nDataBytes=0,this._minBufferSize=0,this.blockSize=512/32}reset(){this._data=new w,this._nDataBytes=0}_append(a){typeof a=="string"&&(a=ot.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes}_doProcessBlock(a,s){}_process(a){let s,e=this._data.sigBytes/(this.blockSize*4);a?e=Math.ceil(e):e=Math.max((e|0)-this._minBufferSize,0);const t=e*this.blockSize,n=Math.min(t*4,this._data.sigBytes);if(t){for(let o=0;o>>7)^(m<<14|m>>>18)^m>>>3,y=v[u-2],O=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;v[u]=C+v[u-7]+O+v[u-16]}const b=l&f^~l&i,B=t&n^t&o^n&o,h=(t<<30|t>>>2)^(t<<19|t>>>13)^(t<<10|t>>>22),_=(l<<26|l>>>6)^(l<<21|l>>>11)^(l<<7|l>>>25),g=p+_+b+ut[u]+v[u],d=h+B;p=i,i=f,f=l,l=c+g|0,c=o,o=n,n=t,t=g+d|0}e[0]=e[0]+t|0,e[1]=e[1]+n|0,e[2]=e[2]+o|0,e[3]=e[3]+c|0,e[4]=e[4]+l|0,e[5]=e[5]+f|0,e[6]=e[6]+i|0,e[7]=e[7]+p|0}finalize(a){super.finalize(a);const s=this._nDataBytes*8,e=this._data.sigBytes*8;return this._data.words[e>>>5]|=128<<24-e%32,this._data.words[(e+64>>>9<<4)+14]=Math.floor(s/4294967296),this._data.words[(e+64>>>9<<4)+15]=s,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}}function dt(r){return new ft().finalize(r).toString(nt)}function ht(r,a={}){const s=typeof r=="string"?r:et(r,a);return dt(s).slice(0,10)}const yt=r=>r==="defer"||r===!1;function pt(...r){var B;const a=typeof r[r.length-1]=="string"?r.pop():void 0;typeof r[0]!="string"&&r.unshift(a);let[s,e,t={}]=r;if(typeof s!="string")throw new TypeError("[nuxt] [asyncData] key must be a string.");if(typeof e!="function")throw new TypeError("[nuxt] [asyncData] handler must be a function.");const n=H(),o=e,c=()=>S.value,l=()=>n.isHydrating?n.payload.data[s]:n.static.data[s];t.server=t.server??!0,t.default=t.default??c,t.getCachedData=t.getCachedData??l,t.lazy=t.lazy??!1,t.immediate=t.immediate??!0,t.deep=t.deep??S.deep,t.dedupe=t.dedupe??"cancel";const f=()=>t.getCachedData(s,n)!=null;if(!n._asyncData[s]||!t.immediate){(B=n.payload._errors)[s]??(B[s]=S.errorValue);const h=t.deep?x:L;n._asyncData[s]={data:h(t.getCachedData(s,n)??t.default()),pending:x(!f()),error:K(n.payload._errors,s),status:x("idle"),_default:t.default}}const i={...n._asyncData[s]};delete i._default,i.refresh=i.execute=(h={})=>{if(n._asyncDataPromises[s]){if(yt(h.dedupe??t.dedupe))return n._asyncDataPromises[s];n._asyncDataPromises[s].cancelled=!0}if((h._initial||n.isHydrating&&h._initial!==!1)&&f())return Promise.resolve(t.getCachedData(s,n));i.pending.value=!0,i.status.value="pending";const _=new Promise((g,d)=>{try{g(o(n))}catch(m){d(m)}}).then(async g=>{if(_.cancelled)return n._asyncDataPromises[s];let d=g;t.transform&&(d=await t.transform(g)),t.pick&&(d=mt(d,t.pick)),n.payload.data[s]=d,i.data.value=d,i.error.value=S.errorValue,i.status.value="success"}).catch(g=>{if(_.cancelled)return n._asyncDataPromises[s];i.error.value=$(g),i.data.value=q(t.default()),i.status.value="error"}).finally(()=>{_.cancelled||(i.pending.value=!1,delete n._asyncDataPromises[s])});return n._asyncDataPromises[s]=_,n._asyncDataPromises[s]},i.clear=()=>gt(n,s);const p=()=>i.refresh({_initial:!0}),u=t.server!==!1&&n.payload.serverRendered;{const h=A();if(h&&!h._nuxtOnBeforeMountCbs){h._nuxtOnBeforeMountCbs=[];const d=h._nuxtOnBeforeMountCbs;N(()=>{d.forEach(m=>{m()}),d.splice(0,d.length)}),I(()=>d.splice(0,d.length))}u&&n.isHydrating&&(i.error.value||f())?(i.pending.value=!1,i.status.value=i.error.value?"error":"success"):h&&(n.payload.serverRendered&&n.isHydrating||t.lazy)&&t.immediate?h._nuxtOnBeforeMountCbs.push(p):t.immediate&&p();const _=W();if(t.watch){const d=V(t.watch,()=>i.refresh());_&&U(d)}const g=n.hook("app:data:refresh",async d=>{(!d||d.includes(s))&&await i.refresh()});_&&U(g)}const b=Promise.resolve(n._asyncDataPromises[s]).then(()=>i);return Object.assign(b,i),b}function gt(r,a){a in r.payload.data&&(r.payload.data[a]=void 0),a in r.payload._errors&&(r.payload._errors[a]=S.errorValue),r._asyncData[a]&&(r._asyncData[a].data.value=void 0,r._asyncData[a].error.value=S.errorValue,r._asyncData[a].pending.value=!1,r._asyncData[a].status.value="idle"),a in r._asyncDataPromises&&(r._asyncDataPromises[a]&&(r._asyncDataPromises[a].cancelled=!0),r._asyncDataPromises[a]=void 0)}function mt(r,a){const s={};for(const e of a)s[e]=r[e];return s}function _t(r,a,s){const[e={},t]=typeof a=="string"?[{},a]:[a,s],n=J(()=>D(r)),o=e.key||ht([t,typeof n.value=="string"?n.value:"",...wt(e)]);if(!o||typeof o!="string")throw new TypeError("[nuxt] [useFetch] key must be a string: "+o);if(!r)throw new Error("[nuxt] [useFetch] request is missing.");const c=o===t?"$f"+o:o;if(!e.baseURL&&typeof n.value=="string"&&n.value[0]==="/"&&n.value[1]==="/")throw new Error('[nuxt] [useFetch] the request URL must not start with "//".');const{server:l,lazy:f,default:i,transform:p,pick:u,watch:b,immediate:B,getCachedData:h,deep:_,dedupe:g,...d}=e,m=Q({...G,...d,cache:typeof e.cache=="boolean"?void 0:e.cache}),C={server:l,lazy:f,default:i,transform:p,pick:u,immediate:B,getCachedData:h,deep:_,dedupe:g,watch:b===!1?[]:[m,n,...b||[]]};let y;return pt(c,()=>{var R;(R=y==null?void 0:y.abort)==null||R.call(y),y=typeof AbortController<"u"?new AbortController:{};const z=D(e.timeout);let k;return z&&(k=setTimeout(()=>y.abort(),z),y.signal.onabort=()=>clearTimeout(k)),(e.$fetch||globalThis.$fetch)(n.value,{signal:y.signal,...m}).finally(()=>{clearTimeout(k)})},C)}function wt(r){var s;const a=[((s=D(r.method))==null?void 0:s.toUpperCase())||"GET",D(r.baseURL)];for(const e of[r.params||r.query]){const t=D(e);if(!t)continue;const n={};for(const[o,c]of Object.entries(t))n[D(o)]=D(c);a.push(n)}return a}const kt=(r,a)=>{const s=X(),e=x("");e.value=s.public.apiServer;const t=Y(),n=localStorage.getItem("token");n&&(t.value=n);const o={baseURL:e.value,onRequest({options:c}){c.headers=c.headers||{},t.value&&(c.headers.Authorization=t.value);const i=window.location.hostname.split(".")[0];tt(i)&&console.log(`${i}`),localStorage.getItem("TenantId")&&(c.headers.tenantid=`${localStorage.getItem("TenantId")}`)},onResponse({response:c}){return+c.status==0&&+c._data.code!=0&&P.error(c._data.message),+c.status==500&&P.error("网络请求错误"),c._data.data},onResponseError({response:c}){P.error(Z(c._data.data.message)?c._data.data.message[0]:c._data.data.message)}};return _t(r,{...o,...a},"$SQlhB7w0w2")};export{kt as u};