You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1 lines
741 B

import{e as f,a5 as p,a6 as c,A as r}from"./CfpW9SkI.js";const l="$s";function y(...t){const a=typeof t[t.length-1]=="string"?t.pop():void 0;typeof t[0]!="string"&&t.unshift(a);const[n,e]=t;if(!n||typeof n!="string")throw new TypeError("[nuxt] [useState] key must be a string: "+n);if(e!==void 0&&typeof e!="function")throw new Error("[nuxt] [useState] init must be a function: "+e);const i=l+n,u=f(),s=p(u.payload.state,i);if(e&&(u._state[i]??={_default:e}),s.value===void 0&&e){const o=e();if(c(o))return u.payload.state[i]=o,o;s.value=o}return s}function v(){const t=y("app:loading",()=>0),a=r(()=>t.value>0);function n(){t.value++}function e(){t.value=Math.max(0,t.value-1)}return{count:t,loading:a,begin:n,end:e}}export{y as a,v as u};