import{x as k,a2 as O,a3 as z,a4 as C,a5 as w,a6 as I,a7 as D}from"./C3Ck-LNv.js";function v(t){return typeof t=="string"?`'${t}'`:new R().serialize(t)}const R=(function(){class t{#e=new Map;compare(e,r){const o=typeof e,a=typeof r;return o==="string"&&a==="string"?e.localeCompare(r):o==="number"&&a==="number"?e-r:String.prototype.localeCompare.call(this.serialize(e,!0),this.serialize(r,!0))}serialize(e,r){if(e===null)return"null";switch(typeof e){case"string":return r?e:`'${e}'`;case"bigint":return`${e}n`;case"object":return this.$object(e);case"function":return this.$function(e)}return String(e)}serializeObject(e){const r=Object.prototype.toString.call(e);if(r!=="[object Object]")return this.serializeBuiltInType(r.length<10?`unknown:${r}`:r.slice(8,-1),e);const o=e.constructor,a=o===Object||o===void 0?"":o.name;if(a!==""&&globalThis[a]===o)return this.serializeBuiltInType(a,e);if(typeof e.toJSON=="function"){const n=e.toJSON();return a+(n!==null&&typeof n=="object"?this.$object(n):`(${this.serialize(n)})`)}return this.serializeObjectEntries(a,Object.entries(e))}serializeBuiltInType(e,r){const o=this["$"+e];if(o)return o.call(this,r);if(typeof r?.entries=="function")return this.serializeObjectEntries(e,r.entries());throw new Error(`Cannot serialize ${e}`)}serializeObjectEntries(e,r){const o=Array.from(r).sort((n,s)=>this.compare(n[0],s[0]));let a=`${e}{`;for(let n=0;nthis.compare(r,o)))}`}$Map(e){return this.serializeObjectEntries("Map",e.entries())}}for(const i of["Error","RegExp","URL"])t.prototype["$"+i]=function(e){return`${i}(${e})`};for(const i of["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"])t.prototype["$"+i]=function(e){return`${i}[${e.join(",")}]`};for(const i of["BigInt64Array","BigUint64Array"])t.prototype["$"+i]=function(e){return`${i}[${e.join("n,")}${e.length>0?"n":""}]`};return t})();function N(t,i){return t===i||v(t)===v(i)}const U=(()=>{const t=function(){};return t.prototype=Object.create(null),t})();function x(t,i){if(typeof t!="string")throw new TypeError("argument str must be a string");const e=new U,r=i||{},o=r.decode||M;let a=0;for(;a{const i=decodeURIComponent(t),e=z(i);return typeof e=="number"&&(!Number.isFinite(e)||String(e)!==i)?i:e},encode:t=>encodeURIComponent(typeof t=="string"?t:JSON.stringify(t))},m=globalThis.cookieStore;function V(t,i){const e={...P,...i};e.filter??=u=>u===t;const r=A(e)||{};let o;e.maxAge!==void 0?o=e.maxAge*1e3:e.expires&&(o=e.expires.getTime()-Date.now());const a=o!==void 0&&o<=0,n=a||r[t]===void 0||r[t]===null,s=l(a?void 0:r[t]??e.default?.()),c=o&&!a?H(s,o,e.watch&&e.watch!=="shallow"):k(s);{let u=null;try{!m&&typeof BroadcastChannel<"u"&&(u=new BroadcastChannel(`nuxt:cookies:${t}`))}catch{}const h=(f=!1)=>{!f&&(e.readonly||N(c.value,r[t]))||(_(t,c.value,e),r[t]=l(c.value),u?.postMessage({value:e.encode(c.value)}))},p=f=>{const y=f.refresh?A(e)?.[t]:e.decode(f.value);d=!0,c.value=y,r[t]=l(y),D(()=>{d=!1})};let d=!1;const $=!!C();if($&&w(()=>{d=!0,h(),u?.close()}),m){const f=y=>{const S=y.changed.find(b=>b.name===t),T=y.deleted.find(b=>b.name===t);S&&p({value:S.value}),T&&p({value:null})};m.addEventListener("change",f),$&&w(()=>m.removeEventListener("change",f))}else u&&(u.onmessage=({data:f})=>p(f));e.watch&&O(c,()=>{d||h()},{deep:e.watch!=="shallow"}),n&&h(n)}return c}function A(t={}){return x(document.cookie,t)}function F(t,i,e={}){return i==null?j(t,i,{...e,maxAge:-1}):j(t,i,e)}function _(t,i,e={}){document.cookie=F(t,i,e)}const E=2147483647;function H(t,i,e){let r,o,a=0;const n=e?k(t):{value:t};return C()&&w(()=>{o?.(),clearTimeout(r)}),I((s,c)=>{e&&(o=O(n,c));function u(){const p=i-a,d=p{if(a+=d,a