fern-api 5.152.2 → 5.153.0
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.
- package/cli.cjs +9 -9
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -136,9 +136,9 @@ ${p.indent}`:""}${Q_a(l)}:${a.indent?" ":""}`;return s=!1,u=!0,a.objectItem=void
|
|
|
136
136
|
|
|
137
137
|
`)}d.write("payload.value = newResult;"),d.write("return payload;");let I=d.compile();return(x,v)=>I(f,x,v)},o,s=vLe,a=!pLt.jitless,u=a&&too.value,l=t.catchall,p;e._zod.parse=(f,d)=>{p??(p=n.value);let m=f.value;return s(m)?a&&u&&d?.async===!1&&d.jitless!==!0?(o||(o=i(t.shape)),f=o(f,d),l?Uic([],m,f,d,p,e):f):r(f,d):(f.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),f)}});wLt=Sr("$ZodUnion",(e,t)=>{nl.init(e,t),$p(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),$p(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),$p(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),$p(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${i.map(o=>mLt(o.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(i,o)=>{if(r)return n(i,o);let s=!1,a=[];for(let c of t.options){let u=c._zod.run({value:i.value,issues:[]},o);if(u instanceof Promise)a.push(u),s=!0;else{if(u.issues.length===0)return u;a.push(u)}}return s?Promise.all(a).then(c=>Pic(c,i,e,o)):Pic(a,i,e,o)}});Hso=Sr("$ZodXor",(e,t)=>{wLt.init(e,t),t.inclusive=!1;let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(i,o)=>{if(r)return n(i,o);let s=!1,a=[];for(let c of t.options){let u=c._zod.run({value:i.value,issues:[]},o);u instanceof Promise?(a.push(u),s=!0):a.push(u)}return s?Promise.all(a).then(c=>Bic(c,i,e,o)):Bic(a,i,e,o)}}),Kso=Sr("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,wLt.init(e,t);let r=e._zod.parse;$p(e._zod,"propValues",()=>{let i={};for(let o of t.options){let s=o._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(let[a,c]of Object.entries(s)){i[a]||(i[a]=new Set);for(let u of c)i[a].add(u)}}return i});let n=stt(()=>{let i=t.options,o=new Map;for(let s of i){let a=s._zod.propValues?.[t.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let c of a){if(o.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);o.set(c,s)}}return o});e._zod.parse=(i,o)=>{let s=i.value;if(!vLe(s))return i.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),i;let a=n.value.get(s?.[t.discriminator]);return a?a._zod.run(i,o):t.unionFallback?r(i,o):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),i)}}),Jso=Sr("$ZodIntersection",(e,t)=>{nl.init(e,t),e._zod.parse=(r,n)=>{let i=r.value,o=t.left._zod.run({value:i,issues:[]},n),s=t.right._zod.run({value:i,issues:[]},n);return o instanceof Promise||s instanceof Promise?Promise.all([o,s]).then(([c,u])=>Ric(r,c,u)):Ric(r,o,s)}});ePr=Sr("$ZodTuple",(e,t)=>{nl.init(e,t);let r=t.items;e._zod.parse=(n,i)=>{let o=n.value;if(!Array.isArray(o))return n.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),n;n.value=[];let s=[],a=[...r].reverse().findIndex(l=>l._zod.optin!=="optional"),c=a===-1?0:r.length-a;if(!t.rest){let l=o.length>r.length,p=o.length<c-1;if(l||p)return n.issues.push({...l?{code:"too_big",maximum:r.length,inclusive:!0}:{code:"too_small",minimum:r.length},input:o,inst:e,origin:"array"}),n}let u=-1;for(let l of r){if(u++,u>=o.length&&u>=c)continue;let p=l._zod.run({value:o[u],issues:[]},i);p instanceof Promise?s.push(p.then(f=>HOr(f,n,u))):HOr(p,n,u)}if(t.rest){let l=o.slice(r.length);for(let p of l){u++;let f=t.rest._zod.run({value:p,issues:[]},i);f instanceof Promise?s.push(f.then(d=>HOr(d,n,u))):HOr(f,n,u)}}return s.length?Promise.all(s).then(()=>n):n}});Yso=Sr("$ZodRecord",(e,t)=>{nl.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!NIe(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s){r.value={};let a=new Set;for(let u of s)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){a.add(typeof u=="number"?u.toString():u);let l=t.valueType._zod.run({value:i[u],issues:[]},n);l instanceof Promise?o.push(l.then(p=>{p.issues.length&&r.issues.push(...F3(u,p.issues)),r.value[u]=p.value})):(l.issues.length&&r.issues.push(...F3(u,l.issues)),r.value[u]=l.value)}let c;for(let u in i)a.has(u)||(c=c??[],c.push(u));c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:c})}else{r.value={};for(let a of Reflect.ownKeys(i)){if(a==="__proto__")continue;let c=t.keyType._zod.run({value:a,issues:[]},n);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&UOr.test(a)&&c.issues.length){let p=t.keyType._zod.run({value:Number(a),issues:[]},n);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(c=p)}if(c.issues.length){t.mode==="loose"?r.value[a]=i[a]:r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(p=>lQ(p,n,fv())),input:a,path:[a],inst:e});continue}let l=t.valueType._zod.run({value:i[a],issues:[]},n);l instanceof Promise?o.push(l.then(p=>{p.issues.length&&r.issues.push(...F3(a,p.issues)),r.value[c.value]=p.value})):(l.issues.length&&r.issues.push(...F3(a,l.issues)),r.value[c.value]=l.value)}}return o.length?Promise.all(o).then(()=>r):r}}),Xso=Sr("$ZodMap",(e,t)=>{nl.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:i,inst:e}),r;let o=[];r.value=new Map;for(let[s,a]of i){let c=t.keyType._zod.run({value:s,issues:[]},n),u=t.valueType._zod.run({value:a,issues:[]},n);c instanceof Promise||u instanceof Promise?o.push(Promise.all([c,u]).then(([l,p])=>{Dic(l,p,r,s,i,e,n)})):Dic(c,u,r,s,i,e,n)}return o.length?Promise.all(o).then(()=>r):r}});Zso=Sr("$ZodSet",(e,t)=>{nl.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Set))return r.issues.push({input:i,inst:e,expected:"set",code:"invalid_type"}),r;let o=[];r.value=new Set;for(let s of i){let a=t.valueType._zod.run({value:s,issues:[]},n);a instanceof Promise?o.push(a.then(c=>kic(c,r))):kic(a,r)}return o.length?Promise.all(o).then(()=>r):r}});$so=Sr("$ZodEnum",(e,t)=>{nl.init(e,t);let r=dLt(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>hLt.has(typeof i)).map(i=>typeof i=="string"?_V(i):i.toString()).join("|")})$`),e._zod.parse=(i,o)=>{let s=i.value;return n.has(s)||i.issues.push({code:"invalid_value",values:r,input:s,inst:e}),i}}),eao=Sr("$ZodLiteral",(e,t)=>{if(nl.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?_V(n):n?_V(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,i)=>{let o=n.value;return r.has(o)||n.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),n}}),tao=Sr("$ZodFile",(e,t)=>{nl.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;return i instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:i,inst:e}),r}}),rao=Sr("$ZodTransform",(e,t)=>{nl.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new DIe(e.constructor.name);let i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(s=>(r.value=s,r));if(i instanceof Promise)throw new jH;return r.value=i,r}});tPr=Sr("$ZodOptional",(e,t)=>{nl.init(e,t),e._zod.optin="optional",e._zod.optout="optional",$p(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),$p(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${mLt(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>Fic(o,r.value)):Fic(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),nao=Sr("$ZodExactOptional",(e,t)=>{tPr.init(e,t),$p(e._zod,"values",()=>t.innerType._zod.values),$p(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),iao=Sr("$ZodNullable",(e,t)=>{nl.init(e,t),$p(e._zod,"optin",()=>t.innerType._zod.optin),$p(e._zod,"optout",()=>t.innerType._zod.optout),$p(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${mLt(r.source)}|null)$`):void 0}),$p(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)}),oao=Sr("$ZodDefault",(e,t)=>{nl.init(e,t),e._zod.optin="optional",$p(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;let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>Nic(o,t)):Nic(i,t)}});sao=Sr("$ZodPrefault",(e,t)=>{nl.init(e,t),e._zod.optin="optional",$p(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))}),aao=Sr("$ZodNonOptional",(e,t)=>{nl.init(e,t),$p(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>jic(o,e)):jic(i,e)}});cao=Sr("$ZodSuccess",(e,t)=>{nl.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new DIe("ZodSuccess");let 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)}}),uao=Sr("$ZodCatch",(e,t)=>{nl.init(e,t),$p(e._zod,"optin",()=>t.innerType._zod.optin),$p(e._zod,"optout",()=>t.innerType._zod.optout),$p(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let 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(s=>lQ(s,n,fv()))},input:r.value}),r.issues=[]),r)):(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(o=>lQ(o,n,fv()))},input:r.value}),r.issues=[]),r)}}),lao=Sr("$ZodNaN",(e,t)=>{nl.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)}),pao=Sr("$ZodPipe",(e,t)=>{nl.init(e,t),$p(e._zod,"values",()=>t.in._zod.values),$p(e._zod,"optin",()=>t.in._zod.optin),$p(e._zod,"optout",()=>t.out._zod.optout),$p(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let o=t.out._zod.run(r,n);return o instanceof Promise?o.then(s=>KOr(s,t.in,n)):KOr(o,t.in,n)}let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(o=>KOr(o,t.out,n)):KOr(i,t.out,n)}});SLt=Sr("$ZodCodec",(e,t)=>{nl.init(e,t),$p(e._zod,"values",()=>t.in._zod.values),$p(e._zod,"optin",()=>t.in._zod.optin),$p(e._zod,"optout",()=>t.out._zod.optout),$p(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if((n.direction||"forward")==="forward"){let o=t.in._zod.run(r,n);return o instanceof Promise?o.then(s=>JOr(s,t,n)):JOr(o,t,n)}else{let o=t.out._zod.run(r,n);return o instanceof Promise?o.then(s=>JOr(s,t,n)):JOr(o,t,n)}}});fao=Sr("$ZodReadonly",(e,t)=>{nl.init(e,t),$p(e._zod,"propValues",()=>t.innerType._zod.propValues),$p(e._zod,"values",()=>t.innerType._zod.values),$p(e._zod,"optin",()=>t.innerType?._zod?.optin),$p(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(zic):zic(i)}});dao=Sr("$ZodTemplateLiteral",(e,t)=>{nl.init(e,t);let r=[];for(let 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()}`);let 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}`);let o=i.startsWith("^")?1:0,s=i.endsWith("$")?i.length-1:i.length;r.push(i.slice(o,s))}else if(n===null||noo.has(typeof n))r.push(_V(`${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:"string",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)}),mao=Sr("$ZodFunction",(e,t)=>(nl.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){let i=e._def.input?ROr(e._def.input,n):n,o=Reflect.apply(r,this,i);return e._def.output?ROr(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){let i=e._def.input?await DOr(e._def.input,n):n,o=await Reflect.apply(r,this,i);return e._def.output?await DOr(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)=>{let n=e.constructor;return Array.isArray(r[0])?new n({type:"function",input:new ePr({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=>{let n=e.constructor;return new n({type:"function",input:e._def.input,output:r})},e)),hao=Sr("$ZodPromise",(e,t)=>{nl.init(e,t),e._zod.parse=(r,n)=>Promise.resolve(r.value).then(i=>t.innerType._zod.run({value:i,issues:[]},n))}),gao=Sr("$ZodLazy",(e,t)=>{nl.init(e,t),$p(e._zod,"innerType",()=>t.getter()),$p(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),$p(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),$p(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),$p(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,n)=>e._zod.innerType._zod.run(r,n)}),Aao=Sr("$ZodCustom",(e,t)=>{ly.init(e,t),nl.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(o=>Qic(o,r,n,e));Qic(i,r,n,e)}})});function Gic(){return{localeError:QZf()}}var QZf,qic=h(()=>{"use strict";Ya();QZf=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(i){return e[i]??null}let r={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${i.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${o}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`}case"invalid_value":return i.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${hi(i.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${i.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${i.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${i.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${i.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${i.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${i.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${i.prefix}"`:o.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${o.suffix}"`:o.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${o.includes}"`:o.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${o.pattern}`:`${r[o.format]??i.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${i.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${i.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${i.keys.length>1?"\u0629":""}: ${un(i.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${i.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${i.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}}});function Wic(){return{localeError:MZf()}}var MZf,Hic=h(()=>{"use strict";Ya();MZf=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(i){return e[i]??null}let 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",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"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${i.expected}, daxil olan ${a}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${a}`}case"invalid_value":return i.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${hi(i.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${i.origin??"d\u0259y\u0259r"} ${o}${i.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${i.origin??"d\u0259y\u0259r"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${i.origin} ${o}${i.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[o.format]??i.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${i.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${i.keys.length>1?"lar":""}: ${un(i.keys,", ")}`;case"invalid_key":return`${i.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${i.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}}});function Kic(e,t,r,n){let i=Math.abs(e),o=i%10,s=i%100;return s>=11&&s<=19?n:o===1?t:o>=2&&o<=4?r:n}function Jic(){return{localeError:LZf()}}var LZf,Yic=h(()=>{"use strict";Ya();LZf=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(i){return e[i]??null}let r={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},n={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${i.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${o}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`}case"invalid_value":return i.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${hi(i.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);if(s){let a=Number(i.maximum),c=Kic(a,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${o}${i.maximum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);if(s){let a=Number(i.minimum),c=Kic(a,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${i.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${o}${i.minimum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${i.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[o.format]??i.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${i.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${un(i.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${i.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${i.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}}});function Xic(){return{localeError:_Zf()}}var _Zf,Zic=h(()=>{"use strict";Ya();_Zf=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(i){return e[i]??null}let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${i.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`}case"invalid_value":return i.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${hi(i.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${i.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${i.minimum.toString()} ${s.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;if(o.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${o.prefix}"`;if(o.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${o.suffix}"`;if(o.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${o.includes}"`;if(o.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${o.pattern}`;let s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${s} ${r[o.format]??i.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${i.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${i.keys.length>1?"\u043E\u0432\u0435":""}: ${un(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${i.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${i.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}}});function $ic(){return{localeError:UZf()}}var UZf,eoc=h(()=>{"use strict";Ya();UZf=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(i){return e[i]??null}let r={regex:"entrada",email:"adre\xE7a electr\xF2nica",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\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${i.expected}, s'ha rebut ${a}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${a}`}case"invalid_value":return i.values.length===1?`Valor inv\xE0lid: s'esperava ${hi(i.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${un(i.values," o ")}`;case"too_big":{let o=i.inclusive?"com a m\xE0xim":"menys de",s=t(i.origin);return s?`Massa gran: s'esperava que ${i.origin??"el valor"} contingu\xE9s ${o} ${i.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${i.origin??"el valor"} fos ${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?"com a m\xEDnim":"m\xE9s de",s=t(i.origin);return s?`Massa petit: s'esperava que ${i.origin} contingu\xE9s ${o} ${i.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${i.origin} fos ${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${r[o.format]??i.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${i.divisor}`;case"unrecognized_keys":return`Clau${i.keys.length>1?"s":""} no reconeguda${i.keys.length>1?"s":""}: ${un(i.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${i.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${i.origin}`;default:return"Entrada inv\xE0lida"}}}});function toc(){return{localeError:VZf()}}var VZf,roc=h(()=>{"use strict";Ya();VZf=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(i){return e[i]??null}let r={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 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 \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},n={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${i.expected}, obdr\u017Eeno ${a}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${a}`}case"invalid_value":return i.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${hi(i.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${i.origin??"hodnota"} mus\xED m\xEDt ${o}${i.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${i.origin??"hodnota"} mus\xED b\xFDt ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${i.origin??"hodnota"} mus\xED m\xEDt ${o}${i.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${i.origin??"hodnota"} mus\xED b\xFDt ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${r[o.format]??i.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${i.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${un(i.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${i.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${i.origin}`;default:return"Neplatn\xFD vstup"}}}});function noc(){return{localeError:GZf()}}var GZf,ioc=h(()=>{"use strict";Ya();GZf=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(i){return e[i]??null}let r={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\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",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"},n={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Ugyldigt input: forventede instanceof ${i.expected}, fik ${a}`:`Ugyldigt input: forventede ${o}, fik ${a}`}case"invalid_value":return i.values.length===1?`Ugyldig v\xE6rdi: forventede ${hi(i.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin),a=n[i.origin]??i.origin;return s?`For stor: forventede ${a??"value"} ${s.verb} ${o} ${i.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${a??"value"} havde ${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin),a=n[i.origin]??i.origin;return s?`For lille: forventede ${a} ${s.verb} ${o} ${i.minimum.toString()} ${s.unit}`:`For lille: forventede ${a} havde ${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${r[o.format]??i.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${un(i.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${i.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${i.origin}`;default:return"Ugyldigt input"}}}});function ooc(){return{localeError:qZf()}}var qZf,soc=h(()=>{"use strict";Ya();qZf=()=>{let 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}let r={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"},n={nan:"NaN",number:"Zahl",array:"Array"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${i.expected}, erhalten ${a}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${a}`}case"invalid_value":return i.values.length===1?`Ung\xFCltige Eingabe: erwartet ${hi(i.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Zu gro\xDF: erwartet, dass ${i.origin??"Wert"} ${o}${i.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${i.origin??"Wert"} ${o}${i.maximum.toString()} ist`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`Zu klein: erwartet, dass ${i.origin} ${o}${i.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${i.origin} ${o}${i.minimum.toString()} ist`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${r[o.format]??i.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${i.divisor} sein`;case"unrecognized_keys":return`${i.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${un(i.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${i.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${i.origin}`;default:return"Ung\xFCltige Eingabe"}}}});function rPr(){return{localeError:WZf()}}var WZf,bao=h(()=>{"use strict";Ya();WZf=()=>{let 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"},map:{unit:"entries",verb:"to have"}};function t(i){return e[i]??null}let 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"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return`Invalid input: expected ${o}, received ${a}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${hi(i.values[0])}`:`Invalid option: expected one of ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Too big: expected ${i.origin??"value"} to have ${o}${i.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`Too small: expected ${i.origin} to have ${o}${i.minimum.toString()} ${s.unit}`:`Too small: expected ${i.origin} to be ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${r[o.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${un(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}}});function aoc(){return{localeError:HZf()}}var HZf,coc=h(()=>{"use strict";Ya();HZf=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(i){return e[i]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",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\u016Dro",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"},n={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${i.expected}, ricevi\u011Dis ${a}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${a}`}case"invalid_value":return i.values.length===1?`Nevalida enigo: atendi\u011Dis ${hi(i.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Tro granda: atendi\u011Dis ke ${i.origin??"valoro"} havu ${o}${i.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${i.origin??"valoro"} havu ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`Tro malgranda: atendi\u011Dis ke ${i.origin} havu ${o}${i.minimum.toString()} ${s.unit}`:`Tro malgranda: atendi\u011Dis ke ${i.origin} estu ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${r[o.format]??i.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${i.divisor}`;case"unrecognized_keys":return`Nekonata${i.keys.length>1?"j":""} \u015Dlosilo${i.keys.length>1?"j":""}: ${un(i.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${i.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${i.origin}`;default:return"Nevalida enigo"}}}});function uoc(){return{localeError:KZf()}}var KZf,loc=h(()=>{"use strict";Ya();KZf=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(i){return e[i]??null}let r={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",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\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${i.expected}, recibido ${a}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${a}`}case"invalid_value":return i.values.length===1?`Entrada inv\xE1lida: se esperaba ${hi(i.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin),a=n[i.origin]??i.origin;return s?`Demasiado grande: se esperaba que ${a??"valor"} tuviera ${o}${i.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${a??"valor"} fuera ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin),a=n[i.origin]??i.origin;return s?`Demasiado peque\xF1o: se esperaba que ${a} tuviera ${o}${i.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${a} fuera ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${r[o.format]??i.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${i.divisor}`;case"unrecognized_keys":return`Llave${i.keys.length>1?"s":""} desconocida${i.keys.length>1?"s":""}: ${un(i.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${n[i.origin]??i.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${n[i.origin]??i.origin}`;default:return"Entrada inv\xE1lida"}}}});function poc(){return{localeError:JZf()}}var JZf,foc=h(()=>{"use strict";Ya();JZf=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(i){return e[i]??null}let r={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},n={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${i.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${o} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return i.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${hi(i.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${un(i.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${i.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${i.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${i.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${i.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${i.origin} \u0628\u0627\u06CC\u062F ${o}${i.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${i.origin} \u0628\u0627\u06CC\u062F ${o}${i.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[o.format]??i.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${i.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${i.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${un(i.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${i.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${i.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}}});function doc(){return{localeError:YZf()}}var YZf,moc=h(()=>{"use strict";Ya();YZf=()=>{let e={string:{unit:"merkki\xE4",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\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(i){return e[i]??null}let r={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",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\xE4iv\xE4m\xE4\xE4r\xE4",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"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Virheellinen tyyppi: odotettiin instanceof ${i.expected}, oli ${a}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${a}`}case"invalid_value":return i.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${hi(i.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${o}${i.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${o}${i.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${r[o.format]??i.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${i.divisor} monikerta`;case"unrecognized_keys":return`${i.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${un(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\xF6te"}}}});function hoc(){return{localeError:XZf()}}var XZf,goc=h(()=>{"use strict";Ya();XZf=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(i){return e[i]??null}let r={regex:"entr\xE9e",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\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},n={nan:"NaN",number:"nombre",array:"tableau"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Entr\xE9e invalide : instanceof ${i.expected} attendu, ${a} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${a} re\xE7u`}case"invalid_value":return i.values.length===1?`Entr\xE9e invalide : ${hi(i.values[0])} attendu`:`Option invalide : une valeur parmi ${un(i.values,"|")} attendue`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Trop grand : ${i.origin??"valeur"} doit ${s.verb} ${o}${i.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i.origin??"valeur"} doit \xEAtre ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`Trop petit : ${i.origin} doit ${s.verb} ${o}${i.minimum.toString()} ${s.unit}`:`Trop petit : ${i.origin} doit \xEAtre ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${o.pattern}`:`${r[o.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${i.divisor}`;case"unrecognized_keys":return`Cl\xE9${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${un(i.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${i.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entr\xE9e invalide"}}}});function Aoc(){return{localeError:ZZf()}}var ZZf,yoc=h(()=>{"use strict";Ya();ZZf=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(i){return e[i]??null}let r={regex:"entr\xE9e",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\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Entr\xE9e invalide : attendu instanceof ${i.expected}, re\xE7u ${a}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${a}`}case"invalid_value":return i.values.length===1?`Entr\xE9e invalide : attendu ${hi(i.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"\u2264":"<",s=t(i.origin);return s?`Trop grand : attendu que ${i.origin??"la valeur"} ait ${o}${i.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${i.origin??"la valeur"} soit ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?"\u2265":">",s=t(i.origin);return s?`Trop petit : attendu que ${i.origin} ait ${o}${i.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${i.origin} soit ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${r[o.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${i.divisor}`;case"unrecognized_keys":return`Cl\xE9${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${un(i.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${i.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entr\xE9e invalide"}}}});function boc(){return{localeError:$Zf()}}var $Zf,Eoc=h(()=>{"use strict";Ya();$Zf=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=u=>u?e[u]:void 0,n=u=>{let l=r(u);return l?l.label:u??e.unknown.label},i=u=>`\u05D4${n(u)}`,o=u=>(r(u)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",s=u=>u?t[u]??null:null,a={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",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:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},c={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let l=u.expected,p=c[l??""]??n(l),f=xi(u.input),d=c[f]??e[f]?.label??f;return/^[A-Z]/.test(u.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${u.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${d}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${p}, \u05D4\u05EA\u05E7\u05D1\u05DC ${d}`}case"invalid_value":{if(u.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${hi(u.values[0])}`;let l=u.values.map(d=>hi(d));if(u.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${l[0]} \u05D0\u05D5 ${l[1]}`;let p=l[l.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${l.slice(0,-1).join(", ")} \u05D0\u05D5 ${p}`}case"too_big":{let l=s(u.origin),p=i(u.origin??"value");if(u.origin==="string")return`${l?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.maximum.toString()} ${l?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(u.origin==="number"){let m=u.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${u.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${u.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}`}if(u.origin==="array"||u.origin==="set"){let m=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",g=u.inclusive?`${u.maximum} ${l?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${u.maximum} ${l?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${p} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${g}`.trim()}let f=u.inclusive?"<=":"<",d=o(u.origin??"value");return l?.unit?`${l.longLabel} \u05DE\u05D3\u05D9: ${p} ${d} ${f}${u.maximum.toString()} ${l.unit}`:`${l?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${p} ${d} ${f}${u.maximum.toString()}`}case"too_small":{let l=s(u.origin),p=i(u.origin??"value");if(u.origin==="string")return`${l?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.minimum.toString()} ${l?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(u.origin==="number"){let m=u.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${u.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${u.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}`}if(u.origin==="array"||u.origin==="set"){let m=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(u.minimum===1&&u.inclusive){let A=(u.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${A}`}let g=u.inclusive?`${u.minimum} ${l?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${u.minimum} ${l?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${g}`.trim()}let f=u.inclusive?">=":">",d=o(u.origin??"value");return l?.unit?`${l.shortLabel} \u05DE\u05D3\u05D9: ${p} ${d} ${f}${u.minimum.toString()} ${l.unit}`:`${l?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${p} ${d} ${f}${u.minimum.toString()}`}case"invalid_format":{let l=u;if(l.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${l.prefix}"`;if(l.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${l.suffix}"`;if(l.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${l.includes}"`;if(l.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${l.pattern}`;let p=a[l.format],f=p?.label??l.format,m=(p?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${f} \u05DC\u05D0 ${m}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${u.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${u.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${u.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${un(u.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${i(u.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}}});function Ioc(){return{localeError:e$f()}}var e$f,voc=h(()=>{"use strict";Ya();e$f=()=>{let 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}let r={regex:"bemenet",email:"email c\xEDm",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\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},n={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${i.expected}, a kapott \xE9rt\xE9k ${a}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${a}`}case"invalid_value":return i.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${hi(i.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`T\xFAl nagy: ${i.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${i.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${i.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${i.origin} m\xE9rete t\xFAl kicsi ${o}${i.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${i.origin} t\xFAl kicsi ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[o.format]??i.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${i.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${i.keys.length>1?"s":""}: ${un(i.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${i.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${i.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}}});function Coc(e,t,r){return Math.abs(e)===1?t:r}function dtt(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}function xoc(){return{localeError:t$f()}}var t$f,woc=h(()=>{"use strict";Ya();t$f=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(i){return e[i]??null}let r={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},n={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${i.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${o}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`}case"invalid_value":return i.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${hi(i.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);if(s){let a=Number(i.maximum),c=Coc(a,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${dtt(i.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${i.maximum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${dtt(i.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);if(s){let a=Number(i.minimum),c=Coc(a,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${dtt(i.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${i.minimum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${dtt(i.origin)} \u056C\u056B\u0576\u056B ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${o.prefix}"-\u0578\u057E`:o.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${o.suffix}"-\u0578\u057E`:o.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${o.includes}"`:o.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${o.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[o.format]??i.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${i.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${i.keys.length>1?"\u0576\u0565\u0580":""}. ${un(i.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${dtt(i.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${dtt(i.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}}});function Soc(){return{localeError:r$f()}}var r$f,Toc=h(()=>{"use strict";Ya();r$f=()=>{let 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}let r={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"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Input tidak valid: diharapkan instanceof ${i.expected}, diterima ${a}`:`Input tidak valid: diharapkan ${o}, diterima ${a}`}case"invalid_value":return i.values.length===1?`Input tidak valid: diharapkan ${hi(i.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Terlalu besar: diharapkan ${i.origin??"value"} memiliki ${o}${i.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${i.origin??"value"} menjadi ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`Terlalu kecil: diharapkan ${i.origin} memiliki ${o}${i.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${i.origin} menjadi ${o}${i.minimum.toString()}`}case"invalid_format":{let 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}`:`${r[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":""}: ${un(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 Ooc(){return{localeError:n$f()}}var n$f,Poc=h(()=>{"use strict";Ya();n$f=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(i){return e[i]??null}let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",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\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",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\xF6lugildi",jwt:"JWT",template_literal:"gildi"},n={nan:"NaN",number:"n\xFAmer",array:"fylki"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera instanceof ${i.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return i.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${hi(i.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin??"gildi"} hafi ${o}${i.maximum.toString()} ${s.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin??"gildi"} s\xE9 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin} hafi ${o}${i.minimum.toString()} ${s.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin} s\xE9 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${o.prefix}"`:o.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${o.suffix}"`:o.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${o.includes}"`:o.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${o.pattern}`:`Rangt ${r[o.format]??i.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${i.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${i.keys.length>1?"ir lyklar":"ur lykill"}: ${un(i.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${i.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${i.origin}`;default:return"Rangt gildi"}}}});function Boc(){return{localeError:i$f()}}var i$f,Roc=h(()=>{"use strict";Ya();i$f=()=>{let 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}let r={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"},n={nan:"NaN",number:"numero",array:"vettore"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Input non valido: atteso instanceof ${i.expected}, ricevuto ${a}`:`Input non valido: atteso ${o}, ricevuto ${a}`}case"invalid_value":return i.values.length===1?`Input non valido: atteso ${hi(i.values[0])}`:`Opzione non valida: atteso uno tra ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Troppo grande: ${i.origin??"valore"} deve avere ${o}${i.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${i.origin??"valore"} deve essere ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`Troppo piccolo: ${i.origin} deve avere ${o}${i.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${i.origin} deve essere ${o}${i.minimum.toString()}`}case"invalid_format":{let 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 ${r[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"}: ${un(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 Doc(){return{localeError:o$f()}}var o$f,koc=h(()=>{"use strict";Ya();o$f=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(i){return e[i]??null}let r={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},n={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${i.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return i.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${hi(i.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${un(i.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=i.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=t(i.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${i.origin??"\u5024"}\u306F${i.maximum.toString()}${s.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${i.origin??"\u5024"}\u306F${i.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=i.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=t(i.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${i.origin}\u306F${i.minimum.toString()}${s.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${i.origin}\u306F${i.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[o.format]??i.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${i.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${i.keys.length>1?"\u7FA4":""}: ${un(i.keys,"\u3001")}`;case"invalid_key":return`${i.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${i.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}}});function Foc(){return{localeError:s$f()}}var s$f,Noc=h(()=>{"use strict";Ya();s$f=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(i){return e[i]??null}let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},n={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${i.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`}case"invalid_value":return i.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${hi(i.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${un(i.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${s.verb} ${o}${i.maximum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin} ${s.verb} ${o}${i.minimum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin} \u10D8\u10E7\u10DD\u10E1 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.prefix}"-\u10D8\u10D7`:o.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.suffix}"-\u10D8\u10D7`:o.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${o.includes}"-\u10E1`:o.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${o.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[o.format]??i.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${i.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${i.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${un(i.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${i.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${i.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}}});function nPr(){return{localeError:a$f()}}var a$f,Eao=h(()=>{"use strict";Ya();a$f=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(i){return e[i]??null}let r={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},n={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${i.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`}case"invalid_value":return i.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${hi(i.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${i.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin} ${o} ${i.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin} ${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${o.prefix}"`:o.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${o.suffix}"`:o.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${o.includes}"`:o.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[o.format]??i.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${i.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${un(i.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${i.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${i.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}}});function joc(){return nPr()}var zoc=h(()=>{"use strict";Eao()});function Qoc(){return{localeError:c$f()}}var c$f,Moc=h(()=>{"use strict";Ya();c$f=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(i){return e[i]??null}let r={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${i.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`}case"invalid_value":return i.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${hi(i.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${un(i.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=i.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(i.origin),c=a?.unit??"\uC694\uC18C";return a?`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${i.maximum.toString()}${c} ${o}${s}`:`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${i.maximum.toString()} ${o}${s}`}case"too_small":{let o=i.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(i.origin),c=a?.unit??"\uC694\uC18C";return a?`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${i.minimum.toString()}${c} ${o}${s}`:`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${i.minimum.toString()} ${o}${s}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[o.format]??i.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${i.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${un(i.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${i.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${i.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}}});function Loc(e){let t=Math.abs(e),r=t%10,n=t%100;return n>=11&&n<=19||r===0?"many":r===1?"one":"few"}function _oc(){return{localeError:u$f()}}var TLt,u$f,Uoc=h(()=>{"use strict";Ya();TLt=e=>e.charAt(0).toUpperCase()+e.slice(1);u$f=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(i,o,s,a){let c=e[i]??null;return c===null?c:{unit:c.unit[o],verb:c.verb[a][s?"inclusive":"notInclusive"]}}let r={regex:"\u012Fvestis",email:"el. pa\u0161to 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\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},n={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Gautas tipas ${a}, o tik\u0117tasi - instanceof ${i.expected}`:`Gautas tipas ${a}, o tik\u0117tasi - ${o}`}case"invalid_value":return i.values.length===1?`Privalo b\u016Bti ${hi(i.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${un(i.values,"|")} pasirinkim\u0173`;case"too_big":{let o=n[i.origin]??i.origin,s=t(i.origin,Loc(Number(i.maximum)),i.inclusive??!1,"smaller");if(s?.verb)return`${TLt(o??i.origin??"reik\u0161m\u0117")} ${s.verb} ${i.maximum.toString()} ${s.unit??"element\u0173"}`;let a=i.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${TLt(o??i.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${i.maximum.toString()} ${s?.unit}`}case"too_small":{let o=n[i.origin]??i.origin,s=t(i.origin,Loc(Number(i.minimum)),i.inclusive??!1,"bigger");if(s?.verb)return`${TLt(o??i.origin??"reik\u0161m\u0117")} ${s.verb} ${i.minimum.toString()} ${s.unit??"element\u0173"}`;let a=i.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${TLt(o??i.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${i.minimum.toString()} ${s?.unit}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${o.prefix}"`:o.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${o.includes}"`:o.format==="regex"?`Eilut\u0117 privalo atitikti ${o.pattern}`:`Neteisingas ${r[o.format]??i.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${i.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${i.keys.length>1?"i":"as"} rakt${i.keys.length>1?"ai":"as"}: ${un(i.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let o=n[i.origin]??i.origin;return`${TLt(o??i.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}}});function Voc(){return{localeError:l$f()}}var l$f,Goc=h(()=>{"use strict";Ya();l$f=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(i){return e[i]??null}let r={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},n={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${i.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${hi(i.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${i.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${i.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${o.pattern}`:`Invalid ${r[o.format]??i.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${un(i.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${i.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${i.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}}});function qoc(){return{localeError:p$f()}}var p$f,Woc=h(()=>{"use strict";Ya();p$f=()=>{let 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}let r={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"},n={nan:"NaN",number:"nombor"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Input tidak sah: dijangka instanceof ${i.expected}, diterima ${a}`:`Input tidak sah: dijangka ${o}, diterima ${a}`}case"invalid_value":return i.values.length===1?`Input tidak sah: dijangka ${hi(i.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Terlalu besar: dijangka ${i.origin??"nilai"} ${s.verb} ${o}${i.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${i.origin??"nilai"} adalah ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`Terlalu kecil: dijangka ${i.origin} ${s.verb} ${o}${i.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${i.origin} adalah ${o}${i.minimum.toString()}`}case"invalid_format":{let 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}`:`${r[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: ${un(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 Hoc(){return{localeError:f$f()}}var f$f,Koc=h(()=>{"use strict";Ya();f$f=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"getal"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Ongeldige invoer: verwacht instanceof ${i.expected}, ontving ${a}`:`Ongeldige invoer: verwacht ${o}, ontving ${a}`}case"invalid_value":return i.values.length===1?`Ongeldige invoer: verwacht ${hi(i.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin),a=i.origin==="date"?"laat":i.origin==="string"?"lang":"groot";return s?`Te ${a}: verwacht dat ${i.origin??"waarde"} ${o}${i.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${a}: verwacht dat ${i.origin??"waarde"} ${o}${i.maximum.toString()} is`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin),a=i.origin==="date"?"vroeg":i.origin==="string"?"kort":"klein";return s?`Te ${a}: verwacht dat ${i.origin} ${o}${i.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${a}: verwacht dat ${i.origin} ${o}${i.minimum.toString()} is`}case"invalid_format":{let 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: ${r[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":""}: ${un(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 Joc(){return{localeError:d$f()}}var d$f,Yoc=h(()=>{"use strict";Ya();d$f=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(i){return e[i]??null}let r={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\xE5de",ipv6:"IPv6-omr\xE5de",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"},n={nan:"NaN",number:"tall",array:"liste"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Ugyldig input: forventet instanceof ${i.expected}, fikk ${a}`:`Ugyldig input: forventet ${o}, fikk ${a}`}case"invalid_value":return i.values.length===1?`Ugyldig verdi: forventet ${hi(i.values[0])}`:`Ugyldig valg: forventet en av ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`For stor(t): forventet ${i.origin??"value"} til \xE5 ha ${o}${i.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${i.origin??"value"} til \xE5 ha ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`For lite(n): forventet ${i.origin} til \xE5 ha ${o}${i.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${i.origin} til \xE5 ha ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${r[o.format]??i.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${un(i.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${i.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${i.origin}`;default:return"Ugyldig input"}}}});function Xoc(){return{localeError:m$f()}}var m$f,Zoc=h(()=>{"use strict";Ya();m$f=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(i){return e[i]??null}let r={regex:"giren",email:"epostag\xE2h",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\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},n={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`F\xE2sit giren: umulan instanceof ${i.expected}, al\u0131nan ${a}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${a}`}case"invalid_value":return i.values.length===1?`F\xE2sit giren: umulan ${hi(i.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Fazla b\xFCy\xFCk: ${i.origin??"value"}, ${o}${i.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${i.origin??"value"}, ${o}${i.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`Fazla k\xFC\xE7\xFCk: ${i.origin}, ${o}${i.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${i.origin}, ${o}${i.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=i;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[o.format]??i.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${i.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${i.keys.length>1?"s":""}: ${un(i.keys,", ")}`;case"invalid_key":return`${i.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${i.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}}});function $oc(){return{localeError:h$f()}}var h$f,esc=h(()=>{"use strict";Ya();h$f=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(i){return e[i]??null}let r={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},n={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${i.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${o} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return i.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${hi(i.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${un(i.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${i.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${i.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${i.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${i.maximum.toString()} \u0648\u064A`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${i.origin} \u0628\u0627\u06CC\u062F ${o}${i.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${i.origin} \u0628\u0627\u06CC\u062F ${o}${i.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[o.format]??i.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${i.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${i.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${un(i.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${i.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${i.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}}});function tsc(){return{localeError:g$f()}}var g$f,rsc=h(()=>{"use strict";Ya();g$f=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(i){return e[i]??null}let r={regex:"wyra\u017Cenie",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\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},n={nan:"NaN",number:"liczba",array:"tablica"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${i.expected}, otrzymano ${a}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${a}`}case"invalid_value":return i.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${hi(i.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${i.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${i.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[o.format]??i.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${i.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${i.keys.length>1?"s":""}: ${un(i.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${i.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${i.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}}});function nsc(){return{localeError:A$f()}}var A$f,isc=h(()=>{"use strict";Ya();A$f=()=>{let 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}let r={regex:"padr\xE3o",email:"endere\xE7o 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\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o 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\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN",number:"n\xFAmero",null:"nulo"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Tipo inv\xE1lido: esperado instanceof ${i.expected}, recebido ${a}`:`Tipo inv\xE1lido: esperado ${o}, recebido ${a}`}case"invalid_value":return i.values.length===1?`Entrada inv\xE1lida: esperado ${hi(i.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Muito grande: esperado que ${i.origin??"valor"} tivesse ${o}${i.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${i.origin??"valor"} fosse ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`Muito pequeno: esperado que ${i.origin} tivesse ${o}${i.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${i.origin} fosse ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${o.prefix}"`:o.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inv\xE1lido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${o.pattern}`:`${r[o.format]??i.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${i.divisor}`;case"unrecognized_keys":return`Chave${i.keys.length>1?"s":""} desconhecida${i.keys.length>1?"s":""}: ${un(i.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${i.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${i.origin}`;default:return"Campo inv\xE1lido"}}}});function osc(e,t,r,n){let i=Math.abs(e),o=i%10,s=i%100;return s>=11&&s<=19?n:o===1?t:o>=2&&o<=4?r:n}function ssc(){return{localeError:y$f()}}var y$f,asc=h(()=>{"use strict";Ya();y$f=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(i){return e[i]??null}let r={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${i.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`}case"invalid_value":return i.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${hi(i.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);if(s){let a=Number(i.maximum),c=osc(a,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${i.maximum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);if(s){let a=Number(i.minimum),c=osc(a,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${i.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${i.minimum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${i.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[o.format]??i.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${i.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${i.keys.length>1?"\u0438":""}: ${un(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${i.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${i.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}}});function csc(){return{localeError:b$f()}}var b$f,usc=h(()=>{"use strict";Ya();b$f=()=>{let 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}let r={regex:"vnos",email:"e-po\u0161tni 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 \u010Das",date:"ISO datum",time:"ISO \u010Das",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 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},n={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${i.expected}, prejeto ${a}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${a}`}case"invalid_value":return i.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${hi(i.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${i.origin??"vrednost"} imelo ${o}${i.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${i.origin??"vrednost"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${i.origin} imelo ${o}${i.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${r[o.format]??i.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${i.divisor}`;case"unrecognized_keys":return`Neprepoznan${i.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${un(i.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${i.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${i.origin}`;default:return"Neveljaven vnos"}}}});function lsc(){return{localeError:E$f()}}var E$f,psc=h(()=>{"use strict";Ya();E$f=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(i){return e[i]??null}let r={regex:"regulj\xE4rt 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\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},n={nan:"NaN",number:"antal",array:"lista"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${i.expected}, fick ${a}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${a}`}case"invalid_value":return i.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${hi(i.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${o}${i.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${i.origin??"v\xE4rdet"} att ha ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${o}${i.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${r[o.format]??i.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${un(i.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${i.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${i.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}}});function fsc(){return{localeError:I$f()}}var I$f,dsc=h(()=>{"use strict";Ya();I$f=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(i){return e[i]??null}let r={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",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 \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${i.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`}case"invalid_value":return i.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${hi(i.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${un(i.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${i.maximum.toString()} ${s.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${i.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i.origin} ${o}${i.minimum.toString()} ${s.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i.origin} ${o}${i.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${r[o.format]??i.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${i.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${i.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${un(i.keys,", ")}`;case"invalid_key":return`${i.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${i.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}}});function msc(){return{localeError:v$f()}}var v$f,hsc=h(()=>{"use strict";Ya();v$f=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(i){return e[i]??null}let r={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},n={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${i.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${o} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`}case"invalid_value":return i.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${hi(i.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=t(i.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${i.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=t(i.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${i.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${o.prefix}"`:o.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${o.suffix}"`:o.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[o.format]??i.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${i.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${un(i.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${i.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${i.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}}});function gsc(){return{localeError:C$f()}}var C$f,Asc=h(()=>{"use strict";Ya();C$f=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(i){return e[i]??null}let 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\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${i.expected}, al\u0131nan ${a}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${a}`}case"invalid_value":return i.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${hi(i.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${i.origin??"de\u011Fer"} ${o}${i.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${i.origin??"de\u011Fer"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${i.origin} ${o}${i.minimum.toString()} ${s.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[o.format]??i.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${i.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${i.keys.length>1?"lar":""}: ${un(i.keys,", ")}`;case"invalid_key":return`${i.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${i.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}}});function iPr(){return{localeError:x$f()}}var x$f,Iao=h(()=>{"use strict";Ya();x$f=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(i){return e[i]??null}let r={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${i.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${o}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`}case"invalid_value":return i.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${hi(i.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${o}${i.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin} ${s.verb} ${o}${i.minimum.toString()} ${s.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin} \u0431\u0443\u0434\u0435 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[o.format]??i.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${i.keys.length>1?"\u0456":""}: ${un(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${i.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${i.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}}});function ysc(){return iPr()}var bsc=h(()=>{"use strict";Iao()});function Esc(){return{localeError:w$f()}}var w$f,Isc=h(()=>{"use strict";Ya();w$f=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(i){return e[i]??null}let r={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},n={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${i.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${o} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return i.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${hi(i.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${un(i.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${i.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${i.maximum.toString()} ${s.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${i.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${i.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${i.origin} \u06A9\u06D2 ${o}${i.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${i.origin} \u06A9\u0627 ${o}${i.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[o.format]??i.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${i.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${i.keys.length>1?"\u0632":""}: ${un(i.keys,"\u060C ")}`;case"invalid_key":return`${i.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${i.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}}});function vsc(){return{localeError:S$f()}}var S$f,Csc=h(()=>{"use strict";Ya();S$f=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"}};function t(i){return e[i]??null}let r={regex:"kirish",email:"elektron pochta manzili",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 sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},n={nan:"NaN",number:"raqam",array:"massiv"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${i.expected}, qabul qilingan ${a}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${a}`}case"invalid_value":return i.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${hi(i.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Juda katta: kutilgan ${i.origin??"qiymat"} ${o}${i.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${i.origin??"qiymat"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`Juda kichik: kutilgan ${i.origin} ${o}${i.minimum.toString()} ${s.unit} ${s.verb}`:`Juda kichik: kutilgan ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto\u2018g\u2018ri satr: "${o.includes}" ni o\u2018z ichiga olishi kerak`:o.format==="regex"?`Noto\u2018g\u2018ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[o.format]??i.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${i.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${i.keys.length>1?"lar":""}: ${un(i.keys,", ")}`;case"invalid_key":return`${i.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${i.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}}});function xsc(){return{localeError:T$f()}}var T$f,wsc=h(()=>{"use strict";Ya();T$f=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(i){return e[i]??null}let r={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 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\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},n={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${i.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`}case"invalid_value":return i.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${hi(i.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${i.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${o}${i.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${i.origin??"gi\xE1 tr\u1ECB"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${i.origin} ${s.verb} ${o}${i.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${r[o.format]??i.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${i.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${un(i.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${i.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${i.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}}});function Ssc(){return{localeError:O$f()}}var O$f,Tsc=h(()=>{"use strict";Ya();O$f=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(i){return e[i]??null}let r={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},n={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${i.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`}case"invalid_value":return i.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${hi(i.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${i.origin??"\u503C"} ${o}${i.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${i.origin??"\u503C"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${i.origin} ${o}${i.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${r[o.format]??i.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${i.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${un(i.keys,", ")}`;case"invalid_key":return`${i.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${i.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}}});function Osc(){return{localeError:P$f()}}var P$f,Psc=h(()=>{"use strict";Ya();P$f=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(i){return e[i]??null}let r={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",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 \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${i.expected}\uFF0C\u4F46\u6536\u5230 ${a}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${a}`}case"invalid_value":return i.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${hi(i.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${i.origin??"\u503C"} \u61C9\u70BA ${o}${i.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${i.origin??"\u503C"} \u61C9\u70BA ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${i.origin} \u61C9\u70BA ${o}${i.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${i.origin} \u61C9\u70BA ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${r[o.format]??i.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${i.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${i.keys.length>1?"\u5011":""}\uFF1A${un(i.keys,"\u3001")}`;case"invalid_key":return`${i.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${i.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}}});function Bsc(){return{localeError:B$f()}}var B$f,Rsc=h(()=>{"use strict";Ya();B$f=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(i){return e[i]??null}let r={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",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:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},n={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xi(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${i.expected}, \xE0m\u1ECD\u0300 a r\xED ${a}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${a}`}case"invalid_value":return i.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${hi(i.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${un(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${i.origin??"iye"} ${s.verb} ${o}${i.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${i.maximum}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${i.origin} ${s.verb} ${o}${i.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${i.minimum}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${r[o.format]??i.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${i.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${un(i.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${i.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${i.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}}});var OLt={};ee(OLt,{ar:()=>Gic,az:()=>Wic,be:()=>Jic,bg:()=>Xic,ca:()=>$ic,cs:()=>toc,da:()=>noc,de:()=>ooc,en:()=>rPr,eo:()=>aoc,es:()=>uoc,fa:()=>poc,fi:()=>doc,fr:()=>hoc,frCA:()=>Aoc,he:()=>boc,hu:()=>Ioc,hy:()=>xoc,id:()=>Soc,is:()=>Ooc,it:()=>Boc,ja:()=>Doc,ka:()=>Foc,kh:()=>joc,km:()=>nPr,ko:()=>Qoc,lt:()=>_oc,mk:()=>Voc,ms:()=>qoc,nl:()=>Hoc,no:()=>Joc,ota:()=>Xoc,pl:()=>tsc,ps:()=>$oc,pt:()=>nsc,ru:()=>ssc,sl:()=>csc,sv:()=>lsc,ta:()=>fsc,th:()=>msc,tr:()=>gsc,ua:()=>ysc,uk:()=>iPr,ur:()=>Esc,uz:()=>vsc,vi:()=>xsc,yo:()=>Bsc,zhCN:()=>Ssc,zhTW:()=>Osc});var vao=h(()=>{"use strict";qic();Hic();Yic();Zic();eoc();roc();ioc();soc();bao();coc();loc();foc();moc();goc();yoc();Eoc();voc();woc();Toc();Poc();Roc();koc();Noc();zoc();Eao();Moc();Uoc();Goc();Woc();Koc();Yoc();Zoc();esc();rsc();isc();asc();usc();psc();dsc();hsc();Asc();bsc();Iao();Isc();Csc();wsc();Tsc();Psc();Rsc()});function sPr(){return new oPr}var Dsc,Cao,xao,oPr,oB,PLt=h(()=>{"use strict";Cao=Symbol("ZodOutput"),xao=Symbol("ZodInput"),oPr=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let 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){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let 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)}};(Dsc=globalThis).__zod_globalRegistry??(Dsc.__zod_globalRegistry=sPr());oB=globalThis.__zod_globalRegistry});function wao(e,t){return new e({type:"string",...zi(t)})}function Sao(e,t){return new e({type:"string",coerce:!0,...zi(t)})}function aPr(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...zi(t)})}function BLt(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...zi(t)})}function cPr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...zi(t)})}function uPr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...zi(t)})}function lPr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...zi(t)})}function pPr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...zi(t)})}function RLt(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...zi(t)})}function fPr(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...zi(t)})}function dPr(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...zi(t)})}function mPr(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...zi(t)})}function hPr(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...zi(t)})}function gPr(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...zi(t)})}function APr(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...zi(t)})}function yPr(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...zi(t)})}function bPr(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...zi(t)})}function EPr(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...zi(t)})}function Tao(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...zi(t)})}function IPr(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...zi(t)})}function vPr(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...zi(t)})}function CPr(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...zi(t)})}function xPr(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...zi(t)})}function wPr(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...zi(t)})}function SPr(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...zi(t)})}function Pao(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...zi(t)})}function Bao(e,t){return new e({type:"string",format:"date",check:"string_format",...zi(t)})}function Rao(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...zi(t)})}function Dao(e,t){return new e({type:"string",format:"duration",check:"string_format",...zi(t)})}function kao(e,t){return new e({type:"number",checks:[],...zi(t)})}function Fao(e,t){return new e({type:"number",coerce:!0,checks:[],...zi(t)})}function Nao(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...zi(t)})}function jao(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...zi(t)})}function zao(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...zi(t)})}function Qao(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...zi(t)})}function Mao(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...zi(t)})}function Lao(e,t){return new e({type:"boolean",...zi(t)})}function _ao(e,t){return new e({type:"boolean",coerce:!0,...zi(t)})}function Uao(e,t){return new e({type:"bigint",...zi(t)})}function Vao(e,t){return new e({type:"bigint",coerce:!0,...zi(t)})}function Gao(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...zi(t)})}function qao(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...zi(t)})}function Wao(e,t){return new e({type:"symbol",...zi(t)})}function Hao(e,t){return new e({type:"undefined",...zi(t)})}function Kao(e,t){return new e({type:"null",...zi(t)})}function Jao(e){return new e({type:"any"})}function Yao(e){return new e({type:"unknown"})}function Xao(e,t){return new e({type:"never",...zi(t)})}function Zao(e,t){return new e({type:"void",...zi(t)})}function $ao(e,t){return new e({type:"date",...zi(t)})}function eco(e,t){return new e({type:"date",coerce:!0,...zi(t)})}function tco(e,t){return new e({type:"nan",...zi(t)})}function d$(e,t){return new GOr({check:"less_than",...zi(t),value:e,inclusive:!1})}function N3(e,t){return new GOr({check:"less_than",...zi(t),value:e,inclusive:!0})}function m$(e,t){return new qOr({check:"greater_than",...zi(t),value:e,inclusive:!1})}function P2(e,t){return new qOr({check:"greater_than",...zi(t),value:e,inclusive:!0})}function TPr(e){return m$(0,e)}function OPr(e){return d$(0,e)}function PPr(e){return N3(0,e)}function BPr(e){return P2(0,e)}function zIe(e,t){return new _oo({check:"multiple_of",...zi(t),value:e})}function QIe(e,t){return new Goo({check:"max_size",...zi(t),maximum:e})}function h$(e,t){return new qoo({check:"min_size",...zi(t),minimum:e})}function wLe(e,t){return new Woo({check:"size_equals",...zi(t),size:e})}function SLe(e,t){return new Hoo({check:"max_length",...zi(t),maximum:e})}function Tfe(e,t){return new Koo({check:"min_length",...zi(t),minimum:e})}function TLe(e,t){return new Joo({check:"length_equals",...zi(t),length:e})}function mtt(e,t){return new Yoo({check:"string_format",format:"regex",...zi(t),pattern:e})}function htt(e){return new Xoo({check:"string_format",format:"lowercase",...zi(e)})}function gtt(e){return new Zoo({check:"string_format",format:"uppercase",...zi(e)})}function Att(e,t){return new $oo({check:"string_format",format:"includes",...zi(t),includes:e})}function ytt(e,t){return new eso({check:"string_format",format:"starts_with",...zi(t),prefix:e})}function btt(e,t){return new tso({check:"string_format",format:"ends_with",...zi(t),suffix:e})}function RPr(e,t,r){return new rso({check:"property",property:e,schema:t,...zi(r)})}function Ett(e,t){return new nso({check:"mime_type",mime:e,...zi(t)})}function zH(e){return new iso({check:"overwrite",tx:e})}function Itt(e){return zH(t=>t.normalize(e))}function vtt(){return zH(e=>e.trim())}function Ctt(){return zH(e=>e.toLowerCase())}function xtt(){return zH(e=>e.toUpperCase())}function wtt(){return zH(e=>eoo(e))}function rco(e,t,r){return new e({type:"array",element:t,...zi(r)})}function D$f(e,t,r){return new e({type:"union",options:t,...zi(r)})}function k$f(e,t,r){return new e({type:"union",options:t,inclusive:!1,...zi(r)})}function F$f(e,t,r,n){return new e({type:"union",options:r,discriminator:t,...zi(n)})}function N$f(e,t,r){return new e({type:"intersection",left:t,right:r})}function j$f(e,t,r,n){let i=r instanceof nl,o=i?n:r,s=i?r:null;return new e({type:"tuple",items:t,rest:s,...zi(o)})}function z$f(e,t,r,n){return new e({type:"record",keyType:t,valueType:r,...zi(n)})}function Q$f(e,t,r,n){return new e({type:"map",keyType:t,valueType:r,...zi(n)})}function M$f(e,t,r){return new e({type:"set",valueType:t,...zi(r)})}function L$f(e,t,r){let n=Array.isArray(t)?Object.fromEntries(t.map(i=>[i,i])):t;return new e({type:"enum",entries:n,...zi(r)})}function _$f(e,t,r){return new e({type:"enum",entries:t,...zi(r)})}function U$f(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...zi(r)})}function nco(e,t){return new e({type:"file",...zi(t)})}function V$f(e,t){return new e({type:"transform",transform:t})}function G$f(e,t){return new e({type:"optional",innerType:t})}function q$f(e,t){return new e({type:"nullable",innerType:t})}function W$f(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():roo(r)}})}function H$f(e,t,r){return new e({type:"nonoptional",innerType:t,...zi(r)})}function K$f(e,t){return new e({type:"success",innerType:t})}function J$f(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function Y$f(e,t,r){return new e({type:"pipe",in:t,out:r})}function X$f(e,t){return new e({type:"readonly",innerType:t})}function Z$f(e,t,r){return new e({type:"template_literal",parts:t,...zi(r)})}function $$f(e,t){return new e({type:"lazy",getter:t})}function eed(e,t){return new e({type:"promise",innerType:t})}function ico(e,t,r){let n=zi(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}function oco(e,t,r){return new e({type:"custom",check:"custom",fn:t,...zi(r)})}function sco(e){let t=ksc(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(att(n,r.value,t._zod.def));else{let 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(att(i))}},e(r.value,r)));return t}function ksc(e,t){let r=new ly({check:"custom",...zi(t)});return r._zod.check=e,r}function aco(e){let t=new ly({check:"describe"});return t._zod.onattach=[r=>{let n=oB.get(r)??{};oB.add(r,{...n,description:e})}],t._zod.check=()=>{},t}function cco(e){let t=new ly({check:"meta"});return t._zod.onattach=[r=>{let n=oB.get(r)??{};oB.add(r,{...n,...e})}],t._zod.check=()=>{},t}function uco(e,t){let r=zi(t),n=r.truthy??["true","1","yes","on","y","enabled"],i=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(n=n.map(d=>typeof d=="string"?d.toLowerCase():d),i=i.map(d=>typeof d=="string"?d.toLowerCase():d));let o=new Set(n),s=new Set(i),a=e.Codec??SLt,c=e.Boolean??xLt,u=e.String??xLe,l=new u({type:"string",error:r.error}),p=new c({type:"boolean",error:r.error}),f=new a({type:"pipe",in:l,out:p,transform:((d,m)=>{let g=d;return r.case!=="sensitive"&&(g=g.toLowerCase()),o.has(g)?!0:s.has(g)?!1:(m.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...s],input:m.value,inst:f,continue:!1}),{})}),reverseTransform:((d,m)=>d===!0?n[0]||"true":i[0]||"false"),error:r.error});return f}function Stt(e,t,r,n={}){let i=zi(n),o={...zi(n),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:a=>r.test(a),...i};return r instanceof RegExp&&(o.pattern=r),new e(o)}var Oao,Fsc=h(()=>{"use strict";WOr();PLt();yao();Ya();Oao={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}});function MIe(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??oB,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function mg(e,t,r={path:[],schemaPath:[]}){var n;let i=e._zod.def,o=t.seen.get(e);if(o)return o.count++,r.schemaPath.includes(e)&&(o.cycle=r.path),o.schema;let s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s);let a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{let l={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,l);else{let f=s.schema,d=t.processors[i.type];if(!d)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);d(e,t,f,l)}let p=e._zod.parent;p&&(s.ref||(s.ref=p),mg(p,t,l),t.seen.get(p).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(s.schema,c),t.io==="input"&&B2(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&s.schema._prefault&&((n=s.schema).default??(n.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function LIe(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=new Map;for(let s of e.seen.entries()){let a=e.metadataRegistry.get(s[0])?.id;if(a){let c=n.get(a);if(c&&c!==s[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(a,s[0])}}let i=s=>{let a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let p=e.external.registry.get(s[0])?.id,f=e.external.uri??(m=>m);if(p)return{ref:f(p)};let d=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=d,{defId:d,ref:`${f("__shared")}#/${a}/${d}`}}if(s[1]===r)return{ref:"#"};let u=`#/${a}/`,l=s[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:u+l}},o=s=>{if(s[1].schema.$ref)return;let a=s[1],{ref:c,defId:u}=i(s);a.def={...a.schema},u&&(a.defId=u);let l=a.schema;for(let p in l)delete l[p];l.$ref=c};if(e.cycles==="throw")for(let s of e.seen.entries()){let a=s[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
|
|
138
138
|
|
|
139
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let a=s[1];if(t===s[0]){o(s);continue}if(e.external){let u=e.external.registry.get(s[0])?.id;if(t!==s[0]&&u){o(s);continue}}if(e.metadataRegistry.get(s[0])?.id){o(s);continue}if(a.cycle){o(s);continue}if(a.count>1&&e.reused==="ref"){o(s);continue}}}function _Ie(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=s=>{let a=e.seen.get(s);if(a.ref===null)return;let c=a.def??a.schema,u={...c},l=a.ref;if(a.ref=null,l){n(l);let f=e.seen.get(l),d=f.schema;if(d.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(d)):Object.assign(c,d),Object.assign(c,u),s._zod.parent===l)for(let g in c)g==="$ref"||g==="allOf"||g in u||delete c[g];if(d.$ref&&f.def)for(let g in c)g==="$ref"||g==="allOf"||g in f.def&&JSON.stringify(c[g])===JSON.stringify(f.def[g])&&delete c[g]}let p=s._zod.parent;if(p&&p!==l){n(p);let f=e.seen.get(p);if(f?.schema.$ref&&(c.$ref=f.schema.$ref,f.def))for(let d in c)d==="$ref"||d==="allOf"||d in f.def&&JSON.stringify(c[d])===JSON.stringify(f.def[d])&&delete c[d]}e.override({zodSchema:s,jsonSchema:c,path:a.path??[]})};for(let s of[...e.seen.entries()].reverse())n(s[0]);let i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(s)}Object.assign(i,r.def??r.schema);let o=e.external?.defs??{};for(let s of e.seen.entries()){let a=s[1];a.def&&a.defId&&(o[a.defId]=a.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?i.$defs=o:i.definitions=o);try{let s=JSON.parse(JSON.stringify(i));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:Ttt(t,"input",e.processors),output:Ttt(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function B2(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return B2(n.element,r);if(n.type==="set")return B2(n.valueType,r);if(n.type==="lazy")return B2(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 B2(n.innerType,r);if(n.type==="intersection")return B2(n.left,r)||B2(n.right,r);if(n.type==="record"||n.type==="map")return B2(n.keyType,r)||B2(n.valueType,r);if(n.type==="pipe")return B2(n.in,r)||B2(n.out,r);if(n.type==="object"){for(let i in n.shape)if(B2(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(let i of n.options)if(B2(i,r))return!0;return!1}if(n.type==="tuple"){for(let i of n.items)if(B2(i,r))return!0;return!!(n.rest&&B2(n.rest,r))}return!1}var lco,Ttt,DLt=h(()=>{"use strict";PLt();lco=(e,t={})=>r=>{let n=MIe({...r,processors:t});return mg(e,n),LIe(n,e),_Ie(n,e)},Ttt=(e,t,r={})=>n=>{let{libraryOptions:i,target:o}=n??{},s=MIe({...i??{},target:o,io:t,processors:r});return mg(e,s),LIe(s,e),_Ie(s,e)}});function NPr(e,t){if("_idmap"in e){let n=e,i=MIe({...t,processors:DPr}),o={};for(let c of n._idmap.entries()){let[u,l]=c;mg(l,i)}let s={},a={registry:n,uri:t?.uri,defs:o};i.external=a;for(let c of n._idmap.entries()){let[u,l]=c;LIe(i,l),s[u]=_Ie(i,l)}if(Object.keys(o).length>0){let c=i.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[c]:o}}return{schemas:s}}let r=MIe({...t,processors:DPr});return mg(e,r),LIe(r,e),_Ie(r,e)}var ted,pco,fco,dco,mco,hco,gco,Aco,yco,bco,Eco,Ico,vco,Cco,xco,wco,Sco,Tco,Oco,Pco,Bco,Rco,Dco,kco,Fco,Nco,kPr,jco,zco,Qco,Mco,Lco,_co,Uco,Vco,Gco,qco,Wco,FPr,Hco,DPr,kLt=h(()=>{"use strict";DLt();Ya();ted={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},pco=(e,t,r,n)=>{let i=r;i.type="string";let{minimum:o,maximum:s,format:a,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof o=="number"&&(i.minLength=o),typeof s=="number"&&(i.maxLength=s),a&&(i.format=ted[a]??a,i.format===""&&delete i.format,a==="time"&&delete i.format),u&&(i.contentEncoding=u),c&&c.size>0){let l=[...c];l.length===1?i.pattern=l[0].source:l.length>1&&(i.allOf=[...l.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},fco=(e,t,r,n)=>{let i=r,{minimum:o,maximum:s,format:a,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:l}=e._zod.bag;typeof a=="string"&&a.includes("int")?i.type="integer":i.type="number",typeof l=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l),typeof o=="number"&&(i.minimum=o,typeof l=="number"&&t.target!=="draft-04"&&(l>=o?delete i.minimum:delete i.exclusiveMinimum)),typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.maximum=u,i.exclusiveMaximum=!0):i.exclusiveMaximum=u),typeof s=="number"&&(i.maximum=s,typeof u=="number"&&t.target!=="draft-04"&&(u<=s?delete i.maximum:delete i.exclusiveMaximum)),typeof c=="number"&&(i.multipleOf=c)},dco=(e,t,r,n)=>{r.type="boolean"},mco=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},hco=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},gco=(e,t,r,n)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},Aco=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},yco=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},bco=(e,t,r,n)=>{r.not={}},Eco=(e,t,r,n)=>{},Ico=(e,t,r,n)=>{},vco=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Cco=(e,t,r,n)=>{let i=e._zod.def,o=dLt(i.entries);o.every(s=>typeof s=="number")&&(r.type="number"),o.every(s=>typeof s=="string")&&(r.type="string"),r.enum=o},xco=(e,t,r,n)=>{let i=e._zod.def,o=[];for(let s of i.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(s))}else o.push(s);if(o.length!==0)if(o.length===1){let s=o[0];r.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[s]:r.const=s}else o.every(s=>typeof s=="number")&&(r.type="number"),o.every(s=>typeof s=="string")&&(r.type="string"),o.every(s=>typeof s=="boolean")&&(r.type="boolean"),o.every(s=>s===null)&&(r.type="null"),r.enum=o},wco=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Sco=(e,t,r,n)=>{let i=r,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");i.type="string",i.pattern=o.source},Tco=(e,t,r,n)=>{let i=r,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:a,mime:c}=e._zod.bag;s!==void 0&&(o.minLength=s),a!==void 0&&(o.maxLength=a),c?c.length===1?(o.contentMediaType=c[0],Object.assign(i,o)):(Object.assign(i,o),i.anyOf=c.map(u=>({contentMediaType:u}))):Object.assign(i,o)},Oco=(e,t,r,n)=>{r.type="boolean"},Pco=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Bco=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Rco=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Dco=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},kco=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Fco=(e,t,r,n)=>{let i=r,o=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;typeof s=="number"&&(i.minItems=s),typeof a=="number"&&(i.maxItems=a),i.type="array",i.items=mg(o.element,t,{...n,path:[...n.path,"items"]})},Nco=(e,t,r,n)=>{let i=r,o=e._zod.def;i.type="object",i.properties={};let s=o.shape;for(let u in s)i.properties[u]=mg(s[u],t,{...n,path:[...n.path,"properties",u]});let a=new Set(Object.keys(s)),c=new Set([...a].filter(u=>{let l=o.shape[u]._zod;return t.io==="input"?l.optin===void 0:l.optout===void 0}));c.size>0&&(i.required=Array.from(c)),o.catchall?._zod.def.type==="never"?i.additionalProperties=!1:o.catchall?o.catchall&&(i.additionalProperties=mg(o.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},kPr=(e,t,r,n)=>{let i=e._zod.def,o=i.inclusive===!1,s=i.options.map((a,c)=>mg(a,t,{...n,path:[...n.path,o?"oneOf":"anyOf",c]}));o?r.oneOf=s:r.anyOf=s},jco=(e,t,r,n)=>{let i=e._zod.def,o=mg(i.left,t,{...n,path:[...n.path,"allOf",0]}),s=mg(i.right,t,{...n,path:[...n.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,c=[...a(o)?o.allOf:[o],...a(s)?s.allOf:[s]];r.allOf=c},zco=(e,t,r,n)=>{let i=r,o=e._zod.def;i.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",a=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=o.items.map((f,d)=>mg(f,t,{...n,path:[...n.path,s,d]})),u=o.rest?mg(o.rest,t,{...n,path:[...n.path,a,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null;t.target==="draft-2020-12"?(i.prefixItems=c,u&&(i.items=u)):t.target==="openapi-3.0"?(i.items={anyOf:c},u&&i.items.anyOf.push(u),i.minItems=c.length,u||(i.maxItems=c.length)):(i.items=c,u&&(i.additionalItems=u));let{minimum:l,maximum:p}=e._zod.bag;typeof l=="number"&&(i.minItems=l),typeof p=="number"&&(i.maxItems=p)},Qco=(e,t,r,n)=>{let i=r,o=e._zod.def;i.type="object";let s=o.keyType,c=s._zod.bag?.patterns;if(o.mode==="loose"&&c&&c.size>0){let l=mg(o.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});i.patternProperties={};for(let p of c)i.patternProperties[p.source]=l}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(i.propertyNames=mg(o.keyType,t,{...n,path:[...n.path,"propertyNames"]})),i.additionalProperties=mg(o.valueType,t,{...n,path:[...n.path,"additionalProperties"]});let u=s._zod.values;if(u){let l=[...u].filter(p=>typeof p=="string"||typeof p=="number");l.length>0&&(i.required=l)}},Mco=(e,t,r,n)=>{let i=e._zod.def,o=mg(i.innerType,t,n),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=i.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}]},Lco=(e,t,r,n)=>{let i=e._zod.def;mg(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType},_co=(e,t,r,n)=>{let i=e._zod.def;mg(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},Uco=(e,t,r,n)=>{let i=e._zod.def;mg(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Vco=(e,t,r,n)=>{let i=e._zod.def;mg(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType;let s;try{s=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=s},Gco=(e,t,r,n)=>{let i=e._zod.def,o=t.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;mg(o,t,n);let s=t.seen.get(e);s.ref=o},qco=(e,t,r,n)=>{let i=e._zod.def;mg(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType,r.readOnly=!0},Wco=(e,t,r,n)=>{let i=e._zod.def;mg(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType},FPr=(e,t,r,n)=>{let i=e._zod.def;mg(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType},Hco=(e,t,r,n)=>{let i=e._zod.innerType;mg(i,t,n);let o=t.seen.get(e);o.ref=i},DPr={string:pco,number:fco,boolean:dco,bigint:mco,symbol:hco,null:gco,undefined:Aco,void:yco,never:bco,any:Eco,unknown:Ico,date:vco,enum:Cco,literal:xco,nan:wco,template_literal:Sco,file:Tco,success:Oco,custom:Pco,function:Bco,transform:Rco,map:Dco,set:kco,array:Fco,object:Nco,union:kPr,intersection:jco,tuple:zco,record:Qco,nullable:Mco,nonoptional:Lco,default:_co,prefault:Uco,catch:Vco,pipe:Gco,readonly:qco,promise:Wco,optional:FPr,lazy:Hco}});var jPr,Nsc=h(()=>{"use strict";kLt();DLt();jPr=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=MIe({processors:DPr,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return mg(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),LIe(this.ctx,t);let n=_Ie(this.ctx,t),{"~standard":i,...o}=n;return o}}});var jsc={};var zsc=h(()=>{"use strict"});var Ofe={};ee(Ofe,{$ZodAny:()=>Lso,$ZodArray:()=>qso,$ZodAsyncError:()=>jH,$ZodBase64:()=>Bso,$ZodBase64URL:()=>Rso,$ZodBigInt:()=>$Or,$ZodBigIntFormat:()=>jso,$ZodBoolean:()=>xLt,$ZodCIDRv4:()=>Tso,$ZodCIDRv6:()=>Oso,$ZodCUID:()=>hso,$ZodCUID2:()=>gso,$ZodCatch:()=>uao,$ZodCheck:()=>ly,$ZodCheckBigIntFormat:()=>Voo,$ZodCheckEndsWith:()=>tso,$ZodCheckGreaterThan:()=>qOr,$ZodCheckIncludes:()=>$oo,$ZodCheckLengthEquals:()=>Joo,$ZodCheckLessThan:()=>GOr,$ZodCheckLowerCase:()=>Xoo,$ZodCheckMaxLength:()=>Hoo,$ZodCheckMaxSize:()=>Goo,$ZodCheckMimeType:()=>nso,$ZodCheckMinLength:()=>Koo,$ZodCheckMinSize:()=>qoo,$ZodCheckMultipleOf:()=>_oo,$ZodCheckNumberFormat:()=>Uoo,$ZodCheckOverwrite:()=>iso,$ZodCheckProperty:()=>rso,$ZodCheckRegex:()=>Yoo,$ZodCheckSizeEquals:()=>Woo,$ZodCheckStartsWith:()=>eso,$ZodCheckStringFormat:()=>ftt,$ZodCheckUpperCase:()=>Zoo,$ZodCodec:()=>SLt,$ZodCustom:()=>Aao,$ZodCustomStringFormat:()=>Fso,$ZodDate:()=>Gso,$ZodDefault:()=>oao,$ZodDiscriminatedUnion:()=>Kso,$ZodE164:()=>Dso,$ZodEmail:()=>pso,$ZodEmoji:()=>dso,$ZodEncodeError:()=>DIe,$ZodEnum:()=>$so,$ZodError:()=>yLt,$ZodExactOptional:()=>nao,$ZodFile:()=>tao,$ZodFunction:()=>mao,$ZodGUID:()=>uso,$ZodIPv4:()=>xso,$ZodIPv6:()=>wso,$ZodISODate:()=>Iso,$ZodISODateTime:()=>Eso,$ZodISODuration:()=>Cso,$ZodISOTime:()=>vso,$ZodIntersection:()=>Jso,$ZodJWT:()=>kso,$ZodKSUID:()=>bso,$ZodLazy:()=>gao,$ZodLiteral:()=>eao,$ZodMAC:()=>Sso,$ZodMap:()=>Xso,$ZodNaN:()=>lao,$ZodNanoID:()=>mso,$ZodNever:()=>Uso,$ZodNonOptional:()=>aao,$ZodNull:()=>Mso,$ZodNullable:()=>iao,$ZodNumber:()=>ZOr,$ZodNumberFormat:()=>Nso,$ZodObject:()=>Vic,$ZodObjectJIT:()=>Wso,$ZodOptional:()=>tPr,$ZodPipe:()=>pao,$ZodPrefault:()=>sao,$ZodPromise:()=>hao,$ZodReadonly:()=>fao,$ZodRealError:()=>pQ,$ZodRecord:()=>Yso,$ZodRegistry:()=>oPr,$ZodSet:()=>Zso,$ZodString:()=>xLe,$ZodStringFormat:()=>NA,$ZodSuccess:()=>cao,$ZodSymbol:()=>zso,$ZodTemplateLiteral:()=>dao,$ZodTransform:()=>rao,$ZodTuple:()=>ePr,$ZodType:()=>nl,$ZodULID:()=>Aso,$ZodURL:()=>fso,$ZodUUID:()=>lso,$ZodUndefined:()=>Qso,$ZodUnion:()=>wLt,$ZodUnknown:()=>_so,$ZodVoid:()=>Vso,$ZodXID:()=>yso,$ZodXor:()=>Hso,$brand:()=>OOr,$constructor:()=>Sr,$input:()=>xao,$output:()=>Cao,Doc:()=>CLt,JSONSchema:()=>jsc,JSONSchemaGenerator:()=>jPr,NEVER:()=>Yio,TimePrecision:()=>Oao,_any:()=>Jao,_array:()=>rco,_base64:()=>CPr,_base64url:()=>xPr,_bigint:()=>Uao,_boolean:()=>Lao,_catch:()=>J$f,_check:()=>ksc,_cidrv4:()=>IPr,_cidrv6:()=>vPr,_coercedBigint:()=>Vao,_coercedBoolean:()=>_ao,_coercedDate:()=>eco,_coercedNumber:()=>Fao,_coercedString:()=>Sao,_cuid:()=>mPr,_cuid2:()=>hPr,_custom:()=>ico,_date:()=>$ao,_decode:()=>FOr,_decodeAsync:()=>jOr,_default:()=>W$f,_discriminatedUnion:()=>F$f,_e164:()=>wPr,_email:()=>aPr,_emoji:()=>fPr,_encode:()=>kOr,_encodeAsync:()=>NOr,_endsWith:()=>btt,_enum:()=>L$f,_file:()=>nco,_float32:()=>jao,_float64:()=>zao,_gt:()=>m$,_gte:()=>P2,_guid:()=>BLt,_includes:()=>Att,_int:()=>Nao,_int32:()=>Qao,_int64:()=>Gao,_intersection:()=>N$f,_ipv4:()=>bPr,_ipv6:()=>EPr,_isoDate:()=>Bao,_isoDateTime:()=>Pao,_isoDuration:()=>Dao,_isoTime:()=>Rao,_jwt:()=>SPr,_ksuid:()=>yPr,_lazy:()=>$$f,_length:()=>TLe,_literal:()=>U$f,_lowercase:()=>htt,_lt:()=>d$,_lte:()=>N3,_mac:()=>Tao,_map:()=>Q$f,_max:()=>N3,_maxLength:()=>SLe,_maxSize:()=>QIe,_mime:()=>Ett,_min:()=>P2,_minLength:()=>Tfe,_minSize:()=>h$,_multipleOf:()=>zIe,_nan:()=>tco,_nanoid:()=>dPr,_nativeEnum:()=>_$f,_negative:()=>OPr,_never:()=>Xao,_nonnegative:()=>BPr,_nonoptional:()=>H$f,_nonpositive:()=>PPr,_normalize:()=>Itt,_null:()=>Kao,_nullable:()=>q$f,_number:()=>kao,_optional:()=>G$f,_overwrite:()=>zH,_parse:()=>ctt,_parseAsync:()=>utt,_pipe:()=>Y$f,_positive:()=>TPr,_promise:()=>eed,_property:()=>RPr,_readonly:()=>X$f,_record:()=>z$f,_refine:()=>oco,_regex:()=>mtt,_safeDecode:()=>QOr,_safeDecodeAsync:()=>LOr,_safeEncode:()=>zOr,_safeEncodeAsync:()=>MOr,_safeParse:()=>ltt,_safeParseAsync:()=>ptt,_set:()=>M$f,_size:()=>wLe,_slugify:()=>wtt,_startsWith:()=>ytt,_string:()=>wao,_stringFormat:()=>Stt,_stringbool:()=>uco,_success:()=>K$f,_superRefine:()=>sco,_symbol:()=>Wao,_templateLiteral:()=>Z$f,_toLowerCase:()=>Ctt,_toUpperCase:()=>xtt,_transform:()=>V$f,_trim:()=>vtt,_tuple:()=>j$f,_uint32:()=>Mao,_uint64:()=>qao,_ulid:()=>gPr,_undefined:()=>Hao,_union:()=>D$f,_unknown:()=>Yao,_uppercase:()=>gtt,_url:()=>RLt,_uuid:()=>cPr,_uuidv4:()=>uPr,_uuidv6:()=>lPr,_uuidv7:()=>pPr,_void:()=>Zao,_xid:()=>APr,_xor:()=>k$f,clone:()=>O2,config:()=>fv,createStandardJSONSchemaMethod:()=>Ttt,createToJSONSchemaMethod:()=>lco,decode:()=>nZf,decodeAsync:()=>oZf,describe:()=>aco,encode:()=>rZf,encodeAsync:()=>iZf,extractDefs:()=>LIe,finalize:()=>_Ie,flattenError:()=>bLt,formatError:()=>ELt,globalConfig:()=>pLt,globalRegistry:()=>oB,initializeContext:()=>MIe,isValidBase64:()=>Pso,isValidBase64URL:()=>Mic,isValidJWT:()=>Lic,locales:()=>OLt,meta:()=>cco,parse:()=>ROr,parseAsync:()=>DOr,prettifyError:()=>coo,process:()=>mg,regexes:()=>UV,registry:()=>sPr,safeDecode:()=>aZf,safeDecodeAsync:()=>uZf,safeEncode:()=>sZf,safeEncodeAsync:()=>cZf,safeParse:()=>loo,safeParseAsync:()=>poo,toDotPath:()=>Iic,toJSONSchema:()=>NPr,treeifyError:()=>aoo,util:()=>Oi,version:()=>sso});var fQ=h(()=>{"use strict";itt();foo();uoo();yao();WOr();aso();Ya();VOr();vao();PLt();oso();Fsc();DLt();kLt();Nsc();zsc()});var zPr={};ee(zPr,{endsWith:()=>btt,gt:()=>m$,gte:()=>P2,includes:()=>Att,length:()=>TLe,lowercase:()=>htt,lt:()=>d$,lte:()=>N3,maxLength:()=>SLe,maxSize:()=>QIe,mime:()=>Ett,minLength:()=>Tfe,minSize:()=>h$,multipleOf:()=>zIe,negative:()=>OPr,nonnegative:()=>BPr,nonpositive:()=>PPr,normalize:()=>Itt,overwrite:()=>zH,positive:()=>TPr,property:()=>RPr,regex:()=>mtt,size:()=>wLe,slugify:()=>wtt,startsWith:()=>ytt,toLowerCase:()=>Ctt,toUpperCase:()=>xtt,trim:()=>vtt,uppercase:()=>gtt});var QPr=h(()=>{"use strict";fQ()});var Ott={};ee(Ott,{ZodISODate:()=>LPr,ZodISODateTime:()=>MPr,ZodISODuration:()=>UPr,ZodISOTime:()=>_Pr,date:()=>Jco,datetime:()=>Kco,duration:()=>Xco,time:()=>Yco});function Kco(e){return Pao(MPr,e)}function Jco(e){return Bao(LPr,e)}function Yco(e){return Rao(_Pr,e)}function Xco(e){return Dao(UPr,e)}var MPr,LPr,_Pr,UPr,FLt=h(()=>{"use strict";fQ();jLt();MPr=Sr("ZodISODateTime",(e,t)=>{Eso.init(e,t),jA.init(e,t)});LPr=Sr("ZodISODate",(e,t)=>{Iso.init(e,t),jA.init(e,t)});_Pr=Sr("ZodISOTime",(e,t)=>{vso.init(e,t),jA.init(e,t)});UPr=Sr("ZodISODuration",(e,t)=>{Cso.init(e,t),jA.init(e,t)})});var Qsc,ned,dQ,Zco=h(()=>{"use strict";fQ();fQ();Ya();Qsc=(e,t)=>{yLt.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>ELt(e,r)},flatten:{value:r=>bLt(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,ott,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,ott,2)}},isEmpty:{get(){return e.issues.length===0}}})},ned=Sr("ZodError",Qsc),dQ=Sr("ZodError",Qsc,{Parent:Error})});var $co,euo,tuo,ruo,nuo,iuo,ouo,suo,auo,cuo,uuo,luo,puo=h(()=>{"use strict";fQ();Zco();$co=ctt(dQ),euo=utt(dQ),tuo=ltt(dQ),ruo=ptt(dQ),nuo=kOr(dQ),iuo=FOr(dQ),ouo=NOr(dQ),suo=jOr(dQ),auo=zOr(dQ),cuo=QOr(dQ),uuo=MOr(dQ),luo=LOr(dQ)});var NLt={};ee(NLt,{ZodAny:()=>buo,ZodArray:()=>Cuo,ZodBase64:()=>iBr,ZodBase64URL:()=>oBr,ZodBigInt:()=>Ftt,ZodBigIntFormat:()=>cBr,ZodBoolean:()=>ktt,ZodCIDRv4:()=>rBr,ZodCIDRv6:()=>nBr,ZodCUID:()=>JPr,ZodCUID2:()=>YPr,ZodCatch:()=>quo,ZodCodec:()=>gBr,ZodCustom:()=>HLt,ZodCustomStringFormat:()=>Rtt,ZodDate:()=>ULt,ZodDefault:()=>Muo,ZodDiscriminatedUnion:()=>wuo,ZodE164:()=>sBr,ZodEmail:()=>WPr,ZodEmoji:()=>HPr,ZodEnum:()=>Ptt,ZodExactOptional:()=>juo,ZodFile:()=>Fuo,ZodFunction:()=>elo,ZodGUID:()=>zLt,ZodIPv4:()=>eBr,ZodIPv6:()=>tBr,ZodIntersection:()=>Suo,ZodJWT:()=>aBr,ZodKSUID:()=>$Pr,ZodLazy:()=>Xuo,ZodLiteral:()=>kuo,ZodMAC:()=>fuo,ZodMap:()=>Ruo,ZodNaN:()=>Huo,ZodNanoID:()=>KPr,ZodNever:()=>Iuo,ZodNonOptional:()=>mBr,ZodNull:()=>Auo,ZodNullable:()=>Quo,ZodNumber:()=>Dtt,ZodNumberFormat:()=>PLe,ZodObject:()=>GLt,ZodOptional:()=>dBr,ZodPipe:()=>hBr,ZodPrefault:()=>_uo,ZodPromise:()=>$uo,ZodReadonly:()=>Kuo,ZodRecord:()=>WLt,ZodSet:()=>Duo,ZodString:()=>Btt,ZodStringFormat:()=>jA,ZodSuccess:()=>Guo,ZodSymbol:()=>huo,ZodTemplateLiteral:()=>Yuo,ZodTransform:()=>Nuo,ZodTuple:()=>Ouo,ZodType:()=>Cp,ZodULID:()=>XPr,ZodURL:()=>_Lt,ZodUUID:()=>g$,ZodUndefined:()=>guo,ZodUnion:()=>qLt,ZodUnknown:()=>Euo,ZodVoid:()=>vuo,ZodXID:()=>ZPr,ZodXor:()=>xuo,_ZodString:()=>qPr,_default:()=>Luo,_function:()=>Gac,any:()=>vac,array:()=>VLt,base64:()=>oac,base64url:()=>sac,bigint:()=>Aac,boolean:()=>muo,catch:()=>Wuo,check:()=>qac,cidrv4:()=>nac,cidrv6:()=>iac,codec:()=>_ac,cuid:()=>Jsc,cuid2:()=>Ysc,custom:()=>Wac,date:()=>xac,describe:()=>Hac,discriminatedUnion:()=>Bac,e164:()=>aac,email:()=>Msc,emoji:()=>Hsc,enum:()=>pBr,exactOptional:()=>zuo,file:()=>zac,float32:()=>dac,float64:()=>mac,function:()=>Gac,guid:()=>Lsc,hash:()=>fac,hex:()=>pac,hostname:()=>lac,httpUrl:()=>Wsc,instanceof:()=>Jac,int:()=>GPr,int32:()=>hac,int64:()=>yac,intersection:()=>Tuo,ipv4:()=>eac,ipv6:()=>rac,json:()=>Xac,jwt:()=>cac,keyof:()=>wac,ksuid:()=>$sc,lazy:()=>Zuo,literal:()=>jac,looseObject:()=>Oac,looseRecord:()=>Dac,mac:()=>tac,map:()=>kac,meta:()=>Kac,nan:()=>Lac,nanoid:()=>Ksc,nativeEnum:()=>Nac,never:()=>uBr,nonoptional:()=>Vuo,null:()=>yuo,nullable:()=>MLt,nullish:()=>Qac,number:()=>duo,object:()=>Sac,optional:()=>QLt,partialRecord:()=>Rac,pipe:()=>LLt,prefault:()=>Uuo,preprocess:()=>Zac,promise:()=>Vac,readonly:()=>Juo,record:()=>Buo,refine:()=>tlo,set:()=>Fac,strictObject:()=>Tac,string:()=>VPr,stringFormat:()=>uac,stringbool:()=>Yac,success:()=>Mac,superRefine:()=>rlo,symbol:()=>Eac,templateLiteral:()=>Uac,transform:()=>fBr,tuple:()=>Puo,uint32:()=>gac,uint64:()=>bac,ulid:()=>Xsc,undefined:()=>Iac,union:()=>lBr,unknown:()=>OLe,url:()=>qsc,uuid:()=>_sc,uuidv4:()=>Usc,uuidv6:()=>Vsc,uuidv7:()=>Gsc,void:()=>Cac,xid:()=>Zsc,xor:()=>Pac});function VPr(e){return wao(Btt,e)}function Msc(e){return aPr(WPr,e)}function Lsc(e){return BLt(zLt,e)}function _sc(e){return cPr(g$,e)}function Usc(e){return uPr(g$,e)}function Vsc(e){return lPr(g$,e)}function Gsc(e){return pPr(g$,e)}function qsc(e){return RLt(_Lt,e)}function Wsc(e){return RLt(_Lt,{protocol:/^https?$/,hostname:UV.domain,...Oi.normalizeParams(e)})}function Hsc(e){return fPr(HPr,e)}function Ksc(e){return dPr(KPr,e)}function Jsc(e){return mPr(JPr,e)}function Ysc(e){return hPr(YPr,e)}function Xsc(e){return gPr(XPr,e)}function Zsc(e){return APr(ZPr,e)}function $sc(e){return yPr($Pr,e)}function eac(e){return bPr(eBr,e)}function tac(e){return Tao(fuo,e)}function rac(e){return EPr(tBr,e)}function nac(e){return IPr(rBr,e)}function iac(e){return vPr(nBr,e)}function oac(e){return CPr(iBr,e)}function sac(e){return xPr(oBr,e)}function aac(e){return wPr(sBr,e)}function cac(e){return SPr(aBr,e)}function uac(e,t,r={}){return Stt(Rtt,e,t,r)}function lac(e){return Stt(Rtt,"hostname",UV.hostname,e)}function pac(e){return Stt(Rtt,"hex",UV.hex,e)}function fac(e,t){let r=t?.enc??"hex",n=`${e}_${r}`,i=UV[n];if(!i)throw new Error(`Unrecognized hash format: ${n}`);return Stt(Rtt,n,i,t)}function duo(e){return kao(Dtt,e)}function GPr(e){return Nao(PLe,e)}function dac(e){return jao(PLe,e)}function mac(e){return zao(PLe,e)}function hac(e){return Qao(PLe,e)}function gac(e){return Mao(PLe,e)}function muo(e){return Lao(ktt,e)}function Aac(e){return Uao(Ftt,e)}function yac(e){return Gao(cBr,e)}function bac(e){return qao(cBr,e)}function Eac(e){return Wao(huo,e)}function Iac(e){return Hao(guo,e)}function yuo(e){return Kao(Auo,e)}function vac(){return Jao(buo)}function OLe(){return Yao(Euo)}function uBr(e){return Xao(Iuo,e)}function Cac(e){return Zao(vuo,e)}function xac(e){return $ao(ULt,e)}function VLt(e,t){return rco(Cuo,e,t)}function wac(e){let t=e._zod.def.shape;return pBr(Object.keys(t))}function Sac(e,t){let r={type:"object",shape:e??{},...Oi.normalizeParams(t)};return new GLt(r)}function Tac(e,t){return new GLt({type:"object",shape:e,catchall:uBr(),...Oi.normalizeParams(t)})}function Oac(e,t){return new GLt({type:"object",shape:e,catchall:OLe(),...Oi.normalizeParams(t)})}function lBr(e,t){return new qLt({type:"union",options:e,...Oi.normalizeParams(t)})}function Pac(e,t){return new xuo({type:"union",options:e,inclusive:!1,...Oi.normalizeParams(t)})}function Bac(e,t,r){return new wuo({type:"union",options:t,discriminator:e,...Oi.normalizeParams(r)})}function Tuo(e,t){return new Suo({type:"intersection",left:e,right:t})}function Puo(e,t,r){let n=t instanceof nl,i=n?r:t,o=n?t:null;return new Ouo({type:"tuple",items:e,rest:o,...Oi.normalizeParams(i)})}function Buo(e,t,r){return new WLt({type:"record",keyType:e,valueType:t,...Oi.normalizeParams(r)})}function Rac(e,t,r){let n=O2(e);return n._zod.values=void 0,new WLt({type:"record",keyType:n,valueType:t,...Oi.normalizeParams(r)})}function Dac(e,t,r){return new WLt({type:"record",keyType:e,valueType:t,mode:"loose",...Oi.normalizeParams(r)})}function kac(e,t,r){return new Ruo({type:"map",keyType:e,valueType:t,...Oi.normalizeParams(r)})}function Fac(e,t){return new Duo({type:"set",valueType:e,...Oi.normalizeParams(t)})}function pBr(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Ptt({type:"enum",entries:r,...Oi.normalizeParams(t)})}function Nac(e,t){return new Ptt({type:"enum",entries:e,...Oi.normalizeParams(t)})}function jac(e,t){return new kuo({type:"literal",values:Array.isArray(e)?e:[e],...Oi.normalizeParams(t)})}function zac(e){return nco(Fuo,e)}function fBr(e){return new Nuo({type:"transform",transform:e})}function QLt(e){return new dBr({type:"optional",innerType:e})}function zuo(e){return new juo({type:"optional",innerType:e})}function MLt(e){return new Quo({type:"nullable",innerType:e})}function Qac(e){return QLt(MLt(e))}function Luo(e,t){return new Muo({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Oi.shallowClone(t)}})}function Uuo(e,t){return new _uo({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Oi.shallowClone(t)}})}function Vuo(e,t){return new mBr({type:"nonoptional",innerType:e,...Oi.normalizeParams(t)})}function Mac(e){return new Guo({type:"success",innerType:e})}function Wuo(e,t){return new quo({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function Lac(e){return tco(Huo,e)}function LLt(e,t){return new hBr({type:"pipe",in:e,out:t})}function _ac(e,t,r){return new gBr({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function Juo(e){return new Kuo({type:"readonly",innerType:e})}function Uac(e,t){return new Yuo({type:"template_literal",parts:e,...Oi.normalizeParams(t)})}function Zuo(e){return new Xuo({type:"lazy",getter:e})}function Vac(e){return new $uo({type:"promise",innerType:e})}function Gac(e){return new elo({type:"function",input:Array.isArray(e?.input)?Puo(e?.input):e?.input??VLt(OLe()),output:e?.output??OLe()})}function qac(e){let t=new ly({check:"custom"});return t._zod.check=e,t}function Wac(e,t){return ico(HLt,e??(()=>!0),t)}function tlo(e,t={}){return oco(HLt,e,t)}function rlo(e){return sco(e)}function Jac(e,t={}){let r=new HLt({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...Oi.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=n=>{n.value instanceof e||n.issues.push({code:"invalid_type",expected:e.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}function Xac(e){let t=Zuo(()=>lBr([VPr(e),duo(),muo(),yuo(),VLt(t),Buo(VPr(),t)]));return t}function Zac(e,t){return LLt(fBr(e),t)}var Cp,qPr,Btt,jA,WPr,zLt,g$,_Lt,HPr,KPr,JPr,YPr,XPr,ZPr,$Pr,eBr,fuo,tBr,rBr,nBr,iBr,oBr,sBr,aBr,Rtt,Dtt,PLe,ktt,Ftt,cBr,huo,guo,Auo,buo,Euo,Iuo,vuo,ULt,Cuo,GLt,qLt,xuo,wuo,Suo,Ouo,WLt,Ruo,Duo,Ptt,kuo,Fuo,Nuo,dBr,juo,Quo,Muo,_uo,mBr,Guo,quo,Huo,hBr,gBr,Kuo,Yuo,Xuo,$uo,elo,HLt,Hac,Kac,Yac,jLt=h(()=>{"use strict";fQ();fQ();kLt();DLt();QPr();FLt();puo();Cp=Sr("ZodType",(e,t)=>(nl.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ttt(e,"input"),output:Ttt(e,"output")}}),e.toJSONSchema=lco(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(Oi.mergeDefs(t,{checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0}),e.with=e.check,e.clone=(r,n)=>O2(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>$co(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>tuo(e,r,n),e.parseAsync=async(r,n)=>euo(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>ruo(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>nuo(e,r,n),e.decode=(r,n)=>iuo(e,r,n),e.encodeAsync=async(r,n)=>ouo(e,r,n),e.decodeAsync=async(r,n)=>suo(e,r,n),e.safeEncode=(r,n)=>auo(e,r,n),e.safeDecode=(r,n)=>cuo(e,r,n),e.safeEncodeAsync=async(r,n)=>uuo(e,r,n),e.safeDecodeAsync=async(r,n)=>luo(e,r,n),e.refine=(r,n)=>e.check(tlo(r,n)),e.superRefine=r=>e.check(rlo(r)),e.overwrite=r=>e.check(zH(r)),e.optional=()=>QLt(e),e.exactOptional=()=>zuo(e),e.nullable=()=>MLt(e),e.nullish=()=>QLt(MLt(e)),e.nonoptional=r=>Vuo(e,r),e.array=()=>VLt(e),e.or=r=>lBr([e,r]),e.and=r=>Tuo(e,r),e.transform=r=>LLt(e,fBr(r)),e.default=r=>Luo(e,r),e.prefault=r=>Uuo(e,r),e.catch=r=>Wuo(e,r),e.pipe=r=>LLt(e,r),e.readonly=()=>Juo(e),e.describe=r=>{let n=e.clone();return oB.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return oB.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return oB.get(e);let n=e.clone();return oB.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),qPr=Sr("_ZodString",(e,t)=>{xLe.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>pco(e,n,i,o);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(mtt(...n)),e.includes=(...n)=>e.check(Att(...n)),e.startsWith=(...n)=>e.check(ytt(...n)),e.endsWith=(...n)=>e.check(btt(...n)),e.min=(...n)=>e.check(Tfe(...n)),e.max=(...n)=>e.check(SLe(...n)),e.length=(...n)=>e.check(TLe(...n)),e.nonempty=(...n)=>e.check(Tfe(1,...n)),e.lowercase=n=>e.check(htt(n)),e.uppercase=n=>e.check(gtt(n)),e.trim=()=>e.check(vtt()),e.normalize=(...n)=>e.check(Itt(...n)),e.toLowerCase=()=>e.check(Ctt()),e.toUpperCase=()=>e.check(xtt()),e.slugify=()=>e.check(wtt())}),Btt=Sr("ZodString",(e,t)=>{xLe.init(e,t),qPr.init(e,t),e.email=r=>e.check(aPr(WPr,r)),e.url=r=>e.check(RLt(_Lt,r)),e.jwt=r=>e.check(SPr(aBr,r)),e.emoji=r=>e.check(fPr(HPr,r)),e.guid=r=>e.check(BLt(zLt,r)),e.uuid=r=>e.check(cPr(g$,r)),e.uuidv4=r=>e.check(uPr(g$,r)),e.uuidv6=r=>e.check(lPr(g$,r)),e.uuidv7=r=>e.check(pPr(g$,r)),e.nanoid=r=>e.check(dPr(KPr,r)),e.guid=r=>e.check(BLt(zLt,r)),e.cuid=r=>e.check(mPr(JPr,r)),e.cuid2=r=>e.check(hPr(YPr,r)),e.ulid=r=>e.check(gPr(XPr,r)),e.base64=r=>e.check(CPr(iBr,r)),e.base64url=r=>e.check(xPr(oBr,r)),e.xid=r=>e.check(APr(ZPr,r)),e.ksuid=r=>e.check(yPr($Pr,r)),e.ipv4=r=>e.check(bPr(eBr,r)),e.ipv6=r=>e.check(EPr(tBr,r)),e.cidrv4=r=>e.check(IPr(rBr,r)),e.cidrv6=r=>e.check(vPr(nBr,r)),e.e164=r=>e.check(wPr(sBr,r)),e.datetime=r=>e.check(Kco(r)),e.date=r=>e.check(Jco(r)),e.time=r=>e.check(Yco(r)),e.duration=r=>e.check(Xco(r))});jA=Sr("ZodStringFormat",(e,t)=>{NA.init(e,t),qPr.init(e,t)}),WPr=Sr("ZodEmail",(e,t)=>{pso.init(e,t),jA.init(e,t)});zLt=Sr("ZodGUID",(e,t)=>{uso.init(e,t),jA.init(e,t)});g$=Sr("ZodUUID",(e,t)=>{lso.init(e,t),jA.init(e,t)});_Lt=Sr("ZodURL",(e,t)=>{fso.init(e,t),jA.init(e,t)});HPr=Sr("ZodEmoji",(e,t)=>{dso.init(e,t),jA.init(e,t)});KPr=Sr("ZodNanoID",(e,t)=>{mso.init(e,t),jA.init(e,t)});JPr=Sr("ZodCUID",(e,t)=>{hso.init(e,t),jA.init(e,t)});YPr=Sr("ZodCUID2",(e,t)=>{gso.init(e,t),jA.init(e,t)});XPr=Sr("ZodULID",(e,t)=>{Aso.init(e,t),jA.init(e,t)});ZPr=Sr("ZodXID",(e,t)=>{yso.init(e,t),jA.init(e,t)});$Pr=Sr("ZodKSUID",(e,t)=>{bso.init(e,t),jA.init(e,t)});eBr=Sr("ZodIPv4",(e,t)=>{xso.init(e,t),jA.init(e,t)});fuo=Sr("ZodMAC",(e,t)=>{Sso.init(e,t),jA.init(e,t)});tBr=Sr("ZodIPv6",(e,t)=>{wso.init(e,t),jA.init(e,t)});rBr=Sr("ZodCIDRv4",(e,t)=>{Tso.init(e,t),jA.init(e,t)});nBr=Sr("ZodCIDRv6",(e,t)=>{Oso.init(e,t),jA.init(e,t)});iBr=Sr("ZodBase64",(e,t)=>{Bso.init(e,t),jA.init(e,t)});oBr=Sr("ZodBase64URL",(e,t)=>{Rso.init(e,t),jA.init(e,t)});sBr=Sr("ZodE164",(e,t)=>{Dso.init(e,t),jA.init(e,t)});aBr=Sr("ZodJWT",(e,t)=>{kso.init(e,t),jA.init(e,t)});Rtt=Sr("ZodCustomStringFormat",(e,t)=>{Fso.init(e,t),jA.init(e,t)});Dtt=Sr("ZodNumber",(e,t)=>{ZOr.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>fco(e,n,i,o),e.gt=(n,i)=>e.check(m$(n,i)),e.gte=(n,i)=>e.check(P2(n,i)),e.min=(n,i)=>e.check(P2(n,i)),e.lt=(n,i)=>e.check(d$(n,i)),e.lte=(n,i)=>e.check(N3(n,i)),e.max=(n,i)=>e.check(N3(n,i)),e.int=n=>e.check(GPr(n)),e.safe=n=>e.check(GPr(n)),e.positive=n=>e.check(m$(0,n)),e.nonnegative=n=>e.check(P2(0,n)),e.negative=n=>e.check(d$(0,n)),e.nonpositive=n=>e.check(N3(0,n)),e.multipleOf=(n,i)=>e.check(zIe(n,i)),e.step=(n,i)=>e.check(zIe(n,i)),e.finite=()=>e;let 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});PLe=Sr("ZodNumberFormat",(e,t)=>{Nso.init(e,t),Dtt.init(e,t)});ktt=Sr("ZodBoolean",(e,t)=>{xLt.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>dco(e,r,n,i)});Ftt=Sr("ZodBigInt",(e,t)=>{$Or.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>mco(e,n,i,o),e.gte=(n,i)=>e.check(P2(n,i)),e.min=(n,i)=>e.check(P2(n,i)),e.gt=(n,i)=>e.check(m$(n,i)),e.gte=(n,i)=>e.check(P2(n,i)),e.min=(n,i)=>e.check(P2(n,i)),e.lt=(n,i)=>e.check(d$(n,i)),e.lte=(n,i)=>e.check(N3(n,i)),e.max=(n,i)=>e.check(N3(n,i)),e.positive=n=>e.check(m$(BigInt(0),n)),e.negative=n=>e.check(d$(BigInt(0),n)),e.nonpositive=n=>e.check(N3(BigInt(0),n)),e.nonnegative=n=>e.check(P2(BigInt(0),n)),e.multipleOf=(n,i)=>e.check(zIe(n,i));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});cBr=Sr("ZodBigIntFormat",(e,t)=>{jso.init(e,t),Ftt.init(e,t)});huo=Sr("ZodSymbol",(e,t)=>{zso.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>hco(e,r,n,i)});guo=Sr("ZodUndefined",(e,t)=>{Qso.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Aco(e,r,n,i)});Auo=Sr("ZodNull",(e,t)=>{Mso.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>gco(e,r,n,i)});buo=Sr("ZodAny",(e,t)=>{Lso.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Eco(e,r,n,i)});Euo=Sr("ZodUnknown",(e,t)=>{_so.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Ico(e,r,n,i)});Iuo=Sr("ZodNever",(e,t)=>{Uso.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>bco(e,r,n,i)});vuo=Sr("ZodVoid",(e,t)=>{Vso.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>yco(e,r,n,i)});ULt=Sr("ZodDate",(e,t)=>{Gso.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>vco(e,n,i,o),e.min=(n,i)=>e.check(P2(n,i)),e.max=(n,i)=>e.check(N3(n,i));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});Cuo=Sr("ZodArray",(e,t)=>{qso.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Fco(e,r,n,i),e.element=t.element,e.min=(r,n)=>e.check(Tfe(r,n)),e.nonempty=r=>e.check(Tfe(1,r)),e.max=(r,n)=>e.check(SLe(r,n)),e.length=(r,n)=>e.check(TLe(r,n)),e.unwrap=()=>e.element});GLt=Sr("ZodObject",(e,t)=>{Wso.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Nco(e,r,n,i),Oi.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>pBr(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:OLe()}),e.loose=()=>e.clone({...e._zod.def,catchall:OLe()}),e.strict=()=>e.clone({...e._zod.def,catchall:uBr()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>Oi.extend(e,r),e.safeExtend=r=>Oi.safeExtend(e,r),e.merge=r=>Oi.merge(e,r),e.pick=r=>Oi.pick(e,r),e.omit=r=>Oi.omit(e,r),e.partial=(...r)=>Oi.partial(dBr,e,r[0]),e.required=(...r)=>Oi.required(mBr,e,r[0])});qLt=Sr("ZodUnion",(e,t)=>{wLt.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>kPr(e,r,n,i),e.options=t.options});xuo=Sr("ZodXor",(e,t)=>{qLt.init(e,t),Hso.init(e,t),e._zod.processJSONSchema=(r,n,i)=>kPr(e,r,n,i),e.options=t.options});wuo=Sr("ZodDiscriminatedUnion",(e,t)=>{qLt.init(e,t),Kso.init(e,t)});Suo=Sr("ZodIntersection",(e,t)=>{Jso.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>jco(e,r,n,i)});Ouo=Sr("ZodTuple",(e,t)=>{ePr.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>zco(e,r,n,i),e.rest=r=>e.clone({...e._zod.def,rest:r})});WLt=Sr("ZodRecord",(e,t)=>{Yso.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Qco(e,r,n,i),e.keyType=t.keyType,e.valueType=t.valueType});Ruo=Sr("ZodMap",(e,t)=>{Xso.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Dco(e,r,n,i),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(h$(...r)),e.nonempty=r=>e.check(h$(1,r)),e.max=(...r)=>e.check(QIe(...r)),e.size=(...r)=>e.check(wLe(...r))});Duo=Sr("ZodSet",(e,t)=>{Zso.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>kco(e,r,n,i),e.min=(...r)=>e.check(h$(...r)),e.nonempty=r=>e.check(h$(1,r)),e.max=(...r)=>e.check(QIe(...r)),e.size=(...r)=>e.check(wLe(...r))});Ptt=Sr("ZodEnum",(e,t)=>{$so.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>Cco(e,n,i,o),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(n,i)=>{let o={};for(let s of n)if(r.has(s))o[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Ptt({...t,checks:[],...Oi.normalizeParams(i),entries:o})},e.exclude=(n,i)=>{let o={...t.entries};for(let s of n)if(r.has(s))delete o[s];else throw new Error(`Key ${s} not found in enum`);return new Ptt({...t,checks:[],...Oi.normalizeParams(i),entries:o})}});kuo=Sr("ZodLiteral",(e,t)=>{eao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>xco(e,r,n,i),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]}})});Fuo=Sr("ZodFile",(e,t)=>{tao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Tco(e,r,n,i),e.min=(r,n)=>e.check(h$(r,n)),e.max=(r,n)=>e.check(QIe(r,n)),e.mime=(r,n)=>e.check(Ett(Array.isArray(r)?r:[r],n))});Nuo=Sr("ZodTransform",(e,t)=>{rao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Rco(e,r,n,i),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new DIe(e.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(Oi.issue(o,r.value,t));else{let s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(Oi.issue(s))}};let i=t.transform(r.value,r);return i instanceof Promise?i.then(o=>(r.value=o,r)):(r.value=i,r)}});dBr=Sr("ZodOptional",(e,t)=>{tPr.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>FPr(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});juo=Sr("ZodExactOptional",(e,t)=>{nao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>FPr(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});Quo=Sr("ZodNullable",(e,t)=>{iao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Mco(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});Muo=Sr("ZodDefault",(e,t)=>{oao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>_co(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});_uo=Sr("ZodPrefault",(e,t)=>{sao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Uco(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});mBr=Sr("ZodNonOptional",(e,t)=>{aao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Lco(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});Guo=Sr("ZodSuccess",(e,t)=>{cao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Oco(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});quo=Sr("ZodCatch",(e,t)=>{uao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Vco(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});Huo=Sr("ZodNaN",(e,t)=>{lao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>wco(e,r,n,i)});hBr=Sr("ZodPipe",(e,t)=>{pao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Gco(e,r,n,i),e.in=t.in,e.out=t.out});gBr=Sr("ZodCodec",(e,t)=>{hBr.init(e,t),SLt.init(e,t)});Kuo=Sr("ZodReadonly",(e,t)=>{fao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>qco(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});Yuo=Sr("ZodTemplateLiteral",(e,t)=>{dao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Sco(e,r,n,i)});Xuo=Sr("ZodLazy",(e,t)=>{gao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Hco(e,r,n,i),e.unwrap=()=>e._zod.def.getter()});$uo=Sr("ZodPromise",(e,t)=>{hao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Wco(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});elo=Sr("ZodFunction",(e,t)=>{mao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Bco(e,r,n,i)});HLt=Sr("ZodCustom",(e,t)=>{Aao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Pco(e,r,n,i)});Hac=aco,Kac=cco;Yac=(...e)=>uco({Codec:gBr,Boolean:ktt,String:Btt},...e)});function sed(e){fv({customError:e})}function aed(){return fv().customError}var oed,nlo,$ac=h(()=>{"use strict";fQ();fQ();oed={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"};nlo||(nlo={})});function ued(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function led(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let n=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===n){let i=r[1];if(!i||!t.defs[i])throw new Error(`Reference not found: ${e}`);return t.defs[i]}throw new Error(`Reference not found: ${e}`)}function ecc(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return Lo.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let i=e.$ref;if(t.refs.has(i))return t.refs.get(i);if(t.processing.has(i))return Lo.lazy(()=>{if(!t.refs.has(i))throw new Error(`Circular reference not resolved: ${i}`);return t.refs.get(i)});t.processing.add(i);let o=led(i,t),s=fD(o,t);return t.refs.set(i,s),t.processing.delete(i),s}if(e.enum!==void 0){let i=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&i.length===1&&i[0]===null)return Lo.null();if(i.length===0)return Lo.never();if(i.length===1)return Lo.literal(i[0]);if(i.every(s=>typeof s=="string"))return Lo.enum(i);let o=i.map(s=>Lo.literal(s));return o.length<2?o[0]:Lo.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return Lo.literal(e.const);let r=e.type;if(Array.isArray(r)){let i=r.map(o=>{let s={...e,type:o};return ecc(s,t)});return i.length===0?Lo.never():i.length===1?i[0]:Lo.union(i)}if(!r)return Lo.any();let n;switch(r){case"string":{let i=Lo.string();if(e.format){let o=e.format;o==="email"?i=i.check(Lo.email()):o==="uri"||o==="uri-reference"?i=i.check(Lo.url()):o==="uuid"||o==="guid"?i=i.check(Lo.uuid()):o==="date-time"?i=i.check(Lo.iso.datetime()):o==="date"?i=i.check(Lo.iso.date()):o==="time"?i=i.check(Lo.iso.time()):o==="duration"?i=i.check(Lo.iso.duration()):o==="ipv4"?i=i.check(Lo.ipv4()):o==="ipv6"?i=i.check(Lo.ipv6()):o==="mac"?i=i.check(Lo.mac()):o==="cidr"?i=i.check(Lo.cidrv4()):o==="cidr-v6"?i=i.check(Lo.cidrv6()):o==="base64"?i=i.check(Lo.base64()):o==="base64url"?i=i.check(Lo.base64url()):o==="e164"?i=i.check(Lo.e164()):o==="jwt"?i=i.check(Lo.jwt()):o==="emoji"?i=i.check(Lo.emoji()):o==="nanoid"?i=i.check(Lo.nanoid()):o==="cuid"?i=i.check(Lo.cuid()):o==="cuid2"?i=i.check(Lo.cuid2()):o==="ulid"?i=i.check(Lo.ulid()):o==="xid"?i=i.check(Lo.xid()):o==="ksuid"&&(i=i.check(Lo.ksuid()))}typeof e.minLength=="number"&&(i=i.min(e.minLength)),typeof e.maxLength=="number"&&(i=i.max(e.maxLength)),e.pattern&&(i=i.regex(new RegExp(e.pattern))),n=i;break}case"number":case"integer":{let i=r==="integer"?Lo.number().int():Lo.number();typeof e.minimum=="number"&&(i=i.min(e.minimum)),typeof e.maximum=="number"&&(i=i.max(e.maximum)),typeof e.exclusiveMinimum=="number"?i=i.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(i=i.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?i=i.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(i=i.lt(e.maximum)),typeof e.multipleOf=="number"&&(i=i.multipleOf(e.multipleOf)),n=i;break}case"boolean":{n=Lo.boolean();break}case"null":{n=Lo.null();break}case"object":{let i={},o=e.properties||{},s=new Set(e.required||[]);for(let[c,u]of Object.entries(o)){let l=fD(u,t);i[c]=s.has(c)?l:l.optional()}if(e.propertyNames){let c=fD(e.propertyNames,t),u=e.additionalProperties&&typeof e.additionalProperties=="object"?fD(e.additionalProperties,t):Lo.any();if(Object.keys(i).length===0){n=Lo.record(c,u);break}let l=Lo.object(i).passthrough(),p=Lo.looseRecord(c,u);n=Lo.intersection(l,p);break}if(e.patternProperties){let c=e.patternProperties,u=Object.keys(c),l=[];for(let f of u){let d=fD(c[f],t),m=Lo.string().regex(new RegExp(f));l.push(Lo.looseRecord(m,d))}let p=[];if(Object.keys(i).length>0&&p.push(Lo.object(i).passthrough()),p.push(...l),p.length===0)n=Lo.object({}).passthrough();else if(p.length===1)n=p[0];else{let f=Lo.intersection(p[0],p[1]);for(let d=2;d<p.length;d++)f=Lo.intersection(f,p[d]);n=f}break}let a=Lo.object(i);e.additionalProperties===!1?n=a.strict():typeof e.additionalProperties=="object"?n=a.catchall(fD(e.additionalProperties,t)):n=a.passthrough();break}case"array":{let i=e.prefixItems,o=e.items;if(i&&Array.isArray(i)){let s=i.map(c=>fD(c,t)),a=o&&typeof o=="object"&&!Array.isArray(o)?fD(o,t):void 0;a?n=Lo.tuple(s).rest(a):n=Lo.tuple(s),typeof e.minItems=="number"&&(n=n.check(Lo.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(Lo.maxLength(e.maxItems)))}else if(Array.isArray(o)){let s=o.map(c=>fD(c,t)),a=e.additionalItems&&typeof e.additionalItems=="object"?fD(e.additionalItems,t):void 0;a?n=Lo.tuple(s).rest(a):n=Lo.tuple(s),typeof e.minItems=="number"&&(n=n.check(Lo.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(Lo.maxLength(e.maxItems)))}else if(o!==void 0){let s=fD(o,t),a=Lo.array(s);typeof e.minItems=="number"&&(a=a.min(e.minItems)),typeof e.maxItems=="number"&&(a=a.max(e.maxItems)),n=a}else n=Lo.array(Lo.any());break}default:throw new Error(`Unsupported type: ${r}`)}return e.description&&(n=n.describe(e.description)),e.default!==void 0&&(n=n.default(e.default)),n}function fD(e,t){if(typeof e=="boolean")return e?Lo.any():Lo.never();let r=ecc(e,t),n=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let a=e.anyOf.map(u=>fD(u,t)),c=Lo.union(a);r=n?Lo.intersection(r,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let a=e.oneOf.map(u=>fD(u,t)),c=Lo.xor(a);r=n?Lo.intersection(r,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=n?r:Lo.any();else{let a=n?r:fD(e.allOf[0],t),c=n?0:1;for(let u=c;u<e.allOf.length;u++)a=Lo.intersection(a,fD(e.allOf[u],t));r=a}e.nullable===!0&&t.version==="openapi-3.0"&&(r=Lo.nullable(r)),e.readOnly===!0&&(r=Lo.readonly(r));let i={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let a of o)a in e&&(i[a]=e[a]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let a of s)a in e&&(i[a]=e[a]);for(let a of Object.keys(e))ced.has(a)||(i[a]=e[a]);return Object.keys(i).length>0&&t.registry.add(r,i),r}function tcc(e,t){if(typeof e=="boolean")return e?Lo.any():Lo.never();let r=ued(e,t?.defaultTarget),n=e.$defs||e.definitions||{},i={version:r,defs:n,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??oB};return fD(e,i)}var Lo,ced,rcc=h(()=>{"use strict";PLt();QPr();FLt();jLt();Lo={...NLt,...zPr,iso:Ott},ced=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"])});var ilo={};ee(ilo,{bigint:()=>med,boolean:()=>ded,date:()=>hed,number:()=>fed,string:()=>ped});function ped(e){return Sao(Btt,e)}function fed(e){return Fao(Dtt,e)}function ded(e){return _ao(ktt,e)}function med(e){return Vao(Ftt,e)}function hed(e){return eco(ULt,e)}var ncc=h(()=>{"use strict";fQ();jLt()});var T={};ee(T,{$brand:()=>OOr,$input:()=>xao,$output:()=>Cao,NEVER:()=>Yio,TimePrecision:()=>Oao,ZodAny:()=>buo,ZodArray:()=>Cuo,ZodBase64:()=>iBr,ZodBase64URL:()=>oBr,ZodBigInt:()=>Ftt,ZodBigIntFormat:()=>cBr,ZodBoolean:()=>ktt,ZodCIDRv4:()=>rBr,ZodCIDRv6:()=>nBr,ZodCUID:()=>JPr,ZodCUID2:()=>YPr,ZodCatch:()=>quo,ZodCodec:()=>gBr,ZodCustom:()=>HLt,ZodCustomStringFormat:()=>Rtt,ZodDate:()=>ULt,ZodDefault:()=>Muo,ZodDiscriminatedUnion:()=>wuo,ZodE164:()=>sBr,ZodEmail:()=>WPr,ZodEmoji:()=>HPr,ZodEnum:()=>Ptt,ZodError:()=>ned,ZodExactOptional:()=>juo,ZodFile:()=>Fuo,ZodFirstPartyTypeKind:()=>nlo,ZodFunction:()=>elo,ZodGUID:()=>zLt,ZodIPv4:()=>eBr,ZodIPv6:()=>tBr,ZodISODate:()=>LPr,ZodISODateTime:()=>MPr,ZodISODuration:()=>UPr,ZodISOTime:()=>_Pr,ZodIntersection:()=>Suo,ZodIssueCode:()=>oed,ZodJWT:()=>aBr,ZodKSUID:()=>$Pr,ZodLazy:()=>Xuo,ZodLiteral:()=>kuo,ZodMAC:()=>fuo,ZodMap:()=>Ruo,ZodNaN:()=>Huo,ZodNanoID:()=>KPr,ZodNever:()=>Iuo,ZodNonOptional:()=>mBr,ZodNull:()=>Auo,ZodNullable:()=>Quo,ZodNumber:()=>Dtt,ZodNumberFormat:()=>PLe,ZodObject:()=>GLt,ZodOptional:()=>dBr,ZodPipe:()=>hBr,ZodPrefault:()=>_uo,ZodPromise:()=>$uo,ZodReadonly:()=>Kuo,ZodRealError:()=>dQ,ZodRecord:()=>WLt,ZodSet:()=>Duo,ZodString:()=>Btt,ZodStringFormat:()=>jA,ZodSuccess:()=>Guo,ZodSymbol:()=>huo,ZodTemplateLiteral:()=>Yuo,ZodTransform:()=>Nuo,ZodTuple:()=>Ouo,ZodType:()=>Cp,ZodULID:()=>XPr,ZodURL:()=>_Lt,ZodUUID:()=>g$,ZodUndefined:()=>guo,ZodUnion:()=>qLt,ZodUnknown:()=>Euo,ZodVoid:()=>vuo,ZodXID:()=>ZPr,ZodXor:()=>xuo,_ZodString:()=>qPr,_default:()=>Luo,_function:()=>Gac,any:()=>vac,array:()=>VLt,base64:()=>oac,base64url:()=>sac,bigint:()=>Aac,boolean:()=>muo,catch:()=>Wuo,check:()=>qac,cidrv4:()=>nac,cidrv6:()=>iac,clone:()=>O2,codec:()=>_ac,coerce:()=>ilo,config:()=>fv,core:()=>Ofe,cuid:()=>Jsc,cuid2:()=>Ysc,custom:()=>Wac,date:()=>xac,decode:()=>iuo,decodeAsync:()=>suo,describe:()=>Hac,discriminatedUnion:()=>Bac,e164:()=>aac,email:()=>Msc,emoji:()=>Hsc,encode:()=>nuo,encodeAsync:()=>ouo,endsWith:()=>btt,enum:()=>pBr,exactOptional:()=>zuo,file:()=>zac,flattenError:()=>bLt,float32:()=>dac,float64:()=>mac,formatError:()=>ELt,fromJSONSchema:()=>tcc,function:()=>Gac,getErrorMap:()=>aed,globalRegistry:()=>oB,gt:()=>m$,gte:()=>P2,guid:()=>Lsc,hash:()=>fac,hex:()=>pac,hostname:()=>lac,httpUrl:()=>Wsc,includes:()=>Att,instanceof:()=>Jac,int:()=>GPr,int32:()=>hac,int64:()=>yac,intersection:()=>Tuo,ipv4:()=>eac,ipv6:()=>rac,iso:()=>Ott,json:()=>Xac,jwt:()=>cac,keyof:()=>wac,ksuid:()=>$sc,lazy:()=>Zuo,length:()=>TLe,literal:()=>jac,locales:()=>OLt,looseObject:()=>Oac,looseRecord:()=>Dac,lowercase:()=>htt,lt:()=>d$,lte:()=>N3,mac:()=>tac,map:()=>kac,maxLength:()=>SLe,maxSize:()=>QIe,meta:()=>Kac,mime:()=>Ett,minLength:()=>Tfe,minSize:()=>h$,multipleOf:()=>zIe,nan:()=>Lac,nanoid:()=>Ksc,nativeEnum:()=>Nac,negative:()=>OPr,never:()=>uBr,nonnegative:()=>BPr,nonoptional:()=>Vuo,nonpositive:()=>PPr,normalize:()=>Itt,null:()=>yuo,nullable:()=>MLt,nullish:()=>Qac,number:()=>duo,object:()=>Sac,optional:()=>QLt,overwrite:()=>zH,parse:()=>$co,parseAsync:()=>euo,partialRecord:()=>Rac,pipe:()=>LLt,positive:()=>TPr,prefault:()=>Uuo,preprocess:()=>Zac,prettifyError:()=>coo,promise:()=>Vac,property:()=>RPr,readonly:()=>Juo,record:()=>Buo,refine:()=>tlo,regex:()=>mtt,regexes:()=>UV,registry:()=>sPr,safeDecode:()=>cuo,safeDecodeAsync:()=>luo,safeEncode:()=>auo,safeEncodeAsync:()=>uuo,safeParse:()=>tuo,safeParseAsync:()=>ruo,set:()=>Fac,setErrorMap:()=>sed,size:()=>wLe,slugify:()=>wtt,startsWith:()=>ytt,strictObject:()=>Tac,string:()=>VPr,stringFormat:()=>uac,stringbool:()=>Yac,success:()=>Mac,superRefine:()=>rlo,symbol:()=>Eac,templateLiteral:()=>Uac,toJSONSchema:()=>NPr,toLowerCase:()=>Ctt,toUpperCase:()=>xtt,transform:()=>fBr,treeifyError:()=>aoo,trim:()=>vtt,tuple:()=>Puo,uint32:()=>gac,uint64:()=>bac,ulid:()=>Xsc,undefined:()=>Iac,union:()=>lBr,unknown:()=>OLe,uppercase:()=>gtt,url:()=>qsc,util:()=>Oi,uuid:()=>_sc,uuidv4:()=>Usc,uuidv6:()=>Vsc,uuidv7:()=>Gsc,void:()=>Cac,xid:()=>Zsc,xor:()=>Pac});var olo=h(()=>{"use strict";fQ();jLt();QPr();Zco();puo();$ac();fQ();bao();fQ();kLt();rcc();vao();FLt();FLt();ncc();fv(rPr())});var ds=h(()=>{"use strict";olo();olo()});var icc=h(()=>{"use strict"});var Elo={};ee(Elo,{AIChatConfig:()=>clo,AIChatDatasource:()=>Kcc,AIChatLocation:()=>acc,AIChatModel:()=>ccc,AIChatWebsiteDatasource:()=>Hcc,AbsoluteProductPath:()=>flc,AgentsConfig:()=>Xcc,AiExamplesConfig:()=>Wcc,AnalyticsConfig:()=>qcc,AnnouncementConfig:()=>IBr,ApiReferenceConfiguration:()=>elc,ApiReferenceEndpointConfiguration:()=>Vuc,ApiReferenceLayout:()=>Ecc,ApiReferenceLayoutItem:()=>ZLt,ApiReferenceOperationConfiguration:()=>Guc,ApiReferencePackageConfiguration:()=>Huc,ApiReferencePackageConfigurationWithOptions:()=>Wuc,ApiReferenceSectionConfiguration:()=>quc,ApiSpecConfiguration:()=>$uc,ApiSpecErrorResponseEnsure:()=>Yuc,ApiSpecErrorResponseHttpMethod:()=>Juc,ApiSpecErrorResponses:()=>Xuc,ApiSpecImportSettings:()=>Zuc,ApiSpecType:()=>Kuc,Audience:()=>JLt,AudienceId:()=>slo,Availability:()=>Bfe,BackgroundImageConfiguration:()=>Ncc,BackgroundImageThemedConfig:()=>Fcc,BlogConfiguration:()=>Luc,BodyThemeConfig:()=>Scc,BreadcrumbsConfig:()=>ruc,ChangelogConfiguration:()=>Muc,ChangelogFolderRelativePath:()=>KLt,ChangelogLayout:()=>bcc,CheckConfig:()=>Puc,CheckRuleSeverity:()=>Pfe,CheckRulesConfig:()=>Ouc,CollapsedStringValue:()=>zcc,CollapsedValue:()=>YLt,ColorConfig:()=>Gx,ColorThemedConfig:()=>Rcc,ColorsConfiguration:()=>suc,ContentAlignment:()=>Acc,CssConfig:()=>jcc,CustomDomain:()=>Dcc,CustomPageAction:()=>auc,DocsConfiguration:()=>Ied,DocsInstance:()=>fuc,DocsSettingsConfig:()=>ouc,DocsTypographyConfig:()=>euc,EditThisPageConfig:()=>puc,EditThisPageLaunch:()=>ucc,EmbeddingConfig:()=>Ycc,ExperimentalConfig:()=>kuc,ExternalProduct:()=>ulc,ExternalSitemapConfigSchema:()=>Ruc,ExternalSitemapSchema:()=>Duc,FeatureFlag:()=>alo,FeatureFlagConfiguration:()=>Qcc,FolderConfiguration:()=>Uuc,FontConfig:()=>ABr,FontConfigPath:()=>$cc,FontConfigVariant:()=>Zcc,FontDisplay:()=>dcc,FontStyle:()=>flo,FontWeight:()=>mlo,FooterLinksConfig:()=>Iuc,FooterNavThemeConfig:()=>xcc,FullStoryAnalyticsConfig:()=>Lcc,GTMConfig:()=>Vcc,GitLibraryInputSchema:()=>Fuc,GithubEditThisPageConfig:()=>luc,GoogleAnalytics4Config:()=>Gcc,HeaderPosition:()=>ycc,HttpSnippetLanguage:()=>Pcc,HttpSnippetsConfig:()=>kcc,IntegrationsConfig:()=>Buc,IntercomConfig:()=>_cc,InternalProduct:()=>clc,JsConfig:()=>wuc,JsConfigOptions:()=>ulo,JsFileConfig:()=>Cuc,JsFileConfigSettings:()=>vuc,JsRemoteConfig:()=>xuc,JsScriptStrategy:()=>dlo,Language:()=>bBr,LanguageSwitcherThemeConfig:()=>vcc,LayoutConfig:()=>nuc,LibraryConfiguration:()=>Quc,LibraryInputConfiguration:()=>juc,LibraryLanguage:()=>fcc,LibraryName:()=>llo,LibraryOutputConfiguration:()=>zuc,LibraryReferenceConfiguration:()=>_uc,LinkConfiguration:()=>glo,LogoConfiguration:()=>duc,MetadataConfig:()=>Suc,NavbarDropdownConfig:()=>buc,NavbarGithubConfig:()=>yuc,NavbarGithubConfigWithOptions:()=>Auc,NavbarLink:()=>Euc,NavbarLinkConfig:()=>BLe,NavigationConfig:()=>vBr,NavigationItem:()=>$Lt,PageActionOption:()=>scc,PageActionOptions:()=>cuc,PageActionsConfig:()=>uuc,PageActionsThemeConfig:()=>Occ,PageConfiguration:()=>ztt,PageDescriptionSource:()=>Jcc,PathLibraryInputSchema:()=>Nuc,PlaygroundButtonSettings:()=>guc,PlaygroundSettings:()=>XLt,PostHogConfig:()=>Ucc,ProductConfig:()=>llc,ProductConfigBase:()=>blo,ProductFileConfig:()=>Eed,ProductPath:()=>bed,ProductSwitcherThemeConfig:()=>Icc,ProgrammingLanguage:()=>occ,RedirectConfig:()=>Alo,RedirectsConfiguration:()=>Tuc,RedirectsFile:()=>Aed,RelativeProductPath:()=>plc,Role:()=>hlo,RoleId:()=>yBr,SearchSettingsConfig:()=>iuc,SearchbarPlacement:()=>mcc,SectionConfiguration:()=>tlc,SegmentConfig:()=>Mcc,SidebarThemeConfig:()=>Tcc,SiteSwitcherThemeConfig:()=>Ccc,SnippetLanguageConfiguration:()=>A$,SnippetsConfiguration:()=>huc,SortByAvailabilityValue:()=>lcc,SwitcherPlacement:()=>gcc,TabConfig:()=>CBr,TabId:()=>Ntt,TabVariant:()=>nlc,TabbedNavigationConfig:()=>alc,TabbedNavigationItem:()=>slc,TabbedNavigationItemWithLayout:()=>ilc,TabbedNavigationItemWithVariants:()=>olc,TabsPlacement:()=>hcc,TabsThemeConfig:()=>wcc,Target:()=>jtt,ThemeConfig:()=>tuc,TitleSource:()=>plo,TranslationConfig:()=>mlc,TranslationConfigObject:()=>dlc,TwitterCardSetting:()=>Bcc,UntabbedNavigationConfig:()=>rlc,VersionAvailability:()=>pcc,VersionConfig:()=>ylo,VersionFileConfig:()=>yed,VersionedSnippetLanguageConfiguration:()=>muc,WithFeatureFlags:()=>aB,WithPermissions:()=>sB,WithViewers:()=>EBr,normalizeTranslationConfig:()=>hlc});function hlc(e){return typeof e=="string"?{lang:e}:e}var Ntt,KLt,slo,yBr,llo,occ,bBr,scc,acc,ccc,ucc,Bfe,lcc,pcc,plo,fcc,flo,dcc,mcc,hcc,gcc,Acc,ycc,bcc,Ecc,Icc,vcc,Ccc,xcc,wcc,Scc,Tcc,Occ,Pcc,jtt,Bcc,dlo,mlo,Rcc,Gx,JLt,hlo,Dcc,kcc,Fcc,Ncc,jcc,zcc,YLt,sB,alo,Qcc,aB,EBr,Mcc,Lcc,_cc,Ucc,Vcc,Gcc,qcc,Wcc,Hcc,Kcc,Jcc,Ycc,Xcc,clo,Zcc,$cc,ABr,euc,tuc,ruc,nuc,iuc,ouc,suc,auc,cuc,uuc,luc,puc,fuc,duc,glo,muc,A$,huc,guc,XLt,IBr,BLe,Auc,yuc,buc,Euc,Iuc,vuc,Cuc,xuc,ulo,wuc,Suc,Alo,Tuc,Aed,Pfe,Ouc,Puc,Buc,Ruc,Duc,kuc,Fuc,Nuc,juc,zuc,Quc,ztt,Muc,Luc,_uc,Uuc,Vuc,Guc,ZLt,quc,Wuc,Huc,Kuc,Juc,Yuc,Xuc,Zuc,$uc,elc,$Lt,tlc,rlc,nlc,ilc,olc,slc,alc,vBr,CBr,ylo,yed,blo,clc,ulc,llc,plc,flc,bed,Eed,dlc,mlc,Ied,glc=h(()=>{"use strict";ds();Ntt=T.string(),KLt=T.string(),slo=T.string(),yBr=T.string(),llo=T.string(),occ=T.enum(["typescript","javascript","python","java","go","ruby","csharp","php","swift","rust","nodets","nodejs","dotnet","curl","jvm","ts","js"]),bBr=T.string().regex(/^[a-zA-Z]{2,8}(-[a-zA-Z0-9]{1,8})*$/,"Language must be a valid BCP 47 language tag (e.g. 'en', 'ja', 'ja-JP', 'pt-BR', 'zh-Hans-CN')"),scc=T.enum(["copy-page","view-as-markdown","ask-ai","chatgpt","claude","cursor","vscode"]),acc=T.enum(["docs","slack","discord"]),ccc=T.enum(["claude-3.7","claude-4","command-a"]),ucc=T.enum(["github","dashboard"]),Bfe=T.enum(["stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"]),lcc=T.enum(["unset","stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"]),pcc=T.enum(["deprecated","ga","stable","beta"]),plo=T.enum(["frontmatter","filename"]),fcc=T.enum(["python","cpp"]),flo=T.enum(["normal","italic"]),dcc=T.enum(["auto","block","swap","fallback","optional"]),mcc=T.enum(["header","header-tabs","sidebar"]),hcc=T.enum(["header","sidebar"]),gcc=T.enum(["header","sidebar"]),Acc=T.enum(["center","left"]),ycc=T.enum(["fixed","static"]),bcc=T.enum(["timeline","classic"]),Ecc=T.enum(["indented","cards"]),Icc=T.enum(["default","toggle","tabs"]),vcc=T.enum(["default","minimal"]),Ccc=T.object({enabled:T.boolean().optional(),order:T.array(T.string()).optional(),hide:T.array(T.string()).optional(),labels:T.record(T.string(),T.string()).optional(),"show-products":T.boolean().optional()}),xcc=T.enum(["default","minimal"]),wcc=T.enum(["default","bubble"]),Scc=T.enum(["default","canvas"]),Tcc=T.enum(["default","minimal"]),Occ=T.enum(["default","toolbar"]),Pcc=T.enum(["curl","csharp","go","java","javascript","php","python","ruby","swift","typescript"]),jtt=T.enum(["_blank","_self","_parent","_top"]),Bcc=T.enum(["summary","summary_large_image","app","player"]),dlo=T.enum(["beforeInteractive","afterInteractive","lazyOnload"]),mlo=T.union([T.string(),T.number().int()]),Rcc=T.object({dark:T.string().optional(),light:T.string().optional()}),Gx=T.union([T.string(),Rcc]),JLt=T.union([slo,T.array(slo)]),hlo=T.union([yBr,T.array(yBr)]),Dcc=T.union([T.string(),T.array(T.string())]),kcc=T.union([T.boolean(),T.array(Pcc)]),Fcc=T.object({dark:T.string().optional(),light:T.string().optional()}),Ncc=T.union([T.string(),Fcc]),jcc=T.union([T.string(),T.array(T.string())]),zcc=T.enum(["open-by-default"]),YLt=T.union([T.boolean(),zcc]),sB=T.object({viewers:hlo.optional(),orphaned:T.boolean().optional()}),alo=T.object({flag:T.string(),"fallback-value":T.unknown().optional(),match:T.unknown().optional()}),Qcc=T.union([T.string(),alo,T.array(alo)]),aB=T.object({"feature-flag":Qcc.optional()}),EBr=T.object({viewers:hlo.optional()}),Mcc=T.object({"write-key":T.string()}),Lcc=T.object({"org-id":T.string()}),_cc=T.object({"app-id":T.string(),"api-base":T.string().optional()}),Ucc=T.object({"api-key":T.string(),endpoint:T.string().optional()}),Vcc=T.object({"container-id":T.string()}),Gcc=T.object({"measurement-id":T.string()}),qcc=T.object({segment:Mcc.optional(),fullstory:Lcc.optional(),intercom:_cc.optional(),posthog:Ucc.optional(),gtm:Vcc.optional(),ga4:Gcc.optional()}),Wcc=T.object({enabled:T.boolean().optional(),style:T.string().optional()}),Hcc=T.object({url:T.string(),title:T.string().optional()}),Kcc=Hcc,Jcc=T.enum(["description","subtitle"]),Ycc=T.object({"allowed-origins":T.array(T.string())}),Xcc=T.object({"page-directive":T.string().optional(),"page-description-source":Jcc.optional(),"llms-txt":T.string().optional(),"llms-full-txt":T.string().optional()}),clo=T.object({model:ccc.optional(),"system-prompt":T.string().optional(),location:T.array(acc).optional(),datasources:T.array(Kcc).optional(),"mask-pii":T.boolean().optional(),disclaimer:T.string().optional()}),Zcc=T.object({path:T.string(),weight:mlo.optional(),style:flo.optional()}),$cc=T.union([T.string(),Zcc]),ABr=T.object({name:T.string().optional(),path:T.string().optional(),weight:mlo.optional(),style:flo.optional(),paths:T.array($cc).optional(),display:dcc.optional(),fallback:T.array(T.string()).optional(),"font-variation-settings":T.string().optional()}),euc=T.object({headingsFont:ABr.optional(),bodyFont:ABr.optional(),codeFont:ABr.optional()}),tuc=T.object({sidebar:Tcc.optional(),body:Scc.optional(),tabs:wcc.optional(),"page-actions":Occ.optional(),"footer-nav":xcc.optional(),"language-switcher":vcc.optional(),"product-switcher":Icc.optional(),"site-switcher":Ccc.optional()}),ruc=T.object({"current-page":T.boolean().optional()}),nuc=T.object({"page-width":T.string().optional(),"content-width":T.string().optional(),"sidebar-width":T.string().optional(),"header-height":T.string().optional(),"searchbar-placement":mcc.optional(),"tabs-placement":hcc.optional(),"switcher-placement":gcc.optional(),"content-alignment":Acc.optional(),"header-position":ycc.optional(),"disable-header":T.boolean().optional(),"hide-nav-links":T.boolean().optional(),"hide-feedback":T.boolean().optional(),"mobile-toc":T.boolean().optional(),"changelog-layout":bcc.optional(),"api-reference-layout":Ecc.optional(),"api-reference-expand-properties":T.boolean().optional(),"show-nav-availability-badges":T.boolean().optional(),breadcrumbs:ruc.optional()}),iuc=T.object({"prioritize-current-product":T.boolean().optional(),"default-filter-by-current-product":T.boolean().optional()}),ouc=T.object({"search-text":T.string().optional(),"disable-search":T.boolean().optional(),"dark-mode-code":T.boolean().optional(),"default-search-filters":T.boolean().optional(),search:iuc.optional(),"http-snippets":kcc.optional(),"hide-404-page":T.boolean().optional(),"use-javascript-as-typescript":T.boolean().optional(),"disable-explorer-proxy":T.boolean().optional(),"disable-analytics":T.boolean().optional(),language:bBr.optional(),"folder-title-source":plo.optional(),"substitute-env-vars":T.boolean().optional(),"websocket-oneof-display":T.enum(["flat","grouped"]).optional(),embedding:Ycc.optional()}),suc=T.object({"accent-primary":Gx.optional(),accentPrimary:Gx.optional(),background:Gx.optional(),border:Gx.optional(),"sidebar-background":Gx.optional(),"header-background":Gx.optional(),"card-background":Gx.optional(),"accent-1":Gx.optional(),"accent-2":Gx.optional(),"accent-3":Gx.optional(),"accent-4":Gx.optional(),"accent-5":Gx.optional(),"accent-6":Gx.optional(),"accent-7":Gx.optional(),"accent-8":Gx.optional(),"accent-9":Gx.optional(),"accent-10":Gx.optional(),"accent-11":Gx.optional(),"accent-12":Gx.optional()}),auc=T.object({title:T.string(),subtitle:T.string().optional(),url:T.string(),icon:T.string().optional(),default:T.boolean().optional()}),cuc=T.object({"copy-page":T.boolean().optional(),"view-as-markdown":T.boolean().optional(),"ask-ai":T.boolean().optional(),chatgpt:T.boolean().optional(),claude:T.boolean().optional(),cursor:T.boolean().optional(),mcp:T.boolean().optional(),vscode:T.boolean().optional(),custom:T.array(auc).optional()}),uuc=T.object({default:scc.optional(),options:cuc.optional()}),luc=T.object({host:T.string().optional(),owner:T.string(),repo:T.string(),branch:T.string().optional()}),puc=T.object({github:luc.optional(),launch:ucc.optional()}),fuc=T.object({url:T.string(),"custom-domain":Dcc.optional(),"edit-this-page":puc.optional(),audiences:JLt.optional(),"multi-source":T.boolean().optional()}),duc=T.object({dark:T.string().optional(),light:T.string().optional(),height:T.number().optional(),href:T.string().optional(),"right-text":T.string().optional()}),glo=T.object({link:T.string(),href:T.string(),icon:T.string().optional(),target:jtt.optional()}),muc=T.object({version:T.string(),package:T.string()}),A$=T.union([T.string(),muc]),huc=T.object({python:A$.optional(),typescript:A$.optional(),go:A$.optional(),java:A$.optional(),ruby:A$.optional(),csharp:A$.optional(),php:A$.optional(),swift:A$.optional(),rust:A$.optional()}),guc=T.object({href:T.string().optional()}),XLt=T.object({hidden:T.boolean().optional(),environments:T.array(T.string()).optional(),button:guc.optional(),oauth:T.boolean().optional(),"limit-websocket-messages-per-connection":T.number().int().optional(),"send-optional-defaults":T.boolean().optional()}),IBr=T.object({message:T.string()}),BLe=EBr.merge(T.object({href:T.string().optional(),target:jtt.optional(),url:T.string().optional(),text:T.string().optional(),icon:T.string().optional(),rightIcon:T.string().optional(),rounded:T.boolean().optional()})),Auc=EBr.merge(T.object({url:T.string(),target:jtt.optional()})),yuc=T.union([T.string(),Auc]),buc=EBr.merge(T.object({links:T.array(BLe),text:T.string().optional(),icon:T.string().optional(),rightIcon:T.string().optional(),rounded:T.boolean().optional()})),Euc=T.union([BLe.merge(T.object({type:T.literal("filled")})),BLe.merge(T.object({type:T.literal("outlined")})),BLe.merge(T.object({type:T.literal("minimal")})),T.object({type:T.literal("github"),value:yuc}),buc.merge(T.object({type:T.literal("dropdown")})),BLe.merge(T.object({type:T.literal("primary")})),BLe.merge(T.object({type:T.literal("secondary")}))]),Iuc=T.object({github:T.string().optional(),twitter:T.string().optional(),x:T.string().optional(),linkedin:T.string().optional(),youtube:T.string().optional(),instagram:T.string().optional(),facebook:T.string().optional(),discord:T.string().optional(),slack:T.string().optional(),hackernews:T.string().optional(),medium:T.string().optional(),website:T.string().optional()}),vuc=T.object({path:T.string(),strategy:dlo.optional()}),Cuc=T.union([T.string(),vuc]),xuc=T.object({url:T.string(),strategy:dlo.optional(),"disable-sri":T.boolean().optional()}),ulo=T.union([xuc,Cuc]),wuc=T.union([ulo,T.array(ulo)]),Suc=T.object({"og:site_name":T.string().optional(),"og:title":T.string().optional(),"og:description":T.string().optional(),"og:url":T.string().optional(),"og:image":T.string().optional(),"og:image:width":T.number().optional(),"og:image:height":T.number().optional(),"og:locale":T.string().optional(),"og:logo":T.string().optional(),"twitter:title":T.string().optional(),"twitter:description":T.string().optional(),"twitter:handle":T.string().optional(),"twitter:image":T.string().optional(),"twitter:site":T.string().optional(),"twitter:url":T.string().optional(),"twitter:card":Bcc.optional(),"og:dynamic":T.boolean().optional(),"og:dynamic:background-image":T.string().optional(),"og:dynamic:text-color":T.string().optional(),"og:dynamic:background-color":T.string().optional(),"og:dynamic:logo-color":T.enum(["dark","light"]).optional(),"og:dynamic:show-logo":T.boolean().optional(),"og:dynamic:show-section":T.boolean().optional(),"og:dynamic:show-description":T.boolean().optional(),"og:dynamic:show-url":T.boolean().optional(),"og:dynamic:show-gradient":T.boolean().optional(),"canonical-host":T.string().optional()}),Alo=T.object({source:T.string(),destination:T.string(),permanent:T.boolean().optional()}),Tuc=T.union([T.array(Alo),T.string(),T.array(T.string())]),Aed=T.object({redirects:T.array(Alo.strict())}).strict(),Pfe=T.enum(["warn","error"]),Ouc=T.object({"example-validation":Pfe.optional(),"broken-links":Pfe.optional(),"no-non-component-refs":Pfe.optional(),"valid-local-references":Pfe.optional(),"no-circular-redirects":Pfe.optional(),"valid-docs-endpoints":Pfe.optional(),"missing-redirects":Pfe.optional(),"valid-changelog-slug":Pfe.optional()}),Puc=T.object({rules:Ouc.optional()}),Buc=T.object({intercom:T.string().optional(),context7:T.string().optional()}),Ruc=T.object({url:T.string(),locale:T.string().optional()}),Duc=T.union([T.string(),Ruc]),kuc=T.object({"mdx-components":T.array(T.string()).optional(),"disable-stream-toggle":T.boolean().optional(),"openapi-parser-v2":T.boolean().optional(),"openapi-parser-v3":T.boolean().optional(),"dynamic-snippets":T.boolean().optional(),"ai-examples":T.boolean().optional(),"ai-example-style-instructions":T.string().optional(),"exclude-apis":T.boolean().optional(),"basepath-aware":T.boolean().optional(),"robots-txt-on-instance-url":T.boolean().optional(),"external-sitemaps":T.array(Duc).optional()}),Fuc=T.object({git:T.string(),subpath:T.string().optional(),ref:T.string().optional()}),Nuc=T.object({path:T.string()}),juc=T.union([Fuc,Nuc]),zuc=T.object({path:T.string()}),Quc=T.object({input:juc,output:zuc,lang:fcc}),ztt=sB.merge(aB).merge(T.object({page:T.string(),path:T.string(),slug:T.string().optional(),icon:T.string().optional(),hidden:T.boolean().optional(),noindex:T.boolean().optional(),availability:Bfe.optional()})),Muc=sB.merge(aB).merge(T.object({changelog:KLt,title:T.string().optional(),slug:T.string().optional(),icon:T.string().optional(),hidden:T.boolean().optional()})),Luc=sB.merge(aB).merge(T.object({blog:KLt,title:T.string().optional(),slug:T.string().optional(),icon:T.string().optional(),hidden:T.boolean().optional()})),_uc=sB.merge(aB).merge(T.object({library:llo,title:T.string().optional(),slug:T.string().optional()})),Uuc=sB.merge(aB).merge(T.object({folder:T.string(),title:T.string().optional(),"title-source":plo.optional(),slug:T.string().optional(),icon:T.string().optional(),hidden:T.boolean().optional(),"skip-slug":T.boolean().optional(),collapsed:YLt.optional(),collapsible:T.boolean().optional(),"collapsed-by-default":T.boolean().optional(),availability:Bfe.optional()})),Vuc=sB.merge(aB).merge(T.object({endpoint:T.string(),title:T.string().optional(),slug:T.string().optional(),icon:T.string().optional(),hidden:T.boolean().optional(),availability:Bfe.optional(),playground:XLt.optional()})),Guc=sB.merge(aB).merge(T.object({operation:T.string(),title:T.string().optional(),slug:T.string().optional(),hidden:T.boolean().optional(),availability:Bfe.optional()})),ZLt=T.lazy(()=>T.union([T.string(),T.record(T.string(),Huc),quc,Vuc,Guc,ztt,glo])),quc=sB.merge(aB).merge(T.object({section:T.string(),"referenced-packages":T.array(T.string()).optional(),summary:T.string().optional(),contents:T.array(ZLt).optional(),slug:T.string().optional(),icon:T.string().optional(),hidden:T.boolean().optional(),"skip-slug":T.boolean().optional(),collapsed:YLt.optional(),collapsible:T.boolean().optional(),"collapsed-by-default":T.boolean().optional(),availability:Bfe.optional(),playground:XLt.optional()})),Wuc=sB.merge(aB).merge(T.object({title:T.string().optional(),summary:T.string().optional(),contents:T.array(ZLt).optional(),availability:Bfe.optional(),slug:T.string().optional(),icon:T.string().optional(),hidden:T.boolean().optional(),"skip-slug":T.boolean().optional(),playground:XLt.optional()})),Huc=T.lazy(()=>T.union([T.array(ZLt),Wuc])),Kuc=T.enum(["openapi","asyncapi","graphql"]),Juc=T.enum(["get","post","put","patch","delete","head","options","trace"]),Yuc=T.object({"status-code":T.number().int().min(400).max(599),methods:T.array(Juc).optional()}),Xuc=T.object({schema:T.union([T.string(),T.record(T.string(),T.unknown())]),name:T.string().optional(),"apply-to":T.enum(["all","untyped"]).optional(),ensure:T.array(Yuc).optional()}),Zuc=T.object({"type-dates-as-strings":T.boolean().optional(),"use-bytes-for-binary-response":T.boolean().optional(),"respect-parameter-content":T.boolean().optional(),"respect-operation-id-word-boundaries":T.boolean().optional(),"infer-forward-compatible":T.boolean().optional(),"preserve-one-of-in-all-of":T.boolean().optional(),"any-of-sibling-properties-as-object":T.boolean().optional(),"error-responses":Xuc.optional()}),$uc=T.object({type:Kuc,path:T.string(),namespace:T.string().optional(),overlays:T.string().optional(),overrides:T.array(T.string()).optional(),settings:Zuc.optional()}),elc=sB.merge(aB).merge(T.object({api:T.string(),"api-name":T.string().optional(),specs:T.array($uc).optional(),openrpc:T.string().optional(),audiences:JLt.optional(),"display-errors":T.boolean().optional(),"tag-description-pages":T.boolean().optional(),snippets:huc.optional(),postman:T.string().optional(),summary:T.string().optional(),layout:T.array(ZLt).optional(),collapsed:YLt.optional(),icon:T.string().optional(),slug:T.string().optional(),hidden:T.boolean().optional(),availability:Bfe.optional(),"skip-slug":T.boolean().optional(),alphabetized:T.boolean().optional(),"sort-by-availability":T.array(lcc).optional(),flattened:T.boolean().optional(),paginated:T.boolean().optional(),playground:XLt.optional()})),$Lt=T.lazy(()=>T.union([ztt,tlc,elc,_uc,glo,Muc,Luc,Uuc])),tlc=sB.merge(aB).merge(T.object({section:T.string(),path:T.string().optional(),contents:T.array($Lt),collapsed:YLt.optional(),collapsible:T.boolean().optional(),"collapsed-by-default":T.boolean().optional(),slug:T.string().optional(),icon:T.string().optional(),hidden:T.boolean().optional(),"skip-slug":T.boolean().optional(),availability:Bfe.optional()})),rlc=T.array($Lt),nlc=sB.merge(aB).merge(T.object({title:T.string(),subtitle:T.string().optional(),icon:T.string().optional(),layout:T.array($Lt),slug:T.string().optional(),"skip-slug":T.boolean().optional(),hidden:T.boolean().optional(),default:T.boolean().optional()})),ilc=T.object({tab:Ntt,layout:T.array($Lt).optional()}),olc=T.object({tab:Ntt,variants:T.array(nlc)}),slc=T.union([ilc,olc]),alc=T.array(slc),vBr=T.union([rlc,alc]),CBr=sB.merge(aB).merge(T.object({"display-name":T.string(),icon:T.string().optional(),slug:T.string().optional(),"skip-slug":T.boolean().optional(),hidden:T.boolean().optional(),href:T.string().optional(),target:jtt.optional(),changelog:KLt.optional(),blog:KLt.optional()})),ylo=sB.merge(aB).merge(T.object({"display-name":T.string(),path:T.string().optional(),ref:T.string().optional(),slug:T.string().optional(),availability:pcc.optional(),audiences:JLt.optional(),hidden:T.boolean().optional(),announcement:IBr.optional()})),yed=T.object({tabs:T.record(Ntt,CBr).optional(),"landing-page":ztt.optional(),navigation:vBr}),blo=sB.merge(aB).merge(T.object({"display-name":T.string(),subtitle:T.string().optional(),icon:T.string().optional(),image:T.string().optional(),versions:T.array(ylo).optional(),audiences:JLt.optional()})),clc=blo.merge(T.object({path:T.string(),slug:T.string().optional(),announcement:IBr.optional()})),ulc=blo.merge(T.object({href:T.string(),target:jtt.optional()})),llc=T.union([clc,ulc]),plc=sB.merge(aB).merge(T.object({"display-name":T.string(),path:T.string(),slug:T.string().optional()})),flc=T.object({href:T.string()}),bed=T.union([plc,flc]),Eed=T.object({tabs:T.record(Ntt,CBr).optional(),"landing-page":ztt.optional(),navigation:vBr}),dlc=T.object({lang:bBr,default:T.boolean().optional()}),mlc=T.union([bBr,dlc]);Ied=T.object({instances:T.array(fuc),title:T.string().optional(),libraries:T.record(llo,Quc).optional(),analytics:qcc.optional(),announcement:IBr.optional(),roles:T.array(yBr).optional(),tabs:T.record(Ntt,CBr).optional(),versions:T.array(ylo).optional(),products:T.array(llc).optional(),"landing-page":ztt.optional(),navigation:vBr.optional(),"navbar-links":T.array(Euc).optional(),"footer-links":Iuc.optional(),"page-actions":uuc.optional(),experimental:kuc.optional(),"default-language":occ.optional(),languages:T.array(T.string()).optional(),translations:T.array(mlc).optional().superRefine((e,t)=>{if(e==null)return;let n=e.map(hlc).filter(i=>i.default===!0).length;n>1&&t.addIssue({code:T.ZodIssueCode.custom,message:`Only one translation entry can be marked as default, but ${n} were found`})}),"ai-chat":clo.optional(),"ai-search":clo.optional(),"ai-examples":Wcc.optional(),agents:Xcc.optional(),metadata:Suc.optional(),redirects:Tuc.optional(),check:Puc.optional(),logo:duc.optional(),favicon:T.string().optional(),"background-image":Ncc.optional(),colors:suc.optional(),typography:euc.optional(),layout:nuc.optional(),settings:ouc.optional(),theme:tuc.optional(),"global-theme":T.string().optional(),integrations:Buc.optional(),css:jcc.optional(),js:wuc.optional(),header:T.string().optional(),footer:T.string().optional()})});function xed(e){if("changelog"in e)return e.changelog;if("blog"in e)return e.blog}function wed(e){return e.changelog??e.blog}var ved,Ced,Alc=h(()=>{"use strict";ved="Changelog",Ced="Blog"});var ylc=h(()=>{"use strict"});var blc=h(()=>{"use strict"});var Elc=h(()=>{"use strict"});var Ilc=h(()=>{"use strict"});var vlc=h(()=>{"use strict"});var Ilo,Clc=h(()=>{"use strict";Ilo={Docs:"docs",Slack:"slack",Discord:"discord"}});var vlo,xlc=h(()=>{"use strict";vlo={Claude37:"claude-3.7",Claude4:"claude-4",CommandA:"command-a"}});var wlc=h(()=>{"use strict"});var Slc=h(()=>{"use strict"});var Tlc=h(()=>{"use strict"});var Olc=h(()=>{"use strict"});var Plc=h(()=>{"use strict"});var Blc=h(()=>{"use strict"});var Clo,Rlc=h(()=>{"use strict";Clo={Indented:"indented",Cards:"cards"}});var Dlc=h(()=>{"use strict"});var klc=h(()=>{"use strict"});var Flc=h(()=>{"use strict"});var Nlc=h(()=>{"use strict"});var jlc=h(()=>{"use strict"});var zlc=h(()=>{"use strict"});var xlo,Qlc=h(()=>{"use strict";xlo={All:"all",Untyped:"untyped"}});var Mlc=h(()=>{"use strict"});var wlo,Llc=h(()=>{"use strict";wlo={Get:"get",Post:"post",Put:"put",Patch:"patch",Delete:"delete",Head:"head",Options:"options",Trace:"trace"}});var _lc=h(()=>{"use strict"});var Ulc=h(()=>{"use strict"});var Vlc=h(()=>{"use strict"});var Slo,Glc=h(()=>{"use strict";Slo={Openapi:"openapi",Asyncapi:"asyncapi",Graphql:"graphql"}});var qlc=h(()=>{"use strict"});var Wlc=h(()=>{"use strict"});var Tlo,Hlc=h(()=>{"use strict";Tlo={Stable:"stable",GenerallyAvailable:"generally-available",InDevelopment:"in-development",PreRelease:"pre-release",Deprecated:"deprecated",Beta:"beta",Alpha:"alpha",Preview:"preview",Legacy:"legacy"}});var Klc=h(()=>{"use strict"});var Jlc=h(()=>{"use strict"});var Ylc=h(()=>{"use strict"});var Olo,Xlc=h(()=>{"use strict";Olo={Default:"default",Canvas:"canvas"}});var Zlc=h(()=>{"use strict"});var $lc=h(()=>{"use strict"});var epc=h(()=>{"use strict"});var Plo,tpc=h(()=>{"use strict";Plo={Timeline:"timeline",Classic:"classic"}});var rpc=h(()=>{"use strict"});var Blo,npc=h(()=>{"use strict";Blo={Warn:"warn",Error:"error"}});var ipc=h(()=>{"use strict"});var Rlo,opc=h(()=>{"use strict";Rlo={OpenByDefault:"open-by-default"}});var spc=h(()=>{"use strict"});var apc=h(()=>{"use strict"});var cpc=h(()=>{"use strict"});var upc=h(()=>{"use strict"});var Dlo,lpc=h(()=>{"use strict";Dlo={Center:"center",Left:"left"}});var ppc=h(()=>{"use strict"});var fpc=h(()=>{"use strict"});var dpc=h(()=>{"use strict"});var mpc=h(()=>{"use strict"});var hpc=h(()=>{"use strict"});var gpc=h(()=>{"use strict"});var Apc=h(()=>{"use strict"});var ypc=h(()=>{"use strict"});var klo,bpc=h(()=>{"use strict";klo={Github:"github",Dashboard:"dashboard"}});var Epc=h(()=>{"use strict"});var Ipc=h(()=>{"use strict"});var vpc=h(()=>{"use strict"});var Cpc=h(()=>{"use strict"});var xpc=h(()=>{"use strict"});var wpc=h(()=>{"use strict"});var Spc=h(()=>{"use strict"});var Tpc=h(()=>{"use strict"});var Opc=h(()=>{"use strict"});var Ppc=h(()=>{"use strict"});var Bpc=h(()=>{"use strict"});var Flo,Rpc=h(()=>{"use strict";Flo={Auto:"auto",Block:"block",Swap:"swap",Fallback:"fallback",Optional:"optional"}});var Nlo,Dpc=h(()=>{"use strict";Nlo={Normal:"normal",Italic:"italic"}});var kpc=h(()=>{"use strict"});var Fpc=h(()=>{"use strict"});var jlo,Npc=h(()=>{"use strict";jlo={Default:"default",Minimal:"minimal"}});var jpc=h(()=>{"use strict"});var zpc=h(()=>{"use strict"});var Qpc=h(()=>{"use strict"});var Mpc=h(()=>{"use strict"});var Lpc=h(()=>{"use strict"});var zlo,_pc=h(()=>{"use strict";zlo={Fixed:"fixed",Static:"static"}});var Qlo,Upc=h(()=>{"use strict";Qlo={Curl:"curl",Csharp:"csharp",Go:"go",Java:"java",Javascript:"javascript",Php:"php",Python:"python",Ruby:"ruby",Swift:"swift",Typescript:"typescript"}});var Vpc=h(()=>{"use strict"});var Gpc=h(()=>{"use strict"});var qpc=h(()=>{"use strict"});var Wpc=h(()=>{"use strict"});var Hpc=h(()=>{"use strict"});var Kpc=h(()=>{"use strict"});var Jpc=h(()=>{"use strict"});var Ypc=h(()=>{"use strict"});var Xpc=h(()=>{"use strict"});var Mlo,Zpc=h(()=>{"use strict";Mlo={BeforeInteractive:"beforeInteractive",AfterInteractive:"afterInteractive",LazyOnload:"lazyOnload"}});var $pc=h(()=>{"use strict"});var Llo,efc=h(()=>{"use strict";Llo={Default:"default",Minimal:"minimal"}});var tfc=h(()=>{"use strict"});var rfc=h(()=>{"use strict"});var nfc=h(()=>{"use strict"});var ifc=h(()=>{"use strict"});var _lo,ofc=h(()=>{"use strict";_lo={Python:"python",Cpp:"cpp"}});var sfc=h(()=>{"use strict"});var afc=h(()=>{"use strict"});var cfc=h(()=>{"use strict"});var ufc=h(()=>{"use strict"});var lfc=h(()=>{"use strict"});var pfc=h(()=>{"use strict"});var ffc=h(()=>{"use strict"});var dfc=h(()=>{"use strict"});var mfc=h(()=>{"use strict"});var hfc=h(()=>{"use strict"});var gfc=h(()=>{"use strict"});var Afc=h(()=>{"use strict"});var yfc=h(()=>{"use strict"});var Ulo,bfc=h(()=>{"use strict";Ulo={Dark:"dark",Light:"light"}});var Vlo,Efc=h(()=>{"use strict";Vlo={CopyPage:"copy-page",ViewAsMarkdown:"view-as-markdown",AskAi:"ask-ai",Chatgpt:"chatgpt",Claude:"claude",Cursor:"cursor",ClaudeCode:"claude-code",Vscode:"vscode"}});var Ifc=h(()=>{"use strict"});var vfc=h(()=>{"use strict"});var Glo,Cfc=h(()=>{"use strict";Glo={Default:"default",Toolbar:"toolbar"}});var xfc=h(()=>{"use strict"});var qlo,wfc=h(()=>{"use strict";qlo={Description:"description",Subtitle:"subtitle"}});var Sfc=h(()=>{"use strict"});var Tfc=h(()=>{"use strict"});var Ofc=h(()=>{"use strict"});var Pfc=h(()=>{"use strict"});var Bfc=h(()=>{"use strict"});var Rfc=h(()=>{"use strict"});var Dfc=h(()=>{"use strict"});var kfc=h(()=>{"use strict"});var Wlo,Ffc=h(()=>{"use strict";Wlo={Default:"default",Toggle:"toggle",Tabs:"tabs"}});var Hlo,Nfc=h(()=>{"use strict";Hlo={Typescript:"typescript",Javascript:"javascript",Python:"python",Java:"java",Go:"go",Ruby:"ruby",Csharp:"csharp",Php:"php",Swift:"swift",Rust:"rust",Nodets:"nodets",Nodejs:"nodejs",Dotnet:"dotnet",Curl:"curl",Jvm:"jvm",Ts:"ts",Js:"js"}});var jfc=h(()=>{"use strict"});var zfc=h(()=>{"use strict"});var Qfc=h(()=>{"use strict"});var Mfc=h(()=>{"use strict"});var Lfc=h(()=>{"use strict"});var Klo,_fc=h(()=>{"use strict";Klo={Header:"header",HeaderTabs:"header-tabs",Sidebar:"sidebar"}});var Ufc=h(()=>{"use strict"});var Vfc=h(()=>{"use strict"});var Gfc=h(()=>{"use strict"});var Jlo,qfc=h(()=>{"use strict";Jlo={Default:"default",Minimal:"minimal"}});var Wfc=h(()=>{"use strict"});var Hfc=h(()=>{"use strict"});var Kfc=h(()=>{"use strict"});var Jfc=h(()=>{"use strict"});var Yfc=h(()=>{"use strict"});var Xfc=h(()=>{"use strict"});var Ylo,Zfc=h(()=>{"use strict";Ylo={Unset:"unset",Stable:"stable",GenerallyAvailable:"generally-available",InDevelopment:"in-development",PreRelease:"pre-release",Deprecated:"deprecated",Beta:"beta",Alpha:"alpha",Preview:"preview",Legacy:"legacy"}});var Xlo,$fc=h(()=>{"use strict";Xlo={Header:"header",Sidebar:"sidebar"}});var edc=h(()=>{"use strict"});var tdc=h(()=>{"use strict"});var rdc=h(()=>{"use strict"});var ndc=h(()=>{"use strict"});var idc=h(()=>{"use strict"});var odc=h(()=>{"use strict"});var Zlo,sdc=h(()=>{"use strict";Zlo={Left:"left",Center:"center"}});var $lo,adc=h(()=>{"use strict";$lo={Header:"header",Sidebar:"sidebar"}});var cdc=h(()=>{"use strict"});var udc=h(()=>{"use strict"});var epo,ldc=h(()=>{"use strict";epo={Default:"default",Bubble:"bubble"}});var pdc=h(()=>{"use strict"});var tpo,fdc=h(()=>{"use strict";tpo={Blank:"_blank",Self:"_self",Parent:"_parent",Top:"_top"}});var ddc=h(()=>{"use strict"});var rpo,mdc=h(()=>{"use strict";rpo={Frontmatter:"frontmatter",Filename:"filename"}});var hdc=h(()=>{"use strict"});var gdc=h(()=>{"use strict"});var npo,Adc=h(()=>{"use strict";npo={Summary:"summary",SummaryLargeImage:"summary_large_image",App:"app",Player:"player"}});var ydc=h(()=>{"use strict"});var ipo,bdc=h(()=>{"use strict";ipo={Deprecated:"deprecated",Legacy:"legacy",Ga:"ga",Stable:"stable",Beta:"beta",Alpha:"alpha",Preview:"preview"}});var Edc=h(()=>{"use strict"});var Idc=h(()=>{"use strict"});var vdc=h(()=>{"use strict"});var opo,Cdc=h(()=>{"use strict";opo={Flat:"flat",Grouped:"grouped"}});var xdc=h(()=>{"use strict"});var wdc=h(()=>{"use strict"});var Sdc=h(()=>{"use strict"});var spo=h(()=>{"use strict";blc();Elc();Ilc();vlc();Clc();xlc();wlc();Slc();Tlc();Olc();Plc();Blc();Rlc();Dlc();klc();Flc();Nlc();jlc();zlc();Qlc();Mlc();Llc();_lc();Ulc();Vlc();Glc();qlc();Wlc();Hlc();Klc();Jlc();Ylc();Xlc();Zlc();$lc();epc();tpc();rpc();npc();ipc();opc();spc();apc();cpc();upc();lpc();ppc();fpc();dpc();mpc();hpc();gpc();Apc();ypc();bpc();Epc();Ipc();vpc();Cpc();xpc();wpc();Spc();Tpc();Opc();Ppc();Bpc();Rpc();Dpc();kpc();Fpc();Npc();jpc();zpc();Qpc();Mpc();Lpc();_pc();Upc();Vpc();Gpc();qpc();Wpc();Hpc();Kpc();Jpc();Ypc();Xpc();Zpc();$pc();efc();tfc();rfc();nfc();ifc();ofc();sfc();afc();cfc();ufc();lfc();pfc();ffc();dfc();mfc();hfc();gfc();Afc();yfc();bfc();Efc();Ifc();vfc();Cfc();xfc();wfc();Sfc();Tfc();Ofc();Pfc();Bfc();Rfc();Dfc();kfc();Ffc();Nfc();jfc();zfc();Qfc();Mfc();Lfc();_fc();Ufc();Vfc();Gfc();qfc();Wfc();Hfc();Kfc();Jfc();Yfc();Xfc();Zfc();$fc();edc();tdc();rdc();ndc();idc();odc();sdc();adc();cdc();udc();ldc();pdc();fdc();ddc();mdc();hdc();gdc();Adc();ydc();bdc();Edc();Idc();vdc();Cdc();xdc();wdc();Sdc()});var xBr={};ee(xBr,{AiChatLocation:()=>Ilo,AiChatModel:()=>vlo,ApiReferenceLayout:()=>Clo,ApiSpecErrorResponseApplyTo:()=>xlo,ApiSpecErrorResponseHttpMethod:()=>wlo,ApiSpecType:()=>Slo,Availability:()=>Tlo,BodyThemeConfig:()=>Olo,ChangelogLayout:()=>Plo,CheckRuleSeverity:()=>Blo,CollapsedStringValue:()=>Rlo,ContentAlignment:()=>Dlo,EditThisPageLaunch:()=>klo,FontDisplay:()=>Flo,FontStyle:()=>Nlo,FooterNavThemeConfig:()=>jlo,HeaderPosition:()=>zlo,HttpSnippetLanguage:()=>Qlo,JsScriptStrategy:()=>Mlo,LanguageSwitcherThemeConfig:()=>Llo,LibraryLanguage:()=>_lo,OgDynamicLogoColor:()=>Ulo,PageActionOption:()=>Vlo,PageActionsThemeConfig:()=>Glo,PageDescriptionSource:()=>qlo,ProductSwitcherThemeConfig:()=>Wlo,ProgrammingLanguage:()=>Hlo,SearchbarPlacement:()=>Klo,SidebarThemeConfig:()=>Jlo,SortByAvailabilityValue:()=>Ylo,SwitcherPlacement:()=>Xlo,TabsAlignment:()=>Zlo,TabsPlacement:()=>$lo,TabsThemeStyle:()=>epo,Target:()=>tpo,TitleSource:()=>rpo,TwitterCardSetting:()=>npo,VersionAvailability:()=>ipo,WebSocketOneofDisplay:()=>opo});var Tdc=h(()=>{"use strict";spo()});var Odc=h(()=>{"use strict";Tdc();spo()});var apo={};ee(apo,{AiChatLocation:()=>Ilo,AiChatModel:()=>vlo,ApiReferenceLayout:()=>Clo,ApiSpecErrorResponseApplyTo:()=>xlo,ApiSpecErrorResponseHttpMethod:()=>wlo,ApiSpecType:()=>Slo,Availability:()=>Tlo,BodyThemeConfig:()=>Olo,ChangelogLayout:()=>Plo,CheckRuleSeverity:()=>Blo,CollapsedStringValue:()=>Rlo,ContentAlignment:()=>Dlo,EditThisPageLaunch:()=>klo,FontDisplay:()=>Flo,FontStyle:()=>Nlo,FooterNavThemeConfig:()=>jlo,HeaderPosition:()=>zlo,HttpSnippetLanguage:()=>Qlo,JsScriptStrategy:()=>Mlo,LanguageSwitcherThemeConfig:()=>Llo,LibraryLanguage:()=>_lo,OgDynamicLogoColor:()=>Ulo,PageActionOption:()=>Vlo,PageActionsThemeConfig:()=>Glo,PageDescriptionSource:()=>qlo,ProductSwitcherThemeConfig:()=>Wlo,ProgrammingLanguage:()=>Hlo,SearchbarPlacement:()=>Klo,SidebarThemeConfig:()=>Jlo,SortByAvailabilityValue:()=>Ylo,SwitcherPlacement:()=>Xlo,TabsAlignment:()=>Zlo,TabsPlacement:()=>$lo,TabsThemeStyle:()=>epo,Target:()=>tpo,TitleSource:()=>rpo,TwitterCardSetting:()=>npo,VersionAvailability:()=>ipo,WebSocketOneofDisplay:()=>opo,docs:()=>xBr});var cpo=h(()=>{"use strict";Odc()});var Pdc,Bdc=h(()=>{"use strict";Pdc=(e,t,r)=>JSON.stringify(e,t,r)});function Sed({message:e,statusCode:t,body:r}){let n=[];return e!=null&&n.push(e),t!=null&&n.push(`Status code: ${t.toString()}`),r!=null&&n.push(`Body: ${Pdc(r,void 0,2)}`),n.join(`
|
|
139
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let a=s[1];if(t===s[0]){o(s);continue}if(e.external){let u=e.external.registry.get(s[0])?.id;if(t!==s[0]&&u){o(s);continue}}if(e.metadataRegistry.get(s[0])?.id){o(s);continue}if(a.cycle){o(s);continue}if(a.count>1&&e.reused==="ref"){o(s);continue}}}function _Ie(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=s=>{let a=e.seen.get(s);if(a.ref===null)return;let c=a.def??a.schema,u={...c},l=a.ref;if(a.ref=null,l){n(l);let f=e.seen.get(l),d=f.schema;if(d.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(d)):Object.assign(c,d),Object.assign(c,u),s._zod.parent===l)for(let g in c)g==="$ref"||g==="allOf"||g in u||delete c[g];if(d.$ref&&f.def)for(let g in c)g==="$ref"||g==="allOf"||g in f.def&&JSON.stringify(c[g])===JSON.stringify(f.def[g])&&delete c[g]}let p=s._zod.parent;if(p&&p!==l){n(p);let f=e.seen.get(p);if(f?.schema.$ref&&(c.$ref=f.schema.$ref,f.def))for(let d in c)d==="$ref"||d==="allOf"||d in f.def&&JSON.stringify(c[d])===JSON.stringify(f.def[d])&&delete c[d]}e.override({zodSchema:s,jsonSchema:c,path:a.path??[]})};for(let s of[...e.seen.entries()].reverse())n(s[0]);let i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(s)}Object.assign(i,r.def??r.schema);let o=e.external?.defs??{};for(let s of e.seen.entries()){let a=s[1];a.def&&a.defId&&(o[a.defId]=a.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?i.$defs=o:i.definitions=o);try{let s=JSON.parse(JSON.stringify(i));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:Ttt(t,"input",e.processors),output:Ttt(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function B2(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return B2(n.element,r);if(n.type==="set")return B2(n.valueType,r);if(n.type==="lazy")return B2(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 B2(n.innerType,r);if(n.type==="intersection")return B2(n.left,r)||B2(n.right,r);if(n.type==="record"||n.type==="map")return B2(n.keyType,r)||B2(n.valueType,r);if(n.type==="pipe")return B2(n.in,r)||B2(n.out,r);if(n.type==="object"){for(let i in n.shape)if(B2(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(let i of n.options)if(B2(i,r))return!0;return!1}if(n.type==="tuple"){for(let i of n.items)if(B2(i,r))return!0;return!!(n.rest&&B2(n.rest,r))}return!1}var lco,Ttt,DLt=h(()=>{"use strict";PLt();lco=(e,t={})=>r=>{let n=MIe({...r,processors:t});return mg(e,n),LIe(n,e),_Ie(n,e)},Ttt=(e,t,r={})=>n=>{let{libraryOptions:i,target:o}=n??{},s=MIe({...i??{},target:o,io:t,processors:r});return mg(e,s),LIe(s,e),_Ie(s,e)}});function NPr(e,t){if("_idmap"in e){let n=e,i=MIe({...t,processors:DPr}),o={};for(let c of n._idmap.entries()){let[u,l]=c;mg(l,i)}let s={},a={registry:n,uri:t?.uri,defs:o};i.external=a;for(let c of n._idmap.entries()){let[u,l]=c;LIe(i,l),s[u]=_Ie(i,l)}if(Object.keys(o).length>0){let c=i.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[c]:o}}return{schemas:s}}let r=MIe({...t,processors:DPr});return mg(e,r),LIe(r,e),_Ie(r,e)}var ted,pco,fco,dco,mco,hco,gco,Aco,yco,bco,Eco,Ico,vco,Cco,xco,wco,Sco,Tco,Oco,Pco,Bco,Rco,Dco,kco,Fco,Nco,kPr,jco,zco,Qco,Mco,Lco,_co,Uco,Vco,Gco,qco,Wco,FPr,Hco,DPr,kLt=h(()=>{"use strict";DLt();Ya();ted={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},pco=(e,t,r,n)=>{let i=r;i.type="string";let{minimum:o,maximum:s,format:a,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof o=="number"&&(i.minLength=o),typeof s=="number"&&(i.maxLength=s),a&&(i.format=ted[a]??a,i.format===""&&delete i.format,a==="time"&&delete i.format),u&&(i.contentEncoding=u),c&&c.size>0){let l=[...c];l.length===1?i.pattern=l[0].source:l.length>1&&(i.allOf=[...l.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},fco=(e,t,r,n)=>{let i=r,{minimum:o,maximum:s,format:a,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:l}=e._zod.bag;typeof a=="string"&&a.includes("int")?i.type="integer":i.type="number",typeof l=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l),typeof o=="number"&&(i.minimum=o,typeof l=="number"&&t.target!=="draft-04"&&(l>=o?delete i.minimum:delete i.exclusiveMinimum)),typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.maximum=u,i.exclusiveMaximum=!0):i.exclusiveMaximum=u),typeof s=="number"&&(i.maximum=s,typeof u=="number"&&t.target!=="draft-04"&&(u<=s?delete i.maximum:delete i.exclusiveMaximum)),typeof c=="number"&&(i.multipleOf=c)},dco=(e,t,r,n)=>{r.type="boolean"},mco=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},hco=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},gco=(e,t,r,n)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},Aco=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},yco=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},bco=(e,t,r,n)=>{r.not={}},Eco=(e,t,r,n)=>{},Ico=(e,t,r,n)=>{},vco=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Cco=(e,t,r,n)=>{let i=e._zod.def,o=dLt(i.entries);o.every(s=>typeof s=="number")&&(r.type="number"),o.every(s=>typeof s=="string")&&(r.type="string"),r.enum=o},xco=(e,t,r,n)=>{let i=e._zod.def,o=[];for(let s of i.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(s))}else o.push(s);if(o.length!==0)if(o.length===1){let s=o[0];r.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[s]:r.const=s}else o.every(s=>typeof s=="number")&&(r.type="number"),o.every(s=>typeof s=="string")&&(r.type="string"),o.every(s=>typeof s=="boolean")&&(r.type="boolean"),o.every(s=>s===null)&&(r.type="null"),r.enum=o},wco=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Sco=(e,t,r,n)=>{let i=r,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");i.type="string",i.pattern=o.source},Tco=(e,t,r,n)=>{let i=r,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:a,mime:c}=e._zod.bag;s!==void 0&&(o.minLength=s),a!==void 0&&(o.maxLength=a),c?c.length===1?(o.contentMediaType=c[0],Object.assign(i,o)):(Object.assign(i,o),i.anyOf=c.map(u=>({contentMediaType:u}))):Object.assign(i,o)},Oco=(e,t,r,n)=>{r.type="boolean"},Pco=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Bco=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Rco=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Dco=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},kco=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Fco=(e,t,r,n)=>{let i=r,o=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;typeof s=="number"&&(i.minItems=s),typeof a=="number"&&(i.maxItems=a),i.type="array",i.items=mg(o.element,t,{...n,path:[...n.path,"items"]})},Nco=(e,t,r,n)=>{let i=r,o=e._zod.def;i.type="object",i.properties={};let s=o.shape;for(let u in s)i.properties[u]=mg(s[u],t,{...n,path:[...n.path,"properties",u]});let a=new Set(Object.keys(s)),c=new Set([...a].filter(u=>{let l=o.shape[u]._zod;return t.io==="input"?l.optin===void 0:l.optout===void 0}));c.size>0&&(i.required=Array.from(c)),o.catchall?._zod.def.type==="never"?i.additionalProperties=!1:o.catchall?o.catchall&&(i.additionalProperties=mg(o.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},kPr=(e,t,r,n)=>{let i=e._zod.def,o=i.inclusive===!1,s=i.options.map((a,c)=>mg(a,t,{...n,path:[...n.path,o?"oneOf":"anyOf",c]}));o?r.oneOf=s:r.anyOf=s},jco=(e,t,r,n)=>{let i=e._zod.def,o=mg(i.left,t,{...n,path:[...n.path,"allOf",0]}),s=mg(i.right,t,{...n,path:[...n.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,c=[...a(o)?o.allOf:[o],...a(s)?s.allOf:[s]];r.allOf=c},zco=(e,t,r,n)=>{let i=r,o=e._zod.def;i.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",a=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=o.items.map((f,d)=>mg(f,t,{...n,path:[...n.path,s,d]})),u=o.rest?mg(o.rest,t,{...n,path:[...n.path,a,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null;t.target==="draft-2020-12"?(i.prefixItems=c,u&&(i.items=u)):t.target==="openapi-3.0"?(i.items={anyOf:c},u&&i.items.anyOf.push(u),i.minItems=c.length,u||(i.maxItems=c.length)):(i.items=c,u&&(i.additionalItems=u));let{minimum:l,maximum:p}=e._zod.bag;typeof l=="number"&&(i.minItems=l),typeof p=="number"&&(i.maxItems=p)},Qco=(e,t,r,n)=>{let i=r,o=e._zod.def;i.type="object";let s=o.keyType,c=s._zod.bag?.patterns;if(o.mode==="loose"&&c&&c.size>0){let l=mg(o.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});i.patternProperties={};for(let p of c)i.patternProperties[p.source]=l}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(i.propertyNames=mg(o.keyType,t,{...n,path:[...n.path,"propertyNames"]})),i.additionalProperties=mg(o.valueType,t,{...n,path:[...n.path,"additionalProperties"]});let u=s._zod.values;if(u){let l=[...u].filter(p=>typeof p=="string"||typeof p=="number");l.length>0&&(i.required=l)}},Mco=(e,t,r,n)=>{let i=e._zod.def,o=mg(i.innerType,t,n),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=i.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}]},Lco=(e,t,r,n)=>{let i=e._zod.def;mg(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType},_co=(e,t,r,n)=>{let i=e._zod.def;mg(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},Uco=(e,t,r,n)=>{let i=e._zod.def;mg(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Vco=(e,t,r,n)=>{let i=e._zod.def;mg(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType;let s;try{s=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=s},Gco=(e,t,r,n)=>{let i=e._zod.def,o=t.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;mg(o,t,n);let s=t.seen.get(e);s.ref=o},qco=(e,t,r,n)=>{let i=e._zod.def;mg(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType,r.readOnly=!0},Wco=(e,t,r,n)=>{let i=e._zod.def;mg(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType},FPr=(e,t,r,n)=>{let i=e._zod.def;mg(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType},Hco=(e,t,r,n)=>{let i=e._zod.innerType;mg(i,t,n);let o=t.seen.get(e);o.ref=i},DPr={string:pco,number:fco,boolean:dco,bigint:mco,symbol:hco,null:gco,undefined:Aco,void:yco,never:bco,any:Eco,unknown:Ico,date:vco,enum:Cco,literal:xco,nan:wco,template_literal:Sco,file:Tco,success:Oco,custom:Pco,function:Bco,transform:Rco,map:Dco,set:kco,array:Fco,object:Nco,union:kPr,intersection:jco,tuple:zco,record:Qco,nullable:Mco,nonoptional:Lco,default:_co,prefault:Uco,catch:Vco,pipe:Gco,readonly:qco,promise:Wco,optional:FPr,lazy:Hco}});var jPr,Nsc=h(()=>{"use strict";kLt();DLt();jPr=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=MIe({processors:DPr,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return mg(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),LIe(this.ctx,t);let n=_Ie(this.ctx,t),{"~standard":i,...o}=n;return o}}});var jsc={};var zsc=h(()=>{"use strict"});var Ofe={};ee(Ofe,{$ZodAny:()=>Lso,$ZodArray:()=>qso,$ZodAsyncError:()=>jH,$ZodBase64:()=>Bso,$ZodBase64URL:()=>Rso,$ZodBigInt:()=>$Or,$ZodBigIntFormat:()=>jso,$ZodBoolean:()=>xLt,$ZodCIDRv4:()=>Tso,$ZodCIDRv6:()=>Oso,$ZodCUID:()=>hso,$ZodCUID2:()=>gso,$ZodCatch:()=>uao,$ZodCheck:()=>ly,$ZodCheckBigIntFormat:()=>Voo,$ZodCheckEndsWith:()=>tso,$ZodCheckGreaterThan:()=>qOr,$ZodCheckIncludes:()=>$oo,$ZodCheckLengthEquals:()=>Joo,$ZodCheckLessThan:()=>GOr,$ZodCheckLowerCase:()=>Xoo,$ZodCheckMaxLength:()=>Hoo,$ZodCheckMaxSize:()=>Goo,$ZodCheckMimeType:()=>nso,$ZodCheckMinLength:()=>Koo,$ZodCheckMinSize:()=>qoo,$ZodCheckMultipleOf:()=>_oo,$ZodCheckNumberFormat:()=>Uoo,$ZodCheckOverwrite:()=>iso,$ZodCheckProperty:()=>rso,$ZodCheckRegex:()=>Yoo,$ZodCheckSizeEquals:()=>Woo,$ZodCheckStartsWith:()=>eso,$ZodCheckStringFormat:()=>ftt,$ZodCheckUpperCase:()=>Zoo,$ZodCodec:()=>SLt,$ZodCustom:()=>Aao,$ZodCustomStringFormat:()=>Fso,$ZodDate:()=>Gso,$ZodDefault:()=>oao,$ZodDiscriminatedUnion:()=>Kso,$ZodE164:()=>Dso,$ZodEmail:()=>pso,$ZodEmoji:()=>dso,$ZodEncodeError:()=>DIe,$ZodEnum:()=>$so,$ZodError:()=>yLt,$ZodExactOptional:()=>nao,$ZodFile:()=>tao,$ZodFunction:()=>mao,$ZodGUID:()=>uso,$ZodIPv4:()=>xso,$ZodIPv6:()=>wso,$ZodISODate:()=>Iso,$ZodISODateTime:()=>Eso,$ZodISODuration:()=>Cso,$ZodISOTime:()=>vso,$ZodIntersection:()=>Jso,$ZodJWT:()=>kso,$ZodKSUID:()=>bso,$ZodLazy:()=>gao,$ZodLiteral:()=>eao,$ZodMAC:()=>Sso,$ZodMap:()=>Xso,$ZodNaN:()=>lao,$ZodNanoID:()=>mso,$ZodNever:()=>Uso,$ZodNonOptional:()=>aao,$ZodNull:()=>Mso,$ZodNullable:()=>iao,$ZodNumber:()=>ZOr,$ZodNumberFormat:()=>Nso,$ZodObject:()=>Vic,$ZodObjectJIT:()=>Wso,$ZodOptional:()=>tPr,$ZodPipe:()=>pao,$ZodPrefault:()=>sao,$ZodPromise:()=>hao,$ZodReadonly:()=>fao,$ZodRealError:()=>pQ,$ZodRecord:()=>Yso,$ZodRegistry:()=>oPr,$ZodSet:()=>Zso,$ZodString:()=>xLe,$ZodStringFormat:()=>NA,$ZodSuccess:()=>cao,$ZodSymbol:()=>zso,$ZodTemplateLiteral:()=>dao,$ZodTransform:()=>rao,$ZodTuple:()=>ePr,$ZodType:()=>nl,$ZodULID:()=>Aso,$ZodURL:()=>fso,$ZodUUID:()=>lso,$ZodUndefined:()=>Qso,$ZodUnion:()=>wLt,$ZodUnknown:()=>_so,$ZodVoid:()=>Vso,$ZodXID:()=>yso,$ZodXor:()=>Hso,$brand:()=>OOr,$constructor:()=>Sr,$input:()=>xao,$output:()=>Cao,Doc:()=>CLt,JSONSchema:()=>jsc,JSONSchemaGenerator:()=>jPr,NEVER:()=>Yio,TimePrecision:()=>Oao,_any:()=>Jao,_array:()=>rco,_base64:()=>CPr,_base64url:()=>xPr,_bigint:()=>Uao,_boolean:()=>Lao,_catch:()=>J$f,_check:()=>ksc,_cidrv4:()=>IPr,_cidrv6:()=>vPr,_coercedBigint:()=>Vao,_coercedBoolean:()=>_ao,_coercedDate:()=>eco,_coercedNumber:()=>Fao,_coercedString:()=>Sao,_cuid:()=>mPr,_cuid2:()=>hPr,_custom:()=>ico,_date:()=>$ao,_decode:()=>FOr,_decodeAsync:()=>jOr,_default:()=>W$f,_discriminatedUnion:()=>F$f,_e164:()=>wPr,_email:()=>aPr,_emoji:()=>fPr,_encode:()=>kOr,_encodeAsync:()=>NOr,_endsWith:()=>btt,_enum:()=>L$f,_file:()=>nco,_float32:()=>jao,_float64:()=>zao,_gt:()=>m$,_gte:()=>P2,_guid:()=>BLt,_includes:()=>Att,_int:()=>Nao,_int32:()=>Qao,_int64:()=>Gao,_intersection:()=>N$f,_ipv4:()=>bPr,_ipv6:()=>EPr,_isoDate:()=>Bao,_isoDateTime:()=>Pao,_isoDuration:()=>Dao,_isoTime:()=>Rao,_jwt:()=>SPr,_ksuid:()=>yPr,_lazy:()=>$$f,_length:()=>TLe,_literal:()=>U$f,_lowercase:()=>htt,_lt:()=>d$,_lte:()=>N3,_mac:()=>Tao,_map:()=>Q$f,_max:()=>N3,_maxLength:()=>SLe,_maxSize:()=>QIe,_mime:()=>Ett,_min:()=>P2,_minLength:()=>Tfe,_minSize:()=>h$,_multipleOf:()=>zIe,_nan:()=>tco,_nanoid:()=>dPr,_nativeEnum:()=>_$f,_negative:()=>OPr,_never:()=>Xao,_nonnegative:()=>BPr,_nonoptional:()=>H$f,_nonpositive:()=>PPr,_normalize:()=>Itt,_null:()=>Kao,_nullable:()=>q$f,_number:()=>kao,_optional:()=>G$f,_overwrite:()=>zH,_parse:()=>ctt,_parseAsync:()=>utt,_pipe:()=>Y$f,_positive:()=>TPr,_promise:()=>eed,_property:()=>RPr,_readonly:()=>X$f,_record:()=>z$f,_refine:()=>oco,_regex:()=>mtt,_safeDecode:()=>QOr,_safeDecodeAsync:()=>LOr,_safeEncode:()=>zOr,_safeEncodeAsync:()=>MOr,_safeParse:()=>ltt,_safeParseAsync:()=>ptt,_set:()=>M$f,_size:()=>wLe,_slugify:()=>wtt,_startsWith:()=>ytt,_string:()=>wao,_stringFormat:()=>Stt,_stringbool:()=>uco,_success:()=>K$f,_superRefine:()=>sco,_symbol:()=>Wao,_templateLiteral:()=>Z$f,_toLowerCase:()=>Ctt,_toUpperCase:()=>xtt,_transform:()=>V$f,_trim:()=>vtt,_tuple:()=>j$f,_uint32:()=>Mao,_uint64:()=>qao,_ulid:()=>gPr,_undefined:()=>Hao,_union:()=>D$f,_unknown:()=>Yao,_uppercase:()=>gtt,_url:()=>RLt,_uuid:()=>cPr,_uuidv4:()=>uPr,_uuidv6:()=>lPr,_uuidv7:()=>pPr,_void:()=>Zao,_xid:()=>APr,_xor:()=>k$f,clone:()=>O2,config:()=>fv,createStandardJSONSchemaMethod:()=>Ttt,createToJSONSchemaMethod:()=>lco,decode:()=>nZf,decodeAsync:()=>oZf,describe:()=>aco,encode:()=>rZf,encodeAsync:()=>iZf,extractDefs:()=>LIe,finalize:()=>_Ie,flattenError:()=>bLt,formatError:()=>ELt,globalConfig:()=>pLt,globalRegistry:()=>oB,initializeContext:()=>MIe,isValidBase64:()=>Pso,isValidBase64URL:()=>Mic,isValidJWT:()=>Lic,locales:()=>OLt,meta:()=>cco,parse:()=>ROr,parseAsync:()=>DOr,prettifyError:()=>coo,process:()=>mg,regexes:()=>UV,registry:()=>sPr,safeDecode:()=>aZf,safeDecodeAsync:()=>uZf,safeEncode:()=>sZf,safeEncodeAsync:()=>cZf,safeParse:()=>loo,safeParseAsync:()=>poo,toDotPath:()=>Iic,toJSONSchema:()=>NPr,treeifyError:()=>aoo,util:()=>Oi,version:()=>sso});var fQ=h(()=>{"use strict";itt();foo();uoo();yao();WOr();aso();Ya();VOr();vao();PLt();oso();Fsc();DLt();kLt();Nsc();zsc()});var zPr={};ee(zPr,{endsWith:()=>btt,gt:()=>m$,gte:()=>P2,includes:()=>Att,length:()=>TLe,lowercase:()=>htt,lt:()=>d$,lte:()=>N3,maxLength:()=>SLe,maxSize:()=>QIe,mime:()=>Ett,minLength:()=>Tfe,minSize:()=>h$,multipleOf:()=>zIe,negative:()=>OPr,nonnegative:()=>BPr,nonpositive:()=>PPr,normalize:()=>Itt,overwrite:()=>zH,positive:()=>TPr,property:()=>RPr,regex:()=>mtt,size:()=>wLe,slugify:()=>wtt,startsWith:()=>ytt,toLowerCase:()=>Ctt,toUpperCase:()=>xtt,trim:()=>vtt,uppercase:()=>gtt});var QPr=h(()=>{"use strict";fQ()});var Ott={};ee(Ott,{ZodISODate:()=>LPr,ZodISODateTime:()=>MPr,ZodISODuration:()=>UPr,ZodISOTime:()=>_Pr,date:()=>Jco,datetime:()=>Kco,duration:()=>Xco,time:()=>Yco});function Kco(e){return Pao(MPr,e)}function Jco(e){return Bao(LPr,e)}function Yco(e){return Rao(_Pr,e)}function Xco(e){return Dao(UPr,e)}var MPr,LPr,_Pr,UPr,FLt=h(()=>{"use strict";fQ();jLt();MPr=Sr("ZodISODateTime",(e,t)=>{Eso.init(e,t),jA.init(e,t)});LPr=Sr("ZodISODate",(e,t)=>{Iso.init(e,t),jA.init(e,t)});_Pr=Sr("ZodISOTime",(e,t)=>{vso.init(e,t),jA.init(e,t)});UPr=Sr("ZodISODuration",(e,t)=>{Cso.init(e,t),jA.init(e,t)})});var Qsc,ned,dQ,Zco=h(()=>{"use strict";fQ();fQ();Ya();Qsc=(e,t)=>{yLt.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>ELt(e,r)},flatten:{value:r=>bLt(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,ott,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,ott,2)}},isEmpty:{get(){return e.issues.length===0}}})},ned=Sr("ZodError",Qsc),dQ=Sr("ZodError",Qsc,{Parent:Error})});var $co,euo,tuo,ruo,nuo,iuo,ouo,suo,auo,cuo,uuo,luo,puo=h(()=>{"use strict";fQ();Zco();$co=ctt(dQ),euo=utt(dQ),tuo=ltt(dQ),ruo=ptt(dQ),nuo=kOr(dQ),iuo=FOr(dQ),ouo=NOr(dQ),suo=jOr(dQ),auo=zOr(dQ),cuo=QOr(dQ),uuo=MOr(dQ),luo=LOr(dQ)});var NLt={};ee(NLt,{ZodAny:()=>buo,ZodArray:()=>Cuo,ZodBase64:()=>iBr,ZodBase64URL:()=>oBr,ZodBigInt:()=>Ftt,ZodBigIntFormat:()=>cBr,ZodBoolean:()=>ktt,ZodCIDRv4:()=>rBr,ZodCIDRv6:()=>nBr,ZodCUID:()=>JPr,ZodCUID2:()=>YPr,ZodCatch:()=>quo,ZodCodec:()=>gBr,ZodCustom:()=>HLt,ZodCustomStringFormat:()=>Rtt,ZodDate:()=>ULt,ZodDefault:()=>Muo,ZodDiscriminatedUnion:()=>wuo,ZodE164:()=>sBr,ZodEmail:()=>WPr,ZodEmoji:()=>HPr,ZodEnum:()=>Ptt,ZodExactOptional:()=>juo,ZodFile:()=>Fuo,ZodFunction:()=>elo,ZodGUID:()=>zLt,ZodIPv4:()=>eBr,ZodIPv6:()=>tBr,ZodIntersection:()=>Suo,ZodJWT:()=>aBr,ZodKSUID:()=>$Pr,ZodLazy:()=>Xuo,ZodLiteral:()=>kuo,ZodMAC:()=>fuo,ZodMap:()=>Ruo,ZodNaN:()=>Huo,ZodNanoID:()=>KPr,ZodNever:()=>Iuo,ZodNonOptional:()=>mBr,ZodNull:()=>Auo,ZodNullable:()=>Quo,ZodNumber:()=>Dtt,ZodNumberFormat:()=>PLe,ZodObject:()=>GLt,ZodOptional:()=>dBr,ZodPipe:()=>hBr,ZodPrefault:()=>_uo,ZodPromise:()=>$uo,ZodReadonly:()=>Kuo,ZodRecord:()=>WLt,ZodSet:()=>Duo,ZodString:()=>Btt,ZodStringFormat:()=>jA,ZodSuccess:()=>Guo,ZodSymbol:()=>huo,ZodTemplateLiteral:()=>Yuo,ZodTransform:()=>Nuo,ZodTuple:()=>Ouo,ZodType:()=>Cp,ZodULID:()=>XPr,ZodURL:()=>_Lt,ZodUUID:()=>g$,ZodUndefined:()=>guo,ZodUnion:()=>qLt,ZodUnknown:()=>Euo,ZodVoid:()=>vuo,ZodXID:()=>ZPr,ZodXor:()=>xuo,_ZodString:()=>qPr,_default:()=>Luo,_function:()=>Gac,any:()=>vac,array:()=>VLt,base64:()=>oac,base64url:()=>sac,bigint:()=>Aac,boolean:()=>muo,catch:()=>Wuo,check:()=>qac,cidrv4:()=>nac,cidrv6:()=>iac,codec:()=>_ac,cuid:()=>Jsc,cuid2:()=>Ysc,custom:()=>Wac,date:()=>xac,describe:()=>Hac,discriminatedUnion:()=>Bac,e164:()=>aac,email:()=>Msc,emoji:()=>Hsc,enum:()=>pBr,exactOptional:()=>zuo,file:()=>zac,float32:()=>dac,float64:()=>mac,function:()=>Gac,guid:()=>Lsc,hash:()=>fac,hex:()=>pac,hostname:()=>lac,httpUrl:()=>Wsc,instanceof:()=>Jac,int:()=>GPr,int32:()=>hac,int64:()=>yac,intersection:()=>Tuo,ipv4:()=>eac,ipv6:()=>rac,json:()=>Xac,jwt:()=>cac,keyof:()=>wac,ksuid:()=>$sc,lazy:()=>Zuo,literal:()=>jac,looseObject:()=>Oac,looseRecord:()=>Dac,mac:()=>tac,map:()=>kac,meta:()=>Kac,nan:()=>Lac,nanoid:()=>Ksc,nativeEnum:()=>Nac,never:()=>uBr,nonoptional:()=>Vuo,null:()=>yuo,nullable:()=>MLt,nullish:()=>Qac,number:()=>duo,object:()=>Sac,optional:()=>QLt,partialRecord:()=>Rac,pipe:()=>LLt,prefault:()=>Uuo,preprocess:()=>Zac,promise:()=>Vac,readonly:()=>Juo,record:()=>Buo,refine:()=>tlo,set:()=>Fac,strictObject:()=>Tac,string:()=>VPr,stringFormat:()=>uac,stringbool:()=>Yac,success:()=>Mac,superRefine:()=>rlo,symbol:()=>Eac,templateLiteral:()=>Uac,transform:()=>fBr,tuple:()=>Puo,uint32:()=>gac,uint64:()=>bac,ulid:()=>Xsc,undefined:()=>Iac,union:()=>lBr,unknown:()=>OLe,url:()=>qsc,uuid:()=>_sc,uuidv4:()=>Usc,uuidv6:()=>Vsc,uuidv7:()=>Gsc,void:()=>Cac,xid:()=>Zsc,xor:()=>Pac});function VPr(e){return wao(Btt,e)}function Msc(e){return aPr(WPr,e)}function Lsc(e){return BLt(zLt,e)}function _sc(e){return cPr(g$,e)}function Usc(e){return uPr(g$,e)}function Vsc(e){return lPr(g$,e)}function Gsc(e){return pPr(g$,e)}function qsc(e){return RLt(_Lt,e)}function Wsc(e){return RLt(_Lt,{protocol:/^https?$/,hostname:UV.domain,...Oi.normalizeParams(e)})}function Hsc(e){return fPr(HPr,e)}function Ksc(e){return dPr(KPr,e)}function Jsc(e){return mPr(JPr,e)}function Ysc(e){return hPr(YPr,e)}function Xsc(e){return gPr(XPr,e)}function Zsc(e){return APr(ZPr,e)}function $sc(e){return yPr($Pr,e)}function eac(e){return bPr(eBr,e)}function tac(e){return Tao(fuo,e)}function rac(e){return EPr(tBr,e)}function nac(e){return IPr(rBr,e)}function iac(e){return vPr(nBr,e)}function oac(e){return CPr(iBr,e)}function sac(e){return xPr(oBr,e)}function aac(e){return wPr(sBr,e)}function cac(e){return SPr(aBr,e)}function uac(e,t,r={}){return Stt(Rtt,e,t,r)}function lac(e){return Stt(Rtt,"hostname",UV.hostname,e)}function pac(e){return Stt(Rtt,"hex",UV.hex,e)}function fac(e,t){let r=t?.enc??"hex",n=`${e}_${r}`,i=UV[n];if(!i)throw new Error(`Unrecognized hash format: ${n}`);return Stt(Rtt,n,i,t)}function duo(e){return kao(Dtt,e)}function GPr(e){return Nao(PLe,e)}function dac(e){return jao(PLe,e)}function mac(e){return zao(PLe,e)}function hac(e){return Qao(PLe,e)}function gac(e){return Mao(PLe,e)}function muo(e){return Lao(ktt,e)}function Aac(e){return Uao(Ftt,e)}function yac(e){return Gao(cBr,e)}function bac(e){return qao(cBr,e)}function Eac(e){return Wao(huo,e)}function Iac(e){return Hao(guo,e)}function yuo(e){return Kao(Auo,e)}function vac(){return Jao(buo)}function OLe(){return Yao(Euo)}function uBr(e){return Xao(Iuo,e)}function Cac(e){return Zao(vuo,e)}function xac(e){return $ao(ULt,e)}function VLt(e,t){return rco(Cuo,e,t)}function wac(e){let t=e._zod.def.shape;return pBr(Object.keys(t))}function Sac(e,t){let r={type:"object",shape:e??{},...Oi.normalizeParams(t)};return new GLt(r)}function Tac(e,t){return new GLt({type:"object",shape:e,catchall:uBr(),...Oi.normalizeParams(t)})}function Oac(e,t){return new GLt({type:"object",shape:e,catchall:OLe(),...Oi.normalizeParams(t)})}function lBr(e,t){return new qLt({type:"union",options:e,...Oi.normalizeParams(t)})}function Pac(e,t){return new xuo({type:"union",options:e,inclusive:!1,...Oi.normalizeParams(t)})}function Bac(e,t,r){return new wuo({type:"union",options:t,discriminator:e,...Oi.normalizeParams(r)})}function Tuo(e,t){return new Suo({type:"intersection",left:e,right:t})}function Puo(e,t,r){let n=t instanceof nl,i=n?r:t,o=n?t:null;return new Ouo({type:"tuple",items:e,rest:o,...Oi.normalizeParams(i)})}function Buo(e,t,r){return new WLt({type:"record",keyType:e,valueType:t,...Oi.normalizeParams(r)})}function Rac(e,t,r){let n=O2(e);return n._zod.values=void 0,new WLt({type:"record",keyType:n,valueType:t,...Oi.normalizeParams(r)})}function Dac(e,t,r){return new WLt({type:"record",keyType:e,valueType:t,mode:"loose",...Oi.normalizeParams(r)})}function kac(e,t,r){return new Ruo({type:"map",keyType:e,valueType:t,...Oi.normalizeParams(r)})}function Fac(e,t){return new Duo({type:"set",valueType:e,...Oi.normalizeParams(t)})}function pBr(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Ptt({type:"enum",entries:r,...Oi.normalizeParams(t)})}function Nac(e,t){return new Ptt({type:"enum",entries:e,...Oi.normalizeParams(t)})}function jac(e,t){return new kuo({type:"literal",values:Array.isArray(e)?e:[e],...Oi.normalizeParams(t)})}function zac(e){return nco(Fuo,e)}function fBr(e){return new Nuo({type:"transform",transform:e})}function QLt(e){return new dBr({type:"optional",innerType:e})}function zuo(e){return new juo({type:"optional",innerType:e})}function MLt(e){return new Quo({type:"nullable",innerType:e})}function Qac(e){return QLt(MLt(e))}function Luo(e,t){return new Muo({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Oi.shallowClone(t)}})}function Uuo(e,t){return new _uo({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Oi.shallowClone(t)}})}function Vuo(e,t){return new mBr({type:"nonoptional",innerType:e,...Oi.normalizeParams(t)})}function Mac(e){return new Guo({type:"success",innerType:e})}function Wuo(e,t){return new quo({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function Lac(e){return tco(Huo,e)}function LLt(e,t){return new hBr({type:"pipe",in:e,out:t})}function _ac(e,t,r){return new gBr({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function Juo(e){return new Kuo({type:"readonly",innerType:e})}function Uac(e,t){return new Yuo({type:"template_literal",parts:e,...Oi.normalizeParams(t)})}function Zuo(e){return new Xuo({type:"lazy",getter:e})}function Vac(e){return new $uo({type:"promise",innerType:e})}function Gac(e){return new elo({type:"function",input:Array.isArray(e?.input)?Puo(e?.input):e?.input??VLt(OLe()),output:e?.output??OLe()})}function qac(e){let t=new ly({check:"custom"});return t._zod.check=e,t}function Wac(e,t){return ico(HLt,e??(()=>!0),t)}function tlo(e,t={}){return oco(HLt,e,t)}function rlo(e){return sco(e)}function Jac(e,t={}){let r=new HLt({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...Oi.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=n=>{n.value instanceof e||n.issues.push({code:"invalid_type",expected:e.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}function Xac(e){let t=Zuo(()=>lBr([VPr(e),duo(),muo(),yuo(),VLt(t),Buo(VPr(),t)]));return t}function Zac(e,t){return LLt(fBr(e),t)}var Cp,qPr,Btt,jA,WPr,zLt,g$,_Lt,HPr,KPr,JPr,YPr,XPr,ZPr,$Pr,eBr,fuo,tBr,rBr,nBr,iBr,oBr,sBr,aBr,Rtt,Dtt,PLe,ktt,Ftt,cBr,huo,guo,Auo,buo,Euo,Iuo,vuo,ULt,Cuo,GLt,qLt,xuo,wuo,Suo,Ouo,WLt,Ruo,Duo,Ptt,kuo,Fuo,Nuo,dBr,juo,Quo,Muo,_uo,mBr,Guo,quo,Huo,hBr,gBr,Kuo,Yuo,Xuo,$uo,elo,HLt,Hac,Kac,Yac,jLt=h(()=>{"use strict";fQ();fQ();kLt();DLt();QPr();FLt();puo();Cp=Sr("ZodType",(e,t)=>(nl.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ttt(e,"input"),output:Ttt(e,"output")}}),e.toJSONSchema=lco(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(Oi.mergeDefs(t,{checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0}),e.with=e.check,e.clone=(r,n)=>O2(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>$co(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>tuo(e,r,n),e.parseAsync=async(r,n)=>euo(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>ruo(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>nuo(e,r,n),e.decode=(r,n)=>iuo(e,r,n),e.encodeAsync=async(r,n)=>ouo(e,r,n),e.decodeAsync=async(r,n)=>suo(e,r,n),e.safeEncode=(r,n)=>auo(e,r,n),e.safeDecode=(r,n)=>cuo(e,r,n),e.safeEncodeAsync=async(r,n)=>uuo(e,r,n),e.safeDecodeAsync=async(r,n)=>luo(e,r,n),e.refine=(r,n)=>e.check(tlo(r,n)),e.superRefine=r=>e.check(rlo(r)),e.overwrite=r=>e.check(zH(r)),e.optional=()=>QLt(e),e.exactOptional=()=>zuo(e),e.nullable=()=>MLt(e),e.nullish=()=>QLt(MLt(e)),e.nonoptional=r=>Vuo(e,r),e.array=()=>VLt(e),e.or=r=>lBr([e,r]),e.and=r=>Tuo(e,r),e.transform=r=>LLt(e,fBr(r)),e.default=r=>Luo(e,r),e.prefault=r=>Uuo(e,r),e.catch=r=>Wuo(e,r),e.pipe=r=>LLt(e,r),e.readonly=()=>Juo(e),e.describe=r=>{let n=e.clone();return oB.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return oB.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return oB.get(e);let n=e.clone();return oB.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),qPr=Sr("_ZodString",(e,t)=>{xLe.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>pco(e,n,i,o);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(mtt(...n)),e.includes=(...n)=>e.check(Att(...n)),e.startsWith=(...n)=>e.check(ytt(...n)),e.endsWith=(...n)=>e.check(btt(...n)),e.min=(...n)=>e.check(Tfe(...n)),e.max=(...n)=>e.check(SLe(...n)),e.length=(...n)=>e.check(TLe(...n)),e.nonempty=(...n)=>e.check(Tfe(1,...n)),e.lowercase=n=>e.check(htt(n)),e.uppercase=n=>e.check(gtt(n)),e.trim=()=>e.check(vtt()),e.normalize=(...n)=>e.check(Itt(...n)),e.toLowerCase=()=>e.check(Ctt()),e.toUpperCase=()=>e.check(xtt()),e.slugify=()=>e.check(wtt())}),Btt=Sr("ZodString",(e,t)=>{xLe.init(e,t),qPr.init(e,t),e.email=r=>e.check(aPr(WPr,r)),e.url=r=>e.check(RLt(_Lt,r)),e.jwt=r=>e.check(SPr(aBr,r)),e.emoji=r=>e.check(fPr(HPr,r)),e.guid=r=>e.check(BLt(zLt,r)),e.uuid=r=>e.check(cPr(g$,r)),e.uuidv4=r=>e.check(uPr(g$,r)),e.uuidv6=r=>e.check(lPr(g$,r)),e.uuidv7=r=>e.check(pPr(g$,r)),e.nanoid=r=>e.check(dPr(KPr,r)),e.guid=r=>e.check(BLt(zLt,r)),e.cuid=r=>e.check(mPr(JPr,r)),e.cuid2=r=>e.check(hPr(YPr,r)),e.ulid=r=>e.check(gPr(XPr,r)),e.base64=r=>e.check(CPr(iBr,r)),e.base64url=r=>e.check(xPr(oBr,r)),e.xid=r=>e.check(APr(ZPr,r)),e.ksuid=r=>e.check(yPr($Pr,r)),e.ipv4=r=>e.check(bPr(eBr,r)),e.ipv6=r=>e.check(EPr(tBr,r)),e.cidrv4=r=>e.check(IPr(rBr,r)),e.cidrv6=r=>e.check(vPr(nBr,r)),e.e164=r=>e.check(wPr(sBr,r)),e.datetime=r=>e.check(Kco(r)),e.date=r=>e.check(Jco(r)),e.time=r=>e.check(Yco(r)),e.duration=r=>e.check(Xco(r))});jA=Sr("ZodStringFormat",(e,t)=>{NA.init(e,t),qPr.init(e,t)}),WPr=Sr("ZodEmail",(e,t)=>{pso.init(e,t),jA.init(e,t)});zLt=Sr("ZodGUID",(e,t)=>{uso.init(e,t),jA.init(e,t)});g$=Sr("ZodUUID",(e,t)=>{lso.init(e,t),jA.init(e,t)});_Lt=Sr("ZodURL",(e,t)=>{fso.init(e,t),jA.init(e,t)});HPr=Sr("ZodEmoji",(e,t)=>{dso.init(e,t),jA.init(e,t)});KPr=Sr("ZodNanoID",(e,t)=>{mso.init(e,t),jA.init(e,t)});JPr=Sr("ZodCUID",(e,t)=>{hso.init(e,t),jA.init(e,t)});YPr=Sr("ZodCUID2",(e,t)=>{gso.init(e,t),jA.init(e,t)});XPr=Sr("ZodULID",(e,t)=>{Aso.init(e,t),jA.init(e,t)});ZPr=Sr("ZodXID",(e,t)=>{yso.init(e,t),jA.init(e,t)});$Pr=Sr("ZodKSUID",(e,t)=>{bso.init(e,t),jA.init(e,t)});eBr=Sr("ZodIPv4",(e,t)=>{xso.init(e,t),jA.init(e,t)});fuo=Sr("ZodMAC",(e,t)=>{Sso.init(e,t),jA.init(e,t)});tBr=Sr("ZodIPv6",(e,t)=>{wso.init(e,t),jA.init(e,t)});rBr=Sr("ZodCIDRv4",(e,t)=>{Tso.init(e,t),jA.init(e,t)});nBr=Sr("ZodCIDRv6",(e,t)=>{Oso.init(e,t),jA.init(e,t)});iBr=Sr("ZodBase64",(e,t)=>{Bso.init(e,t),jA.init(e,t)});oBr=Sr("ZodBase64URL",(e,t)=>{Rso.init(e,t),jA.init(e,t)});sBr=Sr("ZodE164",(e,t)=>{Dso.init(e,t),jA.init(e,t)});aBr=Sr("ZodJWT",(e,t)=>{kso.init(e,t),jA.init(e,t)});Rtt=Sr("ZodCustomStringFormat",(e,t)=>{Fso.init(e,t),jA.init(e,t)});Dtt=Sr("ZodNumber",(e,t)=>{ZOr.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>fco(e,n,i,o),e.gt=(n,i)=>e.check(m$(n,i)),e.gte=(n,i)=>e.check(P2(n,i)),e.min=(n,i)=>e.check(P2(n,i)),e.lt=(n,i)=>e.check(d$(n,i)),e.lte=(n,i)=>e.check(N3(n,i)),e.max=(n,i)=>e.check(N3(n,i)),e.int=n=>e.check(GPr(n)),e.safe=n=>e.check(GPr(n)),e.positive=n=>e.check(m$(0,n)),e.nonnegative=n=>e.check(P2(0,n)),e.negative=n=>e.check(d$(0,n)),e.nonpositive=n=>e.check(N3(0,n)),e.multipleOf=(n,i)=>e.check(zIe(n,i)),e.step=(n,i)=>e.check(zIe(n,i)),e.finite=()=>e;let 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});PLe=Sr("ZodNumberFormat",(e,t)=>{Nso.init(e,t),Dtt.init(e,t)});ktt=Sr("ZodBoolean",(e,t)=>{xLt.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>dco(e,r,n,i)});Ftt=Sr("ZodBigInt",(e,t)=>{$Or.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>mco(e,n,i,o),e.gte=(n,i)=>e.check(P2(n,i)),e.min=(n,i)=>e.check(P2(n,i)),e.gt=(n,i)=>e.check(m$(n,i)),e.gte=(n,i)=>e.check(P2(n,i)),e.min=(n,i)=>e.check(P2(n,i)),e.lt=(n,i)=>e.check(d$(n,i)),e.lte=(n,i)=>e.check(N3(n,i)),e.max=(n,i)=>e.check(N3(n,i)),e.positive=n=>e.check(m$(BigInt(0),n)),e.negative=n=>e.check(d$(BigInt(0),n)),e.nonpositive=n=>e.check(N3(BigInt(0),n)),e.nonnegative=n=>e.check(P2(BigInt(0),n)),e.multipleOf=(n,i)=>e.check(zIe(n,i));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});cBr=Sr("ZodBigIntFormat",(e,t)=>{jso.init(e,t),Ftt.init(e,t)});huo=Sr("ZodSymbol",(e,t)=>{zso.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>hco(e,r,n,i)});guo=Sr("ZodUndefined",(e,t)=>{Qso.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Aco(e,r,n,i)});Auo=Sr("ZodNull",(e,t)=>{Mso.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>gco(e,r,n,i)});buo=Sr("ZodAny",(e,t)=>{Lso.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Eco(e,r,n,i)});Euo=Sr("ZodUnknown",(e,t)=>{_so.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Ico(e,r,n,i)});Iuo=Sr("ZodNever",(e,t)=>{Uso.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>bco(e,r,n,i)});vuo=Sr("ZodVoid",(e,t)=>{Vso.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>yco(e,r,n,i)});ULt=Sr("ZodDate",(e,t)=>{Gso.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>vco(e,n,i,o),e.min=(n,i)=>e.check(P2(n,i)),e.max=(n,i)=>e.check(N3(n,i));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});Cuo=Sr("ZodArray",(e,t)=>{qso.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Fco(e,r,n,i),e.element=t.element,e.min=(r,n)=>e.check(Tfe(r,n)),e.nonempty=r=>e.check(Tfe(1,r)),e.max=(r,n)=>e.check(SLe(r,n)),e.length=(r,n)=>e.check(TLe(r,n)),e.unwrap=()=>e.element});GLt=Sr("ZodObject",(e,t)=>{Wso.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Nco(e,r,n,i),Oi.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>pBr(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:OLe()}),e.loose=()=>e.clone({...e._zod.def,catchall:OLe()}),e.strict=()=>e.clone({...e._zod.def,catchall:uBr()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>Oi.extend(e,r),e.safeExtend=r=>Oi.safeExtend(e,r),e.merge=r=>Oi.merge(e,r),e.pick=r=>Oi.pick(e,r),e.omit=r=>Oi.omit(e,r),e.partial=(...r)=>Oi.partial(dBr,e,r[0]),e.required=(...r)=>Oi.required(mBr,e,r[0])});qLt=Sr("ZodUnion",(e,t)=>{wLt.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>kPr(e,r,n,i),e.options=t.options});xuo=Sr("ZodXor",(e,t)=>{qLt.init(e,t),Hso.init(e,t),e._zod.processJSONSchema=(r,n,i)=>kPr(e,r,n,i),e.options=t.options});wuo=Sr("ZodDiscriminatedUnion",(e,t)=>{qLt.init(e,t),Kso.init(e,t)});Suo=Sr("ZodIntersection",(e,t)=>{Jso.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>jco(e,r,n,i)});Ouo=Sr("ZodTuple",(e,t)=>{ePr.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>zco(e,r,n,i),e.rest=r=>e.clone({...e._zod.def,rest:r})});WLt=Sr("ZodRecord",(e,t)=>{Yso.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Qco(e,r,n,i),e.keyType=t.keyType,e.valueType=t.valueType});Ruo=Sr("ZodMap",(e,t)=>{Xso.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Dco(e,r,n,i),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(h$(...r)),e.nonempty=r=>e.check(h$(1,r)),e.max=(...r)=>e.check(QIe(...r)),e.size=(...r)=>e.check(wLe(...r))});Duo=Sr("ZodSet",(e,t)=>{Zso.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>kco(e,r,n,i),e.min=(...r)=>e.check(h$(...r)),e.nonempty=r=>e.check(h$(1,r)),e.max=(...r)=>e.check(QIe(...r)),e.size=(...r)=>e.check(wLe(...r))});Ptt=Sr("ZodEnum",(e,t)=>{$so.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>Cco(e,n,i,o),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(n,i)=>{let o={};for(let s of n)if(r.has(s))o[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Ptt({...t,checks:[],...Oi.normalizeParams(i),entries:o})},e.exclude=(n,i)=>{let o={...t.entries};for(let s of n)if(r.has(s))delete o[s];else throw new Error(`Key ${s} not found in enum`);return new Ptt({...t,checks:[],...Oi.normalizeParams(i),entries:o})}});kuo=Sr("ZodLiteral",(e,t)=>{eao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>xco(e,r,n,i),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]}})});Fuo=Sr("ZodFile",(e,t)=>{tao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Tco(e,r,n,i),e.min=(r,n)=>e.check(h$(r,n)),e.max=(r,n)=>e.check(QIe(r,n)),e.mime=(r,n)=>e.check(Ett(Array.isArray(r)?r:[r],n))});Nuo=Sr("ZodTransform",(e,t)=>{rao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Rco(e,r,n,i),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new DIe(e.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(Oi.issue(o,r.value,t));else{let s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(Oi.issue(s))}};let i=t.transform(r.value,r);return i instanceof Promise?i.then(o=>(r.value=o,r)):(r.value=i,r)}});dBr=Sr("ZodOptional",(e,t)=>{tPr.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>FPr(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});juo=Sr("ZodExactOptional",(e,t)=>{nao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>FPr(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});Quo=Sr("ZodNullable",(e,t)=>{iao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Mco(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});Muo=Sr("ZodDefault",(e,t)=>{oao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>_co(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});_uo=Sr("ZodPrefault",(e,t)=>{sao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Uco(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});mBr=Sr("ZodNonOptional",(e,t)=>{aao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Lco(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});Guo=Sr("ZodSuccess",(e,t)=>{cao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Oco(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});quo=Sr("ZodCatch",(e,t)=>{uao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Vco(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});Huo=Sr("ZodNaN",(e,t)=>{lao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>wco(e,r,n,i)});hBr=Sr("ZodPipe",(e,t)=>{pao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Gco(e,r,n,i),e.in=t.in,e.out=t.out});gBr=Sr("ZodCodec",(e,t)=>{hBr.init(e,t),SLt.init(e,t)});Kuo=Sr("ZodReadonly",(e,t)=>{fao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>qco(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});Yuo=Sr("ZodTemplateLiteral",(e,t)=>{dao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Sco(e,r,n,i)});Xuo=Sr("ZodLazy",(e,t)=>{gao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Hco(e,r,n,i),e.unwrap=()=>e._zod.def.getter()});$uo=Sr("ZodPromise",(e,t)=>{hao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Wco(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});elo=Sr("ZodFunction",(e,t)=>{mao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Bco(e,r,n,i)});HLt=Sr("ZodCustom",(e,t)=>{Aao.init(e,t),Cp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Pco(e,r,n,i)});Hac=aco,Kac=cco;Yac=(...e)=>uco({Codec:gBr,Boolean:ktt,String:Btt},...e)});function sed(e){fv({customError:e})}function aed(){return fv().customError}var oed,nlo,$ac=h(()=>{"use strict";fQ();fQ();oed={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"};nlo||(nlo={})});function ued(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function led(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let n=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===n){let i=r[1];if(!i||!t.defs[i])throw new Error(`Reference not found: ${e}`);return t.defs[i]}throw new Error(`Reference not found: ${e}`)}function ecc(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return Lo.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let i=e.$ref;if(t.refs.has(i))return t.refs.get(i);if(t.processing.has(i))return Lo.lazy(()=>{if(!t.refs.has(i))throw new Error(`Circular reference not resolved: ${i}`);return t.refs.get(i)});t.processing.add(i);let o=led(i,t),s=fD(o,t);return t.refs.set(i,s),t.processing.delete(i),s}if(e.enum!==void 0){let i=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&i.length===1&&i[0]===null)return Lo.null();if(i.length===0)return Lo.never();if(i.length===1)return Lo.literal(i[0]);if(i.every(s=>typeof s=="string"))return Lo.enum(i);let o=i.map(s=>Lo.literal(s));return o.length<2?o[0]:Lo.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return Lo.literal(e.const);let r=e.type;if(Array.isArray(r)){let i=r.map(o=>{let s={...e,type:o};return ecc(s,t)});return i.length===0?Lo.never():i.length===1?i[0]:Lo.union(i)}if(!r)return Lo.any();let n;switch(r){case"string":{let i=Lo.string();if(e.format){let o=e.format;o==="email"?i=i.check(Lo.email()):o==="uri"||o==="uri-reference"?i=i.check(Lo.url()):o==="uuid"||o==="guid"?i=i.check(Lo.uuid()):o==="date-time"?i=i.check(Lo.iso.datetime()):o==="date"?i=i.check(Lo.iso.date()):o==="time"?i=i.check(Lo.iso.time()):o==="duration"?i=i.check(Lo.iso.duration()):o==="ipv4"?i=i.check(Lo.ipv4()):o==="ipv6"?i=i.check(Lo.ipv6()):o==="mac"?i=i.check(Lo.mac()):o==="cidr"?i=i.check(Lo.cidrv4()):o==="cidr-v6"?i=i.check(Lo.cidrv6()):o==="base64"?i=i.check(Lo.base64()):o==="base64url"?i=i.check(Lo.base64url()):o==="e164"?i=i.check(Lo.e164()):o==="jwt"?i=i.check(Lo.jwt()):o==="emoji"?i=i.check(Lo.emoji()):o==="nanoid"?i=i.check(Lo.nanoid()):o==="cuid"?i=i.check(Lo.cuid()):o==="cuid2"?i=i.check(Lo.cuid2()):o==="ulid"?i=i.check(Lo.ulid()):o==="xid"?i=i.check(Lo.xid()):o==="ksuid"&&(i=i.check(Lo.ksuid()))}typeof e.minLength=="number"&&(i=i.min(e.minLength)),typeof e.maxLength=="number"&&(i=i.max(e.maxLength)),e.pattern&&(i=i.regex(new RegExp(e.pattern))),n=i;break}case"number":case"integer":{let i=r==="integer"?Lo.number().int():Lo.number();typeof e.minimum=="number"&&(i=i.min(e.minimum)),typeof e.maximum=="number"&&(i=i.max(e.maximum)),typeof e.exclusiveMinimum=="number"?i=i.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(i=i.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?i=i.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(i=i.lt(e.maximum)),typeof e.multipleOf=="number"&&(i=i.multipleOf(e.multipleOf)),n=i;break}case"boolean":{n=Lo.boolean();break}case"null":{n=Lo.null();break}case"object":{let i={},o=e.properties||{},s=new Set(e.required||[]);for(let[c,u]of Object.entries(o)){let l=fD(u,t);i[c]=s.has(c)?l:l.optional()}if(e.propertyNames){let c=fD(e.propertyNames,t),u=e.additionalProperties&&typeof e.additionalProperties=="object"?fD(e.additionalProperties,t):Lo.any();if(Object.keys(i).length===0){n=Lo.record(c,u);break}let l=Lo.object(i).passthrough(),p=Lo.looseRecord(c,u);n=Lo.intersection(l,p);break}if(e.patternProperties){let c=e.patternProperties,u=Object.keys(c),l=[];for(let f of u){let d=fD(c[f],t),m=Lo.string().regex(new RegExp(f));l.push(Lo.looseRecord(m,d))}let p=[];if(Object.keys(i).length>0&&p.push(Lo.object(i).passthrough()),p.push(...l),p.length===0)n=Lo.object({}).passthrough();else if(p.length===1)n=p[0];else{let f=Lo.intersection(p[0],p[1]);for(let d=2;d<p.length;d++)f=Lo.intersection(f,p[d]);n=f}break}let a=Lo.object(i);e.additionalProperties===!1?n=a.strict():typeof e.additionalProperties=="object"?n=a.catchall(fD(e.additionalProperties,t)):n=a.passthrough();break}case"array":{let i=e.prefixItems,o=e.items;if(i&&Array.isArray(i)){let s=i.map(c=>fD(c,t)),a=o&&typeof o=="object"&&!Array.isArray(o)?fD(o,t):void 0;a?n=Lo.tuple(s).rest(a):n=Lo.tuple(s),typeof e.minItems=="number"&&(n=n.check(Lo.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(Lo.maxLength(e.maxItems)))}else if(Array.isArray(o)){let s=o.map(c=>fD(c,t)),a=e.additionalItems&&typeof e.additionalItems=="object"?fD(e.additionalItems,t):void 0;a?n=Lo.tuple(s).rest(a):n=Lo.tuple(s),typeof e.minItems=="number"&&(n=n.check(Lo.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(Lo.maxLength(e.maxItems)))}else if(o!==void 0){let s=fD(o,t),a=Lo.array(s);typeof e.minItems=="number"&&(a=a.min(e.minItems)),typeof e.maxItems=="number"&&(a=a.max(e.maxItems)),n=a}else n=Lo.array(Lo.any());break}default:throw new Error(`Unsupported type: ${r}`)}return e.description&&(n=n.describe(e.description)),e.default!==void 0&&(n=n.default(e.default)),n}function fD(e,t){if(typeof e=="boolean")return e?Lo.any():Lo.never();let r=ecc(e,t),n=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let a=e.anyOf.map(u=>fD(u,t)),c=Lo.union(a);r=n?Lo.intersection(r,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let a=e.oneOf.map(u=>fD(u,t)),c=Lo.xor(a);r=n?Lo.intersection(r,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=n?r:Lo.any();else{let a=n?r:fD(e.allOf[0],t),c=n?0:1;for(let u=c;u<e.allOf.length;u++)a=Lo.intersection(a,fD(e.allOf[u],t));r=a}e.nullable===!0&&t.version==="openapi-3.0"&&(r=Lo.nullable(r)),e.readOnly===!0&&(r=Lo.readonly(r));let i={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let a of o)a in e&&(i[a]=e[a]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let a of s)a in e&&(i[a]=e[a]);for(let a of Object.keys(e))ced.has(a)||(i[a]=e[a]);return Object.keys(i).length>0&&t.registry.add(r,i),r}function tcc(e,t){if(typeof e=="boolean")return e?Lo.any():Lo.never();let r=ued(e,t?.defaultTarget),n=e.$defs||e.definitions||{},i={version:r,defs:n,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??oB};return fD(e,i)}var Lo,ced,rcc=h(()=>{"use strict";PLt();QPr();FLt();jLt();Lo={...NLt,...zPr,iso:Ott},ced=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"])});var ilo={};ee(ilo,{bigint:()=>med,boolean:()=>ded,date:()=>hed,number:()=>fed,string:()=>ped});function ped(e){return Sao(Btt,e)}function fed(e){return Fao(Dtt,e)}function ded(e){return _ao(ktt,e)}function med(e){return Vao(Ftt,e)}function hed(e){return eco(ULt,e)}var ncc=h(()=>{"use strict";fQ();jLt()});var T={};ee(T,{$brand:()=>OOr,$input:()=>xao,$output:()=>Cao,NEVER:()=>Yio,TimePrecision:()=>Oao,ZodAny:()=>buo,ZodArray:()=>Cuo,ZodBase64:()=>iBr,ZodBase64URL:()=>oBr,ZodBigInt:()=>Ftt,ZodBigIntFormat:()=>cBr,ZodBoolean:()=>ktt,ZodCIDRv4:()=>rBr,ZodCIDRv6:()=>nBr,ZodCUID:()=>JPr,ZodCUID2:()=>YPr,ZodCatch:()=>quo,ZodCodec:()=>gBr,ZodCustom:()=>HLt,ZodCustomStringFormat:()=>Rtt,ZodDate:()=>ULt,ZodDefault:()=>Muo,ZodDiscriminatedUnion:()=>wuo,ZodE164:()=>sBr,ZodEmail:()=>WPr,ZodEmoji:()=>HPr,ZodEnum:()=>Ptt,ZodError:()=>ned,ZodExactOptional:()=>juo,ZodFile:()=>Fuo,ZodFirstPartyTypeKind:()=>nlo,ZodFunction:()=>elo,ZodGUID:()=>zLt,ZodIPv4:()=>eBr,ZodIPv6:()=>tBr,ZodISODate:()=>LPr,ZodISODateTime:()=>MPr,ZodISODuration:()=>UPr,ZodISOTime:()=>_Pr,ZodIntersection:()=>Suo,ZodIssueCode:()=>oed,ZodJWT:()=>aBr,ZodKSUID:()=>$Pr,ZodLazy:()=>Xuo,ZodLiteral:()=>kuo,ZodMAC:()=>fuo,ZodMap:()=>Ruo,ZodNaN:()=>Huo,ZodNanoID:()=>KPr,ZodNever:()=>Iuo,ZodNonOptional:()=>mBr,ZodNull:()=>Auo,ZodNullable:()=>Quo,ZodNumber:()=>Dtt,ZodNumberFormat:()=>PLe,ZodObject:()=>GLt,ZodOptional:()=>dBr,ZodPipe:()=>hBr,ZodPrefault:()=>_uo,ZodPromise:()=>$uo,ZodReadonly:()=>Kuo,ZodRealError:()=>dQ,ZodRecord:()=>WLt,ZodSet:()=>Duo,ZodString:()=>Btt,ZodStringFormat:()=>jA,ZodSuccess:()=>Guo,ZodSymbol:()=>huo,ZodTemplateLiteral:()=>Yuo,ZodTransform:()=>Nuo,ZodTuple:()=>Ouo,ZodType:()=>Cp,ZodULID:()=>XPr,ZodURL:()=>_Lt,ZodUUID:()=>g$,ZodUndefined:()=>guo,ZodUnion:()=>qLt,ZodUnknown:()=>Euo,ZodVoid:()=>vuo,ZodXID:()=>ZPr,ZodXor:()=>xuo,_ZodString:()=>qPr,_default:()=>Luo,_function:()=>Gac,any:()=>vac,array:()=>VLt,base64:()=>oac,base64url:()=>sac,bigint:()=>Aac,boolean:()=>muo,catch:()=>Wuo,check:()=>qac,cidrv4:()=>nac,cidrv6:()=>iac,clone:()=>O2,codec:()=>_ac,coerce:()=>ilo,config:()=>fv,core:()=>Ofe,cuid:()=>Jsc,cuid2:()=>Ysc,custom:()=>Wac,date:()=>xac,decode:()=>iuo,decodeAsync:()=>suo,describe:()=>Hac,discriminatedUnion:()=>Bac,e164:()=>aac,email:()=>Msc,emoji:()=>Hsc,encode:()=>nuo,encodeAsync:()=>ouo,endsWith:()=>btt,enum:()=>pBr,exactOptional:()=>zuo,file:()=>zac,flattenError:()=>bLt,float32:()=>dac,float64:()=>mac,formatError:()=>ELt,fromJSONSchema:()=>tcc,function:()=>Gac,getErrorMap:()=>aed,globalRegistry:()=>oB,gt:()=>m$,gte:()=>P2,guid:()=>Lsc,hash:()=>fac,hex:()=>pac,hostname:()=>lac,httpUrl:()=>Wsc,includes:()=>Att,instanceof:()=>Jac,int:()=>GPr,int32:()=>hac,int64:()=>yac,intersection:()=>Tuo,ipv4:()=>eac,ipv6:()=>rac,iso:()=>Ott,json:()=>Xac,jwt:()=>cac,keyof:()=>wac,ksuid:()=>$sc,lazy:()=>Zuo,length:()=>TLe,literal:()=>jac,locales:()=>OLt,looseObject:()=>Oac,looseRecord:()=>Dac,lowercase:()=>htt,lt:()=>d$,lte:()=>N3,mac:()=>tac,map:()=>kac,maxLength:()=>SLe,maxSize:()=>QIe,meta:()=>Kac,mime:()=>Ett,minLength:()=>Tfe,minSize:()=>h$,multipleOf:()=>zIe,nan:()=>Lac,nanoid:()=>Ksc,nativeEnum:()=>Nac,negative:()=>OPr,never:()=>uBr,nonnegative:()=>BPr,nonoptional:()=>Vuo,nonpositive:()=>PPr,normalize:()=>Itt,null:()=>yuo,nullable:()=>MLt,nullish:()=>Qac,number:()=>duo,object:()=>Sac,optional:()=>QLt,overwrite:()=>zH,parse:()=>$co,parseAsync:()=>euo,partialRecord:()=>Rac,pipe:()=>LLt,positive:()=>TPr,prefault:()=>Uuo,preprocess:()=>Zac,prettifyError:()=>coo,promise:()=>Vac,property:()=>RPr,readonly:()=>Juo,record:()=>Buo,refine:()=>tlo,regex:()=>mtt,regexes:()=>UV,registry:()=>sPr,safeDecode:()=>cuo,safeDecodeAsync:()=>luo,safeEncode:()=>auo,safeEncodeAsync:()=>uuo,safeParse:()=>tuo,safeParseAsync:()=>ruo,set:()=>Fac,setErrorMap:()=>sed,size:()=>wLe,slugify:()=>wtt,startsWith:()=>ytt,strictObject:()=>Tac,string:()=>VPr,stringFormat:()=>uac,stringbool:()=>Yac,success:()=>Mac,superRefine:()=>rlo,symbol:()=>Eac,templateLiteral:()=>Uac,toJSONSchema:()=>NPr,toLowerCase:()=>Ctt,toUpperCase:()=>xtt,transform:()=>fBr,treeifyError:()=>aoo,trim:()=>vtt,tuple:()=>Puo,uint32:()=>gac,uint64:()=>bac,ulid:()=>Xsc,undefined:()=>Iac,union:()=>lBr,unknown:()=>OLe,uppercase:()=>gtt,url:()=>qsc,util:()=>Oi,uuid:()=>_sc,uuidv4:()=>Usc,uuidv6:()=>Vsc,uuidv7:()=>Gsc,void:()=>Cac,xid:()=>Zsc,xor:()=>Pac});var olo=h(()=>{"use strict";fQ();jLt();QPr();Zco();puo();$ac();fQ();bao();fQ();kLt();rcc();vao();FLt();FLt();ncc();fv(rPr())});var ds=h(()=>{"use strict";olo();olo()});var icc=h(()=>{"use strict"});var Elo={};ee(Elo,{AIChatConfig:()=>clo,AIChatDatasource:()=>Kcc,AIChatLocation:()=>acc,AIChatModel:()=>ccc,AIChatWebsiteDatasource:()=>Hcc,AbsoluteProductPath:()=>flc,AgentsConfig:()=>Xcc,AiExamplesConfig:()=>Wcc,AnalyticsConfig:()=>qcc,AnnouncementConfig:()=>IBr,ApiReferenceConfiguration:()=>elc,ApiReferenceEndpointConfiguration:()=>Vuc,ApiReferenceLayout:()=>Ecc,ApiReferenceLayoutItem:()=>ZLt,ApiReferenceOperationConfiguration:()=>Guc,ApiReferencePackageConfiguration:()=>Huc,ApiReferencePackageConfigurationWithOptions:()=>Wuc,ApiReferenceSectionConfiguration:()=>quc,ApiSpecConfiguration:()=>$uc,ApiSpecErrorResponseEnsure:()=>Yuc,ApiSpecErrorResponseHttpMethod:()=>Juc,ApiSpecErrorResponses:()=>Xuc,ApiSpecImportSettings:()=>Zuc,ApiSpecType:()=>Kuc,Audience:()=>JLt,AudienceId:()=>slo,Availability:()=>Bfe,BackgroundImageConfiguration:()=>Ncc,BackgroundImageThemedConfig:()=>Fcc,BlogConfiguration:()=>Luc,BodyThemeConfig:()=>Scc,BreadcrumbsConfig:()=>ruc,ChangelogConfiguration:()=>Muc,ChangelogFolderRelativePath:()=>KLt,ChangelogLayout:()=>bcc,CheckConfig:()=>Puc,CheckRuleSeverity:()=>Pfe,CheckRulesConfig:()=>Ouc,CollapsedStringValue:()=>zcc,CollapsedValue:()=>YLt,ColorConfig:()=>Gx,ColorThemedConfig:()=>Rcc,ColorsConfiguration:()=>suc,ContentAlignment:()=>Acc,CssConfig:()=>jcc,CustomDomain:()=>Dcc,CustomPageAction:()=>auc,DocsConfiguration:()=>Ied,DocsInstance:()=>fuc,DocsSettingsConfig:()=>ouc,DocsTypographyConfig:()=>euc,EditThisPageConfig:()=>puc,EditThisPageLaunch:()=>ucc,EmbeddingConfig:()=>Ycc,ExperimentalConfig:()=>kuc,ExternalProduct:()=>ulc,ExternalSitemapConfigSchema:()=>Ruc,ExternalSitemapSchema:()=>Duc,FeatureFlag:()=>alo,FeatureFlagConfiguration:()=>Qcc,FolderConfiguration:()=>Uuc,FontConfig:()=>ABr,FontConfigPath:()=>$cc,FontConfigVariant:()=>Zcc,FontDisplay:()=>dcc,FontStyle:()=>flo,FontWeight:()=>mlo,FooterLinksConfig:()=>Iuc,FooterNavThemeConfig:()=>xcc,FullStoryAnalyticsConfig:()=>Lcc,GTMConfig:()=>Vcc,GitLibraryInputSchema:()=>Fuc,GithubEditThisPageConfig:()=>luc,GoogleAnalytics4Config:()=>Gcc,HeaderPosition:()=>ycc,HttpSnippetLanguage:()=>Pcc,HttpSnippetsConfig:()=>kcc,IntegrationsConfig:()=>Buc,IntercomConfig:()=>_cc,InternalProduct:()=>clc,JsConfig:()=>wuc,JsConfigOptions:()=>ulo,JsFileConfig:()=>Cuc,JsFileConfigSettings:()=>vuc,JsRemoteConfig:()=>xuc,JsScriptStrategy:()=>dlo,Language:()=>bBr,LanguageSwitcherThemeConfig:()=>vcc,LayoutConfig:()=>nuc,LibraryConfiguration:()=>Quc,LibraryInputConfiguration:()=>juc,LibraryLanguage:()=>fcc,LibraryName:()=>llo,LibraryOutputConfiguration:()=>zuc,LibraryReferenceConfiguration:()=>_uc,LinkConfiguration:()=>glo,LogoConfiguration:()=>duc,MetadataConfig:()=>Suc,NavbarDropdownConfig:()=>buc,NavbarGithubConfig:()=>yuc,NavbarGithubConfigWithOptions:()=>Auc,NavbarLink:()=>Euc,NavbarLinkConfig:()=>BLe,NavigationConfig:()=>vBr,NavigationItem:()=>$Lt,PageActionOption:()=>scc,PageActionOptions:()=>cuc,PageActionsConfig:()=>uuc,PageActionsThemeConfig:()=>Occ,PageConfiguration:()=>ztt,PageDescriptionSource:()=>Jcc,PathLibraryInputSchema:()=>Nuc,PlaygroundButtonSettings:()=>guc,PlaygroundSettings:()=>XLt,PostHogConfig:()=>Ucc,ProductConfig:()=>llc,ProductConfigBase:()=>blo,ProductFileConfig:()=>Eed,ProductPath:()=>bed,ProductSwitcherThemeConfig:()=>Icc,ProgrammingLanguage:()=>occ,RedirectConfig:()=>Alo,RedirectsConfiguration:()=>Tuc,RedirectsFile:()=>Aed,RelativeProductPath:()=>plc,Role:()=>hlo,RoleId:()=>yBr,SearchSettingsConfig:()=>iuc,SearchbarPlacement:()=>mcc,SectionConfiguration:()=>tlc,SegmentConfig:()=>Mcc,SidebarThemeConfig:()=>Tcc,SiteSwitcherThemeConfig:()=>Ccc,SnippetLanguageConfiguration:()=>A$,SnippetsConfiguration:()=>huc,SortByAvailabilityValue:()=>lcc,SwitcherPlacement:()=>gcc,TabConfig:()=>CBr,TabId:()=>Ntt,TabVariant:()=>nlc,TabbedNavigationConfig:()=>alc,TabbedNavigationItem:()=>slc,TabbedNavigationItemWithLayout:()=>ilc,TabbedNavigationItemWithVariants:()=>olc,TabsPlacement:()=>hcc,TabsThemeConfig:()=>wcc,Target:()=>jtt,ThemeConfig:()=>tuc,TitleSource:()=>plo,TranslationConfig:()=>mlc,TranslationConfigObject:()=>dlc,TwitterCardSetting:()=>Bcc,UntabbedNavigationConfig:()=>rlc,VersionAvailability:()=>pcc,VersionConfig:()=>ylo,VersionFileConfig:()=>yed,VersionedSnippetLanguageConfiguration:()=>muc,WithFeatureFlags:()=>aB,WithPermissions:()=>sB,WithViewers:()=>EBr,normalizeTranslationConfig:()=>hlc});function hlc(e){return typeof e=="string"?{lang:e}:e}var Ntt,KLt,slo,yBr,llo,occ,bBr,scc,acc,ccc,ucc,Bfe,lcc,pcc,plo,fcc,flo,dcc,mcc,hcc,gcc,Acc,ycc,bcc,Ecc,Icc,vcc,Ccc,xcc,wcc,Scc,Tcc,Occ,Pcc,jtt,Bcc,dlo,mlo,Rcc,Gx,JLt,hlo,Dcc,kcc,Fcc,Ncc,jcc,zcc,YLt,sB,alo,Qcc,aB,EBr,Mcc,Lcc,_cc,Ucc,Vcc,Gcc,qcc,Wcc,Hcc,Kcc,Jcc,Ycc,Xcc,clo,Zcc,$cc,ABr,euc,tuc,ruc,nuc,iuc,ouc,suc,auc,cuc,uuc,luc,puc,fuc,duc,glo,muc,A$,huc,guc,XLt,IBr,BLe,Auc,yuc,buc,Euc,Iuc,vuc,Cuc,xuc,ulo,wuc,Suc,Alo,Tuc,Aed,Pfe,Ouc,Puc,Buc,Ruc,Duc,kuc,Fuc,Nuc,juc,zuc,Quc,ztt,Muc,Luc,_uc,Uuc,Vuc,Guc,ZLt,quc,Wuc,Huc,Kuc,Juc,Yuc,Xuc,Zuc,$uc,elc,$Lt,tlc,rlc,nlc,ilc,olc,slc,alc,vBr,CBr,ylo,yed,blo,clc,ulc,llc,plc,flc,bed,Eed,dlc,mlc,Ied,glc=h(()=>{"use strict";ds();Ntt=T.string(),KLt=T.string(),slo=T.string(),yBr=T.string(),llo=T.string(),occ=T.enum(["typescript","javascript","python","java","go","ruby","csharp","php","swift","rust","nodets","nodejs","dotnet","curl","jvm","ts","js"]),bBr=T.string().regex(/^[a-zA-Z]{2,8}(-[a-zA-Z0-9]{1,8})*$/,"Language must be a valid BCP 47 language tag (e.g. 'en', 'ja', 'ja-JP', 'pt-BR', 'zh-Hans-CN')"),scc=T.enum(["copy-page","view-as-markdown","ask-ai","chatgpt","claude","cursor","vscode"]),acc=T.enum(["docs","slack","discord"]),ccc=T.enum(["claude-3.7","claude-4","command-a"]),ucc=T.enum(["github","dashboard"]),Bfe=T.enum(["stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"]),lcc=T.enum(["unset","stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"]),pcc=T.enum(["deprecated","ga","stable","beta"]),plo=T.enum(["frontmatter","filename"]),fcc=T.enum(["python","cpp"]),flo=T.enum(["normal","italic"]),dcc=T.enum(["auto","block","swap","fallback","optional"]),mcc=T.enum(["header","header-tabs","sidebar"]),hcc=T.enum(["header","sidebar"]),gcc=T.enum(["header","sidebar"]),Acc=T.enum(["center","left"]),ycc=T.enum(["fixed","static"]),bcc=T.enum(["timeline","classic"]),Ecc=T.enum(["indented","cards"]),Icc=T.enum(["default","toggle","tabs"]),vcc=T.enum(["default","minimal"]),Ccc=T.object({enabled:T.boolean().optional(),order:T.array(T.string()).optional(),hide:T.array(T.string()).optional(),labels:T.record(T.string(),T.string()).optional(),"show-products":T.boolean().optional()}),xcc=T.enum(["default","minimal"]),wcc=T.enum(["default","bubble"]),Scc=T.enum(["default","canvas"]),Tcc=T.enum(["default","minimal"]),Occ=T.enum(["default","toolbar"]),Pcc=T.enum(["curl","csharp","go","java","javascript","php","python","ruby","swift","typescript"]),jtt=T.enum(["_blank","_self","_parent","_top"]),Bcc=T.enum(["summary","summary_large_image","app","player"]),dlo=T.enum(["beforeInteractive","afterInteractive","lazyOnload"]),mlo=T.union([T.string(),T.number().int()]),Rcc=T.object({dark:T.string().optional(),light:T.string().optional()}),Gx=T.union([T.string(),Rcc]),JLt=T.union([slo,T.array(slo)]),hlo=T.union([yBr,T.array(yBr)]),Dcc=T.union([T.string(),T.array(T.string())]),kcc=T.union([T.boolean(),T.array(Pcc)]),Fcc=T.object({dark:T.string().optional(),light:T.string().optional()}),Ncc=T.union([T.string(),Fcc]),jcc=T.union([T.string(),T.array(T.string())]),zcc=T.enum(["open-by-default"]),YLt=T.union([T.boolean(),zcc]),sB=T.object({viewers:hlo.optional(),orphaned:T.boolean().optional()}),alo=T.object({flag:T.string(),"fallback-value":T.unknown().optional(),match:T.unknown().optional()}),Qcc=T.union([T.string(),alo,T.array(alo)]),aB=T.object({"feature-flag":Qcc.optional()}),EBr=T.object({viewers:hlo.optional()}),Mcc=T.object({"write-key":T.string()}),Lcc=T.object({"org-id":T.string()}),_cc=T.object({"app-id":T.string(),"api-base":T.string().optional()}),Ucc=T.object({"api-key":T.string(),endpoint:T.string().optional()}),Vcc=T.object({"container-id":T.string()}),Gcc=T.object({"measurement-id":T.string()}),qcc=T.object({segment:Mcc.optional(),fullstory:Lcc.optional(),intercom:_cc.optional(),posthog:Ucc.optional(),gtm:Vcc.optional(),ga4:Gcc.optional()}),Wcc=T.object({enabled:T.boolean().optional(),style:T.string().optional()}),Hcc=T.object({url:T.string(),title:T.string().optional()}),Kcc=Hcc,Jcc=T.enum(["description","subtitle"]),Ycc=T.object({"allowed-origins":T.array(T.string())}),Xcc=T.object({"page-directive":T.string().optional(),"page-description-source":Jcc.optional(),"llms-txt":T.string().optional(),"llms-full-txt":T.string().optional()}),clo=T.object({model:ccc.optional(),"system-prompt":T.string().optional(),location:T.array(acc).optional(),datasources:T.array(Kcc).optional(),"mask-pii":T.boolean().optional(),disclaimer:T.string().optional()}),Zcc=T.object({path:T.string(),weight:mlo.optional(),style:flo.optional()}),$cc=T.union([T.string(),Zcc]),ABr=T.object({name:T.string().optional(),path:T.string().optional(),weight:mlo.optional(),style:flo.optional(),paths:T.array($cc).optional(),display:dcc.optional(),fallback:T.array(T.string()).optional(),"font-variation-settings":T.string().optional()}),euc=T.object({headingsFont:ABr.optional(),bodyFont:ABr.optional(),codeFont:ABr.optional()}),tuc=T.object({sidebar:Tcc.optional(),body:Scc.optional(),tabs:wcc.optional(),"page-actions":Occ.optional(),"footer-nav":xcc.optional(),"language-switcher":vcc.optional(),"product-switcher":Icc.optional(),"site-switcher":Ccc.optional()}),ruc=T.object({"current-page":T.boolean().optional()}),nuc=T.object({"page-width":T.string().optional(),"content-width":T.string().optional(),"sidebar-width":T.string().optional(),"header-height":T.string().optional(),"searchbar-placement":mcc.optional(),"tabs-placement":hcc.optional(),"switcher-placement":gcc.optional(),"content-alignment":Acc.optional(),"header-position":ycc.optional(),"disable-header":T.boolean().optional(),"hide-nav-links":T.boolean().optional(),"hide-feedback":T.boolean().optional(),"mobile-toc":T.boolean().optional(),"changelog-layout":bcc.optional(),"api-reference-layout":Ecc.optional(),"api-reference-expand-properties":T.boolean().optional(),"show-nav-availability-badges":T.boolean().optional(),"hide-webhook-method-badges":T.boolean().optional(),breadcrumbs:ruc.optional()}),iuc=T.object({"prioritize-current-product":T.boolean().optional(),"default-filter-by-current-product":T.boolean().optional()}),ouc=T.object({"search-text":T.string().optional(),"disable-search":T.boolean().optional(),"dark-mode-code":T.boolean().optional(),"default-search-filters":T.boolean().optional(),search:iuc.optional(),"http-snippets":kcc.optional(),"hide-404-page":T.boolean().optional(),"use-javascript-as-typescript":T.boolean().optional(),"disable-explorer-proxy":T.boolean().optional(),"disable-analytics":T.boolean().optional(),language:bBr.optional(),"folder-title-source":plo.optional(),"substitute-env-vars":T.boolean().optional(),"websocket-oneof-display":T.enum(["flat","grouped"]).optional(),embedding:Ycc.optional()}),suc=T.object({"accent-primary":Gx.optional(),accentPrimary:Gx.optional(),background:Gx.optional(),border:Gx.optional(),"sidebar-background":Gx.optional(),"header-background":Gx.optional(),"card-background":Gx.optional(),"accent-1":Gx.optional(),"accent-2":Gx.optional(),"accent-3":Gx.optional(),"accent-4":Gx.optional(),"accent-5":Gx.optional(),"accent-6":Gx.optional(),"accent-7":Gx.optional(),"accent-8":Gx.optional(),"accent-9":Gx.optional(),"accent-10":Gx.optional(),"accent-11":Gx.optional(),"accent-12":Gx.optional()}),auc=T.object({title:T.string(),subtitle:T.string().optional(),url:T.string(),icon:T.string().optional(),default:T.boolean().optional()}),cuc=T.object({"copy-page":T.boolean().optional(),"view-as-markdown":T.boolean().optional(),"ask-ai":T.boolean().optional(),chatgpt:T.boolean().optional(),claude:T.boolean().optional(),cursor:T.boolean().optional(),mcp:T.boolean().optional(),vscode:T.boolean().optional(),custom:T.array(auc).optional()}),uuc=T.object({default:scc.optional(),options:cuc.optional()}),luc=T.object({host:T.string().optional(),owner:T.string(),repo:T.string(),branch:T.string().optional()}),puc=T.object({github:luc.optional(),launch:ucc.optional()}),fuc=T.object({url:T.string(),"custom-domain":Dcc.optional(),"edit-this-page":puc.optional(),audiences:JLt.optional(),"multi-source":T.boolean().optional()}),duc=T.object({dark:T.string().optional(),light:T.string().optional(),height:T.number().optional(),href:T.string().optional(),"right-text":T.string().optional()}),glo=T.object({link:T.string(),href:T.string(),icon:T.string().optional(),target:jtt.optional()}),muc=T.object({version:T.string(),package:T.string()}),A$=T.union([T.string(),muc]),huc=T.object({python:A$.optional(),typescript:A$.optional(),go:A$.optional(),java:A$.optional(),ruby:A$.optional(),csharp:A$.optional(),php:A$.optional(),swift:A$.optional(),rust:A$.optional()}),guc=T.object({href:T.string().optional()}),XLt=T.object({hidden:T.boolean().optional(),environments:T.array(T.string()).optional(),button:guc.optional(),oauth:T.boolean().optional(),"limit-websocket-messages-per-connection":T.number().int().optional(),"send-optional-defaults":T.boolean().optional()}),IBr=T.object({message:T.string()}),BLe=EBr.merge(T.object({href:T.string().optional(),target:jtt.optional(),url:T.string().optional(),text:T.string().optional(),icon:T.string().optional(),rightIcon:T.string().optional(),rounded:T.boolean().optional()})),Auc=EBr.merge(T.object({url:T.string(),target:jtt.optional()})),yuc=T.union([T.string(),Auc]),buc=EBr.merge(T.object({links:T.array(BLe),text:T.string().optional(),icon:T.string().optional(),rightIcon:T.string().optional(),rounded:T.boolean().optional()})),Euc=T.union([BLe.merge(T.object({type:T.literal("filled")})),BLe.merge(T.object({type:T.literal("outlined")})),BLe.merge(T.object({type:T.literal("minimal")})),T.object({type:T.literal("github"),value:yuc}),buc.merge(T.object({type:T.literal("dropdown")})),BLe.merge(T.object({type:T.literal("primary")})),BLe.merge(T.object({type:T.literal("secondary")}))]),Iuc=T.object({github:T.string().optional(),twitter:T.string().optional(),x:T.string().optional(),linkedin:T.string().optional(),youtube:T.string().optional(),instagram:T.string().optional(),facebook:T.string().optional(),discord:T.string().optional(),slack:T.string().optional(),hackernews:T.string().optional(),medium:T.string().optional(),website:T.string().optional()}),vuc=T.object({path:T.string(),strategy:dlo.optional()}),Cuc=T.union([T.string(),vuc]),xuc=T.object({url:T.string(),strategy:dlo.optional(),"disable-sri":T.boolean().optional()}),ulo=T.union([xuc,Cuc]),wuc=T.union([ulo,T.array(ulo)]),Suc=T.object({"og:site_name":T.string().optional(),"og:title":T.string().optional(),"og:description":T.string().optional(),"og:url":T.string().optional(),"og:image":T.string().optional(),"og:image:width":T.number().optional(),"og:image:height":T.number().optional(),"og:locale":T.string().optional(),"og:logo":T.string().optional(),"twitter:title":T.string().optional(),"twitter:description":T.string().optional(),"twitter:handle":T.string().optional(),"twitter:image":T.string().optional(),"twitter:site":T.string().optional(),"twitter:url":T.string().optional(),"twitter:card":Bcc.optional(),"og:dynamic":T.boolean().optional(),"og:dynamic:background-image":T.string().optional(),"og:dynamic:text-color":T.string().optional(),"og:dynamic:background-color":T.string().optional(),"og:dynamic:logo-color":T.enum(["dark","light"]).optional(),"og:dynamic:show-logo":T.boolean().optional(),"og:dynamic:show-section":T.boolean().optional(),"og:dynamic:show-description":T.boolean().optional(),"og:dynamic:show-url":T.boolean().optional(),"og:dynamic:show-gradient":T.boolean().optional(),"canonical-host":T.string().optional()}),Alo=T.object({source:T.string(),destination:T.string(),permanent:T.boolean().optional()}),Tuc=T.union([T.array(Alo),T.string(),T.array(T.string())]),Aed=T.object({redirects:T.array(Alo.strict())}).strict(),Pfe=T.enum(["warn","error"]),Ouc=T.object({"example-validation":Pfe.optional(),"broken-links":Pfe.optional(),"no-non-component-refs":Pfe.optional(),"valid-local-references":Pfe.optional(),"no-circular-redirects":Pfe.optional(),"valid-docs-endpoints":Pfe.optional(),"missing-redirects":Pfe.optional(),"valid-changelog-slug":Pfe.optional()}),Puc=T.object({rules:Ouc.optional()}),Buc=T.object({intercom:T.string().optional(),context7:T.string().optional()}),Ruc=T.object({url:T.string(),locale:T.string().optional()}),Duc=T.union([T.string(),Ruc]),kuc=T.object({"mdx-components":T.array(T.string()).optional(),"disable-stream-toggle":T.boolean().optional(),"openapi-parser-v2":T.boolean().optional(),"openapi-parser-v3":T.boolean().optional(),"dynamic-snippets":T.boolean().optional(),"ai-examples":T.boolean().optional(),"ai-example-style-instructions":T.string().optional(),"exclude-apis":T.boolean().optional(),"basepath-aware":T.boolean().optional(),"robots-txt-on-instance-url":T.boolean().optional(),"external-sitemaps":T.array(Duc).optional()}),Fuc=T.object({git:T.string(),subpath:T.string().optional(),ref:T.string().optional()}),Nuc=T.object({path:T.string()}),juc=T.union([Fuc,Nuc]),zuc=T.object({path:T.string()}),Quc=T.object({input:juc,output:zuc,lang:fcc}),ztt=sB.merge(aB).merge(T.object({page:T.string(),path:T.string(),slug:T.string().optional(),icon:T.string().optional(),hidden:T.boolean().optional(),noindex:T.boolean().optional(),availability:Bfe.optional()})),Muc=sB.merge(aB).merge(T.object({changelog:KLt,title:T.string().optional(),slug:T.string().optional(),icon:T.string().optional(),hidden:T.boolean().optional()})),Luc=sB.merge(aB).merge(T.object({blog:KLt,title:T.string().optional(),slug:T.string().optional(),icon:T.string().optional(),hidden:T.boolean().optional()})),_uc=sB.merge(aB).merge(T.object({library:llo,title:T.string().optional(),slug:T.string().optional()})),Uuc=sB.merge(aB).merge(T.object({folder:T.string(),title:T.string().optional(),"title-source":plo.optional(),slug:T.string().optional(),icon:T.string().optional(),hidden:T.boolean().optional(),"skip-slug":T.boolean().optional(),collapsed:YLt.optional(),collapsible:T.boolean().optional(),"collapsed-by-default":T.boolean().optional(),availability:Bfe.optional()})),Vuc=sB.merge(aB).merge(T.object({endpoint:T.string(),title:T.string().optional(),slug:T.string().optional(),icon:T.string().optional(),hidden:T.boolean().optional(),availability:Bfe.optional(),playground:XLt.optional()})),Guc=sB.merge(aB).merge(T.object({operation:T.string(),title:T.string().optional(),slug:T.string().optional(),hidden:T.boolean().optional(),availability:Bfe.optional()})),ZLt=T.lazy(()=>T.union([T.string(),T.record(T.string(),Huc),quc,Vuc,Guc,ztt,glo])),quc=sB.merge(aB).merge(T.object({section:T.string(),"referenced-packages":T.array(T.string()).optional(),summary:T.string().optional(),contents:T.array(ZLt).optional(),slug:T.string().optional(),icon:T.string().optional(),hidden:T.boolean().optional(),"skip-slug":T.boolean().optional(),collapsed:YLt.optional(),collapsible:T.boolean().optional(),"collapsed-by-default":T.boolean().optional(),availability:Bfe.optional(),playground:XLt.optional()})),Wuc=sB.merge(aB).merge(T.object({title:T.string().optional(),summary:T.string().optional(),contents:T.array(ZLt).optional(),availability:Bfe.optional(),slug:T.string().optional(),icon:T.string().optional(),hidden:T.boolean().optional(),"skip-slug":T.boolean().optional(),playground:XLt.optional()})),Huc=T.lazy(()=>T.union([T.array(ZLt),Wuc])),Kuc=T.enum(["openapi","asyncapi","graphql"]),Juc=T.enum(["get","post","put","patch","delete","head","options","trace"]),Yuc=T.object({"status-code":T.number().int().min(400).max(599),methods:T.array(Juc).optional()}),Xuc=T.object({schema:T.union([T.string(),T.record(T.string(),T.unknown())]),name:T.string().optional(),"apply-to":T.enum(["all","untyped"]).optional(),ensure:T.array(Yuc).optional()}),Zuc=T.object({"type-dates-as-strings":T.boolean().optional(),"use-bytes-for-binary-response":T.boolean().optional(),"respect-parameter-content":T.boolean().optional(),"respect-operation-id-word-boundaries":T.boolean().optional(),"infer-forward-compatible":T.boolean().optional(),"preserve-one-of-in-all-of":T.boolean().optional(),"any-of-sibling-properties-as-object":T.boolean().optional(),"error-responses":Xuc.optional()}),$uc=T.object({type:Kuc,path:T.string(),namespace:T.string().optional(),overlays:T.string().optional(),overrides:T.array(T.string()).optional(),settings:Zuc.optional()}),elc=sB.merge(aB).merge(T.object({api:T.string(),"api-name":T.string().optional(),specs:T.array($uc).optional(),openrpc:T.string().optional(),audiences:JLt.optional(),"display-errors":T.boolean().optional(),"tag-description-pages":T.boolean().optional(),snippets:huc.optional(),postman:T.string().optional(),summary:T.string().optional(),layout:T.array(ZLt).optional(),collapsed:YLt.optional(),icon:T.string().optional(),slug:T.string().optional(),hidden:T.boolean().optional(),availability:Bfe.optional(),"skip-slug":T.boolean().optional(),alphabetized:T.boolean().optional(),"sort-by-availability":T.array(lcc).optional(),flattened:T.boolean().optional(),paginated:T.boolean().optional(),playground:XLt.optional()})),$Lt=T.lazy(()=>T.union([ztt,tlc,elc,_uc,glo,Muc,Luc,Uuc])),tlc=sB.merge(aB).merge(T.object({section:T.string(),path:T.string().optional(),contents:T.array($Lt),collapsed:YLt.optional(),collapsible:T.boolean().optional(),"collapsed-by-default":T.boolean().optional(),slug:T.string().optional(),icon:T.string().optional(),hidden:T.boolean().optional(),"skip-slug":T.boolean().optional(),availability:Bfe.optional()})),rlc=T.array($Lt),nlc=sB.merge(aB).merge(T.object({title:T.string(),subtitle:T.string().optional(),icon:T.string().optional(),layout:T.array($Lt),slug:T.string().optional(),"skip-slug":T.boolean().optional(),hidden:T.boolean().optional(),default:T.boolean().optional()})),ilc=T.object({tab:Ntt,layout:T.array($Lt).optional()}),olc=T.object({tab:Ntt,variants:T.array(nlc)}),slc=T.union([ilc,olc]),alc=T.array(slc),vBr=T.union([rlc,alc]),CBr=sB.merge(aB).merge(T.object({"display-name":T.string(),icon:T.string().optional(),slug:T.string().optional(),"skip-slug":T.boolean().optional(),hidden:T.boolean().optional(),href:T.string().optional(),target:jtt.optional(),changelog:KLt.optional(),blog:KLt.optional()})),ylo=sB.merge(aB).merge(T.object({"display-name":T.string(),path:T.string().optional(),ref:T.string().optional(),slug:T.string().optional(),availability:pcc.optional(),audiences:JLt.optional(),hidden:T.boolean().optional(),announcement:IBr.optional()})),yed=T.object({tabs:T.record(Ntt,CBr).optional(),"landing-page":ztt.optional(),navigation:vBr}),blo=sB.merge(aB).merge(T.object({"display-name":T.string(),subtitle:T.string().optional(),icon:T.string().optional(),image:T.string().optional(),versions:T.array(ylo).optional(),audiences:JLt.optional()})),clc=blo.merge(T.object({path:T.string(),slug:T.string().optional(),announcement:IBr.optional()})),ulc=blo.merge(T.object({href:T.string(),target:jtt.optional()})),llc=T.union([clc,ulc]),plc=sB.merge(aB).merge(T.object({"display-name":T.string(),path:T.string(),slug:T.string().optional()})),flc=T.object({href:T.string()}),bed=T.union([plc,flc]),Eed=T.object({tabs:T.record(Ntt,CBr).optional(),"landing-page":ztt.optional(),navigation:vBr}),dlc=T.object({lang:bBr,default:T.boolean().optional()}),mlc=T.union([bBr,dlc]);Ied=T.object({instances:T.array(fuc),title:T.string().optional(),libraries:T.record(llo,Quc).optional(),analytics:qcc.optional(),announcement:IBr.optional(),roles:T.array(yBr).optional(),tabs:T.record(Ntt,CBr).optional(),versions:T.array(ylo).optional(),products:T.array(llc).optional(),"landing-page":ztt.optional(),navigation:vBr.optional(),"navbar-links":T.array(Euc).optional(),"footer-links":Iuc.optional(),"page-actions":uuc.optional(),experimental:kuc.optional(),"default-language":occ.optional(),languages:T.array(T.string()).optional(),translations:T.array(mlc).optional().superRefine((e,t)=>{if(e==null)return;let n=e.map(hlc).filter(i=>i.default===!0).length;n>1&&t.addIssue({code:T.ZodIssueCode.custom,message:`Only one translation entry can be marked as default, but ${n} were found`})}),"ai-chat":clo.optional(),"ai-search":clo.optional(),"ai-examples":Wcc.optional(),agents:Xcc.optional(),metadata:Suc.optional(),redirects:Tuc.optional(),check:Puc.optional(),logo:duc.optional(),favicon:T.string().optional(),"background-image":Ncc.optional(),colors:suc.optional(),typography:euc.optional(),layout:nuc.optional(),settings:ouc.optional(),theme:tuc.optional(),"global-theme":T.string().optional(),integrations:Buc.optional(),css:jcc.optional(),js:wuc.optional(),header:T.string().optional(),footer:T.string().optional()})});function xed(e){if("changelog"in e)return e.changelog;if("blog"in e)return e.blog}function wed(e){return e.changelog??e.blog}var ved,Ced,Alc=h(()=>{"use strict";ved="Changelog",Ced="Blog"});var ylc=h(()=>{"use strict"});var blc=h(()=>{"use strict"});var Elc=h(()=>{"use strict"});var Ilc=h(()=>{"use strict"});var vlc=h(()=>{"use strict"});var Ilo,Clc=h(()=>{"use strict";Ilo={Docs:"docs",Slack:"slack",Discord:"discord"}});var vlo,xlc=h(()=>{"use strict";vlo={Claude37:"claude-3.7",Claude4:"claude-4",CommandA:"command-a"}});var wlc=h(()=>{"use strict"});var Slc=h(()=>{"use strict"});var Tlc=h(()=>{"use strict"});var Olc=h(()=>{"use strict"});var Plc=h(()=>{"use strict"});var Blc=h(()=>{"use strict"});var Clo,Rlc=h(()=>{"use strict";Clo={Indented:"indented",Cards:"cards"}});var Dlc=h(()=>{"use strict"});var klc=h(()=>{"use strict"});var Flc=h(()=>{"use strict"});var Nlc=h(()=>{"use strict"});var jlc=h(()=>{"use strict"});var zlc=h(()=>{"use strict"});var xlo,Qlc=h(()=>{"use strict";xlo={All:"all",Untyped:"untyped"}});var Mlc=h(()=>{"use strict"});var wlo,Llc=h(()=>{"use strict";wlo={Get:"get",Post:"post",Put:"put",Patch:"patch",Delete:"delete",Head:"head",Options:"options",Trace:"trace"}});var _lc=h(()=>{"use strict"});var Ulc=h(()=>{"use strict"});var Vlc=h(()=>{"use strict"});var Slo,Glc=h(()=>{"use strict";Slo={Openapi:"openapi",Asyncapi:"asyncapi",Graphql:"graphql"}});var qlc=h(()=>{"use strict"});var Wlc=h(()=>{"use strict"});var Tlo,Hlc=h(()=>{"use strict";Tlo={Stable:"stable",GenerallyAvailable:"generally-available",InDevelopment:"in-development",PreRelease:"pre-release",Deprecated:"deprecated",Beta:"beta",Alpha:"alpha",Preview:"preview",Legacy:"legacy"}});var Klc=h(()=>{"use strict"});var Jlc=h(()=>{"use strict"});var Ylc=h(()=>{"use strict"});var Olo,Xlc=h(()=>{"use strict";Olo={Default:"default",Canvas:"canvas"}});var Zlc=h(()=>{"use strict"});var $lc=h(()=>{"use strict"});var epc=h(()=>{"use strict"});var Plo,tpc=h(()=>{"use strict";Plo={Timeline:"timeline",Classic:"classic"}});var rpc=h(()=>{"use strict"});var Blo,npc=h(()=>{"use strict";Blo={Warn:"warn",Error:"error"}});var ipc=h(()=>{"use strict"});var Rlo,opc=h(()=>{"use strict";Rlo={OpenByDefault:"open-by-default"}});var spc=h(()=>{"use strict"});var apc=h(()=>{"use strict"});var cpc=h(()=>{"use strict"});var upc=h(()=>{"use strict"});var Dlo,lpc=h(()=>{"use strict";Dlo={Center:"center",Left:"left"}});var ppc=h(()=>{"use strict"});var fpc=h(()=>{"use strict"});var dpc=h(()=>{"use strict"});var mpc=h(()=>{"use strict"});var hpc=h(()=>{"use strict"});var gpc=h(()=>{"use strict"});var Apc=h(()=>{"use strict"});var ypc=h(()=>{"use strict"});var klo,bpc=h(()=>{"use strict";klo={Github:"github",Dashboard:"dashboard"}});var Epc=h(()=>{"use strict"});var Ipc=h(()=>{"use strict"});var vpc=h(()=>{"use strict"});var Cpc=h(()=>{"use strict"});var xpc=h(()=>{"use strict"});var wpc=h(()=>{"use strict"});var Spc=h(()=>{"use strict"});var Tpc=h(()=>{"use strict"});var Opc=h(()=>{"use strict"});var Ppc=h(()=>{"use strict"});var Bpc=h(()=>{"use strict"});var Flo,Rpc=h(()=>{"use strict";Flo={Auto:"auto",Block:"block",Swap:"swap",Fallback:"fallback",Optional:"optional"}});var Nlo,Dpc=h(()=>{"use strict";Nlo={Normal:"normal",Italic:"italic"}});var kpc=h(()=>{"use strict"});var Fpc=h(()=>{"use strict"});var jlo,Npc=h(()=>{"use strict";jlo={Default:"default",Minimal:"minimal"}});var jpc=h(()=>{"use strict"});var zpc=h(()=>{"use strict"});var Qpc=h(()=>{"use strict"});var Mpc=h(()=>{"use strict"});var Lpc=h(()=>{"use strict"});var zlo,_pc=h(()=>{"use strict";zlo={Fixed:"fixed",Static:"static"}});var Qlo,Upc=h(()=>{"use strict";Qlo={Curl:"curl",Csharp:"csharp",Go:"go",Java:"java",Javascript:"javascript",Php:"php",Python:"python",Ruby:"ruby",Swift:"swift",Typescript:"typescript"}});var Vpc=h(()=>{"use strict"});var Gpc=h(()=>{"use strict"});var qpc=h(()=>{"use strict"});var Wpc=h(()=>{"use strict"});var Hpc=h(()=>{"use strict"});var Kpc=h(()=>{"use strict"});var Jpc=h(()=>{"use strict"});var Ypc=h(()=>{"use strict"});var Xpc=h(()=>{"use strict"});var Mlo,Zpc=h(()=>{"use strict";Mlo={BeforeInteractive:"beforeInteractive",AfterInteractive:"afterInteractive",LazyOnload:"lazyOnload"}});var $pc=h(()=>{"use strict"});var Llo,efc=h(()=>{"use strict";Llo={Default:"default",Minimal:"minimal"}});var tfc=h(()=>{"use strict"});var rfc=h(()=>{"use strict"});var nfc=h(()=>{"use strict"});var ifc=h(()=>{"use strict"});var _lo,ofc=h(()=>{"use strict";_lo={Python:"python",Cpp:"cpp"}});var sfc=h(()=>{"use strict"});var afc=h(()=>{"use strict"});var cfc=h(()=>{"use strict"});var ufc=h(()=>{"use strict"});var lfc=h(()=>{"use strict"});var pfc=h(()=>{"use strict"});var ffc=h(()=>{"use strict"});var dfc=h(()=>{"use strict"});var mfc=h(()=>{"use strict"});var hfc=h(()=>{"use strict"});var gfc=h(()=>{"use strict"});var Afc=h(()=>{"use strict"});var yfc=h(()=>{"use strict"});var Ulo,bfc=h(()=>{"use strict";Ulo={Dark:"dark",Light:"light"}});var Vlo,Efc=h(()=>{"use strict";Vlo={CopyPage:"copy-page",ViewAsMarkdown:"view-as-markdown",AskAi:"ask-ai",Chatgpt:"chatgpt",Claude:"claude",Cursor:"cursor",ClaudeCode:"claude-code",Vscode:"vscode"}});var Ifc=h(()=>{"use strict"});var vfc=h(()=>{"use strict"});var Glo,Cfc=h(()=>{"use strict";Glo={Default:"default",Toolbar:"toolbar"}});var xfc=h(()=>{"use strict"});var qlo,wfc=h(()=>{"use strict";qlo={Description:"description",Subtitle:"subtitle"}});var Sfc=h(()=>{"use strict"});var Tfc=h(()=>{"use strict"});var Ofc=h(()=>{"use strict"});var Pfc=h(()=>{"use strict"});var Bfc=h(()=>{"use strict"});var Rfc=h(()=>{"use strict"});var Dfc=h(()=>{"use strict"});var kfc=h(()=>{"use strict"});var Wlo,Ffc=h(()=>{"use strict";Wlo={Default:"default",Toggle:"toggle",Tabs:"tabs"}});var Hlo,Nfc=h(()=>{"use strict";Hlo={Typescript:"typescript",Javascript:"javascript",Python:"python",Java:"java",Go:"go",Ruby:"ruby",Csharp:"csharp",Php:"php",Swift:"swift",Rust:"rust",Nodets:"nodets",Nodejs:"nodejs",Dotnet:"dotnet",Curl:"curl",Jvm:"jvm",Ts:"ts",Js:"js"}});var jfc=h(()=>{"use strict"});var zfc=h(()=>{"use strict"});var Qfc=h(()=>{"use strict"});var Mfc=h(()=>{"use strict"});var Lfc=h(()=>{"use strict"});var Klo,_fc=h(()=>{"use strict";Klo={Header:"header",HeaderTabs:"header-tabs",Sidebar:"sidebar"}});var Ufc=h(()=>{"use strict"});var Vfc=h(()=>{"use strict"});var Gfc=h(()=>{"use strict"});var Jlo,qfc=h(()=>{"use strict";Jlo={Default:"default",Minimal:"minimal"}});var Wfc=h(()=>{"use strict"});var Hfc=h(()=>{"use strict"});var Kfc=h(()=>{"use strict"});var Jfc=h(()=>{"use strict"});var Yfc=h(()=>{"use strict"});var Xfc=h(()=>{"use strict"});var Ylo,Zfc=h(()=>{"use strict";Ylo={Unset:"unset",Stable:"stable",GenerallyAvailable:"generally-available",InDevelopment:"in-development",PreRelease:"pre-release",Deprecated:"deprecated",Beta:"beta",Alpha:"alpha",Preview:"preview",Legacy:"legacy"}});var Xlo,$fc=h(()=>{"use strict";Xlo={Header:"header",Sidebar:"sidebar"}});var edc=h(()=>{"use strict"});var tdc=h(()=>{"use strict"});var rdc=h(()=>{"use strict"});var ndc=h(()=>{"use strict"});var idc=h(()=>{"use strict"});var odc=h(()=>{"use strict"});var Zlo,sdc=h(()=>{"use strict";Zlo={Left:"left",Center:"center"}});var $lo,adc=h(()=>{"use strict";$lo={Header:"header",Sidebar:"sidebar"}});var cdc=h(()=>{"use strict"});var udc=h(()=>{"use strict"});var epo,ldc=h(()=>{"use strict";epo={Default:"default",Bubble:"bubble"}});var pdc=h(()=>{"use strict"});var tpo,fdc=h(()=>{"use strict";tpo={Blank:"_blank",Self:"_self",Parent:"_parent",Top:"_top"}});var ddc=h(()=>{"use strict"});var rpo,mdc=h(()=>{"use strict";rpo={Frontmatter:"frontmatter",Filename:"filename"}});var hdc=h(()=>{"use strict"});var gdc=h(()=>{"use strict"});var npo,Adc=h(()=>{"use strict";npo={Summary:"summary",SummaryLargeImage:"summary_large_image",App:"app",Player:"player"}});var ydc=h(()=>{"use strict"});var ipo,bdc=h(()=>{"use strict";ipo={Deprecated:"deprecated",Legacy:"legacy",Ga:"ga",Stable:"stable",Beta:"beta",Alpha:"alpha",Preview:"preview"}});var Edc=h(()=>{"use strict"});var Idc=h(()=>{"use strict"});var vdc=h(()=>{"use strict"});var opo,Cdc=h(()=>{"use strict";opo={Flat:"flat",Grouped:"grouped"}});var xdc=h(()=>{"use strict"});var wdc=h(()=>{"use strict"});var Sdc=h(()=>{"use strict"});var spo=h(()=>{"use strict";blc();Elc();Ilc();vlc();Clc();xlc();wlc();Slc();Tlc();Olc();Plc();Blc();Rlc();Dlc();klc();Flc();Nlc();jlc();zlc();Qlc();Mlc();Llc();_lc();Ulc();Vlc();Glc();qlc();Wlc();Hlc();Klc();Jlc();Ylc();Xlc();Zlc();$lc();epc();tpc();rpc();npc();ipc();opc();spc();apc();cpc();upc();lpc();ppc();fpc();dpc();mpc();hpc();gpc();Apc();ypc();bpc();Epc();Ipc();vpc();Cpc();xpc();wpc();Spc();Tpc();Opc();Ppc();Bpc();Rpc();Dpc();kpc();Fpc();Npc();jpc();zpc();Qpc();Mpc();Lpc();_pc();Upc();Vpc();Gpc();qpc();Wpc();Hpc();Kpc();Jpc();Ypc();Xpc();Zpc();$pc();efc();tfc();rfc();nfc();ifc();ofc();sfc();afc();cfc();ufc();lfc();pfc();ffc();dfc();mfc();hfc();gfc();Afc();yfc();bfc();Efc();Ifc();vfc();Cfc();xfc();wfc();Sfc();Tfc();Ofc();Pfc();Bfc();Rfc();Dfc();kfc();Ffc();Nfc();jfc();zfc();Qfc();Mfc();Lfc();_fc();Ufc();Vfc();Gfc();qfc();Wfc();Hfc();Kfc();Jfc();Yfc();Xfc();Zfc();$fc();edc();tdc();rdc();ndc();idc();odc();sdc();adc();cdc();udc();ldc();pdc();fdc();ddc();mdc();hdc();gdc();Adc();ydc();bdc();Edc();Idc();vdc();Cdc();xdc();wdc();Sdc()});var xBr={};ee(xBr,{AiChatLocation:()=>Ilo,AiChatModel:()=>vlo,ApiReferenceLayout:()=>Clo,ApiSpecErrorResponseApplyTo:()=>xlo,ApiSpecErrorResponseHttpMethod:()=>wlo,ApiSpecType:()=>Slo,Availability:()=>Tlo,BodyThemeConfig:()=>Olo,ChangelogLayout:()=>Plo,CheckRuleSeverity:()=>Blo,CollapsedStringValue:()=>Rlo,ContentAlignment:()=>Dlo,EditThisPageLaunch:()=>klo,FontDisplay:()=>Flo,FontStyle:()=>Nlo,FooterNavThemeConfig:()=>jlo,HeaderPosition:()=>zlo,HttpSnippetLanguage:()=>Qlo,JsScriptStrategy:()=>Mlo,LanguageSwitcherThemeConfig:()=>Llo,LibraryLanguage:()=>_lo,OgDynamicLogoColor:()=>Ulo,PageActionOption:()=>Vlo,PageActionsThemeConfig:()=>Glo,PageDescriptionSource:()=>qlo,ProductSwitcherThemeConfig:()=>Wlo,ProgrammingLanguage:()=>Hlo,SearchbarPlacement:()=>Klo,SidebarThemeConfig:()=>Jlo,SortByAvailabilityValue:()=>Ylo,SwitcherPlacement:()=>Xlo,TabsAlignment:()=>Zlo,TabsPlacement:()=>$lo,TabsThemeStyle:()=>epo,Target:()=>tpo,TitleSource:()=>rpo,TwitterCardSetting:()=>npo,VersionAvailability:()=>ipo,WebSocketOneofDisplay:()=>opo});var Tdc=h(()=>{"use strict";spo()});var Odc=h(()=>{"use strict";Tdc();spo()});var apo={};ee(apo,{AiChatLocation:()=>Ilo,AiChatModel:()=>vlo,ApiReferenceLayout:()=>Clo,ApiSpecErrorResponseApplyTo:()=>xlo,ApiSpecErrorResponseHttpMethod:()=>wlo,ApiSpecType:()=>Slo,Availability:()=>Tlo,BodyThemeConfig:()=>Olo,ChangelogLayout:()=>Plo,CheckRuleSeverity:()=>Blo,CollapsedStringValue:()=>Rlo,ContentAlignment:()=>Dlo,EditThisPageLaunch:()=>klo,FontDisplay:()=>Flo,FontStyle:()=>Nlo,FooterNavThemeConfig:()=>jlo,HeaderPosition:()=>zlo,HttpSnippetLanguage:()=>Qlo,JsScriptStrategy:()=>Mlo,LanguageSwitcherThemeConfig:()=>Llo,LibraryLanguage:()=>_lo,OgDynamicLogoColor:()=>Ulo,PageActionOption:()=>Vlo,PageActionsThemeConfig:()=>Glo,PageDescriptionSource:()=>qlo,ProductSwitcherThemeConfig:()=>Wlo,ProgrammingLanguage:()=>Hlo,SearchbarPlacement:()=>Klo,SidebarThemeConfig:()=>Jlo,SortByAvailabilityValue:()=>Ylo,SwitcherPlacement:()=>Xlo,TabsAlignment:()=>Zlo,TabsPlacement:()=>$lo,TabsThemeStyle:()=>epo,Target:()=>tpo,TitleSource:()=>rpo,TwitterCardSetting:()=>npo,VersionAvailability:()=>ipo,WebSocketOneofDisplay:()=>opo,docs:()=>xBr});var cpo=h(()=>{"use strict";Odc()});var Pdc,Bdc=h(()=>{"use strict";Pdc=(e,t,r)=>JSON.stringify(e,t,r)});function Sed({message:e,statusCode:t,body:r}){let n=[];return e!=null&&n.push(e),t!=null&&n.push(`Status code: ${t.toString()}`),r!=null&&n.push(`Body: ${Pdc(r,void 0,2)}`),n.join(`
|
|
140
140
|
`)}var e6t,Rdc=h(()=>{"use strict";Bdc();e6t=class extends Error{statusCode;body;rawResponse;cause;constructor({message:t,statusCode:r,body:n,rawResponse:i,cause:o}){super(Sed({message:t,statusCode:r,body:n})),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.statusCode=r,this.body=n,this.rawResponse=i,o!=null&&(this.cause=o)}}});var t6t,Ddc=h(()=>{"use strict";t6t=class extends Error{cause;constructor(t,r){super(t),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,r?.cause!=null&&(this.cause=r.cause)}}});var kdc=h(()=>{"use strict";Rdc();Ddc()});var QH,Fdc,r6t,upo,UT0,lpo=h(()=>{"use strict";QH={Debug:"debug",Info:"info",Warn:"warn",Error:"error"},Fdc={[QH.Debug]:1,[QH.Info]:2,[QH.Warn]:3,[QH.Error]:4},r6t=class{debug(t,...r){console.debug(t,...r)}info(t,...r){console.info(t,...r)}warn(t,...r){console.warn(t,...r)}error(t,...r){console.error(t,...r)}},upo=class{level;logger;silent;constructor(t){this.level=Fdc[t.level],this.logger=t.logger,this.silent=t.silent}shouldLog(t){return!this.silent&&this.level<=Fdc[t]}isDebug(){return this.shouldLog(QH.Debug)}debug(t,...r){this.isDebug()&&this.logger.debug(t,...r)}isInfo(){return this.shouldLog(QH.Info)}info(t,...r){this.isInfo()&&this.logger.info(t,...r)}isWarn(){return this.shouldLog(QH.Warn)}warn(t,...r){this.isWarn()&&this.logger.warn(t,...r)}isError(){return this.shouldLog(QH.Error)}error(t,...r){this.isError()&&this.logger.error(t,...r)}},UT0=new upo({level:QH.Info,logger:new r6t,silent:!0})});var ppo,Ndc=h(()=>{"use strict";lpo();(function(e){e.LogLevel=QH,e.ConsoleLogger=r6t})(ppo||(ppo={}))});var jdc=h(()=>{"use strict";Ndc()});var zdc=h(()=>{"use strict";jdc()});var Qdc=h(()=>{"use strict"});var Mdc=h(()=>{"use strict";lpo()});var Ldc=h(()=>{"use strict"});var yu,IS=h(()=>{"use strict";yu={BIGINT:"bigint",DATE:"date",ENUM:"enum",LIST:"list",STRING_LITERAL:"stringLiteral",BOOLEAN_LITERAL:"booleanLiteral",OBJECT:"object",ANY:"any",BOOLEAN:"boolean",NUMBER:"number",STRING:"string",UNKNOWN:"unknown",NEVER:"never",RECORD:"record",SET:"set",UNION:"union",UNDISCRIMINATED_UNION:"undiscriminatedUnion",NULLABLE:"nullable",OPTIONAL:"optional",OPTIONAL_NULLABLE:"optionalNullable"}});function Em(e,t){return`Expected ${t}. Received ${Ped(e)}.`}function Ped(e){if(Array.isArray(e))return"list";if(e===null)return"null";if(e instanceof BigInt)return"BigInt";switch(typeof e){case"string":return`"${e}"`;case"bigint":case"number":case"boolean":case"undefined":return`${e}`}return typeof e}var R2=h(()=>{"use strict"});function vS(e){return{...e,json:_dc(e.json),parse:_dc(e.parse)}}function _dc(e){return(t,r)=>{let n=e(t,r),{skipValidation:i=!1}=r??{};return!n.ok&&i?(console.warn(["Failed to validate.",...n.errors.map(o=>" - "+(o.path.length>0?`${o.path.join(".")}: ${o.message}`:o.message))].join(`
|
|
141
|
-
`)),{ok:!0,value:t}):n}}var y$=h(()=>{"use strict"});function wBr(e){return e.path.length===0?e.message:`${e.path.join(" -> ")}: ${e.message}`}var fpo=h(()=>{"use strict"});var Qtt,dpo=h(()=>{"use strict";fpo();Qtt=class extends Error{errors;constructor(t){super(t.map(wBr).join("; ")),this.errors=t,Object.setPrototypeOf(this,new.target.prototype),this.name=this.constructor.name}}});var Mtt,mpo=h(()=>{"use strict";fpo();Mtt=class extends Error{errors;constructor(t){super(t.map(wBr).join("; ")),this.errors=t,Object.setPrototypeOf(this,new.target.prototype),this.name=this.constructor.name}}});function Im(e){return{nullable:()=>Bed(e),optional:()=>hpo(e),optionalNullable:()=>Red(e),transform:t=>gpo(e,t),parseOrThrow:(t,r)=>{let n=e.parse(t,r);if(n.ok)return n.value;throw new Mtt(n.errors)},jsonOrThrow:(t,r)=>{let n=e.json(t,r);if(n.ok)return n.value;throw new Qtt(n.errors)}}}function Bed(e){let t={parse:(r,n)=>r==null?{ok:!0,value:null}:e.parse(r,n),json:(r,n)=>r==null?{ok:!0,value:null}:e.json(r,n),getType:()=>yu.NULLABLE};return{...t,...Im(t)}}function hpo(e){let t={parse:(r,n)=>r==null?{ok:!0,value:void 0}:e.parse(r,n),json:(r,n)=>n?.omitUndefined&&r===void 0?{ok:!0,value:void 0}:r==null?{ok:!0,value:null}:e.json(r,n),getType:()=>yu.OPTIONAL};return{...t,...Im(t)}}function Red(e){let t={parse:(r,n)=>r===void 0?{ok:!0,value:void 0}:r===null?{ok:!0,value:null}:e.parse(r,n),json:(r,n)=>r===void 0?{ok:!0,value:void 0}:r===null?{ok:!0,value:null}:e.json(r,n),getType:()=>yu.OPTIONAL_NULLABLE};return{...t,...Im(t)}}function gpo(e,t){let r={parse:(n,i)=>{let o=e.parse(n,i);return o.ok?{ok:!0,value:t.transform(o.value)}:o},json:(n,i)=>{let o=t.untransform(n);return e.json(o,i)},getType:()=>e.getType()};return{...r,...Im(r)}}var Udc=h(()=>{"use strict";IS();dpo();mpo()});var mQ=h(()=>{"use strict";Udc();dpo();mpo()});function Vdc(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t=="bigint"?{ok:!0,value:t}:typeof t=="number"?{ok:!0,value:BigInt(t)}:{ok:!1,errors:[{path:r,message:Em(t,"bigint | number")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="bigint"?{ok:!1,errors:[{path:r,message:Em(t,"bigint")}]}:{ok:!0,value:t},getType:()=>yu.BIGINT};return{...vS(e),...Im(e)}}var Gdc=h(()=>{"use strict";IS();R2();y$();mQ()});var qdc=h(()=>{"use strict";Gdc()});function Wdc(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="string"?{ok:!1,errors:[{path:r,message:Em(t,"string")}]}:Ded.test(t)?{ok:!0,value:new Date(t)}:{ok:!1,errors:[{path:r,message:Em(t,"ISO 8601 date string")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>t instanceof Date?{ok:!0,value:t.toISOString()}:{ok:!1,errors:[{path:r,message:Em(t,"Date object")}]},getType:()=>yu.DATE};return{...vS(e),...Im(e)}}var Ded,Hdc=h(()=>{"use strict";IS();R2();y$();mQ();Ded=/^([+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([.,]\d+(?!:))?)?(\17[0-5]\d([.,]\d+)?)?([zZ]|([+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/});var Kdc=h(()=>{"use strict";Hdc()});function tT(e,t){return()=>{let r={parse:t,json:t,getType:()=>e};return{...vS(r),...Im(r)}}}var b$=h(()=>{"use strict";mQ();y$()});function SBr(e){let t=new Set(e);return tT(yu.ENUM,(n,{allowUnrecognizedEnumValues:i,breadcrumbsPrefix:o=[]}={})=>typeof n!="string"?{ok:!1,errors:[{path:o,message:Em(n,"string")}]}:!t.has(n)&&!i?{ok:!1,errors:[{path:o,message:Em(n,"enum")}]}:{ok:!0,value:n})()}var Jdc=h(()=>{"use strict";IS();b$();R2()});var Apo=h(()=>{"use strict";Jdc()});function Ydc(e){let t=ypo(e);return{...t,...Im(t)}}function ypo(e){return{parse:(t,r)=>Ltt(e).parse(t,r),json:(t,r)=>Ltt(e).json(t,r),getType:()=>Ltt(e).getType()}}function Ltt(e){let t=e;return t.__zurg_memoized==null&&(t.__zurg_memoized=e()),t.__zurg_memoized}var bpo=h(()=>{"use strict";mQ()});function Epo(e){return Object.entries(e)}var Xdc=h(()=>{"use strict"});function n6t(e,t){let r=new Set(t);return Object.entries(e).reduce((n,[i,o])=>(r.has(i)&&(n[i]=o),n),{})}var Ipo=h(()=>{"use strict"});function Rfe(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return t===null?!0:Object.getPrototypeOf(t)===null}var i6t=h(()=>{"use strict"});function o6t(e){return Object.keys(e)}var vpo=h(()=>{"use strict"});function Zdc(e,t){let r=[],n=[];for(let i of e)t(i)?r.push(i):n.push(i);return[r,n]}var $dc=h(()=>{"use strict"});function MH(e){return{withParsedProperties:t=>Cpo(e,t)}}function Cpo(e,t){let r={parse:(n,i)=>{let o=e.parse(n,i);if(!o.ok)return o;let s={};for(let a in t)if(ked.call(t,a)){let c=t[a];s[a]=typeof c=="function"?c(o.value):c}return{ok:!0,value:{...o.value,...s}}},json:(n,i)=>{if(!Rfe(n))return{ok:!1,errors:[{path:i?.breadcrumbsPrefix??[],message:Em(n,"object")}]};let o=new Set(Object.keys(t)),s=n6t(n,Object.keys(n).filter(a=>!o.has(a)));return e.json(s,i)},getType:()=>e.getType()};return{...r,...Im(r),...MH(r)}}var ked,emc=h(()=>{"use strict";Ipo();R2();i6t();mQ();ked=Object.prototype.hasOwnProperty});var s6t=h(()=>{"use strict";emc()});function tmc(e,t){return{rawKey:e,valueSchema:t,isProperty:!0}}function Dfe(e){return e.isProperty}var xpo=h(()=>{"use strict"});function TBr(e){let t;function r(){if(t==null){t={};for(let[f,d]of Epo(e)){let m=Dfe(d)?d.rawKey:f,g=Dfe(d)?d.valueSchema:d;t[m]={rawKey:m,parsedKey:f,valueSchema:g}}}return t}let n,i,o,s;function a(){if(n==null){n=[],i=[];for(let[f,d]of Epo(e)){let m=Dfe(d)?d.rawKey:f,g=Dfe(d)?d.valueSchema:d;Ned(g)&&(n.push(m),i.push(f))}o=new Set(n),s=new Set(i)}return n}function c(){return i==null&&a(),i}function u(){return o==null&&a(),o}function l(){return s==null&&a(),s}let p={_getRawProperties:()=>Object.entries(e).map(([f,d])=>Dfe(d)?d.rawKey:f),_getParsedProperties:()=>o6t(e),parse:(f,d)=>{let m=d?.breadcrumbsPrefix??[];return rmc({value:f,requiredKeys:a(),requiredKeysSet:u(),getProperty:g=>{let A=r()[g];if(A!=null)return{transformedKey:A.parsedKey,transform:y=>{let I=[...m,g];return A.valueSchema.parse(y,{...d,breadcrumbsPrefix:I})}}},unrecognizedObjectKeys:d?.unrecognizedObjectKeys,skipValidation:d?.skipValidation,breadcrumbsPrefix:m,omitUndefined:d?.omitUndefined})},json:(f,d)=>{let m=d?.breadcrumbsPrefix??[];return rmc({value:f,requiredKeys:c(),requiredKeysSet:l(),getProperty:g=>{let A=e[g];if(A!=null)return Dfe(A)?{transformedKey:A.rawKey,transform:y=>{let I=[...m,g];return A.valueSchema.json(y,{...d,breadcrumbsPrefix:I})}}:{transformedKey:g,transform:y=>{let I=[...m,g];return A.json(y,{...d,breadcrumbsPrefix:I})}}},unrecognizedObjectKeys:d?.unrecognizedObjectKeys,skipValidation:d?.skipValidation,breadcrumbsPrefix:m,omitUndefined:d?.omitUndefined})},getType:()=>yu.OBJECT};return{...vS(p),...Im(p),...MH(p),...RLe(p)}}function rmc({value:e,requiredKeys:t,requiredKeysSet:r,getProperty:n,unrecognizedObjectKeys:i="fail",skipValidation:o=!1,breadcrumbsPrefix:s=[]}){if(!Rfe(e))return{ok:!1,errors:[{path:s,message:Em(e,"object")}]};let a=t.length,c=[],u={};for(let l in e){if(!Fed.call(e,l))continue;let p=e[l],f=n(l);if(f!=null){a>0&&r.has(l)&&a--;let d=f.transform(p);d.ok?u[f.transformedKey]=d.value:(u[l]=p,c.push(...d.errors))}else switch(i){case"fail":c.push({path:[...s,l],message:`Unexpected key "${l}"`});break;case"strip":break;case"passthrough":u[l]=p;break}}if(a>0)for(let l of t)l in e||c.push({path:s,message:`Missing required key "${l}"`});return c.length===0||o?{ok:!0,value:u}:{ok:!1,errors:c}}function RLe(e){return{extend:t=>{let r={_getParsedProperties:()=>[...e._getParsedProperties(),...t._getParsedProperties()],_getRawProperties:()=>[...e._getRawProperties(),...t._getRawProperties()],parse:(n,i)=>nmc({extensionKeys:t._getRawProperties(),value:n,transformBase:o=>e.parse(o,i),transformExtension:o=>t.parse(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),json:(n,i)=>nmc({extensionKeys:t._getParsedProperties(),value:n,transformBase:o=>e.json(o,i),transformExtension:o=>t.json(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),getType:()=>yu.OBJECT};return{...r,...Im(r),...MH(r),...RLe(r)}},passthrough:()=>{let t=new Set(e._getRawProperties()),r=new Set(e._getParsedProperties()),n={_getParsedProperties:()=>e._getParsedProperties(),_getRawProperties:()=>e._getRawProperties(),parse:(i,o)=>{let s=e.parse(i,{...o,unrecognizedObjectKeys:"passthrough"});if(!s.ok)return s;let a={};if(typeof i=="object"&&i!=null)for(let[c,u]of Object.entries(i))t.has(c)||(a[c]=u);return{ok:!0,value:{...a,...s.value}}},json:(i,o)=>{let s=e.json(i,{...o,unrecognizedObjectKeys:"passthrough"});if(!s.ok)return s;let a={};if(typeof i=="object"&&i!=null)for(let[c,u]of Object.entries(i))r.has(c)||(a[c]=u);return{ok:!0,value:{...a,...s.value}}},getType:()=>yu.OBJECT};return{...n,...Im(n),...MH(n),...RLe(n)}}}}function nmc({extensionKeys:e,value:t,transformBase:r,transformExtension:n,breadcrumbsPrefix:i=[]}){if(!Rfe(t))return{ok:!1,errors:[{path:i,message:Em(t,"object")}]};let o=new Set(e),[s,a]=Zdc(o6t(t),l=>o.has(l)),c=r(n6t(t,a)),u=n(n6t(t,s));return c.ok&&u.ok?{ok:!0,value:{...c.value,...u.value}}:{ok:!1,errors:[...c.ok?[]:c.errors,...u.ok?[]:u.errors]}}function Ned(e){return!jed(e)}function jed(e){switch(e.getType()){case yu.ANY:case yu.UNKNOWN:case yu.OPTIONAL:case yu.OPTIONAL_NULLABLE:return!0;default:return!1}}var Fed,wpo=h(()=>{"use strict";IS();Xdc();Ipo();R2();i6t();vpo();y$();$dc();s6t();mQ();xpo();Fed=Object.prototype.hasOwnProperty});function imc(e){return TBr(e)}var omc=h(()=>{"use strict";wpo()});var Spo=h(()=>{"use strict";wpo();omc();xpo()});function smc(e){let t={...ypo(e),_getRawProperties:()=>Ltt(e)._getRawProperties(),_getParsedProperties:()=>Ltt(e)._getParsedProperties()};return{...t,...Im(t),...MH(t),...RLe(t)}}var amc=h(()=>{"use strict";Spo();s6t();mQ();bpo()});var cmc=h(()=>{"use strict";bpo();amc()});function OBr(e){let t={parse:(r,n)=>umc(r,(i,o)=>e.parse(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),json:(r,n)=>umc(r,(i,o)=>e.json(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),getType:()=>yu.LIST};return{...vS(t),...Im(t)}}function umc(e,t){if(!Array.isArray(e))return{ok:!1,errors:[{message:Em(e,"list"),path:[]}]};let r=[],n=[];for(let i=0;i<e.length;i++){let o=t(e[i],i);o.ok?r.push(o.value):n.push(...o.errors)}return n.length===0?{ok:!0,value:r}:{ok:!1,errors:n}}var lmc=h(()=>{"use strict";IS();R2();y$();mQ()});var Tpo=h(()=>{"use strict";lmc()});function pmc(e){return tT(yu.BOOLEAN_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:Em(r,`${e.toString()}`)}]})()}var fmc=h(()=>{"use strict";IS();b$();R2()});function dmc(e){return tT(yu.STRING_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:Em(r,`"${e}"`)}]})()}var mmc=h(()=>{"use strict";IS();b$();R2()});var hmc=h(()=>{"use strict";fmc();mmc()});var gmc,Amc=h(()=>{"use strict";IS();b$();gmc=tT(yu.ANY,e=>({ok:!0,value:e}))});var ymc,bmc=h(()=>{"use strict";IS();b$();R2();ymc=tT(yu.BOOLEAN,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="boolean"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Em(e,"boolean")}]})});var Emc,Imc=h(()=>{"use strict";IS();b$();Emc=tT(yu.NEVER,(e,{breadcrumbsPrefix:t=[]}={})=>({ok:!1,errors:[{path:t,message:"Expected never"}]}))});var vmc,Cmc=h(()=>{"use strict";IS();b$();R2();vmc=tT(yu.NUMBER,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="number"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Em(e,"number")}]})});var xmc,wmc=h(()=>{"use strict";IS();b$();R2();xmc=tT(yu.STRING,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="string"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Em(e,"string")}]})});var Smc,Tmc=h(()=>{"use strict";IS();b$();Smc=tT(yu.UNKNOWN,e=>({ok:!0,value:e}))});var Omc=h(()=>{"use strict";Amc();bmc();Imc();Cmc();wmc();Tmc()});function Pmc(e,t){let r={parse:(n,i)=>PBr({value:n,isKeyNumeric:e.getType()===yu.NUMBER,transformKey:o=>e.parse(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${o} (key)`]}),transformValue:(o,s)=>t.parse(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${s}`]}),breadcrumbsPrefix:i?.breadcrumbsPrefix}),json:(n,i)=>PBr({value:n,isKeyNumeric:e.getType()===yu.NUMBER,transformKey:o=>e.json(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${o} (key)`]}),transformValue:(o,s)=>t.json(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${s}`]}),breadcrumbsPrefix:i?.breadcrumbsPrefix}),getType:()=>yu.RECORD};return{...vS(r),...Im(r)}}function Bmc(e,t){let r={parse:(n,i)=>PBr({value:n,isKeyNumeric:e.getType()===yu.NUMBER,transformKey:o=>e.parse(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${o} (key)`]}),transformValue:(o,s)=>t.parse(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${s}`]}),breadcrumbsPrefix:i?.breadcrumbsPrefix}),json:(n,i)=>PBr({value:n,isKeyNumeric:e.getType()===yu.NUMBER,transformKey:o=>e.json(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${o} (key)`]}),transformValue:(o,s)=>t.json(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${s}`]}),breadcrumbsPrefix:i?.breadcrumbsPrefix}),getType:()=>yu.RECORD};return{...vS(r),...Im(r)}}function PBr({value:e,isKeyNumeric:t,transformKey:r,transformValue:n,breadcrumbsPrefix:i=[]}){if(!Rfe(e))return{ok:!1,errors:[{path:i,message:Em(e,"object")}]};let o={},s=[];for(let a in e){if(!zed.call(e,a))continue;let c=e[a];if(c===void 0)continue;let u=a;if(t){let f=a.length>0?Number(a):NaN;Number.isNaN(f)||(u=f)}let l=r(u),p=n(c,u);l.ok&&p.ok?o[l.value]=p.value:(l.ok||s.push(...l.errors),p.ok||s.push(...p.errors))}return s.length===0?{ok:!0,value:o}:{ok:!1,errors:s}}var zed,Rmc=h(()=>{"use strict";IS();R2();i6t();y$();mQ();zed=Object.prototype.hasOwnProperty});var Dmc=h(()=>{"use strict";Rmc()});function kmc(e){let t=OBr(e),r={parse:(n,i)=>{let o=t.parse(n,i);return o.ok?{ok:!0,value:new Set(o.value)}:o},json:(n,i)=>n instanceof Set?t.json([...n],i):{ok:!1,errors:[{path:i?.breadcrumbsPrefix??[],message:Em(n,"Set")}]},getType:()=>yu.SET};return{...vS(r),...Im(r)}}var Fmc=h(()=>{"use strict";IS();R2();y$();Tpo();mQ()});var Nmc=h(()=>{"use strict";Fmc()});function zmc(e){let t={parse:(r,n)=>jmc((i,o)=>i.parse(r,o),e,n),json:(r,n)=>jmc((i,o)=>i.json(r,o),e,n),getType:()=>yu.UNDISCRIMINATED_UNION};return{...vS(t),...Im(t)}}function jmc(e,t,r){let n=[];for(let[i,o]of t.entries()){let s=e(o,{...r,skipValidation:!1});if(s.ok)return s;for(let a of s.errors)n.push({path:a.path,message:`[Variant ${i}] ${a.message}`})}return{ok:!1,errors:n}}var Qmc=h(()=>{"use strict";IS();y$();mQ()});var Mmc=h(()=>{"use strict";Qmc()});function Lmc(e,t){return{parsedDiscriminant:e,rawDiscriminant:t}}var _mc=h(()=>{"use strict"});function Vmc(e,t){let r=typeof e=="string"?e:e.rawDiscriminant,n=typeof e=="string"?e:e.parsedDiscriminant,i=SBr(o6t(t)),o={parse:(s,a)=>Umc({value:s,discriminant:r,transformedDiscriminant:n,transformDiscriminantValue:c=>i.parse(c,{allowUnrecognizedEnumValues:a?.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...a?.breadcrumbsPrefix??[],r]}),getAdditionalPropertiesSchema:c=>t[c],allowUnrecognizedUnionMembers:a?.allowUnrecognizedUnionMembers,transformAdditionalProperties:(c,u)=>u.parse(c,a),breadcrumbsPrefix:a?.breadcrumbsPrefix}),json:(s,a)=>Umc({value:s,discriminant:n,transformedDiscriminant:r,transformDiscriminantValue:c=>i.json(c,{allowUnrecognizedEnumValues:a?.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...a?.breadcrumbsPrefix??[],n]}),getAdditionalPropertiesSchema:c=>t[c],allowUnrecognizedUnionMembers:a?.allowUnrecognizedUnionMembers,transformAdditionalProperties:(c,u)=>u.json(c,a),breadcrumbsPrefix:a?.breadcrumbsPrefix}),getType:()=>yu.UNION};return{...vS(o),...Im(o),...MH(o)}}function Umc({value:e,discriminant:t,transformedDiscriminant:r,transformDiscriminantValue:n,getAdditionalPropertiesSchema:i,allowUnrecognizedUnionMembers:o=!1,transformAdditionalProperties:s,breadcrumbsPrefix:a=[]}){if(!Rfe(e))return{ok:!1,errors:[{path:a,message:Em(e,"object")}]};let c=e[t],u={};for(let d in e)Qed.call(e,d)&&d!==t&&(u[d]=e[d]);if(c==null)return{ok:!1,errors:[{path:a,message:`Missing discriminant ("${t}")`}]};let l=n(c);if(!l.ok)return{ok:!1,errors:l.errors};let p=i(l.value);if(p==null)return o?{ok:!0,value:{[r]:l.value,...u}}:{ok:!1,errors:[{path:[...a,t],message:"Unexpected discriminant value"}]};let f=s(u,p);return f.ok?{ok:!0,value:{[r]:c,...f.value}}:f}var Qed,Gmc=h(()=>{"use strict";IS();R2();i6t();vpo();y$();Apo();s6t();mQ();Qed=Object.prototype.hasOwnProperty});var qmc=h(()=>{"use strict";_mc();Gmc()});var Wmc=h(()=>{"use strict";qdc();Kdc();Apo();cmc();Tpo();hmc();Spo();s6t();Omc();Dmc();mQ();Nmc();Mmc();qmc()});var ne={};ee(ne,{JsonError:()=>Qtt,ParseError:()=>Mtt,any:()=>gmc,bigint:()=>Vdc,boolean:()=>ymc,booleanLiteral:()=>pmc,date:()=>Wdc,discriminant:()=>Lmc,enum_:()=>SBr,getObjectLikeUtils:()=>MH,getObjectUtils:()=>RLe,getSchemaUtils:()=>Im,isProperty:()=>Dfe,lazy:()=>Ydc,lazyObject:()=>smc,list:()=>OBr,never:()=>Emc,number:()=>vmc,object:()=>TBr,objectWithoutOptionalProperties:()=>imc,optional:()=>hpo,partialRecord:()=>Bmc,property:()=>tmc,record:()=>Pmc,set:()=>kmc,string:()=>xmc,stringLiteral:()=>dmc,transform:()=>gpo,undiscriminatedUnion:()=>zmc,union:()=>Vmc,unknown:()=>Smc,withParsedProperties:()=>Cpo});var Hmc=h(()=>{"use strict";Wmc()});var Kmc=h(()=>{"use strict"});var Br=h(()=>{"use strict";Qdc();Mdc();Ldc();Hmc();Kmc()});var BBr,Opo=h(()=>{"use strict";Br();BBr=ne.object({href:ne.string()})});var RBr,Ppo=h(()=>{"use strict";Br();RBr=ne.enum_(["description","subtitle"])});var DBr,Bpo=h(()=>{"use strict";Br();Ppo();DBr=ne.object({pageDirective:ne.property("page-directive",ne.string().optional()),pageDescriptionSource:ne.property("page-description-source",RBr.optional()),llmsTxt:ne.property("llms-txt",ne.string().optional()),llmsFullTxt:ne.property("llms-full-txt",ne.string().optional()),robotsTxt:ne.property("robots-txt",ne.string().optional())})});var kBr,Rpo=h(()=>{"use strict";Br();kBr=ne.object({url:ne.string(),title:ne.string().optional()})});var FBr,Dpo=h(()=>{"use strict";Br();Rpo();FBr=ne.undiscriminatedUnion([kBr])});var NBr,kpo=h(()=>{"use strict";Br();NBr=ne.enum_(["docs","slack","discord"])});var jBr,Fpo=h(()=>{"use strict";Br();jBr=ne.enum_(["claude-3.7","claude-4","command-a"])});var a6t,Npo=h(()=>{"use strict";Br();Dpo();kpo();Fpo();a6t=ne.object({model:jBr.optional(),systemPrompt:ne.property("system-prompt",ne.string().optional()),location:ne.list(NBr).optional(),datasources:ne.list(FBr).optional(),maskPii:ne.property("mask-pii",ne.boolean().optional()),disclaimer:ne.string().optional()})});var zBr,jpo=h(()=>{"use strict";Br();zBr=ne.object({enabled:ne.boolean().optional(),style:ne.string().optional()})});var QBr,zpo=h(()=>{"use strict";Br();QBr=ne.object({orgId:ne.property("org-id",ne.string())})});var MBr,Qpo=h(()=>{"use strict";Br();MBr=ne.object({measurementId:ne.property("measurement-id",ne.string())})});var LBr,Mpo=h(()=>{"use strict";Br();LBr=ne.object({containerId:ne.property("container-id",ne.string())})});var _Br,Lpo=h(()=>{"use strict";Br();_Br=ne.object({appId:ne.property("app-id",ne.string()),apiBase:ne.property("api-base",ne.string().optional())})});var UBr,_po=h(()=>{"use strict";Br();UBr=ne.object({apiKey:ne.property("api-key",ne.string()),endpoint:ne.string().optional()})});var VBr,Upo=h(()=>{"use strict";Br();VBr=ne.object({writeKey:ne.property("write-key",ne.string())})});var GBr,Vpo=h(()=>{"use strict";Br();zpo();Qpo();Mpo();Lpo();_po();Upo();GBr=ne.object({segment:VBr.optional(),fullstory:QBr.optional(),intercom:_Br.optional(),posthog:UBr.optional(),gtm:LBr.optional(),ga4:MBr.optional()})});var UIe,c6t=h(()=>{"use strict";Br();UIe=ne.object({message:ne.string()})});var qBr,Gpo=h(()=>{"use strict";Br();qBr=ne.enum_(["all","untyped"])});var WBr,qpo=h(()=>{"use strict";Br();WBr=ne.enum_(["get","post","put","patch","delete","head","options","trace"])});var HBr,Wpo=h(()=>{"use strict";Br();qpo();HBr=ne.object({statusCode:ne.property("status-code",ne.number()),methods:ne.list(WBr).optional()})});var KBr,Hpo=h(()=>{"use strict";Br();KBr=ne.undiscriminatedUnion([ne.string(),ne.record(ne.string(),ne.unknown())])});var JBr,Kpo=h(()=>{"use strict";Br();Gpo();Wpo();Hpo();JBr=ne.object({schema:KBr,name:ne.string().optional(),applyTo:ne.property("apply-to",qBr.optional()),ensure:ne.list(HBr).optional()})});var YBr,Jpo=h(()=>{"use strict";Br();Kpo();YBr=ne.object({typeDatesAsStrings:ne.property("type-dates-as-strings",ne.boolean().optional()),useBytesForBinaryResponse:ne.property("use-bytes-for-binary-response",ne.boolean().optional()),respectParameterContent:ne.property("respect-parameter-content",ne.boolean().optional()),respectOperationIdWordBoundaries:ne.property("respect-operation-id-word-boundaries",ne.boolean().optional()),inferForwardCompatible:ne.property("infer-forward-compatible",ne.boolean().optional()),preserveOneOfInAllOf:ne.property("preserve-one-of-in-all-of",ne.boolean().optional()),anyOfSiblingPropertiesAsObject:ne.property("any-of-sibling-properties-as-object",ne.boolean().optional()),errorResponses:ne.property("error-responses",JBr.optional())})});var XBr,Ypo=h(()=>{"use strict";Br();XBr=ne.enum_(["openapi","asyncapi","graphql"])});var ZBr,Xpo=h(()=>{"use strict";Br();Jpo();Ypo();ZBr=ne.object({type:XBr,path:ne.string(),namespace:ne.string().optional(),overlays:ne.string().optional(),overrides:ne.list(ne.string()).optional(),settings:YBr.optional()})});var u6t,Zpo=h(()=>{"use strict";Br();u6t=ne.string()});var E$,_tt=h(()=>{"use strict";Br();Zpo();E$=ne.undiscriminatedUnion([u6t,ne.list(u6t)])});var rT,I$=h(()=>{"use strict";Br();rT=ne.enum_(["stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"])});var $Br,$po=h(()=>{"use strict";Br();$Br=ne.enum_(["open-by-default"])});var v$,Utt=h(()=>{"use strict";Br();$po();v$=ne.undiscriminatedUnion([ne.boolean(),$Br])});var eRr,efo=h(()=>{"use strict";Br();eRr=ne.object({href:ne.string().optional()})});var C$,Vtt=h(()=>{"use strict";Br();efo();C$=ne.object({hidden:ne.boolean().optional(),environments:ne.list(ne.string()).optional(),button:eRr.optional(),oauth:ne.boolean().optional(),limitWebsocketMessagesPerConnection:ne.property("limit-websocket-messages-per-connection",ne.number().optional()),sendOptionalDefaults:ne.property("send-optional-defaults",ne.boolean().optional())})});var tRr,tfo=h(()=>{"use strict";Br();tRr=ne.object({version:ne.string(),package:ne.string()})});var VV,rfo=h(()=>{"use strict";Br();tfo();VV=ne.undiscriminatedUnion([ne.string(),tRr])});var rRr,nfo=h(()=>{"use strict";Br();rfo();rRr=ne.object({python:VV.optional(),typescript:VV.optional(),go:VV.optional(),java:VV.optional(),ruby:VV.optional(),csharp:VV.optional(),php:VV.optional(),swift:VV.optional(),rust:VV.optional()})});var nRr,ifo=h(()=>{"use strict";Br();nRr=ne.enum_(["unset","stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"])});var l6t,ofo=h(()=>{"use strict";Br();l6t=ne.object({flag:ne.string(),fallbackValue:ne.property("fallback-value",ne.unknown().optional()),match:ne.unknown().optional()})});var iRr,sfo=h(()=>{"use strict";Br();ofo();iRr=ne.undiscriminatedUnion([ne.string(),l6t,ne.list(l6t)])});var Kd,nT=h(()=>{"use strict";Br();sfo();Kd=ne.object({featureFlag:ne.property("feature-flag",iRr.optional())})});var DLe,oRr=h(()=>{"use strict";Br();DLe=ne.string()});var Gtt,sRr=h(()=>{"use strict";Br();oRr();Gtt=ne.undiscriminatedUnion([DLe,ne.list(DLe)])});var Jd,iT=h(()=>{"use strict";Br();sRr();Jd=ne.object({viewers:Gtt.optional(),orphaned:ne.boolean().optional()})});var aRr,afo=h(()=>{"use strict";Br();j3();Xpo();_tt();I$();Utt();Vtt();nfo();ifo();nT();iT();aRr=ne.object({api:ne.string(),apiName:ne.property("api-name",ne.string().optional()),specs:ne.list(ZBr).optional(),openrpc:ne.string().optional(),audiences:E$.optional(),displayErrors:ne.property("display-errors",ne.boolean().optional()),tagDescriptionPages:ne.property("tag-description-pages",ne.boolean().optional()),snippets:rRr.optional(),postman:ne.string().optional(),summary:ne.string().optional(),layout:ne.list(ne.lazy(()=>x$)).optional(),collapsed:v$.optional(),icon:ne.string().optional(),slug:ne.string().optional(),hidden:ne.boolean().optional(),availability:rT.optional(),skipSlug:ne.property("skip-slug",ne.boolean().optional()),alphabetized:ne.boolean().optional(),sortByAvailability:ne.property("sort-by-availability",ne.list(nRr).optional()),flattened:ne.boolean().optional(),paginated:ne.boolean().optional(),playground:C$.optional()}).extend(Jd).extend(Kd)});var cRr,cfo=h(()=>{"use strict";Br();I$();Vtt();nT();iT();cRr=ne.object({endpoint:ne.string(),title:ne.string().optional(),slug:ne.string().optional(),icon:ne.string().optional(),hidden:ne.boolean().optional(),availability:rT.optional(),playground:C$.optional()}).extend(Jd).extend(Kd)});var uRr,ufo=h(()=>{"use strict";Br();uRr=ne.enum_(["indented","cards"])});var lRr,lfo=h(()=>{"use strict";Br();I$();nT();iT();lRr=ne.object({operation:ne.string(),title:ne.string().optional(),slug:ne.string().optional(),hidden:ne.boolean().optional(),availability:rT.optional()}).extend(Jd).extend(Kd)});var GV,kLe=h(()=>{"use strict";Br();GV=ne.enum_(["_blank","_self","_parent","_top"])});var qtt,pRr=h(()=>{"use strict";Br();kLe();qtt=ne.object({link:ne.string(),href:ne.string(),icon:ne.string().optional(),target:GV.optional()})});var qV,FLe=h(()=>{"use strict";Br();I$();nT();iT();qV=ne.object({page:ne.string(),path:ne.string(),slug:ne.string().optional(),icon:ne.string().optional(),hidden:ne.boolean().optional(),noindex:ne.boolean().optional(),availability:rT.optional()}).extend(Jd).extend(Kd)});var x$,Jmc=h(()=>{"use strict";Br();j3();cfo();lfo();pRr();FLe();x$=ne.undiscriminatedUnion([ne.string(),ne.record(ne.string(),ne.lazy(()=>fRr)),ne.lazyObject(()=>dRr),cRr,lRr,qV,qtt])});var fRr,Ymc=h(()=>{"use strict";Br();j3();fRr=ne.undiscriminatedUnion([ne.list(ne.lazy(()=>x$)),ne.lazyObject(()=>mRr)])});var mRr,Xmc=h(()=>{"use strict";Br();j3();I$();Vtt();nT();iT();mRr=ne.object({title:ne.string().optional(),summary:ne.string().optional(),contents:ne.list(ne.lazy(()=>x$)).optional(),availability:rT.optional(),slug:ne.string().optional(),icon:ne.string().optional(),hidden:ne.boolean().optional(),skipSlug:ne.property("skip-slug",ne.boolean().optional()),playground:C$.optional()}).extend(Jd).extend(Kd)});var dRr,Zmc=h(()=>{"use strict";Br();j3();I$();Utt();Vtt();nT();iT();dRr=ne.object({section:ne.string(),referencedPackages:ne.property("referenced-packages",ne.list(ne.string()).optional()),summary:ne.string().optional(),contents:ne.list(ne.lazy(()=>x$)).optional(),slug:ne.string().optional(),icon:ne.string().optional(),hidden:ne.boolean().optional(),skipSlug:ne.property("skip-slug",ne.boolean().optional()),collapsed:v$.optional(),collapsible:ne.boolean().optional(),collapsedByDefault:ne.property("collapsed-by-default",ne.boolean().optional()),availability:rT.optional(),playground:C$.optional()}).extend(Jd).extend(Kd)});var hRr,pfo=h(()=>{"use strict";Br();hRr=ne.object({dark:ne.string().optional(),light:ne.string().optional()})});var gRr,ffo=h(()=>{"use strict";Br();pfo();gRr=ne.undiscriminatedUnion([ne.string(),hRr])});var kfe,p6t=h(()=>{"use strict";Br();kfe=ne.string()});var ARr,dfo=h(()=>{"use strict";Br();p6t();nT();iT();ARr=ne.object({blog:kfe,title:ne.string().optional(),slug:ne.string().optional(),icon:ne.string().optional(),hidden:ne.boolean().optional()}).extend(Jd).extend(Kd)});var yRr,mfo=h(()=>{"use strict";Br();yRr=ne.enum_(["default","canvas"])});var bRr,hfo=h(()=>{"use strict";Br();bRr=ne.object({currentPage:ne.property("current-page",ne.boolean().optional())})});var Wtt,ERr=h(()=>{"use strict";Br();p6t();nT();iT();Wtt=ne.object({changelog:kfe,title:ne.string().optional(),slug:ne.string().optional(),icon:ne.string().optional(),hidden:ne.boolean().optional()}).extend(Jd).extend(Kd)});var IRr,gfo=h(()=>{"use strict";Br();IRr=ne.enum_(["timeline","classic"])});var LH,Afo=h(()=>{"use strict";Br();LH=ne.enum_(["warn","error"])});var vRr,yfo=h(()=>{"use strict";Br();Afo();vRr=ne.object({exampleValidation:ne.property("example-validation",LH.optional()),brokenLinks:ne.property("broken-links",LH.optional()),noNonComponentRefs:ne.property("no-non-component-refs",LH.optional()),validLocalReferences:ne.property("valid-local-references",LH.optional()),noCircularRedirects:ne.property("no-circular-redirects",LH.optional()),validDocsEndpoints:ne.property("valid-docs-endpoints",LH.optional()),missingRedirects:ne.property("missing-redirects",LH.optional()),validChangelogSlug:ne.property("valid-changelog-slug",LH.optional())})});var CRr,bfo=h(()=>{"use strict";Br();yfo();CRr=ne.object({rules:vRr.optional()})});var xRr,Efo=h(()=>{"use strict";Br();xRr=ne.object({dark:ne.string().optional(),light:ne.string().optional()})});var dv,Ifo=h(()=>{"use strict";Br();Efo();dv=ne.undiscriminatedUnion([ne.string(),xRr])});var wRr,vfo=h(()=>{"use strict";Br();Ifo();wRr=ne.object({accentPrimary:ne.property("accent-primary",dv.optional()),accentPrimaryDeprecated:ne.property("accentPrimary",dv.optional()),background:dv.optional(),border:dv.optional(),sidebarBackground:ne.property("sidebar-background",dv.optional()),headerBackground:ne.property("header-background",dv.optional()),cardBackground:ne.property("card-background",dv.optional()),accent1:ne.property("accent-1",dv.optional()),accent2:ne.property("accent-2",dv.optional()),accent3:ne.property("accent-3",dv.optional()),accent4:ne.property("accent-4",dv.optional()),accent5:ne.property("accent-5",dv.optional()),accent6:ne.property("accent-6",dv.optional()),accent7:ne.property("accent-7",dv.optional()),accent8:ne.property("accent-8",dv.optional()),accent9:ne.property("accent-9",dv.optional()),accent10:ne.property("accent-10",dv.optional()),accent11:ne.property("accent-11",dv.optional()),accent12:ne.property("accent-12",dv.optional())})});var SRr,Cfo=h(()=>{"use strict";Br();SRr=ne.enum_(["center","left"])});var TRr,xfo=h(()=>{"use strict";Br();TRr=ne.undiscriminatedUnion([ne.string(),ne.list(ne.string())])});var ORr,wfo=h(()=>{"use strict";Br();ORr=ne.undiscriminatedUnion([ne.string(),ne.list(ne.string())])});var PRr,Sfo=h(()=>{"use strict";Br();PRr=ne.object({title:ne.string(),subtitle:ne.string().optional(),url:ne.string(),icon:ne.string().optional(),default:ne.boolean().optional()})});var BRr,Tfo=h(()=>{"use strict";Br();BRr=ne.enum_(["github","dashboard"])});var RRr,Ofo=h(()=>{"use strict";Br();RRr=ne.object({host:ne.string().optional(),owner:ne.string(),repo:ne.string(),branch:ne.string().optional()})});var DRr,Pfo=h(()=>{"use strict";Br();Tfo();Ofo();DRr=ne.object({github:RRr.optional(),launch:BRr.optional()})});var kRr,Bfo=h(()=>{"use strict";Br();_tt();wfo();Pfo();kRr=ne.object({url:ne.string(),customDomain:ne.property("custom-domain",ORr.optional()),editThisPage:ne.property("edit-this-page",DRr.optional()),audiences:E$.optional(),multiSource:ne.property("multi-source",ne.boolean().optional())})});var FRr,Rfo=h(()=>{"use strict";Br();FRr=ne.object({allowedOrigins:ne.property("allowed-origins",ne.list(ne.string()))})});var NRr,Dfo=h(()=>{"use strict";Br();NRr=ne.enum_(["curl","csharp","go","java","javascript","php","python","ruby","swift","typescript"])});var jRr,kfo=h(()=>{"use strict";Br();Dfo();jRr=ne.undiscriminatedUnion([ne.boolean(),ne.list(NRr)])});var VIe,f6t=h(()=>{"use strict";Br();VIe=ne.string()});var zRr,Ffo=h(()=>{"use strict";Br();zRr=ne.object({prioritizeCurrentProduct:ne.property("prioritize-current-product",ne.boolean().optional()),defaultFilterByCurrentProduct:ne.property("default-filter-by-current-product",ne.boolean().optional())})});var Htt,QRr=h(()=>{"use strict";Br();Htt=ne.enum_(["frontmatter","filename"])});var MRr,Nfo=h(()=>{"use strict";Br();MRr=ne.enum_(["flat","grouped"])});var LRr,jfo=h(()=>{"use strict";Br();Rfo();kfo();f6t();Ffo();QRr();Nfo();LRr=ne.object({searchText:ne.property("search-text",ne.string().optional()),disableSearch:ne.property("disable-search",ne.boolean().optional()),darkModeCode:ne.property("dark-mode-code",ne.boolean().optional()),defaultSearchFilters:ne.property("default-search-filters",ne.boolean().optional()),search:zRr.optional(),httpSnippets:ne.property("http-snippets",jRr.optional()),hide404Page:ne.property("hide-404-page",ne.boolean().optional()),useJavascriptAsTypescript:ne.property("use-javascript-as-typescript",ne.boolean().optional()),disableExplorerProxy:ne.property("disable-explorer-proxy",ne.boolean().optional()),disableEnvironmentEditing:ne.property("disable-environment-editing",ne.boolean().optional()),disableAnalytics:ne.property("disable-analytics",ne.boolean().optional()),language:VIe.optional(),folderTitleSource:ne.property("folder-title-source",Htt.optional()),substituteEnvVars:ne.property("substitute-env-vars",ne.boolean().optional()),websocketOneofDisplay:ne.property("websocket-oneof-display",MRr.optional()),embedding:FRr.optional(),showHeadersInExamples:ne.property("show-headers-in-examples",ne.boolean().optional())})});var Ktt,_Rr=h(()=>{"use strict";Br();Ktt=ne.enum_(["normal","italic"])});var Jtt,URr=h(()=>{"use strict";Br();Jtt=ne.undiscriminatedUnion([ne.string(),ne.number()])});var VRr,zfo=h(()=>{"use strict";Br();_Rr();URr();VRr=ne.object({path:ne.string(),weight:Jtt.optional(),style:Ktt.optional()})});var GRr,Qfo=h(()=>{"use strict";Br();zfo();GRr=ne.undiscriminatedUnion([ne.string(),VRr])});var qRr,Mfo=h(()=>{"use strict";Br();qRr=ne.enum_(["auto","block","swap","fallback","optional"])});var Ytt,Lfo=h(()=>{"use strict";Br();Qfo();Mfo();_Rr();URr();Ytt=ne.object({name:ne.string().optional(),path:ne.string().optional(),weight:Jtt.optional(),style:Ktt.optional(),paths:ne.list(GRr).optional(),display:qRr.optional(),fallback:ne.list(ne.string()).optional(),fontVariationSettings:ne.property("font-variation-settings",ne.string().optional())})});var WRr,_fo=h(()=>{"use strict";Br();Lfo();WRr=ne.object({headingsFont:Ytt.optional(),bodyFont:Ytt.optional(),codeFont:Ytt.optional()})});var HRr,Ufo=h(()=>{"use strict";Br();HRr=ne.object({url:ne.string(),locale:ne.string().optional()})});var KRr,Vfo=h(()=>{"use strict";Br();Ufo();KRr=ne.undiscriminatedUnion([ne.string(),HRr])});var JRr,Gfo=h(()=>{"use strict";Br();Vfo();JRr=ne.object({mdxComponents:ne.property("mdx-components",ne.list(ne.string()).optional()),disableStreamToggle:ne.property("disable-stream-toggle",ne.boolean().optional()),openapiParserV2:ne.property("openapi-parser-v2",ne.boolean().optional()),openapiParserV3:ne.property("openapi-parser-v3",ne.boolean().optional()),dynamicSnippets:ne.property("dynamic-snippets",ne.boolean().optional()),aiExamples:ne.property("ai-examples",ne.boolean().optional()),aiExampleStyleInstructions:ne.property("ai-example-style-instructions",ne.string().optional()),excludeApis:ne.property("exclude-apis",ne.boolean().optional()),basepathAware:ne.property("basepath-aware",ne.boolean().optional()),robotsTxtOnInstanceUrl:ne.property("robots-txt-on-instance-url",ne.boolean().optional()),externalSitemaps:ne.property("external-sitemaps",ne.list(KRr).optional())})});var YRr,qfo=h(()=>{"use strict";Br();YRr=ne.object({github:ne.string().optional(),twitter:ne.string().optional(),x:ne.string().optional(),linkedin:ne.string().optional(),youtube:ne.string().optional(),instagram:ne.string().optional(),facebook:ne.string().optional(),discord:ne.string().optional(),slack:ne.string().optional(),hackernews:ne.string().optional(),medium:ne.string().optional(),website:ne.string().optional()})});var XRr,Wfo=h(()=>{"use strict";Br();XRr=ne.object({intercom:ne.string().optional(),context7:ne.string().optional()})});var Xtt,ZRr=h(()=>{"use strict";Br();Xtt=ne.enum_(["beforeInteractive","afterInteractive","lazyOnload"])});var $Rr,Hfo=h(()=>{"use strict";Br();ZRr();$Rr=ne.object({path:ne.string(),strategy:Xtt.optional()})});var eDr,Kfo=h(()=>{"use strict";Br();Hfo();eDr=ne.undiscriminatedUnion([ne.string(),$Rr])});var tDr,Jfo=h(()=>{"use strict";Br();ZRr();tDr=ne.object({url:ne.string(),strategy:Xtt.optional(),disableSri:ne.property("disable-sri",ne.boolean().optional())})});var d6t,Yfo=h(()=>{"use strict";Br();Kfo();Jfo();d6t=ne.undiscriminatedUnion([tDr,eDr])});var rDr,Xfo=h(()=>{"use strict";Br();Yfo();rDr=ne.undiscriminatedUnion([d6t,ne.list(d6t)])});var nDr,Zfo=h(()=>{"use strict";Br();nDr=ne.enum_(["fixed","static"])});var iDr,$fo=h(()=>{"use strict";Br();iDr=ne.enum_(["header","header-tabs","sidebar"])});var oDr,edo=h(()=>{"use strict";Br();oDr=ne.enum_(["header","sidebar"])});var Ztt,sDr=h(()=>{"use strict";Br();Ztt=ne.enum_(["header","sidebar"])});var aDr,tdo=h(()=>{"use strict";Br();ufo();hfo();gfo();Cfo();Zfo();$fo();edo();sDr();aDr=ne.object({pageWidth:ne.property("page-width",ne.string().optional()),contentWidth:ne.property("content-width",ne.string().optional()),sidebarWidth:ne.property("sidebar-width",ne.string().optional()),headerHeight:ne.property("header-height",ne.string().optional()),searchbarPlacement:ne.property("searchbar-placement",iDr.optional()),tabsPlacement:ne.property("tabs-placement",Ztt.optional()),switcherPlacement:ne.property("switcher-placement",oDr.optional()),contentAlignment:ne.property("content-alignment",SRr.optional()),headerPosition:ne.property("header-position",nDr.optional()),disableHeader:ne.property("disable-header",ne.boolean().optional()),hideNavLinks:ne.property("hide-nav-links",ne.boolean().optional()),hideFeedback:ne.property("hide-feedback",ne.boolean().optional()),mobileToc:ne.property("mobile-toc",ne.boolean().optional()),changelogLayout:ne.property("changelog-layout",IRr.optional()),apiReferenceLayout:ne.property("api-reference-layout",uRr.optional()),apiReferenceExpandProperties:ne.property("api-reference-expand-properties",ne.boolean().optional()),showNavAvailabilityBadges:ne.property("show-nav-availability-badges",ne.boolean().optional()),breadcrumbs:bRr.optional()})});var cDr,rdo=h(()=>{"use strict";Br();cDr=ne.object({doxyfile:ne.string().optional(),includeUndocumentedMacros:ne.property("include-undocumented-macros",ne.boolean().optional())})});var uDr,ndo=h(()=>{"use strict";Br();uDr=ne.object({git:ne.string(),subpath:ne.string().optional(),ref:ne.string().optional()})});var lDr,ido=h(()=>{"use strict";Br();lDr=ne.object({path:ne.string()})});var pDr,odo=h(()=>{"use strict";Br();ndo();ido();pDr=ne.undiscriminatedUnion([uDr,lDr])});var fDr,sdo=h(()=>{"use strict";Br();fDr=ne.enum_(["python","cpp"])});var dDr,ado=h(()=>{"use strict";Br();dDr=ne.object({path:ne.string()})});var mDr,cdo=h(()=>{"use strict";Br();rdo();odo();sdo();ado();mDr=ne.object({input:pDr,output:dDr,lang:fDr,config:cDr.optional()})});var $tt,hDr=h(()=>{"use strict";Br();$tt=ne.string()});var gDr,udo=h(()=>{"use strict";Br();gDr=ne.object({dark:ne.string().optional(),light:ne.string().optional(),height:ne.number().optional(),href:ne.string().optional(),rightText:ne.property("right-text",ne.string().optional())})});var ADr,ldo=h(()=>{"use strict";Br();ADr=ne.enum_(["dark","light"])});var yDr,pdo=h(()=>{"use strict";Br();yDr=ne.enum_(["summary","summary_large_image","app","player"])});var bDr,fdo=h(()=>{"use strict";Br();ldo();pdo();bDr=ne.object({ogSiteName:ne.property("og:site_name",ne.string().optional()),ogTitle:ne.property("og:title",ne.string().optional()),ogDescription:ne.property("og:description",ne.string().optional()),ogUrl:ne.property("og:url",ne.string().optional()),ogImage:ne.property("og:image",ne.string().optional()),ogImageWidth:ne.property("og:image:width",ne.number().optional()),ogImageHeight:ne.property("og:image:height",ne.number().optional()),ogLocale:ne.property("og:locale",ne.string().optional()),ogLogo:ne.property("og:logo",ne.string().optional()),twitterTitle:ne.property("twitter:title",ne.string().optional()),twitterDescription:ne.property("twitter:description",ne.string().optional()),twitterHandle:ne.property("twitter:handle",ne.string().optional()),twitterImage:ne.property("twitter:image",ne.string().optional()),twitterSite:ne.property("twitter:site",ne.string().optional()),twitterUrl:ne.property("twitter:url",ne.string().optional()),twitterCard:ne.property("twitter:card",yDr.optional()),ogDynamic:ne.property("og:dynamic",ne.boolean().optional()),ogDynamicBackgroundImage:ne.property("og:dynamic:background-image",ne.string().optional()),ogDynamicTextColor:ne.property("og:dynamic:text-color",ne.string().optional()),ogDynamicBackgroundColor:ne.property("og:dynamic:background-color",ne.string().optional()),ogDynamicLogoColor:ne.property("og:dynamic:logo-color",ADr.optional()),ogDynamicShowLogo:ne.property("og:dynamic:show-logo",ne.boolean().optional()),ogDynamicShowSection:ne.property("og:dynamic:show-section",ne.boolean().optional()),ogDynamicShowDescription:ne.property("og:dynamic:show-description",ne.boolean().optional()),ogDynamicShowUrl:ne.property("og:dynamic:show-url",ne.boolean().optional()),ogDynamicShowGradient:ne.property("og:dynamic:show-gradient",ne.boolean().optional()),canonicalHost:ne.property("canonical-host",ne.string().optional())})});var GIe,m6t=h(()=>{"use strict";Br();sRr();GIe=ne.object({viewers:Gtt.optional()})});var w$,EDr=h(()=>{"use strict";Br();kLe();m6t();w$=ne.object({href:ne.string().optional(),target:GV.optional(),url:ne.string().optional(),text:ne.string().optional(),icon:ne.string().optional(),rightIcon:ne.string().optional(),rounded:ne.boolean().optional()}).extend(GIe)});var IDr,ddo=h(()=>{"use strict";Br();EDr();m6t();IDr=ne.object({links:ne.list(w$),text:ne.string().optional(),icon:ne.string().optional(),rightIcon:ne.string().optional(),rounded:ne.boolean().optional()}).extend(GIe)});var vDr,mdo=h(()=>{"use strict";Br();kLe();m6t();vDr=ne.object({url:ne.string(),target:GV.optional()}).extend(GIe)});var CDr,hdo=h(()=>{"use strict";Br();mdo();CDr=ne.undiscriminatedUnion([ne.string(),vDr])});var xDr,gdo=h(()=>{"use strict";Br();ddo();hdo();EDr();xDr=ne.union("type",{filled:w$,outlined:w$,minimal:w$,github:ne.object({value:CDr}),dropdown:IDr,primary:w$,secondary:w$}).transform({transform:e=>e,untransform:e=>e})});var WV,NLe=h(()=>{"use strict";Br();WV=ne.string()});var wDr,Ado=h(()=>{"use strict";Br();j3();NLe();wDr=ne.object({tab:WV,layout:ne.list(ne.lazy(()=>S$)).optional()})});var SDr,ydo=h(()=>{"use strict";Br();j3();nT();iT();SDr=ne.object({title:ne.string(),subtitle:ne.string().optional(),icon:ne.string().optional(),layout:ne.list(ne.lazy(()=>S$)),slug:ne.string().optional(),skipSlug:ne.property("skip-slug",ne.boolean().optional()),hidden:ne.boolean().optional(),default:ne.boolean().optional()}).extend(Jd).extend(Kd)});var TDr,bdo=h(()=>{"use strict";Br();NLe();ydo();TDr=ne.object({tab:WV,variants:ne.list(SDr)})});var ODr,Edo=h(()=>{"use strict";Br();Ado();bdo();ODr=ne.undiscriminatedUnion([wDr,TDr])});var PDr,Ido=h(()=>{"use strict";Br();Edo();PDr=ne.list(ODr)});var BDr,vdo=h(()=>{"use strict";Br();j3();BDr=ne.list(ne.lazy(()=>S$))});var qIe,h6t=h(()=>{"use strict";Br();Ido();vdo();qIe=ne.undiscriminatedUnion([BDr,PDr])});var RDr,Cdo=h(()=>{"use strict";Br();RDr=ne.enum_(["copy-page","view-as-markdown","ask-ai","chatgpt","claude","cursor","claude-code","vscode"])});var DDr,xdo=h(()=>{"use strict";Br();DDr=ne.object({name:ne.string(),description:ne.string().optional(),url:ne.string().optional()})});var kDr,wdo=h(()=>{"use strict";Br();kDr=ne.undiscriminatedUnion([ne.string(),ne.list(ne.string())])});var FDr,Sdo=h(()=>{"use strict";Br();xdo();wdo();FDr=ne.object({title:ne.string().optional(),description:ne.string().optional(),learnMoreUrl:ne.property("learn-more-url",ne.string().optional()),repository:ne.string().optional(),installCommand:ne.property("install-command",kDr.optional()),skills:ne.list(DDr).optional()})});var NDr,Tdo=h(()=>{"use strict";Br();Sfo();Sdo();NDr=ne.object({copyPage:ne.property("copy-page",ne.boolean().optional()),viewAsMarkdown:ne.property("view-as-markdown",ne.boolean().optional()),askAi:ne.property("ask-ai",ne.boolean().optional()),chatgpt:ne.boolean().optional(),claude:ne.boolean().optional(),claudeCode:ne.property("claude-code",ne.boolean().optional()),cursor:ne.boolean().optional(),mcp:ne.boolean().optional(),vscode:ne.boolean().optional(),custom:ne.list(PRr).optional(),skills:FDr.optional()})});var jDr,Odo=h(()=>{"use strict";Br();Cdo();Tdo();jDr=ne.object({default:RDr.optional(),options:NDr.optional()})});var zDr,Pdo=h(()=>{"use strict";Br();zDr=ne.enum_(["deprecated","legacy","ga","stable","beta","alpha","preview"])});var ert,QDr=h(()=>{"use strict";Br();c6t();_tt();Pdo();nT();iT();ert=ne.object({displayName:ne.property("display-name",ne.string()),path:ne.string().optional(),ref:ne.string().optional(),slug:ne.string().optional(),availability:zDr.optional(),audiences:E$.optional(),hidden:ne.boolean().optional(),announcement:UIe.optional()}).extend(Jd).extend(Kd)});var trt,MDr=h(()=>{"use strict";Br();_tt();QDr();nT();iT();trt=ne.object({displayName:ne.property("display-name",ne.string()),subtitle:ne.string().optional(),icon:ne.string().optional(),image:ne.string().optional(),versions:ne.list(ert).optional(),audiences:E$.optional()}).extend(Jd).extend(Kd)});var LDr,Bdo=h(()=>{"use strict";Br();MDr();kLe();LDr=ne.object({href:ne.string(),target:GV.optional()}).extend(trt)});var _Dr,Rdo=h(()=>{"use strict";Br();c6t();MDr();_Dr=ne.object({path:ne.string(),slug:ne.string().optional(),announcement:UIe.optional()}).extend(trt)});var UDr,Ddo=h(()=>{"use strict";Br();Bdo();Rdo();UDr=ne.undiscriminatedUnion([_Dr,LDr])});var VDr,kdo=h(()=>{"use strict";Br();VDr=ne.enum_(["typescript","javascript","python","java","go","ruby","csharp","php","swift","rust","nodets","nodejs","dotnet","curl","jvm","ts","js"])});var GDr,Fdo=h(()=>{"use strict";Br();GDr=ne.object({source:ne.string(),destination:ne.string(),permanent:ne.boolean().optional()})});var qDr,Ndo=h(()=>{"use strict";Br();Fdo();qDr=ne.undiscriminatedUnion([ne.list(GDr),ne.string(),ne.list(ne.string())])});var WIe,g6t=h(()=>{"use strict";Br();p6t();kLe();nT();iT();WIe=ne.object({displayName:ne.property("display-name",ne.string()),icon:ne.string().optional(),slug:ne.string().optional(),skipSlug:ne.property("skip-slug",ne.boolean().optional()),hidden:ne.boolean().optional(),href:ne.string().optional(),target:GV.optional(),changelog:kfe.optional(),blog:kfe.optional()}).extend(Jd).extend(Kd)});var WDr,jdo=h(()=>{"use strict";Br();WDr=ne.enum_(["default","minimal"])});var HDr,zdo=h(()=>{"use strict";Br();HDr=ne.enum_(["default","minimal"])});var KDr,Qdo=h(()=>{"use strict";Br();KDr=ne.enum_(["default","toolbar"])});var JDr,Mdo=h(()=>{"use strict";Br();JDr=ne.enum_(["default","toggle","tabs"])});var YDr,Ldo=h(()=>{"use strict";Br();YDr=ne.enum_(["default","minimal"])});var XDr,_do=h(()=>{"use strict";Br();XDr=ne.object({enabled:ne.boolean().optional(),order:ne.list(ne.string()).optional(),hide:ne.list(ne.string()).optional(),labels:ne.record(ne.string(),ne.string()).optional(),showProducts:ne.property("show-products",ne.boolean().optional())})});var ZDr,Udo=h(()=>{"use strict";Br();ZDr=ne.enum_(["left","center"])});var rrt,$Dr=h(()=>{"use strict";Br();rrt=ne.enum_(["default","bubble"])});var ekr,Vdo=h(()=>{"use strict";Br();Udo();sDr();$Dr();ekr=ne.object({style:rrt.optional(),alignment:ZDr.optional(),placement:Ztt.optional()})});var tkr,Gdo=h(()=>{"use strict";Br();Vdo();$Dr();tkr=ne.undiscriminatedUnion([rrt,ekr])});var rkr,qdo=h(()=>{"use strict";Br();mfo();jdo();zdo();Qdo();Mdo();Ldo();_do();Gdo();rkr=ne.object({sidebar:YDr.optional(),body:yRr.optional(),tabs:tkr.optional(),pageActions:ne.property("page-actions",KDr.optional()),footerNav:ne.property("footer-nav",WDr.optional()),languageSwitcher:ne.property("language-switcher",HDr.optional()),productSwitcher:ne.property("product-switcher",JDr.optional()),siteSwitcher:ne.property("site-switcher",XDr.optional())})});var nkr,Wdo=h(()=>{"use strict";Br();f6t();nkr=ne.object({lang:VIe,default:ne.boolean().optional()})});var ikr,Hdo=h(()=>{"use strict";Br();f6t();Wdo();ikr=ne.undiscriminatedUnion([VIe,nkr])});var $mc,ehc=h(()=>{"use strict";Br();Bpo();Npo();jpo();Vpo();c6t();ffo();ERr();bfo();vfo();xfo();Bfo();jfo();_fo();Gfo();qfo();Wfo();Xfo();tdo();cdo();hDr();udo();fdo();gdo();h6t();Odo();FLe();Ddo();kdo();Ndo();oRr();g6t();NLe();qdo();Hdo();QDr();$mc=ne.object({instances:ne.list(kRr),title:ne.string().optional(),libraries:ne.record($tt,mDr).optional(),analytics:GBr.optional(),announcement:UIe.optional(),roles:ne.list(DLe).optional(),tabs:ne.record(WV,WIe).optional(),versions:ne.list(ert).optional(),products:ne.list(UDr).optional(),changelog:Wtt.optional(),landingPage:ne.property("landing-page",qV.optional()),navigation:qIe.optional(),navbarLinks:ne.property("navbar-links",ne.list(xDr).optional()),footerLinks:ne.property("footer-links",YRr.optional()),pageActions:ne.property("page-actions",jDr.optional()),globalTheme:ne.property("global-theme",ne.string().optional()),experimental:JRr.optional(),defaultLanguage:ne.property("default-language",VDr.optional()),languages:ne.list(ne.string()).optional(),translations:ne.list(ikr).optional(),aiChat:ne.property("ai-chat",a6t.optional()),aiSearch:ne.property("ai-search",a6t.optional()),aiExamples:ne.property("ai-examples",zBr.optional()),agents:DBr.optional(),metadata:bDr.optional(),redirects:qDr.optional(),check:CRr.optional(),logo:gDr.optional(),favicon:ne.string().optional(),backgroundImage:ne.property("background-image",gRr.optional()),colors:wRr.optional(),typography:WRr.optional(),layout:aDr.optional(),settings:LRr.optional(),theme:rkr.optional(),integrations:XRr.optional(),css:TRr.optional(),js:rDr.optional(),header:ne.string().optional(),footer:ne.string().optional()})});var okr,Kdo=h(()=>{"use strict";Br();I$();Utt();QRr();nT();iT();okr=ne.object({folder:ne.string(),title:ne.string().optional(),titleSource:ne.property("title-source",Htt.optional()),slug:ne.string().optional(),icon:ne.string().optional(),hidden:ne.boolean().optional(),skipSlug:ne.property("skip-slug",ne.boolean().optional()),collapsed:v$.optional(),collapsible:ne.boolean().optional(),collapsedByDefault:ne.property("collapsed-by-default",ne.boolean().optional()),availability:rT.optional()}).extend(Jd).extend(Kd)});var skr,Jdo=h(()=>{"use strict";Br();hDr();nT();iT();skr=ne.object({library:$tt,title:ne.string().optional(),slug:ne.string().optional()}).extend(Jd).extend(Kd)});var S$,thc=h(()=>{"use strict";Br();j3();afo();dfo();ERr();Kdo();Jdo();pRr();FLe();S$=ne.undiscriminatedUnion([qV,ne.lazyObject(()=>akr),aRr,skr,qtt,Wtt,ARr,okr])});var rhc,nhc=h(()=>{"use strict";Br();h6t();FLe();g6t();NLe();rhc=ne.object({tabs:ne.record(WV,WIe).optional(),landingPage:ne.property("landing-page",qV.optional()),navigation:qIe})});var ckr,Ydo=h(()=>{"use strict";Br();nT();iT();ckr=ne.object({displayName:ne.property("display-name",ne.string()),path:ne.string(),slug:ne.string().optional()}).extend(Jd).extend(Kd)});var ihc,ohc=h(()=>{"use strict";Br();Opo();Ydo();ihc=ne.undiscriminatedUnion([ckr,BBr])});var akr,shc=h(()=>{"use strict";Br();j3();I$();Utt();nT();iT();akr=ne.object({section:ne.string(),path:ne.string().optional(),contents:ne.list(ne.lazy(()=>S$)),collapsed:v$.optional(),collapsible:ne.boolean().optional(),collapsedByDefault:ne.property("collapsed-by-default",ne.boolean().optional()),slug:ne.string().optional(),icon:ne.string().optional(),hidden:ne.boolean().optional(),skipSlug:ne.property("skip-slug",ne.boolean().optional()),availability:rT.optional()}).extend(Jd).extend(Kd)});var ahc,chc=h(()=>{"use strict";Br();h6t();FLe();g6t();NLe();ahc=ne.object({tabs:ne.record(WV,WIe).optional(),landingPage:ne.property("landing-page",qV.optional()),navigation:qIe})});var Xdo=h(()=>{"use strict";Opo();Bpo();Npo();Dpo();kpo();Fpo();Rpo();jpo();Vpo();c6t();afo();cfo();ufo();Jmc();lfo();Ymc();Xmc();Zmc();Xpo();Gpo();Wpo();qpo();Hpo();Kpo();Jpo();Ypo();_tt();Zpo();I$();ffo();pfo();dfo();mfo();hfo();ERr();p6t();gfo();bfo();Afo();yfo();$po();Utt();Ifo();vfo();Efo();Cfo();xfo();wfo();Sfo();ehc();Bfo();jfo();_fo();Pfo();Tfo();Rfo();Gfo();Bdo();Vfo();Ufo();ofo();sfo();Kdo();Lfo();Qfo();zfo();Mfo();_Rr();URr();qfo();jdo();zpo();Ofo();ndo();Qpo();Mpo();Zfo();Dfo();kfo();Wfo();Lpo();Rdo();Xfo();Yfo();Kfo();Hfo();Jfo();ZRr();f6t();zdo();tdo();rdo();cdo();odo();sdo();hDr();ado();Jdo();pRr();udo();fdo();ddo();hdo();mdo();gdo();EDr();h6t();thc();ldo();Cdo();Tdo();Odo();Qdo();FLe();Ppo();ido();efo();Vtt();_po();Ddo();MDr();nhc();ohc();Mdo();kdo();Fdo();Ndo();Ydo();sRr();oRr();$fo();Ffo();shc();Upo();Ldo();_do();xdo();wdo();Sdo();rfo();nfo();ifo();edo();Ido();Edo();Ado();bdo();g6t();NLe();Udo();sDr();Gdo();Vdo();$Dr();ydo();kLe();qdo();QRr();Hdo();Wdo();pdo();vdo();Pdo();QDr();tfo();chc();Nfo();nT();iT();m6t()});var Zdo={};ee(Zdo,{AbsoluteProductPath:()=>BBr,AgentsConfig:()=>DBr,AiChatConfig:()=>a6t,AiChatDatasource:()=>FBr,AiChatLocation:()=>NBr,AiChatModel:()=>jBr,AiChatWebsiteDatasource:()=>kBr,AiExamplesConfig:()=>zBr,AnalyticsConfig:()=>GBr,AnnouncementConfig:()=>UIe,ApiReferenceConfiguration:()=>aRr,ApiReferenceEndpointConfiguration:()=>cRr,ApiReferenceLayout:()=>uRr,ApiReferenceLayoutItem:()=>x$,ApiReferenceOperationConfiguration:()=>lRr,ApiReferencePackageConfiguration:()=>fRr,ApiReferencePackageConfigurationWithOptions:()=>mRr,ApiReferenceSectionConfiguration:()=>dRr,ApiSpecConfiguration:()=>ZBr,ApiSpecErrorResponseApplyTo:()=>qBr,ApiSpecErrorResponseEnsure:()=>HBr,ApiSpecErrorResponseHttpMethod:()=>WBr,ApiSpecErrorResponseSchemaSource:()=>KBr,ApiSpecErrorResponses:()=>JBr,ApiSpecImportSettings:()=>YBr,ApiSpecType:()=>XBr,Audience:()=>E$,AudienceId:()=>u6t,Availability:()=>rT,BackgroundImageConfiguration:()=>gRr,BackgroundImageThemedConfig:()=>hRr,BlogConfiguration:()=>ARr,BodyThemeConfig:()=>yRr,BreadcrumbsConfig:()=>bRr,ChangelogConfiguration:()=>Wtt,ChangelogFolderRelativePath:()=>kfe,ChangelogLayout:()=>IRr,CheckConfig:()=>CRr,CheckRuleSeverity:()=>LH,CheckRulesConfig:()=>vRr,CollapsedStringValue:()=>$Br,CollapsedValue:()=>v$,ColorConfig:()=>dv,ColorThemedConfig:()=>xRr,ColorsConfiguration:()=>wRr,ContentAlignment:()=>SRr,CssConfig:()=>TRr,CustomDomain:()=>ORr,CustomPageAction:()=>PRr,DocsConfiguration:()=>$mc,DocsInstance:()=>kRr,DocsSettingsConfig:()=>LRr,DocsTypographyConfig:()=>WRr,EditThisPageConfig:()=>DRr,EditThisPageLaunch:()=>BRr,EmbeddingConfig:()=>FRr,ExperimentalConfig:()=>JRr,ExternalProduct:()=>LDr,ExternalSitemap:()=>KRr,ExternalSitemapConfig:()=>HRr,FeatureFlag:()=>l6t,FeatureFlagConfiguration:()=>iRr,FolderConfiguration:()=>okr,FontConfig:()=>Ytt,FontConfigPath:()=>GRr,FontConfigVariant:()=>VRr,FontDisplay:()=>qRr,FontStyle:()=>Ktt,FontWeight:()=>Jtt,FooterLinksConfig:()=>YRr,FooterNavThemeConfig:()=>WDr,FullStoryAnalyticsConfig:()=>QBr,GitLibraryInputSchema:()=>uDr,GithubEditThisPageConfig:()=>RRr,GoogleAnalytics4Config:()=>MBr,GtmConfig:()=>LBr,HeaderPosition:()=>nDr,HttpSnippetLanguage:()=>NRr,HttpSnippetsConfig:()=>jRr,IntegrationsConfig:()=>XRr,IntercomConfig:()=>_Br,InternalProduct:()=>_Dr,JsConfig:()=>rDr,JsConfigOptions:()=>d6t,JsFileConfig:()=>eDr,JsFileConfigSettings:()=>$Rr,JsRemoteConfig:()=>tDr,JsScriptStrategy:()=>Xtt,Language:()=>VIe,LanguageSwitcherThemeConfig:()=>HDr,LayoutConfig:()=>aDr,LibraryConfig:()=>cDr,LibraryConfiguration:()=>mDr,LibraryInputConfiguration:()=>pDr,LibraryLanguage:()=>fDr,LibraryName:()=>$tt,LibraryOutputConfiguration:()=>dDr,LibraryReferenceConfiguration:()=>skr,LinkConfiguration:()=>qtt,LogoConfiguration:()=>gDr,MetadataConfig:()=>bDr,NavbarDropdownConfig:()=>IDr,NavbarGithubConfig:()=>CDr,NavbarGithubConfigWithOptions:()=>vDr,NavbarLink:()=>xDr,NavbarLinkConfig:()=>w$,NavigationConfig:()=>qIe,NavigationItem:()=>S$,OgDynamicLogoColor:()=>ADr,PageActionOption:()=>RDr,PageActionOptions:()=>NDr,PageActionsConfig:()=>jDr,PageActionsThemeConfig:()=>KDr,PageConfiguration:()=>qV,PageDescriptionSource:()=>RBr,PathLibraryInputSchema:()=>lDr,PlaygroundButtonSettings:()=>eRr,PlaygroundSettings:()=>C$,PostHogConfig:()=>UBr,ProductConfig:()=>UDr,ProductConfigBase:()=>trt,ProductFileConfig:()=>rhc,ProductPath:()=>ihc,ProductSwitcherThemeConfig:()=>JDr,ProgrammingLanguage:()=>VDr,RedirectConfig:()=>GDr,RedirectsConfiguration:()=>qDr,RelativeProductPath:()=>ckr,Role:()=>Gtt,RoleId:()=>DLe,SearchSettingsConfig:()=>zRr,SearchbarPlacement:()=>iDr,SectionConfiguration:()=>akr,SegmentConfig:()=>VBr,SidebarThemeConfig:()=>YDr,SiteSwitcherThemeConfig:()=>XDr,SkillEntry:()=>DDr,SkillsInstallCommand:()=>kDr,SkillsPageActionConfig:()=>FDr,SnippetLanguageConfiguration:()=>VV,SnippetsConfiguration:()=>rRr,SortByAvailabilityValue:()=>nRr,SwitcherPlacement:()=>oDr,TabConfig:()=>WIe,TabId:()=>WV,TabVariant:()=>SDr,TabbedNavigationConfig:()=>PDr,TabbedNavigationItem:()=>ODr,TabbedNavigationItemWithLayout:()=>wDr,TabbedNavigationItemWithVariants:()=>TDr,TabsAlignment:()=>ZDr,TabsPlacement:()=>Ztt,TabsThemeConfig:()=>tkr,TabsThemeObjectConfig:()=>ekr,TabsThemeStyle:()=>rrt,Target:()=>GV,ThemeConfig:()=>rkr,TitleSource:()=>Htt,TranslationConfig:()=>ikr,TranslationConfigObject:()=>nkr,TwitterCardSetting:()=>yDr,UntabbedNavigationConfig:()=>BDr,VersionAvailability:()=>zDr,VersionConfig:()=>ert,VersionFileConfig:()=>ahc,VersionedSnippetLanguageConfiguration:()=>tRr,WebSocketOneofDisplay:()=>MRr,WithFeatureFlags:()=>Kd,WithPermissions:()=>Jd,WithViewers:()=>GIe});var uhc=h(()=>{"use strict";Xdo()});var lhc=h(()=>{"use strict";uhc();Xdo()});var hQ={};ee(hQ,{AbsoluteProductPath:()=>BBr,AgentsConfig:()=>DBr,AiChatConfig:()=>a6t,AiChatDatasource:()=>FBr,AiChatLocation:()=>NBr,AiChatModel:()=>jBr,AiChatWebsiteDatasource:()=>kBr,AiExamplesConfig:()=>zBr,AnalyticsConfig:()=>GBr,AnnouncementConfig:()=>UIe,ApiReferenceConfiguration:()=>aRr,ApiReferenceEndpointConfiguration:()=>cRr,ApiReferenceLayout:()=>uRr,ApiReferenceLayoutItem:()=>x$,ApiReferenceOperationConfiguration:()=>lRr,ApiReferencePackageConfiguration:()=>fRr,ApiReferencePackageConfigurationWithOptions:()=>mRr,ApiReferenceSectionConfiguration:()=>dRr,ApiSpecConfiguration:()=>ZBr,ApiSpecErrorResponseApplyTo:()=>qBr,ApiSpecErrorResponseEnsure:()=>HBr,ApiSpecErrorResponseHttpMethod:()=>WBr,ApiSpecErrorResponseSchemaSource:()=>KBr,ApiSpecErrorResponses:()=>JBr,ApiSpecImportSettings:()=>YBr,ApiSpecType:()=>XBr,Audience:()=>E$,AudienceId:()=>u6t,Availability:()=>rT,BackgroundImageConfiguration:()=>gRr,BackgroundImageThemedConfig:()=>hRr,BlogConfiguration:()=>ARr,BodyThemeConfig:()=>yRr,BreadcrumbsConfig:()=>bRr,ChangelogConfiguration:()=>Wtt,ChangelogFolderRelativePath:()=>kfe,ChangelogLayout:()=>IRr,CheckConfig:()=>CRr,CheckRuleSeverity:()=>LH,CheckRulesConfig:()=>vRr,CollapsedStringValue:()=>$Br,CollapsedValue:()=>v$,ColorConfig:()=>dv,ColorThemedConfig:()=>xRr,ColorsConfiguration:()=>wRr,ContentAlignment:()=>SRr,CssConfig:()=>TRr,CustomDomain:()=>ORr,CustomPageAction:()=>PRr,DocsConfiguration:()=>$mc,DocsInstance:()=>kRr,DocsSettingsConfig:()=>LRr,DocsTypographyConfig:()=>WRr,EditThisPageConfig:()=>DRr,EditThisPageLaunch:()=>BRr,EmbeddingConfig:()=>FRr,ExperimentalConfig:()=>JRr,ExternalProduct:()=>LDr,ExternalSitemap:()=>KRr,ExternalSitemapConfig:()=>HRr,FeatureFlag:()=>l6t,FeatureFlagConfiguration:()=>iRr,FolderConfiguration:()=>okr,FontConfig:()=>Ytt,FontConfigPath:()=>GRr,FontConfigVariant:()=>VRr,FontDisplay:()=>qRr,FontStyle:()=>Ktt,FontWeight:()=>Jtt,FooterLinksConfig:()=>YRr,FooterNavThemeConfig:()=>WDr,FullStoryAnalyticsConfig:()=>QBr,GitLibraryInputSchema:()=>uDr,GithubEditThisPageConfig:()=>RRr,GoogleAnalytics4Config:()=>MBr,GtmConfig:()=>LBr,HeaderPosition:()=>nDr,HttpSnippetLanguage:()=>NRr,HttpSnippetsConfig:()=>jRr,IntegrationsConfig:()=>XRr,IntercomConfig:()=>_Br,InternalProduct:()=>_Dr,JsConfig:()=>rDr,JsConfigOptions:()=>d6t,JsFileConfig:()=>eDr,JsFileConfigSettings:()=>$Rr,JsRemoteConfig:()=>tDr,JsScriptStrategy:()=>Xtt,Language:()=>VIe,LanguageSwitcherThemeConfig:()=>HDr,LayoutConfig:()=>aDr,LibraryConfig:()=>cDr,LibraryConfiguration:()=>mDr,LibraryInputConfiguration:()=>pDr,LibraryLanguage:()=>fDr,LibraryName:()=>$tt,LibraryOutputConfiguration:()=>dDr,LibraryReferenceConfiguration:()=>skr,LinkConfiguration:()=>qtt,LogoConfiguration:()=>gDr,MetadataConfig:()=>bDr,NavbarDropdownConfig:()=>IDr,NavbarGithubConfig:()=>CDr,NavbarGithubConfigWithOptions:()=>vDr,NavbarLink:()=>xDr,NavbarLinkConfig:()=>w$,NavigationConfig:()=>qIe,NavigationItem:()=>S$,OgDynamicLogoColor:()=>ADr,PageActionOption:()=>RDr,PageActionOptions:()=>NDr,PageActionsConfig:()=>jDr,PageActionsThemeConfig:()=>KDr,PageConfiguration:()=>qV,PageDescriptionSource:()=>RBr,PathLibraryInputSchema:()=>lDr,PlaygroundButtonSettings:()=>eRr,PlaygroundSettings:()=>C$,PostHogConfig:()=>UBr,ProductConfig:()=>UDr,ProductConfigBase:()=>trt,ProductFileConfig:()=>rhc,ProductPath:()=>ihc,ProductSwitcherThemeConfig:()=>JDr,ProgrammingLanguage:()=>VDr,RedirectConfig:()=>GDr,RedirectsConfiguration:()=>qDr,RelativeProductPath:()=>ckr,Role:()=>Gtt,RoleId:()=>DLe,SearchSettingsConfig:()=>zRr,SearchbarPlacement:()=>iDr,SectionConfiguration:()=>akr,SegmentConfig:()=>VBr,SidebarThemeConfig:()=>YDr,SiteSwitcherThemeConfig:()=>XDr,SkillEntry:()=>DDr,SkillsInstallCommand:()=>kDr,SkillsPageActionConfig:()=>FDr,SnippetLanguageConfiguration:()=>VV,SnippetsConfiguration:()=>rRr,SortByAvailabilityValue:()=>nRr,SwitcherPlacement:()=>oDr,TabConfig:()=>WIe,TabId:()=>WV,TabVariant:()=>SDr,TabbedNavigationConfig:()=>PDr,TabbedNavigationItem:()=>ODr,TabbedNavigationItemWithLayout:()=>wDr,TabbedNavigationItemWithVariants:()=>TDr,TabsAlignment:()=>ZDr,TabsPlacement:()=>Ztt,TabsThemeConfig:()=>tkr,TabsThemeObjectConfig:()=>ekr,TabsThemeStyle:()=>rrt,Target:()=>GV,ThemeConfig:()=>rkr,TitleSource:()=>Htt,TranslationConfig:()=>ikr,TranslationConfigObject:()=>nkr,TwitterCardSetting:()=>yDr,UntabbedNavigationConfig:()=>BDr,VersionAvailability:()=>zDr,VersionConfig:()=>ert,VersionFileConfig:()=>ahc,VersionedSnippetLanguageConfiguration:()=>tRr,WebSocketOneofDisplay:()=>MRr,WithFeatureFlags:()=>Kd,WithPermissions:()=>Jd,WithViewers:()=>GIe,docs:()=>Zdo});var j3=h(()=>{"use strict";lhc()});var phc=h(()=>{"use strict";cpo();kdc();zdc();j3()});var $do={};ee($do,{AiChatLocation:()=>Ilo,AiChatModel:()=>vlo,ApiReferenceLayout:()=>Clo,ApiSpecErrorResponseApplyTo:()=>xlo,ApiSpecErrorResponseHttpMethod:()=>wlo,ApiSpecType:()=>Slo,Availability:()=>Tlo,BodyThemeConfig:()=>Olo,ChangelogLayout:()=>Plo,CheckRuleSeverity:()=>Blo,CollapsedStringValue:()=>Rlo,ContentAlignment:()=>Dlo,EditThisPageLaunch:()=>klo,FernDocsConfig:()=>apo,FernDocsConfigError:()=>e6t,FernDocsConfigTimeoutError:()=>t6t,FontDisplay:()=>Flo,FontStyle:()=>Nlo,FooterNavThemeConfig:()=>jlo,HeaderPosition:()=>zlo,HttpSnippetLanguage:()=>Qlo,JsScriptStrategy:()=>Mlo,LanguageSwitcherThemeConfig:()=>Llo,LibraryLanguage:()=>_lo,OgDynamicLogoColor:()=>Ulo,PageActionOption:()=>Vlo,PageActionsThemeConfig:()=>Glo,PageDescriptionSource:()=>qlo,ProductSwitcherThemeConfig:()=>Wlo,ProgrammingLanguage:()=>Hlo,SearchbarPlacement:()=>Klo,Serializer:()=>hQ,SidebarThemeConfig:()=>Jlo,SortByAvailabilityValue:()=>Ylo,SwitcherPlacement:()=>Xlo,TabsAlignment:()=>Zlo,TabsPlacement:()=>$lo,TabsThemeStyle:()=>epo,Target:()=>tpo,TitleSource:()=>rpo,TwitterCardSetting:()=>npo,VersionAvailability:()=>ipo,WebSocketOneofDisplay:()=>opo,docs:()=>xBr,logging:()=>ppo,serialization:()=>hQ});var fhc=h(()=>{"use strict";phc();cpo();j3()});function Led(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}var dhc,mhc,_ed,hhc=h(()=>{"use strict";dhc={logo:"global",favicon:"global",backgroundImage:"global",colors:"global",typography:"global",layout:"global",settings:"global",theme:"global",integrations:"global",css:"global",js:"global",header:"global",footer:"global",navbarLinks:"global",footerLinks:"global",aiSearch:"global",announcement:"global",metadata:"global"},mhc=Object.keys(dhc);_ed=new Set(mhc.map(Led))});function Ahc(e){if(e.trim()!==e||e.length===0)return`Origin "${e}" must not be empty or contain surrounding whitespace`;if(e==="*"||e.startsWith("*"))return`Origin "${e}" is not allowed: a bare wildcard would let any site embed your docs. Use a scoped wildcard such as https://*.example.com instead`;if(!Ued.test(e))return`Origin "${e}" is not a valid origin. Expected scheme://host[:port] with no path, query, or CSP keywords, e.g. https://app.example.com or https://*.example.com`}function Ved(e){let t=[];return e.forEach((r,n)=>{let i=Ahc(r);i!=null&&t.push(`settings.embedding.allowed-origins[${n}]: ${i}`)}),t}var ghc,Ued,yhc=h(()=>{"use strict";ghc="[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?",Ued=new RegExp(`^https?://(?:\\*\\.)?${ghc}(?:\\.${ghc})*(?::\\d{1,5})?$`)});var sc={};ee(sc,{DEFAULT_BLOG_TITLE:()=>Ced,DEFAULT_CHANGELOG_TITLE:()=>ved,DocsYmlSchemas:()=>Elo,RawSchemas:()=>$do,THEME_ELIGIBLE_FIELDS:()=>mhc,THEME_ELIGIBLE_YAML_KEYS:()=>_ed,THEME_FIELD_POLICIES:()=>dhc,getChangelogFolderFromNavigationItem:()=>xed,getChangelogFolderFromTabConfig:()=>wed,getEmbeddingOriginErrors:()=>Ved,validateEmbeddingOrigin:()=>Ahc});var bhc=h(()=>{"use strict";glc();Alc();ylc();fhc();hhc();yhc()});var Ehc=h(()=>{"use strict"});async function T$({absolutePathToFernignore:e}){let t=(await(0,Ihc.readFile)(e)).toString();return vhc(t)}function vhc(e){return[eT,...e.trim().split(qed).map(t=>{let r=t.indexOf("#");return r!==-1?t.slice(0,r).trim():t.trim()}).filter(t=>t.length>0)]}var Ihc,qed,Chc=h(()=>{"use strict";Ihc=require("fs/promises");TOr();qed=/\r?\n/});function whc(e){return e.output?.location==="rubygems"&&e.github==null}var xhc,Shc=h(()=>{"use strict";xhc="Direct RubyGems publishing is not supported. Add a github block to this generator (for example, github: { repository: your-org/your-ruby-sdk }) so the gem is published by the GitHub Actions workflow generated in that repository."});function Ohc({generatorInvocation:e}){return e.language==="go"?Wed(e):e.outputMode._visit({downloadFiles:()=>{},github:t=>t.publishInfo?._visit({maven:r=>r.coordinate,npm:r=>r.packageName,pypi:r=>r.packageName,postman:()=>{},rubygems:r=>r.packageName,nuget:r=>r.packageName,crates:r=>r.packageName,_other:()=>{}}),githubV2:t=>t.publishInfo?._visit({maven:r=>r.coordinate,npm:r=>r.packageName,pypi:r=>r.packageName,postman:()=>{},rubygems:r=>r.packageName,nuget:r=>r.packageName,crates:r=>r.packageName,_other:()=>{}}),publish:()=>{},publishV2:()=>{},_other:()=>{}})}function Wed(e){return e.outputMode._visit({downloadFiles:()=>{},github:t=>`github.com/${t.owner}/${t.repo}`,githubV2:t=>`github.com/${t.owner}/${t.repo}`,publish:()=>{},publishV2:()=>{},_other:()=>{}})}var Thc,Phc=h(()=>{"use strict";Thc={TYPESCRIPT:"typescript",JAVA:"java",PYTHON:"python",GO:"go",RUBY:"ruby",CSHARP:"csharp",SWIFT:"swift",PHP:"php",RUST:"rust"}});function Bhc(e){return typeof e!="string"&&"proto"in e}var Rhc=h(()=>{"use strict"});function Dhc({rootAutomation:e,groupAutomation:t,generatorAutomation:r}){return{generate:r?.generate??t?.generate??e?.generate??ukr.generate,upgrade:r?.upgrade??t?.upgrade??e?.upgrade??ukr.upgrade,preview:r?.preview??t?.preview??e?.preview??ukr.preview,verify:r?.verify??t?.verify??e?.verify??ukr.verify}}var ukr,khc=h(()=>{"use strict";ukr={generate:!0,upgrade:!0,preview:!0,verify:!0}});var Fhc=h(()=>{"use strict"});var Nhc=h(()=>{"use strict"});var jhc,zhc=h(()=>{"use strict";jhc={Openai:"openai",Anthropic:"anthropic",AwsBedrock:"aws-bedrock"}});var emo=h(()=>{"use strict";Fhc();Nhc();zhc()});var tmo={};ee(tmo,{ModelProvider:()=>jhc});var Qhc=h(()=>{"use strict";emo()});var Mhc=h(()=>{"use strict"});var rmo=h(()=>{"use strict";Mhc()});var Lhc={};var _hc=h(()=>{"use strict";rmo()});var Uhc=h(()=>{"use strict"});var Vhc=h(()=>{"use strict"});var Ghc=h(()=>{"use strict"});var qhc=h(()=>{"use strict"});var Whc=h(()=>{"use strict"});var Hhc=h(()=>{"use strict"});var Khc=h(()=>{"use strict"});var Jhc=h(()=>{"use strict"});var Yhc=h(()=>{"use strict"});var Xhc=h(()=>{"use strict"});var Zhc=h(()=>{"use strict"});var $hc=h(()=>{"use strict"});var egc=h(()=>{"use strict"});var tgc,rgc=h(()=>{"use strict";tgc={ApiKey:"api-key",RefreshToken:"refresh-token"}});var ngc=h(()=>{"use strict"});var igc=h(()=>{"use strict"});var ogc=h(()=>{"use strict"});var sgc=h(()=>{"use strict"});var agc=h(()=>{"use strict"});var cgc,ugc=h(()=>{"use strict";cgc={ClientCredentials:"client-credentials",AuthorizationCode:"authorization-code",DeviceCode:"device-code"}});var lgc=h(()=>{"use strict"});var pgc=h(()=>{"use strict"});var fgc=h(()=>{"use strict"});var dgc=h(()=>{"use strict"});var mgc=h(()=>{"use strict"});var hgc=h(()=>{"use strict"});var ggc=h(()=>{"use strict"});var Agc=h(()=>{"use strict"});var ygc=h(()=>{"use strict"});var bgc=h(()=>{"use strict"});var nmo=h(()=>{"use strict";Uhc();Vhc();Ghc();qhc();Whc();Hhc();Khc();Jhc();Yhc();Xhc();Zhc();$hc();egc();rgc();ngc();igc();ogc();sgc();agc();ugc();lgc();pgc();fgc();dgc();mgc();hgc();ggc();Agc();ygc();bgc()});var imo={};ee(imo,{InferredAuthTypeSchema:()=>tgc,OAuthFlowTypeSchema:()=>cgc});var Egc=h(()=>{"use strict";nmo()});var Igc=h(()=>{"use strict"});var vgc,Cgc=h(()=>{"use strict";vgc={InDevelopment:"in-development",PreRelease:"pre-release",Deprecated:"deprecated",GenerallyAvailable:"generally-available"}});var xgc=h(()=>{"use strict"});var omo=h(()=>{"use strict";Igc();Cgc();xgc()});var smo={};ee(smo,{AvailabilityStatusSchema:()=>vgc});var wgc=h(()=>{"use strict";omo()});var Sgc=h(()=>{"use strict"});var Tgc=h(()=>{"use strict"});var Ogc=h(()=>{"use strict"});var Pgc=h(()=>{"use strict"});var amo=h(()=>{"use strict";Sgc();Tgc();Ogc();Pgc()});var Bgc={};var Rgc=h(()=>{"use strict";amo()});var Dgc=h(()=>{"use strict"});var kgc=h(()=>{"use strict"});var cmo=h(()=>{"use strict";Dgc();kgc()});var Fgc={};var Ngc=h(()=>{"use strict";cmo()});var jgc=h(()=>{"use strict"});var zgc=h(()=>{"use strict"});var Qgc=h(()=>{"use strict"});var Mgc=h(()=>{"use strict"});var Lgc=h(()=>{"use strict"});var umo=h(()=>{"use strict";jgc();zgc();Qgc();Mgc();Lgc()});var _gc={};var Ugc=h(()=>{"use strict";umo()});var Vgc=h(()=>{"use strict"});var lmo=h(()=>{"use strict";Vgc()});var Ggc={};var qgc=h(()=>{"use strict";lmo()});var Wgc=h(()=>{"use strict"});var Hgc=h(()=>{"use strict"});var Kgc=h(()=>{"use strict"});var pmo=h(()=>{"use strict";Wgc();Hgc();Kgc()});var Jgc={};var Ygc=h(()=>{"use strict";pmo()});var Xgc=h(()=>{"use strict"});var Zgc=h(()=>{"use strict"});var fmo=h(()=>{"use strict";Xgc();Zgc()});var $gc={};var eAc=h(()=>{"use strict";fmo()});var tAc=h(()=>{"use strict"});var rAc=h(()=>{"use strict"});var nAc=h(()=>{"use strict"});var iAc=h(()=>{"use strict"});var oAc=h(()=>{"use strict"});var dmo=h(()=>{"use strict";tAc();rAc();nAc();iAc();oAc()});var sAc={};var aAc=h(()=>{"use strict";dmo()});var cAc=h(()=>{"use strict";Egc();nmo();wgc();omo();Rgc();amo();Ngc();cmo();Ugc();umo();qgc();lmo();Ygc();pmo();eAc();fmo();aAc();dmo()});var mmo={};ee(mmo,{AvailabilityStatusSchema:()=>vgc,InferredAuthTypeSchema:()=>tgc,OAuthFlowTypeSchema:()=>cgc,auth:()=>imo,availability:()=>smo,commons:()=>Bgc,encoding:()=>Fgc,environments:()=>_gc,file:()=>Ggc,service:()=>Jgc,types:()=>$gc,validation:()=>sAc});var uAc=h(()=>{"use strict";cAc()});var lAc=h(()=>{"use strict"});var pAc=h(()=>{"use strict"});var fAc=h(()=>{"use strict"});var dAc=h(()=>{"use strict"});var mAc=h(()=>{"use strict"});var hAc=h(()=>{"use strict"});var gAc=h(()=>{"use strict"});var AAc=h(()=>{"use strict"});var yAc=h(()=>{"use strict"});var bAc=h(()=>{"use strict"});var EAc=h(()=>{"use strict"});var IAc=h(()=>{"use strict"});var vAc=h(()=>{"use strict"});var CAc,xAc=h(()=>{"use strict";CAc={Literals:"literals",Enums:"enums",EnumsCoerceableToLiterals:"enums-coerceable-to-literals"}});var wAc=h(()=>{"use strict"});var SAc,TAc=h(()=>{"use strict";SAc={Int32:"int32",Int64:"int64",Uint32:"uint32",Uint64:"uint64"}});var OAc,PAc=h(()=>{"use strict";OAc={Minimal:"minimal",Comprehensive:"comprehensive"}});var BAc,RAc=h(()=>{"use strict";BAc={Form:"form",Json:"json"}});var DAc=h(()=>{"use strict"});var kAc=h(()=>{"use strict"});var FAc=h(()=>{"use strict"});var NAc=h(()=>{"use strict"});var jAc=h(()=>{"use strict"});var zAc=h(()=>{"use strict"});var QAc,MAc=h(()=>{"use strict";QAc={Java:"java",Python:"python",Go:"go",Ruby:"ruby",Csharp:"csharp",Typescript:"typescript",Php:"php",Rust:"rust",Swift:"swift"}});var LAc,_Ac=h(()=>{"use strict";LAc={V1:"v1",V2:"v2"}});var UAc,VAc=h(()=>{"use strict";UAc={EnvironmentPerServer:"environment-per-server",UrlsPerEnvironment:"urls-per-environment"}});var GAc=h(()=>{"use strict"});var qAc,WAc=h(()=>{"use strict";qAc={All:"all",Untyped:"untyped"}});var HAc=h(()=>{"use strict"});var KAc,JAc=h(()=>{"use strict";KAc={Get:"get",Post:"post",Put:"put",Patch:"patch",Delete:"delete",Head:"head",Options:"options",Trace:"trace"}});var YAc=h(()=>{"use strict"});var XAc=h(()=>{"use strict"});var ZAc=h(()=>{"use strict"});var $Ac=h(()=>{"use strict"});var eyc=h(()=>{"use strict"});var tyc=h(()=>{"use strict"});var ryc=h(()=>{"use strict"});var nyc=h(()=>{"use strict"});var iyc=h(()=>{"use strict"});var oyc=h(()=>{"use strict"});var syc,ayc=h(()=>{"use strict";syc={UrlOrder:"url-order",SpecOrder:"spec-order"}});var cyc=h(()=>{"use strict"});var uyc=h(()=>{"use strict"});var lyc=h(()=>{"use strict"});var pyc=h(()=>{"use strict"});var fyc=h(()=>{"use strict"});var dyc=h(()=>{"use strict"});var myc=h(()=>{"use strict"});var hyc,gyc=h(()=>{"use strict";hyc={Always:"always",Never:"never"}});var Ayc=h(()=>{"use strict"});var yyc=h(()=>{"use strict"});var byc=h(()=>{"use strict"});var Eyc=h(()=>{"use strict"});var Iyc=h(()=>{"use strict"});var vyc=h(()=>{"use strict"});var Cyc,xyc=h(()=>{"use strict";Cyc={V1:"v1"}});var wyc=h(()=>{"use strict"});var Syc=h(()=>{"use strict"});var hmo=h(()=>{"use strict";lAc();pAc();fAc();dAc();mAc();hAc();gAc();AAc();yAc();bAc();EAc();IAc();vAc();xAc();wAc();TAc();PAc();RAc();DAc();kAc();FAc();NAc();jAc();zAc();MAc();_Ac();VAc();GAc();WAc();HAc();JAc();YAc();XAc();ZAc();$Ac();eyc();tyc();ryc();nyc();iyc();oyc();ayc();cyc();uyc();lyc();pyc();fyc();dyc();myc();gyc();Ayc();yyc();byc();Eyc();Iyc();vyc();xyc();wyc();Syc()});var gmo={};ee(gmo,{CoerceConstsTo:()=>CAc,DefaultIntegerFormat:()=>SAc,ExampleStyle:()=>OAc,FormParameterEncoding:()=>BAc,Language:()=>QAc,MessageNamingSettingsSchema:()=>LAc,MultiServerStrategy:()=>UAc,OpenApiErrorResponsesApplyTo:()=>qAc,OpenApiErrorResponsesHttpMethod:()=>KAc,PathParameterOrder:()=>syc,RemoveDiscriminantsFromSchemas:()=>hyc,UnionSettingsSchema:()=>Cyc});var Tyc=h(()=>{"use strict";hmo()});var Oyc=h(()=>{"use strict"});var Pyc=h(()=>{"use strict"});var Byc=h(()=>{"use strict"});var Ryc=h(()=>{"use strict"});var Dyc=h(()=>{"use strict"});var kyc=h(()=>{"use strict"});var Fyc=h(()=>{"use strict"});var Nyc=h(()=>{"use strict"});var jyc=h(()=>{"use strict"});var zyc=h(()=>{"use strict"});var Qyc=h(()=>{"use strict"});var Myc,Lyc=h(()=>{"use strict";Myc={Commit:"commit",Release:"release"}});var _yc=h(()=>{"use strict"});var Uyc=h(()=>{"use strict"});var Vyc=h(()=>{"use strict"});var Gyc=h(()=>{"use strict"});var qyc,Wyc=h(()=>{"use strict";qyc={PullRequest:"pull-request",Push:"push",CommitAndRelease:"commit-and-release"}});var Hyc=h(()=>{"use strict"});var Kyc=h(()=>{"use strict"});var Jyc=h(()=>{"use strict"});var Yyc=h(()=>{"use strict"});var Xyc=h(()=>{"use strict"});var Zyc=h(()=>{"use strict"});var $yc=h(()=>{"use strict"});var ebc=h(()=>{"use strict"});var tbc=h(()=>{"use strict"});var rbc=h(()=>{"use strict"});var Amo=h(()=>{"use strict";Oyc();Pyc();Byc();Ryc();Dyc();kyc();Fyc();Nyc();jyc();zyc();Qyc();Lyc();_yc();Uyc();Vyc();Gyc();Wyc();Hyc();Kyc();Jyc();Yyc();Xyc();Zyc();$yc();ebc();tbc();rbc()});var ymo={};ee(ymo,{GithubCommitAndReleaseMode:()=>Myc,GithubSelfhostedMode:()=>qyc});var nbc=h(()=>{"use strict";Amo()});var ibc=h(()=>{"use strict"});var obc=h(()=>{"use strict"});var sbc,abc=h(()=>{"use strict";sbc={Mit:"MIT",Apache:"Apache-2.0"}});var bmo=h(()=>{"use strict";ibc();obc();abc()});var Emo={};ee(Emo,{GithubLicenseType:()=>sbc});var cbc=h(()=>{"use strict";bmo()});var ubc=h(()=>{"use strict"});var Imo=h(()=>{"use strict";ubc()});var lbc={};var pbc=h(()=>{"use strict";Imo()});var fbc=h(()=>{"use strict"});var dbc=h(()=>{"use strict"});var vmo=h(()=>{"use strict";fbc();dbc()});var mbc={};var hbc=h(()=>{"use strict";vmo()});var gbc=h(()=>{"use strict";Qhc();emo();_hc();rmo();uAc();Tyc();hmo();nbc();Amo();cbc();bmo();pbc();Imo();hbc();vmo()});var Abc=h(()=>{"use strict";gbc()});var Ffe,ybc,Cmo,xmo,CU0,bbc=h(()=>{"use strict";Ffe={Debug:"debug",Info:"info",Warn:"warn",Error:"error"},ybc={[Ffe.Debug]:1,[Ffe.Info]:2,[Ffe.Warn]:3,[Ffe.Error]:4},Cmo=class{debug(t,...r){console.debug(t,...r)}info(t,...r){console.info(t,...r)}warn(t,...r){console.warn(t,...r)}error(t,...r){console.error(t,...r)}},xmo=class{level;logger;silent;constructor(t){this.level=ybc[t.level],this.logger=t.logger,this.silent=t.silent}shouldLog(t){return!this.silent&&this.level<=ybc[t]}isDebug(){return this.shouldLog(Ffe.Debug)}debug(t,...r){this.isDebug()&&this.logger.debug(t,...r)}isInfo(){return this.shouldLog(Ffe.Info)}info(t,...r){this.isInfo()&&this.logger.info(t,...r)}isWarn(){return this.shouldLog(Ffe.Warn)}warn(t,...r){this.isWarn()&&this.logger.warn(t,...r)}isError(){return this.shouldLog(Ffe.Error)}error(t,...r){this.isError()&&this.logger.error(t,...r)}},CU0=new xmo({level:Ffe.Info,logger:new Cmo,silent:!0})});var Ebc=h(()=>{"use strict"});var Ibc=h(()=>{"use strict";bbc()});var vbc=h(()=>{"use strict"});var il,CS=h(()=>{"use strict";il={BIGINT:"bigint",DATE:"date",ENUM:"enum",LIST:"list",STRING_LITERAL:"stringLiteral",BOOLEAN_LITERAL:"booleanLiteral",OBJECT:"object",ANY:"any",BOOLEAN:"boolean",NUMBER:"number",STRING:"string",UNKNOWN:"unknown",NEVER:"never",RECORD:"record",SET:"set",UNION:"union",UNDISCRIMINATED_UNION:"undiscriminatedUnion",NULLABLE:"nullable",OPTIONAL:"optional",OPTIONAL_NULLABLE:"optionalNullable"}});function vm(e,t){return`Expected ${t}. Received ${Ked(e)}.`}function Ked(e){if(Array.isArray(e))return"list";if(e===null)return"null";if(e instanceof BigInt)return"BigInt";switch(typeof e){case"string":return`"${e}"`;case"bigint":case"number":case"boolean":case"undefined":return`${e}`}return typeof e}var D2=h(()=>{"use strict"});function oT(e){return{...e,json:Cbc(e.json),parse:Cbc(e.parse)}}function Cbc(e){return(t,r)=>{let n=e(t,r),{skipValidation:i=!1}=r??{};return!n.ok&&i?(console.warn(["Failed to validate.",...n.errors.map(o=>" - "+(o.path.length>0?`${o.path.join(".")}: ${o.message}`:o.message))].join(`
|
|
141
|
+
`)),{ok:!0,value:t}):n}}var y$=h(()=>{"use strict"});function wBr(e){return e.path.length===0?e.message:`${e.path.join(" -> ")}: ${e.message}`}var fpo=h(()=>{"use strict"});var Qtt,dpo=h(()=>{"use strict";fpo();Qtt=class extends Error{errors;constructor(t){super(t.map(wBr).join("; ")),this.errors=t,Object.setPrototypeOf(this,new.target.prototype),this.name=this.constructor.name}}});var Mtt,mpo=h(()=>{"use strict";fpo();Mtt=class extends Error{errors;constructor(t){super(t.map(wBr).join("; ")),this.errors=t,Object.setPrototypeOf(this,new.target.prototype),this.name=this.constructor.name}}});function Im(e){return{nullable:()=>Bed(e),optional:()=>hpo(e),optionalNullable:()=>Red(e),transform:t=>gpo(e,t),parseOrThrow:(t,r)=>{let n=e.parse(t,r);if(n.ok)return n.value;throw new Mtt(n.errors)},jsonOrThrow:(t,r)=>{let n=e.json(t,r);if(n.ok)return n.value;throw new Qtt(n.errors)}}}function Bed(e){let t={parse:(r,n)=>r==null?{ok:!0,value:null}:e.parse(r,n),json:(r,n)=>r==null?{ok:!0,value:null}:e.json(r,n),getType:()=>yu.NULLABLE};return{...t,...Im(t)}}function hpo(e){let t={parse:(r,n)=>r==null?{ok:!0,value:void 0}:e.parse(r,n),json:(r,n)=>n?.omitUndefined&&r===void 0?{ok:!0,value:void 0}:r==null?{ok:!0,value:null}:e.json(r,n),getType:()=>yu.OPTIONAL};return{...t,...Im(t)}}function Red(e){let t={parse:(r,n)=>r===void 0?{ok:!0,value:void 0}:r===null?{ok:!0,value:null}:e.parse(r,n),json:(r,n)=>r===void 0?{ok:!0,value:void 0}:r===null?{ok:!0,value:null}:e.json(r,n),getType:()=>yu.OPTIONAL_NULLABLE};return{...t,...Im(t)}}function gpo(e,t){let r={parse:(n,i)=>{let o=e.parse(n,i);return o.ok?{ok:!0,value:t.transform(o.value)}:o},json:(n,i)=>{let o=t.untransform(n);return e.json(o,i)},getType:()=>e.getType()};return{...r,...Im(r)}}var Udc=h(()=>{"use strict";IS();dpo();mpo()});var mQ=h(()=>{"use strict";Udc();dpo();mpo()});function Vdc(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t=="bigint"?{ok:!0,value:t}:typeof t=="number"?{ok:!0,value:BigInt(t)}:{ok:!1,errors:[{path:r,message:Em(t,"bigint | number")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="bigint"?{ok:!1,errors:[{path:r,message:Em(t,"bigint")}]}:{ok:!0,value:t},getType:()=>yu.BIGINT};return{...vS(e),...Im(e)}}var Gdc=h(()=>{"use strict";IS();R2();y$();mQ()});var qdc=h(()=>{"use strict";Gdc()});function Wdc(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="string"?{ok:!1,errors:[{path:r,message:Em(t,"string")}]}:Ded.test(t)?{ok:!0,value:new Date(t)}:{ok:!1,errors:[{path:r,message:Em(t,"ISO 8601 date string")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>t instanceof Date?{ok:!0,value:t.toISOString()}:{ok:!1,errors:[{path:r,message:Em(t,"Date object")}]},getType:()=>yu.DATE};return{...vS(e),...Im(e)}}var Ded,Hdc=h(()=>{"use strict";IS();R2();y$();mQ();Ded=/^([+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([.,]\d+(?!:))?)?(\17[0-5]\d([.,]\d+)?)?([zZ]|([+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/});var Kdc=h(()=>{"use strict";Hdc()});function tT(e,t){return()=>{let r={parse:t,json:t,getType:()=>e};return{...vS(r),...Im(r)}}}var b$=h(()=>{"use strict";mQ();y$()});function SBr(e){let t=new Set(e);return tT(yu.ENUM,(n,{allowUnrecognizedEnumValues:i,breadcrumbsPrefix:o=[]}={})=>typeof n!="string"?{ok:!1,errors:[{path:o,message:Em(n,"string")}]}:!t.has(n)&&!i?{ok:!1,errors:[{path:o,message:Em(n,"enum")}]}:{ok:!0,value:n})()}var Jdc=h(()=>{"use strict";IS();b$();R2()});var Apo=h(()=>{"use strict";Jdc()});function Ydc(e){let t=ypo(e);return{...t,...Im(t)}}function ypo(e){return{parse:(t,r)=>Ltt(e).parse(t,r),json:(t,r)=>Ltt(e).json(t,r),getType:()=>Ltt(e).getType()}}function Ltt(e){let t=e;return t.__zurg_memoized==null&&(t.__zurg_memoized=e()),t.__zurg_memoized}var bpo=h(()=>{"use strict";mQ()});function Epo(e){return Object.entries(e)}var Xdc=h(()=>{"use strict"});function n6t(e,t){let r=new Set(t);return Object.entries(e).reduce((n,[i,o])=>(r.has(i)&&(n[i]=o),n),{})}var Ipo=h(()=>{"use strict"});function Rfe(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return t===null?!0:Object.getPrototypeOf(t)===null}var i6t=h(()=>{"use strict"});function o6t(e){return Object.keys(e)}var vpo=h(()=>{"use strict"});function Zdc(e,t){let r=[],n=[];for(let i of e)t(i)?r.push(i):n.push(i);return[r,n]}var $dc=h(()=>{"use strict"});function MH(e){return{withParsedProperties:t=>Cpo(e,t)}}function Cpo(e,t){let r={parse:(n,i)=>{let o=e.parse(n,i);if(!o.ok)return o;let s={};for(let a in t)if(ked.call(t,a)){let c=t[a];s[a]=typeof c=="function"?c(o.value):c}return{ok:!0,value:{...o.value,...s}}},json:(n,i)=>{if(!Rfe(n))return{ok:!1,errors:[{path:i?.breadcrumbsPrefix??[],message:Em(n,"object")}]};let o=new Set(Object.keys(t)),s=n6t(n,Object.keys(n).filter(a=>!o.has(a)));return e.json(s,i)},getType:()=>e.getType()};return{...r,...Im(r),...MH(r)}}var ked,emc=h(()=>{"use strict";Ipo();R2();i6t();mQ();ked=Object.prototype.hasOwnProperty});var s6t=h(()=>{"use strict";emc()});function tmc(e,t){return{rawKey:e,valueSchema:t,isProperty:!0}}function Dfe(e){return e.isProperty}var xpo=h(()=>{"use strict"});function TBr(e){let t;function r(){if(t==null){t={};for(let[f,d]of Epo(e)){let m=Dfe(d)?d.rawKey:f,g=Dfe(d)?d.valueSchema:d;t[m]={rawKey:m,parsedKey:f,valueSchema:g}}}return t}let n,i,o,s;function a(){if(n==null){n=[],i=[];for(let[f,d]of Epo(e)){let m=Dfe(d)?d.rawKey:f,g=Dfe(d)?d.valueSchema:d;Ned(g)&&(n.push(m),i.push(f))}o=new Set(n),s=new Set(i)}return n}function c(){return i==null&&a(),i}function u(){return o==null&&a(),o}function l(){return s==null&&a(),s}let p={_getRawProperties:()=>Object.entries(e).map(([f,d])=>Dfe(d)?d.rawKey:f),_getParsedProperties:()=>o6t(e),parse:(f,d)=>{let m=d?.breadcrumbsPrefix??[];return rmc({value:f,requiredKeys:a(),requiredKeysSet:u(),getProperty:g=>{let A=r()[g];if(A!=null)return{transformedKey:A.parsedKey,transform:y=>{let I=[...m,g];return A.valueSchema.parse(y,{...d,breadcrumbsPrefix:I})}}},unrecognizedObjectKeys:d?.unrecognizedObjectKeys,skipValidation:d?.skipValidation,breadcrumbsPrefix:m,omitUndefined:d?.omitUndefined})},json:(f,d)=>{let m=d?.breadcrumbsPrefix??[];return rmc({value:f,requiredKeys:c(),requiredKeysSet:l(),getProperty:g=>{let A=e[g];if(A!=null)return Dfe(A)?{transformedKey:A.rawKey,transform:y=>{let I=[...m,g];return A.valueSchema.json(y,{...d,breadcrumbsPrefix:I})}}:{transformedKey:g,transform:y=>{let I=[...m,g];return A.json(y,{...d,breadcrumbsPrefix:I})}}},unrecognizedObjectKeys:d?.unrecognizedObjectKeys,skipValidation:d?.skipValidation,breadcrumbsPrefix:m,omitUndefined:d?.omitUndefined})},getType:()=>yu.OBJECT};return{...vS(p),...Im(p),...MH(p),...RLe(p)}}function rmc({value:e,requiredKeys:t,requiredKeysSet:r,getProperty:n,unrecognizedObjectKeys:i="fail",skipValidation:o=!1,breadcrumbsPrefix:s=[]}){if(!Rfe(e))return{ok:!1,errors:[{path:s,message:Em(e,"object")}]};let a=t.length,c=[],u={};for(let l in e){if(!Fed.call(e,l))continue;let p=e[l],f=n(l);if(f!=null){a>0&&r.has(l)&&a--;let d=f.transform(p);d.ok?u[f.transformedKey]=d.value:(u[l]=p,c.push(...d.errors))}else switch(i){case"fail":c.push({path:[...s,l],message:`Unexpected key "${l}"`});break;case"strip":break;case"passthrough":u[l]=p;break}}if(a>0)for(let l of t)l in e||c.push({path:s,message:`Missing required key "${l}"`});return c.length===0||o?{ok:!0,value:u}:{ok:!1,errors:c}}function RLe(e){return{extend:t=>{let r={_getParsedProperties:()=>[...e._getParsedProperties(),...t._getParsedProperties()],_getRawProperties:()=>[...e._getRawProperties(),...t._getRawProperties()],parse:(n,i)=>nmc({extensionKeys:t._getRawProperties(),value:n,transformBase:o=>e.parse(o,i),transformExtension:o=>t.parse(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),json:(n,i)=>nmc({extensionKeys:t._getParsedProperties(),value:n,transformBase:o=>e.json(o,i),transformExtension:o=>t.json(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),getType:()=>yu.OBJECT};return{...r,...Im(r),...MH(r),...RLe(r)}},passthrough:()=>{let t=new Set(e._getRawProperties()),r=new Set(e._getParsedProperties()),n={_getParsedProperties:()=>e._getParsedProperties(),_getRawProperties:()=>e._getRawProperties(),parse:(i,o)=>{let s=e.parse(i,{...o,unrecognizedObjectKeys:"passthrough"});if(!s.ok)return s;let a={};if(typeof i=="object"&&i!=null)for(let[c,u]of Object.entries(i))t.has(c)||(a[c]=u);return{ok:!0,value:{...a,...s.value}}},json:(i,o)=>{let s=e.json(i,{...o,unrecognizedObjectKeys:"passthrough"});if(!s.ok)return s;let a={};if(typeof i=="object"&&i!=null)for(let[c,u]of Object.entries(i))r.has(c)||(a[c]=u);return{ok:!0,value:{...a,...s.value}}},getType:()=>yu.OBJECT};return{...n,...Im(n),...MH(n),...RLe(n)}}}}function nmc({extensionKeys:e,value:t,transformBase:r,transformExtension:n,breadcrumbsPrefix:i=[]}){if(!Rfe(t))return{ok:!1,errors:[{path:i,message:Em(t,"object")}]};let o=new Set(e),[s,a]=Zdc(o6t(t),l=>o.has(l)),c=r(n6t(t,a)),u=n(n6t(t,s));return c.ok&&u.ok?{ok:!0,value:{...c.value,...u.value}}:{ok:!1,errors:[...c.ok?[]:c.errors,...u.ok?[]:u.errors]}}function Ned(e){return!jed(e)}function jed(e){switch(e.getType()){case yu.ANY:case yu.UNKNOWN:case yu.OPTIONAL:case yu.OPTIONAL_NULLABLE:return!0;default:return!1}}var Fed,wpo=h(()=>{"use strict";IS();Xdc();Ipo();R2();i6t();vpo();y$();$dc();s6t();mQ();xpo();Fed=Object.prototype.hasOwnProperty});function imc(e){return TBr(e)}var omc=h(()=>{"use strict";wpo()});var Spo=h(()=>{"use strict";wpo();omc();xpo()});function smc(e){let t={...ypo(e),_getRawProperties:()=>Ltt(e)._getRawProperties(),_getParsedProperties:()=>Ltt(e)._getParsedProperties()};return{...t,...Im(t),...MH(t),...RLe(t)}}var amc=h(()=>{"use strict";Spo();s6t();mQ();bpo()});var cmc=h(()=>{"use strict";bpo();amc()});function OBr(e){let t={parse:(r,n)=>umc(r,(i,o)=>e.parse(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),json:(r,n)=>umc(r,(i,o)=>e.json(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),getType:()=>yu.LIST};return{...vS(t),...Im(t)}}function umc(e,t){if(!Array.isArray(e))return{ok:!1,errors:[{message:Em(e,"list"),path:[]}]};let r=[],n=[];for(let i=0;i<e.length;i++){let o=t(e[i],i);o.ok?r.push(o.value):n.push(...o.errors)}return n.length===0?{ok:!0,value:r}:{ok:!1,errors:n}}var lmc=h(()=>{"use strict";IS();R2();y$();mQ()});var Tpo=h(()=>{"use strict";lmc()});function pmc(e){return tT(yu.BOOLEAN_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:Em(r,`${e.toString()}`)}]})()}var fmc=h(()=>{"use strict";IS();b$();R2()});function dmc(e){return tT(yu.STRING_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:Em(r,`"${e}"`)}]})()}var mmc=h(()=>{"use strict";IS();b$();R2()});var hmc=h(()=>{"use strict";fmc();mmc()});var gmc,Amc=h(()=>{"use strict";IS();b$();gmc=tT(yu.ANY,e=>({ok:!0,value:e}))});var ymc,bmc=h(()=>{"use strict";IS();b$();R2();ymc=tT(yu.BOOLEAN,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="boolean"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Em(e,"boolean")}]})});var Emc,Imc=h(()=>{"use strict";IS();b$();Emc=tT(yu.NEVER,(e,{breadcrumbsPrefix:t=[]}={})=>({ok:!1,errors:[{path:t,message:"Expected never"}]}))});var vmc,Cmc=h(()=>{"use strict";IS();b$();R2();vmc=tT(yu.NUMBER,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="number"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Em(e,"number")}]})});var xmc,wmc=h(()=>{"use strict";IS();b$();R2();xmc=tT(yu.STRING,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="string"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Em(e,"string")}]})});var Smc,Tmc=h(()=>{"use strict";IS();b$();Smc=tT(yu.UNKNOWN,e=>({ok:!0,value:e}))});var Omc=h(()=>{"use strict";Amc();bmc();Imc();Cmc();wmc();Tmc()});function Pmc(e,t){let r={parse:(n,i)=>PBr({value:n,isKeyNumeric:e.getType()===yu.NUMBER,transformKey:o=>e.parse(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${o} (key)`]}),transformValue:(o,s)=>t.parse(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${s}`]}),breadcrumbsPrefix:i?.breadcrumbsPrefix}),json:(n,i)=>PBr({value:n,isKeyNumeric:e.getType()===yu.NUMBER,transformKey:o=>e.json(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${o} (key)`]}),transformValue:(o,s)=>t.json(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${s}`]}),breadcrumbsPrefix:i?.breadcrumbsPrefix}),getType:()=>yu.RECORD};return{...vS(r),...Im(r)}}function Bmc(e,t){let r={parse:(n,i)=>PBr({value:n,isKeyNumeric:e.getType()===yu.NUMBER,transformKey:o=>e.parse(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${o} (key)`]}),transformValue:(o,s)=>t.parse(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${s}`]}),breadcrumbsPrefix:i?.breadcrumbsPrefix}),json:(n,i)=>PBr({value:n,isKeyNumeric:e.getType()===yu.NUMBER,transformKey:o=>e.json(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${o} (key)`]}),transformValue:(o,s)=>t.json(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${s}`]}),breadcrumbsPrefix:i?.breadcrumbsPrefix}),getType:()=>yu.RECORD};return{...vS(r),...Im(r)}}function PBr({value:e,isKeyNumeric:t,transformKey:r,transformValue:n,breadcrumbsPrefix:i=[]}){if(!Rfe(e))return{ok:!1,errors:[{path:i,message:Em(e,"object")}]};let o={},s=[];for(let a in e){if(!zed.call(e,a))continue;let c=e[a];if(c===void 0)continue;let u=a;if(t){let f=a.length>0?Number(a):NaN;Number.isNaN(f)||(u=f)}let l=r(u),p=n(c,u);l.ok&&p.ok?o[l.value]=p.value:(l.ok||s.push(...l.errors),p.ok||s.push(...p.errors))}return s.length===0?{ok:!0,value:o}:{ok:!1,errors:s}}var zed,Rmc=h(()=>{"use strict";IS();R2();i6t();y$();mQ();zed=Object.prototype.hasOwnProperty});var Dmc=h(()=>{"use strict";Rmc()});function kmc(e){let t=OBr(e),r={parse:(n,i)=>{let o=t.parse(n,i);return o.ok?{ok:!0,value:new Set(o.value)}:o},json:(n,i)=>n instanceof Set?t.json([...n],i):{ok:!1,errors:[{path:i?.breadcrumbsPrefix??[],message:Em(n,"Set")}]},getType:()=>yu.SET};return{...vS(r),...Im(r)}}var Fmc=h(()=>{"use strict";IS();R2();y$();Tpo();mQ()});var Nmc=h(()=>{"use strict";Fmc()});function zmc(e){let t={parse:(r,n)=>jmc((i,o)=>i.parse(r,o),e,n),json:(r,n)=>jmc((i,o)=>i.json(r,o),e,n),getType:()=>yu.UNDISCRIMINATED_UNION};return{...vS(t),...Im(t)}}function jmc(e,t,r){let n=[];for(let[i,o]of t.entries()){let s=e(o,{...r,skipValidation:!1});if(s.ok)return s;for(let a of s.errors)n.push({path:a.path,message:`[Variant ${i}] ${a.message}`})}return{ok:!1,errors:n}}var Qmc=h(()=>{"use strict";IS();y$();mQ()});var Mmc=h(()=>{"use strict";Qmc()});function Lmc(e,t){return{parsedDiscriminant:e,rawDiscriminant:t}}var _mc=h(()=>{"use strict"});function Vmc(e,t){let r=typeof e=="string"?e:e.rawDiscriminant,n=typeof e=="string"?e:e.parsedDiscriminant,i=SBr(o6t(t)),o={parse:(s,a)=>Umc({value:s,discriminant:r,transformedDiscriminant:n,transformDiscriminantValue:c=>i.parse(c,{allowUnrecognizedEnumValues:a?.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...a?.breadcrumbsPrefix??[],r]}),getAdditionalPropertiesSchema:c=>t[c],allowUnrecognizedUnionMembers:a?.allowUnrecognizedUnionMembers,transformAdditionalProperties:(c,u)=>u.parse(c,a),breadcrumbsPrefix:a?.breadcrumbsPrefix}),json:(s,a)=>Umc({value:s,discriminant:n,transformedDiscriminant:r,transformDiscriminantValue:c=>i.json(c,{allowUnrecognizedEnumValues:a?.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...a?.breadcrumbsPrefix??[],n]}),getAdditionalPropertiesSchema:c=>t[c],allowUnrecognizedUnionMembers:a?.allowUnrecognizedUnionMembers,transformAdditionalProperties:(c,u)=>u.json(c,a),breadcrumbsPrefix:a?.breadcrumbsPrefix}),getType:()=>yu.UNION};return{...vS(o),...Im(o),...MH(o)}}function Umc({value:e,discriminant:t,transformedDiscriminant:r,transformDiscriminantValue:n,getAdditionalPropertiesSchema:i,allowUnrecognizedUnionMembers:o=!1,transformAdditionalProperties:s,breadcrumbsPrefix:a=[]}){if(!Rfe(e))return{ok:!1,errors:[{path:a,message:Em(e,"object")}]};let c=e[t],u={};for(let d in e)Qed.call(e,d)&&d!==t&&(u[d]=e[d]);if(c==null)return{ok:!1,errors:[{path:a,message:`Missing discriminant ("${t}")`}]};let l=n(c);if(!l.ok)return{ok:!1,errors:l.errors};let p=i(l.value);if(p==null)return o?{ok:!0,value:{[r]:l.value,...u}}:{ok:!1,errors:[{path:[...a,t],message:"Unexpected discriminant value"}]};let f=s(u,p);return f.ok?{ok:!0,value:{[r]:c,...f.value}}:f}var Qed,Gmc=h(()=>{"use strict";IS();R2();i6t();vpo();y$();Apo();s6t();mQ();Qed=Object.prototype.hasOwnProperty});var qmc=h(()=>{"use strict";_mc();Gmc()});var Wmc=h(()=>{"use strict";qdc();Kdc();Apo();cmc();Tpo();hmc();Spo();s6t();Omc();Dmc();mQ();Nmc();Mmc();qmc()});var ne={};ee(ne,{JsonError:()=>Qtt,ParseError:()=>Mtt,any:()=>gmc,bigint:()=>Vdc,boolean:()=>ymc,booleanLiteral:()=>pmc,date:()=>Wdc,discriminant:()=>Lmc,enum_:()=>SBr,getObjectLikeUtils:()=>MH,getObjectUtils:()=>RLe,getSchemaUtils:()=>Im,isProperty:()=>Dfe,lazy:()=>Ydc,lazyObject:()=>smc,list:()=>OBr,never:()=>Emc,number:()=>vmc,object:()=>TBr,objectWithoutOptionalProperties:()=>imc,optional:()=>hpo,partialRecord:()=>Bmc,property:()=>tmc,record:()=>Pmc,set:()=>kmc,string:()=>xmc,stringLiteral:()=>dmc,transform:()=>gpo,undiscriminatedUnion:()=>zmc,union:()=>Vmc,unknown:()=>Smc,withParsedProperties:()=>Cpo});var Hmc=h(()=>{"use strict";Wmc()});var Kmc=h(()=>{"use strict"});var Br=h(()=>{"use strict";Qdc();Mdc();Ldc();Hmc();Kmc()});var BBr,Opo=h(()=>{"use strict";Br();BBr=ne.object({href:ne.string()})});var RBr,Ppo=h(()=>{"use strict";Br();RBr=ne.enum_(["description","subtitle"])});var DBr,Bpo=h(()=>{"use strict";Br();Ppo();DBr=ne.object({pageDirective:ne.property("page-directive",ne.string().optional()),pageDescriptionSource:ne.property("page-description-source",RBr.optional()),llmsTxt:ne.property("llms-txt",ne.string().optional()),llmsFullTxt:ne.property("llms-full-txt",ne.string().optional()),robotsTxt:ne.property("robots-txt",ne.string().optional())})});var kBr,Rpo=h(()=>{"use strict";Br();kBr=ne.object({url:ne.string(),title:ne.string().optional()})});var FBr,Dpo=h(()=>{"use strict";Br();Rpo();FBr=ne.undiscriminatedUnion([kBr])});var NBr,kpo=h(()=>{"use strict";Br();NBr=ne.enum_(["docs","slack","discord"])});var jBr,Fpo=h(()=>{"use strict";Br();jBr=ne.enum_(["claude-3.7","claude-4","command-a"])});var a6t,Npo=h(()=>{"use strict";Br();Dpo();kpo();Fpo();a6t=ne.object({model:jBr.optional(),systemPrompt:ne.property("system-prompt",ne.string().optional()),location:ne.list(NBr).optional(),datasources:ne.list(FBr).optional(),maskPii:ne.property("mask-pii",ne.boolean().optional()),disclaimer:ne.string().optional()})});var zBr,jpo=h(()=>{"use strict";Br();zBr=ne.object({enabled:ne.boolean().optional(),style:ne.string().optional()})});var QBr,zpo=h(()=>{"use strict";Br();QBr=ne.object({orgId:ne.property("org-id",ne.string())})});var MBr,Qpo=h(()=>{"use strict";Br();MBr=ne.object({measurementId:ne.property("measurement-id",ne.string())})});var LBr,Mpo=h(()=>{"use strict";Br();LBr=ne.object({containerId:ne.property("container-id",ne.string())})});var _Br,Lpo=h(()=>{"use strict";Br();_Br=ne.object({appId:ne.property("app-id",ne.string()),apiBase:ne.property("api-base",ne.string().optional())})});var UBr,_po=h(()=>{"use strict";Br();UBr=ne.object({apiKey:ne.property("api-key",ne.string()),endpoint:ne.string().optional()})});var VBr,Upo=h(()=>{"use strict";Br();VBr=ne.object({writeKey:ne.property("write-key",ne.string())})});var GBr,Vpo=h(()=>{"use strict";Br();zpo();Qpo();Mpo();Lpo();_po();Upo();GBr=ne.object({segment:VBr.optional(),fullstory:QBr.optional(),intercom:_Br.optional(),posthog:UBr.optional(),gtm:LBr.optional(),ga4:MBr.optional()})});var UIe,c6t=h(()=>{"use strict";Br();UIe=ne.object({message:ne.string()})});var qBr,Gpo=h(()=>{"use strict";Br();qBr=ne.enum_(["all","untyped"])});var WBr,qpo=h(()=>{"use strict";Br();WBr=ne.enum_(["get","post","put","patch","delete","head","options","trace"])});var HBr,Wpo=h(()=>{"use strict";Br();qpo();HBr=ne.object({statusCode:ne.property("status-code",ne.number()),methods:ne.list(WBr).optional()})});var KBr,Hpo=h(()=>{"use strict";Br();KBr=ne.undiscriminatedUnion([ne.string(),ne.record(ne.string(),ne.unknown())])});var JBr,Kpo=h(()=>{"use strict";Br();Gpo();Wpo();Hpo();JBr=ne.object({schema:KBr,name:ne.string().optional(),applyTo:ne.property("apply-to",qBr.optional()),ensure:ne.list(HBr).optional()})});var YBr,Jpo=h(()=>{"use strict";Br();Kpo();YBr=ne.object({typeDatesAsStrings:ne.property("type-dates-as-strings",ne.boolean().optional()),useBytesForBinaryResponse:ne.property("use-bytes-for-binary-response",ne.boolean().optional()),respectParameterContent:ne.property("respect-parameter-content",ne.boolean().optional()),respectOperationIdWordBoundaries:ne.property("respect-operation-id-word-boundaries",ne.boolean().optional()),inferForwardCompatible:ne.property("infer-forward-compatible",ne.boolean().optional()),preserveOneOfInAllOf:ne.property("preserve-one-of-in-all-of",ne.boolean().optional()),anyOfSiblingPropertiesAsObject:ne.property("any-of-sibling-properties-as-object",ne.boolean().optional()),errorResponses:ne.property("error-responses",JBr.optional())})});var XBr,Ypo=h(()=>{"use strict";Br();XBr=ne.enum_(["openapi","asyncapi","graphql"])});var ZBr,Xpo=h(()=>{"use strict";Br();Jpo();Ypo();ZBr=ne.object({type:XBr,path:ne.string(),namespace:ne.string().optional(),overlays:ne.string().optional(),overrides:ne.list(ne.string()).optional(),settings:YBr.optional()})});var u6t,Zpo=h(()=>{"use strict";Br();u6t=ne.string()});var E$,_tt=h(()=>{"use strict";Br();Zpo();E$=ne.undiscriminatedUnion([u6t,ne.list(u6t)])});var rT,I$=h(()=>{"use strict";Br();rT=ne.enum_(["stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"])});var $Br,$po=h(()=>{"use strict";Br();$Br=ne.enum_(["open-by-default"])});var v$,Utt=h(()=>{"use strict";Br();$po();v$=ne.undiscriminatedUnion([ne.boolean(),$Br])});var eRr,efo=h(()=>{"use strict";Br();eRr=ne.object({href:ne.string().optional()})});var C$,Vtt=h(()=>{"use strict";Br();efo();C$=ne.object({hidden:ne.boolean().optional(),environments:ne.list(ne.string()).optional(),button:eRr.optional(),oauth:ne.boolean().optional(),limitWebsocketMessagesPerConnection:ne.property("limit-websocket-messages-per-connection",ne.number().optional()),sendOptionalDefaults:ne.property("send-optional-defaults",ne.boolean().optional())})});var tRr,tfo=h(()=>{"use strict";Br();tRr=ne.object({version:ne.string(),package:ne.string()})});var VV,rfo=h(()=>{"use strict";Br();tfo();VV=ne.undiscriminatedUnion([ne.string(),tRr])});var rRr,nfo=h(()=>{"use strict";Br();rfo();rRr=ne.object({python:VV.optional(),typescript:VV.optional(),go:VV.optional(),java:VV.optional(),ruby:VV.optional(),csharp:VV.optional(),php:VV.optional(),swift:VV.optional(),rust:VV.optional()})});var nRr,ifo=h(()=>{"use strict";Br();nRr=ne.enum_(["unset","stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"])});var l6t,ofo=h(()=>{"use strict";Br();l6t=ne.object({flag:ne.string(),fallbackValue:ne.property("fallback-value",ne.unknown().optional()),match:ne.unknown().optional()})});var iRr,sfo=h(()=>{"use strict";Br();ofo();iRr=ne.undiscriminatedUnion([ne.string(),l6t,ne.list(l6t)])});var Kd,nT=h(()=>{"use strict";Br();sfo();Kd=ne.object({featureFlag:ne.property("feature-flag",iRr.optional())})});var DLe,oRr=h(()=>{"use strict";Br();DLe=ne.string()});var Gtt,sRr=h(()=>{"use strict";Br();oRr();Gtt=ne.undiscriminatedUnion([DLe,ne.list(DLe)])});var Jd,iT=h(()=>{"use strict";Br();sRr();Jd=ne.object({viewers:Gtt.optional(),orphaned:ne.boolean().optional()})});var aRr,afo=h(()=>{"use strict";Br();j3();Xpo();_tt();I$();Utt();Vtt();nfo();ifo();nT();iT();aRr=ne.object({api:ne.string(),apiName:ne.property("api-name",ne.string().optional()),specs:ne.list(ZBr).optional(),openrpc:ne.string().optional(),audiences:E$.optional(),displayErrors:ne.property("display-errors",ne.boolean().optional()),tagDescriptionPages:ne.property("tag-description-pages",ne.boolean().optional()),snippets:rRr.optional(),postman:ne.string().optional(),summary:ne.string().optional(),layout:ne.list(ne.lazy(()=>x$)).optional(),collapsed:v$.optional(),icon:ne.string().optional(),slug:ne.string().optional(),hidden:ne.boolean().optional(),availability:rT.optional(),skipSlug:ne.property("skip-slug",ne.boolean().optional()),alphabetized:ne.boolean().optional(),sortByAvailability:ne.property("sort-by-availability",ne.list(nRr).optional()),flattened:ne.boolean().optional(),paginated:ne.boolean().optional(),playground:C$.optional()}).extend(Jd).extend(Kd)});var cRr,cfo=h(()=>{"use strict";Br();I$();Vtt();nT();iT();cRr=ne.object({endpoint:ne.string(),title:ne.string().optional(),slug:ne.string().optional(),icon:ne.string().optional(),hidden:ne.boolean().optional(),availability:rT.optional(),playground:C$.optional()}).extend(Jd).extend(Kd)});var uRr,ufo=h(()=>{"use strict";Br();uRr=ne.enum_(["indented","cards"])});var lRr,lfo=h(()=>{"use strict";Br();I$();nT();iT();lRr=ne.object({operation:ne.string(),title:ne.string().optional(),slug:ne.string().optional(),hidden:ne.boolean().optional(),availability:rT.optional()}).extend(Jd).extend(Kd)});var GV,kLe=h(()=>{"use strict";Br();GV=ne.enum_(["_blank","_self","_parent","_top"])});var qtt,pRr=h(()=>{"use strict";Br();kLe();qtt=ne.object({link:ne.string(),href:ne.string(),icon:ne.string().optional(),target:GV.optional()})});var qV,FLe=h(()=>{"use strict";Br();I$();nT();iT();qV=ne.object({page:ne.string(),path:ne.string(),slug:ne.string().optional(),icon:ne.string().optional(),hidden:ne.boolean().optional(),noindex:ne.boolean().optional(),availability:rT.optional()}).extend(Jd).extend(Kd)});var x$,Jmc=h(()=>{"use strict";Br();j3();cfo();lfo();pRr();FLe();x$=ne.undiscriminatedUnion([ne.string(),ne.record(ne.string(),ne.lazy(()=>fRr)),ne.lazyObject(()=>dRr),cRr,lRr,qV,qtt])});var fRr,Ymc=h(()=>{"use strict";Br();j3();fRr=ne.undiscriminatedUnion([ne.list(ne.lazy(()=>x$)),ne.lazyObject(()=>mRr)])});var mRr,Xmc=h(()=>{"use strict";Br();j3();I$();Vtt();nT();iT();mRr=ne.object({title:ne.string().optional(),summary:ne.string().optional(),contents:ne.list(ne.lazy(()=>x$)).optional(),availability:rT.optional(),slug:ne.string().optional(),icon:ne.string().optional(),hidden:ne.boolean().optional(),skipSlug:ne.property("skip-slug",ne.boolean().optional()),playground:C$.optional()}).extend(Jd).extend(Kd)});var dRr,Zmc=h(()=>{"use strict";Br();j3();I$();Utt();Vtt();nT();iT();dRr=ne.object({section:ne.string(),referencedPackages:ne.property("referenced-packages",ne.list(ne.string()).optional()),summary:ne.string().optional(),contents:ne.list(ne.lazy(()=>x$)).optional(),slug:ne.string().optional(),icon:ne.string().optional(),hidden:ne.boolean().optional(),skipSlug:ne.property("skip-slug",ne.boolean().optional()),collapsed:v$.optional(),collapsible:ne.boolean().optional(),collapsedByDefault:ne.property("collapsed-by-default",ne.boolean().optional()),availability:rT.optional(),playground:C$.optional()}).extend(Jd).extend(Kd)});var hRr,pfo=h(()=>{"use strict";Br();hRr=ne.object({dark:ne.string().optional(),light:ne.string().optional()})});var gRr,ffo=h(()=>{"use strict";Br();pfo();gRr=ne.undiscriminatedUnion([ne.string(),hRr])});var kfe,p6t=h(()=>{"use strict";Br();kfe=ne.string()});var ARr,dfo=h(()=>{"use strict";Br();p6t();nT();iT();ARr=ne.object({blog:kfe,title:ne.string().optional(),slug:ne.string().optional(),icon:ne.string().optional(),hidden:ne.boolean().optional()}).extend(Jd).extend(Kd)});var yRr,mfo=h(()=>{"use strict";Br();yRr=ne.enum_(["default","canvas"])});var bRr,hfo=h(()=>{"use strict";Br();bRr=ne.object({currentPage:ne.property("current-page",ne.boolean().optional())})});var Wtt,ERr=h(()=>{"use strict";Br();p6t();nT();iT();Wtt=ne.object({changelog:kfe,title:ne.string().optional(),slug:ne.string().optional(),icon:ne.string().optional(),hidden:ne.boolean().optional()}).extend(Jd).extend(Kd)});var IRr,gfo=h(()=>{"use strict";Br();IRr=ne.enum_(["timeline","classic"])});var LH,Afo=h(()=>{"use strict";Br();LH=ne.enum_(["warn","error"])});var vRr,yfo=h(()=>{"use strict";Br();Afo();vRr=ne.object({exampleValidation:ne.property("example-validation",LH.optional()),brokenLinks:ne.property("broken-links",LH.optional()),noNonComponentRefs:ne.property("no-non-component-refs",LH.optional()),validLocalReferences:ne.property("valid-local-references",LH.optional()),noCircularRedirects:ne.property("no-circular-redirects",LH.optional()),validDocsEndpoints:ne.property("valid-docs-endpoints",LH.optional()),missingRedirects:ne.property("missing-redirects",LH.optional()),validChangelogSlug:ne.property("valid-changelog-slug",LH.optional())})});var CRr,bfo=h(()=>{"use strict";Br();yfo();CRr=ne.object({rules:vRr.optional()})});var xRr,Efo=h(()=>{"use strict";Br();xRr=ne.object({dark:ne.string().optional(),light:ne.string().optional()})});var dv,Ifo=h(()=>{"use strict";Br();Efo();dv=ne.undiscriminatedUnion([ne.string(),xRr])});var wRr,vfo=h(()=>{"use strict";Br();Ifo();wRr=ne.object({accentPrimary:ne.property("accent-primary",dv.optional()),accentPrimaryDeprecated:ne.property("accentPrimary",dv.optional()),background:dv.optional(),border:dv.optional(),sidebarBackground:ne.property("sidebar-background",dv.optional()),headerBackground:ne.property("header-background",dv.optional()),cardBackground:ne.property("card-background",dv.optional()),accent1:ne.property("accent-1",dv.optional()),accent2:ne.property("accent-2",dv.optional()),accent3:ne.property("accent-3",dv.optional()),accent4:ne.property("accent-4",dv.optional()),accent5:ne.property("accent-5",dv.optional()),accent6:ne.property("accent-6",dv.optional()),accent7:ne.property("accent-7",dv.optional()),accent8:ne.property("accent-8",dv.optional()),accent9:ne.property("accent-9",dv.optional()),accent10:ne.property("accent-10",dv.optional()),accent11:ne.property("accent-11",dv.optional()),accent12:ne.property("accent-12",dv.optional())})});var SRr,Cfo=h(()=>{"use strict";Br();SRr=ne.enum_(["center","left"])});var TRr,xfo=h(()=>{"use strict";Br();TRr=ne.undiscriminatedUnion([ne.string(),ne.list(ne.string())])});var ORr,wfo=h(()=>{"use strict";Br();ORr=ne.undiscriminatedUnion([ne.string(),ne.list(ne.string())])});var PRr,Sfo=h(()=>{"use strict";Br();PRr=ne.object({title:ne.string(),subtitle:ne.string().optional(),url:ne.string(),icon:ne.string().optional(),default:ne.boolean().optional()})});var BRr,Tfo=h(()=>{"use strict";Br();BRr=ne.enum_(["github","dashboard"])});var RRr,Ofo=h(()=>{"use strict";Br();RRr=ne.object({host:ne.string().optional(),owner:ne.string(),repo:ne.string(),branch:ne.string().optional()})});var DRr,Pfo=h(()=>{"use strict";Br();Tfo();Ofo();DRr=ne.object({github:RRr.optional(),launch:BRr.optional()})});var kRr,Bfo=h(()=>{"use strict";Br();_tt();wfo();Pfo();kRr=ne.object({url:ne.string(),customDomain:ne.property("custom-domain",ORr.optional()),editThisPage:ne.property("edit-this-page",DRr.optional()),audiences:E$.optional(),multiSource:ne.property("multi-source",ne.boolean().optional())})});var FRr,Rfo=h(()=>{"use strict";Br();FRr=ne.object({allowedOrigins:ne.property("allowed-origins",ne.list(ne.string()))})});var NRr,Dfo=h(()=>{"use strict";Br();NRr=ne.enum_(["curl","csharp","go","java","javascript","php","python","ruby","swift","typescript"])});var jRr,kfo=h(()=>{"use strict";Br();Dfo();jRr=ne.undiscriminatedUnion([ne.boolean(),ne.list(NRr)])});var VIe,f6t=h(()=>{"use strict";Br();VIe=ne.string()});var zRr,Ffo=h(()=>{"use strict";Br();zRr=ne.object({prioritizeCurrentProduct:ne.property("prioritize-current-product",ne.boolean().optional()),defaultFilterByCurrentProduct:ne.property("default-filter-by-current-product",ne.boolean().optional())})});var Htt,QRr=h(()=>{"use strict";Br();Htt=ne.enum_(["frontmatter","filename"])});var MRr,Nfo=h(()=>{"use strict";Br();MRr=ne.enum_(["flat","grouped"])});var LRr,jfo=h(()=>{"use strict";Br();Rfo();kfo();f6t();Ffo();QRr();Nfo();LRr=ne.object({searchText:ne.property("search-text",ne.string().optional()),disableSearch:ne.property("disable-search",ne.boolean().optional()),darkModeCode:ne.property("dark-mode-code",ne.boolean().optional()),defaultSearchFilters:ne.property("default-search-filters",ne.boolean().optional()),search:zRr.optional(),httpSnippets:ne.property("http-snippets",jRr.optional()),hide404Page:ne.property("hide-404-page",ne.boolean().optional()),useJavascriptAsTypescript:ne.property("use-javascript-as-typescript",ne.boolean().optional()),disableExplorerProxy:ne.property("disable-explorer-proxy",ne.boolean().optional()),disableEnvironmentEditing:ne.property("disable-environment-editing",ne.boolean().optional()),disableAnalytics:ne.property("disable-analytics",ne.boolean().optional()),language:VIe.optional(),folderTitleSource:ne.property("folder-title-source",Htt.optional()),substituteEnvVars:ne.property("substitute-env-vars",ne.boolean().optional()),websocketOneofDisplay:ne.property("websocket-oneof-display",MRr.optional()),embedding:FRr.optional(),showHeadersInExamples:ne.property("show-headers-in-examples",ne.boolean().optional())})});var Ktt,_Rr=h(()=>{"use strict";Br();Ktt=ne.enum_(["normal","italic"])});var Jtt,URr=h(()=>{"use strict";Br();Jtt=ne.undiscriminatedUnion([ne.string(),ne.number()])});var VRr,zfo=h(()=>{"use strict";Br();_Rr();URr();VRr=ne.object({path:ne.string(),weight:Jtt.optional(),style:Ktt.optional()})});var GRr,Qfo=h(()=>{"use strict";Br();zfo();GRr=ne.undiscriminatedUnion([ne.string(),VRr])});var qRr,Mfo=h(()=>{"use strict";Br();qRr=ne.enum_(["auto","block","swap","fallback","optional"])});var Ytt,Lfo=h(()=>{"use strict";Br();Qfo();Mfo();_Rr();URr();Ytt=ne.object({name:ne.string().optional(),path:ne.string().optional(),weight:Jtt.optional(),style:Ktt.optional(),paths:ne.list(GRr).optional(),display:qRr.optional(),fallback:ne.list(ne.string()).optional(),fontVariationSettings:ne.property("font-variation-settings",ne.string().optional())})});var WRr,_fo=h(()=>{"use strict";Br();Lfo();WRr=ne.object({headingsFont:Ytt.optional(),bodyFont:Ytt.optional(),codeFont:Ytt.optional()})});var HRr,Ufo=h(()=>{"use strict";Br();HRr=ne.object({url:ne.string(),locale:ne.string().optional()})});var KRr,Vfo=h(()=>{"use strict";Br();Ufo();KRr=ne.undiscriminatedUnion([ne.string(),HRr])});var JRr,Gfo=h(()=>{"use strict";Br();Vfo();JRr=ne.object({mdxComponents:ne.property("mdx-components",ne.list(ne.string()).optional()),disableStreamToggle:ne.property("disable-stream-toggle",ne.boolean().optional()),openapiParserV2:ne.property("openapi-parser-v2",ne.boolean().optional()),openapiParserV3:ne.property("openapi-parser-v3",ne.boolean().optional()),dynamicSnippets:ne.property("dynamic-snippets",ne.boolean().optional()),aiExamples:ne.property("ai-examples",ne.boolean().optional()),aiExampleStyleInstructions:ne.property("ai-example-style-instructions",ne.string().optional()),excludeApis:ne.property("exclude-apis",ne.boolean().optional()),basepathAware:ne.property("basepath-aware",ne.boolean().optional()),robotsTxtOnInstanceUrl:ne.property("robots-txt-on-instance-url",ne.boolean().optional()),externalSitemaps:ne.property("external-sitemaps",ne.list(KRr).optional())})});var YRr,qfo=h(()=>{"use strict";Br();YRr=ne.object({github:ne.string().optional(),twitter:ne.string().optional(),x:ne.string().optional(),linkedin:ne.string().optional(),youtube:ne.string().optional(),instagram:ne.string().optional(),facebook:ne.string().optional(),discord:ne.string().optional(),slack:ne.string().optional(),hackernews:ne.string().optional(),medium:ne.string().optional(),website:ne.string().optional()})});var XRr,Wfo=h(()=>{"use strict";Br();XRr=ne.object({intercom:ne.string().optional(),context7:ne.string().optional()})});var Xtt,ZRr=h(()=>{"use strict";Br();Xtt=ne.enum_(["beforeInteractive","afterInteractive","lazyOnload"])});var $Rr,Hfo=h(()=>{"use strict";Br();ZRr();$Rr=ne.object({path:ne.string(),strategy:Xtt.optional()})});var eDr,Kfo=h(()=>{"use strict";Br();Hfo();eDr=ne.undiscriminatedUnion([ne.string(),$Rr])});var tDr,Jfo=h(()=>{"use strict";Br();ZRr();tDr=ne.object({url:ne.string(),strategy:Xtt.optional(),disableSri:ne.property("disable-sri",ne.boolean().optional())})});var d6t,Yfo=h(()=>{"use strict";Br();Kfo();Jfo();d6t=ne.undiscriminatedUnion([tDr,eDr])});var rDr,Xfo=h(()=>{"use strict";Br();Yfo();rDr=ne.undiscriminatedUnion([d6t,ne.list(d6t)])});var nDr,Zfo=h(()=>{"use strict";Br();nDr=ne.enum_(["fixed","static"])});var iDr,$fo=h(()=>{"use strict";Br();iDr=ne.enum_(["header","header-tabs","sidebar"])});var oDr,edo=h(()=>{"use strict";Br();oDr=ne.enum_(["header","sidebar"])});var Ztt,sDr=h(()=>{"use strict";Br();Ztt=ne.enum_(["header","sidebar"])});var aDr,tdo=h(()=>{"use strict";Br();ufo();hfo();gfo();Cfo();Zfo();$fo();edo();sDr();aDr=ne.object({pageWidth:ne.property("page-width",ne.string().optional()),contentWidth:ne.property("content-width",ne.string().optional()),sidebarWidth:ne.property("sidebar-width",ne.string().optional()),headerHeight:ne.property("header-height",ne.string().optional()),searchbarPlacement:ne.property("searchbar-placement",iDr.optional()),tabsPlacement:ne.property("tabs-placement",Ztt.optional()),switcherPlacement:ne.property("switcher-placement",oDr.optional()),contentAlignment:ne.property("content-alignment",SRr.optional()),headerPosition:ne.property("header-position",nDr.optional()),disableHeader:ne.property("disable-header",ne.boolean().optional()),hideNavLinks:ne.property("hide-nav-links",ne.boolean().optional()),hideFeedback:ne.property("hide-feedback",ne.boolean().optional()),mobileToc:ne.property("mobile-toc",ne.boolean().optional()),changelogLayout:ne.property("changelog-layout",IRr.optional()),apiReferenceLayout:ne.property("api-reference-layout",uRr.optional()),apiReferenceExpandProperties:ne.property("api-reference-expand-properties",ne.boolean().optional()),showNavAvailabilityBadges:ne.property("show-nav-availability-badges",ne.boolean().optional()),hideWebhookMethodBadges:ne.property("hide-webhook-method-badges",ne.boolean().optional()),breadcrumbs:bRr.optional()})});var cDr,rdo=h(()=>{"use strict";Br();cDr=ne.object({doxyfile:ne.string().optional(),includeUndocumentedMacros:ne.property("include-undocumented-macros",ne.boolean().optional())})});var uDr,ndo=h(()=>{"use strict";Br();uDr=ne.object({git:ne.string(),subpath:ne.string().optional(),ref:ne.string().optional()})});var lDr,ido=h(()=>{"use strict";Br();lDr=ne.object({path:ne.string()})});var pDr,odo=h(()=>{"use strict";Br();ndo();ido();pDr=ne.undiscriminatedUnion([uDr,lDr])});var fDr,sdo=h(()=>{"use strict";Br();fDr=ne.enum_(["python","cpp"])});var dDr,ado=h(()=>{"use strict";Br();dDr=ne.object({path:ne.string()})});var mDr,cdo=h(()=>{"use strict";Br();rdo();odo();sdo();ado();mDr=ne.object({input:pDr,output:dDr,lang:fDr,config:cDr.optional()})});var $tt,hDr=h(()=>{"use strict";Br();$tt=ne.string()});var gDr,udo=h(()=>{"use strict";Br();gDr=ne.object({dark:ne.string().optional(),light:ne.string().optional(),height:ne.number().optional(),href:ne.string().optional(),rightText:ne.property("right-text",ne.string().optional())})});var ADr,ldo=h(()=>{"use strict";Br();ADr=ne.enum_(["dark","light"])});var yDr,pdo=h(()=>{"use strict";Br();yDr=ne.enum_(["summary","summary_large_image","app","player"])});var bDr,fdo=h(()=>{"use strict";Br();ldo();pdo();bDr=ne.object({ogSiteName:ne.property("og:site_name",ne.string().optional()),ogTitle:ne.property("og:title",ne.string().optional()),ogDescription:ne.property("og:description",ne.string().optional()),ogUrl:ne.property("og:url",ne.string().optional()),ogImage:ne.property("og:image",ne.string().optional()),ogImageWidth:ne.property("og:image:width",ne.number().optional()),ogImageHeight:ne.property("og:image:height",ne.number().optional()),ogLocale:ne.property("og:locale",ne.string().optional()),ogLogo:ne.property("og:logo",ne.string().optional()),twitterTitle:ne.property("twitter:title",ne.string().optional()),twitterDescription:ne.property("twitter:description",ne.string().optional()),twitterHandle:ne.property("twitter:handle",ne.string().optional()),twitterImage:ne.property("twitter:image",ne.string().optional()),twitterSite:ne.property("twitter:site",ne.string().optional()),twitterUrl:ne.property("twitter:url",ne.string().optional()),twitterCard:ne.property("twitter:card",yDr.optional()),ogDynamic:ne.property("og:dynamic",ne.boolean().optional()),ogDynamicBackgroundImage:ne.property("og:dynamic:background-image",ne.string().optional()),ogDynamicTextColor:ne.property("og:dynamic:text-color",ne.string().optional()),ogDynamicBackgroundColor:ne.property("og:dynamic:background-color",ne.string().optional()),ogDynamicLogoColor:ne.property("og:dynamic:logo-color",ADr.optional()),ogDynamicShowLogo:ne.property("og:dynamic:show-logo",ne.boolean().optional()),ogDynamicShowSection:ne.property("og:dynamic:show-section",ne.boolean().optional()),ogDynamicShowDescription:ne.property("og:dynamic:show-description",ne.boolean().optional()),ogDynamicShowUrl:ne.property("og:dynamic:show-url",ne.boolean().optional()),ogDynamicShowGradient:ne.property("og:dynamic:show-gradient",ne.boolean().optional()),canonicalHost:ne.property("canonical-host",ne.string().optional())})});var GIe,m6t=h(()=>{"use strict";Br();sRr();GIe=ne.object({viewers:Gtt.optional()})});var w$,EDr=h(()=>{"use strict";Br();kLe();m6t();w$=ne.object({href:ne.string().optional(),target:GV.optional(),url:ne.string().optional(),text:ne.string().optional(),icon:ne.string().optional(),rightIcon:ne.string().optional(),rounded:ne.boolean().optional()}).extend(GIe)});var IDr,ddo=h(()=>{"use strict";Br();EDr();m6t();IDr=ne.object({links:ne.list(w$),text:ne.string().optional(),icon:ne.string().optional(),rightIcon:ne.string().optional(),rounded:ne.boolean().optional()}).extend(GIe)});var vDr,mdo=h(()=>{"use strict";Br();kLe();m6t();vDr=ne.object({url:ne.string(),target:GV.optional()}).extend(GIe)});var CDr,hdo=h(()=>{"use strict";Br();mdo();CDr=ne.undiscriminatedUnion([ne.string(),vDr])});var xDr,gdo=h(()=>{"use strict";Br();ddo();hdo();EDr();xDr=ne.union("type",{filled:w$,outlined:w$,minimal:w$,github:ne.object({value:CDr}),dropdown:IDr,primary:w$,secondary:w$}).transform({transform:e=>e,untransform:e=>e})});var WV,NLe=h(()=>{"use strict";Br();WV=ne.string()});var wDr,Ado=h(()=>{"use strict";Br();j3();NLe();wDr=ne.object({tab:WV,layout:ne.list(ne.lazy(()=>S$)).optional()})});var SDr,ydo=h(()=>{"use strict";Br();j3();nT();iT();SDr=ne.object({title:ne.string(),subtitle:ne.string().optional(),icon:ne.string().optional(),layout:ne.list(ne.lazy(()=>S$)),slug:ne.string().optional(),skipSlug:ne.property("skip-slug",ne.boolean().optional()),hidden:ne.boolean().optional(),default:ne.boolean().optional()}).extend(Jd).extend(Kd)});var TDr,bdo=h(()=>{"use strict";Br();NLe();ydo();TDr=ne.object({tab:WV,variants:ne.list(SDr)})});var ODr,Edo=h(()=>{"use strict";Br();Ado();bdo();ODr=ne.undiscriminatedUnion([wDr,TDr])});var PDr,Ido=h(()=>{"use strict";Br();Edo();PDr=ne.list(ODr)});var BDr,vdo=h(()=>{"use strict";Br();j3();BDr=ne.list(ne.lazy(()=>S$))});var qIe,h6t=h(()=>{"use strict";Br();Ido();vdo();qIe=ne.undiscriminatedUnion([BDr,PDr])});var RDr,Cdo=h(()=>{"use strict";Br();RDr=ne.enum_(["copy-page","view-as-markdown","ask-ai","chatgpt","claude","cursor","claude-code","vscode"])});var DDr,xdo=h(()=>{"use strict";Br();DDr=ne.object({name:ne.string(),description:ne.string().optional(),url:ne.string().optional()})});var kDr,wdo=h(()=>{"use strict";Br();kDr=ne.undiscriminatedUnion([ne.string(),ne.list(ne.string())])});var FDr,Sdo=h(()=>{"use strict";Br();xdo();wdo();FDr=ne.object({title:ne.string().optional(),description:ne.string().optional(),learnMoreUrl:ne.property("learn-more-url",ne.string().optional()),repository:ne.string().optional(),installCommand:ne.property("install-command",kDr.optional()),skills:ne.list(DDr).optional()})});var NDr,Tdo=h(()=>{"use strict";Br();Sfo();Sdo();NDr=ne.object({copyPage:ne.property("copy-page",ne.boolean().optional()),viewAsMarkdown:ne.property("view-as-markdown",ne.boolean().optional()),askAi:ne.property("ask-ai",ne.boolean().optional()),chatgpt:ne.boolean().optional(),claude:ne.boolean().optional(),claudeCode:ne.property("claude-code",ne.boolean().optional()),cursor:ne.boolean().optional(),mcp:ne.boolean().optional(),vscode:ne.boolean().optional(),custom:ne.list(PRr).optional(),skills:FDr.optional()})});var jDr,Odo=h(()=>{"use strict";Br();Cdo();Tdo();jDr=ne.object({default:RDr.optional(),options:NDr.optional()})});var zDr,Pdo=h(()=>{"use strict";Br();zDr=ne.enum_(["deprecated","legacy","ga","stable","beta","alpha","preview"])});var ert,QDr=h(()=>{"use strict";Br();c6t();_tt();Pdo();nT();iT();ert=ne.object({displayName:ne.property("display-name",ne.string()),path:ne.string().optional(),ref:ne.string().optional(),slug:ne.string().optional(),availability:zDr.optional(),audiences:E$.optional(),hidden:ne.boolean().optional(),announcement:UIe.optional()}).extend(Jd).extend(Kd)});var trt,MDr=h(()=>{"use strict";Br();_tt();QDr();nT();iT();trt=ne.object({displayName:ne.property("display-name",ne.string()),subtitle:ne.string().optional(),icon:ne.string().optional(),image:ne.string().optional(),versions:ne.list(ert).optional(),audiences:E$.optional()}).extend(Jd).extend(Kd)});var LDr,Bdo=h(()=>{"use strict";Br();MDr();kLe();LDr=ne.object({href:ne.string(),target:GV.optional()}).extend(trt)});var _Dr,Rdo=h(()=>{"use strict";Br();c6t();MDr();_Dr=ne.object({path:ne.string(),slug:ne.string().optional(),announcement:UIe.optional()}).extend(trt)});var UDr,Ddo=h(()=>{"use strict";Br();Bdo();Rdo();UDr=ne.undiscriminatedUnion([_Dr,LDr])});var VDr,kdo=h(()=>{"use strict";Br();VDr=ne.enum_(["typescript","javascript","python","java","go","ruby","csharp","php","swift","rust","nodets","nodejs","dotnet","curl","jvm","ts","js"])});var GDr,Fdo=h(()=>{"use strict";Br();GDr=ne.object({source:ne.string(),destination:ne.string(),permanent:ne.boolean().optional()})});var qDr,Ndo=h(()=>{"use strict";Br();Fdo();qDr=ne.undiscriminatedUnion([ne.list(GDr),ne.string(),ne.list(ne.string())])});var WIe,g6t=h(()=>{"use strict";Br();p6t();kLe();nT();iT();WIe=ne.object({displayName:ne.property("display-name",ne.string()),icon:ne.string().optional(),slug:ne.string().optional(),skipSlug:ne.property("skip-slug",ne.boolean().optional()),hidden:ne.boolean().optional(),href:ne.string().optional(),target:GV.optional(),changelog:kfe.optional(),blog:kfe.optional()}).extend(Jd).extend(Kd)});var WDr,jdo=h(()=>{"use strict";Br();WDr=ne.enum_(["default","minimal"])});var HDr,zdo=h(()=>{"use strict";Br();HDr=ne.enum_(["default","minimal"])});var KDr,Qdo=h(()=>{"use strict";Br();KDr=ne.enum_(["default","toolbar"])});var JDr,Mdo=h(()=>{"use strict";Br();JDr=ne.enum_(["default","toggle","tabs"])});var YDr,Ldo=h(()=>{"use strict";Br();YDr=ne.enum_(["default","minimal"])});var XDr,_do=h(()=>{"use strict";Br();XDr=ne.object({enabled:ne.boolean().optional(),order:ne.list(ne.string()).optional(),hide:ne.list(ne.string()).optional(),labels:ne.record(ne.string(),ne.string()).optional(),showProducts:ne.property("show-products",ne.boolean().optional())})});var ZDr,Udo=h(()=>{"use strict";Br();ZDr=ne.enum_(["left","center"])});var rrt,$Dr=h(()=>{"use strict";Br();rrt=ne.enum_(["default","bubble"])});var ekr,Vdo=h(()=>{"use strict";Br();Udo();sDr();$Dr();ekr=ne.object({style:rrt.optional(),alignment:ZDr.optional(),placement:Ztt.optional()})});var tkr,Gdo=h(()=>{"use strict";Br();Vdo();$Dr();tkr=ne.undiscriminatedUnion([rrt,ekr])});var rkr,qdo=h(()=>{"use strict";Br();mfo();jdo();zdo();Qdo();Mdo();Ldo();_do();Gdo();rkr=ne.object({sidebar:YDr.optional(),body:yRr.optional(),tabs:tkr.optional(),pageActions:ne.property("page-actions",KDr.optional()),footerNav:ne.property("footer-nav",WDr.optional()),languageSwitcher:ne.property("language-switcher",HDr.optional()),productSwitcher:ne.property("product-switcher",JDr.optional()),siteSwitcher:ne.property("site-switcher",XDr.optional())})});var nkr,Wdo=h(()=>{"use strict";Br();f6t();nkr=ne.object({lang:VIe,default:ne.boolean().optional()})});var ikr,Hdo=h(()=>{"use strict";Br();f6t();Wdo();ikr=ne.undiscriminatedUnion([VIe,nkr])});var $mc,ehc=h(()=>{"use strict";Br();Bpo();Npo();jpo();Vpo();c6t();ffo();ERr();bfo();vfo();xfo();Bfo();jfo();_fo();Gfo();qfo();Wfo();Xfo();tdo();cdo();hDr();udo();fdo();gdo();h6t();Odo();FLe();Ddo();kdo();Ndo();oRr();g6t();NLe();qdo();Hdo();QDr();$mc=ne.object({instances:ne.list(kRr),title:ne.string().optional(),libraries:ne.record($tt,mDr).optional(),analytics:GBr.optional(),announcement:UIe.optional(),roles:ne.list(DLe).optional(),tabs:ne.record(WV,WIe).optional(),versions:ne.list(ert).optional(),products:ne.list(UDr).optional(),changelog:Wtt.optional(),landingPage:ne.property("landing-page",qV.optional()),navigation:qIe.optional(),navbarLinks:ne.property("navbar-links",ne.list(xDr).optional()),footerLinks:ne.property("footer-links",YRr.optional()),pageActions:ne.property("page-actions",jDr.optional()),globalTheme:ne.property("global-theme",ne.string().optional()),experimental:JRr.optional(),defaultLanguage:ne.property("default-language",VDr.optional()),languages:ne.list(ne.string()).optional(),translations:ne.list(ikr).optional(),aiChat:ne.property("ai-chat",a6t.optional()),aiSearch:ne.property("ai-search",a6t.optional()),aiExamples:ne.property("ai-examples",zBr.optional()),agents:DBr.optional(),metadata:bDr.optional(),redirects:qDr.optional(),check:CRr.optional(),logo:gDr.optional(),favicon:ne.string().optional(),backgroundImage:ne.property("background-image",gRr.optional()),colors:wRr.optional(),typography:WRr.optional(),layout:aDr.optional(),settings:LRr.optional(),theme:rkr.optional(),integrations:XRr.optional(),css:TRr.optional(),js:rDr.optional(),header:ne.string().optional(),footer:ne.string().optional()})});var okr,Kdo=h(()=>{"use strict";Br();I$();Utt();QRr();nT();iT();okr=ne.object({folder:ne.string(),title:ne.string().optional(),titleSource:ne.property("title-source",Htt.optional()),slug:ne.string().optional(),icon:ne.string().optional(),hidden:ne.boolean().optional(),skipSlug:ne.property("skip-slug",ne.boolean().optional()),collapsed:v$.optional(),collapsible:ne.boolean().optional(),collapsedByDefault:ne.property("collapsed-by-default",ne.boolean().optional()),availability:rT.optional()}).extend(Jd).extend(Kd)});var skr,Jdo=h(()=>{"use strict";Br();hDr();nT();iT();skr=ne.object({library:$tt,title:ne.string().optional(),slug:ne.string().optional()}).extend(Jd).extend(Kd)});var S$,thc=h(()=>{"use strict";Br();j3();afo();dfo();ERr();Kdo();Jdo();pRr();FLe();S$=ne.undiscriminatedUnion([qV,ne.lazyObject(()=>akr),aRr,skr,qtt,Wtt,ARr,okr])});var rhc,nhc=h(()=>{"use strict";Br();h6t();FLe();g6t();NLe();rhc=ne.object({tabs:ne.record(WV,WIe).optional(),landingPage:ne.property("landing-page",qV.optional()),navigation:qIe})});var ckr,Ydo=h(()=>{"use strict";Br();nT();iT();ckr=ne.object({displayName:ne.property("display-name",ne.string()),path:ne.string(),slug:ne.string().optional()}).extend(Jd).extend(Kd)});var ihc,ohc=h(()=>{"use strict";Br();Opo();Ydo();ihc=ne.undiscriminatedUnion([ckr,BBr])});var akr,shc=h(()=>{"use strict";Br();j3();I$();Utt();nT();iT();akr=ne.object({section:ne.string(),path:ne.string().optional(),contents:ne.list(ne.lazy(()=>S$)),collapsed:v$.optional(),collapsible:ne.boolean().optional(),collapsedByDefault:ne.property("collapsed-by-default",ne.boolean().optional()),slug:ne.string().optional(),icon:ne.string().optional(),hidden:ne.boolean().optional(),skipSlug:ne.property("skip-slug",ne.boolean().optional()),availability:rT.optional()}).extend(Jd).extend(Kd)});var ahc,chc=h(()=>{"use strict";Br();h6t();FLe();g6t();NLe();ahc=ne.object({tabs:ne.record(WV,WIe).optional(),landingPage:ne.property("landing-page",qV.optional()),navigation:qIe})});var Xdo=h(()=>{"use strict";Opo();Bpo();Npo();Dpo();kpo();Fpo();Rpo();jpo();Vpo();c6t();afo();cfo();ufo();Jmc();lfo();Ymc();Xmc();Zmc();Xpo();Gpo();Wpo();qpo();Hpo();Kpo();Jpo();Ypo();_tt();Zpo();I$();ffo();pfo();dfo();mfo();hfo();ERr();p6t();gfo();bfo();Afo();yfo();$po();Utt();Ifo();vfo();Efo();Cfo();xfo();wfo();Sfo();ehc();Bfo();jfo();_fo();Pfo();Tfo();Rfo();Gfo();Bdo();Vfo();Ufo();ofo();sfo();Kdo();Lfo();Qfo();zfo();Mfo();_Rr();URr();qfo();jdo();zpo();Ofo();ndo();Qpo();Mpo();Zfo();Dfo();kfo();Wfo();Lpo();Rdo();Xfo();Yfo();Kfo();Hfo();Jfo();ZRr();f6t();zdo();tdo();rdo();cdo();odo();sdo();hDr();ado();Jdo();pRr();udo();fdo();ddo();hdo();mdo();gdo();EDr();h6t();thc();ldo();Cdo();Tdo();Odo();Qdo();FLe();Ppo();ido();efo();Vtt();_po();Ddo();MDr();nhc();ohc();Mdo();kdo();Fdo();Ndo();Ydo();sRr();oRr();$fo();Ffo();shc();Upo();Ldo();_do();xdo();wdo();Sdo();rfo();nfo();ifo();edo();Ido();Edo();Ado();bdo();g6t();NLe();Udo();sDr();Gdo();Vdo();$Dr();ydo();kLe();qdo();QRr();Hdo();Wdo();pdo();vdo();Pdo();QDr();tfo();chc();Nfo();nT();iT();m6t()});var Zdo={};ee(Zdo,{AbsoluteProductPath:()=>BBr,AgentsConfig:()=>DBr,AiChatConfig:()=>a6t,AiChatDatasource:()=>FBr,AiChatLocation:()=>NBr,AiChatModel:()=>jBr,AiChatWebsiteDatasource:()=>kBr,AiExamplesConfig:()=>zBr,AnalyticsConfig:()=>GBr,AnnouncementConfig:()=>UIe,ApiReferenceConfiguration:()=>aRr,ApiReferenceEndpointConfiguration:()=>cRr,ApiReferenceLayout:()=>uRr,ApiReferenceLayoutItem:()=>x$,ApiReferenceOperationConfiguration:()=>lRr,ApiReferencePackageConfiguration:()=>fRr,ApiReferencePackageConfigurationWithOptions:()=>mRr,ApiReferenceSectionConfiguration:()=>dRr,ApiSpecConfiguration:()=>ZBr,ApiSpecErrorResponseApplyTo:()=>qBr,ApiSpecErrorResponseEnsure:()=>HBr,ApiSpecErrorResponseHttpMethod:()=>WBr,ApiSpecErrorResponseSchemaSource:()=>KBr,ApiSpecErrorResponses:()=>JBr,ApiSpecImportSettings:()=>YBr,ApiSpecType:()=>XBr,Audience:()=>E$,AudienceId:()=>u6t,Availability:()=>rT,BackgroundImageConfiguration:()=>gRr,BackgroundImageThemedConfig:()=>hRr,BlogConfiguration:()=>ARr,BodyThemeConfig:()=>yRr,BreadcrumbsConfig:()=>bRr,ChangelogConfiguration:()=>Wtt,ChangelogFolderRelativePath:()=>kfe,ChangelogLayout:()=>IRr,CheckConfig:()=>CRr,CheckRuleSeverity:()=>LH,CheckRulesConfig:()=>vRr,CollapsedStringValue:()=>$Br,CollapsedValue:()=>v$,ColorConfig:()=>dv,ColorThemedConfig:()=>xRr,ColorsConfiguration:()=>wRr,ContentAlignment:()=>SRr,CssConfig:()=>TRr,CustomDomain:()=>ORr,CustomPageAction:()=>PRr,DocsConfiguration:()=>$mc,DocsInstance:()=>kRr,DocsSettingsConfig:()=>LRr,DocsTypographyConfig:()=>WRr,EditThisPageConfig:()=>DRr,EditThisPageLaunch:()=>BRr,EmbeddingConfig:()=>FRr,ExperimentalConfig:()=>JRr,ExternalProduct:()=>LDr,ExternalSitemap:()=>KRr,ExternalSitemapConfig:()=>HRr,FeatureFlag:()=>l6t,FeatureFlagConfiguration:()=>iRr,FolderConfiguration:()=>okr,FontConfig:()=>Ytt,FontConfigPath:()=>GRr,FontConfigVariant:()=>VRr,FontDisplay:()=>qRr,FontStyle:()=>Ktt,FontWeight:()=>Jtt,FooterLinksConfig:()=>YRr,FooterNavThemeConfig:()=>WDr,FullStoryAnalyticsConfig:()=>QBr,GitLibraryInputSchema:()=>uDr,GithubEditThisPageConfig:()=>RRr,GoogleAnalytics4Config:()=>MBr,GtmConfig:()=>LBr,HeaderPosition:()=>nDr,HttpSnippetLanguage:()=>NRr,HttpSnippetsConfig:()=>jRr,IntegrationsConfig:()=>XRr,IntercomConfig:()=>_Br,InternalProduct:()=>_Dr,JsConfig:()=>rDr,JsConfigOptions:()=>d6t,JsFileConfig:()=>eDr,JsFileConfigSettings:()=>$Rr,JsRemoteConfig:()=>tDr,JsScriptStrategy:()=>Xtt,Language:()=>VIe,LanguageSwitcherThemeConfig:()=>HDr,LayoutConfig:()=>aDr,LibraryConfig:()=>cDr,LibraryConfiguration:()=>mDr,LibraryInputConfiguration:()=>pDr,LibraryLanguage:()=>fDr,LibraryName:()=>$tt,LibraryOutputConfiguration:()=>dDr,LibraryReferenceConfiguration:()=>skr,LinkConfiguration:()=>qtt,LogoConfiguration:()=>gDr,MetadataConfig:()=>bDr,NavbarDropdownConfig:()=>IDr,NavbarGithubConfig:()=>CDr,NavbarGithubConfigWithOptions:()=>vDr,NavbarLink:()=>xDr,NavbarLinkConfig:()=>w$,NavigationConfig:()=>qIe,NavigationItem:()=>S$,OgDynamicLogoColor:()=>ADr,PageActionOption:()=>RDr,PageActionOptions:()=>NDr,PageActionsConfig:()=>jDr,PageActionsThemeConfig:()=>KDr,PageConfiguration:()=>qV,PageDescriptionSource:()=>RBr,PathLibraryInputSchema:()=>lDr,PlaygroundButtonSettings:()=>eRr,PlaygroundSettings:()=>C$,PostHogConfig:()=>UBr,ProductConfig:()=>UDr,ProductConfigBase:()=>trt,ProductFileConfig:()=>rhc,ProductPath:()=>ihc,ProductSwitcherThemeConfig:()=>JDr,ProgrammingLanguage:()=>VDr,RedirectConfig:()=>GDr,RedirectsConfiguration:()=>qDr,RelativeProductPath:()=>ckr,Role:()=>Gtt,RoleId:()=>DLe,SearchSettingsConfig:()=>zRr,SearchbarPlacement:()=>iDr,SectionConfiguration:()=>akr,SegmentConfig:()=>VBr,SidebarThemeConfig:()=>YDr,SiteSwitcherThemeConfig:()=>XDr,SkillEntry:()=>DDr,SkillsInstallCommand:()=>kDr,SkillsPageActionConfig:()=>FDr,SnippetLanguageConfiguration:()=>VV,SnippetsConfiguration:()=>rRr,SortByAvailabilityValue:()=>nRr,SwitcherPlacement:()=>oDr,TabConfig:()=>WIe,TabId:()=>WV,TabVariant:()=>SDr,TabbedNavigationConfig:()=>PDr,TabbedNavigationItem:()=>ODr,TabbedNavigationItemWithLayout:()=>wDr,TabbedNavigationItemWithVariants:()=>TDr,TabsAlignment:()=>ZDr,TabsPlacement:()=>Ztt,TabsThemeConfig:()=>tkr,TabsThemeObjectConfig:()=>ekr,TabsThemeStyle:()=>rrt,Target:()=>GV,ThemeConfig:()=>rkr,TitleSource:()=>Htt,TranslationConfig:()=>ikr,TranslationConfigObject:()=>nkr,TwitterCardSetting:()=>yDr,UntabbedNavigationConfig:()=>BDr,VersionAvailability:()=>zDr,VersionConfig:()=>ert,VersionFileConfig:()=>ahc,VersionedSnippetLanguageConfiguration:()=>tRr,WebSocketOneofDisplay:()=>MRr,WithFeatureFlags:()=>Kd,WithPermissions:()=>Jd,WithViewers:()=>GIe});var uhc=h(()=>{"use strict";Xdo()});var lhc=h(()=>{"use strict";uhc();Xdo()});var hQ={};ee(hQ,{AbsoluteProductPath:()=>BBr,AgentsConfig:()=>DBr,AiChatConfig:()=>a6t,AiChatDatasource:()=>FBr,AiChatLocation:()=>NBr,AiChatModel:()=>jBr,AiChatWebsiteDatasource:()=>kBr,AiExamplesConfig:()=>zBr,AnalyticsConfig:()=>GBr,AnnouncementConfig:()=>UIe,ApiReferenceConfiguration:()=>aRr,ApiReferenceEndpointConfiguration:()=>cRr,ApiReferenceLayout:()=>uRr,ApiReferenceLayoutItem:()=>x$,ApiReferenceOperationConfiguration:()=>lRr,ApiReferencePackageConfiguration:()=>fRr,ApiReferencePackageConfigurationWithOptions:()=>mRr,ApiReferenceSectionConfiguration:()=>dRr,ApiSpecConfiguration:()=>ZBr,ApiSpecErrorResponseApplyTo:()=>qBr,ApiSpecErrorResponseEnsure:()=>HBr,ApiSpecErrorResponseHttpMethod:()=>WBr,ApiSpecErrorResponseSchemaSource:()=>KBr,ApiSpecErrorResponses:()=>JBr,ApiSpecImportSettings:()=>YBr,ApiSpecType:()=>XBr,Audience:()=>E$,AudienceId:()=>u6t,Availability:()=>rT,BackgroundImageConfiguration:()=>gRr,BackgroundImageThemedConfig:()=>hRr,BlogConfiguration:()=>ARr,BodyThemeConfig:()=>yRr,BreadcrumbsConfig:()=>bRr,ChangelogConfiguration:()=>Wtt,ChangelogFolderRelativePath:()=>kfe,ChangelogLayout:()=>IRr,CheckConfig:()=>CRr,CheckRuleSeverity:()=>LH,CheckRulesConfig:()=>vRr,CollapsedStringValue:()=>$Br,CollapsedValue:()=>v$,ColorConfig:()=>dv,ColorThemedConfig:()=>xRr,ColorsConfiguration:()=>wRr,ContentAlignment:()=>SRr,CssConfig:()=>TRr,CustomDomain:()=>ORr,CustomPageAction:()=>PRr,DocsConfiguration:()=>$mc,DocsInstance:()=>kRr,DocsSettingsConfig:()=>LRr,DocsTypographyConfig:()=>WRr,EditThisPageConfig:()=>DRr,EditThisPageLaunch:()=>BRr,EmbeddingConfig:()=>FRr,ExperimentalConfig:()=>JRr,ExternalProduct:()=>LDr,ExternalSitemap:()=>KRr,ExternalSitemapConfig:()=>HRr,FeatureFlag:()=>l6t,FeatureFlagConfiguration:()=>iRr,FolderConfiguration:()=>okr,FontConfig:()=>Ytt,FontConfigPath:()=>GRr,FontConfigVariant:()=>VRr,FontDisplay:()=>qRr,FontStyle:()=>Ktt,FontWeight:()=>Jtt,FooterLinksConfig:()=>YRr,FooterNavThemeConfig:()=>WDr,FullStoryAnalyticsConfig:()=>QBr,GitLibraryInputSchema:()=>uDr,GithubEditThisPageConfig:()=>RRr,GoogleAnalytics4Config:()=>MBr,GtmConfig:()=>LBr,HeaderPosition:()=>nDr,HttpSnippetLanguage:()=>NRr,HttpSnippetsConfig:()=>jRr,IntegrationsConfig:()=>XRr,IntercomConfig:()=>_Br,InternalProduct:()=>_Dr,JsConfig:()=>rDr,JsConfigOptions:()=>d6t,JsFileConfig:()=>eDr,JsFileConfigSettings:()=>$Rr,JsRemoteConfig:()=>tDr,JsScriptStrategy:()=>Xtt,Language:()=>VIe,LanguageSwitcherThemeConfig:()=>HDr,LayoutConfig:()=>aDr,LibraryConfig:()=>cDr,LibraryConfiguration:()=>mDr,LibraryInputConfiguration:()=>pDr,LibraryLanguage:()=>fDr,LibraryName:()=>$tt,LibraryOutputConfiguration:()=>dDr,LibraryReferenceConfiguration:()=>skr,LinkConfiguration:()=>qtt,LogoConfiguration:()=>gDr,MetadataConfig:()=>bDr,NavbarDropdownConfig:()=>IDr,NavbarGithubConfig:()=>CDr,NavbarGithubConfigWithOptions:()=>vDr,NavbarLink:()=>xDr,NavbarLinkConfig:()=>w$,NavigationConfig:()=>qIe,NavigationItem:()=>S$,OgDynamicLogoColor:()=>ADr,PageActionOption:()=>RDr,PageActionOptions:()=>NDr,PageActionsConfig:()=>jDr,PageActionsThemeConfig:()=>KDr,PageConfiguration:()=>qV,PageDescriptionSource:()=>RBr,PathLibraryInputSchema:()=>lDr,PlaygroundButtonSettings:()=>eRr,PlaygroundSettings:()=>C$,PostHogConfig:()=>UBr,ProductConfig:()=>UDr,ProductConfigBase:()=>trt,ProductFileConfig:()=>rhc,ProductPath:()=>ihc,ProductSwitcherThemeConfig:()=>JDr,ProgrammingLanguage:()=>VDr,RedirectConfig:()=>GDr,RedirectsConfiguration:()=>qDr,RelativeProductPath:()=>ckr,Role:()=>Gtt,RoleId:()=>DLe,SearchSettingsConfig:()=>zRr,SearchbarPlacement:()=>iDr,SectionConfiguration:()=>akr,SegmentConfig:()=>VBr,SidebarThemeConfig:()=>YDr,SiteSwitcherThemeConfig:()=>XDr,SkillEntry:()=>DDr,SkillsInstallCommand:()=>kDr,SkillsPageActionConfig:()=>FDr,SnippetLanguageConfiguration:()=>VV,SnippetsConfiguration:()=>rRr,SortByAvailabilityValue:()=>nRr,SwitcherPlacement:()=>oDr,TabConfig:()=>WIe,TabId:()=>WV,TabVariant:()=>SDr,TabbedNavigationConfig:()=>PDr,TabbedNavigationItem:()=>ODr,TabbedNavigationItemWithLayout:()=>wDr,TabbedNavigationItemWithVariants:()=>TDr,TabsAlignment:()=>ZDr,TabsPlacement:()=>Ztt,TabsThemeConfig:()=>tkr,TabsThemeObjectConfig:()=>ekr,TabsThemeStyle:()=>rrt,Target:()=>GV,ThemeConfig:()=>rkr,TitleSource:()=>Htt,TranslationConfig:()=>ikr,TranslationConfigObject:()=>nkr,TwitterCardSetting:()=>yDr,UntabbedNavigationConfig:()=>BDr,VersionAvailability:()=>zDr,VersionConfig:()=>ert,VersionFileConfig:()=>ahc,VersionedSnippetLanguageConfiguration:()=>tRr,WebSocketOneofDisplay:()=>MRr,WithFeatureFlags:()=>Kd,WithPermissions:()=>Jd,WithViewers:()=>GIe,docs:()=>Zdo});var j3=h(()=>{"use strict";lhc()});var phc=h(()=>{"use strict";cpo();kdc();zdc();j3()});var $do={};ee($do,{AiChatLocation:()=>Ilo,AiChatModel:()=>vlo,ApiReferenceLayout:()=>Clo,ApiSpecErrorResponseApplyTo:()=>xlo,ApiSpecErrorResponseHttpMethod:()=>wlo,ApiSpecType:()=>Slo,Availability:()=>Tlo,BodyThemeConfig:()=>Olo,ChangelogLayout:()=>Plo,CheckRuleSeverity:()=>Blo,CollapsedStringValue:()=>Rlo,ContentAlignment:()=>Dlo,EditThisPageLaunch:()=>klo,FernDocsConfig:()=>apo,FernDocsConfigError:()=>e6t,FernDocsConfigTimeoutError:()=>t6t,FontDisplay:()=>Flo,FontStyle:()=>Nlo,FooterNavThemeConfig:()=>jlo,HeaderPosition:()=>zlo,HttpSnippetLanguage:()=>Qlo,JsScriptStrategy:()=>Mlo,LanguageSwitcherThemeConfig:()=>Llo,LibraryLanguage:()=>_lo,OgDynamicLogoColor:()=>Ulo,PageActionOption:()=>Vlo,PageActionsThemeConfig:()=>Glo,PageDescriptionSource:()=>qlo,ProductSwitcherThemeConfig:()=>Wlo,ProgrammingLanguage:()=>Hlo,SearchbarPlacement:()=>Klo,Serializer:()=>hQ,SidebarThemeConfig:()=>Jlo,SortByAvailabilityValue:()=>Ylo,SwitcherPlacement:()=>Xlo,TabsAlignment:()=>Zlo,TabsPlacement:()=>$lo,TabsThemeStyle:()=>epo,Target:()=>tpo,TitleSource:()=>rpo,TwitterCardSetting:()=>npo,VersionAvailability:()=>ipo,WebSocketOneofDisplay:()=>opo,docs:()=>xBr,logging:()=>ppo,serialization:()=>hQ});var fhc=h(()=>{"use strict";phc();cpo();j3()});function Led(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}var dhc,mhc,_ed,hhc=h(()=>{"use strict";dhc={logo:"global",favicon:"global",backgroundImage:"global",colors:"global",typography:"global",layout:"global",settings:"global",theme:"global",integrations:"global",css:"global",js:"global",header:"global",footer:"global",navbarLinks:"global",footerLinks:"global",aiSearch:"global",announcement:"global",metadata:"global"},mhc=Object.keys(dhc);_ed=new Set(mhc.map(Led))});function Ahc(e){if(e.trim()!==e||e.length===0)return`Origin "${e}" must not be empty or contain surrounding whitespace`;if(e==="*"||e.startsWith("*"))return`Origin "${e}" is not allowed: a bare wildcard would let any site embed your docs. Use a scoped wildcard such as https://*.example.com instead`;if(!Ued.test(e))return`Origin "${e}" is not a valid origin. Expected scheme://host[:port] with no path, query, or CSP keywords, e.g. https://app.example.com or https://*.example.com`}function Ved(e){let t=[];return e.forEach((r,n)=>{let i=Ahc(r);i!=null&&t.push(`settings.embedding.allowed-origins[${n}]: ${i}`)}),t}var ghc,Ued,yhc=h(()=>{"use strict";ghc="[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?",Ued=new RegExp(`^https?://(?:\\*\\.)?${ghc}(?:\\.${ghc})*(?::\\d{1,5})?$`)});var sc={};ee(sc,{DEFAULT_BLOG_TITLE:()=>Ced,DEFAULT_CHANGELOG_TITLE:()=>ved,DocsYmlSchemas:()=>Elo,RawSchemas:()=>$do,THEME_ELIGIBLE_FIELDS:()=>mhc,THEME_ELIGIBLE_YAML_KEYS:()=>_ed,THEME_FIELD_POLICIES:()=>dhc,getChangelogFolderFromNavigationItem:()=>xed,getChangelogFolderFromTabConfig:()=>wed,getEmbeddingOriginErrors:()=>Ved,validateEmbeddingOrigin:()=>Ahc});var bhc=h(()=>{"use strict";glc();Alc();ylc();fhc();hhc();yhc()});var Ehc=h(()=>{"use strict"});async function T$({absolutePathToFernignore:e}){let t=(await(0,Ihc.readFile)(e)).toString();return vhc(t)}function vhc(e){return[eT,...e.trim().split(qed).map(t=>{let r=t.indexOf("#");return r!==-1?t.slice(0,r).trim():t.trim()}).filter(t=>t.length>0)]}var Ihc,qed,Chc=h(()=>{"use strict";Ihc=require("fs/promises");TOr();qed=/\r?\n/});function whc(e){return e.output?.location==="rubygems"&&e.github==null}var xhc,Shc=h(()=>{"use strict";xhc="Direct RubyGems publishing is not supported. Add a github block to this generator (for example, github: { repository: your-org/your-ruby-sdk }) so the gem is published by the GitHub Actions workflow generated in that repository."});function Ohc({generatorInvocation:e}){return e.language==="go"?Wed(e):e.outputMode._visit({downloadFiles:()=>{},github:t=>t.publishInfo?._visit({maven:r=>r.coordinate,npm:r=>r.packageName,pypi:r=>r.packageName,postman:()=>{},rubygems:r=>r.packageName,nuget:r=>r.packageName,crates:r=>r.packageName,_other:()=>{}}),githubV2:t=>t.publishInfo?._visit({maven:r=>r.coordinate,npm:r=>r.packageName,pypi:r=>r.packageName,postman:()=>{},rubygems:r=>r.packageName,nuget:r=>r.packageName,crates:r=>r.packageName,_other:()=>{}}),publish:()=>{},publishV2:()=>{},_other:()=>{}})}function Wed(e){return e.outputMode._visit({downloadFiles:()=>{},github:t=>`github.com/${t.owner}/${t.repo}`,githubV2:t=>`github.com/${t.owner}/${t.repo}`,publish:()=>{},publishV2:()=>{},_other:()=>{}})}var Thc,Phc=h(()=>{"use strict";Thc={TYPESCRIPT:"typescript",JAVA:"java",PYTHON:"python",GO:"go",RUBY:"ruby",CSHARP:"csharp",SWIFT:"swift",PHP:"php",RUST:"rust"}});function Bhc(e){return typeof e!="string"&&"proto"in e}var Rhc=h(()=>{"use strict"});function Dhc({rootAutomation:e,groupAutomation:t,generatorAutomation:r}){return{generate:r?.generate??t?.generate??e?.generate??ukr.generate,upgrade:r?.upgrade??t?.upgrade??e?.upgrade??ukr.upgrade,preview:r?.preview??t?.preview??e?.preview??ukr.preview,verify:r?.verify??t?.verify??e?.verify??ukr.verify}}var ukr,khc=h(()=>{"use strict";ukr={generate:!0,upgrade:!0,preview:!0,verify:!0}});var Fhc=h(()=>{"use strict"});var Nhc=h(()=>{"use strict"});var jhc,zhc=h(()=>{"use strict";jhc={Openai:"openai",Anthropic:"anthropic",AwsBedrock:"aws-bedrock"}});var emo=h(()=>{"use strict";Fhc();Nhc();zhc()});var tmo={};ee(tmo,{ModelProvider:()=>jhc});var Qhc=h(()=>{"use strict";emo()});var Mhc=h(()=>{"use strict"});var rmo=h(()=>{"use strict";Mhc()});var Lhc={};var _hc=h(()=>{"use strict";rmo()});var Uhc=h(()=>{"use strict"});var Vhc=h(()=>{"use strict"});var Ghc=h(()=>{"use strict"});var qhc=h(()=>{"use strict"});var Whc=h(()=>{"use strict"});var Hhc=h(()=>{"use strict"});var Khc=h(()=>{"use strict"});var Jhc=h(()=>{"use strict"});var Yhc=h(()=>{"use strict"});var Xhc=h(()=>{"use strict"});var Zhc=h(()=>{"use strict"});var $hc=h(()=>{"use strict"});var egc=h(()=>{"use strict"});var tgc,rgc=h(()=>{"use strict";tgc={ApiKey:"api-key",RefreshToken:"refresh-token"}});var ngc=h(()=>{"use strict"});var igc=h(()=>{"use strict"});var ogc=h(()=>{"use strict"});var sgc=h(()=>{"use strict"});var agc=h(()=>{"use strict"});var cgc,ugc=h(()=>{"use strict";cgc={ClientCredentials:"client-credentials",AuthorizationCode:"authorization-code",DeviceCode:"device-code"}});var lgc=h(()=>{"use strict"});var pgc=h(()=>{"use strict"});var fgc=h(()=>{"use strict"});var dgc=h(()=>{"use strict"});var mgc=h(()=>{"use strict"});var hgc=h(()=>{"use strict"});var ggc=h(()=>{"use strict"});var Agc=h(()=>{"use strict"});var ygc=h(()=>{"use strict"});var bgc=h(()=>{"use strict"});var nmo=h(()=>{"use strict";Uhc();Vhc();Ghc();qhc();Whc();Hhc();Khc();Jhc();Yhc();Xhc();Zhc();$hc();egc();rgc();ngc();igc();ogc();sgc();agc();ugc();lgc();pgc();fgc();dgc();mgc();hgc();ggc();Agc();ygc();bgc()});var imo={};ee(imo,{InferredAuthTypeSchema:()=>tgc,OAuthFlowTypeSchema:()=>cgc});var Egc=h(()=>{"use strict";nmo()});var Igc=h(()=>{"use strict"});var vgc,Cgc=h(()=>{"use strict";vgc={InDevelopment:"in-development",PreRelease:"pre-release",Deprecated:"deprecated",GenerallyAvailable:"generally-available"}});var xgc=h(()=>{"use strict"});var omo=h(()=>{"use strict";Igc();Cgc();xgc()});var smo={};ee(smo,{AvailabilityStatusSchema:()=>vgc});var wgc=h(()=>{"use strict";omo()});var Sgc=h(()=>{"use strict"});var Tgc=h(()=>{"use strict"});var Ogc=h(()=>{"use strict"});var Pgc=h(()=>{"use strict"});var amo=h(()=>{"use strict";Sgc();Tgc();Ogc();Pgc()});var Bgc={};var Rgc=h(()=>{"use strict";amo()});var Dgc=h(()=>{"use strict"});var kgc=h(()=>{"use strict"});var cmo=h(()=>{"use strict";Dgc();kgc()});var Fgc={};var Ngc=h(()=>{"use strict";cmo()});var jgc=h(()=>{"use strict"});var zgc=h(()=>{"use strict"});var Qgc=h(()=>{"use strict"});var Mgc=h(()=>{"use strict"});var Lgc=h(()=>{"use strict"});var umo=h(()=>{"use strict";jgc();zgc();Qgc();Mgc();Lgc()});var _gc={};var Ugc=h(()=>{"use strict";umo()});var Vgc=h(()=>{"use strict"});var lmo=h(()=>{"use strict";Vgc()});var Ggc={};var qgc=h(()=>{"use strict";lmo()});var Wgc=h(()=>{"use strict"});var Hgc=h(()=>{"use strict"});var Kgc=h(()=>{"use strict"});var pmo=h(()=>{"use strict";Wgc();Hgc();Kgc()});var Jgc={};var Ygc=h(()=>{"use strict";pmo()});var Xgc=h(()=>{"use strict"});var Zgc=h(()=>{"use strict"});var fmo=h(()=>{"use strict";Xgc();Zgc()});var $gc={};var eAc=h(()=>{"use strict";fmo()});var tAc=h(()=>{"use strict"});var rAc=h(()=>{"use strict"});var nAc=h(()=>{"use strict"});var iAc=h(()=>{"use strict"});var oAc=h(()=>{"use strict"});var dmo=h(()=>{"use strict";tAc();rAc();nAc();iAc();oAc()});var sAc={};var aAc=h(()=>{"use strict";dmo()});var cAc=h(()=>{"use strict";Egc();nmo();wgc();omo();Rgc();amo();Ngc();cmo();Ugc();umo();qgc();lmo();Ygc();pmo();eAc();fmo();aAc();dmo()});var mmo={};ee(mmo,{AvailabilityStatusSchema:()=>vgc,InferredAuthTypeSchema:()=>tgc,OAuthFlowTypeSchema:()=>cgc,auth:()=>imo,availability:()=>smo,commons:()=>Bgc,encoding:()=>Fgc,environments:()=>_gc,file:()=>Ggc,service:()=>Jgc,types:()=>$gc,validation:()=>sAc});var uAc=h(()=>{"use strict";cAc()});var lAc=h(()=>{"use strict"});var pAc=h(()=>{"use strict"});var fAc=h(()=>{"use strict"});var dAc=h(()=>{"use strict"});var mAc=h(()=>{"use strict"});var hAc=h(()=>{"use strict"});var gAc=h(()=>{"use strict"});var AAc=h(()=>{"use strict"});var yAc=h(()=>{"use strict"});var bAc=h(()=>{"use strict"});var EAc=h(()=>{"use strict"});var IAc=h(()=>{"use strict"});var vAc=h(()=>{"use strict"});var CAc,xAc=h(()=>{"use strict";CAc={Literals:"literals",Enums:"enums",EnumsCoerceableToLiterals:"enums-coerceable-to-literals"}});var wAc=h(()=>{"use strict"});var SAc,TAc=h(()=>{"use strict";SAc={Int32:"int32",Int64:"int64",Uint32:"uint32",Uint64:"uint64"}});var OAc,PAc=h(()=>{"use strict";OAc={Minimal:"minimal",Comprehensive:"comprehensive"}});var BAc,RAc=h(()=>{"use strict";BAc={Form:"form",Json:"json"}});var DAc=h(()=>{"use strict"});var kAc=h(()=>{"use strict"});var FAc=h(()=>{"use strict"});var NAc=h(()=>{"use strict"});var jAc=h(()=>{"use strict"});var zAc=h(()=>{"use strict"});var QAc,MAc=h(()=>{"use strict";QAc={Java:"java",Python:"python",Go:"go",Ruby:"ruby",Csharp:"csharp",Typescript:"typescript",Php:"php",Rust:"rust",Swift:"swift"}});var LAc,_Ac=h(()=>{"use strict";LAc={V1:"v1",V2:"v2"}});var UAc,VAc=h(()=>{"use strict";UAc={EnvironmentPerServer:"environment-per-server",UrlsPerEnvironment:"urls-per-environment"}});var GAc=h(()=>{"use strict"});var qAc,WAc=h(()=>{"use strict";qAc={All:"all",Untyped:"untyped"}});var HAc=h(()=>{"use strict"});var KAc,JAc=h(()=>{"use strict";KAc={Get:"get",Post:"post",Put:"put",Patch:"patch",Delete:"delete",Head:"head",Options:"options",Trace:"trace"}});var YAc=h(()=>{"use strict"});var XAc=h(()=>{"use strict"});var ZAc=h(()=>{"use strict"});var $Ac=h(()=>{"use strict"});var eyc=h(()=>{"use strict"});var tyc=h(()=>{"use strict"});var ryc=h(()=>{"use strict"});var nyc=h(()=>{"use strict"});var iyc=h(()=>{"use strict"});var oyc=h(()=>{"use strict"});var syc,ayc=h(()=>{"use strict";syc={UrlOrder:"url-order",SpecOrder:"spec-order"}});var cyc=h(()=>{"use strict"});var uyc=h(()=>{"use strict"});var lyc=h(()=>{"use strict"});var pyc=h(()=>{"use strict"});var fyc=h(()=>{"use strict"});var dyc=h(()=>{"use strict"});var myc=h(()=>{"use strict"});var hyc,gyc=h(()=>{"use strict";hyc={Always:"always",Never:"never"}});var Ayc=h(()=>{"use strict"});var yyc=h(()=>{"use strict"});var byc=h(()=>{"use strict"});var Eyc=h(()=>{"use strict"});var Iyc=h(()=>{"use strict"});var vyc=h(()=>{"use strict"});var Cyc,xyc=h(()=>{"use strict";Cyc={V1:"v1"}});var wyc=h(()=>{"use strict"});var Syc=h(()=>{"use strict"});var hmo=h(()=>{"use strict";lAc();pAc();fAc();dAc();mAc();hAc();gAc();AAc();yAc();bAc();EAc();IAc();vAc();xAc();wAc();TAc();PAc();RAc();DAc();kAc();FAc();NAc();jAc();zAc();MAc();_Ac();VAc();GAc();WAc();HAc();JAc();YAc();XAc();ZAc();$Ac();eyc();tyc();ryc();nyc();iyc();oyc();ayc();cyc();uyc();lyc();pyc();fyc();dyc();myc();gyc();Ayc();yyc();byc();Eyc();Iyc();vyc();xyc();wyc();Syc()});var gmo={};ee(gmo,{CoerceConstsTo:()=>CAc,DefaultIntegerFormat:()=>SAc,ExampleStyle:()=>OAc,FormParameterEncoding:()=>BAc,Language:()=>QAc,MessageNamingSettingsSchema:()=>LAc,MultiServerStrategy:()=>UAc,OpenApiErrorResponsesApplyTo:()=>qAc,OpenApiErrorResponsesHttpMethod:()=>KAc,PathParameterOrder:()=>syc,RemoveDiscriminantsFromSchemas:()=>hyc,UnionSettingsSchema:()=>Cyc});var Tyc=h(()=>{"use strict";hmo()});var Oyc=h(()=>{"use strict"});var Pyc=h(()=>{"use strict"});var Byc=h(()=>{"use strict"});var Ryc=h(()=>{"use strict"});var Dyc=h(()=>{"use strict"});var kyc=h(()=>{"use strict"});var Fyc=h(()=>{"use strict"});var Nyc=h(()=>{"use strict"});var jyc=h(()=>{"use strict"});var zyc=h(()=>{"use strict"});var Qyc=h(()=>{"use strict"});var Myc,Lyc=h(()=>{"use strict";Myc={Commit:"commit",Release:"release"}});var _yc=h(()=>{"use strict"});var Uyc=h(()=>{"use strict"});var Vyc=h(()=>{"use strict"});var Gyc=h(()=>{"use strict"});var qyc,Wyc=h(()=>{"use strict";qyc={PullRequest:"pull-request",Push:"push",CommitAndRelease:"commit-and-release"}});var Hyc=h(()=>{"use strict"});var Kyc=h(()=>{"use strict"});var Jyc=h(()=>{"use strict"});var Yyc=h(()=>{"use strict"});var Xyc=h(()=>{"use strict"});var Zyc=h(()=>{"use strict"});var $yc=h(()=>{"use strict"});var ebc=h(()=>{"use strict"});var tbc=h(()=>{"use strict"});var rbc=h(()=>{"use strict"});var Amo=h(()=>{"use strict";Oyc();Pyc();Byc();Ryc();Dyc();kyc();Fyc();Nyc();jyc();zyc();Qyc();Lyc();_yc();Uyc();Vyc();Gyc();Wyc();Hyc();Kyc();Jyc();Yyc();Xyc();Zyc();$yc();ebc();tbc();rbc()});var ymo={};ee(ymo,{GithubCommitAndReleaseMode:()=>Myc,GithubSelfhostedMode:()=>qyc});var nbc=h(()=>{"use strict";Amo()});var ibc=h(()=>{"use strict"});var obc=h(()=>{"use strict"});var sbc,abc=h(()=>{"use strict";sbc={Mit:"MIT",Apache:"Apache-2.0"}});var bmo=h(()=>{"use strict";ibc();obc();abc()});var Emo={};ee(Emo,{GithubLicenseType:()=>sbc});var cbc=h(()=>{"use strict";bmo()});var ubc=h(()=>{"use strict"});var Imo=h(()=>{"use strict";ubc()});var lbc={};var pbc=h(()=>{"use strict";Imo()});var fbc=h(()=>{"use strict"});var dbc=h(()=>{"use strict"});var vmo=h(()=>{"use strict";fbc();dbc()});var mbc={};var hbc=h(()=>{"use strict";vmo()});var gbc=h(()=>{"use strict";Qhc();emo();_hc();rmo();uAc();Tyc();hmo();nbc();Amo();cbc();bmo();pbc();Imo();hbc();vmo()});var Abc=h(()=>{"use strict";gbc()});var Ffe,ybc,Cmo,xmo,CU0,bbc=h(()=>{"use strict";Ffe={Debug:"debug",Info:"info",Warn:"warn",Error:"error"},ybc={[Ffe.Debug]:1,[Ffe.Info]:2,[Ffe.Warn]:3,[Ffe.Error]:4},Cmo=class{debug(t,...r){console.debug(t,...r)}info(t,...r){console.info(t,...r)}warn(t,...r){console.warn(t,...r)}error(t,...r){console.error(t,...r)}},xmo=class{level;logger;silent;constructor(t){this.level=ybc[t.level],this.logger=t.logger,this.silent=t.silent}shouldLog(t){return!this.silent&&this.level<=ybc[t]}isDebug(){return this.shouldLog(Ffe.Debug)}debug(t,...r){this.isDebug()&&this.logger.debug(t,...r)}isInfo(){return this.shouldLog(Ffe.Info)}info(t,...r){this.isInfo()&&this.logger.info(t,...r)}isWarn(){return this.shouldLog(Ffe.Warn)}warn(t,...r){this.isWarn()&&this.logger.warn(t,...r)}isError(){return this.shouldLog(Ffe.Error)}error(t,...r){this.isError()&&this.logger.error(t,...r)}},CU0=new xmo({level:Ffe.Info,logger:new Cmo,silent:!0})});var Ebc=h(()=>{"use strict"});var Ibc=h(()=>{"use strict";bbc()});var vbc=h(()=>{"use strict"});var il,CS=h(()=>{"use strict";il={BIGINT:"bigint",DATE:"date",ENUM:"enum",LIST:"list",STRING_LITERAL:"stringLiteral",BOOLEAN_LITERAL:"booleanLiteral",OBJECT:"object",ANY:"any",BOOLEAN:"boolean",NUMBER:"number",STRING:"string",UNKNOWN:"unknown",NEVER:"never",RECORD:"record",SET:"set",UNION:"union",UNDISCRIMINATED_UNION:"undiscriminatedUnion",NULLABLE:"nullable",OPTIONAL:"optional",OPTIONAL_NULLABLE:"optionalNullable"}});function vm(e,t){return`Expected ${t}. Received ${Ked(e)}.`}function Ked(e){if(Array.isArray(e))return"list";if(e===null)return"null";if(e instanceof BigInt)return"BigInt";switch(typeof e){case"string":return`"${e}"`;case"bigint":case"number":case"boolean":case"undefined":return`${e}`}return typeof e}var D2=h(()=>{"use strict"});function oT(e){return{...e,json:Cbc(e.json),parse:Cbc(e.parse)}}function Cbc(e){return(t,r)=>{let n=e(t,r),{skipValidation:i=!1}=r??{};return!n.ok&&i?(console.warn(["Failed to validate.",...n.errors.map(o=>" - "+(o.path.length>0?`${o.path.join(".")}: ${o.message}`:o.message))].join(`
|
|
142
142
|
`)),{ok:!0,value:t}):n}}var O$=h(()=>{"use strict"});function lkr(e){return e.path.length===0?e.message:`${e.path.join(" -> ")}: ${e.message}`}var wmo=h(()=>{"use strict"});var nrt,Smo=h(()=>{"use strict";wmo();nrt=class extends Error{errors;constructor(t){super(t.map(lkr).join("; ")),this.errors=t,Object.setPrototypeOf(this,new.target.prototype),this.name=this.constructor.name}}});var irt,Tmo=h(()=>{"use strict";wmo();irt=class extends Error{errors;constructor(t){super(t.map(lkr).join("; ")),this.errors=t,Object.setPrototypeOf(this,new.target.prototype),this.name=this.constructor.name}}});function lh(e){return{nullable:()=>Jed(e),optional:()=>Omo(e),optionalNullable:()=>Yed(e),transform:t=>Pmo(e,t),parseOrThrow:(t,r)=>{let n=e.parse(t,r);if(n.ok)return n.value;throw new irt(n.errors)},jsonOrThrow:(t,r)=>{let n=e.json(t,r);if(n.ok)return n.value;throw new nrt(n.errors)}}}function Jed(e){let t={parse:(r,n)=>r==null?{ok:!0,value:null}:e.parse(r,n),json:(r,n)=>r==null?{ok:!0,value:null}:e.json(r,n),getType:()=>il.NULLABLE};return{...t,...lh(t)}}function Omo(e){let t={parse:(r,n)=>r==null?{ok:!0,value:void 0}:e.parse(r,n),json:(r,n)=>n?.omitUndefined&&r===void 0?{ok:!0,value:void 0}:r==null?{ok:!0,value:null}:e.json(r,n),getType:()=>il.OPTIONAL};return{...t,...lh(t)}}function Yed(e){let t={parse:(r,n)=>r===void 0?{ok:!0,value:void 0}:r===null?{ok:!0,value:null}:e.parse(r,n),json:(r,n)=>r===void 0?{ok:!0,value:void 0}:r===null?{ok:!0,value:null}:e.json(r,n),getType:()=>il.OPTIONAL_NULLABLE};return{...t,...lh(t)}}function Pmo(e,t){let r={parse:(n,i)=>{let o=e.parse(n,i);return o.ok?{ok:!0,value:t.transform(o.value)}:o},json:(n,i)=>{let o=t.untransform(n);return e.json(o,i)},getType:()=>e.getType()};return{...r,...lh(r)}}var xbc=h(()=>{"use strict";CS();Smo();Tmo()});var gQ=h(()=>{"use strict";xbc();Smo();Tmo()});function wbc(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t=="bigint"?{ok:!0,value:t}:typeof t=="number"?{ok:!0,value:BigInt(t)}:{ok:!1,errors:[{path:r,message:vm(t,"bigint | number")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="bigint"?{ok:!1,errors:[{path:r,message:vm(t,"bigint")}]}:{ok:!0,value:t},getType:()=>il.BIGINT};return{...oT(e),...lh(e)}}var Sbc=h(()=>{"use strict";CS();D2();O$();gQ()});var Tbc=h(()=>{"use strict";Sbc()});function Obc(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="string"?{ok:!1,errors:[{path:r,message:vm(t,"string")}]}:Xed.test(t)?{ok:!0,value:new Date(t)}:{ok:!1,errors:[{path:r,message:vm(t,"ISO 8601 date string")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>t instanceof Date?{ok:!0,value:t.toISOString()}:{ok:!1,errors:[{path:r,message:vm(t,"Date object")}]},getType:()=>il.DATE};return{...oT(e),...lh(e)}}var Xed,Pbc=h(()=>{"use strict";CS();D2();O$();gQ();Xed=/^([+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([.,]\d+(?!:))?)?(\17[0-5]\d([.,]\d+)?)?([zZ]|([+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/});var Bbc=h(()=>{"use strict";Pbc()});function sT(e,t){return()=>{let r={parse:t,json:t,getType:()=>e};return{...oT(r),...lh(r)}}}var P$=h(()=>{"use strict";gQ();O$()});function pkr(e){let t=new Set(e);return sT(il.ENUM,(n,{allowUnrecognizedEnumValues:i,breadcrumbsPrefix:o=[]}={})=>typeof n!="string"?{ok:!1,errors:[{path:o,message:vm(n,"string")}]}:!t.has(n)&&!i?{ok:!1,errors:[{path:o,message:vm(n,"enum")}]}:{ok:!0,value:n})()}var Rbc=h(()=>{"use strict";CS();P$();D2()});var Bmo=h(()=>{"use strict";Rbc()});function Dbc(e){let t=Rmo(e);return{...t,...lh(t)}}function Rmo(e){return{parse:(t,r)=>ort(e).parse(t,r),json:(t,r)=>ort(e).json(t,r),getType:()=>ort(e).getType()}}function ort(e){let t=e;return t.__zurg_memoized==null&&(t.__zurg_memoized=e()),t.__zurg_memoized}var Dmo=h(()=>{"use strict";gQ()});function kmo(e){return Object.entries(e)}var kbc=h(()=>{"use strict"});function A6t(e,t){let r=new Set(t);return Object.entries(e).reduce((n,[i,o])=>(r.has(i)&&(n[i]=o),n),{})}var Fmo=h(()=>{"use strict"});function Nfe(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return t===null?!0:Object.getPrototypeOf(t)===null}var y6t=h(()=>{"use strict"});function b6t(e){return Object.keys(e)}var Nmo=h(()=>{"use strict"});function Fbc(e,t){let r=[],n=[];for(let i of e)t(i)?r.push(i):n.push(i);return[r,n]}var Nbc=h(()=>{"use strict"});function _H(e){return{withParsedProperties:t=>jmo(e,t)}}function jmo(e,t){let r={parse:(n,i)=>{let o=e.parse(n,i);if(!o.ok)return o;let s={};for(let a in t)if(Zed.call(t,a)){let c=t[a];s[a]=typeof c=="function"?c(o.value):c}return{ok:!0,value:{...o.value,...s}}},json:(n,i)=>{if(!Nfe(n))return{ok:!1,errors:[{path:i?.breadcrumbsPrefix??[],message:vm(n,"object")}]};let o=new Set(Object.keys(t)),s=A6t(n,Object.keys(n).filter(a=>!o.has(a)));return e.json(s,i)},getType:()=>e.getType()};return{...r,...lh(r),..._H(r)}}var Zed,jbc=h(()=>{"use strict";Fmo();D2();y6t();gQ();Zed=Object.prototype.hasOwnProperty});var E6t=h(()=>{"use strict";jbc()});function zbc(e,t){return{rawKey:e,valueSchema:t,isProperty:!0}}function jfe(e){return e.isProperty}var zmo=h(()=>{"use strict"});function fkr(e){let t;function r(){if(t==null){t={};for(let[f,d]of kmo(e)){let m=jfe(d)?d.rawKey:f,g=jfe(d)?d.valueSchema:d;t[m]={rawKey:m,parsedKey:f,valueSchema:g}}}return t}let n,i,o,s;function a(){if(n==null){n=[],i=[];for(let[f,d]of kmo(e)){let m=jfe(d)?d.rawKey:f,g=jfe(d)?d.valueSchema:d;etd(g)&&(n.push(m),i.push(f))}o=new Set(n),s=new Set(i)}return n}function c(){return i==null&&a(),i}function u(){return o==null&&a(),o}function l(){return s==null&&a(),s}let p={_getRawProperties:()=>Object.entries(e).map(([f,d])=>jfe(d)?d.rawKey:f),_getParsedProperties:()=>b6t(e),parse:(f,d)=>{let m=d?.breadcrumbsPrefix??[];return Qbc({value:f,requiredKeys:a(),requiredKeysSet:u(),getProperty:g=>{let A=r()[g];if(A!=null)return{transformedKey:A.parsedKey,transform:y=>{let I=[...m,g];return A.valueSchema.parse(y,{...d,breadcrumbsPrefix:I})}}},unrecognizedObjectKeys:d?.unrecognizedObjectKeys,skipValidation:d?.skipValidation,breadcrumbsPrefix:m,omitUndefined:d?.omitUndefined})},json:(f,d)=>{let m=d?.breadcrumbsPrefix??[];return Qbc({value:f,requiredKeys:c(),requiredKeysSet:l(),getProperty:g=>{let A=e[g];if(A!=null)return jfe(A)?{transformedKey:A.rawKey,transform:y=>{let I=[...m,g];return A.valueSchema.json(y,{...d,breadcrumbsPrefix:I})}}:{transformedKey:g,transform:y=>{let I=[...m,g];return A.json(y,{...d,breadcrumbsPrefix:I})}}},unrecognizedObjectKeys:d?.unrecognizedObjectKeys,skipValidation:d?.skipValidation,breadcrumbsPrefix:m,omitUndefined:d?.omitUndefined})},getType:()=>il.OBJECT};return{...oT(p),...lh(p),..._H(p),...jLe(p)}}function Qbc({value:e,requiredKeys:t,requiredKeysSet:r,getProperty:n,unrecognizedObjectKeys:i="fail",skipValidation:o=!1,breadcrumbsPrefix:s=[]}){if(!Nfe(e))return{ok:!1,errors:[{path:s,message:vm(e,"object")}]};let a=t.length,c=[],u={};for(let l in e){if(!$ed.call(e,l))continue;let p=e[l],f=n(l);if(f!=null){a>0&&r.has(l)&&a--;let d=f.transform(p);d.ok?u[f.transformedKey]=d.value:(u[l]=p,c.push(...d.errors))}else switch(i){case"fail":c.push({path:[...s,l],message:`Unexpected key "${l}"`});break;case"strip":break;case"passthrough":u[l]=p;break}}if(a>0)for(let l of t)l in e||c.push({path:s,message:`Missing required key "${l}"`});return c.length===0||o?{ok:!0,value:u}:{ok:!1,errors:c}}function jLe(e){return{extend:t=>{let r={_getParsedProperties:()=>[...e._getParsedProperties(),...t._getParsedProperties()],_getRawProperties:()=>[...e._getRawProperties(),...t._getRawProperties()],parse:(n,i)=>Mbc({extensionKeys:t._getRawProperties(),value:n,transformBase:o=>e.parse(o,i),transformExtension:o=>t.parse(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),json:(n,i)=>Mbc({extensionKeys:t._getParsedProperties(),value:n,transformBase:o=>e.json(o,i),transformExtension:o=>t.json(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),getType:()=>il.OBJECT};return{...r,...lh(r),..._H(r),...jLe(r)}},passthrough:()=>{let t=new Set(e._getRawProperties()),r=new Set(e._getParsedProperties()),n={_getParsedProperties:()=>e._getParsedProperties(),_getRawProperties:()=>e._getRawProperties(),parse:(i,o)=>{let s=e.parse(i,{...o,unrecognizedObjectKeys:"passthrough"});if(!s.ok)return s;let a={};if(typeof i=="object"&&i!=null)for(let[c,u]of Object.entries(i))t.has(c)||(a[c]=u);return{ok:!0,value:{...a,...s.value}}},json:(i,o)=>{let s=e.json(i,{...o,unrecognizedObjectKeys:"passthrough"});if(!s.ok)return s;let a={};if(typeof i=="object"&&i!=null)for(let[c,u]of Object.entries(i))r.has(c)||(a[c]=u);return{ok:!0,value:{...a,...s.value}}},getType:()=>il.OBJECT};return{...n,...lh(n),..._H(n),...jLe(n)}}}}function Mbc({extensionKeys:e,value:t,transformBase:r,transformExtension:n,breadcrumbsPrefix:i=[]}){if(!Nfe(t))return{ok:!1,errors:[{path:i,message:vm(t,"object")}]};let o=new Set(e),[s,a]=Fbc(b6t(t),l=>o.has(l)),c=r(A6t(t,a)),u=n(A6t(t,s));return c.ok&&u.ok?{ok:!0,value:{...c.value,...u.value}}:{ok:!1,errors:[...c.ok?[]:c.errors,...u.ok?[]:u.errors]}}function etd(e){return!ttd(e)}function ttd(e){switch(e.getType()){case il.ANY:case il.UNKNOWN:case il.OPTIONAL:case il.OPTIONAL_NULLABLE:return!0;default:return!1}}var $ed,Qmo=h(()=>{"use strict";CS();kbc();Fmo();D2();y6t();Nmo();O$();Nbc();E6t();gQ();zmo();$ed=Object.prototype.hasOwnProperty});function Lbc(e){return fkr(e)}var _bc=h(()=>{"use strict";Qmo()});var Mmo=h(()=>{"use strict";Qmo();_bc();zmo()});function Ubc(e){let t={...Rmo(e),_getRawProperties:()=>ort(e)._getRawProperties(),_getParsedProperties:()=>ort(e)._getParsedProperties()};return{...t,...lh(t),..._H(t),...jLe(t)}}var Vbc=h(()=>{"use strict";Mmo();E6t();gQ();Dmo()});var Gbc=h(()=>{"use strict";Dmo();Vbc()});function dkr(e){let t={parse:(r,n)=>qbc(r,(i,o)=>e.parse(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),json:(r,n)=>qbc(r,(i,o)=>e.json(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),getType:()=>il.LIST};return{...oT(t),...lh(t)}}function qbc(e,t){if(!Array.isArray(e))return{ok:!1,errors:[{message:vm(e,"list"),path:[]}]};let r=[],n=[];for(let i=0;i<e.length;i++){let o=t(e[i],i);o.ok?r.push(o.value):n.push(...o.errors)}return n.length===0?{ok:!0,value:r}:{ok:!1,errors:n}}var Wbc=h(()=>{"use strict";CS();D2();O$();gQ()});var Lmo=h(()=>{"use strict";Wbc()});function Hbc(e){return sT(il.BOOLEAN_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:vm(r,`${e.toString()}`)}]})()}var Kbc=h(()=>{"use strict";CS();P$();D2()});function Jbc(e){return sT(il.STRING_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:vm(r,`"${e}"`)}]})()}var Ybc=h(()=>{"use strict";CS();P$();D2()});var Xbc=h(()=>{"use strict";Kbc();Ybc()});var Zbc,$bc=h(()=>{"use strict";CS();P$();Zbc=sT(il.ANY,e=>({ok:!0,value:e}))});var e0c,t0c=h(()=>{"use strict";CS();P$();D2();e0c=sT(il.BOOLEAN,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="boolean"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:vm(e,"boolean")}]})});var r0c,n0c=h(()=>{"use strict";CS();P$();r0c=sT(il.NEVER,(e,{breadcrumbsPrefix:t=[]}={})=>({ok:!1,errors:[{path:t,message:"Expected never"}]}))});var i0c,o0c=h(()=>{"use strict";CS();P$();D2();i0c=sT(il.NUMBER,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="number"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:vm(e,"number")}]})});var s0c,a0c=h(()=>{"use strict";CS();P$();D2();s0c=sT(il.STRING,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="string"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:vm(e,"string")}]})});var c0c,u0c=h(()=>{"use strict";CS();P$();c0c=sT(il.UNKNOWN,e=>({ok:!0,value:e}))});var l0c=h(()=>{"use strict";$bc();t0c();n0c();o0c();a0c();u0c()});function f0c(e,t){let r={parse:(n,i)=>p0c({value:n,isKeyNumeric:e.getType()===il.NUMBER,transformKey:o=>e.parse(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${o} (key)`]}),transformValue:(o,s)=>t.parse(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${s}`]}),breadcrumbsPrefix:i?.breadcrumbsPrefix}),json:(n,i)=>p0c({value:n,isKeyNumeric:e.getType()===il.NUMBER,transformKey:o=>e.json(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${o} (key)`]}),transformValue:(o,s)=>t.json(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${s}`]}),breadcrumbsPrefix:i?.breadcrumbsPrefix}),getType:()=>il.RECORD};return{...oT(r),...lh(r)}}function p0c({value:e,isKeyNumeric:t,transformKey:r,transformValue:n,breadcrumbsPrefix:i=[]}){if(!Nfe(e))return{ok:!1,errors:[{path:i,message:vm(e,"object")}]};let o={},s=[];for(let a in e){if(!rtd.call(e,a))continue;let c=e[a];if(c===void 0)continue;let u=a;if(t){let f=a.length>0?Number(a):NaN;Number.isNaN(f)||(u=f)}let l=r(u),p=n(c,u);l.ok&&p.ok?o[l.value]=p.value:(l.ok||s.push(...l.errors),p.ok||s.push(...p.errors))}return s.length===0?{ok:!0,value:o}:{ok:!1,errors:s}}var rtd,d0c=h(()=>{"use strict";CS();D2();y6t();O$();gQ();rtd=Object.prototype.hasOwnProperty});var m0c=h(()=>{"use strict";d0c()});function h0c(e){let t=dkr(e),r={parse:(n,i)=>{let o=t.parse(n,i);return o.ok?{ok:!0,value:new Set(o.value)}:o},json:(n,i)=>n instanceof Set?t.json([...n],i):{ok:!1,errors:[{path:i?.breadcrumbsPrefix??[],message:vm(n,"Set")}]},getType:()=>il.SET};return{...oT(r),...lh(r)}}var g0c=h(()=>{"use strict";CS();D2();O$();Lmo();gQ()});var A0c=h(()=>{"use strict";g0c()});function b0c(e){let t={parse:(r,n)=>y0c((i,o)=>i.parse(r,o),e,n),json:(r,n)=>y0c((i,o)=>i.json(r,o),e,n),getType:()=>il.UNDISCRIMINATED_UNION};return{...oT(t),...lh(t)}}function y0c(e,t,r){let n=[];for(let[i,o]of t.entries()){let s=e(o,{...r,skipValidation:!1});if(s.ok)return s;for(let a of s.errors)n.push({path:a.path,message:`[Variant ${i}] ${a.message}`})}return{ok:!1,errors:n}}var E0c=h(()=>{"use strict";CS();O$();gQ()});var I0c=h(()=>{"use strict";E0c()});function v0c(e,t){return{parsedDiscriminant:e,rawDiscriminant:t}}var C0c=h(()=>{"use strict"});function w0c(e,t){let r=typeof e=="string"?e:e.rawDiscriminant,n=typeof e=="string"?e:e.parsedDiscriminant,i=pkr(b6t(t)),o={parse:(s,a)=>x0c({value:s,discriminant:r,transformedDiscriminant:n,transformDiscriminantValue:c=>i.parse(c,{allowUnrecognizedEnumValues:a?.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...a?.breadcrumbsPrefix??[],r]}),getAdditionalPropertiesSchema:c=>t[c],allowUnrecognizedUnionMembers:a?.allowUnrecognizedUnionMembers,transformAdditionalProperties:(c,u)=>u.parse(c,a),breadcrumbsPrefix:a?.breadcrumbsPrefix}),json:(s,a)=>x0c({value:s,discriminant:n,transformedDiscriminant:r,transformDiscriminantValue:c=>i.json(c,{allowUnrecognizedEnumValues:a?.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...a?.breadcrumbsPrefix??[],n]}),getAdditionalPropertiesSchema:c=>t[c],allowUnrecognizedUnionMembers:a?.allowUnrecognizedUnionMembers,transformAdditionalProperties:(c,u)=>u.json(c,a),breadcrumbsPrefix:a?.breadcrumbsPrefix}),getType:()=>il.UNION};return{...oT(o),...lh(o),..._H(o)}}function x0c({value:e,discriminant:t,transformedDiscriminant:r,transformDiscriminantValue:n,getAdditionalPropertiesSchema:i,allowUnrecognizedUnionMembers:o=!1,transformAdditionalProperties:s,breadcrumbsPrefix:a=[]}){if(!Nfe(e))return{ok:!1,errors:[{path:a,message:vm(e,"object")}]};let c=e[t],u={};for(let d in e)ntd.call(e,d)&&d!==t&&(u[d]=e[d]);if(c==null)return{ok:!1,errors:[{path:a,message:`Missing discriminant ("${t}")`}]};let l=n(c);if(!l.ok)return{ok:!1,errors:l.errors};let p=i(l.value);if(p==null)return o?{ok:!0,value:{[r]:l.value,...u}}:{ok:!1,errors:[{path:[...a,t],message:"Unexpected discriminant value"}]};let f=s(u,p);return f.ok?{ok:!0,value:{[r]:c,...f.value}}:f}var ntd,S0c=h(()=>{"use strict";CS();D2();y6t();Nmo();O$();Bmo();E6t();gQ();ntd=Object.prototype.hasOwnProperty});var T0c=h(()=>{"use strict";C0c();S0c()});var O0c=h(()=>{"use strict";Tbc();Bbc();Bmo();Gbc();Lmo();Xbc();Mmo();E6t();l0c();m0c();gQ();A0c();I0c();T0c()});var Ie={};ee(Ie,{JsonError:()=>nrt,ParseError:()=>irt,any:()=>Zbc,bigint:()=>wbc,boolean:()=>e0c,booleanLiteral:()=>Hbc,date:()=>Obc,discriminant:()=>v0c,enum_:()=>pkr,getObjectLikeUtils:()=>_H,getObjectUtils:()=>jLe,getSchemaUtils:()=>lh,isProperty:()=>jfe,lazy:()=>Dbc,lazyObject:()=>Ubc,list:()=>dkr,never:()=>r0c,number:()=>i0c,object:()=>fkr,objectWithoutOptionalProperties:()=>Lbc,optional:()=>Omo,property:()=>zbc,record:()=>f0c,set:()=>h0c,string:()=>s0c,stringLiteral:()=>Jbc,transform:()=>Pmo,undiscriminatedUnion:()=>b0c,union:()=>w0c,unknown:()=>c0c,withParsedProperties:()=>jmo});var P0c=h(()=>{"use strict";O0c()});var B0c=h(()=>{"use strict"});var Wr=h(()=>{"use strict";Ebc();Ibc();vbc();P0c();B0c()});var mkr,_mo=h(()=>{"use strict";Wr();mkr=Ie.string()});var hkr,Umo=h(()=>{"use strict";Wr();hkr=Ie.enum_(["openai","anthropic","aws-bedrock"])});var gkr,Vmo=h(()=>{"use strict";Wr();_mo();Umo();gkr=Ie.object({provider:hkr,model:mkr})});var Gmo=h(()=>{"use strict";Vmo();_mo();Umo()});var qmo={};ee(qmo,{AiServicesSchema:()=>gkr,ModelName:()=>mkr,ModelProvider:()=>hkr});var R0c=h(()=>{"use strict";Gmo()});var HIe,I6t=h(()=>{"use strict";Wr();HIe=Ie.object({generate:Ie.boolean().optional(),upgrade:Ie.boolean().optional(),preview:Ie.boolean().optional(),verify:Ie.boolean().optional()})});var Wmo=h(()=>{"use strict";I6t()});var Hmo={};ee(Hmo,{AutomationSchema:()=>HIe});var D0c=h(()=>{"use strict";Wmo()});var $0,z3=h(()=>{"use strict";Wr();$0=Ie.object({docs:Ie.string().optional()})});var srt,Akr=h(()=>{"use strict";Wr();z3();srt=Ie.object({scheme:Ie.string()}).extend($0)});var ykr,Kmo=h(()=>{"use strict";Wr();Akr();ykr=Ie.undiscriminatedUnion([Ie.string(),srt])});var bkr,Jmo=h(()=>{"use strict";Wr();z3();Kmo();bkr=Ie.object({any:Ie.list(ykr)}).extend($0)});var Ekr,Ymo=h(()=>{"use strict";Wr();Ekr=Ie.object({})});var Ikr,Xmo=h(()=>{"use strict";Wr();z3();Ymo();Ikr=Ie.object({"endpoint-security":Ekr}).extend($0)});var art,vkr=h(()=>{"use strict";Wr();Jmo();Akr();Xmo();art=Ie.undiscriminatedUnion([Ie.string(),srt,bkr,Ikr])});var KIe,v6t=h(()=>{"use strict";Wr();KIe=Ie.object({name:Ie.string().optional()})});var crt,Ckr=h(()=>{"use strict";Wr();crt=Ie.object({env:Ie.string().optional()})});var zLe,xkr=h(()=>{"use strict";Wr();v6t();Ckr();zLe=Ie.object({omit:Ie.boolean().optional()}).extend(crt).extend(KIe)});var wkr,Zmo=h(()=>{"use strict";Wr();z3();xkr();wkr=Ie.object({scheme:Ie.stringLiteral("basic"),username:zLe.optional(),password:zLe.optional()}).extend($0)});var Skr,$mo=h(()=>{"use strict";Wr();Skr=Ie.enum_(["api-key","refresh-token"])});var Tkr,eho=h(()=>{"use strict";Wr();Tkr=Ie.object({"response-property":Ie.string(),"header-name":Ie.string(),"value-prefix":Ie.string().optional()})});var Okr,tho=h(()=>{"use strict";Wr();eho();Okr=Ie.object({endpoint:Ie.string(),"expiry-response-property":Ie.string().optional(),"authenticated-request-headers":Ie.list(Tkr).optional()})});var Pkr,rho=h(()=>{"use strict";Wr();tho();Pkr=Ie.undiscriminatedUnion([Ie.string(),Okr])});var Bkr,nho=h(()=>{"use strict";Wr();z3();$mo();rho();Bkr=Ie.object({scheme:Ie.stringLiteral("bearer"),"get-token":Pkr,type:Skr.optional()}).extend($0)});var Rkr,iho=h(()=>{"use strict";Wr();z3();xkr();Rkr=Ie.object({scheme:Ie.stringLiteral("bearer"),token:zLe.optional()}).extend($0)});var Dkr,oho=h(()=>{"use strict";Wr();nho();iho();Dkr=Ie.undiscriminatedUnion([Rkr,Bkr])});var kkr,sho=h(()=>{"use strict";Wr();z3();v6t();Ckr();kkr=Ie.object({header:Ie.string(),type:Ie.string().optional(),prefix:Ie.string().optional()}).extend(crt).extend(KIe).extend($0)});var Fkr,aho=h(()=>{"use strict";Wr();Fkr=Ie.string()});var Nkr,cho=h(()=>{"use strict";Wr();Nkr=Ie.enum_(["client-credentials","authorization-code","device-code"])});var jkr,uho=h(()=>{"use strict";Wr();jkr=Ie.object({"client-id":Ie.string().optional(),"client-secret":Ie.string().optional(),scopes:Ie.string().optional()})});var zkr,lho=h(()=>{"use strict";Wr();zkr=Ie.object({"access-token":Ie.string().optional(),"expires-in":Ie.string().optional(),"refresh-token":Ie.string().optional()})});var Qkr,pho=h(()=>{"use strict";Wr();uho();lho();Qkr=Ie.object({endpoint:Ie.string(),"request-properties":jkr.optional(),"response-properties":zkr.optional()})});var Mkr,fho=h(()=>{"use strict";Wr();Mkr=Ie.object({method:Ie.string().optional()})});var Lkr,dho=h(()=>{"use strict";Wr();Lkr=Ie.object({"refresh-token":Ie.string()})});var _kr,mho=h(()=>{"use strict";Wr();_kr=Ie.object({"access-token":Ie.string().optional(),"expires-in":Ie.string().optional(),"refresh-token":Ie.string().optional()})});var Ukr,hho=h(()=>{"use strict";Wr();dho();mho();Ukr=Ie.object({endpoint:Ie.string(),"request-properties":Lkr.optional(),"response-properties":_kr.optional()})});var Vkr,gho=h(()=>{"use strict";Wr();Vkr=Ie.object({url:Ie.string(),ports:Ie.list(Ie.number()).optional()})});var Gkr,Aho=h(()=>{"use strict";Wr();gho();Gkr=Ie.undiscriminatedUnion([Ie.string(),Vkr])});var qkr,yho=h(()=>{"use strict";Wr();z3();aho();cho();pho();fho();hho();Aho();qkr=Ie.object({scheme:Ie.stringLiteral("oauth"),type:Nkr,scopes:Ie.list(Fkr).optional(),"token-prefix":Ie.string().optional(),"token-header":Ie.string().optional(),"client-id-env":Ie.string().optional(),"client-secret-env":Ie.string().optional(),"get-token":Qkr.optional(),"refresh-token":Ukr.optional(),"client-id":Ie.string().optional(),"authorization-url":Ie.string().optional(),"device-authorization-url":Ie.string().optional(),"token-url":Ie.string().optional(),"refresh-url":Ie.string().optional(),"redirect-uri":Gkr.optional(),"success-redirect-url":Ie.string().optional(),"error-redirect-url":Ie.string().optional(),pkce:Mkr.optional(),"authorization-parameters":Ie.record(Ie.string(),Ie.string()).optional(),"device-authorization-parameters":Ie.record(Ie.string(),Ie.string()).optional(),"token-parameters":Ie.record(Ie.string(),Ie.string()).optional(),"refresh-parameters":Ie.record(Ie.string(),Ie.string()).optional()}).extend($0)});var JIe,C6t=h(()=>{"use strict";Wr();Zmo();oho();sho();yho();JIe=Ie.undiscriminatedUnion([qkr,kkr,wkr,Dkr])});var bho=h(()=>{"use strict";Kmo();Jmo();vkr();C6t();Akr();aho();xkr();Zmo();oho();Xmo();Ymo();sho();eho();$mo();nho();rho();tho();uho();lho();cho();pho();fho();hho();dho();mho();yho();Aho();gho();iho();Ckr()});var Eho={};ee(Eho,{AnyAuthItem:()=>ykr,AnyAuthSchemesSchema:()=>bkr,ApiAuthSchema:()=>art,AuthSchemeDeclarationSchema:()=>JIe,AuthSchemeReferenceSchema:()=>srt,AuthScope:()=>Fkr,AuthVariable:()=>zLe,BasicAuthSchemeSchema:()=>wkr,BearerAuthSchemeSchema:()=>Dkr,EndpointSecuritySchema:()=>Ikr,EndpointSecuritySchemaDetails:()=>Ekr,HeaderAuthSchemeSchema:()=>kkr,InferredAuthTypeSchema:()=>Skr,InferredAuthenticatedRequestHeader:()=>Tkr,InferredBearerAuthSchema:()=>Bkr,InferredGetTokenEndpointSchema:()=>Pkr,InferredGetTokenEndpointSchemaObject:()=>Okr,OAuthAccessTokenRequestPropertiesSchema:()=>jkr,OAuthAccessTokenResponsePropertiesSchema:()=>zkr,OAuthFlowTypeSchema:()=>Nkr,OAuthGetTokenEndpointSchema:()=>Qkr,OAuthPkceSchema:()=>Mkr,OAuthRefreshTokenEndpointSchema:()=>Ukr,OAuthRefreshTokenRequestPropertiesSchema:()=>Lkr,OAuthRefreshTokenResponsePropertiesSchema:()=>_kr,OAuthSchemeSchema:()=>qkr,RedirectUriSchema:()=>Gkr,RedirectUriWithBackupPortsSchema:()=>Vkr,TokenBearerAuthSchema:()=>Rkr,WithEnvironmentVariable:()=>crt});var k0c=h(()=>{"use strict";bho()});var urt,Wkr=h(()=>{"use strict";Wr();urt=Ie.enum_(["in-development","pre-release","deprecated","generally-available"])});var Hkr,Iho=h(()=>{"use strict";Wr();Wkr();Hkr=Ie.object({status:urt,message:Ie.string().optional()})});var Kkr,vho=h(()=>{"use strict";Wr();Iho();Wkr();Kkr=Ie.undiscriminatedUnion([urt,Hkr])});var Cho=h(()=>{"use strict";Iho();Wkr();vho()});var xho={};ee(xho,{AvailabilitySchema:()=>Hkr,AvailabilityStatusSchema:()=>urt,AvailabilityUnionSchema:()=>Kkr});var F0c=h(()=>{"use strict";Cho()});var YIe,x6t=h(()=>{"use strict";Wr();YIe=Ie.object({audiences:Ie.list(Ie.string()).optional()})});var Jkr,who=h(()=>{"use strict";Wr();vho();Jkr=Ie.object({availability:Kkr.optional()})});var Sho=h(()=>{"use strict";x6t();who();z3();v6t()});var Tho={};ee(Tho,{WithAudiences:()=>YIe,WithAvailability:()=>Jkr,WithDocsSchema:()=>$0,WithName:()=>KIe});var N0c=h(()=>{"use strict";Sho()});var Ykr,Oho=h(()=>{"use strict";Wr();Ykr=Ie.object({type:Ie.string()})});var Xkr,Pho=h(()=>{"use strict";Wr();Oho();Xkr=Ie.object({proto:Ykr.optional()})});var Bho=h(()=>{"use strict";Pho();Oho()});var Rho={};ee(Rho,{EncodingSchema:()=>Xkr,ProtobufTypeSchema:()=>Ykr});var j0c=h(()=>{"use strict";Bho()});var lrt,Zkr=h(()=>{"use strict";Wr();lrt=Ie.object({id:Ie.string(),default:Ie.string().optional(),values:Ie.list(Ie.string()).optional()})});var $kr,Dho=h(()=>{"use strict";Wr();x6t();z3();Zkr();$kr=Ie.object({urls:Ie.record(Ie.string(),Ie.string()),"url-templates":Ie.record(Ie.string(),Ie.string()).optional(),"default-urls":Ie.record(Ie.string(),Ie.string()).optional(),variables:Ie.record(Ie.string(),Ie.list(lrt)).optional()}).extend(YIe).extend($0)});var eFr,kho=h(()=>{"use strict";Wr();x6t();z3();Zkr();eFr=Ie.object({url:Ie.string(),"default-url":Ie.string().optional(),"url-template":Ie.string().optional(),variables:Ie.list(lrt).optional()}).extend(YIe).extend($0)});var tFr,Fho=h(()=>{"use strict";Wr();Dho();kho();tFr=Ie.undiscriminatedUnion([Ie.string(),eFr,$kr])});var rFr,Nho=h(()=>{"use strict";Wr();Fho();rFr=Ie.object({"default-url":Ie.string().optional(),"default-environment":Ie.string().optional(),"base-url-env":Ie.string().optional(),environments:Ie.record(Ie.string(),tFr).optional()})});var jho=h(()=>{"use strict";Fho();Dho();Zkr();kho();Nho()});var zho={};ee(zho,{EnvironmentSchema:()=>tFr,MultipleBaseUrlsEnvironmentSchema:()=>$kr,ServerVariableSchema:()=>lrt,SingleBaseUrlEnvironmentSchema:()=>eFr,WithEnvironmentsSchema:()=>rFr});var z0c=h(()=>{"use strict";jho()});var nFr,Qho=h(()=>{"use strict";Wr();nFr=Ie.object({minItems:Ie.number().optional(),maxItems:Ie.number().optional()})});var iFr,Mho=h(()=>{"use strict";Wr();iFr=Ie.object({minProperties:Ie.number().optional(),maxProperties:Ie.number().optional()})});var oFr,Lho=h(()=>{"use strict";Wr();oFr=Ie.object({min:Ie.number().optional(),max:Ie.number().optional(),exclusiveMin:Ie.boolean().optional(),exclusiveMax:Ie.boolean().optional(),multipleOf:Ie.number().optional()})});var sFr,_ho=h(()=>{"use strict";Wr();sFr=Ie.object({minLength:Ie.number().optional(),maxLength:Ie.number().optional(),pattern:Ie.string().optional(),format:Ie.string().optional()})});var aFr,Uho=h(()=>{"use strict";Wr();Qho();Mho();Lho();_ho();aFr=Ie.undiscriminatedUnion([sFr,oFr,nFr,iFr])});var cFr,Vho=h(()=>{"use strict";Wr();who();z3();Pho();Uho();cFr=Ie.object({default:Ie.unknown().optional(),"client-default":Ie.unknown().optional(),encoding:Xkr.optional(),validation:aFr.optional()}).extend($0).extend(Jkr)});var uFr,Gho=h(()=>{"use strict";Wr();x6t();v6t();Vho();uFr=Ie.object({type:Ie.string()}).extend(cFr).extend(KIe).extend(YIe)});var lFr,qho=h(()=>{"use strict";Wr();Gho();lFr=Ie.object({env:Ie.string().optional()}).extend(uFr)});var pFr,Who=h(()=>{"use strict";Wr();qho();pFr=Ie.undiscriminatedUnion([Ie.string(),lFr])});var prt,fFr=h(()=>{"use strict";Who();prt=pFr});var dFr,Hho=h(()=>{"use strict";Wr();fFr();dFr=Ie.object({headers:Ie.record(Ie.string(),prt).optional()})});var Kho=h(()=>{"use strict";Hho()});var Jho={};ee(Jho,{WithHeadersSchema:()=>dFr});var Q0c=h(()=>{"use strict";Kho()});var Yho=h(()=>{"use strict";fFr();Who();qho()});var Xho={};ee(Xho,{HttpHeaderSchema:()=>prt,TypeReferenceDeclarationWithEnvOverride:()=>pFr,TypeReferenceDeclarationWithEnvOverrideSchema:()=>lFr});var M0c=h(()=>{"use strict";Yho()});var Zho=h(()=>{"use strict";Vho();Gho()});var $ho={};ee($ho,{BaseTypeReferenceSchema:()=>cFr,TypeReferenceDeclarationWithName:()=>uFr});var L0c=h(()=>{"use strict";Zho()});var ego=h(()=>{"use strict";Qho();Mho();Lho();_ho();Uho()});var tgo={};ee(tgo,{ListValidationSchema:()=>nFr,MapValidationSchema:()=>iFr,NumberValidationSchema:()=>oFr,StringValidationSchema:()=>sFr,ValidationSchema:()=>aFr});var _0c=h(()=>{"use strict";ego()});var U0c=h(()=>{"use strict";k0c();bho();F0c();Cho();N0c();Sho();j0c();Bho();z0c();jho();Q0c();Kho();M0c();Yho();L0c();Zho();_0c();ego()});var rgo={};ee(rgo,{AnyAuthItem:()=>ykr,AnyAuthSchemesSchema:()=>bkr,ApiAuthSchema:()=>art,AuthSchemeDeclarationSchema:()=>JIe,AuthSchemeReferenceSchema:()=>srt,AuthScope:()=>Fkr,AuthVariable:()=>zLe,AvailabilitySchema:()=>Hkr,AvailabilityStatusSchema:()=>urt,AvailabilityUnionSchema:()=>Kkr,BaseTypeReferenceSchema:()=>cFr,BasicAuthSchemeSchema:()=>wkr,BearerAuthSchemeSchema:()=>Dkr,EncodingSchema:()=>Xkr,EndpointSecuritySchema:()=>Ikr,EndpointSecuritySchemaDetails:()=>Ekr,EnvironmentSchema:()=>tFr,HeaderAuthSchemeSchema:()=>kkr,HttpHeaderSchema:()=>prt,InferredAuthTypeSchema:()=>Skr,InferredAuthenticatedRequestHeader:()=>Tkr,InferredBearerAuthSchema:()=>Bkr,InferredGetTokenEndpointSchema:()=>Pkr,InferredGetTokenEndpointSchemaObject:()=>Okr,ListValidationSchema:()=>nFr,MapValidationSchema:()=>iFr,MultipleBaseUrlsEnvironmentSchema:()=>$kr,NumberValidationSchema:()=>oFr,OAuthAccessTokenRequestPropertiesSchema:()=>jkr,OAuthAccessTokenResponsePropertiesSchema:()=>zkr,OAuthFlowTypeSchema:()=>Nkr,OAuthGetTokenEndpointSchema:()=>Qkr,OAuthPkceSchema:()=>Mkr,OAuthRefreshTokenEndpointSchema:()=>Ukr,OAuthRefreshTokenRequestPropertiesSchema:()=>Lkr,OAuthRefreshTokenResponsePropertiesSchema:()=>_kr,OAuthSchemeSchema:()=>qkr,ProtobufTypeSchema:()=>Ykr,RedirectUriSchema:()=>Gkr,RedirectUriWithBackupPortsSchema:()=>Vkr,ServerVariableSchema:()=>lrt,SingleBaseUrlEnvironmentSchema:()=>eFr,StringValidationSchema:()=>sFr,TokenBearerAuthSchema:()=>Rkr,TypeReferenceDeclarationWithEnvOverride:()=>pFr,TypeReferenceDeclarationWithEnvOverrideSchema:()=>lFr,TypeReferenceDeclarationWithName:()=>uFr,ValidationSchema:()=>aFr,WithAudiences:()=>YIe,WithAvailability:()=>Jkr,WithDocsSchema:()=>$0,WithEnvironmentVariable:()=>crt,WithEnvironmentsSchema:()=>rFr,WithHeadersSchema:()=>dFr,WithName:()=>KIe,auth:()=>Eho,availability:()=>xho,commons:()=>Tho,encoding:()=>Rho,environments:()=>zho,file:()=>Jho,service:()=>Xho,types:()=>$ho,validation:()=>tgo});var V0c=h(()=>{"use strict";U0c()});var XIe,w6t=h(()=>{"use strict";Wr();XIe=Ie.string()});var frt,mFr=h(()=>{"use strict";Wr();frt=Ie.enum_(["v1","v2"])});var drt,hFr=h(()=>{"use strict";Wr();drt=Ie.enum_(["environment-per-server","urls-per-environment"])});var mrt,gFr=h(()=>{"use strict";Wr();mrt=Ie.enum_(["url-order","spec-order"])});var hrt,AFr=h(()=>{"use strict";Wr();hrt=Ie.enum_(["always","never"])});var yFr,ngo=h(()=>{"use strict";Wr();yFr=Ie.enum_(["v1"])});var grt,bFr=h(()=>{"use strict";Wr();mFr();hFr();gFr();AFr();ngo();grt=Ie.object({"use-title":Ie.boolean().optional(),unions:yFr.optional(),"message-naming":frt.optional(),"respect-nullable-schemas":Ie.boolean().optional(),"only-include-referenced-schemas":Ie.boolean().optional(),"inline-path-parameters":Ie.boolean().optional(),"idiomatic-request-names":Ie.boolean().optional(),"wrap-references-to-nullable-in-optional":Ie.boolean().optional(),"coerce-optional-schemas-to-nullable":Ie.boolean().optional(),"group-environments-by-host":Ie.boolean().optional(),"multi-server-strategy":drt.optional(),"remove-discriminants-from-schemas":hrt.optional(),"path-parameter-order":mrt.optional()})});var HV,QLe=h(()=>{"use strict";Wr();HV=Ie.undiscriminatedUnion([Ie.string(),Ie.list(Ie.string())])});var Art,EFr=h(()=>{"use strict";Wr();w6t();bFr();QLe();Art=Ie.object({path:XIe,origin:Ie.string().optional(),overrides:HV.optional(),audiences:Ie.list(Ie.string()).optional(),settings:grt.optional()})});var IFr,igo=h(()=>{"use strict";Wr();IFr=Ie.object({repo:Ie.string(),ref:Ie.string().optional(),path:Ie.string()})});var vFr,ogo=h(()=>{"use strict";Wr();igo();vFr=Ie.object({git:IFr})});var ZIe,S6t=h(()=>{"use strict";Wr();ogo();ZIe=Ie.undiscriminatedUnion([Ie.string(),vFr])});var yrt,CFr=h(()=>{"use strict";Wr();QLe();S6t();yrt=Ie.object({target:Ie.string().optional(),root:ZIe,overrides:HV.optional(),"local-generation":Ie.boolean().optional(),"from-openapi":Ie.boolean().optional(),dependencies:Ie.list(Ie.string()).optional()})});var brt,xFr=h(()=>{"use strict";Wr();CFr();brt=Ie.object({proto:yrt})});var wFr,sgo=h(()=>{"use strict";Wr();w6t();EFr();xFr();wFr=Ie.undiscriminatedUnion([XIe,Art,brt])});var SFr,ago=h(()=>{"use strict";Wr();sgo();SFr=Ie.list(wFr)});var Ert,TFr=h(()=>{"use strict";Wr();ago();w6t();EFr();xFr();Ert=Ie.undiscriminatedUnion([XIe,Art,SFr,brt])});var OFr,cgo=h(()=>{"use strict";Wr();OFr=Ie.enum_(["literals","enums","enums-coerceable-to-literals"])});var Irt,PFr=h(()=>{"use strict";Wr();cgo();hFr();gFr();AFr();Irt=Ie.object({"respect-nullable-schemas":Ie.boolean().optional(),"title-as-schema-name":Ie.boolean().optional(),"optional-additional-properties":Ie.boolean().optional(),"coerce-enums-to-literals":Ie.boolean().optional(),"idiomatic-request-names":Ie.boolean().optional(),"wrap-references-to-nullable-in-optional":Ie.boolean().optional(),"coerce-optional-schemas-to-nullable":Ie.boolean().optional(),"group-environments-by-host":Ie.boolean().optional(),"multi-server-strategy":drt.optional(),"remove-discriminants-from-schemas":hrt.optional(),"path-parameter-order":mrt.optional(),"resolve-schema-collisions":Ie.boolean().optional(),"infer-forward-compatible":Ie.boolean().optional(),"infer-default-environment":Ie.boolean().optional(),"coerce-consts-to":OFr.optional()})});var vrt,BFr=h(()=>{"use strict";Wr();PFr();mFr();vrt=Ie.object({"message-naming":frt.optional()}).extend(Irt)});var RFr,ugo=h(()=>{"use strict";Wr();RFr=Ie.enum_(["int32","int64","uint32","uint64"])});var DFr,lgo=h(()=>{"use strict";Wr();DFr=Ie.enum_(["form","json"])});var kFr,pgo=h(()=>{"use strict";Wr();kFr=Ie.enum_(["all","untyped"])});var FFr,fgo=h(()=>{"use strict";Wr();FFr=Ie.enum_(["get","post","put","patch","delete","head","options","trace"])});var NFr,dgo=h(()=>{"use strict";Wr();fgo();NFr=Ie.object({"status-code":Ie.number(),methods:Ie.list(FFr).optional()})});var jFr,mgo=h(()=>{"use strict";Wr();jFr=Ie.undiscriminatedUnion([Ie.string(),Ie.record(Ie.string(),Ie.unknown())])});var zFr,hgo=h(()=>{"use strict";Wr();pgo();dgo();mgo();zFr=Ie.object({schema:jFr,name:Ie.string().optional(),"apply-to":kFr.optional(),ensure:Ie.list(NFr).optional()})});var T6t,ggo=h(()=>{"use strict";Wr();T6t=Ie.object({"max-depth":Ie.number().optional()})});var QFr,Ago=h(()=>{"use strict";Wr();ggo();QFr=Ie.object({request:T6t.optional(),response:T6t.optional()})});var MFr,ygo=h(()=>{"use strict";Wr();MFr=Ie.object({endpoints:Ie.list(Ie.string()).optional()})});var LFr,bgo=h(()=>{"use strict";Wr();LFr=Ie.object({except:Ie.list(Ie.string()).optional()})});var _Fr,Ego=h(()=>{"use strict";Wr();bgo();_Fr=Ie.undiscriminatedUnion([Ie.boolean(),LFr])});var $Ie,O6t=h(()=>{"use strict";Wr();PFr();ugo();lgo();hgo();Ago();ygo();Ego();$Ie=Ie.object({"only-include-referenced-schemas":Ie.boolean().optional(),"inline-path-parameters":Ie.boolean().optional(),"prefer-undiscriminated-unions-with-literals":Ie.boolean().optional(),"object-query-parameters":Ie.boolean().optional(),"respect-readonly-schemas":Ie.boolean().optional(),"use-read-variant-for-responses":Ie.boolean().optional(),"respect-forward-compatible-enums":Ie.boolean().optional(),"respect-optional-request-body":Ie.boolean().optional(),"use-bytes-for-binary-response":Ie.boolean().optional(),"default-form-parameter-encoding":DFr.optional(),filter:MFr.optional(),"example-generation":QFr.optional(),"additional-properties-defaults-to":Ie.boolean().optional(),"type-dates-as-strings":Ie.boolean().optional(),"preserve-single-schema-oneof":Ie.boolean().optional(),"preserve-one-of-in-all-of":Ie.boolean().optional(),"any-of-sibling-properties-as-object":Ie.boolean().optional(),"inline-all-of-schemas":Ie.boolean().optional(),"resolve-aliases":_Fr.optional(),"group-multi-api-environments":Ie.boolean().optional(),"default-integer-format":RFr.optional(),"infer-discriminated-union-base-properties":Ie.boolean().optional(),"disambiguate-request-names":Ie.boolean().optional(),"ignore-tags":Ie.boolean().optional(),"respect-parameter-content":Ie.boolean().optional(),"respect-per-spec-base-path":Ie.boolean().optional(),"respect-operation-id-word-boundaries":Ie.boolean().optional(),"namespaced-errors":Ie.boolean().optional(),"error-responses":zFr.optional()}).extend(Irt)});var Crt,UFr=h(()=>{"use strict";Wr();BFr();O6t();Crt=Ie.object({"auto-generate-idempotency-key":Ie.unknown().optional(),"webhook-signature":Ie.unknown().optional()}).extend($Ie).extend(vrt)});var VFr,Igo=h(()=>{"use strict";Wr();VFr=Ie.object({conjure:Ie.string()})});var GFr,vgo=h(()=>{"use strict";Wr();BFr();QLe();S6t();GFr=Ie.object({asyncapi:ZIe,origin:Ie.string().optional(),overrides:HV.optional(),namespace:Ie.string().optional(),settings:vrt.optional()})});var qFr,Cgo=h(()=>{"use strict";Wr();qFr=Ie.object({graphql:Ie.string(),origin:Ie.string().optional(),overrides:Ie.string().optional(),examples:Ie.string().optional(),name:Ie.string().optional()})});var WFr,xgo=h(()=>{"use strict";Wr();O6t();QLe();S6t();WFr=Ie.object({openapi:ZIe,origin:Ie.string().optional(),overrides:HV.optional(),overlays:Ie.string().optional(),namespace:Ie.string().optional(),settings:$Ie.optional()})});var HFr,wgo=h(()=>{"use strict";Wr();QLe();HFr=Ie.object({openrpc:Ie.string(),overrides:HV.optional(),namespace:Ie.string().optional()})});var KFr,Sgo=h(()=>{"use strict";Wr();CFr();KFr=Ie.object({proto:yrt})});var JFr,Tgo=h(()=>{"use strict";Wr();vgo();Cgo();xgo();wgo();Sgo();JFr=Ie.undiscriminatedUnion([WFr,GFr,KFr,HFr,qFr])});var xrt,YFr=h(()=>{"use strict";Wr();Igo();Tgo();xrt=Ie.undiscriminatedUnion([Ie.list(JFr),VFr])});var XFr,Ogo=h(()=>{"use strict";Wr();vkr();C6t();Nho();Hho();UFr();YFr();XFr=Ie.object({auth:art.optional(),"auth-schemes":Ie.record(Ie.string(),JIe).optional(),specs:xrt,settings:Crt.optional()}).extend(dFr).extend(rFr)});var ZFr,Pgo=h(()=>{"use strict";Wr();TFr();ZFr=Ie.object({namespaces:Ie.record(Ie.string(),Ert)})});var $Fr,Bgo=h(()=>{"use strict";Wr();TFr();Ogo();Pgo();$Fr=Ie.undiscriminatedUnion([Ert,ZFr,XFr])});var e2r,Rgo=h(()=>{"use strict";Wr();e2r=Ie.enum_(["minimal","comprehensive"])});var t2r,Dgo=h(()=>{"use strict";Wr();t2r=Ie.object({name:Ie.string(),registry:Ie.string()})});var r2r,kgo=h(()=>{"use strict";Wr();r2r=Ie.object({name:Ie.string(),email:Ie.string()})});var eve,P6t=h(()=>{"use strict";Wr();kgo();eve=Ie.object({description:Ie.string().optional(),authors:Ie.list(r2r).optional()})});var B6t,Fgo=h(()=>{"use strict";Wr();B6t=Ie.object({name:Ie.string()})});var tve,R6t=h(()=>{"use strict";Wr();Fgo();tve=Ie.object({teams:Ie.list(B6t).optional(),users:Ie.list(B6t).optional()})});var n2r,Ngo=h(()=>{"use strict";Wr();vkr();C6t();fFr();UFr();YFr();n2r=Ie.object({auth:art.optional(),"auth-schemes":Ie.record(Ie.string(),JIe).optional(),headers:Ie.record(Ie.string(),prt).optional(),settings:Crt.optional(),specs:xrt.optional()})});var i2r,jgo=h(()=>{"use strict";Wr();i2r=Ie.object({url:Ie.string().optional(),"package-name":Ie.string(),token:Ie.string().optional()})});var o2r,zgo=h(()=>{"use strict";Wr();o2r=Ie.object({slug:Ie.string().optional()})});var s2r,Qgo=h(()=>{"use strict";Wr();s2r=Ie.object({path:Ie.string()})});var a2r,Mgo=h(()=>{"use strict";Wr();a2r=Ie.object({keyId:Ie.string(),password:Ie.string(),secretKey:Ie.string()})});var c2r,Lgo=h(()=>{"use strict";Wr();Mgo();c2r=Ie.object({url:Ie.string().optional(),coordinate:Ie.string(),username:Ie.string().optional(),password:Ie.string().optional(),signature:a2r.optional()})});var u2r,_go=h(()=>{"use strict";Wr();u2r=Ie.object({url:Ie.string().optional(),"package-name":Ie.string(),token:Ie.string().optional()})});var l2r,Ugo=h(()=>{"use strict";Wr();l2r=Ie.object({url:Ie.string().optional(),"package-name":Ie.string(),"api-key":Ie.string().optional()})});var p2r,Vgo=h(()=>{"use strict";Wr();p2r=Ie.object({"api-key":Ie.string(),"workspace-id":Ie.string(),"collection-id":Ie.string().optional()})});var f2r,Ggo=h(()=>{"use strict";Wr();P6t();f2r=Ie.object({keywords:Ie.list(Ie.string()).optional(),"documentation-link":Ie.string().optional(),"homepage-link":Ie.string().optional()}).extend(eve)});var d2r,qgo=h(()=>{"use strict";Wr();Ggo();d2r=Ie.object({url:Ie.string().optional(),"package-name":Ie.string(),token:Ie.string().optional(),username:Ie.string().optional(),password:Ie.string().optional(),metadata:f2r.optional()})});var m2r,Wgo=h(()=>{"use strict";Wr();m2r=Ie.object({url:Ie.string().optional(),"package-name":Ie.string(),"api-key":Ie.string().optional()})});var h2r,Hgo=h(()=>{"use strict";Wr();jgo();zgo();Qgo();Lgo();_go();Ugo();Vgo();qgo();Wgo();h2r=Ie.union("location",{npm:u2r,maven:c2r,pypi:d2r,postman:p2r,"local-file-system":s2r,"fern-hosted":o2r,nuget:l2r,rubygems:m2r,crates:i2r}).transform({transform:e=>e,untransform:e=>e})});var g2r,Kgo=h(()=>{"use strict";Wr();g2r=Ie.object({custom:Ie.string()})});var A2r,Jgo=h(()=>{"use strict";Wr();A2r=Ie.enum_(["MIT","Apache-2.0"])});var KV,MLe=h(()=>{"use strict";Wr();Kgo();Jgo();KV=Ie.undiscriminatedUnion([A2r,g2r])});var D6t,Ygo=h(()=>{"use strict";Wr();MLe();D6t=Ie.object({"package-description":Ie.string().optional(),email:Ie.string().optional(),"reference-url":Ie.string().optional(),author:Ie.string().optional(),license:KV.optional()})});var y2r,Xgo=h(()=>{"use strict";Wr();y2r=Ie.object({path:Ie.string()})});var b2r,Zgo=h(()=>{"use strict";Wr();b2r=Ie.enum_(["commit","release"])});var E2r,$go=h(()=>{"use strict";Wr();MLe();Zgo();E2r=Ie.object({repository:Ie.string(),branch:Ie.string().optional(),license:KV.optional(),mode:b2r.optional(),workflows:Ie.boolean().optional()})});var I2r,eAo=h(()=>{"use strict";Wr();MLe();R6t();I2r=Ie.object({repository:Ie.string(),branch:Ie.string().optional(),license:KV.optional(),mode:Ie.stringLiteral("pull-request"),reviewers:tve.optional(),workflows:Ie.boolean().optional()})});var v2r,tAo=h(()=>{"use strict";Wr();MLe();v2r=Ie.object({repository:Ie.string(),license:KV.optional(),mode:Ie.stringLiteral("push"),branch:Ie.string().optional(),workflows:Ie.boolean().optional()})});var C2r,rAo=h(()=>{"use strict";Wr();C2r=Ie.enum_(["pull-request","push","commit-and-release"])});var x2r,nAo=h(()=>{"use strict";Wr();MLe();rAo();x2r=Ie.object({uri:Ie.string(),token:Ie.string(),mode:C2r.optional(),branch:Ie.string().optional(),license:KV.optional(),workflows:Ie.boolean().optional()})});var w2r,iAo=h(()=>{"use strict";Wr();$go();eAo();tAo();nAo();w2r=Ie.undiscriminatedUnion([x2r,E2r,I2r,v2r])});var wrt,S2r=h(()=>{"use strict";Wr();I6t();Ngo();Hgo();Ygo();Xgo();iAo();wrt=Ie.object({version:Ie.string(),output:h2r.optional(),github:w2r.optional(),config:Ie.unknown().optional(),metadata:D6t.optional(),keywords:Ie.list(Ie.string()).optional(),snippets:y2r.optional(),"ir-version":Ie.string().optional(),"smart-casing":Ie.boolean().optional(),"smart-casing-digit-word-boundary":Ie.boolean().optional(),api:n2r.optional(),"disable-examples":Ie.boolean().optional(),"publish-metadata":D6t.optional(),autorelease:Ie.boolean().optional(),automation:HIe.optional()})});var T2r,oAo=h(()=>{"use strict";Wr();Dgo();S2r();T2r=Ie.object({image:t2r}).extend(wrt)});var O2r,sAo=h(()=>{"use strict";Wr();S2r();O2r=Ie.object({name:Ie.string()}).extend(wrt)});var P2r,aAo=h(()=>{"use strict";Wr();oAo();sAo();P2r=Ie.undiscriminatedUnion([O2r,T2r])});var B2r,cAo=h(()=>{"use strict";Wr();I6t();P6t();R6t();aAo();B2r=Ie.object({audiences:Ie.list(Ie.string()).optional(),generators:Ie.list(P2r),metadata:eve.optional(),reviewers:tve.optional(),automation:HIe.optional()})});var R2r,uAo=h(()=>{"use strict";Wr();R2r=Ie.object({enabled:Ie.boolean()})});var D2r,lAo=h(()=>{"use strict";Wr();O6t();D2r=Ie.object({path:Ie.string(),origin:Ie.string().optional(),overrides:Ie.string().optional(),"disable-examples":Ie.boolean().optional(),settings:$Ie})});var k2r,pAo=h(()=>{"use strict";Wr();lAo();k2r=Ie.undiscriminatedUnion([D2r,Ie.string()])});var F2r,fAo=h(()=>{"use strict";Wr();F2r=Ie.enum_(["java","python","go","ruby","csharp","typescript","php","rust","swift"])});var N2r,dAo=h(()=>{"use strict";Wr();fAo();N2r=Ie.object({title:Ie.string(),language:F2r,content:Ie.string()})});var j2r,mAo=h(()=>{"use strict";Wr();j2r=Ie.object({method:Ie.string(),path:Ie.string(),stream:Ie.boolean().optional()})});var k6t,hAo=h(()=>{"use strict";Wr();mAo();k6t=Ie.undiscriminatedUnion([Ie.string(),j2r])});var z2r,gAo=h(()=>{"use strict";Wr();Rgo();dAo();hAo();z2r=Ie.object({bannerLink:Ie.string().optional(),introduction:Ie.string().optional(),apiReferenceLink:Ie.string().optional(),apiName:Ie.string().optional(),disabledSections:Ie.list(Ie.string()).optional(),defaultEndpoint:k6t.optional(),features:Ie.record(Ie.string(),Ie.list(k6t)).optional(),customSections:Ie.list(N2r).optional(),exampleStyle:e2r.optional()})});var Q2r,AAo=h(()=>{"use strict";Wr();Q2r=Ie.object({username:Ie.string(),email:Ie.string(),token:Ie.string()})});var M2r,yAo=h(()=>{"use strict";Wr();AAo();M2r=Ie.object({github:Q2r.optional()})});var G0c,q0c=h(()=>{"use strict";Wr();Vmo();I6t();C6t();cAo();uAo();R6t();Bgo();bFr();pAo();P6t();gAo();yAo();G0c=Ie.object({"auth-schemes":Ie.record(Ie.string(),JIe).optional(),api:$Fr.optional(),whitelabel:M2r.optional(),metadata:eve.optional(),readme:z2r.optional(),"default-group":Ie.string().optional(),aliases:Ie.record(Ie.string(),Ie.list(Ie.string())).optional(),groups:Ie.record(Ie.string(),B2r).optional(),reviewers:tve.optional(),replay:R2r.optional(),ai:gkr.optional(),autorelease:Ie.boolean().optional(),automation:HIe.optional(),openapi:k2r.optional(),"openapi-overrides":Ie.string().optional(),"spec-origin":Ie.string().optional(),"async-api":Ie.string().optional(),"api-settings":grt.optional()})});var bAo=h(()=>{"use strict";Bgo();TFr();Ogo();UFr();YFr();ago();w6t();sgo();bFr();EFr();BFr();vgo();PFr();cgo();Igo();ugo();Rgo();lgo();Dgo();q0c();igo();lAo();pAo();Cgo();fAo();mFr();hFr();Pgo();pgo();dgo();fgo();hgo();mgo();Ago();ygo();O6t();xgo();wgo();kgo();P6t();QLe();gFr();xFr();CFr();Sgo();dAo();mAo();hAo();gAo();AFr();ggo();Ego();bgo();Tgo();ogo();S6t();ngo();yAo();AAo()});var EAo={};ee(EAo,{ApiConfigurationSchema:()=>$Fr,ApiConfigurationSchemaInternal:()=>Ert,ApiConfigurationV2Schema:()=>XFr,ApiConfigurationV2SettingsSchema:()=>Crt,ApiConfigurationV2SpecsSchema:()=>xrt,ApiDefinitionList:()=>SFr,ApiDefinitionPathSchema:()=>XIe,ApiDefinitionSchema:()=>wFr,ApiDefinitionSettingsSchema:()=>grt,ApiDefinitionWithOverridesSchema:()=>Art,AsyncApiSettingsSchema:()=>vrt,AsyncApiSpecSchema:()=>GFr,BaseApiSettingsSchema:()=>Irt,CoerceConstsTo:()=>OFr,ConjureSchema:()=>VFr,DefaultIntegerFormat:()=>RFr,ExampleStyle:()=>e2r,FormParameterEncoding:()=>DFr,GeneratorImageObjectSchema:()=>t2r,GeneratorsConfigurationSchema:()=>G0c,GeneratorsOpenApiObjectSchema:()=>D2r,GeneratorsOpenApiSchema:()=>k2r,GitRemoteSchema:()=>IFr,GraphQlSpecSchema:()=>qFr,Language:()=>F2r,MessageNamingSettingsSchema:()=>frt,MultiServerStrategy:()=>drt,NamespacedApiConfigurationSchema:()=>ZFr,OpenApiErrorResponsesApplyTo:()=>kFr,OpenApiErrorResponsesEnsureSchema:()=>NFr,OpenApiErrorResponsesHttpMethod:()=>FFr,OpenApiErrorResponsesSchema:()=>zFr,OpenApiErrorResponsesSchemaSource:()=>jFr,OpenApiExampleGenerationSchema:()=>QFr,OpenApiFilterSchema:()=>MFr,OpenApiSettingsSchema:()=>$Ie,OpenApiSpecSchema:()=>WFr,OpenRpcSpecSchema:()=>HFr,OutputMetadataAuthor:()=>r2r,OutputMetadataSchema:()=>eve,OverridesSchema:()=>HV,PathParameterOrder:()=>mrt,ProtobufApiDefinitionSchema:()=>brt,ProtobufDefinitionSchema:()=>yrt,ProtobufSpecSchema:()=>KFr,ReadmeCustomSectionSchema:()=>N2r,ReadmeEndpointObjectSchema:()=>j2r,ReadmeEndpointSchema:()=>k6t,ReadmeSchema:()=>z2r,RemoveDiscriminantsFromSchemas:()=>hrt,RequestOrResponseExampleGenerationSchema:()=>T6t,ResolveAliases:()=>_Fr,ResolveAliasesSchema:()=>LFr,SpecGitSourceSchema:()=>vFr,SpecSchema:()=>JFr,SpecSourceSchema:()=>ZIe,UnionSettingsSchema:()=>yFr,WhitelabelConfigurationSchema:()=>M2r,WhitelabelGithubConfigurationSchema:()=>Q2r});var W0c=h(()=>{"use strict";bAo()});var IAo=h(()=>{"use strict";S2r();jgo();oAo();sAo();zgo();Ngo();cAo();aAo();Hgo();Ygo();Xgo();Zgo();$go();iAo();eAo();tAo();rAo();nAo();Qgo();Lgo();Mgo();_go();Ugo();Vgo();qgo();Ggo();Wgo()});var vAo={};ee(vAo,{BaseGeneratorInvocationSchema:()=>wrt,CratesOutputLocationSchema:()=>i2r,CustomGeneratorInvocationSchema:()=>T2r,DefaultGeneratorInvocationSchema:()=>O2r,FernHostedOutputLocationSchema:()=>o2r,GeneratorApiSettingsSchema:()=>n2r,GeneratorGroupSchema:()=>B2r,GeneratorInvocationSchema:()=>P2r,GeneratorOutputSchema:()=>h2r,GeneratorPublishMetadataSchema:()=>D6t,GeneratorSnippetsSchema:()=>y2r,GithubCommitAndReleaseMode:()=>b2r,GithubCommitAndReleaseSchema:()=>E2r,GithubConfigurationSchema:()=>w2r,GithubPullRequestSchema:()=>I2r,GithubPushSchema:()=>v2r,GithubSelfhostedMode:()=>C2r,GithubSelfhostedSchema:()=>x2r,LocalFileSystemOutputLocationSchema:()=>s2r,MavenOutputLocationSchema:()=>c2r,MavenOutputSignatureSchema:()=>a2r,NpmOutputLocationSchema:()=>u2r,NugetOutputLocationSchema:()=>l2r,PostmanOutputLocationSchema:()=>p2r,PypiOutputLocationSchema:()=>d2r,PypiOutputMetadataSchema:()=>f2r,RubyGemsOutputLocationSchema:()=>m2r});var H0c=h(()=>{"use strict";IAo()});var CAo=h(()=>{"use strict";Kgo();MLe();Jgo()});var xAo={};ee(xAo,{GithubLicenseCustomSchema:()=>g2r,GithubLicenseSchema:()=>KV,GithubLicenseType:()=>A2r});var K0c=h(()=>{"use strict";CAo()});var wAo=h(()=>{"use strict";uAo()});var SAo={};ee(SAo,{ReplayConfigSchema:()=>R2r});var J0c=h(()=>{"use strict";wAo()});var TAo=h(()=>{"use strict";Fgo();R6t()});var OAo={};ee(OAo,{ReviewerSchema:()=>B6t,ReviewersSchema:()=>tve});var Y0c=h(()=>{"use strict";TAo()});var X0c=h(()=>{"use strict";R0c();Gmo();D0c();Wmo();V0c();W0c();bAo();H0c();IAo();K0c();CAo();J0c();wAo();Y0c();TAo()});var PAo={};ee(PAo,{AiServicesSchema:()=>gkr,ApiConfigurationSchema:()=>$Fr,ApiConfigurationSchemaInternal:()=>Ert,ApiConfigurationV2Schema:()=>XFr,ApiConfigurationV2SettingsSchema:()=>Crt,ApiConfigurationV2SpecsSchema:()=>xrt,ApiDefinitionList:()=>SFr,ApiDefinitionPathSchema:()=>XIe,ApiDefinitionSchema:()=>wFr,ApiDefinitionSettingsSchema:()=>grt,ApiDefinitionWithOverridesSchema:()=>Art,AsyncApiSettingsSchema:()=>vrt,AsyncApiSpecSchema:()=>GFr,AutomationSchema:()=>HIe,BaseApiSettingsSchema:()=>Irt,BaseGeneratorInvocationSchema:()=>wrt,CoerceConstsTo:()=>OFr,ConjureSchema:()=>VFr,CratesOutputLocationSchema:()=>i2r,CustomGeneratorInvocationSchema:()=>T2r,DefaultGeneratorInvocationSchema:()=>O2r,DefaultIntegerFormat:()=>RFr,ExampleStyle:()=>e2r,FernHostedOutputLocationSchema:()=>o2r,FormParameterEncoding:()=>DFr,GeneratorApiSettingsSchema:()=>n2r,GeneratorGroupSchema:()=>B2r,GeneratorImageObjectSchema:()=>t2r,GeneratorInvocationSchema:()=>P2r,GeneratorOutputSchema:()=>h2r,GeneratorPublishMetadataSchema:()=>D6t,GeneratorSnippetsSchema:()=>y2r,GeneratorsConfigurationSchema:()=>G0c,GeneratorsOpenApiObjectSchema:()=>D2r,GeneratorsOpenApiSchema:()=>k2r,GitRemoteSchema:()=>IFr,GithubCommitAndReleaseMode:()=>b2r,GithubCommitAndReleaseSchema:()=>E2r,GithubConfigurationSchema:()=>w2r,GithubLicenseCustomSchema:()=>g2r,GithubLicenseSchema:()=>KV,GithubLicenseType:()=>A2r,GithubPullRequestSchema:()=>I2r,GithubPushSchema:()=>v2r,GithubSelfhostedMode:()=>C2r,GithubSelfhostedSchema:()=>x2r,GraphQlSpecSchema:()=>qFr,Language:()=>F2r,LocalFileSystemOutputLocationSchema:()=>s2r,MavenOutputLocationSchema:()=>c2r,MavenOutputSignatureSchema:()=>a2r,MessageNamingSettingsSchema:()=>frt,ModelName:()=>mkr,ModelProvider:()=>hkr,MultiServerStrategy:()=>drt,NamespacedApiConfigurationSchema:()=>ZFr,NpmOutputLocationSchema:()=>u2r,NugetOutputLocationSchema:()=>l2r,OpenApiErrorResponsesApplyTo:()=>kFr,OpenApiErrorResponsesEnsureSchema:()=>NFr,OpenApiErrorResponsesHttpMethod:()=>FFr,OpenApiErrorResponsesSchema:()=>zFr,OpenApiErrorResponsesSchemaSource:()=>jFr,OpenApiExampleGenerationSchema:()=>QFr,OpenApiFilterSchema:()=>MFr,OpenApiSettingsSchema:()=>$Ie,OpenApiSpecSchema:()=>WFr,OpenRpcSpecSchema:()=>HFr,OutputMetadataAuthor:()=>r2r,OutputMetadataSchema:()=>eve,OverridesSchema:()=>HV,PathParameterOrder:()=>mrt,PostmanOutputLocationSchema:()=>p2r,ProtobufApiDefinitionSchema:()=>brt,ProtobufDefinitionSchema:()=>yrt,ProtobufSpecSchema:()=>KFr,PypiOutputLocationSchema:()=>d2r,PypiOutputMetadataSchema:()=>f2r,ReadmeCustomSectionSchema:()=>N2r,ReadmeEndpointObjectSchema:()=>j2r,ReadmeEndpointSchema:()=>k6t,ReadmeSchema:()=>z2r,RemoveDiscriminantsFromSchemas:()=>hrt,ReplayConfigSchema:()=>R2r,RequestOrResponseExampleGenerationSchema:()=>T6t,ResolveAliases:()=>_Fr,ResolveAliasesSchema:()=>LFr,ReviewerSchema:()=>B6t,ReviewersSchema:()=>tve,RubyGemsOutputLocationSchema:()=>m2r,SpecGitSourceSchema:()=>vFr,SpecSchema:()=>JFr,SpecSourceSchema:()=>ZIe,UnionSettingsSchema:()=>yFr,WhitelabelConfigurationSchema:()=>M2r,WhitelabelGithubConfigurationSchema:()=>Q2r,ai:()=>qmo,automation:()=>Hmo,fernDefinition:()=>rgo,generators:()=>EAo,group:()=>vAo,license:()=>xAo,replay:()=>SAo,reviewers:()=>OAo});var Z0c=h(()=>{"use strict";X0c()});var $0c=h(()=>{"use strict";Abc();Z0c()});function eEc(e){let t=e.output;return t?.location==="maven"&&t.signature==null&&t.url==null}function tEc(e){return`Maven output for ${e} has no \`signature\` and no \`url\`. Maven Central requires signed artifacts, so this publish will be uploaded to the Central Portal staging service but never released. Add \`signature\` to publish to Maven Central, or set \`url\` to publish to another registry.`}var rEc=h(()=>{"use strict"});function nEc(e){return e?.specs!=null}var iEc=h(()=>{"use strict"});function oEc(e){return e?.asyncapi!=null}var sEc=h(()=>{"use strict"});function aEc(e){return e?.conjure!=null}var cEc=h(()=>{"use strict"});function uEc(e){return e?.graphql!=null}var lEc=h(()=>{"use strict"});function pEc(e){return e?.namespaces!=null}var fEc=h(()=>{"use strict"});function dEc(e){return e?.openapi!=null}var mEc=h(()=>{"use strict"});function hEc(e){return e?.openrpc!=null}var gEc=h(()=>{"use strict"});function AEc(e){return e?.proto!=null}var yEc=h(()=>{"use strict"});var bEc=h(()=>{"use strict";iEc();sEc();cEc();lEc();fEc();mEc();gEc();yEc()});var Yr={};ee(Yr,{API_ORIGIN_LOCATION_KEY:()=>fic,API_SETTINGS_KEY:()=>gic,ASYNC_API_LOCATION_KEY:()=>dic,CoerceConstsTo:()=>CAc,DEFAULT_GROUP_GENERATORS_CONFIG_KEY:()=>RIe,DEFAULT_GROUP_NAME:()=>lLt,DIRECT_RUBYGEMS_PUBLISHING_UNSUPPORTED_MESSAGE:()=>xhc,DefaultIntegerFormat:()=>SAc,ExampleStyle:()=>OAc,FormParameterEncoding:()=>BAc,GenerationLanguage:()=>Thc,GithubCommitAndReleaseMode:()=>Myc,GithubLicenseType:()=>sbc,GithubSelfhostedMode:()=>qyc,Language:()=>QAc,MessageNamingSettingsSchema:()=>LAc,ModelProvider:()=>jhc,MultiServerStrategy:()=>UAc,OPENAPI_LOCATION_KEY:()=>mic,OPENAPI_OVERRIDES_LOCATION_KEY:()=>hic,OpenApiErrorResponsesApplyTo:()=>qAc,OpenApiErrorResponsesHttpMethod:()=>KAc,PathParameterOrder:()=>syc,RemoveDiscriminantsFromSchemas:()=>hyc,UnionSettingsSchema:()=>Cyc,ai:()=>tmo,automation:()=>Lhc,fernDefinition:()=>mmo,generators:()=>gmo,getPackageName:()=>Ohc,getUnsignedMavenPublishingWithoutUrlMessage:()=>tEc,group:()=>ymo,isApiConfigurationV2Schema:()=>nEc,isAsyncApiSpecSchema:()=>oEc,isConjureSchema:()=>aEc,isDirectRubyGemsPublishing:()=>whc,isGraphQLSpecSchema:()=>uEc,isNamespacedApiConfiguration:()=>pEc,isOpenApiSpecSchema:()=>dEc,isOpenRpcSpecSchema:()=>hEc,isProtoSpecSchema:()=>AEc,isRawProtobufAPIDefinitionSchema:()=>Bhc,isUnsignedMavenPublishingWithoutUrl:()=>eEc,license:()=>Emo,replay:()=>lbc,resolveAutomationConfig:()=>Dhc,reviewers:()=>mbc,serialization:()=>PAo});var EEc=h(()=>{"use strict";TOr();Shc();Phc();Rhc();khc();$0c();rEc();bEc()});var ps=h(()=>{"use strict";cic();TOr();icc();bhc();Ehc();Chc();EEc()});function B$(e){if(typeof e.raw?.output=="object"&&e.raw?.output!==null){let r=e.raw.output["package-name"];if(r!=null)return r;let n=e.raw.output.coordinate;if(n!=null)return n}let t=e.config??e.raw?.config;if(typeof t=="object"&&t!==null){let r=t.package_name;if(typeof r=="string")return r;let n=t["package-name"];if(typeof n=="string")return n;let i=t.module?.path;if(typeof i=="string")return i;let o=t.packageName;if(typeof o=="string")return o}}function rve(e){if(typeof e.raw?.config=="object"&&e.raw?.config!==null){let t=e.raw.config["user-agent"];if(t!=null)return t}}function std(e){if(!Array.isArray(e))return RAo;let t=e.filter(r=>typeof r=="string").map(r=>r.toUpperCase()).filter(r=>otd.has(r));return t.length>0?t:RAo}function nve(e){let t=e.idempotencyKeyGenerationConfig??atd(e);return ctd(t)}function atd(e){let t=typeof e.raw?.config=="object"&&e.raw?.config!==null?e.raw.config:typeof e.config=="object"&&e.config!==null?e.config:void 0;if(t!=null)return t["auto-generate-idempotency-key"]}function ctd(e){if(e===!0)return{headerName:IEc,methods:RAo};if(typeof e=="object"&&e!==null){let t=e["header-name"];return{headerName:typeof t=="string"?t:IEc,methods:std(e.methods)}}}function ive(e,t){return CEc(e.webhookSignatureConfig,t)}function vEc(e,t){let r=e?.rawConfiguration.api;if(!(r==null||!Yr.isApiConfigurationV2Schema(r)))return CEc(r.settings?.["webhook-signature"],t)}function CEc(e,t){if(e==null)return;let r=Wd.serialization.WebhookSignatureSchema.parse(e,{unrecognizedObjectKeys:"fail"});if(!r.ok){let n=r.errors.map(i=>`${i.path.join(".")||"<root>"}: ${i.message}`).join("; ");return t.failAndThrow(`Invalid api.settings.webhook-signature in generators.yml: ${n}`)}return r.value}function R$(e){if(typeof e!="object"||e===null)return e;let t={};for(let[r,n]of Object.entries(e))utd.has(r)||(t[r]=n);return t}async function L2r({version:e,packageName:t,generatorInvocation:r,context:n}){if(e==null||r.outputMode.type==="downloadFiles")return;let i=r.outputMode.type==="publishV2"||r.outputMode.type==="publish",o=t??B$(r);if(r.language==null||o==null)return;let s=r.language,a;try{a=await ltd({packageName:o,version:e,language:s})}catch(c){n.logger.debug(`Could not verify version availability on ${BAo(s)}: ${Pn(c)}`);return}a&&(i?n.failAndThrow(`Version ${e} of ${o} already exists on the ${BAo(s)} registry. Please use a different version number. If you want to automatically increment the version, omit the --version flag.`,void 0,{code:S.Code.VersionError}):n.logger.warn(`Version ${e} of ${o} already exists on the ${BAo(s)} registry. If your CI pipeline publishes this version, it may fail.`))}async function ltd({packageName:e,version:t,language:r}){switch(r){case"typescript":return await ptd(e,t);case"python":return await ftd(e,t);case"java":return await dtd(e,t);case"csharp":return await mtd(e,t);case"ruby":return await htd(e,t);case"go":return await gtd(e,t);case"rust":return await Atd(e,t);default:return!1}}async function ptd(e,t){let r=encodeURIComponent(e).replace(/^%40/,"@"),n={accept:"application/json"},i=process.env.NPM_TOKEN;i!=null&&(n.authorization=`Bearer ${i}`);let o=await fetch(`https://registry.npmjs.org/${r}/${t}`,{headers:n,signal:AbortSignal.timeout(LLe)});return o.ok?(await o.json()).version===t:!1}async function ftd(e,t){return(await fetch(`https://pypi.org/pypi/${e}/${t}/json`,{signal:AbortSignal.timeout(LLe)})).ok}async function dtd(e,t){let r=e.split(":");if(r.length<2||!r[0]||!r[1])return!1;let n=r[0],i=r[1],o=await fetch(`https://search.maven.org/solrsearch/select?q=g:${encodeURIComponent(n)}+AND+a:${encodeURIComponent(i)}+AND+v:${encodeURIComponent(t)}&rows=1&wt=json`,{signal:AbortSignal.timeout(LLe)});return o.ok?((await o.json()).response?.numFound??0)>0:!1}async function mtd(e,t){let r=await fetch(`https://api.nuget.org/v3-flatcontainer/${e.toLowerCase()}/index.json`,{signal:AbortSignal.timeout(LLe)});return r.ok?((await r.json()).versions??[]).some(o=>o.toLowerCase()===t.toLowerCase()):!1}async function htd(e,t){return(await fetch(`https://rubygems.org/api/v2/rubygems/${e}/versions/${t}.json`,{signal:AbortSignal.timeout(LLe)})).ok}async function gtd(e,t){let r=e.replace(/[A-Z]/g,s=>"!"+s.toLowerCase()),n=t.startsWith("v")?t:`v${t}`,i=await fetch(`https://proxy.golang.org/${r}/@v/${n}.info`,{signal:AbortSignal.timeout(LLe)});return i.ok?(await i.json()).Version!=null:!1}async function Atd(e,t){let r=await fetch(`https://crates.io/api/v1/crates/${e}/${t}`,{headers:{"user-agent":"fern-cli (https://buildwithfern.com)"},signal:AbortSignal.timeout(LLe)});return r.ok?(await r.json()).version?.num===t:!1}function BAo(e){switch(e){case"typescript":return"npm";case"python":return"PyPI";case"java":return"Maven Central";case"csharp":return"NuGet";case"ruby":return"RubyGems";case"go":return"Go Module Proxy";case"rust":return"crates.io";default:return e}}var IEc,RAo,otd,utd,LLe,DAo=h(()=>{"use strict";ps();Ot();ho();Nt();IEc="Idempotency-Key",RAo=["POST","PUT"],otd=new Set(["GET","POST","PUT","PATCH","DELETE","HEAD"]);utd=new Set(["user-agent","auto-generate-idempotency-key"]);LLe=5e3});var xEc=E(Q3=>{"use strict";var ytd=Q3&&Q3.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Q3,"__esModule",{value:!0});var btd=require("fs"),Etd=ytd(iy()),Srt=Etd.default("@kwsites/file-exists");function Itd(e,t,r){Srt("checking %s",e);try{let n=btd.statSync(e);return n.isFile()&&t?(Srt("[OK] path represents a file"),!0):n.isDirectory()&&r?(Srt("[OK] path represents a directory"),!0):(Srt("[FAIL] path represents something other than a file or directory"),!1)}catch(n){if(n.code==="ENOENT")return Srt("[FAIL] path is not accessible: %o",n),!1;throw Srt("[FATAL] %o",n),n}}function vtd(e,t=Q3.READABLE){return Itd(e,(t&Q3.FILE)>0,(t&Q3.FOLDER)>0)}Q3.exists=vtd;Q3.FILE=1;Q3.FOLDER=2;Q3.READABLE=Q3.FILE+Q3.FOLDER});var kAo=E(_2r=>{"use strict";function Ctd(e){for(var t in e)_2r.hasOwnProperty(t)||(_2r[t]=e[t])}Object.defineProperty(_2r,"__esModule",{value:!0});Ctd(xEc())});function Trt(...e){let t=new String(e);return FAo.set(t,e),t}function JV(e){return e instanceof String&&FAo.has(e)}function Ort(e){return FAo.get(e)??[]}var FAo,ove=h(()=>{"use strict";FAo=new WeakMap});var F6t=E(_Le=>{"use strict";Object.defineProperty(_Le,"__esModule",{value:!0});_Le.createDeferred=_Le.deferred=void 0;function NAo(){let e,t,r="pending";return{promise:new Promise((i,o)=>{e=i,t=o}),done(i){r==="pending"&&(r="resolved",e(i))},fail(i){r==="pending"&&(r="rejected",t(i))},get fulfilled(){return r!=="pending"},get status(){return r}}}_Le.deferred=NAo;_Le.createDeferred=NAo;_Le.default=NAo});function*wEc(e,t){let r=t==="global";for(let n of e)n.isGlobal===r&&(yield n)}function Otd(e,t){for(let{name:n}of wEc(e,"task")){if(xtd.has(n))return Prt(!0,t);if(wtd.has(n))return Prt(!1,t)}let r=t.at(0)?.toLowerCase();return r===void 0?null:Std.has(r)?Prt(!0,t.slice(1)):Ttd.has(r)?Prt(!1,t.slice(1)):t.length===1?Prt(!1,t):Prt(!0,t)}function Prt(e=!1,t=[]){let r=t.at(0)?.toLowerCase();return r===void 0?null:{isWrite:e,isRead:!e,key:r,value:t.at(1)}}function Ptd(e,t){return t.isWrite&&t.value!==void 0?{key:t.key,value:t.value,scope:e}:{key:t.key,scope:e}}function Btd(e){let t=e?.indexOf("=")||-1;return!e||t<0?null:{key:e.slice(0,t).trim().toLowerCase(),value:e.slice(t+1)}}function Rtd(e){for(let{name:t}of wEc(e,"task"))switch(t){case"--global":return"global";case"--system":return"system";case"--worktree":return"worktree";case"--local":return"local";case"--file":case"-f":return"file"}return"local"}function Dtd({name:e}){if(e==="-c"||e==="--config")return"inline";if(e==="--config-env")return"env"}function*ktd(e){for(let t of e){let r=Dtd(t),n=r&&Btd(t.value);n&&(yield{...n,scope:r})}}function Ftd(e,t,r){let n={read:[],write:[...ktd(t)]};return e==="config"&&Ntd(n,Rtd(t),Otd(t,r)),n}function Ntd(e,t,r){if(r===null)return;let n=Ptd(t,r);r.isWrite?e.write.push(n):e.read.push(n)}function Mtd(e){let t=ztd[e??""]??Qtd;return{short:new Map([...SEc.short.entries(),...t.short.entries()]),long:t.long}}function TEc(e,t=jtd){if(e.startsWith("--")){let r=e.indexOf("=");if(r>2)return[{name:e.slice(0,r),value:e.slice(r+1),needsNext:!1}];let n=e.slice(2);return[{name:e,needsNext:t.long.has(n)}]}if(e.length===2){let r=e.charAt(1),n=t.short.get(r);return[{name:e,needsNext:n===!0}]}return Ltd(e,t.short)}function Ltd(e,t){let r=e.slice(1).split(""),n=[];for(let i=0;i<r.length;i++){let o=r[i],s=t.get(o);if(s===void 0)return[{name:e,needsNext:!1}];if(s){let a=r.slice(i+1).join("");if(a&&![...a].every(c=>t.has(c)))return n.push({name:`-${o}`,value:a,needsNext:!1}),n}n.push({name:`-${o}`,needsNext:s})}return n}function _td(e,t=[]){let r=0;for(;r<e.length;){let n=String(e[r]);if(!n.startsWith("-")||n.length<2)break;let i=TEc(n),o=r+1;for(let s of i){let a={name:s.name,value:s.value,absorbedNext:!1,isGlobal:!0};s.needsNext&&a.value===void 0&&o<e.length&&(a.value=String(e[o]),a.absorbedNext=!0,o++),t.push(a)}r=o}return{flags:t,taskIndex:r}}function Utd(e,t,r=[]){let n=Mtd(t),i=[],o=[],s=0;for(;s<e.length;){let a=e[s];if(JV(a)){o.push(...Ort(a)),s++;continue}let c=String(a);if(c==="--"){for(let p=s+1;p<e.length;p++){let f=e[p];JV(f)?o.push(...Ort(f)):o.push(String(f))}break}if(!c.startsWith("-")||c.length<2){i.push(c),s++;continue}let u=TEc(c,n),l=s+1;for(let p of u){let f={name:p.name,value:p.value,absorbedNext:!1,isGlobal:!1};p.needsNext&&f.value===void 0&&l<e.length&&!JV(e[l])&&(f.value=String(e[l]),f.absorbedNext=!0,l++),r.push(f)}s=l}return{flags:r,positionals:i,pathspecs:o}}function*Vtd({write:e}){for(let t of e)for(let r of Gtd){let n=r(t.key);n&&(yield n)}}function XV(e,t,r=String(e)){let n=typeof e=="string"?new RegExp(`\\s*${e.toLowerCase()}`):e;return function(i){if(n.test(i))return{category:t,message:`Configuring ${r} is not permitted without enabling ${t}`}}}function YV(e,t){let r=new RegExp(`\\s*${e.toLowerCase().replace(/\./g,"(..+)?.")}`);return XV(r,t,e)}function*qtd(e,t){for(let r of t)for(let n of Wtd){let i=n(e,r.name);i&&(yield i)}}function N6t(e,t,r,n=String(t)){let i=typeof t=="string"?new RegExp(`\\s*${t.toLowerCase()}`):t,o=`Use of ${e?`${e} with option `:""}${n} is not permitted without enabling ${r}`;return function(s,a){if((!e||s===e)&&i.test(a))return{category:r,message:o}}}function OEc(e,t,r){return[...qtd(e,t),...Vtd(r)]}function Htd(...e){let{flags:t,taskIndex:r}=_td(e),n=r<e.length?String(e[r]).toLowerCase():null,i=n!==null?e.slice(r+1):[],{positionals:o,pathspecs:s}=Utd(i,n,t),a=Ftd(n,t,o);return{task:n,flags:t.map(Jtd),paths:s,config:a,vulnerabilities:Ktd(OEc(n,t,a))}}function Ktd(e){return Object.defineProperty(e,"vulnerabilities",{value:e})}function Jtd({value:e,name:t}){return e!==void 0?{name:t,value:e}:{name:t}}function*Ytd(e){let t=parseInt(e.git_config_count??"0",10);for(let r=0;r<t;r++){let n=e[`git_config_key_${r}`],i=e[`git_config_value_${r}`];n!==void 0&&(yield{key:n.toLowerCase().trim(),value:i,scope:"env"})}}function*Xtd(e){for(let t of Object.keys(e))if(BEc(t)){let r=PEc[t];yield{category:r,message:`Use of "${t.toUpperCase()}" is not permitted without enabling ${r}`}}}function BEc(e){return Object.hasOwn(PEc,e)}function Ztd(e){let t={};for(let[r,n]of Object.entries(e)){let i=r.toLowerCase().trim();(BEc(i)||i.startsWith("git"))&&(t[i]=String(n))}return t}function $td(e){let t=Ztd(e),r={read:[],write:[...Ytd(t)]},n=[...Xtd(t),...OEc(null,[],r)];return{config:r,vulnerabilities:n}}function REc(e,t){return[...Htd(...e).vulnerabilities,...$td(t).vulnerabilities]}var xtd,wtd,Std,Ttd,SEc,jtd,ztd,Qtd,Gtd,Wtd,PEc,DEc=h(()=>{"use strict";ove();xtd=new Set(["--add","--edit","--remove-section","--rename-section","--replace-all","--unset","--unset-all","-e"]),wtd=new Set(["--get","--get-all","--get-color","--get-colorbool","--get-regexp","--get-urlmatch","--list","-l"]),Std=new Set(["edit","remove-section","rename-section","set","unset"]),Ttd=new Set(["get","get-color","get-colorbool","list"]);SEc={short:new Map([["c",!0]])},jtd={short:new Map([["C",!0],["P",!1],["h",!1],["p",!1],["v",!1],...SEc.short.entries()]),long:new Set(["attr-source","config-env","exec-path","git-dir","list-cmds","namespace","super-prefix","work-tree"])},ztd={clone:{short:new Map([["b",!0],["j",!0],["l",!1],["n",!1],["o",!0],["q",!1],["s",!1],["u",!0]]),long:new Set(["branch","config","jobs","origin","upload-pack","u","template"])},commit:{short:new Map([["C",!0],["F",!0],["c",!0],["m",!0],["t",!0]]),long:new Set(["file","message","reedit-message","reuse-message","template"])},config:{short:new Map([["e",!1],["f",!0],["l",!1]]),long:new Set(["blob","comment","default","file","type","value"])},fetch:{short:new Map,long:new Set(["upload-pack"])},init:{short:new Map,long:new Set(["template"])},pull:{short:new Map,long:new Set(["upload-pack"])},push:{short:new Map,long:new Set(["exec","receive-pack"])}},Qtd={short:new Map,long:new Set};Gtd=[XV("alias","allowUnsafeAlias"),XV("core.askPass","allowUnsafeAskPass"),XV("core.editor","allowUnsafeEditor"),XV("core.fsmonitor","allowUnsafeFsMonitor"),XV("core.gitProxy","allowUnsafeGitProxy"),XV("core.hooksPath","allowUnsafeHooksPath"),XV("core.pager","allowUnsafePager"),XV("core.sshCommand","allowUnsafeSshCommand"),YV("credential.helper","allowUnsafeCredentialHelper"),YV("diff.command","allowUnsafeDiffExternal"),XV("diff.external","allowUnsafeDiffExternal"),YV("diff.textconv","allowUnsafeDiffTextConv"),YV("filter.clean","allowUnsafeFilter"),YV("filter.smudge","allowUnsafeFilter"),YV("gpg.program","allowUnsafeGpgProgram"),XV("init.templateDir","allowUnsafeTemplateDir"),YV("merge.driver","allowUnsafeMergeDriver"),YV("mergetool.path","allowUnsafeMergeDriver"),YV("mergetool.cmd","allowUnsafeMergeDriver"),YV("protocol.allow","allowUnsafeProtocolOverride"),YV("remote.receivepack","allowUnsafePack"),YV("remote.uploadpack","allowUnsafePack"),XV("sequence.editor","allowUnsafeEditor")];Wtd=[N6t(null,/--(upload|receive)-pack/,"allowUnsafePack","--upload-pack or --receive-pack"),N6t("clone",/^-\w*u/,"allowUnsafePack"),N6t("clone","--u","allowUnsafePack"),N6t("push","--exec","allowUnsafePack"),N6t(null,"--template","allowUnsafeTemplateDir")];PEc={editor:"allowUnsafeEditor",git_askpass:"allowUnsafeAskPass",git_config_global:"allowUnsafeConfigPaths",git_config_system:"allowUnsafeConfigPaths",git_config_count:"allowUnsafeConfigEnvCount",git_config:"allowUnsafeConfigPaths",git_editor:"allowUnsafeEditor",git_exec_path:"allowUnsafeConfigPaths",git_external_diff:"allowUnsafeDiffExternal",git_pager:"allowUnsafePager",git_proxy_command:"allowUnsafeGitProxy",git_template_dir:"allowUnsafeTemplateDir",git_sequence_editor:"allowUnsafeEditor",git_ssh:"allowUnsafeSshCommand",git_ssh_command:"allowUnsafeSshCommand",pager:"allowUnsafePager",prefix:"allowUnsafeConfigPaths",ssh_askpass:"allowUnsafeAskPass"}});function fIc(e){return typeof e!="function"?GLe:e}function dIc(e){return typeof e=="function"&&e!==GLe}function mIc(e,t){let r=e.indexOf(t);return r<=0?[e,""]:[e.substr(0,r),e.substr(r+1)]}function hIc(e,t=0){return gIc(e)&&e.length>t?e[t]:void 0}function VLe(e,t=0){if(gIc(e)&&e.length>t)return e[e.length-1-t]}function gIc(e){return tNr(e)}function L6t(e="",t=!0,r=`
|
|
143
143
|
`){return e.split(r).reduce((n,i)=>{let o=t?i.trim():i;return o&&n.push(o),n},[])}function oyo(e,t){return L6t(e,!0).map(r=>t(r))}function syo(e){return(0,X2r.exists)(e,X2r.FOLDER)}function ZV(e,t){return Array.isArray(e)?e.includes(t)||e.push(t):e.add(t),t}function AIc(e,t){return Array.isArray(e)&&!e.includes(t)&&e.push(t),e}function Z2r(e,t){if(Array.isArray(e)){let r=e.indexOf(t);r>=0&&e.splice(r,1)}else e.delete(t);return t}function D$(e){return Array.isArray(e)?e:[e]}function yIc(e){return e.replace(/[\s-]+(.)/g,(t,r)=>r.toUpperCase())}function Frt(e){return D$(e).map(t=>t instanceof String?t:String(t))}function Gy(e,t=0){if(e==null)return t;let r=parseInt(e,10);return Number.isNaN(r)?t:r}function z6t(e,t){let r=[];for(let n=0,i=e.length;n<i;n++)r.push(t,e[n]);return r}function Q6t(e){return(Array.isArray(e)?Buffer.concat(e):e).toString("utf-8")}function bIc(e,t){let r={};return t.forEach(n=>{e[n]!==void 0&&(r[n]=e[n])}),r}function UAo(e=0){return new Promise(t=>setTimeout(t,e))}function VAo(e){if(e!==!1)return e}function dD(e,t,r){return t(e)?e:arguments.length>2?r:void 0}function GAo(e,t){let r=JV(e)?"string":typeof e;return/number|string|boolean/.test(r)&&(!t||!t.includes(r))}function eNr(e){return!!e&&_6t(e)==="[object Object]"}function EIc(e){return typeof e=="function"}function srd(){throw new Error("LineParser:useMatches not implemented")}function CIc(...e){let t=process.cwd(),r=Object.assign({baseDir:t,...xIc},...e.filter(n=>typeof n=="object"&&n));return r.baseDir=r.baseDir||t,r.trimmed=r.trimmed===!0,r}function cyo(e,t=[]){return eNr(e)?Object.keys(e).reduce((r,n)=>{let i=e[n];if(JV(i))r.push(i);else if(GAo(i,["boolean"]))r.push(n+"="+i);else if(Array.isArray(i))for(let o of i)GAo(o,["string","number"])||r.push(n+"="+o);else r.push(n);return r},t):t}function k2(e,t=0,r=!1){let n=[];for(let i=0,o=t<0?e.length:t;i<o;i++)"string|number".includes(typeof e[i])&&n.push(String(e[i]));return cyo(uyo(e),n),r||n.push(...urd(e)),n}function urd(e){let t=typeof VLe(e)=="function";return Frt(dD(VLe(e,t?1:0),U6t,[]))}function uyo(e){let t=EIc(VLe(e));return dD(VLe(e,t?1:0),eNr)}function eE(e,t=!0){let r=fIc(VLe(e));return t||dIc(r)?r:void 0}function WAo(e,t){return e(t.stdOut,t.stdErr)}function yQ(e,t,r,n=!0){return D$(r).forEach(i=>{for(let o=L6t(i,n),s=0,a=o.length;s<a;s++){let c=(u=0)=>{if(!(s+u>=a))return o[s+u]};t.some(({parse:u})=>u(c,e))}}),e}function frd(e){switch(e){case"bare":return OIc();case"root":return TIc()}return{commands:["rev-parse","--is-inside-work-tree"],format:"utf-8",onError:rNr,parser:lyo}}function TIc(){return{commands:["rev-parse","--git-dir"],format:"utf-8",onError:rNr,parser(t){return/^\.(git)?$/.test(t.trim())}}}function OIc(){return{commands:["rev-parse","--is-bare-repository"],format:"utf-8",onError:rNr,parser:lyo}}function drd(e){return/(Not a git repository|Kein Git-Repository)/i.test(String(e))}function mrd(e,t){let r=new BIc(e),n=e?DIc:RIc;return L6t(t).forEach(i=>{let o=i.replace(n,"");r.paths.push(o),(kIc.test(o)?r.folders:r.files).push(o)}),r}function FIc(e){return{commands:nNr,format:"empty",parser:e}}function AQ(e){return{commands:nNr,format:"empty",parser(){throw typeof e=="string"?new lIc(e):e}}}function F2(e,t=!1){return{commands:e,format:"utf-8",parser(r){return t?String(r).trim():r}}}function NIc(e){return{commands:e,format:"buffer",parser(t){return t}}}function jIc(e){return e.format==="buffer"}function zIc(e){return e.format==="empty"||!e.commands.length}function grd(e,t){let{cleanMode:r,options:n,valid:i}=yrd(e);return r?i.options?(n.push(...t),n.some(Ird)?AQ(pyo):MIc(r,n)):AQ(dyo+JSON.stringify(e)):AQ(fyo)}function MIc(e,t){return{commands:["clean",`-${e}`,...t],format:"utf-8",parser(n){return mrd(e==="n",n)}}}function Ard(e){return Array.isArray(e)&&e.every(t=>myo.has(t))}function yrd(e){let t,r=[],n={cleanMode:!1,options:!0};return e.replace(/[^a-z]i/g,"").split("").forEach(i=>{brd(i)?(t=i,n.cleanMode=!0):n.options=n.options&&Erd(r[r.length]=`-${i}`)}),{cleanMode:t,options:r,valid:n}}function brd(e){return e==="f"||e==="n"}function Erd(e){return/^-[a-z]$/i.test(e)&&myo.has(e.charAt(1))}function Ird(e){return/^-[^\-]/.test(e)?e.indexOf("i")>0:e==="--interactive"}function vrd(e){let t=new UIc;for(let r of _Ic(e))t.addValue(r.file,String(r.key),r.value);return t}function Crd(e,t){let r=null,n=[],i=new Map;for(let o of _Ic(e,t))o.key===t&&(n.push(r=o.value),i.has(o.file)||i.set(o.file,[]),i.get(o.file).push(r));return{key:t,paths:Array.from(i.keys()),scopes:i,value:r,values:n}}function xrd(e){return e.replace(/^(file):/,"")}function*_Ic(e,t=null){let r=e.split("\0");for(let n=0,i=r.length-1;n<i;){let o=xrd(r[n++]),s=r[n++],a=t;if(s.includes(`
|
|
144
144
|
`)){let c=mIc(s,`
|
|
@@ -475,7 +475,7 @@ return `+str.trim()+`;
|
|
|
475
475
|
`),code:S.Code.ParseError});return r}async function U8r({redirects:e,absoluteFilepathToDocsConfig:t}){if(e==null)return{redirects:void 0,errors:[]};let r=typeof e=="string"?[e]:e;if(xKd(r))return{redirects:r,errors:[]};if(!Liu(r))return{redirects:[],errors:["Failed to load redirects: `redirects` must be either a list of redirects or a list of filepaths, not a mix of both"]};let n=await Promise.allSettled(r.map(s=>SKd({filepath:s,absoluteFilepathToDocsConfig:t}))),i=[],o=[];for(let s of n)if(s.status==="fulfilled")o.push(...s.value);else if(s.reason instanceof S)i.push(s.reason.message);else throw s.reason;return{redirects:o,errors:i}}function VDo({redirects:e,absoluteFilepathToDocsConfig:t}){if(e==null)return[];let r=typeof e=="string"?[e]:e;return Liu(r)?r.filter(n=>n.trim().length>0).map(n=>Zn(bn(t),n)):[]}function xKd(e){return e.every(t=>typeof t!="string")}function Liu(e){return e.every(t=>typeof t=="string")}function wKd(e){return e instanceof Error&&"code"in e&&e.code==="ENOENT"}async function SKd({filepath:e,absoluteFilepathToDocsConfig:t}){if(e.trim().length===0)throw new S({message:"Failed to load redirects: `redirects` contains an empty filepath",code:S.Code.ParseError});let r=Zn(bn(t),e),n;try{n=await(0,_8r.stat)(r)}catch(a){throw new S({message:wKd(a)?`Failed to load redirects: ${r} does not exist`:`Failed to load redirects from ${r}: ${Pn(a)}`,code:S.Code.ParseError})}if(!n.isFile())throw new S({message:`Failed to load redirects: ${r} is not a file`,code:S.Code.ParseError});let i;try{i=(await(0,_8r.readFile)(r)).toString()}catch(a){throw new S({message:`Failed to read ${r}: ${Pn(a)}`,code:S.Code.ParseError})}let o;try{o=Ir.load(i)}catch(a){throw a instanceof Ir.YAMLException?new S({message:`Failed to parse ${r}: ${a.message}`,code:S.Code.ParseError}):a}if(o==null)throw new S({message:`Failed to parse ${r}: the file is empty and must contain a \`redirects\` list`,code:S.Code.ParseError});if(Array.isArray(o))throw new S({message:`Failed to parse ${r}: the file must nest the list under a top-level \`redirects\` key`,code:S.Code.ParseError});let s=CKd.safeParse(_P(o));if(!s.success)throw new S({message:`Failed to parse ${r}. The file must contain only a \`redirects\` list:
|
|
476
476
|
${s.error.issues.map(a=>` - ${a.path.join(".")}: ${a.message}`).join(`
|
|
477
477
|
`)}`,code:S.Code.ParseError});return s.data.redirects}var _8r,CKd,GDo=h(()=>{"use strict";ps();Ot();er();Nt();_8r=require("fs/promises");ts();CKd=sc.DocsYmlSchemas.RedirectsFile});function TKd(e){return!e||e.startsWith("<")?!1:e.startsWith(".")||e.includes("/")||e.includes("\\")||e.includes(":")}function aE(e,t){if(e)return TKd(e)?cA(e,t):e}async function n_e({rawDocsConfiguration:e,absolutePathToFernFolder:t,absoluteFilepathToDocsConfig:r,context:n,buildRefVersions:i=!0}){let{instances:o,title:s,tabs:a,products:c,versions:u,navigation:l,navbarLinks:p,footerLinks:f,defaultLanguage:d,metadata:m,redirects:g,logo:A,favicon:y,backgroundImage:I,colors:x,typography:v,layout:w,integrations:B,css:R,js:D,aiChat:O,aiSearch:M,agents:Y,pageActions:te,experimental:$}=e,se=Kst(e.landingPage,r),le=e.settings?.folderTitleSource,ie=qKd({tabs:a,products:c,rootChangelog:e.changelog,versions:u,navigation:l,absolutePathToFernFolder:t,absolutePathToConfig:r,context:n,folderTitleSource:le,buildRefVersions:i}),fe=ie.then(G=>t8c({files:Ede({navigation:G,landingPage:se}),absolutePathToFernFolder:t})),Se=PKd(A,r),Be=cA(y,r),ae=BKd(I,r),ue=v!=null?WKd({rawTypography:v,absoluteFilepathToDocsConfig:r}):void 0,Te=B5t({redirects:g,absoluteFilepathToDocsConfig:r}),Ee=RKd(R,r),Ne=FKd(D,r),qe=hJd(m,r,n),ot=_Kd({rawPath:e.integrations?.context7,absoluteFilepathToDocsConfig:r,context:n}),It=qDo({rawPath:Y?.llmsTxt,absoluteFilepathToDocsConfig:r}),gt=qDo({rawPath:Y?.llmsFullTxt,absoluteFilepathToDocsConfig:r}),qt=qDo({rawPath:Y?.robotsTxt,absoluteFilepathToDocsConfig:r}),cr=e.translations?.map(G=>sc.DocsYmlSchemas.normalizeTranslationConfig(G)).find(G=>G.default===!0)?.lang??(e.translations?.[0]!=null?sc.DocsYmlSchemas.normalizeTranslationConfig(e.translations[0]).lang:void 0),Ce=fe.then(G=>AJd({translations:e.translations,defaultLocale:cr,pages:G,absolutePathToFernFolder:t,context:n})),ge=yJd({translations:e.translations,defaultLocale:cr,absolutePathToFernFolder:t,context:n}),[$e,Ye,xe,Pe,ct,nt,Me,lt,Ct,ur,Tn,Pr,Yn]=await Promise.all([ie,fe,ue,Ee,Ne,qe,Te,ot,It,gt,qt,Ce,ge]),Xt=MKd(e.theme),wr=Xt?.tabs!=null&&typeof Xt.tabs=="object"?Xt.tabs:void 0,He=wr?.placement??w?.tabsPlacement??"sidebar",Fe=wr?.alignment??"left";return He==="sidebar"&&Fe==="center"&&n.logger.warn("Tabs alignment 'center' is not supported when tabs placement is 'sidebar'. The alignment will be ignored."),OKd({externalSitemaps:$?.externalSitemaps,siteLocales:e.translations?.map(G=>sc.DocsYmlSchemas.normalizeTranslationConfig(G).lang)??[e.settings?.language??"en"],context:n}),{title:s,instances:o,roles:e.roles,libraries:Hiu(e.libraries),pages:Ye,translationPages:Pr,translationNavigationOverlays:Yn,landingPage:se,navigation:$e,navbarLinks:Kiu(p,r),footerLinks:mJd(f),defaultLanguage:d,languages:e.languages,translations:e.translations,announcement:e.announcement,metadata:nt,redirects:Me,logo:Se,favicon:Be,backgroundImage:ae,colors:Z5c(x,n),typography:xe,layout:UKd(w,wr?.alignment,wr?.placement),settings:LKd(e.settings,n),context7File:lt,llmsTxtFile:Ct,llmsFullTxtFile:ur,robotsTxtFile:Tn,theme:Xt,globalTheme:e.globalTheme,analyticsConfig:{...e.analytics,intercom:e.analytics?.intercom?{...e.analytics.intercom,appId:e.analytics.intercom.appId,apiBase:e.analytics.intercom.apiBase}:void 0,fullstory:e.analytics?.fullstory,posthog:e.analytics?.posthog?{...e.analytics.posthog,apiKey:e.analytics.posthog.apiKey,endpoint:e.analytics.posthog.endpoint}:void 0,segment:e.analytics?.segment,gtm:e.analytics?.gtm,ga4:e.analytics?.ga4,amplitude:void 0,mixpanel:void 0,hotjar:void 0,koala:void 0,logrocket:void 0,pirsch:void 0,plausible:void 0,fathom:void 0,clearbit:void 0,heap:void 0},integrations:B!=null?{intercom:B.intercom??void 0}:void 0,css:Pe,js:ct,aiChatConfig:M??O,agents:Y,pageActions:NKd(te,r),header:cA(e.header,r),footer:cA(e.footer,r),experimental:$}}function OKd({externalSitemaps:e,siteLocales:t,context:r}){if(e==null)return;let n=t.map(i=>i.trim().toLowerCase());for(let i of e){if(typeof i=="string"||i.locale==null)continue;let o=i.locale.trim().toLowerCase(),s=o.split(/[-_]/)[0];n.some(c=>c===o||c.split(/[-_]/)[0]===s)||r.logger.warn(`external-sitemaps: locale '${i.locale}' for ${i.url} does not match any site locale (${t.join(", ")}); this sitemap will not be indexed.`)}}function PKd(e,t){return e!=null?{dark:cA(e.dark,t),light:cA(e.light,t),height:e.height,href:e.href!=null?pn.Url(e.href):void 0,rightText:e.rightText}:void 0}function BKd(e,t){if(e!=null)if(typeof e=="string"){let r=cA(e,t);return{dark:r,light:r}}else{let r=cA(e.dark,t),n=cA(e.light,t);return{dark:r,light:n}}}async function RKd(e,t){if(e==null)return;let r=typeof e=="string"?[e]:e;return{inline:await Promise.all(r.map(async n=>(await(0,pme.readFile)(cA(n,t))).toString()))}}function DKd(e){return Object.hasOwn(e,"url")}function kKd(e){return Object.hasOwn(e,"path")}async function FKd(e,t){let r=[],n=[];if(e==null)return{files:[]};let i=Array.isArray(e)?e:[e];for(let o of i)typeof o=="string"?n.push({absolutePath:cA(o,t)}):DKd(o)?r.push({strategy:o.strategy,url:pn.Url(o.url),disableSri:o.disableSri}):kKd(o)&&n.push({absolutePath:cA(o.path,t),strategy:o.strategy});return{remote:r,files:n}}function NKd(e,t){return e==null?void 0:{default:e.default!=null?zKd(e.default):void 0,options:{askAi:e.options?.askAi??!0,copyPage:e.options?.copyPage??!0,viewAsMarkdown:e.options?.viewAsMarkdown??!0,openAi:e.options?.chatgpt??!0,claude:e.options?.claude??!0,cursor:e.options?.cursor??!0,claudeCode:e.options?.claudeCode??!0,mcp:e.options?.mcp??!0,vscode:e.options?.vscode??!1,custom:(e.options?.custom??[]).map(n=>QKd(n,t)),skills:jKd(e.options?.skills)}}}function jKd(e){if(e!=null)return{title:e.title,description:e.description,learnMoreUrl:e.learnMoreUrl,repository:e.repository,installCommand:e.installCommand,skills:e.skills?.map(t=>({name:t.name,description:t.description,url:t.url}))}}function zKd(e){switch(e){case"copy-page":return"copyPage";case"view-as-markdown":return"viewAsMarkdown";case"ask-ai":return"askAi";case"chatgpt":return"openAi";case"claude":return"claude";case"cursor":return"cursor";case"claude-code":return"claudeCode";case"vscode":return"vscode";default:ve(e)}}function QKd(e,t){return{title:e.title,subtitle:e.subtitle,url:e.url,icon:aE(e.icon,t),default:e.default}}function MKd(e){if(e==null)return;let t;if(e.tabs!=null&&typeof e.tabs=="object"){let r=e.tabs;t={style:r.style??"default",alignment:r.alignment,placement:r.placement}}else t=e.tabs??"default";return{sidebar:e.sidebar??"default",tabs:t,body:e.body??"default",pageActions:e.pageActions??"default",footerNav:e.footerNav??"default",languageSwitcher:e.languageSwitcher??"default",productSwitcher:e.productSwitcher??"default",siteSwitcher:e.siteSwitcher}}function LKd(e,t){if(e==null)return;if(e.embedding!=null){let i=sc.getEmbeddingOriginErrors(e.embedding.allowedOrigins);i.length>0&&t.failAndThrow(i.join(`
|
|
478
|
-
`))}let r=(e.search?.defaultFilterByCurrentProduct??!1)||(e.defaultSearchFilters??!1),n=e.search?.prioritizeCurrentProduct??!1;return{darkModeCode:e.darkModeCode??!1,defaultSearchFilters:r,search:{prioritizeCurrentProduct:n,defaultFilterByCurrentProduct:r,externalSitemaps:void 0},language:e.language??"en",disableSearch:e.disableSearch??!1,hide404Page:e.hide404Page??!1,httpSnippets:e.httpSnippets??!0,searchText:e.searchText??void 0,useJavascriptAsTypescript:e.useJavascriptAsTypescript??!1,disableExplorerProxy:e.disableExplorerProxy??!1,disableEnvironmentEditing:e.disableEnvironmentEditing??!1,disableAnalytics:e.disableAnalytics??!1,websocketOneofDisplay:e.websocketOneofDisplay??void 0,embedding:e.embedding,showHeadersInExamples:e.showHeadersInExamples??!1}}async function qDo({rawPath:e,absoluteFilepathToDocsConfig:t}){if(e==null)return;let r=cA(e,t);return await(0,pme.readFile)(r,"utf8"),r}async function _Kd({rawPath:e,absoluteFilepathToDocsConfig:t,context:r}){if(e==null)return;let n=cA(e,t),i=await(0,pme.readFile)(n,"utf8");try{JSON.parse(i)}catch(o){r.failAndThrow(`Invalid JSON in Context7 config file: ${e}`,o instanceof Error?o.message:String(o),{code:S.Code.ConfigError})}return n}function UKd(e,t,r){if(e==null&&t==null&&r==null)return;let n=t==="center"?"CENTER":"LEFT",i=r==="header"?"HEADER":r==="sidebar"?"SIDEBAR":void 0;return e==null?{...i!=null?{tabsPlacement:i}:{},tabsAlignment:n}:{pageWidth:e.pageWidth?.trim().toLowerCase()==="full"?{type:"full"}:V8r(e.pageWidth),contentWidth:V8r(e.contentWidth),sidebarWidth:V8r(e.sidebarWidth),headerHeight:V8r(e.headerHeight),searchbarPlacement:e.searchbarPlacement==="header"?"HEADER":e.searchbarPlacement==="header-tabs"?"HEADER_TABS":"SIDEBAR",switcherPlacement:!e.switcherPlacement||e.switcherPlacement==="header"?"HEADER":"SIDEBAR",tabsPlacement:i??(e.tabsPlacement==="header"?"HEADER":"SIDEBAR"),contentAlignment:e.contentAlignment==="left"?"LEFT":"CENTER",headerPosition:e.headerPosition==="static"?"ABSOLUTE":"FIXED",disableHeader:e.disableHeader??!1,hideNavLinks:e.hideNavLinks??!1,hideFeedback:e.hideFeedback??!1,mobileToc:e.mobileToc??!1,changelogLayout:e.changelogLayout,apiReferenceLayout:e.apiReferenceLayout,apiReferenceExpandProperties:e.apiReferenceExpandProperties,showNavAvailabilityBadges:e.showNavAvailabilityBadges,breadcrumbs:e.breadcrumbs!=null?{currentPage:e.breadcrumbs.currentPage??!1}:void 0,tabsAlignment:n}}function V8r(e){if(e==null)return;let t=e.trim().toLowerCase(),r=t.match(/^(\d+)px$/);if(r!=null&&r[1]!=null)return{type:"px",value:parseFloat(r[1])};let n=t.match(/^(\d+)rem$/);if(n!=null&&n[1]!=null)return{type:"rem",value:parseFloat(n[1])}}async function VKd({version:e,absolutePathToFernFolder:t,context:r,folderTitleSource:n}){if(e.path==null)throw new S({message:`Version '${e.displayName}' must specify a 'path' or 'ref'.`,code:S.Code.ConfigError});let i=Zn(t,be.of(e.path)),o;try{o=Ir.load((await(0,pme.readFile)(i)).toString())}catch(l){throw l instanceof Ir.YAMLException?new S({message:`Failed to parse version file ${e.path}: ${l.message}`,code:S.Code.ParseError}):l}let s=[],a=_P(o,[],s);s.length>0&&r.logger.warn(`Version file ${e.path} contained null/undefined sections that were ignored: ${s.map(l=>l.join(".")).join(", ")}`);let c=sc.RawSchemas.Serializer.VersionFileConfig.parseOrThrow(a),u=await W8r({tabs:c.tabs,rawNavigationConfig:c.navigation,absolutePathToFernFolder:t,absolutePathToConfig:i,context:r,folderTitleSource:n});return{landingPage:Kst(c.landingPage,i),version:e.displayName,navigation:u,availability:e.availability,slug:e.slug,hidden:e.hidden,viewers:kS(e.viewers),orphaned:e.orphaned,featureFlags:DS(e.featureFlag),announcement:e.announcement,contentSource:void 0}}async function GKd({version:e,ref:t,absolutePathToFernFolder:r,context:n,folderTitleSource:i}){let o=await iiu({ref:t,absolutePathToFernFolder:r,context:n}),s=await ciu({materialized:o,context:n}),a=await W8r({tabs:s.tabs,rawNavigationConfig:s.navigation,absolutePathToFernFolder:o.absolutePathToFernFolder,absolutePathToConfig:s.absoluteFilepathToConfig,context:n,folderTitleSource:i});return{landingPage:Kst(s.landingPage,s.absoluteFilepathToConfig),version:e.displayName,navigation:a,availability:e.availability,slug:e.slug,hidden:e.hidden,viewers:kS(e.viewers),orphaned:e.orphaned,featureFlags:DS(e.featureFlag),announcement:e.announcement,contentSource:{displayVersion:e.displayName,ref:o.ref,sha:o.sha,absolutePathToFernFolder:o.absolutePathToFernFolder,libraries:Hiu(s.rawLibraries)}}}async function _iu({versions:e,absolutePathToFernFolder:t,context:r,folderTitleSource:n,buildRefVersions:i=!0}){let o=[];for(let s of e){let a=B_t(s);if(a==null){o.push(await VKd({version:s,absolutePathToFernFolder:t,context:r,folderTitleSource:n}));continue}if(s.path!=null)throw new S({message:`Version '${s.displayName}' declares both 'ref' and 'path'. A git-ref-backed version builds its content from the ref, so 'path' is not used. Remove 'path' to build from the ref, or remove 'ref' to build from the working tree.`,code:S.Code.ConfigError});if(!i){r.logger.debug(`Skipping git-ref-backed version '${s.displayName}' (ref '${a}').`);continue}o.push(await GKd({version:s,ref:a,absolutePathToFernFolder:t,context:r,folderTitleSource:n}))}return{type:"versioned",versions:o}}async function qKd({tabs:e,products:t,rootChangelog:r,versions:n,navigation:i,absolutePathToFernFolder:o,absolutePathToConfig:s,context:a,folderTitleSource:c,buildRefVersions:u=!0}){if(r!=null&&t==null)throw new S({message:"A top-level `changelog` in docs.yml is only supported alongside `products`. For a site using `versions`, add the changelog to each version's `navigation`; otherwise add it to the top-level `navigation`.",code:S.Code.ConfigError});if(i!=null)return await W8r({tabs:e,rawNavigationConfig:i,absolutePathToFernFolder:o,absolutePathToConfig:s,context:a,folderTitleSource:c});if(t!=null){let l=[];for(let p of t){let f=p.image!=null?Zn(o,p.image):void 0;if("path"in p){let d,m=Zn(o,p.path),g;try{g=Ir.load((await(0,pme.readFile)(m)).toString())}catch(x){throw x instanceof Ir.YAMLException?new S({message:`Failed to parse product file ${p.path}: ${x.message}`,code:S.Code.ParseError}):x}let A=[],y=_P(g,[],A);A.length>0&&a.logger.warn(`Product file ${p.path} contained null/undefined sections that were ignored: ${A.map(x=>x.join(".")).join(", ")}`);let I=sc.RawSchemas.Serializer.ProductFileConfig.parseOrThrow(y);p.versions!=null&&p.versions.length>0?d=await _iu({versions:p.versions,absolutePathToFernFolder:o,context:a,folderTitleSource:c,buildRefVersions:u}):d=await W8r({tabs:I.tabs,rawNavigationConfig:I.navigation,absolutePathToFernFolder:o,absolutePathToConfig:m,context:a,folderTitleSource:c}),l.push({type:"internal",landingPage:Kst(I.landingPage,m),product:p.displayName,navigation:d,slug:p.slug,subtitle:p.subtitle,icon:aE(p.icon,s)||"fa-solid fa-code",image:f,viewers:kS(p.viewers),orphaned:p.orphaned,featureFlags:DS(p.featureFlag),announcement:p.announcement})}else if("href"in p&&p.href!=null)l.push({type:"external",product:p.displayName,href:p.href,target:p.target,subtitle:p.subtitle,icon:aE(p.icon,s)||"fa-solid fa-code",image:f,viewers:kS(p.viewers),orphaned:p.orphaned,featureFlags:DS(p.featureFlag)});else throw new S({message:"Invalid product configuration: product must have either 'path' or valid 'href' property",code:S.Code.ConfigError})}return{type:"productgroup",products:l,changelog:r!=null?await Wiu({rawConfig:r,absolutePathToConfig:s}):void 0}}else if(n!=null)return await _iu({versions:n,absolutePathToFernFolder:o,context:a,folderTitleSource:c,buildRefVersions:u});throw new S({message:"Unexpected. Docs have neither navigation or versions defined.",code:S.Code.ConfigError})}function DS(e){if(e!=null)return typeof e=="string"?[{flag:e,match:!0,fallbackValue:void 0}]:Array.isArray(e)?e.map(t=>({flag:t.flag,match:t.match,fallbackValue:t.fallbackValue})):[{flag:e.flag,match:e.match??!0,fallbackValue:e.fallbackValue}]}async function WKd({rawTypography:e,absoluteFilepathToDocsConfig:t}){return{headingsFont:e.headingsFont!=null?await WDo({rawFontConfig:e.headingsFont,absoluteFilepathToDocsConfig:t}):void 0,bodyFont:e.bodyFont!=null?await WDo({rawFontConfig:e.bodyFont,absoluteFilepathToDocsConfig:t}):void 0,codeFont:e.codeFont!=null?await WDo({rawFontConfig:e.codeFont,absoluteFilepathToDocsConfig:t}):void 0}}async function WDo({rawFontConfig:e,absoluteFilepathToDocsConfig:t}){return{name:e.name,variants:await HKd(e,t),display:e.display,fallback:e.fallback,fontVariationSettings:e.fontVariationSettings}}function HKd(e,t){let r=[];return e.path!=null&&r.push({path:e.path,weight:e.weight,style:e.style}),e.paths?.forEach(n=>{typeof n=="string"?r.push({path:n,weight:e.weight,style:e.style}):r.push({path:n.path,weight:n.weight??e.weight,style:n.style??e.style})}),Promise.all(r.map(async n=>({absolutePath:cA(n.path,t),weight:KKd(n.weight),style:n.style})))}function KKd(e){return e==null?void 0:typeof e=="number"?[e.toString()]:e.split(/\D+/).filter(r=>r!==""&&["100","200","300","400","500","600","700","800","900"].includes(r))}async function JKd({tabs:e,item:t,absolutePathToFernFolder:r,absolutePathToConfig:n,context:i,folderTitleSource:o}){let s=e[t.tab];if(s==null)throw new S({message:`Tab ${t.tab} is not defined in the tabs config.`,code:S.Code.ConfigError});if(dJd(t)){let c=await Promise.all(t.variants.map(async u=>{let l=await Promise.all(u.layout.map(p=>H8r({rawConfig:p,absolutePathToFernFolder:r,absolutePathToConfig:n,context:i,folderTitleSource:o})));return{title:u.title,subtitle:u.subtitle,icon:aE(u.icon,n),layout:l,slug:u.slug,skipUrlSlug:u.skipSlug,hidden:u.hidden,default:u.default,viewers:kS(u.viewers),orphaned:u.orphaned,featureFlags:DS(u.featureFlag)}}));return{title:s.displayName,icon:aE(s.icon,n),slug:s.slug,skipUrlSlug:s.skipSlug,hidden:s.hidden,child:{type:"variants",variants:c},viewers:kS(s.viewers),orphaned:s.orphaned,featureFlags:DS(s.featureFlag)}}if(fJd(t)){let c=await Promise.all(t.layout.map(u=>H8r({rawConfig:u,absolutePathToFernFolder:r,absolutePathToConfig:n,context:i,folderTitleSource:o})));return{title:s.displayName,icon:aE(s.icon,n),slug:s.slug,skipUrlSlug:s.skipSlug,hidden:s.hidden,child:{type:"layout",layout:c},viewers:kS(s.viewers),orphaned:s.orphaned,featureFlags:DS(s.featureFlag)}}if(s.href!=null)return{title:s.displayName,icon:aE(s.icon,n),slug:s.slug,skipUrlSlug:s.skipSlug,hidden:s.hidden,child:{type:"link",href:s.href,target:s.target},viewers:kS(s.viewers),orphaned:s.orphaned,featureFlags:DS(s.featureFlag)};let a=sc.getChangelogFolderFromTabConfig(s);if(a!=null)return{title:s.displayName,icon:aE(s.icon,n),slug:s.slug,skipUrlSlug:s.skipSlug,hidden:s.hidden,child:{type:"changelog",changelog:await _1(cA(a,n),"{md,mdx}")},viewers:kS(s.viewers),orphaned:s.orphaned,featureFlags:DS(s.featureFlag)};ve(s)}async function W8r({tabs:e={},rawNavigationConfig:t,absolutePathToFernFolder:r,absolutePathToConfig:n,context:i,folderTitleSource:o}){return pJd(t)?{type:"tabbed",items:await Promise.all(t.map(a=>JKd({tabs:e,item:a,absolutePathToFernFolder:r,absolutePathToConfig:n,context:i,folderTitleSource:o})))}:{type:"untabbed",items:await Promise.all(t.map(s=>H8r({rawConfig:s,absolutePathToFernFolder:r,absolutePathToConfig:n,context:i,folderTitleSource:o})))}}async function XKd({rawConfig:e,absolutePathToFernFolder:t,absolutePathToConfig:r,context:n,folderTitleSource:i}){let o=cA(e.folder,r);await Wt(o)||n.failAndThrow(`Folder not found: ${e.folder}`,void 0,{code:S.Code.ConfigError}),KDo({context:n,sectionTitle:e.folder,collapsed:e.collapsed??void 0,collapsible:e.collapsible??void 0,collapsedByDefault:e.collapsedByDefault??void 0});let s=e.titleSource??i,a=await UDo({directoryPath:o,titleSource:s}),c=a.find(m=>m.type==="page"&&(m.slug==="index"||m.absolutePath.toLowerCase().endsWith("/index.mdx")||m.absolutePath.toLowerCase().endsWith("/index.md"))),u=c?a.filter(m=>m!==c):a,l=SK.default.basename(o),p=s==="frontmatter"&&c?.type==="page"?(await L8r({absolutePath:c.absolutePath})).title:void 0,f=e.title??p??_Do({name:l}),d=e.slug??M8r({name:l});return{type:"section",title:f,icon:aE(e.icon,r),contents:u,slug:d,collapsed:e.collapsed??void 0,collapsible:e.collapsible??void 0,collapsedByDefault:e.collapsedByDefault??void 0,hidden:e.hidden??void 0,skipUrlSlug:e.skipSlug??!1,overviewAbsolutePath:c?.type==="page"?c.absolutePath:void 0,viewers:kS(e.viewers),orphaned:e.orphaned,featureFlags:DS(e.featureFlag),availability:e.availability}}async function H8r({rawConfig:e,absolutePathToFernFolder:t,absolutePathToConfig:r,context:n,folderTitleSource:i}){let o=nJd(e);if(Giu(o))return Kst(o,r);if($Kd(o))return KDo({context:n,sectionTitle:o.section,collapsed:o.collapsed??void 0,collapsible:o.collapsible??void 0,collapsedByDefault:o.collapsedByDefault??void 0}),{type:"section",title:o.section,icon:aE(o.icon,r),contents:await Promise.all(o.contents.map(s=>H8r({rawConfig:s,absolutePathToFernFolder:t,absolutePathToConfig:r,context:n,folderTitleSource:i}))),slug:o.slug??void 0,collapsed:o.collapsed??void 0,collapsible:o.collapsible??void 0,collapsedByDefault:o.collapsedByDefault??void 0,hidden:o.hidden??void 0,skipUrlSlug:o.skipSlug??!1,overviewAbsolutePath:cA(o.path,r),viewers:kS(o.viewers),orphaned:o.orphaned,featureFlags:DS(o.featureFlag),availability:o.availability};if(eJd(o))return{type:"apiSection",openrpc:o.openrpc,title:o.api,icon:aE(o.icon,r),apiName:o.apiName??void 0,specs:o.specs?.map(s=>({type:s.type,absolutePath:cA(s.path,r),namespace:s.namespace??void 0,absoluteOverlayPaths:s.overlays==null?[]:[cA(s.overlays,r)],absoluteOverridePaths:s.overrides?.map(a=>cA(a,r))??[],settings:s.settings==null?void 0:{...s.settings,...s.settings.errorResponses==null?{}:{errorResponses:{...s.settings.errorResponses,schema:typeof s.settings.errorResponses.schema=="string"?cA(s.settings.errorResponses.schema,r):s.settings.errorResponses.schema}}}})),audiences:o.audiences!=null?{type:"select",audiences:R5t(o.audiences)??[]}:{type:"all"},availability:o.availability,showErrors:o.displayErrors??!0,tagDescriptionPages:o.tagDescriptionPages??!1,snippetsConfiguration:o.snippets!=null?ZKd({rawConfig:o.snippets}):void 0,postman:o.postman,navigation:o.layout?.flatMap(s=>q8r(s,r,n))??[],overviewAbsolutePath:cA(o.summary,r),collapsed:o.collapsed??void 0,hidden:o.hidden??void 0,slug:o.slug,skipUrlSlug:o.skipSlug??!1,flattened:o.flattened??!1,alphabetized:o.alphabetized??!1,sortByAvailability:o.sortByAvailability,paginated:o.paginated??!1,playground:o.playground,viewers:kS(o.viewers),orphaned:o.orphaned,featureFlags:DS(o.featureFlag)};if(qiu(o))return{type:"link",text:o.link,url:o.href,icon:aE(o.icon,r),target:o.target};if(tJd(o))return await Wiu({rawConfig:o,absolutePathToConfig:r});if(iJd(o))return await XKd({rawConfig:o,absolutePathToFernFolder:t,absolutePathToConfig:r,context:n,folderTitleSource:i});if(oJd(o))return{type:"librarySection",libraryName:o.library,title:o.title??void 0,slug:o.slug??void 0,viewers:kS(o.viewers),orphaned:o.orphaned,featureFlags:DS(o.featureFlag)};ve(o)}function Kst(e,t){if(e!=null)return{type:"page",title:e.page,absolutePath:cA(e.path,t),slug:e.slug,icon:aE(e.icon,t),hidden:e.hidden,noindex:e.noindex,viewers:kS(e.viewers),orphaned:e.orphaned,featureFlags:DS(e.featureFlag),availability:e.availability}}function q8r(e,t,r){return typeof e=="string"?[{type:"item",value:e}]:Giu(e)?[Kst(e,t)]:qiu(e)?[{type:"link",text:e.link,url:e.href,icon:aE(e.icon,t),target:e.target}]:aJd(e)?(r!=null&&KDo({context:r,sectionTitle:e.section,collapsed:e.collapsed??void 0,collapsible:e.collapsible??void 0,collapsedByDefault:e.collapsedByDefault??void 0}),[{type:"section",title:e.section,referencedSubpackages:e.referencedPackages??[],overviewAbsolutePath:cA(e.summary,t),contents:e.contents?.flatMap(n=>q8r(n,t,r))??[],slug:e.slug,hidden:e.hidden,skipUrlSlug:e.skipSlug,collapsed:e.collapsed??void 0,collapsible:e.collapsible??void 0,collapsedByDefault:e.collapsedByDefault??void 0,availability:e.availability,icon:aE(e.icon,t),playground:e.playground,viewers:kS(e.viewers),orphaned:e.orphaned,featureFlags:DS(e.featureFlag)}]):cJd(e)?[{type:"endpoint",endpoint:e.endpoint,title:e.title,icon:aE(e.icon,t),slug:e.slug,hidden:e.hidden,availability:e.availability,playground:e.playground,viewers:kS(e.viewers),orphaned:e.orphaned,featureFlags:DS(e.featureFlag)}]:uJd(e)?[{type:"operation",operation:e.operation,title:e.title,slug:e.slug,hidden:e.hidden,availability:e.availability,viewers:kS(e.viewers),orphaned:e.orphaned,featureFlags:DS(e.featureFlag)}]:Object.entries(e).map(([n,i])=>lJd(i)?{type:"package",title:i.title,package:n,overviewAbsolutePath:cA(i.summary,t),contents:i.contents?.flatMap(o=>q8r(o,t,r))??[],slug:i.slug,hidden:i.hidden,skipUrlSlug:i.skipSlug,icon:aE(i.icon,t),playground:i.playground,availability:i.availability,viewers:kS(i.viewers),orphaned:i.orphaned,featureFlags:DS(i.featureFlag)}:{type:"package",title:void 0,package:n,overviewAbsolutePath:void 0,contents:i.flatMap(o=>q8r(o,t,r)),hidden:!1,slug:void 0,skipUrlSlug:!1,icon:void 0,playground:void 0,availability:void 0,viewers:void 0,orphaned:void 0,featureFlags:void 0})}function ZKd({rawConfig:e}){return{python:e.python,typescript:e.typescript,go:e.go,java:e.java,ruby:e.ruby,csharp:e.csharp,php:e.php,swift:e.swift}}function Giu(e){return Di(e)&&typeof e.page=="string"&&typeof e.path=="string"}function $Kd(e){return e.section!=null}function eJd(e){return e.api!=null}function qiu(e){return sc.RawSchemas,Di(e)&&typeof e.link=="string"&&typeof e.href=="string"}function tJd(e){return Di(e)&&typeof e.changelog=="string"}async function Wiu({rawConfig:e,absolutePathToConfig:t}){return{type:"changelog",changelog:await _1(cA(e.changelog,t),"{md,mdx}"),hidden:e.hidden??!1,icon:aE(e.icon,t),title:e.title??YKd,slug:e.slug,viewers:kS(e.viewers),orphaned:e.orphaned,featureFlags:DS(e.featureFlag)}}function rJd(e){return Di(e)&&typeof e.blog=="string"}function nJd(e){if(!rJd(e))return e;let{blog:t,...r}=e;return{...r,changelog:t,title:e.title??sc.DEFAULT_BLOG_TITLE}}function iJd(e){return Di(e)&&typeof e.folder=="string"}function oJd(e){return Di(e)&&typeof e.library=="string"}function sJd(e){return"git"in e}function Hiu(e){if(e==null)return;let t={};for(let[r,n]of Object.entries(e)){let i=sJd(n.input)?{type:"git",git:n.input.git,subpath:n.input.subpath,ref:n.input.ref}:{type:"path",path:n.input.path};t[r]={input:i,output:{path:n.output.path},lang:n.lang}}return t}function aJd(e){return Di(e)&&typeof e.section=="string"&&Array.isArray(e.contents)}function cJd(e){return Di(e)&&typeof e.endpoint=="string"}function uJd(e){return Di(e)&&typeof e.operation=="string"}function lJd(e){return!Array.isArray(e)}function cA(e,t){if(e!=null)return Zn(bn(t),e)}function pJd(e){return Array.isArray(e)&&e.length>0&&e[0].tab!=null}function fJd(e){return"layout"in e&&Array.isArray(e.layout)}function dJd(e){return"variants"in e&&Array.isArray(e.variants)}function Kiu(e,t){return e?.map(r=>{if(r.type==="github"){let i=r.value;return typeof i=="string"?{type:"github",url:pn.Url(i),viewers:void 0,target:void 0}:{type:"github",url:pn.Url(i.url),viewers:HDo(i.viewers),target:i.target}}let n=HDo(r.viewers);return r.type==="dropdown"?{type:"dropdown",text:r.text,icon:aE(r.icon,t),rightIcon:aE(r.rightIcon,t),rounded:r.rounded,viewers:n,links:r.links?.map(i=>({href:i.href,target:i.target,url:pn.Url(i.url??i.href??"/"),text:i.text,icon:aE(i.icon,t),rightIcon:aE(i.rightIcon,t),rounded:i.rounded,viewers:HDo(i.viewers)}))??[]}:{type:r.type,text:r.text,url:pn.Url(r.href??r.url??"/"),target:r.target,icon:aE(r.icon,t),rightIcon:aE(r.rightIcon,t),rounded:r.rounded,viewers:n}})}function HDo(e){if(e!=null)return Array.isArray(e)?e.map(t=>pn.docs.v1.commons.RoleId(t)):[pn.docs.v1.commons.RoleId(e)]}function mJd(e){if(e==null)return;let t=[];if(Object.keys(e).forEach(r=>{let n=e[r];n!=null&&t.push({type:r,value:pn.Url(n)})}),t.length!==0)return t}async function hJd(e,t,r){if(e!=null)return gJd(e,r),{"og:site_name":e.ogSiteName,"og:title":e.ogTitle,"og:description":e.ogDescription,"og:url":e.ogUrl,"og:image":await G8r(e.ogImage,t),"og:image:width":e.ogImageWidth,"og:image:height":e.ogImageHeight,"og:locale":e.ogLocale,"og:logo":await G8r(e.ogLogo,t),"twitter:title":e.twitterTitle,"twitter:description":e.twitterDescription,"twitter:image":await G8r(e.twitterImage,t),"twitter:handle":e.twitterHandle,"twitter:site":e.twitterSite,"twitter:url":e.twitterUrl,"twitter:card":e.twitterCard,"og:dynamic":e.ogDynamic,"og:dynamic:background-image":await G8r(e.ogDynamicBackgroundImage,t),"og:dynamic:text-color":e.ogDynamicTextColor,"og:dynamic:background-color":e.ogDynamicBackgroundColor,"og:dynamic:logo-color":e.ogDynamicLogoColor,"og:dynamic:show-logo":e.ogDynamicShowLogo,"og:dynamic:show-section":e.ogDynamicShowSection,"og:dynamic:show-description":e.ogDynamicShowDescription,"og:dynamic:show-url":e.ogDynamicShowUrl,"og:dynamic:show-gradient":e.ogDynamicShowGradient,nofollow:void 0,noindex:void 0,canonicalHost:e.canonicalHost}}function gJd(e,t){let r=e.ogDynamic===!0,n=[["og:dynamic:background-image",e.ogDynamicBackgroundImage],["og:dynamic:text-color",e.ogDynamicTextColor],["og:dynamic:background-color",e.ogDynamicBackgroundColor],["og:dynamic:logo-color",e.ogDynamicLogoColor],["og:dynamic:show-logo",e.ogDynamicShowLogo],["og:dynamic:show-section",e.ogDynamicShowSection],["og:dynamic:show-description",e.ogDynamicShowDescription],["og:dynamic:show-url",e.ogDynamicShowUrl],["og:dynamic:show-gradient",e.ogDynamicShowGradient]];if(r&&e.ogImage!=null&&t.logger.warn("[metadata] `og:image` is only applied to the homepage when `og:dynamic: true`. All other pages show the dynamically generated image. Remove `og:image` to rely entirely on dynamic generation, or set `og:dynamic: false` to use `og:image` site-wide."),r&&e.twitterImage!=null&&t.logger.warn("[metadata] `twitter:image` is only applied to the homepage when `og:dynamic: true`. All other pages show the dynamically generated image."),!r){let i=n.filter(([,o])=>o!=null).map(([o])=>o);i.length>0&&t.logger.warn(`[metadata] The following settings require \`og:dynamic: true\` and will be ignored: ${i.map(o=>`\`${o}\``).join(", ")}.`)}r&&e.ogDynamicShowLogo===!1&&e.ogDynamicLogoColor!=null&&t.logger.warn("[metadata] `og:dynamic:logo-color` has no effect because `og:dynamic:show-logo: false`. Remove one or the other."),e.ogImage==null&&(e.ogImageWidth!=null||e.ogImageHeight!=null)&&t.logger.warn("[metadata] `og:image:width` / `og:image:height` have no effect without `og:image`."),r&&typeof e.ogDynamicTextColor=="string"&&typeof e.ogDynamicBackgroundColor=="string"&&e.ogDynamicTextColor.trim().toLowerCase()===e.ogDynamicBackgroundColor.trim().toLowerCase()&&t.logger.warn(`[metadata] \`og:dynamic:text-color\` and \`og:dynamic:background-color\` are both set to \`${e.ogDynamicTextColor}\`, which will make text invisible in generated OG images.`)}async function G8r(e,t){if(e==null)return;if(e.startsWith("http"))return{type:"url",value:e};let r=cA(e,t);return await Wt(r)?{type:"filepath",value:r}:{type:"url",value:e}}function kS(e){if(e!=null){if(typeof e=="string")return[pn.docs.v1.commons.RoleId(e)];if(e.length!==0)return e.map(pn.docs.v1.commons.RoleId)}}function R5t(e){if(e!=null){if(typeof e=="string")return[e];if(e.length!==0)return e}}function KDo({context:e,sectionTitle:t,collapsed:r,collapsible:n,collapsedByDefault:i}){n!=null&&r!=null&&e.failAndThrow(`Section "${t}": cannot use both "collapsible" and the deprecated "collapsed" property. Please use "collapsible" and "collapsed-by-default" instead.`,void 0,{code:S.Code.ConfigError}),i!=null&&n!==!0&&e.failAndThrow(`Section "${t}": "collapsed-by-default" requires "collapsible: true". "collapsed-by-default" has no effect on a non-collapsible section.`,void 0,{code:S.Code.ConfigError})}async function AJd({translations:e,defaultLocale:t,pages:r,absolutePathToFernFolder:n,context:i}){if(e==null||e.length===0)return;let o=SK.default.join(n,"translations"),s={},a=e.map(c=>sc.DocsYmlSchemas.normalizeTranslationConfig(c));return await Promise.all(a.map(async({lang:c})=>{if(c===t)return;let u=SK.default.join(o,c);if(!await Wt(u)){i.failAndThrow(`Translation directory for locale "${c}" not found.
|
|
478
|
+
`))}let r=(e.search?.defaultFilterByCurrentProduct??!1)||(e.defaultSearchFilters??!1),n=e.search?.prioritizeCurrentProduct??!1;return{darkModeCode:e.darkModeCode??!1,defaultSearchFilters:r,search:{prioritizeCurrentProduct:n,defaultFilterByCurrentProduct:r,externalSitemaps:void 0},language:e.language??"en",disableSearch:e.disableSearch??!1,hide404Page:e.hide404Page??!1,httpSnippets:e.httpSnippets??!0,searchText:e.searchText??void 0,useJavascriptAsTypescript:e.useJavascriptAsTypescript??!1,disableExplorerProxy:e.disableExplorerProxy??!1,disableEnvironmentEditing:e.disableEnvironmentEditing??!1,disableAnalytics:e.disableAnalytics??!1,websocketOneofDisplay:e.websocketOneofDisplay??void 0,embedding:e.embedding,showHeadersInExamples:e.showHeadersInExamples??!1}}async function qDo({rawPath:e,absoluteFilepathToDocsConfig:t}){if(e==null)return;let r=cA(e,t);return await(0,pme.readFile)(r,"utf8"),r}async function _Kd({rawPath:e,absoluteFilepathToDocsConfig:t,context:r}){if(e==null)return;let n=cA(e,t),i=await(0,pme.readFile)(n,"utf8");try{JSON.parse(i)}catch(o){r.failAndThrow(`Invalid JSON in Context7 config file: ${e}`,o instanceof Error?o.message:String(o),{code:S.Code.ConfigError})}return n}function UKd(e,t,r){if(e==null&&t==null&&r==null)return;let n=t==="center"?"CENTER":"LEFT",i=r==="header"?"HEADER":r==="sidebar"?"SIDEBAR":void 0;return e==null?{...i!=null?{tabsPlacement:i}:{},tabsAlignment:n}:{pageWidth:e.pageWidth?.trim().toLowerCase()==="full"?{type:"full"}:V8r(e.pageWidth),contentWidth:V8r(e.contentWidth),sidebarWidth:V8r(e.sidebarWidth),headerHeight:V8r(e.headerHeight),searchbarPlacement:e.searchbarPlacement==="header"?"HEADER":e.searchbarPlacement==="header-tabs"?"HEADER_TABS":"SIDEBAR",switcherPlacement:!e.switcherPlacement||e.switcherPlacement==="header"?"HEADER":"SIDEBAR",tabsPlacement:i??(e.tabsPlacement==="header"?"HEADER":"SIDEBAR"),contentAlignment:e.contentAlignment==="left"?"LEFT":"CENTER",headerPosition:e.headerPosition==="static"?"ABSOLUTE":"FIXED",disableHeader:e.disableHeader??!1,hideNavLinks:e.hideNavLinks??!1,hideFeedback:e.hideFeedback??!1,mobileToc:e.mobileToc??!1,changelogLayout:e.changelogLayout,apiReferenceLayout:e.apiReferenceLayout,apiReferenceExpandProperties:e.apiReferenceExpandProperties,showNavAvailabilityBadges:e.showNavAvailabilityBadges,hideWebhookMethodBadges:e.hideWebhookMethodBadges,breadcrumbs:e.breadcrumbs!=null?{currentPage:e.breadcrumbs.currentPage??!1}:void 0,tabsAlignment:n}}function V8r(e){if(e==null)return;let t=e.trim().toLowerCase(),r=t.match(/^(\d+)px$/);if(r!=null&&r[1]!=null)return{type:"px",value:parseFloat(r[1])};let n=t.match(/^(\d+)rem$/);if(n!=null&&n[1]!=null)return{type:"rem",value:parseFloat(n[1])}}async function VKd({version:e,absolutePathToFernFolder:t,context:r,folderTitleSource:n}){if(e.path==null)throw new S({message:`Version '${e.displayName}' must specify a 'path' or 'ref'.`,code:S.Code.ConfigError});let i=Zn(t,be.of(e.path)),o;try{o=Ir.load((await(0,pme.readFile)(i)).toString())}catch(l){throw l instanceof Ir.YAMLException?new S({message:`Failed to parse version file ${e.path}: ${l.message}`,code:S.Code.ParseError}):l}let s=[],a=_P(o,[],s);s.length>0&&r.logger.warn(`Version file ${e.path} contained null/undefined sections that were ignored: ${s.map(l=>l.join(".")).join(", ")}`);let c=sc.RawSchemas.Serializer.VersionFileConfig.parseOrThrow(a),u=await W8r({tabs:c.tabs,rawNavigationConfig:c.navigation,absolutePathToFernFolder:t,absolutePathToConfig:i,context:r,folderTitleSource:n});return{landingPage:Kst(c.landingPage,i),version:e.displayName,navigation:u,availability:e.availability,slug:e.slug,hidden:e.hidden,viewers:kS(e.viewers),orphaned:e.orphaned,featureFlags:DS(e.featureFlag),announcement:e.announcement,contentSource:void 0}}async function GKd({version:e,ref:t,absolutePathToFernFolder:r,context:n,folderTitleSource:i}){let o=await iiu({ref:t,absolutePathToFernFolder:r,context:n}),s=await ciu({materialized:o,context:n}),a=await W8r({tabs:s.tabs,rawNavigationConfig:s.navigation,absolutePathToFernFolder:o.absolutePathToFernFolder,absolutePathToConfig:s.absoluteFilepathToConfig,context:n,folderTitleSource:i});return{landingPage:Kst(s.landingPage,s.absoluteFilepathToConfig),version:e.displayName,navigation:a,availability:e.availability,slug:e.slug,hidden:e.hidden,viewers:kS(e.viewers),orphaned:e.orphaned,featureFlags:DS(e.featureFlag),announcement:e.announcement,contentSource:{displayVersion:e.displayName,ref:o.ref,sha:o.sha,absolutePathToFernFolder:o.absolutePathToFernFolder,libraries:Hiu(s.rawLibraries)}}}async function _iu({versions:e,absolutePathToFernFolder:t,context:r,folderTitleSource:n,buildRefVersions:i=!0}){let o=[];for(let s of e){let a=B_t(s);if(a==null){o.push(await VKd({version:s,absolutePathToFernFolder:t,context:r,folderTitleSource:n}));continue}if(s.path!=null)throw new S({message:`Version '${s.displayName}' declares both 'ref' and 'path'. A git-ref-backed version builds its content from the ref, so 'path' is not used. Remove 'path' to build from the ref, or remove 'ref' to build from the working tree.`,code:S.Code.ConfigError});if(!i){r.logger.debug(`Skipping git-ref-backed version '${s.displayName}' (ref '${a}').`);continue}o.push(await GKd({version:s,ref:a,absolutePathToFernFolder:t,context:r,folderTitleSource:n}))}return{type:"versioned",versions:o}}async function qKd({tabs:e,products:t,rootChangelog:r,versions:n,navigation:i,absolutePathToFernFolder:o,absolutePathToConfig:s,context:a,folderTitleSource:c,buildRefVersions:u=!0}){if(r!=null&&t==null)throw new S({message:"A top-level `changelog` in docs.yml is only supported alongside `products`. For a site using `versions`, add the changelog to each version's `navigation`; otherwise add it to the top-level `navigation`.",code:S.Code.ConfigError});if(i!=null)return await W8r({tabs:e,rawNavigationConfig:i,absolutePathToFernFolder:o,absolutePathToConfig:s,context:a,folderTitleSource:c});if(t!=null){let l=[];for(let p of t){let f=p.image!=null?Zn(o,p.image):void 0;if("path"in p){let d,m=Zn(o,p.path),g;try{g=Ir.load((await(0,pme.readFile)(m)).toString())}catch(x){throw x instanceof Ir.YAMLException?new S({message:`Failed to parse product file ${p.path}: ${x.message}`,code:S.Code.ParseError}):x}let A=[],y=_P(g,[],A);A.length>0&&a.logger.warn(`Product file ${p.path} contained null/undefined sections that were ignored: ${A.map(x=>x.join(".")).join(", ")}`);let I=sc.RawSchemas.Serializer.ProductFileConfig.parseOrThrow(y);p.versions!=null&&p.versions.length>0?d=await _iu({versions:p.versions,absolutePathToFernFolder:o,context:a,folderTitleSource:c,buildRefVersions:u}):d=await W8r({tabs:I.tabs,rawNavigationConfig:I.navigation,absolutePathToFernFolder:o,absolutePathToConfig:m,context:a,folderTitleSource:c}),l.push({type:"internal",landingPage:Kst(I.landingPage,m),product:p.displayName,navigation:d,slug:p.slug,subtitle:p.subtitle,icon:aE(p.icon,s)||"fa-solid fa-code",image:f,viewers:kS(p.viewers),orphaned:p.orphaned,featureFlags:DS(p.featureFlag),announcement:p.announcement})}else if("href"in p&&p.href!=null)l.push({type:"external",product:p.displayName,href:p.href,target:p.target,subtitle:p.subtitle,icon:aE(p.icon,s)||"fa-solid fa-code",image:f,viewers:kS(p.viewers),orphaned:p.orphaned,featureFlags:DS(p.featureFlag)});else throw new S({message:"Invalid product configuration: product must have either 'path' or valid 'href' property",code:S.Code.ConfigError})}return{type:"productgroup",products:l,changelog:r!=null?await Wiu({rawConfig:r,absolutePathToConfig:s}):void 0}}else if(n!=null)return await _iu({versions:n,absolutePathToFernFolder:o,context:a,folderTitleSource:c,buildRefVersions:u});throw new S({message:"Unexpected. Docs have neither navigation or versions defined.",code:S.Code.ConfigError})}function DS(e){if(e!=null)return typeof e=="string"?[{flag:e,match:!0,fallbackValue:void 0}]:Array.isArray(e)?e.map(t=>({flag:t.flag,match:t.match,fallbackValue:t.fallbackValue})):[{flag:e.flag,match:e.match??!0,fallbackValue:e.fallbackValue}]}async function WKd({rawTypography:e,absoluteFilepathToDocsConfig:t}){return{headingsFont:e.headingsFont!=null?await WDo({rawFontConfig:e.headingsFont,absoluteFilepathToDocsConfig:t}):void 0,bodyFont:e.bodyFont!=null?await WDo({rawFontConfig:e.bodyFont,absoluteFilepathToDocsConfig:t}):void 0,codeFont:e.codeFont!=null?await WDo({rawFontConfig:e.codeFont,absoluteFilepathToDocsConfig:t}):void 0}}async function WDo({rawFontConfig:e,absoluteFilepathToDocsConfig:t}){return{name:e.name,variants:await HKd(e,t),display:e.display,fallback:e.fallback,fontVariationSettings:e.fontVariationSettings}}function HKd(e,t){let r=[];return e.path!=null&&r.push({path:e.path,weight:e.weight,style:e.style}),e.paths?.forEach(n=>{typeof n=="string"?r.push({path:n,weight:e.weight,style:e.style}):r.push({path:n.path,weight:n.weight??e.weight,style:n.style??e.style})}),Promise.all(r.map(async n=>({absolutePath:cA(n.path,t),weight:KKd(n.weight),style:n.style})))}function KKd(e){return e==null?void 0:typeof e=="number"?[e.toString()]:e.split(/\D+/).filter(r=>r!==""&&["100","200","300","400","500","600","700","800","900"].includes(r))}async function JKd({tabs:e,item:t,absolutePathToFernFolder:r,absolutePathToConfig:n,context:i,folderTitleSource:o}){let s=e[t.tab];if(s==null)throw new S({message:`Tab ${t.tab} is not defined in the tabs config.`,code:S.Code.ConfigError});if(dJd(t)){let c=await Promise.all(t.variants.map(async u=>{let l=await Promise.all(u.layout.map(p=>H8r({rawConfig:p,absolutePathToFernFolder:r,absolutePathToConfig:n,context:i,folderTitleSource:o})));return{title:u.title,subtitle:u.subtitle,icon:aE(u.icon,n),layout:l,slug:u.slug,skipUrlSlug:u.skipSlug,hidden:u.hidden,default:u.default,viewers:kS(u.viewers),orphaned:u.orphaned,featureFlags:DS(u.featureFlag)}}));return{title:s.displayName,icon:aE(s.icon,n),slug:s.slug,skipUrlSlug:s.skipSlug,hidden:s.hidden,child:{type:"variants",variants:c},viewers:kS(s.viewers),orphaned:s.orphaned,featureFlags:DS(s.featureFlag)}}if(fJd(t)){let c=await Promise.all(t.layout.map(u=>H8r({rawConfig:u,absolutePathToFernFolder:r,absolutePathToConfig:n,context:i,folderTitleSource:o})));return{title:s.displayName,icon:aE(s.icon,n),slug:s.slug,skipUrlSlug:s.skipSlug,hidden:s.hidden,child:{type:"layout",layout:c},viewers:kS(s.viewers),orphaned:s.orphaned,featureFlags:DS(s.featureFlag)}}if(s.href!=null)return{title:s.displayName,icon:aE(s.icon,n),slug:s.slug,skipUrlSlug:s.skipSlug,hidden:s.hidden,child:{type:"link",href:s.href,target:s.target},viewers:kS(s.viewers),orphaned:s.orphaned,featureFlags:DS(s.featureFlag)};let a=sc.getChangelogFolderFromTabConfig(s);if(a!=null)return{title:s.displayName,icon:aE(s.icon,n),slug:s.slug,skipUrlSlug:s.skipSlug,hidden:s.hidden,child:{type:"changelog",changelog:await _1(cA(a,n),"{md,mdx}")},viewers:kS(s.viewers),orphaned:s.orphaned,featureFlags:DS(s.featureFlag)};ve(s)}async function W8r({tabs:e={},rawNavigationConfig:t,absolutePathToFernFolder:r,absolutePathToConfig:n,context:i,folderTitleSource:o}){return pJd(t)?{type:"tabbed",items:await Promise.all(t.map(a=>JKd({tabs:e,item:a,absolutePathToFernFolder:r,absolutePathToConfig:n,context:i,folderTitleSource:o})))}:{type:"untabbed",items:await Promise.all(t.map(s=>H8r({rawConfig:s,absolutePathToFernFolder:r,absolutePathToConfig:n,context:i,folderTitleSource:o})))}}async function XKd({rawConfig:e,absolutePathToFernFolder:t,absolutePathToConfig:r,context:n,folderTitleSource:i}){let o=cA(e.folder,r);await Wt(o)||n.failAndThrow(`Folder not found: ${e.folder}`,void 0,{code:S.Code.ConfigError}),KDo({context:n,sectionTitle:e.folder,collapsed:e.collapsed??void 0,collapsible:e.collapsible??void 0,collapsedByDefault:e.collapsedByDefault??void 0});let s=e.titleSource??i,a=await UDo({directoryPath:o,titleSource:s}),c=a.find(m=>m.type==="page"&&(m.slug==="index"||m.absolutePath.toLowerCase().endsWith("/index.mdx")||m.absolutePath.toLowerCase().endsWith("/index.md"))),u=c?a.filter(m=>m!==c):a,l=SK.default.basename(o),p=s==="frontmatter"&&c?.type==="page"?(await L8r({absolutePath:c.absolutePath})).title:void 0,f=e.title??p??_Do({name:l}),d=e.slug??M8r({name:l});return{type:"section",title:f,icon:aE(e.icon,r),contents:u,slug:d,collapsed:e.collapsed??void 0,collapsible:e.collapsible??void 0,collapsedByDefault:e.collapsedByDefault??void 0,hidden:e.hidden??void 0,skipUrlSlug:e.skipSlug??!1,overviewAbsolutePath:c?.type==="page"?c.absolutePath:void 0,viewers:kS(e.viewers),orphaned:e.orphaned,featureFlags:DS(e.featureFlag),availability:e.availability}}async function H8r({rawConfig:e,absolutePathToFernFolder:t,absolutePathToConfig:r,context:n,folderTitleSource:i}){let o=nJd(e);if(Giu(o))return Kst(o,r);if($Kd(o))return KDo({context:n,sectionTitle:o.section,collapsed:o.collapsed??void 0,collapsible:o.collapsible??void 0,collapsedByDefault:o.collapsedByDefault??void 0}),{type:"section",title:o.section,icon:aE(o.icon,r),contents:await Promise.all(o.contents.map(s=>H8r({rawConfig:s,absolutePathToFernFolder:t,absolutePathToConfig:r,context:n,folderTitleSource:i}))),slug:o.slug??void 0,collapsed:o.collapsed??void 0,collapsible:o.collapsible??void 0,collapsedByDefault:o.collapsedByDefault??void 0,hidden:o.hidden??void 0,skipUrlSlug:o.skipSlug??!1,overviewAbsolutePath:cA(o.path,r),viewers:kS(o.viewers),orphaned:o.orphaned,featureFlags:DS(o.featureFlag),availability:o.availability};if(eJd(o))return{type:"apiSection",openrpc:o.openrpc,title:o.api,icon:aE(o.icon,r),apiName:o.apiName??void 0,specs:o.specs?.map(s=>({type:s.type,absolutePath:cA(s.path,r),namespace:s.namespace??void 0,absoluteOverlayPaths:s.overlays==null?[]:[cA(s.overlays,r)],absoluteOverridePaths:s.overrides?.map(a=>cA(a,r))??[],settings:s.settings==null?void 0:{...s.settings,...s.settings.errorResponses==null?{}:{errorResponses:{...s.settings.errorResponses,schema:typeof s.settings.errorResponses.schema=="string"?cA(s.settings.errorResponses.schema,r):s.settings.errorResponses.schema}}}})),audiences:o.audiences!=null?{type:"select",audiences:R5t(o.audiences)??[]}:{type:"all"},availability:o.availability,showErrors:o.displayErrors??!0,tagDescriptionPages:o.tagDescriptionPages??!1,snippetsConfiguration:o.snippets!=null?ZKd({rawConfig:o.snippets}):void 0,postman:o.postman,navigation:o.layout?.flatMap(s=>q8r(s,r,n))??[],overviewAbsolutePath:cA(o.summary,r),collapsed:o.collapsed??void 0,hidden:o.hidden??void 0,slug:o.slug,skipUrlSlug:o.skipSlug??!1,flattened:o.flattened??!1,alphabetized:o.alphabetized??!1,sortByAvailability:o.sortByAvailability,paginated:o.paginated??!1,playground:o.playground,viewers:kS(o.viewers),orphaned:o.orphaned,featureFlags:DS(o.featureFlag)};if(qiu(o))return{type:"link",text:o.link,url:o.href,icon:aE(o.icon,r),target:o.target};if(tJd(o))return await Wiu({rawConfig:o,absolutePathToConfig:r});if(iJd(o))return await XKd({rawConfig:o,absolutePathToFernFolder:t,absolutePathToConfig:r,context:n,folderTitleSource:i});if(oJd(o))return{type:"librarySection",libraryName:o.library,title:o.title??void 0,slug:o.slug??void 0,viewers:kS(o.viewers),orphaned:o.orphaned,featureFlags:DS(o.featureFlag)};ve(o)}function Kst(e,t){if(e!=null)return{type:"page",title:e.page,absolutePath:cA(e.path,t),slug:e.slug,icon:aE(e.icon,t),hidden:e.hidden,noindex:e.noindex,viewers:kS(e.viewers),orphaned:e.orphaned,featureFlags:DS(e.featureFlag),availability:e.availability}}function q8r(e,t,r){return typeof e=="string"?[{type:"item",value:e}]:Giu(e)?[Kst(e,t)]:qiu(e)?[{type:"link",text:e.link,url:e.href,icon:aE(e.icon,t),target:e.target}]:aJd(e)?(r!=null&&KDo({context:r,sectionTitle:e.section,collapsed:e.collapsed??void 0,collapsible:e.collapsible??void 0,collapsedByDefault:e.collapsedByDefault??void 0}),[{type:"section",title:e.section,referencedSubpackages:e.referencedPackages??[],overviewAbsolutePath:cA(e.summary,t),contents:e.contents?.flatMap(n=>q8r(n,t,r))??[],slug:e.slug,hidden:e.hidden,skipUrlSlug:e.skipSlug,collapsed:e.collapsed??void 0,collapsible:e.collapsible??void 0,collapsedByDefault:e.collapsedByDefault??void 0,availability:e.availability,icon:aE(e.icon,t),playground:e.playground,viewers:kS(e.viewers),orphaned:e.orphaned,featureFlags:DS(e.featureFlag)}]):cJd(e)?[{type:"endpoint",endpoint:e.endpoint,title:e.title,icon:aE(e.icon,t),slug:e.slug,hidden:e.hidden,availability:e.availability,playground:e.playground,viewers:kS(e.viewers),orphaned:e.orphaned,featureFlags:DS(e.featureFlag)}]:uJd(e)?[{type:"operation",operation:e.operation,title:e.title,slug:e.slug,hidden:e.hidden,availability:e.availability,viewers:kS(e.viewers),orphaned:e.orphaned,featureFlags:DS(e.featureFlag)}]:Object.entries(e).map(([n,i])=>lJd(i)?{type:"package",title:i.title,package:n,overviewAbsolutePath:cA(i.summary,t),contents:i.contents?.flatMap(o=>q8r(o,t,r))??[],slug:i.slug,hidden:i.hidden,skipUrlSlug:i.skipSlug,icon:aE(i.icon,t),playground:i.playground,availability:i.availability,viewers:kS(i.viewers),orphaned:i.orphaned,featureFlags:DS(i.featureFlag)}:{type:"package",title:void 0,package:n,overviewAbsolutePath:void 0,contents:i.flatMap(o=>q8r(o,t,r)),hidden:!1,slug:void 0,skipUrlSlug:!1,icon:void 0,playground:void 0,availability:void 0,viewers:void 0,orphaned:void 0,featureFlags:void 0})}function ZKd({rawConfig:e}){return{python:e.python,typescript:e.typescript,go:e.go,java:e.java,ruby:e.ruby,csharp:e.csharp,php:e.php,swift:e.swift}}function Giu(e){return Di(e)&&typeof e.page=="string"&&typeof e.path=="string"}function $Kd(e){return e.section!=null}function eJd(e){return e.api!=null}function qiu(e){return sc.RawSchemas,Di(e)&&typeof e.link=="string"&&typeof e.href=="string"}function tJd(e){return Di(e)&&typeof e.changelog=="string"}async function Wiu({rawConfig:e,absolutePathToConfig:t}){return{type:"changelog",changelog:await _1(cA(e.changelog,t),"{md,mdx}"),hidden:e.hidden??!1,icon:aE(e.icon,t),title:e.title??YKd,slug:e.slug,viewers:kS(e.viewers),orphaned:e.orphaned,featureFlags:DS(e.featureFlag)}}function rJd(e){return Di(e)&&typeof e.blog=="string"}function nJd(e){if(!rJd(e))return e;let{blog:t,...r}=e;return{...r,changelog:t,title:e.title??sc.DEFAULT_BLOG_TITLE}}function iJd(e){return Di(e)&&typeof e.folder=="string"}function oJd(e){return Di(e)&&typeof e.library=="string"}function sJd(e){return"git"in e}function Hiu(e){if(e==null)return;let t={};for(let[r,n]of Object.entries(e)){let i=sJd(n.input)?{type:"git",git:n.input.git,subpath:n.input.subpath,ref:n.input.ref}:{type:"path",path:n.input.path};t[r]={input:i,output:{path:n.output.path},lang:n.lang}}return t}function aJd(e){return Di(e)&&typeof e.section=="string"&&Array.isArray(e.contents)}function cJd(e){return Di(e)&&typeof e.endpoint=="string"}function uJd(e){return Di(e)&&typeof e.operation=="string"}function lJd(e){return!Array.isArray(e)}function cA(e,t){if(e!=null)return Zn(bn(t),e)}function pJd(e){return Array.isArray(e)&&e.length>0&&e[0].tab!=null}function fJd(e){return"layout"in e&&Array.isArray(e.layout)}function dJd(e){return"variants"in e&&Array.isArray(e.variants)}function Kiu(e,t){return e?.map(r=>{if(r.type==="github"){let i=r.value;return typeof i=="string"?{type:"github",url:pn.Url(i),viewers:void 0,target:void 0}:{type:"github",url:pn.Url(i.url),viewers:HDo(i.viewers),target:i.target}}let n=HDo(r.viewers);return r.type==="dropdown"?{type:"dropdown",text:r.text,icon:aE(r.icon,t),rightIcon:aE(r.rightIcon,t),rounded:r.rounded,viewers:n,links:r.links?.map(i=>({href:i.href,target:i.target,url:pn.Url(i.url??i.href??"/"),text:i.text,icon:aE(i.icon,t),rightIcon:aE(i.rightIcon,t),rounded:i.rounded,viewers:HDo(i.viewers)}))??[]}:{type:r.type,text:r.text,url:pn.Url(r.href??r.url??"/"),target:r.target,icon:aE(r.icon,t),rightIcon:aE(r.rightIcon,t),rounded:r.rounded,viewers:n}})}function HDo(e){if(e!=null)return Array.isArray(e)?e.map(t=>pn.docs.v1.commons.RoleId(t)):[pn.docs.v1.commons.RoleId(e)]}function mJd(e){if(e==null)return;let t=[];if(Object.keys(e).forEach(r=>{let n=e[r];n!=null&&t.push({type:r,value:pn.Url(n)})}),t.length!==0)return t}async function hJd(e,t,r){if(e!=null)return gJd(e,r),{"og:site_name":e.ogSiteName,"og:title":e.ogTitle,"og:description":e.ogDescription,"og:url":e.ogUrl,"og:image":await G8r(e.ogImage,t),"og:image:width":e.ogImageWidth,"og:image:height":e.ogImageHeight,"og:locale":e.ogLocale,"og:logo":await G8r(e.ogLogo,t),"twitter:title":e.twitterTitle,"twitter:description":e.twitterDescription,"twitter:image":await G8r(e.twitterImage,t),"twitter:handle":e.twitterHandle,"twitter:site":e.twitterSite,"twitter:url":e.twitterUrl,"twitter:card":e.twitterCard,"og:dynamic":e.ogDynamic,"og:dynamic:background-image":await G8r(e.ogDynamicBackgroundImage,t),"og:dynamic:text-color":e.ogDynamicTextColor,"og:dynamic:background-color":e.ogDynamicBackgroundColor,"og:dynamic:logo-color":e.ogDynamicLogoColor,"og:dynamic:show-logo":e.ogDynamicShowLogo,"og:dynamic:show-section":e.ogDynamicShowSection,"og:dynamic:show-description":e.ogDynamicShowDescription,"og:dynamic:show-url":e.ogDynamicShowUrl,"og:dynamic:show-gradient":e.ogDynamicShowGradient,nofollow:void 0,noindex:void 0,canonicalHost:e.canonicalHost}}function gJd(e,t){let r=e.ogDynamic===!0,n=[["og:dynamic:background-image",e.ogDynamicBackgroundImage],["og:dynamic:text-color",e.ogDynamicTextColor],["og:dynamic:background-color",e.ogDynamicBackgroundColor],["og:dynamic:logo-color",e.ogDynamicLogoColor],["og:dynamic:show-logo",e.ogDynamicShowLogo],["og:dynamic:show-section",e.ogDynamicShowSection],["og:dynamic:show-description",e.ogDynamicShowDescription],["og:dynamic:show-url",e.ogDynamicShowUrl],["og:dynamic:show-gradient",e.ogDynamicShowGradient]];if(r&&e.ogImage!=null&&t.logger.warn("[metadata] `og:image` is only applied to the homepage when `og:dynamic: true`. All other pages show the dynamically generated image. Remove `og:image` to rely entirely on dynamic generation, or set `og:dynamic: false` to use `og:image` site-wide."),r&&e.twitterImage!=null&&t.logger.warn("[metadata] `twitter:image` is only applied to the homepage when `og:dynamic: true`. All other pages show the dynamically generated image."),!r){let i=n.filter(([,o])=>o!=null).map(([o])=>o);i.length>0&&t.logger.warn(`[metadata] The following settings require \`og:dynamic: true\` and will be ignored: ${i.map(o=>`\`${o}\``).join(", ")}.`)}r&&e.ogDynamicShowLogo===!1&&e.ogDynamicLogoColor!=null&&t.logger.warn("[metadata] `og:dynamic:logo-color` has no effect because `og:dynamic:show-logo: false`. Remove one or the other."),e.ogImage==null&&(e.ogImageWidth!=null||e.ogImageHeight!=null)&&t.logger.warn("[metadata] `og:image:width` / `og:image:height` have no effect without `og:image`."),r&&typeof e.ogDynamicTextColor=="string"&&typeof e.ogDynamicBackgroundColor=="string"&&e.ogDynamicTextColor.trim().toLowerCase()===e.ogDynamicBackgroundColor.trim().toLowerCase()&&t.logger.warn(`[metadata] \`og:dynamic:text-color\` and \`og:dynamic:background-color\` are both set to \`${e.ogDynamicTextColor}\`, which will make text invisible in generated OG images.`)}async function G8r(e,t){if(e==null)return;if(e.startsWith("http"))return{type:"url",value:e};let r=cA(e,t);return await Wt(r)?{type:"filepath",value:r}:{type:"url",value:e}}function kS(e){if(e!=null){if(typeof e=="string")return[pn.docs.v1.commons.RoleId(e)];if(e.length!==0)return e.map(pn.docs.v1.commons.RoleId)}}function R5t(e){if(e!=null){if(typeof e=="string")return[e];if(e.length!==0)return e}}function KDo({context:e,sectionTitle:t,collapsed:r,collapsible:n,collapsedByDefault:i}){n!=null&&r!=null&&e.failAndThrow(`Section "${t}": cannot use both "collapsible" and the deprecated "collapsed" property. Please use "collapsible" and "collapsed-by-default" instead.`,void 0,{code:S.Code.ConfigError}),i!=null&&n!==!0&&e.failAndThrow(`Section "${t}": "collapsed-by-default" requires "collapsible: true". "collapsed-by-default" has no effect on a non-collapsible section.`,void 0,{code:S.Code.ConfigError})}async function AJd({translations:e,defaultLocale:t,pages:r,absolutePathToFernFolder:n,context:i}){if(e==null||e.length===0)return;let o=SK.default.join(n,"translations"),s={},a=e.map(c=>sc.DocsYmlSchemas.normalizeTranslationConfig(c));return await Promise.all(a.map(async({lang:c})=>{if(c===t)return;let u=SK.default.join(o,c);if(!await Wt(u)){i.failAndThrow(`Translation directory for locale "${c}" not found.
|
|
479
479
|
Expected a directory at: ${u}
|
|
480
480
|
Create the directory and add translated versions of your documentation pages.
|
|
481
481
|
The directory should mirror the same relative paths referenced in your docs.yml navigation.
|
|
@@ -1729,7 +1729,7 @@ Valid options are:
|
|
|
1729
1729
|
|
|
1730
1730
|
Valid options are:
|
|
1731
1731
|
- \`{number}rem\`
|
|
1732
|
-
- \`{number}px\``},"searchbar-placement":{oneOf:[{$ref:"#/definitions/docs.SearchbarPlacement"},{type:"null"}],description:"Sets the placement of the searchbar\n\n@default: `sidebar`\n\nNote: this setting is ignored when `disable-header` is set to true."},"tabs-placement":{oneOf:[{$ref:"#/definitions/docs.TabsPlacement"},{type:"null"}],description:"Set the placement of the tabs\n\n@default: `sidebar`\n\nNote: this setting is ignored when `disable-header` is set to true."},"switcher-placement":{oneOf:[{$ref:"#/definitions/docs.SwitcherPlacement"},{type:"null"}],description:"Set the placement of the version and language switcher\n\n@default: `header`\n\nNote: this setting is ignored when `disable-header` is set to true."},"content-alignment":{oneOf:[{$ref:"#/definitions/docs.ContentAlignment"},{type:"null"}],description:'Set the alignment of the mardown content.\n\n@default: `center`\n\nSide effects:\n- When the alignment is set to `center`, the "On this page" (ToC) will be aligned to the right of the page.\n- When the alignment is set to `left`, the content will be aligned next to the right of the markdown content.'},"header-position":{oneOf:[{$ref:"#/definitions/docs.HeaderPosition"},{type:"null"}],description:"If `header-position` is set to `fixed`, the header will be fixed to the top of the viewport.\nIf `header-position` is set to `absolute`, the header will be absolute and will scroll with the content.\n\n@default: `fixed`"},"disable-header":{oneOf:[{type:"boolean"},{type:"null"}],description:"If `disable-header` is set to true, the header will not be rendered. Instead, the logo will be rendered as part of the sidebar,\nand a 1px border will separate the sidebar from the content."},"hide-nav-links":{oneOf:[{type:"boolean"},{type:"null"}],description:"If `hide-nav-links` is set to true, the navbar links will not be rendered. This can be overridden for a specific page using the frontmatter."},"hide-feedback":{oneOf:[{type:"boolean"},{type:"null"}],description:"If `hide-feedback` is set to true, the feedback button will not be rendered. This can be overridden for a specific page using the frontmatter."},"mobile-toc":{oneOf:[{type:"boolean"},{type:"null"}],description:"If `mobile-toc` is set to true, a sticky collapsible table of contents bar will be shown on mobile viewports for guide and overview layout pages."},"changelog-layout":{oneOf:[{$ref:"#/definitions/docs.ChangelogLayout"},{type:"null"}],description:"Sets which layout to use for changelog pages.\n\n@default: `timeline`\n\n- `timeline` renders the searchable timeline-of-cards layout.\n- `classic` renders the legacy stacked-entries layout with a per-page table of contents."},"api-reference-layout":{oneOf:[{$ref:"#/definitions/docs.ApiReferenceLayout"},{type:"null"}],description:"Sets how nested object fields are rendered in the API reference.\n\n@default: `indented`\n\n- `indented` renders each nested level as an indented branch with a connector line and a color-coded path breadcrumb.\n- `cards` renders each nested level as a bordered card."},"api-reference-expand-properties":{oneOf:[{type:"boolean"},{type:"null"}],description:'If `api-reference-expand-properties` is set to true, the first level of nested object\nand union fields in the API reference is expanded on page load instead of hidden behind\na "Show N properties" button. Deeper levels stay collapsed. Defaults to false.'},"show-nav-availability-badges":{oneOf:[{type:"boolean"},{type:"null"}],description:"If `show-nav-availability-badges` is set to true, availability badges (Beta, Deprecated, etc.)\nare rendered inline next to navigation items in the sidebar. Defaults to false. The page-header\navailability badge is unaffected by this setting."},breadcrumbs:{oneOf:[{$ref:"#/definitions/docs.BreadcrumbsConfig"},{type:"null"}],description:"Configures the breadcrumb trail rendered above the page title."}},additionalProperties:!1},"docs.SearchSettingsConfig":{type:"object",properties:{"prioritize-current-product":{oneOf:[{type:"boolean"},{type:"null"}],description:`If set to true, search results from the current product/version are
|
|
1732
|
+
- \`{number}px\``},"searchbar-placement":{oneOf:[{$ref:"#/definitions/docs.SearchbarPlacement"},{type:"null"}],description:"Sets the placement of the searchbar\n\n@default: `sidebar`\n\nNote: this setting is ignored when `disable-header` is set to true."},"tabs-placement":{oneOf:[{$ref:"#/definitions/docs.TabsPlacement"},{type:"null"}],description:"Set the placement of the tabs\n\n@default: `sidebar`\n\nNote: this setting is ignored when `disable-header` is set to true."},"switcher-placement":{oneOf:[{$ref:"#/definitions/docs.SwitcherPlacement"},{type:"null"}],description:"Set the placement of the version and language switcher\n\n@default: `header`\n\nNote: this setting is ignored when `disable-header` is set to true."},"content-alignment":{oneOf:[{$ref:"#/definitions/docs.ContentAlignment"},{type:"null"}],description:'Set the alignment of the mardown content.\n\n@default: `center`\n\nSide effects:\n- When the alignment is set to `center`, the "On this page" (ToC) will be aligned to the right of the page.\n- When the alignment is set to `left`, the content will be aligned next to the right of the markdown content.'},"header-position":{oneOf:[{$ref:"#/definitions/docs.HeaderPosition"},{type:"null"}],description:"If `header-position` is set to `fixed`, the header will be fixed to the top of the viewport.\nIf `header-position` is set to `absolute`, the header will be absolute and will scroll with the content.\n\n@default: `fixed`"},"disable-header":{oneOf:[{type:"boolean"},{type:"null"}],description:"If `disable-header` is set to true, the header will not be rendered. Instead, the logo will be rendered as part of the sidebar,\nand a 1px border will separate the sidebar from the content."},"hide-nav-links":{oneOf:[{type:"boolean"},{type:"null"}],description:"If `hide-nav-links` is set to true, the navbar links will not be rendered. This can be overridden for a specific page using the frontmatter."},"hide-feedback":{oneOf:[{type:"boolean"},{type:"null"}],description:"If `hide-feedback` is set to true, the feedback button will not be rendered. This can be overridden for a specific page using the frontmatter."},"mobile-toc":{oneOf:[{type:"boolean"},{type:"null"}],description:"If `mobile-toc` is set to true, a sticky collapsible table of contents bar will be shown on mobile viewports for guide and overview layout pages."},"changelog-layout":{oneOf:[{$ref:"#/definitions/docs.ChangelogLayout"},{type:"null"}],description:"Sets which layout to use for changelog pages.\n\n@default: `timeline`\n\n- `timeline` renders the searchable timeline-of-cards layout.\n- `classic` renders the legacy stacked-entries layout with a per-page table of contents."},"api-reference-layout":{oneOf:[{$ref:"#/definitions/docs.ApiReferenceLayout"},{type:"null"}],description:"Sets how nested object fields are rendered in the API reference.\n\n@default: `indented`\n\n- `indented` renders each nested level as an indented branch with a connector line and a color-coded path breadcrumb.\n- `cards` renders each nested level as a bordered card."},"api-reference-expand-properties":{oneOf:[{type:"boolean"},{type:"null"}],description:'If `api-reference-expand-properties` is set to true, the first level of nested object\nand union fields in the API reference is expanded on page load instead of hidden behind\na "Show N properties" button. Deeper levels stay collapsed. Defaults to false.'},"show-nav-availability-badges":{oneOf:[{type:"boolean"},{type:"null"}],description:"If `show-nav-availability-badges` is set to true, availability badges (Beta, Deprecated, etc.)\nare rendered inline next to navigation items in the sidebar. Defaults to false. The page-header\navailability badge is unaffected by this setting."},"hide-webhook-method-badges":{oneOf:[{type:"boolean"},{type:"null"}],description:"If `hide-webhook-method-badges` is set to true, webhook entries in the sidebar render without\nan HTTP method badge (e.g. `POST`). Defaults to false. The webhook page itself is unaffected."},breadcrumbs:{oneOf:[{$ref:"#/definitions/docs.BreadcrumbsConfig"},{type:"null"}],description:"Configures the breadcrumb trail rendered above the page title."}},additionalProperties:!1},"docs.SearchSettingsConfig":{type:"object",properties:{"prioritize-current-product":{oneOf:[{type:"boolean"},{type:"null"}],description:`If set to true, search results from the current product/version are
|
|
1733
1733
|
boosted in Algolia's ranking (via \`optionalFilters\`) without excluding
|
|
1734
1734
|
results from other products/versions.
|
|
1735
1735
|
|
|
@@ -3449,7 +3449,7 @@ ${otl.default.cursorShow}`)}releaseCursor(){this.extraLinesUnderPrompt>0&&lKo(th
|
|
|
3449
3449
|
`).length),this}updateBottomBar(t){return JWt(this.rl,1),this.rl.output.unmute(),this.clean(),this.bottomBar=t,this.render(),this.rl.output.mute(),this}writeLog(t){return this.rl.output.unmute(),this.clean(),this.rl.output.write(this.enforceLF(t.toString())),this.render(),this.rl.output.mute(),this}enforceLF(t){return/[\n\r]$/.test(t)?t:t+`
|
|
3450
3450
|
`}write(t){let r=t.split(/\n/);this.height=r.length,this.rl.setPrompt(r.at(-1)),this.rl.output.rows===0&&this.rl.output.columns===0&&zrn(this.rl,t.length+this.rl.line.length),this.rl.output.write(t)}};var im=Ae(N4(),1),xrl=Ae(SWt(),1);var gnn=Ae(N4(),1),vrl=Ae(SWt(),1),Ann=function(e,t,r){return typeof e[t]!="function"?(0,gnn.of)(e):(0,gnn.from)((0,vrl.default)(e[t])(r).then(n=>(e[t]=n,e)))};var Crl={set:(e,t="",r)=>{let n=e;t.split(".").forEach((i,o,s)=>{i==="__proto__"||i==="constructor"||(o===s.length-1?n[i]=r:(!(i in n)||typeof n[i]!="object")&&(n[i]={}),n=n[i])})},get:(e,t="",r)=>{let n=o=>String.prototype.split.call(t,o).filter(Boolean).reduce((s,a)=>s!=null?s[a]:s,e),i=n(/[,[\]]+?/)||n(/[,.[\]]+?/);return i===void 0||i===e?r:i}},Jpt=class extends JVe{constructor(t,r){super(r),this.prompts=t}run(t,r){this.answers=typeof r=="object"?{...r}:{};let n;return Array.isArray(t)?n=(0,im.from)(t):(0,im.isObservable)(t)?n=t:Object.values(t).every(i=>typeof i=="object"&&!Array.isArray(i)&&i!=null)?n=(0,im.from)(Object.entries(t).map(([i,o])=>({name:i,...o}))):n=(0,im.from)([t]),this.process=n.pipe((0,im.concatMap)(this.processQuestion.bind(this)),(0,im.publish)()),this.process.connect(),this.process.pipe((0,im.reduce)((i,o)=>(Crl.set(i,o.name,o.answer),i),this.answers)).toPromise(Promise).then(this.onCompletion.bind(this),this.onError.bind(this))}onCompletion(){return this.close(),this.answers}onError(t){return this.close(),Promise.reject(t)}processQuestion(t){return t={...t},(0,im.defer)(()=>(0,im.of)(t).pipe((0,im.concatMap)(this.setDefaultType.bind(this)),(0,im.concatMap)(this.filterIfRunnable.bind(this)),(0,im.concatMap)(()=>Ann(t,"message",this.answers)),(0,im.concatMap)(()=>Ann(t,"default",this.answers)),(0,im.concatMap)(()=>Ann(t,"choices",this.answers)),(0,im.concatMap)(this.fetchAnswer.bind(this))))}fetchAnswer(t){let r=this.prompts[t.type];return this.activePrompt=new r(t,this.rl,this.answers),(0,im.defer)(()=>(0,im.from)(this.activePrompt.run().then(n=>({name:t.name,answer:n}))))}setDefaultType(t){return this.prompts[t.type]||(t.type="input"),(0,im.defer)(()=>(0,im.of)(t))}filterIfRunnable(t){if(t.askAnswered!==!0&&Crl.get(this.answers,t.name)!==void 0)return im.EMPTY;if(t.when===!1)return im.EMPTY;if(typeof t.when!="function")return(0,im.of)(t);let{answers:r}=this;return(0,im.defer)(()=>(0,im.from)((0,xrl.default)(t.when)(r).then(n=>{if(n)return t})).pipe((0,im.filter)(n=>n!=null)))}};function wrl(e){let t=function(r,n){let i;try{i=new Jpt(t.prompts,e)}catch(s){return Promise.reject(s)}let o=i.run(r,n);return o.ui=i,o};return t.prompts={},t.registerPrompt=function(r,n){return t.prompts[r]=n,this},t.restoreDefaultPrompts=function(){this.registerPrompt("list",XWt),this.registerPrompt("input",GVe),this.registerPrompt("number",ZWt),this.registerPrompt("confirm",$Wt),this.registerPrompt("rawlist",eHt),this.registerPrompt("expand",tHt),this.registerPrompt("checkbox",rHt),this.registerPrompt("password",nHt),this.registerPrompt("editor",pHt)},t.restoreDefaultPrompts(),t}var DJo=wrl();function Prh(e,t){DJo.registerPrompt(e,t)}function Brh(){DJo.restoreDefaultPrompts()}var Rrh={prompt:DJo,ui:{BottomBar:fHt,Prompt:Jpt},createPromptModule:wrl,registerPrompt:Prh,restoreDefaultPrompts:Brh,Separator:CM},wu=Rrh;var Drh=["prod","pre-prod","beta","dev","local"];function krh(e){return Drh.some(t=>t===e)}function TJ(e="prod"){let t=e?.trim();return t!=null&&krh(t)?t:"local"}var Ypt=require("path");function Trl(){let e=Frh();return async t=>{for(let r of t)r.module=e(r.filename);return t}}function Frh(e=process.argv[1]?(0,Ypt.dirname)(process.argv[1]):process.cwd(),t=Ypt.sep==="\\"){let r=t?Srl(e):e;return n=>{if(!n)return;let i=t?Srl(n):n,{dir:o,base:s,ext:a}=Ypt.posix.parse(i);(a===".js"||a===".mjs"||a===".cjs")&&(s=s.slice(0,-1*a.length));let c=decodeURIComponent(s);o||(o=".");let u=o.lastIndexOf("/node_modules");if(u>-1)return`${o.slice(u+14).replace(/\//g,".")}:${c}`;if(o.startsWith(r)){let l=o.slice(r.length+1).replace(/\//g,".");return l?`${l}:${c}`:c}return c}}function Srl(e){return e.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}var eO={};ee(eO,{DEFAULT_EXCEPTION_STEPS_CONFIG:()=>Nnn,DOMExceptionCoercer:()=>JJo,EXCEPTION_STEP_INTERNAL_FIELDS:()=>vHt,ErrorCoercer:()=>yHt,ErrorEventCoercer:()=>YJo,ErrorPropertiesBuilder:()=>AHt,EventCoercer:()=>XJo,ExceptionStepsBuffer:()=>tYo,ObjectCoercer:()=>EHt,PrimitiveCoercer:()=>IHt,PromiseRejectionEventCoercer:()=>ZJo,ReduceableCache:()=>$Jo,StringCoercer:()=>bHt,chromeStackLineParser:()=>qJo,createDefaultStackParser:()=>KJo,createStackParser:()=>hnl,geckoStackLineParser:()=>WJo,getInjectedReleaseId:()=>Knh,getUtf8ByteLength:()=>Anl,nodeStackLineParser:()=>unl,opera10StackLineParser:()=>snl,opera11StackLineParser:()=>anl,resolveExceptionStepsConfig:()=>eYo,reverseAndStripFrames:()=>mnl,stripReservedExceptionStepFields:()=>qnh,winjsStackLineParser:()=>onl});var wM=(function(e){return e.AnonymousId="anonymous_id",e.DistinctId="distinct_id",e.Props="props",e.EnablePersonProcessing="enable_person_processing",e.PersonMode="person_mode",e.FeatureFlagDetails="feature_flag_details",e.FeatureFlags="feature_flags",e.FeatureFlagPayloads="feature_flag_payloads",e.BootstrapFeatureFlagDetails="bootstrap_feature_flag_details",e.BootstrapFeatureFlags="bootstrap_feature_flags",e.BootstrapFeatureFlagPayloads="bootstrap_feature_flag_payloads",e.OverrideFeatureFlags="override_feature_flags",e.Queue="queue",e.AiQueue="ai_queue",e.AiCaptureQueue="ai_capture_queue",e.LogsQueue="logs_queue",e.OptedOut="opted_out",e.SessionId="session_id",e.SessionStartTimestamp="session_start_timestamp",e.SessionLastTimestamp="session_timestamp",e.PersonProperties="person_properties",e.GroupProperties="group_properties",e.InstalledAppBuild="installed_app_build",e.InstalledAppVersion="installed_app_version",e.SessionReplay="session_replay",e.PushRegistered="push_registered",e.SessionReplayEventTriggerActivatedSession="session_replay_event_trigger_activated_session",e.SurveyLastSeenDate="survey_last_seen_date",e.SurveysInProgress="surveys_in_progress",e.SurveysSeen="surveys_seen",e.Surveys="surveys",e.RemoteConfig="remote_config",e.FlagsEndpointWasHit="flags_endpoint_was_hit",e.DeviceId="device_id",e})({});function JSe(e){let t=[];return JSON.stringify(e,function(r,n){if(typeof n=="bigint")return n.toString();if(!(typeof n=="function"||typeof n=="symbol")){if(n instanceof Error)return{name:n.name,message:n.message,stack:n.stack};if(n&&typeof n=="object"){for(;t.length>0&&t[t.length-1]!==this;)t.pop();if(t.includes(n))return"[Circular]";t.push(n)}return n}})??"null"}var Nrh=Array.isArray,Prl=Object.prototype,r6v=Prl.hasOwnProperty,ynn=Prl.toString,z4=Nrh||function(e){return ynn.call(e)==="[object Array]"};var dHt=e=>e===Object(e)&&!z4(e);var Phe=e=>e===void 0,ZD=e=>ynn.call(e)=="[object String]",kJo=e=>ZD(e)&&e.trim().length===0,FJo=e=>e===null,OJ=e=>Phe(e)||FJo(e),Xpt=e=>ynn.call(e)=="[object Number]"&&e===e;var Brl=e=>ynn.call(e)==="[object Boolean]";function bnn(e){return e===null||typeof e!="object"}function YVe(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function YSe(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object DOMError]":case"[object WebAssembly.Exception]":return!0;default:return krl(e,Error)}}function Rrl(e){return YVe(e,"ErrorEvent")}function Zpt(e){return"u">typeof Event&&krl(e,Event)}function Drl(e){return YVe(e,"Object")}function krl(e,t){try{return e instanceof t}catch{return!1}}var jrh=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterestbot","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],Enn=new Map,zrh=256;function Qrh(e,t){let r="";for(let n=0;n<t.length;n++){let i=t[n];r+=i.length+":"+i}return e.length+":"+e+"|"+t.length+":"+r}var Frl=function(e,t=[]){if(!e)return!1;let r=Qrh(e,t),n=Enn.get(r);if(n!==void 0)return n;let i=e.toLowerCase(),o=jrh.concat(t).some(s=>i.indexOf(s.toLowerCase())!==-1);return Enn.size>=zrh&&Enn.clear(),Enn.set(r,o),o};function mHt(e,t,r,n,i){return t>r&&(n.warn("min cannot be greater than max."),t=r),Xpt(e)?e>r?(n.warn(" cannot be greater than max: "+r+". Using max value instead."),r):e<t?(n.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(n.warn(" must be a number. using max or fallback. max: "+r+", fallback: "+i),mHt(i??r,t,r,n))}var Mrh=864e5,Lrh=1,_rh=10;function Nrl(e={}){return{refillRate:e.exceptionRateLimiterRefillRate??e.__exceptionRateLimiterRefillRate??Lrh,bucketSize:e.exceptionRateLimiterBucketSize??e.__exceptionRateLimiterBucketSize??_rh}}var Inn=class{constructor(t){this._buckets={},this._onBucketRateLimited=t._onBucketRateLimited,this._bucketSize=mHt(t.bucketSize,0,100,t._logger),this._refillRate=mHt(t.refillRate,0,this._bucketSize,t._logger),this._refillInterval=mHt(t.refillInterval,0,Mrh,t._logger)}_applyRefill(t,r){let n=r-t.lastAccess,i=Math.floor(n/this._refillInterval);if(i>0){let o=i*this._refillRate;t.tokens=Math.min(t.tokens+o,this._bucketSize),t.lastAccess=t.lastAccess+i*this._refillInterval}}consumeRateLimit(t){let r=Date.now(),n=String(t),i=this._buckets[n];return i?this._applyRefill(i,r):(i={tokens:this._bucketSize,lastAccess:r},this._buckets[n]=i),i.tokens===0?!0:(i.tokens--,i.tokens===0&&this._onBucketRateLimited?.(t),i.tokens===0)}stop(){this._buckets={}}};var vnn="0123456789abcdef",Cnn=class e{constructor(t){this.bytes=t}static ofInner(t){if(t.length===16)return new e(t);throw new TypeError("not 128-bit length")}static fromFieldsV7(t,r,n,i){if(!Number.isInteger(t)||!Number.isInteger(r)||!Number.isInteger(n)||!Number.isInteger(i)||t<0||r<0||n<0||i<0||t>0xffffffffffff||r>4095||n>1073741823||i>4294967295)throw new RangeError("invalid field value");let o=new Uint8Array(16);return o[0]=t/2**40,o[1]=t/2**32,o[2]=t/2**24,o[3]=t/2**16,o[4]=t/256,o[5]=t,o[6]=112|r>>>8,o[7]=r,o[8]=128|n>>>24,o[9]=n>>>16,o[10]=n>>>8,o[11]=n,o[12]=i>>>24,o[13]=i>>>16,o[14]=i>>>8,o[15]=i,new e(o)}static parse(t){let r;switch(t.length){case 32:r=/^[0-9a-f]{32}$/i.exec(t)?.[0];break;case 36:r=/^([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/i.exec(t)?.slice(1,6).join("");break;case 38:r=/^\{([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})\}$/i.exec(t)?.slice(1,6).join("");break;case 45:r=/^urn:uuid:([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/i.exec(t)?.slice(1,6).join("");break;default:break}if(r){let n=new Uint8Array(16);for(let i=0;i<16;i+=4){let o=parseInt(r.substring(2*i,2*i+8),16);n[i+0]=o>>>24,n[i+1]=o>>>16,n[i+2]=o>>>8,n[i+3]=o}return new e(n)}throw new SyntaxError("could not parse UUID string")}toString(){let t="";for(let r=0;r<this.bytes.length;r++)t+=vnn.charAt(this.bytes[r]>>>4),t+=vnn.charAt(15&this.bytes[r]),(r===3||r===5||r===7||r===9)&&(t+="-");return t}toHex(){let t="";for(let r=0;r<this.bytes.length;r++)t+=vnn.charAt(this.bytes[r]>>>4),t+=vnn.charAt(15&this.bytes[r]);return t}toJSON(){return this.toString()}getVariant(){let t=this.bytes[8]>>>4;if(t<0)throw new Error("unreachable");if(t<=7)return this.bytes.every(r=>r===0)?"NIL":"VAR_0";if(t<=11)return"VAR_10";if(t<=13)return"VAR_110";if(t<=15)return this.bytes.every(r=>r===255)?"MAX":"VAR_RESERVED";throw new Error("unreachable")}getVersion(){return this.getVariant()==="VAR_10"?this.bytes[6]>>>4:void 0}clone(){return new e(this.bytes.slice(0))}equals(t){return this.compareTo(t)===0}compareTo(t){for(let r=0;r<16;r++){let n=this.bytes[r]-t.bytes[r];if(n!==0)return Math.sign(n)}return 0}},NJo=class{constructor(t){this.timestamp=0,this.counter=0,this.random=t??Urh()}generate(){return this.generateOrResetCore(Date.now(),1e4)}generateOrAbort(){return this.generateOrAbortCore(Date.now(),1e4)}generateOrResetCore(t,r){let n=this.generateOrAbortCore(t,r);return n===void 0&&(this.timestamp=0,n=this.generateOrAbortCore(t,r)),n}generateOrAbortCore(t,r){if(!Number.isInteger(t)||t<1||t>0xffffffffffff)throw new RangeError("`unixTsMs` must be a 48-bit positive integer");if(r<0||r>0xffffffffffff)throw new RangeError("`rollbackAllowance` out of reasonable range");if(t>this.timestamp)this.timestamp=t,this.resetCounter();else{if(!(t+r>=this.timestamp))return;this.counter++,this.counter>4398046511103&&(this.timestamp++,this.resetCounter())}return Cnn.fromFieldsV7(this.timestamp,Math.trunc(this.counter/2**30),this.counter&2**30-1,this.random.nextUint32())}resetCounter(){this.counter=1024*this.random.nextUint32()+(1023&this.random.nextUint32())}generateV4(){let t=new Uint8Array(Uint32Array.of(this.random.nextUint32(),this.random.nextUint32(),this.random.nextUint32(),this.random.nextUint32()).buffer);return t[6]=64|t[6]>>>4,t[8]=128|t[8]>>>2,Cnn.ofInner(t)}},Urh=()=>({nextUint32:()=>65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random())>>>0}),jrl,BN=()=>Vrh().toString(),Vrh=()=>(jrl||(jrl=new NJo)).generate();var xnn=class{add(t){let r=BN(),n=++this.nextId;return this.promiseByIds[r]={id:n,promise:t},t.catch(()=>{}).finally(()=>{delete this.promiseByIds[r]}),t}async join(){let t=Object.values(this.promiseByIds).map(n=>n.promise),r=t.length;for(;r>0;)await Promise.all(t),t=Object.values(this.promiseByIds).map(n=>n.promise),r=t.length}getPromises(t=[],r=this.nextId){let n=new Set(t);return Object.values(this.promiseByIds).filter(i=>i.id<=r&&!n.has(i.promise)).map(i=>i.promise)}get maxId(){return this.nextId}get length(){return Object.keys(this.promiseByIds).length}constructor(){this.promiseByIds={},this.nextId=0}};function Grh(e=console){return{log:e.log.bind(e),warn:e.warn.bind(e),error:e.error.bind(e),debug:e.debug.bind(e)}}var zrl=(e,t,r)=>{function n(o,...s){t(()=>{let a=r[o];a(e,...s)})}return{debug:(...o)=>{n("debug",...o)},info:(...o)=>{n("log",...o)},warn:(...o)=>{n("warn",...o)},error:(...o)=>{n("error",...o)},critical:(...o)=>{r.error(e,...o)},createLogger:o=>zrl(`${e} ${o}`,t,r)}},qrh=e=>e();function Qrl(e,t=qrh){return zrl(e,t,Grh())}var eft="Mobile",Snn="iOS",$pt="Android",Vrl="Tablet",A6v=$pt+" "+Vrl;var Hrh="Apple",y6v=Hrh+" Watch",Grl="Safari",Tnn="BlackBerry",qrl="Samsung",Krh=qrl+"Browser",Jrh=qrl+" Internet",Onn="Chrome",Yrh=Onn+" OS",Xrh=Onn+" "+Snn,Wrl="Internet Explorer",Zrh=Wrl+" "+eft,QJo="Opera",b6v=QJo+" Mini",Hrl="Edge",$rh="Microsoft "+Hrl,MJo="Firefox",enh=MJo+" "+Snn,LJo="Nintendo",_Jo="PlayStation",wnn="Xbox",tnh=$pt+" "+eft,rnh=eft+" "+Grl,hHt="Windows",nnh=hHt+" Phone";var Krl="Generic",E6v=Krl+" "+eft.toLowerCase(),I6v=Krl+" "+Vrl.toLowerCase(),inh="Konqueror",onh="Oculus Browser",Mrl="Vivaldi",snh="Yandex",Lrl="Whale",anh="DuckDuckGo",cnh="Pale Moon",_rl="Waterfox",Url="Brave",Jrl="Claude",Yrl="Codex",Xrl="ChatGPT",unh="Google Search App",A0="(\\d+(\\.\\d+)?)",jJo=new RegExp("Version/"+A0),zJo=new RegExp("("+Jrl+"|"+Yrl+"|"+Xrl+")\\/"+A0);var v6v=new RegExp(wnn,"i"),C6v=new RegExp(_Jo+" \\w+","i"),x6v=new RegExp(LJo+" \\w+","i"),lnh=new RegExp(Tnn+"|PlayBook|BB10","i"),pnh={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000","5.1":"XP","5.2":"XP","6.0":"Vista","6.1":"7","6.2":"8","6.3":"8.1","6.4":"10","10.0":"10"};var w6v={[Zrh]:[new RegExp("rv:"+A0)],[$rh]:[new RegExp(Hrl+"?\\/"+A0)],[Onn]:[new RegExp("("+Onn+"|CrMo)\\/"+A0)],[Xrh]:[new RegExp("CriOS\\/"+A0)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+A0)],[Grl]:[jJo],[rnh]:[jJo],[QJo]:[new RegExp("("+QJo+"|OPR)\\/"+A0)],[MJo]:[new RegExp(MJo+"\\/"+A0)],[enh]:[new RegExp("FxiOS\\/"+A0)],[inh]:[new RegExp("Konqueror[:/]?"+A0,"i")],[Tnn]:[new RegExp(Tnn+" "+A0),jJo],[tnh]:[new RegExp("android\\s"+A0,"i")],[Jrh]:[new RegExp(Krh+"\\/"+A0)],[onh]:[new RegExp("OculusBrowser\\/"+A0)],[Mrl]:[new RegExp(Mrl+"\\/"+A0)],[snh]:[new RegExp("YaBrowser\\/"+A0)],[Lrl]:[new RegExp(Lrl+"\\/"+A0)],[Url]:[new RegExp(Url+"\\/"+A0)],[Jrl]:[zJo],[Yrl]:[zJo],[Xrl]:[zJo],[anh]:[new RegExp("(DuckDuckGo|Ddg)\\/"+A0)],[cnh]:[new RegExp("PaleMoon\\/"+A0)],[_rl]:[new RegExp(_rl+"\\/"+A0)],[unh]:[new RegExp("GSA\\/"+A0)],[Wrl]:[new RegExp("(rv:|MSIE )"+A0)],Mozilla:[new RegExp("rv:"+A0)]};var S6v=[[new RegExp(wnn+"; "+wnn+" (.*?)[);]","i"),e=>[wnn,e&&e[1]||""]],[new RegExp(LJo,"i"),[LJo,""]],[new RegExp(_Jo,"i"),[_Jo,""]],[lnh,[Tnn,""]],[new RegExp(hHt,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[nnh,""];if(new RegExp(eft).test(t)&&!/IEMobile\b/.test(t))return[hHt+" "+eft,""];let r=/Windows NT ([0-9.]+)/i.exec(t);if(r&&r[1]){let n=r[1],i=pnh[n]||"";return/arm/i.test(t)&&(i="RT"),[hHt,i]}return[hHt,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>{if(e&&e[3]){let t=[e[3],e[4],e[5]||"0"];return[Snn,t.join(".")]}return[Snn,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{let t="";return e&&e.length>=3&&(t=Phe(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+$pt+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+$pt+")","i"),e=>{if(e&&e[2]){let t=[e[2],e[3],e[4]||"0"];return[$pt,t.join(".")]}return[$pt,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{let t=["Mac OS X",""];if(e&&e[1]){let r=[e[1],e[2],e[3]||"0"];t[1]=r.join(".")}return t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[Yrh,""]],[/Linux|debian/i,["Linux",""]]];var Pnn="[Circular]",Bnn="[Truncated]",R8="[Unserializable]",Zrl="[Function]",P6v=Date.prototype.getTime,B6v=Date.prototype.toISOString;function ine(e){let t="";for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);if(n>=55296&&n<=56319){let i=e.charCodeAt(r+1);i>=56320&&i<=57343?(t+=e[r]+e[r+1],r++):t+="\uFFFD"}else t+=n>=56320&&n<=57343?"\uFFFD":e[r]}return t}function Bhe(e,t){if(!t)return e;let r=[];try{r=Object.keys(t)}catch{r=[]}for(let n of r){let i;try{i=t[n]}catch{i=R8}Object.defineProperty(e,n,{value:i,enumerable:!0,writable:!0,configurable:!0})}return e}function UJo(e,t=Date.now()){if(typeof e!="string"||!e)return;let r=e.trim(),n=/^\d+\s*,/.test(r)?r.slice(0,r.indexOf(",")).trim():r;if(/^\d+$/.test(n)){let s=1e3*Math.min(Number(n),300);return s>0?s:void 0}if(!/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun)[a-z]*[ ,]/.test(n))return;let i=/^\w{3} \w{3} /.test(n)?n+" GMT":n,o=Date.parse(i)-t;if(!(!Number.isFinite(o)||o<=0))return Math.min(o,3e5)}var XVe=class{record(t){if(t.kind==="too-large")return;if(t.kind!=="retry-later")return void this.reset();if(!t.retryAfterMs)return;let r=this.isOpen(),n=Date.now(),i=Math.min(t.retryAfterMs,3e5);if(!r){this._installedAt=n,this._until=n+i;return}this._until=Math.max(this._until,Math.min(n+i,this._installedAt+3e5))}remainingMs(){let t=Date.now();if(t<this._installedAt-5e3)return this.reset(),0;let r=Math.min(3e5,Math.max(0,this._until-t));return r===0&&this.reset(),r}isOpen(){return this.remainingMs()>0}reset(){this._until=0,this._installedAt=0}constructor(){this._until=0,this._installedAt=0}};var $rl="utf8",fnh=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function dnh(e){return typeof e=="string"&&fnh.test(e)}function ZVe(e,t){return dnh(e)?e:t()}function tft(e,t){let r=new Error(t);try{Object.defineProperty(r,"name",{value:e,writable:!0,enumerable:!0,configurable:!0})}catch{}return r}function enl(e){return e?.replace(/\/+$/,"")}async function tnl(e,t){let r=null;for(let n=0;n<t.retryCount+1;n++){n>0&&await new Promise(i=>setTimeout(i,t.retryDelay));try{return await e()}catch(i){if(r=i,!t.retryCheck(i))throw i}}throw r}function VJo(){return new Date().toISOString()}function RN(e,t){let r=setTimeout(e,t);return r?.unref&&r?.unref(),r}async function XSe(e,t,r){let n;try{return await Promise.race([e,new Promise((i,o)=>{n=RN(()=>{try{r?.(),i()}catch(s){o(s)}},t)})])}finally{clearTimeout(n)}}var rnl=e=>e&&typeof e.then=="function";function gHt(e){return Promise.all(e.map(t=>(t??Promise.resolve()).then(r=>({status:"fulfilled",value:r}),r=>({status:"rejected",reason:r}))))}var Rnn,nnl,Dnn;function inl(e){let t=globalThis._posthogChunkIds;if(!t)return;let r=Object.keys(t);return Dnn&&r.length===nnl||(nnl=r.length,Dnn=r.reduce((n,i)=>{Rnn||(Rnn={});let o=Rnn[i];if(o)n[o[0]]=o[1];else{let s=e(i);for(let a=s.length-1;a>=0;a--){let u=s[a]?.filename,l=t[i];if(u&&l){n[u]=l,Rnn[i]=[u,l];break}}}return n},{})),Dnn}var GJo=50,mnh=1e3,hnh=100,gnh=4,AHt=class{constructor(t,r,n=[]){this.coercers=t,this.stackParser=r,this.modifiers=n}buildFromUnknown(t,r={}){let i=r&&r.mechanism||{handled:!0,type:"generic"},s=this.buildCoercingContext(i,r,0).apply(t),a=this.buildParsingContext(r),c=this.parseStacktrace(s,a);return{$exception_list:this.convertToExceptionList(c,i),$exception_level:"error"}}async modifyFrames(t){for(let r of t)r.stacktrace&&r.stacktrace.frames&&z4(r.stacktrace.frames)&&(r.stacktrace.frames=await this.applyModifiers(r.stacktrace.frames));return t}coerceFallback(t){return{type:"Error",value:"Unknown error",stack:t.syntheticException?.stack,synthetic:!0}}parseStacktrace(t,r){let n;t.cause!=null&&(n=this.parseStacktrace(t.cause,r));let i;if(t.stack!=""&&t.stack!=null)try{i=this.applyChunkIds(this.stackParser(t.stack,t.synthetic?r.skipFirstLines:0),r.chunkIdMap)}catch{}return{...t,cause:n,stack:i,errors:t.errors?.map(o=>this.parseStacktrace(o,r))}}applyChunkIds(t,r){return t.map(n=>(n.filename&&r&&(n.chunk_id=r[n.filename]),n))}applyCoercers(t,r){for(let n of this.coercers)if(n.match(t))return n.coerce(t,r);return this.coerceFallback(r)}async applyModifiers(t){let r=t;for(let n of this.modifiers)r=await n(r);return r}convertToExceptionList(t,r){let n=[],i=(o,s,a)=>{let c=n.length,u=s===void 0?{type:typeof r.type=="string"&&r.type.length>0?r.type:"generic",...typeof r.handled=="boolean"?{handled:r.handled}:r.handled===void 0?{handled:!0}:{},synthetic:typeof r.synthetic=="boolean"?r.synthetic:o.synthetic,exception_id:c}:{type:"chained",source:a,synthetic:o.synthetic,exception_id:c,parent_id:s},l={type:o.type,value:o.value,mechanism:u};o.stack&&(l.stacktrace={type:"raw",frames:o.stack}),n.push(l),o.cause&&i(o.cause,c,"cause");for(let p of o.errors??[])i(p,c,"member")};return i(t),n}buildParsingContext(t){return{chunkIdMap:inl(this.stackParser),skipFirstLines:t.skipFirstLines??1}}getAggregateErrors(t){try{if(YSe(t)){let r=Object.getPrototypeOf(t);for(let n=0;r&&n<hnh;n++){let i=Object.getOwnPropertyDescriptor(r,"constructor")?.value;if(typeof i=="function"&&i.name==="AggregateError"){let o=t.errors;return z4(o)?o:void 0}r=Object.getPrototypeOf(r)}}}catch{}}buildCoercingContext(t,r,n=0){let i=0,o=0,s=!1,a=new Set,c=[],u={},l=(d,m,g=0)=>{let A=p(m,g),y=A.apply;if(A.apply=R=>{c.push(d);try{return y(R)}finally{c.pop()}},g>gnh||g>0&&c.indexOf(d)!==-1)return this.coerceFallback(A);let I=typeof d=="object"&&d!==null||typeof d=="function";if(g===0&&i>=GJo||I&&a.has(d))return;I&&a.add(d),g===0&&i++;let x=this.getAggregateErrors(d);s||=!!x;let v;try{if(v=this.applyCoercers(d,A),!v)throw u}catch(R){if(R===u){g===0&&i--;return}if(!s)throw R;v=this.coerceFallback(A)}if(!x||i>=GJo)return v;let w;try{w=x.length}catch{return v}if(!Number.isInteger(w)||w<0||w>4294967295)return v;let B=[];for(let R=0;i<GJo&&o<mnh&&R<w;R++){o++;let D;try{D=A.next(x[R])}catch{i++,D=this.coerceFallback(p(m+1))}D&&B.push(D)}return{...v,errors:B}},p=(d,m=0)=>({...r,syntheticException:d==0?r.syntheticException:void 0,mechanism:d==0?t:{},apply:g=>{let A=l(g,d,m+1);if(!A)throw u;return A},next:g=>l(g,d+1)}),f=p(n);return{...f,apply:d=>l(d,n)??this.coerceFallback(f)}}};var YB="?",Anh="<anonymous>",ynh=/^([a-z][a-z0-9.+-]+):/i,bnh=["http","https","file","blob","app","capacitor","ionic","webpack","webpack-internal","ng"];function Enh(e){if(!e||e===Anh)return!1;let t=ynh.exec(e);return!t||bnh.includes(t[1].toLowerCase())}function one(e,t,r,n,i){let o={platform:e,filename:t,function:r==="<anonymous>"?YB:r,in_app:Enh(t)};return Phe(n)||(o.lineno=n),Phe(i)||(o.colno=i),o}var knn=(e,t)=>{let r=e.indexOf("safari-extension")!==-1,n=e.indexOf("safari-web-extension")!==-1;return r||n?[e.indexOf("@")!==-1?e.split("@")[0]:YB,r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};var Inh=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,vnh=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Cnh=/\((\S*)(?::(\d+))(?::(\d+))\)/,qJo=(e,t)=>{let r=Inh.exec(e);if(r){let[,i,o,s]=r;return one(t,i,YB,+o,+s)}let n=vnh.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){let a=Cnh.exec(n[2]);a&&(n[2]=a[1],n[3]=a[2],n[4]=a[3])}let[o,s]=knn(n[1]||YB,n[2]);return one(t,s,o,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}};var xnh=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,wnh=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,WJo=(e,t)=>{let r=xnh.exec(e);if(r){if(r[3]&&r[3].indexOf(" > eval")>-1){let s=wnh.exec(r[3]);s&&(r[1]=r[1]||"eval",r[3]=s[1],r[4]=s[2],r[5]="")}let i=r[3],o=r[1]||YB;return[o,i]=knn(o,i),one(t,i,o,r[4]?+r[4]:void 0,r[5]?+r[5]:void 0)}};var Snh=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,onl=(e,t)=>{let r=Snh.exec(e);return r?one(t,r[2],r[1]||YB,+r[3],r[4]?+r[4]:void 0):void 0};var Tnh=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,snl=(e,t)=>{let r=Tnh.exec(e);return r?one(t,r[2],r[3]||YB,+r[1]):void 0},Onh=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,anl=(e,t)=>{let r=Onh.exec(e);return r?one(t,r[5],r[3]||r[4]||YB,+r[1],+r[2]):void 0};var Pnh=/^\s*[-]{4,}$/,Bnh=/at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/,Rnh=/^Promise\.(?:all|any)$/,Dnh=/^index \d+$/,knh="node:internal/promise",unl=(e,t)=>{let r=e.match(Bnh);if(r){let n,i,o,s,a;if(r[1]){o=r[1];let l=o.lastIndexOf(".");if(o[l-1]==="."&&l--,l>0){n=o.slice(0,l),i=o.slice(l+1);let p=n.indexOf(".Module");p>0&&(o=o.slice(p+1),n=n.slice(0,p))}s=void 0}i&&(s=n,a=i),i==="<anonymous>"&&(a=void 0,o=void 0),o===void 0&&(a=a||YB,o=s?`${s}.${a}`:a);let c=r[2]?.startsWith("file://")?r[2].slice(7):r[2],u=r[5]==="native";return c?.match(/\/[A-Z]:/)&&(c=c.slice(1)),!c&&r[5]&&!u&&(c=r[5]),Rnh.test(o)&&Dnh.test(c||"")&&(c=knh),{filename:c?decodeURI(c):void 0,module:void 0,function:o,lineno:cnl(r[3]),colno:cnl(r[4]),in_app:Fnh(c||"",u),platform:t}}if(e.match(Pnh))return{filename:e,platform:t}};function Fnh(e,t=!1){return!(t||e&&!e.startsWith("/")&&!e.match(/^[A-Z]:/)&&!e.startsWith(".")&&!e.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//))&&e!==void 0&&!e.includes("node_modules/")}function cnl(e){return parseInt(e||"",10)||void 0}var lnl=/\(error: (.*)\)/,pnl=50,Nnh=10,jnh=1e3;function HJo(e,t){return e.filename===t.filename&&e.function===t.function&&e.module===t.module&&e.lineno===t.lineno&&e.colno===t.colno}function znh(e){for(let t=1;t<=Nnh;t++){let r=e.length-2*t;if(r<0)break;let n=!0;for(let i=0;i<t;i++){let o=e[r+i];if(!HJo(o,e[r+t+i])){n=!1;break}}if(n){for(let i=0;i<t;i++)e[r+i]=e[r+t+i];return e.length=r+t,{start:r,length:t}}}}function Qnh(e,t){let r=t.start+t.length,n=dnl(e,t);n&&e.splice(r+n===e.length?r:t.start,n)}function fnl(e,t){let r=t.start;for(;r>0&&HJo(e[r-1],e[r-1+t.length]);)r--;return t.start-r}function dnl(e,t){let r=t.start+t.length,n=r;for(;n<e.length&&HJo(e[n],e[n-t.length]);)n++;return n-r}function Mnh(e,t){let r=t[0],n=e.length-(r?fnl(e,r):0);for(let i of t)n-=dnl(e,i);return n}function Lnh(e){let t=e.map(n=>`${n.function}|${n.filename}|${n.lineno}|${n.colno}|${n.module}`),r=0;for(let n=1;n<t.length;n++)_nh(t,n,r)&&(r=n);e.push(...e.splice(0,r))}function _nh(e,t,r){for(let n=0;n<e.length;n++){let i=e[(t+n)%e.length],o=e[(r+n)%e.length];if(i!==o)return i<o}return!1}function mnl(e){if(!e.length)return[];let t=Array.from(e);return t.reverse(),t.slice(0,pnl).map(r=>({...r,filename:r.filename||Unh(t).filename,function:r.function||YB}))}function Unh(e){return e[e.length-1]||{}}function KJo(){return hnl("web:javascript",qJo,WJo)}function hnl(e,...t){return(r,n=0)=>{let i=[],o=r.split(`
|
|
3451
3451
|
`),s=Math.min(o.length,n+jnh),a=[];for(let l=n;l<s;l++){let p=o[l];if(p.length>1024)continue;let f=lnl.test(p)?p.replace(lnl,"$1"):p;if(!f.match(/\S*Error: /)){for(let d of t){let m=d(f,e);if(m){i.push(m);let g=znh(i);if(g){for(let A=a.length-1;A>=0;A--){let y=a[A];if(y.start+y.length<=g.start)break;a.pop()}a.push(g)}break}}if(Mnh(i,a)>=pnl)break}}let c=[...a].sort((l,p)=>p.start-l.start),u=c[c.length-1];if(u){let l=fnl(i,u);i.splice(u.start-l,l);for(let p of c)p.start-=l}for(let l of c)Qnh(i,l);return a.some(l=>l.start===0&&i.length===l.length)&&Lnh(i),mnl(i)}}var JJo=class{match(t){return this.isDOMException(t)||this.isDOMError(t)}coerce(t,r){let n=ZD(t.stack);return{type:this.getType(t),value:this.getValue(t),stack:n?t.stack:void 0,cause:t.cause?r.next(t.cause):void 0,synthetic:!1}}getType(t){return this.isDOMError(t)?"DOMError":"DOMException"}getValue(t){let r=t.name||(this.isDOMError(t)?"DOMError":"DOMException");return t.message?`${r}: ${t.message}`:r}isDOMException(t){return YVe(t,"DOMException")}isDOMError(t){return YVe(t,"DOMError")}};var yHt=class{match(t){return YSe(t)}coerce(t,r){let n=this.getStack(t),i=n===void 0?r.syntheticException?.stack:void 0,o=!!i;return{type:this.getType(t),value:this.getMessage(t,r),stack:n??i,cause:t.cause?r.next(t.cause):void 0,synthetic:o}}getType(t){return t.name||t.constructor.name}getMessage(t,r){let n=t.message;return n.error&&typeof n.error.message=="string"?String(n.error.message):String(n)}getStack(t){try{let r=t.stacktrace;if(typeof r=="string"&&r.length>0)return r;let n=t.stack;return typeof n=="string"&&n.length>0?n:void 0}catch{return}}};var YJo=class{match(t){if(!Rrl(t))return!1;let r=t;return r.error!=null||this._hasUsableMessage(r)}coerce(t,r){if(t.error!=null)return r.apply(t.error);let n=r.apply(t.message);return{...n,stack:this._buildLocationStack(t)??n.stack,synthetic:!0}}_hasUsableMessage(t){return ZD(t.message)&&t.message.length>0}_buildLocationStack(t){let r=t,n=r.lineno??0,i=r.colno??0;if(!(!ZD(r.filename)||r.filename.length===0)&&n!==0)return`Error
|
|
3452
|
-
at ${r.filename}:${n}:${i}`}};var Vnh=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,bHt=class{match(t){return typeof t=="string"}coerce(t,r){let[n,i]=this.getInfos(t);return{type:n??"Error",value:i??t,stack:r.syntheticException?.stack,synthetic:!0}}getInfos(t){let r="Error",n=t,i=t.match(Vnh);return i&&(r=i[1],n=i[2]),[r,n]}};var gnl=["fatal","error","warning","log","info","debug"];function Fnn(e,t=40){let r=Object.keys(e);if(r.sort(),!r.length)return"[object has no keys]";for(let n=r.length;n>0;n--){let i=r.slice(0,n).join(", ");if(!(i.length>t))return n===r.length||i.length<=t?i:`${i.slice(0,t)}...`}return""}var EHt=class{match(t){return typeof t=="object"&&t!==null}coerce(t,r){let n=this.getErrorPropertyFromObject(t);return n?r.apply(n):{type:this.getType(t),value:this.getValue(t),stack:this.getStack(t)??r.syntheticException?.stack,level:this.isSeverityLevel(t.level)?t.level:"error",synthetic:!0}}getType(t){if(Zpt(t))return t.constructor.name;let r="name"in t?t.name:void 0;return ZD(r)&&!kJo(r)?r:"Error"}getValue(t){if("name"in t&&typeof t.name=="string"){let i=`'${t.name}' captured as exception`;return"message"in t&&typeof t.message=="string"&&(i+=` with message: '${t.message}'`),i}if("message"in t&&typeof t.message=="string")return t.message;let r=this.getObjectClassName(t),n=Fnn(t);return`${r&&r!=="Object"?`'${r}'`:"Object"} captured as exception with keys: ${n}`}isSeverityLevel(t){return ZD(t)&&!kJo(t)&&gnl.indexOf(t)>=0}getStack(t){try{return ZD(t.stacktrace)&&t.stacktrace.length>0?t.stacktrace:ZD(t.stack)&&t.stack.length>0?t.stack:void 0}catch{return}}getErrorPropertyFromObject(t){for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let n=t[r];if(YSe(n))return n}}getObjectClassName(t){try{let r=Object.getPrototypeOf(t);return r?r.constructor.name:void 0}catch{return}}};var XJo=class{match(t){return Zpt(t)}coerce(t,r){let n=t.constructor.name;return{type:n,value:`${n} captured as exception with keys: ${Fnn(t)}`,stack:r.syntheticException?.stack,synthetic:!0}}};var IHt=class{match(t){return bnn(t)}coerce(t,r){return{type:"Error",value:`Primitive value captured as exception: ${String(t)}`,stack:r.syntheticException?.stack,synthetic:!0}}};var ZJo=class{match(t){return YVe(t,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(t)}isCustomEventWrappingRejection(t){if(!Zpt(t))return!1;try{let r=t.detail;return r!=null&&typeof r=="object"&&"reason"in r}catch{return!1}}coerce(t,r){let n=this.getUnhandledRejectionReason(t);return bnn(n)?{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(n)}`,stack:r.syntheticException?.stack,synthetic:!0}:r.apply(n)}getUnhandledRejectionReason(t){try{if("reason"in t)return t.reason;if("detail"in t&&t.detail!=null&&typeof t.detail=="object"&&"reason"in t.detail)return t.detail.reason}catch{}return t}};var $Jo=class{constructor(t){this._maxSize=t,this._cache=new Map}get(t){let r=this._cache.get(t);if(r!==void 0)return this._cache.delete(t),this._cache.set(t,r),r}set(t,r){this._cache.set(t,r)}reduce(){for(;this._cache.size>=this._maxSize;){let t=this._cache.keys().next().value;t&&this._cache.delete(t)}}};var vHt={MESSAGE:"$message",TIMESTAMP:"$timestamp"},Gnh=new Set([vHt.MESSAGE,vHt.TIMESTAMP]),Nnn={enabled:!0,max_bytes:32768};function eYo(e){return e?{enabled:e.enabled??Nnn.enabled,max_bytes:Wnh(e.max_bytes,Nnn.max_bytes)}:{...Nnn}}function qnh(e){if(!e)return{sanitizedProperties:{},droppedKeys:[]};let t=[];return{sanitizedProperties:Object.keys(e).reduce((n,i)=>Gnh.has(i)?(t.push(i),n):(n[i]=e[i],n),{}),droppedKeys:t}}var tYo=class{constructor(t){this._entries=[],this._totalBytes=0,this._config=eYo(t)}setConfig(t){this._config=eYo(t),this._trimToMaxBytes()}add(t){let r=Hnh(t);if(!r)return;let n=Anl(r.json);n>this._config.max_bytes||(this._entries.push({step:r.step,bytes:n}),this._totalBytes+=n,this._trimToMaxBytes())}getAttachable(){return this._entries.map(t=>t.step)}clear(){this._entries=[],this._totalBytes=0}size(){return this._entries.length}_trimToMaxBytes(){for(;this._totalBytes>this._config.max_bytes&&this._entries.length>0;){let t=this._entries.shift();t&&(this._totalBytes-=t.bytes)}}};function Wnh(e,t){if(!Xpt(e)||e===1/0||e===-1/0)return t;let r=Math.floor(e);return r<0?t:r}function Hnh(e){let t;try{t=JSe(e)}catch{return}try{let r=JSON.parse(t);if(!dHt(r))return;let n=r,i=n[vHt.MESSAGE],o=n[vHt.TIMESTAMP];return!ZD(i)||i.trim().length===0||!ZD(o)&&!Xpt(o)?void 0:{step:n,json:t}}catch{return}}function Anl(e){if("u">typeof TextEncoder)return new TextEncoder().encode(e).length;let t=encodeURIComponent(e),r=0;for(let n=0;n<t.length;n++)t[n]==="%"?(r+=1,n+=2):r+=1;return r}function Knh(){let e=globalThis._posthogReleaseId;return typeof e=="string"&&e.length>0?e:void 0}var rYo=e=>{if("flags"in e){let t=ynl(e.flags),r=bnl(e.flags);return{...e,featureFlags:t,featureFlagPayloads:r}}{let t=e.featureFlags??{},r=Object.fromEntries(Object.entries(e.featureFlagPayloads||{}).map(([i,o])=>[i,rft(o)])),n=Object.fromEntries(Object.entries(t).map(([i,o])=>[i,Jnh(i,o,r[i])]));return{...e,featureFlags:t,featureFlagPayloads:r,flags:n}}};function Jnh(e,t,r){return{key:e,enabled:typeof t=="string"?!0:t,variant:typeof t=="string"?t:void 0,reason:void 0,metadata:{id:void 0,version:void 0,payload:r?JSON.stringify(r):void 0,description:void 0}}}var ynl=e=>Object.fromEntries(Object.entries(e??{}).map(([t,r])=>[t,CHt(r)]).filter(([,t])=>t!==void 0)),bnl=e=>{let t=e??{};return Object.fromEntries(Object.keys(t).filter(r=>{let n=t[r];return n.enabled&&n.metadata&&n.metadata.payload!==void 0}).map(r=>{let n=t[r].metadata?.payload;return[r,n?rft(n):void 0]}))},CHt=e=>e===void 0?void 0:e.variant??e.enabled,rft=e=>{if(typeof e!="string")return e;try{return JSON.parse(e)}catch{return e}};var Enl=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid","gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","oppref","irclid","_kx"],Ynh=["$feature_flag","$feature_flag_response","$feature_flag_has_experiment","$feature_flag_id","$feature_flag_version","$feature_flag_reason","$feature_flag_request_id","$feature_flag_evaluated_at","$feature_flag_error","locally_evaluated","$groups","$process_person_profile","$geoip_disable","$current_url","$pathname","$referring_domain",...Enl,"$session_id","$window_id","$lib","$lib_version","$device_id","$is_server","$react_native_version"],xHt=(e,t=[])=>{let r={},n=i=>{e[i]!==void 0&&(r[i]=e[i])};return Ynh.forEach(n),t.forEach(n),r};var jnn=class{constructor(){this.events={},this.events={}}on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),()=>{this.events[t]=this.events[t].filter(n=>n!==r)}}emit(t,r){for(let n of this.events[t]||[])n(r);for(let n of this.events["*"]||[])n(t,r)}};function nYo(){return"CompressionStream"in globalThis&&"TextEncoder"in globalThis&&"Response"in globalThis&&typeof Response.prototype.blob=="function"}var Znh="NativeGzipValidationError",$nh=31,eih=139,tih=8,rih=e=>e.length>=2&&e[0]===$nh&&e[1]===eih;var wHt,nih=()=>{if(wHt)return wHt;wHt=[];for(let e=0;e<256;e++){let t=e;for(let r=0;r<8;r++)t=1&t?3988292384^t>>>1:t>>>1;wHt[e]=t>>>0}return wHt},iih=e=>{let t=nih(),r=4294967295;for(let n=0;n<e.length;n++)r=t[(r^e[n])&255]^r>>>8;return(4294967295^r)>>>0},znn=e=>{throw tft(Znh,`Native gzip produced invalid output: ${e}`)},oih=async(e,t)=>{e.size<18&&znn("too-short");let r=new Uint8Array(await e.slice(0,10).arrayBuffer());(!rih(r)||r[2]!==tih)&&znn("invalid-header");let n=new DataView(await e.slice(e.size-8).arrayBuffer());n.getUint32(0,!0)!==iih(t)&&znn("invalid-crc");let i=t.length>>>0;n.getUint32(4,!0)!==i&&znn("invalid-size")};async function SHt(e,t=!0,r){try{let n=new TextEncoder().encode(e),i=new globalThis.CompressionStream("gzip"),o=i.writable.getWriter(),s=o.write(n).then(()=>o.close()).catch(async u=>{try{await o.abort(u)}catch{}throw u}),a=new Response(i.readable).blob(),[c]=await Promise.all([a,s]);return await oih(c,n),c}catch(n){if(r?.rethrow)throw n;return t&&console.error("Failed to gzip compress data",n),null}}var D8=class extends Error{constructor(t,r,n,i){super("HTTP error while fetching PostHog: status="+t.status+", reqByteLength="+r),this.response=t,this.reqByteLength=r,this.responseBodyDeadline=n,this.abortController=i,this.name="PostHogFetchHttpError",this._bodyReadTimedOut=!1}get status(){return this.response.status}get retryAfterMs(){try{return UJo(this.response.headers?.get("retry-after"))}catch{return}}get bodyReadTimedOut(){return this._bodyReadTimedOut}get text(){if(!this.responseBodyTextPromise)if(Date.now()>=this.responseBodyDeadline){this._bodyReadTimedOut=!0;let t=tft("AbortError","Response body read timed out");this.cancelResponseBody(t),this.responseBodyTextPromise=Promise.reject(t)}else{let t=new Promise((n,i)=>{this.responseBodyTimer=RN(()=>{this._bodyReadTimedOut=!0;let o=tft("AbortError","Response body read timed out");i(o),this.cancelResponseBody(o)},this.responseBodyDeadline-Date.now())}),r;try{r=Promise.resolve(this.response.text())}catch(n){r=Promise.reject(n)}this.responseBodyTextPromise=Promise.race([r,t]).finally(()=>clearTimeout(this.responseBodyTimer))}return this.responseBodyTextPromise}get json(){return this.text.then(t=>JSON.parse(t))}cancelResponseBody(t){clearTimeout(this.responseBodyTimer),this.abortController.signal.aborted||this.abortController.abort(t),(async()=>{try{await this.response.body?.cancel()}catch{}})()}},Rhe=class extends Error{constructor(t){super("Network error while fetching PostHog",t instanceof Error?{cause:t}:{}),this.error=t,this.name="PostHogFetchNetworkError"}};var wnl=(e,t)=>{for(let r of Object.keys(t))(r.startsWith("$feature/")||r==="$active_feature_flags")&&(e[r]=t[r])};async function Inl(e){if(e instanceof D8){let t="";try{t=await e.text}catch{e.bodyReadTimedOut&&(t="<response body read timed out>")}console.error(`Error while flushing PostHog: message=${e.message}, response body=${t}`,e)}else console.error("Error while flushing PostHog",e);return Promise.resolve()}function sih(e){return typeof e=="object"&&(e instanceof D8||Snl(e))}function Snl(e){return e instanceof Rhe}function aih(e){if(e instanceof D8)return e.status===502||e.status===504;if(!(e instanceof Rhe))return!1;let t=e.error;return(t?.code??t?.cause?.code)!=="ECONNREFUSED"}var vnl=10485760;function Cnl(e){try{return typeof e!="string"?e instanceof Uint8Array?e.byteLength:e.size:"u">typeof Buffer?Buffer.byteLength(e,$rl):new TextEncoder().encode(e).length}catch{return 0}}function nft(e){return typeof e=="object"&&e instanceof D8&&e.status===413}function Qnn(e){return e instanceof D8?e.status===408||e.status===429||e.status>=500:Snl(e)}function xnl(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var iYo="default",THt=class{getErrorPropertiesBuilder(){return this._errorPropertiesBuilder||(this._errorPropertiesBuilder=this.createErrorPropertiesBuilder()),this._errorPropertiesBuilder}createErrorPropertiesBuilder(){return new AHt([new yHt,new EHt,new bHt,new IHt],KJo())}getEvaluationRuntime(){}constructor(t,r={}){this.flushPromise=null,this.pendingFlushPromise=null,this.flushPromises=new Set,this._dequeuedMessagesCount=0,this.shutdownPromise=null,this.promiseQueue=new xnn,this._events=new jnn,this._isInitialized=!1;let n=typeof t=="string"?t.trim():"",i=typeof r.host=="string"?r.host.trim():"",o=!n;this._logger=Qrl("[PostHog]",this.logMsgIfDebug.bind(this)),o&&this._logger.error("You must pass your PostHog project's api key. The client will be disabled."),this.apiKey=n,this.host=enl(i||"https://us.i.posthog.com"),this.flushAt=r.flushAt?Math.max(r.flushAt,1):20,this.maxBatchSize=Math.max(this.flushAt,r.maxBatchSize??100),this.maxQueueSize=Math.max(this.flushAt,r.maxQueueSize??1e3),this.flushInterval=r.flushInterval??1e4,this.preloadFeatureFlags=r.preloadFeatureFlags??!0,this.defaultOptIn=r.defaultOptIn??!0,this.disableSurveys=r.disableSurveys??!1,this._retryOptions={retryCount:r.fetchRetryCount??3,retryDelay:r.fetchRetryDelay??3e3,retryCheck:Qnn},this.requestTimeout=r.requestTimeout??1e4,this.featureFlagsRequestTimeoutMs=r.featureFlagsRequestTimeoutMs??3e3,this.featureFlagsRequestMaxRetries=r.featureFlagsRequestMaxRetries??1,this.remoteConfigRequestTimeoutMs=r.remoteConfigRequestTimeoutMs??3e3,this.disableGeoip=r.disableGeoip??!0,this.disabled=(r.disabled??!1)||o,this.historicalMigration=r?.historicalMigration??!1,this._initPromise=Promise.resolve(),this._isInitialized=!0,this.evaluationContexts=r?.evaluationContexts??r?.evaluationEnvironments,r?.evaluationEnvironments&&!r?.evaluationContexts&&this._logger.warn("evaluationEnvironments is deprecated. Use evaluationContexts instead. This property will be removed in a future version."),this.disableCompression=!nYo()||(r?.disableCompression??!1)}logMsgIfDebug(t){this.isDebug&&t()}wrap(t){if(this.disabled)return void this._logger.warn("The client is disabled");if(this._isInitialized)return t();this._initPromise.then(()=>t())}getCommonEventProperties(){return{$lib:this.getLibraryId(),$lib_version:this.getLibraryVersion()}}get optedOut(){return this.getPersistedProperty(wM.OptedOut)??!this.defaultOptIn}async optIn(){this.wrap(()=>{this.setPersistedProperty(wM.OptedOut,!1)})}async optOut(){this.wrap(()=>{this.setPersistedProperty(wM.OptedOut,!0)})}on(t,r){return this._events.on(t,r)}debug(t=!0){if(this.removeDebugCallback?.(),t){let r=this.on("*",(n,i)=>this._logger.info(n,i));this.removeDebugCallback=()=>{r(),this.removeDebugCallback=void 0}}}get isDebug(){return!!this.removeDebugCallback}get isDisabled(){return this.disabled}buildPayload(t){let r=t.properties||{},n={...r,...this.getCommonEventProperties()};return wnl(n,r),t.event==="$feature_flag_called"&&n.$feature_flag_has_experiment===!1&&this.isMinimalFlagCalledEventsEnabled()&&(n=xHt(n)),{distinct_id:t.distinct_id,event:t.event,properties:n}}isMinimalFlagCalledEventsEnabled(){return!1}addPendingPromise(t){return this.promiseQueue.add(t)}identifyStateless(t,r,n){this.wrap(()=>{let i={...this.buildPayload({distinct_id:t,event:"$identify",properties:r})};this.enqueue("identify",i,n)})}async identifyStatelessImmediate(t,r,n){let i={...this.buildPayload({distinct_id:t,event:"$identify",properties:r})};await this.sendImmediate("identify",i,n)}captureStateless(t,r,n,i){this.wrap(()=>{let o=this.buildPayload({distinct_id:t,event:r,properties:n});this.enqueue("capture",o,i)})}async captureStatelessImmediate(t,r,n,i){let o=this.buildPayload({distinct_id:t,event:r,properties:n});await this.sendImmediate("capture",o,i)}aliasStateless(t,r,n,i){this.wrap(()=>{let o=this.buildPayload({event:"$create_alias",distinct_id:r,properties:{...n||{},distinct_id:r,alias:t}});this.enqueue("alias",o,i)})}async aliasStatelessImmediate(t,r,n,i){let o=this.buildPayload({event:"$create_alias",distinct_id:r,properties:{...n||{},distinct_id:r,alias:t}});await this.sendImmediate("alias",o,i)}groupIdentifyStateless(t,r,n,i,o,s){this.wrap(()=>{let a=this.buildPayload({distinct_id:o||`$${t}_${r}`,event:"$groupidentify",properties:{$group_type:t,$group_key:r,$group_set:n||{},...s||{}}});this.enqueue("capture",a,i)})}async groupIdentifyStatelessImmediate(t,r,n,i,o,s){let a=this.buildPayload({distinct_id:o||`$${t}_${r}`,event:"$groupidentify",properties:{$group_type:t,$group_key:r,$group_set:n||{},...s||{}}});await this.sendImmediate("capture",a,i)}async getRemoteConfig(){await this._initPromise;let t=this.host;t==="https://us.i.posthog.com"?t="https://us-assets.i.posthog.com":t==="https://eu.i.posthog.com"&&(t="https://eu-assets.i.posthog.com");let r=`${t}/array/${this.apiKey}/config`,n={method:"GET",headers:{...this.getCustomHeaders(),"Content-Type":"application/json"}};return this.fetchWithRetry(r,n,{type:"required",consume:i=>i.json()},{retryCount:0},this.remoteConfigRequestTimeoutMs).catch(i=>{this._logger.error("Remote config could not be loaded",i),this._events.emit("error",i)})}async getFlags(t,r={},n={},i={},o={},s=!1){await this._initPromise;let a=s?"&config=true":"",c=`${this.host}/flags/?v=2${a}`,u={token:this.apiKey,distinct_id:t,groups:r,person_properties:n,group_properties:i,...o};n.$device_id&&(u.$device_id=n.$device_id),this.evaluationContexts&&this.evaluationContexts.length>0&&(u.evaluation_contexts=this.evaluationContexts);let l=this.getEvaluationRuntime();l&&(u.evaluation_runtime=l);let p={method:"POST",headers:{...this.getCustomHeaders(),"Content-Type":"application/json"},body:JSON.stringify(u)};return this._logger.info("Flags URL",c),this.fetchWithRetry(c,p,{type:"required",consume:f=>f.json()},{retryCount:this.featureFlagsRequestMaxRetries,retryCheck:aih},this.featureFlagsRequestTimeoutMs).then(f=>({success:!0,response:rYo(f)})).catch(f=>(this._events.emit("error",f),{success:!1,error:this.categorizeRequestError(f)}))}categorizeRequestError(t){if(t instanceof D8)return{type:"api_error",statusCode:t.status};if(t instanceof Rhe){let r=t.error;return r instanceof Error&&(r.name==="AbortError"||r.name==="TimeoutError")?{type:"timeout"}:{type:"connection_error"}}return{type:"unknown_error"}}async getFeatureFlagStateless(t,r,n={},i={},o={},s){await this._initPromise;let a=await this.getFeatureFlagDetailStateless(t,r,n,i,o,s);if(a===void 0)return{response:void 0,requestId:void 0};let c=CHt(a.response);return c===void 0&&(c=!1),{response:c,requestId:a.requestId}}async getFeatureFlagDetailStateless(t,r,n={},i={},o={},s){await this._initPromise;let a=await this.getFeatureFlagDetailsStateless(r,n,i,o,s,[t]);return a===void 0?void 0:{response:a.flags[t],requestId:a.requestId,evaluatedAt:a.evaluatedAt}}async getFeatureFlagPayloadStateless(t,r,n={},i={},o={},s){await this._initPromise;let a=await this.getFeatureFlagPayloadsStateless(r,n,i,o,s,[t]);if(!a)return;let c=a[t];return c===void 0?null:c}async getFeatureFlagPayloadsStateless(t,r={},n={},i={},o,s){return await this._initPromise,(await this.getFeatureFlagsAndPayloadsStateless(t,r,n,i,o,s)).payloads}async getFeatureFlagsStateless(t,r={},n={},i={},o,s){return await this._initPromise,await this.getFeatureFlagsAndPayloadsStateless(t,r,n,i,o,s)}async getFeatureFlagsAndPayloadsStateless(t,r={},n={},i={},o,s){await this._initPromise;let a=await this.getFeatureFlagDetailsStateless(t,r,n,i,o,s);return a?{flags:a.featureFlags,payloads:a.featureFlagPayloads,requestId:a.requestId}:{flags:void 0,payloads:void 0,requestId:void 0}}async getFeatureFlagDetailsStateless(t,r={},n={},i={},o,s){await this._initPromise;let a={geoip_disable:o??this.disableGeoip};s&&(a.flag_keys_to_evaluate=s);let c=await this.getFlags(t,r,n,i,a);if(!c.success)return;let u=c.response;return u.errorsWhileComputingFlags&&console.error("[FEATURE FLAGS] Error while computing feature flags, some flags may be missing or incorrect. Learn more at https://posthog.com/docs/feature-flags/best-practices"),u.quotaLimited?.includes("feature_flags")?(console.warn("[FEATURE FLAGS] Feature flags quota limit exceeded - feature flags unavailable. Learn more about billing limits at https://posthog.com/docs/billing/limits-alerts"),{flags:{},featureFlags:{},featureFlagPayloads:{},requestId:u?.requestId,quotaLimited:u.quotaLimited}):u}async getSurveysStateless(){if(await this._initPromise,this.disabled)return[];if(this.disableSurveys===!0)return this._logger.info("Loading surveys is disabled."),[];let t=`${this.host}/api/surveys/?token=${this.apiKey}`,r={method:"GET",headers:{...this.getCustomHeaders(),"Content-Type":"application/json"}},i=(await this.fetchWithRetry(t,r,{type:"required",consume:o=>{if(o.status!==200||!o.json){let s=`Surveys API could not be loaded: ${o.status}`,a=new Error(s);return this._logger.error(a),this._events.emit("error",new Error(s)),Promise.resolve(void 0)}return o.json()}}).catch(o=>{this._logger.error("Surveys API could not be loaded",o),this._events.emit("error",o)}))?.surveys;return i&&this._logger.info("Surveys fetched from API: ",JSON.stringify(i)),i??[]}get props(){return this._props||(this._props=this.getPersistedProperty(wM.Props)),this._props||{}}set props(t){this._props=t}async register(t){this.wrap(()=>{this.props={...this.props,...t},this.setPersistedProperty(wM.Props,this.props)})}async unregister(t){this.wrap(()=>{delete this.props[t],this.setPersistedProperty(wM.Props,this.props)})}processBeforeEnqueue(t){return t}async flushStorage(){}getQueueRouteKey(t){return iYo}persistedQueueKeyForRoute(t){return wM.Queue}getActiveQueueRoutes(){return[iYo]}getRouteQueue(t){return this.getPersistedProperty(this.persistedQueueKeyForRoute(t))||[]}enqueue(t,r,n,i){this.wrap(()=>{if(this.optedOut)return void this._events.emit(t,"Library is disabled. Not sending event. To re-enable, call posthog.optIn()");let o=this.prepareMessage(r,n);if(o=this.processBeforeEnqueue(o),o===null)return;o=this.normalizeMessage(o);let s=this.persistedQueueKeyForRoute(i??this.getQueueRouteKey(o)),a=this.getPersistedProperty(s)||[];a.length>=this.maxQueueSize&&(a.shift(),this._logger.warn("Queue is full, the oldest event is dropped.")),a.push({message:o}),this.setPersistedProperty(s,a),this._events.emit(t,o),a.length>=this.flushAt&&this.flushBackground(),this.flushInterval&&!this._flushTimer&&(this._flushTimer=RN(()=>this.flushBackground(),this.flushInterval))})}async sendImmediate(t,r,n,i){if(this.disabled)return void this._logger.warn("The client is disabled");if(this._isInitialized||await this._initPromise,this.optedOut)return void this._events.emit(t,"Library is disabled. Not sending event. To re-enable, call posthog.optIn()");let o=this.prepareMessage(r,n);if(o=this.processBeforeEnqueue(o),o!==null){o=this.normalizeMessage(o);try{await this.sendBatch([o],void 0,i??this.getQueueRouteKey(o))}catch(s){this._events.emit("error",s)}}}normalizeMessage(t){let{type:r,library:n,library_version:i,...o}=t,s=xnl(o.properties)?o.properties:void 0;return n!==void 0&&s?.$lib===void 0&&(s={...s||{},$lib:n}),i!==void 0&&s?.$lib_version===void 0&&(s={...s||{},$lib_version:i}),s&&(o.properties=s),o.uuid=ZVe(o.uuid,BN),o}normalizeTimestampForWire(t){let r=t instanceof Date?t:typeof t=="string"?new Date(t):null;if(!r||Number.isNaN(r.getTime()))return t;let n=r.toISOString(),i=typeof t=="string"?t.match(/\.(\d+)(?:Z|[+-]\d{2}:?\d{2})?$/i)?.[1]:void 0;return i&&i.length>3?n.replace(/\.\d{3}Z$/,`.${i}Z`):n}prepareMessage(t,r){let n={...t,timestamp:r?.timestamp?r?.timestamp:VJo(),uuid:ZVe(r?.uuid,BN)};return(r?.disableGeoip??this.disableGeoip)&&(xnl(n.properties)||(n.properties={}),n.properties.$geoip_disable=!0),n.distinctId&&(n.distinct_id=n.distinctId,delete n.distinctId),n}clearFlushTimer(){this._flushTimer&&(clearTimeout(this._flushTimer),this._flushTimer=void 0)}flushBackground(){this.pendingFlushPromise||this.flushAutomatic().catch(async t=>{await Inl(t)})}flushAutomatic(){return this.flush()}async waitForPendingPromises(t,r=[]){let n=r.filter(o=>!!o),i=0;for(;;){let o=this.promiseQueue.getPromises([...n,...this.flushPromises],t);if(o.length===0)return;i>0&&this._logger.debug(`flush() re-checking ${o.length} pending promise(s) before flushing`),await Promise.all(o.map(s=>s.catch(()=>{}))),i++}}flushWithPendingPromises(){return this.flushInternal(!0)}flush(){return this.flushInternal(!1)}flushInternal(t){if(this.disabled)return Promise.resolve();if(!t&&this.pendingFlushPromise)return this.pendingFlushPromise;let r=this.flushPromise,n=this.promiseQueue.maxId,i=Promise.resolve().then(()=>{if(t)return this.waitForPendingPromises(n,[r,i])}).then(()=>gHt([r])).then(()=>(this.pendingFlushPromise===i&&(this.pendingFlushPromise=null),this._flush()));return this.pendingFlushPromise=i,this.flushPromise=i,this.flushPromises.add(i),this.addPendingPromise(i),gHt([i]).then(()=>{this.flushPromises.delete(i),this.pendingFlushPromise===i&&(this.pendingFlushPromise=null),this.flushPromise===i&&(this.flushPromise=null)}),i}getCustomHeaders(){let t=this.getCustomUserAgent(),r={};return t&&t!==""&&(r["User-Agent"]=t),r}compressPayload(t){return SHt(t,this.isDebug)}getBatchEndpointPath(t){return"/batch/"}async sendBatch(t,r,n=iYo){let i={api_key:this.apiKey,batch:t.map(u=>{if(!u)return u;let l=this.normalizeTimestampForWire(u.timestamp);return l===u.timestamp?u:{...u,timestamp:l}}),sent_at:VJo()};this.historicalMigration&&(i.historical_migration=!0);let o=JSe(i),s=`${this.host}${this.getBatchEndpointPath(n)}`,a=this.disableCompression?null:await this.compressPayload(o),c={method:"POST",headers:{...this.getCustomHeaders(),"Content-Type":"application/json",...a!==null&&{"Content-Encoding":"gzip"}},body:a||o};await this.fetchWithRetry(s,c,{type:"successful-write"},r)}async _flush(){this.clearFlushTimer(),await this._initPromise;let t=this.getActiveQueueRoutes();if(!t.some(i=>this.getRouteQueue(i).length>0))return;let r=[],n;for(let i of t)try{await this._flushRoute(i,r)}catch(o){n===void 0&&(n=o)}if(n!==void 0)throw n;this._events.emit("flush",r)}async _flushRoute(t,r){let n=this.persistedQueueKeyForRoute(t),i=this.getPersistedProperty(n)||[];if(!i.length)return;let o=i.length,s=0;for(;i.length>0&&s<o;){let a=i.slice(0,this.maxBatchSize),c=a.map(p=>p.message===void 0?p.message:this.normalizeMessage(p.message)),u=async()=>{let p=this.getPersistedProperty(n)||[],f=[...a],d=p.filter(m=>{let g=m.message?.uuid,A=f.findIndex(y=>y===m||typeof g=="string"&&g.length>0&&y.message?.uuid===g);return A===-1?!0:(f.splice(A,1),!1)});this.setPersistedProperty(n,d),i=d,this._dequeuedMessagesCount+=a.length,await this.flushStorage()},l={retryCheck:p=>nft(p)?!1:Qnn(p)};try{await this.sendBatch(c,l,t)}catch(p){if(nft(p)&&c.length>1){this.maxBatchSize=Math.max(1,Math.floor(c.length/2)),this._logger.warn(`Received 413 when sending batch of size ${c.length}, reducing batch size to ${this.maxBatchSize}`);continue}throw p instanceof Rhe||await u(),this._events.emit("error",p),p}await u(),r.push(...c),s+=c.length}}async _sendOtlpBatch({path:t,auth:r,payload:n}){if(this.disabled)return{kind:"fatal",error:new Error("The client is disabled")};let i;try{i=JSON.stringify(n)}catch(l){return this.logMsgIfDebug(()=>console.warn(`[PostHog] Could not serialize a ${t} batch; reporting it as too large`,l)),{kind:"too-large",measuredLocally:!0}}let o=Cnl(i);if(o>vnl)return this.logMsgIfDebug(()=>console.warn(`[PostHog] Not sending a ${t} batch of ${o} bytes: the endpoint accepts at most ${vnl}`)),{kind:"too-large",measuredLocally:!0};let s=r==="bearer"?`${this.host}/i/v1/${t}`:`${this.host}/i/v1/${t}?token=${encodeURIComponent(this.apiKey)}`,a=this.disableCompression?null:await this.compressPayload(i),c=a||i,u={method:"POST",headers:{...this.getCustomHeaders(),"Content-Type":"application/json",...r==="bearer"&&{Authorization:`Bearer ${this.apiKey}`},...a!==null&&{"Content-Encoding":"gzip"}},body:c};try{return await this.fetchWithRetry(s,u,{type:"successful-write"},{retryCheck:l=>nft(l)||l instanceof D8&&l.retryAfterMs!==void 0?!1:Qnn(l)}),{kind:"ok"}}catch(l){if(nft(l))return{kind:"too-large"};if(Qnn(l)){let p=l instanceof D8?l.retryAfterMs:void 0;return{kind:"retry-later",error:l,...p!==void 0&&{retryAfterMs:p}}}return{kind:"fatal",error:l}}}async _sendLogsBatch(t){return this._sendOtlpBatch({path:"logs",auth:"query-token",payload:t})}async _sendMetricsBatch(t){return this._sendOtlpBatch({path:"metrics",auth:"query-token",payload:t})}async _sendTracesBatch(t){return this._sendOtlpBatch({path:"traces",auth:"bearer",payload:t})}async fetchWithRetry(t,r,n,i,o){let s=r.body?r.body:"",a=Cnl(s),c={...this._retryOptions,...i},u=0;return await tnl(async()=>{u++;let l=new AbortController,p=o??this.requestTimeout,f=Date.now()+p,d,m=new Promise((x,v)=>{d=RN(()=>{let w=tft("AbortError",`Request timed out after ${p}ms`);v(w),l.abort(w)},p)}),g,A=!1,y,I=()=>y??=(async()=>{try{await g?.body?.cancel()}catch{}})();try{let x;try{x=this.fetch(t,{signal:l.signal,...r})}catch(B){throw new Rhe(B)}x.then(B=>{l.signal.aborted&&!A&&Promise.resolve(B.body?.cancel()).catch(()=>{})}).catch(()=>{});try{g=await Promise.race([x,m]),A=!0}catch(B){throw new Rhe(B)}let v=r.mode==="no-cors",w=n.type==="successful-write"?300:400;if(!v&&(g.status<200||g.status>=w))throw new D8(g,a,f,l);if(n.type==="successful-write"){try{await Promise.race([I(),m])}catch{}return}try{return await Promise.race([n.consume(g),m])}catch(B){throw l.signal.aborted?new Rhe(B):B}}finally{clearTimeout(d),l.signal.aborted&&g&&I()}},{...c,retryCheck:l=>{let p=c.retryCheck(l);return p&&u<=c.retryCount&&l instanceof D8&&l.cancelResponseBody(),p}})}async _shutdown(t=3e4){await this._initPromise;let r=!1;return this.clearFlushTimer(),this.disabled?void 0:XSe((async()=>{try{for(await this.promiseQueue.join();this.getActiveQueueRoutes().some(s=>this.getRouteQueue(s).length>0);){let o=this._dequeuedMessagesCount;if(await this.flush(),r)break;if(this._dequeuedMessagesCount===o){this._logger.warn("Shutdown flush completed but did not send any queued events. Stopping drain to avoid a loop.");break}}}catch(i){if(!sih(i))throw i;await Inl(i)}})(),t,()=>{this._logger.critical("Timeout while shutting down PostHog. Some events may not have been sent.",{shutdownTimeoutMs:t}),r=!0})}async shutdown(t=3e4){return this.shutdownPromise?this._logger.warn("shutdown() called while already shutting down. shutdown() is meant to be called once before process exit - use flush() for per-request cleanup"):this.shutdownPromise=this._shutdown(t).finally(()=>{this.shutdownPromise=null}),this.shutdownPromise}};var fih=/[a-z][a-z0-9+.-]{0,63}:[^\s<>"]+/gi;var j4v=new RegExp(fih.source,"i"),Tnl=/[a-z][a-z0-9+.-]{0,63}:\/\//i,z4v=new RegExp(`^${Tnl.source}`,"i"),Q4v=new RegExp(Tnl.source,"gi");var dih=["is_not","is_set"],mih=1152921504606847e3,Ju=class e extends Error{constructor(t){super(t),this.name=this.constructor.name,Object.setPrototypeOf(this,e.prototype)}};function oYo(e){if(typeof e=="boolean")return!0;if(typeof e=="string"){let t=e.toLowerCase();return t==="true"||t==="false"}if(!Array.isArray(e))return!1;for(let t=0;t<e.length;t++)if(!oYo(t in e?e[t]:null))return!1;return!0}function sYo(e){if(typeof e=="boolean")return e;if(typeof e=="string")return e.toLowerCase()==="true";if(!Array.isArray(e))return!1;for(let t=0;t<e.length;t++)if(!sYo(t in e?e[t]:null))return!1;return!0}function OHt(e){for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r>=55296&&r<=56319){let n=e.charCodeAt(t+1);if(t+1>=e.length||n<56320||n>57343)throw new Ju("Cannot stringify an unpaired surrogate like the flags service");t++}else if(r>=56320&&r<=57343)throw new Ju("Cannot stringify an unpaired surrogate like the flags service")}}function Lnn(e,t=new Set){if(!(e===null||typeof e=="boolean")){if(typeof e=="string")return void OHt(e);if(typeof e=="number"){if(!Number.isFinite(e))throw new Ju(`Cannot represent non-finite number ${e} like the flags service`);return}if(Array.isArray(e)){if(t.has(e))throw new Ju("Cannot represent a circular array during local evaluation");t.add(e);try{for(let r=0;r<e.length;r++)r in e&&Lnn(e[r],t)}finally{t.delete(e)}return}if(typeof e=="object"){let r=Object.getPrototypeOf(e);if(r!==Object.prototype&&r!==null)throw new Ju("Cannot represent a non-JSON object like the flags service");if(t.has(e))throw new Ju("Cannot represent a circular object during local evaluation");t.add(e);try{for(let n of Object.keys(e))OHt(n),Lnn(e[n],t)}finally{t.delete(e)}return}throw new Ju(`Cannot represent ${typeof e} like the flags service`)}}function hih(e,t){let r=0,n=0;for(;r<e.length&&n<t.length;){let i=e.charCodeAt(r),o=t.charCodeAt(n),s=i>=55296&&i<=56319,a=o>=55296&&o<=56319,c=s?e.charCodeAt(r+1):0,u=a?t.charCodeAt(n+1):0,l=s?(i-55296)*1024+c-56320+65536:i,p=a?(o-55296)*1024+u-56320+65536:o;if(l!==p)return l-p;r+=s?2:1,n+=a?2:1}return e.length-t.length}function aYo(e,t=new Set){if(e===null)return"null";if(typeof e=="string")return OHt(e),JSON.stringify(e);if(typeof e=="boolean")return e?"true":"false";if(typeof e=="number"){if(!Number.isFinite(e))throw new Ju(`Cannot stringify non-finite number ${e} like the flags service`);if(Number.isInteger(e))throw new Ju(`Cannot distinguish integer ${e} from an integral JSON float during local evaluation`);return String(e)}if(Array.isArray(e)){if(t.has(e))throw new Ju("Cannot stringify a circular array during local evaluation");t.add(e);try{let r=[];for(let n=0;n<e.length;n++)r.push(n in e?aYo(e[n],t):"null");return`[${r.join(",")}]`}finally{t.delete(e)}}if(typeof e=="object"){let r=Object.getPrototypeOf(e);if(r!==Object.prototype&&r!==null)throw new Ju("Cannot stringify a non-JSON object like the flags service");if(t.has(e))throw new Ju("Cannot stringify a circular object during local evaluation");t.add(e);try{let n=Object.keys(e);return n.forEach(OHt),`{${n.sort(hih).map(i=>`${JSON.stringify(i)}:${aYo(e[i],t)}`).join(",")}}`}finally{t.delete(e)}}throw new Ju(`Cannot stringify ${typeof e} like the flags service`)}function Mnn(e){return typeof e=="string"?(OHt(e),e):aYo(e)}function Onl(e){try{return new RegExp(e),!0}catch{return!1}}function k8(e){return String(e).replace(/[A-Z]/g,t=>t.toLowerCase())}function Bnl(e,t,r){if(!/^\d+$/.test(e)||r==="strict"&&e.length>1&&e[0]==="0")throw new Ju(`Invalid semver: ${t}`);return parseInt(e,10)}function KS(e,t="strict"){let n=String(e).trim().replace(/^[vV]/,"").split("-")[0].split("+")[0];if(!n||n.startsWith("."))throw new Ju(`Invalid semver: ${e}`);let i=n.split("."),o=s=>s===void 0||s===""?0:Bnl(s,e,t);return[o(i[0]),o(i[1]),o(i[2])]}function F8(e,t){for(let r=0;r<3;r++){if(e[r]<t[r])return-1;if(e[r]>t[r])return 1}return 0}function gih(e,t){let r=KS(e,t);return{lower:[r[0],r[1],r[2]],upper:[r[0],r[1]+1,0]}}function Aih(e,t){let[r,n,i]=KS(e,t),o=[r,n,i],s;return s=r>0?[r+1,0,0]:n>0?[0,n+1,0]:[0,0,i+1],{lower:o,upper:s}}function yih(e,t){let n=String(e).trim().replace(/^[vV]/,"").replace(/\.\*$/,"").replace(/\*$/,"");if(!n)throw new Ju(`Invalid wildcard semver: ${e}`);let i=n.split("."),o=c=>{if(t==="legacy-permissive"){let u=parseInt(c,10);if(!isNaN(u))return u}else try{return Bnl(c,e,t)}catch{}throw new Ju(`Invalid wildcard semver: ${e}`)},s=o(i[0]);if(i.length===1)return{lower:[s,0,0],upper:[s+1,0,0]};let a=o(i[1]);return{lower:[s,a,0],upper:[s,a+1,0]}}function Pnl(e){if(e instanceof Date)return e;if(typeof e=="string"||typeof e=="number"){let t=new Date(e);if(!isNaN(t.valueOf()))return t;throw new Ju(`${e} is in an invalid date format`)}throw new Ju(`The date provided ${e} must be a string, number, or date object`)}function cYo(e){let t=/^-?(?<number>[0-9]+)(?<interval>[a-z])$/,r=e.match(t),n=new Date(new Date().toISOString());if(!r||!r.groups)return null;let i=parseInt(r.groups.number);if(i>=1e4)return null;let o=r.groups.interval;if(o==="h")n.setUTCHours(n.getUTCHours()-i);else if(o==="d")n.setUTCDate(n.getUTCDate()-i);else if(o==="w")n.setUTCDate(n.getUTCDate()-7*i);else if(o==="m")n.setUTCMonth(n.getUTCMonth()-i);else{if(o!=="y")return null;n.setUTCFullYear(n.getUTCFullYear()-i)}return n}function uYo(e,t,r={}){let n=e.key,i=e.value,o=e.operator||"exact",s=r.semverParsingPolicy??"strict";if(Object.prototype.hasOwnProperty.call(t,n)){if(o==="is_not_set")return!1;if(o==="is_set")return!0}else throw new Ju(`Property ${n} not found in propertyValues`);let c=t[n];if(c===void 0)return r.warnFunction?.(`Property ${n} cannot have a value of undefined with the ${o} operator`),o==="is_not";if(c===null&&!dih.includes(o)&&o!=="exact"&&o!=="is_not")return r.warnFunction?.(`Property ${n} cannot have a value of null with the ${o} operator`),!1;let u=(p,f)=>{if(r.propertyMatchingVersion!==2&&oYo(p)||Array.isArray(p)&&p.length===0)return Lnn(f),sYo(p)===sYo(f);if(r.propertyMatchingVersion===2&&typeof f=="number"&&oYo(p))return Lnn(f),!1;if(Array.isArray(p)){let d=Mnn(f).toLowerCase();return p.some(m=>Mnn(m).toLowerCase()===d)}return Mnn(p).toLowerCase()===Mnn(f).toLowerCase()},l=(p,f,d)=>{if(d==="gt")return p>f;if(d==="gte")return p>=f;if(d==="lt")return p<f;if(d==="lte")return p<=f;throw new Error(`Invalid operator: ${d}`)};switch(o){case"exact":return u(i,c);case"is_not":return!u(i,c);case"is_set":return!0;case"icontains":return k8(c).includes(k8(i));case"not_icontains":return!k8(c).includes(k8(i));case"starts_with":return k8(c).startsWith(k8(i));case"not_starts_with":return!k8(c).startsWith(k8(i));case"ends_with":return k8(c).endsWith(k8(i));case"not_ends_with":return!k8(c).endsWith(k8(i));case"regex":return Onl(String(i))&&String(c).match(String(i))!==null;case"not_regex":return Onl(String(i))&&String(c).match(String(i))===null;case"gt":case"gte":case"lt":case"lte":{let p=typeof i=="number"?i:parseFloat(String(i)),f=typeof c=="number"?c:c!=null?parseFloat(String(c)):NaN;return Number.isFinite(p)&&Number.isFinite(f)?l(f,p,o):l(String(c),String(i),o)}case"is_date_after":case"is_date_before":{if(typeof i=="boolean")throw new Ju("Date operations cannot be performed on boolean values");let p=cYo(String(i));p==null&&(p=Pnl(i));let f=Pnl(c);return o==="is_date_before"?f<p:f>p}case"semver_eq":return F8(KS(String(c),s),KS(String(i),s))===0;case"semver_neq":return F8(KS(String(c),s),KS(String(i),s))!==0;case"semver_gt":return F8(KS(String(c),s),KS(String(i),s))>0;case"semver_gte":return F8(KS(String(c),s),KS(String(i),s))>=0;case"semver_lt":return F8(KS(String(c),s),KS(String(i),s))<0;case"semver_lte":return F8(KS(String(c),s),KS(String(i),s))<=0;case"semver_tilde":{let p=KS(String(c),s),{lower:f,upper:d}=gih(String(i),s);return F8(p,f)>=0&&F8(p,d)<0}case"semver_caret":{let p=KS(String(c),s),{lower:f,upper:d}=Aih(String(i),s);return F8(p,f)>=0&&F8(p,d)<0}case"semver_wildcard":{let p=KS(String(c),s),{lower:f,upper:d}=yih(String(i),s);return F8(p,f)>=0&&F8(p,d)<0}default:throw new Ju(`Unknown operator: ${o}`)}}async function Rnl(e){let t=globalThis.crypto?.subtle;if(!t)throw new Error("SubtleCrypto API not available");let r=await t.digest("SHA-1",new TextEncoder().encode(e));return Array.from(new Uint8Array(r)).map(n=>n.toString(16).padStart(2,"0")).join("")}async function PHt(e,t,r="",n="."){let i=await Rnl(`${e}${n}${t}${r}`);return parseInt(i.slice(0,15),16)/mih}async function lYo(e,t){if(e==null||e.id==null||e.exclusion_percentage==null)return;let r=Number(e.exclusion_percentage);if(!Number.isFinite(r))return;let n=Math.min(Math.max(r,0),100);if(!(n!==100&&await PHt("holdout",t,"","-")>n/100))return`holdout-${e.id}`}function _nn(e){let t=[],r=0;for(let n of e){let i=r+n.rollout_percentage/100;t.push({valueMin:r,valueMax:i,key:n.key}),r=i}return t}async function pYo(e,t,r){let n=await PHt(e,t,"variant");return _nn(r).find(i=>n>=i.valueMin&&n<i.valueMax)?.key}function fYo(e,t){if(t===!1||t==null||!e)return null;let r=typeof t=="boolean"?t.toString():t,n=e[r]||null;return n==null?null:rft(n)}var Dnl=9223372036854776e3,bih="9223372036854775808",Eih=Object.prototype.propertyIsEnumerable;function Iih(){return{ancestors:new WeakSet,remainingNodes:1e4}}function sne(e,t){try{return knl(e,t,Iih(),0)}catch{return[]}}function vih(e,t){let r=e.toString(),n=BigInt(bih);return e>=n||e<-n?(t?.debug(`Attribute ${r} is outside the int64 range; encoding it as a string`),{stringValue:r}):{intValue:r}}function hYo(e,t,r,n){if(r.remainingNodes<=0)return{stringValue:Bnn};if(r.remainingNodes--,Brl(e))return{boolValue:e};if(typeof e=="bigint")return vih(e,t);if(typeof e=="number"){if(!Number.isFinite(e))return{stringValue:String(e)};if(Number.isInteger(e)){if(Number.isSafeInteger(e))return{intValue:String(e)};if("u"<typeof BigInt)return{stringValue:String(e)};let i=BigInt(e).toString();return e>=Dnl||e<-Dnl?(t?.debug(`Attribute ${i} is outside the int64 range; encoding it as a string`),{stringValue:i}):{intValue:i}}return{doubleValue:e}}if(typeof e=="string")return{stringValue:ine(e)};if(typeof e=="function")return{stringValue:Zrl};if(typeof e=="symbol")return{stringValue:String(e)};if(typeof e=="object"&&e!==null){if(r.ancestors.has(e))return{stringValue:Pnn};if(n>=20)return{stringValue:Bnn};if(e instanceof Date){let i=e.getTime(),o=Number.isFinite(i)?e.toISOString():String(e);return{stringValue:typeof o=="string"?ine(o):String(o)}}r.ancestors.add(e);try{try{let i=e.toJSON;if(typeof i=="function")return hYo(i.call(e),t,r,n+1)}catch{}return z4(e)?{arrayValue:{values:Cih(e,t,r,n+1)}}:{kvlistValue:{values:knl(e,t,r,n+1)}}}finally{r.ancestors.delete(e)}}return{stringValue:ine(String(e))}}function Cih(e,t,r,n){let i=[],o=Math.min(e.length,1e3),s=0;for(;s<o&&r.remainingNodes>0;s++)try{let a=s in e?e[s]:void 0;if(OJ(a))continue;i.push(hYo(a,t,r,n))}catch{i.push({stringValue:R8})}return e.length>s&&i.push({stringValue:Bnn}),i}function knl(e,t,r,n){let i=[];for(let o in e)if(Eih.call(e,o)){if(!o){t?.debug("Dropping an attribute with an empty key");continue}if(i.length>=1e3||r.remainingNodes<=0){t?.debug("Attributes truncated: the value exceeds the OTLP encoder budget");break}try{let s=e[o];if(FJo(s)||Phe(s))continue;i.push({key:ine(o),value:hYo(s,t,r,n)})}catch{i.push({key:ine(o),value:{stringValue:R8}})}}return i}function RHt(e,t,r){return{...Bhe({},e.resourceAttributes),"service.name":e.serviceName||"unknown_service",...e.environment&&{"deployment.environment":e.environment},...e.serviceVersion&&{"service.version":e.serviceVersion},"telemetry.sdk.name":t,"telemetry.sdk.version":r}}var xih=["service.name","deployment.environment","service.version","telemetry.sdk.name","telemetry.sdk.version"];function DHt(e,t){let r=Bhe({},e),n={};for(let i of xih)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i],delete r[i]);return[...sne(r,t),...sne(n,t)]}var Fnl={darwin:"macOS",win32:"Windows",cygwin:"Windows",linux:"Linux",android:"Android",freebsd:"FreeBSD",openbsd:"OpenBSD",netbsd:"NetBSD",sunos:"SunOS",aix:"AIX",haiku:"Haiku","Mac OS X":"macOS"};function wih(e){if(e)return Object.prototype.hasOwnProperty.call(Fnl,e)?Fnl[e]:e}function gYo(e,t){let r=wih(e);return{...r?{"os.name":r}:{},...t?{"os.version":t}:{}}}var Sih={trace:{text:"TRACE",number:1},debug:{text:"DEBUG",number:5},info:{text:"INFO",number:9},warn:{text:"WARN",number:13},error:{text:"ERROR",number:17},fatal:{text:"FATAL",number:21}},e_v=Sih.info;var $Ve=class{constructor(t){this._onFire=t,this._firesAt=0}get pending(){return!!this._timer}arm(t){this.clear(),this._firesAt=Date.now()+t,this._timer=RN(()=>{this._timer=void 0,this._onFire()},t)}armNoEarlierThan(t){this._timer&&Date.now()+t<=this._firesAt||this.arm(t)}clear(){this._timer&&(clearTimeout(this._timer),this._timer=void 0)}};function kHt(){return 1-.25+Math.random()*.25*2}var N8=1;function FHt(e,t,r,n){let i=Math.min(Math.max(0,t-1),6),o=e*2**i,s=n===void 0?o:Math.min(o,Math.max(n,e));return Math.round(s*r)}var NHt=[0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4];function AYo(e){return String(e)+"000000"}function yYo(e,t,r,n){let i="";return n&&(i=Object.keys(n).sort().map(s=>`${JSON.stringify(s)}:${JSON.stringify(n[s])}`).join(",")),`${e}\0${t}\0${r??""}\0${i}`}function Nnl(e,t){for(let r=0;r<t.length;r++)if(e<=t[r])return r;return t.length}function bYo(e,t,r){return RHt(e,t,r)}function EYo(e,t,r,n){return{resourceMetrics:[{resource:{attributes:DHt(t)},scopeMetrics:[{scope:{name:r,version:n},metrics:e}]}]}}function Vnn(e){let t=e?.resourceAttributes;return{serviceName:t?.["service.name"]??e?.serviceName,serviceVersion:t?.["service.version"]??e?.serviceVersion,environment:t?.["deployment.environment"]??e?.environment,resourceAttributes:t,beforeSend:e?.beforeSend,flushIntervalMs:e?.flushIntervalMs??1e4,maxSeriesPerFlush:e?.maxSeriesPerFlush??1e3}}var jnl=1,jHt=class{constructor(t,r,n){this._instance=t,this._config=r,this._logger=n,this._series=new Map,this._flushTimer=new $Ve(()=>this.flush().catch(i=>{this._logger.error("Metrics flush failed:",i)})),this._flushPromise=null,this._seriesCapWarned=!1,this._typeByName=new Map,this._typeCollisionWarned=new Set,this._retryAfter=new XVe,this._consecutiveFlushFailures=0,this._flushJitter=N8,this._generation=0}count(t,r=1,n){this._capture({name:t,type:"count",value:r,unit:n?.unit,attributes:n?.attributes})}gauge(t,r,n){this._capture({name:t,type:"gauge",value:r,unit:n?.unit,attributes:n?.attributes})}histogram(t,r,n){this._capture({name:t,type:"histogram",value:r,unit:n?.unit,attributes:n?.attributes})}flush(){let t=this._flushPromise,n=(async()=>{t&&await t.catch(()=>{}),await this._doFlush()})().finally(()=>{this._flushPromise===n&&(this._flushPromise=null)});return this._flushPromise=n,n}drainWindow(){if(this._series.size===0)return null;let t=this._series;return this._series=new Map,this._seriesCapWarned=!1,this._typeByName=new Map,this._typeCollisionWarned=new Set,this._buildPayload(t)}reset(){this._generation++,this._retryAfter.reset(),this._consecutiveFlushFailures=0,this._flushJitter=N8,this._flushTimer.clear(),this._series=new Map,this._flushPromise=null,this._seriesCapWarned=!1,this._typeByName=new Map,this._typeCollisionWarned=new Set}_capture(t){if(this._instance.isDisabled||this._instance.optedOut)return;let r=this._runBeforeSend(t);if(r===null)return;if(!r.name||typeof r.name!="string")return void this._logger.warn("Dropping metric with empty name");if(typeof r.value!="number"||!Number.isFinite(r.value))return void this._logger.warn(`Dropping metric '${r.name}': value must be a finite number`);if(r.type==="count"&&r.value<0)return void this._logger.warn(`Dropping count '${r.name}': counters are monotonic, value must be >= 0`);let n,i;try{n=r.attributes?{...r.attributes}:void 0,i=yYo(r.type,r.name,r.unit,n)}catch(a){this._logger.warn(`Dropping metric '${r.name}': attributes could not be serialized`,a);return}let o=this._series.get(i);if(!o){if(!this._admitNewSeries())return;o={name:r.name,type:r.type,unit:r.unit,attributes:n,windowStartMs:Date.now()},this._series.set(i,o)}let s=this._typeByName.get(r.name);s===void 0?this._typeByName.set(r.name,r.type):s!==r.type&&!this._typeCollisionWarned.has(r.name)&&(this._typeCollisionWarned.add(r.name),this._logger.warn(`Metric name '${r.name}' is already used as a ${s}; recording it as a ${r.type} too will blend both series in charts. Use a distinct name.`)),this._fold(o,r.value),this._armFlushTimer()}_admitNewSeries(){return this._series.size<this._config.maxSeriesPerFlush?!0:(this._seriesCapWarned||(this._seriesCapWarned=!0,this._logger.warn(`Metric series cap reached (${this._config.maxSeriesPerFlush} per flush window); dropping new series until the next flush. Reduce attribute cardinality.`)),!1)}_fold(t,r){switch(t.type){case"count":t.total=(t.total??0)+r;break;case"gauge":t.last=r;break;case"histogram":{t.hist||(t.hist={count:0,sum:0,min:r,max:r,bucketCounts:new Array(NHt.length+1).fill(0)});let n=t.hist;n.count+=1,n.sum+=r,n.min=Math.min(n.min,r),n.max=Math.max(n.max,r),n.bucketCounts[Nnl(r,NHt)]+=1;break}}}_runBeforeSend(t){let r=this._config.beforeSend;if(!r)return t;let n=z4(r)?r:[r],i=t;for(let o of n)try{let s=o(i);if(!s)return this._logger.info("Metric was rejected in beforeSend function"),null;i=s}catch(s){return this._logger.error("Error in beforeSend function for metric:",s),null}return i}_armFlushTimer(){this._flushTimer.pending||this._flushTimer.arm(this._nextFlushDelay())}_nextFlushDelay(){return Math.max(FHt(this._config.flushIntervalMs,this._consecutiveFlushFailures,this._flushJitter,3e4),this._retryAfter.remainingMs())}async _doFlush(){if(this._flushTimer.clear(),this._series.size===0)return;let t=this._series;this._series=new Map,this._seriesCapWarned=!1,this._typeByName=new Map,this._typeCollisionWarned=new Set;let r=this._generation,n=await this._instance._sendMetricsBatch(this._buildPayload(t));if(r===this._generation)switch(this._retryAfter.record(n),n.kind==="retry-later"?(this._consecutiveFlushFailures++,this._flushJitter=kHt()):(this._consecutiveFlushFailures=0,this._flushJitter=N8),this._flushTimer.pending&&this._flushTimer.arm(this._nextFlushDelay()),n.kind){case"ok":return;case"retry-later":this._mergeWindowBack(t),this._flushTimer.armNoEarlierThan(this._nextFlushDelay());return;case"too-large":this._logger.warn("Metrics batch exceeded the server size limit and was dropped");return;case"fatal":this._logger.error("Failed to send metrics batch:",n.error);return}}_buildPayload(t){return EYo(this._buildMetrics(t),bYo(this._config,this._instance.getLibraryId(),this._instance.getLibraryVersion()),this._instance.getLibraryId(),this._instance.getLibraryVersion())}_buildMetrics(t){let r=AYo(Date.now()),n=new Map;for(let i of t.values()){let o=yYo(i.type,i.name,i.unit,void 0),s=n.get(o);s||(s={name:i.name,...i.unit&&{unit:i.unit}},i.type==="count"?s.sum={aggregationTemporality:jnl,isMonotonic:!0,dataPoints:[]}:i.type==="gauge"?s.gauge={dataPoints:[]}:s.histogram={aggregationTemporality:jnl,dataPoints:[]},n.set(o,s));let a=sne(i.attributes??{},this._logger),c=AYo(i.windowStartMs);if(i.type==="count"){let u={attributes:a,startTimeUnixNano:c,timeUnixNano:r,asDouble:i.total??0};s.sum.dataPoints.push(u)}else if(i.type==="gauge"){let u={attributes:a,timeUnixNano:r,asDouble:i.last??0};s.gauge.dataPoints.push(u)}else if(i.hist){let u={attributes:a,startTimeUnixNano:c,timeUnixNano:r,count:i.hist.count,sum:i.hist.sum,min:i.hist.min,max:i.hist.max,bucketCounts:i.hist.bucketCounts,explicitBounds:NHt};s.histogram.dataPoints.push(u)}}return Array.from(n.values())}_mergeWindowBack(t){for(let[r,n]of t){let i=this._series.get(r);if(!i){this._admitNewSeries()&&this._series.set(r,n);continue}switch(i.windowStartMs=Math.min(i.windowStartMs,n.windowStartMs),i.type){case"count":i.total=(i.total??0)+(n.total??0);break;case"gauge":break;case"histogram":if(n.hist)if(i.hist){i.hist.count+=n.hist.count,i.hist.sum+=n.hist.sum,i.hist.min=Math.min(i.hist.min,n.hist.min),i.hist.max=Math.max(i.hist.max,n.hist.max);for(let o=0;o<i.hist.bucketCounts.length;o++)i.hist.bucketCounts[o]+=n.hist.bucketCounts[o]}else i.hist=n.hist;break}}}};var Bih="0".repeat(32),Rih="0".repeat(16),Dih=/^[0-9a-f]+$/;function kih(e){let t=new Uint8Array(e),r=globalThis.crypto;if(r&&typeof r.getRandomValues=="function")try{return r.getRandomValues(t),t}catch{}for(let n=0;n<e;n++)t[n]=Math.floor(256*Math.random());return t}function Fih(e){let t="";for(let r=0;r<e.length;r++)t+=e[r].toString(16).padStart(2,"0");return t}function znl(e){let t=Fih(kih(e));return/[^0]/.test(t)?t:t.slice(0,-1)+"1"}function Qnl(){return znl(16)}function Mnl(){return znl(8)}function Lnl(e,t,r){return typeof e=="string"&&e.length===t&&e!==r&&Dih.test(e)}function _nl(e){return Lnl(e,32,Bih)}function Unl(e){return Lnl(e,16,Rih)}var Nih=/^([0-9a-f]{2})-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})(-.*)?$/;function Vnl(e){let t=Gnl(e);return t&&{traceId:t.traceId,spanId:t.spanId,flags:jih(t.flags)}}function jih(e){return 1&parseInt(e,16)?qnn:zih}function Gnl(e){if(typeof e!="string")return;let t=Nih.exec(e.trim());if(!t)return;let[,r,n,i,o,s]=t;if(r!=="ff"&&!(r==="00"&&s)&&!(!_nl(n)||!Unl(i)))return{version:r,traceId:n,spanId:i,flags:o}}function qnl(e){return Gnl(e)&&e.trim()}function Gnn(e){return Array.isArray(e)&&e.length===1?e[0]:e}var qnn="01",zih="00";function Wnl(e,t,r=qnn){return`00-${e}-${t}-${r}`}var Qih=32,IYo=512;function Wnn(e){if(typeof e!="string")return;let t=e.trim();if(!t||/[^\x20-\x7e\t]/.test(t))return;let r=t.split(",");if(!(r.length>Qih)){for(let n of r)if(n.trim()&&!n.includes("="))return;return t.length<=IYo?t:Lih(r)}}var Mih=128;function Lih(e){let t=[...e],r=()=>t.reduce((n,i)=>n+i.length,0)+t.length-1;for(let n=t.length-1;n>=0&&r()>IYo;n--)t[n].length>Mih&&t.splice(n,1);for(;t.length&&r()>IYo;)t.pop();return t.length?t.join(","):void 0}var Hnl="unknown";function e5e(e,t,r,n){return typeof e=="string"&&e.trim()?e.length>r?e.slice(0,r):e:(n?.debug(`${t} must be a non-empty string; using "${Hnl}"`),Hnl)}function ift(e){if(e==null)return;let t=e;if(e instanceof Date)try{t=e.getTime()}catch{return}if(!(typeof t!="number"||!Number.isFinite(t))&&!(t<0||t>9223372036854))return t}function Knl(e,t,r){let n=ift(e);return n===void 0?(e!==void 0&&r?.debug("Span startTime is out of range or not a valid time; using the current time"),t):(t-n>864e5?r?.debug("Span startTime is more than 24 hours in the past; the server will clamp it to receive time and keep the original in $originalTimestamp"):n>t&&r?.debug("Span startTime is in the future; the span may export with a zero duration"),n)}function Hnn(e,t){return e<t?t:e}function zHt(e,t,r,n){let i=ift(e);return i===void 0?(e!==void 0&&n?.debug(`Span ${r} is out of range or not a valid time; using the derived time`),t):i}function Jnn(){let e=globalThis.performance;return typeof e?.now=="function"?e.now():void 0}var oft=class{constructor(t,r,n){this._onEnd=r,this._logger=n,this._events=[],this._ended=!1,this._userAttributeCount=0,this._userEventCount=0,this._droppedAttributes=0,this._droppedEvents=0,this._traceId=t.traceId,this._spanId=t.spanId,this._parentSpanId=t.parentSpanId,this._traceState=t.traceState,this._traceFlags=t.traceFlags??qnn,this._parentIsRemote=t.parentIsRemote??!1,this._name=t.name,this._kind=t.kind,this._autoKeys=new Set(t.autoAttributeKeys),this._maxAttributes=t.maxAttributes,this._maxEvents=t.maxEvents,this._maxAttributesPerEvent=t.maxAttributesPerEvent,this._maxAttributeValueLength=t.maxAttributeValueLength,this._attributes=Object.create(null);for(let i of Object.keys(t.attributes))this._writeAttribute(i,t.attributes[i]);this._startMono=t.backdated?void 0:Jnn(),this._startTime=t.clockAnchor&&this._startMono!==void 0?t.clockAnchor.wall+(this._startMono-t.clockAnchor.mono):t.startTime,this._startMono!==void 0&&(this._clockAnchor=t.clockAnchor??{wall:this._startTime,mono:this._startMono})}_now(){if(this._startMono!==void 0){let t=Jnn();if(t!==void 0)return this._startTime+Math.max(0,t-this._startMono)}return Date.now()}_mutable(t){return this._ended?(this._logger?.debug(`Ignoring ${t} on a span that has already ended`),!1):!0}_writeAttribute(t,r){if(OJ(r)){t in this._attributes&&!this._autoKeys.has(t)&&this._userAttributeCount--,delete this._attributes[t];return}if(!this._autoKeys.has(t)&&!(t in this._attributes)){if(this._userAttributeCount>=this._maxAttributes)return void this._droppedAttributes++;this._userAttributeCount++}this._attributes[t]=Xnn(r,this._maxAttributeValueLength)}setAttribute(t,r){return this._mutable("setAttribute")&&this._writeAttribute(t,r),this}setAttributes(t){if(this._mutable("setAttributes")){let r=Bhe({},t);for(let n of Object.keys(r))this._writeAttribute(n,r[n])}return this}addEvent(t,r,n){if(this._mutable("addEvent")){if(this._userEventCount>=this._maxEvents)return this._droppedEvents++,this;this._userEventCount++;let i=r&&Znl(r,this._maxAttributesPerEvent,this._maxAttributeValueLength);this._events.push({name:e5e(t,"Span event name",this._maxAttributeValueLength,this._logger),timestamp:zHt(n,this._now(),"event timestamp",this._logger),...i&&{attributes:i.attributes,...i.dropped&&{droppedAttributesCount:i.dropped}}})}return this}setStatus(t,r){if(this._mutable("setStatus")){if(t!=="ok"&&t!=="error")return this._logger?.debug(`Ignoring unknown span status "${String(t)}"; expected "ok" or "error"`),this;this._status={code:t,...r&&{message:vYo(r,this._maxAttributeValueLength)}}}return this}get statusIsExplicitlyOk(){return this._status?.code==="ok"}recordException(t){if(!this._mutable("recordException"))return this;let{type:r,message:n,stack:i}=CYo(t);return this.addEvent(_ih,{"exception.type":r,"exception.message":n,...i&&{"exception.stacktrace":i}}),this.setStatus("error",n)}updateName(t){return this._mutable("updateName")&&(this._name=e5e(t,"Span name",this._maxAttributeValueLength,this._logger)),this}traceparent(){return Wnl(this._traceId,this._spanId,this._traceFlags)}tracestate(){return this._traceState??null}childContext(){return{traceId:this._traceId,parentSpanId:this._spanId,traceState:this._traceState,traceFlags:this._traceFlags,clockAnchor:this._clockAnchor}}end(t){if(this._ended)return void this._logger?.debug("Ignoring end() on a span that has already ended");this._ended=!0;let r=this._now(),n=zHt(t,r,"end time",this._logger);this._onEnd({traceId:this._traceId,spanId:this._spanId,...this._parentSpanId&&{parentSpanId:this._parentSpanId},...this._traceState&&{traceState:this._traceState},traceFlags:this._traceFlags,parentIsRemote:this._parentIsRemote,name:this._name,kind:this._kind,...this._status&&{status:this._status},attributes:{...this._attributes},events:this._events,startTime:this._startTime,endTime:Hnn(n,this._startTime),...this._droppedAttributes&&{droppedAttributesCount:this._droppedAttributes},...this._droppedEvents&&{droppedEventsCount:this._droppedEvents}},this._autoKeys)}},_ih="exception",Uih=4294967295;function Vih(e){try{return typeof e=="string"?e:String(e)}catch{return R8}}function t5e(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?0:Math.min(Math.floor(e),Uih)}function Gih(e,t){if(!t.length)return Object.keys(e);let r=t.filter(i=>Object.prototype.propertyIsEnumerable.call(e,i)),n=new Set(r);return[...r,...Object.keys(e).filter(i=>!n.has(i))]}function Ynl(e,t,r,n,i,o,s=[]){let a=0,c=0,u={};for(let d of Gih(e.attributes,s)){let m=e.attributes[d];if(!OJ(m)){if(!t.has(d)){if(a>=r){c++;continue}a++}Object.defineProperty(u,d,{value:Xnn(m,o),enumerable:!0,writable:!0,configurable:!0})}}e.attributes=u,c&&(e.droppedAttributesCount=t5e(e.droppedAttributesCount)+c);let l=0,p=0,f=[];for(let d of e.events){if(l>=n){p++;continue}if(l++,d.attributes){let m=Znl(d.attributes,i,o);d.attributes=m.attributes,m.dropped&&(d.droppedAttributesCount=t5e(d.droppedAttributesCount)+m.dropped)}f.push(d)}e.events=f,p&&(e.droppedEventsCount=t5e(e.droppedEventsCount)+p),e.status?.message&&(e.status={...e.status,message:vYo(Vih(e.status.message),o)})}var Ynn=class{setAttribute(){return this}setAttributes(){return this}addEvent(){return this}setStatus(){return this}recordException(){return this}updateName(){return this}traceparent(){return null}tracestate(){return null}end(){}},Xnl=new Ynn,QHt=class extends Ynn{constructor(t,r){super(),this._traceparent=t,this._tracestate=r}traceparent(){return this._traceparent}tracestate(){return this._tracestate??null}};function qih(e){try{let t=e.stack;return typeof t=="string"&&t?{stack:t}:{}}catch{return{}}}function ZSe(e,t){let r=Gnn(e?.parent)??t,n=typeof r=="string"||r==null?r:Jnl(r,"traceparent"),i=qnl(n);if(!i)return Xnl;let o=typeof r=="string"||r==null?e?.tracestate:Jnl(r,"tracestate");return new QHt(i,Wnn(o))}function Jnl(e,t){try{let r=e[t];return typeof r=="function"?r.call(e):void 0}catch{return}}function vYo(e,t){return e.length>t?e.slice(0,t):e}function Xnn(e,t){return Knn(e,t,{ancestors:new WeakSet,remainingNodes:1e4},0)}function Knn(e,t,r,n){if(e===null||typeof e!="object")return OJ(e)||r.remainingNodes<=0?e:(r.remainingNodes--,typeof e=="string"?vYo(e,t):e);if(r.ancestors.has(e))return Pnn;if(r.remainingNodes<=0||n>=20)return e;r.remainingNodes--,r.ancestors.add(e);try{if(e instanceof Date)return e;let i=Wih(e);if(i.selfDescribed)return OJ(i.value)?String(i.value):Knn(i.value,t,r,n+1);if(z4(e)){let a=Math.min(e.length,1e3),c=[];for(let u=0;u<a;u++)try{c.push(Knn(e[u],t,r,n+1))}catch{c.push(R8)}return e.length>a&&(c.length=e.length),c}let o={},s=0;for(let a of Object.keys(e)){if(s>=1e3)break;let c;try{c=Knn(e[a],t,r,n+1)}catch{c=R8}a&&!OJ(c)&&s++,Object.defineProperty(o,a,{value:c,enumerable:!0,writable:!0,configurable:!0})}return o}catch{return e}finally{r.ancestors.delete(e)}}function Wih(e){try{let t=e.toJSON;if(typeof t=="function")return{selfDescribed:!0,value:t.call(e)}}catch{}return{selfDescribed:!1}}function Znl(e,t,r){let n;try{n=Object.keys(e)}catch{return{attributes:{},dropped:0}}let i={},o=0,s=0;for(let a of n){if(o>=t){s++;continue}let c;try{c=Xnn(e[a],r)}catch{c=R8}OJ(c)||(o++,Object.defineProperty(i,a,{value:c,enumerable:!0,writable:!0,configurable:!0}))}return{attributes:i,dropped:s}}function $nl(e,t){for(let r of Object.keys(e))e[r]=Xnn(e[r],t);return e}function MHt(e,t,r){return t===Xnl?r(t):e.with(t,()=>r(t))}function CYo(e){try{let t=qih(e);if(YSe(e))return{type:e.name||"Error",message:e.message||"",...t};if(typeof e=="string")return{type:"string",message:e};if(e&&typeof e=="object"){let r=e;if(typeof r.message=="string")return{type:typeof r.name=="string"?r.name:"Object",message:r.message,...t}}return{type:typeof e,message:String(e)}}catch{return{type:typeof e,message:""}}}var xYo={internal:1,server:2,client:3,producer:4,consumer:5},Hih={ok:1,error:2},Kih=1,Jih=256,Yih=512;function Xih(e){let t=parseInt(e.traceFlags,16);return(Number.isFinite(t)?255&t:Kih)|Jih|(e.parentIsRemote?Yih:0)}function Znn(e){if(typeof e=="string")return ine(e);try{return ine(String(e))}catch{return R8}}function Zih(e){return e&&Object.prototype.hasOwnProperty.call(xYo,e)?xYo[e]:xYo.internal}function wYo(e){let t=Math.floor(e),r=Math.round((e-t)*1e6);return r>=1e6&&(t+=1,r=0),String(t)+String(r).padStart(6,"0")}function $ih(e,t){let r={name:Znn(e.name),timeUnixNano:wYo(e.timestamp)};if(e.attributes){let i=sne(e.attributes,t);i.length&&(r.attributes=i)}let n=t5e(e.droppedAttributesCount);return n&&(r.droppedAttributesCount=n),r}function eil(e,t){let r={traceId:e.traceId,spanId:e.spanId,name:Znn(e.name),kind:Zih(e.kind),startTimeUnixNano:wYo(e.startTime),endTimeUnixNano:wYo(e.endTime),flags:Xih(e)};e.parentSpanId&&(r.parentSpanId=e.parentSpanId),e.traceState&&(r.traceState=Znn(e.traceState));let n=sne(e.attributes,t);n.length&&(r.attributes=n),e.events.length&&(r.events=e.events.map(s=>$ih(s,t)));let i=t5e(e.droppedAttributesCount);i&&(r.droppedAttributesCount=i);let o=t5e(e.droppedEventsCount);return o&&(r.droppedEventsCount=o),e.status&&(r.status={code:Hih[e.status.code],...e.status.message&&{message:Znn(e.status.message)}}),r}function til(e,t,r){return RHt(e,t,r)}function ril(e,t,r,n,i){return{resourceSpans:[{resource:{attributes:DHt(t,i)},scopeSpans:[{scope:{name:r,version:n},spans:e}]}]}}var nil=8;function $nn(){return Jnn()??Date.now()}function SYo(e){try{return e instanceof oft}catch{return!1}}function iil(e,t){let r=Vnl(e);if(r)return{traceId:r.traceId,parentSpanId:r.spanId,traceState:Wnn(t),traceFlags:r.flags,isRemote:!0}}function eoh(e){try{return typeof e.traceparent=="function"}catch{return!1}}function toh(e){return!!e.attributes&&typeof e.attributes=="object"&&!Array.isArray(e.attributes)&&Array.isArray(e.events)&&e.name!==void 0&&e.kind!==void 0&&e.startTime!==void 0&&e.endTime!==void 0}function ein(e,t,r){e[t]!==r&&(e[t]=r)}function roh(e,t){try{let r=Object.getOwnPropertyDescriptors(e);for(let n of["traceId","spanId","parentSpanId","traceState"])r[n]={value:t[n],enumerable:!0,writable:!0,configurable:!0};return Object.create(Object.getPrototypeOf(e),r)}catch{return e}}var LHt=class{constructor(t,r,n,i,o,s){this._instance=t,this._config=r,this._logger=n,this._getContext=i,this._contextManager=o,this._onSpanQueued=s,this._queue=[],this._flushTimer=new $Ve(()=>this._flushInBackground()),this._flushPromise=null,this._droppedSinceWarning=0,this._lastDropWarningAt=0,this._dropReasons=new Set,this._consecutiveFlushFailures=0,this._flushJitter=N8,this._retryAfter=new XVe,this._headBatchFailures=0,this._headBatchSize=0,this._headBatchChargeableAt=0,this._generation=0,this._liveSpans=new Map,this._maxExportBatchSize=r.maxExportBatchSize}startSpan(t,r){if(this._instance.isDisabled||this._instance.optedOut)return ZSe(r,this._contextManager.active());let n=Gnn(r?.parent);if(n&&typeof n!="string"&&!SYo(n)){if(eoh(n))return this._logger.debug("Span parent is not a span from this SDK; returning an inert span"),ZSe(r,this._contextManager.active());this._logger.debug("Ignoring an unusable span parent")}let i=this._resolveParent(n,r);if(this._liveSpans.size>=this._config.maxLiveSpans&&this._evictAgedSpans(),this._liveSpans.size>=this._config.maxLiveSpans)return this._recordDrop(1,`the live-span limit (${this._config.maxLiveSpans}) was reached \u2014 spans are being started and never ended`),ZSe(r,this._contextManager.active());let o=Date.now(),s=Knl(r?.startTime,o,this._logger),a=Mnl();this._liveSpans.set(a,$nn());let c=this._autoContextAttributes();return new oft({traceId:i?.traceId??Qnl(),spanId:a,parentSpanId:i?.parentSpanId,traceState:i?.traceState,traceFlags:i?.traceFlags,parentIsRemote:i?.isRemote,name:e5e(t,"Span name",this._config.maxAttributeValueLength,this._logger),kind:r?.kind??"internal",attributes:Bhe({...c},r?.attributes),autoAttributeKeys:Object.keys(c),maxAttributes:this._config.maxAttributesPerSpan,maxEvents:this._config.maxEventsPerSpan,maxAttributesPerEvent:this._config.maxAttributesPerEvent,maxAttributeValueLength:this._config.maxAttributeValueLength,startTime:s,backdated:s!==o,clockAnchor:ift(r?.startTime)===void 0?i?.clockAnchor:void 0},(u,l)=>this._onSpanEnd(u,l),this._logger)}withSpan(t,r,n){let i=typeof r=="function"?void 0:r,o=typeof r=="function"?r:n,s=this.startSpan(t,i);try{let a=MHt(this._contextManager,s,o);return rnl(a)?a.then(c=>(s.end(),c),c=>{throw this._recordCallbackError(s,c),s.end(),c}):(s.end(),a)}catch(a){throw this._recordCallbackError(s,a),s.end(),a}}getActiveSpan(){return this._contextManager.active()??null}get throttled(){return this._retryAfter.isOpen()}async flush(){for(;;)if(!this._queue.length||!await(this._flushPromise??this._startFlush()))return}_startFlush(){this._flushTimer.clear();let t=this._generation,r=Promise.resolve().then(()=>t===this._generation?this._flushInner():0).finally(()=>{this._flushPromise===r&&(this._flushPromise=null),this._armFlushTimerIfQueuedNoEarlierThan()});return this._flushPromise=r,r}reset(){this._flushTimer.clear(),this._queue.length&&this._logger.critical(`Discarding ${this._queue.length} span(s) that were still queued when tracing was shut down. Raise the shutdown timeout or flush earlier if they matter.`),this._queue=[],this._liveSpans.clear(),this._flushPromise=null,this._generation++,this._maxExportBatchSize=this._config.maxExportBatchSize,this._droppedSinceWarning=0,this._dropReasons.clear(),this._lastDropWarningAt=0,this._consecutiveFlushFailures=0,this._flushJitter=N8,this._retryAfter.reset(),this._resetHeadBatchBudget()}_resetHeadBatchBudget(){this._headBatchFailures=0,this._headBatchChargeableAt=0}_resolveParent(t,r){if(typeof t=="string"){let i=iil(t,r?.tracestate);return i||this._logger.debug("Ignoring malformed traceparent; starting a new trace"),i}if(SYo(t))return t.childContext();let n=this._contextManager.active();if(SYo(n))return n.childContext();if(n instanceof QHt)return iil(n.traceparent(),n.tracestate()??void 0)}_autoContextAttributes(){let t;try{t=this._getContext()}catch(n){return this._logger.debug("Failed to read tracing context; span will carry no PostHog attributes",n),{}}let r={};return t.distinctId&&(r.posthogDistinctId=t.distinctId),t.sessionId&&(r.sessionId=t.sessionId),t.currentUrl&&(r["url.full"]=t.currentUrl),t.screenName&&(r["screen.name"]=t.screenName),t.appState&&(r["app.state"]=t.appState),r}_recordCallbackError(t,r){if(!(t instanceof oft))return;let{type:n,message:i,stack:o}=CYo(r);t.addEvent("exception",{"exception.type":n,"exception.message":i,...o&&{"exception.stacktrace":o}}),t.statusIsExplicitlyOk||t.setStatus("error",i)}_evictAgedSpans(){let t=$nn()-this._config.maxSpanAgeMs,r=0;for(let[n,i]of this._liveSpans){if(i>t)break;this._liveSpans.delete(n),r++}r&&this._recordDrop(r,`they were still live after ${this._config.maxSpanAgeMs}ms`)}_onSpanEnd(t,r){if(!this._liveSpans.delete(t.spanId))return;if(this._instance.isDisabled||this._instance.optedOut)return void this._recordDrop(1,"the user has opted out");let n=this._runBeforeSpanSend(t,r);if(n){if(this._reportLimitDrops(n),this._queue.length>=this._config.maxQueueSize)return void this._recordDrop(1,`the queue is full (${this._config.maxQueueSize}) \u2014 raise the flush frequency or reduce span volume`);this._queue.push(n);try{this._onSpanQueued?.()}catch(i){this._logger.debug("Span queue notification failed",i)}!(this._queue.length>=this._maxExportBatchSize)||this._consecutiveFlushFailures||this._retryAfter.isOpen()?this._armFlushTimerIfQueued():this._flushInBackground()}}_reportLimitDrops(t){let r=t.droppedAttributesCount??0,n=t.droppedEventsCount??0,i=0;for(let o of t.events)i+=o.droppedAttributesCount??0;(r||n||i)&&this._logger.debug(`Span limits discarded data from "${t.name}": ${r} attributes, ${n} events, ${i} event attributes`)}_runBeforeSpanSend(t,r){if(!this._config.beforeSpanSend.length)return t;let n={traceId:t.traceId,spanId:t.spanId,parentSpanId:t.parentSpanId,traceState:t.traceState},i={startTime:t.startTime,endTime:t.endTime},o={attributes:t.droppedAttributesCount,events:t.droppedEventsCount},s=Object.keys(t.attributes),a={traceFlags:t.traceFlags,parentIsRemote:t.parentIsRemote},c=t.status&&{...t.status},u=t,l=t;try{for(let d of this._config.beforeSpanSend){let m=d(u);if(!m)return this._recordDrop(1,"beforeSpanSend dropped it"),null;u=this._keepSpanIdentity(m,n)}if(l={traceId:n.traceId,spanId:n.spanId,parentSpanId:n.parentSpanId,traceState:n.traceState,name:u.name,kind:u.kind,status:u.status,attributes:u.attributes,events:u.events,startTime:u.startTime,endTime:u.endTime,traceFlags:a.traceFlags,parentIsRemote:a.parentIsRemote,droppedAttributesCount:o.attributes,droppedEventsCount:o.events},!toh(l))return this._logger.debug("beforeSpanSend did not return a span record; dropping the span"),this._recordDrop(1,"beforeSpanSend returned an unusable record"),null;l.name=e5e(l.name,"Span name",this._config.maxAttributeValueLength,this._logger),l.status&&l.status.code!=="ok"&&l.status.code!=="error"&&(this._logger.debug("beforeSpanSend set an unknown span status; keeping the original"),l.status=c),l.startTime=ift(l.startTime)??i.startTime,l.endTime=Hnn(ift(l.endTime)??i.endTime,l.startTime);let f=[];for(let d of l.events)try{f.push({...d,name:e5e(d.name,"Span event name",this._config.maxAttributeValueLength,this._logger),timestamp:zHt(d.timestamp,l.startTime,"event timestamp",this._logger)})}catch{this._logger.debug("beforeSpanSend left an unreadable span event; dropping it")}return l.events=f,Ynl(l,r,this._config.maxAttributesPerSpan,this._config.maxEventsPerSpan,this._config.maxAttributesPerEvent,this._config.maxAttributeValueLength,s),l}catch(p){return this._logger.debug("beforeSpanSend failed; dropping the span rather than exporting it unscrubbed",p),this._recordDrop(1,"beforeSpanSend failed"),null}}_keepSpanIdentity(t,r){(t.traceId!==r.traceId||t.spanId!==r.spanId||t.parentSpanId!==r.parentSpanId)&&this._logger.debug("beforeSpanSend changed a span identity field; keeping the original ids");try{ein(t,"traceId",r.traceId),ein(t,"spanId",r.spanId),ein(t,"parentSpanId",r.parentSpanId),ein(t,"traceState",r.traceState)}catch{return roh(t,r)}return t}_recordDrop(t,r){this._droppedSinceWarning+=t,this._dropReasons.add(r),Date.now()-this._lastDropWarningAt>=this._config.flushIntervalMs&&this._warnAboutDrops()}_warnAboutDrops(){this._droppedSinceWarning&&(this._lastDropWarningAt=Date.now(),this._logger.warn(`Dropping ${this._droppedSinceWarning} span(s): ${[...this._dropReasons].join("; ")}`),this._droppedSinceWarning=0,this._dropReasons.clear())}_encodeBatch(t){let r=[];for(let n of t)try{r.push(eil(n,this._logger))}catch(i){this._logger.debug("Failed to encode a span; dropping it",i),this._recordDrop(1,"its attributes could not be encoded")}return r}_discardQueueIfConsentWithdrawn(){if(!this._instance.isDisabled&&!this._instance.optedOut)return 0;let t=this._queue.length;return this._queue=[],this._resetHeadBatchBudget(),this._recordDrop(t,"the user has opted out"),this._warnAboutDrops(),t}async _flushInner(){if(!this._queue.length)return 0;let t=this._discardQueueIfConsentWithdrawn();if(t)return t;let r=$nl(til(this._config,this._instance.getLibraryId(),this._instance.getLibraryVersion()),this._config.maxAttributeValueLength),n=this._instance.getLibraryId(),i=this._instance.getLibraryVersion(),o=this._queue.length,s=0,a=1/0,c=this._generation;try{for(;o>0&&this._queue.length>0;){let u=this._discardQueueIfConsentWithdrawn();if(u)return s+u;let l=this._headBatchFailures>0?Math.min(this._maxExportBatchSize,this._headBatchSize):this._maxExportBatchSize,p=Math.max(1,Math.min(l,a,o,this._queue.length)),f=this._queue.slice(0,p),d=this._encodeBatch(f);if(!d.length){this._queue.splice(0,p),o-=p,s+=p,this._resetHeadBatchBudget();continue}let m=$nn()>=this._headBatchChargeableAt&&!this._retryAfter.isOpen(),g=await this._instance._sendTracesBatch(ril(d,r,n,i,this._logger));if(c!==this._generation)break;if(this._retryAfter.record(g),g.kind==="ok"){this._consecutiveFlushFailures=0,this._flushJitter=N8,this._resetHeadBatchBudget(),this._queue.splice(0,p),o-=p,s+=p,this._maxExportBatchSize<this._config.maxExportBatchSize&&this._maxExportBatchSize++;continue}if(g.kind==="too-large"){if(p===1){this._queue.splice(0,1),o-=1,s+=1,this._recordDrop(1,"it is too large for the ingestion endpoint"),this._consecutiveFlushFailures=0,this._flushJitter=N8,this._resetHeadBatchBudget();continue}let A=Math.max(1,Math.floor(p/2));g.measuredLocally?a=A:this._maxExportBatchSize=A,this._resetHeadBatchBudget(),this._logger.debug(`Batch too large; retrying the same spans in batches of ${A}`);continue}if(g.kind==="retry-later"){if(this._consecutiveFlushFailures++,this._flushJitter=kHt(),this._headBatchSize=p,m&&(this._headBatchFailures++,this._headBatchChargeableAt=$nn()+this._nextFlushDelay()),this._headBatchFailures<nil)return this._logger.debug("Span export failed; retrying on the next flush",g.error),s;if(this._queue.splice(0,p),o-=p,s+=p,this._consecutiveFlushFailures=0,this._flushJitter=N8,this._resetHeadBatchBudget(),this._recordDrop(p,`the ingestion endpoint failed ${nil} times in a row`),this._retryAfter.isOpen())return s;continue}this._logger.debug("Dropping a span batch the ingestion endpoint rejected",g.error),this._queue.splice(0,p),o-=p,s+=p,this._consecutiveFlushFailures=0,this._flushJitter=N8,this._resetHeadBatchBudget(),this._recordDrop(p,"the ingestion endpoint rejected the batch")}return s}finally{this._warnAboutDrops()}}_flushInBackground(){this._backgroundFlush||(this._backgroundFlush=this.flush().catch(t=>{this._logger.debug("Background span flush failed",t)}).finally(()=>{this._backgroundFlush=void 0,this._armFlushTimerIfQueuedNoEarlierThan()}))}_armFlushTimerIfQueued(){this._flushTimer.pending||!this._queue.length||this._flushTimer.arm(this._nextFlushDelay())}_armFlushTimerIfQueuedNoEarlierThan(){this._queue.length&&this._flushTimer.armNoEarlierThan(this._nextFlushDelay())}_nextFlushDelay(){return Math.max(FHt(this._config.flushIntervalMs,this._consecutiveFlushFailures,this._flushJitter,3e4),this._retryAfter.remainingMs())}};var _Ht=class{active(){return this._active}with(t,r){let n=this._active;this._active=t;try{return r()}finally{this._active=n}}};var noh=5e3,ioh=512,ooh=2048,soh=128,aoh=128,coh=128,uoh=8192,loh=1e4,poh=36e5;function $Se(e,t){return typeof e=="number"&&Number.isInteger(e)&&e>=1?e:t}var oil=["service.name","service.version","deployment.environment"];function foh(e){if(!(!e||typeof e!="object"||Array.isArray(e)))try{if(oil.every(r=>!(r in e)||typeof e[r]=="string"))return e;let t={...e};for(let r of oil)r in t&&typeof t[r]!="string"&&delete t[r];return t}catch{return}}function doh(e,t){if(!e)return[];let r=[e].flat().filter(i=>!!i),n=r.filter(i=>typeof i=="function");return n.length!==r.length&&t?.critical(`beforeSpanSend: ignoring ${r.length-n.length} of ${r.length} entries that are not functions. Spans export without them, so whatever they were redacting is not redacted.`),n}function TYo(e,t,r){let n=Bhe({...t},foh(e?.resourceAttributes)),i=$Se(e?.maxExportBatchSize,ioh);return{serviceName:n?.["service.name"]??e?.serviceName,serviceVersion:n?.["service.version"]??e?.serviceVersion,environment:n?.["deployment.environment"]??e?.environment,resourceAttributes:n,beforeSpanSend:doh(e?.beforeSpanSend,r),maxAttributesPerSpan:$Se(e?.maxAttributesPerSpan,soh),maxEventsPerSpan:$Se(e?.maxEventsPerSpan,aoh),maxAttributesPerEvent:coh,maxAttributeValueLength:$Se(e?.maxAttributeValueLength,uoh),flushIntervalMs:$Se(e?.flushIntervalMs,noh),maxExportBatchSize:i,maxQueueSize:Math.max($Se(e?.maxQueueSize,ooh),i),maxLiveSpans:$Se(e?.maxLiveSpans,loh),maxSpanAgeMs:$Se(e?.maxSpanAgeMs,poh)}}var OYo=require("fs"),cil=require("fs/promises"),BYo=require("path"),uil=require("readline"),tin=new eO.ReduceableCache(25),UHt=new eO.ReduceableCache(20),RYo=7,moh=1e3,hoh=1e4,PYo=10485760;async function lil(e,t=cil.open,r){let n={},i;try{i=process.cwd()}catch{}for(let a=e.length-1;a>=0;a--){let c=e[a],u=c?.filename;if(!c||typeof u!="string"||typeof c.lineno!="number"||Eoh(u)||Ioh(c)||!(0,BYo.isAbsolute)(u)&&i===void 0)continue;n[u]||(n[u]=[]),n[u].push(c.lineno)}let o=Object.keys(n);if(o.length==0)return e;let s=[];for(let a of o){let c=pil(a,i);if(c===void 0||UHt.get(c))continue;let u=n[a];if(!u)continue;u.sort((f,d)=>f-d);let l=Coh(u);if(l.every(f=>voh(c,f)))continue;let p=xoh(tin,c,{});s.push(Aoh(a,l,p,c,t,r))}return await Promise.all(s).catch(()=>{}),e&&e.length>0&&yoh(e,tin,i),tin.reduce(),e}async function goh(e,t,r){let n,i=!1;try{n=await t(e,OYo.constants.O_RDONLY|OYo.constants.O_NONBLOCK);let o=await n.stat();return o.isFile()?o.size>PYo?void r?.debug(`Skipping source context for oversized file ${e}: ${o.size} bytes exceeds ${PYo}`):(i=!0,n):void 0}catch{return}finally{n&&!i&&await n.close().catch(()=>{})}}async function Aoh(e,t,r,n,i,o){let s=await goh(e,i,o);if(s===void 0)return void UHt.set(n,1);let a=s;return new Promise(c=>{let u=!1;function l(x){u||(u=!0,x?.destroy(),a.close().then(c,c))}let p;try{p=a.createReadStream({autoClose:!1,start:0,end:PYo-1})}catch{UHt.set(n,1),l();return}let f;try{f=(0,uil.createInterface)({input:p})}catch{UHt.set(n,1),l(p);return}let d=0,m=0,g=t[m];if(g===void 0)return void l(p);let A=g[0],y=g[1];function I(){UHt.set(n,1),f.close(),f.removeAllListeners(),l(p)}p.on("error",I),f.on("error",I),f.on("close",()=>l(p)),f.on("line",x=>{if(d++,!(d<A)&&(r[d]=woh(x,0),d>=y)){if(m===t.length-1){f.close(),f.removeAllListeners();return}m++;let v=t[m];if(v===void 0){f.close(),f.removeAllListeners();return}A=v[0],y=v[1]}})})}function yoh(e,t,r){for(let n of e)if(n.filename&&n.context_line===void 0&&typeof n.lineno=="number"){let i=pil(n.filename,r),o=i===void 0?void 0:t.get(i);if(o===void 0)continue;boh(n.lineno,n,o)}}function boh(e,t,r){if(t.lineno===void 0||r===void 0)return;t.pre_context=[];for(let i=fil(e);i<e;i++){let o=r[i];if(o===void 0)return void sil(t);t.pre_context.push(o)}if(r[e]===void 0)return void sil(t);t.context_line=r[e];let n=dil(e);t.post_context=[];for(let i=e+1;i<=n;i++){let o=r[i];if(o===void 0)break;t.post_context.push(o)}}function sil(e){delete e.pre_context,delete e.context_line,delete e.post_context}function Eoh(e){return e.startsWith("node:")||e.endsWith(".min.js")||e.endsWith(".min.cjs")||e.endsWith(".min.mjs")||e.startsWith("data:")}function Ioh(e){return e.lineno!==void 0&&e.lineno>hoh||e.colno!==void 0&&e.colno>moh}function pil(e,t){return(0,BYo.isAbsolute)(e)?JSON.stringify([null,e]):t===void 0?void 0:JSON.stringify([t,e])}function voh(e,t){let r=tin.get(e);if(r===void 0)return!1;for(let n=t[0];n<=t[1];n++)if(r[n]===void 0)return!1;return!0}function Coh(e){if(!e.length)return[];let t=0,r=e[0];if(typeof r!="number")return[];let n=ail(r),i=[];for(;;){if(t===e.length-1){i.push(n);break}let o=e[t+1];if(typeof o!="number")break;o<=n[1]?n[1]=o+RYo:(i.push(n),n=ail(o)),t++}return i}function ail(e){return[fil(e),dil(e)]}function fil(e){return Math.max(1,e-RYo)}function dil(e){return e+RYo}function xoh(e,t,r){let n=e.get(t);return n===void 0?(e.set(t,r),r):n}function woh(e,t){let r=e,n=r.length;if(n<=150)return r;t>n&&(t=n);let i=Math.max(t-60,0);i<5&&(i=0);let o=Math.min(i+140,n);return o>n-5&&(o=n),o===n&&(i=Math.max(o-140,0)),r=r.slice(i,o),i>0&&(r=`...${r}`),o<n&&(r+="..."),r}var sft=require("path");function mil(e=process.cwd()){let t=sft.sep==="\\",r=i=>t?i.replace(/\\/g,"/"):i,n=r(e);return async i=>{for(let o of i)!o.filename||o.filename.startsWith("node:")||o.filename.startsWith("data:")||(0,sft.isAbsolute)(o.filename)&&(o.filename=r((0,sft.relative)(n,r(o.filename))));return i}}var hil="5.55.0";var Dhe={ERRORS_WHILE_COMPUTING:"errors_while_computing_flags",FLAG_MISSING:"flag_missing",QUOTA_LIMITED:"quota_limited",UNKNOWN_ERROR:"unknown_error"};var e1e=class e{constructor(t){this._host=t.host,this._distinctId=t.distinctId,this._groups=t.groups,this._disableGeoip=t.disableGeoip,this._flags=t.flags,this._requestId=t.requestId,this._evaluatedAt=t.evaluatedAt,this._flagDefinitionsLoadedAt=t.flagDefinitionsLoadedAt,this._errorsWhileComputing=t.errorsWhileComputing??!1,this._quotaLimited=t.quotaLimited??!1,this._accessed=t.accessed??new Set,this._isSlice=t.isSlice??!1}isEnabled(t,r={}){let n=this._flags[t];return this._recordAccess(t),n?.enabled??r.defaultValue??!1}getFlag(t){let r=this._flags[t];if(this._recordAccess(t),!!r)return r.enabled?r.variant??!0:!1}getFlagPayload(t){return this._flags[t]?.payload}onlyAccessed(){let t={};for(let r of this._accessed){let n=this._flags[r];n&&(t[r]=n)}return this._cloneWith(t)}only(t){let r={},n=[];for(let i of t){let o=this._flags[i];o?r[i]=o:n.push(i)}return n.length>0&&this._host.logWarning(`FeatureFlagEvaluations.only() was called with flag keys that are not in the evaluation set and will be dropped: ${n.join(", ")}`),this._cloneWith(r)}get keys(){return Object.keys(this._flags)}_getEventProperties(){let t={},r=[];for(let[n,i]of Object.entries(this._flags)){let o=i.enabled===!1?!1:i.variant??!0;t[`$feature/${n}`]=o,i.enabled&&r.push(n)}return r.length>0&&(r.sort(),t.$active_feature_flags=r),t}_cloneWith(t){return new e({host:this._host,distinctId:this._distinctId,groups:this._groups,disableGeoip:this._disableGeoip,flags:t,requestId:this._requestId,evaluatedAt:this._evaluatedAt,flagDefinitionsLoadedAt:this._flagDefinitionsLoadedAt,errorsWhileComputing:this._errorsWhileComputing,quotaLimited:this._quotaLimited,accessed:new Set(this._accessed),isSlice:!0})}_recordAccess(t){if(this._accessed.add(t),this._distinctId===""||this._isSlice&&!(t in this._flags))return;let r=this._flags[t],n=r===void 0?void 0:r.enabled===!1?!1:r.variant??!0,i={$feature_flag:t,$feature_flag_response:n,$feature_flag_id:r?.id,$feature_flag_version:r?.version,$feature_flag_reason:r?.reason,locally_evaluated:r?.locallyEvaluated??!1,[`$feature/${t}`]:n,$feature_flag_request_id:this._requestId,$feature_flag_evaluated_at:r?.locallyEvaluated?Date.now():this._evaluatedAt};r?.hasExperiment!==void 0&&(i.$feature_flag_has_experiment=r.hasExperiment),r?.locallyEvaluated&&this._flagDefinitionsLoadedAt!==void 0&&(i.$feature_flag_definitions_loaded_at=this._flagDefinitionsLoadedAt);let o=[];this._errorsWhileComputing&&o.push(Dhe.ERRORS_WHILE_COMPUTING),this._quotaLimited&&o.push(Dhe.QUOTA_LIMITED),r===void 0&&o.push(Dhe.FLAG_MISSING),o.length>0&&(i.$feature_flag_error=o.join(",")),this._host.captureFlagCalledEventIfNeeded({distinctId:this._distinctId,key:t,response:n,groups:this._groups,disableGeoip:this._disableGeoip,properties:i})}};var Soh=6e4;function gil(e){return e==="client"||e==="server"?e:"all"}function Toh(e,t){return e===t||e==="all"||t==="all"}var aft=class e extends Error{constructor(t){super(),Error.captureStackTrace(this,this.constructor),this.name="ClientError",this.message=t,Object.setPrototypeOf(this,e.prototype)}};function Ooh(e,t){e.name=t.name,Error.captureStackTrace(e,t),Object.setPrototypeOf(e,t.prototype)}var ane=class e extends Error{constructor(t){super(t),Ooh(this,e)}},rin=class{constructor({pollingInterval:t,personalApiKey:r,projectApiKey:n,timeout:i,host:o,customHeaders:s,...a}){this.debugMode=!1,this.shouldBeginExponentialBackoff=!1,this.backOffCount=0,this.pollerStopped=!1,this.filteredOutFlagKeys=new Set,this.pollingInterval=t,this.personalApiKey=r,this.featureFlags=[],this.featureFlagsByKey={},this.groupTypeMapping={},this.cohorts={},this.loadedSuccessfullyOnce=!1,this.timeout=i,this.projectApiKey=n,this.host=o,this.poller=void 0,this.fetch=a.fetch||fetch,this.onError=a.onError,this.customHeaders=s,this.onLoad=a.onLoad,this.onMinimalFlagCalledEvents=a.onMinimalFlagCalledEvents,this.cacheProvider=a.cacheProvider,this.strictLocalEvaluation=a.strictLocalEvaluation??!1,this.evaluationContexts=a.evaluationContexts,this.loadFeatureFlags()}debug(t=!0){this.debugMode=t}logMsgIfDebug(t){this.debugMode&&t()}withEvaluationSnapshot(t){return t.definitions?t:{...t,evaluationCache:{},definitions:{featureFlagsByKey:this.featureFlagsByKey,groupTypeMapping:this.groupTypeMapping,cohorts:this.cohorts,filteredOutFlagKeys:this.filteredOutFlagKeys,propertyMatchingVersion:this.propertyMatchingVersion}}}createEvaluationContext(t,r={},n={},i={},o={}){return{distinctId:t,groups:r,personProperties:n,groupProperties:i,evaluationCache:o}}async getFeatureFlag(t,r,n={},i={},o={}){await this.loadFeatureFlags();let s,a;if(!this.loadedSuccessfullyOnce)return s;if(a=this.featureFlagsByKey[t],a!==void 0){let c=this.createEvaluationContext(r,n,i,o);try{s=(await this.computeFlagAndPayloadLocally(a,c)).value,this.logMsgIfDebug(()=>console.debug(`Successfully computed flag locally: ${t} -> ${s}`))}catch(u){u instanceof ane||u instanceof Ju?this.logMsgIfDebug(()=>console.debug(`${u.name} when computing flag locally: ${t}: ${u.message}`)):u instanceof Error&&this.onError?.(new Error(`Error computing flag locally: ${t}: ${u}`))}}return s}async getAllFlagsAndPayloads(t,r){await this.loadFeatureFlags();let n={},i={},o=this.featureFlags.length==0,s=r?r.map(c=>this.featureFlagsByKey[c]).filter(Boolean):this.featureFlags,a=this.withEvaluationSnapshot({...t,definitions:void 0});return await Promise.all(s.map(async c=>{try{let{value:u,payload:l}=await this.computeFlagAndPayloadLocally(c,a,{skipLoadCheck:!0});n[c.key]=u,l&&(i[c.key]=l)}catch(u){u instanceof ane||u instanceof Ju?this.logMsgIfDebug(()=>console.debug(`${u.name} when computing flag locally: ${c.key}: ${u.message}`)):u instanceof Error&&this.onError?.(new Error(`Error computing flag locally: ${c.key}: ${u}`)),o=!0}})),{response:n,payloads:i,fallbackToFlags:o}}async computeFlagAndPayloadLocally(t,r,n={}){let{matchValue:i,skipLoadCheck:o=!1}=n;if(this.loadedSuccessfullyOnce&&(r=this.withEvaluationSnapshot(r)),o||await this.loadFeatureFlags(),!this.loadedSuccessfullyOnce)return{value:!1,payload:null};r=this.withEvaluationSnapshot(r),t=r.definitions.featureFlagsByKey[t.key]??t;let s;s=i!==void 0?i:await this.computeFlagValueLocally(t,r);let a=fYo(t.filters?.payloads,s);return{value:s,payload:a}}async computeFlagValueLocally(t,r){let{distinctId:n,groups:i,personProperties:o,groupProperties:s}=r;if(!t.active)return!1;if(t.ensure_experience_continuity)throw new Ju("Flag has experience continuity enabled");let c=(t.filters||{}).aggregation_group_type_index;if(c!=null){let u=r.definitions.groupTypeMapping[String(c)];if(!u)throw this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Unknown group type index ${c} for feature flag ${t.key}`)),new Ju("Flag has unknown group type index");if(!(u in i))return this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Can't compute group feature flag: ${t.key} without group names passed in`)),!1;t.bucketing_identifier==="device_id"&&(o?.$device_id===void 0||o?.$device_id===null||o?.$device_id==="")&&this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Ignoring bucketing_identifier for group flag: ${t.key}`));let l=s[u];return await this.matchFeatureFlagProperties(t,i[u],l,r)}{let u=this.getBucketingValueForFlag(t,n,o);if(u===void 0)throw this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Can't compute feature flag: ${t.key} without $device_id, falling back to server evaluation`)),new Ju(`Can't compute feature flag: ${t.key} without $device_id`);return await this.matchFeatureFlagProperties(t,u,o,r)}}getBucketingValueForFlag(t,r,n){if(t.filters?.aggregation_group_type_index!=null)return r;if(t.bucketing_identifier==="device_id"){let i=n?.$device_id;return i==null||i===""?void 0:i}return r}async evaluateFlagDependency(t,r,n){let{evaluationCache:i}=n,o=t.key;if(!n.definitions.featureFlagsByKey)throw new Ju("Feature flags not available for dependency evaluation");if(!("dependency_chain"in t))throw new Ju(`Flag dependency property for '${o}' is missing required 'dependency_chain' field`);let s=t.dependency_chain;if(!Array.isArray(s))throw new Ju(`Flag dependency property for '${o}' has an invalid 'dependency_chain' (expected array, got ${typeof s})`);if(s.length===0)throw new Ju(`Circular dependency detected for flag '${o}' (empty dependency chain)`);for(let c of s){if(!(c in i)){let l=n.definitions.featureFlagsByKey[c];if(l)if(l.active)try{let p=await this.computeFlagValueLocally(l,n);i[c]=p}catch(p){throw new Ju(`Error evaluating flag dependency '${c}' for flag '${o}': ${p}`)}else i[c]=!1;else if(n.definitions.filteredOutFlagKeys.has(c))i[c]=!1;else throw new Ju(`Missing flag dependency '${c}' for flag '${o}'`)}if(i[c]==null)throw new Ju(`Dependency '${c}' could not be evaluated`)}let a=i[o];return this.flagEvaluatesToExpectedValue(t.value,a)}flagEvaluatesToExpectedValue(t,r){return typeof t=="boolean"?t===r||typeof r=="string"&&r!==""&&t===!0:typeof t=="string"?r===t:!1}async matchFeatureFlagProperties(t,r,n,i){i=this.withEvaluationSnapshot(i);let o=t.filters||{},s=await lYo(o.holdout,r);if(s!==void 0)return s;let a=o.groups||[],c=o.aggregation_group_type_index,u=o.early_exit??!1,{groups:l,groupProperties:p}=i,f=!1,d;for(let m of a)try{let g=m.aggregation_group_type_index!==void 0?m.aggregation_group_type_index:c,A=n,y=r;if(g!==c&&g!=null){let x=i.definitions.groupTypeMapping[String(g)];if(!x||!(x in l)){this.logMsgIfDebug(()=>console.debug(`[FEATURE FLAGS] Skipping group condition for flag '${t.key}': group type index ${g} not available`));continue}if(!(x in p)){f=!0;continue}A=p[x],y=l[x]}let I=await this.isConditionMatch(t,y,m,A,i);if(I==="match"){let x=m.variant,v=o.multivariate?.variants||[];d=x&&v.some(w=>w.key===x)?x:await this.getMatchingVariant(t,y)||!0;break}if(u&&I==="out_of_rollout_bound"){if(f)break;return!1}}catch(g){if(g instanceof ane)throw g;if(g instanceof Ju)f=!0;else throw g}if(d!==void 0)return d;if(f)throw new Ju("Can't determine if feature flag is enabled or not with given properties");return!1}async isConditionMatch(t,r,n,i,o){o=this.withEvaluationSnapshot(o);let s=o.definitions,a=n.rollout_percentage,c=u=>{this.logMsgIfDebug(()=>console.warn(u))};if((n.properties||[]).length>0){for(let u of n.properties){let l=u.type,p=!1;if(l==="cohort"){let f=await yil(u,i,s.cohorts,this.debugMode,d=>this.evaluateFlagDependency(d,i,o),s.propertyMatchingVersion);p=u.operator==="not_in"?!f:f}else p=l==="flag"?await this.evaluateFlagDependency(u,i,o):Ail(u,i,c,s.propertyMatchingVersion);if(!p)return"no_match"}if(a==null)return"match"}return a!=null&&await PHt(t.key,r)>a/100?"out_of_rollout_bound":"match"}async getMatchingVariant(t,r){return pYo(t.key,r,t.filters?.multivariate?.variants||[])}variantLookupTable(t){return _nn(t.filters?.multivariate?.variants||[])}filterFlagsByEvaluationContexts(t){if(!this.evaluationContexts||this.evaluationContexts.length===0)return t;let r=new Set(this.evaluationContexts);return t.filter(n=>{let i=n.evaluation_contexts??n.evaluation_tags;return!i||i.length===0?!0:i.some(o=>r.has(o))})}getEvaluationRuntimeForFlag(t){let r=this.featureFlagsByKey[t];return r?gil(r.evaluation_runtime):void 0}getFlagKeysByEvaluationRuntime(t){return this.featureFlags.filter(r=>Toh(gil(r.evaluation_runtime),t)).map(r=>r.key)}updateFlagState(t){let r=this.filterFlagsByEvaluationContexts(t.flags);this.featureFlags=r,this.featureFlagsByKey=r.reduce((i,o)=>(i[o.key]=o,i),{});let n=new Set(r.map(i=>i.key));this.filteredOutFlagKeys=new Set(t.flags.filter(i=>!n.has(i.key)).map(i=>i.key)),this.groupTypeMapping=t.group_type_mapping??t.groupTypeMapping??{},this.cohorts=t.cohorts,this.propertyMatchingVersion=t.property_matching_version??t.propertyMatchingVersion,this.loadedSuccessfullyOnce=!0,this.onMinimalFlagCalledEvents?.((t.minimal_flag_called_events??t.minimalFlagCalledEvents)===!0)}warnAboutExperienceContinuityFlags(t){if(this.strictLocalEvaluation)return;let r=t.filter(n=>n.ensure_experience_continuity);r.length>0&&console.warn(`[PostHog] You are using local evaluation but ${r.length} flag(s) have experience continuity enabled: ${r.map(n=>n.key).join(", ")}. Experience continuity is incompatible with local evaluation and will cause a server request on every flag evaluation, negating local evaluation cost savings. To avoid server requests and unexpected costs, either disable experience continuity on these flags in PostHog, use strictLocalEvaluation: true in client init, or pass onlyEvaluateLocally: true per flag call (flags that cannot be evaluated locally will return undefined).`)}async loadFromCache(t){if(!this.cacheProvider)return!1;try{let r=await this.cacheProvider.getFlagDefinitions();return r?(this.updateFlagState(r),this.logMsgIfDebug(()=>console.debug(`[FEATURE FLAGS] ${t} (${r.flags.length} flags)`)),this.onLoad?.(this.featureFlags.length),this.warnAboutExperienceContinuityFlags(this.featureFlags),!0):!1}catch(r){return this.onError?.(new Error(`Failed to load from cache: ${r}`)),!1}}async loadFeatureFlags(t=!1){if(!(this.loadedSuccessfullyOnce&&!t))return!t&&this.nextFetchAllowedAt&&Date.now()<this.nextFetchAllowedAt?void this.logMsgIfDebug(()=>console.debug("[FEATURE FLAGS] Skipping fetch, in backoff period")):(this.loadingPromise||(this.loadingPromise=this._loadFeatureFlags().catch(r=>this.logMsgIfDebug(()=>console.debug(`[FEATURE FLAGS] Failed to load feature flags: ${r}`))).finally(()=>{this.loadingPromise=void 0})),this.loadingPromise)}isLocalEvaluationReady(){return(this.loadedSuccessfullyOnce??!1)&&(this.featureFlags?.length??0)>0}getFlagDefinitionsLoadedAt(){return this.flagDefinitionsLoadedAt}getPollingInterval(){let t=this.pollingInterval??3e4;return this.shouldBeginExponentialBackoff?Math.min(Soh,t*2**this.backOffCount):t}beginBackoff(){this.shouldBeginExponentialBackoff=!0,this.backOffCount+=1,this.nextFetchAllowedAt=Date.now()+this.getPollingInterval()}clearBackoff(){this.shouldBeginExponentialBackoff=!1,this.backOffCount=0,this.nextFetchAllowedAt=void 0}async _loadFeatureFlags(){this.poller&&(clearTimeout(this.poller),this.poller=void 0);try{let t=!0;if(this.cacheProvider)try{t=await this.cacheProvider.shouldFetchFlagDefinitions()}catch(n){this.onError?.(new Error(`Error in shouldFetchFlagDefinitions: ${n}`))}if(!t&&(await this.loadFromCache("Loaded flags from cache (skipped fetch)")||this.loadedSuccessfullyOnce))return;let r=await this._requestFeatureFlagDefinitions();if(!r)return;switch(r.status){case 304:this.logMsgIfDebug(()=>console.debug("[FEATURE FLAGS] Flags not modified (304), using cached data")),this.flagsEtag=r.headers?.get("ETag")??this.flagsEtag,this.loadedSuccessfullyOnce=!0,this.clearBackoff();return;case 401:throw this.beginBackoff(),new aft(`Your project key or secret key is invalid. Setting next polling interval to ${this.getPollingInterval()}ms. More information: https://posthog.com/docs/api#rate-limiting`);case 402:console.warn("[FEATURE FLAGS] Feature flags quota limit exceeded - unsetting all local flags. Learn more about billing limits at https://posthog.com/docs/billing/limits-alerts"),this.featureFlags=[],this.featureFlagsByKey={},this.filteredOutFlagKeys=new Set,this.groupTypeMapping={},this.cohorts={},this.propertyMatchingVersion=void 0,this.onMinimalFlagCalledEvents?.(!1);return;case 403:throw this.beginBackoff(),new aft(`Your secret key does not have permission to fetch feature flag definitions for local evaluation. Setting next polling interval to ${this.getPollingInterval()}ms. Are you sure you're using the correct secret and Project API key pair? More information: https://posthog.com/docs/api/overview`);case 429:throw this.beginBackoff(),new aft(`You are being rate limited. Setting next polling interval to ${this.getPollingInterval()}ms. More information: https://posthog.com/docs/api#rate-limiting`);case 200:{let n=await r.json()??{};if(!("flags"in n))return void this.onError?.(new Error(`Invalid response when getting feature flags: ${JSON.stringify(n)}`));this.flagsEtag=r.headers?.get("ETag")??void 0;let i=n.group_type_mapping||{},o=n.minimal_flag_called_events===!0,s={flags:n.flags??[],group_type_mapping:i,cohorts:n.cohorts||{},minimal_flag_called_events:o,property_matching_version:n.property_matching_version,propertyMatchingVersion:n.property_matching_version,groupTypeMapping:i,minimalFlagCalledEvents:o};if(this.updateFlagState(s),this.flagDefinitionsLoadedAt=Date.now(),this.clearBackoff(),this.cacheProvider&&t)try{await this.cacheProvider.onFlagDefinitionsReceived(s)}catch(a){this.onError?.(new Error(`Failed to store in cache: ${a}`))}this.onLoad?.(this.featureFlags.length),this.warnAboutExperienceContinuityFlags(this.featureFlags);break}default:return}}catch(t){t instanceof aft&&this.onError?.(t)}finally{!this.pollerStopped&&this.pollingInterval!==null&&(this.poller=setTimeout(()=>this.loadFeatureFlags(!0),this.getPollingInterval()))}}getPersonalApiKeyRequestOptions(t="GET",r){let n={...this.customHeaders,"Content-Type":"application/json",Authorization:`Bearer ${this.personalApiKey}`};return r&&(n["If-None-Match"]=r),{method:t,headers:n}}async _requestFeatureFlagDefinitions(){let t=`${this.host}/flags/definitions?token=${this.projectApiKey}&send_cohorts`,r=this.getPersonalApiKeyRequestOptions("GET",this.flagsEtag),n=null;if(this.timeout&&typeof this.timeout=="number"){let o=new AbortController;n=RN(()=>{o.abort()},this.timeout),r.signal=o.signal}let i=()=>clearTimeout(n);try{let o=this.fetch,s=await o(t,r);return s.status!==200?(i(),s):{status:s.status,headers:s.headers,body:s.body,text:async()=>{try{return await s.text()}finally{i()}},json:async()=>{try{return await s.json()}finally{i()}}}}catch(o){throw i(),o}}async stopPoller(t=3e4){if(this.pollerStopped=!0,clearTimeout(this.poller),this.poller=void 0,this.cacheProvider)try{let r=this.cacheProvider.shutdown();r instanceof Promise&&await XSe(r,t,()=>{throw new Error(`Cache shutdown timeout after ${t}ms`)})}catch(r){this.onError?.(new Error(`Error during cache shutdown: ${r}`))}}};function Ail(e,t,r,n){return uYo(e,t,{warnFunction:r,propertyMatchingVersion:n})}function Poh(e,t){if(!(e in t))throw new ane(`cohort ${e} not found in local cohorts - likely a static cohort that requires server evaluation`)}async function yil(e,t,r,n=!1,i,o){let s=String(e.value);Poh(s,r);let a=r[s];return bil(a,t,r,n,i,o)}async function bil(e,t,r,n=!1,i,o){if(!e)return!0;let s=e.type,a=e.values;if(!a||a.length===0)return!0;let c=!1;if("values"in a[0]){for(let u of a)try{let l=await bil(u,t,r,n,i,o);if(s==="AND"){if(!l)return!1}else if(l)return!0}catch(l){if(l instanceof ane)throw l;if(l instanceof Ju)n&&console.debug(`Failed to compute property ${u} locally: ${l}`),c=!0;else throw l}if(c)throw new Ju("Can't match cohort without a given cohort property value");return s==="AND"}for(let u of a)try{let l;if(u.type==="cohort")l=await yil(u,t,r,n,i,o);else if(u.type==="flag"){if(!i)throw new Ju(`Flag dependency '${u.key||"unknown"}' cannot be evaluated without a flag dependency evaluator`);l=await i(u)}else l=Ail(u,t,void 0,o);let p=u.negation||!1;if(s==="AND"){if(!l&&!p||l&&p)return!1}else if(l&&!p||!l&&p)return!0}catch(l){if(l instanceof ane)throw l;if(l instanceof Ju)n&&console.debug(`Failed to compute property ${u} locally: ${l}`),c=!0;else throw l}if(c)throw new Ju("can't match cohort without a given cohort property value");return s==="AND"}var Boh=["--unhandled-rejections","--unhandled_rejections"],Roh=new Set(["throw","strict","warn","warn-with-error-code","none"]),Doh=[...globalThis.process?.execArgv??[]],koh=globalThis.process?.env?.NODE_OPTIONS;function Foh(e){let t=[],r="",n=!1;for(let i=0;i<e.length;i++){let o=e[i];o==="\\"&&n&&i+1<e.length?r+=e[++i]:o!==" "||n?o==='"'?n=!n:r+=o:r&&(t.push(r),r="")}return r&&t.push(r),t}function Eil(e){let t;for(let r=0;r<e.length;r++){let n=e[r],i=Boh.find(s=>n===s||n.startsWith(`${s}=`));if(!i)continue;let o=n===i?e[++r]:n.slice(i.length+1);Roh.has(o)&&(t=o)}return t}function Noh(e=Doh,t=koh){return Eil(e)??Eil(Foh(t??""))??"throw"}var Iil=Noh();function vil(e,t,r){e(t,{mechanism:{type:r==="unhandledRejection"?"onunhandledrejection":"onuncaughtexception",handled:!1}})}function joh(e,t){let r=!1;return Object.assign((n,i)=>{let o=global.process.listeners("uncaughtException").filter(s=>s.name!=="domainUncaughtExceptionClear"&&s._posthogErrorHandler!==!0).length;vil(e,n,i),!r&&o===0&&(r=!0,t(n))},{_posthogErrorHandler:!0})}function Cil(e,t,r=Iil){let n=globalThis.process;if(n){if(r==="strict")return void n.on("uncaughtExceptionMonitor",(i,o)=>vil(e,i,o));n.on("uncaughtException",joh(e,t))}}function xil(e,t=Iil){let r=globalThis.process;!r||t==="throw"||t==="strict"||t==="warn-with-error-code"||r.on("unhandledRejection",n=>{e(n,{mechanism:{type:"onunhandledrejection",handled:!1}})})}var zoh=2e3,DYo=class e{constructor(t,r,n){this.client=t,this._exceptionAutocaptureEnabled=r.enableExceptionAutocapture||!1,this._logger=n,this._rateLimiter=new Inn({...Nrl(r),refillInterval:1e4,_logger:this._logger}),this.startAutocaptureIfEnabled()}static isPreviouslyCapturedError(t){return dHt(t)&&"__posthog_previously_captured_error"in t&&t.__posthog_previously_captured_error===!0}static async buildEventMessage(t,r,n,i,o){let s={...o},a=t.buildFromUnknown(r,n);a.$exception_list=await t.modifyFrames(a.$exception_list);let c=eO.getInjectedReleaseId();return c&&(s.$release_id=c),{event:"$exception",distinctId:i,properties:{...a,...s},_originatedFromCaptureException:!0}}startAutocaptureIfEnabled(){this.isEnabled()&&(Cil(this.onException.bind(this),this.onFatalError.bind(this)),xil(this.onException.bind(this)))}onException(t,r){this.client.addPendingPromise((async()=>{if(!e.isPreviouslyCapturedError(t)){let n=await e.buildEventMessage(this.client.getErrorPropertiesBuilder(),t,r),o=n.properties?.$exception_list[0]?.type??"Exception";return this._rateLimiter.consumeRateLimit(o)?void this._logger.info("Skipping exception capture because of client rate limiting.",{exception:o}):this.client._capturePreparedEvent(n,!1)}})())}async onFatalError(t){console.error(t),await this.client.shutdown(zoh),globalThis.process.exit(1)}isEnabled(){return!this.client.isDisabled&&this._exceptionAutocaptureEnabled}shutdown(){this._rateLimiter.stop()}},r5e=DYo;var nin=class{getProperty(t){return this._memoryStorage[t]}setProperty(t,r){this._memoryStorage[t]=r!==null?r:void 0}constructor(){this._memoryStorage={}}};function Qoh(e){return e==="v0"||e==="v1"}function wil(){let e="u">typeof process?process.env?.POSTHOG_CAPTURE_MODE:void 0;return Qoh(e)?e:"v0"}var Moh="$ai_",VHt="analytics";function Sil(e){return typeof e.event=="string"&&e.event.startsWith(Moh)}var cft=class e extends Error{constructor({requestId:t,drops:r,retryExhausted:n,cause:i}){super(e.buildMessage(t,r,n,i)),this.name="CaptureV1Error",this.requestId=t,this.drops=r,this.retryExhausted=n,this.cause=i}static buildMessage(t,r,n,i){let o=`Capture V1 batch ${t} did not fully deliver: ${r.length} dropped, ${n.length} undelivered`;return i instanceof Error&&(o+=` (${i.message})`),o}};function kYo(e){if(typeof e=="boolean")return e;if(typeof e=="number")return e!==0;if(typeof e=="string"){let t=e.trim().toLowerCase();if(t==="true"||t==="1")return!0;if(t==="false"||t==="0")return!1}}function Loh(e){return typeof e=="string"?e:void 0}var _oh=[{property:"$cookieless_mode",optionKey:"cookieless_mode",coerce:kYo},{property:"$ignore_sent_at",optionKey:"disable_skew_correction",coerce:kYo},{property:"$process_person_profile",optionKey:"process_person_profile",coerce:kYo},{property:"$product_tour_id",optionKey:"product_tour_id",coerce:Loh}],Uoh=[{property:"$session_id",field:"session_id"},{property:"$window_id",field:"window_id"}];function Voh(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Goh(e){if(typeof e=="string"){let r=new Date(e);if(Number.isNaN(r.getTime()))return new Date().toISOString();let n=r.toISOString(),i=e.match(/\.(\d+)(?:Z|[+-]\d{2}:?\d{2})?$/i)?.[1];return i&&i.length>3?n.replace(/\.\d{3}Z$/,`.${i}Z`):n}if(e instanceof Date)return Number.isNaN(e.getTime())?new Date().toISOString():e.toISOString();let t=e==null?new Date:new Date(e);return Number.isNaN(t.getTime())?new Date().toISOString():t.toISOString()}function Til(e,t,r){r!==void 0&&!(t in e)&&(e[t]=r)}function qoh(e){let r={...Voh(e.properties)?e.properties:{}},n={};for(let{property:o,optionKey:s,coerce:a}of _oh)if(o in r){let c=a(r[o]);c!==void 0&&(n[s]=c),delete r[o]}let i={};for(let{property:o,field:s}of Uoh)if(o in r){let a=r[o];typeof a=="string"&&(i[s]=a),delete r[o]}return delete r.$lib,delete r.$lib_version,Til(r,"$set",e.$set),Til(r,"$set_once",e.$set_once),{event:String(e.event??""),uuid:String(e.uuid??""),distinct_id:String(e.distinct_id??""),timestamp:Goh(e.timestamp),...i,options:n,properties:r}}function Oil(e,{createdAt:t,historicalMigration:r}){let n={created_at:t,batch:e.map(qoh)};return r&&(n.historical_migration=!0),n}var Woh="/i/v1/analytics/events",Hoh=3e4,Koh=new Set([408,500,502,503,504]),iin=class{constructor(t,r){this.config=t,this.maxBackoffMs=t.maxBackoffMs??Hoh,this.fetchFn=r.fetch,this.onError=r.onError,this.now=r.now??Date.now,this.sleep=r.sleep??(n=>new Promise(i=>RN(i,n))),this.generateRequestId=r.generateRequestId??BN,this.compress=r.compress??SHt}async sendV1Batch(t){if(t.length===0)return;let r=this.generateRequestId(),n=new Date(this.now()).toISOString(),{batch:i}=Oil(t,{createdAt:n,historicalMigration:this.config.historicalMigration}),o=`${this.config.host}${Woh}`,s=[],a=i,c=Math.max(1,this.config.maxAttempts);for(let u=1;u<=c;u++){let l=u===c,p=JSe({created_at:n,...this.config.historicalMigration?{historical_migration:!0}:{},batch:a}),f,d;try{f=await this.sendOnce(o,p,u,r);let{response:m,signal:g}=f,{status:A}=m;if(A<200||A>=300)if(!l&&Koh.has(A)){let y=this.parseRetryAfter(m);await f.waitFor(f.cancelBody()).catch(()=>{}),d=this.backoffDelay(u,y)}else{let y=await this.buildHttpError(m,A,f.waitFor);return this.surfaceBatchFailure(r,s,a,y)}else{let y;try{y=await f.waitFor(this.parseResponse(m))}catch(v){if(g.aborted)throw v;return this.surfaceBatchFailure(r,s,a,new Error(`Capture V1 returned an unparseable ${A} response body`))}let I=this.classify(a,y,s);if(I.length===0)return this.surfacePartialDrops(r,s);if(l)return void this.onError(new cft({requestId:r,drops:s,retryExhausted:I.map(v=>v.uuid)}));a=I;let x=this.parseRetryAfter(m);d=this.backoffDelay(u,x)}}catch(m){if(f&&!f.signal.aborted)throw m;if(l)return this.surfaceBatchFailure(r,s,a,m);d=this.backoffDelay(u)}finally{f?.cleanup()}d!==void 0&&await this.sleep(d)}}async sendOnce(t,r,n,i){let o=this.buildHeaders(n,i),s=r;if(this.config.compressionEnabled){let p=await this.compress(r,this.config.isDebug);p!==null&&(s=p,o["Content-Encoding"]="gzip")}let a=new AbortController,c="waiting for response headers",u,l=new Promise((p,f)=>{u=RN(()=>{let d=new Error(`Capture V1 request timed out ${c} after ${this.config.requestTimeoutMs}ms`);d.name="AbortError",f(d),a.abort(d)},this.config.requestTimeoutMs)});try{let p=this.fetchFn(t,{method:"POST",headers:o,body:s,signal:a.signal}),f=!1;p.then(y=>{a.signal.aborted&&!f&&this.cancelBody(y)}).catch(()=>{});let d=await Promise.race([p,l]);f=!0,c="while reading the response body";let m=!1,g,A=()=>g??=this.cancelBody(d);return{response:d,signal:a.signal,waitFor:y=>Promise.race([y,l]),cancelBody:A,cleanup:()=>{m||(m=!0,clearTimeout(u),a.signal.aborted&&A())}}}catch(p){throw clearTimeout(u),p}}buildHeaders(t,r){let n=`${this.config.libraryId}/${this.config.libraryVersion}`,i={"Content-Type":"application/json",Authorization:`Bearer ${this.config.apiKey}`,"PostHog-Sdk-Info":n,"PostHog-Attempt":String(t),"PostHog-Request-Id":r,"PostHog-Request-Timestamp":new Date(this.now()).toISOString()};return this.config.userAgent&&(i["User-Agent"]=this.config.userAgent),i}classify(t,r,n){let i=r.results??{},o=[];for(let s of t){let a=i[s.uuid];a&&(a.result==="drop"?n.push({uuid:s.uuid,details:a.details??void 0}):a.result==="retry"&&o.push(s))}return o}backoffDelay(t,r){let n=Math.min(this.config.initialRetryDelayMs*2**(t-1),this.maxBackoffMs);return r===void 0?n:Math.max(n,Math.min(r,this.maxBackoffMs))}parseRetryAfter(t){let r=t.headers?.get("Retry-After");if(!r)return;let n=r.trim();if(/^\d+$/.test(n)){let s=parseInt(n,10);return Number.isFinite(s)&&s>0?1e3*s:void 0}let i=Date.parse(n);if(Number.isNaN(i))return;let o=i-this.now();return o>0?o:void 0}async parseResponse(t){let r=await t.text(),n=JSON.parse(r);if(typeof n!="object"||n===null||Array.isArray(n))throw new Error("unexpected response shape");let i=n.results;if(i!==void 0&&(typeof i!="object"||i===null||Array.isArray(i)))throw new Error("unexpected results shape");return{results:i??{}}}async buildHttpError(t,r,n){let i="";try{i=(await n(t.text())).slice(0,512)}catch{}let o=i?`: ${i}`:"";return new Error(`Capture V1 request failed with HTTP ${r}${o}`)}surfaceBatchFailure(t,r,n,i){this.onError(new cft({requestId:t,drops:r,retryExhausted:n.map(o=>o.uuid),cause:i}))}surfacePartialDrops(t,r){r.length>0&&this.onError(new cft({requestId:t,drops:r,retryExhausted:[]}))}async cancelBody(t){try{await t.body?.cancel()}catch{}}};var n5e="ai-capture",oin="/i/v0/ai/batch/";var Yoh=new TextEncoder;function NYo(e){return Yoh.encode(JSe(e)).length}function Pil(e,t=8388608,r=5242880){let n=[],i=[],o=[],s=0;for(let a of e){if(a===void 0)continue;let c=NYo(a);if(c>t){i.push({event:typeof a.event=="string"?a.event:"unknown",bytes:c});continue}o.length>0&&s+c>r&&(n.push(o),o=[],s=0),o.push(a),s+=c}return o.length>0&&n.push(o),{batches:n,dropped:i}}var Xoh=100,Bil=3e4,Zoh=5e4,$oh=50,esh=500,tsh="https://us.i.posthog.com",Ril=new Set;function ain(e,t){Ril.has(e)||(Ril.add(e),console.warn(`[PostHog] ${t}`))}function rsh(e){return typeof e=="string"?e.trim():""}function nsh(e){return(typeof e=="string"?e.trim():"")||void 0}function ish(e){return(typeof e=="string"?e.trim():"")||tsh}function osh(e){return(Array.isArray(e)?e:[e]).filter(r=>typeof r=="string"&&r.trim().length>0)}function ssh(e){if(!e)return{};let t={};for(let[n,i]of Object.entries(e))t[`$feature/${n}`]=i;let r=Object.keys(e).filter(n=>e[n]!==!1).sort();return r.length>0&&(t.$active_feature_flags=r),t}var cin=class extends THt{constructor(t,r={}){let n=rsh(t),i={...r,maxQueueSize:r.maxQueueSize??1e4,flushInterval:r.flushInterval??5e3,host:ish(r.host),personalApiKey:nsh(r.secretKey??r.personalApiKey)};if(super(n,i),this._memoryStorage=new nin,this._aiCaptureRouteActive=!1,this._minimalFlagCalledEvents=!1,this.options=i,this.captureMode=wil(),this.enableFullAiCapture=i.enableFullAiCapture===!0,this.context=this.initializeContext(),this.options.featureFlagsPollingInterval=typeof i.featureFlagsPollingInterval=="number"?Math.max(i.featureFlagsPollingInterval,Xoh):i.featureFlagsPollingInterval===null?null:Bil,typeof i.waitUntilDebounceMs=="number"&&(this.options.waitUntilDebounceMs=Math.max(i.waitUntilDebounceMs,0)),typeof i.waitUntilMaxWaitMs=="number"&&(this.options.waitUntilMaxWaitMs=Math.max(i.waitUntilMaxWaitMs,0)),!this.disabled&&i.personalApiKey){if(i.personalApiKey.includes("phc_"))throw new Error('Your Personal API key is invalid. These keys are prefixed with "phx_" and can be created in PostHog project settings.');i.enableLocalEvaluation!==!1&&(this.featureFlagsPoller=new rin({pollingInterval:this.options.featureFlagsPollingInterval,personalApiKey:i.personalApiKey,projectApiKey:n,timeout:i.requestTimeout??1e4,host:this.host,fetch:i.fetch,onError:s=>{this._events.emit("error",s)},onLoad:s=>{this._events.emit("localEvaluationFlagsLoaded",s)},onMinimalFlagCalledEvents:s=>{this._minimalFlagCalledEvents=s},customHeaders:this.getCustomHeaders(),cacheProvider:i.flagDefinitionCacheProvider,strictLocalEvaluation:i.strictLocalEvaluation,evaluationContexts:i.evaluationContexts??i.evaluationEnvironments}))}this.errorTracking=new r5e(this,i,this._logger),this.distinctIdHasSentFlagCalls={},this.maxCacheSize=i.maxCacheSize||Zoh}enqueue(t,r,n,i){super.enqueue(t,r,n,i),this.scheduleDebouncedFlush()}_flushEventsAndSpans(t=!1){let r=this.flushWithPendingPromises();return!this._traces||t&&this._traces.throttled?r:gHt([r,this._traces.flush().catch(()=>{})]).then(([n])=>{if(n.status==="rejected")throw n.reason})}flushAutomatic(){return this._flushKeepingRuntimeAlive(!0)}async flush(){return this._flushKeepingRuntimeAlive(!1)}_flushKeepingRuntimeAlive(t){let r=this._flushEventsAndSpans(t),n=this.options.waitUntil;if(n&&!this._waitUntilCycle)try{n(r.catch(()=>{}))}catch{}return r}scheduleDebouncedFlush(){let t=this.options.waitUntil;if(!t||this.disabled||this.optedOut)return;if(!this._waitUntilCycle){let s,a=new Promise(c=>{s=c});try{t(a)}catch{return}this._waitUntilCycle={resolve:s,startedAt:Date.now(),timer:void 0}}let r=Date.now()-this._waitUntilCycle.startedAt,n=this.options.waitUntilMaxWaitMs??esh,i=r>=n;if(this._waitUntilCycle.timer!==void 0&&clearTimeout(this._waitUntilCycle.timer),i)return void this.resolveWaitUntilFlush();let o=this.options.waitUntilDebounceMs??$oh;this._waitUntilCycle.timer=RN(()=>{this.resolveWaitUntilFlush()},o)}_consumeWaitUntilCycle(){let t=this._waitUntilCycle;return t&&(clearTimeout(t.timer),this._waitUntilCycle=void 0),t?.resolve}async resolveWaitUntilFlush(){let t=this._consumeWaitUntilCycle();try{await this._flushEventsAndSpans()}catch{}finally{t?.()}}getPersistedProperty(t){return this._memoryStorage.getProperty(t)}setPersistedProperty(t,r){return this._memoryStorage.setProperty(t,r)}fetch(t,r){return this.options.fetch?this.options.fetch(t,r):fetch(t,r)}getQueueRouteKey(t){return this.captureMode==="v1"&&Sil(t)?"ai":VHt}persistedQueueKeyForRoute(t){return t===n5e?wM.AiCaptureQueue:t==="ai"?wM.AiQueue:wM.Queue}getActiveQueueRoutes(){let t=this.captureMode==="v1"?[VHt,"ai"]:[VHt];return this._aiCaptureRouteActive&&t.push(n5e),t}getBatchEndpointPath(t){return t===n5e?oin:super.getBatchEndpointPath(t)}async sendBatch(t,r,n=VHt){if(n===n5e)return this.sendAiCaptureBatch(t,r);if(this.captureMode!=="v1"||n==="ai")return super.sendBatch(t,r,n);let i=t.filter(o=>o!==void 0);await this.getV1Sender().sendV1Batch(i)}async sendAiCaptureBatch(t,r){let{batches:n,dropped:i}=Pil(t);for(let{event:o,bytes:s}of i){let a=`Event ${o} (${s} bytes) exceeds the ${8388608/1048576}MiB limit for ${oin}, dropping.`;this._logger.error(a),this._events.emit("error",new Error(a))}for(let o of n)await this.sendAiSubBatch(o,r)}async sendAiSubBatch(t,r){try{await super.sendBatch(t,r,n5e)}catch(n){if(!nft(n))throw n;if(t.length===1){let[o]=t,a=`Event ${typeof o.event=="string"?o.event:"unknown"} (${NYo(o)} bytes) was rejected with 413 by ${oin} on its own, dropping.`;this._logger.error(a),this._events.emit("error",new Error(a));return}let i=Math.ceil(t.length/2);await this.sendAiSubBatch(t.slice(0,i),r),await this.sendAiSubBatch(t.slice(i),r)}}getV1Sender(){return this._v1Sender||(this._v1Sender=new iin({host:this.host,apiKey:this.apiKey,libraryId:this.getLibraryId(),libraryVersion:this.getLibraryVersion(),userAgent:this.getCustomUserAgent()||void 0,historicalMigration:this.historicalMigration,compressionEnabled:!this.disableCompression,requestTimeoutMs:this.requestTimeout,maxAttempts:(this.options.fetchRetryCount??3)+1,initialRetryDelayMs:this.options.fetchRetryDelay??3e3,isDebug:this.isDebug},{fetch:(t,r)=>this.fetch(t,r),onError:t=>this._events.emit("error",t),compress:t=>this.compressPayload(t)})),this._v1Sender}getLibraryVersion(){return hil}get metrics(){return this._metrics||(this._metrics=new jHt(this,Vnn(this.options.metrics),this._logger)),this._metrics}initializeSpanContextManager(){return new _Ht}hostResourceAttributes(){return{}}get _spanContextManager(){return this._spanContext||(this._spanContext=this.initializeSpanContextManager()),this._spanContext}get _tracesPipeline(){if(this.options.traces)return this._traces||(this._traces=new LHt(this,TYo(this.options.traces,this.hostResourceAttributes(),this._logger),this._logger,()=>this._tracingContext(),this._spanContextManager,()=>this.scheduleDebouncedFlush())),this._traces}_tracingContext(){let t=this.context?.get();return{distinctId:t?.distinctId,sessionId:t?.sessionId}}startSpan(t,r){return this._tracesPipeline?.startSpan(t,r)??ZSe(r,this._spanContextManager.active())}withSpan(t,r,n){let i=typeof r=="function"?void 0:r,o=typeof r=="function"?r:n,s=this._tracesPipeline;return s?i?s.withSpan(t,i,o):s.withSpan(t,o):MHt(this._spanContextManager,ZSe(i,this._spanContextManager.active()),o)}getActiveSpan(){return this._spanContextManager.active()??null}getCustomUserAgent(){return`${this.getLibraryId()}/${this.getLibraryVersion()}`}getEvaluationRuntime(){return"server"}getCommonEventProperties(){let t=super.getCommonEventProperties();return(this.options.isServer??!0)&&(t.$is_server=!0),t}enable(){return super.optIn()}disable(){return super.optOut()}debug(t=!0){super.debug(t),this.featureFlagsPoller?.debug(t)}_warnIfInvalidCapture(t,r,n){typeof t=="string"&&this._logger.warn(r),t.event==="$exception"&&!t._originatedFromCaptureException&&this._logger.warn(n)}_sendPreparedEvent(t,r,n,i,o){return this.addPendingPromise(this._prepareEventMessage(r,i).then(({distinctId:s,event:a,properties:c,options:u})=>{let l={timestamp:u.timestamp,disableGeoip:u.disableGeoip,uuid:u.uuid},p={distinctId:s,event:a,properties:{...c,...this.getCommonEventProperties()}};return n?this.sendImmediate(t,p,l,o):this.enqueue(t,p,l,o)}).catch(s=>{s&&console.error(s)}))}_capturePreparedEvent(t,r){return this._sendPreparedEvent("capture",t,r)}capture(t){this._warnIfInvalidCapture(t,"Called capture() with a string as the first argument when an object was expected.","Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this._capturePreparedEvent(t,!1)}async captureImmediate(t){return this._warnIfInvalidCapture(t,"Called captureImmediate() with a string as the first argument when an object was expected.","Capturing a `$exception` event via `posthog.captureImmediate('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureExceptionImmediate(error)` instead, which attaches this metadata by default."),this._capturePreparedEvent(t,!0)}captureAi(t){if(this.disabled)return;let r=ZVe(t.uuid,BN);return this._sendPreparedAiEvent({...t,uuid:r},!1),r}async captureAiImmediate(t){if(this.disabled)return;let r=ZVe(t.uuid,BN);return await this._sendPreparedAiEvent({...t,uuid:r},!0),r}_sendPreparedAiEvent(t,r){return typeof t?.event=="string"&&!t.event.startsWith("$ai_")&&this._logger.debug(`captureAi called with non-AI event ${t.event}; routing it to the AI endpoint anyway.`),this._aiCaptureRouteActive=!0,this._sendPreparedEvent("capture",t,r,void 0,n5e)}identify({distinctId:t,properties:r={},disableGeoip:n}){let{$set:i,$set_once:o,$anon_distinct_id:s,...a}=r,l={$set:i||a,$set_once:o||{},$anon_distinct_id:s??void 0};this._sendPreparedEvent("identify",{distinctId:t,event:"$identify",properties:l,disableGeoip:n},!1,{includeContextProperties:!1})}async identifyImmediate({distinctId:t,properties:r={},disableGeoip:n}){let{$set:i,$set_once:o,$anon_distinct_id:s,...a}=r,l={$set:i||a,$set_once:o||{},$anon_distinct_id:s??void 0};await this._sendPreparedEvent("identify",{distinctId:t,event:"$identify",properties:l,disableGeoip:n},!0,{includeContextProperties:!1})}setPersonProperties({distinctId:t,properties:r={},propertiesOnce:n={}}){if(Object.keys(r).length===0&&Object.keys(n).length===0)return;let i={};Object.keys(r).length>0&&(i.$set=r),Object.keys(n).length>0&&(i.$set_once=n),this.capture({distinctId:t,event:"$set",properties:i})}unsetPersonProperties({distinctId:t,properties:r}){let n=osh(r);n.length!==0&&this.capture({distinctId:t,event:"$set",properties:{$unset:n}})}alias(t){this._sendPreparedEvent("alias",{distinctId:t.distinctId,event:"$create_alias",properties:{distinct_id:t.distinctId,alias:t.alias},disableGeoip:t.disableGeoip},!1,{includeContextProperties:!1})}async aliasImmediate(t){await this._sendPreparedEvent("alias",{distinctId:t.distinctId,event:"$create_alias",properties:{distinct_id:t.distinctId,alias:t.alias},disableGeoip:t.disableGeoip},!0,{includeContextProperties:!1})}isLocalEvaluationReady(){return this.featureFlagsPoller?.isLocalEvaluationReady()??!1}getFeatureFlagEvaluationRuntime(t){return this.featureFlagsPoller?.getEvaluationRuntimeForFlag(t)}getFeatureFlagKeysByEvaluationRuntime(t){return this.featureFlagsPoller?.getFlagKeysByEvaluationRuntime(t)??[]}async waitForLocalEvaluationReady(t=Bil){return this.isLocalEvaluationReady()?!0:this.featureFlagsPoller===void 0?!1:new Promise(r=>{let n=setTimeout(()=>{i(),r(!1)},t),i=this._events.on("localEvaluationFlagsLoaded",o=>{clearTimeout(n),i(),r(o>0)})})}_resolveDistinctId(t,r){return typeof t=="string"?{distinctId:t,options:r}:{distinctId:this.context?.get()?.distinctId,options:t}}async _getFeatureFlagResult(t,r,n={},i){if(this.disabled)return void this._logger.warn("The client is disabled");let o=n.sendFeatureFlagEvents??!0;if(this._flagOverrides!==void 0&&t in this._flagOverrides){let R=this._flagOverrides[t];if(R===void 0)return;let D=this._payloadOverrides?.[t];return{key:t,enabled:R!==!1,variant:typeof R=="string"?R:void 0,payload:D}}let{groups:s,disableGeoip:a}=n,{onlyEvaluateLocally:c,personProperties:u,groupProperties:l}=n,p=this.addLocalPersonAndGroupProperties(r,s,u,l);u=p.allPersonProperties,l=p.allGroupProperties;let f=this.createFeatureFlagEvaluationContext(r,s,this.personPropertiesForLocalEvaluation(r,u),l);c==null&&(c=this.options.strictLocalEvaluation??!1);let d,m=!1,g,A,y,I,x,v,w;if(this.featureFlagsPoller!==void 0){await this.featureFlagsPoller?.loadFeatureFlags();let R=this.featureFlagsPoller?.featureFlagsByKey[t];if(R)try{let D=await this.featureFlagsPoller?.computeFlagAndPayloadLocally(R,f,{matchValue:i});if(D){m=!0;let O=D.value;I=R.id,v="Evaluated locally",w=R.has_experiment,d={key:t,enabled:O!==!1,variant:typeof O=="string"?O:void 0,payload:D.payload??void 0,reason:v,reasonCode:R.active===!1?"flag_disabled":void 0}}}catch(D){if(D instanceof ane||D instanceof Ju)this._logger?.info(`${D.name} when computing flag locally: ${t}: ${D.message}`);else throw D}}if(!m&&!c){let R=await super.getFeatureFlagDetailsStateless(f.distinctId,f.groups,u,l,a,[t]);if(R===void 0)y=Dhe.UNKNOWN_ERROR;else{this._minimalFlagCalledEvents=R.minimalFlagCalledEvents===!0,g=R.requestId,A=R.evaluatedAt;let D=[];R.errorsWhileComputingFlags&&D.push(Dhe.ERRORS_WHILE_COMPUTING),R.quotaLimited?.includes("feature_flags")&&D.push(Dhe.QUOTA_LIMITED);let O=R.flags[t];if(O===void 0)D.push(Dhe.FLAG_MISSING);else{I=O.metadata?.id,x=O.metadata?.version,v=O.reason?.description??O.reason?.code,w=O.metadata?.has_experiment;let M;if(O.metadata?.payload!==void 0)try{M=JSON.parse(O.metadata.payload)}catch{M=O.metadata.payload}d={key:t,enabled:O.enabled,variant:O.variant??void 0,payload:M,reason:v,reasonCode:O.reason?.code}}D.length>0&&(y=D.join(","))}}if(o){let R=d===void 0?void 0:d.enabled===!1?!1:d.variant??!0,D={$feature_flag:t,$feature_flag_response:R,$feature_flag_id:I,$feature_flag_version:x,$feature_flag_reason:v,locally_evaluated:m,[`$feature/${t}`]:R,$feature_flag_request_id:g,$feature_flag_evaluated_at:m?Date.now():A};if(w!==void 0&&(D.$feature_flag_has_experiment=w),m&&this.featureFlagsPoller){let O=this.featureFlagsPoller.getFlagDefinitionsLoadedAt();O!==void 0&&(D.$feature_flag_definitions_loaded_at=O)}y&&(D.$feature_flag_error=y),this._captureFlagCalledEventIfNeeded({distinctId:r,key:t,response:R,groups:s,disableGeoip:a,properties:D})}return d!==void 0&&this._payloadOverrides!==void 0&&t in this._payloadOverrides&&(d={...d,payload:this._payloadOverrides[t]}),d}async getFeatureFlag(t,r,n){ain("getFeatureFlag","`getFeatureFlag` is deprecated and will be removed in a future major version. Use `posthog.evaluateFlags(distinctId, ...)` and call `flags.getFlag(key)` instead \u2014 this consolidates flag evaluation into a single `/flags` request per incoming request.");let i=await this._getFeatureFlagResult(t,r,{...n,sendFeatureFlagEvents:n?.sendFeatureFlagEvents??this.options.sendFeatureFlagEvent??!0});if(i!==void 0)return i.enabled===!1?!1:i.variant??!0}async getFeatureFlagPayload(t,r,n,i){if(ain("getFeatureFlagPayload","`getFeatureFlagPayload` is deprecated and will be removed in a future major version. Use `posthog.evaluateFlags(distinctId, ...)` and call `flags.getFlagPayload(key)` instead \u2014 this consolidates flag evaluation into a single `/flags` request per incoming request."),this._payloadOverrides!==void 0&&t in this._payloadOverrides)return this._payloadOverrides[t];let o=await this._getFeatureFlagResult(t,r,{...i,sendFeatureFlagEvents:!1},n);if(o!==void 0)return o.payload??null}async getFeatureFlagResult(t,r,n){let{distinctId:i,options:o}=this._resolveDistinctId(r,n);return i?this._getFeatureFlagResult(t,i,{...o,sendFeatureFlagEvents:o?.sendFeatureFlagEvents??this.options.sendFeatureFlagEvent??!0}):void this._logger.warn("[PostHog] distinctId is required \u2014 pass it explicitly or use withContext()")}async getRemoteConfigPayload(t){if(this.disabled)return void this._logger.warn("The client is disabled");if(!this.options.personalApiKey)throw new Error("Personal API key is required for remote config payload decryption");let r=await this._requestRemoteConfigPayload(t);if(!r)return;let n=await r.json();if(typeof n=="string")try{return JSON.parse(n)}catch{}return n}async isFeatureEnabled(t,r,n){ain("isFeatureEnabled","`isFeatureEnabled` is deprecated and will be removed in a future major version. Use `posthog.evaluateFlags(distinctId, ...)` and call `flags.isEnabled(key)` instead \u2014 this consolidates flag evaluation into a single `/flags` request per incoming request.");let i=await this._getFeatureFlagResult(t,r,{...n,sendFeatureFlagEvents:n?.sendFeatureFlagEvents??this.options.sendFeatureFlagEvent??!0});return i===void 0?void 0:i.enabled===!1?!1:!!(i.variant??!0)||!1}async getAllFlags(t,r){let{distinctId:n,options:i}=this._resolveDistinctId(t,r);return n?(await this.getAllFlagsAndPayloads(n,i)).featureFlags||{}:(this._logger.warn("[PostHog] distinctId is required to get feature flags \u2014 pass it explicitly or use withContext()"),{})}async getAllFlagsAndPayloads(t,r){let{distinctId:n,options:i}=this._resolveDistinctId(t,r);if(!n)return this._logger.warn("[PostHog] distinctId is required to get feature flags and payloads \u2014 pass it explicitly or use withContext()"),{featureFlags:{},featureFlagPayloads:{}};if(this.disabled)return this._logger.warn("The client is disabled"),{featureFlags:{},featureFlagPayloads:{}};let{groups:o,disableGeoip:s,flagKeys:a}=i||{},{onlyEvaluateLocally:c,personProperties:u,groupProperties:l}=i||{},p=this.addLocalPersonAndGroupProperties(n,o,u,l);u=p.allPersonProperties,l=p.allGroupProperties;let f=this.createFeatureFlagEvaluationContext(n,o,this.personPropertiesForLocalEvaluation(n,u),l);c==null&&(c=this.options.strictLocalEvaluation??!1);let d=await this.featureFlagsPoller?.getAllFlagsAndPayloads(f,a),m={},g={},A=!0;if(d&&(m=d.response,g=d.payloads,A=d.fallbackToFlags),A&&!c){let y=await super.getFeatureFlagsAndPayloadsStateless(f.distinctId,f.groups,u,l,s,a);m={...m,...y.flags||{}},g={...g,...y.payloads||{}}}return this._flagOverrides!==void 0&&(m={...m,...this._flagOverrides}),this._payloadOverrides!==void 0&&(g={...g,...this._payloadOverrides}),{featureFlags:m,featureFlagPayloads:g}}async evaluateFlags(t,r){let{distinctId:n,options:i}=this._resolveDistinctId(t,r);if(!n)return this._logger.warn("[PostHog] distinctId is required to evaluate feature flags \u2014 pass it explicitly or use withContext()"),new e1e({host:this._getFeatureFlagEvaluationsHost(),distinctId:"",flags:{}});if(this.disabled)return this._logger.warn("The client is disabled"),new e1e({host:this._getFeatureFlagEvaluationsHost(),distinctId:n,flags:{}});let{groups:o,disableGeoip:s}=i||{},a=i?.flagKeys??void 0;if(a?.length===0)return new e1e({host:this._getFeatureFlagEvaluationsHost(),distinctId:n,groups:o,disableGeoip:s,flags:{}});let{onlyEvaluateLocally:c,personProperties:u,groupProperties:l}=i||{},p=this.addLocalPersonAndGroupProperties(n,o,u,l);u=p.allPersonProperties,l=p.allGroupProperties;let f=this.createFeatureFlagEvaluationContext(n,o,this.personPropertiesForLocalEvaluation(n,u),l);c==null&&(c=this.options.strictLocalEvaluation??!1);let d=a?new Set(a):void 0,m={},g,A,y=!1,I=!1,x=await this.featureFlagsPoller?.getAllFlagsAndPayloads(f,a),v=new Set;if(x)for(let[R,D]of Object.entries(x.response)){let O=this.featureFlagsPoller?.featureFlagsByKey[R];m[R]={key:R,enabled:D!==!1,variant:typeof D=="string"?D:void 0,payload:x.payloads[R],id:O?.id,version:void 0,reason:"Evaluated locally",locallyEvaluated:!0,hasExperiment:O?.has_experiment},v.add(R)}let w=d!==void 0&&Array.from(d).some(R=>this.featureFlagsPoller?.featureFlagsByKey[R]===void 0);if((x?x.fallbackToFlags||w:!0)&&!c){let R=await super.getFeatureFlagDetailsStateless(f.distinctId,f.groups,u,l,s,a);if(R){this._minimalFlagCalledEvents=R.minimalFlagCalledEvents===!0,g=R.requestId,A=R.evaluatedAt,y=!!R.errorsWhileComputingFlags,I=Array.isArray(R.quotaLimited)&&R.quotaLimited.includes("feature_flags");for(let[D,O]of Object.entries(R.flags)){if(v.has(D))continue;let M;if(O.metadata?.payload!==void 0)try{M=JSON.parse(O.metadata.payload)}catch{M=O.metadata.payload}m[D]={key:D,enabled:O.enabled,variant:O.variant,payload:M,id:O.metadata?.id,version:O.metadata?.version,reason:O.reason?.description??O.reason?.code,locallyEvaluated:!1,hasExperiment:O.metadata?.has_experiment}}}}if(this._flagOverrides!==void 0)for(let[R,D]of Object.entries(this._flagOverrides)){if(D===void 0){delete m[R];continue}let O=m[R];m[R]={key:R,enabled:D!==!1,variant:typeof D=="string"?D:void 0,payload:O?.payload,id:O?.id,version:O?.version,reason:O?.reason,locallyEvaluated:O?.locallyEvaluated??!1,hasExperiment:O?.hasExperiment}}if(this._payloadOverrides!==void 0)for(let[R,D]of Object.entries(this._payloadOverrides)){let O=m[R];O&&(m[R]={...O,payload:D})}if(d!==void 0)for(let R of Object.keys(m))d.has(R)||delete m[R];return new e1e({host:this._getFeatureFlagEvaluationsHost(),distinctId:n,groups:o,disableGeoip:s,flags:m,requestId:g,evaluatedAt:A,flagDefinitionsLoadedAt:this.featureFlagsPoller?.getFlagDefinitionsLoadedAt(),errorsWhileComputing:y,quotaLimited:I})}_shouldSendMinimalFlagCalledEvent(t,r){return t==="$feature_flag_called"&&this._minimalFlagCalledEvents&&r.$feature_flag_has_experiment===!1}_captureFlagCalledEventIfNeeded(t){let{distinctId:r,key:n,response:i,groups:o,disableGeoip:s,properties:a}=t,c=o&&Object.keys(o).length>0?`_${JSON.stringify(Object.entries(o).sort(([l],[p])=>l<p?-1:l>p?1:0))}`:"",u=`${n}_${i}${c}`;r in this.distinctIdHasSentFlagCalls&&this.distinctIdHasSentFlagCalls[r].has(u)||(Object.keys(this.distinctIdHasSentFlagCalls).length>=this.maxCacheSize&&(this.distinctIdHasSentFlagCalls={}),this.distinctIdHasSentFlagCalls[r]instanceof Set?this.distinctIdHasSentFlagCalls[r].add(u):this.distinctIdHasSentFlagCalls[r]=new Set([u]),this.capture({distinctId:r,event:"$feature_flag_called",properties:a,groups:o,disableGeoip:s}))}_getFeatureFlagEvaluationsHost(){return this._featureFlagEvaluationsHost||(this._featureFlagEvaluationsHost={captureFlagCalledEventIfNeeded:t=>this._captureFlagCalledEventIfNeeded(t),logWarning:t=>{this.options.featureFlagsLogWarnings!==!1&&console.warn(`[PostHog] ${t}`)}}),this._featureFlagEvaluationsHost}groupIdentify({groupType:t,groupKey:r,properties:n,distinctId:i,disableGeoip:o}){this._sendPreparedEvent("capture",{distinctId:i||`$${t}_${r}`,event:"$groupidentify",properties:{$group_type:t,$group_key:r,$group_set:n||{}},disableGeoip:o},!1,{includeContextProperties:!1})}async groupIdentifyImmediate({groupType:t,groupKey:r,properties:n,distinctId:i,disableGeoip:o}){await this._sendPreparedEvent("capture",{distinctId:i||`$${t}_${r}`,event:"$groupidentify",properties:{$group_type:t,$group_key:r,$group_set:n||{}},disableGeoip:o},!0,{includeContextProperties:!1})}async reloadFeatureFlags(){await this.featureFlagsPoller?.loadFeatureFlags(!0)}overrideFeatureFlags(t){let r=n=>Object.fromEntries(n.map(i=>[i,!0]));if(t===!1){this._flagOverrides=void 0,this._payloadOverrides=void 0;return}if(Array.isArray(t)){this._flagOverrides=r(t);return}if(this._isFeatureFlagOverrideOptions(t)){"flags"in t&&(t.flags===!1?this._flagOverrides=void 0:Array.isArray(t.flags)?this._flagOverrides=r(t.flags):t.flags!==void 0&&(this._flagOverrides={...t.flags})),"payloads"in t&&(t.payloads===!1?this._payloadOverrides=void 0:t.payloads!==void 0&&(this._payloadOverrides={...t.payloads}));return}this._flagOverrides={...t}}_isFeatureFlagOverrideOptions(t){if(typeof t!="object"||t===null||Array.isArray(t))return!1;let r=t;if("flags"in r){let n=r.flags;if(n===!1||Array.isArray(n)||typeof n=="object"&&n!==null)return!0}if("payloads"in r){let n=r.payloads;if(n===!1||typeof n=="object"&&n!==null)return!0}return!1}withContext(t,r,n){return this.context?this.context.run(t,r,n):r()}getContext(){return this.context?.get()}enterContext(t,r){this.context?.enter(t,r)}async _shutdown(t){let r=Date.now()+(t??3e4),n=this._consumeWaitUntilCycle();await this.featureFlagsPoller?.stopPoller(t),this.errorTracking.shutdown(),this._metrics&&(await XSe(this._metrics.flush().catch(()=>{}),Math.max(0,r-Date.now())),this._metrics.reset()),this._traces&&(await XSe(this._traces.flush().catch(()=>{}),Math.max(0,r-Date.now())),this._traces.reset());try{return await super._shutdown(Math.max(0,r-Date.now()))}finally{this.distinctIdHasSentFlagCalls={},n?.()}}async _requestRemoteConfigPayload(t){if(this.disabled||!this.apiKey||!this.options.personalApiKey)return;let r=`${this.host}/api/projects/@current/feature_flags/${t}/remote_config?token=${encodeURIComponent(this.apiKey)}`,n={method:"GET",headers:{...this.getCustomHeaders(),"Content-Type":"application/json",Authorization:`Bearer ${this.options.personalApiKey}`}},i=null;if(this.options.requestTimeout&&typeof this.options.requestTimeout=="number"){let o=new AbortController;i=RN(()=>{o.abort()},this.options.requestTimeout),n.signal=o.signal}try{return await this.fetch(r,n)}catch(o){this._events.emit("error",o);return}finally{i&&clearTimeout(i)}}extractPropertiesFromEvent(t,r){if(!t)return{personProperties:{},groupProperties:{}};let n={},i={};for(let[o,s]of Object.entries(t))if(Drl(s)&&r&&o in r){let a={};for(let[c,u]of Object.entries(s))a[String(c)]=String(u);i[String(o)]=a}else n[String(o)]=String(s);return{personProperties:n,groupProperties:i}}async getFeatureFlagsForEvent(t,r,n,i){if(this.disabled||!this.apiKey)return void this._logger.warn("The client is disabled");let o=i?.personProperties||{},s=i?.groupProperties||{},a=i?.flagKeys;if(i?.onlyEvaluateLocally??this.options.strictLocalEvaluation??!1)if((this.featureFlagsPoller?.featureFlags?.length||0)>0){let u={};for(let[l,p]of Object.entries(r||{}))u[l]=String(p);return await this.getAllFlags(t,{groups:u,personProperties:o,groupProperties:s,disableGeoip:n,onlyEvaluateLocally:!0,flagKeys:a})}else return{};if((this.featureFlagsPoller?.featureFlags?.length||0)>0){let u={};for(let[l,p]of Object.entries(r||{}))u[l]=String(p);return await this.getAllFlags(t,{groups:u,personProperties:o,groupProperties:s,disableGeoip:n,onlyEvaluateLocally:!0,flagKeys:a})}return(await super.getFeatureFlagsStateless(t,r,o,s,n)).flags}addLocalPersonAndGroupProperties(t,r,n,i){let o={...n||{}},s={};if(r)for(let a of Object.keys(r))s[a]={$group_key:r[a],...i?.[a]||{}};return{allPersonProperties:o,allGroupProperties:s}}personPropertiesForLocalEvaluation(t,r){return{distinct_id:t,...r||{}}}createFeatureFlagEvaluationContext(t,r,n,i){return{distinctId:t,groups:r||{},personProperties:n||{},groupProperties:i||{},evaluationCache:{}}}captureException(t,r,n,i,o){if(!r5e.isPreviouslyCapturedError(t)){let s=new Error("PostHog syntheticException");this.addPendingPromise(r5e.buildEventMessage(this.getErrorPropertiesBuilder(),t,{syntheticException:s},r,n).then(a=>this._capturePreparedEvent({...a,uuid:i,flags:o},!1)))}}async captureExceptionImmediate(t,r,n,i){if(!r5e.isPreviouslyCapturedError(t)){let o=new Error("PostHog syntheticException");return this.addPendingPromise(r5e.buildEventMessage(this.getErrorPropertiesBuilder(),t,{syntheticException:o},r,n).then(s=>this.captureImmediate({...s,flags:i})))}}async prepareEventMessage(t){return this._prepareEventMessage(t)}async _prepareEventMessage(t,r={}){let{distinctId:n,event:i,properties:o,groups:s,flags:a,sendFeatureFlags:c,timestamp:u,disableGeoip:l,uuid:p}=t,f=this.context?.get(),d=r.includeContextProperties??!0,m=n||f?.distinctId,g=d?{...this.props,...f?.properties||{},...o||{}}:{...o||{}};m||(m=BN(),g.$process_person_profile=!1),d&&f?.sessionId&&!g.$session_id&&(g.$session_id=f.sessionId);let A=this._shouldSendMinimalFlagCalledEvent(i,g)?xHt(g):g,y=this._runBeforeSend({distinctId:m,event:i,properties:A,groups:s,flags:a,sendFeatureFlags:c,timestamp:u,disableGeoip:l,uuid:p});if(!y)return Promise.reject(null);let I=await Promise.resolve().then(async()=>{if(a)return c&&console.warn("[PostHog] Both `flags` and `sendFeatureFlags` were passed to capture(); using `flags` and ignoring `sendFeatureFlags`."),a._getEventProperties();if(c){ain("sendFeatureFlags","`sendFeatureFlags` is deprecated and will be removed in a future major version. Pass a `flags` snapshot from `posthog.evaluateFlags(...)` instead \u2014 it avoids a second `/flags` request per capture and guarantees the event carries the exact flag values your code branched on.");let x=typeof c=="object"?c:void 0,v=await this.getFeatureFlagsForEvent(y.distinctId,s,l,x);return ssh(v)}return{}}).catch(()=>({})).then(x=>{let v=y.groups||s;return{...x,...y.properties||{},...v!==void 0&&Object.keys(v).length>0?{$groups:v}:{}}});return y.event==="$pageview"&&this.options.__preview_capture_bot_pageviews&&typeof I.$raw_user_agent=="string"&&Frl(I.$raw_user_agent,this.options.custom_blocked_useragents||[])&&(y.event="$bot_pageview",I.$browser_type="bot"),{distinctId:y.distinctId,event:y.event,properties:I,options:{timestamp:y.timestamp,disableGeoip:y.disableGeoip,uuid:y.uuid}}}_runBeforeSend(t){let r=this.options.before_send;if(!r)return t;let n=Array.isArray(r)?r:[r],i=t;for(let o of n)try{if(i=o(i),!i)return this._logger.info(`Event '${t.event}' was rejected in beforeSend function`),null;if(!i.properties||Object.keys(i.properties).length===0){let s=`Event '${i.event}' has no properties after beforeSend function, this is likely an error.`;this._logger.warn(s)}}catch(s){return this._logger.error(`Error in before_send function for event '${t.event}':`,s),null}return i}};var Dil=require("async_hooks"),uin=class{constructor(){this.storage=new Dil.AsyncLocalStorage}get(){return this.storage.getStore()}run(t,r,n){return this.storage.run(this.resolve(t,n),r)}enter(t,r){this.storage.enterWith(this.resolve(t,r))}resolve(t,r){if(r?.fresh===!0)return t;let n=this.get()||{};return{distinctId:t.distinctId??n.distinctId,sessionId:t.sessionId??n.sessionId,properties:{...n.properties||{},...t.properties||{}}}}};var kil=require("async_hooks"),lin=class{active(){return this._storage.getStore()}with(t,r){return this._storage.run(t,r)}constructor(){this._storage=new kil.AsyncLocalStorage}};var Fil=require("zlib"),Nil=require("util"),ash=(0,Nil.promisify)(Fil.gzip);async function jil(e,t=!0){try{let r=await ash(e);return new Uint8Array(r)}catch(r){return t&&console.error("Failed to gzip compress data",r),null}}var pin=require("os");function zil(){let e,t;try{e=(0,pin.platform)(),t=(0,pin.release)()}catch{}return gYo(e,t)}var Qil="posthog-node";function csh(e,{organization:t,projectId:r,prefix:n,severityAllowList:i=["error"],sendExceptionsToPostHog:o=!0}={}){return s=>{if(!(i==="*"||i.includes(s.level)))return s;s.tags||(s.tags={});let c=s.tags[jYo.POSTHOG_ID_TAG];if(c===void 0)return s;let u=e.options.host??"https://us.i.posthog.com",l=new URL(`/project/${e.apiKey}/person/${c}`,u).toString();s.tags["PostHog Person URL"]=l;let p=s.exception?.values||[],f=p.map(g=>({...g,stacktrace:g.stacktrace?{...g.stacktrace,type:"raw",frames:(g.stacktrace.frames||[]).map(A=>({...A,platform:"node:javascript"}))}:void 0})),d={$exception_message:p[0]?.value||s.message,$exception_type:p[0]?.type,$exception_level:s.level,$exception_list:f,$sentry_event_id:s.event_id,$sentry_exception:s.exception,$sentry_exception_message:p[0]?.value||s.message,$sentry_exception_type:p[0]?.type,$sentry_tags:s.tags},m=eO.getInjectedReleaseId();return m&&(d.$release_id=m),t&&r&&(d.$sentry_url=(n||"https://sentry.io/organizations/")+t+"/issues/?project="+r+"&query="+s.event_id),o&&e.capture({event:"$exception",distinctId:c,properties:d}),s}}var jYo=class{static{this.POSTHOG_ID_TAG="posthog_distinct_id"}constructor(t,r,n,i,o){this.name=Qil,this.name=Qil,this.setupOnce=function(s,a){let c=a()?.getClient()?.getDsn()?.projectId;s(csh(t,{organization:r,projectId:c,prefix:n,severityAllowList:i,sendExceptionsToPostHog:o??!0}))}}};var cne=class extends cin{getLibraryId(){return"posthog-node"}compressPayload(t){return jil(t,this.isDebug)}initializeContext(){return new uin}initializeSpanContextManager(){return new lin}hostResourceAttributes(){return zil()}createErrorPropertiesBuilder(){return new eO.ErrorPropertiesBuilder([new eO.EventCoercer,new eO.ErrorCoercer,new eO.ObjectCoercer,new eO.StringCoercer,new eO.PrimitiveCoercer],eO.createStackParser("node:javascript",eO.nodeStackLineParser),[Trl(),t=>lil(t,void 0,this._logger),mil()])}};function ush(e){return e==null||!e.enabled?!1:e.variant==null||e.variant==="true"}var fin=class{isEnabled(){return Promise.resolve(!1)}getCachedValue(){}},lsh=3e3,din=class{evaluator;environment;pending=new Map;resolved=new Map;constructor({environment:t,posthogApiKey:r,evaluator:n}){this.environment=t,this.evaluator=n??new cne(r??"",{featureFlagsRequestTimeoutMs:lsh})}isEnabled(t,r){let n=Mil(t,r),i=this.pending.get(n);if(i!=null)return i;let o=this.evaluateAndRemember(t,r,n);return this.pending.set(n,o),o}async evaluateAndRemember(t,r,n){let i=await this.evaluate(t,r);return this.resolved.set(n,i),i}getCachedValue(t,r){return this.resolved.get(Mil(t,r))}async evaluate(t,r){let{org:n}=r,i=fsh(r,this.environment);try{let o=await this.evaluator.getFeatureFlagResult(t,psh(n),{personProperties:i,groups:{organization:n},groupProperties:{organization:i},sendFeatureFlagEvents:!1});return ush(o)}catch{return!1}}};function psh(e){return`org:${e}`}function fsh({org:e,generator:t,language:r},n){return{org:e,environment:n,...t!=null?{generator:t}:{},...r!=null?{language:r}:{}}}function Mil(e,{org:t,generator:r,language:n}){return JSON.stringify([e,t,r??null,n??null])}var zYo;function min(){return zYo==null&&(zYo=dsh()),zYo}function dsh(){let e="phc_yQgAEdJJkVpI24NdSRID2mor1x1leRpDoC9yZ9mfXal";return e==null||e.trim().length===0?new fin:new din({posthogApiKey:e,environment:TJ()})}var hin=class{posthog;constructor({posthogApiKey:t}){this.posthog=new cne(t,{isServer:!1})}async identify(){}async sendEvent(t){t.orgId!=null&&this.posthog.capture({distinctId:t.orgId,event:"CLI",properties:{...t,...t.properties,version:"5.152.2",usingAccessToken:!0,cliReleaseEnvironment:TJ(),...mpe()}})}sendAutomationEvent(t){this.posthog.capture({distinctId:t.distinctId,event:t.event,properties:{...t.properties,cliReleaseEnvironment:TJ()}})}async flush(){try{await Promise.race([this.posthog.flush(),new Promise(t=>setTimeout(t,3e3))])}catch{}}};var GHt=class{async sendEvent(){}async sendAutomationEvent(){}async identify(){}async flush(){}};Rd();er();var uft=require("fs/promises"),Lil=require("os"),_il=require("path");LUe();var msh="id",hsh=".fern",qHt=class{posthog;userId;token;constructor({token:t,posthogApiKey:r}){this.posthog=new cne(r,{isServer:!1}),this.userId=t==null?void 0:P9o(t),this.token=t}async identify(){this.userId!=null&&this.posthog.alias({distinctId:this.userId,alias:await this.getPersistedDistinctId()})}async sendEvent(t){let r=await this.getUserEmail();this.posthog.capture({distinctId:this.userId??await this.getPersistedDistinctId(),event:"CLI",properties:{version:"5.152.2",...t,...t.properties,usingAccessToken:!1,cliReleaseEnvironment:TJ(),agent:yWr(),...r!=null?{userEmail:r}:{},...mpe()}})}sendAutomationEvent(t){this.posthog.capture({distinctId:t.distinctId,event:t.event,properties:{...t.properties,cliReleaseEnvironment:TJ()}})}async flush(){try{await Promise.race([this.posthog.flush(),new Promise(t=>setTimeout(t,3e3))])}catch{}}userEmail;async getUserEmail(){if(this.userEmail!==null){if(this.userEmail!=null)return this.userEmail;if(this.token==null){this.userEmail=null;return}try{let t=await Hf({token:this.token.value}).user.getMyself();if(t.ok&&t.body.email!=null)return this.userEmail=t.body.email,this.userEmail}catch{}this.userEmail=null}}persistedDistinctId;async getPersistedDistinctId(){if(this.persistedDistinctId==null){let t=VS(),r=ke(_t.of((0,Lil.homedir)()),be.of(hsh),be.of(msh));try{await Wt(r)?this.persistedDistinctId=(await(0,uft.readFile)(r)).toString():(await(0,uft.mkdir)((0,_il.dirname)(r),{recursive:!0}),await(0,uft.writeFile)(r,t),this.persistedDistinctId=t)}catch{this.persistedDistinctId=t}}return this.persistedDistinctId}};var QYo;async function WHt(){return QYo==null&&(QYo=await gsh()),QYo}async function gsh(){try{let e="phc_yQgAEdJJkVpI24NdSRID2mor1x1leRpDoC9yZ9mfXal",t=process.env.FERN_DISABLE_TELEMETRY==="true";if(e==null||e.trim().length===0||t)return new GHt;let r=await Elt();return r!=null?new qHt({token:r,posthogApiKey:e}):await AM()!=null?new hin({posthogApiKey:e}):new qHt({token:void 0,posthogApiKey:e})}catch{return new GHt}}Sn();Ot();Nt();a8();var HHt=Ae(require("process"),1);LXe();var Gil=Ae(o6o(),1),qil=Ae(Vil(),1);function tO(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=nH(e),e.length===0))return 0;e=e.replace((0,qil.default)()," ");let r=t.ambiguousIsNarrow?1:2,n=0;for(let i of e){let o=i.codePointAt(0);if(o<=31||o>=127&&o<=159||o>=768&&o<=879)continue;switch(Gil.default.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}Sn();function gin(e){let t=0;for(let r of e.split(`
|
|
3452
|
+
at ${r.filename}:${n}:${i}`}};var Vnh=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,bHt=class{match(t){return typeof t=="string"}coerce(t,r){let[n,i]=this.getInfos(t);return{type:n??"Error",value:i??t,stack:r.syntheticException?.stack,synthetic:!0}}getInfos(t){let r="Error",n=t,i=t.match(Vnh);return i&&(r=i[1],n=i[2]),[r,n]}};var gnl=["fatal","error","warning","log","info","debug"];function Fnn(e,t=40){let r=Object.keys(e);if(r.sort(),!r.length)return"[object has no keys]";for(let n=r.length;n>0;n--){let i=r.slice(0,n).join(", ");if(!(i.length>t))return n===r.length||i.length<=t?i:`${i.slice(0,t)}...`}return""}var EHt=class{match(t){return typeof t=="object"&&t!==null}coerce(t,r){let n=this.getErrorPropertyFromObject(t);return n?r.apply(n):{type:this.getType(t),value:this.getValue(t),stack:this.getStack(t)??r.syntheticException?.stack,level:this.isSeverityLevel(t.level)?t.level:"error",synthetic:!0}}getType(t){if(Zpt(t))return t.constructor.name;let r="name"in t?t.name:void 0;return ZD(r)&&!kJo(r)?r:"Error"}getValue(t){if("name"in t&&typeof t.name=="string"){let i=`'${t.name}' captured as exception`;return"message"in t&&typeof t.message=="string"&&(i+=` with message: '${t.message}'`),i}if("message"in t&&typeof t.message=="string")return t.message;let r=this.getObjectClassName(t),n=Fnn(t);return`${r&&r!=="Object"?`'${r}'`:"Object"} captured as exception with keys: ${n}`}isSeverityLevel(t){return ZD(t)&&!kJo(t)&&gnl.indexOf(t)>=0}getStack(t){try{return ZD(t.stacktrace)&&t.stacktrace.length>0?t.stacktrace:ZD(t.stack)&&t.stack.length>0?t.stack:void 0}catch{return}}getErrorPropertyFromObject(t){for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let n=t[r];if(YSe(n))return n}}getObjectClassName(t){try{let r=Object.getPrototypeOf(t);return r?r.constructor.name:void 0}catch{return}}};var XJo=class{match(t){return Zpt(t)}coerce(t,r){let n=t.constructor.name;return{type:n,value:`${n} captured as exception with keys: ${Fnn(t)}`,stack:r.syntheticException?.stack,synthetic:!0}}};var IHt=class{match(t){return bnn(t)}coerce(t,r){return{type:"Error",value:`Primitive value captured as exception: ${String(t)}`,stack:r.syntheticException?.stack,synthetic:!0}}};var ZJo=class{match(t){return YVe(t,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(t)}isCustomEventWrappingRejection(t){if(!Zpt(t))return!1;try{let r=t.detail;return r!=null&&typeof r=="object"&&"reason"in r}catch{return!1}}coerce(t,r){let n=this.getUnhandledRejectionReason(t);return bnn(n)?{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(n)}`,stack:r.syntheticException?.stack,synthetic:!0}:r.apply(n)}getUnhandledRejectionReason(t){try{if("reason"in t)return t.reason;if("detail"in t&&t.detail!=null&&typeof t.detail=="object"&&"reason"in t.detail)return t.detail.reason}catch{}return t}};var $Jo=class{constructor(t){this._maxSize=t,this._cache=new Map}get(t){let r=this._cache.get(t);if(r!==void 0)return this._cache.delete(t),this._cache.set(t,r),r}set(t,r){this._cache.set(t,r)}reduce(){for(;this._cache.size>=this._maxSize;){let t=this._cache.keys().next().value;t&&this._cache.delete(t)}}};var vHt={MESSAGE:"$message",TIMESTAMP:"$timestamp"},Gnh=new Set([vHt.MESSAGE,vHt.TIMESTAMP]),Nnn={enabled:!0,max_bytes:32768};function eYo(e){return e?{enabled:e.enabled??Nnn.enabled,max_bytes:Wnh(e.max_bytes,Nnn.max_bytes)}:{...Nnn}}function qnh(e){if(!e)return{sanitizedProperties:{},droppedKeys:[]};let t=[];return{sanitizedProperties:Object.keys(e).reduce((n,i)=>Gnh.has(i)?(t.push(i),n):(n[i]=e[i],n),{}),droppedKeys:t}}var tYo=class{constructor(t){this._entries=[],this._totalBytes=0,this._config=eYo(t)}setConfig(t){this._config=eYo(t),this._trimToMaxBytes()}add(t){let r=Hnh(t);if(!r)return;let n=Anl(r.json);n>this._config.max_bytes||(this._entries.push({step:r.step,bytes:n}),this._totalBytes+=n,this._trimToMaxBytes())}getAttachable(){return this._entries.map(t=>t.step)}clear(){this._entries=[],this._totalBytes=0}size(){return this._entries.length}_trimToMaxBytes(){for(;this._totalBytes>this._config.max_bytes&&this._entries.length>0;){let t=this._entries.shift();t&&(this._totalBytes-=t.bytes)}}};function Wnh(e,t){if(!Xpt(e)||e===1/0||e===-1/0)return t;let r=Math.floor(e);return r<0?t:r}function Hnh(e){let t;try{t=JSe(e)}catch{return}try{let r=JSON.parse(t);if(!dHt(r))return;let n=r,i=n[vHt.MESSAGE],o=n[vHt.TIMESTAMP];return!ZD(i)||i.trim().length===0||!ZD(o)&&!Xpt(o)?void 0:{step:n,json:t}}catch{return}}function Anl(e){if("u">typeof TextEncoder)return new TextEncoder().encode(e).length;let t=encodeURIComponent(e),r=0;for(let n=0;n<t.length;n++)t[n]==="%"?(r+=1,n+=2):r+=1;return r}function Knh(){let e=globalThis._posthogReleaseId;return typeof e=="string"&&e.length>0?e:void 0}var rYo=e=>{if("flags"in e){let t=ynl(e.flags),r=bnl(e.flags);return{...e,featureFlags:t,featureFlagPayloads:r}}{let t=e.featureFlags??{},r=Object.fromEntries(Object.entries(e.featureFlagPayloads||{}).map(([i,o])=>[i,rft(o)])),n=Object.fromEntries(Object.entries(t).map(([i,o])=>[i,Jnh(i,o,r[i])]));return{...e,featureFlags:t,featureFlagPayloads:r,flags:n}}};function Jnh(e,t,r){return{key:e,enabled:typeof t=="string"?!0:t,variant:typeof t=="string"?t:void 0,reason:void 0,metadata:{id:void 0,version:void 0,payload:r?JSON.stringify(r):void 0,description:void 0}}}var ynl=e=>Object.fromEntries(Object.entries(e??{}).map(([t,r])=>[t,CHt(r)]).filter(([,t])=>t!==void 0)),bnl=e=>{let t=e??{};return Object.fromEntries(Object.keys(t).filter(r=>{let n=t[r];return n.enabled&&n.metadata&&n.metadata.payload!==void 0}).map(r=>{let n=t[r].metadata?.payload;return[r,n?rft(n):void 0]}))},CHt=e=>e===void 0?void 0:e.variant??e.enabled,rft=e=>{if(typeof e!="string")return e;try{return JSON.parse(e)}catch{return e}};var Enl=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid","gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","oppref","irclid","_kx"],Ynh=["$feature_flag","$feature_flag_response","$feature_flag_has_experiment","$feature_flag_id","$feature_flag_version","$feature_flag_reason","$feature_flag_request_id","$feature_flag_evaluated_at","$feature_flag_error","locally_evaluated","$groups","$process_person_profile","$geoip_disable","$current_url","$pathname","$referring_domain",...Enl,"$session_id","$window_id","$lib","$lib_version","$device_id","$is_server","$react_native_version"],xHt=(e,t=[])=>{let r={},n=i=>{e[i]!==void 0&&(r[i]=e[i])};return Ynh.forEach(n),t.forEach(n),r};var jnn=class{constructor(){this.events={},this.events={}}on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),()=>{this.events[t]=this.events[t].filter(n=>n!==r)}}emit(t,r){for(let n of this.events[t]||[])n(r);for(let n of this.events["*"]||[])n(t,r)}};function nYo(){return"CompressionStream"in globalThis&&"TextEncoder"in globalThis&&"Response"in globalThis&&typeof Response.prototype.blob=="function"}var Znh="NativeGzipValidationError",$nh=31,eih=139,tih=8,rih=e=>e.length>=2&&e[0]===$nh&&e[1]===eih;var wHt,nih=()=>{if(wHt)return wHt;wHt=[];for(let e=0;e<256;e++){let t=e;for(let r=0;r<8;r++)t=1&t?3988292384^t>>>1:t>>>1;wHt[e]=t>>>0}return wHt},iih=e=>{let t=nih(),r=4294967295;for(let n=0;n<e.length;n++)r=t[(r^e[n])&255]^r>>>8;return(4294967295^r)>>>0},znn=e=>{throw tft(Znh,`Native gzip produced invalid output: ${e}`)},oih=async(e,t)=>{e.size<18&&znn("too-short");let r=new Uint8Array(await e.slice(0,10).arrayBuffer());(!rih(r)||r[2]!==tih)&&znn("invalid-header");let n=new DataView(await e.slice(e.size-8).arrayBuffer());n.getUint32(0,!0)!==iih(t)&&znn("invalid-crc");let i=t.length>>>0;n.getUint32(4,!0)!==i&&znn("invalid-size")};async function SHt(e,t=!0,r){try{let n=new TextEncoder().encode(e),i=new globalThis.CompressionStream("gzip"),o=i.writable.getWriter(),s=o.write(n).then(()=>o.close()).catch(async u=>{try{await o.abort(u)}catch{}throw u}),a=new Response(i.readable).blob(),[c]=await Promise.all([a,s]);return await oih(c,n),c}catch(n){if(r?.rethrow)throw n;return t&&console.error("Failed to gzip compress data",n),null}}var D8=class extends Error{constructor(t,r,n,i){super("HTTP error while fetching PostHog: status="+t.status+", reqByteLength="+r),this.response=t,this.reqByteLength=r,this.responseBodyDeadline=n,this.abortController=i,this.name="PostHogFetchHttpError",this._bodyReadTimedOut=!1}get status(){return this.response.status}get retryAfterMs(){try{return UJo(this.response.headers?.get("retry-after"))}catch{return}}get bodyReadTimedOut(){return this._bodyReadTimedOut}get text(){if(!this.responseBodyTextPromise)if(Date.now()>=this.responseBodyDeadline){this._bodyReadTimedOut=!0;let t=tft("AbortError","Response body read timed out");this.cancelResponseBody(t),this.responseBodyTextPromise=Promise.reject(t)}else{let t=new Promise((n,i)=>{this.responseBodyTimer=RN(()=>{this._bodyReadTimedOut=!0;let o=tft("AbortError","Response body read timed out");i(o),this.cancelResponseBody(o)},this.responseBodyDeadline-Date.now())}),r;try{r=Promise.resolve(this.response.text())}catch(n){r=Promise.reject(n)}this.responseBodyTextPromise=Promise.race([r,t]).finally(()=>clearTimeout(this.responseBodyTimer))}return this.responseBodyTextPromise}get json(){return this.text.then(t=>JSON.parse(t))}cancelResponseBody(t){clearTimeout(this.responseBodyTimer),this.abortController.signal.aborted||this.abortController.abort(t),(async()=>{try{await this.response.body?.cancel()}catch{}})()}},Rhe=class extends Error{constructor(t){super("Network error while fetching PostHog",t instanceof Error?{cause:t}:{}),this.error=t,this.name="PostHogFetchNetworkError"}};var wnl=(e,t)=>{for(let r of Object.keys(t))(r.startsWith("$feature/")||r==="$active_feature_flags")&&(e[r]=t[r])};async function Inl(e){if(e instanceof D8){let t="";try{t=await e.text}catch{e.bodyReadTimedOut&&(t="<response body read timed out>")}console.error(`Error while flushing PostHog: message=${e.message}, response body=${t}`,e)}else console.error("Error while flushing PostHog",e);return Promise.resolve()}function sih(e){return typeof e=="object"&&(e instanceof D8||Snl(e))}function Snl(e){return e instanceof Rhe}function aih(e){if(e instanceof D8)return e.status===502||e.status===504;if(!(e instanceof Rhe))return!1;let t=e.error;return(t?.code??t?.cause?.code)!=="ECONNREFUSED"}var vnl=10485760;function Cnl(e){try{return typeof e!="string"?e instanceof Uint8Array?e.byteLength:e.size:"u">typeof Buffer?Buffer.byteLength(e,$rl):new TextEncoder().encode(e).length}catch{return 0}}function nft(e){return typeof e=="object"&&e instanceof D8&&e.status===413}function Qnn(e){return e instanceof D8?e.status===408||e.status===429||e.status>=500:Snl(e)}function xnl(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var iYo="default",THt=class{getErrorPropertiesBuilder(){return this._errorPropertiesBuilder||(this._errorPropertiesBuilder=this.createErrorPropertiesBuilder()),this._errorPropertiesBuilder}createErrorPropertiesBuilder(){return new AHt([new yHt,new EHt,new bHt,new IHt],KJo())}getEvaluationRuntime(){}constructor(t,r={}){this.flushPromise=null,this.pendingFlushPromise=null,this.flushPromises=new Set,this._dequeuedMessagesCount=0,this.shutdownPromise=null,this.promiseQueue=new xnn,this._events=new jnn,this._isInitialized=!1;let n=typeof t=="string"?t.trim():"",i=typeof r.host=="string"?r.host.trim():"",o=!n;this._logger=Qrl("[PostHog]",this.logMsgIfDebug.bind(this)),o&&this._logger.error("You must pass your PostHog project's api key. The client will be disabled."),this.apiKey=n,this.host=enl(i||"https://us.i.posthog.com"),this.flushAt=r.flushAt?Math.max(r.flushAt,1):20,this.maxBatchSize=Math.max(this.flushAt,r.maxBatchSize??100),this.maxQueueSize=Math.max(this.flushAt,r.maxQueueSize??1e3),this.flushInterval=r.flushInterval??1e4,this.preloadFeatureFlags=r.preloadFeatureFlags??!0,this.defaultOptIn=r.defaultOptIn??!0,this.disableSurveys=r.disableSurveys??!1,this._retryOptions={retryCount:r.fetchRetryCount??3,retryDelay:r.fetchRetryDelay??3e3,retryCheck:Qnn},this.requestTimeout=r.requestTimeout??1e4,this.featureFlagsRequestTimeoutMs=r.featureFlagsRequestTimeoutMs??3e3,this.featureFlagsRequestMaxRetries=r.featureFlagsRequestMaxRetries??1,this.remoteConfigRequestTimeoutMs=r.remoteConfigRequestTimeoutMs??3e3,this.disableGeoip=r.disableGeoip??!0,this.disabled=(r.disabled??!1)||o,this.historicalMigration=r?.historicalMigration??!1,this._initPromise=Promise.resolve(),this._isInitialized=!0,this.evaluationContexts=r?.evaluationContexts??r?.evaluationEnvironments,r?.evaluationEnvironments&&!r?.evaluationContexts&&this._logger.warn("evaluationEnvironments is deprecated. Use evaluationContexts instead. This property will be removed in a future version."),this.disableCompression=!nYo()||(r?.disableCompression??!1)}logMsgIfDebug(t){this.isDebug&&t()}wrap(t){if(this.disabled)return void this._logger.warn("The client is disabled");if(this._isInitialized)return t();this._initPromise.then(()=>t())}getCommonEventProperties(){return{$lib:this.getLibraryId(),$lib_version:this.getLibraryVersion()}}get optedOut(){return this.getPersistedProperty(wM.OptedOut)??!this.defaultOptIn}async optIn(){this.wrap(()=>{this.setPersistedProperty(wM.OptedOut,!1)})}async optOut(){this.wrap(()=>{this.setPersistedProperty(wM.OptedOut,!0)})}on(t,r){return this._events.on(t,r)}debug(t=!0){if(this.removeDebugCallback?.(),t){let r=this.on("*",(n,i)=>this._logger.info(n,i));this.removeDebugCallback=()=>{r(),this.removeDebugCallback=void 0}}}get isDebug(){return!!this.removeDebugCallback}get isDisabled(){return this.disabled}buildPayload(t){let r=t.properties||{},n={...r,...this.getCommonEventProperties()};return wnl(n,r),t.event==="$feature_flag_called"&&n.$feature_flag_has_experiment===!1&&this.isMinimalFlagCalledEventsEnabled()&&(n=xHt(n)),{distinct_id:t.distinct_id,event:t.event,properties:n}}isMinimalFlagCalledEventsEnabled(){return!1}addPendingPromise(t){return this.promiseQueue.add(t)}identifyStateless(t,r,n){this.wrap(()=>{let i={...this.buildPayload({distinct_id:t,event:"$identify",properties:r})};this.enqueue("identify",i,n)})}async identifyStatelessImmediate(t,r,n){let i={...this.buildPayload({distinct_id:t,event:"$identify",properties:r})};await this.sendImmediate("identify",i,n)}captureStateless(t,r,n,i){this.wrap(()=>{let o=this.buildPayload({distinct_id:t,event:r,properties:n});this.enqueue("capture",o,i)})}async captureStatelessImmediate(t,r,n,i){let o=this.buildPayload({distinct_id:t,event:r,properties:n});await this.sendImmediate("capture",o,i)}aliasStateless(t,r,n,i){this.wrap(()=>{let o=this.buildPayload({event:"$create_alias",distinct_id:r,properties:{...n||{},distinct_id:r,alias:t}});this.enqueue("alias",o,i)})}async aliasStatelessImmediate(t,r,n,i){let o=this.buildPayload({event:"$create_alias",distinct_id:r,properties:{...n||{},distinct_id:r,alias:t}});await this.sendImmediate("alias",o,i)}groupIdentifyStateless(t,r,n,i,o,s){this.wrap(()=>{let a=this.buildPayload({distinct_id:o||`$${t}_${r}`,event:"$groupidentify",properties:{$group_type:t,$group_key:r,$group_set:n||{},...s||{}}});this.enqueue("capture",a,i)})}async groupIdentifyStatelessImmediate(t,r,n,i,o,s){let a=this.buildPayload({distinct_id:o||`$${t}_${r}`,event:"$groupidentify",properties:{$group_type:t,$group_key:r,$group_set:n||{},...s||{}}});await this.sendImmediate("capture",a,i)}async getRemoteConfig(){await this._initPromise;let t=this.host;t==="https://us.i.posthog.com"?t="https://us-assets.i.posthog.com":t==="https://eu.i.posthog.com"&&(t="https://eu-assets.i.posthog.com");let r=`${t}/array/${this.apiKey}/config`,n={method:"GET",headers:{...this.getCustomHeaders(),"Content-Type":"application/json"}};return this.fetchWithRetry(r,n,{type:"required",consume:i=>i.json()},{retryCount:0},this.remoteConfigRequestTimeoutMs).catch(i=>{this._logger.error("Remote config could not be loaded",i),this._events.emit("error",i)})}async getFlags(t,r={},n={},i={},o={},s=!1){await this._initPromise;let a=s?"&config=true":"",c=`${this.host}/flags/?v=2${a}`,u={token:this.apiKey,distinct_id:t,groups:r,person_properties:n,group_properties:i,...o};n.$device_id&&(u.$device_id=n.$device_id),this.evaluationContexts&&this.evaluationContexts.length>0&&(u.evaluation_contexts=this.evaluationContexts);let l=this.getEvaluationRuntime();l&&(u.evaluation_runtime=l);let p={method:"POST",headers:{...this.getCustomHeaders(),"Content-Type":"application/json"},body:JSON.stringify(u)};return this._logger.info("Flags URL",c),this.fetchWithRetry(c,p,{type:"required",consume:f=>f.json()},{retryCount:this.featureFlagsRequestMaxRetries,retryCheck:aih},this.featureFlagsRequestTimeoutMs).then(f=>({success:!0,response:rYo(f)})).catch(f=>(this._events.emit("error",f),{success:!1,error:this.categorizeRequestError(f)}))}categorizeRequestError(t){if(t instanceof D8)return{type:"api_error",statusCode:t.status};if(t instanceof Rhe){let r=t.error;return r instanceof Error&&(r.name==="AbortError"||r.name==="TimeoutError")?{type:"timeout"}:{type:"connection_error"}}return{type:"unknown_error"}}async getFeatureFlagStateless(t,r,n={},i={},o={},s){await this._initPromise;let a=await this.getFeatureFlagDetailStateless(t,r,n,i,o,s);if(a===void 0)return{response:void 0,requestId:void 0};let c=CHt(a.response);return c===void 0&&(c=!1),{response:c,requestId:a.requestId}}async getFeatureFlagDetailStateless(t,r,n={},i={},o={},s){await this._initPromise;let a=await this.getFeatureFlagDetailsStateless(r,n,i,o,s,[t]);return a===void 0?void 0:{response:a.flags[t],requestId:a.requestId,evaluatedAt:a.evaluatedAt}}async getFeatureFlagPayloadStateless(t,r,n={},i={},o={},s){await this._initPromise;let a=await this.getFeatureFlagPayloadsStateless(r,n,i,o,s,[t]);if(!a)return;let c=a[t];return c===void 0?null:c}async getFeatureFlagPayloadsStateless(t,r={},n={},i={},o,s){return await this._initPromise,(await this.getFeatureFlagsAndPayloadsStateless(t,r,n,i,o,s)).payloads}async getFeatureFlagsStateless(t,r={},n={},i={},o,s){return await this._initPromise,await this.getFeatureFlagsAndPayloadsStateless(t,r,n,i,o,s)}async getFeatureFlagsAndPayloadsStateless(t,r={},n={},i={},o,s){await this._initPromise;let a=await this.getFeatureFlagDetailsStateless(t,r,n,i,o,s);return a?{flags:a.featureFlags,payloads:a.featureFlagPayloads,requestId:a.requestId}:{flags:void 0,payloads:void 0,requestId:void 0}}async getFeatureFlagDetailsStateless(t,r={},n={},i={},o,s){await this._initPromise;let a={geoip_disable:o??this.disableGeoip};s&&(a.flag_keys_to_evaluate=s);let c=await this.getFlags(t,r,n,i,a);if(!c.success)return;let u=c.response;return u.errorsWhileComputingFlags&&console.error("[FEATURE FLAGS] Error while computing feature flags, some flags may be missing or incorrect. Learn more at https://posthog.com/docs/feature-flags/best-practices"),u.quotaLimited?.includes("feature_flags")?(console.warn("[FEATURE FLAGS] Feature flags quota limit exceeded - feature flags unavailable. Learn more about billing limits at https://posthog.com/docs/billing/limits-alerts"),{flags:{},featureFlags:{},featureFlagPayloads:{},requestId:u?.requestId,quotaLimited:u.quotaLimited}):u}async getSurveysStateless(){if(await this._initPromise,this.disabled)return[];if(this.disableSurveys===!0)return this._logger.info("Loading surveys is disabled."),[];let t=`${this.host}/api/surveys/?token=${this.apiKey}`,r={method:"GET",headers:{...this.getCustomHeaders(),"Content-Type":"application/json"}},i=(await this.fetchWithRetry(t,r,{type:"required",consume:o=>{if(o.status!==200||!o.json){let s=`Surveys API could not be loaded: ${o.status}`,a=new Error(s);return this._logger.error(a),this._events.emit("error",new Error(s)),Promise.resolve(void 0)}return o.json()}}).catch(o=>{this._logger.error("Surveys API could not be loaded",o),this._events.emit("error",o)}))?.surveys;return i&&this._logger.info("Surveys fetched from API: ",JSON.stringify(i)),i??[]}get props(){return this._props||(this._props=this.getPersistedProperty(wM.Props)),this._props||{}}set props(t){this._props=t}async register(t){this.wrap(()=>{this.props={...this.props,...t},this.setPersistedProperty(wM.Props,this.props)})}async unregister(t){this.wrap(()=>{delete this.props[t],this.setPersistedProperty(wM.Props,this.props)})}processBeforeEnqueue(t){return t}async flushStorage(){}getQueueRouteKey(t){return iYo}persistedQueueKeyForRoute(t){return wM.Queue}getActiveQueueRoutes(){return[iYo]}getRouteQueue(t){return this.getPersistedProperty(this.persistedQueueKeyForRoute(t))||[]}enqueue(t,r,n,i){this.wrap(()=>{if(this.optedOut)return void this._events.emit(t,"Library is disabled. Not sending event. To re-enable, call posthog.optIn()");let o=this.prepareMessage(r,n);if(o=this.processBeforeEnqueue(o),o===null)return;o=this.normalizeMessage(o);let s=this.persistedQueueKeyForRoute(i??this.getQueueRouteKey(o)),a=this.getPersistedProperty(s)||[];a.length>=this.maxQueueSize&&(a.shift(),this._logger.warn("Queue is full, the oldest event is dropped.")),a.push({message:o}),this.setPersistedProperty(s,a),this._events.emit(t,o),a.length>=this.flushAt&&this.flushBackground(),this.flushInterval&&!this._flushTimer&&(this._flushTimer=RN(()=>this.flushBackground(),this.flushInterval))})}async sendImmediate(t,r,n,i){if(this.disabled)return void this._logger.warn("The client is disabled");if(this._isInitialized||await this._initPromise,this.optedOut)return void this._events.emit(t,"Library is disabled. Not sending event. To re-enable, call posthog.optIn()");let o=this.prepareMessage(r,n);if(o=this.processBeforeEnqueue(o),o!==null){o=this.normalizeMessage(o);try{await this.sendBatch([o],void 0,i??this.getQueueRouteKey(o))}catch(s){this._events.emit("error",s)}}}normalizeMessage(t){let{type:r,library:n,library_version:i,...o}=t,s=xnl(o.properties)?o.properties:void 0;return n!==void 0&&s?.$lib===void 0&&(s={...s||{},$lib:n}),i!==void 0&&s?.$lib_version===void 0&&(s={...s||{},$lib_version:i}),s&&(o.properties=s),o.uuid=ZVe(o.uuid,BN),o}normalizeTimestampForWire(t){let r=t instanceof Date?t:typeof t=="string"?new Date(t):null;if(!r||Number.isNaN(r.getTime()))return t;let n=r.toISOString(),i=typeof t=="string"?t.match(/\.(\d+)(?:Z|[+-]\d{2}:?\d{2})?$/i)?.[1]:void 0;return i&&i.length>3?n.replace(/\.\d{3}Z$/,`.${i}Z`):n}prepareMessage(t,r){let n={...t,timestamp:r?.timestamp?r?.timestamp:VJo(),uuid:ZVe(r?.uuid,BN)};return(r?.disableGeoip??this.disableGeoip)&&(xnl(n.properties)||(n.properties={}),n.properties.$geoip_disable=!0),n.distinctId&&(n.distinct_id=n.distinctId,delete n.distinctId),n}clearFlushTimer(){this._flushTimer&&(clearTimeout(this._flushTimer),this._flushTimer=void 0)}flushBackground(){this.pendingFlushPromise||this.flushAutomatic().catch(async t=>{await Inl(t)})}flushAutomatic(){return this.flush()}async waitForPendingPromises(t,r=[]){let n=r.filter(o=>!!o),i=0;for(;;){let o=this.promiseQueue.getPromises([...n,...this.flushPromises],t);if(o.length===0)return;i>0&&this._logger.debug(`flush() re-checking ${o.length} pending promise(s) before flushing`),await Promise.all(o.map(s=>s.catch(()=>{}))),i++}}flushWithPendingPromises(){return this.flushInternal(!0)}flush(){return this.flushInternal(!1)}flushInternal(t){if(this.disabled)return Promise.resolve();if(!t&&this.pendingFlushPromise)return this.pendingFlushPromise;let r=this.flushPromise,n=this.promiseQueue.maxId,i=Promise.resolve().then(()=>{if(t)return this.waitForPendingPromises(n,[r,i])}).then(()=>gHt([r])).then(()=>(this.pendingFlushPromise===i&&(this.pendingFlushPromise=null),this._flush()));return this.pendingFlushPromise=i,this.flushPromise=i,this.flushPromises.add(i),this.addPendingPromise(i),gHt([i]).then(()=>{this.flushPromises.delete(i),this.pendingFlushPromise===i&&(this.pendingFlushPromise=null),this.flushPromise===i&&(this.flushPromise=null)}),i}getCustomHeaders(){let t=this.getCustomUserAgent(),r={};return t&&t!==""&&(r["User-Agent"]=t),r}compressPayload(t){return SHt(t,this.isDebug)}getBatchEndpointPath(t){return"/batch/"}async sendBatch(t,r,n=iYo){let i={api_key:this.apiKey,batch:t.map(u=>{if(!u)return u;let l=this.normalizeTimestampForWire(u.timestamp);return l===u.timestamp?u:{...u,timestamp:l}}),sent_at:VJo()};this.historicalMigration&&(i.historical_migration=!0);let o=JSe(i),s=`${this.host}${this.getBatchEndpointPath(n)}`,a=this.disableCompression?null:await this.compressPayload(o),c={method:"POST",headers:{...this.getCustomHeaders(),"Content-Type":"application/json",...a!==null&&{"Content-Encoding":"gzip"}},body:a||o};await this.fetchWithRetry(s,c,{type:"successful-write"},r)}async _flush(){this.clearFlushTimer(),await this._initPromise;let t=this.getActiveQueueRoutes();if(!t.some(i=>this.getRouteQueue(i).length>0))return;let r=[],n;for(let i of t)try{await this._flushRoute(i,r)}catch(o){n===void 0&&(n=o)}if(n!==void 0)throw n;this._events.emit("flush",r)}async _flushRoute(t,r){let n=this.persistedQueueKeyForRoute(t),i=this.getPersistedProperty(n)||[];if(!i.length)return;let o=i.length,s=0;for(;i.length>0&&s<o;){let a=i.slice(0,this.maxBatchSize),c=a.map(p=>p.message===void 0?p.message:this.normalizeMessage(p.message)),u=async()=>{let p=this.getPersistedProperty(n)||[],f=[...a],d=p.filter(m=>{let g=m.message?.uuid,A=f.findIndex(y=>y===m||typeof g=="string"&&g.length>0&&y.message?.uuid===g);return A===-1?!0:(f.splice(A,1),!1)});this.setPersistedProperty(n,d),i=d,this._dequeuedMessagesCount+=a.length,await this.flushStorage()},l={retryCheck:p=>nft(p)?!1:Qnn(p)};try{await this.sendBatch(c,l,t)}catch(p){if(nft(p)&&c.length>1){this.maxBatchSize=Math.max(1,Math.floor(c.length/2)),this._logger.warn(`Received 413 when sending batch of size ${c.length}, reducing batch size to ${this.maxBatchSize}`);continue}throw p instanceof Rhe||await u(),this._events.emit("error",p),p}await u(),r.push(...c),s+=c.length}}async _sendOtlpBatch({path:t,auth:r,payload:n}){if(this.disabled)return{kind:"fatal",error:new Error("The client is disabled")};let i;try{i=JSON.stringify(n)}catch(l){return this.logMsgIfDebug(()=>console.warn(`[PostHog] Could not serialize a ${t} batch; reporting it as too large`,l)),{kind:"too-large",measuredLocally:!0}}let o=Cnl(i);if(o>vnl)return this.logMsgIfDebug(()=>console.warn(`[PostHog] Not sending a ${t} batch of ${o} bytes: the endpoint accepts at most ${vnl}`)),{kind:"too-large",measuredLocally:!0};let s=r==="bearer"?`${this.host}/i/v1/${t}`:`${this.host}/i/v1/${t}?token=${encodeURIComponent(this.apiKey)}`,a=this.disableCompression?null:await this.compressPayload(i),c=a||i,u={method:"POST",headers:{...this.getCustomHeaders(),"Content-Type":"application/json",...r==="bearer"&&{Authorization:`Bearer ${this.apiKey}`},...a!==null&&{"Content-Encoding":"gzip"}},body:c};try{return await this.fetchWithRetry(s,u,{type:"successful-write"},{retryCheck:l=>nft(l)||l instanceof D8&&l.retryAfterMs!==void 0?!1:Qnn(l)}),{kind:"ok"}}catch(l){if(nft(l))return{kind:"too-large"};if(Qnn(l)){let p=l instanceof D8?l.retryAfterMs:void 0;return{kind:"retry-later",error:l,...p!==void 0&&{retryAfterMs:p}}}return{kind:"fatal",error:l}}}async _sendLogsBatch(t){return this._sendOtlpBatch({path:"logs",auth:"query-token",payload:t})}async _sendMetricsBatch(t){return this._sendOtlpBatch({path:"metrics",auth:"query-token",payload:t})}async _sendTracesBatch(t){return this._sendOtlpBatch({path:"traces",auth:"bearer",payload:t})}async fetchWithRetry(t,r,n,i,o){let s=r.body?r.body:"",a=Cnl(s),c={...this._retryOptions,...i},u=0;return await tnl(async()=>{u++;let l=new AbortController,p=o??this.requestTimeout,f=Date.now()+p,d,m=new Promise((x,v)=>{d=RN(()=>{let w=tft("AbortError",`Request timed out after ${p}ms`);v(w),l.abort(w)},p)}),g,A=!1,y,I=()=>y??=(async()=>{try{await g?.body?.cancel()}catch{}})();try{let x;try{x=this.fetch(t,{signal:l.signal,...r})}catch(B){throw new Rhe(B)}x.then(B=>{l.signal.aborted&&!A&&Promise.resolve(B.body?.cancel()).catch(()=>{})}).catch(()=>{});try{g=await Promise.race([x,m]),A=!0}catch(B){throw new Rhe(B)}let v=r.mode==="no-cors",w=n.type==="successful-write"?300:400;if(!v&&(g.status<200||g.status>=w))throw new D8(g,a,f,l);if(n.type==="successful-write"){try{await Promise.race([I(),m])}catch{}return}try{return await Promise.race([n.consume(g),m])}catch(B){throw l.signal.aborted?new Rhe(B):B}}finally{clearTimeout(d),l.signal.aborted&&g&&I()}},{...c,retryCheck:l=>{let p=c.retryCheck(l);return p&&u<=c.retryCount&&l instanceof D8&&l.cancelResponseBody(),p}})}async _shutdown(t=3e4){await this._initPromise;let r=!1;return this.clearFlushTimer(),this.disabled?void 0:XSe((async()=>{try{for(await this.promiseQueue.join();this.getActiveQueueRoutes().some(s=>this.getRouteQueue(s).length>0);){let o=this._dequeuedMessagesCount;if(await this.flush(),r)break;if(this._dequeuedMessagesCount===o){this._logger.warn("Shutdown flush completed but did not send any queued events. Stopping drain to avoid a loop.");break}}}catch(i){if(!sih(i))throw i;await Inl(i)}})(),t,()=>{this._logger.critical("Timeout while shutting down PostHog. Some events may not have been sent.",{shutdownTimeoutMs:t}),r=!0})}async shutdown(t=3e4){return this.shutdownPromise?this._logger.warn("shutdown() called while already shutting down. shutdown() is meant to be called once before process exit - use flush() for per-request cleanup"):this.shutdownPromise=this._shutdown(t).finally(()=>{this.shutdownPromise=null}),this.shutdownPromise}};var fih=/[a-z][a-z0-9+.-]{0,63}:[^\s<>"]+/gi;var j4v=new RegExp(fih.source,"i"),Tnl=/[a-z][a-z0-9+.-]{0,63}:\/\//i,z4v=new RegExp(`^${Tnl.source}`,"i"),Q4v=new RegExp(Tnl.source,"gi");var dih=["is_not","is_set"],mih=1152921504606847e3,Ju=class e extends Error{constructor(t){super(t),this.name=this.constructor.name,Object.setPrototypeOf(this,e.prototype)}};function oYo(e){if(typeof e=="boolean")return!0;if(typeof e=="string"){let t=e.toLowerCase();return t==="true"||t==="false"}if(!Array.isArray(e))return!1;for(let t=0;t<e.length;t++)if(!oYo(t in e?e[t]:null))return!1;return!0}function sYo(e){if(typeof e=="boolean")return e;if(typeof e=="string")return e.toLowerCase()==="true";if(!Array.isArray(e))return!1;for(let t=0;t<e.length;t++)if(!sYo(t in e?e[t]:null))return!1;return!0}function OHt(e){for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r>=55296&&r<=56319){let n=e.charCodeAt(t+1);if(t+1>=e.length||n<56320||n>57343)throw new Ju("Cannot stringify an unpaired surrogate like the flags service");t++}else if(r>=56320&&r<=57343)throw new Ju("Cannot stringify an unpaired surrogate like the flags service")}}function Lnn(e,t=new Set){if(!(e===null||typeof e=="boolean")){if(typeof e=="string")return void OHt(e);if(typeof e=="number"){if(!Number.isFinite(e))throw new Ju(`Cannot represent non-finite number ${e} like the flags service`);return}if(Array.isArray(e)){if(t.has(e))throw new Ju("Cannot represent a circular array during local evaluation");t.add(e);try{for(let r=0;r<e.length;r++)r in e&&Lnn(e[r],t)}finally{t.delete(e)}return}if(typeof e=="object"){let r=Object.getPrototypeOf(e);if(r!==Object.prototype&&r!==null)throw new Ju("Cannot represent a non-JSON object like the flags service");if(t.has(e))throw new Ju("Cannot represent a circular object during local evaluation");t.add(e);try{for(let n of Object.keys(e))OHt(n),Lnn(e[n],t)}finally{t.delete(e)}return}throw new Ju(`Cannot represent ${typeof e} like the flags service`)}}function hih(e,t){let r=0,n=0;for(;r<e.length&&n<t.length;){let i=e.charCodeAt(r),o=t.charCodeAt(n),s=i>=55296&&i<=56319,a=o>=55296&&o<=56319,c=s?e.charCodeAt(r+1):0,u=a?t.charCodeAt(n+1):0,l=s?(i-55296)*1024+c-56320+65536:i,p=a?(o-55296)*1024+u-56320+65536:o;if(l!==p)return l-p;r+=s?2:1,n+=a?2:1}return e.length-t.length}function aYo(e,t=new Set){if(e===null)return"null";if(typeof e=="string")return OHt(e),JSON.stringify(e);if(typeof e=="boolean")return e?"true":"false";if(typeof e=="number"){if(!Number.isFinite(e))throw new Ju(`Cannot stringify non-finite number ${e} like the flags service`);if(Number.isInteger(e))throw new Ju(`Cannot distinguish integer ${e} from an integral JSON float during local evaluation`);return String(e)}if(Array.isArray(e)){if(t.has(e))throw new Ju("Cannot stringify a circular array during local evaluation");t.add(e);try{let r=[];for(let n=0;n<e.length;n++)r.push(n in e?aYo(e[n],t):"null");return`[${r.join(",")}]`}finally{t.delete(e)}}if(typeof e=="object"){let r=Object.getPrototypeOf(e);if(r!==Object.prototype&&r!==null)throw new Ju("Cannot stringify a non-JSON object like the flags service");if(t.has(e))throw new Ju("Cannot stringify a circular object during local evaluation");t.add(e);try{let n=Object.keys(e);return n.forEach(OHt),`{${n.sort(hih).map(i=>`${JSON.stringify(i)}:${aYo(e[i],t)}`).join(",")}}`}finally{t.delete(e)}}throw new Ju(`Cannot stringify ${typeof e} like the flags service`)}function Mnn(e){return typeof e=="string"?(OHt(e),e):aYo(e)}function Onl(e){try{return new RegExp(e),!0}catch{return!1}}function k8(e){return String(e).replace(/[A-Z]/g,t=>t.toLowerCase())}function Bnl(e,t,r){if(!/^\d+$/.test(e)||r==="strict"&&e.length>1&&e[0]==="0")throw new Ju(`Invalid semver: ${t}`);return parseInt(e,10)}function KS(e,t="strict"){let n=String(e).trim().replace(/^[vV]/,"").split("-")[0].split("+")[0];if(!n||n.startsWith("."))throw new Ju(`Invalid semver: ${e}`);let i=n.split("."),o=s=>s===void 0||s===""?0:Bnl(s,e,t);return[o(i[0]),o(i[1]),o(i[2])]}function F8(e,t){for(let r=0;r<3;r++){if(e[r]<t[r])return-1;if(e[r]>t[r])return 1}return 0}function gih(e,t){let r=KS(e,t);return{lower:[r[0],r[1],r[2]],upper:[r[0],r[1]+1,0]}}function Aih(e,t){let[r,n,i]=KS(e,t),o=[r,n,i],s;return s=r>0?[r+1,0,0]:n>0?[0,n+1,0]:[0,0,i+1],{lower:o,upper:s}}function yih(e,t){let n=String(e).trim().replace(/^[vV]/,"").replace(/\.\*$/,"").replace(/\*$/,"");if(!n)throw new Ju(`Invalid wildcard semver: ${e}`);let i=n.split("."),o=c=>{if(t==="legacy-permissive"){let u=parseInt(c,10);if(!isNaN(u))return u}else try{return Bnl(c,e,t)}catch{}throw new Ju(`Invalid wildcard semver: ${e}`)},s=o(i[0]);if(i.length===1)return{lower:[s,0,0],upper:[s+1,0,0]};let a=o(i[1]);return{lower:[s,a,0],upper:[s,a+1,0]}}function Pnl(e){if(e instanceof Date)return e;if(typeof e=="string"||typeof e=="number"){let t=new Date(e);if(!isNaN(t.valueOf()))return t;throw new Ju(`${e} is in an invalid date format`)}throw new Ju(`The date provided ${e} must be a string, number, or date object`)}function cYo(e){let t=/^-?(?<number>[0-9]+)(?<interval>[a-z])$/,r=e.match(t),n=new Date(new Date().toISOString());if(!r||!r.groups)return null;let i=parseInt(r.groups.number);if(i>=1e4)return null;let o=r.groups.interval;if(o==="h")n.setUTCHours(n.getUTCHours()-i);else if(o==="d")n.setUTCDate(n.getUTCDate()-i);else if(o==="w")n.setUTCDate(n.getUTCDate()-7*i);else if(o==="m")n.setUTCMonth(n.getUTCMonth()-i);else{if(o!=="y")return null;n.setUTCFullYear(n.getUTCFullYear()-i)}return n}function uYo(e,t,r={}){let n=e.key,i=e.value,o=e.operator||"exact",s=r.semverParsingPolicy??"strict";if(Object.prototype.hasOwnProperty.call(t,n)){if(o==="is_not_set")return!1;if(o==="is_set")return!0}else throw new Ju(`Property ${n} not found in propertyValues`);let c=t[n];if(c===void 0)return r.warnFunction?.(`Property ${n} cannot have a value of undefined with the ${o} operator`),o==="is_not";if(c===null&&!dih.includes(o)&&o!=="exact"&&o!=="is_not")return r.warnFunction?.(`Property ${n} cannot have a value of null with the ${o} operator`),!1;let u=(p,f)=>{if(r.propertyMatchingVersion!==2&&oYo(p)||Array.isArray(p)&&p.length===0)return Lnn(f),sYo(p)===sYo(f);if(r.propertyMatchingVersion===2&&typeof f=="number"&&oYo(p))return Lnn(f),!1;if(Array.isArray(p)){let d=Mnn(f).toLowerCase();return p.some(m=>Mnn(m).toLowerCase()===d)}return Mnn(p).toLowerCase()===Mnn(f).toLowerCase()},l=(p,f,d)=>{if(d==="gt")return p>f;if(d==="gte")return p>=f;if(d==="lt")return p<f;if(d==="lte")return p<=f;throw new Error(`Invalid operator: ${d}`)};switch(o){case"exact":return u(i,c);case"is_not":return!u(i,c);case"is_set":return!0;case"icontains":return k8(c).includes(k8(i));case"not_icontains":return!k8(c).includes(k8(i));case"starts_with":return k8(c).startsWith(k8(i));case"not_starts_with":return!k8(c).startsWith(k8(i));case"ends_with":return k8(c).endsWith(k8(i));case"not_ends_with":return!k8(c).endsWith(k8(i));case"regex":return Onl(String(i))&&String(c).match(String(i))!==null;case"not_regex":return Onl(String(i))&&String(c).match(String(i))===null;case"gt":case"gte":case"lt":case"lte":{let p=typeof i=="number"?i:parseFloat(String(i)),f=typeof c=="number"?c:c!=null?parseFloat(String(c)):NaN;return Number.isFinite(p)&&Number.isFinite(f)?l(f,p,o):l(String(c),String(i),o)}case"is_date_after":case"is_date_before":{if(typeof i=="boolean")throw new Ju("Date operations cannot be performed on boolean values");let p=cYo(String(i));p==null&&(p=Pnl(i));let f=Pnl(c);return o==="is_date_before"?f<p:f>p}case"semver_eq":return F8(KS(String(c),s),KS(String(i),s))===0;case"semver_neq":return F8(KS(String(c),s),KS(String(i),s))!==0;case"semver_gt":return F8(KS(String(c),s),KS(String(i),s))>0;case"semver_gte":return F8(KS(String(c),s),KS(String(i),s))>=0;case"semver_lt":return F8(KS(String(c),s),KS(String(i),s))<0;case"semver_lte":return F8(KS(String(c),s),KS(String(i),s))<=0;case"semver_tilde":{let p=KS(String(c),s),{lower:f,upper:d}=gih(String(i),s);return F8(p,f)>=0&&F8(p,d)<0}case"semver_caret":{let p=KS(String(c),s),{lower:f,upper:d}=Aih(String(i),s);return F8(p,f)>=0&&F8(p,d)<0}case"semver_wildcard":{let p=KS(String(c),s),{lower:f,upper:d}=yih(String(i),s);return F8(p,f)>=0&&F8(p,d)<0}default:throw new Ju(`Unknown operator: ${o}`)}}async function Rnl(e){let t=globalThis.crypto?.subtle;if(!t)throw new Error("SubtleCrypto API not available");let r=await t.digest("SHA-1",new TextEncoder().encode(e));return Array.from(new Uint8Array(r)).map(n=>n.toString(16).padStart(2,"0")).join("")}async function PHt(e,t,r="",n="."){let i=await Rnl(`${e}${n}${t}${r}`);return parseInt(i.slice(0,15),16)/mih}async function lYo(e,t){if(e==null||e.id==null||e.exclusion_percentage==null)return;let r=Number(e.exclusion_percentage);if(!Number.isFinite(r))return;let n=Math.min(Math.max(r,0),100);if(!(n!==100&&await PHt("holdout",t,"","-")>n/100))return`holdout-${e.id}`}function _nn(e){let t=[],r=0;for(let n of e){let i=r+n.rollout_percentage/100;t.push({valueMin:r,valueMax:i,key:n.key}),r=i}return t}async function pYo(e,t,r){let n=await PHt(e,t,"variant");return _nn(r).find(i=>n>=i.valueMin&&n<i.valueMax)?.key}function fYo(e,t){if(t===!1||t==null||!e)return null;let r=typeof t=="boolean"?t.toString():t,n=e[r]||null;return n==null?null:rft(n)}var Dnl=9223372036854776e3,bih="9223372036854775808",Eih=Object.prototype.propertyIsEnumerable;function Iih(){return{ancestors:new WeakSet,remainingNodes:1e4}}function sne(e,t){try{return knl(e,t,Iih(),0)}catch{return[]}}function vih(e,t){let r=e.toString(),n=BigInt(bih);return e>=n||e<-n?(t?.debug(`Attribute ${r} is outside the int64 range; encoding it as a string`),{stringValue:r}):{intValue:r}}function hYo(e,t,r,n){if(r.remainingNodes<=0)return{stringValue:Bnn};if(r.remainingNodes--,Brl(e))return{boolValue:e};if(typeof e=="bigint")return vih(e,t);if(typeof e=="number"){if(!Number.isFinite(e))return{stringValue:String(e)};if(Number.isInteger(e)){if(Number.isSafeInteger(e))return{intValue:String(e)};if("u"<typeof BigInt)return{stringValue:String(e)};let i=BigInt(e).toString();return e>=Dnl||e<-Dnl?(t?.debug(`Attribute ${i} is outside the int64 range; encoding it as a string`),{stringValue:i}):{intValue:i}}return{doubleValue:e}}if(typeof e=="string")return{stringValue:ine(e)};if(typeof e=="function")return{stringValue:Zrl};if(typeof e=="symbol")return{stringValue:String(e)};if(typeof e=="object"&&e!==null){if(r.ancestors.has(e))return{stringValue:Pnn};if(n>=20)return{stringValue:Bnn};if(e instanceof Date){let i=e.getTime(),o=Number.isFinite(i)?e.toISOString():String(e);return{stringValue:typeof o=="string"?ine(o):String(o)}}r.ancestors.add(e);try{try{let i=e.toJSON;if(typeof i=="function")return hYo(i.call(e),t,r,n+1)}catch{}return z4(e)?{arrayValue:{values:Cih(e,t,r,n+1)}}:{kvlistValue:{values:knl(e,t,r,n+1)}}}finally{r.ancestors.delete(e)}}return{stringValue:ine(String(e))}}function Cih(e,t,r,n){let i=[],o=Math.min(e.length,1e3),s=0;for(;s<o&&r.remainingNodes>0;s++)try{let a=s in e?e[s]:void 0;if(OJ(a))continue;i.push(hYo(a,t,r,n))}catch{i.push({stringValue:R8})}return e.length>s&&i.push({stringValue:Bnn}),i}function knl(e,t,r,n){let i=[];for(let o in e)if(Eih.call(e,o)){if(!o){t?.debug("Dropping an attribute with an empty key");continue}if(i.length>=1e3||r.remainingNodes<=0){t?.debug("Attributes truncated: the value exceeds the OTLP encoder budget");break}try{let s=e[o];if(FJo(s)||Phe(s))continue;i.push({key:ine(o),value:hYo(s,t,r,n)})}catch{i.push({key:ine(o),value:{stringValue:R8}})}}return i}function RHt(e,t,r){return{...Bhe({},e.resourceAttributes),"service.name":e.serviceName||"unknown_service",...e.environment&&{"deployment.environment":e.environment},...e.serviceVersion&&{"service.version":e.serviceVersion},"telemetry.sdk.name":t,"telemetry.sdk.version":r}}var xih=["service.name","deployment.environment","service.version","telemetry.sdk.name","telemetry.sdk.version"];function DHt(e,t){let r=Bhe({},e),n={};for(let i of xih)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i],delete r[i]);return[...sne(r,t),...sne(n,t)]}var Fnl={darwin:"macOS",win32:"Windows",cygwin:"Windows",linux:"Linux",android:"Android",freebsd:"FreeBSD",openbsd:"OpenBSD",netbsd:"NetBSD",sunos:"SunOS",aix:"AIX",haiku:"Haiku","Mac OS X":"macOS"};function wih(e){if(e)return Object.prototype.hasOwnProperty.call(Fnl,e)?Fnl[e]:e}function gYo(e,t){let r=wih(e);return{...r?{"os.name":r}:{},...t?{"os.version":t}:{}}}var Sih={trace:{text:"TRACE",number:1},debug:{text:"DEBUG",number:5},info:{text:"INFO",number:9},warn:{text:"WARN",number:13},error:{text:"ERROR",number:17},fatal:{text:"FATAL",number:21}},e_v=Sih.info;var $Ve=class{constructor(t){this._onFire=t,this._firesAt=0}get pending(){return!!this._timer}arm(t){this.clear(),this._firesAt=Date.now()+t,this._timer=RN(()=>{this._timer=void 0,this._onFire()},t)}armNoEarlierThan(t){this._timer&&Date.now()+t<=this._firesAt||this.arm(t)}clear(){this._timer&&(clearTimeout(this._timer),this._timer=void 0)}};function kHt(){return 1-.25+Math.random()*.25*2}var N8=1;function FHt(e,t,r,n){let i=Math.min(Math.max(0,t-1),6),o=e*2**i,s=n===void 0?o:Math.min(o,Math.max(n,e));return Math.round(s*r)}var NHt=[0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4];function AYo(e){return String(e)+"000000"}function yYo(e,t,r,n){let i="";return n&&(i=Object.keys(n).sort().map(s=>`${JSON.stringify(s)}:${JSON.stringify(n[s])}`).join(",")),`${e}\0${t}\0${r??""}\0${i}`}function Nnl(e,t){for(let r=0;r<t.length;r++)if(e<=t[r])return r;return t.length}function bYo(e,t,r){return RHt(e,t,r)}function EYo(e,t,r,n){return{resourceMetrics:[{resource:{attributes:DHt(t)},scopeMetrics:[{scope:{name:r,version:n},metrics:e}]}]}}function Vnn(e){let t=e?.resourceAttributes;return{serviceName:t?.["service.name"]??e?.serviceName,serviceVersion:t?.["service.version"]??e?.serviceVersion,environment:t?.["deployment.environment"]??e?.environment,resourceAttributes:t,beforeSend:e?.beforeSend,flushIntervalMs:e?.flushIntervalMs??1e4,maxSeriesPerFlush:e?.maxSeriesPerFlush??1e3}}var jnl=1,jHt=class{constructor(t,r,n){this._instance=t,this._config=r,this._logger=n,this._series=new Map,this._flushTimer=new $Ve(()=>this.flush().catch(i=>{this._logger.error("Metrics flush failed:",i)})),this._flushPromise=null,this._seriesCapWarned=!1,this._typeByName=new Map,this._typeCollisionWarned=new Set,this._retryAfter=new XVe,this._consecutiveFlushFailures=0,this._flushJitter=N8,this._generation=0}count(t,r=1,n){this._capture({name:t,type:"count",value:r,unit:n?.unit,attributes:n?.attributes})}gauge(t,r,n){this._capture({name:t,type:"gauge",value:r,unit:n?.unit,attributes:n?.attributes})}histogram(t,r,n){this._capture({name:t,type:"histogram",value:r,unit:n?.unit,attributes:n?.attributes})}flush(){let t=this._flushPromise,n=(async()=>{t&&await t.catch(()=>{}),await this._doFlush()})().finally(()=>{this._flushPromise===n&&(this._flushPromise=null)});return this._flushPromise=n,n}drainWindow(){if(this._series.size===0)return null;let t=this._series;return this._series=new Map,this._seriesCapWarned=!1,this._typeByName=new Map,this._typeCollisionWarned=new Set,this._buildPayload(t)}reset(){this._generation++,this._retryAfter.reset(),this._consecutiveFlushFailures=0,this._flushJitter=N8,this._flushTimer.clear(),this._series=new Map,this._flushPromise=null,this._seriesCapWarned=!1,this._typeByName=new Map,this._typeCollisionWarned=new Set}_capture(t){if(this._instance.isDisabled||this._instance.optedOut)return;let r=this._runBeforeSend(t);if(r===null)return;if(!r.name||typeof r.name!="string")return void this._logger.warn("Dropping metric with empty name");if(typeof r.value!="number"||!Number.isFinite(r.value))return void this._logger.warn(`Dropping metric '${r.name}': value must be a finite number`);if(r.type==="count"&&r.value<0)return void this._logger.warn(`Dropping count '${r.name}': counters are monotonic, value must be >= 0`);let n,i;try{n=r.attributes?{...r.attributes}:void 0,i=yYo(r.type,r.name,r.unit,n)}catch(a){this._logger.warn(`Dropping metric '${r.name}': attributes could not be serialized`,a);return}let o=this._series.get(i);if(!o){if(!this._admitNewSeries())return;o={name:r.name,type:r.type,unit:r.unit,attributes:n,windowStartMs:Date.now()},this._series.set(i,o)}let s=this._typeByName.get(r.name);s===void 0?this._typeByName.set(r.name,r.type):s!==r.type&&!this._typeCollisionWarned.has(r.name)&&(this._typeCollisionWarned.add(r.name),this._logger.warn(`Metric name '${r.name}' is already used as a ${s}; recording it as a ${r.type} too will blend both series in charts. Use a distinct name.`)),this._fold(o,r.value),this._armFlushTimer()}_admitNewSeries(){return this._series.size<this._config.maxSeriesPerFlush?!0:(this._seriesCapWarned||(this._seriesCapWarned=!0,this._logger.warn(`Metric series cap reached (${this._config.maxSeriesPerFlush} per flush window); dropping new series until the next flush. Reduce attribute cardinality.`)),!1)}_fold(t,r){switch(t.type){case"count":t.total=(t.total??0)+r;break;case"gauge":t.last=r;break;case"histogram":{t.hist||(t.hist={count:0,sum:0,min:r,max:r,bucketCounts:new Array(NHt.length+1).fill(0)});let n=t.hist;n.count+=1,n.sum+=r,n.min=Math.min(n.min,r),n.max=Math.max(n.max,r),n.bucketCounts[Nnl(r,NHt)]+=1;break}}}_runBeforeSend(t){let r=this._config.beforeSend;if(!r)return t;let n=z4(r)?r:[r],i=t;for(let o of n)try{let s=o(i);if(!s)return this._logger.info("Metric was rejected in beforeSend function"),null;i=s}catch(s){return this._logger.error("Error in beforeSend function for metric:",s),null}return i}_armFlushTimer(){this._flushTimer.pending||this._flushTimer.arm(this._nextFlushDelay())}_nextFlushDelay(){return Math.max(FHt(this._config.flushIntervalMs,this._consecutiveFlushFailures,this._flushJitter,3e4),this._retryAfter.remainingMs())}async _doFlush(){if(this._flushTimer.clear(),this._series.size===0)return;let t=this._series;this._series=new Map,this._seriesCapWarned=!1,this._typeByName=new Map,this._typeCollisionWarned=new Set;let r=this._generation,n=await this._instance._sendMetricsBatch(this._buildPayload(t));if(r===this._generation)switch(this._retryAfter.record(n),n.kind==="retry-later"?(this._consecutiveFlushFailures++,this._flushJitter=kHt()):(this._consecutiveFlushFailures=0,this._flushJitter=N8),this._flushTimer.pending&&this._flushTimer.arm(this._nextFlushDelay()),n.kind){case"ok":return;case"retry-later":this._mergeWindowBack(t),this._flushTimer.armNoEarlierThan(this._nextFlushDelay());return;case"too-large":this._logger.warn("Metrics batch exceeded the server size limit and was dropped");return;case"fatal":this._logger.error("Failed to send metrics batch:",n.error);return}}_buildPayload(t){return EYo(this._buildMetrics(t),bYo(this._config,this._instance.getLibraryId(),this._instance.getLibraryVersion()),this._instance.getLibraryId(),this._instance.getLibraryVersion())}_buildMetrics(t){let r=AYo(Date.now()),n=new Map;for(let i of t.values()){let o=yYo(i.type,i.name,i.unit,void 0),s=n.get(o);s||(s={name:i.name,...i.unit&&{unit:i.unit}},i.type==="count"?s.sum={aggregationTemporality:jnl,isMonotonic:!0,dataPoints:[]}:i.type==="gauge"?s.gauge={dataPoints:[]}:s.histogram={aggregationTemporality:jnl,dataPoints:[]},n.set(o,s));let a=sne(i.attributes??{},this._logger),c=AYo(i.windowStartMs);if(i.type==="count"){let u={attributes:a,startTimeUnixNano:c,timeUnixNano:r,asDouble:i.total??0};s.sum.dataPoints.push(u)}else if(i.type==="gauge"){let u={attributes:a,timeUnixNano:r,asDouble:i.last??0};s.gauge.dataPoints.push(u)}else if(i.hist){let u={attributes:a,startTimeUnixNano:c,timeUnixNano:r,count:i.hist.count,sum:i.hist.sum,min:i.hist.min,max:i.hist.max,bucketCounts:i.hist.bucketCounts,explicitBounds:NHt};s.histogram.dataPoints.push(u)}}return Array.from(n.values())}_mergeWindowBack(t){for(let[r,n]of t){let i=this._series.get(r);if(!i){this._admitNewSeries()&&this._series.set(r,n);continue}switch(i.windowStartMs=Math.min(i.windowStartMs,n.windowStartMs),i.type){case"count":i.total=(i.total??0)+(n.total??0);break;case"gauge":break;case"histogram":if(n.hist)if(i.hist){i.hist.count+=n.hist.count,i.hist.sum+=n.hist.sum,i.hist.min=Math.min(i.hist.min,n.hist.min),i.hist.max=Math.max(i.hist.max,n.hist.max);for(let o=0;o<i.hist.bucketCounts.length;o++)i.hist.bucketCounts[o]+=n.hist.bucketCounts[o]}else i.hist=n.hist;break}}}};var Bih="0".repeat(32),Rih="0".repeat(16),Dih=/^[0-9a-f]+$/;function kih(e){let t=new Uint8Array(e),r=globalThis.crypto;if(r&&typeof r.getRandomValues=="function")try{return r.getRandomValues(t),t}catch{}for(let n=0;n<e;n++)t[n]=Math.floor(256*Math.random());return t}function Fih(e){let t="";for(let r=0;r<e.length;r++)t+=e[r].toString(16).padStart(2,"0");return t}function znl(e){let t=Fih(kih(e));return/[^0]/.test(t)?t:t.slice(0,-1)+"1"}function Qnl(){return znl(16)}function Mnl(){return znl(8)}function Lnl(e,t,r){return typeof e=="string"&&e.length===t&&e!==r&&Dih.test(e)}function _nl(e){return Lnl(e,32,Bih)}function Unl(e){return Lnl(e,16,Rih)}var Nih=/^([0-9a-f]{2})-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})(-.*)?$/;function Vnl(e){let t=Gnl(e);return t&&{traceId:t.traceId,spanId:t.spanId,flags:jih(t.flags)}}function jih(e){return 1&parseInt(e,16)?qnn:zih}function Gnl(e){if(typeof e!="string")return;let t=Nih.exec(e.trim());if(!t)return;let[,r,n,i,o,s]=t;if(r!=="ff"&&!(r==="00"&&s)&&!(!_nl(n)||!Unl(i)))return{version:r,traceId:n,spanId:i,flags:o}}function qnl(e){return Gnl(e)&&e.trim()}function Gnn(e){return Array.isArray(e)&&e.length===1?e[0]:e}var qnn="01",zih="00";function Wnl(e,t,r=qnn){return`00-${e}-${t}-${r}`}var Qih=32,IYo=512;function Wnn(e){if(typeof e!="string")return;let t=e.trim();if(!t||/[^\x20-\x7e\t]/.test(t))return;let r=t.split(",");if(!(r.length>Qih)){for(let n of r)if(n.trim()&&!n.includes("="))return;return t.length<=IYo?t:Lih(r)}}var Mih=128;function Lih(e){let t=[...e],r=()=>t.reduce((n,i)=>n+i.length,0)+t.length-1;for(let n=t.length-1;n>=0&&r()>IYo;n--)t[n].length>Mih&&t.splice(n,1);for(;t.length&&r()>IYo;)t.pop();return t.length?t.join(","):void 0}var Hnl="unknown";function e5e(e,t,r,n){return typeof e=="string"&&e.trim()?e.length>r?e.slice(0,r):e:(n?.debug(`${t} must be a non-empty string; using "${Hnl}"`),Hnl)}function ift(e){if(e==null)return;let t=e;if(e instanceof Date)try{t=e.getTime()}catch{return}if(!(typeof t!="number"||!Number.isFinite(t))&&!(t<0||t>9223372036854))return t}function Knl(e,t,r){let n=ift(e);return n===void 0?(e!==void 0&&r?.debug("Span startTime is out of range or not a valid time; using the current time"),t):(t-n>864e5?r?.debug("Span startTime is more than 24 hours in the past; the server will clamp it to receive time and keep the original in $originalTimestamp"):n>t&&r?.debug("Span startTime is in the future; the span may export with a zero duration"),n)}function Hnn(e,t){return e<t?t:e}function zHt(e,t,r,n){let i=ift(e);return i===void 0?(e!==void 0&&n?.debug(`Span ${r} is out of range or not a valid time; using the derived time`),t):i}function Jnn(){let e=globalThis.performance;return typeof e?.now=="function"?e.now():void 0}var oft=class{constructor(t,r,n){this._onEnd=r,this._logger=n,this._events=[],this._ended=!1,this._userAttributeCount=0,this._userEventCount=0,this._droppedAttributes=0,this._droppedEvents=0,this._traceId=t.traceId,this._spanId=t.spanId,this._parentSpanId=t.parentSpanId,this._traceState=t.traceState,this._traceFlags=t.traceFlags??qnn,this._parentIsRemote=t.parentIsRemote??!1,this._name=t.name,this._kind=t.kind,this._autoKeys=new Set(t.autoAttributeKeys),this._maxAttributes=t.maxAttributes,this._maxEvents=t.maxEvents,this._maxAttributesPerEvent=t.maxAttributesPerEvent,this._maxAttributeValueLength=t.maxAttributeValueLength,this._attributes=Object.create(null);for(let i of Object.keys(t.attributes))this._writeAttribute(i,t.attributes[i]);this._startMono=t.backdated?void 0:Jnn(),this._startTime=t.clockAnchor&&this._startMono!==void 0?t.clockAnchor.wall+(this._startMono-t.clockAnchor.mono):t.startTime,this._startMono!==void 0&&(this._clockAnchor=t.clockAnchor??{wall:this._startTime,mono:this._startMono})}_now(){if(this._startMono!==void 0){let t=Jnn();if(t!==void 0)return this._startTime+Math.max(0,t-this._startMono)}return Date.now()}_mutable(t){return this._ended?(this._logger?.debug(`Ignoring ${t} on a span that has already ended`),!1):!0}_writeAttribute(t,r){if(OJ(r)){t in this._attributes&&!this._autoKeys.has(t)&&this._userAttributeCount--,delete this._attributes[t];return}if(!this._autoKeys.has(t)&&!(t in this._attributes)){if(this._userAttributeCount>=this._maxAttributes)return void this._droppedAttributes++;this._userAttributeCount++}this._attributes[t]=Xnn(r,this._maxAttributeValueLength)}setAttribute(t,r){return this._mutable("setAttribute")&&this._writeAttribute(t,r),this}setAttributes(t){if(this._mutable("setAttributes")){let r=Bhe({},t);for(let n of Object.keys(r))this._writeAttribute(n,r[n])}return this}addEvent(t,r,n){if(this._mutable("addEvent")){if(this._userEventCount>=this._maxEvents)return this._droppedEvents++,this;this._userEventCount++;let i=r&&Znl(r,this._maxAttributesPerEvent,this._maxAttributeValueLength);this._events.push({name:e5e(t,"Span event name",this._maxAttributeValueLength,this._logger),timestamp:zHt(n,this._now(),"event timestamp",this._logger),...i&&{attributes:i.attributes,...i.dropped&&{droppedAttributesCount:i.dropped}}})}return this}setStatus(t,r){if(this._mutable("setStatus")){if(t!=="ok"&&t!=="error")return this._logger?.debug(`Ignoring unknown span status "${String(t)}"; expected "ok" or "error"`),this;this._status={code:t,...r&&{message:vYo(r,this._maxAttributeValueLength)}}}return this}get statusIsExplicitlyOk(){return this._status?.code==="ok"}recordException(t){if(!this._mutable("recordException"))return this;let{type:r,message:n,stack:i}=CYo(t);return this.addEvent(_ih,{"exception.type":r,"exception.message":n,...i&&{"exception.stacktrace":i}}),this.setStatus("error",n)}updateName(t){return this._mutable("updateName")&&(this._name=e5e(t,"Span name",this._maxAttributeValueLength,this._logger)),this}traceparent(){return Wnl(this._traceId,this._spanId,this._traceFlags)}tracestate(){return this._traceState??null}childContext(){return{traceId:this._traceId,parentSpanId:this._spanId,traceState:this._traceState,traceFlags:this._traceFlags,clockAnchor:this._clockAnchor}}end(t){if(this._ended)return void this._logger?.debug("Ignoring end() on a span that has already ended");this._ended=!0;let r=this._now(),n=zHt(t,r,"end time",this._logger);this._onEnd({traceId:this._traceId,spanId:this._spanId,...this._parentSpanId&&{parentSpanId:this._parentSpanId},...this._traceState&&{traceState:this._traceState},traceFlags:this._traceFlags,parentIsRemote:this._parentIsRemote,name:this._name,kind:this._kind,...this._status&&{status:this._status},attributes:{...this._attributes},events:this._events,startTime:this._startTime,endTime:Hnn(n,this._startTime),...this._droppedAttributes&&{droppedAttributesCount:this._droppedAttributes},...this._droppedEvents&&{droppedEventsCount:this._droppedEvents}},this._autoKeys)}},_ih="exception",Uih=4294967295;function Vih(e){try{return typeof e=="string"?e:String(e)}catch{return R8}}function t5e(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?0:Math.min(Math.floor(e),Uih)}function Gih(e,t){if(!t.length)return Object.keys(e);let r=t.filter(i=>Object.prototype.propertyIsEnumerable.call(e,i)),n=new Set(r);return[...r,...Object.keys(e).filter(i=>!n.has(i))]}function Ynl(e,t,r,n,i,o,s=[]){let a=0,c=0,u={};for(let d of Gih(e.attributes,s)){let m=e.attributes[d];if(!OJ(m)){if(!t.has(d)){if(a>=r){c++;continue}a++}Object.defineProperty(u,d,{value:Xnn(m,o),enumerable:!0,writable:!0,configurable:!0})}}e.attributes=u,c&&(e.droppedAttributesCount=t5e(e.droppedAttributesCount)+c);let l=0,p=0,f=[];for(let d of e.events){if(l>=n){p++;continue}if(l++,d.attributes){let m=Znl(d.attributes,i,o);d.attributes=m.attributes,m.dropped&&(d.droppedAttributesCount=t5e(d.droppedAttributesCount)+m.dropped)}f.push(d)}e.events=f,p&&(e.droppedEventsCount=t5e(e.droppedEventsCount)+p),e.status?.message&&(e.status={...e.status,message:vYo(Vih(e.status.message),o)})}var Ynn=class{setAttribute(){return this}setAttributes(){return this}addEvent(){return this}setStatus(){return this}recordException(){return this}updateName(){return this}traceparent(){return null}tracestate(){return null}end(){}},Xnl=new Ynn,QHt=class extends Ynn{constructor(t,r){super(),this._traceparent=t,this._tracestate=r}traceparent(){return this._traceparent}tracestate(){return this._tracestate??null}};function qih(e){try{let t=e.stack;return typeof t=="string"&&t?{stack:t}:{}}catch{return{}}}function ZSe(e,t){let r=Gnn(e?.parent)??t,n=typeof r=="string"||r==null?r:Jnl(r,"traceparent"),i=qnl(n);if(!i)return Xnl;let o=typeof r=="string"||r==null?e?.tracestate:Jnl(r,"tracestate");return new QHt(i,Wnn(o))}function Jnl(e,t){try{let r=e[t];return typeof r=="function"?r.call(e):void 0}catch{return}}function vYo(e,t){return e.length>t?e.slice(0,t):e}function Xnn(e,t){return Knn(e,t,{ancestors:new WeakSet,remainingNodes:1e4},0)}function Knn(e,t,r,n){if(e===null||typeof e!="object")return OJ(e)||r.remainingNodes<=0?e:(r.remainingNodes--,typeof e=="string"?vYo(e,t):e);if(r.ancestors.has(e))return Pnn;if(r.remainingNodes<=0||n>=20)return e;r.remainingNodes--,r.ancestors.add(e);try{if(e instanceof Date)return e;let i=Wih(e);if(i.selfDescribed)return OJ(i.value)?String(i.value):Knn(i.value,t,r,n+1);if(z4(e)){let a=Math.min(e.length,1e3),c=[];for(let u=0;u<a;u++)try{c.push(Knn(e[u],t,r,n+1))}catch{c.push(R8)}return e.length>a&&(c.length=e.length),c}let o={},s=0;for(let a of Object.keys(e)){if(s>=1e3)break;let c;try{c=Knn(e[a],t,r,n+1)}catch{c=R8}a&&!OJ(c)&&s++,Object.defineProperty(o,a,{value:c,enumerable:!0,writable:!0,configurable:!0})}return o}catch{return e}finally{r.ancestors.delete(e)}}function Wih(e){try{let t=e.toJSON;if(typeof t=="function")return{selfDescribed:!0,value:t.call(e)}}catch{}return{selfDescribed:!1}}function Znl(e,t,r){let n;try{n=Object.keys(e)}catch{return{attributes:{},dropped:0}}let i={},o=0,s=0;for(let a of n){if(o>=t){s++;continue}let c;try{c=Xnn(e[a],r)}catch{c=R8}OJ(c)||(o++,Object.defineProperty(i,a,{value:c,enumerable:!0,writable:!0,configurable:!0}))}return{attributes:i,dropped:s}}function $nl(e,t){for(let r of Object.keys(e))e[r]=Xnn(e[r],t);return e}function MHt(e,t,r){return t===Xnl?r(t):e.with(t,()=>r(t))}function CYo(e){try{let t=qih(e);if(YSe(e))return{type:e.name||"Error",message:e.message||"",...t};if(typeof e=="string")return{type:"string",message:e};if(e&&typeof e=="object"){let r=e;if(typeof r.message=="string")return{type:typeof r.name=="string"?r.name:"Object",message:r.message,...t}}return{type:typeof e,message:String(e)}}catch{return{type:typeof e,message:""}}}var xYo={internal:1,server:2,client:3,producer:4,consumer:5},Hih={ok:1,error:2},Kih=1,Jih=256,Yih=512;function Xih(e){let t=parseInt(e.traceFlags,16);return(Number.isFinite(t)?255&t:Kih)|Jih|(e.parentIsRemote?Yih:0)}function Znn(e){if(typeof e=="string")return ine(e);try{return ine(String(e))}catch{return R8}}function Zih(e){return e&&Object.prototype.hasOwnProperty.call(xYo,e)?xYo[e]:xYo.internal}function wYo(e){let t=Math.floor(e),r=Math.round((e-t)*1e6);return r>=1e6&&(t+=1,r=0),String(t)+String(r).padStart(6,"0")}function $ih(e,t){let r={name:Znn(e.name),timeUnixNano:wYo(e.timestamp)};if(e.attributes){let i=sne(e.attributes,t);i.length&&(r.attributes=i)}let n=t5e(e.droppedAttributesCount);return n&&(r.droppedAttributesCount=n),r}function eil(e,t){let r={traceId:e.traceId,spanId:e.spanId,name:Znn(e.name),kind:Zih(e.kind),startTimeUnixNano:wYo(e.startTime),endTimeUnixNano:wYo(e.endTime),flags:Xih(e)};e.parentSpanId&&(r.parentSpanId=e.parentSpanId),e.traceState&&(r.traceState=Znn(e.traceState));let n=sne(e.attributes,t);n.length&&(r.attributes=n),e.events.length&&(r.events=e.events.map(s=>$ih(s,t)));let i=t5e(e.droppedAttributesCount);i&&(r.droppedAttributesCount=i);let o=t5e(e.droppedEventsCount);return o&&(r.droppedEventsCount=o),e.status&&(r.status={code:Hih[e.status.code],...e.status.message&&{message:Znn(e.status.message)}}),r}function til(e,t,r){return RHt(e,t,r)}function ril(e,t,r,n,i){return{resourceSpans:[{resource:{attributes:DHt(t,i)},scopeSpans:[{scope:{name:r,version:n},spans:e}]}]}}var nil=8;function $nn(){return Jnn()??Date.now()}function SYo(e){try{return e instanceof oft}catch{return!1}}function iil(e,t){let r=Vnl(e);if(r)return{traceId:r.traceId,parentSpanId:r.spanId,traceState:Wnn(t),traceFlags:r.flags,isRemote:!0}}function eoh(e){try{return typeof e.traceparent=="function"}catch{return!1}}function toh(e){return!!e.attributes&&typeof e.attributes=="object"&&!Array.isArray(e.attributes)&&Array.isArray(e.events)&&e.name!==void 0&&e.kind!==void 0&&e.startTime!==void 0&&e.endTime!==void 0}function ein(e,t,r){e[t]!==r&&(e[t]=r)}function roh(e,t){try{let r=Object.getOwnPropertyDescriptors(e);for(let n of["traceId","spanId","parentSpanId","traceState"])r[n]={value:t[n],enumerable:!0,writable:!0,configurable:!0};return Object.create(Object.getPrototypeOf(e),r)}catch{return e}}var LHt=class{constructor(t,r,n,i,o,s){this._instance=t,this._config=r,this._logger=n,this._getContext=i,this._contextManager=o,this._onSpanQueued=s,this._queue=[],this._flushTimer=new $Ve(()=>this._flushInBackground()),this._flushPromise=null,this._droppedSinceWarning=0,this._lastDropWarningAt=0,this._dropReasons=new Set,this._consecutiveFlushFailures=0,this._flushJitter=N8,this._retryAfter=new XVe,this._headBatchFailures=0,this._headBatchSize=0,this._headBatchChargeableAt=0,this._generation=0,this._liveSpans=new Map,this._maxExportBatchSize=r.maxExportBatchSize}startSpan(t,r){if(this._instance.isDisabled||this._instance.optedOut)return ZSe(r,this._contextManager.active());let n=Gnn(r?.parent);if(n&&typeof n!="string"&&!SYo(n)){if(eoh(n))return this._logger.debug("Span parent is not a span from this SDK; returning an inert span"),ZSe(r,this._contextManager.active());this._logger.debug("Ignoring an unusable span parent")}let i=this._resolveParent(n,r);if(this._liveSpans.size>=this._config.maxLiveSpans&&this._evictAgedSpans(),this._liveSpans.size>=this._config.maxLiveSpans)return this._recordDrop(1,`the live-span limit (${this._config.maxLiveSpans}) was reached \u2014 spans are being started and never ended`),ZSe(r,this._contextManager.active());let o=Date.now(),s=Knl(r?.startTime,o,this._logger),a=Mnl();this._liveSpans.set(a,$nn());let c=this._autoContextAttributes();return new oft({traceId:i?.traceId??Qnl(),spanId:a,parentSpanId:i?.parentSpanId,traceState:i?.traceState,traceFlags:i?.traceFlags,parentIsRemote:i?.isRemote,name:e5e(t,"Span name",this._config.maxAttributeValueLength,this._logger),kind:r?.kind??"internal",attributes:Bhe({...c},r?.attributes),autoAttributeKeys:Object.keys(c),maxAttributes:this._config.maxAttributesPerSpan,maxEvents:this._config.maxEventsPerSpan,maxAttributesPerEvent:this._config.maxAttributesPerEvent,maxAttributeValueLength:this._config.maxAttributeValueLength,startTime:s,backdated:s!==o,clockAnchor:ift(r?.startTime)===void 0?i?.clockAnchor:void 0},(u,l)=>this._onSpanEnd(u,l),this._logger)}withSpan(t,r,n){let i=typeof r=="function"?void 0:r,o=typeof r=="function"?r:n,s=this.startSpan(t,i);try{let a=MHt(this._contextManager,s,o);return rnl(a)?a.then(c=>(s.end(),c),c=>{throw this._recordCallbackError(s,c),s.end(),c}):(s.end(),a)}catch(a){throw this._recordCallbackError(s,a),s.end(),a}}getActiveSpan(){return this._contextManager.active()??null}get throttled(){return this._retryAfter.isOpen()}async flush(){for(;;)if(!this._queue.length||!await(this._flushPromise??this._startFlush()))return}_startFlush(){this._flushTimer.clear();let t=this._generation,r=Promise.resolve().then(()=>t===this._generation?this._flushInner():0).finally(()=>{this._flushPromise===r&&(this._flushPromise=null),this._armFlushTimerIfQueuedNoEarlierThan()});return this._flushPromise=r,r}reset(){this._flushTimer.clear(),this._queue.length&&this._logger.critical(`Discarding ${this._queue.length} span(s) that were still queued when tracing was shut down. Raise the shutdown timeout or flush earlier if they matter.`),this._queue=[],this._liveSpans.clear(),this._flushPromise=null,this._generation++,this._maxExportBatchSize=this._config.maxExportBatchSize,this._droppedSinceWarning=0,this._dropReasons.clear(),this._lastDropWarningAt=0,this._consecutiveFlushFailures=0,this._flushJitter=N8,this._retryAfter.reset(),this._resetHeadBatchBudget()}_resetHeadBatchBudget(){this._headBatchFailures=0,this._headBatchChargeableAt=0}_resolveParent(t,r){if(typeof t=="string"){let i=iil(t,r?.tracestate);return i||this._logger.debug("Ignoring malformed traceparent; starting a new trace"),i}if(SYo(t))return t.childContext();let n=this._contextManager.active();if(SYo(n))return n.childContext();if(n instanceof QHt)return iil(n.traceparent(),n.tracestate()??void 0)}_autoContextAttributes(){let t;try{t=this._getContext()}catch(n){return this._logger.debug("Failed to read tracing context; span will carry no PostHog attributes",n),{}}let r={};return t.distinctId&&(r.posthogDistinctId=t.distinctId),t.sessionId&&(r.sessionId=t.sessionId),t.currentUrl&&(r["url.full"]=t.currentUrl),t.screenName&&(r["screen.name"]=t.screenName),t.appState&&(r["app.state"]=t.appState),r}_recordCallbackError(t,r){if(!(t instanceof oft))return;let{type:n,message:i,stack:o}=CYo(r);t.addEvent("exception",{"exception.type":n,"exception.message":i,...o&&{"exception.stacktrace":o}}),t.statusIsExplicitlyOk||t.setStatus("error",i)}_evictAgedSpans(){let t=$nn()-this._config.maxSpanAgeMs,r=0;for(let[n,i]of this._liveSpans){if(i>t)break;this._liveSpans.delete(n),r++}r&&this._recordDrop(r,`they were still live after ${this._config.maxSpanAgeMs}ms`)}_onSpanEnd(t,r){if(!this._liveSpans.delete(t.spanId))return;if(this._instance.isDisabled||this._instance.optedOut)return void this._recordDrop(1,"the user has opted out");let n=this._runBeforeSpanSend(t,r);if(n){if(this._reportLimitDrops(n),this._queue.length>=this._config.maxQueueSize)return void this._recordDrop(1,`the queue is full (${this._config.maxQueueSize}) \u2014 raise the flush frequency or reduce span volume`);this._queue.push(n);try{this._onSpanQueued?.()}catch(i){this._logger.debug("Span queue notification failed",i)}!(this._queue.length>=this._maxExportBatchSize)||this._consecutiveFlushFailures||this._retryAfter.isOpen()?this._armFlushTimerIfQueued():this._flushInBackground()}}_reportLimitDrops(t){let r=t.droppedAttributesCount??0,n=t.droppedEventsCount??0,i=0;for(let o of t.events)i+=o.droppedAttributesCount??0;(r||n||i)&&this._logger.debug(`Span limits discarded data from "${t.name}": ${r} attributes, ${n} events, ${i} event attributes`)}_runBeforeSpanSend(t,r){if(!this._config.beforeSpanSend.length)return t;let n={traceId:t.traceId,spanId:t.spanId,parentSpanId:t.parentSpanId,traceState:t.traceState},i={startTime:t.startTime,endTime:t.endTime},o={attributes:t.droppedAttributesCount,events:t.droppedEventsCount},s=Object.keys(t.attributes),a={traceFlags:t.traceFlags,parentIsRemote:t.parentIsRemote},c=t.status&&{...t.status},u=t,l=t;try{for(let d of this._config.beforeSpanSend){let m=d(u);if(!m)return this._recordDrop(1,"beforeSpanSend dropped it"),null;u=this._keepSpanIdentity(m,n)}if(l={traceId:n.traceId,spanId:n.spanId,parentSpanId:n.parentSpanId,traceState:n.traceState,name:u.name,kind:u.kind,status:u.status,attributes:u.attributes,events:u.events,startTime:u.startTime,endTime:u.endTime,traceFlags:a.traceFlags,parentIsRemote:a.parentIsRemote,droppedAttributesCount:o.attributes,droppedEventsCount:o.events},!toh(l))return this._logger.debug("beforeSpanSend did not return a span record; dropping the span"),this._recordDrop(1,"beforeSpanSend returned an unusable record"),null;l.name=e5e(l.name,"Span name",this._config.maxAttributeValueLength,this._logger),l.status&&l.status.code!=="ok"&&l.status.code!=="error"&&(this._logger.debug("beforeSpanSend set an unknown span status; keeping the original"),l.status=c),l.startTime=ift(l.startTime)??i.startTime,l.endTime=Hnn(ift(l.endTime)??i.endTime,l.startTime);let f=[];for(let d of l.events)try{f.push({...d,name:e5e(d.name,"Span event name",this._config.maxAttributeValueLength,this._logger),timestamp:zHt(d.timestamp,l.startTime,"event timestamp",this._logger)})}catch{this._logger.debug("beforeSpanSend left an unreadable span event; dropping it")}return l.events=f,Ynl(l,r,this._config.maxAttributesPerSpan,this._config.maxEventsPerSpan,this._config.maxAttributesPerEvent,this._config.maxAttributeValueLength,s),l}catch(p){return this._logger.debug("beforeSpanSend failed; dropping the span rather than exporting it unscrubbed",p),this._recordDrop(1,"beforeSpanSend failed"),null}}_keepSpanIdentity(t,r){(t.traceId!==r.traceId||t.spanId!==r.spanId||t.parentSpanId!==r.parentSpanId)&&this._logger.debug("beforeSpanSend changed a span identity field; keeping the original ids");try{ein(t,"traceId",r.traceId),ein(t,"spanId",r.spanId),ein(t,"parentSpanId",r.parentSpanId),ein(t,"traceState",r.traceState)}catch{return roh(t,r)}return t}_recordDrop(t,r){this._droppedSinceWarning+=t,this._dropReasons.add(r),Date.now()-this._lastDropWarningAt>=this._config.flushIntervalMs&&this._warnAboutDrops()}_warnAboutDrops(){this._droppedSinceWarning&&(this._lastDropWarningAt=Date.now(),this._logger.warn(`Dropping ${this._droppedSinceWarning} span(s): ${[...this._dropReasons].join("; ")}`),this._droppedSinceWarning=0,this._dropReasons.clear())}_encodeBatch(t){let r=[];for(let n of t)try{r.push(eil(n,this._logger))}catch(i){this._logger.debug("Failed to encode a span; dropping it",i),this._recordDrop(1,"its attributes could not be encoded")}return r}_discardQueueIfConsentWithdrawn(){if(!this._instance.isDisabled&&!this._instance.optedOut)return 0;let t=this._queue.length;return this._queue=[],this._resetHeadBatchBudget(),this._recordDrop(t,"the user has opted out"),this._warnAboutDrops(),t}async _flushInner(){if(!this._queue.length)return 0;let t=this._discardQueueIfConsentWithdrawn();if(t)return t;let r=$nl(til(this._config,this._instance.getLibraryId(),this._instance.getLibraryVersion()),this._config.maxAttributeValueLength),n=this._instance.getLibraryId(),i=this._instance.getLibraryVersion(),o=this._queue.length,s=0,a=1/0,c=this._generation;try{for(;o>0&&this._queue.length>0;){let u=this._discardQueueIfConsentWithdrawn();if(u)return s+u;let l=this._headBatchFailures>0?Math.min(this._maxExportBatchSize,this._headBatchSize):this._maxExportBatchSize,p=Math.max(1,Math.min(l,a,o,this._queue.length)),f=this._queue.slice(0,p),d=this._encodeBatch(f);if(!d.length){this._queue.splice(0,p),o-=p,s+=p,this._resetHeadBatchBudget();continue}let m=$nn()>=this._headBatchChargeableAt&&!this._retryAfter.isOpen(),g=await this._instance._sendTracesBatch(ril(d,r,n,i,this._logger));if(c!==this._generation)break;if(this._retryAfter.record(g),g.kind==="ok"){this._consecutiveFlushFailures=0,this._flushJitter=N8,this._resetHeadBatchBudget(),this._queue.splice(0,p),o-=p,s+=p,this._maxExportBatchSize<this._config.maxExportBatchSize&&this._maxExportBatchSize++;continue}if(g.kind==="too-large"){if(p===1){this._queue.splice(0,1),o-=1,s+=1,this._recordDrop(1,"it is too large for the ingestion endpoint"),this._consecutiveFlushFailures=0,this._flushJitter=N8,this._resetHeadBatchBudget();continue}let A=Math.max(1,Math.floor(p/2));g.measuredLocally?a=A:this._maxExportBatchSize=A,this._resetHeadBatchBudget(),this._logger.debug(`Batch too large; retrying the same spans in batches of ${A}`);continue}if(g.kind==="retry-later"){if(this._consecutiveFlushFailures++,this._flushJitter=kHt(),this._headBatchSize=p,m&&(this._headBatchFailures++,this._headBatchChargeableAt=$nn()+this._nextFlushDelay()),this._headBatchFailures<nil)return this._logger.debug("Span export failed; retrying on the next flush",g.error),s;if(this._queue.splice(0,p),o-=p,s+=p,this._consecutiveFlushFailures=0,this._flushJitter=N8,this._resetHeadBatchBudget(),this._recordDrop(p,`the ingestion endpoint failed ${nil} times in a row`),this._retryAfter.isOpen())return s;continue}this._logger.debug("Dropping a span batch the ingestion endpoint rejected",g.error),this._queue.splice(0,p),o-=p,s+=p,this._consecutiveFlushFailures=0,this._flushJitter=N8,this._resetHeadBatchBudget(),this._recordDrop(p,"the ingestion endpoint rejected the batch")}return s}finally{this._warnAboutDrops()}}_flushInBackground(){this._backgroundFlush||(this._backgroundFlush=this.flush().catch(t=>{this._logger.debug("Background span flush failed",t)}).finally(()=>{this._backgroundFlush=void 0,this._armFlushTimerIfQueuedNoEarlierThan()}))}_armFlushTimerIfQueued(){this._flushTimer.pending||!this._queue.length||this._flushTimer.arm(this._nextFlushDelay())}_armFlushTimerIfQueuedNoEarlierThan(){this._queue.length&&this._flushTimer.armNoEarlierThan(this._nextFlushDelay())}_nextFlushDelay(){return Math.max(FHt(this._config.flushIntervalMs,this._consecutiveFlushFailures,this._flushJitter,3e4),this._retryAfter.remainingMs())}};var _Ht=class{active(){return this._active}with(t,r){let n=this._active;this._active=t;try{return r()}finally{this._active=n}}};var noh=5e3,ioh=512,ooh=2048,soh=128,aoh=128,coh=128,uoh=8192,loh=1e4,poh=36e5;function $Se(e,t){return typeof e=="number"&&Number.isInteger(e)&&e>=1?e:t}var oil=["service.name","service.version","deployment.environment"];function foh(e){if(!(!e||typeof e!="object"||Array.isArray(e)))try{if(oil.every(r=>!(r in e)||typeof e[r]=="string"))return e;let t={...e};for(let r of oil)r in t&&typeof t[r]!="string"&&delete t[r];return t}catch{return}}function doh(e,t){if(!e)return[];let r=[e].flat().filter(i=>!!i),n=r.filter(i=>typeof i=="function");return n.length!==r.length&&t?.critical(`beforeSpanSend: ignoring ${r.length-n.length} of ${r.length} entries that are not functions. Spans export without them, so whatever they were redacting is not redacted.`),n}function TYo(e,t,r){let n=Bhe({...t},foh(e?.resourceAttributes)),i=$Se(e?.maxExportBatchSize,ioh);return{serviceName:n?.["service.name"]??e?.serviceName,serviceVersion:n?.["service.version"]??e?.serviceVersion,environment:n?.["deployment.environment"]??e?.environment,resourceAttributes:n,beforeSpanSend:doh(e?.beforeSpanSend,r),maxAttributesPerSpan:$Se(e?.maxAttributesPerSpan,soh),maxEventsPerSpan:$Se(e?.maxEventsPerSpan,aoh),maxAttributesPerEvent:coh,maxAttributeValueLength:$Se(e?.maxAttributeValueLength,uoh),flushIntervalMs:$Se(e?.flushIntervalMs,noh),maxExportBatchSize:i,maxQueueSize:Math.max($Se(e?.maxQueueSize,ooh),i),maxLiveSpans:$Se(e?.maxLiveSpans,loh),maxSpanAgeMs:$Se(e?.maxSpanAgeMs,poh)}}var OYo=require("fs"),cil=require("fs/promises"),BYo=require("path"),uil=require("readline"),tin=new eO.ReduceableCache(25),UHt=new eO.ReduceableCache(20),RYo=7,moh=1e3,hoh=1e4,PYo=10485760;async function lil(e,t=cil.open,r){let n={},i;try{i=process.cwd()}catch{}for(let a=e.length-1;a>=0;a--){let c=e[a],u=c?.filename;if(!c||typeof u!="string"||typeof c.lineno!="number"||Eoh(u)||Ioh(c)||!(0,BYo.isAbsolute)(u)&&i===void 0)continue;n[u]||(n[u]=[]),n[u].push(c.lineno)}let o=Object.keys(n);if(o.length==0)return e;let s=[];for(let a of o){let c=pil(a,i);if(c===void 0||UHt.get(c))continue;let u=n[a];if(!u)continue;u.sort((f,d)=>f-d);let l=Coh(u);if(l.every(f=>voh(c,f)))continue;let p=xoh(tin,c,{});s.push(Aoh(a,l,p,c,t,r))}return await Promise.all(s).catch(()=>{}),e&&e.length>0&&yoh(e,tin,i),tin.reduce(),e}async function goh(e,t,r){let n,i=!1;try{n=await t(e,OYo.constants.O_RDONLY|OYo.constants.O_NONBLOCK);let o=await n.stat();return o.isFile()?o.size>PYo?void r?.debug(`Skipping source context for oversized file ${e}: ${o.size} bytes exceeds ${PYo}`):(i=!0,n):void 0}catch{return}finally{n&&!i&&await n.close().catch(()=>{})}}async function Aoh(e,t,r,n,i,o){let s=await goh(e,i,o);if(s===void 0)return void UHt.set(n,1);let a=s;return new Promise(c=>{let u=!1;function l(x){u||(u=!0,x?.destroy(),a.close().then(c,c))}let p;try{p=a.createReadStream({autoClose:!1,start:0,end:PYo-1})}catch{UHt.set(n,1),l();return}let f;try{f=(0,uil.createInterface)({input:p})}catch{UHt.set(n,1),l(p);return}let d=0,m=0,g=t[m];if(g===void 0)return void l(p);let A=g[0],y=g[1];function I(){UHt.set(n,1),f.close(),f.removeAllListeners(),l(p)}p.on("error",I),f.on("error",I),f.on("close",()=>l(p)),f.on("line",x=>{if(d++,!(d<A)&&(r[d]=woh(x,0),d>=y)){if(m===t.length-1){f.close(),f.removeAllListeners();return}m++;let v=t[m];if(v===void 0){f.close(),f.removeAllListeners();return}A=v[0],y=v[1]}})})}function yoh(e,t,r){for(let n of e)if(n.filename&&n.context_line===void 0&&typeof n.lineno=="number"){let i=pil(n.filename,r),o=i===void 0?void 0:t.get(i);if(o===void 0)continue;boh(n.lineno,n,o)}}function boh(e,t,r){if(t.lineno===void 0||r===void 0)return;t.pre_context=[];for(let i=fil(e);i<e;i++){let o=r[i];if(o===void 0)return void sil(t);t.pre_context.push(o)}if(r[e]===void 0)return void sil(t);t.context_line=r[e];let n=dil(e);t.post_context=[];for(let i=e+1;i<=n;i++){let o=r[i];if(o===void 0)break;t.post_context.push(o)}}function sil(e){delete e.pre_context,delete e.context_line,delete e.post_context}function Eoh(e){return e.startsWith("node:")||e.endsWith(".min.js")||e.endsWith(".min.cjs")||e.endsWith(".min.mjs")||e.startsWith("data:")}function Ioh(e){return e.lineno!==void 0&&e.lineno>hoh||e.colno!==void 0&&e.colno>moh}function pil(e,t){return(0,BYo.isAbsolute)(e)?JSON.stringify([null,e]):t===void 0?void 0:JSON.stringify([t,e])}function voh(e,t){let r=tin.get(e);if(r===void 0)return!1;for(let n=t[0];n<=t[1];n++)if(r[n]===void 0)return!1;return!0}function Coh(e){if(!e.length)return[];let t=0,r=e[0];if(typeof r!="number")return[];let n=ail(r),i=[];for(;;){if(t===e.length-1){i.push(n);break}let o=e[t+1];if(typeof o!="number")break;o<=n[1]?n[1]=o+RYo:(i.push(n),n=ail(o)),t++}return i}function ail(e){return[fil(e),dil(e)]}function fil(e){return Math.max(1,e-RYo)}function dil(e){return e+RYo}function xoh(e,t,r){let n=e.get(t);return n===void 0?(e.set(t,r),r):n}function woh(e,t){let r=e,n=r.length;if(n<=150)return r;t>n&&(t=n);let i=Math.max(t-60,0);i<5&&(i=0);let o=Math.min(i+140,n);return o>n-5&&(o=n),o===n&&(i=Math.max(o-140,0)),r=r.slice(i,o),i>0&&(r=`...${r}`),o<n&&(r+="..."),r}var sft=require("path");function mil(e=process.cwd()){let t=sft.sep==="\\",r=i=>t?i.replace(/\\/g,"/"):i,n=r(e);return async i=>{for(let o of i)!o.filename||o.filename.startsWith("node:")||o.filename.startsWith("data:")||(0,sft.isAbsolute)(o.filename)&&(o.filename=r((0,sft.relative)(n,r(o.filename))));return i}}var hil="5.55.0";var Dhe={ERRORS_WHILE_COMPUTING:"errors_while_computing_flags",FLAG_MISSING:"flag_missing",QUOTA_LIMITED:"quota_limited",UNKNOWN_ERROR:"unknown_error"};var e1e=class e{constructor(t){this._host=t.host,this._distinctId=t.distinctId,this._groups=t.groups,this._disableGeoip=t.disableGeoip,this._flags=t.flags,this._requestId=t.requestId,this._evaluatedAt=t.evaluatedAt,this._flagDefinitionsLoadedAt=t.flagDefinitionsLoadedAt,this._errorsWhileComputing=t.errorsWhileComputing??!1,this._quotaLimited=t.quotaLimited??!1,this._accessed=t.accessed??new Set,this._isSlice=t.isSlice??!1}isEnabled(t,r={}){let n=this._flags[t];return this._recordAccess(t),n?.enabled??r.defaultValue??!1}getFlag(t){let r=this._flags[t];if(this._recordAccess(t),!!r)return r.enabled?r.variant??!0:!1}getFlagPayload(t){return this._flags[t]?.payload}onlyAccessed(){let t={};for(let r of this._accessed){let n=this._flags[r];n&&(t[r]=n)}return this._cloneWith(t)}only(t){let r={},n=[];for(let i of t){let o=this._flags[i];o?r[i]=o:n.push(i)}return n.length>0&&this._host.logWarning(`FeatureFlagEvaluations.only() was called with flag keys that are not in the evaluation set and will be dropped: ${n.join(", ")}`),this._cloneWith(r)}get keys(){return Object.keys(this._flags)}_getEventProperties(){let t={},r=[];for(let[n,i]of Object.entries(this._flags)){let o=i.enabled===!1?!1:i.variant??!0;t[`$feature/${n}`]=o,i.enabled&&r.push(n)}return r.length>0&&(r.sort(),t.$active_feature_flags=r),t}_cloneWith(t){return new e({host:this._host,distinctId:this._distinctId,groups:this._groups,disableGeoip:this._disableGeoip,flags:t,requestId:this._requestId,evaluatedAt:this._evaluatedAt,flagDefinitionsLoadedAt:this._flagDefinitionsLoadedAt,errorsWhileComputing:this._errorsWhileComputing,quotaLimited:this._quotaLimited,accessed:new Set(this._accessed),isSlice:!0})}_recordAccess(t){if(this._accessed.add(t),this._distinctId===""||this._isSlice&&!(t in this._flags))return;let r=this._flags[t],n=r===void 0?void 0:r.enabled===!1?!1:r.variant??!0,i={$feature_flag:t,$feature_flag_response:n,$feature_flag_id:r?.id,$feature_flag_version:r?.version,$feature_flag_reason:r?.reason,locally_evaluated:r?.locallyEvaluated??!1,[`$feature/${t}`]:n,$feature_flag_request_id:this._requestId,$feature_flag_evaluated_at:r?.locallyEvaluated?Date.now():this._evaluatedAt};r?.hasExperiment!==void 0&&(i.$feature_flag_has_experiment=r.hasExperiment),r?.locallyEvaluated&&this._flagDefinitionsLoadedAt!==void 0&&(i.$feature_flag_definitions_loaded_at=this._flagDefinitionsLoadedAt);let o=[];this._errorsWhileComputing&&o.push(Dhe.ERRORS_WHILE_COMPUTING),this._quotaLimited&&o.push(Dhe.QUOTA_LIMITED),r===void 0&&o.push(Dhe.FLAG_MISSING),o.length>0&&(i.$feature_flag_error=o.join(",")),this._host.captureFlagCalledEventIfNeeded({distinctId:this._distinctId,key:t,response:n,groups:this._groups,disableGeoip:this._disableGeoip,properties:i})}};var Soh=6e4;function gil(e){return e==="client"||e==="server"?e:"all"}function Toh(e,t){return e===t||e==="all"||t==="all"}var aft=class e extends Error{constructor(t){super(),Error.captureStackTrace(this,this.constructor),this.name="ClientError",this.message=t,Object.setPrototypeOf(this,e.prototype)}};function Ooh(e,t){e.name=t.name,Error.captureStackTrace(e,t),Object.setPrototypeOf(e,t.prototype)}var ane=class e extends Error{constructor(t){super(t),Ooh(this,e)}},rin=class{constructor({pollingInterval:t,personalApiKey:r,projectApiKey:n,timeout:i,host:o,customHeaders:s,...a}){this.debugMode=!1,this.shouldBeginExponentialBackoff=!1,this.backOffCount=0,this.pollerStopped=!1,this.filteredOutFlagKeys=new Set,this.pollingInterval=t,this.personalApiKey=r,this.featureFlags=[],this.featureFlagsByKey={},this.groupTypeMapping={},this.cohorts={},this.loadedSuccessfullyOnce=!1,this.timeout=i,this.projectApiKey=n,this.host=o,this.poller=void 0,this.fetch=a.fetch||fetch,this.onError=a.onError,this.customHeaders=s,this.onLoad=a.onLoad,this.onMinimalFlagCalledEvents=a.onMinimalFlagCalledEvents,this.cacheProvider=a.cacheProvider,this.strictLocalEvaluation=a.strictLocalEvaluation??!1,this.evaluationContexts=a.evaluationContexts,this.loadFeatureFlags()}debug(t=!0){this.debugMode=t}logMsgIfDebug(t){this.debugMode&&t()}withEvaluationSnapshot(t){return t.definitions?t:{...t,evaluationCache:{},definitions:{featureFlagsByKey:this.featureFlagsByKey,groupTypeMapping:this.groupTypeMapping,cohorts:this.cohorts,filteredOutFlagKeys:this.filteredOutFlagKeys,propertyMatchingVersion:this.propertyMatchingVersion}}}createEvaluationContext(t,r={},n={},i={},o={}){return{distinctId:t,groups:r,personProperties:n,groupProperties:i,evaluationCache:o}}async getFeatureFlag(t,r,n={},i={},o={}){await this.loadFeatureFlags();let s,a;if(!this.loadedSuccessfullyOnce)return s;if(a=this.featureFlagsByKey[t],a!==void 0){let c=this.createEvaluationContext(r,n,i,o);try{s=(await this.computeFlagAndPayloadLocally(a,c)).value,this.logMsgIfDebug(()=>console.debug(`Successfully computed flag locally: ${t} -> ${s}`))}catch(u){u instanceof ane||u instanceof Ju?this.logMsgIfDebug(()=>console.debug(`${u.name} when computing flag locally: ${t}: ${u.message}`)):u instanceof Error&&this.onError?.(new Error(`Error computing flag locally: ${t}: ${u}`))}}return s}async getAllFlagsAndPayloads(t,r){await this.loadFeatureFlags();let n={},i={},o=this.featureFlags.length==0,s=r?r.map(c=>this.featureFlagsByKey[c]).filter(Boolean):this.featureFlags,a=this.withEvaluationSnapshot({...t,definitions:void 0});return await Promise.all(s.map(async c=>{try{let{value:u,payload:l}=await this.computeFlagAndPayloadLocally(c,a,{skipLoadCheck:!0});n[c.key]=u,l&&(i[c.key]=l)}catch(u){u instanceof ane||u instanceof Ju?this.logMsgIfDebug(()=>console.debug(`${u.name} when computing flag locally: ${c.key}: ${u.message}`)):u instanceof Error&&this.onError?.(new Error(`Error computing flag locally: ${c.key}: ${u}`)),o=!0}})),{response:n,payloads:i,fallbackToFlags:o}}async computeFlagAndPayloadLocally(t,r,n={}){let{matchValue:i,skipLoadCheck:o=!1}=n;if(this.loadedSuccessfullyOnce&&(r=this.withEvaluationSnapshot(r)),o||await this.loadFeatureFlags(),!this.loadedSuccessfullyOnce)return{value:!1,payload:null};r=this.withEvaluationSnapshot(r),t=r.definitions.featureFlagsByKey[t.key]??t;let s;s=i!==void 0?i:await this.computeFlagValueLocally(t,r);let a=fYo(t.filters?.payloads,s);return{value:s,payload:a}}async computeFlagValueLocally(t,r){let{distinctId:n,groups:i,personProperties:o,groupProperties:s}=r;if(!t.active)return!1;if(t.ensure_experience_continuity)throw new Ju("Flag has experience continuity enabled");let c=(t.filters||{}).aggregation_group_type_index;if(c!=null){let u=r.definitions.groupTypeMapping[String(c)];if(!u)throw this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Unknown group type index ${c} for feature flag ${t.key}`)),new Ju("Flag has unknown group type index");if(!(u in i))return this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Can't compute group feature flag: ${t.key} without group names passed in`)),!1;t.bucketing_identifier==="device_id"&&(o?.$device_id===void 0||o?.$device_id===null||o?.$device_id==="")&&this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Ignoring bucketing_identifier for group flag: ${t.key}`));let l=s[u];return await this.matchFeatureFlagProperties(t,i[u],l,r)}{let u=this.getBucketingValueForFlag(t,n,o);if(u===void 0)throw this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Can't compute feature flag: ${t.key} without $device_id, falling back to server evaluation`)),new Ju(`Can't compute feature flag: ${t.key} without $device_id`);return await this.matchFeatureFlagProperties(t,u,o,r)}}getBucketingValueForFlag(t,r,n){if(t.filters?.aggregation_group_type_index!=null)return r;if(t.bucketing_identifier==="device_id"){let i=n?.$device_id;return i==null||i===""?void 0:i}return r}async evaluateFlagDependency(t,r,n){let{evaluationCache:i}=n,o=t.key;if(!n.definitions.featureFlagsByKey)throw new Ju("Feature flags not available for dependency evaluation");if(!("dependency_chain"in t))throw new Ju(`Flag dependency property for '${o}' is missing required 'dependency_chain' field`);let s=t.dependency_chain;if(!Array.isArray(s))throw new Ju(`Flag dependency property for '${o}' has an invalid 'dependency_chain' (expected array, got ${typeof s})`);if(s.length===0)throw new Ju(`Circular dependency detected for flag '${o}' (empty dependency chain)`);for(let c of s){if(!(c in i)){let l=n.definitions.featureFlagsByKey[c];if(l)if(l.active)try{let p=await this.computeFlagValueLocally(l,n);i[c]=p}catch(p){throw new Ju(`Error evaluating flag dependency '${c}' for flag '${o}': ${p}`)}else i[c]=!1;else if(n.definitions.filteredOutFlagKeys.has(c))i[c]=!1;else throw new Ju(`Missing flag dependency '${c}' for flag '${o}'`)}if(i[c]==null)throw new Ju(`Dependency '${c}' could not be evaluated`)}let a=i[o];return this.flagEvaluatesToExpectedValue(t.value,a)}flagEvaluatesToExpectedValue(t,r){return typeof t=="boolean"?t===r||typeof r=="string"&&r!==""&&t===!0:typeof t=="string"?r===t:!1}async matchFeatureFlagProperties(t,r,n,i){i=this.withEvaluationSnapshot(i);let o=t.filters||{},s=await lYo(o.holdout,r);if(s!==void 0)return s;let a=o.groups||[],c=o.aggregation_group_type_index,u=o.early_exit??!1,{groups:l,groupProperties:p}=i,f=!1,d;for(let m of a)try{let g=m.aggregation_group_type_index!==void 0?m.aggregation_group_type_index:c,A=n,y=r;if(g!==c&&g!=null){let x=i.definitions.groupTypeMapping[String(g)];if(!x||!(x in l)){this.logMsgIfDebug(()=>console.debug(`[FEATURE FLAGS] Skipping group condition for flag '${t.key}': group type index ${g} not available`));continue}if(!(x in p)){f=!0;continue}A=p[x],y=l[x]}let I=await this.isConditionMatch(t,y,m,A,i);if(I==="match"){let x=m.variant,v=o.multivariate?.variants||[];d=x&&v.some(w=>w.key===x)?x:await this.getMatchingVariant(t,y)||!0;break}if(u&&I==="out_of_rollout_bound"){if(f)break;return!1}}catch(g){if(g instanceof ane)throw g;if(g instanceof Ju)f=!0;else throw g}if(d!==void 0)return d;if(f)throw new Ju("Can't determine if feature flag is enabled or not with given properties");return!1}async isConditionMatch(t,r,n,i,o){o=this.withEvaluationSnapshot(o);let s=o.definitions,a=n.rollout_percentage,c=u=>{this.logMsgIfDebug(()=>console.warn(u))};if((n.properties||[]).length>0){for(let u of n.properties){let l=u.type,p=!1;if(l==="cohort"){let f=await yil(u,i,s.cohorts,this.debugMode,d=>this.evaluateFlagDependency(d,i,o),s.propertyMatchingVersion);p=u.operator==="not_in"?!f:f}else p=l==="flag"?await this.evaluateFlagDependency(u,i,o):Ail(u,i,c,s.propertyMatchingVersion);if(!p)return"no_match"}if(a==null)return"match"}return a!=null&&await PHt(t.key,r)>a/100?"out_of_rollout_bound":"match"}async getMatchingVariant(t,r){return pYo(t.key,r,t.filters?.multivariate?.variants||[])}variantLookupTable(t){return _nn(t.filters?.multivariate?.variants||[])}filterFlagsByEvaluationContexts(t){if(!this.evaluationContexts||this.evaluationContexts.length===0)return t;let r=new Set(this.evaluationContexts);return t.filter(n=>{let i=n.evaluation_contexts??n.evaluation_tags;return!i||i.length===0?!0:i.some(o=>r.has(o))})}getEvaluationRuntimeForFlag(t){let r=this.featureFlagsByKey[t];return r?gil(r.evaluation_runtime):void 0}getFlagKeysByEvaluationRuntime(t){return this.featureFlags.filter(r=>Toh(gil(r.evaluation_runtime),t)).map(r=>r.key)}updateFlagState(t){let r=this.filterFlagsByEvaluationContexts(t.flags);this.featureFlags=r,this.featureFlagsByKey=r.reduce((i,o)=>(i[o.key]=o,i),{});let n=new Set(r.map(i=>i.key));this.filteredOutFlagKeys=new Set(t.flags.filter(i=>!n.has(i.key)).map(i=>i.key)),this.groupTypeMapping=t.group_type_mapping??t.groupTypeMapping??{},this.cohorts=t.cohorts,this.propertyMatchingVersion=t.property_matching_version??t.propertyMatchingVersion,this.loadedSuccessfullyOnce=!0,this.onMinimalFlagCalledEvents?.((t.minimal_flag_called_events??t.minimalFlagCalledEvents)===!0)}warnAboutExperienceContinuityFlags(t){if(this.strictLocalEvaluation)return;let r=t.filter(n=>n.ensure_experience_continuity);r.length>0&&console.warn(`[PostHog] You are using local evaluation but ${r.length} flag(s) have experience continuity enabled: ${r.map(n=>n.key).join(", ")}. Experience continuity is incompatible with local evaluation and will cause a server request on every flag evaluation, negating local evaluation cost savings. To avoid server requests and unexpected costs, either disable experience continuity on these flags in PostHog, use strictLocalEvaluation: true in client init, or pass onlyEvaluateLocally: true per flag call (flags that cannot be evaluated locally will return undefined).`)}async loadFromCache(t){if(!this.cacheProvider)return!1;try{let r=await this.cacheProvider.getFlagDefinitions();return r?(this.updateFlagState(r),this.logMsgIfDebug(()=>console.debug(`[FEATURE FLAGS] ${t} (${r.flags.length} flags)`)),this.onLoad?.(this.featureFlags.length),this.warnAboutExperienceContinuityFlags(this.featureFlags),!0):!1}catch(r){return this.onError?.(new Error(`Failed to load from cache: ${r}`)),!1}}async loadFeatureFlags(t=!1){if(!(this.loadedSuccessfullyOnce&&!t))return!t&&this.nextFetchAllowedAt&&Date.now()<this.nextFetchAllowedAt?void this.logMsgIfDebug(()=>console.debug("[FEATURE FLAGS] Skipping fetch, in backoff period")):(this.loadingPromise||(this.loadingPromise=this._loadFeatureFlags().catch(r=>this.logMsgIfDebug(()=>console.debug(`[FEATURE FLAGS] Failed to load feature flags: ${r}`))).finally(()=>{this.loadingPromise=void 0})),this.loadingPromise)}isLocalEvaluationReady(){return(this.loadedSuccessfullyOnce??!1)&&(this.featureFlags?.length??0)>0}getFlagDefinitionsLoadedAt(){return this.flagDefinitionsLoadedAt}getPollingInterval(){let t=this.pollingInterval??3e4;return this.shouldBeginExponentialBackoff?Math.min(Soh,t*2**this.backOffCount):t}beginBackoff(){this.shouldBeginExponentialBackoff=!0,this.backOffCount+=1,this.nextFetchAllowedAt=Date.now()+this.getPollingInterval()}clearBackoff(){this.shouldBeginExponentialBackoff=!1,this.backOffCount=0,this.nextFetchAllowedAt=void 0}async _loadFeatureFlags(){this.poller&&(clearTimeout(this.poller),this.poller=void 0);try{let t=!0;if(this.cacheProvider)try{t=await this.cacheProvider.shouldFetchFlagDefinitions()}catch(n){this.onError?.(new Error(`Error in shouldFetchFlagDefinitions: ${n}`))}if(!t&&(await this.loadFromCache("Loaded flags from cache (skipped fetch)")||this.loadedSuccessfullyOnce))return;let r=await this._requestFeatureFlagDefinitions();if(!r)return;switch(r.status){case 304:this.logMsgIfDebug(()=>console.debug("[FEATURE FLAGS] Flags not modified (304), using cached data")),this.flagsEtag=r.headers?.get("ETag")??this.flagsEtag,this.loadedSuccessfullyOnce=!0,this.clearBackoff();return;case 401:throw this.beginBackoff(),new aft(`Your project key or secret key is invalid. Setting next polling interval to ${this.getPollingInterval()}ms. More information: https://posthog.com/docs/api#rate-limiting`);case 402:console.warn("[FEATURE FLAGS] Feature flags quota limit exceeded - unsetting all local flags. Learn more about billing limits at https://posthog.com/docs/billing/limits-alerts"),this.featureFlags=[],this.featureFlagsByKey={},this.filteredOutFlagKeys=new Set,this.groupTypeMapping={},this.cohorts={},this.propertyMatchingVersion=void 0,this.onMinimalFlagCalledEvents?.(!1);return;case 403:throw this.beginBackoff(),new aft(`Your secret key does not have permission to fetch feature flag definitions for local evaluation. Setting next polling interval to ${this.getPollingInterval()}ms. Are you sure you're using the correct secret and Project API key pair? More information: https://posthog.com/docs/api/overview`);case 429:throw this.beginBackoff(),new aft(`You are being rate limited. Setting next polling interval to ${this.getPollingInterval()}ms. More information: https://posthog.com/docs/api#rate-limiting`);case 200:{let n=await r.json()??{};if(!("flags"in n))return void this.onError?.(new Error(`Invalid response when getting feature flags: ${JSON.stringify(n)}`));this.flagsEtag=r.headers?.get("ETag")??void 0;let i=n.group_type_mapping||{},o=n.minimal_flag_called_events===!0,s={flags:n.flags??[],group_type_mapping:i,cohorts:n.cohorts||{},minimal_flag_called_events:o,property_matching_version:n.property_matching_version,propertyMatchingVersion:n.property_matching_version,groupTypeMapping:i,minimalFlagCalledEvents:o};if(this.updateFlagState(s),this.flagDefinitionsLoadedAt=Date.now(),this.clearBackoff(),this.cacheProvider&&t)try{await this.cacheProvider.onFlagDefinitionsReceived(s)}catch(a){this.onError?.(new Error(`Failed to store in cache: ${a}`))}this.onLoad?.(this.featureFlags.length),this.warnAboutExperienceContinuityFlags(this.featureFlags);break}default:return}}catch(t){t instanceof aft&&this.onError?.(t)}finally{!this.pollerStopped&&this.pollingInterval!==null&&(this.poller=setTimeout(()=>this.loadFeatureFlags(!0),this.getPollingInterval()))}}getPersonalApiKeyRequestOptions(t="GET",r){let n={...this.customHeaders,"Content-Type":"application/json",Authorization:`Bearer ${this.personalApiKey}`};return r&&(n["If-None-Match"]=r),{method:t,headers:n}}async _requestFeatureFlagDefinitions(){let t=`${this.host}/flags/definitions?token=${this.projectApiKey}&send_cohorts`,r=this.getPersonalApiKeyRequestOptions("GET",this.flagsEtag),n=null;if(this.timeout&&typeof this.timeout=="number"){let o=new AbortController;n=RN(()=>{o.abort()},this.timeout),r.signal=o.signal}let i=()=>clearTimeout(n);try{let o=this.fetch,s=await o(t,r);return s.status!==200?(i(),s):{status:s.status,headers:s.headers,body:s.body,text:async()=>{try{return await s.text()}finally{i()}},json:async()=>{try{return await s.json()}finally{i()}}}}catch(o){throw i(),o}}async stopPoller(t=3e4){if(this.pollerStopped=!0,clearTimeout(this.poller),this.poller=void 0,this.cacheProvider)try{let r=this.cacheProvider.shutdown();r instanceof Promise&&await XSe(r,t,()=>{throw new Error(`Cache shutdown timeout after ${t}ms`)})}catch(r){this.onError?.(new Error(`Error during cache shutdown: ${r}`))}}};function Ail(e,t,r,n){return uYo(e,t,{warnFunction:r,propertyMatchingVersion:n})}function Poh(e,t){if(!(e in t))throw new ane(`cohort ${e} not found in local cohorts - likely a static cohort that requires server evaluation`)}async function yil(e,t,r,n=!1,i,o){let s=String(e.value);Poh(s,r);let a=r[s];return bil(a,t,r,n,i,o)}async function bil(e,t,r,n=!1,i,o){if(!e)return!0;let s=e.type,a=e.values;if(!a||a.length===0)return!0;let c=!1;if("values"in a[0]){for(let u of a)try{let l=await bil(u,t,r,n,i,o);if(s==="AND"){if(!l)return!1}else if(l)return!0}catch(l){if(l instanceof ane)throw l;if(l instanceof Ju)n&&console.debug(`Failed to compute property ${u} locally: ${l}`),c=!0;else throw l}if(c)throw new Ju("Can't match cohort without a given cohort property value");return s==="AND"}for(let u of a)try{let l;if(u.type==="cohort")l=await yil(u,t,r,n,i,o);else if(u.type==="flag"){if(!i)throw new Ju(`Flag dependency '${u.key||"unknown"}' cannot be evaluated without a flag dependency evaluator`);l=await i(u)}else l=Ail(u,t,void 0,o);let p=u.negation||!1;if(s==="AND"){if(!l&&!p||l&&p)return!1}else if(l&&!p||!l&&p)return!0}catch(l){if(l instanceof ane)throw l;if(l instanceof Ju)n&&console.debug(`Failed to compute property ${u} locally: ${l}`),c=!0;else throw l}if(c)throw new Ju("can't match cohort without a given cohort property value");return s==="AND"}var Boh=["--unhandled-rejections","--unhandled_rejections"],Roh=new Set(["throw","strict","warn","warn-with-error-code","none"]),Doh=[...globalThis.process?.execArgv??[]],koh=globalThis.process?.env?.NODE_OPTIONS;function Foh(e){let t=[],r="",n=!1;for(let i=0;i<e.length;i++){let o=e[i];o==="\\"&&n&&i+1<e.length?r+=e[++i]:o!==" "||n?o==='"'?n=!n:r+=o:r&&(t.push(r),r="")}return r&&t.push(r),t}function Eil(e){let t;for(let r=0;r<e.length;r++){let n=e[r],i=Boh.find(s=>n===s||n.startsWith(`${s}=`));if(!i)continue;let o=n===i?e[++r]:n.slice(i.length+1);Roh.has(o)&&(t=o)}return t}function Noh(e=Doh,t=koh){return Eil(e)??Eil(Foh(t??""))??"throw"}var Iil=Noh();function vil(e,t,r){e(t,{mechanism:{type:r==="unhandledRejection"?"onunhandledrejection":"onuncaughtexception",handled:!1}})}function joh(e,t){let r=!1;return Object.assign((n,i)=>{let o=global.process.listeners("uncaughtException").filter(s=>s.name!=="domainUncaughtExceptionClear"&&s._posthogErrorHandler!==!0).length;vil(e,n,i),!r&&o===0&&(r=!0,t(n))},{_posthogErrorHandler:!0})}function Cil(e,t,r=Iil){let n=globalThis.process;if(n){if(r==="strict")return void n.on("uncaughtExceptionMonitor",(i,o)=>vil(e,i,o));n.on("uncaughtException",joh(e,t))}}function xil(e,t=Iil){let r=globalThis.process;!r||t==="throw"||t==="strict"||t==="warn-with-error-code"||r.on("unhandledRejection",n=>{e(n,{mechanism:{type:"onunhandledrejection",handled:!1}})})}var zoh=2e3,DYo=class e{constructor(t,r,n){this.client=t,this._exceptionAutocaptureEnabled=r.enableExceptionAutocapture||!1,this._logger=n,this._rateLimiter=new Inn({...Nrl(r),refillInterval:1e4,_logger:this._logger}),this.startAutocaptureIfEnabled()}static isPreviouslyCapturedError(t){return dHt(t)&&"__posthog_previously_captured_error"in t&&t.__posthog_previously_captured_error===!0}static async buildEventMessage(t,r,n,i,o){let s={...o},a=t.buildFromUnknown(r,n);a.$exception_list=await t.modifyFrames(a.$exception_list);let c=eO.getInjectedReleaseId();return c&&(s.$release_id=c),{event:"$exception",distinctId:i,properties:{...a,...s},_originatedFromCaptureException:!0}}startAutocaptureIfEnabled(){this.isEnabled()&&(Cil(this.onException.bind(this),this.onFatalError.bind(this)),xil(this.onException.bind(this)))}onException(t,r){this.client.addPendingPromise((async()=>{if(!e.isPreviouslyCapturedError(t)){let n=await e.buildEventMessage(this.client.getErrorPropertiesBuilder(),t,r),o=n.properties?.$exception_list[0]?.type??"Exception";return this._rateLimiter.consumeRateLimit(o)?void this._logger.info("Skipping exception capture because of client rate limiting.",{exception:o}):this.client._capturePreparedEvent(n,!1)}})())}async onFatalError(t){console.error(t),await this.client.shutdown(zoh),globalThis.process.exit(1)}isEnabled(){return!this.client.isDisabled&&this._exceptionAutocaptureEnabled}shutdown(){this._rateLimiter.stop()}},r5e=DYo;var nin=class{getProperty(t){return this._memoryStorage[t]}setProperty(t,r){this._memoryStorage[t]=r!==null?r:void 0}constructor(){this._memoryStorage={}}};function Qoh(e){return e==="v0"||e==="v1"}function wil(){let e="u">typeof process?process.env?.POSTHOG_CAPTURE_MODE:void 0;return Qoh(e)?e:"v0"}var Moh="$ai_",VHt="analytics";function Sil(e){return typeof e.event=="string"&&e.event.startsWith(Moh)}var cft=class e extends Error{constructor({requestId:t,drops:r,retryExhausted:n,cause:i}){super(e.buildMessage(t,r,n,i)),this.name="CaptureV1Error",this.requestId=t,this.drops=r,this.retryExhausted=n,this.cause=i}static buildMessage(t,r,n,i){let o=`Capture V1 batch ${t} did not fully deliver: ${r.length} dropped, ${n.length} undelivered`;return i instanceof Error&&(o+=` (${i.message})`),o}};function kYo(e){if(typeof e=="boolean")return e;if(typeof e=="number")return e!==0;if(typeof e=="string"){let t=e.trim().toLowerCase();if(t==="true"||t==="1")return!0;if(t==="false"||t==="0")return!1}}function Loh(e){return typeof e=="string"?e:void 0}var _oh=[{property:"$cookieless_mode",optionKey:"cookieless_mode",coerce:kYo},{property:"$ignore_sent_at",optionKey:"disable_skew_correction",coerce:kYo},{property:"$process_person_profile",optionKey:"process_person_profile",coerce:kYo},{property:"$product_tour_id",optionKey:"product_tour_id",coerce:Loh}],Uoh=[{property:"$session_id",field:"session_id"},{property:"$window_id",field:"window_id"}];function Voh(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Goh(e){if(typeof e=="string"){let r=new Date(e);if(Number.isNaN(r.getTime()))return new Date().toISOString();let n=r.toISOString(),i=e.match(/\.(\d+)(?:Z|[+-]\d{2}:?\d{2})?$/i)?.[1];return i&&i.length>3?n.replace(/\.\d{3}Z$/,`.${i}Z`):n}if(e instanceof Date)return Number.isNaN(e.getTime())?new Date().toISOString():e.toISOString();let t=e==null?new Date:new Date(e);return Number.isNaN(t.getTime())?new Date().toISOString():t.toISOString()}function Til(e,t,r){r!==void 0&&!(t in e)&&(e[t]=r)}function qoh(e){let r={...Voh(e.properties)?e.properties:{}},n={};for(let{property:o,optionKey:s,coerce:a}of _oh)if(o in r){let c=a(r[o]);c!==void 0&&(n[s]=c),delete r[o]}let i={};for(let{property:o,field:s}of Uoh)if(o in r){let a=r[o];typeof a=="string"&&(i[s]=a),delete r[o]}return delete r.$lib,delete r.$lib_version,Til(r,"$set",e.$set),Til(r,"$set_once",e.$set_once),{event:String(e.event??""),uuid:String(e.uuid??""),distinct_id:String(e.distinct_id??""),timestamp:Goh(e.timestamp),...i,options:n,properties:r}}function Oil(e,{createdAt:t,historicalMigration:r}){let n={created_at:t,batch:e.map(qoh)};return r&&(n.historical_migration=!0),n}var Woh="/i/v1/analytics/events",Hoh=3e4,Koh=new Set([408,500,502,503,504]),iin=class{constructor(t,r){this.config=t,this.maxBackoffMs=t.maxBackoffMs??Hoh,this.fetchFn=r.fetch,this.onError=r.onError,this.now=r.now??Date.now,this.sleep=r.sleep??(n=>new Promise(i=>RN(i,n))),this.generateRequestId=r.generateRequestId??BN,this.compress=r.compress??SHt}async sendV1Batch(t){if(t.length===0)return;let r=this.generateRequestId(),n=new Date(this.now()).toISOString(),{batch:i}=Oil(t,{createdAt:n,historicalMigration:this.config.historicalMigration}),o=`${this.config.host}${Woh}`,s=[],a=i,c=Math.max(1,this.config.maxAttempts);for(let u=1;u<=c;u++){let l=u===c,p=JSe({created_at:n,...this.config.historicalMigration?{historical_migration:!0}:{},batch:a}),f,d;try{f=await this.sendOnce(o,p,u,r);let{response:m,signal:g}=f,{status:A}=m;if(A<200||A>=300)if(!l&&Koh.has(A)){let y=this.parseRetryAfter(m);await f.waitFor(f.cancelBody()).catch(()=>{}),d=this.backoffDelay(u,y)}else{let y=await this.buildHttpError(m,A,f.waitFor);return this.surfaceBatchFailure(r,s,a,y)}else{let y;try{y=await f.waitFor(this.parseResponse(m))}catch(v){if(g.aborted)throw v;return this.surfaceBatchFailure(r,s,a,new Error(`Capture V1 returned an unparseable ${A} response body`))}let I=this.classify(a,y,s);if(I.length===0)return this.surfacePartialDrops(r,s);if(l)return void this.onError(new cft({requestId:r,drops:s,retryExhausted:I.map(v=>v.uuid)}));a=I;let x=this.parseRetryAfter(m);d=this.backoffDelay(u,x)}}catch(m){if(f&&!f.signal.aborted)throw m;if(l)return this.surfaceBatchFailure(r,s,a,m);d=this.backoffDelay(u)}finally{f?.cleanup()}d!==void 0&&await this.sleep(d)}}async sendOnce(t,r,n,i){let o=this.buildHeaders(n,i),s=r;if(this.config.compressionEnabled){let p=await this.compress(r,this.config.isDebug);p!==null&&(s=p,o["Content-Encoding"]="gzip")}let a=new AbortController,c="waiting for response headers",u,l=new Promise((p,f)=>{u=RN(()=>{let d=new Error(`Capture V1 request timed out ${c} after ${this.config.requestTimeoutMs}ms`);d.name="AbortError",f(d),a.abort(d)},this.config.requestTimeoutMs)});try{let p=this.fetchFn(t,{method:"POST",headers:o,body:s,signal:a.signal}),f=!1;p.then(y=>{a.signal.aborted&&!f&&this.cancelBody(y)}).catch(()=>{});let d=await Promise.race([p,l]);f=!0,c="while reading the response body";let m=!1,g,A=()=>g??=this.cancelBody(d);return{response:d,signal:a.signal,waitFor:y=>Promise.race([y,l]),cancelBody:A,cleanup:()=>{m||(m=!0,clearTimeout(u),a.signal.aborted&&A())}}}catch(p){throw clearTimeout(u),p}}buildHeaders(t,r){let n=`${this.config.libraryId}/${this.config.libraryVersion}`,i={"Content-Type":"application/json",Authorization:`Bearer ${this.config.apiKey}`,"PostHog-Sdk-Info":n,"PostHog-Attempt":String(t),"PostHog-Request-Id":r,"PostHog-Request-Timestamp":new Date(this.now()).toISOString()};return this.config.userAgent&&(i["User-Agent"]=this.config.userAgent),i}classify(t,r,n){let i=r.results??{},o=[];for(let s of t){let a=i[s.uuid];a&&(a.result==="drop"?n.push({uuid:s.uuid,details:a.details??void 0}):a.result==="retry"&&o.push(s))}return o}backoffDelay(t,r){let n=Math.min(this.config.initialRetryDelayMs*2**(t-1),this.maxBackoffMs);return r===void 0?n:Math.max(n,Math.min(r,this.maxBackoffMs))}parseRetryAfter(t){let r=t.headers?.get("Retry-After");if(!r)return;let n=r.trim();if(/^\d+$/.test(n)){let s=parseInt(n,10);return Number.isFinite(s)&&s>0?1e3*s:void 0}let i=Date.parse(n);if(Number.isNaN(i))return;let o=i-this.now();return o>0?o:void 0}async parseResponse(t){let r=await t.text(),n=JSON.parse(r);if(typeof n!="object"||n===null||Array.isArray(n))throw new Error("unexpected response shape");let i=n.results;if(i!==void 0&&(typeof i!="object"||i===null||Array.isArray(i)))throw new Error("unexpected results shape");return{results:i??{}}}async buildHttpError(t,r,n){let i="";try{i=(await n(t.text())).slice(0,512)}catch{}let o=i?`: ${i}`:"";return new Error(`Capture V1 request failed with HTTP ${r}${o}`)}surfaceBatchFailure(t,r,n,i){this.onError(new cft({requestId:t,drops:r,retryExhausted:n.map(o=>o.uuid),cause:i}))}surfacePartialDrops(t,r){r.length>0&&this.onError(new cft({requestId:t,drops:r,retryExhausted:[]}))}async cancelBody(t){try{await t.body?.cancel()}catch{}}};var n5e="ai-capture",oin="/i/v0/ai/batch/";var Yoh=new TextEncoder;function NYo(e){return Yoh.encode(JSe(e)).length}function Pil(e,t=8388608,r=5242880){let n=[],i=[],o=[],s=0;for(let a of e){if(a===void 0)continue;let c=NYo(a);if(c>t){i.push({event:typeof a.event=="string"?a.event:"unknown",bytes:c});continue}o.length>0&&s+c>r&&(n.push(o),o=[],s=0),o.push(a),s+=c}return o.length>0&&n.push(o),{batches:n,dropped:i}}var Xoh=100,Bil=3e4,Zoh=5e4,$oh=50,esh=500,tsh="https://us.i.posthog.com",Ril=new Set;function ain(e,t){Ril.has(e)||(Ril.add(e),console.warn(`[PostHog] ${t}`))}function rsh(e){return typeof e=="string"?e.trim():""}function nsh(e){return(typeof e=="string"?e.trim():"")||void 0}function ish(e){return(typeof e=="string"?e.trim():"")||tsh}function osh(e){return(Array.isArray(e)?e:[e]).filter(r=>typeof r=="string"&&r.trim().length>0)}function ssh(e){if(!e)return{};let t={};for(let[n,i]of Object.entries(e))t[`$feature/${n}`]=i;let r=Object.keys(e).filter(n=>e[n]!==!1).sort();return r.length>0&&(t.$active_feature_flags=r),t}var cin=class extends THt{constructor(t,r={}){let n=rsh(t),i={...r,maxQueueSize:r.maxQueueSize??1e4,flushInterval:r.flushInterval??5e3,host:ish(r.host),personalApiKey:nsh(r.secretKey??r.personalApiKey)};if(super(n,i),this._memoryStorage=new nin,this._aiCaptureRouteActive=!1,this._minimalFlagCalledEvents=!1,this.options=i,this.captureMode=wil(),this.enableFullAiCapture=i.enableFullAiCapture===!0,this.context=this.initializeContext(),this.options.featureFlagsPollingInterval=typeof i.featureFlagsPollingInterval=="number"?Math.max(i.featureFlagsPollingInterval,Xoh):i.featureFlagsPollingInterval===null?null:Bil,typeof i.waitUntilDebounceMs=="number"&&(this.options.waitUntilDebounceMs=Math.max(i.waitUntilDebounceMs,0)),typeof i.waitUntilMaxWaitMs=="number"&&(this.options.waitUntilMaxWaitMs=Math.max(i.waitUntilMaxWaitMs,0)),!this.disabled&&i.personalApiKey){if(i.personalApiKey.includes("phc_"))throw new Error('Your Personal API key is invalid. These keys are prefixed with "phx_" and can be created in PostHog project settings.');i.enableLocalEvaluation!==!1&&(this.featureFlagsPoller=new rin({pollingInterval:this.options.featureFlagsPollingInterval,personalApiKey:i.personalApiKey,projectApiKey:n,timeout:i.requestTimeout??1e4,host:this.host,fetch:i.fetch,onError:s=>{this._events.emit("error",s)},onLoad:s=>{this._events.emit("localEvaluationFlagsLoaded",s)},onMinimalFlagCalledEvents:s=>{this._minimalFlagCalledEvents=s},customHeaders:this.getCustomHeaders(),cacheProvider:i.flagDefinitionCacheProvider,strictLocalEvaluation:i.strictLocalEvaluation,evaluationContexts:i.evaluationContexts??i.evaluationEnvironments}))}this.errorTracking=new r5e(this,i,this._logger),this.distinctIdHasSentFlagCalls={},this.maxCacheSize=i.maxCacheSize||Zoh}enqueue(t,r,n,i){super.enqueue(t,r,n,i),this.scheduleDebouncedFlush()}_flushEventsAndSpans(t=!1){let r=this.flushWithPendingPromises();return!this._traces||t&&this._traces.throttled?r:gHt([r,this._traces.flush().catch(()=>{})]).then(([n])=>{if(n.status==="rejected")throw n.reason})}flushAutomatic(){return this._flushKeepingRuntimeAlive(!0)}async flush(){return this._flushKeepingRuntimeAlive(!1)}_flushKeepingRuntimeAlive(t){let r=this._flushEventsAndSpans(t),n=this.options.waitUntil;if(n&&!this._waitUntilCycle)try{n(r.catch(()=>{}))}catch{}return r}scheduleDebouncedFlush(){let t=this.options.waitUntil;if(!t||this.disabled||this.optedOut)return;if(!this._waitUntilCycle){let s,a=new Promise(c=>{s=c});try{t(a)}catch{return}this._waitUntilCycle={resolve:s,startedAt:Date.now(),timer:void 0}}let r=Date.now()-this._waitUntilCycle.startedAt,n=this.options.waitUntilMaxWaitMs??esh,i=r>=n;if(this._waitUntilCycle.timer!==void 0&&clearTimeout(this._waitUntilCycle.timer),i)return void this.resolveWaitUntilFlush();let o=this.options.waitUntilDebounceMs??$oh;this._waitUntilCycle.timer=RN(()=>{this.resolveWaitUntilFlush()},o)}_consumeWaitUntilCycle(){let t=this._waitUntilCycle;return t&&(clearTimeout(t.timer),this._waitUntilCycle=void 0),t?.resolve}async resolveWaitUntilFlush(){let t=this._consumeWaitUntilCycle();try{await this._flushEventsAndSpans()}catch{}finally{t?.()}}getPersistedProperty(t){return this._memoryStorage.getProperty(t)}setPersistedProperty(t,r){return this._memoryStorage.setProperty(t,r)}fetch(t,r){return this.options.fetch?this.options.fetch(t,r):fetch(t,r)}getQueueRouteKey(t){return this.captureMode==="v1"&&Sil(t)?"ai":VHt}persistedQueueKeyForRoute(t){return t===n5e?wM.AiCaptureQueue:t==="ai"?wM.AiQueue:wM.Queue}getActiveQueueRoutes(){let t=this.captureMode==="v1"?[VHt,"ai"]:[VHt];return this._aiCaptureRouteActive&&t.push(n5e),t}getBatchEndpointPath(t){return t===n5e?oin:super.getBatchEndpointPath(t)}async sendBatch(t,r,n=VHt){if(n===n5e)return this.sendAiCaptureBatch(t,r);if(this.captureMode!=="v1"||n==="ai")return super.sendBatch(t,r,n);let i=t.filter(o=>o!==void 0);await this.getV1Sender().sendV1Batch(i)}async sendAiCaptureBatch(t,r){let{batches:n,dropped:i}=Pil(t);for(let{event:o,bytes:s}of i){let a=`Event ${o} (${s} bytes) exceeds the ${8388608/1048576}MiB limit for ${oin}, dropping.`;this._logger.error(a),this._events.emit("error",new Error(a))}for(let o of n)await this.sendAiSubBatch(o,r)}async sendAiSubBatch(t,r){try{await super.sendBatch(t,r,n5e)}catch(n){if(!nft(n))throw n;if(t.length===1){let[o]=t,a=`Event ${typeof o.event=="string"?o.event:"unknown"} (${NYo(o)} bytes) was rejected with 413 by ${oin} on its own, dropping.`;this._logger.error(a),this._events.emit("error",new Error(a));return}let i=Math.ceil(t.length/2);await this.sendAiSubBatch(t.slice(0,i),r),await this.sendAiSubBatch(t.slice(i),r)}}getV1Sender(){return this._v1Sender||(this._v1Sender=new iin({host:this.host,apiKey:this.apiKey,libraryId:this.getLibraryId(),libraryVersion:this.getLibraryVersion(),userAgent:this.getCustomUserAgent()||void 0,historicalMigration:this.historicalMigration,compressionEnabled:!this.disableCompression,requestTimeoutMs:this.requestTimeout,maxAttempts:(this.options.fetchRetryCount??3)+1,initialRetryDelayMs:this.options.fetchRetryDelay??3e3,isDebug:this.isDebug},{fetch:(t,r)=>this.fetch(t,r),onError:t=>this._events.emit("error",t),compress:t=>this.compressPayload(t)})),this._v1Sender}getLibraryVersion(){return hil}get metrics(){return this._metrics||(this._metrics=new jHt(this,Vnn(this.options.metrics),this._logger)),this._metrics}initializeSpanContextManager(){return new _Ht}hostResourceAttributes(){return{}}get _spanContextManager(){return this._spanContext||(this._spanContext=this.initializeSpanContextManager()),this._spanContext}get _tracesPipeline(){if(this.options.traces)return this._traces||(this._traces=new LHt(this,TYo(this.options.traces,this.hostResourceAttributes(),this._logger),this._logger,()=>this._tracingContext(),this._spanContextManager,()=>this.scheduleDebouncedFlush())),this._traces}_tracingContext(){let t=this.context?.get();return{distinctId:t?.distinctId,sessionId:t?.sessionId}}startSpan(t,r){return this._tracesPipeline?.startSpan(t,r)??ZSe(r,this._spanContextManager.active())}withSpan(t,r,n){let i=typeof r=="function"?void 0:r,o=typeof r=="function"?r:n,s=this._tracesPipeline;return s?i?s.withSpan(t,i,o):s.withSpan(t,o):MHt(this._spanContextManager,ZSe(i,this._spanContextManager.active()),o)}getActiveSpan(){return this._spanContextManager.active()??null}getCustomUserAgent(){return`${this.getLibraryId()}/${this.getLibraryVersion()}`}getEvaluationRuntime(){return"server"}getCommonEventProperties(){let t=super.getCommonEventProperties();return(this.options.isServer??!0)&&(t.$is_server=!0),t}enable(){return super.optIn()}disable(){return super.optOut()}debug(t=!0){super.debug(t),this.featureFlagsPoller?.debug(t)}_warnIfInvalidCapture(t,r,n){typeof t=="string"&&this._logger.warn(r),t.event==="$exception"&&!t._originatedFromCaptureException&&this._logger.warn(n)}_sendPreparedEvent(t,r,n,i,o){return this.addPendingPromise(this._prepareEventMessage(r,i).then(({distinctId:s,event:a,properties:c,options:u})=>{let l={timestamp:u.timestamp,disableGeoip:u.disableGeoip,uuid:u.uuid},p={distinctId:s,event:a,properties:{...c,...this.getCommonEventProperties()}};return n?this.sendImmediate(t,p,l,o):this.enqueue(t,p,l,o)}).catch(s=>{s&&console.error(s)}))}_capturePreparedEvent(t,r){return this._sendPreparedEvent("capture",t,r)}capture(t){this._warnIfInvalidCapture(t,"Called capture() with a string as the first argument when an object was expected.","Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this._capturePreparedEvent(t,!1)}async captureImmediate(t){return this._warnIfInvalidCapture(t,"Called captureImmediate() with a string as the first argument when an object was expected.","Capturing a `$exception` event via `posthog.captureImmediate('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureExceptionImmediate(error)` instead, which attaches this metadata by default."),this._capturePreparedEvent(t,!0)}captureAi(t){if(this.disabled)return;let r=ZVe(t.uuid,BN);return this._sendPreparedAiEvent({...t,uuid:r},!1),r}async captureAiImmediate(t){if(this.disabled)return;let r=ZVe(t.uuid,BN);return await this._sendPreparedAiEvent({...t,uuid:r},!0),r}_sendPreparedAiEvent(t,r){return typeof t?.event=="string"&&!t.event.startsWith("$ai_")&&this._logger.debug(`captureAi called with non-AI event ${t.event}; routing it to the AI endpoint anyway.`),this._aiCaptureRouteActive=!0,this._sendPreparedEvent("capture",t,r,void 0,n5e)}identify({distinctId:t,properties:r={},disableGeoip:n}){let{$set:i,$set_once:o,$anon_distinct_id:s,...a}=r,l={$set:i||a,$set_once:o||{},$anon_distinct_id:s??void 0};this._sendPreparedEvent("identify",{distinctId:t,event:"$identify",properties:l,disableGeoip:n},!1,{includeContextProperties:!1})}async identifyImmediate({distinctId:t,properties:r={},disableGeoip:n}){let{$set:i,$set_once:o,$anon_distinct_id:s,...a}=r,l={$set:i||a,$set_once:o||{},$anon_distinct_id:s??void 0};await this._sendPreparedEvent("identify",{distinctId:t,event:"$identify",properties:l,disableGeoip:n},!0,{includeContextProperties:!1})}setPersonProperties({distinctId:t,properties:r={},propertiesOnce:n={}}){if(Object.keys(r).length===0&&Object.keys(n).length===0)return;let i={};Object.keys(r).length>0&&(i.$set=r),Object.keys(n).length>0&&(i.$set_once=n),this.capture({distinctId:t,event:"$set",properties:i})}unsetPersonProperties({distinctId:t,properties:r}){let n=osh(r);n.length!==0&&this.capture({distinctId:t,event:"$set",properties:{$unset:n}})}alias(t){this._sendPreparedEvent("alias",{distinctId:t.distinctId,event:"$create_alias",properties:{distinct_id:t.distinctId,alias:t.alias},disableGeoip:t.disableGeoip},!1,{includeContextProperties:!1})}async aliasImmediate(t){await this._sendPreparedEvent("alias",{distinctId:t.distinctId,event:"$create_alias",properties:{distinct_id:t.distinctId,alias:t.alias},disableGeoip:t.disableGeoip},!0,{includeContextProperties:!1})}isLocalEvaluationReady(){return this.featureFlagsPoller?.isLocalEvaluationReady()??!1}getFeatureFlagEvaluationRuntime(t){return this.featureFlagsPoller?.getEvaluationRuntimeForFlag(t)}getFeatureFlagKeysByEvaluationRuntime(t){return this.featureFlagsPoller?.getFlagKeysByEvaluationRuntime(t)??[]}async waitForLocalEvaluationReady(t=Bil){return this.isLocalEvaluationReady()?!0:this.featureFlagsPoller===void 0?!1:new Promise(r=>{let n=setTimeout(()=>{i(),r(!1)},t),i=this._events.on("localEvaluationFlagsLoaded",o=>{clearTimeout(n),i(),r(o>0)})})}_resolveDistinctId(t,r){return typeof t=="string"?{distinctId:t,options:r}:{distinctId:this.context?.get()?.distinctId,options:t}}async _getFeatureFlagResult(t,r,n={},i){if(this.disabled)return void this._logger.warn("The client is disabled");let o=n.sendFeatureFlagEvents??!0;if(this._flagOverrides!==void 0&&t in this._flagOverrides){let R=this._flagOverrides[t];if(R===void 0)return;let D=this._payloadOverrides?.[t];return{key:t,enabled:R!==!1,variant:typeof R=="string"?R:void 0,payload:D}}let{groups:s,disableGeoip:a}=n,{onlyEvaluateLocally:c,personProperties:u,groupProperties:l}=n,p=this.addLocalPersonAndGroupProperties(r,s,u,l);u=p.allPersonProperties,l=p.allGroupProperties;let f=this.createFeatureFlagEvaluationContext(r,s,this.personPropertiesForLocalEvaluation(r,u),l);c==null&&(c=this.options.strictLocalEvaluation??!1);let d,m=!1,g,A,y,I,x,v,w;if(this.featureFlagsPoller!==void 0){await this.featureFlagsPoller?.loadFeatureFlags();let R=this.featureFlagsPoller?.featureFlagsByKey[t];if(R)try{let D=await this.featureFlagsPoller?.computeFlagAndPayloadLocally(R,f,{matchValue:i});if(D){m=!0;let O=D.value;I=R.id,v="Evaluated locally",w=R.has_experiment,d={key:t,enabled:O!==!1,variant:typeof O=="string"?O:void 0,payload:D.payload??void 0,reason:v,reasonCode:R.active===!1?"flag_disabled":void 0}}}catch(D){if(D instanceof ane||D instanceof Ju)this._logger?.info(`${D.name} when computing flag locally: ${t}: ${D.message}`);else throw D}}if(!m&&!c){let R=await super.getFeatureFlagDetailsStateless(f.distinctId,f.groups,u,l,a,[t]);if(R===void 0)y=Dhe.UNKNOWN_ERROR;else{this._minimalFlagCalledEvents=R.minimalFlagCalledEvents===!0,g=R.requestId,A=R.evaluatedAt;let D=[];R.errorsWhileComputingFlags&&D.push(Dhe.ERRORS_WHILE_COMPUTING),R.quotaLimited?.includes("feature_flags")&&D.push(Dhe.QUOTA_LIMITED);let O=R.flags[t];if(O===void 0)D.push(Dhe.FLAG_MISSING);else{I=O.metadata?.id,x=O.metadata?.version,v=O.reason?.description??O.reason?.code,w=O.metadata?.has_experiment;let M;if(O.metadata?.payload!==void 0)try{M=JSON.parse(O.metadata.payload)}catch{M=O.metadata.payload}d={key:t,enabled:O.enabled,variant:O.variant??void 0,payload:M,reason:v,reasonCode:O.reason?.code}}D.length>0&&(y=D.join(","))}}if(o){let R=d===void 0?void 0:d.enabled===!1?!1:d.variant??!0,D={$feature_flag:t,$feature_flag_response:R,$feature_flag_id:I,$feature_flag_version:x,$feature_flag_reason:v,locally_evaluated:m,[`$feature/${t}`]:R,$feature_flag_request_id:g,$feature_flag_evaluated_at:m?Date.now():A};if(w!==void 0&&(D.$feature_flag_has_experiment=w),m&&this.featureFlagsPoller){let O=this.featureFlagsPoller.getFlagDefinitionsLoadedAt();O!==void 0&&(D.$feature_flag_definitions_loaded_at=O)}y&&(D.$feature_flag_error=y),this._captureFlagCalledEventIfNeeded({distinctId:r,key:t,response:R,groups:s,disableGeoip:a,properties:D})}return d!==void 0&&this._payloadOverrides!==void 0&&t in this._payloadOverrides&&(d={...d,payload:this._payloadOverrides[t]}),d}async getFeatureFlag(t,r,n){ain("getFeatureFlag","`getFeatureFlag` is deprecated and will be removed in a future major version. Use `posthog.evaluateFlags(distinctId, ...)` and call `flags.getFlag(key)` instead \u2014 this consolidates flag evaluation into a single `/flags` request per incoming request.");let i=await this._getFeatureFlagResult(t,r,{...n,sendFeatureFlagEvents:n?.sendFeatureFlagEvents??this.options.sendFeatureFlagEvent??!0});if(i!==void 0)return i.enabled===!1?!1:i.variant??!0}async getFeatureFlagPayload(t,r,n,i){if(ain("getFeatureFlagPayload","`getFeatureFlagPayload` is deprecated and will be removed in a future major version. Use `posthog.evaluateFlags(distinctId, ...)` and call `flags.getFlagPayload(key)` instead \u2014 this consolidates flag evaluation into a single `/flags` request per incoming request."),this._payloadOverrides!==void 0&&t in this._payloadOverrides)return this._payloadOverrides[t];let o=await this._getFeatureFlagResult(t,r,{...i,sendFeatureFlagEvents:!1},n);if(o!==void 0)return o.payload??null}async getFeatureFlagResult(t,r,n){let{distinctId:i,options:o}=this._resolveDistinctId(r,n);return i?this._getFeatureFlagResult(t,i,{...o,sendFeatureFlagEvents:o?.sendFeatureFlagEvents??this.options.sendFeatureFlagEvent??!0}):void this._logger.warn("[PostHog] distinctId is required \u2014 pass it explicitly or use withContext()")}async getRemoteConfigPayload(t){if(this.disabled)return void this._logger.warn("The client is disabled");if(!this.options.personalApiKey)throw new Error("Personal API key is required for remote config payload decryption");let r=await this._requestRemoteConfigPayload(t);if(!r)return;let n=await r.json();if(typeof n=="string")try{return JSON.parse(n)}catch{}return n}async isFeatureEnabled(t,r,n){ain("isFeatureEnabled","`isFeatureEnabled` is deprecated and will be removed in a future major version. Use `posthog.evaluateFlags(distinctId, ...)` and call `flags.isEnabled(key)` instead \u2014 this consolidates flag evaluation into a single `/flags` request per incoming request.");let i=await this._getFeatureFlagResult(t,r,{...n,sendFeatureFlagEvents:n?.sendFeatureFlagEvents??this.options.sendFeatureFlagEvent??!0});return i===void 0?void 0:i.enabled===!1?!1:!!(i.variant??!0)||!1}async getAllFlags(t,r){let{distinctId:n,options:i}=this._resolveDistinctId(t,r);return n?(await this.getAllFlagsAndPayloads(n,i)).featureFlags||{}:(this._logger.warn("[PostHog] distinctId is required to get feature flags \u2014 pass it explicitly or use withContext()"),{})}async getAllFlagsAndPayloads(t,r){let{distinctId:n,options:i}=this._resolveDistinctId(t,r);if(!n)return this._logger.warn("[PostHog] distinctId is required to get feature flags and payloads \u2014 pass it explicitly or use withContext()"),{featureFlags:{},featureFlagPayloads:{}};if(this.disabled)return this._logger.warn("The client is disabled"),{featureFlags:{},featureFlagPayloads:{}};let{groups:o,disableGeoip:s,flagKeys:a}=i||{},{onlyEvaluateLocally:c,personProperties:u,groupProperties:l}=i||{},p=this.addLocalPersonAndGroupProperties(n,o,u,l);u=p.allPersonProperties,l=p.allGroupProperties;let f=this.createFeatureFlagEvaluationContext(n,o,this.personPropertiesForLocalEvaluation(n,u),l);c==null&&(c=this.options.strictLocalEvaluation??!1);let d=await this.featureFlagsPoller?.getAllFlagsAndPayloads(f,a),m={},g={},A=!0;if(d&&(m=d.response,g=d.payloads,A=d.fallbackToFlags),A&&!c){let y=await super.getFeatureFlagsAndPayloadsStateless(f.distinctId,f.groups,u,l,s,a);m={...m,...y.flags||{}},g={...g,...y.payloads||{}}}return this._flagOverrides!==void 0&&(m={...m,...this._flagOverrides}),this._payloadOverrides!==void 0&&(g={...g,...this._payloadOverrides}),{featureFlags:m,featureFlagPayloads:g}}async evaluateFlags(t,r){let{distinctId:n,options:i}=this._resolveDistinctId(t,r);if(!n)return this._logger.warn("[PostHog] distinctId is required to evaluate feature flags \u2014 pass it explicitly or use withContext()"),new e1e({host:this._getFeatureFlagEvaluationsHost(),distinctId:"",flags:{}});if(this.disabled)return this._logger.warn("The client is disabled"),new e1e({host:this._getFeatureFlagEvaluationsHost(),distinctId:n,flags:{}});let{groups:o,disableGeoip:s}=i||{},a=i?.flagKeys??void 0;if(a?.length===0)return new e1e({host:this._getFeatureFlagEvaluationsHost(),distinctId:n,groups:o,disableGeoip:s,flags:{}});let{onlyEvaluateLocally:c,personProperties:u,groupProperties:l}=i||{},p=this.addLocalPersonAndGroupProperties(n,o,u,l);u=p.allPersonProperties,l=p.allGroupProperties;let f=this.createFeatureFlagEvaluationContext(n,o,this.personPropertiesForLocalEvaluation(n,u),l);c==null&&(c=this.options.strictLocalEvaluation??!1);let d=a?new Set(a):void 0,m={},g,A,y=!1,I=!1,x=await this.featureFlagsPoller?.getAllFlagsAndPayloads(f,a),v=new Set;if(x)for(let[R,D]of Object.entries(x.response)){let O=this.featureFlagsPoller?.featureFlagsByKey[R];m[R]={key:R,enabled:D!==!1,variant:typeof D=="string"?D:void 0,payload:x.payloads[R],id:O?.id,version:void 0,reason:"Evaluated locally",locallyEvaluated:!0,hasExperiment:O?.has_experiment},v.add(R)}let w=d!==void 0&&Array.from(d).some(R=>this.featureFlagsPoller?.featureFlagsByKey[R]===void 0);if((x?x.fallbackToFlags||w:!0)&&!c){let R=await super.getFeatureFlagDetailsStateless(f.distinctId,f.groups,u,l,s,a);if(R){this._minimalFlagCalledEvents=R.minimalFlagCalledEvents===!0,g=R.requestId,A=R.evaluatedAt,y=!!R.errorsWhileComputingFlags,I=Array.isArray(R.quotaLimited)&&R.quotaLimited.includes("feature_flags");for(let[D,O]of Object.entries(R.flags)){if(v.has(D))continue;let M;if(O.metadata?.payload!==void 0)try{M=JSON.parse(O.metadata.payload)}catch{M=O.metadata.payload}m[D]={key:D,enabled:O.enabled,variant:O.variant,payload:M,id:O.metadata?.id,version:O.metadata?.version,reason:O.reason?.description??O.reason?.code,locallyEvaluated:!1,hasExperiment:O.metadata?.has_experiment}}}}if(this._flagOverrides!==void 0)for(let[R,D]of Object.entries(this._flagOverrides)){if(D===void 0){delete m[R];continue}let O=m[R];m[R]={key:R,enabled:D!==!1,variant:typeof D=="string"?D:void 0,payload:O?.payload,id:O?.id,version:O?.version,reason:O?.reason,locallyEvaluated:O?.locallyEvaluated??!1,hasExperiment:O?.hasExperiment}}if(this._payloadOverrides!==void 0)for(let[R,D]of Object.entries(this._payloadOverrides)){let O=m[R];O&&(m[R]={...O,payload:D})}if(d!==void 0)for(let R of Object.keys(m))d.has(R)||delete m[R];return new e1e({host:this._getFeatureFlagEvaluationsHost(),distinctId:n,groups:o,disableGeoip:s,flags:m,requestId:g,evaluatedAt:A,flagDefinitionsLoadedAt:this.featureFlagsPoller?.getFlagDefinitionsLoadedAt(),errorsWhileComputing:y,quotaLimited:I})}_shouldSendMinimalFlagCalledEvent(t,r){return t==="$feature_flag_called"&&this._minimalFlagCalledEvents&&r.$feature_flag_has_experiment===!1}_captureFlagCalledEventIfNeeded(t){let{distinctId:r,key:n,response:i,groups:o,disableGeoip:s,properties:a}=t,c=o&&Object.keys(o).length>0?`_${JSON.stringify(Object.entries(o).sort(([l],[p])=>l<p?-1:l>p?1:0))}`:"",u=`${n}_${i}${c}`;r in this.distinctIdHasSentFlagCalls&&this.distinctIdHasSentFlagCalls[r].has(u)||(Object.keys(this.distinctIdHasSentFlagCalls).length>=this.maxCacheSize&&(this.distinctIdHasSentFlagCalls={}),this.distinctIdHasSentFlagCalls[r]instanceof Set?this.distinctIdHasSentFlagCalls[r].add(u):this.distinctIdHasSentFlagCalls[r]=new Set([u]),this.capture({distinctId:r,event:"$feature_flag_called",properties:a,groups:o,disableGeoip:s}))}_getFeatureFlagEvaluationsHost(){return this._featureFlagEvaluationsHost||(this._featureFlagEvaluationsHost={captureFlagCalledEventIfNeeded:t=>this._captureFlagCalledEventIfNeeded(t),logWarning:t=>{this.options.featureFlagsLogWarnings!==!1&&console.warn(`[PostHog] ${t}`)}}),this._featureFlagEvaluationsHost}groupIdentify({groupType:t,groupKey:r,properties:n,distinctId:i,disableGeoip:o}){this._sendPreparedEvent("capture",{distinctId:i||`$${t}_${r}`,event:"$groupidentify",properties:{$group_type:t,$group_key:r,$group_set:n||{}},disableGeoip:o},!1,{includeContextProperties:!1})}async groupIdentifyImmediate({groupType:t,groupKey:r,properties:n,distinctId:i,disableGeoip:o}){await this._sendPreparedEvent("capture",{distinctId:i||`$${t}_${r}`,event:"$groupidentify",properties:{$group_type:t,$group_key:r,$group_set:n||{}},disableGeoip:o},!0,{includeContextProperties:!1})}async reloadFeatureFlags(){await this.featureFlagsPoller?.loadFeatureFlags(!0)}overrideFeatureFlags(t){let r=n=>Object.fromEntries(n.map(i=>[i,!0]));if(t===!1){this._flagOverrides=void 0,this._payloadOverrides=void 0;return}if(Array.isArray(t)){this._flagOverrides=r(t);return}if(this._isFeatureFlagOverrideOptions(t)){"flags"in t&&(t.flags===!1?this._flagOverrides=void 0:Array.isArray(t.flags)?this._flagOverrides=r(t.flags):t.flags!==void 0&&(this._flagOverrides={...t.flags})),"payloads"in t&&(t.payloads===!1?this._payloadOverrides=void 0:t.payloads!==void 0&&(this._payloadOverrides={...t.payloads}));return}this._flagOverrides={...t}}_isFeatureFlagOverrideOptions(t){if(typeof t!="object"||t===null||Array.isArray(t))return!1;let r=t;if("flags"in r){let n=r.flags;if(n===!1||Array.isArray(n)||typeof n=="object"&&n!==null)return!0}if("payloads"in r){let n=r.payloads;if(n===!1||typeof n=="object"&&n!==null)return!0}return!1}withContext(t,r,n){return this.context?this.context.run(t,r,n):r()}getContext(){return this.context?.get()}enterContext(t,r){this.context?.enter(t,r)}async _shutdown(t){let r=Date.now()+(t??3e4),n=this._consumeWaitUntilCycle();await this.featureFlagsPoller?.stopPoller(t),this.errorTracking.shutdown(),this._metrics&&(await XSe(this._metrics.flush().catch(()=>{}),Math.max(0,r-Date.now())),this._metrics.reset()),this._traces&&(await XSe(this._traces.flush().catch(()=>{}),Math.max(0,r-Date.now())),this._traces.reset());try{return await super._shutdown(Math.max(0,r-Date.now()))}finally{this.distinctIdHasSentFlagCalls={},n?.()}}async _requestRemoteConfigPayload(t){if(this.disabled||!this.apiKey||!this.options.personalApiKey)return;let r=`${this.host}/api/projects/@current/feature_flags/${t}/remote_config?token=${encodeURIComponent(this.apiKey)}`,n={method:"GET",headers:{...this.getCustomHeaders(),"Content-Type":"application/json",Authorization:`Bearer ${this.options.personalApiKey}`}},i=null;if(this.options.requestTimeout&&typeof this.options.requestTimeout=="number"){let o=new AbortController;i=RN(()=>{o.abort()},this.options.requestTimeout),n.signal=o.signal}try{return await this.fetch(r,n)}catch(o){this._events.emit("error",o);return}finally{i&&clearTimeout(i)}}extractPropertiesFromEvent(t,r){if(!t)return{personProperties:{},groupProperties:{}};let n={},i={};for(let[o,s]of Object.entries(t))if(Drl(s)&&r&&o in r){let a={};for(let[c,u]of Object.entries(s))a[String(c)]=String(u);i[String(o)]=a}else n[String(o)]=String(s);return{personProperties:n,groupProperties:i}}async getFeatureFlagsForEvent(t,r,n,i){if(this.disabled||!this.apiKey)return void this._logger.warn("The client is disabled");let o=i?.personProperties||{},s=i?.groupProperties||{},a=i?.flagKeys;if(i?.onlyEvaluateLocally??this.options.strictLocalEvaluation??!1)if((this.featureFlagsPoller?.featureFlags?.length||0)>0){let u={};for(let[l,p]of Object.entries(r||{}))u[l]=String(p);return await this.getAllFlags(t,{groups:u,personProperties:o,groupProperties:s,disableGeoip:n,onlyEvaluateLocally:!0,flagKeys:a})}else return{};if((this.featureFlagsPoller?.featureFlags?.length||0)>0){let u={};for(let[l,p]of Object.entries(r||{}))u[l]=String(p);return await this.getAllFlags(t,{groups:u,personProperties:o,groupProperties:s,disableGeoip:n,onlyEvaluateLocally:!0,flagKeys:a})}return(await super.getFeatureFlagsStateless(t,r,o,s,n)).flags}addLocalPersonAndGroupProperties(t,r,n,i){let o={...n||{}},s={};if(r)for(let a of Object.keys(r))s[a]={$group_key:r[a],...i?.[a]||{}};return{allPersonProperties:o,allGroupProperties:s}}personPropertiesForLocalEvaluation(t,r){return{distinct_id:t,...r||{}}}createFeatureFlagEvaluationContext(t,r,n,i){return{distinctId:t,groups:r||{},personProperties:n||{},groupProperties:i||{},evaluationCache:{}}}captureException(t,r,n,i,o){if(!r5e.isPreviouslyCapturedError(t)){let s=new Error("PostHog syntheticException");this.addPendingPromise(r5e.buildEventMessage(this.getErrorPropertiesBuilder(),t,{syntheticException:s},r,n).then(a=>this._capturePreparedEvent({...a,uuid:i,flags:o},!1)))}}async captureExceptionImmediate(t,r,n,i){if(!r5e.isPreviouslyCapturedError(t)){let o=new Error("PostHog syntheticException");return this.addPendingPromise(r5e.buildEventMessage(this.getErrorPropertiesBuilder(),t,{syntheticException:o},r,n).then(s=>this.captureImmediate({...s,flags:i})))}}async prepareEventMessage(t){return this._prepareEventMessage(t)}async _prepareEventMessage(t,r={}){let{distinctId:n,event:i,properties:o,groups:s,flags:a,sendFeatureFlags:c,timestamp:u,disableGeoip:l,uuid:p}=t,f=this.context?.get(),d=r.includeContextProperties??!0,m=n||f?.distinctId,g=d?{...this.props,...f?.properties||{},...o||{}}:{...o||{}};m||(m=BN(),g.$process_person_profile=!1),d&&f?.sessionId&&!g.$session_id&&(g.$session_id=f.sessionId);let A=this._shouldSendMinimalFlagCalledEvent(i,g)?xHt(g):g,y=this._runBeforeSend({distinctId:m,event:i,properties:A,groups:s,flags:a,sendFeatureFlags:c,timestamp:u,disableGeoip:l,uuid:p});if(!y)return Promise.reject(null);let I=await Promise.resolve().then(async()=>{if(a)return c&&console.warn("[PostHog] Both `flags` and `sendFeatureFlags` were passed to capture(); using `flags` and ignoring `sendFeatureFlags`."),a._getEventProperties();if(c){ain("sendFeatureFlags","`sendFeatureFlags` is deprecated and will be removed in a future major version. Pass a `flags` snapshot from `posthog.evaluateFlags(...)` instead \u2014 it avoids a second `/flags` request per capture and guarantees the event carries the exact flag values your code branched on.");let x=typeof c=="object"?c:void 0,v=await this.getFeatureFlagsForEvent(y.distinctId,s,l,x);return ssh(v)}return{}}).catch(()=>({})).then(x=>{let v=y.groups||s;return{...x,...y.properties||{},...v!==void 0&&Object.keys(v).length>0?{$groups:v}:{}}});return y.event==="$pageview"&&this.options.__preview_capture_bot_pageviews&&typeof I.$raw_user_agent=="string"&&Frl(I.$raw_user_agent,this.options.custom_blocked_useragents||[])&&(y.event="$bot_pageview",I.$browser_type="bot"),{distinctId:y.distinctId,event:y.event,properties:I,options:{timestamp:y.timestamp,disableGeoip:y.disableGeoip,uuid:y.uuid}}}_runBeforeSend(t){let r=this.options.before_send;if(!r)return t;let n=Array.isArray(r)?r:[r],i=t;for(let o of n)try{if(i=o(i),!i)return this._logger.info(`Event '${t.event}' was rejected in beforeSend function`),null;if(!i.properties||Object.keys(i.properties).length===0){let s=`Event '${i.event}' has no properties after beforeSend function, this is likely an error.`;this._logger.warn(s)}}catch(s){return this._logger.error(`Error in before_send function for event '${t.event}':`,s),null}return i}};var Dil=require("async_hooks"),uin=class{constructor(){this.storage=new Dil.AsyncLocalStorage}get(){return this.storage.getStore()}run(t,r,n){return this.storage.run(this.resolve(t,n),r)}enter(t,r){this.storage.enterWith(this.resolve(t,r))}resolve(t,r){if(r?.fresh===!0)return t;let n=this.get()||{};return{distinctId:t.distinctId??n.distinctId,sessionId:t.sessionId??n.sessionId,properties:{...n.properties||{},...t.properties||{}}}}};var kil=require("async_hooks"),lin=class{active(){return this._storage.getStore()}with(t,r){return this._storage.run(t,r)}constructor(){this._storage=new kil.AsyncLocalStorage}};var Fil=require("zlib"),Nil=require("util"),ash=(0,Nil.promisify)(Fil.gzip);async function jil(e,t=!0){try{let r=await ash(e);return new Uint8Array(r)}catch(r){return t&&console.error("Failed to gzip compress data",r),null}}var pin=require("os");function zil(){let e,t;try{e=(0,pin.platform)(),t=(0,pin.release)()}catch{}return gYo(e,t)}var Qil="posthog-node";function csh(e,{organization:t,projectId:r,prefix:n,severityAllowList:i=["error"],sendExceptionsToPostHog:o=!0}={}){return s=>{if(!(i==="*"||i.includes(s.level)))return s;s.tags||(s.tags={});let c=s.tags[jYo.POSTHOG_ID_TAG];if(c===void 0)return s;let u=e.options.host??"https://us.i.posthog.com",l=new URL(`/project/${e.apiKey}/person/${c}`,u).toString();s.tags["PostHog Person URL"]=l;let p=s.exception?.values||[],f=p.map(g=>({...g,stacktrace:g.stacktrace?{...g.stacktrace,type:"raw",frames:(g.stacktrace.frames||[]).map(A=>({...A,platform:"node:javascript"}))}:void 0})),d={$exception_message:p[0]?.value||s.message,$exception_type:p[0]?.type,$exception_level:s.level,$exception_list:f,$sentry_event_id:s.event_id,$sentry_exception:s.exception,$sentry_exception_message:p[0]?.value||s.message,$sentry_exception_type:p[0]?.type,$sentry_tags:s.tags},m=eO.getInjectedReleaseId();return m&&(d.$release_id=m),t&&r&&(d.$sentry_url=(n||"https://sentry.io/organizations/")+t+"/issues/?project="+r+"&query="+s.event_id),o&&e.capture({event:"$exception",distinctId:c,properties:d}),s}}var jYo=class{static{this.POSTHOG_ID_TAG="posthog_distinct_id"}constructor(t,r,n,i,o){this.name=Qil,this.name=Qil,this.setupOnce=function(s,a){let c=a()?.getClient()?.getDsn()?.projectId;s(csh(t,{organization:r,projectId:c,prefix:n,severityAllowList:i,sendExceptionsToPostHog:o??!0}))}}};var cne=class extends cin{getLibraryId(){return"posthog-node"}compressPayload(t){return jil(t,this.isDebug)}initializeContext(){return new uin}initializeSpanContextManager(){return new lin}hostResourceAttributes(){return zil()}createErrorPropertiesBuilder(){return new eO.ErrorPropertiesBuilder([new eO.EventCoercer,new eO.ErrorCoercer,new eO.ObjectCoercer,new eO.StringCoercer,new eO.PrimitiveCoercer],eO.createStackParser("node:javascript",eO.nodeStackLineParser),[Trl(),t=>lil(t,void 0,this._logger),mil()])}};function ush(e){return e==null||!e.enabled?!1:e.variant==null||e.variant==="true"}var fin=class{isEnabled(){return Promise.resolve(!1)}getCachedValue(){}},lsh=3e3,din=class{evaluator;environment;pending=new Map;resolved=new Map;constructor({environment:t,posthogApiKey:r,evaluator:n}){this.environment=t,this.evaluator=n??new cne(r??"",{featureFlagsRequestTimeoutMs:lsh})}isEnabled(t,r){let n=Mil(t,r),i=this.pending.get(n);if(i!=null)return i;let o=this.evaluateAndRemember(t,r,n);return this.pending.set(n,o),o}async evaluateAndRemember(t,r,n){let i=await this.evaluate(t,r);return this.resolved.set(n,i),i}getCachedValue(t,r){return this.resolved.get(Mil(t,r))}async evaluate(t,r){let{org:n}=r,i=fsh(r,this.environment);try{let o=await this.evaluator.getFeatureFlagResult(t,psh(n),{personProperties:i,groups:{organization:n},groupProperties:{organization:i},sendFeatureFlagEvents:!1});return ush(o)}catch{return!1}}};function psh(e){return`org:${e}`}function fsh({org:e,generator:t,language:r},n){return{org:e,environment:n,...t!=null?{generator:t}:{},...r!=null?{language:r}:{}}}function Mil(e,{org:t,generator:r,language:n}){return JSON.stringify([e,t,r??null,n??null])}var zYo;function min(){return zYo==null&&(zYo=dsh()),zYo}function dsh(){let e="phc_yQgAEdJJkVpI24NdSRID2mor1x1leRpDoC9yZ9mfXal";return e==null||e.trim().length===0?new fin:new din({posthogApiKey:e,environment:TJ()})}var hin=class{posthog;constructor({posthogApiKey:t}){this.posthog=new cne(t,{isServer:!1})}async identify(){}async sendEvent(t){t.orgId!=null&&this.posthog.capture({distinctId:t.orgId,event:"CLI",properties:{...t,...t.properties,version:"5.153.0",usingAccessToken:!0,cliReleaseEnvironment:TJ(),...mpe()}})}sendAutomationEvent(t){this.posthog.capture({distinctId:t.distinctId,event:t.event,properties:{...t.properties,cliReleaseEnvironment:TJ()}})}async flush(){try{await Promise.race([this.posthog.flush(),new Promise(t=>setTimeout(t,3e3))])}catch{}}};var GHt=class{async sendEvent(){}async sendAutomationEvent(){}async identify(){}async flush(){}};Rd();er();var uft=require("fs/promises"),Lil=require("os"),_il=require("path");LUe();var msh="id",hsh=".fern",qHt=class{posthog;userId;token;constructor({token:t,posthogApiKey:r}){this.posthog=new cne(r,{isServer:!1}),this.userId=t==null?void 0:P9o(t),this.token=t}async identify(){this.userId!=null&&this.posthog.alias({distinctId:this.userId,alias:await this.getPersistedDistinctId()})}async sendEvent(t){let r=await this.getUserEmail();this.posthog.capture({distinctId:this.userId??await this.getPersistedDistinctId(),event:"CLI",properties:{version:"5.153.0",...t,...t.properties,usingAccessToken:!1,cliReleaseEnvironment:TJ(),agent:yWr(),...r!=null?{userEmail:r}:{},...mpe()}})}sendAutomationEvent(t){this.posthog.capture({distinctId:t.distinctId,event:t.event,properties:{...t.properties,cliReleaseEnvironment:TJ()}})}async flush(){try{await Promise.race([this.posthog.flush(),new Promise(t=>setTimeout(t,3e3))])}catch{}}userEmail;async getUserEmail(){if(this.userEmail!==null){if(this.userEmail!=null)return this.userEmail;if(this.token==null){this.userEmail=null;return}try{let t=await Hf({token:this.token.value}).user.getMyself();if(t.ok&&t.body.email!=null)return this.userEmail=t.body.email,this.userEmail}catch{}this.userEmail=null}}persistedDistinctId;async getPersistedDistinctId(){if(this.persistedDistinctId==null){let t=VS(),r=ke(_t.of((0,Lil.homedir)()),be.of(hsh),be.of(msh));try{await Wt(r)?this.persistedDistinctId=(await(0,uft.readFile)(r)).toString():(await(0,uft.mkdir)((0,_il.dirname)(r),{recursive:!0}),await(0,uft.writeFile)(r,t),this.persistedDistinctId=t)}catch{this.persistedDistinctId=t}}return this.persistedDistinctId}};var QYo;async function WHt(){return QYo==null&&(QYo=await gsh()),QYo}async function gsh(){try{let e="phc_yQgAEdJJkVpI24NdSRID2mor1x1leRpDoC9yZ9mfXal",t=process.env.FERN_DISABLE_TELEMETRY==="true";if(e==null||e.trim().length===0||t)return new GHt;let r=await Elt();return r!=null?new qHt({token:r,posthogApiKey:e}):await AM()!=null?new hin({posthogApiKey:e}):new qHt({token:void 0,posthogApiKey:e})}catch{return new GHt}}Sn();Ot();Nt();a8();var HHt=Ae(require("process"),1);LXe();var Gil=Ae(o6o(),1),qil=Ae(Vil(),1);function tO(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=nH(e),e.length===0))return 0;e=e.replace((0,qil.default)()," ");let r=t.ambiguousIsNarrow?1:2,n=0;for(let i of e){let o=i.codePointAt(0);if(o<=31||o>=127&&o<=159||o>=768&&o<=879)continue;switch(Gil.default.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}Sn();function gin(e){let t=0;for(let r of e.split(`
|
|
3453
3453
|
`))t=Math.max(t,tO(r));return t}var pol=Ae(LYo(),1);var ysh=/[\p{Lu}]/u,bsh=/[\p{Ll}]/u,Kil=/^[\p{Lu}](?![\p{Lu}])/gu,Xil=/([\p{Alpha}\p{N}_]|$)/u,_Yo=/[_.\- ]+/,Esh=new RegExp("^"+_Yo.source),Jil=new RegExp(_Yo.source+Xil.source,"gu"),Yil=new RegExp("\\d+"+Xil.source,"gu"),Ish=(e,t,r,n)=>{let i=!1,o=!1,s=!1,a=!1;for(let c=0;c<e.length;c++){let u=e[c];a=c>2?e[c-3]==="-":!0,i&&ysh.test(u)?(e=e.slice(0,c)+"-"+e.slice(c),i=!1,s=o,o=!0,c++):o&&s&&bsh.test(u)&&(!a||n)?(e=e.slice(0,c-1)+"-"+e.slice(c-1),s=o,o=!1,i=!0):(i=t(u)===u&&r(u)!==u,s=o,o=r(u)===u&&t(u)!==u)}return e},vsh=(e,t)=>(Kil.lastIndex=0,e.replace(Kil,r=>t(r))),Csh=(e,t)=>(Jil.lastIndex=0,Yil.lastIndex=0,e.replace(Jil,(r,n)=>t(n)).replace(Yil,r=>t(r)));function UYo(e,t){if(!(typeof e=="string"||Array.isArray(e)))throw new TypeError("Expected the input to be `string | string[]`");if(t={pascalCase:!1,preserveConsecutiveUppercase:!1,...t},Array.isArray(e)?e=e.map(o=>o.trim()).filter(o=>o.length).join("-"):e=e.trim(),e.length===0)return"";let r=t.locale===!1?o=>o.toLowerCase():o=>o.toLocaleLowerCase(t.locale),n=t.locale===!1?o=>o.toUpperCase():o=>o.toLocaleUpperCase(t.locale);return e.length===1?_Yo.test(e)?"":t.pascalCase?n(e):r(e):(e!==r(e)&&(e=Ish(e,r,n,t.preserveConsecutiveUppercase)),e=e.replace(Esh,""),e=t.preserveConsecutiveUppercase?vsh(e,r):r(e),t.pascalCase&&(e=n(e.charAt(0))+e.slice(1)),Csh(e,n))}var WYo=Ae($il(),1);LXe();var eol=(e=0)=>t=>`\x1B[${t+e}m`,tol=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,rol=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,bE={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},V5v=Object.keys(bE.modifier),Tsh=Object.keys(bE.color),Osh=Object.keys(bE.bgColor),G5v=[...Tsh,...Osh];function Psh(){let e=new Map;for(let[t,r]of Object.entries(bE)){for(let[n,i]of Object.entries(r))bE[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=bE[n],e.set(i[0],i[1]);Object.defineProperty(bE,t,{value:r,enumerable:!1})}return Object.defineProperty(bE,"codes",{value:e,enumerable:!1}),bE.color.close="\x1B[39m",bE.bgColor.close="\x1B[49m",bE.color.ansi=eol(),bE.color.ansi256=tol(),bE.color.ansi16m=rol(),bE.bgColor.ansi=eol(10),bE.bgColor.ansi256=tol(10),bE.bgColor.ansi16m=rol(10),Object.defineProperties(bE,{rgbToAnsi256:{value(t,r,n){return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(t){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(o=>o+o).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>bE.rgbToAnsi256(...bE.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,n,i;if(t>=232)r=((t-232)*10+8)/255,n=r,i=r;else{t-=16;let a=t%36;r=Math.floor(t/36)/5,n=Math.floor(a/6)/5,i=a%6/5}let o=Math.max(r,n,i)*2;if(o===0)return 30;let s=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(r));return o===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(t,r,n)=>bE.ansi256ToAnsi(bE.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>bE.ansi256ToAnsi(bE.hexToAnsi256(t)),enumerable:!1}}),bE}var Bsh=Psh(),nol=Bsh;var Ain=new Set(["\x1B","\x9B"]),Rsh=39,GYo="\x07",sol="[",Dsh="]",aol="m",qYo=`${Dsh}8;;`,iol=e=>`${Ain.values().next().value}${sol}${e}${aol}`,ool=e=>`${Ain.values().next().value}${qYo}${e}${GYo}`,ksh=e=>e.split(" ").map(t=>tO(t)),VYo=(e,t,r)=>{let n=[...t],i=!1,o=!1,s=tO(nH(e[e.length-1]));for(let[a,c]of n.entries()){let u=tO(c);if(s+u<=r?e[e.length-1]+=c:(e.push(c),s=0),Ain.has(c)&&(i=!0,o=n.slice(a+1).join("").startsWith(qYo)),i){o?c===GYo&&(i=!1,o=!1):c===aol&&(i=!1);continue}s+=u,s===r&&a<n.length-1&&(e.push(""),s=0)}!s&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},Fsh=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(tO(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},Nsh=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let n="",i,o,s=ksh(e),a=[""];for(let[u,l]of e.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let p=tO(a[a.length-1]);if(u!==0&&(p>=t&&(r.wordWrap===!1||r.trim===!1)&&(a.push(""),p=0),(p>0||r.trim===!1)&&(a[a.length-1]+=" ",p++)),r.hard&&s[u]>t){let f=t-p,d=1+Math.floor((s[u]-f-1)/t);Math.floor((s[u]-1)/t)<d&&a.push(""),VYo(a,l,t);continue}if(p+s[u]>t&&p>0&&s[u]>0){if(r.wordWrap===!1&&p<t){VYo(a,l,t);continue}a.push("")}if(p+s[u]>t&&r.wordWrap===!1){VYo(a,l,t);continue}a[a.length-1]+=l}r.trim!==!1&&(a=a.map(u=>Fsh(u)));let c=[...a.join(`
|
|
3454
3454
|
`)];for(let[u,l]of c.entries()){if(n+=l,Ain.has(l)){let{groups:f}=new RegExp(`(?:\\${sol}(?<code>\\d+)m|\\${qYo}(?<uri>.*)${GYo})`).exec(c.slice(u).join(""))||{groups:{}};if(f.code!==void 0){let d=Number.parseFloat(f.code);i=d===Rsh?void 0:d}else f.uri!==void 0&&(o=f.uri.length===0?void 0:f.uri)}let p=nol.codes.get(Number(i));c[u+1]===`
|
|
3455
3455
|
`?(o&&(n+=ool("")),i&&p&&(n+=iol(p))):l===`
|
|
@@ -4109,7 +4109,7 @@ ${qe.stack}`),!1}};await R();let D=v.apiWorkspaces.flatMap(Ee=>Ee.getAbsoluteFil
|
|
|
4109
4109
|
`)},ae=[],ue,Te=!1;O.on("all",(Ee,Ne)=>{n.logger.info(me.dim(`[${Ee}] ${Ne}`)),!Te&&(ae.push(_t.of(Ne)),ue!=null&&clearTimeout(ue),ue=setTimeout(()=>{(async()=>{Te=!0;try{let qe=B.getFilesToReload(ae);await R(qe)&&await Be()}finally{ae.length=0,Te=!1}})()},r4g))}),n.logger.info(`Docs preview server (Astro) ready on http://localhost:${i}${m}`),await ie}async function a4g({bundlePath:e,forceDownload:t,cacheDir:r,context:n}){if(e!=null)return n.logger.info(`Using Astro bundle from path: ${e}`),await $yp(_t.of(e));if(t){let a=MFe({astro:!0,cacheDir:r});await Wt(a)&&(n.logger.info("Force download requested. Deleting cached Astro bundle..."),await(0,Sxi.rm)(a,{recursive:!0}))}let i="https://prod-local-preview-astro-bundle.s3.amazonaws.com/";if(i==null)throw new S({message:"Failed to connect to the docs preview server. Please contact support@buildwithfern.com",code:S.Code.InternalError});let o=Cae({astro:!0,cacheDir:r});if((await SGe({bucketUrl:i,logger:n.logger,preferCached:!0,astro:!0,tryTar:!0,cacheDir:r})).type==="failure")if(await Wt(o))n.logger.warn("Falling back to cached Astro bundle...");else throw new S({message:"Failed to download the Astro docs preview bundle. Please reach out to support@buildwithfern.com.",code:S.Code.NetworkError});return await $yp(o)}async function $yp(e){let t=ke(e,be.of(i4g)),r=o4g;if(await Wt(t)){let i=JSON.parse(await(0,Sxi.readFile)(t,"utf-8"));typeof i.entry=="string"&&(r=i.entry)}let n=ke(e,be.of(r));if(!await Wt(n))throw new S({message:`${e} does not contain the Astro preview server (missing ${r}).`,code:S.Code.UserError});return{root:e,entry:n}}var c4g="_fern-files";function u4g({rendererPort:e,rendererHost:t,mirrorPort:r,basepath:n,reloadClients:i}){let o=`${n}/${c4g}/`;return CFs.default.createServer((s,a)=>{if(s.url===tbp){a.writeHead(200,{"content-type":"text/event-stream","cache-control":"no-store",connection:"keep-alive"}),a.write(`: connected
|
|
4110
4110
|
|
|
4111
4111
|
`),i.add(a),s.on("close",()=>i.delete(a));return}let c=s.url!=null&&s.url.startsWith(o),u=CFs.default.request(c?{host:"127.0.0.1",port:r,method:s.method,path:`/files/${s.url?.slice(o.length)??""}`,headers:s.headers}:{host:"127.0.0.1",port:e,method:s.method,path:s.url,headers:{...s.headers,[ebp]:t}},l=>{let p={...l.headers};if(!((p["content-type"]??"").includes("text/html")&&p["content-encoding"]==null)){a.writeHead(l.statusCode??502,p),l.pipe(a);return}let d=[];l.on("data",m=>d.push(m)),l.on("end",()=>{let m=Buffer.concat(d).toString("utf-8"),g=m.lastIndexOf("</body>"),A=g>=0?`${m.slice(0,g)}${Zyp}${m.slice(g)}`:`${m}${Zyp}`,y=Buffer.from(A,"utf-8");delete p["transfer-encoding"],p["content-length"]=y.byteLength.toString(),a.writeHead(l.statusCode??502,p),a.end(y)}),l.on("error",()=>a.destroy())});u.on("error",l=>{a.headersSent||a.writeHead(502,{"content-type":"text/plain"}),a.end(`Astro preview server unavailable: ${l.message}
|
|
4112
|
-
`)}),s.pipe(u)})}function l4g(){return new Promise((e,t)=>{let r=xFs.default.createServer();r.once("error",t),r.listen(0,"127.0.0.1",()=>{let n=r.address(),i=typeof n=="object"&&n!=null?n.port:void 0;r.close(()=>i!=null?e(i):t(new Error("could not allocate a port")))})})}function p4g(e,t,r){let n=Date.now()+r;return new Promise((i,o)=>{let s=!1;t.on("exit",c=>{s=!0,o(new Error(`Astro preview server exited with code ${c} before becoming ready`))});let a=()=>{if(s)return;if(Date.now()>n){o(new Error("timed out waiting for the Astro preview server to become ready"));return}let c=xFs.default.connect(e,"127.0.0.1");c.once("connect",()=>{c.destroy(),i()}),c.once("error",()=>{c.destroy(),setTimeout(a,200)})};a()})}Nt();var ibp=/^[a-z0-9-]+-preview-[a-z0-9-]+\.docs\.buildwithfern\.com$/i,rbp="docs.buildwithfern.com",nbp=62;function Yqe(e){let t=e.toLowerCase().trim();t.startsWith("https://")?t=t.slice(8):t.startsWith("http://")&&(t=t.slice(7));let r=t.indexOf("/");return r!==-1&&(t=t.slice(0,r)),ibp.test(t)}function obp(e){let t=e.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"");return t.length===0?"default":t}function knr({orgId:e,previewId:t}){let r=obp(t),n=`${e}-preview-${r}.${rbp}`;if(n.length<=nbp)return n;let i=`${e}-preview-`,o=nbp-i.length;if(o<8)throw new S({message:`Organization name "${e}" is too long to generate a valid preview URL`,code:S.Code.ValidationError});let a=r.slice(0,o).replace(/-+$/,"");return`${i}${a}.${rbp}`}Ot();NE();Tm();er();l0();Nt();Sn();var ZFs=require("child_process"),A0p=Ae(SFs(),1),$Fs=Ae(Dnr(),1),e2s=Ae(require("fs"),1),r2s=require("fs/promises"),y0p=Ae(require("http"),1),b0p=Ae(require("os"),1),Vxi=Ae(require("path"),1);_xi();NE();er();var KFs=require("fs/promises");async function JFs(e,t){let r=new Map,{docsDefinition:n,translationPages:i,translationNavigationOverlays:o,translatedApiDefinitions:s,collectedFileIds:a,docsWorkspacePath:c,markdownFilesToPathName:u}=e,l=i!=null&&Object.keys(i).length>0,p=s!=null&&Object.keys(s).length>0;if(!l&&!p)return r;let f=n.config.translations?.defaultLocale,d=new Set([...Object.keys(i??{}),...Object.keys(s??{})]);for(let m of d){if(m===f)continue;let g=i?.[m]??{};try{let A=async le=>{let ie=Po(c,le),fe=Zn(c,be.of(`translations/${m}/${ie}`));return await Wt(fe)?fe:le},y=async le=>{let ie=await A(le),fe=await(0,KFs.readFile)(ie,"utf-8"),Se=fe.match(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/);return Se!=null?fe.slice(Se[0].length):fe},I=async le=>{let ie=await A(le);return(0,KFs.readFile)(ie,"utf-8")},x={};for(let[le,ie]of Object.entries(n.pages))ie!=null&&(x[le]=ie);for(let[le,ie]of Object.entries(g))try{let fe=x[le],Se=Zn(c,be.of(le)),{markdown:Be}=await WO({markdown:ie,absolutePathToFernFolder:c,absolutePathToMarkdownFile:Se,context:t,markdownLoader:y}),ae=await Oj({markdown:Be,absolutePathToFernFolder:c,absolutePathToMarkdownFile:Se,context:t,fileLoader:I}),ue=Pj({markdown:ae,absolutePathToFernFolder:c,absolutePathToMarkdownFile:Se,context:t}),Te=Fw(ue);Te=Ej(Te,a,u,{absolutePathToMarkdownFile:Se,absolutePathToFernFolder:c},t),x[le]={markdown:Te,rawMarkdown:Te,editThisPageUrl:fe?.editThisPageUrl,editThisPageLaunch:fe?.editThisPageLaunch}}catch(fe){t.logger.warn(`Failed to process translated page "${le}" for locale "${m}": ${String(fe)}. Falling back to base page.`)}let v=Jge(n.config.root,g,t),w=o?.[m],B=n.config.announcement,R=n.config.navbarLinks;w!=null&&(v=Yge(v,w),B=Xge(w)??B,w.navbarLinks!=null&&(R=w.navbarLinks));let D=n.apis,O=s?.[m],M=O,Y;if(O!=null&&v!=null){let le=_8e(v,D,O);le.size>0&&(t.logger.warn(`Translated API definition(s) [${Array.from(le).join(", ")}] for locale "${m}" diverge from the default-locale spec (e.g. changed OpenAPI tag names, operationIds, or paths, or a missing/added endpoint), so they can't be fully matched to the navigation tree. Serving the default-locale API for those (localized sidebar titles are still applied where they can be matched). For fully localized API reference content, translate only human-readable text and keep tag names/operationIds/paths identical to the base spec.`),M=Object.fromEntries(Object.entries(O).filter(([ie])=>!le.has(ie)))),Y=new Set(Object.keys(O).filter(ie=>!le.has(ie)))}let $=M!=null&&Object.keys(M).length>0?{...n.apis,...M}:n.apis;O!=null&&Object.keys(O).length>0&&v!=null&&(v=U8e(v,D,O,{rewritableApiIds:Y}));let se={...n,apis:$,pages:x,config:{...n.config,root:v,announcement:B,navbarLinks:R}};r.set(m,se),t.logger.debug(`Computed translated definition for locale "${m}"`+(O!=null?` (with ${Object.keys(O).length} translated API(s))`:""))}catch(A){t.logger.warn(`Failed to compute translation for locale "${m}": ${String(A)}`)}}return r}er();var Q7=require("fs/promises"),p0p=require("os"),XFs=Ae(require("path"),1),Q_g=".fern",M_g="logs",YFs=100*1024*1024;function L_g(){return"cli@5.
|
|
4112
|
+
`)}),s.pipe(u)})}function l4g(){return new Promise((e,t)=>{let r=xFs.default.createServer();r.once("error",t),r.listen(0,"127.0.0.1",()=>{let n=r.address(),i=typeof n=="object"&&n!=null?n.port:void 0;r.close(()=>i!=null?e(i):t(new Error("could not allocate a port")))})})}function p4g(e,t,r){let n=Date.now()+r;return new Promise((i,o)=>{let s=!1;t.on("exit",c=>{s=!0,o(new Error(`Astro preview server exited with code ${c} before becoming ready`))});let a=()=>{if(s)return;if(Date.now()>n){o(new Error("timed out waiting for the Astro preview server to become ready"));return}let c=xFs.default.connect(e,"127.0.0.1");c.once("connect",()=>{c.destroy(),i()}),c.once("error",()=>{c.destroy(),setTimeout(a,200)})};a()})}Nt();var ibp=/^[a-z0-9-]+-preview-[a-z0-9-]+\.docs\.buildwithfern\.com$/i,rbp="docs.buildwithfern.com",nbp=62;function Yqe(e){let t=e.toLowerCase().trim();t.startsWith("https://")?t=t.slice(8):t.startsWith("http://")&&(t=t.slice(7));let r=t.indexOf("/");return r!==-1&&(t=t.slice(0,r)),ibp.test(t)}function obp(e){let t=e.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"");return t.length===0?"default":t}function knr({orgId:e,previewId:t}){let r=obp(t),n=`${e}-preview-${r}.${rbp}`;if(n.length<=nbp)return n;let i=`${e}-preview-`,o=nbp-i.length;if(o<8)throw new S({message:`Organization name "${e}" is too long to generate a valid preview URL`,code:S.Code.ValidationError});let a=r.slice(0,o).replace(/-+$/,"");return`${i}${a}.${rbp}`}Ot();NE();Tm();er();l0();Nt();Sn();var ZFs=require("child_process"),A0p=Ae(SFs(),1),$Fs=Ae(Dnr(),1),e2s=Ae(require("fs"),1),r2s=require("fs/promises"),y0p=Ae(require("http"),1),b0p=Ae(require("os"),1),Vxi=Ae(require("path"),1);_xi();NE();er();var KFs=require("fs/promises");async function JFs(e,t){let r=new Map,{docsDefinition:n,translationPages:i,translationNavigationOverlays:o,translatedApiDefinitions:s,collectedFileIds:a,docsWorkspacePath:c,markdownFilesToPathName:u}=e,l=i!=null&&Object.keys(i).length>0,p=s!=null&&Object.keys(s).length>0;if(!l&&!p)return r;let f=n.config.translations?.defaultLocale,d=new Set([...Object.keys(i??{}),...Object.keys(s??{})]);for(let m of d){if(m===f)continue;let g=i?.[m]??{};try{let A=async le=>{let ie=Po(c,le),fe=Zn(c,be.of(`translations/${m}/${ie}`));return await Wt(fe)?fe:le},y=async le=>{let ie=await A(le),fe=await(0,KFs.readFile)(ie,"utf-8"),Se=fe.match(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/);return Se!=null?fe.slice(Se[0].length):fe},I=async le=>{let ie=await A(le);return(0,KFs.readFile)(ie,"utf-8")},x={};for(let[le,ie]of Object.entries(n.pages))ie!=null&&(x[le]=ie);for(let[le,ie]of Object.entries(g))try{let fe=x[le],Se=Zn(c,be.of(le)),{markdown:Be}=await WO({markdown:ie,absolutePathToFernFolder:c,absolutePathToMarkdownFile:Se,context:t,markdownLoader:y}),ae=await Oj({markdown:Be,absolutePathToFernFolder:c,absolutePathToMarkdownFile:Se,context:t,fileLoader:I}),ue=Pj({markdown:ae,absolutePathToFernFolder:c,absolutePathToMarkdownFile:Se,context:t}),Te=Fw(ue);Te=Ej(Te,a,u,{absolutePathToMarkdownFile:Se,absolutePathToFernFolder:c},t),x[le]={markdown:Te,rawMarkdown:Te,editThisPageUrl:fe?.editThisPageUrl,editThisPageLaunch:fe?.editThisPageLaunch}}catch(fe){t.logger.warn(`Failed to process translated page "${le}" for locale "${m}": ${String(fe)}. Falling back to base page.`)}let v=Jge(n.config.root,g,t),w=o?.[m],B=n.config.announcement,R=n.config.navbarLinks;w!=null&&(v=Yge(v,w),B=Xge(w)??B,w.navbarLinks!=null&&(R=w.navbarLinks));let D=n.apis,O=s?.[m],M=O,Y;if(O!=null&&v!=null){let le=_8e(v,D,O);le.size>0&&(t.logger.warn(`Translated API definition(s) [${Array.from(le).join(", ")}] for locale "${m}" diverge from the default-locale spec (e.g. changed OpenAPI tag names, operationIds, or paths, or a missing/added endpoint), so they can't be fully matched to the navigation tree. Serving the default-locale API for those (localized sidebar titles are still applied where they can be matched). For fully localized API reference content, translate only human-readable text and keep tag names/operationIds/paths identical to the base spec.`),M=Object.fromEntries(Object.entries(O).filter(([ie])=>!le.has(ie)))),Y=new Set(Object.keys(O).filter(ie=>!le.has(ie)))}let $=M!=null&&Object.keys(M).length>0?{...n.apis,...M}:n.apis;O!=null&&Object.keys(O).length>0&&v!=null&&(v=U8e(v,D,O,{rewritableApiIds:Y}));let se={...n,apis:$,pages:x,config:{...n.config,root:v,announcement:B,navbarLinks:R}};r.set(m,se),t.logger.debug(`Computed translated definition for locale "${m}"`+(O!=null?` (with ${Object.keys(O).length} translated API(s))`:""))}catch(A){t.logger.warn(`Failed to compute translation for locale "${m}": ${String(A)}`)}}return r}er();var Q7=require("fs/promises"),p0p=require("os"),XFs=Ae(require("path"),1),Q_g=".fern",M_g="logs",YFs=100*1024*1024;function L_g(){return"cli@5.153.0"}var r7e=class{logFilePath=null;initialized=!1;sessionStartTime;consoleLogger;constructor(){this.sessionStartTime=Date.now()}async initialize(t,r){if(this.initialized)return;this.consoleLogger=t;let n=r??ke(ke(_t.of((0,p0p.homedir)()),be.of(Q_g)),be.of(M_g));await Wt(n)||await(0,Q7.mkdir)(n,{recursive:!0});let o=`${new Date().toISOString().replace(/[:.]/g,"-")}.debug.log`;this.logFilePath=ke(n,be.of(o));let s=["================================================================================","Fern Docs Dev Debug Log",`Session started: ${new Date().toISOString()}`,`Log file: ${XFs.default.basename(this.logFilePath)}`,"================================================================================",""].join(`
|
|
4113
4113
|
`);await(0,Q7.writeFile)(this.logFilePath,s,"utf-8"),this.initialized=!0,this.enforceLogSizeLimit(n)}getLogFilePath(){return this.logFilePath}async writeEntry(t){if(!this.initialized||!this.logFilePath)return;let r=JSON.stringify(t)+`
|
|
4114
4114
|
`;try{await(0,Q7.appendFile)(this.logFilePath,r,"utf-8")}catch{}}async logFrontendMetrics(t){let r={timestamp:t.timestamp,source:t.source,level:t.level,eventType:this.getEventType(t.payload,t.isAggregate),isAggregate:t.isAggregate,data:t.payload};await this.writeEntry(r)}async logCliMetric(t,r="info"){let n={timestamp:t.timestamp,source:L_g(),level:r,eventType:t.type,data:{durationMs:t.durationMs,metadata:t.metadata}};await this.writeEntry(n)}async logCliMemory(){let t=process.memoryUsage(),r={type:"cli_memory",timestamp:new Date().toISOString(),metadata:{heapUsed:t.heapUsed,heapTotal:t.heapTotal,external:t.external,rss:t.rss,heapUsedMB:Math.round(t.heapUsed/1024/1024*100)/100,heapTotalMB:Math.round(t.heapTotal/1024/1024*100)/100,rssMB:Math.round(t.rss/1024/1024*100)/100}};await this.logCliMetric(r)}async logCliReloadStart(){let t={type:"cli_reload_start",timestamp:new Date().toISOString()};await this.logCliMetric(t)}async logCliReloadFinish(t,r){let n={type:"cli_reload_finish",timestamp:new Date().toISOString(),durationMs:t,metadata:r};await this.logCliMetric(n)}async logCliDocsGeneration(t,r){let n={type:"cli_docs_generation",timestamp:new Date().toISOString(),durationMs:t,metadata:r};await this.logCliMetric(n)}async logCliValidation(t,r){let n={type:"cli_validation",timestamp:new Date().toISOString(),durationMs:t,metadata:{success:r}};await this.logCliMetric(n)}async enforceLogSizeLimit(t){try{let n=(await(0,Q7.readdir)(t)).filter(c=>c.endsWith(".log")),i=[];for(let c of n){let u=XFs.default.join(t,c);try{let l=await(0,Q7.stat)(u);i.push({name:c,fullPath:u,size:l.size,mtimeMs:l.mtimeMs})}catch{}}let o=i.reduce((c,u)=>c+u.size,0),s=Math.round(o/1024/1024*100)/100,a=YFs/1024/1024;if(o<=YFs){this.consoleLogger?.debug(`Log directory size ${s} MB does not exceed ${a} MB cap`);return}this.consoleLogger?.info(`Rotating logs: total size ${s} MB exceeds ${a} MB cap`),i.sort((c,u)=>c.mtimeMs-u.mtimeMs);for(let c of i){if(o<=YFs)break;if(!(this.logFilePath!=null&&c.fullPath===this.logFilePath))try{await(0,Q7.unlink)(c.fullPath),o-=c.size}catch{}}}catch{}}getEventType(t,r){return r?"aggregate_summary":"type"in t&&typeof t.type=="string"?t.type:"unknown"}static isMetricsMessage(t){if(typeof t!="object"||t===null)return!1;let r=t;return r.type==="metrics"&&typeof r.timestamp=="string"&&typeof r.source=="string"}};var Uxi={"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET, POST, OPTIONS","Access-Control-Allow-Headers":"Content-Type"};function f0p(e){let t=__g();if(t==null)return;let{port:r,debugLogger:n,getDocsLoadResponse:i,extractLocaleFromPath:o}=e,s=new Map;function a(u){let l=JSON.stringify(u),p=[];for(let[f]of s)try{f.send(l)}catch{p.push(f)}for(let f of p){let d=s.get(f);d&&(clearInterval(d.pingInterval),s.delete(f))}}let c=t.serve({port:r,async fetch(u,l){if(u.method==="OPTIONS")return new Response(null,{status:204,headers:Uxi});let p=new URL(u.url);if(u.headers.get("upgrade")?.toLowerCase()==="websocket"){l.upgrade(u,{data:{connectionId:`${Date.now()}`}});return}if(u.method==="POST"&&p.pathname==="/v2/registry/docs/load-with-url")try{let d=await u.json(),m=o?.(d?.url);return new Response(JSON.stringify(i(m)),{headers:{"Content-Type":"application/json",...Uxi}})}catch{return new Response(JSON.stringify(i()),{headers:{"Content-Type":"application/json",...Uxi}})}let f=/^\/_local\/(.*)/.exec(p.pathname);return u.method==="GET"&&f!=null?new Response(t.file(`/${f[1]}`),{headers:Uxi}):new Response("Not Found",{status:404})},websocket:{open(u){let{connectionId:l}=u.data,p=setInterval(()=>{let f=s.get(u);if(!f)return;let d=Date.now();if(d-f.lastPong>9e4){u.close();return}try{u.send(JSON.stringify({type:"ping",timestamp:d}))}catch{u.close()}},3e4);s.set(u,{pingInterval:p,lastPong:Date.now()});try{u.send(JSON.stringify({type:"connected",connectionId:l}))}catch{}},message(u,l){try{let p=JSON.parse(l.toString());if(p.type==="pong"){let f=s.get(u);f&&(f.lastPong=Date.now())}else r7e.isMetricsMessage(p)&&n.logFrontendMetrics(p)}catch{}},close(u){let l=s.get(u);l&&(clearInterval(l.pingInterval),s.delete(u))}}});return{sendData:a,stop:u=>c.stop(u)}}function __g(){return globalThis.Bun}var d0p=require("fs"),m0p=Ae(require("path"),1),U_g=`"use strict";
|
|
4115
4115
|
|
|
@@ -4431,7 +4431,7 @@ ${n}
|
|
|
4431
4431
|
|
|
4432
4432
|
Add a 'docs:' section to your fern.yml to get started.`,code:S.Code.ConfigError});let i=n.docs.raw.libraries;if(i==null)throw new S({message:`No libraries configured in docs.yml.
|
|
4433
4433
|
|
|
4434
|
-
Add a 'libraries' section to configure library documentation.`,code:S.Code.ConfigError});let o=await t.getTokenOrPrompt();await t.verifyOrgAccess({organization:n.org,token:o});let s=n.docs.absoluteFilePath??n.absoluteFilePath??t.cwd,a=_t.of(bn(s)),c=new Fd({context:t,logLevel:Xn.Info});await Jor({libraries:i,library:r.library,docsDirectoryPath:a,orgId:n.org,tokenValue:o.value,context:c,wrapStep:AP,docsConfig:n.docs.raw})}};function s4s(e){let t=new o4s;li(e,"generate","[Beta] Generate MDX documentation from library source code. Requires 'libraries' config in docs.yml.",(r,n)=>t.handle(r,n),r=>r.option("library",{type:"string",description:"Name of a specific library defined in docs.yml to generate docs for"}))}function a4s(e){RA({cli:e,name:"md",subcommands:[s4s,P3s]})}Nt();function lBi(e,t,r,n,i,o){e.command(t,r,s=>{for(let a of o)a(s);return s.command("$0",!1,a=>{let c=a.version(!1);return i!=null?i(c):c},Von(n)),s.version(!1).usage(r)})}Ot();NE();Nt();Sn();Ot();Nt();var pBi=class{context;task;project;docsWorkspace;ossWorkspaces;token;constructor({context:t,task:r,project:n,docsWorkspace:i,ossWorkspaces:o,token:s}){this.context=t,this.task=r,this.project=n,this.docsWorkspace=i,this.ossWorkspaces=o,this.token=s}async publish({instanceUrl:t,preview:r,previewId:n,skipUpload:i}){let o=new Fd({context:this.context,task:this.task});try{let s=await anr({organization:this.project.config.organization,apiWorkspaces:this.project.apiWorkspaces,ossWorkspaces:this.ossWorkspaces,docsWorkspace:this.docsWorkspace,context:o,token:this.token,instanceUrl:t,preview:r,previewId:n,disableTemplates:void 0,skipUpload:i,cliVersion:"5.
|
|
4434
|
+
Add a 'libraries' section to configure library documentation.`,code:S.Code.ConfigError});let o=await t.getTokenOrPrompt();await t.verifyOrgAccess({organization:n.org,token:o});let s=n.docs.absoluteFilePath??n.absoluteFilePath??t.cwd,a=_t.of(bn(s)),c=new Fd({context:t,logLevel:Xn.Info});await Jor({libraries:i,library:r.library,docsDirectoryPath:a,orgId:n.org,tokenValue:o.value,context:c,wrapStep:AP,docsConfig:n.docs.raw})}};function s4s(e){let t=new o4s;li(e,"generate","[Beta] Generate MDX documentation from library source code. Requires 'libraries' config in docs.yml.",(r,n)=>t.handle(r,n),r=>r.option("library",{type:"string",description:"Name of a specific library defined in docs.yml to generate docs for"}))}function a4s(e){RA({cli:e,name:"md",subcommands:[s4s,P3s]})}Nt();function lBi(e,t,r,n,i,o){e.command(t,r,s=>{for(let a of o)a(s);return s.command("$0",!1,a=>{let c=a.version(!1);return i!=null?i(c):c},Von(n)),s.version(!1).usage(r)})}Ot();NE();Nt();Sn();Ot();Nt();var pBi=class{context;task;project;docsWorkspace;ossWorkspaces;token;constructor({context:t,task:r,project:n,docsWorkspace:i,ossWorkspaces:o,token:s}){this.context=t,this.task=r,this.project=n,this.docsWorkspace=i,this.ossWorkspaces=o,this.token=s}async publish({instanceUrl:t,preview:r,previewId:n,skipUpload:i}){let o=new Fd({context:this.context,task:this.task});try{let s=await anr({organization:this.project.config.organization,apiWorkspaces:this.project.apiWorkspaces,ossWorkspaces:this.ossWorkspaces,docsWorkspace:this.docsWorkspace,context:o,token:this.token,instanceUrl:t,preview:r,previewId:n,disableTemplates:void 0,skipUpload:i,cliVersion:"5.153.0",loginCommand:"fern auth login"});return o.getResult()===wf.Failure?{success:!1}:{success:!0,url:s}}catch(s){return{success:!1,error:Pn(s)}}}};Ot();Sn();var mRt=class e{static MAX_DISPLAYED_LOGS_TTY=10;static URL_PATTERN=/https?:\/\/[^\s]+/;context;stream;tasks={};taskOrder=[];startTime;isRegistered=!1;constructor(t){this.context=t.context,this.stream=t.stream??process.stderr}addTask(t){let r={...t,status:t.status??"pending"};return this.tasks[t.id]=r,this.taskOrder.push(t.id),this}async start(t){return this.startTime=Date.now(),t!=null&&await this.context.ttyAwareLogger.takeOverTerminal(()=>{this.stream.write(`
|
|
4435
4435
|
`),this.stream.write(`${me.cyan("\u25C6")} ${me.bold(t.title)}
|
|
4436
4436
|
`),t.subtitle!=null&&this.stream.write(` ${me.dim(t.subtitle)}
|
|
4437
4437
|
`),this.stream.write(`
|
|
@@ -5125,7 +5125,7 @@ ${r}`}function M2i(e){let t=this,{emitParseErrors:r,...n}={...t.data("settings")
|
|
|
5125
5125
|
`),g="";return c&&(g=l.style.error(c)),[`${p} ${d} ${s}`,[m,g].filter(Boolean).join(`
|
|
5126
5126
|
`)]});var sJA=Sx((e,t)=>{let{validate:r=()=>!0}=e,n=rv(e.theme),[i,o]=mu("idle"),[s,a]=mu(),[c,u]=mu(""),l=xx({status:i,theme:n});wx(async(g,A)=>{if(i==="idle")if(Cx(g)){let y=c;o("loading");let I=await r(y);I===!0?(u(y),o("done"),t(y)):(A.write(c),a(I||"You must provide a valid value"),o("idle"))}else u(A.line),a(void 0)});let p=n.style.message(e.message,i),f="",d;e.mask?f=(typeof e.mask=="string"?e.mask:"*").repeat(c.length):i!=="done"&&(d=`${n.style.help("[input is masked]")}${uFt}`),i==="done"&&(f=n.style.answer(f));let m="";return s&&(m=n.style.error(s)),[[l,p,e.mask?f:d].join(" "),m]});var xKe=Ae(WS(),1);var aJA={icon:{cursor:gw.pointer},style:{disabled:e=>xKe.default.dim(`- ${e}`),searchTerm:e=>xKe.default.cyan(e),description:e=>xKe.default.cyan(e),keysHelpTip:e=>e.map(([t,r])=>`${xKe.default.bold(t)} ${xKe.default.dim(r)}`).join(xKe.default.dim(" \u2022 "))},helpMode:"always"};function Bea(e){return!_d.isSeparator(e)&&!e.disabled}function cJA(e){return e.map(t=>{if(_d.isSeparator(t))return t;if(typeof t=="string")return{value:t,name:t,short:t,disabled:!1};let r=t.name??String(t.value),n={value:t.value,name:r,short:t.short??r,disabled:t.disabled??!1};return t.description&&(n.description=t.description),n})}var uJA=Sx((e,t)=>{let{pageSize:r=7,validate:n=()=>!0}=e,i=rv(aJA,e.theme),[o,s]=mu("loading"),[a,c]=mu(""),[u,l]=mu([]),[p,f]=mu(),d=xx({status:o,theme:i}),m=U6(()=>{let M=u.findIndex(Bea),Y=u.findLastIndex(Bea);return{first:M,last:Y}},[u]),[g=m.first,A]=mu();oU(()=>{let M=new AbortController;return s("loading"),f(void 0),(async()=>{try{let te=await e.source(a||void 0,{signal:M.signal});M.signal.aborted||(A(void 0),f(void 0),l(cJA(te)),s("idle"))}catch(te){!M.signal.aborted&&te instanceof Error&&f(te.message)}})(),()=>{M.abort()}},[a]);let y=u[g];wx(async(M,Y)=>{if(Cx(M))if(y){s("loading");let te=await n(y.value);s("idle"),te===!0?(s("done"),t(y.value)):y.name===a?f(te||"You must provide a valid value"):(Y.write(y.name),c(y.name))}else Y.write(a);else if(Lbe(M)&&y)Y.clearLine(0),Y.write(y.name),c(y.name);else if(o!=="loading"&&(NR(M)||_6(M))){if(Y.clearLine(0),NR(M)&&g!==m.first||_6(M)&&g!==m.last){let te=NR(M)?-1:1,$=g;do $=($+te+u.length)%u.length;while(!Bea(u[$]));A($)}}else c(Y.line)});let I=i.style.message(e.message,o),x;if(i.helpMode!=="never")if(e.instructions){let{pager:M,navigation:Y}=e.instructions;x=i.style.help(u.length>r?M:Y)}else x=i.style.keysHelpTip([["\u2191\u2193","navigate"],["\u23CE","select"]]);let v=EKe({items:u,active:g,renderItem({item:M,isActive:Y}){if(_d.isSeparator(M))return` ${M.separator}`;if(M.disabled){let se=typeof M.disabled=="string"?M.disabled:"(disabled)";return i.style.disabled(`${M.name} ${se}`)}let te=Y?i.style.highlight:se=>se,$=Y?i.icon.cursor:" ";return te(`${$} ${M.name}`)},pageSize:r,loop:!1}),w;p?w=i.style.error(p):u.length===0&&a!==""&&o==="idle"&&(w=i.style.error("No results found"));let B;if(o==="done"&&y)return[d,I,i.style.answer(y.short)].filter(Boolean).join(" ").trimEnd();B=i.style.searchTerm(a);let R=y?.description,D=[d,I,B].filter(Boolean).join(" ").trimEnd(),O=[w??v," ",R?i.style.description(R):"",x].filter(Boolean).join(`
|
|
5127
5127
|
`).trimEnd();return[D,O]});var pFt=Ae(WS(),1);var lJA={icon:{cursor:gw.pointer},style:{disabled:e=>pFt.default.dim(`- ${e}`),description:e=>pFt.default.cyan(e),keysHelpTip:e=>e.map(([t,r])=>`${pFt.default.bold(t)} ${pFt.default.dim(r)}`).join(pFt.default.dim(" \u2022 "))},helpMode:"always",indexMode:"hidden",keybindings:[]};function lFt(e){return!_d.isSeparator(e)&&!e.disabled}function pJA(e){return e.map(t=>{if(_d.isSeparator(t))return t;if(typeof t=="string")return{value:t,name:t,short:t,disabled:!1};let r=t.name??String(t.value),n={value:t.value,name:r,short:t.short??r,disabled:t.disabled??!1};return t.description&&(n.description=t.description),n})}var Rea=Sx((e,t)=>{let{loop:r=!0,pageSize:n=7}=e,i=rv(lJA,e.theme),{keybindings:o}=i,[s,a]=mu("idle"),c=xx({status:s,theme:i}),u=bKe(),l=!o.includes("vim"),p=U6(()=>pJA(e.choices),[e.choices]),f=U6(()=>{let R=p.findIndex(lFt),D=p.findLastIndex(lFt);if(R===-1)throw new Nle("[select prompt] No selectable choices. All choices are disabled.");return{first:R,last:D}},[p]),d=U6(()=>"default"in e?p.findIndex(R=>lFt(R)&&R.value===e.default):-1,[e.default,p]),[m,g]=mu(d===-1?f.first:d),A=p[m];wx((R,D)=>{if(clearTimeout(u.current),Cx(R))a("done"),t(A.value);else if(NR(R,o)||_6(R,o)){if(D.clearLine(0),r||NR(R,o)&&m!==f.first||_6(R,o)&&m!==f.last){let O=NR(R,o)?-1:1,M=m;do M=(M+O+p.length)%p.length;while(!lFt(p[M]));g(M)}}else if(Ycr(R)&&!Number.isNaN(Number(D.line))){let O=Number(D.line)-1,M=-1,Y=p.findIndex($=>_d.isSeparator($)?!1:(M++,M===O)),te=p[Y];te!=null&&lFt(te)&&g(Y),u.current=setTimeout(()=>{D.clearLine(0)},700)}else if(gKe(R))D.clearLine(0);else if(l){let O=D.line.toLowerCase(),M=p.findIndex(Y=>_d.isSeparator(Y)||!lFt(Y)?!1:Y.name.toLowerCase().startsWith(O));M!==-1&&g(M),u.current=setTimeout(()=>{D.clearLine(0)},700)}}),oU(()=>()=>{clearTimeout(u.current)},[]);let y=i.style.message(e.message,s),I;if(i.helpMode!=="never")if(e.instructions){let{pager:R,navigation:D}=e.instructions;I=i.style.help(p.length>n?R:D)}else I=i.style.keysHelpTip([["\u2191\u2193","navigate"],["\u23CE","select"]]);let x=0,v=EKe({items:p,active:m,renderItem({item:R,isActive:D,index:O}){if(_d.isSeparator(R))return x++,` ${R.separator}`;let M=i.indexMode==="number"?`${O+1-x}. `:"";if(R.disabled){let $=typeof R.disabled=="string"?R.disabled:"(disabled)";return i.style.disabled(`${M}${R.name} ${$}`)}let Y=D?i.style.highlight:$=>$,te=D?i.icon.cursor:" ";return Y(`${te} ${M}${R.name}`)},pageSize:n,loop:r});if(s==="done")return[c,y,i.style.answer(A.short)].filter(Boolean).join(" ");let{description:w}=A;return`${[[c,y].filter(Boolean).join(" "),v," ",w?i.style.description(w):"",I].filter(Boolean).join(`
|
|
5128
|
-
`).trimEnd()}${uFt}`});Sn();Li();var jle={GENERATION_STARTED:"generation_started",GENERATION_COMPLETED:"generation_completed",GENERATION_FAILED:"generation_failed",VERIFICATION_FAILED:"verification_failed",SDK_PR_CREATED:"sdk_pr_created",UPGRADE_APPLIED:"upgrade_applied",MAJOR_VERSION_BUMP:"major_version_bump"},fJA={[jle.GENERATION_STARTED]:!1,[jle.GENERATION_COMPLETED]:!1,[jle.GENERATION_FAILED]:!0,[jle.VERIFICATION_FAILED]:!0,[jle.SDK_PR_CREATED]:!1,[jle.UPGRADE_APPLIED]:!1,[jle.MAJOR_VERSION_BUMP]:!1};function n9p(e){return fJA[e]}function i9p(e,t){return{automation_mode:!0,surface:"cli",action:t.action,run_id:t.run_id,github_run_id:t.github_run_id,github_run_url:t.github_run_url,org:t.org,config_repo:t.config_repo,config_commit_sha:t.config_commit_sha,config_branch:t.config_branch,config_pr_number:t.config_pr_number,trigger:t.trigger,cli_version:t.cli_version,...e.errorCode!==void 0?{error_code:e.errorCode}:{},...e.attributes??{}}}function o9p(e,t){function r(i,o,s){s!=null&&(i[o]=s)}let n={surface:"cli",automation_mode:"true"};return r(n,"event",e.event),r(n,"action",t.action),r(n,"run_id",t.run_id),r(n,"org",t.org),r(n,"config_repo",t.config_repo),r(n,"trigger",t.trigger),r(n,"error_code",e.errorCode??"none"),n}function s9p(e,t){return{github_run_id:t.github_run_id,github_run_url:t.github_run_url,config_commit_sha:t.config_commit_sha,config_branch:t.config_branch,config_pr_number:t.config_pr_number,cli_version:t.cli_version,...e.attributes??{}}}function a9p(e,t){return{event:e.event,timestamp:new Date().toISOString(),surface:"cli",action:t.action,run_id:t.run_id,github_run_id:t.github_run_id,github_run_url:t.github_run_url,org:t.org,config_repo:t.config_repo,config_commit_sha:t.config_commit_sha,config_branch:t.config_branch,config_pr_number:t.config_pr_number,trigger:t.trigger,cli_version:t.cli_version,...e.errorCode!==void 0?{error_code:e.errorCode}:{},...e.attributes??{}}}function c9p(e){let t=e.join(" ");return/\bautomations\s+generate\b/.test(t)?jle.GENERATION_FAILED:/\bautomations\s+preview\b/.test(t)?jle.VERIFICATION_FAILED:jle.GENERATION_FAILED}var dJA="",mJA="FERN_AUTOMATION_EVENTS_ORIGIN",hJA=3e3,INi=class e{static instance;origin;inflight=[];static getInstance(){return e.instance==null&&(e.instance=new e(process.env[mJA]??dJA)),e.instance}constructor(t){this.origin=t}resolveEndpoint(){if(this.origin.length!==0)return`${this.origin.replace(/\/$/,"")}/v1/automation/events`}post(t,r){this.inflight.push(this.send(t,r))}async shutdown(){let t=this.inflight;this.inflight=[],t.length>0&&await Promise.allSettled(t)}async send(t,r){let n=this.resolveEndpoint();if(n==null)return;let i=new AbortController,o=setTimeout(()=>i.abort(),hJA);try{let s={"content-type":"application/json"},a=await AM();a!=null&&a.value.length>0&&(s.Authorization=`Bearer ${a.value}`);let c=await fetch(n,{method:"POST",headers:s,body:JSON.stringify(a9p(t,r)),signal:i.signal})}catch{return}finally{clearTimeout(o)}}};function u9p(){let{fern_run_id:e,github_run_id:t}=mpe();return{action:process.env.FERN_ACTION,run_id:e,github_run_id:t,github_run_url:process.env.FERN_GITHUB_RUN_URL,org:void 0,config_repo:process.env.FERN_CONFIG_REPO,config_commit_sha:process.env.FERN_CONFIG_COMMIT_SHA,config_branch:process.env.FERN_CONFIG_BRANCH,config_pr_number:process.env.FERN_CONFIG_PR_NUMBER,trigger:process.env.GITHUB_EVENT_NAME,cli_version:"5.
|
|
5128
|
+
`).trimEnd()}${uFt}`});Sn();Li();var jle={GENERATION_STARTED:"generation_started",GENERATION_COMPLETED:"generation_completed",GENERATION_FAILED:"generation_failed",VERIFICATION_FAILED:"verification_failed",SDK_PR_CREATED:"sdk_pr_created",UPGRADE_APPLIED:"upgrade_applied",MAJOR_VERSION_BUMP:"major_version_bump"},fJA={[jle.GENERATION_STARTED]:!1,[jle.GENERATION_COMPLETED]:!1,[jle.GENERATION_FAILED]:!0,[jle.VERIFICATION_FAILED]:!0,[jle.SDK_PR_CREATED]:!1,[jle.UPGRADE_APPLIED]:!1,[jle.MAJOR_VERSION_BUMP]:!1};function n9p(e){return fJA[e]}function i9p(e,t){return{automation_mode:!0,surface:"cli",action:t.action,run_id:t.run_id,github_run_id:t.github_run_id,github_run_url:t.github_run_url,org:t.org,config_repo:t.config_repo,config_commit_sha:t.config_commit_sha,config_branch:t.config_branch,config_pr_number:t.config_pr_number,trigger:t.trigger,cli_version:t.cli_version,...e.errorCode!==void 0?{error_code:e.errorCode}:{},...e.attributes??{}}}function o9p(e,t){function r(i,o,s){s!=null&&(i[o]=s)}let n={surface:"cli",automation_mode:"true"};return r(n,"event",e.event),r(n,"action",t.action),r(n,"run_id",t.run_id),r(n,"org",t.org),r(n,"config_repo",t.config_repo),r(n,"trigger",t.trigger),r(n,"error_code",e.errorCode??"none"),n}function s9p(e,t){return{github_run_id:t.github_run_id,github_run_url:t.github_run_url,config_commit_sha:t.config_commit_sha,config_branch:t.config_branch,config_pr_number:t.config_pr_number,cli_version:t.cli_version,...e.attributes??{}}}function a9p(e,t){return{event:e.event,timestamp:new Date().toISOString(),surface:"cli",action:t.action,run_id:t.run_id,github_run_id:t.github_run_id,github_run_url:t.github_run_url,org:t.org,config_repo:t.config_repo,config_commit_sha:t.config_commit_sha,config_branch:t.config_branch,config_pr_number:t.config_pr_number,trigger:t.trigger,cli_version:t.cli_version,...e.errorCode!==void 0?{error_code:e.errorCode}:{},...e.attributes??{}}}function c9p(e){let t=e.join(" ");return/\bautomations\s+generate\b/.test(t)?jle.GENERATION_FAILED:/\bautomations\s+preview\b/.test(t)?jle.VERIFICATION_FAILED:jle.GENERATION_FAILED}var dJA="",mJA="FERN_AUTOMATION_EVENTS_ORIGIN",hJA=3e3,INi=class e{static instance;origin;inflight=[];static getInstance(){return e.instance==null&&(e.instance=new e(process.env[mJA]??dJA)),e.instance}constructor(t){this.origin=t}resolveEndpoint(){if(this.origin.length!==0)return`${this.origin.replace(/\/$/,"")}/v1/automation/events`}post(t,r){this.inflight.push(this.send(t,r))}async shutdown(){let t=this.inflight;this.inflight=[],t.length>0&&await Promise.allSettled(t)}async send(t,r){let n=this.resolveEndpoint();if(n==null)return;let i=new AbortController,o=setTimeout(()=>i.abort(),hJA);try{let s={"content-type":"application/json"},a=await AM();a!=null&&a.value.length>0&&(s.Authorization=`Bearer ${a.value}`);let c=await fetch(n,{method:"POST",headers:s,body:JSON.stringify(a9p(t,r)),signal:i.signal})}catch{return}finally{clearTimeout(o)}}};function u9p(){let{fern_run_id:e,github_run_id:t}=mpe();return{action:process.env.FERN_ACTION,run_id:e,github_run_id:t,github_run_url:process.env.FERN_GITHUB_RUN_URL,org:void 0,config_repo:process.env.FERN_CONFIG_REPO,config_commit_sha:process.env.FERN_CONFIG_COMMIT_SHA,config_branch:process.env.FERN_CONFIG_BRANCH,config_pr_number:process.env.FERN_CONFIG_PR_NUMBER,trigger:process.env.GITHUB_EVENT_NAME,cli_version:"5.153.0"}}function l9p(){return process.env.FERN_AUTOMATION==="true"}var vNi=class{constructor(t,r=INi.getInstance()){this.reporter=t;this.automationEventApiClient=r;this.context=u9p()}reporter;automationEventApiClient;context;setOrganization(t){this.context={...this.context,org:t}}emit(t,r){let n=this.captureSentryForFailure({event:t,context:this.context,error:r?.error}),i=n==null?t:{...t,attributes:{...t.attributes??{},sentry_event_id:n}};this.capturePostHogEvent({event:i,context:this.context}),this.captureAutomationEventApiEvent(i,this.context)}async flush(){await this.automationEventApiClient.shutdown()}capturePostHogEvent({event:t,context:r}){this.reporter.instrumentPostHogAutomationEvent({distinctId:r.run_id??void 0,event:t.event,properties:i9p(t,r)})}captureSentryForFailure({event:t,context:r,error:n}){if(!(!n9p(t.event)||t.errorCode==null))return this.reporter.captureException(n,{tags:o9p(t,r),context:{automation:s9p(t,r)}})}captureAutomationEventApiEvent(t,r){this.automationEventApiClient.post(t,r)}};Nt();function CNi(e,t,r){if(t instanceof iu)return;let n=yMe(t,r?.code),i=r?.argv??process.argv,o=i.join(" "),s=r?.message??(t instanceof Error?t.message:void 0)??"",a=t??new S({message:s,code:n});l9p()?AJA(i,e,n,s,a):gJA(e,o,n,a)}function gJA(e,t,r,n){e.instrumentPostHogEvent({command:t,properties:{failed:!0,errorCode:r}}),Mzt(r)&&e.captureException(n,{tags:{"error.code":r}})}function AJA(e,t,r,n,i){let o=c9p(e);t.emitAutomationTelemetryEvent({event:o,errorCode:r,attributes:{error_message:n}},{error:i})}Nt();function wKe(){return process.env.FERN_DISABLE_TELEMETRY==="true"}function xNi({cliName:e,packageVersion:t,isLocal:r}){return wKe()||r?!1:!(t==="0.0.0")&&(e==="fern"&&!0)}var wNi=class{sentry;constructor({release:t,telemetry:r}){let n="https://84f58b5e457f06999d92f11ce4b79158@o4509504076185600.ingest.us.sentry.io/4511021546602496";if(xNi(r)&&n!=null&&n.length>0){let i="production";if(i==null||i.length===0)throw new S({message:"SENTRY_ENVIRONMENT must be set when SENTRY_DSN is configured",code:S.Code.ConfigError});this.sentry=Rzt({dsn:n,release:t,environment:i,defaultIntegrations:!1,integrations:[IYe(),W0e(),H0e(),B0e(),q0e()],tracesSampleRate:0,attachStacktrace:!0,sendClientReports:!1}),Dzt()}}captureException(t,r){if(this.sentry!=null)try{let n=r?.tags,i=r?.context,o=n!=null&&Object.keys(n).length>0,s=i!=null&&Object.values(i).some(a=>a!=null);return!o&&!s?this.sentry.captureException(t):jP(a=>{if(o&&a.setTags(n),i!=null)for(let[c,u]of Object.entries(i))u!=null&&a.setContext(c,u);return this.sentry?.captureException(t,void 0,a)})}catch{return}}async flush(){this.sentry!=null&&await Promise.resolve(this.sentry.flush(2e3)).catch(()=>{})}};Nt();var SNi=class{originalWrite;redirected=!1;redirect(){if(this.redirected)throw new S({message:"StdoutRedirector: already redirected \u2014 did you forget to restore()?",code:S.Code.InternalError});this.originalWrite=process.stdout.write,process.stdout.write=process.stderr.write.bind(process.stderr),this.redirected=!0}restore(){!this.redirected||this.originalWrite==null||(process.stdout.write=this.originalWrite,this.originalWrite=void 0,this.redirected=!1)}async withRedirect(t){this.redirect();try{return await t()}finally{this.restore()}}};Bme();Ot();My();Nt();Sn();var eur=class{result=wf.Success;lastFailureMessage=void 0;logImmediately;logPrefix;title;subtasks=[];shouldBufferLogs;bufferedLogs=[];status="notStarted";onResult;instrumentPostHogEventImpl;captureExceptionImpl;emitAutomationTelemetryEventImpl;constructor({logImmediately:t,logPrefix:r,title:n,takeOverTerminal:i,onResult:o,shouldBufferLogs:s,instrumentPostHogEvent:a,captureException:c,emitAutomationTelemetryEvent:u}){this.logImmediately=t,this.logPrefix=r??"",this.title=n,this.takeOverTerminal=i,this.onResult=o,this.shouldBufferLogs=s,this.instrumentPostHogEventImpl=a,this.captureExceptionImpl=c,this.emitAutomationTelemetryEventImpl=u}start(){return this.status="running",this}isStarted(){return this.status!=="notStarted"}finish(){this.status!=="finished"&&(this.status="finished",this.flushLogs(),this.onResult?.(this.getResult()))}isFinished(){return this.status==="finished"}takeOverTerminal;failAndThrow(t,r,n){throw this.failWithoutThrowing(t,r,n),this.finish(),new iu}failWithoutThrowing(t,r,n){this.result=wf.Failure,!(r instanceof iu)&&(t!=null&&(this.lastFailureMessage=t),RGt({message:t,error:r,logger:this.logger}),CNi(this,r,{...n,message:t}))}getLastFailureMessage(){return this.lastFailureMessage}captureException(t,r){return this.captureExceptionImpl?.(t,r)}emitAutomationTelemetryEvent(t,r){this.emitAutomationTelemetryEventImpl(t,r)}getResult(){return this.result}instrumentPostHogEvent(t){this.instrumentPostHogEventImpl(t)}logAtLevel(t,...r){this.logAtLevelWithOverrides(t,r)}logAtLevelWithOverrides(t,r,n={}){this.log({parts:r,level:t,time:new Date,...n})}log(t){this.bufferedLogs.push({...t,prefix:this.logPrefix}),this.shouldBufferLogs||this.flushLogs()}flushLogs(){this.logImmediately(this.bufferedLogs),this.bufferedLogs=[]}logger=nI(this.logAtLevel.bind(this));addInteractiveTask({name:t,subtitle:r}){let n=new Dea({name:t,subtitle:r,logImmediately:i=>this.logImmediately(i),logPrefix:`${this.logPrefix}${me.blackBright(t)} `,takeOverTerminal:this.takeOverTerminal,onResult:this.onResult,shouldBufferLogs:this.shouldBufferLogs,instrumentPostHogEvent:i=>this.instrumentPostHogEventImpl(i),captureException:this.captureExceptionImpl,emitAutomationTelemetryEvent:this.emitAutomationTelemetryEventImpl});return this.subtasks.push(n),n}async runInteractiveTask(t,r){let n=this.addInteractiveTask(t).start();try{await r(n)}catch(i){n.failWithoutThrowing(void 0,i)}finally{n.finish()}return n.getResult()===wf.Success}printInteractiveTasks({spinner:t}){return this.subtasks.map(r=>r.print({spinner:t})).join(`
|
|
5129
5129
|
`)}},Dea=class extends eur{name;subtitle;constructor({name:t,subtitle:r,...n}){super(n),this.name=t,this.subtitle=r}start(){return super.start(),this.logAtLevelWithOverrides(Xn.Info,["Started."],{omitOnTTY:!0}),this.flushLogs(),this}isStarted(){return this.status!=="notStarted"}finish(){this.status!=="finished"&&(this.result===wf.Success?this.logAtLevelWithOverrides(Xn.Info,["Finished."],{omitOnTTY:!0}):this.logAtLevelWithOverrides(Xn.Error,["Failed."],{omitOnTTY:!0}),super.finish())}setSubtitle(t){this.subtitle=t}print({spinner:t}){let r=[this.name];return this.subtitle!=null&&r.push(me.dim(this.subtitle)),r.push(...this.subtasks.map(n=>n.print({spinner:t}))),Lz({prefix:this.getIcon({spinner:t}),content:r.join(`
|
|
5130
5130
|
`)})}printInteractiveTasks({spinner:t}){return this.print({spinner:t})}getIcon({spinner:t}){let r=this.subtasks.length>0;switch(this.status){case"notStarted":return r?me.dim("\u25B8 "):me.dim("\u25E6 ");case"running":return r?me.cyan("\u25BE "):t;case"finished":switch(this.getResult()){case wf.Success:return r?me.green("\u25BE "):me.green("\u2713 ");case wf.Failure:return r?me.red("\u25BE "):me.red("x ")}}}getResult(){if(this.result===wf.Failure)return wf.Failure;for(let t of this.subtasks)if(t.getResult()===wf.Failure)return wf.Failure;return wf.Success}};Nt();var p9p=Ae(g_e(),1);Sn();function f9p(e){return e.filter(t=>t.isUpgradeAvailable).length>0}function yJA(e){return(e.cliUpgradeInfo?.isUpgradeAvailable??!1)||f9p(e.generatorUpgradeInfo)}async function d9p({cliEnvironment:e,upgradeInfo:t}){if(!yJA(t)||e.packageVersion==t.cliUpgradeInfo?.latestVersion)return;let r=`${me.underline("Upgrades available")}
|
|
5131
5131
|
|
|
@@ -5134,7 +5134,7 @@ ${r}`}function M2i(e){let t=this,{emitParseErrors:r,...n}={...t.data("settings")
|
|
|
5134
5134
|
Run ${me.cyan("fern generator upgrade")} to upgrade your generators.`),i.length>2&&(r+=`
|
|
5135
5135
|
Run ${me.cyan("fern generator upgrade --list")} to see the full list of generator upgrades available.`),lft(r,{padding:1,float:"center",textAlignment:"center",borderColor:"yellow",borderStyle:"round"})}async function kea({generatorUpgradeInfo:e,header:t,limit:r,includeBoxen:n=!0}){if(!f9p(e))return;let i=t??"",o=e.filter(a=>a.isUpgradeAvailable);r!=null&&(o=o.slice(0,r+1));let s=o.sort((a,c)=>a.generatorName.localeCompare(c.generatorName)||a.currentVersion.localeCompare(c.currentVersion));for(let a of s)i+=`
|
|
5136
5136
|
${await bJA(a.generatorName)} (${a.apiName!=null?"API: "+a.apiName+", ":""}Group: ${a.generatorGroup}) `+me.dim(a.currentVersion)+me.reset(" \u2192 ")+me.green(a.latestVersion);return i+=`
|
|
5137
|
-
`,n?lft(i,{padding:1,float:"center",textAlignment:"center",borderColor:"yellow",borderStyle:"round"}):i}async function bJA(e){let r=await new p9p.FernRegistryClient({environment:"https://registry.buildwithfern.com"}).generators.getGeneratorByImage({dockerImage:e});if(!r.ok||r.body==null)throw new S({message:`Generator ${e} not found`,code:S.Code.ConfigError});return r.body.displayName}Ui();Lme();Nt();var tur=Ae(e0(),1);function fFt(e){let t;return()=>(t??=e.runTask(r=>pd(r)),t)}function TNi({generatorId:e,candidateVersion:t,currentVersion:r}){if(!m9p(t)||!m9p(r))throw new S({message:`Cannot compare versions for generator "${e}": configured version "${r}", candidate version "${t}". Use valid semantic versions such as 1.2.3.`,code:S.Code.VersionError});try{return t===r?0:_S(t,r)?1:_S(r,t)?-1:0}catch{let n=tur.default.valid(t),i=tur.default.valid(r);if(n!=null&&i!=null)return Math.sign(tur.default.compare(n,i));throw new S({message:`Cannot compare versions for generator "${e}": configured version "${r}", candidate version "${t}". Use valid semantic versions such as 1.2.3.`,code:S.Code.VersionError})}}function m9p(e){if(e==="latest"||tur.default.valid(e)!=null)return!0;try{return JK(e),!0}catch{return!1}}async function ONi({generatorId:e,currentVersion:t,includeMajor:r,channel:n,organization:i,getToken:o,context:s}){if(n!=null)throw new Error(`SDK Gen API generator version discovery does not support the requested upgrade channel "${n}". Remove --channel to use executable index versions; FDR channel metadata is used only when the ${trr} feature flag is off for this organization.`);let a=lTt();if(a==null)throw new Error("FERN_SDK_GEN_API_ORIGIN is required when sdk-gen-api generation is enabled");let c=sx(e);if(c==null)return s.logger.error(`SDK Gen API cannot discover versions for unsupported generator ${e}. Use a canonical first-party SDK generator name.`),{};let u=await o(),l=await bIs({origin:a,organization:i,token:u,generatorId:e,language:c,currentVersion:t,includeMajor:r});return l.state==="UNAVAILABLE"?(s.logger.error(`SDK Gen API cannot resolve an executable version for ${e}@${t} (${l.reason}). Publish the coordinate to this environment or choose a supported generator version.`),{}):{compatibleVersion:l.compatibleVersion,withheldMajorVersion:l.withheldMajorVersion}}async function EJA({cliContext:e,project:t,generatorFilter:r,groupFilter:n,channel:i,includeMajor:o,skipFeatureFlagRequest:s}){let{apiWorkspaces:a}=t,c=fFt(e);if(a.length===1){let l={type:"singleApi",versions:{}};return await h9p({cliContext:e,apiWorkspaces:a,perGeneratorAction:async(p,f,d,m)=>{l.versions[f]==null&&(l.versions[f]={});let g=s_e(d.name);if(g==null){m.logger.debug(`Skipping unknown generator: ${d.name}`);return}let A=await A9p({generatorName:d.name,normalizedGeneratorName:g,cliVersion:e.environment.packageVersion,currentGeneratorVersion:d.version,channel:i,includeMajor:o,organization:t.config.organization,skipFeatureFlagRequest:s,getSdkGenApiToken:c,context:m});A!=null&&(l.versions[f][d.name]={previousVersion:d.version,latestVersion:A})},generatorFilter:r,groupFilter:n}),l}let u={type:"multiApi",versions:{}};return await h9p({cliContext:e,apiWorkspaces:a,perGeneratorAction:async(l,p,f,d)=>{if(l==null)return;u.versions[l]==null&&(u.versions[l]={}),u.versions[l][p]==null&&(u.versions[l][p]={});let m=s_e(f.name);if(m==null){d.logger.debug(`Skipping unknown generator: ${f.name}`);return}let g=await A9p({generatorName:f.name,normalizedGeneratorName:m,cliVersion:e.environment.packageVersion,currentGeneratorVersion:f.version,channel:i,includeMajor:o,organization:t.config.organization,skipFeatureFlagRequest:s,getSdkGenApiToken:c,context:d});g!=null&&(u.versions[l][p][f.name]={previousVersion:f.version,latestVersion:g})},generatorFilter:r,groupFilter:n}),u}async function h9p({cliContext:e,apiWorkspaces:t,perGeneratorAction:r,generatorFilter:n,groupFilter:i}){await Promise.all(t.map(async o=>{await e.runTaskForWorkspace(o,async s=>{let a=await c4({absolutePathToWorkspace:o.absoluteFilePath,context:s});if(a==null||a.groups==null)return;let c=n!=null?Xh(n):void 0;for(let u of a.groups)if(!(i!=null&&u.groupName!==i))for(let l of u.generators)c!=null&&l.name!==c||await r(o.workspaceName,u.groupName,l,s)})}))}function g9p(e,t,r){let n=[];for(let[i,o]of Object.entries(e))for(let[s,a]of Object.entries(o)){r.debug(`Checking if ${s} in group ${i} has an upgrade available...`);let c=TNi({generatorId:s,candidateVersion:a.latestVersion,currentVersion:a.previousVersion})===1;r.debug(`Latest version: ${a.latestVersion}. `+(c?"Upgrade available.":"No upgrade available.")),n.push({generatorName:s,generatorGroup:i,apiName:t,isUpgradeAvailable:c,currentVersion:a.previousVersion,latestVersion:a.latestVersion})}return n}async function A9p({generatorName:e,normalizedGeneratorName:t,cliVersion:r,currentGeneratorVersion:n,channel:i,includeMajor:o,organization:s,skipFeatureFlagRequest:a,getSdkGenApiToken:c,context:u}){return n==="latest"?"latest":await IJA({organization:s,generatorName:Xh(e),skipFeatureFlagRequest:a})?(await ONi({generatorId:Xh(e),currentVersion:n,includeMajor:o??!1,channel:i,organization:s,getToken:c,context:u})).compatibleVersion:NB({generatorName:t,cliVersion:r,currentGeneratorVersion:n,channel:i,includeMajor:o,context:u})}async function PNi({project:e,cliContext:t,generatorFilter:r,groupFilter:n,channel:i,includeMajor:o,skipFeatureFlagRequest:s}){let a=[];if(e!=null){let c=await EJA({cliContext:t,project:e,generatorFilter:r,groupFilter:n,channel:i,includeMajor:o,skipFeatureFlagRequest:s});if(c.type==="multiApi")for(let[u,l]of Object.entries(c.versions))a.push(...g9p(l,u,t.logger));else a.push(...g9p(c.versions,void 0,t.logger))}return a}async function IJA({organization:e,generatorName:t,skipFeatureFlagRequest:r}){return r===!0?XTs({organization:e,generatorName:t})??!1:aTt({organization:e,generatorName:t})}Nt();tjr();async function _be({cliEnvironment:e,includePreReleases:t=!1}){if(e.packageName!=="fern-api"||e.packageVersion==="0.0.0")return e.packageVersion;try{return await u6e(e.packageName,{version:t?"prerelease":"latest"})}catch(r){throw new S({message:`Failed to resolve latest CLI version: ${r instanceof Error?r.message:String(r)}`,code:S.Code.NetworkError})}}var y9p=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],BNi=class e{environment;sentryClient;posthogManager;automationTelemetryManager;didSucceed=!0;numTasks=0;ttyAwareLogger;logLevel=Xn.Info;isLocal;stdoutRedirector=new SNi;jsonMode=!1;static async create(t,r,{isLocal:n}){let i=await WHt();return new e(t,r,{isLocal:n,posthogManager:i})}constructor(t,r,{isLocal:n,posthogManager:i}){this.ttyAwareLogger=new HGt(t,r),this.isLocal=n??!1,this.posthogManager=i;let o=this.getPackageName(),s=this.getPackageVersion(),a=this.getCliName();(o==null||s==null||a==null)&&this.exitProgram(),this.environment={packageName:o,packageVersion:s,cliName:a},this.sentryClient=new wNi({release:`cli@${this.environment.packageVersion}`,telemetry:{cliName:this.environment.cliName,packageVersion:this.environment.packageVersion,isLocal:this.isLocal}}),this.automationTelemetryManager=new vNi(this)}getPackageName(){return"fern-api"}getPackageVersion(){return"5.
|
|
5137
|
+
`,n?lft(i,{padding:1,float:"center",textAlignment:"center",borderColor:"yellow",borderStyle:"round"}):i}async function bJA(e){let r=await new p9p.FernRegistryClient({environment:"https://registry.buildwithfern.com"}).generators.getGeneratorByImage({dockerImage:e});if(!r.ok||r.body==null)throw new S({message:`Generator ${e} not found`,code:S.Code.ConfigError});return r.body.displayName}Ui();Lme();Nt();var tur=Ae(e0(),1);function fFt(e){let t;return()=>(t??=e.runTask(r=>pd(r)),t)}function TNi({generatorId:e,candidateVersion:t,currentVersion:r}){if(!m9p(t)||!m9p(r))throw new S({message:`Cannot compare versions for generator "${e}": configured version "${r}", candidate version "${t}". Use valid semantic versions such as 1.2.3.`,code:S.Code.VersionError});try{return t===r?0:_S(t,r)?1:_S(r,t)?-1:0}catch{let n=tur.default.valid(t),i=tur.default.valid(r);if(n!=null&&i!=null)return Math.sign(tur.default.compare(n,i));throw new S({message:`Cannot compare versions for generator "${e}": configured version "${r}", candidate version "${t}". Use valid semantic versions such as 1.2.3.`,code:S.Code.VersionError})}}function m9p(e){if(e==="latest"||tur.default.valid(e)!=null)return!0;try{return JK(e),!0}catch{return!1}}async function ONi({generatorId:e,currentVersion:t,includeMajor:r,channel:n,organization:i,getToken:o,context:s}){if(n!=null)throw new Error(`SDK Gen API generator version discovery does not support the requested upgrade channel "${n}". Remove --channel to use executable index versions; FDR channel metadata is used only when the ${trr} feature flag is off for this organization.`);let a=lTt();if(a==null)throw new Error("FERN_SDK_GEN_API_ORIGIN is required when sdk-gen-api generation is enabled");let c=sx(e);if(c==null)return s.logger.error(`SDK Gen API cannot discover versions for unsupported generator ${e}. Use a canonical first-party SDK generator name.`),{};let u=await o(),l=await bIs({origin:a,organization:i,token:u,generatorId:e,language:c,currentVersion:t,includeMajor:r});return l.state==="UNAVAILABLE"?(s.logger.error(`SDK Gen API cannot resolve an executable version for ${e}@${t} (${l.reason}). Publish the coordinate to this environment or choose a supported generator version.`),{}):{compatibleVersion:l.compatibleVersion,withheldMajorVersion:l.withheldMajorVersion}}async function EJA({cliContext:e,project:t,generatorFilter:r,groupFilter:n,channel:i,includeMajor:o,skipFeatureFlagRequest:s}){let{apiWorkspaces:a}=t,c=fFt(e);if(a.length===1){let l={type:"singleApi",versions:{}};return await h9p({cliContext:e,apiWorkspaces:a,perGeneratorAction:async(p,f,d,m)=>{l.versions[f]==null&&(l.versions[f]={});let g=s_e(d.name);if(g==null){m.logger.debug(`Skipping unknown generator: ${d.name}`);return}let A=await A9p({generatorName:d.name,normalizedGeneratorName:g,cliVersion:e.environment.packageVersion,currentGeneratorVersion:d.version,channel:i,includeMajor:o,organization:t.config.organization,skipFeatureFlagRequest:s,getSdkGenApiToken:c,context:m});A!=null&&(l.versions[f][d.name]={previousVersion:d.version,latestVersion:A})},generatorFilter:r,groupFilter:n}),l}let u={type:"multiApi",versions:{}};return await h9p({cliContext:e,apiWorkspaces:a,perGeneratorAction:async(l,p,f,d)=>{if(l==null)return;u.versions[l]==null&&(u.versions[l]={}),u.versions[l][p]==null&&(u.versions[l][p]={});let m=s_e(f.name);if(m==null){d.logger.debug(`Skipping unknown generator: ${f.name}`);return}let g=await A9p({generatorName:f.name,normalizedGeneratorName:m,cliVersion:e.environment.packageVersion,currentGeneratorVersion:f.version,channel:i,includeMajor:o,organization:t.config.organization,skipFeatureFlagRequest:s,getSdkGenApiToken:c,context:d});g!=null&&(u.versions[l][p][f.name]={previousVersion:f.version,latestVersion:g})},generatorFilter:r,groupFilter:n}),u}async function h9p({cliContext:e,apiWorkspaces:t,perGeneratorAction:r,generatorFilter:n,groupFilter:i}){await Promise.all(t.map(async o=>{await e.runTaskForWorkspace(o,async s=>{let a=await c4({absolutePathToWorkspace:o.absoluteFilePath,context:s});if(a==null||a.groups==null)return;let c=n!=null?Xh(n):void 0;for(let u of a.groups)if(!(i!=null&&u.groupName!==i))for(let l of u.generators)c!=null&&l.name!==c||await r(o.workspaceName,u.groupName,l,s)})}))}function g9p(e,t,r){let n=[];for(let[i,o]of Object.entries(e))for(let[s,a]of Object.entries(o)){r.debug(`Checking if ${s} in group ${i} has an upgrade available...`);let c=TNi({generatorId:s,candidateVersion:a.latestVersion,currentVersion:a.previousVersion})===1;r.debug(`Latest version: ${a.latestVersion}. `+(c?"Upgrade available.":"No upgrade available.")),n.push({generatorName:s,generatorGroup:i,apiName:t,isUpgradeAvailable:c,currentVersion:a.previousVersion,latestVersion:a.latestVersion})}return n}async function A9p({generatorName:e,normalizedGeneratorName:t,cliVersion:r,currentGeneratorVersion:n,channel:i,includeMajor:o,organization:s,skipFeatureFlagRequest:a,getSdkGenApiToken:c,context:u}){return n==="latest"?"latest":await IJA({organization:s,generatorName:Xh(e),skipFeatureFlagRequest:a})?(await ONi({generatorId:Xh(e),currentVersion:n,includeMajor:o??!1,channel:i,organization:s,getToken:c,context:u})).compatibleVersion:NB({generatorName:t,cliVersion:r,currentGeneratorVersion:n,channel:i,includeMajor:o,context:u})}async function PNi({project:e,cliContext:t,generatorFilter:r,groupFilter:n,channel:i,includeMajor:o,skipFeatureFlagRequest:s}){let a=[];if(e!=null){let c=await EJA({cliContext:t,project:e,generatorFilter:r,groupFilter:n,channel:i,includeMajor:o,skipFeatureFlagRequest:s});if(c.type==="multiApi")for(let[u,l]of Object.entries(c.versions))a.push(...g9p(l,u,t.logger));else a.push(...g9p(c.versions,void 0,t.logger))}return a}async function IJA({organization:e,generatorName:t,skipFeatureFlagRequest:r}){return r===!0?XTs({organization:e,generatorName:t})??!1:aTt({organization:e,generatorName:t})}Nt();tjr();async function _be({cliEnvironment:e,includePreReleases:t=!1}){if(e.packageName!=="fern-api"||e.packageVersion==="0.0.0")return e.packageVersion;try{return await u6e(e.packageName,{version:t?"prerelease":"latest"})}catch(r){throw new S({message:`Failed to resolve latest CLI version: ${r instanceof Error?r.message:String(r)}`,code:S.Code.NetworkError})}}var y9p=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],BNi=class e{environment;sentryClient;posthogManager;automationTelemetryManager;didSucceed=!0;numTasks=0;ttyAwareLogger;logLevel=Xn.Info;isLocal;stdoutRedirector=new SNi;jsonMode=!1;static async create(t,r,{isLocal:n}){let i=await WHt();return new e(t,r,{isLocal:n,posthogManager:i})}constructor(t,r,{isLocal:n,posthogManager:i}){this.ttyAwareLogger=new HGt(t,r),this.isLocal=n??!1,this.posthogManager=i;let o=this.getPackageName(),s=this.getPackageVersion(),a=this.getCliName();(o==null||s==null||a==null)&&this.exitProgram(),this.environment={packageName:o,packageVersion:s,cliName:a},this.sentryClient=new wNi({release:`cli@${this.environment.packageVersion}`,telemetry:{cliName:this.environment.cliName,packageVersion:this.environment.packageVersion,isLocal:this.isLocal}}),this.automationTelemetryManager=new vNi(this)}getPackageName(){return"fern-api"}getPackageVersion(){return"5.153.0"}getCliName(){return"fern"}setLogLevel(t){this.logLevel=t}logFernVersionDebug(){this.logger.debug(`Running ${me.bold(`${this.environment.cliName}`)} (${this.environment.packageName}@${this.environment.packageVersion})`)}failAndThrow(t,r,n){throw this.failWithoutThrowing(t,r,n),new iu}failWithoutThrowing(t,r,n){this.didSucceed=!1,!(r instanceof iu)&&(RGt({message:t,error:r,logger:this.logger}),CNi(this,r,{...n,message:t}))}enableJsonMode(){this.jsonMode||(this.jsonMode=!0,this.stdoutRedirector.redirect())}get isJsonMode(){return this.jsonMode}get isTTY(){return this.ttyAwareLogger.isTTY}writeJsonToStdout(t){this.writeTextToStdout(JSON.stringify(t,null,2)+`
|
|
5138
5138
|
`)}writeTextToStdout(t){this.stdoutRedirector.restore(),process.stdout.write(t),this.jsonMode&&this.stdoutRedirector.redirect()}async exit({code:t}={}){!this._suppressUpgradeMessage&&!this.isLocal&&await this.nudgeUpgradeIfAvailable(),this.ttyAwareLogger.finish();try{await this.posthogManager.flush()}catch{}await this.sentryClient.flush(),await this.automationTelemetryManager.flush(),this.exitProgram({code:t})}async nudgeUpgradeIfAvailable(){try{let t=await Promise.race([this.isUpgradeAvailable({skipFeatureFlagRequest:!0}),new Promise((n,i)=>setTimeout(()=>i("Request timed out"),300))]),r=await d9p({cliEnvironment:this.environment,upgradeInfo:t});r!=null&&(r.endsWith(`
|
|
5139
5139
|
`)||(r+=`
|
|
5140
5140
|
`),this.stderr.info(r))}catch{}}async exitIfFailed(){this.didSucceed||await this.exit()}exitProgram({code:t}={}){process.exit(t??(this.didSucceed?0:1))}longestWorkspaceName;registerWorkspaces(t){let r=vGi(t.map(n=>n.type==="docs"?"docs":n.workspaceName??"api"),n=>n.length);r!=null&&(this.longestWorkspaceName=r)}project;registerProject(t){this.project=t,this.automationTelemetryManager.setOrganization(t.config.organization)}runTask(t){return this.runTaskWithInit(this.constructTaskInit(),t)}addTask(){return this.addTaskWithInit(this.constructTaskInit())}async runTaskForWorkspace(t,r){await this.runTaskWithInit(this.constructTaskInitForWorkspace(t),r)}addTaskWithInit(t){let r=new eur(t);return this.ttyAwareLogger.registerTask(r),r}USE_NODE_18_OR_ABOVE_MESSAGE="The Fern CLI requires Node 18+ or above.";async runTaskWithInit(t,r){let n=this.addTaskWithInit(t).start(),i;try{i=await r(n)}catch(o){throw n.failWithoutThrowing(void 0,o),new iu}finally{n.finish()}return i}instrumentPostHogEvent(t){this.isLocal||this.posthogManager.sendEvent(t)}instrumentPostHogAutomationEvent(t){this.isLocal||this.posthogManager.sendAutomationEvent(t)}captureException(t,r){return this.sentryClient.captureException(t,r)}emitAutomationTelemetryEvent(t,r){this.automationTelemetryManager.emit(t,r)}logger=nI((t,...r)=>this.log(t,...r));stderr=nI((t,...r)=>this.logStderr(t,...r));constructTaskInitForWorkspace(t){let r=t.type==="docs"?"docs":t.workspaceName??"api",n=b9p(r),i=1+(this.longestWorkspaceName!=null?b9p(this.longestWorkspaceName):n).length,o=n.padEnd(i),s=y9p[this.numTasks++%y9p.length],a=me.hex(s)(o);return{...this.constructTaskInit(),logPrefix:a,title:me.hex(s).bold(r)}}constructTaskInit(){return{logImmediately:t=>this.logImmediately(t),takeOverTerminal:t=>this.ttyAwareLogger.takeOverTerminal(t),onResult:t=>{t===wf.Failure&&(this.didSucceed=!1)},instrumentPostHogEvent:t=>{this.instrumentPostHogEvent(t)},shouldBufferLogs:!1,captureException:(t,r)=>this.sentryClient.captureException(t,r),emitAutomationTelemetryEvent:(t,r)=>this.emitAutomationTelemetryEvent(t,r)}}log(t,...r){this.logImmediately([{parts:r,level:t,time:new Date}])}logStderr(t,...r){this.logImmediately([{parts:r,level:t,time:new Date}],{stderr:!0})}logImmediately(t,{stderr:r=!1}={}){let n=t.filter(i=>pS.indexOf(i.level)>=pS.indexOf(this.logLevel));this.ttyAwareLogger.log(n,{includeDebugInfo:this.logLevel===Xn.Debug,stderr:r||this.jsonMode})}_suppressUpgradeMessage=!1;suppressUpgradeMessage(){this._suppressUpgradeMessage=!0}_isUpgradeAvailable;async isUpgradeAvailable({includePreReleases:t=!1,skipFeatureFlagRequest:r=!1}={}){if(this._isUpgradeAvailable==null){this.logger.debug(`Checking if ${this.environment.packageName} upgrade is available...`);let n=await _be({cliEnvironment:this.environment,includePreReleases:t}),i=_S(n,this.environment.packageVersion);this.logger.debug(`Latest version: ${n}. `+(i?"Upgrade available.":"No upgrade available."));let o={isUpgradeAvailable:i,latestVersion:n},s=await PNi({project:this.project,cliContext:this,skipFeatureFlagRequest:r});this._isUpgradeAvailable={cliUpgradeInfo:o,generatorUpgradeInfo:s}}return this._isUpgradeAvailable}async confirmPrompt(t,r=!1){return this.selectPrompt({message:t,choices:[{name:"No",value:!1},{name:"Yes",value:!0}],default:r})}async selectPrompt({message:t,choices:r,default:n}){try{return await Rea({message:t,choices:r,default:n,theme:{prefix:me.yellow("?"),style:{answer:i=>me.cyan(i),message:i=>me.bold(i),highlight:i=>me.cyan(i)}}})}catch(i){throw i?.name==="ExitPromptError"?(this.logger.info(`
|