fern-api 5.180.1 → 5.180.2

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.
Files changed (2) hide show
  1. package/cli.cjs +12 -12
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -136,9 +136,9 @@ ${p.indent}`:""}${L8a(l)}:${a.indent?" ":""}`;return s=!1,u=!0,a.objectItem=void
136
136
 
137
137
  `)}f.write("payload.value = newResult;"),f.write("return payload;");let I=f.compile();return(x,v)=>I(d,x,v)},o,s=i6e,a=!d6t.jitless,u=a&&vao.value,l=t.catchall,p;e._zod.parse=(d,f)=>{p??(p=n.value);let m=d.value;return s(m)?a&&u&&f?.async===!1&&f.jitless!==!0?(o||(o=i(t.shape)),d=o(d,f),l?Xcc([],m,d,f,p,e):d):r(d,f):(d.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),d)}});T6t=wr("$ZodUnion",(e,t)=>{hl.init(e,t),uf(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),uf(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),uf(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),uf(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=>g6t(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=>Qcc(c,i,e,o)):Qcc(a,i,e,o)}});muo=wr("$ZodXor",(e,t)=>{T6t.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=>Mcc(c,i,e,o)):Mcc(a,i,e,o)}}),huo=wr("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,T6t.init(e,t);let r=e._zod.parse;uf(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=Ytt(()=>{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(!i6e(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)}}),guo=wr("$ZodIntersection",(e,t)=>{hl.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])=>Lcc(r,c,u)):Lcc(r,o,s)}});vBr=wr("$ZodTuple",(e,t)=>{hl.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(d=>hBr(d,n,u))):hBr(p,n,u)}if(t.rest){let l=o.slice(r.length);for(let p of l){u++;let d=t.rest._zod.run({value:p,issues:[]},i);d instanceof Promise?s.push(d.then(f=>hBr(f,n,u))):hBr(d,n,u)}}return s.length?Promise.all(s).then(()=>n):n}});Auo=wr("$ZodRecord",(e,t)=>{hl.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!cve(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(...H3(u,p.issues)),r.value[u]=p.value})):(l.issues.length&&r.issues.push(...H3(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"&&lBr.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=>bQ(p,n,Iv())),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(...H3(a,p.issues)),r.value[c.value]=p.value})):(l.issues.length&&r.issues.push(...H3(a,l.issues)),r.value[c.value]=l.value)}}return o.length?Promise.all(o).then(()=>r):r}}),yuo=wr("$ZodMap",(e,t)=>{hl.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])=>{_cc(l,p,r,s,i,e,n)})):_cc(c,u,r,s,i,e,n)}return o.length?Promise.all(o).then(()=>r):r}});buo=wr("$ZodSet",(e,t)=>{hl.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=>Ucc(c,r))):Ucc(a,r)}return o.length?Promise.all(o).then(()=>r):r}});Euo=wr("$ZodEnum",(e,t)=>{hl.init(e,t);let r=h6t(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>A6t.has(typeof i)).map(i=>typeof i=="string"?f5(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}}),Iuo=wr("$ZodLiteral",(e,t)=>{if(hl.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"?f5(n):n?f5(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}}),vuo=wr("$ZodFile",(e,t)=>{hl.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}}),Cuo=wr("$ZodTransform",(e,t)=>{hl.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new ove(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 sK;return r.value=i,r}});CBr=wr("$ZodOptional",(e,t)=>{hl.init(e,t),e._zod.optin="optional",e._zod.optout="optional",uf(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),uf(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${g6t(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=>Vcc(o,r.value)):Vcc(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),xuo=wr("$ZodExactOptional",(e,t)=>{CBr.init(e,t),uf(e._zod,"values",()=>t.innerType._zod.values),uf(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),Suo=wr("$ZodNullable",(e,t)=>{hl.init(e,t),uf(e._zod,"optin",()=>t.innerType._zod.optin),uf(e._zod,"optout",()=>t.innerType._zod.optout),uf(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${g6t(r.source)}|null)$`):void 0}),uf(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)}),wuo=wr("$ZodDefault",(e,t)=>{hl.init(e,t),e._zod.optin="optional",uf(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=>Gcc(o,t)):Gcc(i,t)}});Tuo=wr("$ZodPrefault",(e,t)=>{hl.init(e,t),e._zod.optin="optional",uf(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))}),Ouo=wr("$ZodNonOptional",(e,t)=>{hl.init(e,t),uf(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=>qcc(o,e)):qcc(i,e)}});Puo=wr("$ZodSuccess",(e,t)=>{hl.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new ove("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)}}),Buo=wr("$ZodCatch",(e,t)=>{hl.init(e,t),uf(e._zod,"optin",()=>t.innerType._zod.optin),uf(e._zod,"optout",()=>t.innerType._zod.optout),uf(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=>bQ(s,n,Iv()))},input:r.value}),r.issues=[]),r)):(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(o=>bQ(o,n,Iv()))},input:r.value}),r.issues=[]),r)}}),Ruo=wr("$ZodNaN",(e,t)=>{hl.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)}),Duo=wr("$ZodPipe",(e,t)=>{hl.init(e,t),uf(e._zod,"values",()=>t.in._zod.values),uf(e._zod,"optin",()=>t.in._zod.optin),uf(e._zod,"optout",()=>t.out._zod.optout),uf(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=>gBr(s,t.in,n)):gBr(o,t.in,n)}let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(o=>gBr(o,t.out,n)):gBr(i,t.out,n)}});O6t=wr("$ZodCodec",(e,t)=>{hl.init(e,t),uf(e._zod,"values",()=>t.in._zod.values),uf(e._zod,"optin",()=>t.in._zod.optin),uf(e._zod,"optout",()=>t.out._zod.optout),uf(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=>ABr(s,t,n)):ABr(o,t,n)}else{let o=t.out._zod.run(r,n);return o instanceof Promise?o.then(s=>ABr(s,t,n)):ABr(o,t,n)}}});kuo=wr("$ZodReadonly",(e,t)=>{hl.init(e,t),uf(e._zod,"propValues",()=>t.innerType._zod.propValues),uf(e._zod,"values",()=>t.innerType._zod.values),uf(e._zod,"optin",()=>t.innerType?._zod?.optin),uf(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(Wcc):Wcc(i)}});Fuo=wr("$ZodTemplateLiteral",(e,t)=>{hl.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||xao.has(typeof n))r.push(f5(`${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)}),Nuo=wr("$ZodFunction",(e,t)=>(hl.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?$Pr(e._def.input,n):n,o=Reflect.apply(r,this,i);return e._def.output?$Pr(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 eBr(e._def.input,n):n,o=await Reflect.apply(r,this,i);return e._def.output?await eBr(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 vBr({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)),juo=wr("$ZodPromise",(e,t)=>{hl.init(e,t),e._zod.parse=(r,n)=>Promise.resolve(r.value).then(i=>t.innerType._zod.run({value:i,issues:[]},n))}),zuo=wr("$ZodLazy",(e,t)=>{hl.init(e,t),uf(e._zod,"innerType",()=>t.getter()),uf(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),uf(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),uf(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),uf(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,n)=>e._zod.innerType._zod.run(r,n)}),Quo=wr("$ZodCustom",(e,t)=>{gy.init(e,t),hl.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=>Hcc(o,r,n,e));Hcc(i,r,n,e)}})});function $cc(){return{localeError:aad()}}var aad,euc=h(()=>{"use strict";oc();aad=()=>{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=Pi(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 ${bi(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: ${pn(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":""}: ${pn(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 tuc(){return{localeError:cad()}}var cad,ruc=h(()=>{"use strict";oc();cad=()=>{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=Pi(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 ${bi(i.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${pn(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":""}: ${pn(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 nuc(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 iuc(){return{localeError:uad()}}var uad,ouc=h(()=>{"use strict";oc();uad=()=>{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=Pi(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 ${bi(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 ${pn(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);if(s){let a=Number(i.maximum),c=nuc(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=nuc(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"}: ${pn(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 suc(){return{localeError:lad()}}var lad,auc=h(()=>{"use strict";oc();lad=()=>{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=Pi(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 ${bi(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 ${pn(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":""}: ${pn(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 cuc(){return{localeError:pad()}}var pad,uuc=h(()=>{"use strict";oc();pad=()=>{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=Pi(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 ${bi(i.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${pn(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":""}: ${pn(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 luc(){return{localeError:fad()}}var fad,puc=h(()=>{"use strict";oc();fad=()=>{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=Pi(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 ${bi(i.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${pn(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: ${pn(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 fuc(){return{localeError:dad()}}var dad,duc=h(()=>{"use strict";oc();dad=()=>{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=Pi(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 ${bi(i.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${pn(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"}: ${pn(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 muc(){return{localeError:mad()}}var mad,huc=h(()=>{"use strict";oc();mad=()=>{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=Pi(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 ${bi(i.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${pn(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"}: ${pn(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 xBr(){return{localeError:had()}}var had,Luo=h(()=>{"use strict";oc();had=()=>{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=Pi(i.input),a=n[s]??s;return`Invalid input: expected ${o}, received ${a}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${bi(i.values[0])}`:`Invalid option: expected one of ${pn(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":""}: ${pn(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 guc(){return{localeError:gad()}}var gad,Auc=h(()=>{"use strict";oc();gad=()=>{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=Pi(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 ${bi(i.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${pn(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":""}: ${pn(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 yuc(){return{localeError:Aad()}}var Aad,buc=h(()=>{"use strict";oc();Aad=()=>{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=Pi(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 ${bi(i.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${pn(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":""}: ${pn(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 Euc(){return{localeError:yad()}}var yad,Iuc=h(()=>{"use strict";oc();yad=()=>{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=Pi(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 ${bi(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 ${pn(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: ${pn(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 vuc(){return{localeError:bad()}}var bad,Cuc=h(()=>{"use strict";oc();bad=()=>{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=Pi(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 ${bi(i.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${pn(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"}: ${pn(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 xuc(){return{localeError:Ead()}}var Ead,Suc=h(()=>{"use strict";oc();Ead=()=>{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=Pi(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 : ${bi(i.values[0])} attendu`:`Option invalide : une valeur parmi ${pn(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":""} : ${pn(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 wuc(){return{localeError:Iad()}}var Iad,Tuc=h(()=>{"use strict";oc();Iad=()=>{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=Pi(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 ${bi(i.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${pn(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":""} : ${pn(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 Ouc(){return{localeError:vad()}}var vad,Puc=h(()=>{"use strict";oc();vad=()=>{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),d=Pi(u.input),f=c[d]??e[d]?.label??d;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 ${f}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${p}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`}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 ${bi(u.values[0])}`;let l=u.values.map(f=>bi(f));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 d=u.inclusive?"<=":"<",f=o(u.origin??"value");return l?.unit?`${l.longLabel} \u05DE\u05D3\u05D9: ${p} ${f} ${d}${u.maximum.toString()} ${l.unit}`:`${l?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${p} ${f} ${d}${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 d=u.inclusive?">=":">",f=o(u.origin??"value");return l?.unit?`${l.shortLabel} \u05DE\u05D3\u05D9: ${p} ${f} ${d}${u.minimum.toString()} ${l.unit}`:`${l?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${p} ${f} ${d}${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],d=p?.label??l.format,m=(p?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${d} \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"}: ${pn(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 Buc(){return{localeError:Cad()}}var Cad,Ruc=h(()=>{"use strict";oc();Cad=()=>{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=Pi(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 ${bi(i.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${pn(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":""}: ${pn(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 Duc(e,t,r){return Math.abs(e)===1?t:r}function nrt(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 kuc(){return{localeError:xad()}}var xad,Fuc=h(()=>{"use strict";oc();xad=()=>{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=Pi(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 ${bi(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 ${pn(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);if(s){let a=Number(i.maximum),c=Duc(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 ${nrt(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 ${nrt(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=Duc(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 ${nrt(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 ${nrt(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":""}. ${pn(i.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${nrt(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 ${nrt(i.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}}});function Nuc(){return{localeError:Sad()}}var Sad,juc=h(()=>{"use strict";oc();Sad=()=>{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=Pi(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 ${bi(i.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${pn(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":""}: ${pn(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 zuc(){return{localeError:wad()}}var wad,Quc=h(()=>{"use strict";oc();wad=()=>{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=Pi(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 ${bi(i.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${pn(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"}: ${pn(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 Muc(){return{localeError:Tad()}}var Tad,Luc=h(()=>{"use strict";oc();Tad=()=>{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=Pi(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 ${bi(i.values[0])}`:`Opzione non valida: atteso uno tra ${pn(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"}: ${pn(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 _uc(){return{localeError:Oad()}}var Oad,Uuc=h(()=>{"use strict";oc();Oad=()=>{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=Pi(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: ${bi(i.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${pn(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":""}: ${pn(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 Vuc(){return{localeError:Pad()}}var Pad,Guc=h(()=>{"use strict";oc();Pad=()=>{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=Pi(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 ${bi(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 ${pn(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"}: ${pn(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 SBr(){return{localeError:Bad()}}var Bad,_uo=h(()=>{"use strict";oc();Bad=()=>{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=Pi(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 ${bi(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 ${pn(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 ${pn(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 quc(){return SBr()}var Wuc=h(()=>{"use strict";_uo()});function Huc(){return{localeError:Rad()}}var Rad,Kuc=h(()=>{"use strict";oc();Rad=()=>{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=Pi(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 ${bi(i.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${pn(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: ${pn(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 Juc(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 Yuc(){return{localeError:Dad()}}var P6t,Dad,Xuc=h(()=>{"use strict";oc();P6t=e=>e.charAt(0).toUpperCase()+e.slice(1);Dad=()=>{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=Pi(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 ${bi(i.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${pn(i.values,"|")} pasirinkim\u0173`;case"too_big":{let o=n[i.origin]??i.origin,s=t(i.origin,Juc(Number(i.maximum)),i.inclusive??!1,"smaller");if(s?.verb)return`${P6t(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`${P6t(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,Juc(Number(i.minimum)),i.inclusive??!1,"bigger");if(s?.verb)return`${P6t(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`${P6t(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"}: ${pn(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`${P6t(o??i.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}}});function Zuc(){return{localeError:kad()}}var kad,$uc=h(()=>{"use strict";oc();kad=()=>{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=Pi(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 ${bi(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 ${pn(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"}: ${pn(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 elc(){return{localeError:Fad()}}var Fad,tlc=h(()=>{"use strict";oc();Fad=()=>{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=Pi(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 ${bi(i.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${pn(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: ${pn(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 rlc(){return{localeError:Nad()}}var Nad,nlc=h(()=>{"use strict";oc();Nad=()=>{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=Pi(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 ${bi(i.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${pn(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":""}: ${pn(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 ilc(){return{localeError:jad()}}var jad,olc=h(()=>{"use strict";oc();jad=()=>{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=Pi(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 ${bi(i.values[0])}`:`Ugyldig valg: forventet en av ${pn(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"}: ${pn(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 slc(){return{localeError:zad()}}var zad,alc=h(()=>{"use strict";oc();zad=()=>{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=Pi(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 ${bi(i.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${pn(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":""}: ${pn(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 clc(){return{localeError:Qad()}}var Qad,ulc=h(()=>{"use strict";oc();Qad=()=>{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=Pi(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 ${bi(i.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${pn(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"}: ${pn(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 llc(){return{localeError:Mad()}}var Mad,plc=h(()=>{"use strict";oc();Mad=()=>{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=Pi(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 ${bi(i.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${pn(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":""}: ${pn(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 flc(){return{localeError:Lad()}}var Lad,dlc=h(()=>{"use strict";oc();Lad=()=>{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=Pi(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 ${bi(i.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${pn(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":""}: ${pn(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 mlc(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 hlc(){return{localeError:_ad()}}var _ad,glc=h(()=>{"use strict";oc();_ad=()=>{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=Pi(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 ${bi(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 ${pn(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);if(s){let a=Number(i.maximum),c=mlc(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=mlc(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":""}: ${pn(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 Alc(){return{localeError:Uad()}}var Uad,ylc=h(()=>{"use strict";oc();Uad=()=>{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=Pi(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 ${bi(i.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${pn(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"}: ${pn(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 blc(){return{localeError:Vad()}}var Vad,Elc=h(()=>{"use strict";oc();Vad=()=>{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=Pi(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 ${bi(i.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${pn(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"}: ${pn(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 Ilc(){return{localeError:Gad()}}var Gad,vlc=h(()=>{"use strict";oc();Gad=()=>{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=Pi(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 ${bi(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 ${pn(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":""}: ${pn(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 Clc(){return{localeError:qad()}}var qad,xlc=h(()=>{"use strict";oc();qad=()=>{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=Pi(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 ${bi(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 ${pn(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: ${pn(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 Slc(){return{localeError:Wad()}}var Wad,wlc=h(()=>{"use strict";oc();Wad=()=>{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=Pi(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 ${bi(i.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${pn(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":""}: ${pn(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 wBr(){return{localeError:Had()}}var Had,Uuo=h(()=>{"use strict";oc();Had=()=>{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=Pi(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 ${bi(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 ${pn(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":""}: ${pn(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 Tlc(){return wBr()}var Olc=h(()=>{"use strict";Uuo()});function Plc(){return{localeError:Kad()}}var Kad,Blc=h(()=>{"use strict";oc();Kad=()=>{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=Pi(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: ${bi(i.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${pn(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":""}: ${pn(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 Rlc(){return{localeError:Jad()}}var Jad,Dlc=h(()=>{"use strict";oc();Jad=()=>{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=Pi(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 ${bi(i.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${pn(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":""}: ${pn(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 klc(){return{localeError:Yad()}}var Yad,Flc=h(()=>{"use strict";oc();Yad=()=>{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=Pi(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 ${bi(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 ${pn(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: ${pn(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 Nlc(){return{localeError:Xad()}}var Xad,jlc=h(()=>{"use strict";oc();Xad=()=>{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=Pi(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 ${bi(i.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${pn(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): ${pn(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 zlc(){return{localeError:Zad()}}var Zad,Qlc=h(()=>{"use strict";oc();Zad=()=>{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=Pi(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 ${bi(i.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${pn(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${pn(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 Mlc(){return{localeError:$ad()}}var $ad,Llc=h(()=>{"use strict";oc();$ad=()=>{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=Pi(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 ${bi(i.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${pn(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: ${pn(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 B6t={};$(B6t,{ar:()=>$cc,az:()=>tuc,be:()=>iuc,bg:()=>suc,ca:()=>cuc,cs:()=>luc,da:()=>fuc,de:()=>muc,en:()=>xBr,eo:()=>guc,es:()=>yuc,fa:()=>Euc,fi:()=>vuc,fr:()=>xuc,frCA:()=>wuc,he:()=>Ouc,hu:()=>Buc,hy:()=>kuc,id:()=>Nuc,is:()=>zuc,it:()=>Muc,ja:()=>_uc,ka:()=>Vuc,kh:()=>quc,km:()=>SBr,ko:()=>Huc,lt:()=>Yuc,mk:()=>Zuc,ms:()=>elc,nl:()=>rlc,no:()=>ilc,ota:()=>slc,pl:()=>llc,ps:()=>clc,pt:()=>flc,ru:()=>hlc,sl:()=>Alc,sv:()=>blc,ta:()=>Ilc,th:()=>Clc,tr:()=>Slc,ua:()=>Tlc,uk:()=>wBr,ur:()=>Plc,uz:()=>Rlc,vi:()=>klc,yo:()=>Mlc,zhCN:()=>Nlc,zhTW:()=>zlc});var Vuo=h(()=>{"use strict";euc();ruc();ouc();auc();uuc();puc();duc();huc();Luo();Auc();buc();Iuc();Cuc();Suc();Tuc();Puc();Ruc();Fuc();juc();Quc();Luc();Uuc();Guc();Wuc();_uo();Kuc();Xuc();$uc();tlc();nlc();olc();alc();ulc();plc();dlc();glc();ylc();Elc();vlc();xlc();wlc();Olc();Uuo();Blc();Dlc();Flc();jlc();Qlc();Llc()});function OBr(){return new TBr}var _lc,Guo,quo,TBr,AB,R6t=h(()=>{"use strict";Guo=Symbol("ZodOutput"),quo=Symbol("ZodInput"),TBr=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)}};(_lc=globalThis).__zod_globalRegistry??(_lc.__zod_globalRegistry=OBr());AB=globalThis.__zod_globalRegistry});function Wuo(e,t){return new e({type:"string",...Ui(t)})}function Huo(e,t){return new e({type:"string",coerce:!0,...Ui(t)})}function PBr(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Ui(t)})}function D6t(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ui(t)})}function BBr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Ui(t)})}function RBr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ui(t)})}function DBr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ui(t)})}function kBr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ui(t)})}function k6t(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Ui(t)})}function FBr(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Ui(t)})}function NBr(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ui(t)})}function jBr(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Ui(t)})}function zBr(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ui(t)})}function QBr(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Ui(t)})}function MBr(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Ui(t)})}function LBr(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ui(t)})}function _Br(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ui(t)})}function UBr(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ui(t)})}function Kuo(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...Ui(t)})}function VBr(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ui(t)})}function GBr(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ui(t)})}function qBr(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Ui(t)})}function WBr(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Ui(t)})}function HBr(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Ui(t)})}function KBr(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Ui(t)})}function Yuo(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ui(t)})}function Xuo(e,t){return new e({type:"string",format:"date",check:"string_format",...Ui(t)})}function Zuo(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Ui(t)})}function $uo(e,t){return new e({type:"string",format:"duration",check:"string_format",...Ui(t)})}function elo(e,t){return new e({type:"number",checks:[],...Ui(t)})}function tlo(e,t){return new e({type:"number",coerce:!0,checks:[],...Ui(t)})}function rlo(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Ui(t)})}function nlo(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...Ui(t)})}function ilo(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...Ui(t)})}function olo(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...Ui(t)})}function slo(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...Ui(t)})}function alo(e,t){return new e({type:"boolean",...Ui(t)})}function clo(e,t){return new e({type:"boolean",coerce:!0,...Ui(t)})}function ulo(e,t){return new e({type:"bigint",...Ui(t)})}function llo(e,t){return new e({type:"bigint",coerce:!0,...Ui(t)})}function plo(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...Ui(t)})}function flo(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...Ui(t)})}function dlo(e,t){return new e({type:"symbol",...Ui(t)})}function mlo(e,t){return new e({type:"undefined",...Ui(t)})}function hlo(e,t){return new e({type:"null",...Ui(t)})}function glo(e){return new e({type:"any"})}function Alo(e){return new e({type:"unknown"})}function ylo(e,t){return new e({type:"never",...Ui(t)})}function blo(e,t){return new e({type:"void",...Ui(t)})}function Elo(e,t){return new e({type:"date",...Ui(t)})}function Ilo(e,t){return new e({type:"date",coerce:!0,...Ui(t)})}function vlo(e,t){return new e({type:"nan",...Ui(t)})}function j$(e,t){return new fBr({check:"less_than",...Ui(t),value:e,inclusive:!1})}function K3(e,t){return new fBr({check:"less_than",...Ui(t),value:e,inclusive:!0})}function z$(e,t){return new dBr({check:"greater_than",...Ui(t),value:e,inclusive:!1})}function U2(e,t){return new dBr({check:"greater_than",...Ui(t),value:e,inclusive:!0})}function JBr(e){return z$(0,e)}function YBr(e){return j$(0,e)}function XBr(e){return K3(0,e)}function ZBr(e){return U2(0,e)}function lve(e,t){return new cco({check:"multiple_of",...Ui(t),value:e})}function pve(e,t){return new pco({check:"max_size",...Ui(t),maximum:e})}function Q$(e,t){return new fco({check:"min_size",...Ui(t),minimum:e})}function a6e(e,t){return new dco({check:"size_equals",...Ui(t),size:e})}function c6e(e,t){return new mco({check:"max_length",...Ui(t),maximum:e})}function Kfe(e,t){return new hco({check:"min_length",...Ui(t),minimum:e})}function u6e(e,t){return new gco({check:"length_equals",...Ui(t),length:e})}function irt(e,t){return new Aco({check:"string_format",format:"regex",...Ui(t),pattern:e})}function ort(e){return new yco({check:"string_format",format:"lowercase",...Ui(e)})}function srt(e){return new bco({check:"string_format",format:"uppercase",...Ui(e)})}function art(e,t){return new Eco({check:"string_format",format:"includes",...Ui(t),includes:e})}function crt(e,t){return new Ico({check:"string_format",format:"starts_with",...Ui(t),prefix:e})}function urt(e,t){return new vco({check:"string_format",format:"ends_with",...Ui(t),suffix:e})}function $Br(e,t,r){return new Cco({check:"property",property:e,schema:t,...Ui(r)})}function lrt(e,t){return new xco({check:"mime_type",mime:e,...Ui(t)})}function aK(e){return new Sco({check:"overwrite",tx:e})}function prt(e){return aK(t=>t.normalize(e))}function frt(){return aK(e=>e.trim())}function drt(){return aK(e=>e.toLowerCase())}function mrt(){return aK(e=>e.toUpperCase())}function hrt(){return aK(e=>Iao(e))}function Clo(e,t,r){return new e({type:"array",element:t,...Ui(r)})}function tcd(e,t,r){return new e({type:"union",options:t,...Ui(r)})}function rcd(e,t,r){return new e({type:"union",options:t,inclusive:!1,...Ui(r)})}function ncd(e,t,r,n){return new e({type:"union",options:r,discriminator:t,...Ui(n)})}function icd(e,t,r){return new e({type:"intersection",left:t,right:r})}function ocd(e,t,r,n){let i=r instanceof hl,o=i?n:r,s=i?r:null;return new e({type:"tuple",items:t,rest:s,...Ui(o)})}function scd(e,t,r,n){return new e({type:"record",keyType:t,valueType:r,...Ui(n)})}function acd(e,t,r,n){return new e({type:"map",keyType:t,valueType:r,...Ui(n)})}function ccd(e,t,r){return new e({type:"set",valueType:t,...Ui(r)})}function ucd(e,t,r){let n=Array.isArray(t)?Object.fromEntries(t.map(i=>[i,i])):t;return new e({type:"enum",entries:n,...Ui(r)})}function lcd(e,t,r){return new e({type:"enum",entries:t,...Ui(r)})}function pcd(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...Ui(r)})}function xlo(e,t){return new e({type:"file",...Ui(t)})}function fcd(e,t){return new e({type:"transform",transform:t})}function dcd(e,t){return new e({type:"optional",innerType:t})}function mcd(e,t){return new e({type:"nullable",innerType:t})}function hcd(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():Cao(r)}})}function gcd(e,t,r){return new e({type:"nonoptional",innerType:t,...Ui(r)})}function Acd(e,t){return new e({type:"success",innerType:t})}function ycd(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function bcd(e,t,r){return new e({type:"pipe",in:t,out:r})}function Ecd(e,t){return new e({type:"readonly",innerType:t})}function Icd(e,t,r){return new e({type:"template_literal",parts:t,...Ui(r)})}function vcd(e,t){return new e({type:"lazy",getter:t})}function Ccd(e,t){return new e({type:"promise",innerType:t})}function Slo(e,t,r){let n=Ui(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}function wlo(e,t,r){return new e({type:"custom",check:"custom",fn:t,...Ui(r)})}function Tlo(e){let t=Ulc(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(Xtt(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(Xtt(i))}},e(r.value,r)));return t}function Ulc(e,t){let r=new gy({check:"custom",...Ui(t)});return r._zod.check=e,r}function Olo(e){let t=new gy({check:"describe"});return t._zod.onattach=[r=>{let n=AB.get(r)??{};AB.add(r,{...n,description:e})}],t._zod.check=()=>{},t}function Plo(e){let t=new gy({check:"meta"});return t._zod.onattach=[r=>{let n=AB.get(r)??{};AB.add(r,{...n,...e})}],t._zod.check=()=>{},t}function Blo(e,t){let r=Ui(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(f=>typeof f=="string"?f.toLowerCase():f),i=i.map(f=>typeof f=="string"?f.toLowerCase():f));let o=new Set(n),s=new Set(i),a=e.Codec??O6t,c=e.Boolean??w6t,u=e.String??s6e,l=new u({type:"string",error:r.error}),p=new c({type:"boolean",error:r.error}),d=new a({type:"pipe",in:l,out:p,transform:((f,m)=>{let g=f;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:d,continue:!1}),{})}),reverseTransform:((f,m)=>f===!0?n[0]||"true":i[0]||"false"),error:r.error});return d}function grt(e,t,r,n={}){let i=Ui(n),o={...Ui(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 Juo,Vlc=h(()=>{"use strict";mBr();R6t();Muo();oc();Juo={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}});function fve(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??AB,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 xg(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 d=s.schema,f=t.processors[i.type];if(!f)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);f(e,t,d,l)}let p=e._zod.parent;p&&(s.ref||(s.ref=p),xg(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"&&V2(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 dve(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,d=e.external.uri??(m=>m);if(p)return{ref:d(p)};let f=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=f,{defId:f,ref:`${d("__shared")}#/${a}/${f}`}}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 mve(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 d=e.seen.get(l),f=d.schema;if(f.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(f)):Object.assign(c,f),Object.assign(c,u),s._zod.parent===l)for(let g in c)g==="$ref"||g==="allOf"||g in u||delete c[g];if(f.$ref&&d.def)for(let g in c)g==="$ref"||g==="allOf"||g in d.def&&JSON.stringify(c[g])===JSON.stringify(d.def[g])&&delete c[g]}let p=s._zod.parent;if(p&&p!==l){n(p);let d=e.seen.get(p);if(d?.schema.$ref&&(c.$ref=d.schema.$ref,d.def))for(let f in c)f==="$ref"||f==="allOf"||f in d.def&&JSON.stringify(c[f])===JSON.stringify(d.def[f])&&delete c[f]}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:Art(t,"input",e.processors),output:Art(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function V2(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 V2(n.element,r);if(n.type==="set")return V2(n.valueType,r);if(n.type==="lazy")return V2(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 V2(n.innerType,r);if(n.type==="intersection")return V2(n.left,r)||V2(n.right,r);if(n.type==="record"||n.type==="map")return V2(n.keyType,r)||V2(n.valueType,r);if(n.type==="pipe")return V2(n.in,r)||V2(n.out,r);if(n.type==="object"){for(let i in n.shape)if(V2(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(let i of n.options)if(V2(i,r))return!0;return!1}if(n.type==="tuple"){for(let i of n.items)if(V2(i,r))return!0;return!!(n.rest&&V2(n.rest,r))}return!1}var Rlo,Art,F6t=h(()=>{"use strict";R6t();Rlo=(e,t={})=>r=>{let n=fve({...r,processors:t});return xg(e,n),dve(n,e),mve(n,e)},Art=(e,t,r={})=>n=>{let{libraryOptions:i,target:o}=n??{},s=fve({...i??{},target:o,io:t,processors:r});return xg(e,s),dve(s,e),mve(s,e)}});function nRr(e,t){if("_idmap"in e){let n=e,i=fve({...t,processors:eRr}),o={};for(let c of n._idmap.entries()){let[u,l]=c;xg(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;dve(i,l),s[u]=mve(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=fve({...t,processors:eRr});return xg(e,r),dve(r,e),mve(r,e)}var xcd,Dlo,klo,Flo,Nlo,jlo,zlo,Qlo,Mlo,Llo,_lo,Ulo,Vlo,Glo,qlo,Wlo,Hlo,Klo,Jlo,Ylo,Xlo,Zlo,$lo,epo,tpo,rpo,tRr,npo,ipo,opo,spo,apo,cpo,upo,lpo,ppo,fpo,dpo,rRr,mpo,eRr,N6t=h(()=>{"use strict";F6t();oc();xcd={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Dlo=(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=xcd[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}))])}},klo=(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)},Flo=(e,t,r,n)=>{r.type="boolean"},Nlo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},jlo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},zlo=(e,t,r,n)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},Qlo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Mlo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Llo=(e,t,r,n)=>{r.not={}},_lo=(e,t,r,n)=>{},Ulo=(e,t,r,n)=>{},Vlo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Glo=(e,t,r,n)=>{let i=e._zod.def,o=h6t(i.entries);o.every(s=>typeof s=="number")&&(r.type="number"),o.every(s=>typeof s=="string")&&(r.type="string"),r.enum=o},qlo=(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},Wlo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Hlo=(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},Klo=(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)},Jlo=(e,t,r,n)=>{r.type="boolean"},Ylo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Xlo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Zlo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},$lo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},epo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},tpo=(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=xg(o.element,t,{...n,path:[...n.path,"items"]})},rpo=(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]=xg(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=xg(o.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},tRr=(e,t,r,n)=>{let i=e._zod.def,o=i.inclusive===!1,s=i.options.map((a,c)=>xg(a,t,{...n,path:[...n.path,o?"oneOf":"anyOf",c]}));o?r.oneOf=s:r.anyOf=s},npo=(e,t,r,n)=>{let i=e._zod.def,o=xg(i.left,t,{...n,path:[...n.path,"allOf",0]}),s=xg(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},ipo=(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((d,f)=>xg(d,t,{...n,path:[...n.path,s,f]})),u=o.rest?xg(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)},opo=(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=xg(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=xg(o.keyType,t,{...n,path:[...n.path,"propertyNames"]})),i.additionalProperties=xg(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)}},spo=(e,t,r,n)=>{let i=e._zod.def,o=xg(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"}]},apo=(e,t,r,n)=>{let i=e._zod.def;xg(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType},cpo=(e,t,r,n)=>{let i=e._zod.def;xg(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},upo=(e,t,r,n)=>{let i=e._zod.def;xg(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)))},lpo=(e,t,r,n)=>{let i=e._zod.def;xg(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},ppo=(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;xg(o,t,n);let s=t.seen.get(e);s.ref=o},fpo=(e,t,r,n)=>{let i=e._zod.def;xg(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType,r.readOnly=!0},dpo=(e,t,r,n)=>{let i=e._zod.def;xg(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType},rRr=(e,t,r,n)=>{let i=e._zod.def;xg(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType},mpo=(e,t,r,n)=>{let i=e._zod.innerType;xg(i,t,n);let o=t.seen.get(e);o.ref=i},eRr={string:Dlo,number:klo,boolean:Flo,bigint:Nlo,symbol:jlo,null:zlo,undefined:Qlo,void:Mlo,never:Llo,any:_lo,unknown:Ulo,date:Vlo,enum:Glo,literal:qlo,nan:Wlo,template_literal:Hlo,file:Klo,success:Jlo,custom:Ylo,function:Xlo,transform:Zlo,map:$lo,set:epo,array:tpo,object:rpo,union:tRr,intersection:npo,tuple:ipo,record:opo,nullable:spo,nonoptional:apo,default:cpo,prefault:upo,catch:lpo,pipe:ppo,readonly:fpo,promise:dpo,optional:rRr,lazy:mpo}});var iRr,Glc=h(()=>{"use strict";N6t();F6t();iRr=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=fve({processors:eRr,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 xg(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)),dve(this.ctx,t);let n=mve(this.ctx,t),{"~standard":i,...o}=n;return o}}});var qlc={};var Wlc=h(()=>{"use strict"});var Jfe={};$(Jfe,{$ZodAny:()=>auo,$ZodArray:()=>fuo,$ZodAsyncError:()=>sK,$ZodBase64:()=>Xco,$ZodBase64URL:()=>Zco,$ZodBigInt:()=>IBr,$ZodBigIntFormat:()=>nuo,$ZodBoolean:()=>w6t,$ZodCIDRv4:()=>Kco,$ZodCIDRv6:()=>Jco,$ZodCUID:()=>jco,$ZodCUID2:()=>zco,$ZodCatch:()=>Buo,$ZodCheck:()=>gy,$ZodCheckBigIntFormat:()=>lco,$ZodCheckEndsWith:()=>vco,$ZodCheckGreaterThan:()=>dBr,$ZodCheckIncludes:()=>Eco,$ZodCheckLengthEquals:()=>gco,$ZodCheckLessThan:()=>fBr,$ZodCheckLowerCase:()=>yco,$ZodCheckMaxLength:()=>mco,$ZodCheckMaxSize:()=>pco,$ZodCheckMimeType:()=>xco,$ZodCheckMinLength:()=>hco,$ZodCheckMinSize:()=>fco,$ZodCheckMultipleOf:()=>cco,$ZodCheckNumberFormat:()=>uco,$ZodCheckOverwrite:()=>Sco,$ZodCheckProperty:()=>Cco,$ZodCheckRegex:()=>Aco,$ZodCheckSizeEquals:()=>dco,$ZodCheckStartsWith:()=>Ico,$ZodCheckStringFormat:()=>rrt,$ZodCheckUpperCase:()=>bco,$ZodCodec:()=>O6t,$ZodCustom:()=>Quo,$ZodCustomStringFormat:()=>tuo,$ZodDate:()=>puo,$ZodDefault:()=>wuo,$ZodDiscriminatedUnion:()=>huo,$ZodE164:()=>$co,$ZodEmail:()=>Dco,$ZodEmoji:()=>Fco,$ZodEncodeError:()=>ove,$ZodEnum:()=>Euo,$ZodError:()=>E6t,$ZodExactOptional:()=>xuo,$ZodFile:()=>vuo,$ZodFunction:()=>Nuo,$ZodGUID:()=>Bco,$ZodIPv4:()=>qco,$ZodIPv6:()=>Wco,$ZodISODate:()=>Uco,$ZodISODateTime:()=>_co,$ZodISODuration:()=>Gco,$ZodISOTime:()=>Vco,$ZodIntersection:()=>guo,$ZodJWT:()=>euo,$ZodKSUID:()=>Lco,$ZodLazy:()=>zuo,$ZodLiteral:()=>Iuo,$ZodMAC:()=>Hco,$ZodMap:()=>yuo,$ZodNaN:()=>Ruo,$ZodNanoID:()=>Nco,$ZodNever:()=>uuo,$ZodNonOptional:()=>Ouo,$ZodNull:()=>suo,$ZodNullable:()=>Suo,$ZodNumber:()=>EBr,$ZodNumberFormat:()=>ruo,$ZodObject:()=>Zcc,$ZodObjectJIT:()=>duo,$ZodOptional:()=>CBr,$ZodPipe:()=>Duo,$ZodPrefault:()=>Tuo,$ZodPromise:()=>juo,$ZodReadonly:()=>kuo,$ZodRealError:()=>EQ,$ZodRecord:()=>Auo,$ZodRegistry:()=>TBr,$ZodSet:()=>buo,$ZodString:()=>s6e,$ZodStringFormat:()=>LA,$ZodSuccess:()=>Puo,$ZodSymbol:()=>iuo,$ZodTemplateLiteral:()=>Fuo,$ZodTransform:()=>Cuo,$ZodTuple:()=>vBr,$ZodType:()=>hl,$ZodULID:()=>Qco,$ZodURL:()=>kco,$ZodUUID:()=>Rco,$ZodUndefined:()=>ouo,$ZodUnion:()=>T6t,$ZodUnknown:()=>cuo,$ZodVoid:()=>luo,$ZodXID:()=>Mco,$ZodXor:()=>muo,$brand:()=>YPr,$constructor:()=>wr,$input:()=>quo,$output:()=>Guo,Doc:()=>S6t,JSONSchema:()=>qlc,JSONSchemaGenerator:()=>iRr,NEVER:()=>Aao,TimePrecision:()=>Juo,_any:()=>glo,_array:()=>Clo,_base64:()=>qBr,_base64url:()=>WBr,_bigint:()=>ulo,_boolean:()=>alo,_catch:()=>ycd,_check:()=>Ulc,_cidrv4:()=>VBr,_cidrv6:()=>GBr,_coercedBigint:()=>llo,_coercedBoolean:()=>clo,_coercedDate:()=>Ilo,_coercedNumber:()=>tlo,_coercedString:()=>Huo,_cuid:()=>jBr,_cuid2:()=>zBr,_custom:()=>Slo,_date:()=>Elo,_decode:()=>rBr,_decodeAsync:()=>iBr,_default:()=>hcd,_discriminatedUnion:()=>ncd,_e164:()=>HBr,_email:()=>PBr,_emoji:()=>FBr,_encode:()=>tBr,_encodeAsync:()=>nBr,_endsWith:()=>urt,_enum:()=>ucd,_file:()=>xlo,_float32:()=>nlo,_float64:()=>ilo,_gt:()=>z$,_gte:()=>U2,_guid:()=>D6t,_includes:()=>art,_int:()=>rlo,_int32:()=>olo,_int64:()=>plo,_intersection:()=>icd,_ipv4:()=>_Br,_ipv6:()=>UBr,_isoDate:()=>Xuo,_isoDateTime:()=>Yuo,_isoDuration:()=>$uo,_isoTime:()=>Zuo,_jwt:()=>KBr,_ksuid:()=>LBr,_lazy:()=>vcd,_length:()=>u6e,_literal:()=>pcd,_lowercase:()=>ort,_lt:()=>j$,_lte:()=>K3,_mac:()=>Kuo,_map:()=>acd,_max:()=>K3,_maxLength:()=>c6e,_maxSize:()=>pve,_mime:()=>lrt,_min:()=>U2,_minLength:()=>Kfe,_minSize:()=>Q$,_multipleOf:()=>lve,_nan:()=>vlo,_nanoid:()=>NBr,_nativeEnum:()=>lcd,_negative:()=>YBr,_never:()=>ylo,_nonnegative:()=>ZBr,_nonoptional:()=>gcd,_nonpositive:()=>XBr,_normalize:()=>prt,_null:()=>hlo,_nullable:()=>mcd,_number:()=>elo,_optional:()=>dcd,_overwrite:()=>aK,_parse:()=>Ztt,_parseAsync:()=>$tt,_pipe:()=>bcd,_positive:()=>JBr,_promise:()=>Ccd,_property:()=>$Br,_readonly:()=>Ecd,_record:()=>scd,_refine:()=>wlo,_regex:()=>irt,_safeDecode:()=>sBr,_safeDecodeAsync:()=>cBr,_safeEncode:()=>oBr,_safeEncodeAsync:()=>aBr,_safeParse:()=>ert,_safeParseAsync:()=>trt,_set:()=>ccd,_size:()=>a6e,_slugify:()=>hrt,_startsWith:()=>crt,_string:()=>Wuo,_stringFormat:()=>grt,_stringbool:()=>Blo,_success:()=>Acd,_superRefine:()=>Tlo,_symbol:()=>dlo,_templateLiteral:()=>Icd,_toLowerCase:()=>drt,_toUpperCase:()=>mrt,_transform:()=>fcd,_trim:()=>frt,_tuple:()=>ocd,_uint32:()=>slo,_uint64:()=>flo,_ulid:()=>QBr,_undefined:()=>mlo,_union:()=>tcd,_unknown:()=>Alo,_uppercase:()=>srt,_url:()=>k6t,_uuid:()=>BBr,_uuidv4:()=>RBr,_uuidv6:()=>DBr,_uuidv7:()=>kBr,_void:()=>blo,_xid:()=>MBr,_xor:()=>rcd,clone:()=>_2,config:()=>Iv,createStandardJSONSchemaMethod:()=>Art,createToJSONSchemaMethod:()=>Rlo,decode:()=>wsd,decodeAsync:()=>Osd,describe:()=>Olo,encode:()=>Ssd,encodeAsync:()=>Tsd,extractDefs:()=>dve,finalize:()=>mve,flattenError:()=>I6t,formatError:()=>v6t,globalConfig:()=>d6t,globalRegistry:()=>AB,initializeContext:()=>fve,isValidBase64:()=>Yco,isValidBase64URL:()=>Kcc,isValidJWT:()=>Jcc,locales:()=>B6t,meta:()=>Plo,parse:()=>$Pr,parseAsync:()=>eBr,prettifyError:()=>Pao,process:()=>xg,regexes:()=>d5,registry:()=>OBr,safeDecode:()=>Bsd,safeDecodeAsync:()=>Dsd,safeEncode:()=>Psd,safeEncodeAsync:()=>Rsd,safeParse:()=>Rao,safeParseAsync:()=>Dao,toDotPath:()=>Bcc,toJSONSchema:()=>nRr,treeifyError:()=>Oao,util:()=>ki,version:()=>Tco});var IQ=h(()=>{"use strict";Ktt();kao();Bao();Muo();mBr();Oco();oc();pBr();Vuo();R6t();wco();Vlc();F6t();N6t();Glc();Wlc()});var oRr={};$(oRr,{endsWith:()=>urt,gt:()=>z$,gte:()=>U2,includes:()=>art,length:()=>u6e,lowercase:()=>ort,lt:()=>j$,lte:()=>K3,maxLength:()=>c6e,maxSize:()=>pve,mime:()=>lrt,minLength:()=>Kfe,minSize:()=>Q$,multipleOf:()=>lve,negative:()=>YBr,nonnegative:()=>ZBr,nonpositive:()=>XBr,normalize:()=>prt,overwrite:()=>aK,positive:()=>JBr,property:()=>$Br,regex:()=>irt,size:()=>a6e,slugify:()=>hrt,startsWith:()=>crt,toLowerCase:()=>drt,toUpperCase:()=>mrt,trim:()=>frt,uppercase:()=>srt});var sRr=h(()=>{"use strict";IQ()});var yrt={};$(yrt,{ZodISODate:()=>cRr,ZodISODateTime:()=>aRr,ZodISODuration:()=>lRr,ZodISOTime:()=>uRr,date:()=>gpo,datetime:()=>hpo,duration:()=>ypo,time:()=>Apo});function hpo(e){return Yuo(aRr,e)}function gpo(e){return Xuo(cRr,e)}function Apo(e){return Zuo(uRr,e)}function ypo(e){return $uo(lRr,e)}var aRr,cRr,uRr,lRr,j6t=h(()=>{"use strict";IQ();Q6t();aRr=wr("ZodISODateTime",(e,t)=>{_co.init(e,t),_A.init(e,t)});cRr=wr("ZodISODate",(e,t)=>{Uco.init(e,t),_A.init(e,t)});uRr=wr("ZodISOTime",(e,t)=>{Vco.init(e,t),_A.init(e,t)});lRr=wr("ZodISODuration",(e,t)=>{Gco.init(e,t),_A.init(e,t)})});var Hlc,wcd,vQ,bpo=h(()=>{"use strict";IQ();IQ();oc();Hlc=(e,t)=>{E6t.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>v6t(e,r)},flatten:{value:r=>I6t(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Jtt,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Jtt,2)}},isEmpty:{get(){return e.issues.length===0}}})},wcd=wr("ZodError",Hlc),vQ=wr("ZodError",Hlc,{Parent:Error})});var Epo,Ipo,vpo,Cpo,xpo,Spo,wpo,Tpo,Opo,Ppo,Bpo,Rpo,Dpo=h(()=>{"use strict";IQ();bpo();Epo=Ztt(vQ),Ipo=$tt(vQ),vpo=ert(vQ),Cpo=trt(vQ),xpo=tBr(vQ),Spo=rBr(vQ),wpo=nBr(vQ),Tpo=iBr(vQ),Opo=oBr(vQ),Ppo=sBr(vQ),Bpo=aBr(vQ),Rpo=cBr(vQ)});var z6t={};$(z6t,{ZodAny:()=>Lpo,ZodArray:()=>Gpo,ZodBase64:()=>wRr,ZodBase64URL:()=>TRr,ZodBigInt:()=>xrt,ZodBigIntFormat:()=>BRr,ZodBoolean:()=>Crt,ZodCIDRv4:()=>xRr,ZodCIDRv6:()=>SRr,ZodCUID:()=>ARr,ZodCUID2:()=>yRr,ZodCatch:()=>ffo,ZodCodec:()=>QRr,ZodCustom:()=>J6t,ZodCustomStringFormat:()=>Irt,ZodDate:()=>G6t,ZodDefault:()=>sfo,ZodDiscriminatedUnion:()=>Wpo,ZodE164:()=>ORr,ZodEmail:()=>mRr,ZodEmoji:()=>hRr,ZodEnum:()=>brt,ZodExactOptional:()=>nfo,ZodFile:()=>tfo,ZodFunction:()=>Ifo,ZodGUID:()=>M6t,ZodIPv4:()=>vRr,ZodIPv6:()=>CRr,ZodIntersection:()=>Hpo,ZodJWT:()=>PRr,ZodKSUID:()=>IRr,ZodLazy:()=>yfo,ZodLiteral:()=>efo,ZodMAC:()=>kpo,ZodMap:()=>Zpo,ZodNaN:()=>mfo,ZodNanoID:()=>gRr,ZodNever:()=>Upo,ZodNonOptional:()=>jRr,ZodNull:()=>Qpo,ZodNullable:()=>ofo,ZodNumber:()=>vrt,ZodNumberFormat:()=>p6e,ZodObject:()=>W6t,ZodOptional:()=>NRr,ZodPipe:()=>zRr,ZodPrefault:()=>cfo,ZodPromise:()=>Efo,ZodReadonly:()=>hfo,ZodRecord:()=>K6t,ZodSet:()=>$po,ZodString:()=>Ert,ZodStringFormat:()=>_A,ZodSuccess:()=>pfo,ZodSymbol:()=>jpo,ZodTemplateLiteral:()=>Afo,ZodTransform:()=>rfo,ZodTuple:()=>Jpo,ZodType:()=>Dp,ZodULID:()=>bRr,ZodURL:()=>V6t,ZodUUID:()=>M$,ZodUndefined:()=>zpo,ZodUnion:()=>H6t,ZodUnknown:()=>_po,ZodVoid:()=>Vpo,ZodXID:()=>ERr,ZodXor:()=>qpo,_ZodString:()=>dRr,_default:()=>afo,_function:()=>$pc,any:()=>Rpc,array:()=>q6t,base64:()=>mpc,base64url:()=>hpc,bigint:()=>wpc,boolean:()=>Npo,catch:()=>dfo,check:()=>efc,cidrv4:()=>fpc,cidrv6:()=>dpc,codec:()=>Ypc,cuid:()=>ipc,cuid2:()=>opc,custom:()=>tfc,date:()=>kpc,describe:()=>rfc,discriminatedUnion:()=>Mpc,e164:()=>gpc,email:()=>Klc,emoji:()=>rpc,enum:()=>kRr,exactOptional:()=>ifo,file:()=>Wpc,float32:()=>vpc,float64:()=>Cpc,function:()=>$pc,guid:()=>Jlc,hash:()=>Ipc,hex:()=>Epc,hostname:()=>bpc,httpUrl:()=>tpc,instanceof:()=>ifc,int:()=>fRr,int32:()=>xpc,int64:()=>Tpc,intersection:()=>Kpo,ipv4:()=>upc,ipv6:()=>ppc,json:()=>sfc,jwt:()=>Apc,keyof:()=>Fpc,ksuid:()=>cpc,lazy:()=>bfo,literal:()=>qpc,looseObject:()=>zpc,looseRecord:()=>_pc,mac:()=>lpc,map:()=>Upc,meta:()=>nfc,nan:()=>Jpc,nanoid:()=>npc,nativeEnum:()=>Gpc,never:()=>RRr,nonoptional:()=>lfo,null:()=>Mpo,nullable:()=>_6t,nullish:()=>Hpc,number:()=>Fpo,object:()=>Npc,optional:()=>L6t,partialRecord:()=>Lpc,pipe:()=>U6t,prefault:()=>ufo,preprocess:()=>afc,promise:()=>Zpc,readonly:()=>gfo,record:()=>Xpo,refine:()=>vfo,set:()=>Vpc,strictObject:()=>jpc,string:()=>pRr,stringFormat:()=>ypc,stringbool:()=>ofc,success:()=>Kpc,superRefine:()=>Cfo,symbol:()=>Ppc,templateLiteral:()=>Xpc,transform:()=>FRr,tuple:()=>Ypo,uint32:()=>Spc,uint64:()=>Opc,ulid:()=>spc,undefined:()=>Bpc,union:()=>DRr,unknown:()=>l6e,url:()=>epc,uuid:()=>Ylc,uuidv4:()=>Xlc,uuidv6:()=>Zlc,uuidv7:()=>$lc,void:()=>Dpc,xid:()=>apc,xor:()=>Qpc});function pRr(e){return Wuo(Ert,e)}function Klc(e){return PBr(mRr,e)}function Jlc(e){return D6t(M6t,e)}function Ylc(e){return BBr(M$,e)}function Xlc(e){return RBr(M$,e)}function Zlc(e){return DBr(M$,e)}function $lc(e){return kBr(M$,e)}function epc(e){return k6t(V6t,e)}function tpc(e){return k6t(V6t,{protocol:/^https?$/,hostname:d5.domain,...ki.normalizeParams(e)})}function rpc(e){return FBr(hRr,e)}function npc(e){return NBr(gRr,e)}function ipc(e){return jBr(ARr,e)}function opc(e){return zBr(yRr,e)}function spc(e){return QBr(bRr,e)}function apc(e){return MBr(ERr,e)}function cpc(e){return LBr(IRr,e)}function upc(e){return _Br(vRr,e)}function lpc(e){return Kuo(kpo,e)}function ppc(e){return UBr(CRr,e)}function fpc(e){return VBr(xRr,e)}function dpc(e){return GBr(SRr,e)}function mpc(e){return qBr(wRr,e)}function hpc(e){return WBr(TRr,e)}function gpc(e){return HBr(ORr,e)}function Apc(e){return KBr(PRr,e)}function ypc(e,t,r={}){return grt(Irt,e,t,r)}function bpc(e){return grt(Irt,"hostname",d5.hostname,e)}function Epc(e){return grt(Irt,"hex",d5.hex,e)}function Ipc(e,t){let r=t?.enc??"hex",n=`${e}_${r}`,i=d5[n];if(!i)throw new Error(`Unrecognized hash format: ${n}`);return grt(Irt,n,i,t)}function Fpo(e){return elo(vrt,e)}function fRr(e){return rlo(p6e,e)}function vpc(e){return nlo(p6e,e)}function Cpc(e){return ilo(p6e,e)}function xpc(e){return olo(p6e,e)}function Spc(e){return slo(p6e,e)}function Npo(e){return alo(Crt,e)}function wpc(e){return ulo(xrt,e)}function Tpc(e){return plo(BRr,e)}function Opc(e){return flo(BRr,e)}function Ppc(e){return dlo(jpo,e)}function Bpc(e){return mlo(zpo,e)}function Mpo(e){return hlo(Qpo,e)}function Rpc(){return glo(Lpo)}function l6e(){return Alo(_po)}function RRr(e){return ylo(Upo,e)}function Dpc(e){return blo(Vpo,e)}function kpc(e){return Elo(G6t,e)}function q6t(e,t){return Clo(Gpo,e,t)}function Fpc(e){let t=e._zod.def.shape;return kRr(Object.keys(t))}function Npc(e,t){let r={type:"object",shape:e??{},...ki.normalizeParams(t)};return new W6t(r)}function jpc(e,t){return new W6t({type:"object",shape:e,catchall:RRr(),...ki.normalizeParams(t)})}function zpc(e,t){return new W6t({type:"object",shape:e,catchall:l6e(),...ki.normalizeParams(t)})}function DRr(e,t){return new H6t({type:"union",options:e,...ki.normalizeParams(t)})}function Qpc(e,t){return new qpo({type:"union",options:e,inclusive:!1,...ki.normalizeParams(t)})}function Mpc(e,t,r){return new Wpo({type:"union",options:t,discriminator:e,...ki.normalizeParams(r)})}function Kpo(e,t){return new Hpo({type:"intersection",left:e,right:t})}function Ypo(e,t,r){let n=t instanceof hl,i=n?r:t,o=n?t:null;return new Jpo({type:"tuple",items:e,rest:o,...ki.normalizeParams(i)})}function Xpo(e,t,r){return new K6t({type:"record",keyType:e,valueType:t,...ki.normalizeParams(r)})}function Lpc(e,t,r){let n=_2(e);return n._zod.values=void 0,new K6t({type:"record",keyType:n,valueType:t,...ki.normalizeParams(r)})}function _pc(e,t,r){return new K6t({type:"record",keyType:e,valueType:t,mode:"loose",...ki.normalizeParams(r)})}function Upc(e,t,r){return new Zpo({type:"map",keyType:e,valueType:t,...ki.normalizeParams(r)})}function Vpc(e,t){return new $po({type:"set",valueType:e,...ki.normalizeParams(t)})}function kRr(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new brt({type:"enum",entries:r,...ki.normalizeParams(t)})}function Gpc(e,t){return new brt({type:"enum",entries:e,...ki.normalizeParams(t)})}function qpc(e,t){return new efo({type:"literal",values:Array.isArray(e)?e:[e],...ki.normalizeParams(t)})}function Wpc(e){return xlo(tfo,e)}function FRr(e){return new rfo({type:"transform",transform:e})}function L6t(e){return new NRr({type:"optional",innerType:e})}function ifo(e){return new nfo({type:"optional",innerType:e})}function _6t(e){return new ofo({type:"nullable",innerType:e})}function Hpc(e){return L6t(_6t(e))}function afo(e,t){return new sfo({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():ki.shallowClone(t)}})}function ufo(e,t){return new cfo({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():ki.shallowClone(t)}})}function lfo(e,t){return new jRr({type:"nonoptional",innerType:e,...ki.normalizeParams(t)})}function Kpc(e){return new pfo({type:"success",innerType:e})}function dfo(e,t){return new ffo({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function Jpc(e){return vlo(mfo,e)}function U6t(e,t){return new zRr({type:"pipe",in:e,out:t})}function Ypc(e,t,r){return new QRr({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function gfo(e){return new hfo({type:"readonly",innerType:e})}function Xpc(e,t){return new Afo({type:"template_literal",parts:e,...ki.normalizeParams(t)})}function bfo(e){return new yfo({type:"lazy",getter:e})}function Zpc(e){return new Efo({type:"promise",innerType:e})}function $pc(e){return new Ifo({type:"function",input:Array.isArray(e?.input)?Ypo(e?.input):e?.input??q6t(l6e()),output:e?.output??l6e()})}function efc(e){let t=new gy({check:"custom"});return t._zod.check=e,t}function tfc(e,t){return Slo(J6t,e??(()=>!0),t)}function vfo(e,t={}){return wlo(J6t,e,t)}function Cfo(e){return Tlo(e)}function ifc(e,t={}){let r=new J6t({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...ki.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 sfc(e){let t=bfo(()=>DRr([pRr(e),Fpo(),Npo(),Mpo(),q6t(t),Xpo(pRr(),t)]));return t}function afc(e,t){return U6t(FRr(e),t)}var Dp,dRr,Ert,_A,mRr,M6t,M$,V6t,hRr,gRr,ARr,yRr,bRr,ERr,IRr,vRr,kpo,CRr,xRr,SRr,wRr,TRr,ORr,PRr,Irt,vrt,p6e,Crt,xrt,BRr,jpo,zpo,Qpo,Lpo,_po,Upo,Vpo,G6t,Gpo,W6t,H6t,qpo,Wpo,Hpo,Jpo,K6t,Zpo,$po,brt,efo,tfo,rfo,NRr,nfo,ofo,sfo,cfo,jRr,pfo,ffo,mfo,zRr,QRr,hfo,Afo,yfo,Efo,Ifo,J6t,rfc,nfc,ofc,Q6t=h(()=>{"use strict";IQ();IQ();N6t();F6t();sRr();j6t();Dpo();Dp=wr("ZodType",(e,t)=>(hl.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Art(e,"input"),output:Art(e,"output")}}),e.toJSONSchema=Rlo(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(ki.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)=>_2(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>Epo(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>vpo(e,r,n),e.parseAsync=async(r,n)=>Ipo(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>Cpo(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>xpo(e,r,n),e.decode=(r,n)=>Spo(e,r,n),e.encodeAsync=async(r,n)=>wpo(e,r,n),e.decodeAsync=async(r,n)=>Tpo(e,r,n),e.safeEncode=(r,n)=>Opo(e,r,n),e.safeDecode=(r,n)=>Ppo(e,r,n),e.safeEncodeAsync=async(r,n)=>Bpo(e,r,n),e.safeDecodeAsync=async(r,n)=>Rpo(e,r,n),e.refine=(r,n)=>e.check(vfo(r,n)),e.superRefine=r=>e.check(Cfo(r)),e.overwrite=r=>e.check(aK(r)),e.optional=()=>L6t(e),e.exactOptional=()=>ifo(e),e.nullable=()=>_6t(e),e.nullish=()=>L6t(_6t(e)),e.nonoptional=r=>lfo(e,r),e.array=()=>q6t(e),e.or=r=>DRr([e,r]),e.and=r=>Kpo(e,r),e.transform=r=>U6t(e,FRr(r)),e.default=r=>afo(e,r),e.prefault=r=>ufo(e,r),e.catch=r=>dfo(e,r),e.pipe=r=>U6t(e,r),e.readonly=()=>gfo(e),e.describe=r=>{let n=e.clone();return AB.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return AB.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return AB.get(e);let n=e.clone();return AB.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),dRr=wr("_ZodString",(e,t)=>{s6e.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>Dlo(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(irt(...n)),e.includes=(...n)=>e.check(art(...n)),e.startsWith=(...n)=>e.check(crt(...n)),e.endsWith=(...n)=>e.check(urt(...n)),e.min=(...n)=>e.check(Kfe(...n)),e.max=(...n)=>e.check(c6e(...n)),e.length=(...n)=>e.check(u6e(...n)),e.nonempty=(...n)=>e.check(Kfe(1,...n)),e.lowercase=n=>e.check(ort(n)),e.uppercase=n=>e.check(srt(n)),e.trim=()=>e.check(frt()),e.normalize=(...n)=>e.check(prt(...n)),e.toLowerCase=()=>e.check(drt()),e.toUpperCase=()=>e.check(mrt()),e.slugify=()=>e.check(hrt())}),Ert=wr("ZodString",(e,t)=>{s6e.init(e,t),dRr.init(e,t),e.email=r=>e.check(PBr(mRr,r)),e.url=r=>e.check(k6t(V6t,r)),e.jwt=r=>e.check(KBr(PRr,r)),e.emoji=r=>e.check(FBr(hRr,r)),e.guid=r=>e.check(D6t(M6t,r)),e.uuid=r=>e.check(BBr(M$,r)),e.uuidv4=r=>e.check(RBr(M$,r)),e.uuidv6=r=>e.check(DBr(M$,r)),e.uuidv7=r=>e.check(kBr(M$,r)),e.nanoid=r=>e.check(NBr(gRr,r)),e.guid=r=>e.check(D6t(M6t,r)),e.cuid=r=>e.check(jBr(ARr,r)),e.cuid2=r=>e.check(zBr(yRr,r)),e.ulid=r=>e.check(QBr(bRr,r)),e.base64=r=>e.check(qBr(wRr,r)),e.base64url=r=>e.check(WBr(TRr,r)),e.xid=r=>e.check(MBr(ERr,r)),e.ksuid=r=>e.check(LBr(IRr,r)),e.ipv4=r=>e.check(_Br(vRr,r)),e.ipv6=r=>e.check(UBr(CRr,r)),e.cidrv4=r=>e.check(VBr(xRr,r)),e.cidrv6=r=>e.check(GBr(SRr,r)),e.e164=r=>e.check(HBr(ORr,r)),e.datetime=r=>e.check(hpo(r)),e.date=r=>e.check(gpo(r)),e.time=r=>e.check(Apo(r)),e.duration=r=>e.check(ypo(r))});_A=wr("ZodStringFormat",(e,t)=>{LA.init(e,t),dRr.init(e,t)}),mRr=wr("ZodEmail",(e,t)=>{Dco.init(e,t),_A.init(e,t)});M6t=wr("ZodGUID",(e,t)=>{Bco.init(e,t),_A.init(e,t)});M$=wr("ZodUUID",(e,t)=>{Rco.init(e,t),_A.init(e,t)});V6t=wr("ZodURL",(e,t)=>{kco.init(e,t),_A.init(e,t)});hRr=wr("ZodEmoji",(e,t)=>{Fco.init(e,t),_A.init(e,t)});gRr=wr("ZodNanoID",(e,t)=>{Nco.init(e,t),_A.init(e,t)});ARr=wr("ZodCUID",(e,t)=>{jco.init(e,t),_A.init(e,t)});yRr=wr("ZodCUID2",(e,t)=>{zco.init(e,t),_A.init(e,t)});bRr=wr("ZodULID",(e,t)=>{Qco.init(e,t),_A.init(e,t)});ERr=wr("ZodXID",(e,t)=>{Mco.init(e,t),_A.init(e,t)});IRr=wr("ZodKSUID",(e,t)=>{Lco.init(e,t),_A.init(e,t)});vRr=wr("ZodIPv4",(e,t)=>{qco.init(e,t),_A.init(e,t)});kpo=wr("ZodMAC",(e,t)=>{Hco.init(e,t),_A.init(e,t)});CRr=wr("ZodIPv6",(e,t)=>{Wco.init(e,t),_A.init(e,t)});xRr=wr("ZodCIDRv4",(e,t)=>{Kco.init(e,t),_A.init(e,t)});SRr=wr("ZodCIDRv6",(e,t)=>{Jco.init(e,t),_A.init(e,t)});wRr=wr("ZodBase64",(e,t)=>{Xco.init(e,t),_A.init(e,t)});TRr=wr("ZodBase64URL",(e,t)=>{Zco.init(e,t),_A.init(e,t)});ORr=wr("ZodE164",(e,t)=>{$co.init(e,t),_A.init(e,t)});PRr=wr("ZodJWT",(e,t)=>{euo.init(e,t),_A.init(e,t)});Irt=wr("ZodCustomStringFormat",(e,t)=>{tuo.init(e,t),_A.init(e,t)});vrt=wr("ZodNumber",(e,t)=>{EBr.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>klo(e,n,i,o),e.gt=(n,i)=>e.check(z$(n,i)),e.gte=(n,i)=>e.check(U2(n,i)),e.min=(n,i)=>e.check(U2(n,i)),e.lt=(n,i)=>e.check(j$(n,i)),e.lte=(n,i)=>e.check(K3(n,i)),e.max=(n,i)=>e.check(K3(n,i)),e.int=n=>e.check(fRr(n)),e.safe=n=>e.check(fRr(n)),e.positive=n=>e.check(z$(0,n)),e.nonnegative=n=>e.check(U2(0,n)),e.negative=n=>e.check(j$(0,n)),e.nonpositive=n=>e.check(K3(0,n)),e.multipleOf=(n,i)=>e.check(lve(n,i)),e.step=(n,i)=>e.check(lve(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});p6e=wr("ZodNumberFormat",(e,t)=>{ruo.init(e,t),vrt.init(e,t)});Crt=wr("ZodBoolean",(e,t)=>{w6t.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Flo(e,r,n,i)});xrt=wr("ZodBigInt",(e,t)=>{IBr.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>Nlo(e,n,i,o),e.gte=(n,i)=>e.check(U2(n,i)),e.min=(n,i)=>e.check(U2(n,i)),e.gt=(n,i)=>e.check(z$(n,i)),e.gte=(n,i)=>e.check(U2(n,i)),e.min=(n,i)=>e.check(U2(n,i)),e.lt=(n,i)=>e.check(j$(n,i)),e.lte=(n,i)=>e.check(K3(n,i)),e.max=(n,i)=>e.check(K3(n,i)),e.positive=n=>e.check(z$(BigInt(0),n)),e.negative=n=>e.check(j$(BigInt(0),n)),e.nonpositive=n=>e.check(K3(BigInt(0),n)),e.nonnegative=n=>e.check(U2(BigInt(0),n)),e.multipleOf=(n,i)=>e.check(lve(n,i));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});BRr=wr("ZodBigIntFormat",(e,t)=>{nuo.init(e,t),xrt.init(e,t)});jpo=wr("ZodSymbol",(e,t)=>{iuo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>jlo(e,r,n,i)});zpo=wr("ZodUndefined",(e,t)=>{ouo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Qlo(e,r,n,i)});Qpo=wr("ZodNull",(e,t)=>{suo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>zlo(e,r,n,i)});Lpo=wr("ZodAny",(e,t)=>{auo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>_lo(e,r,n,i)});_po=wr("ZodUnknown",(e,t)=>{cuo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Ulo(e,r,n,i)});Upo=wr("ZodNever",(e,t)=>{uuo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Llo(e,r,n,i)});Vpo=wr("ZodVoid",(e,t)=>{luo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Mlo(e,r,n,i)});G6t=wr("ZodDate",(e,t)=>{puo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>Vlo(e,n,i,o),e.min=(n,i)=>e.check(U2(n,i)),e.max=(n,i)=>e.check(K3(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});Gpo=wr("ZodArray",(e,t)=>{fuo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>tpo(e,r,n,i),e.element=t.element,e.min=(r,n)=>e.check(Kfe(r,n)),e.nonempty=r=>e.check(Kfe(1,r)),e.max=(r,n)=>e.check(c6e(r,n)),e.length=(r,n)=>e.check(u6e(r,n)),e.unwrap=()=>e.element});W6t=wr("ZodObject",(e,t)=>{duo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>rpo(e,r,n,i),ki.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>kRr(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:l6e()}),e.loose=()=>e.clone({...e._zod.def,catchall:l6e()}),e.strict=()=>e.clone({...e._zod.def,catchall:RRr()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>ki.extend(e,r),e.safeExtend=r=>ki.safeExtend(e,r),e.merge=r=>ki.merge(e,r),e.pick=r=>ki.pick(e,r),e.omit=r=>ki.omit(e,r),e.partial=(...r)=>ki.partial(NRr,e,r[0]),e.required=(...r)=>ki.required(jRr,e,r[0])});H6t=wr("ZodUnion",(e,t)=>{T6t.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>tRr(e,r,n,i),e.options=t.options});qpo=wr("ZodXor",(e,t)=>{H6t.init(e,t),muo.init(e,t),e._zod.processJSONSchema=(r,n,i)=>tRr(e,r,n,i),e.options=t.options});Wpo=wr("ZodDiscriminatedUnion",(e,t)=>{H6t.init(e,t),huo.init(e,t)});Hpo=wr("ZodIntersection",(e,t)=>{guo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>npo(e,r,n,i)});Jpo=wr("ZodTuple",(e,t)=>{vBr.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>ipo(e,r,n,i),e.rest=r=>e.clone({...e._zod.def,rest:r})});K6t=wr("ZodRecord",(e,t)=>{Auo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>opo(e,r,n,i),e.keyType=t.keyType,e.valueType=t.valueType});Zpo=wr("ZodMap",(e,t)=>{yuo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>$lo(e,r,n,i),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(Q$(...r)),e.nonempty=r=>e.check(Q$(1,r)),e.max=(...r)=>e.check(pve(...r)),e.size=(...r)=>e.check(a6e(...r))});$po=wr("ZodSet",(e,t)=>{buo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>epo(e,r,n,i),e.min=(...r)=>e.check(Q$(...r)),e.nonempty=r=>e.check(Q$(1,r)),e.max=(...r)=>e.check(pve(...r)),e.size=(...r)=>e.check(a6e(...r))});brt=wr("ZodEnum",(e,t)=>{Euo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>Glo(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 brt({...t,checks:[],...ki.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 brt({...t,checks:[],...ki.normalizeParams(i),entries:o})}});efo=wr("ZodLiteral",(e,t)=>{Iuo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>qlo(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]}})});tfo=wr("ZodFile",(e,t)=>{vuo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Klo(e,r,n,i),e.min=(r,n)=>e.check(Q$(r,n)),e.max=(r,n)=>e.check(pve(r,n)),e.mime=(r,n)=>e.check(lrt(Array.isArray(r)?r:[r],n))});rfo=wr("ZodTransform",(e,t)=>{Cuo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Zlo(e,r,n,i),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new ove(e.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(ki.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(ki.issue(s))}};let i=t.transform(r.value,r);return i instanceof Promise?i.then(o=>(r.value=o,r)):(r.value=i,r)}});NRr=wr("ZodOptional",(e,t)=>{CBr.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>rRr(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});nfo=wr("ZodExactOptional",(e,t)=>{xuo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>rRr(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});ofo=wr("ZodNullable",(e,t)=>{Suo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>spo(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});sfo=wr("ZodDefault",(e,t)=>{wuo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>cpo(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});cfo=wr("ZodPrefault",(e,t)=>{Tuo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>upo(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});jRr=wr("ZodNonOptional",(e,t)=>{Ouo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>apo(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});pfo=wr("ZodSuccess",(e,t)=>{Puo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Jlo(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});ffo=wr("ZodCatch",(e,t)=>{Buo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>lpo(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});mfo=wr("ZodNaN",(e,t)=>{Ruo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Wlo(e,r,n,i)});zRr=wr("ZodPipe",(e,t)=>{Duo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>ppo(e,r,n,i),e.in=t.in,e.out=t.out});QRr=wr("ZodCodec",(e,t)=>{zRr.init(e,t),O6t.init(e,t)});hfo=wr("ZodReadonly",(e,t)=>{kuo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>fpo(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});Afo=wr("ZodTemplateLiteral",(e,t)=>{Fuo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Hlo(e,r,n,i)});yfo=wr("ZodLazy",(e,t)=>{zuo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>mpo(e,r,n,i),e.unwrap=()=>e._zod.def.getter()});Efo=wr("ZodPromise",(e,t)=>{juo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>dpo(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});Ifo=wr("ZodFunction",(e,t)=>{Nuo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Xlo(e,r,n,i)});J6t=wr("ZodCustom",(e,t)=>{Quo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Ylo(e,r,n,i)});rfc=Olo,nfc=Plo;ofc=(...e)=>Blo({Codec:QRr,Boolean:Crt,String:Ert},...e)});function Pcd(e){Iv({customError:e})}function Bcd(){return Iv().customError}var Ocd,xfo,cfc=h(()=>{"use strict";IQ();IQ();Ocd={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"};xfo||(xfo={})});function Dcd(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 kcd(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 ufc(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return Ho.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 Ho.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=kcd(i,t),s=xD(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 Ho.null();if(i.length===0)return Ho.never();if(i.length===1)return Ho.literal(i[0]);if(i.every(s=>typeof s=="string"))return Ho.enum(i);let o=i.map(s=>Ho.literal(s));return o.length<2?o[0]:Ho.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return Ho.literal(e.const);let r=e.type;if(Array.isArray(r)){let i=r.map(o=>{let s={...e,type:o};return ufc(s,t)});return i.length===0?Ho.never():i.length===1?i[0]:Ho.union(i)}if(!r)return Ho.any();let n;switch(r){case"string":{let i=Ho.string();if(e.format){let o=e.format;o==="email"?i=i.check(Ho.email()):o==="uri"||o==="uri-reference"?i=i.check(Ho.url()):o==="uuid"||o==="guid"?i=i.check(Ho.uuid()):o==="date-time"?i=i.check(Ho.iso.datetime()):o==="date"?i=i.check(Ho.iso.date()):o==="time"?i=i.check(Ho.iso.time()):o==="duration"?i=i.check(Ho.iso.duration()):o==="ipv4"?i=i.check(Ho.ipv4()):o==="ipv6"?i=i.check(Ho.ipv6()):o==="mac"?i=i.check(Ho.mac()):o==="cidr"?i=i.check(Ho.cidrv4()):o==="cidr-v6"?i=i.check(Ho.cidrv6()):o==="base64"?i=i.check(Ho.base64()):o==="base64url"?i=i.check(Ho.base64url()):o==="e164"?i=i.check(Ho.e164()):o==="jwt"?i=i.check(Ho.jwt()):o==="emoji"?i=i.check(Ho.emoji()):o==="nanoid"?i=i.check(Ho.nanoid()):o==="cuid"?i=i.check(Ho.cuid()):o==="cuid2"?i=i.check(Ho.cuid2()):o==="ulid"?i=i.check(Ho.ulid()):o==="xid"?i=i.check(Ho.xid()):o==="ksuid"&&(i=i.check(Ho.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"?Ho.number().int():Ho.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=Ho.boolean();break}case"null":{n=Ho.null();break}case"object":{let i={},o=e.properties||{},s=new Set(e.required||[]);for(let[c,u]of Object.entries(o)){let l=xD(u,t);i[c]=s.has(c)?l:l.optional()}if(e.propertyNames){let c=xD(e.propertyNames,t),u=e.additionalProperties&&typeof e.additionalProperties=="object"?xD(e.additionalProperties,t):Ho.any();if(Object.keys(i).length===0){n=Ho.record(c,u);break}let l=Ho.object(i).passthrough(),p=Ho.looseRecord(c,u);n=Ho.intersection(l,p);break}if(e.patternProperties){let c=e.patternProperties,u=Object.keys(c),l=[];for(let d of u){let f=xD(c[d],t),m=Ho.string().regex(new RegExp(d));l.push(Ho.looseRecord(m,f))}let p=[];if(Object.keys(i).length>0&&p.push(Ho.object(i).passthrough()),p.push(...l),p.length===0)n=Ho.object({}).passthrough();else if(p.length===1)n=p[0];else{let d=Ho.intersection(p[0],p[1]);for(let f=2;f<p.length;f++)d=Ho.intersection(d,p[f]);n=d}break}let a=Ho.object(i);e.additionalProperties===!1?n=a.strict():typeof e.additionalProperties=="object"?n=a.catchall(xD(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=>xD(c,t)),a=o&&typeof o=="object"&&!Array.isArray(o)?xD(o,t):void 0;a?n=Ho.tuple(s).rest(a):n=Ho.tuple(s),typeof e.minItems=="number"&&(n=n.check(Ho.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(Ho.maxLength(e.maxItems)))}else if(Array.isArray(o)){let s=o.map(c=>xD(c,t)),a=e.additionalItems&&typeof e.additionalItems=="object"?xD(e.additionalItems,t):void 0;a?n=Ho.tuple(s).rest(a):n=Ho.tuple(s),typeof e.minItems=="number"&&(n=n.check(Ho.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(Ho.maxLength(e.maxItems)))}else if(o!==void 0){let s=xD(o,t),a=Ho.array(s);typeof e.minItems=="number"&&(a=a.min(e.minItems)),typeof e.maxItems=="number"&&(a=a.max(e.maxItems)),n=a}else n=Ho.array(Ho.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 xD(e,t){if(typeof e=="boolean")return e?Ho.any():Ho.never();let r=ufc(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=>xD(u,t)),c=Ho.union(a);r=n?Ho.intersection(r,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let a=e.oneOf.map(u=>xD(u,t)),c=Ho.xor(a);r=n?Ho.intersection(r,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=n?r:Ho.any();else{let a=n?r:xD(e.allOf[0],t),c=n?0:1;for(let u=c;u<e.allOf.length;u++)a=Ho.intersection(a,xD(e.allOf[u],t));r=a}e.nullable===!0&&t.version==="openapi-3.0"&&(r=Ho.nullable(r)),e.readOnly===!0&&(r=Ho.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))Rcd.has(a)||(i[a]=e[a]);return Object.keys(i).length>0&&t.registry.add(r,i),r}function lfc(e,t){if(typeof e=="boolean")return e?Ho.any():Ho.never();let r=Dcd(e,t?.defaultTarget),n=e.$defs||e.definitions||{},i={version:r,defs:n,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??AB};return xD(e,i)}var Ho,Rcd,pfc=h(()=>{"use strict";R6t();sRr();j6t();Q6t();Ho={...z6t,...oRr,iso:yrt},Rcd=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 Sfo={};$(Sfo,{bigint:()=>zcd,boolean:()=>jcd,date:()=>Qcd,number:()=>Ncd,string:()=>Fcd});function Fcd(e){return Huo(Ert,e)}function Ncd(e){return tlo(vrt,e)}function jcd(e){return clo(Crt,e)}function zcd(e){return llo(xrt,e)}function Qcd(e){return Ilo(G6t,e)}var ffc=h(()=>{"use strict";IQ();Q6t()});var w={};$(w,{$brand:()=>YPr,$input:()=>quo,$output:()=>Guo,NEVER:()=>Aao,TimePrecision:()=>Juo,ZodAny:()=>Lpo,ZodArray:()=>Gpo,ZodBase64:()=>wRr,ZodBase64URL:()=>TRr,ZodBigInt:()=>xrt,ZodBigIntFormat:()=>BRr,ZodBoolean:()=>Crt,ZodCIDRv4:()=>xRr,ZodCIDRv6:()=>SRr,ZodCUID:()=>ARr,ZodCUID2:()=>yRr,ZodCatch:()=>ffo,ZodCodec:()=>QRr,ZodCustom:()=>J6t,ZodCustomStringFormat:()=>Irt,ZodDate:()=>G6t,ZodDefault:()=>sfo,ZodDiscriminatedUnion:()=>Wpo,ZodE164:()=>ORr,ZodEmail:()=>mRr,ZodEmoji:()=>hRr,ZodEnum:()=>brt,ZodError:()=>wcd,ZodExactOptional:()=>nfo,ZodFile:()=>tfo,ZodFirstPartyTypeKind:()=>xfo,ZodFunction:()=>Ifo,ZodGUID:()=>M6t,ZodIPv4:()=>vRr,ZodIPv6:()=>CRr,ZodISODate:()=>cRr,ZodISODateTime:()=>aRr,ZodISODuration:()=>lRr,ZodISOTime:()=>uRr,ZodIntersection:()=>Hpo,ZodIssueCode:()=>Ocd,ZodJWT:()=>PRr,ZodKSUID:()=>IRr,ZodLazy:()=>yfo,ZodLiteral:()=>efo,ZodMAC:()=>kpo,ZodMap:()=>Zpo,ZodNaN:()=>mfo,ZodNanoID:()=>gRr,ZodNever:()=>Upo,ZodNonOptional:()=>jRr,ZodNull:()=>Qpo,ZodNullable:()=>ofo,ZodNumber:()=>vrt,ZodNumberFormat:()=>p6e,ZodObject:()=>W6t,ZodOptional:()=>NRr,ZodPipe:()=>zRr,ZodPrefault:()=>cfo,ZodPromise:()=>Efo,ZodReadonly:()=>hfo,ZodRealError:()=>vQ,ZodRecord:()=>K6t,ZodSet:()=>$po,ZodString:()=>Ert,ZodStringFormat:()=>_A,ZodSuccess:()=>pfo,ZodSymbol:()=>jpo,ZodTemplateLiteral:()=>Afo,ZodTransform:()=>rfo,ZodTuple:()=>Jpo,ZodType:()=>Dp,ZodULID:()=>bRr,ZodURL:()=>V6t,ZodUUID:()=>M$,ZodUndefined:()=>zpo,ZodUnion:()=>H6t,ZodUnknown:()=>_po,ZodVoid:()=>Vpo,ZodXID:()=>ERr,ZodXor:()=>qpo,_ZodString:()=>dRr,_default:()=>afo,_function:()=>$pc,any:()=>Rpc,array:()=>q6t,base64:()=>mpc,base64url:()=>hpc,bigint:()=>wpc,boolean:()=>Npo,catch:()=>dfo,check:()=>efc,cidrv4:()=>fpc,cidrv6:()=>dpc,clone:()=>_2,codec:()=>Ypc,coerce:()=>Sfo,config:()=>Iv,core:()=>Jfe,cuid:()=>ipc,cuid2:()=>opc,custom:()=>tfc,date:()=>kpc,decode:()=>Spo,decodeAsync:()=>Tpo,describe:()=>rfc,discriminatedUnion:()=>Mpc,e164:()=>gpc,email:()=>Klc,emoji:()=>rpc,encode:()=>xpo,encodeAsync:()=>wpo,endsWith:()=>urt,enum:()=>kRr,exactOptional:()=>ifo,file:()=>Wpc,flattenError:()=>I6t,float32:()=>vpc,float64:()=>Cpc,formatError:()=>v6t,fromJSONSchema:()=>lfc,function:()=>$pc,getErrorMap:()=>Bcd,globalRegistry:()=>AB,gt:()=>z$,gte:()=>U2,guid:()=>Jlc,hash:()=>Ipc,hex:()=>Epc,hostname:()=>bpc,httpUrl:()=>tpc,includes:()=>art,instanceof:()=>ifc,int:()=>fRr,int32:()=>xpc,int64:()=>Tpc,intersection:()=>Kpo,ipv4:()=>upc,ipv6:()=>ppc,iso:()=>yrt,json:()=>sfc,jwt:()=>Apc,keyof:()=>Fpc,ksuid:()=>cpc,lazy:()=>bfo,length:()=>u6e,literal:()=>qpc,locales:()=>B6t,looseObject:()=>zpc,looseRecord:()=>_pc,lowercase:()=>ort,lt:()=>j$,lte:()=>K3,mac:()=>lpc,map:()=>Upc,maxLength:()=>c6e,maxSize:()=>pve,meta:()=>nfc,mime:()=>lrt,minLength:()=>Kfe,minSize:()=>Q$,multipleOf:()=>lve,nan:()=>Jpc,nanoid:()=>npc,nativeEnum:()=>Gpc,negative:()=>YBr,never:()=>RRr,nonnegative:()=>ZBr,nonoptional:()=>lfo,nonpositive:()=>XBr,normalize:()=>prt,null:()=>Mpo,nullable:()=>_6t,nullish:()=>Hpc,number:()=>Fpo,object:()=>Npc,optional:()=>L6t,overwrite:()=>aK,parse:()=>Epo,parseAsync:()=>Ipo,partialRecord:()=>Lpc,pipe:()=>U6t,positive:()=>JBr,prefault:()=>ufo,preprocess:()=>afc,prettifyError:()=>Pao,promise:()=>Zpc,property:()=>$Br,readonly:()=>gfo,record:()=>Xpo,refine:()=>vfo,regex:()=>irt,regexes:()=>d5,registry:()=>OBr,safeDecode:()=>Ppo,safeDecodeAsync:()=>Rpo,safeEncode:()=>Opo,safeEncodeAsync:()=>Bpo,safeParse:()=>vpo,safeParseAsync:()=>Cpo,set:()=>Vpc,setErrorMap:()=>Pcd,size:()=>a6e,slugify:()=>hrt,startsWith:()=>crt,strictObject:()=>jpc,string:()=>pRr,stringFormat:()=>ypc,stringbool:()=>ofc,success:()=>Kpc,superRefine:()=>Cfo,symbol:()=>Ppc,templateLiteral:()=>Xpc,toJSONSchema:()=>nRr,toLowerCase:()=>drt,toUpperCase:()=>mrt,transform:()=>FRr,treeifyError:()=>Oao,trim:()=>frt,tuple:()=>Ypo,uint32:()=>Spc,uint64:()=>Opc,ulid:()=>spc,undefined:()=>Bpc,union:()=>DRr,unknown:()=>l6e,uppercase:()=>srt,url:()=>epc,util:()=>ki,uuid:()=>Ylc,uuidv4:()=>Xlc,uuidv6:()=>Zlc,uuidv7:()=>$lc,void:()=>Dpc,xid:()=>apc,xor:()=>Qpc});var wfo=h(()=>{"use strict";IQ();Q6t();sRr();bpo();Dpo();cfc();IQ();Luo();IQ();N6t();pfc();Vuo();j6t();j6t();ffc();Iv(xBr())});var bs=h(()=>{"use strict";wfo();wfo()});var dfc=h(()=>{"use strict"});var Ufo={};$(Ufo,{AIChatConfig:()=>Bfo,AIChatDatasource:()=>idc,AIChatLocation:()=>gfc,AIChatModel:()=>Afc,AIChatWebsiteDatasource:()=>ndc,AbsoluteProductPath:()=>vmc,AgentsConfig:()=>adc,AiExamplesConfig:()=>rdc,AnalyticsConfig:()=>tdc,AnnouncementConfig:()=>VRr,ApiReferenceConfiguration:()=>lmc,ApiReferenceEndpointConfiguration:()=>$dc,ApiReferenceLayout:()=>Pfc,ApiReferenceLayoutItem:()=>e3t,ApiReferenceOperationConfiguration:()=>emc,ApiReferencePackageConfiguration:()=>nmc,ApiReferencePackageConfigurationWithOptions:()=>rmc,ApiReferenceSectionConfiguration:()=>tmc,ApiSpecConfiguration:()=>umc,ApiSpecErrorResponseEnsure:()=>smc,ApiSpecErrorResponseHttpMethod:()=>omc,ApiSpecErrorResponses:()=>amc,ApiSpecImportSettings:()=>cmc,ApiSpecType:()=>imc,Audience:()=>X6t,AudienceId:()=>Tfo,Availability:()=>Xfe,BackgroundImageConfiguration:()=>qfc,BackgroundImageThemedConfig:()=>Gfc,BlogConfiguration:()=>Ydc,BodyThemeConfig:()=>jfc,BreadcrumbsConfig:()=>fdc,ChangelogConfiguration:()=>Jdc,ChangelogFolderRelativePath:()=>Y6t,ChangelogLayout:()=>Ofc,CheckConfig:()=>Mdc,CheckRuleSeverity:()=>Yfe,CheckRulesConfig:()=>Qdc,CodeBlockTheme:()=>Ofo,CodeBlocksThemeConfig:()=>Dfc,CollapsedStringValue:()=>Hfc,CollapsedValue:()=>Z6t,ColorConfig:()=>Zx,ColorThemedConfig:()=>_fc,ColorsConfiguration:()=>gdc,ContentAlignment:()=>wfc,CssConfig:()=>Wfc,CustomDomain:()=>Ufc,CustomPageAction:()=>Adc,DocsConfiguration:()=>Gcd,DocsInstance:()=>vdc,DocsSettingsConfig:()=>hdc,DocsTypographyConfig:()=>ldc,EditThisPageConfig:()=>Idc,EditThisPageLaunch:()=>yfc,EmbeddingConfig:()=>sdc,ExperimentalConfig:()=>Vdc,ExternalProduct:()=>bmc,ExternalSitemapConfigSchema:()=>_dc,ExternalSitemapSchema:()=>Udc,FeatureFlag:()=>Pfo,FeatureFlagConfiguration:()=>Kfc,FolderConfiguration:()=>Zdc,FontConfig:()=>MRr,FontConfigPath:()=>udc,FontConfigVariant:()=>cdc,FontDisplay:()=>vfc,FontStyle:()=>Ffo,FontWeight:()=>jfo,FooterLinksConfig:()=>Rdc,FooterNavThemeConfig:()=>Ffc,FullStoryAnalyticsConfig:()=>Yfc,GTMConfig:()=>$fc,GitLibraryInputSchema:()=>Gdc,GithubEditThisPageConfig:()=>Edc,GoogleAnalytics4Config:()=>edc,HeaderPosition:()=>Tfc,HttpSnippetLanguage:()=>Mfc,HttpSnippetsConfig:()=>Vfc,IntegrationsConfig:()=>Ldc,IntercomConfig:()=>Xfc,InternalProduct:()=>ymc,JsConfig:()=>Ndc,JsConfigOptions:()=>Rfo,JsFileConfig:()=>kdc,JsFileConfigSettings:()=>Ddc,JsRemoteConfig:()=>Fdc,JsScriptStrategy:()=>Nfo,Language:()=>_Rr,LanguageSwitcherThemeConfig:()=>Rfc,LayoutConfig:()=>ddc,LibraryConfiguration:()=>Kdc,LibraryInputConfiguration:()=>Wdc,LibraryLanguage:()=>Ifc,LibraryName:()=>Dfo,LibraryOutputConfiguration:()=>Hdc,LibraryReferenceConfiguration:()=>Xdc,LinkConfiguration:()=>Qfo,LogoConfiguration:()=>Cdc,MetadataConfig:()=>jdc,NavbarDropdownConfig:()=>Pdc,NavbarGithubConfig:()=>Odc,NavbarGithubConfigWithOptions:()=>Tdc,NavbarLink:()=>Bdc,NavbarLinkConfig:()=>f6e,NavigationConfig:()=>GRr,NavigationItem:()=>t3t,PageActionOption:()=>hfc,PageActionOptions:()=>ydc,PageActionsConfig:()=>bdc,PageActionsThemeConfig:()=>Qfc,PageConfiguration:()=>Trt,PageDescriptionSource:()=>odc,PathLibraryInputSchema:()=>qdc,PlaygroundButtonSettings:()=>wdc,PlaygroundSettings:()=>$6t,PostHogConfig:()=>Zfc,ProductConfig:()=>Emc,ProductConfigBase:()=>_fo,ProductFileConfig:()=>Vcd,ProductPath:()=>Ucd,ProductSwitcherThemeConfig:()=>Bfc,ProgrammingLanguage:()=>mfc,RedirectConfig:()=>Mfo,RedirectsConfiguration:()=>zdc,RedirectsFile:()=>Lcd,RelativeProductPath:()=>Imc,Role:()=>zfo,RoleId:()=>LRr,SearchSettingsConfig:()=>mdc,SearchbarPlacement:()=>Cfc,SectionConfiguration:()=>pmc,SegmentConfig:()=>Jfc,SidebarThemeConfig:()=>zfc,SiteSwitcherThemeConfig:()=>kfc,SnippetLanguageConfiguration:()=>cK,SnippetsConfiguration:()=>Sdc,SortByAvailabilityValue:()=>bfc,SwitcherPlacement:()=>Sfc,TabConfig:()=>qRr,TabId:()=>Srt,TabVariant:()=>dmc,TabbedNavigationConfig:()=>Amc,TabbedNavigationItem:()=>gmc,TabbedNavigationItemWithLayout:()=>mmc,TabbedNavigationItemWithVariants:()=>hmc,TabsPlacement:()=>xfc,TabsThemeConfig:()=>Nfc,Target:()=>wrt,ThemeConfig:()=>pdc,TitleSource:()=>kfo,TranslationConfig:()=>xmc,TranslationConfigObject:()=>Cmc,TwitterCardSetting:()=>Lfc,UntabbedNavigationConfig:()=>fmc,VersionAvailability:()=>Efc,VersionConfig:()=>Lfo,VersionFileConfig:()=>_cd,VersionedSnippetLanguageConfiguration:()=>xdc,WithFeatureFlags:()=>bB,WithPermissions:()=>yB,WithViewers:()=>URr,normalizeTranslationConfig:()=>Smc});function Smc(e){return typeof e=="string"?{lang:e}:e}var Srt,Y6t,Tfo,LRr,Dfo,mfc,_Rr,hfc,gfc,Afc,yfc,Xfe,bfc,Efc,kfo,Ifc,Ffo,vfc,Cfc,xfc,Sfc,wfc,Tfc,Ofc,Pfc,Bfc,Rfc,Ofo,Dfc,kfc,Ffc,Nfc,jfc,zfc,Qfc,Mfc,wrt,Lfc,Nfo,jfo,_fc,Zx,X6t,zfo,Ufc,Vfc,Gfc,qfc,Wfc,Hfc,Z6t,yB,Pfo,Kfc,bB,URr,Jfc,Yfc,Xfc,Zfc,$fc,edc,tdc,rdc,ndc,idc,odc,sdc,adc,Bfo,cdc,udc,MRr,ldc,pdc,fdc,ddc,mdc,hdc,gdc,Adc,ydc,bdc,Edc,Idc,vdc,Cdc,Qfo,xdc,cK,Sdc,wdc,$6t,VRr,f6e,Tdc,Odc,Pdc,Bdc,Rdc,Ddc,kdc,Fdc,Rfo,Ndc,jdc,Mfo,zdc,Lcd,Yfe,Qdc,Mdc,Ldc,_dc,Udc,Vdc,Gdc,qdc,Wdc,Hdc,Kdc,Trt,Jdc,Ydc,Xdc,Zdc,$dc,emc,e3t,tmc,rmc,nmc,imc,omc,smc,amc,cmc,umc,lmc,t3t,pmc,fmc,dmc,mmc,hmc,gmc,Amc,GRr,qRr,Lfo,_cd,_fo,ymc,bmc,Emc,Imc,vmc,Ucd,Vcd,Cmc,xmc,Gcd,wmc=h(()=>{"use strict";bs();Srt=w.string(),Y6t=w.string(),Tfo=w.string(),LRr=w.string(),Dfo=w.string(),mfc=w.enum(["typescript","javascript","python","java","go","ruby","csharp","php","swift","rust","nodets","nodejs","dotnet","curl","jvm","ts","js"]),_Rr=w.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')"),hfc=w.enum(["copy-page","view-as-markdown","ask-ai","chatgpt","claude","cursor","vscode"]),gfc=w.enum(["docs","slack","discord"]),Afc=w.enum(["claude-3.7","claude-4","command-a"]),yfc=w.enum(["github","dashboard"]),Xfe=w.enum(["stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"]),bfc=w.enum(["unset","stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"]),Efc=w.enum(["deprecated","ga","stable","beta"]),kfo=w.enum(["frontmatter","filename"]),Ifc=w.enum(["python","cpp"]),Ffo=w.enum(["normal","italic"]),vfc=w.enum(["auto","block","swap","fallback","optional"]),Cfc=w.enum(["header","header-tabs","sidebar"]),xfc=w.enum(["header","sidebar"]),Sfc=w.enum(["header","sidebar"]),wfc=w.enum(["center","left"]),Tfc=w.enum(["fixed","static"]),Ofc=w.enum(["timeline","classic"]),Pfc=w.enum(["indented","cards"]),Bfc=w.enum(["default","toggle","tabs"]),Rfc=w.enum(["default","minimal"]),Ofo=w.enum(["github-dark","github-dark-default","github-dark-dimmed","github-dark-high-contrast","github-light","github-light-default","github-light-high-contrast","material-theme-darker","min-dark","min-light"]),Dfc=w.object({light:Ofo.optional(),dark:Ofo.optional()}),kfc=w.object({enabled:w.boolean().optional(),order:w.array(w.string()).optional(),hide:w.array(w.string()).optional(),labels:w.record(w.string(),w.string()).optional(),"show-products":w.boolean().optional()}),Ffc=w.enum(["default","minimal"]),Nfc=w.enum(["default","bubble"]),jfc=w.enum(["default","canvas"]),zfc=w.enum(["default","minimal"]),Qfc=w.enum(["default","toolbar"]),Mfc=w.enum(["curl","csharp","go","java","javascript","php","python","ruby","swift","typescript"]),wrt=w.enum(["_blank","_self","_parent","_top"]),Lfc=w.enum(["summary","summary_large_image","app","player"]),Nfo=w.enum(["beforeInteractive","afterInteractive","lazyOnload"]),jfo=w.union([w.string(),w.number().int()]),_fc=w.object({dark:w.string().optional(),light:w.string().optional()}),Zx=w.union([w.string(),_fc]),X6t=w.union([Tfo,w.array(Tfo)]),zfo=w.union([LRr,w.array(LRr)]),Ufc=w.union([w.string(),w.array(w.string())]),Vfc=w.union([w.boolean(),w.array(Mfc)]),Gfc=w.object({dark:w.string().optional(),light:w.string().optional()}),qfc=w.union([w.string(),Gfc]),Wfc=w.union([w.string(),w.array(w.string())]),Hfc=w.enum(["open-by-default"]),Z6t=w.union([w.boolean(),Hfc]),yB=w.object({viewers:zfo.optional(),orphaned:w.boolean().optional()}),Pfo=w.object({flag:w.string(),"fallback-value":w.unknown().optional(),match:w.unknown().optional()}),Kfc=w.union([w.string(),Pfo,w.array(Pfo)]),bB=w.object({"feature-flag":Kfc.optional()}),URr=w.object({viewers:zfo.optional()}),Jfc=w.object({"write-key":w.string()}),Yfc=w.object({"org-id":w.string()}),Xfc=w.object({"app-id":w.string(),"api-base":w.string().optional()}),Zfc=w.object({"api-key":w.string(),endpoint:w.string().optional()}),$fc=w.object({"container-id":w.string()}),edc=w.object({"measurement-id":w.string()}),tdc=w.object({segment:Jfc.optional(),fullstory:Yfc.optional(),intercom:Xfc.optional(),posthog:Zfc.optional(),gtm:$fc.optional(),ga4:edc.optional()}),rdc=w.object({enabled:w.boolean().optional(),style:w.string().optional()}),ndc=w.object({url:w.string(),title:w.string().optional()}),idc=ndc,odc=w.enum(["description","subtitle"]),sdc=w.object({"allowed-origins":w.array(w.string())}),adc=w.object({"page-directive":w.string().optional(),"page-description-source":odc.optional(),"llms-txt":w.string().optional(),"llms-full-txt":w.string().optional()}),Bfo=w.object({model:Afc.optional(),"system-prompt":w.string().optional(),location:w.array(gfc).optional(),datasources:w.array(idc).optional(),"mask-pii":w.boolean().optional(),disclaimer:w.string().optional()}),cdc=w.object({path:w.string(),weight:jfo.optional(),style:Ffo.optional()}),udc=w.union([w.string(),cdc]),MRr=w.object({name:w.string().optional(),path:w.string().optional(),weight:jfo.optional(),style:Ffo.optional(),paths:w.array(udc).optional(),display:vfc.optional(),fallback:w.array(w.string()).optional(),"font-variation-settings":w.string().optional()}),ldc=w.object({headingsFont:MRr.optional(),bodyFont:MRr.optional(),codeFont:MRr.optional()}),pdc=w.object({sidebar:zfc.optional(),body:jfc.optional(),tabs:Nfc.optional(),"page-actions":Qfc.optional(),"footer-nav":Ffc.optional(),"language-switcher":Rfc.optional(),"product-switcher":Bfc.optional(),"site-switcher":kfc.optional(),"code-blocks":Dfc.optional()}),fdc=w.object({"current-page":w.boolean().optional()}),ddc=w.object({"page-width":w.string().optional(),"content-width":w.string().optional(),"sidebar-width":w.string().optional(),"header-height":w.string().optional(),"searchbar-placement":Cfc.optional(),"tabs-placement":xfc.optional(),"switcher-placement":Sfc.optional(),"content-alignment":wfc.optional(),"header-position":Tfc.optional(),"disable-header":w.boolean().optional(),"hide-nav-links":w.boolean().optional(),"hide-feedback":w.boolean().optional(),"mobile-toc":w.boolean().optional(),"changelog-layout":Ofc.optional(),"api-reference-layout":Pfc.optional(),"api-reference-expand-properties":w.boolean().optional(),"show-nav-availability-badges":w.boolean().optional(),"hide-webhook-method-badges":w.boolean().optional(),breadcrumbs:fdc.optional()}),mdc=w.object({"prioritize-current-product":w.boolean().optional(),"default-filter-by-current-product":w.boolean().optional()}),hdc=w.object({"search-text":w.string().optional(),"disable-search":w.boolean().optional(),"dark-mode-code":w.boolean().optional(),"default-search-filters":w.boolean().optional(),search:mdc.optional(),"http-snippets":Vfc.optional(),"hide-404-page":w.boolean().optional(),"use-javascript-as-typescript":w.boolean().optional(),"disable-explorer-proxy":w.boolean().optional(),"disable-analytics":w.boolean().optional(),"require-analytics-consent":w.boolean().optional(),language:_Rr.optional(),"folder-title-source":kfo.optional(),"substitute-env-vars":w.boolean().optional(),"websocket-oneof-display":w.enum(["flat","grouped"]).optional(),embedding:sdc.optional()}),gdc=w.object({"accent-primary":Zx.optional(),accentPrimary:Zx.optional(),background:Zx.optional(),border:Zx.optional(),"sidebar-background":Zx.optional(),"header-background":Zx.optional(),"card-background":Zx.optional(),"accent-1":Zx.optional(),"accent-2":Zx.optional(),"accent-3":Zx.optional(),"accent-4":Zx.optional(),"accent-5":Zx.optional(),"accent-6":Zx.optional(),"accent-7":Zx.optional(),"accent-8":Zx.optional(),"accent-9":Zx.optional(),"accent-10":Zx.optional(),"accent-11":Zx.optional(),"accent-12":Zx.optional()}),Adc=w.object({title:w.string(),subtitle:w.string().optional(),url:w.string(),icon:w.string().optional(),default:w.boolean().optional()}),ydc=w.object({"copy-page":w.boolean().optional(),"view-as-markdown":w.boolean().optional(),"ask-ai":w.boolean().optional(),chatgpt:w.boolean().optional(),claude:w.boolean().optional(),cursor:w.boolean().optional(),mcp:w.boolean().optional(),vscode:w.boolean().optional(),custom:w.array(Adc).optional()}),bdc=w.object({default:hfc.optional(),options:ydc.optional()}),Edc=w.object({host:w.string().optional(),owner:w.string(),repo:w.string(),branch:w.string().optional()}),Idc=w.object({github:Edc.optional(),launch:yfc.optional()}),vdc=w.object({url:w.string(),"custom-domain":Ufc.optional(),"edit-this-page":Idc.optional(),audiences:X6t.optional(),"multi-source":w.boolean().optional()}),Cdc=w.object({dark:w.string().optional(),light:w.string().optional(),height:w.number().optional(),href:w.string().optional(),"right-text":w.string().optional()}),Qfo=w.object({link:w.string(),href:w.string(),icon:w.string().optional(),target:wrt.optional()}),xdc=w.object({version:w.string(),package:w.string()}),cK=w.union([w.string(),xdc]),Sdc=w.object({python:cK.optional(),typescript:cK.optional(),go:cK.optional(),java:cK.optional(),ruby:cK.optional(),csharp:cK.optional(),php:cK.optional(),swift:cK.optional(),cli:cK.optional(),rust:cK.optional()}),wdc=w.object({href:w.string().optional()}),$6t=w.object({hidden:w.boolean().optional(),environments:w.array(w.string()).optional(),button:wdc.optional(),oauth:w.boolean().optional(),"limit-websocket-messages-per-connection":w.number().int().optional(),"send-optional-defaults":w.boolean().optional()}),VRr=w.object({message:w.string()}),f6e=URr.merge(w.object({href:w.string().optional(),target:wrt.optional(),url:w.string().optional(),text:w.string().optional(),icon:w.string().optional(),rightIcon:w.string().optional(),rounded:w.boolean().optional()})),Tdc=URr.merge(w.object({url:w.string(),target:wrt.optional()})),Odc=w.union([w.string(),Tdc]),Pdc=URr.merge(w.object({links:w.array(f6e),text:w.string().optional(),icon:w.string().optional(),rightIcon:w.string().optional(),rounded:w.boolean().optional()})),Bdc=w.union([f6e.merge(w.object({type:w.literal("filled")})),f6e.merge(w.object({type:w.literal("outlined")})),f6e.merge(w.object({type:w.literal("minimal")})),w.object({type:w.literal("github"),value:Odc}),Pdc.merge(w.object({type:w.literal("dropdown")})),f6e.merge(w.object({type:w.literal("primary")})),f6e.merge(w.object({type:w.literal("secondary")}))]),Rdc=w.object({github:w.string().optional(),twitter:w.string().optional(),x:w.string().optional(),linkedin:w.string().optional(),youtube:w.string().optional(),instagram:w.string().optional(),facebook:w.string().optional(),discord:w.string().optional(),slack:w.string().optional(),hackernews:w.string().optional(),medium:w.string().optional(),website:w.string().optional()}),Ddc=w.object({path:w.string(),strategy:Nfo.optional()}),kdc=w.union([w.string(),Ddc]),Fdc=w.object({url:w.string(),strategy:Nfo.optional(),"disable-sri":w.boolean().optional()}),Rfo=w.union([Fdc,kdc]),Ndc=w.union([Rfo,w.array(Rfo)]),jdc=w.object({"og:site_name":w.string().optional(),"og:title":w.string().optional(),"og:description":w.string().optional(),"og:url":w.string().optional(),"og:image":w.string().optional(),"og:image:width":w.number().optional(),"og:image:height":w.number().optional(),"og:locale":w.string().optional(),"og:logo":w.string().optional(),"twitter:title":w.string().optional(),"twitter:description":w.string().optional(),"twitter:handle":w.string().optional(),"twitter:image":w.string().optional(),"twitter:site":w.string().optional(),"twitter:url":w.string().optional(),"twitter:card":Lfc.optional(),"og:dynamic":w.boolean().optional(),"og:dynamic:background-image":w.string().optional(),"og:dynamic:text-color":w.string().optional(),"og:dynamic:background-color":w.string().optional(),"og:dynamic:logo-color":w.enum(["dark","light"]).optional(),"og:dynamic:show-logo":w.boolean().optional(),"og:dynamic:show-section":w.boolean().optional(),"og:dynamic:show-description":w.boolean().optional(),"og:dynamic:show-url":w.boolean().optional(),"og:dynamic:show-gradient":w.boolean().optional(),"canonical-host":w.string().optional()}),Mfo=w.object({source:w.string(),destination:w.string(),permanent:w.boolean().optional()}),zdc=w.union([w.array(Mfo),w.string(),w.array(w.string())]),Lcd=w.object({redirects:w.array(Mfo.strict())}).strict(),Yfe=w.enum(["warn","error"]),Qdc=w.object({"example-validation":Yfe.optional(),"broken-links":Yfe.optional(),"no-non-component-refs":Yfe.optional(),"valid-local-references":Yfe.optional(),"no-circular-redirects":Yfe.optional(),"valid-docs-endpoints":Yfe.optional(),"missing-redirects":Yfe.optional(),"valid-changelog-slug":Yfe.optional()}),Mdc=w.object({rules:Qdc.optional()}),Ldc=w.object({intercom:w.string().optional(),context7:w.string().optional()}),_dc=w.object({url:w.string(),locale:w.string().optional()}),Udc=w.union([w.string(),_dc]),Vdc=w.object({"mdx-components":w.array(w.string()).optional(),"disable-stream-toggle":w.boolean().optional(),"openapi-parser-v2":w.boolean().optional(),"openapi-parser-v3":w.boolean().optional(),"dynamic-snippets":w.boolean().optional(),"ai-examples":w.boolean().optional(),"ai-example-style-instructions":w.string().optional(),"exclude-apis":w.boolean().optional(),"basepath-aware":w.boolean().optional(),"robots-txt-on-instance-url":w.boolean().optional(),"external-sitemaps":w.array(Udc).optional()}),Gdc=w.object({git:w.string(),subpath:w.string().optional(),ref:w.string().optional()}),qdc=w.object({path:w.string()}),Wdc=w.union([Gdc,qdc]),Hdc=w.object({path:w.string()}),Kdc=w.object({input:Wdc,output:Hdc,lang:Ifc}),Trt=yB.merge(bB).merge(w.object({page:w.string(),path:w.string(),slug:w.string().optional(),icon:w.string().optional(),hidden:w.boolean().optional(),noindex:w.boolean().optional(),availability:Xfe.optional()})),Jdc=yB.merge(bB).merge(w.object({changelog:Y6t,title:w.string().optional(),slug:w.string().optional(),icon:w.string().optional(),hidden:w.boolean().optional()})),Ydc=yB.merge(bB).merge(w.object({blog:Y6t,title:w.string().optional(),slug:w.string().optional(),icon:w.string().optional(),hidden:w.boolean().optional()})),Xdc=yB.merge(bB).merge(w.object({library:Dfo,title:w.string().optional(),slug:w.string().optional()})),Zdc=yB.merge(bB).merge(w.object({folder:w.string(),title:w.string().optional(),"title-source":kfo.optional(),slug:w.string().optional(),icon:w.string().optional(),hidden:w.boolean().optional(),"skip-slug":w.boolean().optional(),collapsed:Z6t.optional(),collapsible:w.boolean().optional(),"collapsed-by-default":w.boolean().optional(),availability:Xfe.optional()})),$dc=yB.merge(bB).merge(w.object({endpoint:w.string(),title:w.string().optional(),slug:w.string().optional(),icon:w.string().optional(),hidden:w.boolean().optional(),availability:Xfe.optional(),playground:$6t.optional()})),emc=yB.merge(bB).merge(w.object({operation:w.string(),title:w.string().optional(),slug:w.string().optional(),hidden:w.boolean().optional(),availability:Xfe.optional()})),e3t=w.lazy(()=>w.union([w.string(),w.record(w.string(),nmc),tmc,$dc,emc,Trt,Qfo])),tmc=yB.merge(bB).merge(w.object({section:w.string(),"referenced-packages":w.array(w.string()).optional(),summary:w.string().optional(),contents:w.array(e3t).optional(),slug:w.string().optional(),icon:w.string().optional(),hidden:w.boolean().optional(),"skip-slug":w.boolean().optional(),collapsed:Z6t.optional(),collapsible:w.boolean().optional(),"collapsed-by-default":w.boolean().optional(),availability:Xfe.optional(),playground:$6t.optional()})),rmc=yB.merge(bB).merge(w.object({title:w.string().optional(),summary:w.string().optional(),contents:w.array(e3t).optional(),availability:Xfe.optional(),slug:w.string().optional(),icon:w.string().optional(),hidden:w.boolean().optional(),"skip-slug":w.boolean().optional(),playground:$6t.optional()})),nmc=w.lazy(()=>w.union([w.array(e3t),rmc])),imc=w.enum(["openapi","asyncapi","graphql"]),omc=w.enum(["get","post","put","patch","delete","head","options","trace"]),smc=w.object({"status-code":w.number().int().min(400).max(599),methods:w.array(omc).optional()}),amc=w.object({schema:w.union([w.string(),w.record(w.string(),w.unknown())]),name:w.string().optional(),"apply-to":w.enum(["all","untyped"]).optional(),ensure:w.array(smc).optional()}),cmc=w.object({"type-dates-as-strings":w.boolean().optional(),"use-bytes-for-binary-response":w.boolean().optional(),"respect-parameter-content":w.boolean().optional(),"respect-operation-id-word-boundaries":w.boolean().optional(),"infer-forward-compatible":w.boolean().optional(),"preserve-one-of-in-all-of":w.boolean().optional(),"any-of-sibling-properties-as-object":w.boolean().optional(),"error-responses":amc.optional()}),umc=w.object({type:imc,path:w.string(),namespace:w.string().optional(),overlays:w.string().optional(),overrides:w.array(w.string()).optional(),settings:cmc.optional()}),lmc=yB.merge(bB).merge(w.object({api:w.string(),"api-name":w.string().optional(),specs:w.array(umc).optional(),openrpc:w.string().optional(),audiences:X6t.optional(),"display-errors":w.boolean().optional(),"tag-description-pages":w.boolean().optional(),snippets:Sdc.optional(),postman:w.string().optional(),summary:w.string().optional(),layout:w.array(e3t).optional(),collapsed:Z6t.optional(),icon:w.string().optional(),slug:w.string().optional(),hidden:w.boolean().optional(),availability:Xfe.optional(),"skip-slug":w.boolean().optional(),alphabetized:w.boolean().optional(),"sort-by-availability":w.array(bfc).optional(),flattened:w.boolean().optional(),paginated:w.boolean().optional(),playground:$6t.optional()})),t3t=w.lazy(()=>w.union([Trt,pmc,lmc,Xdc,Qfo,Jdc,Ydc,Zdc])),pmc=yB.merge(bB).merge(w.object({section:w.string(),path:w.string().optional(),contents:w.array(t3t),collapsed:Z6t.optional(),collapsible:w.boolean().optional(),"collapsed-by-default":w.boolean().optional(),slug:w.string().optional(),icon:w.string().optional(),hidden:w.boolean().optional(),"skip-slug":w.boolean().optional(),availability:Xfe.optional()})),fmc=w.array(t3t),dmc=yB.merge(bB).merge(w.object({title:w.string(),subtitle:w.string().optional(),icon:w.string().optional(),layout:w.array(t3t),slug:w.string().optional(),"skip-slug":w.boolean().optional(),hidden:w.boolean().optional(),default:w.boolean().optional()})),mmc=w.object({tab:Srt,layout:w.array(t3t).optional()}),hmc=w.object({tab:Srt,variants:w.array(dmc)}),gmc=w.union([mmc,hmc]),Amc=w.array(gmc),GRr=w.union([fmc,Amc]),qRr=yB.merge(bB).merge(w.object({"display-name":w.string(),icon:w.string().optional(),slug:w.string().optional(),"skip-slug":w.boolean().optional(),hidden:w.boolean().optional(),href:w.string().optional(),target:wrt.optional(),changelog:Y6t.optional(),blog:Y6t.optional()})),Lfo=yB.merge(bB).merge(w.object({"display-name":w.string(),path:w.string().optional(),ref:w.string().optional(),slug:w.string().optional(),availability:Efc.optional(),audiences:X6t.optional(),hidden:w.boolean().optional(),announcement:VRr.optional()})),_cd=w.object({tabs:w.record(Srt,qRr).optional(),"landing-page":Trt.optional(),navigation:GRr}),_fo=yB.merge(bB).merge(w.object({"display-name":w.string(),subtitle:w.string().optional(),icon:w.string().optional(),image:w.string().optional(),versions:w.array(Lfo).optional(),audiences:X6t.optional()})),ymc=_fo.merge(w.object({path:w.string(),slug:w.string().optional(),announcement:VRr.optional()})),bmc=_fo.merge(w.object({href:w.string(),target:wrt.optional()})),Emc=w.union([ymc,bmc]),Imc=yB.merge(bB).merge(w.object({"display-name":w.string(),path:w.string(),slug:w.string().optional()})),vmc=w.object({href:w.string()}),Ucd=w.union([Imc,vmc]),Vcd=w.object({tabs:w.record(Srt,qRr).optional(),"landing-page":Trt.optional(),navigation:GRr}),Cmc=w.object({lang:_Rr,default:w.boolean().optional()}),xmc=w.union([_Rr,Cmc]);Gcd=w.object({instances:w.array(vdc),title:w.string().optional(),libraries:w.record(Dfo,Kdc).optional(),analytics:tdc.optional(),announcement:VRr.optional(),roles:w.array(LRr).optional(),tabs:w.record(Srt,qRr).optional(),versions:w.array(Lfo).optional(),products:w.array(Emc).optional(),"landing-page":Trt.optional(),navigation:GRr.optional(),"navbar-links":w.array(Bdc).optional(),"footer-links":Rdc.optional(),"page-actions":bdc.optional(),experimental:Vdc.optional(),"default-language":mfc.optional(),languages:w.array(w.string()).optional(),translations:w.array(xmc).optional().superRefine((e,t)=>{if(e==null)return;let n=e.map(Smc).filter(i=>i.default===!0).length;n>1&&t.addIssue({code:w.ZodIssueCode.custom,message:`Only one translation entry can be marked as default, but ${n} were found`})}),"ai-chat":Bfo.optional(),"ai-search":Bfo.optional(),"ai-examples":rdc.optional(),agents:adc.optional(),metadata:jdc.optional(),redirects:zdc.optional(),check:Mdc.optional(),logo:Cdc.optional(),favicon:w.string().optional(),"background-image":qfc.optional(),colors:gdc.optional(),typography:ldc.optional(),layout:ddc.optional(),settings:hdc.optional(),theme:pdc.optional(),"global-theme":w.string().optional(),integrations:Ldc.optional(),css:Wfc.optional(),js:Ndc.optional(),header:w.string().optional(),footer:w.string().optional()})});function Hcd(e){if("changelog"in e)return e.changelog;if("blog"in e)return e.blog}function Kcd(e){return e.changelog??e.blog}var qcd,Wcd,Tmc=h(()=>{"use strict";qcd="Changelog",Wcd="Blog"});var Omc=h(()=>{"use strict"});var Pmc=h(()=>{"use strict"});var Bmc=h(()=>{"use strict"});var Rmc=h(()=>{"use strict"});var Dmc=h(()=>{"use strict"});var Vfo,kmc=h(()=>{"use strict";Vfo={Docs:"docs",Slack:"slack",Discord:"discord"}});var Gfo,Fmc=h(()=>{"use strict";Gfo={Claude37:"claude-3.7",Claude4:"claude-4",CommandA:"command-a"}});var Nmc=h(()=>{"use strict"});var jmc=h(()=>{"use strict"});var zmc=h(()=>{"use strict"});var Qmc=h(()=>{"use strict"});var Mmc=h(()=>{"use strict"});var Lmc=h(()=>{"use strict"});var qfo,_mc=h(()=>{"use strict";qfo={Indented:"indented",Cards:"cards"}});var Umc=h(()=>{"use strict"});var Vmc=h(()=>{"use strict"});var Gmc=h(()=>{"use strict"});var qmc=h(()=>{"use strict"});var Wmc=h(()=>{"use strict"});var Hmc=h(()=>{"use strict"});var Wfo,Kmc=h(()=>{"use strict";Wfo={All:"all",Untyped:"untyped"}});var Jmc=h(()=>{"use strict"});var Hfo,Ymc=h(()=>{"use strict";Hfo={Get:"get",Post:"post",Put:"put",Patch:"patch",Delete:"delete",Head:"head",Options:"options",Trace:"trace"}});var Xmc=h(()=>{"use strict"});var Zmc=h(()=>{"use strict"});var $mc=h(()=>{"use strict"});var Kfo,ehc=h(()=>{"use strict";Kfo={Openapi:"openapi",Asyncapi:"asyncapi",Graphql:"graphql"}});var thc=h(()=>{"use strict"});var rhc=h(()=>{"use strict"});var Jfo,nhc=h(()=>{"use strict";Jfo={Stable:"stable",GenerallyAvailable:"generally-available",InDevelopment:"in-development",PreRelease:"pre-release",Deprecated:"deprecated",Beta:"beta",Alpha:"alpha",Preview:"preview",Legacy:"legacy"}});var ihc=h(()=>{"use strict"});var ohc=h(()=>{"use strict"});var shc=h(()=>{"use strict"});var Yfo,ahc=h(()=>{"use strict";Yfo={Default:"default",Canvas:"canvas"}});var chc=h(()=>{"use strict"});var uhc=h(()=>{"use strict"});var lhc=h(()=>{"use strict"});var Xfo,phc=h(()=>{"use strict";Xfo={Timeline:"timeline",Classic:"classic"}});var fhc=h(()=>{"use strict"});var Zfo,dhc=h(()=>{"use strict";Zfo={Warn:"warn",Error:"error"}});var mhc=h(()=>{"use strict"});var hhc=h(()=>{"use strict"});var $fo,ghc=h(()=>{"use strict";$fo={GithubDark:"github-dark",GithubDarkDefault:"github-dark-default",GithubDarkDimmed:"github-dark-dimmed",GithubDarkHighContrast:"github-dark-high-contrast",GithubLight:"github-light",GithubLightDefault:"github-light-default",GithubLightHighContrast:"github-light-high-contrast",MaterialThemeDarker:"material-theme-darker",MinDark:"min-dark",MinLight:"min-light"}});var edo,Ahc=h(()=>{"use strict";edo={OpenByDefault:"open-by-default"}});var yhc=h(()=>{"use strict"});var bhc=h(()=>{"use strict"});var Ehc=h(()=>{"use strict"});var Ihc=h(()=>{"use strict"});var tdo,vhc=h(()=>{"use strict";tdo={Center:"center",Left:"left"}});var Chc=h(()=>{"use strict"});var xhc=h(()=>{"use strict"});var Shc=h(()=>{"use strict"});var whc=h(()=>{"use strict"});var Thc=h(()=>{"use strict"});var Ohc=h(()=>{"use strict"});var Phc=h(()=>{"use strict"});var Bhc=h(()=>{"use strict"});var rdo,Rhc=h(()=>{"use strict";rdo={Github:"github",Dashboard:"dashboard"}});var Dhc=h(()=>{"use strict"});var khc=h(()=>{"use strict"});var Fhc=h(()=>{"use strict"});var Nhc=h(()=>{"use strict"});var jhc=h(()=>{"use strict"});var zhc=h(()=>{"use strict"});var Qhc=h(()=>{"use strict"});var Mhc=h(()=>{"use strict"});var Lhc=h(()=>{"use strict"});var _hc=h(()=>{"use strict"});var Uhc=h(()=>{"use strict"});var ndo,Vhc=h(()=>{"use strict";ndo={Auto:"auto",Block:"block",Swap:"swap",Fallback:"fallback",Optional:"optional"}});var ido,Ghc=h(()=>{"use strict";ido={Normal:"normal",Italic:"italic"}});var qhc=h(()=>{"use strict"});var Whc=h(()=>{"use strict"});var odo,Hhc=h(()=>{"use strict";odo={Default:"default",Minimal:"minimal"}});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 sdo,$hc=h(()=>{"use strict";sdo={Fixed:"fixed",Static:"static"}});var ado,egc=h(()=>{"use strict";ado={Curl:"curl",Csharp:"csharp",Go:"go",Java:"java",Javascript:"javascript",Php:"php",Python:"python",Ruby:"ruby",Swift:"swift",Typescript:"typescript"}});var tgc=h(()=>{"use strict"});var rgc=h(()=>{"use strict"});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=h(()=>{"use strict"});var ugc=h(()=>{"use strict"});var cdo,lgc=h(()=>{"use strict";cdo={BeforeInteractive:"beforeInteractive",AfterInteractive:"afterInteractive",LazyOnload:"lazyOnload"}});var pgc=h(()=>{"use strict"});var udo,fgc=h(()=>{"use strict";udo={Default:"default",Minimal:"minimal"}});var dgc=h(()=>{"use strict"});var mgc=h(()=>{"use strict"});var hgc=h(()=>{"use strict"});var ggc=h(()=>{"use strict"});var ldo,Agc=h(()=>{"use strict";ldo={Python:"python",Cpp:"cpp"}});var ygc=h(()=>{"use strict"});var bgc=h(()=>{"use strict"});var Egc=h(()=>{"use strict"});var pdo,Igc=h(()=>{"use strict";pdo={Compact:"compact",Hyphenated:"hyphenated"}});var vgc=h(()=>{"use strict"});var Cgc=h(()=>{"use strict"});var xgc=h(()=>{"use strict"});var Sgc=h(()=>{"use strict"});var wgc=h(()=>{"use strict"});var Tgc=h(()=>{"use strict"});var Ogc=h(()=>{"use strict"});var Pgc=h(()=>{"use strict"});var Bgc=h(()=>{"use strict"});var Rgc=h(()=>{"use strict"});var fdo,Dgc=h(()=>{"use strict";fdo={Dark:"dark",Light:"light"}});var ddo,kgc=h(()=>{"use strict";ddo={CopyPage:"copy-page",ViewAsMarkdown:"view-as-markdown",AskAi:"ask-ai",Chatgpt:"chatgpt",Claude:"claude",Cursor:"cursor",ClaudeCode:"claude-code",Vscode:"vscode"}});var Fgc=h(()=>{"use strict"});var Ngc=h(()=>{"use strict"});var mdo,jgc=h(()=>{"use strict";mdo={Default:"default",Toolbar:"toolbar"}});var zgc=h(()=>{"use strict"});var hdo,Qgc=h(()=>{"use strict";hdo={Description:"description",Subtitle:"subtitle"}});var Mgc=h(()=>{"use strict"});var Lgc=h(()=>{"use strict"});var _gc=h(()=>{"use strict"});var Ugc=h(()=>{"use strict"});var Vgc=h(()=>{"use strict"});var Ggc=h(()=>{"use strict"});var qgc=h(()=>{"use strict"});var Wgc=h(()=>{"use strict"});var gdo,Hgc=h(()=>{"use strict";gdo={Default:"default",Toggle:"toggle",Tabs:"tabs"}});var Ado,Kgc=h(()=>{"use strict";Ado={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 Jgc=h(()=>{"use strict"});var Ygc=h(()=>{"use strict"});var Xgc=h(()=>{"use strict"});var Zgc=h(()=>{"use strict"});var $gc=h(()=>{"use strict"});var ydo,eAc=h(()=>{"use strict";ydo={Header:"header",HeaderTabs:"header-tabs",Sidebar:"sidebar"}});var tAc=h(()=>{"use strict"});var rAc=h(()=>{"use strict"});var nAc=h(()=>{"use strict"});var bdo,iAc=h(()=>{"use strict";bdo={Default:"default",Minimal:"minimal"}});var oAc=h(()=>{"use strict"});var sAc=h(()=>{"use strict"});var aAc=h(()=>{"use strict"});var cAc=h(()=>{"use strict"});var uAc=h(()=>{"use strict"});var lAc=h(()=>{"use strict"});var Edo,pAc=h(()=>{"use strict";Edo={Unset:"unset",Stable:"stable",GenerallyAvailable:"generally-available",InDevelopment:"in-development",PreRelease:"pre-release",Deprecated:"deprecated",Beta:"beta",Alpha:"alpha",Preview:"preview",Legacy:"legacy"}});var Ido,fAc=h(()=>{"use strict";Ido={Header:"header",Sidebar:"sidebar"}});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 vdo,bAc=h(()=>{"use strict";vdo={Left:"left",Center:"center"}});var Cdo,EAc=h(()=>{"use strict";Cdo={Header:"header",Sidebar:"sidebar"}});var IAc=h(()=>{"use strict"});var vAc=h(()=>{"use strict"});var xdo,CAc=h(()=>{"use strict";xdo={Default:"default",Bubble:"bubble"}});var xAc=h(()=>{"use strict"});var Sdo,SAc=h(()=>{"use strict";Sdo={Blank:"_blank",Self:"_self",Parent:"_parent",Top:"_top"}});var wAc=h(()=>{"use strict"});var wdo,TAc=h(()=>{"use strict";wdo={Frontmatter:"frontmatter",Filename:"filename"}});var OAc=h(()=>{"use strict"});var PAc=h(()=>{"use strict"});var Tdo,BAc=h(()=>{"use strict";Tdo={Summary:"summary",SummaryLargeImage:"summary_large_image",App:"app",Player:"player"}});var RAc=h(()=>{"use strict"});var Odo,DAc=h(()=>{"use strict";Odo={Deprecated:"deprecated",Legacy:"legacy",Ga:"ga",Stable:"stable",Beta:"beta",Alpha:"alpha",Preview:"preview"}});var kAc=h(()=>{"use strict"});var FAc=h(()=>{"use strict"});var NAc=h(()=>{"use strict"});var Pdo,jAc=h(()=>{"use strict";Pdo={Flat:"flat",Grouped:"grouped"}});var zAc=h(()=>{"use strict"});var QAc=h(()=>{"use strict"});var MAc=h(()=>{"use strict"});var Bdo=h(()=>{"use strict";Pmc();Bmc();Rmc();Dmc();kmc();Fmc();Nmc();jmc();zmc();Qmc();Mmc();Lmc();_mc();Umc();Vmc();Gmc();qmc();Wmc();Hmc();Kmc();Jmc();Ymc();Xmc();Zmc();$mc();ehc();thc();rhc();nhc();ihc();ohc();shc();ahc();chc();uhc();lhc();phc();fhc();dhc();mhc();hhc();ghc();Ahc();yhc();bhc();Ehc();Ihc();vhc();Chc();xhc();Shc();whc();Thc();Ohc();Phc();Bhc();Rhc();Dhc();khc();Fhc();Nhc();jhc();zhc();Qhc();Mhc();Lhc();_hc();Uhc();Vhc();Ghc();qhc();Whc();Hhc();Khc();Jhc();Yhc();Xhc();Zhc();$hc();egc();tgc();rgc();ngc();igc();ogc();sgc();agc();cgc();ugc();lgc();pgc();fgc();dgc();mgc();hgc();ggc();Agc();ygc();bgc();Egc();Igc();vgc();Cgc();xgc();Sgc();wgc();Tgc();Ogc();Pgc();Bgc();Rgc();Dgc();kgc();Fgc();Ngc();jgc();zgc();Qgc();Mgc();Lgc();_gc();Ugc();Vgc();Ggc();qgc();Wgc();Hgc();Kgc();Jgc();Ygc();Xgc();Zgc();$gc();eAc();tAc();rAc();nAc();iAc();oAc();sAc();aAc();cAc();uAc();lAc();pAc();fAc();dAc();mAc();hAc();gAc();AAc();yAc();bAc();EAc();IAc();vAc();CAc();xAc();SAc();wAc();TAc();OAc();PAc();BAc();RAc();DAc();kAc();FAc();NAc();jAc();zAc();QAc();MAc()});var WRr={};$(WRr,{AiChatLocation:()=>Vfo,AiChatModel:()=>Gfo,ApiReferenceLayout:()=>qfo,ApiSpecErrorResponseApplyTo:()=>Wfo,ApiSpecErrorResponseHttpMethod:()=>Hfo,ApiSpecType:()=>Kfo,Availability:()=>Jfo,BodyThemeConfig:()=>Yfo,ChangelogLayout:()=>Xfo,CheckRuleSeverity:()=>Zfo,CodeBlockTheme:()=>$fo,CollapsedStringValue:()=>edo,ContentAlignment:()=>tdo,EditThisPageLaunch:()=>rdo,FontDisplay:()=>ndo,FontStyle:()=>ido,FooterNavThemeConfig:()=>odo,HeaderPosition:()=>sdo,HttpSnippetLanguage:()=>ado,JsScriptStrategy:()=>cdo,LanguageSwitcherThemeConfig:()=>udo,LibraryLanguage:()=>ldo,LibrarySlugStyle:()=>pdo,OgDynamicLogoColor:()=>fdo,PageActionOption:()=>ddo,PageActionsThemeConfig:()=>mdo,PageDescriptionSource:()=>hdo,ProductSwitcherThemeConfig:()=>gdo,ProgrammingLanguage:()=>Ado,SearchbarPlacement:()=>ydo,SidebarThemeConfig:()=>bdo,SortByAvailabilityValue:()=>Edo,SwitcherPlacement:()=>Ido,TabsAlignment:()=>vdo,TabsPlacement:()=>Cdo,TabsThemeStyle:()=>xdo,Target:()=>Sdo,TitleSource:()=>wdo,TwitterCardSetting:()=>Tdo,VersionAvailability:()=>Odo,WebSocketOneofDisplay:()=>Pdo});var LAc=h(()=>{"use strict";Bdo()});var _Ac=h(()=>{"use strict";LAc();Bdo()});var Rdo={};$(Rdo,{AiChatLocation:()=>Vfo,AiChatModel:()=>Gfo,ApiReferenceLayout:()=>qfo,ApiSpecErrorResponseApplyTo:()=>Wfo,ApiSpecErrorResponseHttpMethod:()=>Hfo,ApiSpecType:()=>Kfo,Availability:()=>Jfo,BodyThemeConfig:()=>Yfo,ChangelogLayout:()=>Xfo,CheckRuleSeverity:()=>Zfo,CodeBlockTheme:()=>$fo,CollapsedStringValue:()=>edo,ContentAlignment:()=>tdo,EditThisPageLaunch:()=>rdo,FontDisplay:()=>ndo,FontStyle:()=>ido,FooterNavThemeConfig:()=>odo,HeaderPosition:()=>sdo,HttpSnippetLanguage:()=>ado,JsScriptStrategy:()=>cdo,LanguageSwitcherThemeConfig:()=>udo,LibraryLanguage:()=>ldo,LibrarySlugStyle:()=>pdo,OgDynamicLogoColor:()=>fdo,PageActionOption:()=>ddo,PageActionsThemeConfig:()=>mdo,PageDescriptionSource:()=>hdo,ProductSwitcherThemeConfig:()=>gdo,ProgrammingLanguage:()=>Ado,SearchbarPlacement:()=>ydo,SidebarThemeConfig:()=>bdo,SortByAvailabilityValue:()=>Edo,SwitcherPlacement:()=>Ido,TabsAlignment:()=>vdo,TabsPlacement:()=>Cdo,TabsThemeStyle:()=>xdo,Target:()=>Sdo,TitleSource:()=>wdo,TwitterCardSetting:()=>Tdo,VersionAvailability:()=>Odo,WebSocketOneofDisplay:()=>Pdo,docs:()=>WRr});var Ddo=h(()=>{"use strict";_Ac()});var UAc,VAc=h(()=>{"use strict";UAc=(e,t,r)=>JSON.stringify(e,t,r)});function Jcd({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: ${UAc(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 mve(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 d=e.seen.get(l),f=d.schema;if(f.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(f)):Object.assign(c,f),Object.assign(c,u),s._zod.parent===l)for(let g in c)g==="$ref"||g==="allOf"||g in u||delete c[g];if(f.$ref&&d.def)for(let g in c)g==="$ref"||g==="allOf"||g in d.def&&JSON.stringify(c[g])===JSON.stringify(d.def[g])&&delete c[g]}let p=s._zod.parent;if(p&&p!==l){n(p);let d=e.seen.get(p);if(d?.schema.$ref&&(c.$ref=d.schema.$ref,d.def))for(let f in c)f==="$ref"||f==="allOf"||f in d.def&&JSON.stringify(c[f])===JSON.stringify(d.def[f])&&delete c[f]}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:Art(t,"input",e.processors),output:Art(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function V2(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 V2(n.element,r);if(n.type==="set")return V2(n.valueType,r);if(n.type==="lazy")return V2(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 V2(n.innerType,r);if(n.type==="intersection")return V2(n.left,r)||V2(n.right,r);if(n.type==="record"||n.type==="map")return V2(n.keyType,r)||V2(n.valueType,r);if(n.type==="pipe")return V2(n.in,r)||V2(n.out,r);if(n.type==="object"){for(let i in n.shape)if(V2(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(let i of n.options)if(V2(i,r))return!0;return!1}if(n.type==="tuple"){for(let i of n.items)if(V2(i,r))return!0;return!!(n.rest&&V2(n.rest,r))}return!1}var Rlo,Art,F6t=h(()=>{"use strict";R6t();Rlo=(e,t={})=>r=>{let n=fve({...r,processors:t});return xg(e,n),dve(n,e),mve(n,e)},Art=(e,t,r={})=>n=>{let{libraryOptions:i,target:o}=n??{},s=fve({...i??{},target:o,io:t,processors:r});return xg(e,s),dve(s,e),mve(s,e)}});function nRr(e,t){if("_idmap"in e){let n=e,i=fve({...t,processors:eRr}),o={};for(let c of n._idmap.entries()){let[u,l]=c;xg(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;dve(i,l),s[u]=mve(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=fve({...t,processors:eRr});return xg(e,r),dve(r,e),mve(r,e)}var xcd,Dlo,klo,Flo,Nlo,jlo,zlo,Qlo,Mlo,Llo,_lo,Ulo,Vlo,Glo,qlo,Wlo,Hlo,Klo,Jlo,Ylo,Xlo,Zlo,$lo,epo,tpo,rpo,tRr,npo,ipo,opo,spo,apo,cpo,upo,lpo,ppo,fpo,dpo,rRr,mpo,eRr,N6t=h(()=>{"use strict";F6t();oc();xcd={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Dlo=(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=xcd[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}))])}},klo=(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)},Flo=(e,t,r,n)=>{r.type="boolean"},Nlo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},jlo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},zlo=(e,t,r,n)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},Qlo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Mlo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Llo=(e,t,r,n)=>{r.not={}},_lo=(e,t,r,n)=>{},Ulo=(e,t,r,n)=>{},Vlo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Glo=(e,t,r,n)=>{let i=e._zod.def,o=h6t(i.entries);o.every(s=>typeof s=="number")&&(r.type="number"),o.every(s=>typeof s=="string")&&(r.type="string"),r.enum=o},qlo=(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},Wlo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Hlo=(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},Klo=(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)},Jlo=(e,t,r,n)=>{r.type="boolean"},Ylo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Xlo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Zlo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},$lo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},epo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},tpo=(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=xg(o.element,t,{...n,path:[...n.path,"items"]})},rpo=(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]=xg(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=xg(o.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},tRr=(e,t,r,n)=>{let i=e._zod.def,o=i.inclusive===!1,s=i.options.map((a,c)=>xg(a,t,{...n,path:[...n.path,o?"oneOf":"anyOf",c]}));o?r.oneOf=s:r.anyOf=s},npo=(e,t,r,n)=>{let i=e._zod.def,o=xg(i.left,t,{...n,path:[...n.path,"allOf",0]}),s=xg(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},ipo=(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((d,f)=>xg(d,t,{...n,path:[...n.path,s,f]})),u=o.rest?xg(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)},opo=(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=xg(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=xg(o.keyType,t,{...n,path:[...n.path,"propertyNames"]})),i.additionalProperties=xg(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)}},spo=(e,t,r,n)=>{let i=e._zod.def,o=xg(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"}]},apo=(e,t,r,n)=>{let i=e._zod.def;xg(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType},cpo=(e,t,r,n)=>{let i=e._zod.def;xg(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},upo=(e,t,r,n)=>{let i=e._zod.def;xg(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)))},lpo=(e,t,r,n)=>{let i=e._zod.def;xg(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},ppo=(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;xg(o,t,n);let s=t.seen.get(e);s.ref=o},fpo=(e,t,r,n)=>{let i=e._zod.def;xg(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType,r.readOnly=!0},dpo=(e,t,r,n)=>{let i=e._zod.def;xg(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType},rRr=(e,t,r,n)=>{let i=e._zod.def;xg(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType},mpo=(e,t,r,n)=>{let i=e._zod.innerType;xg(i,t,n);let o=t.seen.get(e);o.ref=i},eRr={string:Dlo,number:klo,boolean:Flo,bigint:Nlo,symbol:jlo,null:zlo,undefined:Qlo,void:Mlo,never:Llo,any:_lo,unknown:Ulo,date:Vlo,enum:Glo,literal:qlo,nan:Wlo,template_literal:Hlo,file:Klo,success:Jlo,custom:Ylo,function:Xlo,transform:Zlo,map:$lo,set:epo,array:tpo,object:rpo,union:tRr,intersection:npo,tuple:ipo,record:opo,nullable:spo,nonoptional:apo,default:cpo,prefault:upo,catch:lpo,pipe:ppo,readonly:fpo,promise:dpo,optional:rRr,lazy:mpo}});var iRr,Glc=h(()=>{"use strict";N6t();F6t();iRr=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=fve({processors:eRr,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 xg(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)),dve(this.ctx,t);let n=mve(this.ctx,t),{"~standard":i,...o}=n;return o}}});var qlc={};var Wlc=h(()=>{"use strict"});var Jfe={};$(Jfe,{$ZodAny:()=>auo,$ZodArray:()=>fuo,$ZodAsyncError:()=>sK,$ZodBase64:()=>Xco,$ZodBase64URL:()=>Zco,$ZodBigInt:()=>IBr,$ZodBigIntFormat:()=>nuo,$ZodBoolean:()=>w6t,$ZodCIDRv4:()=>Kco,$ZodCIDRv6:()=>Jco,$ZodCUID:()=>jco,$ZodCUID2:()=>zco,$ZodCatch:()=>Buo,$ZodCheck:()=>gy,$ZodCheckBigIntFormat:()=>lco,$ZodCheckEndsWith:()=>vco,$ZodCheckGreaterThan:()=>dBr,$ZodCheckIncludes:()=>Eco,$ZodCheckLengthEquals:()=>gco,$ZodCheckLessThan:()=>fBr,$ZodCheckLowerCase:()=>yco,$ZodCheckMaxLength:()=>mco,$ZodCheckMaxSize:()=>pco,$ZodCheckMimeType:()=>xco,$ZodCheckMinLength:()=>hco,$ZodCheckMinSize:()=>fco,$ZodCheckMultipleOf:()=>cco,$ZodCheckNumberFormat:()=>uco,$ZodCheckOverwrite:()=>Sco,$ZodCheckProperty:()=>Cco,$ZodCheckRegex:()=>Aco,$ZodCheckSizeEquals:()=>dco,$ZodCheckStartsWith:()=>Ico,$ZodCheckStringFormat:()=>rrt,$ZodCheckUpperCase:()=>bco,$ZodCodec:()=>O6t,$ZodCustom:()=>Quo,$ZodCustomStringFormat:()=>tuo,$ZodDate:()=>puo,$ZodDefault:()=>wuo,$ZodDiscriminatedUnion:()=>huo,$ZodE164:()=>$co,$ZodEmail:()=>Dco,$ZodEmoji:()=>Fco,$ZodEncodeError:()=>ove,$ZodEnum:()=>Euo,$ZodError:()=>E6t,$ZodExactOptional:()=>xuo,$ZodFile:()=>vuo,$ZodFunction:()=>Nuo,$ZodGUID:()=>Bco,$ZodIPv4:()=>qco,$ZodIPv6:()=>Wco,$ZodISODate:()=>Uco,$ZodISODateTime:()=>_co,$ZodISODuration:()=>Gco,$ZodISOTime:()=>Vco,$ZodIntersection:()=>guo,$ZodJWT:()=>euo,$ZodKSUID:()=>Lco,$ZodLazy:()=>zuo,$ZodLiteral:()=>Iuo,$ZodMAC:()=>Hco,$ZodMap:()=>yuo,$ZodNaN:()=>Ruo,$ZodNanoID:()=>Nco,$ZodNever:()=>uuo,$ZodNonOptional:()=>Ouo,$ZodNull:()=>suo,$ZodNullable:()=>Suo,$ZodNumber:()=>EBr,$ZodNumberFormat:()=>ruo,$ZodObject:()=>Zcc,$ZodObjectJIT:()=>duo,$ZodOptional:()=>CBr,$ZodPipe:()=>Duo,$ZodPrefault:()=>Tuo,$ZodPromise:()=>juo,$ZodReadonly:()=>kuo,$ZodRealError:()=>EQ,$ZodRecord:()=>Auo,$ZodRegistry:()=>TBr,$ZodSet:()=>buo,$ZodString:()=>s6e,$ZodStringFormat:()=>LA,$ZodSuccess:()=>Puo,$ZodSymbol:()=>iuo,$ZodTemplateLiteral:()=>Fuo,$ZodTransform:()=>Cuo,$ZodTuple:()=>vBr,$ZodType:()=>hl,$ZodULID:()=>Qco,$ZodURL:()=>kco,$ZodUUID:()=>Rco,$ZodUndefined:()=>ouo,$ZodUnion:()=>T6t,$ZodUnknown:()=>cuo,$ZodVoid:()=>luo,$ZodXID:()=>Mco,$ZodXor:()=>muo,$brand:()=>YPr,$constructor:()=>wr,$input:()=>quo,$output:()=>Guo,Doc:()=>S6t,JSONSchema:()=>qlc,JSONSchemaGenerator:()=>iRr,NEVER:()=>Aao,TimePrecision:()=>Juo,_any:()=>glo,_array:()=>Clo,_base64:()=>qBr,_base64url:()=>WBr,_bigint:()=>ulo,_boolean:()=>alo,_catch:()=>ycd,_check:()=>Ulc,_cidrv4:()=>VBr,_cidrv6:()=>GBr,_coercedBigint:()=>llo,_coercedBoolean:()=>clo,_coercedDate:()=>Ilo,_coercedNumber:()=>tlo,_coercedString:()=>Huo,_cuid:()=>jBr,_cuid2:()=>zBr,_custom:()=>Slo,_date:()=>Elo,_decode:()=>rBr,_decodeAsync:()=>iBr,_default:()=>hcd,_discriminatedUnion:()=>ncd,_e164:()=>HBr,_email:()=>PBr,_emoji:()=>FBr,_encode:()=>tBr,_encodeAsync:()=>nBr,_endsWith:()=>urt,_enum:()=>ucd,_file:()=>xlo,_float32:()=>nlo,_float64:()=>ilo,_gt:()=>z$,_gte:()=>U2,_guid:()=>D6t,_includes:()=>art,_int:()=>rlo,_int32:()=>olo,_int64:()=>plo,_intersection:()=>icd,_ipv4:()=>_Br,_ipv6:()=>UBr,_isoDate:()=>Xuo,_isoDateTime:()=>Yuo,_isoDuration:()=>$uo,_isoTime:()=>Zuo,_jwt:()=>KBr,_ksuid:()=>LBr,_lazy:()=>vcd,_length:()=>u6e,_literal:()=>pcd,_lowercase:()=>ort,_lt:()=>j$,_lte:()=>K3,_mac:()=>Kuo,_map:()=>acd,_max:()=>K3,_maxLength:()=>c6e,_maxSize:()=>pve,_mime:()=>lrt,_min:()=>U2,_minLength:()=>Kfe,_minSize:()=>Q$,_multipleOf:()=>lve,_nan:()=>vlo,_nanoid:()=>NBr,_nativeEnum:()=>lcd,_negative:()=>YBr,_never:()=>ylo,_nonnegative:()=>ZBr,_nonoptional:()=>gcd,_nonpositive:()=>XBr,_normalize:()=>prt,_null:()=>hlo,_nullable:()=>mcd,_number:()=>elo,_optional:()=>dcd,_overwrite:()=>aK,_parse:()=>Ztt,_parseAsync:()=>$tt,_pipe:()=>bcd,_positive:()=>JBr,_promise:()=>Ccd,_property:()=>$Br,_readonly:()=>Ecd,_record:()=>scd,_refine:()=>wlo,_regex:()=>irt,_safeDecode:()=>sBr,_safeDecodeAsync:()=>cBr,_safeEncode:()=>oBr,_safeEncodeAsync:()=>aBr,_safeParse:()=>ert,_safeParseAsync:()=>trt,_set:()=>ccd,_size:()=>a6e,_slugify:()=>hrt,_startsWith:()=>crt,_string:()=>Wuo,_stringFormat:()=>grt,_stringbool:()=>Blo,_success:()=>Acd,_superRefine:()=>Tlo,_symbol:()=>dlo,_templateLiteral:()=>Icd,_toLowerCase:()=>drt,_toUpperCase:()=>mrt,_transform:()=>fcd,_trim:()=>frt,_tuple:()=>ocd,_uint32:()=>slo,_uint64:()=>flo,_ulid:()=>QBr,_undefined:()=>mlo,_union:()=>tcd,_unknown:()=>Alo,_uppercase:()=>srt,_url:()=>k6t,_uuid:()=>BBr,_uuidv4:()=>RBr,_uuidv6:()=>DBr,_uuidv7:()=>kBr,_void:()=>blo,_xid:()=>MBr,_xor:()=>rcd,clone:()=>_2,config:()=>Iv,createStandardJSONSchemaMethod:()=>Art,createToJSONSchemaMethod:()=>Rlo,decode:()=>wsd,decodeAsync:()=>Osd,describe:()=>Olo,encode:()=>Ssd,encodeAsync:()=>Tsd,extractDefs:()=>dve,finalize:()=>mve,flattenError:()=>I6t,formatError:()=>v6t,globalConfig:()=>d6t,globalRegistry:()=>AB,initializeContext:()=>fve,isValidBase64:()=>Yco,isValidBase64URL:()=>Kcc,isValidJWT:()=>Jcc,locales:()=>B6t,meta:()=>Plo,parse:()=>$Pr,parseAsync:()=>eBr,prettifyError:()=>Pao,process:()=>xg,regexes:()=>d5,registry:()=>OBr,safeDecode:()=>Bsd,safeDecodeAsync:()=>Dsd,safeEncode:()=>Psd,safeEncodeAsync:()=>Rsd,safeParse:()=>Rao,safeParseAsync:()=>Dao,toDotPath:()=>Bcc,toJSONSchema:()=>nRr,treeifyError:()=>Oao,util:()=>ki,version:()=>Tco});var IQ=h(()=>{"use strict";Ktt();kao();Bao();Muo();mBr();Oco();oc();pBr();Vuo();R6t();wco();Vlc();F6t();N6t();Glc();Wlc()});var oRr={};$(oRr,{endsWith:()=>urt,gt:()=>z$,gte:()=>U2,includes:()=>art,length:()=>u6e,lowercase:()=>ort,lt:()=>j$,lte:()=>K3,maxLength:()=>c6e,maxSize:()=>pve,mime:()=>lrt,minLength:()=>Kfe,minSize:()=>Q$,multipleOf:()=>lve,negative:()=>YBr,nonnegative:()=>ZBr,nonpositive:()=>XBr,normalize:()=>prt,overwrite:()=>aK,positive:()=>JBr,property:()=>$Br,regex:()=>irt,size:()=>a6e,slugify:()=>hrt,startsWith:()=>crt,toLowerCase:()=>drt,toUpperCase:()=>mrt,trim:()=>frt,uppercase:()=>srt});var sRr=h(()=>{"use strict";IQ()});var yrt={};$(yrt,{ZodISODate:()=>cRr,ZodISODateTime:()=>aRr,ZodISODuration:()=>lRr,ZodISOTime:()=>uRr,date:()=>gpo,datetime:()=>hpo,duration:()=>ypo,time:()=>Apo});function hpo(e){return Yuo(aRr,e)}function gpo(e){return Xuo(cRr,e)}function Apo(e){return Zuo(uRr,e)}function ypo(e){return $uo(lRr,e)}var aRr,cRr,uRr,lRr,j6t=h(()=>{"use strict";IQ();Q6t();aRr=wr("ZodISODateTime",(e,t)=>{_co.init(e,t),_A.init(e,t)});cRr=wr("ZodISODate",(e,t)=>{Uco.init(e,t),_A.init(e,t)});uRr=wr("ZodISOTime",(e,t)=>{Vco.init(e,t),_A.init(e,t)});lRr=wr("ZodISODuration",(e,t)=>{Gco.init(e,t),_A.init(e,t)})});var Hlc,wcd,vQ,bpo=h(()=>{"use strict";IQ();IQ();oc();Hlc=(e,t)=>{E6t.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>v6t(e,r)},flatten:{value:r=>I6t(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Jtt,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Jtt,2)}},isEmpty:{get(){return e.issues.length===0}}})},wcd=wr("ZodError",Hlc),vQ=wr("ZodError",Hlc,{Parent:Error})});var Epo,Ipo,vpo,Cpo,xpo,Spo,wpo,Tpo,Opo,Ppo,Bpo,Rpo,Dpo=h(()=>{"use strict";IQ();bpo();Epo=Ztt(vQ),Ipo=$tt(vQ),vpo=ert(vQ),Cpo=trt(vQ),xpo=tBr(vQ),Spo=rBr(vQ),wpo=nBr(vQ),Tpo=iBr(vQ),Opo=oBr(vQ),Ppo=sBr(vQ),Bpo=aBr(vQ),Rpo=cBr(vQ)});var z6t={};$(z6t,{ZodAny:()=>Lpo,ZodArray:()=>Gpo,ZodBase64:()=>wRr,ZodBase64URL:()=>TRr,ZodBigInt:()=>xrt,ZodBigIntFormat:()=>BRr,ZodBoolean:()=>Crt,ZodCIDRv4:()=>xRr,ZodCIDRv6:()=>SRr,ZodCUID:()=>ARr,ZodCUID2:()=>yRr,ZodCatch:()=>ffo,ZodCodec:()=>QRr,ZodCustom:()=>J6t,ZodCustomStringFormat:()=>Irt,ZodDate:()=>G6t,ZodDefault:()=>sfo,ZodDiscriminatedUnion:()=>Wpo,ZodE164:()=>ORr,ZodEmail:()=>mRr,ZodEmoji:()=>hRr,ZodEnum:()=>brt,ZodExactOptional:()=>nfo,ZodFile:()=>tfo,ZodFunction:()=>Ifo,ZodGUID:()=>M6t,ZodIPv4:()=>vRr,ZodIPv6:()=>CRr,ZodIntersection:()=>Hpo,ZodJWT:()=>PRr,ZodKSUID:()=>IRr,ZodLazy:()=>yfo,ZodLiteral:()=>efo,ZodMAC:()=>kpo,ZodMap:()=>Zpo,ZodNaN:()=>mfo,ZodNanoID:()=>gRr,ZodNever:()=>Upo,ZodNonOptional:()=>jRr,ZodNull:()=>Qpo,ZodNullable:()=>ofo,ZodNumber:()=>vrt,ZodNumberFormat:()=>p6e,ZodObject:()=>W6t,ZodOptional:()=>NRr,ZodPipe:()=>zRr,ZodPrefault:()=>cfo,ZodPromise:()=>Efo,ZodReadonly:()=>hfo,ZodRecord:()=>K6t,ZodSet:()=>$po,ZodString:()=>Ert,ZodStringFormat:()=>_A,ZodSuccess:()=>pfo,ZodSymbol:()=>jpo,ZodTemplateLiteral:()=>Afo,ZodTransform:()=>rfo,ZodTuple:()=>Jpo,ZodType:()=>Dp,ZodULID:()=>bRr,ZodURL:()=>V6t,ZodUUID:()=>M$,ZodUndefined:()=>zpo,ZodUnion:()=>H6t,ZodUnknown:()=>_po,ZodVoid:()=>Vpo,ZodXID:()=>ERr,ZodXor:()=>qpo,_ZodString:()=>dRr,_default:()=>afo,_function:()=>$pc,any:()=>Rpc,array:()=>q6t,base64:()=>mpc,base64url:()=>hpc,bigint:()=>wpc,boolean:()=>Npo,catch:()=>dfo,check:()=>efc,cidrv4:()=>fpc,cidrv6:()=>dpc,codec:()=>Ypc,cuid:()=>ipc,cuid2:()=>opc,custom:()=>tfc,date:()=>kpc,describe:()=>rfc,discriminatedUnion:()=>Mpc,e164:()=>gpc,email:()=>Klc,emoji:()=>rpc,enum:()=>kRr,exactOptional:()=>ifo,file:()=>Wpc,float32:()=>vpc,float64:()=>Cpc,function:()=>$pc,guid:()=>Jlc,hash:()=>Ipc,hex:()=>Epc,hostname:()=>bpc,httpUrl:()=>tpc,instanceof:()=>ifc,int:()=>fRr,int32:()=>xpc,int64:()=>Tpc,intersection:()=>Kpo,ipv4:()=>upc,ipv6:()=>ppc,json:()=>sfc,jwt:()=>Apc,keyof:()=>Fpc,ksuid:()=>cpc,lazy:()=>bfo,literal:()=>qpc,looseObject:()=>zpc,looseRecord:()=>_pc,mac:()=>lpc,map:()=>Upc,meta:()=>nfc,nan:()=>Jpc,nanoid:()=>npc,nativeEnum:()=>Gpc,never:()=>RRr,nonoptional:()=>lfo,null:()=>Mpo,nullable:()=>_6t,nullish:()=>Hpc,number:()=>Fpo,object:()=>Npc,optional:()=>L6t,partialRecord:()=>Lpc,pipe:()=>U6t,prefault:()=>ufo,preprocess:()=>afc,promise:()=>Zpc,readonly:()=>gfo,record:()=>Xpo,refine:()=>vfo,set:()=>Vpc,strictObject:()=>jpc,string:()=>pRr,stringFormat:()=>ypc,stringbool:()=>ofc,success:()=>Kpc,superRefine:()=>Cfo,symbol:()=>Ppc,templateLiteral:()=>Xpc,transform:()=>FRr,tuple:()=>Ypo,uint32:()=>Spc,uint64:()=>Opc,ulid:()=>spc,undefined:()=>Bpc,union:()=>DRr,unknown:()=>l6e,url:()=>epc,uuid:()=>Ylc,uuidv4:()=>Xlc,uuidv6:()=>Zlc,uuidv7:()=>$lc,void:()=>Dpc,xid:()=>apc,xor:()=>Qpc});function pRr(e){return Wuo(Ert,e)}function Klc(e){return PBr(mRr,e)}function Jlc(e){return D6t(M6t,e)}function Ylc(e){return BBr(M$,e)}function Xlc(e){return RBr(M$,e)}function Zlc(e){return DBr(M$,e)}function $lc(e){return kBr(M$,e)}function epc(e){return k6t(V6t,e)}function tpc(e){return k6t(V6t,{protocol:/^https?$/,hostname:d5.domain,...ki.normalizeParams(e)})}function rpc(e){return FBr(hRr,e)}function npc(e){return NBr(gRr,e)}function ipc(e){return jBr(ARr,e)}function opc(e){return zBr(yRr,e)}function spc(e){return QBr(bRr,e)}function apc(e){return MBr(ERr,e)}function cpc(e){return LBr(IRr,e)}function upc(e){return _Br(vRr,e)}function lpc(e){return Kuo(kpo,e)}function ppc(e){return UBr(CRr,e)}function fpc(e){return VBr(xRr,e)}function dpc(e){return GBr(SRr,e)}function mpc(e){return qBr(wRr,e)}function hpc(e){return WBr(TRr,e)}function gpc(e){return HBr(ORr,e)}function Apc(e){return KBr(PRr,e)}function ypc(e,t,r={}){return grt(Irt,e,t,r)}function bpc(e){return grt(Irt,"hostname",d5.hostname,e)}function Epc(e){return grt(Irt,"hex",d5.hex,e)}function Ipc(e,t){let r=t?.enc??"hex",n=`${e}_${r}`,i=d5[n];if(!i)throw new Error(`Unrecognized hash format: ${n}`);return grt(Irt,n,i,t)}function Fpo(e){return elo(vrt,e)}function fRr(e){return rlo(p6e,e)}function vpc(e){return nlo(p6e,e)}function Cpc(e){return ilo(p6e,e)}function xpc(e){return olo(p6e,e)}function Spc(e){return slo(p6e,e)}function Npo(e){return alo(Crt,e)}function wpc(e){return ulo(xrt,e)}function Tpc(e){return plo(BRr,e)}function Opc(e){return flo(BRr,e)}function Ppc(e){return dlo(jpo,e)}function Bpc(e){return mlo(zpo,e)}function Mpo(e){return hlo(Qpo,e)}function Rpc(){return glo(Lpo)}function l6e(){return Alo(_po)}function RRr(e){return ylo(Upo,e)}function Dpc(e){return blo(Vpo,e)}function kpc(e){return Elo(G6t,e)}function q6t(e,t){return Clo(Gpo,e,t)}function Fpc(e){let t=e._zod.def.shape;return kRr(Object.keys(t))}function Npc(e,t){let r={type:"object",shape:e??{},...ki.normalizeParams(t)};return new W6t(r)}function jpc(e,t){return new W6t({type:"object",shape:e,catchall:RRr(),...ki.normalizeParams(t)})}function zpc(e,t){return new W6t({type:"object",shape:e,catchall:l6e(),...ki.normalizeParams(t)})}function DRr(e,t){return new H6t({type:"union",options:e,...ki.normalizeParams(t)})}function Qpc(e,t){return new qpo({type:"union",options:e,inclusive:!1,...ki.normalizeParams(t)})}function Mpc(e,t,r){return new Wpo({type:"union",options:t,discriminator:e,...ki.normalizeParams(r)})}function Kpo(e,t){return new Hpo({type:"intersection",left:e,right:t})}function Ypo(e,t,r){let n=t instanceof hl,i=n?r:t,o=n?t:null;return new Jpo({type:"tuple",items:e,rest:o,...ki.normalizeParams(i)})}function Xpo(e,t,r){return new K6t({type:"record",keyType:e,valueType:t,...ki.normalizeParams(r)})}function Lpc(e,t,r){let n=_2(e);return n._zod.values=void 0,new K6t({type:"record",keyType:n,valueType:t,...ki.normalizeParams(r)})}function _pc(e,t,r){return new K6t({type:"record",keyType:e,valueType:t,mode:"loose",...ki.normalizeParams(r)})}function Upc(e,t,r){return new Zpo({type:"map",keyType:e,valueType:t,...ki.normalizeParams(r)})}function Vpc(e,t){return new $po({type:"set",valueType:e,...ki.normalizeParams(t)})}function kRr(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new brt({type:"enum",entries:r,...ki.normalizeParams(t)})}function Gpc(e,t){return new brt({type:"enum",entries:e,...ki.normalizeParams(t)})}function qpc(e,t){return new efo({type:"literal",values:Array.isArray(e)?e:[e],...ki.normalizeParams(t)})}function Wpc(e){return xlo(tfo,e)}function FRr(e){return new rfo({type:"transform",transform:e})}function L6t(e){return new NRr({type:"optional",innerType:e})}function ifo(e){return new nfo({type:"optional",innerType:e})}function _6t(e){return new ofo({type:"nullable",innerType:e})}function Hpc(e){return L6t(_6t(e))}function afo(e,t){return new sfo({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():ki.shallowClone(t)}})}function ufo(e,t){return new cfo({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():ki.shallowClone(t)}})}function lfo(e,t){return new jRr({type:"nonoptional",innerType:e,...ki.normalizeParams(t)})}function Kpc(e){return new pfo({type:"success",innerType:e})}function dfo(e,t){return new ffo({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function Jpc(e){return vlo(mfo,e)}function U6t(e,t){return new zRr({type:"pipe",in:e,out:t})}function Ypc(e,t,r){return new QRr({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function gfo(e){return new hfo({type:"readonly",innerType:e})}function Xpc(e,t){return new Afo({type:"template_literal",parts:e,...ki.normalizeParams(t)})}function bfo(e){return new yfo({type:"lazy",getter:e})}function Zpc(e){return new Efo({type:"promise",innerType:e})}function $pc(e){return new Ifo({type:"function",input:Array.isArray(e?.input)?Ypo(e?.input):e?.input??q6t(l6e()),output:e?.output??l6e()})}function efc(e){let t=new gy({check:"custom"});return t._zod.check=e,t}function tfc(e,t){return Slo(J6t,e??(()=>!0),t)}function vfo(e,t={}){return wlo(J6t,e,t)}function Cfo(e){return Tlo(e)}function ifc(e,t={}){let r=new J6t({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...ki.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 sfc(e){let t=bfo(()=>DRr([pRr(e),Fpo(),Npo(),Mpo(),q6t(t),Xpo(pRr(),t)]));return t}function afc(e,t){return U6t(FRr(e),t)}var Dp,dRr,Ert,_A,mRr,M6t,M$,V6t,hRr,gRr,ARr,yRr,bRr,ERr,IRr,vRr,kpo,CRr,xRr,SRr,wRr,TRr,ORr,PRr,Irt,vrt,p6e,Crt,xrt,BRr,jpo,zpo,Qpo,Lpo,_po,Upo,Vpo,G6t,Gpo,W6t,H6t,qpo,Wpo,Hpo,Jpo,K6t,Zpo,$po,brt,efo,tfo,rfo,NRr,nfo,ofo,sfo,cfo,jRr,pfo,ffo,mfo,zRr,QRr,hfo,Afo,yfo,Efo,Ifo,J6t,rfc,nfc,ofc,Q6t=h(()=>{"use strict";IQ();IQ();N6t();F6t();sRr();j6t();Dpo();Dp=wr("ZodType",(e,t)=>(hl.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Art(e,"input"),output:Art(e,"output")}}),e.toJSONSchema=Rlo(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(ki.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)=>_2(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>Epo(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>vpo(e,r,n),e.parseAsync=async(r,n)=>Ipo(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>Cpo(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>xpo(e,r,n),e.decode=(r,n)=>Spo(e,r,n),e.encodeAsync=async(r,n)=>wpo(e,r,n),e.decodeAsync=async(r,n)=>Tpo(e,r,n),e.safeEncode=(r,n)=>Opo(e,r,n),e.safeDecode=(r,n)=>Ppo(e,r,n),e.safeEncodeAsync=async(r,n)=>Bpo(e,r,n),e.safeDecodeAsync=async(r,n)=>Rpo(e,r,n),e.refine=(r,n)=>e.check(vfo(r,n)),e.superRefine=r=>e.check(Cfo(r)),e.overwrite=r=>e.check(aK(r)),e.optional=()=>L6t(e),e.exactOptional=()=>ifo(e),e.nullable=()=>_6t(e),e.nullish=()=>L6t(_6t(e)),e.nonoptional=r=>lfo(e,r),e.array=()=>q6t(e),e.or=r=>DRr([e,r]),e.and=r=>Kpo(e,r),e.transform=r=>U6t(e,FRr(r)),e.default=r=>afo(e,r),e.prefault=r=>ufo(e,r),e.catch=r=>dfo(e,r),e.pipe=r=>U6t(e,r),e.readonly=()=>gfo(e),e.describe=r=>{let n=e.clone();return AB.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return AB.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return AB.get(e);let n=e.clone();return AB.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),dRr=wr("_ZodString",(e,t)=>{s6e.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>Dlo(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(irt(...n)),e.includes=(...n)=>e.check(art(...n)),e.startsWith=(...n)=>e.check(crt(...n)),e.endsWith=(...n)=>e.check(urt(...n)),e.min=(...n)=>e.check(Kfe(...n)),e.max=(...n)=>e.check(c6e(...n)),e.length=(...n)=>e.check(u6e(...n)),e.nonempty=(...n)=>e.check(Kfe(1,...n)),e.lowercase=n=>e.check(ort(n)),e.uppercase=n=>e.check(srt(n)),e.trim=()=>e.check(frt()),e.normalize=(...n)=>e.check(prt(...n)),e.toLowerCase=()=>e.check(drt()),e.toUpperCase=()=>e.check(mrt()),e.slugify=()=>e.check(hrt())}),Ert=wr("ZodString",(e,t)=>{s6e.init(e,t),dRr.init(e,t),e.email=r=>e.check(PBr(mRr,r)),e.url=r=>e.check(k6t(V6t,r)),e.jwt=r=>e.check(KBr(PRr,r)),e.emoji=r=>e.check(FBr(hRr,r)),e.guid=r=>e.check(D6t(M6t,r)),e.uuid=r=>e.check(BBr(M$,r)),e.uuidv4=r=>e.check(RBr(M$,r)),e.uuidv6=r=>e.check(DBr(M$,r)),e.uuidv7=r=>e.check(kBr(M$,r)),e.nanoid=r=>e.check(NBr(gRr,r)),e.guid=r=>e.check(D6t(M6t,r)),e.cuid=r=>e.check(jBr(ARr,r)),e.cuid2=r=>e.check(zBr(yRr,r)),e.ulid=r=>e.check(QBr(bRr,r)),e.base64=r=>e.check(qBr(wRr,r)),e.base64url=r=>e.check(WBr(TRr,r)),e.xid=r=>e.check(MBr(ERr,r)),e.ksuid=r=>e.check(LBr(IRr,r)),e.ipv4=r=>e.check(_Br(vRr,r)),e.ipv6=r=>e.check(UBr(CRr,r)),e.cidrv4=r=>e.check(VBr(xRr,r)),e.cidrv6=r=>e.check(GBr(SRr,r)),e.e164=r=>e.check(HBr(ORr,r)),e.datetime=r=>e.check(hpo(r)),e.date=r=>e.check(gpo(r)),e.time=r=>e.check(Apo(r)),e.duration=r=>e.check(ypo(r))});_A=wr("ZodStringFormat",(e,t)=>{LA.init(e,t),dRr.init(e,t)}),mRr=wr("ZodEmail",(e,t)=>{Dco.init(e,t),_A.init(e,t)});M6t=wr("ZodGUID",(e,t)=>{Bco.init(e,t),_A.init(e,t)});M$=wr("ZodUUID",(e,t)=>{Rco.init(e,t),_A.init(e,t)});V6t=wr("ZodURL",(e,t)=>{kco.init(e,t),_A.init(e,t)});hRr=wr("ZodEmoji",(e,t)=>{Fco.init(e,t),_A.init(e,t)});gRr=wr("ZodNanoID",(e,t)=>{Nco.init(e,t),_A.init(e,t)});ARr=wr("ZodCUID",(e,t)=>{jco.init(e,t),_A.init(e,t)});yRr=wr("ZodCUID2",(e,t)=>{zco.init(e,t),_A.init(e,t)});bRr=wr("ZodULID",(e,t)=>{Qco.init(e,t),_A.init(e,t)});ERr=wr("ZodXID",(e,t)=>{Mco.init(e,t),_A.init(e,t)});IRr=wr("ZodKSUID",(e,t)=>{Lco.init(e,t),_A.init(e,t)});vRr=wr("ZodIPv4",(e,t)=>{qco.init(e,t),_A.init(e,t)});kpo=wr("ZodMAC",(e,t)=>{Hco.init(e,t),_A.init(e,t)});CRr=wr("ZodIPv6",(e,t)=>{Wco.init(e,t),_A.init(e,t)});xRr=wr("ZodCIDRv4",(e,t)=>{Kco.init(e,t),_A.init(e,t)});SRr=wr("ZodCIDRv6",(e,t)=>{Jco.init(e,t),_A.init(e,t)});wRr=wr("ZodBase64",(e,t)=>{Xco.init(e,t),_A.init(e,t)});TRr=wr("ZodBase64URL",(e,t)=>{Zco.init(e,t),_A.init(e,t)});ORr=wr("ZodE164",(e,t)=>{$co.init(e,t),_A.init(e,t)});PRr=wr("ZodJWT",(e,t)=>{euo.init(e,t),_A.init(e,t)});Irt=wr("ZodCustomStringFormat",(e,t)=>{tuo.init(e,t),_A.init(e,t)});vrt=wr("ZodNumber",(e,t)=>{EBr.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>klo(e,n,i,o),e.gt=(n,i)=>e.check(z$(n,i)),e.gte=(n,i)=>e.check(U2(n,i)),e.min=(n,i)=>e.check(U2(n,i)),e.lt=(n,i)=>e.check(j$(n,i)),e.lte=(n,i)=>e.check(K3(n,i)),e.max=(n,i)=>e.check(K3(n,i)),e.int=n=>e.check(fRr(n)),e.safe=n=>e.check(fRr(n)),e.positive=n=>e.check(z$(0,n)),e.nonnegative=n=>e.check(U2(0,n)),e.negative=n=>e.check(j$(0,n)),e.nonpositive=n=>e.check(K3(0,n)),e.multipleOf=(n,i)=>e.check(lve(n,i)),e.step=(n,i)=>e.check(lve(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});p6e=wr("ZodNumberFormat",(e,t)=>{ruo.init(e,t),vrt.init(e,t)});Crt=wr("ZodBoolean",(e,t)=>{w6t.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Flo(e,r,n,i)});xrt=wr("ZodBigInt",(e,t)=>{IBr.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>Nlo(e,n,i,o),e.gte=(n,i)=>e.check(U2(n,i)),e.min=(n,i)=>e.check(U2(n,i)),e.gt=(n,i)=>e.check(z$(n,i)),e.gte=(n,i)=>e.check(U2(n,i)),e.min=(n,i)=>e.check(U2(n,i)),e.lt=(n,i)=>e.check(j$(n,i)),e.lte=(n,i)=>e.check(K3(n,i)),e.max=(n,i)=>e.check(K3(n,i)),e.positive=n=>e.check(z$(BigInt(0),n)),e.negative=n=>e.check(j$(BigInt(0),n)),e.nonpositive=n=>e.check(K3(BigInt(0),n)),e.nonnegative=n=>e.check(U2(BigInt(0),n)),e.multipleOf=(n,i)=>e.check(lve(n,i));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});BRr=wr("ZodBigIntFormat",(e,t)=>{nuo.init(e,t),xrt.init(e,t)});jpo=wr("ZodSymbol",(e,t)=>{iuo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>jlo(e,r,n,i)});zpo=wr("ZodUndefined",(e,t)=>{ouo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Qlo(e,r,n,i)});Qpo=wr("ZodNull",(e,t)=>{suo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>zlo(e,r,n,i)});Lpo=wr("ZodAny",(e,t)=>{auo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>_lo(e,r,n,i)});_po=wr("ZodUnknown",(e,t)=>{cuo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Ulo(e,r,n,i)});Upo=wr("ZodNever",(e,t)=>{uuo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Llo(e,r,n,i)});Vpo=wr("ZodVoid",(e,t)=>{luo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Mlo(e,r,n,i)});G6t=wr("ZodDate",(e,t)=>{puo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>Vlo(e,n,i,o),e.min=(n,i)=>e.check(U2(n,i)),e.max=(n,i)=>e.check(K3(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});Gpo=wr("ZodArray",(e,t)=>{fuo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>tpo(e,r,n,i),e.element=t.element,e.min=(r,n)=>e.check(Kfe(r,n)),e.nonempty=r=>e.check(Kfe(1,r)),e.max=(r,n)=>e.check(c6e(r,n)),e.length=(r,n)=>e.check(u6e(r,n)),e.unwrap=()=>e.element});W6t=wr("ZodObject",(e,t)=>{duo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>rpo(e,r,n,i),ki.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>kRr(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:l6e()}),e.loose=()=>e.clone({...e._zod.def,catchall:l6e()}),e.strict=()=>e.clone({...e._zod.def,catchall:RRr()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>ki.extend(e,r),e.safeExtend=r=>ki.safeExtend(e,r),e.merge=r=>ki.merge(e,r),e.pick=r=>ki.pick(e,r),e.omit=r=>ki.omit(e,r),e.partial=(...r)=>ki.partial(NRr,e,r[0]),e.required=(...r)=>ki.required(jRr,e,r[0])});H6t=wr("ZodUnion",(e,t)=>{T6t.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>tRr(e,r,n,i),e.options=t.options});qpo=wr("ZodXor",(e,t)=>{H6t.init(e,t),muo.init(e,t),e._zod.processJSONSchema=(r,n,i)=>tRr(e,r,n,i),e.options=t.options});Wpo=wr("ZodDiscriminatedUnion",(e,t)=>{H6t.init(e,t),huo.init(e,t)});Hpo=wr("ZodIntersection",(e,t)=>{guo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>npo(e,r,n,i)});Jpo=wr("ZodTuple",(e,t)=>{vBr.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>ipo(e,r,n,i),e.rest=r=>e.clone({...e._zod.def,rest:r})});K6t=wr("ZodRecord",(e,t)=>{Auo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>opo(e,r,n,i),e.keyType=t.keyType,e.valueType=t.valueType});Zpo=wr("ZodMap",(e,t)=>{yuo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>$lo(e,r,n,i),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(Q$(...r)),e.nonempty=r=>e.check(Q$(1,r)),e.max=(...r)=>e.check(pve(...r)),e.size=(...r)=>e.check(a6e(...r))});$po=wr("ZodSet",(e,t)=>{buo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>epo(e,r,n,i),e.min=(...r)=>e.check(Q$(...r)),e.nonempty=r=>e.check(Q$(1,r)),e.max=(...r)=>e.check(pve(...r)),e.size=(...r)=>e.check(a6e(...r))});brt=wr("ZodEnum",(e,t)=>{Euo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>Glo(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 brt({...t,checks:[],...ki.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 brt({...t,checks:[],...ki.normalizeParams(i),entries:o})}});efo=wr("ZodLiteral",(e,t)=>{Iuo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>qlo(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]}})});tfo=wr("ZodFile",(e,t)=>{vuo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Klo(e,r,n,i),e.min=(r,n)=>e.check(Q$(r,n)),e.max=(r,n)=>e.check(pve(r,n)),e.mime=(r,n)=>e.check(lrt(Array.isArray(r)?r:[r],n))});rfo=wr("ZodTransform",(e,t)=>{Cuo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Zlo(e,r,n,i),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new ove(e.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(ki.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(ki.issue(s))}};let i=t.transform(r.value,r);return i instanceof Promise?i.then(o=>(r.value=o,r)):(r.value=i,r)}});NRr=wr("ZodOptional",(e,t)=>{CBr.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>rRr(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});nfo=wr("ZodExactOptional",(e,t)=>{xuo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>rRr(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});ofo=wr("ZodNullable",(e,t)=>{Suo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>spo(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});sfo=wr("ZodDefault",(e,t)=>{wuo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>cpo(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});cfo=wr("ZodPrefault",(e,t)=>{Tuo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>upo(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});jRr=wr("ZodNonOptional",(e,t)=>{Ouo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>apo(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});pfo=wr("ZodSuccess",(e,t)=>{Puo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Jlo(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});ffo=wr("ZodCatch",(e,t)=>{Buo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>lpo(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});mfo=wr("ZodNaN",(e,t)=>{Ruo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Wlo(e,r,n,i)});zRr=wr("ZodPipe",(e,t)=>{Duo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>ppo(e,r,n,i),e.in=t.in,e.out=t.out});QRr=wr("ZodCodec",(e,t)=>{zRr.init(e,t),O6t.init(e,t)});hfo=wr("ZodReadonly",(e,t)=>{kuo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>fpo(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});Afo=wr("ZodTemplateLiteral",(e,t)=>{Fuo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Hlo(e,r,n,i)});yfo=wr("ZodLazy",(e,t)=>{zuo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>mpo(e,r,n,i),e.unwrap=()=>e._zod.def.getter()});Efo=wr("ZodPromise",(e,t)=>{juo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>dpo(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});Ifo=wr("ZodFunction",(e,t)=>{Nuo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Xlo(e,r,n,i)});J6t=wr("ZodCustom",(e,t)=>{Quo.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Ylo(e,r,n,i)});rfc=Olo,nfc=Plo;ofc=(...e)=>Blo({Codec:QRr,Boolean:Crt,String:Ert},...e)});function Pcd(e){Iv({customError:e})}function Bcd(){return Iv().customError}var Ocd,xfo,cfc=h(()=>{"use strict";IQ();IQ();Ocd={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"};xfo||(xfo={})});function Dcd(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 kcd(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 ufc(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return Ho.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 Ho.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=kcd(i,t),s=xD(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 Ho.null();if(i.length===0)return Ho.never();if(i.length===1)return Ho.literal(i[0]);if(i.every(s=>typeof s=="string"))return Ho.enum(i);let o=i.map(s=>Ho.literal(s));return o.length<2?o[0]:Ho.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return Ho.literal(e.const);let r=e.type;if(Array.isArray(r)){let i=r.map(o=>{let s={...e,type:o};return ufc(s,t)});return i.length===0?Ho.never():i.length===1?i[0]:Ho.union(i)}if(!r)return Ho.any();let n;switch(r){case"string":{let i=Ho.string();if(e.format){let o=e.format;o==="email"?i=i.check(Ho.email()):o==="uri"||o==="uri-reference"?i=i.check(Ho.url()):o==="uuid"||o==="guid"?i=i.check(Ho.uuid()):o==="date-time"?i=i.check(Ho.iso.datetime()):o==="date"?i=i.check(Ho.iso.date()):o==="time"?i=i.check(Ho.iso.time()):o==="duration"?i=i.check(Ho.iso.duration()):o==="ipv4"?i=i.check(Ho.ipv4()):o==="ipv6"?i=i.check(Ho.ipv6()):o==="mac"?i=i.check(Ho.mac()):o==="cidr"?i=i.check(Ho.cidrv4()):o==="cidr-v6"?i=i.check(Ho.cidrv6()):o==="base64"?i=i.check(Ho.base64()):o==="base64url"?i=i.check(Ho.base64url()):o==="e164"?i=i.check(Ho.e164()):o==="jwt"?i=i.check(Ho.jwt()):o==="emoji"?i=i.check(Ho.emoji()):o==="nanoid"?i=i.check(Ho.nanoid()):o==="cuid"?i=i.check(Ho.cuid()):o==="cuid2"?i=i.check(Ho.cuid2()):o==="ulid"?i=i.check(Ho.ulid()):o==="xid"?i=i.check(Ho.xid()):o==="ksuid"&&(i=i.check(Ho.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"?Ho.number().int():Ho.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=Ho.boolean();break}case"null":{n=Ho.null();break}case"object":{let i={},o=e.properties||{},s=new Set(e.required||[]);for(let[c,u]of Object.entries(o)){let l=xD(u,t);i[c]=s.has(c)?l:l.optional()}if(e.propertyNames){let c=xD(e.propertyNames,t),u=e.additionalProperties&&typeof e.additionalProperties=="object"?xD(e.additionalProperties,t):Ho.any();if(Object.keys(i).length===0){n=Ho.record(c,u);break}let l=Ho.object(i).passthrough(),p=Ho.looseRecord(c,u);n=Ho.intersection(l,p);break}if(e.patternProperties){let c=e.patternProperties,u=Object.keys(c),l=[];for(let d of u){let f=xD(c[d],t),m=Ho.string().regex(new RegExp(d));l.push(Ho.looseRecord(m,f))}let p=[];if(Object.keys(i).length>0&&p.push(Ho.object(i).passthrough()),p.push(...l),p.length===0)n=Ho.object({}).passthrough();else if(p.length===1)n=p[0];else{let d=Ho.intersection(p[0],p[1]);for(let f=2;f<p.length;f++)d=Ho.intersection(d,p[f]);n=d}break}let a=Ho.object(i);e.additionalProperties===!1?n=a.strict():typeof e.additionalProperties=="object"?n=a.catchall(xD(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=>xD(c,t)),a=o&&typeof o=="object"&&!Array.isArray(o)?xD(o,t):void 0;a?n=Ho.tuple(s).rest(a):n=Ho.tuple(s),typeof e.minItems=="number"&&(n=n.check(Ho.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(Ho.maxLength(e.maxItems)))}else if(Array.isArray(o)){let s=o.map(c=>xD(c,t)),a=e.additionalItems&&typeof e.additionalItems=="object"?xD(e.additionalItems,t):void 0;a?n=Ho.tuple(s).rest(a):n=Ho.tuple(s),typeof e.minItems=="number"&&(n=n.check(Ho.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(Ho.maxLength(e.maxItems)))}else if(o!==void 0){let s=xD(o,t),a=Ho.array(s);typeof e.minItems=="number"&&(a=a.min(e.minItems)),typeof e.maxItems=="number"&&(a=a.max(e.maxItems)),n=a}else n=Ho.array(Ho.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 xD(e,t){if(typeof e=="boolean")return e?Ho.any():Ho.never();let r=ufc(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=>xD(u,t)),c=Ho.union(a);r=n?Ho.intersection(r,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let a=e.oneOf.map(u=>xD(u,t)),c=Ho.xor(a);r=n?Ho.intersection(r,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=n?r:Ho.any();else{let a=n?r:xD(e.allOf[0],t),c=n?0:1;for(let u=c;u<e.allOf.length;u++)a=Ho.intersection(a,xD(e.allOf[u],t));r=a}e.nullable===!0&&t.version==="openapi-3.0"&&(r=Ho.nullable(r)),e.readOnly===!0&&(r=Ho.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))Rcd.has(a)||(i[a]=e[a]);return Object.keys(i).length>0&&t.registry.add(r,i),r}function lfc(e,t){if(typeof e=="boolean")return e?Ho.any():Ho.never();let r=Dcd(e,t?.defaultTarget),n=e.$defs||e.definitions||{},i={version:r,defs:n,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??AB};return xD(e,i)}var Ho,Rcd,pfc=h(()=>{"use strict";R6t();sRr();j6t();Q6t();Ho={...z6t,...oRr,iso:yrt},Rcd=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 Sfo={};$(Sfo,{bigint:()=>zcd,boolean:()=>jcd,date:()=>Qcd,number:()=>Ncd,string:()=>Fcd});function Fcd(e){return Huo(Ert,e)}function Ncd(e){return tlo(vrt,e)}function jcd(e){return clo(Crt,e)}function zcd(e){return llo(xrt,e)}function Qcd(e){return Ilo(G6t,e)}var ffc=h(()=>{"use strict";IQ();Q6t()});var w={};$(w,{$brand:()=>YPr,$input:()=>quo,$output:()=>Guo,NEVER:()=>Aao,TimePrecision:()=>Juo,ZodAny:()=>Lpo,ZodArray:()=>Gpo,ZodBase64:()=>wRr,ZodBase64URL:()=>TRr,ZodBigInt:()=>xrt,ZodBigIntFormat:()=>BRr,ZodBoolean:()=>Crt,ZodCIDRv4:()=>xRr,ZodCIDRv6:()=>SRr,ZodCUID:()=>ARr,ZodCUID2:()=>yRr,ZodCatch:()=>ffo,ZodCodec:()=>QRr,ZodCustom:()=>J6t,ZodCustomStringFormat:()=>Irt,ZodDate:()=>G6t,ZodDefault:()=>sfo,ZodDiscriminatedUnion:()=>Wpo,ZodE164:()=>ORr,ZodEmail:()=>mRr,ZodEmoji:()=>hRr,ZodEnum:()=>brt,ZodError:()=>wcd,ZodExactOptional:()=>nfo,ZodFile:()=>tfo,ZodFirstPartyTypeKind:()=>xfo,ZodFunction:()=>Ifo,ZodGUID:()=>M6t,ZodIPv4:()=>vRr,ZodIPv6:()=>CRr,ZodISODate:()=>cRr,ZodISODateTime:()=>aRr,ZodISODuration:()=>lRr,ZodISOTime:()=>uRr,ZodIntersection:()=>Hpo,ZodIssueCode:()=>Ocd,ZodJWT:()=>PRr,ZodKSUID:()=>IRr,ZodLazy:()=>yfo,ZodLiteral:()=>efo,ZodMAC:()=>kpo,ZodMap:()=>Zpo,ZodNaN:()=>mfo,ZodNanoID:()=>gRr,ZodNever:()=>Upo,ZodNonOptional:()=>jRr,ZodNull:()=>Qpo,ZodNullable:()=>ofo,ZodNumber:()=>vrt,ZodNumberFormat:()=>p6e,ZodObject:()=>W6t,ZodOptional:()=>NRr,ZodPipe:()=>zRr,ZodPrefault:()=>cfo,ZodPromise:()=>Efo,ZodReadonly:()=>hfo,ZodRealError:()=>vQ,ZodRecord:()=>K6t,ZodSet:()=>$po,ZodString:()=>Ert,ZodStringFormat:()=>_A,ZodSuccess:()=>pfo,ZodSymbol:()=>jpo,ZodTemplateLiteral:()=>Afo,ZodTransform:()=>rfo,ZodTuple:()=>Jpo,ZodType:()=>Dp,ZodULID:()=>bRr,ZodURL:()=>V6t,ZodUUID:()=>M$,ZodUndefined:()=>zpo,ZodUnion:()=>H6t,ZodUnknown:()=>_po,ZodVoid:()=>Vpo,ZodXID:()=>ERr,ZodXor:()=>qpo,_ZodString:()=>dRr,_default:()=>afo,_function:()=>$pc,any:()=>Rpc,array:()=>q6t,base64:()=>mpc,base64url:()=>hpc,bigint:()=>wpc,boolean:()=>Npo,catch:()=>dfo,check:()=>efc,cidrv4:()=>fpc,cidrv6:()=>dpc,clone:()=>_2,codec:()=>Ypc,coerce:()=>Sfo,config:()=>Iv,core:()=>Jfe,cuid:()=>ipc,cuid2:()=>opc,custom:()=>tfc,date:()=>kpc,decode:()=>Spo,decodeAsync:()=>Tpo,describe:()=>rfc,discriminatedUnion:()=>Mpc,e164:()=>gpc,email:()=>Klc,emoji:()=>rpc,encode:()=>xpo,encodeAsync:()=>wpo,endsWith:()=>urt,enum:()=>kRr,exactOptional:()=>ifo,file:()=>Wpc,flattenError:()=>I6t,float32:()=>vpc,float64:()=>Cpc,formatError:()=>v6t,fromJSONSchema:()=>lfc,function:()=>$pc,getErrorMap:()=>Bcd,globalRegistry:()=>AB,gt:()=>z$,gte:()=>U2,guid:()=>Jlc,hash:()=>Ipc,hex:()=>Epc,hostname:()=>bpc,httpUrl:()=>tpc,includes:()=>art,instanceof:()=>ifc,int:()=>fRr,int32:()=>xpc,int64:()=>Tpc,intersection:()=>Kpo,ipv4:()=>upc,ipv6:()=>ppc,iso:()=>yrt,json:()=>sfc,jwt:()=>Apc,keyof:()=>Fpc,ksuid:()=>cpc,lazy:()=>bfo,length:()=>u6e,literal:()=>qpc,locales:()=>B6t,looseObject:()=>zpc,looseRecord:()=>_pc,lowercase:()=>ort,lt:()=>j$,lte:()=>K3,mac:()=>lpc,map:()=>Upc,maxLength:()=>c6e,maxSize:()=>pve,meta:()=>nfc,mime:()=>lrt,minLength:()=>Kfe,minSize:()=>Q$,multipleOf:()=>lve,nan:()=>Jpc,nanoid:()=>npc,nativeEnum:()=>Gpc,negative:()=>YBr,never:()=>RRr,nonnegative:()=>ZBr,nonoptional:()=>lfo,nonpositive:()=>XBr,normalize:()=>prt,null:()=>Mpo,nullable:()=>_6t,nullish:()=>Hpc,number:()=>Fpo,object:()=>Npc,optional:()=>L6t,overwrite:()=>aK,parse:()=>Epo,parseAsync:()=>Ipo,partialRecord:()=>Lpc,pipe:()=>U6t,positive:()=>JBr,prefault:()=>ufo,preprocess:()=>afc,prettifyError:()=>Pao,promise:()=>Zpc,property:()=>$Br,readonly:()=>gfo,record:()=>Xpo,refine:()=>vfo,regex:()=>irt,regexes:()=>d5,registry:()=>OBr,safeDecode:()=>Ppo,safeDecodeAsync:()=>Rpo,safeEncode:()=>Opo,safeEncodeAsync:()=>Bpo,safeParse:()=>vpo,safeParseAsync:()=>Cpo,set:()=>Vpc,setErrorMap:()=>Pcd,size:()=>a6e,slugify:()=>hrt,startsWith:()=>crt,strictObject:()=>jpc,string:()=>pRr,stringFormat:()=>ypc,stringbool:()=>ofc,success:()=>Kpc,superRefine:()=>Cfo,symbol:()=>Ppc,templateLiteral:()=>Xpc,toJSONSchema:()=>nRr,toLowerCase:()=>drt,toUpperCase:()=>mrt,transform:()=>FRr,treeifyError:()=>Oao,trim:()=>frt,tuple:()=>Ypo,uint32:()=>Spc,uint64:()=>Opc,ulid:()=>spc,undefined:()=>Bpc,union:()=>DRr,unknown:()=>l6e,uppercase:()=>srt,url:()=>epc,util:()=>ki,uuid:()=>Ylc,uuidv4:()=>Xlc,uuidv6:()=>Zlc,uuidv7:()=>$lc,void:()=>Dpc,xid:()=>apc,xor:()=>Qpc});var wfo=h(()=>{"use strict";IQ();Q6t();sRr();bpo();Dpo();cfc();IQ();Luo();IQ();N6t();pfc();Vuo();j6t();j6t();ffc();Iv(xBr())});var bs=h(()=>{"use strict";wfo();wfo()});var dfc=h(()=>{"use strict"});var Ufo={};$(Ufo,{AIChatConfig:()=>Bfo,AIChatDatasource:()=>idc,AIChatLocation:()=>gfc,AIChatModel:()=>Afc,AIChatWebsiteDatasource:()=>ndc,AbsoluteProductPath:()=>vmc,AgentsConfig:()=>adc,AiExamplesConfig:()=>rdc,AnalyticsConfig:()=>tdc,AnnouncementConfig:()=>VRr,ApiReferenceConfiguration:()=>lmc,ApiReferenceEndpointConfiguration:()=>$dc,ApiReferenceLayout:()=>Pfc,ApiReferenceLayoutItem:()=>e3t,ApiReferenceOperationConfiguration:()=>emc,ApiReferencePackageConfiguration:()=>nmc,ApiReferencePackageConfigurationWithOptions:()=>rmc,ApiReferenceSectionConfiguration:()=>tmc,ApiSpecConfiguration:()=>umc,ApiSpecErrorResponseEnsure:()=>smc,ApiSpecErrorResponseHttpMethod:()=>omc,ApiSpecErrorResponses:()=>amc,ApiSpecImportSettings:()=>cmc,ApiSpecType:()=>imc,Audience:()=>X6t,AudienceId:()=>Tfo,Availability:()=>Xfe,BackgroundImageConfiguration:()=>qfc,BackgroundImageThemedConfig:()=>Gfc,BlogConfiguration:()=>Ydc,BodyThemeConfig:()=>jfc,BreadcrumbsConfig:()=>fdc,ChangelogConfiguration:()=>Jdc,ChangelogFolderRelativePath:()=>Y6t,ChangelogLayout:()=>Ofc,CheckConfig:()=>Mdc,CheckRuleSeverity:()=>Yfe,CheckRulesConfig:()=>Qdc,CodeBlockTheme:()=>Ofo,CodeBlocksThemeConfig:()=>Dfc,CollapsedStringValue:()=>Hfc,CollapsedValue:()=>Z6t,ColorConfig:()=>Zx,ColorThemedConfig:()=>_fc,ColorsConfiguration:()=>gdc,ContentAlignment:()=>wfc,CssConfig:()=>Wfc,CustomDomain:()=>Ufc,CustomPageAction:()=>Adc,DocsConfiguration:()=>Gcd,DocsInstance:()=>vdc,DocsSettingsConfig:()=>hdc,DocsTypographyConfig:()=>ldc,EditThisPageConfig:()=>Idc,EditThisPageLaunch:()=>yfc,EmbeddingConfig:()=>sdc,ExperimentalConfig:()=>Vdc,ExternalProduct:()=>bmc,ExternalSitemapConfigSchema:()=>_dc,ExternalSitemapSchema:()=>Udc,FeatureFlag:()=>Pfo,FeatureFlagConfiguration:()=>Kfc,FolderConfiguration:()=>Zdc,FontConfig:()=>MRr,FontConfigPath:()=>udc,FontConfigVariant:()=>cdc,FontDisplay:()=>vfc,FontStyle:()=>Ffo,FontWeight:()=>jfo,FooterLinksConfig:()=>Rdc,FooterNavThemeConfig:()=>Ffc,FullStoryAnalyticsConfig:()=>Yfc,GTMConfig:()=>$fc,GitLibraryInputSchema:()=>Gdc,GithubEditThisPageConfig:()=>Edc,GoogleAnalytics4Config:()=>edc,HeaderPosition:()=>Tfc,HttpSnippetLanguage:()=>Mfc,HttpSnippetsConfig:()=>Vfc,IntegrationsConfig:()=>Ldc,IntercomConfig:()=>Xfc,InternalProduct:()=>ymc,JsConfig:()=>Ndc,JsConfigOptions:()=>Rfo,JsFileConfig:()=>kdc,JsFileConfigSettings:()=>Ddc,JsRemoteConfig:()=>Fdc,JsScriptStrategy:()=>Nfo,Language:()=>_Rr,LanguageSwitcherThemeConfig:()=>Rfc,LayoutConfig:()=>ddc,LibraryConfiguration:()=>Kdc,LibraryInputConfiguration:()=>Wdc,LibraryLanguage:()=>Ifc,LibraryName:()=>Dfo,LibraryOutputConfiguration:()=>Hdc,LibraryReferenceConfiguration:()=>Xdc,LinkConfiguration:()=>Qfo,LogoConfiguration:()=>Cdc,MetadataConfig:()=>jdc,NavbarDropdownConfig:()=>Pdc,NavbarGithubConfig:()=>Odc,NavbarGithubConfigWithOptions:()=>Tdc,NavbarLink:()=>Bdc,NavbarLinkConfig:()=>f6e,NavigationConfig:()=>GRr,NavigationItem:()=>t3t,PageActionOption:()=>hfc,PageActionOptions:()=>ydc,PageActionsConfig:()=>bdc,PageActionsThemeConfig:()=>Qfc,PageConfiguration:()=>Trt,PageDescriptionSource:()=>odc,PathLibraryInputSchema:()=>qdc,PlaygroundButtonSettings:()=>wdc,PlaygroundSettings:()=>$6t,PostHogConfig:()=>Zfc,ProductConfig:()=>Emc,ProductConfigBase:()=>_fo,ProductFileConfig:()=>Vcd,ProductPath:()=>Ucd,ProductSwitcherThemeConfig:()=>Bfc,ProgrammingLanguage:()=>mfc,RedirectConfig:()=>Mfo,RedirectsConfiguration:()=>zdc,RedirectsFile:()=>Lcd,RelativeProductPath:()=>Imc,Role:()=>zfo,RoleId:()=>LRr,SearchSettingsConfig:()=>mdc,SearchbarPlacement:()=>Cfc,SectionConfiguration:()=>pmc,SegmentConfig:()=>Jfc,SidebarThemeConfig:()=>zfc,SiteSwitcherThemeConfig:()=>kfc,SnippetLanguageConfiguration:()=>cK,SnippetsConfiguration:()=>Sdc,SortByAvailabilityValue:()=>bfc,SwitcherPlacement:()=>Sfc,TabConfig:()=>qRr,TabId:()=>Srt,TabVariant:()=>dmc,TabbedNavigationConfig:()=>Amc,TabbedNavigationItem:()=>gmc,TabbedNavigationItemWithLayout:()=>mmc,TabbedNavigationItemWithVariants:()=>hmc,TabsPlacement:()=>xfc,TabsThemeConfig:()=>Nfc,Target:()=>wrt,ThemeConfig:()=>pdc,TitleSource:()=>kfo,TranslationConfig:()=>xmc,TranslationConfigObject:()=>Cmc,TwitterCardSetting:()=>Lfc,UntabbedNavigationConfig:()=>fmc,VersionAvailability:()=>Efc,VersionConfig:()=>Lfo,VersionFileConfig:()=>_cd,VersionedSnippetLanguageConfiguration:()=>xdc,WithFeatureFlags:()=>bB,WithPermissions:()=>yB,WithViewers:()=>URr,normalizeTranslationConfig:()=>Smc});function Smc(e){return typeof e=="string"?{lang:e}:e}var Srt,Y6t,Tfo,LRr,Dfo,mfc,_Rr,hfc,gfc,Afc,yfc,Xfe,bfc,Efc,kfo,Ifc,Ffo,vfc,Cfc,xfc,Sfc,wfc,Tfc,Ofc,Pfc,Bfc,Rfc,Ofo,Dfc,kfc,Ffc,Nfc,jfc,zfc,Qfc,Mfc,wrt,Lfc,Nfo,jfo,_fc,Zx,X6t,zfo,Ufc,Vfc,Gfc,qfc,Wfc,Hfc,Z6t,yB,Pfo,Kfc,bB,URr,Jfc,Yfc,Xfc,Zfc,$fc,edc,tdc,rdc,ndc,idc,odc,sdc,adc,Bfo,cdc,udc,MRr,ldc,pdc,fdc,ddc,mdc,hdc,gdc,Adc,ydc,bdc,Edc,Idc,vdc,Cdc,Qfo,xdc,cK,Sdc,wdc,$6t,VRr,f6e,Tdc,Odc,Pdc,Bdc,Rdc,Ddc,kdc,Fdc,Rfo,Ndc,jdc,Mfo,zdc,Lcd,Yfe,Qdc,Mdc,Ldc,_dc,Udc,Vdc,Gdc,qdc,Wdc,Hdc,Kdc,Trt,Jdc,Ydc,Xdc,Zdc,$dc,emc,e3t,tmc,rmc,nmc,imc,omc,smc,amc,cmc,umc,lmc,t3t,pmc,fmc,dmc,mmc,hmc,gmc,Amc,GRr,qRr,Lfo,_cd,_fo,ymc,bmc,Emc,Imc,vmc,Ucd,Vcd,Cmc,xmc,Gcd,wmc=h(()=>{"use strict";bs();Srt=w.string(),Y6t=w.string(),Tfo=w.string(),LRr=w.string(),Dfo=w.string(),mfc=w.enum(["typescript","javascript","python","java","go","ruby","csharp","php","swift","rust","nodets","nodejs","dotnet","curl","jvm","ts","js"]),_Rr=w.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')"),hfc=w.enum(["copy-page","view-as-markdown","ask-ai","chatgpt","claude","cursor","vscode"]),gfc=w.enum(["docs","slack","discord"]),Afc=w.enum(["claude-3.7","claude-4","command-a"]),yfc=w.enum(["github","dashboard"]),Xfe=w.enum(["stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"]),bfc=w.enum(["unset","stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"]),Efc=w.enum(["deprecated","ga","stable","beta"]),kfo=w.enum(["frontmatter","filename"]),Ifc=w.enum(["python","cpp"]),Ffo=w.enum(["normal","italic"]),vfc=w.enum(["auto","block","swap","fallback","optional"]),Cfc=w.enum(["header","header-tabs","sidebar"]),xfc=w.enum(["header","sidebar"]),Sfc=w.enum(["header","sidebar"]),wfc=w.enum(["center","left"]),Tfc=w.enum(["fixed","static"]),Ofc=w.enum(["timeline","classic"]),Pfc=w.enum(["indented","cards"]),Bfc=w.enum(["default","toggle","tabs"]),Rfc=w.enum(["default","minimal"]),Ofo=w.enum(["github-dark","github-dark-default","github-dark-dimmed","github-dark-high-contrast","github-light","github-light-default","github-light-high-contrast","material-theme-darker","min-dark","min-light"]),Dfc=w.object({light:Ofo.optional(),dark:Ofo.optional()}),kfc=w.object({enabled:w.boolean().optional(),order:w.array(w.string()).optional(),hide:w.array(w.string()).optional(),labels:w.record(w.string(),w.string()).optional(),"show-products":w.boolean().optional()}),Ffc=w.enum(["default","minimal"]),Nfc=w.enum(["default","bubble"]),jfc=w.enum(["default","canvas"]),zfc=w.enum(["default","minimal"]),Qfc=w.enum(["default","toolbar"]),Mfc=w.enum(["curl","csharp","go","java","javascript","php","python","ruby","swift","typescript"]),wrt=w.enum(["_blank","_self","_parent","_top"]),Lfc=w.enum(["summary","summary_large_image","app","player"]),Nfo=w.enum(["beforeInteractive","afterInteractive","lazyOnload"]),jfo=w.union([w.string(),w.number().int()]),_fc=w.object({dark:w.string().optional(),light:w.string().optional()}),Zx=w.union([w.string(),_fc]),X6t=w.union([Tfo,w.array(Tfo)]),zfo=w.union([LRr,w.array(LRr)]),Ufc=w.union([w.string(),w.array(w.string())]),Vfc=w.union([w.boolean(),w.array(Mfc)]),Gfc=w.object({dark:w.string().optional(),light:w.string().optional()}),qfc=w.union([w.string(),Gfc]),Wfc=w.union([w.string(),w.array(w.string())]),Hfc=w.enum(["open-by-default"]),Z6t=w.union([w.boolean(),Hfc]),yB=w.object({viewers:zfo.optional(),orphaned:w.boolean().optional()}),Pfo=w.object({flag:w.string(),"fallback-value":w.unknown().optional(),match:w.unknown().optional()}),Kfc=w.union([w.string(),Pfo,w.array(Pfo)]),bB=w.object({"feature-flag":Kfc.optional()}),URr=w.object({viewers:zfo.optional()}),Jfc=w.object({"write-key":w.string()}),Yfc=w.object({"org-id":w.string()}),Xfc=w.object({"app-id":w.string(),"api-base":w.string().optional()}),Zfc=w.object({"api-key":w.string(),endpoint:w.string().optional()}),$fc=w.object({"container-id":w.string()}),edc=w.object({"measurement-id":w.string()}),tdc=w.object({segment:Jfc.optional(),fullstory:Yfc.optional(),intercom:Xfc.optional(),posthog:Zfc.optional(),gtm:$fc.optional(),ga4:edc.optional()}),rdc=w.object({enabled:w.boolean().optional(),style:w.string().optional()}),ndc=w.object({url:w.string(),title:w.string().optional()}),idc=ndc,odc=w.enum(["description","subtitle"]),sdc=w.object({"allowed-origins":w.array(w.string())}),adc=w.object({"page-directive":w.string().optional(),"page-description-source":odc.optional(),"llms-txt":w.string().optional(),"llms-full-txt":w.string().optional()}),Bfo=w.object({model:Afc.optional(),"system-prompt":w.string().optional(),location:w.array(gfc).optional(),datasources:w.array(idc).optional(),"mask-pii":w.boolean().optional(),disclaimer:w.string().optional()}),cdc=w.object({path:w.string(),weight:jfo.optional(),style:Ffo.optional()}),udc=w.union([w.string(),cdc]),MRr=w.object({name:w.string().optional(),path:w.string().optional(),weight:jfo.optional(),style:Ffo.optional(),paths:w.array(udc).optional(),display:vfc.optional(),fallback:w.array(w.string()).optional(),"font-variation-settings":w.string().optional()}),ldc=w.object({headingsFont:MRr.optional(),bodyFont:MRr.optional(),codeFont:MRr.optional()}),pdc=w.object({sidebar:zfc.optional(),body:jfc.optional(),tabs:Nfc.optional(),"page-actions":Qfc.optional(),"footer-nav":Ffc.optional(),"language-switcher":Rfc.optional(),"product-switcher":Bfc.optional(),"site-switcher":kfc.optional(),"code-blocks":Dfc.optional()}),fdc=w.object({"current-page":w.boolean().optional()}),ddc=w.object({"page-width":w.string().optional(),"content-width":w.string().optional(),"sidebar-width":w.string().optional(),"header-height":w.string().optional(),"searchbar-placement":Cfc.optional(),"tabs-placement":xfc.optional(),"switcher-placement":Sfc.optional(),"content-alignment":wfc.optional(),"header-position":Tfc.optional(),"disable-header":w.boolean().optional(),"hide-nav-links":w.boolean().optional(),"hide-feedback":w.boolean().optional(),"mobile-toc":w.boolean().optional(),"changelog-layout":Ofc.optional(),"api-reference-layout":Pfc.optional(),"api-reference-expand-properties":w.boolean().optional(),"show-nav-availability-badges":w.boolean().optional(),"hide-webhook-method-badges":w.boolean().optional(),breadcrumbs:fdc.optional()}),mdc=w.object({"prioritize-current-product":w.boolean().optional(),"default-filter-by-current-product":w.boolean().optional()}),hdc=w.object({"search-text":w.string().optional(),"disable-search":w.boolean().optional(),"dark-mode-code":w.boolean().optional(),"default-search-filters":w.boolean().optional(),search:mdc.optional(),"http-snippets":Vfc.optional(),"hide-404-page":w.boolean().optional(),"use-javascript-as-typescript":w.boolean().optional(),"disable-explorer-proxy":w.boolean().optional(),"disable-analytics":w.boolean().optional(),"require-analytics-consent":w.boolean().optional(),language:_Rr.optional(),"folder-title-source":kfo.optional(),"substitute-env-vars":w.boolean().optional(),"websocket-oneof-display":w.enum(["flat","grouped"]).optional(),embedding:sdc.optional()}),gdc=w.object({"accent-primary":Zx.optional(),accentPrimary:Zx.optional(),background:Zx.optional(),border:Zx.optional(),"sidebar-background":Zx.optional(),"header-background":Zx.optional(),"card-background":Zx.optional(),"accent-1":Zx.optional(),"accent-2":Zx.optional(),"accent-3":Zx.optional(),"accent-4":Zx.optional(),"accent-5":Zx.optional(),"accent-6":Zx.optional(),"accent-7":Zx.optional(),"accent-8":Zx.optional(),"accent-9":Zx.optional(),"accent-10":Zx.optional(),"accent-11":Zx.optional(),"accent-12":Zx.optional()}),Adc=w.object({title:w.string(),subtitle:w.string().optional(),url:w.string(),icon:w.string().optional(),default:w.boolean().optional()}),ydc=w.object({"copy-page":w.boolean().optional(),"view-as-markdown":w.boolean().optional(),"ask-ai":w.boolean().optional(),chatgpt:w.boolean().optional(),claude:w.boolean().optional(),cursor:w.boolean().optional(),mcp:w.boolean().optional(),vscode:w.boolean().optional(),custom:w.array(Adc).optional()}),bdc=w.object({default:hfc.optional(),options:ydc.optional()}),Edc=w.object({host:w.string().optional(),owner:w.string(),repo:w.string(),branch:w.string().optional()}),Idc=w.object({github:Edc.optional(),launch:yfc.optional()}),vdc=w.object({url:w.string(),"custom-domain":Ufc.optional(),"edit-this-page":Idc.optional(),audiences:X6t.optional(),"multi-source":w.boolean().optional()}),Cdc=w.object({dark:w.string().optional(),light:w.string().optional(),height:w.number().optional(),href:w.string().optional(),"right-text":w.string().optional()}),Qfo=w.object({link:w.string(),href:w.string(),icon:w.string().optional(),target:wrt.optional()}),xdc=w.object({version:w.string(),package:w.string()}),cK=w.union([w.string(),xdc]),Sdc=w.object({python:cK.optional(),typescript:cK.optional(),go:cK.optional(),java:cK.optional(),ruby:cK.optional(),csharp:cK.optional(),php:cK.optional(),swift:cK.optional(),cli:cK.optional(),rust:cK.optional()}),wdc=w.object({href:w.string().optional()}),$6t=w.object({hidden:w.boolean().optional(),environments:w.array(w.string()).optional(),button:wdc.optional(),oauth:w.boolean().optional(),"limit-websocket-messages-per-connection":w.number().int().optional(),"send-optional-defaults":w.boolean().optional()}),VRr=w.object({message:w.string()}),f6e=URr.merge(w.object({href:w.string().optional(),target:wrt.optional(),url:w.string().optional(),text:w.string().optional(),icon:w.string().optional(),rightIcon:w.string().optional(),rounded:w.boolean().optional()})),Tdc=URr.merge(w.object({url:w.string(),target:wrt.optional()})),Odc=w.union([w.string(),Tdc]),Pdc=URr.merge(w.object({links:w.array(f6e),text:w.string().optional(),icon:w.string().optional(),rightIcon:w.string().optional(),rounded:w.boolean().optional()})),Bdc=w.union([f6e.merge(w.object({type:w.literal("filled")})),f6e.merge(w.object({type:w.literal("outlined")})),f6e.merge(w.object({type:w.literal("minimal")})),w.object({type:w.literal("github"),value:Odc}),Pdc.merge(w.object({type:w.literal("dropdown")})),f6e.merge(w.object({type:w.literal("primary")})),f6e.merge(w.object({type:w.literal("secondary")}))]),Rdc=w.object({github:w.string().optional(),twitter:w.string().optional(),x:w.string().optional(),linkedin:w.string().optional(),youtube:w.string().optional(),instagram:w.string().optional(),facebook:w.string().optional(),discord:w.string().optional(),slack:w.string().optional(),hackernews:w.string().optional(),medium:w.string().optional(),website:w.string().optional()}),Ddc=w.object({path:w.string(),strategy:Nfo.optional()}),kdc=w.union([w.string(),Ddc]),Fdc=w.object({url:w.string(),strategy:Nfo.optional(),"disable-sri":w.boolean().optional()}),Rfo=w.union([Fdc,kdc]),Ndc=w.union([Rfo,w.array(Rfo)]),jdc=w.object({"og:site_name":w.string().optional(),"og:title":w.string().optional(),"og:description":w.string().optional(),"og:url":w.string().optional(),"og:image":w.string().optional(),"og:image:width":w.number().optional(),"og:image:height":w.number().optional(),"og:locale":w.string().optional(),"og:logo":w.string().optional(),"twitter:title":w.string().optional(),"twitter:description":w.string().optional(),"twitter:handle":w.string().optional(),"twitter:image":w.string().optional(),"twitter:site":w.string().optional(),"twitter:url":w.string().optional(),"twitter:card":Lfc.optional(),"og:dynamic":w.boolean().optional(),"og:dynamic:background-image":w.string().optional(),"og:dynamic:text-color":w.string().optional(),"og:dynamic:background-color":w.string().optional(),"og:dynamic:logo-color":w.enum(["dark","light"]).optional(),"og:dynamic:show-logo":w.boolean().optional(),"og:dynamic:show-section":w.boolean().optional(),"og:dynamic:show-description":w.boolean().optional(),"og:dynamic:show-url":w.boolean().optional(),"og:dynamic:show-gradient":w.boolean().optional(),"canonical-host":w.string().optional()}),Mfo=w.object({source:w.string(),destination:w.string(),permanent:w.boolean().optional()}),zdc=w.union([w.array(Mfo),w.string(),w.array(w.string())]),Lcd=w.object({redirects:w.array(Mfo.strict())}).strict(),Yfe=w.enum(["warn","error"]),Qdc=w.object({"example-validation":Yfe.optional(),"broken-links":Yfe.optional(),"no-non-component-refs":Yfe.optional(),"valid-local-references":Yfe.optional(),"no-circular-redirects":Yfe.optional(),"valid-docs-endpoints":Yfe.optional(),"missing-redirects":Yfe.optional(),"valid-changelog-slug":Yfe.optional()}),Mdc=w.object({rules:Qdc.optional()}),Ldc=w.object({intercom:w.string().optional(),context7:w.string().optional()}),_dc=w.object({url:w.string(),locale:w.string().optional()}),Udc=w.union([w.string(),_dc]),Vdc=w.object({"mdx-components":w.array(w.string()).optional(),"disable-stream-toggle":w.boolean().optional(),"openapi-parser-v2":w.boolean().optional(),"openapi-parser-v3":w.boolean().optional(),"dynamic-snippets":w.boolean().optional(),"ai-examples":w.boolean().optional(),"ai-example-style-instructions":w.string().optional(),"exclude-apis":w.boolean().optional(),"basepath-aware":w.boolean().optional(),"robots-txt-on-instance-url":w.boolean().optional(),"external-sitemaps":w.array(Udc).optional()}),Gdc=w.object({git:w.string(),subpath:w.string().optional(),ref:w.string().optional()}),qdc=w.object({path:w.string()}),Wdc=w.union([Gdc,qdc]),Hdc=w.object({path:w.string()}),Kdc=w.object({input:Wdc,output:Hdc,lang:Ifc}),Trt=yB.merge(bB).merge(w.object({page:w.string(),path:w.string(),slug:w.string().optional(),icon:w.string().optional(),hidden:w.boolean().optional(),noindex:w.boolean().optional(),availability:Xfe.optional()})),Jdc=yB.merge(bB).merge(w.object({changelog:Y6t,title:w.string().optional(),slug:w.string().optional(),icon:w.string().optional(),hidden:w.boolean().optional()})),Ydc=yB.merge(bB).merge(w.object({blog:Y6t,title:w.string().optional(),slug:w.string().optional(),icon:w.string().optional(),hidden:w.boolean().optional()})),Xdc=yB.merge(bB).merge(w.object({library:Dfo,title:w.string().optional(),slug:w.string().optional()})),Zdc=yB.merge(bB).merge(w.object({folder:w.string(),title:w.string().optional(),"title-source":kfo.optional(),slug:w.string().optional(),icon:w.string().optional(),hidden:w.boolean().optional(),"skip-slug":w.boolean().optional(),collapsed:Z6t.optional(),collapsible:w.boolean().optional(),"collapsed-by-default":w.boolean().optional(),availability:Xfe.optional()})),$dc=yB.merge(bB).merge(w.object({endpoint:w.string(),title:w.string().optional(),slug:w.string().optional(),icon:w.string().optional(),hidden:w.boolean().optional(),availability:Xfe.optional(),playground:$6t.optional()})),emc=yB.merge(bB).merge(w.object({operation:w.string(),title:w.string().optional(),slug:w.string().optional(),hidden:w.boolean().optional(),availability:Xfe.optional()})),e3t=w.lazy(()=>w.union([w.string(),w.record(w.string(),nmc),tmc,$dc,emc,Trt,Qfo])),tmc=yB.merge(bB).merge(w.object({section:w.string(),"referenced-packages":w.array(w.string()).optional(),summary:w.string().optional(),contents:w.array(e3t).optional(),slug:w.string().optional(),icon:w.string().optional(),hidden:w.boolean().optional(),"skip-slug":w.boolean().optional(),collapsed:Z6t.optional(),collapsible:w.boolean().optional(),"collapsed-by-default":w.boolean().optional(),availability:Xfe.optional(),playground:$6t.optional()})),rmc=yB.merge(bB).merge(w.object({title:w.string().optional(),summary:w.string().optional(),contents:w.array(e3t).optional(),availability:Xfe.optional(),slug:w.string().optional(),icon:w.string().optional(),hidden:w.boolean().optional(),"skip-slug":w.boolean().optional(),playground:$6t.optional()})),nmc=w.lazy(()=>w.union([w.array(e3t),rmc])),imc=w.enum(["openapi","asyncapi","graphql"]),omc=w.enum(["get","post","put","patch","delete","head","options","trace"]),smc=w.object({"status-code":w.number().int().min(400).max(599),methods:w.array(omc).optional()}),amc=w.object({schema:w.union([w.string(),w.record(w.string(),w.unknown())]),name:w.string().optional(),"apply-to":w.enum(["all","untyped"]).optional(),ensure:w.array(smc).optional()}),cmc=w.object({"type-dates-as-strings":w.boolean().optional(),"use-bytes-for-binary-response":w.boolean().optional(),"respect-parameter-content":w.boolean().optional(),"respect-operation-id-word-boundaries":w.boolean().optional(),"infer-forward-compatible":w.boolean().optional(),"preserve-one-of-in-all-of":w.boolean().optional(),"any-of-sibling-properties-as-object":w.boolean().optional(),"error-responses":amc.optional()}),umc=w.object({type:imc,path:w.string(),namespace:w.string().optional(),overlays:w.string().optional(),overrides:w.array(w.string()).optional(),settings:cmc.optional()}),lmc=yB.merge(bB).merge(w.object({api:w.string(),"api-name":w.string().optional(),specs:w.array(umc).optional(),openrpc:w.string().optional(),audiences:X6t.optional(),"display-errors":w.boolean().optional(),"tag-description-pages":w.boolean().optional(),snippets:Sdc.optional(),postman:w.string().optional(),summary:w.string().optional(),layout:w.array(e3t).optional(),collapsed:Z6t.optional(),icon:w.string().optional(),slug:w.string().optional(),hidden:w.boolean().optional(),availability:Xfe.optional(),"skip-slug":w.boolean().optional(),alphabetized:w.boolean().optional(),"sort-by-availability":w.array(bfc).optional(),flattened:w.boolean().optional(),paginated:w.boolean().optional(),playground:$6t.optional()})),t3t=w.lazy(()=>w.union([Trt,pmc,lmc,Xdc,Qfo,Jdc,Ydc,Zdc])),pmc=yB.merge(bB).merge(w.object({section:w.string(),path:w.string().optional(),contents:w.array(t3t),collapsed:Z6t.optional(),collapsible:w.boolean().optional(),"collapsed-by-default":w.boolean().optional(),slug:w.string().optional(),icon:w.string().optional(),hidden:w.boolean().optional(),"skip-slug":w.boolean().optional(),availability:Xfe.optional()})),fmc=w.array(t3t),dmc=yB.merge(bB).merge(w.object({title:w.string(),subtitle:w.string().optional(),icon:w.string().optional(),layout:w.array(t3t),slug:w.string().optional(),"skip-slug":w.boolean().optional(),hidden:w.boolean().optional(),default:w.boolean().optional()})),mmc=w.object({tab:Srt,layout:w.array(t3t).optional()}),hmc=w.object({tab:Srt,variants:w.array(dmc)}),gmc=w.union([mmc,hmc]),Amc=w.array(gmc),GRr=w.union([Amc,fmc]),qRr=yB.merge(bB).merge(w.object({"display-name":w.string(),icon:w.string().optional(),slug:w.string().optional(),"skip-slug":w.boolean().optional(),hidden:w.boolean().optional(),href:w.string().optional(),target:wrt.optional(),changelog:Y6t.optional(),blog:Y6t.optional()})),Lfo=yB.merge(bB).merge(w.object({"display-name":w.string(),path:w.string().optional(),ref:w.string().optional(),slug:w.string().optional(),availability:Efc.optional(),audiences:X6t.optional(),hidden:w.boolean().optional(),announcement:VRr.optional()})),_cd=w.object({tabs:w.record(Srt,qRr).optional(),"landing-page":Trt.optional(),navigation:GRr}),_fo=yB.merge(bB).merge(w.object({"display-name":w.string(),subtitle:w.string().optional(),icon:w.string().optional(),image:w.string().optional(),versions:w.array(Lfo).optional(),audiences:X6t.optional()})),ymc=_fo.merge(w.object({path:w.string(),slug:w.string().optional(),announcement:VRr.optional()})),bmc=_fo.merge(w.object({href:w.string(),target:wrt.optional()})),Emc=w.union([ymc,bmc]),Imc=yB.merge(bB).merge(w.object({"display-name":w.string(),path:w.string(),slug:w.string().optional()})),vmc=w.object({href:w.string()}),Ucd=w.union([Imc,vmc]),Vcd=w.object({tabs:w.record(Srt,qRr).optional(),"landing-page":Trt.optional(),navigation:GRr}),Cmc=w.object({lang:_Rr,default:w.boolean().optional()}),xmc=w.union([_Rr,Cmc]);Gcd=w.object({instances:w.array(vdc),title:w.string().optional(),libraries:w.record(Dfo,Kdc).optional(),analytics:tdc.optional(),announcement:VRr.optional(),roles:w.array(LRr).optional(),tabs:w.record(Srt,qRr).optional(),versions:w.array(Lfo).optional(),products:w.array(Emc).optional(),"landing-page":Trt.optional(),navigation:GRr.optional(),"navbar-links":w.array(Bdc).optional(),"footer-links":Rdc.optional(),"page-actions":bdc.optional(),experimental:Vdc.optional(),"default-language":mfc.optional(),languages:w.array(w.string()).optional(),translations:w.array(xmc).optional().superRefine((e,t)=>{if(e==null)return;let n=e.map(Smc).filter(i=>i.default===!0).length;n>1&&t.addIssue({code:w.ZodIssueCode.custom,message:`Only one translation entry can be marked as default, but ${n} were found`})}),"ai-chat":Bfo.optional(),"ai-search":Bfo.optional(),"ai-examples":rdc.optional(),agents:adc.optional(),metadata:jdc.optional(),redirects:zdc.optional(),check:Mdc.optional(),logo:Cdc.optional(),favicon:w.string().optional(),"background-image":qfc.optional(),colors:gdc.optional(),typography:ldc.optional(),layout:ddc.optional(),settings:hdc.optional(),theme:pdc.optional(),"global-theme":w.string().optional(),integrations:Ldc.optional(),css:Wfc.optional(),js:Ndc.optional(),header:w.string().optional(),footer:w.string().optional()})});function Hcd(e){if("changelog"in e)return e.changelog;if("blog"in e)return e.blog}function Kcd(e){return e.changelog??e.blog}var qcd,Wcd,Tmc=h(()=>{"use strict";qcd="Changelog",Wcd="Blog"});var Omc=h(()=>{"use strict"});var Pmc=h(()=>{"use strict"});var Bmc=h(()=>{"use strict"});var Rmc=h(()=>{"use strict"});var Dmc=h(()=>{"use strict"});var Vfo,kmc=h(()=>{"use strict";Vfo={Docs:"docs",Slack:"slack",Discord:"discord"}});var Gfo,Fmc=h(()=>{"use strict";Gfo={Claude37:"claude-3.7",Claude4:"claude-4",CommandA:"command-a"}});var Nmc=h(()=>{"use strict"});var jmc=h(()=>{"use strict"});var zmc=h(()=>{"use strict"});var Qmc=h(()=>{"use strict"});var Mmc=h(()=>{"use strict"});var Lmc=h(()=>{"use strict"});var qfo,_mc=h(()=>{"use strict";qfo={Indented:"indented",Cards:"cards"}});var Umc=h(()=>{"use strict"});var Vmc=h(()=>{"use strict"});var Gmc=h(()=>{"use strict"});var qmc=h(()=>{"use strict"});var Wmc=h(()=>{"use strict"});var Hmc=h(()=>{"use strict"});var Wfo,Kmc=h(()=>{"use strict";Wfo={All:"all",Untyped:"untyped"}});var Jmc=h(()=>{"use strict"});var Hfo,Ymc=h(()=>{"use strict";Hfo={Get:"get",Post:"post",Put:"put",Patch:"patch",Delete:"delete",Head:"head",Options:"options",Trace:"trace"}});var Xmc=h(()=>{"use strict"});var Zmc=h(()=>{"use strict"});var $mc=h(()=>{"use strict"});var Kfo,ehc=h(()=>{"use strict";Kfo={Openapi:"openapi",Asyncapi:"asyncapi",Graphql:"graphql"}});var thc=h(()=>{"use strict"});var rhc=h(()=>{"use strict"});var Jfo,nhc=h(()=>{"use strict";Jfo={Stable:"stable",GenerallyAvailable:"generally-available",InDevelopment:"in-development",PreRelease:"pre-release",Deprecated:"deprecated",Beta:"beta",Alpha:"alpha",Preview:"preview",Legacy:"legacy"}});var ihc=h(()=>{"use strict"});var ohc=h(()=>{"use strict"});var shc=h(()=>{"use strict"});var Yfo,ahc=h(()=>{"use strict";Yfo={Default:"default",Canvas:"canvas"}});var chc=h(()=>{"use strict"});var uhc=h(()=>{"use strict"});var lhc=h(()=>{"use strict"});var Xfo,phc=h(()=>{"use strict";Xfo={Timeline:"timeline",Classic:"classic"}});var fhc=h(()=>{"use strict"});var Zfo,dhc=h(()=>{"use strict";Zfo={Warn:"warn",Error:"error"}});var mhc=h(()=>{"use strict"});var hhc=h(()=>{"use strict"});var $fo,ghc=h(()=>{"use strict";$fo={GithubDark:"github-dark",GithubDarkDefault:"github-dark-default",GithubDarkDimmed:"github-dark-dimmed",GithubDarkHighContrast:"github-dark-high-contrast",GithubLight:"github-light",GithubLightDefault:"github-light-default",GithubLightHighContrast:"github-light-high-contrast",MaterialThemeDarker:"material-theme-darker",MinDark:"min-dark",MinLight:"min-light"}});var edo,Ahc=h(()=>{"use strict";edo={OpenByDefault:"open-by-default"}});var yhc=h(()=>{"use strict"});var bhc=h(()=>{"use strict"});var Ehc=h(()=>{"use strict"});var Ihc=h(()=>{"use strict"});var tdo,vhc=h(()=>{"use strict";tdo={Center:"center",Left:"left"}});var Chc=h(()=>{"use strict"});var xhc=h(()=>{"use strict"});var Shc=h(()=>{"use strict"});var whc=h(()=>{"use strict"});var Thc=h(()=>{"use strict"});var Ohc=h(()=>{"use strict"});var Phc=h(()=>{"use strict"});var Bhc=h(()=>{"use strict"});var rdo,Rhc=h(()=>{"use strict";rdo={Github:"github",Dashboard:"dashboard"}});var Dhc=h(()=>{"use strict"});var khc=h(()=>{"use strict"});var Fhc=h(()=>{"use strict"});var Nhc=h(()=>{"use strict"});var jhc=h(()=>{"use strict"});var zhc=h(()=>{"use strict"});var Qhc=h(()=>{"use strict"});var Mhc=h(()=>{"use strict"});var Lhc=h(()=>{"use strict"});var _hc=h(()=>{"use strict"});var Uhc=h(()=>{"use strict"});var ndo,Vhc=h(()=>{"use strict";ndo={Auto:"auto",Block:"block",Swap:"swap",Fallback:"fallback",Optional:"optional"}});var ido,Ghc=h(()=>{"use strict";ido={Normal:"normal",Italic:"italic"}});var qhc=h(()=>{"use strict"});var Whc=h(()=>{"use strict"});var odo,Hhc=h(()=>{"use strict";odo={Default:"default",Minimal:"minimal"}});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 sdo,$hc=h(()=>{"use strict";sdo={Fixed:"fixed",Static:"static"}});var ado,egc=h(()=>{"use strict";ado={Curl:"curl",Csharp:"csharp",Go:"go",Java:"java",Javascript:"javascript",Php:"php",Python:"python",Ruby:"ruby",Swift:"swift",Typescript:"typescript"}});var tgc=h(()=>{"use strict"});var rgc=h(()=>{"use strict"});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=h(()=>{"use strict"});var ugc=h(()=>{"use strict"});var cdo,lgc=h(()=>{"use strict";cdo={BeforeInteractive:"beforeInteractive",AfterInteractive:"afterInteractive",LazyOnload:"lazyOnload"}});var pgc=h(()=>{"use strict"});var udo,fgc=h(()=>{"use strict";udo={Default:"default",Minimal:"minimal"}});var dgc=h(()=>{"use strict"});var mgc=h(()=>{"use strict"});var hgc=h(()=>{"use strict"});var ggc=h(()=>{"use strict"});var ldo,Agc=h(()=>{"use strict";ldo={Python:"python",Cpp:"cpp"}});var ygc=h(()=>{"use strict"});var bgc=h(()=>{"use strict"});var Egc=h(()=>{"use strict"});var pdo,Igc=h(()=>{"use strict";pdo={Compact:"compact",Hyphenated:"hyphenated"}});var vgc=h(()=>{"use strict"});var Cgc=h(()=>{"use strict"});var xgc=h(()=>{"use strict"});var Sgc=h(()=>{"use strict"});var wgc=h(()=>{"use strict"});var Tgc=h(()=>{"use strict"});var Ogc=h(()=>{"use strict"});var Pgc=h(()=>{"use strict"});var Bgc=h(()=>{"use strict"});var Rgc=h(()=>{"use strict"});var fdo,Dgc=h(()=>{"use strict";fdo={Dark:"dark",Light:"light"}});var ddo,kgc=h(()=>{"use strict";ddo={CopyPage:"copy-page",ViewAsMarkdown:"view-as-markdown",AskAi:"ask-ai",Chatgpt:"chatgpt",Claude:"claude",Cursor:"cursor",ClaudeCode:"claude-code",Vscode:"vscode"}});var Fgc=h(()=>{"use strict"});var Ngc=h(()=>{"use strict"});var mdo,jgc=h(()=>{"use strict";mdo={Default:"default",Toolbar:"toolbar"}});var zgc=h(()=>{"use strict"});var hdo,Qgc=h(()=>{"use strict";hdo={Description:"description",Subtitle:"subtitle"}});var Mgc=h(()=>{"use strict"});var Lgc=h(()=>{"use strict"});var _gc=h(()=>{"use strict"});var Ugc=h(()=>{"use strict"});var Vgc=h(()=>{"use strict"});var Ggc=h(()=>{"use strict"});var qgc=h(()=>{"use strict"});var Wgc=h(()=>{"use strict"});var gdo,Hgc=h(()=>{"use strict";gdo={Default:"default",Toggle:"toggle",Tabs:"tabs"}});var Ado,Kgc=h(()=>{"use strict";Ado={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 Jgc=h(()=>{"use strict"});var Ygc=h(()=>{"use strict"});var Xgc=h(()=>{"use strict"});var Zgc=h(()=>{"use strict"});var $gc=h(()=>{"use strict"});var ydo,eAc=h(()=>{"use strict";ydo={Header:"header",HeaderTabs:"header-tabs",Sidebar:"sidebar"}});var tAc=h(()=>{"use strict"});var rAc=h(()=>{"use strict"});var nAc=h(()=>{"use strict"});var bdo,iAc=h(()=>{"use strict";bdo={Default:"default",Minimal:"minimal"}});var oAc=h(()=>{"use strict"});var sAc=h(()=>{"use strict"});var aAc=h(()=>{"use strict"});var cAc=h(()=>{"use strict"});var uAc=h(()=>{"use strict"});var lAc=h(()=>{"use strict"});var Edo,pAc=h(()=>{"use strict";Edo={Unset:"unset",Stable:"stable",GenerallyAvailable:"generally-available",InDevelopment:"in-development",PreRelease:"pre-release",Deprecated:"deprecated",Beta:"beta",Alpha:"alpha",Preview:"preview",Legacy:"legacy"}});var Ido,fAc=h(()=>{"use strict";Ido={Header:"header",Sidebar:"sidebar"}});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 vdo,bAc=h(()=>{"use strict";vdo={Left:"left",Center:"center"}});var Cdo,EAc=h(()=>{"use strict";Cdo={Header:"header",Sidebar:"sidebar"}});var IAc=h(()=>{"use strict"});var vAc=h(()=>{"use strict"});var xdo,CAc=h(()=>{"use strict";xdo={Default:"default",Bubble:"bubble"}});var xAc=h(()=>{"use strict"});var Sdo,SAc=h(()=>{"use strict";Sdo={Blank:"_blank",Self:"_self",Parent:"_parent",Top:"_top"}});var wAc=h(()=>{"use strict"});var wdo,TAc=h(()=>{"use strict";wdo={Frontmatter:"frontmatter",Filename:"filename"}});var OAc=h(()=>{"use strict"});var PAc=h(()=>{"use strict"});var Tdo,BAc=h(()=>{"use strict";Tdo={Summary:"summary",SummaryLargeImage:"summary_large_image",App:"app",Player:"player"}});var RAc=h(()=>{"use strict"});var Odo,DAc=h(()=>{"use strict";Odo={Deprecated:"deprecated",Legacy:"legacy",Ga:"ga",Stable:"stable",Beta:"beta",Alpha:"alpha",Preview:"preview"}});var kAc=h(()=>{"use strict"});var FAc=h(()=>{"use strict"});var NAc=h(()=>{"use strict"});var Pdo,jAc=h(()=>{"use strict";Pdo={Flat:"flat",Grouped:"grouped"}});var zAc=h(()=>{"use strict"});var QAc=h(()=>{"use strict"});var MAc=h(()=>{"use strict"});var Bdo=h(()=>{"use strict";Pmc();Bmc();Rmc();Dmc();kmc();Fmc();Nmc();jmc();zmc();Qmc();Mmc();Lmc();_mc();Umc();Vmc();Gmc();qmc();Wmc();Hmc();Kmc();Jmc();Ymc();Xmc();Zmc();$mc();ehc();thc();rhc();nhc();ihc();ohc();shc();ahc();chc();uhc();lhc();phc();fhc();dhc();mhc();hhc();ghc();Ahc();yhc();bhc();Ehc();Ihc();vhc();Chc();xhc();Shc();whc();Thc();Ohc();Phc();Bhc();Rhc();Dhc();khc();Fhc();Nhc();jhc();zhc();Qhc();Mhc();Lhc();_hc();Uhc();Vhc();Ghc();qhc();Whc();Hhc();Khc();Jhc();Yhc();Xhc();Zhc();$hc();egc();tgc();rgc();ngc();igc();ogc();sgc();agc();cgc();ugc();lgc();pgc();fgc();dgc();mgc();hgc();ggc();Agc();ygc();bgc();Egc();Igc();vgc();Cgc();xgc();Sgc();wgc();Tgc();Ogc();Pgc();Bgc();Rgc();Dgc();kgc();Fgc();Ngc();jgc();zgc();Qgc();Mgc();Lgc();_gc();Ugc();Vgc();Ggc();qgc();Wgc();Hgc();Kgc();Jgc();Ygc();Xgc();Zgc();$gc();eAc();tAc();rAc();nAc();iAc();oAc();sAc();aAc();cAc();uAc();lAc();pAc();fAc();dAc();mAc();hAc();gAc();AAc();yAc();bAc();EAc();IAc();vAc();CAc();xAc();SAc();wAc();TAc();OAc();PAc();BAc();RAc();DAc();kAc();FAc();NAc();jAc();zAc();QAc();MAc()});var WRr={};$(WRr,{AiChatLocation:()=>Vfo,AiChatModel:()=>Gfo,ApiReferenceLayout:()=>qfo,ApiSpecErrorResponseApplyTo:()=>Wfo,ApiSpecErrorResponseHttpMethod:()=>Hfo,ApiSpecType:()=>Kfo,Availability:()=>Jfo,BodyThemeConfig:()=>Yfo,ChangelogLayout:()=>Xfo,CheckRuleSeverity:()=>Zfo,CodeBlockTheme:()=>$fo,CollapsedStringValue:()=>edo,ContentAlignment:()=>tdo,EditThisPageLaunch:()=>rdo,FontDisplay:()=>ndo,FontStyle:()=>ido,FooterNavThemeConfig:()=>odo,HeaderPosition:()=>sdo,HttpSnippetLanguage:()=>ado,JsScriptStrategy:()=>cdo,LanguageSwitcherThemeConfig:()=>udo,LibraryLanguage:()=>ldo,LibrarySlugStyle:()=>pdo,OgDynamicLogoColor:()=>fdo,PageActionOption:()=>ddo,PageActionsThemeConfig:()=>mdo,PageDescriptionSource:()=>hdo,ProductSwitcherThemeConfig:()=>gdo,ProgrammingLanguage:()=>Ado,SearchbarPlacement:()=>ydo,SidebarThemeConfig:()=>bdo,SortByAvailabilityValue:()=>Edo,SwitcherPlacement:()=>Ido,TabsAlignment:()=>vdo,TabsPlacement:()=>Cdo,TabsThemeStyle:()=>xdo,Target:()=>Sdo,TitleSource:()=>wdo,TwitterCardSetting:()=>Tdo,VersionAvailability:()=>Odo,WebSocketOneofDisplay:()=>Pdo});var LAc=h(()=>{"use strict";Bdo()});var _Ac=h(()=>{"use strict";LAc();Bdo()});var Rdo={};$(Rdo,{AiChatLocation:()=>Vfo,AiChatModel:()=>Gfo,ApiReferenceLayout:()=>qfo,ApiSpecErrorResponseApplyTo:()=>Wfo,ApiSpecErrorResponseHttpMethod:()=>Hfo,ApiSpecType:()=>Kfo,Availability:()=>Jfo,BodyThemeConfig:()=>Yfo,ChangelogLayout:()=>Xfo,CheckRuleSeverity:()=>Zfo,CodeBlockTheme:()=>$fo,CollapsedStringValue:()=>edo,ContentAlignment:()=>tdo,EditThisPageLaunch:()=>rdo,FontDisplay:()=>ndo,FontStyle:()=>ido,FooterNavThemeConfig:()=>odo,HeaderPosition:()=>sdo,HttpSnippetLanguage:()=>ado,JsScriptStrategy:()=>cdo,LanguageSwitcherThemeConfig:()=>udo,LibraryLanguage:()=>ldo,LibrarySlugStyle:()=>pdo,OgDynamicLogoColor:()=>fdo,PageActionOption:()=>ddo,PageActionsThemeConfig:()=>mdo,PageDescriptionSource:()=>hdo,ProductSwitcherThemeConfig:()=>gdo,ProgrammingLanguage:()=>Ado,SearchbarPlacement:()=>ydo,SidebarThemeConfig:()=>bdo,SortByAvailabilityValue:()=>Edo,SwitcherPlacement:()=>Ido,TabsAlignment:()=>vdo,TabsPlacement:()=>Cdo,TabsThemeStyle:()=>xdo,Target:()=>Sdo,TitleSource:()=>wdo,TwitterCardSetting:()=>Tdo,VersionAvailability:()=>Odo,WebSocketOneofDisplay:()=>Pdo,docs:()=>WRr});var Ddo=h(()=>{"use strict";_Ac()});var UAc,VAc=h(()=>{"use strict";UAc=(e,t,r)=>JSON.stringify(e,t,r)});function Jcd({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: ${UAc(r,void 0,2)}`),n.join(`
140
140
  `)}var r3t,GAc=h(()=>{"use strict";VAc();r3t=class extends Error{statusCode;body;rawResponse;cause;constructor({message:t,statusCode:r,body:n,rawResponse:i,cause:o}){super(Jcd({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 n3t,qAc=h(()=>{"use strict";n3t=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 WAc=h(()=>{"use strict";GAc();qAc()});var uK,HAc,i3t,kdo,K60,Fdo=h(()=>{"use strict";uK={Debug:"debug",Info:"info",Warn:"warn",Error:"error"},HAc={[uK.Debug]:1,[uK.Info]:2,[uK.Warn]:3,[uK.Error]:4},i3t=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)}},kdo=class{level;logger;silent;constructor(t){this.level=HAc[t.level],this.logger=t.logger,this.silent=t.silent}shouldLog(t){return!this.silent&&this.level<=HAc[t]}isDebug(){return this.shouldLog(uK.Debug)}debug(t,...r){this.isDebug()&&this.logger.debug(t,...r)}isInfo(){return this.shouldLog(uK.Info)}info(t,...r){this.isInfo()&&this.logger.info(t,...r)}isWarn(){return this.shouldLog(uK.Warn)}warn(t,...r){this.isWarn()&&this.logger.warn(t,...r)}isError(){return this.shouldLog(uK.Error)}error(t,...r){this.isError()&&this.logger.error(t,...r)}},K60=new kdo({level:uK.Info,logger:new i3t,silent:!0})});var Ndo,KAc=h(()=>{"use strict";Fdo();(function(e){e.LogLevel=uK,e.ConsoleLogger=i3t})(Ndo||(Ndo={}))});var JAc=h(()=>{"use strict";KAc()});var YAc=h(()=>{"use strict";JAc()});var XAc=h(()=>{"use strict"});var ZAc=h(()=>{"use strict";Fdo()});var $Ac=h(()=>{"use strict"});var wu,Bw=h(()=>{"use strict";wu={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 Bm(e,t){return`Expected ${t}. Received ${Zcd(e)}.`}function Zcd(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 G2=h(()=>{"use strict"});function Rw(e){return{...e,json:eyc(e.json),parse:eyc(e.parse)}}function eyc(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 L$=h(()=>{"use strict"});function HRr(e){return e.path.length===0?e.message:`${e.path.join(" -> ")}: ${e.message}`}var jdo=h(()=>{"use strict"});var Ort,zdo=h(()=>{"use strict";jdo();Ort=class extends Error{errors;constructor(t){super(t.map(HRr).join("; ")),this.errors=t,Object.setPrototypeOf(this,new.target.prototype),this.name=this.constructor.name}}});var Prt,Qdo=h(()=>{"use strict";jdo();Prt=class extends Error{errors;constructor(t){super(t.map(HRr).join("; ")),this.errors=t,Object.setPrototypeOf(this,new.target.prototype),this.name=this.constructor.name}}});function Rm(e){return{nullable:()=>$cd(e),optional:()=>Mdo(e),optionalNullable:()=>eud(e),transform:t=>Ldo(e,t),parseOrThrow:(t,r)=>{let n=e.parse(t,r);if(n.ok)return n.value;throw new Prt(n.errors)},jsonOrThrow:(t,r)=>{let n=e.json(t,r);if(n.ok)return n.value;throw new Ort(n.errors)}}}function $cd(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:()=>wu.NULLABLE};return{...t,...Rm(t)}}function Mdo(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:()=>wu.OPTIONAL};return{...t,...Rm(t)}}function eud(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:()=>wu.OPTIONAL_NULLABLE};return{...t,...Rm(t)}}function Ldo(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,...Rm(r)}}var tyc=h(()=>{"use strict";Bw();zdo();Qdo()});var CQ=h(()=>{"use strict";tyc();zdo();Qdo()});function ryc(){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:Bm(t,"bigint | number")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="bigint"?{ok:!1,errors:[{path:r,message:Bm(t,"bigint")}]}:{ok:!0,value:t},getType:()=>wu.BIGINT};return{...Rw(e),...Rm(e)}}var nyc=h(()=>{"use strict";Bw();G2();L$();CQ()});var iyc=h(()=>{"use strict";nyc()});function oyc(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="string"?{ok:!1,errors:[{path:r,message:Bm(t,"string")}]}:tud.test(t)?{ok:!0,value:new Date(t)}:{ok:!1,errors:[{path:r,message:Bm(t,"ISO 8601 date string")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>t instanceof Date?{ok:!0,value:t.toISOString()}:{ok:!1,errors:[{path:r,message:Bm(t,"Date object")}]},getType:()=>wu.DATE};return{...Rw(e),...Rm(e)}}var tud,syc=h(()=>{"use strict";Bw();G2();L$();CQ();tud=/^([+-]?\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 ayc=h(()=>{"use strict";syc()});function pT(e,t){return()=>{let r={parse:t,json:t,getType:()=>e};return{...Rw(r),...Rm(r)}}}var _$=h(()=>{"use strict";CQ();L$()});function KRr(e){let t=new Set(e);return pT(wu.ENUM,(n,{allowUnrecognizedEnumValues:i,breadcrumbsPrefix:o=[]}={})=>typeof n!="string"?{ok:!1,errors:[{path:o,message:Bm(n,"string")}]}:!t.has(n)&&!i?{ok:!1,errors:[{path:o,message:Bm(n,"enum")}]}:{ok:!0,value:n})()}var cyc=h(()=>{"use strict";Bw();_$();G2()});var _do=h(()=>{"use strict";cyc()});function uyc(e){let t=Udo(e);return{...t,...Rm(t)}}function Udo(e){return{parse:(t,r)=>Brt(e).parse(t,r),json:(t,r)=>Brt(e).json(t,r),getType:()=>Brt(e).getType()}}function Brt(e){let t=e;return t.__zurg_memoized==null&&(t.__zurg_memoized=e()),t.__zurg_memoized}var Vdo=h(()=>{"use strict";CQ()});function Gdo(e){return Object.entries(e)}var lyc=h(()=>{"use strict"});function o3t(e,t){let r=new Set(t);return Object.entries(e).reduce((n,[i,o])=>(r.has(i)&&(n[i]=o),n),{})}var qdo=h(()=>{"use strict"});function Zfe(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return t===null?!0:Object.getPrototypeOf(t)===null}var s3t=h(()=>{"use strict"});function a3t(e){return Object.keys(e)}var Wdo=h(()=>{"use strict"});function pyc(e,t){let r=[],n=[];for(let i of e)t(i)?r.push(i):n.push(i);return[r,n]}var fyc=h(()=>{"use strict"});function lK(e){return{withParsedProperties:t=>Hdo(e,t)}}function Hdo(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(rud.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(!Zfe(n))return{ok:!1,errors:[{path:i?.breadcrumbsPrefix??[],message:Bm(n,"object")}]};let o=new Set(Object.keys(t)),s=o3t(n,Object.keys(n).filter(a=>!o.has(a)));return e.json(s,i)},getType:()=>e.getType()};return{...r,...Rm(r),...lK(r)}}var rud,dyc=h(()=>{"use strict";qdo();G2();s3t();CQ();rud=Object.prototype.hasOwnProperty});var c3t=h(()=>{"use strict";dyc()});function myc(e,t){return{rawKey:e,valueSchema:t,isProperty:!0}}function $fe(e){return e.isProperty}var Kdo=h(()=>{"use strict"});function JRr(e){let t;function r(){if(t==null){t={};for(let[d,f]of Gdo(e)){let m=$fe(f)?f.rawKey:d,g=$fe(f)?f.valueSchema:f;t[m]={rawKey:m,parsedKey:d,valueSchema:g}}}return t}let n,i,o,s;function a(){if(n==null){n=[],i=[];for(let[d,f]of Gdo(e)){let m=$fe(f)?f.rawKey:d,g=$fe(f)?f.valueSchema:f;iud(g)&&(n.push(m),i.push(d))}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(([d,f])=>$fe(f)?f.rawKey:d),_getParsedProperties:()=>a3t(e),parse:(d,f)=>{let m=f?.breadcrumbsPrefix??[];return hyc({value:d,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,{...f,breadcrumbsPrefix:I})}}},unrecognizedObjectKeys:f?.unrecognizedObjectKeys,skipValidation:f?.skipValidation,breadcrumbsPrefix:m,omitUndefined:f?.omitUndefined})},json:(d,f)=>{let m=f?.breadcrumbsPrefix??[];return hyc({value:d,requiredKeys:c(),requiredKeysSet:l(),getProperty:g=>{let A=e[g];if(A!=null)return $fe(A)?{transformedKey:A.rawKey,transform:y=>{let I=[...m,g];return A.valueSchema.json(y,{...f,breadcrumbsPrefix:I})}}:{transformedKey:g,transform:y=>{let I=[...m,g];return A.json(y,{...f,breadcrumbsPrefix:I})}}},unrecognizedObjectKeys:f?.unrecognizedObjectKeys,skipValidation:f?.skipValidation,breadcrumbsPrefix:m,omitUndefined:f?.omitUndefined})},getType:()=>wu.OBJECT};return{...Rw(p),...Rm(p),...lK(p),...d6e(p)}}function hyc({value:e,requiredKeys:t,requiredKeysSet:r,getProperty:n,unrecognizedObjectKeys:i="fail",skipValidation:o=!1,breadcrumbsPrefix:s=[]}){if(!Zfe(e))return{ok:!1,errors:[{path:s,message:Bm(e,"object")}]};let a=t.length,c=[],u={};for(let l in e){if(!nud.call(e,l))continue;let p=e[l],d=n(l);if(d!=null){a>0&&r.has(l)&&a--;let f=d.transform(p);f.ok?u[d.transformedKey]=f.value:(u[l]=p,c.push(...f.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 d6e(e){return{extend:t=>{let r={_getParsedProperties:()=>[...e._getParsedProperties(),...t._getParsedProperties()],_getRawProperties:()=>[...e._getRawProperties(),...t._getRawProperties()],parse:(n,i)=>gyc({extensionKeys:t._getRawProperties(),value:n,transformBase:o=>e.parse(o,i),transformExtension:o=>t.parse(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),json:(n,i)=>gyc({extensionKeys:t._getParsedProperties(),value:n,transformBase:o=>e.json(o,i),transformExtension:o=>t.json(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),getType:()=>wu.OBJECT};return{...r,...Rm(r),...lK(r),...d6e(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:()=>wu.OBJECT};return{...n,...Rm(n),...lK(n),...d6e(n)}}}}function gyc({extensionKeys:e,value:t,transformBase:r,transformExtension:n,breadcrumbsPrefix:i=[]}){if(!Zfe(t))return{ok:!1,errors:[{path:i,message:Bm(t,"object")}]};let o=new Set(e),[s,a]=pyc(a3t(t),l=>o.has(l)),c=r(o3t(t,a)),u=n(o3t(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 iud(e){return!oud(e)}function oud(e){switch(e.getType()){case wu.ANY:case wu.UNKNOWN:case wu.OPTIONAL:case wu.OPTIONAL_NULLABLE:return!0;default:return!1}}var nud,Jdo=h(()=>{"use strict";Bw();lyc();qdo();G2();s3t();Wdo();L$();fyc();c3t();CQ();Kdo();nud=Object.prototype.hasOwnProperty});function Ayc(e){return JRr(e)}var yyc=h(()=>{"use strict";Jdo()});var Ydo=h(()=>{"use strict";Jdo();yyc();Kdo()});function byc(e){let t={...Udo(e),_getRawProperties:()=>Brt(e)._getRawProperties(),_getParsedProperties:()=>Brt(e)._getParsedProperties()};return{...t,...Rm(t),...lK(t),...d6e(t)}}var Eyc=h(()=>{"use strict";Ydo();c3t();CQ();Vdo()});var Iyc=h(()=>{"use strict";Vdo();Eyc()});function YRr(e){let t={parse:(r,n)=>vyc(r,(i,o)=>e.parse(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),json:(r,n)=>vyc(r,(i,o)=>e.json(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),getType:()=>wu.LIST};return{...Rw(t),...Rm(t)}}function vyc(e,t){if(!Array.isArray(e))return{ok:!1,errors:[{message:Bm(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 Cyc=h(()=>{"use strict";Bw();G2();L$();CQ()});var Xdo=h(()=>{"use strict";Cyc()});function xyc(e){return pT(wu.BOOLEAN_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:Bm(r,`${e.toString()}`)}]})()}var Syc=h(()=>{"use strict";Bw();_$();G2()});function wyc(e){return pT(wu.STRING_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:Bm(r,`"${e}"`)}]})()}var Tyc=h(()=>{"use strict";Bw();_$();G2()});var Oyc=h(()=>{"use strict";Syc();Tyc()});var Pyc,Byc=h(()=>{"use strict";Bw();_$();Pyc=pT(wu.ANY,e=>({ok:!0,value:e}))});var Ryc,Dyc=h(()=>{"use strict";Bw();_$();G2();Ryc=pT(wu.BOOLEAN,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="boolean"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Bm(e,"boolean")}]})});var kyc,Fyc=h(()=>{"use strict";Bw();_$();kyc=pT(wu.NEVER,(e,{breadcrumbsPrefix:t=[]}={})=>({ok:!1,errors:[{path:t,message:"Expected never"}]}))});var Nyc,jyc=h(()=>{"use strict";Bw();_$();G2();Nyc=pT(wu.NUMBER,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="number"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Bm(e,"number")}]})});var zyc,Qyc=h(()=>{"use strict";Bw();_$();G2();zyc=pT(wu.STRING,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="string"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Bm(e,"string")}]})});var Myc,Lyc=h(()=>{"use strict";Bw();_$();Myc=pT(wu.UNKNOWN,e=>({ok:!0,value:e}))});var _yc=h(()=>{"use strict";Byc();Dyc();Fyc();jyc();Qyc();Lyc()});function Uyc(e,t){let r={parse:(n,i)=>XRr({value:n,isKeyNumeric:e.getType()===wu.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)=>XRr({value:n,isKeyNumeric:e.getType()===wu.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:()=>wu.RECORD};return{...Rw(r),...Rm(r)}}function Vyc(e,t){let r={parse:(n,i)=>XRr({value:n,isKeyNumeric:e.getType()===wu.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)=>XRr({value:n,isKeyNumeric:e.getType()===wu.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:()=>wu.RECORD};return{...Rw(r),...Rm(r)}}function XRr({value:e,isKeyNumeric:t,transformKey:r,transformValue:n,breadcrumbsPrefix:i=[]}){if(!Zfe(e))return{ok:!1,errors:[{path:i,message:Bm(e,"object")}]};let o={},s=[];for(let a in e){if(!sud.call(e,a))continue;let c=e[a];if(c===void 0)continue;let u=a;if(t){let d=a.length>0?Number(a):NaN;Number.isNaN(d)||(u=d)}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 sud,Gyc=h(()=>{"use strict";Bw();G2();s3t();L$();CQ();sud=Object.prototype.hasOwnProperty});var qyc=h(()=>{"use strict";Gyc()});function Wyc(e){let t=YRr(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:Bm(n,"Set")}]},getType:()=>wu.SET};return{...Rw(r),...Rm(r)}}var Hyc=h(()=>{"use strict";Bw();G2();L$();Xdo();CQ()});var Kyc=h(()=>{"use strict";Hyc()});function Yyc(e){let t={parse:(r,n)=>Jyc((i,o)=>i.parse(r,o),e,n),json:(r,n)=>Jyc((i,o)=>i.json(r,o),e,n),getType:()=>wu.UNDISCRIMINATED_UNION};return{...Rw(t),...Rm(t)}}function Jyc(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 Xyc=h(()=>{"use strict";Bw();L$();CQ()});var Zyc=h(()=>{"use strict";Xyc()});function $yc(e,t){return{parsedDiscriminant:e,rawDiscriminant:t}}var ebc=h(()=>{"use strict"});function rbc(e,t){let r=typeof e=="string"?e:e.rawDiscriminant,n=typeof e=="string"?e:e.parsedDiscriminant,i=KRr(a3t(t)),o={parse:(s,a)=>tbc({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)=>tbc({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:()=>wu.UNION};return{...Rw(o),...Rm(o),...lK(o)}}function tbc({value:e,discriminant:t,transformedDiscriminant:r,transformDiscriminantValue:n,getAdditionalPropertiesSchema:i,allowUnrecognizedUnionMembers:o=!1,transformAdditionalProperties:s,breadcrumbsPrefix:a=[]}){if(!Zfe(e))return{ok:!1,errors:[{path:a,message:Bm(e,"object")}]};let c=e[t],u={};for(let f in e)aud.call(e,f)&&f!==t&&(u[f]=e[f]);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 d=s(u,p);return d.ok?{ok:!0,value:{[r]:c,...d.value}}:d}var aud,nbc=h(()=>{"use strict";Bw();G2();s3t();Wdo();L$();_do();c3t();CQ();aud=Object.prototype.hasOwnProperty});var ibc=h(()=>{"use strict";ebc();nbc()});var obc=h(()=>{"use strict";iyc();ayc();_do();Iyc();Xdo();Oyc();Ydo();c3t();_yc();qyc();CQ();Kyc();Zyc();ibc()});var ne={};$(ne,{JsonError:()=>Ort,ParseError:()=>Prt,any:()=>Pyc,bigint:()=>ryc,boolean:()=>Ryc,booleanLiteral:()=>xyc,date:()=>oyc,discriminant:()=>$yc,enum_:()=>KRr,getObjectLikeUtils:()=>lK,getObjectUtils:()=>d6e,getSchemaUtils:()=>Rm,isProperty:()=>$fe,lazy:()=>uyc,lazyObject:()=>byc,list:()=>YRr,never:()=>kyc,number:()=>Nyc,object:()=>JRr,objectWithoutOptionalProperties:()=>Ayc,optional:()=>Mdo,partialRecord:()=>Vyc,property:()=>myc,record:()=>Uyc,set:()=>Wyc,string:()=>zyc,stringLiteral:()=>wyc,transform:()=>Ldo,undiscriminatedUnion:()=>Yyc,union:()=>rbc,unknown:()=>Myc,withParsedProperties:()=>Hdo});var sbc=h(()=>{"use strict";obc()});var abc=h(()=>{"use strict"});var Pr=h(()=>{"use strict";XAc();ZAc();$Ac();sbc();abc()});var ZRr,Zdo=h(()=>{"use strict";Pr();ZRr=ne.object({href:ne.string()})});var $Rr,$do=h(()=>{"use strict";Pr();$Rr=ne.enum_(["description","subtitle"])});var eDr,emo=h(()=>{"use strict";Pr();$do();eDr=ne.object({pageDirective:ne.property("page-directive",ne.string().optional()),pageDescriptionSource:ne.property("page-description-source",$Rr.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 tDr,tmo=h(()=>{"use strict";Pr();tDr=ne.object({url:ne.string(),title:ne.string().optional()})});var rDr,rmo=h(()=>{"use strict";Pr();tmo();rDr=ne.undiscriminatedUnion([tDr])});var nDr,nmo=h(()=>{"use strict";Pr();nDr=ne.enum_(["docs","slack","discord"])});var iDr,imo=h(()=>{"use strict";Pr();iDr=ne.enum_(["claude-3.7","claude-4","command-a"])});var u3t,omo=h(()=>{"use strict";Pr();rmo();nmo();imo();u3t=ne.object({model:iDr.optional(),systemPrompt:ne.property("system-prompt",ne.string().optional()),location:ne.list(nDr).optional(),datasources:ne.list(rDr).optional(),maskPii:ne.property("mask-pii",ne.boolean().optional()),disclaimer:ne.string().optional()})});var oDr,smo=h(()=>{"use strict";Pr();oDr=ne.object({enabled:ne.boolean().optional(),style:ne.string().optional()})});var sDr,amo=h(()=>{"use strict";Pr();sDr=ne.object({orgId:ne.property("org-id",ne.string())})});var aDr,cmo=h(()=>{"use strict";Pr();aDr=ne.object({measurementId:ne.property("measurement-id",ne.string())})});var cDr,umo=h(()=>{"use strict";Pr();cDr=ne.object({containerId:ne.property("container-id",ne.string())})});var uDr,lmo=h(()=>{"use strict";Pr();uDr=ne.object({appId:ne.property("app-id",ne.string()),apiBase:ne.property("api-base",ne.string().optional())})});var lDr,pmo=h(()=>{"use strict";Pr();lDr=ne.object({apiKey:ne.property("api-key",ne.string()),endpoint:ne.string().optional()})});var pDr,fmo=h(()=>{"use strict";Pr();pDr=ne.object({writeKey:ne.property("write-key",ne.string())})});var fDr,dmo=h(()=>{"use strict";Pr();amo();cmo();umo();lmo();pmo();fmo();fDr=ne.object({segment:pDr.optional(),fullstory:sDr.optional(),intercom:uDr.optional(),posthog:lDr.optional(),gtm:cDr.optional(),ga4:aDr.optional()})});var hve,l3t=h(()=>{"use strict";Pr();hve=ne.object({message:ne.string()})});var dDr,mmo=h(()=>{"use strict";Pr();dDr=ne.enum_(["all","untyped"])});var mDr,hmo=h(()=>{"use strict";Pr();mDr=ne.enum_(["get","post","put","patch","delete","head","options","trace"])});var hDr,gmo=h(()=>{"use strict";Pr();hmo();hDr=ne.object({statusCode:ne.property("status-code",ne.number()),methods:ne.list(mDr).optional()})});var gDr,Amo=h(()=>{"use strict";Pr();gDr=ne.undiscriminatedUnion([ne.string(),ne.record(ne.string(),ne.unknown())])});var ADr,ymo=h(()=>{"use strict";Pr();mmo();gmo();Amo();ADr=ne.object({schema:gDr,name:ne.string().optional(),applyTo:ne.property("apply-to",dDr.optional()),ensure:ne.list(hDr).optional()})});var yDr,bmo=h(()=>{"use strict";Pr();ymo();yDr=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",ADr.optional())})});var bDr,Emo=h(()=>{"use strict";Pr();bDr=ne.enum_(["openapi","asyncapi","graphql"])});var EDr,Imo=h(()=>{"use strict";Pr();bmo();Emo();EDr=ne.object({type:bDr,path:ne.string(),namespace:ne.string().optional(),overlays:ne.string().optional(),overrides:ne.list(ne.string()).optional(),settings:yDr.optional()})});var p3t,vmo=h(()=>{"use strict";Pr();p3t=ne.string()});var U$,Rrt=h(()=>{"use strict";Pr();vmo();U$=ne.undiscriminatedUnion([p3t,ne.list(p3t)])});var fT,V$=h(()=>{"use strict";Pr();fT=ne.enum_(["stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"])});var IDr,Cmo=h(()=>{"use strict";Pr();IDr=ne.enum_(["open-by-default"])});var G$,Drt=h(()=>{"use strict";Pr();Cmo();G$=ne.undiscriminatedUnion([ne.boolean(),IDr])});var vDr,xmo=h(()=>{"use strict";Pr();vDr=ne.object({href:ne.string().optional()})});var q$,krt=h(()=>{"use strict";Pr();xmo();q$=ne.object({hidden:ne.boolean().optional(),environments:ne.list(ne.string()).optional(),button:vDr.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 CDr,Smo=h(()=>{"use strict";Pr();CDr=ne.object({version:ne.string(),package:ne.string()})});var J3,wmo=h(()=>{"use strict";Pr();Smo();J3=ne.undiscriminatedUnion([ne.string(),CDr])});var xDr,Tmo=h(()=>{"use strict";Pr();wmo();xDr=ne.object({python:J3.optional(),typescript:J3.optional(),go:J3.optional(),java:J3.optional(),ruby:J3.optional(),csharp:J3.optional(),php:J3.optional(),swift:J3.optional(),rust:J3.optional(),cli:J3.optional()})});var SDr,Omo=h(()=>{"use strict";Pr();SDr=ne.enum_(["unset","stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"])});var f3t,Pmo=h(()=>{"use strict";Pr();f3t=ne.object({flag:ne.string(),fallbackValue:ne.property("fallback-value",ne.unknown().optional()),match:ne.unknown().optional()})});var wDr,Bmo=h(()=>{"use strict";Pr();Pmo();wDr=ne.undiscriminatedUnion([ne.string(),f3t,ne.list(f3t)])});var rm,dT=h(()=>{"use strict";Pr();Bmo();rm=ne.object({featureFlag:ne.property("feature-flag",wDr.optional())})});var m6e,TDr=h(()=>{"use strict";Pr();m6e=ne.string()});var Frt,ODr=h(()=>{"use strict";Pr();TDr();Frt=ne.undiscriminatedUnion([m6e,ne.list(m6e)])});var nm,mT=h(()=>{"use strict";Pr();ODr();nm=ne.object({viewers:Frt.optional(),orphaned:ne.boolean().optional()})});var PDr,Rmo=h(()=>{"use strict";Pr();Y3();Imo();Rrt();V$();Drt();krt();Tmo();Omo();dT();mT();PDr=ne.object({api:ne.string(),apiName:ne.property("api-name",ne.string().optional()),specs:ne.list(EDr).optional(),openrpc:ne.string().optional(),audiences:U$.optional(),displayErrors:ne.property("display-errors",ne.boolean().optional()),tagDescriptionPages:ne.property("tag-description-pages",ne.boolean().optional()),snippets:xDr.optional(),postman:ne.string().optional(),summary:ne.string().optional(),layout:ne.list(ne.lazy(()=>W$)).optional(),collapsed:G$.optional(),icon:ne.string().optional(),slug:ne.string().optional(),hidden:ne.boolean().optional(),availability:fT.optional(),skipSlug:ne.property("skip-slug",ne.boolean().optional()),alphabetized:ne.boolean().optional(),sortByAvailability:ne.property("sort-by-availability",ne.list(SDr).optional()),flattened:ne.boolean().optional(),paginated:ne.boolean().optional(),playground:q$.optional()}).extend(nm).extend(rm)});var BDr,Dmo=h(()=>{"use strict";Pr();V$();krt();dT();mT();BDr=ne.object({endpoint:ne.string(),title:ne.string().optional(),slug:ne.string().optional(),icon:ne.string().optional(),hidden:ne.boolean().optional(),availability:fT.optional(),playground:q$.optional()}).extend(nm).extend(rm)});var RDr,kmo=h(()=>{"use strict";Pr();RDr=ne.enum_(["indented","cards"])});var DDr,Fmo=h(()=>{"use strict";Pr();V$();dT();mT();DDr=ne.object({operation:ne.string(),title:ne.string().optional(),slug:ne.string().optional(),hidden:ne.boolean().optional(),availability:fT.optional()}).extend(nm).extend(rm)});var m5,h6e=h(()=>{"use strict";Pr();m5=ne.enum_(["_blank","_self","_parent","_top"])});var Nrt,kDr=h(()=>{"use strict";Pr();h6e();Nrt=ne.object({link:ne.string(),href:ne.string(),icon:ne.string().optional(),target:m5.optional()})});var h5,g6e=h(()=>{"use strict";Pr();V$();dT();mT();h5=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:fT.optional()}).extend(nm).extend(rm)});var W$,cbc=h(()=>{"use strict";Pr();Y3();Dmo();Fmo();kDr();g6e();W$=ne.undiscriminatedUnion([ne.string(),ne.record(ne.string(),ne.lazy(()=>FDr)),ne.lazyObject(()=>NDr),BDr,DDr,h5,Nrt])});var FDr,ubc=h(()=>{"use strict";Pr();Y3();FDr=ne.undiscriminatedUnion([ne.list(ne.lazy(()=>W$)),ne.lazyObject(()=>jDr)])});var jDr,lbc=h(()=>{"use strict";Pr();Y3();V$();krt();dT();mT();jDr=ne.object({title:ne.string().optional(),summary:ne.string().optional(),contents:ne.list(ne.lazy(()=>W$)).optional(),availability:fT.optional(),slug:ne.string().optional(),icon:ne.string().optional(),hidden:ne.boolean().optional(),skipSlug:ne.property("skip-slug",ne.boolean().optional()),playground:q$.optional()}).extend(nm).extend(rm)});var NDr,pbc=h(()=>{"use strict";Pr();Y3();V$();Drt();krt();dT();mT();NDr=ne.object({section:ne.string(),referencedPackages:ne.property("referenced-packages",ne.list(ne.string()).optional()),summary:ne.string().optional(),contents:ne.list(ne.lazy(()=>W$)).optional(),slug:ne.string().optional(),icon:ne.string().optional(),hidden:ne.boolean().optional(),skipSlug:ne.property("skip-slug",ne.boolean().optional()),collapsed:G$.optional(),collapsible:ne.boolean().optional(),collapsedByDefault:ne.property("collapsed-by-default",ne.boolean().optional()),availability:fT.optional(),playground:q$.optional()}).extend(nm).extend(rm)});var zDr,Nmo=h(()=>{"use strict";Pr();zDr=ne.object({dark:ne.string().optional(),light:ne.string().optional()})});var QDr,jmo=h(()=>{"use strict";Pr();Nmo();QDr=ne.undiscriminatedUnion([ne.string(),zDr])});var ede,d3t=h(()=>{"use strict";Pr();ede=ne.string()});var MDr,zmo=h(()=>{"use strict";Pr();d3t();dT();mT();MDr=ne.object({blog:ede,title:ne.string().optional(),slug:ne.string().optional(),icon:ne.string().optional(),hidden:ne.boolean().optional()}).extend(nm).extend(rm)});var LDr,Qmo=h(()=>{"use strict";Pr();LDr=ne.enum_(["default","canvas"])});var _Dr,Mmo=h(()=>{"use strict";Pr();_Dr=ne.object({currentPage:ne.property("current-page",ne.boolean().optional())})});var jrt,UDr=h(()=>{"use strict";Pr();d3t();dT();mT();jrt=ne.object({changelog:ede,title:ne.string().optional(),slug:ne.string().optional(),icon:ne.string().optional(),hidden:ne.boolean().optional()}).extend(nm).extend(rm)});var VDr,Lmo=h(()=>{"use strict";Pr();VDr=ne.enum_(["timeline","classic"])});var pK,_mo=h(()=>{"use strict";Pr();pK=ne.enum_(["warn","error"])});var GDr,Umo=h(()=>{"use strict";Pr();_mo();GDr=ne.object({exampleValidation:ne.property("example-validation",pK.optional()),brokenLinks:ne.property("broken-links",pK.optional()),noNonComponentRefs:ne.property("no-non-component-refs",pK.optional()),validLocalReferences:ne.property("valid-local-references",pK.optional()),noCircularRedirects:ne.property("no-circular-redirects",pK.optional()),validDocsEndpoints:ne.property("valid-docs-endpoints",pK.optional()),missingRedirects:ne.property("missing-redirects",pK.optional()),validChangelogSlug:ne.property("valid-changelog-slug",pK.optional())})});var qDr,Vmo=h(()=>{"use strict";Pr();Umo();qDr=ne.object({rules:GDr.optional()})});var m3t,Gmo=h(()=>{"use strict";Pr();m3t=ne.enum_(["github-dark","github-dark-default","github-dark-dimmed","github-dark-high-contrast","github-light","github-light-default","github-light-high-contrast","material-theme-darker","min-dark","min-light"])});var WDr,qmo=h(()=>{"use strict";Pr();Gmo();WDr=ne.object({light:m3t.optional(),dark:m3t.optional()})});var HDr,Wmo=h(()=>{"use strict";Pr();HDr=ne.object({dark:ne.string().optional(),light:ne.string().optional()})});var vv,Hmo=h(()=>{"use strict";Pr();Wmo();vv=ne.undiscriminatedUnion([ne.string(),HDr])});var KDr,Kmo=h(()=>{"use strict";Pr();Hmo();KDr=ne.object({accentPrimary:ne.property("accent-primary",vv.optional()),accentPrimaryDeprecated:ne.property("accentPrimary",vv.optional()),background:vv.optional(),border:vv.optional(),sidebarBackground:ne.property("sidebar-background",vv.optional()),headerBackground:ne.property("header-background",vv.optional()),cardBackground:ne.property("card-background",vv.optional()),accent1:ne.property("accent-1",vv.optional()),accent2:ne.property("accent-2",vv.optional()),accent3:ne.property("accent-3",vv.optional()),accent4:ne.property("accent-4",vv.optional()),accent5:ne.property("accent-5",vv.optional()),accent6:ne.property("accent-6",vv.optional()),accent7:ne.property("accent-7",vv.optional()),accent8:ne.property("accent-8",vv.optional()),accent9:ne.property("accent-9",vv.optional()),accent10:ne.property("accent-10",vv.optional()),accent11:ne.property("accent-11",vv.optional()),accent12:ne.property("accent-12",vv.optional())})});var JDr,Jmo=h(()=>{"use strict";Pr();JDr=ne.enum_(["center","left"])});var YDr,Ymo=h(()=>{"use strict";Pr();YDr=ne.undiscriminatedUnion([ne.string(),ne.list(ne.string())])});var XDr,Xmo=h(()=>{"use strict";Pr();XDr=ne.undiscriminatedUnion([ne.string(),ne.list(ne.string())])});var ZDr,Zmo=h(()=>{"use strict";Pr();ZDr=ne.object({title:ne.string(),subtitle:ne.string().optional(),url:ne.string(),icon:ne.string().optional(),default:ne.boolean().optional()})});var $Dr,$mo=h(()=>{"use strict";Pr();$Dr=ne.enum_(["github","dashboard"])});var ekr,eho=h(()=>{"use strict";Pr();ekr=ne.object({host:ne.string().optional(),owner:ne.string(),repo:ne.string(),branch:ne.string().optional()})});var tkr,tho=h(()=>{"use strict";Pr();$mo();eho();tkr=ne.object({github:ekr.optional(),launch:$Dr.optional()})});var rkr,rho=h(()=>{"use strict";Pr();Rrt();Xmo();tho();rkr=ne.object({url:ne.string(),customDomain:ne.property("custom-domain",XDr.optional()),editThisPage:ne.property("edit-this-page",tkr.optional()),audiences:U$.optional(),multiSource:ne.property("multi-source",ne.boolean().optional())})});var nkr,nho=h(()=>{"use strict";Pr();nkr=ne.object({allowedOrigins:ne.property("allowed-origins",ne.list(ne.string()))})});var ikr,iho=h(()=>{"use strict";Pr();ikr=ne.enum_(["curl","csharp","go","java","javascript","php","python","ruby","swift","typescript"])});var okr,oho=h(()=>{"use strict";Pr();iho();okr=ne.undiscriminatedUnion([ne.boolean(),ne.list(ikr)])});var gve,h3t=h(()=>{"use strict";Pr();gve=ne.string()});var skr,sho=h(()=>{"use strict";Pr();skr=ne.object({prioritizeCurrentProduct:ne.property("prioritize-current-product",ne.boolean().optional()),defaultFilterByCurrentProduct:ne.property("default-filter-by-current-product",ne.boolean().optional())})});var zrt,akr=h(()=>{"use strict";Pr();zrt=ne.enum_(["frontmatter","filename"])});var ckr,aho=h(()=>{"use strict";Pr();ckr=ne.enum_(["flat","grouped"])});var ukr,cho=h(()=>{"use strict";Pr();nho();oho();h3t();sho();akr();aho();ukr=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:skr.optional(),httpSnippets:ne.property("http-snippets",okr.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:gve.optional(),folderTitleSource:ne.property("folder-title-source",zrt.optional()),substituteEnvVars:ne.property("substitute-env-vars",ne.boolean().optional()),websocketOneofDisplay:ne.property("websocket-oneof-display",ckr.optional()),embedding:nkr.optional(),showHeadersInExamples:ne.property("show-headers-in-examples",ne.boolean().optional()),requireAnalyticsConsent:ne.property("require-analytics-consent",ne.boolean().optional())})});var Qrt,lkr=h(()=>{"use strict";Pr();Qrt=ne.enum_(["normal","italic"])});var Mrt,pkr=h(()=>{"use strict";Pr();Mrt=ne.undiscriminatedUnion([ne.string(),ne.number()])});var fkr,uho=h(()=>{"use strict";Pr();lkr();pkr();fkr=ne.object({path:ne.string(),weight:Mrt.optional(),style:Qrt.optional()})});var dkr,lho=h(()=>{"use strict";Pr();uho();dkr=ne.undiscriminatedUnion([ne.string(),fkr])});var mkr,pho=h(()=>{"use strict";Pr();mkr=ne.enum_(["auto","block","swap","fallback","optional"])});var Lrt,fho=h(()=>{"use strict";Pr();lho();pho();lkr();pkr();Lrt=ne.object({name:ne.string().optional(),path:ne.string().optional(),weight:Mrt.optional(),style:Qrt.optional(),paths:ne.list(dkr).optional(),display:mkr.optional(),fallback:ne.list(ne.string()).optional(),fontVariationSettings:ne.property("font-variation-settings",ne.string().optional())})});var hkr,dho=h(()=>{"use strict";Pr();fho();hkr=ne.object({headingsFont:Lrt.optional(),bodyFont:Lrt.optional(),codeFont:Lrt.optional()})});var gkr,mho=h(()=>{"use strict";Pr();gkr=ne.object({url:ne.string(),locale:ne.string().optional()})});var Akr,hho=h(()=>{"use strict";Pr();mho();Akr=ne.undiscriminatedUnion([ne.string(),gkr])});var ykr,gho=h(()=>{"use strict";Pr();hho();ykr=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(Akr).optional())})});var bkr,Aho=h(()=>{"use strict";Pr();bkr=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 Ekr,yho=h(()=>{"use strict";Pr();Ekr=ne.object({intercom:ne.string().optional(),context7:ne.string().optional()})});var _rt,Ikr=h(()=>{"use strict";Pr();_rt=ne.enum_(["beforeInteractive","afterInteractive","lazyOnload"])});var vkr,bho=h(()=>{"use strict";Pr();Ikr();vkr=ne.object({path:ne.string(),strategy:_rt.optional()})});var Ckr,Eho=h(()=>{"use strict";Pr();bho();Ckr=ne.undiscriminatedUnion([ne.string(),vkr])});var xkr,Iho=h(()=>{"use strict";Pr();Ikr();xkr=ne.object({url:ne.string(),strategy:_rt.optional(),disableSri:ne.property("disable-sri",ne.boolean().optional())})});var g3t,vho=h(()=>{"use strict";Pr();Eho();Iho();g3t=ne.undiscriminatedUnion([xkr,Ckr])});var Skr,Cho=h(()=>{"use strict";Pr();vho();Skr=ne.undiscriminatedUnion([g3t,ne.list(g3t)])});var wkr,xho=h(()=>{"use strict";Pr();wkr=ne.enum_(["fixed","static"])});var Tkr,Sho=h(()=>{"use strict";Pr();Tkr=ne.enum_(["header","header-tabs","sidebar"])});var Okr,who=h(()=>{"use strict";Pr();Okr=ne.enum_(["header","sidebar"])});var Urt,Pkr=h(()=>{"use strict";Pr();Urt=ne.enum_(["header","sidebar"])});var Bkr,Tho=h(()=>{"use strict";Pr();kmo();Mmo();Lmo();Jmo();xho();Sho();who();Pkr();Bkr=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",Tkr.optional()),tabsPlacement:ne.property("tabs-placement",Urt.optional()),switcherPlacement:ne.property("switcher-placement",Okr.optional()),contentAlignment:ne.property("content-alignment",JDr.optional()),headerPosition:ne.property("header-position",wkr.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",VDr.optional()),apiReferenceLayout:ne.property("api-reference-layout",RDr.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:_Dr.optional()})});var Rkr,Oho=h(()=>{"use strict";Pr();Rkr=ne.enum_(["compact","hyphenated"])});var Dkr,Pho=h(()=>{"use strict";Pr();Oho();Dkr=ne.object({doxyfile:ne.string().optional(),includeUndocumentedMacros:ne.property("include-undocumented-macros",ne.boolean().optional()),slugStyle:ne.property("slug-style",Rkr.optional())})});var kkr,Bho=h(()=>{"use strict";Pr();kkr=ne.object({git:ne.string(),subpath:ne.string().optional(),ref:ne.string().optional()})});var Fkr,Rho=h(()=>{"use strict";Pr();Fkr=ne.object({path:ne.string()})});var Nkr,Dho=h(()=>{"use strict";Pr();Bho();Rho();Nkr=ne.undiscriminatedUnion([kkr,Fkr])});var jkr,kho=h(()=>{"use strict";Pr();jkr=ne.enum_(["python","cpp"])});var zkr,Fho=h(()=>{"use strict";Pr();zkr=ne.object({path:ne.string()})});var Qkr,Nho=h(()=>{"use strict";Pr();Pho();Dho();kho();Fho();Qkr=ne.object({input:Nkr,output:zkr,lang:jkr,config:Dkr.optional()})});var Vrt,Mkr=h(()=>{"use strict";Pr();Vrt=ne.string()});var Lkr,jho=h(()=>{"use strict";Pr();Lkr=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 _kr,zho=h(()=>{"use strict";Pr();_kr=ne.enum_(["dark","light"])});var Ukr,Qho=h(()=>{"use strict";Pr();Ukr=ne.enum_(["summary","summary_large_image","app","player"])});var Vkr,Mho=h(()=>{"use strict";Pr();zho();Qho();Vkr=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",Ukr.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",_kr.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 Ave,A3t=h(()=>{"use strict";Pr();ODr();Ave=ne.object({viewers:Frt.optional()})});var H$,Gkr=h(()=>{"use strict";Pr();h6e();A3t();H$=ne.object({href:ne.string().optional(),target:m5.optional(),url:ne.string().optional(),text:ne.string().optional(),icon:ne.string().optional(),rightIcon:ne.string().optional(),rounded:ne.boolean().optional()}).extend(Ave)});var qkr,Lho=h(()=>{"use strict";Pr();Gkr();A3t();qkr=ne.object({links:ne.list(H$),text:ne.string().optional(),icon:ne.string().optional(),rightIcon:ne.string().optional(),rounded:ne.boolean().optional()}).extend(Ave)});var Wkr,_ho=h(()=>{"use strict";Pr();h6e();A3t();Wkr=ne.object({url:ne.string(),target:m5.optional()}).extend(Ave)});var Hkr,Uho=h(()=>{"use strict";Pr();_ho();Hkr=ne.undiscriminatedUnion([ne.string(),Wkr])});var Kkr,Vho=h(()=>{"use strict";Pr();Lho();Uho();Gkr();Kkr=ne.union("type",{filled:H$,outlined:H$,minimal:H$,github:ne.object({value:Hkr}),dropdown:qkr,primary:H$,secondary:H$}).transform({transform:e=>e,untransform:e=>e})});var g5,A6e=h(()=>{"use strict";Pr();g5=ne.string()});var Jkr,Gho=h(()=>{"use strict";Pr();Y3();A6e();Jkr=ne.object({tab:g5,layout:ne.list(ne.lazy(()=>K$)).optional()})});var Ykr,qho=h(()=>{"use strict";Pr();Y3();dT();mT();Ykr=ne.object({title:ne.string(),subtitle:ne.string().optional(),icon:ne.string().optional(),layout:ne.list(ne.lazy(()=>K$)),slug:ne.string().optional(),skipSlug:ne.property("skip-slug",ne.boolean().optional()),hidden:ne.boolean().optional(),default:ne.boolean().optional()}).extend(nm).extend(rm)});var Xkr,Who=h(()=>{"use strict";Pr();A6e();qho();Xkr=ne.object({tab:g5,variants:ne.list(Ykr)})});var Zkr,Hho=h(()=>{"use strict";Pr();Gho();Who();Zkr=ne.undiscriminatedUnion([Jkr,Xkr])});var $kr,Kho=h(()=>{"use strict";Pr();Hho();$kr=ne.list(Zkr)});var eFr,Jho=h(()=>{"use strict";Pr();Y3();eFr=ne.list(ne.lazy(()=>K$))});var yve,y3t=h(()=>{"use strict";Pr();Kho();Jho();yve=ne.undiscriminatedUnion([eFr,$kr])});var tFr,Yho=h(()=>{"use strict";Pr();tFr=ne.enum_(["copy-page","view-as-markdown","ask-ai","chatgpt","claude","cursor","claude-code","vscode"])});var rFr,Xho=h(()=>{"use strict";Pr();rFr=ne.object({name:ne.string(),description:ne.string().optional(),url:ne.string().optional()})});var nFr,Zho=h(()=>{"use strict";Pr();nFr=ne.undiscriminatedUnion([ne.string(),ne.list(ne.string())])});var iFr,$ho=h(()=>{"use strict";Pr();Xho();Zho();iFr=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",nFr.optional()),skills:ne.list(rFr).optional()})});var oFr,ego=h(()=>{"use strict";Pr();Zmo();$ho();oFr=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(ZDr).optional(),skills:iFr.optional()})});var sFr,tgo=h(()=>{"use strict";Pr();Yho();ego();sFr=ne.object({default:tFr.optional(),options:oFr.optional()})});var aFr,rgo=h(()=>{"use strict";Pr();aFr=ne.enum_(["deprecated","legacy","ga","stable","beta","alpha","preview"])});var Grt,cFr=h(()=>{"use strict";Pr();l3t();Rrt();rgo();dT();mT();Grt=ne.object({displayName:ne.property("display-name",ne.string()),path:ne.string().optional(),ref:ne.string().optional(),slug:ne.string().optional(),availability:aFr.optional(),audiences:U$.optional(),hidden:ne.boolean().optional(),default:ne.boolean().optional(),announcement:hve.optional()}).extend(nm).extend(rm)});var qrt,uFr=h(()=>{"use strict";Pr();Rrt();cFr();dT();mT();qrt=ne.object({displayName:ne.property("display-name",ne.string()),subtitle:ne.string().optional(),icon:ne.string().optional(),image:ne.string().optional(),versions:ne.list(Grt).optional(),audiences:U$.optional()}).extend(nm).extend(rm)});var lFr,ngo=h(()=>{"use strict";Pr();uFr();h6e();lFr=ne.object({href:ne.string(),target:m5.optional()}).extend(qrt)});var pFr,igo=h(()=>{"use strict";Pr();l3t();uFr();pFr=ne.object({path:ne.string(),slug:ne.string().optional(),announcement:hve.optional()}).extend(qrt)});var fFr,ogo=h(()=>{"use strict";Pr();ngo();igo();fFr=ne.undiscriminatedUnion([pFr,lFr])});var dFr,sgo=h(()=>{"use strict";Pr();dFr=ne.enum_(["typescript","javascript","python","java","go","ruby","csharp","php","swift","rust","nodets","nodejs","dotnet","curl","jvm","ts","js"])});var mFr,ago=h(()=>{"use strict";Pr();mFr=ne.object({source:ne.string(),destination:ne.string(),permanent:ne.boolean().optional()})});var hFr,cgo=h(()=>{"use strict";Pr();ago();hFr=ne.undiscriminatedUnion([ne.list(mFr),ne.string(),ne.list(ne.string())])});var bve,b3t=h(()=>{"use strict";Pr();d3t();h6e();dT();mT();bve=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:m5.optional(),changelog:ede.optional(),blog:ede.optional()}).extend(nm).extend(rm)});var gFr,ugo=h(()=>{"use strict";Pr();gFr=ne.enum_(["default","minimal"])});var AFr,lgo=h(()=>{"use strict";Pr();AFr=ne.enum_(["default","minimal"])});var yFr,pgo=h(()=>{"use strict";Pr();yFr=ne.enum_(["default","toolbar"])});var bFr,fgo=h(()=>{"use strict";Pr();bFr=ne.enum_(["default","toggle","tabs"])});var EFr,dgo=h(()=>{"use strict";Pr();EFr=ne.enum_(["default","minimal"])});var IFr,mgo=h(()=>{"use strict";Pr();IFr=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 vFr,hgo=h(()=>{"use strict";Pr();vFr=ne.enum_(["left","center"])});var Wrt,CFr=h(()=>{"use strict";Pr();Wrt=ne.enum_(["default","bubble"])});var xFr,ggo=h(()=>{"use strict";Pr();hgo();Pkr();CFr();xFr=ne.object({style:Wrt.optional(),alignment:vFr.optional(),placement:Urt.optional()})});var SFr,Ago=h(()=>{"use strict";Pr();ggo();CFr();SFr=ne.undiscriminatedUnion([Wrt,xFr])});var wFr,ygo=h(()=>{"use strict";Pr();Qmo();qmo();ugo();lgo();pgo();fgo();dgo();mgo();Ago();wFr=ne.object({sidebar:EFr.optional(),body:LDr.optional(),tabs:SFr.optional(),pageActions:ne.property("page-actions",yFr.optional()),footerNav:ne.property("footer-nav",gFr.optional()),languageSwitcher:ne.property("language-switcher",AFr.optional()),productSwitcher:ne.property("product-switcher",bFr.optional()),siteSwitcher:ne.property("site-switcher",IFr.optional()),codeBlocks:ne.property("code-blocks",WDr.optional())})});var TFr,bgo=h(()=>{"use strict";Pr();h3t();TFr=ne.object({lang:gve,default:ne.boolean().optional()})});var OFr,Ego=h(()=>{"use strict";Pr();h3t();bgo();OFr=ne.undiscriminatedUnion([gve,TFr])});var fbc,dbc=h(()=>{"use strict";Pr();emo();omo();smo();dmo();l3t();jmo();UDr();Vmo();Kmo();Ymo();rho();cho();dho();gho();Aho();yho();Cho();Tho();Nho();Mkr();jho();Mho();Vho();y3t();tgo();g6e();ogo();sgo();cgo();TDr();b3t();A6e();ygo();Ego();cFr();fbc=ne.object({instances:ne.list(rkr),title:ne.string().optional(),libraries:ne.record(Vrt,Qkr).optional(),analytics:fDr.optional(),announcement:hve.optional(),roles:ne.list(m6e).optional(),tabs:ne.record(g5,bve).optional(),versions:ne.list(Grt).optional(),products:ne.list(fFr).optional(),changelog:jrt.optional(),landingPage:ne.property("landing-page",h5.optional()),navigation:yve.optional(),navbarLinks:ne.property("navbar-links",ne.list(Kkr).optional()),footerLinks:ne.property("footer-links",bkr.optional()),pageActions:ne.property("page-actions",sFr.optional()),globalTheme:ne.property("global-theme",ne.string().optional()),experimental:ykr.optional(),defaultLanguage:ne.property("default-language",dFr.optional()),languages:ne.list(ne.string()).optional(),translations:ne.list(OFr).optional(),aiChat:ne.property("ai-chat",u3t.optional()),aiSearch:ne.property("ai-search",u3t.optional()),aiExamples:ne.property("ai-examples",oDr.optional()),agents:eDr.optional(),metadata:Vkr.optional(),redirects:hFr.optional(),check:qDr.optional(),logo:Lkr.optional(),favicon:ne.string().optional(),backgroundImage:ne.property("background-image",QDr.optional()),colors:KDr.optional(),typography:hkr.optional(),layout:Bkr.optional(),settings:ukr.optional(),theme:wFr.optional(),integrations:Ekr.optional(),css:YDr.optional(),js:Skr.optional(),header:ne.string().optional(),footer:ne.string().optional()})});var PFr,Igo=h(()=>{"use strict";Pr();V$();Drt();akr();dT();mT();PFr=ne.object({folder:ne.string(),title:ne.string().optional(),titleSource:ne.property("title-source",zrt.optional()),slug:ne.string().optional(),icon:ne.string().optional(),hidden:ne.boolean().optional(),skipSlug:ne.property("skip-slug",ne.boolean().optional()),collapsed:G$.optional(),collapsible:ne.boolean().optional(),collapsedByDefault:ne.property("collapsed-by-default",ne.boolean().optional()),availability:fT.optional()}).extend(nm).extend(rm)});var BFr,vgo=h(()=>{"use strict";Pr();Mkr();dT();mT();BFr=ne.object({library:Vrt,title:ne.string().optional(),slug:ne.string().optional()}).extend(nm).extend(rm)});var K$,mbc=h(()=>{"use strict";Pr();Y3();Rmo();zmo();UDr();Igo();vgo();kDr();g6e();K$=ne.undiscriminatedUnion([h5,ne.lazyObject(()=>RFr),PDr,BFr,Nrt,jrt,MDr,PFr])});var hbc,gbc=h(()=>{"use strict";Pr();y3t();g6e();b3t();A6e();hbc=ne.object({tabs:ne.record(g5,bve).optional(),landingPage:ne.property("landing-page",h5.optional()),navigation:yve})});var DFr,Cgo=h(()=>{"use strict";Pr();dT();mT();DFr=ne.object({displayName:ne.property("display-name",ne.string()),path:ne.string(),slug:ne.string().optional()}).extend(nm).extend(rm)});var Abc,ybc=h(()=>{"use strict";Pr();Zdo();Cgo();Abc=ne.undiscriminatedUnion([DFr,ZRr])});var RFr,bbc=h(()=>{"use strict";Pr();Y3();V$();Drt();dT();mT();RFr=ne.object({section:ne.string(),path:ne.string().optional(),contents:ne.list(ne.lazy(()=>K$)),collapsed:G$.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:fT.optional()}).extend(nm).extend(rm)});var Ebc,Ibc=h(()=>{"use strict";Pr();y3t();g6e();b3t();A6e();Ebc=ne.object({tabs:ne.record(g5,bve).optional(),landingPage:ne.property("landing-page",h5.optional()),navigation:yve})});var xgo=h(()=>{"use strict";Zdo();emo();omo();rmo();nmo();imo();tmo();smo();dmo();l3t();Rmo();Dmo();kmo();cbc();Fmo();ubc();lbc();pbc();Imo();mmo();gmo();hmo();Amo();ymo();bmo();Emo();Rrt();vmo();V$();jmo();Nmo();zmo();Qmo();Mmo();UDr();d3t();Lmo();Vmo();_mo();Umo();qmo();Gmo();Cmo();Drt();Hmo();Kmo();Wmo();Jmo();Ymo();Xmo();Zmo();dbc();rho();cho();dho();tho();$mo();nho();gho();ngo();hho();mho();Pmo();Bmo();Igo();fho();lho();uho();pho();lkr();pkr();Aho();ugo();amo();eho();Bho();cmo();umo();xho();iho();oho();yho();lmo();igo();Cho();vho();Eho();bho();Iho();Ikr();h3t();lgo();Tho();Pho();Nho();Dho();kho();Mkr();Fho();vgo();Oho();kDr();jho();Mho();Lho();Uho();_ho();Vho();Gkr();y3t();mbc();zho();Yho();ego();tgo();pgo();g6e();$do();Rho();xmo();krt();pmo();ogo();uFr();gbc();ybc();fgo();sgo();ago();cgo();Cgo();ODr();TDr();Sho();sho();bbc();fmo();dgo();mgo();Xho();Zho();$ho();wmo();Tmo();Omo();who();Kho();Hho();Gho();Who();b3t();A6e();hgo();Pkr();Ago();ggo();CFr();qho();h6e();ygo();akr();Ego();bgo();Qho();Jho();rgo();cFr();Smo();Ibc();aho();dT();mT();A3t()});var Sgo={};$(Sgo,{AbsoluteProductPath:()=>ZRr,AgentsConfig:()=>eDr,AiChatConfig:()=>u3t,AiChatDatasource:()=>rDr,AiChatLocation:()=>nDr,AiChatModel:()=>iDr,AiChatWebsiteDatasource:()=>tDr,AiExamplesConfig:()=>oDr,AnalyticsConfig:()=>fDr,AnnouncementConfig:()=>hve,ApiReferenceConfiguration:()=>PDr,ApiReferenceEndpointConfiguration:()=>BDr,ApiReferenceLayout:()=>RDr,ApiReferenceLayoutItem:()=>W$,ApiReferenceOperationConfiguration:()=>DDr,ApiReferencePackageConfiguration:()=>FDr,ApiReferencePackageConfigurationWithOptions:()=>jDr,ApiReferenceSectionConfiguration:()=>NDr,ApiSpecConfiguration:()=>EDr,ApiSpecErrorResponseApplyTo:()=>dDr,ApiSpecErrorResponseEnsure:()=>hDr,ApiSpecErrorResponseHttpMethod:()=>mDr,ApiSpecErrorResponseSchemaSource:()=>gDr,ApiSpecErrorResponses:()=>ADr,ApiSpecImportSettings:()=>yDr,ApiSpecType:()=>bDr,Audience:()=>U$,AudienceId:()=>p3t,Availability:()=>fT,BackgroundImageConfiguration:()=>QDr,BackgroundImageThemedConfig:()=>zDr,BlogConfiguration:()=>MDr,BodyThemeConfig:()=>LDr,BreadcrumbsConfig:()=>_Dr,ChangelogConfiguration:()=>jrt,ChangelogFolderRelativePath:()=>ede,ChangelogLayout:()=>VDr,CheckConfig:()=>qDr,CheckRuleSeverity:()=>pK,CheckRulesConfig:()=>GDr,CodeBlockTheme:()=>m3t,CodeBlocksThemeConfig:()=>WDr,CollapsedStringValue:()=>IDr,CollapsedValue:()=>G$,ColorConfig:()=>vv,ColorThemedConfig:()=>HDr,ColorsConfiguration:()=>KDr,ContentAlignment:()=>JDr,CssConfig:()=>YDr,CustomDomain:()=>XDr,CustomPageAction:()=>ZDr,DocsConfiguration:()=>fbc,DocsInstance:()=>rkr,DocsSettingsConfig:()=>ukr,DocsTypographyConfig:()=>hkr,EditThisPageConfig:()=>tkr,EditThisPageLaunch:()=>$Dr,EmbeddingConfig:()=>nkr,ExperimentalConfig:()=>ykr,ExternalProduct:()=>lFr,ExternalSitemap:()=>Akr,ExternalSitemapConfig:()=>gkr,FeatureFlag:()=>f3t,FeatureFlagConfiguration:()=>wDr,FolderConfiguration:()=>PFr,FontConfig:()=>Lrt,FontConfigPath:()=>dkr,FontConfigVariant:()=>fkr,FontDisplay:()=>mkr,FontStyle:()=>Qrt,FontWeight:()=>Mrt,FooterLinksConfig:()=>bkr,FooterNavThemeConfig:()=>gFr,FullStoryAnalyticsConfig:()=>sDr,GitLibraryInputSchema:()=>kkr,GithubEditThisPageConfig:()=>ekr,GoogleAnalytics4Config:()=>aDr,GtmConfig:()=>cDr,HeaderPosition:()=>wkr,HttpSnippetLanguage:()=>ikr,HttpSnippetsConfig:()=>okr,IntegrationsConfig:()=>Ekr,IntercomConfig:()=>uDr,InternalProduct:()=>pFr,JsConfig:()=>Skr,JsConfigOptions:()=>g3t,JsFileConfig:()=>Ckr,JsFileConfigSettings:()=>vkr,JsRemoteConfig:()=>xkr,JsScriptStrategy:()=>_rt,Language:()=>gve,LanguageSwitcherThemeConfig:()=>AFr,LayoutConfig:()=>Bkr,LibraryConfig:()=>Dkr,LibraryConfiguration:()=>Qkr,LibraryInputConfiguration:()=>Nkr,LibraryLanguage:()=>jkr,LibraryName:()=>Vrt,LibraryOutputConfiguration:()=>zkr,LibraryReferenceConfiguration:()=>BFr,LibrarySlugStyle:()=>Rkr,LinkConfiguration:()=>Nrt,LogoConfiguration:()=>Lkr,MetadataConfig:()=>Vkr,NavbarDropdownConfig:()=>qkr,NavbarGithubConfig:()=>Hkr,NavbarGithubConfigWithOptions:()=>Wkr,NavbarLink:()=>Kkr,NavbarLinkConfig:()=>H$,NavigationConfig:()=>yve,NavigationItem:()=>K$,OgDynamicLogoColor:()=>_kr,PageActionOption:()=>tFr,PageActionOptions:()=>oFr,PageActionsConfig:()=>sFr,PageActionsThemeConfig:()=>yFr,PageConfiguration:()=>h5,PageDescriptionSource:()=>$Rr,PathLibraryInputSchema:()=>Fkr,PlaygroundButtonSettings:()=>vDr,PlaygroundSettings:()=>q$,PostHogConfig:()=>lDr,ProductConfig:()=>fFr,ProductConfigBase:()=>qrt,ProductFileConfig:()=>hbc,ProductPath:()=>Abc,ProductSwitcherThemeConfig:()=>bFr,ProgrammingLanguage:()=>dFr,RedirectConfig:()=>mFr,RedirectsConfiguration:()=>hFr,RelativeProductPath:()=>DFr,Role:()=>Frt,RoleId:()=>m6e,SearchSettingsConfig:()=>skr,SearchbarPlacement:()=>Tkr,SectionConfiguration:()=>RFr,SegmentConfig:()=>pDr,SidebarThemeConfig:()=>EFr,SiteSwitcherThemeConfig:()=>IFr,SkillEntry:()=>rFr,SkillsInstallCommand:()=>nFr,SkillsPageActionConfig:()=>iFr,SnippetLanguageConfiguration:()=>J3,SnippetsConfiguration:()=>xDr,SortByAvailabilityValue:()=>SDr,SwitcherPlacement:()=>Okr,TabConfig:()=>bve,TabId:()=>g5,TabVariant:()=>Ykr,TabbedNavigationConfig:()=>$kr,TabbedNavigationItem:()=>Zkr,TabbedNavigationItemWithLayout:()=>Jkr,TabbedNavigationItemWithVariants:()=>Xkr,TabsAlignment:()=>vFr,TabsPlacement:()=>Urt,TabsThemeConfig:()=>SFr,TabsThemeObjectConfig:()=>xFr,TabsThemeStyle:()=>Wrt,Target:()=>m5,ThemeConfig:()=>wFr,TitleSource:()=>zrt,TranslationConfig:()=>OFr,TranslationConfigObject:()=>TFr,TwitterCardSetting:()=>Ukr,UntabbedNavigationConfig:()=>eFr,VersionAvailability:()=>aFr,VersionConfig:()=>Grt,VersionFileConfig:()=>Ebc,VersionedSnippetLanguageConfiguration:()=>CDr,WebSocketOneofDisplay:()=>ckr,WithFeatureFlags:()=>rm,WithPermissions:()=>nm,WithViewers:()=>Ave});var vbc=h(()=>{"use strict";xgo()});var Cbc=h(()=>{"use strict";vbc();xgo()});var xQ={};$(xQ,{AbsoluteProductPath:()=>ZRr,AgentsConfig:()=>eDr,AiChatConfig:()=>u3t,AiChatDatasource:()=>rDr,AiChatLocation:()=>nDr,AiChatModel:()=>iDr,AiChatWebsiteDatasource:()=>tDr,AiExamplesConfig:()=>oDr,AnalyticsConfig:()=>fDr,AnnouncementConfig:()=>hve,ApiReferenceConfiguration:()=>PDr,ApiReferenceEndpointConfiguration:()=>BDr,ApiReferenceLayout:()=>RDr,ApiReferenceLayoutItem:()=>W$,ApiReferenceOperationConfiguration:()=>DDr,ApiReferencePackageConfiguration:()=>FDr,ApiReferencePackageConfigurationWithOptions:()=>jDr,ApiReferenceSectionConfiguration:()=>NDr,ApiSpecConfiguration:()=>EDr,ApiSpecErrorResponseApplyTo:()=>dDr,ApiSpecErrorResponseEnsure:()=>hDr,ApiSpecErrorResponseHttpMethod:()=>mDr,ApiSpecErrorResponseSchemaSource:()=>gDr,ApiSpecErrorResponses:()=>ADr,ApiSpecImportSettings:()=>yDr,ApiSpecType:()=>bDr,Audience:()=>U$,AudienceId:()=>p3t,Availability:()=>fT,BackgroundImageConfiguration:()=>QDr,BackgroundImageThemedConfig:()=>zDr,BlogConfiguration:()=>MDr,BodyThemeConfig:()=>LDr,BreadcrumbsConfig:()=>_Dr,ChangelogConfiguration:()=>jrt,ChangelogFolderRelativePath:()=>ede,ChangelogLayout:()=>VDr,CheckConfig:()=>qDr,CheckRuleSeverity:()=>pK,CheckRulesConfig:()=>GDr,CodeBlockTheme:()=>m3t,CodeBlocksThemeConfig:()=>WDr,CollapsedStringValue:()=>IDr,CollapsedValue:()=>G$,ColorConfig:()=>vv,ColorThemedConfig:()=>HDr,ColorsConfiguration:()=>KDr,ContentAlignment:()=>JDr,CssConfig:()=>YDr,CustomDomain:()=>XDr,CustomPageAction:()=>ZDr,DocsConfiguration:()=>fbc,DocsInstance:()=>rkr,DocsSettingsConfig:()=>ukr,DocsTypographyConfig:()=>hkr,EditThisPageConfig:()=>tkr,EditThisPageLaunch:()=>$Dr,EmbeddingConfig:()=>nkr,ExperimentalConfig:()=>ykr,ExternalProduct:()=>lFr,ExternalSitemap:()=>Akr,ExternalSitemapConfig:()=>gkr,FeatureFlag:()=>f3t,FeatureFlagConfiguration:()=>wDr,FolderConfiguration:()=>PFr,FontConfig:()=>Lrt,FontConfigPath:()=>dkr,FontConfigVariant:()=>fkr,FontDisplay:()=>mkr,FontStyle:()=>Qrt,FontWeight:()=>Mrt,FooterLinksConfig:()=>bkr,FooterNavThemeConfig:()=>gFr,FullStoryAnalyticsConfig:()=>sDr,GitLibraryInputSchema:()=>kkr,GithubEditThisPageConfig:()=>ekr,GoogleAnalytics4Config:()=>aDr,GtmConfig:()=>cDr,HeaderPosition:()=>wkr,HttpSnippetLanguage:()=>ikr,HttpSnippetsConfig:()=>okr,IntegrationsConfig:()=>Ekr,IntercomConfig:()=>uDr,InternalProduct:()=>pFr,JsConfig:()=>Skr,JsConfigOptions:()=>g3t,JsFileConfig:()=>Ckr,JsFileConfigSettings:()=>vkr,JsRemoteConfig:()=>xkr,JsScriptStrategy:()=>_rt,Language:()=>gve,LanguageSwitcherThemeConfig:()=>AFr,LayoutConfig:()=>Bkr,LibraryConfig:()=>Dkr,LibraryConfiguration:()=>Qkr,LibraryInputConfiguration:()=>Nkr,LibraryLanguage:()=>jkr,LibraryName:()=>Vrt,LibraryOutputConfiguration:()=>zkr,LibraryReferenceConfiguration:()=>BFr,LibrarySlugStyle:()=>Rkr,LinkConfiguration:()=>Nrt,LogoConfiguration:()=>Lkr,MetadataConfig:()=>Vkr,NavbarDropdownConfig:()=>qkr,NavbarGithubConfig:()=>Hkr,NavbarGithubConfigWithOptions:()=>Wkr,NavbarLink:()=>Kkr,NavbarLinkConfig:()=>H$,NavigationConfig:()=>yve,NavigationItem:()=>K$,OgDynamicLogoColor:()=>_kr,PageActionOption:()=>tFr,PageActionOptions:()=>oFr,PageActionsConfig:()=>sFr,PageActionsThemeConfig:()=>yFr,PageConfiguration:()=>h5,PageDescriptionSource:()=>$Rr,PathLibraryInputSchema:()=>Fkr,PlaygroundButtonSettings:()=>vDr,PlaygroundSettings:()=>q$,PostHogConfig:()=>lDr,ProductConfig:()=>fFr,ProductConfigBase:()=>qrt,ProductFileConfig:()=>hbc,ProductPath:()=>Abc,ProductSwitcherThemeConfig:()=>bFr,ProgrammingLanguage:()=>dFr,RedirectConfig:()=>mFr,RedirectsConfiguration:()=>hFr,RelativeProductPath:()=>DFr,Role:()=>Frt,RoleId:()=>m6e,SearchSettingsConfig:()=>skr,SearchbarPlacement:()=>Tkr,SectionConfiguration:()=>RFr,SegmentConfig:()=>pDr,SidebarThemeConfig:()=>EFr,SiteSwitcherThemeConfig:()=>IFr,SkillEntry:()=>rFr,SkillsInstallCommand:()=>nFr,SkillsPageActionConfig:()=>iFr,SnippetLanguageConfiguration:()=>J3,SnippetsConfiguration:()=>xDr,SortByAvailabilityValue:()=>SDr,SwitcherPlacement:()=>Okr,TabConfig:()=>bve,TabId:()=>g5,TabVariant:()=>Ykr,TabbedNavigationConfig:()=>$kr,TabbedNavigationItem:()=>Zkr,TabbedNavigationItemWithLayout:()=>Jkr,TabbedNavigationItemWithVariants:()=>Xkr,TabsAlignment:()=>vFr,TabsPlacement:()=>Urt,TabsThemeConfig:()=>SFr,TabsThemeObjectConfig:()=>xFr,TabsThemeStyle:()=>Wrt,Target:()=>m5,ThemeConfig:()=>wFr,TitleSource:()=>zrt,TranslationConfig:()=>OFr,TranslationConfigObject:()=>TFr,TwitterCardSetting:()=>Ukr,UntabbedNavigationConfig:()=>eFr,VersionAvailability:()=>aFr,VersionConfig:()=>Grt,VersionFileConfig:()=>Ebc,VersionedSnippetLanguageConfiguration:()=>CDr,WebSocketOneofDisplay:()=>ckr,WithFeatureFlags:()=>rm,WithPermissions:()=>nm,WithViewers:()=>Ave,docs:()=>Sgo});var Y3=h(()=>{"use strict";Cbc()});var xbc=h(()=>{"use strict";Ddo();WAc();YAc();Y3()});var wgo={};$(wgo,{AiChatLocation:()=>Vfo,AiChatModel:()=>Gfo,ApiReferenceLayout:()=>qfo,ApiSpecErrorResponseApplyTo:()=>Wfo,ApiSpecErrorResponseHttpMethod:()=>Hfo,ApiSpecType:()=>Kfo,Availability:()=>Jfo,BodyThemeConfig:()=>Yfo,ChangelogLayout:()=>Xfo,CheckRuleSeverity:()=>Zfo,CodeBlockTheme:()=>$fo,CollapsedStringValue:()=>edo,ContentAlignment:()=>tdo,EditThisPageLaunch:()=>rdo,FernDocsConfig:()=>Rdo,FernDocsConfigError:()=>r3t,FernDocsConfigTimeoutError:()=>n3t,FontDisplay:()=>ndo,FontStyle:()=>ido,FooterNavThemeConfig:()=>odo,HeaderPosition:()=>sdo,HttpSnippetLanguage:()=>ado,JsScriptStrategy:()=>cdo,LanguageSwitcherThemeConfig:()=>udo,LibraryLanguage:()=>ldo,LibrarySlugStyle:()=>pdo,OgDynamicLogoColor:()=>fdo,PageActionOption:()=>ddo,PageActionsThemeConfig:()=>mdo,PageDescriptionSource:()=>hdo,ProductSwitcherThemeConfig:()=>gdo,ProgrammingLanguage:()=>Ado,SearchbarPlacement:()=>ydo,Serializer:()=>xQ,SidebarThemeConfig:()=>bdo,SortByAvailabilityValue:()=>Edo,SwitcherPlacement:()=>Ido,TabsAlignment:()=>vdo,TabsPlacement:()=>Cdo,TabsThemeStyle:()=>xdo,Target:()=>Sdo,TitleSource:()=>wdo,TwitterCardSetting:()=>Tdo,VersionAvailability:()=>Odo,WebSocketOneofDisplay:()=>Pdo,docs:()=>WRr,logging:()=>Ndo,serialization:()=>xQ});var Sbc=h(()=>{"use strict";xbc();Ddo();Y3()});function uud(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}var wbc,Tbc,lud,Obc=h(()=>{"use strict";wbc={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"},Tbc=Object.keys(wbc);lud=new Set(Tbc.map(uud))});function Bbc(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(!pud.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 fud(e){let t=[];return e.forEach((r,n)=>{let i=Bbc(r);i!=null&&t.push(`settings.embedding.allowed-origins[${n}]: ${i}`)}),t}var Pbc,pud,Rbc=h(()=>{"use strict";Pbc="[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?",pud=new RegExp(`^https?://(?:\\*\\.)?${Pbc}(?:\\.${Pbc})*(?::\\d{1,5})?$`)});var Ka={};$(Ka,{DEFAULT_BLOG_TITLE:()=>Wcd,DEFAULT_CHANGELOG_TITLE:()=>qcd,DocsYmlSchemas:()=>Ufo,RawSchemas:()=>wgo,THEME_ELIGIBLE_FIELDS:()=>Tbc,THEME_ELIGIBLE_YAML_KEYS:()=>lud,THEME_FIELD_POLICIES:()=>wbc,getChangelogFolderFromNavigationItem:()=>Hcd,getChangelogFolderFromTabConfig:()=>Kcd,getEmbeddingOriginErrors:()=>fud,validateEmbeddingOrigin:()=>Bbc});var Dbc=h(()=>{"use strict";wmc();Tmc();Omc();Sbc();Obc();Rbc()});var kbc=h(()=>{"use strict"});async function J$({absolutePathToFernignore:e}){let t=(await(0,Fbc.readFile)(e)).toString();return Nbc(t)}function Nbc(e){return[lT,...e.trim().split(mud).map(t=>{let r=t.indexOf("#");return r!==-1?t.slice(0,r).trim():t.trim()}).filter(t=>t.length>0)]}var Fbc,mud,jbc=h(()=>{"use strict";Fbc=require("fs/promises");JPr();mud=/\r?\n/});function Qbc(e){return e.output?.location==="rubygems"&&e.github==null}var zbc,Mbc=h(()=>{"use strict";zbc="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 _bc({generatorInvocation:e}){return e.language==="go"?hud(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 hud(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 Lbc,Ubc=h(()=>{"use strict";Lbc={TYPESCRIPT:"typescript",JAVA:"java",PYTHON:"python",GO:"go",RUBY:"ruby",CSHARP:"csharp",SWIFT:"swift",PHP:"php",RUST:"rust",CLI:"cli"}});function Vbc(e){return e==null||!("auto-merge"in e)||e["auto-merge"]!==!0?!1:e.mode==="pull-request"}var Gbc=h(()=>{"use strict"});function qbc(e){return typeof e!="string"&&"proto"in e}var Wbc=h(()=>{"use strict"});function Hbc({rootAutomation:e,groupAutomation:t,generatorAutomation:r}){return{generate:r?.generate??t?.generate??e?.generate??kFr.generate,upgrade:r?.upgrade??t?.upgrade??e?.upgrade??kFr.upgrade,preview:r?.preview??t?.preview??e?.preview??kFr.preview,verify:r?.verify??t?.verify??e?.verify??kFr.verify}}var kFr,Kbc=h(()=>{"use strict";kFr={generate:!0,upgrade:!0,preview:!0,verify:!0}});var Jbc=h(()=>{"use strict"});var Ybc=h(()=>{"use strict"});var Xbc,Zbc=h(()=>{"use strict";Xbc={Openai:"openai",Anthropic:"anthropic",AwsBedrock:"aws-bedrock"}});var Tgo=h(()=>{"use strict";Jbc();Ybc();Zbc()});var Ogo={};$(Ogo,{ModelProvider:()=>Xbc});var $bc=h(()=>{"use strict";Tgo()});var e0c=h(()=>{"use strict"});var Pgo=h(()=>{"use strict";e0c()});var t0c={};var r0c=h(()=>{"use strict";Pgo()});var n0c=h(()=>{"use strict"});var i0c=h(()=>{"use strict"});var o0c=h(()=>{"use strict"});var s0c=h(()=>{"use strict"});var a0c=h(()=>{"use strict"});var c0c=h(()=>{"use strict"});var u0c=h(()=>{"use strict"});var l0c=h(()=>{"use strict"});var p0c=h(()=>{"use strict"});var f0c=h(()=>{"use strict"});var d0c=h(()=>{"use strict"});var m0c=h(()=>{"use strict"});var h0c=h(()=>{"use strict"});var g0c,A0c=h(()=>{"use strict";g0c={ApiKey:"api-key",RefreshToken:"refresh-token"}});var y0c=h(()=>{"use strict"});var b0c=h(()=>{"use strict"});var E0c=h(()=>{"use strict"});var I0c=h(()=>{"use strict"});var v0c=h(()=>{"use strict"});var C0c,x0c=h(()=>{"use strict";C0c={ClientCredentials:"client-credentials",AuthorizationCode:"authorization-code",DeviceCode:"device-code"}});var S0c=h(()=>{"use strict"});var w0c=h(()=>{"use strict"});var T0c=h(()=>{"use strict"});var O0c=h(()=>{"use strict"});var P0c=h(()=>{"use strict"});var B0c=h(()=>{"use strict"});var R0c=h(()=>{"use strict"});var D0c=h(()=>{"use strict"});var k0c=h(()=>{"use strict"});var F0c=h(()=>{"use strict"});var N0c=h(()=>{"use strict"});var Bgo=h(()=>{"use strict";n0c();i0c();o0c();s0c();a0c();c0c();u0c();l0c();p0c();f0c();d0c();m0c();h0c();A0c();y0c();b0c();E0c();I0c();v0c();x0c();S0c();w0c();T0c();O0c();P0c();B0c();R0c();D0c();k0c();F0c();N0c()});var Rgo={};$(Rgo,{InferredAuthTypeSchema:()=>g0c,OAuthFlowTypeSchema:()=>C0c});var j0c=h(()=>{"use strict";Bgo()});var z0c=h(()=>{"use strict"});var Q0c,M0c=h(()=>{"use strict";Q0c={InDevelopment:"in-development",PreRelease:"pre-release",Deprecated:"deprecated",GenerallyAvailable:"generally-available"}});var L0c=h(()=>{"use strict"});var Dgo=h(()=>{"use strict";z0c();M0c();L0c()});var kgo={};$(kgo,{AvailabilityStatusSchema:()=>Q0c});var _0c=h(()=>{"use strict";Dgo()});var U0c=h(()=>{"use strict"});var V0c=h(()=>{"use strict"});var G0c=h(()=>{"use strict"});var q0c=h(()=>{"use strict"});var Fgo=h(()=>{"use strict";U0c();V0c();G0c();q0c()});var W0c={};var H0c=h(()=>{"use strict";Fgo()});var K0c=h(()=>{"use strict"});var J0c=h(()=>{"use strict"});var Ngo=h(()=>{"use strict";K0c();J0c()});var Y0c={};var X0c=h(()=>{"use strict";Ngo()});var Z0c=h(()=>{"use strict"});var $0c=h(()=>{"use strict"});var eEc=h(()=>{"use strict"});var tEc=h(()=>{"use strict"});var rEc=h(()=>{"use strict"});var jgo=h(()=>{"use strict";Z0c();$0c();eEc();tEc();rEc()});var nEc={};var iEc=h(()=>{"use strict";jgo()});var oEc=h(()=>{"use strict"});var zgo=h(()=>{"use strict";oEc()});var sEc={};var aEc=h(()=>{"use strict";zgo()});var cEc=h(()=>{"use strict"});var uEc=h(()=>{"use strict"});var lEc=h(()=>{"use strict"});var Qgo=h(()=>{"use strict";cEc();uEc();lEc()});var pEc={};var fEc=h(()=>{"use strict";Qgo()});var dEc=h(()=>{"use strict"});var mEc=h(()=>{"use strict"});var Mgo=h(()=>{"use strict";dEc();mEc()});var hEc={};var gEc=h(()=>{"use strict";Mgo()});var AEc=h(()=>{"use strict"});var yEc=h(()=>{"use strict"});var bEc=h(()=>{"use strict"});var EEc=h(()=>{"use strict"});var IEc=h(()=>{"use strict"});var Lgo=h(()=>{"use strict";AEc();yEc();bEc();EEc();IEc()});var vEc={};var CEc=h(()=>{"use strict";Lgo()});var xEc=h(()=>{"use strict";j0c();Bgo();_0c();Dgo();H0c();Fgo();X0c();Ngo();iEc();jgo();aEc();zgo();fEc();Qgo();gEc();Mgo();CEc();Lgo()});var _go={};$(_go,{AvailabilityStatusSchema:()=>Q0c,InferredAuthTypeSchema:()=>g0c,OAuthFlowTypeSchema:()=>C0c,auth:()=>Rgo,availability:()=>kgo,commons:()=>W0c,encoding:()=>Y0c,environments:()=>nEc,file:()=>sEc,service:()=>pEc,types:()=>hEc,validation:()=>vEc});var SEc=h(()=>{"use strict";xEc()});var wEc=h(()=>{"use strict"});var TEc=h(()=>{"use strict"});var OEc=h(()=>{"use strict"});var PEc=h(()=>{"use strict"});var BEc=h(()=>{"use strict"});var REc=h(()=>{"use strict"});var DEc=h(()=>{"use strict"});var kEc=h(()=>{"use strict"});var FEc=h(()=>{"use strict"});var NEc=h(()=>{"use strict"});var jEc=h(()=>{"use strict"});var zEc=h(()=>{"use strict"});var QEc=h(()=>{"use strict"});var MEc,LEc=h(()=>{"use strict";MEc={Literals:"literals",Enums:"enums",EnumsCoerceableToLiterals:"enums-coerceable-to-literals"}});var _Ec=h(()=>{"use strict"});var UEc,VEc=h(()=>{"use strict";UEc={Int32:"int32",Int64:"int64",Uint32:"uint32",Uint64:"uint64"}});var GEc,qEc=h(()=>{"use strict";GEc={Minimal:"minimal",Comprehensive:"comprehensive"}});var WEc,HEc=h(()=>{"use strict";WEc={Form:"form",Json:"json"}});var KEc=h(()=>{"use strict"});var JEc=h(()=>{"use strict"});var YEc=h(()=>{"use strict"});var XEc=h(()=>{"use strict"});var ZEc=h(()=>{"use strict"});var $Ec=h(()=>{"use strict"});var eIc,tIc=h(()=>{"use strict";eIc={Java:"java",Python:"python",Go:"go",Ruby:"ruby",Csharp:"csharp",Typescript:"typescript",Php:"php",Rust:"rust",Swift:"swift"}});var rIc,nIc=h(()=>{"use strict";rIc={V1:"v1",V2:"v2"}});var iIc,oIc=h(()=>{"use strict";iIc={EnvironmentPerServer:"environment-per-server",UrlsPerEnvironment:"urls-per-environment"}});var sIc=h(()=>{"use strict"});var aIc,cIc=h(()=>{"use strict";aIc={All:"all",Untyped:"untyped"}});var uIc=h(()=>{"use strict"});var lIc,pIc=h(()=>{"use strict";lIc={Get:"get",Post:"post",Put:"put",Patch:"patch",Delete:"delete",Head:"head",Options:"options",Trace:"trace"}});var fIc=h(()=>{"use strict"});var dIc=h(()=>{"use strict"});var mIc=h(()=>{"use strict"});var hIc=h(()=>{"use strict"});var gIc=h(()=>{"use strict"});var AIc=h(()=>{"use strict"});var yIc=h(()=>{"use strict"});var bIc=h(()=>{"use strict"});var EIc=h(()=>{"use strict"});var IIc=h(()=>{"use strict"});var vIc,CIc=h(()=>{"use strict";vIc={UrlOrder:"url-order",SpecOrder:"spec-order"}});var xIc=h(()=>{"use strict"});var SIc=h(()=>{"use strict"});var wIc=h(()=>{"use strict"});var TIc=h(()=>{"use strict"});var OIc=h(()=>{"use strict"});var PIc=h(()=>{"use strict"});var BIc=h(()=>{"use strict"});var RIc,DIc=h(()=>{"use strict";RIc={Always:"always",Never:"never"}});var kIc=h(()=>{"use strict"});var FIc=h(()=>{"use strict"});var NIc=h(()=>{"use strict"});var jIc=h(()=>{"use strict"});var zIc=h(()=>{"use strict"});var QIc=h(()=>{"use strict"});var MIc,LIc=h(()=>{"use strict";MIc={V1:"v1"}});var _Ic=h(()=>{"use strict"});var UIc=h(()=>{"use strict"});var Ugo=h(()=>{"use strict";wEc();TEc();OEc();PEc();BEc();REc();DEc();kEc();FEc();NEc();jEc();zEc();QEc();LEc();_Ec();VEc();qEc();HEc();KEc();JEc();YEc();XEc();ZEc();$Ec();tIc();nIc();oIc();sIc();cIc();uIc();pIc();fIc();dIc();mIc();hIc();gIc();AIc();yIc();bIc();EIc();IIc();CIc();xIc();SIc();wIc();TIc();OIc();PIc();BIc();DIc();kIc();FIc();NIc();jIc();zIc();QIc();LIc();_Ic();UIc()});var Vgo={};$(Vgo,{CoerceConstsTo:()=>MEc,DefaultIntegerFormat:()=>UEc,ExampleStyle:()=>GEc,FormParameterEncoding:()=>WEc,Language:()=>eIc,MessageNamingSettingsSchema:()=>rIc,MultiServerStrategy:()=>iIc,OpenApiErrorResponsesApplyTo:()=>aIc,OpenApiErrorResponsesHttpMethod:()=>lIc,PathParameterOrder:()=>vIc,RemoveDiscriminantsFromSchemas:()=>RIc,UnionSettingsSchema:()=>MIc});var VIc=h(()=>{"use strict";Ugo()});var GIc=h(()=>{"use strict"});var qIc=h(()=>{"use strict"});var WIc=h(()=>{"use strict"});var HIc=h(()=>{"use strict"});var KIc=h(()=>{"use strict"});var JIc=h(()=>{"use strict"});var YIc=h(()=>{"use strict"});var XIc=h(()=>{"use strict"});var ZIc=h(()=>{"use strict"});var $Ic=h(()=>{"use strict"});var evc=h(()=>{"use strict"});var tvc,rvc=h(()=>{"use strict";tvc={Commit:"commit",Release:"release"}});var nvc=h(()=>{"use strict"});var ivc=h(()=>{"use strict"});var ovc=h(()=>{"use strict"});var svc=h(()=>{"use strict"});var avc,cvc=h(()=>{"use strict";avc={PullRequest:"pull-request",Push:"push",CommitAndRelease:"commit-and-release"}});var uvc=h(()=>{"use strict"});var lvc=h(()=>{"use strict"});var pvc=h(()=>{"use strict"});var fvc=h(()=>{"use strict"});var dvc=h(()=>{"use strict"});var mvc=h(()=>{"use strict"});var hvc=h(()=>{"use strict"});var gvc=h(()=>{"use strict"});var Avc=h(()=>{"use strict"});var yvc=h(()=>{"use strict"});var Ggo=h(()=>{"use strict";GIc();qIc();WIc();HIc();KIc();JIc();YIc();XIc();ZIc();$Ic();evc();rvc();nvc();ivc();ovc();svc();cvc();uvc();lvc();pvc();fvc();dvc();mvc();hvc();gvc();Avc();yvc()});var qgo={};$(qgo,{GithubCommitAndReleaseMode:()=>tvc,GithubSelfhostedMode:()=>avc});var bvc=h(()=>{"use strict";Ggo()});var Evc=h(()=>{"use strict"});var Ivc=h(()=>{"use strict"});var vvc,Cvc=h(()=>{"use strict";vvc={Mit:"MIT",Apache:"Apache-2.0"}});var Wgo=h(()=>{"use strict";Evc();Ivc();Cvc()});var Hgo={};$(Hgo,{GithubLicenseType:()=>vvc});var xvc=h(()=>{"use strict";Wgo()});var Svc=h(()=>{"use strict"});var Kgo=h(()=>{"use strict";Svc()});var wvc={};var Tvc=h(()=>{"use strict";Kgo()});var Ovc=h(()=>{"use strict"});var Pvc=h(()=>{"use strict"});var Jgo=h(()=>{"use strict";Ovc();Pvc()});var Bvc={};var Rvc=h(()=>{"use strict";Jgo()});var Dvc=h(()=>{"use strict";$bc();Tgo();r0c();Pgo();SEc();VIc();Ugo();bvc();Ggo();xvc();Wgo();Tvc();Kgo();Rvc();Jgo()});var kvc=h(()=>{"use strict";Dvc()});var tde,Fvc,Ygo,Xgo,L$0,Nvc=h(()=>{"use strict";tde={Debug:"debug",Info:"info",Warn:"warn",Error:"error"},Fvc={[tde.Debug]:1,[tde.Info]:2,[tde.Warn]:3,[tde.Error]:4},Ygo=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)}},Xgo=class{level;logger;silent;constructor(t){this.level=Fvc[t.level],this.logger=t.logger,this.silent=t.silent}shouldLog(t){return!this.silent&&this.level<=Fvc[t]}isDebug(){return this.shouldLog(tde.Debug)}debug(t,...r){this.isDebug()&&this.logger.debug(t,...r)}isInfo(){return this.shouldLog(tde.Info)}info(t,...r){this.isInfo()&&this.logger.info(t,...r)}isWarn(){return this.shouldLog(tde.Warn)}warn(t,...r){this.isWarn()&&this.logger.warn(t,...r)}isError(){return this.shouldLog(tde.Error)}error(t,...r){this.isError()&&this.logger.error(t,...r)}},L$0=new Xgo({level:tde.Info,logger:new Ygo,silent:!0})});var jvc=h(()=>{"use strict"});var zvc=h(()=>{"use strict";Nvc()});var Qvc=h(()=>{"use strict"});var gl,Dw=h(()=>{"use strict";gl={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 Dm(e,t){return`Expected ${t}. Received ${Aud(e)}.`}function Aud(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 q2=h(()=>{"use strict"});function hT(e){return{...e,json:Mvc(e.json),parse:Mvc(e.parse)}}function Mvc(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 L$=h(()=>{"use strict"});function HRr(e){return e.path.length===0?e.message:`${e.path.join(" -> ")}: ${e.message}`}var jdo=h(()=>{"use strict"});var Ort,zdo=h(()=>{"use strict";jdo();Ort=class extends Error{errors;constructor(t){super(t.map(HRr).join("; ")),this.errors=t,Object.setPrototypeOf(this,new.target.prototype),this.name=this.constructor.name}}});var Prt,Qdo=h(()=>{"use strict";jdo();Prt=class extends Error{errors;constructor(t){super(t.map(HRr).join("; ")),this.errors=t,Object.setPrototypeOf(this,new.target.prototype),this.name=this.constructor.name}}});function Rm(e){return{nullable:()=>$cd(e),optional:()=>Mdo(e),optionalNullable:()=>eud(e),transform:t=>Ldo(e,t),parseOrThrow:(t,r)=>{let n=e.parse(t,r);if(n.ok)return n.value;throw new Prt(n.errors)},jsonOrThrow:(t,r)=>{let n=e.json(t,r);if(n.ok)return n.value;throw new Ort(n.errors)}}}function $cd(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:()=>wu.NULLABLE};return{...t,...Rm(t)}}function Mdo(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:()=>wu.OPTIONAL};return{...t,...Rm(t)}}function eud(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:()=>wu.OPTIONAL_NULLABLE};return{...t,...Rm(t)}}function Ldo(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,...Rm(r)}}var tyc=h(()=>{"use strict";Bw();zdo();Qdo()});var CQ=h(()=>{"use strict";tyc();zdo();Qdo()});function ryc(){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:Bm(t,"bigint | number")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="bigint"?{ok:!1,errors:[{path:r,message:Bm(t,"bigint")}]}:{ok:!0,value:t},getType:()=>wu.BIGINT};return{...Rw(e),...Rm(e)}}var nyc=h(()=>{"use strict";Bw();G2();L$();CQ()});var iyc=h(()=>{"use strict";nyc()});function oyc(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="string"?{ok:!1,errors:[{path:r,message:Bm(t,"string")}]}:tud.test(t)?{ok:!0,value:new Date(t)}:{ok:!1,errors:[{path:r,message:Bm(t,"ISO 8601 date string")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>t instanceof Date?{ok:!0,value:t.toISOString()}:{ok:!1,errors:[{path:r,message:Bm(t,"Date object")}]},getType:()=>wu.DATE};return{...Rw(e),...Rm(e)}}var tud,syc=h(()=>{"use strict";Bw();G2();L$();CQ();tud=/^([+-]?\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 ayc=h(()=>{"use strict";syc()});function pT(e,t){return()=>{let r={parse:t,json:t,getType:()=>e};return{...Rw(r),...Rm(r)}}}var _$=h(()=>{"use strict";CQ();L$()});function KRr(e){let t=new Set(e);return pT(wu.ENUM,(n,{allowUnrecognizedEnumValues:i,breadcrumbsPrefix:o=[]}={})=>typeof n!="string"?{ok:!1,errors:[{path:o,message:Bm(n,"string")}]}:!t.has(n)&&!i?{ok:!1,errors:[{path:o,message:Bm(n,"enum")}]}:{ok:!0,value:n})()}var cyc=h(()=>{"use strict";Bw();_$();G2()});var _do=h(()=>{"use strict";cyc()});function uyc(e){let t=Udo(e);return{...t,...Rm(t)}}function Udo(e){return{parse:(t,r)=>Brt(e).parse(t,r),json:(t,r)=>Brt(e).json(t,r),getType:()=>Brt(e).getType()}}function Brt(e){let t=e;return t.__zurg_memoized==null&&(t.__zurg_memoized=e()),t.__zurg_memoized}var Vdo=h(()=>{"use strict";CQ()});function Gdo(e){return Object.entries(e)}var lyc=h(()=>{"use strict"});function o3t(e,t){let r=new Set(t);return Object.entries(e).reduce((n,[i,o])=>(r.has(i)&&(n[i]=o),n),{})}var qdo=h(()=>{"use strict"});function Zfe(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return t===null?!0:Object.getPrototypeOf(t)===null}var s3t=h(()=>{"use strict"});function a3t(e){return Object.keys(e)}var Wdo=h(()=>{"use strict"});function pyc(e,t){let r=[],n=[];for(let i of e)t(i)?r.push(i):n.push(i);return[r,n]}var fyc=h(()=>{"use strict"});function lK(e){return{withParsedProperties:t=>Hdo(e,t)}}function Hdo(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(rud.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(!Zfe(n))return{ok:!1,errors:[{path:i?.breadcrumbsPrefix??[],message:Bm(n,"object")}]};let o=new Set(Object.keys(t)),s=o3t(n,Object.keys(n).filter(a=>!o.has(a)));return e.json(s,i)},getType:()=>e.getType()};return{...r,...Rm(r),...lK(r)}}var rud,dyc=h(()=>{"use strict";qdo();G2();s3t();CQ();rud=Object.prototype.hasOwnProperty});var c3t=h(()=>{"use strict";dyc()});function myc(e,t){return{rawKey:e,valueSchema:t,isProperty:!0}}function $fe(e){return e.isProperty}var Kdo=h(()=>{"use strict"});function JRr(e){let t;function r(){if(t==null){t={};for(let[d,f]of Gdo(e)){let m=$fe(f)?f.rawKey:d,g=$fe(f)?f.valueSchema:f;t[m]={rawKey:m,parsedKey:d,valueSchema:g}}}return t}let n,i,o,s;function a(){if(n==null){n=[],i=[];for(let[d,f]of Gdo(e)){let m=$fe(f)?f.rawKey:d,g=$fe(f)?f.valueSchema:f;iud(g)&&(n.push(m),i.push(d))}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(([d,f])=>$fe(f)?f.rawKey:d),_getParsedProperties:()=>a3t(e),parse:(d,f)=>{let m=f?.breadcrumbsPrefix??[];return hyc({value:d,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,{...f,breadcrumbsPrefix:I})}}},unrecognizedObjectKeys:f?.unrecognizedObjectKeys,skipValidation:f?.skipValidation,breadcrumbsPrefix:m,omitUndefined:f?.omitUndefined})},json:(d,f)=>{let m=f?.breadcrumbsPrefix??[];return hyc({value:d,requiredKeys:c(),requiredKeysSet:l(),getProperty:g=>{let A=e[g];if(A!=null)return $fe(A)?{transformedKey:A.rawKey,transform:y=>{let I=[...m,g];return A.valueSchema.json(y,{...f,breadcrumbsPrefix:I})}}:{transformedKey:g,transform:y=>{let I=[...m,g];return A.json(y,{...f,breadcrumbsPrefix:I})}}},unrecognizedObjectKeys:f?.unrecognizedObjectKeys,skipValidation:f?.skipValidation,breadcrumbsPrefix:m,omitUndefined:f?.omitUndefined})},getType:()=>wu.OBJECT};return{...Rw(p),...Rm(p),...lK(p),...d6e(p)}}function hyc({value:e,requiredKeys:t,requiredKeysSet:r,getProperty:n,unrecognizedObjectKeys:i="fail",skipValidation:o=!1,breadcrumbsPrefix:s=[]}){if(!Zfe(e))return{ok:!1,errors:[{path:s,message:Bm(e,"object")}]};let a=t.length,c=[],u={};for(let l in e){if(!nud.call(e,l))continue;let p=e[l],d=n(l);if(d!=null){a>0&&r.has(l)&&a--;let f=d.transform(p);f.ok?u[d.transformedKey]=f.value:(u[l]=p,c.push(...f.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 d6e(e){return{extend:t=>{let r={_getParsedProperties:()=>[...e._getParsedProperties(),...t._getParsedProperties()],_getRawProperties:()=>[...e._getRawProperties(),...t._getRawProperties()],parse:(n,i)=>gyc({extensionKeys:t._getRawProperties(),value:n,transformBase:o=>e.parse(o,i),transformExtension:o=>t.parse(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),json:(n,i)=>gyc({extensionKeys:t._getParsedProperties(),value:n,transformBase:o=>e.json(o,i),transformExtension:o=>t.json(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),getType:()=>wu.OBJECT};return{...r,...Rm(r),...lK(r),...d6e(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:()=>wu.OBJECT};return{...n,...Rm(n),...lK(n),...d6e(n)}}}}function gyc({extensionKeys:e,value:t,transformBase:r,transformExtension:n,breadcrumbsPrefix:i=[]}){if(!Zfe(t))return{ok:!1,errors:[{path:i,message:Bm(t,"object")}]};let o=new Set(e),[s,a]=pyc(a3t(t),l=>o.has(l)),c=r(o3t(t,a)),u=n(o3t(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 iud(e){return!oud(e)}function oud(e){switch(e.getType()){case wu.ANY:case wu.UNKNOWN:case wu.OPTIONAL:case wu.OPTIONAL_NULLABLE:return!0;default:return!1}}var nud,Jdo=h(()=>{"use strict";Bw();lyc();qdo();G2();s3t();Wdo();L$();fyc();c3t();CQ();Kdo();nud=Object.prototype.hasOwnProperty});function Ayc(e){return JRr(e)}var yyc=h(()=>{"use strict";Jdo()});var Ydo=h(()=>{"use strict";Jdo();yyc();Kdo()});function byc(e){let t={...Udo(e),_getRawProperties:()=>Brt(e)._getRawProperties(),_getParsedProperties:()=>Brt(e)._getParsedProperties()};return{...t,...Rm(t),...lK(t),...d6e(t)}}var Eyc=h(()=>{"use strict";Ydo();c3t();CQ();Vdo()});var Iyc=h(()=>{"use strict";Vdo();Eyc()});function YRr(e){let t={parse:(r,n)=>vyc(r,(i,o)=>e.parse(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),json:(r,n)=>vyc(r,(i,o)=>e.json(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),getType:()=>wu.LIST};return{...Rw(t),...Rm(t)}}function vyc(e,t){if(!Array.isArray(e))return{ok:!1,errors:[{message:Bm(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 Cyc=h(()=>{"use strict";Bw();G2();L$();CQ()});var Xdo=h(()=>{"use strict";Cyc()});function xyc(e){return pT(wu.BOOLEAN_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:Bm(r,`${e.toString()}`)}]})()}var Syc=h(()=>{"use strict";Bw();_$();G2()});function wyc(e){return pT(wu.STRING_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:Bm(r,`"${e}"`)}]})()}var Tyc=h(()=>{"use strict";Bw();_$();G2()});var Oyc=h(()=>{"use strict";Syc();Tyc()});var Pyc,Byc=h(()=>{"use strict";Bw();_$();Pyc=pT(wu.ANY,e=>({ok:!0,value:e}))});var Ryc,Dyc=h(()=>{"use strict";Bw();_$();G2();Ryc=pT(wu.BOOLEAN,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="boolean"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Bm(e,"boolean")}]})});var kyc,Fyc=h(()=>{"use strict";Bw();_$();kyc=pT(wu.NEVER,(e,{breadcrumbsPrefix:t=[]}={})=>({ok:!1,errors:[{path:t,message:"Expected never"}]}))});var Nyc,jyc=h(()=>{"use strict";Bw();_$();G2();Nyc=pT(wu.NUMBER,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="number"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Bm(e,"number")}]})});var zyc,Qyc=h(()=>{"use strict";Bw();_$();G2();zyc=pT(wu.STRING,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="string"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Bm(e,"string")}]})});var Myc,Lyc=h(()=>{"use strict";Bw();_$();Myc=pT(wu.UNKNOWN,e=>({ok:!0,value:e}))});var _yc=h(()=>{"use strict";Byc();Dyc();Fyc();jyc();Qyc();Lyc()});function Uyc(e,t){let r={parse:(n,i)=>XRr({value:n,isKeyNumeric:e.getType()===wu.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)=>XRr({value:n,isKeyNumeric:e.getType()===wu.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:()=>wu.RECORD};return{...Rw(r),...Rm(r)}}function Vyc(e,t){let r={parse:(n,i)=>XRr({value:n,isKeyNumeric:e.getType()===wu.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)=>XRr({value:n,isKeyNumeric:e.getType()===wu.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:()=>wu.RECORD};return{...Rw(r),...Rm(r)}}function XRr({value:e,isKeyNumeric:t,transformKey:r,transformValue:n,breadcrumbsPrefix:i=[]}){if(!Zfe(e))return{ok:!1,errors:[{path:i,message:Bm(e,"object")}]};let o={},s=[];for(let a in e){if(!sud.call(e,a))continue;let c=e[a];if(c===void 0)continue;let u=a;if(t){let d=a.length>0?Number(a):NaN;Number.isNaN(d)||(u=d)}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 sud,Gyc=h(()=>{"use strict";Bw();G2();s3t();L$();CQ();sud=Object.prototype.hasOwnProperty});var qyc=h(()=>{"use strict";Gyc()});function Wyc(e){let t=YRr(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:Bm(n,"Set")}]},getType:()=>wu.SET};return{...Rw(r),...Rm(r)}}var Hyc=h(()=>{"use strict";Bw();G2();L$();Xdo();CQ()});var Kyc=h(()=>{"use strict";Hyc()});function Yyc(e){let t={parse:(r,n)=>Jyc((i,o)=>i.parse(r,o),e,n),json:(r,n)=>Jyc((i,o)=>i.json(r,o),e,n),getType:()=>wu.UNDISCRIMINATED_UNION};return{...Rw(t),...Rm(t)}}function Jyc(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 Xyc=h(()=>{"use strict";Bw();L$();CQ()});var Zyc=h(()=>{"use strict";Xyc()});function $yc(e,t){return{parsedDiscriminant:e,rawDiscriminant:t}}var ebc=h(()=>{"use strict"});function rbc(e,t){let r=typeof e=="string"?e:e.rawDiscriminant,n=typeof e=="string"?e:e.parsedDiscriminant,i=KRr(a3t(t)),o={parse:(s,a)=>tbc({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)=>tbc({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:()=>wu.UNION};return{...Rw(o),...Rm(o),...lK(o)}}function tbc({value:e,discriminant:t,transformedDiscriminant:r,transformDiscriminantValue:n,getAdditionalPropertiesSchema:i,allowUnrecognizedUnionMembers:o=!1,transformAdditionalProperties:s,breadcrumbsPrefix:a=[]}){if(!Zfe(e))return{ok:!1,errors:[{path:a,message:Bm(e,"object")}]};let c=e[t],u={};for(let f in e)aud.call(e,f)&&f!==t&&(u[f]=e[f]);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 d=s(u,p);return d.ok?{ok:!0,value:{[r]:c,...d.value}}:d}var aud,nbc=h(()=>{"use strict";Bw();G2();s3t();Wdo();L$();_do();c3t();CQ();aud=Object.prototype.hasOwnProperty});var ibc=h(()=>{"use strict";ebc();nbc()});var obc=h(()=>{"use strict";iyc();ayc();_do();Iyc();Xdo();Oyc();Ydo();c3t();_yc();qyc();CQ();Kyc();Zyc();ibc()});var ne={};$(ne,{JsonError:()=>Ort,ParseError:()=>Prt,any:()=>Pyc,bigint:()=>ryc,boolean:()=>Ryc,booleanLiteral:()=>xyc,date:()=>oyc,discriminant:()=>$yc,enum_:()=>KRr,getObjectLikeUtils:()=>lK,getObjectUtils:()=>d6e,getSchemaUtils:()=>Rm,isProperty:()=>$fe,lazy:()=>uyc,lazyObject:()=>byc,list:()=>YRr,never:()=>kyc,number:()=>Nyc,object:()=>JRr,objectWithoutOptionalProperties:()=>Ayc,optional:()=>Mdo,partialRecord:()=>Vyc,property:()=>myc,record:()=>Uyc,set:()=>Wyc,string:()=>zyc,stringLiteral:()=>wyc,transform:()=>Ldo,undiscriminatedUnion:()=>Yyc,union:()=>rbc,unknown:()=>Myc,withParsedProperties:()=>Hdo});var sbc=h(()=>{"use strict";obc()});var abc=h(()=>{"use strict"});var Pr=h(()=>{"use strict";XAc();ZAc();$Ac();sbc();abc()});var ZRr,Zdo=h(()=>{"use strict";Pr();ZRr=ne.object({href:ne.string()})});var $Rr,$do=h(()=>{"use strict";Pr();$Rr=ne.enum_(["description","subtitle"])});var eDr,emo=h(()=>{"use strict";Pr();$do();eDr=ne.object({pageDirective:ne.property("page-directive",ne.string().optional()),pageDescriptionSource:ne.property("page-description-source",$Rr.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 tDr,tmo=h(()=>{"use strict";Pr();tDr=ne.object({url:ne.string(),title:ne.string().optional()})});var rDr,rmo=h(()=>{"use strict";Pr();tmo();rDr=ne.undiscriminatedUnion([tDr])});var nDr,nmo=h(()=>{"use strict";Pr();nDr=ne.enum_(["docs","slack","discord"])});var iDr,imo=h(()=>{"use strict";Pr();iDr=ne.enum_(["claude-3.7","claude-4","command-a"])});var u3t,omo=h(()=>{"use strict";Pr();rmo();nmo();imo();u3t=ne.object({model:iDr.optional(),systemPrompt:ne.property("system-prompt",ne.string().optional()),location:ne.list(nDr).optional(),datasources:ne.list(rDr).optional(),maskPii:ne.property("mask-pii",ne.boolean().optional()),disclaimer:ne.string().optional()})});var oDr,smo=h(()=>{"use strict";Pr();oDr=ne.object({enabled:ne.boolean().optional(),style:ne.string().optional()})});var sDr,amo=h(()=>{"use strict";Pr();sDr=ne.object({orgId:ne.property("org-id",ne.string())})});var aDr,cmo=h(()=>{"use strict";Pr();aDr=ne.object({measurementId:ne.property("measurement-id",ne.string())})});var cDr,umo=h(()=>{"use strict";Pr();cDr=ne.object({containerId:ne.property("container-id",ne.string())})});var uDr,lmo=h(()=>{"use strict";Pr();uDr=ne.object({appId:ne.property("app-id",ne.string()),apiBase:ne.property("api-base",ne.string().optional())})});var lDr,pmo=h(()=>{"use strict";Pr();lDr=ne.object({apiKey:ne.property("api-key",ne.string()),endpoint:ne.string().optional()})});var pDr,fmo=h(()=>{"use strict";Pr();pDr=ne.object({writeKey:ne.property("write-key",ne.string())})});var fDr,dmo=h(()=>{"use strict";Pr();amo();cmo();umo();lmo();pmo();fmo();fDr=ne.object({segment:pDr.optional(),fullstory:sDr.optional(),intercom:uDr.optional(),posthog:lDr.optional(),gtm:cDr.optional(),ga4:aDr.optional()})});var hve,l3t=h(()=>{"use strict";Pr();hve=ne.object({message:ne.string()})});var dDr,mmo=h(()=>{"use strict";Pr();dDr=ne.enum_(["all","untyped"])});var mDr,hmo=h(()=>{"use strict";Pr();mDr=ne.enum_(["get","post","put","patch","delete","head","options","trace"])});var hDr,gmo=h(()=>{"use strict";Pr();hmo();hDr=ne.object({statusCode:ne.property("status-code",ne.number()),methods:ne.list(mDr).optional()})});var gDr,Amo=h(()=>{"use strict";Pr();gDr=ne.undiscriminatedUnion([ne.string(),ne.record(ne.string(),ne.unknown())])});var ADr,ymo=h(()=>{"use strict";Pr();mmo();gmo();Amo();ADr=ne.object({schema:gDr,name:ne.string().optional(),applyTo:ne.property("apply-to",dDr.optional()),ensure:ne.list(hDr).optional()})});var yDr,bmo=h(()=>{"use strict";Pr();ymo();yDr=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",ADr.optional())})});var bDr,Emo=h(()=>{"use strict";Pr();bDr=ne.enum_(["openapi","asyncapi","graphql"])});var EDr,Imo=h(()=>{"use strict";Pr();bmo();Emo();EDr=ne.object({type:bDr,path:ne.string(),namespace:ne.string().optional(),overlays:ne.string().optional(),overrides:ne.list(ne.string()).optional(),settings:yDr.optional()})});var p3t,vmo=h(()=>{"use strict";Pr();p3t=ne.string()});var U$,Rrt=h(()=>{"use strict";Pr();vmo();U$=ne.undiscriminatedUnion([p3t,ne.list(p3t)])});var fT,V$=h(()=>{"use strict";Pr();fT=ne.enum_(["stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"])});var IDr,Cmo=h(()=>{"use strict";Pr();IDr=ne.enum_(["open-by-default"])});var G$,Drt=h(()=>{"use strict";Pr();Cmo();G$=ne.undiscriminatedUnion([ne.boolean(),IDr])});var vDr,xmo=h(()=>{"use strict";Pr();vDr=ne.object({href:ne.string().optional()})});var q$,krt=h(()=>{"use strict";Pr();xmo();q$=ne.object({hidden:ne.boolean().optional(),environments:ne.list(ne.string()).optional(),button:vDr.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 CDr,Smo=h(()=>{"use strict";Pr();CDr=ne.object({version:ne.string(),package:ne.string()})});var J3,wmo=h(()=>{"use strict";Pr();Smo();J3=ne.undiscriminatedUnion([ne.string(),CDr])});var xDr,Tmo=h(()=>{"use strict";Pr();wmo();xDr=ne.object({python:J3.optional(),typescript:J3.optional(),go:J3.optional(),java:J3.optional(),ruby:J3.optional(),csharp:J3.optional(),php:J3.optional(),swift:J3.optional(),rust:J3.optional(),cli:J3.optional()})});var SDr,Omo=h(()=>{"use strict";Pr();SDr=ne.enum_(["unset","stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"])});var f3t,Pmo=h(()=>{"use strict";Pr();f3t=ne.object({flag:ne.string(),fallbackValue:ne.property("fallback-value",ne.unknown().optional()),match:ne.unknown().optional()})});var wDr,Bmo=h(()=>{"use strict";Pr();Pmo();wDr=ne.undiscriminatedUnion([ne.string(),f3t,ne.list(f3t)])});var rm,dT=h(()=>{"use strict";Pr();Bmo();rm=ne.object({featureFlag:ne.property("feature-flag",wDr.optional())})});var m6e,TDr=h(()=>{"use strict";Pr();m6e=ne.string()});var Frt,ODr=h(()=>{"use strict";Pr();TDr();Frt=ne.undiscriminatedUnion([m6e,ne.list(m6e)])});var nm,mT=h(()=>{"use strict";Pr();ODr();nm=ne.object({viewers:Frt.optional(),orphaned:ne.boolean().optional()})});var PDr,Rmo=h(()=>{"use strict";Pr();Y3();Imo();Rrt();V$();Drt();krt();Tmo();Omo();dT();mT();PDr=ne.object({api:ne.string(),apiName:ne.property("api-name",ne.string().optional()),specs:ne.list(EDr).optional(),openrpc:ne.string().optional(),audiences:U$.optional(),displayErrors:ne.property("display-errors",ne.boolean().optional()),tagDescriptionPages:ne.property("tag-description-pages",ne.boolean().optional()),snippets:xDr.optional(),postman:ne.string().optional(),summary:ne.string().optional(),layout:ne.list(ne.lazy(()=>W$)).optional(),collapsed:G$.optional(),icon:ne.string().optional(),slug:ne.string().optional(),hidden:ne.boolean().optional(),availability:fT.optional(),skipSlug:ne.property("skip-slug",ne.boolean().optional()),alphabetized:ne.boolean().optional(),sortByAvailability:ne.property("sort-by-availability",ne.list(SDr).optional()),flattened:ne.boolean().optional(),paginated:ne.boolean().optional(),playground:q$.optional()}).extend(nm).extend(rm)});var BDr,Dmo=h(()=>{"use strict";Pr();V$();krt();dT();mT();BDr=ne.object({endpoint:ne.string(),title:ne.string().optional(),slug:ne.string().optional(),icon:ne.string().optional(),hidden:ne.boolean().optional(),availability:fT.optional(),playground:q$.optional()}).extend(nm).extend(rm)});var RDr,kmo=h(()=>{"use strict";Pr();RDr=ne.enum_(["indented","cards"])});var DDr,Fmo=h(()=>{"use strict";Pr();V$();dT();mT();DDr=ne.object({operation:ne.string(),title:ne.string().optional(),slug:ne.string().optional(),hidden:ne.boolean().optional(),availability:fT.optional()}).extend(nm).extend(rm)});var m5,h6e=h(()=>{"use strict";Pr();m5=ne.enum_(["_blank","_self","_parent","_top"])});var Nrt,kDr=h(()=>{"use strict";Pr();h6e();Nrt=ne.object({link:ne.string(),href:ne.string(),icon:ne.string().optional(),target:m5.optional()})});var h5,g6e=h(()=>{"use strict";Pr();V$();dT();mT();h5=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:fT.optional()}).extend(nm).extend(rm)});var W$,cbc=h(()=>{"use strict";Pr();Y3();Dmo();Fmo();kDr();g6e();W$=ne.undiscriminatedUnion([ne.string(),ne.record(ne.string(),ne.lazy(()=>FDr)),ne.lazyObject(()=>NDr),BDr,DDr,h5,Nrt])});var FDr,ubc=h(()=>{"use strict";Pr();Y3();FDr=ne.undiscriminatedUnion([ne.list(ne.lazy(()=>W$)),ne.lazyObject(()=>jDr)])});var jDr,lbc=h(()=>{"use strict";Pr();Y3();V$();krt();dT();mT();jDr=ne.object({title:ne.string().optional(),summary:ne.string().optional(),contents:ne.list(ne.lazy(()=>W$)).optional(),availability:fT.optional(),slug:ne.string().optional(),icon:ne.string().optional(),hidden:ne.boolean().optional(),skipSlug:ne.property("skip-slug",ne.boolean().optional()),playground:q$.optional()}).extend(nm).extend(rm)});var NDr,pbc=h(()=>{"use strict";Pr();Y3();V$();Drt();krt();dT();mT();NDr=ne.object({section:ne.string(),referencedPackages:ne.property("referenced-packages",ne.list(ne.string()).optional()),summary:ne.string().optional(),contents:ne.list(ne.lazy(()=>W$)).optional(),slug:ne.string().optional(),icon:ne.string().optional(),hidden:ne.boolean().optional(),skipSlug:ne.property("skip-slug",ne.boolean().optional()),collapsed:G$.optional(),collapsible:ne.boolean().optional(),collapsedByDefault:ne.property("collapsed-by-default",ne.boolean().optional()),availability:fT.optional(),playground:q$.optional()}).extend(nm).extend(rm)});var zDr,Nmo=h(()=>{"use strict";Pr();zDr=ne.object({dark:ne.string().optional(),light:ne.string().optional()})});var QDr,jmo=h(()=>{"use strict";Pr();Nmo();QDr=ne.undiscriminatedUnion([ne.string(),zDr])});var ede,d3t=h(()=>{"use strict";Pr();ede=ne.string()});var MDr,zmo=h(()=>{"use strict";Pr();d3t();dT();mT();MDr=ne.object({blog:ede,title:ne.string().optional(),slug:ne.string().optional(),icon:ne.string().optional(),hidden:ne.boolean().optional()}).extend(nm).extend(rm)});var LDr,Qmo=h(()=>{"use strict";Pr();LDr=ne.enum_(["default","canvas"])});var _Dr,Mmo=h(()=>{"use strict";Pr();_Dr=ne.object({currentPage:ne.property("current-page",ne.boolean().optional())})});var jrt,UDr=h(()=>{"use strict";Pr();d3t();dT();mT();jrt=ne.object({changelog:ede,title:ne.string().optional(),slug:ne.string().optional(),icon:ne.string().optional(),hidden:ne.boolean().optional()}).extend(nm).extend(rm)});var VDr,Lmo=h(()=>{"use strict";Pr();VDr=ne.enum_(["timeline","classic"])});var pK,_mo=h(()=>{"use strict";Pr();pK=ne.enum_(["warn","error"])});var GDr,Umo=h(()=>{"use strict";Pr();_mo();GDr=ne.object({exampleValidation:ne.property("example-validation",pK.optional()),brokenLinks:ne.property("broken-links",pK.optional()),noNonComponentRefs:ne.property("no-non-component-refs",pK.optional()),validLocalReferences:ne.property("valid-local-references",pK.optional()),noCircularRedirects:ne.property("no-circular-redirects",pK.optional()),validDocsEndpoints:ne.property("valid-docs-endpoints",pK.optional()),missingRedirects:ne.property("missing-redirects",pK.optional()),validChangelogSlug:ne.property("valid-changelog-slug",pK.optional())})});var qDr,Vmo=h(()=>{"use strict";Pr();Umo();qDr=ne.object({rules:GDr.optional()})});var m3t,Gmo=h(()=>{"use strict";Pr();m3t=ne.enum_(["github-dark","github-dark-default","github-dark-dimmed","github-dark-high-contrast","github-light","github-light-default","github-light-high-contrast","material-theme-darker","min-dark","min-light"])});var WDr,qmo=h(()=>{"use strict";Pr();Gmo();WDr=ne.object({light:m3t.optional(),dark:m3t.optional()})});var HDr,Wmo=h(()=>{"use strict";Pr();HDr=ne.object({dark:ne.string().optional(),light:ne.string().optional()})});var vv,Hmo=h(()=>{"use strict";Pr();Wmo();vv=ne.undiscriminatedUnion([ne.string(),HDr])});var KDr,Kmo=h(()=>{"use strict";Pr();Hmo();KDr=ne.object({accentPrimary:ne.property("accent-primary",vv.optional()),accentPrimaryDeprecated:ne.property("accentPrimary",vv.optional()),background:vv.optional(),border:vv.optional(),sidebarBackground:ne.property("sidebar-background",vv.optional()),headerBackground:ne.property("header-background",vv.optional()),cardBackground:ne.property("card-background",vv.optional()),accent1:ne.property("accent-1",vv.optional()),accent2:ne.property("accent-2",vv.optional()),accent3:ne.property("accent-3",vv.optional()),accent4:ne.property("accent-4",vv.optional()),accent5:ne.property("accent-5",vv.optional()),accent6:ne.property("accent-6",vv.optional()),accent7:ne.property("accent-7",vv.optional()),accent8:ne.property("accent-8",vv.optional()),accent9:ne.property("accent-9",vv.optional()),accent10:ne.property("accent-10",vv.optional()),accent11:ne.property("accent-11",vv.optional()),accent12:ne.property("accent-12",vv.optional())})});var JDr,Jmo=h(()=>{"use strict";Pr();JDr=ne.enum_(["center","left"])});var YDr,Ymo=h(()=>{"use strict";Pr();YDr=ne.undiscriminatedUnion([ne.string(),ne.list(ne.string())])});var XDr,Xmo=h(()=>{"use strict";Pr();XDr=ne.undiscriminatedUnion([ne.string(),ne.list(ne.string())])});var ZDr,Zmo=h(()=>{"use strict";Pr();ZDr=ne.object({title:ne.string(),subtitle:ne.string().optional(),url:ne.string(),icon:ne.string().optional(),default:ne.boolean().optional()})});var $Dr,$mo=h(()=>{"use strict";Pr();$Dr=ne.enum_(["github","dashboard"])});var ekr,eho=h(()=>{"use strict";Pr();ekr=ne.object({host:ne.string().optional(),owner:ne.string(),repo:ne.string(),branch:ne.string().optional()})});var tkr,tho=h(()=>{"use strict";Pr();$mo();eho();tkr=ne.object({github:ekr.optional(),launch:$Dr.optional()})});var rkr,rho=h(()=>{"use strict";Pr();Rrt();Xmo();tho();rkr=ne.object({url:ne.string(),customDomain:ne.property("custom-domain",XDr.optional()),editThisPage:ne.property("edit-this-page",tkr.optional()),audiences:U$.optional(),multiSource:ne.property("multi-source",ne.boolean().optional())})});var nkr,nho=h(()=>{"use strict";Pr();nkr=ne.object({allowedOrigins:ne.property("allowed-origins",ne.list(ne.string()))})});var ikr,iho=h(()=>{"use strict";Pr();ikr=ne.enum_(["curl","csharp","go","java","javascript","php","python","ruby","swift","typescript"])});var okr,oho=h(()=>{"use strict";Pr();iho();okr=ne.undiscriminatedUnion([ne.boolean(),ne.list(ikr)])});var gve,h3t=h(()=>{"use strict";Pr();gve=ne.string()});var skr,sho=h(()=>{"use strict";Pr();skr=ne.object({prioritizeCurrentProduct:ne.property("prioritize-current-product",ne.boolean().optional()),defaultFilterByCurrentProduct:ne.property("default-filter-by-current-product",ne.boolean().optional())})});var zrt,akr=h(()=>{"use strict";Pr();zrt=ne.enum_(["frontmatter","filename"])});var ckr,aho=h(()=>{"use strict";Pr();ckr=ne.enum_(["flat","grouped"])});var ukr,cho=h(()=>{"use strict";Pr();nho();oho();h3t();sho();akr();aho();ukr=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:skr.optional(),httpSnippets:ne.property("http-snippets",okr.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:gve.optional(),folderTitleSource:ne.property("folder-title-source",zrt.optional()),substituteEnvVars:ne.property("substitute-env-vars",ne.boolean().optional()),websocketOneofDisplay:ne.property("websocket-oneof-display",ckr.optional()),embedding:nkr.optional(),showHeadersInExamples:ne.property("show-headers-in-examples",ne.boolean().optional()),requireAnalyticsConsent:ne.property("require-analytics-consent",ne.boolean().optional())})});var Qrt,lkr=h(()=>{"use strict";Pr();Qrt=ne.enum_(["normal","italic"])});var Mrt,pkr=h(()=>{"use strict";Pr();Mrt=ne.undiscriminatedUnion([ne.string(),ne.number()])});var fkr,uho=h(()=>{"use strict";Pr();lkr();pkr();fkr=ne.object({path:ne.string(),weight:Mrt.optional(),style:Qrt.optional()})});var dkr,lho=h(()=>{"use strict";Pr();uho();dkr=ne.undiscriminatedUnion([ne.string(),fkr])});var mkr,pho=h(()=>{"use strict";Pr();mkr=ne.enum_(["auto","block","swap","fallback","optional"])});var Lrt,fho=h(()=>{"use strict";Pr();lho();pho();lkr();pkr();Lrt=ne.object({name:ne.string().optional(),path:ne.string().optional(),weight:Mrt.optional(),style:Qrt.optional(),paths:ne.list(dkr).optional(),display:mkr.optional(),fallback:ne.list(ne.string()).optional(),fontVariationSettings:ne.property("font-variation-settings",ne.string().optional())})});var hkr,dho=h(()=>{"use strict";Pr();fho();hkr=ne.object({headingsFont:Lrt.optional(),bodyFont:Lrt.optional(),codeFont:Lrt.optional()})});var gkr,mho=h(()=>{"use strict";Pr();gkr=ne.object({url:ne.string(),locale:ne.string().optional()})});var Akr,hho=h(()=>{"use strict";Pr();mho();Akr=ne.undiscriminatedUnion([ne.string(),gkr])});var ykr,gho=h(()=>{"use strict";Pr();hho();ykr=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(Akr).optional())})});var bkr,Aho=h(()=>{"use strict";Pr();bkr=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 Ekr,yho=h(()=>{"use strict";Pr();Ekr=ne.object({intercom:ne.string().optional(),context7:ne.string().optional()})});var _rt,Ikr=h(()=>{"use strict";Pr();_rt=ne.enum_(["beforeInteractive","afterInteractive","lazyOnload"])});var vkr,bho=h(()=>{"use strict";Pr();Ikr();vkr=ne.object({path:ne.string(),strategy:_rt.optional()})});var Ckr,Eho=h(()=>{"use strict";Pr();bho();Ckr=ne.undiscriminatedUnion([ne.string(),vkr])});var xkr,Iho=h(()=>{"use strict";Pr();Ikr();xkr=ne.object({url:ne.string(),strategy:_rt.optional(),disableSri:ne.property("disable-sri",ne.boolean().optional())})});var g3t,vho=h(()=>{"use strict";Pr();Eho();Iho();g3t=ne.undiscriminatedUnion([xkr,Ckr])});var Skr,Cho=h(()=>{"use strict";Pr();vho();Skr=ne.undiscriminatedUnion([g3t,ne.list(g3t)])});var wkr,xho=h(()=>{"use strict";Pr();wkr=ne.enum_(["fixed","static"])});var Tkr,Sho=h(()=>{"use strict";Pr();Tkr=ne.enum_(["header","header-tabs","sidebar"])});var Okr,who=h(()=>{"use strict";Pr();Okr=ne.enum_(["header","sidebar"])});var Urt,Pkr=h(()=>{"use strict";Pr();Urt=ne.enum_(["header","sidebar"])});var Bkr,Tho=h(()=>{"use strict";Pr();kmo();Mmo();Lmo();Jmo();xho();Sho();who();Pkr();Bkr=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",Tkr.optional()),tabsPlacement:ne.property("tabs-placement",Urt.optional()),switcherPlacement:ne.property("switcher-placement",Okr.optional()),contentAlignment:ne.property("content-alignment",JDr.optional()),headerPosition:ne.property("header-position",wkr.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",VDr.optional()),apiReferenceLayout:ne.property("api-reference-layout",RDr.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:_Dr.optional()})});var Rkr,Oho=h(()=>{"use strict";Pr();Rkr=ne.enum_(["compact","hyphenated"])});var Dkr,Pho=h(()=>{"use strict";Pr();Oho();Dkr=ne.object({doxyfile:ne.string().optional(),includeUndocumentedMacros:ne.property("include-undocumented-macros",ne.boolean().optional()),slugStyle:ne.property("slug-style",Rkr.optional())})});var kkr,Bho=h(()=>{"use strict";Pr();kkr=ne.object({git:ne.string(),subpath:ne.string().optional(),ref:ne.string().optional()})});var Fkr,Rho=h(()=>{"use strict";Pr();Fkr=ne.object({path:ne.string()})});var Nkr,Dho=h(()=>{"use strict";Pr();Bho();Rho();Nkr=ne.undiscriminatedUnion([kkr,Fkr])});var jkr,kho=h(()=>{"use strict";Pr();jkr=ne.enum_(["python","cpp"])});var zkr,Fho=h(()=>{"use strict";Pr();zkr=ne.object({path:ne.string()})});var Qkr,Nho=h(()=>{"use strict";Pr();Pho();Dho();kho();Fho();Qkr=ne.object({input:Nkr,output:zkr,lang:jkr,config:Dkr.optional()})});var Vrt,Mkr=h(()=>{"use strict";Pr();Vrt=ne.string()});var Lkr,jho=h(()=>{"use strict";Pr();Lkr=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 _kr,zho=h(()=>{"use strict";Pr();_kr=ne.enum_(["dark","light"])});var Ukr,Qho=h(()=>{"use strict";Pr();Ukr=ne.enum_(["summary","summary_large_image","app","player"])});var Vkr,Mho=h(()=>{"use strict";Pr();zho();Qho();Vkr=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",Ukr.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",_kr.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 Ave,A3t=h(()=>{"use strict";Pr();ODr();Ave=ne.object({viewers:Frt.optional()})});var H$,Gkr=h(()=>{"use strict";Pr();h6e();A3t();H$=ne.object({href:ne.string().optional(),target:m5.optional(),url:ne.string().optional(),text:ne.string().optional(),icon:ne.string().optional(),rightIcon:ne.string().optional(),rounded:ne.boolean().optional()}).extend(Ave)});var qkr,Lho=h(()=>{"use strict";Pr();Gkr();A3t();qkr=ne.object({links:ne.list(H$),text:ne.string().optional(),icon:ne.string().optional(),rightIcon:ne.string().optional(),rounded:ne.boolean().optional()}).extend(Ave)});var Wkr,_ho=h(()=>{"use strict";Pr();h6e();A3t();Wkr=ne.object({url:ne.string(),target:m5.optional()}).extend(Ave)});var Hkr,Uho=h(()=>{"use strict";Pr();_ho();Hkr=ne.undiscriminatedUnion([ne.string(),Wkr])});var Kkr,Vho=h(()=>{"use strict";Pr();Lho();Uho();Gkr();Kkr=ne.union("type",{filled:H$,outlined:H$,minimal:H$,github:ne.object({value:Hkr}),dropdown:qkr,primary:H$,secondary:H$}).transform({transform:e=>e,untransform:e=>e})});var g5,A6e=h(()=>{"use strict";Pr();g5=ne.string()});var Jkr,Gho=h(()=>{"use strict";Pr();Y3();A6e();Jkr=ne.object({tab:g5,layout:ne.list(ne.lazy(()=>K$)).optional()})});var Ykr,qho=h(()=>{"use strict";Pr();Y3();dT();mT();Ykr=ne.object({title:ne.string(),subtitle:ne.string().optional(),icon:ne.string().optional(),layout:ne.list(ne.lazy(()=>K$)),slug:ne.string().optional(),skipSlug:ne.property("skip-slug",ne.boolean().optional()),hidden:ne.boolean().optional(),default:ne.boolean().optional()}).extend(nm).extend(rm)});var Xkr,Who=h(()=>{"use strict";Pr();A6e();qho();Xkr=ne.object({tab:g5,variants:ne.list(Ykr)})});var Zkr,Hho=h(()=>{"use strict";Pr();Gho();Who();Zkr=ne.undiscriminatedUnion([Jkr,Xkr])});var $kr,Kho=h(()=>{"use strict";Pr();Hho();$kr=ne.list(Zkr)});var eFr,Jho=h(()=>{"use strict";Pr();Y3();eFr=ne.list(ne.lazy(()=>K$))});var yve,y3t=h(()=>{"use strict";Pr();Kho();Jho();yve=ne.undiscriminatedUnion([$kr,eFr])});var tFr,Yho=h(()=>{"use strict";Pr();tFr=ne.enum_(["copy-page","view-as-markdown","ask-ai","chatgpt","claude","cursor","claude-code","vscode"])});var rFr,Xho=h(()=>{"use strict";Pr();rFr=ne.object({name:ne.string(),description:ne.string().optional(),url:ne.string().optional()})});var nFr,Zho=h(()=>{"use strict";Pr();nFr=ne.undiscriminatedUnion([ne.string(),ne.list(ne.string())])});var iFr,$ho=h(()=>{"use strict";Pr();Xho();Zho();iFr=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",nFr.optional()),skills:ne.list(rFr).optional()})});var oFr,ego=h(()=>{"use strict";Pr();Zmo();$ho();oFr=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(ZDr).optional(),skills:iFr.optional()})});var sFr,tgo=h(()=>{"use strict";Pr();Yho();ego();sFr=ne.object({default:tFr.optional(),options:oFr.optional()})});var aFr,rgo=h(()=>{"use strict";Pr();aFr=ne.enum_(["deprecated","legacy","ga","stable","beta","alpha","preview"])});var Grt,cFr=h(()=>{"use strict";Pr();l3t();Rrt();rgo();dT();mT();Grt=ne.object({displayName:ne.property("display-name",ne.string()),path:ne.string().optional(),ref:ne.string().optional(),slug:ne.string().optional(),availability:aFr.optional(),audiences:U$.optional(),hidden:ne.boolean().optional(),default:ne.boolean().optional(),announcement:hve.optional()}).extend(nm).extend(rm)});var qrt,uFr=h(()=>{"use strict";Pr();Rrt();cFr();dT();mT();qrt=ne.object({displayName:ne.property("display-name",ne.string()),subtitle:ne.string().optional(),icon:ne.string().optional(),image:ne.string().optional(),versions:ne.list(Grt).optional(),audiences:U$.optional()}).extend(nm).extend(rm)});var lFr,ngo=h(()=>{"use strict";Pr();uFr();h6e();lFr=ne.object({href:ne.string(),target:m5.optional()}).extend(qrt)});var pFr,igo=h(()=>{"use strict";Pr();l3t();uFr();pFr=ne.object({path:ne.string(),slug:ne.string().optional(),announcement:hve.optional()}).extend(qrt)});var fFr,ogo=h(()=>{"use strict";Pr();ngo();igo();fFr=ne.undiscriminatedUnion([pFr,lFr])});var dFr,sgo=h(()=>{"use strict";Pr();dFr=ne.enum_(["typescript","javascript","python","java","go","ruby","csharp","php","swift","rust","nodets","nodejs","dotnet","curl","jvm","ts","js"])});var mFr,ago=h(()=>{"use strict";Pr();mFr=ne.object({source:ne.string(),destination:ne.string(),permanent:ne.boolean().optional()})});var hFr,cgo=h(()=>{"use strict";Pr();ago();hFr=ne.undiscriminatedUnion([ne.list(mFr),ne.string(),ne.list(ne.string())])});var bve,b3t=h(()=>{"use strict";Pr();d3t();h6e();dT();mT();bve=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:m5.optional(),changelog:ede.optional(),blog:ede.optional()}).extend(nm).extend(rm)});var gFr,ugo=h(()=>{"use strict";Pr();gFr=ne.enum_(["default","minimal"])});var AFr,lgo=h(()=>{"use strict";Pr();AFr=ne.enum_(["default","minimal"])});var yFr,pgo=h(()=>{"use strict";Pr();yFr=ne.enum_(["default","toolbar"])});var bFr,fgo=h(()=>{"use strict";Pr();bFr=ne.enum_(["default","toggle","tabs"])});var EFr,dgo=h(()=>{"use strict";Pr();EFr=ne.enum_(["default","minimal"])});var IFr,mgo=h(()=>{"use strict";Pr();IFr=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 vFr,hgo=h(()=>{"use strict";Pr();vFr=ne.enum_(["left","center"])});var Wrt,CFr=h(()=>{"use strict";Pr();Wrt=ne.enum_(["default","bubble"])});var xFr,ggo=h(()=>{"use strict";Pr();hgo();Pkr();CFr();xFr=ne.object({style:Wrt.optional(),alignment:vFr.optional(),placement:Urt.optional()})});var SFr,Ago=h(()=>{"use strict";Pr();ggo();CFr();SFr=ne.undiscriminatedUnion([Wrt,xFr])});var wFr,ygo=h(()=>{"use strict";Pr();Qmo();qmo();ugo();lgo();pgo();fgo();dgo();mgo();Ago();wFr=ne.object({sidebar:EFr.optional(),body:LDr.optional(),tabs:SFr.optional(),pageActions:ne.property("page-actions",yFr.optional()),footerNav:ne.property("footer-nav",gFr.optional()),languageSwitcher:ne.property("language-switcher",AFr.optional()),productSwitcher:ne.property("product-switcher",bFr.optional()),siteSwitcher:ne.property("site-switcher",IFr.optional()),codeBlocks:ne.property("code-blocks",WDr.optional())})});var TFr,bgo=h(()=>{"use strict";Pr();h3t();TFr=ne.object({lang:gve,default:ne.boolean().optional()})});var OFr,Ego=h(()=>{"use strict";Pr();h3t();bgo();OFr=ne.undiscriminatedUnion([gve,TFr])});var fbc,dbc=h(()=>{"use strict";Pr();emo();omo();smo();dmo();l3t();jmo();UDr();Vmo();Kmo();Ymo();rho();cho();dho();gho();Aho();yho();Cho();Tho();Nho();Mkr();jho();Mho();Vho();y3t();tgo();g6e();ogo();sgo();cgo();TDr();b3t();A6e();ygo();Ego();cFr();fbc=ne.object({instances:ne.list(rkr),title:ne.string().optional(),libraries:ne.record(Vrt,Qkr).optional(),analytics:fDr.optional(),announcement:hve.optional(),roles:ne.list(m6e).optional(),tabs:ne.record(g5,bve).optional(),versions:ne.list(Grt).optional(),products:ne.list(fFr).optional(),changelog:jrt.optional(),landingPage:ne.property("landing-page",h5.optional()),navigation:yve.optional(),navbarLinks:ne.property("navbar-links",ne.list(Kkr).optional()),footerLinks:ne.property("footer-links",bkr.optional()),pageActions:ne.property("page-actions",sFr.optional()),globalTheme:ne.property("global-theme",ne.string().optional()),experimental:ykr.optional(),defaultLanguage:ne.property("default-language",dFr.optional()),languages:ne.list(ne.string()).optional(),translations:ne.list(OFr).optional(),aiChat:ne.property("ai-chat",u3t.optional()),aiSearch:ne.property("ai-search",u3t.optional()),aiExamples:ne.property("ai-examples",oDr.optional()),agents:eDr.optional(),metadata:Vkr.optional(),redirects:hFr.optional(),check:qDr.optional(),logo:Lkr.optional(),favicon:ne.string().optional(),backgroundImage:ne.property("background-image",QDr.optional()),colors:KDr.optional(),typography:hkr.optional(),layout:Bkr.optional(),settings:ukr.optional(),theme:wFr.optional(),integrations:Ekr.optional(),css:YDr.optional(),js:Skr.optional(),header:ne.string().optional(),footer:ne.string().optional()})});var PFr,Igo=h(()=>{"use strict";Pr();V$();Drt();akr();dT();mT();PFr=ne.object({folder:ne.string(),title:ne.string().optional(),titleSource:ne.property("title-source",zrt.optional()),slug:ne.string().optional(),icon:ne.string().optional(),hidden:ne.boolean().optional(),skipSlug:ne.property("skip-slug",ne.boolean().optional()),collapsed:G$.optional(),collapsible:ne.boolean().optional(),collapsedByDefault:ne.property("collapsed-by-default",ne.boolean().optional()),availability:fT.optional()}).extend(nm).extend(rm)});var BFr,vgo=h(()=>{"use strict";Pr();Mkr();dT();mT();BFr=ne.object({library:Vrt,title:ne.string().optional(),slug:ne.string().optional()}).extend(nm).extend(rm)});var K$,mbc=h(()=>{"use strict";Pr();Y3();Rmo();zmo();UDr();Igo();vgo();kDr();g6e();K$=ne.undiscriminatedUnion([h5,ne.lazyObject(()=>RFr),PDr,BFr,Nrt,jrt,MDr,PFr])});var hbc,gbc=h(()=>{"use strict";Pr();y3t();g6e();b3t();A6e();hbc=ne.object({tabs:ne.record(g5,bve).optional(),landingPage:ne.property("landing-page",h5.optional()),navigation:yve})});var DFr,Cgo=h(()=>{"use strict";Pr();dT();mT();DFr=ne.object({displayName:ne.property("display-name",ne.string()),path:ne.string(),slug:ne.string().optional()}).extend(nm).extend(rm)});var Abc,ybc=h(()=>{"use strict";Pr();Zdo();Cgo();Abc=ne.undiscriminatedUnion([DFr,ZRr])});var RFr,bbc=h(()=>{"use strict";Pr();Y3();V$();Drt();dT();mT();RFr=ne.object({section:ne.string(),path:ne.string().optional(),contents:ne.list(ne.lazy(()=>K$)),collapsed:G$.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:fT.optional()}).extend(nm).extend(rm)});var Ebc,Ibc=h(()=>{"use strict";Pr();y3t();g6e();b3t();A6e();Ebc=ne.object({tabs:ne.record(g5,bve).optional(),landingPage:ne.property("landing-page",h5.optional()),navigation:yve})});var xgo=h(()=>{"use strict";Zdo();emo();omo();rmo();nmo();imo();tmo();smo();dmo();l3t();Rmo();Dmo();kmo();cbc();Fmo();ubc();lbc();pbc();Imo();mmo();gmo();hmo();Amo();ymo();bmo();Emo();Rrt();vmo();V$();jmo();Nmo();zmo();Qmo();Mmo();UDr();d3t();Lmo();Vmo();_mo();Umo();qmo();Gmo();Cmo();Drt();Hmo();Kmo();Wmo();Jmo();Ymo();Xmo();Zmo();dbc();rho();cho();dho();tho();$mo();nho();gho();ngo();hho();mho();Pmo();Bmo();Igo();fho();lho();uho();pho();lkr();pkr();Aho();ugo();amo();eho();Bho();cmo();umo();xho();iho();oho();yho();lmo();igo();Cho();vho();Eho();bho();Iho();Ikr();h3t();lgo();Tho();Pho();Nho();Dho();kho();Mkr();Fho();vgo();Oho();kDr();jho();Mho();Lho();Uho();_ho();Vho();Gkr();y3t();mbc();zho();Yho();ego();tgo();pgo();g6e();$do();Rho();xmo();krt();pmo();ogo();uFr();gbc();ybc();fgo();sgo();ago();cgo();Cgo();ODr();TDr();Sho();sho();bbc();fmo();dgo();mgo();Xho();Zho();$ho();wmo();Tmo();Omo();who();Kho();Hho();Gho();Who();b3t();A6e();hgo();Pkr();Ago();ggo();CFr();qho();h6e();ygo();akr();Ego();bgo();Qho();Jho();rgo();cFr();Smo();Ibc();aho();dT();mT();A3t()});var Sgo={};$(Sgo,{AbsoluteProductPath:()=>ZRr,AgentsConfig:()=>eDr,AiChatConfig:()=>u3t,AiChatDatasource:()=>rDr,AiChatLocation:()=>nDr,AiChatModel:()=>iDr,AiChatWebsiteDatasource:()=>tDr,AiExamplesConfig:()=>oDr,AnalyticsConfig:()=>fDr,AnnouncementConfig:()=>hve,ApiReferenceConfiguration:()=>PDr,ApiReferenceEndpointConfiguration:()=>BDr,ApiReferenceLayout:()=>RDr,ApiReferenceLayoutItem:()=>W$,ApiReferenceOperationConfiguration:()=>DDr,ApiReferencePackageConfiguration:()=>FDr,ApiReferencePackageConfigurationWithOptions:()=>jDr,ApiReferenceSectionConfiguration:()=>NDr,ApiSpecConfiguration:()=>EDr,ApiSpecErrorResponseApplyTo:()=>dDr,ApiSpecErrorResponseEnsure:()=>hDr,ApiSpecErrorResponseHttpMethod:()=>mDr,ApiSpecErrorResponseSchemaSource:()=>gDr,ApiSpecErrorResponses:()=>ADr,ApiSpecImportSettings:()=>yDr,ApiSpecType:()=>bDr,Audience:()=>U$,AudienceId:()=>p3t,Availability:()=>fT,BackgroundImageConfiguration:()=>QDr,BackgroundImageThemedConfig:()=>zDr,BlogConfiguration:()=>MDr,BodyThemeConfig:()=>LDr,BreadcrumbsConfig:()=>_Dr,ChangelogConfiguration:()=>jrt,ChangelogFolderRelativePath:()=>ede,ChangelogLayout:()=>VDr,CheckConfig:()=>qDr,CheckRuleSeverity:()=>pK,CheckRulesConfig:()=>GDr,CodeBlockTheme:()=>m3t,CodeBlocksThemeConfig:()=>WDr,CollapsedStringValue:()=>IDr,CollapsedValue:()=>G$,ColorConfig:()=>vv,ColorThemedConfig:()=>HDr,ColorsConfiguration:()=>KDr,ContentAlignment:()=>JDr,CssConfig:()=>YDr,CustomDomain:()=>XDr,CustomPageAction:()=>ZDr,DocsConfiguration:()=>fbc,DocsInstance:()=>rkr,DocsSettingsConfig:()=>ukr,DocsTypographyConfig:()=>hkr,EditThisPageConfig:()=>tkr,EditThisPageLaunch:()=>$Dr,EmbeddingConfig:()=>nkr,ExperimentalConfig:()=>ykr,ExternalProduct:()=>lFr,ExternalSitemap:()=>Akr,ExternalSitemapConfig:()=>gkr,FeatureFlag:()=>f3t,FeatureFlagConfiguration:()=>wDr,FolderConfiguration:()=>PFr,FontConfig:()=>Lrt,FontConfigPath:()=>dkr,FontConfigVariant:()=>fkr,FontDisplay:()=>mkr,FontStyle:()=>Qrt,FontWeight:()=>Mrt,FooterLinksConfig:()=>bkr,FooterNavThemeConfig:()=>gFr,FullStoryAnalyticsConfig:()=>sDr,GitLibraryInputSchema:()=>kkr,GithubEditThisPageConfig:()=>ekr,GoogleAnalytics4Config:()=>aDr,GtmConfig:()=>cDr,HeaderPosition:()=>wkr,HttpSnippetLanguage:()=>ikr,HttpSnippetsConfig:()=>okr,IntegrationsConfig:()=>Ekr,IntercomConfig:()=>uDr,InternalProduct:()=>pFr,JsConfig:()=>Skr,JsConfigOptions:()=>g3t,JsFileConfig:()=>Ckr,JsFileConfigSettings:()=>vkr,JsRemoteConfig:()=>xkr,JsScriptStrategy:()=>_rt,Language:()=>gve,LanguageSwitcherThemeConfig:()=>AFr,LayoutConfig:()=>Bkr,LibraryConfig:()=>Dkr,LibraryConfiguration:()=>Qkr,LibraryInputConfiguration:()=>Nkr,LibraryLanguage:()=>jkr,LibraryName:()=>Vrt,LibraryOutputConfiguration:()=>zkr,LibraryReferenceConfiguration:()=>BFr,LibrarySlugStyle:()=>Rkr,LinkConfiguration:()=>Nrt,LogoConfiguration:()=>Lkr,MetadataConfig:()=>Vkr,NavbarDropdownConfig:()=>qkr,NavbarGithubConfig:()=>Hkr,NavbarGithubConfigWithOptions:()=>Wkr,NavbarLink:()=>Kkr,NavbarLinkConfig:()=>H$,NavigationConfig:()=>yve,NavigationItem:()=>K$,OgDynamicLogoColor:()=>_kr,PageActionOption:()=>tFr,PageActionOptions:()=>oFr,PageActionsConfig:()=>sFr,PageActionsThemeConfig:()=>yFr,PageConfiguration:()=>h5,PageDescriptionSource:()=>$Rr,PathLibraryInputSchema:()=>Fkr,PlaygroundButtonSettings:()=>vDr,PlaygroundSettings:()=>q$,PostHogConfig:()=>lDr,ProductConfig:()=>fFr,ProductConfigBase:()=>qrt,ProductFileConfig:()=>hbc,ProductPath:()=>Abc,ProductSwitcherThemeConfig:()=>bFr,ProgrammingLanguage:()=>dFr,RedirectConfig:()=>mFr,RedirectsConfiguration:()=>hFr,RelativeProductPath:()=>DFr,Role:()=>Frt,RoleId:()=>m6e,SearchSettingsConfig:()=>skr,SearchbarPlacement:()=>Tkr,SectionConfiguration:()=>RFr,SegmentConfig:()=>pDr,SidebarThemeConfig:()=>EFr,SiteSwitcherThemeConfig:()=>IFr,SkillEntry:()=>rFr,SkillsInstallCommand:()=>nFr,SkillsPageActionConfig:()=>iFr,SnippetLanguageConfiguration:()=>J3,SnippetsConfiguration:()=>xDr,SortByAvailabilityValue:()=>SDr,SwitcherPlacement:()=>Okr,TabConfig:()=>bve,TabId:()=>g5,TabVariant:()=>Ykr,TabbedNavigationConfig:()=>$kr,TabbedNavigationItem:()=>Zkr,TabbedNavigationItemWithLayout:()=>Jkr,TabbedNavigationItemWithVariants:()=>Xkr,TabsAlignment:()=>vFr,TabsPlacement:()=>Urt,TabsThemeConfig:()=>SFr,TabsThemeObjectConfig:()=>xFr,TabsThemeStyle:()=>Wrt,Target:()=>m5,ThemeConfig:()=>wFr,TitleSource:()=>zrt,TranslationConfig:()=>OFr,TranslationConfigObject:()=>TFr,TwitterCardSetting:()=>Ukr,UntabbedNavigationConfig:()=>eFr,VersionAvailability:()=>aFr,VersionConfig:()=>Grt,VersionFileConfig:()=>Ebc,VersionedSnippetLanguageConfiguration:()=>CDr,WebSocketOneofDisplay:()=>ckr,WithFeatureFlags:()=>rm,WithPermissions:()=>nm,WithViewers:()=>Ave});var vbc=h(()=>{"use strict";xgo()});var Cbc=h(()=>{"use strict";vbc();xgo()});var xQ={};$(xQ,{AbsoluteProductPath:()=>ZRr,AgentsConfig:()=>eDr,AiChatConfig:()=>u3t,AiChatDatasource:()=>rDr,AiChatLocation:()=>nDr,AiChatModel:()=>iDr,AiChatWebsiteDatasource:()=>tDr,AiExamplesConfig:()=>oDr,AnalyticsConfig:()=>fDr,AnnouncementConfig:()=>hve,ApiReferenceConfiguration:()=>PDr,ApiReferenceEndpointConfiguration:()=>BDr,ApiReferenceLayout:()=>RDr,ApiReferenceLayoutItem:()=>W$,ApiReferenceOperationConfiguration:()=>DDr,ApiReferencePackageConfiguration:()=>FDr,ApiReferencePackageConfigurationWithOptions:()=>jDr,ApiReferenceSectionConfiguration:()=>NDr,ApiSpecConfiguration:()=>EDr,ApiSpecErrorResponseApplyTo:()=>dDr,ApiSpecErrorResponseEnsure:()=>hDr,ApiSpecErrorResponseHttpMethod:()=>mDr,ApiSpecErrorResponseSchemaSource:()=>gDr,ApiSpecErrorResponses:()=>ADr,ApiSpecImportSettings:()=>yDr,ApiSpecType:()=>bDr,Audience:()=>U$,AudienceId:()=>p3t,Availability:()=>fT,BackgroundImageConfiguration:()=>QDr,BackgroundImageThemedConfig:()=>zDr,BlogConfiguration:()=>MDr,BodyThemeConfig:()=>LDr,BreadcrumbsConfig:()=>_Dr,ChangelogConfiguration:()=>jrt,ChangelogFolderRelativePath:()=>ede,ChangelogLayout:()=>VDr,CheckConfig:()=>qDr,CheckRuleSeverity:()=>pK,CheckRulesConfig:()=>GDr,CodeBlockTheme:()=>m3t,CodeBlocksThemeConfig:()=>WDr,CollapsedStringValue:()=>IDr,CollapsedValue:()=>G$,ColorConfig:()=>vv,ColorThemedConfig:()=>HDr,ColorsConfiguration:()=>KDr,ContentAlignment:()=>JDr,CssConfig:()=>YDr,CustomDomain:()=>XDr,CustomPageAction:()=>ZDr,DocsConfiguration:()=>fbc,DocsInstance:()=>rkr,DocsSettingsConfig:()=>ukr,DocsTypographyConfig:()=>hkr,EditThisPageConfig:()=>tkr,EditThisPageLaunch:()=>$Dr,EmbeddingConfig:()=>nkr,ExperimentalConfig:()=>ykr,ExternalProduct:()=>lFr,ExternalSitemap:()=>Akr,ExternalSitemapConfig:()=>gkr,FeatureFlag:()=>f3t,FeatureFlagConfiguration:()=>wDr,FolderConfiguration:()=>PFr,FontConfig:()=>Lrt,FontConfigPath:()=>dkr,FontConfigVariant:()=>fkr,FontDisplay:()=>mkr,FontStyle:()=>Qrt,FontWeight:()=>Mrt,FooterLinksConfig:()=>bkr,FooterNavThemeConfig:()=>gFr,FullStoryAnalyticsConfig:()=>sDr,GitLibraryInputSchema:()=>kkr,GithubEditThisPageConfig:()=>ekr,GoogleAnalytics4Config:()=>aDr,GtmConfig:()=>cDr,HeaderPosition:()=>wkr,HttpSnippetLanguage:()=>ikr,HttpSnippetsConfig:()=>okr,IntegrationsConfig:()=>Ekr,IntercomConfig:()=>uDr,InternalProduct:()=>pFr,JsConfig:()=>Skr,JsConfigOptions:()=>g3t,JsFileConfig:()=>Ckr,JsFileConfigSettings:()=>vkr,JsRemoteConfig:()=>xkr,JsScriptStrategy:()=>_rt,Language:()=>gve,LanguageSwitcherThemeConfig:()=>AFr,LayoutConfig:()=>Bkr,LibraryConfig:()=>Dkr,LibraryConfiguration:()=>Qkr,LibraryInputConfiguration:()=>Nkr,LibraryLanguage:()=>jkr,LibraryName:()=>Vrt,LibraryOutputConfiguration:()=>zkr,LibraryReferenceConfiguration:()=>BFr,LibrarySlugStyle:()=>Rkr,LinkConfiguration:()=>Nrt,LogoConfiguration:()=>Lkr,MetadataConfig:()=>Vkr,NavbarDropdownConfig:()=>qkr,NavbarGithubConfig:()=>Hkr,NavbarGithubConfigWithOptions:()=>Wkr,NavbarLink:()=>Kkr,NavbarLinkConfig:()=>H$,NavigationConfig:()=>yve,NavigationItem:()=>K$,OgDynamicLogoColor:()=>_kr,PageActionOption:()=>tFr,PageActionOptions:()=>oFr,PageActionsConfig:()=>sFr,PageActionsThemeConfig:()=>yFr,PageConfiguration:()=>h5,PageDescriptionSource:()=>$Rr,PathLibraryInputSchema:()=>Fkr,PlaygroundButtonSettings:()=>vDr,PlaygroundSettings:()=>q$,PostHogConfig:()=>lDr,ProductConfig:()=>fFr,ProductConfigBase:()=>qrt,ProductFileConfig:()=>hbc,ProductPath:()=>Abc,ProductSwitcherThemeConfig:()=>bFr,ProgrammingLanguage:()=>dFr,RedirectConfig:()=>mFr,RedirectsConfiguration:()=>hFr,RelativeProductPath:()=>DFr,Role:()=>Frt,RoleId:()=>m6e,SearchSettingsConfig:()=>skr,SearchbarPlacement:()=>Tkr,SectionConfiguration:()=>RFr,SegmentConfig:()=>pDr,SidebarThemeConfig:()=>EFr,SiteSwitcherThemeConfig:()=>IFr,SkillEntry:()=>rFr,SkillsInstallCommand:()=>nFr,SkillsPageActionConfig:()=>iFr,SnippetLanguageConfiguration:()=>J3,SnippetsConfiguration:()=>xDr,SortByAvailabilityValue:()=>SDr,SwitcherPlacement:()=>Okr,TabConfig:()=>bve,TabId:()=>g5,TabVariant:()=>Ykr,TabbedNavigationConfig:()=>$kr,TabbedNavigationItem:()=>Zkr,TabbedNavigationItemWithLayout:()=>Jkr,TabbedNavigationItemWithVariants:()=>Xkr,TabsAlignment:()=>vFr,TabsPlacement:()=>Urt,TabsThemeConfig:()=>SFr,TabsThemeObjectConfig:()=>xFr,TabsThemeStyle:()=>Wrt,Target:()=>m5,ThemeConfig:()=>wFr,TitleSource:()=>zrt,TranslationConfig:()=>OFr,TranslationConfigObject:()=>TFr,TwitterCardSetting:()=>Ukr,UntabbedNavigationConfig:()=>eFr,VersionAvailability:()=>aFr,VersionConfig:()=>Grt,VersionFileConfig:()=>Ebc,VersionedSnippetLanguageConfiguration:()=>CDr,WebSocketOneofDisplay:()=>ckr,WithFeatureFlags:()=>rm,WithPermissions:()=>nm,WithViewers:()=>Ave,docs:()=>Sgo});var Y3=h(()=>{"use strict";Cbc()});var xbc=h(()=>{"use strict";Ddo();WAc();YAc();Y3()});var wgo={};$(wgo,{AiChatLocation:()=>Vfo,AiChatModel:()=>Gfo,ApiReferenceLayout:()=>qfo,ApiSpecErrorResponseApplyTo:()=>Wfo,ApiSpecErrorResponseHttpMethod:()=>Hfo,ApiSpecType:()=>Kfo,Availability:()=>Jfo,BodyThemeConfig:()=>Yfo,ChangelogLayout:()=>Xfo,CheckRuleSeverity:()=>Zfo,CodeBlockTheme:()=>$fo,CollapsedStringValue:()=>edo,ContentAlignment:()=>tdo,EditThisPageLaunch:()=>rdo,FernDocsConfig:()=>Rdo,FernDocsConfigError:()=>r3t,FernDocsConfigTimeoutError:()=>n3t,FontDisplay:()=>ndo,FontStyle:()=>ido,FooterNavThemeConfig:()=>odo,HeaderPosition:()=>sdo,HttpSnippetLanguage:()=>ado,JsScriptStrategy:()=>cdo,LanguageSwitcherThemeConfig:()=>udo,LibraryLanguage:()=>ldo,LibrarySlugStyle:()=>pdo,OgDynamicLogoColor:()=>fdo,PageActionOption:()=>ddo,PageActionsThemeConfig:()=>mdo,PageDescriptionSource:()=>hdo,ProductSwitcherThemeConfig:()=>gdo,ProgrammingLanguage:()=>Ado,SearchbarPlacement:()=>ydo,Serializer:()=>xQ,SidebarThemeConfig:()=>bdo,SortByAvailabilityValue:()=>Edo,SwitcherPlacement:()=>Ido,TabsAlignment:()=>vdo,TabsPlacement:()=>Cdo,TabsThemeStyle:()=>xdo,Target:()=>Sdo,TitleSource:()=>wdo,TwitterCardSetting:()=>Tdo,VersionAvailability:()=>Odo,WebSocketOneofDisplay:()=>Pdo,docs:()=>WRr,logging:()=>Ndo,serialization:()=>xQ});var Sbc=h(()=>{"use strict";xbc();Ddo();Y3()});function uud(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}var wbc,Tbc,lud,Obc=h(()=>{"use strict";wbc={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"},Tbc=Object.keys(wbc);lud=new Set(Tbc.map(uud))});function Bbc(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(!pud.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 fud(e){let t=[];return e.forEach((r,n)=>{let i=Bbc(r);i!=null&&t.push(`settings.embedding.allowed-origins[${n}]: ${i}`)}),t}var Pbc,pud,Rbc=h(()=>{"use strict";Pbc="[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?",pud=new RegExp(`^https?://(?:\\*\\.)?${Pbc}(?:\\.${Pbc})*(?::\\d{1,5})?$`)});var Ka={};$(Ka,{DEFAULT_BLOG_TITLE:()=>Wcd,DEFAULT_CHANGELOG_TITLE:()=>qcd,DocsYmlSchemas:()=>Ufo,RawSchemas:()=>wgo,THEME_ELIGIBLE_FIELDS:()=>Tbc,THEME_ELIGIBLE_YAML_KEYS:()=>lud,THEME_FIELD_POLICIES:()=>wbc,getChangelogFolderFromNavigationItem:()=>Hcd,getChangelogFolderFromTabConfig:()=>Kcd,getEmbeddingOriginErrors:()=>fud,validateEmbeddingOrigin:()=>Bbc});var Dbc=h(()=>{"use strict";wmc();Tmc();Omc();Sbc();Obc();Rbc()});var kbc=h(()=>{"use strict"});async function J$({absolutePathToFernignore:e}){let t=(await(0,Fbc.readFile)(e)).toString();return Nbc(t)}function Nbc(e){return[lT,...e.trim().split(mud).map(t=>{let r=t.indexOf("#");return r!==-1?t.slice(0,r).trim():t.trim()}).filter(t=>t.length>0)]}var Fbc,mud,jbc=h(()=>{"use strict";Fbc=require("fs/promises");JPr();mud=/\r?\n/});function Qbc(e){return e.output?.location==="rubygems"&&e.github==null}var zbc,Mbc=h(()=>{"use strict";zbc="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 _bc({generatorInvocation:e}){return e.language==="go"?hud(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 hud(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 Lbc,Ubc=h(()=>{"use strict";Lbc={TYPESCRIPT:"typescript",JAVA:"java",PYTHON:"python",GO:"go",RUBY:"ruby",CSHARP:"csharp",SWIFT:"swift",PHP:"php",RUST:"rust",CLI:"cli"}});function Vbc(e){return e==null||!("auto-merge"in e)||e["auto-merge"]!==!0?!1:e.mode==="pull-request"}var Gbc=h(()=>{"use strict"});function qbc(e){return typeof e!="string"&&"proto"in e}var Wbc=h(()=>{"use strict"});function Hbc({rootAutomation:e,groupAutomation:t,generatorAutomation:r}){return{generate:r?.generate??t?.generate??e?.generate??kFr.generate,upgrade:r?.upgrade??t?.upgrade??e?.upgrade??kFr.upgrade,preview:r?.preview??t?.preview??e?.preview??kFr.preview,verify:r?.verify??t?.verify??e?.verify??kFr.verify}}var kFr,Kbc=h(()=>{"use strict";kFr={generate:!0,upgrade:!0,preview:!0,verify:!0}});var Jbc=h(()=>{"use strict"});var Ybc=h(()=>{"use strict"});var Xbc,Zbc=h(()=>{"use strict";Xbc={Openai:"openai",Anthropic:"anthropic",AwsBedrock:"aws-bedrock"}});var Tgo=h(()=>{"use strict";Jbc();Ybc();Zbc()});var Ogo={};$(Ogo,{ModelProvider:()=>Xbc});var $bc=h(()=>{"use strict";Tgo()});var e0c=h(()=>{"use strict"});var Pgo=h(()=>{"use strict";e0c()});var t0c={};var r0c=h(()=>{"use strict";Pgo()});var n0c=h(()=>{"use strict"});var i0c=h(()=>{"use strict"});var o0c=h(()=>{"use strict"});var s0c=h(()=>{"use strict"});var a0c=h(()=>{"use strict"});var c0c=h(()=>{"use strict"});var u0c=h(()=>{"use strict"});var l0c=h(()=>{"use strict"});var p0c=h(()=>{"use strict"});var f0c=h(()=>{"use strict"});var d0c=h(()=>{"use strict"});var m0c=h(()=>{"use strict"});var h0c=h(()=>{"use strict"});var g0c,A0c=h(()=>{"use strict";g0c={ApiKey:"api-key",RefreshToken:"refresh-token"}});var y0c=h(()=>{"use strict"});var b0c=h(()=>{"use strict"});var E0c=h(()=>{"use strict"});var I0c=h(()=>{"use strict"});var v0c=h(()=>{"use strict"});var C0c,x0c=h(()=>{"use strict";C0c={ClientCredentials:"client-credentials",AuthorizationCode:"authorization-code",DeviceCode:"device-code"}});var S0c=h(()=>{"use strict"});var w0c=h(()=>{"use strict"});var T0c=h(()=>{"use strict"});var O0c=h(()=>{"use strict"});var P0c=h(()=>{"use strict"});var B0c=h(()=>{"use strict"});var R0c=h(()=>{"use strict"});var D0c=h(()=>{"use strict"});var k0c=h(()=>{"use strict"});var F0c=h(()=>{"use strict"});var N0c=h(()=>{"use strict"});var Bgo=h(()=>{"use strict";n0c();i0c();o0c();s0c();a0c();c0c();u0c();l0c();p0c();f0c();d0c();m0c();h0c();A0c();y0c();b0c();E0c();I0c();v0c();x0c();S0c();w0c();T0c();O0c();P0c();B0c();R0c();D0c();k0c();F0c();N0c()});var Rgo={};$(Rgo,{InferredAuthTypeSchema:()=>g0c,OAuthFlowTypeSchema:()=>C0c});var j0c=h(()=>{"use strict";Bgo()});var z0c=h(()=>{"use strict"});var Q0c,M0c=h(()=>{"use strict";Q0c={InDevelopment:"in-development",PreRelease:"pre-release",Deprecated:"deprecated",GenerallyAvailable:"generally-available"}});var L0c=h(()=>{"use strict"});var Dgo=h(()=>{"use strict";z0c();M0c();L0c()});var kgo={};$(kgo,{AvailabilityStatusSchema:()=>Q0c});var _0c=h(()=>{"use strict";Dgo()});var U0c=h(()=>{"use strict"});var V0c=h(()=>{"use strict"});var G0c=h(()=>{"use strict"});var q0c=h(()=>{"use strict"});var Fgo=h(()=>{"use strict";U0c();V0c();G0c();q0c()});var W0c={};var H0c=h(()=>{"use strict";Fgo()});var K0c=h(()=>{"use strict"});var J0c=h(()=>{"use strict"});var Ngo=h(()=>{"use strict";K0c();J0c()});var Y0c={};var X0c=h(()=>{"use strict";Ngo()});var Z0c=h(()=>{"use strict"});var $0c=h(()=>{"use strict"});var eEc=h(()=>{"use strict"});var tEc=h(()=>{"use strict"});var rEc=h(()=>{"use strict"});var jgo=h(()=>{"use strict";Z0c();$0c();eEc();tEc();rEc()});var nEc={};var iEc=h(()=>{"use strict";jgo()});var oEc=h(()=>{"use strict"});var zgo=h(()=>{"use strict";oEc()});var sEc={};var aEc=h(()=>{"use strict";zgo()});var cEc=h(()=>{"use strict"});var uEc=h(()=>{"use strict"});var lEc=h(()=>{"use strict"});var Qgo=h(()=>{"use strict";cEc();uEc();lEc()});var pEc={};var fEc=h(()=>{"use strict";Qgo()});var dEc=h(()=>{"use strict"});var mEc=h(()=>{"use strict"});var Mgo=h(()=>{"use strict";dEc();mEc()});var hEc={};var gEc=h(()=>{"use strict";Mgo()});var AEc=h(()=>{"use strict"});var yEc=h(()=>{"use strict"});var bEc=h(()=>{"use strict"});var EEc=h(()=>{"use strict"});var IEc=h(()=>{"use strict"});var Lgo=h(()=>{"use strict";AEc();yEc();bEc();EEc();IEc()});var vEc={};var CEc=h(()=>{"use strict";Lgo()});var xEc=h(()=>{"use strict";j0c();Bgo();_0c();Dgo();H0c();Fgo();X0c();Ngo();iEc();jgo();aEc();zgo();fEc();Qgo();gEc();Mgo();CEc();Lgo()});var _go={};$(_go,{AvailabilityStatusSchema:()=>Q0c,InferredAuthTypeSchema:()=>g0c,OAuthFlowTypeSchema:()=>C0c,auth:()=>Rgo,availability:()=>kgo,commons:()=>W0c,encoding:()=>Y0c,environments:()=>nEc,file:()=>sEc,service:()=>pEc,types:()=>hEc,validation:()=>vEc});var SEc=h(()=>{"use strict";xEc()});var wEc=h(()=>{"use strict"});var TEc=h(()=>{"use strict"});var OEc=h(()=>{"use strict"});var PEc=h(()=>{"use strict"});var BEc=h(()=>{"use strict"});var REc=h(()=>{"use strict"});var DEc=h(()=>{"use strict"});var kEc=h(()=>{"use strict"});var FEc=h(()=>{"use strict"});var NEc=h(()=>{"use strict"});var jEc=h(()=>{"use strict"});var zEc=h(()=>{"use strict"});var QEc=h(()=>{"use strict"});var MEc,LEc=h(()=>{"use strict";MEc={Literals:"literals",Enums:"enums",EnumsCoerceableToLiterals:"enums-coerceable-to-literals"}});var _Ec=h(()=>{"use strict"});var UEc,VEc=h(()=>{"use strict";UEc={Int32:"int32",Int64:"int64",Uint32:"uint32",Uint64:"uint64"}});var GEc,qEc=h(()=>{"use strict";GEc={Minimal:"minimal",Comprehensive:"comprehensive"}});var WEc,HEc=h(()=>{"use strict";WEc={Form:"form",Json:"json"}});var KEc=h(()=>{"use strict"});var JEc=h(()=>{"use strict"});var YEc=h(()=>{"use strict"});var XEc=h(()=>{"use strict"});var ZEc=h(()=>{"use strict"});var $Ec=h(()=>{"use strict"});var eIc,tIc=h(()=>{"use strict";eIc={Java:"java",Python:"python",Go:"go",Ruby:"ruby",Csharp:"csharp",Typescript:"typescript",Php:"php",Rust:"rust",Swift:"swift"}});var rIc,nIc=h(()=>{"use strict";rIc={V1:"v1",V2:"v2"}});var iIc,oIc=h(()=>{"use strict";iIc={EnvironmentPerServer:"environment-per-server",UrlsPerEnvironment:"urls-per-environment"}});var sIc=h(()=>{"use strict"});var aIc,cIc=h(()=>{"use strict";aIc={All:"all",Untyped:"untyped"}});var uIc=h(()=>{"use strict"});var lIc,pIc=h(()=>{"use strict";lIc={Get:"get",Post:"post",Put:"put",Patch:"patch",Delete:"delete",Head:"head",Options:"options",Trace:"trace"}});var fIc=h(()=>{"use strict"});var dIc=h(()=>{"use strict"});var mIc=h(()=>{"use strict"});var hIc=h(()=>{"use strict"});var gIc=h(()=>{"use strict"});var AIc=h(()=>{"use strict"});var yIc=h(()=>{"use strict"});var bIc=h(()=>{"use strict"});var EIc=h(()=>{"use strict"});var IIc=h(()=>{"use strict"});var vIc,CIc=h(()=>{"use strict";vIc={UrlOrder:"url-order",SpecOrder:"spec-order"}});var xIc=h(()=>{"use strict"});var SIc=h(()=>{"use strict"});var wIc=h(()=>{"use strict"});var TIc=h(()=>{"use strict"});var OIc=h(()=>{"use strict"});var PIc=h(()=>{"use strict"});var BIc=h(()=>{"use strict"});var RIc,DIc=h(()=>{"use strict";RIc={Always:"always",Never:"never"}});var kIc=h(()=>{"use strict"});var FIc=h(()=>{"use strict"});var NIc=h(()=>{"use strict"});var jIc=h(()=>{"use strict"});var zIc=h(()=>{"use strict"});var QIc=h(()=>{"use strict"});var MIc,LIc=h(()=>{"use strict";MIc={V1:"v1"}});var _Ic=h(()=>{"use strict"});var UIc=h(()=>{"use strict"});var Ugo=h(()=>{"use strict";wEc();TEc();OEc();PEc();BEc();REc();DEc();kEc();FEc();NEc();jEc();zEc();QEc();LEc();_Ec();VEc();qEc();HEc();KEc();JEc();YEc();XEc();ZEc();$Ec();tIc();nIc();oIc();sIc();cIc();uIc();pIc();fIc();dIc();mIc();hIc();gIc();AIc();yIc();bIc();EIc();IIc();CIc();xIc();SIc();wIc();TIc();OIc();PIc();BIc();DIc();kIc();FIc();NIc();jIc();zIc();QIc();LIc();_Ic();UIc()});var Vgo={};$(Vgo,{CoerceConstsTo:()=>MEc,DefaultIntegerFormat:()=>UEc,ExampleStyle:()=>GEc,FormParameterEncoding:()=>WEc,Language:()=>eIc,MessageNamingSettingsSchema:()=>rIc,MultiServerStrategy:()=>iIc,OpenApiErrorResponsesApplyTo:()=>aIc,OpenApiErrorResponsesHttpMethod:()=>lIc,PathParameterOrder:()=>vIc,RemoveDiscriminantsFromSchemas:()=>RIc,UnionSettingsSchema:()=>MIc});var VIc=h(()=>{"use strict";Ugo()});var GIc=h(()=>{"use strict"});var qIc=h(()=>{"use strict"});var WIc=h(()=>{"use strict"});var HIc=h(()=>{"use strict"});var KIc=h(()=>{"use strict"});var JIc=h(()=>{"use strict"});var YIc=h(()=>{"use strict"});var XIc=h(()=>{"use strict"});var ZIc=h(()=>{"use strict"});var $Ic=h(()=>{"use strict"});var evc=h(()=>{"use strict"});var tvc,rvc=h(()=>{"use strict";tvc={Commit:"commit",Release:"release"}});var nvc=h(()=>{"use strict"});var ivc=h(()=>{"use strict"});var ovc=h(()=>{"use strict"});var svc=h(()=>{"use strict"});var avc,cvc=h(()=>{"use strict";avc={PullRequest:"pull-request",Push:"push",CommitAndRelease:"commit-and-release"}});var uvc=h(()=>{"use strict"});var lvc=h(()=>{"use strict"});var pvc=h(()=>{"use strict"});var fvc=h(()=>{"use strict"});var dvc=h(()=>{"use strict"});var mvc=h(()=>{"use strict"});var hvc=h(()=>{"use strict"});var gvc=h(()=>{"use strict"});var Avc=h(()=>{"use strict"});var yvc=h(()=>{"use strict"});var Ggo=h(()=>{"use strict";GIc();qIc();WIc();HIc();KIc();JIc();YIc();XIc();ZIc();$Ic();evc();rvc();nvc();ivc();ovc();svc();cvc();uvc();lvc();pvc();fvc();dvc();mvc();hvc();gvc();Avc();yvc()});var qgo={};$(qgo,{GithubCommitAndReleaseMode:()=>tvc,GithubSelfhostedMode:()=>avc});var bvc=h(()=>{"use strict";Ggo()});var Evc=h(()=>{"use strict"});var Ivc=h(()=>{"use strict"});var vvc,Cvc=h(()=>{"use strict";vvc={Mit:"MIT",Apache:"Apache-2.0"}});var Wgo=h(()=>{"use strict";Evc();Ivc();Cvc()});var Hgo={};$(Hgo,{GithubLicenseType:()=>vvc});var xvc=h(()=>{"use strict";Wgo()});var Svc=h(()=>{"use strict"});var Kgo=h(()=>{"use strict";Svc()});var wvc={};var Tvc=h(()=>{"use strict";Kgo()});var Ovc=h(()=>{"use strict"});var Pvc=h(()=>{"use strict"});var Jgo=h(()=>{"use strict";Ovc();Pvc()});var Bvc={};var Rvc=h(()=>{"use strict";Jgo()});var Dvc=h(()=>{"use strict";$bc();Tgo();r0c();Pgo();SEc();VIc();Ugo();bvc();Ggo();xvc();Wgo();Tvc();Kgo();Rvc();Jgo()});var kvc=h(()=>{"use strict";Dvc()});var tde,Fvc,Ygo,Xgo,L$0,Nvc=h(()=>{"use strict";tde={Debug:"debug",Info:"info",Warn:"warn",Error:"error"},Fvc={[tde.Debug]:1,[tde.Info]:2,[tde.Warn]:3,[tde.Error]:4},Ygo=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)}},Xgo=class{level;logger;silent;constructor(t){this.level=Fvc[t.level],this.logger=t.logger,this.silent=t.silent}shouldLog(t){return!this.silent&&this.level<=Fvc[t]}isDebug(){return this.shouldLog(tde.Debug)}debug(t,...r){this.isDebug()&&this.logger.debug(t,...r)}isInfo(){return this.shouldLog(tde.Info)}info(t,...r){this.isInfo()&&this.logger.info(t,...r)}isWarn(){return this.shouldLog(tde.Warn)}warn(t,...r){this.isWarn()&&this.logger.warn(t,...r)}isError(){return this.shouldLog(tde.Error)}error(t,...r){this.isError()&&this.logger.error(t,...r)}},L$0=new Xgo({level:tde.Info,logger:new Ygo,silent:!0})});var jvc=h(()=>{"use strict"});var zvc=h(()=>{"use strict";Nvc()});var Qvc=h(()=>{"use strict"});var gl,Dw=h(()=>{"use strict";gl={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 Dm(e,t){return`Expected ${t}. Received ${Aud(e)}.`}function Aud(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 q2=h(()=>{"use strict"});function hT(e){return{...e,json:Mvc(e.json),parse:Mvc(e.parse)}}function Mvc(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 Y$=h(()=>{"use strict"});function FFr(e){return e.path.length===0?e.message:`${e.path.join(" -> ")}: ${e.message}`}var Zgo=h(()=>{"use strict"});var Hrt,$go=h(()=>{"use strict";Zgo();Hrt=class extends Error{errors;constructor(t){super(t.map(FFr).join("; ")),this.errors=t,Object.setPrototypeOf(this,new.target.prototype),this.name=this.constructor.name}}});var Krt,eAo=h(()=>{"use strict";Zgo();Krt=class extends Error{errors;constructor(t){super(t.map(FFr).join("; ")),this.errors=t,Object.setPrototypeOf(this,new.target.prototype),this.name=this.constructor.name}}});function bh(e){return{nullable:()=>yud(e),optional:()=>tAo(e),optionalNullable:()=>bud(e),transform:t=>rAo(e,t),parseOrThrow:(t,r)=>{let n=e.parse(t,r);if(n.ok)return n.value;throw new Krt(n.errors)},jsonOrThrow:(t,r)=>{let n=e.json(t,r);if(n.ok)return n.value;throw new Hrt(n.errors)}}}function yud(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:()=>gl.NULLABLE};return{...t,...bh(t)}}function tAo(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:()=>gl.OPTIONAL};return{...t,...bh(t)}}function bud(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:()=>gl.OPTIONAL_NULLABLE};return{...t,...bh(t)}}function rAo(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,...bh(r)}}var Lvc=h(()=>{"use strict";Dw();$go();eAo()});var SQ=h(()=>{"use strict";Lvc();$go();eAo()});function _vc(){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:Dm(t,"bigint | number")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="bigint"?{ok:!1,errors:[{path:r,message:Dm(t,"bigint")}]}:{ok:!0,value:t},getType:()=>gl.BIGINT};return{...hT(e),...bh(e)}}var Uvc=h(()=>{"use strict";Dw();q2();Y$();SQ()});var Vvc=h(()=>{"use strict";Uvc()});function Gvc(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="string"?{ok:!1,errors:[{path:r,message:Dm(t,"string")}]}:Eud.test(t)?{ok:!0,value:new Date(t)}:{ok:!1,errors:[{path:r,message:Dm(t,"ISO 8601 date string")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>t instanceof Date?{ok:!0,value:t.toISOString()}:{ok:!1,errors:[{path:r,message:Dm(t,"Date object")}]},getType:()=>gl.DATE};return{...hT(e),...bh(e)}}var Eud,qvc=h(()=>{"use strict";Dw();q2();Y$();SQ();Eud=/^([+-]?\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 Wvc=h(()=>{"use strict";qvc()});function gT(e,t){return()=>{let r={parse:t,json:t,getType:()=>e};return{...hT(r),...bh(r)}}}var X$=h(()=>{"use strict";SQ();Y$()});function NFr(e){let t=new Set(e);return gT(gl.ENUM,(n,{allowUnrecognizedEnumValues:i,breadcrumbsPrefix:o=[]}={})=>typeof n!="string"?{ok:!1,errors:[{path:o,message:Dm(n,"string")}]}:!t.has(n)&&!i?{ok:!1,errors:[{path:o,message:Dm(n,"enum")}]}:{ok:!0,value:n})()}var Hvc=h(()=>{"use strict";Dw();X$();q2()});var nAo=h(()=>{"use strict";Hvc()});function Kvc(e){let t=iAo(e);return{...t,...bh(t)}}function iAo(e){return{parse:(t,r)=>Jrt(e).parse(t,r),json:(t,r)=>Jrt(e).json(t,r),getType:()=>Jrt(e).getType()}}function Jrt(e){let t=e;return t.__zurg_memoized==null&&(t.__zurg_memoized=e()),t.__zurg_memoized}var oAo=h(()=>{"use strict";SQ()});function sAo(e){return Object.entries(e)}var Jvc=h(()=>{"use strict"});function E3t(e,t){let r=new Set(t);return Object.entries(e).reduce((n,[i,o])=>(r.has(i)&&(n[i]=o),n),{})}var aAo=h(()=>{"use strict"});function rde(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return t===null?!0:Object.getPrototypeOf(t)===null}var I3t=h(()=>{"use strict"});function v3t(e){return Object.keys(e)}var cAo=h(()=>{"use strict"});function Yvc(e,t){let r=[],n=[];for(let i of e)t(i)?r.push(i):n.push(i);return[r,n]}var Xvc=h(()=>{"use strict"});function fK(e){return{withParsedProperties:t=>uAo(e,t)}}function uAo(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(Iud.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(!rde(n))return{ok:!1,errors:[{path:i?.breadcrumbsPrefix??[],message:Dm(n,"object")}]};let o=new Set(Object.keys(t)),s=E3t(n,Object.keys(n).filter(a=>!o.has(a)));return e.json(s,i)},getType:()=>e.getType()};return{...r,...bh(r),...fK(r)}}var Iud,Zvc=h(()=>{"use strict";aAo();q2();I3t();SQ();Iud=Object.prototype.hasOwnProperty});var C3t=h(()=>{"use strict";Zvc()});function $vc(e,t){return{rawKey:e,valueSchema:t,isProperty:!0}}function nde(e){return e.isProperty}var lAo=h(()=>{"use strict"});function jFr(e){let t;function r(){if(t==null){t={};for(let[d,f]of sAo(e)){let m=nde(f)?f.rawKey:d,g=nde(f)?f.valueSchema:f;t[m]={rawKey:m,parsedKey:d,valueSchema:g}}}return t}let n,i,o,s;function a(){if(n==null){n=[],i=[];for(let[d,f]of sAo(e)){let m=nde(f)?f.rawKey:d,g=nde(f)?f.valueSchema:f;Cud(g)&&(n.push(m),i.push(d))}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(([d,f])=>nde(f)?f.rawKey:d),_getParsedProperties:()=>v3t(e),parse:(d,f)=>{let m=f?.breadcrumbsPrefix??[];return eCc({value:d,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,{...f,breadcrumbsPrefix:I})}}},unrecognizedObjectKeys:f?.unrecognizedObjectKeys,skipValidation:f?.skipValidation,breadcrumbsPrefix:m,omitUndefined:f?.omitUndefined})},json:(d,f)=>{let m=f?.breadcrumbsPrefix??[];return eCc({value:d,requiredKeys:c(),requiredKeysSet:l(),getProperty:g=>{let A=e[g];if(A!=null)return nde(A)?{transformedKey:A.rawKey,transform:y=>{let I=[...m,g];return A.valueSchema.json(y,{...f,breadcrumbsPrefix:I})}}:{transformedKey:g,transform:y=>{let I=[...m,g];return A.json(y,{...f,breadcrumbsPrefix:I})}}},unrecognizedObjectKeys:f?.unrecognizedObjectKeys,skipValidation:f?.skipValidation,breadcrumbsPrefix:m,omitUndefined:f?.omitUndefined})},getType:()=>gl.OBJECT};return{...hT(p),...bh(p),...fK(p),...y6e(p)}}function eCc({value:e,requiredKeys:t,requiredKeysSet:r,getProperty:n,unrecognizedObjectKeys:i="fail",skipValidation:o=!1,breadcrumbsPrefix:s=[]}){if(!rde(e))return{ok:!1,errors:[{path:s,message:Dm(e,"object")}]};let a=t.length,c=[],u={};for(let l in e){if(!vud.call(e,l))continue;let p=e[l],d=n(l);if(d!=null){a>0&&r.has(l)&&a--;let f=d.transform(p);f.ok?u[d.transformedKey]=f.value:(u[l]=p,c.push(...f.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 y6e(e){return{extend:t=>{let r={_getParsedProperties:()=>[...e._getParsedProperties(),...t._getParsedProperties()],_getRawProperties:()=>[...e._getRawProperties(),...t._getRawProperties()],parse:(n,i)=>tCc({extensionKeys:t._getRawProperties(),value:n,transformBase:o=>e.parse(o,i),transformExtension:o=>t.parse(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),json:(n,i)=>tCc({extensionKeys:t._getParsedProperties(),value:n,transformBase:o=>e.json(o,i),transformExtension:o=>t.json(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),getType:()=>gl.OBJECT};return{...r,...bh(r),...fK(r),...y6e(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:()=>gl.OBJECT};return{...n,...bh(n),...fK(n),...y6e(n)}}}}function tCc({extensionKeys:e,value:t,transformBase:r,transformExtension:n,breadcrumbsPrefix:i=[]}){if(!rde(t))return{ok:!1,errors:[{path:i,message:Dm(t,"object")}]};let o=new Set(e),[s,a]=Yvc(v3t(t),l=>o.has(l)),c=r(E3t(t,a)),u=n(E3t(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 Cud(e){return!xud(e)}function xud(e){switch(e.getType()){case gl.ANY:case gl.UNKNOWN:case gl.OPTIONAL:case gl.OPTIONAL_NULLABLE:return!0;default:return!1}}var vud,pAo=h(()=>{"use strict";Dw();Jvc();aAo();q2();I3t();cAo();Y$();Xvc();C3t();SQ();lAo();vud=Object.prototype.hasOwnProperty});function rCc(e){return jFr(e)}var nCc=h(()=>{"use strict";pAo()});var fAo=h(()=>{"use strict";pAo();nCc();lAo()});function iCc(e){let t={...iAo(e),_getRawProperties:()=>Jrt(e)._getRawProperties(),_getParsedProperties:()=>Jrt(e)._getParsedProperties()};return{...t,...bh(t),...fK(t),...y6e(t)}}var oCc=h(()=>{"use strict";fAo();C3t();SQ();oAo()});var sCc=h(()=>{"use strict";oAo();oCc()});function zFr(e){let t={parse:(r,n)=>aCc(r,(i,o)=>e.parse(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),json:(r,n)=>aCc(r,(i,o)=>e.json(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),getType:()=>gl.LIST};return{...hT(t),...bh(t)}}function aCc(e,t){if(!Array.isArray(e))return{ok:!1,errors:[{message:Dm(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 cCc=h(()=>{"use strict";Dw();q2();Y$();SQ()});var dAo=h(()=>{"use strict";cCc()});function uCc(e){return gT(gl.BOOLEAN_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:Dm(r,`${e.toString()}`)}]})()}var lCc=h(()=>{"use strict";Dw();X$();q2()});function pCc(e){return gT(gl.STRING_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:Dm(r,`"${e}"`)}]})()}var fCc=h(()=>{"use strict";Dw();X$();q2()});var dCc=h(()=>{"use strict";lCc();fCc()});var mCc,hCc=h(()=>{"use strict";Dw();X$();mCc=gT(gl.ANY,e=>({ok:!0,value:e}))});var gCc,ACc=h(()=>{"use strict";Dw();X$();q2();gCc=gT(gl.BOOLEAN,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="boolean"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Dm(e,"boolean")}]})});var yCc,bCc=h(()=>{"use strict";Dw();X$();yCc=gT(gl.NEVER,(e,{breadcrumbsPrefix:t=[]}={})=>({ok:!1,errors:[{path:t,message:"Expected never"}]}))});var ECc,ICc=h(()=>{"use strict";Dw();X$();q2();ECc=gT(gl.NUMBER,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="number"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Dm(e,"number")}]})});var vCc,CCc=h(()=>{"use strict";Dw();X$();q2();vCc=gT(gl.STRING,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="string"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Dm(e,"string")}]})});var xCc,SCc=h(()=>{"use strict";Dw();X$();xCc=gT(gl.UNKNOWN,e=>({ok:!0,value:e}))});var wCc=h(()=>{"use strict";hCc();ACc();bCc();ICc();CCc();SCc()});function OCc(e,t){let r={parse:(n,i)=>TCc({value:n,isKeyNumeric:e.getType()===gl.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)=>TCc({value:n,isKeyNumeric:e.getType()===gl.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:()=>gl.RECORD};return{...hT(r),...bh(r)}}function TCc({value:e,isKeyNumeric:t,transformKey:r,transformValue:n,breadcrumbsPrefix:i=[]}){if(!rde(e))return{ok:!1,errors:[{path:i,message:Dm(e,"object")}]};let o={},s=[];for(let a in e){if(!Sud.call(e,a))continue;let c=e[a];if(c===void 0)continue;let u=a;if(t){let d=a.length>0?Number(a):NaN;Number.isNaN(d)||(u=d)}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 Sud,PCc=h(()=>{"use strict";Dw();q2();I3t();Y$();SQ();Sud=Object.prototype.hasOwnProperty});var BCc=h(()=>{"use strict";PCc()});function RCc(e){let t=zFr(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:Dm(n,"Set")}]},getType:()=>gl.SET};return{...hT(r),...bh(r)}}var DCc=h(()=>{"use strict";Dw();q2();Y$();dAo();SQ()});var kCc=h(()=>{"use strict";DCc()});function NCc(e){let t={parse:(r,n)=>FCc((i,o)=>i.parse(r,o),e,n),json:(r,n)=>FCc((i,o)=>i.json(r,o),e,n),getType:()=>gl.UNDISCRIMINATED_UNION};return{...hT(t),...bh(t)}}function FCc(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 jCc=h(()=>{"use strict";Dw();Y$();SQ()});var zCc=h(()=>{"use strict";jCc()});function QCc(e,t){return{parsedDiscriminant:e,rawDiscriminant:t}}var MCc=h(()=>{"use strict"});function _Cc(e,t){let r=typeof e=="string"?e:e.rawDiscriminant,n=typeof e=="string"?e:e.parsedDiscriminant,i=NFr(v3t(t)),o={parse:(s,a)=>LCc({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)=>LCc({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:()=>gl.UNION};return{...hT(o),...bh(o),...fK(o)}}function LCc({value:e,discriminant:t,transformedDiscriminant:r,transformDiscriminantValue:n,getAdditionalPropertiesSchema:i,allowUnrecognizedUnionMembers:o=!1,transformAdditionalProperties:s,breadcrumbsPrefix:a=[]}){if(!rde(e))return{ok:!1,errors:[{path:a,message:Dm(e,"object")}]};let c=e[t],u={};for(let f in e)wud.call(e,f)&&f!==t&&(u[f]=e[f]);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 d=s(u,p);return d.ok?{ok:!0,value:{[r]:c,...d.value}}:d}var wud,UCc=h(()=>{"use strict";Dw();q2();I3t();cAo();Y$();nAo();C3t();SQ();wud=Object.prototype.hasOwnProperty});var VCc=h(()=>{"use strict";MCc();UCc()});var GCc=h(()=>{"use strict";Vvc();Wvc();nAo();sCc();dAo();dCc();fAo();C3t();wCc();BCc();SQ();kCc();zCc();VCc()});var ve={};$(ve,{JsonError:()=>Hrt,ParseError:()=>Krt,any:()=>mCc,bigint:()=>_vc,boolean:()=>gCc,booleanLiteral:()=>uCc,date:()=>Gvc,discriminant:()=>QCc,enum_:()=>NFr,getObjectLikeUtils:()=>fK,getObjectUtils:()=>y6e,getSchemaUtils:()=>bh,isProperty:()=>nde,lazy:()=>Kvc,lazyObject:()=>iCc,list:()=>zFr,never:()=>yCc,number:()=>ECc,object:()=>jFr,objectWithoutOptionalProperties:()=>rCc,optional:()=>tAo,property:()=>$vc,record:()=>OCc,set:()=>RCc,string:()=>vCc,stringLiteral:()=>pCc,transform:()=>rAo,undiscriminatedUnion:()=>NCc,union:()=>_Cc,unknown:()=>xCc,withParsedProperties:()=>uAo});var qCc=h(()=>{"use strict";GCc()});var WCc=h(()=>{"use strict"});var Kr=h(()=>{"use strict";jvc();zvc();Qvc();qCc();WCc()});var QFr,mAo=h(()=>{"use strict";Kr();QFr=ve.string()});var MFr,hAo=h(()=>{"use strict";Kr();MFr=ve.enum_(["openai","anthropic","aws-bedrock"])});var LFr,gAo=h(()=>{"use strict";Kr();mAo();hAo();LFr=ve.object({provider:MFr,model:QFr})});var AAo=h(()=>{"use strict";gAo();mAo();hAo()});var yAo={};$(yAo,{AiServicesSchema:()=>LFr,ModelName:()=>QFr,ModelProvider:()=>MFr});var HCc=h(()=>{"use strict";AAo()});var Eve,x3t=h(()=>{"use strict";Kr();Eve=ve.object({generate:ve.boolean().optional(),upgrade:ve.boolean().optional(),preview:ve.boolean().optional(),verify:ve.boolean().optional()})});var bAo=h(()=>{"use strict";x3t()});var EAo={};$(EAo,{AutomationSchema:()=>Eve});var KCc=h(()=>{"use strict";bAo()});var lE,X3=h(()=>{"use strict";Kr();lE=ve.object({docs:ve.string().optional()})});var Yrt,_Fr=h(()=>{"use strict";Kr();X3();Yrt=ve.object({scheme:ve.string()}).extend(lE)});var UFr,IAo=h(()=>{"use strict";Kr();_Fr();UFr=ve.undiscriminatedUnion([ve.string(),Yrt])});var VFr,vAo=h(()=>{"use strict";Kr();X3();IAo();VFr=ve.object({any:ve.list(UFr)}).extend(lE)});var GFr,CAo=h(()=>{"use strict";Kr();GFr=ve.object({})});var qFr,xAo=h(()=>{"use strict";Kr();X3();CAo();qFr=ve.object({"endpoint-security":GFr}).extend(lE)});var Xrt,WFr=h(()=>{"use strict";Kr();vAo();_Fr();xAo();Xrt=ve.undiscriminatedUnion([ve.string(),Yrt,VFr,qFr])});var Ive,S3t=h(()=>{"use strict";Kr();Ive=ve.object({name:ve.string().optional()})});var Zrt,HFr=h(()=>{"use strict";Kr();Zrt=ve.object({env:ve.string().optional()})});var b6e,KFr=h(()=>{"use strict";Kr();S3t();HFr();b6e=ve.object({omit:ve.boolean().optional()}).extend(Zrt).extend(Ive)});var A5,E6e=h(()=>{"use strict";Kr();A5=ve.object({"playground-docs":ve.string().optional()})});var JFr,SAo=h(()=>{"use strict";Kr();X3();KFr();E6e();JFr=ve.object({scheme:ve.stringLiteral("basic"),username:b6e.optional(),password:b6e.optional()}).extend(lE).extend(A5)});var YFr,wAo=h(()=>{"use strict";Kr();YFr=ve.enum_(["api-key","refresh-token"])});var XFr,TAo=h(()=>{"use strict";Kr();XFr=ve.object({"response-property":ve.string(),"header-name":ve.string(),"value-prefix":ve.string().optional()})});var ZFr,OAo=h(()=>{"use strict";Kr();TAo();ZFr=ve.object({endpoint:ve.string(),"expiry-response-property":ve.string().optional(),"authenticated-request-headers":ve.list(XFr).optional()})});var $Fr,PAo=h(()=>{"use strict";Kr();OAo();$Fr=ve.undiscriminatedUnion([ve.string(),ZFr])});var e2r,BAo=h(()=>{"use strict";Kr();X3();wAo();PAo();E6e();e2r=ve.object({scheme:ve.stringLiteral("bearer"),"get-token":$Fr,type:YFr.optional()}).extend(lE).extend(A5)});var t2r,RAo=h(()=>{"use strict";Kr();X3();KFr();E6e();t2r=ve.object({scheme:ve.stringLiteral("bearer"),token:b6e.optional()}).extend(lE).extend(A5)});var r2r,DAo=h(()=>{"use strict";Kr();BAo();RAo();r2r=ve.undiscriminatedUnion([t2r,e2r])});var n2r,kAo=h(()=>{"use strict";Kr();X3();S3t();HFr();E6e();n2r=ve.object({header:ve.string(),type:ve.string().optional(),prefix:ve.string().optional()}).extend(Zrt).extend(Ive).extend(lE).extend(A5)});var i2r,FAo=h(()=>{"use strict";Kr();i2r=ve.string()});var o2r,NAo=h(()=>{"use strict";Kr();o2r=ve.enum_(["client-credentials","authorization-code","device-code"])});var s2r,jAo=h(()=>{"use strict";Kr();s2r=ve.object({"client-id":ve.string().optional(),"client-secret":ve.string().optional(),scopes:ve.string().optional()})});var a2r,zAo=h(()=>{"use strict";Kr();a2r=ve.object({"access-token":ve.string().optional(),"expires-in":ve.string().optional(),"refresh-token":ve.string().optional()})});var c2r,QAo=h(()=>{"use strict";Kr();jAo();zAo();c2r=ve.object({endpoint:ve.string(),"request-properties":s2r.optional(),"response-properties":a2r.optional()})});var u2r,MAo=h(()=>{"use strict";Kr();u2r=ve.object({method:ve.string().optional()})});var l2r,LAo=h(()=>{"use strict";Kr();l2r=ve.object({"refresh-token":ve.string()})});var p2r,_Ao=h(()=>{"use strict";Kr();p2r=ve.object({"access-token":ve.string().optional(),"expires-in":ve.string().optional(),"refresh-token":ve.string().optional()})});var f2r,UAo=h(()=>{"use strict";Kr();LAo();_Ao();f2r=ve.object({endpoint:ve.string(),"request-properties":l2r.optional(),"response-properties":p2r.optional()})});var d2r,VAo=h(()=>{"use strict";Kr();d2r=ve.object({url:ve.string(),ports:ve.list(ve.number()).optional()})});var m2r,GAo=h(()=>{"use strict";Kr();VAo();m2r=ve.undiscriminatedUnion([ve.string(),d2r])});var h2r,qAo=h(()=>{"use strict";Kr();X3();FAo();NAo();QAo();MAo();UAo();GAo();E6e();h2r=ve.object({scheme:ve.stringLiteral("oauth"),type:o2r,scopes:ve.list(i2r).optional(),"token-prefix":ve.string().optional(),"token-header":ve.string().optional(),"client-id-env":ve.string().optional(),"client-secret-env":ve.string().optional(),"get-token":c2r.optional(),"refresh-token":f2r.optional(),"client-id":ve.string().optional(),"authorization-url":ve.string().optional(),"device-authorization-url":ve.string().optional(),"token-url":ve.string().optional(),"refresh-url":ve.string().optional(),"redirect-uri":m2r.optional(),"success-redirect-url":ve.string().optional(),"error-redirect-url":ve.string().optional(),pkce:u2r.optional(),"authorization-parameters":ve.record(ve.string(),ve.string()).optional(),"device-authorization-parameters":ve.record(ve.string(),ve.string()).optional(),"token-parameters":ve.record(ve.string(),ve.string()).optional(),"refresh-parameters":ve.record(ve.string(),ve.string()).optional()}).extend(lE).extend(A5)});var vve,w3t=h(()=>{"use strict";Kr();SAo();DAo();kAo();qAo();vve=ve.undiscriminatedUnion([h2r,n2r,JFr,r2r])});var WAo=h(()=>{"use strict";IAo();vAo();WFr();w3t();_Fr();FAo();KFr();SAo();DAo();xAo();CAo();kAo();TAo();wAo();BAo();PAo();OAo();jAo();zAo();NAo();QAo();MAo();UAo();LAo();_Ao();qAo();GAo();VAo();RAo();HFr();E6e()});var HAo={};$(HAo,{AnyAuthItem:()=>UFr,AnyAuthSchemesSchema:()=>VFr,ApiAuthSchema:()=>Xrt,AuthSchemeDeclarationSchema:()=>vve,AuthSchemeReferenceSchema:()=>Yrt,AuthScope:()=>i2r,AuthVariable:()=>b6e,BasicAuthSchemeSchema:()=>JFr,BearerAuthSchemeSchema:()=>r2r,EndpointSecuritySchema:()=>qFr,EndpointSecuritySchemaDetails:()=>GFr,HeaderAuthSchemeSchema:()=>n2r,InferredAuthTypeSchema:()=>YFr,InferredAuthenticatedRequestHeader:()=>XFr,InferredBearerAuthSchema:()=>e2r,InferredGetTokenEndpointSchema:()=>$Fr,InferredGetTokenEndpointSchemaObject:()=>ZFr,OAuthAccessTokenRequestPropertiesSchema:()=>s2r,OAuthAccessTokenResponsePropertiesSchema:()=>a2r,OAuthFlowTypeSchema:()=>o2r,OAuthGetTokenEndpointSchema:()=>c2r,OAuthPkceSchema:()=>u2r,OAuthRefreshTokenEndpointSchema:()=>f2r,OAuthRefreshTokenRequestPropertiesSchema:()=>l2r,OAuthRefreshTokenResponsePropertiesSchema:()=>p2r,OAuthSchemeSchema:()=>h2r,RedirectUriSchema:()=>m2r,RedirectUriWithBackupPortsSchema:()=>d2r,TokenBearerAuthSchema:()=>t2r,WithEnvironmentVariable:()=>Zrt,WithPlaygroundDocsSchema:()=>A5});var JCc=h(()=>{"use strict";WAo()});var $rt,g2r=h(()=>{"use strict";Kr();$rt=ve.enum_(["in-development","pre-release","deprecated","generally-available"])});var A2r,KAo=h(()=>{"use strict";Kr();g2r();A2r=ve.object({status:$rt,message:ve.string().optional()})});var y2r,JAo=h(()=>{"use strict";Kr();KAo();g2r();y2r=ve.undiscriminatedUnion([$rt,A2r])});var YAo=h(()=>{"use strict";KAo();g2r();JAo()});var XAo={};$(XAo,{AvailabilitySchema:()=>A2r,AvailabilityStatusSchema:()=>$rt,AvailabilityUnionSchema:()=>y2r});var YCc=h(()=>{"use strict";YAo()});var Cve,T3t=h(()=>{"use strict";Kr();Cve=ve.object({audiences:ve.list(ve.string()).optional()})});var b2r,ZAo=h(()=>{"use strict";Kr();JAo();b2r=ve.object({availability:y2r.optional()})});var $Ao=h(()=>{"use strict";T3t();ZAo();X3();S3t()});var eyo={};$(eyo,{WithAudiences:()=>Cve,WithAvailability:()=>b2r,WithDocsSchema:()=>lE,WithName:()=>Ive});var XCc=h(()=>{"use strict";$Ao()});var E2r,tyo=h(()=>{"use strict";Kr();E2r=ve.object({type:ve.string()})});var I2r,ryo=h(()=>{"use strict";Kr();tyo();I2r=ve.object({proto:E2r.optional()})});var nyo=h(()=>{"use strict";ryo();tyo()});var iyo={};$(iyo,{EncodingSchema:()=>I2r,ProtobufTypeSchema:()=>E2r});var ZCc=h(()=>{"use strict";nyo()});var ent,v2r=h(()=>{"use strict";Kr();ent=ve.object({id:ve.string(),default:ve.string().optional(),values:ve.list(ve.string()).optional()})});var C2r,oyo=h(()=>{"use strict";Kr();T3t();X3();v2r();C2r=ve.object({urls:ve.record(ve.string(),ve.string()),"url-templates":ve.record(ve.string(),ve.string()).optional(),"default-urls":ve.record(ve.string(),ve.string()).optional(),variables:ve.record(ve.string(),ve.list(ent)).optional()}).extend(Cve).extend(lE)});var x2r,syo=h(()=>{"use strict";Kr();T3t();X3();v2r();x2r=ve.object({url:ve.string(),"default-url":ve.string().optional(),"url-template":ve.string().optional(),variables:ve.list(ent).optional()}).extend(Cve).extend(lE)});var S2r,ayo=h(()=>{"use strict";Kr();oyo();syo();S2r=ve.undiscriminatedUnion([ve.string(),x2r,C2r])});var w2r,cyo=h(()=>{"use strict";Kr();ayo();w2r=ve.object({"default-url":ve.string().optional(),"default-environment":ve.string().optional(),"base-url-env":ve.string().optional(),environments:ve.record(ve.string(),S2r).optional()})});var uyo=h(()=>{"use strict";ayo();oyo();v2r();syo();cyo()});var lyo={};$(lyo,{EnvironmentSchema:()=>S2r,MultipleBaseUrlsEnvironmentSchema:()=>C2r,ServerVariableSchema:()=>ent,SingleBaseUrlEnvironmentSchema:()=>x2r,WithEnvironmentsSchema:()=>w2r});var $Cc=h(()=>{"use strict";uyo()});var T2r,pyo=h(()=>{"use strict";Kr();T2r=ve.object({minItems:ve.number().optional(),maxItems:ve.number().optional()})});var O2r,fyo=h(()=>{"use strict";Kr();O2r=ve.object({minProperties:ve.number().optional(),maxProperties:ve.number().optional()})});var P2r,dyo=h(()=>{"use strict";Kr();P2r=ve.object({min:ve.number().optional(),max:ve.number().optional(),exclusiveMin:ve.boolean().optional(),exclusiveMax:ve.boolean().optional(),multipleOf:ve.number().optional()})});var B2r,myo=h(()=>{"use strict";Kr();B2r=ve.object({minLength:ve.number().optional(),maxLength:ve.number().optional(),pattern:ve.string().optional(),format:ve.string().optional()})});var R2r,hyo=h(()=>{"use strict";Kr();pyo();fyo();dyo();myo();R2r=ve.undiscriminatedUnion([B2r,P2r,T2r,O2r])});var D2r,gyo=h(()=>{"use strict";Kr();ZAo();X3();ryo();hyo();D2r=ve.object({default:ve.unknown().optional(),"client-default":ve.unknown().optional(),encoding:I2r.optional(),validation:R2r.optional()}).extend(lE).extend(b2r)});var k2r,Ayo=h(()=>{"use strict";Kr();T3t();S3t();gyo();k2r=ve.object({type:ve.string()}).extend(D2r).extend(Ive).extend(Cve)});var F2r,yyo=h(()=>{"use strict";Kr();Ayo();F2r=ve.object({env:ve.string().optional()}).extend(k2r)});var N2r,byo=h(()=>{"use strict";Kr();yyo();N2r=ve.undiscriminatedUnion([ve.string(),F2r])});var tnt,j2r=h(()=>{"use strict";byo();tnt=N2r});var z2r,Eyo=h(()=>{"use strict";Kr();j2r();z2r=ve.object({headers:ve.record(ve.string(),tnt).optional()})});var Iyo=h(()=>{"use strict";Eyo()});var vyo={};$(vyo,{WithHeadersSchema:()=>z2r});var exc=h(()=>{"use strict";Iyo()});var Cyo=h(()=>{"use strict";j2r();byo();yyo()});var xyo={};$(xyo,{HttpHeaderSchema:()=>tnt,TypeReferenceDeclarationWithEnvOverride:()=>N2r,TypeReferenceDeclarationWithEnvOverrideSchema:()=>F2r});var txc=h(()=>{"use strict";Cyo()});var Syo=h(()=>{"use strict";gyo();Ayo()});var wyo={};$(wyo,{BaseTypeReferenceSchema:()=>D2r,TypeReferenceDeclarationWithName:()=>k2r});var rxc=h(()=>{"use strict";Syo()});var Tyo=h(()=>{"use strict";pyo();fyo();dyo();myo();hyo()});var Oyo={};$(Oyo,{ListValidationSchema:()=>T2r,MapValidationSchema:()=>O2r,NumberValidationSchema:()=>P2r,StringValidationSchema:()=>B2r,ValidationSchema:()=>R2r});var nxc=h(()=>{"use strict";Tyo()});var ixc=h(()=>{"use strict";JCc();WAo();YCc();YAo();XCc();$Ao();ZCc();nyo();$Cc();uyo();exc();Iyo();txc();Cyo();rxc();Syo();nxc();Tyo()});var Pyo={};$(Pyo,{AnyAuthItem:()=>UFr,AnyAuthSchemesSchema:()=>VFr,ApiAuthSchema:()=>Xrt,AuthSchemeDeclarationSchema:()=>vve,AuthSchemeReferenceSchema:()=>Yrt,AuthScope:()=>i2r,AuthVariable:()=>b6e,AvailabilitySchema:()=>A2r,AvailabilityStatusSchema:()=>$rt,AvailabilityUnionSchema:()=>y2r,BaseTypeReferenceSchema:()=>D2r,BasicAuthSchemeSchema:()=>JFr,BearerAuthSchemeSchema:()=>r2r,EncodingSchema:()=>I2r,EndpointSecuritySchema:()=>qFr,EndpointSecuritySchemaDetails:()=>GFr,EnvironmentSchema:()=>S2r,HeaderAuthSchemeSchema:()=>n2r,HttpHeaderSchema:()=>tnt,InferredAuthTypeSchema:()=>YFr,InferredAuthenticatedRequestHeader:()=>XFr,InferredBearerAuthSchema:()=>e2r,InferredGetTokenEndpointSchema:()=>$Fr,InferredGetTokenEndpointSchemaObject:()=>ZFr,ListValidationSchema:()=>T2r,MapValidationSchema:()=>O2r,MultipleBaseUrlsEnvironmentSchema:()=>C2r,NumberValidationSchema:()=>P2r,OAuthAccessTokenRequestPropertiesSchema:()=>s2r,OAuthAccessTokenResponsePropertiesSchema:()=>a2r,OAuthFlowTypeSchema:()=>o2r,OAuthGetTokenEndpointSchema:()=>c2r,OAuthPkceSchema:()=>u2r,OAuthRefreshTokenEndpointSchema:()=>f2r,OAuthRefreshTokenRequestPropertiesSchema:()=>l2r,OAuthRefreshTokenResponsePropertiesSchema:()=>p2r,OAuthSchemeSchema:()=>h2r,ProtobufTypeSchema:()=>E2r,RedirectUriSchema:()=>m2r,RedirectUriWithBackupPortsSchema:()=>d2r,ServerVariableSchema:()=>ent,SingleBaseUrlEnvironmentSchema:()=>x2r,StringValidationSchema:()=>B2r,TokenBearerAuthSchema:()=>t2r,TypeReferenceDeclarationWithEnvOverride:()=>N2r,TypeReferenceDeclarationWithEnvOverrideSchema:()=>F2r,TypeReferenceDeclarationWithName:()=>k2r,ValidationSchema:()=>R2r,WithAudiences:()=>Cve,WithAvailability:()=>b2r,WithDocsSchema:()=>lE,WithEnvironmentVariable:()=>Zrt,WithEnvironmentsSchema:()=>w2r,WithHeadersSchema:()=>z2r,WithName:()=>Ive,WithPlaygroundDocsSchema:()=>A5,auth:()=>HAo,availability:()=>XAo,commons:()=>eyo,encoding:()=>iyo,environments:()=>lyo,file:()=>vyo,service:()=>xyo,types:()=>wyo,validation:()=>Oyo});var oxc=h(()=>{"use strict";ixc()});var xve,O3t=h(()=>{"use strict";Kr();xve=ve.string()});var rnt,Q2r=h(()=>{"use strict";Kr();rnt=ve.enum_(["v1","v2"])});var nnt,M2r=h(()=>{"use strict";Kr();nnt=ve.enum_(["environment-per-server","urls-per-environment"])});var int,L2r=h(()=>{"use strict";Kr();int=ve.enum_(["url-order","spec-order"])});var ont,_2r=h(()=>{"use strict";Kr();ont=ve.enum_(["always","never"])});var U2r,Byo=h(()=>{"use strict";Kr();U2r=ve.enum_(["v1"])});var snt,V2r=h(()=>{"use strict";Kr();Q2r();M2r();L2r();_2r();Byo();snt=ve.object({"use-title":ve.boolean().optional(),unions:U2r.optional(),"message-naming":rnt.optional(),"respect-nullable-schemas":ve.boolean().optional(),"only-include-referenced-schemas":ve.boolean().optional(),"inline-path-parameters":ve.boolean().optional(),"idiomatic-request-names":ve.boolean().optional(),"wrap-references-to-nullable-in-optional":ve.boolean().optional(),"coerce-optional-schemas-to-nullable":ve.boolean().optional(),"group-environments-by-host":ve.boolean().optional(),"multi-server-strategy":nnt.optional(),"remove-discriminants-from-schemas":ont.optional(),"path-parameter-order":int.optional()})});var y5,I6e=h(()=>{"use strict";Kr();y5=ve.undiscriminatedUnion([ve.string(),ve.list(ve.string())])});var ant,G2r=h(()=>{"use strict";Kr();O3t();V2r();I6e();ant=ve.object({path:xve,origin:ve.string().optional(),overrides:y5.optional(),audiences:ve.list(ve.string()).optional(),settings:snt.optional()})});var q2r,Ryo=h(()=>{"use strict";Kr();q2r=ve.object({repo:ve.string(),ref:ve.string().optional(),path:ve.string()})});var W2r,Dyo=h(()=>{"use strict";Kr();Ryo();W2r=ve.object({git:q2r})});var Sve,P3t=h(()=>{"use strict";Kr();Dyo();Sve=ve.undiscriminatedUnion([ve.string(),W2r])});var cnt,H2r=h(()=>{"use strict";Kr();I6e();P3t();cnt=ve.object({target:ve.string().optional(),root:Sve,overrides:y5.optional(),"local-generation":ve.boolean().optional(),"from-openapi":ve.boolean().optional(),dependencies:ve.list(ve.string()).optional()})});var unt,K2r=h(()=>{"use strict";Kr();H2r();unt=ve.object({proto:cnt})});var J2r,kyo=h(()=>{"use strict";Kr();O3t();G2r();K2r();J2r=ve.undiscriminatedUnion([xve,ant,unt])});var Y2r,Fyo=h(()=>{"use strict";Kr();kyo();Y2r=ve.list(J2r)});var lnt,X2r=h(()=>{"use strict";Kr();Fyo();O3t();G2r();K2r();lnt=ve.undiscriminatedUnion([xve,ant,Y2r,unt])});var Z2r,Nyo=h(()=>{"use strict";Kr();Z2r=ve.enum_(["literals","enums","enums-coerceable-to-literals"])});var pnt,$2r=h(()=>{"use strict";Kr();Nyo();M2r();L2r();_2r();pnt=ve.object({"respect-nullable-schemas":ve.boolean().optional(),"title-as-schema-name":ve.boolean().optional(),"optional-additional-properties":ve.boolean().optional(),"coerce-enums-to-literals":ve.boolean().optional(),"idiomatic-request-names":ve.boolean().optional(),"wrap-references-to-nullable-in-optional":ve.boolean().optional(),"coerce-optional-schemas-to-nullable":ve.boolean().optional(),"group-environments-by-host":ve.boolean().optional(),"multi-server-strategy":nnt.optional(),"remove-discriminants-from-schemas":ont.optional(),"path-parameter-order":int.optional(),"resolve-schema-collisions":ve.boolean().optional(),"infer-forward-compatible":ve.boolean().optional(),"infer-default-environment":ve.boolean().optional(),"coerce-consts-to":Z2r.optional()})});var fnt,eNr=h(()=>{"use strict";Kr();$2r();Q2r();fnt=ve.object({"message-naming":rnt.optional()}).extend(pnt)});var tNr,jyo=h(()=>{"use strict";Kr();tNr=ve.enum_(["int32","int64","uint32","uint64"])});var rNr,zyo=h(()=>{"use strict";Kr();rNr=ve.enum_(["form","json"])});var nNr,Qyo=h(()=>{"use strict";Kr();nNr=ve.enum_(["all","untyped"])});var iNr,Myo=h(()=>{"use strict";Kr();iNr=ve.enum_(["get","post","put","patch","delete","head","options","trace"])});var oNr,Lyo=h(()=>{"use strict";Kr();Myo();oNr=ve.object({"status-code":ve.number(),methods:ve.list(iNr).optional()})});var sNr,_yo=h(()=>{"use strict";Kr();sNr=ve.undiscriminatedUnion([ve.string(),ve.record(ve.string(),ve.unknown())])});var aNr,Uyo=h(()=>{"use strict";Kr();Qyo();Lyo();_yo();aNr=ve.object({schema:sNr,name:ve.string().optional(),"apply-to":nNr.optional(),ensure:ve.list(oNr).optional()})});var B3t,Vyo=h(()=>{"use strict";Kr();B3t=ve.object({"max-depth":ve.number().optional()})});var cNr,Gyo=h(()=>{"use strict";Kr();Vyo();cNr=ve.object({request:B3t.optional(),response:B3t.optional()})});var uNr,qyo=h(()=>{"use strict";Kr();uNr=ve.object({endpoints:ve.list(ve.string()).optional()})});var lNr,Wyo=h(()=>{"use strict";Kr();lNr=ve.object({except:ve.list(ve.string()).optional()})});var pNr,Hyo=h(()=>{"use strict";Kr();Wyo();pNr=ve.undiscriminatedUnion([ve.boolean(),lNr])});var wve,R3t=h(()=>{"use strict";Kr();$2r();jyo();zyo();Uyo();Gyo();qyo();Hyo();wve=ve.object({"only-include-referenced-schemas":ve.boolean().optional(),"inline-path-parameters":ve.boolean().optional(),"prefer-undiscriminated-unions-with-literals":ve.boolean().optional(),"object-query-parameters":ve.boolean().optional(),"respect-readonly-schemas":ve.boolean().optional(),"use-read-variant-for-responses":ve.boolean().optional(),"respect-forward-compatible-enums":ve.boolean().optional(),"respect-optional-request-body":ve.boolean().optional(),"use-bytes-for-binary-response":ve.boolean().optional(),"default-form-parameter-encoding":rNr.optional(),filter:uNr.optional(),"example-generation":cNr.optional(),"additional-properties-defaults-to":ve.boolean().optional(),"type-dates-as-strings":ve.boolean().optional(),"preserve-single-schema-oneof":ve.boolean().optional(),"preserve-one-of-in-all-of":ve.boolean().optional(),"any-of-sibling-properties-as-object":ve.boolean().optional(),"inline-all-of-schemas":ve.boolean().optional(),"resolve-aliases":pNr.optional(),"group-multi-api-environments":ve.boolean().optional(),"default-integer-format":tNr.optional(),"infer-discriminated-union-base-properties":ve.boolean().optional(),"disambiguate-request-names":ve.boolean().optional(),"ignore-tags":ve.boolean().optional(),"respect-parameter-content":ve.boolean().optional(),"respect-per-spec-base-path":ve.boolean().optional(),"respect-operation-id-word-boundaries":ve.boolean().optional(),"namespaced-errors":ve.boolean().optional(),"error-responses":aNr.optional()}).extend(pnt)});var dnt,fNr=h(()=>{"use strict";Kr();eNr();R3t();dnt=ve.object({"auto-generate-idempotency-key":ve.unknown().optional(),"webhook-signature":ve.unknown().optional()}).extend(wve).extend(fnt)});var dNr,Kyo=h(()=>{"use strict";Kr();dNr=ve.object({conjure:ve.string()})});var mNr,Jyo=h(()=>{"use strict";Kr();eNr();I6e();P3t();mNr=ve.object({asyncapi:Sve,origin:ve.string().optional(),overrides:y5.optional(),namespace:ve.string().optional(),settings:fnt.optional()})});var hNr,Yyo=h(()=>{"use strict";Kr();hNr=ve.object({graphql:ve.string(),origin:ve.string().optional(),overrides:ve.string().optional(),examples:ve.string().optional(),name:ve.string().optional()})});var gNr,Xyo=h(()=>{"use strict";Kr();R3t();I6e();P3t();gNr=ve.object({openapi:Sve,origin:ve.string().optional(),overrides:y5.optional(),overlays:ve.string().optional(),namespace:ve.string().optional(),settings:wve.optional()})});var ANr,Zyo=h(()=>{"use strict";Kr();I6e();ANr=ve.object({openrpc:ve.string(),overrides:y5.optional(),namespace:ve.string().optional()})});var yNr,$yo=h(()=>{"use strict";Kr();H2r();yNr=ve.object({proto:cnt})});var bNr,ebo=h(()=>{"use strict";Kr();Jyo();Yyo();Xyo();Zyo();$yo();bNr=ve.undiscriminatedUnion([gNr,mNr,yNr,ANr,hNr])});var mnt,ENr=h(()=>{"use strict";Kr();Kyo();ebo();mnt=ve.undiscriminatedUnion([ve.list(bNr),dNr])});var INr,tbo=h(()=>{"use strict";Kr();WFr();w3t();cyo();Eyo();fNr();ENr();INr=ve.object({auth:Xrt.optional(),"auth-schemes":ve.record(ve.string(),vve).optional(),specs:mnt,settings:dnt.optional()}).extend(z2r).extend(w2r)});var vNr,rbo=h(()=>{"use strict";Kr();X2r();vNr=ve.object({namespaces:ve.record(ve.string(),lnt)})});var CNr,nbo=h(()=>{"use strict";Kr();X2r();tbo();rbo();CNr=ve.undiscriminatedUnion([lnt,vNr,INr])});var xNr,ibo=h(()=>{"use strict";Kr();xNr=ve.enum_(["minimal","comprehensive"])});var SNr,obo=h(()=>{"use strict";Kr();SNr=ve.object({name:ve.string(),registry:ve.string()})});var wNr,sbo=h(()=>{"use strict";Kr();wNr=ve.object({name:ve.string(),email:ve.string()})});var Tve,D3t=h(()=>{"use strict";Kr();sbo();Tve=ve.object({description:ve.string().optional(),authors:ve.list(wNr).optional()})});var k3t,abo=h(()=>{"use strict";Kr();k3t=ve.object({name:ve.string()})});var Ove,F3t=h(()=>{"use strict";Kr();abo();Ove=ve.object({teams:ve.list(k3t).optional(),users:ve.list(k3t).optional()})});var TNr,cbo=h(()=>{"use strict";Kr();WFr();w3t();j2r();fNr();ENr();TNr=ve.object({auth:Xrt.optional(),"auth-schemes":ve.record(ve.string(),vve).optional(),headers:ve.record(ve.string(),tnt).optional(),settings:dnt.optional(),specs:mnt.optional()})});var ONr,ubo=h(()=>{"use strict";Kr();ONr=ve.object({url:ve.string().optional(),"package-name":ve.string(),token:ve.string().optional()})});var PNr,lbo=h(()=>{"use strict";Kr();PNr=ve.object({slug:ve.string().optional()})});var BNr,pbo=h(()=>{"use strict";Kr();BNr=ve.object({path:ve.string()})});var RNr,fbo=h(()=>{"use strict";Kr();RNr=ve.object({keyId:ve.string(),password:ve.string(),secretKey:ve.string()})});var DNr,dbo=h(()=>{"use strict";Kr();fbo();DNr=ve.object({url:ve.string().optional(),coordinate:ve.string(),username:ve.string().optional(),password:ve.string().optional(),signature:RNr.optional()})});var kNr,mbo=h(()=>{"use strict";Kr();kNr=ve.object({url:ve.string().optional(),"package-name":ve.string(),token:ve.string().optional()})});var FNr,hbo=h(()=>{"use strict";Kr();FNr=ve.object({url:ve.string().optional(),"package-name":ve.string(),"api-key":ve.string().optional()})});var NNr,gbo=h(()=>{"use strict";Kr();NNr=ve.object({"api-key":ve.string(),"workspace-id":ve.string(),"collection-id":ve.string().optional()})});var jNr,Abo=h(()=>{"use strict";Kr();D3t();jNr=ve.object({keywords:ve.list(ve.string()).optional(),"documentation-link":ve.string().optional(),"homepage-link":ve.string().optional()}).extend(Tve)});var zNr,ybo=h(()=>{"use strict";Kr();Abo();zNr=ve.object({url:ve.string().optional(),"package-name":ve.string(),token:ve.string().optional(),username:ve.string().optional(),password:ve.string().optional(),metadata:jNr.optional()})});var QNr,bbo=h(()=>{"use strict";Kr();QNr=ve.object({url:ve.string().optional(),"package-name":ve.string(),"api-key":ve.string().optional()})});var MNr,Ebo=h(()=>{"use strict";Kr();ubo();lbo();pbo();dbo();mbo();hbo();gbo();ybo();bbo();MNr=ve.union("location",{npm:kNr,maven:DNr,pypi:zNr,postman:NNr,"local-file-system":BNr,"fern-hosted":PNr,nuget:FNr,rubygems:QNr,crates:ONr}).transform({transform:e=>e,untransform:e=>e})});var LNr,Ibo=h(()=>{"use strict";Kr();LNr=ve.object({custom:ve.string()})});var _Nr,vbo=h(()=>{"use strict";Kr();_Nr=ve.enum_(["MIT","Apache-2.0"])});var b5,v6e=h(()=>{"use strict";Kr();Ibo();vbo();b5=ve.undiscriminatedUnion([_Nr,LNr])});var N3t,Cbo=h(()=>{"use strict";Kr();v6e();N3t=ve.object({"package-description":ve.string().optional(),email:ve.string().optional(),"reference-url":ve.string().optional(),author:ve.string().optional(),license:b5.optional()})});var UNr,xbo=h(()=>{"use strict";Kr();UNr=ve.object({path:ve.string()})});var VNr,Sbo=h(()=>{"use strict";Kr();VNr=ve.enum_(["commit","release"])});var GNr,wbo=h(()=>{"use strict";Kr();v6e();Sbo();GNr=ve.object({repository:ve.string(),branch:ve.string().optional(),license:b5.optional(),mode:VNr.optional(),workflows:ve.boolean().optional()})});var qNr,Tbo=h(()=>{"use strict";Kr();v6e();F3t();qNr=ve.object({repository:ve.string(),branch:ve.string().optional(),license:b5.optional(),mode:ve.stringLiteral("pull-request"),reviewers:Ove.optional(),workflows:ve.boolean().optional(),"auto-merge":ve.boolean().optional()})});var WNr,Obo=h(()=>{"use strict";Kr();v6e();WNr=ve.object({repository:ve.string(),license:b5.optional(),mode:ve.stringLiteral("push"),branch:ve.string().optional(),workflows:ve.boolean().optional()})});var HNr,Pbo=h(()=>{"use strict";Kr();HNr=ve.enum_(["pull-request","push","commit-and-release"])});var KNr,Bbo=h(()=>{"use strict";Kr();v6e();Pbo();KNr=ve.object({uri:ve.string(),token:ve.string(),mode:HNr.optional(),branch:ve.string().optional(),license:b5.optional(),workflows:ve.boolean().optional(),"auto-merge":ve.boolean().optional()})});var JNr,Rbo=h(()=>{"use strict";Kr();wbo();Tbo();Obo();Bbo();JNr=ve.undiscriminatedUnion([KNr,GNr,qNr,WNr])});var hnt,YNr=h(()=>{"use strict";Kr();x3t();cbo();Ebo();Cbo();xbo();Rbo();hnt=ve.object({version:ve.string(),output:MNr.optional(),github:JNr.optional(),config:ve.unknown().optional(),metadata:N3t.optional(),keywords:ve.list(ve.string()).optional(),snippets:UNr.optional(),"ir-version":ve.string().optional(),"smart-casing":ve.boolean().optional(),"smart-casing-digit-word-boundary":ve.boolean().optional(),api:TNr.optional(),"disable-examples":ve.boolean().optional(),"publish-metadata":N3t.optional(),autorelease:ve.boolean().optional(),automation:Eve.optional()})});var XNr,Dbo=h(()=>{"use strict";Kr();obo();YNr();XNr=ve.object({image:SNr}).extend(hnt)});var ZNr,kbo=h(()=>{"use strict";Kr();YNr();ZNr=ve.object({name:ve.string()}).extend(hnt)});var $Nr,Fbo=h(()=>{"use strict";Kr();Dbo();kbo();$Nr=ve.undiscriminatedUnion([ZNr,XNr])});var ejr,Nbo=h(()=>{"use strict";Kr();x3t();D3t();F3t();Fbo();ejr=ve.object({audiences:ve.list(ve.string()).optional(),generators:ve.list($Nr),metadata:Tve.optional(),reviewers:Ove.optional(),automation:Eve.optional()})});var tjr,jbo=h(()=>{"use strict";Kr();tjr=ve.object({enabled:ve.boolean()})});var rjr,zbo=h(()=>{"use strict";Kr();R3t();rjr=ve.object({path:ve.string(),origin:ve.string().optional(),overrides:ve.string().optional(),"disable-examples":ve.boolean().optional(),settings:wve})});var njr,Qbo=h(()=>{"use strict";Kr();zbo();njr=ve.undiscriminatedUnion([rjr,ve.string()])});var ijr,Mbo=h(()=>{"use strict";Kr();ijr=ve.enum_(["java","python","go","ruby","csharp","typescript","php","rust","swift"])});var ojr,Lbo=h(()=>{"use strict";Kr();Mbo();ojr=ve.object({title:ve.string(),language:ijr,content:ve.string()})});var sjr,_bo=h(()=>{"use strict";Kr();sjr=ve.object({method:ve.string(),path:ve.string(),stream:ve.boolean().optional()})});var j3t,Ubo=h(()=>{"use strict";Kr();_bo();j3t=ve.undiscriminatedUnion([ve.string(),sjr])});var ajr,Vbo=h(()=>{"use strict";Kr();ibo();Lbo();Ubo();ajr=ve.object({bannerLink:ve.string().optional(),introduction:ve.string().optional(),apiReferenceLink:ve.string().optional(),apiName:ve.string().optional(),disabledSections:ve.list(ve.string()).optional(),defaultEndpoint:j3t.optional(),features:ve.record(ve.string(),ve.list(j3t)).optional(),customSections:ve.list(ojr).optional(),exampleStyle:xNr.optional()})});var cjr,Gbo=h(()=>{"use strict";Kr();cjr=ve.object({username:ve.string(),email:ve.string(),token:ve.string()})});var ujr,qbo=h(()=>{"use strict";Kr();Gbo();ujr=ve.object({github:cjr.optional()})});var sxc,axc=h(()=>{"use strict";Kr();gAo();x3t();w3t();Nbo();jbo();F3t();nbo();V2r();Qbo();D3t();Vbo();qbo();sxc=ve.object({"auth-schemes":ve.record(ve.string(),vve).optional(),api:CNr.optional(),whitelabel:ujr.optional(),metadata:Tve.optional(),readme:ajr.optional(),"default-group":ve.string().optional(),aliases:ve.record(ve.string(),ve.list(ve.string())).optional(),groups:ve.record(ve.string(),ejr).optional(),reviewers:Ove.optional(),replay:tjr.optional(),ai:LFr.optional(),autorelease:ve.boolean().optional(),automation:Eve.optional(),openapi:njr.optional(),"openapi-overrides":ve.string().optional(),"spec-origin":ve.string().optional(),"async-api":ve.string().optional(),"api-settings":snt.optional()})});var Wbo=h(()=>{"use strict";nbo();X2r();tbo();fNr();ENr();Fyo();O3t();kyo();V2r();G2r();eNr();Jyo();$2r();Nyo();Kyo();jyo();ibo();zyo();obo();axc();Ryo();zbo();Qbo();Yyo();Mbo();Q2r();M2r();rbo();Qyo();Lyo();Myo();Uyo();_yo();Gyo();qyo();R3t();Xyo();Zyo();sbo();D3t();I6e();L2r();K2r();H2r();$yo();Lbo();_bo();Ubo();Vbo();_2r();Vyo();Hyo();Wyo();ebo();Dyo();P3t();Byo();qbo();Gbo()});var Hbo={};$(Hbo,{ApiConfigurationSchema:()=>CNr,ApiConfigurationSchemaInternal:()=>lnt,ApiConfigurationV2Schema:()=>INr,ApiConfigurationV2SettingsSchema:()=>dnt,ApiConfigurationV2SpecsSchema:()=>mnt,ApiDefinitionList:()=>Y2r,ApiDefinitionPathSchema:()=>xve,ApiDefinitionSchema:()=>J2r,ApiDefinitionSettingsSchema:()=>snt,ApiDefinitionWithOverridesSchema:()=>ant,AsyncApiSettingsSchema:()=>fnt,AsyncApiSpecSchema:()=>mNr,BaseApiSettingsSchema:()=>pnt,CoerceConstsTo:()=>Z2r,ConjureSchema:()=>dNr,DefaultIntegerFormat:()=>tNr,ExampleStyle:()=>xNr,FormParameterEncoding:()=>rNr,GeneratorImageObjectSchema:()=>SNr,GeneratorsConfigurationSchema:()=>sxc,GeneratorsOpenApiObjectSchema:()=>rjr,GeneratorsOpenApiSchema:()=>njr,GitRemoteSchema:()=>q2r,GraphQlSpecSchema:()=>hNr,Language:()=>ijr,MessageNamingSettingsSchema:()=>rnt,MultiServerStrategy:()=>nnt,NamespacedApiConfigurationSchema:()=>vNr,OpenApiErrorResponsesApplyTo:()=>nNr,OpenApiErrorResponsesEnsureSchema:()=>oNr,OpenApiErrorResponsesHttpMethod:()=>iNr,OpenApiErrorResponsesSchema:()=>aNr,OpenApiErrorResponsesSchemaSource:()=>sNr,OpenApiExampleGenerationSchema:()=>cNr,OpenApiFilterSchema:()=>uNr,OpenApiSettingsSchema:()=>wve,OpenApiSpecSchema:()=>gNr,OpenRpcSpecSchema:()=>ANr,OutputMetadataAuthor:()=>wNr,OutputMetadataSchema:()=>Tve,OverridesSchema:()=>y5,PathParameterOrder:()=>int,ProtobufApiDefinitionSchema:()=>unt,ProtobufDefinitionSchema:()=>cnt,ProtobufSpecSchema:()=>yNr,ReadmeCustomSectionSchema:()=>ojr,ReadmeEndpointObjectSchema:()=>sjr,ReadmeEndpointSchema:()=>j3t,ReadmeSchema:()=>ajr,RemoveDiscriminantsFromSchemas:()=>ont,RequestOrResponseExampleGenerationSchema:()=>B3t,ResolveAliases:()=>pNr,ResolveAliasesSchema:()=>lNr,SpecGitSourceSchema:()=>W2r,SpecSchema:()=>bNr,SpecSourceSchema:()=>Sve,UnionSettingsSchema:()=>U2r,WhitelabelConfigurationSchema:()=>ujr,WhitelabelGithubConfigurationSchema:()=>cjr});var cxc=h(()=>{"use strict";Wbo()});var Kbo=h(()=>{"use strict";YNr();ubo();Dbo();kbo();lbo();cbo();Nbo();Fbo();Ebo();Cbo();xbo();Sbo();wbo();Rbo();Tbo();Obo();Pbo();Bbo();pbo();dbo();fbo();mbo();hbo();gbo();ybo();Abo();bbo()});var Jbo={};$(Jbo,{BaseGeneratorInvocationSchema:()=>hnt,CratesOutputLocationSchema:()=>ONr,CustomGeneratorInvocationSchema:()=>XNr,DefaultGeneratorInvocationSchema:()=>ZNr,FernHostedOutputLocationSchema:()=>PNr,GeneratorApiSettingsSchema:()=>TNr,GeneratorGroupSchema:()=>ejr,GeneratorInvocationSchema:()=>$Nr,GeneratorOutputSchema:()=>MNr,GeneratorPublishMetadataSchema:()=>N3t,GeneratorSnippetsSchema:()=>UNr,GithubCommitAndReleaseMode:()=>VNr,GithubCommitAndReleaseSchema:()=>GNr,GithubConfigurationSchema:()=>JNr,GithubPullRequestSchema:()=>qNr,GithubPushSchema:()=>WNr,GithubSelfhostedMode:()=>HNr,GithubSelfhostedSchema:()=>KNr,LocalFileSystemOutputLocationSchema:()=>BNr,MavenOutputLocationSchema:()=>DNr,MavenOutputSignatureSchema:()=>RNr,NpmOutputLocationSchema:()=>kNr,NugetOutputLocationSchema:()=>FNr,PostmanOutputLocationSchema:()=>NNr,PypiOutputLocationSchema:()=>zNr,PypiOutputMetadataSchema:()=>jNr,RubyGemsOutputLocationSchema:()=>QNr});var uxc=h(()=>{"use strict";Kbo()});var Ybo=h(()=>{"use strict";Ibo();v6e();vbo()});var Xbo={};$(Xbo,{GithubLicenseCustomSchema:()=>LNr,GithubLicenseSchema:()=>b5,GithubLicenseType:()=>_Nr});var lxc=h(()=>{"use strict";Ybo()});var Zbo=h(()=>{"use strict";jbo()});var $bo={};$($bo,{ReplayConfigSchema:()=>tjr});var pxc=h(()=>{"use strict";Zbo()});var e0o=h(()=>{"use strict";abo();F3t()});var t0o={};$(t0o,{ReviewerSchema:()=>k3t,ReviewersSchema:()=>Ove});var fxc=h(()=>{"use strict";e0o()});var dxc=h(()=>{"use strict";HCc();AAo();KCc();bAo();oxc();cxc();Wbo();uxc();Kbo();lxc();Ybo();pxc();Zbo();fxc();e0o()});var r0o={};$(r0o,{AiServicesSchema:()=>LFr,ApiConfigurationSchema:()=>CNr,ApiConfigurationSchemaInternal:()=>lnt,ApiConfigurationV2Schema:()=>INr,ApiConfigurationV2SettingsSchema:()=>dnt,ApiConfigurationV2SpecsSchema:()=>mnt,ApiDefinitionList:()=>Y2r,ApiDefinitionPathSchema:()=>xve,ApiDefinitionSchema:()=>J2r,ApiDefinitionSettingsSchema:()=>snt,ApiDefinitionWithOverridesSchema:()=>ant,AsyncApiSettingsSchema:()=>fnt,AsyncApiSpecSchema:()=>mNr,AutomationSchema:()=>Eve,BaseApiSettingsSchema:()=>pnt,BaseGeneratorInvocationSchema:()=>hnt,CoerceConstsTo:()=>Z2r,ConjureSchema:()=>dNr,CratesOutputLocationSchema:()=>ONr,CustomGeneratorInvocationSchema:()=>XNr,DefaultGeneratorInvocationSchema:()=>ZNr,DefaultIntegerFormat:()=>tNr,ExampleStyle:()=>xNr,FernHostedOutputLocationSchema:()=>PNr,FormParameterEncoding:()=>rNr,GeneratorApiSettingsSchema:()=>TNr,GeneratorGroupSchema:()=>ejr,GeneratorImageObjectSchema:()=>SNr,GeneratorInvocationSchema:()=>$Nr,GeneratorOutputSchema:()=>MNr,GeneratorPublishMetadataSchema:()=>N3t,GeneratorSnippetsSchema:()=>UNr,GeneratorsConfigurationSchema:()=>sxc,GeneratorsOpenApiObjectSchema:()=>rjr,GeneratorsOpenApiSchema:()=>njr,GitRemoteSchema:()=>q2r,GithubCommitAndReleaseMode:()=>VNr,GithubCommitAndReleaseSchema:()=>GNr,GithubConfigurationSchema:()=>JNr,GithubLicenseCustomSchema:()=>LNr,GithubLicenseSchema:()=>b5,GithubLicenseType:()=>_Nr,GithubPullRequestSchema:()=>qNr,GithubPushSchema:()=>WNr,GithubSelfhostedMode:()=>HNr,GithubSelfhostedSchema:()=>KNr,GraphQlSpecSchema:()=>hNr,Language:()=>ijr,LocalFileSystemOutputLocationSchema:()=>BNr,MavenOutputLocationSchema:()=>DNr,MavenOutputSignatureSchema:()=>RNr,MessageNamingSettingsSchema:()=>rnt,ModelName:()=>QFr,ModelProvider:()=>MFr,MultiServerStrategy:()=>nnt,NamespacedApiConfigurationSchema:()=>vNr,NpmOutputLocationSchema:()=>kNr,NugetOutputLocationSchema:()=>FNr,OpenApiErrorResponsesApplyTo:()=>nNr,OpenApiErrorResponsesEnsureSchema:()=>oNr,OpenApiErrorResponsesHttpMethod:()=>iNr,OpenApiErrorResponsesSchema:()=>aNr,OpenApiErrorResponsesSchemaSource:()=>sNr,OpenApiExampleGenerationSchema:()=>cNr,OpenApiFilterSchema:()=>uNr,OpenApiSettingsSchema:()=>wve,OpenApiSpecSchema:()=>gNr,OpenRpcSpecSchema:()=>ANr,OutputMetadataAuthor:()=>wNr,OutputMetadataSchema:()=>Tve,OverridesSchema:()=>y5,PathParameterOrder:()=>int,PostmanOutputLocationSchema:()=>NNr,ProtobufApiDefinitionSchema:()=>unt,ProtobufDefinitionSchema:()=>cnt,ProtobufSpecSchema:()=>yNr,PypiOutputLocationSchema:()=>zNr,PypiOutputMetadataSchema:()=>jNr,ReadmeCustomSectionSchema:()=>ojr,ReadmeEndpointObjectSchema:()=>sjr,ReadmeEndpointSchema:()=>j3t,ReadmeSchema:()=>ajr,RemoveDiscriminantsFromSchemas:()=>ont,ReplayConfigSchema:()=>tjr,RequestOrResponseExampleGenerationSchema:()=>B3t,ResolveAliases:()=>pNr,ResolveAliasesSchema:()=>lNr,ReviewerSchema:()=>k3t,ReviewersSchema:()=>Ove,RubyGemsOutputLocationSchema:()=>QNr,SpecGitSourceSchema:()=>W2r,SpecSchema:()=>bNr,SpecSourceSchema:()=>Sve,UnionSettingsSchema:()=>U2r,WhitelabelConfigurationSchema:()=>ujr,WhitelabelGithubConfigurationSchema:()=>cjr,ai:()=>yAo,automation:()=>EAo,fernDefinition:()=>Pyo,generators:()=>Hbo,group:()=>Jbo,license:()=>Xbo,replay:()=>$bo,reviewers:()=>t0o});var mxc=h(()=>{"use strict";dxc()});var hxc=h(()=>{"use strict";kvc();mxc()});function gxc(e){let t=e.output;return t?.location==="maven"&&t.signature==null&&t.url==null}function Axc(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 yxc=h(()=>{"use strict"});function bxc(e){return e?.specs!=null}var Exc=h(()=>{"use strict"});function Ixc(e){return e?.asyncapi!=null}var vxc=h(()=>{"use strict"});function Cxc(e){return e?.conjure!=null}var xxc=h(()=>{"use strict"});function Sxc(e){return e?.graphql!=null}var wxc=h(()=>{"use strict"});function Txc(e){return e?.namespaces!=null}var Oxc=h(()=>{"use strict"});function Pxc(e){return e?.openapi!=null}var Bxc=h(()=>{"use strict"});function Rxc(e){return e?.openrpc!=null}var Dxc=h(()=>{"use strict"});function kxc(e){return e?.proto!=null}var Fxc=h(()=>{"use strict"});var Nxc=h(()=>{"use strict";Exc();vxc();xxc();wxc();Oxc();Bxc();Dxc();Fxc()});var Gr={};$(Gr,{API_ORIGIN_LOCATION_KEY:()=>Icc,API_SETTINGS_KEY:()=>Scc,ASYNC_API_LOCATION_KEY:()=>vcc,CoerceConstsTo:()=>MEc,DEFAULT_GROUP_GENERATORS_CONFIG_KEY:()=>ive,DEFAULT_GROUP_NAME:()=>f6t,DIRECT_RUBYGEMS_PUBLISHING_UNSUPPORTED_MESSAGE:()=>zbc,DefaultIntegerFormat:()=>UEc,ExampleStyle:()=>GEc,FormParameterEncoding:()=>WEc,GenerationLanguage:()=>Lbc,GithubCommitAndReleaseMode:()=>tvc,GithubLicenseType:()=>vvc,GithubSelfhostedMode:()=>avc,Language:()=>eIc,MessageNamingSettingsSchema:()=>rIc,ModelProvider:()=>Xbc,MultiServerStrategy:()=>iIc,OPENAPI_LOCATION_KEY:()=>Ccc,OPENAPI_OVERRIDES_LOCATION_KEY:()=>xcc,OpenApiErrorResponsesApplyTo:()=>aIc,OpenApiErrorResponsesHttpMethod:()=>lIc,PathParameterOrder:()=>vIc,RemoveDiscriminantsFromSchemas:()=>RIc,UnionSettingsSchema:()=>MIc,ai:()=>Ogo,automation:()=>t0c,fernDefinition:()=>_go,generators:()=>Vgo,getPackageName:()=>_bc,getUnsignedMavenPublishingWithoutUrlMessage:()=>Axc,group:()=>qgo,isApiConfigurationV2Schema:()=>bxc,isAsyncApiSpecSchema:()=>Ixc,isConjureSchema:()=>Cxc,isDirectRubyGemsPublishing:()=>Qbc,isGithubAutoMergeEnabled:()=>Vbc,isGraphQLSpecSchema:()=>Sxc,isNamespacedApiConfiguration:()=>Txc,isOpenApiSpecSchema:()=>Pxc,isOpenRpcSpecSchema:()=>Rxc,isProtoSpecSchema:()=>kxc,isRawProtobufAPIDefinitionSchema:()=>qbc,isUnsignedMavenPublishingWithoutUrl:()=>gxc,license:()=>Hgo,replay:()=>wvc,resolveAutomationConfig:()=>Hbc,reviewers:()=>Bvc,serialization:()=>r0o});var jxc=h(()=>{"use strict";JPr();Mbc();Ubc();Gbc();Wbc();Kbc();hxc();yxc();Nxc()});var es=h(()=>{"use strict";Acc();JPr();dfc();Dbc();kbc();jbc();jxc()});function Z$(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 Pve(e){if(typeof e.raw?.config=="object"&&e.raw?.config!==null){let t=e.raw.config["user-agent"];if(t!=null)return t}}function Pud(e){if(!Array.isArray(e))return i0o;let t=e.filter(r=>typeof r=="string").map(r=>r.toUpperCase()).filter(r=>Oud.has(r));return t.length>0?t:i0o}function Bve(e){let t=e.idempotencyKeyGenerationConfig??Bud(e);return Rud(t)}function Bud(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 Rud(e){if(e===!0)return{headerName:zxc,methods:i0o};if(typeof e=="object"&&e!==null){let t=e["header-name"];return{headerName:typeof t=="string"?t:zxc,methods:Pud(e.methods)}}}function Rve(e,t){return Mxc(e.webhookSignatureConfig,t)}function Qxc(e,t){let r=e?.rawConfiguration.api;if(!(r==null||!Gr.isApiConfigurationV2Schema(r)))return Mxc(r.settings?.["webhook-signature"],t)}function Mxc(e,t){if(e==null)return;let r=tm.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 $$(e){if(typeof e!="object"||e===null)return e;let t={};for(let[r,n]of Object.entries(e))Dud.has(r)||(t[r]=n);return t}async function ljr({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??Z$(r);if(r.language==null||o==null)return;let s=r.language,a;try{a=await kud({packageName:o,version:e,language:s})}catch(c){n.logger.debug(`Could not verify version availability on ${n0o(s)}: ${In(c)}`);return}a&&(i?n.failAndThrow(`Version ${e} of ${o} already exists on the ${n0o(s)} registry. Please use a different version number. If you want to automatically increment the version, omit the --version flag.`,void 0,{code:T.Code.VersionError}):n.logger.warn(`Version ${e} of ${o} already exists on the ${n0o(s)} registry. If your CI pipeline publishes this version, it may fail.`))}async function kud({packageName:e,version:t,language:r}){switch(r){case"typescript":return await Fud(e,t);case"python":return await Nud(e,t);case"java":return await jud(e,t);case"csharp":return await zud(e,t);case"ruby":return await Qud(e,t);case"go":return await Mud(e,t);case"rust":return await Lud(e,t);default:return!1}}async function Fud(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(C6e)});return o.ok?(await o.json()).version===t:!1}async function Nud(e,t){return(await fetch(`https://pypi.org/pypi/${e}/${t}/json`,{signal:AbortSignal.timeout(C6e)})).ok}async function jud(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(C6e)});return o.ok?((await o.json()).response?.numFound??0)>0:!1}async function zud(e,t){let r=await fetch(`https://api.nuget.org/v3-flatcontainer/${e.toLowerCase()}/index.json`,{signal:AbortSignal.timeout(C6e)});return r.ok?((await r.json()).versions??[]).some(o=>o.toLowerCase()===t.toLowerCase()):!1}async function Qud(e,t){return(await fetch(`https://rubygems.org/api/v2/rubygems/${e}/versions/${t}.json`,{signal:AbortSignal.timeout(C6e)})).ok}async function Mud(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(C6e)});return i.ok?(await i.json()).Version!=null:!1}async function Lud(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(C6e)});return r.ok?(await r.json()).version?.num===t:!1}function n0o(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 zxc,i0o,Oud,Dud,C6e,o0o=h(()=>{"use strict";es();ct();Io();Dt();zxc="Idempotency-Key",i0o=["POST","PUT"],Oud=new Set(["GET","POST","PUT","PATCH","DELETE","HEAD"]);Dud=new Set(["user-agent","auto-generate-idempotency-key"]);C6e=5e3});var Lxc=E(Z3=>{"use strict";var _ud=Z3&&Z3.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Z3,"__esModule",{value:!0});var Uud=require("fs"),Vud=_ud(ly()),gnt=Vud.default("@kwsites/file-exists");function Gud(e,t,r){gnt("checking %s",e);try{let n=Uud.statSync(e);return n.isFile()&&t?(gnt("[OK] path represents a file"),!0):n.isDirectory()&&r?(gnt("[OK] path represents a directory"),!0):(gnt("[FAIL] path represents something other than a file or directory"),!1)}catch(n){if(n.code==="ENOENT")return gnt("[FAIL] path is not accessible: %o",n),!1;throw gnt("[FATAL] %o",n),n}}function qud(e,t=Z3.READABLE){return Gud(e,(t&Z3.FILE)>0,(t&Z3.FOLDER)>0)}Z3.exists=qud;Z3.FILE=1;Z3.FOLDER=2;Z3.READABLE=Z3.FILE+Z3.FOLDER});var s0o=E(pjr=>{"use strict";function Wud(e){for(var t in e)pjr.hasOwnProperty(t)||(pjr[t]=e[t])}Object.defineProperty(pjr,"__esModule",{value:!0});Wud(Lxc())});function Ant(...e){let t=new String(e);return a0o.set(t,e),t}function E5(e){return e instanceof String&&a0o.has(e)}function ynt(e){return a0o.get(e)??[]}var a0o,Dve=h(()=>{"use strict";a0o=new WeakMap});var z3t=E(x6e=>{"use strict";Object.defineProperty(x6e,"__esModule",{value:!0});x6e.createDeferred=x6e.deferred=void 0;function c0o(){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}}}x6e.deferred=c0o;x6e.createDeferred=c0o;x6e.default=c0o});function*_xc(e,t){let r=t==="global";for(let n of e)n.isGlobal===r&&(yield n)}function Xud(e,t){for(let{name:n}of _xc(e,"task")){if(Hud.has(n))return bnt(!0,t);if(Kud.has(n))return bnt(!1,t)}let r=t.at(0)?.toLowerCase();return r===void 0?null:Jud.has(r)?bnt(!0,t.slice(1)):Yud.has(r)?bnt(!1,t.slice(1)):t.length===1?bnt(!1,t):bnt(!0,t)}function bnt(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 Zud(e,t){return t.isWrite&&t.value!==void 0?{key:t.key,value:t.value,scope:e}:{key:t.key,scope:e}}function $ud(e){let t=e?.indexOf("=")||-1;return!e||t<0?null:{key:e.slice(0,t).trim().toLowerCase(),value:e.slice(t+1)}}function eld(e){for(let{name:t}of _xc(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 tld({name:e}){if(e==="-c"||e==="--config")return"inline";if(e==="--config-env")return"env"}function*rld(e){for(let t of e){let r=tld(t),n=r&&$ud(t.value);n&&(yield{...n,scope:r})}}function nld(e,t,r){let n={read:[],write:[...rld(t)]};return e==="config"&&ild(n,eld(t),Xud(t,r)),n}function ild(e,t,r){if(r===null)return;let n=Zud(t,r);r.isWrite?e.write.push(n):e.read.push(n)}function cld(e){let t=sld[e??""]??ald;return{short:new Map([...Uxc.short.entries(),...t.short.entries()]),long:t.long}}function Vxc(e,t=old){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 uld(e,t.short)}function uld(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 lld(e,t=[]){let r=0;for(;r<e.length;){let n=String(e[r]);if(!n.startsWith("-")||n.length<2)break;let i=Vxc(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 pld(e,t,r=[]){let n=cld(t),i=[],o=[],s=0;for(;s<e.length;){let a=e[s];if(E5(a)){o.push(...ynt(a)),s++;continue}let c=String(a);if(c==="--"){for(let p=s+1;p<e.length;p++){let d=e[p];E5(d)?o.push(...ynt(d)):o.push(String(d))}break}if(!c.startsWith("-")||c.length<2){i.push(c),s++;continue}let u=Vxc(c,n),l=s+1;for(let p of u){let d={name:p.name,value:p.value,absorbedNext:!1,isGlobal:!1};p.needsNext&&d.value===void 0&&l<e.length&&!E5(e[l])&&(d.value=String(e[l]),d.absorbedNext=!0,l++),r.push(d)}s=l}return{flags:r,positionals:i,pathspecs:o}}function*fld({write:e}){for(let t of e)for(let r of dld){let n=r(t.key);n&&(yield n)}}function v5(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 I5(e,t){let r=new RegExp(`\\s*${e.toLowerCase().replace(/\./g,"(..+)?.")}`);return v5(r,t,e)}function*mld(e,t){for(let r of t)for(let n of hld){let i=n(e,r.name);i&&(yield i)}}function Q3t(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 Gxc(e,t,r){return[...mld(e,t),...fld(r)]}function gld(...e){let{flags:t,taskIndex:r}=lld(e),n=r<e.length?String(e[r]).toLowerCase():null,i=n!==null?e.slice(r+1):[],{positionals:o,pathspecs:s}=pld(i,n,t),a=nld(n,t,o);return{task:n,flags:t.map(yld),paths:s,config:a,vulnerabilities:Ald(Gxc(n,t,a))}}function Ald(e){return Object.defineProperty(e,"vulnerabilities",{value:e})}function yld({value:e,name:t}){return e!==void 0?{name:t,value:e}:{name:t}}function*bld(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*Eld(e){for(let t of Object.keys(e))if(Wxc(t)){let r=qxc[t];yield{category:r,message:`Use of "${t.toUpperCase()}" is not permitted without enabling ${r}`}}}function Wxc(e){return Object.hasOwn(qxc,e)}function Ild(e){let t={};for(let[r,n]of Object.entries(e)){let i=r.toLowerCase().trim();(Wxc(i)||i.startsWith("git"))&&(t[i]=String(n))}return t}function vld(e){let t=Ild(e),r={read:[],write:[...bld(t)]},n=[...Eld(t),...Gxc(null,[],r)];return{config:r,vulnerabilities:n}}function Hxc(e,t){return[...gld(...e).vulnerabilities,...vld(t).vulnerabilities]}var Hud,Kud,Jud,Yud,Uxc,old,sld,ald,dld,hld,qxc,Kxc=h(()=>{"use strict";Dve();Hud=new Set(["--add","--edit","--remove-section","--rename-section","--replace-all","--unset","--unset-all","-e"]),Kud=new Set(["--get","--get-all","--get-color","--get-colorbool","--get-regexp","--get-urlmatch","--list","-l"]),Jud=new Set(["edit","remove-section","rename-section","set","unset"]),Yud=new Set(["get","get-color","get-colorbool","list"]);Uxc={short:new Map([["c",!0]])},old={short:new Map([["C",!0],["P",!1],["h",!1],["p",!1],["v",!1],...Uxc.short.entries()]),long:new Set(["attr-source","config-env","exec-path","git-dir","list-cmds","namespace","super-prefix","work-tree"])},sld={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"])}},ald={short:new Map,long:new Set};dld=[v5("alias","allowUnsafeAlias"),v5("core.askPass","allowUnsafeAskPass"),v5("core.editor","allowUnsafeEditor"),v5("core.fsmonitor","allowUnsafeFsMonitor"),v5("core.gitProxy","allowUnsafeGitProxy"),v5("core.hooksPath","allowUnsafeHooksPath"),v5("core.pager","allowUnsafePager"),v5("core.sshCommand","allowUnsafeSshCommand"),I5("credential.helper","allowUnsafeCredentialHelper"),I5("diff.command","allowUnsafeDiffExternal"),v5("diff.external","allowUnsafeDiffExternal"),I5("diff.textconv","allowUnsafeDiffTextConv"),I5("filter.clean","allowUnsafeFilter"),I5("filter.smudge","allowUnsafeFilter"),I5("gpg.program","allowUnsafeGpgProgram"),v5("init.templateDir","allowUnsafeTemplateDir"),I5("merge.driver","allowUnsafeMergeDriver"),I5("mergetool.path","allowUnsafeMergeDriver"),I5("mergetool.cmd","allowUnsafeMergeDriver"),I5("protocol.allow","allowUnsafeProtocolOverride"),I5("remote.receivepack","allowUnsafePack"),I5("remote.uploadpack","allowUnsafePack"),v5("sequence.editor","allowUnsafeEditor")];hld=[Q3t(null,/--(upload|receive)-pack/,"allowUnsafePack","--upload-pack or --receive-pack"),Q3t("clone",/^-\w*u/,"allowUnsafePack"),Q3t("clone","--u","allowUnsafePack"),Q3t("push","--exec","allowUnsafePack"),Q3t(null,"--template","allowUnsafeTemplateDir")];qxc={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 OSc(e){return typeof e!="function"?T6e:e}function PSc(e){return typeof e=="function"&&e!==T6e}function BSc(e,t){let r=e.indexOf(t);return r<=0?[e,""]:[e.substr(0,r),e.substr(r+1)]}function RSc(e,t=0){return DSc(e)&&e.length>t?e[t]:void 0}function w6e(e,t=0){if(DSc(e)&&e.length>t)return e[e.length-1-t]}function DSc(e){return Sjr(e)}function V3t(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 D0o(e,t){return V3t(e,!0).map(r=>t(r))}function k0o(e){return(0,Ijr.exists)(e,Ijr.FOLDER)}function C5(e,t){return Array.isArray(e)?e.includes(t)||e.push(t):e.add(t),t}function kSc(e,t){return Array.isArray(e)&&!e.includes(t)&&e.push(t),e}function vjr(e,t){if(Array.isArray(e)){let r=e.indexOf(t);r>=0&&e.splice(r,1)}else e.delete(t);return t}function eee(e){return Array.isArray(e)?e:[e]}function FSc(e){return e.replace(/[\s-]+(.)/g,(t,r)=>r.toUpperCase())}function xnt(e){return eee(e).map(t=>t instanceof String?t:String(t))}function Zy(e,t=0){if(e==null)return t;let r=parseInt(e,10);return Number.isNaN(r)?t:r}function L3t(e,t){let r=[];for(let n=0,i=e.length;n<i;n++)r.push(t,e[n]);return r}function _3t(e){return(Array.isArray(e)?Buffer.concat(e):e).toString("utf-8")}function NSc(e,t){let r={};return t.forEach(n=>{e[n]!==void 0&&(r[n]=e[n])}),r}function h0o(e=0){return new Promise(t=>setTimeout(t,e))}function g0o(e){if(e!==!1)return e}function SD(e,t,r){return t(e)?e:arguments.length>2?r:void 0}function A0o(e,t){let r=E5(e)?"string":typeof e;return/number|string|boolean/.test(r)&&(!t||!t.includes(r))}function xjr(e){return!!e&&G3t(e)==="[object Object]"}function jSc(e){return typeof e=="function"}function Pld(){throw new Error("LineParser:useMatches not implemented")}function MSc(...e){let t=process.cwd(),r=Object.assign({baseDir:t,...LSc},...e.filter(n=>typeof n=="object"&&n));return r.baseDir=r.baseDir||t,r.trimmed=r.trimmed===!0,r}function N0o(e,t=[]){return xjr(e)?Object.keys(e).reduce((r,n)=>{let i=e[n];if(E5(i))r.push(i);else if(A0o(i,["boolean"]))r.push(n+"="+i);else if(Array.isArray(i))for(let o of i)A0o(o,["string","number"])||r.push(n+"="+o);else r.push(n);return r},t):t}function W2(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 N0o(j0o(e),n),r||n.push(...Dld(e)),n}function Dld(e){let t=typeof w6e(e)=="function";return xnt(SD(w6e(e,t?1:0),q3t,[]))}function j0o(e){let t=jSc(w6e(e));return SD(w6e(e,t?1:0),xjr)}function pE(e,t=!0){let r=OSc(w6e(e));return t||PSc(r)?r:void 0}function b0o(e,t){return e(t.stdOut,t.stdErr)}function TQ(e,t,r,n=!0){return eee(r).forEach(i=>{for(let o=V3t(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 Nld(e){switch(e){case"bare":return GSc();case"root":return VSc()}return{commands:["rev-parse","--is-inside-work-tree"],format:"utf-8",onError:wjr,parser:z0o}}function VSc(){return{commands:["rev-parse","--git-dir"],format:"utf-8",onError:wjr,parser(t){return/^\.(git)?$/.test(t.trim())}}}function GSc(){return{commands:["rev-parse","--is-bare-repository"],format:"utf-8",onError:wjr,parser:z0o}}function jld(e){return/(Not a git repository|Kein Git-Repository)/i.test(String(e))}function zld(e,t){let r=new WSc(e),n=e?KSc:HSc;return V3t(t).forEach(i=>{let o=i.replace(n,"");r.paths.push(o),(JSc.test(o)?r.folders:r.files).push(o)}),r}function YSc(e){return{commands:Tjr,format:"empty",parser:e}}function wQ(e){return{commands:Tjr,format:"empty",parser(){throw typeof e=="string"?new wSc(e):e}}}function H2(e,t=!1){return{commands:e,format:"utf-8",parser(r){return t?String(r).trim():r}}}function XSc(e){return{commands:e,format:"buffer",parser(t){return t}}}function ZSc(e){return e.format==="buffer"}function $Sc(e){return e.format==="empty"||!e.commands.length}function Mld(e,t){let{cleanMode:r,options:n,valid:i}=_ld(e);return r?i.options?(n.push(...t),n.some(Gld)?wQ(Q0o):twc(r,n)):wQ(L0o+JSON.stringify(e)):wQ(M0o)}function twc(e,t){return{commands:["clean",`-${e}`,...t],format:"utf-8",parser(n){return zld(e==="n",n)}}}function Lld(e){return Array.isArray(e)&&e.every(t=>_0o.has(t))}function _ld(e){let t,r=[],n={cleanMode:!1,options:!0};return e.replace(/[^a-z]i/g,"").split("").forEach(i=>{Uld(i)?(t=i,n.cleanMode=!0):n.options=n.options&&Vld(r[r.length]=`-${i}`)}),{cleanMode:t,options:r,valid:n}}function Uld(e){return e==="f"||e==="n"}function Vld(e){return/^-[a-z]$/i.test(e)&&_0o.has(e.charAt(1))}function Gld(e){return/^-[^\-]/.test(e)?e.indexOf("i")>0:e==="--interactive"}function qld(e){let t=new iwc;for(let r of nwc(e))t.addValue(r.file,String(r.key),r.value);return t}function Wld(e,t){let r=null,n=[],i=new Map;for(let o of nwc(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 Hld(e){return e.replace(/^(file):/,"")}function*nwc(e,t=null){let r=e.split("\0");for(let n=0,i=r.length-1;n<i;){let o=Hld(r[n++]),s=r[n++],a=t;if(s.includes(`
144
144
  `)){let c=BSc(s,`
@@ -1625,9 +1625,9 @@ Example: feature/my-fix`}},required:["git"],additionalProperties:!1,description:
1625
1625
  Example: ./src/my-library`}},required:["path"],additionalProperties:!1,description:"Configuration for using a local filesystem path as library source. (Not yet implemented)"},"docs.LibraryInputConfiguration":{anyOf:[{$ref:"#/definitions/docs.GitLibraryInputSchema"},{$ref:"#/definitions/docs.PathLibraryInputSchema"}],description:"Configuration for the library source location."},"docs.LibraryOutputConfiguration":{type:"object",properties:{path:{type:"string",description:`The output directory where MDX files will be generated.
1626
1626
  Example: ./static/sdk-docs`}},required:["path"],additionalProperties:!1,description:"Configuration for the library documentation output."},"docs.LibraryLanguage":{type:"string",enum:["python","cpp"],description:"The programming language of the library source code."},"docs.LibrarySlugStyle":{type:"string",enum:["compact","hyphenated"]},"docs.LibraryConfig":{type:"object",properties:{doxyfile:{oneOf:[{type:"string"},{type:"null"}],description:`Path to a Doxyfile for C++ library documentation, relative to the fern/ directory.
1627
1627
  When provided, the backend uses this Doxyfile instead of auto-generating one.
1628
- Only valid when lang is cpp.`},"include-undocumented-macros":{oneOf:[{type:"boolean"},{type:"null"}],description:"Also generate pages for `#define`s that have no Doxygen comment.\nBy default only documented macros are rendered. Include guards are never\nemitted (Doxygen drops them). Only valid when lang is cpp."},"slug-style":{oneOf:[{$ref:"#/definitions/docs.LibrarySlugStyle"},{type:"null"}],description:"How symbol names become page URLs. `compact` (default) drops underscores\n(`doca_pcc_dev_get_port_counter_id` -> `docapccdevgetportcounterid`);\n`hyphenated` keeps word boundaries (`doca-pcc-dev-get-port-counter-id`).\nChanging this renames every generated page. Only valid when lang is cpp."}},additionalProperties:!1,description:"Language-specific configuration for library documentation.\nValid fields depend on the `lang` value of the parent LibraryConfiguration."},"docs.LibraryConfiguration":{type:"object",properties:{input:{$ref:"#/definitions/docs.LibraryInputConfiguration",description:"Configuration for the library source location."},output:{$ref:"#/definitions/docs.LibraryOutputConfiguration",description:"Configuration for the library documentation output."},lang:{$ref:"#/definitions/docs.LibraryLanguage",description:"The programming language of the library source code."},config:{oneOf:[{$ref:"#/definitions/docs.LibraryConfig"},{type:"null"}],description:"Language-specific configuration options. Valid fields depend on the lang value."}},required:["input","output","lang"],additionalProperties:!1,description:"Configuration for a library documentation source.\nUsed by `fern docs md generate` to generate MDX files from library source code."},"docs.SegmentConfig":{type:"object",properties:{"write-key":{type:"string"}},required:["write-key"],additionalProperties:!1},"docs.FullStoryAnalyticsConfig":{type:"object",properties:{"org-id":{type:"string"}},required:["org-id"],additionalProperties:!1},"docs.IntercomConfig":{type:"object",properties:{"app-id":{type:"string"},"api-base":{oneOf:[{type:"string"},{type:"null"}]}},required:["app-id"],additionalProperties:!1},"docs.PostHogConfig":{type:"object",properties:{"api-key":{type:"string",description:'Your PostHog project API key. Defaults to the api-host of "https://us.i.posthog.com".'},endpoint:{oneOf:[{type:"string"},{type:"null"}]}},required:["api-key"],additionalProperties:!1},"docs.GTMConfig":{type:"object",properties:{"container-id":{type:"string",description:'Your Google Tag Manager container ID. Must start with "GTM-".'}},required:["container-id"],additionalProperties:!1},"docs.GoogleAnalytics4Config":{type:"object",properties:{"measurement-id":{type:"string",description:'Your Google Analytics 4 measurement ID. Must start with "G-".'}},required:["measurement-id"],additionalProperties:!1},"docs.AnalyticsConfig":{type:"object",properties:{segment:{oneOf:[{$ref:"#/definitions/docs.SegmentConfig"},{type:"null"}]},fullstory:{oneOf:[{$ref:"#/definitions/docs.FullStoryAnalyticsConfig"},{type:"null"}]},intercom:{oneOf:[{$ref:"#/definitions/docs.IntercomConfig"},{type:"null"}]},posthog:{oneOf:[{$ref:"#/definitions/docs.PostHogConfig"},{type:"null"}]},gtm:{oneOf:[{$ref:"#/definitions/docs.GTMConfig"},{type:"null"}]},ga4:{oneOf:[{$ref:"#/definitions/docs.GoogleAnalytics4Config"},{type:"null"}]}},additionalProperties:!1},"docs.AnnouncementConfig":{type:"object",properties:{message:{type:"string",description:"The message to display in the announcement bar. Markdown is supported."}},required:["message"],additionalProperties:!1},"docs.RoleId":{type:"string",description:"ID of role which is used to filter the content shown in Fern Docs."},"docs.Role":{anyOf:[{$ref:"#/definitions/docs.RoleId"},{type:"array",items:{$ref:"#/definitions/docs.RoleId"}}],description:"Audience can either be a string or list of strings\ni.e. `audience: internal` or `audience: [internal, beta]`"},"docs.FeatureFlag":{type:"object",properties:{flag:{type:"string",description:"The name of the feature flag to check."},"fallback-value":{oneOf:[{type:["string","number","boolean","object","array","null"]},{type:"null"}],description:"The default value to use if the feature flag is not set. If not specified, defaults to false."},match:{oneOf:[{type:["string","number","boolean","object","array","null"]},{type:"null"}],description:"The value that the feature flag should match for the content to be shown. If not specified, content is shown when the flag is true."}},required:["flag"],additionalProperties:!1},"docs.FeatureFlagConfiguration":{anyOf:[{type:"string",description:"The name of the feature flag, We assume that it is a boolean feature flag that needs to be evaluated to true."},{$ref:"#/definitions/docs.FeatureFlag",description:"A single feature flag with a configurable name, fallback value, and match value. Especially useful for non boolean feature flags."},{type:"array",items:{$ref:"#/definitions/docs.FeatureFlag"},description:"A list of feature flags. If any of the feature flags are satisfied, we will show all content."}]},"docs.Target":{type:"string",enum:["_blank","_self","_parent","_top"]},"docs.ChangelogFolderRelativePath":{type:"string",description:'The relative path to a folder containing markdown files broken down by date.\n\nExample:\n```\nchangelog: "changelog"\n```\n\nThis will look for markdown files in the `/fern/changelog` directory, which should contain files named like\n- `/fern/changelog/2024-04-29.mdx`.\n- `/fern/changelog/2023-01-02.mdx`.'},"docs.TabConfig":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},"display-name":{type:"string"},icon:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},href:{oneOf:[{type:"string"},{type:"null"}],description:"If `href` is set, clicking on the tab will redirect to the given URL.\n\nTabs with `href` must not have children in the navigation config."},target:{oneOf:[{$ref:"#/definitions/docs.Target"},{type:"null"}]},changelog:{oneOf:[{$ref:"#/definitions/docs.ChangelogFolderRelativePath"},{type:"null"}]},blog:{oneOf:[{$ref:"#/definitions/docs.ChangelogFolderRelativePath"},{type:"null"}]}},required:["display-name"],additionalProperties:!1},"docs.VersionAvailability":{type:"string",enum:["deprecated","legacy","ga","stable","beta","alpha","preview"]},"docs.VersionConfig":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},"display-name":{type:"string"},path:{oneOf:[{type:"string"},{type:"null"}],description:"The relative path to the version's docs.yml file. Required unless `ref` is set,\nin which case the version's content is built from that git ref."},ref:{oneOf:[{type:"string"},{type:"null"}],description:"A git ref\u2014branch, tag, or commit SHA\u2014whose committed content is built for this\nversion. Branches are mutable and resolve to their latest commit on the remote;\ntags and commit SHAs are immutable.\n\nThe CLI checks out the ref and reads the docs.yml committed there to locate the\npages to build:\n- For a version listed under top-level `versions`, it uses the ref's docs.yml\n `versions` list and takes the first entry that has a `path` (skipping entries\n that have a `ref`). If the ref's docs.yml has no such entry, it uses the ref's\n top-level `navigation`.\n- For a version listed under `products[].versions`, it finds the product with the\n same `slug` (or, when either side has no `slug`, the same `display-name`) in the\n ref's docs.yml and applies the same rule to that product's `versions` list,\n falling back to the `navigation` in that product's file.\nEntries with a `ref` in the ref's docs.yml are ignored: only the docs.yml being\nbuilt determines which versions are published."},slug:{oneOf:[{type:"string"},{type:"null"}],description:`The "slug" is this version's basePath. If not set, the slug will be generated from the display-name.`},availability:{oneOf:[{$ref:"#/definitions/docs.VersionAvailability"},{type:"null"}],description:"If `availability` is set to `deprecated`, Fern will display a warning banner on the docs site."},audiences:{oneOf:[{$ref:"#/definitions/docs.Audience"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}],description:"If true, this version will be hidden from navigation, search, and indexing, but still accessible via direct URL."},default:{oneOf:[{type:"boolean"},{type:"null"}],description:"If true, this version is the default version: it is served at the unversioned URLs\n(without the version slug) and is used for canonical URLs, the sitemap, search, and\n`llms.txt`. The order of the `versions` list only controls the order in the version\nswitcher. At most one version in a `versions` list may set `default: true`, and the\ndefault version cannot be `hidden`. A default version may be built from the working\ntree (`path`) or from a git ref (`ref`). If no version sets `default`, the first\nversion in the list is the default."},announcement:{oneOf:[{$ref:"#/definitions/docs.AnnouncementConfig"},{type:"null"}]}},required:["display-name"],additionalProperties:!1},"docs.InternalProduct":{type:"object",properties:{"display-name":{type:"string"},subtitle:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},image:{oneOf:[{type:"string"},{type:"null"}],description:"The image to display in the product card. This will override the icon field if both are set."},versions:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.VersionConfig"}},{type:"null"}]},audiences:{oneOf:[{$ref:"#/definitions/docs.Audience"},{type:"null"}]},viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},path:{type:"string",description:"The relative path to the version's docs.yml file."},slug:{oneOf:[{type:"string"},{type:"null"}],description:`The "slug" is this version's basePath. If not set, the slug will be generated from the display-name.`},announcement:{oneOf:[{$ref:"#/definitions/docs.AnnouncementConfig"},{type:"null"}]}},required:["display-name","path"],additionalProperties:!1},"docs.ExternalProduct":{type:"object",properties:{"display-name":{type:"string"},subtitle:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},image:{oneOf:[{type:"string"},{type:"null"}],description:"The image to display in the product card. This will override the icon field if both are set."},versions:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.VersionConfig"}},{type:"null"}]},audiences:{oneOf:[{$ref:"#/definitions/docs.Audience"},{type:"null"}]},viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},href:{type:"string",description:"The absolute URL to the product."},target:{oneOf:[{$ref:"#/definitions/docs.Target"},{type:"null"}],description:"The target of the URL"}},required:["display-name","href"],additionalProperties:!1},"docs.ProductConfig":{anyOf:[{$ref:"#/definitions/docs.InternalProduct"},{$ref:"#/definitions/docs.ExternalProduct"}]},"docs.ChangelogConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},changelog:{$ref:"#/definitions/docs.ChangelogFolderRelativePath"},title:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]}},required:["changelog"],additionalProperties:!1},"docs.Availability":{type:"string",enum:["stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"]},"docs.PageConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},page:{type:"string"},path:{type:"string"},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},noindex:{oneOf:[{type:"boolean"},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]}},required:["page","path"],additionalProperties:!1},"docs.CollapsedStringValue":{type:"string",enum:["open-by-default"]},"docs.CollapsedValue":{anyOf:[{type:"boolean"},{$ref:"#/definitions/docs.CollapsedStringValue"}]},"docs.SectionConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},section:{type:"string"},path:{oneOf:[{type:"string"},{type:"null"}],description:"The relative path to the markdown file that will be displayed when the section is clicked."},contents:{type:"array",items:{$ref:"#/definitions/docs.NavigationItem"}},collapsed:{oneOf:[{$ref:"#/definitions/docs.CollapsedValue"},{type:"null"}],description:"Deprecated. Use `collapsible` and `collapsed-by-default` instead."},collapsible:{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section can be expanded/collapsed by the user."},"collapsed-by-default":{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section starts collapsed. Only meaningful when `collapsible` is true. Defaults to false (starts open)."},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]}},required:["section","contents"],additionalProperties:!1},"docs.ApiSpecType":{type:"string",enum:["openapi","asyncapi","graphql"]},"docs.ApiSpecErrorResponseSchemaSource":{anyOf:[{type:"string"},{type:"object",additionalProperties:{type:["string","number","boolean","object","array","null"]}}]},"docs.ApiSpecErrorResponseApplyTo":{type:"string",enum:["all","untyped"]},"docs.ApiSpecErrorResponseHttpMethod":{type:"string",enum:["get","post","put","patch","delete","head","options","trace"]},"docs.ApiSpecErrorResponseEnsure":{type:"object",properties:{"status-code":{type:"integer",description:"The 4xx/5xx status code to add when an operation does not declare it."},methods:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiSpecErrorResponseHttpMethod"}},{type:"null"}]}},required:["status-code"],additionalProperties:!1},"docs.ApiSpecErrorResponses":{type:"object",properties:{schema:{$ref:"#/definitions/docs.ApiSpecErrorResponseSchemaSource"},name:{oneOf:[{type:"string"},{type:"null"}]},"apply-to":{oneOf:[{$ref:"#/definitions/docs.ApiSpecErrorResponseApplyTo"},{type:"null"}]},ensure:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiSpecErrorResponseEnsure"}},{type:"null"}]}},required:["schema"],additionalProperties:!1},"docs.ApiSpecImportSettings":{type:"object",properties:{"type-dates-as-strings":{oneOf:[{type:"boolean"},{type:"null"}]},"use-bytes-for-binary-response":{oneOf:[{type:"boolean"},{type:"null"}]},"respect-parameter-content":{oneOf:[{type:"boolean"},{type:"null"}]},"respect-operation-id-word-boundaries":{oneOf:[{type:"boolean"},{type:"null"}]},"infer-forward-compatible":{oneOf:[{type:"boolean"},{type:"null"}]},"preserve-one-of-in-all-of":{oneOf:[{type:"boolean"},{type:"null"}]},"any-of-sibling-properties-as-object":{oneOf:[{type:"boolean"},{type:"null"}]},"error-responses":{oneOf:[{$ref:"#/definitions/docs.ApiSpecErrorResponses"},{type:"null"}]}},additionalProperties:!1,description:"Import settings that affect the API definition rendered by Fern Docs."},"docs.ApiSpecConfiguration":{type:"object",properties:{type:{$ref:"#/definitions/docs.ApiSpecType"},path:{type:"string",description:"Path to the API specification, relative to docs.yml."},namespace:{oneOf:[{type:"string"},{type:"null"}]},overlays:{oneOf:[{type:"string"},{type:"null"}],description:"Path to an OpenAPI Overlay document, relative to docs.yml."},overrides:{oneOf:[{type:"array",items:{type:"string"}},{type:"null"}],description:"Paths to Fern override documents, relative to docs.yml."},settings:{oneOf:[{$ref:"#/definitions/docs.ApiSpecImportSettings"},{type:"null"}],description:"Import settings that affect the rendered API reference."}},required:["type","path"],additionalProperties:!1,description:"A source API specification referenced directly by docs.yml."},"docs.VersionedSnippetLanguageConfiguration":{type:"object",properties:{version:{type:"string"},package:{type:"string"}},required:["version","package"],additionalProperties:!1},"docs.SnippetLanguageConfiguration":{anyOf:[{type:"string"},{$ref:"#/definitions/docs.VersionedSnippetLanguageConfiguration"}],description:`This snippets config object is meant to allow users to specify a specific package for the snippets,
1628
+ Only valid when lang is cpp.`},"include-undocumented-macros":{oneOf:[{type:"boolean"},{type:"null"}],description:"Also generate pages for `#define`s that have no Doxygen comment.\nBy default only documented macros are rendered. Include guards are never\nemitted (Doxygen drops them). Only valid when lang is cpp."},"slug-style":{oneOf:[{$ref:"#/definitions/docs.LibrarySlugStyle"},{type:"null"}],description:"How symbol names become page URLs. `compact` (default) drops underscores\n(`doca_pcc_dev_get_port_counter_id` -> `docapccdevgetportcounterid`);\n`hyphenated` keeps word boundaries (`doca-pcc-dev-get-port-counter-id`).\nChanging this renames every generated page. Only valid when lang is cpp."}},additionalProperties:!1,description:"Language-specific configuration for library documentation.\nValid fields depend on the `lang` value of the parent LibraryConfiguration."},"docs.LibraryConfiguration":{type:"object",properties:{input:{$ref:"#/definitions/docs.LibraryInputConfiguration",description:"Configuration for the library source location."},output:{$ref:"#/definitions/docs.LibraryOutputConfiguration",description:"Configuration for the library documentation output."},lang:{$ref:"#/definitions/docs.LibraryLanguage",description:"The programming language of the library source code."},config:{oneOf:[{$ref:"#/definitions/docs.LibraryConfig"},{type:"null"}],description:"Language-specific configuration options. Valid fields depend on the lang value."}},required:["input","output","lang"],additionalProperties:!1,description:"Configuration for a library documentation source.\nUsed by `fern docs md generate` to generate MDX files from library source code."},"docs.SegmentConfig":{type:"object",properties:{"write-key":{type:"string"}},required:["write-key"],additionalProperties:!1},"docs.FullStoryAnalyticsConfig":{type:"object",properties:{"org-id":{type:"string"}},required:["org-id"],additionalProperties:!1},"docs.IntercomConfig":{type:"object",properties:{"app-id":{type:"string"},"api-base":{oneOf:[{type:"string"},{type:"null"}]}},required:["app-id"],additionalProperties:!1},"docs.PostHogConfig":{type:"object",properties:{"api-key":{type:"string",description:'Your PostHog project API key. Defaults to the api-host of "https://us.i.posthog.com".'},endpoint:{oneOf:[{type:"string"},{type:"null"}]}},required:["api-key"],additionalProperties:!1},"docs.GTMConfig":{type:"object",properties:{"container-id":{type:"string",description:'Your Google Tag Manager container ID. Must start with "GTM-".'}},required:["container-id"],additionalProperties:!1},"docs.GoogleAnalytics4Config":{type:"object",properties:{"measurement-id":{type:"string",description:'Your Google Analytics 4 measurement ID. Must start with "G-".'}},required:["measurement-id"],additionalProperties:!1},"docs.AnalyticsConfig":{type:"object",properties:{segment:{oneOf:[{$ref:"#/definitions/docs.SegmentConfig"},{type:"null"}]},fullstory:{oneOf:[{$ref:"#/definitions/docs.FullStoryAnalyticsConfig"},{type:"null"}]},intercom:{oneOf:[{$ref:"#/definitions/docs.IntercomConfig"},{type:"null"}]},posthog:{oneOf:[{$ref:"#/definitions/docs.PostHogConfig"},{type:"null"}]},gtm:{oneOf:[{$ref:"#/definitions/docs.GTMConfig"},{type:"null"}]},ga4:{oneOf:[{$ref:"#/definitions/docs.GoogleAnalytics4Config"},{type:"null"}]}},additionalProperties:!1},"docs.AnnouncementConfig":{type:"object",properties:{message:{type:"string",description:"The message to display in the announcement bar. Markdown is supported."}},required:["message"],additionalProperties:!1},"docs.RoleId":{type:"string",description:"ID of role which is used to filter the content shown in Fern Docs."},"docs.Role":{anyOf:[{$ref:"#/definitions/docs.RoleId"},{type:"array",items:{$ref:"#/definitions/docs.RoleId"}}],description:"Audience can either be a string or list of strings\ni.e. `audience: internal` or `audience: [internal, beta]`"},"docs.FeatureFlag":{type:"object",properties:{flag:{type:"string",description:"The name of the feature flag to check."},"fallback-value":{oneOf:[{type:["string","number","boolean","object","array","null"]},{type:"null"}],description:"The default value to use if the feature flag is not set. If not specified, defaults to false."},match:{oneOf:[{type:["string","number","boolean","object","array","null"]},{type:"null"}],description:"The value that the feature flag should match for the content to be shown. If not specified, content is shown when the flag is true."}},required:["flag"],additionalProperties:!1},"docs.FeatureFlagConfiguration":{anyOf:[{type:"string",description:"The name of the feature flag, We assume that it is a boolean feature flag that needs to be evaluated to true."},{$ref:"#/definitions/docs.FeatureFlag",description:"A single feature flag with a configurable name, fallback value, and match value. Especially useful for non boolean feature flags."},{type:"array",items:{$ref:"#/definitions/docs.FeatureFlag"},description:"A list of feature flags. If any of the feature flags are satisfied, we will show all content."}]},"docs.Target":{type:"string",enum:["_blank","_self","_parent","_top"]},"docs.ChangelogFolderRelativePath":{type:"string",description:'The relative path to a folder containing markdown files broken down by date.\n\nExample:\n```\nchangelog: "changelog"\n```\n\nThis will look for markdown files in the `/fern/changelog` directory, which should contain files named like\n- `/fern/changelog/2024-04-29.mdx`.\n- `/fern/changelog/2023-01-02.mdx`.'},"docs.TabConfig":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},"display-name":{type:"string"},icon:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},href:{oneOf:[{type:"string"},{type:"null"}],description:"If `href` is set, clicking on the tab will redirect to the given URL.\n\nTabs with `href` must not have children in the navigation config."},target:{oneOf:[{$ref:"#/definitions/docs.Target"},{type:"null"}]},changelog:{oneOf:[{$ref:"#/definitions/docs.ChangelogFolderRelativePath"},{type:"null"}]},blog:{oneOf:[{$ref:"#/definitions/docs.ChangelogFolderRelativePath"},{type:"null"}]}},required:["display-name"],additionalProperties:!1},"docs.VersionAvailability":{type:"string",enum:["deprecated","legacy","ga","stable","beta","alpha","preview"]},"docs.VersionConfig":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},"display-name":{type:"string"},path:{oneOf:[{type:"string"},{type:"null"}],description:"The relative path to the version's docs.yml file. Required unless `ref` is set,\nin which case the version's content is built from that git ref."},ref:{oneOf:[{type:"string"},{type:"null"}],description:"A git ref\u2014branch, tag, or commit SHA\u2014whose committed content is built for this\nversion. Branches are mutable and resolve to their latest commit on the remote;\ntags and commit SHAs are immutable.\n\nThe CLI checks out the ref and reads the docs.yml committed there to locate the\npages to build:\n- For a version listed under top-level `versions`, it uses the ref's docs.yml\n `versions` list and takes the first entry that has a `path` (skipping entries\n that have a `ref`). If the ref's docs.yml has no such entry, it uses the ref's\n top-level `navigation`.\n- For a version listed under `products[].versions`, it finds the product with the\n same `slug` (or, when either side has no `slug`, the same `display-name`) in the\n ref's docs.yml and applies the same rule to that product's `versions` list,\n falling back to the `navigation` in that product's file.\nEntries with a `ref` in the ref's docs.yml are ignored: only the docs.yml being\nbuilt determines which versions are published."},slug:{oneOf:[{type:"string"},{type:"null"}],description:`The "slug" is this version's basePath. If not set, the slug will be generated from the display-name.`},availability:{oneOf:[{$ref:"#/definitions/docs.VersionAvailability"},{type:"null"}],description:"If `availability` is set to `deprecated`, Fern will display a warning banner on the docs site."},audiences:{oneOf:[{$ref:"#/definitions/docs.Audience"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}],description:"If true, this version will be hidden from navigation, search, and indexing, but still accessible via direct URL."},default:{oneOf:[{type:"boolean"},{type:"null"}],description:"If true, this version is the default version: it is served at the unversioned URLs\n(without the version slug) and is used for canonical URLs, the sitemap, search, and\n`llms.txt`. The order of the `versions` list only controls the order in the version\nswitcher. At most one version in a `versions` list may set `default: true`, and the\ndefault version cannot be `hidden`. A default version may be built from the working\ntree (`path`) or from a git ref (`ref`). If no version sets `default`, the first\nversion in the list is the default."},announcement:{oneOf:[{$ref:"#/definitions/docs.AnnouncementConfig"},{type:"null"}]}},required:["display-name"],additionalProperties:!1},"docs.InternalProduct":{type:"object",properties:{"display-name":{type:"string"},subtitle:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},image:{oneOf:[{type:"string"},{type:"null"}],description:"The image to display in the product card. This will override the icon field if both are set."},versions:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.VersionConfig"}},{type:"null"}]},audiences:{oneOf:[{$ref:"#/definitions/docs.Audience"},{type:"null"}]},viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},path:{type:"string",description:"The relative path to the version's docs.yml file."},slug:{oneOf:[{type:"string"},{type:"null"}],description:`The "slug" is this version's basePath. If not set, the slug will be generated from the display-name.`},announcement:{oneOf:[{$ref:"#/definitions/docs.AnnouncementConfig"},{type:"null"}]}},required:["display-name","path"],additionalProperties:!1},"docs.ExternalProduct":{type:"object",properties:{"display-name":{type:"string"},subtitle:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},image:{oneOf:[{type:"string"},{type:"null"}],description:"The image to display in the product card. This will override the icon field if both are set."},versions:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.VersionConfig"}},{type:"null"}]},audiences:{oneOf:[{$ref:"#/definitions/docs.Audience"},{type:"null"}]},viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},href:{type:"string",description:"The absolute URL to the product."},target:{oneOf:[{$ref:"#/definitions/docs.Target"},{type:"null"}],description:"The target of the URL"}},required:["display-name","href"],additionalProperties:!1},"docs.ProductConfig":{anyOf:[{$ref:"#/definitions/docs.InternalProduct"},{$ref:"#/definitions/docs.ExternalProduct"}]},"docs.ChangelogConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},changelog:{$ref:"#/definitions/docs.ChangelogFolderRelativePath"},title:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]}},required:["changelog"],additionalProperties:!1},"docs.Availability":{type:"string",enum:["stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"]},"docs.PageConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},page:{type:"string"},path:{type:"string"},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},noindex:{oneOf:[{type:"boolean"},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]}},required:["page","path"],additionalProperties:!1},"docs.TabId":{type:"string"},"docs.CollapsedStringValue":{type:"string",enum:["open-by-default"]},"docs.CollapsedValue":{anyOf:[{type:"boolean"},{$ref:"#/definitions/docs.CollapsedStringValue"}]},"docs.SectionConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},section:{type:"string"},path:{oneOf:[{type:"string"},{type:"null"}],description:"The relative path to the markdown file that will be displayed when the section is clicked."},contents:{type:"array",items:{$ref:"#/definitions/docs.NavigationItem"}},collapsed:{oneOf:[{$ref:"#/definitions/docs.CollapsedValue"},{type:"null"}],description:"Deprecated. Use `collapsible` and `collapsed-by-default` instead."},collapsible:{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section can be expanded/collapsed by the user."},"collapsed-by-default":{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section starts collapsed. Only meaningful when `collapsible` is true. Defaults to false (starts open)."},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]}},required:["section","contents"],additionalProperties:!1},"docs.ApiSpecType":{type:"string",enum:["openapi","asyncapi","graphql"]},"docs.ApiSpecErrorResponseSchemaSource":{anyOf:[{type:"string"},{type:"object",additionalProperties:{type:["string","number","boolean","object","array","null"]}}]},"docs.ApiSpecErrorResponseApplyTo":{type:"string",enum:["all","untyped"]},"docs.ApiSpecErrorResponseHttpMethod":{type:"string",enum:["get","post","put","patch","delete","head","options","trace"]},"docs.ApiSpecErrorResponseEnsure":{type:"object",properties:{"status-code":{type:"integer",description:"The 4xx/5xx status code to add when an operation does not declare it."},methods:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiSpecErrorResponseHttpMethod"}},{type:"null"}]}},required:["status-code"],additionalProperties:!1},"docs.ApiSpecErrorResponses":{type:"object",properties:{schema:{$ref:"#/definitions/docs.ApiSpecErrorResponseSchemaSource"},name:{oneOf:[{type:"string"},{type:"null"}]},"apply-to":{oneOf:[{$ref:"#/definitions/docs.ApiSpecErrorResponseApplyTo"},{type:"null"}]},ensure:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiSpecErrorResponseEnsure"}},{type:"null"}]}},required:["schema"],additionalProperties:!1},"docs.ApiSpecImportSettings":{type:"object",properties:{"type-dates-as-strings":{oneOf:[{type:"boolean"},{type:"null"}]},"use-bytes-for-binary-response":{oneOf:[{type:"boolean"},{type:"null"}]},"respect-parameter-content":{oneOf:[{type:"boolean"},{type:"null"}]},"respect-operation-id-word-boundaries":{oneOf:[{type:"boolean"},{type:"null"}]},"infer-forward-compatible":{oneOf:[{type:"boolean"},{type:"null"}]},"preserve-one-of-in-all-of":{oneOf:[{type:"boolean"},{type:"null"}]},"any-of-sibling-properties-as-object":{oneOf:[{type:"boolean"},{type:"null"}]},"error-responses":{oneOf:[{$ref:"#/definitions/docs.ApiSpecErrorResponses"},{type:"null"}]}},additionalProperties:!1,description:"Import settings that affect the API definition rendered by Fern Docs."},"docs.ApiSpecConfiguration":{type:"object",properties:{type:{$ref:"#/definitions/docs.ApiSpecType"},path:{type:"string",description:"Path to the API specification, relative to docs.yml."},namespace:{oneOf:[{type:"string"},{type:"null"}]},overlays:{oneOf:[{type:"string"},{type:"null"}],description:"Path to an OpenAPI Overlay document, relative to docs.yml."},overrides:{oneOf:[{type:"array",items:{type:"string"}},{type:"null"}],description:"Paths to Fern override documents, relative to docs.yml."},settings:{oneOf:[{$ref:"#/definitions/docs.ApiSpecImportSettings"},{type:"null"}],description:"Import settings that affect the rendered API reference."}},required:["type","path"],additionalProperties:!1,description:"A source API specification referenced directly by docs.yml."},"docs.VersionedSnippetLanguageConfiguration":{type:"object",properties:{version:{type:"string"},package:{type:"string"}},required:["version","package"],additionalProperties:!1},"docs.SnippetLanguageConfiguration":{anyOf:[{type:"string"},{$ref:"#/definitions/docs.VersionedSnippetLanguageConfiguration"}],description:`This snippets config object is meant to allow users to specify a specific package for the snippets,
1629
1629
  and optionally a version for that package. If you pass in a string, that should be the name of the package.`},"docs.SnippetsConfiguration":{type:"object",properties:{python:{oneOf:[{$ref:"#/definitions/docs.SnippetLanguageConfiguration"},{type:"null"}]},typescript:{oneOf:[{$ref:"#/definitions/docs.SnippetLanguageConfiguration"},{type:"null"}]},go:{oneOf:[{$ref:"#/definitions/docs.SnippetLanguageConfiguration"},{type:"null"}]},java:{oneOf:[{$ref:"#/definitions/docs.SnippetLanguageConfiguration"},{type:"null"}]},ruby:{oneOf:[{$ref:"#/definitions/docs.SnippetLanguageConfiguration"},{type:"null"}]},csharp:{oneOf:[{$ref:"#/definitions/docs.SnippetLanguageConfiguration"},{type:"null"}]},php:{oneOf:[{$ref:"#/definitions/docs.SnippetLanguageConfiguration"},{type:"null"}]},swift:{oneOf:[{$ref:"#/definitions/docs.SnippetLanguageConfiguration"},{type:"null"}]},rust:{oneOf:[{$ref:"#/definitions/docs.SnippetLanguageConfiguration"},{type:"null"}]},cli:{oneOf:[{$ref:"#/definitions/docs.SnippetLanguageConfiguration"},{type:"null"}]}},additionalProperties:!1},"docs.PlaygroundButtonSettings":{type:"object",properties:{href:{oneOf:[{type:"string"},{type:"null"}]}},additionalProperties:!1},"docs.PlaygroundSettings":{type:"object",properties:{hidden:{oneOf:[{type:"boolean"},{type:"null"}]},environments:{oneOf:[{type:"array",items:{type:"string"}},{type:"null"}],description:"A list of environment IDs that are allowed to be used in the playground. If not provided, all environments are allowed. And if the provided list is empty, the playground should be disabled."},button:{oneOf:[{$ref:"#/definitions/docs.PlaygroundButtonSettings"},{type:"null"}]},oauth:{oneOf:[{type:"boolean"},{type:"null"}]},"limit-websocket-messages-per-connection":{oneOf:[{type:"integer"},{type:"null"}],description:"The maximum number of websocket messages per connection in the playground."},"send-optional-defaults":{oneOf:[{type:"boolean"},{type:"null"}],description:`When true, optional parameters that declare a default (or x-fern-default) are
1630
- pre-filled and sent from the API Explorer playground. Defaults to false.`}},additionalProperties:!1},"docs.ApiReferencePackageConfigurationWithOptions":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},title:{oneOf:[{type:"string"},{type:"null"}]},summary:{oneOf:[{type:"string"},{type:"null"}],description:"Relative path to the markdown file. This summary is displayed at the top of the API section."},contents:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiReferenceLayoutItem"}},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},playground:{oneOf:[{$ref:"#/definitions/docs.PlaygroundSettings"},{type:"null"}],description:"Settings for the api playground that is applied only to descendants of this api package."}},additionalProperties:!1},"docs.ApiReferencePackageConfiguration":{anyOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiReferenceLayoutItem"}},{$ref:"#/definitions/docs.ApiReferencePackageConfigurationWithOptions"}]},"docs.ApiReferenceSectionConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},section:{type:"string",description:"The title of the api package that will be displayed in the sidebar."},"referenced-packages":{oneOf:[{type:"array",items:{type:"string"}},{type:"null"}],description:"This section will inherit the endpoints from the specified subpackage(s). If multiple packages are specified, they will be merged."},summary:{oneOf:[{type:"string"},{type:"null"}],description:"Relative path to the markdown file."},contents:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiReferenceLayoutItem"}},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},collapsed:{oneOf:[{$ref:"#/definitions/docs.CollapsedValue"},{type:"null"}],description:"Deprecated. Use `collapsible` and `collapsed-by-default` instead."},collapsible:{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section can be expanded/collapsed by the user in the sidebar."},"collapsed-by-default":{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section starts collapsed. Only meaningful when collapsible is true."},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]},playground:{oneOf:[{$ref:"#/definitions/docs.PlaygroundSettings"},{type:"null"}],description:"Settings for the api playground that affects all endpoints."}},required:["section"],additionalProperties:!1},"docs.ApiReferenceEndpointConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},endpoint:{type:"string"},title:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]},playground:{oneOf:[{$ref:"#/definitions/docs.PlaygroundSettings"},{type:"null"}],description:"Settings for the api playground that affect this endpoint specifically."}},required:["endpoint"],additionalProperties:!1},"docs.ApiReferenceOperationConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},operation:{type:"string"},title:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]}},required:["operation"],additionalProperties:!1,description:"Defines a GraphQL-native schema for selecting operations (REST -> Endpoint === GraphQL -> Operation)"},"docs.LinkConfiguration":{type:"object",properties:{link:{type:"string"},href:{type:"string"},icon:{oneOf:[{type:"string"},{type:"null"}]},target:{oneOf:[{$ref:"#/definitions/docs.Target"},{type:"null"}]}},required:["link","href"],additionalProperties:!1},"docs.ApiReferenceLayoutItem":{anyOf:[{type:"string",description:"This should be either an endpoint, websocket, webhook, or subpackage ID"},{type:"object",additionalProperties:{$ref:"#/definitions/docs.ApiReferencePackageConfiguration"},description:"Keyed by subpackage name, this object allows you to group endpoints and pages together."},{$ref:"#/definitions/docs.ApiReferenceSectionConfiguration"},{$ref:"#/definitions/docs.ApiReferenceEndpointConfiguration"},{$ref:"#/definitions/docs.ApiReferenceOperationConfiguration"},{$ref:"#/definitions/docs.PageConfiguration"},{$ref:"#/definitions/docs.LinkConfiguration"}],description:"Use the `layout` object to customize the order that your API endpoints\nare displayed in the docs site."},"docs.SortByAvailabilityValue":{type:"string",enum:["unset","stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"],description:"An availability to sort by, or `unset` for items without an availability."},"docs.ApiReferenceConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},api:{type:"string"},"api-name":{oneOf:[{type:"string"},{type:"null"}],description:"Name of API that we are referencing"},specs:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiSpecConfiguration"}},{type:"null"}],description:"API specifications to load directly. When provided, these take precedence over the API workspace referenced by `api-name`."},openrpc:{oneOf:[{type:"string"},{type:"null"}],description:"Path to an openrpc spec."},audiences:{oneOf:[{$ref:"#/definitions/docs.Audience"},{type:"null"}]},"display-errors":{oneOf:[{type:"boolean"},{type:"null"}],description:"Defaults to false"},"tag-description-pages":{oneOf:[{type:"boolean"},{type:"null"}],description:"If true, a page will be created for each tag in the OpenAPI spec that contains a description."},snippets:{oneOf:[{$ref:"#/definitions/docs.SnippetsConfiguration"},{type:"null"}]},postman:{oneOf:[{type:"string"},{type:"null"}],description:"URL to a Postman collection for this API reference"},summary:{oneOf:[{type:"string"},{type:"null"}],description:"Relative path to the markdown file"},layout:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiReferenceLayoutItem"}},{type:"null"}],description:"Advanced usage: when specified, this object will be used to customize the order that your API endpoints are displayed in the docs site, including subpackages, and additional markdown pages (to be rendered in between API endpoints). If not specified, the order will be inferred from the OpenAPI Spec or Fern Definition."},collapsed:{oneOf:[{$ref:"#/definitions/docs.CollapsedValue"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},alphabetized:{oneOf:[{type:"boolean"},{type:"null"}],description:"If `alphabetized` is set to true, packages and endpoints will be sorted alphabetically, unless explicitly ordered in the `layout` object."},"sort-by-availability":{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.SortByAvailabilityValue"}},{type:"null"}],description:"Sorts packages and endpoints by availability, unless explicitly ordered in the `layout` object.\nListed availabilities come first, in the order provided. Use `unset` for items without an availability.\nUnlisted availabilities follow in the default order:\n`unset`, `generally-available`, `alpha`, `beta`, `preview`, `legacy`, `deprecated`.\n`stable` is treated as `generally-available`, and `in-development` and `pre-release` are treated as `beta`.\nItems with the same availability keep their existing order (alphabetical when `alphabetized` is true)."},flattened:{oneOf:[{type:"boolean"},{type:"null"}],description:"If `flattened` is set to true, the title specified in `api` will be hidden, and its endpoints and subpackages won't be grouped under it.\n\nThis setting is useful if the API reference is short and you want to display all endpoints at the top level."},paginated:{oneOf:[{type:"boolean"},{type:"null"}],description:"If true, the API reference will be paginated rather than displayed in a single page (long-scrolling)."},playground:{oneOf:[{$ref:"#/definitions/docs.PlaygroundSettings"},{type:"null"}],description:"Settings for the api playground that affects all endpoints."}},required:["api"],additionalProperties:!1},"docs.LibraryName":{type:"string",description:"The name identifier for a library. Used to reference the library in navigation."},"docs.LibraryReferenceConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},library:{$ref:"#/definitions/docs.LibraryName",description:"The name of the library to reference (must match a key in the `libraries` section)."},title:{oneOf:[{type:"string"},{type:"null"}],description:"Override the display title for this library reference."},slug:{oneOf:[{type:"string"},{type:"null"}],description:"Override the URL slug for this library reference."}},required:["library"],additionalProperties:!1,description:"References a library defined in the `libraries` section.\nThe library's generated navigation will be injected at this point."},"docs.BlogConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},blog:{$ref:"#/definitions/docs.ChangelogFolderRelativePath"},title:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]}},required:["blog"],additionalProperties:!1},"docs.TitleSource":{type:"string",enum:["frontmatter","filename"]},"docs.FolderConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},folder:{type:"string",description:"The relative path to a folder containing markdown files. Fern will automatically discover and add all markdown files from this folder to the navigation."},title:{oneOf:[{type:"string"},{type:"null"}],description:"The title to display for this folder section. If not provided, the folder name will be used."},"title-source":{oneOf:[{$ref:"#/definitions/docs.TitleSource"},{type:"null"}],description:"Determines how page titles are derived for files in this folder. Options are `frontmatter` (use the `title` field from the file's frontmatter) or `filename` (derive title from the file name). Defaults to `filename`."},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},collapsed:{oneOf:[{$ref:"#/definitions/docs.CollapsedValue"},{type:"null"}],description:"Deprecated. Use `collapsible` and `collapsed-by-default` instead."},collapsible:{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section can be expanded/collapsed by the user."},"collapsed-by-default":{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section starts collapsed. Only meaningful when `collapsible` is true. Defaults to false (starts open)."},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]}},required:["folder"],additionalProperties:!1},"docs.NavigationItem":{anyOf:[{$ref:"#/definitions/docs.PageConfiguration"},{$ref:"#/definitions/docs.SectionConfiguration"},{$ref:"#/definitions/docs.ApiReferenceConfiguration"},{$ref:"#/definitions/docs.LibraryReferenceConfiguration"},{$ref:"#/definitions/docs.LinkConfiguration"},{$ref:"#/definitions/docs.ChangelogConfiguration"},{$ref:"#/definitions/docs.BlogConfiguration"},{$ref:"#/definitions/docs.FolderConfiguration"}]},"docs.UntabbedNavigationConfig":{type:"array",items:{$ref:"#/definitions/docs.NavigationItem"}},"docs.TabId":{type:"string"},"docs.TabbedNavigationItemWithLayout":{type:"object",properties:{tab:{$ref:"#/definitions/docs.TabId"},layout:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.NavigationItem"}},{type:"null"}],description:"If `href` is set, `layout` must be null."}},required:["tab"],additionalProperties:!1},"docs.TabVariant":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},title:{type:"string"},subtitle:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},layout:{type:"array",items:{$ref:"#/definitions/docs.NavigationItem"}},slug:{oneOf:[{type:"string"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},default:{oneOf:[{type:"boolean"},{type:"null"}]}},required:["title","layout"],additionalProperties:!1},"docs.TabbedNavigationItemWithVariants":{type:"object",properties:{tab:{$ref:"#/definitions/docs.TabId"},variants:{type:"array",items:{$ref:"#/definitions/docs.TabVariant"}}},required:["tab","variants"],additionalProperties:!1},"docs.TabbedNavigationItem":{anyOf:[{$ref:"#/definitions/docs.TabbedNavigationItemWithLayout"},{$ref:"#/definitions/docs.TabbedNavigationItemWithVariants"}]},"docs.TabbedNavigationConfig":{type:"array",items:{$ref:"#/definitions/docs.TabbedNavigationItem"}},"docs.NavigationConfig":{anyOf:[{$ref:"#/definitions/docs.UntabbedNavigationConfig"},{$ref:"#/definitions/docs.TabbedNavigationConfig"}]},"docs.NavbarGithubConfigWithOptions":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},url:{type:"string"},target:{oneOf:[{$ref:"#/definitions/docs.Target"},{type:"null"}]}},required:["url"],additionalProperties:!1},"docs.NavbarGithubConfig":{anyOf:[{type:"string"},{$ref:"#/definitions/docs.NavbarGithubConfigWithOptions"}]},"docs.NavbarLinkConfig":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},href:{oneOf:[{type:"string"},{type:"null"}],description:`The URL once you click on the button.
1630
+ pre-filled and sent from the API Explorer playground. Defaults to false.`}},additionalProperties:!1},"docs.ApiReferencePackageConfigurationWithOptions":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},title:{oneOf:[{type:"string"},{type:"null"}]},summary:{oneOf:[{type:"string"},{type:"null"}],description:"Relative path to the markdown file. This summary is displayed at the top of the API section."},contents:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiReferenceLayoutItem"}},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},playground:{oneOf:[{$ref:"#/definitions/docs.PlaygroundSettings"},{type:"null"}],description:"Settings for the api playground that is applied only to descendants of this api package."}},additionalProperties:!1},"docs.ApiReferencePackageConfiguration":{anyOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiReferenceLayoutItem"}},{$ref:"#/definitions/docs.ApiReferencePackageConfigurationWithOptions"}]},"docs.ApiReferenceSectionConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},section:{type:"string",description:"The title of the api package that will be displayed in the sidebar."},"referenced-packages":{oneOf:[{type:"array",items:{type:"string"}},{type:"null"}],description:"This section will inherit the endpoints from the specified subpackage(s). If multiple packages are specified, they will be merged."},summary:{oneOf:[{type:"string"},{type:"null"}],description:"Relative path to the markdown file."},contents:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiReferenceLayoutItem"}},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},collapsed:{oneOf:[{$ref:"#/definitions/docs.CollapsedValue"},{type:"null"}],description:"Deprecated. Use `collapsible` and `collapsed-by-default` instead."},collapsible:{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section can be expanded/collapsed by the user in the sidebar."},"collapsed-by-default":{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section starts collapsed. Only meaningful when collapsible is true."},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]},playground:{oneOf:[{$ref:"#/definitions/docs.PlaygroundSettings"},{type:"null"}],description:"Settings for the api playground that affects all endpoints."}},required:["section"],additionalProperties:!1},"docs.ApiReferenceEndpointConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},endpoint:{type:"string"},title:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]},playground:{oneOf:[{$ref:"#/definitions/docs.PlaygroundSettings"},{type:"null"}],description:"Settings for the api playground that affect this endpoint specifically."}},required:["endpoint"],additionalProperties:!1},"docs.ApiReferenceOperationConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},operation:{type:"string"},title:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]}},required:["operation"],additionalProperties:!1,description:"Defines a GraphQL-native schema for selecting operations (REST -> Endpoint === GraphQL -> Operation)"},"docs.LinkConfiguration":{type:"object",properties:{link:{type:"string"},href:{type:"string"},icon:{oneOf:[{type:"string"},{type:"null"}]},target:{oneOf:[{$ref:"#/definitions/docs.Target"},{type:"null"}]}},required:["link","href"],additionalProperties:!1},"docs.ApiReferenceLayoutItem":{anyOf:[{type:"string",description:"This should be either an endpoint, websocket, webhook, or subpackage ID"},{type:"object",additionalProperties:{$ref:"#/definitions/docs.ApiReferencePackageConfiguration"},description:"Keyed by subpackage name, this object allows you to group endpoints and pages together."},{$ref:"#/definitions/docs.ApiReferenceSectionConfiguration"},{$ref:"#/definitions/docs.ApiReferenceEndpointConfiguration"},{$ref:"#/definitions/docs.ApiReferenceOperationConfiguration"},{$ref:"#/definitions/docs.PageConfiguration"},{$ref:"#/definitions/docs.LinkConfiguration"}],description:"Use the `layout` object to customize the order that your API endpoints\nare displayed in the docs site."},"docs.SortByAvailabilityValue":{type:"string",enum:["unset","stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"],description:"An availability to sort by, or `unset` for items without an availability."},"docs.ApiReferenceConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},api:{type:"string"},"api-name":{oneOf:[{type:"string"},{type:"null"}],description:"Name of API that we are referencing"},specs:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiSpecConfiguration"}},{type:"null"}],description:"API specifications to load directly. When provided, these take precedence over the API workspace referenced by `api-name`."},openrpc:{oneOf:[{type:"string"},{type:"null"}],description:"Path to an openrpc spec."},audiences:{oneOf:[{$ref:"#/definitions/docs.Audience"},{type:"null"}]},"display-errors":{oneOf:[{type:"boolean"},{type:"null"}],description:"Defaults to false"},"tag-description-pages":{oneOf:[{type:"boolean"},{type:"null"}],description:"If true, a page will be created for each tag in the OpenAPI spec that contains a description."},snippets:{oneOf:[{$ref:"#/definitions/docs.SnippetsConfiguration"},{type:"null"}]},postman:{oneOf:[{type:"string"},{type:"null"}],description:"URL to a Postman collection for this API reference"},summary:{oneOf:[{type:"string"},{type:"null"}],description:"Relative path to the markdown file"},layout:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiReferenceLayoutItem"}},{type:"null"}],description:"Advanced usage: when specified, this object will be used to customize the order that your API endpoints are displayed in the docs site, including subpackages, and additional markdown pages (to be rendered in between API endpoints). If not specified, the order will be inferred from the OpenAPI Spec or Fern Definition."},collapsed:{oneOf:[{$ref:"#/definitions/docs.CollapsedValue"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},alphabetized:{oneOf:[{type:"boolean"},{type:"null"}],description:"If `alphabetized` is set to true, packages and endpoints will be sorted alphabetically, unless explicitly ordered in the `layout` object."},"sort-by-availability":{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.SortByAvailabilityValue"}},{type:"null"}],description:"Sorts packages and endpoints by availability, unless explicitly ordered in the `layout` object.\nListed availabilities come first, in the order provided. Use `unset` for items without an availability.\nUnlisted availabilities follow in the default order:\n`unset`, `generally-available`, `alpha`, `beta`, `preview`, `legacy`, `deprecated`.\n`stable` is treated as `generally-available`, and `in-development` and `pre-release` are treated as `beta`.\nItems with the same availability keep their existing order (alphabetical when `alphabetized` is true)."},flattened:{oneOf:[{type:"boolean"},{type:"null"}],description:"If `flattened` is set to true, the title specified in `api` will be hidden, and its endpoints and subpackages won't be grouped under it.\n\nThis setting is useful if the API reference is short and you want to display all endpoints at the top level."},paginated:{oneOf:[{type:"boolean"},{type:"null"}],description:"If true, the API reference will be paginated rather than displayed in a single page (long-scrolling)."},playground:{oneOf:[{$ref:"#/definitions/docs.PlaygroundSettings"},{type:"null"}],description:"Settings for the api playground that affects all endpoints."}},required:["api"],additionalProperties:!1},"docs.LibraryName":{type:"string",description:"The name identifier for a library. Used to reference the library in navigation."},"docs.LibraryReferenceConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},library:{$ref:"#/definitions/docs.LibraryName",description:"The name of the library to reference (must match a key in the `libraries` section)."},title:{oneOf:[{type:"string"},{type:"null"}],description:"Override the display title for this library reference."},slug:{oneOf:[{type:"string"},{type:"null"}],description:"Override the URL slug for this library reference."}},required:["library"],additionalProperties:!1,description:"References a library defined in the `libraries` section.\nThe library's generated navigation will be injected at this point."},"docs.BlogConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},blog:{$ref:"#/definitions/docs.ChangelogFolderRelativePath"},title:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]}},required:["blog"],additionalProperties:!1},"docs.TitleSource":{type:"string",enum:["frontmatter","filename"]},"docs.FolderConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},folder:{type:"string",description:"The relative path to a folder containing markdown files. Fern will automatically discover and add all markdown files from this folder to the navigation."},title:{oneOf:[{type:"string"},{type:"null"}],description:"The title to display for this folder section. If not provided, the folder name will be used."},"title-source":{oneOf:[{$ref:"#/definitions/docs.TitleSource"},{type:"null"}],description:"Determines how page titles are derived for files in this folder. Options are `frontmatter` (use the `title` field from the file's frontmatter) or `filename` (derive title from the file name). Defaults to `filename`."},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},collapsed:{oneOf:[{$ref:"#/definitions/docs.CollapsedValue"},{type:"null"}],description:"Deprecated. Use `collapsible` and `collapsed-by-default` instead."},collapsible:{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section can be expanded/collapsed by the user."},"collapsed-by-default":{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section starts collapsed. Only meaningful when `collapsible` is true. Defaults to false (starts open)."},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]}},required:["folder"],additionalProperties:!1},"docs.NavigationItem":{anyOf:[{$ref:"#/definitions/docs.PageConfiguration"},{$ref:"#/definitions/docs.SectionConfiguration"},{$ref:"#/definitions/docs.ApiReferenceConfiguration"},{$ref:"#/definitions/docs.LibraryReferenceConfiguration"},{$ref:"#/definitions/docs.LinkConfiguration"},{$ref:"#/definitions/docs.ChangelogConfiguration"},{$ref:"#/definitions/docs.BlogConfiguration"},{$ref:"#/definitions/docs.FolderConfiguration"}]},"docs.TabbedNavigationItemWithLayout":{type:"object",properties:{tab:{$ref:"#/definitions/docs.TabId"},layout:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.NavigationItem"}},{type:"null"}],description:"If `href` is set, `layout` must be null."}},required:["tab"],additionalProperties:!1},"docs.TabVariant":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},title:{type:"string"},subtitle:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},layout:{type:"array",items:{$ref:"#/definitions/docs.NavigationItem"}},slug:{oneOf:[{type:"string"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},default:{oneOf:[{type:"boolean"},{type:"null"}]}},required:["title","layout"],additionalProperties:!1},"docs.TabbedNavigationItemWithVariants":{type:"object",properties:{tab:{$ref:"#/definitions/docs.TabId"},variants:{type:"array",items:{$ref:"#/definitions/docs.TabVariant"}}},required:["tab","variants"],additionalProperties:!1},"docs.TabbedNavigationItem":{anyOf:[{$ref:"#/definitions/docs.TabbedNavigationItemWithLayout"},{$ref:"#/definitions/docs.TabbedNavigationItemWithVariants"}]},"docs.TabbedNavigationConfig":{type:"array",items:{$ref:"#/definitions/docs.TabbedNavigationItem"}},"docs.UntabbedNavigationConfig":{type:"array",items:{$ref:"#/definitions/docs.NavigationItem"}},"docs.NavigationConfig":{anyOf:[{$ref:"#/definitions/docs.TabbedNavigationConfig"},{$ref:"#/definitions/docs.UntabbedNavigationConfig"}]},"docs.NavbarGithubConfigWithOptions":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},url:{type:"string"},target:{oneOf:[{$ref:"#/definitions/docs.Target"},{type:"null"}]}},required:["url"],additionalProperties:!1},"docs.NavbarGithubConfig":{anyOf:[{type:"string"},{$ref:"#/definitions/docs.NavbarGithubConfigWithOptions"}]},"docs.NavbarLinkConfig":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},href:{oneOf:[{type:"string"},{type:"null"}],description:`The URL once you click on the button.
1631
1631
  Example: https://buildwithfern.com/contact`},target:{oneOf:[{$ref:"#/definitions/docs.Target"},{type:"null"}]},url:{oneOf:[{type:"string"},{type:"null"}],description:"Use `href` instead."},text:{oneOf:[{type:"string"},{type:"null"}],description:"Text inside the button."},icon:{oneOf:[{type:"string"},{type:"null"}],description:'The icon to be used in the button. This icon will appear to the **left** of the text content.\nIcons can be in three formats:\n- **Font Awesome icons**: Use icon names like `fa-solid fa-rocket`. Pro and Brand Icons from Font Awesome are supported.\n- **Custom image files**: Use relative paths to image files (e.g., `./assets/icons/my-icon.svg` or `../assets/icons/my-icon.png`). Paths are relative to the `docs.yml` file.\n- **Inline SVG**: Provide an SVG string wrapped in quotes (e.g., `"<svg>...</svg>"`).'},rightIcon:{oneOf:[{type:"string"},{type:"null"}],description:'The icon to be used in the button. This icon will appear to the **right** of the text content.\nIcons can be in three formats:\n- **Font Awesome icons**: Use icon names like `fa-solid fa-rocket`. Pro and Brand Icons from Font Awesome are supported.\n- **Custom image files**: Use relative paths to image files (e.g., `./assets/icons/my-icon.svg` or `../assets/icons/my-icon.png`). Paths are relative to the `docs.yml` file.\n- **Inline SVG**: Provide an SVG string wrapped in quotes (e.g., `"<svg>...</svg>"`).\n\nBy default, the `rightIcon` for a `filled` button is set to `arrow-right`.'},rounded:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `true`, the border radius of the button will be fully rounded."}},additionalProperties:!1},"docs.NavbarLink":{type:"object",properties:{type:{type:"string",enum:["filled","outlined","minimal","github","dropdown","primary","secondary"]}},oneOf:[{properties:{type:{const:"filled"},viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},href:{oneOf:[{type:"string"},{type:"null"}],description:`The URL once you click on the button.
1632
1632
  Example: https://buildwithfern.com/contact`},target:{oneOf:[{$ref:"#/definitions/docs.Target"},{type:"null"}]},url:{oneOf:[{type:"string"},{type:"null"}],description:"Use `href` instead."},text:{oneOf:[{type:"string"},{type:"null"}],description:"Text inside the button."},icon:{oneOf:[{type:"string"},{type:"null"}],description:'The icon to be used in the button. This icon will appear to the **left** of the text content.\nIcons can be in three formats:\n- **Font Awesome icons**: Use icon names like `fa-solid fa-rocket`. Pro and Brand Icons from Font Awesome are supported.\n- **Custom image files**: Use relative paths to image files (e.g., `./assets/icons/my-icon.svg` or `../assets/icons/my-icon.png`). Paths are relative to the `docs.yml` file.\n- **Inline SVG**: Provide an SVG string wrapped in quotes (e.g., `"<svg>...</svg>"`).'},rightIcon:{oneOf:[{type:"string"},{type:"null"}],description:'The icon to be used in the button. This icon will appear to the **right** of the text content.\nIcons can be in three formats:\n- **Font Awesome icons**: Use icon names like `fa-solid fa-rocket`. Pro and Brand Icons from Font Awesome are supported.\n- **Custom image files**: Use relative paths to image files (e.g., `./assets/icons/my-icon.svg` or `../assets/icons/my-icon.png`). Paths are relative to the `docs.yml` file.\n- **Inline SVG**: Provide an SVG string wrapped in quotes (e.g., `"<svg>...</svg>"`).\n\nBy default, the `rightIcon` for a `filled` button is set to `arrow-right`.'},rounded:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `true`, the border radius of the button will be fully rounded."}},required:["type"]},{properties:{type:{const:"outlined"},viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},href:{oneOf:[{type:"string"},{type:"null"}],description:`The URL once you click on the button.
1633
1633
  Example: https://buildwithfern.com/contact`},target:{oneOf:[{$ref:"#/definitions/docs.Target"},{type:"null"}]},url:{oneOf:[{type:"string"},{type:"null"}],description:"Use `href` instead."},text:{oneOf:[{type:"string"},{type:"null"}],description:"Text inside the button."},icon:{oneOf:[{type:"string"},{type:"null"}],description:'The icon to be used in the button. This icon will appear to the **left** of the text content.\nIcons can be in three formats:\n- **Font Awesome icons**: Use icon names like `fa-solid fa-rocket`. Pro and Brand Icons from Font Awesome are supported.\n- **Custom image files**: Use relative paths to image files (e.g., `./assets/icons/my-icon.svg` or `../assets/icons/my-icon.png`). Paths are relative to the `docs.yml` file.\n- **Inline SVG**: Provide an SVG string wrapped in quotes (e.g., `"<svg>...</svg>"`).'},rightIcon:{oneOf:[{type:"string"},{type:"null"}],description:'The icon to be used in the button. This icon will appear to the **right** of the text content.\nIcons can be in three formats:\n- **Font Awesome icons**: Use icon names like `fa-solid fa-rocket`. Pro and Brand Icons from Font Awesome are supported.\n- **Custom image files**: Use relative paths to image files (e.g., `./assets/icons/my-icon.svg` or `../assets/icons/my-icon.png`). Paths are relative to the `docs.yml` file.\n- **Inline SVG**: Provide an SVG string wrapped in quotes (e.g., `"<svg>...</svg>"`).\n\nBy default, the `rightIcon` for a `filled` button is set to `arrow-right`.'},rounded:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `true`, the border radius of the button will be fully rounded."}},required:["type"]},{properties:{type:{const:"minimal"},viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},href:{oneOf:[{type:"string"},{type:"null"}],description:`The URL once you click on the button.
@@ -3470,7 +3470,7 @@ ${tal.default.cursorShow}`)}releaseCursor(){this.extraLinesUnderPrompt>0&&EXo(th
3470
3470
  `).length),this}updateBottomBar(t){return rKt(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+`
3471
3471
  `}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&&Iin(this.rl,t.length+this.rl.line.length),this.rl.output.write(t)}};var fm=ye(J4(),1),Ecl=ye(kHt(),1);var eon=ye(J4(),1),ycl=ye(kHt(),1),ton=function(e,t,r){return typeof e[t]!="function"?(0,eon.of)(e):(0,eon.from)((0,ycl.default)(e[t])(r).then(n=>(e[t]=n,e)))};var bcl={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}},Uft=class extends k5e{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,fm.from)(t):(0,fm.isObservable)(t)?n=t:Object.values(t).every(i=>typeof i=="object"&&!Array.isArray(i)&&i!=null)?n=(0,fm.from)(Object.entries(t).map(([i,o])=>({name:i,...o}))):n=(0,fm.from)([t]),this.process=n.pipe((0,fm.concatMap)(this.processQuestion.bind(this)),(0,fm.publish)()),this.process.connect(),this.process.pipe((0,fm.reduce)((i,o)=>(bcl.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,fm.defer)(()=>(0,fm.of)(t).pipe((0,fm.concatMap)(this.setDefaultType.bind(this)),(0,fm.concatMap)(this.filterIfRunnable.bind(this)),(0,fm.concatMap)(()=>ton(t,"message",this.answers)),(0,fm.concatMap)(()=>ton(t,"default",this.answers)),(0,fm.concatMap)(()=>ton(t,"choices",this.answers)),(0,fm.concatMap)(this.fetchAnswer.bind(this))))}fetchAnswer(t){let r=this.prompts[t.type];return this.activePrompt=new r(t,this.rl,this.answers),(0,fm.defer)(()=>(0,fm.from)(this.activePrompt.run().then(n=>({name:t.name,answer:n}))))}setDefaultType(t){return this.prompts[t.type]||(t.type="input"),(0,fm.defer)(()=>(0,fm.of)(t))}filterIfRunnable(t){if(t.askAnswered!==!0&&bcl.get(this.answers,t.name)!==void 0)return fm.EMPTY;if(t.when===!1)return fm.EMPTY;if(typeof t.when!="function")return(0,fm.of)(t);let{answers:r}=this;return(0,fm.defer)(()=>(0,fm.from)((0,Ecl.default)(t.when)(r).then(n=>{if(n)return t})).pipe((0,fm.filter)(n=>n!=null)))}};function Icl(e){let t=function(r,n){let i;try{i=new Uft(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",iKt),this.registerPrompt("input",O5e),this.registerPrompt("number",oKt),this.registerPrompt("confirm",sKt),this.registerPrompt("rawlist",aKt),this.registerPrompt("expand",cKt),this.registerPrompt("checkbox",uKt),this.registerPrompt("password",lKt),this.registerPrompt("editor",yKt)},t.restoreDefaultPrompts(),t}var UZo=Icl();function vph(e,t){UZo.registerPrompt(e,t)}function Cph(){UZo.restoreDefaultPrompts()}var xph={prompt:UZo,ui:{BottomBar:bKt,Prompt:Uft},createPromptModule:Icl,registerPrompt:vph,restoreDefaultPrompts:Cph,Separator:FM},Fu=xph;var Sph=["prod","pre-prod","beta","dev","local"];function wph(e){return Sph.some(t=>t===e)}function YJ(e="prod"){let t=e?.trim();return t!=null&&wph(t)?t:"local"}function ron(){let e="phc_yQgAEdJJkVpI24NdSRID2mor1x1leRpDoC9yZ9mfXal";return e==null||e.trim().length===0?!1:process.env.FERN_DISABLE_TELEMETRY!=="true"}var Vft=require("path");function Ccl(){let e=Tph();return async t=>{for(let r of t)r.module=e(r.filename);return t}}function Tph(e=process.argv[1]?(0,Vft.dirname)(process.argv[1]):process.cwd(),t=Vft.sep==="\\"){let r=t?vcl(e):e;return n=>{if(!n)return;let i=t?vcl(n):n,{dir:o,base:s,ext:a}=Vft.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 vcl(e){return e.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}var lO={};$(lO,{DEFAULT_EXCEPTION_STEPS_CONFIG:()=>Eon,DOMExceptionCoercer:()=>o$o,EXCEPTION_STEP_INTERNAL_FIELDS:()=>PKt,ErrorCoercer:()=>SKt,ErrorEventCoercer:()=>s$o,ErrorPropertiesBuilder:()=>xKt,EventCoercer:()=>a$o,ExceptionStepsBuffer:()=>p$o,ObjectCoercer:()=>TKt,PrimitiveCoercer:()=>OKt,PromiseRejectionEventCoercer:()=>c$o,ReduceableCache:()=>u$o,StringCoercer:()=>wKt,chromeStackLineParser:()=>t$o,createDefaultStackParser:()=>i$o,createStackParser:()=>pul,geckoStackLineParser:()=>r$o,getInjectedReleaseId:()=>_fh,getUtf8ByteLength:()=>dul,nodeStackLineParser:()=>oul,opera10StackLineParser:()=>rul,opera11StackLineParser:()=>nul,resolveExceptionStepsConfig:()=>l$o,reverseAndStripFrames:()=>lul,stripReservedExceptionStepFields:()=>Qfh,winjsStackLineParser:()=>tul});var jM=(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 S1e(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 Oph=Array.isArray,Scl=Object.prototype,VZv=Scl.hasOwnProperty,non=Scl.toString,X4=Oph||function(e){return non.call(e)==="[object Array]"};var EKt=e=>e===Object(e)&&!X4(e);var $he=e=>e===void 0,pk=e=>non.call(e)=="[object String]",VZo=e=>pk(e)&&e.trim().length===0,GZo=e=>e===null,XJ=e=>$he(e)||GZo(e),Gft=e=>non.call(e)=="[object Number]"&&e===e;var wcl=e=>non.call(e)==="[object Boolean]";function ion(e){return e===null||typeof e!="object"}function F5e(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function w1e(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 Pcl(e,Error)}}function Tcl(e){return F5e(e,"ErrorEvent")}function qft(e){return"u">typeof Event&&Pcl(e,Event)}function Ocl(e){return F5e(e,"Object")}function Pcl(e,t){try{return e instanceof t}catch{return!1}}var Pph=["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"],oon=new Map,Bph=256;function Rph(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 Bcl=function(e,t=[]){if(!e)return!1;let r=Rph(e,t),n=oon.get(r);if(n!==void 0)return n;let i=e.toLowerCase(),o=Pph.concat(t).some(s=>i.indexOf(s.toLowerCase())!==-1);return oon.size>=Bph&&oon.clear(),oon.set(r,o),o};function IKt(e,t,r,n,i){return t>r&&(n.warn("min cannot be greater than max."),t=r),Gft(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),IKt(i??r,t,r,n))}var Dph=864e5,kph=1,Fph=10;function Rcl(e={}){return{refillRate:e.exceptionRateLimiterRefillRate??e.__exceptionRateLimiterRefillRate??kph,bucketSize:e.exceptionRateLimiterBucketSize??e.__exceptionRateLimiterBucketSize??Fph}}var son=class{constructor(t){this._buckets={},this._onBucketRateLimited=t._onBucketRateLimited,this._bucketSize=IKt(t.bucketSize,0,100,t._logger),this._refillRate=IKt(t.refillRate,0,this._bucketSize,t._logger),this._refillInterval=IKt(t.refillInterval,0,Dph,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 aon="0123456789abcdef",con=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+=aon.charAt(this.bytes[r]>>>4),t+=aon.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+=aon.charAt(this.bytes[r]>>>4),t+=aon.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}},qZo=class{constructor(t){this.timestamp=0,this.counter=0,this.random=t??Nph()}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 con.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,con.ofInner(t)}},Nph=()=>({nextUint32:()=>65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random())>>>0}),Dcl,_N=()=>jph().toString(),jph=()=>(Dcl||(Dcl=new qZo)).generate();var uon=class{add(t){let r=_N(),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 zph(e=console){return{log:e.log.bind(e),warn:e.warn.bind(e),error:e.error.bind(e),debug:e.debug.bind(e)}}var kcl=(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=>kcl(`${e} ${o}`,t,r)}},Qph=e=>e();function Fcl(e,t=Qph){return kcl(e,t,zph())}var Hft="Mobile",pon="iOS",Wft="Android",Mcl="Tablet",i$v=Wft+" "+Mcl;var Lph="Apple",o$v=Lph+" Watch",Lcl="Safari",fon="BlackBerry",_cl="Samsung",_ph=_cl+"Browser",Uph=_cl+" Internet",don="Chrome",Vph=don+" OS",Gph=don+" "+pon,Ucl="Internet Explorer",qph=Ucl+" "+Hft,KZo="Opera",s$v=KZo+" Mini",Vcl="Edge",Wph="Microsoft "+Vcl,JZo="Firefox",Hph=JZo+" "+pon,YZo="Nintendo",XZo="PlayStation",lon="Xbox",Kph=Wft+" "+Hft,Jph=Hft+" "+Lcl,vKt="Windows",Yph=vKt+" Phone";var Gcl="Generic",a$v=Gcl+" "+Hft.toLowerCase(),c$v=Gcl+" "+Mcl.toLowerCase(),Xph="Konqueror",Zph="Oculus Browser",Ncl="Vivaldi",$ph="Yandex",jcl="Whale",efh="DuckDuckGo",tfh="Pale Moon",zcl="Waterfox",Qcl="Brave",qcl="Claude",Wcl="Codex",Hcl="ChatGPT",rfh="Google Search App",T0="(\\d+(\\.\\d+)?)",WZo=new RegExp("Version/"+T0),HZo=new RegExp("("+qcl+"|"+Wcl+"|"+Hcl+")\\/"+T0);var u$v=new RegExp(lon,"i"),l$v=new RegExp(XZo+" \\w+","i"),p$v=new RegExp(YZo+" \\w+","i"),nfh=new RegExp(fon+"|PlayBook|BB10","i"),ifh={"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 f$v={[qph]:[new RegExp("rv:"+T0)],[Wph]:[new RegExp(Vcl+"?\\/"+T0)],[don]:[new RegExp("("+don+"|CrMo)\\/"+T0)],[Gph]:[new RegExp("CriOS\\/"+T0)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+T0)],[Lcl]:[WZo],[Jph]:[WZo],[KZo]:[new RegExp("("+KZo+"|OPR)\\/"+T0)],[JZo]:[new RegExp(JZo+"\\/"+T0)],[Hph]:[new RegExp("FxiOS\\/"+T0)],[Xph]:[new RegExp("Konqueror[:/]?"+T0,"i")],[fon]:[new RegExp(fon+" "+T0),WZo],[Kph]:[new RegExp("android\\s"+T0,"i")],[Uph]:[new RegExp(_ph+"\\/"+T0)],[Zph]:[new RegExp("OculusBrowser\\/"+T0)],[Ncl]:[new RegExp(Ncl+"\\/"+T0)],[$ph]:[new RegExp("YaBrowser\\/"+T0)],[jcl]:[new RegExp(jcl+"\\/"+T0)],[Qcl]:[new RegExp(Qcl+"\\/"+T0)],[qcl]:[HZo],[Wcl]:[HZo],[Hcl]:[HZo],[efh]:[new RegExp("(DuckDuckGo|Ddg)\\/"+T0)],[tfh]:[new RegExp("PaleMoon\\/"+T0)],[zcl]:[new RegExp(zcl+"\\/"+T0)],[rfh]:[new RegExp("GSA\\/"+T0)],[Ucl]:[new RegExp("(rv:|MSIE )"+T0)],Mozilla:[new RegExp("rv:"+T0)]};var d$v=[[new RegExp(lon+"; "+lon+" (.*?)[);]","i"),e=>[lon,e&&e[1]||""]],[new RegExp(YZo,"i"),[YZo,""]],[new RegExp(XZo,"i"),[XZo,""]],[nfh,[fon,""]],[new RegExp(vKt,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[Yph,""];if(new RegExp(Hft).test(t)&&!/IEMobile\b/.test(t))return[vKt+" "+Hft,""];let r=/Windows NT ([0-9.]+)/i.exec(t);if(r&&r[1]){let n=r[1],i=ifh[n]||"";return/arm/i.test(t)&&(i="RT"),[vKt,i]}return[vKt,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>{if(e&&e[3]){let t=[e[3],e[4],e[5]||"0"];return[pon,t.join(".")]}return[pon,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{let t="";return e&&e.length>=3&&(t=$he(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+Wft+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+Wft+")","i"),e=>{if(e&&e[2]){let t=[e[2],e[3],e[4]||"0"];return[Wft,t.join(".")]}return[Wft,""]}],[/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/,[Vph,""]],[/Linux|debian/i,["Linux",""]]];var mon="[Circular]",hon="[Truncated]",rG="[Unserializable]",Kcl="[Function]",g$v=Date.prototype.getTime,A$v=Date.prototype.toISOString;function xne(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 ege(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=rG}Object.defineProperty(e,n,{value:i,enumerable:!0,writable:!0,configurable:!0})}return e}function ZZo(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 N5e=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 Jcl="utf8",ofh=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function sfh(e){return typeof e=="string"&&ofh.test(e)}function j5e(e,t){return sfh(e)?e:t()}function Kft(e,t){let r=new Error(t);try{Object.defineProperty(r,"name",{value:e,writable:!0,enumerable:!0,configurable:!0})}catch{}return r}function Ycl(e){return e?.replace(/\/+$/,"")}async function Xcl(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 $Zo(){return new Date().toISOString()}function UN(e,t){let r=setTimeout(e,t);return r?.unref&&r?.unref(),r}async function T1e(e,t,r){let n;try{return await Promise.race([e,new Promise((i,o)=>{n=UN(()=>{try{r?.(),i()}catch(s){o(s)}},t)})])}finally{clearTimeout(n)}}var Zcl=e=>e&&typeof e.then=="function";function CKt(e){return Promise.all(e.map(t=>(t??Promise.resolve()).then(r=>({status:"fulfilled",value:r}),r=>({status:"rejected",reason:r}))))}var gon,$cl,Aon;function eul(e){let t=globalThis._posthogChunkIds;if(!t)return;let r=Object.keys(t);return Aon&&r.length===$cl||($cl=r.length,Aon=r.reduce((n,i)=>{gon||(gon={});let o=gon[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,gon[i]=[u,l];break}}}return n},{})),Aon}var e$o=50,afh=1e3,cfh=100,ufh=4,xKt=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&&X4(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:eul(this.stackParser),skipFirstLines:t.skipFirstLines??1}}getAggregateErrors(t){try{if(w1e(t)){let r=Object.getPrototypeOf(t);for(let n=0;r&&n<cfh;n++){let i=Object.getOwnPropertyDescriptor(r,"constructor")?.value;if(typeof i=="function"&&i.name==="AggregateError"){let o=t.errors;return X4(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=(f,m,g=0)=>{let A=p(m,g),y=A.apply;if(A.apply=R=>{c.push(f);try{return y(R)}finally{c.pop()}},g>ufh||g>0&&c.indexOf(f)!==-1)return this.coerceFallback(A);let I=typeof f=="object"&&f!==null||typeof f=="function";if(g===0&&i>=e$o||I&&a.has(f))return;I&&a.add(f),g===0&&i++;let x=this.getAggregateErrors(f);s||=!!x;let v;try{if(v=this.applyCoercers(f,A),!v)throw u}catch(R){if(R===u){g===0&&i--;return}if(!s)throw R;v=this.coerceFallback(A)}if(!x||i>=e$o)return v;let S;try{S=x.length}catch{return v}if(!Number.isInteger(S)||S<0||S>4294967295)return v;let B=[];for(let R=0;i<e$o&&o<afh&&R<S;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=(f,m=0)=>({...r,syntheticException:f==0?r.syntheticException:void 0,mechanism:f==0?t:{},apply:g=>{let A=l(g,f,m+1);if(!A)throw u;return A},next:g=>l(g,f+1)}),d=p(n);return{...d,apply:f=>l(f,n)??this.coerceFallback(d)}}};var cR="?",lfh="<anonymous>",pfh=/^([a-z][a-z0-9.+-]+):/i,ffh=["http","https","file","blob","app","capacitor","ionic","webpack","webpack-internal","ng"];function dfh(e){if(!e||e===lfh)return!1;let t=pfh.exec(e);return!t||ffh.includes(t[1].toLowerCase())}function Sne(e,t,r,n,i){let o={platform:e,filename:t,function:r==="<anonymous>"?cR:r,in_app:dfh(t)};return $he(n)||(o.lineno=n),$he(i)||(o.colno=i),o}var yon=(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]:cR,r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};var mfh=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,hfh=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,gfh=/\((\S*)(?::(\d+))(?::(\d+))\)/,t$o=(e,t)=>{let r=mfh.exec(e);if(r){let[,i,o,s]=r;return Sne(t,i,cR,+o,+s)}let n=hfh.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){let a=gfh.exec(n[2]);a&&(n[2]=a[1],n[3]=a[2],n[4]=a[3])}let[o,s]=yon(n[1]||cR,n[2]);return Sne(t,s,o,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}};var Afh=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,yfh=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,r$o=(e,t)=>{let r=Afh.exec(e);if(r){if(r[3]&&r[3].indexOf(" > eval")>-1){let s=yfh.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]||cR;return[o,i]=yon(o,i),Sne(t,i,o,r[4]?+r[4]:void 0,r[5]?+r[5]:void 0)}};var bfh=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,tul=(e,t)=>{let r=bfh.exec(e);return r?Sne(t,r[2],r[1]||cR,+r[3],r[4]?+r[4]:void 0):void 0};var Efh=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,rul=(e,t)=>{let r=Efh.exec(e);return r?Sne(t,r[2],r[3]||cR,+r[1]):void 0},Ifh=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,nul=(e,t)=>{let r=Ifh.exec(e);return r?Sne(t,r[5],r[3]||r[4]||cR,+r[1],+r[2]):void 0};var vfh=/^\s*[-]{4,}$/,Cfh=/at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/,xfh=/^Promise\.(?:all|any)$/,Sfh=/^index \d+$/,wfh="node:internal/promise",oul=(e,t)=>{let r=e.match(Cfh);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||cR,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]),xfh.test(o)&&Sfh.test(c||"")&&(c=wfh),{filename:c?decodeURI(c):void 0,module:void 0,function:o,lineno:iul(r[3]),colno:iul(r[4]),in_app:Tfh(c||"",u),platform:t}}if(e.match(vfh))return{filename:e,platform:t}};function Tfh(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 iul(e){return parseInt(e||"",10)||void 0}var sul=/\(error: (.*)\)/,aul=50,Ofh=10,Pfh=1e3;function n$o(e,t){return e.filename===t.filename&&e.function===t.function&&e.module===t.module&&e.lineno===t.lineno&&e.colno===t.colno}function Bfh(e){for(let t=1;t<=Ofh;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(!n$o(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 Rfh(e,t){let r=t.start+t.length,n=uul(e,t);n&&e.splice(r+n===e.length?r:t.start,n)}function cul(e,t){let r=t.start;for(;r>0&&n$o(e[r-1],e[r-1+t.length]);)r--;return t.start-r}function uul(e,t){let r=t.start+t.length,n=r;for(;n<e.length&&n$o(e[n],e[n-t.length]);)n++;return n-r}function Dfh(e,t){let r=t[0],n=e.length-(r?cul(e,r):0);for(let i of t)n-=uul(e,i);return n}function kfh(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++)Ffh(t,n,r)&&(r=n);e.push(...e.splice(0,r))}function Ffh(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 lul(e){if(!e.length)return[];let t=Array.from(e);return t.reverse(),t.slice(0,aul).map(r=>({...r,filename:r.filename||Nfh(t).filename,function:r.function||cR}))}function Nfh(e){return e[e.length-1]||{}}function i$o(){return pul("web:javascript",t$o,r$o)}function pul(e,...t){return(r,n=0)=>{let i=[],o=r.split(`
3472
3472
  `),s=Math.min(o.length,n+Pfh),a=[];for(let l=n;l<s;l++){let p=o[l];if(p.length>1024)continue;let d=sul.test(p)?p.replace(sul,"$1"):p;if(!d.match(/\S*Error: /)){for(let f of t){let m=f(d,e);if(m){i.push(m);let g=Bfh(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(Dfh(i,a)>=aul)break}}let c=[...a].sort((l,p)=>p.start-l.start),u=c[c.length-1];if(u){let l=cul(i,u);i.splice(u.start-l,l);for(let p of c)p.start-=l}for(let l of c)Rfh(i,l);return a.some(l=>l.start===0&&i.length===l.length)&&kfh(i),lul(i)}}var o$o=class{match(t){return this.isDOMException(t)||this.isDOMError(t)}coerce(t,r){let n=pk(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 F5e(t,"DOMException")}isDOMError(t){return F5e(t,"DOMError")}};var SKt=class{match(t){return w1e(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 s$o=class{match(t){if(!Tcl(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 pk(t.message)&&t.message.length>0}_buildLocationStack(t){let r=t,n=r.lineno??0,i=r.colno??0;if(!(!pk(r.filename)||r.filename.length===0)&&n!==0)return`Error
3473
- at ${r.filename}:${n}:${i}`}};var jfh=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,wKt=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(jfh);return i&&(r=i[1],n=i[2]),[r,n]}};var ful=["fatal","error","warning","log","info","debug"];function bon(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 TKt=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(qft(t))return t.constructor.name;let r="name"in t?t.name:void 0;return pk(r)&&!VZo(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=bon(t);return`${r&&r!=="Object"?`'${r}'`:"Object"} captured as exception with keys: ${n}`}isSeverityLevel(t){return pk(t)&&!VZo(t)&&ful.indexOf(t)>=0}getStack(t){try{return pk(t.stacktrace)&&t.stacktrace.length>0?t.stacktrace:pk(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(w1e(n))return n}}getObjectClassName(t){try{let r=Object.getPrototypeOf(t);return r?r.constructor.name:void 0}catch{return}}};var a$o=class{match(t){return qft(t)}coerce(t,r){let n=t.constructor.name;return{type:n,value:`${n} captured as exception with keys: ${bon(t)}`,stack:r.syntheticException?.stack,synthetic:!0}}};var OKt=class{match(t){return ion(t)}coerce(t,r){return{type:"Error",value:`Primitive value captured as exception: ${String(t)}`,stack:r.syntheticException?.stack,synthetic:!0}}};var c$o=class{match(t){return F5e(t,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(t)}isCustomEventWrappingRejection(t){if(!qft(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 ion(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 u$o=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 PKt={MESSAGE:"$message",TIMESTAMP:"$timestamp"},zfh=new Set([PKt.MESSAGE,PKt.TIMESTAMP]),Eon={enabled:!0,max_bytes:32768};function l$o(e){return e?{enabled:e.enabled??Eon.enabled,max_bytes:Mfh(e.max_bytes,Eon.max_bytes)}:{...Eon}}function Qfh(e){if(!e)return{sanitizedProperties:{},droppedKeys:[]};let t=[];return{sanitizedProperties:Object.keys(e).reduce((n,i)=>zfh.has(i)?(t.push(i),n):(n[i]=e[i],n),{}),droppedKeys:t}}var p$o=class{constructor(t){this._entries=[],this._totalBytes=0,this._config=l$o(t)}setConfig(t){this._config=l$o(t),this._trimToMaxBytes()}add(t){let r=Lfh(t);if(!r)return;let n=dul(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 Mfh(e,t){if(!Gft(e)||e===1/0||e===-1/0)return t;let r=Math.floor(e);return r<0?t:r}function Lfh(e){let t;try{t=S1e(e)}catch{return}try{let r=JSON.parse(t);if(!EKt(r))return;let n=r,i=n[PKt.MESSAGE],o=n[PKt.TIMESTAMP];return!pk(i)||i.trim().length===0||!pk(o)&&!Gft(o)?void 0:{step:n,json:t}}catch{return}}function dul(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 _fh(){let e=globalThis._posthogReleaseId;return typeof e=="string"&&e.length>0?e:void 0}var f$o=e=>{if("flags"in e){let t=mul(e.flags),r=hul(e.flags);return{...e,featureFlags:t,featureFlagPayloads:r}}{let t=e.featureFlags??{},r=Object.fromEntries(Object.entries(e.featureFlagPayloads||{}).map(([i,o])=>[i,Jft(o)])),n=Object.fromEntries(Object.entries(t).map(([i,o])=>[i,Ufh(i,o,r[i])]));return{...e,featureFlags:t,featureFlagPayloads:r,flags:n}}};function Ufh(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 mul=e=>Object.fromEntries(Object.entries(e??{}).map(([t,r])=>[t,BKt(r)]).filter(([,t])=>t!==void 0)),hul=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?Jft(n):void 0]}))},BKt=e=>e===void 0?void 0:e.variant??e.enabled,Jft=e=>{if(typeof e!="string")return e;try{return JSON.parse(e)}catch{return e}};var gul=["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"],Vfh=["$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",...gul,"$session_id","$window_id","$lib","$lib_version","$device_id","$is_server","$react_native_version"],RKt=(e,t=[])=>{let r={},n=i=>{e[i]!==void 0&&(r[i]=e[i])};return Vfh.forEach(n),t.forEach(n),r};var Ion=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 d$o(){return"CompressionStream"in globalThis&&"TextEncoder"in globalThis&&"Response"in globalThis&&typeof Response.prototype.blob=="function"}var qfh="NativeGzipValidationError",Wfh=31,Hfh=139,Kfh=8,Jfh=e=>e.length>=2&&e[0]===Wfh&&e[1]===Hfh;var DKt,Yfh=()=>{if(DKt)return DKt;DKt=[];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;DKt[e]=t>>>0}return DKt},Xfh=e=>{let t=Yfh(),r=4294967295;for(let n=0;n<e.length;n++)r=t[(r^e[n])&255]^r>>>8;return(4294967295^r)>>>0},von=e=>{throw Kft(qfh,`Native gzip produced invalid output: ${e}`)},Zfh=async(e,t)=>{e.size<18&&von("too-short");let r=new Uint8Array(await e.slice(0,10).arrayBuffer());(!Jfh(r)||r[2]!==Kfh)&&von("invalid-header");let n=new DataView(await e.slice(e.size-8).arrayBuffer());n.getUint32(0,!0)!==Xfh(t)&&von("invalid-crc");let i=t.length>>>0;n.getUint32(4,!0)!==i&&von("invalid-size")};async function kKt(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 Zfh(c,n),c}catch(n){if(r?.rethrow)throw n;return t&&console.error("Failed to gzip compress data",n),null}}var nG=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 ZZo(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=Kft("AbortError","Response body read timed out");this.cancelResponseBody(t),this.responseBodyTextPromise=Promise.reject(t)}else{let t=new Promise((n,i)=>{this.responseBodyTimer=UN(()=>{this._bodyReadTimedOut=!0;let o=Kft("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{}})()}},tge=class extends Error{constructor(t){super("Network error while fetching PostHog",t instanceof Error?{cause:t}:{}),this.error=t,this.name="PostHogFetchNetworkError"}};var Iul=(e,t)=>{for(let r of Object.keys(t))(r.startsWith("$feature/")||r==="$active_feature_flags")&&(e[r]=t[r])};async function Aul(e){if(e instanceof nG){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 $fh(e){return typeof e=="object"&&(e instanceof nG||vul(e))}function vul(e){return e instanceof tge}function edh(e){if(e instanceof nG)return e.status===502||e.status===504;if(!(e instanceof tge))return!1;let t=e.error;return(t?.code??t?.cause?.code)!=="ECONNREFUSED"}var yul=10485760;function bul(e){try{return typeof e!="string"?e instanceof Uint8Array?e.byteLength:e.size:"u">typeof Buffer?Buffer.byteLength(e,Jcl):new TextEncoder().encode(e).length}catch{return 0}}function Yft(e){return typeof e=="object"&&e instanceof nG&&e.status===413}function Con(e){return e instanceof nG?e.status===408||e.status===429||e.status>=500:vul(e)}function Eul(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var m$o="default",FKt=class{getErrorPropertiesBuilder(){return this._errorPropertiesBuilder||(this._errorPropertiesBuilder=this.createErrorPropertiesBuilder()),this._errorPropertiesBuilder}createErrorPropertiesBuilder(){return new xKt([new SKt,new TKt,new wKt,new OKt],i$o())}getEvaluationRuntime(){}constructor(t,r={}){this.flushPromise=null,this.pendingFlushPromise=null,this.flushPromises=new Set,this._dequeuedMessagesCount=0,this.shutdownPromise=null,this.promiseQueue=new uon,this._events=new Ion,this._isInitialized=!1;let n=typeof t=="string"?t.trim():"",i=typeof r.host=="string"?r.host.trim():"",o=!n;this._logger=Fcl("[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=Ycl(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:Con},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=!d$o()||(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(jM.OptedOut)??!this.defaultOptIn}async optIn(){this.wrap(()=>{this.setPersistedProperty(jM.OptedOut,!1)})}async optOut(){this.wrap(()=>{this.setPersistedProperty(jM.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 Iul(n,r),t.event==="$feature_flag_called"&&n.$feature_flag_has_experiment===!1&&this.isMinimalFlagCalledEventsEnabled()&&(n=RKt(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:d=>d.json()},{retryCount:this.featureFlagsRequestMaxRetries,retryCheck:edh},this.featureFlagsRequestTimeoutMs).then(d=>({success:!0,response:f$o(d)})).catch(d=>(this._events.emit("error",d),{success:!1,error:this.categorizeRequestError(d)}))}categorizeRequestError(t){if(t instanceof nG)return{type:"api_error",statusCode:t.status};if(t instanceof tge){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=BKt(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(jM.Props)),this._props||{}}set props(t){this._props=t}async register(t){this.wrap(()=>{this.props={...this.props,...t},this.setPersistedProperty(jM.Props,this.props)})}async unregister(t){this.wrap(()=>{delete this.props[t],this.setPersistedProperty(jM.Props,this.props)})}processBeforeEnqueue(t){return t}async flushStorage(){}getQueueRouteKey(t){return m$o}persistedQueueKeyForRoute(t){return jM.Queue}getActiveQueueRoutes(){return[m$o]}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=UN(()=>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=Eul(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=j5e(o.uuid,_N),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:$Zo(),uuid:j5e(r?.uuid,_N)};return(r?.disableGeoip??this.disableGeoip)&&(Eul(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 Aul(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(()=>CKt([r])).then(()=>(this.pendingFlushPromise===i&&(this.pendingFlushPromise=null),this._flush()));return this.pendingFlushPromise=i,this.flushPromise=i,this.flushPromises.add(i),this.addPendingPromise(i),CKt([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 kKt(t,this.isDebug)}getBatchEndpointPath(t){return"/batch/"}async sendBatch(t,r,n=m$o){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:$Zo()};this.historicalMigration&&(i.historical_migration=!0);let o=S1e(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)||[],d=[...a],f=p.filter(m=>{let g=m.message?.uuid,A=d.findIndex(y=>y===m||typeof g=="string"&&g.length>0&&y.message?.uuid===g);return A===-1?!0:(d.splice(A,1),!1)});this.setPersistedProperty(n,f),i=f,this._dequeuedMessagesCount+=a.length,await this.flushStorage()},l={retryCheck:p=>Yft(p)?!1:Con(p)};try{await this.sendBatch(c,l,t)}catch(p){if(Yft(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 tge||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=bul(i);if(o>yul)return this.logMsgIfDebug(()=>console.warn(`[PostHog] Not sending a ${t} batch of ${o} bytes: the endpoint accepts at most ${yul}`)),{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=>Yft(l)||l instanceof nG&&l.retryAfterMs!==void 0?!1:Con(l)}),{kind:"ok"}}catch(l){if(Yft(l))return{kind:"too-large"};if(Con(l)){let p=l instanceof nG?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=bul(s),c={...this._retryOptions,...i},u=0;return await Xcl(async()=>{u++;let l=new AbortController,p=o??this.requestTimeout,d=Date.now()+p,f,m=new Promise((x,v)=>{f=UN(()=>{let S=Kft("AbortError",`Request timed out after ${p}ms`);v(S),l.abort(S)},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 tge(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 tge(B)}let v=r.mode==="no-cors",S=n.type==="successful-write"?300:400;if(!v&&(g.status<200||g.status>=S))throw new nG(g,a,d,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 tge(B):B}}finally{clearTimeout(f),l.signal.aborted&&g&&I()}},{...c,retryCheck:l=>{let p=c.retryCheck(l);return p&&u<=c.retryCount&&l instanceof nG&&l.cancelResponseBody(),p}})}async _shutdown(t=3e4){await this._initPromise;let r=!1;return this.clearFlushTimer(),this.disabled?void 0:T1e((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(!$fh(i))throw i;await Aul(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 odh=/[a-z][a-z0-9+.-]{0,63}:[^\s<>"]+/gi;var CtC=new RegExp(odh.source,"i"),Cul=/[a-z][a-z0-9+.-]{0,63}:\/\//i,xtC=new RegExp(`^${Cul.source}`,"i"),StC=new RegExp(Cul.source,"gi");var sdh=["is_not","is_set"],adh=1152921504606847e3,sl=class e extends Error{constructor(t){super(t),this.name=this.constructor.name,Object.setPrototypeOf(this,e.prototype)}};function h$o(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(!h$o(t in e?e[t]:null))return!1;return!0}function g$o(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(!g$o(t in e?e[t]:null))return!1;return!0}function NKt(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 sl("Cannot stringify an unpaired surrogate like the flags service");t++}else if(r>=56320&&r<=57343)throw new sl("Cannot stringify an unpaired surrogate like the flags service")}}function Son(e,t=new Set){if(!(e===null||typeof e=="boolean")){if(typeof e=="string")return void NKt(e);if(typeof e=="number"){if(!Number.isFinite(e))throw new sl(`Cannot represent non-finite number ${e} like the flags service`);return}if(Array.isArray(e)){if(t.has(e))throw new sl("Cannot represent a circular array during local evaluation");t.add(e);try{for(let r=0;r<e.length;r++)r in e&&Son(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 sl("Cannot represent a non-JSON object like the flags service");if(t.has(e))throw new sl("Cannot represent a circular object during local evaluation");t.add(e);try{for(let n of Object.keys(e))NKt(n),Son(e[n],t)}finally{t.delete(e)}return}throw new sl(`Cannot represent ${typeof e} like the flags service`)}}function cdh(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 A$o(e,t=new Set){if(e===null)return"null";if(typeof e=="string")return NKt(e),JSON.stringify(e);if(typeof e=="boolean")return e?"true":"false";if(typeof e=="number"){if(!Number.isFinite(e))throw new sl(`Cannot stringify non-finite number ${e} like the flags service`);if(Number.isInteger(e))throw new sl(`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 sl("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?A$o(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 sl("Cannot stringify a non-JSON object like the flags service");if(t.has(e))throw new sl("Cannot stringify a circular object during local evaluation");t.add(e);try{let n=Object.keys(e);return n.forEach(NKt),`{${n.sort(cdh).map(i=>`${JSON.stringify(i)}:${A$o(e[i],t)}`).join(",")}}`}finally{t.delete(e)}}throw new sl(`Cannot stringify ${typeof e} like the flags service`)}function xon(e){return typeof e=="string"?(NKt(e),e):A$o(e)}function xul(e){try{return new RegExp(e),!0}catch{return!1}}function iG(e){return String(e).replace(/[A-Z]/g,t=>t.toLowerCase())}function wul(e,t,r){if(!/^\d+$/.test(e)||r==="strict"&&e.length>1&&e[0]==="0")throw new sl(`Invalid semver: ${t}`);return parseInt(e,10)}function n1(e,t="strict"){let n=String(e).trim().replace(/^[vV]/,"").split("-")[0].split("+")[0];if(!n||n.startsWith("."))throw new sl(`Invalid semver: ${e}`);let i=n.split("."),o=s=>s===void 0||s===""?0:wul(s,e,t);return[o(i[0]),o(i[1]),o(i[2])]}function oG(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 udh(e,t){let r=n1(e,t);return{lower:[r[0],r[1],r[2]],upper:[r[0],r[1]+1,0]}}function ldh(e,t){let[r,n,i]=n1(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 pdh(e,t){let n=String(e).trim().replace(/^[vV]/,"").replace(/\.\*$/,"").replace(/\*$/,"");if(!n)throw new sl(`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 wul(c,e,t)}catch{}throw new sl(`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 Sul(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 sl(`${e} is in an invalid date format`)}throw new sl(`The date provided ${e} must be a string, number, or date object`)}function y$o(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 b$o(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 sl(`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&&!sdh.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,d)=>{if(r.propertyMatchingVersion!==2&&h$o(p)||Array.isArray(p)&&p.length===0)return Son(d),g$o(p)===g$o(d);if(r.propertyMatchingVersion===2&&typeof d=="number"&&h$o(p))return Son(d),!1;if(Array.isArray(p)){let f=xon(d).toLowerCase();return p.some(m=>xon(m).toLowerCase()===f)}return xon(p).toLowerCase()===xon(d).toLowerCase()},l=(p,d,f)=>{if(f==="gt")return p>d;if(f==="gte")return p>=d;if(f==="lt")return p<d;if(f==="lte")return p<=d;throw new Error(`Invalid operator: ${f}`)};switch(o){case"exact":return u(i,c);case"is_not":return!u(i,c);case"is_set":return!0;case"icontains":return iG(c).includes(iG(i));case"not_icontains":return!iG(c).includes(iG(i));case"starts_with":return iG(c).startsWith(iG(i));case"not_starts_with":return!iG(c).startsWith(iG(i));case"ends_with":return iG(c).endsWith(iG(i));case"not_ends_with":return!iG(c).endsWith(iG(i));case"regex":return xul(String(i))&&String(c).match(String(i))!==null;case"not_regex":return xul(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)),d=typeof c=="number"?c:c!=null?parseFloat(String(c)):NaN;return Number.isFinite(p)&&Number.isFinite(d)?l(d,p,o):l(String(c),String(i),o)}case"is_date_after":case"is_date_before":{if(typeof i=="boolean")throw new sl("Date operations cannot be performed on boolean values");let p=y$o(String(i));p==null&&(p=Sul(i));let d=Sul(c);return o==="is_date_before"?d<p:d>p}case"semver_eq":return oG(n1(String(c),s),n1(String(i),s))===0;case"semver_neq":return oG(n1(String(c),s),n1(String(i),s))!==0;case"semver_gt":return oG(n1(String(c),s),n1(String(i),s))>0;case"semver_gte":return oG(n1(String(c),s),n1(String(i),s))>=0;case"semver_lt":return oG(n1(String(c),s),n1(String(i),s))<0;case"semver_lte":return oG(n1(String(c),s),n1(String(i),s))<=0;case"semver_tilde":{let p=n1(String(c),s),{lower:d,upper:f}=udh(String(i),s);return oG(p,d)>=0&&oG(p,f)<0}case"semver_caret":{let p=n1(String(c),s),{lower:d,upper:f}=ldh(String(i),s);return oG(p,d)>=0&&oG(p,f)<0}case"semver_wildcard":{let p=n1(String(c),s),{lower:d,upper:f}=pdh(String(i),s);return oG(p,d)>=0&&oG(p,f)<0}default:throw new sl(`Unknown operator: ${o}`)}}async function Tul(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 jKt(e,t,r="",n="."){let i=await Tul(`${e}${n}${t}${r}`);return parseInt(i.slice(0,15),16)/adh}async function E$o(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 jKt("holdout",t,"","-")>n/100))return`holdout-${e.id}`}function won(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 I$o(e,t,r){let n=await jKt(e,t,"variant");return won(r).find(i=>n>=i.valueMin&&n<i.valueMax)?.key}function v$o(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:Jft(n)}var Oul=9223372036854776e3,fdh="9223372036854775808",ddh=Object.prototype.propertyIsEnumerable;function mdh(){return{ancestors:new WeakSet,remainingNodes:1e4}}function wne(e,t){try{return Pul(e,t,mdh(),0)}catch{return[]}}function hdh(e,t){let r=e.toString(),n=BigInt(fdh);return e>=n||e<-n?(t?.debug(`Attribute ${r} is outside the int64 range; encoding it as a string`),{stringValue:r}):{intValue:r}}function S$o(e,t,r,n){if(r.remainingNodes<=0)return{stringValue:hon};if(r.remainingNodes--,wcl(e))return{boolValue:e};if(typeof e=="bigint")return hdh(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>=Oul||e<-Oul?(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:xne(e)};if(typeof e=="function")return{stringValue:Kcl};if(typeof e=="symbol")return{stringValue:String(e)};if(typeof e=="object"&&e!==null){if(r.ancestors.has(e))return{stringValue:mon};if(n>=20)return{stringValue:hon};if(e instanceof Date){let i=e.getTime(),o=Number.isFinite(i)?e.toISOString():String(e);return{stringValue:typeof o=="string"?xne(o):String(o)}}r.ancestors.add(e);try{try{let i=e.toJSON;if(typeof i=="function")return S$o(i.call(e),t,r,n+1)}catch{}return X4(e)?{arrayValue:{values:gdh(e,t,r,n+1)}}:{kvlistValue:{values:Pul(e,t,r,n+1)}}}finally{r.ancestors.delete(e)}}return{stringValue:xne(String(e))}}function gdh(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(XJ(a))continue;i.push(S$o(a,t,r,n))}catch{i.push({stringValue:rG})}return e.length>s&&i.push({stringValue:hon}),i}function Pul(e,t,r,n){let i=[];for(let o in e)if(ddh.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(GZo(s)||$he(s))continue;i.push({key:xne(o),value:S$o(s,t,r,n)})}catch{i.push({key:xne(o),value:{stringValue:rG}})}}return i}function QKt(e,t,r){return{...ege({},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 Adh=["service.name","deployment.environment","service.version","telemetry.sdk.name","telemetry.sdk.version"];function MKt(e,t){let r=ege({},e),n={};for(let i of Adh)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i],delete r[i]);return[...wne(r,t),...wne(n,t)]}var Bul={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 ydh(e){if(e)return Object.prototype.hasOwnProperty.call(Bul,e)?Bul[e]:e}function w$o(e,t){let r=ydh(e);return{...r?{"os.name":r}:{},...t?{"os.version":t}:{}}}var bdh={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}},_tC=bdh.info;var z5e=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=UN(()=>{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 LKt(){return 1-.25+Math.random()*.25*2}var sG=1;function _Kt(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 UKt=[0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4];function T$o(e){return String(e)+"000000"}function O$o(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 Rul(e,t){for(let r=0;r<t.length;r++)if(e<=t[r])return r;return t.length}function P$o(e,t,r){return QKt(e,t,r)}function B$o(e,t,r,n){return{resourceMetrics:[{resource:{attributes:MKt(t)},scopeMetrics:[{scope:{name:r,version:n},metrics:e}]}]}}function Oon(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 Dul=1,VKt=class{constructor(t,r,n){this._instance=t,this._config=r,this._logger=n,this._series=new Map,this._flushTimer=new z5e(()=>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 N5e,this._consecutiveFlushFailures=0,this._flushJitter=sG,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=sG,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=O$o(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(UKt.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[Rul(r,UKt)]+=1;break}}}_runBeforeSend(t){let r=this._config.beforeSend;if(!r)return t;let n=X4(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(_Kt(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=LKt()):(this._consecutiveFlushFailures=0,this._flushJitter=sG),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 B$o(this._buildMetrics(t),P$o(this._config,this._instance.getLibraryId(),this._instance.getLibraryVersion()),this._instance.getLibraryId(),this._instance.getLibraryVersion())}_buildMetrics(t){let r=T$o(Date.now()),n=new Map;for(let i of t.values()){let o=O$o(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:Dul,isMonotonic:!0,dataPoints:[]}:i.type==="gauge"?s.gauge={dataPoints:[]}:s.histogram={aggregationTemporality:Dul,dataPoints:[]},n.set(o,s));let a=wne(i.attributes??{},this._logger),c=T$o(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:UKt};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 Cdh="0".repeat(32),xdh="0".repeat(16),Sdh=/^[0-9a-f]+$/;function wdh(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 Tdh(e){let t="";for(let r=0;r<e.length;r++)t+=e[r].toString(16).padStart(2,"0");return t}function kul(e){let t=Tdh(wdh(e));return/[^0]/.test(t)?t:t.slice(0,-1)+"1"}function Ful(){return kul(16)}function Nul(){return kul(8)}function jul(e,t,r){return typeof e=="string"&&e.length===t&&e!==r&&Sdh.test(e)}function zul(e){return jul(e,32,Cdh)}function Qul(e){return jul(e,16,xdh)}var Odh=/^([0-9a-f]{2})-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})(-.*)?$/;function Mul(e){let t=Lul(e);return t&&{traceId:t.traceId,spanId:t.spanId,flags:Pdh(t.flags)}}function Pdh(e){return 1&parseInt(e,16)?Bon:Bdh}function Lul(e){if(typeof e!="string")return;let t=Odh.exec(e.trim());if(!t)return;let[,r,n,i,o,s]=t;if(r!=="ff"&&!(r==="00"&&s)&&!(!zul(n)||!Qul(i)))return{version:r,traceId:n,spanId:i,flags:o}}function _ul(e){return Lul(e)&&e.trim()}function Pon(e){return Array.isArray(e)&&e.length===1?e[0]:e}var Bon="01",Bdh="00";function Uul(e,t,r=Bon){return`00-${e}-${t}-${r}`}var Rdh=32,R$o=512;function Ron(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>Rdh)){for(let n of r)if(n.trim()&&!n.includes("="))return;return t.length<=R$o?t:kdh(r)}}var Ddh=128;function kdh(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()>R$o;n--)t[n].length>Ddh&&t.splice(n,1);for(;t.length&&r()>R$o;)t.pop();return t.length?t.join(","):void 0}var Vul="unknown";function Q5e(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 "${Vul}"`),Vul)}function Xft(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 Gul(e,t,r){let n=Xft(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 Don(e,t){return e<t?t:e}function GKt(e,t,r,n){let i=Xft(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 Fon(){let e=globalThis.performance;return typeof e?.now=="function"?e.now():void 0}var Zft=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??Bon,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:Fon(),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=Fon();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(XJ(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]=jon(r,this._maxAttributeValueLength)}setAttribute(t,r){return this._mutable("setAttribute")&&this._writeAttribute(t,r),this}setAttributes(t){if(this._mutable("setAttributes")){let r=ege({},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&&Kul(r,this._maxAttributesPerEvent,this._maxAttributeValueLength);this._events.push({name:Q5e(t,"Span event name",this._maxAttributeValueLength,this._logger),timestamp:GKt(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:D$o(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}=k$o(t);return this.addEvent(Fdh,{"exception.type":r,"exception.message":n,...i&&{"exception.stacktrace":i}}),this.setStatus("error",n)}updateName(t){return this._mutable("updateName")&&(this._name=Q5e(t,"Span name",this._maxAttributeValueLength,this._logger)),this}traceparent(){return Uul(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=GKt(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:Don(n,this._startTime),...this._droppedAttributes&&{droppedAttributesCount:this._droppedAttributes},...this._droppedEvents&&{droppedEventsCount:this._droppedEvents}},this._autoKeys)}},Fdh="exception",Ndh=4294967295;function jdh(e){try{return typeof e=="string"?e:String(e)}catch{return rG}}function M5e(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?0:Math.min(Math.floor(e),Ndh)}function zdh(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 Wul(e,t,r,n,i,o,s=[]){let a=0,c=0,u={};for(let f of zdh(e.attributes,s)){let m=e.attributes[f];if(!XJ(m)){if(!t.has(f)){if(a>=r){c++;continue}a++}Object.defineProperty(u,f,{value:jon(m,o),enumerable:!0,writable:!0,configurable:!0})}}e.attributes=u,c&&(e.droppedAttributesCount=M5e(e.droppedAttributesCount)+c);let l=0,p=0,d=[];for(let f of e.events){if(l>=n){p++;continue}if(l++,f.attributes){let m=Kul(f.attributes,i,o);f.attributes=m.attributes,m.dropped&&(f.droppedAttributesCount=M5e(f.droppedAttributesCount)+m.dropped)}d.push(f)}e.events=d,p&&(e.droppedEventsCount=M5e(e.droppedEventsCount)+p),e.status?.message&&(e.status={...e.status,message:D$o(jdh(e.status.message),o)})}var Non=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(){}},Hul=new Non,qKt=class extends Non{constructor(t,r){super(),this._traceparent=t,this._tracestate=r}traceparent(){return this._traceparent}tracestate(){return this._tracestate??null}};function Qdh(e){try{let t=e.stack;return typeof t=="string"&&t?{stack:t}:{}}catch{return{}}}function O1e(e,t){let r=Pon(e?.parent)??t,n=typeof r=="string"||r==null?r:qul(r,"traceparent"),i=_ul(n);if(!i)return Hul;let o=typeof r=="string"||r==null?e?.tracestate:qul(r,"tracestate");return new qKt(i,Ron(o))}function qul(e,t){try{let r=e[t];return typeof r=="function"?r.call(e):void 0}catch{return}}function D$o(e,t){return e.length>t?e.slice(0,t):e}function jon(e,t){return kon(e,t,{ancestors:new WeakSet,remainingNodes:1e4},0)}function kon(e,t,r,n){if(e===null||typeof e!="object")return XJ(e)||r.remainingNodes<=0?e:(r.remainingNodes--,typeof e=="string"?D$o(e,t):e);if(r.ancestors.has(e))return mon;if(r.remainingNodes<=0||n>=20)return e;r.remainingNodes--,r.ancestors.add(e);try{if(e instanceof Date)return e;let i=Mdh(e);if(i.selfDescribed)return XJ(i.value)?String(i.value):kon(i.value,t,r,n+1);if(X4(e)){let a=Math.min(e.length,1e3),c=[];for(let u=0;u<a;u++)try{c.push(kon(e[u],t,r,n+1))}catch{c.push(rG)}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=kon(e[a],t,r,n+1)}catch{c=rG}a&&!XJ(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 Mdh(e){try{let t=e.toJSON;if(typeof t=="function")return{selfDescribed:!0,value:t.call(e)}}catch{}return{selfDescribed:!1}}function Kul(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=jon(e[a],r)}catch{c=rG}XJ(c)||(o++,Object.defineProperty(i,a,{value:c,enumerable:!0,writable:!0,configurable:!0}))}return{attributes:i,dropped:s}}function Jul(e,t){for(let r of Object.keys(e))e[r]=jon(e[r],t);return e}function WKt(e,t,r){return t===Hul?r(t):e.with(t,()=>r(t))}function k$o(e){try{let t=Qdh(e);if(w1e(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 F$o={internal:1,server:2,client:3,producer:4,consumer:5},Ldh={ok:1,error:2},_dh=1,Udh=256,Vdh=512;function Gdh(e){let t=parseInt(e.traceFlags,16);return(Number.isFinite(t)?255&t:_dh)|Udh|(e.parentIsRemote?Vdh:0)}function zon(e){if(typeof e=="string")return xne(e);try{return xne(String(e))}catch{return rG}}function qdh(e){return e&&Object.prototype.hasOwnProperty.call(F$o,e)?F$o[e]:F$o.internal}function N$o(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 Wdh(e,t){let r={name:zon(e.name),timeUnixNano:N$o(e.timestamp)};if(e.attributes){let i=wne(e.attributes,t);i.length&&(r.attributes=i)}let n=M5e(e.droppedAttributesCount);return n&&(r.droppedAttributesCount=n),r}function Yul(e,t){let r={traceId:e.traceId,spanId:e.spanId,name:zon(e.name),kind:qdh(e.kind),startTimeUnixNano:N$o(e.startTime),endTimeUnixNano:N$o(e.endTime),flags:Gdh(e)};e.parentSpanId&&(r.parentSpanId=e.parentSpanId),e.traceState&&(r.traceState=zon(e.traceState));let n=wne(e.attributes,t);n.length&&(r.attributes=n),e.events.length&&(r.events=e.events.map(s=>Wdh(s,t)));let i=M5e(e.droppedAttributesCount);i&&(r.droppedAttributesCount=i);let o=M5e(e.droppedEventsCount);return o&&(r.droppedEventsCount=o),e.status&&(r.status={code:Ldh[e.status.code],...e.status.message&&{message:zon(e.status.message)}}),r}function Xul(e,t,r){return QKt(e,t,r)}function Zul(e,t,r,n,i){return{resourceSpans:[{resource:{attributes:MKt(t,i)},scopeSpans:[{scope:{name:r,version:n},spans:e}]}]}}var $ul=8;function Qon(){return Fon()??Date.now()}function j$o(e){try{return e instanceof Zft}catch{return!1}}function ell(e,t){let r=Mul(e);if(r)return{traceId:r.traceId,parentSpanId:r.spanId,traceState:Ron(t),traceFlags:r.flags,isRemote:!0}}function Hdh(e){try{return typeof e.traceparent=="function"}catch{return!1}}function Kdh(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 Mon(e,t,r){e[t]!==r&&(e[t]=r)}function Jdh(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 HKt=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 z5e(()=>this._flushInBackground()),this._flushPromise=null,this._droppedSinceWarning=0,this._lastDropWarningAt=0,this._dropReasons=new Set,this._consecutiveFlushFailures=0,this._flushJitter=sG,this._retryAfter=new N5e,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 O1e(r,this._contextManager.active());let n=Pon(r?.parent);if(n&&typeof n!="string"&&!j$o(n)){if(Hdh(n))return this._logger.debug("Span parent is not a span from this SDK; returning an inert span"),O1e(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`),O1e(r,this._contextManager.active());let o=Date.now(),s=Gul(r?.startTime,o,this._logger),a=Nul();this._liveSpans.set(a,Qon());let c=this._autoContextAttributes();return new Zft({traceId:i?.traceId??Ful(),spanId:a,parentSpanId:i?.parentSpanId,traceState:i?.traceState,traceFlags:i?.traceFlags,parentIsRemote:i?.isRemote,name:Q5e(t,"Span name",this._config.maxAttributeValueLength,this._logger),kind:r?.kind??"internal",attributes:ege({...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:Xft(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=WKt(this._contextManager,s,o);return Zcl(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=sG,this._retryAfter.reset(),this._resetHeadBatchBudget()}_resetHeadBatchBudget(){this._headBatchFailures=0,this._headBatchChargeableAt=0}_resolveParent(t,r){if(typeof t=="string"){let i=ell(t,r?.tracestate);return i||this._logger.debug("Ignoring malformed traceparent; starting a new trace"),i}if(j$o(t))return t.childContext();let n=this._contextManager.active();if(j$o(n))return n.childContext();if(n instanceof qKt)return ell(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 Zft))return;let{type:n,message:i,stack:o}=k$o(r);t.addEvent("exception",{"exception.type":n,"exception.message":i,...o&&{"exception.stacktrace":o}}),t.statusIsExplicitlyOk||t.setStatus("error",i)}_evictAgedSpans(){let t=Qon()-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 f of this._config.beforeSpanSend){let m=f(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},!Kdh(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=Q5e(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=Xft(l.startTime)??i.startTime,l.endTime=Don(Xft(l.endTime)??i.endTime,l.startTime);let d=[];for(let f of l.events)try{d.push({...f,name:Q5e(f.name,"Span event name",this._config.maxAttributeValueLength,this._logger),timestamp:GKt(f.timestamp,l.startTime,"event timestamp",this._logger)})}catch{this._logger.debug("beforeSpanSend left an unreadable span event; dropping it")}return l.events=d,Wul(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{Mon(t,"traceId",r.traceId),Mon(t,"spanId",r.spanId),Mon(t,"parentSpanId",r.parentSpanId),Mon(t,"traceState",r.traceState)}catch{return Jdh(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(Yul(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=Jul(Xul(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)),d=this._queue.slice(0,p),f=this._encodeBatch(d);if(!f.length){this._queue.splice(0,p),o-=p,s+=p,this._resetHeadBatchBudget();continue}let m=Qon()>=this._headBatchChargeableAt&&!this._retryAfter.isOpen(),g=await this._instance._sendTracesBatch(Zul(f,r,n,i,this._logger));if(c!==this._generation)break;if(this._retryAfter.record(g),g.kind==="ok"){this._consecutiveFlushFailures=0,this._flushJitter=sG,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=sG,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=LKt(),this._headBatchSize=p,m&&(this._headBatchFailures++,this._headBatchChargeableAt=Qon()+this._nextFlushDelay()),this._headBatchFailures<$ul)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=sG,this._resetHeadBatchBudget(),this._recordDrop(p,`the ingestion endpoint failed ${$ul} 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=sG,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(_Kt(this._config.flushIntervalMs,this._consecutiveFlushFailures,this._flushJitter,3e4),this._retryAfter.remainingMs())}};var KKt=class{active(){return this._active}with(t,r){let n=this._active;this._active=t;try{return r()}finally{this._active=n}}};var Ydh=5e3,Xdh=512,Zdh=2048,$dh=128,emh=128,tmh=128,rmh=8192,nmh=1e4,imh=36e5;function P1e(e,t){return typeof e=="number"&&Number.isInteger(e)&&e>=1?e:t}var tll=["service.name","service.version","deployment.environment"];function omh(e){if(!(!e||typeof e!="object"||Array.isArray(e)))try{if(tll.every(r=>!(r in e)||typeof e[r]=="string"))return e;let t={...e};for(let r of tll)r in t&&typeof t[r]!="string"&&delete t[r];return t}catch{return}}function smh(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 z$o(e,t,r){let n=ege({...t},omh(e?.resourceAttributes)),i=P1e(e?.maxExportBatchSize,Xdh);return{serviceName:n?.["service.name"]??e?.serviceName,serviceVersion:n?.["service.version"]??e?.serviceVersion,environment:n?.["deployment.environment"]??e?.environment,resourceAttributes:n,beforeSpanSend:smh(e?.beforeSpanSend,r),maxAttributesPerSpan:P1e(e?.maxAttributesPerSpan,$dh),maxEventsPerSpan:P1e(e?.maxEventsPerSpan,emh),maxAttributesPerEvent:tmh,maxAttributeValueLength:P1e(e?.maxAttributeValueLength,rmh),flushIntervalMs:P1e(e?.flushIntervalMs,Ydh),maxExportBatchSize:i,maxQueueSize:Math.max(P1e(e?.maxQueueSize,Zdh),i),maxLiveSpans:P1e(e?.maxLiveSpans,nmh),maxSpanAgeMs:P1e(e?.maxSpanAgeMs,imh)}}var Q$o=require("fs"),ill=require("fs/promises"),L$o=require("path"),oll=require("readline"),Lon=new lO.ReduceableCache(25),JKt=new lO.ReduceableCache(20),_$o=7,amh=1e3,cmh=1e4,M$o=10485760;async function sll(e,t=ill.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"||dmh(u)||mmh(c)||!(0,L$o.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=all(a,i);if(c===void 0||JKt.get(c))continue;let u=n[a];if(!u)continue;u.sort((d,f)=>d-f);let l=gmh(u);if(l.every(d=>hmh(c,d)))continue;let p=Amh(Lon,c,{});s.push(lmh(a,l,p,c,t,r))}return await Promise.all(s).catch(()=>{}),e&&e.length>0&&pmh(e,Lon,i),Lon.reduce(),e}async function umh(e,t,r){let n,i=!1;try{n=await t(e,Q$o.constants.O_RDONLY|Q$o.constants.O_NONBLOCK);let o=await n.stat();return o.isFile()?o.size>M$o?void r?.debug(`Skipping source context for oversized file ${e}: ${o.size} bytes exceeds ${M$o}`):(i=!0,n):void 0}catch{return}finally{n&&!i&&await n.close().catch(()=>{})}}async function lmh(e,t,r,n,i,o){let s=await umh(e,i,o);if(s===void 0)return void JKt.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:M$o-1})}catch{JKt.set(n,1),l();return}let d;try{d=(0,oll.createInterface)({input:p})}catch{JKt.set(n,1),l(p);return}let f=0,m=0,g=t[m];if(g===void 0)return void l(p);let A=g[0],y=g[1];function I(){JKt.set(n,1),d.close(),d.removeAllListeners(),l(p)}p.on("error",I),d.on("error",I),d.on("close",()=>l(p)),d.on("line",x=>{if(f++,!(f<A)&&(r[f]=ymh(x,0),f>=y)){if(m===t.length-1){d.close(),d.removeAllListeners();return}m++;let v=t[m];if(v===void 0){d.close(),d.removeAllListeners();return}A=v[0],y=v[1]}})})}function pmh(e,t,r){for(let n of e)if(n.filename&&n.context_line===void 0&&typeof n.lineno=="number"){let i=all(n.filename,r),o=i===void 0?void 0:t.get(i);if(o===void 0)continue;fmh(n.lineno,n,o)}}function fmh(e,t,r){if(t.lineno===void 0||r===void 0)return;t.pre_context=[];for(let i=cll(e);i<e;i++){let o=r[i];if(o===void 0)return void rll(t);t.pre_context.push(o)}if(r[e]===void 0)return void rll(t);t.context_line=r[e];let n=ull(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 rll(e){delete e.pre_context,delete e.context_line,delete e.post_context}function dmh(e){return e.startsWith("node:")||e.endsWith(".min.js")||e.endsWith(".min.cjs")||e.endsWith(".min.mjs")||e.startsWith("data:")}function mmh(e){return e.lineno!==void 0&&e.lineno>cmh||e.colno!==void 0&&e.colno>amh}function all(e,t){return(0,L$o.isAbsolute)(e)?JSON.stringify([null,e]):t===void 0?void 0:JSON.stringify([t,e])}function hmh(e,t){let r=Lon.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 gmh(e){if(!e.length)return[];let t=0,r=e[0];if(typeof r!="number")return[];let n=nll(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+_$o:(i.push(n),n=nll(o)),t++}return i}function nll(e){return[cll(e),ull(e)]}function cll(e){return Math.max(1,e-_$o)}function ull(e){return e+_$o}function Amh(e,t,r){let n=e.get(t);return n===void 0?(e.set(t,r),r):n}function ymh(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 $ft=require("path");function lll(e=process.cwd()){let t=$ft.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,$ft.isAbsolute)(o.filename)&&(o.filename=r((0,$ft.relative)(n,r(o.filename))));return i}}var pll="5.55.0";var rge={ERRORS_WHILE_COMPUTING:"errors_while_computing_flags",FLAG_MISSING:"flag_missing",QUOTA_LIMITED:"quota_limited",UNKNOWN_ERROR:"unknown_error"};var B1e=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(rge.ERRORS_WHILE_COMPUTING),this._quotaLimited&&o.push(rge.QUOTA_LIMITED),r===void 0&&o.push(rge.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 bmh=6e4;function fll(e){return e==="client"||e==="server"?e:"all"}function Emh(e,t){return e===t||e==="all"||t==="all"}var edt=class e extends Error{constructor(t){super(),Error.captureStackTrace(this,this.constructor),this.name="ClientError",this.message=t,Object.setPrototypeOf(this,e.prototype)}};function Imh(e,t){e.name=t.name,Error.captureStackTrace(e,t),Object.setPrototypeOf(e,t.prototype)}var Tne=class e extends Error{constructor(t){super(t),Imh(this,e)}},_on=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 Tne||u instanceof sl?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 Tne||u instanceof sl?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=v$o(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 sl("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 sl("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 sl(`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 sl("Feature flags not available for dependency evaluation");if(!("dependency_chain"in t))throw new sl(`Flag dependency property for '${o}' is missing required 'dependency_chain' field`);let s=t.dependency_chain;if(!Array.isArray(s))throw new sl(`Flag dependency property for '${o}' has an invalid 'dependency_chain' (expected array, got ${typeof s})`);if(s.length===0)throw new sl(`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 sl(`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 sl(`Missing flag dependency '${c}' for flag '${o}'`)}if(i[c]==null)throw new sl(`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 E$o(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,d=!1,f;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)){d=!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||[];f=x&&v.some(S=>S.key===x)?x:await this.getMatchingVariant(t,y)||!0;break}if(u&&I==="out_of_rollout_bound"){if(d)break;return!1}}catch(g){if(g instanceof Tne)throw g;if(g instanceof sl)d=!0;else throw g}if(f!==void 0)return f;if(d)throw new sl("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 d=await mll(u,i,s.cohorts,this.debugMode,f=>this.evaluateFlagDependency(f,i,o),s.propertyMatchingVersion);p=u.operator==="not_in"?!d:d}else p=l==="flag"?await this.evaluateFlagDependency(u,i,o):dll(u,i,c,s.propertyMatchingVersion);if(!p)return"no_match"}if(a==null)return"match"}return a!=null&&await jKt(t.key,r)>a/100?"out_of_rollout_bound":"match"}async getMatchingVariant(t,r){return I$o(t.key,r,t.filters?.multivariate?.variants||[])}variantLookupTable(t){return won(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?fll(r.evaluation_runtime):void 0}getFlagKeysByEvaluationRuntime(t){return this.featureFlags.filter(r=>Emh(fll(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(bmh,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 edt(`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 edt(`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 edt(`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 edt&&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=UN(()=>{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 T1e(r,t,()=>{throw new Error(`Cache shutdown timeout after ${t}ms`)})}catch(r){this.onError?.(new Error(`Error during cache shutdown: ${r}`))}}};function dll(e,t,r,n){return b$o(e,t,{warnFunction:r,propertyMatchingVersion:n})}function vmh(e,t){if(!(e in t))throw new Tne(`cohort ${e} not found in local cohorts - likely a static cohort that requires server evaluation`)}async function mll(e,t,r,n=!1,i,o){let s=String(e.value);vmh(s,r);let a=r[s];return hll(a,t,r,n,i,o)}async function hll(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 hll(u,t,r,n,i,o);if(s==="AND"){if(!l)return!1}else if(l)return!0}catch(l){if(l instanceof Tne)throw l;if(l instanceof sl)n&&console.debug(`Failed to compute property ${u} locally: ${l}`),c=!0;else throw l}if(c)throw new sl("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 mll(u,t,r,n,i,o);else if(u.type==="flag"){if(!i)throw new sl(`Flag dependency '${u.key||"unknown"}' cannot be evaluated without a flag dependency evaluator`);l=await i(u)}else l=dll(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 Tne)throw l;if(l instanceof sl)n&&console.debug(`Failed to compute property ${u} locally: ${l}`),c=!0;else throw l}if(c)throw new sl("can't match cohort without a given cohort property value");return s==="AND"}var Cmh=["--unhandled-rejections","--unhandled_rejections"],xmh=new Set(["throw","strict","warn","warn-with-error-code","none"]),Smh=[...globalThis.process?.execArgv??[]],wmh=globalThis.process?.env?.NODE_OPTIONS;function Tmh(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 gll(e){let t;for(let r=0;r<e.length;r++){let n=e[r],i=Cmh.find(s=>n===s||n.startsWith(`${s}=`));if(!i)continue;let o=n===i?e[++r]:n.slice(i.length+1);xmh.has(o)&&(t=o)}return t}function Omh(e=Smh,t=wmh){return gll(e)??gll(Tmh(t??""))??"throw"}var All=Omh();function yll(e,t,r){e(t,{mechanism:{type:r==="unhandledRejection"?"onunhandledrejection":"onuncaughtexception",handled:!1}})}function Pmh(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;yll(e,n,i),!r&&o===0&&(r=!0,t(n))},{_posthogErrorHandler:!0})}function bll(e,t,r=All){let n=globalThis.process;if(n){if(r==="strict")return void n.on("uncaughtExceptionMonitor",(i,o)=>yll(e,i,o));n.on("uncaughtException",Pmh(e,t))}}function Ell(e,t=All){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 Bmh=2e3,U$o=class e{constructor(t,r,n){this.client=t,this._exceptionAutocaptureEnabled=r.enableExceptionAutocapture||!1,this._logger=n,this._rateLimiter=new son({...Rcl(r),refillInterval:1e4,_logger:this._logger}),this.startAutocaptureIfEnabled()}static isPreviouslyCapturedError(t){return EKt(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=lO.getInjectedReleaseId();return c&&(s.$release_id=c),{event:"$exception",distinctId:i,properties:{...a,...s},_originatedFromCaptureException:!0}}startAutocaptureIfEnabled(){this.isEnabled()&&(bll(this.onException.bind(this),this.onFatalError.bind(this)),Ell(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(Bmh),globalThis.process.exit(1)}isEnabled(){return!this.client.isDisabled&&this._exceptionAutocaptureEnabled}shutdown(){this._rateLimiter.stop()}},L5e=U$o;var Uon=class{getProperty(t){return this._memoryStorage[t]}setProperty(t,r){this._memoryStorage[t]=r!==null?r:void 0}constructor(){this._memoryStorage={}}};function Rmh(e){return e==="v0"||e==="v1"}function Ill(){let e="u">typeof process?process.env?.POSTHOG_CAPTURE_MODE:void 0;return Rmh(e)?e:"v0"}var Dmh="$ai_",YKt="analytics";function vll(e){return typeof e.event=="string"&&e.event.startsWith(Dmh)}var tdt=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 V$o(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 kmh(e){return typeof e=="string"?e:void 0}var Fmh=[{property:"$cookieless_mode",optionKey:"cookieless_mode",coerce:V$o},{property:"$ignore_sent_at",optionKey:"disable_skew_correction",coerce:V$o},{property:"$process_person_profile",optionKey:"process_person_profile",coerce:V$o},{property:"$product_tour_id",optionKey:"product_tour_id",coerce:kmh}],Nmh=[{property:"$session_id",field:"session_id"},{property:"$window_id",field:"window_id"}];function jmh(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function zmh(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 Cll(e,t,r){r!==void 0&&!(t in e)&&(e[t]=r)}function Qmh(e){let r={...jmh(e.properties)?e.properties:{}},n={};for(let{property:o,optionKey:s,coerce:a}of Fmh)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 Nmh)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,Cll(r,"$set",e.$set),Cll(r,"$set_once",e.$set_once),{event:String(e.event??""),uuid:String(e.uuid??""),distinct_id:String(e.distinct_id??""),timestamp:zmh(e.timestamp),...i,options:n,properties:r}}function xll(e,{createdAt:t,historicalMigration:r}){let n={created_at:t,batch:e.map(Qmh)};return r&&(n.historical_migration=!0),n}var Mmh="/i/v1/analytics/events",Lmh=3e4,_mh=new Set([408,500,502,503,504]),Von=class{constructor(t,r){this.config=t,this.maxBackoffMs=t.maxBackoffMs??Lmh,this.fetchFn=r.fetch,this.onError=r.onError,this.now=r.now??Date.now,this.sleep=r.sleep??(n=>new Promise(i=>UN(i,n))),this.generateRequestId=r.generateRequestId??_N,this.compress=r.compress??kKt}async sendV1Batch(t){if(t.length===0)return;let r=this.generateRequestId(),n=new Date(this.now()).toISOString(),{batch:i}=xll(t,{createdAt:n,historicalMigration:this.config.historicalMigration}),o=`${this.config.host}${Mmh}`,s=[],a=i,c=Math.max(1,this.config.maxAttempts);for(let u=1;u<=c;u++){let l=u===c,p=S1e({created_at:n,...this.config.historicalMigration?{historical_migration:!0}:{},batch:a}),d,f;try{d=await this.sendOnce(o,p,u,r);let{response:m,signal:g}=d,{status:A}=m;if(A<200||A>=300)if(!l&&_mh.has(A)){let y=this.parseRetryAfter(m);await d.waitFor(d.cancelBody()).catch(()=>{}),f=this.backoffDelay(u,y)}else{let y=await this.buildHttpError(m,A,d.waitFor);return this.surfaceBatchFailure(r,s,a,y)}else{let y;try{y=await d.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 tdt({requestId:r,drops:s,retryExhausted:I.map(v=>v.uuid)}));a=I;let x=this.parseRetryAfter(m);f=this.backoffDelay(u,x)}}catch(m){if(d&&!d.signal.aborted)throw m;if(l)return this.surfaceBatchFailure(r,s,a,m);f=this.backoffDelay(u)}finally{d?.cleanup()}f!==void 0&&await this.sleep(f)}}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,d)=>{u=UN(()=>{let f=new Error(`Capture V1 request timed out ${c} after ${this.config.requestTimeoutMs}ms`);f.name="AbortError",d(f),a.abort(f)},this.config.requestTimeoutMs)});try{let p=this.fetchFn(t,{method:"POST",headers:o,body:s,signal:a.signal}),d=!1;p.then(y=>{a.signal.aborted&&!d&&this.cancelBody(y)}).catch(()=>{});let f=await Promise.race([p,l]);d=!0,c="while reading the response body";let m=!1,g,A=()=>g??=this.cancelBody(f);return{response:f,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 tdt({requestId:t,drops:r,retryExhausted:n.map(o=>o.uuid),cause:i}))}surfacePartialDrops(t,r){r.length>0&&this.onError(new tdt({requestId:t,drops:r,retryExhausted:[]}))}async cancelBody(t){try{await t.body?.cancel()}catch{}}};var _5e="ai-capture",Gon="/i/v0/ai/batch/";var Vmh=new TextEncoder;function q$o(e){return Vmh.encode(S1e(e)).length}function Sll(e,t=8388608,r=5242880){let n=[],i=[],o=[],s=0;for(let a of e){if(a===void 0)continue;let c=q$o(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 Gmh=100,wll=3e4,qmh=5e4,Wmh=50,Hmh=500,Kmh="https://us.i.posthog.com",Tll=new Set;function Won(e,t){Tll.has(e)||(Tll.add(e),console.warn(`[PostHog] ${t}`))}function Jmh(e){return typeof e=="string"?e.trim():""}function Ymh(e){return(typeof e=="string"?e.trim():"")||void 0}function Xmh(e){return(typeof e=="string"?e.trim():"")||Kmh}function Zmh(e){return(Array.isArray(e)?e:[e]).filter(r=>typeof r=="string"&&r.trim().length>0)}function $mh(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 Hon=class extends FKt{constructor(t,r={}){let n=Jmh(t),i={...r,maxQueueSize:r.maxQueueSize??1e4,flushInterval:r.flushInterval??5e3,host:Xmh(r.host),personalApiKey:Ymh(r.secretKey??r.personalApiKey)};if(super(n,i),this._memoryStorage=new Uon,this._aiCaptureRouteActive=!1,this._minimalFlagCalledEvents=!1,this.options=i,this.captureMode=Ill(),this.enableFullAiCapture=i.enableFullAiCapture===!0,this.context=this.initializeContext(),this.options.featureFlagsPollingInterval=typeof i.featureFlagsPollingInterval=="number"?Math.max(i.featureFlagsPollingInterval,Gmh):i.featureFlagsPollingInterval===null?null:wll,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 _on({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 L5e(this,i,this._logger),this.distinctIdHasSentFlagCalls={},this.maxCacheSize=i.maxCacheSize||qmh}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:CKt([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??Hmh,i=r>=n;if(this._waitUntilCycle.timer!==void 0&&clearTimeout(this._waitUntilCycle.timer),i)return void this.resolveWaitUntilFlush();let o=this.options.waitUntilDebounceMs??Wmh;this._waitUntilCycle.timer=UN(()=>{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"&&vll(t)?"ai":YKt}persistedQueueKeyForRoute(t){return t===_5e?jM.AiCaptureQueue:t==="ai"?jM.AiQueue:jM.Queue}getActiveQueueRoutes(){let t=this.captureMode==="v1"?[YKt,"ai"]:[YKt];return this._aiCaptureRouteActive&&t.push(_5e),t}getBatchEndpointPath(t){return t===_5e?Gon:super.getBatchEndpointPath(t)}async sendBatch(t,r,n=YKt){if(n===_5e)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}=Sll(t);for(let{event:o,bytes:s}of i){let a=`Event ${o} (${s} bytes) exceeds the ${8388608/1048576}MiB limit for ${Gon}, 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,_5e)}catch(n){if(!Yft(n))throw n;if(t.length===1){let[o]=t,a=`Event ${typeof o.event=="string"?o.event:"unknown"} (${q$o(o)} bytes) was rejected with 413 by ${Gon} 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 Von({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 pll}get metrics(){return this._metrics||(this._metrics=new VKt(this,Oon(this.options.metrics),this._logger)),this._metrics}initializeSpanContextManager(){return new KKt}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 HKt(this,z$o(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)??O1e(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):WKt(this._spanContextManager,O1e(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=j5e(t.uuid,_N);return this._sendPreparedAiEvent({...t,uuid:r},!1),r}async captureAiImmediate(t){if(this.disabled)return;let r=j5e(t.uuid,_N);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,_5e)}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=Zmh(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=wll){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 d=this.createFeatureFlagEvaluationContext(r,s,this.personPropertiesForLocalEvaluation(r,u),l);c==null&&(c=this.options.strictLocalEvaluation??!1);let f,m=!1,g,A,y,I,x,v,S;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,d,{matchValue:i});if(D){m=!0;let O=D.value;I=R.id,v="Evaluated locally",S=R.has_experiment,f={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 Tne||D instanceof sl)this._logger?.info(`${D.name} when computing flag locally: ${t}: ${D.message}`);else throw D}}if(!m&&!c){let R=await super.getFeatureFlagDetailsStateless(d.distinctId,d.groups,u,l,a,[t]);if(R===void 0)y=rge.UNKNOWN_ERROR;else{this._minimalFlagCalledEvents=R.minimalFlagCalledEvents===!0,g=R.requestId,A=R.evaluatedAt;let D=[];R.errorsWhileComputingFlags&&D.push(rge.ERRORS_WHILE_COMPUTING),R.quotaLimited?.includes("feature_flags")&&D.push(rge.QUOTA_LIMITED);let O=R.flags[t];if(O===void 0)D.push(rge.FLAG_MISSING);else{I=O.metadata?.id,x=O.metadata?.version,v=O.reason?.description??O.reason?.code,S=O.metadata?.has_experiment;let z;if(O.metadata?.payload!==void 0)try{z=JSON.parse(O.metadata.payload)}catch{z=O.metadata.payload}f={key:t,enabled:O.enabled,variant:O.variant??void 0,payload:z,reason:v,reasonCode:O.reason?.code}}D.length>0&&(y=D.join(","))}}if(o){let R=f===void 0?void 0:f.enabled===!1?!1:f.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(S!==void 0&&(D.$feature_flag_has_experiment=S),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 f!==void 0&&this._payloadOverrides!==void 0&&t in this._payloadOverrides&&(f={...f,payload:this._payloadOverrides[t]}),f}async getFeatureFlag(t,r,n){Won("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(Won("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){Won("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 d=this.createFeatureFlagEvaluationContext(n,o,this.personPropertiesForLocalEvaluation(n,u),l);c==null&&(c=this.options.strictLocalEvaluation??!1);let f=await this.featureFlagsPoller?.getAllFlagsAndPayloads(d,a),m={},g={},A=!0;if(f&&(m=f.response,g=f.payloads,A=f.fallbackToFlags),A&&!c){let y=await super.getFeatureFlagsAndPayloadsStateless(d.distinctId,d.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 B1e({host:this._getFeatureFlagEvaluationsHost(),distinctId:"",flags:{}});if(this.disabled)return this._logger.warn("The client is disabled"),new B1e({host:this._getFeatureFlagEvaluationsHost(),distinctId:n,flags:{}});let{groups:o,disableGeoip:s}=i||{},a=i?.flagKeys??void 0;if(a?.length===0)return new B1e({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 d=this.createFeatureFlagEvaluationContext(n,o,this.personPropertiesForLocalEvaluation(n,u),l);c==null&&(c=this.options.strictLocalEvaluation??!1);let f=a?new Set(a):void 0,m={},g,A,y=!1,I=!1,x=await this.featureFlagsPoller?.getAllFlagsAndPayloads(d,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 S=f!==void 0&&Array.from(f).some(R=>this.featureFlagsPoller?.featureFlagsByKey[R]===void 0);if((x?x.fallbackToFlags||S:!0)&&!c){let R=await super.getFeatureFlagDetailsStateless(d.distinctId,d.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 z;if(O.metadata?.payload!==void 0)try{z=JSON.parse(O.metadata.payload)}catch{z=O.metadata.payload}m[D]={key:D,enabled:O.enabled,variant:O.variant,payload:z,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(f!==void 0)for(let R of Object.keys(m))f.has(R)||delete m[R];return new B1e({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 T1e(this._metrics.flush().catch(()=>{}),Math.max(0,r-Date.now())),this._metrics.reset()),this._traces&&(await T1e(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=UN(()=>{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(Ocl(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(!L5e.isPreviouslyCapturedError(t)){let s=new Error("PostHog syntheticException");this.addPendingPromise(L5e.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(!L5e.isPreviouslyCapturedError(t)){let o=new Error("PostHog syntheticException");return this.addPendingPromise(L5e.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,d=this.context?.get(),f=r.includeContextProperties??!0,m=n||d?.distinctId,g=f?{...this.props,...d?.properties||{},...o||{}}:{...o||{}};m||(m=_N(),g.$process_person_profile=!1),f&&d?.sessionId&&!g.$session_id&&(g.$session_id=d.sessionId);let A=this._shouldSendMinimalFlagCalledEvent(i,g)?RKt(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){Won("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 $mh(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"&&Bcl(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 Oll=require("async_hooks"),Kon=class{constructor(){this.storage=new Oll.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 Pll=require("async_hooks"),Jon=class{active(){return this._storage.getStore()}with(t,r){return this._storage.run(t,r)}constructor(){this._storage=new Pll.AsyncLocalStorage}};var Bll=require("zlib"),Rll=require("util"),ehh=(0,Rll.promisify)(Bll.gzip);async function Dll(e,t=!0){try{let r=await ehh(e);return new Uint8Array(r)}catch(r){return t&&console.error("Failed to gzip compress data",r),null}}var Yon=require("os");function kll(){let e,t;try{e=(0,Yon.platform)(),t=(0,Yon.release)()}catch{}return w$o(e,t)}var Fll="posthog-node";function thh(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[W$o.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||[],d=p.map(g=>({...g,stacktrace:g.stacktrace?{...g.stacktrace,type:"raw",frames:(g.stacktrace.frames||[]).map(A=>({...A,platform:"node:javascript"}))}:void 0})),f={$exception_message:p[0]?.value||s.message,$exception_type:p[0]?.type,$exception_level:s.level,$exception_list:d,$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=lO.getInjectedReleaseId();return m&&(f.$release_id=m),t&&r&&(f.$sentry_url=(n||"https://sentry.io/organizations/")+t+"/issues/?project="+r+"&query="+s.event_id),o&&e.capture({event:"$exception",distinctId:c,properties:f}),s}}var W$o=class{static{this.POSTHOG_ID_TAG="posthog_distinct_id"}constructor(t,r,n,i,o){this.name=Fll,this.name=Fll,this.setupOnce=function(s,a){let c=a()?.getClient()?.getDsn()?.projectId;s(thh(t,{organization:r,projectId:c,prefix:n,severityAllowList:i,sendExceptionsToPostHog:o??!0}))}}};var One=class extends Hon{getLibraryId(){return"posthog-node"}compressPayload(t){return Dll(t,this.isDebug)}initializeContext(){return new Kon}initializeSpanContextManager(){return new Jon}hostResourceAttributes(){return kll()}createErrorPropertiesBuilder(){return new lO.ErrorPropertiesBuilder([new lO.EventCoercer,new lO.ErrorCoercer,new lO.ObjectCoercer,new lO.StringCoercer,new lO.PrimitiveCoercer],lO.createStackParser("node:javascript",lO.nodeStackLineParser),[Ccl(),t=>sll(t,void 0,this._logger),lll()])}};function Nll(e){return e==null||!e.enabled?!1:e.variant==null||e.variant==="true"}var Xon=class{isEnabled(){return Promise.resolve(!1)}getCachedValue(){}flush(){return Promise.resolve()}},rhh="feature_flag_evaluated",nhh=3e3,ihh=3e3,Zon=class{evaluator;environment;sendFeatureFlagEvents;pending=new Map;resolved=new Map;constructor({environment:t,sendFeatureFlagEvents:r,posthogApiKey:n,evaluator:i}){this.environment=t,this.sendFeatureFlagEvents=r,this.evaluator=i??new One(n??"",{featureFlagsRequestTimeoutMs:nhh,isServer:!1})}isEnabled(t,r){let n=jll(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(jll(t,r))}async flush(){if(!this.sendFeatureFlagEvents)return;let t;try{await Promise.race([this.flushAfterPendingEvaluations(),new Promise(r=>{t=setTimeout(r,ihh),t.unref()})])}catch{}finally{clearTimeout(t)}}async flushAfterPendingEvaluations(){await Promise.allSettled(this.pending.values()),await this.evaluator.flush()}async evaluate(t,r){let{org:n}=r,i=shh(r,this.environment),o;try{o=await this.evaluator.getFeatureFlagResult(t,H$o(n),{personProperties:i,groups:{organization:n},groupProperties:{organization:i},sendFeatureFlagEvents:!1})}catch{return!1}return this.sendFeatureFlagEvents&&this.captureFlagUsage({flag:t,org:n,result:o,properties:i}),Nll(o)}captureFlagUsage({flag:t,org:r,result:n,properties:i}){let o=ohh(n),s={...i,...n?.reason!=null?{$feature_flag_reason:n.reason}:{},version:"5.180.1"};this.tryCapture({distinctId:H$o(r),event:"$feature_flag_called",groups:{organization:r},properties:{...s,$feature_flag:t,$feature_flag_response:o,[`$feature/${t}`]:o}}),this.tryCapture({distinctId:H$o(r),event:rhh,groups:{organization:r},properties:{...s,flag:t,response:o,enabled:Nll(n)}})}tryCapture(t){try{this.evaluator.capture(t)}catch{}}};function ohh(e){if(e!=null)return e.enabled?e.variant??!0:!1}function H$o(e){return`org:${e}`}function shh({org:e,generator:t,language:r},n){return{org:e,environment:n,...t!=null?{generator:t}:{},...r!=null?{language:r}:{}}}function jll(e,{org:t,generator:r,language:n}){return JSON.stringify([e,t,r??null,n??null])}var $on;function esn(){return $on==null&&($on=ahh()),$on}async function K$o(){await $on?.flush()}function ahh(){let e="phc_yQgAEdJJkVpI24NdSRID2mor1x1leRpDoC9yZ9mfXal";return e==null||e.trim().length===0?new Xon:new Zon({posthogApiKey:e,environment:YJ(),sendFeatureFlagEvents:ron()})}var tsn=class{posthog;constructor({posthogApiKey:t}){this.posthog=new One(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.180.1",usingAccessToken:!0,cliReleaseEnvironment:YJ(),...zpe()}})}sendAutomationEvent(t){this.posthog.capture({distinctId:t.distinctId,event:t.event,properties:{...t.properties,cliReleaseEnvironment:YJ()}})}async flush(){try{await Promise.race([this.posthog.flush(),new Promise(t=>setTimeout(t,3e3))])}catch{}}};var XKt=class{async sendEvent(){}async sendAutomationEvent(){}async identify(){}async flush(){}};Of();tr();var rdt=require("fs/promises"),zll=require("os"),Qll=require("path");CVe();var chh="id",uhh=".fern",ZKt=class{posthog;userId;token;constructor({token:t,posthogApiKey:r}){this.posthog=new One(r,{isServer:!1}),this.userId=t==null?void 0:M7o(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.180.1",...t,...t.properties,usingAccessToken:!1,cliReleaseEnvironment:YJ(),agent:WHr(),...r!=null?{userEmail:r}:{},...zpe()}})}sendAutomationEvent(t){this.posthog.capture({distinctId:t.distinctId,event:t.event,properties:{...t.properties,cliReleaseEnvironment:YJ()}})}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 ol({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=Xw(),r=Be($t.of((0,zll.homedir)()),Ae.of(uhh),Ae.of(chh));try{await Vt(r)?this.persistedDistinctId=(await(0,rdt.readFile)(r)).toString():(await(0,rdt.mkdir)((0,Qll.dirname)(r),{recursive:!0}),await(0,rdt.writeFile)(r,t),this.persistedDistinctId=t)}catch{this.persistedDistinctId=t}}return this.persistedDistinctId}};var J$o;async function $Kt(){return J$o==null&&(J$o=await lhh()),J$o}async function lhh(){try{let e="phc_yQgAEdJJkVpI24NdSRID2mor1x1leRpDoC9yZ9mfXal";if(e==null||!ron())return new XKt;let t=await dpt();return t!=null?new ZKt({token:t,posthogApiKey:e}):await OM()!=null?new tsn({posthogApiKey:e}):new ZKt({token:void 0,posthogApiKey:e})}catch{return new XKt}}En();ct();Dt();yM();var eJt=ye(require("process"),1);PZe();var _ll=ye(N4o(),1),Ull=ye(Lll(),1);function pO(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=SH(e),e.length===0))return 0;e=e.replace((0,Ull.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(_ll.default.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}En();function rsn(e){let t=0;for(let r of e.split(`
3473
+ at ${r.filename}:${n}:${i}`}};var jfh=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,wKt=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(jfh);return i&&(r=i[1],n=i[2]),[r,n]}};var ful=["fatal","error","warning","log","info","debug"];function bon(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 TKt=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(qft(t))return t.constructor.name;let r="name"in t?t.name:void 0;return pk(r)&&!VZo(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=bon(t);return`${r&&r!=="Object"?`'${r}'`:"Object"} captured as exception with keys: ${n}`}isSeverityLevel(t){return pk(t)&&!VZo(t)&&ful.indexOf(t)>=0}getStack(t){try{return pk(t.stacktrace)&&t.stacktrace.length>0?t.stacktrace:pk(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(w1e(n))return n}}getObjectClassName(t){try{let r=Object.getPrototypeOf(t);return r?r.constructor.name:void 0}catch{return}}};var a$o=class{match(t){return qft(t)}coerce(t,r){let n=t.constructor.name;return{type:n,value:`${n} captured as exception with keys: ${bon(t)}`,stack:r.syntheticException?.stack,synthetic:!0}}};var OKt=class{match(t){return ion(t)}coerce(t,r){return{type:"Error",value:`Primitive value captured as exception: ${String(t)}`,stack:r.syntheticException?.stack,synthetic:!0}}};var c$o=class{match(t){return F5e(t,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(t)}isCustomEventWrappingRejection(t){if(!qft(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 ion(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 u$o=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 PKt={MESSAGE:"$message",TIMESTAMP:"$timestamp"},zfh=new Set([PKt.MESSAGE,PKt.TIMESTAMP]),Eon={enabled:!0,max_bytes:32768};function l$o(e){return e?{enabled:e.enabled??Eon.enabled,max_bytes:Mfh(e.max_bytes,Eon.max_bytes)}:{...Eon}}function Qfh(e){if(!e)return{sanitizedProperties:{},droppedKeys:[]};let t=[];return{sanitizedProperties:Object.keys(e).reduce((n,i)=>zfh.has(i)?(t.push(i),n):(n[i]=e[i],n),{}),droppedKeys:t}}var p$o=class{constructor(t){this._entries=[],this._totalBytes=0,this._config=l$o(t)}setConfig(t){this._config=l$o(t),this._trimToMaxBytes()}add(t){let r=Lfh(t);if(!r)return;let n=dul(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 Mfh(e,t){if(!Gft(e)||e===1/0||e===-1/0)return t;let r=Math.floor(e);return r<0?t:r}function Lfh(e){let t;try{t=S1e(e)}catch{return}try{let r=JSON.parse(t);if(!EKt(r))return;let n=r,i=n[PKt.MESSAGE],o=n[PKt.TIMESTAMP];return!pk(i)||i.trim().length===0||!pk(o)&&!Gft(o)?void 0:{step:n,json:t}}catch{return}}function dul(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 _fh(){let e=globalThis._posthogReleaseId;return typeof e=="string"&&e.length>0?e:void 0}var f$o=e=>{if("flags"in e){let t=mul(e.flags),r=hul(e.flags);return{...e,featureFlags:t,featureFlagPayloads:r}}{let t=e.featureFlags??{},r=Object.fromEntries(Object.entries(e.featureFlagPayloads||{}).map(([i,o])=>[i,Jft(o)])),n=Object.fromEntries(Object.entries(t).map(([i,o])=>[i,Ufh(i,o,r[i])]));return{...e,featureFlags:t,featureFlagPayloads:r,flags:n}}};function Ufh(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 mul=e=>Object.fromEntries(Object.entries(e??{}).map(([t,r])=>[t,BKt(r)]).filter(([,t])=>t!==void 0)),hul=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?Jft(n):void 0]}))},BKt=e=>e===void 0?void 0:e.variant??e.enabled,Jft=e=>{if(typeof e!="string")return e;try{return JSON.parse(e)}catch{return e}};var gul=["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"],Vfh=["$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",...gul,"$session_id","$window_id","$lib","$lib_version","$device_id","$is_server","$react_native_version"],RKt=(e,t=[])=>{let r={},n=i=>{e[i]!==void 0&&(r[i]=e[i])};return Vfh.forEach(n),t.forEach(n),r};var Ion=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 d$o(){return"CompressionStream"in globalThis&&"TextEncoder"in globalThis&&"Response"in globalThis&&typeof Response.prototype.blob=="function"}var qfh="NativeGzipValidationError",Wfh=31,Hfh=139,Kfh=8,Jfh=e=>e.length>=2&&e[0]===Wfh&&e[1]===Hfh;var DKt,Yfh=()=>{if(DKt)return DKt;DKt=[];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;DKt[e]=t>>>0}return DKt},Xfh=e=>{let t=Yfh(),r=4294967295;for(let n=0;n<e.length;n++)r=t[(r^e[n])&255]^r>>>8;return(4294967295^r)>>>0},von=e=>{throw Kft(qfh,`Native gzip produced invalid output: ${e}`)},Zfh=async(e,t)=>{e.size<18&&von("too-short");let r=new Uint8Array(await e.slice(0,10).arrayBuffer());(!Jfh(r)||r[2]!==Kfh)&&von("invalid-header");let n=new DataView(await e.slice(e.size-8).arrayBuffer());n.getUint32(0,!0)!==Xfh(t)&&von("invalid-crc");let i=t.length>>>0;n.getUint32(4,!0)!==i&&von("invalid-size")};async function kKt(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 Zfh(c,n),c}catch(n){if(r?.rethrow)throw n;return t&&console.error("Failed to gzip compress data",n),null}}var nG=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 ZZo(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=Kft("AbortError","Response body read timed out");this.cancelResponseBody(t),this.responseBodyTextPromise=Promise.reject(t)}else{let t=new Promise((n,i)=>{this.responseBodyTimer=UN(()=>{this._bodyReadTimedOut=!0;let o=Kft("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{}})()}},tge=class extends Error{constructor(t){super("Network error while fetching PostHog",t instanceof Error?{cause:t}:{}),this.error=t,this.name="PostHogFetchNetworkError"}};var Iul=(e,t)=>{for(let r of Object.keys(t))(r.startsWith("$feature/")||r==="$active_feature_flags")&&(e[r]=t[r])};async function Aul(e){if(e instanceof nG){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 $fh(e){return typeof e=="object"&&(e instanceof nG||vul(e))}function vul(e){return e instanceof tge}function edh(e){if(e instanceof nG)return e.status===502||e.status===504;if(!(e instanceof tge))return!1;let t=e.error;return(t?.code??t?.cause?.code)!=="ECONNREFUSED"}var yul=10485760;function bul(e){try{return typeof e!="string"?e instanceof Uint8Array?e.byteLength:e.size:"u">typeof Buffer?Buffer.byteLength(e,Jcl):new TextEncoder().encode(e).length}catch{return 0}}function Yft(e){return typeof e=="object"&&e instanceof nG&&e.status===413}function Con(e){return e instanceof nG?e.status===408||e.status===429||e.status>=500:vul(e)}function Eul(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var m$o="default",FKt=class{getErrorPropertiesBuilder(){return this._errorPropertiesBuilder||(this._errorPropertiesBuilder=this.createErrorPropertiesBuilder()),this._errorPropertiesBuilder}createErrorPropertiesBuilder(){return new xKt([new SKt,new TKt,new wKt,new OKt],i$o())}getEvaluationRuntime(){}constructor(t,r={}){this.flushPromise=null,this.pendingFlushPromise=null,this.flushPromises=new Set,this._dequeuedMessagesCount=0,this.shutdownPromise=null,this.promiseQueue=new uon,this._events=new Ion,this._isInitialized=!1;let n=typeof t=="string"?t.trim():"",i=typeof r.host=="string"?r.host.trim():"",o=!n;this._logger=Fcl("[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=Ycl(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:Con},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=!d$o()||(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(jM.OptedOut)??!this.defaultOptIn}async optIn(){this.wrap(()=>{this.setPersistedProperty(jM.OptedOut,!1)})}async optOut(){this.wrap(()=>{this.setPersistedProperty(jM.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 Iul(n,r),t.event==="$feature_flag_called"&&n.$feature_flag_has_experiment===!1&&this.isMinimalFlagCalledEventsEnabled()&&(n=RKt(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:d=>d.json()},{retryCount:this.featureFlagsRequestMaxRetries,retryCheck:edh},this.featureFlagsRequestTimeoutMs).then(d=>({success:!0,response:f$o(d)})).catch(d=>(this._events.emit("error",d),{success:!1,error:this.categorizeRequestError(d)}))}categorizeRequestError(t){if(t instanceof nG)return{type:"api_error",statusCode:t.status};if(t instanceof tge){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=BKt(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(jM.Props)),this._props||{}}set props(t){this._props=t}async register(t){this.wrap(()=>{this.props={...this.props,...t},this.setPersistedProperty(jM.Props,this.props)})}async unregister(t){this.wrap(()=>{delete this.props[t],this.setPersistedProperty(jM.Props,this.props)})}processBeforeEnqueue(t){return t}async flushStorage(){}getQueueRouteKey(t){return m$o}persistedQueueKeyForRoute(t){return jM.Queue}getActiveQueueRoutes(){return[m$o]}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=UN(()=>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=Eul(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=j5e(o.uuid,_N),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:$Zo(),uuid:j5e(r?.uuid,_N)};return(r?.disableGeoip??this.disableGeoip)&&(Eul(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 Aul(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(()=>CKt([r])).then(()=>(this.pendingFlushPromise===i&&(this.pendingFlushPromise=null),this._flush()));return this.pendingFlushPromise=i,this.flushPromise=i,this.flushPromises.add(i),this.addPendingPromise(i),CKt([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 kKt(t,this.isDebug)}getBatchEndpointPath(t){return"/batch/"}async sendBatch(t,r,n=m$o){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:$Zo()};this.historicalMigration&&(i.historical_migration=!0);let o=S1e(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)||[],d=[...a],f=p.filter(m=>{let g=m.message?.uuid,A=d.findIndex(y=>y===m||typeof g=="string"&&g.length>0&&y.message?.uuid===g);return A===-1?!0:(d.splice(A,1),!1)});this.setPersistedProperty(n,f),i=f,this._dequeuedMessagesCount+=a.length,await this.flushStorage()},l={retryCheck:p=>Yft(p)?!1:Con(p)};try{await this.sendBatch(c,l,t)}catch(p){if(Yft(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 tge||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=bul(i);if(o>yul)return this.logMsgIfDebug(()=>console.warn(`[PostHog] Not sending a ${t} batch of ${o} bytes: the endpoint accepts at most ${yul}`)),{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=>Yft(l)||l instanceof nG&&l.retryAfterMs!==void 0?!1:Con(l)}),{kind:"ok"}}catch(l){if(Yft(l))return{kind:"too-large"};if(Con(l)){let p=l instanceof nG?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=bul(s),c={...this._retryOptions,...i},u=0;return await Xcl(async()=>{u++;let l=new AbortController,p=o??this.requestTimeout,d=Date.now()+p,f,m=new Promise((x,v)=>{f=UN(()=>{let S=Kft("AbortError",`Request timed out after ${p}ms`);v(S),l.abort(S)},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 tge(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 tge(B)}let v=r.mode==="no-cors",S=n.type==="successful-write"?300:400;if(!v&&(g.status<200||g.status>=S))throw new nG(g,a,d,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 tge(B):B}}finally{clearTimeout(f),l.signal.aborted&&g&&I()}},{...c,retryCheck:l=>{let p=c.retryCheck(l);return p&&u<=c.retryCount&&l instanceof nG&&l.cancelResponseBody(),p}})}async _shutdown(t=3e4){await this._initPromise;let r=!1;return this.clearFlushTimer(),this.disabled?void 0:T1e((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(!$fh(i))throw i;await Aul(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 odh=/[a-z][a-z0-9+.-]{0,63}:[^\s<>"]+/gi;var CtC=new RegExp(odh.source,"i"),Cul=/[a-z][a-z0-9+.-]{0,63}:\/\//i,xtC=new RegExp(`^${Cul.source}`,"i"),StC=new RegExp(Cul.source,"gi");var sdh=["is_not","is_set"],adh=1152921504606847e3,sl=class e extends Error{constructor(t){super(t),this.name=this.constructor.name,Object.setPrototypeOf(this,e.prototype)}};function h$o(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(!h$o(t in e?e[t]:null))return!1;return!0}function g$o(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(!g$o(t in e?e[t]:null))return!1;return!0}function NKt(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 sl("Cannot stringify an unpaired surrogate like the flags service");t++}else if(r>=56320&&r<=57343)throw new sl("Cannot stringify an unpaired surrogate like the flags service")}}function Son(e,t=new Set){if(!(e===null||typeof e=="boolean")){if(typeof e=="string")return void NKt(e);if(typeof e=="number"){if(!Number.isFinite(e))throw new sl(`Cannot represent non-finite number ${e} like the flags service`);return}if(Array.isArray(e)){if(t.has(e))throw new sl("Cannot represent a circular array during local evaluation");t.add(e);try{for(let r=0;r<e.length;r++)r in e&&Son(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 sl("Cannot represent a non-JSON object like the flags service");if(t.has(e))throw new sl("Cannot represent a circular object during local evaluation");t.add(e);try{for(let n of Object.keys(e))NKt(n),Son(e[n],t)}finally{t.delete(e)}return}throw new sl(`Cannot represent ${typeof e} like the flags service`)}}function cdh(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 A$o(e,t=new Set){if(e===null)return"null";if(typeof e=="string")return NKt(e),JSON.stringify(e);if(typeof e=="boolean")return e?"true":"false";if(typeof e=="number"){if(!Number.isFinite(e))throw new sl(`Cannot stringify non-finite number ${e} like the flags service`);if(Number.isInteger(e))throw new sl(`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 sl("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?A$o(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 sl("Cannot stringify a non-JSON object like the flags service");if(t.has(e))throw new sl("Cannot stringify a circular object during local evaluation");t.add(e);try{let n=Object.keys(e);return n.forEach(NKt),`{${n.sort(cdh).map(i=>`${JSON.stringify(i)}:${A$o(e[i],t)}`).join(",")}}`}finally{t.delete(e)}}throw new sl(`Cannot stringify ${typeof e} like the flags service`)}function xon(e){return typeof e=="string"?(NKt(e),e):A$o(e)}function xul(e){try{return new RegExp(e),!0}catch{return!1}}function iG(e){return String(e).replace(/[A-Z]/g,t=>t.toLowerCase())}function wul(e,t,r){if(!/^\d+$/.test(e)||r==="strict"&&e.length>1&&e[0]==="0")throw new sl(`Invalid semver: ${t}`);return parseInt(e,10)}function n1(e,t="strict"){let n=String(e).trim().replace(/^[vV]/,"").split("-")[0].split("+")[0];if(!n||n.startsWith("."))throw new sl(`Invalid semver: ${e}`);let i=n.split("."),o=s=>s===void 0||s===""?0:wul(s,e,t);return[o(i[0]),o(i[1]),o(i[2])]}function oG(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 udh(e,t){let r=n1(e,t);return{lower:[r[0],r[1],r[2]],upper:[r[0],r[1]+1,0]}}function ldh(e,t){let[r,n,i]=n1(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 pdh(e,t){let n=String(e).trim().replace(/^[vV]/,"").replace(/\.\*$/,"").replace(/\*$/,"");if(!n)throw new sl(`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 wul(c,e,t)}catch{}throw new sl(`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 Sul(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 sl(`${e} is in an invalid date format`)}throw new sl(`The date provided ${e} must be a string, number, or date object`)}function y$o(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 b$o(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 sl(`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&&!sdh.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,d)=>{if(r.propertyMatchingVersion!==2&&h$o(p)||Array.isArray(p)&&p.length===0)return Son(d),g$o(p)===g$o(d);if(r.propertyMatchingVersion===2&&typeof d=="number"&&h$o(p))return Son(d),!1;if(Array.isArray(p)){let f=xon(d).toLowerCase();return p.some(m=>xon(m).toLowerCase()===f)}return xon(p).toLowerCase()===xon(d).toLowerCase()},l=(p,d,f)=>{if(f==="gt")return p>d;if(f==="gte")return p>=d;if(f==="lt")return p<d;if(f==="lte")return p<=d;throw new Error(`Invalid operator: ${f}`)};switch(o){case"exact":return u(i,c);case"is_not":return!u(i,c);case"is_set":return!0;case"icontains":return iG(c).includes(iG(i));case"not_icontains":return!iG(c).includes(iG(i));case"starts_with":return iG(c).startsWith(iG(i));case"not_starts_with":return!iG(c).startsWith(iG(i));case"ends_with":return iG(c).endsWith(iG(i));case"not_ends_with":return!iG(c).endsWith(iG(i));case"regex":return xul(String(i))&&String(c).match(String(i))!==null;case"not_regex":return xul(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)),d=typeof c=="number"?c:c!=null?parseFloat(String(c)):NaN;return Number.isFinite(p)&&Number.isFinite(d)?l(d,p,o):l(String(c),String(i),o)}case"is_date_after":case"is_date_before":{if(typeof i=="boolean")throw new sl("Date operations cannot be performed on boolean values");let p=y$o(String(i));p==null&&(p=Sul(i));let d=Sul(c);return o==="is_date_before"?d<p:d>p}case"semver_eq":return oG(n1(String(c),s),n1(String(i),s))===0;case"semver_neq":return oG(n1(String(c),s),n1(String(i),s))!==0;case"semver_gt":return oG(n1(String(c),s),n1(String(i),s))>0;case"semver_gte":return oG(n1(String(c),s),n1(String(i),s))>=0;case"semver_lt":return oG(n1(String(c),s),n1(String(i),s))<0;case"semver_lte":return oG(n1(String(c),s),n1(String(i),s))<=0;case"semver_tilde":{let p=n1(String(c),s),{lower:d,upper:f}=udh(String(i),s);return oG(p,d)>=0&&oG(p,f)<0}case"semver_caret":{let p=n1(String(c),s),{lower:d,upper:f}=ldh(String(i),s);return oG(p,d)>=0&&oG(p,f)<0}case"semver_wildcard":{let p=n1(String(c),s),{lower:d,upper:f}=pdh(String(i),s);return oG(p,d)>=0&&oG(p,f)<0}default:throw new sl(`Unknown operator: ${o}`)}}async function Tul(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 jKt(e,t,r="",n="."){let i=await Tul(`${e}${n}${t}${r}`);return parseInt(i.slice(0,15),16)/adh}async function E$o(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 jKt("holdout",t,"","-")>n/100))return`holdout-${e.id}`}function won(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 I$o(e,t,r){let n=await jKt(e,t,"variant");return won(r).find(i=>n>=i.valueMin&&n<i.valueMax)?.key}function v$o(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:Jft(n)}var Oul=9223372036854776e3,fdh="9223372036854775808",ddh=Object.prototype.propertyIsEnumerable;function mdh(){return{ancestors:new WeakSet,remainingNodes:1e4}}function wne(e,t){try{return Pul(e,t,mdh(),0)}catch{return[]}}function hdh(e,t){let r=e.toString(),n=BigInt(fdh);return e>=n||e<-n?(t?.debug(`Attribute ${r} is outside the int64 range; encoding it as a string`),{stringValue:r}):{intValue:r}}function S$o(e,t,r,n){if(r.remainingNodes<=0)return{stringValue:hon};if(r.remainingNodes--,wcl(e))return{boolValue:e};if(typeof e=="bigint")return hdh(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>=Oul||e<-Oul?(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:xne(e)};if(typeof e=="function")return{stringValue:Kcl};if(typeof e=="symbol")return{stringValue:String(e)};if(typeof e=="object"&&e!==null){if(r.ancestors.has(e))return{stringValue:mon};if(n>=20)return{stringValue:hon};if(e instanceof Date){let i=e.getTime(),o=Number.isFinite(i)?e.toISOString():String(e);return{stringValue:typeof o=="string"?xne(o):String(o)}}r.ancestors.add(e);try{try{let i=e.toJSON;if(typeof i=="function")return S$o(i.call(e),t,r,n+1)}catch{}return X4(e)?{arrayValue:{values:gdh(e,t,r,n+1)}}:{kvlistValue:{values:Pul(e,t,r,n+1)}}}finally{r.ancestors.delete(e)}}return{stringValue:xne(String(e))}}function gdh(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(XJ(a))continue;i.push(S$o(a,t,r,n))}catch{i.push({stringValue:rG})}return e.length>s&&i.push({stringValue:hon}),i}function Pul(e,t,r,n){let i=[];for(let o in e)if(ddh.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(GZo(s)||$he(s))continue;i.push({key:xne(o),value:S$o(s,t,r,n)})}catch{i.push({key:xne(o),value:{stringValue:rG}})}}return i}function QKt(e,t,r){return{...ege({},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 Adh=["service.name","deployment.environment","service.version","telemetry.sdk.name","telemetry.sdk.version"];function MKt(e,t){let r=ege({},e),n={};for(let i of Adh)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i],delete r[i]);return[...wne(r,t),...wne(n,t)]}var Bul={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 ydh(e){if(e)return Object.prototype.hasOwnProperty.call(Bul,e)?Bul[e]:e}function w$o(e,t){let r=ydh(e);return{...r?{"os.name":r}:{},...t?{"os.version":t}:{}}}var bdh={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}},_tC=bdh.info;var z5e=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=UN(()=>{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 LKt(){return 1-.25+Math.random()*.25*2}var sG=1;function _Kt(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 UKt=[0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4];function T$o(e){return String(e)+"000000"}function O$o(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 Rul(e,t){for(let r=0;r<t.length;r++)if(e<=t[r])return r;return t.length}function P$o(e,t,r){return QKt(e,t,r)}function B$o(e,t,r,n){return{resourceMetrics:[{resource:{attributes:MKt(t)},scopeMetrics:[{scope:{name:r,version:n},metrics:e}]}]}}function Oon(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 Dul=1,VKt=class{constructor(t,r,n){this._instance=t,this._config=r,this._logger=n,this._series=new Map,this._flushTimer=new z5e(()=>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 N5e,this._consecutiveFlushFailures=0,this._flushJitter=sG,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=sG,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=O$o(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(UKt.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[Rul(r,UKt)]+=1;break}}}_runBeforeSend(t){let r=this._config.beforeSend;if(!r)return t;let n=X4(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(_Kt(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=LKt()):(this._consecutiveFlushFailures=0,this._flushJitter=sG),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 B$o(this._buildMetrics(t),P$o(this._config,this._instance.getLibraryId(),this._instance.getLibraryVersion()),this._instance.getLibraryId(),this._instance.getLibraryVersion())}_buildMetrics(t){let r=T$o(Date.now()),n=new Map;for(let i of t.values()){let o=O$o(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:Dul,isMonotonic:!0,dataPoints:[]}:i.type==="gauge"?s.gauge={dataPoints:[]}:s.histogram={aggregationTemporality:Dul,dataPoints:[]},n.set(o,s));let a=wne(i.attributes??{},this._logger),c=T$o(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:UKt};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 Cdh="0".repeat(32),xdh="0".repeat(16),Sdh=/^[0-9a-f]+$/;function wdh(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 Tdh(e){let t="";for(let r=0;r<e.length;r++)t+=e[r].toString(16).padStart(2,"0");return t}function kul(e){let t=Tdh(wdh(e));return/[^0]/.test(t)?t:t.slice(0,-1)+"1"}function Ful(){return kul(16)}function Nul(){return kul(8)}function jul(e,t,r){return typeof e=="string"&&e.length===t&&e!==r&&Sdh.test(e)}function zul(e){return jul(e,32,Cdh)}function Qul(e){return jul(e,16,xdh)}var Odh=/^([0-9a-f]{2})-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})(-.*)?$/;function Mul(e){let t=Lul(e);return t&&{traceId:t.traceId,spanId:t.spanId,flags:Pdh(t.flags)}}function Pdh(e){return 1&parseInt(e,16)?Bon:Bdh}function Lul(e){if(typeof e!="string")return;let t=Odh.exec(e.trim());if(!t)return;let[,r,n,i,o,s]=t;if(r!=="ff"&&!(r==="00"&&s)&&!(!zul(n)||!Qul(i)))return{version:r,traceId:n,spanId:i,flags:o}}function _ul(e){return Lul(e)&&e.trim()}function Pon(e){return Array.isArray(e)&&e.length===1?e[0]:e}var Bon="01",Bdh="00";function Uul(e,t,r=Bon){return`00-${e}-${t}-${r}`}var Rdh=32,R$o=512;function Ron(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>Rdh)){for(let n of r)if(n.trim()&&!n.includes("="))return;return t.length<=R$o?t:kdh(r)}}var Ddh=128;function kdh(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()>R$o;n--)t[n].length>Ddh&&t.splice(n,1);for(;t.length&&r()>R$o;)t.pop();return t.length?t.join(","):void 0}var Vul="unknown";function Q5e(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 "${Vul}"`),Vul)}function Xft(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 Gul(e,t,r){let n=Xft(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 Don(e,t){return e<t?t:e}function GKt(e,t,r,n){let i=Xft(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 Fon(){let e=globalThis.performance;return typeof e?.now=="function"?e.now():void 0}var Zft=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??Bon,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:Fon(),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=Fon();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(XJ(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]=jon(r,this._maxAttributeValueLength)}setAttribute(t,r){return this._mutable("setAttribute")&&this._writeAttribute(t,r),this}setAttributes(t){if(this._mutable("setAttributes")){let r=ege({},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&&Kul(r,this._maxAttributesPerEvent,this._maxAttributeValueLength);this._events.push({name:Q5e(t,"Span event name",this._maxAttributeValueLength,this._logger),timestamp:GKt(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:D$o(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}=k$o(t);return this.addEvent(Fdh,{"exception.type":r,"exception.message":n,...i&&{"exception.stacktrace":i}}),this.setStatus("error",n)}updateName(t){return this._mutable("updateName")&&(this._name=Q5e(t,"Span name",this._maxAttributeValueLength,this._logger)),this}traceparent(){return Uul(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=GKt(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:Don(n,this._startTime),...this._droppedAttributes&&{droppedAttributesCount:this._droppedAttributes},...this._droppedEvents&&{droppedEventsCount:this._droppedEvents}},this._autoKeys)}},Fdh="exception",Ndh=4294967295;function jdh(e){try{return typeof e=="string"?e:String(e)}catch{return rG}}function M5e(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?0:Math.min(Math.floor(e),Ndh)}function zdh(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 Wul(e,t,r,n,i,o,s=[]){let a=0,c=0,u={};for(let f of zdh(e.attributes,s)){let m=e.attributes[f];if(!XJ(m)){if(!t.has(f)){if(a>=r){c++;continue}a++}Object.defineProperty(u,f,{value:jon(m,o),enumerable:!0,writable:!0,configurable:!0})}}e.attributes=u,c&&(e.droppedAttributesCount=M5e(e.droppedAttributesCount)+c);let l=0,p=0,d=[];for(let f of e.events){if(l>=n){p++;continue}if(l++,f.attributes){let m=Kul(f.attributes,i,o);f.attributes=m.attributes,m.dropped&&(f.droppedAttributesCount=M5e(f.droppedAttributesCount)+m.dropped)}d.push(f)}e.events=d,p&&(e.droppedEventsCount=M5e(e.droppedEventsCount)+p),e.status?.message&&(e.status={...e.status,message:D$o(jdh(e.status.message),o)})}var Non=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(){}},Hul=new Non,qKt=class extends Non{constructor(t,r){super(),this._traceparent=t,this._tracestate=r}traceparent(){return this._traceparent}tracestate(){return this._tracestate??null}};function Qdh(e){try{let t=e.stack;return typeof t=="string"&&t?{stack:t}:{}}catch{return{}}}function O1e(e,t){let r=Pon(e?.parent)??t,n=typeof r=="string"||r==null?r:qul(r,"traceparent"),i=_ul(n);if(!i)return Hul;let o=typeof r=="string"||r==null?e?.tracestate:qul(r,"tracestate");return new qKt(i,Ron(o))}function qul(e,t){try{let r=e[t];return typeof r=="function"?r.call(e):void 0}catch{return}}function D$o(e,t){return e.length>t?e.slice(0,t):e}function jon(e,t){return kon(e,t,{ancestors:new WeakSet,remainingNodes:1e4},0)}function kon(e,t,r,n){if(e===null||typeof e!="object")return XJ(e)||r.remainingNodes<=0?e:(r.remainingNodes--,typeof e=="string"?D$o(e,t):e);if(r.ancestors.has(e))return mon;if(r.remainingNodes<=0||n>=20)return e;r.remainingNodes--,r.ancestors.add(e);try{if(e instanceof Date)return e;let i=Mdh(e);if(i.selfDescribed)return XJ(i.value)?String(i.value):kon(i.value,t,r,n+1);if(X4(e)){let a=Math.min(e.length,1e3),c=[];for(let u=0;u<a;u++)try{c.push(kon(e[u],t,r,n+1))}catch{c.push(rG)}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=kon(e[a],t,r,n+1)}catch{c=rG}a&&!XJ(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 Mdh(e){try{let t=e.toJSON;if(typeof t=="function")return{selfDescribed:!0,value:t.call(e)}}catch{}return{selfDescribed:!1}}function Kul(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=jon(e[a],r)}catch{c=rG}XJ(c)||(o++,Object.defineProperty(i,a,{value:c,enumerable:!0,writable:!0,configurable:!0}))}return{attributes:i,dropped:s}}function Jul(e,t){for(let r of Object.keys(e))e[r]=jon(e[r],t);return e}function WKt(e,t,r){return t===Hul?r(t):e.with(t,()=>r(t))}function k$o(e){try{let t=Qdh(e);if(w1e(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 F$o={internal:1,server:2,client:3,producer:4,consumer:5},Ldh={ok:1,error:2},_dh=1,Udh=256,Vdh=512;function Gdh(e){let t=parseInt(e.traceFlags,16);return(Number.isFinite(t)?255&t:_dh)|Udh|(e.parentIsRemote?Vdh:0)}function zon(e){if(typeof e=="string")return xne(e);try{return xne(String(e))}catch{return rG}}function qdh(e){return e&&Object.prototype.hasOwnProperty.call(F$o,e)?F$o[e]:F$o.internal}function N$o(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 Wdh(e,t){let r={name:zon(e.name),timeUnixNano:N$o(e.timestamp)};if(e.attributes){let i=wne(e.attributes,t);i.length&&(r.attributes=i)}let n=M5e(e.droppedAttributesCount);return n&&(r.droppedAttributesCount=n),r}function Yul(e,t){let r={traceId:e.traceId,spanId:e.spanId,name:zon(e.name),kind:qdh(e.kind),startTimeUnixNano:N$o(e.startTime),endTimeUnixNano:N$o(e.endTime),flags:Gdh(e)};e.parentSpanId&&(r.parentSpanId=e.parentSpanId),e.traceState&&(r.traceState=zon(e.traceState));let n=wne(e.attributes,t);n.length&&(r.attributes=n),e.events.length&&(r.events=e.events.map(s=>Wdh(s,t)));let i=M5e(e.droppedAttributesCount);i&&(r.droppedAttributesCount=i);let o=M5e(e.droppedEventsCount);return o&&(r.droppedEventsCount=o),e.status&&(r.status={code:Ldh[e.status.code],...e.status.message&&{message:zon(e.status.message)}}),r}function Xul(e,t,r){return QKt(e,t,r)}function Zul(e,t,r,n,i){return{resourceSpans:[{resource:{attributes:MKt(t,i)},scopeSpans:[{scope:{name:r,version:n},spans:e}]}]}}var $ul=8;function Qon(){return Fon()??Date.now()}function j$o(e){try{return e instanceof Zft}catch{return!1}}function ell(e,t){let r=Mul(e);if(r)return{traceId:r.traceId,parentSpanId:r.spanId,traceState:Ron(t),traceFlags:r.flags,isRemote:!0}}function Hdh(e){try{return typeof e.traceparent=="function"}catch{return!1}}function Kdh(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 Mon(e,t,r){e[t]!==r&&(e[t]=r)}function Jdh(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 HKt=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 z5e(()=>this._flushInBackground()),this._flushPromise=null,this._droppedSinceWarning=0,this._lastDropWarningAt=0,this._dropReasons=new Set,this._consecutiveFlushFailures=0,this._flushJitter=sG,this._retryAfter=new N5e,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 O1e(r,this._contextManager.active());let n=Pon(r?.parent);if(n&&typeof n!="string"&&!j$o(n)){if(Hdh(n))return this._logger.debug("Span parent is not a span from this SDK; returning an inert span"),O1e(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`),O1e(r,this._contextManager.active());let o=Date.now(),s=Gul(r?.startTime,o,this._logger),a=Nul();this._liveSpans.set(a,Qon());let c=this._autoContextAttributes();return new Zft({traceId:i?.traceId??Ful(),spanId:a,parentSpanId:i?.parentSpanId,traceState:i?.traceState,traceFlags:i?.traceFlags,parentIsRemote:i?.isRemote,name:Q5e(t,"Span name",this._config.maxAttributeValueLength,this._logger),kind:r?.kind??"internal",attributes:ege({...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:Xft(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=WKt(this._contextManager,s,o);return Zcl(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=sG,this._retryAfter.reset(),this._resetHeadBatchBudget()}_resetHeadBatchBudget(){this._headBatchFailures=0,this._headBatchChargeableAt=0}_resolveParent(t,r){if(typeof t=="string"){let i=ell(t,r?.tracestate);return i||this._logger.debug("Ignoring malformed traceparent; starting a new trace"),i}if(j$o(t))return t.childContext();let n=this._contextManager.active();if(j$o(n))return n.childContext();if(n instanceof qKt)return ell(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 Zft))return;let{type:n,message:i,stack:o}=k$o(r);t.addEvent("exception",{"exception.type":n,"exception.message":i,...o&&{"exception.stacktrace":o}}),t.statusIsExplicitlyOk||t.setStatus("error",i)}_evictAgedSpans(){let t=Qon()-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 f of this._config.beforeSpanSend){let m=f(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},!Kdh(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=Q5e(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=Xft(l.startTime)??i.startTime,l.endTime=Don(Xft(l.endTime)??i.endTime,l.startTime);let d=[];for(let f of l.events)try{d.push({...f,name:Q5e(f.name,"Span event name",this._config.maxAttributeValueLength,this._logger),timestamp:GKt(f.timestamp,l.startTime,"event timestamp",this._logger)})}catch{this._logger.debug("beforeSpanSend left an unreadable span event; dropping it")}return l.events=d,Wul(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{Mon(t,"traceId",r.traceId),Mon(t,"spanId",r.spanId),Mon(t,"parentSpanId",r.parentSpanId),Mon(t,"traceState",r.traceState)}catch{return Jdh(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(Yul(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=Jul(Xul(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)),d=this._queue.slice(0,p),f=this._encodeBatch(d);if(!f.length){this._queue.splice(0,p),o-=p,s+=p,this._resetHeadBatchBudget();continue}let m=Qon()>=this._headBatchChargeableAt&&!this._retryAfter.isOpen(),g=await this._instance._sendTracesBatch(Zul(f,r,n,i,this._logger));if(c!==this._generation)break;if(this._retryAfter.record(g),g.kind==="ok"){this._consecutiveFlushFailures=0,this._flushJitter=sG,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=sG,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=LKt(),this._headBatchSize=p,m&&(this._headBatchFailures++,this._headBatchChargeableAt=Qon()+this._nextFlushDelay()),this._headBatchFailures<$ul)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=sG,this._resetHeadBatchBudget(),this._recordDrop(p,`the ingestion endpoint failed ${$ul} 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=sG,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(_Kt(this._config.flushIntervalMs,this._consecutiveFlushFailures,this._flushJitter,3e4),this._retryAfter.remainingMs())}};var KKt=class{active(){return this._active}with(t,r){let n=this._active;this._active=t;try{return r()}finally{this._active=n}}};var Ydh=5e3,Xdh=512,Zdh=2048,$dh=128,emh=128,tmh=128,rmh=8192,nmh=1e4,imh=36e5;function P1e(e,t){return typeof e=="number"&&Number.isInteger(e)&&e>=1?e:t}var tll=["service.name","service.version","deployment.environment"];function omh(e){if(!(!e||typeof e!="object"||Array.isArray(e)))try{if(tll.every(r=>!(r in e)||typeof e[r]=="string"))return e;let t={...e};for(let r of tll)r in t&&typeof t[r]!="string"&&delete t[r];return t}catch{return}}function smh(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 z$o(e,t,r){let n=ege({...t},omh(e?.resourceAttributes)),i=P1e(e?.maxExportBatchSize,Xdh);return{serviceName:n?.["service.name"]??e?.serviceName,serviceVersion:n?.["service.version"]??e?.serviceVersion,environment:n?.["deployment.environment"]??e?.environment,resourceAttributes:n,beforeSpanSend:smh(e?.beforeSpanSend,r),maxAttributesPerSpan:P1e(e?.maxAttributesPerSpan,$dh),maxEventsPerSpan:P1e(e?.maxEventsPerSpan,emh),maxAttributesPerEvent:tmh,maxAttributeValueLength:P1e(e?.maxAttributeValueLength,rmh),flushIntervalMs:P1e(e?.flushIntervalMs,Ydh),maxExportBatchSize:i,maxQueueSize:Math.max(P1e(e?.maxQueueSize,Zdh),i),maxLiveSpans:P1e(e?.maxLiveSpans,nmh),maxSpanAgeMs:P1e(e?.maxSpanAgeMs,imh)}}var Q$o=require("fs"),ill=require("fs/promises"),L$o=require("path"),oll=require("readline"),Lon=new lO.ReduceableCache(25),JKt=new lO.ReduceableCache(20),_$o=7,amh=1e3,cmh=1e4,M$o=10485760;async function sll(e,t=ill.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"||dmh(u)||mmh(c)||!(0,L$o.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=all(a,i);if(c===void 0||JKt.get(c))continue;let u=n[a];if(!u)continue;u.sort((d,f)=>d-f);let l=gmh(u);if(l.every(d=>hmh(c,d)))continue;let p=Amh(Lon,c,{});s.push(lmh(a,l,p,c,t,r))}return await Promise.all(s).catch(()=>{}),e&&e.length>0&&pmh(e,Lon,i),Lon.reduce(),e}async function umh(e,t,r){let n,i=!1;try{n=await t(e,Q$o.constants.O_RDONLY|Q$o.constants.O_NONBLOCK);let o=await n.stat();return o.isFile()?o.size>M$o?void r?.debug(`Skipping source context for oversized file ${e}: ${o.size} bytes exceeds ${M$o}`):(i=!0,n):void 0}catch{return}finally{n&&!i&&await n.close().catch(()=>{})}}async function lmh(e,t,r,n,i,o){let s=await umh(e,i,o);if(s===void 0)return void JKt.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:M$o-1})}catch{JKt.set(n,1),l();return}let d;try{d=(0,oll.createInterface)({input:p})}catch{JKt.set(n,1),l(p);return}let f=0,m=0,g=t[m];if(g===void 0)return void l(p);let A=g[0],y=g[1];function I(){JKt.set(n,1),d.close(),d.removeAllListeners(),l(p)}p.on("error",I),d.on("error",I),d.on("close",()=>l(p)),d.on("line",x=>{if(f++,!(f<A)&&(r[f]=ymh(x,0),f>=y)){if(m===t.length-1){d.close(),d.removeAllListeners();return}m++;let v=t[m];if(v===void 0){d.close(),d.removeAllListeners();return}A=v[0],y=v[1]}})})}function pmh(e,t,r){for(let n of e)if(n.filename&&n.context_line===void 0&&typeof n.lineno=="number"){let i=all(n.filename,r),o=i===void 0?void 0:t.get(i);if(o===void 0)continue;fmh(n.lineno,n,o)}}function fmh(e,t,r){if(t.lineno===void 0||r===void 0)return;t.pre_context=[];for(let i=cll(e);i<e;i++){let o=r[i];if(o===void 0)return void rll(t);t.pre_context.push(o)}if(r[e]===void 0)return void rll(t);t.context_line=r[e];let n=ull(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 rll(e){delete e.pre_context,delete e.context_line,delete e.post_context}function dmh(e){return e.startsWith("node:")||e.endsWith(".min.js")||e.endsWith(".min.cjs")||e.endsWith(".min.mjs")||e.startsWith("data:")}function mmh(e){return e.lineno!==void 0&&e.lineno>cmh||e.colno!==void 0&&e.colno>amh}function all(e,t){return(0,L$o.isAbsolute)(e)?JSON.stringify([null,e]):t===void 0?void 0:JSON.stringify([t,e])}function hmh(e,t){let r=Lon.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 gmh(e){if(!e.length)return[];let t=0,r=e[0];if(typeof r!="number")return[];let n=nll(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+_$o:(i.push(n),n=nll(o)),t++}return i}function nll(e){return[cll(e),ull(e)]}function cll(e){return Math.max(1,e-_$o)}function ull(e){return e+_$o}function Amh(e,t,r){let n=e.get(t);return n===void 0?(e.set(t,r),r):n}function ymh(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 $ft=require("path");function lll(e=process.cwd()){let t=$ft.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,$ft.isAbsolute)(o.filename)&&(o.filename=r((0,$ft.relative)(n,r(o.filename))));return i}}var pll="5.55.0";var rge={ERRORS_WHILE_COMPUTING:"errors_while_computing_flags",FLAG_MISSING:"flag_missing",QUOTA_LIMITED:"quota_limited",UNKNOWN_ERROR:"unknown_error"};var B1e=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(rge.ERRORS_WHILE_COMPUTING),this._quotaLimited&&o.push(rge.QUOTA_LIMITED),r===void 0&&o.push(rge.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 bmh=6e4;function fll(e){return e==="client"||e==="server"?e:"all"}function Emh(e,t){return e===t||e==="all"||t==="all"}var edt=class e extends Error{constructor(t){super(),Error.captureStackTrace(this,this.constructor),this.name="ClientError",this.message=t,Object.setPrototypeOf(this,e.prototype)}};function Imh(e,t){e.name=t.name,Error.captureStackTrace(e,t),Object.setPrototypeOf(e,t.prototype)}var Tne=class e extends Error{constructor(t){super(t),Imh(this,e)}},_on=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 Tne||u instanceof sl?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 Tne||u instanceof sl?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=v$o(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 sl("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 sl("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 sl(`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 sl("Feature flags not available for dependency evaluation");if(!("dependency_chain"in t))throw new sl(`Flag dependency property for '${o}' is missing required 'dependency_chain' field`);let s=t.dependency_chain;if(!Array.isArray(s))throw new sl(`Flag dependency property for '${o}' has an invalid 'dependency_chain' (expected array, got ${typeof s})`);if(s.length===0)throw new sl(`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 sl(`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 sl(`Missing flag dependency '${c}' for flag '${o}'`)}if(i[c]==null)throw new sl(`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 E$o(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,d=!1,f;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)){d=!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||[];f=x&&v.some(S=>S.key===x)?x:await this.getMatchingVariant(t,y)||!0;break}if(u&&I==="out_of_rollout_bound"){if(d)break;return!1}}catch(g){if(g instanceof Tne)throw g;if(g instanceof sl)d=!0;else throw g}if(f!==void 0)return f;if(d)throw new sl("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 d=await mll(u,i,s.cohorts,this.debugMode,f=>this.evaluateFlagDependency(f,i,o),s.propertyMatchingVersion);p=u.operator==="not_in"?!d:d}else p=l==="flag"?await this.evaluateFlagDependency(u,i,o):dll(u,i,c,s.propertyMatchingVersion);if(!p)return"no_match"}if(a==null)return"match"}return a!=null&&await jKt(t.key,r)>a/100?"out_of_rollout_bound":"match"}async getMatchingVariant(t,r){return I$o(t.key,r,t.filters?.multivariate?.variants||[])}variantLookupTable(t){return won(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?fll(r.evaluation_runtime):void 0}getFlagKeysByEvaluationRuntime(t){return this.featureFlags.filter(r=>Emh(fll(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(bmh,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 edt(`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 edt(`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 edt(`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 edt&&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=UN(()=>{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 T1e(r,t,()=>{throw new Error(`Cache shutdown timeout after ${t}ms`)})}catch(r){this.onError?.(new Error(`Error during cache shutdown: ${r}`))}}};function dll(e,t,r,n){return b$o(e,t,{warnFunction:r,propertyMatchingVersion:n})}function vmh(e,t){if(!(e in t))throw new Tne(`cohort ${e} not found in local cohorts - likely a static cohort that requires server evaluation`)}async function mll(e,t,r,n=!1,i,o){let s=String(e.value);vmh(s,r);let a=r[s];return hll(a,t,r,n,i,o)}async function hll(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 hll(u,t,r,n,i,o);if(s==="AND"){if(!l)return!1}else if(l)return!0}catch(l){if(l instanceof Tne)throw l;if(l instanceof sl)n&&console.debug(`Failed to compute property ${u} locally: ${l}`),c=!0;else throw l}if(c)throw new sl("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 mll(u,t,r,n,i,o);else if(u.type==="flag"){if(!i)throw new sl(`Flag dependency '${u.key||"unknown"}' cannot be evaluated without a flag dependency evaluator`);l=await i(u)}else l=dll(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 Tne)throw l;if(l instanceof sl)n&&console.debug(`Failed to compute property ${u} locally: ${l}`),c=!0;else throw l}if(c)throw new sl("can't match cohort without a given cohort property value");return s==="AND"}var Cmh=["--unhandled-rejections","--unhandled_rejections"],xmh=new Set(["throw","strict","warn","warn-with-error-code","none"]),Smh=[...globalThis.process?.execArgv??[]],wmh=globalThis.process?.env?.NODE_OPTIONS;function Tmh(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 gll(e){let t;for(let r=0;r<e.length;r++){let n=e[r],i=Cmh.find(s=>n===s||n.startsWith(`${s}=`));if(!i)continue;let o=n===i?e[++r]:n.slice(i.length+1);xmh.has(o)&&(t=o)}return t}function Omh(e=Smh,t=wmh){return gll(e)??gll(Tmh(t??""))??"throw"}var All=Omh();function yll(e,t,r){e(t,{mechanism:{type:r==="unhandledRejection"?"onunhandledrejection":"onuncaughtexception",handled:!1}})}function Pmh(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;yll(e,n,i),!r&&o===0&&(r=!0,t(n))},{_posthogErrorHandler:!0})}function bll(e,t,r=All){let n=globalThis.process;if(n){if(r==="strict")return void n.on("uncaughtExceptionMonitor",(i,o)=>yll(e,i,o));n.on("uncaughtException",Pmh(e,t))}}function Ell(e,t=All){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 Bmh=2e3,U$o=class e{constructor(t,r,n){this.client=t,this._exceptionAutocaptureEnabled=r.enableExceptionAutocapture||!1,this._logger=n,this._rateLimiter=new son({...Rcl(r),refillInterval:1e4,_logger:this._logger}),this.startAutocaptureIfEnabled()}static isPreviouslyCapturedError(t){return EKt(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=lO.getInjectedReleaseId();return c&&(s.$release_id=c),{event:"$exception",distinctId:i,properties:{...a,...s},_originatedFromCaptureException:!0}}startAutocaptureIfEnabled(){this.isEnabled()&&(bll(this.onException.bind(this),this.onFatalError.bind(this)),Ell(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(Bmh),globalThis.process.exit(1)}isEnabled(){return!this.client.isDisabled&&this._exceptionAutocaptureEnabled}shutdown(){this._rateLimiter.stop()}},L5e=U$o;var Uon=class{getProperty(t){return this._memoryStorage[t]}setProperty(t,r){this._memoryStorage[t]=r!==null?r:void 0}constructor(){this._memoryStorage={}}};function Rmh(e){return e==="v0"||e==="v1"}function Ill(){let e="u">typeof process?process.env?.POSTHOG_CAPTURE_MODE:void 0;return Rmh(e)?e:"v0"}var Dmh="$ai_",YKt="analytics";function vll(e){return typeof e.event=="string"&&e.event.startsWith(Dmh)}var tdt=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 V$o(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 kmh(e){return typeof e=="string"?e:void 0}var Fmh=[{property:"$cookieless_mode",optionKey:"cookieless_mode",coerce:V$o},{property:"$ignore_sent_at",optionKey:"disable_skew_correction",coerce:V$o},{property:"$process_person_profile",optionKey:"process_person_profile",coerce:V$o},{property:"$product_tour_id",optionKey:"product_tour_id",coerce:kmh}],Nmh=[{property:"$session_id",field:"session_id"},{property:"$window_id",field:"window_id"}];function jmh(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function zmh(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 Cll(e,t,r){r!==void 0&&!(t in e)&&(e[t]=r)}function Qmh(e){let r={...jmh(e.properties)?e.properties:{}},n={};for(let{property:o,optionKey:s,coerce:a}of Fmh)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 Nmh)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,Cll(r,"$set",e.$set),Cll(r,"$set_once",e.$set_once),{event:String(e.event??""),uuid:String(e.uuid??""),distinct_id:String(e.distinct_id??""),timestamp:zmh(e.timestamp),...i,options:n,properties:r}}function xll(e,{createdAt:t,historicalMigration:r}){let n={created_at:t,batch:e.map(Qmh)};return r&&(n.historical_migration=!0),n}var Mmh="/i/v1/analytics/events",Lmh=3e4,_mh=new Set([408,500,502,503,504]),Von=class{constructor(t,r){this.config=t,this.maxBackoffMs=t.maxBackoffMs??Lmh,this.fetchFn=r.fetch,this.onError=r.onError,this.now=r.now??Date.now,this.sleep=r.sleep??(n=>new Promise(i=>UN(i,n))),this.generateRequestId=r.generateRequestId??_N,this.compress=r.compress??kKt}async sendV1Batch(t){if(t.length===0)return;let r=this.generateRequestId(),n=new Date(this.now()).toISOString(),{batch:i}=xll(t,{createdAt:n,historicalMigration:this.config.historicalMigration}),o=`${this.config.host}${Mmh}`,s=[],a=i,c=Math.max(1,this.config.maxAttempts);for(let u=1;u<=c;u++){let l=u===c,p=S1e({created_at:n,...this.config.historicalMigration?{historical_migration:!0}:{},batch:a}),d,f;try{d=await this.sendOnce(o,p,u,r);let{response:m,signal:g}=d,{status:A}=m;if(A<200||A>=300)if(!l&&_mh.has(A)){let y=this.parseRetryAfter(m);await d.waitFor(d.cancelBody()).catch(()=>{}),f=this.backoffDelay(u,y)}else{let y=await this.buildHttpError(m,A,d.waitFor);return this.surfaceBatchFailure(r,s,a,y)}else{let y;try{y=await d.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 tdt({requestId:r,drops:s,retryExhausted:I.map(v=>v.uuid)}));a=I;let x=this.parseRetryAfter(m);f=this.backoffDelay(u,x)}}catch(m){if(d&&!d.signal.aborted)throw m;if(l)return this.surfaceBatchFailure(r,s,a,m);f=this.backoffDelay(u)}finally{d?.cleanup()}f!==void 0&&await this.sleep(f)}}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,d)=>{u=UN(()=>{let f=new Error(`Capture V1 request timed out ${c} after ${this.config.requestTimeoutMs}ms`);f.name="AbortError",d(f),a.abort(f)},this.config.requestTimeoutMs)});try{let p=this.fetchFn(t,{method:"POST",headers:o,body:s,signal:a.signal}),d=!1;p.then(y=>{a.signal.aborted&&!d&&this.cancelBody(y)}).catch(()=>{});let f=await Promise.race([p,l]);d=!0,c="while reading the response body";let m=!1,g,A=()=>g??=this.cancelBody(f);return{response:f,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 tdt({requestId:t,drops:r,retryExhausted:n.map(o=>o.uuid),cause:i}))}surfacePartialDrops(t,r){r.length>0&&this.onError(new tdt({requestId:t,drops:r,retryExhausted:[]}))}async cancelBody(t){try{await t.body?.cancel()}catch{}}};var _5e="ai-capture",Gon="/i/v0/ai/batch/";var Vmh=new TextEncoder;function q$o(e){return Vmh.encode(S1e(e)).length}function Sll(e,t=8388608,r=5242880){let n=[],i=[],o=[],s=0;for(let a of e){if(a===void 0)continue;let c=q$o(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 Gmh=100,wll=3e4,qmh=5e4,Wmh=50,Hmh=500,Kmh="https://us.i.posthog.com",Tll=new Set;function Won(e,t){Tll.has(e)||(Tll.add(e),console.warn(`[PostHog] ${t}`))}function Jmh(e){return typeof e=="string"?e.trim():""}function Ymh(e){return(typeof e=="string"?e.trim():"")||void 0}function Xmh(e){return(typeof e=="string"?e.trim():"")||Kmh}function Zmh(e){return(Array.isArray(e)?e:[e]).filter(r=>typeof r=="string"&&r.trim().length>0)}function $mh(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 Hon=class extends FKt{constructor(t,r={}){let n=Jmh(t),i={...r,maxQueueSize:r.maxQueueSize??1e4,flushInterval:r.flushInterval??5e3,host:Xmh(r.host),personalApiKey:Ymh(r.secretKey??r.personalApiKey)};if(super(n,i),this._memoryStorage=new Uon,this._aiCaptureRouteActive=!1,this._minimalFlagCalledEvents=!1,this.options=i,this.captureMode=Ill(),this.enableFullAiCapture=i.enableFullAiCapture===!0,this.context=this.initializeContext(),this.options.featureFlagsPollingInterval=typeof i.featureFlagsPollingInterval=="number"?Math.max(i.featureFlagsPollingInterval,Gmh):i.featureFlagsPollingInterval===null?null:wll,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 _on({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 L5e(this,i,this._logger),this.distinctIdHasSentFlagCalls={},this.maxCacheSize=i.maxCacheSize||qmh}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:CKt([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??Hmh,i=r>=n;if(this._waitUntilCycle.timer!==void 0&&clearTimeout(this._waitUntilCycle.timer),i)return void this.resolveWaitUntilFlush();let o=this.options.waitUntilDebounceMs??Wmh;this._waitUntilCycle.timer=UN(()=>{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"&&vll(t)?"ai":YKt}persistedQueueKeyForRoute(t){return t===_5e?jM.AiCaptureQueue:t==="ai"?jM.AiQueue:jM.Queue}getActiveQueueRoutes(){let t=this.captureMode==="v1"?[YKt,"ai"]:[YKt];return this._aiCaptureRouteActive&&t.push(_5e),t}getBatchEndpointPath(t){return t===_5e?Gon:super.getBatchEndpointPath(t)}async sendBatch(t,r,n=YKt){if(n===_5e)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}=Sll(t);for(let{event:o,bytes:s}of i){let a=`Event ${o} (${s} bytes) exceeds the ${8388608/1048576}MiB limit for ${Gon}, 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,_5e)}catch(n){if(!Yft(n))throw n;if(t.length===1){let[o]=t,a=`Event ${typeof o.event=="string"?o.event:"unknown"} (${q$o(o)} bytes) was rejected with 413 by ${Gon} 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 Von({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 pll}get metrics(){return this._metrics||(this._metrics=new VKt(this,Oon(this.options.metrics),this._logger)),this._metrics}initializeSpanContextManager(){return new KKt}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 HKt(this,z$o(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)??O1e(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):WKt(this._spanContextManager,O1e(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=j5e(t.uuid,_N);return this._sendPreparedAiEvent({...t,uuid:r},!1),r}async captureAiImmediate(t){if(this.disabled)return;let r=j5e(t.uuid,_N);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,_5e)}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=Zmh(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=wll){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 d=this.createFeatureFlagEvaluationContext(r,s,this.personPropertiesForLocalEvaluation(r,u),l);c==null&&(c=this.options.strictLocalEvaluation??!1);let f,m=!1,g,A,y,I,x,v,S;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,d,{matchValue:i});if(D){m=!0;let O=D.value;I=R.id,v="Evaluated locally",S=R.has_experiment,f={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 Tne||D instanceof sl)this._logger?.info(`${D.name} when computing flag locally: ${t}: ${D.message}`);else throw D}}if(!m&&!c){let R=await super.getFeatureFlagDetailsStateless(d.distinctId,d.groups,u,l,a,[t]);if(R===void 0)y=rge.UNKNOWN_ERROR;else{this._minimalFlagCalledEvents=R.minimalFlagCalledEvents===!0,g=R.requestId,A=R.evaluatedAt;let D=[];R.errorsWhileComputingFlags&&D.push(rge.ERRORS_WHILE_COMPUTING),R.quotaLimited?.includes("feature_flags")&&D.push(rge.QUOTA_LIMITED);let O=R.flags[t];if(O===void 0)D.push(rge.FLAG_MISSING);else{I=O.metadata?.id,x=O.metadata?.version,v=O.reason?.description??O.reason?.code,S=O.metadata?.has_experiment;let z;if(O.metadata?.payload!==void 0)try{z=JSON.parse(O.metadata.payload)}catch{z=O.metadata.payload}f={key:t,enabled:O.enabled,variant:O.variant??void 0,payload:z,reason:v,reasonCode:O.reason?.code}}D.length>0&&(y=D.join(","))}}if(o){let R=f===void 0?void 0:f.enabled===!1?!1:f.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(S!==void 0&&(D.$feature_flag_has_experiment=S),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 f!==void 0&&this._payloadOverrides!==void 0&&t in this._payloadOverrides&&(f={...f,payload:this._payloadOverrides[t]}),f}async getFeatureFlag(t,r,n){Won("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(Won("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){Won("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 d=this.createFeatureFlagEvaluationContext(n,o,this.personPropertiesForLocalEvaluation(n,u),l);c==null&&(c=this.options.strictLocalEvaluation??!1);let f=await this.featureFlagsPoller?.getAllFlagsAndPayloads(d,a),m={},g={},A=!0;if(f&&(m=f.response,g=f.payloads,A=f.fallbackToFlags),A&&!c){let y=await super.getFeatureFlagsAndPayloadsStateless(d.distinctId,d.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 B1e({host:this._getFeatureFlagEvaluationsHost(),distinctId:"",flags:{}});if(this.disabled)return this._logger.warn("The client is disabled"),new B1e({host:this._getFeatureFlagEvaluationsHost(),distinctId:n,flags:{}});let{groups:o,disableGeoip:s}=i||{},a=i?.flagKeys??void 0;if(a?.length===0)return new B1e({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 d=this.createFeatureFlagEvaluationContext(n,o,this.personPropertiesForLocalEvaluation(n,u),l);c==null&&(c=this.options.strictLocalEvaluation??!1);let f=a?new Set(a):void 0,m={},g,A,y=!1,I=!1,x=await this.featureFlagsPoller?.getAllFlagsAndPayloads(d,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 S=f!==void 0&&Array.from(f).some(R=>this.featureFlagsPoller?.featureFlagsByKey[R]===void 0);if((x?x.fallbackToFlags||S:!0)&&!c){let R=await super.getFeatureFlagDetailsStateless(d.distinctId,d.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 z;if(O.metadata?.payload!==void 0)try{z=JSON.parse(O.metadata.payload)}catch{z=O.metadata.payload}m[D]={key:D,enabled:O.enabled,variant:O.variant,payload:z,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(f!==void 0)for(let R of Object.keys(m))f.has(R)||delete m[R];return new B1e({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 T1e(this._metrics.flush().catch(()=>{}),Math.max(0,r-Date.now())),this._metrics.reset()),this._traces&&(await T1e(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=UN(()=>{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(Ocl(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(!L5e.isPreviouslyCapturedError(t)){let s=new Error("PostHog syntheticException");this.addPendingPromise(L5e.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(!L5e.isPreviouslyCapturedError(t)){let o=new Error("PostHog syntheticException");return this.addPendingPromise(L5e.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,d=this.context?.get(),f=r.includeContextProperties??!0,m=n||d?.distinctId,g=f?{...this.props,...d?.properties||{},...o||{}}:{...o||{}};m||(m=_N(),g.$process_person_profile=!1),f&&d?.sessionId&&!g.$session_id&&(g.$session_id=d.sessionId);let A=this._shouldSendMinimalFlagCalledEvent(i,g)?RKt(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){Won("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 $mh(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"&&Bcl(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 Oll=require("async_hooks"),Kon=class{constructor(){this.storage=new Oll.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 Pll=require("async_hooks"),Jon=class{active(){return this._storage.getStore()}with(t,r){return this._storage.run(t,r)}constructor(){this._storage=new Pll.AsyncLocalStorage}};var Bll=require("zlib"),Rll=require("util"),ehh=(0,Rll.promisify)(Bll.gzip);async function Dll(e,t=!0){try{let r=await ehh(e);return new Uint8Array(r)}catch(r){return t&&console.error("Failed to gzip compress data",r),null}}var Yon=require("os");function kll(){let e,t;try{e=(0,Yon.platform)(),t=(0,Yon.release)()}catch{}return w$o(e,t)}var Fll="posthog-node";function thh(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[W$o.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||[],d=p.map(g=>({...g,stacktrace:g.stacktrace?{...g.stacktrace,type:"raw",frames:(g.stacktrace.frames||[]).map(A=>({...A,platform:"node:javascript"}))}:void 0})),f={$exception_message:p[0]?.value||s.message,$exception_type:p[0]?.type,$exception_level:s.level,$exception_list:d,$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=lO.getInjectedReleaseId();return m&&(f.$release_id=m),t&&r&&(f.$sentry_url=(n||"https://sentry.io/organizations/")+t+"/issues/?project="+r+"&query="+s.event_id),o&&e.capture({event:"$exception",distinctId:c,properties:f}),s}}var W$o=class{static{this.POSTHOG_ID_TAG="posthog_distinct_id"}constructor(t,r,n,i,o){this.name=Fll,this.name=Fll,this.setupOnce=function(s,a){let c=a()?.getClient()?.getDsn()?.projectId;s(thh(t,{organization:r,projectId:c,prefix:n,severityAllowList:i,sendExceptionsToPostHog:o??!0}))}}};var One=class extends Hon{getLibraryId(){return"posthog-node"}compressPayload(t){return Dll(t,this.isDebug)}initializeContext(){return new Kon}initializeSpanContextManager(){return new Jon}hostResourceAttributes(){return kll()}createErrorPropertiesBuilder(){return new lO.ErrorPropertiesBuilder([new lO.EventCoercer,new lO.ErrorCoercer,new lO.ObjectCoercer,new lO.StringCoercer,new lO.PrimitiveCoercer],lO.createStackParser("node:javascript",lO.nodeStackLineParser),[Ccl(),t=>sll(t,void 0,this._logger),lll()])}};function Nll(e){return e==null||!e.enabled?!1:e.variant==null||e.variant==="true"}var Xon=class{isEnabled(){return Promise.resolve(!1)}getCachedValue(){}flush(){return Promise.resolve()}},rhh="feature_flag_evaluated",nhh=3e3,ihh=3e3,Zon=class{evaluator;environment;sendFeatureFlagEvents;pending=new Map;resolved=new Map;constructor({environment:t,sendFeatureFlagEvents:r,posthogApiKey:n,evaluator:i}){this.environment=t,this.sendFeatureFlagEvents=r,this.evaluator=i??new One(n??"",{featureFlagsRequestTimeoutMs:nhh,isServer:!1})}isEnabled(t,r){let n=jll(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(jll(t,r))}async flush(){if(!this.sendFeatureFlagEvents)return;let t;try{await Promise.race([this.flushAfterPendingEvaluations(),new Promise(r=>{t=setTimeout(r,ihh),t.unref()})])}catch{}finally{clearTimeout(t)}}async flushAfterPendingEvaluations(){await Promise.allSettled(this.pending.values()),await this.evaluator.flush()}async evaluate(t,r){let{org:n}=r,i=shh(r,this.environment),o;try{o=await this.evaluator.getFeatureFlagResult(t,H$o(n),{personProperties:i,groups:{organization:n},groupProperties:{organization:i},sendFeatureFlagEvents:!1})}catch{return!1}return this.sendFeatureFlagEvents&&this.captureFlagUsage({flag:t,org:n,result:o,properties:i}),Nll(o)}captureFlagUsage({flag:t,org:r,result:n,properties:i}){let o=ohh(n),s={...i,...n?.reason!=null?{$feature_flag_reason:n.reason}:{},version:"5.180.2"};this.tryCapture({distinctId:H$o(r),event:"$feature_flag_called",groups:{organization:r},properties:{...s,$feature_flag:t,$feature_flag_response:o,[`$feature/${t}`]:o}}),this.tryCapture({distinctId:H$o(r),event:rhh,groups:{organization:r},properties:{...s,flag:t,response:o,enabled:Nll(n)}})}tryCapture(t){try{this.evaluator.capture(t)}catch{}}};function ohh(e){if(e!=null)return e.enabled?e.variant??!0:!1}function H$o(e){return`org:${e}`}function shh({org:e,generator:t,language:r},n){return{org:e,environment:n,...t!=null?{generator:t}:{},...r!=null?{language:r}:{}}}function jll(e,{org:t,generator:r,language:n}){return JSON.stringify([e,t,r??null,n??null])}var $on;function esn(){return $on==null&&($on=ahh()),$on}async function K$o(){await $on?.flush()}function ahh(){let e="phc_yQgAEdJJkVpI24NdSRID2mor1x1leRpDoC9yZ9mfXal";return e==null||e.trim().length===0?new Xon:new Zon({posthogApiKey:e,environment:YJ(),sendFeatureFlagEvents:ron()})}var tsn=class{posthog;constructor({posthogApiKey:t}){this.posthog=new One(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.180.2",usingAccessToken:!0,cliReleaseEnvironment:YJ(),...zpe()}})}sendAutomationEvent(t){this.posthog.capture({distinctId:t.distinctId,event:t.event,properties:{...t.properties,cliReleaseEnvironment:YJ()}})}async flush(){try{await Promise.race([this.posthog.flush(),new Promise(t=>setTimeout(t,3e3))])}catch{}}};var XKt=class{async sendEvent(){}async sendAutomationEvent(){}async identify(){}async flush(){}};Of();tr();var rdt=require("fs/promises"),zll=require("os"),Qll=require("path");CVe();var chh="id",uhh=".fern",ZKt=class{posthog;userId;token;constructor({token:t,posthogApiKey:r}){this.posthog=new One(r,{isServer:!1}),this.userId=t==null?void 0:M7o(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.180.2",...t,...t.properties,usingAccessToken:!1,cliReleaseEnvironment:YJ(),agent:WHr(),...r!=null?{userEmail:r}:{},...zpe()}})}sendAutomationEvent(t){this.posthog.capture({distinctId:t.distinctId,event:t.event,properties:{...t.properties,cliReleaseEnvironment:YJ()}})}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 ol({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=Xw(),r=Be($t.of((0,zll.homedir)()),Ae.of(uhh),Ae.of(chh));try{await Vt(r)?this.persistedDistinctId=(await(0,rdt.readFile)(r)).toString():(await(0,rdt.mkdir)((0,Qll.dirname)(r),{recursive:!0}),await(0,rdt.writeFile)(r,t),this.persistedDistinctId=t)}catch{this.persistedDistinctId=t}}return this.persistedDistinctId}};var J$o;async function $Kt(){return J$o==null&&(J$o=await lhh()),J$o}async function lhh(){try{let e="phc_yQgAEdJJkVpI24NdSRID2mor1x1leRpDoC9yZ9mfXal";if(e==null||!ron())return new XKt;let t=await dpt();return t!=null?new ZKt({token:t,posthogApiKey:e}):await OM()!=null?new tsn({posthogApiKey:e}):new ZKt({token:void 0,posthogApiKey:e})}catch{return new XKt}}En();ct();Dt();yM();var eJt=ye(require("process"),1);PZe();var _ll=ye(N4o(),1),Ull=ye(Lll(),1);function pO(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=SH(e),e.length===0))return 0;e=e.replace((0,Ull.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(_ll.default.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}En();function rsn(e){let t=0;for(let r of e.split(`
3474
3474
  `))t=Math.max(t,pO(r));return t}var cpl=ye(X$o(),1);var fhh=/[\p{Lu}]/u,dhh=/[\p{Ll}]/u,qll=/^[\p{Lu}](?![\p{Lu}])/gu,Kll=/([\p{Alpha}\p{N}_]|$)/u,Z$o=/[_.\- ]+/,mhh=new RegExp("^"+Z$o.source),Wll=new RegExp(Z$o.source+Kll.source,"gu"),Hll=new RegExp("\\d+"+Kll.source,"gu"),hhh=(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&&fhh.test(u)?(e=e.slice(0,c)+"-"+e.slice(c),i=!1,s=o,o=!0,c++):o&&s&&dhh.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},ghh=(e,t)=>(qll.lastIndex=0,e.replace(qll,r=>t(r))),Ahh=(e,t)=>(Wll.lastIndex=0,Hll.lastIndex=0,e.replace(Wll,(r,n)=>t(n)).replace(Hll,r=>t(r)));function $$o(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?Z$o.test(e)?"":t.pascalCase?n(e):r(e):(e!==r(e)&&(e=hhh(e,r,n,t.preserveConsecutiveUppercase)),e=e.replace(mhh,""),e=t.preserveConsecutiveUppercase?ghh(e,r):r(e),t.pascalCase&&(e=n(e.charAt(0))+e.slice(1)),Ahh(e,n))}var nes=ye(Yll(),1);PZe();var Xll=(e=0)=>t=>`\x1B[${t+e}m`,Zll=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,$ll=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,PE={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]}},DoC=Object.keys(PE.modifier),Ihh=Object.keys(PE.color),vhh=Object.keys(PE.bgColor),koC=[...Ihh,...vhh];function Chh(){let e=new Map;for(let[t,r]of Object.entries(PE)){for(let[n,i]of Object.entries(r))PE[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=PE[n],e.set(i[0],i[1]);Object.defineProperty(PE,t,{value:r,enumerable:!1})}return Object.defineProperty(PE,"codes",{value:e,enumerable:!1}),PE.color.close="\x1B[39m",PE.bgColor.close="\x1B[49m",PE.color.ansi=Xll(),PE.color.ansi256=Zll(),PE.color.ansi16m=$ll(),PE.bgColor.ansi=Xll(10),PE.bgColor.ansi256=Zll(10),PE.bgColor.ansi16m=$ll(10),Object.defineProperties(PE,{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=>PE.rgbToAnsi256(...PE.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)=>PE.ansi256ToAnsi(PE.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>PE.ansi256ToAnsi(PE.hexToAnsi256(t)),enumerable:!1}}),PE}var xhh=Chh(),epl=xhh;var nsn=new Set(["\x1B","\x9B"]),Shh=39,tes="\x07",npl="[",whh="]",ipl="m",res=`${whh}8;;`,tpl=e=>`${nsn.values().next().value}${npl}${e}${ipl}`,rpl=e=>`${nsn.values().next().value}${res}${e}${tes}`,Thh=e=>e.split(" ").map(t=>pO(t)),ees=(e,t,r)=>{let n=[...t],i=!1,o=!1,s=pO(SH(e[e.length-1]));for(let[a,c]of n.entries()){let u=pO(c);if(s+u<=r?e[e.length-1]+=c:(e.push(c),s=0),nsn.has(c)&&(i=!0,o=n.slice(a+1).join("").startsWith(res)),i){o?c===tes&&(i=!1,o=!1):c===ipl&&(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())},Ohh=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(pO(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},Phh=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let n="",i,o,s=Thh(e),a=[""];for(let[u,l]of e.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let p=pO(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 d=t-p,f=1+Math.floor((s[u]-d-1)/t);Math.floor((s[u]-1)/t)<f&&a.push(""),ees(a,l,t);continue}if(p+s[u]>t&&p>0&&s[u]>0){if(r.wordWrap===!1&&p<t){ees(a,l,t);continue}a.push("")}if(p+s[u]>t&&r.wordWrap===!1){ees(a,l,t);continue}a[a.length-1]+=l}r.trim!==!1&&(a=a.map(u=>Ohh(u)));let c=[...a.join(`
3475
3475
  `)];for(let[u,l]of c.entries()){if(n+=l,nsn.has(l)){let{groups:d}=new RegExp(`(?:\\${npl}(?<code>\\d+)m|\\${res}(?<uri>.*)${tes})`).exec(c.slice(u).join(""))||{groups:{}};if(d.code!==void 0){let f=Number.parseFloat(d.code);i=f===Shh?void 0:f}else d.uri!==void 0&&(o=d.uri.length===0?void 0:d.uri)}let p=epl.codes.get(Number(i));c[u+1]===`
3476
3476
  `?(o&&(n+=rpl("")),i&&p&&(n+=tpl(p))):l===`
@@ -3918,11 +3918,11 @@ ${de.dim(`Logs written to: ${this.logs.absoluteFilePath}`)}
3918
3918
  `),new T({code:T.Code.InternalError}))}async resolveOrganization(t,r){if(r.org!=null)return r.org;try{return(await t.loadWorkspaceOrThrow()).org}catch{throw process.stderr.write(`${qr.error} No organization specified.
3919
3919
 
3920
3920
  Run fern init or specify an organization with --org, then run this command again.
3921
- `),new T({code:T.Code.ConfigError})}}};function Lms(e){let t=new Mms;di(e,"token","Generate an organization access token (FERN_TOKEN)",(r,n)=>t.handle(r,n),r=>r.option("org",{type:"string",description:"Organization to generate token for (defaults to organization in fern.yml)"}).example("$0 auth token","Generate token for workspace organization").example("$0 auth token --org acme","Generate token for specific organization").example("export FERN_TOKEN=$($0 auth token)","Export token to variable"))}Dt();En();var _ms=class{async handle(t,r){let n=await t.tokenService.getActiveAccountInfo();if(n==null)throw t.stdout.warn(`${de.yellow("\u26A0")} You are not logged in to Fern.`),t.stdout.info(""),t.stdout.info(de.dim(" To log in, run: fern auth login")),new T({code:T.Code.AuthError});if(r.json){t.stdout.info(JSON.stringify({email:n.user},null,2));return}t.stdout.info(de.bold(n.user))}};function Ums(e){let t=new _ms;di(e,"whoami","Print the current user",(r,n)=>t.handle(r,n),r=>r.option("json",{type:"boolean",default:!1,description:"Output as JSON"}))}function Vms(e){zA({cli:e,name:"auth",description:"Authenticate fern",subcommands:[Dms,Fms,Qms,jms,Lms,Ums]})}var Gms=class{async handle(t,r){let{cache:n}=t,i=r["dry-run"]??!1,o=r.ir===!0||r.logs===!0||r["docs-preview"]===!0||r.versions===!0,s=r.all===!0,a={ir:s||(o?r.ir===!0:!0),logs:s||(o?r.logs===!0:!0),docsPreview:s||(o?r["docs-preview"]===!0:!0),versions:s||(o?r.versions===!0:!1),dryRun:i},c=await n.clear(a);if(i){if(c.deletedCount===0){t.stdout.info("Cache is already empty, nothing to clear.");return}t.stdout.info(`Would delete ${c.deletedCount} entries (${IS(c.freedSize)})`),t.stdout.info("Run without --dry-run to actually delete these entries.");return}if(c.deletedCount===0){t.stdout.info("Cache is already empty, nothing to clear.");return}t.stdout.info(`Cleared ${c.deletedCount} entries (${IS(c.freedSize)} freed)`)}};function qms(e){let t=new Gms;di(e,"clear","Clear cache entries",(r,n)=>t.handle(r,n),r=>r.option("all",{type:"boolean",description:"Clear all cache entries including installed CLI versions",default:!1}).option("ir",{type:"boolean",description:"Clear only IR cache entries",default:!1}).option("logs",{type:"boolean",description:"Clear only log files",default:!1}).option("docs-preview",{type:"boolean",description:"Clear only docs preview bundles",default:!1}).option("versions",{type:"boolean",description:"Clear only installed CLI versions from the versions cache",default:!1}).option("dry-run",{type:"boolean",description:"Preview what would be cleared without deleting",default:!1}))}var Wms=class{async handle(t,r){let{cache:n}=t,i=await n.getStats();if(r.json){let s={paths:{base:n.absoluteFilePath,ir:n.ir.absoluteFilePath,logs:n.logs.absoluteFilePath,docsPreview:n.docsPreview.absoluteFilePath,versions:n.versions.absoluteFilePath},stats:{totalSize:i.totalSize,totalSizeFormatted:IS(i.totalSize),ir:{entryCount:i.ir.entryCount,totalSize:i.ir.totalSize,totalSizeFormatted:IS(i.ir.totalSize),byVersion:Object.entries(i.ir.byVersion).map(([a,c])=>({version:a,entries:c.entryCount,size:c.totalSize,sizeFormatted:IS(c.totalSize)}))},logs:{fileCount:i.logs.fileCount,totalSize:i.logs.totalSize,totalSizeFormatted:IS(i.logs.totalSize)},docsPreview:{bundleCount:i.docsPreview.bundleCount,totalSize:i.docsPreview.totalSize,totalSizeFormatted:IS(i.docsPreview.totalSize)},versions:{entryCount:i.versions.entryCount,totalSize:i.versions.totalSize,totalSizeFormatted:IS(i.versions.totalSize),byVersion:Object.entries(i.versions.byVersion).map(([a,c])=>({version:a,size:c.totalSize,sizeFormatted:IS(c.totalSize)}))}}};t.stdout.info(JSON.stringify(s,null,2));return}if(t.stdout.info("Cache Location"),t.stdout.info("=============="),t.stdout.info(`Base: ${n.absoluteFilePath}`),t.stdout.info(`IR: ${n.ir.absoluteFilePath}`),t.stdout.info(`Logs: ${n.logs.absoluteFilePath}`),t.stdout.info(`Docs Preview: ${n.docsPreview.absoluteFilePath}`),t.stdout.info(`Versions: ${n.versions.absoluteFilePath}`),t.stdout.info(""),t.stdout.info("Cache Statistics"),t.stdout.info("================"),i.ir.entryCount===0&&i.logs.fileCount===0&&i.docsPreview.bundleCount===0&&i.versions.entryCount===0){t.stdout.info("Cache is empty");return}if(t.stdout.info(`Total size: ${IS(i.totalSize)}`),t.stdout.info(""),i.ir.entryCount>0){if(t.stdout.info("IR Cache:"),t.stdout.info(` ${i.ir.entryCount} entries (${IS(i.ir.totalSize)})`),Object.keys(i.ir.byVersion).length>0){let s=Object.entries(i.ir.byVersion).sort(([a],[c])=>{let u=parseInt(a.replace("v",""),10);return parseInt(c.replace("v",""),10)-u});for(let[a,c]of s)t.stdout.info(` ${a}: ${c.entryCount} entries (${IS(c.totalSize)})`)}t.stdout.info("")}if(i.logs.fileCount>0&&(t.stdout.info("Logs:"),t.stdout.info(` ${i.logs.fileCount} files (${IS(i.logs.totalSize)})`),t.stdout.info("")),i.docsPreview.bundleCount>0&&(t.stdout.info("Docs Preview:"),t.stdout.info(` ${i.docsPreview.bundleCount} bundles (${IS(i.docsPreview.totalSize)})`),t.stdout.info("")),i.versions.entryCount>0){t.stdout.info("Versions:"),t.stdout.info(` ${i.versions.entryCount} installed (${IS(i.versions.totalSize)})`);let s=Object.entries(i.versions.byVersion).sort(([a],[c])=>c.localeCompare(a));for(let[a,c]of s)t.stdout.info(` ${a}: ${IS(c.totalSize)}`)}}};function Hms(e){let t=new Wms;di(e,"show","Show cache location and statistics",(r,n)=>t.handle(r,n),r=>r.option("json",{type:"boolean",description:"Output in JSON format",default:!1}))}function Kms(e){zA({cli:e,name:"cache",description:"Manage the local cache",subcommands:[Hms,qms]})}Dt();En();function Hdi(){return process.env.CLAUDECODE==="1"||process.env.CLAUDE_CODE_ENTRYPOINT!=null}ct();qI();ai();ct();var Lys={};$(Lys,{additionalProperties:()=>g7h,default:()=>y7h,definitions:()=>A7h,properties:()=>m7h,required:()=>h7h,type:()=>d7h});var d7h="object",m7h={tabs:{oneOf:[{type:"object",additionalProperties:{$ref:"#/definitions/docs.TabConfig"}},{type:"null"}]},"landing-page":{oneOf:[{$ref:"#/definitions/docs.PageConfiguration"},{type:"null"}]},navigation:{$ref:"#/definitions/docs.NavigationConfig"}},h7h=["navigation"],g7h=!1,A7h={"docs.RoleId":{type:"string",description:"ID of role which is used to filter the content shown in Fern Docs."},"docs.Role":{anyOf:[{$ref:"#/definitions/docs.RoleId"},{type:"array",items:{$ref:"#/definitions/docs.RoleId"}}],description:"Audience can either be a string or list of strings\ni.e. `audience: internal` or `audience: [internal, beta]`"},"docs.FeatureFlag":{type:"object",properties:{flag:{type:"string",description:"The name of the feature flag to check."},"fallback-value":{oneOf:[{type:["string","number","boolean","object","array","null"]},{type:"null"}],description:"The default value to use if the feature flag is not set. If not specified, defaults to false."},match:{oneOf:[{type:["string","number","boolean","object","array","null"]},{type:"null"}],description:"The value that the feature flag should match for the content to be shown. If not specified, content is shown when the flag is true."}},required:["flag"],additionalProperties:!1},"docs.FeatureFlagConfiguration":{anyOf:[{type:"string",description:"The name of the feature flag, We assume that it is a boolean feature flag that needs to be evaluated to true."},{$ref:"#/definitions/docs.FeatureFlag",description:"A single feature flag with a configurable name, fallback value, and match value. Especially useful for non boolean feature flags."},{type:"array",items:{$ref:"#/definitions/docs.FeatureFlag"},description:"A list of feature flags. If any of the feature flags are satisfied, we will show all content."}]},"docs.Target":{type:"string",enum:["_blank","_self","_parent","_top"]},"docs.ChangelogFolderRelativePath":{type:"string",description:'The relative path to a folder containing markdown files broken down by date.\n\nExample:\n```\nchangelog: "changelog"\n```\n\nThis will look for markdown files in the `/fern/changelog` directory, which should contain files named like\n- `/fern/changelog/2024-04-29.mdx`.\n- `/fern/changelog/2023-01-02.mdx`.'},"docs.TabConfig":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},"display-name":{type:"string"},icon:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},href:{oneOf:[{type:"string"},{type:"null"}],description:"If `href` is set, clicking on the tab will redirect to the given URL.\n\nTabs with `href` must not have children in the navigation config."},target:{oneOf:[{$ref:"#/definitions/docs.Target"},{type:"null"}]},changelog:{oneOf:[{$ref:"#/definitions/docs.ChangelogFolderRelativePath"},{type:"null"}]},blog:{oneOf:[{$ref:"#/definitions/docs.ChangelogFolderRelativePath"},{type:"null"}]}},required:["display-name"],additionalProperties:!1},"docs.Availability":{type:"string",enum:["stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"]},"docs.PageConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},page:{type:"string"},path:{type:"string"},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},noindex:{oneOf:[{type:"boolean"},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]}},required:["page","path"],additionalProperties:!1},"docs.CollapsedStringValue":{type:"string",enum:["open-by-default"]},"docs.CollapsedValue":{anyOf:[{type:"boolean"},{$ref:"#/definitions/docs.CollapsedStringValue"}]},"docs.SectionConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},section:{type:"string"},path:{oneOf:[{type:"string"},{type:"null"}],description:"The relative path to the markdown file that will be displayed when the section is clicked."},contents:{type:"array",items:{$ref:"#/definitions/docs.NavigationItem"}},collapsed:{oneOf:[{$ref:"#/definitions/docs.CollapsedValue"},{type:"null"}],description:"Deprecated. Use `collapsible` and `collapsed-by-default` instead."},collapsible:{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section can be expanded/collapsed by the user."},"collapsed-by-default":{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section starts collapsed. Only meaningful when `collapsible` is true. Defaults to false (starts open)."},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]}},required:["section","contents"],additionalProperties:!1},"docs.ApiSpecType":{type:"string",enum:["openapi","asyncapi","graphql"]},"docs.ApiSpecErrorResponseSchemaSource":{anyOf:[{type:"string"},{type:"object",additionalProperties:{type:["string","number","boolean","object","array","null"]}}]},"docs.ApiSpecErrorResponseApplyTo":{type:"string",enum:["all","untyped"]},"docs.ApiSpecErrorResponseHttpMethod":{type:"string",enum:["get","post","put","patch","delete","head","options","trace"]},"docs.ApiSpecErrorResponseEnsure":{type:"object",properties:{"status-code":{type:"integer",description:"The 4xx/5xx status code to add when an operation does not declare it."},methods:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiSpecErrorResponseHttpMethod"}},{type:"null"}]}},required:["status-code"],additionalProperties:!1},"docs.ApiSpecErrorResponses":{type:"object",properties:{schema:{$ref:"#/definitions/docs.ApiSpecErrorResponseSchemaSource"},name:{oneOf:[{type:"string"},{type:"null"}]},"apply-to":{oneOf:[{$ref:"#/definitions/docs.ApiSpecErrorResponseApplyTo"},{type:"null"}]},ensure:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiSpecErrorResponseEnsure"}},{type:"null"}]}},required:["schema"],additionalProperties:!1},"docs.ApiSpecImportSettings":{type:"object",properties:{"type-dates-as-strings":{oneOf:[{type:"boolean"},{type:"null"}]},"use-bytes-for-binary-response":{oneOf:[{type:"boolean"},{type:"null"}]},"respect-parameter-content":{oneOf:[{type:"boolean"},{type:"null"}]},"respect-operation-id-word-boundaries":{oneOf:[{type:"boolean"},{type:"null"}]},"infer-forward-compatible":{oneOf:[{type:"boolean"},{type:"null"}]},"preserve-one-of-in-all-of":{oneOf:[{type:"boolean"},{type:"null"}]},"any-of-sibling-properties-as-object":{oneOf:[{type:"boolean"},{type:"null"}]},"error-responses":{oneOf:[{$ref:"#/definitions/docs.ApiSpecErrorResponses"},{type:"null"}]}},additionalProperties:!1,description:"Import settings that affect the API definition rendered by Fern Docs."},"docs.ApiSpecConfiguration":{type:"object",properties:{type:{$ref:"#/definitions/docs.ApiSpecType"},path:{type:"string",description:"Path to the API specification, relative to docs.yml."},namespace:{oneOf:[{type:"string"},{type:"null"}]},overlays:{oneOf:[{type:"string"},{type:"null"}],description:"Path to an OpenAPI Overlay document, relative to docs.yml."},overrides:{oneOf:[{type:"array",items:{type:"string"}},{type:"null"}],description:"Paths to Fern override documents, relative to docs.yml."},settings:{oneOf:[{$ref:"#/definitions/docs.ApiSpecImportSettings"},{type:"null"}],description:"Import settings that affect the rendered API reference."}},required:["type","path"],additionalProperties:!1,description:"A source API specification referenced directly by docs.yml."},"docs.AudienceId":{type:"string",description:"ID of audience which is used to filter the API spec."},"docs.Audience":{anyOf:[{$ref:"#/definitions/docs.AudienceId"},{type:"array",items:{$ref:"#/definitions/docs.AudienceId"}}],description:"Audience can either be a string or list of strings\ni.e. `audiences: internal` or `audiences: [internal, beta]`"},"docs.VersionedSnippetLanguageConfiguration":{type:"object",properties:{version:{type:"string"},package:{type:"string"}},required:["version","package"],additionalProperties:!1},"docs.SnippetLanguageConfiguration":{anyOf:[{type:"string"},{$ref:"#/definitions/docs.VersionedSnippetLanguageConfiguration"}],description:`This snippets config object is meant to allow users to specify a specific package for the snippets,
3921
+ `),new T({code:T.Code.ConfigError})}}};function Lms(e){let t=new Mms;di(e,"token","Generate an organization access token (FERN_TOKEN)",(r,n)=>t.handle(r,n),r=>r.option("org",{type:"string",description:"Organization to generate token for (defaults to organization in fern.yml)"}).example("$0 auth token","Generate token for workspace organization").example("$0 auth token --org acme","Generate token for specific organization").example("export FERN_TOKEN=$($0 auth token)","Export token to variable"))}Dt();En();var _ms=class{async handle(t,r){let n=await t.tokenService.getActiveAccountInfo();if(n==null)throw t.stdout.warn(`${de.yellow("\u26A0")} You are not logged in to Fern.`),t.stdout.info(""),t.stdout.info(de.dim(" To log in, run: fern auth login")),new T({code:T.Code.AuthError});if(r.json){t.stdout.info(JSON.stringify({email:n.user},null,2));return}t.stdout.info(de.bold(n.user))}};function Ums(e){let t=new _ms;di(e,"whoami","Print the current user",(r,n)=>t.handle(r,n),r=>r.option("json",{type:"boolean",default:!1,description:"Output as JSON"}))}function Vms(e){zA({cli:e,name:"auth",description:"Authenticate fern",subcommands:[Dms,Fms,Qms,jms,Lms,Ums]})}var Gms=class{async handle(t,r){let{cache:n}=t,i=r["dry-run"]??!1,o=r.ir===!0||r.logs===!0||r["docs-preview"]===!0||r.versions===!0,s=r.all===!0,a={ir:s||(o?r.ir===!0:!0),logs:s||(o?r.logs===!0:!0),docsPreview:s||(o?r["docs-preview"]===!0:!0),versions:s||(o?r.versions===!0:!1),dryRun:i},c=await n.clear(a);if(i){if(c.deletedCount===0){t.stdout.info("Cache is already empty, nothing to clear.");return}t.stdout.info(`Would delete ${c.deletedCount} entries (${IS(c.freedSize)})`),t.stdout.info("Run without --dry-run to actually delete these entries.");return}if(c.deletedCount===0){t.stdout.info("Cache is already empty, nothing to clear.");return}t.stdout.info(`Cleared ${c.deletedCount} entries (${IS(c.freedSize)} freed)`)}};function qms(e){let t=new Gms;di(e,"clear","Clear cache entries",(r,n)=>t.handle(r,n),r=>r.option("all",{type:"boolean",description:"Clear all cache entries including installed CLI versions",default:!1}).option("ir",{type:"boolean",description:"Clear only IR cache entries",default:!1}).option("logs",{type:"boolean",description:"Clear only log files",default:!1}).option("docs-preview",{type:"boolean",description:"Clear only docs preview bundles",default:!1}).option("versions",{type:"boolean",description:"Clear only installed CLI versions from the versions cache",default:!1}).option("dry-run",{type:"boolean",description:"Preview what would be cleared without deleting",default:!1}))}var Wms=class{async handle(t,r){let{cache:n}=t,i=await n.getStats();if(r.json){let s={paths:{base:n.absoluteFilePath,ir:n.ir.absoluteFilePath,logs:n.logs.absoluteFilePath,docsPreview:n.docsPreview.absoluteFilePath,versions:n.versions.absoluteFilePath},stats:{totalSize:i.totalSize,totalSizeFormatted:IS(i.totalSize),ir:{entryCount:i.ir.entryCount,totalSize:i.ir.totalSize,totalSizeFormatted:IS(i.ir.totalSize),byVersion:Object.entries(i.ir.byVersion).map(([a,c])=>({version:a,entries:c.entryCount,size:c.totalSize,sizeFormatted:IS(c.totalSize)}))},logs:{fileCount:i.logs.fileCount,totalSize:i.logs.totalSize,totalSizeFormatted:IS(i.logs.totalSize)},docsPreview:{bundleCount:i.docsPreview.bundleCount,totalSize:i.docsPreview.totalSize,totalSizeFormatted:IS(i.docsPreview.totalSize)},versions:{entryCount:i.versions.entryCount,totalSize:i.versions.totalSize,totalSizeFormatted:IS(i.versions.totalSize),byVersion:Object.entries(i.versions.byVersion).map(([a,c])=>({version:a,size:c.totalSize,sizeFormatted:IS(c.totalSize)}))}}};t.stdout.info(JSON.stringify(s,null,2));return}if(t.stdout.info("Cache Location"),t.stdout.info("=============="),t.stdout.info(`Base: ${n.absoluteFilePath}`),t.stdout.info(`IR: ${n.ir.absoluteFilePath}`),t.stdout.info(`Logs: ${n.logs.absoluteFilePath}`),t.stdout.info(`Docs Preview: ${n.docsPreview.absoluteFilePath}`),t.stdout.info(`Versions: ${n.versions.absoluteFilePath}`),t.stdout.info(""),t.stdout.info("Cache Statistics"),t.stdout.info("================"),i.ir.entryCount===0&&i.logs.fileCount===0&&i.docsPreview.bundleCount===0&&i.versions.entryCount===0){t.stdout.info("Cache is empty");return}if(t.stdout.info(`Total size: ${IS(i.totalSize)}`),t.stdout.info(""),i.ir.entryCount>0){if(t.stdout.info("IR Cache:"),t.stdout.info(` ${i.ir.entryCount} entries (${IS(i.ir.totalSize)})`),Object.keys(i.ir.byVersion).length>0){let s=Object.entries(i.ir.byVersion).sort(([a],[c])=>{let u=parseInt(a.replace("v",""),10);return parseInt(c.replace("v",""),10)-u});for(let[a,c]of s)t.stdout.info(` ${a}: ${c.entryCount} entries (${IS(c.totalSize)})`)}t.stdout.info("")}if(i.logs.fileCount>0&&(t.stdout.info("Logs:"),t.stdout.info(` ${i.logs.fileCount} files (${IS(i.logs.totalSize)})`),t.stdout.info("")),i.docsPreview.bundleCount>0&&(t.stdout.info("Docs Preview:"),t.stdout.info(` ${i.docsPreview.bundleCount} bundles (${IS(i.docsPreview.totalSize)})`),t.stdout.info("")),i.versions.entryCount>0){t.stdout.info("Versions:"),t.stdout.info(` ${i.versions.entryCount} installed (${IS(i.versions.totalSize)})`);let s=Object.entries(i.versions.byVersion).sort(([a],[c])=>c.localeCompare(a));for(let[a,c]of s)t.stdout.info(` ${a}: ${IS(c.totalSize)}`)}}};function Hms(e){let t=new Wms;di(e,"show","Show cache location and statistics",(r,n)=>t.handle(r,n),r=>r.option("json",{type:"boolean",description:"Output in JSON format",default:!1}))}function Kms(e){zA({cli:e,name:"cache",description:"Manage the local cache",subcommands:[Hms,qms]})}Dt();En();function Hdi(){return process.env.CLAUDECODE==="1"||process.env.CLAUDE_CODE_ENTRYPOINT!=null}ct();qI();ai();ct();var Lys={};$(Lys,{additionalProperties:()=>g7h,default:()=>y7h,definitions:()=>A7h,properties:()=>m7h,required:()=>h7h,type:()=>d7h});var d7h="object",m7h={tabs:{oneOf:[{type:"object",additionalProperties:{$ref:"#/definitions/docs.TabConfig"}},{type:"null"}]},"landing-page":{oneOf:[{$ref:"#/definitions/docs.PageConfiguration"},{type:"null"}]},navigation:{$ref:"#/definitions/docs.NavigationConfig"}},h7h=["navigation"],g7h=!1,A7h={"docs.RoleId":{type:"string",description:"ID of role which is used to filter the content shown in Fern Docs."},"docs.Role":{anyOf:[{$ref:"#/definitions/docs.RoleId"},{type:"array",items:{$ref:"#/definitions/docs.RoleId"}}],description:"Audience can either be a string or list of strings\ni.e. `audience: internal` or `audience: [internal, beta]`"},"docs.FeatureFlag":{type:"object",properties:{flag:{type:"string",description:"The name of the feature flag to check."},"fallback-value":{oneOf:[{type:["string","number","boolean","object","array","null"]},{type:"null"}],description:"The default value to use if the feature flag is not set. If not specified, defaults to false."},match:{oneOf:[{type:["string","number","boolean","object","array","null"]},{type:"null"}],description:"The value that the feature flag should match for the content to be shown. If not specified, content is shown when the flag is true."}},required:["flag"],additionalProperties:!1},"docs.FeatureFlagConfiguration":{anyOf:[{type:"string",description:"The name of the feature flag, We assume that it is a boolean feature flag that needs to be evaluated to true."},{$ref:"#/definitions/docs.FeatureFlag",description:"A single feature flag with a configurable name, fallback value, and match value. Especially useful for non boolean feature flags."},{type:"array",items:{$ref:"#/definitions/docs.FeatureFlag"},description:"A list of feature flags. If any of the feature flags are satisfied, we will show all content."}]},"docs.Target":{type:"string",enum:["_blank","_self","_parent","_top"]},"docs.ChangelogFolderRelativePath":{type:"string",description:'The relative path to a folder containing markdown files broken down by date.\n\nExample:\n```\nchangelog: "changelog"\n```\n\nThis will look for markdown files in the `/fern/changelog` directory, which should contain files named like\n- `/fern/changelog/2024-04-29.mdx`.\n- `/fern/changelog/2023-01-02.mdx`.'},"docs.TabConfig":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},"display-name":{type:"string"},icon:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},href:{oneOf:[{type:"string"},{type:"null"}],description:"If `href` is set, clicking on the tab will redirect to the given URL.\n\nTabs with `href` must not have children in the navigation config."},target:{oneOf:[{$ref:"#/definitions/docs.Target"},{type:"null"}]},changelog:{oneOf:[{$ref:"#/definitions/docs.ChangelogFolderRelativePath"},{type:"null"}]},blog:{oneOf:[{$ref:"#/definitions/docs.ChangelogFolderRelativePath"},{type:"null"}]}},required:["display-name"],additionalProperties:!1},"docs.Availability":{type:"string",enum:["stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"]},"docs.PageConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},page:{type:"string"},path:{type:"string"},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},noindex:{oneOf:[{type:"boolean"},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]}},required:["page","path"],additionalProperties:!1},"docs.TabId":{type:"string"},"docs.CollapsedStringValue":{type:"string",enum:["open-by-default"]},"docs.CollapsedValue":{anyOf:[{type:"boolean"},{$ref:"#/definitions/docs.CollapsedStringValue"}]},"docs.SectionConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},section:{type:"string"},path:{oneOf:[{type:"string"},{type:"null"}],description:"The relative path to the markdown file that will be displayed when the section is clicked."},contents:{type:"array",items:{$ref:"#/definitions/docs.NavigationItem"}},collapsed:{oneOf:[{$ref:"#/definitions/docs.CollapsedValue"},{type:"null"}],description:"Deprecated. Use `collapsible` and `collapsed-by-default` instead."},collapsible:{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section can be expanded/collapsed by the user."},"collapsed-by-default":{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section starts collapsed. Only meaningful when `collapsible` is true. Defaults to false (starts open)."},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]}},required:["section","contents"],additionalProperties:!1},"docs.ApiSpecType":{type:"string",enum:["openapi","asyncapi","graphql"]},"docs.ApiSpecErrorResponseSchemaSource":{anyOf:[{type:"string"},{type:"object",additionalProperties:{type:["string","number","boolean","object","array","null"]}}]},"docs.ApiSpecErrorResponseApplyTo":{type:"string",enum:["all","untyped"]},"docs.ApiSpecErrorResponseHttpMethod":{type:"string",enum:["get","post","put","patch","delete","head","options","trace"]},"docs.ApiSpecErrorResponseEnsure":{type:"object",properties:{"status-code":{type:"integer",description:"The 4xx/5xx status code to add when an operation does not declare it."},methods:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiSpecErrorResponseHttpMethod"}},{type:"null"}]}},required:["status-code"],additionalProperties:!1},"docs.ApiSpecErrorResponses":{type:"object",properties:{schema:{$ref:"#/definitions/docs.ApiSpecErrorResponseSchemaSource"},name:{oneOf:[{type:"string"},{type:"null"}]},"apply-to":{oneOf:[{$ref:"#/definitions/docs.ApiSpecErrorResponseApplyTo"},{type:"null"}]},ensure:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiSpecErrorResponseEnsure"}},{type:"null"}]}},required:["schema"],additionalProperties:!1},"docs.ApiSpecImportSettings":{type:"object",properties:{"type-dates-as-strings":{oneOf:[{type:"boolean"},{type:"null"}]},"use-bytes-for-binary-response":{oneOf:[{type:"boolean"},{type:"null"}]},"respect-parameter-content":{oneOf:[{type:"boolean"},{type:"null"}]},"respect-operation-id-word-boundaries":{oneOf:[{type:"boolean"},{type:"null"}]},"infer-forward-compatible":{oneOf:[{type:"boolean"},{type:"null"}]},"preserve-one-of-in-all-of":{oneOf:[{type:"boolean"},{type:"null"}]},"any-of-sibling-properties-as-object":{oneOf:[{type:"boolean"},{type:"null"}]},"error-responses":{oneOf:[{$ref:"#/definitions/docs.ApiSpecErrorResponses"},{type:"null"}]}},additionalProperties:!1,description:"Import settings that affect the API definition rendered by Fern Docs."},"docs.ApiSpecConfiguration":{type:"object",properties:{type:{$ref:"#/definitions/docs.ApiSpecType"},path:{type:"string",description:"Path to the API specification, relative to docs.yml."},namespace:{oneOf:[{type:"string"},{type:"null"}]},overlays:{oneOf:[{type:"string"},{type:"null"}],description:"Path to an OpenAPI Overlay document, relative to docs.yml."},overrides:{oneOf:[{type:"array",items:{type:"string"}},{type:"null"}],description:"Paths to Fern override documents, relative to docs.yml."},settings:{oneOf:[{$ref:"#/definitions/docs.ApiSpecImportSettings"},{type:"null"}],description:"Import settings that affect the rendered API reference."}},required:["type","path"],additionalProperties:!1,description:"A source API specification referenced directly by docs.yml."},"docs.AudienceId":{type:"string",description:"ID of audience which is used to filter the API spec."},"docs.Audience":{anyOf:[{$ref:"#/definitions/docs.AudienceId"},{type:"array",items:{$ref:"#/definitions/docs.AudienceId"}}],description:"Audience can either be a string or list of strings\ni.e. `audiences: internal` or `audiences: [internal, beta]`"},"docs.VersionedSnippetLanguageConfiguration":{type:"object",properties:{version:{type:"string"},package:{type:"string"}},required:["version","package"],additionalProperties:!1},"docs.SnippetLanguageConfiguration":{anyOf:[{type:"string"},{$ref:"#/definitions/docs.VersionedSnippetLanguageConfiguration"}],description:`This snippets config object is meant to allow users to specify a specific package for the snippets,
3922
3922
  and optionally a version for that package. If you pass in a string, that should be the name of the package.`},"docs.SnippetsConfiguration":{type:"object",properties:{python:{oneOf:[{$ref:"#/definitions/docs.SnippetLanguageConfiguration"},{type:"null"}]},typescript:{oneOf:[{$ref:"#/definitions/docs.SnippetLanguageConfiguration"},{type:"null"}]},go:{oneOf:[{$ref:"#/definitions/docs.SnippetLanguageConfiguration"},{type:"null"}]},java:{oneOf:[{$ref:"#/definitions/docs.SnippetLanguageConfiguration"},{type:"null"}]},ruby:{oneOf:[{$ref:"#/definitions/docs.SnippetLanguageConfiguration"},{type:"null"}]},csharp:{oneOf:[{$ref:"#/definitions/docs.SnippetLanguageConfiguration"},{type:"null"}]},php:{oneOf:[{$ref:"#/definitions/docs.SnippetLanguageConfiguration"},{type:"null"}]},swift:{oneOf:[{$ref:"#/definitions/docs.SnippetLanguageConfiguration"},{type:"null"}]},rust:{oneOf:[{$ref:"#/definitions/docs.SnippetLanguageConfiguration"},{type:"null"}]},cli:{oneOf:[{$ref:"#/definitions/docs.SnippetLanguageConfiguration"},{type:"null"}]}},additionalProperties:!1},"docs.PlaygroundButtonSettings":{type:"object",properties:{href:{oneOf:[{type:"string"},{type:"null"}]}},additionalProperties:!1},"docs.PlaygroundSettings":{type:"object",properties:{hidden:{oneOf:[{type:"boolean"},{type:"null"}]},environments:{oneOf:[{type:"array",items:{type:"string"}},{type:"null"}],description:"A list of environment IDs that are allowed to be used in the playground. If not provided, all environments are allowed. And if the provided list is empty, the playground should be disabled."},button:{oneOf:[{$ref:"#/definitions/docs.PlaygroundButtonSettings"},{type:"null"}]},oauth:{oneOf:[{type:"boolean"},{type:"null"}]},"limit-websocket-messages-per-connection":{oneOf:[{type:"integer"},{type:"null"}],description:"The maximum number of websocket messages per connection in the playground."},"send-optional-defaults":{oneOf:[{type:"boolean"},{type:"null"}],description:`When true, optional parameters that declare a default (or x-fern-default) are
3923
- pre-filled and sent from the API Explorer playground. Defaults to false.`}},additionalProperties:!1},"docs.ApiReferencePackageConfigurationWithOptions":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},title:{oneOf:[{type:"string"},{type:"null"}]},summary:{oneOf:[{type:"string"},{type:"null"}],description:"Relative path to the markdown file. This summary is displayed at the top of the API section."},contents:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiReferenceLayoutItem"}},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},playground:{oneOf:[{$ref:"#/definitions/docs.PlaygroundSettings"},{type:"null"}],description:"Settings for the api playground that is applied only to descendants of this api package."}},additionalProperties:!1},"docs.ApiReferencePackageConfiguration":{anyOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiReferenceLayoutItem"}},{$ref:"#/definitions/docs.ApiReferencePackageConfigurationWithOptions"}]},"docs.ApiReferenceSectionConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},section:{type:"string",description:"The title of the api package that will be displayed in the sidebar."},"referenced-packages":{oneOf:[{type:"array",items:{type:"string"}},{type:"null"}],description:"This section will inherit the endpoints from the specified subpackage(s). If multiple packages are specified, they will be merged."},summary:{oneOf:[{type:"string"},{type:"null"}],description:"Relative path to the markdown file."},contents:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiReferenceLayoutItem"}},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},collapsed:{oneOf:[{$ref:"#/definitions/docs.CollapsedValue"},{type:"null"}],description:"Deprecated. Use `collapsible` and `collapsed-by-default` instead."},collapsible:{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section can be expanded/collapsed by the user in the sidebar."},"collapsed-by-default":{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section starts collapsed. Only meaningful when collapsible is true."},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]},playground:{oneOf:[{$ref:"#/definitions/docs.PlaygroundSettings"},{type:"null"}],description:"Settings for the api playground that affects all endpoints."}},required:["section"],additionalProperties:!1},"docs.ApiReferenceEndpointConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},endpoint:{type:"string"},title:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]},playground:{oneOf:[{$ref:"#/definitions/docs.PlaygroundSettings"},{type:"null"}],description:"Settings for the api playground that affect this endpoint specifically."}},required:["endpoint"],additionalProperties:!1},"docs.ApiReferenceOperationConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},operation:{type:"string"},title:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]}},required:["operation"],additionalProperties:!1,description:"Defines a GraphQL-native schema for selecting operations (REST -> Endpoint === GraphQL -> Operation)"},"docs.LinkConfiguration":{type:"object",properties:{link:{type:"string"},href:{type:"string"},icon:{oneOf:[{type:"string"},{type:"null"}]},target:{oneOf:[{$ref:"#/definitions/docs.Target"},{type:"null"}]}},required:["link","href"],additionalProperties:!1},"docs.ApiReferenceLayoutItem":{anyOf:[{type:"string",description:"This should be either an endpoint, websocket, webhook, or subpackage ID"},{type:"object",additionalProperties:{$ref:"#/definitions/docs.ApiReferencePackageConfiguration"},description:"Keyed by subpackage name, this object allows you to group endpoints and pages together."},{$ref:"#/definitions/docs.ApiReferenceSectionConfiguration"},{$ref:"#/definitions/docs.ApiReferenceEndpointConfiguration"},{$ref:"#/definitions/docs.ApiReferenceOperationConfiguration"},{$ref:"#/definitions/docs.PageConfiguration"},{$ref:"#/definitions/docs.LinkConfiguration"}],description:"Use the `layout` object to customize the order that your API endpoints\nare displayed in the docs site."},"docs.SortByAvailabilityValue":{type:"string",enum:["unset","stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"],description:"An availability to sort by, or `unset` for items without an availability."},"docs.ApiReferenceConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},api:{type:"string"},"api-name":{oneOf:[{type:"string"},{type:"null"}],description:"Name of API that we are referencing"},specs:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiSpecConfiguration"}},{type:"null"}],description:"API specifications to load directly. When provided, these take precedence over the API workspace referenced by `api-name`."},openrpc:{oneOf:[{type:"string"},{type:"null"}],description:"Path to an openrpc spec."},audiences:{oneOf:[{$ref:"#/definitions/docs.Audience"},{type:"null"}]},"display-errors":{oneOf:[{type:"boolean"},{type:"null"}],description:"Defaults to false"},"tag-description-pages":{oneOf:[{type:"boolean"},{type:"null"}],description:"If true, a page will be created for each tag in the OpenAPI spec that contains a description."},snippets:{oneOf:[{$ref:"#/definitions/docs.SnippetsConfiguration"},{type:"null"}]},postman:{oneOf:[{type:"string"},{type:"null"}],description:"URL to a Postman collection for this API reference"},summary:{oneOf:[{type:"string"},{type:"null"}],description:"Relative path to the markdown file"},layout:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiReferenceLayoutItem"}},{type:"null"}],description:"Advanced usage: when specified, this object will be used to customize the order that your API endpoints are displayed in the docs site, including subpackages, and additional markdown pages (to be rendered in between API endpoints). If not specified, the order will be inferred from the OpenAPI Spec or Fern Definition."},collapsed:{oneOf:[{$ref:"#/definitions/docs.CollapsedValue"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},alphabetized:{oneOf:[{type:"boolean"},{type:"null"}],description:"If `alphabetized` is set to true, packages and endpoints will be sorted alphabetically, unless explicitly ordered in the `layout` object."},"sort-by-availability":{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.SortByAvailabilityValue"}},{type:"null"}],description:"Sorts packages and endpoints by availability, unless explicitly ordered in the `layout` object.\nListed availabilities come first, in the order provided. Use `unset` for items without an availability.\nUnlisted availabilities follow in the default order:\n`unset`, `generally-available`, `alpha`, `beta`, `preview`, `legacy`, `deprecated`.\n`stable` is treated as `generally-available`, and `in-development` and `pre-release` are treated as `beta`.\nItems with the same availability keep their existing order (alphabetical when `alphabetized` is true)."},flattened:{oneOf:[{type:"boolean"},{type:"null"}],description:"If `flattened` is set to true, the title specified in `api` will be hidden, and its endpoints and subpackages won't be grouped under it.\n\nThis setting is useful if the API reference is short and you want to display all endpoints at the top level."},paginated:{oneOf:[{type:"boolean"},{type:"null"}],description:"If true, the API reference will be paginated rather than displayed in a single page (long-scrolling)."},playground:{oneOf:[{$ref:"#/definitions/docs.PlaygroundSettings"},{type:"null"}],description:"Settings for the api playground that affects all endpoints."}},required:["api"],additionalProperties:!1},"docs.LibraryName":{type:"string",description:"The name identifier for a library. Used to reference the library in navigation."},"docs.LibraryReferenceConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},library:{$ref:"#/definitions/docs.LibraryName",description:"The name of the library to reference (must match a key in the `libraries` section)."},title:{oneOf:[{type:"string"},{type:"null"}],description:"Override the display title for this library reference."},slug:{oneOf:[{type:"string"},{type:"null"}],description:"Override the URL slug for this library reference."}},required:["library"],additionalProperties:!1,description:"References a library defined in the `libraries` section.\nThe library's generated navigation will be injected at this point."},"docs.ChangelogConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},changelog:{$ref:"#/definitions/docs.ChangelogFolderRelativePath"},title:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]}},required:["changelog"],additionalProperties:!1},"docs.BlogConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},blog:{$ref:"#/definitions/docs.ChangelogFolderRelativePath"},title:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]}},required:["blog"],additionalProperties:!1},"docs.TitleSource":{type:"string",enum:["frontmatter","filename"]},"docs.FolderConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},folder:{type:"string",description:"The relative path to a folder containing markdown files. Fern will automatically discover and add all markdown files from this folder to the navigation."},title:{oneOf:[{type:"string"},{type:"null"}],description:"The title to display for this folder section. If not provided, the folder name will be used."},"title-source":{oneOf:[{$ref:"#/definitions/docs.TitleSource"},{type:"null"}],description:"Determines how page titles are derived for files in this folder. Options are `frontmatter` (use the `title` field from the file's frontmatter) or `filename` (derive title from the file name). Defaults to `filename`."},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},collapsed:{oneOf:[{$ref:"#/definitions/docs.CollapsedValue"},{type:"null"}],description:"Deprecated. Use `collapsible` and `collapsed-by-default` instead."},collapsible:{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section can be expanded/collapsed by the user."},"collapsed-by-default":{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section starts collapsed. Only meaningful when `collapsible` is true. Defaults to false (starts open)."},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]}},required:["folder"],additionalProperties:!1},"docs.NavigationItem":{anyOf:[{$ref:"#/definitions/docs.PageConfiguration"},{$ref:"#/definitions/docs.SectionConfiguration"},{$ref:"#/definitions/docs.ApiReferenceConfiguration"},{$ref:"#/definitions/docs.LibraryReferenceConfiguration"},{$ref:"#/definitions/docs.LinkConfiguration"},{$ref:"#/definitions/docs.ChangelogConfiguration"},{$ref:"#/definitions/docs.BlogConfiguration"},{$ref:"#/definitions/docs.FolderConfiguration"}]},"docs.UntabbedNavigationConfig":{type:"array",items:{$ref:"#/definitions/docs.NavigationItem"}},"docs.TabId":{type:"string"},"docs.TabbedNavigationItemWithLayout":{type:"object",properties:{tab:{$ref:"#/definitions/docs.TabId"},layout:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.NavigationItem"}},{type:"null"}],description:"If `href` is set, `layout` must be null."}},required:["tab"],additionalProperties:!1},"docs.TabVariant":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},title:{type:"string"},subtitle:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},layout:{type:"array",items:{$ref:"#/definitions/docs.NavigationItem"}},slug:{oneOf:[{type:"string"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},default:{oneOf:[{type:"boolean"},{type:"null"}]}},required:["title","layout"],additionalProperties:!1},"docs.TabbedNavigationItemWithVariants":{type:"object",properties:{tab:{$ref:"#/definitions/docs.TabId"},variants:{type:"array",items:{$ref:"#/definitions/docs.TabVariant"}}},required:["tab","variants"],additionalProperties:!1},"docs.TabbedNavigationItem":{anyOf:[{$ref:"#/definitions/docs.TabbedNavigationItemWithLayout"},{$ref:"#/definitions/docs.TabbedNavigationItemWithVariants"}]},"docs.TabbedNavigationConfig":{type:"array",items:{$ref:"#/definitions/docs.TabbedNavigationItem"}},"docs.NavigationConfig":{anyOf:[{$ref:"#/definitions/docs.UntabbedNavigationConfig"},{$ref:"#/definitions/docs.TabbedNavigationConfig"}]}},y7h={type:d7h,properties:m7h,required:h7h,additionalProperties:g7h,definitions:A7h};async function zwt({value:e}){let t=NV(e,Lys);if(t.success){let i=$P(e,[],[]);return{type:"success",contents:Ka.RawSchemas.Serializer.VersionFileConfig.parseOrThrow(i)}}let r=t.error?.instancePath?` at ${t?.error.instancePath}`:"";return{type:"failure",message:`${t.error?.message??"Failed to parse because JSON schema validation failed"}${r}`}}ct();tr();var Gys=require("fs/promises");cs();var Xjl=require("fs/promises"),b7h=2e3,Yjl=3,Uhi=class{visitedPaths=new Set;timings=[];startedAt=performance.now();async readFirstVisit(t){if(this.visitedPaths.has(t))return;this.visitedPaths.add(t);let r=performance.now(),n=await(0,Xjl.readFile)(t,"utf8");return this.timings.push({path:t,durationMs:performance.now()-r,bytes:Buffer.byteLength(n,"utf8")}),n}logSummary(t,r){if(this.timings.length===0)return;let n=[...this.timings].sort((u,l)=>u.durationMs-l.durationMs),i=Math.floor(n.length/2),o=n.length%2===0?((n[i-1]?.durationMs??0)+(n[i]?.durationMs??0))/2:n[i]?.durationMs??0,s=this.timings.reduce((u,l)=>u+l.bytes,0),a=performance.now()-this.startedAt;t.debug(`Read ${this.timings.length} ${r} files (${(s/(1024*1024)).toFixed(2)} MB) in ${a.toFixed(0)}ms; median per-file wait ${o.toFixed(0)}ms`);let c=Math.max(b7h,o*Yjl);for(let u of n)u.durationMs>c&&t.debug(`Slow file read: ${u.path} took ${u.durationMs.toFixed(0)}ms (${Yjl}x+ the median of ${o.toFixed(0)}ms)`)}};ai();ct();var _ys={};$(_ys,{additionalProperties:()=>C7h,default:()=>S7h,definitions:()=>x7h,properties:()=>I7h,required:()=>v7h,type:()=>E7h});var E7h="object",I7h={tabs:{oneOf:[{type:"object",additionalProperties:{$ref:"#/definitions/docs.TabConfig"}},{type:"null"}]},"landing-page":{oneOf:[{$ref:"#/definitions/docs.PageConfiguration"},{type:"null"}]},navigation:{$ref:"#/definitions/docs.NavigationConfig"}},v7h=["navigation"],C7h=!1,x7h={"docs.RoleId":{type:"string",description:"ID of role which is used to filter the content shown in Fern Docs."},"docs.Role":{anyOf:[{$ref:"#/definitions/docs.RoleId"},{type:"array",items:{$ref:"#/definitions/docs.RoleId"}}],description:"Audience can either be a string or list of strings\ni.e. `audience: internal` or `audience: [internal, beta]`"},"docs.FeatureFlag":{type:"object",properties:{flag:{type:"string",description:"The name of the feature flag to check."},"fallback-value":{oneOf:[{type:["string","number","boolean","object","array","null"]},{type:"null"}],description:"The default value to use if the feature flag is not set. If not specified, defaults to false."},match:{oneOf:[{type:["string","number","boolean","object","array","null"]},{type:"null"}],description:"The value that the feature flag should match for the content to be shown. If not specified, content is shown when the flag is true."}},required:["flag"],additionalProperties:!1},"docs.FeatureFlagConfiguration":{anyOf:[{type:"string",description:"The name of the feature flag, We assume that it is a boolean feature flag that needs to be evaluated to true."},{$ref:"#/definitions/docs.FeatureFlag",description:"A single feature flag with a configurable name, fallback value, and match value. Especially useful for non boolean feature flags."},{type:"array",items:{$ref:"#/definitions/docs.FeatureFlag"},description:"A list of feature flags. If any of the feature flags are satisfied, we will show all content."}]},"docs.Target":{type:"string",enum:["_blank","_self","_parent","_top"]},"docs.ChangelogFolderRelativePath":{type:"string",description:'The relative path to a folder containing markdown files broken down by date.\n\nExample:\n```\nchangelog: "changelog"\n```\n\nThis will look for markdown files in the `/fern/changelog` directory, which should contain files named like\n- `/fern/changelog/2024-04-29.mdx`.\n- `/fern/changelog/2023-01-02.mdx`.'},"docs.TabConfig":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},"display-name":{type:"string"},icon:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},href:{oneOf:[{type:"string"},{type:"null"}],description:"If `href` is set, clicking on the tab will redirect to the given URL.\n\nTabs with `href` must not have children in the navigation config."},target:{oneOf:[{$ref:"#/definitions/docs.Target"},{type:"null"}]},changelog:{oneOf:[{$ref:"#/definitions/docs.ChangelogFolderRelativePath"},{type:"null"}]},blog:{oneOf:[{$ref:"#/definitions/docs.ChangelogFolderRelativePath"},{type:"null"}]}},required:["display-name"],additionalProperties:!1},"docs.Availability":{type:"string",enum:["stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"]},"docs.PageConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},page:{type:"string"},path:{type:"string"},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},noindex:{oneOf:[{type:"boolean"},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]}},required:["page","path"],additionalProperties:!1},"docs.CollapsedStringValue":{type:"string",enum:["open-by-default"]},"docs.CollapsedValue":{anyOf:[{type:"boolean"},{$ref:"#/definitions/docs.CollapsedStringValue"}]},"docs.SectionConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},section:{type:"string"},path:{oneOf:[{type:"string"},{type:"null"}],description:"The relative path to the markdown file that will be displayed when the section is clicked."},contents:{type:"array",items:{$ref:"#/definitions/docs.NavigationItem"}},collapsed:{oneOf:[{$ref:"#/definitions/docs.CollapsedValue"},{type:"null"}],description:"Deprecated. Use `collapsible` and `collapsed-by-default` instead."},collapsible:{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section can be expanded/collapsed by the user."},"collapsed-by-default":{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section starts collapsed. Only meaningful when `collapsible` is true. Defaults to false (starts open)."},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]}},required:["section","contents"],additionalProperties:!1},"docs.ApiSpecType":{type:"string",enum:["openapi","asyncapi","graphql"]},"docs.ApiSpecErrorResponseSchemaSource":{anyOf:[{type:"string"},{type:"object",additionalProperties:{type:["string","number","boolean","object","array","null"]}}]},"docs.ApiSpecErrorResponseApplyTo":{type:"string",enum:["all","untyped"]},"docs.ApiSpecErrorResponseHttpMethod":{type:"string",enum:["get","post","put","patch","delete","head","options","trace"]},"docs.ApiSpecErrorResponseEnsure":{type:"object",properties:{"status-code":{type:"integer",description:"The 4xx/5xx status code to add when an operation does not declare it."},methods:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiSpecErrorResponseHttpMethod"}},{type:"null"}]}},required:["status-code"],additionalProperties:!1},"docs.ApiSpecErrorResponses":{type:"object",properties:{schema:{$ref:"#/definitions/docs.ApiSpecErrorResponseSchemaSource"},name:{oneOf:[{type:"string"},{type:"null"}]},"apply-to":{oneOf:[{$ref:"#/definitions/docs.ApiSpecErrorResponseApplyTo"},{type:"null"}]},ensure:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiSpecErrorResponseEnsure"}},{type:"null"}]}},required:["schema"],additionalProperties:!1},"docs.ApiSpecImportSettings":{type:"object",properties:{"type-dates-as-strings":{oneOf:[{type:"boolean"},{type:"null"}]},"use-bytes-for-binary-response":{oneOf:[{type:"boolean"},{type:"null"}]},"respect-parameter-content":{oneOf:[{type:"boolean"},{type:"null"}]},"respect-operation-id-word-boundaries":{oneOf:[{type:"boolean"},{type:"null"}]},"infer-forward-compatible":{oneOf:[{type:"boolean"},{type:"null"}]},"preserve-one-of-in-all-of":{oneOf:[{type:"boolean"},{type:"null"}]},"any-of-sibling-properties-as-object":{oneOf:[{type:"boolean"},{type:"null"}]},"error-responses":{oneOf:[{$ref:"#/definitions/docs.ApiSpecErrorResponses"},{type:"null"}]}},additionalProperties:!1,description:"Import settings that affect the API definition rendered by Fern Docs."},"docs.ApiSpecConfiguration":{type:"object",properties:{type:{$ref:"#/definitions/docs.ApiSpecType"},path:{type:"string",description:"Path to the API specification, relative to docs.yml."},namespace:{oneOf:[{type:"string"},{type:"null"}]},overlays:{oneOf:[{type:"string"},{type:"null"}],description:"Path to an OpenAPI Overlay document, relative to docs.yml."},overrides:{oneOf:[{type:"array",items:{type:"string"}},{type:"null"}],description:"Paths to Fern override documents, relative to docs.yml."},settings:{oneOf:[{$ref:"#/definitions/docs.ApiSpecImportSettings"},{type:"null"}],description:"Import settings that affect the rendered API reference."}},required:["type","path"],additionalProperties:!1,description:"A source API specification referenced directly by docs.yml."},"docs.AudienceId":{type:"string",description:"ID of audience which is used to filter the API spec."},"docs.Audience":{anyOf:[{$ref:"#/definitions/docs.AudienceId"},{type:"array",items:{$ref:"#/definitions/docs.AudienceId"}}],description:"Audience can either be a string or list of strings\ni.e. `audiences: internal` or `audiences: [internal, beta]`"},"docs.VersionedSnippetLanguageConfiguration":{type:"object",properties:{version:{type:"string"},package:{type:"string"}},required:["version","package"],additionalProperties:!1},"docs.SnippetLanguageConfiguration":{anyOf:[{type:"string"},{$ref:"#/definitions/docs.VersionedSnippetLanguageConfiguration"}],description:`This snippets config object is meant to allow users to specify a specific package for the snippets,
3923
+ pre-filled and sent from the API Explorer playground. Defaults to false.`}},additionalProperties:!1},"docs.ApiReferencePackageConfigurationWithOptions":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},title:{oneOf:[{type:"string"},{type:"null"}]},summary:{oneOf:[{type:"string"},{type:"null"}],description:"Relative path to the markdown file. This summary is displayed at the top of the API section."},contents:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiReferenceLayoutItem"}},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},playground:{oneOf:[{$ref:"#/definitions/docs.PlaygroundSettings"},{type:"null"}],description:"Settings for the api playground that is applied only to descendants of this api package."}},additionalProperties:!1},"docs.ApiReferencePackageConfiguration":{anyOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiReferenceLayoutItem"}},{$ref:"#/definitions/docs.ApiReferencePackageConfigurationWithOptions"}]},"docs.ApiReferenceSectionConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},section:{type:"string",description:"The title of the api package that will be displayed in the sidebar."},"referenced-packages":{oneOf:[{type:"array",items:{type:"string"}},{type:"null"}],description:"This section will inherit the endpoints from the specified subpackage(s). If multiple packages are specified, they will be merged."},summary:{oneOf:[{type:"string"},{type:"null"}],description:"Relative path to the markdown file."},contents:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiReferenceLayoutItem"}},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},collapsed:{oneOf:[{$ref:"#/definitions/docs.CollapsedValue"},{type:"null"}],description:"Deprecated. Use `collapsible` and `collapsed-by-default` instead."},collapsible:{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section can be expanded/collapsed by the user in the sidebar."},"collapsed-by-default":{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section starts collapsed. Only meaningful when collapsible is true."},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]},playground:{oneOf:[{$ref:"#/definitions/docs.PlaygroundSettings"},{type:"null"}],description:"Settings for the api playground that affects all endpoints."}},required:["section"],additionalProperties:!1},"docs.ApiReferenceEndpointConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},endpoint:{type:"string"},title:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]},playground:{oneOf:[{$ref:"#/definitions/docs.PlaygroundSettings"},{type:"null"}],description:"Settings for the api playground that affect this endpoint specifically."}},required:["endpoint"],additionalProperties:!1},"docs.ApiReferenceOperationConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},operation:{type:"string"},title:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]}},required:["operation"],additionalProperties:!1,description:"Defines a GraphQL-native schema for selecting operations (REST -> Endpoint === GraphQL -> Operation)"},"docs.LinkConfiguration":{type:"object",properties:{link:{type:"string"},href:{type:"string"},icon:{oneOf:[{type:"string"},{type:"null"}]},target:{oneOf:[{$ref:"#/definitions/docs.Target"},{type:"null"}]}},required:["link","href"],additionalProperties:!1},"docs.ApiReferenceLayoutItem":{anyOf:[{type:"string",description:"This should be either an endpoint, websocket, webhook, or subpackage ID"},{type:"object",additionalProperties:{$ref:"#/definitions/docs.ApiReferencePackageConfiguration"},description:"Keyed by subpackage name, this object allows you to group endpoints and pages together."},{$ref:"#/definitions/docs.ApiReferenceSectionConfiguration"},{$ref:"#/definitions/docs.ApiReferenceEndpointConfiguration"},{$ref:"#/definitions/docs.ApiReferenceOperationConfiguration"},{$ref:"#/definitions/docs.PageConfiguration"},{$ref:"#/definitions/docs.LinkConfiguration"}],description:"Use the `layout` object to customize the order that your API endpoints\nare displayed in the docs site."},"docs.SortByAvailabilityValue":{type:"string",enum:["unset","stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"],description:"An availability to sort by, or `unset` for items without an availability."},"docs.ApiReferenceConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},api:{type:"string"},"api-name":{oneOf:[{type:"string"},{type:"null"}],description:"Name of API that we are referencing"},specs:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiSpecConfiguration"}},{type:"null"}],description:"API specifications to load directly. When provided, these take precedence over the API workspace referenced by `api-name`."},openrpc:{oneOf:[{type:"string"},{type:"null"}],description:"Path to an openrpc spec."},audiences:{oneOf:[{$ref:"#/definitions/docs.Audience"},{type:"null"}]},"display-errors":{oneOf:[{type:"boolean"},{type:"null"}],description:"Defaults to false"},"tag-description-pages":{oneOf:[{type:"boolean"},{type:"null"}],description:"If true, a page will be created for each tag in the OpenAPI spec that contains a description."},snippets:{oneOf:[{$ref:"#/definitions/docs.SnippetsConfiguration"},{type:"null"}]},postman:{oneOf:[{type:"string"},{type:"null"}],description:"URL to a Postman collection for this API reference"},summary:{oneOf:[{type:"string"},{type:"null"}],description:"Relative path to the markdown file"},layout:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiReferenceLayoutItem"}},{type:"null"}],description:"Advanced usage: when specified, this object will be used to customize the order that your API endpoints are displayed in the docs site, including subpackages, and additional markdown pages (to be rendered in between API endpoints). If not specified, the order will be inferred from the OpenAPI Spec or Fern Definition."},collapsed:{oneOf:[{$ref:"#/definitions/docs.CollapsedValue"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},alphabetized:{oneOf:[{type:"boolean"},{type:"null"}],description:"If `alphabetized` is set to true, packages and endpoints will be sorted alphabetically, unless explicitly ordered in the `layout` object."},"sort-by-availability":{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.SortByAvailabilityValue"}},{type:"null"}],description:"Sorts packages and endpoints by availability, unless explicitly ordered in the `layout` object.\nListed availabilities come first, in the order provided. Use `unset` for items without an availability.\nUnlisted availabilities follow in the default order:\n`unset`, `generally-available`, `alpha`, `beta`, `preview`, `legacy`, `deprecated`.\n`stable` is treated as `generally-available`, and `in-development` and `pre-release` are treated as `beta`.\nItems with the same availability keep their existing order (alphabetical when `alphabetized` is true)."},flattened:{oneOf:[{type:"boolean"},{type:"null"}],description:"If `flattened` is set to true, the title specified in `api` will be hidden, and its endpoints and subpackages won't be grouped under it.\n\nThis setting is useful if the API reference is short and you want to display all endpoints at the top level."},paginated:{oneOf:[{type:"boolean"},{type:"null"}],description:"If true, the API reference will be paginated rather than displayed in a single page (long-scrolling)."},playground:{oneOf:[{$ref:"#/definitions/docs.PlaygroundSettings"},{type:"null"}],description:"Settings for the api playground that affects all endpoints."}},required:["api"],additionalProperties:!1},"docs.LibraryName":{type:"string",description:"The name identifier for a library. Used to reference the library in navigation."},"docs.LibraryReferenceConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},library:{$ref:"#/definitions/docs.LibraryName",description:"The name of the library to reference (must match a key in the `libraries` section)."},title:{oneOf:[{type:"string"},{type:"null"}],description:"Override the display title for this library reference."},slug:{oneOf:[{type:"string"},{type:"null"}],description:"Override the URL slug for this library reference."}},required:["library"],additionalProperties:!1,description:"References a library defined in the `libraries` section.\nThe library's generated navigation will be injected at this point."},"docs.ChangelogConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},changelog:{$ref:"#/definitions/docs.ChangelogFolderRelativePath"},title:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]}},required:["changelog"],additionalProperties:!1},"docs.BlogConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},blog:{$ref:"#/definitions/docs.ChangelogFolderRelativePath"},title:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]}},required:["blog"],additionalProperties:!1},"docs.TitleSource":{type:"string",enum:["frontmatter","filename"]},"docs.FolderConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},folder:{type:"string",description:"The relative path to a folder containing markdown files. Fern will automatically discover and add all markdown files from this folder to the navigation."},title:{oneOf:[{type:"string"},{type:"null"}],description:"The title to display for this folder section. If not provided, the folder name will be used."},"title-source":{oneOf:[{$ref:"#/definitions/docs.TitleSource"},{type:"null"}],description:"Determines how page titles are derived for files in this folder. Options are `frontmatter` (use the `title` field from the file's frontmatter) or `filename` (derive title from the file name). Defaults to `filename`."},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},collapsed:{oneOf:[{$ref:"#/definitions/docs.CollapsedValue"},{type:"null"}],description:"Deprecated. Use `collapsible` and `collapsed-by-default` instead."},collapsible:{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section can be expanded/collapsed by the user."},"collapsed-by-default":{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section starts collapsed. Only meaningful when `collapsible` is true. Defaults to false (starts open)."},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]}},required:["folder"],additionalProperties:!1},"docs.NavigationItem":{anyOf:[{$ref:"#/definitions/docs.PageConfiguration"},{$ref:"#/definitions/docs.SectionConfiguration"},{$ref:"#/definitions/docs.ApiReferenceConfiguration"},{$ref:"#/definitions/docs.LibraryReferenceConfiguration"},{$ref:"#/definitions/docs.LinkConfiguration"},{$ref:"#/definitions/docs.ChangelogConfiguration"},{$ref:"#/definitions/docs.BlogConfiguration"},{$ref:"#/definitions/docs.FolderConfiguration"}]},"docs.TabbedNavigationItemWithLayout":{type:"object",properties:{tab:{$ref:"#/definitions/docs.TabId"},layout:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.NavigationItem"}},{type:"null"}],description:"If `href` is set, `layout` must be null."}},required:["tab"],additionalProperties:!1},"docs.TabVariant":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},title:{type:"string"},subtitle:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},layout:{type:"array",items:{$ref:"#/definitions/docs.NavigationItem"}},slug:{oneOf:[{type:"string"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},default:{oneOf:[{type:"boolean"},{type:"null"}]}},required:["title","layout"],additionalProperties:!1},"docs.TabbedNavigationItemWithVariants":{type:"object",properties:{tab:{$ref:"#/definitions/docs.TabId"},variants:{type:"array",items:{$ref:"#/definitions/docs.TabVariant"}}},required:["tab","variants"],additionalProperties:!1},"docs.TabbedNavigationItem":{anyOf:[{$ref:"#/definitions/docs.TabbedNavigationItemWithLayout"},{$ref:"#/definitions/docs.TabbedNavigationItemWithVariants"}]},"docs.TabbedNavigationConfig":{type:"array",items:{$ref:"#/definitions/docs.TabbedNavigationItem"}},"docs.UntabbedNavigationConfig":{type:"array",items:{$ref:"#/definitions/docs.NavigationItem"}},"docs.NavigationConfig":{anyOf:[{$ref:"#/definitions/docs.TabbedNavigationConfig"},{$ref:"#/definitions/docs.UntabbedNavigationConfig"}]}},y7h={type:d7h,properties:m7h,required:h7h,additionalProperties:g7h,definitions:A7h};async function zwt({value:e}){let t=NV(e,Lys);if(t.success){let i=$P(e,[],[]);return{type:"success",contents:Ka.RawSchemas.Serializer.VersionFileConfig.parseOrThrow(i)}}let r=t.error?.instancePath?` at ${t?.error.instancePath}`:"";return{type:"failure",message:`${t.error?.message??"Failed to parse because JSON schema validation failed"}${r}`}}ct();tr();var Gys=require("fs/promises");cs();var Xjl=require("fs/promises"),b7h=2e3,Yjl=3,Uhi=class{visitedPaths=new Set;timings=[];startedAt=performance.now();async readFirstVisit(t){if(this.visitedPaths.has(t))return;this.visitedPaths.add(t);let r=performance.now(),n=await(0,Xjl.readFile)(t,"utf8");return this.timings.push({path:t,durationMs:performance.now()-r,bytes:Buffer.byteLength(n,"utf8")}),n}logSummary(t,r){if(this.timings.length===0)return;let n=[...this.timings].sort((u,l)=>u.durationMs-l.durationMs),i=Math.floor(n.length/2),o=n.length%2===0?((n[i-1]?.durationMs??0)+(n[i]?.durationMs??0))/2:n[i]?.durationMs??0,s=this.timings.reduce((u,l)=>u+l.bytes,0),a=performance.now()-this.startedAt;t.debug(`Read ${this.timings.length} ${r} files (${(s/(1024*1024)).toFixed(2)} MB) in ${a.toFixed(0)}ms; median per-file wait ${o.toFixed(0)}ms`);let c=Math.max(b7h,o*Yjl);for(let u of n)u.durationMs>c&&t.debug(`Slow file read: ${u.path} took ${u.durationMs.toFixed(0)}ms (${Yjl}x+ the median of ${o.toFixed(0)}ms)`)}};ai();ct();var _ys={};$(_ys,{additionalProperties:()=>C7h,default:()=>S7h,definitions:()=>x7h,properties:()=>I7h,required:()=>v7h,type:()=>E7h});var E7h="object",I7h={tabs:{oneOf:[{type:"object",additionalProperties:{$ref:"#/definitions/docs.TabConfig"}},{type:"null"}]},"landing-page":{oneOf:[{$ref:"#/definitions/docs.PageConfiguration"},{type:"null"}]},navigation:{$ref:"#/definitions/docs.NavigationConfig"}},v7h=["navigation"],C7h=!1,x7h={"docs.RoleId":{type:"string",description:"ID of role which is used to filter the content shown in Fern Docs."},"docs.Role":{anyOf:[{$ref:"#/definitions/docs.RoleId"},{type:"array",items:{$ref:"#/definitions/docs.RoleId"}}],description:"Audience can either be a string or list of strings\ni.e. `audience: internal` or `audience: [internal, beta]`"},"docs.FeatureFlag":{type:"object",properties:{flag:{type:"string",description:"The name of the feature flag to check."},"fallback-value":{oneOf:[{type:["string","number","boolean","object","array","null"]},{type:"null"}],description:"The default value to use if the feature flag is not set. If not specified, defaults to false."},match:{oneOf:[{type:["string","number","boolean","object","array","null"]},{type:"null"}],description:"The value that the feature flag should match for the content to be shown. If not specified, content is shown when the flag is true."}},required:["flag"],additionalProperties:!1},"docs.FeatureFlagConfiguration":{anyOf:[{type:"string",description:"The name of the feature flag, We assume that it is a boolean feature flag that needs to be evaluated to true."},{$ref:"#/definitions/docs.FeatureFlag",description:"A single feature flag with a configurable name, fallback value, and match value. Especially useful for non boolean feature flags."},{type:"array",items:{$ref:"#/definitions/docs.FeatureFlag"},description:"A list of feature flags. If any of the feature flags are satisfied, we will show all content."}]},"docs.Target":{type:"string",enum:["_blank","_self","_parent","_top"]},"docs.ChangelogFolderRelativePath":{type:"string",description:'The relative path to a folder containing markdown files broken down by date.\n\nExample:\n```\nchangelog: "changelog"\n```\n\nThis will look for markdown files in the `/fern/changelog` directory, which should contain files named like\n- `/fern/changelog/2024-04-29.mdx`.\n- `/fern/changelog/2023-01-02.mdx`.'},"docs.TabConfig":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},"display-name":{type:"string"},icon:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},href:{oneOf:[{type:"string"},{type:"null"}],description:"If `href` is set, clicking on the tab will redirect to the given URL.\n\nTabs with `href` must not have children in the navigation config."},target:{oneOf:[{$ref:"#/definitions/docs.Target"},{type:"null"}]},changelog:{oneOf:[{$ref:"#/definitions/docs.ChangelogFolderRelativePath"},{type:"null"}]},blog:{oneOf:[{$ref:"#/definitions/docs.ChangelogFolderRelativePath"},{type:"null"}]}},required:["display-name"],additionalProperties:!1},"docs.Availability":{type:"string",enum:["stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"]},"docs.PageConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},page:{type:"string"},path:{type:"string"},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},noindex:{oneOf:[{type:"boolean"},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]}},required:["page","path"],additionalProperties:!1},"docs.TabId":{type:"string"},"docs.CollapsedStringValue":{type:"string",enum:["open-by-default"]},"docs.CollapsedValue":{anyOf:[{type:"boolean"},{$ref:"#/definitions/docs.CollapsedStringValue"}]},"docs.SectionConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},section:{type:"string"},path:{oneOf:[{type:"string"},{type:"null"}],description:"The relative path to the markdown file that will be displayed when the section is clicked."},contents:{type:"array",items:{$ref:"#/definitions/docs.NavigationItem"}},collapsed:{oneOf:[{$ref:"#/definitions/docs.CollapsedValue"},{type:"null"}],description:"Deprecated. Use `collapsible` and `collapsed-by-default` instead."},collapsible:{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section can be expanded/collapsed by the user."},"collapsed-by-default":{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section starts collapsed. Only meaningful when `collapsible` is true. Defaults to false (starts open)."},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]}},required:["section","contents"],additionalProperties:!1},"docs.ApiSpecType":{type:"string",enum:["openapi","asyncapi","graphql"]},"docs.ApiSpecErrorResponseSchemaSource":{anyOf:[{type:"string"},{type:"object",additionalProperties:{type:["string","number","boolean","object","array","null"]}}]},"docs.ApiSpecErrorResponseApplyTo":{type:"string",enum:["all","untyped"]},"docs.ApiSpecErrorResponseHttpMethod":{type:"string",enum:["get","post","put","patch","delete","head","options","trace"]},"docs.ApiSpecErrorResponseEnsure":{type:"object",properties:{"status-code":{type:"integer",description:"The 4xx/5xx status code to add when an operation does not declare it."},methods:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiSpecErrorResponseHttpMethod"}},{type:"null"}]}},required:["status-code"],additionalProperties:!1},"docs.ApiSpecErrorResponses":{type:"object",properties:{schema:{$ref:"#/definitions/docs.ApiSpecErrorResponseSchemaSource"},name:{oneOf:[{type:"string"},{type:"null"}]},"apply-to":{oneOf:[{$ref:"#/definitions/docs.ApiSpecErrorResponseApplyTo"},{type:"null"}]},ensure:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiSpecErrorResponseEnsure"}},{type:"null"}]}},required:["schema"],additionalProperties:!1},"docs.ApiSpecImportSettings":{type:"object",properties:{"type-dates-as-strings":{oneOf:[{type:"boolean"},{type:"null"}]},"use-bytes-for-binary-response":{oneOf:[{type:"boolean"},{type:"null"}]},"respect-parameter-content":{oneOf:[{type:"boolean"},{type:"null"}]},"respect-operation-id-word-boundaries":{oneOf:[{type:"boolean"},{type:"null"}]},"infer-forward-compatible":{oneOf:[{type:"boolean"},{type:"null"}]},"preserve-one-of-in-all-of":{oneOf:[{type:"boolean"},{type:"null"}]},"any-of-sibling-properties-as-object":{oneOf:[{type:"boolean"},{type:"null"}]},"error-responses":{oneOf:[{$ref:"#/definitions/docs.ApiSpecErrorResponses"},{type:"null"}]}},additionalProperties:!1,description:"Import settings that affect the API definition rendered by Fern Docs."},"docs.ApiSpecConfiguration":{type:"object",properties:{type:{$ref:"#/definitions/docs.ApiSpecType"},path:{type:"string",description:"Path to the API specification, relative to docs.yml."},namespace:{oneOf:[{type:"string"},{type:"null"}]},overlays:{oneOf:[{type:"string"},{type:"null"}],description:"Path to an OpenAPI Overlay document, relative to docs.yml."},overrides:{oneOf:[{type:"array",items:{type:"string"}},{type:"null"}],description:"Paths to Fern override documents, relative to docs.yml."},settings:{oneOf:[{$ref:"#/definitions/docs.ApiSpecImportSettings"},{type:"null"}],description:"Import settings that affect the rendered API reference."}},required:["type","path"],additionalProperties:!1,description:"A source API specification referenced directly by docs.yml."},"docs.AudienceId":{type:"string",description:"ID of audience which is used to filter the API spec."},"docs.Audience":{anyOf:[{$ref:"#/definitions/docs.AudienceId"},{type:"array",items:{$ref:"#/definitions/docs.AudienceId"}}],description:"Audience can either be a string or list of strings\ni.e. `audiences: internal` or `audiences: [internal, beta]`"},"docs.VersionedSnippetLanguageConfiguration":{type:"object",properties:{version:{type:"string"},package:{type:"string"}},required:["version","package"],additionalProperties:!1},"docs.SnippetLanguageConfiguration":{anyOf:[{type:"string"},{$ref:"#/definitions/docs.VersionedSnippetLanguageConfiguration"}],description:`This snippets config object is meant to allow users to specify a specific package for the snippets,
3924
3924
  and optionally a version for that package. If you pass in a string, that should be the name of the package.`},"docs.SnippetsConfiguration":{type:"object",properties:{python:{oneOf:[{$ref:"#/definitions/docs.SnippetLanguageConfiguration"},{type:"null"}]},typescript:{oneOf:[{$ref:"#/definitions/docs.SnippetLanguageConfiguration"},{type:"null"}]},go:{oneOf:[{$ref:"#/definitions/docs.SnippetLanguageConfiguration"},{type:"null"}]},java:{oneOf:[{$ref:"#/definitions/docs.SnippetLanguageConfiguration"},{type:"null"}]},ruby:{oneOf:[{$ref:"#/definitions/docs.SnippetLanguageConfiguration"},{type:"null"}]},csharp:{oneOf:[{$ref:"#/definitions/docs.SnippetLanguageConfiguration"},{type:"null"}]},php:{oneOf:[{$ref:"#/definitions/docs.SnippetLanguageConfiguration"},{type:"null"}]},swift:{oneOf:[{$ref:"#/definitions/docs.SnippetLanguageConfiguration"},{type:"null"}]},rust:{oneOf:[{$ref:"#/definitions/docs.SnippetLanguageConfiguration"},{type:"null"}]},cli:{oneOf:[{$ref:"#/definitions/docs.SnippetLanguageConfiguration"},{type:"null"}]}},additionalProperties:!1},"docs.PlaygroundButtonSettings":{type:"object",properties:{href:{oneOf:[{type:"string"},{type:"null"}]}},additionalProperties:!1},"docs.PlaygroundSettings":{type:"object",properties:{hidden:{oneOf:[{type:"boolean"},{type:"null"}]},environments:{oneOf:[{type:"array",items:{type:"string"}},{type:"null"}],description:"A list of environment IDs that are allowed to be used in the playground. If not provided, all environments are allowed. And if the provided list is empty, the playground should be disabled."},button:{oneOf:[{$ref:"#/definitions/docs.PlaygroundButtonSettings"},{type:"null"}]},oauth:{oneOf:[{type:"boolean"},{type:"null"}]},"limit-websocket-messages-per-connection":{oneOf:[{type:"integer"},{type:"null"}],description:"The maximum number of websocket messages per connection in the playground."},"send-optional-defaults":{oneOf:[{type:"boolean"},{type:"null"}],description:`When true, optional parameters that declare a default (or x-fern-default) are
3925
- pre-filled and sent from the API Explorer playground. Defaults to false.`}},additionalProperties:!1},"docs.ApiReferencePackageConfigurationWithOptions":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},title:{oneOf:[{type:"string"},{type:"null"}]},summary:{oneOf:[{type:"string"},{type:"null"}],description:"Relative path to the markdown file. This summary is displayed at the top of the API section."},contents:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiReferenceLayoutItem"}},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},playground:{oneOf:[{$ref:"#/definitions/docs.PlaygroundSettings"},{type:"null"}],description:"Settings for the api playground that is applied only to descendants of this api package."}},additionalProperties:!1},"docs.ApiReferencePackageConfiguration":{anyOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiReferenceLayoutItem"}},{$ref:"#/definitions/docs.ApiReferencePackageConfigurationWithOptions"}]},"docs.ApiReferenceSectionConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},section:{type:"string",description:"The title of the api package that will be displayed in the sidebar."},"referenced-packages":{oneOf:[{type:"array",items:{type:"string"}},{type:"null"}],description:"This section will inherit the endpoints from the specified subpackage(s). If multiple packages are specified, they will be merged."},summary:{oneOf:[{type:"string"},{type:"null"}],description:"Relative path to the markdown file."},contents:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiReferenceLayoutItem"}},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},collapsed:{oneOf:[{$ref:"#/definitions/docs.CollapsedValue"},{type:"null"}],description:"Deprecated. Use `collapsible` and `collapsed-by-default` instead."},collapsible:{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section can be expanded/collapsed by the user in the sidebar."},"collapsed-by-default":{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section starts collapsed. Only meaningful when collapsible is true."},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]},playground:{oneOf:[{$ref:"#/definitions/docs.PlaygroundSettings"},{type:"null"}],description:"Settings for the api playground that affects all endpoints."}},required:["section"],additionalProperties:!1},"docs.ApiReferenceEndpointConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},endpoint:{type:"string"},title:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]},playground:{oneOf:[{$ref:"#/definitions/docs.PlaygroundSettings"},{type:"null"}],description:"Settings for the api playground that affect this endpoint specifically."}},required:["endpoint"],additionalProperties:!1},"docs.ApiReferenceOperationConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},operation:{type:"string"},title:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]}},required:["operation"],additionalProperties:!1,description:"Defines a GraphQL-native schema for selecting operations (REST -> Endpoint === GraphQL -> Operation)"},"docs.LinkConfiguration":{type:"object",properties:{link:{type:"string"},href:{type:"string"},icon:{oneOf:[{type:"string"},{type:"null"}]},target:{oneOf:[{$ref:"#/definitions/docs.Target"},{type:"null"}]}},required:["link","href"],additionalProperties:!1},"docs.ApiReferenceLayoutItem":{anyOf:[{type:"string",description:"This should be either an endpoint, websocket, webhook, or subpackage ID"},{type:"object",additionalProperties:{$ref:"#/definitions/docs.ApiReferencePackageConfiguration"},description:"Keyed by subpackage name, this object allows you to group endpoints and pages together."},{$ref:"#/definitions/docs.ApiReferenceSectionConfiguration"},{$ref:"#/definitions/docs.ApiReferenceEndpointConfiguration"},{$ref:"#/definitions/docs.ApiReferenceOperationConfiguration"},{$ref:"#/definitions/docs.PageConfiguration"},{$ref:"#/definitions/docs.LinkConfiguration"}],description:"Use the `layout` object to customize the order that your API endpoints\nare displayed in the docs site."},"docs.SortByAvailabilityValue":{type:"string",enum:["unset","stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"],description:"An availability to sort by, or `unset` for items without an availability."},"docs.ApiReferenceConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},api:{type:"string"},"api-name":{oneOf:[{type:"string"},{type:"null"}],description:"Name of API that we are referencing"},specs:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiSpecConfiguration"}},{type:"null"}],description:"API specifications to load directly. When provided, these take precedence over the API workspace referenced by `api-name`."},openrpc:{oneOf:[{type:"string"},{type:"null"}],description:"Path to an openrpc spec."},audiences:{oneOf:[{$ref:"#/definitions/docs.Audience"},{type:"null"}]},"display-errors":{oneOf:[{type:"boolean"},{type:"null"}],description:"Defaults to false"},"tag-description-pages":{oneOf:[{type:"boolean"},{type:"null"}],description:"If true, a page will be created for each tag in the OpenAPI spec that contains a description."},snippets:{oneOf:[{$ref:"#/definitions/docs.SnippetsConfiguration"},{type:"null"}]},postman:{oneOf:[{type:"string"},{type:"null"}],description:"URL to a Postman collection for this API reference"},summary:{oneOf:[{type:"string"},{type:"null"}],description:"Relative path to the markdown file"},layout:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiReferenceLayoutItem"}},{type:"null"}],description:"Advanced usage: when specified, this object will be used to customize the order that your API endpoints are displayed in the docs site, including subpackages, and additional markdown pages (to be rendered in between API endpoints). If not specified, the order will be inferred from the OpenAPI Spec or Fern Definition."},collapsed:{oneOf:[{$ref:"#/definitions/docs.CollapsedValue"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},alphabetized:{oneOf:[{type:"boolean"},{type:"null"}],description:"If `alphabetized` is set to true, packages and endpoints will be sorted alphabetically, unless explicitly ordered in the `layout` object."},"sort-by-availability":{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.SortByAvailabilityValue"}},{type:"null"}],description:"Sorts packages and endpoints by availability, unless explicitly ordered in the `layout` object.\nListed availabilities come first, in the order provided. Use `unset` for items without an availability.\nUnlisted availabilities follow in the default order:\n`unset`, `generally-available`, `alpha`, `beta`, `preview`, `legacy`, `deprecated`.\n`stable` is treated as `generally-available`, and `in-development` and `pre-release` are treated as `beta`.\nItems with the same availability keep their existing order (alphabetical when `alphabetized` is true)."},flattened:{oneOf:[{type:"boolean"},{type:"null"}],description:"If `flattened` is set to true, the title specified in `api` will be hidden, and its endpoints and subpackages won't be grouped under it.\n\nThis setting is useful if the API reference is short and you want to display all endpoints at the top level."},paginated:{oneOf:[{type:"boolean"},{type:"null"}],description:"If true, the API reference will be paginated rather than displayed in a single page (long-scrolling)."},playground:{oneOf:[{$ref:"#/definitions/docs.PlaygroundSettings"},{type:"null"}],description:"Settings for the api playground that affects all endpoints."}},required:["api"],additionalProperties:!1},"docs.LibraryName":{type:"string",description:"The name identifier for a library. Used to reference the library in navigation."},"docs.LibraryReferenceConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},library:{$ref:"#/definitions/docs.LibraryName",description:"The name of the library to reference (must match a key in the `libraries` section)."},title:{oneOf:[{type:"string"},{type:"null"}],description:"Override the display title for this library reference."},slug:{oneOf:[{type:"string"},{type:"null"}],description:"Override the URL slug for this library reference."}},required:["library"],additionalProperties:!1,description:"References a library defined in the `libraries` section.\nThe library's generated navigation will be injected at this point."},"docs.ChangelogConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},changelog:{$ref:"#/definitions/docs.ChangelogFolderRelativePath"},title:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]}},required:["changelog"],additionalProperties:!1},"docs.BlogConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},blog:{$ref:"#/definitions/docs.ChangelogFolderRelativePath"},title:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]}},required:["blog"],additionalProperties:!1},"docs.TitleSource":{type:"string",enum:["frontmatter","filename"]},"docs.FolderConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},folder:{type:"string",description:"The relative path to a folder containing markdown files. Fern will automatically discover and add all markdown files from this folder to the navigation."},title:{oneOf:[{type:"string"},{type:"null"}],description:"The title to display for this folder section. If not provided, the folder name will be used."},"title-source":{oneOf:[{$ref:"#/definitions/docs.TitleSource"},{type:"null"}],description:"Determines how page titles are derived for files in this folder. Options are `frontmatter` (use the `title` field from the file's frontmatter) or `filename` (derive title from the file name). Defaults to `filename`."},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},collapsed:{oneOf:[{$ref:"#/definitions/docs.CollapsedValue"},{type:"null"}],description:"Deprecated. Use `collapsible` and `collapsed-by-default` instead."},collapsible:{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section can be expanded/collapsed by the user."},"collapsed-by-default":{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section starts collapsed. Only meaningful when `collapsible` is true. Defaults to false (starts open)."},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]}},required:["folder"],additionalProperties:!1},"docs.NavigationItem":{anyOf:[{$ref:"#/definitions/docs.PageConfiguration"},{$ref:"#/definitions/docs.SectionConfiguration"},{$ref:"#/definitions/docs.ApiReferenceConfiguration"},{$ref:"#/definitions/docs.LibraryReferenceConfiguration"},{$ref:"#/definitions/docs.LinkConfiguration"},{$ref:"#/definitions/docs.ChangelogConfiguration"},{$ref:"#/definitions/docs.BlogConfiguration"},{$ref:"#/definitions/docs.FolderConfiguration"}]},"docs.UntabbedNavigationConfig":{type:"array",items:{$ref:"#/definitions/docs.NavigationItem"}},"docs.TabId":{type:"string"},"docs.TabbedNavigationItemWithLayout":{type:"object",properties:{tab:{$ref:"#/definitions/docs.TabId"},layout:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.NavigationItem"}},{type:"null"}],description:"If `href` is set, `layout` must be null."}},required:["tab"],additionalProperties:!1},"docs.TabVariant":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},title:{type:"string"},subtitle:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},layout:{type:"array",items:{$ref:"#/definitions/docs.NavigationItem"}},slug:{oneOf:[{type:"string"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},default:{oneOf:[{type:"boolean"},{type:"null"}]}},required:["title","layout"],additionalProperties:!1},"docs.TabbedNavigationItemWithVariants":{type:"object",properties:{tab:{$ref:"#/definitions/docs.TabId"},variants:{type:"array",items:{$ref:"#/definitions/docs.TabVariant"}}},required:["tab","variants"],additionalProperties:!1},"docs.TabbedNavigationItem":{anyOf:[{$ref:"#/definitions/docs.TabbedNavigationItemWithLayout"},{$ref:"#/definitions/docs.TabbedNavigationItemWithVariants"}]},"docs.TabbedNavigationConfig":{type:"array",items:{$ref:"#/definitions/docs.TabbedNavigationItem"}},"docs.NavigationConfig":{anyOf:[{$ref:"#/definitions/docs.UntabbedNavigationConfig"},{$ref:"#/definitions/docs.TabbedNavigationConfig"}]}},S7h={type:E7h,properties:I7h,required:v7h,additionalProperties:C7h,definitions:x7h};async function Mwt({value:e}){let t=NV(e,_ys);if(t.success){let i=$P(e,[],[]);return{type:"success",contents:Ka.RawSchemas.Serializer.ProductFileConfig.parseOrThrow(i)}}let r=t.error?.instancePath?` at ${t?.error.instancePath}`:"";return{type:"failure",message:`${t.error?.message??"Failed to parse because JSON schema validation failed"}${r}`}}tr();async function GE({absoluteFilepathToConfiguration:e,rawUnresolvedFilepath:t,visitor:r,nodePath:n,willBeUploaded:i=!0}){let o=Xn(Zr(e),t);await r.filepath?.({absoluteFilepath:o,value:t,willBeUploaded:i},[o])}es();ai();ct();X9();tr();var Lwt=require("fs/promises"),Uys=ye(require("path"),1);var VFe=parseInt(process.env.FERN_DOCS_VALIDATION_CONCURRENCY??"32",10);function w7h({apiSection:e,apiWorkspaces:t}){return e.apiName!=null?t.find(r=>r.workspaceName===e.apiName):t.length===1?t[0]:t.find(r=>r.workspaceName==null)}function T7h(e){return e.specs!=null&&e.specs.length>0}async function o$t({absolutePathToFernFolder:e,navigation:t,apiWorkspaces:r,visitor:n,absoluteFilepathToConfiguration:i,context:o,nodePath:s,markdownReader:a}){o.logger.debug(`Starting navigation validation with concurrency limit: ${VFe}`),D7h(t)?await cD(VFe,t,async(c,u)=>{if(Dme(c))await cD(VFe,c.layout,async(l,p)=>{await Vhi({absolutePathToFernFolder:e,navigationItem:l,visitor:n,nodePath:[...s,`${u}`,"layout",`${p}`],absoluteFilepathToConfiguration:i,apiWorkspaces:r,context:o,markdownReader:a})});else if(kme(c)){let l=c.variants.flatMap((p,d)=>p.layout.map((f,m)=>({item:f,variantIdx:d,itemIdx:m})));await cD(VFe,l,async({item:p,variantIdx:d,itemIdx:f})=>{await Vhi({absolutePathToFernFolder:e,navigationItem:p,visitor:n,nodePath:[...s,`${u}`,"variants",`${d}`,"layout",`${f}`],absoluteFilepathToConfiguration:i,apiWorkspaces:r,context:o,markdownReader:a})})}}):await cD(VFe,t,async(c,u)=>{await Vhi({absolutePathToFernFolder:e,navigationItem:c,visitor:n,nodePath:[...s,`${u}`],absoluteFilepathToConfiguration:i,apiWorkspaces:r,context:o,markdownReader:a})})}async function Vhi({absolutePathToFernFolder:e,navigationItem:t,visitor:r,nodePath:n,absoluteFilepathToConfiguration:i,apiWorkspaces:o,context:s,markdownReader:a}){await OV(t,{alphabetized:vt,sortByAvailability:vt,api:vt,apiName:vt,audiences:vt,folder:vt,titleSource:vt,collapsible:vt,collapsedByDefault:vt,openrpc:async l=>{l!=null&&await GE({absoluteFilepathToConfiguration:i,rawUnresolvedFilepath:l,visitor:r,nodePath:[...n,"openrpc"],willBeUploaded:!1})},displayErrors:vt,tagDescriptionPages:vt,snippets:vt,summary:vt,title:vt,layout:vt,collapsed:vt,icon:vt,slug:vt,hidden:vt,skipSlug:vt,paginated:vt,playground:vt,flattened:vt,featureFlag:vt,postman:vt,path:async l=>{l!=null&&await GE({absoluteFilepathToConfiguration:i,rawUnresolvedFilepath:l,visitor:r,nodePath:[...n,"path"],willBeUploaded:!1})},page:vt,contents:async l=>{l!=null&&await Promise.all(l.map(async(p,d)=>{await Vhi({absolutePathToFernFolder:e,navigationItem:p,visitor:r,nodePath:[...n,"contents",`${d}`],absoluteFilepathToConfiguration:i,apiWorkspaces:o,context:s,markdownReader:a})}))},viewers:async l=>{l!=null&&l.length>0&&await r.permissions?.({viewers:l},[...n,"viewers"])},orphaned:vt,availability:vt});let c=P7h(t);if(c!=null){let l=Xn(Zr(i),c);if(await Vt(l)){let d=(await(0,Lwt.stat)(l)).size/(1024*1024);d>1&&s.logger.trace(`Processing large markdown file: ${c} (${d.toFixed(2)} MB)`);let f=await a.readFirstVisit(l);if(f!=null){let m=B7h(t);await r.markdownPage?.({title:m,content:f,absoluteFilepath:l},[...n,c]);try{let g=performance.now(),{filepaths:A}=NY(f,{absolutePathToFernFolder:e,absolutePathToMarkdownFile:l}),y=performance.now()-g;y>2e3&&s.logger.debug(`Slow image path parsing: ${c} took ${y.toFixed(0)}ms`);for(let I of A)await r.filepath?.({absoluteFilepath:I,value:To(e,I),willBeUploaded:!0},[...n,c])}catch(g){s.logger.trace(`Failed to parse image paths in ${c}: ${g}`)}}}}if(R7h(t)){let l=w7h({apiSection:t,apiWorkspaces:o});l!=null?await r.apiSection?.({config:t,workspace:l,context:s},[...n,"api"]):T7h(t)||await r.unresolvedApiSection?.({config:t,apiWorkspaces:o},[...n,"api"])}if(O7h(t)){let l=Xn(Zr(i),t.folder);await Vt(l)&&await Zjl({directoryPath:l,absolutePathToFernFolder:e,visitor:r,nodePath:[...n,"folder"],context:s,markdownReader:a})}let u=Ka.getChangelogFolderFromNavigationItem(t);if(u!=null){let l=Xn(Zr(i),u);if(s.logger.trace(`Starting changelog processing for directory: ${l}`),await Vt(l)){let p=performance.now(),f=(await(0,Lwt.readdir)(l)).filter(g=>g.endsWith(".md")||g.endsWith(".mdx"));s.logger.debug(`Processing ${f.length} changelog files in ${l}`),await cD(VFe,f,async g=>{let A=Xn(l,g),y=await a.readFirstVisit(A);y!=null&&(s.logger.trace(`Validating changelog file: ${g}`),await r.markdownPage?.({title:g,content:y,absoluteFilepath:A},[...n,"changelog",g]))});let m=performance.now()-p;s.logger.debug(`Finished processing ${f.length} changelog files in ${m.toFixed(0)}ms`)}else s.logger.trace(`Changelog directory does not exist: ${l}`)}}function O7h(e){return e?.folder!=null}async function Zjl({directoryPath:e,absolutePathToFernFolder:t,visitor:r,nodePath:n,context:i,markdownReader:o}){let s=await(0,Lwt.readdir)(e,{withFileTypes:!0}),a=s.filter(u=>u.isFile()&&!u.name.startsWith("_")&&(u.name.toLowerCase().endsWith(".md")||u.name.toLowerCase().endsWith(".mdx"))),c=s.filter(u=>u.isDirectory()&&!u.name.startsWith("_"));await cD(VFe,a,async u=>{let l=Be(e,Ae.of(u.name)),d=(await(0,Lwt.stat)(l)).size/(1024*1024);d>1&&i.logger.trace(`Processing large markdown file in folder: ${u.name} (${d.toFixed(2)} MB)`);let f=await o.readFirstVisit(l);if(f==null)return;let m=Uys.default.basename(u.name,Uys.default.extname(u.name));await r.markdownPage?.({title:m,content:f,absoluteFilepath:l},[...n,u.name]);try{let{filepaths:g}=NY(f,{absolutePathToFernFolder:t,absolutePathToMarkdownFile:l});for(let A of g)await r.filepath?.({absoluteFilepath:A,value:To(t,A),willBeUploaded:!0},[...n,u.name])}catch(g){i.logger.trace(`Failed to parse image paths in folder file ${u.name}: ${g}`)}}),await cD(VFe,c,async u=>{let l=Be(e,Ae.of(u.name));await Zjl({directoryPath:l,absolutePathToFernFolder:t,visitor:r,nodePath:[...n,u.name],context:i,markdownReader:o})})}function $jl(e){return e?.page!=null}function ezl(e){return e?.section!=null}function P7h(e){if($jl(e)||ezl(e)&&e.path!=null)return e.path}function B7h(e){return $jl(e)?e.page:ezl(e)?e.section:"Unknown"}function R7h(e){return e?.api!=null}function D7h(e){return e[0]?.tab!=null}async function rzl({contents:e,visitor:t,absoluteFilepathToConfiguration:r,context:n,apiWorkspaces:i,absolutePathToFernFolder:o}){let s=new Uhi;await t.file?.({config:e},[]);let a=async({version:c,product:u,nodePath:l})=>{if(await t.version?.({version:c},l),c.path==null)return;let p=c.path;await GE({absoluteFilepathToConfiguration:r,rawUnresolvedFilepath:p,visitor:t,nodePath:l,willBeUploaded:!1});let d=Xn(Zr(r),p);if(!await Vt(d))return;let f=Cr.load((await(0,Gys.readFile)(d)).toString());await t.versionFile?.({path:p,content:f,version:c,product:u},[p]);let m=await zwt({value:f});m.type==="success"&&await o$t({absolutePathToFernFolder:o,navigation:m.contents.navigation,visitor:t,nodePath:["navigation"],absoluteFilepathToConfiguration:d,apiWorkspaces:i,context:n,markdownReader:s})};await OV(e,{instances:vt,analytics:vt,aiChat:vt,aiSearch:vt,aiExamples:async c=>{c!=null&&typeof c=="object"&&await OV(c,{enabled:vt,style:vt})},pageActions:vt,announcement:vt,backgroundImage:async c=>{c!=null&&(typeof c=="string"?await GE({absoluteFilepathToConfiguration:r,rawUnresolvedFilepath:c,visitor:t,nodePath:["background-image"]}):(c.dark!=null&&await GE({absoluteFilepathToConfiguration:r,rawUnresolvedFilepath:c.dark,visitor:t,nodePath:["background-image","dark"]}),c.light!=null&&await GE({absoluteFilepathToConfiguration:r,rawUnresolvedFilepath:c.light,visitor:t,nodePath:["background-image","light"]})))},colors:vt,css:async c=>{c!=null&&(Array.isArray(c)?await Promise.all(c.map((u,l)=>GE({absoluteFilepathToConfiguration:r,rawUnresolvedFilepath:u,visitor:t,nodePath:["css",`${l}`],willBeUploaded:!1}))):await GE({absoluteFilepathToConfiguration:r,rawUnresolvedFilepath:c,visitor:t,nodePath:["css"],willBeUploaded:!1}))},defaultLanguage:vt,experimental:vt,favicon:async c=>{c!=null&&await GE({absoluteFilepathToConfiguration:r,rawUnresolvedFilepath:c,visitor:t,nodePath:["favicon"]})},footer:async c=>{c!=null&&await GE({absoluteFilepathToConfiguration:r,rawUnresolvedFilepath:c,visitor:t,nodePath:["footer"],willBeUploaded:!1})},footerLinks:vt,header:async c=>{c!=null&&await GE({absoluteFilepathToConfiguration:r,rawUnresolvedFilepath:c,visitor:t,nodePath:["header"],willBeUploaded:!1})},integrations:async c=>{c?.context7!=null&&await GE({absoluteFilepathToConfiguration:r,rawUnresolvedFilepath:c.context7,visitor:t,nodePath:["integrations","context7"],willBeUploaded:!0})},js:async c=>{c!=null&&(Array.isArray(c)?await Promise.all(c.map((u,l)=>tzl({absoluteFilepathToConfiguration:r,visitor:t,script:u,nodePath:["js",`${l}`]}))):await tzl({absoluteFilepathToConfiguration:r,visitor:t,script:c,nodePath:["js"]}))},landingPage:vt,layout:vt,agents:async c=>{c?.llmsTxt!=null&&await GE({absoluteFilepathToConfiguration:r,rawUnresolvedFilepath:c.llmsTxt,visitor:t,nodePath:["agents","llms-txt"],willBeUploaded:!0}),c?.robotsTxt!=null&&await GE({absoluteFilepathToConfiguration:r,rawUnresolvedFilepath:c.robotsTxt,visitor:t,nodePath:["agents","robots-txt"],willBeUploaded:!0}),c?.llmsFullTxt!=null&&await GE({absoluteFilepathToConfiguration:r,rawUnresolvedFilepath:c.llmsFullTxt,visitor:t,nodePath:["agents","llms-full-txt"],willBeUploaded:!0})},settings:vt,logo:async()=>{e.logo?.dark!=null&&await GE({absoluteFilepathToConfiguration:r,rawUnresolvedFilepath:e.logo.dark,visitor:t,nodePath:["logo","dark"]}),e.logo?.light!=null&&await GE({absoluteFilepathToConfiguration:r,rawUnresolvedFilepath:e.logo.light,visitor:t,nodePath:["logo","light"]})},metadata:vt,navbarLinks:vt,navigation:async c=>{if(c==null)return;let u=performance.now();n.logger.debug("[docs-ast] Starting main navigation traversal..."),await o$t({absolutePathToFernFolder:o,navigation:c,visitor:t,nodePath:["navigation"],absoluteFilepathToConfiguration:r,apiWorkspaces:i,context:n,markdownReader:s}),n.logger.debug(`[docs-ast] Main navigation traversal complete in ${(performance.now()-u).toFixed(0)}ms`)},changelog:async c=>{c!=null&&await o$t({absolutePathToFernFolder:o,navigation:[c],visitor:t,nodePath:["changelog"],absoluteFilepathToConfiguration:r,apiWorkspaces:i,context:n,markdownReader:s})},products:async c=>{if(c==null)return;let u=performance.now();n.logger.debug(`[docs-ast] Processing ${c.length} products...`),await Promise.all(c.map(async(l,p)=>{if("path"in l){await GE({absoluteFilepathToConfiguration:r,rawUnresolvedFilepath:l.path,visitor:t,nodePath:["products",`${p}`],willBeUploaded:!1});let d=Xn(Zr(r),l.path),f=Cr.load((await(0,Gys.readFile)(d)).toString());if(await Vt(d)&&await t.productFile?.({path:l.path,content:f,product:l},[l.path]),l.versions!=null&&l.versions.length>0){await Promise.all(l.versions.map((g,A)=>a({version:g,product:l,nodePath:["products",`${p}`,"versions",`${A}`]})));return}let m=await Mwt({value:f});m.type==="success"&&await o$t({absolutePathToFernFolder:o,navigation:m.contents.navigation,visitor:t,nodePath:["navigation"],absoluteFilepathToConfiguration:d,apiWorkspaces:i,context:n,markdownReader:s})}})),n.logger.debug(`[docs-ast] Products processing complete in ${(performance.now()-u).toFixed(0)}ms`)},check:vt,redirects:vt,_absoluteFilepathsToRedirectsFiles:vt,_redirectsFileErrors:vt,tabs:vt,title:vt,typography:async c=>{c!=null&&await OV(c,{bodyFont:async u=>{u!=null&&await Vys({absoluteFilepathToConfiguration:r,visitor:t,font:u,nodePath:["typography","bodyFont"]})},codeFont:async u=>{u!=null&&await Vys({absoluteFilepathToConfiguration:r,visitor:t,font:u,nodePath:["typography","codeFont"]})},headingsFont:async u=>{u!=null&&await Vys({absoluteFilepathToConfiguration:r,visitor:t,font:u,nodePath:["typography","headingsFont"]})}})},versions:async c=>{if(c==null)return;let u=performance.now();n.logger.debug(`[docs-ast] Processing ${c.length} versions...`),await Promise.all(c.map((l,p)=>a({version:l,nodePath:["versions",`${p}`]}))),n.logger.debug(`[docs-ast] Versions processing complete in ${(performance.now()-u).toFixed(0)}ms`)},roles:vt,languages:vt,translations:vt,theme:vt,globalTheme:vt,libraries:vt}),s.logSummary(n.logger,"markdown")}async function Vys({absoluteFilepathToConfiguration:e,visitor:t,font:r,nodePath:n}){r.path!=null&&await GE({absoluteFilepathToConfiguration:e,rawUnresolvedFilepath:r.path,visitor:t,nodePath:n,willBeUploaded:!0});for(let i of r.paths??[])typeof i=="string"?await GE({absoluteFilepathToConfiguration:e,rawUnresolvedFilepath:i,visitor:t,nodePath:n,willBeUploaded:!0}):await GE({absoluteFilepathToConfiguration:e,rawUnresolvedFilepath:i.path,visitor:t,nodePath:n,willBeUploaded:!0})}async function tzl({absoluteFilepathToConfiguration:e,visitor:t,script:r,nodePath:n}){let i=typeof r=="string"?r:"path"in r?r.path:null;i&&await GE({absoluteFilepathToConfiguration:e,rawUnresolvedFilepath:i,visitor:t,nodePath:n,willBeUploaded:!0})}var TAe={};$(TAe,{AccentColorContrastRule:()=>qys,AllRolesMustBeDeclaredRule:()=>Wys,CHANGELOG_FEED_ALLOWED_SLUGS:()=>Zhi,FilepathsExistRule:()=>Ghi,MissingRedirectsRule:()=>WFe,NavigationConflicts:()=>Khi,NoCircularRedirectsRule:()=>_wt,TabWithHrefRule:()=>X7h,TranslationDirectoriesExistRule:()=>Yhi,ValidChangelogSlugRule:()=>Vwt,ValidDocsEndpoints:()=>Gwt,ValidFileTypes:()=>agi,ValidFrontmatter:()=>cgi,ValidMarkdownFileReferences:()=>L6l,ValidMarkdownLinks:()=>C_,ValidMarkdownRule:()=>sAi,ValidRedirectsFilesRule:()=>aAi,ValidSkillsPageActionRule:()=>cAi,ValidTranslationsConfigRule:()=>dAi,ValidWellKnownSkillsRule:()=>mAi,ValidateProductFileRule:()=>hAi,ValidateVersionFileRule:()=>gAi,enforceBackgroundTheme:()=>nzl,findMissingRedirects:()=>u$t,getEffectiveChangelogSlugLastSegment:()=>hzl,isAllowedChangelogSlug:()=>Zys,validateTheme:()=>s$t});ai();rVr();var qys={name:"accent-color-contrast",create:()=>({file:async({config:e})=>{if(e.colors==null)return[];let t=iVr(e.colors);return t==="dark"?s$t(e.colors,"dark"):t==="light"?s$t(e.colors,"light"):t==="darkAndLight"?[...s$t(e.colors,"dark"),...s$t(e.colors,"light")]:[]}})};function s$t(e,t){let r=BUt(e.accentPrimary??e.accentPrimaryDeprecated,"accent-primary",t),n=BUt(e.background,"background",t)??(t==="dark"?"#000":"#FFF"),i=[];if(!us(n).isValid())i.push({severity:"fatal",message:`Invalid background color provided for colors.background.${t}: ${n}.`});else{let o=nzl(us(n),t);us(n).toHexString()!==o.toHexString()&&i.push({severity:"warning",message:`The provided background color for ${t} mode is not ${t} enough. It will be adjusted to ${o.toHexString()}.`}),n=o.toHexString()}if(r==null)i.push({severity:"warning",message:`No accent-color provided for ${t} mode. A random color will be used.`});else if(!us(r).isValid())i.push({severity:"fatal",message:`Invalid accent-color provided for colors.accent-primary.${t}: ${r}.`});else{let o=us.readability(r,n),s=`${o.toFixed(2)}:1`;o<3?i.push({severity:"warning",message:`The contrast ratio between the accent color and the background color for ${t} mode is ${s}. It should be at least 3:1.`}):o<4.5?i.push({severity:"warning",message:`The contrast ratio between the accent color and the background color for ${t} mode is ${s}. Fern will adjust the color to meet the minimum contrast ratio of 4.5:1 for WCAG AA and 7:1 for WCAG AAA.`}):o<7&&i.push({severity:"warning",message:`The contrast ratio between the accent color and the background color for ${t} mode is ${s}. Fern will adjust the color to meet the minimum contrast ratio of 7:1 for WCAG AAA.`})}return i}function nzl(e,t){return t==="dark"&&e.isDark()||t==="light"&&e.isLight()?e:k7h(e)}function k7h(e){if(e==null)return;let{h:t,s:r,v:n}=e.toHsv();return us({h:t,s:r,v:1-n})}var Wys={name:"all-roles-must-be-declared",create:e=>{let t=e.workspace.config.roles;return{permissions:r=>{let n=[...r.viewers??[]],i=[];for(let o of n)(t==null||!t.includes(o))&&i.push({severity:"fatal",message:`Role "${o}" is used but not declared at the top level of the docs.yml file.`});return i}}}};tr();var Ghi={name:"filepaths-exist",create:()=>({filepath:async({absoluteFilepath:e,value:t})=>await Vt(e)?[]:[{severity:"fatal",message:`Path ${t} does not exist`}]})};ct();qI();Ch();Hy();Dt();function QGe(e){if(e instanceof Error)return e.message;if(typeof e=="string")return e;try{let t=JSON.stringify(e);if(t!=null&&t!=="{}")return t}catch{}return Object.prototype.toString.call(e)}qI();function izl(e){return e.split(/[?#]/)[0]??""}function GFe(e){return e.startsWith("/")?e.slice(1):e}function Hys(e){return e.startsWith("/")?e:`/${e}`}function qhi(e){return e.endsWith("/")?e.slice(0,-1):e}function Whi(e){let t=[];return e.config.instances.forEach(r=>{t.push(r.url),typeof r.customDomain=="string"?t.push(r.customDomain):Array.isArray(r.customDomain)&&t.push(...r.customDomain)}),t}function a$t(e){let t=new URL(Mj(e));return{domain:t.host,basePath:t.pathname==="/"||t.pathname===""?void 0:t.pathname}}function ozl(e,t){return t.some(r=>{try{let n=a$t(r);return e.host!==n.domain?!1:n.basePath!=null?e.pathname.startsWith(n.basePath):!0}catch{return!1}})}Ch();function szl(e){let t=qt.NodeCollector.collect(e),r=new Map;for(let n of t.getSlugMapWithParents().values()){let{node:i,parents:o}=n;if(!qt.isPage(i))continue;let s=qt.getPageId(i);if(s==null)continue;let a=i.canonicalSlug??i.slug;if(i.type==="changelogEntry"){let u=o.findLast(l=>l.type==="changelog");u!=null&&qt.hasMetadata(u)&&(a=u.canonicalSlug??u.slug)}let c=r.get(s);c!=null?c.add(a):r.set(s,new Set([a]))}return r}function F7h(e){for(var t=[],r=0;r<e.length;){var n=e[r];if(n==="*"||n==="+"||n==="?"){t.push({type:"MODIFIER",index:r,value:e[r++]});continue}if(n==="\\"){t.push({type:"ESCAPED_CHAR",index:r++,value:e[r++]});continue}if(n==="{"){t.push({type:"OPEN",index:r,value:e[r++]});continue}if(n==="}"){t.push({type:"CLOSE",index:r,value:e[r++]});continue}if(n===":"){for(var i="",o=r+1;o<e.length;){var s=e.charCodeAt(o);if(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||s===95){i+=e[o++];continue}break}if(!i)throw new TypeError("Missing parameter name at ".concat(r));t.push({type:"NAME",index:r,value:i}),r=o;continue}if(n==="("){var a=1,c="",o=r+1;if(e[o]==="?")throw new TypeError('Pattern cannot start with "?" at '.concat(o));for(;o<e.length;){if(e[o]==="\\"){c+=e[o++]+e[o++];continue}if(e[o]===")"){if(a--,a===0){o++;break}}else if(e[o]==="("&&(a++,e[o+1]!=="?"))throw new TypeError("Capturing groups are not allowed at ".concat(o));c+=e[o++]}if(a)throw new TypeError("Unbalanced pattern at ".concat(r));if(!c)throw new TypeError("Missing pattern at ".concat(r));t.push({type:"PATTERN",index:r,value:c}),r=o;continue}t.push({type:"CHAR",index:r,value:e[r++]})}return t.push({type:"END",index:r,value:""}),t}function azl(e,t){t===void 0&&(t={});for(var r=F7h(e),n=t.prefixes,i=n===void 0?"./":n,o=t.delimiter,s=o===void 0?"/#?":o,a=[],c=0,u=0,l="",p=function(O){if(u<r.length&&r[u].type===O)return r[u++].value},d=function(O){var z=p(O);if(z!==void 0)return z;var Y=r[u],te=Y.type,ee=Y.index;throw new TypeError("Unexpected ".concat(te," at ").concat(ee,", expected ").concat(O))},f=function(){for(var O="",z;z=p("CHAR")||p("ESCAPED_CHAR");)O+=z;return O},m=function(O){for(var z=0,Y=s;z<Y.length;z++){var te=Y[z];if(O.indexOf(te)>-1)return!0}return!1},g=function(O){var z=a[a.length-1],Y=O||(z&&typeof z=="string"?z:"");if(z&&!Y)throw new TypeError('Must have text between two parameters, missing text after "'.concat(z.name,'"'));return!Y||m(Y)?"[^".concat(qFe(s),"]+?"):"(?:(?!".concat(qFe(Y),")[^").concat(qFe(s),"])+?")};u<r.length;){var A=p("CHAR"),y=p("NAME"),I=p("PATTERN");if(y||I){var x=A||"";i.indexOf(x)===-1&&(l+=x,x=""),l&&(a.push(l),l=""),a.push({name:y||c++,prefix:x,suffix:"",pattern:I||g(x),modifier:p("MODIFIER")||""});continue}var v=A||p("ESCAPED_CHAR");if(v){l+=v;continue}l&&(a.push(l),l="");var S=p("OPEN");if(S){var x=f(),B=p("NAME")||"",R=p("PATTERN")||"",D=f();d("CLOSE"),a.push({name:B||(R?c++:""),pattern:B&&!R?g(x):R,prefix:x,suffix:D,modifier:p("MODIFIER")||""});continue}d("END")}return a}function czl(e,t){return N7h(azl(e,t),t)}function N7h(e,t){t===void 0&&(t={});var r=Kys(t),n=t.encode,i=n===void 0?function(c){return c}:n,o=t.validate,s=o===void 0?!0:o,a=e.map(function(c){if(typeof c=="object")return new RegExp("^(?:".concat(c.pattern,")$"),r)});return function(c){for(var u="",l=0;l<e.length;l++){var p=e[l];if(typeof p=="string"){u+=p;continue}var d=c?c[p.name]:void 0,f=p.modifier==="?"||p.modifier==="*",m=p.modifier==="*"||p.modifier==="+";if(Array.isArray(d)){if(!m)throw new TypeError('Expected "'.concat(p.name,'" to not repeat, but got an array'));if(d.length===0){if(f)continue;throw new TypeError('Expected "'.concat(p.name,'" to not be empty'))}for(var g=0;g<d.length;g++){var A=i(d[g],p);if(s&&!a[l].test(A))throw new TypeError('Expected all "'.concat(p.name,'" to match "').concat(p.pattern,'", but got "').concat(A,'"'));u+=p.prefix+A+p.suffix}continue}if(typeof d=="string"||typeof d=="number"){var A=i(String(d),p);if(s&&!a[l].test(A))throw new TypeError('Expected "'.concat(p.name,'" to match "').concat(p.pattern,'", but got "').concat(A,'"'));u+=p.prefix+A+p.suffix;continue}if(!f){var y=m?"an array":"a string";throw new TypeError('Expected "'.concat(p.name,'" to be ').concat(y))}}return u}}function Hhi(e,t){var r=[],n=uzl(e,r,t);return j7h(n,r,t)}function j7h(e,t,r){r===void 0&&(r={});var n=r.decode,i=n===void 0?function(o){return o}:n;return function(o){var s=e.exec(o);if(!s)return!1;for(var a=s[0],c=s.index,u=Object.create(null),l=function(d){if(s[d]===void 0)return"continue";var f=t[d-1];f.modifier==="*"||f.modifier==="+"?u[f.name]=s[d].split(f.prefix+f.suffix).map(function(m){return i(m,f)}):u[f.name]=i(s[d],f)},p=1;p<s.length;p++)l(p);return{path:a,index:c,params:u}}}function qFe(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function Kys(e){return e&&e.sensitive?"":"i"}function z7h(e,t){if(!t)return e;for(var r=/\((?:\?<(.*?)>)?(?!\?)/g,n=0,i=r.exec(e.source);i;)t.push({name:i[1]||n++,prefix:"",suffix:"",modifier:"",pattern:""}),i=r.exec(e.source);return e}function Q7h(e,t,r){var n=e.map(function(i){return uzl(i,t,r).source});return new RegExp("(?:".concat(n.join("|"),")"),Kys(r))}function M7h(e,t,r){return L7h(azl(e,r),t,r)}function L7h(e,t,r){r===void 0&&(r={});for(var n=r.strict,i=n===void 0?!1:n,o=r.start,s=o===void 0?!0:o,a=r.end,c=a===void 0?!0:a,u=r.encode,l=u===void 0?function(z){return z}:u,p=r.delimiter,d=p===void 0?"/#?":p,f=r.endsWith,m=f===void 0?"":f,g="[".concat(qFe(m),"]|$"),A="[".concat(qFe(d),"]"),y=s?"^":"",I=0,x=e;I<x.length;I++){var v=x[I];if(typeof v=="string")y+=qFe(l(v));else{var S=qFe(l(v.prefix)),B=qFe(l(v.suffix));if(v.pattern)if(t&&t.push(v),S||B)if(v.modifier==="+"||v.modifier==="*"){var R=v.modifier==="*"?"?":"";y+="(?:".concat(S,"((?:").concat(v.pattern,")(?:").concat(B).concat(S,"(?:").concat(v.pattern,"))*)").concat(B,")").concat(R)}else y+="(?:".concat(S,"(").concat(v.pattern,")").concat(B,")").concat(v.modifier);else{if(v.modifier==="+"||v.modifier==="*")throw new TypeError('Can not repeat "'.concat(v.name,'" without a prefix and suffix'));y+="(".concat(v.pattern,")").concat(v.modifier)}else y+="(?:".concat(S).concat(B,")").concat(v.modifier)}}if(c)i||(y+="".concat(A,"?")),y+=r.endsWith?"(?=".concat(g,")"):"$";else{var D=e[e.length-1],O=typeof D=="string"?A.indexOf(D[D.length-1])>-1:D===void 0;i||(y+="(?:".concat(A,"(?=").concat(g,"))?")),O||(y+="(?=".concat(A,"|").concat(g,")"))}return new RegExp(y,Kys(r))}function uzl(e,t,r){return e instanceof RegExp?z7h(e,t):Array.isArray(e)?Q7h(e,t,r):M7h(e,t,r)}function lzl(e){let t=new Map;for(let r of e){let n=t.get(r.pageId);(n==null||Date.parse(r.lastUpdated)>=Date.parse(n.lastUpdated))&&t.set(r.pageId,r)}return Array.from(t.values())}function pzl(e){return e.endsWith("/")?e.slice(0,-1):e}function _7h(e,t){return t==null||e.startsWith(t)?e:`${pzl(t)}${e.startsWith("/")?"":"/"}${e}`}function U7h(e,t){if(e===t)return!0;try{return Hhi(e)(t)!==!1}catch{return!1}}function V7h(e,t,r){let n=e.startsWith("/")?e:`/${e}`;return t.some(i=>{let o=pzl(_7h(i.source,r));return U7h(o,n)})}function fzl(e,t){let r=new Set;for(let i of t.values())for(let o of i)r.add(o);let n=[];for(let i of e){if(i.slug.trim()==="")continue;let o=t.get(i.pageId);if(o==null){if(r.has(i.slug))continue;n.push({pageId:i.pageId,oldSlug:i.slug,newSlug:void 0})}else if(!o.has(i.slug)){if(r.has(i.slug))continue;let s=o.values().next().value;n.push({pageId:i.pageId,oldSlug:i.slug,newSlug:s})}}return n}function dzl(e,t,r){let n=[];for(let i of e){if(V7h(i.oldSlug,t,r))continue;let o=i.oldSlug.startsWith("/")?i.oldSlug:`/${i.oldSlug}`;if(i.newSlug!=null){let s=i.newSlug.startsWith("/")?i.newSlug:`/${i.newSlug}`;n.push({severity:"warning",message:`Page "${i.pageId}" was moved from "${o}" to "${s}". The old URL will return 404 without a redirect. Add to redirects: [{source: "${o}", destination: "${s}"}]`})}else n.push({severity:"warning",message:`Page "${i.pageId}" was removed. The previously published URL "${o}" will return 404 without a redirect. Consider adding a redirect to preserve existing links.`})}return n}function G7h(){let e;return{context:EIe({logger:lI((r,...n)=>{r==="error"&&(e=n.join(" "))})}),getLastErrorMessage:()=>e}}function q7h(e){return"type"in e&&e.type==="root"}async function W7h(e,t,r,n){try{let i=await fetch(`${e}/slugs/markdowns`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${n}`},body:JSON.stringify({domain:t,basepath:r??""}),signal:AbortSignal.timeout(3e4)});return i.ok?{entries:(await i.json()).entries}:{error:`FDR returned ${i.status}`}}catch(i){return{error:Ti(i)}}}function H7h(){return process.env.FERN_FDR_ORIGIN??process.env.OVERRIDE_FDR_ORIGIN??"https://registry.buildwithfern.com"??"https://registry.buildwithfern.com"}var WFe={name:"missing-redirects",create:async({workspace:e,apiWorkspaces:t,ossWorkspaces:r,logger:n})=>{let i=await u$t({workspace:e,logger:n,instanceUrl:Whi(e)[0],token:(await $w())?.value,resolveLocalDocs:o=>K7h({url:o,workspace:e,apiWorkspaces:t,ossWorkspaces:r})});return i.length===0?{}:{file:()=>i}}};async function u$t({workspace:e,logger:t,instanceUrl:r,token:n,resolveLocalDocs:i}){if(r==null)return c$t({type:"no-instance-url"});let o=a$t(r);if(n==null)return c$t({type:"no-token"});let s=await W7h(H7h(),o.domain,o.basePath,n);if("error"in s)return t.debug(`[missing-redirects] FDR fetch failed: ${s.error}`),c$t({type:"fetch-failed",reason:s.error});if(s.entries.length===0)return t.debug("[missing-redirects] No markdown entries found (first publish or empty slug table)"),c$t({type:"first-publish"});let a;try{let u=(await i(r)).config.root;if(!u||!q7h(u))return[];let l=qt.migrate.FernNavigationV1ToLatest.create().root(u),p=szl(l),d=lzl(s.entries);a=fzl(d,p)}catch(u){let l=QGe(u);return t.debug(`[missing-redirects] Failed to resolve local docs navigation: ${l}`),c$t({type:"resolve-failed",reason:l})}let c=(e.config.redirects??[]).map(u=>({source:u.source,destination:u.destination}));return dzl(a,c,o.basePath)}async function K7h({url:e,workspace:t,apiWorkspaces:r,ossWorkspaces:n}){let{context:i,getLastErrorMessage:o}=G7h(),s=new E_({domain:e,docsWorkspace:t,ossWorkspaces:n,apiWorkspaces:r,taskContext:i,editThisPage:void 0,uploadFiles:void 0,registerApi:void 0,targetAudiences:void 0,buildRefVersions:!1});try{return await s.resolve()}catch(a){throw new Error(o()??QGe(a))}}function c$t(e){switch(e.type){case"no-instance-url":case"first-publish":return[];case"no-token":return[{severity:"warning",message:"Missing redirects check skipped: not authenticated. Run 'fern login' or set the FERN_TOKEN environment variable to enable this check."}];case"fetch-failed":return[{severity:"warning",message:`Missing redirects check skipped: could not reach FDR (${e.reason}). The check requires network access to compare against previously published docs.`}];case"resolve-failed":return[{severity:"warning",message:`Missing redirects check skipped: failed to resolve local docs navigation (${e.reason}). Run \`fern check --log-level=debug\` for more detail.`}]}}var Khi={name:"navigation-conflicts",create:()=>({file:async({config:e})=>{let t=[];return e.navigation!=null&&e.versions!=null&&t.push({severity:"fatal",message:"Cannot contain both navigation and versions. If you want versioned docs, use versions. Otherwise use navigation."}),e.navigation!=null&&e.products!=null&&t.push({severity:"fatal",message:"Cannot contain both navigation and products. If you want multi-product docs, define navigation inside each product file. Otherwise use navigation."}),t}})};function Jhi(e){return e!=="/"&&e.endsWith("/")?e.slice(0,-1):e}function J7h(e){return!e.source.includes(":")&&!e.destination.includes(":")}function Y7h(e){let t=[],r=e.filter(J7h),n=new Map;for(let c=0;c<r.length;c++){let u=r[c];if(u){let l=Jhi(u.source),p=Jhi(u.destination);n.set(l,{destination:p,index:c})}}for(let c=0;c<e.length;c++){let u=e[c];if(u){let l=Jhi(u.source),p=Jhi(u.destination);l===p&&t.push({severity:"error",message:`Redirect from "${u.source}" to "${u.destination}" creates an infinite loop (source equals destination)`})}}let i=new Set,o=new Set;function s(c,u){if(o.has(c)){let d=u.indexOf(c);return u.slice(d)}if(i.has(c))return null;let l=n.get(c);if(!l)return null;i.add(c),o.add(c),u.push(c);let p=s(l.destination,u);return o.delete(c),u.pop(),p}let a=new Set;for(let[c]of n){i.clear(),o.clear();let u=s(c,[]);if(u&&u.length>1){let p=[...u].sort().join(" -> ");if(!a.has(p)){a.add(p);let d=[...u,u[0]].join(" -> ");t.push({severity:"error",message:`Circular redirect chain detected: ${d}`})}}}return t}var _wt={name:"no-circular-redirects",create:()=>({file:async({config:e})=>{let t=[];if(!e.redirects||e.redirects.length===0)return t;let r=e.redirects.map(n=>({source:n.source,destination:n.destination,permanent:n.permanent}));return Y7h(r)}})};ai();var X7h={name:"tab-with-href",create:()=>({file:async({config:e})=>{let t=e.tabs??{};if(e.navigation==null)return[];let r=[];if(Z7h(e.navigation))for(let n of e.navigation){let i=t[n.tab];if(i==null){r.push({severity:"fatal",message:`Tab "${n.tab}" is missing from the tabs configuration.`});continue}let o=Dme(n),s=kme(n);if(i.href!=null&&(o||s)){r.push({severity:"fatal",message:`Tab "${n.tab}" has both a href and ${o?"layout":"variants"}. Only one should be used.`});continue}if(i.href==null&&!o&&!s){r.push({severity:"fatal",message:`Tab "${n.tab}" is missing a href, layout, or variants.`});continue}}return[]}})};function Z7h(e){return Array.isArray(e)&&e.length>0&&e[0].tab!=null}es();tr();var Yhi={name:"translation-directories-exist",create:({workspace:e})=>({file:async({config:t})=>{let r=[],n=t.translations;if(n==null||n.length===0)return r;let i=n.map(u=>Ka.DocsYmlSchemas.normalizeTranslationConfig(u)),o=(i.find(u=>u.default===!0)??i[0])?.lang,s=Be(e.absoluteFilePath,Ae.of("translations")),a=await Vt(s),c=[];for(let u of i){if(u.lang===o)continue;let l=Be(s,Ae.of(u.lang));await Vt(l)||c.push(u.lang)}if(c.length>0){let u=$7h({translationsDirExists:a,missingDirs:c,fernFolderPath:e.absoluteFilePath}),l=" ",p=u.split(`
3925
+ pre-filled and sent from the API Explorer playground. Defaults to false.`}},additionalProperties:!1},"docs.ApiReferencePackageConfigurationWithOptions":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},title:{oneOf:[{type:"string"},{type:"null"}]},summary:{oneOf:[{type:"string"},{type:"null"}],description:"Relative path to the markdown file. This summary is displayed at the top of the API section."},contents:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiReferenceLayoutItem"}},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},playground:{oneOf:[{$ref:"#/definitions/docs.PlaygroundSettings"},{type:"null"}],description:"Settings for the api playground that is applied only to descendants of this api package."}},additionalProperties:!1},"docs.ApiReferencePackageConfiguration":{anyOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiReferenceLayoutItem"}},{$ref:"#/definitions/docs.ApiReferencePackageConfigurationWithOptions"}]},"docs.ApiReferenceSectionConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},section:{type:"string",description:"The title of the api package that will be displayed in the sidebar."},"referenced-packages":{oneOf:[{type:"array",items:{type:"string"}},{type:"null"}],description:"This section will inherit the endpoints from the specified subpackage(s). If multiple packages are specified, they will be merged."},summary:{oneOf:[{type:"string"},{type:"null"}],description:"Relative path to the markdown file."},contents:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiReferenceLayoutItem"}},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},collapsed:{oneOf:[{$ref:"#/definitions/docs.CollapsedValue"},{type:"null"}],description:"Deprecated. Use `collapsible` and `collapsed-by-default` instead."},collapsible:{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section can be expanded/collapsed by the user in the sidebar."},"collapsed-by-default":{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section starts collapsed. Only meaningful when collapsible is true."},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]},playground:{oneOf:[{$ref:"#/definitions/docs.PlaygroundSettings"},{type:"null"}],description:"Settings for the api playground that affects all endpoints."}},required:["section"],additionalProperties:!1},"docs.ApiReferenceEndpointConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},endpoint:{type:"string"},title:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]},playground:{oneOf:[{$ref:"#/definitions/docs.PlaygroundSettings"},{type:"null"}],description:"Settings for the api playground that affect this endpoint specifically."}},required:["endpoint"],additionalProperties:!1},"docs.ApiReferenceOperationConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},operation:{type:"string"},title:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]}},required:["operation"],additionalProperties:!1,description:"Defines a GraphQL-native schema for selecting operations (REST -> Endpoint === GraphQL -> Operation)"},"docs.LinkConfiguration":{type:"object",properties:{link:{type:"string"},href:{type:"string"},icon:{oneOf:[{type:"string"},{type:"null"}]},target:{oneOf:[{$ref:"#/definitions/docs.Target"},{type:"null"}]}},required:["link","href"],additionalProperties:!1},"docs.ApiReferenceLayoutItem":{anyOf:[{type:"string",description:"This should be either an endpoint, websocket, webhook, or subpackage ID"},{type:"object",additionalProperties:{$ref:"#/definitions/docs.ApiReferencePackageConfiguration"},description:"Keyed by subpackage name, this object allows you to group endpoints and pages together."},{$ref:"#/definitions/docs.ApiReferenceSectionConfiguration"},{$ref:"#/definitions/docs.ApiReferenceEndpointConfiguration"},{$ref:"#/definitions/docs.ApiReferenceOperationConfiguration"},{$ref:"#/definitions/docs.PageConfiguration"},{$ref:"#/definitions/docs.LinkConfiguration"}],description:"Use the `layout` object to customize the order that your API endpoints\nare displayed in the docs site."},"docs.SortByAvailabilityValue":{type:"string",enum:["unset","stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"],description:"An availability to sort by, or `unset` for items without an availability."},"docs.ApiReferenceConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},api:{type:"string"},"api-name":{oneOf:[{type:"string"},{type:"null"}],description:"Name of API that we are referencing"},specs:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiSpecConfiguration"}},{type:"null"}],description:"API specifications to load directly. When provided, these take precedence over the API workspace referenced by `api-name`."},openrpc:{oneOf:[{type:"string"},{type:"null"}],description:"Path to an openrpc spec."},audiences:{oneOf:[{$ref:"#/definitions/docs.Audience"},{type:"null"}]},"display-errors":{oneOf:[{type:"boolean"},{type:"null"}],description:"Defaults to false"},"tag-description-pages":{oneOf:[{type:"boolean"},{type:"null"}],description:"If true, a page will be created for each tag in the OpenAPI spec that contains a description."},snippets:{oneOf:[{$ref:"#/definitions/docs.SnippetsConfiguration"},{type:"null"}]},postman:{oneOf:[{type:"string"},{type:"null"}],description:"URL to a Postman collection for this API reference"},summary:{oneOf:[{type:"string"},{type:"null"}],description:"Relative path to the markdown file"},layout:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.ApiReferenceLayoutItem"}},{type:"null"}],description:"Advanced usage: when specified, this object will be used to customize the order that your API endpoints are displayed in the docs site, including subpackages, and additional markdown pages (to be rendered in between API endpoints). If not specified, the order will be inferred from the OpenAPI Spec or Fern Definition."},collapsed:{oneOf:[{$ref:"#/definitions/docs.CollapsedValue"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},alphabetized:{oneOf:[{type:"boolean"},{type:"null"}],description:"If `alphabetized` is set to true, packages and endpoints will be sorted alphabetically, unless explicitly ordered in the `layout` object."},"sort-by-availability":{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.SortByAvailabilityValue"}},{type:"null"}],description:"Sorts packages and endpoints by availability, unless explicitly ordered in the `layout` object.\nListed availabilities come first, in the order provided. Use `unset` for items without an availability.\nUnlisted availabilities follow in the default order:\n`unset`, `generally-available`, `alpha`, `beta`, `preview`, `legacy`, `deprecated`.\n`stable` is treated as `generally-available`, and `in-development` and `pre-release` are treated as `beta`.\nItems with the same availability keep their existing order (alphabetical when `alphabetized` is true)."},flattened:{oneOf:[{type:"boolean"},{type:"null"}],description:"If `flattened` is set to true, the title specified in `api` will be hidden, and its endpoints and subpackages won't be grouped under it.\n\nThis setting is useful if the API reference is short and you want to display all endpoints at the top level."},paginated:{oneOf:[{type:"boolean"},{type:"null"}],description:"If true, the API reference will be paginated rather than displayed in a single page (long-scrolling)."},playground:{oneOf:[{$ref:"#/definitions/docs.PlaygroundSettings"},{type:"null"}],description:"Settings for the api playground that affects all endpoints."}},required:["api"],additionalProperties:!1},"docs.LibraryName":{type:"string",description:"The name identifier for a library. Used to reference the library in navigation."},"docs.LibraryReferenceConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},library:{$ref:"#/definitions/docs.LibraryName",description:"The name of the library to reference (must match a key in the `libraries` section)."},title:{oneOf:[{type:"string"},{type:"null"}],description:"Override the display title for this library reference."},slug:{oneOf:[{type:"string"},{type:"null"}],description:"Override the URL slug for this library reference."}},required:["library"],additionalProperties:!1,description:"References a library defined in the `libraries` section.\nThe library's generated navigation will be injected at this point."},"docs.ChangelogConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},changelog:{$ref:"#/definitions/docs.ChangelogFolderRelativePath"},title:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]}},required:["changelog"],additionalProperties:!1},"docs.BlogConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},blog:{$ref:"#/definitions/docs.ChangelogFolderRelativePath"},title:{oneOf:[{type:"string"},{type:"null"}]},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]}},required:["blog"],additionalProperties:!1},"docs.TitleSource":{type:"string",enum:["frontmatter","filename"]},"docs.FolderConfiguration":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},folder:{type:"string",description:"The relative path to a folder containing markdown files. Fern will automatically discover and add all markdown files from this folder to the navigation."},title:{oneOf:[{type:"string"},{type:"null"}],description:"The title to display for this folder section. If not provided, the folder name will be used."},"title-source":{oneOf:[{$ref:"#/definitions/docs.TitleSource"},{type:"null"}],description:"Determines how page titles are derived for files in this folder. Options are `frontmatter` (use the `title` field from the file's frontmatter) or `filename` (derive title from the file name). Defaults to `filename`."},slug:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},collapsed:{oneOf:[{$ref:"#/definitions/docs.CollapsedValue"},{type:"null"}],description:"Deprecated. Use `collapsible` and `collapsed-by-default` instead."},collapsible:{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section can be expanded/collapsed by the user."},"collapsed-by-default":{oneOf:[{type:"boolean"},{type:"null"}],description:"Whether the section starts collapsed. Only meaningful when `collapsible` is true. Defaults to false (starts open)."},availability:{oneOf:[{$ref:"#/definitions/docs.Availability"},{type:"null"}]}},required:["folder"],additionalProperties:!1},"docs.NavigationItem":{anyOf:[{$ref:"#/definitions/docs.PageConfiguration"},{$ref:"#/definitions/docs.SectionConfiguration"},{$ref:"#/definitions/docs.ApiReferenceConfiguration"},{$ref:"#/definitions/docs.LibraryReferenceConfiguration"},{$ref:"#/definitions/docs.LinkConfiguration"},{$ref:"#/definitions/docs.ChangelogConfiguration"},{$ref:"#/definitions/docs.BlogConfiguration"},{$ref:"#/definitions/docs.FolderConfiguration"}]},"docs.TabbedNavigationItemWithLayout":{type:"object",properties:{tab:{$ref:"#/definitions/docs.TabId"},layout:{oneOf:[{type:"array",items:{$ref:"#/definitions/docs.NavigationItem"}},{type:"null"}],description:"If `href` is set, `layout` must be null."}},required:["tab"],additionalProperties:!1},"docs.TabVariant":{type:"object",properties:{viewers:{oneOf:[{$ref:"#/definitions/docs.Role"},{type:"null"}]},orphaned:{oneOf:[{type:"boolean"},{type:"null"}],description:"When `orphaned` is set to `true`, the roles will not inherit from parents."},"feature-flag":{oneOf:[{$ref:"#/definitions/docs.FeatureFlagConfiguration"},{type:"null"}]},title:{type:"string"},subtitle:{oneOf:[{type:"string"},{type:"null"}]},icon:{oneOf:[{type:"string"},{type:"null"}]},layout:{type:"array",items:{$ref:"#/definitions/docs.NavigationItem"}},slug:{oneOf:[{type:"string"},{type:"null"}]},"skip-slug":{oneOf:[{type:"boolean"},{type:"null"}]},hidden:{oneOf:[{type:"boolean"},{type:"null"}]},default:{oneOf:[{type:"boolean"},{type:"null"}]}},required:["title","layout"],additionalProperties:!1},"docs.TabbedNavigationItemWithVariants":{type:"object",properties:{tab:{$ref:"#/definitions/docs.TabId"},variants:{type:"array",items:{$ref:"#/definitions/docs.TabVariant"}}},required:["tab","variants"],additionalProperties:!1},"docs.TabbedNavigationItem":{anyOf:[{$ref:"#/definitions/docs.TabbedNavigationItemWithLayout"},{$ref:"#/definitions/docs.TabbedNavigationItemWithVariants"}]},"docs.TabbedNavigationConfig":{type:"array",items:{$ref:"#/definitions/docs.TabbedNavigationItem"}},"docs.UntabbedNavigationConfig":{type:"array",items:{$ref:"#/definitions/docs.NavigationItem"}},"docs.NavigationConfig":{anyOf:[{$ref:"#/definitions/docs.TabbedNavigationConfig"},{$ref:"#/definitions/docs.UntabbedNavigationConfig"}]}},S7h={type:E7h,properties:I7h,required:v7h,additionalProperties:C7h,definitions:x7h};async function Mwt({value:e}){let t=NV(e,_ys);if(t.success){let i=$P(e,[],[]);return{type:"success",contents:Ka.RawSchemas.Serializer.ProductFileConfig.parseOrThrow(i)}}let r=t.error?.instancePath?` at ${t?.error.instancePath}`:"";return{type:"failure",message:`${t.error?.message??"Failed to parse because JSON schema validation failed"}${r}`}}tr();async function GE({absoluteFilepathToConfiguration:e,rawUnresolvedFilepath:t,visitor:r,nodePath:n,willBeUploaded:i=!0}){let o=Xn(Zr(e),t);await r.filepath?.({absoluteFilepath:o,value:t,willBeUploaded:i},[o])}es();ai();ct();X9();tr();var Lwt=require("fs/promises"),Uys=ye(require("path"),1);var VFe=parseInt(process.env.FERN_DOCS_VALIDATION_CONCURRENCY??"32",10);function w7h({apiSection:e,apiWorkspaces:t}){return e.apiName!=null?t.find(r=>r.workspaceName===e.apiName):t.length===1?t[0]:t.find(r=>r.workspaceName==null)}function T7h(e){return e.specs!=null&&e.specs.length>0}async function o$t({absolutePathToFernFolder:e,navigation:t,apiWorkspaces:r,visitor:n,absoluteFilepathToConfiguration:i,context:o,nodePath:s,markdownReader:a}){o.logger.debug(`Starting navigation validation with concurrency limit: ${VFe}`),D7h(t)?await cD(VFe,t,async(c,u)=>{if(Dme(c))await cD(VFe,c.layout,async(l,p)=>{await Vhi({absolutePathToFernFolder:e,navigationItem:l,visitor:n,nodePath:[...s,`${u}`,"layout",`${p}`],absoluteFilepathToConfiguration:i,apiWorkspaces:r,context:o,markdownReader:a})});else if(kme(c)){let l=c.variants.flatMap((p,d)=>p.layout.map((f,m)=>({item:f,variantIdx:d,itemIdx:m})));await cD(VFe,l,async({item:p,variantIdx:d,itemIdx:f})=>{await Vhi({absolutePathToFernFolder:e,navigationItem:p,visitor:n,nodePath:[...s,`${u}`,"variants",`${d}`,"layout",`${f}`],absoluteFilepathToConfiguration:i,apiWorkspaces:r,context:o,markdownReader:a})})}}):await cD(VFe,t,async(c,u)=>{await Vhi({absolutePathToFernFolder:e,navigationItem:c,visitor:n,nodePath:[...s,`${u}`],absoluteFilepathToConfiguration:i,apiWorkspaces:r,context:o,markdownReader:a})})}async function Vhi({absolutePathToFernFolder:e,navigationItem:t,visitor:r,nodePath:n,absoluteFilepathToConfiguration:i,apiWorkspaces:o,context:s,markdownReader:a}){await OV(t,{alphabetized:vt,sortByAvailability:vt,api:vt,apiName:vt,audiences:vt,folder:vt,titleSource:vt,collapsible:vt,collapsedByDefault:vt,openrpc:async l=>{l!=null&&await GE({absoluteFilepathToConfiguration:i,rawUnresolvedFilepath:l,visitor:r,nodePath:[...n,"openrpc"],willBeUploaded:!1})},displayErrors:vt,tagDescriptionPages:vt,snippets:vt,summary:vt,title:vt,layout:vt,collapsed:vt,icon:vt,slug:vt,hidden:vt,skipSlug:vt,paginated:vt,playground:vt,flattened:vt,featureFlag:vt,postman:vt,path:async l=>{l!=null&&await GE({absoluteFilepathToConfiguration:i,rawUnresolvedFilepath:l,visitor:r,nodePath:[...n,"path"],willBeUploaded:!1})},page:vt,contents:async l=>{l!=null&&await Promise.all(l.map(async(p,d)=>{await Vhi({absolutePathToFernFolder:e,navigationItem:p,visitor:r,nodePath:[...n,"contents",`${d}`],absoluteFilepathToConfiguration:i,apiWorkspaces:o,context:s,markdownReader:a})}))},viewers:async l=>{l!=null&&l.length>0&&await r.permissions?.({viewers:l},[...n,"viewers"])},orphaned:vt,availability:vt});let c=P7h(t);if(c!=null){let l=Xn(Zr(i),c);if(await Vt(l)){let d=(await(0,Lwt.stat)(l)).size/(1024*1024);d>1&&s.logger.trace(`Processing large markdown file: ${c} (${d.toFixed(2)} MB)`);let f=await a.readFirstVisit(l);if(f!=null){let m=B7h(t);await r.markdownPage?.({title:m,content:f,absoluteFilepath:l},[...n,c]);try{let g=performance.now(),{filepaths:A}=NY(f,{absolutePathToFernFolder:e,absolutePathToMarkdownFile:l}),y=performance.now()-g;y>2e3&&s.logger.debug(`Slow image path parsing: ${c} took ${y.toFixed(0)}ms`);for(let I of A)await r.filepath?.({absoluteFilepath:I,value:To(e,I),willBeUploaded:!0},[...n,c])}catch(g){s.logger.trace(`Failed to parse image paths in ${c}: ${g}`)}}}}if(R7h(t)){let l=w7h({apiSection:t,apiWorkspaces:o});l!=null?await r.apiSection?.({config:t,workspace:l,context:s},[...n,"api"]):T7h(t)||await r.unresolvedApiSection?.({config:t,apiWorkspaces:o},[...n,"api"])}if(O7h(t)){let l=Xn(Zr(i),t.folder);await Vt(l)&&await Zjl({directoryPath:l,absolutePathToFernFolder:e,visitor:r,nodePath:[...n,"folder"],context:s,markdownReader:a})}let u=Ka.getChangelogFolderFromNavigationItem(t);if(u!=null){let l=Xn(Zr(i),u);if(s.logger.trace(`Starting changelog processing for directory: ${l}`),await Vt(l)){let p=performance.now(),f=(await(0,Lwt.readdir)(l)).filter(g=>g.endsWith(".md")||g.endsWith(".mdx"));s.logger.debug(`Processing ${f.length} changelog files in ${l}`),await cD(VFe,f,async g=>{let A=Xn(l,g),y=await a.readFirstVisit(A);y!=null&&(s.logger.trace(`Validating changelog file: ${g}`),await r.markdownPage?.({title:g,content:y,absoluteFilepath:A},[...n,"changelog",g]))});let m=performance.now()-p;s.logger.debug(`Finished processing ${f.length} changelog files in ${m.toFixed(0)}ms`)}else s.logger.trace(`Changelog directory does not exist: ${l}`)}}function O7h(e){return e?.folder!=null}async function Zjl({directoryPath:e,absolutePathToFernFolder:t,visitor:r,nodePath:n,context:i,markdownReader:o}){let s=await(0,Lwt.readdir)(e,{withFileTypes:!0}),a=s.filter(u=>u.isFile()&&!u.name.startsWith("_")&&(u.name.toLowerCase().endsWith(".md")||u.name.toLowerCase().endsWith(".mdx"))),c=s.filter(u=>u.isDirectory()&&!u.name.startsWith("_"));await cD(VFe,a,async u=>{let l=Be(e,Ae.of(u.name)),d=(await(0,Lwt.stat)(l)).size/(1024*1024);d>1&&i.logger.trace(`Processing large markdown file in folder: ${u.name} (${d.toFixed(2)} MB)`);let f=await o.readFirstVisit(l);if(f==null)return;let m=Uys.default.basename(u.name,Uys.default.extname(u.name));await r.markdownPage?.({title:m,content:f,absoluteFilepath:l},[...n,u.name]);try{let{filepaths:g}=NY(f,{absolutePathToFernFolder:t,absolutePathToMarkdownFile:l});for(let A of g)await r.filepath?.({absoluteFilepath:A,value:To(t,A),willBeUploaded:!0},[...n,u.name])}catch(g){i.logger.trace(`Failed to parse image paths in folder file ${u.name}: ${g}`)}}),await cD(VFe,c,async u=>{let l=Be(e,Ae.of(u.name));await Zjl({directoryPath:l,absolutePathToFernFolder:t,visitor:r,nodePath:[...n,u.name],context:i,markdownReader:o})})}function $jl(e){return e?.page!=null}function ezl(e){return e?.section!=null}function P7h(e){if($jl(e)||ezl(e)&&e.path!=null)return e.path}function B7h(e){return $jl(e)?e.page:ezl(e)?e.section:"Unknown"}function R7h(e){return e?.api!=null}function D7h(e){return e[0]?.tab!=null}async function rzl({contents:e,visitor:t,absoluteFilepathToConfiguration:r,context:n,apiWorkspaces:i,absolutePathToFernFolder:o}){let s=new Uhi;await t.file?.({config:e},[]);let a=async({version:c,product:u,nodePath:l})=>{if(await t.version?.({version:c},l),c.path==null)return;let p=c.path;await GE({absoluteFilepathToConfiguration:r,rawUnresolvedFilepath:p,visitor:t,nodePath:l,willBeUploaded:!1});let d=Xn(Zr(r),p);if(!await Vt(d))return;let f=Cr.load((await(0,Gys.readFile)(d)).toString());await t.versionFile?.({path:p,content:f,version:c,product:u},[p]);let m=await zwt({value:f});m.type==="success"&&await o$t({absolutePathToFernFolder:o,navigation:m.contents.navigation,visitor:t,nodePath:["navigation"],absoluteFilepathToConfiguration:d,apiWorkspaces:i,context:n,markdownReader:s})};await OV(e,{instances:vt,analytics:vt,aiChat:vt,aiSearch:vt,aiExamples:async c=>{c!=null&&typeof c=="object"&&await OV(c,{enabled:vt,style:vt})},pageActions:vt,announcement:vt,backgroundImage:async c=>{c!=null&&(typeof c=="string"?await GE({absoluteFilepathToConfiguration:r,rawUnresolvedFilepath:c,visitor:t,nodePath:["background-image"]}):(c.dark!=null&&await GE({absoluteFilepathToConfiguration:r,rawUnresolvedFilepath:c.dark,visitor:t,nodePath:["background-image","dark"]}),c.light!=null&&await GE({absoluteFilepathToConfiguration:r,rawUnresolvedFilepath:c.light,visitor:t,nodePath:["background-image","light"]})))},colors:vt,css:async c=>{c!=null&&(Array.isArray(c)?await Promise.all(c.map((u,l)=>GE({absoluteFilepathToConfiguration:r,rawUnresolvedFilepath:u,visitor:t,nodePath:["css",`${l}`],willBeUploaded:!1}))):await GE({absoluteFilepathToConfiguration:r,rawUnresolvedFilepath:c,visitor:t,nodePath:["css"],willBeUploaded:!1}))},defaultLanguage:vt,experimental:vt,favicon:async c=>{c!=null&&await GE({absoluteFilepathToConfiguration:r,rawUnresolvedFilepath:c,visitor:t,nodePath:["favicon"]})},footer:async c=>{c!=null&&await GE({absoluteFilepathToConfiguration:r,rawUnresolvedFilepath:c,visitor:t,nodePath:["footer"],willBeUploaded:!1})},footerLinks:vt,header:async c=>{c!=null&&await GE({absoluteFilepathToConfiguration:r,rawUnresolvedFilepath:c,visitor:t,nodePath:["header"],willBeUploaded:!1})},integrations:async c=>{c?.context7!=null&&await GE({absoluteFilepathToConfiguration:r,rawUnresolvedFilepath:c.context7,visitor:t,nodePath:["integrations","context7"],willBeUploaded:!0})},js:async c=>{c!=null&&(Array.isArray(c)?await Promise.all(c.map((u,l)=>tzl({absoluteFilepathToConfiguration:r,visitor:t,script:u,nodePath:["js",`${l}`]}))):await tzl({absoluteFilepathToConfiguration:r,visitor:t,script:c,nodePath:["js"]}))},landingPage:vt,layout:vt,agents:async c=>{c?.llmsTxt!=null&&await GE({absoluteFilepathToConfiguration:r,rawUnresolvedFilepath:c.llmsTxt,visitor:t,nodePath:["agents","llms-txt"],willBeUploaded:!0}),c?.robotsTxt!=null&&await GE({absoluteFilepathToConfiguration:r,rawUnresolvedFilepath:c.robotsTxt,visitor:t,nodePath:["agents","robots-txt"],willBeUploaded:!0}),c?.llmsFullTxt!=null&&await GE({absoluteFilepathToConfiguration:r,rawUnresolvedFilepath:c.llmsFullTxt,visitor:t,nodePath:["agents","llms-full-txt"],willBeUploaded:!0})},settings:vt,logo:async()=>{e.logo?.dark!=null&&await GE({absoluteFilepathToConfiguration:r,rawUnresolvedFilepath:e.logo.dark,visitor:t,nodePath:["logo","dark"]}),e.logo?.light!=null&&await GE({absoluteFilepathToConfiguration:r,rawUnresolvedFilepath:e.logo.light,visitor:t,nodePath:["logo","light"]})},metadata:vt,navbarLinks:vt,navigation:async c=>{if(c==null)return;let u=performance.now();n.logger.debug("[docs-ast] Starting main navigation traversal..."),await o$t({absolutePathToFernFolder:o,navigation:c,visitor:t,nodePath:["navigation"],absoluteFilepathToConfiguration:r,apiWorkspaces:i,context:n,markdownReader:s}),n.logger.debug(`[docs-ast] Main navigation traversal complete in ${(performance.now()-u).toFixed(0)}ms`)},changelog:async c=>{c!=null&&await o$t({absolutePathToFernFolder:o,navigation:[c],visitor:t,nodePath:["changelog"],absoluteFilepathToConfiguration:r,apiWorkspaces:i,context:n,markdownReader:s})},products:async c=>{if(c==null)return;let u=performance.now();n.logger.debug(`[docs-ast] Processing ${c.length} products...`),await Promise.all(c.map(async(l,p)=>{if("path"in l){await GE({absoluteFilepathToConfiguration:r,rawUnresolvedFilepath:l.path,visitor:t,nodePath:["products",`${p}`],willBeUploaded:!1});let d=Xn(Zr(r),l.path),f=Cr.load((await(0,Gys.readFile)(d)).toString());if(await Vt(d)&&await t.productFile?.({path:l.path,content:f,product:l},[l.path]),l.versions!=null&&l.versions.length>0){await Promise.all(l.versions.map((g,A)=>a({version:g,product:l,nodePath:["products",`${p}`,"versions",`${A}`]})));return}let m=await Mwt({value:f});m.type==="success"&&await o$t({absolutePathToFernFolder:o,navigation:m.contents.navigation,visitor:t,nodePath:["navigation"],absoluteFilepathToConfiguration:d,apiWorkspaces:i,context:n,markdownReader:s})}})),n.logger.debug(`[docs-ast] Products processing complete in ${(performance.now()-u).toFixed(0)}ms`)},check:vt,redirects:vt,_absoluteFilepathsToRedirectsFiles:vt,_redirectsFileErrors:vt,tabs:vt,title:vt,typography:async c=>{c!=null&&await OV(c,{bodyFont:async u=>{u!=null&&await Vys({absoluteFilepathToConfiguration:r,visitor:t,font:u,nodePath:["typography","bodyFont"]})},codeFont:async u=>{u!=null&&await Vys({absoluteFilepathToConfiguration:r,visitor:t,font:u,nodePath:["typography","codeFont"]})},headingsFont:async u=>{u!=null&&await Vys({absoluteFilepathToConfiguration:r,visitor:t,font:u,nodePath:["typography","headingsFont"]})}})},versions:async c=>{if(c==null)return;let u=performance.now();n.logger.debug(`[docs-ast] Processing ${c.length} versions...`),await Promise.all(c.map((l,p)=>a({version:l,nodePath:["versions",`${p}`]}))),n.logger.debug(`[docs-ast] Versions processing complete in ${(performance.now()-u).toFixed(0)}ms`)},roles:vt,languages:vt,translations:vt,theme:vt,globalTheme:vt,libraries:vt}),s.logSummary(n.logger,"markdown")}async function Vys({absoluteFilepathToConfiguration:e,visitor:t,font:r,nodePath:n}){r.path!=null&&await GE({absoluteFilepathToConfiguration:e,rawUnresolvedFilepath:r.path,visitor:t,nodePath:n,willBeUploaded:!0});for(let i of r.paths??[])typeof i=="string"?await GE({absoluteFilepathToConfiguration:e,rawUnresolvedFilepath:i,visitor:t,nodePath:n,willBeUploaded:!0}):await GE({absoluteFilepathToConfiguration:e,rawUnresolvedFilepath:i.path,visitor:t,nodePath:n,willBeUploaded:!0})}async function tzl({absoluteFilepathToConfiguration:e,visitor:t,script:r,nodePath:n}){let i=typeof r=="string"?r:"path"in r?r.path:null;i&&await GE({absoluteFilepathToConfiguration:e,rawUnresolvedFilepath:i,visitor:t,nodePath:n,willBeUploaded:!0})}var TAe={};$(TAe,{AccentColorContrastRule:()=>qys,AllRolesMustBeDeclaredRule:()=>Wys,CHANGELOG_FEED_ALLOWED_SLUGS:()=>Zhi,FilepathsExistRule:()=>Ghi,MissingRedirectsRule:()=>WFe,NavigationConflicts:()=>Khi,NoCircularRedirectsRule:()=>_wt,TabWithHrefRule:()=>X7h,TranslationDirectoriesExistRule:()=>Yhi,ValidChangelogSlugRule:()=>Vwt,ValidDocsEndpoints:()=>Gwt,ValidFileTypes:()=>agi,ValidFrontmatter:()=>cgi,ValidMarkdownFileReferences:()=>L6l,ValidMarkdownLinks:()=>C_,ValidMarkdownRule:()=>sAi,ValidRedirectsFilesRule:()=>aAi,ValidSkillsPageActionRule:()=>cAi,ValidTranslationsConfigRule:()=>dAi,ValidWellKnownSkillsRule:()=>mAi,ValidateProductFileRule:()=>hAi,ValidateVersionFileRule:()=>gAi,enforceBackgroundTheme:()=>nzl,findMissingRedirects:()=>u$t,getEffectiveChangelogSlugLastSegment:()=>hzl,isAllowedChangelogSlug:()=>Zys,validateTheme:()=>s$t});ai();rVr();var qys={name:"accent-color-contrast",create:()=>({file:async({config:e})=>{if(e.colors==null)return[];let t=iVr(e.colors);return t==="dark"?s$t(e.colors,"dark"):t==="light"?s$t(e.colors,"light"):t==="darkAndLight"?[...s$t(e.colors,"dark"),...s$t(e.colors,"light")]:[]}})};function s$t(e,t){let r=BUt(e.accentPrimary??e.accentPrimaryDeprecated,"accent-primary",t),n=BUt(e.background,"background",t)??(t==="dark"?"#000":"#FFF"),i=[];if(!us(n).isValid())i.push({severity:"fatal",message:`Invalid background color provided for colors.background.${t}: ${n}.`});else{let o=nzl(us(n),t);us(n).toHexString()!==o.toHexString()&&i.push({severity:"warning",message:`The provided background color for ${t} mode is not ${t} enough. It will be adjusted to ${o.toHexString()}.`}),n=o.toHexString()}if(r==null)i.push({severity:"warning",message:`No accent-color provided for ${t} mode. A random color will be used.`});else if(!us(r).isValid())i.push({severity:"fatal",message:`Invalid accent-color provided for colors.accent-primary.${t}: ${r}.`});else{let o=us.readability(r,n),s=`${o.toFixed(2)}:1`;o<3?i.push({severity:"warning",message:`The contrast ratio between the accent color and the background color for ${t} mode is ${s}. It should be at least 3:1.`}):o<4.5?i.push({severity:"warning",message:`The contrast ratio between the accent color and the background color for ${t} mode is ${s}. Fern will adjust the color to meet the minimum contrast ratio of 4.5:1 for WCAG AA and 7:1 for WCAG AAA.`}):o<7&&i.push({severity:"warning",message:`The contrast ratio between the accent color and the background color for ${t} mode is ${s}. Fern will adjust the color to meet the minimum contrast ratio of 7:1 for WCAG AAA.`})}return i}function nzl(e,t){return t==="dark"&&e.isDark()||t==="light"&&e.isLight()?e:k7h(e)}function k7h(e){if(e==null)return;let{h:t,s:r,v:n}=e.toHsv();return us({h:t,s:r,v:1-n})}var Wys={name:"all-roles-must-be-declared",create:e=>{let t=e.workspace.config.roles;return{permissions:r=>{let n=[...r.viewers??[]],i=[];for(let o of n)(t==null||!t.includes(o))&&i.push({severity:"fatal",message:`Role "${o}" is used but not declared at the top level of the docs.yml file.`});return i}}}};tr();var Ghi={name:"filepaths-exist",create:()=>({filepath:async({absoluteFilepath:e,value:t})=>await Vt(e)?[]:[{severity:"fatal",message:`Path ${t} does not exist`}]})};ct();qI();Ch();Hy();Dt();function QGe(e){if(e instanceof Error)return e.message;if(typeof e=="string")return e;try{let t=JSON.stringify(e);if(t!=null&&t!=="{}")return t}catch{}return Object.prototype.toString.call(e)}qI();function izl(e){return e.split(/[?#]/)[0]??""}function GFe(e){return e.startsWith("/")?e.slice(1):e}function Hys(e){return e.startsWith("/")?e:`/${e}`}function qhi(e){return e.endsWith("/")?e.slice(0,-1):e}function Whi(e){let t=[];return e.config.instances.forEach(r=>{t.push(r.url),typeof r.customDomain=="string"?t.push(r.customDomain):Array.isArray(r.customDomain)&&t.push(...r.customDomain)}),t}function a$t(e){let t=new URL(Mj(e));return{domain:t.host,basePath:t.pathname==="/"||t.pathname===""?void 0:t.pathname}}function ozl(e,t){return t.some(r=>{try{let n=a$t(r);return e.host!==n.domain?!1:n.basePath!=null?e.pathname.startsWith(n.basePath):!0}catch{return!1}})}Ch();function szl(e){let t=qt.NodeCollector.collect(e),r=new Map;for(let n of t.getSlugMapWithParents().values()){let{node:i,parents:o}=n;if(!qt.isPage(i))continue;let s=qt.getPageId(i);if(s==null)continue;let a=i.canonicalSlug??i.slug;if(i.type==="changelogEntry"){let u=o.findLast(l=>l.type==="changelog");u!=null&&qt.hasMetadata(u)&&(a=u.canonicalSlug??u.slug)}let c=r.get(s);c!=null?c.add(a):r.set(s,new Set([a]))}return r}function F7h(e){for(var t=[],r=0;r<e.length;){var n=e[r];if(n==="*"||n==="+"||n==="?"){t.push({type:"MODIFIER",index:r,value:e[r++]});continue}if(n==="\\"){t.push({type:"ESCAPED_CHAR",index:r++,value:e[r++]});continue}if(n==="{"){t.push({type:"OPEN",index:r,value:e[r++]});continue}if(n==="}"){t.push({type:"CLOSE",index:r,value:e[r++]});continue}if(n===":"){for(var i="",o=r+1;o<e.length;){var s=e.charCodeAt(o);if(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||s===95){i+=e[o++];continue}break}if(!i)throw new TypeError("Missing parameter name at ".concat(r));t.push({type:"NAME",index:r,value:i}),r=o;continue}if(n==="("){var a=1,c="",o=r+1;if(e[o]==="?")throw new TypeError('Pattern cannot start with "?" at '.concat(o));for(;o<e.length;){if(e[o]==="\\"){c+=e[o++]+e[o++];continue}if(e[o]===")"){if(a--,a===0){o++;break}}else if(e[o]==="("&&(a++,e[o+1]!=="?"))throw new TypeError("Capturing groups are not allowed at ".concat(o));c+=e[o++]}if(a)throw new TypeError("Unbalanced pattern at ".concat(r));if(!c)throw new TypeError("Missing pattern at ".concat(r));t.push({type:"PATTERN",index:r,value:c}),r=o;continue}t.push({type:"CHAR",index:r,value:e[r++]})}return t.push({type:"END",index:r,value:""}),t}function azl(e,t){t===void 0&&(t={});for(var r=F7h(e),n=t.prefixes,i=n===void 0?"./":n,o=t.delimiter,s=o===void 0?"/#?":o,a=[],c=0,u=0,l="",p=function(O){if(u<r.length&&r[u].type===O)return r[u++].value},d=function(O){var z=p(O);if(z!==void 0)return z;var Y=r[u],te=Y.type,ee=Y.index;throw new TypeError("Unexpected ".concat(te," at ").concat(ee,", expected ").concat(O))},f=function(){for(var O="",z;z=p("CHAR")||p("ESCAPED_CHAR");)O+=z;return O},m=function(O){for(var z=0,Y=s;z<Y.length;z++){var te=Y[z];if(O.indexOf(te)>-1)return!0}return!1},g=function(O){var z=a[a.length-1],Y=O||(z&&typeof z=="string"?z:"");if(z&&!Y)throw new TypeError('Must have text between two parameters, missing text after "'.concat(z.name,'"'));return!Y||m(Y)?"[^".concat(qFe(s),"]+?"):"(?:(?!".concat(qFe(Y),")[^").concat(qFe(s),"])+?")};u<r.length;){var A=p("CHAR"),y=p("NAME"),I=p("PATTERN");if(y||I){var x=A||"";i.indexOf(x)===-1&&(l+=x,x=""),l&&(a.push(l),l=""),a.push({name:y||c++,prefix:x,suffix:"",pattern:I||g(x),modifier:p("MODIFIER")||""});continue}var v=A||p("ESCAPED_CHAR");if(v){l+=v;continue}l&&(a.push(l),l="");var S=p("OPEN");if(S){var x=f(),B=p("NAME")||"",R=p("PATTERN")||"",D=f();d("CLOSE"),a.push({name:B||(R?c++:""),pattern:B&&!R?g(x):R,prefix:x,suffix:D,modifier:p("MODIFIER")||""});continue}d("END")}return a}function czl(e,t){return N7h(azl(e,t),t)}function N7h(e,t){t===void 0&&(t={});var r=Kys(t),n=t.encode,i=n===void 0?function(c){return c}:n,o=t.validate,s=o===void 0?!0:o,a=e.map(function(c){if(typeof c=="object")return new RegExp("^(?:".concat(c.pattern,")$"),r)});return function(c){for(var u="",l=0;l<e.length;l++){var p=e[l];if(typeof p=="string"){u+=p;continue}var d=c?c[p.name]:void 0,f=p.modifier==="?"||p.modifier==="*",m=p.modifier==="*"||p.modifier==="+";if(Array.isArray(d)){if(!m)throw new TypeError('Expected "'.concat(p.name,'" to not repeat, but got an array'));if(d.length===0){if(f)continue;throw new TypeError('Expected "'.concat(p.name,'" to not be empty'))}for(var g=0;g<d.length;g++){var A=i(d[g],p);if(s&&!a[l].test(A))throw new TypeError('Expected all "'.concat(p.name,'" to match "').concat(p.pattern,'", but got "').concat(A,'"'));u+=p.prefix+A+p.suffix}continue}if(typeof d=="string"||typeof d=="number"){var A=i(String(d),p);if(s&&!a[l].test(A))throw new TypeError('Expected "'.concat(p.name,'" to match "').concat(p.pattern,'", but got "').concat(A,'"'));u+=p.prefix+A+p.suffix;continue}if(!f){var y=m?"an array":"a string";throw new TypeError('Expected "'.concat(p.name,'" to be ').concat(y))}}return u}}function Hhi(e,t){var r=[],n=uzl(e,r,t);return j7h(n,r,t)}function j7h(e,t,r){r===void 0&&(r={});var n=r.decode,i=n===void 0?function(o){return o}:n;return function(o){var s=e.exec(o);if(!s)return!1;for(var a=s[0],c=s.index,u=Object.create(null),l=function(d){if(s[d]===void 0)return"continue";var f=t[d-1];f.modifier==="*"||f.modifier==="+"?u[f.name]=s[d].split(f.prefix+f.suffix).map(function(m){return i(m,f)}):u[f.name]=i(s[d],f)},p=1;p<s.length;p++)l(p);return{path:a,index:c,params:u}}}function qFe(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function Kys(e){return e&&e.sensitive?"":"i"}function z7h(e,t){if(!t)return e;for(var r=/\((?:\?<(.*?)>)?(?!\?)/g,n=0,i=r.exec(e.source);i;)t.push({name:i[1]||n++,prefix:"",suffix:"",modifier:"",pattern:""}),i=r.exec(e.source);return e}function Q7h(e,t,r){var n=e.map(function(i){return uzl(i,t,r).source});return new RegExp("(?:".concat(n.join("|"),")"),Kys(r))}function M7h(e,t,r){return L7h(azl(e,r),t,r)}function L7h(e,t,r){r===void 0&&(r={});for(var n=r.strict,i=n===void 0?!1:n,o=r.start,s=o===void 0?!0:o,a=r.end,c=a===void 0?!0:a,u=r.encode,l=u===void 0?function(z){return z}:u,p=r.delimiter,d=p===void 0?"/#?":p,f=r.endsWith,m=f===void 0?"":f,g="[".concat(qFe(m),"]|$"),A="[".concat(qFe(d),"]"),y=s?"^":"",I=0,x=e;I<x.length;I++){var v=x[I];if(typeof v=="string")y+=qFe(l(v));else{var S=qFe(l(v.prefix)),B=qFe(l(v.suffix));if(v.pattern)if(t&&t.push(v),S||B)if(v.modifier==="+"||v.modifier==="*"){var R=v.modifier==="*"?"?":"";y+="(?:".concat(S,"((?:").concat(v.pattern,")(?:").concat(B).concat(S,"(?:").concat(v.pattern,"))*)").concat(B,")").concat(R)}else y+="(?:".concat(S,"(").concat(v.pattern,")").concat(B,")").concat(v.modifier);else{if(v.modifier==="+"||v.modifier==="*")throw new TypeError('Can not repeat "'.concat(v.name,'" without a prefix and suffix'));y+="(".concat(v.pattern,")").concat(v.modifier)}else y+="(?:".concat(S).concat(B,")").concat(v.modifier)}}if(c)i||(y+="".concat(A,"?")),y+=r.endsWith?"(?=".concat(g,")"):"$";else{var D=e[e.length-1],O=typeof D=="string"?A.indexOf(D[D.length-1])>-1:D===void 0;i||(y+="(?:".concat(A,"(?=").concat(g,"))?")),O||(y+="(?=".concat(A,"|").concat(g,")"))}return new RegExp(y,Kys(r))}function uzl(e,t,r){return e instanceof RegExp?z7h(e,t):Array.isArray(e)?Q7h(e,t,r):M7h(e,t,r)}function lzl(e){let t=new Map;for(let r of e){let n=t.get(r.pageId);(n==null||Date.parse(r.lastUpdated)>=Date.parse(n.lastUpdated))&&t.set(r.pageId,r)}return Array.from(t.values())}function pzl(e){return e.endsWith("/")?e.slice(0,-1):e}function _7h(e,t){return t==null||e.startsWith(t)?e:`${pzl(t)}${e.startsWith("/")?"":"/"}${e}`}function U7h(e,t){if(e===t)return!0;try{return Hhi(e)(t)!==!1}catch{return!1}}function V7h(e,t,r){let n=e.startsWith("/")?e:`/${e}`;return t.some(i=>{let o=pzl(_7h(i.source,r));return U7h(o,n)})}function fzl(e,t){let r=new Set;for(let i of t.values())for(let o of i)r.add(o);let n=[];for(let i of e){if(i.slug.trim()==="")continue;let o=t.get(i.pageId);if(o==null){if(r.has(i.slug))continue;n.push({pageId:i.pageId,oldSlug:i.slug,newSlug:void 0})}else if(!o.has(i.slug)){if(r.has(i.slug))continue;let s=o.values().next().value;n.push({pageId:i.pageId,oldSlug:i.slug,newSlug:s})}}return n}function dzl(e,t,r){let n=[];for(let i of e){if(V7h(i.oldSlug,t,r))continue;let o=i.oldSlug.startsWith("/")?i.oldSlug:`/${i.oldSlug}`;if(i.newSlug!=null){let s=i.newSlug.startsWith("/")?i.newSlug:`/${i.newSlug}`;n.push({severity:"warning",message:`Page "${i.pageId}" was moved from "${o}" to "${s}". The old URL will return 404 without a redirect. Add to redirects: [{source: "${o}", destination: "${s}"}]`})}else n.push({severity:"warning",message:`Page "${i.pageId}" was removed. The previously published URL "${o}" will return 404 without a redirect. Consider adding a redirect to preserve existing links.`})}return n}function G7h(){let e;return{context:EIe({logger:lI((r,...n)=>{r==="error"&&(e=n.join(" "))})}),getLastErrorMessage:()=>e}}function q7h(e){return"type"in e&&e.type==="root"}async function W7h(e,t,r,n){try{let i=await fetch(`${e}/slugs/markdowns`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${n}`},body:JSON.stringify({domain:t,basepath:r??""}),signal:AbortSignal.timeout(3e4)});return i.ok?{entries:(await i.json()).entries}:{error:`FDR returned ${i.status}`}}catch(i){return{error:Ti(i)}}}function H7h(){return process.env.FERN_FDR_ORIGIN??process.env.OVERRIDE_FDR_ORIGIN??"https://registry.buildwithfern.com"??"https://registry.buildwithfern.com"}var WFe={name:"missing-redirects",create:async({workspace:e,apiWorkspaces:t,ossWorkspaces:r,logger:n})=>{let i=await u$t({workspace:e,logger:n,instanceUrl:Whi(e)[0],token:(await $w())?.value,resolveLocalDocs:o=>K7h({url:o,workspace:e,apiWorkspaces:t,ossWorkspaces:r})});return i.length===0?{}:{file:()=>i}}};async function u$t({workspace:e,logger:t,instanceUrl:r,token:n,resolveLocalDocs:i}){if(r==null)return c$t({type:"no-instance-url"});let o=a$t(r);if(n==null)return c$t({type:"no-token"});let s=await W7h(H7h(),o.domain,o.basePath,n);if("error"in s)return t.debug(`[missing-redirects] FDR fetch failed: ${s.error}`),c$t({type:"fetch-failed",reason:s.error});if(s.entries.length===0)return t.debug("[missing-redirects] No markdown entries found (first publish or empty slug table)"),c$t({type:"first-publish"});let a;try{let u=(await i(r)).config.root;if(!u||!q7h(u))return[];let l=qt.migrate.FernNavigationV1ToLatest.create().root(u),p=szl(l),d=lzl(s.entries);a=fzl(d,p)}catch(u){let l=QGe(u);return t.debug(`[missing-redirects] Failed to resolve local docs navigation: ${l}`),c$t({type:"resolve-failed",reason:l})}let c=(e.config.redirects??[]).map(u=>({source:u.source,destination:u.destination}));return dzl(a,c,o.basePath)}async function K7h({url:e,workspace:t,apiWorkspaces:r,ossWorkspaces:n}){let{context:i,getLastErrorMessage:o}=G7h(),s=new E_({domain:e,docsWorkspace:t,ossWorkspaces:n,apiWorkspaces:r,taskContext:i,editThisPage:void 0,uploadFiles:void 0,registerApi:void 0,targetAudiences:void 0,buildRefVersions:!1});try{return await s.resolve()}catch(a){throw new Error(o()??QGe(a))}}function c$t(e){switch(e.type){case"no-instance-url":case"first-publish":return[];case"no-token":return[{severity:"warning",message:"Missing redirects check skipped: not authenticated. Run 'fern login' or set the FERN_TOKEN environment variable to enable this check."}];case"fetch-failed":return[{severity:"warning",message:`Missing redirects check skipped: could not reach FDR (${e.reason}). The check requires network access to compare against previously published docs.`}];case"resolve-failed":return[{severity:"warning",message:`Missing redirects check skipped: failed to resolve local docs navigation (${e.reason}). Run \`fern check --log-level=debug\` for more detail.`}]}}var Khi={name:"navigation-conflicts",create:()=>({file:async({config:e})=>{let t=[];return e.navigation!=null&&e.versions!=null&&t.push({severity:"fatal",message:"Cannot contain both navigation and versions. If you want versioned docs, use versions. Otherwise use navigation."}),e.navigation!=null&&e.products!=null&&t.push({severity:"fatal",message:"Cannot contain both navigation and products. If you want multi-product docs, define navigation inside each product file. Otherwise use navigation."}),t}})};function Jhi(e){return e!=="/"&&e.endsWith("/")?e.slice(0,-1):e}function J7h(e){return!e.source.includes(":")&&!e.destination.includes(":")}function Y7h(e){let t=[],r=e.filter(J7h),n=new Map;for(let c=0;c<r.length;c++){let u=r[c];if(u){let l=Jhi(u.source),p=Jhi(u.destination);n.set(l,{destination:p,index:c})}}for(let c=0;c<e.length;c++){let u=e[c];if(u){let l=Jhi(u.source),p=Jhi(u.destination);l===p&&t.push({severity:"error",message:`Redirect from "${u.source}" to "${u.destination}" creates an infinite loop (source equals destination)`})}}let i=new Set,o=new Set;function s(c,u){if(o.has(c)){let d=u.indexOf(c);return u.slice(d)}if(i.has(c))return null;let l=n.get(c);if(!l)return null;i.add(c),o.add(c),u.push(c);let p=s(l.destination,u);return o.delete(c),u.pop(),p}let a=new Set;for(let[c]of n){i.clear(),o.clear();let u=s(c,[]);if(u&&u.length>1){let p=[...u].sort().join(" -> ");if(!a.has(p)){a.add(p);let d=[...u,u[0]].join(" -> ");t.push({severity:"error",message:`Circular redirect chain detected: ${d}`})}}}return t}var _wt={name:"no-circular-redirects",create:()=>({file:async({config:e})=>{let t=[];if(!e.redirects||e.redirects.length===0)return t;let r=e.redirects.map(n=>({source:n.source,destination:n.destination,permanent:n.permanent}));return Y7h(r)}})};ai();var X7h={name:"tab-with-href",create:()=>({file:async({config:e})=>{let t=e.tabs??{};if(e.navigation==null)return[];let r=[];if(Z7h(e.navigation))for(let n of e.navigation){let i=t[n.tab];if(i==null){r.push({severity:"fatal",message:`Tab "${n.tab}" is missing from the tabs configuration.`});continue}let o=Dme(n),s=kme(n);if(i.href!=null&&(o||s)){r.push({severity:"fatal",message:`Tab "${n.tab}" has both a href and ${o?"layout":"variants"}. Only one should be used.`});continue}if(i.href==null&&!o&&!s){r.push({severity:"fatal",message:`Tab "${n.tab}" is missing a href, layout, or variants.`});continue}}return[]}})};function Z7h(e){return Array.isArray(e)&&e.length>0&&e[0].tab!=null}es();tr();var Yhi={name:"translation-directories-exist",create:({workspace:e})=>({file:async({config:t})=>{let r=[],n=t.translations;if(n==null||n.length===0)return r;let i=n.map(u=>Ka.DocsYmlSchemas.normalizeTranslationConfig(u)),o=(i.find(u=>u.default===!0)??i[0])?.lang,s=Be(e.absoluteFilePath,Ae.of("translations")),a=await Vt(s),c=[];for(let u of i){if(u.lang===o)continue;let l=Be(s,Ae.of(u.lang));await Vt(l)||c.push(u.lang)}if(c.length>0){let u=$7h({translationsDirExists:a,missingDirs:c,fernFolderPath:e.absoluteFilePath}),l=" ",p=u.split(`
3926
3926
  `).map(d=>`${l}${d}`).join(`
3927
3927
  `);r.push({severity:"error",message:`Missing translation ${c.length===1?"directory":"directories"} for ${c.length===1?"locale":"locales"}: ${c.join(", ")}
3928
3928
 
@@ -4132,7 +4132,7 @@ ${we.stack}`),Y&&f?.({event:"reload",ok:!1,durationMs:Date.now()-ft,error:In(we)
4132
4132
  `)},rr=[],Ce=!1;if(se.on("all",(We,ft)=>{n.logger.info(de.dim(`[${We}] ${ft}`)),!Ce&&(rr.push($t.of(ft)),Oe!=null&&clearTimeout(Oe),Oe=setTimeout(()=>{(async()=>{Ce=!0;try{let we=z.getFilesToReload(rr);await te(we)&&await Yt()}finally{rr.length=0,Ce=!1}})()},xKg))}),ue){await Ge;return}let ge=`http://localhost:${i}${I}`;n.logger.info(`Docs preview server (Astro) ready on ${ge}`),Y=!0,f?.({event:"ready",url:ge,port:i,backendPort:s,pid:process.pid}),Re.start(),await Ge}async function BKg({bundlePath:e,forceDownload:t,cacheDir:r,context:n}){if(e!=null)return n.logger.info(`Using Astro bundle from path: ${e}`),await FSp($t.of(e));if(t){let a=d2e({astro:!0,cacheDir:r});await Vt(a)&&(n.logger.info("Force download requested. Deleting cached Astro bundle..."),await(0,Pwi.rm)(a,{recursive:!0}))}let i="https://prod-local-preview-astro-bundle.s3.amazonaws.com/";if(i==null)throw new T({message:"Failed to connect to the docs preview server. Please contact support@buildwithfern.com",code:T.Code.InternalError});let o=mqe({astro:!0,cacheDir:r});if((await ver({bucketUrl:i,logger:n.logger,preferCached:!0,astro:!0,tryTar:!0,cacheDir:r})).type==="failure")if(await Vt(o))n.logger.warn("Falling back to cached Astro bundle...");else throw new T({message:"Failed to download the Astro docs preview bundle. Please reach out to support@buildwithfern.com.",code:T.Code.NetworkError});return await FSp(o)}async function FSp(e){let t=Be(e,Ae.of(TKg)),r=OKg;if(await Vt(t)){let i=JSON.parse(await(0,Pwi.readFile)(t,"utf-8"));typeof i.entry=="string"&&(r=i.entry)}let n=Be(e,Ae.of(r));if(!await Vt(n))throw new T({message:`${e} does not contain the Astro preview server (missing ${r}).`,code:T.Code.UserError});return{root:e,entry:n}}function RKg({rendererPort:e,rendererHost:t,mirrorPort:r,basepath:n,reloadClients:i,lifetime:o}){return Zjs.default.createServer((s,a)=>{if(s.url===jSp){a.writeHead(200,{"content-type":"text/event-stream","cache-control":"no-store",connection:"keep-alive"}),a.write(`: connected
4133
4133
 
4134
4134
  `),i.add(a),s.on("close",()=>i.delete(a));return}o.requestStarted(),a.once("close",()=>o.requestFinished());let c=RSp(s.url,n),u=Zjs.default.request(c!=null?{host:"127.0.0.1",port:r,method:s.method,path:c,headers:s.headers}:{host:"127.0.0.1",port:e,method:s.method,path:s.url,headers:{...s.headers,[NSp]: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 f=[];l.on("data",m=>f.push(m)),l.on("end",()=>{let m=Buffer.concat(f).toString("utf-8"),g=m.lastIndexOf("</body>"),A=g>=0?`${m.slice(0,g)}${kSp}${m.slice(g)}`:`${m}${kSp}`,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}
4135
- `)}),s.pipe(u)})}function DKg(){return new Promise((e,t)=>{let r=$js.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 kKg(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=$js.default.connect(e,"127.0.0.1");c.once("connect",()=>{c.destroy(),i()}),c.once("error",()=>{c.destroy(),setTimeout(a,200)})};a()})}ct();Dt();var MSp=/^[a-z0-9-]+-preview-[a-z0-9-]+\.docs\.buildwithfern\.com$/i,zSp="docs.buildwithfern.com",QSp=62;function QWe(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)),MSp.test(t)}function Hir({orgId:e,previewId:t}){let r=e$(t),n=`${e}-preview-${r}.${zSp}`;if(n.length<=QSp)return n;let i=`${e}-preview-`,o=QSp-i.length;if(o<8)throw new T({message:`Organization name "${e}" is too long to generate a valid preview URL`,code:T.Code.ValidationError});let a=r.slice(0,o).replace(/-+$/,"");return`${i}${a}.${zSp}`}ct();qI();Ch();tr();E0();Dt();En();var Ozs=require("child_process"),Zwp=ye(_Sp(),1),Pzs=ye(Twi(),1),Bzs=ye(require("fs"),1),Dzs=require("fs/promises"),$wp=ye(require("http"),1),e1p=ye(require("os"),1),qwi=ye(require("path"),1);Czs();qI();tr();var xzs=require("fs/promises");async function Szs(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 d=n.config.translations?.defaultLocale,f=new Set([...Object.keys(i??{}),...Object.keys(s??{})]);for(let m of f){if(m===d)continue;let g=i?.[m]??{};try{let A=async le=>{let oe=To(c,le),me=Xn(c,Ae.of(`translations/${m}/${oe}`));return await Vt(me)?me:le},y=async le=>{let oe=await A(le),me=await(0,xzs.readFile)(oe,"utf-8"),Se=me.match(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/);return Se!=null?me.slice(Se[0].length):me},I=async le=>{let oe=await A(le);return(0,xzs.readFile)(oe,"utf-8")},x={};for(let[le,oe]of Object.entries(n.pages))oe!=null&&(x[le]=oe);for(let[le,oe]of Object.entries(g))try{let me=x[le],Se=Xn(c,Ae.of(le)),{markdown:Re}=await BF({markdown:oe,absolutePathToFernFolder:c,absolutePathToMarkdownFile:Se,context:t,markdownLoader:y}),ce=await A_({markdown:Re,absolutePathToFernFolder:c,absolutePathToMarkdownFile:Se,context:t,fileLoader:I}),ue=y_({markdown:ce,absolutePathToFernFolder:c,absolutePathToMarkdownFile:Se,context:t}),Oe=rP(ue);Oe=f_(Oe,a,u,{absolutePathToMarkdownFile:Se,absolutePathToFernFolder:c},t),x[le]={markdown:Oe,rawMarkdown:Oe,editThisPageUrl:me?.editThisPageUrl,editThisPageLaunch:me?.editThisPageLaunch}}catch(me){t.logger.warn(`Failed to process translated page "${le}" for locale "${m}": ${String(me)}. Falling back to base page.`)}let v=TGe(n.config.root,g,t),S=o?.[m],B=n.config.announcement,R=n.config.navbarLinks;S!=null&&(v=PGe(v,S),B=BGe(S)??B,S.navbarLinks!=null&&(R=S.navbarLinks));let D=n.apis,O=s?.[m],z=O,Y;if(O!=null&&v!=null){let le=SGe(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.`),z=Object.fromEntries(Object.entries(O).filter(([oe])=>!le.has(oe)))),Y=new Set(Object.keys(O).filter(oe=>!le.has(oe)))}let ee=z!=null&&Object.keys(z).length>0?{...n.apis,...z}:n.apis;O!=null&&Object.keys(O).length>0&&v!=null&&(v=wGe(v,D,O,{rewritableApiIds:Y}));let se={...n,apis:ee,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}tr();var c7=require("fs/promises"),Wwp=require("os"),Tzs=ye(require("path"),1),sYg=".fern",aYg="logs",wzs=100*1024*1024;function cYg(){return"cli@5.180.1"}var GWe=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??Be(Be($t.of((0,Wwp.homedir)()),Ae.of(sYg)),Ae.of(aYg));await Vt(n)||await(0,c7.mkdir)(n,{recursive:!0});let o=`${new Date().toISOString().replace(/[:.]/g,"-")}.debug.log`;this.logFilePath=Be(n,Ae.of(o));let s=["================================================================================","Fern Docs Dev Debug Log",`Session started: ${new Date().toISOString()}`,`Log file: ${Tzs.default.basename(this.logFilePath)}`,"================================================================================",""].join(`
4135
+ `)}),s.pipe(u)})}function DKg(){return new Promise((e,t)=>{let r=$js.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 kKg(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=$js.default.connect(e,"127.0.0.1");c.once("connect",()=>{c.destroy(),i()}),c.once("error",()=>{c.destroy(),setTimeout(a,200)})};a()})}ct();Dt();var MSp=/^[a-z0-9-]+-preview-[a-z0-9-]+\.docs\.buildwithfern\.com$/i,zSp="docs.buildwithfern.com",QSp=62;function QWe(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)),MSp.test(t)}function Hir({orgId:e,previewId:t}){let r=e$(t),n=`${e}-preview-${r}.${zSp}`;if(n.length<=QSp)return n;let i=`${e}-preview-`,o=QSp-i.length;if(o<8)throw new T({message:`Organization name "${e}" is too long to generate a valid preview URL`,code:T.Code.ValidationError});let a=r.slice(0,o).replace(/-+$/,"");return`${i}${a}.${zSp}`}ct();qI();Ch();tr();E0();Dt();En();var Ozs=require("child_process"),Zwp=ye(_Sp(),1),Pzs=ye(Twi(),1),Bzs=ye(require("fs"),1),Dzs=require("fs/promises"),$wp=ye(require("http"),1),e1p=ye(require("os"),1),qwi=ye(require("path"),1);Czs();qI();tr();var xzs=require("fs/promises");async function Szs(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 d=n.config.translations?.defaultLocale,f=new Set([...Object.keys(i??{}),...Object.keys(s??{})]);for(let m of f){if(m===d)continue;let g=i?.[m]??{};try{let A=async le=>{let oe=To(c,le),me=Xn(c,Ae.of(`translations/${m}/${oe}`));return await Vt(me)?me:le},y=async le=>{let oe=await A(le),me=await(0,xzs.readFile)(oe,"utf-8"),Se=me.match(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/);return Se!=null?me.slice(Se[0].length):me},I=async le=>{let oe=await A(le);return(0,xzs.readFile)(oe,"utf-8")},x={};for(let[le,oe]of Object.entries(n.pages))oe!=null&&(x[le]=oe);for(let[le,oe]of Object.entries(g))try{let me=x[le],Se=Xn(c,Ae.of(le)),{markdown:Re}=await BF({markdown:oe,absolutePathToFernFolder:c,absolutePathToMarkdownFile:Se,context:t,markdownLoader:y}),ce=await A_({markdown:Re,absolutePathToFernFolder:c,absolutePathToMarkdownFile:Se,context:t,fileLoader:I}),ue=y_({markdown:ce,absolutePathToFernFolder:c,absolutePathToMarkdownFile:Se,context:t}),Oe=rP(ue);Oe=f_(Oe,a,u,{absolutePathToMarkdownFile:Se,absolutePathToFernFolder:c},t),x[le]={markdown:Oe,rawMarkdown:Oe,editThisPageUrl:me?.editThisPageUrl,editThisPageLaunch:me?.editThisPageLaunch}}catch(me){t.logger.warn(`Failed to process translated page "${le}" for locale "${m}": ${String(me)}. Falling back to base page.`)}let v=TGe(n.config.root,g,t),S=o?.[m],B=n.config.announcement,R=n.config.navbarLinks;S!=null&&(v=PGe(v,S),B=BGe(S)??B,S.navbarLinks!=null&&(R=S.navbarLinks));let D=n.apis,O=s?.[m],z=O,Y;if(O!=null&&v!=null){let le=SGe(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.`),z=Object.fromEntries(Object.entries(O).filter(([oe])=>!le.has(oe)))),Y=new Set(Object.keys(O).filter(oe=>!le.has(oe)))}let ee=z!=null&&Object.keys(z).length>0?{...n.apis,...z}:n.apis;O!=null&&Object.keys(O).length>0&&v!=null&&(v=wGe(v,D,O,{rewritableApiIds:Y}));let se={...n,apis:ee,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}tr();var c7=require("fs/promises"),Wwp=require("os"),Tzs=ye(require("path"),1),sYg=".fern",aYg="logs",wzs=100*1024*1024;function cYg(){return"cli@5.180.2"}var GWe=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??Be(Be($t.of((0,Wwp.homedir)()),Ae.of(sYg)),Ae.of(aYg));await Vt(n)||await(0,c7.mkdir)(n,{recursive:!0});let o=`${new Date().toISOString().replace(/[:.]/g,"-")}.debug.log`;this.logFilePath=Be(n,Ae.of(o));let s=["================================================================================","Fern Docs Dev Debug Log",`Session started: ${new Date().toISOString()}`,`Log file: ${Tzs.default.basename(this.logFilePath)}`,"================================================================================",""].join(`
4136
4136
  `);await(0,c7.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)+`
4137
4137
  `;try{await(0,c7.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:cYg(),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,c7.readdir)(t)).filter(c=>c.endsWith(".log")),i=[];for(let c of n){let u=Tzs.default.join(t,c);try{let l=await(0,c7.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=wzs/1024/1024;if(o<=wzs){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<=wzs)break;if(!(this.logFilePath!=null&&c.fullPath===this.logFilePath))try{await(0,c7.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 Gwi={"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET, POST, OPTIONS","Access-Control-Allow-Headers":"Content-Type"};function Hwp(e){let t=uYg();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[d]of s)try{d.send(l)}catch{p.push(d)}for(let d of p){let f=s.get(d);f&&(clearInterval(f.pingInterval),s.delete(d))}}let c=t.serve({port:r,async fetch(u,l){if(u.method==="OPTIONS")return new Response(null,{status:204,headers:Gwi});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 f=await u.json(),m=o?.(f?.url);return new Response(JSON.stringify(i(m)),{headers:{"Content-Type":"application/json",...Gwi}})}catch{return new Response(JSON.stringify(i()),{headers:{"Content-Type":"application/json",...Gwi}})}let d=/^\/_local\/(.*)/.exec(p.pathname);return u.method==="GET"&&d!=null?new Response(t.file(`/${d[1]}`),{headers:Gwi}):new Response("Not Found",{status:404})},websocket:{open(u){let{connectionId:l}=u.data,p=setInterval(()=>{let d=s.get(u);if(!d)return;let f=Date.now();if(f-d.lastPong>9e4){u.close();return}try{u.send(JSON.stringify({type:"ping",timestamp:f}))}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 d=s.get(u);d&&(d.lastPong=Date.now())}else GWe.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 uYg(){return globalThis.Bun}var Kwp=require("fs"),Jwp=ye(require("path"),1),lYg=`"use strict";
4138
4138
 
@@ -4453,7 +4453,7 @@ ${n}
4453
4453
 
4454
4454
  Add a 'docs:' section to your fern.yml to get started.`,code:T.Code.ConfigError});let i=n.docs.raw.libraries;if(i==null)throw new T({message:`No libraries configured in docs.yml.
4455
4455
 
4456
- Add a 'libraries' section to configure library documentation.`,code:T.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(Zr(s)),c=new Ud({context:t,logLevel:Zn.Info});await car({libraries:i,library:r.library,docsDirectoryPath:a,orgId:n.org,tokenValue:o.value,context:c,wrapStep:TP,docsConfig:n.docs.raw})}};function kVs(e){let t=new DVs;di(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 FVs(e){zA({cli:e,name:"md",subcommands:[kVs,nVs]})}Dt();function lDi(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},Pan(n)),s.version(!1).usage(r)})}ct();qI();Dt();En();ct();Dt();var pDi=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 Ud({context:this.context,task:this.task});try{let s=await vir({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.180.1",loginCommand:"fern auth login"});return o.getResult()===Qf.Failure?{success:!1}:{success:!0,url:s}}catch(s){return{success:!1,error:In(s)}}}};ct();En();var aDt=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(`
4456
+ Add a 'libraries' section to configure library documentation.`,code:T.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(Zr(s)),c=new Ud({context:t,logLevel:Zn.Info});await car({libraries:i,library:r.library,docsDirectoryPath:a,orgId:n.org,tokenValue:o.value,context:c,wrapStep:TP,docsConfig:n.docs.raw})}};function kVs(e){let t=new DVs;di(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 FVs(e){zA({cli:e,name:"md",subcommands:[kVs,nVs]})}Dt();function lDi(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},Pan(n)),s.version(!1).usage(r)})}ct();qI();Dt();En();ct();Dt();var pDi=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 Ud({context:this.context,task:this.task});try{let s=await vir({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.180.2",loginCommand:"fern auth login"});return o.getResult()===Qf.Failure?{success:!1}:{success:!0,url:s}}catch(s){return{success:!1,error:In(s)}}}};ct();En();var aDt=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(`
4457
4457
  `),this.stream.write(`${de.cyan("\u25C6")} ${de.bold(t.title)}
4458
4458
  `),t.subtitle!=null&&this.stream.write(` ${de.dim(t.subtitle)}
4459
4459
  `),this.stream.write(`
@@ -5147,7 +5147,7 @@ ${r}`}function zji(e){let t=this,{emitParseErrors:r,...n}={...t.data("settings")
5147
5147
  `),g="";return c&&(g=l.style.error(c)),[`${p} ${f} ${s}`,[m,g].filter(Boolean).join(`
5148
5148
  `)]});var Bsy=Nx((e,t)=>{let{validate:r=()=>!0}=e,n=pv(e.theme),[i,o]=vu("idle"),[s,a]=vu(),[c,u]=vu(""),l=kx({status:i,theme:n});Fx(async(g,A)=>{if(i==="idle")if(Dx(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),d="",f;e.mask?d=(typeof e.mask=="string"?e.mask:"*").repeat(c.length):i!=="done"&&(f=`${n.style.help("[input is masked]")}${t2t}`),i==="done"&&(d=n.style.answer(d));let m="";return s&&(m=n.style.error(s)),[[l,p,e.mask?d:f].join(" "),m]});var uJe=ye(t1(),1);var Rsy={icon:{cursor:CS.pointer},style:{disabled:e=>uJe.default.dim(`- ${e}`),searchTerm:e=>uJe.default.cyan(e),description:e=>uJe.default.cyan(e),keysHelpTip:e=>e.map(([t,r])=>`${uJe.default.bold(t)} ${uJe.default.dim(r)}`).join(uJe.default.dim(" \u2022 "))},helpMode:"always"};function nia(e){return!Yd.isSeparator(e)&&!e.disabled}function Dsy(e){return e.map(t=>{if(Yd.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 ksy=Nx((e,t)=>{let{pageSize:r=7,validate:n=()=>!0}=e,i=pv(Rsy,e.theme),[o,s]=vu("loading"),[a,c]=vu(""),[u,l]=vu([]),[p,d]=vu(),f=kx({status:o,theme:i}),m=e3(()=>{let z=u.findIndex(nia),Y=u.findLastIndex(nia);return{first:z,last:Y}},[u]),[g=m.first,A]=vu();xU(()=>{let z=new AbortController;return s("loading"),d(void 0),(async()=>{try{let te=await e.source(a||void 0,{signal:z.signal});z.signal.aborted||(A(void 0),d(void 0),l(Dsy(te)),s("idle"))}catch(te){!z.signal.aborted&&te instanceof Error&&d(te.message)}})(),()=>{z.abort()}},[a]);let y=u[g];Fx(async(z,Y)=>{if(Dx(z))if(y){s("loading");let te=await n(y.value);s("idle"),te===!0?(s("done"),t(y.value)):y.name===a?d(te||"You must provide a valid value"):(Y.write(y.name),c(y.name))}else Y.write(a);else if(s0e(z)&&y)Y.clearLine(0),Y.write(y.name),c(y.name);else if(o!=="loading"&&(HR(z)||$6(z))){if(Y.clearLine(0),HR(z)&&g!==m.first||$6(z)&&g!==m.last){let te=HR(z)?-1:1,ee=g;do ee=(ee+te+u.length)%u.length;while(!nia(u[ee]));A(ee)}}else c(Y.line)});let I=i.style.message(e.message,o),x;if(i.helpMode!=="never")if(e.instructions){let{pager:z,navigation:Y}=e.instructions;x=i.style.help(u.length>r?z:Y)}else x=i.style.keysHelpTip([["\u2191\u2193","navigate"],["\u23CE","select"]]);let v=oJe({items:u,active:g,renderItem({item:z,isActive:Y}){if(Yd.isSeparator(z))return` ${z.separator}`;if(z.disabled){let se=typeof z.disabled=="string"?z.disabled:"(disabled)";return i.style.disabled(`${z.name} ${se}`)}let te=Y?i.style.highlight:se=>se,ee=Y?i.icon.cursor:" ";return te(`${ee} ${z.name}`)},pageSize:r,loop:!1}),S;p?S=i.style.error(p):u.length===0&&a!==""&&o==="idle"&&(S=i.style.error("No results found"));let B;if(o==="done"&&y)return[f,I,i.style.answer(y.short)].filter(Boolean).join(" ").trimEnd();B=i.style.searchTerm(a);let R=y?.description,D=[f,I,B].filter(Boolean).join(" ").trimEnd(),O=[S??v," ",R?i.style.description(R):"",x].filter(Boolean).join(`
5149
5149
  `).trimEnd();return[D,O]});var n2t=ye(t1(),1);var Fsy={icon:{cursor:CS.pointer},style:{disabled:e=>n2t.default.dim(`- ${e}`),description:e=>n2t.default.cyan(e),keysHelpTip:e=>e.map(([t,r])=>`${n2t.default.bold(t)} ${n2t.default.dim(r)}`).join(n2t.default.dim(" \u2022 "))},helpMode:"always",indexMode:"hidden",keybindings:[]};function r2t(e){return!Yd.isSeparator(e)&&!e.disabled}function Nsy(e){return e.map(t=>{if(Yd.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 iia=Nx((e,t)=>{let{loop:r=!0,pageSize:n=7}=e,i=pv(Fsy,e.theme),{keybindings:o}=i,[s,a]=vu("idle"),c=kx({status:s,theme:i}),u=iJe(),l=!o.includes("vim"),p=e3(()=>Nsy(e.choices),[e.choices]),d=e3(()=>{let R=p.findIndex(r2t),D=p.findLastIndex(r2t);if(R===-1)throw new rpe("[select prompt] No selectable choices. All choices are disabled.");return{first:R,last:D}},[p]),f=e3(()=>"default"in e?p.findIndex(R=>r2t(R)&&R.value===e.default):-1,[e.default,p]),[m,g]=vu(f===-1?d.first:f),A=p[m];Fx((R,D)=>{if(clearTimeout(u.current),Dx(R))a("done"),t(A.value);else if(HR(R,o)||$6(R,o)){if(D.clearLine(0),r||HR(R,o)&&m!==d.first||$6(R,o)&&m!==d.last){let O=HR(R,o)?-1:1,z=m;do z=(z+O+p.length)%p.length;while(!r2t(p[z]));g(z)}}else if(ulr(R)&&!Number.isNaN(Number(D.line))){let O=Number(D.line)-1,z=-1,Y=p.findIndex(ee=>Yd.isSeparator(ee)?!1:(z++,z===O)),te=p[Y];te!=null&&r2t(te)&&g(Y),u.current=setTimeout(()=>{D.clearLine(0)},700)}else if(tJe(R))D.clearLine(0);else if(l){let O=D.line.toLowerCase(),z=p.findIndex(Y=>Yd.isSeparator(Y)||!r2t(Y)?!1:Y.name.toLowerCase().startsWith(O));z!==-1&&g(z),u.current=setTimeout(()=>{D.clearLine(0)},700)}}),xU(()=>()=>{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=oJe({items:p,active:m,renderItem({item:R,isActive:D,index:O}){if(Yd.isSeparator(R))return x++,` ${R.separator}`;let z=i.indexMode==="number"?`${O+1-x}. `:"";if(R.disabled){let ee=typeof R.disabled=="string"?R.disabled:"(disabled)";return i.style.disabled(`${z}${R.name} ${ee}`)}let Y=D?i.style.highlight:ee=>ee,te=D?i.icon.cursor:" ";return Y(`${te} ${z}${R.name}`)},pageSize:n,loop:r});if(s==="done")return[c,y,i.style.answer(A.short)].filter(Boolean).join(" ");let{description:S}=A;return`${[[c,y].filter(Boolean).join(" "),v," ",S?i.style.description(S):"",I].filter(Boolean).join(`
5150
- `).trimEnd()}${t2t}`});En();qi();var npe={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"},jsy={[npe.GENERATION_STARTED]:!1,[npe.GENERATION_COMPLETED]:!1,[npe.GENERATION_FAILED]:!0,[npe.VERIFICATION_FAILED]:!0,[npe.SDK_PR_CREATED]:!1,[npe.UPGRADE_APPLIED]:!1,[npe.MAJOR_VERSION_BUMP]:!1};function yYp(e){return jsy[e]}function bYp(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 EYp(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 IYp(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 vYp(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 CYp(e){let t=e.join(" ");return/\bautomations\s+generate\b/.test(t)?npe.GENERATION_FAILED:/\bautomations\s+preview\b/.test(t)?npe.VERIFICATION_FAILED:npe.GENERATION_FAILED}var zsy="",Qsy="FERN_AUTOMATION_EVENTS_ORIGIN",Msy=3e3,bzi=class e{static instance;origin;inflight=[];static getInstance(){return e.instance==null&&(e.instance=new e(process.env[Qsy]??zsy)),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(),Msy);try{let s={"content-type":"application/json"},a=await OM();a!=null&&a.value.length>0&&(s.Authorization=`Bearer ${a.value}`);let c=await fetch(n,{method:"POST",headers:s,body:JSON.stringify(vYp(t,r)),signal:i.signal})}catch{return}finally{clearTimeout(o)}}};function xYp(){let{fern_run_id:e,github_run_id:t}=zpe();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.180.1"}}function SYp(){return process.env.FERN_AUTOMATION==="true"}var Lsy=3e3,Ezi=class{constructor(t,r=bzi.getInstance()){this.reporter=t;this.automationEventApiClient=r;this.context=xYp()}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(){let t;try{await Promise.race([this.automationEventApiClient.shutdown(),new Promise(r=>{t=setTimeout(r,Lsy)})])}finally{clearTimeout(t)}}capturePostHogEvent({event:t,context:r}){this.reporter.instrumentPostHogAutomationEvent({distinctId:r.run_id??void 0,event:t.event,properties:bYp(t,r)})}captureSentryForFailure({event:t,context:r,error:n}){if(!(!yYp(t.event)||t.errorCode==null))return this.reporter.captureException(n,{tags:EYp(t,r),context:{automation:IYp(t,r)}})}captureAutomationEventApiEvent(t,r){this.automationEventApiClient.post(t,r)}};Dt();function Izi(e,t,r){if(t instanceof Qc)return;let n=ZMe(t,r?.code),i=r?.argv??process.argv,o=i.join(" "),s=r?.message??(t instanceof Error?t.message:void 0)??"",a=t??new T({message:s,code:n});SYp()?Usy(i,e,n,s,a):_sy(e,o,n,a)}function _sy(e,t,r,n){e.instrumentPostHogEvent({command:t,properties:{failed:!0,errorCode:r}}),zQt(r)&&e.captureException(n,{tags:{"error.code":r}})}function Usy(e,t,r,n,i){let o=CYp(e);t.emitAutomationTelemetryEvent({event:o,errorCode:r,attributes:{error_message:n}},{error:i})}Dt();function lJe(){return process.env.FERN_DISABLE_TELEMETRY==="true"}function vzi({cliName:e,packageVersion:t,isLocal:r}){return lJe()||r?!1:!(t==="0.0.0")&&(e==="fern"&&!0)}var Czi=class{sentry;constructor({release:t,telemetry:r}){let n="https://84f58b5e457f06999d92f11ce4b79158@o4509504076185600.ingest.us.sentry.io/4511021546602496";if(vzi(r)&&n!=null&&n.length>0){let i="production";if(i==null||i.length===0)throw new T({message:"SENTRY_ENVIRONMENT must be set when SENTRY_DSN is configured",code:T.Code.ConfigError});this.sentry=PQt({dsn:n,release:t,environment:i,defaultIntegrations:!1,integrations:[lXe(),hEe(),gEe(),$0e(),mEe()],tracesSampleRate:0,attachStacktrace:!0,sendClientReports:!1}),BQt()}}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):KP(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(()=>{})}};Dt();var xzi=class{originalWrite;redirected=!1;redirect(){if(this.redirected)throw new T({message:"StdoutRedirector: already redirected \u2014 did you forget to restore()?",code:T.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()}}};$me();ct();Hy();Dt();En();var dlr=class{result=Qf.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 Qc(t??(r instanceof Qc?r.failureMessage:this.lastFailureMessage))}failWithoutThrowing(t,r,n){this.result=Qf.Failure,!(r instanceof Qc)&&(t!=null&&(this.lastFailureMessage=t),kqt({message:t,error:r,logger:this.logger}),Izi(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=lI(this.logAtLevel.bind(this));addInteractiveTask({name:t,subtitle:r}){let n=new oia({name:t,subtitle:r,logImmediately:i=>this.logImmediately(i),logPrefix:`${this.logPrefix}${de.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(o){n.failWithoutThrowing(void 0,o)}finally{n.finish()}let i=n.getResult()===Qf.Success;return i||(this.lastFailureMessage=n.getLastFailureMessage()??this.lastFailureMessage),i}printInteractiveTasks({spinner:t}){return this.subtasks.map(r=>r.print({spinner:t})).join(`
5150
+ `).trimEnd()}${t2t}`});En();qi();var npe={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"},jsy={[npe.GENERATION_STARTED]:!1,[npe.GENERATION_COMPLETED]:!1,[npe.GENERATION_FAILED]:!0,[npe.VERIFICATION_FAILED]:!0,[npe.SDK_PR_CREATED]:!1,[npe.UPGRADE_APPLIED]:!1,[npe.MAJOR_VERSION_BUMP]:!1};function yYp(e){return jsy[e]}function bYp(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 EYp(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 IYp(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 vYp(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 CYp(e){let t=e.join(" ");return/\bautomations\s+generate\b/.test(t)?npe.GENERATION_FAILED:/\bautomations\s+preview\b/.test(t)?npe.VERIFICATION_FAILED:npe.GENERATION_FAILED}var zsy="",Qsy="FERN_AUTOMATION_EVENTS_ORIGIN",Msy=3e3,bzi=class e{static instance;origin;inflight=[];static getInstance(){return e.instance==null&&(e.instance=new e(process.env[Qsy]??zsy)),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(),Msy);try{let s={"content-type":"application/json"},a=await OM();a!=null&&a.value.length>0&&(s.Authorization=`Bearer ${a.value}`);let c=await fetch(n,{method:"POST",headers:s,body:JSON.stringify(vYp(t,r)),signal:i.signal})}catch{return}finally{clearTimeout(o)}}};function xYp(){let{fern_run_id:e,github_run_id:t}=zpe();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.180.2"}}function SYp(){return process.env.FERN_AUTOMATION==="true"}var Lsy=3e3,Ezi=class{constructor(t,r=bzi.getInstance()){this.reporter=t;this.automationEventApiClient=r;this.context=xYp()}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(){let t;try{await Promise.race([this.automationEventApiClient.shutdown(),new Promise(r=>{t=setTimeout(r,Lsy)})])}finally{clearTimeout(t)}}capturePostHogEvent({event:t,context:r}){this.reporter.instrumentPostHogAutomationEvent({distinctId:r.run_id??void 0,event:t.event,properties:bYp(t,r)})}captureSentryForFailure({event:t,context:r,error:n}){if(!(!yYp(t.event)||t.errorCode==null))return this.reporter.captureException(n,{tags:EYp(t,r),context:{automation:IYp(t,r)}})}captureAutomationEventApiEvent(t,r){this.automationEventApiClient.post(t,r)}};Dt();function Izi(e,t,r){if(t instanceof Qc)return;let n=ZMe(t,r?.code),i=r?.argv??process.argv,o=i.join(" "),s=r?.message??(t instanceof Error?t.message:void 0)??"",a=t??new T({message:s,code:n});SYp()?Usy(i,e,n,s,a):_sy(e,o,n,a)}function _sy(e,t,r,n){e.instrumentPostHogEvent({command:t,properties:{failed:!0,errorCode:r}}),zQt(r)&&e.captureException(n,{tags:{"error.code":r}})}function Usy(e,t,r,n,i){let o=CYp(e);t.emitAutomationTelemetryEvent({event:o,errorCode:r,attributes:{error_message:n}},{error:i})}Dt();function lJe(){return process.env.FERN_DISABLE_TELEMETRY==="true"}function vzi({cliName:e,packageVersion:t,isLocal:r}){return lJe()||r?!1:!(t==="0.0.0")&&(e==="fern"&&!0)}var Czi=class{sentry;constructor({release:t,telemetry:r}){let n="https://84f58b5e457f06999d92f11ce4b79158@o4509504076185600.ingest.us.sentry.io/4511021546602496";if(vzi(r)&&n!=null&&n.length>0){let i="production";if(i==null||i.length===0)throw new T({message:"SENTRY_ENVIRONMENT must be set when SENTRY_DSN is configured",code:T.Code.ConfigError});this.sentry=PQt({dsn:n,release:t,environment:i,defaultIntegrations:!1,integrations:[lXe(),hEe(),gEe(),$0e(),mEe()],tracesSampleRate:0,attachStacktrace:!0,sendClientReports:!1}),BQt()}}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):KP(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(()=>{})}};Dt();var xzi=class{originalWrite;redirected=!1;redirect(){if(this.redirected)throw new T({message:"StdoutRedirector: already redirected \u2014 did you forget to restore()?",code:T.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()}}};$me();ct();Hy();Dt();En();var dlr=class{result=Qf.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 Qc(t??(r instanceof Qc?r.failureMessage:this.lastFailureMessage))}failWithoutThrowing(t,r,n){this.result=Qf.Failure,!(r instanceof Qc)&&(t!=null&&(this.lastFailureMessage=t),kqt({message:t,error:r,logger:this.logger}),Izi(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=lI(this.logAtLevel.bind(this));addInteractiveTask({name:t,subtitle:r}){let n=new oia({name:t,subtitle:r,logImmediately:i=>this.logImmediately(i),logPrefix:`${this.logPrefix}${de.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(o){n.failWithoutThrowing(void 0,o)}finally{n.finish()}let i=n.getResult()===Qf.Success;return i||(this.lastFailureMessage=n.getLastFailureMessage()??this.lastFailureMessage),i}printInteractiveTasks({spinner:t}){return this.subtasks.map(r=>r.print({spinner:t})).join(`
5151
5151
  `)}},oia=class extends dlr{name;subtitle;constructor({name:t,subtitle:r,...n}){super(n),this.name=t,this.subtitle=r}start(){return super.start(),this.logAtLevelWithOverrides(Zn.Info,["Started."],{omitOnTTY:!0}),this.flushLogs(),this}isStarted(){return this.status!=="notStarted"}finish(){this.status!=="finished"&&(this.result===Qf.Success?this.logAtLevelWithOverrides(Zn.Info,["Finished."],{omitOnTTY:!0}):this.logAtLevelWithOverrides(Zn.Error,["Failed."],{omitOnTTY:!0}),super.finish())}setSubtitle(t){this.subtitle=t}print({spinner:t}){let r=[this.name];return this.subtitle!=null&&r.push(de.dim(this.subtitle)),r.push(...this.subtasks.map(n=>n.print({spinner:t}))),Jz({prefix:this.getIcon({spinner:t}),content:r.join(`
5152
5152
  `)})}printInteractiveTasks({spinner:t}){return this.print({spinner:t})}getIcon({spinner:t}){let r=this.subtasks.length>0;switch(this.status){case"notStarted":return r?de.dim("\u25B8 "):de.dim("\u25E6 ");case"running":return r?de.cyan("\u25BE "):t;case"finished":switch(this.getResult()){case Qf.Success:return r?de.green("\u25BE "):de.green("\u2713 ");case Qf.Failure:return r?de.red("\u25BE "):de.red("x ")}}}getResult(){if(this.result===Qf.Failure)return Qf.Failure;for(let t of this.subtasks)if(t.getResult()===Qf.Failure)return Qf.Failure;return Qf.Success}};Dt();var wYp=ye(eUe(),1);En();function TYp(e){return e.filter(t=>t.isUpgradeAvailable).length>0}function Vsy(e){return(e.cliUpgradeInfo?.isUpgradeAvailable??!1)||TYp(e.generatorUpgradeInfo)}async function OYp({cliEnvironment:e,upgradeInfo:t}){if(!Vsy(t)||e.packageVersion==t.cliUpgradeInfo?.latestVersion)return;let r=`${de.underline("Upgrades available")}
5153
5153
 
@@ -5156,7 +5156,7 @@ ${r}`}function zji(e){let t=this,{emitParseErrors:r,...n}={...t.data("settings")
5156
5156
  Run ${de.cyan("fern generator upgrade")} to upgrade your generators.`),i.length>2&&(r+=`
5157
5157
  Run ${de.cyan("fern generator upgrade --list")} to see the full list of generator upgrades available.`),ndt(r,{padding:1,float:"center",textAlignment:"center",borderColor:"yellow",borderStyle:"round"})}async function sia({generatorUpgradeInfo:e,header:t,limit:r,includeBoxen:n=!0}){if(!TYp(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+=`
5158
5158
  ${await Gsy(a.generatorName)} (${a.apiName!=null?"API: "+a.apiName+", ":""}Group: ${a.generatorGroup}) `+de.dim(a.currentVersion)+de.reset(" \u2192 ")+de.green(a.latestVersion);return i+=`
5159
- `,n?ndt(i,{padding:1,float:"center",textAlignment:"center",borderColor:"yellow",borderStyle:"round"}):i}async function Gsy(e){let r=await new wYp.FernRegistryClient({environment:"https://registry.buildwithfern.com"}).generators.getGeneratorByImage({dockerImage:e});if(!r.ok||r.body==null)throw new T({message:`Generator ${e} not found`,code:T.Code.ConfigError});return r.body.displayName}ai();lhe();Dt();var mlr=ye(qy(),1);function i2t(e){let t;return()=>(t??=e.runTask(r=>Af(r)),t)}function Szi({generatorId:e,candidateVersion:t,currentVersion:r}){if(!PYp(t)||!PYp(r))throw new T({message:`Cannot compare versions for generator "${e}": configured version "${r}", candidate version "${t}". Use valid semantic versions such as 1.2.3.`,code:T.Code.VersionError});try{return t===r?0:Jw(t,r)?1:Jw(r,t)?-1:0}catch{let n=mlr.default.valid(t),i=mlr.default.valid(r);if(n!=null&&i!=null)return Math.sign(mlr.default.compare(n,i));throw new T({message:`Cannot compare versions for generator "${e}": configured version "${r}", candidate version "${t}". Use valid semantic versions such as 1.2.3.`,code:T.Code.VersionError})}}function PYp(e){if(e==="latest"||mlr.default.valid(e)!=null)return!0;try{return yJ(e),!0}catch{return!1}}async function wzi({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 ${fnr} feature flag is off for this organization.`);let a=CNe();if(a==null)throw new Error("FERN_SDK_GEN_API_ORIGIN is required when sdk-gen-api generation is enabled");let c=Xv(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 kxs({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 qsy({cliContext:e,project:t,generatorFilter:r,groupFilter:n,channel:i,includeMajor:o,skipFeatureFlagRequest:s}){let{apiWorkspaces:a}=t,c=i2t(e);if(a.length===1){let l={type:"singleApi",versions:{}};return await BYp({cliContext:e,apiWorkspaces:a,perGeneratorAction:async(p,d,f,m)=>{l.versions[d]==null&&(l.versions[d]={});let g=G_e(f.name);if(g==null){m.logger.debug(`Skipping unknown generator: ${f.name}`);return}let A=await DYp({generatorName:f.name,normalizedGeneratorName:g,cliVersion:e.environment.packageVersion,currentGeneratorVersion:f.version,channel:i,includeMajor:o,organization:t.config.organization,skipFeatureFlagRequest:s,getSdkGenApiToken:c,context:m});A!=null&&(l.versions[d][f.name]={previousVersion:f.version,latestVersion:A})},generatorFilter:r,groupFilter:n}),l}let u={type:"multiApi",versions:{}};return await BYp({cliContext:e,apiWorkspaces:a,perGeneratorAction:async(l,p,d,f)=>{if(l==null)return;u.versions[l]==null&&(u.versions[l]={}),u.versions[l][p]==null&&(u.versions[l][p]={});let m=G_e(d.name);if(m==null){f.logger.debug(`Skipping unknown generator: ${d.name}`);return}let g=await DYp({generatorName:d.name,normalizedGeneratorName:m,cliVersion:e.environment.packageVersion,currentGeneratorVersion:d.version,channel:i,includeMajor:o,organization:t.config.organization,skipFeatureFlagRequest:s,getSdkGenApiToken:c,context:f});g!=null&&(u.versions[l][p][d.name]={previousVersion:d.version,latestVersion:g})},generatorFilter:r,groupFilter:n}),u}async function BYp({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?ag(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 RYp(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=Szi({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 DYp({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 Wsy({organization:s,generatorName:ag(e),skipFeatureFlagRequest:a})?(await wzi({generatorId:ag(e),currentVersion:n,includeMajor:o??!1,channel:i,organization:s,getToken:c,context:u})).compatibleVersion:HB({generatorName:t,cliVersion:r,currentGeneratorVersion:n,channel:i,includeMajor:o,context:u})}async function Tzi({project:e,cliContext:t,generatorFilter:r,groupFilter:n,channel:i,includeMajor:o,skipFeatureFlagRequest:s}){let a=[];if(e!=null){let c=await qsy({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(...RYp(l,u,t.logger));else a.push(...RYp(c.versions,void 0,t.logger))}return a}async function Wsy({organization:e,generatorName:t,skipFeatureFlagRequest:r}){return r===!0?pRs({organization:e,generatorName:t})??!1:eOt({organization:e,generatorName:t})}ct();Dt();Szr();async function a0e({cliEnvironment:e,includePreReleases:t=!1}){if(e.packageName!=="fern-api"||e.packageVersion==="0.0.0")return e.packageVersion;try{return await W6e(e.packageName,{version:t?"prerelease":"latest"})}catch(r){throw new T({message:`Failed to resolve latest CLI version: ${Ti(r)}`,code:T.Code.NetworkError})}}var kYp=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],Ozi=class e{environment;sentryClient;posthogManager;automationTelemetryManager;didSucceed=!0;numTasks=0;ttyAwareLogger;logLevel=Zn.Info;isLocal;stdoutRedirector=new xzi;jsonMode=!1;static async create(t,r,{isLocal:n}){let i=await $Kt();return new e(t,r,{isLocal:n,posthogManager:i})}constructor(t,r,{isLocal:n,posthogManager:i}){this.ttyAwareLogger=new Jqt(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 Czi({release:`cli@${this.environment.packageVersion}`,telemetry:{cliName:this.environment.cliName,packageVersion:this.environment.packageVersion,isLocal:this.isLocal}}),this.automationTelemetryManager=new Ezi(this)}getPackageName(){return"fern-api"}getPackageVersion(){return"5.180.1"}getCliName(){return"fern"}setLogLevel(t){this.logLevel=t}logFernVersionDebug(){this.logger.debug(`Running ${de.bold(`${this.environment.cliName}`)} (${this.environment.packageName}@${this.environment.packageVersion})`)}failAndThrow(t,r,n){throw this.failWithoutThrowing(t,r,n),new Qc(t??(r instanceof Qc?r.failureMessage:r!=null?In(r):void 0))}failWithoutThrowing(t,r,n){this.didSucceed=!1,!(r instanceof Qc)&&(kqt({message:t,error:r,logger:this.logger}),Izi(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)+`
5159
+ `,n?ndt(i,{padding:1,float:"center",textAlignment:"center",borderColor:"yellow",borderStyle:"round"}):i}async function Gsy(e){let r=await new wYp.FernRegistryClient({environment:"https://registry.buildwithfern.com"}).generators.getGeneratorByImage({dockerImage:e});if(!r.ok||r.body==null)throw new T({message:`Generator ${e} not found`,code:T.Code.ConfigError});return r.body.displayName}ai();lhe();Dt();var mlr=ye(qy(),1);function i2t(e){let t;return()=>(t??=e.runTask(r=>Af(r)),t)}function Szi({generatorId:e,candidateVersion:t,currentVersion:r}){if(!PYp(t)||!PYp(r))throw new T({message:`Cannot compare versions for generator "${e}": configured version "${r}", candidate version "${t}". Use valid semantic versions such as 1.2.3.`,code:T.Code.VersionError});try{return t===r?0:Jw(t,r)?1:Jw(r,t)?-1:0}catch{let n=mlr.default.valid(t),i=mlr.default.valid(r);if(n!=null&&i!=null)return Math.sign(mlr.default.compare(n,i));throw new T({message:`Cannot compare versions for generator "${e}": configured version "${r}", candidate version "${t}". Use valid semantic versions such as 1.2.3.`,code:T.Code.VersionError})}}function PYp(e){if(e==="latest"||mlr.default.valid(e)!=null)return!0;try{return yJ(e),!0}catch{return!1}}async function wzi({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 ${fnr} feature flag is off for this organization.`);let a=CNe();if(a==null)throw new Error("FERN_SDK_GEN_API_ORIGIN is required when sdk-gen-api generation is enabled");let c=Xv(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 kxs({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 qsy({cliContext:e,project:t,generatorFilter:r,groupFilter:n,channel:i,includeMajor:o,skipFeatureFlagRequest:s}){let{apiWorkspaces:a}=t,c=i2t(e);if(a.length===1){let l={type:"singleApi",versions:{}};return await BYp({cliContext:e,apiWorkspaces:a,perGeneratorAction:async(p,d,f,m)=>{l.versions[d]==null&&(l.versions[d]={});let g=G_e(f.name);if(g==null){m.logger.debug(`Skipping unknown generator: ${f.name}`);return}let A=await DYp({generatorName:f.name,normalizedGeneratorName:g,cliVersion:e.environment.packageVersion,currentGeneratorVersion:f.version,channel:i,includeMajor:o,organization:t.config.organization,skipFeatureFlagRequest:s,getSdkGenApiToken:c,context:m});A!=null&&(l.versions[d][f.name]={previousVersion:f.version,latestVersion:A})},generatorFilter:r,groupFilter:n}),l}let u={type:"multiApi",versions:{}};return await BYp({cliContext:e,apiWorkspaces:a,perGeneratorAction:async(l,p,d,f)=>{if(l==null)return;u.versions[l]==null&&(u.versions[l]={}),u.versions[l][p]==null&&(u.versions[l][p]={});let m=G_e(d.name);if(m==null){f.logger.debug(`Skipping unknown generator: ${d.name}`);return}let g=await DYp({generatorName:d.name,normalizedGeneratorName:m,cliVersion:e.environment.packageVersion,currentGeneratorVersion:d.version,channel:i,includeMajor:o,organization:t.config.organization,skipFeatureFlagRequest:s,getSdkGenApiToken:c,context:f});g!=null&&(u.versions[l][p][d.name]={previousVersion:d.version,latestVersion:g})},generatorFilter:r,groupFilter:n}),u}async function BYp({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?ag(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 RYp(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=Szi({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 DYp({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 Wsy({organization:s,generatorName:ag(e),skipFeatureFlagRequest:a})?(await wzi({generatorId:ag(e),currentVersion:n,includeMajor:o??!1,channel:i,organization:s,getToken:c,context:u})).compatibleVersion:HB({generatorName:t,cliVersion:r,currentGeneratorVersion:n,channel:i,includeMajor:o,context:u})}async function Tzi({project:e,cliContext:t,generatorFilter:r,groupFilter:n,channel:i,includeMajor:o,skipFeatureFlagRequest:s}){let a=[];if(e!=null){let c=await qsy({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(...RYp(l,u,t.logger));else a.push(...RYp(c.versions,void 0,t.logger))}return a}async function Wsy({organization:e,generatorName:t,skipFeatureFlagRequest:r}){return r===!0?pRs({organization:e,generatorName:t})??!1:eOt({organization:e,generatorName:t})}ct();Dt();Szr();async function a0e({cliEnvironment:e,includePreReleases:t=!1}){if(e.packageName!=="fern-api"||e.packageVersion==="0.0.0")return e.packageVersion;try{return await W6e(e.packageName,{version:t?"prerelease":"latest"})}catch(r){throw new T({message:`Failed to resolve latest CLI version: ${Ti(r)}`,code:T.Code.NetworkError})}}var kYp=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],Ozi=class e{environment;sentryClient;posthogManager;automationTelemetryManager;didSucceed=!0;numTasks=0;ttyAwareLogger;logLevel=Zn.Info;isLocal;stdoutRedirector=new xzi;jsonMode=!1;static async create(t,r,{isLocal:n}){let i=await $Kt();return new e(t,r,{isLocal:n,posthogManager:i})}constructor(t,r,{isLocal:n,posthogManager:i}){this.ttyAwareLogger=new Jqt(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 Czi({release:`cli@${this.environment.packageVersion}`,telemetry:{cliName:this.environment.cliName,packageVersion:this.environment.packageVersion,isLocal:this.isLocal}}),this.automationTelemetryManager=new Ezi(this)}getPackageName(){return"fern-api"}getPackageVersion(){return"5.180.2"}getCliName(){return"fern"}setLogLevel(t){this.logLevel=t}logFernVersionDebug(){this.logger.debug(`Running ${de.bold(`${this.environment.cliName}`)} (${this.environment.packageName}@${this.environment.packageVersion})`)}failAndThrow(t,r,n){throw this.failWithoutThrowing(t,r,n),new Qc(t??(r instanceof Qc?r.failureMessage:r!=null?In(r):void 0))}failWithoutThrowing(t,r,n){this.didSucceed=!1,!(r instanceof Qc)&&(kqt({message:t,error:r,logger:this.logger}),Izi(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)+`
5160
5160
  `)}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 Promise.all([this.posthogManager.flush(),K$o()])}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 OYp({cliEnvironment:this.environment,upgradeInfo:t});r!=null&&(r.endsWith(`
5161
5161
  `)||(r+=`
5162
5162
  `),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=M9i(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 dlr(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){let s=o instanceof Qc?o.failureMessage??n.getLastFailureMessage():In(o);throw n.failWithoutThrowing(void 0,o),new Qc(s)}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=lI((t,...r)=>this.log(t,...r));stderr=lI((t,...r)=>this.logStderr(t,...r));constructTaskInitForWorkspace(t){let r=t.type==="docs"?"docs":t.workspaceName??"api",n=FYp(r),i=1+(this.longestWorkspaceName!=null?FYp(this.longestWorkspaceName):n).length,o=n.padEnd(i),s=kYp[this.numTasks++%kYp.length],a=de.hex(s)(o);return{...this.constructTaskInit(),logPrefix:a,title:de.hex(s).bold(r)}}constructTaskInit(){return{logImmediately:t=>this.logImmediately(t),takeOverTerminal:t=>this.ttyAwareLogger.takeOverTerminal(t),onResult:t=>{t===Qf.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=>bw.indexOf(i.level)>=bw.indexOf(this.logLevel));this.ttyAwareLogger.log(n,{includeDebugInfo:this.logLevel===Zn.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 a0e({cliEnvironment:this.environment,includePreReleases:t}),i=Jw(n,this.environment.packageVersion);this.logger.debug(`Latest version: ${n}. `+(i?"Upgrade available.":"No upgrade available."));let o={isUpgradeAvailable:i,latestVersion:n},s=await Tzi({project:this.project,cliContext:this,skipFeatureFlagRequest:r});this._isUpgradeAvailable={cliUpgradeInfo:o,generatorUpgradeInfo:s}}return this._isUpgradeAvailable}async confirmPrompt(t,r=!1,{nonInteractiveError:n}={}){return this.selectPrompt({message:t,nonInteractiveError:n,choices:[{name:"No",value:!1},{name:"Yes",value:!0}],default:r})}async selectPrompt({message:t,choices:r,default:n,nonInteractiveError:i}){this.assertInteractive(t,i);try{return await iia({message:t,choices:r,default:n,theme:{prefix:de.yellow("?"),style:{answer:o=>de.cyan(o),message:o=>de.bold(o),highlight:o=>de.cyan(o)}}})}catch(o){throw o?.name==="ExitPromptError"&&this.abortCancelledPrompt(),o}}async checkboxPrompt({message:t,choices:r,required:n=!1,validate:i,nonInteractiveError:o}){this.assertInteractive(t,o);try{return await eia({message:t,choices:r,required:n,validate:i==null?void 0:s=>i(s.map(a=>a.value)),theme:{prefix:de.yellow("?"),style:{answer:s=>de.cyan(s),message:s=>de.bold(s),highlight:s=>de.cyan(s)}}})}catch(s){throw s?.name==="ExitPromptError"&&this.abortCancelledPrompt(),s}}async getInput(t){this.assertInteractive(t.message,t.nonInteractiveError);try{return await tia({message:t.message,default:t.default})}catch(r){throw r?.name==="ExitPromptError"&&this.abortCancelledPrompt(),r}}abortCancelledPrompt(){throw this.logger.info(`