@emeryld/rrroutes-openapi 2.4.0 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -310,7 +310,7 @@ export default theme;`}function AA(e){return typeof e=="number"?`${(e*100).toFix
310
310
 
311
311
  `)}v.write("payload.value = newResult;"),v.write("return payload;");const C=v.compile();return(P,O)=>C(g,P,O)};let o;const a=Jc,l=!kv.jitless,d=l&&S4.value,f=t.catchall;let p;e._zod.parse=(g,v)=>{p??(p=n.value);const b=g.value;return a(b)?l&&d&&(v==null?void 0:v.async)===!1&&v.jitless!==!0?(o||(o=i(t.shape)),g=o(g,v),f?I5([],b,g,v,p,e):g):r(g,v):(g.issues.push({expected:"object",code:"invalid_type",input:b,inst:e}),g)}});function FT(e,t,r,n){for(const o of e)if(o.issues.length===0)return t.value=o.value,t;const i=e.filter(o=>!Zl(o));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(a=>Ko(a,n,ni())))}),t)}const D$=re("$ZodUnion",(e,t)=>{wt.init(e,t),Rt(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),Rt(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),Rt(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),Rt(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){const i=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${i.map(o=>db(o.source)).join("|")})$`)}});const r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(i,o)=>{if(r)return n(i,o);let a=!1;const l=[];for(const c of t.options){const d=c._zod.run({value:i.value,issues:[]},o);if(d instanceof Promise)l.push(d),a=!0;else{if(d.issues.length===0)return d;l.push(d)}}return a?Promise.all(l).then(c=>FT(c,i,e,o)):FT(l,i,e,o)}}),T5=re("$ZodDiscriminatedUnion",(e,t)=>{D$.init(e,t);const r=e._zod.parse;Rt(e._zod,"propValues",()=>{const i={};for(const o of t.options){const a=o._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(const[l,c]of Object.entries(a)){i[l]||(i[l]=new Set);for(const d of c)i[l].add(d)}}return i});const n=fh(()=>{var a;const i=t.options,o=new Map;for(const l of i){const c=(a=l._zod.propValues)==null?void 0:a[t.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(l)}"`);for(const d of c){if(o.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);o.set(d,l)}}return o});e._zod.parse=(i,o)=>{const a=i.value;if(!Jc(a))return i.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),i;const l=n.value.get(a==null?void 0:a[t.discriminator]);return l?l._zod.run(i,o):t.unionFallback?r(i,o):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:a,path:[t.discriminator],inst:e}),i)}}),R5=re("$ZodIntersection",(e,t)=>{wt.init(e,t),e._zod.parse=(r,n)=>{const i=r.value,o=t.left._zod.run({value:i,issues:[]},n),a=t.right._zod.run({value:i,issues:[]},n);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([c,d])=>WT(r,c,d)):WT(r,o,a)}});function Q1(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(bu(e)&&bu(t)){const r=Object.keys(t),n=Object.keys(e).filter(o=>r.indexOf(o)!==-1),i={...e,...t};for(const o of n){const a=Q1(e[o],t[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};i[o]=a.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<e.length;n++){const i=e[n],o=t[n],a=Q1(i,o);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function WT(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),Zl(e))return e;const n=Q1(t.value,r.value);if(!n.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return e.value=n.data,e}const L$=re("$ZodTuple",(e,t)=>{wt.init(e,t);const r=t.items;e._zod.parse=(n,i)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),n;n.value=[];const a=[],l=[...r].reverse().findIndex(f=>f._zod.optin!=="optional"),c=l===-1?0:r.length-l;if(!t.rest){const f=o.length>r.length,p=o.length<c-1;if(f||p)return n.issues.push({...f?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},input:o,inst:e,origin:"array"}),n}let d=-1;for(const f of r){if(d++,d>=o.length&&d>=c)continue;const p=f._zod.run({value:o[d],issues:[]},i);p instanceof Promise?a.push(p.then(g=>Sg(g,n,d))):Sg(p,n,d)}if(t.rest){const f=o.slice(r.length);for(const p of f){d++;const g=t.rest._zod.run({value:p,issues:[]},i);g instanceof Promise?a.push(g.then(v=>Sg(v,n,d))):Sg(g,n,d)}}return a.length?Promise.all(a).then(()=>n):n}});function Sg(e,t,r){e.issues.length&&t.issues.push(...Do(r,e.issues)),t.value[r]=e.value}const M5=re("$ZodRecord",(e,t)=>{wt.init(e,t),e._zod.parse=(r,n)=>{const i=r.value;if(!bu(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),r;const o=[],a=t.keyType._zod.values;if(a){r.value={};const l=new Set;for(const d of a)if(typeof d=="string"||typeof d=="number"||typeof d=="symbol"){l.add(typeof d=="number"?d.toString():d);const f=t.valueType._zod.run({value:i[d],issues:[]},n);f instanceof Promise?o.push(f.then(p=>{p.issues.length&&r.issues.push(...Do(d,p.issues)),r.value[d]=p.value})):(f.issues.length&&r.issues.push(...Do(d,f.issues)),r.value[d]=f.value)}let c;for(const d in i)l.has(d)||(c=c??[],c.push(d));c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:c})}else{r.value={};for(const l of Reflect.ownKeys(i)){if(l==="__proto__")continue;const c=t.keyType._zod.run({value:l,issues:[]},n);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(c.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(f=>Ko(f,n,ni())),input:l,path:[l],inst:e}),r.value[c.value]=c.value;continue}const d=t.valueType._zod.run({value:i[l],issues:[]},n);d instanceof Promise?o.push(d.then(f=>{f.issues.length&&r.issues.push(...Do(l,f.issues)),r.value[c.value]=f.value})):(d.issues.length&&r.issues.push(...Do(l,d.issues)),r.value[c.value]=d.value)}}return o.length?Promise.all(o).then(()=>r):r}}),N5=re("$ZodMap",(e,t)=>{wt.init(e,t),e._zod.parse=(r,n)=>{const i=r.value;if(!(i instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:i,inst:e}),r;const o=[];r.value=new Map;for(const[a,l]of i){const c=t.keyType._zod.run({value:a,issues:[]},n),d=t.valueType._zod.run({value:l,issues:[]},n);c instanceof Promise||d instanceof Promise?o.push(Promise.all([c,d]).then(([f,p])=>{HT(f,p,r,a,i,e,n)})):HT(c,d,r,a,i,e,n)}return o.length?Promise.all(o).then(()=>r):r}});function HT(e,t,r,n,i,o,a){e.issues.length&&($v.has(typeof n)?r.issues.push(...Do(n,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:i,inst:o,issues:e.issues.map(l=>Ko(l,a,ni()))})),t.issues.length&&($v.has(typeof n)?r.issues.push(...Do(n,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:i,inst:o,key:n,issues:t.issues.map(l=>Ko(l,a,ni()))})),r.value.set(e.value,t.value)}const z5=re("$ZodSet",(e,t)=>{wt.init(e,t),e._zod.parse=(r,n)=>{const i=r.value;if(!(i instanceof Set))return r.issues.push({input:i,inst:e,expected:"set",code:"invalid_type"}),r;const o=[];r.value=new Set;for(const a of i){const l=t.valueType._zod.run({value:a,issues:[]},n);l instanceof Promise?o.push(l.then(c=>KT(c,r))):KT(l,r)}return o.length?Promise.all(o).then(()=>r):r}});function KT(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const D5=re("$ZodEnum",(e,t)=>{wt.init(e,t);const r=v$(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>$v.has(typeof i)).map(i=>typeof i=="string"?es(i):i.toString()).join("|")})$`),e._zod.parse=(i,o)=>{const a=i.value;return n.has(a)||i.issues.push({code:"invalid_value",values:r,input:a,inst:e}),i}}),L5=re("$ZodLiteral",(e,t)=>{if(wt.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?es(n):n?es(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,i)=>{const o=n.value;return r.has(o)||n.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),n}}),B5=re("$ZodFile",(e,t)=>{wt.init(e,t),e._zod.parse=(r,n)=>{const i=r.value;return i instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:i,inst:e}),r}}),U5=re("$ZodTransform",(e,t)=>{wt.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new cb(e.constructor.name);const i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(a=>(r.value=a,r));if(i instanceof Promise)throw new cu;return r.value=i,r}});function VT(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const F5=re("$ZodOptional",(e,t)=>{wt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Rt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Rt(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${db(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>VT(o,r.value)):VT(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),W5=re("$ZodNullable",(e,t)=>{wt.init(e,t),Rt(e._zod,"optin",()=>t.innerType._zod.optin),Rt(e._zod,"optout",()=>t.innerType._zod.optout),Rt(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${db(r.source)}|null)$`):void 0}),Rt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),H5=re("$ZodDefault",(e,t)=>{wt.init(e,t),e._zod.optin="optional",Rt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>qT(o,t)):qT(i,t)}});function qT(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const K5=re("$ZodPrefault",(e,t)=>{wt.init(e,t),e._zod.optin="optional",Rt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),V5=re("$ZodNonOptional",(e,t)=>{wt.init(e,t),Rt(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>ZT(o,e)):ZT(i,e)}});function ZT(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const q5=re("$ZodSuccess",(e,t)=>{wt.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new cb("ZodSuccess");const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>(r.value=o.issues.length===0,r)):(r.value=i.issues.length===0,r)}}),Z5=re("$ZodCatch",(e,t)=>{wt.init(e,t),Rt(e._zod,"optin",()=>t.innerType._zod.optin),Rt(e._zod,"optout",()=>t.innerType._zod.optout),Rt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(a=>Ko(a,n,ni()))},input:r.value}),r.issues=[]),r)):(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(o=>Ko(o,n,ni()))},input:r.value}),r.issues=[]),r)}}),G5=re("$ZodNaN",(e,t)=>{wt.init(e,t),e._zod.parse=(r,n)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),Y5=re("$ZodPipe",(e,t)=>{wt.init(e,t),Rt(e._zod,"values",()=>t.in._zod.values),Rt(e._zod,"optin",()=>t.in._zod.optin),Rt(e._zod,"optout",()=>t.out._zod.optout),Rt(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){const o=t.out._zod.run(r,n);return o instanceof Promise?o.then(a=>kg(a,t.in,n)):kg(o,t.in,n)}const i=t.in._zod.run(r,n);return i instanceof Promise?i.then(o=>kg(o,t.out,n)):kg(i,t.out,n)}});function kg(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const B$=re("$ZodCodec",(e,t)=>{wt.init(e,t),Rt(e._zod,"values",()=>t.in._zod.values),Rt(e._zod,"optin",()=>t.in._zod.optin),Rt(e._zod,"optout",()=>t.out._zod.optout),Rt(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if((n.direction||"forward")==="forward"){const o=t.in._zod.run(r,n);return o instanceof Promise?o.then(a=>Pg(a,t,n)):Pg(o,t,n)}else{const o=t.out._zod.run(r,n);return o instanceof Promise?o.then(a=>Pg(a,t,n)):Pg(o,t,n)}}});function Pg(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){const i=t.transform(e.value,e);return i instanceof Promise?i.then(o=>$g(e,o,t.out,r)):$g(e,i,t.out,r)}else{const i=t.reverseTransform(e.value,e);return i instanceof Promise?i.then(o=>$g(e,o,t.in,r)):$g(e,i,t.in,r)}}function $g(e,t,r,n){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},n)}const X5=re("$ZodReadonly",(e,t)=>{wt.init(e,t),Rt(e._zod,"propValues",()=>t.innerType._zod.propValues),Rt(e._zod,"values",()=>t.innerType._zod.values),Rt(e._zod,"optin",()=>{var r,n;return(n=(r=t.innerType)==null?void 0:r._zod)==null?void 0:n.optin}),Rt(e._zod,"optout",()=>{var r,n;return(n=(r=t.innerType)==null?void 0:r._zod)==null?void 0:n.optout}),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(GT):GT(i)}});function GT(e){return e.value=Object.freeze(e.value),e}const Q5=re("$ZodTemplateLiteral",(e,t)=>{wt.init(e,t);const r=[];for(const n of t.parts)if(typeof n=="object"&&n!==null){if(!n._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...n._zod.traits].shift()}`);const i=n._zod.pattern instanceof RegExp?n._zod.pattern.source:n._zod.pattern;if(!i)throw new Error(`Invalid template literal part: ${n._zod.traits}`);const o=i.startsWith("^")?1:0,a=i.endsWith("$")?i.length-1:i.length;r.push(i.slice(o,a))}else if(n===null||k4.has(typeof n))r.push(es(`${n}`));else throw new Error(`Invalid template literal part: ${n}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(n,i)=>typeof n.value!="string"?(n.issues.push({input:n.value,inst:e,expected:"template_literal",code:"invalid_type"}),n):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),n)}),J5=re("$ZodFunction",(e,t)=>(wt.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...n){const i=e._def.input?Y1(e._def.input,n):n,o=Reflect.apply(r,this,i);return e._def.output?Y1(e._def.output,o):o}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...n){const i=e._def.input?await X1(e._def.input,n):n,o=await Reflect.apply(r,this,i);return e._def.output?await X1(e._def.output,o):o}},e._zod.parse=(r,n)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{const n=e.constructor;return Array.isArray(r[0])?new n({type:"function",input:new L$({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new n({type:"function",input:r[0],output:e._def.output})},e.output=r=>{const n=e.constructor;return new n({type:"function",input:e._def.input,output:r})},e)),eB=re("$ZodPromise",(e,t)=>{wt.init(e,t),e._zod.parse=(r,n)=>Promise.resolve(r.value).then(i=>t.innerType._zod.run({value:i,issues:[]},n))}),tB=re("$ZodLazy",(e,t)=>{wt.init(e,t),Rt(e._zod,"innerType",()=>t.getter()),Rt(e._zod,"pattern",()=>{var r,n;return(n=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:n.pattern}),Rt(e._zod,"propValues",()=>{var r,n;return(n=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:n.propValues}),Rt(e._zod,"optin",()=>{var r,n;return((n=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:n.optin)??void 0}),Rt(e._zod,"optout",()=>{var r,n;return((n=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:n.optout)??void 0}),e._zod.parse=(r,n)=>e._zod.innerType._zod.run(r,n)}),rB=re("$ZodCustom",(e,t)=>{Er.init(e,t),wt.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{const n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(o=>YT(o,r,n,e));YT(i,r,n,e)}});function YT(e,t,r,n){if(!e){const i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),t.issues.push(ed(i))}}const Dae=()=>{const e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"};return i=>{switch(i.code){case"invalid_type":return`مدخلات غير مقبولة: يفترض إدخال ${i.expected}، ولكن تم إدخال ${r(i.input)}`;case"invalid_value":return i.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${mt(i.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?` أكبر من اللازم: يفترض أن تكون ${i.origin??"القيمة"} ${o} ${i.maximum.toString()} ${a.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${i.origin??"القيمة"} ${o} ${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`أصغر من اللازم: يفترض لـ ${i.origin} أن يكون ${o} ${i.minimum.toString()} ${a.unit}`:`أصغر من اللازم: يفترض لـ ${i.origin} أن يكون ${o} ${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`نَص غير مقبول: يجب أن يبدأ بـ "${i.prefix}"`:o.format==="ends_with"?`نَص غير مقبول: يجب أن ينتهي بـ "${o.suffix}"`:o.format==="includes"?`نَص غير مقبول: يجب أن يتضمَّن "${o.includes}"`:o.format==="regex"?`نَص غير مقبول: يجب أن يطابق النمط ${o.pattern}`:`${n[o.format]??i.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${i.divisor}`;case"unrecognized_keys":return`معرف${i.keys.length>1?"ات":""} غريب${i.keys.length>1?"ة":""}: ${Ae(i.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${i.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${i.origin}`;default:return"مدخل غير مقبول"}}};function Lae(){return{localeError:Dae()}}const Bae=()=>{const e={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Yanlış dəyər: gözlənilən ${i.expected}, daxil olan ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Yanlış dəyər: gözlənilən ${mt(i.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Çox böyük: gözlənilən ${i.origin??"dəyər"} ${o}${i.maximum.toString()} ${a.unit??"element"}`:`Çox böyük: gözlənilən ${i.origin??"dəyər"} ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Çox kiçik: gözlənilən ${i.origin} ${o}${i.minimum.toString()} ${a.unit}`:`Çox kiçik: gözlənilən ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Yanlış mətn: "${o.prefix}" ilə başlamalıdır`:o.format==="ends_with"?`Yanlış mətn: "${o.suffix}" ilə bitməlidir`:o.format==="includes"?`Yanlış mətn: "${o.includes}" daxil olmalıdır`:o.format==="regex"?`Yanlış mətn: ${o.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${n[o.format]??i.format}`}case"not_multiple_of":return`Yanlış ədəd: ${i.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${i.keys.length>1?"lar":""}: ${Ae(i.keys,", ")}`;case"invalid_key":return`${i.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${i.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function Uae(){return{localeError:Bae()}}function XT(e,t,r,n){const i=Math.abs(e),o=i%10,a=i%100;return a>=11&&a<=19?n:o===1?t:o>=2&&o<=4?r:n}const Fae=()=>{const e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"лік";case"object":{if(Array.isArray(i))return"масіў";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"};return i=>{switch(i.code){case"invalid_type":return`Няправільны ўвод: чакаўся ${i.expected}, атрымана ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Няправільны ўвод: чакалася ${mt(i.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);if(a){const l=Number(i.maximum),c=XT(l,a.unit.one,a.unit.few,a.unit.many);return`Занадта вялікі: чакалася, што ${i.origin??"значэнне"} павінна ${a.verb} ${o}${i.maximum.toString()} ${c}`}return`Занадта вялікі: чакалася, што ${i.origin??"значэнне"} павінна быць ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);if(a){const l=Number(i.minimum),c=XT(l,a.unit.one,a.unit.few,a.unit.many);return`Занадта малы: чакалася, што ${i.origin} павінна ${a.verb} ${o}${i.minimum.toString()} ${c}`}return`Занадта малы: чакалася, што ${i.origin} павінна быць ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Няправільны радок: павінен пачынацца з "${o.prefix}"`:o.format==="ends_with"?`Няправільны радок: павінен заканчвацца на "${o.suffix}"`:o.format==="includes"?`Няправільны радок: павінен змяшчаць "${o.includes}"`:o.format==="regex"?`Няправільны радок: павінен адпавядаць шаблону ${o.pattern}`:`Няправільны ${n[o.format]??i.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${i.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${i.keys.length>1?"ключы":"ключ"}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${i.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${i.origin}`;default:return"Няправільны ўвод"}}};function Wae(){return{localeError:Fae()}}const Hae=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"число";case"object":{if(Array.isArray(e))return"масив";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},Kae=()=>{const e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function t(n){return e[n]??null}const r={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"};return n=>{switch(n.code){case"invalid_type":return`Невалиден вход: очакван ${n.expected}, получен ${Hae(n.input)}`;case"invalid_value":return n.values.length===1?`Невалиден вход: очакван ${mt(n.values[0])}`:`Невалидна опция: очаквано едно от ${Ae(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",o=t(n.origin);return o?`Твърде голямо: очаква се ${n.origin??"стойност"} да съдържа ${i}${n.maximum.toString()} ${o.unit??"елемента"}`:`Твърде голямо: очаква се ${n.origin??"стойност"} да бъде ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",o=t(n.origin);return o?`Твърде малко: очаква се ${n.origin} да съдържа ${i}${n.minimum.toString()} ${o.unit}`:`Твърде малко: очаква се ${n.origin} да бъде ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;if(i.format==="starts_with")return`Невалиден низ: трябва да започва с "${i.prefix}"`;if(i.format==="ends_with")return`Невалиден низ: трябва да завършва с "${i.suffix}"`;if(i.format==="includes")return`Невалиден низ: трябва да включва "${i.includes}"`;if(i.format==="regex")return`Невалиден низ: трябва да съвпада с ${i.pattern}`;let o="Невалиден";return i.format==="emoji"&&(o="Невалидно"),i.format==="datetime"&&(o="Невалидно"),i.format==="date"&&(o="Невалидна"),i.format==="time"&&(o="Невалидно"),i.format==="duration"&&(o="Невалидна"),`${o} ${r[i.format]??n.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${n.divisor}`;case"unrecognized_keys":return`Неразпознат${n.keys.length>1?"и":""} ключ${n.keys.length>1?"ове":""}: ${Ae(n.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${n.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${n.origin}`;default:return"Невалиден вход"}}};function Vae(){return{localeError:Kae()}}const qae=()=>{const e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return i=>{switch(i.code){case"invalid_type":return`Tipus invàlid: s'esperava ${i.expected}, s'ha rebut ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Valor invàlid: s'esperava ${mt(i.values[0])}`:`Opció invàlida: s'esperava una de ${Ae(i.values," o ")}`;case"too_big":{const o=i.inclusive?"com a màxim":"menys de",a=t(i.origin);return a?`Massa gran: s'esperava que ${i.origin??"el valor"} contingués ${o} ${i.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${i.origin??"el valor"} fos ${o} ${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?"com a mínim":"més de",a=t(i.origin);return a?`Massa petit: s'esperava que ${i.origin} contingués ${o} ${i.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${i.origin} fos ${o} ${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Format invàlid: ha de començar amb "${o.prefix}"`:o.format==="ends_with"?`Format invàlid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format invàlid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format invàlid: ha de coincidir amb el patró ${o.pattern}`:`Format invàlid per a ${n[o.format]??i.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${i.divisor}`;case"unrecognized_keys":return`Clau${i.keys.length>1?"s":""} no reconeguda${i.keys.length>1?"s":""}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${i.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${i.origin}`;default:return"Entrada invàlida"}}};function Zae(){return{localeError:qae()}}const Gae=()=>{const e={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"číslo";case"string":return"řetězec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(i))return"pole";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"};return i=>{switch(i.code){case"invalid_type":return`Neplatný vstup: očekáváno ${i.expected}, obdrženo ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Neplatný vstup: očekáváno ${mt(i.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Hodnota je příliš velká: ${i.origin??"hodnota"} musí mít ${o}${i.maximum.toString()} ${a.unit??"prvků"}`:`Hodnota je příliš velká: ${i.origin??"hodnota"} musí být ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Hodnota je příliš malá: ${i.origin??"hodnota"} musí mít ${o}${i.minimum.toString()} ${a.unit??"prvků"}`:`Hodnota je příliš malá: ${i.origin??"hodnota"} musí být ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Neplatný řetězec: musí začínat na "${o.prefix}"`:o.format==="ends_with"?`Neplatný řetězec: musí končit na "${o.suffix}"`:o.format==="includes"?`Neplatný řetězec: musí obsahovat "${o.includes}"`:o.format==="regex"?`Neplatný řetězec: musí odpovídat vzoru ${o.pattern}`:`Neplatný formát ${n[o.format]??i.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${i.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${Ae(i.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${i.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${i.origin}`;default:return"Neplatný vstup"}}};function Yae(){return{localeError:Gae()}}const Xae=()=>{const e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},t={string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};function r(a){return e[a]??null}function n(a){return t[a]??a}const i=a=>{const l=typeof a;switch(l){case"number":return Number.isNaN(a)?"NaN":"tal";case"object":return Array.isArray(a)?"liste":a===null?"null":Object.getPrototypeOf(a)!==Object.prototype&&a.constructor?a.constructor.name:"objekt"}return l},o={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return a=>{switch(a.code){case"invalid_type":return`Ugyldigt input: forventede ${n(a.expected)}, fik ${n(i(a.input))}`;case"invalid_value":return a.values.length===1?`Ugyldig værdi: forventede ${mt(a.values[0])}`:`Ugyldigt valg: forventede en af følgende ${Ae(a.values,"|")}`;case"too_big":{const l=a.inclusive?"<=":"<",c=r(a.origin),d=n(a.origin);return c?`For stor: forventede ${d??"value"} ${c.verb} ${l} ${a.maximum.toString()} ${c.unit??"elementer"}`:`For stor: forventede ${d??"value"} havde ${l} ${a.maximum.toString()}`}case"too_small":{const l=a.inclusive?">=":">",c=r(a.origin),d=n(a.origin);return c?`For lille: forventede ${d} ${c.verb} ${l} ${a.minimum.toString()} ${c.unit}`:`For lille: forventede ${d} havde ${l} ${a.minimum.toString()}`}case"invalid_format":{const l=a;return l.format==="starts_with"?`Ugyldig streng: skal starte med "${l.prefix}"`:l.format==="ends_with"?`Ugyldig streng: skal ende med "${l.suffix}"`:l.format==="includes"?`Ugyldig streng: skal indeholde "${l.includes}"`:l.format==="regex"?`Ugyldig streng: skal matche mønsteret ${l.pattern}`:`Ugyldig ${o[l.format]??a.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${a.divisor}`;case"unrecognized_keys":return`${a.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${Ae(a.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${a.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${a.origin}`;default:return"Ugyldigt input"}}};function Qae(){return{localeError:Xae()}}const Jae=()=>{const e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"Zahl";case"object":{if(Array.isArray(i))return"Array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return i=>{switch(i.code){case"invalid_type":return`Ungültige Eingabe: erwartet ${i.expected}, erhalten ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Ungültige Eingabe: erwartet ${mt(i.values[0])}`:`Ungültige Option: erwartet eine von ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Zu groß: erwartet, dass ${i.origin??"Wert"} ${o}${i.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${i.origin??"Wert"} ${o}${i.maximum.toString()} ist`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Zu klein: erwartet, dass ${i.origin} ${o}${i.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${i.origin} ${o}${i.minimum.toString()} ist`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Ungültiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ungültiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ungültiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ungültiger String: muss dem Muster ${o.pattern} entsprechen`:`Ungültig: ${n[o.format]??i.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${i.divisor} sein`;case"unrecognized_keys":return`${i.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${i.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${i.origin}`;default:return"Ungültige Eingabe"}}};function ese(){return{localeError:Jae()}}const tse=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},rse=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function t(n){return e[n]??null}const r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Invalid input: expected ${n.expected}, received ${tse(n.input)}`;case"invalid_value":return n.values.length===1?`Invalid input: expected ${mt(n.values[0])}`:`Invalid option: expected one of ${Ae(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",o=t(n.origin);return o?`Too big: expected ${n.origin??"value"} to have ${i}${n.maximum.toString()} ${o.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",o=t(n.origin);return o?`Too small: expected ${n.origin} to have ${i}${n.minimum.toString()} ${o.unit}`:`Too small: expected ${n.origin} to be ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${r[i.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${Ae(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};function nB(){return{localeError:rse()}}const nse=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombro";case"object":{if(Array.isArray(e))return"tabelo";if(e===null)return"senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},ise=()=>{const e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(n){return e[n]??null}const r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return n=>{switch(n.code){case"invalid_type":return`Nevalida enigo: atendiĝis ${n.expected}, riceviĝis ${nse(n.input)}`;case"invalid_value":return n.values.length===1?`Nevalida enigo: atendiĝis ${mt(n.values[0])}`:`Nevalida opcio: atendiĝis unu el ${Ae(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",o=t(n.origin);return o?`Tro granda: atendiĝis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()} ${o.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",o=t(n.origin);return o?`Tro malgranda: atendiĝis ke ${n.origin} havu ${i}${n.minimum.toString()} ${o.unit}`:`Tro malgranda: atendiĝis ke ${n.origin} estu ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Nevalida karaktraro: devas komenciĝi per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas finiĝi per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${r[i.format]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} ŝlosilo${n.keys.length>1?"j":""}: ${Ae(n.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}};function ose(){return{localeError:ise()}}const ase=()=>{const e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},t={string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};function r(a){return e[a]??null}function n(a){return t[a]??a}const i=a=>{const l=typeof a;switch(l){case"number":return Number.isNaN(a)?"NaN":"number";case"object":return Array.isArray(a)?"array":a===null?"null":Object.getPrototypeOf(a)!==Object.prototype?a.constructor.name:"object"}return l},o={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return a=>{switch(a.code){case"invalid_type":return`Entrada inválida: se esperaba ${n(a.expected)}, recibido ${n(i(a.input))}`;case"invalid_value":return a.values.length===1?`Entrada inválida: se esperaba ${mt(a.values[0])}`:`Opción inválida: se esperaba una de ${Ae(a.values,"|")}`;case"too_big":{const l=a.inclusive?"<=":"<",c=r(a.origin),d=n(a.origin);return c?`Demasiado grande: se esperaba que ${d??"valor"} tuviera ${l}${a.maximum.toString()} ${c.unit??"elementos"}`:`Demasiado grande: se esperaba que ${d??"valor"} fuera ${l}${a.maximum.toString()}`}case"too_small":{const l=a.inclusive?">=":">",c=r(a.origin),d=n(a.origin);return c?`Demasiado pequeño: se esperaba que ${d} tuviera ${l}${a.minimum.toString()} ${c.unit}`:`Demasiado pequeño: se esperaba que ${d} fuera ${l}${a.minimum.toString()}`}case"invalid_format":{const l=a;return l.format==="starts_with"?`Cadena inválida: debe comenzar con "${l.prefix}"`:l.format==="ends_with"?`Cadena inválida: debe terminar en "${l.suffix}"`:l.format==="includes"?`Cadena inválida: debe incluir "${l.includes}"`:l.format==="regex"?`Cadena inválida: debe coincidir con el patrón ${l.pattern}`:`Inválido ${o[l.format]??a.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${a.divisor}`;case"unrecognized_keys":return`Llave${a.keys.length>1?"s":""} desconocida${a.keys.length>1?"s":""}: ${Ae(a.keys,", ")}`;case"invalid_key":return`Llave inválida en ${n(a.origin)}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${n(a.origin)}`;default:return"Entrada inválida"}}};function sse(){return{localeError:ase()}}const lse=()=>{const e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"عدد";case"object":{if(Array.isArray(i))return"آرایه";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"};return i=>{switch(i.code){case"invalid_type":return`ورودی نامعتبر: می‌بایست ${i.expected} می‌بود، ${r(i.input)} دریافت شد`;case"invalid_value":return i.values.length===1?`ورودی نامعتبر: می‌بایست ${mt(i.values[0])} می‌بود`:`گزینه نامعتبر: می‌بایست یکی از ${Ae(i.values,"|")} می‌بود`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`خیلی بزرگ: ${i.origin??"مقدار"} باید ${o}${i.maximum.toString()} ${a.unit??"عنصر"} باشد`:`خیلی بزرگ: ${i.origin??"مقدار"} باید ${o}${i.maximum.toString()} باشد`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`خیلی کوچک: ${i.origin} باید ${o}${i.minimum.toString()} ${a.unit} باشد`:`خیلی کوچک: ${i.origin} باید ${o}${i.minimum.toString()} باشد`}case"invalid_format":{const o=i;return o.format==="starts_with"?`رشته نامعتبر: باید با "${o.prefix}" شروع شود`:o.format==="ends_with"?`رشته نامعتبر: باید با "${o.suffix}" تمام شود`:o.format==="includes"?`رشته نامعتبر: باید شامل "${o.includes}" باشد`:o.format==="regex"?`رشته نامعتبر: باید با الگوی ${o.pattern} مطابقت داشته باشد`:`${n[o.format]??i.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${i.divisor} باشد`;case"unrecognized_keys":return`کلید${i.keys.length>1?"های":""} ناشناس: ${Ae(i.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${i.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${i.origin}`;default:return"ورودی نامعتبر"}}};function use(){return{localeError:lse()}}const cse=()=>{const e={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return i=>{switch(i.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${i.expected}, oli ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Virheellinen syöte: täytyy olla ${mt(i.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Liian suuri: ${a.subject} täytyy olla ${o}${i.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon täytyy olla ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Liian pieni: ${a.subject} täytyy olla ${o}${i.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon täytyy olla ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Virheellinen syöte: täytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen syöte: täytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen syöte: täytyy sisältää "${o.includes}"`:o.format==="regex"?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${o.pattern}`:`Virheellinen ${n[o.format]??i.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${i.divisor} monikerta`;case"unrecognized_keys":return`${i.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${Ae(i.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function dse(){return{localeError:cse()}}const fse=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"nombre";case"object":{if(Array.isArray(i))return"tableau";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return i=>{switch(i.code){case"invalid_type":return`Entrée invalide : ${i.expected} attendu, ${r(i.input)} reçu`;case"invalid_value":return i.values.length===1?`Entrée invalide : ${mt(i.values[0])} attendu`:`Option invalide : une valeur parmi ${Ae(i.values,"|")} attendue`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Trop grand : ${i.origin??"valeur"} doit ${a.verb} ${o}${i.maximum.toString()} ${a.unit??"élément(s)"}`:`Trop grand : ${i.origin??"valeur"} doit être ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Trop petit : ${i.origin} doit ${a.verb} ${o}${i.minimum.toString()} ${a.unit}`:`Trop petit : ${i.origin} doit être ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Chaîne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Chaîne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Chaîne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Chaîne invalide : doit correspondre au modèle ${o.pattern}`:`${n[o.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${i.divisor}`;case"unrecognized_keys":return`Clé${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${Ae(i.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${i.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entrée invalide"}}};function pse(){return{localeError:fse()}}const hse=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return i=>{switch(i.code){case"invalid_type":return`Entrée invalide : attendu ${i.expected}, reçu ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Entrée invalide : attendu ${mt(i.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"≤":"<",a=t(i.origin);return a?`Trop grand : attendu que ${i.origin??"la valeur"} ait ${o}${i.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${i.origin??"la valeur"} soit ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?"≥":">",a=t(i.origin);return a?`Trop petit : attendu que ${i.origin} ait ${o}${i.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${i.origin} soit ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Chaîne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Chaîne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Chaîne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Chaîne invalide : doit correspondre au motif ${o.pattern}`:`${n[o.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${i.divisor}`;case"unrecognized_keys":return`Clé${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${Ae(i.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${i.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entrée invalide"}}};function mse(){return{localeError:hse()}}const gse=()=>{const e={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},t={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},r=d=>d?e[d]:void 0,n=d=>{const f=r(d);return f?f.label:d??e.unknown.label},i=d=>`ה${n(d)}`,o=d=>{const f=r(d);return((f==null?void 0:f.gender)??"m")==="f"?"צריכה להיות":"צריך להיות"},a=d=>d?t[d]??null:null,l=d=>{const f=typeof d;switch(f){case"number":return Number.isNaN(d)?"NaN":"number";case"object":return Array.isArray(d)?"array":d===null?"null":Object.getPrototypeOf(d)!==Object.prototype&&d.constructor?d.constructor.name:"object";default:return f}},c={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}};return d=>{var f;switch(d.code){case"invalid_type":{const p=d.expected,g=n(p),v=l(d.input),b=((f=e[v])==null?void 0:f.label)??v;return`קלט לא תקין: צריך להיות ${g}, התקבל ${b}`}case"invalid_value":{if(d.values.length===1)return`ערך לא תקין: הערך חייב להיות ${mt(d.values[0])}`;const p=d.values.map(b=>mt(b));if(d.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${p[0]} או ${p[1]}`;const g=p[p.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${p.slice(0,-1).join(", ")} או ${g}`}case"too_big":{const p=a(d.origin),g=i(d.origin??"value");if(d.origin==="string")return`${(p==null?void 0:p.longLabel)??"ארוך"} מדי: ${g} צריכה להכיל ${d.maximum.toString()} ${(p==null?void 0:p.unit)??""} ${d.inclusive?"או פחות":"לכל היותר"}`.trim();if(d.origin==="number"){const S=d.inclusive?`קטן או שווה ל-${d.maximum}`:`קטן מ-${d.maximum}`;return`גדול מדי: ${g} צריך להיות ${S}`}if(d.origin==="array"||d.origin==="set"){const S=d.origin==="set"?"צריכה":"צריך",w=d.inclusive?`${d.maximum} ${(p==null?void 0:p.unit)??""} או פחות`:`פחות מ-${d.maximum} ${(p==null?void 0:p.unit)??""}`;return`גדול מדי: ${g} ${S} להכיל ${w}`.trim()}const v=d.inclusive?"<=":"<",b=o(d.origin??"value");return p!=null&&p.unit?`${p.longLabel} מדי: ${g} ${b} ${v}${d.maximum.toString()} ${p.unit}`:`${(p==null?void 0:p.longLabel)??"גדול"} מדי: ${g} ${b} ${v}${d.maximum.toString()}`}case"too_small":{const p=a(d.origin),g=i(d.origin??"value");if(d.origin==="string")return`${(p==null?void 0:p.shortLabel)??"קצר"} מדי: ${g} צריכה להכיל ${d.minimum.toString()} ${(p==null?void 0:p.unit)??""} ${d.inclusive?"או יותר":"לפחות"}`.trim();if(d.origin==="number"){const S=d.inclusive?`גדול או שווה ל-${d.minimum}`:`גדול מ-${d.minimum}`;return`קטן מדי: ${g} צריך להיות ${S}`}if(d.origin==="array"||d.origin==="set"){const S=d.origin==="set"?"צריכה":"צריך";if(d.minimum===1&&d.inclusive){const k=(d.origin==="set","לפחות פריט אחד");return`קטן מדי: ${g} ${S} להכיל ${k}`}const w=d.inclusive?`${d.minimum} ${(p==null?void 0:p.unit)??""} או יותר`:`יותר מ-${d.minimum} ${(p==null?void 0:p.unit)??""}`;return`קטן מדי: ${g} ${S} להכיל ${w}`.trim()}const v=d.inclusive?">=":">",b=o(d.origin??"value");return p!=null&&p.unit?`${p.shortLabel} מדי: ${g} ${b} ${v}${d.minimum.toString()} ${p.unit}`:`${(p==null?void 0:p.shortLabel)??"קטן"} מדי: ${g} ${b} ${v}${d.minimum.toString()}`}case"invalid_format":{const p=d;if(p.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${p.prefix}"`;if(p.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${p.suffix}"`;if(p.format==="includes")return`המחרוזת חייבת לכלול "${p.includes}"`;if(p.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${p.pattern}`;const g=c[p.format],v=(g==null?void 0:g.label)??p.format,S=((g==null?void 0:g.gender)??"m")==="f"?"תקינה":"תקין";return`${v} לא ${S}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${d.divisor}`;case"unrecognized_keys":return`מפתח${d.keys.length>1?"ות":""} לא מזוה${d.keys.length>1?"ים":"ה"}: ${Ae(d.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${i(d.origin??"array")}`;default:return"קלט לא תקין"}}};function vse(){return{localeError:gse()}}const yse=()=>{const e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"szám";case"object":{if(Array.isArray(i))return"tömb";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"};return i=>{switch(i.code){case"invalid_type":return`Érvénytelen bemenet: a várt érték ${i.expected}, a kapott érték ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Érvénytelen bemenet: a várt érték ${mt(i.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Túl nagy: ${i.origin??"érték"} mérete túl nagy ${o}${i.maximum.toString()} ${a.unit??"elem"}`:`Túl nagy: a bemeneti érték ${i.origin??"érték"} túl nagy: ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Túl kicsi: a bemeneti érték ${i.origin} mérete túl kicsi ${o}${i.minimum.toString()} ${a.unit}`:`Túl kicsi: a bemeneti érték ${i.origin} túl kicsi ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Érvénytelen string: "${o.prefix}" értékkel kell kezdődnie`:o.format==="ends_with"?`Érvénytelen string: "${o.suffix}" értékkel kell végződnie`:o.format==="includes"?`Érvénytelen string: "${o.includes}" értéket kell tartalmaznia`:o.format==="regex"?`Érvénytelen string: ${o.pattern} mintának kell megfelelnie`:`Érvénytelen ${n[o.format]??i.format}`}case"not_multiple_of":return`Érvénytelen szám: ${i.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${i.keys.length>1?"s":""}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${i.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${i.origin}`;default:return"Érvénytelen bemenet"}}};function bse(){return{localeError:yse()}}const xse=()=>{const e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Input tidak valid: diharapkan ${i.expected}, diterima ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Input tidak valid: diharapkan ${mt(i.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Terlalu besar: diharapkan ${i.origin??"value"} memiliki ${o}${i.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${i.origin??"value"} menjadi ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Terlalu kecil: diharapkan ${i.origin} memiliki ${o}${i.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${i.origin} menjadi ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${n[o.format]??i.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${i.keys.length>1?"s":""}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${i.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${i.origin}`;default:return"Input tidak valid"}}};function wse(){return{localeError:xse()}}const Sse=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"númer";case"object":{if(Array.isArray(e))return"fylki";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},kse=()=>{const e={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function t(n){return e[n]??null}const r={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"};return n=>{switch(n.code){case"invalid_type":return`Rangt gildi: Þú slóst inn ${Sse(n.input)} þar sem á að vera ${n.expected}`;case"invalid_value":return n.values.length===1?`Rangt gildi: gert ráð fyrir ${mt(n.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${Ae(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",o=t(n.origin);return o?`Of stórt: gert er ráð fyrir að ${n.origin??"gildi"} hafi ${i}${n.maximum.toString()} ${o.unit??"hluti"}`:`Of stórt: gert er ráð fyrir að ${n.origin??"gildi"} sé ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",o=t(n.origin);return o?`Of lítið: gert er ráð fyrir að ${n.origin} hafi ${i}${n.minimum.toString()} ${o.unit}`:`Of lítið: gert er ráð fyrir að ${n.origin} sé ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Ógildur strengur: verður að byrja á "${i.prefix}"`:i.format==="ends_with"?`Ógildur strengur: verður að enda á "${i.suffix}"`:i.format==="includes"?`Ógildur strengur: verður að innihalda "${i.includes}"`:i.format==="regex"?`Ógildur strengur: verður að fylgja mynstri ${i.pattern}`:`Rangt ${r[i.format]??n.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${n.divisor}`;case"unrecognized_keys":return`Óþekkt ${n.keys.length>1?"ir lyklar":"ur lykill"}: ${Ae(n.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${n.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${n.origin}`;default:return"Rangt gildi"}}};function Pse(){return{localeError:kse()}}const $se=()=>{const e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"numero";case"object":{if(Array.isArray(i))return"vettore";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Input non valido: atteso ${i.expected}, ricevuto ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Input non valido: atteso ${mt(i.values[0])}`:`Opzione non valida: atteso uno tra ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Troppo grande: ${i.origin??"valore"} deve avere ${o}${i.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${i.origin??"valore"} deve essere ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Troppo piccolo: ${i.origin} deve avere ${o}${i.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${i.origin} deve essere ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Invalid ${n[o.format]??i.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${i.divisor}`;case"unrecognized_keys":return`Chiav${i.keys.length>1?"i":"e"} non riconosciut${i.keys.length>1?"e":"a"}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${i.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${i.origin}`;default:return"Input non valido"}}};function Cse(){return{localeError:$se()}}const Ose=()=>{const e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"数値";case"object":{if(Array.isArray(i))return"配列";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"};return i=>{switch(i.code){case"invalid_type":return`無効な入力: ${i.expected}が期待されましたが、${r(i.input)}が入力されました`;case"invalid_value":return i.values.length===1?`無効な入力: ${mt(i.values[0])}が期待されました`:`無効な選択: ${Ae(i.values,"、")}のいずれかである必要があります`;case"too_big":{const o=i.inclusive?"以下である":"より小さい",a=t(i.origin);return a?`大きすぎる値: ${i.origin??"値"}は${i.maximum.toString()}${a.unit??"要素"}${o}必要があります`:`大きすぎる値: ${i.origin??"値"}は${i.maximum.toString()}${o}必要があります`}case"too_small":{const o=i.inclusive?"以上である":"より大きい",a=t(i.origin);return a?`小さすぎる値: ${i.origin}は${i.minimum.toString()}${a.unit}${o}必要があります`:`小さすぎる値: ${i.origin}は${i.minimum.toString()}${o}必要があります`}case"invalid_format":{const o=i;return o.format==="starts_with"?`無効な文字列: "${o.prefix}"で始まる必要があります`:o.format==="ends_with"?`無効な文字列: "${o.suffix}"で終わる必要があります`:o.format==="includes"?`無効な文字列: "${o.includes}"を含む必要があります`:o.format==="regex"?`無効な文字列: パターン${o.pattern}に一致する必要があります`:`無効な${n[o.format]??i.format}`}case"not_multiple_of":return`無効な数値: ${i.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${i.keys.length>1?"群":""}: ${Ae(i.keys,"、")}`;case"invalid_key":return`${i.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${i.origin}内の無効な値`;default:return"無効な入力"}}};function Ese(){return{localeError:Ose()}}const _se=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"რიცხვი";case"object":{if(Array.isArray(e))return"მასივი";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return{string:"სტრინგი",boolean:"ბულეანი",undefined:"undefined",bigint:"bigint",symbol:"symbol",function:"ფუნქცია"}[t]??t},Ise=()=>{const e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function t(n){return e[n]??null}const r={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"};return n=>{switch(n.code){case"invalid_type":return`არასწორი შეყვანა: მოსალოდნელი ${n.expected}, მიღებული ${_se(n.input)}`;case"invalid_value":return n.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${mt(n.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${Ae(n.values,"|")}-დან`;case"too_big":{const i=n.inclusive?"<=":"<",o=t(n.origin);return o?`ზედმეტად დიდი: მოსალოდნელი ${n.origin??"მნიშვნელობა"} ${o.verb} ${i}${n.maximum.toString()} ${o.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${n.origin??"მნიშვნელობა"} იყოს ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",o=t(n.origin);return o?`ზედმეტად პატარა: მოსალოდნელი ${n.origin} ${o.verb} ${i}${n.minimum.toString()} ${o.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${n.origin} იყოს ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`არასწორი სტრინგი: უნდა იწყებოდეს "${i.prefix}"-ით`:i.format==="ends_with"?`არასწორი სტრინგი: უნდა მთავრდებოდეს "${i.suffix}"-ით`:i.format==="includes"?`არასწორი სტრინგი: უნდა შეიცავდეს "${i.includes}"-ს`:i.format==="regex"?`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${i.pattern}`:`არასწორი ${r[i.format]??n.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${n.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${n.keys.length>1?"ები":"ი"}: ${Ae(n.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${n.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${n.origin}-ში`;default:return"არასწორი შეყვანა"}}};function jse(){return{localeError:Ise()}}const Ase=()=>{const e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"មិនមែនជាលេខ (NaN)":"លេខ";case"object":{if(Array.isArray(i))return"អារេ (Array)";if(i===null)return"គ្មានតម្លៃ (null)";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"};return i=>{switch(i.code){case"invalid_type":return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${i.expected} ប៉ុន្តែទទួលបាន ${r(i.input)}`;case"invalid_value":return i.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${mt(i.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`ធំពេក៖ ត្រូវការ ${i.origin??"តម្លៃ"} ${o} ${i.maximum.toString()} ${a.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${i.origin??"តម្លៃ"} ${o} ${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`តូចពេក៖ ត្រូវការ ${i.origin} ${o} ${i.minimum.toString()} ${a.unit}`:`តូចពេក៖ ត្រូវការ ${i.origin} ${o} ${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${o.prefix}"`:o.format==="ends_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${o.suffix}"`:o.format==="includes"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${o.includes}"`:o.format==="regex"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${o.pattern}`:`មិនត្រឹមត្រូវ៖ ${n[o.format]??i.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${i.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${Ae(i.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${i.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${i.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function iB(){return{localeError:Ase()}}function Tse(){return iB()}const Rse=()=>{const e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"};return i=>{switch(i.code){case"invalid_type":return`잘못된 입력: 예상 타입은 ${i.expected}, 받은 타입은 ${r(i.input)}입니다`;case"invalid_value":return i.values.length===1?`잘못된 입력: 값은 ${mt(i.values[0])} 이어야 합니다`:`잘못된 옵션: ${Ae(i.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const o=i.inclusive?"이하":"미만",a=o==="미만"?"이어야 합니다":"여야 합니다",l=t(i.origin),c=(l==null?void 0:l.unit)??"요소";return l?`${i.origin??"값"}이 너무 큽니다: ${i.maximum.toString()}${c} ${o}${a}`:`${i.origin??"값"}이 너무 큽니다: ${i.maximum.toString()} ${o}${a}`}case"too_small":{const o=i.inclusive?"이상":"초과",a=o==="이상"?"이어야 합니다":"여야 합니다",l=t(i.origin),c=(l==null?void 0:l.unit)??"요소";return l?`${i.origin??"값"}이 너무 작습니다: ${i.minimum.toString()}${c} ${o}${a}`:`${i.origin??"값"}이 너무 작습니다: ${i.minimum.toString()} ${o}${a}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`잘못된 문자열: "${o.prefix}"(으)로 시작해야 합니다`:o.format==="ends_with"?`잘못된 문자열: "${o.suffix}"(으)로 끝나야 합니다`:o.format==="includes"?`잘못된 문자열: "${o.includes}"을(를) 포함해야 합니다`:o.format==="regex"?`잘못된 문자열: 정규식 ${o.pattern} 패턴과 일치해야 합니다`:`잘못된 ${n[o.format]??i.format}`}case"not_multiple_of":return`잘못된 숫자: ${i.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${Ae(i.keys,", ")}`;case"invalid_key":return`잘못된 키: ${i.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${i.origin}`;default:return"잘못된 입력"}}};function Mse(){return{localeError:Rse()}}const Nse=e=>Gf(typeof e,e),Gf=(e,t=void 0)=>{switch(e){case"number":return Number.isNaN(t)?"NaN":"skaičius";case"bigint":return"sveikasis skaičius";case"string":return"eilutė";case"boolean":return"loginė reikšmė";case"undefined":case"void":return"neapibrėžta reikšmė";case"function":return"funkcija";case"symbol":return"simbolis";case"object":return t===void 0?"nežinomas objektas":t===null?"nulinė reikšmė":Array.isArray(t)?"masyvas":Object.getPrototypeOf(t)!==Object.prototype&&t.constructor?t.constructor.name:"objektas";case"null":return"nulinė reikšmė"}return e},Tf=e=>e.charAt(0).toUpperCase()+e.slice(1);function QT(e){const t=Math.abs(e),r=t%10,n=t%100;return n>=11&&n<=19||r===0?"many":r===1?"one":"few"}const zse=()=>{const e={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function t(n,i,o,a){const l=e[n]??null;return l===null?l:{unit:l.unit[i],verb:l.verb[a][o?"inclusive":"notInclusive"]}}const r={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"};return n=>{switch(n.code){case"invalid_type":return`Gautas tipas ${Nse(n.input)}, o tikėtasi - ${Gf(n.expected)}`;case"invalid_value":return n.values.length===1?`Privalo būti ${mt(n.values[0])}`:`Privalo būti vienas iš ${Ae(n.values,"|")} pasirinkimų`;case"too_big":{const i=Gf(n.origin),o=t(n.origin,QT(Number(n.maximum)),n.inclusive??!1,"smaller");if(o!=null&&o.verb)return`${Tf(i??n.origin??"reikšmė")} ${o.verb} ${n.maximum.toString()} ${o.unit??"elementų"}`;const a=n.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${Tf(i??n.origin??"reikšmė")} turi būti ${a} ${n.maximum.toString()} ${o==null?void 0:o.unit}`}case"too_small":{const i=Gf(n.origin),o=t(n.origin,QT(Number(n.minimum)),n.inclusive??!1,"bigger");if(o!=null&&o.verb)return`${Tf(i??n.origin??"reikšmė")} ${o.verb} ${n.minimum.toString()} ${o.unit??"elementų"}`;const a=n.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${Tf(i??n.origin??"reikšmė")} turi būti ${a} ${n.minimum.toString()} ${o==null?void 0:o.unit}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Eilutė privalo prasidėti "${i.prefix}"`:i.format==="ends_with"?`Eilutė privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilutė privalo įtraukti "${i.includes}"`:i.format==="regex"?`Eilutė privalo atitikti ${i.pattern}`:`Neteisingas ${r[i.format]??n.format}`}case"not_multiple_of":return`Skaičius privalo būti ${n.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${n.keys.length>1?"i":"as"} rakt${n.keys.length>1?"ai":"as"}: ${Ae(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{const i=Gf(n.origin);return`${Tf(i??n.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function Dse(){return{localeError:zse()}}const Lse=()=>{const e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"број";case"object":{if(Array.isArray(i))return"низа";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"};return i=>{switch(i.code){case"invalid_type":return`Грешен внес: се очекува ${i.expected}, примено ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Invalid input: expected ${mt(i.values[0])}`:`Грешана опција: се очекува една ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Премногу голем: се очекува ${i.origin??"вредноста"} да има ${o}${i.maximum.toString()} ${a.unit??"елементи"}`:`Премногу голем: се очекува ${i.origin??"вредноста"} да биде ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Премногу мал: се очекува ${i.origin} да има ${o}${i.minimum.toString()} ${a.unit}`:`Премногу мал: се очекува ${i.origin} да биде ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Неважечка низа: мора да започнува со "${o.prefix}"`:o.format==="ends_with"?`Неважечка низа: мора да завршува со "${o.suffix}"`:o.format==="includes"?`Неважечка низа: мора да вклучува "${o.includes}"`:o.format==="regex"?`Неважечка низа: мора да одгоара на патернот ${o.pattern}`:`Invalid ${n[o.format]??i.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${i.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${i.origin}`;default:return"Грешен внес"}}};function Bse(){return{localeError:Lse()}}const Use=()=>{const e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"nombor";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Input tidak sah: dijangka ${i.expected}, diterima ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Input tidak sah: dijangka ${mt(i.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Terlalu besar: dijangka ${i.origin??"nilai"} ${a.verb} ${o}${i.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${i.origin??"nilai"} adalah ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Terlalu kecil: dijangka ${i.origin} ${a.verb} ${o}${i.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${i.origin} adalah ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${n[o.format]??i.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${Ae(i.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${i.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${i.origin}`;default:return"Input tidak sah"}}};function Fse(){return{localeError:Use()}}const Wse=()=>{const e={string:{unit:"tekens",verb:"te hebben"},file:{unit:"bytes",verb:"te hebben"},array:{unit:"elementen",verb:"te hebben"},set:{unit:"elementen",verb:"te hebben"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"getal";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return i=>{switch(i.code){case"invalid_type":return`Ongeldige invoer: verwacht ${i.expected}, ontving ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Ongeldige invoer: verwacht ${mt(i.values[0])}`:`Ongeldige optie: verwacht één van ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Te groot: verwacht dat ${i.origin??"waarde"} ${a.verb} ${o}${i.maximum.toString()} ${a.unit??"elementen"}`:`Te groot: verwacht dat ${i.origin??"waarde"} ${o}${i.maximum.toString()} is`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Te klein: verwacht dat ${i.origin} ${a.verb} ${o}${i.minimum.toString()} ${a.unit}`:`Te klein: verwacht dat ${i.origin} ${o}${i.minimum.toString()} is`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${n[o.format]??i.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${i.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${i.keys.length>1?"s":""}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${i.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${i.origin}`;default:return"Ongeldige invoer"}}};function Hse(){return{localeError:Wse()}}const Kse=()=>{const e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"tall";case"object":{if(Array.isArray(i))return"liste";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Ugyldig input: forventet ${i.expected}, fikk ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Ugyldig verdi: forventet ${mt(i.values[0])}`:`Ugyldig valg: forventet en av ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`For stor(t): forventet ${i.origin??"value"} til å ha ${o}${i.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${i.origin??"value"} til å ha ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`For lite(n): forventet ${i.origin} til å ha ${o}${i.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${i.origin} til å ha ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Ugyldig streng: må starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: må ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: må inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: må matche mønsteret ${o.pattern}`:`Ugyldig ${n[o.format]??i.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${i.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${i.origin}`;default:return"Ugyldig input"}}};function Vse(){return{localeError:Kse()}}const qse=()=>{const e={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"numara";case"object":{if(Array.isArray(i))return"saf";if(i===null)return"gayb";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"};return i=>{switch(i.code){case"invalid_type":return`Fâsit giren: umulan ${i.expected}, alınan ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Fâsit giren: umulan ${mt(i.values[0])}`:`Fâsit tercih: mûteberler ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Fazla büyük: ${i.origin??"value"}, ${o}${i.maximum.toString()} ${a.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${i.origin??"value"}, ${o}${i.maximum.toString()} olmalıydı.`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Fazla küçük: ${i.origin}, ${o}${i.minimum.toString()} ${a.unit} sahip olmalıydı.`:`Fazla küçük: ${i.origin}, ${o}${i.minimum.toString()} olmalıydı.`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Fâsit metin: "${o.prefix}" ile başlamalı.`:o.format==="ends_with"?`Fâsit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`Fâsit metin: "${o.includes}" ihtivâ etmeli.`:o.format==="regex"?`Fâsit metin: ${o.pattern} nakşına uymalı.`:`Fâsit ${n[o.format]??i.format}`}case"not_multiple_of":return`Fâsit sayı: ${i.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${i.keys.length>1?"s":""}: ${Ae(i.keys,", ")}`;case"invalid_key":return`${i.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${i.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function Zse(){return{localeError:qse()}}const Gse=()=>{const e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"عدد";case"object":{if(Array.isArray(i))return"ارې";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"};return i=>{switch(i.code){case"invalid_type":return`ناسم ورودي: باید ${i.expected} وای, مګر ${r(i.input)} ترلاسه شو`;case"invalid_value":return i.values.length===1?`ناسم ورودي: باید ${mt(i.values[0])} وای`:`ناسم انتخاب: باید یو له ${Ae(i.values,"|")} څخه وای`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`ډیر لوی: ${i.origin??"ارزښت"} باید ${o}${i.maximum.toString()} ${a.unit??"عنصرونه"} ولري`:`ډیر لوی: ${i.origin??"ارزښت"} باید ${o}${i.maximum.toString()} وي`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`ډیر کوچنی: ${i.origin} باید ${o}${i.minimum.toString()} ${a.unit} ولري`:`ډیر کوچنی: ${i.origin} باید ${o}${i.minimum.toString()} وي`}case"invalid_format":{const o=i;return o.format==="starts_with"?`ناسم متن: باید د "${o.prefix}" سره پیل شي`:o.format==="ends_with"?`ناسم متن: باید د "${o.suffix}" سره پای ته ورسيږي`:o.format==="includes"?`ناسم متن: باید "${o.includes}" ولري`:o.format==="regex"?`ناسم متن: باید د ${o.pattern} سره مطابقت ولري`:`${n[o.format]??i.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${i.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${i.keys.length>1?"کلیډونه":"کلیډ"}: ${Ae(i.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${i.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${i.origin} کې`;default:return"ناسمه ورودي"}}};function Yse(){return{localeError:Gse()}}const Xse=()=>{const e={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"liczba";case"object":{if(Array.isArray(i))return"tablica";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"};return i=>{switch(i.code){case"invalid_type":return`Nieprawidłowe dane wejściowe: oczekiwano ${i.expected}, otrzymano ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${mt(i.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Za duża wartość: oczekiwano, że ${i.origin??"wartość"} będzie mieć ${o}${i.maximum.toString()} ${a.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${i.origin??"wartość"} będzie wynosić ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Za mała wartość: oczekiwano, że ${i.origin??"wartość"} będzie mieć ${o}${i.minimum.toString()} ${a.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${i.origin??"wartość"} będzie wynosić ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${o.prefix}"`:o.format==="ends_with"?`Nieprawidłowy ciąg znaków: musi kończyć się na "${o.suffix}"`:o.format==="includes"?`Nieprawidłowy ciąg znaków: musi zawierać "${o.includes}"`:o.format==="regex"?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${o.pattern}`:`Nieprawidłow(y/a/e) ${n[o.format]??i.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${i.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${i.keys.length>1?"s":""}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${i.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${i.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function Qse(){return{localeError:Xse()}}const Jse=()=>{const e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"número";case"object":{if(Array.isArray(i))return"array";if(i===null)return"nulo";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return i=>{switch(i.code){case"invalid_type":return`Tipo inválido: esperado ${i.expected}, recebido ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Entrada inválida: esperado ${mt(i.values[0])}`:`Opção inválida: esperada uma das ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Muito grande: esperado que ${i.origin??"valor"} tivesse ${o}${i.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${i.origin??"valor"} fosse ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Muito pequeno: esperado que ${i.origin} tivesse ${o}${i.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${i.origin} fosse ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Texto inválido: deve começar com "${o.prefix}"`:o.format==="ends_with"?`Texto inválido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inválido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inválido: deve corresponder ao padrão ${o.pattern}`:`${n[o.format]??i.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${i.divisor}`;case"unrecognized_keys":return`Chave${i.keys.length>1?"s":""} desconhecida${i.keys.length>1?"s":""}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Chave inválida em ${i.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${i.origin}`;default:return"Campo inválido"}}};function ele(){return{localeError:Jse()}}function JT(e,t,r,n){const i=Math.abs(e),o=i%10,a=i%100;return a>=11&&a<=19?n:o===1?t:o>=2&&o<=4?r:n}const tle=()=>{const e={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"число";case"object":{if(Array.isArray(i))return"массив";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"};return i=>{switch(i.code){case"invalid_type":return`Неверный ввод: ожидалось ${i.expected}, получено ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Неверный ввод: ожидалось ${mt(i.values[0])}`:`Неверный вариант: ожидалось одно из ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);if(a){const l=Number(i.maximum),c=JT(l,a.unit.one,a.unit.few,a.unit.many);return`Слишком большое значение: ожидалось, что ${i.origin??"значение"} будет иметь ${o}${i.maximum.toString()} ${c}`}return`Слишком большое значение: ожидалось, что ${i.origin??"значение"} будет ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);if(a){const l=Number(i.minimum),c=JT(l,a.unit.one,a.unit.few,a.unit.many);return`Слишком маленькое значение: ожидалось, что ${i.origin} будет иметь ${o}${i.minimum.toString()} ${c}`}return`Слишком маленькое значение: ожидалось, что ${i.origin} будет ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Неверная строка: должна начинаться с "${o.prefix}"`:o.format==="ends_with"?`Неверная строка: должна заканчиваться на "${o.suffix}"`:o.format==="includes"?`Неверная строка: должна содержать "${o.includes}"`:o.format==="regex"?`Неверная строка: должна соответствовать шаблону ${o.pattern}`:`Неверный ${n[o.format]??i.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${i.divisor}`;case"unrecognized_keys":return`Нераспознанн${i.keys.length>1?"ые":"ый"} ключ${i.keys.length>1?"и":""}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${i.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${i.origin}`;default:return"Неверные входные данные"}}};function rle(){return{localeError:tle()}}const nle=()=>{const e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"število";case"object":{if(Array.isArray(i))return"tabela";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"};return i=>{switch(i.code){case"invalid_type":return`Neveljaven vnos: pričakovano ${i.expected}, prejeto ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Neveljaven vnos: pričakovano ${mt(i.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Preveliko: pričakovano, da bo ${i.origin??"vrednost"} imelo ${o}${i.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${i.origin??"vrednost"} ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Premajhno: pričakovano, da bo ${i.origin} imelo ${o}${i.minimum.toString()} ${a.unit}`:`Premajhno: pričakovano, da bo ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Neveljaven niz: mora se začeti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se končati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${n[o.format]??i.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${i.divisor}`;case"unrecognized_keys":return`Neprepoznan${i.keys.length>1?"i ključi":" ključ"}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${i.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${i.origin}`;default:return"Neveljaven vnos"}}};function ile(){return{localeError:nle()}}const ole=()=>{const e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"antal";case"object":{if(Array.isArray(i))return"lista";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return i=>{switch(i.code){case"invalid_type":return`Ogiltig inmatning: förväntat ${i.expected}, fick ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Ogiltig inmatning: förväntat ${mt(i.values[0])}`:`Ogiltigt val: förväntade en av ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`För stor(t): förväntade ${i.origin??"värdet"} att ha ${o}${i.maximum.toString()} ${a.unit??"element"}`:`För stor(t): förväntat ${i.origin??"värdet"} att ha ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`För lite(t): förväntade ${i.origin??"värdet"} att ha ${o}${i.minimum.toString()} ${a.unit}`:`För lite(t): förväntade ${i.origin??"värdet"} att ha ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Ogiltig sträng: måste börja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig sträng: måste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig sträng: måste innehålla "${o.includes}"`:o.format==="regex"?`Ogiltig sträng: måste matcha mönstret "${o.pattern}"`:`Ogiltig(t) ${n[o.format]??i.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${i.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${i.origin??"värdet"}`;default:return"Ogiltig input"}}};function ale(){return{localeError:ole()}}const sle=()=>{const e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"எண் அல்லாதது":"எண்";case"object":{if(Array.isArray(i))return"அணி";if(i===null)return"வெறுமை";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${i.expected}, பெறப்பட்டது ${r(i.input)}`;case"invalid_value":return i.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${mt(i.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${Ae(i.values,"|")} இல் ஒன்று`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${i.origin??"மதிப்பு"} ${o}${i.maximum.toString()} ${a.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${i.origin??"மதிப்பு"} ${o}${i.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${i.origin} ${o}${i.minimum.toString()} ${a.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${i.origin} ${o}${i.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{const o=i;return o.format==="starts_with"?`தவறான சரம்: "${o.prefix}" இல் தொடங்க வேண்டும்`:o.format==="ends_with"?`தவறான சரம்: "${o.suffix}" இல் முடிவடைய வேண்டும்`:o.format==="includes"?`தவறான சரம்: "${o.includes}" ஐ உள்ளடக்க வேண்டும்`:o.format==="regex"?`தவறான சரம்: ${o.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${n[o.format]??i.format}`}case"not_multiple_of":return`தவறான எண்: ${i.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${i.keys.length>1?"கள்":""}: ${Ae(i.keys,", ")}`;case"invalid_key":return`${i.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${i.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function lle(){return{localeError:sle()}}const ule=()=>{const e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"ไม่ใช่ตัวเลข (NaN)":"ตัวเลข";case"object":{if(Array.isArray(i))return"อาร์เรย์ (Array)";if(i===null)return"ไม่มีค่า (null)";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"};return i=>{switch(i.code){case"invalid_type":return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${i.expected} แต่ได้รับ ${r(i.input)}`;case"invalid_value":return i.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${mt(i.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"ไม่เกิน":"น้อยกว่า",a=t(i.origin);return a?`เกินกำหนด: ${i.origin??"ค่า"} ควรมี${o} ${i.maximum.toString()} ${a.unit??"รายการ"}`:`เกินกำหนด: ${i.origin??"ค่า"} ควรมี${o} ${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?"อย่างน้อย":"มากกว่า",a=t(i.origin);return a?`น้อยกว่ากำหนด: ${i.origin} ควรมี${o} ${i.minimum.toString()} ${a.unit}`:`น้อยกว่ากำหนด: ${i.origin} ควรมี${o} ${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${o.prefix}"`:o.format==="ends_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${o.suffix}"`:o.format==="includes"?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${o.includes}" อยู่ในข้อความ`:o.format==="regex"?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${o.pattern}`:`รูปแบบไม่ถูกต้อง: ${n[o.format]??i.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${i.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${Ae(i.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${i.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${i.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function cle(){return{localeError:ule()}}const dle=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},fle=()=>{const e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function t(n){return e[n]??null}const r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"};return n=>{switch(n.code){case"invalid_type":return`Geçersiz değer: beklenen ${n.expected}, alınan ${dle(n.input)}`;case"invalid_value":return n.values.length===1?`Geçersiz değer: beklenen ${mt(n.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${Ae(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",o=t(n.origin);return o?`Çok büyük: beklenen ${n.origin??"değer"} ${i}${n.maximum.toString()} ${o.unit??"öğe"}`:`Çok büyük: beklenen ${n.origin??"değer"} ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",o=t(n.origin);return o?`Çok küçük: beklenen ${n.origin} ${i}${n.minimum.toString()} ${o.unit}`:`Çok küçük: beklenen ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Geçersiz metin: "${i.prefix}" ile başlamalı`:i.format==="ends_with"?`Geçersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Geçersiz metin: "${i.includes}" içermeli`:i.format==="regex"?`Geçersiz metin: ${i.pattern} desenine uymalı`:`Geçersiz ${r[i.format]??n.format}`}case"not_multiple_of":return`Geçersiz sayı: ${n.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${n.keys.length>1?"lar":""}: ${Ae(n.keys,", ")}`;case"invalid_key":return`${n.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${n.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function ple(){return{localeError:fle()}}const hle=()=>{const e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"число";case"object":{if(Array.isArray(i))return"масив";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"};return i=>{switch(i.code){case"invalid_type":return`Неправильні вхідні дані: очікується ${i.expected}, отримано ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Неправильні вхідні дані: очікується ${mt(i.values[0])}`:`Неправильна опція: очікується одне з ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Занадто велике: очікується, що ${i.origin??"значення"} ${a.verb} ${o}${i.maximum.toString()} ${a.unit??"елементів"}`:`Занадто велике: очікується, що ${i.origin??"значення"} буде ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Занадто мале: очікується, що ${i.origin} ${a.verb} ${o}${i.minimum.toString()} ${a.unit}`:`Занадто мале: очікується, що ${i.origin} буде ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Неправильний рядок: повинен починатися з "${o.prefix}"`:o.format==="ends_with"?`Неправильний рядок: повинен закінчуватися на "${o.suffix}"`:o.format==="includes"?`Неправильний рядок: повинен містити "${o.includes}"`:o.format==="regex"?`Неправильний рядок: повинен відповідати шаблону ${o.pattern}`:`Неправильний ${n[o.format]??i.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${i.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${i.keys.length>1?"і":""}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${i.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${i.origin}`;default:return"Неправильні вхідні дані"}}};function oB(){return{localeError:hle()}}function mle(){return oB()}const gle=()=>{const e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"نمبر";case"object":{if(Array.isArray(i))return"آرے";if(i===null)return"نل";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"};return i=>{switch(i.code){case"invalid_type":return`غلط ان پٹ: ${i.expected} متوقع تھا، ${r(i.input)} موصول ہوا`;case"invalid_value":return i.values.length===1?`غلط ان پٹ: ${mt(i.values[0])} متوقع تھا`:`غلط آپشن: ${Ae(i.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`بہت بڑا: ${i.origin??"ویلیو"} کے ${o}${i.maximum.toString()} ${a.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${i.origin??"ویلیو"} کا ${o}${i.maximum.toString()} ہونا متوقع تھا`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`بہت چھوٹا: ${i.origin} کے ${o}${i.minimum.toString()} ${a.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${i.origin} کا ${o}${i.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{const o=i;return o.format==="starts_with"?`غلط سٹرنگ: "${o.prefix}" سے شروع ہونا چاہیے`:o.format==="ends_with"?`غلط سٹرنگ: "${o.suffix}" پر ختم ہونا چاہیے`:o.format==="includes"?`غلط سٹرنگ: "${o.includes}" شامل ہونا چاہیے`:o.format==="regex"?`غلط سٹرنگ: پیٹرن ${o.pattern} سے میچ ہونا چاہیے`:`غلط ${n[o.format]??i.format}`}case"not_multiple_of":return`غلط نمبر: ${i.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${i.keys.length>1?"ز":""}: ${Ae(i.keys,"، ")}`;case"invalid_key":return`${i.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${i.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function vle(){return{localeError:gle()}}const yle=()=>{const e={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"số";case"object":{if(Array.isArray(i))return"mảng";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"};return i=>{switch(i.code){case"invalid_type":return`Đầu vào không hợp lệ: mong đợi ${i.expected}, nhận được ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Đầu vào không hợp lệ: mong đợi ${mt(i.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Quá lớn: mong đợi ${i.origin??"giá trị"} ${a.verb} ${o}${i.maximum.toString()} ${a.unit??"phần tử"}`:`Quá lớn: mong đợi ${i.origin??"giá trị"} ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Quá nhỏ: mong đợi ${i.origin} ${a.verb} ${o}${i.minimum.toString()} ${a.unit}`:`Quá nhỏ: mong đợi ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Chuỗi không hợp lệ: phải bắt đầu bằng "${o.prefix}"`:o.format==="ends_with"?`Chuỗi không hợp lệ: phải kết thúc bằng "${o.suffix}"`:o.format==="includes"?`Chuỗi không hợp lệ: phải bao gồm "${o.includes}"`:o.format==="regex"?`Chuỗi không hợp lệ: phải khớp với mẫu ${o.pattern}`:`${n[o.format]??i.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${i.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${Ae(i.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${i.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${i.origin}`;default:return"Đầu vào không hợp lệ"}}};function ble(){return{localeError:yle()}}const xle=()=>{const e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"非数字(NaN)":"数字";case"object":{if(Array.isArray(i))return"数组";if(i===null)return"空值(null)";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"};return i=>{switch(i.code){case"invalid_type":return`无效输入:期望 ${i.expected},实际接收 ${r(i.input)}`;case"invalid_value":return i.values.length===1?`无效输入:期望 ${mt(i.values[0])}`:`无效选项:期望以下之一 ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`数值过大:期望 ${i.origin??"值"} ${o}${i.maximum.toString()} ${a.unit??"个元素"}`:`数值过大:期望 ${i.origin??"值"} ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`数值过小:期望 ${i.origin} ${o}${i.minimum.toString()} ${a.unit}`:`数值过小:期望 ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`无效字符串:必须以 "${o.prefix}" 开头`:o.format==="ends_with"?`无效字符串:必须以 "${o.suffix}" 结尾`:o.format==="includes"?`无效字符串:必须包含 "${o.includes}"`:o.format==="regex"?`无效字符串:必须满足正则表达式 ${o.pattern}`:`无效${n[o.format]??i.format}`}case"not_multiple_of":return`无效数字:必须是 ${i.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${Ae(i.keys,", ")}`;case"invalid_key":return`${i.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${i.origin} 中包含无效值(value)`;default:return"无效输入"}}};function wle(){return{localeError:xle()}}const Sle=()=>{const e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"};return i=>{switch(i.code){case"invalid_type":return`無效的輸入值:預期為 ${i.expected},但收到 ${r(i.input)}`;case"invalid_value":return i.values.length===1?`無效的輸入值:預期為 ${mt(i.values[0])}`:`無效的選項:預期為以下其中之一 ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`數值過大:預期 ${i.origin??"值"} 應為 ${o}${i.maximum.toString()} ${a.unit??"個元素"}`:`數值過大:預期 ${i.origin??"值"} 應為 ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`數值過小:預期 ${i.origin} 應為 ${o}${i.minimum.toString()} ${a.unit}`:`數值過小:預期 ${i.origin} 應為 ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`無效的字串:必須以 "${o.prefix}" 開頭`:o.format==="ends_with"?`無效的字串:必須以 "${o.suffix}" 結尾`:o.format==="includes"?`無效的字串:必須包含 "${o.includes}"`:o.format==="regex"?`無效的字串:必須符合格式 ${o.pattern}`:`無效的 ${n[o.format]??i.format}`}case"not_multiple_of":return`無效的數字:必須為 ${i.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${i.keys.length>1?"們":""}:${Ae(i.keys,"、")}`;case"invalid_key":return`${i.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${i.origin} 中有無效的值`;default:return"無效的輸入值"}}};function kle(){return{localeError:Sle()}}const Ple=()=>{const e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function t(i){return e[i]??null}const r=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"nọ́mbà";case"object":{if(Array.isArray(i))return"akopọ";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"};return i=>{switch(i.code){case"invalid_type":return`Ìbáwọlé aṣìṣe: a ní láti fi ${i.expected}, àmọ̀ a rí ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${mt(i.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Tó pọ̀ jù: a ní láti jẹ́ pé ${i.origin??"iye"} ${a.verb} ${o}${i.maximum} ${a.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${o}${i.maximum}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Kéré ju: a ní láti jẹ́ pé ${i.origin} ${a.verb} ${o}${i.minimum} ${a.unit}`:`Kéré ju: a ní láti jẹ́ ${o}${i.minimum}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${o.prefix}"`:o.format==="ends_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${o.suffix}"`:o.format==="includes"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${o.includes}"`:o.format==="regex"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${o.pattern}`:`Aṣìṣe: ${n[o.format]??i.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${i.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${Ae(i.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${i.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${i.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function $le(){return{localeError:Ple()}}const aB=Object.freeze(Object.defineProperty({__proto__:null,ar:Lae,az:Uae,be:Wae,bg:Vae,ca:Zae,cs:Yae,da:Qae,de:ese,en:nB,eo:ose,es:sse,fa:use,fi:dse,fr:pse,frCA:mse,he:vse,hu:bse,id:wse,is:Pse,it:Cse,ja:Ese,ka:jse,kh:Tse,km:iB,ko:Mse,lt:Dse,mk:Bse,ms:Fse,nl:Hse,no:Vse,ota:Zse,pl:Qse,ps:Yse,pt:ele,ru:rle,sl:ile,sv:ale,ta:lle,th:cle,tr:ple,ua:mle,uk:oB,ur:vle,vi:ble,yo:$le,zhCN:wle,zhTW:kle},Symbol.toStringTag,{value:"Module"}));var e2;const sB=Symbol("ZodOutput"),lB=Symbol("ZodInput");class U${constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const n=r[0];if(this._map.set(t,n),n&&typeof n=="object"&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,t)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const n={...this.get(r)??{}};delete n.id;const i={...n,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function F$(){return new U$}(e2=globalThis).__zod_globalRegistry??(e2.__zod_globalRegistry=F$());const Lo=globalThis.__zod_globalRegistry;function uB(e,t){return new e({type:"string",...$e(t)})}function cB(e,t){return new e({type:"string",coerce:!0,...$e(t)})}function W$(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...$e(t)})}function Ov(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...$e(t)})}function H$(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...$e(t)})}function K$(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...$e(t)})}function V$(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...$e(t)})}function q$(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...$e(t)})}function mb(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...$e(t)})}function Z$(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...$e(t)})}function G$(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...$e(t)})}function Y$(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...$e(t)})}function X$(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...$e(t)})}function Q$(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...$e(t)})}function J$(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...$e(t)})}function eC(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...$e(t)})}function tC(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...$e(t)})}function rC(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...$e(t)})}function dB(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...$e(t)})}function nC(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...$e(t)})}function iC(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...$e(t)})}function oC(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...$e(t)})}function aC(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...$e(t)})}function sC(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...$e(t)})}function lC(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...$e(t)})}const fB={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function pB(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...$e(t)})}function hB(e,t){return new e({type:"string",format:"date",check:"string_format",...$e(t)})}function mB(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...$e(t)})}function gB(e,t){return new e({type:"string",format:"duration",check:"string_format",...$e(t)})}function vB(e,t){return new e({type:"number",checks:[],...$e(t)})}function yB(e,t){return new e({type:"number",coerce:!0,checks:[],...$e(t)})}function bB(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...$e(t)})}function xB(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...$e(t)})}function wB(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...$e(t)})}function SB(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...$e(t)})}function kB(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...$e(t)})}function PB(e,t){return new e({type:"boolean",...$e(t)})}function $B(e,t){return new e({type:"boolean",coerce:!0,...$e(t)})}function CB(e,t){return new e({type:"bigint",...$e(t)})}function OB(e,t){return new e({type:"bigint",coerce:!0,...$e(t)})}function EB(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...$e(t)})}function _B(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...$e(t)})}function IB(e,t){return new e({type:"symbol",...$e(t)})}function jB(e,t){return new e({type:"undefined",...$e(t)})}function AB(e,t){return new e({type:"null",...$e(t)})}function TB(e){return new e({type:"any"})}function RB(e){return new e({type:"unknown"})}function MB(e,t){return new e({type:"never",...$e(t)})}function NB(e,t){return new e({type:"void",...$e(t)})}function zB(e,t){return new e({type:"date",...$e(t)})}function DB(e,t){return new e({type:"date",coerce:!0,...$e(t)})}function LB(e,t){return new e({type:"nan",...$e(t)})}function xu(e,t){return new A$({check:"less_than",...$e(t),value:e,inclusive:!1})}function Fo(e,t){return new A$({check:"less_than",...$e(t),value:e,inclusive:!0})}function wu(e,t){return new T$({check:"greater_than",...$e(t),value:e,inclusive:!1})}function Mi(e,t){return new T$({check:"greater_than",...$e(t),value:e,inclusive:!0})}function BB(e){return wu(0,e)}function UB(e){return xu(0,e)}function FB(e){return Fo(0,e)}function WB(e){return Mi(0,e)}function yp(e,t){return new $6({check:"multiple_of",...$e(t),value:e})}function gb(e,t){return new E6({check:"max_size",...$e(t),maximum:e})}function bp(e,t){return new _6({check:"min_size",...$e(t),minimum:e})}function uC(e,t){return new I6({check:"size_equals",...$e(t),size:e})}function vb(e,t){return new j6({check:"max_length",...$e(t),maximum:e})}function rd(e,t){return new A6({check:"min_length",...$e(t),minimum:e})}function yb(e,t){return new T6({check:"length_equals",...$e(t),length:e})}function cC(e,t){return new R6({check:"string_format",format:"regex",...$e(t),pattern:e})}function dC(e){return new M6({check:"string_format",format:"lowercase",...$e(e)})}function fC(e){return new N6({check:"string_format",format:"uppercase",...$e(e)})}function pC(e,t){return new z6({check:"string_format",format:"includes",...$e(t),includes:e})}function hC(e,t){return new D6({check:"string_format",format:"starts_with",...$e(t),prefix:e})}function mC(e,t){return new L6({check:"string_format",format:"ends_with",...$e(t),suffix:e})}function HB(e,t,r){return new B6({check:"property",property:e,schema:t,...$e(r)})}function gC(e,t){return new U6({check:"mime_type",mime:e,...$e(t)})}function xl(e){return new F6({check:"overwrite",tx:e})}function vC(e){return xl(t=>t.normalize(e))}function yC(){return xl(e=>e.trim())}function bC(){return xl(e=>e.toLowerCase())}function xC(){return xl(e=>e.toUpperCase())}function wC(){return xl(e=>w4(e))}function KB(e,t,r){return new e({type:"array",element:t,...$e(r)})}function Cle(e,t,r){return new e({type:"union",options:t,...$e(r)})}function Ole(e,t,r,n){return new e({type:"union",options:r,discriminator:t,...$e(n)})}function Ele(e,t,r){return new e({type:"intersection",left:t,right:r})}function _le(e,t,r,n){const i=r instanceof wt,o=i?n:r,a=i?r:null;return new e({type:"tuple",items:t,rest:a,...$e(o)})}function Ile(e,t,r,n){return new e({type:"record",keyType:t,valueType:r,...$e(n)})}function jle(e,t,r,n){return new e({type:"map",keyType:t,valueType:r,...$e(n)})}function Ale(e,t,r){return new e({type:"set",valueType:t,...$e(r)})}function Tle(e,t,r){const n=Array.isArray(t)?Object.fromEntries(t.map(i=>[i,i])):t;return new e({type:"enum",entries:n,...$e(r)})}function Rle(e,t,r){return new e({type:"enum",entries:t,...$e(r)})}function Mle(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...$e(r)})}function VB(e,t){return new e({type:"file",...$e(t)})}function Nle(e,t){return new e({type:"transform",transform:t})}function zle(e,t){return new e({type:"optional",innerType:t})}function Dle(e,t){return new e({type:"nullable",innerType:t})}function Lle(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():fb(r)}})}function Ble(e,t,r){return new e({type:"nonoptional",innerType:t,...$e(r)})}function Ule(e,t){return new e({type:"success",innerType:t})}function Fle(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function Wle(e,t,r){return new e({type:"pipe",in:t,out:r})}function Hle(e,t){return new e({type:"readonly",innerType:t})}function Kle(e,t,r){return new e({type:"template_literal",parts:t,...$e(r)})}function Vle(e,t){return new e({type:"lazy",getter:t})}function qle(e,t){return new e({type:"promise",innerType:t})}function qB(e,t,r){const n=$e(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}function ZB(e,t,r){return new e({type:"custom",check:"custom",fn:t,...$e(r)})}function GB(e){const t=YB(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(ed(n,r.value,t._zod.def));else{const i=n;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),r.issues.push(ed(i))}},e(r.value,r)));return t}function YB(e,t){const r=new Er({check:"custom",...$e(t)});return r._zod.check=e,r}function XB(e){const t=new Er({check:"describe"});return t._zod.onattach=[r=>{const n=Lo.get(r)??{};Lo.add(r,{...n,description:e})}],t._zod.check=()=>{},t}function QB(e){const t=new Er({check:"meta"});return t._zod.onattach=[r=>{const n=Lo.get(r)??{};Lo.add(r,{...n,...e})}],t._zod.check=()=>{},t}function JB(e,t){const r=$e(t);let n=r.truthy??["true","1","yes","on","y","enabled"],i=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(n=n.map(v=>typeof v=="string"?v.toLowerCase():v),i=i.map(v=>typeof v=="string"?v.toLowerCase():v));const o=new Set(n),a=new Set(i),l=e.Codec??B$,c=e.Boolean??N$,d=e.String??xh,f=new d({type:"string",error:r.error}),p=new c({type:"boolean",error:r.error}),g=new l({type:"pipe",in:f,out:p,transform:((v,b)=>{let S=v;return r.case!=="sensitive"&&(S=S.toLowerCase()),o.has(S)?!0:a.has(S)?!1:(b.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:b.value,inst:g,continue:!1}),{})}),reverseTransform:((v,b)=>v===!0?n[0]||"true":i[0]||"false"),error:r.error});return g}function wh(e,t,r,n={}){const i=$e(n),o={...$e(n),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:l=>r.test(l),...i};return r instanceof RegExp&&(o.pattern=r),new e(o)}class J1{constructor(t){this.counter=0,this.metadataRegistry=(t==null?void 0:t.metadata)??Lo,this.target=(t==null?void 0:t.target)??"draft-2020-12",this.unrepresentable=(t==null?void 0:t.unrepresentable)??"throw",this.override=(t==null?void 0:t.override)??(()=>{}),this.io=(t==null?void 0:t.io)??"output",this.seen=new Map}process(t,r={path:[],schemaPath:[]}){var p,g,v;var n;const i=t._zod.def,o={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},a=this.seen.get(t);if(a)return a.count++,r.schemaPath.includes(t)&&(a.cycle=r.path),a.schema;const l={schema:{},count:1,cycle:void 0,path:r.path};this.seen.set(t,l);const c=(g=(p=t._zod).toJSONSchema)==null?void 0:g.call(p);if(c)l.schema=c;else{const b={...r,schemaPath:[...r.schemaPath,t],path:r.path},S=t._zod.parent;if(S)l.ref=S,this.process(S,b),this.seen.get(S).isParent=!0;else{const w=l.schema;switch(i.type){case"string":{const k=w;k.type="string";const{minimum:C,maximum:P,format:O,patterns:E,contentEncoding:_}=t._zod.bag;if(typeof C=="number"&&(k.minLength=C),typeof P=="number"&&(k.maxLength=P),O&&(k.format=o[O]??O,k.format===""&&delete k.format),_&&(k.contentEncoding=_),E&&E.size>0){const A=[...E];A.length===1?k.pattern=A[0].source:A.length>1&&(l.schema.allOf=[...A.map(T=>({...this.target==="draft-7"||this.target==="draft-4"||this.target==="openapi-3.0"?{type:"string"}:{},pattern:T.source}))])}break}case"number":{const k=w,{minimum:C,maximum:P,format:O,multipleOf:E,exclusiveMaximum:_,exclusiveMinimum:A}=t._zod.bag;typeof O=="string"&&O.includes("int")?k.type="integer":k.type="number",typeof A=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(k.minimum=A,k.exclusiveMinimum=!0):k.exclusiveMinimum=A),typeof C=="number"&&(k.minimum=C,typeof A=="number"&&this.target!=="draft-4"&&(A>=C?delete k.minimum:delete k.exclusiveMinimum)),typeof _=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(k.maximum=_,k.exclusiveMaximum=!0):k.exclusiveMaximum=_),typeof P=="number"&&(k.maximum=P,typeof _=="number"&&this.target!=="draft-4"&&(_<=P?delete k.maximum:delete k.exclusiveMaximum)),typeof E=="number"&&(k.multipleOf=E);break}case"boolean":{const k=w;k.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{this.target==="openapi-3.0"?(w.type="string",w.nullable=!0,w.enum=[null]):w.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{w.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{const k=w,{minimum:C,maximum:P}=t._zod.bag;typeof C=="number"&&(k.minItems=C),typeof P=="number"&&(k.maxItems=P),k.type="array",k.items=this.process(i.element,{...b,path:[...b.path,"items"]});break}case"object":{const k=w;k.type="object",k.properties={};const C=i.shape;for(const E in C)k.properties[E]=this.process(C[E],{...b,path:[...b.path,"properties",E]});const P=new Set(Object.keys(C)),O=new Set([...P].filter(E=>{const _=i.shape[E]._zod;return this.io==="input"?_.optin===void 0:_.optout===void 0}));O.size>0&&(k.required=Array.from(O)),((v=i.catchall)==null?void 0:v._zod.def.type)==="never"?k.additionalProperties=!1:i.catchall?i.catchall&&(k.additionalProperties=this.process(i.catchall,{...b,path:[...b.path,"additionalProperties"]})):this.io==="output"&&(k.additionalProperties=!1);break}case"union":{const k=w,C=i.discriminator!==void 0,P=i.options.map((O,E)=>this.process(O,{...b,path:[...b.path,C?"oneOf":"anyOf",E]}));C?k.oneOf=P:k.anyOf=P;break}case"intersection":{const k=w,C=this.process(i.left,{...b,path:[...b.path,"allOf",0]}),P=this.process(i.right,{...b,path:[...b.path,"allOf",1]}),O=_=>"allOf"in _&&Object.keys(_).length===1,E=[...O(C)?C.allOf:[C],...O(P)?P.allOf:[P]];k.allOf=E;break}case"tuple":{const k=w;k.type="array";const C=this.target==="draft-2020-12"?"prefixItems":"items",P=this.target==="draft-2020-12"||this.target==="openapi-3.0"?"items":"additionalItems",O=i.items.map((T,R)=>this.process(T,{...b,path:[...b.path,C,R]})),E=i.rest?this.process(i.rest,{...b,path:[...b.path,P,...this.target==="openapi-3.0"?[i.items.length]:[]]}):null;this.target==="draft-2020-12"?(k.prefixItems=O,E&&(k.items=E)):this.target==="openapi-3.0"?(k.items={anyOf:O},E&&k.items.anyOf.push(E),k.minItems=O.length,E||(k.maxItems=O.length)):(k.items=O,E&&(k.additionalItems=E));const{minimum:_,maximum:A}=t._zod.bag;typeof _=="number"&&(k.minItems=_),typeof A=="number"&&(k.maxItems=A);break}case"record":{const k=w;k.type="object",(this.target==="draft-7"||this.target==="draft-2020-12")&&(k.propertyNames=this.process(i.keyType,{...b,path:[...b.path,"propertyNames"]})),k.additionalProperties=this.process(i.valueType,{...b,path:[...b.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{const k=w,C=v$(i.entries);C.every(P=>typeof P=="number")&&(k.type="number"),C.every(P=>typeof P=="string")&&(k.type="string"),k.enum=C;break}case"literal":{const k=w,C=[];for(const P of i.values)if(P===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof P=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");C.push(Number(P))}else C.push(P);if(C.length!==0)if(C.length===1){const P=C[0];k.type=P===null?"null":typeof P,this.target==="draft-4"||this.target==="openapi-3.0"?k.enum=[P]:k.const=P}else C.every(P=>typeof P=="number")&&(k.type="number"),C.every(P=>typeof P=="string")&&(k.type="string"),C.every(P=>typeof P=="boolean")&&(k.type="string"),C.every(P=>P===null)&&(k.type="null"),k.enum=C;break}case"file":{const k=w,C={type:"string",format:"binary",contentEncoding:"binary"},{minimum:P,maximum:O,mime:E}=t._zod.bag;P!==void 0&&(C.minLength=P),O!==void 0&&(C.maxLength=O),E?E.length===1?(C.contentMediaType=E[0],Object.assign(k,C)):k.anyOf=E.map(_=>({...C,contentMediaType:_})):Object.assign(k,C);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{const k=this.process(i.innerType,b);this.target==="openapi-3.0"?(l.ref=i.innerType,w.nullable=!0):w.anyOf=[k,{type:"null"}];break}case"nonoptional":{this.process(i.innerType,b),l.ref=i.innerType;break}case"success":{const k=w;k.type="boolean";break}case"default":{this.process(i.innerType,b),l.ref=i.innerType,w.default=JSON.parse(JSON.stringify(i.defaultValue));break}case"prefault":{this.process(i.innerType,b),l.ref=i.innerType,this.io==="input"&&(w._prefault=JSON.parse(JSON.stringify(i.defaultValue)));break}case"catch":{this.process(i.innerType,b),l.ref=i.innerType;let k;try{k=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}w.default=k;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{const k=w,C=t._zod.pattern;if(!C)throw new Error("Pattern not found in template literal");k.type="string",k.pattern=C.source;break}case"pipe":{const k=this.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;this.process(k,b),l.ref=k;break}case"readonly":{this.process(i.innerType,b),l.ref=i.innerType,w.readOnly=!0;break}case"promise":{this.process(i.innerType,b),l.ref=i.innerType;break}case"optional":{this.process(i.innerType,b),l.ref=i.innerType;break}case"lazy":{const k=t._zod.innerType;this.process(k,b),l.ref=k;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}case"function":{if(this.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema");break}}}}const d=this.metadataRegistry.get(t);return d&&Object.assign(l.schema,d),this.io==="input"&&Zn(t)&&(delete l.schema.examples,delete l.schema.default),this.io==="input"&&l.schema._prefault&&((n=l.schema).default??(n.default=l.schema._prefault)),delete l.schema._prefault,this.seen.get(t).schema}emit(t,r){var f,p,g,v,b,S;const n={cycles:(r==null?void 0:r.cycles)??"ref",reused:(r==null?void 0:r.reused)??"inline",external:(r==null?void 0:r.external)??void 0},i=this.seen.get(t);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=w=>{var E;const k=this.target==="draft-2020-12"?"$defs":"definitions";if(n.external){const _=(E=n.external.registry.get(w[0]))==null?void 0:E.id,A=n.external.uri??(R=>R);if(_)return{ref:A(_)};const T=w[1].defId??w[1].schema.id??`schema${this.counter++}`;return w[1].defId=T,{defId:T,ref:`${A("__shared")}#/${k}/${T}`}}if(w[1]===i)return{ref:"#"};const P=`#/${k}/`,O=w[1].schema.id??`__schema${this.counter++}`;return{defId:O,ref:P+O}},a=w=>{if(w[1].schema.$ref)return;const k=w[1],{ref:C,defId:P}=o(w);k.def={...k.schema},P&&(k.defId=P);const O=k.schema;for(const E in O)delete O[E];O.$ref=C};if(n.cycles==="throw")for(const w of this.seen.entries()){const k=w[1];if(k.cycle)throw new Error(`Cycle detected: #/${(f=k.cycle)==null?void 0:f.join("/")}/<root>
312
312
 
313
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const w of this.seen.entries()){const k=w[1];if(t===w[0]){a(w);continue}if(n.external){const P=(p=n.external.registry.get(w[0]))==null?void 0:p.id;if(t!==w[0]&&P){a(w);continue}}if((g=this.metadataRegistry.get(w[0]))==null?void 0:g.id){a(w);continue}if(k.cycle){a(w);continue}if(k.count>1&&n.reused==="ref"){a(w);continue}}const l=(w,k)=>{const C=this.seen.get(w),P=C.def??C.schema,O={...P};if(C.ref===null)return;const E=C.ref;if(C.ref=null,E){l(E,k);const _=this.seen.get(E).schema;_.$ref&&(k.target==="draft-7"||k.target==="draft-4"||k.target==="openapi-3.0")?(P.allOf=P.allOf??[],P.allOf.push(_)):(Object.assign(P,_),Object.assign(P,O))}C.isParent||this.override({zodSchema:w,jsonSchema:P,path:C.path??[]})};for(const w of[...this.seen.entries()].reverse())l(w[0],{target:this.target});const c={};if(this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":this.target==="draft-4"?c.$schema="http://json-schema.org/draft-04/schema#":this.target==="openapi-3.0"||console.warn(`Invalid target: ${this.target}`),(v=n.external)!=null&&v.uri){const w=(b=n.external.registry.get(t))==null?void 0:b.id;if(!w)throw new Error("Schema is missing an `id` property");c.$id=n.external.uri(w)}Object.assign(c,i.def);const d=((S=n.external)==null?void 0:S.defs)??{};for(const w of this.seen.entries()){const k=w[1];k.def&&k.defId&&(d[k.defId]=k.def)}n.external||Object.keys(d).length>0&&(this.target==="draft-2020-12"?c.$defs=d:c.definitions=d);try{return JSON.parse(JSON.stringify(c))}catch{throw new Error("Error converting schema to JSON.")}}}function eU(e,t){if(e instanceof U$){const n=new J1(t),i={};for(const l of e._idmap.entries()){const[c,d]=l;n.process(d)}const o={},a={registry:e,uri:t==null?void 0:t.uri,defs:i};for(const l of e._idmap.entries()){const[c,d]=l;o[c]=n.emit(d,{...t,external:a})}if(Object.keys(i).length>0){const l=n.target==="draft-2020-12"?"$defs":"definitions";o.__shared={[l]:i}}return{schemas:o}}const r=new J1(t);return r.process(e),r.emit(e,t)}function Zn(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return Zn(n.element,r);if(n.type==="set")return Zn(n.valueType,r);if(n.type==="lazy")return Zn(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return Zn(n.innerType,r);if(n.type==="intersection")return Zn(n.left,r)||Zn(n.right,r);if(n.type==="record"||n.type==="map")return Zn(n.keyType,r)||Zn(n.valueType,r);if(n.type==="pipe")return Zn(n.in,r)||Zn(n.out,r);if(n.type==="object"){for(const i in n.shape)if(Zn(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(const i of n.options)if(Zn(i,r))return!0;return!1}if(n.type==="tuple"){for(const i of n.items)if(Zn(i,r))return!0;return!!(n.rest&&Zn(n.rest,r))}return!1}const Zle=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Gle=Object.freeze(Object.defineProperty({__proto__:null,$ZodAny:k5,$ZodArray:E5,$ZodAsyncError:cu,$ZodBase64:d5,$ZodBase64URL:p5,$ZodBigInt:z$,$ZodBigIntFormat:b5,$ZodBoolean:N$,$ZodCIDRv4:u5,$ZodCIDRv6:c5,$ZodCUID:X6,$ZodCUID2:Q6,$ZodCatch:Z5,$ZodCheck:Er,$ZodCheckBigIntFormat:O6,$ZodCheckEndsWith:L6,$ZodCheckGreaterThan:T$,$ZodCheckIncludes:z6,$ZodCheckLengthEquals:T6,$ZodCheckLessThan:A$,$ZodCheckLowerCase:M6,$ZodCheckMaxLength:j6,$ZodCheckMaxSize:E6,$ZodCheckMimeType:U6,$ZodCheckMinLength:A6,$ZodCheckMinSize:_6,$ZodCheckMultipleOf:$6,$ZodCheckNumberFormat:C6,$ZodCheckOverwrite:F6,$ZodCheckProperty:B6,$ZodCheckRegex:R6,$ZodCheckSizeEquals:I6,$ZodCheckStartsWith:D6,$ZodCheckStringFormat:bh,$ZodCheckUpperCase:N6,$ZodCodec:B$,$ZodCustom:rB,$ZodCustomStringFormat:v5,$ZodDate:O5,$ZodDefault:H5,$ZodDiscriminatedUnion:T5,$ZodE164:h5,$ZodEmail:q6,$ZodEmoji:G6,$ZodEncodeError:cb,$ZodEnum:D5,$ZodError:b$,$ZodFile:B5,$ZodFunction:J5,$ZodGUID:K6,$ZodIPv4:a5,$ZodIPv6:s5,$ZodISODate:n5,$ZodISODateTime:r5,$ZodISODuration:o5,$ZodISOTime:i5,$ZodIntersection:R5,$ZodJWT:g5,$ZodKSUID:t5,$ZodLazy:tB,$ZodLiteral:L5,$ZodMAC:l5,$ZodMap:N5,$ZodNaN:G5,$ZodNanoID:Y6,$ZodNever:$5,$ZodNonOptional:V5,$ZodNull:S5,$ZodNullable:W5,$ZodNumber:M$,$ZodNumberFormat:y5,$ZodObject:j5,$ZodObjectJIT:A5,$ZodOptional:F5,$ZodPipe:Y5,$ZodPrefault:K5,$ZodPromise:eB,$ZodReadonly:X5,$ZodRealError:Hi,$ZodRecord:M5,$ZodRegistry:U$,$ZodSet:z5,$ZodString:xh,$ZodStringFormat:cr,$ZodSuccess:q5,$ZodSymbol:x5,$ZodTemplateLiteral:Q5,$ZodTransform:U5,$ZodTuple:L$,$ZodType:wt,$ZodULID:J6,$ZodURL:Z6,$ZodUUID:V6,$ZodUndefined:w5,$ZodUnion:D$,$ZodUnknown:P5,$ZodVoid:C5,$ZodXID:e5,$brand:b4,$constructor:re,$input:lB,$output:sB,Doc:W6,JSONSchema:Zle,JSONSchemaGenerator:J1,NEVER:y4,TimePrecision:fB,_any:TB,_array:KB,_base64:oC,_base64url:aC,_bigint:CB,_boolean:PB,_catch:Fle,_check:YB,_cidrv4:nC,_cidrv6:iC,_coercedBigint:OB,_coercedBoolean:$B,_coercedDate:DB,_coercedNumber:yB,_coercedString:cB,_cuid:Y$,_cuid2:X$,_custom:qB,_date:zB,_decode:k$,_decodeAsync:$$,_default:Lle,_discriminatedUnion:Ole,_e164:sC,_email:W$,_emoji:Z$,_encode:S$,_encodeAsync:P$,_endsWith:mC,_enum:Tle,_file:VB,_float32:xB,_float64:wB,_gt:wu,_gte:Mi,_guid:Ov,_includes:pC,_int:bB,_int32:SB,_int64:EB,_intersection:Ele,_ipv4:tC,_ipv6:rC,_isoDate:hB,_isoDateTime:pB,_isoDuration:gB,_isoTime:mB,_jwt:lC,_ksuid:eC,_lazy:Vle,_length:yb,_literal:Mle,_lowercase:dC,_lt:xu,_lte:Fo,_mac:dB,_map:jle,_max:Fo,_maxLength:vb,_maxSize:gb,_mime:gC,_min:Mi,_minLength:rd,_minSize:bp,_multipleOf:yp,_nan:LB,_nanoid:G$,_nativeEnum:Rle,_negative:UB,_never:MB,_nonnegative:WB,_nonoptional:Ble,_nonpositive:FB,_normalize:vC,_null:AB,_nullable:Dle,_number:vB,_optional:zle,_overwrite:xl,_parse:ph,_parseAsync:hh,_pipe:Wle,_positive:BB,_promise:qle,_property:HB,_readonly:Hle,_record:Ile,_refine:ZB,_regex:cC,_safeDecode:O$,_safeDecodeAsync:_$,_safeEncode:C$,_safeEncodeAsync:E$,_safeParse:mh,_safeParseAsync:gh,_set:Ale,_size:uC,_slugify:wC,_startsWith:hC,_string:uB,_stringFormat:wh,_stringbool:JB,_success:Ule,_superRefine:GB,_symbol:IB,_templateLiteral:Kle,_toLowerCase:bC,_toUpperCase:xC,_transform:Nle,_trim:yC,_tuple:_le,_uint32:kB,_uint64:_B,_ulid:Q$,_undefined:jB,_union:Cle,_unknown:RB,_uppercase:fC,_url:mb,_uuid:H$,_uuidv4:K$,_uuidv6:V$,_uuidv7:q$,_void:NB,_xid:J$,clone:xo,config:ni,decode:sae,decodeAsync:uae,describe:XB,encode:aae,encodeAsync:lae,flattenError:x$,formatError:w$,globalConfig:kv,globalRegistry:Lo,isValidBase64:R$,isValidBase64URL:f5,isValidJWT:m5,locales:aB,meta:QB,parse:Y1,parseAsync:X1,prettifyError:B4,regexes:j$,registry:F$,safeDecode:dae,safeDecodeAsync:pae,safeEncode:cae,safeEncodeAsync:fae,safeParse:U4,safeParseAsync:F4,toDotPath:L4,toJSONSchema:eU,treeifyError:D4,util:N4,version:H6},Symbol.toStringTag,{value:"Module"})),SC=re("ZodISODateTime",(e,t)=>{r5.init(e,t),hr.init(e,t)});function tU(e){return pB(SC,e)}const kC=re("ZodISODate",(e,t)=>{n5.init(e,t),hr.init(e,t)});function rU(e){return hB(kC,e)}const PC=re("ZodISOTime",(e,t)=>{i5.init(e,t),hr.init(e,t)});function nU(e){return mB(PC,e)}const $C=re("ZodISODuration",(e,t)=>{o5.init(e,t),hr.init(e,t)});function iU(e){return gB($C,e)}const Yle=Object.freeze(Object.defineProperty({__proto__:null,ZodISODate:kC,ZodISODateTime:SC,ZodISODuration:$C,ZodISOTime:PC,date:rU,datetime:tU,duration:iU,time:nU},Symbol.toStringTag,{value:"Module"})),oU=(e,t)=>{b$.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>w$(e,r)},flatten:{value:r=>x$(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Pv,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Pv,2)}},isEmpty:{get(){return e.issues.length===0}}})},Xle=re("ZodError",oU),Ki=re("ZodError",oU,{Parent:Error}),aU=ph(Ki),sU=hh(Ki),lU=mh(Ki),uU=gh(Ki),cU=S$(Ki),dU=k$(Ki),fU=P$(Ki),pU=$$(Ki),hU=C$(Ki),mU=O$(Ki),gU=E$(Ki),vU=_$(Ki),It=re("ZodType",(e,t)=>(wt.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(us(t,{checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]})),e.clone=(r,n)=>xo(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>aU(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>lU(e,r,n),e.parseAsync=async(r,n)=>sU(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>uU(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>cU(e,r,n),e.decode=(r,n)=>dU(e,r,n),e.encodeAsync=async(r,n)=>fU(e,r,n),e.decodeAsync=async(r,n)=>pU(e,r,n),e.safeEncode=(r,n)=>hU(e,r,n),e.safeDecode=(r,n)=>mU(e,r,n),e.safeEncodeAsync=async(r,n)=>gU(e,r,n),e.safeDecodeAsync=async(r,n)=>vU(e,r,n),e.refine=(r,n)=>e.check(nF(r,n)),e.superRefine=r=>e.check(iF(r)),e.overwrite=r=>e.check(xl(r)),e.optional=()=>Iv(e),e.nullable=()=>jv(e),e.nullish=()=>Iv(jv(e)),e.nonoptional=r=>KU(e,r),e.array=()=>kh(e),e.or=r=>Pb([e,r]),e.and=r=>qC(e,r),e.transform=r=>Av(e,YC(r)),e.default=r=>FU(e,r),e.prefault=r=>HU(e,r),e.catch=r=>ZU(e,r),e.pipe=r=>Av(e,r),e.readonly=()=>XU(e),e.describe=r=>{const n=e.clone();return Lo.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){var r;return(r=Lo.get(e))==null?void 0:r.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Lo.get(e);const n=e.clone();return Lo.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),CC=re("_ZodString",(e,t)=>{xh.init(e,t),It.init(e,t);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(cC(...n)),e.includes=(...n)=>e.check(pC(...n)),e.startsWith=(...n)=>e.check(hC(...n)),e.endsWith=(...n)=>e.check(mC(...n)),e.min=(...n)=>e.check(rd(...n)),e.max=(...n)=>e.check(vb(...n)),e.length=(...n)=>e.check(yb(...n)),e.nonempty=(...n)=>e.check(rd(1,...n)),e.lowercase=n=>e.check(dC(n)),e.uppercase=n=>e.check(fC(n)),e.trim=()=>e.check(yC()),e.normalize=(...n)=>e.check(vC(...n)),e.toLowerCase=()=>e.check(bC()),e.toUpperCase=()=>e.check(xC()),e.slugify=()=>e.check(wC())}),bb=re("ZodString",(e,t)=>{xh.init(e,t),CC.init(e,t),e.email=r=>e.check(W$(OC,r)),e.url=r=>e.check(mb(xb,r)),e.jwt=r=>e.check(lC(FC,r)),e.emoji=r=>e.check(Z$(EC,r)),e.guid=r=>e.check(Ov(Ev,r)),e.uuid=r=>e.check(H$(Ha,r)),e.uuidv4=r=>e.check(K$(Ha,r)),e.uuidv6=r=>e.check(V$(Ha,r)),e.uuidv7=r=>e.check(q$(Ha,r)),e.nanoid=r=>e.check(G$(_C,r)),e.guid=r=>e.check(Ov(Ev,r)),e.cuid=r=>e.check(Y$(IC,r)),e.cuid2=r=>e.check(X$(jC,r)),e.ulid=r=>e.check(Q$(AC,r)),e.base64=r=>e.check(oC(LC,r)),e.base64url=r=>e.check(aC(BC,r)),e.xid=r=>e.check(J$(TC,r)),e.ksuid=r=>e.check(eC(RC,r)),e.ipv4=r=>e.check(tC(MC,r)),e.ipv6=r=>e.check(rC(NC,r)),e.cidrv4=r=>e.check(nC(zC,r)),e.cidrv6=r=>e.check(iC(DC,r)),e.e164=r=>e.check(sC(UC,r)),e.datetime=r=>e.check(tU(r)),e.date=r=>e.check(rU(r)),e.time=r=>e.check(nU(r)),e.duration=r=>e.check(iU(r))});function Su(e){return uB(bb,e)}const hr=re("ZodStringFormat",(e,t)=>{cr.init(e,t),CC.init(e,t)}),OC=re("ZodEmail",(e,t)=>{q6.init(e,t),hr.init(e,t)});function Qle(e){return W$(OC,e)}const Ev=re("ZodGUID",(e,t)=>{K6.init(e,t),hr.init(e,t)});function Jle(e){return Ov(Ev,e)}const Ha=re("ZodUUID",(e,t)=>{V6.init(e,t),hr.init(e,t)});function eue(e){return H$(Ha,e)}function tue(e){return K$(Ha,e)}function rue(e){return V$(Ha,e)}function nue(e){return q$(Ha,e)}const xb=re("ZodURL",(e,t)=>{Z6.init(e,t),hr.init(e,t)});function iue(e){return mb(xb,e)}function oue(e){return mb(xb,{protocol:/^https?$/,hostname:s6,...$e(e)})}const EC=re("ZodEmoji",(e,t)=>{G6.init(e,t),hr.init(e,t)});function aue(e){return Z$(EC,e)}const _C=re("ZodNanoID",(e,t)=>{Y6.init(e,t),hr.init(e,t)});function sue(e){return G$(_C,e)}const IC=re("ZodCUID",(e,t)=>{X6.init(e,t),hr.init(e,t)});function lue(e){return Y$(IC,e)}const jC=re("ZodCUID2",(e,t)=>{Q6.init(e,t),hr.init(e,t)});function uue(e){return X$(jC,e)}const AC=re("ZodULID",(e,t)=>{J6.init(e,t),hr.init(e,t)});function cue(e){return Q$(AC,e)}const TC=re("ZodXID",(e,t)=>{e5.init(e,t),hr.init(e,t)});function due(e){return J$(TC,e)}const RC=re("ZodKSUID",(e,t)=>{t5.init(e,t),hr.init(e,t)});function fue(e){return eC(RC,e)}const MC=re("ZodIPv4",(e,t)=>{a5.init(e,t),hr.init(e,t)});function pue(e){return tC(MC,e)}const yU=re("ZodMAC",(e,t)=>{l5.init(e,t),hr.init(e,t)});function hue(e){return dB(yU,e)}const NC=re("ZodIPv6",(e,t)=>{s5.init(e,t),hr.init(e,t)});function mue(e){return rC(NC,e)}const zC=re("ZodCIDRv4",(e,t)=>{u5.init(e,t),hr.init(e,t)});function gue(e){return nC(zC,e)}const DC=re("ZodCIDRv6",(e,t)=>{c5.init(e,t),hr.init(e,t)});function vue(e){return iC(DC,e)}const LC=re("ZodBase64",(e,t)=>{d5.init(e,t),hr.init(e,t)});function yue(e){return oC(LC,e)}const BC=re("ZodBase64URL",(e,t)=>{p5.init(e,t),hr.init(e,t)});function bue(e){return aC(BC,e)}const UC=re("ZodE164",(e,t)=>{h5.init(e,t),hr.init(e,t)});function xue(e){return sC(UC,e)}const FC=re("ZodJWT",(e,t)=>{g5.init(e,t),hr.init(e,t)});function wue(e){return lC(FC,e)}const Sh=re("ZodCustomStringFormat",(e,t)=>{v5.init(e,t),hr.init(e,t)});function Sue(e,t,r={}){return wh(Sh,e,t,r)}function kue(e){return wh(Sh,"hostname",a6,e)}function Pue(e){return wh(Sh,"hex",k6,e)}function $ue(e,t){const r=(t==null?void 0:t.enc)??"hex",n=`${e}_${r}`,i=j$[n];if(!i)throw new Error(`Unrecognized hash format: ${n}`);return wh(Sh,n,i,t)}const wb=re("ZodNumber",(e,t)=>{M$.init(e,t),It.init(e,t),e.gt=(n,i)=>e.check(wu(n,i)),e.gte=(n,i)=>e.check(Mi(n,i)),e.min=(n,i)=>e.check(Mi(n,i)),e.lt=(n,i)=>e.check(xu(n,i)),e.lte=(n,i)=>e.check(Fo(n,i)),e.max=(n,i)=>e.check(Fo(n,i)),e.int=n=>e.check(ek(n)),e.safe=n=>e.check(ek(n)),e.positive=n=>e.check(wu(0,n)),e.nonnegative=n=>e.check(Mi(0,n)),e.negative=n=>e.check(xu(0,n)),e.nonpositive=n=>e.check(Fo(0,n)),e.multipleOf=(n,i)=>e.check(yp(n,i)),e.step=(n,i)=>e.check(yp(n,i)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function bU(e){return vB(wb,e)}const $d=re("ZodNumberFormat",(e,t)=>{y5.init(e,t),wb.init(e,t)});function ek(e){return bB($d,e)}function Cue(e){return xB($d,e)}function Oue(e){return wB($d,e)}function Eue(e){return SB($d,e)}function _ue(e){return kB($d,e)}const Sb=re("ZodBoolean",(e,t)=>{N$.init(e,t),It.init(e,t)});function xU(e){return PB(Sb,e)}const kb=re("ZodBigInt",(e,t)=>{z$.init(e,t),It.init(e,t),e.gte=(n,i)=>e.check(Mi(n,i)),e.min=(n,i)=>e.check(Mi(n,i)),e.gt=(n,i)=>e.check(wu(n,i)),e.gte=(n,i)=>e.check(Mi(n,i)),e.min=(n,i)=>e.check(Mi(n,i)),e.lt=(n,i)=>e.check(xu(n,i)),e.lte=(n,i)=>e.check(Fo(n,i)),e.max=(n,i)=>e.check(Fo(n,i)),e.positive=n=>e.check(wu(BigInt(0),n)),e.negative=n=>e.check(xu(BigInt(0),n)),e.nonpositive=n=>e.check(Fo(BigInt(0),n)),e.nonnegative=n=>e.check(Mi(BigInt(0),n)),e.multipleOf=(n,i)=>e.check(yp(n,i));const r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function Iue(e){return CB(kb,e)}const WC=re("ZodBigIntFormat",(e,t)=>{b5.init(e,t),kb.init(e,t)});function jue(e){return EB(WC,e)}function Aue(e){return _B(WC,e)}const wU=re("ZodSymbol",(e,t)=>{x5.init(e,t),It.init(e,t)});function Tue(e){return IB(wU,e)}const SU=re("ZodUndefined",(e,t)=>{w5.init(e,t),It.init(e,t)});function Rue(e){return jB(SU,e)}const kU=re("ZodNull",(e,t)=>{S5.init(e,t),It.init(e,t)});function PU(e){return AB(kU,e)}const $U=re("ZodAny",(e,t)=>{k5.init(e,t),It.init(e,t)});function Mue(){return TB($U)}const CU=re("ZodUnknown",(e,t)=>{P5.init(e,t),It.init(e,t)});function nd(){return RB(CU)}const OU=re("ZodNever",(e,t)=>{$5.init(e,t),It.init(e,t)});function HC(e){return MB(OU,e)}const EU=re("ZodVoid",(e,t)=>{C5.init(e,t),It.init(e,t)});function Nue(e){return NB(EU,e)}const KC=re("ZodDate",(e,t)=>{O5.init(e,t),It.init(e,t),e.min=(n,i)=>e.check(Mi(n,i)),e.max=(n,i)=>e.check(Fo(n,i));const r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function zue(e){return zB(KC,e)}const _U=re("ZodArray",(e,t)=>{E5.init(e,t),It.init(e,t),e.element=t.element,e.min=(r,n)=>e.check(rd(r,n)),e.nonempty=r=>e.check(rd(1,r)),e.max=(r,n)=>e.check(vb(r,n)),e.length=(r,n)=>e.check(yb(r,n)),e.unwrap=()=>e.element});function kh(e,t){return KB(_U,e,t)}function Due(e){const t=e._zod.def.shape;return GC(Object.keys(t))}const Cd=re("ZodObject",(e,t)=>{A5.init(e,t),It.init(e,t),Rt(e,"shape",()=>t.shape),e.keyof=()=>GC(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:nd()}),e.loose=()=>e.clone({...e._zod.def,catchall:nd()}),e.strict=()=>e.clone({...e._zod.def,catchall:HC()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>_4(e,r),e.safeExtend=r=>I4(e,r),e.merge=r=>j4(e,r),e.pick=r=>O4(e,r),e.omit=r=>E4(e,r),e.partial=(...r)=>A4(XC,e,r[0]),e.required=(...r)=>T4(QC,e,r[0])});function _v(e,t){const r={type:"object",shape:e??{},...$e(t)};return new Cd(r)}function Lue(e,t){return new Cd({type:"object",shape:e,catchall:HC(),...$e(t)})}function Bue(e,t){return new Cd({type:"object",shape:e,catchall:nd(),...$e(t)})}const VC=re("ZodUnion",(e,t)=>{D$.init(e,t),It.init(e,t),e.options=t.options});function Pb(e,t){return new VC({type:"union",options:e,...$e(t)})}const IU=re("ZodDiscriminatedUnion",(e,t)=>{VC.init(e,t),T5.init(e,t)});function Uue(e,t,r){return new IU({type:"union",options:t,discriminator:e,...$e(r)})}const jU=re("ZodIntersection",(e,t)=>{R5.init(e,t),It.init(e,t)});function qC(e,t){return new jU({type:"intersection",left:e,right:t})}const AU=re("ZodTuple",(e,t)=>{L$.init(e,t),It.init(e,t),e.rest=r=>e.clone({...e._zod.def,rest:r})});function TU(e,t,r){const n=t instanceof wt,i=n?r:t,o=n?t:null;return new AU({type:"tuple",items:e,rest:o,...$e(i)})}const ZC=re("ZodRecord",(e,t)=>{M5.init(e,t),It.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function RU(e,t,r){return new ZC({type:"record",keyType:e,valueType:t,...$e(r)})}function Fue(e,t,r){const n=xo(e);return n._zod.values=void 0,new ZC({type:"record",keyType:n,valueType:t,...$e(r)})}const MU=re("ZodMap",(e,t)=>{N5.init(e,t),It.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function Wue(e,t,r){return new MU({type:"map",keyType:e,valueType:t,...$e(r)})}const NU=re("ZodSet",(e,t)=>{z5.init(e,t),It.init(e,t),e.min=(...r)=>e.check(bp(...r)),e.nonempty=r=>e.check(bp(1,r)),e.max=(...r)=>e.check(gb(...r)),e.size=(...r)=>e.check(uC(...r))});function Hue(e,t){return new NU({type:"set",valueType:e,...$e(t)})}const xp=re("ZodEnum",(e,t)=>{D5.init(e,t),It.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,i)=>{const o={};for(const a of n)if(r.has(a))o[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new xp({...t,checks:[],...$e(i),entries:o})},e.exclude=(n,i)=>{const o={...t.entries};for(const a of n)if(r.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new xp({...t,checks:[],...$e(i),entries:o})}});function GC(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new xp({type:"enum",entries:r,...$e(t)})}function Kue(e,t){return new xp({type:"enum",entries:e,...$e(t)})}const zU=re("ZodLiteral",(e,t)=>{L5.init(e,t),It.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Vue(e,t){return new zU({type:"literal",values:Array.isArray(e)?e:[e],...$e(t)})}const DU=re("ZodFile",(e,t)=>{B5.init(e,t),It.init(e,t),e.min=(r,n)=>e.check(bp(r,n)),e.max=(r,n)=>e.check(gb(r,n)),e.mime=(r,n)=>e.check(gC(Array.isArray(r)?r:[r],n))});function que(e){return VB(DU,e)}const LU=re("ZodTransform",(e,t)=>{U5.init(e,t),It.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new cb(e.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(ed(o,r.value,t));else{const a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(ed(a))}};const i=t.transform(r.value,r);return i instanceof Promise?i.then(o=>(r.value=o,r)):(r.value=i,r)}});function YC(e){return new LU({type:"transform",transform:e})}const XC=re("ZodOptional",(e,t)=>{F5.init(e,t),It.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Iv(e){return new XC({type:"optional",innerType:e})}const BU=re("ZodNullable",(e,t)=>{W5.init(e,t),It.init(e,t),e.unwrap=()=>e._zod.def.innerType});function jv(e){return new BU({type:"nullable",innerType:e})}function Zue(e){return Iv(jv(e))}const UU=re("ZodDefault",(e,t)=>{H5.init(e,t),It.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function FU(e,t){return new UU({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():fb(t)}})}const WU=re("ZodPrefault",(e,t)=>{K5.init(e,t),It.init(e,t),e.unwrap=()=>e._zod.def.innerType});function HU(e,t){return new WU({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():fb(t)}})}const QC=re("ZodNonOptional",(e,t)=>{V5.init(e,t),It.init(e,t),e.unwrap=()=>e._zod.def.innerType});function KU(e,t){return new QC({type:"nonoptional",innerType:e,...$e(t)})}const VU=re("ZodSuccess",(e,t)=>{q5.init(e,t),It.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Gue(e){return new VU({type:"success",innerType:e})}const qU=re("ZodCatch",(e,t)=>{Z5.init(e,t),It.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ZU(e,t){return new qU({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const GU=re("ZodNaN",(e,t)=>{G5.init(e,t),It.init(e,t)});function Yue(e){return LB(GU,e)}const JC=re("ZodPipe",(e,t)=>{Y5.init(e,t),It.init(e,t),e.in=t.in,e.out=t.out});function Av(e,t){return new JC({type:"pipe",in:e,out:t})}const eO=re("ZodCodec",(e,t)=>{JC.init(e,t),B$.init(e,t)});function Xue(e,t,r){return new eO({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}const YU=re("ZodReadonly",(e,t)=>{X5.init(e,t),It.init(e,t),e.unwrap=()=>e._zod.def.innerType});function XU(e){return new YU({type:"readonly",innerType:e})}const QU=re("ZodTemplateLiteral",(e,t)=>{Q5.init(e,t),It.init(e,t)});function Que(e,t){return new QU({type:"template_literal",parts:e,...$e(t)})}const JU=re("ZodLazy",(e,t)=>{tB.init(e,t),It.init(e,t),e.unwrap=()=>e._zod.def.getter()});function eF(e){return new JU({type:"lazy",getter:e})}const tF=re("ZodPromise",(e,t)=>{eB.init(e,t),It.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Jue(e){return new tF({type:"promise",innerType:e})}const rF=re("ZodFunction",(e,t)=>{J5.init(e,t),It.init(e,t)});function t2(e){return new rF({type:"function",input:Array.isArray(e==null?void 0:e.input)?TU(e==null?void 0:e.input):(e==null?void 0:e.input)??kh(nd()),output:(e==null?void 0:e.output)??nd()})}const $b=re("ZodCustom",(e,t)=>{rB.init(e,t),It.init(e,t)});function ece(e){const t=new Er({check:"custom"});return t._zod.check=e,t}function tce(e,t){return qB($b,e??(()=>!0),t)}function nF(e,t={}){return ZB($b,e,t)}function iF(e){return GB(e)}const rce=XB,nce=QB;function ice(e,t={error:`Input not instance of ${e.name}`}){const r=new $b({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...$e(t)});return r._zod.bag.Class=e,r}const oce=(...e)=>JB({Codec:eO,Boolean:Sb,String:bb},...e);function ace(e){const t=eF(()=>Pb([Su(e),bU(),xU(),PU(),kh(t),RU(Su(),t)]));return t}function sce(e,t){return Av(YC(e),t)}const lce={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function uce(e){ni({customError:e})}function cce(){return ni().customError}var tk;tk||(tk={});function dce(e){return cB(bb,e)}function fce(e){return yB(wb,e)}function pce(e){return $B(Sb,e)}function hce(e){return OB(kb,e)}function mce(e){return DB(KC,e)}const gce=Object.freeze(Object.defineProperty({__proto__:null,bigint:hce,boolean:pce,date:mce,number:fce,string:dce},Symbol.toStringTag,{value:"Module"}));ni(nB());const we=Object.freeze(Object.defineProperty({__proto__:null,$brand:b4,$input:lB,$output:sB,NEVER:y4,TimePrecision:fB,ZodAny:$U,ZodArray:_U,ZodBase64:LC,ZodBase64URL:BC,ZodBigInt:kb,ZodBigIntFormat:WC,ZodBoolean:Sb,ZodCIDRv4:zC,ZodCIDRv6:DC,ZodCUID:IC,ZodCUID2:jC,ZodCatch:qU,ZodCodec:eO,ZodCustom:$b,ZodCustomStringFormat:Sh,ZodDate:KC,ZodDefault:UU,ZodDiscriminatedUnion:IU,ZodE164:UC,ZodEmail:OC,ZodEmoji:EC,ZodEnum:xp,ZodError:Xle,ZodFile:DU,get ZodFirstPartyTypeKind(){return tk},ZodFunction:rF,ZodGUID:Ev,ZodIPv4:MC,ZodIPv6:NC,ZodISODate:kC,ZodISODateTime:SC,ZodISODuration:$C,ZodISOTime:PC,ZodIntersection:jU,ZodIssueCode:lce,ZodJWT:FC,ZodKSUID:RC,ZodLazy:JU,ZodLiteral:zU,ZodMAC:yU,ZodMap:MU,ZodNaN:GU,ZodNanoID:_C,ZodNever:OU,ZodNonOptional:QC,ZodNull:kU,ZodNullable:BU,ZodNumber:wb,ZodNumberFormat:$d,ZodObject:Cd,ZodOptional:XC,ZodPipe:JC,ZodPrefault:WU,ZodPromise:tF,ZodReadonly:YU,ZodRealError:Ki,ZodRecord:ZC,ZodSet:NU,ZodString:bb,ZodStringFormat:hr,ZodSuccess:VU,ZodSymbol:wU,ZodTemplateLiteral:QU,ZodTransform:LU,ZodTuple:AU,ZodType:It,ZodULID:AC,ZodURL:xb,ZodUUID:Ha,ZodUndefined:SU,ZodUnion:VC,ZodUnknown:CU,ZodVoid:EU,ZodXID:TC,_ZodString:CC,_default:FU,_function:t2,any:Mue,array:kh,base64:yue,base64url:bue,bigint:Iue,boolean:xU,catch:ZU,check:ece,cidrv4:gue,cidrv6:vue,clone:xo,codec:Xue,coerce:gce,config:ni,core:Gle,cuid:lue,cuid2:uue,custom:tce,date:zue,decode:dU,decodeAsync:pU,describe:rce,discriminatedUnion:Uue,e164:xue,email:Qle,emoji:aue,encode:cU,encodeAsync:fU,endsWith:mC,enum:GC,file:que,flattenError:x$,float32:Cue,float64:Oue,formatError:w$,function:t2,getErrorMap:cce,globalRegistry:Lo,gt:wu,gte:Mi,guid:Jle,hash:$ue,hex:Pue,hostname:kue,httpUrl:oue,includes:pC,instanceof:ice,int:ek,int32:Eue,int64:jue,intersection:qC,ipv4:pue,ipv6:mue,iso:Yle,json:ace,jwt:wue,keyof:Due,ksuid:fue,lazy:eF,length:yb,literal:Vue,locales:aB,looseObject:Bue,lowercase:dC,lt:xu,lte:Fo,mac:hue,map:Wue,maxLength:vb,maxSize:gb,meta:nce,mime:gC,minLength:rd,minSize:bp,multipleOf:yp,nan:Yue,nanoid:sue,nativeEnum:Kue,negative:UB,never:HC,nonnegative:WB,nonoptional:KU,nonpositive:FB,normalize:vC,null:PU,nullable:jv,nullish:Zue,number:bU,object:_v,optional:Iv,overwrite:xl,parse:aU,parseAsync:sU,partialRecord:Fue,pipe:Av,positive:BB,prefault:HU,preprocess:sce,prettifyError:B4,promise:Jue,property:HB,readonly:XU,record:RU,refine:nF,regex:cC,regexes:j$,registry:F$,safeDecode:mU,safeDecodeAsync:vU,safeEncode:hU,safeEncodeAsync:gU,safeParse:lU,safeParseAsync:uU,set:Hue,setErrorMap:uce,size:uC,slugify:wC,startsWith:hC,strictObject:Lue,string:Su,stringFormat:Sue,stringbool:oce,success:Gue,superRefine:iF,symbol:Tue,templateLiteral:Que,toJSONSchema:eU,toLowerCase:bC,toUpperCase:xC,transform:YC,treeifyError:D4,trim:yC,tuple:TU,uint32:_ue,uint64:Aue,ulid:cue,undefined:Rue,union:Pb,unknown:nd,uppercase:fC,url:iue,util:N4,uuid:eue,uuidv4:tue,uuidv6:rue,uuidv7:nue,void:Nue,xid:due},Symbol.toStringTag,{value:"Module"}));var Tv=(e,t)=>e.parse(t);function oF(e,t){return e&&t?qC(e,t):e??t}function aF(e){var r,n;const t=e.shape?e.shape:(n=(r=e._def)==null?void 0:r.shape)==null?void 0:n.call(r);return t?typeof t=="function"?t.call(e):t:{}}function sF(e,t=[]){if(!e)return[];const r=[];for(const[n,i]of Object.entries(e))if(i instanceof Cd){const o=aF(i),a=sF(o,[...t,n]);r.push(...a.length?a:[[...t,n].join("_")])}else t.length>0&&r.push([...t,n].join("_"));return r}function lF(e,t){return t?e.replace(/:([A-Za-z0-9_]+)/g,(r,n)=>{const i=t[n];if(i==null)throw new Error(`Missing param :${n}`);return String(i)}):e}function vce(e){const t=e.leaf.path.split("/").filter(Boolean),r=[e.leaf.method];for(const n of t){if(n.startsWith(":")){const i=n.slice(1),o=e.params&&i in e.params?e.params[i]:void 0;r.push([o]);continue}r.push(n)}return r.push(e.query??{}),r}function yce(e){const r={...e.node??{},...e.cfg},n=r.feed===!0?oF(r.querySchema,r.queryExtensionSchema):r.querySchema,i=r.outputSchema?_v({out:r.outputSchema,meta:r.outputMetaSchema??Su().optional()}):_v({meta:r.outputMetaSchema??Su().optional()});if(r.feed===!0&&n instanceof Cd){const o=aF(n),a=sF(o);a.length>0&&console.warn(`[routesV3.builder] Warning: feed query schema for ${e.method.toUpperCase()} ${e.path} contains nested objects. Consider using flat keys instead: ${a.join(", ")}`)}return{method:e.method,path:e.path,cfg:{...r,bodySchema:r.bodySchema,querySchema:n,paramsSchema:r.paramsSchema,outputSchema:i,outputMetaSchema:r.outputMetaSchema,queryExtensionSchema:r.queryExtensionSchema}}}var id=(e,t,r)=>{const n=`${e.toUpperCase()} ${t}`;return r?encodeURIComponent(n):n};function va(e,t,r){const n=e??"",i=bce(n,!!r),o={},a=xce(n,r);function l(c,d,f){const p=[],g=c,v=d;let b=f;function S(k,C){const P=C.paramsSchema??b,O=P?{...C,paramsSchema:P}:{...C},E=yce({method:k,path:g,node:v,cfg:O});return p.push(E),w}const w={sub(...k){if(k.length===0)throw new Error("sub() expects at least one resource");for(const C of k)for(const P of C){const O=P,E=O.cfg,_=E.paramsSchema,A=oF(b,_),T={...v,...E};A?T.paramsSchema=A:"paramsSchema"in T&&delete T.paramsSchema;const R={method:O.method,path:wce(g,O.path),cfg:T};p.push(R)}return w},get(k){return S("get",k)},post(k){return S("post",{...k,feed:!1})},put(k){return S("put",{...k,feed:!1})},patch(k){return S("patch",{...k,feed:!1})},delete(k){return S("delete",{...k,feed:!1})},done(){return p}};return w}return l(i,o,a)}function bce(e,t){const r=e??"";if(!t)return r;if(!r)throw new Error("resource() requires a segment name when defining an id schema");if(r.includes("/")){const n=r.split("/").filter(Boolean);if(n.length===0)throw new Error("resource() received an invalid segment for param injection");const i=n.length-1,o=n[i];return n[i]=o.startsWith(":")?o:`:${o}`,`${r.startsWith("/")?"/":""}${n.join("/")}`}return r.startsWith(":")?r:`:${r}`}function xce(e,t){if(!t)return;const r=e.split("/").filter(Boolean),n=r.length>0?r[r.length-1]:e,i=n.startsWith(":")?n.slice(1):n;if(!i)throw new Error("resource() requires a non-empty name for id schema");return _v({[i]:t})}function wce(e,t){if(!e)return t;if(!t)return e;const r=e.endsWith("/")?e.replace(/\/+$/,""):e,n=t.startsWith("/")?t.replace(/^\/+/,""):t;return n?`${r}/${n}`:r}function Sce(e){const t=Object.fromEntries(e.map(n=>[`${n.method.toUpperCase()} ${n.path}`,n]));return{all:e,byKey:t,log:n=>{n.system("Finalized routes:"),Object.keys(t).forEach(i=>{t[i],n.system(`- ${i}`)})}}}var Od=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},kce={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Ws,PP,hD,Pce=(hD=class{constructor(){at(this,Ws,kce);at(this,PP,!1)}setTimeoutProvider(e){De(this,Ws,e)}setTimeout(e,t){return X(this,Ws).setTimeout(e,t)}clearTimeout(e){X(this,Ws).clearTimeout(e)}setInterval(e,t){return X(this,Ws).setInterval(e,t)}clearInterval(e){X(this,Ws).clearInterval(e)}},Ws=new WeakMap,PP=new WeakMap,hD),Gl=new Pce;function $ce(e){setTimeout(e,0)}var ku=typeof window>"u"||"Deno"in globalThis;function Xn(){}function Cce(e,t){return typeof e=="function"?e(t):e}function rk(e){return typeof e=="number"&&e>=0&&e!==1/0}function uF(e,t){return Math.max(e+(t||0)-Date.now(),0)}function tl(e,t){return typeof e=="function"?e(t):e}function ao(e,t){return typeof e=="function"?e(t):e}function r2(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:o,queryKey:a,stale:l}=e;if(a){if(n){if(t.queryHash!==tO(a,t.options))return!1}else if(!wp(t.queryKey,a))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||i&&i!==t.state.fetchStatus||o&&!o(t))}function n2(e,t){const{exact:r,status:n,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(Pu(t.options.mutationKey)!==Pu(o))return!1}else if(!wp(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function tO(e,t){return((t==null?void 0:t.queryKeyHashFn)||Pu)(e)}function Pu(e){return JSON.stringify(e,(t,r)=>nk(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function wp(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>wp(e[r],t[r])):!1}var Oce=Object.prototype.hasOwnProperty;function cF(e,t){if(e===t)return e;const r=i2(e)&&i2(t);if(!r&&!(nk(e)&&nk(t)))return t;const i=(r?e:Object.keys(e)).length,o=r?t:Object.keys(t),a=o.length,l=r?new Array(a):{};let c=0;for(let d=0;d<a;d++){const f=r?d:o[d],p=e[f],g=t[f];if(p===g){l[f]=p,(r?d<i:Oce.call(e,f))&&c++;continue}if(p===null||g===null||typeof p!="object"||typeof g!="object"){l[f]=g;continue}const v=cF(p,g);l[f]=v,v===p&&c++}return i===a&&c===i?e:l}function Rv(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function i2(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function nk(e){if(!o2(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!o2(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function o2(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ece(e){return new Promise(t=>{Gl.setTimeout(t,e)})}function ik(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?cF(e,t):t}function a2(e){return e}function _ce(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function Ice(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var rO=Symbol();function dF(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===rO?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function fF(e,t){return typeof e=="function"?e(...t):!!e}var eu,Hs,Mc,mD,jce=(mD=class extends Od{constructor(){super();at(this,eu);at(this,Hs);at(this,Mc);De(this,Mc,t=>{if(!ku&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){X(this,Hs)||this.setEventListener(X(this,Mc))}onUnsubscribe(){var t;this.hasListeners()||((t=X(this,Hs))==null||t.call(this),De(this,Hs,void 0))}setEventListener(t){var r;De(this,Mc,t),(r=X(this,Hs))==null||r.call(this),De(this,Hs,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){X(this,eu)!==t&&(De(this,eu,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof X(this,eu)=="boolean"?X(this,eu):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},eu=new WeakMap,Hs=new WeakMap,Mc=new WeakMap,mD),nO=new jce;function ok(){let e,t;const r=new Promise((i,o)=>{e=i,t=o});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}var Ace=$ce;function Tce(){let e=[],t=0,r=l=>{l()},n=l=>{l()},i=Ace;const o=l=>{t?e.push(l):i(()=>{r(l)})},a=()=>{const l=e;e=[],l.length&&i(()=>{n(()=>{l.forEach(c=>{r(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||a()}return c},batchCalls:l=>(...c)=>{o(()=>{l(...c)})},schedule:o,setNotifyFunction:l=>{r=l},setBatchNotifyFunction:l=>{n=l},setScheduler:l=>{i=l}}}var cn=Tce(),Nc,Ks,zc,gD,Rce=(gD=class extends Od{constructor(){super();at(this,Nc,!0);at(this,Ks);at(this,zc);De(this,zc,t=>{if(!ku&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){X(this,Ks)||this.setEventListener(X(this,zc))}onUnsubscribe(){var t;this.hasListeners()||((t=X(this,Ks))==null||t.call(this),De(this,Ks,void 0))}setEventListener(t){var r;De(this,zc,t),(r=X(this,Ks))==null||r.call(this),De(this,Ks,t(this.setOnline.bind(this)))}setOnline(t){X(this,Nc)!==t&&(De(this,Nc,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return X(this,Nc)}},Nc=new WeakMap,Ks=new WeakMap,zc=new WeakMap,gD),Mv=new Rce;function Mce(e){return Math.min(1e3*2**e,3e4)}function pF(e){return(e??"online")==="online"?Mv.isOnline():!0}var ak=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function hF(e){let t=!1,r=0,n;const i=ok(),o=()=>i.status!=="pending",a=S=>{var w;if(!o()){const k=new ak(S);g(k),(w=e.onCancel)==null||w.call(e,k)}},l=()=>{t=!0},c=()=>{t=!1},d=()=>nO.isFocused()&&(e.networkMode==="always"||Mv.isOnline())&&e.canRun(),f=()=>pF(e.networkMode)&&e.canRun(),p=S=>{o()||(n==null||n(),i.resolve(S))},g=S=>{o()||(n==null||n(),i.reject(S))},v=()=>new Promise(S=>{var w;n=k=>{(o()||d())&&S(k)},(w=e.onPause)==null||w.call(e)}).then(()=>{var S;n=void 0,o()||(S=e.onContinue)==null||S.call(e)}),b=()=>{if(o())return;let S;const w=r===0?e.initialPromise:void 0;try{S=w??e.fn()}catch(k){S=Promise.reject(k)}Promise.resolve(S).then(p).catch(k=>{var _;if(o())return;const C=e.retry??(ku?0:3),P=e.retryDelay??Mce,O=typeof P=="function"?P(r,k):P,E=C===!0||typeof C=="number"&&r<C||typeof C=="function"&&C(r,k);if(t||!E){g(k);return}r++,(_=e.onFail)==null||_.call(e,r,k),Ece(O).then(()=>d()?void 0:v()).then(()=>{t?g(k):b()})})};return{promise:i,status:()=>i.status,cancel:a,continue:()=>(n==null||n(),i),cancelRetry:l,continueRetry:c,canStart:f,start:()=>(f()?b():v().then(b),i)}}var tu,vD,mF=(vD=class{constructor(){at(this,tu)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),rk(this.gcTime)&&De(this,tu,Gl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ku?1/0:300*1e3))}clearGcTimeout(){X(this,tu)&&(Gl.clearTimeout(X(this,tu)),De(this,tu,void 0))}},tu=new WeakMap,vD),ru,Dc,io,nu,Sn,Hp,iu,To,Ma,yD,Nce=(yD=class extends mF{constructor(t){super();at(this,To);at(this,ru);at(this,Dc);at(this,io);at(this,nu);at(this,Sn);at(this,Hp);at(this,iu);De(this,iu,!1),De(this,Hp,t.defaultOptions),this.setOptions(t.options),this.observers=[],De(this,nu,t.client),De(this,io,X(this,nu).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,De(this,ru,l2(this.options)),this.state=t.state??X(this,ru),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=X(this,Sn))==null?void 0:t.promise}setOptions(t){if(this.options={...X(this,Hp),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=l2(this.options);r.data!==void 0&&(this.setState(s2(r.data,r.dataUpdatedAt)),De(this,ru,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&X(this,io).remove(this)}setData(t,r){const n=ik(this.state.data,t,this.options);return Et(this,To,Ma).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Et(this,To,Ma).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=X(this,Sn))==null?void 0:n.promise;return(i=X(this,Sn))==null||i.cancel(t),r?r.then(Xn).catch(Xn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(X(this,ru))}isActive(){return this.observers.some(t=>ao(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===rO||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>tl(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!uF(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=X(this,Sn))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=X(this,Sn))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),X(this,io).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(X(this,Sn)&&(X(this,iu)?X(this,Sn).cancel({revert:!0}):X(this,Sn).cancelRetry()),this.scheduleGc()),X(this,io).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Et(this,To,Ma).call(this,{type:"invalidate"})}async fetch(t,r){var c,d,f,p,g,v,b,S,w,k,C,P;if(this.state.fetchStatus!=="idle"&&((c=X(this,Sn))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(X(this,Sn))return X(this,Sn).continueRetry(),X(this,Sn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const O=this.observers.find(E=>E.options.queryFn);O&&this.setOptions(O.options)}const n=new AbortController,i=O=>{Object.defineProperty(O,"signal",{enumerable:!0,get:()=>(De(this,iu,!0),n.signal)})},o=()=>{const O=dF(this.options,r),_=(()=>{const A={client:X(this,nu),queryKey:this.queryKey,meta:this.meta};return i(A),A})();return De(this,iu,!1),this.options.persister?this.options.persister(O,_,this):O(_)},l=(()=>{const O={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:X(this,nu),state:this.state,fetchFn:o};return i(O),O})();(d=this.options.behavior)==null||d.onFetch(l,this),De(this,Dc,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=l.fetchOptions)==null?void 0:f.meta))&&Et(this,To,Ma).call(this,{type:"fetch",meta:(p=l.fetchOptions)==null?void 0:p.meta}),De(this,Sn,hF({initialPromise:r==null?void 0:r.initialPromise,fn:l.fetchFn,onCancel:O=>{O instanceof ak&&O.revert&&this.setState({...X(this,Dc),fetchStatus:"idle"}),n.abort()},onFail:(O,E)=>{Et(this,To,Ma).call(this,{type:"failed",failureCount:O,error:E})},onPause:()=>{Et(this,To,Ma).call(this,{type:"pause"})},onContinue:()=>{Et(this,To,Ma).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const O=await X(this,Sn).start();if(O===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(O),(v=(g=X(this,io).config).onSuccess)==null||v.call(g,O,this),(S=(b=X(this,io).config).onSettled)==null||S.call(b,O,this.state.error,this),O}catch(O){if(O instanceof ak){if(O.silent)return X(this,Sn).promise;if(O.revert){if(this.state.data===void 0)throw O;return this.state.data}}throw Et(this,To,Ma).call(this,{type:"error",error:O}),(k=(w=X(this,io).config).onError)==null||k.call(w,O,this),(P=(C=X(this,io).config).onSettled)==null||P.call(C,this.state.data,O,this),O}finally{this.scheduleGc()}}},ru=new WeakMap,Dc=new WeakMap,io=new WeakMap,nu=new WeakMap,Sn=new WeakMap,Hp=new WeakMap,iu=new WeakMap,To=new WeakSet,Ma=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...gF(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...s2(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return De(this,Dc,t.manual?i:void 0),i;case"error":const o=t.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),cn.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),X(this,io).notify({query:this,type:"updated",action:t})})},yD);function gF(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:pF(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function s2(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function l2(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var hi,zt,Kp,Gn,ou,Lc,za,Vs,Vp,Bc,Uc,au,su,qs,Fc,Qt,Yf,sk,lk,uk,ck,dk,fk,pk,yF,bD,vF=(bD=class extends Od{constructor(t,r){super();at(this,Qt);at(this,hi);at(this,zt);at(this,Kp);at(this,Gn);at(this,ou);at(this,Lc);at(this,za);at(this,Vs);at(this,Vp);at(this,Bc);at(this,Uc);at(this,au);at(this,su);at(this,qs);at(this,Fc,new Set);this.options=r,De(this,hi,t),De(this,Vs,null),De(this,za,ok()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(X(this,zt).addObserver(this),u2(X(this,zt),this.options)?Et(this,Qt,Yf).call(this):this.updateResult(),Et(this,Qt,ck).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return hk(X(this,zt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return hk(X(this,zt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Et(this,Qt,dk).call(this),Et(this,Qt,fk).call(this),X(this,zt).removeObserver(this)}setOptions(t){const r=this.options,n=X(this,zt);if(this.options=X(this,hi).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ao(this.options.enabled,X(this,zt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Et(this,Qt,pk).call(this),X(this,zt).setOptions(this.options),r._defaulted&&!Rv(this.options,r)&&X(this,hi).getQueryCache().notify({type:"observerOptionsUpdated",query:X(this,zt),observer:this});const i=this.hasListeners();i&&c2(X(this,zt),n,this.options,r)&&Et(this,Qt,Yf).call(this),this.updateResult(),i&&(X(this,zt)!==n||ao(this.options.enabled,X(this,zt))!==ao(r.enabled,X(this,zt))||tl(this.options.staleTime,X(this,zt))!==tl(r.staleTime,X(this,zt)))&&Et(this,Qt,sk).call(this);const o=Et(this,Qt,lk).call(this);i&&(X(this,zt)!==n||ao(this.options.enabled,X(this,zt))!==ao(r.enabled,X(this,zt))||o!==X(this,qs))&&Et(this,Qt,uk).call(this,o)}getOptimisticResult(t){const r=X(this,hi).getQueryCache().build(X(this,hi),t),n=this.createResult(r,t);return Dce(this,n)&&(De(this,Gn,n),De(this,Lc,this.options),De(this,ou,X(this,zt).state)),n}getCurrentResult(){return X(this,Gn)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&X(this,za).status==="pending"&&X(this,za).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){X(this,Fc).add(t)}getCurrentQuery(){return X(this,zt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=X(this,hi).defaultQueryOptions(t),n=X(this,hi).getQueryCache().build(X(this,hi),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Et(this,Qt,Yf).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),X(this,Gn)))}createResult(t,r){var R;const n=X(this,zt),i=this.options,o=X(this,Gn),a=X(this,ou),l=X(this,Lc),d=t!==n?t.state:X(this,Kp),{state:f}=t;let p={...f},g=!1,v;if(r._optimisticResults){const N=this.hasListeners(),z=!N&&u2(t,r),j=N&&c2(t,n,r,i);(z||j)&&(p={...p,...gF(f.data,t.options)}),r._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:b,errorUpdatedAt:S,status:w}=p;v=p.data;let k=!1;if(r.placeholderData!==void 0&&v===void 0&&w==="pending"){let N;o!=null&&o.isPlaceholderData&&r.placeholderData===(l==null?void 0:l.placeholderData)?(N=o.data,k=!0):N=typeof r.placeholderData=="function"?r.placeholderData((R=X(this,Uc))==null?void 0:R.state.data,X(this,Uc)):r.placeholderData,N!==void 0&&(w="success",v=ik(o==null?void 0:o.data,N,r),g=!0)}if(r.select&&v!==void 0&&!k)if(o&&v===(a==null?void 0:a.data)&&r.select===X(this,Vp))v=X(this,Bc);else try{De(this,Vp,r.select),v=r.select(v),v=ik(o==null?void 0:o.data,v,r),De(this,Bc,v),De(this,Vs,null)}catch(N){De(this,Vs,N)}X(this,Vs)&&(b=X(this,Vs),v=X(this,Bc),S=Date.now(),w="error");const C=p.fetchStatus==="fetching",P=w==="pending",O=w==="error",E=P&&C,_=v!==void 0,T={status:w,fetchStatus:p.fetchStatus,isPending:P,isSuccess:w==="success",isError:O,isInitialLoading:E,isLoading:E,data:v,dataUpdatedAt:p.dataUpdatedAt,error:b,errorUpdatedAt:S,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>d.dataUpdateCount||p.errorUpdateCount>d.errorUpdateCount,isFetching:C,isRefetching:C&&!P,isLoadingError:O&&!_,isPaused:p.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:O&&_,isStale:iO(t,r),refetch:this.refetch,promise:X(this,za),isEnabled:ao(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const N=B=>{T.status==="error"?B.reject(T.error):T.data!==void 0&&B.resolve(T.data)},z=()=>{const B=De(this,za,T.promise=ok());N(B)},j=X(this,za);switch(j.status){case"pending":t.queryHash===n.queryHash&&N(j);break;case"fulfilled":(T.status==="error"||T.data!==j.value)&&z();break;case"rejected":(T.status!=="error"||T.error!==j.reason)&&z();break}}return T}updateResult(){const t=X(this,Gn),r=this.createResult(X(this,zt),this.options);if(De(this,ou,X(this,zt).state),De(this,Lc,this.options),X(this,ou).data!==void 0&&De(this,Uc,X(this,zt)),Rv(r,t))return;De(this,Gn,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!X(this,Fc).size)return!0;const a=new Set(o??X(this,Fc));return this.options.throwOnError&&a.add("error"),Object.keys(X(this,Gn)).some(l=>{const c=l;return X(this,Gn)[c]!==t[c]&&a.has(c)})};Et(this,Qt,yF).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Et(this,Qt,ck).call(this)}},hi=new WeakMap,zt=new WeakMap,Kp=new WeakMap,Gn=new WeakMap,ou=new WeakMap,Lc=new WeakMap,za=new WeakMap,Vs=new WeakMap,Vp=new WeakMap,Bc=new WeakMap,Uc=new WeakMap,au=new WeakMap,su=new WeakMap,qs=new WeakMap,Fc=new WeakMap,Qt=new WeakSet,Yf=function(t){Et(this,Qt,pk).call(this);let r=X(this,zt).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Xn)),r},sk=function(){Et(this,Qt,dk).call(this);const t=tl(this.options.staleTime,X(this,zt));if(ku||X(this,Gn).isStale||!rk(t))return;const n=uF(X(this,Gn).dataUpdatedAt,t)+1;De(this,au,Gl.setTimeout(()=>{X(this,Gn).isStale||this.updateResult()},n))},lk=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(X(this,zt)):this.options.refetchInterval)??!1},uk=function(t){Et(this,Qt,fk).call(this),De(this,qs,t),!(ku||ao(this.options.enabled,X(this,zt))===!1||!rk(X(this,qs))||X(this,qs)===0)&&De(this,su,Gl.setInterval(()=>{(this.options.refetchIntervalInBackground||nO.isFocused())&&Et(this,Qt,Yf).call(this)},X(this,qs)))},ck=function(){Et(this,Qt,sk).call(this),Et(this,Qt,uk).call(this,Et(this,Qt,lk).call(this))},dk=function(){X(this,au)&&(Gl.clearTimeout(X(this,au)),De(this,au,void 0))},fk=function(){X(this,su)&&(Gl.clearInterval(X(this,su)),De(this,su,void 0))},pk=function(){const t=X(this,hi).getQueryCache().build(X(this,hi),this.options);if(t===X(this,zt))return;const r=X(this,zt);De(this,zt,t),De(this,Kp,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},yF=function(t){cn.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(X(this,Gn))}),X(this,hi).getQueryCache().notify({query:X(this,zt),type:"observerResultsUpdated"})})},bD);function zce(e,t){return ao(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function u2(e,t){return zce(e,t)||e.state.data!==void 0&&hk(e,t,t.refetchOnMount)}function hk(e,t,r){if(ao(t.enabled,e)!==!1&&tl(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&iO(e,t)}return!1}function c2(e,t,r,n){return(e!==t||ao(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&iO(e,r)}function iO(e,t){return ao(t.enabled,e)!==!1&&e.isStaleByTime(tl(t.staleTime,e))}function Dce(e,t){return!Rv(e.getCurrentResult(),t)}function Nv(e){return{onFetch:(t,r)=>{var f,p,g,v,b;const n=t.options,i=(g=(p=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:p.fetchMore)==null?void 0:g.direction,o=((v=t.state.data)==null?void 0:v.pages)||[],a=((b=t.state.data)==null?void 0:b.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const d=async()=>{let S=!1;const w=P=>{Object.defineProperty(P,"signal",{enumerable:!0,get:()=>(t.signal.aborted?S=!0:t.signal.addEventListener("abort",()=>{S=!0}),t.signal)})},k=dF(t.options,t.fetchOptions),C=async(P,O,E)=>{if(S)return Promise.reject();if(O==null&&P.pages.length)return Promise.resolve(P);const A=(()=>{const z={client:t.client,queryKey:t.queryKey,pageParam:O,direction:E?"backward":"forward",meta:t.options.meta};return w(z),z})(),T=await k(A),{maxPages:R}=t.options,N=E?Ice:_ce;return{pages:N(P.pages,T,R),pageParams:N(P.pageParams,O,R)}};if(i&&o.length){const P=i==="backward",O=P?bF:mk,E={pages:o,pageParams:a},_=O(n,E);l=await C(E,_,P)}else{const P=e??o.length;do{const O=c===0?a[0]??n.initialPageParam:mk(n,l);if(c>0&&O==null)break;l=await C(l,O),c++}while(c<P)}return l};t.options.persister?t.fetchFn=()=>{var S,w;return(w=(S=t.options).persister)==null?void 0:w.call(S,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=d}}}function mk(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function bF(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}function Lce(e,t){return t?mk(e,t)!=null:!1}function Bce(e,t){return!t||!e.getPreviousPageParam?!1:bF(e,t)!=null}var Uce=class extends vF{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:Nv()})}getOptimisticResult(e){return e.behavior=Nv(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var b,S;const{state:r}=e,n=super.createResult(e,t),{isFetching:i,isRefetching:o,isError:a,isRefetchError:l}=n,c=(S=(b=r.fetchMeta)==null?void 0:b.fetchMore)==null?void 0:S.direction,d=a&&c==="forward",f=i&&c==="forward",p=a&&c==="backward",g=i&&c==="backward";return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Lce(t,r.data),hasPreviousPage:Bce(t,r.data),isFetchNextPageError:d,isFetchingNextPage:f,isFetchPreviousPageError:p,isFetchingPreviousPage:g,isRefetchError:l&&!d&&!p,isRefetching:o&&!f&&!g}}},qp,na,Yn,lu,ia,Ds,xD,Fce=(xD=class extends mF{constructor(t){super();at(this,ia);at(this,qp);at(this,na);at(this,Yn);at(this,lu);De(this,qp,t.client),this.mutationId=t.mutationId,De(this,Yn,t.mutationCache),De(this,na,[]),this.state=t.state||xF(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){X(this,na).includes(t)||(X(this,na).push(t),this.clearGcTimeout(),X(this,Yn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){De(this,na,X(this,na).filter(r=>r!==t)),this.scheduleGc(),X(this,Yn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){X(this,na).length||(this.state.status==="pending"?this.scheduleGc():X(this,Yn).remove(this))}continue(){var t;return((t=X(this,lu))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,l,c,d,f,p,g,v,b,S,w,k,C,P,O,E,_,A,T,R;const r=()=>{Et(this,ia,Ds).call(this,{type:"continue"})},n={client:X(this,qp),meta:this.options.meta,mutationKey:this.options.mutationKey};De(this,lu,hF({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(N,z)=>{Et(this,ia,Ds).call(this,{type:"failed",failureCount:N,error:z})},onPause:()=>{Et(this,ia,Ds).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>X(this,Yn).canRun(this)}));const i=this.state.status==="pending",o=!X(this,lu).canStart();try{if(i)r();else{Et(this,ia,Ds).call(this,{type:"pending",variables:t,isPaused:o}),await((l=(a=X(this,Yn).config).onMutate)==null?void 0:l.call(a,t,this,n));const z=await((d=(c=this.options).onMutate)==null?void 0:d.call(c,t,n));z!==this.state.context&&Et(this,ia,Ds).call(this,{type:"pending",context:z,variables:t,isPaused:o})}const N=await X(this,lu).start();return await((p=(f=X(this,Yn).config).onSuccess)==null?void 0:p.call(f,N,t,this.state.context,this,n)),await((v=(g=this.options).onSuccess)==null?void 0:v.call(g,N,t,this.state.context,n)),await((S=(b=X(this,Yn).config).onSettled)==null?void 0:S.call(b,N,null,this.state.variables,this.state.context,this,n)),await((k=(w=this.options).onSettled)==null?void 0:k.call(w,N,null,t,this.state.context,n)),Et(this,ia,Ds).call(this,{type:"success",data:N}),N}catch(N){try{throw await((P=(C=X(this,Yn).config).onError)==null?void 0:P.call(C,N,t,this.state.context,this,n)),await((E=(O=this.options).onError)==null?void 0:E.call(O,N,t,this.state.context,n)),await((A=(_=X(this,Yn).config).onSettled)==null?void 0:A.call(_,void 0,N,this.state.variables,this.state.context,this,n)),await((R=(T=this.options).onSettled)==null?void 0:R.call(T,void 0,N,t,this.state.context,n)),N}finally{Et(this,ia,Ds).call(this,{type:"error",error:N})}}finally{X(this,Yn).runNext(this)}}},qp=new WeakMap,na=new WeakMap,Yn=new WeakMap,lu=new WeakMap,ia=new WeakSet,Ds=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),cn.batch(()=>{X(this,na).forEach(n=>{n.onMutationUpdate(t)}),X(this,Yn).notify({mutation:this,type:"updated",action:t})})},xD);function xF(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Da,Ro,Zp,wD,Wce=(wD=class extends Od{constructor(t={}){super();at(this,Da);at(this,Ro);at(this,Zp);this.config=t,De(this,Da,new Set),De(this,Ro,new Map),De(this,Zp,0)}build(t,r,n){const i=new Fce({client:t,mutationCache:this,mutationId:++og(this,Zp)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){X(this,Da).add(t);const r=Cg(t);if(typeof r=="string"){const n=X(this,Ro).get(r);n?n.push(t):X(this,Ro).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(X(this,Da).delete(t)){const r=Cg(t);if(typeof r=="string"){const n=X(this,Ro).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&X(this,Ro).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Cg(t);if(typeof r=="string"){const n=X(this,Ro).get(r),i=n==null?void 0:n.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=Cg(t);if(typeof r=="string"){const i=(n=X(this,Ro).get(r))==null?void 0:n.find(o=>o!==t&&o.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){cn.batch(()=>{X(this,Da).forEach(t=>{this.notify({type:"removed",mutation:t})}),X(this,Da).clear(),X(this,Ro).clear()})}getAll(){return Array.from(X(this,Da))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>n2(r,n))}findAll(t={}){return this.getAll().filter(r=>n2(t,r))}notify(t){cn.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return cn.batch(()=>Promise.all(t.map(r=>r.continue().catch(Xn))))}},Da=new WeakMap,Ro=new WeakMap,Zp=new WeakMap,wD);function Cg(e){var t;return(t=e.options.scope)==null?void 0:t.id}var La,Zs,mi,Ba,Ya,nv,gk,SD,Hce=(SD=class extends Od{constructor(r,n){super();at(this,Ya);at(this,La);at(this,Zs);at(this,mi);at(this,Ba);De(this,La,r),this.setOptions(n),this.bindMethods(),Et(this,Ya,nv).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var i;const n=this.options;this.options=X(this,La).defaultMutationOptions(r),Rv(this.options,n)||X(this,La).getMutationCache().notify({type:"observerOptionsUpdated",mutation:X(this,mi),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Pu(n.mutationKey)!==Pu(this.options.mutationKey)?this.reset():((i=X(this,mi))==null?void 0:i.state.status)==="pending"&&X(this,mi).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=X(this,mi))==null||r.removeObserver(this)}onMutationUpdate(r){Et(this,Ya,nv).call(this),Et(this,Ya,gk).call(this,r)}getCurrentResult(){return X(this,Zs)}reset(){var r;(r=X(this,mi))==null||r.removeObserver(this),De(this,mi,void 0),Et(this,Ya,nv).call(this),Et(this,Ya,gk).call(this)}mutate(r,n){var i;return De(this,Ba,n),(i=X(this,mi))==null||i.removeObserver(this),De(this,mi,X(this,La).getMutationCache().build(X(this,La),this.options)),X(this,mi).addObserver(this),X(this,mi).execute(r)}},La=new WeakMap,Zs=new WeakMap,mi=new WeakMap,Ba=new WeakMap,Ya=new WeakSet,nv=function(){var n;const r=((n=X(this,mi))==null?void 0:n.state)??xF();De(this,Zs,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},gk=function(r){cn.batch(()=>{var n,i,o,a,l,c,d,f;if(X(this,Ba)&&this.hasListeners()){const p=X(this,Zs).variables,g=X(this,Zs).context,v={client:X(this,La),meta:this.options.meta,mutationKey:this.options.mutationKey};(r==null?void 0:r.type)==="success"?((i=(n=X(this,Ba)).onSuccess)==null||i.call(n,r.data,p,g,v),(a=(o=X(this,Ba)).onSettled)==null||a.call(o,r.data,null,p,g,v)):(r==null?void 0:r.type)==="error"&&((c=(l=X(this,Ba)).onError)==null||c.call(l,r.error,p,g,v),(f=(d=X(this,Ba)).onSettled)==null||f.call(d,void 0,r.error,p,g,v))}this.listeners.forEach(p=>{p(X(this,Zs))})})},SD),oa,kD,Kce=(kD=class extends Od{constructor(t={}){super();at(this,oa);this.config=t,De(this,oa,new Map)}build(t,r,n){const i=r.queryKey,o=r.queryHash??tO(i,r);let a=this.get(o);return a||(a=new Nce({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(a)),a}add(t){X(this,oa).has(t.queryHash)||(X(this,oa).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=X(this,oa).get(t.queryHash);r&&(t.destroy(),r===t&&X(this,oa).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){cn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return X(this,oa).get(t)}getAll(){return[...X(this,oa).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>r2(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>r2(t,n)):r}notify(t){cn.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){cn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){cn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},oa=new WeakMap,kD),Lr,Gs,Ys,Wc,Hc,Xs,Kc,Vc,PD,Vce=(PD=class{constructor(e={}){at(this,Lr);at(this,Gs);at(this,Ys);at(this,Wc);at(this,Hc);at(this,Xs);at(this,Kc);at(this,Vc);De(this,Lr,e.queryCache||new Kce),De(this,Gs,e.mutationCache||new Wce),De(this,Ys,e.defaultOptions||{}),De(this,Wc,new Map),De(this,Hc,new Map),De(this,Xs,0)}mount(){og(this,Xs)._++,X(this,Xs)===1&&(De(this,Kc,nO.subscribe(async e=>{e&&(await this.resumePausedMutations(),X(this,Lr).onFocus())})),De(this,Vc,Mv.subscribe(async e=>{e&&(await this.resumePausedMutations(),X(this,Lr).onOnline())})))}unmount(){var e,t;og(this,Xs)._--,X(this,Xs)===0&&((e=X(this,Kc))==null||e.call(this),De(this,Kc,void 0),(t=X(this,Vc))==null||t.call(this),De(this,Vc,void 0))}isFetching(e){return X(this,Lr).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return X(this,Gs).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=X(this,Lr).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=X(this,Lr).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(tl(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return X(this,Lr).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=X(this,Lr).get(n.queryHash),o=i==null?void 0:i.state.data,a=Cce(t,o);if(a!==void 0)return X(this,Lr).build(this,n).setData(a,{...r,manual:!0})}setQueriesData(e,t,r){return cn.batch(()=>X(this,Lr).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=X(this,Lr).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=X(this,Lr);cn.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=X(this,Lr);return cn.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=cn.batch(()=>X(this,Lr).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(Xn).catch(Xn)}invalidateQueries(e,t={}){return cn.batch(()=>(X(this,Lr).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=cn.batch(()=>X(this,Lr).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,r);return r.throwOnError||(o=o.catch(Xn)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(Xn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=X(this,Lr).build(this,t);return r.isStaleByTime(tl(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Xn).catch(Xn)}fetchInfiniteQuery(e){return e.behavior=Nv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Xn).catch(Xn)}ensureInfiniteQueryData(e){return e.behavior=Nv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Mv.isOnline()?X(this,Gs).resumePausedMutations():Promise.resolve()}getQueryCache(){return X(this,Lr)}getMutationCache(){return X(this,Gs)}getDefaultOptions(){return X(this,Ys)}setDefaultOptions(e){De(this,Ys,e)}setQueryDefaults(e,t){X(this,Wc).set(Pu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...X(this,Wc).values()],r={};return t.forEach(n=>{wp(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){X(this,Hc).set(Pu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...X(this,Hc).values()],r={};return t.forEach(n=>{wp(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...X(this,Ys).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=tO(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===rO&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...X(this,Ys).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){X(this,Lr).clear(),X(this,Gs).clear()}},Lr=new WeakMap,Gs=new WeakMap,Ys=new WeakMap,Wc=new WeakMap,Hc=new WeakMap,Xs=new WeakMap,Kc=new WeakMap,Vc=new WeakMap,PD),qce=m.createContext(void 0),wF=e=>{const t=m.useContext(qce);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},SF=m.createContext(!1),Zce=()=>m.useContext(SF);SF.Provider;function Gce(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Yce=m.createContext(Gce()),Xce=()=>m.useContext(Yce),Qce=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Jce=e=>{m.useEffect(()=>{e.clearReset()},[e])},ede=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||fF(r,[e.error,n])),tde=e=>{if(e.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},rde=(e,t)=>e.isLoading&&e.isFetching&&!t,nde=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,d2=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function kF(e,t,r){var p,g,v,b,S;const n=Zce(),i=Xce(),o=wF(r),a=o.defaultQueryOptions(e);(g=(p=o.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||g.call(p,a),a._optimisticResults=n?"isRestoring":"optimistic",tde(a),Qce(a,i),Jce(i);const l=!o.getQueryCache().get(a.queryHash),[c]=m.useState(()=>new t(o,a)),d=c.getOptimisticResult(a),f=!n&&e.subscribed!==!1;if(m.useSyncExternalStore(m.useCallback(w=>{const k=f?c.subscribe(cn.batchCalls(w)):Xn;return c.updateResult(),k},[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),m.useEffect(()=>{c.setOptions(a)},[a,c]),nde(a,d))throw d2(a,c,i);if(ede({result:d,errorResetBoundary:i,throwOnError:a.throwOnError,query:o.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw d.error;if((b=(v=o.getDefaultOptions().queries)==null?void 0:v._experimental_afterQuery)==null||b.call(v,a,d),a.experimental_prefetchInRender&&!ku&&rde(d,n)){const w=l?d2(a,c,i):(S=o.getQueryCache().get(a.queryHash))==null?void 0:S.promise;w==null||w.catch(Xn).finally(()=>{c.updateResult()})}return a.notifyOnChangeProps?d:c.trackResult(d)}function ide(e,t){return kF(e,vF,t)}function ode(e,t){const r=wF(t),[n]=m.useState(()=>new Hce(r,e));m.useEffect(()=>{n.setOptions(e)},[n,e]);const i=m.useSyncExternalStore(m.useCallback(a=>n.subscribe(cn.batchCalls(a)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),o=m.useCallback((a,l)=>{n.mutate(a,l).catch(Xn)},[n]);if(i.error&&fF(n.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}function ade(e,t){return kF(e,Uce,t)}var PF=class extends Error{constructor({res:e,url:t,body:{message:r}}){super(`[${e.status}] ${e.statusText}${r?` - ${r}`:""}`),this.name="HttpError",this.status=e.status,this.statusText=e.statusText,this.url=t,this.body={message:r},this.headers=e.headers?Object.fromEntries(e.headers.entries()):{}}},$F=async e=>{const t={...e.headers??{}},r=typeof FormData<"u"&&e.body instanceof FormData;r||(t["Content-Type"]||(t["Content-Type"]="application/json"),t.Accept||(t.Accept="application/json"));const n=await fetch(e.url,{method:e.method,headers:t,body:r?e.body:e.body==null?void 0:JSON.stringify(e.body)}),i=await n.json();if(!n.ok)throw new PF({res:n,url:e.url,body:i});try{return{data:i,headers:n.headers?Object.fromEntries(n.headers.entries()):{},status:n.status}}catch{return{data:i,headers:n.headers?Object.fromEntries(n.headers.entries()):{},status:n.status}}},f2=e=>e.toUpperCase();function CF(e){if(!e)return"";const t=new URLSearchParams;for(const[n,i]of Object.entries(e))if(i!=null){if(Array.isArray(i)){i.forEach(o=>{o!=null&&(typeof o=="object"?t.append(n,JSON.stringify(o)):t.append(n,String(o)))});continue}if(typeof i=="object"){t.set(n,JSON.stringify(i));continue}t.set(n,String(i))}const r=t.toString();return r?`?${r}`:""}function sde(e,t){if(!e)return e;const{[t]:r,...n}=e;return n}var p2=e=>{if(!e||typeof e!="object")return;const t=e;if("nextCursor"in t)return t.nextCursor;if("meta"in t){const r=t.meta;if(r&&typeof r=="object"&&"nextCursor"in r)return r.nextCursor}},Cw=e=>{if(typeof console>"u")return;const t=console.debug??console.log;t==null||t.call(console,"[rrroutes-client]",e)},lde=["fetch","invalidate","setData","build","useEndpoint"],h2=()=>{};function ude(e,t){const r={emit:h2,mode:"minimal"};if(t&&t.toLowerCase()==="production"||!e)return r;if(e===!0||e==="minimal")return{emit:(n,i)=>Cw(i?{...n,name:i}:n),mode:"minimal"};if(e==="complete")return{emit:(n,i)=>Cw(i?{...n,name:i}:n),mode:"complete"};if(typeof e=="function")return{emit:(n,i)=>e(i?{...n,name:i}:n),mode:"minimal"};if(typeof e=="object"){const n=e,i=!!n.verbose,o=lde.filter(f=>n[f]);if(o.length===0)return{emit:h2,mode:i?"complete":"minimal"};const a=new Set(o),l=n.only&&n.only.length>0?new Set(n.only):void 0,c=n.logger??Cw;return{emit:(f,p)=>{a.has(f.type)&&(l&&(!p||!l.has(p))||c(p?{...f,name:p}:f))},mode:i?"complete":"minimal"}}return r}function m2(e){return e[0]}function Ow(e){return typeof e>"u"?[]:[e]}function g2(e,t,r,n){const i=e.cfg.paramsSchema?Tv(e.cfg.paramsSchema,r):{},o=e.cfg.querySchema?Tv(e.cfg.querySchema,n):{},a=lF(e.path,i??{});return{url:`${t??""}${a}${CF(o)}`,normalizedQuery:o,normalizedParams:i}}function cde(e){const t=e.queryClient,r=e.fetcher??$F,n=e.baseUrl,i=e.environment??void 0,{emit:o,mode:a}=ude(e.debug,i),l=a==="complete",c=(g,v)=>!l||!v?g:{...g,...v};async function d(g,v=!1){const b=g;await t.invalidateQueries({queryKey:b,exact:v}),o({type:"invalidate",key:b,exact:v})}function f(g,v,b){const S=g.method==="get",w=!!g.cfg.feed,k=g.cfg,C=e.validateResponses,P=f2(g.method),O=!!(k.paramsSchema||k.querySchema),E=`${g.method.toUpperCase()} ${String(g.path)}`,_=b==null?void 0:b.name,A=D=>o(D,_);A({type:"build",leaf:E});let T="pagination_cursor",R,N,z;if(S&&w){const D=v??{},{cursorParam:K,getNextPageParam:te,initialPageParam:fe,...ue}=D;T=K??"pagination_cursor",R=te??(W=>p2(W)),N=typeof fe>"u"?void 0:fe,z=ue}const j=(...D)=>{const K=m2(D),te=K==null?void 0:K.params,fe=K==null?void 0:K.query,ue=S&&w?sde(fe,T):fe;return vce({leaf:g,params:te,query:ue})},B=async(...D)=>{const K=j(...D);await t.invalidateQueries({queryKey:K,exact:!0}),A({type:"invalidate",key:K,exact:!0})},F=(...D)=>{const[K,...te]=D,fe=j(...te);let ue;return S&&w?ue=t.setQueryData(fe,W=>typeof K=="function"?K(W):K):ue=t.setQueryData(fe,W=>typeof K=="function"?K(W):K),A({type:"setData",key:fe}),ue},H=v==null?void 0:v.onReceive,L=async(D,K)=>{var xe;const te=m2(D),fe=te==null?void 0:te.params,ue=(K==null?void 0:K.queryOverride)??(te==null?void 0:te.query),{url:W,normalizedQuery:ee,normalizedParams:he}=g2({...g,cfg:k},n,fe,ue);let G;const ae=!!k.bodySchema,Pe=(K==null?void 0:K.requireBody)??(!S&&ae);if(typeof(K==null?void 0:K.body)<"u"){const be=k.bodySchema?Tv(k.bodySchema,K.body):void 0;Array.isArray(k.bodyFiles)&&k.bodyFiles.length>0&&be&&typeof be=="object"?G=dde(be):G=be}else if(Pe)throw new Error("Body is required when invoking a mutation fetch.");const oe=Date.now(),Ie=l?{params:he,query:ee}:void 0;A(c({type:"fetch",stage:"start",method:P,url:W,leaf:E,...G!==void 0?{body:G}:{}},Ie));try{const be=await r(G===void 0?{url:W,method:P}:{url:W,method:P,body:G});if(A(c({type:"fetch",stage:"fetched",method:P,url:W,leaf:E,durationMs:Date.now()-oe},l?{params:he,query:ee,output:be}:void 0)),C){if(!k.outputSchema)throw new Error(`No output schema defined for leaf ${E}, cannot validate response.`);be.data=Tv(k.outputSchema,be.data),A(c({type:"fetch",stage:"parsed",method:P,url:W,leaf:E,durationMs:Date.now()-oe},l?{params:he,query:ee,output:be}:void 0))}return(xe=K==null?void 0:K.onReceive)==null||xe.call(K,be.data),be.data}catch(be){throw A(c({type:"fetch",stage:"error",method:P,url:W,leaf:E,durationMs:Date.now()-oe,...G!==void 0?{body:G}:{},error:be},Ie)),be}},Z=(...D)=>{const K=!!k.bodySchema,te=D.length,ue=K&&te>(O?1:0),W=ue?D[te-1]:void 0,ee=ue?D.slice(0,te-1):D;return L(ee,{body:W,onReceive:H,requireBody:!1})};if(S&&w)return{getQueryKeys:j,invalidate:B,setData:F,useEndpoint:(...K)=>{const te=K[0],fe=Ow(te),ue=j(...fe);A({type:"useEndpoint",leaf:E,variant:"infiniteGet",keys:ue});const W=te==null?void 0:te.params,ee=te==null?void 0:te.query,he=z??{},G=m.useRef(new Set),ae=m.useCallback(xe=>{var be;(be=he==null?void 0:he.onReceive)==null||be.call(he,xe),G.current.forEach(Ne=>Ne(xe))},[]),Pe=m.useCallback(xe=>(G.current.add(xe),()=>{G.current.delete(xe)}),[]),{normalizedQuery:oe}=g2({...g,cfg:k},n,W,ee);return{...ade({...he,placeholderData:he.placeholderData??a2,initialPageParam:N,getNextPageParam:xe=>(R??p2)(xe),queryKey:ue,queryFn:({pageParam:xe})=>{const be={...oe,...xe?{[T]:xe}:{}};return L(fe,{queryOverride:be,onReceive:ae})}},t),onReceive:Pe}},fetch:Z};if(S)return{getQueryKeys:j,invalidate:B,setData:F,useEndpoint:(...K)=>{const te=K[0],fe=Ow(te),ue=j(...fe);A({type:"useEndpoint",leaf:E,variant:"get",keys:ue}),te==null||te.params,te==null||te.query;const W=v??{},ee=m.useRef(new Set),he=m.useCallback(Pe=>{var oe;(oe=W==null?void 0:W.onReceive)==null||oe.call(W,Pe),ee.current.forEach(Ie=>Ie(Pe))},[]),G=m.useCallback(Pe=>(ee.current.add(Pe),()=>{ee.current.delete(Pe)}),[]);return{...ide({...W,queryKey:j(...fe),placeholderData:a2,queryFn:()=>L(fe,{onReceive:he})},t),onReceive:G}},fetch:Z};const V=v??{},U=async(...D)=>{if(D.length===0)throw new Error("Body is required when invoking a mutation fetch.");const K=D.length-1,te=D.slice(0,K),fe=D[K];return await L(te,{body:fe,onReceive:W=>{var ee;return(ee=V==null?void 0:V.onReceive)==null?void 0:ee.call(V,W)},requireBody:!0})};return{getQueryKeys:j,invalidate:B,setData:F,useEndpoint:(...D)=>{const K=D[0],te=Ow(K),fe=j(...te);A({type:"useEndpoint",leaf:E,variant:"mutation",keys:fe});const ue=m.useRef(new Set),W=m.useCallback(G=>{ue.current.forEach(ae=>ae(G))},[]),ee=m.useCallback(G=>(ue.current.add(G),()=>{ue.current.delete(G)}),[]);return{...ode({...V,mutationKey:fe,mutationFn:async G=>{const ae=await U(...te,G);return W(ae),ae}},t),onReceive:ee}},fetch:U}}return{queryClient:t,invalidate:d,fetch:async g=>{const{path:v,method:b,query:S,body:w,params:k}=g;if(!v||typeof v!="string")throw new Error("fetch(path, ...) requires a non-empty string path.");if(!b)throw new Error("fetch(path, method, ...) requires an HTTP method.");const C=String(b).toLowerCase(),P=f2(C),O=pde(S),E=CF(O),_=hde(v,k),A=`${n??""}${_}${E}`,T=`${P} ${v}`,R=Date.now(),N=l?{params:k,query:O}:void 0;o(c({type:"fetch",stage:"start",method:P,url:A,leaf:T,...w!==void 0?{body:w}:{}},N));try{const z=await r(w===void 0?{url:A,method:P}:{url:A,method:P,body:w});return o(c({type:"fetch",stage:"fetched",method:P,url:A,leaf:T,durationMs:Date.now()-R},l?{params:k,query:O,output:z}:void 0)),z}catch(z){throw o(c({type:"fetch",stage:"error",method:P,url:A,leaf:T,durationMs:Date.now()-R,...w!==void 0?{body:w}:{},error:z},N)),z}},build:f}}function dde(e){const t=new FormData;for(const[r,n]of Object.entries(e??{}))n!=null&&(Array.isArray(n)?n.forEach((i,o)=>t.append(`${r}[${o}]`,i)):t.append(r,n));return t}function fde(e){const t=new Set,r=/:([A-Za-z0-9_]+)/g;let n;for(;(n=r.exec(e))!==null;)t.add(n[1]);return t}function pde(e){if(e==null)return;if(typeof e!="object"||Array.isArray(e))throw new Error("Query must be a plain object (Record<string, string>).");const t={};for(const[r,n]of Object.entries(e))if(n!=null){if(typeof n!="string")throw new Error(`Query param "${r}" must be a string; received type "${typeof n}".`);t[r]=n}return Object.keys(t).length>0?t:void 0}function hde(e,t){const r=fde(e);if(!t||typeof t!="object"||Array.isArray(t)){if(r.size>0)throw new Error(`Missing path parameters for "${e}": ${[...r].join(", ")}`);return e}const n=t,i=new Set(Object.keys(n));for(const o of i){if(!r.has(o))throw new Error(`Unexpected path parameter "${o}" for template "${e}".`);const a=n[o];if(a!=null&&(typeof a=="object"||Array.isArray(a)))throw new Error(`Path parameter "${o}" must be a primitive; received "${typeof a}".`)}for(const o of r)if(!i.has(o))throw new Error(`Missing value for path parameter "${o}" in template "${e}".`);return r.size===0?e:lF(e,n)}Pb([kh(Su()),Su()]);m.createContext(null);const OF=m.createContext(null),v2="rrroutes.docs.baseUrl";function mde({children:e,initialBaseUrl:t}){const[r,n]=m.useState([]),i=typeof window<"u"?window.localStorage.getItem(v2):null,[o,a]=m.useState(i||t);m.useEffect(()=>{typeof window<"u"&&window.localStorage.setItem(v2,o)},[o]);const l=m.useMemo(()=>new Vce({defaultOptions:{queries:{retry:!1}}}),[]),c=m.useMemo(()=>cde({baseUrl:o,queryClient:l,fetcher:async g=>$F(g),validateResponses:!0}),[o,l]),d=m.useMemo(()=>({id:g,method:v,path:b})=>{console.log(g);const S=r.filter(w=>(console.log(w.id),w.log.method===v&&w.log.path===b&&(g?w.id===g:!0)));if(S.length>0)return S[S.length-1]},[r]),f=m.useMemo(()=>async(g,v,b,S)=>{const w=Date.now();let k,C,P=-1,O={};try{const A=await c.fetch({method:g,path:v,body:b.body&&b.body.trim().length>0?JSON.parse(b.body):void 0,query:b.query.reduce((T,R)=>(R.key.trim().length>0&&R.value&&R.enabled&&(T[R.key]=R.value),T),{}),params:b.params.reduce((T,R)=>(R.key.trim().length>0&&R.value&&R.enabled&&(T[R.key]=R.value),T),{})});k=A.data,P=A.status,O=A.headers}catch(A){A instanceof PF?(P=A.status,O=A.headers,C={message:A.body.message,stack:A.stack,name:A.name}):A instanceof Error?C={message:JSON.stringify(A.message),stack:A.stack,name:A.name}:C={message:"An unknown error occurred"}}const E=Date.now(),_={id:S,error:C,log:{durationMs:E-w,method:g,path:v,status:P,name:`${g.toUpperCase()} ${v}`,updatedAt:E,createdAt:w,id:`local-${Math.random().toString(36).substring(2,9)}`,body:b.body?JSON.parse(b.body):void 0,params:b.params.reduce((A,T)=>(T.key.trim().length>0&&T.value&&T.enabled&&(A[T.key]=T.value),A),{}),query:b.query.reduce((A,T)=>(T.key.trim().length>0&&T.value&&T.enabled&&(A[T.key]=T.value),A),{}),headers:O,error:C==null?void 0:C.message,output:k,groupId:void 0,tags:[],fullUrl:""}};return n(A=>[...A,_]),_},[]),p=m.useMemo(()=>({client:c,queryClient:l,baseUrl:o,headers:{},setBaseUrl:a,runs:r,getLastRun:d,fetch:f}),[o,f,d,r,c]);return y.jsx(OF.Provider,{value:p,children:e})}function Ed(){const e=m.useContext(OF);if(!e)throw new Error("useHistoryStore must be used within HistoryProvider");return e}const Ph=["get","post","put","patch","delete"],$u=we.enum(Ph),$h=we.object({id:we.string(),name:we.string(),description:we.string().optional(),groupId:we.string().optional(),tags:we.string().array().optional(),createdAt:we.number(),updatedAt:we.number()}),Ch=we.object({beforeDate:we.string().optional(),afterDate:we.string().optional(),orderBy:we.enum(["timestamp","duration","level","path"]).default("timestamp"),orderDirection:we.enum(["asc","desc"]).default("desc"),searchQuery:we.string().optional(),groups:we.string().array().optional(),excludeGroups:we.string().array().optional(),tags:we.string().array().optional(),excludeTags:we.string().array().optional(),cursor:we.string().optional()}),Oh=we.object({cursor:we.string().optional(),pageSize:we.coerce.number().optional()}),Eh=we.object({totalCount:we.number().optional(),nextCursor:we.string().optional()}),vk=we.enum(["hit","miss","set","delete"]),EF=$h.extend({operation:vk,value:we.any().nullable(),size:we.number().optional()}),y2=Ch.extend({operations:vk.array().optional(),excludeOperations:vk.array().optional(),keys:we.array(we.string()).optional()});we.object({key:we.string(),lastSetAt:we.number().nullable(),lastHitAt:we.number().nullable(),lastMissAt:we.number().nullable(),totalHits:we.number(),totalMisses:we.number(),totalSets:we.number()});const gde=va("cache").get({feed:!0,outputSchema:EF.array(),querySchema:y2,outputMetaSchema:Eh,queryExtensionSchema:Oh}).sub(va("clear").post({outputSchema:we.object({success:we.boolean()}),querySchema:y2}).done()).done(),yk=we.enum(["info","warning","error","debug","trace"]),_F=$h.extend({level:yk,meta:we.any().optional()}),vde=Ch.extend({level:yk.array().optional(),excludeLevel:yk.array().optional()}),yde=va("logs").get({feed:!0,outputSchema:_F.array(),querySchema:vde,outputMetaSchema:Eh,queryExtensionSchema:Oh}).done(),bk=$h.extend({status:we.number(),body:we.any().optional(),fullUrl:we.string(),path:we.string(),method:$u,query:we.record(we.string(),we.any()).optional(),params:we.record(we.string(),we.any()).optional(),output:we.any().optional(),headers:we.record(we.string(),we.any()).optional(),error:we.string().optional(),durationMs:we.number(),ip:we.string().optional(),userAgent:we.string().optional()}),bde=Ch.extend({methods:$u.array().default([]),excludeMethods:$u.array().optional(),statuses:we.coerce.number().array().default([]),excludeStatuses:we.coerce.number().array().optional(),path:we.string().optional(),endpointKeys:we.string().array().optional(),excludeEndpointKeys:we.string().array().optional()}),xde=va("requests").get({feed:!0,outputSchema:bk.array(),querySchema:bde,outputMetaSchema:Eh,queryExtensionSchema:Oh}).sub(va(":requestId",void 0,we.string()).get({outputSchema:bk.extend({logs:we.array(_F),caches:we.array(EF)})}).done()).done(),wde=["object","string","number","boolean","bigint","date","array","enum","literal","union","record","tuple","unknown","any"],Yl=we.lazy(()=>we.object({kind:we.enum(wde),optional:we.boolean().optional(),nullable:we.boolean().optional(),description:we.string().optional(),properties:we.record(we.string(),Yl).optional(),element:Yl.optional(),union:we.array(Yl).optional(),literal:we.unknown().optional(),enumValues:we.array(we.string()).optional()})),IF=["experimental","beta","stable","deprecated"],xk=we.enum(IF),b2=$h.extend({method:$u,path:we.string(),contract:we.object({body:Yl.optional(),query:Yl.optional(),output:Yl.optional(),params:Yl.optional(),bodyFiles:we.array(we.object({name:we.string(),maxCount:we.number()})).optional()}),feed:we.boolean().optional(),summary:we.string().optional(),stability:xk,hidden:we.boolean().optional(),meta:we.record(we.string(),we.string()),implemented:we.boolean().optional()}),Sde=Ch.extend({methods:$u.array().optional(),excludeMethods:$u.array().optional(),path:we.string().optional(),stability:xk.array().optional(),excludeStability:xk.array().optional()}),kde=va("endpoints").get({feed:!0,querySchema:Sde,outputSchema:b2.array(),outputMetaSchema:Eh,queryExtensionSchema:Oh}).sub(va(":endpointId",void 0,we.string()).get({outputSchema:b2.extend({requests:we.array(bk),volumeTS:we.array(we.object({timestamp:we.number(),count:we.number()})),averageDurationMs:we.number(),successRate:we.number(),latestErrorRequestIds:we.array(we.string())})}).done()).done(),Rf=$h.extend({operations:we.array(we.object({name:we.string(),description:we.string().optional(),stepNumber:we.number(),endpointId:we.string().optional(),method:$u,path:we.string(),body:we.json().optional(),extraHeaders:we.record(we.string(),we.any()).optional(),query:we.record(we.string(),we.any()).optional()}))}),Pde=Ch.extend({name:we.string().optional(),excludeName:we.string().optional()}),$de=va("presets").get({feed:!0,querySchema:Pde,outputMetaSchema:Eh,outputSchema:Rf.array(),queryExtensionSchema:Oh}).post({bodySchema:Rf,outputSchema:Rf}).put({bodySchema:Rf,outputSchema:Rf}).done(),Cde=va().sub(va("/__rrroutes").sub(kde,xde,yde,gde,$de).done()).done(),oO=Sce(Cde);function Un(e,t){const{client:r}=Ed();return m.useMemo(()=>r.build(oO.byKey[e],t),[r,e,t])}const jF=m.createContext(null);function Ode({children:e}){const[t,r]=m.useState([]),[n,i]=m.useState(null),o=f=>{r(p=>[...p,f])},a=({id:f,method:p,path:g})=>t.filter(v=>v.method!==p||v.path!==g?!1:f?v.id===f:!0).slice(-1)[0],l=m.useCallback(f=>{i(f)},[]),c=m.useCallback(f=>!n||f&&(f.method&&n.method!==f.method||f.path&&n.path!==f.path||f.leafKey&&n.leafKey!==f.leafKey)?null:(i(null),n),[n]),d=m.useMemo(()=>({runs:t,addRun:o,getLastRun:a,queuePrefill:l,consumePrefill:c}),[t,l,c]);return y.jsx(jF.Provider,{value:d,children:e})}function Cb(){const e=m.useContext(jF);if(!e)throw new Error("usePlaygroundRuns must be used within PlaygroundRunsProvider");return e}const wk="tab",Sk="layout",Ede=["request","response","meta","metrics","playground"];function x2(e){return e&&Ede.includes(e)?e:"request"}function AF(e){return e==="request"?null:e}function w2(e){return e==="detailsMax"?"details":e==="playgroundMax"?"playground":"split"}function TF(e){return e==="details"?"detailsMax":e==="playground"?"playgroundMax":null}function od(e,t){if(!e||!t)return{displayId:"",encodedId:""};try{const r=e.toUpperCase();return{displayId:id(r,t,!1),encodedId:id(r,t,!0)}}catch{const r=`${e.toUpperCase()} ${t}`;return{displayId:r,encodedId:encodeURIComponent(r)}}}function RF(e){const t=id(e.method.toUpperCase(),e.path,!1);return{value:t,display:t,method:e.method,path:e.path}}function MF(e){if(!e)return;const t=e.trim();if(!t)return;const[r,...n]=t.split(" ");if(!r||n.length===0)return;const i=r.toLowerCase();if(!Ph.includes(i))return;const o=n.join(" ").trim();if(!o)return;const a=id(r.toUpperCase(),o,!1);return{value:a,display:a,method:i,path:o}}function _de(e){if(!e)return"";const t=MF(e);return t?id(t.method.toUpperCase(),t.path,!0):encodeURIComponent(e)}function Sp(e,t){const r=encodeURIComponent(e),n=new URLSearchParams,i=t!=null&&t.tab?AF(t.tab):null;i&&n.set(wk,i);const o=t!=null&&t.layout?TF(t.layout):null;o&&n.set(Sk,o),Object.entries((t==null?void 0:t.extraParams)??{}).forEach(([l,c])=>{c!=null&&n.set(l,c)});const a=n.toString();return a?`/routes/${r}?${a}`:`/routes/${r}`}function Bo({title:e,description:t,action:r}){return y.jsx(Pt,{sx:{py:8,px:2,textAlign:"center",color:"text.secondary"},children:y.jsxs(Se,{spacing:2,alignItems:"center",children:[y.jsx(ke,{variant:"h5",color:"text.primary",children:e}),t&&y.jsx(ke,{variant:"body1",color:"text.secondary",maxWidth:480,children:t}),r]})})}const Ide=Mt(y.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"})),ts=Mt(y.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}));function sl({message:e="Something went wrong.",onRetry:t,details:r}){const[n,i]=m.useState(!1);return y.jsx(ai,{elevation:0,sx:{p:4,borderRadius:2,border:"1px solid",borderColor:"divider",bgcolor:"background.default"},children:y.jsxs(Se,{spacing:2,alignItems:"flex-start",children:[y.jsxs(Se,{direction:"row",spacing:2,alignItems:"center",children:[y.jsx(Ide,{color:"error",fontSize:"large"}),y.jsxs(Pt,{children:[y.jsx(ke,{variant:"h6",children:"We hit a snag"}),y.jsx(ke,{color:"text.secondary",children:e})]})]}),t&&y.jsx(Ut,{variant:"contained",color:"primary",onClick:t,children:"Retry"}),r&&y.jsxs(Pt,{sx:{width:"100%"},children:[y.jsx(Ut,{size:"small",startIcon:y.jsx(ts,{sx:{transform:n?"rotate(180deg)":"rotate(0deg)",transition:"transform 150ms ease"}}),onClick:()=>i(o=>!o),children:n?"Hide details":"Show details"}),y.jsx(fp,{in:n,children:y.jsx(Pt,{component:"pre",sx:{mt:1,p:2,borderRadius:1,bgcolor:"background.paper",overflowX:"auto",typography:"body2"},children:r})})]})]})})}function ll({variant:e="inline"}){return e==="table"?y.jsx(Se,{spacing:1.5,children:Array.from({length:5}).map((t,r)=>y.jsx(kw,{variant:"rectangular",height:40,sx:{borderRadius:1}},r))}):e==="full"?y.jsxs(Pt,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",py:8,gap:2},children:[y.jsx(t$,{size:32}),y.jsx(ke,{color:"text.secondary",children:"Loading data..."})]}):y.jsxs(Se,{spacing:1,children:[y.jsx(kw,{variant:"text",width:"60%"}),y.jsx(kw,{variant:"text",width:"40%"})]})}const jde=Mt(y.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"})),Ade=Mt(y.jsx("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"})),Tde=Mt(y.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}));function aO({open:e,onClose:t,title:r,children:n,onPrev:i,onNext:o}){const a=qr(),l=Doe(a.breakpoints.down("sm")),c=typeof r=="string"?y.jsx(ke,{variant:"h6",component:"h2",sx:{flex:1,minWidth:0},children:r}):y.jsx(Pt,{sx:{flex:1,minWidth:0},children:r});return y.jsxs(dre,{open:e,onClose:t,fullWidth:!0,maxWidth:"md",fullScreen:l,scroll:"paper",PaperProps:{sx:{backgroundColor:"background.paper",borderRadius:{xs:0,sm:3},minHeight:{sm:360},display:"flex",flexDirection:"column"}},children:[y.jsxs(Se,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{px:{xs:2,sm:3},py:2,borderBottom:"1px solid",borderColor:"divider",gap:1},children:[y.jsxs(Se,{direction:"row",spacing:1,alignItems:"center",sx:{minWidth:0},children:[y.jsx(ei,{"aria-label":"Previous item",size:"small",onClick:i,disabled:!i,children:y.jsx(jde,{fontSize:"small"})}),c,y.jsx(ei,{"aria-label":"Next item",size:"small",onClick:o,disabled:!o,children:y.jsx(Ade,{fontSize:"small"})})]}),y.jsx(ei,{"aria-label":"Close detail dialog",onClick:t,children:y.jsx(Tde,{})})]}),y.jsx(gre,{sx:{p:{xs:2,sm:3},flex:1,overflowY:"auto"},children:n})]})}const Rde=Mt(y.jsx("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"})),Mde=Mt(y.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}));function la({value:e,collapsedLines:t=20,title:r}){const[n,i]=m.useState(!1),o=m.useMemo(()=>{try{return JSON.stringify(e??null,null,2)}catch{return"<< Unable to render JSON >>"}},[e]),a=async()=>{if(!(typeof navigator>"u"||!navigator.clipboard))try{await navigator.clipboard.writeText(o),i(!0),setTimeout(()=>i(!1),1500)}catch(l){console.error("Failed to copy JSON",l)}};return y.jsxs(Se,{spacing:1,children:[y.jsxs(Se,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[y.jsx(ke,{variant:"subtitle2",color:"text.secondary",children:r||"Output"}),y.jsx(g4,{title:n?"Copied!":"Copy JSON",placement:"top",children:y.jsx(ei,{size:"small",onClick:a,children:y.jsx(Mde,{fontSize:"inherit"})})})]}),y.jsx(Pt,{component:"pre",sx:{m:0,p:2,borderRadius:2,bgcolor:"background.default",border:"1px solid",borderColor:"divider",fontFamily:"monospace",fontSize:"0.85rem",lineHeight:1.6,maxHeight:`${t*1.6}rem`,overflow:"auto"},children:o})]})}const Nde={hit:"#66bb6a",miss:"#ffa726",set:"#42a5f5",delete:"#ef5350"};function sO({operation:e,state:t="display",onClick:r}){const n=qr(),i=Nde[e],o=t==="exclude",a=t==="none",l=o?n.palette.error.main:i,c=o?yi(l,.3):t==="display"||t==="include"?yi(i,.2):"transparent";return y.jsx(ri,{label:e.toUpperCase(),size:"small",onClick:r,variant:"outlined",sx:{borderColor:a?"divider":l,color:a?"text.secondary":l,bgcolor:c,fontWeight:600,opacity:a?.75:1,cursor:r?"pointer":"default"}})}function zde(e){const t=qr(),r=e.toLowerCase();return t.palette.http[r]||t.palette.text.primary}function _d({method:e,state:t,selected:r=!1,onClick:n}){const i=qr(),o=zde(e),a=t??(r?"include":"display"),l=a==="exclude",c=a==="none",d=l?i.palette.error.main:o,f=l?yi(d,.3):c?yi(o,.08):yi(o,.35);return y.jsx(ri,{label:e.toUpperCase(),size:"small",variant:"outlined",clickable:!!n,onClick:n,sx:{borderColor:d,color:d,bgcolor:f,fontWeight:600,opacity:c?.7:1},"aria-pressed":a==="include"})}const Dde={info:"#42a5f5",warning:"#ffa726",error:"#ef5350",debug:"#ab47bc",trace:"#26a69a"};function Ob({level:e,state:t,selected:r,onClick:n}){const i=qr(),o=Dde[e],a=t??(r?"include":"display"),l=a==="exclude",c=a==="none",d=l?i.palette.error.main:o,f=l?yi(d,.3):c?void 0:yi(o,.2);return y.jsx(ri,{label:e.toUpperCase(),size:"small",variant:"outlined",clickable:!!n,onClick:n,sx:{borderColor:d,color:d,bgcolor:f,fontWeight:600,opacity:c?.7:1}})}function Lde(e){const t=qr();return e<0?t.palette.text.secondary:e>=500?t.palette.status.error:e>=400?t.palette.status.warning:e>=300?t.palette.text.secondary:e>=200?t.palette.status.success:t.palette.text.secondary}function Eb({status:e,state:t="display",onClick:r}){const n=qr(),i=Lde(e),o=t==="exclude",a=t==="none",l=o?n.palette.error.main:i;return y.jsx(ri,{label:e>0?e:"—",size:"small",variant:"outlined",onClick:r,sx:{borderColor:a?"divider":l,color:a?"text.secondary":l,bgcolor:t==="display"||t==="include"?yi(i,.15):o?yi(l,.25):"transparent",fontWeight:600,cursor:r?"pointer":"default",opacity:a?.75:1}})}function Bde({request:e,caches:t=[],logs:r=[],onReplay:n}){return y.jsxs(Se,{spacing:3,children:[y.jsxs(Se,{spacing:1,children:[y.jsxs(Se,{direction:"row",spacing:1,alignItems:"center",children:[y.jsx(_d,{method:e.method}),y.jsx(ke,{sx:{fontFamily:"monospace"},children:e.path})]}),y.jsxs(Se,{direction:{xs:"column",sm:"row"},spacing:1,children:[y.jsxs(Se,{direction:"row",spacing:1,alignItems:"center",children:[y.jsx(Eb,{status:e.status}),y.jsxs(ke,{variant:"body2",color:"text.secondary",children:[e.durationMs," ms"]})]}),y.jsx(ke,{variant:"body2",color:"text.secondary",children:new Date(e.createdAt).toLocaleString()})]})]}),y.jsx(gp,{}),y.jsxs(Mf,{title:"Request",children:[y.jsx(la,{title:"Params",value:e.params}),y.jsx(la,{title:"Query",value:e.query}),y.jsx(la,{title:"Headers",value:e.headers}),y.jsx(la,{title:"Body",value:e.body})]}),y.jsxs(Mf,{title:"Response",children:[y.jsx(la,{title:"Output",value:e.output}),e.error&&y.jsx(la,{title:"Error",value:e.error})]}),y.jsx(Mf,{title:"Cache",children:t.length?y.jsx(Se,{spacing:1.5,children:t.map(i=>y.jsx(Ude,{cache:i},i.id))}):y.jsx(S2,{text:"No cache activity for this request."})}),y.jsx(Mf,{title:"Logs",children:r.length?y.jsx(Se,{spacing:1,children:r.map(i=>y.jsx(Fde,{log:i},i.id))}):y.jsx(S2,{text:"No logs recorded for this request."})}),n&&y.jsx(Mf,{title:"Actions",children:y.jsx(Ut,{variant:"contained",startIcon:y.jsx(Rde,{}),onClick:()=>n(e),children:"Replay in Playground"})})]})}function Mf({title:e,children:t}){return y.jsxs(Se,{spacing:1,children:[y.jsx(ke,{variant:"subtitle1",children:e}),y.jsx(Se,{spacing:1,children:t})]})}function S2({text:e}){return y.jsx(ke,{variant:"body2",color:"text.secondary",children:e})}function Ude({cache:e}){return y.jsxs(Se,{spacing:1,sx:{p:1.5,borderRadius:2,border:"1px solid",borderColor:"divider",bgcolor:"background.default"},children:[y.jsxs(Se,{direction:{xs:"column",sm:"row"},spacing:1,alignItems:{xs:"flex-start",sm:"center"},justifyContent:"space-between",children:[y.jsxs(Se,{direction:"row",spacing:1,alignItems:"center",children:[y.jsx(sO,{operation:e.operation}),y.jsx(ke,{variant:"body2",sx:{fontFamily:"monospace"},children:e.name??"Cache entry"})]}),y.jsx(ke,{variant:"body2",color:"text.secondary",children:new Date(e.createdAt).toLocaleString()})]}),typeof e.size=="number"&&y.jsxs(ke,{variant:"caption",color:"text.secondary",children:["Size: ",e.size," bytes"]}),y.jsx(la,{title:"Value",value:e.value,collapsedLines:10})]})}function Fde({log:e}){return y.jsxs(Se,{direction:"row",spacing:1,alignItems:"flex-start",sx:{p:1.25,borderRadius:2,border:"1px solid",borderColor:"divider",bgcolor:"background.default"},children:[y.jsx(Ob,{level:e.level}),y.jsxs(Se,{spacing:.5,sx:{flex:1},children:[y.jsx(ke,{variant:"body2",children:Wde(e)}),y.jsx(ke,{variant:"caption",color:"text.secondary",children:new Date(e.createdAt).toLocaleString()})]})]})}function Wde(e){if(typeof e.meta=="string")return e.meta;if(e.meta&&typeof e.meta=="object"&&"message"in e.meta){const r=e.meta.message;return typeof r=="string"?r:JSON.stringify(r)}return JSON.stringify(e.meta)}function lO({open:e,request:t,requestId:r,onClose:n,onReplay:i,onPrev:o,onNext:a}){const l=(t==null?void 0:t.id)??r??"",c=m.useMemo(()=>({enabled:e&&!!l}),[e,l]),d=Un("GET /__rrroutes/requests/:requestId",c),{data:f,isLoading:p,error:g,refetch:v}=d.useEndpoint({params:{requestId:l}}),b=(f==null?void 0:f.out)??t;return y.jsx(aO,{open:e,onClose:n,title:t?`${t.method.toUpperCase()} ${t.path}`:"Request details",onPrev:o,onNext:a,children:y.jsxs(Se,{spacing:2,children:[p&&y.jsx(dh,{}),b?y.jsx(Bde,{request:b,caches:f==null?void 0:f.out.caches,logs:f==null?void 0:f.out.logs,onReplay:i}):y.jsx(ke,{color:"text.secondary",children:"Select a request to see details."}),g?y.jsx(Wa,{severity:"error",action:y.jsx(Ut,{color:"inherit",size:"small",onClick:()=>v(),children:"Retry"}),children:"Failed to load cache and log details."}):null]})})}function sr({title:e,actions:t,children:r,flex:n}){const i=!!(e||t);return y.jsx(i4,{sx:{bgcolor:"background.paper",flex:n},children:y.jsxs(gte,{children:[i&&y.jsxs(Se,{direction:{xs:"column",sm:"row"},alignItems:{xs:"flex-start",sm:"center"},justifyContent:"space-between",spacing:2,mb:2,children:[e&&y.jsx(ke,{variant:"h6",component:"h2",children:e}),t&&y.jsx(Pt,{children:t})]}),y.jsx(Pt,{children:r})]})})}const Hde=Mt(y.jsx("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}));function iv({schema:e,title:t}){return e?y.jsxs(Se,{spacing:1,children:[t&&y.jsx(ke,{variant:"subtitle2",color:"text.primary",children:t}),y.jsx(Kde,{schema:e})]}):y.jsxs(Se,{spacing:.5,children:[t&&y.jsx(ke,{variant:"subtitle2",color:"text.primary",children:t}),y.jsx(ke,{variant:"body2",color:"text.secondary",children:"No schema provided."})]})}function Kde({schema:e}){const[t,r]=m.useReducer((i,o)=>{switch(o.type){case"toggle":return{...i,[o.path]:o.value!==void 0?o.value:!i[o.path]};case"setAll":{const a={},l=(c,d)=>{DF(c)&&(a[d]=o.value),zF(c,d).forEach(({schema:f,path:p})=>l(f,p))};return l(e,"root"),a}default:return i}},{}),n=(i,o)=>{r({type:"toggle",path:i,value:o})};return y.jsxs(Se,{spacing:1,children:[y.jsxs(n4,{size:"small",children:[y.jsx(Ut,{onClick:()=>r({type:"setAll",value:!1}),children:"Expand all"}),y.jsx(Ut,{onClick:()=>r({type:"setAll",value:!0}),children:"Collapse all"})]}),y.jsx(NF,{schema:e,path:"root",depth:0,collapsed:t,toggle:n})]})}function NF({schema:e,path:t,depth:r,collapsed:n,toggle:i,propertyName:o}){const a=LF(e),l=e.optional||e.nullable,c=m.useMemo(()=>zF(e,t),[e,t]),d=DF(e),f=n[t];return y.jsx(Pt,{sx:{borderLeft:r?"1px solid":"none",borderColor:"rgba(255,255,255,0.08)",pl:r?2:0,ml:r?1:0,py:.75},children:y.jsxs(Se,{spacing:.25,children:[y.jsxs(Se,{direction:"row",spacing:1,alignItems:"center",flexWrap:"wrap",children:[d&&y.jsx(ei,{size:"small",onClick:()=>i(t),sx:{p:.25},children:f?y.jsx(ts,{fontSize:"small"}):y.jsx(Hde,{fontSize:"small"})}),o&&y.jsx(ke,{variant:"body2",sx:{fontFamily:"monospace",color:"text.primary"},children:o}),y.jsx(ke,{variant:"body2",color:"text.secondary",children:a}),l&&y.jsxs(Se,{direction:"row",spacing:.5,useFlexGap:!0,flexWrap:"wrap",children:[e.optional&&y.jsx(k2,{label:"optional"}),e.nullable&&y.jsx(k2,{label:"nullable"})]})]}),e.description&&y.jsx(ke,{variant:"caption",color:"text.secondary",children:e.description}),!f&&c.map(({schema:p,propertyName:g,path:v})=>y.jsx(NF,{schema:p,propertyName:g,path:v,depth:r+1,collapsed:n,toggle:i},v))]})})}function zF(e,t){var r;switch(e.kind){case"object":return e.properties?Object.entries(e.properties).map(([n,i])=>({schema:i,propertyName:n,path:`${t}.${n}`})):[];case"array":return e.element?[{schema:e.element,propertyName:"items",path:`${t}.items`}]:[];case"union":return((r=e.union)==null?void 0:r.map((n,i)=>({schema:n,propertyName:`option ${i+1}`,path:`${t}.option${i+1}`})))??[];default:return[]}}function DF(e){return["object","array","union"].includes(e.kind)}function LF(e){switch(e.kind){case"object":return"object";case"array":return`array<${e.element?LF(e.element):"unknown"}>`;case"enum":return"enum";case"union":return"union";case"literal":return"literal";default:return e.kind}}function k2({label:e}){return y.jsx(Pt,{component:"span",sx:{border:"1px solid",borderColor:"divider",borderRadius:1,px:.75,py:.25,fontSize:"0.7rem",textTransform:"uppercase",letterSpacing:.5,color:"text.secondary"},children:e})}const BF=Mt(y.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"})),kk=Mt(y.jsx("path",{d:"M8 5v14l11-7z"})),UF=Mt(y.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}));function FF({method:e,path:t,contract:r,summary:n,onOpenStandalone:i}){const{fetch:o}=Ed(),{addRun:a,getLastRun:l,consumePrefill:c}=Cb(),[d,f]=m.useState(null),[p,g]=m.useState(!1),[v,b]=m.useState(null),S=()=>({params:Og(r==null?void 0:r.params),query:Og(r==null?void 0:r.query),body:r!=null&&r.body?JSON.stringify({},null,2):""}),[w,k]=m.useState(S);m.useEffect(()=>{const E=c({method:e,path:t});k(E?{params:$2(Og(r==null?void 0:r.params),E.params),query:$2(Og(r==null?void 0:r.query),E.query),body:Vde(E.body,!!(r!=null&&r.body))}:S()),f(null),b(null)},[c,e,t]);const C=m.useMemo(()=>l({method:e,path:t,id:d}),[d,e,t,l]),P=async()=>{var A;let E;if(w.body)try{E=JSON.parse(w.body),b(null)}catch{b("Invalid JSON body");return}const _=`run-${Date.now()}`;f(_),g(!0);try{const T=await o(e,t,w,_),R=C2(w.params),N=C2(w.query);a({id:T.id,method:T.log.method,path:T.log.path,createdAt:T.log.createdAt,durationMs:T.log.durationMs,status:T.log.status,response:T.log.output,errorMessage:(A=T.error)==null?void 0:A.message,headers:T.log.headers,request:{params:R,query:N,body:E,headers:{}}})}catch(T){console.error("Playground run failed",T)}finally{g(!1)}},O=()=>{i==null||i(w)};return y.jsxs(Se,{spacing:3,children:[y.jsxs(Se,{spacing:.5,children:[y.jsxs(ke,{variant:"h6",children:[e.toUpperCase()," ",t]}),n?y.jsx(ke,{variant:"body2",color:"text.secondary",children:n}):null]}),y.jsx(ke,{variant:"body1",color:"text.secondary",children:"Execute this endpoint directly and inspect the response. Use the contract as a guide when filling params, query, and body."}),y.jsxs(Se,{spacing:2,children:[y.jsx(P2,{title:"Path parameters",rows:w.params,onChange:E=>k(_=>({..._,params:E}))}),y.jsx(P2,{title:"Query parameters",rows:w.query,onChange:E=>k(_=>({..._,query:E}))}),y.jsxs(ah,{defaultExpanded:!0,children:[y.jsx(lh,{expandIcon:y.jsx(ts,{}),children:y.jsx(ke,{variant:"subtitle1",children:"Body"})}),y.jsx(sh,{children:y.jsx(wr,{placeholder:"JSON body",multiline:!0,minRows:8,fullWidth:!0,value:w.body,onChange:E=>k(_=>({..._,body:E.target.value})),error:!!v,helperText:v||"Leave empty for no body"})})]})]}),y.jsxs(Se,{direction:"row",spacing:1,justifyContent:"flex-end",children:[i?y.jsx(Ut,{variant:"outlined",onClick:O,children:"Open playground screen"}):null,y.jsx(Ut,{variant:"contained",onClick:P,disabled:p,startIcon:y.jsx(kk,{}),children:p?"Running...":"Run"})]}),y.jsx(gp,{}),y.jsxs(Se,{spacing:2,children:[y.jsx(ke,{variant:"h6",children:"Last run"}),C?y.jsxs(Se,{spacing:2,children:[y.jsxs(Se,{direction:"row",spacing:2,alignItems:"center",children:[y.jsx(Eb,{status:C.status}),y.jsxs(ke,{variant:"body2",color:"text.secondary",children:["Duration: ",C.durationMs," ms"]}),y.jsxs(ke,{variant:"body2",color:"text.secondary",children:["Ran at ",new Date(C.createdAt).toLocaleTimeString()]})]}),C.errorMessage&&y.jsxs(ke,{color:"error",children:["Error: ",C.errorMessage]}),y.jsx(la,{value:C.response,title:"Response body"})]}):y.jsx(ke,{color:"text.secondary",children:"Run the endpoint to see output."})]})]})}function P2({title:e,rows:t,onChange:r}){const n=(a,l)=>{const c=t.map((d,f)=>f===a?{...d,...l}:d);r(c)},i=a=>{const l=t.filter((c,d)=>d!==a);r(l)},o=()=>{r([...t,{key:"",value:"",enabled:!0}])};return y.jsxs(ah,{defaultExpanded:!0,children:[y.jsx(lh,{expandIcon:y.jsx(ts,{}),children:y.jsx(ke,{variant:"subtitle1",children:e})}),y.jsx(sh,{children:y.jsxs(Se,{spacing:1.5,children:[t.length===0&&y.jsx(ke,{variant:"body2",color:"text.secondary",children:'No fields defined. Use "Add" to create one.'}),t.map((a,l)=>y.jsxs(Se,{direction:{xs:"column",sm:"row"},spacing:1,alignItems:"center",children:[y.jsx(jte,{checked:a.enabled,onChange:c=>n(l,{enabled:c.target.checked})}),y.jsx(wr,{label:"Key",value:a.key,onChange:c=>n(l,{key:c.target.value}),sx:{flexGrow:1}}),y.jsx(wr,{label:"Value",value:a.value,onChange:c=>n(l,{value:c.target.value}),sx:{flexGrow:2}}),y.jsx(ei,{onClick:()=>i(l),children:y.jsx(UF,{})})]},`${a.key}-${l}`)),y.jsx(Ut,{size:"small",variant:"outlined",startIcon:y.jsx(BF,{}),onClick:o,sx:{alignSelf:"flex-start"},children:"Add field"})]})})]})}function $2(e,t){if(!t)return e;const r=e.map(o=>{const a=t[o.key];return a==null?o:{...o,value:String(a),enabled:!0}}),n=new Set(e.map(o=>o.key)),i=Object.entries(t).filter(([o])=>!n.has(o)).map(([o,a])=>({key:o,value:a==null?"":String(a),enabled:!0}));return[...r,...i]}function Og(e){return e?e.kind==="object"&&e.properties?Object.keys(e.properties).map(t=>({key:t,value:"",enabled:!0})):[]:[]}function C2(e){return e.reduce((t,r)=>(r.enabled&&r.key.trim()&&(t[r.key.trim()]=r.value),t),{})}function Vde(e,t){if(e==null)return t?JSON.stringify({},null,2):"";if(typeof e=="string")return e;try{return JSON.stringify(e,null,2)}catch{return t?JSON.stringify({},null,2):""}}function WF({requests:e,onSelect:t}){return y.jsx(lb,{component:ai,variant:"outlined",children:y.jsxs(ob,{size:"small",children:[y.jsx(ub,{children:y.jsxs(al,{children:[y.jsx(Ot,{children:"Timestamp"}),y.jsx(Ot,{children:"Method"}),y.jsx(Ot,{children:"Path"}),y.jsx(Ot,{children:"Status"}),y.jsx(Ot,{align:"right",children:"Duration"})]})}),y.jsx(sb,{children:e.map((r,n)=>y.jsxs(al,{hover:!0,sx:{cursor:"pointer"},onClick:()=>t(r,n),children:[y.jsx(Ot,{children:new Date(r.createdAt).toLocaleString()}),y.jsx(Ot,{children:y.jsx(_d,{method:r.method})}),y.jsx(Ot,{sx:{fontFamily:"monospace"},children:r.path}),y.jsx(Ot,{children:y.jsx(Eb,{status:r.status})}),y.jsxs(Ot,{align:"right",children:[r.durationMs," ms"]})]},r.id))})]})})}const qde=30,O2=10;function Zde({endpointKey:e,onSelectRequest:t,onRequestsChange:r}){const[n,i]=m.useState(!1),o=Un("GET /__rrroutes/requests",{cursorParam:"cursor",getNextPageParam(w){var k;return(k=w.meta)==null?void 0:k.nextCursor},enabled:!!e}),{data:a,isLoading:l,error:c,refetch:d,fetchNextPage:f,hasNextPage:p,isFetchingNextPage:g}=o.useEndpoint({query:{endpointKeys:e?[e]:void 0,pageSize:qde}});m.useEffect(()=>{i(!1)},[e]);const v=m.useMemo(()=>a?(Array.isArray(a.pages)?a.pages:[]).flatMap(k=>Array.isArray(k==null?void 0:k.out)?k.out:[]).sort((k,C)=>C.createdAt-k.createdAt):[],[a]);m.useEffect(()=>{r==null||r(v)},[v,r]);const b=n?v:v.slice(0,O2),S=(w,k)=>{const C=n?k:v.findIndex(P=>P.id===w.id);t(w,C>=0?C:k)};return y.jsx(sr,{title:"Requests feed",actions:v.length>O2?y.jsx(Ut,{size:"small",onClick:()=>i(w=>!w),startIcon:y.jsx(ts,{}),children:n?"Collapse":"Show more"}):null,children:y.jsxs(Se,{spacing:2,children:[(l||g)&&y.jsx(dh,{}),c?y.jsxs(ah,{defaultExpanded:!0,children:[y.jsx(lh,{expandIcon:y.jsx(ts,{}),children:y.jsx(ke,{color:"error",children:"Failed to load requests"})}),y.jsx(sh,{children:y.jsxs(Se,{spacing:1,children:[y.jsx(ke,{variant:"body2",color:"text.secondary",children:c instanceof Error?c.message:"Unable to fetch request feed."}),y.jsx(Ut,{size:"small",onClick:()=>d(),children:"Retry"})]})})]}):null,e?v.length===0&&!l?y.jsx(Pt,{sx:{py:3},children:y.jsx(ke,{variant:"body2",color:"text.secondary",align:"center",children:"No recent requests for this endpoint."})}):y.jsx(WF,{requests:b,onSelect:S}):y.jsx(ke,{variant:"body2",color:"text.secondary",children:"Endpoint identifier missing."}),n&&p?y.jsx(Ut,{size:"small",onClick:()=>f(),disabled:g,children:g?"Loading…":"Load more"}):null]})})}function Gde({endpoint:e}){return y.jsxs(Se,{spacing:1,children:[y.jsxs(Se,{direction:"row",spacing:1.5,alignItems:"center",flexWrap:"wrap",useFlexGap:!0,children:[y.jsx(_d,{method:e.method}),y.jsx(ke,{variant:"h6",sx:{fontFamily:"monospace",color:"text.primary"},children:e.path}),y.jsx(ri,{label:e.stability,size:"small",color:"secondary",sx:{textTransform:"capitalize"}})]}),e.summary&&y.jsx(ke,{variant:"body2",color:"text.secondary",children:e.summary})]})}var Yde=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function uO(e){if(typeof e!="string")return!1;var t=Yde;return t.includes(e)}var Xde=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],Qde=new Set(Xde);function HF(e){return typeof e!="string"?!1:Qde.has(e)}function KF(e){return typeof e=="string"&&e.startsWith("data-")}function Si(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(HF(r)||KF(r))&&(t[r]=e[r]);return t}function Cu(e){if(e==null)return null;if(m.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return Si(t)}return typeof e=="object"&&!Array.isArray(e)?Si(e):null}function ii(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(HF(r)||KF(r)||uO(r))&&(t[r]=e[r]);return t}function Jde(e){return e==null?null:m.isValidElement(e)?ii(e.props):typeof e=="object"&&!Array.isArray(e)?ii(e):null}var efe=["children","width","height","viewBox","className","style","title","desc"];function Pk(){return Pk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pk.apply(null,arguments)}function tfe(e,t){if(e==null)return{};var r,n,i=rfe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function rfe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var cO=m.forwardRef((e,t)=>{var{children:r,width:n,height:i,viewBox:o,className:a,style:l,title:c,desc:d}=e,f=tfe(e,efe),p=o||{width:n,height:i,x:0,y:0},g=me("recharts-surface",a);return m.createElement("svg",Pk({},ii(f),{className:g,width:n,height:i,style:l,viewBox:"".concat(p.x," ").concat(p.y," ").concat(p.width," ").concat(p.height),ref:t}),m.createElement("title",null,c),m.createElement("desc",null,d),r)}),nfe=["children","className"];function $k(){return $k=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$k.apply(null,arguments)}function ife(e,t){if(e==null)return{};var r,n,i=ofe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function ofe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Kr=m.forwardRef((e,t)=>{var{children:r,className:n}=e,i=ife(e,nfe),o=me("recharts-layer",n);return m.createElement("g",$k({className:o},ii(i),{ref:t}),r)}),VF=m.createContext(null),afe=()=>m.useContext(VF);function fr(e){return function(){return e}}const qF=Math.cos,zv=Math.sin,Go=Math.sqrt,Dv=Math.PI,_b=2*Dv,Ck=Math.PI,Ok=2*Ck,Fl=1e-6,sfe=Ok-Fl;function ZF(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function lfe(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return ZF;const r=10**t;return function(n){this._+=n[0];for(let i=1,o=n.length;i<o;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class ufe{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?ZF:lfe(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,o,a){this._append`C${+t},${+r},${+n},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(t,r,n,i,o){if(t=+t,r=+r,n=+n,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,l=this._y1,c=n-t,d=i-r,f=a-t,p=l-r,g=f*f+p*p;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(g>Fl)if(!(Math.abs(p*c-d*f)>Fl)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let v=n-a,b=i-l,S=c*c+d*d,w=v*v+b*b,k=Math.sqrt(S),C=Math.sqrt(g),P=o*Math.tan((Ck-Math.acos((S+g-w)/(2*k*C)))/2),O=P/C,E=P/k;Math.abs(O-1)>Fl&&this._append`L${t+O*f},${r+O*p}`,this._append`A${o},${o},0,0,${+(p*v>f*b)},${this._x1=t+E*c},${this._y1=r+E*d}`}}arc(t,r,n,i,o,a){if(t=+t,r=+r,n=+n,a=!!a,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(i),c=n*Math.sin(i),d=t+l,f=r+c,p=1^a,g=a?i-o:o-i;this._x1===null?this._append`M${d},${f}`:(Math.abs(this._x1-d)>Fl||Math.abs(this._y1-f)>Fl)&&this._append`L${d},${f}`,n&&(g<0&&(g=g%Ok+Ok),g>sfe?this._append`A${n},${n},0,1,${p},${t-l},${r-c}A${n},${n},0,1,${p},${this._x1=d},${this._y1=f}`:g>Fl&&this._append`A${n},${n},0,${+(g>=Ck)},${p},${this._x1=t+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function dO(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new ufe(t)}function fO(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function GF(e){this._context=e}GF.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Ib(e){return new GF(e)}function YF(e){return e[0]}function XF(e){return e[1]}function QF(e,t){var r=fr(!0),n=null,i=Ib,o=null,a=dO(l);e=typeof e=="function"?e:e===void 0?YF:fr(e),t=typeof t=="function"?t:t===void 0?XF:fr(t);function l(c){var d,f=(c=fO(c)).length,p,g=!1,v;for(n==null&&(o=i(v=a())),d=0;d<=f;++d)!(d<f&&r(p=c[d],d,c))===g&&((g=!g)?o.lineStart():o.lineEnd()),g&&o.point(+e(p,d,c),+t(p,d,c));if(v)return o=null,v+""||null}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:fr(+c),l):e},l.y=function(c){return arguments.length?(t=typeof c=="function"?c:fr(+c),l):t},l.defined=function(c){return arguments.length?(r=typeof c=="function"?c:fr(!!c),l):r},l.curve=function(c){return arguments.length?(i=c,n!=null&&(o=i(n)),l):i},l.context=function(c){return arguments.length?(c==null?n=o=null:o=i(n=c),l):n},l}function Eg(e,t,r){var n=null,i=fr(!0),o=null,a=Ib,l=null,c=dO(d);e=typeof e=="function"?e:e===void 0?YF:fr(+e),t=typeof t=="function"?t:fr(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?XF:fr(+r);function d(p){var g,v,b,S=(p=fO(p)).length,w,k=!1,C,P=new Array(S),O=new Array(S);for(o==null&&(l=a(C=c())),g=0;g<=S;++g){if(!(g<S&&i(w=p[g],g,p))===k)if(k=!k)v=g,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),b=g-1;b>=v;--b)l.point(P[b],O[b]);l.lineEnd(),l.areaEnd()}k&&(P[g]=+e(w,g,p),O[g]=+t(w,g,p),l.point(n?+n(w,g,p):P[g],r?+r(w,g,p):O[g]))}if(C)return l=null,C+""||null}function f(){return QF().defined(i).curve(a).context(o)}return d.x=function(p){return arguments.length?(e=typeof p=="function"?p:fr(+p),n=null,d):e},d.x0=function(p){return arguments.length?(e=typeof p=="function"?p:fr(+p),d):e},d.x1=function(p){return arguments.length?(n=p==null?null:typeof p=="function"?p:fr(+p),d):n},d.y=function(p){return arguments.length?(t=typeof p=="function"?p:fr(+p),r=null,d):t},d.y0=function(p){return arguments.length?(t=typeof p=="function"?p:fr(+p),d):t},d.y1=function(p){return arguments.length?(r=p==null?null:typeof p=="function"?p:fr(+p),d):r},d.lineX0=d.lineY0=function(){return f().x(e).y(t)},d.lineY1=function(){return f().x(e).y(r)},d.lineX1=function(){return f().x(n).y(t)},d.defined=function(p){return arguments.length?(i=typeof p=="function"?p:fr(!!p),d):i},d.curve=function(p){return arguments.length?(a=p,o!=null&&(l=a(o)),d):a},d.context=function(p){return arguments.length?(p==null?o=l=null:l=a(o=p),d):o},d}class JF{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function cfe(e){return new JF(e,!0)}function dfe(e){return new JF(e,!1)}const pO={draw(e,t){const r=Go(t/Dv);e.moveTo(r,0),e.arc(0,0,r,0,_b)}},ffe={draw(e,t){const r=Go(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},e3=Go(1/3),pfe=e3*2,hfe={draw(e,t){const r=Go(t/pfe),n=r*e3;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},mfe={draw(e,t){const r=Go(t),n=-r/2;e.rect(n,n,r,r)}},gfe=.8908130915292852,t3=zv(Dv/10)/zv(7*Dv/10),vfe=zv(_b/10)*t3,yfe=-qF(_b/10)*t3,bfe={draw(e,t){const r=Go(t*gfe),n=vfe*r,i=yfe*r;e.moveTo(0,-r),e.lineTo(n,i);for(let o=1;o<5;++o){const a=_b*o/5,l=qF(a),c=zv(a);e.lineTo(c*r,-l*r),e.lineTo(l*n-c*i,c*n+l*i)}e.closePath()}},Ew=Go(3),xfe={draw(e,t){const r=-Go(t/(Ew*3));e.moveTo(0,r*2),e.lineTo(-Ew*r,-r),e.lineTo(Ew*r,-r),e.closePath()}},Ji=-.5,eo=Go(3)/2,Ek=1/Go(12),wfe=(Ek/2+1)*3,Sfe={draw(e,t){const r=Go(t/wfe),n=r/2,i=r*Ek,o=n,a=r*Ek+r,l=-o,c=a;e.moveTo(n,i),e.lineTo(o,a),e.lineTo(l,c),e.lineTo(Ji*n-eo*i,eo*n+Ji*i),e.lineTo(Ji*o-eo*a,eo*o+Ji*a),e.lineTo(Ji*l-eo*c,eo*l+Ji*c),e.lineTo(Ji*n+eo*i,Ji*i-eo*n),e.lineTo(Ji*o+eo*a,Ji*a-eo*o),e.lineTo(Ji*l+eo*c,Ji*c-eo*l),e.closePath()}};function kfe(e,t){let r=null,n=dO(i);e=typeof e=="function"?e:fr(e||pO),t=typeof t=="function"?t:fr(t===void 0?64:+t);function i(){let o;if(r||(r=o=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),o)return r=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:fr(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:fr(+o),i):t},i.context=function(o){return arguments.length?(r=o??null,i):r},i}function Lv(){}function Bv(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function r3(e){this._context=e}r3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Bv(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Bv(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Pfe(e){return new r3(e)}function n3(e){this._context=e}n3.prototype={areaStart:Lv,areaEnd:Lv,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Bv(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function $fe(e){return new n3(e)}function i3(e){this._context=e}i3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Bv(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Cfe(e){return new i3(e)}function o3(e){this._context=e}o3.prototype={areaStart:Lv,areaEnd:Lv,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Ofe(e){return new o3(e)}function E2(e){return e<0?-1:1}function _2(e,t,r){var n=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(n||i<0&&-0),a=(r-e._y1)/(i||n<0&&-0),l=(o*i+a*n)/(n+i);return(E2(o)+E2(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(l))||0}function I2(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function _w(e,t,r){var n=e._x0,i=e._y0,o=e._x1,a=e._y1,l=(o-n)/3;e._context.bezierCurveTo(n+l,i+l*t,o-l,a-l*r,o,a)}function Uv(e){this._context=e}Uv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:_w(this,this._t0,I2(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,_w(this,I2(this,r=_2(this,e,t)),r);break;default:_w(this,this._t0,r=_2(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function a3(e){this._context=new s3(e)}(a3.prototype=Object.create(Uv.prototype)).point=function(e,t){Uv.prototype.point.call(this,t,e)};function s3(e){this._context=e}s3.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,o){this._context.bezierCurveTo(t,e,n,r,o,i)}};function Efe(e){return new Uv(e)}function _fe(e){return new a3(e)}function l3(e){this._context=e}l3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=j2(e),i=j2(t),o=0,a=1;a<r;++o,++a)this._context.bezierCurveTo(n[0][o],i[0][o],n[1][o],i[1][o],e[a],t[a]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function j2(e){var t,r=e.length-1,n,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,a[t]-=n*a[t-1];for(i[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function Ife(e){return new l3(e)}function jb(e,t){this._context=e,this._t=t}jb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function jfe(e){return new jb(e,.5)}function Afe(e){return new jb(e,0)}function Tfe(e){return new jb(e,1)}function ad(e,t){if((a=e.length)>1)for(var r=1,n,i,o=e[t[0]],a,l=o.length;r<a;++r)for(i=o,o=e[t[r]],n=0;n<l;++n)o[n][1]+=o[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function _k(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function Rfe(e,t){return e[t]}function Mfe(e){const t=[];return t.key=e,t}function Nfe(){var e=fr([]),t=_k,r=ad,n=Rfe;function i(o){var a=Array.from(e.apply(this,arguments),Mfe),l,c=a.length,d=-1,f;for(const p of o)for(l=0,++d;l<c;++l)(a[l][d]=[0,+n(p,a[l].key,d,o)]).data=p;for(l=0,f=fO(t(a));l<c;++l)a[f[l]].index=l;return r(a,f),a}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:fr(Array.from(o)),i):e},i.value=function(o){return arguments.length?(n=typeof o=="function"?o:fr(+o),i):n},i.order=function(o){return arguments.length?(t=o==null?_k:typeof o=="function"?o:fr(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(r=o??ad,i):r},i}function zfe(e,t){if((n=e.length)>0){for(var r,n,i=0,o=e[0].length,a;i<o;++i){for(a=r=0;r<n;++r)a+=e[r][i][1]||0;if(a)for(r=0;r<n;++r)e[r][i][1]/=a}ad(e,t)}}function Dfe(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,o=n.length;r<o;++r){for(var a=0,l=0;a<i;++a)l+=e[a][r][1]||0;n[r][1]+=n[r][0]=-l/2}ad(e,t)}}function Lfe(e,t){if(!(!((a=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,o,a;n<o;++n){for(var l=0,c=0,d=0;l<a;++l){for(var f=e[t[l]],p=f[n][1]||0,g=f[n-1][1]||0,v=(p-g)/2,b=0;b<l;++b){var S=e[t[b]],w=S[n][1]||0,k=S[n-1][1]||0;v+=w-k}c+=p,d+=v*p}i[n-1][1]+=i[n-1][0]=r,c&&(r-=d/c)}i[n-1][1]+=i[n-1][0]=r,ad(e,t)}}var Iw={},jw={},A2;function Bfe(){return A2||(A2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(jw)),jw}var Aw={},T2;function u3(){return T2||(T2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){switch(typeof r){case"number":case"symbol":return!1;case"string":return r.includes(".")||r.includes("[")||r.includes("]")}}e.isDeepKey=t})(Aw)),Aw}var Tw={},R2;function hO(){return R2||(R2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){var n;return typeof r=="string"||typeof r=="symbol"?r:Object.is((n=r==null?void 0:r.valueOf)==null?void 0:n.call(r),-0)?"-0":String(r)}e.toKey=t})(Tw)),Tw}var Rw={},Mw={},M2;function Ufe(){return M2||(M2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){if(r==null)return"";if(typeof r=="string")return r;if(Array.isArray(r))return r.map(t).join(",");const n=String(r);return n==="0"&&Object.is(Number(r),-0)?"-0":n}e.toString=t})(Mw)),Mw}var N2;function mO(){return N2||(N2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ufe(),r=hO();function n(i){if(Array.isArray(i))return i.map(r.toKey);if(typeof i=="symbol")return[i];i=t.toString(i);const o=[],a=i.length;if(a===0)return o;let l=0,c="",d="",f=!1;for(i.charCodeAt(0)===46&&(o.push(""),l++);l<a;){const p=i[l];d?p==="\\"&&l+1<a?(l++,c+=i[l]):p===d?d="":c+=p:f?p==='"'||p==="'"?d=p:p==="]"?(f=!1,o.push(c),c=""):c+=p:p==="["?(f=!0,c&&(o.push(c),c="")):p==="."?c&&(o.push(c),c=""):c+=p,l++}return c&&o.push(c),o}e.toPath=n})(Rw)),Rw}var z2;function gO(){return z2||(z2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Bfe(),r=u3(),n=hO(),i=mO();function o(l,c,d){if(l==null)return d;switch(typeof c){case"string":{if(t.isUnsafeProperty(c))return d;const f=l[c];return f===void 0?r.isDeepKey(c)?o(l,i.toPath(c),d):d:f}case"number":case"symbol":{typeof c=="number"&&(c=n.toKey(c));const f=l[c];return f===void 0?d:f}default:{if(Array.isArray(c))return a(l,c,d);if(Object.is(c==null?void 0:c.valueOf(),-0)?c="-0":c=String(c),t.isUnsafeProperty(c))return d;const f=l[c];return f===void 0?d:f}}}function a(l,c,d){if(c.length===0)return d;let f=l;for(let p=0;p<c.length;p++){if(f==null||t.isUnsafeProperty(c[p]))return d;f=f[c[p]]}return f===void 0?d:f}e.get=o})(Iw)),Iw}var Nw,D2;function Ffe(){return D2||(D2=1,Nw=gO().get),Nw}var Wfe=Ffe();const Ou=wa(Wfe);var Pn=e=>e===0?0:e>0?1:-1,ho=e=>typeof e=="number"&&e!=+e,rs=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,Ke=e=>(typeof e=="number"||e instanceof Number)&&!ho(e),ya=e=>Ke(e)||typeof e=="string",Hfe=0,kp=e=>{var t=++Hfe;return"".concat(e||"").concat(t)},Fn=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ke(t)&&typeof t!="string")return n;var o;if(rs(t)){if(r==null)return n;var a=t.indexOf("%");o=r*parseFloat(t.slice(0,a))/100}else o=+t;return ho(o)&&(o=n),i&&r!=null&&o>r&&(o=r),o},c3=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(!r[e[n]])r[e[n]]=!0;else return!0;return!1};function xr(e,t,r){return Ke(e)&&Ke(t)?e+r*(t-e):t}function d3(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):Ou(n,t))===r)}var Tr=e=>e===null||typeof e>"u",_h=e=>Tr(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Kfe(e){return e!=null}function Ih(){}var Vfe=["type","size","sizeType"];function Ik(){return Ik=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ik.apply(null,arguments)}function L2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function B2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?L2(Object(r),!0).forEach(function(n){qfe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qfe(e,t,r){return(t=Zfe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zfe(e){var t=Gfe(e,"string");return typeof t=="symbol"?t:t+""}function Gfe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Yfe(e,t){if(e==null)return{};var r,n,i=Xfe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Xfe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var f3={symbolCircle:pO,symbolCross:ffe,symbolDiamond:hfe,symbolSquare:mfe,symbolStar:bfe,symbolTriangle:xfe,symbolWye:Sfe},Qfe=Math.PI/180,Jfe=e=>{var t="symbol".concat(_h(e));return f3[t]||pO},epe=(e,t,r)=>{if(t==="area")return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var n=18*Qfe;return 1.25*e*e*(Math.tan(n)-Math.tan(n*2)*Math.tan(n)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},tpe=(e,t)=>{f3["symbol".concat(_h(e))]=t},vO=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,i=Yfe(e,Vfe),o=B2(B2({},i),{},{type:t,size:r,sizeType:n}),a="circle";typeof t=="string"&&(a=t);var l=()=>{var g=Jfe(a),v=kfe().type(g).size(epe(r,n,a)),b=v();if(b!==null)return b},{className:c,cx:d,cy:f}=o,p=ii(o);return Ke(d)&&Ke(f)&&Ke(r)?m.createElement("path",Ik({},p,{className:me("recharts-symbols",c),transform:"translate(".concat(d,", ").concat(f,")"),d:l()})):null};vO.registerSymbol=tpe;var p3=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,yO=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(m.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{uO(i)&&(n[i]=(o=>r[i](r,o)))}),n},rpe=(e,t,r)=>n=>(e(t,r,n),null),jh=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var o=e[i];uO(i)&&typeof o=="function"&&(n||(n={}),n[i]=rpe(o,t,r))}),n};function U2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function npe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?U2(Object(r),!0).forEach(function(n){ipe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ipe(e,t,r){return(t=ope(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ope(e){var t=ape(e,"string");return typeof t=="symbol"?t:t+""}function ape(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nn(e,t){var r=npe({},e),n=t,i=Object.keys(t),o=i.reduce((a,l)=>(a[l]===void 0&&n[l]!==void 0&&(a[l]=n[l]),a),r);return o}function Fv(){return Fv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Fv.apply(null,arguments)}function F2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function spe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?F2(Object(r),!0).forEach(function(n){lpe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lpe(e,t,r){return(t=upe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function upe(e){var t=cpe(e,"string");return typeof t=="symbol"?t:t+""}function cpe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var no=32,dpe={align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle"};function fpe(e){var{data:t,iconType:r,inactiveColor:n}=e,i=no/2,o=no/6,a=no/3,l=t.inactive?n:t.color,c=r??t.type;if(c==="none")return null;if(c==="plainline"){var d;return m.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:(d=t.payload)===null||d===void 0?void 0:d.strokeDasharray,x1:0,y1:i,x2:no,y2:i,className:"recharts-legend-icon"})}if(c==="line")return m.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(i,"h").concat(a,`
313
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const w of this.seen.entries()){const k=w[1];if(t===w[0]){a(w);continue}if(n.external){const P=(p=n.external.registry.get(w[0]))==null?void 0:p.id;if(t!==w[0]&&P){a(w);continue}}if((g=this.metadataRegistry.get(w[0]))==null?void 0:g.id){a(w);continue}if(k.cycle){a(w);continue}if(k.count>1&&n.reused==="ref"){a(w);continue}}const l=(w,k)=>{const C=this.seen.get(w),P=C.def??C.schema,O={...P};if(C.ref===null)return;const E=C.ref;if(C.ref=null,E){l(E,k);const _=this.seen.get(E).schema;_.$ref&&(k.target==="draft-7"||k.target==="draft-4"||k.target==="openapi-3.0")?(P.allOf=P.allOf??[],P.allOf.push(_)):(Object.assign(P,_),Object.assign(P,O))}C.isParent||this.override({zodSchema:w,jsonSchema:P,path:C.path??[]})};for(const w of[...this.seen.entries()].reverse())l(w[0],{target:this.target});const c={};if(this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":this.target==="draft-4"?c.$schema="http://json-schema.org/draft-04/schema#":this.target==="openapi-3.0"||console.warn(`Invalid target: ${this.target}`),(v=n.external)!=null&&v.uri){const w=(b=n.external.registry.get(t))==null?void 0:b.id;if(!w)throw new Error("Schema is missing an `id` property");c.$id=n.external.uri(w)}Object.assign(c,i.def);const d=((S=n.external)==null?void 0:S.defs)??{};for(const w of this.seen.entries()){const k=w[1];k.def&&k.defId&&(d[k.defId]=k.def)}n.external||Object.keys(d).length>0&&(this.target==="draft-2020-12"?c.$defs=d:c.definitions=d);try{return JSON.parse(JSON.stringify(c))}catch{throw new Error("Error converting schema to JSON.")}}}function eU(e,t){if(e instanceof U$){const n=new J1(t),i={};for(const l of e._idmap.entries()){const[c,d]=l;n.process(d)}const o={},a={registry:e,uri:t==null?void 0:t.uri,defs:i};for(const l of e._idmap.entries()){const[c,d]=l;o[c]=n.emit(d,{...t,external:a})}if(Object.keys(i).length>0){const l=n.target==="draft-2020-12"?"$defs":"definitions";o.__shared={[l]:i}}return{schemas:o}}const r=new J1(t);return r.process(e),r.emit(e,t)}function Zn(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return Zn(n.element,r);if(n.type==="set")return Zn(n.valueType,r);if(n.type==="lazy")return Zn(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return Zn(n.innerType,r);if(n.type==="intersection")return Zn(n.left,r)||Zn(n.right,r);if(n.type==="record"||n.type==="map")return Zn(n.keyType,r)||Zn(n.valueType,r);if(n.type==="pipe")return Zn(n.in,r)||Zn(n.out,r);if(n.type==="object"){for(const i in n.shape)if(Zn(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(const i of n.options)if(Zn(i,r))return!0;return!1}if(n.type==="tuple"){for(const i of n.items)if(Zn(i,r))return!0;return!!(n.rest&&Zn(n.rest,r))}return!1}const Zle=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Gle=Object.freeze(Object.defineProperty({__proto__:null,$ZodAny:k5,$ZodArray:E5,$ZodAsyncError:cu,$ZodBase64:d5,$ZodBase64URL:p5,$ZodBigInt:z$,$ZodBigIntFormat:b5,$ZodBoolean:N$,$ZodCIDRv4:u5,$ZodCIDRv6:c5,$ZodCUID:X6,$ZodCUID2:Q6,$ZodCatch:Z5,$ZodCheck:Er,$ZodCheckBigIntFormat:O6,$ZodCheckEndsWith:L6,$ZodCheckGreaterThan:T$,$ZodCheckIncludes:z6,$ZodCheckLengthEquals:T6,$ZodCheckLessThan:A$,$ZodCheckLowerCase:M6,$ZodCheckMaxLength:j6,$ZodCheckMaxSize:E6,$ZodCheckMimeType:U6,$ZodCheckMinLength:A6,$ZodCheckMinSize:_6,$ZodCheckMultipleOf:$6,$ZodCheckNumberFormat:C6,$ZodCheckOverwrite:F6,$ZodCheckProperty:B6,$ZodCheckRegex:R6,$ZodCheckSizeEquals:I6,$ZodCheckStartsWith:D6,$ZodCheckStringFormat:bh,$ZodCheckUpperCase:N6,$ZodCodec:B$,$ZodCustom:rB,$ZodCustomStringFormat:v5,$ZodDate:O5,$ZodDefault:H5,$ZodDiscriminatedUnion:T5,$ZodE164:h5,$ZodEmail:q6,$ZodEmoji:G6,$ZodEncodeError:cb,$ZodEnum:D5,$ZodError:b$,$ZodFile:B5,$ZodFunction:J5,$ZodGUID:K6,$ZodIPv4:a5,$ZodIPv6:s5,$ZodISODate:n5,$ZodISODateTime:r5,$ZodISODuration:o5,$ZodISOTime:i5,$ZodIntersection:R5,$ZodJWT:g5,$ZodKSUID:t5,$ZodLazy:tB,$ZodLiteral:L5,$ZodMAC:l5,$ZodMap:N5,$ZodNaN:G5,$ZodNanoID:Y6,$ZodNever:$5,$ZodNonOptional:V5,$ZodNull:S5,$ZodNullable:W5,$ZodNumber:M$,$ZodNumberFormat:y5,$ZodObject:j5,$ZodObjectJIT:A5,$ZodOptional:F5,$ZodPipe:Y5,$ZodPrefault:K5,$ZodPromise:eB,$ZodReadonly:X5,$ZodRealError:Hi,$ZodRecord:M5,$ZodRegistry:U$,$ZodSet:z5,$ZodString:xh,$ZodStringFormat:cr,$ZodSuccess:q5,$ZodSymbol:x5,$ZodTemplateLiteral:Q5,$ZodTransform:U5,$ZodTuple:L$,$ZodType:wt,$ZodULID:J6,$ZodURL:Z6,$ZodUUID:V6,$ZodUndefined:w5,$ZodUnion:D$,$ZodUnknown:P5,$ZodVoid:C5,$ZodXID:e5,$brand:b4,$constructor:re,$input:lB,$output:sB,Doc:W6,JSONSchema:Zle,JSONSchemaGenerator:J1,NEVER:y4,TimePrecision:fB,_any:TB,_array:KB,_base64:oC,_base64url:aC,_bigint:CB,_boolean:PB,_catch:Fle,_check:YB,_cidrv4:nC,_cidrv6:iC,_coercedBigint:OB,_coercedBoolean:$B,_coercedDate:DB,_coercedNumber:yB,_coercedString:cB,_cuid:Y$,_cuid2:X$,_custom:qB,_date:zB,_decode:k$,_decodeAsync:$$,_default:Lle,_discriminatedUnion:Ole,_e164:sC,_email:W$,_emoji:Z$,_encode:S$,_encodeAsync:P$,_endsWith:mC,_enum:Tle,_file:VB,_float32:xB,_float64:wB,_gt:wu,_gte:Mi,_guid:Ov,_includes:pC,_int:bB,_int32:SB,_int64:EB,_intersection:Ele,_ipv4:tC,_ipv6:rC,_isoDate:hB,_isoDateTime:pB,_isoDuration:gB,_isoTime:mB,_jwt:lC,_ksuid:eC,_lazy:Vle,_length:yb,_literal:Mle,_lowercase:dC,_lt:xu,_lte:Fo,_mac:dB,_map:jle,_max:Fo,_maxLength:vb,_maxSize:gb,_mime:gC,_min:Mi,_minLength:rd,_minSize:bp,_multipleOf:yp,_nan:LB,_nanoid:G$,_nativeEnum:Rle,_negative:UB,_never:MB,_nonnegative:WB,_nonoptional:Ble,_nonpositive:FB,_normalize:vC,_null:AB,_nullable:Dle,_number:vB,_optional:zle,_overwrite:xl,_parse:ph,_parseAsync:hh,_pipe:Wle,_positive:BB,_promise:qle,_property:HB,_readonly:Hle,_record:Ile,_refine:ZB,_regex:cC,_safeDecode:O$,_safeDecodeAsync:_$,_safeEncode:C$,_safeEncodeAsync:E$,_safeParse:mh,_safeParseAsync:gh,_set:Ale,_size:uC,_slugify:wC,_startsWith:hC,_string:uB,_stringFormat:wh,_stringbool:JB,_success:Ule,_superRefine:GB,_symbol:IB,_templateLiteral:Kle,_toLowerCase:bC,_toUpperCase:xC,_transform:Nle,_trim:yC,_tuple:_le,_uint32:kB,_uint64:_B,_ulid:Q$,_undefined:jB,_union:Cle,_unknown:RB,_uppercase:fC,_url:mb,_uuid:H$,_uuidv4:K$,_uuidv6:V$,_uuidv7:q$,_void:NB,_xid:J$,clone:xo,config:ni,decode:sae,decodeAsync:uae,describe:XB,encode:aae,encodeAsync:lae,flattenError:x$,formatError:w$,globalConfig:kv,globalRegistry:Lo,isValidBase64:R$,isValidBase64URL:f5,isValidJWT:m5,locales:aB,meta:QB,parse:Y1,parseAsync:X1,prettifyError:B4,regexes:j$,registry:F$,safeDecode:dae,safeDecodeAsync:pae,safeEncode:cae,safeEncodeAsync:fae,safeParse:U4,safeParseAsync:F4,toDotPath:L4,toJSONSchema:eU,treeifyError:D4,util:N4,version:H6},Symbol.toStringTag,{value:"Module"})),SC=re("ZodISODateTime",(e,t)=>{r5.init(e,t),hr.init(e,t)});function tU(e){return pB(SC,e)}const kC=re("ZodISODate",(e,t)=>{n5.init(e,t),hr.init(e,t)});function rU(e){return hB(kC,e)}const PC=re("ZodISOTime",(e,t)=>{i5.init(e,t),hr.init(e,t)});function nU(e){return mB(PC,e)}const $C=re("ZodISODuration",(e,t)=>{o5.init(e,t),hr.init(e,t)});function iU(e){return gB($C,e)}const Yle=Object.freeze(Object.defineProperty({__proto__:null,ZodISODate:kC,ZodISODateTime:SC,ZodISODuration:$C,ZodISOTime:PC,date:rU,datetime:tU,duration:iU,time:nU},Symbol.toStringTag,{value:"Module"})),oU=(e,t)=>{b$.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>w$(e,r)},flatten:{value:r=>x$(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Pv,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Pv,2)}},isEmpty:{get(){return e.issues.length===0}}})},Xle=re("ZodError",oU),Ki=re("ZodError",oU,{Parent:Error}),aU=ph(Ki),sU=hh(Ki),lU=mh(Ki),uU=gh(Ki),cU=S$(Ki),dU=k$(Ki),fU=P$(Ki),pU=$$(Ki),hU=C$(Ki),mU=O$(Ki),gU=E$(Ki),vU=_$(Ki),It=re("ZodType",(e,t)=>(wt.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(us(t,{checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]})),e.clone=(r,n)=>xo(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>aU(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>lU(e,r,n),e.parseAsync=async(r,n)=>sU(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>uU(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>cU(e,r,n),e.decode=(r,n)=>dU(e,r,n),e.encodeAsync=async(r,n)=>fU(e,r,n),e.decodeAsync=async(r,n)=>pU(e,r,n),e.safeEncode=(r,n)=>hU(e,r,n),e.safeDecode=(r,n)=>mU(e,r,n),e.safeEncodeAsync=async(r,n)=>gU(e,r,n),e.safeDecodeAsync=async(r,n)=>vU(e,r,n),e.refine=(r,n)=>e.check(nF(r,n)),e.superRefine=r=>e.check(iF(r)),e.overwrite=r=>e.check(xl(r)),e.optional=()=>Iv(e),e.nullable=()=>jv(e),e.nullish=()=>Iv(jv(e)),e.nonoptional=r=>KU(e,r),e.array=()=>kh(e),e.or=r=>Pb([e,r]),e.and=r=>qC(e,r),e.transform=r=>Av(e,YC(r)),e.default=r=>FU(e,r),e.prefault=r=>HU(e,r),e.catch=r=>ZU(e,r),e.pipe=r=>Av(e,r),e.readonly=()=>XU(e),e.describe=r=>{const n=e.clone();return Lo.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){var r;return(r=Lo.get(e))==null?void 0:r.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Lo.get(e);const n=e.clone();return Lo.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),CC=re("_ZodString",(e,t)=>{xh.init(e,t),It.init(e,t);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(cC(...n)),e.includes=(...n)=>e.check(pC(...n)),e.startsWith=(...n)=>e.check(hC(...n)),e.endsWith=(...n)=>e.check(mC(...n)),e.min=(...n)=>e.check(rd(...n)),e.max=(...n)=>e.check(vb(...n)),e.length=(...n)=>e.check(yb(...n)),e.nonempty=(...n)=>e.check(rd(1,...n)),e.lowercase=n=>e.check(dC(n)),e.uppercase=n=>e.check(fC(n)),e.trim=()=>e.check(yC()),e.normalize=(...n)=>e.check(vC(...n)),e.toLowerCase=()=>e.check(bC()),e.toUpperCase=()=>e.check(xC()),e.slugify=()=>e.check(wC())}),bb=re("ZodString",(e,t)=>{xh.init(e,t),CC.init(e,t),e.email=r=>e.check(W$(OC,r)),e.url=r=>e.check(mb(xb,r)),e.jwt=r=>e.check(lC(FC,r)),e.emoji=r=>e.check(Z$(EC,r)),e.guid=r=>e.check(Ov(Ev,r)),e.uuid=r=>e.check(H$(Ha,r)),e.uuidv4=r=>e.check(K$(Ha,r)),e.uuidv6=r=>e.check(V$(Ha,r)),e.uuidv7=r=>e.check(q$(Ha,r)),e.nanoid=r=>e.check(G$(_C,r)),e.guid=r=>e.check(Ov(Ev,r)),e.cuid=r=>e.check(Y$(IC,r)),e.cuid2=r=>e.check(X$(jC,r)),e.ulid=r=>e.check(Q$(AC,r)),e.base64=r=>e.check(oC(LC,r)),e.base64url=r=>e.check(aC(BC,r)),e.xid=r=>e.check(J$(TC,r)),e.ksuid=r=>e.check(eC(RC,r)),e.ipv4=r=>e.check(tC(MC,r)),e.ipv6=r=>e.check(rC(NC,r)),e.cidrv4=r=>e.check(nC(zC,r)),e.cidrv6=r=>e.check(iC(DC,r)),e.e164=r=>e.check(sC(UC,r)),e.datetime=r=>e.check(tU(r)),e.date=r=>e.check(rU(r)),e.time=r=>e.check(nU(r)),e.duration=r=>e.check(iU(r))});function Su(e){return uB(bb,e)}const hr=re("ZodStringFormat",(e,t)=>{cr.init(e,t),CC.init(e,t)}),OC=re("ZodEmail",(e,t)=>{q6.init(e,t),hr.init(e,t)});function Qle(e){return W$(OC,e)}const Ev=re("ZodGUID",(e,t)=>{K6.init(e,t),hr.init(e,t)});function Jle(e){return Ov(Ev,e)}const Ha=re("ZodUUID",(e,t)=>{V6.init(e,t),hr.init(e,t)});function eue(e){return H$(Ha,e)}function tue(e){return K$(Ha,e)}function rue(e){return V$(Ha,e)}function nue(e){return q$(Ha,e)}const xb=re("ZodURL",(e,t)=>{Z6.init(e,t),hr.init(e,t)});function iue(e){return mb(xb,e)}function oue(e){return mb(xb,{protocol:/^https?$/,hostname:s6,...$e(e)})}const EC=re("ZodEmoji",(e,t)=>{G6.init(e,t),hr.init(e,t)});function aue(e){return Z$(EC,e)}const _C=re("ZodNanoID",(e,t)=>{Y6.init(e,t),hr.init(e,t)});function sue(e){return G$(_C,e)}const IC=re("ZodCUID",(e,t)=>{X6.init(e,t),hr.init(e,t)});function lue(e){return Y$(IC,e)}const jC=re("ZodCUID2",(e,t)=>{Q6.init(e,t),hr.init(e,t)});function uue(e){return X$(jC,e)}const AC=re("ZodULID",(e,t)=>{J6.init(e,t),hr.init(e,t)});function cue(e){return Q$(AC,e)}const TC=re("ZodXID",(e,t)=>{e5.init(e,t),hr.init(e,t)});function due(e){return J$(TC,e)}const RC=re("ZodKSUID",(e,t)=>{t5.init(e,t),hr.init(e,t)});function fue(e){return eC(RC,e)}const MC=re("ZodIPv4",(e,t)=>{a5.init(e,t),hr.init(e,t)});function pue(e){return tC(MC,e)}const yU=re("ZodMAC",(e,t)=>{l5.init(e,t),hr.init(e,t)});function hue(e){return dB(yU,e)}const NC=re("ZodIPv6",(e,t)=>{s5.init(e,t),hr.init(e,t)});function mue(e){return rC(NC,e)}const zC=re("ZodCIDRv4",(e,t)=>{u5.init(e,t),hr.init(e,t)});function gue(e){return nC(zC,e)}const DC=re("ZodCIDRv6",(e,t)=>{c5.init(e,t),hr.init(e,t)});function vue(e){return iC(DC,e)}const LC=re("ZodBase64",(e,t)=>{d5.init(e,t),hr.init(e,t)});function yue(e){return oC(LC,e)}const BC=re("ZodBase64URL",(e,t)=>{p5.init(e,t),hr.init(e,t)});function bue(e){return aC(BC,e)}const UC=re("ZodE164",(e,t)=>{h5.init(e,t),hr.init(e,t)});function xue(e){return sC(UC,e)}const FC=re("ZodJWT",(e,t)=>{g5.init(e,t),hr.init(e,t)});function wue(e){return lC(FC,e)}const Sh=re("ZodCustomStringFormat",(e,t)=>{v5.init(e,t),hr.init(e,t)});function Sue(e,t,r={}){return wh(Sh,e,t,r)}function kue(e){return wh(Sh,"hostname",a6,e)}function Pue(e){return wh(Sh,"hex",k6,e)}function $ue(e,t){const r=(t==null?void 0:t.enc)??"hex",n=`${e}_${r}`,i=j$[n];if(!i)throw new Error(`Unrecognized hash format: ${n}`);return wh(Sh,n,i,t)}const wb=re("ZodNumber",(e,t)=>{M$.init(e,t),It.init(e,t),e.gt=(n,i)=>e.check(wu(n,i)),e.gte=(n,i)=>e.check(Mi(n,i)),e.min=(n,i)=>e.check(Mi(n,i)),e.lt=(n,i)=>e.check(xu(n,i)),e.lte=(n,i)=>e.check(Fo(n,i)),e.max=(n,i)=>e.check(Fo(n,i)),e.int=n=>e.check(ek(n)),e.safe=n=>e.check(ek(n)),e.positive=n=>e.check(wu(0,n)),e.nonnegative=n=>e.check(Mi(0,n)),e.negative=n=>e.check(xu(0,n)),e.nonpositive=n=>e.check(Fo(0,n)),e.multipleOf=(n,i)=>e.check(yp(n,i)),e.step=(n,i)=>e.check(yp(n,i)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function bU(e){return vB(wb,e)}const $d=re("ZodNumberFormat",(e,t)=>{y5.init(e,t),wb.init(e,t)});function ek(e){return bB($d,e)}function Cue(e){return xB($d,e)}function Oue(e){return wB($d,e)}function Eue(e){return SB($d,e)}function _ue(e){return kB($d,e)}const Sb=re("ZodBoolean",(e,t)=>{N$.init(e,t),It.init(e,t)});function xU(e){return PB(Sb,e)}const kb=re("ZodBigInt",(e,t)=>{z$.init(e,t),It.init(e,t),e.gte=(n,i)=>e.check(Mi(n,i)),e.min=(n,i)=>e.check(Mi(n,i)),e.gt=(n,i)=>e.check(wu(n,i)),e.gte=(n,i)=>e.check(Mi(n,i)),e.min=(n,i)=>e.check(Mi(n,i)),e.lt=(n,i)=>e.check(xu(n,i)),e.lte=(n,i)=>e.check(Fo(n,i)),e.max=(n,i)=>e.check(Fo(n,i)),e.positive=n=>e.check(wu(BigInt(0),n)),e.negative=n=>e.check(xu(BigInt(0),n)),e.nonpositive=n=>e.check(Fo(BigInt(0),n)),e.nonnegative=n=>e.check(Mi(BigInt(0),n)),e.multipleOf=(n,i)=>e.check(yp(n,i));const r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function Iue(e){return CB(kb,e)}const WC=re("ZodBigIntFormat",(e,t)=>{b5.init(e,t),kb.init(e,t)});function jue(e){return EB(WC,e)}function Aue(e){return _B(WC,e)}const wU=re("ZodSymbol",(e,t)=>{x5.init(e,t),It.init(e,t)});function Tue(e){return IB(wU,e)}const SU=re("ZodUndefined",(e,t)=>{w5.init(e,t),It.init(e,t)});function Rue(e){return jB(SU,e)}const kU=re("ZodNull",(e,t)=>{S5.init(e,t),It.init(e,t)});function PU(e){return AB(kU,e)}const $U=re("ZodAny",(e,t)=>{k5.init(e,t),It.init(e,t)});function Mue(){return TB($U)}const CU=re("ZodUnknown",(e,t)=>{P5.init(e,t),It.init(e,t)});function nd(){return RB(CU)}const OU=re("ZodNever",(e,t)=>{$5.init(e,t),It.init(e,t)});function HC(e){return MB(OU,e)}const EU=re("ZodVoid",(e,t)=>{C5.init(e,t),It.init(e,t)});function Nue(e){return NB(EU,e)}const KC=re("ZodDate",(e,t)=>{O5.init(e,t),It.init(e,t),e.min=(n,i)=>e.check(Mi(n,i)),e.max=(n,i)=>e.check(Fo(n,i));const r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function zue(e){return zB(KC,e)}const _U=re("ZodArray",(e,t)=>{E5.init(e,t),It.init(e,t),e.element=t.element,e.min=(r,n)=>e.check(rd(r,n)),e.nonempty=r=>e.check(rd(1,r)),e.max=(r,n)=>e.check(vb(r,n)),e.length=(r,n)=>e.check(yb(r,n)),e.unwrap=()=>e.element});function kh(e,t){return KB(_U,e,t)}function Due(e){const t=e._zod.def.shape;return GC(Object.keys(t))}const Cd=re("ZodObject",(e,t)=>{A5.init(e,t),It.init(e,t),Rt(e,"shape",()=>t.shape),e.keyof=()=>GC(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:nd()}),e.loose=()=>e.clone({...e._zod.def,catchall:nd()}),e.strict=()=>e.clone({...e._zod.def,catchall:HC()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>_4(e,r),e.safeExtend=r=>I4(e,r),e.merge=r=>j4(e,r),e.pick=r=>O4(e,r),e.omit=r=>E4(e,r),e.partial=(...r)=>A4(XC,e,r[0]),e.required=(...r)=>T4(QC,e,r[0])});function _v(e,t){const r={type:"object",shape:e??{},...$e(t)};return new Cd(r)}function Lue(e,t){return new Cd({type:"object",shape:e,catchall:HC(),...$e(t)})}function Bue(e,t){return new Cd({type:"object",shape:e,catchall:nd(),...$e(t)})}const VC=re("ZodUnion",(e,t)=>{D$.init(e,t),It.init(e,t),e.options=t.options});function Pb(e,t){return new VC({type:"union",options:e,...$e(t)})}const IU=re("ZodDiscriminatedUnion",(e,t)=>{VC.init(e,t),T5.init(e,t)});function Uue(e,t,r){return new IU({type:"union",options:t,discriminator:e,...$e(r)})}const jU=re("ZodIntersection",(e,t)=>{R5.init(e,t),It.init(e,t)});function qC(e,t){return new jU({type:"intersection",left:e,right:t})}const AU=re("ZodTuple",(e,t)=>{L$.init(e,t),It.init(e,t),e.rest=r=>e.clone({...e._zod.def,rest:r})});function TU(e,t,r){const n=t instanceof wt,i=n?r:t,o=n?t:null;return new AU({type:"tuple",items:e,rest:o,...$e(i)})}const ZC=re("ZodRecord",(e,t)=>{M5.init(e,t),It.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function RU(e,t,r){return new ZC({type:"record",keyType:e,valueType:t,...$e(r)})}function Fue(e,t,r){const n=xo(e);return n._zod.values=void 0,new ZC({type:"record",keyType:n,valueType:t,...$e(r)})}const MU=re("ZodMap",(e,t)=>{N5.init(e,t),It.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function Wue(e,t,r){return new MU({type:"map",keyType:e,valueType:t,...$e(r)})}const NU=re("ZodSet",(e,t)=>{z5.init(e,t),It.init(e,t),e.min=(...r)=>e.check(bp(...r)),e.nonempty=r=>e.check(bp(1,r)),e.max=(...r)=>e.check(gb(...r)),e.size=(...r)=>e.check(uC(...r))});function Hue(e,t){return new NU({type:"set",valueType:e,...$e(t)})}const xp=re("ZodEnum",(e,t)=>{D5.init(e,t),It.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,i)=>{const o={};for(const a of n)if(r.has(a))o[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new xp({...t,checks:[],...$e(i),entries:o})},e.exclude=(n,i)=>{const o={...t.entries};for(const a of n)if(r.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new xp({...t,checks:[],...$e(i),entries:o})}});function GC(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new xp({type:"enum",entries:r,...$e(t)})}function Kue(e,t){return new xp({type:"enum",entries:e,...$e(t)})}const zU=re("ZodLiteral",(e,t)=>{L5.init(e,t),It.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Vue(e,t){return new zU({type:"literal",values:Array.isArray(e)?e:[e],...$e(t)})}const DU=re("ZodFile",(e,t)=>{B5.init(e,t),It.init(e,t),e.min=(r,n)=>e.check(bp(r,n)),e.max=(r,n)=>e.check(gb(r,n)),e.mime=(r,n)=>e.check(gC(Array.isArray(r)?r:[r],n))});function que(e){return VB(DU,e)}const LU=re("ZodTransform",(e,t)=>{U5.init(e,t),It.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new cb(e.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(ed(o,r.value,t));else{const a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(ed(a))}};const i=t.transform(r.value,r);return i instanceof Promise?i.then(o=>(r.value=o,r)):(r.value=i,r)}});function YC(e){return new LU({type:"transform",transform:e})}const XC=re("ZodOptional",(e,t)=>{F5.init(e,t),It.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Iv(e){return new XC({type:"optional",innerType:e})}const BU=re("ZodNullable",(e,t)=>{W5.init(e,t),It.init(e,t),e.unwrap=()=>e._zod.def.innerType});function jv(e){return new BU({type:"nullable",innerType:e})}function Zue(e){return Iv(jv(e))}const UU=re("ZodDefault",(e,t)=>{H5.init(e,t),It.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function FU(e,t){return new UU({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():fb(t)}})}const WU=re("ZodPrefault",(e,t)=>{K5.init(e,t),It.init(e,t),e.unwrap=()=>e._zod.def.innerType});function HU(e,t){return new WU({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():fb(t)}})}const QC=re("ZodNonOptional",(e,t)=>{V5.init(e,t),It.init(e,t),e.unwrap=()=>e._zod.def.innerType});function KU(e,t){return new QC({type:"nonoptional",innerType:e,...$e(t)})}const VU=re("ZodSuccess",(e,t)=>{q5.init(e,t),It.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Gue(e){return new VU({type:"success",innerType:e})}const qU=re("ZodCatch",(e,t)=>{Z5.init(e,t),It.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ZU(e,t){return new qU({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const GU=re("ZodNaN",(e,t)=>{G5.init(e,t),It.init(e,t)});function Yue(e){return LB(GU,e)}const JC=re("ZodPipe",(e,t)=>{Y5.init(e,t),It.init(e,t),e.in=t.in,e.out=t.out});function Av(e,t){return new JC({type:"pipe",in:e,out:t})}const eO=re("ZodCodec",(e,t)=>{JC.init(e,t),B$.init(e,t)});function Xue(e,t,r){return new eO({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}const YU=re("ZodReadonly",(e,t)=>{X5.init(e,t),It.init(e,t),e.unwrap=()=>e._zod.def.innerType});function XU(e){return new YU({type:"readonly",innerType:e})}const QU=re("ZodTemplateLiteral",(e,t)=>{Q5.init(e,t),It.init(e,t)});function Que(e,t){return new QU({type:"template_literal",parts:e,...$e(t)})}const JU=re("ZodLazy",(e,t)=>{tB.init(e,t),It.init(e,t),e.unwrap=()=>e._zod.def.getter()});function eF(e){return new JU({type:"lazy",getter:e})}const tF=re("ZodPromise",(e,t)=>{eB.init(e,t),It.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Jue(e){return new tF({type:"promise",innerType:e})}const rF=re("ZodFunction",(e,t)=>{J5.init(e,t),It.init(e,t)});function t2(e){return new rF({type:"function",input:Array.isArray(e==null?void 0:e.input)?TU(e==null?void 0:e.input):(e==null?void 0:e.input)??kh(nd()),output:(e==null?void 0:e.output)??nd()})}const $b=re("ZodCustom",(e,t)=>{rB.init(e,t),It.init(e,t)});function ece(e){const t=new Er({check:"custom"});return t._zod.check=e,t}function tce(e,t){return qB($b,e??(()=>!0),t)}function nF(e,t={}){return ZB($b,e,t)}function iF(e){return GB(e)}const rce=XB,nce=QB;function ice(e,t={error:`Input not instance of ${e.name}`}){const r=new $b({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...$e(t)});return r._zod.bag.Class=e,r}const oce=(...e)=>JB({Codec:eO,Boolean:Sb,String:bb},...e);function ace(e){const t=eF(()=>Pb([Su(e),bU(),xU(),PU(),kh(t),RU(Su(),t)]));return t}function sce(e,t){return Av(YC(e),t)}const lce={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function uce(e){ni({customError:e})}function cce(){return ni().customError}var tk;tk||(tk={});function dce(e){return cB(bb,e)}function fce(e){return yB(wb,e)}function pce(e){return $B(Sb,e)}function hce(e){return OB(kb,e)}function mce(e){return DB(KC,e)}const gce=Object.freeze(Object.defineProperty({__proto__:null,bigint:hce,boolean:pce,date:mce,number:fce,string:dce},Symbol.toStringTag,{value:"Module"}));ni(nB());const we=Object.freeze(Object.defineProperty({__proto__:null,$brand:b4,$input:lB,$output:sB,NEVER:y4,TimePrecision:fB,ZodAny:$U,ZodArray:_U,ZodBase64:LC,ZodBase64URL:BC,ZodBigInt:kb,ZodBigIntFormat:WC,ZodBoolean:Sb,ZodCIDRv4:zC,ZodCIDRv6:DC,ZodCUID:IC,ZodCUID2:jC,ZodCatch:qU,ZodCodec:eO,ZodCustom:$b,ZodCustomStringFormat:Sh,ZodDate:KC,ZodDefault:UU,ZodDiscriminatedUnion:IU,ZodE164:UC,ZodEmail:OC,ZodEmoji:EC,ZodEnum:xp,ZodError:Xle,ZodFile:DU,get ZodFirstPartyTypeKind(){return tk},ZodFunction:rF,ZodGUID:Ev,ZodIPv4:MC,ZodIPv6:NC,ZodISODate:kC,ZodISODateTime:SC,ZodISODuration:$C,ZodISOTime:PC,ZodIntersection:jU,ZodIssueCode:lce,ZodJWT:FC,ZodKSUID:RC,ZodLazy:JU,ZodLiteral:zU,ZodMAC:yU,ZodMap:MU,ZodNaN:GU,ZodNanoID:_C,ZodNever:OU,ZodNonOptional:QC,ZodNull:kU,ZodNullable:BU,ZodNumber:wb,ZodNumberFormat:$d,ZodObject:Cd,ZodOptional:XC,ZodPipe:JC,ZodPrefault:WU,ZodPromise:tF,ZodReadonly:YU,ZodRealError:Ki,ZodRecord:ZC,ZodSet:NU,ZodString:bb,ZodStringFormat:hr,ZodSuccess:VU,ZodSymbol:wU,ZodTemplateLiteral:QU,ZodTransform:LU,ZodTuple:AU,ZodType:It,ZodULID:AC,ZodURL:xb,ZodUUID:Ha,ZodUndefined:SU,ZodUnion:VC,ZodUnknown:CU,ZodVoid:EU,ZodXID:TC,_ZodString:CC,_default:FU,_function:t2,any:Mue,array:kh,base64:yue,base64url:bue,bigint:Iue,boolean:xU,catch:ZU,check:ece,cidrv4:gue,cidrv6:vue,clone:xo,codec:Xue,coerce:gce,config:ni,core:Gle,cuid:lue,cuid2:uue,custom:tce,date:zue,decode:dU,decodeAsync:pU,describe:rce,discriminatedUnion:Uue,e164:xue,email:Qle,emoji:aue,encode:cU,encodeAsync:fU,endsWith:mC,enum:GC,file:que,flattenError:x$,float32:Cue,float64:Oue,formatError:w$,function:t2,getErrorMap:cce,globalRegistry:Lo,gt:wu,gte:Mi,guid:Jle,hash:$ue,hex:Pue,hostname:kue,httpUrl:oue,includes:pC,instanceof:ice,int:ek,int32:Eue,int64:jue,intersection:qC,ipv4:pue,ipv6:mue,iso:Yle,json:ace,jwt:wue,keyof:Due,ksuid:fue,lazy:eF,length:yb,literal:Vue,locales:aB,looseObject:Bue,lowercase:dC,lt:xu,lte:Fo,mac:hue,map:Wue,maxLength:vb,maxSize:gb,meta:nce,mime:gC,minLength:rd,minSize:bp,multipleOf:yp,nan:Yue,nanoid:sue,nativeEnum:Kue,negative:UB,never:HC,nonnegative:WB,nonoptional:KU,nonpositive:FB,normalize:vC,null:PU,nullable:jv,nullish:Zue,number:bU,object:_v,optional:Iv,overwrite:xl,parse:aU,parseAsync:sU,partialRecord:Fue,pipe:Av,positive:BB,prefault:HU,preprocess:sce,prettifyError:B4,promise:Jue,property:HB,readonly:XU,record:RU,refine:nF,regex:cC,regexes:j$,registry:F$,safeDecode:mU,safeDecodeAsync:vU,safeEncode:hU,safeEncodeAsync:gU,safeParse:lU,safeParseAsync:uU,set:Hue,setErrorMap:uce,size:uC,slugify:wC,startsWith:hC,strictObject:Lue,string:Su,stringFormat:Sue,stringbool:oce,success:Gue,superRefine:iF,symbol:Tue,templateLiteral:Que,toJSONSchema:eU,toLowerCase:bC,toUpperCase:xC,transform:YC,treeifyError:D4,trim:yC,tuple:TU,uint32:_ue,uint64:Aue,ulid:cue,undefined:Rue,union:Pb,unknown:nd,uppercase:fC,url:iue,util:N4,uuid:eue,uuidv4:tue,uuidv6:rue,uuidv7:nue,void:Nue,xid:due},Symbol.toStringTag,{value:"Module"}));var Tv=(e,t)=>e.parse(t);function oF(e,t){return e&&t?qC(e,t):e??t}function aF(e){var r,n;const t=e.shape?e.shape:(n=(r=e._def)==null?void 0:r.shape)==null?void 0:n.call(r);return t?typeof t=="function"?t.call(e):t:{}}function sF(e,t=[]){if(!e)return[];const r=[];for(const[n,i]of Object.entries(e))if(i instanceof Cd){const o=aF(i),a=sF(o,[...t,n]);r.push(...a.length?a:[[...t,n].join("_")])}else t.length>0&&r.push([...t,n].join("_"));return r}function lF(e,t){return t?e.replace(/:([A-Za-z0-9_]+)/g,(r,n)=>{const i=t[n];if(i==null)throw new Error(`Missing param :${n}`);return String(i)}):e}function vce(e){const t=e.leaf.path.split("/").filter(Boolean),r=[e.leaf.method];for(const n of t){if(n.startsWith(":")){const i=n.slice(1),o=e.params&&i in e.params?e.params[i]:void 0;r.push([o]);continue}r.push(n)}return r.push(e.query??{}),r}function yce(e){const r={...e.node??{},...e.cfg},n=r.feed===!0?oF(r.querySchema,r.queryExtensionSchema):r.querySchema,i=r.outputSchema?_v({out:r.outputSchema,meta:r.outputMetaSchema??Su().optional()}):_v({meta:r.outputMetaSchema??Su().optional()});if(r.feed===!0&&n instanceof Cd){const o=aF(n),a=sF(o);a.length>0&&console.warn(`[routesV3.builder] Warning: feed query schema for ${e.method.toUpperCase()} ${e.path} contains nested objects. Consider using flat keys instead: ${a.join(", ")}`)}return{method:e.method,path:e.path,cfg:{...r,bodySchema:r.bodySchema,querySchema:n,paramsSchema:r.paramsSchema,outputSchema:i,outputMetaSchema:r.outputMetaSchema,queryExtensionSchema:r.queryExtensionSchema}}}var id=(e,t,r)=>{const n=`${e.toUpperCase()} ${t}`;return r?encodeURIComponent(n):n};function va(e,t,r){const n=e??"",i=bce(n,!!r),o={},a=xce(n,r);function l(c,d,f){const p=[],g=c,v=d;let b=f;function S(k,C){const P=C.paramsSchema??b,O=P?{...C,paramsSchema:P}:{...C},E=yce({method:k,path:g,node:v,cfg:O});return p.push(E),w}const w={sub(...k){if(k.length===0)throw new Error("sub() expects at least one resource");for(const C of k)for(const P of C){const O=P,E=O.cfg,_=E.paramsSchema,A=oF(b,_),T={...v,...E};A?T.paramsSchema=A:"paramsSchema"in T&&delete T.paramsSchema;const R={method:O.method,path:wce(g,O.path),cfg:T};p.push(R)}return w},get(k){return S("get",k)},post(k){return S("post",{...k,feed:!1})},put(k){return S("put",{...k,feed:!1})},patch(k){return S("patch",{...k,feed:!1})},delete(k){return S("delete",{...k,feed:!1})},done(){return p}};return w}return l(i,o,a)}function bce(e,t){const r=e??"";if(!t)return r;if(!r)throw new Error("resource() requires a segment name when defining an id schema");if(r.includes("/")){const n=r.split("/").filter(Boolean);if(n.length===0)throw new Error("resource() received an invalid segment for param injection");const i=n.length-1,o=n[i];return n[i]=o.startsWith(":")?o:`:${o}`,`${r.startsWith("/")?"/":""}${n.join("/")}`}return r.startsWith(":")?r:`:${r}`}function xce(e,t){if(!t)return;const r=e.split("/").filter(Boolean),n=r.length>0?r[r.length-1]:e,i=n.startsWith(":")?n.slice(1):n;if(!i)throw new Error("resource() requires a non-empty name for id schema");return _v({[i]:t})}function wce(e,t){if(!e)return t;if(!t)return e;const r=e.endsWith("/")?e.replace(/\/+$/,""):e,n=t.startsWith("/")?t.replace(/^\/+/,""):t;return n?`${r}/${n}`:r}function Sce(e){const t=Object.fromEntries(e.map(n=>[`${n.method.toUpperCase()} ${n.path}`,n]));return{all:e,byKey:t,log:n=>{n.system("Finalized routes:"),Object.keys(t).forEach(i=>{t[i],n.system(`- ${i}`)})}}}var Od=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},kce={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Ws,PP,hD,Pce=(hD=class{constructor(){at(this,Ws,kce);at(this,PP,!1)}setTimeoutProvider(e){De(this,Ws,e)}setTimeout(e,t){return X(this,Ws).setTimeout(e,t)}clearTimeout(e){X(this,Ws).clearTimeout(e)}setInterval(e,t){return X(this,Ws).setInterval(e,t)}clearInterval(e){X(this,Ws).clearInterval(e)}},Ws=new WeakMap,PP=new WeakMap,hD),Gl=new Pce;function $ce(e){setTimeout(e,0)}var ku=typeof window>"u"||"Deno"in globalThis;function Xn(){}function Cce(e,t){return typeof e=="function"?e(t):e}function rk(e){return typeof e=="number"&&e>=0&&e!==1/0}function uF(e,t){return Math.max(e+(t||0)-Date.now(),0)}function tl(e,t){return typeof e=="function"?e(t):e}function ao(e,t){return typeof e=="function"?e(t):e}function r2(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:o,queryKey:a,stale:l}=e;if(a){if(n){if(t.queryHash!==tO(a,t.options))return!1}else if(!wp(t.queryKey,a))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||i&&i!==t.state.fetchStatus||o&&!o(t))}function n2(e,t){const{exact:r,status:n,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(Pu(t.options.mutationKey)!==Pu(o))return!1}else if(!wp(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function tO(e,t){return((t==null?void 0:t.queryKeyHashFn)||Pu)(e)}function Pu(e){return JSON.stringify(e,(t,r)=>nk(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function wp(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>wp(e[r],t[r])):!1}var Oce=Object.prototype.hasOwnProperty;function cF(e,t){if(e===t)return e;const r=i2(e)&&i2(t);if(!r&&!(nk(e)&&nk(t)))return t;const i=(r?e:Object.keys(e)).length,o=r?t:Object.keys(t),a=o.length,l=r?new Array(a):{};let c=0;for(let d=0;d<a;d++){const f=r?d:o[d],p=e[f],g=t[f];if(p===g){l[f]=p,(r?d<i:Oce.call(e,f))&&c++;continue}if(p===null||g===null||typeof p!="object"||typeof g!="object"){l[f]=g;continue}const v=cF(p,g);l[f]=v,v===p&&c++}return i===a&&c===i?e:l}function Rv(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function i2(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function nk(e){if(!o2(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!o2(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function o2(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ece(e){return new Promise(t=>{Gl.setTimeout(t,e)})}function ik(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?cF(e,t):t}function a2(e){return e}function _ce(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function Ice(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var rO=Symbol();function dF(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===rO?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function fF(e,t){return typeof e=="function"?e(...t):!!e}var eu,Hs,Mc,mD,jce=(mD=class extends Od{constructor(){super();at(this,eu);at(this,Hs);at(this,Mc);De(this,Mc,t=>{if(!ku&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){X(this,Hs)||this.setEventListener(X(this,Mc))}onUnsubscribe(){var t;this.hasListeners()||((t=X(this,Hs))==null||t.call(this),De(this,Hs,void 0))}setEventListener(t){var r;De(this,Mc,t),(r=X(this,Hs))==null||r.call(this),De(this,Hs,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){X(this,eu)!==t&&(De(this,eu,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof X(this,eu)=="boolean"?X(this,eu):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},eu=new WeakMap,Hs=new WeakMap,Mc=new WeakMap,mD),nO=new jce;function ok(){let e,t;const r=new Promise((i,o)=>{e=i,t=o});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}var Ace=$ce;function Tce(){let e=[],t=0,r=l=>{l()},n=l=>{l()},i=Ace;const o=l=>{t?e.push(l):i(()=>{r(l)})},a=()=>{const l=e;e=[],l.length&&i(()=>{n(()=>{l.forEach(c=>{r(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||a()}return c},batchCalls:l=>(...c)=>{o(()=>{l(...c)})},schedule:o,setNotifyFunction:l=>{r=l},setBatchNotifyFunction:l=>{n=l},setScheduler:l=>{i=l}}}var cn=Tce(),Nc,Ks,zc,gD,Rce=(gD=class extends Od{constructor(){super();at(this,Nc,!0);at(this,Ks);at(this,zc);De(this,zc,t=>{if(!ku&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){X(this,Ks)||this.setEventListener(X(this,zc))}onUnsubscribe(){var t;this.hasListeners()||((t=X(this,Ks))==null||t.call(this),De(this,Ks,void 0))}setEventListener(t){var r;De(this,zc,t),(r=X(this,Ks))==null||r.call(this),De(this,Ks,t(this.setOnline.bind(this)))}setOnline(t){X(this,Nc)!==t&&(De(this,Nc,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return X(this,Nc)}},Nc=new WeakMap,Ks=new WeakMap,zc=new WeakMap,gD),Mv=new Rce;function Mce(e){return Math.min(1e3*2**e,3e4)}function pF(e){return(e??"online")==="online"?Mv.isOnline():!0}var ak=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function hF(e){let t=!1,r=0,n;const i=ok(),o=()=>i.status!=="pending",a=S=>{var w;if(!o()){const k=new ak(S);g(k),(w=e.onCancel)==null||w.call(e,k)}},l=()=>{t=!0},c=()=>{t=!1},d=()=>nO.isFocused()&&(e.networkMode==="always"||Mv.isOnline())&&e.canRun(),f=()=>pF(e.networkMode)&&e.canRun(),p=S=>{o()||(n==null||n(),i.resolve(S))},g=S=>{o()||(n==null||n(),i.reject(S))},v=()=>new Promise(S=>{var w;n=k=>{(o()||d())&&S(k)},(w=e.onPause)==null||w.call(e)}).then(()=>{var S;n=void 0,o()||(S=e.onContinue)==null||S.call(e)}),b=()=>{if(o())return;let S;const w=r===0?e.initialPromise:void 0;try{S=w??e.fn()}catch(k){S=Promise.reject(k)}Promise.resolve(S).then(p).catch(k=>{var _;if(o())return;const C=e.retry??(ku?0:3),P=e.retryDelay??Mce,O=typeof P=="function"?P(r,k):P,E=C===!0||typeof C=="number"&&r<C||typeof C=="function"&&C(r,k);if(t||!E){g(k);return}r++,(_=e.onFail)==null||_.call(e,r,k),Ece(O).then(()=>d()?void 0:v()).then(()=>{t?g(k):b()})})};return{promise:i,status:()=>i.status,cancel:a,continue:()=>(n==null||n(),i),cancelRetry:l,continueRetry:c,canStart:f,start:()=>(f()?b():v().then(b),i)}}var tu,vD,mF=(vD=class{constructor(){at(this,tu)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),rk(this.gcTime)&&De(this,tu,Gl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ku?1/0:300*1e3))}clearGcTimeout(){X(this,tu)&&(Gl.clearTimeout(X(this,tu)),De(this,tu,void 0))}},tu=new WeakMap,vD),ru,Dc,io,nu,Sn,Hp,iu,To,Ma,yD,Nce=(yD=class extends mF{constructor(t){super();at(this,To);at(this,ru);at(this,Dc);at(this,io);at(this,nu);at(this,Sn);at(this,Hp);at(this,iu);De(this,iu,!1),De(this,Hp,t.defaultOptions),this.setOptions(t.options),this.observers=[],De(this,nu,t.client),De(this,io,X(this,nu).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,De(this,ru,l2(this.options)),this.state=t.state??X(this,ru),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=X(this,Sn))==null?void 0:t.promise}setOptions(t){if(this.options={...X(this,Hp),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=l2(this.options);r.data!==void 0&&(this.setState(s2(r.data,r.dataUpdatedAt)),De(this,ru,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&X(this,io).remove(this)}setData(t,r){const n=ik(this.state.data,t,this.options);return Et(this,To,Ma).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Et(this,To,Ma).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=X(this,Sn))==null?void 0:n.promise;return(i=X(this,Sn))==null||i.cancel(t),r?r.then(Xn).catch(Xn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(X(this,ru))}isActive(){return this.observers.some(t=>ao(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===rO||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>tl(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!uF(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=X(this,Sn))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=X(this,Sn))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),X(this,io).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(X(this,Sn)&&(X(this,iu)?X(this,Sn).cancel({revert:!0}):X(this,Sn).cancelRetry()),this.scheduleGc()),X(this,io).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Et(this,To,Ma).call(this,{type:"invalidate"})}async fetch(t,r){var c,d,f,p,g,v,b,S,w,k,C,P;if(this.state.fetchStatus!=="idle"&&((c=X(this,Sn))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(X(this,Sn))return X(this,Sn).continueRetry(),X(this,Sn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const O=this.observers.find(E=>E.options.queryFn);O&&this.setOptions(O.options)}const n=new AbortController,i=O=>{Object.defineProperty(O,"signal",{enumerable:!0,get:()=>(De(this,iu,!0),n.signal)})},o=()=>{const O=dF(this.options,r),_=(()=>{const A={client:X(this,nu),queryKey:this.queryKey,meta:this.meta};return i(A),A})();return De(this,iu,!1),this.options.persister?this.options.persister(O,_,this):O(_)},l=(()=>{const O={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:X(this,nu),state:this.state,fetchFn:o};return i(O),O})();(d=this.options.behavior)==null||d.onFetch(l,this),De(this,Dc,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=l.fetchOptions)==null?void 0:f.meta))&&Et(this,To,Ma).call(this,{type:"fetch",meta:(p=l.fetchOptions)==null?void 0:p.meta}),De(this,Sn,hF({initialPromise:r==null?void 0:r.initialPromise,fn:l.fetchFn,onCancel:O=>{O instanceof ak&&O.revert&&this.setState({...X(this,Dc),fetchStatus:"idle"}),n.abort()},onFail:(O,E)=>{Et(this,To,Ma).call(this,{type:"failed",failureCount:O,error:E})},onPause:()=>{Et(this,To,Ma).call(this,{type:"pause"})},onContinue:()=>{Et(this,To,Ma).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const O=await X(this,Sn).start();if(O===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(O),(v=(g=X(this,io).config).onSuccess)==null||v.call(g,O,this),(S=(b=X(this,io).config).onSettled)==null||S.call(b,O,this.state.error,this),O}catch(O){if(O instanceof ak){if(O.silent)return X(this,Sn).promise;if(O.revert){if(this.state.data===void 0)throw O;return this.state.data}}throw Et(this,To,Ma).call(this,{type:"error",error:O}),(k=(w=X(this,io).config).onError)==null||k.call(w,O,this),(P=(C=X(this,io).config).onSettled)==null||P.call(C,this.state.data,O,this),O}finally{this.scheduleGc()}}},ru=new WeakMap,Dc=new WeakMap,io=new WeakMap,nu=new WeakMap,Sn=new WeakMap,Hp=new WeakMap,iu=new WeakMap,To=new WeakSet,Ma=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...gF(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...s2(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return De(this,Dc,t.manual?i:void 0),i;case"error":const o=t.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),cn.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),X(this,io).notify({query:this,type:"updated",action:t})})},yD);function gF(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:pF(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function s2(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function l2(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var hi,zt,Kp,Gn,ou,Lc,za,Vs,Vp,Bc,Uc,au,su,qs,Fc,Qt,Yf,sk,lk,uk,ck,dk,fk,pk,yF,bD,vF=(bD=class extends Od{constructor(t,r){super();at(this,Qt);at(this,hi);at(this,zt);at(this,Kp);at(this,Gn);at(this,ou);at(this,Lc);at(this,za);at(this,Vs);at(this,Vp);at(this,Bc);at(this,Uc);at(this,au);at(this,su);at(this,qs);at(this,Fc,new Set);this.options=r,De(this,hi,t),De(this,Vs,null),De(this,za,ok()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(X(this,zt).addObserver(this),u2(X(this,zt),this.options)?Et(this,Qt,Yf).call(this):this.updateResult(),Et(this,Qt,ck).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return hk(X(this,zt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return hk(X(this,zt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Et(this,Qt,dk).call(this),Et(this,Qt,fk).call(this),X(this,zt).removeObserver(this)}setOptions(t){const r=this.options,n=X(this,zt);if(this.options=X(this,hi).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ao(this.options.enabled,X(this,zt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Et(this,Qt,pk).call(this),X(this,zt).setOptions(this.options),r._defaulted&&!Rv(this.options,r)&&X(this,hi).getQueryCache().notify({type:"observerOptionsUpdated",query:X(this,zt),observer:this});const i=this.hasListeners();i&&c2(X(this,zt),n,this.options,r)&&Et(this,Qt,Yf).call(this),this.updateResult(),i&&(X(this,zt)!==n||ao(this.options.enabled,X(this,zt))!==ao(r.enabled,X(this,zt))||tl(this.options.staleTime,X(this,zt))!==tl(r.staleTime,X(this,zt)))&&Et(this,Qt,sk).call(this);const o=Et(this,Qt,lk).call(this);i&&(X(this,zt)!==n||ao(this.options.enabled,X(this,zt))!==ao(r.enabled,X(this,zt))||o!==X(this,qs))&&Et(this,Qt,uk).call(this,o)}getOptimisticResult(t){const r=X(this,hi).getQueryCache().build(X(this,hi),t),n=this.createResult(r,t);return Dce(this,n)&&(De(this,Gn,n),De(this,Lc,this.options),De(this,ou,X(this,zt).state)),n}getCurrentResult(){return X(this,Gn)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&X(this,za).status==="pending"&&X(this,za).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){X(this,Fc).add(t)}getCurrentQuery(){return X(this,zt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=X(this,hi).defaultQueryOptions(t),n=X(this,hi).getQueryCache().build(X(this,hi),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Et(this,Qt,Yf).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),X(this,Gn)))}createResult(t,r){var R;const n=X(this,zt),i=this.options,o=X(this,Gn),a=X(this,ou),l=X(this,Lc),d=t!==n?t.state:X(this,Kp),{state:f}=t;let p={...f},g=!1,v;if(r._optimisticResults){const N=this.hasListeners(),z=!N&&u2(t,r),j=N&&c2(t,n,r,i);(z||j)&&(p={...p,...gF(f.data,t.options)}),r._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:b,errorUpdatedAt:S,status:w}=p;v=p.data;let k=!1;if(r.placeholderData!==void 0&&v===void 0&&w==="pending"){let N;o!=null&&o.isPlaceholderData&&r.placeholderData===(l==null?void 0:l.placeholderData)?(N=o.data,k=!0):N=typeof r.placeholderData=="function"?r.placeholderData((R=X(this,Uc))==null?void 0:R.state.data,X(this,Uc)):r.placeholderData,N!==void 0&&(w="success",v=ik(o==null?void 0:o.data,N,r),g=!0)}if(r.select&&v!==void 0&&!k)if(o&&v===(a==null?void 0:a.data)&&r.select===X(this,Vp))v=X(this,Bc);else try{De(this,Vp,r.select),v=r.select(v),v=ik(o==null?void 0:o.data,v,r),De(this,Bc,v),De(this,Vs,null)}catch(N){De(this,Vs,N)}X(this,Vs)&&(b=X(this,Vs),v=X(this,Bc),S=Date.now(),w="error");const C=p.fetchStatus==="fetching",P=w==="pending",O=w==="error",E=P&&C,_=v!==void 0,T={status:w,fetchStatus:p.fetchStatus,isPending:P,isSuccess:w==="success",isError:O,isInitialLoading:E,isLoading:E,data:v,dataUpdatedAt:p.dataUpdatedAt,error:b,errorUpdatedAt:S,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>d.dataUpdateCount||p.errorUpdateCount>d.errorUpdateCount,isFetching:C,isRefetching:C&&!P,isLoadingError:O&&!_,isPaused:p.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:O&&_,isStale:iO(t,r),refetch:this.refetch,promise:X(this,za),isEnabled:ao(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const N=B=>{T.status==="error"?B.reject(T.error):T.data!==void 0&&B.resolve(T.data)},z=()=>{const B=De(this,za,T.promise=ok());N(B)},j=X(this,za);switch(j.status){case"pending":t.queryHash===n.queryHash&&N(j);break;case"fulfilled":(T.status==="error"||T.data!==j.value)&&z();break;case"rejected":(T.status!=="error"||T.error!==j.reason)&&z();break}}return T}updateResult(){const t=X(this,Gn),r=this.createResult(X(this,zt),this.options);if(De(this,ou,X(this,zt).state),De(this,Lc,this.options),X(this,ou).data!==void 0&&De(this,Uc,X(this,zt)),Rv(r,t))return;De(this,Gn,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!X(this,Fc).size)return!0;const a=new Set(o??X(this,Fc));return this.options.throwOnError&&a.add("error"),Object.keys(X(this,Gn)).some(l=>{const c=l;return X(this,Gn)[c]!==t[c]&&a.has(c)})};Et(this,Qt,yF).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Et(this,Qt,ck).call(this)}},hi=new WeakMap,zt=new WeakMap,Kp=new WeakMap,Gn=new WeakMap,ou=new WeakMap,Lc=new WeakMap,za=new WeakMap,Vs=new WeakMap,Vp=new WeakMap,Bc=new WeakMap,Uc=new WeakMap,au=new WeakMap,su=new WeakMap,qs=new WeakMap,Fc=new WeakMap,Qt=new WeakSet,Yf=function(t){Et(this,Qt,pk).call(this);let r=X(this,zt).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Xn)),r},sk=function(){Et(this,Qt,dk).call(this);const t=tl(this.options.staleTime,X(this,zt));if(ku||X(this,Gn).isStale||!rk(t))return;const n=uF(X(this,Gn).dataUpdatedAt,t)+1;De(this,au,Gl.setTimeout(()=>{X(this,Gn).isStale||this.updateResult()},n))},lk=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(X(this,zt)):this.options.refetchInterval)??!1},uk=function(t){Et(this,Qt,fk).call(this),De(this,qs,t),!(ku||ao(this.options.enabled,X(this,zt))===!1||!rk(X(this,qs))||X(this,qs)===0)&&De(this,su,Gl.setInterval(()=>{(this.options.refetchIntervalInBackground||nO.isFocused())&&Et(this,Qt,Yf).call(this)},X(this,qs)))},ck=function(){Et(this,Qt,sk).call(this),Et(this,Qt,uk).call(this,Et(this,Qt,lk).call(this))},dk=function(){X(this,au)&&(Gl.clearTimeout(X(this,au)),De(this,au,void 0))},fk=function(){X(this,su)&&(Gl.clearInterval(X(this,su)),De(this,su,void 0))},pk=function(){const t=X(this,hi).getQueryCache().build(X(this,hi),this.options);if(t===X(this,zt))return;const r=X(this,zt);De(this,zt,t),De(this,Kp,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},yF=function(t){cn.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(X(this,Gn))}),X(this,hi).getQueryCache().notify({query:X(this,zt),type:"observerResultsUpdated"})})},bD);function zce(e,t){return ao(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function u2(e,t){return zce(e,t)||e.state.data!==void 0&&hk(e,t,t.refetchOnMount)}function hk(e,t,r){if(ao(t.enabled,e)!==!1&&tl(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&iO(e,t)}return!1}function c2(e,t,r,n){return(e!==t||ao(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&iO(e,r)}function iO(e,t){return ao(t.enabled,e)!==!1&&e.isStaleByTime(tl(t.staleTime,e))}function Dce(e,t){return!Rv(e.getCurrentResult(),t)}function Nv(e){return{onFetch:(t,r)=>{var f,p,g,v,b;const n=t.options,i=(g=(p=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:p.fetchMore)==null?void 0:g.direction,o=((v=t.state.data)==null?void 0:v.pages)||[],a=((b=t.state.data)==null?void 0:b.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const d=async()=>{let S=!1;const w=P=>{Object.defineProperty(P,"signal",{enumerable:!0,get:()=>(t.signal.aborted?S=!0:t.signal.addEventListener("abort",()=>{S=!0}),t.signal)})},k=dF(t.options,t.fetchOptions),C=async(P,O,E)=>{if(S)return Promise.reject();if(O==null&&P.pages.length)return Promise.resolve(P);const A=(()=>{const z={client:t.client,queryKey:t.queryKey,pageParam:O,direction:E?"backward":"forward",meta:t.options.meta};return w(z),z})(),T=await k(A),{maxPages:R}=t.options,N=E?Ice:_ce;return{pages:N(P.pages,T,R),pageParams:N(P.pageParams,O,R)}};if(i&&o.length){const P=i==="backward",O=P?bF:mk,E={pages:o,pageParams:a},_=O(n,E);l=await C(E,_,P)}else{const P=e??o.length;do{const O=c===0?a[0]??n.initialPageParam:mk(n,l);if(c>0&&O==null)break;l=await C(l,O),c++}while(c<P)}return l};t.options.persister?t.fetchFn=()=>{var S,w;return(w=(S=t.options).persister)==null?void 0:w.call(S,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=d}}}function mk(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function bF(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}function Lce(e,t){return t?mk(e,t)!=null:!1}function Bce(e,t){return!t||!e.getPreviousPageParam?!1:bF(e,t)!=null}var Uce=class extends vF{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:Nv()})}getOptimisticResult(e){return e.behavior=Nv(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var b,S;const{state:r}=e,n=super.createResult(e,t),{isFetching:i,isRefetching:o,isError:a,isRefetchError:l}=n,c=(S=(b=r.fetchMeta)==null?void 0:b.fetchMore)==null?void 0:S.direction,d=a&&c==="forward",f=i&&c==="forward",p=a&&c==="backward",g=i&&c==="backward";return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Lce(t,r.data),hasPreviousPage:Bce(t,r.data),isFetchNextPageError:d,isFetchingNextPage:f,isFetchPreviousPageError:p,isFetchingPreviousPage:g,isRefetchError:l&&!d&&!p,isRefetching:o&&!f&&!g}}},qp,na,Yn,lu,ia,Ds,xD,Fce=(xD=class extends mF{constructor(t){super();at(this,ia);at(this,qp);at(this,na);at(this,Yn);at(this,lu);De(this,qp,t.client),this.mutationId=t.mutationId,De(this,Yn,t.mutationCache),De(this,na,[]),this.state=t.state||xF(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){X(this,na).includes(t)||(X(this,na).push(t),this.clearGcTimeout(),X(this,Yn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){De(this,na,X(this,na).filter(r=>r!==t)),this.scheduleGc(),X(this,Yn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){X(this,na).length||(this.state.status==="pending"?this.scheduleGc():X(this,Yn).remove(this))}continue(){var t;return((t=X(this,lu))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,l,c,d,f,p,g,v,b,S,w,k,C,P,O,E,_,A,T,R;const r=()=>{Et(this,ia,Ds).call(this,{type:"continue"})},n={client:X(this,qp),meta:this.options.meta,mutationKey:this.options.mutationKey};De(this,lu,hF({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(N,z)=>{Et(this,ia,Ds).call(this,{type:"failed",failureCount:N,error:z})},onPause:()=>{Et(this,ia,Ds).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>X(this,Yn).canRun(this)}));const i=this.state.status==="pending",o=!X(this,lu).canStart();try{if(i)r();else{Et(this,ia,Ds).call(this,{type:"pending",variables:t,isPaused:o}),await((l=(a=X(this,Yn).config).onMutate)==null?void 0:l.call(a,t,this,n));const z=await((d=(c=this.options).onMutate)==null?void 0:d.call(c,t,n));z!==this.state.context&&Et(this,ia,Ds).call(this,{type:"pending",context:z,variables:t,isPaused:o})}const N=await X(this,lu).start();return await((p=(f=X(this,Yn).config).onSuccess)==null?void 0:p.call(f,N,t,this.state.context,this,n)),await((v=(g=this.options).onSuccess)==null?void 0:v.call(g,N,t,this.state.context,n)),await((S=(b=X(this,Yn).config).onSettled)==null?void 0:S.call(b,N,null,this.state.variables,this.state.context,this,n)),await((k=(w=this.options).onSettled)==null?void 0:k.call(w,N,null,t,this.state.context,n)),Et(this,ia,Ds).call(this,{type:"success",data:N}),N}catch(N){try{throw await((P=(C=X(this,Yn).config).onError)==null?void 0:P.call(C,N,t,this.state.context,this,n)),await((E=(O=this.options).onError)==null?void 0:E.call(O,N,t,this.state.context,n)),await((A=(_=X(this,Yn).config).onSettled)==null?void 0:A.call(_,void 0,N,this.state.variables,this.state.context,this,n)),await((R=(T=this.options).onSettled)==null?void 0:R.call(T,void 0,N,t,this.state.context,n)),N}finally{Et(this,ia,Ds).call(this,{type:"error",error:N})}}finally{X(this,Yn).runNext(this)}}},qp=new WeakMap,na=new WeakMap,Yn=new WeakMap,lu=new WeakMap,ia=new WeakSet,Ds=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),cn.batch(()=>{X(this,na).forEach(n=>{n.onMutationUpdate(t)}),X(this,Yn).notify({mutation:this,type:"updated",action:t})})},xD);function xF(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Da,Ro,Zp,wD,Wce=(wD=class extends Od{constructor(t={}){super();at(this,Da);at(this,Ro);at(this,Zp);this.config=t,De(this,Da,new Set),De(this,Ro,new Map),De(this,Zp,0)}build(t,r,n){const i=new Fce({client:t,mutationCache:this,mutationId:++og(this,Zp)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){X(this,Da).add(t);const r=Cg(t);if(typeof r=="string"){const n=X(this,Ro).get(r);n?n.push(t):X(this,Ro).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(X(this,Da).delete(t)){const r=Cg(t);if(typeof r=="string"){const n=X(this,Ro).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&X(this,Ro).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Cg(t);if(typeof r=="string"){const n=X(this,Ro).get(r),i=n==null?void 0:n.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=Cg(t);if(typeof r=="string"){const i=(n=X(this,Ro).get(r))==null?void 0:n.find(o=>o!==t&&o.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){cn.batch(()=>{X(this,Da).forEach(t=>{this.notify({type:"removed",mutation:t})}),X(this,Da).clear(),X(this,Ro).clear()})}getAll(){return Array.from(X(this,Da))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>n2(r,n))}findAll(t={}){return this.getAll().filter(r=>n2(t,r))}notify(t){cn.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return cn.batch(()=>Promise.all(t.map(r=>r.continue().catch(Xn))))}},Da=new WeakMap,Ro=new WeakMap,Zp=new WeakMap,wD);function Cg(e){var t;return(t=e.options.scope)==null?void 0:t.id}var La,Zs,mi,Ba,Ya,nv,gk,SD,Hce=(SD=class extends Od{constructor(r,n){super();at(this,Ya);at(this,La);at(this,Zs);at(this,mi);at(this,Ba);De(this,La,r),this.setOptions(n),this.bindMethods(),Et(this,Ya,nv).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var i;const n=this.options;this.options=X(this,La).defaultMutationOptions(r),Rv(this.options,n)||X(this,La).getMutationCache().notify({type:"observerOptionsUpdated",mutation:X(this,mi),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Pu(n.mutationKey)!==Pu(this.options.mutationKey)?this.reset():((i=X(this,mi))==null?void 0:i.state.status)==="pending"&&X(this,mi).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=X(this,mi))==null||r.removeObserver(this)}onMutationUpdate(r){Et(this,Ya,nv).call(this),Et(this,Ya,gk).call(this,r)}getCurrentResult(){return X(this,Zs)}reset(){var r;(r=X(this,mi))==null||r.removeObserver(this),De(this,mi,void 0),Et(this,Ya,nv).call(this),Et(this,Ya,gk).call(this)}mutate(r,n){var i;return De(this,Ba,n),(i=X(this,mi))==null||i.removeObserver(this),De(this,mi,X(this,La).getMutationCache().build(X(this,La),this.options)),X(this,mi).addObserver(this),X(this,mi).execute(r)}},La=new WeakMap,Zs=new WeakMap,mi=new WeakMap,Ba=new WeakMap,Ya=new WeakSet,nv=function(){var n;const r=((n=X(this,mi))==null?void 0:n.state)??xF();De(this,Zs,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},gk=function(r){cn.batch(()=>{var n,i,o,a,l,c,d,f;if(X(this,Ba)&&this.hasListeners()){const p=X(this,Zs).variables,g=X(this,Zs).context,v={client:X(this,La),meta:this.options.meta,mutationKey:this.options.mutationKey};(r==null?void 0:r.type)==="success"?((i=(n=X(this,Ba)).onSuccess)==null||i.call(n,r.data,p,g,v),(a=(o=X(this,Ba)).onSettled)==null||a.call(o,r.data,null,p,g,v)):(r==null?void 0:r.type)==="error"&&((c=(l=X(this,Ba)).onError)==null||c.call(l,r.error,p,g,v),(f=(d=X(this,Ba)).onSettled)==null||f.call(d,void 0,r.error,p,g,v))}this.listeners.forEach(p=>{p(X(this,Zs))})})},SD),oa,kD,Kce=(kD=class extends Od{constructor(t={}){super();at(this,oa);this.config=t,De(this,oa,new Map)}build(t,r,n){const i=r.queryKey,o=r.queryHash??tO(i,r);let a=this.get(o);return a||(a=new Nce({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(a)),a}add(t){X(this,oa).has(t.queryHash)||(X(this,oa).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=X(this,oa).get(t.queryHash);r&&(t.destroy(),r===t&&X(this,oa).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){cn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return X(this,oa).get(t)}getAll(){return[...X(this,oa).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>r2(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>r2(t,n)):r}notify(t){cn.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){cn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){cn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},oa=new WeakMap,kD),Lr,Gs,Ys,Wc,Hc,Xs,Kc,Vc,PD,Vce=(PD=class{constructor(e={}){at(this,Lr);at(this,Gs);at(this,Ys);at(this,Wc);at(this,Hc);at(this,Xs);at(this,Kc);at(this,Vc);De(this,Lr,e.queryCache||new Kce),De(this,Gs,e.mutationCache||new Wce),De(this,Ys,e.defaultOptions||{}),De(this,Wc,new Map),De(this,Hc,new Map),De(this,Xs,0)}mount(){og(this,Xs)._++,X(this,Xs)===1&&(De(this,Kc,nO.subscribe(async e=>{e&&(await this.resumePausedMutations(),X(this,Lr).onFocus())})),De(this,Vc,Mv.subscribe(async e=>{e&&(await this.resumePausedMutations(),X(this,Lr).onOnline())})))}unmount(){var e,t;og(this,Xs)._--,X(this,Xs)===0&&((e=X(this,Kc))==null||e.call(this),De(this,Kc,void 0),(t=X(this,Vc))==null||t.call(this),De(this,Vc,void 0))}isFetching(e){return X(this,Lr).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return X(this,Gs).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=X(this,Lr).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=X(this,Lr).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(tl(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return X(this,Lr).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=X(this,Lr).get(n.queryHash),o=i==null?void 0:i.state.data,a=Cce(t,o);if(a!==void 0)return X(this,Lr).build(this,n).setData(a,{...r,manual:!0})}setQueriesData(e,t,r){return cn.batch(()=>X(this,Lr).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=X(this,Lr).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=X(this,Lr);cn.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=X(this,Lr);return cn.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=cn.batch(()=>X(this,Lr).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(Xn).catch(Xn)}invalidateQueries(e,t={}){return cn.batch(()=>(X(this,Lr).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=cn.batch(()=>X(this,Lr).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,r);return r.throwOnError||(o=o.catch(Xn)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(Xn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=X(this,Lr).build(this,t);return r.isStaleByTime(tl(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Xn).catch(Xn)}fetchInfiniteQuery(e){return e.behavior=Nv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Xn).catch(Xn)}ensureInfiniteQueryData(e){return e.behavior=Nv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Mv.isOnline()?X(this,Gs).resumePausedMutations():Promise.resolve()}getQueryCache(){return X(this,Lr)}getMutationCache(){return X(this,Gs)}getDefaultOptions(){return X(this,Ys)}setDefaultOptions(e){De(this,Ys,e)}setQueryDefaults(e,t){X(this,Wc).set(Pu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...X(this,Wc).values()],r={};return t.forEach(n=>{wp(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){X(this,Hc).set(Pu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...X(this,Hc).values()],r={};return t.forEach(n=>{wp(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...X(this,Ys).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=tO(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===rO&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...X(this,Ys).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){X(this,Lr).clear(),X(this,Gs).clear()}},Lr=new WeakMap,Gs=new WeakMap,Ys=new WeakMap,Wc=new WeakMap,Hc=new WeakMap,Xs=new WeakMap,Kc=new WeakMap,Vc=new WeakMap,PD),qce=m.createContext(void 0),wF=e=>{const t=m.useContext(qce);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},SF=m.createContext(!1),Zce=()=>m.useContext(SF);SF.Provider;function Gce(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Yce=m.createContext(Gce()),Xce=()=>m.useContext(Yce),Qce=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Jce=e=>{m.useEffect(()=>{e.clearReset()},[e])},ede=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||fF(r,[e.error,n])),tde=e=>{if(e.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},rde=(e,t)=>e.isLoading&&e.isFetching&&!t,nde=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,d2=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function kF(e,t,r){var p,g,v,b,S;const n=Zce(),i=Xce(),o=wF(r),a=o.defaultQueryOptions(e);(g=(p=o.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||g.call(p,a),a._optimisticResults=n?"isRestoring":"optimistic",tde(a),Qce(a,i),Jce(i);const l=!o.getQueryCache().get(a.queryHash),[c]=m.useState(()=>new t(o,a)),d=c.getOptimisticResult(a),f=!n&&e.subscribed!==!1;if(m.useSyncExternalStore(m.useCallback(w=>{const k=f?c.subscribe(cn.batchCalls(w)):Xn;return c.updateResult(),k},[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),m.useEffect(()=>{c.setOptions(a)},[a,c]),nde(a,d))throw d2(a,c,i);if(ede({result:d,errorResetBoundary:i,throwOnError:a.throwOnError,query:o.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw d.error;if((b=(v=o.getDefaultOptions().queries)==null?void 0:v._experimental_afterQuery)==null||b.call(v,a,d),a.experimental_prefetchInRender&&!ku&&rde(d,n)){const w=l?d2(a,c,i):(S=o.getQueryCache().get(a.queryHash))==null?void 0:S.promise;w==null||w.catch(Xn).finally(()=>{c.updateResult()})}return a.notifyOnChangeProps?d:c.trackResult(d)}function ide(e,t){return kF(e,vF,t)}function ode(e,t){const r=wF(t),[n]=m.useState(()=>new Hce(r,e));m.useEffect(()=>{n.setOptions(e)},[n,e]);const i=m.useSyncExternalStore(m.useCallback(a=>n.subscribe(cn.batchCalls(a)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),o=m.useCallback((a,l)=>{n.mutate(a,l).catch(Xn)},[n]);if(i.error&&fF(n.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}function ade(e,t){return kF(e,Uce,t)}var PF=class extends Error{constructor({res:e,url:t,body:{message:r}}){super(`[${e.status}] ${e.statusText}${r?` - ${r}`:""}`),this.name="HttpError",this.status=e.status,this.statusText=e.statusText,this.url=t,this.body={message:r},this.headers=e.headers?Object.fromEntries(e.headers.entries()):{}}},$F=async e=>{const t={...e.headers??{}},r=typeof FormData<"u"&&e.body instanceof FormData;r||(t["Content-Type"]||(t["Content-Type"]="application/json"),t.Accept||(t.Accept="application/json"));const n=await fetch(e.url,{method:e.method,headers:t,body:r?e.body:e.body==null?void 0:JSON.stringify(e.body)}),i=await n.json();if(!n.ok)throw new PF({res:n,url:e.url,body:i});try{return{data:i,headers:n.headers?Object.fromEntries(n.headers.entries()):{},status:n.status}}catch{return{data:i,headers:n.headers?Object.fromEntries(n.headers.entries()):{},status:n.status}}},f2=e=>e.toUpperCase();function CF(e){if(!e)return"";const t=new URLSearchParams;for(const[n,i]of Object.entries(e))if(i!=null){if(typeof i=="string"){t.append(n,i);continue}if(typeof i=="number"||typeof i=="boolean"){t.append(n,String(i));continue}t.append(n,JSON.stringify(i))}const r=t.toString();return r?`?${r}`:""}function sde(e,t){if(!e)return e;const{[t]:r,...n}=e;return n}var p2=e=>{if(!e||typeof e!="object")return;const t=e;if("nextCursor"in t)return t.nextCursor;if("meta"in t){const r=t.meta;if(r&&typeof r=="object"&&"nextCursor"in r)return r.nextCursor}},Cw=e=>{if(typeof console>"u")return;const t=console.debug??console.log;t==null||t.call(console,"[rrroutes-client]",e)},lde=["fetch","invalidate","setData","build","useEndpoint"],h2=()=>{};function ude(e,t){const r={emit:h2,mode:"minimal"};if(t&&t.toLowerCase()==="production"||!e)return r;if(e===!0||e==="minimal")return{emit:(n,i)=>Cw(i?{...n,name:i}:n),mode:"minimal"};if(e==="complete")return{emit:(n,i)=>Cw(i?{...n,name:i}:n),mode:"complete"};if(typeof e=="function")return{emit:(n,i)=>e(i?{...n,name:i}:n),mode:"minimal"};if(typeof e=="object"){const n=e,i=!!n.verbose,o=lde.filter(f=>n[f]);if(o.length===0)return{emit:h2,mode:i?"complete":"minimal"};const a=new Set(o),l=n.only&&n.only.length>0?new Set(n.only):void 0,c=n.logger??Cw;return{emit:(f,p)=>{a.has(f.type)&&(l&&(!p||!l.has(p))||c(p?{...f,name:p}:f))},mode:i?"complete":"minimal"}}return r}function m2(e){return e[0]}function Ow(e){return typeof e>"u"?[]:[e]}function g2(e,t,r,n){const i=e.cfg.paramsSchema?Tv(e.cfg.paramsSchema,r):{},o=e.cfg.querySchema?Tv(e.cfg.querySchema,n):{},a=lF(e.path,i??{});return{url:`${t??""}${a}${CF(o)}`,normalizedQuery:o,normalizedParams:i}}function cde(e){const t=e.queryClient,r=e.fetcher??$F,n=e.baseUrl,i=e.environment??void 0,{emit:o,mode:a}=ude(e.debug,i),l=a==="complete",c=(g,v)=>!l||!v?g:{...g,...v};async function d(g,v=!1){const b=g;await t.invalidateQueries({queryKey:b,exact:v}),o({type:"invalidate",key:b,exact:v})}function f(g,v,b){const S=g.method==="get",w=!!g.cfg.feed,k=g.cfg,C=e.validateResponses,P=f2(g.method),O=!!(k.paramsSchema||k.querySchema),E=`${g.method.toUpperCase()} ${String(g.path)}`,_=b==null?void 0:b.name,A=D=>o(D,_);A({type:"build",leaf:E});let T="pagination_cursor",R,N,z;if(S&&w){const D=v??{},{cursorParam:K,getNextPageParam:te,initialPageParam:fe,...ue}=D;T=K??"pagination_cursor",R=te??(W=>p2(W)),N=typeof fe>"u"?void 0:fe,z=ue}const j=(...D)=>{const K=m2(D),te=K==null?void 0:K.params,fe=K==null?void 0:K.query,ue=S&&w?sde(fe,T):fe;return vce({leaf:g,params:te,query:ue})},B=async(...D)=>{const K=j(...D);await t.invalidateQueries({queryKey:K,exact:!0}),A({type:"invalidate",key:K,exact:!0})},F=(...D)=>{const[K,...te]=D,fe=j(...te);let ue;return S&&w?ue=t.setQueryData(fe,W=>typeof K=="function"?K(W):K):ue=t.setQueryData(fe,W=>typeof K=="function"?K(W):K),A({type:"setData",key:fe}),ue},H=v==null?void 0:v.onReceive,L=async(D,K)=>{var xe;const te=m2(D),fe=te==null?void 0:te.params,ue=(K==null?void 0:K.queryOverride)??(te==null?void 0:te.query),{url:W,normalizedQuery:ee,normalizedParams:he}=g2({...g,cfg:k},n,fe,ue);let G;const ae=!!k.bodySchema,Pe=(K==null?void 0:K.requireBody)??(!S&&ae);if(typeof(K==null?void 0:K.body)<"u"){const be=k.bodySchema?Tv(k.bodySchema,K.body):void 0;Array.isArray(k.bodyFiles)&&k.bodyFiles.length>0&&be&&typeof be=="object"?G=dde(be):G=be}else if(Pe)throw new Error("Body is required when invoking a mutation fetch.");const oe=Date.now(),Ie=l?{params:he,query:ee}:void 0;A(c({type:"fetch",stage:"start",method:P,url:W,leaf:E,...G!==void 0?{body:G}:{}},Ie));try{const be=await r(G===void 0?{url:W,method:P}:{url:W,method:P,body:G});if(A(c({type:"fetch",stage:"fetched",method:P,url:W,leaf:E,durationMs:Date.now()-oe},l?{params:he,query:ee,output:be}:void 0)),C){if(!k.outputSchema)throw new Error(`No output schema defined for leaf ${E}, cannot validate response.`);be.data=Tv(k.outputSchema,be.data),A(c({type:"fetch",stage:"parsed",method:P,url:W,leaf:E,durationMs:Date.now()-oe},l?{params:he,query:ee,output:be}:void 0))}return(xe=K==null?void 0:K.onReceive)==null||xe.call(K,be.data),be.data}catch(be){throw A(c({type:"fetch",stage:"error",method:P,url:W,leaf:E,durationMs:Date.now()-oe,...G!==void 0?{body:G}:{},error:be},Ie)),be}},Z=(...D)=>{const K=!!k.bodySchema,te=D.length,ue=K&&te>(O?1:0),W=ue?D[te-1]:void 0,ee=ue?D.slice(0,te-1):D;return L(ee,{body:W,onReceive:H,requireBody:!1})};if(S&&w)return{getQueryKeys:j,invalidate:B,setData:F,useEndpoint:(...K)=>{const te=K[0],fe=Ow(te),ue=j(...fe);A({type:"useEndpoint",leaf:E,variant:"infiniteGet",keys:ue});const W=te==null?void 0:te.params,ee=te==null?void 0:te.query,he=z??{},G=m.useRef(new Set),ae=m.useCallback(xe=>{var be;(be=he==null?void 0:he.onReceive)==null||be.call(he,xe),G.current.forEach(Ne=>Ne(xe))},[]),Pe=m.useCallback(xe=>(G.current.add(xe),()=>{G.current.delete(xe)}),[]),{normalizedQuery:oe}=g2({...g,cfg:k},n,W,ee);return{...ade({...he,placeholderData:he.placeholderData??a2,initialPageParam:N,getNextPageParam:xe=>(R??p2)(xe),queryKey:ue,queryFn:({pageParam:xe})=>{const be={...oe,...xe?{[T]:xe}:{}};return L(fe,{queryOverride:be,onReceive:ae})}},t),onReceive:Pe}},fetch:Z};if(S)return{getQueryKeys:j,invalidate:B,setData:F,useEndpoint:(...K)=>{const te=K[0],fe=Ow(te),ue=j(...fe);A({type:"useEndpoint",leaf:E,variant:"get",keys:ue}),te==null||te.params,te==null||te.query;const W=v??{},ee=m.useRef(new Set),he=m.useCallback(Pe=>{var oe;(oe=W==null?void 0:W.onReceive)==null||oe.call(W,Pe),ee.current.forEach(Ie=>Ie(Pe))},[]),G=m.useCallback(Pe=>(ee.current.add(Pe),()=>{ee.current.delete(Pe)}),[]);return{...ide({...W,queryKey:j(...fe),placeholderData:a2,queryFn:()=>L(fe,{onReceive:he})},t),onReceive:G}},fetch:Z};const V=v??{},U=async(...D)=>{if(D.length===0)throw new Error("Body is required when invoking a mutation fetch.");const K=D.length-1,te=D.slice(0,K),fe=D[K];return await L(te,{body:fe,onReceive:W=>{var ee;return(ee=V==null?void 0:V.onReceive)==null?void 0:ee.call(V,W)},requireBody:!0})};return{getQueryKeys:j,invalidate:B,setData:F,useEndpoint:(...D)=>{const K=D[0],te=Ow(K),fe=j(...te);A({type:"useEndpoint",leaf:E,variant:"mutation",keys:fe});const ue=m.useRef(new Set),W=m.useCallback(G=>{ue.current.forEach(ae=>ae(G))},[]),ee=m.useCallback(G=>(ue.current.add(G),()=>{ue.current.delete(G)}),[]);return{...ode({...V,mutationKey:fe,mutationFn:async G=>{const ae=await U(...te,G);return W(ae),ae}},t),onReceive:ee}},fetch:U}}return{queryClient:t,invalidate:d,fetch:async g=>{const{path:v,method:b,query:S,body:w,params:k}=g;if(!v||typeof v!="string")throw new Error("fetch(path, ...) requires a non-empty string path.");if(!b)throw new Error("fetch(path, method, ...) requires an HTTP method.");const C=String(b).toLowerCase(),P=f2(C),O=pde(S),E=CF(O),_=hde(v,k),A=`${n??""}${_}${E}`,T=`${P} ${v}`,R=Date.now(),N=l?{params:k,query:O}:void 0;o(c({type:"fetch",stage:"start",method:P,url:A,leaf:T,...w!==void 0?{body:w}:{}},N));try{const z=await r(w===void 0?{url:A,method:P}:{url:A,method:P,body:w});return o(c({type:"fetch",stage:"fetched",method:P,url:A,leaf:T,durationMs:Date.now()-R},l?{params:k,query:O,output:z}:void 0)),z}catch(z){throw o(c({type:"fetch",stage:"error",method:P,url:A,leaf:T,durationMs:Date.now()-R,...w!==void 0?{body:w}:{},error:z},N)),z}},build:f}}function dde(e){const t=new FormData;for(const[r,n]of Object.entries(e??{}))n!=null&&(Array.isArray(n)?n.forEach((i,o)=>t.append(`${r}[${o}]`,i)):t.append(r,n));return t}function fde(e){const t=new Set,r=/:([A-Za-z0-9_]+)/g;let n;for(;(n=r.exec(e))!==null;)t.add(n[1]);return t}function pde(e){if(e==null)return;if(typeof e!="object"||Array.isArray(e))throw new Error("Query must be a plain object (Record<string, string>).");const t={};for(const[r,n]of Object.entries(e))if(n!=null){if(typeof n!="string")throw new Error(`Query param "${r}" must be a string; received type "${typeof n}".`);t[r]=n}return Object.keys(t).length>0?t:void 0}function hde(e,t){const r=fde(e);if(!t||typeof t!="object"||Array.isArray(t)){if(r.size>0)throw new Error(`Missing path parameters for "${e}": ${[...r].join(", ")}`);return e}const n=t,i=new Set(Object.keys(n));for(const o of i){if(!r.has(o))throw new Error(`Unexpected path parameter "${o}" for template "${e}".`);const a=n[o];if(a!=null&&(typeof a=="object"||Array.isArray(a)))throw new Error(`Path parameter "${o}" must be a primitive; received "${typeof a}".`)}for(const o of r)if(!i.has(o))throw new Error(`Missing value for path parameter "${o}" in template "${e}".`);return r.size===0?e:lF(e,n)}Pb([kh(Su()),Su()]);m.createContext(null);const OF=m.createContext(null),v2="rrroutes.docs.baseUrl";function mde({children:e,initialBaseUrl:t}){const[r,n]=m.useState([]),i=typeof window<"u"?window.localStorage.getItem(v2):null,[o,a]=m.useState(i||t);m.useEffect(()=>{typeof window<"u"&&window.localStorage.setItem(v2,o)},[o]);const l=m.useMemo(()=>new Vce({defaultOptions:{queries:{retry:!1}}}),[]),c=m.useMemo(()=>cde({baseUrl:o,queryClient:l,fetcher:async g=>$F(g),validateResponses:!0}),[o,l]),d=m.useMemo(()=>({id:g,method:v,path:b})=>{console.log(g);const S=r.filter(w=>(console.log(w.id),w.log.method===v&&w.log.path===b&&(g?w.id===g:!0)));if(S.length>0)return S[S.length-1]},[r]),f=m.useMemo(()=>async(g,v,b,S)=>{const w=Date.now();let k,C,P=-1,O={};try{const A=await c.fetch({method:g,path:v,body:b.body&&b.body.trim().length>0?JSON.parse(b.body):void 0,query:b.query.reduce((T,R)=>(R.key.trim().length>0&&R.value&&R.enabled&&(T[R.key]=R.value),T),{}),params:b.params.reduce((T,R)=>(R.key.trim().length>0&&R.value&&R.enabled&&(T[R.key]=R.value),T),{})});k=A.data,P=A.status,O=A.headers}catch(A){A instanceof PF?(P=A.status,O=A.headers,C={message:A.body.message,stack:A.stack,name:A.name}):A instanceof Error?C={message:JSON.stringify(A.message),stack:A.stack,name:A.name}:C={message:"An unknown error occurred"}}const E=Date.now(),_={id:S,error:C,log:{durationMs:E-w,method:g,path:v,status:P,name:`${g.toUpperCase()} ${v}`,updatedAt:E,createdAt:w,id:`local-${Math.random().toString(36).substring(2,9)}`,body:b.body?JSON.parse(b.body):void 0,params:b.params.reduce((A,T)=>(T.key.trim().length>0&&T.value&&T.enabled&&(A[T.key]=T.value),A),{}),query:b.query.reduce((A,T)=>(T.key.trim().length>0&&T.value&&T.enabled&&(A[T.key]=T.value),A),{}),headers:O,error:C==null?void 0:C.message,output:k,groupId:void 0,tags:[],fullUrl:""}};return n(A=>[...A,_]),_},[]),p=m.useMemo(()=>({client:c,queryClient:l,baseUrl:o,headers:{},setBaseUrl:a,runs:r,getLastRun:d,fetch:f}),[o,f,d,r,c]);return y.jsx(OF.Provider,{value:p,children:e})}function Ed(){const e=m.useContext(OF);if(!e)throw new Error("useHistoryStore must be used within HistoryProvider");return e}const Ph=["get","post","put","patch","delete"],$u=we.enum(Ph),$h=we.object({id:we.string(),name:we.string(),description:we.string().optional(),groupId:we.string().optional(),tags:we.string().array().optional(),createdAt:we.number(),updatedAt:we.number()}),Ch=we.object({beforeDate:we.string().optional(),afterDate:we.string().optional(),orderBy:we.enum(["timestamp","duration","level","path"]).default("timestamp"),orderDirection:we.enum(["asc","desc"]).default("desc"),searchQuery:we.string().optional(),groups:we.string().array().optional(),excludeGroups:we.string().array().optional(),tags:we.string().array().optional(),excludeTags:we.string().array().optional(),cursor:we.string().optional()}),Oh=we.object({cursor:we.string().optional(),pageSize:we.coerce.number().optional()}),Eh=we.object({totalCount:we.number().optional(),nextCursor:we.string().optional()}),vk=we.enum(["hit","miss","set","delete"]),EF=$h.extend({operation:vk,value:we.any().nullable(),size:we.number().optional()}),y2=Ch.extend({operations:vk.array().optional(),excludeOperations:vk.array().optional(),keys:we.array(we.string()).optional()});we.object({key:we.string(),lastSetAt:we.number().nullable(),lastHitAt:we.number().nullable(),lastMissAt:we.number().nullable(),totalHits:we.number(),totalMisses:we.number(),totalSets:we.number()});const gde=va("cache").get({feed:!0,outputSchema:EF.array(),querySchema:y2,outputMetaSchema:Eh,queryExtensionSchema:Oh}).sub(va("clear").post({outputSchema:we.object({success:we.boolean()}),querySchema:y2}).done()).done(),yk=we.enum(["info","warning","error","debug","trace"]),_F=$h.extend({level:yk,meta:we.any().optional()}),vde=Ch.extend({level:yk.array().optional(),excludeLevel:yk.array().optional()}),yde=va("logs").get({feed:!0,outputSchema:_F.array(),querySchema:vde,outputMetaSchema:Eh,queryExtensionSchema:Oh}).done(),bk=$h.extend({status:we.number(),body:we.any().optional(),fullUrl:we.string(),path:we.string(),method:$u,query:we.record(we.string(),we.any()).optional(),params:we.record(we.string(),we.any()).optional(),output:we.any().optional(),headers:we.record(we.string(),we.any()).optional(),error:we.string().optional(),durationMs:we.number(),ip:we.string().optional(),userAgent:we.string().optional()}),bde=Ch.extend({methods:$u.array().default([]),excludeMethods:$u.array().optional(),statuses:we.coerce.number().array().default([]),excludeStatuses:we.coerce.number().array().optional(),path:we.string().optional(),endpointKeys:we.string().array().optional(),excludeEndpointKeys:we.string().array().optional()}),xde=va("requests").get({feed:!0,outputSchema:bk.array(),querySchema:bde,outputMetaSchema:Eh,queryExtensionSchema:Oh}).sub(va(":requestId",void 0,we.string()).get({outputSchema:bk.extend({logs:we.array(_F),caches:we.array(EF)})}).done()).done(),wde=["object","string","number","boolean","bigint","date","array","enum","literal","union","record","tuple","unknown","any"],Yl=we.lazy(()=>we.object({kind:we.enum(wde),optional:we.boolean().optional(),nullable:we.boolean().optional(),description:we.string().optional(),properties:we.record(we.string(),Yl).optional(),element:Yl.optional(),union:we.array(Yl).optional(),literal:we.unknown().optional(),enumValues:we.array(we.string()).optional()})),IF=["experimental","beta","stable","deprecated"],xk=we.enum(IF),b2=$h.extend({method:$u,path:we.string(),contract:we.object({body:Yl.optional(),query:Yl.optional(),output:Yl.optional(),params:Yl.optional(),bodyFiles:we.array(we.object({name:we.string(),maxCount:we.number()})).optional()}),feed:we.boolean().optional(),summary:we.string().optional(),stability:xk,hidden:we.boolean().optional(),meta:we.record(we.string(),we.string()),implemented:we.boolean().optional()}),Sde=Ch.extend({methods:$u.array().optional(),excludeMethods:$u.array().optional(),path:we.string().optional(),stability:xk.array().optional(),excludeStability:xk.array().optional()}),kde=va("endpoints").get({feed:!0,querySchema:Sde,outputSchema:b2.array(),outputMetaSchema:Eh,queryExtensionSchema:Oh}).sub(va(":endpointId",void 0,we.string()).get({outputSchema:b2.extend({requests:we.array(bk),volumeTS:we.array(we.object({timestamp:we.number(),count:we.number()})),averageDurationMs:we.number(),successRate:we.number(),latestErrorRequestIds:we.array(we.string())})}).done()).done(),Rf=$h.extend({operations:we.array(we.object({name:we.string(),description:we.string().optional(),stepNumber:we.number(),endpointId:we.string().optional(),method:$u,path:we.string(),body:we.json().optional(),extraHeaders:we.record(we.string(),we.any()).optional(),query:we.record(we.string(),we.any()).optional()}))}),Pde=Ch.extend({name:we.string().optional(),excludeName:we.string().optional()}),$de=va("presets").get({feed:!0,querySchema:Pde,outputMetaSchema:Eh,outputSchema:Rf.array(),queryExtensionSchema:Oh}).post({bodySchema:Rf,outputSchema:Rf}).put({bodySchema:Rf,outputSchema:Rf}).done(),Cde=va().sub(va("/__rrroutes").sub(kde,xde,yde,gde,$de).done()).done(),oO=Sce(Cde);function Un(e,t){const{client:r}=Ed();return m.useMemo(()=>r.build(oO.byKey[e],t),[r,e,t])}const jF=m.createContext(null);function Ode({children:e}){const[t,r]=m.useState([]),[n,i]=m.useState(null),o=f=>{r(p=>[...p,f])},a=({id:f,method:p,path:g})=>t.filter(v=>v.method!==p||v.path!==g?!1:f?v.id===f:!0).slice(-1)[0],l=m.useCallback(f=>{i(f)},[]),c=m.useCallback(f=>!n||f&&(f.method&&n.method!==f.method||f.path&&n.path!==f.path||f.leafKey&&n.leafKey!==f.leafKey)?null:(i(null),n),[n]),d=m.useMemo(()=>({runs:t,addRun:o,getLastRun:a,queuePrefill:l,consumePrefill:c}),[t,l,c]);return y.jsx(jF.Provider,{value:d,children:e})}function Cb(){const e=m.useContext(jF);if(!e)throw new Error("usePlaygroundRuns must be used within PlaygroundRunsProvider");return e}const wk="tab",Sk="layout",Ede=["request","response","meta","metrics","playground"];function x2(e){return e&&Ede.includes(e)?e:"request"}function AF(e){return e==="request"?null:e}function w2(e){return e==="detailsMax"?"details":e==="playgroundMax"?"playground":"split"}function TF(e){return e==="details"?"detailsMax":e==="playground"?"playgroundMax":null}function od(e,t){if(!e||!t)return{displayId:"",encodedId:""};try{const r=e.toUpperCase();return{displayId:id(r,t,!1),encodedId:id(r,t,!0)}}catch{const r=`${e.toUpperCase()} ${t}`;return{displayId:r,encodedId:encodeURIComponent(r)}}}function RF(e){const t=id(e.method.toUpperCase(),e.path,!1);return{value:t,display:t,method:e.method,path:e.path}}function MF(e){if(!e)return;const t=e.trim();if(!t)return;const[r,...n]=t.split(" ");if(!r||n.length===0)return;const i=r.toLowerCase();if(!Ph.includes(i))return;const o=n.join(" ").trim();if(!o)return;const a=id(r.toUpperCase(),o,!1);return{value:a,display:a,method:i,path:o}}function _de(e){if(!e)return"";const t=MF(e);return t?id(t.method.toUpperCase(),t.path,!0):encodeURIComponent(e)}function Sp(e,t){const r=encodeURIComponent(e),n=new URLSearchParams,i=t!=null&&t.tab?AF(t.tab):null;i&&n.set(wk,i);const o=t!=null&&t.layout?TF(t.layout):null;o&&n.set(Sk,o),Object.entries((t==null?void 0:t.extraParams)??{}).forEach(([l,c])=>{c!=null&&n.set(l,c)});const a=n.toString();return a?`/routes/${r}?${a}`:`/routes/${r}`}function Bo({title:e,description:t,action:r}){return y.jsx(Pt,{sx:{py:8,px:2,textAlign:"center",color:"text.secondary"},children:y.jsxs(Se,{spacing:2,alignItems:"center",children:[y.jsx(ke,{variant:"h5",color:"text.primary",children:e}),t&&y.jsx(ke,{variant:"body1",color:"text.secondary",maxWidth:480,children:t}),r]})})}const Ide=Mt(y.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"})),ts=Mt(y.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}));function sl({message:e="Something went wrong.",onRetry:t,details:r}){const[n,i]=m.useState(!1);return y.jsx(ai,{elevation:0,sx:{p:4,borderRadius:2,border:"1px solid",borderColor:"divider",bgcolor:"background.default"},children:y.jsxs(Se,{spacing:2,alignItems:"flex-start",children:[y.jsxs(Se,{direction:"row",spacing:2,alignItems:"center",children:[y.jsx(Ide,{color:"error",fontSize:"large"}),y.jsxs(Pt,{children:[y.jsx(ke,{variant:"h6",children:"We hit a snag"}),y.jsx(ke,{color:"text.secondary",children:e})]})]}),t&&y.jsx(Ut,{variant:"contained",color:"primary",onClick:t,children:"Retry"}),r&&y.jsxs(Pt,{sx:{width:"100%"},children:[y.jsx(Ut,{size:"small",startIcon:y.jsx(ts,{sx:{transform:n?"rotate(180deg)":"rotate(0deg)",transition:"transform 150ms ease"}}),onClick:()=>i(o=>!o),children:n?"Hide details":"Show details"}),y.jsx(fp,{in:n,children:y.jsx(Pt,{component:"pre",sx:{mt:1,p:2,borderRadius:1,bgcolor:"background.paper",overflowX:"auto",typography:"body2"},children:r})})]})]})})}function ll({variant:e="inline"}){return e==="table"?y.jsx(Se,{spacing:1.5,children:Array.from({length:5}).map((t,r)=>y.jsx(kw,{variant:"rectangular",height:40,sx:{borderRadius:1}},r))}):e==="full"?y.jsxs(Pt,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",py:8,gap:2},children:[y.jsx(t$,{size:32}),y.jsx(ke,{color:"text.secondary",children:"Loading data..."})]}):y.jsxs(Se,{spacing:1,children:[y.jsx(kw,{variant:"text",width:"60%"}),y.jsx(kw,{variant:"text",width:"40%"})]})}const jde=Mt(y.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"})),Ade=Mt(y.jsx("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"})),Tde=Mt(y.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}));function aO({open:e,onClose:t,title:r,children:n,onPrev:i,onNext:o}){const a=qr(),l=Doe(a.breakpoints.down("sm")),c=typeof r=="string"?y.jsx(ke,{variant:"h6",component:"h2",sx:{flex:1,minWidth:0},children:r}):y.jsx(Pt,{sx:{flex:1,minWidth:0},children:r});return y.jsxs(dre,{open:e,onClose:t,fullWidth:!0,maxWidth:"md",fullScreen:l,scroll:"paper",PaperProps:{sx:{backgroundColor:"background.paper",borderRadius:{xs:0,sm:3},minHeight:{sm:360},display:"flex",flexDirection:"column"}},children:[y.jsxs(Se,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{px:{xs:2,sm:3},py:2,borderBottom:"1px solid",borderColor:"divider",gap:1},children:[y.jsxs(Se,{direction:"row",spacing:1,alignItems:"center",sx:{minWidth:0},children:[y.jsx(ei,{"aria-label":"Previous item",size:"small",onClick:i,disabled:!i,children:y.jsx(jde,{fontSize:"small"})}),c,y.jsx(ei,{"aria-label":"Next item",size:"small",onClick:o,disabled:!o,children:y.jsx(Ade,{fontSize:"small"})})]}),y.jsx(ei,{"aria-label":"Close detail dialog",onClick:t,children:y.jsx(Tde,{})})]}),y.jsx(gre,{sx:{p:{xs:2,sm:3},flex:1,overflowY:"auto"},children:n})]})}const Rde=Mt(y.jsx("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"})),Mde=Mt(y.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}));function la({value:e,collapsedLines:t=20,title:r}){const[n,i]=m.useState(!1),o=m.useMemo(()=>{try{return JSON.stringify(e??null,null,2)}catch{return"<< Unable to render JSON >>"}},[e]),a=async()=>{if(!(typeof navigator>"u"||!navigator.clipboard))try{await navigator.clipboard.writeText(o),i(!0),setTimeout(()=>i(!1),1500)}catch(l){console.error("Failed to copy JSON",l)}};return y.jsxs(Se,{spacing:1,children:[y.jsxs(Se,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[y.jsx(ke,{variant:"subtitle2",color:"text.secondary",children:r||"Output"}),y.jsx(g4,{title:n?"Copied!":"Copy JSON",placement:"top",children:y.jsx(ei,{size:"small",onClick:a,children:y.jsx(Mde,{fontSize:"inherit"})})})]}),y.jsx(Pt,{component:"pre",sx:{m:0,p:2,borderRadius:2,bgcolor:"background.default",border:"1px solid",borderColor:"divider",fontFamily:"monospace",fontSize:"0.85rem",lineHeight:1.6,maxHeight:`${t*1.6}rem`,overflow:"auto"},children:o})]})}const Nde={hit:"#66bb6a",miss:"#ffa726",set:"#42a5f5",delete:"#ef5350"};function sO({operation:e,state:t="display",onClick:r}){const n=qr(),i=Nde[e],o=t==="exclude",a=t==="none",l=o?n.palette.error.main:i,c=o?yi(l,.3):t==="display"||t==="include"?yi(i,.2):"transparent";return y.jsx(ri,{label:e.toUpperCase(),size:"small",onClick:r,variant:"outlined",sx:{borderColor:a?"divider":l,color:a?"text.secondary":l,bgcolor:c,fontWeight:600,opacity:a?.75:1,cursor:r?"pointer":"default"}})}function zde(e){const t=qr(),r=e.toLowerCase();return t.palette.http[r]||t.palette.text.primary}function _d({method:e,state:t,selected:r=!1,onClick:n}){const i=qr(),o=zde(e),a=t??(r?"include":"display"),l=a==="exclude",c=a==="none",d=l?i.palette.error.main:o,f=l?yi(d,.3):c?yi(o,.08):yi(o,.35);return y.jsx(ri,{label:e.toUpperCase(),size:"small",variant:"outlined",clickable:!!n,onClick:n,sx:{borderColor:d,color:d,bgcolor:f,fontWeight:600,opacity:c?.7:1},"aria-pressed":a==="include"})}const Dde={info:"#42a5f5",warning:"#ffa726",error:"#ef5350",debug:"#ab47bc",trace:"#26a69a"};function Ob({level:e,state:t,selected:r,onClick:n}){const i=qr(),o=Dde[e],a=t??(r?"include":"display"),l=a==="exclude",c=a==="none",d=l?i.palette.error.main:o,f=l?yi(d,.3):c?void 0:yi(o,.2);return y.jsx(ri,{label:e.toUpperCase(),size:"small",variant:"outlined",clickable:!!n,onClick:n,sx:{borderColor:d,color:d,bgcolor:f,fontWeight:600,opacity:c?.7:1}})}function Lde(e){const t=qr();return e<0?t.palette.text.secondary:e>=500?t.palette.status.error:e>=400?t.palette.status.warning:e>=300?t.palette.text.secondary:e>=200?t.palette.status.success:t.palette.text.secondary}function Eb({status:e,state:t="display",onClick:r}){const n=qr(),i=Lde(e),o=t==="exclude",a=t==="none",l=o?n.palette.error.main:i;return y.jsx(ri,{label:e>0?e:"—",size:"small",variant:"outlined",onClick:r,sx:{borderColor:a?"divider":l,color:a?"text.secondary":l,bgcolor:t==="display"||t==="include"?yi(i,.15):o?yi(l,.25):"transparent",fontWeight:600,cursor:r?"pointer":"default",opacity:a?.75:1}})}function Bde({request:e,caches:t=[],logs:r=[],onReplay:n}){return y.jsxs(Se,{spacing:3,children:[y.jsxs(Se,{spacing:1,children:[y.jsxs(Se,{direction:"row",spacing:1,alignItems:"center",children:[y.jsx(_d,{method:e.method}),y.jsx(ke,{sx:{fontFamily:"monospace"},children:e.path})]}),y.jsxs(Se,{direction:{xs:"column",sm:"row"},spacing:1,children:[y.jsxs(Se,{direction:"row",spacing:1,alignItems:"center",children:[y.jsx(Eb,{status:e.status}),y.jsxs(ke,{variant:"body2",color:"text.secondary",children:[e.durationMs," ms"]})]}),y.jsx(ke,{variant:"body2",color:"text.secondary",children:new Date(e.createdAt).toLocaleString()})]})]}),y.jsx(gp,{}),y.jsxs(Mf,{title:"Request",children:[y.jsx(la,{title:"Params",value:e.params}),y.jsx(la,{title:"Query",value:e.query}),y.jsx(la,{title:"Headers",value:e.headers}),y.jsx(la,{title:"Body",value:e.body})]}),y.jsxs(Mf,{title:"Response",children:[y.jsx(la,{title:"Output",value:e.output}),e.error&&y.jsx(la,{title:"Error",value:e.error})]}),y.jsx(Mf,{title:"Cache",children:t.length?y.jsx(Se,{spacing:1.5,children:t.map(i=>y.jsx(Ude,{cache:i},i.id))}):y.jsx(S2,{text:"No cache activity for this request."})}),y.jsx(Mf,{title:"Logs",children:r.length?y.jsx(Se,{spacing:1,children:r.map(i=>y.jsx(Fde,{log:i},i.id))}):y.jsx(S2,{text:"No logs recorded for this request."})}),n&&y.jsx(Mf,{title:"Actions",children:y.jsx(Ut,{variant:"contained",startIcon:y.jsx(Rde,{}),onClick:()=>n(e),children:"Replay in Playground"})})]})}function Mf({title:e,children:t}){return y.jsxs(Se,{spacing:1,children:[y.jsx(ke,{variant:"subtitle1",children:e}),y.jsx(Se,{spacing:1,children:t})]})}function S2({text:e}){return y.jsx(ke,{variant:"body2",color:"text.secondary",children:e})}function Ude({cache:e}){return y.jsxs(Se,{spacing:1,sx:{p:1.5,borderRadius:2,border:"1px solid",borderColor:"divider",bgcolor:"background.default"},children:[y.jsxs(Se,{direction:{xs:"column",sm:"row"},spacing:1,alignItems:{xs:"flex-start",sm:"center"},justifyContent:"space-between",children:[y.jsxs(Se,{direction:"row",spacing:1,alignItems:"center",children:[y.jsx(sO,{operation:e.operation}),y.jsx(ke,{variant:"body2",sx:{fontFamily:"monospace"},children:e.name??"Cache entry"})]}),y.jsx(ke,{variant:"body2",color:"text.secondary",children:new Date(e.createdAt).toLocaleString()})]}),typeof e.size=="number"&&y.jsxs(ke,{variant:"caption",color:"text.secondary",children:["Size: ",e.size," bytes"]}),y.jsx(la,{title:"Value",value:e.value,collapsedLines:10})]})}function Fde({log:e}){return y.jsxs(Se,{direction:"row",spacing:1,alignItems:"flex-start",sx:{p:1.25,borderRadius:2,border:"1px solid",borderColor:"divider",bgcolor:"background.default"},children:[y.jsx(Ob,{level:e.level}),y.jsxs(Se,{spacing:.5,sx:{flex:1},children:[y.jsx(ke,{variant:"body2",children:Wde(e)}),y.jsx(ke,{variant:"caption",color:"text.secondary",children:new Date(e.createdAt).toLocaleString()})]})]})}function Wde(e){if(typeof e.meta=="string")return e.meta;if(e.meta&&typeof e.meta=="object"&&"message"in e.meta){const r=e.meta.message;return typeof r=="string"?r:JSON.stringify(r)}return JSON.stringify(e.meta)}function lO({open:e,request:t,requestId:r,onClose:n,onReplay:i,onPrev:o,onNext:a}){const l=(t==null?void 0:t.id)??r??"",c=m.useMemo(()=>({enabled:e&&!!l}),[e,l]),d=Un("GET /__rrroutes/requests/:requestId",c),{data:f,isLoading:p,error:g,refetch:v}=d.useEndpoint({params:{requestId:l}}),b=(f==null?void 0:f.out)??t;return y.jsx(aO,{open:e,onClose:n,title:t?`${t.method.toUpperCase()} ${t.path}`:"Request details",onPrev:o,onNext:a,children:y.jsxs(Se,{spacing:2,children:[p&&y.jsx(dh,{}),b?y.jsx(Bde,{request:b,caches:f==null?void 0:f.out.caches,logs:f==null?void 0:f.out.logs,onReplay:i}):y.jsx(ke,{color:"text.secondary",children:"Select a request to see details."}),g?y.jsx(Wa,{severity:"error",action:y.jsx(Ut,{color:"inherit",size:"small",onClick:()=>v(),children:"Retry"}),children:"Failed to load cache and log details."}):null]})})}function sr({title:e,actions:t,children:r,flex:n}){const i=!!(e||t);return y.jsx(i4,{sx:{bgcolor:"background.paper",flex:n},children:y.jsxs(gte,{children:[i&&y.jsxs(Se,{direction:{xs:"column",sm:"row"},alignItems:{xs:"flex-start",sm:"center"},justifyContent:"space-between",spacing:2,mb:2,children:[e&&y.jsx(ke,{variant:"h6",component:"h2",children:e}),t&&y.jsx(Pt,{children:t})]}),y.jsx(Pt,{children:r})]})})}const Hde=Mt(y.jsx("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}));function iv({schema:e,title:t}){return e?y.jsxs(Se,{spacing:1,children:[t&&y.jsx(ke,{variant:"subtitle2",color:"text.primary",children:t}),y.jsx(Kde,{schema:e})]}):y.jsxs(Se,{spacing:.5,children:[t&&y.jsx(ke,{variant:"subtitle2",color:"text.primary",children:t}),y.jsx(ke,{variant:"body2",color:"text.secondary",children:"No schema provided."})]})}function Kde({schema:e}){const[t,r]=m.useReducer((i,o)=>{switch(o.type){case"toggle":return{...i,[o.path]:o.value!==void 0?o.value:!i[o.path]};case"setAll":{const a={},l=(c,d)=>{DF(c)&&(a[d]=o.value),zF(c,d).forEach(({schema:f,path:p})=>l(f,p))};return l(e,"root"),a}default:return i}},{}),n=(i,o)=>{r({type:"toggle",path:i,value:o})};return y.jsxs(Se,{spacing:1,children:[y.jsxs(n4,{size:"small",children:[y.jsx(Ut,{onClick:()=>r({type:"setAll",value:!1}),children:"Expand all"}),y.jsx(Ut,{onClick:()=>r({type:"setAll",value:!0}),children:"Collapse all"})]}),y.jsx(NF,{schema:e,path:"root",depth:0,collapsed:t,toggle:n})]})}function NF({schema:e,path:t,depth:r,collapsed:n,toggle:i,propertyName:o}){const a=LF(e),l=e.optional||e.nullable,c=m.useMemo(()=>zF(e,t),[e,t]),d=DF(e),f=n[t];return y.jsx(Pt,{sx:{borderLeft:r?"1px solid":"none",borderColor:"rgba(255,255,255,0.08)",pl:r?2:0,ml:r?1:0,py:.75},children:y.jsxs(Se,{spacing:.25,children:[y.jsxs(Se,{direction:"row",spacing:1,alignItems:"center",flexWrap:"wrap",children:[d&&y.jsx(ei,{size:"small",onClick:()=>i(t),sx:{p:.25},children:f?y.jsx(ts,{fontSize:"small"}):y.jsx(Hde,{fontSize:"small"})}),o&&y.jsx(ke,{variant:"body2",sx:{fontFamily:"monospace",color:"text.primary"},children:o}),y.jsx(ke,{variant:"body2",color:"text.secondary",children:a}),l&&y.jsxs(Se,{direction:"row",spacing:.5,useFlexGap:!0,flexWrap:"wrap",children:[e.optional&&y.jsx(k2,{label:"optional"}),e.nullable&&y.jsx(k2,{label:"nullable"})]})]}),e.description&&y.jsx(ke,{variant:"caption",color:"text.secondary",children:e.description}),!f&&c.map(({schema:p,propertyName:g,path:v})=>y.jsx(NF,{schema:p,propertyName:g,path:v,depth:r+1,collapsed:n,toggle:i},v))]})})}function zF(e,t){var r;switch(e.kind){case"object":return e.properties?Object.entries(e.properties).map(([n,i])=>({schema:i,propertyName:n,path:`${t}.${n}`})):[];case"array":return e.element?[{schema:e.element,propertyName:"items",path:`${t}.items`}]:[];case"union":return((r=e.union)==null?void 0:r.map((n,i)=>({schema:n,propertyName:`option ${i+1}`,path:`${t}.option${i+1}`})))??[];default:return[]}}function DF(e){return["object","array","union"].includes(e.kind)}function LF(e){switch(e.kind){case"object":return"object";case"array":return`array<${e.element?LF(e.element):"unknown"}>`;case"enum":return"enum";case"union":return"union";case"literal":return"literal";default:return e.kind}}function k2({label:e}){return y.jsx(Pt,{component:"span",sx:{border:"1px solid",borderColor:"divider",borderRadius:1,px:.75,py:.25,fontSize:"0.7rem",textTransform:"uppercase",letterSpacing:.5,color:"text.secondary"},children:e})}const BF=Mt(y.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"})),kk=Mt(y.jsx("path",{d:"M8 5v14l11-7z"})),UF=Mt(y.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}));function FF({method:e,path:t,contract:r,summary:n,onOpenStandalone:i}){const{fetch:o}=Ed(),{addRun:a,getLastRun:l,consumePrefill:c}=Cb(),[d,f]=m.useState(null),[p,g]=m.useState(!1),[v,b]=m.useState(null),S=()=>({params:Og(r==null?void 0:r.params),query:Og(r==null?void 0:r.query),body:r!=null&&r.body?JSON.stringify({},null,2):""}),[w,k]=m.useState(S);m.useEffect(()=>{const E=c({method:e,path:t});k(E?{params:$2(Og(r==null?void 0:r.params),E.params),query:$2(Og(r==null?void 0:r.query),E.query),body:Vde(E.body,!!(r!=null&&r.body))}:S()),f(null),b(null)},[c,e,t]);const C=m.useMemo(()=>l({method:e,path:t,id:d}),[d,e,t,l]),P=async()=>{var A;let E;if(w.body)try{E=JSON.parse(w.body),b(null)}catch{b("Invalid JSON body");return}const _=`run-${Date.now()}`;f(_),g(!0);try{const T=await o(e,t,w,_),R=C2(w.params),N=C2(w.query);a({id:T.id,method:T.log.method,path:T.log.path,createdAt:T.log.createdAt,durationMs:T.log.durationMs,status:T.log.status,response:T.log.output,errorMessage:(A=T.error)==null?void 0:A.message,headers:T.log.headers,request:{params:R,query:N,body:E,headers:{}}})}catch(T){console.error("Playground run failed",T)}finally{g(!1)}},O=()=>{i==null||i(w)};return y.jsxs(Se,{spacing:3,children:[y.jsxs(Se,{spacing:.5,children:[y.jsxs(ke,{variant:"h6",children:[e.toUpperCase()," ",t]}),n?y.jsx(ke,{variant:"body2",color:"text.secondary",children:n}):null]}),y.jsx(ke,{variant:"body1",color:"text.secondary",children:"Execute this endpoint directly and inspect the response. Use the contract as a guide when filling params, query, and body."}),y.jsxs(Se,{spacing:2,children:[y.jsx(P2,{title:"Path parameters",rows:w.params,onChange:E=>k(_=>({..._,params:E}))}),y.jsx(P2,{title:"Query parameters",rows:w.query,onChange:E=>k(_=>({..._,query:E}))}),y.jsxs(ah,{defaultExpanded:!0,children:[y.jsx(lh,{expandIcon:y.jsx(ts,{}),children:y.jsx(ke,{variant:"subtitle1",children:"Body"})}),y.jsx(sh,{children:y.jsx(wr,{placeholder:"JSON body",multiline:!0,minRows:8,fullWidth:!0,value:w.body,onChange:E=>k(_=>({..._,body:E.target.value})),error:!!v,helperText:v||"Leave empty for no body"})})]})]}),y.jsxs(Se,{direction:"row",spacing:1,justifyContent:"flex-end",children:[i?y.jsx(Ut,{variant:"outlined",onClick:O,children:"Open playground screen"}):null,y.jsx(Ut,{variant:"contained",onClick:P,disabled:p,startIcon:y.jsx(kk,{}),children:p?"Running...":"Run"})]}),y.jsx(gp,{}),y.jsxs(Se,{spacing:2,children:[y.jsx(ke,{variant:"h6",children:"Last run"}),C?y.jsxs(Se,{spacing:2,children:[y.jsxs(Se,{direction:"row",spacing:2,alignItems:"center",children:[y.jsx(Eb,{status:C.status}),y.jsxs(ke,{variant:"body2",color:"text.secondary",children:["Duration: ",C.durationMs," ms"]}),y.jsxs(ke,{variant:"body2",color:"text.secondary",children:["Ran at ",new Date(C.createdAt).toLocaleTimeString()]})]}),C.errorMessage&&y.jsxs(ke,{color:"error",children:["Error: ",C.errorMessage]}),y.jsx(la,{value:C.response,title:"Response body"})]}):y.jsx(ke,{color:"text.secondary",children:"Run the endpoint to see output."})]})]})}function P2({title:e,rows:t,onChange:r}){const n=(a,l)=>{const c=t.map((d,f)=>f===a?{...d,...l}:d);r(c)},i=a=>{const l=t.filter((c,d)=>d!==a);r(l)},o=()=>{r([...t,{key:"",value:"",enabled:!0}])};return y.jsxs(ah,{defaultExpanded:!0,children:[y.jsx(lh,{expandIcon:y.jsx(ts,{}),children:y.jsx(ke,{variant:"subtitle1",children:e})}),y.jsx(sh,{children:y.jsxs(Se,{spacing:1.5,children:[t.length===0&&y.jsx(ke,{variant:"body2",color:"text.secondary",children:'No fields defined. Use "Add" to create one.'}),t.map((a,l)=>y.jsxs(Se,{direction:{xs:"column",sm:"row"},spacing:1,alignItems:"center",children:[y.jsx(jte,{checked:a.enabled,onChange:c=>n(l,{enabled:c.target.checked})}),y.jsx(wr,{label:"Key",value:a.key,onChange:c=>n(l,{key:c.target.value}),sx:{flexGrow:1}}),y.jsx(wr,{label:"Value",value:a.value,onChange:c=>n(l,{value:c.target.value}),sx:{flexGrow:2}}),y.jsx(ei,{onClick:()=>i(l),children:y.jsx(UF,{})})]},`${a.key}-${l}`)),y.jsx(Ut,{size:"small",variant:"outlined",startIcon:y.jsx(BF,{}),onClick:o,sx:{alignSelf:"flex-start"},children:"Add field"})]})})]})}function $2(e,t){if(!t)return e;const r=e.map(o=>{const a=t[o.key];return a==null?o:{...o,value:String(a),enabled:!0}}),n=new Set(e.map(o=>o.key)),i=Object.entries(t).filter(([o])=>!n.has(o)).map(([o,a])=>({key:o,value:a==null?"":String(a),enabled:!0}));return[...r,...i]}function Og(e){return e?e.kind==="object"&&e.properties?Object.keys(e.properties).map(t=>({key:t,value:"",enabled:!0})):[]:[]}function C2(e){return e.reduce((t,r)=>(r.enabled&&r.key.trim()&&(t[r.key.trim()]=r.value),t),{})}function Vde(e,t){if(e==null)return t?JSON.stringify({},null,2):"";if(typeof e=="string")return e;try{return JSON.stringify(e,null,2)}catch{return t?JSON.stringify({},null,2):""}}function WF({requests:e,onSelect:t}){return y.jsx(lb,{component:ai,variant:"outlined",children:y.jsxs(ob,{size:"small",children:[y.jsx(ub,{children:y.jsxs(al,{children:[y.jsx(Ot,{children:"Timestamp"}),y.jsx(Ot,{children:"Method"}),y.jsx(Ot,{children:"Path"}),y.jsx(Ot,{children:"Status"}),y.jsx(Ot,{align:"right",children:"Duration"})]})}),y.jsx(sb,{children:e.map((r,n)=>y.jsxs(al,{hover:!0,sx:{cursor:"pointer"},onClick:()=>t(r,n),children:[y.jsx(Ot,{children:new Date(r.createdAt).toLocaleString()}),y.jsx(Ot,{children:y.jsx(_d,{method:r.method})}),y.jsx(Ot,{sx:{fontFamily:"monospace"},children:r.path}),y.jsx(Ot,{children:y.jsx(Eb,{status:r.status})}),y.jsxs(Ot,{align:"right",children:[r.durationMs," ms"]})]},r.id))})]})})}const qde=30,O2=10;function Zde({endpointKey:e,onSelectRequest:t,onRequestsChange:r}){const[n,i]=m.useState(!1),o=Un("GET /__rrroutes/requests",{cursorParam:"cursor",getNextPageParam(w){var k;return(k=w.meta)==null?void 0:k.nextCursor},enabled:!!e}),{data:a,isLoading:l,error:c,refetch:d,fetchNextPage:f,hasNextPage:p,isFetchingNextPage:g}=o.useEndpoint({query:{endpointKeys:e?[e]:void 0,pageSize:qde}});m.useEffect(()=>{i(!1)},[e]);const v=m.useMemo(()=>a?(Array.isArray(a.pages)?a.pages:[]).flatMap(k=>Array.isArray(k==null?void 0:k.out)?k.out:[]).sort((k,C)=>C.createdAt-k.createdAt):[],[a]);m.useEffect(()=>{r==null||r(v)},[v,r]);const b=n?v:v.slice(0,O2),S=(w,k)=>{const C=n?k:v.findIndex(P=>P.id===w.id);t(w,C>=0?C:k)};return y.jsx(sr,{title:"Requests feed",actions:v.length>O2?y.jsx(Ut,{size:"small",onClick:()=>i(w=>!w),startIcon:y.jsx(ts,{}),children:n?"Collapse":"Show more"}):null,children:y.jsxs(Se,{spacing:2,children:[(l||g)&&y.jsx(dh,{}),c?y.jsxs(ah,{defaultExpanded:!0,children:[y.jsx(lh,{expandIcon:y.jsx(ts,{}),children:y.jsx(ke,{color:"error",children:"Failed to load requests"})}),y.jsx(sh,{children:y.jsxs(Se,{spacing:1,children:[y.jsx(ke,{variant:"body2",color:"text.secondary",children:c instanceof Error?c.message:"Unable to fetch request feed."}),y.jsx(Ut,{size:"small",onClick:()=>d(),children:"Retry"})]})})]}):null,e?v.length===0&&!l?y.jsx(Pt,{sx:{py:3},children:y.jsx(ke,{variant:"body2",color:"text.secondary",align:"center",children:"No recent requests for this endpoint."})}):y.jsx(WF,{requests:b,onSelect:S}):y.jsx(ke,{variant:"body2",color:"text.secondary",children:"Endpoint identifier missing."}),n&&p?y.jsx(Ut,{size:"small",onClick:()=>f(),disabled:g,children:g?"Loading…":"Load more"}):null]})})}function Gde({endpoint:e}){return y.jsxs(Se,{spacing:1,children:[y.jsxs(Se,{direction:"row",spacing:1.5,alignItems:"center",flexWrap:"wrap",useFlexGap:!0,children:[y.jsx(_d,{method:e.method}),y.jsx(ke,{variant:"h6",sx:{fontFamily:"monospace",color:"text.primary"},children:e.path}),y.jsx(ri,{label:e.stability,size:"small",color:"secondary",sx:{textTransform:"capitalize"}})]}),e.summary&&y.jsx(ke,{variant:"body2",color:"text.secondary",children:e.summary})]})}var Yde=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function uO(e){if(typeof e!="string")return!1;var t=Yde;return t.includes(e)}var Xde=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],Qde=new Set(Xde);function HF(e){return typeof e!="string"?!1:Qde.has(e)}function KF(e){return typeof e=="string"&&e.startsWith("data-")}function Si(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(HF(r)||KF(r))&&(t[r]=e[r]);return t}function Cu(e){if(e==null)return null;if(m.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return Si(t)}return typeof e=="object"&&!Array.isArray(e)?Si(e):null}function ii(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(HF(r)||KF(r)||uO(r))&&(t[r]=e[r]);return t}function Jde(e){return e==null?null:m.isValidElement(e)?ii(e.props):typeof e=="object"&&!Array.isArray(e)?ii(e):null}var efe=["children","width","height","viewBox","className","style","title","desc"];function Pk(){return Pk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pk.apply(null,arguments)}function tfe(e,t){if(e==null)return{};var r,n,i=rfe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function rfe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var cO=m.forwardRef((e,t)=>{var{children:r,width:n,height:i,viewBox:o,className:a,style:l,title:c,desc:d}=e,f=tfe(e,efe),p=o||{width:n,height:i,x:0,y:0},g=me("recharts-surface",a);return m.createElement("svg",Pk({},ii(f),{className:g,width:n,height:i,style:l,viewBox:"".concat(p.x," ").concat(p.y," ").concat(p.width," ").concat(p.height),ref:t}),m.createElement("title",null,c),m.createElement("desc",null,d),r)}),nfe=["children","className"];function $k(){return $k=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$k.apply(null,arguments)}function ife(e,t){if(e==null)return{};var r,n,i=ofe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function ofe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Kr=m.forwardRef((e,t)=>{var{children:r,className:n}=e,i=ife(e,nfe),o=me("recharts-layer",n);return m.createElement("g",$k({className:o},ii(i),{ref:t}),r)}),VF=m.createContext(null),afe=()=>m.useContext(VF);function fr(e){return function(){return e}}const qF=Math.cos,zv=Math.sin,Go=Math.sqrt,Dv=Math.PI,_b=2*Dv,Ck=Math.PI,Ok=2*Ck,Fl=1e-6,sfe=Ok-Fl;function ZF(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function lfe(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return ZF;const r=10**t;return function(n){this._+=n[0];for(let i=1,o=n.length;i<o;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class ufe{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?ZF:lfe(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,o,a){this._append`C${+t},${+r},${+n},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(t,r,n,i,o){if(t=+t,r=+r,n=+n,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,l=this._y1,c=n-t,d=i-r,f=a-t,p=l-r,g=f*f+p*p;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(g>Fl)if(!(Math.abs(p*c-d*f)>Fl)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let v=n-a,b=i-l,S=c*c+d*d,w=v*v+b*b,k=Math.sqrt(S),C=Math.sqrt(g),P=o*Math.tan((Ck-Math.acos((S+g-w)/(2*k*C)))/2),O=P/C,E=P/k;Math.abs(O-1)>Fl&&this._append`L${t+O*f},${r+O*p}`,this._append`A${o},${o},0,0,${+(p*v>f*b)},${this._x1=t+E*c},${this._y1=r+E*d}`}}arc(t,r,n,i,o,a){if(t=+t,r=+r,n=+n,a=!!a,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(i),c=n*Math.sin(i),d=t+l,f=r+c,p=1^a,g=a?i-o:o-i;this._x1===null?this._append`M${d},${f}`:(Math.abs(this._x1-d)>Fl||Math.abs(this._y1-f)>Fl)&&this._append`L${d},${f}`,n&&(g<0&&(g=g%Ok+Ok),g>sfe?this._append`A${n},${n},0,1,${p},${t-l},${r-c}A${n},${n},0,1,${p},${this._x1=d},${this._y1=f}`:g>Fl&&this._append`A${n},${n},0,${+(g>=Ck)},${p},${this._x1=t+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function dO(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new ufe(t)}function fO(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function GF(e){this._context=e}GF.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Ib(e){return new GF(e)}function YF(e){return e[0]}function XF(e){return e[1]}function QF(e,t){var r=fr(!0),n=null,i=Ib,o=null,a=dO(l);e=typeof e=="function"?e:e===void 0?YF:fr(e),t=typeof t=="function"?t:t===void 0?XF:fr(t);function l(c){var d,f=(c=fO(c)).length,p,g=!1,v;for(n==null&&(o=i(v=a())),d=0;d<=f;++d)!(d<f&&r(p=c[d],d,c))===g&&((g=!g)?o.lineStart():o.lineEnd()),g&&o.point(+e(p,d,c),+t(p,d,c));if(v)return o=null,v+""||null}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:fr(+c),l):e},l.y=function(c){return arguments.length?(t=typeof c=="function"?c:fr(+c),l):t},l.defined=function(c){return arguments.length?(r=typeof c=="function"?c:fr(!!c),l):r},l.curve=function(c){return arguments.length?(i=c,n!=null&&(o=i(n)),l):i},l.context=function(c){return arguments.length?(c==null?n=o=null:o=i(n=c),l):n},l}function Eg(e,t,r){var n=null,i=fr(!0),o=null,a=Ib,l=null,c=dO(d);e=typeof e=="function"?e:e===void 0?YF:fr(+e),t=typeof t=="function"?t:fr(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?XF:fr(+r);function d(p){var g,v,b,S=(p=fO(p)).length,w,k=!1,C,P=new Array(S),O=new Array(S);for(o==null&&(l=a(C=c())),g=0;g<=S;++g){if(!(g<S&&i(w=p[g],g,p))===k)if(k=!k)v=g,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),b=g-1;b>=v;--b)l.point(P[b],O[b]);l.lineEnd(),l.areaEnd()}k&&(P[g]=+e(w,g,p),O[g]=+t(w,g,p),l.point(n?+n(w,g,p):P[g],r?+r(w,g,p):O[g]))}if(C)return l=null,C+""||null}function f(){return QF().defined(i).curve(a).context(o)}return d.x=function(p){return arguments.length?(e=typeof p=="function"?p:fr(+p),n=null,d):e},d.x0=function(p){return arguments.length?(e=typeof p=="function"?p:fr(+p),d):e},d.x1=function(p){return arguments.length?(n=p==null?null:typeof p=="function"?p:fr(+p),d):n},d.y=function(p){return arguments.length?(t=typeof p=="function"?p:fr(+p),r=null,d):t},d.y0=function(p){return arguments.length?(t=typeof p=="function"?p:fr(+p),d):t},d.y1=function(p){return arguments.length?(r=p==null?null:typeof p=="function"?p:fr(+p),d):r},d.lineX0=d.lineY0=function(){return f().x(e).y(t)},d.lineY1=function(){return f().x(e).y(r)},d.lineX1=function(){return f().x(n).y(t)},d.defined=function(p){return arguments.length?(i=typeof p=="function"?p:fr(!!p),d):i},d.curve=function(p){return arguments.length?(a=p,o!=null&&(l=a(o)),d):a},d.context=function(p){return arguments.length?(p==null?o=l=null:l=a(o=p),d):o},d}class JF{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function cfe(e){return new JF(e,!0)}function dfe(e){return new JF(e,!1)}const pO={draw(e,t){const r=Go(t/Dv);e.moveTo(r,0),e.arc(0,0,r,0,_b)}},ffe={draw(e,t){const r=Go(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},e3=Go(1/3),pfe=e3*2,hfe={draw(e,t){const r=Go(t/pfe),n=r*e3;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},mfe={draw(e,t){const r=Go(t),n=-r/2;e.rect(n,n,r,r)}},gfe=.8908130915292852,t3=zv(Dv/10)/zv(7*Dv/10),vfe=zv(_b/10)*t3,yfe=-qF(_b/10)*t3,bfe={draw(e,t){const r=Go(t*gfe),n=vfe*r,i=yfe*r;e.moveTo(0,-r),e.lineTo(n,i);for(let o=1;o<5;++o){const a=_b*o/5,l=qF(a),c=zv(a);e.lineTo(c*r,-l*r),e.lineTo(l*n-c*i,c*n+l*i)}e.closePath()}},Ew=Go(3),xfe={draw(e,t){const r=-Go(t/(Ew*3));e.moveTo(0,r*2),e.lineTo(-Ew*r,-r),e.lineTo(Ew*r,-r),e.closePath()}},Ji=-.5,eo=Go(3)/2,Ek=1/Go(12),wfe=(Ek/2+1)*3,Sfe={draw(e,t){const r=Go(t/wfe),n=r/2,i=r*Ek,o=n,a=r*Ek+r,l=-o,c=a;e.moveTo(n,i),e.lineTo(o,a),e.lineTo(l,c),e.lineTo(Ji*n-eo*i,eo*n+Ji*i),e.lineTo(Ji*o-eo*a,eo*o+Ji*a),e.lineTo(Ji*l-eo*c,eo*l+Ji*c),e.lineTo(Ji*n+eo*i,Ji*i-eo*n),e.lineTo(Ji*o+eo*a,Ji*a-eo*o),e.lineTo(Ji*l+eo*c,Ji*c-eo*l),e.closePath()}};function kfe(e,t){let r=null,n=dO(i);e=typeof e=="function"?e:fr(e||pO),t=typeof t=="function"?t:fr(t===void 0?64:+t);function i(){let o;if(r||(r=o=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),o)return r=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:fr(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:fr(+o),i):t},i.context=function(o){return arguments.length?(r=o??null,i):r},i}function Lv(){}function Bv(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function r3(e){this._context=e}r3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Bv(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Bv(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Pfe(e){return new r3(e)}function n3(e){this._context=e}n3.prototype={areaStart:Lv,areaEnd:Lv,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Bv(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function $fe(e){return new n3(e)}function i3(e){this._context=e}i3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Bv(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Cfe(e){return new i3(e)}function o3(e){this._context=e}o3.prototype={areaStart:Lv,areaEnd:Lv,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Ofe(e){return new o3(e)}function E2(e){return e<0?-1:1}function _2(e,t,r){var n=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(n||i<0&&-0),a=(r-e._y1)/(i||n<0&&-0),l=(o*i+a*n)/(n+i);return(E2(o)+E2(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(l))||0}function I2(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function _w(e,t,r){var n=e._x0,i=e._y0,o=e._x1,a=e._y1,l=(o-n)/3;e._context.bezierCurveTo(n+l,i+l*t,o-l,a-l*r,o,a)}function Uv(e){this._context=e}Uv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:_w(this,this._t0,I2(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,_w(this,I2(this,r=_2(this,e,t)),r);break;default:_w(this,this._t0,r=_2(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function a3(e){this._context=new s3(e)}(a3.prototype=Object.create(Uv.prototype)).point=function(e,t){Uv.prototype.point.call(this,t,e)};function s3(e){this._context=e}s3.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,o){this._context.bezierCurveTo(t,e,n,r,o,i)}};function Efe(e){return new Uv(e)}function _fe(e){return new a3(e)}function l3(e){this._context=e}l3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=j2(e),i=j2(t),o=0,a=1;a<r;++o,++a)this._context.bezierCurveTo(n[0][o],i[0][o],n[1][o],i[1][o],e[a],t[a]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function j2(e){var t,r=e.length-1,n,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,a[t]-=n*a[t-1];for(i[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function Ife(e){return new l3(e)}function jb(e,t){this._context=e,this._t=t}jb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function jfe(e){return new jb(e,.5)}function Afe(e){return new jb(e,0)}function Tfe(e){return new jb(e,1)}function ad(e,t){if((a=e.length)>1)for(var r=1,n,i,o=e[t[0]],a,l=o.length;r<a;++r)for(i=o,o=e[t[r]],n=0;n<l;++n)o[n][1]+=o[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function _k(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function Rfe(e,t){return e[t]}function Mfe(e){const t=[];return t.key=e,t}function Nfe(){var e=fr([]),t=_k,r=ad,n=Rfe;function i(o){var a=Array.from(e.apply(this,arguments),Mfe),l,c=a.length,d=-1,f;for(const p of o)for(l=0,++d;l<c;++l)(a[l][d]=[0,+n(p,a[l].key,d,o)]).data=p;for(l=0,f=fO(t(a));l<c;++l)a[f[l]].index=l;return r(a,f),a}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:fr(Array.from(o)),i):e},i.value=function(o){return arguments.length?(n=typeof o=="function"?o:fr(+o),i):n},i.order=function(o){return arguments.length?(t=o==null?_k:typeof o=="function"?o:fr(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(r=o??ad,i):r},i}function zfe(e,t){if((n=e.length)>0){for(var r,n,i=0,o=e[0].length,a;i<o;++i){for(a=r=0;r<n;++r)a+=e[r][i][1]||0;if(a)for(r=0;r<n;++r)e[r][i][1]/=a}ad(e,t)}}function Dfe(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,o=n.length;r<o;++r){for(var a=0,l=0;a<i;++a)l+=e[a][r][1]||0;n[r][1]+=n[r][0]=-l/2}ad(e,t)}}function Lfe(e,t){if(!(!((a=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,o,a;n<o;++n){for(var l=0,c=0,d=0;l<a;++l){for(var f=e[t[l]],p=f[n][1]||0,g=f[n-1][1]||0,v=(p-g)/2,b=0;b<l;++b){var S=e[t[b]],w=S[n][1]||0,k=S[n-1][1]||0;v+=w-k}c+=p,d+=v*p}i[n-1][1]+=i[n-1][0]=r,c&&(r-=d/c)}i[n-1][1]+=i[n-1][0]=r,ad(e,t)}}var Iw={},jw={},A2;function Bfe(){return A2||(A2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(jw)),jw}var Aw={},T2;function u3(){return T2||(T2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){switch(typeof r){case"number":case"symbol":return!1;case"string":return r.includes(".")||r.includes("[")||r.includes("]")}}e.isDeepKey=t})(Aw)),Aw}var Tw={},R2;function hO(){return R2||(R2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){var n;return typeof r=="string"||typeof r=="symbol"?r:Object.is((n=r==null?void 0:r.valueOf)==null?void 0:n.call(r),-0)?"-0":String(r)}e.toKey=t})(Tw)),Tw}var Rw={},Mw={},M2;function Ufe(){return M2||(M2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){if(r==null)return"";if(typeof r=="string")return r;if(Array.isArray(r))return r.map(t).join(",");const n=String(r);return n==="0"&&Object.is(Number(r),-0)?"-0":n}e.toString=t})(Mw)),Mw}var N2;function mO(){return N2||(N2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ufe(),r=hO();function n(i){if(Array.isArray(i))return i.map(r.toKey);if(typeof i=="symbol")return[i];i=t.toString(i);const o=[],a=i.length;if(a===0)return o;let l=0,c="",d="",f=!1;for(i.charCodeAt(0)===46&&(o.push(""),l++);l<a;){const p=i[l];d?p==="\\"&&l+1<a?(l++,c+=i[l]):p===d?d="":c+=p:f?p==='"'||p==="'"?d=p:p==="]"?(f=!1,o.push(c),c=""):c+=p:p==="["?(f=!0,c&&(o.push(c),c="")):p==="."?c&&(o.push(c),c=""):c+=p,l++}return c&&o.push(c),o}e.toPath=n})(Rw)),Rw}var z2;function gO(){return z2||(z2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Bfe(),r=u3(),n=hO(),i=mO();function o(l,c,d){if(l==null)return d;switch(typeof c){case"string":{if(t.isUnsafeProperty(c))return d;const f=l[c];return f===void 0?r.isDeepKey(c)?o(l,i.toPath(c),d):d:f}case"number":case"symbol":{typeof c=="number"&&(c=n.toKey(c));const f=l[c];return f===void 0?d:f}default:{if(Array.isArray(c))return a(l,c,d);if(Object.is(c==null?void 0:c.valueOf(),-0)?c="-0":c=String(c),t.isUnsafeProperty(c))return d;const f=l[c];return f===void 0?d:f}}}function a(l,c,d){if(c.length===0)return d;let f=l;for(let p=0;p<c.length;p++){if(f==null||t.isUnsafeProperty(c[p]))return d;f=f[c[p]]}return f===void 0?d:f}e.get=o})(Iw)),Iw}var Nw,D2;function Ffe(){return D2||(D2=1,Nw=gO().get),Nw}var Wfe=Ffe();const Ou=wa(Wfe);var Pn=e=>e===0?0:e>0?1:-1,ho=e=>typeof e=="number"&&e!=+e,rs=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,Ke=e=>(typeof e=="number"||e instanceof Number)&&!ho(e),ya=e=>Ke(e)||typeof e=="string",Hfe=0,kp=e=>{var t=++Hfe;return"".concat(e||"").concat(t)},Fn=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ke(t)&&typeof t!="string")return n;var o;if(rs(t)){if(r==null)return n;var a=t.indexOf("%");o=r*parseFloat(t.slice(0,a))/100}else o=+t;return ho(o)&&(o=n),i&&r!=null&&o>r&&(o=r),o},c3=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(!r[e[n]])r[e[n]]=!0;else return!0;return!1};function xr(e,t,r){return Ke(e)&&Ke(t)?e+r*(t-e):t}function d3(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):Ou(n,t))===r)}var Tr=e=>e===null||typeof e>"u",_h=e=>Tr(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Kfe(e){return e!=null}function Ih(){}var Vfe=["type","size","sizeType"];function Ik(){return Ik=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ik.apply(null,arguments)}function L2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function B2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?L2(Object(r),!0).forEach(function(n){qfe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qfe(e,t,r){return(t=Zfe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zfe(e){var t=Gfe(e,"string");return typeof t=="symbol"?t:t+""}function Gfe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Yfe(e,t){if(e==null)return{};var r,n,i=Xfe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Xfe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var f3={symbolCircle:pO,symbolCross:ffe,symbolDiamond:hfe,symbolSquare:mfe,symbolStar:bfe,symbolTriangle:xfe,symbolWye:Sfe},Qfe=Math.PI/180,Jfe=e=>{var t="symbol".concat(_h(e));return f3[t]||pO},epe=(e,t,r)=>{if(t==="area")return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var n=18*Qfe;return 1.25*e*e*(Math.tan(n)-Math.tan(n*2)*Math.tan(n)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},tpe=(e,t)=>{f3["symbol".concat(_h(e))]=t},vO=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,i=Yfe(e,Vfe),o=B2(B2({},i),{},{type:t,size:r,sizeType:n}),a="circle";typeof t=="string"&&(a=t);var l=()=>{var g=Jfe(a),v=kfe().type(g).size(epe(r,n,a)),b=v();if(b!==null)return b},{className:c,cx:d,cy:f}=o,p=ii(o);return Ke(d)&&Ke(f)&&Ke(r)?m.createElement("path",Ik({},p,{className:me("recharts-symbols",c),transform:"translate(".concat(d,", ").concat(f,")"),d:l()})):null};vO.registerSymbol=tpe;var p3=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,yO=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(m.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{uO(i)&&(n[i]=(o=>r[i](r,o)))}),n},rpe=(e,t,r)=>n=>(e(t,r,n),null),jh=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var o=e[i];uO(i)&&typeof o=="function"&&(n||(n={}),n[i]=rpe(o,t,r))}),n};function U2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function npe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?U2(Object(r),!0).forEach(function(n){ipe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ipe(e,t,r){return(t=ope(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ope(e){var t=ape(e,"string");return typeof t=="symbol"?t:t+""}function ape(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nn(e,t){var r=npe({},e),n=t,i=Object.keys(t),o=i.reduce((a,l)=>(a[l]===void 0&&n[l]!==void 0&&(a[l]=n[l]),a),r);return o}function Fv(){return Fv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Fv.apply(null,arguments)}function F2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function spe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?F2(Object(r),!0).forEach(function(n){lpe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lpe(e,t,r){return(t=upe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function upe(e){var t=cpe(e,"string");return typeof t=="symbol"?t:t+""}function cpe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var no=32,dpe={align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle"};function fpe(e){var{data:t,iconType:r,inactiveColor:n}=e,i=no/2,o=no/6,a=no/3,l=t.inactive?n:t.color,c=r??t.type;if(c==="none")return null;if(c==="plainline"){var d;return m.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:(d=t.payload)===null||d===void 0?void 0:d.strokeDasharray,x1:0,y1:i,x2:no,y2:i,className:"recharts-legend-icon"})}if(c==="line")return m.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(i,"h").concat(a,`
314
314
  A`).concat(o,",").concat(o,",0,1,1,").concat(2*a,",").concat(i,`
315
315
  H`).concat(no,"M").concat(2*a,",").concat(i,`
316
316
  A`).concat(o,",").concat(o,",0,1,1,").concat(a,",").concat(i),className:"recharts-legend-icon"});if(c==="rect")return m.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(no/8,"h").concat(no,"v").concat(no*3/4,"h").concat(-no,"z"),className:"recharts-legend-icon"});if(m.isValidElement(t.legendIcon)){var f=spe({},t);return delete f.legendIcon,m.cloneElement(t.legendIcon,f)}return m.createElement(vO,{fill:l,cx:i,cy:i,size:no,sizeType:"diameter",type:c})}function ppe(e){var{payload:t,iconSize:r,layout:n,formatter:i,inactiveColor:o,iconType:a}=e,l={x:0,y:0,width:no,height:no},c={display:n==="horizontal"?"inline-block":"block",marginRight:10},d={display:"inline-block",verticalAlign:"middle",marginRight:4};return t.map((f,p)=>{var g=f.formatter||i,v=me({"recharts-legend-item":!0,["legend-item-".concat(p)]:!0,inactive:f.inactive});if(f.type==="none")return null;var b=f.inactive?o:f.color,S=g?g(f.value,f,p):f.value;return m.createElement("li",Fv({className:v,style:c,key:"legend-item-".concat(p)},jh(e,f,p)),m.createElement(cO,{width:r,height:r,viewBox:l,style:d,"aria-label":"".concat(S," legend icon")},m.createElement(fpe,{data:f,iconType:a,inactiveColor:o})),m.createElement("span",{className:"recharts-legend-item-text",style:{color:b}},S))})}var hpe=e=>{var t=nn(e,dpe),{payload:r,layout:n,align:i}=t;if(!r||!r.length)return null;var o={padding:0,margin:0,textAlign:n==="horizontal"?i:"left"};return m.createElement("ul",{className:"recharts-default-legend",style:o},m.createElement(ppe,Fv({},t,{payload:r})))},zw={},Dw={},W2;function mpe(){return W2||(W2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){const i=new Map;for(let o=0;o<r.length;o++){const a=r[o],l=n(a);i.has(l)||i.set(l,a)}return Array.from(i.values())}e.uniqBy=t})(Dw)),Dw}var Lw={},H2;function h3(){return H2||(H2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r}e.identity=t})(Lw)),Lw}var Bw={},Uw={},Fw={},K2;function gpe(){return K2||(K2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Number.isSafeInteger(r)&&r>=0}e.isLength=t})(Fw)),Fw}var V2;function bO(){return V2||(V2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=gpe();function r(n){return n!=null&&typeof n!="function"&&t.isLength(n.length)}e.isArrayLike=r})(Uw)),Uw}var Ww={},q2;function vpe(){return q2||(q2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})(Ww)),Ww}var Z2;function ype(){return Z2||(Z2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=bO(),r=vpe();function n(i){return r.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=n})(Bw)),Bw}var Hw={},Kw={},G2;function bpe(){return G2||(G2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=gO();function r(n){return function(i){return t.get(i,n)}}e.property=r})(Kw)),Kw}var Vw={},qw={},Zw={},Gw={},Y2;function m3(){return Y2||(Y2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r!==null&&(typeof r=="object"||typeof r=="function")}e.isObject=t})(Gw)),Gw}var Yw={},X2;function g3(){return X2||(X2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null||typeof r!="object"&&typeof r!="function"}e.isPrimitive=t})(Yw)),Yw}var Xw={},Q2;function v3(){return Q2||(Q2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){return r===n||Number.isNaN(r)&&Number.isNaN(n)}e.eq=t})(Xw)),Xw}var J2;function xpe(){return J2||(J2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=m3(),r=g3(),n=v3();function i(f,p,g){return typeof g!="function"?i(f,p,()=>{}):o(f,p,function v(b,S,w,k,C,P){const O=g(b,S,w,k,C,P);return O!==void 0?!!O:o(b,S,v,P)},new Map)}function o(f,p,g,v){if(p===f)return!0;switch(typeof p){case"object":return a(f,p,g,v);case"function":return Object.keys(p).length>0?o(f,{...p},g,v):n.eq(f,p);default:return t.isObject(f)?typeof p=="string"?p==="":!0:n.eq(f,p)}}function a(f,p,g,v){if(p==null)return!0;if(Array.isArray(p))return c(f,p,g,v);if(p instanceof Map)return l(f,p,g,v);if(p instanceof Set)return d(f,p,g,v);const b=Object.keys(p);if(f==null)return b.length===0;if(b.length===0)return!0;if(v!=null&&v.has(p))return v.get(p)===f;v==null||v.set(p,f);try{for(let S=0;S<b.length;S++){const w=b[S];if(!r.isPrimitive(f)&&!(w in f)||p[w]===void 0&&f[w]!==void 0||p[w]===null&&f[w]!==null||!g(f[w],p[w],w,f,p,v))return!1}return!0}finally{v==null||v.delete(p)}}function l(f,p,g,v){if(p.size===0)return!0;if(!(f instanceof Map))return!1;for(const[b,S]of p.entries()){const w=f.get(b);if(g(w,S,b,f,p,v)===!1)return!1}return!0}function c(f,p,g,v){if(p.length===0)return!0;if(!Array.isArray(f))return!1;const b=new Set;for(let S=0;S<p.length;S++){const w=p[S];let k=!1;for(let C=0;C<f.length;C++){if(b.has(C))continue;const P=f[C];let O=!1;if(g(P,w,S,f,p,v)&&(O=!0),O){b.add(C),k=!0;break}}if(!k)return!1}return!0}function d(f,p,g,v){return p.size===0?!0:f instanceof Set?c([...f],[...p],g,v):!1}e.isMatchWith=i,e.isSetMatch=d})(Zw)),Zw}var eR;function y3(){return eR||(eR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=xpe();function r(n,i){return t.isMatchWith(n,i,()=>{})}e.isMatch=r})(qw)),qw}var Qw={},Jw={},eS={},tR;function wpe(){return tR||(tR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Object.getOwnPropertySymbols(r).filter(n=>Object.prototype.propertyIsEnumerable.call(r,n))}e.getSymbols=t})(eS)),eS}var tS={},rR;function b3(){return rR||(rR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}e.getTag=t})(tS)),tS}var rS={},nR;function x3(){return nR||(nR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",r="[object String]",n="[object Number]",i="[object Boolean]",o="[object Arguments]",a="[object Symbol]",l="[object Date]",c="[object Map]",d="[object Set]",f="[object Array]",p="[object Function]",g="[object ArrayBuffer]",v="[object Object]",b="[object Error]",S="[object DataView]",w="[object Uint8Array]",k="[object Uint8ClampedArray]",C="[object Uint16Array]",P="[object Uint32Array]",O="[object BigUint64Array]",E="[object Int8Array]",_="[object Int16Array]",A="[object Int32Array]",T="[object BigInt64Array]",R="[object Float32Array]",N="[object Float64Array]";e.argumentsTag=o,e.arrayBufferTag=g,e.arrayTag=f,e.bigInt64ArrayTag=T,e.bigUint64ArrayTag=O,e.booleanTag=i,e.dataViewTag=S,e.dateTag=l,e.errorTag=b,e.float32ArrayTag=R,e.float64ArrayTag=N,e.functionTag=p,e.int16ArrayTag=_,e.int32ArrayTag=A,e.int8ArrayTag=E,e.mapTag=c,e.numberTag=n,e.objectTag=v,e.regexpTag=t,e.setTag=d,e.stringTag=r,e.symbolTag=a,e.uint16ArrayTag=C,e.uint32ArrayTag=P,e.uint8ArrayTag=w,e.uint8ClampedArrayTag=k})(rS)),rS}var nS={},iR;function Spe(){return iR||(iR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})(nS)),nS}var oR;function w3(){return oR||(oR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=wpe(),r=b3(),n=x3(),i=g3(),o=Spe();function a(f,p){return l(f,void 0,f,new Map,p)}function l(f,p,g,v=new Map,b=void 0){const S=b==null?void 0:b(f,p,g,v);if(S!==void 0)return S;if(i.isPrimitive(f))return f;if(v.has(f))return v.get(f);if(Array.isArray(f)){const w=new Array(f.length);v.set(f,w);for(let k=0;k<f.length;k++)w[k]=l(f[k],k,g,v,b);return Object.hasOwn(f,"index")&&(w.index=f.index),Object.hasOwn(f,"input")&&(w.input=f.input),w}if(f instanceof Date)return new Date(f.getTime());if(f instanceof RegExp){const w=new RegExp(f.source,f.flags);return w.lastIndex=f.lastIndex,w}if(f instanceof Map){const w=new Map;v.set(f,w);for(const[k,C]of f)w.set(k,l(C,k,g,v,b));return w}if(f instanceof Set){const w=new Set;v.set(f,w);for(const k of f)w.add(l(k,void 0,g,v,b));return w}if(typeof Buffer<"u"&&Buffer.isBuffer(f))return f.subarray();if(o.isTypedArray(f)){const w=new(Object.getPrototypeOf(f)).constructor(f.length);v.set(f,w);for(let k=0;k<f.length;k++)w[k]=l(f[k],k,g,v,b);return w}if(f instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&f instanceof SharedArrayBuffer)return f.slice(0);if(f instanceof DataView){const w=new DataView(f.buffer.slice(0),f.byteOffset,f.byteLength);return v.set(f,w),c(w,f,g,v,b),w}if(typeof File<"u"&&f instanceof File){const w=new File([f],f.name,{type:f.type});return v.set(f,w),c(w,f,g,v,b),w}if(typeof Blob<"u"&&f instanceof Blob){const w=new Blob([f],{type:f.type});return v.set(f,w),c(w,f,g,v,b),w}if(f instanceof Error){const w=new f.constructor;return v.set(f,w),w.message=f.message,w.name=f.name,w.stack=f.stack,w.cause=f.cause,c(w,f,g,v,b),w}if(f instanceof Boolean){const w=new Boolean(f.valueOf());return v.set(f,w),c(w,f,g,v,b),w}if(f instanceof Number){const w=new Number(f.valueOf());return v.set(f,w),c(w,f,g,v,b),w}if(f instanceof String){const w=new String(f.valueOf());return v.set(f,w),c(w,f,g,v,b),w}if(typeof f=="object"&&d(f)){const w=Object.create(Object.getPrototypeOf(f));return v.set(f,w),c(w,f,g,v,b),w}return f}function c(f,p,g=f,v,b){const S=[...Object.keys(p),...t.getSymbols(p)];for(let w=0;w<S.length;w++){const k=S[w],C=Object.getOwnPropertyDescriptor(f,k);(C==null||C.writable)&&(f[k]=l(p[k],k,g,v,b))}}function d(f){switch(r.getTag(f)){case n.argumentsTag:case n.arrayTag:case n.arrayBufferTag:case n.dataViewTag:case n.booleanTag:case n.dateTag:case n.float32ArrayTag:case n.float64ArrayTag:case n.int8ArrayTag:case n.int16ArrayTag:case n.int32ArrayTag:case n.mapTag:case n.numberTag:case n.objectTag:case n.regexpTag:case n.setTag:case n.stringTag:case n.symbolTag:case n.uint8ArrayTag:case n.uint8ClampedArrayTag:case n.uint16ArrayTag:case n.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=a,e.cloneDeepWithImpl=l,e.copyProperties=c})(Jw)),Jw}var aR;function kpe(){return aR||(aR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=w3();function r(n){return t.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}e.cloneDeep=r})(Qw)),Qw}var sR;function Ppe(){return sR||(sR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=y3(),r=kpe();function n(i){return i=r.cloneDeep(i),o=>t.isMatch(o,i)}e.matches=n})(Vw)),Vw}var iS={},oS={},aS={},lR;function $pe(){return lR||(lR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=w3(),r=x3();function n(i,o){return t.cloneDeepWith(i,(a,l,c,d)=>{const f=o==null?void 0:o(a,l,c,d);if(f!==void 0)return f;if(typeof i=="object")switch(Object.prototype.toString.call(i)){case r.numberTag:case r.stringTag:case r.booleanTag:{const p=new i.constructor(i==null?void 0:i.valueOf());return t.copyProperties(p,i),p}case r.argumentsTag:{const p={};return t.copyProperties(p,i),p.length=i.length,p[Symbol.iterator]=i[Symbol.iterator],p}default:return}})}e.cloneDeepWith=n})(aS)),aS}var uR;function Cpe(){return uR||(uR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$pe();function r(n){return t.cloneDeepWith(n)}e.cloneDeep=r})(oS)),oS}var sS={},lS={},cR;function S3(){return cR||(cR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function r(n,i=Number.MAX_SAFE_INTEGER){switch(typeof n){case"number":return Number.isInteger(n)&&n>=0&&n<i;case"symbol":return!1;case"string":return t.test(n)}}e.isIndex=r})(lS)),lS}var uS={},dR;function Ope(){return dR||(dR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=b3();function r(n){return n!==null&&typeof n=="object"&&t.getTag(n)==="[object Arguments]"}e.isArguments=r})(uS)),uS}var fR;function Epe(){return fR||(fR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=u3(),r=S3(),n=Ope(),i=mO();function o(a,l){let c;if(Array.isArray(l)?c=l:typeof l=="string"&&t.isDeepKey(l)&&(a==null?void 0:a[l])==null?c=i.toPath(l):c=[l],c.length===0)return!1;let d=a;for(let f=0;f<c.length;f++){const p=c[f];if((d==null||!Object.hasOwn(d,p))&&!((Array.isArray(d)||n.isArguments(d))&&r.isIndex(p)&&p<d.length))return!1;d=d[p]}return!0}e.has=o})(sS)),sS}var pR;function _pe(){return pR||(pR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=y3(),r=hO(),n=Cpe(),i=gO(),o=Epe();function a(l,c){switch(typeof l){case"object":{Object.is(l==null?void 0:l.valueOf(),-0)&&(l="-0");break}case"number":{l=r.toKey(l);break}}return c=n.cloneDeep(c),function(d){const f=i.get(d,l);return f===void 0?o.has(d,l):c===void 0?f===void 0:t.isMatch(f,c)}}e.matchesProperty=a})(iS)),iS}var hR;function Ipe(){return hR||(hR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=h3(),r=bpe(),n=Ppe(),i=_pe();function o(a){if(a==null)return t.identity;switch(typeof a){case"function":return a;case"object":return Array.isArray(a)&&a.length===2?i.matchesProperty(a[0],a[1]):n.matches(a);case"string":case"symbol":case"number":return r.property(a)}}e.iteratee=o})(Hw)),Hw}var mR;function jpe(){return mR||(mR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=mpe(),r=h3(),n=ype(),i=Ipe();function o(a,l=r.identity){return n.isArrayLikeObject(a)?t.uniqBy(Array.from(a),i.iteratee(l)):[]}e.uniqBy=o})(zw)),zw}var cS,gR;function Ape(){return gR||(gR=1,cS=jpe().uniqBy),cS}var Tpe=Ape();const vR=wa(Tpe);function k3(e,t,r){return t===!0?vR(e,r):typeof t=="function"?vR(e,t):e}var dS={exports:{}},fS={},pS={exports:{}},hS={};/**