fern-api 5.80.1 → 5.80.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 +7 -7
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -171,7 +171,7 @@ GFS4: `),console.error(e)});mE[kO]||(NLa=global[kO]||[],QLa(mE,NLa),mE.close=(fu
171
171
  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 Mye(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:hKe(t,"input",e.processors),output:hKe(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function eF(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 eF(n.element,r);if(n.type==="set")return eF(n.valueType,r);if(n.type==="lazy")return eF(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 eF(n.innerType,r);if(n.type==="intersection")return eF(n.left,r)||eF(n.right,r);if(n.type==="record"||n.type==="map")return eF(n.keyType,r)||eF(n.valueType,r);if(n.type==="pipe")return eF(n.in,r)||eF(n.out,r);if(n.type==="object"){for(let i in n.shape)if(eF(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(let i of n.options)if(eF(i,r))return!0;return!1}if(n.type==="tuple"){for(let i of n.items)if(eF(i,r))return!0;return!!(n.rest&&eF(n.rest,r))}return!1}var n7i,hKe,zRt=h(()=>{"use strict";NRt();n7i=(e,t={})=>r=>{let n=Qye({...r,processors:t});return Nh(e,n),zye(n,e),Mye(n,e)},hKe=(e,t,r={})=>n=>{let{libraryOptions:i,target:o}=n??{},s=Qye({...i??{},target:o,io:t,processors:r});return Nh(e,s),zye(s,e),Mye(s,e)}});function Qbr(e,t){if("_idmap"in e){let n=e,i=Qye({...t,processors:Fbr}),o={};for(let c of n._idmap.entries()){let[u,l]=c;Nh(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;zye(i,l),s[u]=Mye(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=Qye({...t,processors:Fbr});return Nh(e,r),zye(r,e),Mye(r,e)}var VIf,i7i,o7i,s7i,a7i,c7i,u7i,l7i,p7i,f7i,d7i,m7i,h7i,g7i,A7i,y7i,b7i,E7i,I7i,v7i,x7i,C7i,w7i,S7i,T7i,O7i,Nbr,B7i,P7i,D7i,R7i,k7i,F7i,N7i,j7i,Q7i,z7i,M7i,jbr,L7i,Fbr,MRt=h(()=>{"use strict";zRt();za();VIf={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},i7i=(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=VIf[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}))])}},o7i=(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)},s7i=(e,t,r,n)=>{r.type="boolean"},a7i=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},c7i=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},u7i=(e,t,r,n)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},l7i=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},p7i=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},f7i=(e,t,r,n)=>{r.not={}},d7i=(e,t,r,n)=>{},m7i=(e,t,r,n)=>{},h7i=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},g7i=(e,t,r,n)=>{let i=e._zod.def,o=bRt(i.entries);o.every(s=>typeof s=="number")&&(r.type="number"),o.every(s=>typeof s=="string")&&(r.type="string"),r.enum=o},A7i=(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},y7i=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},b7i=(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},E7i=(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)},I7i=(e,t,r,n)=>{r.type="boolean"},v7i=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},x7i=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},C7i=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},w7i=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},S7i=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},T7i=(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=Nh(o.element,t,{...n,path:[...n.path,"items"]})},O7i=(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]=Nh(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=Nh(o.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},Nbr=(e,t,r,n)=>{let i=e._zod.def,o=i.inclusive===!1,s=i.options.map((a,c)=>Nh(a,t,{...n,path:[...n.path,o?"oneOf":"anyOf",c]}));o?r.oneOf=s:r.anyOf=s},B7i=(e,t,r,n)=>{let i=e._zod.def,o=Nh(i.left,t,{...n,path:[...n.path,"allOf",0]}),s=Nh(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},P7i=(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)=>Nh(d,t,{...n,path:[...n.path,s,f]})),u=o.rest?Nh(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)},D7i=(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=Nh(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=Nh(o.keyType,t,{...n,path:[...n.path,"propertyNames"]})),i.additionalProperties=Nh(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)}},R7i=(e,t,r,n)=>{let i=e._zod.def,o=Nh(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"}]},k7i=(e,t,r,n)=>{let i=e._zod.def;Nh(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType},F7i=(e,t,r,n)=>{let i=e._zod.def;Nh(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},N7i=(e,t,r,n)=>{let i=e._zod.def;Nh(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)))},j7i=(e,t,r,n)=>{let i=e._zod.def;Nh(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},Q7i=(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;Nh(o,t,n);let s=t.seen.get(e);s.ref=o},z7i=(e,t,r,n)=>{let i=e._zod.def;Nh(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType,r.readOnly=!0},M7i=(e,t,r,n)=>{let i=e._zod.def;Nh(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType},jbr=(e,t,r,n)=>{let i=e._zod.def;Nh(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType},L7i=(e,t,r,n)=>{let i=e._zod.innerType;Nh(i,t,n);let o=t.seen.get(e);o.ref=i},Fbr={string:i7i,number:o7i,boolean:s7i,bigint:a7i,symbol:c7i,null:u7i,undefined:l7i,void:p7i,never:f7i,any:d7i,unknown:m7i,date:h7i,enum:g7i,literal:A7i,nan:y7i,template_literal:b7i,file:E7i,success:I7i,custom:v7i,function:x7i,transform:C7i,map:w7i,set:S7i,array:T7i,object:O7i,union:Nbr,intersection:B7i,tuple:P7i,record:D7i,nullable:R7i,nonoptional:k7i,default:F7i,prefault:N7i,catch:j7i,pipe:Q7i,readonly:z7i,promise:M7i,optional:jbr,lazy:L7i}});var zbr,uVa=h(()=>{"use strict";MRt();zRt();zbr=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=Qye({processors:Fbr,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 Nh(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)),zye(this.ctx,t);let n=Mye(this.ctx,t),{"~standard":i,...o}=n;return o}}});var lVa={};var pVa=h(()=>{"use strict"});var Aue={};X(Aue,{$ZodAny:()=>kqi,$ZodArray:()=>zqi,$ZodAsyncError:()=>A7,$ZodBase64:()=>xqi,$ZodBase64URL:()=>Cqi,$ZodBigInt:()=>tbr,$ZodBigIntFormat:()=>Bqi,$ZodBoolean:()=>PRt,$ZodCIDRv4:()=>Eqi,$ZodCIDRv6:()=>Iqi,$ZodCUID:()=>cqi,$ZodCUID2:()=>uqi,$ZodCatch:()=>rGi,$ZodCheck:()=>wA,$ZodCheckBigIntFormat:()=>j9i,$ZodCheckEndsWith:()=>K9i,$ZodCheckGreaterThan:()=>Hyr,$ZodCheckIncludes:()=>W9i,$ZodCheckLengthEquals:()=>V9i,$ZodCheckLessThan:()=>Wyr,$ZodCheckLowerCase:()=>q9i,$ZodCheckMaxLength:()=>L9i,$ZodCheckMaxSize:()=>Q9i,$ZodCheckMimeType:()=>Y9i,$ZodCheckMinLength:()=>U9i,$ZodCheckMinSize:()=>z9i,$ZodCheckMultipleOf:()=>F9i,$ZodCheckNumberFormat:()=>N9i,$ZodCheckOverwrite:()=>X9i,$ZodCheckProperty:()=>J9i,$ZodCheckRegex:()=>_9i,$ZodCheckSizeEquals:()=>M9i,$ZodCheckStartsWith:()=>H9i,$ZodCheckStringFormat:()=>eKe,$ZodCheckUpperCase:()=>G9i,$ZodCodec:()=>RRt,$ZodCustom:()=>lGi,$ZodCustomStringFormat:()=>Tqi,$ZodDate:()=>Qqi,$ZodDefault:()=>Zqi,$ZodDiscriminatedUnion:()=>Uqi,$ZodE164:()=>wqi,$ZodEmail:()=>iqi,$ZodEmoji:()=>sqi,$ZodEncodeError:()=>Pye,$ZodEnum:()=>Wqi,$ZodError:()=>CRt,$ZodExactOptional:()=>Yqi,$ZodFile:()=>Kqi,$ZodFunction:()=>aGi,$ZodGUID:()=>rqi,$ZodIPv4:()=>Aqi,$ZodIPv6:()=>yqi,$ZodISODate:()=>mqi,$ZodISODateTime:()=>dqi,$ZodISODuration:()=>gqi,$ZodISOTime:()=>hqi,$ZodIntersection:()=>Vqi,$ZodJWT:()=>Sqi,$ZodKSUID:()=>fqi,$ZodLazy:()=>uGi,$ZodLiteral:()=>Hqi,$ZodMAC:()=>bqi,$ZodMap:()=>qqi,$ZodNaN:()=>nGi,$ZodNanoID:()=>aqi,$ZodNever:()=>Nqi,$ZodNonOptional:()=>eGi,$ZodNull:()=>Rqi,$ZodNullable:()=>Xqi,$ZodNumber:()=>ebr,$ZodNumberFormat:()=>Oqi,$ZodObject:()=>A4a,$ZodObjectJIT:()=>Mqi,$ZodOptional:()=>nbr,$ZodPipe:()=>iGi,$ZodPrefault:()=>$qi,$ZodPromise:()=>cGi,$ZodReadonly:()=>oGi,$ZodRealError:()=>Tj,$ZodRecord:()=>_qi,$ZodRegistry:()=>abr,$ZodSet:()=>Gqi,$ZodString:()=>mNe,$ZodStringFormat:()=>$g,$ZodSuccess:()=>tGi,$ZodSymbol:()=>Pqi,$ZodTemplateLiteral:()=>sGi,$ZodTransform:()=>Jqi,$ZodTuple:()=>rbr,$ZodType:()=>zu,$ZodULID:()=>lqi,$ZodURL:()=>oqi,$ZodUUID:()=>nqi,$ZodUndefined:()=>Dqi,$ZodUnion:()=>DRt,$ZodUnknown:()=>Fqi,$ZodVoid:()=>jqi,$ZodXID:()=>pqi,$ZodXor:()=>Lqi,$brand:()=>Pyr,$constructor:()=>Ir,$input:()=>AGi,$output:()=>gGi,Doc:()=>BRt,JSONSchema:()=>lVa,JSONSchemaGenerator:()=>zbr,NEVER:()=>_8i,TimePrecision:()=>IGi,_any:()=>VGi,_array:()=>JGi,_base64:()=>wbr,_base64url:()=>Sbr,_bigint:()=>NGi,_boolean:()=>kGi,_catch:()=>jIf,_check:()=>aVa,_cidrv4:()=>xbr,_cidrv6:()=>Cbr,_coercedBigint:()=>jGi,_coercedBoolean:()=>FGi,_coercedDate:()=>HGi,_coercedNumber:()=>TGi,_coercedString:()=>bGi,_cuid:()=>gbr,_cuid2:()=>Abr,_custom:()=>XGi,_date:()=>WGi,_decode:()=>jyr,_decodeAsync:()=>zyr,_default:()=>kIf,_discriminatedUnion:()=>IIf,_e164:()=>Tbr,_email:()=>ubr,_emoji:()=>mbr,_encode:()=>Nyr,_encodeAsync:()=>Qyr,_endsWith:()=>aKe,_enum:()=>TIf,_file:()=>YGi,_float32:()=>BGi,_float64:()=>PGi,_gt:()=>FY,_gte:()=>$k,_guid:()=>jRt,_includes:()=>oKe,_int:()=>OGi,_int32:()=>DGi,_int64:()=>QGi,_intersection:()=>vIf,_ipv4:()=>Ibr,_ipv6:()=>vbr,_isoDate:()=>xGi,_isoDateTime:()=>vGi,_isoDuration:()=>wGi,_isoTime:()=>CGi,_jwt:()=>Obr,_ksuid:()=>Ebr,_lazy:()=>LIf,_length:()=>ANe,_literal:()=>BIf,_lowercase:()=>nKe,_lt:()=>kY,_lte:()=>$6,_mac:()=>EGi,_map:()=>wIf,_max:()=>$6,_maxLength:()=>gNe,_maxSize:()=>jye,_mime:()=>cKe,_min:()=>$k,_minLength:()=>gue,_minSize:()=>NY,_multipleOf:()=>Nye,_nan:()=>KGi,_nanoid:()=>hbr,_nativeEnum:()=>OIf,_negative:()=>Pbr,_never:()=>qGi,_nonnegative:()=>Rbr,_nonoptional:()=>FIf,_nonpositive:()=>Dbr,_normalize:()=>uKe,_null:()=>UGi,_nullable:()=>RIf,_number:()=>SGi,_optional:()=>DIf,_overwrite:()=>y7,_parse:()=>YHe,_parseAsync:()=>XHe,_pipe:()=>QIf,_positive:()=>Bbr,_promise:()=>UIf,_property:()=>kbr,_readonly:()=>zIf,_record:()=>CIf,_refine:()=>ZGi,_regex:()=>rKe,_safeDecode:()=>Lyr,_safeDecodeAsync:()=>Vyr,_safeEncode:()=>Myr,_safeEncodeAsync:()=>Uyr,_safeParse:()=>ZHe,_safeParseAsync:()=>$He,_set:()=>SIf,_size:()=>hNe,_slugify:()=>dKe,_startsWith:()=>sKe,_string:()=>yGi,_stringFormat:()=>mKe,_stringbool:()=>r7i,_success:()=>NIf,_superRefine:()=>$Gi,_symbol:()=>MGi,_templateLiteral:()=>MIf,_toLowerCase:()=>pKe,_toUpperCase:()=>fKe,_transform:()=>PIf,_trim:()=>lKe,_tuple:()=>xIf,_uint32:()=>RGi,_uint64:()=>zGi,_ulid:()=>ybr,_undefined:()=>LGi,_union:()=>bIf,_unknown:()=>_Gi,_uppercase:()=>iKe,_url:()=>QRt,_uuid:()=>lbr,_uuidv4:()=>pbr,_uuidv6:()=>fbr,_uuidv7:()=>dbr,_void:()=>GGi,_xid:()=>bbr,_xor:()=>EIf,clone:()=>Zk,config:()=>yI,createStandardJSONSchemaMethod:()=>hKe,createToJSONSchemaMethod:()=>n7i,decode:()=>q0f,decodeAsync:()=>W0f,describe:()=>e7i,encode:()=>_0f,encodeAsync:()=>G0f,extractDefs:()=>zye,finalize:()=>Mye,flattenError:()=>wRt,formatError:()=>SRt,globalConfig:()=>ARt,globalRegistry:()=>FO,initializeContext:()=>Qye,isValidBase64:()=>vqi,isValidBase64URL:()=>d4a,isValidJWT:()=>m4a,locales:()=>FRt,meta:()=>t7i,parse:()=>kyr,parseAsync:()=>Fyr,prettifyError:()=>t9i,process:()=>Nh,regexes:()=>zU,registry:()=>cbr,safeDecode:()=>K0f,safeDecodeAsync:()=>Y0f,safeEncode:()=>H0f,safeEncodeAsync:()=>J0f,safeParse:()=>n9i,safeParseAsync:()=>i9i,toDotPath:()=>J3a,toJSONSchema:()=>Qbr,treeifyError:()=>e9i,util:()=>Ai,version:()=>$9i});var Oj=h(()=>{"use strict";WHe();o9i();r9i();pGi();Kyr();eqi();za();Gyr();hGi();NRt();Z9i();cVa();zRt();MRt();uVa();pVa()});var Mbr={};X(Mbr,{endsWith:()=>aKe,gt:()=>FY,gte:()=>$k,includes:()=>oKe,length:()=>ANe,lowercase:()=>nKe,lt:()=>kY,lte:()=>$6,maxLength:()=>gNe,maxSize:()=>jye,mime:()=>cKe,minLength:()=>gue,minSize:()=>NY,multipleOf:()=>Nye,negative:()=>Pbr,nonnegative:()=>Rbr,nonpositive:()=>Dbr,normalize:()=>uKe,overwrite:()=>y7,positive:()=>Bbr,property:()=>kbr,regex:()=>rKe,size:()=>hNe,slugify:()=>dKe,startsWith:()=>sKe,toLowerCase:()=>pKe,toUpperCase:()=>fKe,trim:()=>lKe,uppercase:()=>iKe});var Lbr=h(()=>{"use strict";Oj()});var gKe={};X(gKe,{ZodISODate:()=>Vbr,ZodISODateTime:()=>Ubr,ZodISODuration:()=>qbr,ZodISOTime:()=>_br,date:()=>V7i,datetime:()=>U7i,duration:()=>q7i,time:()=>_7i});function U7i(e){return vGi(Ubr,e)}function V7i(e){return xGi(Vbr,e)}function _7i(e){return CGi(_br,e)}function q7i(e){return wGi(qbr,e)}var Ubr,Vbr,_br,qbr,LRt=h(()=>{"use strict";Oj();VRt();Ubr=Ir("ZodISODateTime",(e,t)=>{dqi.init(e,t),eA.init(e,t)});Vbr=Ir("ZodISODate",(e,t)=>{mqi.init(e,t),eA.init(e,t)});_br=Ir("ZodISOTime",(e,t)=>{hqi.init(e,t),eA.init(e,t)});qbr=Ir("ZodISODuration",(e,t)=>{gqi.init(e,t),eA.init(e,t)})});var fVa,qIf,Bj,G7i=h(()=>{"use strict";Oj();Oj();za();fVa=(e,t)=>{CRt.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>SRt(e,r)},flatten:{value:r=>wRt(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,HHe,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,HHe,2)}},isEmpty:{get(){return e.issues.length===0}}})},qIf=Ir("ZodError",fVa),Bj=Ir("ZodError",fVa,{Parent:Error})});var W7i,H7i,K7i,J7i,Y7i,X7i,Z7i,$7i,eWi,tWi,rWi,nWi,iWi=h(()=>{"use strict";Oj();G7i();W7i=YHe(Bj),H7i=XHe(Bj),K7i=ZHe(Bj),J7i=$He(Bj),Y7i=Nyr(Bj),X7i=jyr(Bj),Z7i=Qyr(Bj),$7i=zyr(Bj),eWi=Myr(Bj),tWi=Lyr(Bj),rWi=Uyr(Bj),nWi=Vyr(Bj)});var URt={};X(URt,{ZodAny:()=>fWi,ZodArray:()=>gWi,ZodBase64:()=>s0r,ZodBase64URL:()=>a0r,ZodBigInt:()=>vKe,ZodBigIntFormat:()=>l0r,ZodBoolean:()=>IKe,ZodCIDRv4:()=>i0r,ZodCIDRv6:()=>o0r,ZodCUID:()=>Xbr,ZodCUID2:()=>Zbr,ZodCatch:()=>zWi,ZodCodec:()=>y0r,ZodCustom:()=>$Rt,ZodCustomStringFormat:()=>bKe,ZodDate:()=>KRt,ZodDefault:()=>RWi,ZodDiscriminatedUnion:()=>yWi,ZodE164:()=>c0r,ZodEmail:()=>Kbr,ZodEmoji:()=>Jbr,ZodEnum:()=>AKe,ZodExactOptional:()=>BWi,ZodFile:()=>TWi,ZodFunction:()=>HWi,ZodGUID:()=>_Rt,ZodIPv4:()=>r0r,ZodIPv6:()=>n0r,ZodIntersection:()=>bWi,ZodJWT:()=>u0r,ZodKSUID:()=>t0r,ZodLazy:()=>qWi,ZodLiteral:()=>SWi,ZodMAC:()=>oWi,ZodMap:()=>CWi,ZodNaN:()=>LWi,ZodNanoID:()=>Ybr,ZodNever:()=>mWi,ZodNonOptional:()=>g0r,ZodNull:()=>lWi,ZodNullable:()=>DWi,ZodNumber:()=>EKe,ZodNumberFormat:()=>bNe,ZodObject:()=>YRt,ZodOptional:()=>h0r,ZodPipe:()=>A0r,ZodPrefault:()=>FWi,ZodPromise:()=>WWi,ZodReadonly:()=>UWi,ZodRecord:()=>ZRt,ZodSet:()=>wWi,ZodString:()=>yKe,ZodStringFormat:()=>eA,ZodSuccess:()=>QWi,ZodSymbol:()=>cWi,ZodTemplateLiteral:()=>_Wi,ZodTransform:()=>OWi,ZodTuple:()=>IWi,ZodType:()=>rp,ZodULID:()=>$br,ZodURL:()=>HRt,ZodUUID:()=>jY,ZodUndefined:()=>uWi,ZodUnion:()=>XRt,ZodUnknown:()=>dWi,ZodVoid:()=>hWi,ZodXID:()=>e0r,ZodXor:()=>AWi,_ZodString:()=>Hbr,_default:()=>kWi,_function:()=>y_a,any:()=>YVa,array:()=>JRt,base64:()=>kVa,base64url:()=>FVa,bigint:()=>GVa,boolean:()=>aWi,catch:()=>MWi,check:()=>b_a,cidrv4:()=>DVa,cidrv6:()=>RVa,codec:()=>h_a,cuid:()=>xVa,cuid2:()=>CVa,custom:()=>E_a,date:()=>ZVa,describe:()=>I_a,discriminatedUnion:()=>i_a,e164:()=>NVa,email:()=>dVa,emoji:()=>IVa,enum:()=>d0r,exactOptional:()=>PWi,file:()=>p_a,float32:()=>UVa,float64:()=>VVa,function:()=>y_a,guid:()=>mVa,hash:()=>LVa,hex:()=>MVa,hostname:()=>zVa,httpUrl:()=>EVa,instanceof:()=>x_a,int:()=>Wbr,int32:()=>_Va,int64:()=>WVa,intersection:()=>EWi,ipv4:()=>OVa,ipv6:()=>PVa,json:()=>w_a,jwt:()=>jVa,keyof:()=>$Va,ksuid:()=>TVa,lazy:()=>GWi,literal:()=>l_a,looseObject:()=>r_a,looseRecord:()=>s_a,mac:()=>BVa,map:()=>a_a,meta:()=>v_a,nan:()=>m_a,nanoid:()=>vVa,nativeEnum:()=>u_a,never:()=>p0r,nonoptional:()=>jWi,null:()=>pWi,nullable:()=>GRt,nullish:()=>f_a,number:()=>sWi,object:()=>e_a,optional:()=>qRt,partialRecord:()=>o_a,pipe:()=>WRt,prefault:()=>NWi,preprocess:()=>S_a,promise:()=>A_a,readonly:()=>VWi,record:()=>xWi,refine:()=>KWi,set:()=>c_a,strictObject:()=>t_a,string:()=>Gbr,stringFormat:()=>QVa,stringbool:()=>C_a,success:()=>d_a,superRefine:()=>JWi,symbol:()=>KVa,templateLiteral:()=>g_a,transform:()=>m0r,tuple:()=>vWi,uint32:()=>qVa,uint64:()=>HVa,ulid:()=>wVa,undefined:()=>JVa,union:()=>f0r,unknown:()=>yNe,url:()=>bVa,uuid:()=>hVa,uuidv4:()=>gVa,uuidv6:()=>AVa,uuidv7:()=>yVa,void:()=>XVa,xid:()=>SVa,xor:()=>n_a});function Gbr(e){return yGi(yKe,e)}function dVa(e){return ubr(Kbr,e)}function mVa(e){return jRt(_Rt,e)}function hVa(e){return lbr(jY,e)}function gVa(e){return pbr(jY,e)}function AVa(e){return fbr(jY,e)}function yVa(e){return dbr(jY,e)}function bVa(e){return QRt(HRt,e)}function EVa(e){return QRt(HRt,{protocol:/^https?$/,hostname:zU.domain,...Ai.normalizeParams(e)})}function IVa(e){return mbr(Jbr,e)}function vVa(e){return hbr(Ybr,e)}function xVa(e){return gbr(Xbr,e)}function CVa(e){return Abr(Zbr,e)}function wVa(e){return ybr($br,e)}function SVa(e){return bbr(e0r,e)}function TVa(e){return Ebr(t0r,e)}function OVa(e){return Ibr(r0r,e)}function BVa(e){return EGi(oWi,e)}function PVa(e){return vbr(n0r,e)}function DVa(e){return xbr(i0r,e)}function RVa(e){return Cbr(o0r,e)}function kVa(e){return wbr(s0r,e)}function FVa(e){return Sbr(a0r,e)}function NVa(e){return Tbr(c0r,e)}function jVa(e){return Obr(u0r,e)}function QVa(e,t,r={}){return mKe(bKe,e,t,r)}function zVa(e){return mKe(bKe,"hostname",zU.hostname,e)}function MVa(e){return mKe(bKe,"hex",zU.hex,e)}function LVa(e,t){let r=t?.enc??"hex",n=`${e}_${r}`,i=zU[n];if(!i)throw new Error(`Unrecognized hash format: ${n}`);return mKe(bKe,n,i,t)}function sWi(e){return SGi(EKe,e)}function Wbr(e){return OGi(bNe,e)}function UVa(e){return BGi(bNe,e)}function VVa(e){return PGi(bNe,e)}function _Va(e){return DGi(bNe,e)}function qVa(e){return RGi(bNe,e)}function aWi(e){return kGi(IKe,e)}function GVa(e){return NGi(vKe,e)}function WVa(e){return QGi(l0r,e)}function HVa(e){return zGi(l0r,e)}function KVa(e){return MGi(cWi,e)}function JVa(e){return LGi(uWi,e)}function pWi(e){return UGi(lWi,e)}function YVa(){return VGi(fWi)}function yNe(){return _Gi(dWi)}function p0r(e){return qGi(mWi,e)}function XVa(e){return GGi(hWi,e)}function ZVa(e){return WGi(KRt,e)}function JRt(e,t){return JGi(gWi,e,t)}function $Va(e){let t=e._zod.def.shape;return d0r(Object.keys(t))}function e_a(e,t){let r={type:"object",shape:e??{},...Ai.normalizeParams(t)};return new YRt(r)}function t_a(e,t){return new YRt({type:"object",shape:e,catchall:p0r(),...Ai.normalizeParams(t)})}function r_a(e,t){return new YRt({type:"object",shape:e,catchall:yNe(),...Ai.normalizeParams(t)})}function f0r(e,t){return new XRt({type:"union",options:e,...Ai.normalizeParams(t)})}function n_a(e,t){return new AWi({type:"union",options:e,inclusive:!1,...Ai.normalizeParams(t)})}function i_a(e,t,r){return new yWi({type:"union",options:t,discriminator:e,...Ai.normalizeParams(r)})}function EWi(e,t){return new bWi({type:"intersection",left:e,right:t})}function vWi(e,t,r){let n=t instanceof zu,i=n?r:t,o=n?t:null;return new IWi({type:"tuple",items:e,rest:o,...Ai.normalizeParams(i)})}function xWi(e,t,r){return new ZRt({type:"record",keyType:e,valueType:t,...Ai.normalizeParams(r)})}function o_a(e,t,r){let n=Zk(e);return n._zod.values=void 0,new ZRt({type:"record",keyType:n,valueType:t,...Ai.normalizeParams(r)})}function s_a(e,t,r){return new ZRt({type:"record",keyType:e,valueType:t,mode:"loose",...Ai.normalizeParams(r)})}function a_a(e,t,r){return new CWi({type:"map",keyType:e,valueType:t,...Ai.normalizeParams(r)})}function c_a(e,t){return new wWi({type:"set",valueType:e,...Ai.normalizeParams(t)})}function d0r(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new AKe({type:"enum",entries:r,...Ai.normalizeParams(t)})}function u_a(e,t){return new AKe({type:"enum",entries:e,...Ai.normalizeParams(t)})}function l_a(e,t){return new SWi({type:"literal",values:Array.isArray(e)?e:[e],...Ai.normalizeParams(t)})}function p_a(e){return YGi(TWi,e)}function m0r(e){return new OWi({type:"transform",transform:e})}function qRt(e){return new h0r({type:"optional",innerType:e})}function PWi(e){return new BWi({type:"optional",innerType:e})}function GRt(e){return new DWi({type:"nullable",innerType:e})}function f_a(e){return qRt(GRt(e))}function kWi(e,t){return new RWi({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Ai.shallowClone(t)}})}function NWi(e,t){return new FWi({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Ai.shallowClone(t)}})}function jWi(e,t){return new g0r({type:"nonoptional",innerType:e,...Ai.normalizeParams(t)})}function d_a(e){return new QWi({type:"success",innerType:e})}function MWi(e,t){return new zWi({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function m_a(e){return KGi(LWi,e)}function WRt(e,t){return new A0r({type:"pipe",in:e,out:t})}function h_a(e,t,r){return new y0r({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function VWi(e){return new UWi({type:"readonly",innerType:e})}function g_a(e,t){return new _Wi({type:"template_literal",parts:e,...Ai.normalizeParams(t)})}function GWi(e){return new qWi({type:"lazy",getter:e})}function A_a(e){return new WWi({type:"promise",innerType:e})}function y_a(e){return new HWi({type:"function",input:Array.isArray(e?.input)?vWi(e?.input):e?.input??JRt(yNe()),output:e?.output??yNe()})}function b_a(e){let t=new wA({check:"custom"});return t._zod.check=e,t}function E_a(e,t){return XGi($Rt,e??(()=>!0),t)}function KWi(e,t={}){return ZGi($Rt,e,t)}function JWi(e){return $Gi(e)}function x_a(e,t={}){let r=new $Rt({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...Ai.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 w_a(e){let t=GWi(()=>f0r([Gbr(e),sWi(),aWi(),pWi(),JRt(t),xWi(Gbr(),t)]));return t}function S_a(e,t){return WRt(m0r(e),t)}var rp,Hbr,yKe,eA,Kbr,_Rt,jY,HRt,Jbr,Ybr,Xbr,Zbr,$br,e0r,t0r,r0r,oWi,n0r,i0r,o0r,s0r,a0r,c0r,u0r,bKe,EKe,bNe,IKe,vKe,l0r,cWi,uWi,lWi,fWi,dWi,mWi,hWi,KRt,gWi,YRt,XRt,AWi,yWi,bWi,IWi,ZRt,CWi,wWi,AKe,SWi,TWi,OWi,h0r,BWi,DWi,RWi,FWi,g0r,QWi,zWi,LWi,A0r,y0r,UWi,_Wi,qWi,WWi,HWi,$Rt,I_a,v_a,C_a,VRt=h(()=>{"use strict";Oj();Oj();MRt();zRt();Lbr();LRt();iWi();rp=Ir("ZodType",(e,t)=>(zu.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:hKe(e,"input"),output:hKe(e,"output")}}),e.toJSONSchema=n7i(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(Ai.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)=>Zk(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>W7i(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>K7i(e,r,n),e.parseAsync=async(r,n)=>H7i(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>J7i(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>Y7i(e,r,n),e.decode=(r,n)=>X7i(e,r,n),e.encodeAsync=async(r,n)=>Z7i(e,r,n),e.decodeAsync=async(r,n)=>$7i(e,r,n),e.safeEncode=(r,n)=>eWi(e,r,n),e.safeDecode=(r,n)=>tWi(e,r,n),e.safeEncodeAsync=async(r,n)=>rWi(e,r,n),e.safeDecodeAsync=async(r,n)=>nWi(e,r,n),e.refine=(r,n)=>e.check(KWi(r,n)),e.superRefine=r=>e.check(JWi(r)),e.overwrite=r=>e.check(y7(r)),e.optional=()=>qRt(e),e.exactOptional=()=>PWi(e),e.nullable=()=>GRt(e),e.nullish=()=>qRt(GRt(e)),e.nonoptional=r=>jWi(e,r),e.array=()=>JRt(e),e.or=r=>f0r([e,r]),e.and=r=>EWi(e,r),e.transform=r=>WRt(e,m0r(r)),e.default=r=>kWi(e,r),e.prefault=r=>NWi(e,r),e.catch=r=>MWi(e,r),e.pipe=r=>WRt(e,r),e.readonly=()=>VWi(e),e.describe=r=>{let n=e.clone();return FO.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return FO.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return FO.get(e);let n=e.clone();return FO.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),Hbr=Ir("_ZodString",(e,t)=>{mNe.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>i7i(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(rKe(...n)),e.includes=(...n)=>e.check(oKe(...n)),e.startsWith=(...n)=>e.check(sKe(...n)),e.endsWith=(...n)=>e.check(aKe(...n)),e.min=(...n)=>e.check(gue(...n)),e.max=(...n)=>e.check(gNe(...n)),e.length=(...n)=>e.check(ANe(...n)),e.nonempty=(...n)=>e.check(gue(1,...n)),e.lowercase=n=>e.check(nKe(n)),e.uppercase=n=>e.check(iKe(n)),e.trim=()=>e.check(lKe()),e.normalize=(...n)=>e.check(uKe(...n)),e.toLowerCase=()=>e.check(pKe()),e.toUpperCase=()=>e.check(fKe()),e.slugify=()=>e.check(dKe())}),yKe=Ir("ZodString",(e,t)=>{mNe.init(e,t),Hbr.init(e,t),e.email=r=>e.check(ubr(Kbr,r)),e.url=r=>e.check(QRt(HRt,r)),e.jwt=r=>e.check(Obr(u0r,r)),e.emoji=r=>e.check(mbr(Jbr,r)),e.guid=r=>e.check(jRt(_Rt,r)),e.uuid=r=>e.check(lbr(jY,r)),e.uuidv4=r=>e.check(pbr(jY,r)),e.uuidv6=r=>e.check(fbr(jY,r)),e.uuidv7=r=>e.check(dbr(jY,r)),e.nanoid=r=>e.check(hbr(Ybr,r)),e.guid=r=>e.check(jRt(_Rt,r)),e.cuid=r=>e.check(gbr(Xbr,r)),e.cuid2=r=>e.check(Abr(Zbr,r)),e.ulid=r=>e.check(ybr($br,r)),e.base64=r=>e.check(wbr(s0r,r)),e.base64url=r=>e.check(Sbr(a0r,r)),e.xid=r=>e.check(bbr(e0r,r)),e.ksuid=r=>e.check(Ebr(t0r,r)),e.ipv4=r=>e.check(Ibr(r0r,r)),e.ipv6=r=>e.check(vbr(n0r,r)),e.cidrv4=r=>e.check(xbr(i0r,r)),e.cidrv6=r=>e.check(Cbr(o0r,r)),e.e164=r=>e.check(Tbr(c0r,r)),e.datetime=r=>e.check(U7i(r)),e.date=r=>e.check(V7i(r)),e.time=r=>e.check(_7i(r)),e.duration=r=>e.check(q7i(r))});eA=Ir("ZodStringFormat",(e,t)=>{$g.init(e,t),Hbr.init(e,t)}),Kbr=Ir("ZodEmail",(e,t)=>{iqi.init(e,t),eA.init(e,t)});_Rt=Ir("ZodGUID",(e,t)=>{rqi.init(e,t),eA.init(e,t)});jY=Ir("ZodUUID",(e,t)=>{nqi.init(e,t),eA.init(e,t)});HRt=Ir("ZodURL",(e,t)=>{oqi.init(e,t),eA.init(e,t)});Jbr=Ir("ZodEmoji",(e,t)=>{sqi.init(e,t),eA.init(e,t)});Ybr=Ir("ZodNanoID",(e,t)=>{aqi.init(e,t),eA.init(e,t)});Xbr=Ir("ZodCUID",(e,t)=>{cqi.init(e,t),eA.init(e,t)});Zbr=Ir("ZodCUID2",(e,t)=>{uqi.init(e,t),eA.init(e,t)});$br=Ir("ZodULID",(e,t)=>{lqi.init(e,t),eA.init(e,t)});e0r=Ir("ZodXID",(e,t)=>{pqi.init(e,t),eA.init(e,t)});t0r=Ir("ZodKSUID",(e,t)=>{fqi.init(e,t),eA.init(e,t)});r0r=Ir("ZodIPv4",(e,t)=>{Aqi.init(e,t),eA.init(e,t)});oWi=Ir("ZodMAC",(e,t)=>{bqi.init(e,t),eA.init(e,t)});n0r=Ir("ZodIPv6",(e,t)=>{yqi.init(e,t),eA.init(e,t)});i0r=Ir("ZodCIDRv4",(e,t)=>{Eqi.init(e,t),eA.init(e,t)});o0r=Ir("ZodCIDRv6",(e,t)=>{Iqi.init(e,t),eA.init(e,t)});s0r=Ir("ZodBase64",(e,t)=>{xqi.init(e,t),eA.init(e,t)});a0r=Ir("ZodBase64URL",(e,t)=>{Cqi.init(e,t),eA.init(e,t)});c0r=Ir("ZodE164",(e,t)=>{wqi.init(e,t),eA.init(e,t)});u0r=Ir("ZodJWT",(e,t)=>{Sqi.init(e,t),eA.init(e,t)});bKe=Ir("ZodCustomStringFormat",(e,t)=>{Tqi.init(e,t),eA.init(e,t)});EKe=Ir("ZodNumber",(e,t)=>{ebr.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>o7i(e,n,i,o),e.gt=(n,i)=>e.check(FY(n,i)),e.gte=(n,i)=>e.check($k(n,i)),e.min=(n,i)=>e.check($k(n,i)),e.lt=(n,i)=>e.check(kY(n,i)),e.lte=(n,i)=>e.check($6(n,i)),e.max=(n,i)=>e.check($6(n,i)),e.int=n=>e.check(Wbr(n)),e.safe=n=>e.check(Wbr(n)),e.positive=n=>e.check(FY(0,n)),e.nonnegative=n=>e.check($k(0,n)),e.negative=n=>e.check(kY(0,n)),e.nonpositive=n=>e.check($6(0,n)),e.multipleOf=(n,i)=>e.check(Nye(n,i)),e.step=(n,i)=>e.check(Nye(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});bNe=Ir("ZodNumberFormat",(e,t)=>{Oqi.init(e,t),EKe.init(e,t)});IKe=Ir("ZodBoolean",(e,t)=>{PRt.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>s7i(e,r,n,i)});vKe=Ir("ZodBigInt",(e,t)=>{tbr.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>a7i(e,n,i,o),e.gte=(n,i)=>e.check($k(n,i)),e.min=(n,i)=>e.check($k(n,i)),e.gt=(n,i)=>e.check(FY(n,i)),e.gte=(n,i)=>e.check($k(n,i)),e.min=(n,i)=>e.check($k(n,i)),e.lt=(n,i)=>e.check(kY(n,i)),e.lte=(n,i)=>e.check($6(n,i)),e.max=(n,i)=>e.check($6(n,i)),e.positive=n=>e.check(FY(BigInt(0),n)),e.negative=n=>e.check(kY(BigInt(0),n)),e.nonpositive=n=>e.check($6(BigInt(0),n)),e.nonnegative=n=>e.check($k(BigInt(0),n)),e.multipleOf=(n,i)=>e.check(Nye(n,i));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});l0r=Ir("ZodBigIntFormat",(e,t)=>{Bqi.init(e,t),vKe.init(e,t)});cWi=Ir("ZodSymbol",(e,t)=>{Pqi.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>c7i(e,r,n,i)});uWi=Ir("ZodUndefined",(e,t)=>{Dqi.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>l7i(e,r,n,i)});lWi=Ir("ZodNull",(e,t)=>{Rqi.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>u7i(e,r,n,i)});fWi=Ir("ZodAny",(e,t)=>{kqi.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>d7i(e,r,n,i)});dWi=Ir("ZodUnknown",(e,t)=>{Fqi.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>m7i(e,r,n,i)});mWi=Ir("ZodNever",(e,t)=>{Nqi.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>f7i(e,r,n,i)});hWi=Ir("ZodVoid",(e,t)=>{jqi.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>p7i(e,r,n,i)});KRt=Ir("ZodDate",(e,t)=>{Qqi.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>h7i(e,n,i,o),e.min=(n,i)=>e.check($k(n,i)),e.max=(n,i)=>e.check($6(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});gWi=Ir("ZodArray",(e,t)=>{zqi.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>T7i(e,r,n,i),e.element=t.element,e.min=(r,n)=>e.check(gue(r,n)),e.nonempty=r=>e.check(gue(1,r)),e.max=(r,n)=>e.check(gNe(r,n)),e.length=(r,n)=>e.check(ANe(r,n)),e.unwrap=()=>e.element});YRt=Ir("ZodObject",(e,t)=>{Mqi.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>O7i(e,r,n,i),Ai.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>d0r(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:yNe()}),e.loose=()=>e.clone({...e._zod.def,catchall:yNe()}),e.strict=()=>e.clone({...e._zod.def,catchall:p0r()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>Ai.extend(e,r),e.safeExtend=r=>Ai.safeExtend(e,r),e.merge=r=>Ai.merge(e,r),e.pick=r=>Ai.pick(e,r),e.omit=r=>Ai.omit(e,r),e.partial=(...r)=>Ai.partial(h0r,e,r[0]),e.required=(...r)=>Ai.required(g0r,e,r[0])});XRt=Ir("ZodUnion",(e,t)=>{DRt.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Nbr(e,r,n,i),e.options=t.options});AWi=Ir("ZodXor",(e,t)=>{XRt.init(e,t),Lqi.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Nbr(e,r,n,i),e.options=t.options});yWi=Ir("ZodDiscriminatedUnion",(e,t)=>{XRt.init(e,t),Uqi.init(e,t)});bWi=Ir("ZodIntersection",(e,t)=>{Vqi.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>B7i(e,r,n,i)});IWi=Ir("ZodTuple",(e,t)=>{rbr.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>P7i(e,r,n,i),e.rest=r=>e.clone({...e._zod.def,rest:r})});ZRt=Ir("ZodRecord",(e,t)=>{_qi.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>D7i(e,r,n,i),e.keyType=t.keyType,e.valueType=t.valueType});CWi=Ir("ZodMap",(e,t)=>{qqi.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>w7i(e,r,n,i),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(NY(...r)),e.nonempty=r=>e.check(NY(1,r)),e.max=(...r)=>e.check(jye(...r)),e.size=(...r)=>e.check(hNe(...r))});wWi=Ir("ZodSet",(e,t)=>{Gqi.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>S7i(e,r,n,i),e.min=(...r)=>e.check(NY(...r)),e.nonempty=r=>e.check(NY(1,r)),e.max=(...r)=>e.check(jye(...r)),e.size=(...r)=>e.check(hNe(...r))});AKe=Ir("ZodEnum",(e,t)=>{Wqi.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>g7i(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 AKe({...t,checks:[],...Ai.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 AKe({...t,checks:[],...Ai.normalizeParams(i),entries:o})}});SWi=Ir("ZodLiteral",(e,t)=>{Hqi.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>A7i(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]}})});TWi=Ir("ZodFile",(e,t)=>{Kqi.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>E7i(e,r,n,i),e.min=(r,n)=>e.check(NY(r,n)),e.max=(r,n)=>e.check(jye(r,n)),e.mime=(r,n)=>e.check(cKe(Array.isArray(r)?r:[r],n))});OWi=Ir("ZodTransform",(e,t)=>{Jqi.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>C7i(e,r,n,i),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Pye(e.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(Ai.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(Ai.issue(s))}};let i=t.transform(r.value,r);return i instanceof Promise?i.then(o=>(r.value=o,r)):(r.value=i,r)}});h0r=Ir("ZodOptional",(e,t)=>{nbr.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>jbr(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});BWi=Ir("ZodExactOptional",(e,t)=>{Yqi.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>jbr(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});DWi=Ir("ZodNullable",(e,t)=>{Xqi.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>R7i(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});RWi=Ir("ZodDefault",(e,t)=>{Zqi.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>F7i(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});FWi=Ir("ZodPrefault",(e,t)=>{$qi.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>N7i(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});g0r=Ir("ZodNonOptional",(e,t)=>{eGi.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>k7i(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});QWi=Ir("ZodSuccess",(e,t)=>{tGi.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>I7i(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});zWi=Ir("ZodCatch",(e,t)=>{rGi.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>j7i(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});LWi=Ir("ZodNaN",(e,t)=>{nGi.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>y7i(e,r,n,i)});A0r=Ir("ZodPipe",(e,t)=>{iGi.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Q7i(e,r,n,i),e.in=t.in,e.out=t.out});y0r=Ir("ZodCodec",(e,t)=>{A0r.init(e,t),RRt.init(e,t)});UWi=Ir("ZodReadonly",(e,t)=>{oGi.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>z7i(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});_Wi=Ir("ZodTemplateLiteral",(e,t)=>{sGi.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>b7i(e,r,n,i)});qWi=Ir("ZodLazy",(e,t)=>{uGi.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>L7i(e,r,n,i),e.unwrap=()=>e._zod.def.getter()});WWi=Ir("ZodPromise",(e,t)=>{cGi.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>M7i(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});HWi=Ir("ZodFunction",(e,t)=>{aGi.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>x7i(e,r,n,i)});$Rt=Ir("ZodCustom",(e,t)=>{lGi.init(e,t),rp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>v7i(e,r,n,i)});I_a=e7i,v_a=t7i;C_a=(...e)=>r7i({Codec:y0r,Boolean:IKe,String:yKe},...e)});function HIf(e){yI({customError:e})}function KIf(){return yI().customError}var WIf,YWi,T_a=h(()=>{"use strict";Oj();Oj();WIf={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"};YWi||(YWi={})});function YIf(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 XIf(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 O_a(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return Ro.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 Ro.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=XIf(i,t),s=_P(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 Ro.null();if(i.length===0)return Ro.never();if(i.length===1)return Ro.literal(i[0]);if(i.every(s=>typeof s=="string"))return Ro.enum(i);let o=i.map(s=>Ro.literal(s));return o.length<2?o[0]:Ro.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return Ro.literal(e.const);let r=e.type;if(Array.isArray(r)){let i=r.map(o=>{let s={...e,type:o};return O_a(s,t)});return i.length===0?Ro.never():i.length===1?i[0]:Ro.union(i)}if(!r)return Ro.any();let n;switch(r){case"string":{let i=Ro.string();if(e.format){let o=e.format;o==="email"?i=i.check(Ro.email()):o==="uri"||o==="uri-reference"?i=i.check(Ro.url()):o==="uuid"||o==="guid"?i=i.check(Ro.uuid()):o==="date-time"?i=i.check(Ro.iso.datetime()):o==="date"?i=i.check(Ro.iso.date()):o==="time"?i=i.check(Ro.iso.time()):o==="duration"?i=i.check(Ro.iso.duration()):o==="ipv4"?i=i.check(Ro.ipv4()):o==="ipv6"?i=i.check(Ro.ipv6()):o==="mac"?i=i.check(Ro.mac()):o==="cidr"?i=i.check(Ro.cidrv4()):o==="cidr-v6"?i=i.check(Ro.cidrv6()):o==="base64"?i=i.check(Ro.base64()):o==="base64url"?i=i.check(Ro.base64url()):o==="e164"?i=i.check(Ro.e164()):o==="jwt"?i=i.check(Ro.jwt()):o==="emoji"?i=i.check(Ro.emoji()):o==="nanoid"?i=i.check(Ro.nanoid()):o==="cuid"?i=i.check(Ro.cuid()):o==="cuid2"?i=i.check(Ro.cuid2()):o==="ulid"?i=i.check(Ro.ulid()):o==="xid"?i=i.check(Ro.xid()):o==="ksuid"&&(i=i.check(Ro.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"?Ro.number().int():Ro.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=Ro.boolean();break}case"null":{n=Ro.null();break}case"object":{let i={},o=e.properties||{},s=new Set(e.required||[]);for(let[c,u]of Object.entries(o)){let l=_P(u,t);i[c]=s.has(c)?l:l.optional()}if(e.propertyNames){let c=_P(e.propertyNames,t),u=e.additionalProperties&&typeof e.additionalProperties=="object"?_P(e.additionalProperties,t):Ro.any();if(Object.keys(i).length===0){n=Ro.record(c,u);break}let l=Ro.object(i).passthrough(),p=Ro.looseRecord(c,u);n=Ro.intersection(l,p);break}if(e.patternProperties){let c=e.patternProperties,u=Object.keys(c),l=[];for(let d of u){let f=_P(c[d],t),m=Ro.string().regex(new RegExp(d));l.push(Ro.looseRecord(m,f))}let p=[];if(Object.keys(i).length>0&&p.push(Ro.object(i).passthrough()),p.push(...l),p.length===0)n=Ro.object({}).passthrough();else if(p.length===1)n=p[0];else{let d=Ro.intersection(p[0],p[1]);for(let f=2;f<p.length;f++)d=Ro.intersection(d,p[f]);n=d}break}let a=Ro.object(i);e.additionalProperties===!1?n=a.strict():typeof e.additionalProperties=="object"?n=a.catchall(_P(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=>_P(c,t)),a=o&&typeof o=="object"&&!Array.isArray(o)?_P(o,t):void 0;a?n=Ro.tuple(s).rest(a):n=Ro.tuple(s),typeof e.minItems=="number"&&(n=n.check(Ro.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(Ro.maxLength(e.maxItems)))}else if(Array.isArray(o)){let s=o.map(c=>_P(c,t)),a=e.additionalItems&&typeof e.additionalItems=="object"?_P(e.additionalItems,t):void 0;a?n=Ro.tuple(s).rest(a):n=Ro.tuple(s),typeof e.minItems=="number"&&(n=n.check(Ro.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(Ro.maxLength(e.maxItems)))}else if(o!==void 0){let s=_P(o,t),a=Ro.array(s);typeof e.minItems=="number"&&(a=a.min(e.minItems)),typeof e.maxItems=="number"&&(a=a.max(e.maxItems)),n=a}else n=Ro.array(Ro.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 _P(e,t){if(typeof e=="boolean")return e?Ro.any():Ro.never();let r=O_a(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=>_P(u,t)),c=Ro.union(a);r=n?Ro.intersection(r,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let a=e.oneOf.map(u=>_P(u,t)),c=Ro.xor(a);r=n?Ro.intersection(r,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=n?r:Ro.any();else{let a=n?r:_P(e.allOf[0],t),c=n?0:1;for(let u=c;u<e.allOf.length;u++)a=Ro.intersection(a,_P(e.allOf[u],t));r=a}e.nullable===!0&&t.version==="openapi-3.0"&&(r=Ro.nullable(r)),e.readOnly===!0&&(r=Ro.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))JIf.has(a)||(i[a]=e[a]);return Object.keys(i).length>0&&t.registry.add(r,i),r}function B_a(e,t){if(typeof e=="boolean")return e?Ro.any():Ro.never();let r=YIf(e,t?.defaultTarget),n=e.$defs||e.definitions||{},i={version:r,defs:n,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??FO};return _P(e,i)}var Ro,JIf,P_a=h(()=>{"use strict";NRt();Lbr();LRt();VRt();Ro={...URt,...Mbr,iso:gKe},JIf=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 XWi={};X(XWi,{bigint:()=>tvf,boolean:()=>evf,date:()=>rvf,number:()=>$If,string:()=>ZIf});function ZIf(e){return bGi(yKe,e)}function $If(e){return TGi(EKe,e)}function evf(e){return FGi(IKe,e)}function tvf(e){return jGi(vKe,e)}function rvf(e){return HGi(KRt,e)}var D_a=h(()=>{"use strict";Oj();VRt()});var te={};X(te,{$brand:()=>Pyr,$input:()=>AGi,$output:()=>gGi,NEVER:()=>_8i,TimePrecision:()=>IGi,ZodAny:()=>fWi,ZodArray:()=>gWi,ZodBase64:()=>s0r,ZodBase64URL:()=>a0r,ZodBigInt:()=>vKe,ZodBigIntFormat:()=>l0r,ZodBoolean:()=>IKe,ZodCIDRv4:()=>i0r,ZodCIDRv6:()=>o0r,ZodCUID:()=>Xbr,ZodCUID2:()=>Zbr,ZodCatch:()=>zWi,ZodCodec:()=>y0r,ZodCustom:()=>$Rt,ZodCustomStringFormat:()=>bKe,ZodDate:()=>KRt,ZodDefault:()=>RWi,ZodDiscriminatedUnion:()=>yWi,ZodE164:()=>c0r,ZodEmail:()=>Kbr,ZodEmoji:()=>Jbr,ZodEnum:()=>AKe,ZodError:()=>qIf,ZodExactOptional:()=>BWi,ZodFile:()=>TWi,ZodFirstPartyTypeKind:()=>YWi,ZodFunction:()=>HWi,ZodGUID:()=>_Rt,ZodIPv4:()=>r0r,ZodIPv6:()=>n0r,ZodISODate:()=>Vbr,ZodISODateTime:()=>Ubr,ZodISODuration:()=>qbr,ZodISOTime:()=>_br,ZodIntersection:()=>bWi,ZodIssueCode:()=>WIf,ZodJWT:()=>u0r,ZodKSUID:()=>t0r,ZodLazy:()=>qWi,ZodLiteral:()=>SWi,ZodMAC:()=>oWi,ZodMap:()=>CWi,ZodNaN:()=>LWi,ZodNanoID:()=>Ybr,ZodNever:()=>mWi,ZodNonOptional:()=>g0r,ZodNull:()=>lWi,ZodNullable:()=>DWi,ZodNumber:()=>EKe,ZodNumberFormat:()=>bNe,ZodObject:()=>YRt,ZodOptional:()=>h0r,ZodPipe:()=>A0r,ZodPrefault:()=>FWi,ZodPromise:()=>WWi,ZodReadonly:()=>UWi,ZodRealError:()=>Bj,ZodRecord:()=>ZRt,ZodSet:()=>wWi,ZodString:()=>yKe,ZodStringFormat:()=>eA,ZodSuccess:()=>QWi,ZodSymbol:()=>cWi,ZodTemplateLiteral:()=>_Wi,ZodTransform:()=>OWi,ZodTuple:()=>IWi,ZodType:()=>rp,ZodULID:()=>$br,ZodURL:()=>HRt,ZodUUID:()=>jY,ZodUndefined:()=>uWi,ZodUnion:()=>XRt,ZodUnknown:()=>dWi,ZodVoid:()=>hWi,ZodXID:()=>e0r,ZodXor:()=>AWi,_ZodString:()=>Hbr,_default:()=>kWi,_function:()=>y_a,any:()=>YVa,array:()=>JRt,base64:()=>kVa,base64url:()=>FVa,bigint:()=>GVa,boolean:()=>aWi,catch:()=>MWi,check:()=>b_a,cidrv4:()=>DVa,cidrv6:()=>RVa,clone:()=>Zk,codec:()=>h_a,coerce:()=>XWi,config:()=>yI,core:()=>Aue,cuid:()=>xVa,cuid2:()=>CVa,custom:()=>E_a,date:()=>ZVa,decode:()=>X7i,decodeAsync:()=>$7i,describe:()=>I_a,discriminatedUnion:()=>i_a,e164:()=>NVa,email:()=>dVa,emoji:()=>IVa,encode:()=>Y7i,encodeAsync:()=>Z7i,endsWith:()=>aKe,enum:()=>d0r,exactOptional:()=>PWi,file:()=>p_a,flattenError:()=>wRt,float32:()=>UVa,float64:()=>VVa,formatError:()=>SRt,fromJSONSchema:()=>B_a,function:()=>y_a,getErrorMap:()=>KIf,globalRegistry:()=>FO,gt:()=>FY,gte:()=>$k,guid:()=>mVa,hash:()=>LVa,hex:()=>MVa,hostname:()=>zVa,httpUrl:()=>EVa,includes:()=>oKe,instanceof:()=>x_a,int:()=>Wbr,int32:()=>_Va,int64:()=>WVa,intersection:()=>EWi,ipv4:()=>OVa,ipv6:()=>PVa,iso:()=>gKe,json:()=>w_a,jwt:()=>jVa,keyof:()=>$Va,ksuid:()=>TVa,lazy:()=>GWi,length:()=>ANe,literal:()=>l_a,locales:()=>FRt,looseObject:()=>r_a,looseRecord:()=>s_a,lowercase:()=>nKe,lt:()=>kY,lte:()=>$6,mac:()=>BVa,map:()=>a_a,maxLength:()=>gNe,maxSize:()=>jye,meta:()=>v_a,mime:()=>cKe,minLength:()=>gue,minSize:()=>NY,multipleOf:()=>Nye,nan:()=>m_a,nanoid:()=>vVa,nativeEnum:()=>u_a,negative:()=>Pbr,never:()=>p0r,nonnegative:()=>Rbr,nonoptional:()=>jWi,nonpositive:()=>Dbr,normalize:()=>uKe,null:()=>pWi,nullable:()=>GRt,nullish:()=>f_a,number:()=>sWi,object:()=>e_a,optional:()=>qRt,overwrite:()=>y7,parse:()=>W7i,parseAsync:()=>H7i,partialRecord:()=>o_a,pipe:()=>WRt,positive:()=>Bbr,prefault:()=>NWi,preprocess:()=>S_a,prettifyError:()=>t9i,promise:()=>A_a,property:()=>kbr,readonly:()=>VWi,record:()=>xWi,refine:()=>KWi,regex:()=>rKe,regexes:()=>zU,registry:()=>cbr,safeDecode:()=>tWi,safeDecodeAsync:()=>nWi,safeEncode:()=>eWi,safeEncodeAsync:()=>rWi,safeParse:()=>K7i,safeParseAsync:()=>J7i,set:()=>c_a,setErrorMap:()=>HIf,size:()=>hNe,slugify:()=>dKe,startsWith:()=>sKe,strictObject:()=>t_a,string:()=>Gbr,stringFormat:()=>QVa,stringbool:()=>C_a,success:()=>d_a,superRefine:()=>JWi,symbol:()=>KVa,templateLiteral:()=>g_a,toJSONSchema:()=>Qbr,toLowerCase:()=>pKe,toUpperCase:()=>fKe,transform:()=>m0r,treeifyError:()=>e9i,trim:()=>lKe,tuple:()=>vWi,uint32:()=>qVa,uint64:()=>HVa,ulid:()=>wVa,undefined:()=>JVa,union:()=>f0r,unknown:()=>yNe,uppercase:()=>iKe,url:()=>bVa,util:()=>Ai,uuid:()=>hVa,uuidv4:()=>gVa,uuidv6:()=>AVa,uuidv7:()=>yVa,void:()=>XVa,xid:()=>SVa,xor:()=>n_a});var ZWi=h(()=>{"use strict";Oj();VRt();Lbr();G7i();iWi();T_a();Oj();fGi();Oj();MRt();P_a();hGi();LRt();LRt();D_a();yI(ibr())});var ms=h(()=>{"use strict";ZWi();ZWi()});var R_a=h(()=>{"use strict"});var dHi={};X(dHi,{AIChatConfig:()=>tHi,AIChatDatasource:()=>b5a,AIChatLocation:()=>N_a,AIChatModel:()=>j_a,AIChatWebsiteDatasource:()=>y5a,AbsoluteProductPath:()=>S8a,AgentsConfig:()=>I5a,AiExamplesConfig:()=>A5a,AnalyticsConfig:()=>g5a,AnnouncementConfig:()=>x0r,ApiReferenceConfiguration:()=>m8a,ApiReferenceEndpointConfiguration:()=>u8a,ApiReferenceLayoutItem:()=>nkt,ApiReferenceOperationConfiguration:()=>l8a,ApiReferencePackageConfiguration:()=>d8a,ApiReferencePackageConfigurationWithOptions:()=>f8a,ApiReferenceSectionConfiguration:()=>p8a,Audience:()=>ekt,AudienceId:()=>$Wi,Availability:()=>bue,BackgroundImageConfiguration:()=>s5a,BackgroundImageThemedConfig:()=>o5a,BodyThemeConfig:()=>X_a,ChangelogConfiguration:()=>s8a,ChangelogFolderRelativePath:()=>nHi,ChangelogLayout:()=>W_a,CheckConfig:()=>Z5a,CheckRuleSeverity:()=>yue,CheckRulesConfig:()=>X5a,CollapsedStringValue:()=>c5a,CollapsedValue:()=>tkt,ColorConfig:()=>Qx,ColorThemedConfig:()=>r5a,ColorsConfiguration:()=>B5a,ContentAlignment:()=>q_a,CssConfig:()=>a5a,CustomDomain:()=>n5a,CustomPageAction:()=>P5a,DocsConfiguration:()=>avf,DocsInstance:()=>N5a,DocsSettingsConfig:()=>O5a,DocsTypographyConfig:()=>C5a,EditThisPageConfig:()=>F5a,EditThisPageLaunch:()=>Q_a,ExperimentalConfig:()=>e8a,ExternalProduct:()=>x8a,FeatureFlag:()=>eHi,FeatureFlagConfiguration:()=>u5a,FolderConfiguration:()=>c8a,FontConfig:()=>b0r,FontConfigPath:()=>x5a,FontConfigVariant:()=>v5a,FontDisplay:()=>L_a,FontStyle:()=>sHi,FontWeight:()=>cHi,FooterLinksConfig:()=>q5a,FooterNavThemeConfig:()=>J_a,FullStoryAnalyticsConfig:()=>p5a,GTMConfig:()=>m5a,GitLibraryInputSchema:()=>t8a,GithubEditThisPageConfig:()=>k5a,GoogleAnalytics4Config:()=>h5a,HeaderPosition:()=>G_a,HttpSnippetLanguage:()=>e5a,HttpSnippetsConfig:()=>i5a,IntegrationsConfig:()=>$5a,IntercomConfig:()=>f5a,InternalProduct:()=>v8a,JsConfig:()=>K5a,JsConfigOptions:()=>rHi,JsFileConfig:()=>W5a,JsFileConfigSettings:()=>G5a,JsRemoteConfig:()=>H5a,JsScriptStrategy:()=>aHi,Language:()=>I0r,LanguageSwitcherThemeConfig:()=>K_a,LayoutConfig:()=>S5a,LibraryConfiguration:()=>o8a,LibraryInputConfiguration:()=>n8a,LibraryLanguage:()=>M_a,LibraryName:()=>iHi,LibraryOutputConfiguration:()=>i8a,LibraryReferenceConfiguration:()=>a8a,LinkConfiguration:()=>lHi,LogoConfiguration:()=>j5a,MetadataConfig:()=>J5a,NavbarDropdownConfig:()=>V5a,NavbarGithubConfig:()=>U5a,NavbarGithubConfigWithOptions:()=>L5a,NavbarLink:()=>_5a,NavbarLinkConfig:()=>ENe,NavigationConfig:()=>C0r,NavigationItem:()=>ikt,PageActionOption:()=>F_a,PageActionOptions:()=>D5a,PageActionsConfig:()=>R5a,PageActionsThemeConfig:()=>$_a,PageConfiguration:()=>wKe,PageDescriptionSource:()=>E5a,PathLibraryInputSchema:()=>r8a,PlaygroundButtonSettings:()=>M5a,PlaygroundSettings:()=>rkt,PostHogConfig:()=>d5a,ProductConfig:()=>C8a,ProductConfigBase:()=>fHi,ProductFileConfig:()=>svf,ProductPath:()=>ovf,ProductSwitcherThemeConfig:()=>H_a,ProgrammingLanguage:()=>k_a,RedirectConfig:()=>Y5a,RelativeProductPath:()=>w8a,Role:()=>uHi,RoleId:()=>E0r,SearchSettingsConfig:()=>T5a,SearchbarPlacement:()=>U_a,SectionConfiguration:()=>h8a,SegmentConfig:()=>l5a,SidebarThemeConfig:()=>Z_a,SnippetLanguageConfiguration:()=>QY,SnippetsConfiguration:()=>z5a,SwitcherPlacement:()=>__a,TabConfig:()=>w0r,TabId:()=>xKe,TabVariant:()=>A8a,TabbedNavigationConfig:()=>I8a,TabbedNavigationItem:()=>E8a,TabbedNavigationItemWithLayout:()=>y8a,TabbedNavigationItemWithVariants:()=>b8a,TabsPlacement:()=>V_a,TabsThemeConfig:()=>Y_a,Target:()=>CKe,ThemeConfig:()=>w5a,TitleSource:()=>oHi,TranslationConfig:()=>O8a,TranslationConfigObject:()=>T8a,TwitterCardSetting:()=>t5a,UntabbedNavigationConfig:()=>g8a,VersionAvailability:()=>z_a,VersionConfig:()=>pHi,VersionFileConfig:()=>ivf,VersionedSnippetLanguageConfiguration:()=>Q5a,WithFeatureFlags:()=>GP,WithPermissions:()=>qP,WithViewers:()=>v0r,normalizeTranslationConfig:()=>B8a});function B8a(e){return typeof e=="string"?{lang:e}:e}var xKe,nHi,$Wi,E0r,iHi,k_a,I0r,F_a,N_a,j_a,Q_a,bue,z_a,oHi,M_a,sHi,L_a,U_a,V_a,__a,q_a,G_a,W_a,H_a,K_a,J_a,Y_a,X_a,Z_a,$_a,e5a,CKe,t5a,aHi,cHi,r5a,Qx,ekt,uHi,n5a,i5a,o5a,s5a,a5a,c5a,tkt,qP,eHi,u5a,GP,v0r,l5a,p5a,f5a,d5a,m5a,h5a,g5a,A5a,y5a,b5a,E5a,I5a,tHi,v5a,x5a,b0r,C5a,w5a,S5a,T5a,O5a,B5a,P5a,D5a,R5a,k5a,F5a,N5a,j5a,lHi,Q5a,QY,z5a,M5a,rkt,x0r,ENe,L5a,U5a,V5a,_5a,q5a,G5a,W5a,H5a,rHi,K5a,J5a,Y5a,yue,X5a,Z5a,$5a,e8a,t8a,r8a,n8a,i8a,o8a,wKe,s8a,a8a,c8a,u8a,l8a,nkt,p8a,f8a,d8a,m8a,ikt,h8a,g8a,A8a,y8a,b8a,E8a,I8a,C0r,w0r,pHi,ivf,fHi,v8a,x8a,C8a,w8a,S8a,ovf,svf,T8a,O8a,avf,P8a=h(()=>{"use strict";ms();xKe=te.string(),nHi=te.string(),$Wi=te.string(),E0r=te.string(),iHi=te.string(),k_a=te.enum(["typescript","javascript","python","java","go","ruby","csharp","php","swift","rust","nodets","nodejs","dotnet","curl","jvm","ts","js"]),I0r=te.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')"),F_a=te.enum(["copy-page","view-as-markdown","ask-ai","chatgpt","claude","cursor","vscode"]),N_a=te.enum(["docs","slack","discord"]),j_a=te.enum(["claude-3.7","claude-4","command-a"]),Q_a=te.enum(["github","dashboard"]),bue=te.enum(["stable","generally-available","in-development","pre-release","deprecated","beta"]),z_a=te.enum(["deprecated","ga","stable","beta"]),oHi=te.enum(["frontmatter","filename"]),M_a=te.enum(["python","cpp"]),sHi=te.enum(["normal","italic"]),L_a=te.enum(["auto","block","swap","fallback","optional"]),U_a=te.enum(["header","header-tabs","sidebar"]),V_a=te.enum(["header","sidebar"]),__a=te.enum(["header","sidebar"]),q_a=te.enum(["center","left"]),G_a=te.enum(["fixed","static"]),W_a=te.enum(["timeline","classic"]),H_a=te.enum(["default","toggle","tabs"]),K_a=te.enum(["default","minimal"]),J_a=te.enum(["default","minimal"]),Y_a=te.enum(["default","bubble"]),X_a=te.enum(["default","canvas"]),Z_a=te.enum(["default","minimal"]),$_a=te.enum(["default","toolbar"]),e5a=te.enum(["curl","csharp","go","java","javascript","php","python","ruby","swift","typescript"]),CKe=te.enum(["_blank","_self","_parent","_top"]),t5a=te.enum(["summary","summary_large_image","app","player"]),aHi=te.enum(["beforeInteractive","afterInteractive","lazyOnload"]),cHi=te.union([te.string(),te.number().int()]),r5a=te.object({dark:te.string().optional(),light:te.string().optional()}),Qx=te.union([te.string(),r5a]),ekt=te.union([$Wi,te.array($Wi)]),uHi=te.union([E0r,te.array(E0r)]),n5a=te.union([te.string(),te.array(te.string())]),i5a=te.union([te.boolean(),te.array(e5a)]),o5a=te.object({dark:te.string().optional(),light:te.string().optional()}),s5a=te.union([te.string(),o5a]),a5a=te.union([te.string(),te.array(te.string())]),c5a=te.enum(["open-by-default"]),tkt=te.union([te.boolean(),c5a]),qP=te.object({viewers:uHi.optional(),orphaned:te.boolean().optional()}),eHi=te.object({flag:te.string(),"fallback-value":te.unknown().optional(),match:te.unknown().optional()}),u5a=te.union([te.string(),eHi,te.array(eHi)]),GP=te.object({"feature-flag":u5a.optional()}),v0r=te.object({viewers:uHi.optional()}),l5a=te.object({"write-key":te.string()}),p5a=te.object({"org-id":te.string()}),f5a=te.object({"app-id":te.string(),"api-base":te.string().optional()}),d5a=te.object({"api-key":te.string(),endpoint:te.string().optional()}),m5a=te.object({"container-id":te.string()}),h5a=te.object({"measurement-id":te.string()}),g5a=te.object({segment:l5a.optional(),fullstory:p5a.optional(),intercom:f5a.optional(),posthog:d5a.optional(),gtm:m5a.optional(),ga4:h5a.optional()}),A5a=te.object({enabled:te.boolean().optional(),style:te.string().optional()}),y5a=te.object({url:te.string(),title:te.string().optional()}),b5a=y5a,E5a=te.enum(["description","subtitle"]),I5a=te.object({"page-directive":te.string().optional(),"page-description-source":E5a.optional(),"llms-txt":te.string().optional(),"llms-full-txt":te.string().optional()}),tHi=te.object({model:j_a.optional(),"system-prompt":te.string().optional(),location:te.array(N_a).optional(),datasources:te.array(b5a).optional(),"mask-pii":te.boolean().optional()}),v5a=te.object({path:te.string(),weight:cHi.optional(),style:sHi.optional()}),x5a=te.union([te.string(),v5a]),b0r=te.object({name:te.string().optional(),path:te.string().optional(),weight:cHi.optional(),style:sHi.optional(),paths:te.array(x5a).optional(),display:L_a.optional(),fallback:te.array(te.string()).optional(),"font-variation-settings":te.string().optional()}),C5a=te.object({headingsFont:b0r.optional(),bodyFont:b0r.optional(),codeFont:b0r.optional()}),w5a=te.object({sidebar:Z_a.optional(),body:X_a.optional(),tabs:Y_a.optional(),"page-actions":$_a.optional(),"footer-nav":J_a.optional(),"language-switcher":K_a.optional(),"product-switcher":H_a.optional()}),S5a=te.object({"page-width":te.string().optional(),"content-width":te.string().optional(),"sidebar-width":te.string().optional(),"header-height":te.string().optional(),"searchbar-placement":U_a.optional(),"tabs-placement":V_a.optional(),"switcher-placement":__a.optional(),"content-alignment":q_a.optional(),"header-position":G_a.optional(),"disable-header":te.boolean().optional(),"hide-nav-links":te.boolean().optional(),"hide-feedback":te.boolean().optional(),"mobile-toc":te.boolean().optional(),"changelog-layout":W_a.optional(),"show-nav-availability-badges":te.boolean().optional()}),T5a=te.object({"prioritize-current-product":te.boolean().optional(),"default-filter-by-current-product":te.boolean().optional()}),O5a=te.object({"search-text":te.string().optional(),"disable-search":te.boolean().optional(),"dark-mode-code":te.boolean().optional(),"default-search-filters":te.boolean().optional(),search:T5a.optional(),"http-snippets":i5a.optional(),"hide-404-page":te.boolean().optional(),"use-javascript-as-typescript":te.boolean().optional(),"disable-explorer-proxy":te.boolean().optional(),"disable-analytics":te.boolean().optional(),language:I0r.optional(),"folder-title-source":oHi.optional(),"substitute-env-vars":te.boolean().optional(),"websocket-oneof-display":te.enum(["flat","grouped"]).optional()}),B5a=te.object({"accent-primary":Qx.optional(),accentPrimary:Qx.optional(),background:Qx.optional(),border:Qx.optional(),"sidebar-background":Qx.optional(),"header-background":Qx.optional(),"card-background":Qx.optional(),"accent-1":Qx.optional(),"accent-2":Qx.optional(),"accent-3":Qx.optional(),"accent-4":Qx.optional(),"accent-5":Qx.optional(),"accent-6":Qx.optional(),"accent-7":Qx.optional(),"accent-8":Qx.optional(),"accent-9":Qx.optional(),"accent-10":Qx.optional(),"accent-11":Qx.optional(),"accent-12":Qx.optional()}),P5a=te.object({title:te.string(),subtitle:te.string().optional(),url:te.string(),icon:te.string().optional(),default:te.boolean().optional()}),D5a=te.object({"copy-page":te.boolean().optional(),"view-as-markdown":te.boolean().optional(),"ask-ai":te.boolean().optional(),chatgpt:te.boolean().optional(),claude:te.boolean().optional(),cursor:te.boolean().optional(),mcp:te.boolean().optional(),vscode:te.boolean().optional(),custom:te.array(P5a).optional()}),R5a=te.object({default:F_a.optional(),options:D5a.optional()}),k5a=te.object({host:te.string().optional(),owner:te.string(),repo:te.string(),branch:te.string().optional()}),F5a=te.object({github:k5a.optional(),launch:Q_a.optional()}),N5a=te.object({url:te.string(),"custom-domain":n5a.optional(),"edit-this-page":F5a.optional(),audiences:ekt.optional(),"multi-source":te.boolean().optional()}),j5a=te.object({dark:te.string().optional(),light:te.string().optional(),height:te.number().optional(),href:te.string().optional(),"right-text":te.string().optional()}),lHi=te.object({link:te.string(),href:te.string(),icon:te.string().optional(),target:CKe.optional()}),Q5a=te.object({version:te.string(),package:te.string()}),QY=te.union([te.string(),Q5a]),z5a=te.object({python:QY.optional(),typescript:QY.optional(),go:QY.optional(),java:QY.optional(),ruby:QY.optional(),csharp:QY.optional(),php:QY.optional(),swift:QY.optional(),rust:QY.optional()}),M5a=te.object({href:te.string().optional()}),rkt=te.object({hidden:te.boolean().optional(),environments:te.array(te.string()).optional(),button:M5a.optional(),oauth:te.boolean().optional(),"limit-websocket-messages-per-connection":te.number().int().optional()}),x0r=te.object({message:te.string()}),ENe=v0r.merge(te.object({href:te.string().optional(),target:CKe.optional(),url:te.string().optional(),text:te.string().optional(),icon:te.string().optional(),rightIcon:te.string().optional(),rounded:te.boolean().optional()})),L5a=v0r.merge(te.object({url:te.string(),target:CKe.optional()})),U5a=te.union([te.string(),L5a]),V5a=v0r.merge(te.object({links:te.array(ENe),text:te.string().optional(),icon:te.string().optional(),rightIcon:te.string().optional(),rounded:te.boolean().optional()})),_5a=te.union([ENe.merge(te.object({type:te.literal("filled")})),ENe.merge(te.object({type:te.literal("outlined")})),ENe.merge(te.object({type:te.literal("minimal")})),te.object({type:te.literal("github"),value:U5a}),V5a.merge(te.object({type:te.literal("dropdown")})),ENe.merge(te.object({type:te.literal("primary")})),ENe.merge(te.object({type:te.literal("secondary")}))]),q5a=te.object({github:te.string().optional(),twitter:te.string().optional(),x:te.string().optional(),linkedin:te.string().optional(),youtube:te.string().optional(),instagram:te.string().optional(),facebook:te.string().optional(),discord:te.string().optional(),slack:te.string().optional(),hackernews:te.string().optional(),medium:te.string().optional(),website:te.string().optional()}),G5a=te.object({path:te.string(),strategy:aHi.optional()}),W5a=te.union([te.string(),G5a]),H5a=te.object({url:te.string(),strategy:aHi.optional(),"disable-sri":te.boolean().optional()}),rHi=te.union([H5a,W5a]),K5a=te.union([rHi,te.array(rHi)]),J5a=te.object({"og:site_name":te.string().optional(),"og:title":te.string().optional(),"og:description":te.string().optional(),"og:url":te.string().optional(),"og:image":te.string().optional(),"og:image:width":te.number().optional(),"og:image:height":te.number().optional(),"og:locale":te.string().optional(),"og:logo":te.string().optional(),"twitter:title":te.string().optional(),"twitter:description":te.string().optional(),"twitter:handle":te.string().optional(),"twitter:image":te.string().optional(),"twitter:site":te.string().optional(),"twitter:url":te.string().optional(),"twitter:card":t5a.optional(),"og:dynamic":te.boolean().optional(),"og:dynamic:background-image":te.string().optional(),"og:dynamic:text-color":te.string().optional(),"og:dynamic:background-color":te.string().optional(),"og:dynamic:logo-color":te.enum(["dark","light"]).optional(),"og:dynamic:show-logo":te.boolean().optional(),"og:dynamic:show-section":te.boolean().optional(),"og:dynamic:show-description":te.boolean().optional(),"og:dynamic:show-url":te.boolean().optional(),"og:dynamic:show-gradient":te.boolean().optional(),"canonical-host":te.string().optional()}),Y5a=te.object({source:te.string(),destination:te.string(),permanent:te.boolean().optional()}),yue=te.enum(["warn","error"]),X5a=te.object({"example-validation":yue.optional(),"broken-links":yue.optional(),"no-non-component-refs":yue.optional(),"valid-local-references":yue.optional(),"no-circular-redirects":yue.optional(),"valid-docs-endpoints":yue.optional(),"missing-redirects":yue.optional(),"valid-changelog-slug":yue.optional()}),Z5a=te.object({rules:X5a.optional()}),$5a=te.object({intercom:te.string().optional(),context7:te.string().optional()}),e8a=te.object({"mdx-components":te.array(te.string()).optional(),"disable-stream-toggle":te.boolean().optional(),"openapi-parser-v2":te.boolean().optional(),"openapi-parser-v3":te.boolean().optional(),"dynamic-snippets":te.boolean().optional(),"ai-examples":te.boolean().optional(),"ai-example-style-instructions":te.string().optional(),"exclude-apis":te.boolean().optional(),"basepath-aware":te.boolean().optional(),"external-sitemaps":te.array(te.string()).optional()}),t8a=te.object({git:te.string(),subpath:te.string().optional()}),r8a=te.object({path:te.string()}),n8a=te.union([t8a,r8a]),i8a=te.object({path:te.string()}),o8a=te.object({input:n8a,output:i8a,lang:M_a}),wKe=qP.merge(GP).merge(te.object({page:te.string(),path:te.string(),slug:te.string().optional(),icon:te.string().optional(),hidden:te.boolean().optional(),noindex:te.boolean().optional(),availability:bue.optional()})),s8a=qP.merge(GP).merge(te.object({changelog:nHi,title:te.string().optional(),slug:te.string().optional(),icon:te.string().optional(),hidden:te.boolean().optional()})),a8a=qP.merge(GP).merge(te.object({library:iHi,title:te.string().optional(),slug:te.string().optional()})),c8a=qP.merge(GP).merge(te.object({folder:te.string(),title:te.string().optional(),"title-source":oHi.optional(),slug:te.string().optional(),icon:te.string().optional(),hidden:te.boolean().optional(),"skip-slug":te.boolean().optional(),collapsed:tkt.optional(),collapsible:te.boolean().optional(),"collapsed-by-default":te.boolean().optional(),availability:bue.optional()})),u8a=qP.merge(GP).merge(te.object({endpoint:te.string(),title:te.string().optional(),slug:te.string().optional(),icon:te.string().optional(),hidden:te.boolean().optional(),availability:bue.optional(),playground:rkt.optional()})),l8a=qP.merge(GP).merge(te.object({operation:te.string(),title:te.string().optional(),slug:te.string().optional(),hidden:te.boolean().optional(),availability:bue.optional()})),nkt=te.lazy(()=>te.union([te.string(),te.record(te.string(),d8a),p8a,u8a,l8a,wKe,lHi])),p8a=qP.merge(GP).merge(te.object({section:te.string(),"referenced-packages":te.array(te.string()).optional(),summary:te.string().optional(),contents:te.array(nkt).optional(),slug:te.string().optional(),icon:te.string().optional(),hidden:te.boolean().optional(),"skip-slug":te.boolean().optional(),collapsed:tkt.optional(),collapsible:te.boolean().optional(),"collapsed-by-default":te.boolean().optional(),availability:bue.optional(),playground:rkt.optional()})),f8a=qP.merge(GP).merge(te.object({title:te.string().optional(),summary:te.string().optional(),contents:te.array(nkt).optional(),availability:bue.optional(),slug:te.string().optional(),icon:te.string().optional(),hidden:te.boolean().optional(),"skip-slug":te.boolean().optional(),playground:rkt.optional()})),d8a=te.lazy(()=>te.union([te.array(nkt),f8a])),m8a=qP.merge(GP).merge(te.object({api:te.string(),"api-name":te.string().optional(),openrpc:te.string().optional(),audiences:ekt.optional(),"display-errors":te.boolean().optional(),"tag-description-pages":te.boolean().optional(),snippets:z5a.optional(),postman:te.string().optional(),summary:te.string().optional(),layout:te.array(nkt).optional(),collapsed:tkt.optional(),icon:te.string().optional(),slug:te.string().optional(),hidden:te.boolean().optional(),availability:bue.optional(),"skip-slug":te.boolean().optional(),alphabetized:te.boolean().optional(),flattened:te.boolean().optional(),paginated:te.boolean().optional(),playground:rkt.optional()})),ikt=te.lazy(()=>te.union([wKe,h8a,m8a,a8a,lHi,s8a,c8a])),h8a=qP.merge(GP).merge(te.object({section:te.string(),path:te.string().optional(),contents:te.array(ikt),collapsed:tkt.optional(),collapsible:te.boolean().optional(),"collapsed-by-default":te.boolean().optional(),slug:te.string().optional(),icon:te.string().optional(),hidden:te.boolean().optional(),"skip-slug":te.boolean().optional(),availability:bue.optional()})),g8a=te.array(ikt),A8a=qP.merge(GP).merge(te.object({title:te.string(),subtitle:te.string().optional(),icon:te.string().optional(),layout:te.array(ikt),slug:te.string().optional(),"skip-slug":te.boolean().optional(),hidden:te.boolean().optional(),default:te.boolean().optional()})),y8a=te.object({tab:xKe,layout:te.array(ikt).optional()}),b8a=te.object({tab:xKe,variants:te.array(A8a)}),E8a=te.union([y8a,b8a]),I8a=te.array(E8a),C0r=te.union([g8a,I8a]),w0r=qP.merge(GP).merge(te.object({"display-name":te.string(),icon:te.string().optional(),slug:te.string().optional(),"skip-slug":te.boolean().optional(),hidden:te.boolean().optional(),href:te.string().optional(),target:CKe.optional(),changelog:nHi.optional()})),pHi=qP.merge(GP).merge(te.object({"display-name":te.string(),path:te.string(),slug:te.string().optional(),availability:z_a.optional(),audiences:ekt.optional(),hidden:te.boolean().optional(),announcement:x0r.optional()})),ivf=te.object({tabs:te.record(xKe,w0r).optional(),"landing-page":wKe.optional(),navigation:C0r}),fHi=qP.merge(GP).merge(te.object({"display-name":te.string(),subtitle:te.string().optional(),icon:te.string().optional(),image:te.string().optional(),versions:te.array(pHi).optional(),audiences:ekt.optional()})),v8a=fHi.merge(te.object({path:te.string(),slug:te.string().optional(),announcement:x0r.optional()})),x8a=fHi.merge(te.object({href:te.string(),target:CKe.optional()})),C8a=te.union([v8a,x8a]),w8a=qP.merge(GP).merge(te.object({"display-name":te.string(),path:te.string(),slug:te.string().optional()})),S8a=te.object({href:te.string()}),ovf=te.union([w8a,S8a]),svf=te.object({tabs:te.record(xKe,w0r).optional(),"landing-page":wKe.optional(),navigation:C0r}),T8a=te.object({lang:I0r,default:te.boolean().optional()}),O8a=te.union([I0r,T8a]);avf=te.object({instances:te.array(N5a),title:te.string().optional(),libraries:te.record(iHi,o8a).optional(),analytics:g5a.optional(),announcement:x0r.optional(),roles:te.array(E0r).optional(),tabs:te.record(xKe,w0r).optional(),versions:te.array(pHi).optional(),products:te.array(C8a).optional(),"landing-page":wKe.optional(),navigation:C0r.optional(),"navbar-links":te.array(_5a).optional(),"footer-links":q5a.optional(),"page-actions":R5a.optional(),experimental:e8a.optional(),"default-language":k_a.optional(),languages:te.array(te.string()).optional(),translations:te.array(O8a).optional().superRefine((e,t)=>{if(e==null)return;let n=e.map(B8a).filter(i=>i.default===!0).length;n>1&&t.addIssue({code:te.ZodIssueCode.custom,message:`Only one translation entry can be marked as default, but ${n} were found`})}),"ai-chat":tHi.optional(),"ai-search":tHi.optional(),"ai-examples":A5a.optional(),agents:I5a.optional(),metadata:J5a.optional(),redirects:te.array(Y5a).optional(),check:Z5a.optional(),logo:j5a.optional(),favicon:te.string().optional(),"background-image":s5a.optional(),colors:B5a.optional(),typography:C5a.optional(),layout:S5a.optional(),settings:O5a.optional(),theme:w5a.optional(),"global-theme":te.string().optional(),integrations:$5a.optional(),css:a5a.optional(),js:K5a.optional(),header:te.string().optional(),footer:te.string().optional()})});var D8a=h(()=>{"use strict"});var R8a=h(()=>{"use strict"});var k8a=h(()=>{"use strict"});var F8a=h(()=>{"use strict"});var N8a=h(()=>{"use strict"});var mHi,j8a=h(()=>{"use strict";mHi={Docs:"docs",Slack:"slack",Discord:"discord"}});var hHi,Q8a=h(()=>{"use strict";hHi={Claude37:"claude-3.7",Claude4:"claude-4",CommandA:"command-a"}});var z8a=h(()=>{"use strict"});var M8a=h(()=>{"use strict"});var L8a=h(()=>{"use strict"});var U8a=h(()=>{"use strict"});var V8a=h(()=>{"use strict"});var _8a=h(()=>{"use strict"});var q8a=h(()=>{"use strict"});var G8a=h(()=>{"use strict"});var W8a=h(()=>{"use strict"});var H8a=h(()=>{"use strict"});var K8a=h(()=>{"use strict"});var J8a=h(()=>{"use strict"});var Y8a=h(()=>{"use strict"});var gHi,X8a=h(()=>{"use strict";gHi={Stable:"stable",GenerallyAvailable:"generally-available",InDevelopment:"in-development",PreRelease:"pre-release",Deprecated:"deprecated",Beta:"beta",Alpha:"alpha",Preview:"preview",Legacy:"legacy"}});var Z8a=h(()=>{"use strict"});var $8a=h(()=>{"use strict"});var AHi,e9a=h(()=>{"use strict";AHi={Default:"default",Canvas:"canvas"}});var t9a=h(()=>{"use strict"});var r9a=h(()=>{"use strict"});var yHi,n9a=h(()=>{"use strict";yHi={Timeline:"timeline",Classic:"classic"}});var i9a=h(()=>{"use strict"});var bHi,o9a=h(()=>{"use strict";bHi={Warn:"warn",Error:"error"}});var s9a=h(()=>{"use strict"});var EHi,a9a=h(()=>{"use strict";EHi={OpenByDefault:"open-by-default"}});var c9a=h(()=>{"use strict"});var u9a=h(()=>{"use strict"});var l9a=h(()=>{"use strict"});var p9a=h(()=>{"use strict"});var IHi,f9a=h(()=>{"use strict";IHi={Center:"center",Left:"left"}});var d9a=h(()=>{"use strict"});var m9a=h(()=>{"use strict"});var h9a=h(()=>{"use strict"});var g9a=h(()=>{"use strict"});var A9a=h(()=>{"use strict"});var y9a=h(()=>{"use strict"});var b9a=h(()=>{"use strict"});var E9a=h(()=>{"use strict"});var vHi,I9a=h(()=>{"use strict";vHi={Github:"github",Dashboard:"dashboard"}});var v9a=h(()=>{"use strict"});var x9a=h(()=>{"use strict"});var C9a=h(()=>{"use strict"});var w9a=h(()=>{"use strict"});var S9a=h(()=>{"use strict"});var T9a=h(()=>{"use strict"});var O9a=h(()=>{"use strict"});var B9a=h(()=>{"use strict"});var xHi,P9a=h(()=>{"use strict";xHi={Auto:"auto",Block:"block",Swap:"swap",Fallback:"fallback",Optional:"optional"}});var CHi,D9a=h(()=>{"use strict";CHi={Normal:"normal",Italic:"italic"}});var R9a=h(()=>{"use strict"});var k9a=h(()=>{"use strict"});var wHi,F9a=h(()=>{"use strict";wHi={Default:"default",Minimal:"minimal"}});var N9a=h(()=>{"use strict"});var j9a=h(()=>{"use strict"});var Q9a=h(()=>{"use strict"});var z9a=h(()=>{"use strict"});var M9a=h(()=>{"use strict"});var SHi,L9a=h(()=>{"use strict";SHi={Fixed:"fixed",Static:"static"}});var THi,U9a=h(()=>{"use strict";THi={Curl:"curl",Csharp:"csharp",Go:"go",Java:"java",Javascript:"javascript",Php:"php",Python:"python",Ruby:"ruby",Swift:"swift",Typescript:"typescript"}});var V9a=h(()=>{"use strict"});var _9a=h(()=>{"use strict"});var q9a=h(()=>{"use strict"});var G9a=h(()=>{"use strict"});var W9a=h(()=>{"use strict"});var H9a=h(()=>{"use strict"});var K9a=h(()=>{"use strict"});var J9a=h(()=>{"use strict"});var Y9a=h(()=>{"use strict"});var OHi,X9a=h(()=>{"use strict";OHi={BeforeInteractive:"beforeInteractive",AfterInteractive:"afterInteractive",LazyOnload:"lazyOnload"}});var Z9a=h(()=>{"use strict"});var BHi,$9a=h(()=>{"use strict";BHi={Default:"default",Minimal:"minimal"}});var eqa=h(()=>{"use strict"});var tqa=h(()=>{"use strict"});var rqa=h(()=>{"use strict"});var nqa=h(()=>{"use strict"});var PHi,iqa=h(()=>{"use strict";PHi={Python:"python",Cpp:"cpp"}});var oqa=h(()=>{"use strict"});var sqa=h(()=>{"use strict"});var aqa=h(()=>{"use strict"});var cqa=h(()=>{"use strict"});var uqa=h(()=>{"use strict"});var lqa=h(()=>{"use strict"});var pqa=h(()=>{"use strict"});var fqa=h(()=>{"use strict"});var dqa=h(()=>{"use strict"});var mqa=h(()=>{"use strict"});var hqa=h(()=>{"use strict"});var gqa=h(()=>{"use strict"});var Aqa=h(()=>{"use strict"});var DHi,yqa=h(()=>{"use strict";DHi={Dark:"dark",Light:"light"}});var RHi,bqa=h(()=>{"use strict";RHi={CopyPage:"copy-page",ViewAsMarkdown:"view-as-markdown",AskAi:"ask-ai",Chatgpt:"chatgpt",Claude:"claude",Cursor:"cursor",ClaudeCode:"claude-code",Vscode:"vscode"}});var Eqa=h(()=>{"use strict"});var Iqa=h(()=>{"use strict"});var kHi,vqa=h(()=>{"use strict";kHi={Default:"default",Toolbar:"toolbar"}});var xqa=h(()=>{"use strict"});var FHi,Cqa=h(()=>{"use strict";FHi={Description:"description",Subtitle:"subtitle"}});var wqa=h(()=>{"use strict"});var Sqa=h(()=>{"use strict"});var Tqa=h(()=>{"use strict"});var Oqa=h(()=>{"use strict"});var Bqa=h(()=>{"use strict"});var Pqa=h(()=>{"use strict"});var Dqa=h(()=>{"use strict"});var Rqa=h(()=>{"use strict"});var NHi,kqa=h(()=>{"use strict";NHi={Default:"default",Toggle:"toggle",Tabs:"tabs"}});var jHi,Fqa=h(()=>{"use strict";jHi={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 Nqa=h(()=>{"use strict"});var jqa=h(()=>{"use strict"});var Qqa=h(()=>{"use strict"});var zqa=h(()=>{"use strict"});var QHi,Mqa=h(()=>{"use strict";QHi={Header:"header",HeaderTabs:"header-tabs",Sidebar:"sidebar"}});var Lqa=h(()=>{"use strict"});var Uqa=h(()=>{"use strict"});var Vqa=h(()=>{"use strict"});var zHi,_qa=h(()=>{"use strict";zHi={Default:"default",Minimal:"minimal"}});var qqa=h(()=>{"use strict"});var Gqa=h(()=>{"use strict"});var Wqa=h(()=>{"use strict"});var Hqa=h(()=>{"use strict"});var Kqa=h(()=>{"use strict"});var MHi,Jqa=h(()=>{"use strict";MHi={Header:"header",Sidebar:"sidebar"}});var Yqa=h(()=>{"use strict"});var Xqa=h(()=>{"use strict"});var Zqa=h(()=>{"use strict"});var $qa=h(()=>{"use strict"});var eGa=h(()=>{"use strict"});var tGa=h(()=>{"use strict"});var LHi,rGa=h(()=>{"use strict";LHi={Left:"left",Center:"center"}});var UHi,nGa=h(()=>{"use strict";UHi={Header:"header",Sidebar:"sidebar"}});var iGa=h(()=>{"use strict"});var oGa=h(()=>{"use strict"});var VHi,sGa=h(()=>{"use strict";VHi={Default:"default",Bubble:"bubble"}});var aGa=h(()=>{"use strict"});var _Hi,cGa=h(()=>{"use strict";_Hi={Blank:"_blank",Self:"_self",Parent:"_parent",Top:"_top"}});var uGa=h(()=>{"use strict"});var qHi,lGa=h(()=>{"use strict";qHi={Frontmatter:"frontmatter",Filename:"filename"}});var pGa=h(()=>{"use strict"});var fGa=h(()=>{"use strict"});var GHi,dGa=h(()=>{"use strict";GHi={Summary:"summary",SummaryLargeImage:"summary_large_image",App:"app",Player:"player"}});var mGa=h(()=>{"use strict"});var WHi,hGa=h(()=>{"use strict";WHi={Deprecated:"deprecated",Legacy:"legacy",Ga:"ga",Stable:"stable",Beta:"beta",Alpha:"alpha",Preview:"preview"}});var gGa=h(()=>{"use strict"});var AGa=h(()=>{"use strict"});var yGa=h(()=>{"use strict"});var HHi,bGa=h(()=>{"use strict";HHi={Flat:"flat",Grouped:"grouped"}});var EGa=h(()=>{"use strict"});var IGa=h(()=>{"use strict"});var vGa=h(()=>{"use strict"});var KHi=h(()=>{"use strict";R8a();k8a();F8a();N8a();j8a();Q8a();z8a();M8a();L8a();U8a();V8a();_8a();q8a();G8a();W8a();H8a();K8a();J8a();Y8a();X8a();Z8a();$8a();e9a();t9a();r9a();n9a();i9a();o9a();s9a();a9a();c9a();u9a();l9a();p9a();f9a();d9a();m9a();h9a();g9a();A9a();y9a();b9a();E9a();I9a();v9a();x9a();C9a();w9a();S9a();T9a();O9a();B9a();P9a();D9a();R9a();k9a();F9a();N9a();j9a();Q9a();z9a();M9a();L9a();U9a();V9a();_9a();q9a();G9a();W9a();H9a();K9a();J9a();Y9a();X9a();Z9a();$9a();eqa();tqa();rqa();nqa();iqa();oqa();sqa();aqa();cqa();uqa();lqa();pqa();fqa();dqa();mqa();hqa();gqa();Aqa();yqa();bqa();Eqa();Iqa();vqa();xqa();Cqa();wqa();Sqa();Tqa();Oqa();Bqa();Pqa();Dqa();Rqa();kqa();Fqa();Nqa();jqa();Qqa();zqa();Mqa();Lqa();Uqa();Vqa();_qa();qqa();Gqa();Wqa();Hqa();Kqa();Jqa();Yqa();Xqa();Zqa();$qa();eGa();tGa();rGa();nGa();iGa();oGa();sGa();aGa();cGa();uGa();lGa();pGa();fGa();dGa();mGa();hGa();gGa();AGa();yGa();bGa();EGa();IGa();vGa()});var S0r={};X(S0r,{AiChatLocation:()=>mHi,AiChatModel:()=>hHi,Availability:()=>gHi,BodyThemeConfig:()=>AHi,ChangelogLayout:()=>yHi,CheckRuleSeverity:()=>bHi,CollapsedStringValue:()=>EHi,ContentAlignment:()=>IHi,EditThisPageLaunch:()=>vHi,FontDisplay:()=>xHi,FontStyle:()=>CHi,FooterNavThemeConfig:()=>wHi,HeaderPosition:()=>SHi,HttpSnippetLanguage:()=>THi,JsScriptStrategy:()=>OHi,LanguageSwitcherThemeConfig:()=>BHi,LibraryLanguage:()=>PHi,OgDynamicLogoColor:()=>DHi,PageActionOption:()=>RHi,PageActionsThemeConfig:()=>kHi,PageDescriptionSource:()=>FHi,ProductSwitcherThemeConfig:()=>NHi,ProgrammingLanguage:()=>jHi,SearchbarPlacement:()=>QHi,SidebarThemeConfig:()=>zHi,SwitcherPlacement:()=>MHi,TabsAlignment:()=>LHi,TabsPlacement:()=>UHi,TabsThemeStyle:()=>VHi,Target:()=>_Hi,TitleSource:()=>qHi,TwitterCardSetting:()=>GHi,VersionAvailability:()=>WHi,WebSocketOneofDisplay:()=>HHi});var xGa=h(()=>{"use strict";KHi()});var CGa=h(()=>{"use strict";xGa();KHi()});var JHi={};X(JHi,{AiChatLocation:()=>mHi,AiChatModel:()=>hHi,Availability:()=>gHi,BodyThemeConfig:()=>AHi,ChangelogLayout:()=>yHi,CheckRuleSeverity:()=>bHi,CollapsedStringValue:()=>EHi,ContentAlignment:()=>IHi,EditThisPageLaunch:()=>vHi,FontDisplay:()=>xHi,FontStyle:()=>CHi,FooterNavThemeConfig:()=>wHi,HeaderPosition:()=>SHi,HttpSnippetLanguage:()=>THi,JsScriptStrategy:()=>OHi,LanguageSwitcherThemeConfig:()=>BHi,LibraryLanguage:()=>PHi,OgDynamicLogoColor:()=>DHi,PageActionOption:()=>RHi,PageActionsThemeConfig:()=>kHi,PageDescriptionSource:()=>FHi,ProductSwitcherThemeConfig:()=>NHi,ProgrammingLanguage:()=>jHi,SearchbarPlacement:()=>QHi,SidebarThemeConfig:()=>zHi,SwitcherPlacement:()=>MHi,TabsAlignment:()=>LHi,TabsPlacement:()=>UHi,TabsThemeStyle:()=>VHi,Target:()=>_Hi,TitleSource:()=>qHi,TwitterCardSetting:()=>GHi,VersionAvailability:()=>WHi,WebSocketOneofDisplay:()=>HHi,docs:()=>S0r});var YHi=h(()=>{"use strict";CGa()});var wGa,SGa=h(()=>{"use strict";wGa=(e,t,r)=>JSON.stringify(e,t,r)});function cvf({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: ${wGa(r,void 0,2)}`),n.join(`
172
172
  `)}var okt,TGa=h(()=>{"use strict";SGa();okt=class extends Error{statusCode;body;rawResponse;cause;constructor({message:t,statusCode:r,body:n,rawResponse:i,cause:o}){super(cvf({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 skt,OGa=h(()=>{"use strict";skt=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 BGa=h(()=>{"use strict";TGa();OGa()});var b7,PGa,akt,XHi,Dgb,ZHi=h(()=>{"use strict";b7={Debug:"debug",Info:"info",Warn:"warn",Error:"error"},PGa={[b7.Debug]:1,[b7.Info]:2,[b7.Warn]:3,[b7.Error]:4},akt=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)}},XHi=class{level;logger;silent;constructor(t){this.level=PGa[t.level],this.logger=t.logger,this.silent=t.silent}shouldLog(t){return!this.silent&&this.level<=PGa[t]}isDebug(){return this.shouldLog(b7.Debug)}debug(t,...r){this.isDebug()&&this.logger.debug(t,...r)}isInfo(){return this.shouldLog(b7.Info)}info(t,...r){this.isInfo()&&this.logger.info(t,...r)}isWarn(){return this.shouldLog(b7.Warn)}warn(t,...r){this.isWarn()&&this.logger.warn(t,...r)}isError(){return this.shouldLog(b7.Error)}error(t,...r){this.isError()&&this.logger.error(t,...r)}},Dgb=new XHi({level:b7.Info,logger:new akt,silent:!0})});var $Hi,DGa=h(()=>{"use strict";ZHi();(function(e){e.LogLevel=b7,e.ConsoleLogger=akt})($Hi||($Hi={}))});var RGa=h(()=>{"use strict";DGa()});var kGa=h(()=>{"use strict";RGa()});var FGa=h(()=>{"use strict"});var NGa=h(()=>{"use strict";ZHi()});var jGa=h(()=>{"use strict"});var iu,dw=h(()=>{"use strict";iu={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 Gd(e,t){return`Expected ${t}. Received ${pvf(e)}.`}function pvf(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 tF=h(()=>{"use strict"});function mw(e){return{...e,json:QGa(e.json),parse:QGa(e.parse)}}function QGa(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(`
173
173
  `)),{ok:!0,value:t}):n}}var zY=h(()=>{"use strict"});function T0r(e){return e.path.length===0?e.message:`${e.path.join(" -> ")}: ${e.message}`}var eKi=h(()=>{"use strict"});var SKe,tKi=h(()=>{"use strict";eKi();SKe=class extends Error{errors;constructor(t){super(t.map(T0r).join("; ")),this.errors=t,Object.setPrototypeOf(this,new.target.prototype),this.name=this.constructor.name}}});var TKe,rKi=h(()=>{"use strict";eKi();TKe=class extends Error{errors;constructor(t){super(t.map(T0r).join("; ")),this.errors=t,Object.setPrototypeOf(this,new.target.prototype),this.name=this.constructor.name}}});function Wd(e){return{nullable:()=>fvf(e),optional:()=>nKi(e),optionalNullable:()=>dvf(e),transform:t=>iKi(e,t),parseOrThrow:(t,r)=>{let n=e.parse(t,r);if(n.ok)return n.value;throw new TKe(n.errors)},jsonOrThrow:(t,r)=>{let n=e.json(t,r);if(n.ok)return n.value;throw new SKe(n.errors)}}}function fvf(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:()=>iu.NULLABLE};return{...t,...Wd(t)}}function nKi(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:()=>iu.OPTIONAL};return{...t,...Wd(t)}}function dvf(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:()=>iu.OPTIONAL_NULLABLE};return{...t,...Wd(t)}}function iKi(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,...Wd(r)}}var zGa=h(()=>{"use strict";dw();tKi();rKi()});var Pj=h(()=>{"use strict";zGa();tKi();rKi()});function MGa(){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:Gd(t,"bigint | number")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="bigint"?{ok:!1,errors:[{path:r,message:Gd(t,"bigint")}]}:{ok:!0,value:t},getType:()=>iu.BIGINT};return{...mw(e),...Wd(e)}}var LGa=h(()=>{"use strict";dw();tF();zY();Pj()});var UGa=h(()=>{"use strict";LGa()});function VGa(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="string"?{ok:!1,errors:[{path:r,message:Gd(t,"string")}]}:mvf.test(t)?{ok:!0,value:new Date(t)}:{ok:!1,errors:[{path:r,message:Gd(t,"ISO 8601 date string")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>t instanceof Date?{ok:!0,value:t.toISOString()}:{ok:!1,errors:[{path:r,message:Gd(t,"Date object")}]},getType:()=>iu.DATE};return{...mw(e),...Wd(e)}}var mvf,_Ga=h(()=>{"use strict";dw();tF();zY();Pj();mvf=/^([+-]?\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 qGa=h(()=>{"use strict";_Ga()});function QS(e,t){return()=>{let r={parse:t,json:t,getType:()=>e};return{...mw(r),...Wd(r)}}}var MY=h(()=>{"use strict";Pj();zY()});function O0r(e){let t=new Set(e);return QS(iu.ENUM,(n,{allowUnrecognizedEnumValues:i,breadcrumbsPrefix:o=[]}={})=>typeof n!="string"?{ok:!1,errors:[{path:o,message:Gd(n,"string")}]}:!t.has(n)&&!i?{ok:!1,errors:[{path:o,message:Gd(n,"enum")}]}:{ok:!0,value:n})()}var GGa=h(()=>{"use strict";dw();MY();tF()});var oKi=h(()=>{"use strict";GGa()});function WGa(e){let t=sKi(e);return{...t,...Wd(t)}}function sKi(e){return{parse:(t,r)=>OKe(e).parse(t,r),json:(t,r)=>OKe(e).json(t,r),getType:()=>OKe(e).getType()}}function OKe(e){let t=e;return t.__zurg_memoized==null&&(t.__zurg_memoized=e()),t.__zurg_memoized}var aKi=h(()=>{"use strict";Pj()});function cKi(e){return Object.entries(e)}var HGa=h(()=>{"use strict"});function ckt(e,t){let r=new Set(t);return Object.entries(e).reduce((n,[i,o])=>(r.has(i)&&(n[i]=o),n),{})}var uKi=h(()=>{"use strict"});function Eue(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return t===null?!0:Object.getPrototypeOf(t)===null}var ukt=h(()=>{"use strict"});function lkt(e){return Object.keys(e)}var lKi=h(()=>{"use strict"});function KGa(e,t){let r=[],n=[];for(let i of e)t(i)?r.push(i):n.push(i);return[r,n]}var JGa=h(()=>{"use strict"});function E7(e){return{withParsedProperties:t=>pKi(e,t)}}function pKi(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(hvf.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(!Eue(n))return{ok:!1,errors:[{path:i?.breadcrumbsPrefix??[],message:Gd(n,"object")}]};let o=new Set(Object.keys(t)),s=ckt(n,Object.keys(n).filter(a=>!o.has(a)));return e.json(s,i)},getType:()=>e.getType()};return{...r,...Wd(r),...E7(r)}}var hvf,YGa=h(()=>{"use strict";uKi();tF();ukt();Pj();hvf=Object.prototype.hasOwnProperty});var pkt=h(()=>{"use strict";YGa()});function XGa(e,t){return{rawKey:e,valueSchema:t,isProperty:!0}}function Iue(e){return e.isProperty}var fKi=h(()=>{"use strict"});function B0r(e){let t;function r(){if(t==null){t={};for(let[d,f]of cKi(e)){let m=Iue(f)?f.rawKey:d,g=Iue(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 cKi(e)){let m=Iue(f)?f.rawKey:d,g=Iue(f)?f.valueSchema:f;Avf(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])=>Iue(f)?f.rawKey:d),_getParsedProperties:()=>lkt(e),parse:(d,f)=>{let m=f?.breadcrumbsPrefix??[];return ZGa({value:d,requiredKeys:a(),requiredKeysSet:u(),getProperty:g=>{let A=r()[g];if(A!=null)return{transformedKey:A.parsedKey,transform:y=>{let E=[...m,g];return A.valueSchema.parse(y,{...f,breadcrumbsPrefix:E})}}},unrecognizedObjectKeys:f?.unrecognizedObjectKeys,skipValidation:f?.skipValidation,breadcrumbsPrefix:m,omitUndefined:f?.omitUndefined})},json:(d,f)=>{let m=f?.breadcrumbsPrefix??[];return ZGa({value:d,requiredKeys:c(),requiredKeysSet:l(),getProperty:g=>{let A=e[g];if(A!=null)return Iue(A)?{transformedKey:A.rawKey,transform:y=>{let E=[...m,g];return A.valueSchema.json(y,{...f,breadcrumbsPrefix:E})}}:{transformedKey:g,transform:y=>{let E=[...m,g];return A.json(y,{...f,breadcrumbsPrefix:E})}}},unrecognizedObjectKeys:f?.unrecognizedObjectKeys,skipValidation:f?.skipValidation,breadcrumbsPrefix:m,omitUndefined:f?.omitUndefined})},getType:()=>iu.OBJECT};return{...mw(p),...Wd(p),...E7(p),...INe(p)}}function ZGa({value:e,requiredKeys:t,requiredKeysSet:r,getProperty:n,unrecognizedObjectKeys:i="fail",skipValidation:o=!1,breadcrumbsPrefix:s=[]}){if(!Eue(e))return{ok:!1,errors:[{path:s,message:Gd(e,"object")}]};let a=t.length,c=[],u={};for(let l in e){if(!gvf.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 INe(e){return{extend:t=>{let r={_getParsedProperties:()=>[...e._getParsedProperties(),...t._getParsedProperties()],_getRawProperties:()=>[...e._getRawProperties(),...t._getRawProperties()],parse:(n,i)=>$Ga({extensionKeys:t._getRawProperties(),value:n,transformBase:o=>e.parse(o,i),transformExtension:o=>t.parse(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),json:(n,i)=>$Ga({extensionKeys:t._getParsedProperties(),value:n,transformBase:o=>e.json(o,i),transformExtension:o=>t.json(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),getType:()=>iu.OBJECT};return{...r,...Wd(r),...E7(r),...INe(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:()=>iu.OBJECT};return{...n,...Wd(n),...E7(n),...INe(n)}}}}function $Ga({extensionKeys:e,value:t,transformBase:r,transformExtension:n,breadcrumbsPrefix:i=[]}){if(!Eue(t))return{ok:!1,errors:[{path:i,message:Gd(t,"object")}]};let o=new Set(e),[s,a]=KGa(lkt(t),l=>o.has(l)),c=r(ckt(t,a)),u=n(ckt(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 Avf(e){return!yvf(e)}function yvf(e){switch(e.getType()){case iu.ANY:case iu.UNKNOWN:case iu.OPTIONAL:case iu.OPTIONAL_NULLABLE:return!0;default:return!1}}var gvf,dKi=h(()=>{"use strict";dw();HGa();uKi();tF();ukt();lKi();zY();JGa();pkt();Pj();fKi();gvf=Object.prototype.hasOwnProperty});function e7a(e){return B0r(e)}var t7a=h(()=>{"use strict";dKi()});var mKi=h(()=>{"use strict";dKi();t7a();fKi()});function r7a(e){let t={...sKi(e),_getRawProperties:()=>OKe(e)._getRawProperties(),_getParsedProperties:()=>OKe(e)._getParsedProperties()};return{...t,...Wd(t),...E7(t),...INe(t)}}var n7a=h(()=>{"use strict";mKi();pkt();Pj();aKi()});var i7a=h(()=>{"use strict";aKi();n7a()});function P0r(e){let t={parse:(r,n)=>o7a(r,(i,o)=>e.parse(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),json:(r,n)=>o7a(r,(i,o)=>e.json(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),getType:()=>iu.LIST};return{...mw(t),...Wd(t)}}function o7a(e,t){if(!Array.isArray(e))return{ok:!1,errors:[{message:Gd(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 s7a=h(()=>{"use strict";dw();tF();zY();Pj()});var hKi=h(()=>{"use strict";s7a()});function a7a(e){return QS(iu.BOOLEAN_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:Gd(r,`${e.toString()}`)}]})()}var c7a=h(()=>{"use strict";dw();MY();tF()});function u7a(e){return QS(iu.STRING_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:Gd(r,`"${e}"`)}]})()}var l7a=h(()=>{"use strict";dw();MY();tF()});var p7a=h(()=>{"use strict";c7a();l7a()});var f7a,d7a=h(()=>{"use strict";dw();MY();f7a=QS(iu.ANY,e=>({ok:!0,value:e}))});var m7a,h7a=h(()=>{"use strict";dw();MY();tF();m7a=QS(iu.BOOLEAN,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="boolean"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Gd(e,"boolean")}]})});var g7a,A7a=h(()=>{"use strict";dw();MY();g7a=QS(iu.NEVER,(e,{breadcrumbsPrefix:t=[]}={})=>({ok:!1,errors:[{path:t,message:"Expected never"}]}))});var y7a,b7a=h(()=>{"use strict";dw();MY();tF();y7a=QS(iu.NUMBER,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="number"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Gd(e,"number")}]})});var E7a,I7a=h(()=>{"use strict";dw();MY();tF();E7a=QS(iu.STRING,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="string"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Gd(e,"string")}]})});var v7a,x7a=h(()=>{"use strict";dw();MY();v7a=QS(iu.UNKNOWN,e=>({ok:!0,value:e}))});var C7a=h(()=>{"use strict";d7a();h7a();A7a();b7a();I7a();x7a()});function w7a(e,t){let r={parse:(n,i)=>D0r({value:n,isKeyNumeric:e.getType()===iu.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)=>D0r({value:n,isKeyNumeric:e.getType()===iu.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:()=>iu.RECORD};return{...mw(r),...Wd(r)}}function S7a(e,t){let r={parse:(n,i)=>D0r({value:n,isKeyNumeric:e.getType()===iu.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)=>D0r({value:n,isKeyNumeric:e.getType()===iu.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:()=>iu.RECORD};return{...mw(r),...Wd(r)}}function D0r({value:e,isKeyNumeric:t,transformKey:r,transformValue:n,breadcrumbsPrefix:i=[]}){if(!Eue(e))return{ok:!1,errors:[{path:i,message:Gd(e,"object")}]};let o={},s=[];for(let a in e){if(!bvf.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 bvf,T7a=h(()=>{"use strict";dw();tF();ukt();zY();Pj();bvf=Object.prototype.hasOwnProperty});var O7a=h(()=>{"use strict";T7a()});function B7a(e){let t=P0r(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:Gd(n,"Set")}]},getType:()=>iu.SET};return{...mw(r),...Wd(r)}}var P7a=h(()=>{"use strict";dw();tF();zY();hKi();Pj()});var D7a=h(()=>{"use strict";P7a()});function k7a(e){let t={parse:(r,n)=>R7a((i,o)=>i.parse(r,o),e,n),json:(r,n)=>R7a((i,o)=>i.json(r,o),e,n),getType:()=>iu.UNDISCRIMINATED_UNION};return{...mw(t),...Wd(t)}}function R7a(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 F7a=h(()=>{"use strict";dw();zY();Pj()});var N7a=h(()=>{"use strict";F7a()});function j7a(e,t){return{parsedDiscriminant:e,rawDiscriminant:t}}var Q7a=h(()=>{"use strict"});function M7a(e,t){let r=typeof e=="string"?e:e.rawDiscriminant,n=typeof e=="string"?e:e.parsedDiscriminant,i=O0r(lkt(t)),o={parse:(s,a)=>z7a({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)=>z7a({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:()=>iu.UNION};return{...mw(o),...Wd(o),...E7(o)}}function z7a({value:e,discriminant:t,transformedDiscriminant:r,transformDiscriminantValue:n,getAdditionalPropertiesSchema:i,allowUnrecognizedUnionMembers:o=!1,transformAdditionalProperties:s,breadcrumbsPrefix:a=[]}){if(!Eue(e))return{ok:!1,errors:[{path:a,message:Gd(e,"object")}]};let c=e[t],u={};for(let f in e)Evf.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 Evf,L7a=h(()=>{"use strict";dw();tF();ukt();lKi();zY();oKi();pkt();Pj();Evf=Object.prototype.hasOwnProperty});var U7a=h(()=>{"use strict";Q7a();L7a()});var V7a=h(()=>{"use strict";UGa();qGa();oKi();i7a();hKi();p7a();mKi();pkt();C7a();O7a();Pj();D7a();N7a();U7a()});var re={};X(re,{JsonError:()=>SKe,ParseError:()=>TKe,any:()=>f7a,bigint:()=>MGa,boolean:()=>m7a,booleanLiteral:()=>a7a,date:()=>VGa,discriminant:()=>j7a,enum_:()=>O0r,getObjectLikeUtils:()=>E7,getObjectUtils:()=>INe,getSchemaUtils:()=>Wd,isProperty:()=>Iue,lazy:()=>WGa,lazyObject:()=>r7a,list:()=>P0r,never:()=>g7a,number:()=>y7a,object:()=>B0r,objectWithoutOptionalProperties:()=>e7a,optional:()=>nKi,partialRecord:()=>S7a,property:()=>XGa,record:()=>w7a,set:()=>B7a,string:()=>E7a,stringLiteral:()=>u7a,transform:()=>iKi,undiscriminatedUnion:()=>k7a,union:()=>M7a,unknown:()=>v7a,withParsedProperties:()=>pKi});var _7a=h(()=>{"use strict";V7a()});var q7a=h(()=>{"use strict"});var kr=h(()=>{"use strict";FGa();NGa();jGa();_7a();q7a()});var R0r,gKi=h(()=>{"use strict";kr();R0r=re.object({href:re.string()})});var k0r,AKi=h(()=>{"use strict";kr();k0r=re.enum_(["description","subtitle"])});var F0r,yKi=h(()=>{"use strict";kr();AKi();F0r=re.object({pageDirective:re.property("page-directive",re.string().optional()),pageDescriptionSource:re.property("page-description-source",k0r.optional()),llmsTxt:re.property("llms-txt",re.string().optional()),llmsFullTxt:re.property("llms-full-txt",re.string().optional()),robotsTxt:re.property("robots-txt",re.string().optional())})});var N0r,bKi=h(()=>{"use strict";kr();N0r=re.object({url:re.string(),title:re.string().optional()})});var j0r,EKi=h(()=>{"use strict";kr();bKi();j0r=re.undiscriminatedUnion([N0r])});var Q0r,IKi=h(()=>{"use strict";kr();Q0r=re.enum_(["docs","slack","discord"])});var z0r,vKi=h(()=>{"use strict";kr();z0r=re.enum_(["claude-3.7","claude-4","command-a"])});var fkt,xKi=h(()=>{"use strict";kr();EKi();IKi();vKi();fkt=re.object({model:z0r.optional(),systemPrompt:re.property("system-prompt",re.string().optional()),location:re.list(Q0r).optional(),datasources:re.list(j0r).optional(),maskPii:re.property("mask-pii",re.boolean().optional())})});var M0r,CKi=h(()=>{"use strict";kr();M0r=re.object({enabled:re.boolean().optional(),style:re.string().optional()})});var L0r,wKi=h(()=>{"use strict";kr();L0r=re.object({orgId:re.property("org-id",re.string())})});var U0r,SKi=h(()=>{"use strict";kr();U0r=re.object({measurementId:re.property("measurement-id",re.string())})});var V0r,TKi=h(()=>{"use strict";kr();V0r=re.object({containerId:re.property("container-id",re.string())})});var _0r,OKi=h(()=>{"use strict";kr();_0r=re.object({appId:re.property("app-id",re.string()),apiBase:re.property("api-base",re.string().optional())})});var q0r,BKi=h(()=>{"use strict";kr();q0r=re.object({apiKey:re.property("api-key",re.string()),endpoint:re.string().optional()})});var G0r,PKi=h(()=>{"use strict";kr();G0r=re.object({writeKey:re.property("write-key",re.string())})});var W0r,DKi=h(()=>{"use strict";kr();wKi();SKi();TKi();OKi();BKi();PKi();W0r=re.object({segment:G0r.optional(),fullstory:L0r.optional(),intercom:_0r.optional(),posthog:q0r.optional(),gtm:V0r.optional(),ga4:U0r.optional()})});var Lye,dkt=h(()=>{"use strict";kr();Lye=re.object({message:re.string()})});var mkt,RKi=h(()=>{"use strict";kr();mkt=re.string()});var LY,BKe=h(()=>{"use strict";kr();RKi();LY=re.undiscriminatedUnion([mkt,re.list(mkt)])});var zS,UY=h(()=>{"use strict";kr();zS=re.enum_(["stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"])});var H0r,kKi=h(()=>{"use strict";kr();H0r=re.enum_(["open-by-default"])});var VY,PKe=h(()=>{"use strict";kr();kKi();VY=re.undiscriminatedUnion([re.boolean(),H0r])});var K0r,FKi=h(()=>{"use strict";kr();K0r=re.object({href:re.string().optional()})});var _Y,DKe=h(()=>{"use strict";kr();FKi();_Y=re.object({hidden:re.boolean().optional(),environments:re.list(re.string()).optional(),button:K0r.optional(),oauth:re.boolean().optional(),limitWebsocketMessagesPerConnection:re.property("limit-websocket-messages-per-connection",re.number().optional())})});var J0r,NKi=h(()=>{"use strict";kr();J0r=re.object({version:re.string(),package:re.string()})});var MU,jKi=h(()=>{"use strict";kr();NKi();MU=re.undiscriminatedUnion([re.string(),J0r])});var Y0r,QKi=h(()=>{"use strict";kr();jKi();Y0r=re.object({python:MU.optional(),typescript:MU.optional(),go:MU.optional(),java:MU.optional(),ruby:MU.optional(),csharp:MU.optional(),php:MU.optional(),swift:MU.optional(),rust:MU.optional()})});var hkt,zKi=h(()=>{"use strict";kr();hkt=re.object({flag:re.string(),fallbackValue:re.property("fallback-value",re.unknown().optional()),match:re.unknown().optional()})});var X0r,MKi=h(()=>{"use strict";kr();zKi();X0r=re.undiscriminatedUnion([re.string(),hkt,re.list(hkt)])});var km,NO=h(()=>{"use strict";kr();MKi();km=re.object({featureFlag:re.property("feature-flag",X0r.optional())})});var vNe,Z0r=h(()=>{"use strict";kr();vNe=re.string()});var RKe,$0r=h(()=>{"use strict";kr();Z0r();RKe=re.undiscriminatedUnion([vNe,re.list(vNe)])});var Fm,jO=h(()=>{"use strict";kr();$0r();Fm=re.object({viewers:RKe.optional(),orphaned:re.boolean().optional()})});var eEr,LKi=h(()=>{"use strict";kr();eL();BKe();UY();PKe();DKe();QKi();NO();jO();eEr=re.object({api:re.string(),apiName:re.property("api-name",re.string().optional()),openrpc:re.string().optional(),audiences:LY.optional(),displayErrors:re.property("display-errors",re.boolean().optional()),tagDescriptionPages:re.property("tag-description-pages",re.boolean().optional()),snippets:Y0r.optional(),postman:re.string().optional(),summary:re.string().optional(),layout:re.list(re.lazy(()=>qY)).optional(),collapsed:VY.optional(),icon:re.string().optional(),slug:re.string().optional(),hidden:re.boolean().optional(),availability:zS.optional(),skipSlug:re.property("skip-slug",re.boolean().optional()),alphabetized:re.boolean().optional(),flattened:re.boolean().optional(),paginated:re.boolean().optional(),playground:_Y.optional()}).extend(Fm).extend(km)});var tEr,UKi=h(()=>{"use strict";kr();UY();DKe();NO();jO();tEr=re.object({endpoint:re.string(),title:re.string().optional(),slug:re.string().optional(),icon:re.string().optional(),hidden:re.boolean().optional(),availability:zS.optional(),playground:_Y.optional()}).extend(Fm).extend(km)});var rEr,VKi=h(()=>{"use strict";kr();UY();NO();jO();rEr=re.object({operation:re.string(),title:re.string().optional(),slug:re.string().optional(),hidden:re.boolean().optional(),availability:zS.optional()}).extend(Fm).extend(km)});var LU,xNe=h(()=>{"use strict";kr();LU=re.enum_(["_blank","_self","_parent","_top"])});var kKe,nEr=h(()=>{"use strict";kr();xNe();kKe=re.object({link:re.string(),href:re.string(),icon:re.string().optional(),target:LU.optional()})});var UU,CNe=h(()=>{"use strict";kr();UY();NO();jO();UU=re.object({page:re.string(),path:re.string(),slug:re.string().optional(),icon:re.string().optional(),hidden:re.boolean().optional(),noindex:re.boolean().optional(),availability:zS.optional()}).extend(Fm).extend(km)});var qY,G7a=h(()=>{"use strict";kr();eL();UKi();VKi();nEr();CNe();qY=re.undiscriminatedUnion([re.string(),re.record(re.string(),re.lazy(()=>iEr)),re.lazyObject(()=>oEr),tEr,rEr,UU,kKe])});var iEr,W7a=h(()=>{"use strict";kr();eL();iEr=re.undiscriminatedUnion([re.list(re.lazy(()=>qY)),re.lazyObject(()=>sEr)])});var sEr,H7a=h(()=>{"use strict";kr();eL();UY();DKe();NO();jO();sEr=re.object({title:re.string().optional(),summary:re.string().optional(),contents:re.list(re.lazy(()=>qY)).optional(),availability:zS.optional(),slug:re.string().optional(),icon:re.string().optional(),hidden:re.boolean().optional(),skipSlug:re.property("skip-slug",re.boolean().optional()),playground:_Y.optional()}).extend(Fm).extend(km)});var oEr,K7a=h(()=>{"use strict";kr();eL();UY();PKe();DKe();NO();jO();oEr=re.object({section:re.string(),referencedPackages:re.property("referenced-packages",re.list(re.string()).optional()),summary:re.string().optional(),contents:re.list(re.lazy(()=>qY)).optional(),slug:re.string().optional(),icon:re.string().optional(),hidden:re.boolean().optional(),skipSlug:re.property("skip-slug",re.boolean().optional()),collapsed:VY.optional(),collapsible:re.boolean().optional(),collapsedByDefault:re.property("collapsed-by-default",re.boolean().optional()),availability:zS.optional(),playground:_Y.optional()}).extend(Fm).extend(km)});var aEr,_Ki=h(()=>{"use strict";kr();aEr=re.object({dark:re.string().optional(),light:re.string().optional()})});var cEr,qKi=h(()=>{"use strict";kr();_Ki();cEr=re.undiscriminatedUnion([re.string(),aEr])});var uEr,GKi=h(()=>{"use strict";kr();uEr=re.enum_(["default","canvas"])});var FKe,lEr=h(()=>{"use strict";kr();FKe=re.string()});var pEr,WKi=h(()=>{"use strict";kr();lEr();NO();jO();pEr=re.object({changelog:FKe,title:re.string().optional(),slug:re.string().optional(),icon:re.string().optional(),hidden:re.boolean().optional()}).extend(Fm).extend(km)});var fEr,HKi=h(()=>{"use strict";kr();fEr=re.enum_(["timeline","classic"])});var I7,KKi=h(()=>{"use strict";kr();I7=re.enum_(["warn","error"])});var dEr,JKi=h(()=>{"use strict";kr();KKi();dEr=re.object({exampleValidation:re.property("example-validation",I7.optional()),brokenLinks:re.property("broken-links",I7.optional()),noNonComponentRefs:re.property("no-non-component-refs",I7.optional()),validLocalReferences:re.property("valid-local-references",I7.optional()),noCircularRedirects:re.property("no-circular-redirects",I7.optional()),validDocsEndpoints:re.property("valid-docs-endpoints",I7.optional()),missingRedirects:re.property("missing-redirects",I7.optional()),validChangelogSlug:re.property("valid-changelog-slug",I7.optional())})});var mEr,YKi=h(()=>{"use strict";kr();JKi();mEr=re.object({rules:dEr.optional()})});var hEr,XKi=h(()=>{"use strict";kr();hEr=re.object({dark:re.string().optional(),light:re.string().optional()})});var bI,ZKi=h(()=>{"use strict";kr();XKi();bI=re.undiscriminatedUnion([re.string(),hEr])});var gEr,$Ki=h(()=>{"use strict";kr();ZKi();gEr=re.object({accentPrimary:re.property("accent-primary",bI.optional()),accentPrimaryDeprecated:re.property("accentPrimary",bI.optional()),background:bI.optional(),border:bI.optional(),sidebarBackground:re.property("sidebar-background",bI.optional()),headerBackground:re.property("header-background",bI.optional()),cardBackground:re.property("card-background",bI.optional()),accent1:re.property("accent-1",bI.optional()),accent2:re.property("accent-2",bI.optional()),accent3:re.property("accent-3",bI.optional()),accent4:re.property("accent-4",bI.optional()),accent5:re.property("accent-5",bI.optional()),accent6:re.property("accent-6",bI.optional()),accent7:re.property("accent-7",bI.optional()),accent8:re.property("accent-8",bI.optional()),accent9:re.property("accent-9",bI.optional()),accent10:re.property("accent-10",bI.optional()),accent11:re.property("accent-11",bI.optional()),accent12:re.property("accent-12",bI.optional())})});var AEr,eJi=h(()=>{"use strict";kr();AEr=re.enum_(["center","left"])});var yEr,tJi=h(()=>{"use strict";kr();yEr=re.undiscriminatedUnion([re.string(),re.list(re.string())])});var bEr,rJi=h(()=>{"use strict";kr();bEr=re.undiscriminatedUnion([re.string(),re.list(re.string())])});var EEr,nJi=h(()=>{"use strict";kr();EEr=re.object({title:re.string(),subtitle:re.string().optional(),url:re.string(),icon:re.string().optional(),default:re.boolean().optional()})});var IEr,iJi=h(()=>{"use strict";kr();IEr=re.enum_(["github","dashboard"])});var vEr,oJi=h(()=>{"use strict";kr();vEr=re.object({host:re.string().optional(),owner:re.string(),repo:re.string(),branch:re.string().optional()})});var xEr,sJi=h(()=>{"use strict";kr();iJi();oJi();xEr=re.object({github:vEr.optional(),launch:IEr.optional()})});var CEr,aJi=h(()=>{"use strict";kr();BKe();rJi();sJi();CEr=re.object({url:re.string(),customDomain:re.property("custom-domain",bEr.optional()),editThisPage:re.property("edit-this-page",xEr.optional()),audiences:LY.optional(),multiSource:re.property("multi-source",re.boolean().optional())})});var wEr,cJi=h(()=>{"use strict";kr();wEr=re.enum_(["curl","csharp","go","java","javascript","php","python","ruby","swift","typescript"])});var SEr,uJi=h(()=>{"use strict";kr();cJi();SEr=re.undiscriminatedUnion([re.boolean(),re.list(wEr)])});var Uye,gkt=h(()=>{"use strict";kr();Uye=re.string()});var TEr,lJi=h(()=>{"use strict";kr();TEr=re.object({prioritizeCurrentProduct:re.property("prioritize-current-product",re.boolean().optional()),defaultFilterByCurrentProduct:re.property("default-filter-by-current-product",re.boolean().optional())})});var NKe,OEr=h(()=>{"use strict";kr();NKe=re.enum_(["frontmatter","filename"])});var BEr,pJi=h(()=>{"use strict";kr();BEr=re.enum_(["flat","grouped"])});var PEr,fJi=h(()=>{"use strict";kr();uJi();gkt();lJi();OEr();pJi();PEr=re.object({searchText:re.property("search-text",re.string().optional()),disableSearch:re.property("disable-search",re.boolean().optional()),darkModeCode:re.property("dark-mode-code",re.boolean().optional()),defaultSearchFilters:re.property("default-search-filters",re.boolean().optional()),search:TEr.optional(),httpSnippets:re.property("http-snippets",SEr.optional()),hide404Page:re.property("hide-404-page",re.boolean().optional()),useJavascriptAsTypescript:re.property("use-javascript-as-typescript",re.boolean().optional()),disableExplorerProxy:re.property("disable-explorer-proxy",re.boolean().optional()),disableEnvironmentEditing:re.property("disable-environment-editing",re.boolean().optional()),disableAnalytics:re.property("disable-analytics",re.boolean().optional()),language:Uye.optional(),folderTitleSource:re.property("folder-title-source",NKe.optional()),substituteEnvVars:re.property("substitute-env-vars",re.boolean().optional()),websocketOneofDisplay:re.property("websocket-oneof-display",BEr.optional())})});var jKe,DEr=h(()=>{"use strict";kr();jKe=re.enum_(["normal","italic"])});var QKe,REr=h(()=>{"use strict";kr();QKe=re.undiscriminatedUnion([re.string(),re.number()])});var kEr,dJi=h(()=>{"use strict";kr();DEr();REr();kEr=re.object({path:re.string(),weight:QKe.optional(),style:jKe.optional()})});var FEr,mJi=h(()=>{"use strict";kr();dJi();FEr=re.undiscriminatedUnion([re.string(),kEr])});var NEr,hJi=h(()=>{"use strict";kr();NEr=re.enum_(["auto","block","swap","fallback","optional"])});var zKe,gJi=h(()=>{"use strict";kr();mJi();hJi();DEr();REr();zKe=re.object({name:re.string().optional(),path:re.string().optional(),weight:QKe.optional(),style:jKe.optional(),paths:re.list(FEr).optional(),display:NEr.optional(),fallback:re.list(re.string()).optional(),fontVariationSettings:re.property("font-variation-settings",re.string().optional())})});var jEr,AJi=h(()=>{"use strict";kr();gJi();jEr=re.object({headingsFont:zKe.optional(),bodyFont:zKe.optional(),codeFont:zKe.optional()})});var QEr,yJi=h(()=>{"use strict";kr();QEr=re.object({mdxComponents:re.property("mdx-components",re.list(re.string()).optional()),disableStreamToggle:re.property("disable-stream-toggle",re.boolean().optional()),openapiParserV2:re.property("openapi-parser-v2",re.boolean().optional()),openapiParserV3:re.property("openapi-parser-v3",re.boolean().optional()),dynamicSnippets:re.property("dynamic-snippets",re.boolean().optional()),aiExamples:re.property("ai-examples",re.boolean().optional()),aiExampleStyleInstructions:re.property("ai-example-style-instructions",re.string().optional()),excludeApis:re.property("exclude-apis",re.boolean().optional()),basepathAware:re.property("basepath-aware",re.boolean().optional()),externalSitemaps:re.property("external-sitemaps",re.list(re.string()).optional())})});var zEr,bJi=h(()=>{"use strict";kr();zEr=re.object({github:re.string().optional(),twitter:re.string().optional(),x:re.string().optional(),linkedin:re.string().optional(),youtube:re.string().optional(),instagram:re.string().optional(),facebook:re.string().optional(),discord:re.string().optional(),slack:re.string().optional(),hackernews:re.string().optional(),medium:re.string().optional(),website:re.string().optional()})});var MEr,EJi=h(()=>{"use strict";kr();MEr=re.object({intercom:re.string().optional(),context7:re.string().optional()})});var MKe,LEr=h(()=>{"use strict";kr();MKe=re.enum_(["beforeInteractive","afterInteractive","lazyOnload"])});var UEr,IJi=h(()=>{"use strict";kr();LEr();UEr=re.object({path:re.string(),strategy:MKe.optional()})});var VEr,vJi=h(()=>{"use strict";kr();IJi();VEr=re.undiscriminatedUnion([re.string(),UEr])});var _Er,xJi=h(()=>{"use strict";kr();LEr();_Er=re.object({url:re.string(),strategy:MKe.optional(),disableSri:re.property("disable-sri",re.boolean().optional())})});var Akt,CJi=h(()=>{"use strict";kr();vJi();xJi();Akt=re.undiscriminatedUnion([_Er,VEr])});var qEr,wJi=h(()=>{"use strict";kr();CJi();qEr=re.undiscriminatedUnion([Akt,re.list(Akt)])});var GEr,SJi=h(()=>{"use strict";kr();GEr=re.enum_(["fixed","static"])});var WEr,TJi=h(()=>{"use strict";kr();WEr=re.enum_(["header","header-tabs","sidebar"])});var HEr,OJi=h(()=>{"use strict";kr();HEr=re.enum_(["header","sidebar"])});var LKe,KEr=h(()=>{"use strict";kr();LKe=re.enum_(["header","sidebar"])});var JEr,BJi=h(()=>{"use strict";kr();HKi();eJi();SJi();TJi();OJi();KEr();JEr=re.object({pageWidth:re.property("page-width",re.string().optional()),contentWidth:re.property("content-width",re.string().optional()),sidebarWidth:re.property("sidebar-width",re.string().optional()),headerHeight:re.property("header-height",re.string().optional()),searchbarPlacement:re.property("searchbar-placement",WEr.optional()),tabsPlacement:re.property("tabs-placement",LKe.optional()),switcherPlacement:re.property("switcher-placement",HEr.optional()),contentAlignment:re.property("content-alignment",AEr.optional()),headerPosition:re.property("header-position",GEr.optional()),disableHeader:re.property("disable-header",re.boolean().optional()),hideNavLinks:re.property("hide-nav-links",re.boolean().optional()),hideFeedback:re.property("hide-feedback",re.boolean().optional()),mobileToc:re.property("mobile-toc",re.boolean().optional()),changelogLayout:re.property("changelog-layout",fEr.optional()),showNavAvailabilityBadges:re.property("show-nav-availability-badges",re.boolean().optional())})});var YEr,PJi=h(()=>{"use strict";kr();YEr=re.object({doxyfile:re.string().optional()})});var XEr,DJi=h(()=>{"use strict";kr();XEr=re.object({git:re.string(),subpath:re.string().optional()})});var ZEr,RJi=h(()=>{"use strict";kr();ZEr=re.object({path:re.string()})});var $Er,kJi=h(()=>{"use strict";kr();DJi();RJi();$Er=re.undiscriminatedUnion([XEr,ZEr])});var eIr,FJi=h(()=>{"use strict";kr();eIr=re.enum_(["python","cpp"])});var tIr,NJi=h(()=>{"use strict";kr();tIr=re.object({path:re.string()})});var rIr,jJi=h(()=>{"use strict";kr();PJi();kJi();FJi();NJi();rIr=re.object({input:$Er,output:tIr,lang:eIr,config:YEr.optional()})});var UKe,nIr=h(()=>{"use strict";kr();UKe=re.string()});var iIr,QJi=h(()=>{"use strict";kr();iIr=re.object({dark:re.string().optional(),light:re.string().optional(),height:re.number().optional(),href:re.string().optional(),rightText:re.property("right-text",re.string().optional())})});var oIr,zJi=h(()=>{"use strict";kr();oIr=re.enum_(["dark","light"])});var sIr,MJi=h(()=>{"use strict";kr();sIr=re.enum_(["summary","summary_large_image","app","player"])});var aIr,LJi=h(()=>{"use strict";kr();zJi();MJi();aIr=re.object({ogSiteName:re.property("og:site_name",re.string().optional()),ogTitle:re.property("og:title",re.string().optional()),ogDescription:re.property("og:description",re.string().optional()),ogUrl:re.property("og:url",re.string().optional()),ogImage:re.property("og:image",re.string().optional()),ogImageWidth:re.property("og:image:width",re.number().optional()),ogImageHeight:re.property("og:image:height",re.number().optional()),ogLocale:re.property("og:locale",re.string().optional()),ogLogo:re.property("og:logo",re.string().optional()),twitterTitle:re.property("twitter:title",re.string().optional()),twitterDescription:re.property("twitter:description",re.string().optional()),twitterHandle:re.property("twitter:handle",re.string().optional()),twitterImage:re.property("twitter:image",re.string().optional()),twitterSite:re.property("twitter:site",re.string().optional()),twitterUrl:re.property("twitter:url",re.string().optional()),twitterCard:re.property("twitter:card",sIr.optional()),ogDynamic:re.property("og:dynamic",re.boolean().optional()),ogDynamicBackgroundImage:re.property("og:dynamic:background-image",re.string().optional()),ogDynamicTextColor:re.property("og:dynamic:text-color",re.string().optional()),ogDynamicBackgroundColor:re.property("og:dynamic:background-color",re.string().optional()),ogDynamicLogoColor:re.property("og:dynamic:logo-color",oIr.optional()),ogDynamicShowLogo:re.property("og:dynamic:show-logo",re.boolean().optional()),ogDynamicShowSection:re.property("og:dynamic:show-section",re.boolean().optional()),ogDynamicShowDescription:re.property("og:dynamic:show-description",re.boolean().optional()),ogDynamicShowUrl:re.property("og:dynamic:show-url",re.boolean().optional()),ogDynamicShowGradient:re.property("og:dynamic:show-gradient",re.boolean().optional()),canonicalHost:re.property("canonical-host",re.string().optional())})});var Vye,ykt=h(()=>{"use strict";kr();$0r();Vye=re.object({viewers:RKe.optional()})});var GY,cIr=h(()=>{"use strict";kr();xNe();ykt();GY=re.object({href:re.string().optional(),target:LU.optional(),url:re.string().optional(),text:re.string().optional(),icon:re.string().optional(),rightIcon:re.string().optional(),rounded:re.boolean().optional()}).extend(Vye)});var uIr,UJi=h(()=>{"use strict";kr();cIr();ykt();uIr=re.object({links:re.list(GY),text:re.string().optional(),icon:re.string().optional(),rightIcon:re.string().optional(),rounded:re.boolean().optional()}).extend(Vye)});var lIr,VJi=h(()=>{"use strict";kr();xNe();ykt();lIr=re.object({url:re.string(),target:LU.optional()}).extend(Vye)});var pIr,_Ji=h(()=>{"use strict";kr();VJi();pIr=re.undiscriminatedUnion([re.string(),lIr])});var fIr,qJi=h(()=>{"use strict";kr();UJi();_Ji();cIr();fIr=re.union("type",{filled:GY,outlined:GY,minimal:GY,github:re.object({value:pIr}),dropdown:uIr,primary:GY,secondary:GY}).transform({transform:e=>e,untransform:e=>e})});var VU,wNe=h(()=>{"use strict";kr();VU=re.string()});var dIr,GJi=h(()=>{"use strict";kr();eL();wNe();dIr=re.object({tab:VU,layout:re.list(re.lazy(()=>WY)).optional()})});var mIr,WJi=h(()=>{"use strict";kr();eL();NO();jO();mIr=re.object({title:re.string(),subtitle:re.string().optional(),icon:re.string().optional(),layout:re.list(re.lazy(()=>WY)),slug:re.string().optional(),skipSlug:re.property("skip-slug",re.boolean().optional()),hidden:re.boolean().optional(),default:re.boolean().optional()}).extend(Fm).extend(km)});var hIr,HJi=h(()=>{"use strict";kr();wNe();WJi();hIr=re.object({tab:VU,variants:re.list(mIr)})});var gIr,KJi=h(()=>{"use strict";kr();GJi();HJi();gIr=re.undiscriminatedUnion([dIr,hIr])});var AIr,JJi=h(()=>{"use strict";kr();KJi();AIr=re.list(gIr)});var yIr,YJi=h(()=>{"use strict";kr();eL();yIr=re.list(re.lazy(()=>WY))});var _ye,bkt=h(()=>{"use strict";kr();JJi();YJi();_ye=re.undiscriminatedUnion([yIr,AIr])});var bIr,XJi=h(()=>{"use strict";kr();bIr=re.enum_(["copy-page","view-as-markdown","ask-ai","chatgpt","claude","cursor","claude-code","vscode"])});var EIr,ZJi=h(()=>{"use strict";kr();EIr=re.object({name:re.string(),description:re.string().optional(),url:re.string().optional()})});var IIr,$Ji=h(()=>{"use strict";kr();IIr=re.undiscriminatedUnion([re.string(),re.list(re.string())])});var vIr,eYi=h(()=>{"use strict";kr();ZJi();$Ji();vIr=re.object({title:re.string().optional(),description:re.string().optional(),learnMoreUrl:re.property("learn-more-url",re.string().optional()),repository:re.string().optional(),installCommand:re.property("install-command",IIr.optional()),skills:re.list(EIr).optional()})});var xIr,tYi=h(()=>{"use strict";kr();nJi();eYi();xIr=re.object({copyPage:re.property("copy-page",re.boolean().optional()),viewAsMarkdown:re.property("view-as-markdown",re.boolean().optional()),askAi:re.property("ask-ai",re.boolean().optional()),chatgpt:re.boolean().optional(),claude:re.boolean().optional(),claudeCode:re.property("claude-code",re.boolean().optional()),cursor:re.boolean().optional(),mcp:re.boolean().optional(),vscode:re.boolean().optional(),custom:re.list(EEr).optional(),skills:vIr.optional()})});var CIr,rYi=h(()=>{"use strict";kr();XJi();tYi();CIr=re.object({default:bIr.optional(),options:xIr.optional()})});var wIr,nYi=h(()=>{"use strict";kr();wIr=re.enum_(["deprecated","legacy","ga","stable","beta","alpha","preview"])});var VKe,SIr=h(()=>{"use strict";kr();dkt();BKe();nYi();NO();jO();VKe=re.object({displayName:re.property("display-name",re.string()),path:re.string(),slug:re.string().optional(),availability:wIr.optional(),audiences:LY.optional(),hidden:re.boolean().optional(),announcement:Lye.optional()}).extend(Fm).extend(km)});var _Ke,TIr=h(()=>{"use strict";kr();BKe();SIr();NO();jO();_Ke=re.object({displayName:re.property("display-name",re.string()),subtitle:re.string().optional(),icon:re.string().optional(),image:re.string().optional(),versions:re.list(VKe).optional(),audiences:LY.optional()}).extend(Fm).extend(km)});var OIr,iYi=h(()=>{"use strict";kr();TIr();xNe();OIr=re.object({href:re.string(),target:LU.optional()}).extend(_Ke)});var BIr,oYi=h(()=>{"use strict";kr();dkt();TIr();BIr=re.object({path:re.string(),slug:re.string().optional(),announcement:Lye.optional()}).extend(_Ke)});var PIr,sYi=h(()=>{"use strict";kr();iYi();oYi();PIr=re.undiscriminatedUnion([BIr,OIr])});var DIr,aYi=h(()=>{"use strict";kr();DIr=re.enum_(["typescript","javascript","python","java","go","ruby","csharp","php","swift","rust","nodets","nodejs","dotnet","curl","jvm","ts","js"])});var RIr,cYi=h(()=>{"use strict";kr();RIr=re.object({source:re.string(),destination:re.string(),permanent:re.boolean().optional()})});var qye,Ekt=h(()=>{"use strict";kr();lEr();xNe();NO();jO();qye=re.object({displayName:re.property("display-name",re.string()),icon:re.string().optional(),slug:re.string().optional(),skipSlug:re.property("skip-slug",re.boolean().optional()),hidden:re.boolean().optional(),href:re.string().optional(),target:LU.optional(),changelog:FKe.optional()}).extend(Fm).extend(km)});var kIr,uYi=h(()=>{"use strict";kr();kIr=re.enum_(["default","minimal"])});var FIr,lYi=h(()=>{"use strict";kr();FIr=re.enum_(["default","minimal"])});var NIr,pYi=h(()=>{"use strict";kr();NIr=re.enum_(["default","toolbar"])});var jIr,fYi=h(()=>{"use strict";kr();jIr=re.enum_(["default","toggle","tabs"])});var QIr,dYi=h(()=>{"use strict";kr();QIr=re.enum_(["default","minimal"])});var zIr,mYi=h(()=>{"use strict";kr();zIr=re.enum_(["left","center"])});var qKe,MIr=h(()=>{"use strict";kr();qKe=re.enum_(["default","bubble"])});var LIr,hYi=h(()=>{"use strict";kr();mYi();KEr();MIr();LIr=re.object({style:qKe.optional(),alignment:zIr.optional(),placement:LKe.optional()})});var UIr,gYi=h(()=>{"use strict";kr();hYi();MIr();UIr=re.undiscriminatedUnion([qKe,LIr])});var VIr,AYi=h(()=>{"use strict";kr();GKi();uYi();lYi();pYi();fYi();dYi();gYi();VIr=re.object({sidebar:QIr.optional(),body:uEr.optional(),tabs:UIr.optional(),pageActions:re.property("page-actions",NIr.optional()),footerNav:re.property("footer-nav",kIr.optional()),languageSwitcher:re.property("language-switcher",FIr.optional()),productSwitcher:re.property("product-switcher",jIr.optional())})});var _Ir,yYi=h(()=>{"use strict";kr();gkt();_Ir=re.object({lang:Uye,default:re.boolean().optional()})});var qIr,bYi=h(()=>{"use strict";kr();gkt();yYi();qIr=re.undiscriminatedUnion([Uye,_Ir])});var J7a,Y7a=h(()=>{"use strict";kr();yKi();xKi();CKi();DKi();dkt();qKi();YKi();$Ki();tJi();aJi();fJi();AJi();yJi();bJi();EJi();wJi();BJi();jJi();nIr();QJi();LJi();qJi();bkt();rYi();CNe();sYi();aYi();cYi();Z0r();Ekt();wNe();AYi();bYi();SIr();J7a=re.object({instances:re.list(CEr),title:re.string().optional(),libraries:re.record(UKe,rIr).optional(),analytics:W0r.optional(),announcement:Lye.optional(),roles:re.list(vNe).optional(),tabs:re.record(VU,qye).optional(),versions:re.list(VKe).optional(),products:re.list(PIr).optional(),landingPage:re.property("landing-page",UU.optional()),navigation:_ye.optional(),navbarLinks:re.property("navbar-links",re.list(fIr).optional()),footerLinks:re.property("footer-links",zEr.optional()),pageActions:re.property("page-actions",CIr.optional()),globalTheme:re.property("global-theme",re.string().optional()),experimental:QEr.optional(),defaultLanguage:re.property("default-language",DIr.optional()),languages:re.list(re.string()).optional(),translations:re.list(qIr).optional(),aiChat:re.property("ai-chat",fkt.optional()),aiSearch:re.property("ai-search",fkt.optional()),aiExamples:re.property("ai-examples",M0r.optional()),agents:F0r.optional(),metadata:aIr.optional(),redirects:re.list(RIr).optional(),check:mEr.optional(),logo:iIr.optional(),favicon:re.string().optional(),backgroundImage:re.property("background-image",cEr.optional()),colors:gEr.optional(),typography:jEr.optional(),layout:JEr.optional(),settings:PEr.optional(),theme:VIr.optional(),integrations:MEr.optional(),css:yEr.optional(),js:qEr.optional(),header:re.string().optional(),footer:re.string().optional()})});var GIr,EYi=h(()=>{"use strict";kr();UY();PKe();OEr();NO();jO();GIr=re.object({folder:re.string(),title:re.string().optional(),titleSource:re.property("title-source",NKe.optional()),slug:re.string().optional(),icon:re.string().optional(),hidden:re.boolean().optional(),skipSlug:re.property("skip-slug",re.boolean().optional()),collapsed:VY.optional(),collapsible:re.boolean().optional(),collapsedByDefault:re.property("collapsed-by-default",re.boolean().optional()),availability:zS.optional()}).extend(Fm).extend(km)});var WIr,IYi=h(()=>{"use strict";kr();nIr();NO();jO();WIr=re.object({library:UKe,title:re.string().optional(),slug:re.string().optional()}).extend(Fm).extend(km)});var WY,X7a=h(()=>{"use strict";kr();eL();LKi();WKi();EYi();IYi();nEr();CNe();WY=re.undiscriminatedUnion([UU,re.lazyObject(()=>HIr),eEr,WIr,kKe,pEr,GIr])});var Z7a,$7a=h(()=>{"use strict";kr();bkt();CNe();Ekt();wNe();Z7a=re.object({tabs:re.record(VU,qye).optional(),landingPage:re.property("landing-page",UU.optional()),navigation:_ye})});var KIr,vYi=h(()=>{"use strict";kr();NO();jO();KIr=re.object({displayName:re.property("display-name",re.string()),path:re.string(),slug:re.string().optional()}).extend(Fm).extend(km)});var eWa,tWa=h(()=>{"use strict";kr();gKi();vYi();eWa=re.undiscriminatedUnion([KIr,R0r])});var HIr,rWa=h(()=>{"use strict";kr();eL();UY();PKe();NO();jO();HIr=re.object({section:re.string(),path:re.string().optional(),contents:re.list(re.lazy(()=>WY)),collapsed:VY.optional(),collapsible:re.boolean().optional(),collapsedByDefault:re.property("collapsed-by-default",re.boolean().optional()),slug:re.string().optional(),icon:re.string().optional(),hidden:re.boolean().optional(),skipSlug:re.property("skip-slug",re.boolean().optional()),availability:zS.optional()}).extend(Fm).extend(km)});var nWa,iWa=h(()=>{"use strict";kr();bkt();CNe();Ekt();wNe();nWa=re.object({tabs:re.record(VU,qye).optional(),landingPage:re.property("landing-page",UU.optional()),navigation:_ye})});var xYi=h(()=>{"use strict";gKi();yKi();xKi();EKi();IKi();vKi();bKi();CKi();DKi();dkt();LKi();UKi();G7a();VKi();W7a();H7a();K7a();BKe();RKi();UY();qKi();_Ki();GKi();WKi();lEr();HKi();YKi();KKi();JKi();kKi();PKe();ZKi();$Ki();XKi();eJi();tJi();rJi();nJi();Y7a();aJi();fJi();AJi();sJi();iJi();yJi();iYi();zKi();MKi();EYi();gJi();mJi();dJi();hJi();DEr();REr();bJi();uYi();wKi();oJi();DJi();SKi();TKi();SJi();cJi();uJi();EJi();OKi();oYi();wJi();CJi();vJi();IJi();xJi();LEr();gkt();lYi();BJi();PJi();jJi();kJi();FJi();nIr();NJi();IYi();nEr();QJi();LJi();UJi();_Ji();VJi();qJi();cIr();bkt();X7a();zJi();XJi();tYi();rYi();pYi();CNe();AKi();RJi();FKi();DKe();BKi();sYi();TIr();$7a();tWa();fYi();aYi();cYi();vYi();$0r();Z0r();TJi();lJi();rWa();PKi();dYi();ZJi();$Ji();eYi();jKi();QKi();OJi();JJi();KJi();GJi();HJi();Ekt();wNe();mYi();KEr();gYi();hYi();MIr();WJi();xNe();AYi();OEr();bYi();yYi();MJi();YJi();nYi();SIr();NKi();iWa();pJi();NO();jO();ykt()});var CYi={};X(CYi,{AbsoluteProductPath:()=>R0r,AgentsConfig:()=>F0r,AiChatConfig:()=>fkt,AiChatDatasource:()=>j0r,AiChatLocation:()=>Q0r,AiChatModel:()=>z0r,AiChatWebsiteDatasource:()=>N0r,AiExamplesConfig:()=>M0r,AnalyticsConfig:()=>W0r,AnnouncementConfig:()=>Lye,ApiReferenceConfiguration:()=>eEr,ApiReferenceEndpointConfiguration:()=>tEr,ApiReferenceLayoutItem:()=>qY,ApiReferenceOperationConfiguration:()=>rEr,ApiReferencePackageConfiguration:()=>iEr,ApiReferencePackageConfigurationWithOptions:()=>sEr,ApiReferenceSectionConfiguration:()=>oEr,Audience:()=>LY,AudienceId:()=>mkt,Availability:()=>zS,BackgroundImageConfiguration:()=>cEr,BackgroundImageThemedConfig:()=>aEr,BodyThemeConfig:()=>uEr,ChangelogConfiguration:()=>pEr,ChangelogFolderRelativePath:()=>FKe,ChangelogLayout:()=>fEr,CheckConfig:()=>mEr,CheckRuleSeverity:()=>I7,CheckRulesConfig:()=>dEr,CollapsedStringValue:()=>H0r,CollapsedValue:()=>VY,ColorConfig:()=>bI,ColorThemedConfig:()=>hEr,ColorsConfiguration:()=>gEr,ContentAlignment:()=>AEr,CssConfig:()=>yEr,CustomDomain:()=>bEr,CustomPageAction:()=>EEr,DocsConfiguration:()=>J7a,DocsInstance:()=>CEr,DocsSettingsConfig:()=>PEr,DocsTypographyConfig:()=>jEr,EditThisPageConfig:()=>xEr,EditThisPageLaunch:()=>IEr,ExperimentalConfig:()=>QEr,ExternalProduct:()=>OIr,FeatureFlag:()=>hkt,FeatureFlagConfiguration:()=>X0r,FolderConfiguration:()=>GIr,FontConfig:()=>zKe,FontConfigPath:()=>FEr,FontConfigVariant:()=>kEr,FontDisplay:()=>NEr,FontStyle:()=>jKe,FontWeight:()=>QKe,FooterLinksConfig:()=>zEr,FooterNavThemeConfig:()=>kIr,FullStoryAnalyticsConfig:()=>L0r,GitLibraryInputSchema:()=>XEr,GithubEditThisPageConfig:()=>vEr,GoogleAnalytics4Config:()=>U0r,GtmConfig:()=>V0r,HeaderPosition:()=>GEr,HttpSnippetLanguage:()=>wEr,HttpSnippetsConfig:()=>SEr,IntegrationsConfig:()=>MEr,IntercomConfig:()=>_0r,InternalProduct:()=>BIr,JsConfig:()=>qEr,JsConfigOptions:()=>Akt,JsFileConfig:()=>VEr,JsFileConfigSettings:()=>UEr,JsRemoteConfig:()=>_Er,JsScriptStrategy:()=>MKe,Language:()=>Uye,LanguageSwitcherThemeConfig:()=>FIr,LayoutConfig:()=>JEr,LibraryConfig:()=>YEr,LibraryConfiguration:()=>rIr,LibraryInputConfiguration:()=>$Er,LibraryLanguage:()=>eIr,LibraryName:()=>UKe,LibraryOutputConfiguration:()=>tIr,LibraryReferenceConfiguration:()=>WIr,LinkConfiguration:()=>kKe,LogoConfiguration:()=>iIr,MetadataConfig:()=>aIr,NavbarDropdownConfig:()=>uIr,NavbarGithubConfig:()=>pIr,NavbarGithubConfigWithOptions:()=>lIr,NavbarLink:()=>fIr,NavbarLinkConfig:()=>GY,NavigationConfig:()=>_ye,NavigationItem:()=>WY,OgDynamicLogoColor:()=>oIr,PageActionOption:()=>bIr,PageActionOptions:()=>xIr,PageActionsConfig:()=>CIr,PageActionsThemeConfig:()=>NIr,PageConfiguration:()=>UU,PageDescriptionSource:()=>k0r,PathLibraryInputSchema:()=>ZEr,PlaygroundButtonSettings:()=>K0r,PlaygroundSettings:()=>_Y,PostHogConfig:()=>q0r,ProductConfig:()=>PIr,ProductConfigBase:()=>_Ke,ProductFileConfig:()=>Z7a,ProductPath:()=>eWa,ProductSwitcherThemeConfig:()=>jIr,ProgrammingLanguage:()=>DIr,RedirectConfig:()=>RIr,RelativeProductPath:()=>KIr,Role:()=>RKe,RoleId:()=>vNe,SearchSettingsConfig:()=>TEr,SearchbarPlacement:()=>WEr,SectionConfiguration:()=>HIr,SegmentConfig:()=>G0r,SidebarThemeConfig:()=>QIr,SkillEntry:()=>EIr,SkillsInstallCommand:()=>IIr,SkillsPageActionConfig:()=>vIr,SnippetLanguageConfiguration:()=>MU,SnippetsConfiguration:()=>Y0r,SwitcherPlacement:()=>HEr,TabConfig:()=>qye,TabId:()=>VU,TabVariant:()=>mIr,TabbedNavigationConfig:()=>AIr,TabbedNavigationItem:()=>gIr,TabbedNavigationItemWithLayout:()=>dIr,TabbedNavigationItemWithVariants:()=>hIr,TabsAlignment:()=>zIr,TabsPlacement:()=>LKe,TabsThemeConfig:()=>UIr,TabsThemeObjectConfig:()=>LIr,TabsThemeStyle:()=>qKe,Target:()=>LU,ThemeConfig:()=>VIr,TitleSource:()=>NKe,TranslationConfig:()=>qIr,TranslationConfigObject:()=>_Ir,TwitterCardSetting:()=>sIr,UntabbedNavigationConfig:()=>yIr,VersionAvailability:()=>wIr,VersionConfig:()=>VKe,VersionFileConfig:()=>nWa,VersionedSnippetLanguageConfiguration:()=>J0r,WebSocketOneofDisplay:()=>BEr,WithFeatureFlags:()=>km,WithPermissions:()=>Fm,WithViewers:()=>Vye});var oWa=h(()=>{"use strict";xYi()});var sWa=h(()=>{"use strict";oWa();xYi()});var Dj={};X(Dj,{AbsoluteProductPath:()=>R0r,AgentsConfig:()=>F0r,AiChatConfig:()=>fkt,AiChatDatasource:()=>j0r,AiChatLocation:()=>Q0r,AiChatModel:()=>z0r,AiChatWebsiteDatasource:()=>N0r,AiExamplesConfig:()=>M0r,AnalyticsConfig:()=>W0r,AnnouncementConfig:()=>Lye,ApiReferenceConfiguration:()=>eEr,ApiReferenceEndpointConfiguration:()=>tEr,ApiReferenceLayoutItem:()=>qY,ApiReferenceOperationConfiguration:()=>rEr,ApiReferencePackageConfiguration:()=>iEr,ApiReferencePackageConfigurationWithOptions:()=>sEr,ApiReferenceSectionConfiguration:()=>oEr,Audience:()=>LY,AudienceId:()=>mkt,Availability:()=>zS,BackgroundImageConfiguration:()=>cEr,BackgroundImageThemedConfig:()=>aEr,BodyThemeConfig:()=>uEr,ChangelogConfiguration:()=>pEr,ChangelogFolderRelativePath:()=>FKe,ChangelogLayout:()=>fEr,CheckConfig:()=>mEr,CheckRuleSeverity:()=>I7,CheckRulesConfig:()=>dEr,CollapsedStringValue:()=>H0r,CollapsedValue:()=>VY,ColorConfig:()=>bI,ColorThemedConfig:()=>hEr,ColorsConfiguration:()=>gEr,ContentAlignment:()=>AEr,CssConfig:()=>yEr,CustomDomain:()=>bEr,CustomPageAction:()=>EEr,DocsConfiguration:()=>J7a,DocsInstance:()=>CEr,DocsSettingsConfig:()=>PEr,DocsTypographyConfig:()=>jEr,EditThisPageConfig:()=>xEr,EditThisPageLaunch:()=>IEr,ExperimentalConfig:()=>QEr,ExternalProduct:()=>OIr,FeatureFlag:()=>hkt,FeatureFlagConfiguration:()=>X0r,FolderConfiguration:()=>GIr,FontConfig:()=>zKe,FontConfigPath:()=>FEr,FontConfigVariant:()=>kEr,FontDisplay:()=>NEr,FontStyle:()=>jKe,FontWeight:()=>QKe,FooterLinksConfig:()=>zEr,FooterNavThemeConfig:()=>kIr,FullStoryAnalyticsConfig:()=>L0r,GitLibraryInputSchema:()=>XEr,GithubEditThisPageConfig:()=>vEr,GoogleAnalytics4Config:()=>U0r,GtmConfig:()=>V0r,HeaderPosition:()=>GEr,HttpSnippetLanguage:()=>wEr,HttpSnippetsConfig:()=>SEr,IntegrationsConfig:()=>MEr,IntercomConfig:()=>_0r,InternalProduct:()=>BIr,JsConfig:()=>qEr,JsConfigOptions:()=>Akt,JsFileConfig:()=>VEr,JsFileConfigSettings:()=>UEr,JsRemoteConfig:()=>_Er,JsScriptStrategy:()=>MKe,Language:()=>Uye,LanguageSwitcherThemeConfig:()=>FIr,LayoutConfig:()=>JEr,LibraryConfig:()=>YEr,LibraryConfiguration:()=>rIr,LibraryInputConfiguration:()=>$Er,LibraryLanguage:()=>eIr,LibraryName:()=>UKe,LibraryOutputConfiguration:()=>tIr,LibraryReferenceConfiguration:()=>WIr,LinkConfiguration:()=>kKe,LogoConfiguration:()=>iIr,MetadataConfig:()=>aIr,NavbarDropdownConfig:()=>uIr,NavbarGithubConfig:()=>pIr,NavbarGithubConfigWithOptions:()=>lIr,NavbarLink:()=>fIr,NavbarLinkConfig:()=>GY,NavigationConfig:()=>_ye,NavigationItem:()=>WY,OgDynamicLogoColor:()=>oIr,PageActionOption:()=>bIr,PageActionOptions:()=>xIr,PageActionsConfig:()=>CIr,PageActionsThemeConfig:()=>NIr,PageConfiguration:()=>UU,PageDescriptionSource:()=>k0r,PathLibraryInputSchema:()=>ZEr,PlaygroundButtonSettings:()=>K0r,PlaygroundSettings:()=>_Y,PostHogConfig:()=>q0r,ProductConfig:()=>PIr,ProductConfigBase:()=>_Ke,ProductFileConfig:()=>Z7a,ProductPath:()=>eWa,ProductSwitcherThemeConfig:()=>jIr,ProgrammingLanguage:()=>DIr,RedirectConfig:()=>RIr,RelativeProductPath:()=>KIr,Role:()=>RKe,RoleId:()=>vNe,SearchSettingsConfig:()=>TEr,SearchbarPlacement:()=>WEr,SectionConfiguration:()=>HIr,SegmentConfig:()=>G0r,SidebarThemeConfig:()=>QIr,SkillEntry:()=>EIr,SkillsInstallCommand:()=>IIr,SkillsPageActionConfig:()=>vIr,SnippetLanguageConfiguration:()=>MU,SnippetsConfiguration:()=>Y0r,SwitcherPlacement:()=>HEr,TabConfig:()=>qye,TabId:()=>VU,TabVariant:()=>mIr,TabbedNavigationConfig:()=>AIr,TabbedNavigationItem:()=>gIr,TabbedNavigationItemWithLayout:()=>dIr,TabbedNavigationItemWithVariants:()=>hIr,TabsAlignment:()=>zIr,TabsPlacement:()=>LKe,TabsThemeConfig:()=>UIr,TabsThemeObjectConfig:()=>LIr,TabsThemeStyle:()=>qKe,Target:()=>LU,ThemeConfig:()=>VIr,TitleSource:()=>NKe,TranslationConfig:()=>qIr,TranslationConfigObject:()=>_Ir,TwitterCardSetting:()=>sIr,UntabbedNavigationConfig:()=>yIr,VersionAvailability:()=>wIr,VersionConfig:()=>VKe,VersionFileConfig:()=>nWa,VersionedSnippetLanguageConfiguration:()=>J0r,WebSocketOneofDisplay:()=>BEr,WithFeatureFlags:()=>km,WithPermissions:()=>Fm,WithViewers:()=>Vye,docs:()=>CYi});var eL=h(()=>{"use strict";sWa()});var aWa=h(()=>{"use strict";YHi();BGa();kGa();eL()});var wYi={};X(wYi,{AiChatLocation:()=>mHi,AiChatModel:()=>hHi,Availability:()=>gHi,BodyThemeConfig:()=>AHi,ChangelogLayout:()=>yHi,CheckRuleSeverity:()=>bHi,CollapsedStringValue:()=>EHi,ContentAlignment:()=>IHi,EditThisPageLaunch:()=>vHi,FernDocsConfig:()=>JHi,FernDocsConfigError:()=>okt,FernDocsConfigTimeoutError:()=>skt,FontDisplay:()=>xHi,FontStyle:()=>CHi,FooterNavThemeConfig:()=>wHi,HeaderPosition:()=>SHi,HttpSnippetLanguage:()=>THi,JsScriptStrategy:()=>OHi,LanguageSwitcherThemeConfig:()=>BHi,LibraryLanguage:()=>PHi,OgDynamicLogoColor:()=>DHi,PageActionOption:()=>RHi,PageActionsThemeConfig:()=>kHi,PageDescriptionSource:()=>FHi,ProductSwitcherThemeConfig:()=>NHi,ProgrammingLanguage:()=>jHi,SearchbarPlacement:()=>QHi,Serializer:()=>Dj,SidebarThemeConfig:()=>zHi,SwitcherPlacement:()=>MHi,TabsAlignment:()=>LHi,TabsPlacement:()=>UHi,TabsThemeStyle:()=>VHi,Target:()=>_Hi,TitleSource:()=>qHi,TwitterCardSetting:()=>GHi,VersionAvailability:()=>WHi,WebSocketOneofDisplay:()=>HHi,docs:()=>S0r,logging:()=>$Hi,serialization:()=>Dj});var cWa=h(()=>{"use strict";aWa();YHi();eL()});function vvf(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}var uWa,lWa,xvf,pWa=h(()=>{"use strict";uWa={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"},lWa=Object.keys(uWa);xvf=new Set(lWa.map(vvf))});var Eh={};X(Eh,{DocsYmlSchemas:()=>dHi,RawSchemas:()=>wYi,THEME_ELIGIBLE_FIELDS:()=>lWa,THEME_ELIGIBLE_YAML_KEYS:()=>xvf,THEME_FIELD_POLICIES:()=>uWa});var fWa=h(()=>{"use strict";P8a();D8a();cWa();pWa()});var dWa=h(()=>{"use strict"});async function Gye({absolutePathToFernignore:e}){let t=(await(0,mWa.readFile)(e)).toString();return hWa(t)}function hWa(e){return[VP,...e.trim().split(wvf).map(t=>{let r=t.indexOf("#");return r!==-1?t.slice(0,r).trim():t.trim()}).filter(t=>t.length>0)]}var mWa,wvf,gWa=h(()=>{"use strict";mWa=require("fs/promises");Byr();wvf=/\r?\n/});function yWa({generatorInvocation:e}){return e.language==="go"?Svf(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 Svf(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 AWa,bWa=h(()=>{"use strict";AWa={TYPESCRIPT:"typescript",JAVA:"java",PYTHON:"python",GO:"go",RUBY:"ruby",CSHARP:"csharp",SWIFT:"swift",PHP:"php",RUST:"rust"}});function EWa(e){return typeof e!="string"&&"proto"in e}var IWa=h(()=>{"use strict"});function vWa({rootAutomation:e,groupAutomation:t,generatorAutomation:r}){return{generate:r?.generate??t?.generate??e?.generate??JIr.generate,upgrade:r?.upgrade??t?.upgrade??e?.upgrade??JIr.upgrade,preview:r?.preview??t?.preview??e?.preview??JIr.preview,verify:r?.verify??t?.verify??e?.verify??JIr.verify}}var JIr,xWa=h(()=>{"use strict";JIr={generate:!0,upgrade:!0,preview:!0,verify:!0}});var CWa=h(()=>{"use strict"});var wWa=h(()=>{"use strict"});var SWa,TWa=h(()=>{"use strict";SWa={Openai:"openai",Anthropic:"anthropic",AwsBedrock:"aws-bedrock"}});var SYi=h(()=>{"use strict";CWa();wWa();TWa()});var TYi={};X(TYi,{ModelProvider:()=>SWa});var OWa=h(()=>{"use strict";SYi()});var BWa=h(()=>{"use strict"});var OYi=h(()=>{"use strict";BWa()});var PWa={};var DWa=h(()=>{"use strict";OYi()});var RWa=h(()=>{"use strict"});var kWa=h(()=>{"use strict"});var FWa=h(()=>{"use strict"});var NWa=h(()=>{"use strict"});var jWa=h(()=>{"use strict"});var QWa=h(()=>{"use strict"});var zWa=h(()=>{"use strict"});var MWa=h(()=>{"use strict"});var LWa=h(()=>{"use strict"});var UWa=h(()=>{"use strict"});var VWa=h(()=>{"use strict"});var _Wa=h(()=>{"use strict"});var qWa=h(()=>{"use strict"});var GWa=h(()=>{"use strict"});var WWa=h(()=>{"use strict"});var HWa=h(()=>{"use strict"});var KWa=h(()=>{"use strict"});var JWa=h(()=>{"use strict"});var YWa=h(()=>{"use strict"});var XWa=h(()=>{"use strict"});var ZWa=h(()=>{"use strict"});var $Wa=h(()=>{"use strict"});var eHa=h(()=>{"use strict"});var tHa=h(()=>{"use strict"});var rHa=h(()=>{"use strict"});var BYi=h(()=>{"use strict";RWa();kWa();FWa();NWa();jWa();QWa();zWa();MWa();LWa();UWa();VWa();_Wa();qWa();GWa();WWa();HWa();KWa();JWa();YWa();XWa();ZWa();$Wa();eHa();tHa();rHa()});var nHa={};var iHa=h(()=>{"use strict";BYi()});var oHa=h(()=>{"use strict"});var sHa,aHa=h(()=>{"use strict";sHa={InDevelopment:"in-development",PreRelease:"pre-release",Deprecated:"deprecated",GenerallyAvailable:"generally-available"}});var cHa=h(()=>{"use strict"});var PYi=h(()=>{"use strict";oHa();aHa();cHa()});var DYi={};X(DYi,{AvailabilityStatusSchema:()=>sHa});var uHa=h(()=>{"use strict";PYi()});var lHa=h(()=>{"use strict"});var pHa=h(()=>{"use strict"});var fHa=h(()=>{"use strict"});var dHa=h(()=>{"use strict"});var RYi=h(()=>{"use strict";lHa();pHa();fHa();dHa()});var mHa={};var hHa=h(()=>{"use strict";RYi()});var gHa=h(()=>{"use strict"});var AHa=h(()=>{"use strict"});var kYi=h(()=>{"use strict";gHa();AHa()});var yHa={};var bHa=h(()=>{"use strict";kYi()});var EHa=h(()=>{"use strict"});var IHa=h(()=>{"use strict"});var vHa=h(()=>{"use strict"});var xHa=h(()=>{"use strict"});var CHa=h(()=>{"use strict"});var FYi=h(()=>{"use strict";EHa();IHa();vHa();xHa();CHa()});var wHa={};var SHa=h(()=>{"use strict";FYi()});var THa=h(()=>{"use strict"});var NYi=h(()=>{"use strict";THa()});var OHa={};var BHa=h(()=>{"use strict";NYi()});var PHa=h(()=>{"use strict"});var DHa=h(()=>{"use strict"});var RHa=h(()=>{"use strict"});var jYi=h(()=>{"use strict";PHa();DHa();RHa()});var kHa={};var FHa=h(()=>{"use strict";jYi()});var NHa=h(()=>{"use strict"});var jHa=h(()=>{"use strict"});var QYi=h(()=>{"use strict";NHa();jHa()});var QHa={};var zHa=h(()=>{"use strict";QYi()});var MHa=h(()=>{"use strict"});var LHa=h(()=>{"use strict"});var UHa=h(()=>{"use strict"});var VHa=h(()=>{"use strict"});var _Ha=h(()=>{"use strict"});var zYi=h(()=>{"use strict";MHa();LHa();UHa();VHa();_Ha()});var qHa={};var GHa=h(()=>{"use strict";zYi()});var WHa=h(()=>{"use strict";iHa();BYi();uHa();PYi();hHa();RYi();bHa();kYi();SHa();FYi();BHa();NYi();FHa();jYi();zHa();QYi();GHa();zYi()});var MYi={};X(MYi,{AvailabilityStatusSchema:()=>sHa,auth:()=>nHa,availability:()=>DYi,commons:()=>mHa,encoding:()=>yHa,environments:()=>wHa,file:()=>OHa,service:()=>kHa,types:()=>QHa,validation:()=>qHa});var HHa=h(()=>{"use strict";WHa()});var KHa=h(()=>{"use strict"});var JHa=h(()=>{"use strict"});var YHa=h(()=>{"use strict"});var XHa=h(()=>{"use strict"});var ZHa=h(()=>{"use strict"});var $Ha=h(()=>{"use strict"});var eKa=h(()=>{"use strict"});var tKa=h(()=>{"use strict"});var rKa=h(()=>{"use strict"});var nKa=h(()=>{"use strict"});var iKa=h(()=>{"use strict"});var oKa=h(()=>{"use strict"});var sKa=h(()=>{"use strict"});var aKa,cKa=h(()=>{"use strict";aKa={Literals:"literals",Enums:"enums",EnumsCoerceableToLiterals:"enums-coerceable-to-literals"}});var uKa=h(()=>{"use strict"});var lKa,pKa=h(()=>{"use strict";lKa={Int32:"int32",Int64:"int64",Uint32:"uint32",Uint64:"uint64"}});var fKa,dKa=h(()=>{"use strict";fKa={Minimal:"minimal",Comprehensive:"comprehensive"}});var mKa,hKa=h(()=>{"use strict";mKa={Form:"form",Json:"json"}});var gKa=h(()=>{"use strict"});var AKa=h(()=>{"use strict"});var yKa=h(()=>{"use strict"});var bKa=h(()=>{"use strict"});var EKa=h(()=>{"use strict"});var IKa=h(()=>{"use strict"});var vKa,xKa=h(()=>{"use strict";vKa={Java:"java",Python:"python",Go:"go",Ruby:"ruby",Csharp:"csharp",Typescript:"typescript",Php:"php",Rust:"rust",Swift:"swift"}});var CKa,wKa=h(()=>{"use strict";CKa={V1:"v1",V2:"v2"}});var SKa,TKa=h(()=>{"use strict";SKa={EnvironmentPerServer:"environment-per-server",UrlsPerEnvironment:"urls-per-environment"}});var OKa=h(()=>{"use strict"});var BKa=h(()=>{"use strict"});var PKa=h(()=>{"use strict"});var DKa=h(()=>{"use strict"});var RKa=h(()=>{"use strict"});var kKa=h(()=>{"use strict"});var FKa=h(()=>{"use strict"});var NKa=h(()=>{"use strict"});var jKa=h(()=>{"use strict"});var QKa,zKa=h(()=>{"use strict";QKa={UrlOrder:"url-order",SpecOrder:"spec-order"}});var MKa=h(()=>{"use strict"});var LKa=h(()=>{"use strict"});var UKa=h(()=>{"use strict"});var VKa=h(()=>{"use strict"});var _Ka=h(()=>{"use strict"});var qKa=h(()=>{"use strict"});var GKa=h(()=>{"use strict"});var WKa,HKa=h(()=>{"use strict";WKa={Always:"always",Never:"never"}});var KKa=h(()=>{"use strict"});var JKa=h(()=>{"use strict"});var YKa=h(()=>{"use strict"});var XKa=h(()=>{"use strict"});var ZKa=h(()=>{"use strict"});var $Ka=h(()=>{"use strict"});var eJa,tJa=h(()=>{"use strict";eJa={V1:"v1"}});var rJa=h(()=>{"use strict"});var nJa=h(()=>{"use strict"});var LYi=h(()=>{"use strict";KHa();JHa();YHa();XHa();ZHa();$Ha();eKa();tKa();rKa();nKa();iKa();oKa();sKa();cKa();uKa();pKa();dKa();hKa();gKa();AKa();yKa();bKa();EKa();IKa();xKa();wKa();TKa();OKa();BKa();PKa();DKa();RKa();kKa();FKa();NKa();jKa();zKa();MKa();LKa();UKa();VKa();_Ka();qKa();GKa();HKa();KKa();JKa();YKa();XKa();ZKa();$Ka();tJa();rJa();nJa()});var UYi={};X(UYi,{CoerceConstsTo:()=>aKa,DefaultIntegerFormat:()=>lKa,ExampleStyle:()=>fKa,FormParameterEncoding:()=>mKa,Language:()=>vKa,MessageNamingSettingsSchema:()=>CKa,MultiServerStrategy:()=>SKa,PathParameterOrder:()=>QKa,RemoveDiscriminantsFromSchemas:()=>WKa,UnionSettingsSchema:()=>eJa});var iJa=h(()=>{"use strict";LYi()});var oJa=h(()=>{"use strict"});var sJa=h(()=>{"use strict"});var aJa=h(()=>{"use strict"});var cJa=h(()=>{"use strict"});var uJa=h(()=>{"use strict"});var lJa=h(()=>{"use strict"});var pJa=h(()=>{"use strict"});var fJa=h(()=>{"use strict"});var dJa=h(()=>{"use strict"});var mJa=h(()=>{"use strict"});var hJa,gJa=h(()=>{"use strict";hJa={Commit:"commit",Release:"release"}});var AJa=h(()=>{"use strict"});var yJa=h(()=>{"use strict"});var bJa=h(()=>{"use strict"});var EJa=h(()=>{"use strict"});var IJa,vJa=h(()=>{"use strict";IJa={PullRequest:"pull-request",Push:"push",CommitAndRelease:"commit-and-release"}});var xJa=h(()=>{"use strict"});var CJa=h(()=>{"use strict"});var wJa=h(()=>{"use strict"});var SJa=h(()=>{"use strict"});var TJa=h(()=>{"use strict"});var OJa=h(()=>{"use strict"});var BJa=h(()=>{"use strict"});var PJa=h(()=>{"use strict"});var DJa=h(()=>{"use strict"});var RJa=h(()=>{"use strict"});var VYi=h(()=>{"use strict";oJa();sJa();aJa();cJa();uJa();lJa();pJa();fJa();dJa();mJa();gJa();AJa();yJa();bJa();EJa();vJa();xJa();CJa();wJa();SJa();TJa();OJa();BJa();PJa();DJa();RJa()});var _Yi={};X(_Yi,{GithubCommitAndReleaseMode:()=>hJa,GithubSelfhostedMode:()=>IJa});var kJa=h(()=>{"use strict";VYi()});var FJa=h(()=>{"use strict"});var NJa=h(()=>{"use strict"});var jJa,QJa=h(()=>{"use strict";jJa={Mit:"MIT",Apache:"Apache-2.0"}});var qYi=h(()=>{"use strict";FJa();NJa();QJa()});var GYi={};X(GYi,{GithubLicenseType:()=>jJa});var zJa=h(()=>{"use strict";qYi()});var MJa=h(()=>{"use strict"});var WYi=h(()=>{"use strict";MJa()});var LJa={};var UJa=h(()=>{"use strict";WYi()});var VJa=h(()=>{"use strict"});var _Ja=h(()=>{"use strict"});var HYi=h(()=>{"use strict";VJa();_Ja()});var qJa={};var GJa=h(()=>{"use strict";HYi()});var WJa=h(()=>{"use strict";OWa();SYi();DWa();OYi();HHa();iJa();LYi();kJa();VYi();zJa();qYi();UJa();WYi();GJa();HYi()});var HJa=h(()=>{"use strict";WJa()});var vue,KJa,KYi,JYi,GDb,JJa=h(()=>{"use strict";vue={Debug:"debug",Info:"info",Warn:"warn",Error:"error"},KJa={[vue.Debug]:1,[vue.Info]:2,[vue.Warn]:3,[vue.Error]:4},KYi=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)}},JYi=class{level;logger;silent;constructor(t){this.level=KJa[t.level],this.logger=t.logger,this.silent=t.silent}shouldLog(t){return!this.silent&&this.level<=KJa[t]}isDebug(){return this.shouldLog(vue.Debug)}debug(t,...r){this.isDebug()&&this.logger.debug(t,...r)}isInfo(){return this.shouldLog(vue.Info)}info(t,...r){this.isInfo()&&this.logger.info(t,...r)}isWarn(){return this.shouldLog(vue.Warn)}warn(t,...r){this.isWarn()&&this.logger.warn(t,...r)}isError(){return this.shouldLog(vue.Error)}error(t,...r){this.isError()&&this.logger.error(t,...r)}},GDb=new JYi({level:vue.Info,logger:new KYi,silent:!0})});var YJa=h(()=>{"use strict"});var XJa=h(()=>{"use strict";JJa()});var ZJa=h(()=>{"use strict"});var Mu,hw=h(()=>{"use strict";Mu={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 Hd(e,t){return`Expected ${t}. Received ${Ovf(e)}.`}function Ovf(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 rF=h(()=>{"use strict"});function MS(e){return{...e,json:$Ja(e.json),parse:$Ja(e.parse)}}function $Ja(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(`
174
- `)),{ok:!0,value:t}):n}}var HY=h(()=>{"use strict"});function YIr(e){return e.path.length===0?e.message:`${e.path.join(" -> ")}: ${e.message}`}var YYi=h(()=>{"use strict"});var GKe,XYi=h(()=>{"use strict";YYi();GKe=class extends Error{errors;constructor(t){super(t.map(YIr).join("; ")),this.errors=t,Object.setPrototypeOf(this,new.target.prototype),this.name=this.constructor.name}}});var WKe,ZYi=h(()=>{"use strict";YYi();WKe=class extends Error{errors;constructor(t){super(t.map(YIr).join("; ")),this.errors=t,Object.setPrototypeOf(this,new.target.prototype),this.name=this.constructor.name}}});function Nm(e){return{nullable:()=>Bvf(e),optional:()=>$Yi(e),optionalNullable:()=>Pvf(e),transform:t=>eXi(e,t),parseOrThrow:(t,r)=>{let n=e.parse(t,r);if(n.ok)return n.value;throw new WKe(n.errors)},jsonOrThrow:(t,r)=>{let n=e.json(t,r);if(n.ok)return n.value;throw new GKe(n.errors)}}}function Bvf(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:()=>Mu.NULLABLE};return{...t,...Nm(t)}}function $Yi(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:()=>Mu.OPTIONAL};return{...t,...Nm(t)}}function Pvf(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:()=>Mu.OPTIONAL_NULLABLE};return{...t,...Nm(t)}}function eXi(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,...Nm(r)}}var eYa=h(()=>{"use strict";hw();XYi();ZYi()});var Rj=h(()=>{"use strict";eYa();XYi();ZYi()});function tYa(){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:Hd(t,"bigint | number")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="bigint"?{ok:!1,errors:[{path:r,message:Hd(t,"bigint")}]}:{ok:!0,value:t},getType:()=>Mu.BIGINT};return{...MS(e),...Nm(e)}}var rYa=h(()=>{"use strict";hw();rF();HY();Rj()});var nYa=h(()=>{"use strict";rYa()});function iYa(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="string"?{ok:!1,errors:[{path:r,message:Hd(t,"string")}]}:Dvf.test(t)?{ok:!0,value:new Date(t)}:{ok:!1,errors:[{path:r,message:Hd(t,"ISO 8601 date string")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>t instanceof Date?{ok:!0,value:t.toISOString()}:{ok:!1,errors:[{path:r,message:Hd(t,"Date object")}]},getType:()=>Mu.DATE};return{...MS(e),...Nm(e)}}var Dvf,oYa=h(()=>{"use strict";hw();rF();HY();Rj();Dvf=/^([+-]?\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 sYa=h(()=>{"use strict";oYa()});function LS(e,t){return()=>{let r={parse:t,json:t,getType:()=>e};return{...MS(r),...Nm(r)}}}var KY=h(()=>{"use strict";Rj();HY()});function XIr(e){let t=new Set(e);return LS(Mu.ENUM,(n,{allowUnrecognizedEnumValues:i,breadcrumbsPrefix:o=[]}={})=>typeof n!="string"?{ok:!1,errors:[{path:o,message:Hd(n,"string")}]}:!t.has(n)&&!i?{ok:!1,errors:[{path:o,message:Hd(n,"enum")}]}:{ok:!0,value:n})()}var aYa=h(()=>{"use strict";hw();KY();rF()});var tXi=h(()=>{"use strict";aYa()});function cYa(e){let t=rXi(e);return{...t,...Nm(t)}}function rXi(e){return{parse:(t,r)=>HKe(e).parse(t,r),json:(t,r)=>HKe(e).json(t,r),getType:()=>HKe(e).getType()}}function HKe(e){let t=e;return t.__zurg_memoized==null&&(t.__zurg_memoized=e()),t.__zurg_memoized}var nXi=h(()=>{"use strict";Rj()});function iXi(e){return Object.entries(e)}var uYa=h(()=>{"use strict"});function Ikt(e,t){let r=new Set(t);return Object.entries(e).reduce((n,[i,o])=>(r.has(i)&&(n[i]=o),n),{})}var oXi=h(()=>{"use strict"});function xue(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return t===null?!0:Object.getPrototypeOf(t)===null}var vkt=h(()=>{"use strict"});function xkt(e){return Object.keys(e)}var sXi=h(()=>{"use strict"});function lYa(e,t){let r=[],n=[];for(let i of e)t(i)?r.push(i):n.push(i);return[r,n]}var pYa=h(()=>{"use strict"});function v7(e){return{withParsedProperties:t=>aXi(e,t)}}function aXi(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(Rvf.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(!xue(n))return{ok:!1,errors:[{path:i?.breadcrumbsPrefix??[],message:Hd(n,"object")}]};let o=new Set(Object.keys(t)),s=Ikt(n,Object.keys(n).filter(a=>!o.has(a)));return e.json(s,i)},getType:()=>e.getType()};return{...r,...Nm(r),...v7(r)}}var Rvf,fYa=h(()=>{"use strict";oXi();rF();vkt();Rj();Rvf=Object.prototype.hasOwnProperty});var Ckt=h(()=>{"use strict";fYa()});function dYa(e,t){return{rawKey:e,valueSchema:t,isProperty:!0}}function Cue(e){return e.isProperty}var cXi=h(()=>{"use strict"});function ZIr(e){let t;function r(){if(t==null){t={};for(let[d,f]of iXi(e)){let m=Cue(f)?f.rawKey:d,g=Cue(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 iXi(e)){let m=Cue(f)?f.rawKey:d,g=Cue(f)?f.valueSchema:f;Fvf(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])=>Cue(f)?f.rawKey:d),_getParsedProperties:()=>xkt(e),parse:(d,f)=>{let m=f?.breadcrumbsPrefix??[];return mYa({value:d,requiredKeys:a(),requiredKeysSet:u(),getProperty:g=>{let A=r()[g];if(A!=null)return{transformedKey:A.parsedKey,transform:y=>{let E=[...m,g];return A.valueSchema.parse(y,{...f,breadcrumbsPrefix:E})}}},unrecognizedObjectKeys:f?.unrecognizedObjectKeys,skipValidation:f?.skipValidation,breadcrumbsPrefix:m,omitUndefined:f?.omitUndefined})},json:(d,f)=>{let m=f?.breadcrumbsPrefix??[];return mYa({value:d,requiredKeys:c(),requiredKeysSet:l(),getProperty:g=>{let A=e[g];if(A!=null)return Cue(A)?{transformedKey:A.rawKey,transform:y=>{let E=[...m,g];return A.valueSchema.json(y,{...f,breadcrumbsPrefix:E})}}:{transformedKey:g,transform:y=>{let E=[...m,g];return A.json(y,{...f,breadcrumbsPrefix:E})}}},unrecognizedObjectKeys:f?.unrecognizedObjectKeys,skipValidation:f?.skipValidation,breadcrumbsPrefix:m,omitUndefined:f?.omitUndefined})},getType:()=>Mu.OBJECT};return{...MS(p),...Nm(p),...v7(p),...SNe(p)}}function mYa({value:e,requiredKeys:t,requiredKeysSet:r,getProperty:n,unrecognizedObjectKeys:i="fail",skipValidation:o=!1,breadcrumbsPrefix:s=[]}){if(!xue(e))return{ok:!1,errors:[{path:s,message:Hd(e,"object")}]};let a=t.length,c=[],u={};for(let l in e){if(!kvf.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 SNe(e){return{extend:t=>{let r={_getParsedProperties:()=>[...e._getParsedProperties(),...t._getParsedProperties()],_getRawProperties:()=>[...e._getRawProperties(),...t._getRawProperties()],parse:(n,i)=>hYa({extensionKeys:t._getRawProperties(),value:n,transformBase:o=>e.parse(o,i),transformExtension:o=>t.parse(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),json:(n,i)=>hYa({extensionKeys:t._getParsedProperties(),value:n,transformBase:o=>e.json(o,i),transformExtension:o=>t.json(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),getType:()=>Mu.OBJECT};return{...r,...Nm(r),...v7(r),...SNe(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:()=>Mu.OBJECT};return{...n,...Nm(n),...v7(n),...SNe(n)}}}}function hYa({extensionKeys:e,value:t,transformBase:r,transformExtension:n,breadcrumbsPrefix:i=[]}){if(!xue(t))return{ok:!1,errors:[{path:i,message:Hd(t,"object")}]};let o=new Set(e),[s,a]=lYa(xkt(t),l=>o.has(l)),c=r(Ikt(t,a)),u=n(Ikt(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 Fvf(e){return!Nvf(e)}function Nvf(e){switch(e.getType()){case Mu.ANY:case Mu.UNKNOWN:case Mu.OPTIONAL:case Mu.OPTIONAL_NULLABLE:return!0;default:return!1}}var kvf,uXi=h(()=>{"use strict";hw();uYa();oXi();rF();vkt();sXi();HY();pYa();Ckt();Rj();cXi();kvf=Object.prototype.hasOwnProperty});function gYa(e){return ZIr(e)}var AYa=h(()=>{"use strict";uXi()});var lXi=h(()=>{"use strict";uXi();AYa();cXi()});function yYa(e){let t={...rXi(e),_getRawProperties:()=>HKe(e)._getRawProperties(),_getParsedProperties:()=>HKe(e)._getParsedProperties()};return{...t,...Nm(t),...v7(t),...SNe(t)}}var bYa=h(()=>{"use strict";lXi();Ckt();Rj();nXi()});var EYa=h(()=>{"use strict";nXi();bYa()});function $Ir(e){let t={parse:(r,n)=>IYa(r,(i,o)=>e.parse(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),json:(r,n)=>IYa(r,(i,o)=>e.json(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),getType:()=>Mu.LIST};return{...MS(t),...Nm(t)}}function IYa(e,t){if(!Array.isArray(e))return{ok:!1,errors:[{message:Hd(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 vYa=h(()=>{"use strict";hw();rF();HY();Rj()});var pXi=h(()=>{"use strict";vYa()});function xYa(e){return LS(Mu.BOOLEAN_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:Hd(r,`${e.toString()}`)}]})()}var CYa=h(()=>{"use strict";hw();KY();rF()});function wYa(e){return LS(Mu.STRING_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:Hd(r,`"${e}"`)}]})()}var SYa=h(()=>{"use strict";hw();KY();rF()});var TYa=h(()=>{"use strict";CYa();SYa()});var OYa,BYa=h(()=>{"use strict";hw();KY();OYa=LS(Mu.ANY,e=>({ok:!0,value:e}))});var PYa,DYa=h(()=>{"use strict";hw();KY();rF();PYa=LS(Mu.BOOLEAN,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="boolean"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Hd(e,"boolean")}]})});var RYa,kYa=h(()=>{"use strict";hw();KY();RYa=LS(Mu.NEVER,(e,{breadcrumbsPrefix:t=[]}={})=>({ok:!1,errors:[{path:t,message:"Expected never"}]}))});var FYa,NYa=h(()=>{"use strict";hw();KY();rF();FYa=LS(Mu.NUMBER,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="number"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Hd(e,"number")}]})});var jYa,QYa=h(()=>{"use strict";hw();KY();rF();jYa=LS(Mu.STRING,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="string"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Hd(e,"string")}]})});var zYa,MYa=h(()=>{"use strict";hw();KY();zYa=LS(Mu.UNKNOWN,e=>({ok:!0,value:e}))});var LYa=h(()=>{"use strict";BYa();DYa();kYa();NYa();QYa();MYa()});function VYa(e,t){let r={parse:(n,i)=>UYa({value:n,isKeyNumeric:e.getType()===Mu.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)=>UYa({value:n,isKeyNumeric:e.getType()===Mu.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:()=>Mu.RECORD};return{...MS(r),...Nm(r)}}function UYa({value:e,isKeyNumeric:t,transformKey:r,transformValue:n,breadcrumbsPrefix:i=[]}){if(!xue(e))return{ok:!1,errors:[{path:i,message:Hd(e,"object")}]};let o={},s=[];for(let a in e){if(!jvf.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 jvf,_Ya=h(()=>{"use strict";hw();rF();vkt();HY();Rj();jvf=Object.prototype.hasOwnProperty});var qYa=h(()=>{"use strict";_Ya()});function GYa(e){let t=$Ir(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:Hd(n,"Set")}]},getType:()=>Mu.SET};return{...MS(r),...Nm(r)}}var WYa=h(()=>{"use strict";hw();rF();HY();pXi();Rj()});var HYa=h(()=>{"use strict";WYa()});function JYa(e){let t={parse:(r,n)=>KYa((i,o)=>i.parse(r,o),e,n),json:(r,n)=>KYa((i,o)=>i.json(r,o),e,n),getType:()=>Mu.UNDISCRIMINATED_UNION};return{...MS(t),...Nm(t)}}function KYa(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 YYa=h(()=>{"use strict";hw();HY();Rj()});var XYa=h(()=>{"use strict";YYa()});function ZYa(e,t){return{parsedDiscriminant:e,rawDiscriminant:t}}var $Ya=h(()=>{"use strict"});function tXa(e,t){let r=typeof e=="string"?e:e.rawDiscriminant,n=typeof e=="string"?e:e.parsedDiscriminant,i=XIr(xkt(t)),o={parse:(s,a)=>eXa({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)=>eXa({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:()=>Mu.UNION};return{...MS(o),...Nm(o),...v7(o)}}function eXa({value:e,discriminant:t,transformedDiscriminant:r,transformDiscriminantValue:n,getAdditionalPropertiesSchema:i,allowUnrecognizedUnionMembers:o=!1,transformAdditionalProperties:s,breadcrumbsPrefix:a=[]}){if(!xue(e))return{ok:!1,errors:[{path:a,message:Hd(e,"object")}]};let c=e[t],u={};for(let f in e)Qvf.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 Qvf,rXa=h(()=>{"use strict";hw();rF();vkt();sXi();HY();tXi();Ckt();Rj();Qvf=Object.prototype.hasOwnProperty});var nXa=h(()=>{"use strict";$Ya();rXa()});var iXa=h(()=>{"use strict";nYa();sYa();tXi();EYa();pXi();TYa();lXi();Ckt();LYa();qYa();Rj();HYa();XYa();nXa()});var xe={};X(xe,{JsonError:()=>GKe,ParseError:()=>WKe,any:()=>OYa,bigint:()=>tYa,boolean:()=>PYa,booleanLiteral:()=>xYa,date:()=>iYa,discriminant:()=>ZYa,enum_:()=>XIr,getObjectLikeUtils:()=>v7,getObjectUtils:()=>SNe,getSchemaUtils:()=>Nm,isProperty:()=>Cue,lazy:()=>cYa,lazyObject:()=>yYa,list:()=>$Ir,never:()=>RYa,number:()=>FYa,object:()=>ZIr,objectWithoutOptionalProperties:()=>gYa,optional:()=>$Yi,property:()=>dYa,record:()=>VYa,set:()=>GYa,string:()=>jYa,stringLiteral:()=>wYa,transform:()=>eXi,undiscriminatedUnion:()=>JYa,union:()=>tXa,unknown:()=>zYa,withParsedProperties:()=>aXi});var oXa=h(()=>{"use strict";iXa()});var sXa=h(()=>{"use strict"});var $r=h(()=>{"use strict";YJa();XJa();ZJa();oXa();sXa()});var evr,fXi=h(()=>{"use strict";$r();evr=xe.string()});var tvr,dXi=h(()=>{"use strict";$r();tvr=xe.enum_(["openai","anthropic","aws-bedrock"])});var rvr,mXi=h(()=>{"use strict";$r();fXi();dXi();rvr=xe.object({provider:tvr,model:evr})});var hXi=h(()=>{"use strict";mXi();fXi();dXi()});var gXi={};X(gXi,{AiServicesSchema:()=>rvr,ModelName:()=>evr,ModelProvider:()=>tvr});var aXa=h(()=>{"use strict";hXi()});var Wye,wkt=h(()=>{"use strict";$r();Wye=xe.object({generate:xe.boolean().optional(),upgrade:xe.boolean().optional(),preview:xe.boolean().optional(),verify:xe.boolean().optional()})});var AXi=h(()=>{"use strict";wkt()});var yXi={};X(yXi,{AutomationSchema:()=>Wye});var cXa=h(()=>{"use strict";AXi()});var f0,tL=h(()=>{"use strict";$r();f0=xe.object({docs:xe.string().optional()})});var KKe,nvr=h(()=>{"use strict";$r();tL();KKe=xe.object({scheme:xe.string()}).extend(f0)});var ivr,bXi=h(()=>{"use strict";$r();nvr();ivr=xe.undiscriminatedUnion([xe.string(),KKe])});var ovr,EXi=h(()=>{"use strict";$r();tL();bXi();ovr=xe.object({any:xe.list(ivr)}).extend(f0)});var svr,IXi=h(()=>{"use strict";$r();svr=xe.object({})});var avr,vXi=h(()=>{"use strict";$r();tL();IXi();avr=xe.object({"endpoint-security":svr}).extend(f0)});var JKe,cvr=h(()=>{"use strict";$r();EXi();nvr();vXi();JKe=xe.undiscriminatedUnion([xe.string(),KKe,ovr,avr])});var Hye,Skt=h(()=>{"use strict";$r();Hye=xe.object({name:xe.string().optional()})});var YKe,uvr=h(()=>{"use strict";$r();YKe=xe.object({env:xe.string().optional()})});var TNe,lvr=h(()=>{"use strict";$r();Skt();uvr();TNe=xe.object({omit:xe.boolean().optional()}).extend(YKe).extend(Hye)});var pvr,xXi=h(()=>{"use strict";$r();tL();lvr();pvr=xe.object({scheme:xe.stringLiteral("basic"),username:TNe.optional(),password:TNe.optional()}).extend(f0)});var fvr,CXi=h(()=>{"use strict";$r();fvr=xe.object({"response-property":xe.string(),"header-name":xe.string(),"value-prefix":xe.string().optional()})});var dvr,wXi=h(()=>{"use strict";$r();CXi();dvr=xe.object({endpoint:xe.string(),"expiry-response-property":xe.string().optional(),"authenticated-request-headers":xe.list(fvr).optional()})});var mvr,SXi=h(()=>{"use strict";$r();wXi();mvr=xe.undiscriminatedUnion([xe.string(),dvr])});var hvr,TXi=h(()=>{"use strict";$r();tL();SXi();hvr=xe.object({scheme:xe.stringLiteral("bearer"),"get-token":mvr}).extend(f0)});var gvr,OXi=h(()=>{"use strict";$r();tL();lvr();gvr=xe.object({scheme:xe.stringLiteral("bearer"),token:TNe.optional()}).extend(f0)});var Avr,BXi=h(()=>{"use strict";$r();TXi();OXi();Avr=xe.undiscriminatedUnion([gvr,hvr])});var yvr,PXi=h(()=>{"use strict";$r();tL();Skt();uvr();yvr=xe.object({header:xe.string(),type:xe.string().optional(),prefix:xe.string().optional()}).extend(YKe).extend(Hye).extend(f0)});var bvr,DXi=h(()=>{"use strict";$r();bvr=xe.string()});var Evr,RXi=h(()=>{"use strict";$r();Evr=xe.object({"client-id":xe.string().optional(),"client-secret":xe.string().optional(),scopes:xe.string().optional()})});var Ivr,kXi=h(()=>{"use strict";$r();Ivr=xe.object({"access-token":xe.string().optional(),"expires-in":xe.string().optional(),"refresh-token":xe.string().optional()})});var vvr,FXi=h(()=>{"use strict";$r();RXi();kXi();vvr=xe.object({endpoint:xe.string(),"request-properties":Evr.optional(),"response-properties":Ivr.optional()})});var xvr,NXi=h(()=>{"use strict";$r();xvr=xe.object({"refresh-token":xe.string()})});var Cvr,jXi=h(()=>{"use strict";$r();Cvr=xe.object({"access-token":xe.string().optional(),"expires-in":xe.string().optional(),"refresh-token":xe.string().optional()})});var wvr,QXi=h(()=>{"use strict";$r();NXi();jXi();wvr=xe.object({endpoint:xe.string(),"request-properties":xvr.optional(),"response-properties":Cvr.optional()})});var Svr,zXi=h(()=>{"use strict";$r();tL();DXi();FXi();QXi();Svr=xe.object({scheme:xe.stringLiteral("oauth"),type:xe.stringLiteral("client-credentials"),scopes:xe.list(bvr).optional(),"client-id-env":xe.string().optional(),"client-secret-env":xe.string().optional(),"token-prefix":xe.string().optional(),"token-header":xe.string().optional(),"get-token":vvr,"refresh-token":wvr.optional()}).extend(f0)});var Kye,Tkt=h(()=>{"use strict";$r();xXi();BXi();PXi();zXi();Kye=xe.undiscriminatedUnion([Svr,yvr,pvr,Avr])});var MXi=h(()=>{"use strict";bXi();EXi();cvr();Tkt();nvr();DXi();lvr();xXi();BXi();vXi();IXi();PXi();CXi();TXi();SXi();wXi();RXi();kXi();FXi();QXi();NXi();jXi();zXi();OXi();uvr()});var LXi={};X(LXi,{AnyAuthItem:()=>ivr,AnyAuthSchemesSchema:()=>ovr,ApiAuthSchema:()=>JKe,AuthSchemeDeclarationSchema:()=>Kye,AuthSchemeReferenceSchema:()=>KKe,AuthScope:()=>bvr,AuthVariable:()=>TNe,BasicAuthSchemeSchema:()=>pvr,BearerAuthSchemeSchema:()=>Avr,EndpointSecuritySchema:()=>avr,EndpointSecuritySchemaDetails:()=>svr,HeaderAuthSchemeSchema:()=>yvr,InferredAuthenticatedRequestHeader:()=>fvr,InferredBearerAuthSchema:()=>hvr,InferredGetTokenEndpointSchema:()=>mvr,InferredGetTokenEndpointSchemaObject:()=>dvr,OAuthAccessTokenRequestPropertiesSchema:()=>Evr,OAuthAccessTokenResponsePropertiesSchema:()=>Ivr,OAuthGetTokenEndpointSchema:()=>vvr,OAuthRefreshTokenEndpointSchema:()=>wvr,OAuthRefreshTokenRequestPropertiesSchema:()=>xvr,OAuthRefreshTokenResponsePropertiesSchema:()=>Cvr,OAuthSchemeSchema:()=>Svr,TokenBearerAuthSchema:()=>gvr,WithEnvironmentVariable:()=>YKe});var uXa=h(()=>{"use strict";MXi()});var XKe,Tvr=h(()=>{"use strict";$r();XKe=xe.enum_(["in-development","pre-release","deprecated","generally-available"])});var Ovr,UXi=h(()=>{"use strict";$r();Tvr();Ovr=xe.object({status:XKe,message:xe.string().optional()})});var Bvr,VXi=h(()=>{"use strict";$r();UXi();Tvr();Bvr=xe.undiscriminatedUnion([XKe,Ovr])});var _Xi=h(()=>{"use strict";UXi();Tvr();VXi()});var qXi={};X(qXi,{AvailabilitySchema:()=>Ovr,AvailabilityStatusSchema:()=>XKe,AvailabilityUnionSchema:()=>Bvr});var lXa=h(()=>{"use strict";_Xi()});var Jye,Okt=h(()=>{"use strict";$r();Jye=xe.object({audiences:xe.list(xe.string()).optional()})});var Pvr,GXi=h(()=>{"use strict";$r();VXi();Pvr=xe.object({availability:Bvr.optional()})});var WXi=h(()=>{"use strict";Okt();GXi();tL();Skt()});var HXi={};X(HXi,{WithAudiences:()=>Jye,WithAvailability:()=>Pvr,WithDocsSchema:()=>f0,WithName:()=>Hye});var pXa=h(()=>{"use strict";WXi()});var Dvr,KXi=h(()=>{"use strict";$r();Dvr=xe.object({type:xe.string()})});var Rvr,JXi=h(()=>{"use strict";$r();KXi();Rvr=xe.object({proto:Dvr.optional()})});var YXi=h(()=>{"use strict";JXi();KXi()});var XXi={};X(XXi,{EncodingSchema:()=>Rvr,ProtobufTypeSchema:()=>Dvr});var fXa=h(()=>{"use strict";YXi()});var ZKe,kvr=h(()=>{"use strict";$r();ZKe=xe.object({id:xe.string(),default:xe.string().optional(),values:xe.list(xe.string()).optional()})});var Fvr,ZXi=h(()=>{"use strict";$r();Okt();tL();kvr();Fvr=xe.object({urls:xe.record(xe.string(),xe.string()),"url-templates":xe.record(xe.string(),xe.string()).optional(),"default-urls":xe.record(xe.string(),xe.string()).optional(),variables:xe.record(xe.string(),xe.list(ZKe)).optional()}).extend(Jye).extend(f0)});var Nvr,$Xi=h(()=>{"use strict";$r();Okt();tL();kvr();Nvr=xe.object({url:xe.string(),"default-url":xe.string().optional(),"url-template":xe.string().optional(),variables:xe.list(ZKe).optional()}).extend(Jye).extend(f0)});var jvr,eZi=h(()=>{"use strict";$r();ZXi();$Xi();jvr=xe.undiscriminatedUnion([xe.string(),Nvr,Fvr])});var Qvr,tZi=h(()=>{"use strict";$r();eZi();Qvr=xe.object({"default-url":xe.string().optional(),"default-environment":xe.string().optional(),environments:xe.record(xe.string(),jvr).optional()})});var rZi=h(()=>{"use strict";eZi();ZXi();kvr();$Xi();tZi()});var nZi={};X(nZi,{EnvironmentSchema:()=>jvr,MultipleBaseUrlsEnvironmentSchema:()=>Fvr,ServerVariableSchema:()=>ZKe,SingleBaseUrlEnvironmentSchema:()=>Nvr,WithEnvironmentsSchema:()=>Qvr});var dXa=h(()=>{"use strict";rZi()});var zvr,iZi=h(()=>{"use strict";$r();zvr=xe.object({minItems:xe.number().optional(),maxItems:xe.number().optional()})});var Mvr,oZi=h(()=>{"use strict";$r();Mvr=xe.object({minProperties:xe.number().optional(),maxProperties:xe.number().optional()})});var Lvr,sZi=h(()=>{"use strict";$r();Lvr=xe.object({min:xe.number().optional(),max:xe.number().optional(),exclusiveMin:xe.boolean().optional(),exclusiveMax:xe.boolean().optional(),multipleOf:xe.number().optional()})});var Uvr,aZi=h(()=>{"use strict";$r();Uvr=xe.object({minLength:xe.number().optional(),maxLength:xe.number().optional(),pattern:xe.string().optional(),format:xe.string().optional()})});var Vvr,cZi=h(()=>{"use strict";$r();iZi();oZi();sZi();aZi();Vvr=xe.undiscriminatedUnion([Uvr,Lvr,zvr,Mvr])});var _vr,uZi=h(()=>{"use strict";$r();GXi();tL();JXi();cZi();_vr=xe.object({default:xe.unknown().optional(),encoding:Rvr.optional(),validation:Vvr.optional()}).extend(f0).extend(Pvr)});var qvr,lZi=h(()=>{"use strict";$r();Okt();Skt();uZi();qvr=xe.object({type:xe.string()}).extend(_vr).extend(Hye).extend(Jye)});var Gvr,pZi=h(()=>{"use strict";$r();lZi();Gvr=xe.object({env:xe.string().optional()}).extend(qvr)});var Wvr,fZi=h(()=>{"use strict";$r();pZi();Wvr=xe.undiscriminatedUnion([xe.string(),Gvr])});var $Ke,Hvr=h(()=>{"use strict";fZi();$Ke=Wvr});var Kvr,dZi=h(()=>{"use strict";$r();Hvr();Kvr=xe.object({headers:xe.record(xe.string(),$Ke).optional()})});var mZi=h(()=>{"use strict";dZi()});var hZi={};X(hZi,{WithHeadersSchema:()=>Kvr});var mXa=h(()=>{"use strict";mZi()});var gZi=h(()=>{"use strict";Hvr();fZi();pZi()});var AZi={};X(AZi,{HttpHeaderSchema:()=>$Ke,TypeReferenceDeclarationWithEnvOverride:()=>Wvr,TypeReferenceDeclarationWithEnvOverrideSchema:()=>Gvr});var hXa=h(()=>{"use strict";gZi()});var yZi=h(()=>{"use strict";uZi();lZi()});var bZi={};X(bZi,{BaseTypeReferenceSchema:()=>_vr,TypeReferenceDeclarationWithName:()=>qvr});var gXa=h(()=>{"use strict";yZi()});var EZi=h(()=>{"use strict";iZi();oZi();sZi();aZi();cZi()});var IZi={};X(IZi,{ListValidationSchema:()=>zvr,MapValidationSchema:()=>Mvr,NumberValidationSchema:()=>Lvr,StringValidationSchema:()=>Uvr,ValidationSchema:()=>Vvr});var AXa=h(()=>{"use strict";EZi()});var yXa=h(()=>{"use strict";uXa();MXi();lXa();_Xi();pXa();WXi();fXa();YXi();dXa();rZi();mXa();mZi();hXa();gZi();gXa();yZi();AXa();EZi()});var vZi={};X(vZi,{AnyAuthItem:()=>ivr,AnyAuthSchemesSchema:()=>ovr,ApiAuthSchema:()=>JKe,AuthSchemeDeclarationSchema:()=>Kye,AuthSchemeReferenceSchema:()=>KKe,AuthScope:()=>bvr,AuthVariable:()=>TNe,AvailabilitySchema:()=>Ovr,AvailabilityStatusSchema:()=>XKe,AvailabilityUnionSchema:()=>Bvr,BaseTypeReferenceSchema:()=>_vr,BasicAuthSchemeSchema:()=>pvr,BearerAuthSchemeSchema:()=>Avr,EncodingSchema:()=>Rvr,EndpointSecuritySchema:()=>avr,EndpointSecuritySchemaDetails:()=>svr,EnvironmentSchema:()=>jvr,HeaderAuthSchemeSchema:()=>yvr,HttpHeaderSchema:()=>$Ke,InferredAuthenticatedRequestHeader:()=>fvr,InferredBearerAuthSchema:()=>hvr,InferredGetTokenEndpointSchema:()=>mvr,InferredGetTokenEndpointSchemaObject:()=>dvr,ListValidationSchema:()=>zvr,MapValidationSchema:()=>Mvr,MultipleBaseUrlsEnvironmentSchema:()=>Fvr,NumberValidationSchema:()=>Lvr,OAuthAccessTokenRequestPropertiesSchema:()=>Evr,OAuthAccessTokenResponsePropertiesSchema:()=>Ivr,OAuthGetTokenEndpointSchema:()=>vvr,OAuthRefreshTokenEndpointSchema:()=>wvr,OAuthRefreshTokenRequestPropertiesSchema:()=>xvr,OAuthRefreshTokenResponsePropertiesSchema:()=>Cvr,OAuthSchemeSchema:()=>Svr,ProtobufTypeSchema:()=>Dvr,ServerVariableSchema:()=>ZKe,SingleBaseUrlEnvironmentSchema:()=>Nvr,StringValidationSchema:()=>Uvr,TokenBearerAuthSchema:()=>gvr,TypeReferenceDeclarationWithEnvOverride:()=>Wvr,TypeReferenceDeclarationWithEnvOverrideSchema:()=>Gvr,TypeReferenceDeclarationWithName:()=>qvr,ValidationSchema:()=>Vvr,WithAudiences:()=>Jye,WithAvailability:()=>Pvr,WithDocsSchema:()=>f0,WithEnvironmentVariable:()=>YKe,WithEnvironmentsSchema:()=>Qvr,WithHeadersSchema:()=>Kvr,WithName:()=>Hye,auth:()=>LXi,availability:()=>qXi,commons:()=>HXi,encoding:()=>XXi,environments:()=>nZi,file:()=>hZi,service:()=>AZi,types:()=>bZi,validation:()=>IZi});var bXa=h(()=>{"use strict";yXa()});var Yye,Bkt=h(()=>{"use strict";$r();Yye=xe.string()});var eJe,Jvr=h(()=>{"use strict";$r();eJe=xe.enum_(["v1","v2"])});var tJe,Yvr=h(()=>{"use strict";$r();tJe=xe.enum_(["environment-per-server","urls-per-environment"])});var rJe,Xvr=h(()=>{"use strict";$r();rJe=xe.enum_(["url-order","spec-order"])});var nJe,Zvr=h(()=>{"use strict";$r();nJe=xe.enum_(["always","never"])});var $vr,xZi=h(()=>{"use strict";$r();$vr=xe.enum_(["v1"])});var iJe,exr=h(()=>{"use strict";$r();Jvr();Yvr();Xvr();Zvr();xZi();iJe=xe.object({"use-title":xe.boolean().optional(),unions:$vr.optional(),"message-naming":eJe.optional(),"respect-nullable-schemas":xe.boolean().optional(),"only-include-referenced-schemas":xe.boolean().optional(),"inline-path-parameters":xe.boolean().optional(),"idiomatic-request-names":xe.boolean().optional(),"wrap-references-to-nullable-in-optional":xe.boolean().optional(),"coerce-optional-schemas-to-nullable":xe.boolean().optional(),"group-environments-by-host":xe.boolean().optional(),"multi-server-strategy":tJe.optional(),"remove-discriminants-from-schemas":nJe.optional(),"path-parameter-order":rJe.optional()})});var _U,ONe=h(()=>{"use strict";$r();_U=xe.undiscriminatedUnion([xe.string(),xe.list(xe.string())])});var oJe,txr=h(()=>{"use strict";$r();Bkt();exr();ONe();oJe=xe.object({path:Yye,origin:xe.string().optional(),overrides:_U.optional(),audiences:xe.list(xe.string()).optional(),settings:iJe.optional()})});var rxr,CZi=h(()=>{"use strict";$r();rxr=xe.object({repo:xe.string(),ref:xe.string().optional(),path:xe.string()})});var nxr,wZi=h(()=>{"use strict";$r();CZi();nxr=xe.object({git:rxr})});var Xye,Pkt=h(()=>{"use strict";$r();wZi();Xye=xe.undiscriminatedUnion([xe.string(),nxr])});var sJe,ixr=h(()=>{"use strict";$r();ONe();Pkt();sJe=xe.object({target:xe.string().optional(),root:Xye,overrides:_U.optional(),"local-generation":xe.boolean().optional(),"from-openapi":xe.boolean().optional(),dependencies:xe.list(xe.string()).optional()})});var aJe,oxr=h(()=>{"use strict";$r();ixr();aJe=xe.object({proto:sJe})});var sxr,SZi=h(()=>{"use strict";$r();Bkt();txr();oxr();sxr=xe.undiscriminatedUnion([Yye,oJe,aJe])});var axr,TZi=h(()=>{"use strict";$r();SZi();axr=xe.list(sxr)});var cJe,cxr=h(()=>{"use strict";$r();TZi();Bkt();txr();oxr();cJe=xe.undiscriminatedUnion([Yye,oJe,axr,aJe])});var uxr,OZi=h(()=>{"use strict";$r();uxr=xe.enum_(["literals","enums","enums-coerceable-to-literals"])});var uJe,lxr=h(()=>{"use strict";$r();OZi();Yvr();Xvr();Zvr();uJe=xe.object({"respect-nullable-schemas":xe.boolean().optional(),"title-as-schema-name":xe.boolean().optional(),"optional-additional-properties":xe.boolean().optional(),"coerce-enums-to-literals":xe.boolean().optional(),"idiomatic-request-names":xe.boolean().optional(),"wrap-references-to-nullable-in-optional":xe.boolean().optional(),"coerce-optional-schemas-to-nullable":xe.boolean().optional(),"group-environments-by-host":xe.boolean().optional(),"multi-server-strategy":tJe.optional(),"remove-discriminants-from-schemas":nJe.optional(),"path-parameter-order":rJe.optional(),"resolve-schema-collisions":xe.boolean().optional(),"infer-forward-compatible":xe.boolean().optional(),"infer-default-environment":xe.boolean().optional(),"coerce-consts-to":uxr.optional()})});var lJe,pxr=h(()=>{"use strict";$r();lxr();Jvr();lJe=xe.object({"message-naming":eJe.optional()}).extend(uJe)});var fxr,BZi=h(()=>{"use strict";$r();fxr=xe.enum_(["int32","int64","uint32","uint64"])});var dxr,PZi=h(()=>{"use strict";$r();dxr=xe.enum_(["form","json"])});var Dkt,DZi=h(()=>{"use strict";$r();Dkt=xe.object({"max-depth":xe.number().optional()})});var mxr,RZi=h(()=>{"use strict";$r();DZi();mxr=xe.object({request:Dkt.optional(),response:Dkt.optional()})});var hxr,kZi=h(()=>{"use strict";$r();hxr=xe.object({endpoints:xe.list(xe.string()).optional()})});var gxr,FZi=h(()=>{"use strict";$r();gxr=xe.object({except:xe.list(xe.string()).optional()})});var Axr,NZi=h(()=>{"use strict";$r();FZi();Axr=xe.undiscriminatedUnion([xe.boolean(),gxr])});var Zye,Rkt=h(()=>{"use strict";$r();lxr();BZi();PZi();RZi();kZi();NZi();Zye=xe.object({"only-include-referenced-schemas":xe.boolean().optional(),"inline-path-parameters":xe.boolean().optional(),"prefer-undiscriminated-unions-with-literals":xe.boolean().optional(),"object-query-parameters":xe.boolean().optional(),"respect-readonly-schemas":xe.boolean().optional(),"use-read-variant-for-responses":xe.boolean().optional(),"respect-forward-compatible-enums":xe.boolean().optional(),"use-bytes-for-binary-response":xe.boolean().optional(),"default-form-parameter-encoding":dxr.optional(),filter:hxr.optional(),"example-generation":mxr.optional(),"additional-properties-defaults-to":xe.boolean().optional(),"type-dates-as-strings":xe.boolean().optional(),"preserve-single-schema-oneof":xe.boolean().optional(),"inline-all-of-schemas":xe.boolean().optional(),"resolve-aliases":Axr.optional(),"group-multi-api-environments":xe.boolean().optional(),"default-integer-format":fxr.optional(),"infer-discriminated-union-base-properties":xe.boolean().optional(),"disambiguate-request-names":xe.boolean().optional(),"ignore-tags":xe.boolean().optional()}).extend(uJe)});var pJe,yxr=h(()=>{"use strict";$r();pxr();Rkt();pJe=xe.object({"auto-generate-idempotency-key":xe.unknown().optional()}).extend(Zye).extend(lJe)});var bxr,jZi=h(()=>{"use strict";$r();bxr=xe.object({conjure:xe.string()})});var Exr,QZi=h(()=>{"use strict";$r();pxr();ONe();Pkt();Exr=xe.object({asyncapi:Xye,origin:xe.string().optional(),overrides:_U.optional(),namespace:xe.string().optional(),settings:lJe.optional()})});var Ixr,zZi=h(()=>{"use strict";$r();Ixr=xe.object({graphql:xe.string(),origin:xe.string().optional(),overrides:xe.string().optional(),examples:xe.string().optional(),name:xe.string().optional()})});var vxr,MZi=h(()=>{"use strict";$r();Rkt();ONe();Pkt();vxr=xe.object({openapi:Xye,origin:xe.string().optional(),overrides:_U.optional(),overlays:xe.string().optional(),namespace:xe.string().optional(),settings:Zye.optional()})});var xxr,LZi=h(()=>{"use strict";$r();ONe();xxr=xe.object({openrpc:xe.string(),overrides:_U.optional(),namespace:xe.string().optional()})});var Cxr,UZi=h(()=>{"use strict";$r();ixr();Cxr=xe.object({proto:sJe})});var wxr,VZi=h(()=>{"use strict";$r();QZi();zZi();MZi();LZi();UZi();wxr=xe.undiscriminatedUnion([vxr,Exr,Cxr,xxr,Ixr])});var fJe,Sxr=h(()=>{"use strict";$r();jZi();VZi();fJe=xe.undiscriminatedUnion([xe.list(wxr),bxr])});var Txr,_Zi=h(()=>{"use strict";$r();cvr();Tkt();tZi();dZi();yxr();Sxr();Txr=xe.object({auth:JKe.optional(),"auth-schemes":xe.record(xe.string(),Kye).optional(),specs:fJe,settings:pJe.optional()}).extend(Kvr).extend(Qvr)});var Oxr,qZi=h(()=>{"use strict";$r();cxr();Oxr=xe.object({namespaces:xe.record(xe.string(),cJe)})});var Bxr,GZi=h(()=>{"use strict";$r();cxr();_Zi();qZi();Bxr=xe.undiscriminatedUnion([cJe,Oxr,Txr])});var Pxr,WZi=h(()=>{"use strict";$r();Pxr=xe.enum_(["minimal","comprehensive"])});var Dxr,HZi=h(()=>{"use strict";$r();Dxr=xe.object({name:xe.string(),registry:xe.string()})});var Rxr,KZi=h(()=>{"use strict";$r();Rxr=xe.object({name:xe.string(),email:xe.string()})});var $ye,kkt=h(()=>{"use strict";$r();KZi();$ye=xe.object({description:xe.string().optional(),authors:xe.list(Rxr).optional()})});var Fkt,JZi=h(()=>{"use strict";$r();Fkt=xe.object({name:xe.string()})});var ebe,Nkt=h(()=>{"use strict";$r();JZi();ebe=xe.object({teams:xe.list(Fkt).optional(),users:xe.list(Fkt).optional()})});var kxr,YZi=h(()=>{"use strict";$r();cvr();Tkt();Hvr();yxr();Sxr();kxr=xe.object({auth:JKe.optional(),"auth-schemes":xe.record(xe.string(),Kye).optional(),headers:xe.record(xe.string(),$Ke).optional(),settings:pJe.optional(),specs:fJe.optional()})});var Fxr,XZi=h(()=>{"use strict";$r();Fxr=xe.object({url:xe.string().optional(),"package-name":xe.string(),token:xe.string().optional()})});var Nxr,ZZi=h(()=>{"use strict";$r();Nxr=xe.object({path:xe.string()})});var jxr,$Zi=h(()=>{"use strict";$r();jxr=xe.object({keyId:xe.string(),password:xe.string(),secretKey:xe.string()})});var Qxr,e$i=h(()=>{"use strict";$r();$Zi();Qxr=xe.object({url:xe.string().optional(),coordinate:xe.string(),username:xe.string().optional(),password:xe.string().optional(),signature:jxr.optional()})});var zxr,t$i=h(()=>{"use strict";$r();zxr=xe.object({url:xe.string().optional(),"package-name":xe.string(),token:xe.string().optional()})});var Mxr,r$i=h(()=>{"use strict";$r();Mxr=xe.object({url:xe.string().optional(),"package-name":xe.string(),"api-key":xe.string().optional()})});var Lxr,n$i=h(()=>{"use strict";$r();Lxr=xe.object({"api-key":xe.string(),"workspace-id":xe.string(),"collection-id":xe.string().optional()})});var Uxr,i$i=h(()=>{"use strict";$r();kkt();Uxr=xe.object({keywords:xe.list(xe.string()).optional(),"documentation-link":xe.string().optional(),"homepage-link":xe.string().optional()}).extend($ye)});var Vxr,o$i=h(()=>{"use strict";$r();i$i();Vxr=xe.object({url:xe.string().optional(),"package-name":xe.string(),token:xe.string().optional(),username:xe.string().optional(),password:xe.string().optional(),metadata:Uxr.optional()})});var _xr,s$i=h(()=>{"use strict";$r();_xr=xe.object({url:xe.string().optional(),"package-name":xe.string(),"api-key":xe.string().optional()})});var qxr,a$i=h(()=>{"use strict";$r();XZi();ZZi();e$i();t$i();r$i();n$i();o$i();s$i();qxr=xe.union("location",{npm:zxr,maven:Qxr,pypi:Vxr,postman:Lxr,"local-file-system":Nxr,nuget:Mxr,rubygems:_xr,crates:Fxr}).transform({transform:e=>e,untransform:e=>e})});var Gxr,c$i=h(()=>{"use strict";$r();Gxr=xe.object({custom:xe.string()})});var Wxr,u$i=h(()=>{"use strict";$r();Wxr=xe.enum_(["MIT","Apache-2.0"])});var qU,BNe=h(()=>{"use strict";$r();c$i();u$i();qU=xe.undiscriminatedUnion([Wxr,Gxr])});var jkt,l$i=h(()=>{"use strict";$r();BNe();jkt=xe.object({"package-description":xe.string().optional(),email:xe.string().optional(),"reference-url":xe.string().optional(),author:xe.string().optional(),license:qU.optional()})});var Hxr,p$i=h(()=>{"use strict";$r();Hxr=xe.object({path:xe.string()})});var Kxr,f$i=h(()=>{"use strict";$r();Kxr=xe.enum_(["commit","release"])});var Jxr,d$i=h(()=>{"use strict";$r();BNe();f$i();Jxr=xe.object({repository:xe.string(),branch:xe.string().optional(),license:qU.optional(),mode:Kxr.optional()})});var Yxr,m$i=h(()=>{"use strict";$r();BNe();Nkt();Yxr=xe.object({repository:xe.string(),branch:xe.string().optional(),license:qU.optional(),mode:xe.stringLiteral("pull-request"),reviewers:ebe.optional()})});var Xxr,h$i=h(()=>{"use strict";$r();BNe();Xxr=xe.object({repository:xe.string(),license:qU.optional(),mode:xe.stringLiteral("push"),branch:xe.string().optional()})});var Zxr,g$i=h(()=>{"use strict";$r();Zxr=xe.enum_(["pull-request","push","commit-and-release"])});var $xr,A$i=h(()=>{"use strict";$r();BNe();g$i();$xr=xe.object({uri:xe.string(),token:xe.string(),mode:Zxr.optional(),branch:xe.string().optional(),license:qU.optional()})});var eCr,y$i=h(()=>{"use strict";$r();d$i();m$i();h$i();A$i();eCr=xe.undiscriminatedUnion([$xr,Jxr,Yxr,Xxr])});var dJe,tCr=h(()=>{"use strict";$r();wkt();YZi();a$i();l$i();p$i();y$i();dJe=xe.object({version:xe.string(),output:qxr.optional(),github:eCr.optional(),config:xe.unknown().optional(),metadata:jkt.optional(),keywords:xe.list(xe.string()).optional(),snippets:Hxr.optional(),"ir-version":xe.string().optional(),"smart-casing":xe.boolean().optional(),"smart-casing-digit-word-boundary":xe.boolean().optional(),api:kxr.optional(),"disable-examples":xe.boolean().optional(),"publish-metadata":jkt.optional(),autorelease:xe.boolean().optional(),automation:Wye.optional()})});var rCr,b$i=h(()=>{"use strict";$r();HZi();tCr();rCr=xe.object({image:Dxr}).extend(dJe)});var nCr,E$i=h(()=>{"use strict";$r();tCr();nCr=xe.object({name:xe.string()}).extend(dJe)});var iCr,I$i=h(()=>{"use strict";$r();b$i();E$i();iCr=xe.undiscriminatedUnion([nCr,rCr])});var oCr,v$i=h(()=>{"use strict";$r();wkt();kkt();Nkt();I$i();oCr=xe.object({audiences:xe.list(xe.string()).optional(),generators:xe.list(iCr),metadata:$ye.optional(),reviewers:ebe.optional(),automation:Wye.optional()})});var sCr,x$i=h(()=>{"use strict";$r();sCr=xe.object({enabled:xe.boolean()})});var aCr,C$i=h(()=>{"use strict";$r();Rkt();aCr=xe.object({path:xe.string(),origin:xe.string().optional(),overrides:xe.string().optional(),"disable-examples":xe.boolean().optional(),settings:Zye})});var cCr,w$i=h(()=>{"use strict";$r();C$i();cCr=xe.undiscriminatedUnion([aCr,xe.string()])});var uCr,S$i=h(()=>{"use strict";$r();uCr=xe.enum_(["java","python","go","ruby","csharp","typescript","php","rust","swift"])});var lCr,T$i=h(()=>{"use strict";$r();S$i();lCr=xe.object({title:xe.string(),language:uCr,content:xe.string()})});var pCr,O$i=h(()=>{"use strict";$r();pCr=xe.object({method:xe.string(),path:xe.string(),stream:xe.boolean().optional()})});var Qkt,B$i=h(()=>{"use strict";$r();O$i();Qkt=xe.undiscriminatedUnion([xe.string(),pCr])});var fCr,P$i=h(()=>{"use strict";$r();WZi();T$i();B$i();fCr=xe.object({bannerLink:xe.string().optional(),introduction:xe.string().optional(),apiReferenceLink:xe.string().optional(),apiName:xe.string().optional(),disabledSections:xe.list(xe.string()).optional(),defaultEndpoint:Qkt.optional(),features:xe.record(xe.string(),xe.list(Qkt)).optional(),customSections:xe.list(lCr).optional(),exampleStyle:Pxr.optional()})});var dCr,D$i=h(()=>{"use strict";$r();dCr=xe.object({username:xe.string(),email:xe.string(),token:xe.string()})});var mCr,R$i=h(()=>{"use strict";$r();D$i();mCr=xe.object({github:dCr.optional()})});var EXa,IXa=h(()=>{"use strict";$r();mXi();wkt();Tkt();v$i();x$i();Nkt();GZi();exr();w$i();kkt();P$i();R$i();EXa=xe.object({"auth-schemes":xe.record(xe.string(),Kye).optional(),api:Bxr.optional(),whitelabel:mCr.optional(),metadata:$ye.optional(),readme:fCr.optional(),"default-group":xe.string().optional(),aliases:xe.record(xe.string(),xe.list(xe.string())).optional(),groups:xe.record(xe.string(),oCr).optional(),reviewers:ebe.optional(),replay:sCr.optional(),ai:rvr.optional(),autorelease:xe.boolean().optional(),automation:Wye.optional(),openapi:cCr.optional(),"openapi-overrides":xe.string().optional(),"spec-origin":xe.string().optional(),"async-api":xe.string().optional(),"api-settings":iJe.optional()})});var k$i=h(()=>{"use strict";GZi();cxr();_Zi();yxr();Sxr();TZi();Bkt();SZi();exr();txr();pxr();QZi();lxr();OZi();jZi();BZi();WZi();PZi();HZi();IXa();CZi();C$i();w$i();zZi();S$i();Jvr();Yvr();qZi();RZi();kZi();Rkt();MZi();LZi();KZi();kkt();ONe();Xvr();oxr();ixr();UZi();T$i();O$i();B$i();P$i();Zvr();DZi();NZi();FZi();VZi();wZi();Pkt();xZi();R$i();D$i()});var F$i={};X(F$i,{ApiConfigurationSchema:()=>Bxr,ApiConfigurationSchemaInternal:()=>cJe,ApiConfigurationV2Schema:()=>Txr,ApiConfigurationV2SettingsSchema:()=>pJe,ApiConfigurationV2SpecsSchema:()=>fJe,ApiDefinitionList:()=>axr,ApiDefinitionPathSchema:()=>Yye,ApiDefinitionSchema:()=>sxr,ApiDefinitionSettingsSchema:()=>iJe,ApiDefinitionWithOverridesSchema:()=>oJe,AsyncApiSettingsSchema:()=>lJe,AsyncApiSpecSchema:()=>Exr,BaseApiSettingsSchema:()=>uJe,CoerceConstsTo:()=>uxr,ConjureSchema:()=>bxr,DefaultIntegerFormat:()=>fxr,ExampleStyle:()=>Pxr,FormParameterEncoding:()=>dxr,GeneratorImageObjectSchema:()=>Dxr,GeneratorsConfigurationSchema:()=>EXa,GeneratorsOpenApiObjectSchema:()=>aCr,GeneratorsOpenApiSchema:()=>cCr,GitRemoteSchema:()=>rxr,GraphQlSpecSchema:()=>Ixr,Language:()=>uCr,MessageNamingSettingsSchema:()=>eJe,MultiServerStrategy:()=>tJe,NamespacedApiConfigurationSchema:()=>Oxr,OpenApiExampleGenerationSchema:()=>mxr,OpenApiFilterSchema:()=>hxr,OpenApiSettingsSchema:()=>Zye,OpenApiSpecSchema:()=>vxr,OpenRpcSpecSchema:()=>xxr,OutputMetadataAuthor:()=>Rxr,OutputMetadataSchema:()=>$ye,OverridesSchema:()=>_U,PathParameterOrder:()=>rJe,ProtobufApiDefinitionSchema:()=>aJe,ProtobufDefinitionSchema:()=>sJe,ProtobufSpecSchema:()=>Cxr,ReadmeCustomSectionSchema:()=>lCr,ReadmeEndpointObjectSchema:()=>pCr,ReadmeEndpointSchema:()=>Qkt,ReadmeSchema:()=>fCr,RemoveDiscriminantsFromSchemas:()=>nJe,RequestOrResponseExampleGenerationSchema:()=>Dkt,ResolveAliases:()=>Axr,ResolveAliasesSchema:()=>gxr,SpecGitSourceSchema:()=>nxr,SpecSchema:()=>wxr,SpecSourceSchema:()=>Xye,UnionSettingsSchema:()=>$vr,WhitelabelConfigurationSchema:()=>mCr,WhitelabelGithubConfigurationSchema:()=>dCr});var vXa=h(()=>{"use strict";k$i()});var N$i=h(()=>{"use strict";tCr();XZi();b$i();E$i();YZi();v$i();I$i();a$i();l$i();p$i();f$i();d$i();y$i();m$i();h$i();g$i();A$i();ZZi();e$i();$Zi();t$i();r$i();n$i();o$i();i$i();s$i()});var j$i={};X(j$i,{BaseGeneratorInvocationSchema:()=>dJe,CratesOutputLocationSchema:()=>Fxr,CustomGeneratorInvocationSchema:()=>rCr,DefaultGeneratorInvocationSchema:()=>nCr,GeneratorApiSettingsSchema:()=>kxr,GeneratorGroupSchema:()=>oCr,GeneratorInvocationSchema:()=>iCr,GeneratorOutputSchema:()=>qxr,GeneratorPublishMetadataSchema:()=>jkt,GeneratorSnippetsSchema:()=>Hxr,GithubCommitAndReleaseMode:()=>Kxr,GithubCommitAndReleaseSchema:()=>Jxr,GithubConfigurationSchema:()=>eCr,GithubPullRequestSchema:()=>Yxr,GithubPushSchema:()=>Xxr,GithubSelfhostedMode:()=>Zxr,GithubSelfhostedSchema:()=>$xr,LocalFileSystemOutputLocationSchema:()=>Nxr,MavenOutputLocationSchema:()=>Qxr,MavenOutputSignatureSchema:()=>jxr,NpmOutputLocationSchema:()=>zxr,NugetOutputLocationSchema:()=>Mxr,PostmanOutputLocationSchema:()=>Lxr,PypiOutputLocationSchema:()=>Vxr,PypiOutputMetadataSchema:()=>Uxr,RubyGemsOutputLocationSchema:()=>_xr});var xXa=h(()=>{"use strict";N$i()});var Q$i=h(()=>{"use strict";c$i();BNe();u$i()});var z$i={};X(z$i,{GithubLicenseCustomSchema:()=>Gxr,GithubLicenseSchema:()=>qU,GithubLicenseType:()=>Wxr});var CXa=h(()=>{"use strict";Q$i()});var M$i=h(()=>{"use strict";x$i()});var L$i={};X(L$i,{ReplayConfigSchema:()=>sCr});var wXa=h(()=>{"use strict";M$i()});var U$i=h(()=>{"use strict";JZi();Nkt()});var V$i={};X(V$i,{ReviewerSchema:()=>Fkt,ReviewersSchema:()=>ebe});var SXa=h(()=>{"use strict";U$i()});var TXa=h(()=>{"use strict";aXa();hXi();cXa();AXi();bXa();vXa();k$i();xXa();N$i();CXa();Q$i();wXa();M$i();SXa();U$i()});var _$i={};X(_$i,{AiServicesSchema:()=>rvr,ApiConfigurationSchema:()=>Bxr,ApiConfigurationSchemaInternal:()=>cJe,ApiConfigurationV2Schema:()=>Txr,ApiConfigurationV2SettingsSchema:()=>pJe,ApiConfigurationV2SpecsSchema:()=>fJe,ApiDefinitionList:()=>axr,ApiDefinitionPathSchema:()=>Yye,ApiDefinitionSchema:()=>sxr,ApiDefinitionSettingsSchema:()=>iJe,ApiDefinitionWithOverridesSchema:()=>oJe,AsyncApiSettingsSchema:()=>lJe,AsyncApiSpecSchema:()=>Exr,AutomationSchema:()=>Wye,BaseApiSettingsSchema:()=>uJe,BaseGeneratorInvocationSchema:()=>dJe,CoerceConstsTo:()=>uxr,ConjureSchema:()=>bxr,CratesOutputLocationSchema:()=>Fxr,CustomGeneratorInvocationSchema:()=>rCr,DefaultGeneratorInvocationSchema:()=>nCr,DefaultIntegerFormat:()=>fxr,ExampleStyle:()=>Pxr,FormParameterEncoding:()=>dxr,GeneratorApiSettingsSchema:()=>kxr,GeneratorGroupSchema:()=>oCr,GeneratorImageObjectSchema:()=>Dxr,GeneratorInvocationSchema:()=>iCr,GeneratorOutputSchema:()=>qxr,GeneratorPublishMetadataSchema:()=>jkt,GeneratorSnippetsSchema:()=>Hxr,GeneratorsConfigurationSchema:()=>EXa,GeneratorsOpenApiObjectSchema:()=>aCr,GeneratorsOpenApiSchema:()=>cCr,GitRemoteSchema:()=>rxr,GithubCommitAndReleaseMode:()=>Kxr,GithubCommitAndReleaseSchema:()=>Jxr,GithubConfigurationSchema:()=>eCr,GithubLicenseCustomSchema:()=>Gxr,GithubLicenseSchema:()=>qU,GithubLicenseType:()=>Wxr,GithubPullRequestSchema:()=>Yxr,GithubPushSchema:()=>Xxr,GithubSelfhostedMode:()=>Zxr,GithubSelfhostedSchema:()=>$xr,GraphQlSpecSchema:()=>Ixr,Language:()=>uCr,LocalFileSystemOutputLocationSchema:()=>Nxr,MavenOutputLocationSchema:()=>Qxr,MavenOutputSignatureSchema:()=>jxr,MessageNamingSettingsSchema:()=>eJe,ModelName:()=>evr,ModelProvider:()=>tvr,MultiServerStrategy:()=>tJe,NamespacedApiConfigurationSchema:()=>Oxr,NpmOutputLocationSchema:()=>zxr,NugetOutputLocationSchema:()=>Mxr,OpenApiExampleGenerationSchema:()=>mxr,OpenApiFilterSchema:()=>hxr,OpenApiSettingsSchema:()=>Zye,OpenApiSpecSchema:()=>vxr,OpenRpcSpecSchema:()=>xxr,OutputMetadataAuthor:()=>Rxr,OutputMetadataSchema:()=>$ye,OverridesSchema:()=>_U,PathParameterOrder:()=>rJe,PostmanOutputLocationSchema:()=>Lxr,ProtobufApiDefinitionSchema:()=>aJe,ProtobufDefinitionSchema:()=>sJe,ProtobufSpecSchema:()=>Cxr,PypiOutputLocationSchema:()=>Vxr,PypiOutputMetadataSchema:()=>Uxr,ReadmeCustomSectionSchema:()=>lCr,ReadmeEndpointObjectSchema:()=>pCr,ReadmeEndpointSchema:()=>Qkt,ReadmeSchema:()=>fCr,RemoveDiscriminantsFromSchemas:()=>nJe,ReplayConfigSchema:()=>sCr,RequestOrResponseExampleGenerationSchema:()=>Dkt,ResolveAliases:()=>Axr,ResolveAliasesSchema:()=>gxr,ReviewerSchema:()=>Fkt,ReviewersSchema:()=>ebe,RubyGemsOutputLocationSchema:()=>_xr,SpecGitSourceSchema:()=>nxr,SpecSchema:()=>wxr,SpecSourceSchema:()=>Xye,UnionSettingsSchema:()=>$vr,WhitelabelConfigurationSchema:()=>mCr,WhitelabelGithubConfigurationSchema:()=>dCr,ai:()=>gXi,automation:()=>yXi,fernDefinition:()=>vZi,generators:()=>F$i,group:()=>j$i,license:()=>z$i,replay:()=>L$i,reviewers:()=>V$i});var OXa=h(()=>{"use strict";TXa()});var BXa=h(()=>{"use strict";HJa();OXa()});function PXa(e){return e?.specs!=null}var DXa=h(()=>{"use strict"});function RXa(e){return e?.asyncapi!=null}var kXa=h(()=>{"use strict"});function FXa(e){return e?.conjure!=null}var NXa=h(()=>{"use strict"});function jXa(e){return e?.graphql!=null}var QXa=h(()=>{"use strict"});function zXa(e){return e?.namespaces!=null}var MXa=h(()=>{"use strict"});function LXa(e){return e?.openapi!=null}var UXa=h(()=>{"use strict"});function VXa(e){return e?.openrpc!=null}var _Xa=h(()=>{"use strict"});function qXa(e){return e?.proto!=null}var GXa=h(()=>{"use strict"});var WXa=h(()=>{"use strict";DXa();kXa();NXa();QXa();MXa();UXa();_Xa();GXa()});var Nn={};X(Nn,{API_ORIGIN_LOCATION_KEY:()=>L3a,API_SETTINGS_KEY:()=>q3a,ASYNC_API_LOCATION_KEY:()=>U3a,CoerceConstsTo:()=>aKa,DEFAULT_GROUP_GENERATORS_CONFIG_KEY:()=>Bye,DEFAULT_GROUP_NAME:()=>gRt,DefaultIntegerFormat:()=>lKa,ExampleStyle:()=>fKa,FormParameterEncoding:()=>mKa,GenerationLanguage:()=>AWa,GithubCommitAndReleaseMode:()=>hJa,GithubLicenseType:()=>jJa,GithubSelfhostedMode:()=>IJa,Language:()=>vKa,MessageNamingSettingsSchema:()=>CKa,ModelProvider:()=>SWa,MultiServerStrategy:()=>SKa,OPENAPI_LOCATION_KEY:()=>V3a,OPENAPI_OVERRIDES_LOCATION_KEY:()=>_3a,PathParameterOrder:()=>QKa,RemoveDiscriminantsFromSchemas:()=>WKa,UnionSettingsSchema:()=>eJa,ai:()=>TYi,automation:()=>PWa,fernDefinition:()=>MYi,generators:()=>UYi,getPackageName:()=>yWa,group:()=>_Yi,isApiConfigurationV2Schema:()=>PXa,isAsyncApiSpecSchema:()=>RXa,isConjureSchema:()=>FXa,isGraphQLSpecSchema:()=>jXa,isNamespacedApiConfiguration:()=>zXa,isOpenApiSpecSchema:()=>LXa,isOpenRpcSpecSchema:()=>VXa,isProtoSpecSchema:()=>qXa,isRawProtobufAPIDefinitionSchema:()=>EWa,license:()=>GYi,replay:()=>LJa,resolveAutomationConfig:()=>vWa,reviewers:()=>qJa,serialization:()=>_$i});var HXa=h(()=>{"use strict";Byr();bWa();IWa();xWa();BXa();WXa()});var Va=h(()=>{"use strict";j3a();Byr();R_a();fWa();dWa();gWa();HXa()});function Lvf(e){let{defaults:t,options:r,overrides:n,overrideOnly:i=new Set,undefinedIfAbsent:o=new Set}=e,s={};for(let a of Object.keys(t))i.has(a)?s[a]=n?.[a]!==void 0?n[a]:t[a]:o.has(a)?s[a]=n?.[a]!==void 0?n[a]:r?.[a]!==void 0?r[a]:void 0:s[a]=n?.[a]??r?.[a]??t[a];return s}function PNe({options:e,overrides:t}){return Lvf({defaults:Mvf,options:e,overrides:t})}var Mvf,q$i=h(()=>{"use strict";Va();Mvf={enableUniqueErrorsPerEndpoint:!1,detectGlobalHeaders:!0,objectQueryParameters:!0,respectReadonlySchemas:!1,useReadVariantForResponses:!1,respectNullableSchemas:!0,onlyIncludeReferencedSchemas:!1,inlinePathParameters:!0,useBytesForBinaryResponse:!1,respectForwardCompatibleEnums:!1,wrapReferencesToNullableInOptional:!1,coerceOptionalSchemasToNullable:!1,groupEnvironmentsByHost:!1,multiServerStrategy:Nn.MultiServerStrategy.EnvironmentPerServer,removeDiscriminantsFromSchemas:Nn.RemoveDiscriminantsFromSchemas.Always,inferDefaultEnvironment:!0}});var KXa=h(()=>{"use strict"});var JXa=h(()=>{"use strict"});var mJe,YXa=h(()=>{"use strict";rc();mJe={protobuf:e=>({...e,type:"protobuf",_visit:function(t){return mJe._visit(this,t)}}),_visit:(e,t)=>e.type==="protobuf"?t.protobuf(e):t._other(e)}});var XXa=h(()=>{"use strict"});var ZXa=h(()=>{"use strict"});var $Xa=h(()=>{"use strict"});var eZa=h(()=>{"use strict"});var tZa=h(()=>{"use strict"});var rZa=h(()=>{"use strict"});var nZa=h(()=>{"use strict"});var iZa=h(()=>{"use strict"});var oZa=h(()=>{"use strict"});var sZa=h(()=>{"use strict"});var aZa=h(()=>{"use strict"});var US,cZa=h(()=>{"use strict";rc();US={basic:e=>({...e,type:"basic",_visit:function(t){return US._visit(this,t)}}),bearer:e=>({...e,type:"bearer",_visit:function(t){return US._visit(this,t)}}),header:e=>({...e,type:"header",_visit:function(t){return US._visit(this,t)}}),query:e=>({...e,type:"query",_visit:function(t){return US._visit(this,t)}}),oauth:e=>({...e,type:"oauth",_visit:function(t){return US._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"basic":return t.basic(e);case"bearer":return t.bearer(e);case"header":return t.header(e);case"query":return t.query(e);case"oauth":return t.oauth(e);default:return t._other(e)}}}});var uZa=h(()=>{"use strict"});var lZa=h(()=>{"use strict"});var pZa=h(()=>{"use strict"});var WP,fZa=h(()=>{"use strict";rc();WP={openapi:e=>({...e,type:"openapi",_visit:function(t){return WP._visit(this,t)}}),protobuf:e=>({...e,type:"protobuf",_visit:function(t){return WP._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"openapi":return t.openapi(e);case"protobuf":return t.protobuf(e);default:return t._other(e)}}}});var dZa=h(()=>{"use strict"});var mZa=h(()=>{"use strict"});var hZa=h(()=>{"use strict"});var gZa=h(()=>{"use strict"});var AZa=h(()=>{"use strict"});var yZa=h(()=>{"use strict"});var bZa=h(()=>{"use strict"});var EZa=h(()=>{"use strict"});var IZa=h(()=>{"use strict"});var vZa=h(()=>{"use strict"});var xZa=h(()=>{"use strict"});var CZa=h(()=>{"use strict"});var wZa=h(()=>{"use strict"});var SZa=h(()=>{"use strict"});var G$i=h(()=>{"use strict";KXa();JXa();YXa();XXa();ZXa();$Xa();eZa();tZa();rZa();nZa();iZa();oZa();sZa();aZa();cZa();uZa();lZa();pZa();fZa();dZa();mZa();hZa();gZa();AZa();yZa();bZa();EZa();IZa();vZa();xZa();CZa();wZa();SZa()});var TZa=h(()=>{"use strict";G$i()});var gc,OZa=h(()=>{"use strict";rc();gc={primitive:e=>({value:e,type:"primitive",_visit:function(t){return gc._visit(this,t)}}),object:e=>({...e,type:"object",_visit:function(t){return gc._visit(this,t)}}),array:e=>({value:e,type:"array",_visit:function(t){return gc._visit(this,t)}}),map:e=>({value:e,type:"map",_visit:function(t){return gc._visit(this,t)}}),enum:e=>({value:e,type:"enum",_visit:function(t){return gc._visit(this,t)}}),literal:e=>({value:e,type:"literal",_visit:function(t){return gc._visit(this,t)}}),oneOf:e=>({value:e,type:"oneOf",_visit:function(t){return gc._visit(this,t)}}),null:e=>({...e,type:"null",_visit:function(t){return gc._visit(this,t)}}),unknown:e=>({value:e,type:"unknown",_visit:function(t){return gc._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"primitive":return t.primitive(e.value);case"object":return t.object(e);case"array":return t.array(e.value);case"map":return t.map(e.value);case"enum":return t.enum(e.value);case"literal":return t.literal(e.value);case"oneOf":return t.oneOf(e.value);case"null":return t.null(e);case"unknown":return t.unknown(e.value);default:return t._other(e)}}}});var BZa=h(()=>{"use strict"});var tbe,PZa=h(()=>{"use strict";rc();tbe={discriminated:e=>({value:e,type:"discriminated",_visit:function(t){return tbe._visit(this,t)}}),undiscriminated:e=>({value:e,type:"undiscriminated",_visit:function(t){return tbe._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"discriminated":return t.discriminated(e.value);case"undiscriminated":return t.undiscriminated(e.value);default:return t._other(e)}}}});var DZa=h(()=>{"use strict"});var rbe,RZa=h(()=>{"use strict";rc();rbe={boolean:e=>({value:e,type:"boolean",_visit:function(t){return rbe._visit(this,t)}}),string:e=>({value:e,type:"string",_visit:function(t){return rbe._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"boolean":return t.boolean(e.value);case"string":return t.string(e.value);default:return t._other(e)}}}});var kZa=h(()=>{"use strict"});var vo,FZa=h(()=>{"use strict";rc();vo={int:e=>({value:e,type:"int",_visit:function(t){return vo._visit(this,t)}}),int64:e=>({value:e,type:"int64",_visit:function(t){return vo._visit(this,t)}}),uint:e=>({value:e,type:"uint",_visit:function(t){return vo._visit(this,t)}}),uint64:e=>({value:e,type:"uint64",_visit:function(t){return vo._visit(this,t)}}),float:e=>({value:e,type:"float",_visit:function(t){return vo._visit(this,t)}}),double:e=>({value:e,type:"double",_visit:function(t){return vo._visit(this,t)}}),string:e=>({value:e,type:"string",_visit:function(t){return vo._visit(this,t)}}),datetime:e=>({value:e,type:"datetime",_visit:function(t){return vo._visit(this,t)}}),datetimeRfc2822:e=>({value:e,type:"datetimeRfc2822",_visit:function(t){return vo._visit(this,t)}}),date:e=>({value:e,type:"date",_visit:function(t){return vo._visit(this,t)}}),base64:e=>({value:e,type:"base64",_visit:function(t){return vo._visit(this,t)}}),boolean:e=>({value:e,type:"boolean",_visit:function(t){return vo._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"int":return t.int(e.value);case"int64":return t.int64(e.value);case"uint":return t.uint(e.value);case"uint64":return t.uint64(e.value);case"float":return t.float(e.value);case"double":return t.double(e.value);case"string":return t.string(e.value);case"datetime":return t.datetime(e.value);case"datetimeRfc2822":return t.datetimeRfc2822(e.value);case"date":return t.date(e.value);case"base64":return t.base64(e.value);case"boolean":return t.boolean(e.value);default:return t._other(e)}}}});var NZa=h(()=>{"use strict"});var W$i=h(()=>{"use strict";OZa();BZa();PZa();DZa();RZa();kZa();FZa();NZa()});var jZa=h(()=>{"use strict";W$i()});var QZa=h(()=>{"use strict"});var zZa=h(()=>{"use strict"});var _vf,nbe,MZa=h(()=>{"use strict";_vf={RsaSha256:"rsa-sha256",RsaSha384:"rsa-sha384",RsaSha512:"rsa-sha512",EcdsaSha256:"ecdsa-sha256",EcdsaSha384:"ecdsa-sha384",EcdsaSha512:"ecdsa-sha512",Ed25519:"ed25519"},nbe={..._vf,_visit:(e,t)=>{switch(e){case nbe.RsaSha256:return t.rsaSha256();case nbe.RsaSha384:return t.rsaSha384();case nbe.RsaSha512:return t.rsaSha512();case nbe.EcdsaSha256:return t.ecdsaSha256();case nbe.EcdsaSha384:return t.ecdsaSha384();case nbe.EcdsaSha512:return t.ecdsaSha512();case nbe.Ed25519:return t.ed25519();default:return t._other()}}}});var LZa=h(()=>{"use strict"});var qvf,jh,UZa=h(()=>{"use strict";qvf={GenerallyAvailable:"GenerallyAvailable",Beta:"Beta",Deprecated:"Deprecated",Alpha:"Alpha",Preview:"Preview",Legacy:"Legacy"},jh={...qvf,_visit:(e,t)=>{switch(e){case jh.GenerallyAvailable:return t.generallyAvailable();case jh.Beta:return t.beta();case jh.Deprecated:return t.deprecated();case jh.Alpha:return t.alpha();case jh.Preview:return t.preview();case jh.Legacy:return t.legacy();default:return t._other()}}}});var VZa=h(()=>{"use strict"});var _Za=h(()=>{"use strict"});var qZa=h(()=>{"use strict"});var GZa=h(()=>{"use strict"});var WZa=h(()=>{"use strict"});var JY,HZa=h(()=>{"use strict";rc();JY={language:e=>({...e,type:"language",_visit:function(t){return JY._visit(this,t)}}),sdk:e=>({...e,type:"sdk",_visit:function(t){return JY._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"language":return t.language(e);case"sdk":return t.sdk(e);default:return t._other(e)}}}});var KZa=h(()=>{"use strict"});var JZa=h(()=>{"use strict"});var YZa=h(()=>{"use strict"});var XZa=h(()=>{"use strict"});var Gvf,H$i,ZZa=h(()=>{"use strict";Gvf={Data:"data",Protocol:"protocol"},H$i={...Gvf,_visit:(e,t)=>{switch(e){case H$i.Data:return t.data();case H$i.Protocol:return t.protocol();default:return t._other()}}}});var $Za=h(()=>{"use strict"});var e$a=h(()=>{"use strict"});var GU,t$a=h(()=>{"use strict";rc();GU={unknown:e=>({value:e,type:"unknown",_visit:function(t){return GU._visit(this,t)}}),full:e=>({...e,type:"full",_visit:function(t){return GU._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"unknown":return t.unknown(e.value);case"full":return t.full(e);default:return t._other(e)}}}});var WU,r$a=h(()=>{"use strict";rc();WU={withStreaming:e=>({...e,type:"withStreaming",_visit:function(t){return WU._visit(this,t)}}),withoutStreaming:e=>({value:e,type:"withoutStreaming",_visit:function(t){return WU._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"withStreaming":return t.withStreaming(e);case"withoutStreaming":return t.withoutStreaming(e.value);default:return t._other(e)}}}});var n$a=h(()=>{"use strict"});var i$a=h(()=>{"use strict"});var o$a=h(()=>{"use strict"});var s$a=h(()=>{"use strict"});var a$a=h(()=>{"use strict"});var c$a=h(()=>{"use strict"});var u$a=h(()=>{"use strict"});var l$a=h(()=>{"use strict"});var p$a=h(()=>{"use strict"});var f$a=h(()=>{"use strict"});var d$a=h(()=>{"use strict"});var m$a=h(()=>{"use strict"});var h$a=h(()=>{"use strict"});var g$a=h(()=>{"use strict"});var A$a=h(()=>{"use strict"});var y$a=h(()=>{"use strict"});var b$a=h(()=>{"use strict"});var E$a=h(()=>{"use strict"});var Wvf,VS,I$a=h(()=>{"use strict";Wvf={Get:"GET",Post:"POST",Put:"PUT",Patch:"PATCH",Delete:"DELETE",Head:"HEAD",Options:"OPTIONS",Trace:"TRACE"},VS={...Wvf,_visit:(e,t)=>{switch(e){case VS.Get:return t.get();case VS.Post:return t.post();case VS.Put:return t.put();case VS.Patch:return t.patch();case VS.Delete:return t.delete();case VS.Head:return t.head();case VS.Options:return t.options();case VS.Trace:return t.trace();default:return t._other()}}}});var v$a=h(()=>{"use strict"});var x$a=h(()=>{"use strict"});var C$a=h(()=>{"use strict"});var w$a=h(()=>{"use strict"});var S$a=h(()=>{"use strict"});var iy,T$a=h(()=>{"use strict";rc();iy={boolean:e=>({value:e,type:"boolean",_visit:function(t){return iy._visit(this,t)}}),string:e=>({value:e,type:"string",_visit:function(t){return iy._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"boolean":return t.boolean(e.value);case"string":return t.string(e.value);default:return t._other(e)}}}});var O$a=h(()=>{"use strict"});var B$a=h(()=>{"use strict"});var P$a=h(()=>{"use strict"});var D$a=h(()=>{"use strict"});var R$a=h(()=>{"use strict"});var Hvf,K$i,k$a=h(()=>{"use strict";Hvf={Json:"json",Form:"form"},K$i={...Hvf,_visit:(e,t)=>{switch(e){case K$i.Json:return t.json();case K$i.Form:return t.form();default:return t._other()}}}});var YY,F$a=h(()=>{"use strict";rc();YY={file:e=>({...e,type:"file",_visit:function(t){return YY._visit(this,t)}}),json:e=>({value:e,type:"json",_visit:function(t){return YY._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"file":return t.file(e);case"json":return t.json(e.value);default:return t._other(e)}}}});var N$a=h(()=>{"use strict"});var j$a=h(()=>{"use strict"});var Q$a=h(()=>{"use strict"});var z$a=h(()=>{"use strict"});var M$a=h(()=>{"use strict"});var L$a=h(()=>{"use strict"});var XY,U$a=h(()=>{"use strict";rc();XY={discriminated:e=>({...e,type:"discriminated",_visit:function(t){return XY._visit(this,t)}}),undiscriminated:e=>({...e,type:"undiscriminated",_visit:function(t){return XY._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"discriminated":return t.discriminated(e);case"undiscriminated":return t.undiscriminated(e);default:return t._other(e)}}}});var V$a=h(()=>{"use strict"});var _$a=h(()=>{"use strict"});var gw,q$a=h(()=>{"use strict";rc();gw={cursor:e=>({...e,type:"cursor",_visit:function(t){return gw._visit(this,t)}}),offset:e=>({...e,type:"offset",_visit:function(t){return gw._visit(this,t)}}),custom:e=>({...e,type:"custom",_visit:function(t){return gw._visit(this,t)}}),uri:e=>({...e,type:"uri",_visit:function(t){return gw._visit(this,t)}}),path:e=>({...e,type:"path",_visit:function(t){return gw._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"cursor":return t.cursor(e);case"offset":return t.offset(e);case"custom":return t.custom(e);case"uri":return t.uri(e);case"path":return t.path(e);default:return t._other(e)}}}});var G$a=h(()=>{"use strict"});var W$a=h(()=>{"use strict"});var H$a=h(()=>{"use strict"});var K$a=h(()=>{"use strict"});var Lu,J$a=h(()=>{"use strict";rc();Lu={int:e=>({...e,type:"int",_visit:function(t){return Lu._visit(this,t)}}),int64:e=>({...e,type:"int64",_visit:function(t){return Lu._visit(this,t)}}),uint:()=>({type:"uint",_visit:function(e){return Lu._visit(this,e)}}),uint64:()=>({type:"uint64",_visit:function(e){return Lu._visit(this,e)}}),float:()=>({type:"float",_visit:function(e){return Lu._visit(this,e)}}),double:e=>({...e,type:"double",_visit:function(t){return Lu._visit(this,t)}}),string:e=>({...e,type:"string",_visit:function(t){return Lu._visit(this,t)}}),datetime:()=>({type:"datetime",_visit:function(e){return Lu._visit(this,e)}}),datetimeRfc2822:()=>({type:"datetimeRfc2822",_visit:function(e){return Lu._visit(this,e)}}),date:()=>({type:"date",_visit:function(e){return Lu._visit(this,e)}}),base64:()=>({type:"base64",_visit:function(e){return Lu._visit(this,e)}}),boolean:e=>({...e,type:"boolean",_visit:function(t){return Lu._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"int":return t.int(e);case"int64":return t.int64(e);case"uint":return t.uint();case"uint64":return t.uint64();case"float":return t.float();case"double":return t.double(e);case"string":return t.string(e);case"datetime":return t.datetime();case"datetimeRfc2822":return t.datetimeRfc2822();case"date":return t.date();case"base64":return t.base64();case"boolean":return t.boolean(e);default:return t._other(e)}}}});var Y$a=h(()=>{"use strict"});var X$a=h(()=>{"use strict"});var Z$a=h(()=>{"use strict"});var x7,$$a=h(()=>{"use strict";rc();x7={octetStream:e=>({...e,type:"octetStream",_visit:function(t){return x7._visit(this,t)}}),multipart:e=>({...e,type:"multipart",_visit:function(t){return x7._visit(this,t)}}),json:e=>({...e,type:"json",_visit:function(t){return x7._visit(this,t)}}),formUrlEncoded:e=>({...e,type:"formUrlEncoded",_visit:function(t){return x7._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"octetStream":return t.octetStream(e);case"multipart":return t.multipart(e);case"json":return t.json(e);case"formUrlEncoded":return t.formUrlEncoded(e);default:return t._other(e)}}}});var QO,eec=h(()=>{"use strict";rc();QO={file:e=>({...e,type:"file",_visit:function(t){return QO._visit(this,t)}}),json:e=>({...e,type:"json",_visit:function(t){return QO._visit(this,t)}}),text:e=>({...e,type:"text",_visit:function(t){return QO._visit(this,t)}}),bytes:e=>({...e,type:"bytes",_visit:function(t){return QO._visit(this,t)}}),streamingSse:e=>({...e,type:"streamingSse",_visit:function(t){return QO._visit(this,t)}}),streamingText:e=>({...e,type:"streamingText",_visit:function(t){return QO._visit(this,t)}}),streamingJson:e=>({...e,type:"streamingJson",_visit:function(t){return QO._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"file":return t.file(e);case"json":return t.json(e);case"text":return t.text(e);case"bytes":return t.bytes(e);case"streamingSse":return t.streamingSse(e);case"streamingText":return t.streamingText(e);case"streamingJson":return t.streamingJson(e);default:return t._other(e)}}}});var zkt,tec=h(()=>{"use strict";rc();zkt={disabled:e=>({value:e,type:"disabled",_visit:function(t){return zkt._visit(this,t)}}),_visit:(e,t)=>e.type==="disabled"?t.disabled(e.value):t._other(e)}});var da,rec=h(()=>{"use strict";rc();da={primitive:e=>({...e,type:"primitive",_visit:function(t){return da._visit(this,t)}}),object:e=>({...e,type:"object",_visit:function(t){return da._visit(this,t)}}),array:e=>({...e,type:"array",_visit:function(t){return da._visit(this,t)}}),map:e=>({...e,type:"map",_visit:function(t){return da._visit(this,t)}}),optional:e=>({...e,type:"optional",_visit:function(t){return da._visit(this,t)}}),enum:e=>({...e,type:"enum",_visit:function(t){return da._visit(this,t)}}),reference:e=>({...e,type:"reference",_visit:function(t){return da._visit(this,t)}}),literal:e=>({...e,type:"literal",_visit:function(t){return da._visit(this,t)}}),oneOf:e=>({value:e,type:"oneOf",_visit:function(t){return da._visit(this,t)}}),nullable:e=>({...e,type:"nullable",_visit:function(t){return da._visit(this,t)}}),unknown:e=>({...e,type:"unknown",_visit:function(t){return da._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"primitive":return t.primitive(e);case"object":return t.object(e);case"array":return t.array(e);case"map":return t.map(e);case"optional":return t.optional(e);case"enum":return t.enum(e);case"reference":return t.reference(e);case"literal":return t.literal(e);case"oneOf":return t.oneOf(e.value);case"nullable":return t.nullable(e);case"unknown":return t.unknown(e);default:return t._other(e)}}}});var nec=h(()=>{"use strict"});var iec=h(()=>{"use strict"});var oec=h(()=>{"use strict"});var sec=h(()=>{"use strict"});var Kvf,_S,aec=h(()=>{"use strict";Kvf={Curl:"curl",Python:"python",Javascript:"javascript",Typescript:"typescript",Go:"go",Ruby:"ruby",Csharp:"csharp",Java:"java",Js:"js",Node:"node",Ts:"ts",Nodets:"nodets",Golang:"golang",Dotnet:"dotnet",Jvm:"jvm"},_S={...Kvf,_visit:(e,t)=>{switch(e){case _S.Curl:return t.curl();case _S.Python:return t.python();case _S.Javascript:return t.javascript();case _S.Typescript:return t.typescript();case _S.Go:return t.go();case _S.Ruby:return t.ruby();case _S.Csharp:return t.csharp();case _S.Java:return t.java();case _S.Js:return t.js();case _S.Node:return t.node();case _S.Ts:return t.ts();case _S.Nodets:return t.nodets();case _S.Golang:return t.golang();case _S.Dotnet:return t.dotnet();case _S.Jvm:return t.jvm();default:return t._other()}}}});var cec=h(()=>{"use strict"});var uec=h(()=>{"use strict"});var lec=h(()=>{"use strict"});var pec=h(()=>{"use strict"});var fec=h(()=>{"use strict"});var dec=h(()=>{"use strict"});var Jvf,Mkt,mec=h(()=>{"use strict";Jvf={Sha256:"sha256",Sha1:"sha1",Sha384:"sha384",Sha512:"sha512"},Mkt={...Jvf,_visit:(e,t)=>{switch(e){case Mkt.Sha256:return t.sha256();case Mkt.Sha1:return t.sha1();case Mkt.Sha384:return t.sha384();case Mkt.Sha512:return t.sha512();default:return t._other()}}}});var hec=h(()=>{"use strict"});var Lkt,gec=h(()=>{"use strict";rc();Lkt={queryParameter:e=>({...e,type:"queryParameter",_visit:function(t){return Lkt._visit(this,t)}}),_visit:(e,t)=>e.type==="queryParameter"?t.queryParameter(e):t._other(e)}});var Aec=h(()=>{"use strict"});var yec=h(()=>{"use strict"});var Yvf,J$i,bec=h(()=>{"use strict";Yvf={Get:"GET",Post:"POST"},J$i={...Yvf,_visit:(e,t)=>{switch(e){case J$i.Get:return t.get();case J$i.Post:return t.post();default:return t._other()}}}});var Eec=h(()=>{"use strict"});var Xvf,Iec,vec=h(()=>{"use strict";Xvf={Alphabetical:"alphabetical"},Iec={...Xvf,_visit:(e,t)=>e===Iec.Alphabetical?t.alphabetical():t._other()}});var Zvf,Ukt,xec=h(()=>{"use strict";Zvf={Body:"body",Timestamp:"timestamp",NotificationUrl:"notification-url",MessageId:"message-id"},Ukt={...Zvf,_visit:(e,t)=>{switch(e){case Ukt.Body:return t.body();case Ukt.Timestamp:return t.timestamp();case Ukt.NotificationUrl:return t.notificationUrl();case Ukt.MessageId:return t.messageId();default:return t._other()}}}});var Cec=h(()=>{"use strict"});var $vf,Vkt,wec=h(()=>{"use strict";$vf={Sha256:"sha256",Sha1:"sha1",Sha384:"sha384",Sha512:"sha512"},Vkt={...$vf,_visit:(e,t)=>{switch(e){case Vkt.Sha256:return t.sha256();case Vkt.Sha1:return t.sha1();case Vkt.Sha384:return t.sha384();case Vkt.Sha512:return t.sha512();default:return t._other()}}}});var exf,Y$i,Sec=h(()=>{"use strict";exf={Base64:"base64",Hex:"hex"},Y$i={...exf,_visit:(e,t)=>{switch(e){case Y$i.Base64:return t.base64();case Y$i.Hex:return t.hex();default:return t._other()}}}});var DNe,Tec=h(()=>{"use strict";rc();DNe={hmac:e=>({...e,type:"hmac",_visit:function(t){return DNe._visit(this,t)}}),asymmetric:e=>({...e,type:"asymmetric",_visit:function(t){return DNe._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"hmac":return t.hmac(e);case"asymmetric":return t.asymmetric(e);default:return t._other(e)}}}});var Oec=h(()=>{"use strict"});var txf,hCr,Bec=h(()=>{"use strict";txf={UnixSeconds:"unix-seconds",UnixMillis:"unix-millis",Iso8601:"iso8601"},hCr={...txf,_visit:(e,t)=>{switch(e){case hCr.UnixSeconds:return t.unixSeconds();case hCr.UnixMillis:return t.unixMillis();case hCr.Iso8601:return t.iso8601();default:return t._other()}}}});var Pec=h(()=>{"use strict"});var Dec=h(()=>{"use strict"});var Rec=h(()=>{"use strict"});var rxf,X$i,kec=h(()=>{"use strict";rxf={Client:"client",Server:"server"},X$i={...rxf,_visit:(e,t)=>{switch(e){case X$i.Client:return t.client();case X$i.Server:return t.server();default:return t._other()}}}});var Fec=h(()=>{"use strict"});var Nec=h(()=>{"use strict"});var jec=h(()=>{"use strict"});var Z$i=h(()=>{"use strict";QZa();zZa();MZa();LZa();UZa();VZa();_Za();qZa();GZa();WZa();HZa();KZa();JZa();YZa();XZa();ZZa();$Za();e$a();t$a();r$a();n$a();i$a();o$a();s$a();a$a();c$a();u$a();l$a();p$a();f$a();d$a();m$a();h$a();g$a();A$a();y$a();b$a();E$a();I$a();v$a();x$a();C$a();w$a();S$a();T$a();O$a();B$a();P$a();D$a();R$a();k$a();F$a();N$a();j$a();Q$a();z$a();M$a();L$a();U$a();V$a();_$a();q$a();G$a();W$a();H$a();K$a();J$a();Y$a();X$a();Z$a();$$a();eec();tec();rec();nec();iec();oec();sec();aec();cec();uec();lec();pec();fec();dec();mec();hec();gec();Aec();yec();bec();Eec();vec();xec();Cec();wec();Sec();Tec();Oec();Bec();Pec();Dec();Rec();kec();Fec();Nec();jec()});var Kd={};X(Kd,{AsymmetricAlgorithm:()=>nbe,Availability:()=>jh,CustomCodeSample:()=>JY,DiscriminatorContext:()=>H$i,EndpointExample:()=>GU,EndpointResponseExample:()=>WU,HttpMethod:()=>VS,LiteralSchemaValue:()=>iy,MultipartRequestPropertyEncoding:()=>K$i,MultipartSchema:()=>YY,OneOfSchema:()=>XY,Pagination:()=>gw,PrimitiveSchemaValue:()=>Lu,Request:()=>x7,Response:()=>QO,RetriesConfiguration:()=>zkt,Schema:()=>da,SupportedSdkLanguage:()=>_S,WebhookBodyHashAlgorithm:()=>Mkt,WebhookBodyHashLocation:()=>Lkt,WebhookHttpMethod:()=>J$i,WebhookPayloadBodySort:()=>Iec,WebhookPayloadComponent:()=>Ukt,WebhookSignatureAlgorithm:()=>Vkt,WebhookSignatureEncoding:()=>Y$i,WebhookSignatureVerification:()=>DNe,WebhookTimestampFormat:()=>hCr,WebsocketMessageOrigin:()=>X$i});var Qec=h(()=>{"use strict";Z$i()});var zec=h(()=>{"use strict"});var Mec=h(()=>{"use strict"});var Lec=h(()=>{"use strict"});var Uec=h(()=>{"use strict"});var Vec=h(()=>{"use strict"});var _ec=h(()=>{"use strict"});var qec=h(()=>{"use strict"});var Gec=h(()=>{"use strict"});var Wec=h(()=>{"use strict"});var Hec=h(()=>{"use strict"});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 etc=h(()=>{"use strict"});var ttc=h(()=>{"use strict"});var rtc=h(()=>{"use strict"});var ntc=h(()=>{"use strict"});var itc=h(()=>{"use strict"});var otc=h(()=>{"use strict"});var stc=h(()=>{"use strict"});var rL,atc=h(()=>{"use strict";rc();rL={discriminated:e=>({...e,type:"discriminated",_visit:function(t){return rL._visit(this,t)}}),undiscriminated:e=>({...e,type:"undiscriminated",_visit:function(t){return rL._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"discriminated":return t.discriminated(e);case"undiscriminated":return t.undiscriminated(e);default:return t._other(e)}}}});var ctc=h(()=>{"use strict"});var utc=h(()=>{"use strict"});var ltc=h(()=>{"use strict"});var ptc=h(()=>{"use strict"});var ftc=h(()=>{"use strict"});var Qi,dtc=h(()=>{"use strict";rc();Qi={int:e=>({...e,type:"int",_visit:function(t){return Qi._visit(this,t)}}),int64:e=>({...e,type:"int64",_visit:function(t){return Qi._visit(this,t)}}),uint:e=>({...e,type:"uint",_visit:function(t){return Qi._visit(this,t)}}),uint64:e=>({...e,type:"uint64",_visit:function(t){return Qi._visit(this,t)}}),float:e=>({...e,type:"float",_visit:function(t){return Qi._visit(this,t)}}),double:e=>({...e,type:"double",_visit:function(t){return Qi._visit(this,t)}}),string:e=>({...e,type:"string",_visit:function(t){return Qi._visit(this,t)}}),datetime:e=>({...e,type:"datetime",_visit:function(t){return Qi._visit(this,t)}}),datetimeRfc2822:e=>({...e,type:"datetimeRfc2822",_visit:function(t){return Qi._visit(this,t)}}),date:e=>({...e,type:"date",_visit:function(t){return Qi._visit(this,t)}}),base64:e=>({...e,type:"base64",_visit:function(t){return Qi._visit(this,t)}}),boolean:e=>({...e,type:"boolean",_visit:function(t){return Qi._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"int":return t.int(e);case"int64":return t.int64(e);case"uint":return t.uint(e);case"uint64":return t.uint64(e);case"float":return t.float(e);case"double":return t.double(e);case"string":return t.string(e);case"datetime":return t.datetime(e);case"datetimeRfc2822":return t.datetimeRfc2822(e);case"date":return t.date(e);case"base64":return t.base64(e);case"boolean":return t.boolean(e);default:return t._other(e)}}}});var mtc=h(()=>{"use strict"});var htc=h(()=>{"use strict"});var nF,gtc=h(()=>{"use strict";rc();nF={octetStream:e=>({...e,type:"octetStream",_visit:function(t){return nF._visit(this,t)}}),multipart:e=>({...e,type:"multipart",_visit:function(t){return nF._visit(this,t)}}),json:e=>({...e,type:"json",_visit:function(t){return nF._visit(this,t)}}),formUrlEncoded:e=>({...e,type:"formUrlEncoded",_visit:function(t){return nF._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"octetStream":return t.octetStream(e);case"multipart":return t.multipart(e);case"json":return t.json(e);case"formUrlEncoded":return t.formUrlEncoded(e);default:return t._other(e)}}}});var Cg,Atc=h(()=>{"use strict";rc();Cg={file:e=>({...e,type:"file",_visit:function(t){return Cg._visit(this,t)}}),json:e=>({...e,type:"json",_visit:function(t){return Cg._visit(this,t)}}),text:e=>({...e,type:"text",_visit:function(t){return Cg._visit(this,t)}}),bytes:e=>({...e,type:"bytes",_visit:function(t){return Cg._visit(this,t)}}),streamingSse:e=>({...e,type:"streamingSse",_visit:function(t){return Cg._visit(this,t)}}),streamingText:e=>({...e,type:"streamingText",_visit:function(t){return Cg._visit(this,t)}}),streamingJson:e=>({...e,type:"streamingJson",_visit:function(t){return Cg._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"file":return t.file(e);case"json":return t.json(e);case"text":return t.text(e);case"bytes":return t.bytes(e);case"streamingSse":return t.streamingSse(e);case"streamingText":return t.streamingText(e);case"streamingJson":return t.streamingJson(e);default:return t._other(e)}}}});var Lr,ytc=h(()=>{"use strict";rc();Lr={primitive:e=>({...e,type:"primitive",_visit:function(t){return Lr._visit(this,t)}}),object:e=>({...e,type:"object",_visit:function(t){return Lr._visit(this,t)}}),array:e=>({...e,type:"array",_visit:function(t){return Lr._visit(this,t)}}),map:e=>({...e,type:"map",_visit:function(t){return Lr._visit(this,t)}}),optional:e=>({...e,type:"optional",_visit:function(t){return Lr._visit(this,t)}}),enum:e=>({...e,type:"enum",_visit:function(t){return Lr._visit(this,t)}}),reference:e=>({...e,type:"reference",_visit:function(t){return Lr._visit(this,t)}}),literal:e=>({...e,type:"literal",_visit:function(t){return Lr._visit(this,t)}}),oneOf:e=>({value:e,type:"oneOf",_visit:function(t){return Lr._visit(this,t)}}),nullable:e=>({...e,type:"nullable",_visit:function(t){return Lr._visit(this,t)}}),unknown:e=>({...e,type:"unknown",_visit:function(t){return Lr._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"primitive":return t.primitive(e);case"object":return t.object(e);case"array":return t.array(e);case"map":return t.map(e);case"optional":return t.optional(e);case"enum":return t.enum(e);case"reference":return t.reference(e);case"literal":return t.literal(e);case"oneOf":return t.oneOf(e.value);case"nullable":return t.nullable(e);case"unknown":return t.unknown(e);default:return t._other(e)}}}});var btc=h(()=>{"use strict"});var Etc=h(()=>{"use strict"});var Itc=h(()=>{"use strict"});var vtc=h(()=>{"use strict"});var xtc=h(()=>{"use strict"});var Ctc=h(()=>{"use strict"});var wtc=h(()=>{"use strict"});var $$i=h(()=>{"use strict";zec();Mec();Lec();Uec();Vec();_ec();qec();Gec();Wec();Hec();Kec();Jec();Yec();Xec();Zec();$ec();etc();ttc();rtc();ntc();itc();otc();stc();atc();ctc();utc();ltc();ptc();ftc();dtc();mtc();htc();gtc();Atc();ytc();btc();Etc();Itc();vtc();xtc();Ctc();wtc()});var Stc=h(()=>{"use strict";$$i()});var Ttc=h(()=>{"use strict";TZa();G$i();jZa();W$i();Qec();Z$i();Stc();$$i()});var rc=h(()=>{"use strict";Ttc()});var C7,Otc,_kt,eeo,s9b,teo=h(()=>{"use strict";C7={Debug:"debug",Info:"info",Warn:"warn",Error:"error"},Otc={[C7.Debug]:1,[C7.Info]:2,[C7.Warn]:3,[C7.Error]:4},_kt=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)}},eeo=class{level;logger;silent;constructor(t){this.level=Otc[t.level],this.logger=t.logger,this.silent=t.silent}shouldLog(t){return!this.silent&&this.level<=Otc[t]}isDebug(){return this.shouldLog(C7.Debug)}debug(t,...r){this.isDebug()&&this.logger.debug(t,...r)}isInfo(){return this.shouldLog(C7.Info)}info(t,...r){this.isInfo()&&this.logger.info(t,...r)}isWarn(){return this.shouldLog(C7.Warn)}warn(t,...r){this.isWarn()&&this.logger.warn(t,...r)}isError(){return this.shouldLog(C7.Error)}error(t,...r){this.isError()&&this.logger.error(t,...r)}},s9b=new eeo({level:C7.Info,logger:new _kt,silent:!0})});var Btc,Ptc=h(()=>{"use strict";teo();(function(e){e.LogLevel=C7,e.ConsoleLogger=_kt})(Btc||(Btc={}))});var Dtc=h(()=>{"use strict";Ptc()});var Rtc=h(()=>{"use strict";Dtc()});var ktc=h(()=>{"use strict"});var Ftc=h(()=>{"use strict";teo()});var Ntc=h(()=>{"use strict"});var Uu,Aw=h(()=>{"use strict";Uu={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 Jd(e,t){return`Expected ${t}. Received ${sxf(e)}.`}function sxf(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 iF=h(()=>{"use strict"});function qS(e){return{...e,json:jtc(e.json),parse:jtc(e.parse)}}function jtc(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(`
174
+ `)),{ok:!0,value:t}):n}}var HY=h(()=>{"use strict"});function YIr(e){return e.path.length===0?e.message:`${e.path.join(" -> ")}: ${e.message}`}var YYi=h(()=>{"use strict"});var GKe,XYi=h(()=>{"use strict";YYi();GKe=class extends Error{errors;constructor(t){super(t.map(YIr).join("; ")),this.errors=t,Object.setPrototypeOf(this,new.target.prototype),this.name=this.constructor.name}}});var WKe,ZYi=h(()=>{"use strict";YYi();WKe=class extends Error{errors;constructor(t){super(t.map(YIr).join("; ")),this.errors=t,Object.setPrototypeOf(this,new.target.prototype),this.name=this.constructor.name}}});function Nm(e){return{nullable:()=>Bvf(e),optional:()=>$Yi(e),optionalNullable:()=>Pvf(e),transform:t=>eXi(e,t),parseOrThrow:(t,r)=>{let n=e.parse(t,r);if(n.ok)return n.value;throw new WKe(n.errors)},jsonOrThrow:(t,r)=>{let n=e.json(t,r);if(n.ok)return n.value;throw new GKe(n.errors)}}}function Bvf(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:()=>Mu.NULLABLE};return{...t,...Nm(t)}}function $Yi(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:()=>Mu.OPTIONAL};return{...t,...Nm(t)}}function Pvf(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:()=>Mu.OPTIONAL_NULLABLE};return{...t,...Nm(t)}}function eXi(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,...Nm(r)}}var eYa=h(()=>{"use strict";hw();XYi();ZYi()});var Rj=h(()=>{"use strict";eYa();XYi();ZYi()});function tYa(){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:Hd(t,"bigint | number")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="bigint"?{ok:!1,errors:[{path:r,message:Hd(t,"bigint")}]}:{ok:!0,value:t},getType:()=>Mu.BIGINT};return{...MS(e),...Nm(e)}}var rYa=h(()=>{"use strict";hw();rF();HY();Rj()});var nYa=h(()=>{"use strict";rYa()});function iYa(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="string"?{ok:!1,errors:[{path:r,message:Hd(t,"string")}]}:Dvf.test(t)?{ok:!0,value:new Date(t)}:{ok:!1,errors:[{path:r,message:Hd(t,"ISO 8601 date string")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>t instanceof Date?{ok:!0,value:t.toISOString()}:{ok:!1,errors:[{path:r,message:Hd(t,"Date object")}]},getType:()=>Mu.DATE};return{...MS(e),...Nm(e)}}var Dvf,oYa=h(()=>{"use strict";hw();rF();HY();Rj();Dvf=/^([+-]?\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 sYa=h(()=>{"use strict";oYa()});function LS(e,t){return()=>{let r={parse:t,json:t,getType:()=>e};return{...MS(r),...Nm(r)}}}var KY=h(()=>{"use strict";Rj();HY()});function XIr(e){let t=new Set(e);return LS(Mu.ENUM,(n,{allowUnrecognizedEnumValues:i,breadcrumbsPrefix:o=[]}={})=>typeof n!="string"?{ok:!1,errors:[{path:o,message:Hd(n,"string")}]}:!t.has(n)&&!i?{ok:!1,errors:[{path:o,message:Hd(n,"enum")}]}:{ok:!0,value:n})()}var aYa=h(()=>{"use strict";hw();KY();rF()});var tXi=h(()=>{"use strict";aYa()});function cYa(e){let t=rXi(e);return{...t,...Nm(t)}}function rXi(e){return{parse:(t,r)=>HKe(e).parse(t,r),json:(t,r)=>HKe(e).json(t,r),getType:()=>HKe(e).getType()}}function HKe(e){let t=e;return t.__zurg_memoized==null&&(t.__zurg_memoized=e()),t.__zurg_memoized}var nXi=h(()=>{"use strict";Rj()});function iXi(e){return Object.entries(e)}var uYa=h(()=>{"use strict"});function Ikt(e,t){let r=new Set(t);return Object.entries(e).reduce((n,[i,o])=>(r.has(i)&&(n[i]=o),n),{})}var oXi=h(()=>{"use strict"});function xue(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return t===null?!0:Object.getPrototypeOf(t)===null}var vkt=h(()=>{"use strict"});function xkt(e){return Object.keys(e)}var sXi=h(()=>{"use strict"});function lYa(e,t){let r=[],n=[];for(let i of e)t(i)?r.push(i):n.push(i);return[r,n]}var pYa=h(()=>{"use strict"});function v7(e){return{withParsedProperties:t=>aXi(e,t)}}function aXi(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(Rvf.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(!xue(n))return{ok:!1,errors:[{path:i?.breadcrumbsPrefix??[],message:Hd(n,"object")}]};let o=new Set(Object.keys(t)),s=Ikt(n,Object.keys(n).filter(a=>!o.has(a)));return e.json(s,i)},getType:()=>e.getType()};return{...r,...Nm(r),...v7(r)}}var Rvf,fYa=h(()=>{"use strict";oXi();rF();vkt();Rj();Rvf=Object.prototype.hasOwnProperty});var Ckt=h(()=>{"use strict";fYa()});function dYa(e,t){return{rawKey:e,valueSchema:t,isProperty:!0}}function Cue(e){return e.isProperty}var cXi=h(()=>{"use strict"});function ZIr(e){let t;function r(){if(t==null){t={};for(let[d,f]of iXi(e)){let m=Cue(f)?f.rawKey:d,g=Cue(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 iXi(e)){let m=Cue(f)?f.rawKey:d,g=Cue(f)?f.valueSchema:f;Fvf(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])=>Cue(f)?f.rawKey:d),_getParsedProperties:()=>xkt(e),parse:(d,f)=>{let m=f?.breadcrumbsPrefix??[];return mYa({value:d,requiredKeys:a(),requiredKeysSet:u(),getProperty:g=>{let A=r()[g];if(A!=null)return{transformedKey:A.parsedKey,transform:y=>{let E=[...m,g];return A.valueSchema.parse(y,{...f,breadcrumbsPrefix:E})}}},unrecognizedObjectKeys:f?.unrecognizedObjectKeys,skipValidation:f?.skipValidation,breadcrumbsPrefix:m,omitUndefined:f?.omitUndefined})},json:(d,f)=>{let m=f?.breadcrumbsPrefix??[];return mYa({value:d,requiredKeys:c(),requiredKeysSet:l(),getProperty:g=>{let A=e[g];if(A!=null)return Cue(A)?{transformedKey:A.rawKey,transform:y=>{let E=[...m,g];return A.valueSchema.json(y,{...f,breadcrumbsPrefix:E})}}:{transformedKey:g,transform:y=>{let E=[...m,g];return A.json(y,{...f,breadcrumbsPrefix:E})}}},unrecognizedObjectKeys:f?.unrecognizedObjectKeys,skipValidation:f?.skipValidation,breadcrumbsPrefix:m,omitUndefined:f?.omitUndefined})},getType:()=>Mu.OBJECT};return{...MS(p),...Nm(p),...v7(p),...SNe(p)}}function mYa({value:e,requiredKeys:t,requiredKeysSet:r,getProperty:n,unrecognizedObjectKeys:i="fail",skipValidation:o=!1,breadcrumbsPrefix:s=[]}){if(!xue(e))return{ok:!1,errors:[{path:s,message:Hd(e,"object")}]};let a=t.length,c=[],u={};for(let l in e){if(!kvf.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 SNe(e){return{extend:t=>{let r={_getParsedProperties:()=>[...e._getParsedProperties(),...t._getParsedProperties()],_getRawProperties:()=>[...e._getRawProperties(),...t._getRawProperties()],parse:(n,i)=>hYa({extensionKeys:t._getRawProperties(),value:n,transformBase:o=>e.parse(o,i),transformExtension:o=>t.parse(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),json:(n,i)=>hYa({extensionKeys:t._getParsedProperties(),value:n,transformBase:o=>e.json(o,i),transformExtension:o=>t.json(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),getType:()=>Mu.OBJECT};return{...r,...Nm(r),...v7(r),...SNe(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:()=>Mu.OBJECT};return{...n,...Nm(n),...v7(n),...SNe(n)}}}}function hYa({extensionKeys:e,value:t,transformBase:r,transformExtension:n,breadcrumbsPrefix:i=[]}){if(!xue(t))return{ok:!1,errors:[{path:i,message:Hd(t,"object")}]};let o=new Set(e),[s,a]=lYa(xkt(t),l=>o.has(l)),c=r(Ikt(t,a)),u=n(Ikt(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 Fvf(e){return!Nvf(e)}function Nvf(e){switch(e.getType()){case Mu.ANY:case Mu.UNKNOWN:case Mu.OPTIONAL:case Mu.OPTIONAL_NULLABLE:return!0;default:return!1}}var kvf,uXi=h(()=>{"use strict";hw();uYa();oXi();rF();vkt();sXi();HY();pYa();Ckt();Rj();cXi();kvf=Object.prototype.hasOwnProperty});function gYa(e){return ZIr(e)}var AYa=h(()=>{"use strict";uXi()});var lXi=h(()=>{"use strict";uXi();AYa();cXi()});function yYa(e){let t={...rXi(e),_getRawProperties:()=>HKe(e)._getRawProperties(),_getParsedProperties:()=>HKe(e)._getParsedProperties()};return{...t,...Nm(t),...v7(t),...SNe(t)}}var bYa=h(()=>{"use strict";lXi();Ckt();Rj();nXi()});var EYa=h(()=>{"use strict";nXi();bYa()});function $Ir(e){let t={parse:(r,n)=>IYa(r,(i,o)=>e.parse(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),json:(r,n)=>IYa(r,(i,o)=>e.json(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),getType:()=>Mu.LIST};return{...MS(t),...Nm(t)}}function IYa(e,t){if(!Array.isArray(e))return{ok:!1,errors:[{message:Hd(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 vYa=h(()=>{"use strict";hw();rF();HY();Rj()});var pXi=h(()=>{"use strict";vYa()});function xYa(e){return LS(Mu.BOOLEAN_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:Hd(r,`${e.toString()}`)}]})()}var CYa=h(()=>{"use strict";hw();KY();rF()});function wYa(e){return LS(Mu.STRING_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:Hd(r,`"${e}"`)}]})()}var SYa=h(()=>{"use strict";hw();KY();rF()});var TYa=h(()=>{"use strict";CYa();SYa()});var OYa,BYa=h(()=>{"use strict";hw();KY();OYa=LS(Mu.ANY,e=>({ok:!0,value:e}))});var PYa,DYa=h(()=>{"use strict";hw();KY();rF();PYa=LS(Mu.BOOLEAN,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="boolean"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Hd(e,"boolean")}]})});var RYa,kYa=h(()=>{"use strict";hw();KY();RYa=LS(Mu.NEVER,(e,{breadcrumbsPrefix:t=[]}={})=>({ok:!1,errors:[{path:t,message:"Expected never"}]}))});var FYa,NYa=h(()=>{"use strict";hw();KY();rF();FYa=LS(Mu.NUMBER,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="number"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Hd(e,"number")}]})});var jYa,QYa=h(()=>{"use strict";hw();KY();rF();jYa=LS(Mu.STRING,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="string"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Hd(e,"string")}]})});var zYa,MYa=h(()=>{"use strict";hw();KY();zYa=LS(Mu.UNKNOWN,e=>({ok:!0,value:e}))});var LYa=h(()=>{"use strict";BYa();DYa();kYa();NYa();QYa();MYa()});function VYa(e,t){let r={parse:(n,i)=>UYa({value:n,isKeyNumeric:e.getType()===Mu.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)=>UYa({value:n,isKeyNumeric:e.getType()===Mu.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:()=>Mu.RECORD};return{...MS(r),...Nm(r)}}function UYa({value:e,isKeyNumeric:t,transformKey:r,transformValue:n,breadcrumbsPrefix:i=[]}){if(!xue(e))return{ok:!1,errors:[{path:i,message:Hd(e,"object")}]};let o={},s=[];for(let a in e){if(!jvf.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 jvf,_Ya=h(()=>{"use strict";hw();rF();vkt();HY();Rj();jvf=Object.prototype.hasOwnProperty});var qYa=h(()=>{"use strict";_Ya()});function GYa(e){let t=$Ir(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:Hd(n,"Set")}]},getType:()=>Mu.SET};return{...MS(r),...Nm(r)}}var WYa=h(()=>{"use strict";hw();rF();HY();pXi();Rj()});var HYa=h(()=>{"use strict";WYa()});function JYa(e){let t={parse:(r,n)=>KYa((i,o)=>i.parse(r,o),e,n),json:(r,n)=>KYa((i,o)=>i.json(r,o),e,n),getType:()=>Mu.UNDISCRIMINATED_UNION};return{...MS(t),...Nm(t)}}function KYa(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 YYa=h(()=>{"use strict";hw();HY();Rj()});var XYa=h(()=>{"use strict";YYa()});function ZYa(e,t){return{parsedDiscriminant:e,rawDiscriminant:t}}var $Ya=h(()=>{"use strict"});function tXa(e,t){let r=typeof e=="string"?e:e.rawDiscriminant,n=typeof e=="string"?e:e.parsedDiscriminant,i=XIr(xkt(t)),o={parse:(s,a)=>eXa({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)=>eXa({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:()=>Mu.UNION};return{...MS(o),...Nm(o),...v7(o)}}function eXa({value:e,discriminant:t,transformedDiscriminant:r,transformDiscriminantValue:n,getAdditionalPropertiesSchema:i,allowUnrecognizedUnionMembers:o=!1,transformAdditionalProperties:s,breadcrumbsPrefix:a=[]}){if(!xue(e))return{ok:!1,errors:[{path:a,message:Hd(e,"object")}]};let c=e[t],u={};for(let f in e)Qvf.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 Qvf,rXa=h(()=>{"use strict";hw();rF();vkt();sXi();HY();tXi();Ckt();Rj();Qvf=Object.prototype.hasOwnProperty});var nXa=h(()=>{"use strict";$Ya();rXa()});var iXa=h(()=>{"use strict";nYa();sYa();tXi();EYa();pXi();TYa();lXi();Ckt();LYa();qYa();Rj();HYa();XYa();nXa()});var xe={};X(xe,{JsonError:()=>GKe,ParseError:()=>WKe,any:()=>OYa,bigint:()=>tYa,boolean:()=>PYa,booleanLiteral:()=>xYa,date:()=>iYa,discriminant:()=>ZYa,enum_:()=>XIr,getObjectLikeUtils:()=>v7,getObjectUtils:()=>SNe,getSchemaUtils:()=>Nm,isProperty:()=>Cue,lazy:()=>cYa,lazyObject:()=>yYa,list:()=>$Ir,never:()=>RYa,number:()=>FYa,object:()=>ZIr,objectWithoutOptionalProperties:()=>gYa,optional:()=>$Yi,property:()=>dYa,record:()=>VYa,set:()=>GYa,string:()=>jYa,stringLiteral:()=>wYa,transform:()=>eXi,undiscriminatedUnion:()=>JYa,union:()=>tXa,unknown:()=>zYa,withParsedProperties:()=>aXi});var oXa=h(()=>{"use strict";iXa()});var sXa=h(()=>{"use strict"});var $r=h(()=>{"use strict";YJa();XJa();ZJa();oXa();sXa()});var evr,fXi=h(()=>{"use strict";$r();evr=xe.string()});var tvr,dXi=h(()=>{"use strict";$r();tvr=xe.enum_(["openai","anthropic","aws-bedrock"])});var rvr,mXi=h(()=>{"use strict";$r();fXi();dXi();rvr=xe.object({provider:tvr,model:evr})});var hXi=h(()=>{"use strict";mXi();fXi();dXi()});var gXi={};X(gXi,{AiServicesSchema:()=>rvr,ModelName:()=>evr,ModelProvider:()=>tvr});var aXa=h(()=>{"use strict";hXi()});var Wye,wkt=h(()=>{"use strict";$r();Wye=xe.object({generate:xe.boolean().optional(),upgrade:xe.boolean().optional(),preview:xe.boolean().optional(),verify:xe.boolean().optional()})});var AXi=h(()=>{"use strict";wkt()});var yXi={};X(yXi,{AutomationSchema:()=>Wye});var cXa=h(()=>{"use strict";AXi()});var f0,tL=h(()=>{"use strict";$r();f0=xe.object({docs:xe.string().optional()})});var KKe,nvr=h(()=>{"use strict";$r();tL();KKe=xe.object({scheme:xe.string()}).extend(f0)});var ivr,bXi=h(()=>{"use strict";$r();nvr();ivr=xe.undiscriminatedUnion([xe.string(),KKe])});var ovr,EXi=h(()=>{"use strict";$r();tL();bXi();ovr=xe.object({any:xe.list(ivr)}).extend(f0)});var svr,IXi=h(()=>{"use strict";$r();svr=xe.object({})});var avr,vXi=h(()=>{"use strict";$r();tL();IXi();avr=xe.object({"endpoint-security":svr}).extend(f0)});var JKe,cvr=h(()=>{"use strict";$r();EXi();nvr();vXi();JKe=xe.undiscriminatedUnion([xe.string(),KKe,ovr,avr])});var Hye,Skt=h(()=>{"use strict";$r();Hye=xe.object({name:xe.string().optional()})});var YKe,uvr=h(()=>{"use strict";$r();YKe=xe.object({env:xe.string().optional()})});var TNe,lvr=h(()=>{"use strict";$r();Skt();uvr();TNe=xe.object({omit:xe.boolean().optional()}).extend(YKe).extend(Hye)});var pvr,xXi=h(()=>{"use strict";$r();tL();lvr();pvr=xe.object({scheme:xe.stringLiteral("basic"),username:TNe.optional(),password:TNe.optional()}).extend(f0)});var fvr,CXi=h(()=>{"use strict";$r();fvr=xe.object({"response-property":xe.string(),"header-name":xe.string(),"value-prefix":xe.string().optional()})});var dvr,wXi=h(()=>{"use strict";$r();CXi();dvr=xe.object({endpoint:xe.string(),"expiry-response-property":xe.string().optional(),"authenticated-request-headers":xe.list(fvr).optional()})});var mvr,SXi=h(()=>{"use strict";$r();wXi();mvr=xe.undiscriminatedUnion([xe.string(),dvr])});var hvr,TXi=h(()=>{"use strict";$r();tL();SXi();hvr=xe.object({scheme:xe.stringLiteral("bearer"),"get-token":mvr}).extend(f0)});var gvr,OXi=h(()=>{"use strict";$r();tL();lvr();gvr=xe.object({scheme:xe.stringLiteral("bearer"),token:TNe.optional()}).extend(f0)});var Avr,BXi=h(()=>{"use strict";$r();TXi();OXi();Avr=xe.undiscriminatedUnion([gvr,hvr])});var yvr,PXi=h(()=>{"use strict";$r();tL();Skt();uvr();yvr=xe.object({header:xe.string(),type:xe.string().optional(),prefix:xe.string().optional()}).extend(YKe).extend(Hye).extend(f0)});var bvr,DXi=h(()=>{"use strict";$r();bvr=xe.string()});var Evr,RXi=h(()=>{"use strict";$r();Evr=xe.object({"client-id":xe.string().optional(),"client-secret":xe.string().optional(),scopes:xe.string().optional()})});var Ivr,kXi=h(()=>{"use strict";$r();Ivr=xe.object({"access-token":xe.string().optional(),"expires-in":xe.string().optional(),"refresh-token":xe.string().optional()})});var vvr,FXi=h(()=>{"use strict";$r();RXi();kXi();vvr=xe.object({endpoint:xe.string(),"request-properties":Evr.optional(),"response-properties":Ivr.optional()})});var xvr,NXi=h(()=>{"use strict";$r();xvr=xe.object({"refresh-token":xe.string()})});var Cvr,jXi=h(()=>{"use strict";$r();Cvr=xe.object({"access-token":xe.string().optional(),"expires-in":xe.string().optional(),"refresh-token":xe.string().optional()})});var wvr,QXi=h(()=>{"use strict";$r();NXi();jXi();wvr=xe.object({endpoint:xe.string(),"request-properties":xvr.optional(),"response-properties":Cvr.optional()})});var Svr,zXi=h(()=>{"use strict";$r();tL();DXi();FXi();QXi();Svr=xe.object({scheme:xe.stringLiteral("oauth"),type:xe.stringLiteral("client-credentials"),scopes:xe.list(bvr).optional(),"client-id-env":xe.string().optional(),"client-secret-env":xe.string().optional(),"token-prefix":xe.string().optional(),"token-header":xe.string().optional(),"get-token":vvr,"refresh-token":wvr.optional()}).extend(f0)});var Kye,Tkt=h(()=>{"use strict";$r();xXi();BXi();PXi();zXi();Kye=xe.undiscriminatedUnion([Svr,yvr,pvr,Avr])});var MXi=h(()=>{"use strict";bXi();EXi();cvr();Tkt();nvr();DXi();lvr();xXi();BXi();vXi();IXi();PXi();CXi();TXi();SXi();wXi();RXi();kXi();FXi();QXi();NXi();jXi();zXi();OXi();uvr()});var LXi={};X(LXi,{AnyAuthItem:()=>ivr,AnyAuthSchemesSchema:()=>ovr,ApiAuthSchema:()=>JKe,AuthSchemeDeclarationSchema:()=>Kye,AuthSchemeReferenceSchema:()=>KKe,AuthScope:()=>bvr,AuthVariable:()=>TNe,BasicAuthSchemeSchema:()=>pvr,BearerAuthSchemeSchema:()=>Avr,EndpointSecuritySchema:()=>avr,EndpointSecuritySchemaDetails:()=>svr,HeaderAuthSchemeSchema:()=>yvr,InferredAuthenticatedRequestHeader:()=>fvr,InferredBearerAuthSchema:()=>hvr,InferredGetTokenEndpointSchema:()=>mvr,InferredGetTokenEndpointSchemaObject:()=>dvr,OAuthAccessTokenRequestPropertiesSchema:()=>Evr,OAuthAccessTokenResponsePropertiesSchema:()=>Ivr,OAuthGetTokenEndpointSchema:()=>vvr,OAuthRefreshTokenEndpointSchema:()=>wvr,OAuthRefreshTokenRequestPropertiesSchema:()=>xvr,OAuthRefreshTokenResponsePropertiesSchema:()=>Cvr,OAuthSchemeSchema:()=>Svr,TokenBearerAuthSchema:()=>gvr,WithEnvironmentVariable:()=>YKe});var uXa=h(()=>{"use strict";MXi()});var XKe,Tvr=h(()=>{"use strict";$r();XKe=xe.enum_(["in-development","pre-release","deprecated","generally-available"])});var Ovr,UXi=h(()=>{"use strict";$r();Tvr();Ovr=xe.object({status:XKe,message:xe.string().optional()})});var Bvr,VXi=h(()=>{"use strict";$r();UXi();Tvr();Bvr=xe.undiscriminatedUnion([XKe,Ovr])});var _Xi=h(()=>{"use strict";UXi();Tvr();VXi()});var qXi={};X(qXi,{AvailabilitySchema:()=>Ovr,AvailabilityStatusSchema:()=>XKe,AvailabilityUnionSchema:()=>Bvr});var lXa=h(()=>{"use strict";_Xi()});var Jye,Okt=h(()=>{"use strict";$r();Jye=xe.object({audiences:xe.list(xe.string()).optional()})});var Pvr,GXi=h(()=>{"use strict";$r();VXi();Pvr=xe.object({availability:Bvr.optional()})});var WXi=h(()=>{"use strict";Okt();GXi();tL();Skt()});var HXi={};X(HXi,{WithAudiences:()=>Jye,WithAvailability:()=>Pvr,WithDocsSchema:()=>f0,WithName:()=>Hye});var pXa=h(()=>{"use strict";WXi()});var Dvr,KXi=h(()=>{"use strict";$r();Dvr=xe.object({type:xe.string()})});var Rvr,JXi=h(()=>{"use strict";$r();KXi();Rvr=xe.object({proto:Dvr.optional()})});var YXi=h(()=>{"use strict";JXi();KXi()});var XXi={};X(XXi,{EncodingSchema:()=>Rvr,ProtobufTypeSchema:()=>Dvr});var fXa=h(()=>{"use strict";YXi()});var ZKe,kvr=h(()=>{"use strict";$r();ZKe=xe.object({id:xe.string(),default:xe.string().optional(),values:xe.list(xe.string()).optional()})});var Fvr,ZXi=h(()=>{"use strict";$r();Okt();tL();kvr();Fvr=xe.object({urls:xe.record(xe.string(),xe.string()),"url-templates":xe.record(xe.string(),xe.string()).optional(),"default-urls":xe.record(xe.string(),xe.string()).optional(),variables:xe.record(xe.string(),xe.list(ZKe)).optional()}).extend(Jye).extend(f0)});var Nvr,$Xi=h(()=>{"use strict";$r();Okt();tL();kvr();Nvr=xe.object({url:xe.string(),"default-url":xe.string().optional(),"url-template":xe.string().optional(),variables:xe.list(ZKe).optional()}).extend(Jye).extend(f0)});var jvr,eZi=h(()=>{"use strict";$r();ZXi();$Xi();jvr=xe.undiscriminatedUnion([xe.string(),Nvr,Fvr])});var Qvr,tZi=h(()=>{"use strict";$r();eZi();Qvr=xe.object({"default-url":xe.string().optional(),"default-environment":xe.string().optional(),environments:xe.record(xe.string(),jvr).optional()})});var rZi=h(()=>{"use strict";eZi();ZXi();kvr();$Xi();tZi()});var nZi={};X(nZi,{EnvironmentSchema:()=>jvr,MultipleBaseUrlsEnvironmentSchema:()=>Fvr,ServerVariableSchema:()=>ZKe,SingleBaseUrlEnvironmentSchema:()=>Nvr,WithEnvironmentsSchema:()=>Qvr});var dXa=h(()=>{"use strict";rZi()});var zvr,iZi=h(()=>{"use strict";$r();zvr=xe.object({minItems:xe.number().optional(),maxItems:xe.number().optional()})});var Mvr,oZi=h(()=>{"use strict";$r();Mvr=xe.object({minProperties:xe.number().optional(),maxProperties:xe.number().optional()})});var Lvr,sZi=h(()=>{"use strict";$r();Lvr=xe.object({min:xe.number().optional(),max:xe.number().optional(),exclusiveMin:xe.boolean().optional(),exclusiveMax:xe.boolean().optional(),multipleOf:xe.number().optional()})});var Uvr,aZi=h(()=>{"use strict";$r();Uvr=xe.object({minLength:xe.number().optional(),maxLength:xe.number().optional(),pattern:xe.string().optional(),format:xe.string().optional()})});var Vvr,cZi=h(()=>{"use strict";$r();iZi();oZi();sZi();aZi();Vvr=xe.undiscriminatedUnion([Uvr,Lvr,zvr,Mvr])});var _vr,uZi=h(()=>{"use strict";$r();GXi();tL();JXi();cZi();_vr=xe.object({default:xe.unknown().optional(),"client-default":xe.unknown().optional(),encoding:Rvr.optional(),validation:Vvr.optional()}).extend(f0).extend(Pvr)});var qvr,lZi=h(()=>{"use strict";$r();Okt();Skt();uZi();qvr=xe.object({type:xe.string()}).extend(_vr).extend(Hye).extend(Jye)});var Gvr,pZi=h(()=>{"use strict";$r();lZi();Gvr=xe.object({env:xe.string().optional()}).extend(qvr)});var Wvr,fZi=h(()=>{"use strict";$r();pZi();Wvr=xe.undiscriminatedUnion([xe.string(),Gvr])});var $Ke,Hvr=h(()=>{"use strict";fZi();$Ke=Wvr});var Kvr,dZi=h(()=>{"use strict";$r();Hvr();Kvr=xe.object({headers:xe.record(xe.string(),$Ke).optional()})});var mZi=h(()=>{"use strict";dZi()});var hZi={};X(hZi,{WithHeadersSchema:()=>Kvr});var mXa=h(()=>{"use strict";mZi()});var gZi=h(()=>{"use strict";Hvr();fZi();pZi()});var AZi={};X(AZi,{HttpHeaderSchema:()=>$Ke,TypeReferenceDeclarationWithEnvOverride:()=>Wvr,TypeReferenceDeclarationWithEnvOverrideSchema:()=>Gvr});var hXa=h(()=>{"use strict";gZi()});var yZi=h(()=>{"use strict";uZi();lZi()});var bZi={};X(bZi,{BaseTypeReferenceSchema:()=>_vr,TypeReferenceDeclarationWithName:()=>qvr});var gXa=h(()=>{"use strict";yZi()});var EZi=h(()=>{"use strict";iZi();oZi();sZi();aZi();cZi()});var IZi={};X(IZi,{ListValidationSchema:()=>zvr,MapValidationSchema:()=>Mvr,NumberValidationSchema:()=>Lvr,StringValidationSchema:()=>Uvr,ValidationSchema:()=>Vvr});var AXa=h(()=>{"use strict";EZi()});var yXa=h(()=>{"use strict";uXa();MXi();lXa();_Xi();pXa();WXi();fXa();YXi();dXa();rZi();mXa();mZi();hXa();gZi();gXa();yZi();AXa();EZi()});var vZi={};X(vZi,{AnyAuthItem:()=>ivr,AnyAuthSchemesSchema:()=>ovr,ApiAuthSchema:()=>JKe,AuthSchemeDeclarationSchema:()=>Kye,AuthSchemeReferenceSchema:()=>KKe,AuthScope:()=>bvr,AuthVariable:()=>TNe,AvailabilitySchema:()=>Ovr,AvailabilityStatusSchema:()=>XKe,AvailabilityUnionSchema:()=>Bvr,BaseTypeReferenceSchema:()=>_vr,BasicAuthSchemeSchema:()=>pvr,BearerAuthSchemeSchema:()=>Avr,EncodingSchema:()=>Rvr,EndpointSecuritySchema:()=>avr,EndpointSecuritySchemaDetails:()=>svr,EnvironmentSchema:()=>jvr,HeaderAuthSchemeSchema:()=>yvr,HttpHeaderSchema:()=>$Ke,InferredAuthenticatedRequestHeader:()=>fvr,InferredBearerAuthSchema:()=>hvr,InferredGetTokenEndpointSchema:()=>mvr,InferredGetTokenEndpointSchemaObject:()=>dvr,ListValidationSchema:()=>zvr,MapValidationSchema:()=>Mvr,MultipleBaseUrlsEnvironmentSchema:()=>Fvr,NumberValidationSchema:()=>Lvr,OAuthAccessTokenRequestPropertiesSchema:()=>Evr,OAuthAccessTokenResponsePropertiesSchema:()=>Ivr,OAuthGetTokenEndpointSchema:()=>vvr,OAuthRefreshTokenEndpointSchema:()=>wvr,OAuthRefreshTokenRequestPropertiesSchema:()=>xvr,OAuthRefreshTokenResponsePropertiesSchema:()=>Cvr,OAuthSchemeSchema:()=>Svr,ProtobufTypeSchema:()=>Dvr,ServerVariableSchema:()=>ZKe,SingleBaseUrlEnvironmentSchema:()=>Nvr,StringValidationSchema:()=>Uvr,TokenBearerAuthSchema:()=>gvr,TypeReferenceDeclarationWithEnvOverride:()=>Wvr,TypeReferenceDeclarationWithEnvOverrideSchema:()=>Gvr,TypeReferenceDeclarationWithName:()=>qvr,ValidationSchema:()=>Vvr,WithAudiences:()=>Jye,WithAvailability:()=>Pvr,WithDocsSchema:()=>f0,WithEnvironmentVariable:()=>YKe,WithEnvironmentsSchema:()=>Qvr,WithHeadersSchema:()=>Kvr,WithName:()=>Hye,auth:()=>LXi,availability:()=>qXi,commons:()=>HXi,encoding:()=>XXi,environments:()=>nZi,file:()=>hZi,service:()=>AZi,types:()=>bZi,validation:()=>IZi});var bXa=h(()=>{"use strict";yXa()});var Yye,Bkt=h(()=>{"use strict";$r();Yye=xe.string()});var eJe,Jvr=h(()=>{"use strict";$r();eJe=xe.enum_(["v1","v2"])});var tJe,Yvr=h(()=>{"use strict";$r();tJe=xe.enum_(["environment-per-server","urls-per-environment"])});var rJe,Xvr=h(()=>{"use strict";$r();rJe=xe.enum_(["url-order","spec-order"])});var nJe,Zvr=h(()=>{"use strict";$r();nJe=xe.enum_(["always","never"])});var $vr,xZi=h(()=>{"use strict";$r();$vr=xe.enum_(["v1"])});var iJe,exr=h(()=>{"use strict";$r();Jvr();Yvr();Xvr();Zvr();xZi();iJe=xe.object({"use-title":xe.boolean().optional(),unions:$vr.optional(),"message-naming":eJe.optional(),"respect-nullable-schemas":xe.boolean().optional(),"only-include-referenced-schemas":xe.boolean().optional(),"inline-path-parameters":xe.boolean().optional(),"idiomatic-request-names":xe.boolean().optional(),"wrap-references-to-nullable-in-optional":xe.boolean().optional(),"coerce-optional-schemas-to-nullable":xe.boolean().optional(),"group-environments-by-host":xe.boolean().optional(),"multi-server-strategy":tJe.optional(),"remove-discriminants-from-schemas":nJe.optional(),"path-parameter-order":rJe.optional()})});var _U,ONe=h(()=>{"use strict";$r();_U=xe.undiscriminatedUnion([xe.string(),xe.list(xe.string())])});var oJe,txr=h(()=>{"use strict";$r();Bkt();exr();ONe();oJe=xe.object({path:Yye,origin:xe.string().optional(),overrides:_U.optional(),audiences:xe.list(xe.string()).optional(),settings:iJe.optional()})});var rxr,CZi=h(()=>{"use strict";$r();rxr=xe.object({repo:xe.string(),ref:xe.string().optional(),path:xe.string()})});var nxr,wZi=h(()=>{"use strict";$r();CZi();nxr=xe.object({git:rxr})});var Xye,Pkt=h(()=>{"use strict";$r();wZi();Xye=xe.undiscriminatedUnion([xe.string(),nxr])});var sJe,ixr=h(()=>{"use strict";$r();ONe();Pkt();sJe=xe.object({target:xe.string().optional(),root:Xye,overrides:_U.optional(),"local-generation":xe.boolean().optional(),"from-openapi":xe.boolean().optional(),dependencies:xe.list(xe.string()).optional()})});var aJe,oxr=h(()=>{"use strict";$r();ixr();aJe=xe.object({proto:sJe})});var sxr,SZi=h(()=>{"use strict";$r();Bkt();txr();oxr();sxr=xe.undiscriminatedUnion([Yye,oJe,aJe])});var axr,TZi=h(()=>{"use strict";$r();SZi();axr=xe.list(sxr)});var cJe,cxr=h(()=>{"use strict";$r();TZi();Bkt();txr();oxr();cJe=xe.undiscriminatedUnion([Yye,oJe,axr,aJe])});var uxr,OZi=h(()=>{"use strict";$r();uxr=xe.enum_(["literals","enums","enums-coerceable-to-literals"])});var uJe,lxr=h(()=>{"use strict";$r();OZi();Yvr();Xvr();Zvr();uJe=xe.object({"respect-nullable-schemas":xe.boolean().optional(),"title-as-schema-name":xe.boolean().optional(),"optional-additional-properties":xe.boolean().optional(),"coerce-enums-to-literals":xe.boolean().optional(),"idiomatic-request-names":xe.boolean().optional(),"wrap-references-to-nullable-in-optional":xe.boolean().optional(),"coerce-optional-schemas-to-nullable":xe.boolean().optional(),"group-environments-by-host":xe.boolean().optional(),"multi-server-strategy":tJe.optional(),"remove-discriminants-from-schemas":nJe.optional(),"path-parameter-order":rJe.optional(),"resolve-schema-collisions":xe.boolean().optional(),"infer-forward-compatible":xe.boolean().optional(),"infer-default-environment":xe.boolean().optional(),"coerce-consts-to":uxr.optional()})});var lJe,pxr=h(()=>{"use strict";$r();lxr();Jvr();lJe=xe.object({"message-naming":eJe.optional()}).extend(uJe)});var fxr,BZi=h(()=>{"use strict";$r();fxr=xe.enum_(["int32","int64","uint32","uint64"])});var dxr,PZi=h(()=>{"use strict";$r();dxr=xe.enum_(["form","json"])});var Dkt,DZi=h(()=>{"use strict";$r();Dkt=xe.object({"max-depth":xe.number().optional()})});var mxr,RZi=h(()=>{"use strict";$r();DZi();mxr=xe.object({request:Dkt.optional(),response:Dkt.optional()})});var hxr,kZi=h(()=>{"use strict";$r();hxr=xe.object({endpoints:xe.list(xe.string()).optional()})});var gxr,FZi=h(()=>{"use strict";$r();gxr=xe.object({except:xe.list(xe.string()).optional()})});var Axr,NZi=h(()=>{"use strict";$r();FZi();Axr=xe.undiscriminatedUnion([xe.boolean(),gxr])});var Zye,Rkt=h(()=>{"use strict";$r();lxr();BZi();PZi();RZi();kZi();NZi();Zye=xe.object({"only-include-referenced-schemas":xe.boolean().optional(),"inline-path-parameters":xe.boolean().optional(),"prefer-undiscriminated-unions-with-literals":xe.boolean().optional(),"object-query-parameters":xe.boolean().optional(),"respect-readonly-schemas":xe.boolean().optional(),"use-read-variant-for-responses":xe.boolean().optional(),"respect-forward-compatible-enums":xe.boolean().optional(),"use-bytes-for-binary-response":xe.boolean().optional(),"default-form-parameter-encoding":dxr.optional(),filter:hxr.optional(),"example-generation":mxr.optional(),"additional-properties-defaults-to":xe.boolean().optional(),"type-dates-as-strings":xe.boolean().optional(),"preserve-single-schema-oneof":xe.boolean().optional(),"inline-all-of-schemas":xe.boolean().optional(),"resolve-aliases":Axr.optional(),"group-multi-api-environments":xe.boolean().optional(),"default-integer-format":fxr.optional(),"infer-discriminated-union-base-properties":xe.boolean().optional(),"disambiguate-request-names":xe.boolean().optional(),"ignore-tags":xe.boolean().optional()}).extend(uJe)});var pJe,yxr=h(()=>{"use strict";$r();pxr();Rkt();pJe=xe.object({"auto-generate-idempotency-key":xe.unknown().optional()}).extend(Zye).extend(lJe)});var bxr,jZi=h(()=>{"use strict";$r();bxr=xe.object({conjure:xe.string()})});var Exr,QZi=h(()=>{"use strict";$r();pxr();ONe();Pkt();Exr=xe.object({asyncapi:Xye,origin:xe.string().optional(),overrides:_U.optional(),namespace:xe.string().optional(),settings:lJe.optional()})});var Ixr,zZi=h(()=>{"use strict";$r();Ixr=xe.object({graphql:xe.string(),origin:xe.string().optional(),overrides:xe.string().optional(),examples:xe.string().optional(),name:xe.string().optional()})});var vxr,MZi=h(()=>{"use strict";$r();Rkt();ONe();Pkt();vxr=xe.object({openapi:Xye,origin:xe.string().optional(),overrides:_U.optional(),overlays:xe.string().optional(),namespace:xe.string().optional(),settings:Zye.optional()})});var xxr,LZi=h(()=>{"use strict";$r();ONe();xxr=xe.object({openrpc:xe.string(),overrides:_U.optional(),namespace:xe.string().optional()})});var Cxr,UZi=h(()=>{"use strict";$r();ixr();Cxr=xe.object({proto:sJe})});var wxr,VZi=h(()=>{"use strict";$r();QZi();zZi();MZi();LZi();UZi();wxr=xe.undiscriminatedUnion([vxr,Exr,Cxr,xxr,Ixr])});var fJe,Sxr=h(()=>{"use strict";$r();jZi();VZi();fJe=xe.undiscriminatedUnion([xe.list(wxr),bxr])});var Txr,_Zi=h(()=>{"use strict";$r();cvr();Tkt();tZi();dZi();yxr();Sxr();Txr=xe.object({auth:JKe.optional(),"auth-schemes":xe.record(xe.string(),Kye).optional(),specs:fJe,settings:pJe.optional()}).extend(Kvr).extend(Qvr)});var Oxr,qZi=h(()=>{"use strict";$r();cxr();Oxr=xe.object({namespaces:xe.record(xe.string(),cJe)})});var Bxr,GZi=h(()=>{"use strict";$r();cxr();_Zi();qZi();Bxr=xe.undiscriminatedUnion([cJe,Oxr,Txr])});var Pxr,WZi=h(()=>{"use strict";$r();Pxr=xe.enum_(["minimal","comprehensive"])});var Dxr,HZi=h(()=>{"use strict";$r();Dxr=xe.object({name:xe.string(),registry:xe.string()})});var Rxr,KZi=h(()=>{"use strict";$r();Rxr=xe.object({name:xe.string(),email:xe.string()})});var $ye,kkt=h(()=>{"use strict";$r();KZi();$ye=xe.object({description:xe.string().optional(),authors:xe.list(Rxr).optional()})});var Fkt,JZi=h(()=>{"use strict";$r();Fkt=xe.object({name:xe.string()})});var ebe,Nkt=h(()=>{"use strict";$r();JZi();ebe=xe.object({teams:xe.list(Fkt).optional(),users:xe.list(Fkt).optional()})});var kxr,YZi=h(()=>{"use strict";$r();cvr();Tkt();Hvr();yxr();Sxr();kxr=xe.object({auth:JKe.optional(),"auth-schemes":xe.record(xe.string(),Kye).optional(),headers:xe.record(xe.string(),$Ke).optional(),settings:pJe.optional(),specs:fJe.optional()})});var Fxr,XZi=h(()=>{"use strict";$r();Fxr=xe.object({url:xe.string().optional(),"package-name":xe.string(),token:xe.string().optional()})});var Nxr,ZZi=h(()=>{"use strict";$r();Nxr=xe.object({path:xe.string()})});var jxr,$Zi=h(()=>{"use strict";$r();jxr=xe.object({keyId:xe.string(),password:xe.string(),secretKey:xe.string()})});var Qxr,e$i=h(()=>{"use strict";$r();$Zi();Qxr=xe.object({url:xe.string().optional(),coordinate:xe.string(),username:xe.string().optional(),password:xe.string().optional(),signature:jxr.optional()})});var zxr,t$i=h(()=>{"use strict";$r();zxr=xe.object({url:xe.string().optional(),"package-name":xe.string(),token:xe.string().optional()})});var Mxr,r$i=h(()=>{"use strict";$r();Mxr=xe.object({url:xe.string().optional(),"package-name":xe.string(),"api-key":xe.string().optional()})});var Lxr,n$i=h(()=>{"use strict";$r();Lxr=xe.object({"api-key":xe.string(),"workspace-id":xe.string(),"collection-id":xe.string().optional()})});var Uxr,i$i=h(()=>{"use strict";$r();kkt();Uxr=xe.object({keywords:xe.list(xe.string()).optional(),"documentation-link":xe.string().optional(),"homepage-link":xe.string().optional()}).extend($ye)});var Vxr,o$i=h(()=>{"use strict";$r();i$i();Vxr=xe.object({url:xe.string().optional(),"package-name":xe.string(),token:xe.string().optional(),username:xe.string().optional(),password:xe.string().optional(),metadata:Uxr.optional()})});var _xr,s$i=h(()=>{"use strict";$r();_xr=xe.object({url:xe.string().optional(),"package-name":xe.string(),"api-key":xe.string().optional()})});var qxr,a$i=h(()=>{"use strict";$r();XZi();ZZi();e$i();t$i();r$i();n$i();o$i();s$i();qxr=xe.union("location",{npm:zxr,maven:Qxr,pypi:Vxr,postman:Lxr,"local-file-system":Nxr,nuget:Mxr,rubygems:_xr,crates:Fxr}).transform({transform:e=>e,untransform:e=>e})});var Gxr,c$i=h(()=>{"use strict";$r();Gxr=xe.object({custom:xe.string()})});var Wxr,u$i=h(()=>{"use strict";$r();Wxr=xe.enum_(["MIT","Apache-2.0"])});var qU,BNe=h(()=>{"use strict";$r();c$i();u$i();qU=xe.undiscriminatedUnion([Wxr,Gxr])});var jkt,l$i=h(()=>{"use strict";$r();BNe();jkt=xe.object({"package-description":xe.string().optional(),email:xe.string().optional(),"reference-url":xe.string().optional(),author:xe.string().optional(),license:qU.optional()})});var Hxr,p$i=h(()=>{"use strict";$r();Hxr=xe.object({path:xe.string()})});var Kxr,f$i=h(()=>{"use strict";$r();Kxr=xe.enum_(["commit","release"])});var Jxr,d$i=h(()=>{"use strict";$r();BNe();f$i();Jxr=xe.object({repository:xe.string(),branch:xe.string().optional(),license:qU.optional(),mode:Kxr.optional()})});var Yxr,m$i=h(()=>{"use strict";$r();BNe();Nkt();Yxr=xe.object({repository:xe.string(),branch:xe.string().optional(),license:qU.optional(),mode:xe.stringLiteral("pull-request"),reviewers:ebe.optional()})});var Xxr,h$i=h(()=>{"use strict";$r();BNe();Xxr=xe.object({repository:xe.string(),license:qU.optional(),mode:xe.stringLiteral("push"),branch:xe.string().optional()})});var Zxr,g$i=h(()=>{"use strict";$r();Zxr=xe.enum_(["pull-request","push","commit-and-release"])});var $xr,A$i=h(()=>{"use strict";$r();BNe();g$i();$xr=xe.object({uri:xe.string(),token:xe.string(),mode:Zxr.optional(),branch:xe.string().optional(),license:qU.optional()})});var eCr,y$i=h(()=>{"use strict";$r();d$i();m$i();h$i();A$i();eCr=xe.undiscriminatedUnion([$xr,Jxr,Yxr,Xxr])});var dJe,tCr=h(()=>{"use strict";$r();wkt();YZi();a$i();l$i();p$i();y$i();dJe=xe.object({version:xe.string(),output:qxr.optional(),github:eCr.optional(),config:xe.unknown().optional(),metadata:jkt.optional(),keywords:xe.list(xe.string()).optional(),snippets:Hxr.optional(),"ir-version":xe.string().optional(),"smart-casing":xe.boolean().optional(),"smart-casing-digit-word-boundary":xe.boolean().optional(),api:kxr.optional(),"disable-examples":xe.boolean().optional(),"publish-metadata":jkt.optional(),autorelease:xe.boolean().optional(),automation:Wye.optional()})});var rCr,b$i=h(()=>{"use strict";$r();HZi();tCr();rCr=xe.object({image:Dxr}).extend(dJe)});var nCr,E$i=h(()=>{"use strict";$r();tCr();nCr=xe.object({name:xe.string()}).extend(dJe)});var iCr,I$i=h(()=>{"use strict";$r();b$i();E$i();iCr=xe.undiscriminatedUnion([nCr,rCr])});var oCr,v$i=h(()=>{"use strict";$r();wkt();kkt();Nkt();I$i();oCr=xe.object({audiences:xe.list(xe.string()).optional(),generators:xe.list(iCr),metadata:$ye.optional(),reviewers:ebe.optional(),automation:Wye.optional()})});var sCr,x$i=h(()=>{"use strict";$r();sCr=xe.object({enabled:xe.boolean()})});var aCr,C$i=h(()=>{"use strict";$r();Rkt();aCr=xe.object({path:xe.string(),origin:xe.string().optional(),overrides:xe.string().optional(),"disable-examples":xe.boolean().optional(),settings:Zye})});var cCr,w$i=h(()=>{"use strict";$r();C$i();cCr=xe.undiscriminatedUnion([aCr,xe.string()])});var uCr,S$i=h(()=>{"use strict";$r();uCr=xe.enum_(["java","python","go","ruby","csharp","typescript","php","rust","swift"])});var lCr,T$i=h(()=>{"use strict";$r();S$i();lCr=xe.object({title:xe.string(),language:uCr,content:xe.string()})});var pCr,O$i=h(()=>{"use strict";$r();pCr=xe.object({method:xe.string(),path:xe.string(),stream:xe.boolean().optional()})});var Qkt,B$i=h(()=>{"use strict";$r();O$i();Qkt=xe.undiscriminatedUnion([xe.string(),pCr])});var fCr,P$i=h(()=>{"use strict";$r();WZi();T$i();B$i();fCr=xe.object({bannerLink:xe.string().optional(),introduction:xe.string().optional(),apiReferenceLink:xe.string().optional(),apiName:xe.string().optional(),disabledSections:xe.list(xe.string()).optional(),defaultEndpoint:Qkt.optional(),features:xe.record(xe.string(),xe.list(Qkt)).optional(),customSections:xe.list(lCr).optional(),exampleStyle:Pxr.optional()})});var dCr,D$i=h(()=>{"use strict";$r();dCr=xe.object({username:xe.string(),email:xe.string(),token:xe.string()})});var mCr,R$i=h(()=>{"use strict";$r();D$i();mCr=xe.object({github:dCr.optional()})});var EXa,IXa=h(()=>{"use strict";$r();mXi();wkt();Tkt();v$i();x$i();Nkt();GZi();exr();w$i();kkt();P$i();R$i();EXa=xe.object({"auth-schemes":xe.record(xe.string(),Kye).optional(),api:Bxr.optional(),whitelabel:mCr.optional(),metadata:$ye.optional(),readme:fCr.optional(),"default-group":xe.string().optional(),aliases:xe.record(xe.string(),xe.list(xe.string())).optional(),groups:xe.record(xe.string(),oCr).optional(),reviewers:ebe.optional(),replay:sCr.optional(),ai:rvr.optional(),autorelease:xe.boolean().optional(),automation:Wye.optional(),openapi:cCr.optional(),"openapi-overrides":xe.string().optional(),"spec-origin":xe.string().optional(),"async-api":xe.string().optional(),"api-settings":iJe.optional()})});var k$i=h(()=>{"use strict";GZi();cxr();_Zi();yxr();Sxr();TZi();Bkt();SZi();exr();txr();pxr();QZi();lxr();OZi();jZi();BZi();WZi();PZi();HZi();IXa();CZi();C$i();w$i();zZi();S$i();Jvr();Yvr();qZi();RZi();kZi();Rkt();MZi();LZi();KZi();kkt();ONe();Xvr();oxr();ixr();UZi();T$i();O$i();B$i();P$i();Zvr();DZi();NZi();FZi();VZi();wZi();Pkt();xZi();R$i();D$i()});var F$i={};X(F$i,{ApiConfigurationSchema:()=>Bxr,ApiConfigurationSchemaInternal:()=>cJe,ApiConfigurationV2Schema:()=>Txr,ApiConfigurationV2SettingsSchema:()=>pJe,ApiConfigurationV2SpecsSchema:()=>fJe,ApiDefinitionList:()=>axr,ApiDefinitionPathSchema:()=>Yye,ApiDefinitionSchema:()=>sxr,ApiDefinitionSettingsSchema:()=>iJe,ApiDefinitionWithOverridesSchema:()=>oJe,AsyncApiSettingsSchema:()=>lJe,AsyncApiSpecSchema:()=>Exr,BaseApiSettingsSchema:()=>uJe,CoerceConstsTo:()=>uxr,ConjureSchema:()=>bxr,DefaultIntegerFormat:()=>fxr,ExampleStyle:()=>Pxr,FormParameterEncoding:()=>dxr,GeneratorImageObjectSchema:()=>Dxr,GeneratorsConfigurationSchema:()=>EXa,GeneratorsOpenApiObjectSchema:()=>aCr,GeneratorsOpenApiSchema:()=>cCr,GitRemoteSchema:()=>rxr,GraphQlSpecSchema:()=>Ixr,Language:()=>uCr,MessageNamingSettingsSchema:()=>eJe,MultiServerStrategy:()=>tJe,NamespacedApiConfigurationSchema:()=>Oxr,OpenApiExampleGenerationSchema:()=>mxr,OpenApiFilterSchema:()=>hxr,OpenApiSettingsSchema:()=>Zye,OpenApiSpecSchema:()=>vxr,OpenRpcSpecSchema:()=>xxr,OutputMetadataAuthor:()=>Rxr,OutputMetadataSchema:()=>$ye,OverridesSchema:()=>_U,PathParameterOrder:()=>rJe,ProtobufApiDefinitionSchema:()=>aJe,ProtobufDefinitionSchema:()=>sJe,ProtobufSpecSchema:()=>Cxr,ReadmeCustomSectionSchema:()=>lCr,ReadmeEndpointObjectSchema:()=>pCr,ReadmeEndpointSchema:()=>Qkt,ReadmeSchema:()=>fCr,RemoveDiscriminantsFromSchemas:()=>nJe,RequestOrResponseExampleGenerationSchema:()=>Dkt,ResolveAliases:()=>Axr,ResolveAliasesSchema:()=>gxr,SpecGitSourceSchema:()=>nxr,SpecSchema:()=>wxr,SpecSourceSchema:()=>Xye,UnionSettingsSchema:()=>$vr,WhitelabelConfigurationSchema:()=>mCr,WhitelabelGithubConfigurationSchema:()=>dCr});var vXa=h(()=>{"use strict";k$i()});var N$i=h(()=>{"use strict";tCr();XZi();b$i();E$i();YZi();v$i();I$i();a$i();l$i();p$i();f$i();d$i();y$i();m$i();h$i();g$i();A$i();ZZi();e$i();$Zi();t$i();r$i();n$i();o$i();i$i();s$i()});var j$i={};X(j$i,{BaseGeneratorInvocationSchema:()=>dJe,CratesOutputLocationSchema:()=>Fxr,CustomGeneratorInvocationSchema:()=>rCr,DefaultGeneratorInvocationSchema:()=>nCr,GeneratorApiSettingsSchema:()=>kxr,GeneratorGroupSchema:()=>oCr,GeneratorInvocationSchema:()=>iCr,GeneratorOutputSchema:()=>qxr,GeneratorPublishMetadataSchema:()=>jkt,GeneratorSnippetsSchema:()=>Hxr,GithubCommitAndReleaseMode:()=>Kxr,GithubCommitAndReleaseSchema:()=>Jxr,GithubConfigurationSchema:()=>eCr,GithubPullRequestSchema:()=>Yxr,GithubPushSchema:()=>Xxr,GithubSelfhostedMode:()=>Zxr,GithubSelfhostedSchema:()=>$xr,LocalFileSystemOutputLocationSchema:()=>Nxr,MavenOutputLocationSchema:()=>Qxr,MavenOutputSignatureSchema:()=>jxr,NpmOutputLocationSchema:()=>zxr,NugetOutputLocationSchema:()=>Mxr,PostmanOutputLocationSchema:()=>Lxr,PypiOutputLocationSchema:()=>Vxr,PypiOutputMetadataSchema:()=>Uxr,RubyGemsOutputLocationSchema:()=>_xr});var xXa=h(()=>{"use strict";N$i()});var Q$i=h(()=>{"use strict";c$i();BNe();u$i()});var z$i={};X(z$i,{GithubLicenseCustomSchema:()=>Gxr,GithubLicenseSchema:()=>qU,GithubLicenseType:()=>Wxr});var CXa=h(()=>{"use strict";Q$i()});var M$i=h(()=>{"use strict";x$i()});var L$i={};X(L$i,{ReplayConfigSchema:()=>sCr});var wXa=h(()=>{"use strict";M$i()});var U$i=h(()=>{"use strict";JZi();Nkt()});var V$i={};X(V$i,{ReviewerSchema:()=>Fkt,ReviewersSchema:()=>ebe});var SXa=h(()=>{"use strict";U$i()});var TXa=h(()=>{"use strict";aXa();hXi();cXa();AXi();bXa();vXa();k$i();xXa();N$i();CXa();Q$i();wXa();M$i();SXa();U$i()});var _$i={};X(_$i,{AiServicesSchema:()=>rvr,ApiConfigurationSchema:()=>Bxr,ApiConfigurationSchemaInternal:()=>cJe,ApiConfigurationV2Schema:()=>Txr,ApiConfigurationV2SettingsSchema:()=>pJe,ApiConfigurationV2SpecsSchema:()=>fJe,ApiDefinitionList:()=>axr,ApiDefinitionPathSchema:()=>Yye,ApiDefinitionSchema:()=>sxr,ApiDefinitionSettingsSchema:()=>iJe,ApiDefinitionWithOverridesSchema:()=>oJe,AsyncApiSettingsSchema:()=>lJe,AsyncApiSpecSchema:()=>Exr,AutomationSchema:()=>Wye,BaseApiSettingsSchema:()=>uJe,BaseGeneratorInvocationSchema:()=>dJe,CoerceConstsTo:()=>uxr,ConjureSchema:()=>bxr,CratesOutputLocationSchema:()=>Fxr,CustomGeneratorInvocationSchema:()=>rCr,DefaultGeneratorInvocationSchema:()=>nCr,DefaultIntegerFormat:()=>fxr,ExampleStyle:()=>Pxr,FormParameterEncoding:()=>dxr,GeneratorApiSettingsSchema:()=>kxr,GeneratorGroupSchema:()=>oCr,GeneratorImageObjectSchema:()=>Dxr,GeneratorInvocationSchema:()=>iCr,GeneratorOutputSchema:()=>qxr,GeneratorPublishMetadataSchema:()=>jkt,GeneratorSnippetsSchema:()=>Hxr,GeneratorsConfigurationSchema:()=>EXa,GeneratorsOpenApiObjectSchema:()=>aCr,GeneratorsOpenApiSchema:()=>cCr,GitRemoteSchema:()=>rxr,GithubCommitAndReleaseMode:()=>Kxr,GithubCommitAndReleaseSchema:()=>Jxr,GithubConfigurationSchema:()=>eCr,GithubLicenseCustomSchema:()=>Gxr,GithubLicenseSchema:()=>qU,GithubLicenseType:()=>Wxr,GithubPullRequestSchema:()=>Yxr,GithubPushSchema:()=>Xxr,GithubSelfhostedMode:()=>Zxr,GithubSelfhostedSchema:()=>$xr,GraphQlSpecSchema:()=>Ixr,Language:()=>uCr,LocalFileSystemOutputLocationSchema:()=>Nxr,MavenOutputLocationSchema:()=>Qxr,MavenOutputSignatureSchema:()=>jxr,MessageNamingSettingsSchema:()=>eJe,ModelName:()=>evr,ModelProvider:()=>tvr,MultiServerStrategy:()=>tJe,NamespacedApiConfigurationSchema:()=>Oxr,NpmOutputLocationSchema:()=>zxr,NugetOutputLocationSchema:()=>Mxr,OpenApiExampleGenerationSchema:()=>mxr,OpenApiFilterSchema:()=>hxr,OpenApiSettingsSchema:()=>Zye,OpenApiSpecSchema:()=>vxr,OpenRpcSpecSchema:()=>xxr,OutputMetadataAuthor:()=>Rxr,OutputMetadataSchema:()=>$ye,OverridesSchema:()=>_U,PathParameterOrder:()=>rJe,PostmanOutputLocationSchema:()=>Lxr,ProtobufApiDefinitionSchema:()=>aJe,ProtobufDefinitionSchema:()=>sJe,ProtobufSpecSchema:()=>Cxr,PypiOutputLocationSchema:()=>Vxr,PypiOutputMetadataSchema:()=>Uxr,ReadmeCustomSectionSchema:()=>lCr,ReadmeEndpointObjectSchema:()=>pCr,ReadmeEndpointSchema:()=>Qkt,ReadmeSchema:()=>fCr,RemoveDiscriminantsFromSchemas:()=>nJe,ReplayConfigSchema:()=>sCr,RequestOrResponseExampleGenerationSchema:()=>Dkt,ResolveAliases:()=>Axr,ResolveAliasesSchema:()=>gxr,ReviewerSchema:()=>Fkt,ReviewersSchema:()=>ebe,RubyGemsOutputLocationSchema:()=>_xr,SpecGitSourceSchema:()=>nxr,SpecSchema:()=>wxr,SpecSourceSchema:()=>Xye,UnionSettingsSchema:()=>$vr,WhitelabelConfigurationSchema:()=>mCr,WhitelabelGithubConfigurationSchema:()=>dCr,ai:()=>gXi,automation:()=>yXi,fernDefinition:()=>vZi,generators:()=>F$i,group:()=>j$i,license:()=>z$i,replay:()=>L$i,reviewers:()=>V$i});var OXa=h(()=>{"use strict";TXa()});var BXa=h(()=>{"use strict";HJa();OXa()});function PXa(e){return e?.specs!=null}var DXa=h(()=>{"use strict"});function RXa(e){return e?.asyncapi!=null}var kXa=h(()=>{"use strict"});function FXa(e){return e?.conjure!=null}var NXa=h(()=>{"use strict"});function jXa(e){return e?.graphql!=null}var QXa=h(()=>{"use strict"});function zXa(e){return e?.namespaces!=null}var MXa=h(()=>{"use strict"});function LXa(e){return e?.openapi!=null}var UXa=h(()=>{"use strict"});function VXa(e){return e?.openrpc!=null}var _Xa=h(()=>{"use strict"});function qXa(e){return e?.proto!=null}var GXa=h(()=>{"use strict"});var WXa=h(()=>{"use strict";DXa();kXa();NXa();QXa();MXa();UXa();_Xa();GXa()});var Nn={};X(Nn,{API_ORIGIN_LOCATION_KEY:()=>L3a,API_SETTINGS_KEY:()=>q3a,ASYNC_API_LOCATION_KEY:()=>U3a,CoerceConstsTo:()=>aKa,DEFAULT_GROUP_GENERATORS_CONFIG_KEY:()=>Bye,DEFAULT_GROUP_NAME:()=>gRt,DefaultIntegerFormat:()=>lKa,ExampleStyle:()=>fKa,FormParameterEncoding:()=>mKa,GenerationLanguage:()=>AWa,GithubCommitAndReleaseMode:()=>hJa,GithubLicenseType:()=>jJa,GithubSelfhostedMode:()=>IJa,Language:()=>vKa,MessageNamingSettingsSchema:()=>CKa,ModelProvider:()=>SWa,MultiServerStrategy:()=>SKa,OPENAPI_LOCATION_KEY:()=>V3a,OPENAPI_OVERRIDES_LOCATION_KEY:()=>_3a,PathParameterOrder:()=>QKa,RemoveDiscriminantsFromSchemas:()=>WKa,UnionSettingsSchema:()=>eJa,ai:()=>TYi,automation:()=>PWa,fernDefinition:()=>MYi,generators:()=>UYi,getPackageName:()=>yWa,group:()=>_Yi,isApiConfigurationV2Schema:()=>PXa,isAsyncApiSpecSchema:()=>RXa,isConjureSchema:()=>FXa,isGraphQLSpecSchema:()=>jXa,isNamespacedApiConfiguration:()=>zXa,isOpenApiSpecSchema:()=>LXa,isOpenRpcSpecSchema:()=>VXa,isProtoSpecSchema:()=>qXa,isRawProtobufAPIDefinitionSchema:()=>EWa,license:()=>GYi,replay:()=>LJa,resolveAutomationConfig:()=>vWa,reviewers:()=>qJa,serialization:()=>_$i});var HXa=h(()=>{"use strict";Byr();bWa();IWa();xWa();BXa();WXa()});var Va=h(()=>{"use strict";j3a();Byr();R_a();fWa();dWa();gWa();HXa()});function Lvf(e){let{defaults:t,options:r,overrides:n,overrideOnly:i=new Set,undefinedIfAbsent:o=new Set}=e,s={};for(let a of Object.keys(t))i.has(a)?s[a]=n?.[a]!==void 0?n[a]:t[a]:o.has(a)?s[a]=n?.[a]!==void 0?n[a]:r?.[a]!==void 0?r[a]:void 0:s[a]=n?.[a]??r?.[a]??t[a];return s}function PNe({options:e,overrides:t}){return Lvf({defaults:Mvf,options:e,overrides:t})}var Mvf,q$i=h(()=>{"use strict";Va();Mvf={enableUniqueErrorsPerEndpoint:!1,detectGlobalHeaders:!0,objectQueryParameters:!0,respectReadonlySchemas:!1,useReadVariantForResponses:!1,respectNullableSchemas:!0,onlyIncludeReferencedSchemas:!1,inlinePathParameters:!0,useBytesForBinaryResponse:!1,respectForwardCompatibleEnums:!1,wrapReferencesToNullableInOptional:!1,coerceOptionalSchemasToNullable:!1,groupEnvironmentsByHost:!1,multiServerStrategy:Nn.MultiServerStrategy.EnvironmentPerServer,removeDiscriminantsFromSchemas:Nn.RemoveDiscriminantsFromSchemas.Always,inferDefaultEnvironment:!0}});var KXa=h(()=>{"use strict"});var JXa=h(()=>{"use strict"});var mJe,YXa=h(()=>{"use strict";rc();mJe={protobuf:e=>({...e,type:"protobuf",_visit:function(t){return mJe._visit(this,t)}}),_visit:(e,t)=>e.type==="protobuf"?t.protobuf(e):t._other(e)}});var XXa=h(()=>{"use strict"});var ZXa=h(()=>{"use strict"});var $Xa=h(()=>{"use strict"});var eZa=h(()=>{"use strict"});var tZa=h(()=>{"use strict"});var rZa=h(()=>{"use strict"});var nZa=h(()=>{"use strict"});var iZa=h(()=>{"use strict"});var oZa=h(()=>{"use strict"});var sZa=h(()=>{"use strict"});var aZa=h(()=>{"use strict"});var US,cZa=h(()=>{"use strict";rc();US={basic:e=>({...e,type:"basic",_visit:function(t){return US._visit(this,t)}}),bearer:e=>({...e,type:"bearer",_visit:function(t){return US._visit(this,t)}}),header:e=>({...e,type:"header",_visit:function(t){return US._visit(this,t)}}),query:e=>({...e,type:"query",_visit:function(t){return US._visit(this,t)}}),oauth:e=>({...e,type:"oauth",_visit:function(t){return US._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"basic":return t.basic(e);case"bearer":return t.bearer(e);case"header":return t.header(e);case"query":return t.query(e);case"oauth":return t.oauth(e);default:return t._other(e)}}}});var uZa=h(()=>{"use strict"});var lZa=h(()=>{"use strict"});var pZa=h(()=>{"use strict"});var WP,fZa=h(()=>{"use strict";rc();WP={openapi:e=>({...e,type:"openapi",_visit:function(t){return WP._visit(this,t)}}),protobuf:e=>({...e,type:"protobuf",_visit:function(t){return WP._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"openapi":return t.openapi(e);case"protobuf":return t.protobuf(e);default:return t._other(e)}}}});var dZa=h(()=>{"use strict"});var mZa=h(()=>{"use strict"});var hZa=h(()=>{"use strict"});var gZa=h(()=>{"use strict"});var AZa=h(()=>{"use strict"});var yZa=h(()=>{"use strict"});var bZa=h(()=>{"use strict"});var EZa=h(()=>{"use strict"});var IZa=h(()=>{"use strict"});var vZa=h(()=>{"use strict"});var xZa=h(()=>{"use strict"});var CZa=h(()=>{"use strict"});var wZa=h(()=>{"use strict"});var SZa=h(()=>{"use strict"});var G$i=h(()=>{"use strict";KXa();JXa();YXa();XXa();ZXa();$Xa();eZa();tZa();rZa();nZa();iZa();oZa();sZa();aZa();cZa();uZa();lZa();pZa();fZa();dZa();mZa();hZa();gZa();AZa();yZa();bZa();EZa();IZa();vZa();xZa();CZa();wZa();SZa()});var TZa=h(()=>{"use strict";G$i()});var gc,OZa=h(()=>{"use strict";rc();gc={primitive:e=>({value:e,type:"primitive",_visit:function(t){return gc._visit(this,t)}}),object:e=>({...e,type:"object",_visit:function(t){return gc._visit(this,t)}}),array:e=>({value:e,type:"array",_visit:function(t){return gc._visit(this,t)}}),map:e=>({value:e,type:"map",_visit:function(t){return gc._visit(this,t)}}),enum:e=>({value:e,type:"enum",_visit:function(t){return gc._visit(this,t)}}),literal:e=>({value:e,type:"literal",_visit:function(t){return gc._visit(this,t)}}),oneOf:e=>({value:e,type:"oneOf",_visit:function(t){return gc._visit(this,t)}}),null:e=>({...e,type:"null",_visit:function(t){return gc._visit(this,t)}}),unknown:e=>({value:e,type:"unknown",_visit:function(t){return gc._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"primitive":return t.primitive(e.value);case"object":return t.object(e);case"array":return t.array(e.value);case"map":return t.map(e.value);case"enum":return t.enum(e.value);case"literal":return t.literal(e.value);case"oneOf":return t.oneOf(e.value);case"null":return t.null(e);case"unknown":return t.unknown(e.value);default:return t._other(e)}}}});var BZa=h(()=>{"use strict"});var tbe,PZa=h(()=>{"use strict";rc();tbe={discriminated:e=>({value:e,type:"discriminated",_visit:function(t){return tbe._visit(this,t)}}),undiscriminated:e=>({value:e,type:"undiscriminated",_visit:function(t){return tbe._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"discriminated":return t.discriminated(e.value);case"undiscriminated":return t.undiscriminated(e.value);default:return t._other(e)}}}});var DZa=h(()=>{"use strict"});var rbe,RZa=h(()=>{"use strict";rc();rbe={boolean:e=>({value:e,type:"boolean",_visit:function(t){return rbe._visit(this,t)}}),string:e=>({value:e,type:"string",_visit:function(t){return rbe._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"boolean":return t.boolean(e.value);case"string":return t.string(e.value);default:return t._other(e)}}}});var kZa=h(()=>{"use strict"});var vo,FZa=h(()=>{"use strict";rc();vo={int:e=>({value:e,type:"int",_visit:function(t){return vo._visit(this,t)}}),int64:e=>({value:e,type:"int64",_visit:function(t){return vo._visit(this,t)}}),uint:e=>({value:e,type:"uint",_visit:function(t){return vo._visit(this,t)}}),uint64:e=>({value:e,type:"uint64",_visit:function(t){return vo._visit(this,t)}}),float:e=>({value:e,type:"float",_visit:function(t){return vo._visit(this,t)}}),double:e=>({value:e,type:"double",_visit:function(t){return vo._visit(this,t)}}),string:e=>({value:e,type:"string",_visit:function(t){return vo._visit(this,t)}}),datetime:e=>({value:e,type:"datetime",_visit:function(t){return vo._visit(this,t)}}),datetimeRfc2822:e=>({value:e,type:"datetimeRfc2822",_visit:function(t){return vo._visit(this,t)}}),date:e=>({value:e,type:"date",_visit:function(t){return vo._visit(this,t)}}),base64:e=>({value:e,type:"base64",_visit:function(t){return vo._visit(this,t)}}),boolean:e=>({value:e,type:"boolean",_visit:function(t){return vo._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"int":return t.int(e.value);case"int64":return t.int64(e.value);case"uint":return t.uint(e.value);case"uint64":return t.uint64(e.value);case"float":return t.float(e.value);case"double":return t.double(e.value);case"string":return t.string(e.value);case"datetime":return t.datetime(e.value);case"datetimeRfc2822":return t.datetimeRfc2822(e.value);case"date":return t.date(e.value);case"base64":return t.base64(e.value);case"boolean":return t.boolean(e.value);default:return t._other(e)}}}});var NZa=h(()=>{"use strict"});var W$i=h(()=>{"use strict";OZa();BZa();PZa();DZa();RZa();kZa();FZa();NZa()});var jZa=h(()=>{"use strict";W$i()});var QZa=h(()=>{"use strict"});var zZa=h(()=>{"use strict"});var _vf,nbe,MZa=h(()=>{"use strict";_vf={RsaSha256:"rsa-sha256",RsaSha384:"rsa-sha384",RsaSha512:"rsa-sha512",EcdsaSha256:"ecdsa-sha256",EcdsaSha384:"ecdsa-sha384",EcdsaSha512:"ecdsa-sha512",Ed25519:"ed25519"},nbe={..._vf,_visit:(e,t)=>{switch(e){case nbe.RsaSha256:return t.rsaSha256();case nbe.RsaSha384:return t.rsaSha384();case nbe.RsaSha512:return t.rsaSha512();case nbe.EcdsaSha256:return t.ecdsaSha256();case nbe.EcdsaSha384:return t.ecdsaSha384();case nbe.EcdsaSha512:return t.ecdsaSha512();case nbe.Ed25519:return t.ed25519();default:return t._other()}}}});var LZa=h(()=>{"use strict"});var qvf,jh,UZa=h(()=>{"use strict";qvf={GenerallyAvailable:"GenerallyAvailable",Beta:"Beta",Deprecated:"Deprecated",Alpha:"Alpha",Preview:"Preview",Legacy:"Legacy"},jh={...qvf,_visit:(e,t)=>{switch(e){case jh.GenerallyAvailable:return t.generallyAvailable();case jh.Beta:return t.beta();case jh.Deprecated:return t.deprecated();case jh.Alpha:return t.alpha();case jh.Preview:return t.preview();case jh.Legacy:return t.legacy();default:return t._other()}}}});var VZa=h(()=>{"use strict"});var _Za=h(()=>{"use strict"});var qZa=h(()=>{"use strict"});var GZa=h(()=>{"use strict"});var WZa=h(()=>{"use strict"});var JY,HZa=h(()=>{"use strict";rc();JY={language:e=>({...e,type:"language",_visit:function(t){return JY._visit(this,t)}}),sdk:e=>({...e,type:"sdk",_visit:function(t){return JY._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"language":return t.language(e);case"sdk":return t.sdk(e);default:return t._other(e)}}}});var KZa=h(()=>{"use strict"});var JZa=h(()=>{"use strict"});var YZa=h(()=>{"use strict"});var XZa=h(()=>{"use strict"});var Gvf,H$i,ZZa=h(()=>{"use strict";Gvf={Data:"data",Protocol:"protocol"},H$i={...Gvf,_visit:(e,t)=>{switch(e){case H$i.Data:return t.data();case H$i.Protocol:return t.protocol();default:return t._other()}}}});var $Za=h(()=>{"use strict"});var e$a=h(()=>{"use strict"});var GU,t$a=h(()=>{"use strict";rc();GU={unknown:e=>({value:e,type:"unknown",_visit:function(t){return GU._visit(this,t)}}),full:e=>({...e,type:"full",_visit:function(t){return GU._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"unknown":return t.unknown(e.value);case"full":return t.full(e);default:return t._other(e)}}}});var WU,r$a=h(()=>{"use strict";rc();WU={withStreaming:e=>({...e,type:"withStreaming",_visit:function(t){return WU._visit(this,t)}}),withoutStreaming:e=>({value:e,type:"withoutStreaming",_visit:function(t){return WU._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"withStreaming":return t.withStreaming(e);case"withoutStreaming":return t.withoutStreaming(e.value);default:return t._other(e)}}}});var n$a=h(()=>{"use strict"});var i$a=h(()=>{"use strict"});var o$a=h(()=>{"use strict"});var s$a=h(()=>{"use strict"});var a$a=h(()=>{"use strict"});var c$a=h(()=>{"use strict"});var u$a=h(()=>{"use strict"});var l$a=h(()=>{"use strict"});var p$a=h(()=>{"use strict"});var f$a=h(()=>{"use strict"});var d$a=h(()=>{"use strict"});var m$a=h(()=>{"use strict"});var h$a=h(()=>{"use strict"});var g$a=h(()=>{"use strict"});var A$a=h(()=>{"use strict"});var y$a=h(()=>{"use strict"});var b$a=h(()=>{"use strict"});var E$a=h(()=>{"use strict"});var Wvf,VS,I$a=h(()=>{"use strict";Wvf={Get:"GET",Post:"POST",Put:"PUT",Patch:"PATCH",Delete:"DELETE",Head:"HEAD",Options:"OPTIONS",Trace:"TRACE"},VS={...Wvf,_visit:(e,t)=>{switch(e){case VS.Get:return t.get();case VS.Post:return t.post();case VS.Put:return t.put();case VS.Patch:return t.patch();case VS.Delete:return t.delete();case VS.Head:return t.head();case VS.Options:return t.options();case VS.Trace:return t.trace();default:return t._other()}}}});var v$a=h(()=>{"use strict"});var x$a=h(()=>{"use strict"});var C$a=h(()=>{"use strict"});var w$a=h(()=>{"use strict"});var S$a=h(()=>{"use strict"});var iy,T$a=h(()=>{"use strict";rc();iy={boolean:e=>({value:e,type:"boolean",_visit:function(t){return iy._visit(this,t)}}),string:e=>({value:e,type:"string",_visit:function(t){return iy._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"boolean":return t.boolean(e.value);case"string":return t.string(e.value);default:return t._other(e)}}}});var O$a=h(()=>{"use strict"});var B$a=h(()=>{"use strict"});var P$a=h(()=>{"use strict"});var D$a=h(()=>{"use strict"});var R$a=h(()=>{"use strict"});var Hvf,K$i,k$a=h(()=>{"use strict";Hvf={Json:"json",Form:"form"},K$i={...Hvf,_visit:(e,t)=>{switch(e){case K$i.Json:return t.json();case K$i.Form:return t.form();default:return t._other()}}}});var YY,F$a=h(()=>{"use strict";rc();YY={file:e=>({...e,type:"file",_visit:function(t){return YY._visit(this,t)}}),json:e=>({value:e,type:"json",_visit:function(t){return YY._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"file":return t.file(e);case"json":return t.json(e.value);default:return t._other(e)}}}});var N$a=h(()=>{"use strict"});var j$a=h(()=>{"use strict"});var Q$a=h(()=>{"use strict"});var z$a=h(()=>{"use strict"});var M$a=h(()=>{"use strict"});var L$a=h(()=>{"use strict"});var XY,U$a=h(()=>{"use strict";rc();XY={discriminated:e=>({...e,type:"discriminated",_visit:function(t){return XY._visit(this,t)}}),undiscriminated:e=>({...e,type:"undiscriminated",_visit:function(t){return XY._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"discriminated":return t.discriminated(e);case"undiscriminated":return t.undiscriminated(e);default:return t._other(e)}}}});var V$a=h(()=>{"use strict"});var _$a=h(()=>{"use strict"});var gw,q$a=h(()=>{"use strict";rc();gw={cursor:e=>({...e,type:"cursor",_visit:function(t){return gw._visit(this,t)}}),offset:e=>({...e,type:"offset",_visit:function(t){return gw._visit(this,t)}}),custom:e=>({...e,type:"custom",_visit:function(t){return gw._visit(this,t)}}),uri:e=>({...e,type:"uri",_visit:function(t){return gw._visit(this,t)}}),path:e=>({...e,type:"path",_visit:function(t){return gw._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"cursor":return t.cursor(e);case"offset":return t.offset(e);case"custom":return t.custom(e);case"uri":return t.uri(e);case"path":return t.path(e);default:return t._other(e)}}}});var G$a=h(()=>{"use strict"});var W$a=h(()=>{"use strict"});var H$a=h(()=>{"use strict"});var K$a=h(()=>{"use strict"});var Lu,J$a=h(()=>{"use strict";rc();Lu={int:e=>({...e,type:"int",_visit:function(t){return Lu._visit(this,t)}}),int64:e=>({...e,type:"int64",_visit:function(t){return Lu._visit(this,t)}}),uint:()=>({type:"uint",_visit:function(e){return Lu._visit(this,e)}}),uint64:()=>({type:"uint64",_visit:function(e){return Lu._visit(this,e)}}),float:()=>({type:"float",_visit:function(e){return Lu._visit(this,e)}}),double:e=>({...e,type:"double",_visit:function(t){return Lu._visit(this,t)}}),string:e=>({...e,type:"string",_visit:function(t){return Lu._visit(this,t)}}),datetime:()=>({type:"datetime",_visit:function(e){return Lu._visit(this,e)}}),datetimeRfc2822:()=>({type:"datetimeRfc2822",_visit:function(e){return Lu._visit(this,e)}}),date:()=>({type:"date",_visit:function(e){return Lu._visit(this,e)}}),base64:()=>({type:"base64",_visit:function(e){return Lu._visit(this,e)}}),boolean:e=>({...e,type:"boolean",_visit:function(t){return Lu._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"int":return t.int(e);case"int64":return t.int64(e);case"uint":return t.uint();case"uint64":return t.uint64();case"float":return t.float();case"double":return t.double(e);case"string":return t.string(e);case"datetime":return t.datetime();case"datetimeRfc2822":return t.datetimeRfc2822();case"date":return t.date();case"base64":return t.base64();case"boolean":return t.boolean(e);default:return t._other(e)}}}});var Y$a=h(()=>{"use strict"});var X$a=h(()=>{"use strict"});var Z$a=h(()=>{"use strict"});var x7,$$a=h(()=>{"use strict";rc();x7={octetStream:e=>({...e,type:"octetStream",_visit:function(t){return x7._visit(this,t)}}),multipart:e=>({...e,type:"multipart",_visit:function(t){return x7._visit(this,t)}}),json:e=>({...e,type:"json",_visit:function(t){return x7._visit(this,t)}}),formUrlEncoded:e=>({...e,type:"formUrlEncoded",_visit:function(t){return x7._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"octetStream":return t.octetStream(e);case"multipart":return t.multipart(e);case"json":return t.json(e);case"formUrlEncoded":return t.formUrlEncoded(e);default:return t._other(e)}}}});var QO,eec=h(()=>{"use strict";rc();QO={file:e=>({...e,type:"file",_visit:function(t){return QO._visit(this,t)}}),json:e=>({...e,type:"json",_visit:function(t){return QO._visit(this,t)}}),text:e=>({...e,type:"text",_visit:function(t){return QO._visit(this,t)}}),bytes:e=>({...e,type:"bytes",_visit:function(t){return QO._visit(this,t)}}),streamingSse:e=>({...e,type:"streamingSse",_visit:function(t){return QO._visit(this,t)}}),streamingText:e=>({...e,type:"streamingText",_visit:function(t){return QO._visit(this,t)}}),streamingJson:e=>({...e,type:"streamingJson",_visit:function(t){return QO._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"file":return t.file(e);case"json":return t.json(e);case"text":return t.text(e);case"bytes":return t.bytes(e);case"streamingSse":return t.streamingSse(e);case"streamingText":return t.streamingText(e);case"streamingJson":return t.streamingJson(e);default:return t._other(e)}}}});var zkt,tec=h(()=>{"use strict";rc();zkt={disabled:e=>({value:e,type:"disabled",_visit:function(t){return zkt._visit(this,t)}}),_visit:(e,t)=>e.type==="disabled"?t.disabled(e.value):t._other(e)}});var da,rec=h(()=>{"use strict";rc();da={primitive:e=>({...e,type:"primitive",_visit:function(t){return da._visit(this,t)}}),object:e=>({...e,type:"object",_visit:function(t){return da._visit(this,t)}}),array:e=>({...e,type:"array",_visit:function(t){return da._visit(this,t)}}),map:e=>({...e,type:"map",_visit:function(t){return da._visit(this,t)}}),optional:e=>({...e,type:"optional",_visit:function(t){return da._visit(this,t)}}),enum:e=>({...e,type:"enum",_visit:function(t){return da._visit(this,t)}}),reference:e=>({...e,type:"reference",_visit:function(t){return da._visit(this,t)}}),literal:e=>({...e,type:"literal",_visit:function(t){return da._visit(this,t)}}),oneOf:e=>({value:e,type:"oneOf",_visit:function(t){return da._visit(this,t)}}),nullable:e=>({...e,type:"nullable",_visit:function(t){return da._visit(this,t)}}),unknown:e=>({...e,type:"unknown",_visit:function(t){return da._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"primitive":return t.primitive(e);case"object":return t.object(e);case"array":return t.array(e);case"map":return t.map(e);case"optional":return t.optional(e);case"enum":return t.enum(e);case"reference":return t.reference(e);case"literal":return t.literal(e);case"oneOf":return t.oneOf(e.value);case"nullable":return t.nullable(e);case"unknown":return t.unknown(e);default:return t._other(e)}}}});var nec=h(()=>{"use strict"});var iec=h(()=>{"use strict"});var oec=h(()=>{"use strict"});var sec=h(()=>{"use strict"});var Kvf,_S,aec=h(()=>{"use strict";Kvf={Curl:"curl",Python:"python",Javascript:"javascript",Typescript:"typescript",Go:"go",Ruby:"ruby",Csharp:"csharp",Java:"java",Js:"js",Node:"node",Ts:"ts",Nodets:"nodets",Golang:"golang",Dotnet:"dotnet",Jvm:"jvm"},_S={...Kvf,_visit:(e,t)=>{switch(e){case _S.Curl:return t.curl();case _S.Python:return t.python();case _S.Javascript:return t.javascript();case _S.Typescript:return t.typescript();case _S.Go:return t.go();case _S.Ruby:return t.ruby();case _S.Csharp:return t.csharp();case _S.Java:return t.java();case _S.Js:return t.js();case _S.Node:return t.node();case _S.Ts:return t.ts();case _S.Nodets:return t.nodets();case _S.Golang:return t.golang();case _S.Dotnet:return t.dotnet();case _S.Jvm:return t.jvm();default:return t._other()}}}});var cec=h(()=>{"use strict"});var uec=h(()=>{"use strict"});var lec=h(()=>{"use strict"});var pec=h(()=>{"use strict"});var fec=h(()=>{"use strict"});var dec=h(()=>{"use strict"});var Jvf,Mkt,mec=h(()=>{"use strict";Jvf={Sha256:"sha256",Sha1:"sha1",Sha384:"sha384",Sha512:"sha512"},Mkt={...Jvf,_visit:(e,t)=>{switch(e){case Mkt.Sha256:return t.sha256();case Mkt.Sha1:return t.sha1();case Mkt.Sha384:return t.sha384();case Mkt.Sha512:return t.sha512();default:return t._other()}}}});var hec=h(()=>{"use strict"});var Lkt,gec=h(()=>{"use strict";rc();Lkt={queryParameter:e=>({...e,type:"queryParameter",_visit:function(t){return Lkt._visit(this,t)}}),_visit:(e,t)=>e.type==="queryParameter"?t.queryParameter(e):t._other(e)}});var Aec=h(()=>{"use strict"});var yec=h(()=>{"use strict"});var Yvf,J$i,bec=h(()=>{"use strict";Yvf={Get:"GET",Post:"POST"},J$i={...Yvf,_visit:(e,t)=>{switch(e){case J$i.Get:return t.get();case J$i.Post:return t.post();default:return t._other()}}}});var Eec=h(()=>{"use strict"});var Xvf,Iec,vec=h(()=>{"use strict";Xvf={Alphabetical:"alphabetical"},Iec={...Xvf,_visit:(e,t)=>e===Iec.Alphabetical?t.alphabetical():t._other()}});var Zvf,Ukt,xec=h(()=>{"use strict";Zvf={Body:"body",Timestamp:"timestamp",NotificationUrl:"notification-url",MessageId:"message-id"},Ukt={...Zvf,_visit:(e,t)=>{switch(e){case Ukt.Body:return t.body();case Ukt.Timestamp:return t.timestamp();case Ukt.NotificationUrl:return t.notificationUrl();case Ukt.MessageId:return t.messageId();default:return t._other()}}}});var Cec=h(()=>{"use strict"});var $vf,Vkt,wec=h(()=>{"use strict";$vf={Sha256:"sha256",Sha1:"sha1",Sha384:"sha384",Sha512:"sha512"},Vkt={...$vf,_visit:(e,t)=>{switch(e){case Vkt.Sha256:return t.sha256();case Vkt.Sha1:return t.sha1();case Vkt.Sha384:return t.sha384();case Vkt.Sha512:return t.sha512();default:return t._other()}}}});var exf,Y$i,Sec=h(()=>{"use strict";exf={Base64:"base64",Hex:"hex"},Y$i={...exf,_visit:(e,t)=>{switch(e){case Y$i.Base64:return t.base64();case Y$i.Hex:return t.hex();default:return t._other()}}}});var DNe,Tec=h(()=>{"use strict";rc();DNe={hmac:e=>({...e,type:"hmac",_visit:function(t){return DNe._visit(this,t)}}),asymmetric:e=>({...e,type:"asymmetric",_visit:function(t){return DNe._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"hmac":return t.hmac(e);case"asymmetric":return t.asymmetric(e);default:return t._other(e)}}}});var Oec=h(()=>{"use strict"});var txf,hCr,Bec=h(()=>{"use strict";txf={UnixSeconds:"unix-seconds",UnixMillis:"unix-millis",Iso8601:"iso8601"},hCr={...txf,_visit:(e,t)=>{switch(e){case hCr.UnixSeconds:return t.unixSeconds();case hCr.UnixMillis:return t.unixMillis();case hCr.Iso8601:return t.iso8601();default:return t._other()}}}});var Pec=h(()=>{"use strict"});var Dec=h(()=>{"use strict"});var Rec=h(()=>{"use strict"});var rxf,X$i,kec=h(()=>{"use strict";rxf={Client:"client",Server:"server"},X$i={...rxf,_visit:(e,t)=>{switch(e){case X$i.Client:return t.client();case X$i.Server:return t.server();default:return t._other()}}}});var Fec=h(()=>{"use strict"});var Nec=h(()=>{"use strict"});var jec=h(()=>{"use strict"});var Z$i=h(()=>{"use strict";QZa();zZa();MZa();LZa();UZa();VZa();_Za();qZa();GZa();WZa();HZa();KZa();JZa();YZa();XZa();ZZa();$Za();e$a();t$a();r$a();n$a();i$a();o$a();s$a();a$a();c$a();u$a();l$a();p$a();f$a();d$a();m$a();h$a();g$a();A$a();y$a();b$a();E$a();I$a();v$a();x$a();C$a();w$a();S$a();T$a();O$a();B$a();P$a();D$a();R$a();k$a();F$a();N$a();j$a();Q$a();z$a();M$a();L$a();U$a();V$a();_$a();q$a();G$a();W$a();H$a();K$a();J$a();Y$a();X$a();Z$a();$$a();eec();tec();rec();nec();iec();oec();sec();aec();cec();uec();lec();pec();fec();dec();mec();hec();gec();Aec();yec();bec();Eec();vec();xec();Cec();wec();Sec();Tec();Oec();Bec();Pec();Dec();Rec();kec();Fec();Nec();jec()});var Kd={};X(Kd,{AsymmetricAlgorithm:()=>nbe,Availability:()=>jh,CustomCodeSample:()=>JY,DiscriminatorContext:()=>H$i,EndpointExample:()=>GU,EndpointResponseExample:()=>WU,HttpMethod:()=>VS,LiteralSchemaValue:()=>iy,MultipartRequestPropertyEncoding:()=>K$i,MultipartSchema:()=>YY,OneOfSchema:()=>XY,Pagination:()=>gw,PrimitiveSchemaValue:()=>Lu,Request:()=>x7,Response:()=>QO,RetriesConfiguration:()=>zkt,Schema:()=>da,SupportedSdkLanguage:()=>_S,WebhookBodyHashAlgorithm:()=>Mkt,WebhookBodyHashLocation:()=>Lkt,WebhookHttpMethod:()=>J$i,WebhookPayloadBodySort:()=>Iec,WebhookPayloadComponent:()=>Ukt,WebhookSignatureAlgorithm:()=>Vkt,WebhookSignatureEncoding:()=>Y$i,WebhookSignatureVerification:()=>DNe,WebhookTimestampFormat:()=>hCr,WebsocketMessageOrigin:()=>X$i});var Qec=h(()=>{"use strict";Z$i()});var zec=h(()=>{"use strict"});var Mec=h(()=>{"use strict"});var Lec=h(()=>{"use strict"});var Uec=h(()=>{"use strict"});var Vec=h(()=>{"use strict"});var _ec=h(()=>{"use strict"});var qec=h(()=>{"use strict"});var Gec=h(()=>{"use strict"});var Wec=h(()=>{"use strict"});var Hec=h(()=>{"use strict"});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 etc=h(()=>{"use strict"});var ttc=h(()=>{"use strict"});var rtc=h(()=>{"use strict"});var ntc=h(()=>{"use strict"});var itc=h(()=>{"use strict"});var otc=h(()=>{"use strict"});var stc=h(()=>{"use strict"});var rL,atc=h(()=>{"use strict";rc();rL={discriminated:e=>({...e,type:"discriminated",_visit:function(t){return rL._visit(this,t)}}),undiscriminated:e=>({...e,type:"undiscriminated",_visit:function(t){return rL._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"discriminated":return t.discriminated(e);case"undiscriminated":return t.undiscriminated(e);default:return t._other(e)}}}});var ctc=h(()=>{"use strict"});var utc=h(()=>{"use strict"});var ltc=h(()=>{"use strict"});var ptc=h(()=>{"use strict"});var ftc=h(()=>{"use strict"});var Qi,dtc=h(()=>{"use strict";rc();Qi={int:e=>({...e,type:"int",_visit:function(t){return Qi._visit(this,t)}}),int64:e=>({...e,type:"int64",_visit:function(t){return Qi._visit(this,t)}}),uint:e=>({...e,type:"uint",_visit:function(t){return Qi._visit(this,t)}}),uint64:e=>({...e,type:"uint64",_visit:function(t){return Qi._visit(this,t)}}),float:e=>({...e,type:"float",_visit:function(t){return Qi._visit(this,t)}}),double:e=>({...e,type:"double",_visit:function(t){return Qi._visit(this,t)}}),string:e=>({...e,type:"string",_visit:function(t){return Qi._visit(this,t)}}),datetime:e=>({...e,type:"datetime",_visit:function(t){return Qi._visit(this,t)}}),datetimeRfc2822:e=>({...e,type:"datetimeRfc2822",_visit:function(t){return Qi._visit(this,t)}}),date:e=>({...e,type:"date",_visit:function(t){return Qi._visit(this,t)}}),base64:e=>({...e,type:"base64",_visit:function(t){return Qi._visit(this,t)}}),boolean:e=>({...e,type:"boolean",_visit:function(t){return Qi._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"int":return t.int(e);case"int64":return t.int64(e);case"uint":return t.uint(e);case"uint64":return t.uint64(e);case"float":return t.float(e);case"double":return t.double(e);case"string":return t.string(e);case"datetime":return t.datetime(e);case"datetimeRfc2822":return t.datetimeRfc2822(e);case"date":return t.date(e);case"base64":return t.base64(e);case"boolean":return t.boolean(e);default:return t._other(e)}}}});var mtc=h(()=>{"use strict"});var htc=h(()=>{"use strict"});var nF,gtc=h(()=>{"use strict";rc();nF={octetStream:e=>({...e,type:"octetStream",_visit:function(t){return nF._visit(this,t)}}),multipart:e=>({...e,type:"multipart",_visit:function(t){return nF._visit(this,t)}}),json:e=>({...e,type:"json",_visit:function(t){return nF._visit(this,t)}}),formUrlEncoded:e=>({...e,type:"formUrlEncoded",_visit:function(t){return nF._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"octetStream":return t.octetStream(e);case"multipart":return t.multipart(e);case"json":return t.json(e);case"formUrlEncoded":return t.formUrlEncoded(e);default:return t._other(e)}}}});var Cg,Atc=h(()=>{"use strict";rc();Cg={file:e=>({...e,type:"file",_visit:function(t){return Cg._visit(this,t)}}),json:e=>({...e,type:"json",_visit:function(t){return Cg._visit(this,t)}}),text:e=>({...e,type:"text",_visit:function(t){return Cg._visit(this,t)}}),bytes:e=>({...e,type:"bytes",_visit:function(t){return Cg._visit(this,t)}}),streamingSse:e=>({...e,type:"streamingSse",_visit:function(t){return Cg._visit(this,t)}}),streamingText:e=>({...e,type:"streamingText",_visit:function(t){return Cg._visit(this,t)}}),streamingJson:e=>({...e,type:"streamingJson",_visit:function(t){return Cg._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"file":return t.file(e);case"json":return t.json(e);case"text":return t.text(e);case"bytes":return t.bytes(e);case"streamingSse":return t.streamingSse(e);case"streamingText":return t.streamingText(e);case"streamingJson":return t.streamingJson(e);default:return t._other(e)}}}});var Lr,ytc=h(()=>{"use strict";rc();Lr={primitive:e=>({...e,type:"primitive",_visit:function(t){return Lr._visit(this,t)}}),object:e=>({...e,type:"object",_visit:function(t){return Lr._visit(this,t)}}),array:e=>({...e,type:"array",_visit:function(t){return Lr._visit(this,t)}}),map:e=>({...e,type:"map",_visit:function(t){return Lr._visit(this,t)}}),optional:e=>({...e,type:"optional",_visit:function(t){return Lr._visit(this,t)}}),enum:e=>({...e,type:"enum",_visit:function(t){return Lr._visit(this,t)}}),reference:e=>({...e,type:"reference",_visit:function(t){return Lr._visit(this,t)}}),literal:e=>({...e,type:"literal",_visit:function(t){return Lr._visit(this,t)}}),oneOf:e=>({value:e,type:"oneOf",_visit:function(t){return Lr._visit(this,t)}}),nullable:e=>({...e,type:"nullable",_visit:function(t){return Lr._visit(this,t)}}),unknown:e=>({...e,type:"unknown",_visit:function(t){return Lr._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"primitive":return t.primitive(e);case"object":return t.object(e);case"array":return t.array(e);case"map":return t.map(e);case"optional":return t.optional(e);case"enum":return t.enum(e);case"reference":return t.reference(e);case"literal":return t.literal(e);case"oneOf":return t.oneOf(e.value);case"nullable":return t.nullable(e);case"unknown":return t.unknown(e);default:return t._other(e)}}}});var btc=h(()=>{"use strict"});var Etc=h(()=>{"use strict"});var Itc=h(()=>{"use strict"});var vtc=h(()=>{"use strict"});var xtc=h(()=>{"use strict"});var Ctc=h(()=>{"use strict"});var wtc=h(()=>{"use strict"});var $$i=h(()=>{"use strict";zec();Mec();Lec();Uec();Vec();_ec();qec();Gec();Wec();Hec();Kec();Jec();Yec();Xec();Zec();$ec();etc();ttc();rtc();ntc();itc();otc();stc();atc();ctc();utc();ltc();ptc();ftc();dtc();mtc();htc();gtc();Atc();ytc();btc();Etc();Itc();vtc();xtc();Ctc();wtc()});var Stc=h(()=>{"use strict";$$i()});var Ttc=h(()=>{"use strict";TZa();G$i();jZa();W$i();Qec();Z$i();Stc();$$i()});var rc=h(()=>{"use strict";Ttc()});var C7,Otc,_kt,eeo,s9b,teo=h(()=>{"use strict";C7={Debug:"debug",Info:"info",Warn:"warn",Error:"error"},Otc={[C7.Debug]:1,[C7.Info]:2,[C7.Warn]:3,[C7.Error]:4},_kt=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)}},eeo=class{level;logger;silent;constructor(t){this.level=Otc[t.level],this.logger=t.logger,this.silent=t.silent}shouldLog(t){return!this.silent&&this.level<=Otc[t]}isDebug(){return this.shouldLog(C7.Debug)}debug(t,...r){this.isDebug()&&this.logger.debug(t,...r)}isInfo(){return this.shouldLog(C7.Info)}info(t,...r){this.isInfo()&&this.logger.info(t,...r)}isWarn(){return this.shouldLog(C7.Warn)}warn(t,...r){this.isWarn()&&this.logger.warn(t,...r)}isError(){return this.shouldLog(C7.Error)}error(t,...r){this.isError()&&this.logger.error(t,...r)}},s9b=new eeo({level:C7.Info,logger:new _kt,silent:!0})});var Btc,Ptc=h(()=>{"use strict";teo();(function(e){e.LogLevel=C7,e.ConsoleLogger=_kt})(Btc||(Btc={}))});var Dtc=h(()=>{"use strict";Ptc()});var Rtc=h(()=>{"use strict";Dtc()});var ktc=h(()=>{"use strict"});var Ftc=h(()=>{"use strict";teo()});var Ntc=h(()=>{"use strict"});var Uu,Aw=h(()=>{"use strict";Uu={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 Jd(e,t){return`Expected ${t}. Received ${sxf(e)}.`}function sxf(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 iF=h(()=>{"use strict"});function qS(e){return{...e,json:jtc(e.json),parse:jtc(e.parse)}}function jtc(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(`
175
175
  `)),{ok:!0,value:t}):n}}var ZY=h(()=>{"use strict"});function gCr(e){return e.path.length===0?e.message:`${e.path.join(" -> ")}: ${e.message}`}var reo=h(()=>{"use strict"});var hJe,neo=h(()=>{"use strict";reo();hJe=class e extends Error{errors;constructor(t){super(t.map(gCr).join("; ")),this.errors=t,Object.setPrototypeOf(this,e.prototype)}}});var gJe,ieo=h(()=>{"use strict";reo();gJe=class e extends Error{errors;constructor(t){super(t.map(gCr).join("; ")),this.errors=t,Object.setPrototypeOf(this,e.prototype)}}});function jm(e){return{nullable:()=>axf(e),optional:()=>oeo(e),optionalNullable:()=>cxf(e),transform:t=>seo(e,t),parseOrThrow:(t,r)=>{let n=e.parse(t,r);if(n.ok)return n.value;throw new gJe(n.errors)},jsonOrThrow:(t,r)=>{let n=e.json(t,r);if(n.ok)return n.value;throw new hJe(n.errors)}}}function axf(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:()=>Uu.NULLABLE};return{...t,...jm(t)}}function oeo(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:()=>Uu.OPTIONAL};return{...t,...jm(t)}}function cxf(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:()=>Uu.OPTIONAL_NULLABLE};return{...t,...jm(t)}}function seo(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,...jm(r)}}var Qtc=h(()=>{"use strict";Aw();neo();ieo()});var kj=h(()=>{"use strict";Qtc();neo();ieo()});function ztc(){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:Jd(t,"bigint | number")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="bigint"?{ok:!1,errors:[{path:r,message:Jd(t,"bigint")}]}:{ok:!0,value:t},getType:()=>Uu.BIGINT};return{...qS(e),...jm(e)}}var Mtc=h(()=>{"use strict";Aw();iF();ZY();kj()});var Ltc=h(()=>{"use strict";Mtc()});function Utc(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="string"?{ok:!1,errors:[{path:r,message:Jd(t,"string")}]}:uxf.test(t)?{ok:!0,value:new Date(t)}:{ok:!1,errors:[{path:r,message:Jd(t,"ISO 8601 date string")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>t instanceof Date?{ok:!0,value:t.toISOString()}:{ok:!1,errors:[{path:r,message:Jd(t,"Date object")}]},getType:()=>Uu.DATE};return{...qS(e),...jm(e)}}var uxf,Vtc=h(()=>{"use strict";Aw();iF();ZY();kj();uxf=/^([+-]?\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 _tc=h(()=>{"use strict";Vtc()});function GS(e,t){return()=>{let r={parse:t,json:t,getType:()=>e};return{...qS(r),...jm(r)}}}var $Y=h(()=>{"use strict";kj();ZY()});function ACr(e){let t=new Set(e);return GS(Uu.ENUM,(n,{allowUnrecognizedEnumValues:i,breadcrumbsPrefix:o=[]}={})=>typeof n!="string"?{ok:!1,errors:[{path:o,message:Jd(n,"string")}]}:!t.has(n)&&!i?{ok:!1,errors:[{path:o,message:Jd(n,"enum")}]}:{ok:!0,value:n})()}var qtc=h(()=>{"use strict";Aw();$Y();iF()});var aeo=h(()=>{"use strict";qtc()});function Gtc(e){let t=ceo(e);return{...t,...jm(t)}}function ceo(e){return{parse:(t,r)=>AJe(e).parse(t,r),json:(t,r)=>AJe(e).json(t,r),getType:()=>AJe(e).getType()}}function AJe(e){let t=e;return t.__zurg_memoized==null&&(t.__zurg_memoized=e()),t.__zurg_memoized}var ueo=h(()=>{"use strict";kj()});function leo(e){return Object.entries(e)}var Wtc=h(()=>{"use strict"});function qkt(e,t){let r=new Set(t);return Object.entries(e).reduce((n,[i,o])=>(r.has(i)&&(n[i]=o),n),{})}var peo=h(()=>{"use strict"});function wue(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return t===null?!0:Object.getPrototypeOf(t)===null}var Gkt=h(()=>{"use strict"});function Wkt(e){return Object.keys(e)}var feo=h(()=>{"use strict"});function Htc(e,t){let r=[],n=[];for(let i of e)t(i)?r.push(i):n.push(i);return[r,n]}var Ktc=h(()=>{"use strict"});function w7(e){return{withParsedProperties:t=>deo(e,t)}}function deo(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(lxf.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(!wue(n))return{ok:!1,errors:[{path:i?.breadcrumbsPrefix??[],message:Jd(n,"object")}]};let o=new Set(Object.keys(t)),s=qkt(n,Object.keys(n).filter(a=>!o.has(a)));return e.json(s,i)},getType:()=>e.getType()};return{...r,...jm(r),...w7(r)}}var lxf,Jtc=h(()=>{"use strict";peo();iF();Gkt();kj();lxf=Object.prototype.hasOwnProperty});var Hkt=h(()=>{"use strict";Jtc()});function Ytc(e,t){return{rawKey:e,valueSchema:t,isProperty:!0}}function Sue(e){return e.isProperty}var meo=h(()=>{"use strict"});function yCr(e){let t;function r(){if(t==null){t={};for(let[d,f]of leo(e)){let m=Sue(f)?f.rawKey:d,g=Sue(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 leo(e)){let m=Sue(f)?f.rawKey:d,g=Sue(f)?f.valueSchema:f;fxf(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])=>Sue(f)?f.rawKey:d),_getParsedProperties:()=>Wkt(e),parse:(d,f)=>{let m=f?.breadcrumbsPrefix??[];return Xtc({value:d,requiredKeys:a(),requiredKeysSet:u(),getProperty:g=>{let A=r()[g];if(A!=null)return{transformedKey:A.parsedKey,transform:y=>{let E=[...m,g];return A.valueSchema.parse(y,{...f,breadcrumbsPrefix:E})}}},unrecognizedObjectKeys:f?.unrecognizedObjectKeys,skipValidation:f?.skipValidation,breadcrumbsPrefix:m,omitUndefined:f?.omitUndefined})},json:(d,f)=>{let m=f?.breadcrumbsPrefix??[];return Xtc({value:d,requiredKeys:c(),requiredKeysSet:l(),getProperty:g=>{let A=e[g];if(A!=null)return Sue(A)?{transformedKey:A.rawKey,transform:y=>{let E=[...m,g];return A.valueSchema.json(y,{...f,breadcrumbsPrefix:E})}}:{transformedKey:g,transform:y=>{let E=[...m,g];return A.json(y,{...f,breadcrumbsPrefix:E})}}},unrecognizedObjectKeys:f?.unrecognizedObjectKeys,skipValidation:f?.skipValidation,breadcrumbsPrefix:m,omitUndefined:f?.omitUndefined})},getType:()=>Uu.OBJECT};return{...qS(p),...jm(p),...w7(p),...RNe(p)}}function Xtc({value:e,requiredKeys:t,requiredKeysSet:r,getProperty:n,unrecognizedObjectKeys:i="fail",skipValidation:o=!1,breadcrumbsPrefix:s=[]}){if(!wue(e))return{ok:!1,errors:[{path:s,message:Jd(e,"object")}]};let a=t.length,c=[],u={};for(let l in e){if(!pxf.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 RNe(e){return{extend:t=>{let r={_getParsedProperties:()=>[...e._getParsedProperties(),...t._getParsedProperties()],_getRawProperties:()=>[...e._getRawProperties(),...t._getRawProperties()],parse:(n,i)=>Ztc({extensionKeys:t._getRawProperties(),value:n,transformBase:o=>e.parse(o,i),transformExtension:o=>t.parse(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),json:(n,i)=>Ztc({extensionKeys:t._getParsedProperties(),value:n,transformBase:o=>e.json(o,i),transformExtension:o=>t.json(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),getType:()=>Uu.OBJECT};return{...r,...jm(r),...w7(r),...RNe(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:()=>Uu.OBJECT};return{...n,...jm(n),...w7(n),...RNe(n)}}}}function Ztc({extensionKeys:e,value:t,transformBase:r,transformExtension:n,breadcrumbsPrefix:i=[]}){if(!wue(t))return{ok:!1,errors:[{path:i,message:Jd(t,"object")}]};let o=new Set(e),[s,a]=Htc(Wkt(t),l=>o.has(l)),c=r(qkt(t,a)),u=n(qkt(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 fxf(e){return!dxf(e)}function dxf(e){switch(e.getType()){case Uu.ANY:case Uu.UNKNOWN:case Uu.OPTIONAL:case Uu.OPTIONAL_NULLABLE:return!0;default:return!1}}var pxf,heo=h(()=>{"use strict";Aw();Wtc();peo();iF();Gkt();feo();ZY();Ktc();Hkt();kj();meo();pxf=Object.prototype.hasOwnProperty});function $tc(e){return yCr(e)}var erc=h(()=>{"use strict";heo()});var geo=h(()=>{"use strict";heo();erc();meo()});function trc(e){let t={...ceo(e),_getRawProperties:()=>AJe(e)._getRawProperties(),_getParsedProperties:()=>AJe(e)._getParsedProperties()};return{...t,...jm(t),...w7(t),...RNe(t)}}var rrc=h(()=>{"use strict";geo();Hkt();kj();ueo()});var nrc=h(()=>{"use strict";ueo();rrc()});function bCr(e){let t={parse:(r,n)=>irc(r,(i,o)=>e.parse(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),json:(r,n)=>irc(r,(i,o)=>e.json(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),getType:()=>Uu.LIST};return{...qS(t),...jm(t)}}function irc(e,t){if(!Array.isArray(e))return{ok:!1,errors:[{message:Jd(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 orc=h(()=>{"use strict";Aw();iF();ZY();kj()});var Aeo=h(()=>{"use strict";orc()});function src(e){return GS(Uu.BOOLEAN_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:Jd(r,`${e.toString()}`)}]})()}var arc=h(()=>{"use strict";Aw();$Y();iF()});function crc(e){return GS(Uu.STRING_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:Jd(r,`"${e}"`)}]})()}var urc=h(()=>{"use strict";Aw();$Y();iF()});var lrc=h(()=>{"use strict";arc();urc()});var prc,frc=h(()=>{"use strict";Aw();$Y();prc=GS(Uu.ANY,e=>({ok:!0,value:e}))});var drc,mrc=h(()=>{"use strict";Aw();$Y();iF();drc=GS(Uu.BOOLEAN,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="boolean"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Jd(e,"boolean")}]})});var hrc,grc=h(()=>{"use strict";Aw();$Y();hrc=GS(Uu.NEVER,(e,{breadcrumbsPrefix:t=[]}={})=>({ok:!1,errors:[{path:t,message:"Expected never"}]}))});var Arc,yrc=h(()=>{"use strict";Aw();$Y();iF();Arc=GS(Uu.NUMBER,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="number"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Jd(e,"number")}]})});var brc,Erc=h(()=>{"use strict";Aw();$Y();iF();brc=GS(Uu.STRING,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="string"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Jd(e,"string")}]})});var Irc,vrc=h(()=>{"use strict";Aw();$Y();Irc=GS(Uu.UNKNOWN,e=>({ok:!0,value:e}))});var xrc=h(()=>{"use strict";frc();mrc();grc();yrc();Erc();vrc()});function wrc(e,t){let r={parse:(n,i)=>Crc({value:n,isKeyNumeric:e.getType()===Uu.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)=>Crc({value:n,isKeyNumeric:e.getType()===Uu.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:()=>Uu.RECORD};return{...qS(r),...jm(r)}}function Crc({value:e,isKeyNumeric:t,transformKey:r,transformValue:n,breadcrumbsPrefix:i=[]}){if(!wue(e))return{ok:!1,errors:[{path:i,message:Jd(e,"object")}]};let o={},s=[];for(let a in e){if(!mxf.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 mxf,Src=h(()=>{"use strict";Aw();iF();Gkt();ZY();kj();mxf=Object.prototype.hasOwnProperty});var Trc=h(()=>{"use strict";Src()});function Orc(e){let t=bCr(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:Jd(n,"Set")}]},getType:()=>Uu.SET};return{...qS(r),...jm(r)}}var Brc=h(()=>{"use strict";Aw();iF();ZY();Aeo();kj()});var Prc=h(()=>{"use strict";Brc()});function Rrc(e){let t={parse:(r,n)=>Drc((i,o)=>i.parse(r,o),e,n),json:(r,n)=>Drc((i,o)=>i.json(r,o),e,n),getType:()=>Uu.UNDISCRIMINATED_UNION};return{...qS(t),...jm(t)}}function Drc(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 krc=h(()=>{"use strict";Aw();ZY();kj()});var Frc=h(()=>{"use strict";krc()});function Nrc(e,t){return{parsedDiscriminant:e,rawDiscriminant:t}}var jrc=h(()=>{"use strict"});function zrc(e,t){let r=typeof e=="string"?e:e.rawDiscriminant,n=typeof e=="string"?e:e.parsedDiscriminant,i=ACr(Wkt(t)),o={parse:(s,a)=>Qrc({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)=>Qrc({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:()=>Uu.UNION};return{...qS(o),...jm(o),...w7(o)}}function Qrc({value:e,discriminant:t,transformedDiscriminant:r,transformDiscriminantValue:n,getAdditionalPropertiesSchema:i,allowUnrecognizedUnionMembers:o=!1,transformAdditionalProperties:s,breadcrumbsPrefix:a=[]}){if(!wue(e))return{ok:!1,errors:[{path:a,message:Jd(e,"object")}]};let c=e[t],u={};for(let f in e)hxf.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 hxf,Mrc=h(()=>{"use strict";Aw();iF();Gkt();feo();ZY();aeo();Hkt();kj();hxf=Object.prototype.hasOwnProperty});var Lrc=h(()=>{"use strict";jrc();Mrc()});var Urc=h(()=>{"use strict";Ltc();_tc();aeo();nrc();Aeo();lrc();geo();Hkt();xrc();Trc();kj();Prc();Frc();Lrc()});var $={};X($,{JsonError:()=>hJe,ParseError:()=>gJe,any:()=>prc,bigint:()=>ztc,boolean:()=>drc,booleanLiteral:()=>src,date:()=>Utc,discriminant:()=>Nrc,enum_:()=>ACr,getObjectLikeUtils:()=>w7,getObjectUtils:()=>RNe,getSchemaUtils:()=>jm,isProperty:()=>Sue,lazy:()=>Gtc,lazyObject:()=>trc,list:()=>bCr,never:()=>hrc,number:()=>Arc,object:()=>yCr,objectWithoutOptionalProperties:()=>$tc,optional:()=>oeo,property:()=>Ytc,record:()=>wrc,set:()=>Orc,string:()=>brc,stringLiteral:()=>crc,transform:()=>seo,undiscriminatedUnion:()=>Rrc,union:()=>zrc,unknown:()=>Irc,withParsedProperties:()=>deo});var Vrc=h(()=>{"use strict";Urc()});var _rc=h(()=>{"use strict"});var gr=h(()=>{"use strict";ktc();Ftc();Ntc();Vrc();_rc()});var ECr,yeo=h(()=>{"use strict";gr();ECr=$.objectWithoutOptionalProperties({usernameVariableName:$.string().optional(),usernameEnvVar:$.string().optional(),usernamePlaceholder:$.string().optional(),passwordVariableName:$.string().optional(),passwordEnvVar:$.string().optional(),passwordPlaceholder:$.string().optional()})});var ICr,beo=h(()=>{"use strict";gr();ICr=$.objectWithoutOptionalProperties({tokenVariableName:$.string().optional(),tokenEnvVar:$.string().optional(),tokenPlaceholder:$.string().optional()})});var vCr,Eeo=h(()=>{"use strict";gr();vCr=$.objectWithoutOptionalProperties({typeName:$.string()})});var xCr,Ieo=h(()=>{"use strict";rc();gr();Eeo();xCr=$.union("type",{protobuf:vCr}).transform({transform:e=>e.type==="protobuf"?mJe.protobuf(e):e,untransform:({_visit:e,...t})=>t})});var CCr,veo=h(()=>{"use strict";gr();CCr=$.objectWithoutOptionalProperties({headerName:$.string(),prefix:$.string().optional(),headerVariableName:$.string().optional(),headerEnvVar:$.string().optional(),headerPlaceholder:$.string().optional()})});var wCr,xeo=h(()=>{"use strict";gr();wCr=$.objectWithoutOptionalProperties({type:$.stringLiteral("namespace"),name:$.string()})});var SCr,Ceo=h(()=>{"use strict";gr();SCr=$.string()});var TCr,weo=h(()=>{"use strict";gr();TCr=$.enum_(["GenerallyAvailable","Beta","Deprecated","Alpha","Preview","Legacy"])});var as,Kf=h(()=>{"use strict";gr();weo();as=$.objectWithoutOptionalProperties({availability:TCr.optional()})});var Pn,ma=h(()=>{"use strict";gr();Pn=$.objectWithoutOptionalProperties({description:$.string().optional()})});var bd,WS=h(()=>{"use strict";gr();bd=$.objectWithoutOptionalProperties({inline:$.boolean().optional()})});var qc,oy=h(()=>{"use strict";gr();qc=$.objectWithoutOptionalProperties({nameOverride:$.string().optional(),generatedName:$.string()})});var uc,tA=h(()=>{"use strict";gr();uc=$.objectWithoutOptionalProperties({namespace:$.string().optional()})});var OCr,Seo=h(()=>{"use strict";gr();xeo();OCr=$.undiscriminatedUnion([$.string(),wCr])});var ibe,Kkt=h(()=>{"use strict";gr();Seo();ibe=$.list(OCr)});var Vu,d0=h(()=>{"use strict";gr();Kkt();Vu=$.objectWithoutOptionalProperties({groupName:ibe.optional()})});var BCr,Teo=h(()=>{"use strict";gr();BCr=$.objectWithoutOptionalProperties({file:$.string()})});var PCr,Oeo=h(()=>{"use strict";gr();PCr=$.objectWithoutOptionalProperties({file:$.string()})});var DCr,Beo=h(()=>{"use strict";rc();gr();Teo();Oeo();DCr=$.union("type",{openapi:BCr,protobuf:PCr}).transform({transform:e=>{switch(e.type){case"openapi":return WP.openapi(e);case"protobuf":return WP.protobuf(e);default:return e}},untransform:({_visit:e,...t})=>t})});var qo,gf=h(()=>{"use strict";gr();Beo();qo=$.objectWithoutOptionalProperties({source:DCr.optional()})});var _u,m0=h(()=>{"use strict";gr();_u=$.objectWithoutOptionalProperties({title:$.string().optional()})});var RCr,Peo=h(()=>{"use strict";gr();RCr=$.objectWithoutOptionalProperties({snake:$.string().optional(),camel:$.string().optional(),screamingSnake:$.string().optional(),pascal:$.string().optional()})});var obe,kCr=h(()=>{"use strict";gr();Kf();ma();Peo();obe=$.objectWithoutOptionalProperties({nameOverride:$.string().optional(),generatedName:$.string(),value:$.string(),casing:RCr.optional()}).extend(Pn).extend(as)});var yJe,FCr=h(()=>{"use strict";gr();Kf();ma();WS();oy();tA();d0();gf();m0();kCr();yJe=$.objectWithoutOptionalProperties({default:obe.optional(),values:$.list(obe)}).extend(Vu).extend(uc).extend(qc).extend(Pn).extend(as).extend(qo).extend(_u).extend(bd)});var NCr,Deo=h(()=>{"use strict";gr();FCr();NCr=$.objectWithoutOptionalProperties({scopesEnum:yJe.optional()})});var jCr,Reo=h(()=>{"use strict";gr();jCr=$.objectWithoutOptionalProperties({queryParameterName:$.string()})});var oF,sbe=h(()=>{"use strict";gr();oF=$.string()});var QCr,keo=h(()=>{"use strict";rc();gr();yeo();beo();veo();Deo();Reo();QCr=$.union("type",{basic:ECr,bearer:ICr,header:CCr,query:jCr,oauth:NCr}).transform({transform:e=>{switch(e.type){case"basic":return US.basic(e);case"bearer":return US.bearer(e);case"header":return US.header(e);case"query":return US.query(e);case"oauth":return US.oauth(e);default:return e}},untransform:({_visit:e,...t})=>t})});var abe,Jkt=h(()=>{"use strict";gr();abe=$.string()});var zCr,Feo=h(()=>{"use strict";gr();zCr=$.objectWithoutOptionalProperties({id:$.string(),default:$.string().optional(),values:$.list($.string()).optional()})});var Ykt,Neo=h(()=>{"use strict";gr();Feo();ma();Ykt=$.objectWithoutOptionalProperties({name:$.string().optional(),url:$.string(),audiences:$.list($.string()).optional(),defaultUrl:$.string().optional(),urlTemplate:$.string().optional(),variables:$.list(zCr).optional()}).extend(Pn)});var eX,bJe=h(()=>{"use strict";gr();eX=$.number()});var sF,cbe=h(()=>{"use strict";gr();sF=$.string()});var MCr,jeo=h(()=>{"use strict";gr();cbe();ma();MCr=$.objectWithoutOptionalProperties({id:sF}).extend(Pn)});var HS,tX=h(()=>{"use strict";gr();Ieo();HS=$.objectWithoutOptionalProperties({encoding:xCr.optional()})});var rX,EJe=h(()=>{"use strict";gr();rX=$.objectWithoutOptionalProperties({sdkMethodName:$.string().optional()})});var HU,kNe=h(()=>{"use strict";gr();bJe();HU=$.objectWithoutOptionalProperties({statusCode:eX.optional()})});var Qeo=h(()=>{"use strict";yeo();beo();Ieo();veo();xeo();Ceo();Deo();Teo();Eeo();Oeo();Reo();sbe();Seo();Kkt();keo();Jkt();Neo();Feo();Beo();bJe();jeo();cbe();Kf();ma();tX();WS();oy();tA();d0();EJe();gf();kNe();m0()});var zeo={};X(zeo,{BasicSecurityScheme:()=>ECr,BearerSecurityScheme:()=>ICr,Encoding:()=>xCr,HeaderSecurityScheme:()=>CCr,Namespace:()=>wCr,NamespaceId:()=>SCr,OauthSecurityScheme:()=>NCr,OpenApiSource:()=>BCr,ProtobufEncoding:()=>vCr,ProtobufSource:()=>PCr,QuerySecurityScheme:()=>jCr,SchemaId:()=>oF,SdkGroup:()=>OCr,SdkGroupName:()=>ibe,SecurityScheme:()=>QCr,SecuritySchemeId:()=>abe,Server:()=>Ykt,ServerVariable:()=>zCr,Source:()=>DCr,StatusCode:()=>eX,Tag:()=>MCr,TagId:()=>sF,WithAvailability:()=>as,WithDescription:()=>Pn,WithEncoding:()=>HS,WithInline:()=>bd,WithName:()=>qc,WithNamespace:()=>uc,WithSdkGroupName:()=>Vu,WithSdkMethodName:()=>rX,WithSource:()=>qo,WithStatusCode:()=>HU,WithTitle:()=>_u});var qrc=h(()=>{"use strict";Qeo()});var LCr,Meo=h(()=>{"use strict";rc();gr();LCr=$.union("type",{boolean:$.object({value:$.boolean()}),string:$.object({value:$.string()})}).transform({transform:e=>{switch(e.type){case"boolean":return rbe.boolean(e.value);case"string":return rbe.string(e.value);default:return e}},untransform:({_visit:e,...t})=>t})});var UCr,Leo=h(()=>{"use strict";gr();UCr=$.objectWithoutOptionalProperties({})});var IJe,VCr=h(()=>{"use strict";rc();gr();IJe=$.union("type",{int:$.object({value:$.number()}),int64:$.object({value:$.number()}),uint:$.object({value:$.number()}),uint64:$.object({value:$.number()}),float:$.object({value:$.number()}),double:$.object({value:$.number()}),string:$.object({value:$.string()}),datetime:$.object({value:$.string()}),datetimeRfc2822:$.object({value:$.string()}),date:$.object({value:$.string()}),base64:$.object({value:$.string()}),boolean:$.object({value:$.boolean()})}).transform({transform:e=>{switch(e.type){case"int":return vo.int(e.value);case"int64":return vo.int64(e.value);case"uint":return vo.uint(e.value);case"uint64":return vo.uint64(e.value);case"float":return vo.float(e.value);case"double":return vo.double(e.value);case"string":return vo.string(e.value);case"datetime":return vo.datetime(e.value);case"datetimeRfc2822":return vo.datetimeRfc2822(e.value);case"date":return vo.date(e.value);case"base64":return vo.base64(e.value);case"boolean":return vo.boolean(e.value);default:return e}},untransform:({_visit:e,...t})=>t})});var Qh,Grc=h(()=>{"use strict";rc();gr();Ra();Meo();Leo();VCr();Qh=$.union("type",{primitive:$.object({value:IJe}),object:$.lazyObject(()=>_Cr),array:$.object({value:$.list($.lazy(()=>Qh))}),map:$.object({value:$.list($.lazyObject(()=>GCr))}),enum:$.object({value:$.string()}),literal:$.object({value:LCr}),oneOf:$.object({value:$.lazy(()=>qCr)}),null:UCr,unknown:$.object({value:$.lazy(()=>Qh)})}).transform({transform:e=>{switch(e.type){case"primitive":return gc.primitive(e.value);case"object":return gc.object(e);case"array":return gc.array(e.value);case"map":return gc.map(e.value);case"enum":return gc.enum(e.value);case"literal":return gc.literal(e.value);case"oneOf":return gc.oneOf(e.value);case"null":return gc.null(e);case"unknown":return gc.unknown(e.value);default:return e}},untransform:({_visit:e,...t})=>t})});var vJe,WCr=h(()=>{"use strict";gr();vJe=$.string()});var _Cr,Wrc=h(()=>{"use strict";gr();Ra();WCr();_Cr=$.objectWithoutOptionalProperties({properties:$.record(vJe,$.lazy(()=>Qh))})});var qCr,Hrc=h(()=>{"use strict";rc();gr();Ra();WCr();qCr=$.union("type",{discriminated:$.object({value:$.record(vJe,$.lazy(()=>Qh))}),undiscriminated:$.object({value:$.lazy(()=>Qh)})}).transform({transform:e=>{switch(e.type){case"discriminated":return tbe.discriminated(e.value);case"undiscriminated":return tbe.undiscriminated(e.value);default:return e}},untransform:({_visit:e,...t})=>t})});var GCr,Krc=h(()=>{"use strict";gr();Ra();VCr();GCr=$.objectWithoutOptionalProperties({key:IJe,value:$.lazy(()=>Qh)})});var Ueo=h(()=>{"use strict";Grc();Wrc();Hrc();Krc();Meo();Leo();VCr();WCr()});var Veo={};X(Veo,{FullExample:()=>Qh,FullObjectExample:()=>_Cr,FullOneOfExample:()=>qCr,KeyValuePair:()=>GCr,LiteralExample:()=>LCr,NullExample:()=>UCr,PrimitiveExample:()=>IJe,PropertyKey:()=>vJe});var Jrc=h(()=>{"use strict";Ueo()});var xJe,HCr=h(()=>{"use strict";gr();sbe();xJe=$.objectWithoutOptionalProperties({propertyKey:$.string(),allOfSchemaIds:$.list(oF),conflictingTypeSignatures:$.boolean()})});var KCr,Yrc=h(()=>{"use strict";gr();Ra();Kf();ma();WS();oy();tA();d0();m0();KCr=$.objectWithoutOptionalProperties({value:$.lazy(()=>hl),minItems:$.number().optional(),maxItems:$.number().optional(),default:$.unknown().optional()}).extend(Vu).extend(uc).extend(qc).extend(Pn).extend(as).extend(_u).extend(bd)});var JCr,_eo=h(()=>{"use strict";gr();JCr=$.enum_(["rsa-sha256","rsa-sha384","rsa-sha512","ecdsa-sha256","ecdsa-sha384","ecdsa-sha512","ed25519"])});var YCr,qeo=h(()=>{"use strict";gr();YCr=$.enum_(["alphabetical"])});var XCr,Geo=h(()=>{"use strict";gr();XCr=$.enum_(["body","timestamp","notification-url","message-id"])});var CJe,ZCr=h(()=>{"use strict";gr();qeo();Geo();CJe=$.objectWithoutOptionalProperties({components:$.list(XCr),delimiter:$.string().optional(),bodySort:YCr.optional()})});var ube,Xkt=h(()=>{"use strict";gr();ube=$.enum_(["base64","hex"])});var $Cr,Weo=h(()=>{"use strict";gr();$Cr=$.enum_(["unix-seconds","unix-millis","iso8601"])});var wJe,ewr=h(()=>{"use strict";gr();Weo();wJe=$.objectWithoutOptionalProperties({header:$.string(),format:$Cr.optional(),tolerance:$.number().optional()})});var twr,Heo=h(()=>{"use strict";gr();_eo();ZCr();Xkt();ewr();twr=$.objectWithoutOptionalProperties({header:$.string(),asymmetricAlgorithm:JCr,encoding:ube.optional(),signaturePrefix:$.string().optional(),jwksUrl:$.string().optional(),keyIdHeader:$.string().optional(),payloadFormat:CJe.optional(),timestamp:wJe.optional()})});var rwr,Keo=h(()=>{"use strict";gr();rwr=$.objectWithoutOptionalProperties({default:$.boolean().optional()})});var SJe,nwr=h(()=>{"use strict";gr();ma();gf();kNe();SJe=$.objectWithoutOptionalProperties({}).extend(Pn).extend(qo).extend(HU)});var TJe,Xrc=h(()=>{"use strict";gr();Ra();TJe=$.objectWithoutOptionalProperties({key:$.string(),schema:$.lazy(()=>hl)})});var iwr,Jeo=h(()=>{"use strict";gr();iwr=$.objectWithoutOptionalProperties({cursor:$.string(),nextCursor:$.property("next_cursor",$.string()),results:$.string()})});var owr,Yeo=h(()=>{"use strict";gr();ma();owr=$.objectWithoutOptionalProperties({name:$.string().optional(),language:$.string(),code:$.string(),install:$.string().optional()}).extend(Pn)});var swr,Xeo=h(()=>{"use strict";gr();swr=$.enum_(["curl","python","javascript","typescript","go","ruby","csharp","java","js","node","ts","nodets","golang","dotnet","jvm"])});var awr,Zeo=h(()=>{"use strict";gr();ma();Xeo();awr=$.objectWithoutOptionalProperties({name:$.string().optional(),sdk:swr,code:$.string()}).extend(Pn)});var cwr,$eo=h(()=>{"use strict";rc();gr();Yeo();Zeo();cwr=$.union("type",{language:owr,sdk:awr}).transform({transform:e=>{switch(e.type){case"language":return JY.language(e);case"sdk":return JY.sdk(e);default:return e}},untransform:({_visit:e,...t})=>t})});var uwr,eto=h(()=>{"use strict";gr();uwr=$.objectWithoutOptionalProperties({results:$.string()})});var OJe,lwr=h(()=>{"use strict";gr();OJe=$.enum_(["data","protocol"])});var pwr,Zrc=h(()=>{"use strict";gr();Ra();Kf();ma();tX();WS();oy();tA();d0();gf();m0();lwr();pwr=$.objectWithoutOptionalProperties({discriminantProperty:$.string(),discriminantPropertyNameOverride:$.string().optional(),discriminatorContext:OJe.optional(),defaultDiscriminantValue:$.string().optional(),commonProperties:$.list($.lazyObject(()=>TJe)),schemas:$.record($.string(),$.lazy(()=>hl))}).extend(Vu).extend(uc).extend(qc).extend(Pn).extend(as).extend(HS).extend(qo).extend(_u).extend(bd)});var fwr,tto=h(()=>{"use strict";gr();fwr=$.objectWithoutOptionalProperties({default:$.number().optional(),minimum:$.number().optional(),maximum:$.number().optional(),exclusiveMinimum:$.boolean().optional(),exclusiveMaximum:$.boolean().optional(),multipleOf:$.number().optional()})});var dwr,rto=h(()=>{"use strict";gr();dwr=$.unknown()});var mwr,nto=h(()=>{"use strict";gr();Ra();mwr=$.objectWithoutOptionalProperties({sse:$.boolean(),events:$.list($.lazy(()=>Qh))})});var hwr,ito=h(()=>{"use strict";rc();gr();Ra();nto();hwr=$.union("type",{withStreaming:mwr,withoutStreaming:$.object({value:$.lazy(()=>Qh)})}).transform({transform:e=>{switch(e.type){case"withStreaming":return WU.withStreaming(e);case"withoutStreaming":return WU.withoutStreaming(e.value);default:return e}},untransform:({_visit:e,...t})=>t})});var BJe,gwr=h(()=>{"use strict";gr();Ra();BJe=$.objectWithoutOptionalProperties({name:$.string(),value:$.lazy(()=>Qh)})});var Awr,oto=h(()=>{"use strict";gr();Ra();Awr=$.objectWithoutOptionalProperties({name:$.string(),parameterNameOverride:$.string().optional(),value:$.lazy(()=>Qh)})});var PJe,ywr=h(()=>{"use strict";gr();Ra();PJe=$.objectWithoutOptionalProperties({name:$.string(),value:$.lazy(()=>Qh)})});var bwr,sto=h(()=>{"use strict";gr();Ra();ma();$eo();ito();gwr();oto();ywr();bwr=$.objectWithoutOptionalProperties({name:$.string().optional(),pathParameters:$.list(Awr).optional(),queryParameters:$.list(PJe).optional(),headers:$.list(BJe).optional(),request:$.lazy(()=>Qh).optional(),response:hwr.optional(),codeSamples:$.list(cwr)}).extend(Pn)});var DJe,Ewr=h(()=>{"use strict";rc();gr();rto();sto();DJe=$.union("type",{unknown:$.object({value:dwr}),full:bwr}).transform({transform:e=>{switch(e.type){case"unknown":return GU.unknown(e.value);case"full":return GU.full(e);default:return e}},untransform:({_visit:e,...t})=>t})});var nX,RJe=h(()=>{"use strict";gr();Kkt();nX=$.objectWithoutOptionalProperties({groupName:ibe,methodName:$.string()})});var kJe,Iwr=h(()=>{"use strict";gr();Jkt();kJe=$.list($.record(abe,$.list($.string())))});var lbe,Zkt=h(()=>{"use strict";gr();Ra();Kf();ma();gf();lbe=$.objectWithoutOptionalProperties({name:$.string(),schema:$.lazy(()=>hl),env:$.string().optional(),parameterNameOverride:$.string().optional(),clientDefault:$.unknown().optional()}).extend(Pn).extend(as).extend(qo)});var FJe,vwr=h(()=>{"use strict";gr();FJe=$.objectWithoutOptionalProperties({name:$.string().optional(),url:$.string().optional(),audiences:$.list($.string()).optional()})});var xwr,ato=h(()=>{"use strict";gr();Ra();xwr=$.objectWithoutOptionalProperties({name:$.string().optional(),description:$.string().optional(),example:$.lazy(()=>Qh)})});var Cwr,cto=h(()=>{"use strict";gr();Ra();ma();oy();gf();ato();Cwr=$.objectWithoutOptionalProperties({schema:$.lazy(()=>hl).optional(),examples:$.list(xwr).optional()}).extend(Pn).extend(qc).extend(qo)});var NJe,wwr=h(()=>{"use strict";gr();NJe=$.enum_(["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS","TRACE"])});var Swr,uto=h(()=>{"use strict";gr();Swr=$.objectWithoutOptionalProperties({offset:$.string(),results:$.string(),step:$.string().optional(),hasNextPage:$.string().optional()})});var Twr,lto=h(()=>{"use strict";gr();Twr=$.objectWithoutOptionalProperties({nextPath:$.string(),results:$.string()})});var Owr,pto=h(()=>{"use strict";gr();Owr=$.objectWithoutOptionalProperties({nextUri:$.string(),results:$.string()})});var jJe,Bwr=h(()=>{"use strict";rc();gr();Jeo();eto();uto();lto();pto();jJe=$.union("type",{cursor:iwr,offset:Swr,custom:uwr,uri:Owr,path:Twr}).transform({transform:e=>{switch(e.type){case"cursor":return gw.cursor(e);case"offset":return gw.offset(e);case"custom":return gw.custom(e);case"uri":return gw.uri(e);case"path":return gw.path(e);default:return e}},untransform:({_visit:e,...t})=>t})});var pbe,$kt=h(()=>{"use strict";gr();Ra();Kf();ma();gf();pbe=$.objectWithoutOptionalProperties({name:$.string(),schema:$.lazy(()=>hl),variableReference:$.string().optional(),parameterNameOverride:$.string().optional(),clientDefault:$.unknown().optional()}).extend(Pn).extend(as).extend(qo)});var QJe,Pwr=h(()=>{"use strict";gr();Ra();Kf();ma();gf();QJe=$.objectWithoutOptionalProperties({name:$.string(),schema:$.lazy(()=>hl),parameterNameOverride:$.string().optional(),explode:$.boolean().optional(),clientDefault:$.unknown().optional()}).extend(Pn).extend(as).extend(qo)});var Dwr,fto=h(()=>{"use strict";gr();Ra();ma();gf();Dwr=$.objectWithoutOptionalProperties({schema:$.lazy(()=>hl),contentType:$.string().optional(),additionalProperties:$.boolean()}).extend(Pn).extend(qo)});var Rwr,dto=h(()=>{"use strict";gr();Ra();ma();gf();Rwr=$.objectWithoutOptionalProperties({schema:$.lazy(()=>hl),contentType:$.string().optional(),additionalProperties:$.boolean()}).extend(Pn).extend(qo)});var kwr,mto=h(()=>{"use strict";gr();kwr=$.enum_(["json","form"])});var Fwr,hto=h(()=>{"use strict";gr();ma();Fwr=$.objectWithoutOptionalProperties({isOptional:$.boolean(),isArray:$.boolean()}).extend(Pn)});var Nwr,gto=h(()=>{"use strict";rc();gr();Ra();hto();Nwr=$.union("type",{file:Fwr,json:$.object({value:$.lazy(()=>hl)})}).transform({transform:e=>{switch(e.type){case"file":return YY.file(e);case"json":return YY.json(e.value);default:return e}},untransform:({_visit:e,...t})=>t})});var fbe,eFt=h(()=>{"use strict";gr();ma();mto();gto();fbe=$.objectWithoutOptionalProperties({key:$.string(),schema:Nwr,contentType:$.string().optional(),exploded:$.boolean().optional(),encoding:kwr.optional()}).extend(Pn)});var zJe,jwr=h(()=>{"use strict";gr();ma();gf();eFt();zJe=$.objectWithoutOptionalProperties({name:$.string().optional(),properties:$.list(fbe)}).extend(Pn).extend(qo)});var MJe,Qwr=h(()=>{"use strict";gr();ma();gf();MJe=$.objectWithoutOptionalProperties({contentType:$.string().optional()}).extend(Pn).extend(qo)});var zwr,Ato=h(()=>{"use strict";rc();gr();fto();dto();jwr();Qwr();zwr=$.union("type",{octetStream:MJe,multipart:zJe,json:Rwr,formUrlEncoded:Dwr}).transform({transform:e=>{switch(e.type){case"octetStream":return x7.octetStream(e);case"multipart":return x7.multipart(e);case"json":return x7.json(e);case"formUrlEncoded":return x7.formUrlEncoded(e);default:return e}},untransform:({_visit:e,...t})=>t})});var LJe,Mwr=h(()=>{"use strict";gr();ma();gf();kNe();LJe=$.objectWithoutOptionalProperties({}).extend(Pn).extend(qo).extend(HU)});var UJe,yto=h(()=>{"use strict";gr();Ra();ma();gf();kNe();UJe=$.objectWithoutOptionalProperties({schema:$.lazy(()=>hl),responseProperty:$.string().optional(),terminator:$.string().optional(),resumable:$.boolean().optional()}).extend(Pn).extend(qo).extend(HU)});var dbe,Lwr=h(()=>{"use strict";gr();ma();gf();kNe();dbe=$.objectWithoutOptionalProperties({contentType:$.string().optional()}).extend(Pn).extend(qo).extend(HU)});var VJe,Uwr=h(()=>{"use strict";rc();gr();nwr();Mwr();yto();Lwr();VJe=$.union("type",{file:LJe,json:UJe,text:dbe,bytes:SJe,streamingSse:UJe,streamingText:dbe,streamingJson:UJe}).transform({transform:e=>{switch(e.type){case"file":return QO.file(e);case"json":return QO.json(e);case"text":return QO.text(e);case"bytes":return QO.bytes(e);case"streamingSse":return QO.streamingSse(e);case"streamingText":return QO.streamingText(e);case"streamingJson":return QO.streamingJson(e);default:return e}},untransform:({_visit:e,...t})=>t})});var _Je,Vwr=h(()=>{"use strict";rc();gr();_Je=$.union("type",{disabled:$.object({value:$.boolean().optional()})}).transform({transform:e=>e.type==="disabled"?zkt.disabled(e.value):e,untransform:({_visit:e,...t})=>t})});var _wr,bto=h(()=>{"use strict";gr();bJe();cbe();Kf();ma();tA();gf();Ewr();RJe();Iwr();Zkt();vwr();cto();wwr();Bwr();$kt();Pwr();Ato();Uwr();Vwr();_wr=$.objectWithoutOptionalProperties({authed:$.boolean(),security:kJe.optional(),internal:$.boolean().optional(),idempotent:$.boolean().optional(),method:NJe,audiences:$.list($.string()),path:$.string(),summary:$.string().optional(),subtitle:$.string().optional(),operationId:$.string().optional(),tags:$.list(sF),pathParameters:$.list(pbe),queryParameters:$.list(QJe),headers:$.list(lbe),sdkName:nX.optional(),generatedRequestName:$.string(),requestNameOverride:$.string().optional(),request:zwr.optional(),response:VJe.optional(),errors:$.record(eX,Cwr),servers:$.list(FJe),examples:$.list(DJe),pagination:jJe.optional(),retries:_Je.optional(),globalParameterIds:$.list($.string()).optional()}).extend(Pn).extend(as).extend(qo).extend(uc)});var qwr,Eto=h(()=>{"use strict";gr();Ra();qwr=$.objectWithoutOptionalProperties({header:$.string(),name:$.string().optional(),optional:$.boolean().optional(),env:$.string().optional(),schema:$.lazy(()=>hl).optional(),clientDefault:$.unknown().optional()})});var Gwr,Ito=h(()=>{"use strict";gr();Gwr=$.objectWithoutOptionalProperties({name:$.string(),parameterName:$.string().optional(),in:$.string().optional(),target:$.string().optional(),type:$.string().optional(),env:$.string().optional(),default:$.unknown().optional(),optional:$.boolean().optional(),apply:$.string().optional(),docs:$.string().optional()})});var Wwr,vto=h(()=>{"use strict";gr();Jkt();Wwr=$.list($.record(abe,$.list($.string())))});var Hwr,xto=h(()=>{"use strict";gr();Hwr=$.enum_(["sha256","sha1","sha384","sha512"])});var Kwr,Cto=h(()=>{"use strict";gr();Kwr=$.objectWithoutOptionalProperties({name:$.string()})});var Jwr,wto=h(()=>{"use strict";rc();gr();Cto();Jwr=$.union("type",{queryParameter:Kwr}).transform({transform:e=>e.type==="queryParameter"?Lkt.queryParameter(e):e,untransform:({_visit:e,...t})=>t})});var Ywr,Sto=h(()=>{"use strict";gr();xto();wto();Xkt();Ywr=$.objectWithoutOptionalProperties({algorithm:Hwr,encoding:ube.optional(),location:Jwr})});var Xwr,Tto=h(()=>{"use strict";gr();Xwr=$.objectWithoutOptionalProperties({portVariants:$.boolean(),legacyQueryEncoding:$.boolean()})});var Zwr,Oto=h(()=>{"use strict";gr();Zwr=$.enum_(["sha256","sha1","sha384","sha512"])});var $wr,Bto=h(()=>{"use strict";gr();Sto();Tto();ZCr();Oto();Xkt();ewr();$wr=$.objectWithoutOptionalProperties({header:$.string(),algorithm:Zwr.optional(),encoding:ube.optional(),signaturePrefix:$.string().optional(),payloadFormat:CJe.optional(),timestamp:wJe.optional(),bodyHashBinding:Ywr.optional(),notificationUrlNormalization:Xwr.optional()})});var eSr,Pto=h(()=>{"use strict";gr();Ra();eSr=$.objectWithoutOptionalProperties({header:$.string(),name:$.string().optional(),env:$.string().optional(),schema:$.lazy(()=>hl).optional()})});var tSr,Dto=h(()=>{"use strict";gr();tSr=$.objectWithoutOptionalProperties({default:$.number().optional(),minimum:$.number().optional(),maximum:$.number().optional(),exclusiveMinimum:$.boolean().optional(),exclusiveMaximum:$.boolean().optional(),multipleOf:$.number().optional()})});var rSr,Rto=h(()=>{"use strict";rc();gr();rSr=$.union("type",{boolean:$.object({value:$.boolean()}),string:$.object({value:$.string()})}).transform({transform:e=>{switch(e.type){case"boolean":return iy.boolean(e.value);case"string":return iy.string(e.value);default:return e}},untransform:({_visit:e,...t})=>t})});var qJe,nSr=h(()=>{"use strict";gr();Kf();ma();oy();tA();d0();m0();Rto();qJe=$.objectWithoutOptionalProperties({value:rSr}).extend(Vu).extend(uc).extend(qc).extend(Pn).extend(as).extend(_u)});var iSr,kto=h(()=>{"use strict";gr();iSr=$.objectWithoutOptionalProperties({default:$.number().optional()})});var oSr,Fto=h(()=>{"use strict";gr();oSr=$.objectWithoutOptionalProperties({default:$.string().optional(),pattern:$.string().optional(),format:$.string().optional(),minLength:$.number().optional(),maxLength:$.number().optional()})});var sSr,Nto=h(()=>{"use strict";rc();gr();Keo();tto();Dto();kto();Fto();sSr=$.union("type",{int:tSr,int64:iSr,uint:$.object({}),uint64:$.object({}),float:$.object({}),double:fwr,string:oSr,datetime:$.object({}),datetimeRfc2822:$.object({}),date:$.object({}),base64:$.object({}),boolean:rwr}).transform({transform:e=>{switch(e.type){case"int":return Lu.int(e);case"int64":return Lu.int64(e);case"uint":return Lu.uint();case"uint64":return Lu.uint64();case"float":return Lu.float();case"double":return Lu.double(e);case"string":return Lu.string(e);case"datetime":return Lu.datetime();case"datetimeRfc2822":return Lu.datetimeRfc2822();case"date":return Lu.date();case"base64":return Lu.base64();case"boolean":return Lu.boolean(e);default:return e}},untransform:({_visit:e,...t})=>t})});var mbe,tFt=h(()=>{"use strict";gr();Kf();ma();oy();tA();d0();m0();Nto();mbe=$.objectWithoutOptionalProperties({schema:sSr}).extend(Vu).extend(uc).extend(qc).extend(Pn).extend(as).extend(_u)});var aSr,$rc=h(()=>{"use strict";gr();Ra();Kf();ma();tX();WS();oy();tA();d0();m0();tFt();aSr=$.objectWithoutOptionalProperties({key:mbe,value:$.lazy(()=>hl),minProperties:$.number().optional(),maxProperties:$.number().optional()}).extend(Vu).extend(uc).extend(qc).extend(Pn).extend(as).extend(HS).extend(_u).extend(bd)});var cSr,jto=h(()=>{"use strict";gr();ma();gf();eFt();cSr=$.objectWithoutOptionalProperties({name:$.string().optional(),properties:$.list(fbe)}).extend(Pn).extend(qo)});var uSr,enc=h(()=>{"use strict";gr();Ra();Kf();ma();WS();oy();tA();d0();m0();uSr=$.objectWithoutOptionalProperties({value:$.lazy(()=>hl)}).extend(Vu).extend(uc).extend(qc).extend(Pn).extend(as).extend(_u).extend(bd)});var GJe,lSr=h(()=>{"use strict";gr();GJe=$.objectWithoutOptionalProperties({differentSchema:$.boolean()})});var pSr,tnc=h(()=>{"use strict";gr();Ra();sbe();Kf();lSr();pSr=$.objectWithoutOptionalProperties({key:$.string(),schema:$.lazy(()=>hl),readonly:$.boolean().optional(),writeonly:$.boolean().optional(),conflict:$.record(oF,GJe),generatedName:$.string(),nameOverride:$.string().optional(),audiences:$.list($.string())}).extend(as)});var iX,WJe=h(()=>{"use strict";gr();sbe();Kf();ma();oy();tA();d0();gf();m0();iX=$.objectWithoutOptionalProperties({schema:oF}).extend(Vu).extend(uc).extend(qc).extend(Pn).extend(as).extend(qo).extend(_u)});var fSr,rnc=h(()=>{"use strict";gr();Ra();Kf();ma();tX();WS();oy();tA();d0();gf();m0();HCr();WJe();fSr=$.objectWithoutOptionalProperties({allOf:$.list(iX),properties:$.list($.lazyObject(()=>pSr)),allOfPropertyConflicts:$.list(xJe),additionalProperties:$.boolean(),minProperties:$.number().optional(),maxProperties:$.number().optional()}).extend(Vu).extend(uc).extend(qc).extend(Pn).extend(as).extend(HS).extend(qo).extend(_u).extend(bd)});var dSr,nnc=h(()=>{"use strict";rc();gr();Ra();dSr=$.union("type",{discriminated:$.lazyObject(()=>pwr),undiscriminated:$.lazyObject(()=>mSr)}).transform({transform:e=>{switch(e.type){case"discriminated":return XY.discriminated(e);case"undiscriminated":return XY.undiscriminated(e);default:return e}},untransform:({_visit:e,...t})=>t})});var hSr,Qto=h(()=>{"use strict";gr();Ra();Ceo();sbe();hSr=$.objectWithoutOptionalProperties({rootSchemas:$.record(oF,$.lazy(()=>hl)),namespacedSchemas:$.record(SCr,$.record(oF,$.lazy(()=>hl)))})});var gSr,zto=h(()=>{"use strict";gr();gSr=$.objectWithoutOptionalProperties({summary:$.string().optional(),description:$.string().optional()})});var ASr,Mto=h(()=>{"use strict";gr();jeo();cbe();ASr=$.objectWithoutOptionalProperties({tagsById:$.record(sF,MCr),orderedTagIds:$.list(sF).optional()})});var HJe,ySr=h(()=>{"use strict";gr();Ra();ma();HJe=$.objectWithoutOptionalProperties({name:$.string().optional(),payload:$.lazy(()=>Qh)}).extend(Pn)});var KJe,bSr=h(()=>{"use strict";gr();KJe=$.enum_(["GET","POST"])});var JJe,ESr=h(()=>{"use strict";rc();gr();Heo();Bto();JJe=$.union("type",{hmac:$wr,asymmetric:twr}).transform({transform:e=>{switch(e.type){case"hmac":return DNe.hmac(e);case"asymmetric":return DNe.asymmetric(e);default:return e}},untransform:({_visit:e,...t})=>t})});var ISr,Lto=h(()=>{"use strict";gr();Ra();cbe();ma();tA();gf();RJe();Zkt();jto();Uwr();ySr();bSr();ESr();ISr=$.objectWithoutOptionalProperties({audiences:$.list($.string()),sdkName:nX.optional(),method:KJe,summary:$.string().optional(),operationId:$.string(),tags:$.list(sF),headers:$.list(lbe),generatedPayloadName:$.string(),payload:$.lazy(()=>hl),multipartFormData:cSr.optional(),response:VJe.optional(),signatureVerification:JJe.optional(),examples:$.list(HJe)}).extend(Pn).extend(qo).extend(uc)});var vSr,Uto=h(()=>{"use strict";gr();Zkt();$kt();Pwr();vSr=$.objectWithoutOptionalProperties({queryParameters:$.list(QJe),headers:$.list(lbe),pathParameters:$.list(pbe)})});var xSr,Vto=h(()=>{"use strict";gr();xSr=$.enum_(["client","server"])});var CSr,_to=h(()=>{"use strict";gr();Ra();Vto();CSr=$.objectWithoutOptionalProperties({name:$.string(),displayName:$.string().optional(),origin:xSr,body:$.lazy(()=>hl),methodName:$.string().optional()})});var wSr,qto=h(()=>{"use strict";gr();wSr=$.objectWithoutOptionalProperties({name:$.string(),url:$.string()})});var SSr,Gto=h(()=>{"use strict";gr();Ra();ma();SSr=$.objectWithoutOptionalProperties({messageType:$.string(),payload:$.lazy(()=>Qh)}).extend(Pn)});var TSr,Wto=h(()=>{"use strict";gr();ma();gwr();ywr();Gto();TSr=$.objectWithoutOptionalProperties({name:$.string().optional(),queryParameters:$.list(PJe).optional(),headers:$.list(BJe).optional(),messages:$.list(SSr)}).extend(Pn)});var OSr,Hto=h(()=>{"use strict";gr();Kkt();ma();gf();Uto();_to();qto();Wto();OSr=$.objectWithoutOptionalProperties({audiences:$.list($.string()),path:$.string(),groupName:ibe,summary:$.string().optional(),connectMethodName:$.string().optional(),handshake:vSr,messages:$.list(CSr),servers:$.list(wSr),examples:$.list(TSr)}).extend(Pn).extend(qo)});var inc,onc=h(()=>{"use strict";gr();sbe();keo();Jkt();Neo();bto();Eto();Ito();vto();Pto();$kt();tFt();Qto();zto();Mto();Lto();Hto();inc=$.objectWithoutOptionalProperties({apiVersion:$.unknown().optional(),specVersion:$.string().optional(),title:$.string().optional(),description:$.string().optional(),basePath:$.string().optional(),basePathParameters:$.list(pbe).optional(),servers:$.list(Ykt),websocketServers:$.list(Ykt),groups:$.record($.string(),gSr),tags:ASr,hasEndpointsMarkedInternal:$.boolean(),endpoints:$.list(_wr),webhooks:$.list(ISr),channels:$.record($.string(),OSr),groupedSchemas:hSr,variables:$.record($.string(),mbe),nonRequestReferencedSchemas:$.set(oF),securitySchemes:$.record(abe,QCr),security:Wwr.optional(),globalHeaders:$.list(qwr).optional(),globalParameters:$.list(Gwr).optional(),idempotencyHeaders:$.list(eSr).optional()})});var BSr,snc=h(()=>{"use strict";gr();Ra();Kf();ma();WS();oy();tA();d0();m0();BSr=$.objectWithoutOptionalProperties({value:$.lazy(()=>hl)}).extend(Vu).extend(uc).extend(qc).extend(Pn).extend(as).extend(_u).extend(bd)});var PSr,Kto=h(()=>{"use strict";gr();Kf();ma();oy();tA();d0();m0();PSr=$.objectWithoutOptionalProperties({}).extend(Vu).extend(uc).extend(qc).extend(Pn).extend(as).extend(_u)});var hl,anc=h(()=>{"use strict";rc();gr();Ra();FCr();nSr();tFt();WJe();Kto();hl=$.union("type",{primitive:mbe,object:$.lazyObject(()=>fSr),array:$.lazyObject(()=>KCr),map:$.lazyObject(()=>aSr),optional:$.lazyObject(()=>BSr),enum:yJe,reference:iX,literal:qJe,oneOf:$.object({value:$.lazy(()=>dSr)}),nullable:$.lazyObject(()=>uSr),unknown:PSr}).transform({transform:e=>{switch(e.type){case"primitive":return da.primitive(e);case"object":return da.object(e);case"array":return da.array(e);case"map":return da.map(e);case"optional":return da.optional(e);case"enum":return da.enum(e);case"reference":return da.reference(e);case"literal":return da.literal(e);case"oneOf":return da.oneOf(e.value);case"nullable":return da.nullable(e);case"unknown":return da.unknown(e);default:return e}},untransform:({_visit:e,...t})=>t})});var mSr,cnc=h(()=>{"use strict";gr();Ra();Kf();ma();tX();WS();oy();tA();d0();gf();m0();mSr=$.objectWithoutOptionalProperties({commonProperties:$.list($.lazyObject(()=>TJe)).optional(),schemas:$.list($.lazy(()=>hl))}).extend(Vu).extend(uc).extend(qc).extend(Pn).extend(as).extend(HS).extend(qo).extend(_u).extend(bd)});var Jto=h(()=>{"use strict";HCr();Yrc();_eo();Heo();weo();Keo();nwr();Peo();Xrc();Jeo();$eo();Yeo();Zeo();eto();Zrc();lwr();tto();bto();Ewr();ito();RJe();Iwr();FCr();kCr();ato();rto();Mwr();hto();fto();sto();Eto();Ito();vto();Zkt();gwr();Bto();vwr();cto();wwr();Pto();Dto();dto();yto();nSr();Rto();kto();$rc();jto();jwr();eFt();mto();gto();enc();tnc();lSr();rnc();Qwr();uto();nnc();onc();snc();Bwr();lto();$kt();oto();tFt();Nto();Pwr();ywr();WJe();Ato();Uwr();Vwr();anc();Qto();zto();nto();Fto();Xeo();Mto();Lwr();cnc();Kto();pto();Lto();xto();Sto();wto();Cto();ySr();bSr();Tto();qeo();Geo();ZCr();Oto();Xkt();ESr();ewr();Weo();Hto();Uto();Gto();Vto();_to();qto();Wto()});var Yto={};X(Yto,{AllOfPropertyConflict:()=>xJe,ArraySchema:()=>KCr,AsymmetricAlgorithm:()=>JCr,AsymmetricWebhookSignatureVerification:()=>twr,Availability:()=>TCr,BooleanSchema:()=>rwr,BytesResponse:()=>SJe,CasingOverrides:()=>RCr,CommonProperty:()=>TJe,CursorPagination:()=>iwr,CustomCodeSample:()=>cwr,CustomCodeSampleLanguage:()=>owr,CustomCodeSampleSdk:()=>awr,CustomPagination:()=>uwr,DiscriminatedOneOfSchema:()=>pwr,DiscriminatorContext:()=>OJe,DoubleSchema:()=>fwr,Endpoint:()=>_wr,EndpointExample:()=>DJe,EndpointResponseExample:()=>hwr,EndpointSdkName:()=>nX,EndpointSecurity:()=>kJe,EnumSchema:()=>yJe,EnumValue:()=>obe,ErrorExample:()=>xwr,FernExample:()=>dwr,FileResponse:()=>LJe,FileSchema:()=>Fwr,FormUrlEncodedRequest:()=>Dwr,FullEndpointExample:()=>bwr,GlobalHeader:()=>qwr,GlobalParameter:()=>Gwr,GlobalSecurity:()=>Wwr,Header:()=>lbe,HeaderExample:()=>BJe,HmacWebhookSignatureVerification:()=>$wr,HttpEndpointServer:()=>FJe,HttpError:()=>Cwr,HttpMethod:()=>NJe,IdempotencyHeader:()=>eSr,IntSchema:()=>tSr,JsonRequest:()=>Rwr,JsonResponse:()=>UJe,LiteralSchema:()=>qJe,LiteralSchemaValue:()=>rSr,LongSchema:()=>iSr,MapSchema:()=>aSr,MultipartFormDataWebhookPayload:()=>cSr,MultipartRequest:()=>zJe,MultipartRequestProperty:()=>fbe,MultipartRequestPropertyEncoding:()=>kwr,MultipartSchema:()=>Nwr,NullableSchema:()=>uSr,ObjectProperty:()=>pSr,ObjectPropertyConflictInfo:()=>GJe,ObjectSchema:()=>fSr,OctetStreamRequest:()=>MJe,OffsetPagination:()=>Swr,OneOfSchema:()=>dSr,OpenApiIntermediateRepresentation:()=>inc,OptionalSchema:()=>BSr,Pagination:()=>jJe,PathPagination:()=>Twr,PathParameter:()=>pbe,PathParameterExample:()=>Awr,PrimitiveSchema:()=>mbe,PrimitiveSchemaValue:()=>sSr,QueryParameter:()=>QJe,QueryParameterExample:()=>PJe,ReferencedSchema:()=>iX,Request:()=>zwr,Response:()=>VJe,RetriesConfiguration:()=>_Je,Schema:()=>hl,Schemas:()=>hSr,SdkGroupInfo:()=>gSr,StreamingResponseExample:()=>mwr,StringSchema:()=>oSr,SupportedSdkLanguage:()=>swr,Tags:()=>ASr,TextResponse:()=>dbe,UnDiscriminatedOneOfSchema:()=>mSr,UnknownSchema:()=>PSr,UriPagination:()=>Owr,Webhook:()=>ISr,WebhookBodyHashAlgorithm:()=>Hwr,WebhookBodyHashBinding:()=>Ywr,WebhookBodyHashLocation:()=>Jwr,WebhookBodyHashQueryParameterLocation:()=>Kwr,WebhookExampleCall:()=>HJe,WebhookHttpMethod:()=>KJe,WebhookNotificationUrlNormalization:()=>Xwr,WebhookPayloadBodySort:()=>YCr,WebhookPayloadComponent:()=>XCr,WebhookPayloadFormat:()=>CJe,WebhookSignatureAlgorithm:()=>Zwr,WebhookSignatureEncoding:()=>ube,WebhookSignatureVerification:()=>JJe,WebhookTimestamp:()=>wJe,WebhookTimestampFormat:()=>$Cr,WebsocketChannel:()=>OSr,WebsocketHandshake:()=>vSr,WebsocketMessageExample:()=>SSr,WebsocketMessageOrigin:()=>xSr,WebsocketMessageSchema:()=>CSr,WebsocketServer:()=>wSr,WebsocketSessionExample:()=>TSr});var unc=h(()=>{"use strict";Jto()});var DSr,lnc=h(()=>{"use strict";gr();Ra();Kf();ma();WS();oy();tA();d0();m0();DSr=$.objectWithoutOptionalProperties({value:$.lazy(()=>Ed),minItems:$.number().optional(),maxItems:$.number().optional(),example:$.list($.unknown()).optional(),default:$.unknown().optional()}).extend(Vu).extend(uc).extend(qc).extend(Pn).extend(as).extend(_u).extend(bd)});var RSr,Xto=h(()=>{"use strict";gr();RSr=$.objectWithoutOptionalProperties({example:$.string().optional()})});var kSr,Zto=h(()=>{"use strict";gr();kSr=$.objectWithoutOptionalProperties({default:$.boolean().optional(),example:$.boolean().optional()})});var YJe,pnc=h(()=>{"use strict";gr();Ra();YJe=$.objectWithoutOptionalProperties({key:$.string(),schema:$.lazy(()=>Ed)})});var rFt,$to=h(()=>{"use strict";gr();rFt=$.objectWithoutOptionalProperties({example:$.string().optional()})});var FSr,ero=h(()=>{"use strict";gr();FSr=$.objectWithoutOptionalProperties({example:$.string().optional()})});var NSr,fnc=h(()=>{"use strict";gr();Ra();Kf();ma();tX();WS();oy();tA();d0();gf();m0();lwr();NSr=$.objectWithoutOptionalProperties({discriminantProperty:$.string(),discriminantPropertyNameOverride:$.string().optional(),discriminatorContext:OJe.optional(),defaultDiscriminantValue:$.string().optional(),commonProperties:$.list($.lazyObject(()=>YJe)),schemas:$.record($.string(),$.lazy(()=>Ed))}).extend(Vu).extend(uc).extend(qc).extend(Pn).extend(as).extend(HS).extend(qo).extend(_u).extend(bd)});var jSr,tro=h(()=>{"use strict";gr();jSr=$.objectWithoutOptionalProperties({default:$.number().optional(),minimum:$.number().optional(),maximum:$.number().optional(),exclusiveMinimum:$.boolean().optional(),exclusiveMaximum:$.boolean().optional(),multipleOf:$.number().optional(),example:$.number().optional()})});var hbe,nFt=h(()=>{"use strict";gr();Ra();Kf();ma();gf();hbe=$.objectWithoutOptionalProperties({name:$.string(),schema:$.lazy(()=>Ed),env:$.string().optional(),parameterNameOverride:$.string().optional(),clientDefault:$.unknown().optional()}).extend(Pn).extend(as).extend(qo)});var Fj,gbe=h(()=>{"use strict";gr();ma();Fj=$.objectWithoutOptionalProperties({name:$.string().optional(),value:$.unknown()}).extend(Pn)});var QSr,rro=h(()=>{"use strict";gr();Ra();bJe();ma();oy();gf();gbe();QSr=$.objectWithoutOptionalProperties({statusCode:eX,schema:$.lazy(()=>Ed),fullExamples:$.list(Fj).optional()}).extend(Pn).extend(qc).extend(qo)});var zSr,nro=h(()=>{"use strict";gr();Ra();Kf();ma();gf();zSr=$.objectWithoutOptionalProperties({name:$.string(),schema:$.lazy(()=>Ed),variableReference:$.string().optional(),parameterNameOverride:$.string().optional(),explode:$.boolean().optional(),clientDefault:$.unknown().optional()}).extend(Pn).extend(as).extend(qo)});var XJe,MSr=h(()=>{"use strict";gr();Ra();Kf();ma();gf();XJe=$.objectWithoutOptionalProperties({name:$.string(),schema:$.lazy(()=>Ed),parameterNameOverride:$.string().optional(),explode:$.boolean().optional(),clientDefault:$.unknown().optional()}).extend(Pn).extend(as).extend(qo)});var LSr,iro=h(()=>{"use strict";gr();Ra();ma();EJe();gf();gbe();LSr=$.objectWithoutOptionalProperties({schema:$.lazy(()=>Ed),contentType:$.string().optional(),fullExamples:$.list(Fj).optional(),additionalProperties:$.boolean()}).extend(Pn).extend(qo).extend(rX)});var USr,oro=h(()=>{"use strict";gr();Ra();ma();EJe();gf();gbe();USr=$.objectWithoutOptionalProperties({schema:$.lazy(()=>Ed),contentType:$.string().optional(),fullExamples:$.list(Fj).optional(),additionalProperties:$.boolean()}).extend(Pn).extend(qo).extend(rX)});var VSr,sro=h(()=>{"use strict";gr();EJe();jwr();gbe();VSr=$.objectWithoutOptionalProperties({fullExamples:$.list(Fj).optional()}).extend(zJe).extend(rX)});var _Sr,aro=h(()=>{"use strict";gr();EJe();Qwr();_Sr=$.objectWithoutOptionalProperties({}).extend(MJe).extend(rX)});var qSr,cro=h(()=>{"use strict";rc();gr();iro();oro();sro();aro();qSr=$.union("type",{octetStream:_Sr,multipart:VSr,json:LSr,formUrlEncoded:USr}).transform({transform:e=>{switch(e.type){case"octetStream":return nF.octetStream(e);case"multipart":return nF.multipart(e);case"json":return nF.json(e);case"formUrlEncoded":return nF.formUrlEncoded(e);default:return e}},untransform:({_visit:e,...t})=>t})});var ZJe,uro=h(()=>{"use strict";gr();Ra();ma();gf();kNe();gbe();ZJe=$.objectWithoutOptionalProperties({schema:$.lazy(()=>Ed),responseProperty:$.string().optional(),terminator:$.string().optional(),fullExamples:$.list(Fj).optional(),resumable:$.boolean().optional()}).extend(Pn).extend(qo).extend(HU)});var $Je,GSr=h(()=>{"use strict";rc();gr();nwr();Mwr();Lwr();uro();$Je=$.union("type",{file:LJe,json:ZJe,text:dbe,bytes:SJe,streamingSse:ZJe,streamingText:dbe,streamingJson:ZJe}).transform({transform:e=>{switch(e.type){case"file":return Cg.file(e);case"json":return Cg.json(e);case"text":return Cg.text(e);case"bytes":return Cg.bytes(e);case"streamingSse":return Cg.streamingSse(e);case"streamingText":return Cg.streamingText(e);case"streamingJson":return Cg.streamingJson(e);default:return e}},untransform:({_visit:e,...t})=>t})});var dnc,mnc=h(()=>{"use strict";gr();bJe();cbe();Kf();ma();tA();gf();Ewr();RJe();Iwr();vwr();wwr();Bwr();Vwr();nFt();rro();nro();MSr();cro();GSr();dnc=$.objectWithoutOptionalProperties({authed:$.boolean(),security:kJe.optional(),internal:$.boolean().optional(),idempotent:$.boolean().optional(),method:NJe,audiences:$.list($.string()),path:$.string(),summary:$.string().optional(),subtitle:$.string().optional(),operationId:$.string().optional(),tags:$.list(sF),pathParameters:$.list(zSr),queryParameters:$.list(XJe),headers:$.list(hbe),sdkName:nX.optional(),generatedRequestName:$.string(),requestNameOverride:$.string().optional(),request:qSr.optional(),response:$Je.optional(),errors:$.record(eX,QSr),servers:$.list(FJe),examples:$.list(DJe),pagination:jJe.optional(),retries:_Je.optional(),globalParameterIds:$.list($.string()).optional()}).extend(Pn).extend(as).extend(qo).extend(uc)});var WSr,lro=h(()=>{"use strict";gr();Kf();ma();WS();oy();tA();d0();gf();m0();kCr();WSr=$.objectWithoutOptionalProperties({default:obe.optional(),values:$.list(obe),example:$.string().optional()}).extend(Vu).extend(uc).extend(qc).extend(Pn).extend(as).extend(qo).extend(_u).extend(bd)});var HSr,pro=h(()=>{"use strict";gr();HSr=$.objectWithoutOptionalProperties({example:$.number().optional()})});var KSr,fro=h(()=>{"use strict";gr();KSr=$.objectWithoutOptionalProperties({default:$.number().optional(),example:$.number().optional()})});var JSr,dro=h(()=>{"use strict";gr();JSr=$.objectWithoutOptionalProperties({default:$.number().optional(),minimum:$.number().optional(),maximum:$.number().optional(),exclusiveMinimum:$.boolean().optional(),exclusiveMaximum:$.boolean().optional(),multipleOf:$.number().optional(),example:$.number().optional()})});var YSr,mro=h(()=>{"use strict";gr();YSr=$.objectWithoutOptionalProperties({default:$.string().optional(),pattern:$.string().optional(),format:$.string().optional(),minLength:$.number().optional(),maxLength:$.number().optional(),example:$.string().optional()})});var XSr,hro=h(()=>{"use strict";gr();XSr=$.objectWithoutOptionalProperties({default:$.number().optional(),example:$.number().optional()})});var ZSr,gro=h(()=>{"use strict";gr();ZSr=$.objectWithoutOptionalProperties({default:$.number().optional(),example:$.number().optional()})});var $Sr,Aro=h(()=>{"use strict";rc();gr();Xto();Zto();$to();ero();tro();pro();fro();dro();mro();hro();gro();$Sr=$.union("type",{int:JSr,int64:KSr,uint:ZSr,uint64:XSr,float:HSr,double:jSr,string:YSr,datetime:rFt,datetimeRfc2822:rFt,date:FSr,base64:RSr,boolean:kSr}).transform({transform:e=>{switch(e.type){case"int":return Qi.int(e);case"int64":return Qi.int64(e);case"uint":return Qi.uint(e);case"uint64":return Qi.uint64(e);case"float":return Qi.float(e);case"double":return Qi.double(e);case"string":return Qi.string(e);case"datetime":return Qi.datetime(e);case"datetimeRfc2822":return Qi.datetimeRfc2822(e);case"date":return Qi.date(e);case"base64":return Qi.base64(e);case"boolean":return Qi.boolean(e);default:return e}},untransform:({_visit:e,...t})=>t})});var eYe,e1r=h(()=>{"use strict";gr();Kf();ma();oy();tA();d0();m0();Aro();eYe=$.objectWithoutOptionalProperties({schema:$Sr}).extend(Vu).extend(uc).extend(qc).extend(Pn).extend(as).extend(_u)});var t1r,hnc=h(()=>{"use strict";gr();Ra();Kf();ma();tX();WS();oy();tA();d0();m0();e1r();t1r=$.objectWithoutOptionalProperties({key:eYe,value:$.lazy(()=>Ed),minProperties:$.number().optional(),maxProperties:$.number().optional(),example:$.unknown().optional()}).extend(Vu).extend(uc).extend(qc).extend(Pn).extend(as).extend(HS).extend(_u).extend(bd)});var r1r,yro=h(()=>{"use strict";gr();ma();gf();eFt();r1r=$.objectWithoutOptionalProperties({name:$.string().optional(),properties:$.list(fbe)}).extend(Pn).extend(qo)});var n1r,gnc=h(()=>{"use strict";gr();Ra();Kf();ma();WS();oy();tA();d0();m0();n1r=$.objectWithoutOptionalProperties({value:$.lazy(()=>Ed)}).extend(Vu).extend(uc).extend(qc).extend(Pn).extend(as).extend(_u).extend(bd)});var i1r,Anc=h(()=>{"use strict";gr();Ra();sbe();Kf();lSr();i1r=$.objectWithoutOptionalProperties({key:$.string(),schema:$.lazy(()=>Ed),readonly:$.boolean().optional(),writeonly:$.boolean().optional(),audiences:$.list($.string()),conflict:$.record(oF,GJe),nameOverride:$.string().optional(),generatedName:$.string()}).extend(as)});var o1r,ync=h(()=>{"use strict";gr();Ra();Kf();ma();tX();WS();oy();tA();d0();gf();m0();HCr();WJe();gbe();o1r=$.objectWithoutOptionalProperties({allOf:$.list(iX),properties:$.list($.lazyObject(()=>i1r)),allOfPropertyConflicts:$.list(xJe),fullExamples:$.list(Fj).optional(),additionalProperties:$.boolean(),minProperties:$.number().optional(),maxProperties:$.number().optional()}).extend(Vu).extend(uc).extend(qc).extend(Pn).extend(as).extend(HS).extend(qo).extend(_u).extend(bd)});var s1r,bnc=h(()=>{"use strict";rc();gr();Ra();s1r=$.union("type",{discriminated:$.lazyObject(()=>NSr),undiscriminated:$.lazyObject(()=>a1r)}).transform({transform:e=>{switch(e.type){case"discriminated":return rL.discriminated(e);case"undiscriminated":return rL.undiscriminated(e);default:return e}},untransform:({_visit:e,...t})=>t})});var c1r,Enc=h(()=>{"use strict";gr();Ra();Kf();ma();WS();oy();tA();d0();m0();c1r=$.objectWithoutOptionalProperties({value:$.lazy(()=>Ed)}).extend(Vu).extend(uc).extend(qc).extend(Pn).extend(as).extend(_u).extend(bd)});var u1r,bro=h(()=>{"use strict";gr();Kf();ma();oy();tA();d0();m0();u1r=$.objectWithoutOptionalProperties({example:$.unknown()}).extend(Vu).extend(uc).extend(qc).extend(Pn).extend(as).extend(_u)});var Ed,Inc=h(()=>{"use strict";rc();gr();Ra();nSr();WJe();lro();e1r();bro();Ed=$.union("type",{primitive:eYe,object:$.lazyObject(()=>o1r),array:$.lazyObject(()=>DSr),map:$.lazyObject(()=>t1r),optional:$.lazyObject(()=>c1r),enum:WSr,reference:iX,literal:qJe,oneOf:$.object({value:$.lazy(()=>s1r)}),nullable:$.lazyObject(()=>n1r),unknown:u1r}).transform({transform:e=>{switch(e.type){case"primitive":return Lr.primitive(e);case"object":return Lr.object(e);case"array":return Lr.array(e);case"map":return Lr.map(e);case"optional":return Lr.optional(e);case"enum":return Lr.enum(e);case"reference":return Lr.reference(e);case"literal":return Lr.literal(e);case"oneOf":return Lr.oneOf(e.value);case"nullable":return Lr.nullable(e);case"unknown":return Lr.unknown(e);default:return e}},untransform:({_visit:e,...t})=>t})});var a1r,vnc=h(()=>{"use strict";gr();Ra();Kf();ma();tX();WS();oy();tA();d0();gf();m0();a1r=$.objectWithoutOptionalProperties({commonProperties:$.list($.lazyObject(()=>YJe)).optional(),schemas:$.list($.lazy(()=>Ed))}).extend(Vu).extend(uc).extend(qc).extend(Pn).extend(as).extend(HS).extend(qo).extend(_u).extend(bd)});var xnc,Cnc=h(()=>{"use strict";gr();Ra();cbe();ma();tA();gf();RJe();ySr();bSr();ESr();nFt();yro();GSr();xnc=$.objectWithoutOptionalProperties({audiences:$.list($.string()),sdkName:nX.optional(),method:KJe,summary:$.string().optional(),operationId:$.string(),tags:$.list(sF),headers:$.list(hbe),generatedPayloadName:$.string(),payload:$.lazy(()=>Ed),multipartFormData:r1r.optional(),response:$Je.optional(),signatureVerification:JJe.optional(),examples:$.list(HJe)}).extend(Pn).extend(qo).extend(uc)});var wnc,Snc=h(()=>{"use strict";gr();nFt();MSr();wnc=$.objectWithoutOptionalProperties({queryParameters:$.list(XJe),headers:$.list(hbe)})});var Ero=h(()=>{"use strict";lnc();Xto();Zto();pnc();$to();ero();fnc();tro();mnc();lro();pro();nFt();rro();fro();dro();iro();uro();hnc();yro();gbe();gnc();Anc();ync();bnc();Enc();oro();sro();aro();nro();Aro();e1r();MSr();cro();GSr();Inc();mro();hro();gro();vnc();bro();Cnc();Snc()});var Iro={};X(Iro,{ArraySchemaWithExample:()=>DSr,Base64WithExample:()=>RSr,BooleanWithExample:()=>kSr,CommonPropertyWithExample:()=>YJe,DateWithExample:()=>FSr,DatetimeWithExample:()=>rFt,DiscriminatedOneOfSchemaWithExample:()=>NSr,DoubleWithExample:()=>jSr,EndpointWithExample:()=>dnc,EnumSchemaWithExample:()=>WSr,FloatWithExample:()=>HSr,HeaderWithExample:()=>hbe,HttpErrorWithExample:()=>QSr,Int64WithExample:()=>KSr,IntWithExample:()=>JSr,JsonRequestWithExample:()=>LSr,JsonResponseWithExample:()=>ZJe,MapSchemaWithExample:()=>t1r,MultipartFormDataWebhookPayloadWithExample:()=>r1r,NamedFullExample:()=>Fj,NullableSchemaWithExample:()=>n1r,ObjectPropertyWithExample:()=>i1r,ObjectSchemaWithExample:()=>o1r,OneOfSchemaWithExample:()=>s1r,OptionalSchemaWithExample:()=>c1r,ParseFormUrlEncodedRequest:()=>USr,ParseMultipartRequest:()=>VSr,ParseOctetStreamRequest:()=>_Sr,PathParameterWithExample:()=>zSr,PrimitiveSchemaValueWithExample:()=>$Sr,PrimitiveSchemaWithExample:()=>eYe,QueryParameterWithExample:()=>XJe,RequestWithExample:()=>qSr,ResponseWithExample:()=>$Je,SchemaWithExample:()=>Ed,StringSchemaWithExample:()=>YSr,Uint64WithExample:()=>XSr,UintWithExample:()=>ZSr,UnDiscriminatedOneOfSchemaWithExample:()=>a1r,UnknownSchemaWithExample:()=>u1r,WebhookWithExample:()=>xnc,WebsocketHandshakeWithExample:()=>wnc});var Tnc=h(()=>{"use strict";Ero()});var Onc=h(()=>{"use strict";qrc();Qeo();Jrc();Ueo();unc();Jto();Tnc();Ero()});var ya={};X(ya,{AllOfPropertyConflict:()=>xJe,ArraySchema:()=>KCr,ArraySchemaWithExample:()=>DSr,AsymmetricAlgorithm:()=>JCr,AsymmetricWebhookSignatureVerification:()=>twr,Availability:()=>TCr,Base64WithExample:()=>RSr,BasicSecurityScheme:()=>ECr,BearerSecurityScheme:()=>ICr,BooleanSchema:()=>rwr,BooleanWithExample:()=>kSr,BytesResponse:()=>SJe,CasingOverrides:()=>RCr,CommonProperty:()=>TJe,CommonPropertyWithExample:()=>YJe,CursorPagination:()=>iwr,CustomCodeSample:()=>cwr,CustomCodeSampleLanguage:()=>owr,CustomCodeSampleSdk:()=>awr,CustomPagination:()=>uwr,DateWithExample:()=>FSr,DatetimeWithExample:()=>rFt,DiscriminatedOneOfSchema:()=>pwr,DiscriminatedOneOfSchemaWithExample:()=>NSr,DiscriminatorContext:()=>OJe,DoubleSchema:()=>fwr,DoubleWithExample:()=>jSr,Encoding:()=>xCr,Endpoint:()=>_wr,EndpointExample:()=>DJe,EndpointResponseExample:()=>hwr,EndpointSdkName:()=>nX,EndpointSecurity:()=>kJe,EndpointWithExample:()=>dnc,EnumSchema:()=>yJe,EnumSchemaWithExample:()=>WSr,EnumValue:()=>obe,ErrorExample:()=>xwr,FernExample:()=>dwr,FileResponse:()=>LJe,FileSchema:()=>Fwr,FloatWithExample:()=>HSr,FormUrlEncodedRequest:()=>Dwr,FullEndpointExample:()=>bwr,FullExample:()=>Qh,FullObjectExample:()=>_Cr,FullOneOfExample:()=>qCr,GlobalHeader:()=>qwr,GlobalParameter:()=>Gwr,GlobalSecurity:()=>Wwr,Header:()=>lbe,HeaderExample:()=>BJe,HeaderSecurityScheme:()=>CCr,HeaderWithExample:()=>hbe,HmacWebhookSignatureVerification:()=>$wr,HttpEndpointServer:()=>FJe,HttpError:()=>Cwr,HttpErrorWithExample:()=>QSr,HttpMethod:()=>NJe,IdempotencyHeader:()=>eSr,Int64WithExample:()=>KSr,IntSchema:()=>tSr,IntWithExample:()=>JSr,JsonRequest:()=>Rwr,JsonRequestWithExample:()=>LSr,JsonResponse:()=>UJe,JsonResponseWithExample:()=>ZJe,KeyValuePair:()=>GCr,LiteralExample:()=>LCr,LiteralSchema:()=>qJe,LiteralSchemaValue:()=>rSr,LongSchema:()=>iSr,MapSchema:()=>aSr,MapSchemaWithExample:()=>t1r,MultipartFormDataWebhookPayload:()=>cSr,MultipartFormDataWebhookPayloadWithExample:()=>r1r,MultipartRequest:()=>zJe,MultipartRequestProperty:()=>fbe,MultipartRequestPropertyEncoding:()=>kwr,MultipartSchema:()=>Nwr,NamedFullExample:()=>Fj,Namespace:()=>wCr,NamespaceId:()=>SCr,NullExample:()=>UCr,NullableSchema:()=>uSr,NullableSchemaWithExample:()=>n1r,OauthSecurityScheme:()=>NCr,ObjectProperty:()=>pSr,ObjectPropertyConflictInfo:()=>GJe,ObjectPropertyWithExample:()=>i1r,ObjectSchema:()=>fSr,ObjectSchemaWithExample:()=>o1r,OctetStreamRequest:()=>MJe,OffsetPagination:()=>Swr,OneOfSchema:()=>dSr,OneOfSchemaWithExample:()=>s1r,OpenApiIntermediateRepresentation:()=>inc,OpenApiSource:()=>BCr,OptionalSchema:()=>BSr,OptionalSchemaWithExample:()=>c1r,Pagination:()=>jJe,ParseFormUrlEncodedRequest:()=>USr,ParseMultipartRequest:()=>VSr,ParseOctetStreamRequest:()=>_Sr,PathPagination:()=>Twr,PathParameter:()=>pbe,PathParameterExample:()=>Awr,PathParameterWithExample:()=>zSr,PrimitiveExample:()=>IJe,PrimitiveSchema:()=>mbe,PrimitiveSchemaValue:()=>sSr,PrimitiveSchemaValueWithExample:()=>$Sr,PrimitiveSchemaWithExample:()=>eYe,PropertyKey:()=>vJe,ProtobufEncoding:()=>vCr,ProtobufSource:()=>PCr,QueryParameter:()=>QJe,QueryParameterExample:()=>PJe,QueryParameterWithExample:()=>XJe,QuerySecurityScheme:()=>jCr,ReferencedSchema:()=>iX,Request:()=>zwr,RequestWithExample:()=>qSr,Response:()=>VJe,ResponseWithExample:()=>$Je,RetriesConfiguration:()=>_Je,Schema:()=>hl,SchemaId:()=>oF,SchemaWithExample:()=>Ed,Schemas:()=>hSr,SdkGroup:()=>OCr,SdkGroupInfo:()=>gSr,SdkGroupName:()=>ibe,SecurityScheme:()=>QCr,SecuritySchemeId:()=>abe,Server:()=>Ykt,ServerVariable:()=>zCr,Source:()=>DCr,StatusCode:()=>eX,StreamingResponseExample:()=>mwr,StringSchema:()=>oSr,StringSchemaWithExample:()=>YSr,SupportedSdkLanguage:()=>swr,Tag:()=>MCr,TagId:()=>sF,Tags:()=>ASr,TextResponse:()=>dbe,Uint64WithExample:()=>XSr,UintWithExample:()=>ZSr,UnDiscriminatedOneOfSchema:()=>mSr,UnDiscriminatedOneOfSchemaWithExample:()=>a1r,UnknownSchema:()=>PSr,UnknownSchemaWithExample:()=>u1r,UriPagination:()=>Owr,Webhook:()=>ISr,WebhookBodyHashAlgorithm:()=>Hwr,WebhookBodyHashBinding:()=>Ywr,WebhookBodyHashLocation:()=>Jwr,WebhookBodyHashQueryParameterLocation:()=>Kwr,WebhookExampleCall:()=>HJe,WebhookHttpMethod:()=>KJe,WebhookNotificationUrlNormalization:()=>Xwr,WebhookPayloadBodySort:()=>YCr,WebhookPayloadComponent:()=>XCr,WebhookPayloadFormat:()=>CJe,WebhookSignatureAlgorithm:()=>Zwr,WebhookSignatureEncoding:()=>ube,WebhookSignatureVerification:()=>JJe,WebhookTimestamp:()=>wJe,WebhookTimestampFormat:()=>$Cr,WebhookWithExample:()=>xnc,WebsocketChannel:()=>OSr,WebsocketHandshake:()=>vSr,WebsocketHandshakeWithExample:()=>wnc,WebsocketMessageExample:()=>SSr,WebsocketMessageOrigin:()=>xSr,WebsocketMessageSchema:()=>CSr,WebsocketServer:()=>wSr,WebsocketSessionExample:()=>TSr,WithAvailability:()=>as,WithDescription:()=>Pn,WithEncoding:()=>HS,WithInline:()=>bd,WithName:()=>qc,WithNamespace:()=>uc,WithSdkGroupName:()=>Vu,WithSdkMethodName:()=>rX,WithSource:()=>qo,WithStatusCode:()=>HU,WithTitle:()=>_u,commons:()=>zeo,example:()=>Veo,finalIr:()=>Yto,parseIr:()=>Iro});var Ra=h(()=>{"use strict";Onc()});var Bnc=h(()=>{"use strict";rc();Rtc();Ra()});var Pnc,tYe,Dnc,l1r=h(()=>{"use strict";Pnc=/^(\d+)/,tYe=/^[a-zA-Z][a-zA-Z0-9_]*$/,Dnc={"<":"LESS_THAN",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL_TO","<=":"LESS_THAN_OR_EQUAL_TO","!=":"NOT_EQUALS","=":"EQUAL_TO","==":"EQUAL_TO","*":"ALL","":"EMPTY",'""':"EMPTY_STRING","-":"HYPHEN","|":"PIPE",".":"DOT","/":"SLASH"}});function FNe(e){let t=["zero","one","two","three","four","five","six","seven","eight","nine"],r=["ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"],n=["","","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"];if(e<0||e>9999)return;if(e<10)return t[e];if(e<20)return r[e-10];if(e<100){let s=Math.floor(e/10),a=e%10;return a===0?n[s]:`${n[s]}_${t[a]}`}if(e<1e3){let s=Math.floor(e/100),a=e%100;return a===0?`${t[s]}_hundred`:`${t[s]}_hundred_${FNe(a)}`}let i=Math.floor(e/1e3),o=e%1e3;return o===0?`${t[i]}_thousand`:`${t[i]}_thousand_${FNe(o)}`}var vro=h(()=>{"use strict"});function iFt(e){let t=e.match(Pnc);if(t&&t[0]!=null){let r=t[0],n=e.substring(r.length),i=parseFloat(r);if(!isNaN(i)&&isFinite(i)){let o=FNe(i);return n.length>0?`${o}_${n}`:o}}}var xro=h(()=>{"use strict";vro();l1r()});function rYe(e){let t=iFt(e),r=Dnc[e];return t!=null?Fu(ei(t)):r??(e.toLowerCase()==="n/a"?"NOT_APPLICABLE":Fu(ei(e)))}var Rnc=h(()=>{"use strict";qi();xro();l1r()});function Nj(e,t){return e.type==="primitive"&&t.type==="primitive"?knc(e.schema,t.schema):e.type==="enum"&&t.type==="enum"?Axf(e.values,t.values):e.type==="array"&&t.type==="array"?Nj(e.value,t.value):e.type==="unknown"&&t.type==="unknown"?!0:e.type==="reference"&&t.type==="reference"?e.schema===t.schema:e.type==="optional"&&t.type==="optional"?Nj(e.value,t.value):e.type==="oneOf"&&t.type==="oneOf"?yxf(e.value,t.value):e.type==="object"&&t.type==="object"?bxf(e,t):e.type==="map"&&t.type==="map"?knc(e.key.schema,t.key.schema)&&Nj(e.value,t.value):e.type==="literal"&&t.type==="literal"?e.value===t.value:!1}function knc(e,t){return e.type===t.type}function Axf(e,t){let r=new Set(e.map(i=>i.value)),n=new Set(t.map(i=>i.value));return fI(r,n)}function yxf(e,t){return e.type==="discriminated"&&t.type==="discriminated"?e.discriminantProperty===t.discriminantProperty&&Object.keys(e.schemas).length===Object.keys(t.schemas).length&&Object.entries(e.schemas).every(([r,n])=>{let i=t.schemas[r];return i==null?!1:Nj(n,i)}):e.type==="undiscriminated"&&t.type==="undiscriminated"?e.schemas.length===t.schemas.length&&e.schemas.every((r,n)=>{let i=t.schemas[n];return i==null?!1:Nj(r,i)}):!1}function bxf(e,t){if(Object.keys(e.properties).length!==Object.keys(t.properties).length)return!1;let r=Object.fromEntries(e.properties.map(n=>[n.key,n.schema]));return Object.entries(t.properties).every(([n,i])=>{let o=r[n];return o==null?!1:Nj(o,i.schema)})}var Fnc=h(()=>{"use strict";qi()});var Nnc=h(()=>{"use strict";l1r();vro();Rnc();Fnc();xro()});var Ac=h(()=>{"use strict";Bnc();rc();Ra();Nnc()});function h0(e){switch(e){case jh.Deprecated:return"deprecated";case jh.Beta:return"beta";case jh.GenerallyAvailable:return"generally-available";case jh.Alpha:return"alpha";case jh.Preview:return"preview";case jh.Legacy:return"legacy";default:return}}var NNe=h(()=>{"use strict";Ac()});function oFt(e){if(e.type==="protobuf")return{proto:{type:e.typeName}};Ee(e.type)}var Cro=h(()=>{"use strict";Dt()});function jnc(e){let t=e.match(/^(_+)/),r=e.match(/(_+)$/),n=t?.[1]??"",i=r?.[1]??"";if(n===""&&i==="")return ei(e);if(n.length+i.length>=e.length)return e;let o=e.slice(n.length,e.length-i.length||void 0);return`${n}${ei(o)}${i}`}function Exf(e){let t=e.find(n=>typeof n=="object"&&n.type==="namespace"),r=e.filter(n=>typeof n=="string"||n.type!=="namespace");return t?[t,...r]:r}function Qnc(e){let t=e?Exf(e):void 0;if(t==null||t.length===0)return pNe;let r=[];for(let[n,i]of t.entries())typeof i=="string"?r.push(jnc(i)):typeof i=="object"?i.type==="namespace"?n<t.length-1?r.push(jnc(i.name)):r.push(i.name,pNe):Ee(i.type):Ee(i);return r.join("/")}function Tue(e){return Ls.of(`${Qnc(e)}.yml`)}function wro({sdkName:e,namespaceOverride:t}){let r;return e==null||e.groupName.length===0&&t==null?pNe:(t!=null?r=[{type:"namespace",name:t},...e.groupName.filter(n=>typeof n=="string"||n.type!=="namespace")]:r=e.groupName,Qnc(r))}function znc({sdkName:e,namespaceOverride:t}){return Ls.of(`${wro({sdkName:e,namespaceOverride:t})}.yml`)}function Mnc({location:e,namespaceOverride:t}){return t!=null?dI(Ls.of(t),e):e}var nYe=h(()=>{"use strict";Va();Dt();ZA();qi()});function Lnc(e){switch(e.type){case"object":case"primitive":case"enum":case"array":case"map":case"reference":case"literal":case"optional":case"nullable":case"unknown":return p1r({namespace:e.namespace,groupName:e.groupName});case"oneOf":return p1r({namespace:e.value.namespace,groupName:e.value.groupName});default:Ee(e)}}function p1r({namespace:e,groupName:t}){return e!=null&&t!=null?Tue([{type:"namespace",name:e},...t]):e!=null?Tue([{type:"namespace",name:e}]):Tue(t)}var Sro=h(()=>{"use strict";Dt();nYe()});function Oue(e){switch(e.type){case"object":case"enum":case"array":case"map":case"reference":case"literal":case"optional":case"nullable":case"primitive":case"unknown":return e.groupName??void 0;case"oneOf":return e.value.groupName??void 0;default:Ee(e)}}var sFt=h(()=>{"use strict";Dt()});function Gp(e){return typeof e=="string"?e:e.type}function iYe(e){if(typeof e!="string")return e.docs}function jNe(e){if(typeof e!="string")return e.default}function Tro(e){if(typeof e!="string")return e.validation}function oYe(e){let t=e.match(/^optional<\s*nullable<\s*(.+)\s*>\s*>$/);if(t!=null&&t[1]!=null)return t[1].trim();let r=e.match(/^nullable<\s*(.+)\s*>$/);return r!=null&&r[1]!=null?r[1].trim():e}var nL=h(()=>{"use strict"});function Vnc(e){let t=Gp(e);return t.startsWith("nullable<")||t.startsWith("optional<nullable<")?e:typeof e=="string"?Unc(e):{...e,type:Unc(e.type)}}function Unc(e){return e.startsWith("nullable<")||e.startsWith("optional<nullable<")?e:e.startsWith("optional<")?e.replace("optional<","optional<nullable<")+">":`nullable<${e}>`}var _nc=h(()=>{"use strict";nL()});function QNe(e){return Gp(e).startsWith("optional<")?e:typeof e=="string"?qnc(e):{...e,type:qnc(e.type)}}function qnc(e){return e.startsWith("optional<")?e:`optional<${e}>`}var f1r=h(()=>{"use strict";nL()});function lc({schema:e,fileContainingReference:t,declarationFile:r=t,context:n,namespace:i,declarationDepth:o,variant:s}){switch(n.shouldMarkSchemaAsReferenced()&&n.markSchemaAsReferenced(e,i),e.type){case"primitive":return d1r(e);case"array":return Pro({schema:e,fileContainingReference:t,context:n,declarationFile:r,namespace:i,declarationDepth:o,variant:s});case"map":return Dro({schema:e,fileContainingReference:t,context:n,declarationFile:r,namespace:i,declarationDepth:o,variant:s});case"reference":return Bro({schema:e,fileContainingReference:t,context:n,namespace:i,variant:s});case"unknown":return kro();case"optional":return m1r({schema:e,fileContainingReference:t,context:n,declarationFile:r,namespace:i,declarationDepth:o,variant:s});case"nullable":return Rro({schema:e,fileContainingReference:t,context:n,declarationFile:r,namespace:i,declarationDepth:o,variant:s});case"enum":return kxf({schema:e,fileContainingReference:t,context:n,declarationFile:r,declarationDepth:o});case"literal":return e.value,Fro(e);case"object":return Fxf({schema:e,fileContainingReference:t,context:n,declarationFile:r,namespace:i,declarationDepth:o,variant:s});case"oneOf":return Nxf({schema:e.value,fileContainingReference:t,context:n,declarationFile:r,namespace:i,declarationDepth:o,variant:s});default:Ee(e)}}function d1r(e){switch(e.schema.type){case"string":return Txf({description:e.description,schema:e.schema});case"int":return Oxf({description:e.description,schema:e.schema});case"float":return Bxf({description:e.description,schema:e.schema});case"double":return Pxf({description:e.description,schema:e.schema});case"boolean":return wxf({description:e.description,schema:e.schema});case"int64":return Sxf({description:e.description,schema:e.schema})}let t=e.schema._visit({int:()=>"integer",int64:()=>"long",uint:()=>"uint",uint64:()=>"uint64",float:()=>"double",double:()=>"double",string:()=>"string",datetime:()=>"datetime",datetimeRfc2822:()=>"datetime-rfc-2822",date:()=>"date",base64:()=>"base64",boolean:()=>"boolean",_other:()=>"unknown"});return e.description==null&&e.title==null?t:{type:t,...e.description!=null?{docs:e.description}:{},...e.availability!=null?{availability:h0(e.availability)}:{}}}function wxf({description:e,schema:t}){let r="boolean";if(e==null&&t.default==null)return r;let n={type:r};return e!=null&&(n.docs=e),t.default!=null&&(n.default=t.default),n}function Sxf({description:e,schema:t}){let r="long";if(e==null&&t.default==null)return r;let n={type:r};return e!=null&&(n.docs=e),t.default!=null&&(n.default=t.default),n}function Txf({description:e,schema:t}){let r="string",n=Dxf(t);if(e==null&&t.default==null&&n==null)return r;let i={type:r};return e!=null&&(i.docs=e),t.default!=null&&(i.default=t.default),n!=null&&(i.validation=n),i}function Oxf({description:e,schema:t}){let r="integer",n=Gnc(t,r);if(e==null&&t.default==null&&n==null)return r;let i={type:r};return e!=null&&(i.docs=e),t.default!=null&&(i.default=t.default),n!=null&&(i.validation=n),i}function Bxf({description:e,schema:t}){let r="float";if(e==null)return r;let n={type:r};return e!=null&&(n.docs=e),n}function Pxf({description:e,schema:t}){let r="double",n=Gnc(t,r);if(e==null&&t.default==null&&n==null)return r;let i={type:r};return e!=null&&(i.docs=e),t.default!=null&&(i.default=t.default),n!=null&&(i.validation=n),i}function Dxf(e){if(e==null)return;let{format:t,pattern:r,minLength:n,maxLength:i}=e,o=Rxf(t);if(!(o==null&&r==null&&n==null&&i==null))return{format:o,pattern:r,minLength:n,maxLength:i}}function Rxf(e){switch(e){case"date":case"date-time":case"password":case"byte":case"bytes":case"binary":case"email":case"uuid":case"uri":case"hostname":case"ipv4":case"ipv6":return e;default:return}}function Gnc(e,t){if(e==null)return;let{minimum:r,maximum:n,multipleOf:i}=e,{exclusiveMinimum:o,exclusiveMaximum:s}=e;if(r=Oro(r,t),n=Oro(n,t),i=Oro(i,t),!(r==null&&n==null&&o==null&&s==null&&i==null))return{min:r,max:n,exclusiveMin:o,exclusiveMax:s,multipleOf:i}}function Oro(e,t){if(e===void 0)return;let[r,n]=t==="integer"?[Ixf,vxf]:[xxf,Cxf];return e<r||e>n?void 0:e}function Bro({schema:e,fileContainingReference:t,context:r,variant:n}){let i=r.getSchema(e.schema,e.namespace);if(i==null)return"unknown";let o=jxf(i)??e.schema,s=r.options.respectReadonlySchemas&&n!=null?r.getSchemaFinalName(o,n):o,a=Oue(i),c=Qxf(i),l=h1r({context:r,fileContainingReference:t,declarationFile:p1r({namespace:e.namespace,groupName:a}),type:s});return i.type==="nullable"&&(l=r.options.wrapReferencesToNullableInOptional?`optional<${l}>`:`nullable<${l}>`),i.type==="optional"&&!l.startsWith("optional<")&&(l=`optional<${l}>`),e.description==null&&c==null?l:{type:l,...e.description!=null?{docs:e.description}:{},...e.availability!=null?{availability:h0(e.availability)}:{}}}function Pro({schema:e,fileContainingReference:t,declarationFile:r,context:n,namespace:i,declarationDepth:o,variant:s}){let a=lc({schema:e.value,fileContainingReference:t,declarationFile:r,context:n,namespace:i,declarationDepth:o,variant:s}),c=`list<${Gp(a)}>`;return e.description==null&&e.title==null&&e.default==null?c:{...e.description!=null?{docs:e.description}:{},...e.availability!=null?{availability:h0(e.availability)}:{},...e.default!=null?{default:e.default}:{},type:c}}function Dro({schema:e,fileContainingReference:t,declarationFile:r,context:n,namespace:i,declarationDepth:o,variant:s}){let a=d1r(e.key),c=lc({schema:e.value,fileContainingReference:t,declarationFile:r,context:n,namespace:i,declarationDepth:o,variant:s}),u=e.encoding!=null?oFt(e.encoding):void 0,l=`map<${Gp(a)}, ${Gp(c)}>`;if(e.description==null&&u==null&&e.title==null)return l;let p={type:l};return e.description!=null&&(p.docs=e.description),e.encoding!=null&&(p.encoding=u),e.availability!=null&&(p.availability=h0(e.availability)),p}function Rro({schema:e,fileContainingReference:t,declarationFile:r,context:n,namespace:i,declarationDepth:o,variant:s}){if(!n.options.respectNullableSchemas)return m1r({schema:e,fileContainingReference:t,context:n,declarationFile:r,namespace:i,declarationDepth:o,variant:s});let a=lc({schema:e.value,fileContainingReference:t,declarationFile:r,context:n,namespace:i,declarationDepth:o,variant:s}),c=Gp(a),u=iYe(a),l=jNe(a),p=Tro(a),d=Vnc(c);if(n.options.wrapReferencesToNullableInOptional&&(d=QNe(d)),e.availability==null&&e.description==null&&u==null&&l==null&&p==null&&e.title==null)return d;let f=typeof d=="string"?{type:d}:d;return(e.description!=null||u!=null)&&(f.docs=e.description??u),l!=null&&(f.default=l),p!=null&&(f.validation=p),e.availability!=null&&(f.availability=h0(e.availability)),f}function m1r({schema:e,fileContainingReference:t,declarationFile:r,context:n,namespace:i,declarationDepth:o,variant:s}){let a=lc({schema:e.value,fileContainingReference:t,declarationFile:r,context:n,namespace:i,declarationDepth:o,variant:s}),c=Gp(a),u=iYe(a),l=jNe(a),p=Tro(a),d=QNe(c);if(e.availability==null&&e.description==null&&u==null&&l==null&&p==null&&e.title==null)return d;let f=typeof d=="string"?{type:d}:d;return(e.description!=null||u!=null)&&(f.docs=e.description??u),l!=null&&(f.default=l),p!=null&&(f.validation=p),e.availability!=null&&(f.availability=h0(e.availability)),f}function kro(){return"unknown"}function Fro(e){let t;switch(e.value.type){case"boolean":{t=`literal<${e.value.value}>`;break}case"string":{t=`literal<"${e.value.value}">`;break}default:Ee(e.value)}return e.description==null&&e.title==null?t:{type:t,...e.description!=null?{docs:e.description}:{},...e.availability!=null?{availability:h0(e.availability)}:{}}}function kxf({schema:e,fileContainingReference:t,declarationFile:r,context:n,declarationDepth:i}){let o=aFt(e,i),s=e.nameOverride??e.generatedName;n.builder.addType(r,{name:s,schema:o.schema});let a=h1r({type:s,fileContainingReference:t,declarationFile:r,context:n});if(e.description==null&&e.default==null&&e.title==null)return a;let c={type:a};return e.description!=null&&(c.docs=e.description),e.default!=null&&(c.default=e.default.value),e.availability!=null&&(c.availability=h0(e.availability)),c}function Fxf({schema:e,fileContainingReference:t,declarationFile:r,context:n,namespace:i,declarationDepth:o,variant:s}){let a=zNe({schema:e,declarationFile:r,context:n,namespace:i,declarationDepth:o,variant:s}),c=e.nameOverride??e.generatedName;n.builder.addType(r,{name:c,schema:a.schema});let u=h1r({type:c,fileContainingReference:t,declarationFile:r,context:n});return e.description==null&&e.title==null?u:{type:u,...e.description!=null?{docs:e.description}:{},...e.availability!=null?{availability:h0(e.availability)}:{}}}function Nxf({schema:e,fileContainingReference:t,declarationFile:r,context:n,namespace:i,declarationDepth:o,variant:s}){let a=Nro({schema:e,declarationFile:r,context:n,namespace:i,declarationDepth:o,variant:s}),c=e.nameOverride??e.generatedName;n.builder.addType(r,{name:c,schema:a.schema});let u=h1r({type:c,fileContainingReference:t,declarationFile:r,context:n});return e.description==null&&e.title==null?u:{...e.title!=null?{"display-name":e.title}:{},type:u,...e.description!=null?{docs:e.description}:{},...e.availability!=null?{availability:h0(e.availability)}:{}}}function h1r({type:e,fileContainingReference:t,declarationFile:r,context:n}){if(r===t)return e;let i=n.builder.addImport({file:t,fileToImport:r});return i!=null?`${i}.${e}`:e}function jxf(e){return da._visit(e,{primitive:t=>t.nameOverride??t.generatedName,object:t=>t.nameOverride??t.generatedName,array:t=>t.nameOverride??t.generatedName,map:t=>t.nameOverride??t.generatedName,enum:t=>t.nameOverride??t.generatedName,reference:t=>t.nameOverride??t.generatedName,literal:t=>t.nameOverride??t.generatedName,oneOf:t=>t.nameOverride??t.generatedName,optional:t=>t.nameOverride??t.generatedName,nullable:t=>t.nameOverride??t.generatedName,unknown:t=>t.nameOverride??t.generatedName,_other:()=>{}})}function Qxf(e){return da._visit(e,{primitive:t=>t.title,object:t=>t.title,array:t=>t.title,map:t=>t.title,enum:t=>t.title,reference:t=>t.title,literal:t=>t.title,oneOf:t=>t.title,optional:t=>t.title,nullable:t=>t.title,unknown:t=>{},_other:()=>{}})}var Ixf,vxf,xxf,Cxf,oX=h(()=>{"use strict";Dt();Ac();cFt();NNe();Cro();Sro();sFt();nL();_nc();f1r();Ixf=-2147483648,vxf=2147483647,xxf=-17976931348623157e292,Cxf=17976931348623157e292});function Bue(e){switch(e.type){case"openapi":return{openapi:e.file};case"protobuf":return{proto:e.file};default:Ee(e)}}var g1r=h(()=>{"use strict";Dt()});function Hnc({schema:e,context:t,declarationFile:r,namespace:n,declarationDepth:i,variant:o}){let s;switch(e.type){case"primitive":s=Lxf(e);break;case"array":s=zxf({schema:e,context:t,declarationFile:r,namespace:n,declarationDepth:i});break;case"map":s=Mxf({schema:e,context:t,declarationFile:r,namespace:n,declarationDepth:i});break;case"reference":s=Uxf({schema:e,context:t,declarationFile:r,namespace:n,variant:o});break;case"unknown":s=_xf(e.nameOverride,e.generatedName,e.description);break;case"optional":s=Jnc({schema:e,context:t,declarationFile:r,namespace:n,declarationDepth:i});break;case"nullable":s=Vxf({schema:e,context:t,declarationFile:r,namespace:n,declarationDepth:i});break;case"enum":s=aFt(e,i);break;case"literal":s=qxf(e,e.nameOverride,e.generatedName);break;case"object":s=zNe({schema:e,context:t,declarationFile:r,namespace:n,declarationDepth:i,variant:o});break;case"oneOf":s=Nro({schema:e.value,context:t,declarationFile:r,namespace:n,declarationDepth:i,variant:o});break;default:Ee(e)}return s}function zNe({schema:e,context:t,declarationFile:r,namespace:n,declarationDepth:i,skipReadonlyProperties:o,variant:s}){let a=o===!0||s==="write",c=!1,u={},l=new Set;for(let A of e.properties){if(A.readonly&&(c=!0),a&&A.readonly)continue;if(Object.keys(A.conflict).length>0){if(Object.entries(A.conflict).every(([O,D])=>!D.differentSchema))continue;Object.entries(A.conflict).forEach(([O])=>{jro({property:A.key,schemaId:O,context:t,namespace:n}).forEach(S=>{l.add(S)})})}let y=lc({schema:A.schema,context:t,fileContainingReference:r,namespace:n,declarationDepth:i+1,variant:s}),E=A.audiences,v=A.nameOverride,I=h0(A.availability),C=Kxf(A);u[A.key]=Hxf({typeReference:y,audiences:E,name:v,availability:I,propertyAccess:C})}let p=new Set;for(let A of e.allOfPropertyConflicts)A.allOfSchemaIds.forEach(y=>l.add(y)),A.conflictingTypeSignatures&&p.add(A.propertyKey);let d=[];for(let A of e.allOf){let y=A1r({schema:A.schema,context:t,namespace:n});if(y==null||l.has(A.schema)||l.has(y))continue;let E=lc({schema:da.reference(A),context:t,fileContainingReference:r,namespace:n,declarationDepth:i+1,variant:s});d.push(oYe(Gp(E)))}for(let A of l){let y=MNe(t,A,n);for(let E of y.properties)u[E.key]==null&&(p.has(E.key)&&(u[E.key]="unknown"),u[E.key]=lc({schema:E.schema,context:t,fileContainingReference:r,namespace:n,declarationDepth:i+1,variant:s}));for(let E of y.allOf){if(l.has(E.schema))continue;let v=lc({schema:da.reference(E),context:t,fileContainingReference:r,namespace:n,declarationDepth:i+1,variant:s});d.push(oYe(Gp(v)))}}let f={docs:e.description??void 0,properties:Object.fromEntries(Object.entries(u).map(([A,y])=>Wxf(A)?[A,typeof y=="string"?{type:y,name:`_${A}`}:{...y,name:`_${A}`}]:[A,y]))};d.length>0&&(f.extends=d),e.additionalProperties&&(f["extra-properties"]=!0),e.availability!=null&&(f.availability=h0(e.availability)),e.source!=null&&(f.source=Bue(e.source)),e.encoding!=null&&(f.encoding=oFt(e.encoding)),f.inline=Qro(e,i);let m=e.nameOverride??e.generatedName;return{name:s==="read"&&c&&t.options.respectReadonlySchemas&&t.hasReadVariant(m)?`${m}Read`:m,schema:f}}function jro({property:e,schemaId:t,context:r,namespace:n}){let i=r.getSchema(t,n);if(i==null)return[];if(i.type==="reference")return jro({property:e,schemaId:i.schema,context:r,namespace:n});if(i.type==="object"){let{properties:o,allOf:s}=MNe(r,t,n),a=o.some(u=>u.key===e),c=[...s.flatMap(u=>jro({property:e,context:r,schemaId:u.schema,namespace:n}))];if(a||c.length>0)return[t,...c]}return[]}function Knc(e,t,r){return t.type==="object"?{properties:t.properties,allOf:t.allOf}:t.type==="reference"?MNe(e,t.schema,r):t.type==="nullable"?Knc(e,t.value,r):{properties:[],allOf:[]}}function MNe(e,t,r){let n=e.getSchema(t,r);return n==null?{properties:[],allOf:[]}:Knc(e,n,r)}function zxf({schema:e,context:t,declarationFile:r,namespace:n,declarationDepth:i}){return{name:e.nameOverride??e.generatedName,schema:Pro({schema:e,fileContainingReference:r,declarationFile:r,context:t,namespace:n,declarationDepth:i})}}function Mxf({schema:e,context:t,declarationFile:r,namespace:n,declarationDepth:i}){return{name:e.nameOverride??e.generatedName,schema:Dro({schema:e,fileContainingReference:r,declarationFile:r,context:t,namespace:n,declarationDepth:i})}}function Lxf(e){let t=d1r(e);if(typeof t=="string")return{name:e.nameOverride??e.generatedName,schema:t};let{default:r,...n}=t;return{name:e.nameOverride??e.generatedName,schema:{...n}}}function Wnc(e){return e.camel==null&&e.pascal==null&&e.screamingSnake==null&&e.snake==null}function aFt(e,t){let r={enum:e.values.map(o=>{let s=o.nameOverride??o.generatedName,a=o.value;if(s===a&&o.description==null&&(o.casing==null||Wnc(o.casing)))return s;let c={value:o.value};if(s!==a&&(c.name=s),o.description!=null&&(c.docs=o.description),o.casing!=null&&!Wnc(o.casing)){let u={},l=!1;o.casing.camel!=null&&(u.camel=o.casing.camel,l=!0),o.casing.screamingSnake!=null&&(u["screaming-snake"]=o.casing.screamingSnake,l=!0),o.casing.snake!=null&&(u.snake=o.casing.snake,l=!0),o.casing.pascal!=null&&(u.pascal=o.casing.pascal,l=!0),l&&(c.casing=u)}return c})};e.description!=null&&(r.docs=e.description),e.default!=null&&(r.default=e.default.value),r.inline=Qro(e,t);let n=new Set,i={...r,enum:[],source:e.source!=null?Bue(e.source):void 0};for(let o of r.enum){let s=typeof o=="string"?o:o.name??o.value;n.has(s.toLowerCase())||(i.enum.push(o),n.add(s.toLowerCase()))}return{name:e.nameOverride??e.generatedName,schema:i}}function Uxf({schema:e,context:t,declarationFile:r,namespace:n,variant:i}){return{name:e.nameOverride??e.generatedName,schema:Bro({schema:e,context:t,fileContainingReference:r,namespace:n,variant:i})}}function Vxf({schema:e,context:t,declarationFile:r,namespace:n,declarationDepth:i}){return t.options.respectNullableSchemas?{name:e.nameOverride??e.generatedName,schema:Rro({schema:e,context:t,fileContainingReference:r,declarationFile:r,namespace:n,declarationDepth:i})}:Jnc({schema:e,context:t,declarationFile:r,namespace:n,declarationDepth:i})}function Jnc({schema:e,context:t,declarationFile:r,namespace:n,declarationDepth:i}){return{name:e.nameOverride??e.generatedName,schema:m1r({schema:e,context:t,fileContainingReference:r,declarationFile:r,namespace:n,declarationDepth:i})}}function _xf(e,t,r){return r!=null?{name:e??t,schema:{type:"unknown",docs:r}}:{name:e??t,schema:kro()}}function qxf(e,t,r){return{name:t??r,schema:Fro(e)}}function Nro({schema:e,context:t,declarationFile:r,namespace:n,declarationDepth:i,variant:o}){let s=e.encoding!=null?oFt(e.encoding):void 0;if(e.type==="discriminated"){let u={};for(let p of e.commonProperties)u[p.key]=lc({schema:p.schema,fileContainingReference:r,context:t,namespace:n,declarationDepth:i+1,variant:o});let l={};for(let[p,d]of Object.entries(e.schemas))l[p]=lc({schema:d,context:t,fileContainingReference:r,namespace:n,declarationDepth:i+1,variant:o});return{name:e.nameOverride??e.generatedName,schema:{discriminant:e.discriminantPropertyNameOverride!=null||e.discriminatorContext!=null?{...e.discriminantPropertyNameOverride!=null&&{name:e.discriminantPropertyNameOverride},value:e.discriminantProperty,...e.discriminatorContext!=null&&{context:e.discriminatorContext}}:e.discriminantProperty,"base-properties":u,docs:e.description??void 0,availability:e.availability!=null?h0(e.availability):void 0,union:l,"default-variant":e.defaultDiscriminantValue??void 0,encoding:s,source:e.source!=null?Bue(e.source):void 0}}}let a=[];for(let u of e.schemas)a.push(lc({schema:u,fileContainingReference:r,context:t,namespace:n,declarationDepth:i+1,variant:o}));let c=e.commonProperties!=null&&e.commonProperties.length>0?Object.fromEntries(e.commonProperties.map(u=>[u.key,lc({schema:u.schema,fileContainingReference:r,context:t,namespace:n,declarationDepth:i+1,variant:o})])):void 0;return{name:e.nameOverride??e.generatedName,schema:{discriminated:!1,"base-properties":c,docs:e.description??void 0,union:a,encoding:s,source:e.source!=null?Bue(e.source):void 0,inline:Qro(e,i)}}}function Wxf(e){return Gxf.test(e)}function A1r({schema:e,context:t,namespace:r}){let n=t.getSchema(e,r);if(n!=null)return n.type==="reference"?A1r({context:t,schema:n.schema,namespace:r}):e}function Hxf({typeReference:e,audiences:t,name:r,availability:n,propertyAccess:i}){return t.length===0&&r==null&&n==null&&i==null?e:{...typeof e=="string"?{type:e}:{...e},...t.length>0?{audiences:t}:{},...r!=null?{name:r}:{},...n!=null?{availability:n}:{},...i!=null?{access:i}:{}}}function Qro(e,t){return e.inline===!0||t>0?!0:void 0}function Kxf(e){if(!(e.readonly&&e.writeonly)){if(e.readonly)return Dm.ObjectPropertyAccess.ReadOnly;if(e.writeonly)return Dm.ObjectPropertyAccess.WriteOnly}}var Gxf,cFt=h(()=>{"use strict";Dt();No();Ac();oX();NNe();Cro();g1r();nL();Gxf=/^[0-9]/});function Ync(e){let t=e.replace(/^x-|^X-/,"");return ei(t)}var Xnc=h(()=>{"use strict";qi()});function Znc(e){if(e.authOverrides!=null){for(let[r,n]of Object.entries(e.authOverrides["auth-schemes"]??{}))e.builder.addAuthScheme({name:r,schema:n});e.authOverrides.auth!=null&&e.builder.setAuth(e.authOverrides.auth);return}let t=!1;for(let[r,n]of Object.entries(e.ir.securitySchemes))if(n.type==="basic"){let i={scheme:"basic"};n.usernameVariableName!=null&&(i.username===void 0?i.username={name:n.usernameVariableName}:i.username.name=n.usernameVariableName),n.usernameEnvVar!=null&&(i.username===void 0?i.username={env:n.usernameEnvVar}:i.username.env=n.usernameEnvVar),n.usernamePlaceholder!=null&&(i.username===void 0?i.username={placeholder:n.usernamePlaceholder}:i.username.placeholder=n.usernamePlaceholder),n.passwordVariableName!=null&&(i.password===void 0?i.password={name:n.passwordVariableName}:i.password.name=n.passwordVariableName),n.passwordEnvVar!=null&&(i.password===void 0?i.password={env:n.passwordEnvVar}:i.password.env=n.passwordEnvVar),n.passwordPlaceholder!=null&&(i.password===void 0?i.password={placeholder:n.passwordPlaceholder}:i.password.placeholder=n.passwordPlaceholder),e.builder.addAuthScheme({name:r,schema:i}),t||(e.builder.setAuth(r),t=!0)}else if(n.type==="bearer"){let i={scheme:"bearer"};n.tokenVariableName!=null&&(i.token===void 0?i.token={name:n.tokenVariableName}:i.token.name=n.tokenVariableName),n.tokenEnvVar!=null&&(i.token===void 0?i.token={env:n.tokenEnvVar}:i.token.env=n.tokenEnvVar),n.tokenPlaceholder!=null&&(i.token===void 0?i.token={placeholder:n.tokenPlaceholder}:i.token.placeholder=n.tokenPlaceholder),e.builder.addAuthScheme({name:r,schema:i}),t||(e.builder.setAuth(r),t=!0)}else if(n.type==="header")if(t)e.builder.addGlobalHeader({name:n.headerName,schema:{type:"string",name:n.headerVariableName??Ync(n.headerName),env:n.headerEnvVar}});else{let i={header:n.headerName,name:n.headerVariableName??"apiKey",type:"string"};n.headerEnvVar!=null&&(i.env=n.headerEnvVar),n.prefix!=null&&(i.prefix=n.prefix),n.headerPlaceholder!=null&&(i.placeholder=n.headerPlaceholder),e.builder.addAuthScheme({name:r,schema:i}),e.builder.setAuth(r),t=!0}else if(n.type==="oauth"){let i={scheme:"bearer"};e.builder.addAuthScheme({name:r,schema:i}),t||(e.builder.setAuth(r),t=!0),n.scopesEnum!=null&&n.scopesEnum.values.length>0&&e.builder.addType(Ls.of("__package__.yml"),{name:"OauthScope",schema:aFt(n.scopesEnum,0).schema})}}var $nc=h(()=>{"use strict";ZA();cFt();Xnc()});function sX({header:e,context:t,fileContainingReference:r,namespace:n}){let i=lc({schema:e.schema,context:t,fileContainingReference:r,namespace:n,declarationDepth:0}),o=Gp(i),s=jNe(i),a=e.name.replace(/^x-|^X-/,""),c=e.parameterNameOverride!=null?e.parameterNameOverride:ei(a);if(e.description==null&&e.name===c&&e.env==null&&e.availability==null&&e.clientDefault==null&&s==null)return o;let u={type:o};return c!==e.name&&(u.name=c),e.description!=null&&(u.docs=e.description),e.env!=null&&(u.env=e.env),e.availability!=null&&(u.availability=h0(e.availability)),e.clientDefault!=null&&(u["client-default"]=e.clientDefault),s!=null&&(u.default=s),u}var sYe=h(()=>{"use strict";qi();oX();NNe();nL()});function y1r({pathParameter:e,context:t,fileContainingReference:r,namespace:n}){let i=lc({schema:e.schema,context:t,fileContainingReference:r,namespace:n,declarationDepth:0});if(e.variableReference==null&&e.description==null&&e.availability==null&&e.clientDefault==null)return Gp(i);let o=e.variableReference!=null?{variable:`$${e.variableReference}`}:{type:Gp(i)};return e.description!=null&&(o.docs=e.description),e.availability!=null&&(o.availability=h0(e.availability)),e.clientDefault!=null&&"type"in o&&(o["client-default"]=e.clientDefault),o}var zro=h(()=>{"use strict";oX();NNe();nL()});function E1r({queryParameter:e,context:t,fileContainingReference:r,namespace:n}){let i=Mro({schema:e.schema,context:t,fileContainingReference:r,namespace:n});if(i==null)return;let o=Gp(i.value),s=Lro(e.schema,t,n)??jNe(i.value);o==="unknown"?o="string":o==="optional<unknown>"&&(o="optional<string>");let a={type:o};return e.clientDefault!=null&&(a["client-default"]=e.clientDefault),s!=null&&(a.default=s),i.allowMultiple&&(a["allow-multiple"]=!0),e.explode!=null&&(a.explode=e.explode),e.description!=null&&(a.docs=e.description),e.parameterNameOverride!=null&&(a.name=e.parameterNameOverride),e.availability!=null&&(a.availability=h0(e.availability)),Jxf(i.value)&&i.value.validation!==void 0&&(a.validation=i.value.validation),a.default==null&&a["client-default"]==null&&a["allow-multiple"]==null&&a.docs==null&&a.name==null&&a.availability==null&&a.validation==null&&a.explode==null?o:a}function Mro({schema:e,context:t,fileContainingReference:r,namespace:n}){if(e.type==="reference"){let i=t.getSchema(e.schema,n);if(i==null)return;if(i.type==="array")return{value:lc({schema:da.optional({nameOverride:e.nameOverride,generatedName:e.generatedName,title:e.title,value:i.value,description:e.description??i.description,availability:e.availability,namespace:void 0,groupName:void 0,inline:void 0}),context:t,declarationFile:Ls.of(kf),fileContainingReference:r,namespace:n,declarationDepth:0}),allowMultiple:!0};if(i.type==="oneOf"&&i.value.type==="undiscriminated"){let o=[],s=!1;for(let[a,c]of Object.entries(i.value.schemas))c.type==="primitive"&&c.schema.type==="string"&&(s=!0),c.type==="literal"&&c.value.type==="string"&&(tYe.test(c.value.value)?o.push(c.value.value):o.push({value:c.value.value,name:rYe(c.value.value)}));if(o.length>0)return t.builder.addType(r,{name:e.generatedName,schema:{enum:o}}),s&&t.options.respectForwardCompatibleEnums?(t.builder.addType(r,{name:`${e.generatedName}OrString`,schema:{discriminated:!1,union:[{type:"string"},{type:e.generatedName}]}}),{value:`${e.generatedName}OrString`,allowMultiple:!1}):{value:e.generatedName,allowMultiple:!1};if(i.value.schemas.length===2){let[a,c]=i.value.schemas;if(a!=null&&c!=null&&b1r({array:a,primitive:c}))return{value:lc({schema:da.optional({nameOverride:e.nameOverride,generatedName:e.generatedName,title:e.title,value:c,description:e.description,availability:e.availability,namespace:void 0,groupName:void 0,inline:void 0}),context:t,fileContainingReference:r,namespace:n,declarationDepth:0}),allowMultiple:!0};if(a!=null&&c!=null&&b1r({array:c,primitive:a}))return{value:lc({schema:da.optional({nameOverride:e.nameOverride,generatedName:e.generatedName,title:e.title,value:a,description:e.description,availability:e.availability,namespace:void 0,groupName:void 0,inline:void 0}),context:t,fileContainingReference:r,namespace:n,declarationDepth:0}),allowMultiple:!0}}for(let[a,c]of Object.entries(i.value.schemas))return Mro({schema:c,context:t,fileContainingReference:r,namespace:n})}else if(t.options.objectQueryParameters)return{value:lc({schema:e,context:t,fileContainingReference:r,declarationFile:Ls.of(kf),namespace:n,declarationDepth:0}),allowMultiple:!1}}if(e.type==="optional"||e.type==="nullable"){let i=e.type==="optional"?da.optional:da.nullable;if(e.value.type==="reference"){let o=t.getSchema(e.value.schema,n);if(o==null)return;if(o.type==="array")return{value:lc({schema:i({nameOverride:e.nameOverride,generatedName:e.generatedName,title:e.title,value:o.value,description:e.description??o.description,availability:e.availability,namespace:void 0,groupName:void 0,inline:e.inline}),context:t,fileContainingReference:r,declarationFile:Ls.of(kf),namespace:n,declarationDepth:0}),allowMultiple:!0};if(t.options.objectQueryParameters)return{value:lc({schema:e,context:t,fileContainingReference:r,declarationFile:Ls.of(kf),namespace:n,declarationDepth:0}),allowMultiple:!1}}if(e.value.type==="array")return{value:lc({schema:i({nameOverride:e.nameOverride,generatedName:e.generatedName,title:e.title,value:e.value.value,description:e.description,availability:e.availability,namespace:void 0,groupName:void 0,inline:e.inline}),context:t,fileContainingReference:r,namespace:n,declarationDepth:0}),allowMultiple:!0};if(e.value.type==="oneOf"&&e.value.value.type==="undiscriminated"){let o=[],s=!1;for(let[a,c]of Object.entries(e.value.value.schemas))c.type==="primitive"&&c.schema.type==="string"&&(s=!0),c.type==="literal"&&c.value.type==="string"&&(tYe.test(c.value.value)?o.push(c.value.value):o.push({value:c.value.value,name:rYe(c.value.value)}));if(o.length>0)return t.builder.addType(r,{name:e.generatedName,schema:{enum:o}}),s&&t.options.respectForwardCompatibleEnums?(t.builder.addType(r,{name:`${e.generatedName}OrString`,schema:{discriminated:!1,union:[{type:"string"},{type:`optional<${e.value.value.generatedName}>`}]}}),{value:`optional<${e.value.value.generatedName}OrString>`,allowMultiple:!1}):{value:`optional<${e.value.value.generatedName}>`,allowMultiple:!1};if(e.value.value.schemas.length===2){let[a,c]=e.value.value.schemas;if(a!=null&&c!=null&&b1r({array:a,primitive:c}))return{value:lc({schema:i({nameOverride:e.nameOverride,generatedName:e.generatedName,title:e.title,value:c,description:e.description,availability:e.availability,namespace:void 0,groupName:void 0,inline:e.inline}),context:t,fileContainingReference:r,namespace:n,declarationDepth:0}),allowMultiple:!0};if(a!=null&&c!=null&&b1r({array:c,primitive:a}))return{value:lc({schema:i({nameOverride:e.nameOverride,generatedName:e.generatedName,title:e.title,value:a,description:e.description,availability:e.availability,namespace:void 0,groupName:void 0,inline:e.inline}),context:t,fileContainingReference:r,namespace:n,declarationDepth:0}),allowMultiple:!0}}if(t.options.objectQueryParameters)return{value:lc({schema:e,context:t,fileContainingReference:r,declarationFile:Ls.of(kf),namespace:n,declarationDepth:0}),allowMultiple:!1};for(let[a,c]of Object.entries(e.value.value.schemas))return Mro({schema:i({nameOverride:e.nameOverride,generatedName:e.generatedName,title:e.title,value:c,description:void 0,availability:e.availability,namespace:void 0,groupName:void 0,inline:e.inline}),context:t,fileContainingReference:r,namespace:n})}else if(e.value.type==="object")return t.options.objectQueryParameters?{value:lc({schema:e,context:t,fileContainingReference:r,declarationFile:Ls.of(kf),namespace:n,declarationDepth:0}),allowMultiple:!1}:void 0;return{value:lc({schema:e,context:t,fileContainingReference:r,namespace:n,declarationDepth:0}),allowMultiple:!1}}return e.type==="array"?{value:lc({schema:da.optional({nameOverride:e.nameOverride,generatedName:e.generatedName,title:e.title,value:e.value,description:e.description,availability:e.availability,namespace:void 0,groupName:void 0,inline:e.inline}),context:t,fileContainingReference:r,namespace:n,declarationDepth:0}),allowMultiple:!0}:{value:lc({schema:e,context:t,fileContainingReference:r,namespace:n,declarationDepth:0}),allowMultiple:!1}}function Lro(e,t,r){if(e.type==="array")return e.default??void 0;if(e.type==="optional"||e.type==="nullable")return Lro(e.value,t,r);if(e.type==="reference"){let n=t.getSchema(e.schema,r);if(n!=null)return Lro(n,t,r)}}function b1r({array:e,primitive:t}){return e?.type==="array"&&e.value.type==="primitive"&&t?.type==="primitive"&&e.value.schema.type===t.schema.type}function Jxf(e){return typeof e=="object"&&e!==null&&"type"in e}var Uro=h(()=>{"use strict";Va();Ac();ZA();oX();NNe();nL()});function eic({websocketExample:e,context:t}){let r={messages:[]};e.name!=null&&(r.name=e.name),e.description!=null&&(r.docs=e.description),e.queryParameters!=null&&e.queryParameters.length>0&&(r["query-parameters"]=Yxf(e.queryParameters)),e.headers!=null&&e.headers.length>0&&(r.headers=Xxf({context:t,namedFullExamples:e.headers}));for(let n of e.messages){let i=Abe(n.payload);i!=null&&r.messages.push({type:n.messageType,body:i})}return r}function Yxf(e){let t={};return e.forEach(r=>{let n=Abe(r.value);Array.isArray(n)?t[r.name]=n[0]:n!=null&&(t[r.name]=n)}),t}function Xxf({context:e,namedFullExamples:t}){let r=e.builder.getGlobalHeaderNames(),n={};return t.forEach(i=>{let o=Abe(i.value);r.has(i.name)||o!=null&&(n[i.name]=o)}),n}function Abe(e){switch(e.type){case"primitive":return tic(e.value);case"object":return ric(e.properties);case"array":return Zxf(e.value);case"map":return $xf(e.value);case"oneOf":return eCf(e.value);case"enum":return e.value;case"literal":return tCf(e.value);case"unknown":return Abe(e.value);case"null":return null;default:Ee(e)}}function tic(e){switch(e.type){case"int":return e.value;case"int64":return e.value;case"uint":return e.value;case"uint64":return e.value;case"float":return e.value;case"double":return e.value;case"string":return e.value.startsWith("$")?`${e.value.slice(1)}`:e.value;case"datetime":try{return new Date(e.value).toISOString().replace(/\.\d{3}Z$/,"Z")}catch{return"2024-01-15T09:30:00Z"}case"datetimeRfc2822":return e.value;case"date":return e.value;case"base64":case"boolean":return e.value;default:Ee(e)}}function ric(e){return Object.fromEntries(Object.entries(e).map(([t,r])=>[t,Abe(r)]))}function Zxf(e){return e.map(t=>Abe(t))}function $xf(e){return Object.fromEntries(e.map(t=>[tic(t.key),Abe(t.value)]))}function eCf(e){return e.type==="discriminated"?ric(e.value):Abe(e.value)}function tCf(e){switch(e.type){case"string":return e.value;case"boolean":return e.value;default:Ee(e)}}var nic=h(()=>{"use strict";Dt()});function uFt(e){try{let r=new URL(e).pathname.split("/").filter(n=>n.length>0);if(r.length>0)return r[r.length-1]}catch{}}function lFt(e){try{return new URL(e).protocol.replace(":","")}catch{return}}function I1r(e,t,r=!1){let n=uFt(t);return r&&n!=null?n:e!=null&&n!=null?`${e}_${n}`:n??e??"websocket"}var Vro=h(()=>{"use strict"});function Pue(e){return e.find(t=>typeof t!="string"&&t.type==="namespace")?.name}function v1r(e,t){return t??(e?.groupName!=null?Pue(e.groupName):void 0)}var LNe=h(()=>{"use strict"});function iic({channel:e,context:t,declarationFile:r}){let n=e.servers[0],i=t.ir.servers.length===0&&t.ir.websocketServers.length<=1,o=n!=null?t.getUrlId(n.url):void 0,s=n!=null&&!i?o??(t.options.groupEnvironmentsByHost?I1r(n.name,n.url,!0):n.name):void 0;t.logger.debug(`[buildChannel] Channel path="${e.path}", server name="${n?.name}", server url="${n?.url}", resolved urlId="${s}" (from collision map: ${t.getUrlId(n?.url??"")!=null})`);let a=e.path;for(let m of e.handshake.pathParameters)m.parameterNameOverride!=null&&(a=a.replace(`{${m.name}}`,`{${m.parameterNameOverride}}`));let c=t.authOverrides?.auth!=null,u={path:a,url:s,auth:c};e.audiences!=null&&e.audiences.length>0&&(u.audiences=e.audiences),e.summary!=null&&(u["display-name"]=e.summary),e.connectMethodName!=null&&(u["connect-method-name"]=e.connectMethodName),e.description!=null&&(u.docs=e.description);let l=Pue(e.groupName),p={};if(e.handshake.pathParameters.length>0)for(let m of e.handshake.pathParameters){let g=m.parameterNameOverride??m.name;p[g]=y1r({pathParameter:m,context:t,fileContainingReference:r,namespace:l})}Object.keys(p).length>0&&(u["path-parameters"]=p);let d={};if(e.handshake.queryParameters.length>0)for(let m of e.handshake.queryParameters){let g=E1r({queryParameter:m,context:t,fileContainingReference:r,namespace:l});g!=null&&(d[m.name]=g)}Object.keys(d).length>0&&(u["query-parameters"]=d);let f={};if(e.handshake.headers.length>0)for(let m of e.handshake.headers){let g=sX({header:m,context:t,fileContainingReference:r,namespace:l});f[m.name]=g}Object.keys(f).length>0&&(u.headers=f),t.builder.addChannel(r,{channel:u});for(let m of e.messages){let g={origin:m.origin,body:lc({schema:m.body,context:t,fileContainingReference:r,namespace:l,declarationDepth:0})};m.displayName!=null&&(g["display-name"]=m.displayName),m.methodName!=null&&(g["method-name"]=m.methodName),t.builder.addChannelMessage(r,{messageId:m.name,message:g})}for(let m of e.examples){let g=eic({context:t,websocketExample:m});t.builder.addChannelExample(r,{example:g})}}var oic=h(()=>{"use strict";sYe();zro();Uro();oX();nic();Vro();LNe()});function _ro(e){return typeof e=="object"&&e!==null&&"type"in e&&e.type==="grouped"}function sic(e){try{return new URL(e).hostname}catch{return}}function aic(e){return e??cic}function rCf(e,t){let r=new Map;for(let n of e){if(_ro(n)||!("url"in n)||!n.url)continue;let i=sic(n.url)??n.url;r.has(i)||r.set(i,{environmentName:aic(n.name),httpServers:[],websocketServers:[]}),r.get(i)?.httpServers.push({name:n.name,url:n.url,audiences:n.audiences})}for(let n of t){let i=sic(n.url)??n.url;r.has(i)||r.set(i,{environmentName:aic(n.name),httpServers:[],websocketServers:[]}),r.get(i)?.websocketServers.push(n)}return r}function ybe(e){return Object.entries(e).reduce((t,[r,n])=>(QP(n)?Object.entries(n.urls).forEach(([i,o])=>{t[i]=o}):t[r]=typeof n=="string"?n:n.url,t),{})}function nCf(e,t,r){for(let[n,i]of Object.entries(t))if(i!=null)if(e[n]!=null&&e[n]!==i){let o=lFt(i),s=o!=null?`${n}_${o}`:`${n}_ws`;e[s]=i,r.setUrlId(i,s)}else e[n]=i,r.setUrlId(i,n)}function uic(e){if(e.environmentOverrides!=null){for(let[I,C]of Object.entries(e.environmentOverrides.environments??{}))e.builder.addEnvironment({name:I,schema:C});e.environmentOverrides["default-environment"]!=null&&e.builder.setDefaultEnvironment(e.environmentOverrides["default-environment"]),e.environmentOverrides["default-url"]!=null&&e.builder.setDefaultUrl(e.environmentOverrides["default-url"]);return}let t={},r=[],n=e.ir.servers.some(I=>_ro(I)),i=e.ir.servers;for(let I of i)if(_ro(I)){let C={urls:{}},w={},O={},D={};for(let[z,K]of Object.entries(I.urls))C.urls[z]=K.defaultUrl??K.url,K.urlTemplate&&(w[z]=K.urlTemplate),K.defaultUrl&&(O[z]=K.defaultUrl),K.variables&&K.variables.length>0&&(D[z]=K.variables);(Object.keys(w).length>0||Object.keys(D).length>0)&&(C["url-templates"]=w,C["default-urls"]=O,C.variables=D),I.name&&(t[I.name]=C)}else if("url"in I&&I.url){let w=I.urlTemplate!=null&&I.variables!=null&&I.variables.length>0?{url:I.url,audiences:I.audiences,"default-url":I.defaultUrl,"url-template":I.urlTemplate,variables:I.variables?.map(O=>({id:O.id,default:O.default,values:O.values}))}:I.audiences?{url:I.url,audiences:I.audiences}:I.url;if(I.name==null){r.push(w);continue}t[I.name]=w}let o={},s={},a=[],c={},u={},l={};for(let I of e.ir.endpoints)for(let C of I.servers){if(C.url==null&&C.name!=null){o[C.name]||(o[C.name]=[]);continue}if(C.url==null)continue;let w=C,O="defaultUrl"in C&&typeof w.defaultUrl=="string"?w.defaultUrl:void 0,D="urlTemplate"in C&&typeof w.urlTemplate=="string"?w.urlTemplate:void 0,S="variables"in C&&Array.isArray(w.variables)?w.variables:void 0,z=O??C.url,K=C.audiences?{url:z,audiences:C.audiences}:z;if(C.name==null){a.push(K);continue}o[C.name]||(o[C.name]=[]),o[C.name]?.push({url:z,audiences:C.audiences}),s[C.name]=K,D&&C.name&&(c[C.name]=D),O&&C.name&&(u[C.name]=O),S&&S.length>0&&C.name&&(l[C.name]=S)}let p={},d=[];for(let I of e.ir.websocketServers){e.logger.debug(`[buildEnvironments] Processing WebSocket server: name="${I.name}", url="${I.url}"`);let C=I.audiences?{url:I.url,audiences:I.audiences}:I.url;if(I.name==null){d.push(C);continue}p[I.name]=C}let f=Object.keys(t).length,m=f>0,g=Object.keys(s).length>0,A=Object.keys(o).some(I=>o[I]?.length===0),y=Object.keys(p).length>0;if(e.options.groupEnvironmentsByHost&&y&&(m||e.ir.servers.length>0)){let I=Object.entries(p).map(([w,O])=>({name:w,url:typeof O=="string"?O:O.url,audiences:typeof O=="string"?void 0:O.audiences})),C=rCf(i,I);if(C.size>0){let w=!0;for(let[O,D]of C.entries()){let S={},z=[...D.httpServers.map(Y=>({...Y,isHttp:!0})),...D.websocketServers.map(Y=>({...Y,isHttp:!1}))],K=new Map;for(let Y of z){let Z=uFt(Y.url),ae=lFt(Y.url);Z&&ae&&(K.has(Z)||K.set(Z,new Set),K.get(Z)?.add(ae))}if(D.httpServers.length>0){let Y=D.httpServers[0];Y!=null&&(S[gE]=Y.url,e.setUrlId(Y.url,gE));for(let Z=1;Z<D.httpServers.length;Z++){let ae=D.httpServers[Z];if(ae!=null){let ue=uFt(ae.url),ne=lFt(ae.url),le=ue?K.get(ue):void 0,Ce=le&&le.size>1,oe=Ce&&ne!=="https"?`${ue}_${ne}`:ue||`Http${Z+1}`;e.logger.debug(`[buildEnvironments] HTTP server: url="${ae.url}", pathSegment="${ue}", protocol="${ne}", hasCollision=${Ce}, urlId="${oe}"`),S[oe]=ae.url,e.setUrlId(ae.url,oe)}}}for(let Y of D.websocketServers){let Z=uFt(Y.url),ae=lFt(Y.url),ue=Z?K.get(Z):void 0,ne=ue&&ue.size>1,le=ne?`${Z}_${ae}`:I1r(Y.name,Y.url,!0);e.logger.debug(`[buildEnvironments] WebSocket server: name="${Y.name}", url="${Y.url}", pathSegment="${Z}", protocol="${ae}", hasCollision=${ne}, urlId="${le}"`),S[le]=Y.url,e.setUrlId(Y.url,le)}if(Object.keys(S).length>1)e.builder.addEnvironment({name:D.environmentName,schema:{urls:S}});else if(Object.keys(S).length===1){let Y=Object.values(S)[0];Y!=null&&e.builder.addEnvironment({name:D.environmentName,schema:Y})}w&&(e.options.inferDefaultEnvironment!==!1&&e.builder.setDefaultEnvironment(D.environmentName),Object.keys(S).length>1&&e.builder.setDefaultUrl(gE),w=!1)}return}}if(!m&&!g&&y&&e.ir.servers.length===0){for(let[I,C]of Object.entries(p))e.builder.addEnvironment({name:I,schema:C});e.options.inferDefaultEnvironment!==!1&&e.builder.setDefaultEnvironment(Object.keys(p)[0]),e.builder.setDefaultUrl(gE);return}if(a.length>0&&e.logger.debug(`Skipping endpoint level servers ${a.map(I=>typeof I=="string"?I:I.url).join(", ")} because x-fern-server-name was not provided.`),!m){let I=e.ir.servers[0],C=I?.url,w=I?.audiences,O=I?.defaultUrl,D=I?.urlTemplate,S=I?.variables;if(C!=null){let K=D!=null&&S!=null&&S.length>0?{url:C,audiences:w,"default-url":O,"url-template":D,variables:S?.map(Y=>({id:Y.id,default:Y.default,values:Y.values}))}:w?{url:C,audiences:w}:C;t[cic]=K}}let E=Object.values(t).map(I=>typeof I=="string"?I:QP(I)?Object.values(I.urls)[0]:I.url),v=r.filter(I=>{let C=typeof I=="string"?I:I.url;return!E.includes(C)});if(v.length>0&&e.logger.debug(`Skipping top level servers ${v.map(I=>typeof I=="string"?I:I.url).join(", ")} because x-fern-server-name was not provided.`),n){let I=!0;for(let[C,w]of Object.entries(t))if(e.builder.addEnvironment({name:C,schema:w}),I){if(e.options.inferDefaultEnvironment!==!1&&e.builder.setDefaultEnvironment(C),QP(w)){let O=Object.keys(w.urls)[0];O&&e.builder.setDefaultUrl(O)}I=!1}return}if(!g&&!A){let I=!0;for(let[C,w]of Object.entries(t))if(I){if(y){let O=typeof w=="string"?w:QP(w)?Object.values(w.urls)[0]:w["default-url"]??w.url;O!=null&&e.setUrlId(O,gE),e.builder.addEnvironment({name:C,schema:{urls:{[gE]:O??"",...ybe(p)}}})}else e.builder.addEnvironment({name:C,schema:w});e.options.inferDefaultEnvironment!==!1&&e.builder.setDefaultEnvironment(C),I=!1}else if(y){let O=typeof w=="string"?w:QP(w)?Object.values(w.urls)[0]:w["default-url"]??w.url;O!=null&&e.setUrlId(O,gE),e.builder.addEnvironment({name:C,schema:{urls:{[gE]:O??"",...ybe(p)}}})}else e.builder.addEnvironment({name:C,schema:w});y&&e.builder.setDefaultUrl(gE)}else if(f===1){let I=Object.keys(t)[0],C=Object.values(t)[0],w=typeof C=="string"?C:QP(C)?Object.values(C.urls)[0]:C["default-url"]??C.url,O={},D={},S={};typeof C!="string"&&!QP(C)&&(C["url-template"]&&(O[gE]=C["url-template"]),C["default-url"]&&(D[gE]=C["default-url"]),C.variables&&C.variables.length>0&&(S[gE]=C.variables)),Object.assign(O,c),Object.assign(D,u),Object.assign(S,l);let z=Object.keys(O).length>0||Object.keys(S).length>0;w!=null&&e.setUrlId(w,gE);let K={urls:{[gE]:w??"",...ybe(s),...ybe(p)},...z?{"url-templates":O,"default-urls":D,variables:S}:{}};e.builder.addEnvironment({name:I,schema:K}),e.options.inferDefaultEnvironment!==!1&&e.builder.setDefaultEnvironment(I),e.builder.setDefaultUrl(gE)}else{let I=new Map;for(let D of e.ir.endpoints)for(let S of D.servers)if(S.url!=null&&S.name!=null){I.has(S.name)||I.set(S.name,new Map);let z=S.url.match(/[-]([a-z0-9]+)\./i)?.[1]?.toLowerCase()||"production",K=I.get(S.name);K&&K.set(z,S.url)}let C=new Set(I.keys()),w=new Set(Object.keys(t)),O=C.size>0&&[...C].every(D=>w.has(D));if(e.options.multiServerStrategy==="urls-per-environment"&&I.size>0&&O){let D=Object.entries(t),S=D[0];if(S){let[z,K]=S,Y=typeof K=="string"?K:QP(K)?Object.values(K.urls)[0]:K["default-url"]??K.url,Z={};Y!=null&&(Z[gE]=Y,e.setUrlId(Y,gE));for(let ae=1;ae<D.length;ae++){let ue=D[ae];if(ue==null)continue;let[ne,le]=ue,Ce=typeof le=="string"?le:QP(le)?Object.values(le.urls)[0]:le["default-url"]??le.url;Ce!=null&&(Z[ne]=Ce,e.setUrlId(Ce,ne))}y&&nCf(Z,ybe(p),e),e.builder.addEnvironment({name:z,schema:{urls:Z}}),e.options.inferDefaultEnvironment!==!1&&e.builder.setDefaultEnvironment(z),e.builder.setDefaultUrl(gE)}}else if(I.size>0){let D=!0;for(let[S,z]of Object.entries(t)){let K=typeof z=="string"?z:QP(z)?Object.values(z.urls)[0]:z["default-url"]??z.url;if(!K)continue;e.setUrlId(K,gE);let Y=K.match(/[-]([a-z0-9]+)\./i)?.[1]?.toLowerCase()||"production",Z={[gE]:K};for(let[ae,ue]of I.entries()){let ne=ue.get(Y)||ue.get("production")||ue.values().next().value;ne&&(Z[ae]=ne)}y&&Object.assign(Z,ybe(p)),Object.keys(Z).length>1?e.builder.addEnvironment({name:S,schema:{urls:Z}}):e.builder.addEnvironment({name:S,schema:K}),D&&(e.options.inferDefaultEnvironment!==!1&&e.builder.setDefaultEnvironment(S),D=!1)}I.size>0&&e.builder.setDefaultUrl(gE)}else{let D=!0;for(let[S,z]of Object.entries(t)){if(y||Object.keys(s).length>0){let K=typeof z=="string"?z:QP(z)?Object.values(z.urls)[0]:z["default-url"]??z.url;K!=null&&e.setUrlId(K,gE),e.builder.addEnvironment({name:S,schema:{urls:{[gE]:K??"",...ybe(s),...ybe(p)}}})}else e.builder.addEnvironment({name:S,schema:z});D&&(e.options.inferDefaultEnvironment!==!1&&e.builder.setDefaultEnvironment(S),D=!1)}}}}var gE,cic,lic=h(()=>{"use strict";No();Vro();gE="Base",cic="Default"});function pic(e){if(e.globalHeaderOverrides!=null){for(let[r,n]of Object.entries(e.globalHeaderOverrides.headers??{}))e.builder.addGlobalHeader({name:r,schema:n});return}let t=Object.fromEntries((e.ir.globalHeaders??[]).map(r=>[r.header,r]));for(let[r,n]of Object.entries(t)){let o=n.optional===!0?"optional<string>":"string",s=o;if(n.name==null&&n.env==null&&n.clientDefault==null&&typeof n.schema=="string")s=n.schema;else if(n!=null){let a=n.schema?Oue(n.schema):void 0,c=a!=null?Pue(a):void 0,u=Ls.of("api.yml");s={name:n.name,env:n.env,type:n.schema!=null?Gp(lc({schema:n.schema,context:e,fileContainingReference:c?dI(Ls.of(ei(c)),u):u,namespace:c,declarationDepth:0}))??o:o},(typeof n.clientDefault=="string"||typeof n.clientDefault=="boolean")&&(s["client-default"]=n.clientDefault)}e.builder.addGlobalHeader({name:r,schema:s})}if(e.options.detectGlobalHeaders){let r={};for(let i of e.ir.endpoints)for(let o of i.headers){if(oCf.has(o.name.toLowerCase()))continue;let s=r[o.name];if(s==null){let a=t[o.name],c=sX({header:{...o,schema:a?.schema??o.schema,name:a?.name??o.name},fileContainingReference:Ls.of(AI),context:e,namespace:void 0});s=new qro(c),r[o.name]=s}s.increment()}let n=e.ir.endpoints.length*iCf;for(let[i,o]of Object.entries(r)){let s=t[i],a=o.count===e.ir.endpoints.length,c=o.count>=n;s==null&&(a?e.builder.addGlobalHeader({name:i,schema:o.schema}):c&&e.builder.addGlobalHeader({name:i,schema:QNe(o.schema)}))}}}var qro,iCf,oCf,fic=h(()=>{"use strict";Va();ZA();qi();sYe();oX();sFt();LNe();nL();f1r();qro=class{schema;count=0;constructor(t){this.schema=t}increment(){this.count+=1}},iCf=.75,oCf=new Set(["authorization"])});function dic(e){let t=e.ir.globalParameters;if(!(t==null||t.length===0))for(let r of t){let n=sCf(r);e.builder.addGlobalParameter({name:r.name,schema:n})}}function sCf(e){let t={};return e.in!=null&&(t.in=e.in),e.target!=null&&(t.target=e.target),e.type!=null&&(t.type=e.type),e.env!=null&&(t.env=e.env),e.default!=null&&(t.default=e.default),e.optional!=null&&(t.optional=e.optional),e.apply!=null&&(t.apply=e.apply),e.parameterName!=null&&(t["parameter-name"]=e.parameterName),e.docs!=null&&(t.docs=e.docs),t}var mic=h(()=>{"use strict"});function hic(e){for(let t of e.ir.idempotencyHeaders??[]){let r=t.schema?Oue(t.schema):void 0,n=r!=null?Pue(r):void 0,i=sX({header:{...t,schema:t.schema??da.primitive({description:void 0,availability:void 0,generatedName:"",title:void 0,namespace:void 0,groupName:void 0,nameOverride:void 0,schema:Lu.string({default:void 0,pattern:void 0,format:void 0,minLength:void 0,maxLength:void 0})}),name:t.name??t.header,parameterNameOverride:void 0,description:void 0,availability:void 0,source:void 0,clientDefault:void 0},fileContainingReference:Ls.of(AI),context:e,namespace:n});e.builder.addIdempotencyHeader({name:t.header,schema:QNe(i)})}}var gic=h(()=>{"use strict";Va();Ac();ZA();sYe();sFt();LNe();f1r()});function HP(e){switch(e.type){case"primitive":return yic(e.value);case"object":return bic(e.properties);case"array":return Eic(e.value);case"map":return cCf(e.value);case"oneOf":return uCf(e.value);case"enum":return typeof e.value=="string"&&e.value.startsWith("$")?`\\${e.value}`:e.value;case"literal":return lCf(e.value);case"unknown":return HP(e.value);case"null":return null;default:Ee(e)}}function Aic(e){switch(e.type){case"withStreaming":return e.sse?{stream:aCf(e.events)}:{stream:Eic(e.events)};case"withoutStreaming":return{body:HP(e.value)};default:Ee(e)}}function yic(e){switch(e.type){case"int":return e.value;case"int64":return e.value;case"uint":return e.value;case"uint64":return e.value;case"float":return e.value;case"double":return e.value;case"string":return e.value.startsWith("$")?`\\${e.value}`:e.value;case"datetime":try{return!e.value.endsWith("Z")&&!e.value.includes("+")&&(e.value+="Z"),new Date(e.value).toISOString().replace(/\.\d{3}Z$/,"Z")}catch{return"2024-01-15T09:30:00Z"}case"datetimeRfc2822":return e.value;case"date":return e.value;case"base64":case"boolean":return e.value;default:Ee(e)}}function bic(e){return Object.fromEntries(Object.entries(e).map(([t,r])=>[t,HP(r)]))}function aCf(e){return e.map(t=>({event:"",data:HP(t)}))}function Eic(e){return e.map(t=>HP(t))}function cCf(e){return Object.fromEntries(e.map(t=>[yic(t.key),HP(t.value)]))}function uCf(e){return e.type==="discriminated"?bic(e.value):HP(e.value)}function lCf(e){switch(e.type){case"string":return e.value.startsWith("$")?`\\${e.value}`:e.value;case"boolean":return e.value;default:Ee(e)}}var x1r=h(()=>{"use strict";Dt()});function Iic({endpointExample:e,context:t,pathParameterRenames:r}){let n={};if(e.type!=="full")return e.value;e.name!=null&&(n.name=e.name),e.description!=null&&(n.docs=e.description);let i={};if(t.ir.basePathParameters!=null)for(let u of t.ir.basePathParameters){let l=u.clientDefault??u.name;(typeof l=="string"||typeof l=="number"||typeof l=="boolean")&&(i[u.name]=l)}e.pathParameters!=null&&e.pathParameters.length>0&&Object.assign(i,pCf(e.pathParameters,r)),Object.keys(i).length>0&&(n["path-parameters"]=i),e.queryParameters!=null&&e.queryParameters.length>0&&(n["query-parameters"]=fCf(e.queryParameters));let o=e.headers!=null&&e.headers.length>0,s=t.builder.getGlobalHeaders(),a=Object.keys(s).length>0,c=new Set(e.headers?.map(u=>u.name)??[]);if(o||a){let u=[];if(e.headers!=null)for(let l of e.headers)l.name!==t.builder.getAuthHeaderName()&&u.push(l);for(let[l,p]of Object.entries(s)){if(p!=null&&typeof p=="object"&&p.type!=null){let f=gv({type:p.type,_default:void 0,validation:void 0,visitor:{primitive:ht,map:ht,list:ht,optional:m=>m,nullable:m=>m,set:ht,named:ht,literal:m=>{if(m.type==="string")return m.string;if(m.type==="boolean")return m.boolean.toString()},unknown:ht}});if(f!=null){let m=u.findIndex(A=>A.name===l),g={name:l,value:gc.literal(rbe.string(f))};m>=0?u[m]=g:u.push(g);continue}}if(c.has(l))continue;let d=p!=null&&typeof p=="object"?p.type:typeof p=="string"?p:void 0;u.push({name:l,value:gc.primitive(dCf(vic(d),l))})}n.headers=mCf({context:t,namedFullExamples:u})}return e.request!=null&&(n.request=HP(e.request)),e.response!=null&&(n.response=Aic(e.response)),e.codeSamples!=null&&e.codeSamples.length>0&&(n["code-samples"]=e.codeSamples.map(u=>u.type==="language"?{name:u.name??void 0,docs:u.description??void 0,language:u.language,code:u.code,install:u.install??void 0}:{name:u.name??void 0,docs:u.description??void 0,sdk:u.sdk,code:u.code}).filter(Oa)),n}function pCf(e,t){let r={};return e.forEach(n=>{let i=HP(n.value);if(i!=null){let o=n.parameterNameOverride??t?.[n.name]??n.name;r[o]=i}}),r}function fCf(e){let t={};return e.forEach(r=>{let n=HP(r.value);n!=null&&(t[r.name]=n)}),t}function vic(e){if(e==null)return;let t=e.match(/^(?:optional|nullable)<(.+)>$/);return t!=null?vic(t[1]):e}function dCf(e,t){switch(e){case"integer":case"int":return vo.int(0);case"int64":case"long":return vo.int64(0);case"uint":return vo.uint(0);case"uint64":return vo.uint64(0);case"float":return vo.float(0);case"double":return vo.double(0);case"boolean":return vo.boolean(!0);case"date":return vo.date("2024-01-01");case"date-time":case"datetime":return vo.datetime("2024-01-01T00:00:00Z");case"base64":return vo.base64("SGVsbG8=");default:return vo.string(t)}}function mCf({context:e,namedFullExamples:t}){let r={};return t.forEach(n=>{let i=HP(n.value);i!=null&&(r[n.name]=i)}),r}var xic=h(()=>{"use strict";Dt();No();Ac();x1r()});var zO,pFt=h(()=>{"use strict";(function(e){e[e.Channel=0]="Channel",e[e.Endpoint=1]="Endpoint",e[e.Request=2]="Request",e[e.Webhook=3]="Webhook"})(zO||(zO={}))});function Cic(e){return VS._visit(e,{get:()=>Dm.HttpMethodSchema.Get,post:()=>Dm.HttpMethodSchema.Post,put:()=>Dm.HttpMethodSchema.Put,patch:()=>Dm.HttpMethodSchema.Patch,delete:()=>Dm.HttpMethodSchema.Delete,head:()=>Dm.HttpMethodSchema.Head,options:()=>{throw new P({message:"OPTIONS is unsupported",code:P.Code.ConfigError})},trace:()=>{throw new P({message:"TRACE is unsupported",code:P.Code.ConfigError})},_other:()=>{throw new P({message:"Unknown http method is unsupported",code:P.Code.ConfigError})}})}var wic=h(()=>{"use strict";No();Ac();Qt()});function Gro(e){return e==="POST"||e==="PUT"||e==="PATCH"}var Sic=h(()=>{"use strict"});function hCf({endpoint:e,context:t,namespace:r}){let n=new Set;for(let o of e.queryParameters)n.add(o.name);for(let o of e.headers)n.add(o.parameterNameOverride??o.name);let i=e.request;if(i==null)return n;switch(i.type){case"multipart":for(let o of i.properties)n.add(o.key);break;case"json":case"formUrlEncoded":{let o=i.schema.type==="reference"?i.schema.schema:void 0,s=i.schema.type==="reference"?t.getSchema(i.schema.schema,r):i.schema;if(s?.type!=="object"||o!=null&&t.isResponseReachable(o)){n.add("body");break}for(let a of s.properties)n.add(a.nameOverride??a.key);for(let a of s.allOf){let{properties:c}=MNe(t,a.schema,r);for(let u of c)n.add(u.nameOverride??u.key)}break}case"octetStream":break;default:Ee(i)}return n}function gCf({pathParameterName:e,reservedNames:t,pathParameters:r}){let n=new Set;for(let s of r){let a=s.parameterNameOverride??s.name;a!==e&&n.add(a)}let i=`${e}${Tic}`,o=2;for(;t.has(i)||n.has(i);)i=`${e}${Tic}${o}`,o++;return i}function Oic({endpoint:e,declarationFile:t,context:r}){let n=[],i=new Set,o=e.path,s=v1r(e.sdkName,e.namespace),a=hCf({endpoint:e,context:r,namespace:s}),c={},u={};for(let y of e.pathParameters){let E=y.parameterNameOverride;E==null&&a.has(y.name)&&(E=gCf({pathParameterName:y.name,reservedNames:a,pathParameters:e.pathParameters}),c[y.name]=E),E&&(o=o.replace(`{${y.name}}`,`{${E}}`)),u[E??y.name]=y1r({pathParameter:y,context:r,fileContainingReference:t,namespace:s})}let l={};for(let y of e.queryParameters){let E=E1r({queryParameter:y,context:r,fileContainingReference:t,namespace:s});E!=null&&(l[y.name]=E,i.add(y.name))}let p;if(e.pagination!=null)switch(e.pagination.type){case"cursor":p={cursor:e.pagination.cursor,next_cursor:e.pagination.nextCursor,results:e.pagination.results};break;case"offset":p={offset:e.pagination.offset,step:e.pagination.step,results:e.pagination.results,"has-next-page":e.pagination.hasNextPage};break;case"custom":p={type:"custom",results:e.pagination.results};break;case"uri":p={next_uri:e.pagination.nextUri,results:e.pagination.results};break;case"path":p={next_path:e.pagination.nextPath,results:e.pagination.results};break;default:Ee(e.pagination)}let d={path:o,method:Cic(e.method),auth:ACf({endpoint:e,context:r}),docs:e.description??void 0,pagination:p,source:e.source!=null?Bue(e.source):void 0};!ICf({context:r,request:e.request})&&Object.keys(u).length>0&&(d["path-parameters"]=u),e.summary!=null&&(d["display-name"]=e.summary),e.subtitle!=null&&(d.subtitle=e.subtitle);let f={},m=r.builder.getGlobalHeaderNames(),g=r.builder.getAuthHeaderName();g!=null&&m.add(g);let A=e.headers.filter(y=>!m.has(y.name));for(let y of A){let E=sX({header:y,context:r,fileContainingReference:t,namespace:s});f[y.name]=E,i.add(typeof E=="string"?y.name:E.name??y.name)}if(e.request!=null){r.setInState(zO.Request);let y=ECf({endpoint:e,context:r,declarationFile:t,request:e.request,generatedRequestName:e.generatedRequestName,requestNameOverride:e.requestNameOverride??void 0,pathParameters:r.options.inlinePathParameters&&Object.keys(u).length>0?u:void 0,queryParameters:Object.keys(l).length>0?l:void 0,headers:Object.keys(f).length>0?f:void 0,usedNames:i,namespace:s});d.request=y.value,n=[...n,...y.schemaIdsToExclude??[]],r.unsetInState(zO.Request)}else{let y=r.options.inlinePathParameters&&Object.keys(u).length>0,E=Object.keys(l).length>0,v=Object.keys(f).length>0,I={};(y||E||v)&&(I.name=e.requestNameOverride??e.generatedRequestName),y&&(I["path-parameters"]=u),E&&(I["query-parameters"]=l),v&&(I.headers=f),Object.keys(I).length>0&&(d.request=I)}if(e.response!=null&&e.response._visit({json:y=>{let E=lc({schema:y.schema,context:r,fileContainingReference:t,namespace:s,declarationDepth:0,variant:r.options.respectReadonlySchemas&&r.options.useReadVariantForResponses?"read":void 0});d.response={docs:y.description??void 0,type:Gp(E)},y.statusCode!=null&&(d.response["status-code"]=y.statusCode),y.responseProperty!=null&&(d.response.property=y.responseProperty)},streamingJson:y=>{let E=lc({schema:y.schema,context:r,fileContainingReference:t,namespace:s,declarationDepth:0,variant:r.options.respectReadonlySchemas&&r.options.useReadVariantForResponses?"read":void 0});d["response-stream"]={docs:y.description??void 0,type:Gp(E),format:"json",terminator:y.terminator??void 0}},streamingSse:y=>{let E=lc({schema:y.schema,context:r,fileContainingReference:t,namespace:s,declarationDepth:0,variant:r.options.respectReadonlySchemas&&r.options.useReadVariantForResponses?"read":void 0});d["response-stream"]={docs:y.description??void 0,type:Gp(E),format:"sse",terminator:y.terminator??void 0,resumable:y.resumable??void 0}},file:y=>{d.response={docs:y.description??void 0,type:"file","status-code":y.statusCode}},bytes:y=>{d.response={docs:y.description??void 0,type:"bytes","status-code":y.statusCode}},streamingText:y=>{d["response-stream"]={docs:y.description??void 0,type:"text"}},text:y=>{d.response={docs:y.description??void 0,type:"text","status-code":y.statusCode,"content-type":y.contentType??void 0}},_other:()=>{throw new P({message:"Unrecognized Response type: "+e.response?.type,code:P.Code.InternalError})}}),r.builder.getEnvironmentType()==="multi"){let y=r.getDefaultServerName(),E=e.servers[0];if(E==null)y!=null&&(d.url=y);else{let v=E.url!=null?r.getUrlId(E.url):void 0;d.url=v??E.name??void 0}}return e.idempotent&&(d.idempotent=!0),e.availability!=null&&(d.availability=h0(e.availability)),Object.entries(e.errors).forEach(([y,E])=>{let v=E.generatedName,I=Ls.of(kf);r.builder.enableUniqueErrorsPerEndpoint&&(v=`${e.generatedRequestName}${E.generatedName}`,E.schema!=null&&(E.schema.type!=="reference"&&E.schema.type!=="oneOf"?E.schema.generatedName=`${e.generatedRequestName}${E.schema.generatedName}`:E.schema.type==="oneOf"&&(E.schema.value.generatedName=`${e.generatedRequestName}${E.schema.value.generatedName}`)));let C={"status-code":parseInt(y)},w=Mnc({location:Pic,namespaceOverride:s});if(E.schema!=null){let S=lc({schema:E.schema,context:r,fileContainingReference:w,declarationFile:w,namespace:s,declarationDepth:0});C.type=Gp(S),C.docs=E.description}r.builder.addError(w,{name:v,schema:r.isErrorUnknownSchema(parseInt(y))?{...C,type:"unknown"}:C}),d.errors==null&&(d.errors=[]);let O=r.builder.addImport({file:t,fileToImport:w});d.errors.push(O!=null?`${O}.${v}`:v),C.type!=null&&E.examples?.forEach(S=>{let z={value:HP(S.example),name:S.name,docs:S.description};r.builder.addErrorExample(w,{name:v,example:z})})}),e.examples.length>0&&(d.examples=yCf({endpointExamples:e.examples,context:r,pathParameterRenames:c})),e.retries!=null&&(d.retries=bCf({retries:e.retries})),e.globalParameterIds!=null&&e.globalParameterIds.length>0&&(d["global-parameters"]=e.globalParameterIds),r.ir.hasEndpointsMarkedInternal&&(e.internal==null||!e.internal)?d.audiences=[Wro,...e.audiences]:e.audiences.length>0&&(d.audiences=e.audiences),{value:d,schemaIdsToExclude:n}}function ACf({endpoint:e,context:t}){return e.security==null?t.authOverrides?.auth!=null?!0:t.ir.security==null?void 0:t.ir.security.length>0?!0:void 0:e.security.length===0?!1:JSON.stringify(e.security)===JSON.stringify(t.ir.security)?!0:e.security}function yCf({endpointExamples:e,context:t,pathParameterRenames:r}){return e.map(n=>{try{return Iic({endpointExample:n,context:t,pathParameterRenames:r})}catch(i){throw console.error(`Error building endpoint example: ${i}`),i}})}function bCf({retries:e}){if(e!=null){if(e.type==="disabled")return{disabled:e.value??void 0};Ee(e)}}function ECf({endpoint:e,declarationFile:t,context:r,request:n,requestNameOverride:i,generatedRequestName:o,pathParameters:s,queryParameters:a,headers:c,usedNames:u,namespace:l}){if(n.type==="json"||n.type==="formUrlEncoded"){let p=n.schema.type==="reference"?n.schema.schema:void 0,d=n.schema.type==="reference"?r.getSchema(n.schema.schema,l):n.schema;if(d?.type!=="object"||p!=null&&r.isResponseReachable(p)){let C=r.options.respectReadonlySchemas&&Gro(e.method)?"write":void 0,O={body:lc({schema:n.schema,fileContainingReference:t,context:r,namespace:l,declarationDepth:0,variant:C})},D=Object.keys(s??{}).length>0,S=Object.keys(a??{}).length>0,z=Object.keys(c??{}).length>0;D&&(O["path-parameters"]=s),S&&(O["query-parameters"]=a),z&&(O.headers=c),(D||S||z)&&(O.name=i??o),n.contentType!=null&&(O["content-type"]=n.contentType),n.description!=null&&(O.docs=n.description);let K=typeof O.body=="string"&&O["path-parameters"]==null&&O["query-parameters"]==null&&O.headers==null&&O.name==null&&O.docs==null&&(O["content-type"]==null||O["content-type"]==="application/json");return{schemaIdsToExclude:[],value:K?O.body:O}}let f=new Map;for(let I of d.allOf){let C=r.getSchema(I.schema,l);if(C==null)continue;let w=Oue(C),O=Tue(w),{properties:D}=MNe(r,I.schema,l);for(let S of D)f.set(S.key,O)}let m=Object.fromEntries(d.properties.filter(I=>I.readonly==null?!0:!(Gro(e.method)&&I.readonly)).map(I=>{let C=f.get(I.key)??t,w=lc({schema:I.schema,fileContainingReference:t,declarationFile:C,context:r,namespace:l,declarationDepth:1}),O=I.nameOverride??I.key,D=h0(I.availability);if(!u.has(O)&&I.audiences.length<=0)return u.add(O),I.nameOverride!=null?[I.key,{type:Gp(w),docs:iYe(w),name:I.nameOverride,availability:D}]:[I.key,D?{...typeof w=="string"?{type:w}:w,availability:D}:w];let S={type:Gp(w),docs:iYe(w)};return u.has(O)&&(S.name=I.generatedName),I.audiences.length>0&&(S.audiences=I.audiences),D!=null&&(S.availability=D),u.add(O),[I.key,S]})),g=new Set,A=new Set;for(let I of d.allOfPropertyConflicts)I.allOfSchemaIds.forEach(C=>g.add(C)),I.conflictingTypeSignatures&&A.add(I.propertyKey);let y=[];for(let I of d.allOf){let C=A1r({schema:I.schema,context:r,namespace:l});if(C==null||g.has(I.schema)||g.has(C))continue;let w=lc({schema:da.reference(I),fileContainingReference:t,context:r,namespace:l,declarationDepth:0}),O=oYe(Gp(w));O!=="unknown"&&y.push(O)}for(let I of g){let C=MNe(r,I,l),w=r.getSchema(I,l),O=w!=null?Tue(Oue(w)):t;for(let D of C.properties)m[D.key]==null&&(A.has(D.key)?m[D.key]="unknown":m[D.key]=lc({schema:D.schema,fileContainingReference:t,declarationFile:O,context:r,namespace:l,declarationDepth:1}));for(let D of C.allOf){if(g.has(D.schema))continue;let S=lc({schema:da.reference(D),fileContainingReference:t,context:r,namespace:l,declarationDepth:0}),z=oYe(Gp(S));z!=="unknown"&&!y.includes(z)&&y.push(z)}}let E={properties:m};y.length>0&&(E.extends=y),n.additionalProperties&&(E["extra-properties"]=!0);let v={name:i??d.nameOverride??d.generatedName,"path-parameters":s,"query-parameters":a,headers:c,body:E};return n.contentType!=null&&(v["content-type"]=n.contentType),n.description!=null&&(v.docs=n.description),{schemaIdsToExclude:p!=null?[p]:[],value:v}}else if(n.type==="octetStream"){let p={body:"bytes","content-type":n.contentType??Df.APPLICATION_OCTET_STREAM,"query-parameters":a};return a!=null&&(p.name=i??o),n.description!=null&&(p.docs=n.description),{schemaIdsToExclude:[],value:p}}else if(n.type==="multipart"){let p=Object.fromEntries(n.properties.map(d=>{if(d.schema.type==="file"){let f=d.schema.isArray?"list<file>":"file";if(f=d.schema.isOptional?`optional<${f}>`:f,d.description!=null||d.contentType!=null){let m={type:f};if(d.description!=null&&(m.docs=d.description),d.contentType!=null){let g=d.contentType.split(",")[0];m["content-type"]=g}return[d.key,m]}return[d.key,f]}else{let f=lc({schema:d.schema.value,fileContainingReference:t,context:r,namespace:l,declarationDepth:1});if(d.contentType||d.exploded||d.encoding){let m=typeof f=="string"?{type:f}:f;d.contentType!=null&&(m["content-type"]=d.contentType),d.encoding==="form"?m.style="form":d.encoding==="json"?m.style="json":d.exploded&&(m.style="exploded"),f=m}return[d.key,f]}}));return{schemaIdsToExclude:n.name==null?[]:[n.name],value:{name:i??n.name??o,"path-parameters":s,"query-parameters":a,headers:c,body:{properties:p},"content-type":Df.MULTIPART_FORM_DATA,...n.description?{docs:n.description}:{}}}}else Ee(n)}function ICf({context:e,request:t}){if(!e.options.inlinePathParameters)return!1;if(t==null)return!0;switch(t.type){case"octetStream":return!1;case"multipart":return!0;case"json":return!0;case"formUrlEncoded":return!0;default:Ee(t)}}var Tic,Bic=h(()=>{"use strict";Va();Dt();Ac();ZA();Qt();xic();Hro();sYe();zro();Uro();cFt();oX();pFt();NNe();x1r();nYe();wic();g1r();sFt();LNe();nL();Sic();Tic="PathParam"});function vCf({location:e,namespaceOverride:t}){return t!=null?{...e,file:dI(Ls.of(t),e.file)}:e}function xCf(e){let t=e.namespace,r=e.tags.filter(c=>c!==t)[0],n=e.operationId;if(n==null)return r!=null?{file:Ls.of(`${ei(r)}.yml`),endpointId:e.summary!=null?ei(e.summary):ei(`${e.method}_${e.path.split("/").join("_")}`)}:e.summary!=null?{file:Ls.of(kf),endpointId:ei(e.summary)}:{file:Ls.of(kf),endpointId:ei(`${e.method}_${e.path.split("/").join("_")}`)};if(r==null)return{file:Ls.of(kf),endpointId:n};let i=fFt(r),o=fFt(n);if(fI(i,o))return{file:Ls.of("__package__.yml"),endpointId:r};let s=SCf({operationId:n,tag:r,path:e.path,method:e.method});if(s!=null)return s;let a=[];for(let c=0;c<i.length;++c){let u=i[c];if(u!=null&&u===o[c])a.push(u);else{let l=ei(r);return{file:Ls.of(`${l}.yml`),endpointId:n,tag:r}}}if(a.length>=o.length)throw new P({message:`Cannot get file for endpoint ${JSON.stringify(e)}`,code:P.Code.InternalError});return{file:Ls.of(ei(a.join("_"))+".yml"),endpointId:ei(o.slice(a.length).join("_")),tag:r}}function dFt(e){let t=e.tags[0];if(e.sdkName!=null){let r=wro({sdkName:e.sdkName,namespaceOverride:e.namespace}),n=`${r}.yml`,i=r.toLowerCase()===t?.toLowerCase().replaceAll(" ","");return{file:Ls.of(n),endpointId:e.sdkName.methodName,tag:i?t:void 0}}return vCf({namespaceOverride:e.namespace,location:xCf(e)})}function fFt(e){let t;return/^[a-z]+(?:[A-Z][a-z]+)*$/.test(e)?t=e.split(/(?=[A-Z])/):t=e.split(/[^a-zA-Z0-9]+/),t=t.map(r=>r.toLowerCase()),t=Y4(t),t}function SCf({operationId:e,tag:t,path:r,method:n}){let o=`${r.split(CCf).join("_").replaceAll(wCf,"_")}_${n.toLowerCase()}`;if(e.endsWith(o))return{file:Ls.of(ei(t)+".yml"),endpointId:ei(e.slice(0,-1*o.length)),tag:t}}var CCf,wCf,C1r=h(()=>{"use strict";Va();ZA();Qt();qi();nYe();CCf=new RegExp("[^a-zA-Z0-9{}]+"),wCf=new RegExp("[{}]","g")});function Dic(e){let t=new Set,{endpoints:r,tags:n}=e.ir,i=[];for(let o of r){let{endpointId:s,file:a,tag:c}=dFt(o),u=a.split(".")[0];u!=null&&t.add(u);let l;if(o.sdkName!=null){let f=e.ir.groups;for(let m of o.sdkName.groupName){let g=typeof m=="string"?m:m.name,A=f[g];if(A==null)break;if(A.summary!=null||A.description!=null){l=f[g];break}}}let p=c==null?void 0:n.tagsById[c];e.setInState(zO.Endpoint),e.setEndpointMethod(o.method);let d=Oic({context:e,endpoint:o,declarationFile:a});e.unsetEndpointMethod(),e.unsetInState(zO.Endpoint),i=[...i,...d.schemaIdsToExclude],e.builder.addEndpoint(a,{name:s,schema:d.value,source:o.source!=null?Bue(o.source):void 0}),(p?.id!=null||p?.description!=null)&&e.builder.setServiceInfo(a,{"display-name":l?.summary??p?.id,docs:l?.description??p?.description??void 0})}return{schemaIdsToExclude:i,sdkGroups:t}}var Ric=h(()=>{"use strict";Bic();pFt();g1r();C1r()});function kic(e){for(let[t,r]of Object.entries(e.ir.variables)){let n=r.groupName!=null?Pue(r.groupName):void 0,i=lc({schema:da.primitive(r),context:e,fileContainingReference:Ls.of(kf),namespace:n,declarationDepth:0});e.builder.addVariable({name:t,schema:{type:Gp(i),docs:r.description??void 0}})}}var Fic=h(()=>{"use strict";Va();Ac();ZA();oX();LNe();nL()});function Qic(e){for(let t of e.ir.webhooks){let r=BCf({webhook:t,context:e});if(r==null)continue;let n=v1r(t.sdkName,t.namespace),i={};for(let s of t.headers)i[s.name]=sX({header:s,context:e,fileContainingReference:r.file,namespace:n});let o={audiences:t.audiences,method:t.method,"display-name":t.summary??void 0,headers:i,payload:lc({schema:t.payload,context:e,fileContainingReference:r.file,namespace:n,declarationDepth:0}),signature:PCf(t.signatureVerification),examples:t.examples!=null?t.examples.map(s=>({docs:s.description,name:s.name,payload:HP(s.payload)})):void 0};t.response!=null&&t.response._visit({json:s=>{let a=lc({schema:s.schema,context:e,fileContainingReference:r.file,namespace:n,declarationDepth:0});o.response={docs:s.description??void 0,type:Gp(a)},s.statusCode!=null&&(o.response["status-code"]=s.statusCode)},file:s=>{o.response={docs:s.description??void 0,type:"file","status-code":s.statusCode}},bytes:s=>{o.response={docs:s.description??void 0,type:"bytes","status-code":s.statusCode}},text:s=>{o.response={docs:s.description??void 0,type:"text","status-code":s.statusCode,"content-type":s.contentType??void 0}},streamingJson:s=>{let a=lc({schema:s.schema,context:e,fileContainingReference:r.file,namespace:n,declarationDepth:0});o["response-stream"]={docs:s.description??void 0,type:Gp(a),format:"json"}},streamingSse:s=>{let a=lc({schema:s.schema,context:e,fileContainingReference:r.file,namespace:n,declarationDepth:0});o["response-stream"]={docs:s.description??void 0,type:Gp(a),format:"sse"}},streamingText:s=>{o["response-stream"]={docs:s.description??void 0,type:"text"}},_other:()=>{throw new P({message:"Unrecognized Response type: "+t.response?.type,code:P.Code.InternalError})}}),e.builder.addWebhook(r.file,{name:r.endpointId,schema:o}),t.description!=null&&(o.docs=t.description)}}function TCf({location:e,namespaceOverride:t}){if(e!=null)return t!=null?{...e,file:dI(Ls.of(t),e.file)}:e}function OCf({webhook:e,context:t}){let r=e.tags[0],n=e.operationId;if(r==null)return{file:Ls.of(kf),endpointId:n};let i=fFt(r),o=fFt(n);if(fI(i,o))return{file:Ls.of("__package__.yml"),endpointId:r};let s=[];for(let a=0;a<i.length;++a){let c=i[a];if(c!=null&&c===o[a])s.push(c);else{let u=ei(r);return{file:Ls.of(`${u}.yml`),endpointId:n,tag:r}}}if(s.length>=o.length){t.logger.warn(`Skipping webhook ${e.operationId} because couldn't compute file location`);return}return{file:Ls.of(ei(s.join("_"))+".yml"),endpointId:ei(o.slice(s.length).join("_")),tag:r}}function BCf({webhook:e,context:t}){return e.sdkName!=null?{file:znc({sdkName:e.sdkName,namespaceOverride:e.namespace}),endpointId:e.sdkName.methodName}:TCf({namespaceOverride:e.namespace,location:OCf({webhook:e,context:t})})}function PCf(e){if(e!=null)switch(e.type){case"hmac":return{type:"hmac",header:e.header,algorithm:DCf(e.algorithm),encoding:Kro(e.encoding),"signature-prefix":e.signaturePrefix,"payload-format":Nic(e.payloadFormat),timestamp:jic(e.timestamp),"body-hash-binding":kCf(e.bodyHashBinding),"url-normalization":FCf(e.notificationUrlNormalization)};case"asymmetric":return{type:"asymmetric",header:e.header,"asymmetric-algorithm":RCf(e.asymmetricAlgorithm),encoding:Kro(e.encoding),"signature-prefix":e.signaturePrefix,"jwks-url":e.jwksUrl,"key-id-header":e.keyIdHeader,"payload-format":Nic(e.payloadFormat),timestamp:jic(e.timestamp)};default:return}}function DCf(e){if(e!=null)switch(e){case"sha256":return"sha256";case"sha1":return"sha1";case"sha384":return"sha384";case"sha512":return"sha512";default:return}}function Kro(e){if(e!=null)switch(e){case"base64":return"base64";case"hex":return"hex";default:return}}function RCf(e){switch(e){case"rsa-sha256":return"rsa-sha256";case"rsa-sha384":return"rsa-sha384";case"rsa-sha512":return"rsa-sha512";case"ecdsa-sha256":return"ecdsa-sha256";case"ecdsa-sha384":return"ecdsa-sha384";case"ecdsa-sha512":return"ecdsa-sha512";case"ed25519":return"ed25519";default:return"rsa-sha256"}}function Nic(e){if(e!=null)return{components:e.components.map(zCf),delimiter:e.delimiter,"body-sort":QCf(e.bodySort)}}function kCf(e){if(e!=null)return{algorithm:NCf(e.algorithm),encoding:e.encoding!=null?Kro(e.encoding):void 0,location:jCf(e.location)}}function FCf(e){if(e!=null)return{"port-variants":e.portVariants,"legacy-query-encoding":e.legacyQueryEncoding}}function NCf(e){switch(e){case"sha256":return"sha256";case"sha1":return"sha1";case"sha384":return"sha384";case"sha512":return"sha512";default:Ee(e)}}function jCf(e){if(e.type==="queryParameter")return{type:"query-parameter",name:e.name};Ee(e.type)}function QCf(e){if(e!=null&&e==="alphabetical")return"alphabetical"}function zCf(e){switch(e){case"body":return"body";case"timestamp":return"timestamp";case"notification-url":return"notification-url";case"message-id":return"message-id";default:return"body"}}function MCf(e){switch(e){case"unix-seconds":return"unix-seconds";case"unix-millis":return"unix-millis";case"iso8601":return"iso8601";default:return}}function jic(e){if(e!=null)return{header:e.header,format:e.format!=null?MCf(e.format):void 0,tolerance:e.tolerance}}var zic=h(()=>{"use strict";Va();Dt();ZA();Qt();qi();sYe();oX();x1r();nYe();C1r();LNe();nL()});function bbe(e,t,r){switch(e.type){case"primitive":case"enum":case"literal":case"unknown":return;case"reference":{let n=e.schema;if(r.has(n))return;r.add(n);let i=Mic(n,e.namespace,t);i!=null&&bbe(i,t,r);return}case"object":for(let n of e.allOf)if(!r.has(n.schema)){r.add(n.schema);let i=Mic(n.schema,n.namespace,t);i!=null&&bbe(i,t,r)}for(let n of e.properties)bbe(n.schema,t,r);return;case"array":case"map":case"optional":case"nullable":bbe(e.value,t,r);return;case"oneOf":LCf(e.value,t,r);return;default:Ee(e)}}function LCf(e,t,r){switch(e.type){case"discriminated":for(let n of Object.values(e.schemas))bbe(n,t,r);for(let n of e.commonProperties)bbe(n.schema,t,r);return;case"undiscriminated":for(let n of e.schemas)bbe(n,t,r);return;default:Ee(e)}}function Mic(e,t,r){return t==null?r.rootSchemas[e]:r.namespacedSchemas[t]?.[e]}function KU(e,t,r){bbe(e,t,r)}function Jro(e){let t=new Set,r=new Set,{groupedSchemas:n}=e;for(let i of e.endpoints){if(i.request!=null)switch(i.request.type){case"json":case"formUrlEncoded":KU(i.request.schema,n,t);break;case"multipart":for(let o of i.request.properties)o.schema.type==="json"&&KU(o.schema.value,n,t);break;case"octetStream":break;default:Ee(i.request)}if(i.response!=null)switch(i.response.type){case"json":case"streamingJson":case"streamingSse":KU(i.response.schema,n,r);break;case"file":case"text":case"bytes":case"streamingText":break;default:Ee(i.response)}for(let o of Object.values(i.errors))o.schema!=null&&KU(o.schema,n,r);for(let o of i.pathParameters)KU(o.schema,n,r);for(let o of i.queryParameters)KU(o.schema,n,r);for(let o of i.headers)KU(o.schema,n,r)}for(let i of e.webhooks)KU(i.payload,n,r);for(let i of Object.values(e.channels)){for(let o of i.messages)KU(o.body,n,r);for(let o of i.handshake.queryParameters)KU(o.schema,n,r);for(let o of i.handshake.headers)KU(o.schema,n,r);for(let o of i.handshake.pathParameters)KU(o.schema,n,r)}return{requestReachable:t,responseReachable:r}}function UCf(e){return e.type!=="object"?!1:e.properties.some(t=>t.readonly===!0)}function Yro(e,t){let r=new Set,n=new Set,i=new Set;function o(s){for(let[a,c]of Object.entries(s)){if(!UCf(c))continue;let u=t.requestReachable.has(a),l=t.responseReachable.has(a);u&&l?r.add(a):u&&!l?n.add(a):!u&&l&&i.add(a)}}o(e.groupedSchemas.rootSchemas);for(let s of Object.values(e.groupedSchemas.namespacedSchemas))o(s);return{needsBothVariants:r,requestOnlyWithReadonly:n,responseOnlyWithReadonly:i}}var Lic=h(()=>{"use strict";Dt()});function Uic({schemas:e,schemaIdsToExclude:t,namespace:r,context:n}){for(let[i,o]of Object.entries(e)){if(t.has(i))continue;let s=Lnc(o);if(n.options.respectReadonlySchemas&&n.needsBothVariants(i)&&o.type==="object"){let u=zNe({schema:o,context:n,declarationFile:s,namespace:r,declarationDepth:0,variant:"read"});n.builder.addType(s,{name:u.name??i,schema:u.schema});let l=zNe({schema:o,context:n,declarationFile:s,namespace:r,declarationDepth:0,skipReadonlyProperties:!0,variant:"write"});n.builder.addType(s,{name:l.name??i,schema:l.schema});continue}if(n.options.respectReadonlySchemas&&n.isRequestOnlyWithReadonly(i)&&o.type==="object"){let u=zNe({schema:o,context:n,declarationFile:s,namespace:r,declarationDepth:0,skipReadonlyProperties:!0,variant:"write"});n.builder.addType(s,{name:u.name??i,schema:u.schema});continue}let a;n.options.respectReadonlySchemas&&(a=n.isRequestOnly(i)?"write":"read");let c=Hnc({schema:o,context:n,declarationFile:s,namespace:r,declarationDepth:0,variant:a});if(bye(c.schema)){let u=Gp(c.schema);if(u===(c.name??i)||u===`optional<${c.name??i}>`||u===`nullable<${c.name??i}>`||u===`optional<nullable<${c.name??i}>>`)continue}n.builder.addType(s,{name:c.name??i,schema:c.schema})}}function Vic(e){if(e.ir.apiVersion!=null&&e.builder.setApiVersion(e.ir.apiVersion),uic(e),pic(e),dic(e),hic(e),Znc(e),kic(e),e.ir.basePath!=null&&e.builder.setBasePath(e.ir.basePath),e.ir.basePathParameters!=null&&e.ir.basePathParameters.length>0){let i={};for(let o of e.ir.basePathParameters){let s={type:"string"};o.description!=null&&(s.docs=o.description),o.clientDefault!=null&&(s["client-default"]=o.clientDefault),i[o.name]=s}e.builder.setRootPathParameters(i)}if(e.ir.hasEndpointsMarkedInternal&&e.builder.addAudience(Wro),e.options.respectReadonlySchemas&&e.options.useReadVariantForResponses){let i=Jro(e.ir),o=Yro(e.ir,i);e.setVariantPlan(o,i)}let t=Dic(e),r=t.sdkGroups;if(e.options.respectReadonlySchemas&&!e.options.useReadVariantForResponses){let i=Jro(e.ir),o=Yro(e.ir,i);e.setVariantPlan(o,i)}e.setInState(zO.Webhook),Qic(e),e.unsetInState(zO.Webhook),e.setInState(zO.Channel);for(let i of Object.values(e.ir.channels)){let o=Tue(i.groupName);iic({channel:i,context:e,declarationFile:o})}e.unsetInState(zO.Channel);let n=VCf({context:e,schemaIdsToExcludeFromServices:t.schemaIdsToExclude});Uic({schemas:e.ir.groupedSchemas.rootSchemas,schemaIdsToExclude:n,namespace:void 0,context:e});for(let[i,o]of Object.entries(e.ir.groupedSchemas.namespacedSchemas))Uic({schemas:o,schemaIdsToExclude:n,namespace:i,context:e});return e.ir.tags.orderedTagIds!=null&&e.ir.tags.orderedTagIds.length>0&&e.ir.tags.orderedTagIds.every(o=>r.has(o))&&e.builder.addNavigation({navigation:e.ir.tags.orderedTagIds}),e.builder.optimizeServiceAuth(),e.builder.build()}function VCf({context:e,schemaIdsToExcludeFromServices:t}){let r=e.getReferencedSchemaIds();if(r==null)return new Set(t);let n=new Set([...Object.keys(e.ir.groupedSchemas.rootSchemas),...Object.values(e.ir.groupedSchemas.namespacedSchemas).flatMap(o=>Object.keys(o))]),i=new Set(t);for(let o of n)r.includes(o)||i.add(o);return i}var Wro,Pic,Hro=h(()=>{"use strict";Va();No();ZA();$nc();oic();lic();fic();mic();gic();Ric();cFt();Fic();zic();Lic();pFt();nYe();Sro();nL();Wro="external",Pic=Ls.of(kf)});var mFt,_ic=h(()=>{"use strict";mFt=class{context;constructor(t){this.context=t}}});var w1r,qic=h(()=>{"use strict";ZA();Qt();w1r=class e{files={};directories={};getAllFiles(){let t={},r=(n,i)=>{for(let[s,a]of Object.entries(n.files)){let c=i!=null?Ls.of(`${i}${"/"}${s}`):Ls.of(s);t[c]=a}let o=Object.keys(n.directories).sort();for(let s of o){let a=i!=null?`${i}${"/"}${s}`:s,c=n.directories[s];r(c,a)}};return r(this),t}getOrCreateFile(t){return this.getOrCreateFileRecursive(t.split("/"))}getOrCreateFileRecursive(t){if(t.length===1)return this.files[Ls.of(t[0])]??={};let[r,...n]=t;if(r==null)throw new P({message:`Internal error; cannot add file with path: ${t}`,code:P.Code.InternalError});return this.directories[r]||(this.directories[r]=new e),this.directories[r].getOrCreateFileRecursive(n)}}});function Gic(e){return e?.header!=null}var UNe,Wic=h(()=>{"use strict";Va();No();ZA();qi();qic();UNe=class{enableUniqueErrorsPerEndpoint;root;rootApiFile;packageMarkerFile={};basePath=void 0;rootPathParameters=void 0;constructor(t){this.enableUniqueErrorsPerEndpoint=t,this.root=new w1r,this.rootApiFile={name:"api","error-discrimination":{strategy:"status-code"}}}setDisplayName({displayName:t}){this.rootApiFile["display-name"]=t}addNavigation({navigation:t}){this.packageMarkerFile.navigation=t}setServiceInfo(t,{auth:r,"base-path":n,"display-name":i,docs:o}){let s=this.getOrCreateFile(t);s.service==null&&(s.service={auth:!1,"base-path":"",endpoints:{}}),r!=null&&(s.service.auth=r),n!=null&&(s.service["base-path"]=n),i!=null&&(s.service["display-name"]=i),o!=null&&(s.docs=o)}addAudience(t){this.rootApiFile.audiences==null&&(this.rootApiFile.audiences=[]),this.rootApiFile.audiences.push(t)}setAuth(t){this.rootApiFile.auth=t}addAuthScheme({name:t,schema:r}){this.rootApiFile["auth-schemes"]==null&&(this.rootApiFile["auth-schemes"]={}),this.rootApiFile["auth-schemes"][t]==null&&(this.rootApiFile["auth-schemes"][t]=r)}setDefaultEnvironment(t){this.rootApiFile["default-environment"]=t}setDefaultUrl(t){this.rootApiFile["default-url"]=t}setBasePath(t){this.basePath=t}setRootPathParameters(t){Object.keys(t).length!==0&&(this.rootPathParameters=t)}setApiVersion(t){this.rootApiFile.version=t}getEnvironmentType(){let t=Object.entries(this.rootApiFile.environments??{})[0];if(t!=null)return wY(t[1],{singleBaseUrl:()=>"single",multipleBaseUrls:()=>"multi"})}addEnvironment({name:t,schema:r}){this.rootApiFile.environments==null&&(this.rootApiFile.environments={}),this.rootApiFile.environments[t]=r}getGlobalHeaderNames(){let t=Object.keys(this.rootApiFile.headers??{});if(this.rootApiFile["auth-schemes"]!=null)for(let n of Object.values(this.rootApiFile["auth-schemes"]))Gic(n)&&t.push(n.header);let r=this.getVersionHeader();return r!=null&&t.push(r),new Set(t)}getAuthHeaderName(){if(this.rootApiFile["auth-schemes"]!=null){for(let t of Object.values(this.rootApiFile["auth-schemes"]))if(Gic(t))return t.header;return"Authorization"}}addGlobalHeader({name:t,schema:r}){let n=this.getVersionHeader();n!=null&&n===t||(this.rootApiFile.headers==null&&(this.rootApiFile.headers={}),this.rootApiFile.headers[t]=r)}getGlobalHeaders(){return this.rootApiFile.headers??{}}addIdempotencyHeader({name:t,schema:r}){this.rootApiFile["idempotency-headers"]==null&&(this.rootApiFile["idempotency-headers"]={}),this.rootApiFile["idempotency-headers"][t]=r}addVariable({name:t,schema:r}){this.rootApiFile.variables==null&&(this.rootApiFile.variables={}),this.rootApiFile.variables[t]=r}addGlobalParameter({name:t,schema:r}){this.rootApiFile["global-parameters"]==null&&(this.rootApiFile["global-parameters"]={}),this.rootApiFile["global-parameters"][t]=r}addImport({file:t,fileToImport:r,alias:n}){if(t===r)return;let i=n??ei((cU(r)+"/"+IS(r,{stripExtension:!0})).replaceAll("__package__","root"));if(t===Ls.of(AI))return this.rootApiFile.imports==null&&(this.rootApiFile.imports={}),this.rootApiFile.imports[i]=g7e(cU(h7e.of(`/${t}`)),h7e.of(`/${r}`)),i;let o=this.getOrCreateFile(t);return o.imports==null&&(o.imports={}),o.imports[i]=g7e(cU(h7e.of(`/${t}`)),h7e.of(`/${r}`)),i}addType(t,{name:r,schema:n}){if(t===Ls.of(AI))return;let i=this.getOrCreateFile(t);i.types==null&&(i.types={}),i.types[r]=n}addTypeExample(t,r,n){let i=this.getOrCreateFile(t);i.types==null&&(i.types={});let o=i.types[r];o!=null&&(typeof o=="string"?i.types[r]={type:o,examples:[n]}:(o.examples==null&&(o.examples=[]),o.examples.push(n)))}addError(t,{name:r,schema:n}){let i=this.getOrCreateFile(t);i.errors==null&&(i.errors={}),i.errors[r]==null?i.errors[r]=n:i.errors[r]?.type!==n.type&&(i.errors[r]={"status-code":n["status-code"],type:"unknown"})}addErrorExample(t,{name:r,example:n}){let i=this.getOrCreateFile(t);if(i.errors==null)return;let o=i.errors[r];if(o==null)return;o.examples==null&&(o.examples=[]),(o.examples.some(a=>fI(a,n))??!1)||o.examples?.push(n)}addEndpoint(t,{name:r,schema:n,source:i}){let o=this.getOrCreateFile(t);o.service==null&&(o.service={auth:!1,"base-path":"",endpoints:{}}),i!=null&&(o.service.source=i),o.service.endpoints[r]=n}addWebhook(t,{name:r,schema:n}){let i=this.getOrCreateFile(t);i.webhooks==null&&(i.webhooks={}),i.webhooks[r]=n}addChannel(t,{channel:r}){let n=this.getOrCreateFile(t);n.channel=r;let i=this.basePath;i!=null&&(n.channel.path=dI(i,r.path))}addChannelExample(t,{example:r}){let n=this.getOrCreateFile(t);n.channel==null&&(n.channel={path:"",auth:!1}),n.channel.messages==null&&(n.channel.messages={}),n.channel.examples==null&&(n.channel.examples=[]),n.channel.examples.push(r)}addChannelMessage(t,{messageId:r,message:n}){let i=this.getOrCreateFile(t);i.channel==null&&(i.channel={path:"",auth:!1}),i.channel.messages==null&&(i.channel.messages={}),i.channel.messages[r]=n}optimizeServiceAuth(){let t=[this.packageMarkerFile,...Object.values(this.root.getAllFiles())];for(let r of t){if(r.service==null)continue;let n=Object.values(r.service.endpoints);if(n.length===0)continue;if(n.every(o=>o.auth===!0)){r.service.auth=!0;for(let o of Object.values(r.service.endpoints))delete o.auth}}}build(){let t=this.root.getAllFiles(),r=this.basePath,n=this.rootPathParameters,i=r!=null&&n==null&&!r.includes("{");if(r!=null&&i){this.packageMarkerFile.service!=null&&(this.packageMarkerFile.service={...this.packageMarkerFile.service,endpoints:Object.fromEntries(Object.entries(this.packageMarkerFile.service.endpoints).map(([s,a])=>[s,{...a,path:dI(r,a.path)}]))});for(let s of Object.values(t))s.service!=null&&(s.service={...s.service,endpoints:Object.fromEntries(Object.entries(s.service.endpoints).map(([a,c])=>[a,{...c,path:dI(r,c.path)}]))})}else r!=null&&(this.rootApiFile["base-path"]=r,n!=null&&(this.rootApiFile["path-parameters"]=n));return{rootApiFile:this.rootApiFile,packageMarkerFile:this.packageMarkerFile,definitionFiles:t}}getOrCreateFile(t){return t===kf?this.packageMarkerFile:this.root.getOrCreateFile(t)}getVersionHeader(){if(this.rootApiFile.version!=null)return typeof this.rootApiFile.version.header=="string"?this.rootApiFile.version.header:this.rootApiFile.version.header.value}}});var Xro=h(()=>{"use strict";_ic();Wic()});var S1r,Hic=h(()=>{"use strict";Dt();Xro();Ac();q$i();pFt();S1r=class{logger;taskContext;ir;builder;environmentOverrides;authOverrides;globalHeaderOverrides;options;enableUniqueErrorsPerEndpoint;defaultServerName=void 0;unknownSchema=new Set;referencedSchemaIds;urlIdMap=new Map;endpointMethod;state=new Set;schemaNameMapping=new Map;variantPlan;reachability;constructor({taskContext:t,ir:r,options:n,environmentOverrides:i,globalHeaderOverrides:o,authOverrides:s}){this.logger=t.logger,this.taskContext=t,this.ir=r,this.environmentOverrides=i,this.authOverrides=s,this.globalHeaderOverrides=o,this.options=PNe({options:n}),this.enableUniqueErrorsPerEndpoint=this.options.enableUniqueErrorsPerEndpoint,this.referencedSchemaIds=this.options.onlyIncludeReferencedSchemas?new Set:void 0,this.builder=new UNe(this.enableUniqueErrorsPerEndpoint),r.title!=null&&this.builder.setDisplayName({displayName:r.title});let a={};if(!this.enableUniqueErrorsPerEndpoint)for(let c of r.endpoints)for(let[u,l]of Object.entries(c.errors)){let p=parseInt(u),d=a[p];d==null&&l.schema!=null?a[p]=l.schema:d!=null&&l.schema!=null&&Nj(d,l.schema)||this.unknownSchema.add(p)}}getReferencedSchemaIds(){if(this.referencedSchemaIds!=null)return Array.from(this.referencedSchemaIds)}getSchema(t,r){return r==null?this.ir.groupedSchemas.rootSchemas[t]:this.ir.groupedSchemas.namespacedSchemas[r]?.[t]}getDefaultServerName(){return this.defaultServerName}setDefaultServerName(t){this.defaultServerName=t}setUrlId(t,r){this.urlIdMap.set(t,r)}getUrlId(t){return this.urlIdMap.get(t)}isErrorUnknownSchema(t){return this.unknownSchema.has(t)}getEndpointMethod(){return this.endpointMethod}setEndpointMethod(t){this.endpointMethod=t}unsetEndpointMethod(){this.endpointMethod=void 0}isInState(t){return this.state.has(t)}setInState(t){this.state.add(t)}unsetInState(t){this.state.delete(t)}shouldMarkSchemaAsReferenced(){return this.options.onlyIncludeReferencedSchemas&&this.isInAnyState(zO.Channel,zO.Endpoint,zO.Webhook)}markSchemaAsReferenced(t,r){switch(t.type){case"primitive":return;case"object":this.markObjectSchemaAsReferenced(t,r);return;case"array":this.markSchemaAsReferenced(t.value,r);return;case"map":this.markSchemaAsReferenced(t.value,r);return;case"optional":this.markSchemaAsReferenced(t.value,r);return;case"reference":this.markSchemaIdAsReferenced(t.schema,r);return;case"oneOf":this.markOneofSchemaAsReferenced(t.value,r);return;case"nullable":this.markSchemaAsReferenced(t.value,r);return;case"enum":return;case"literal":return;case"unknown":return;default:Ee(t)}}markObjectSchemaAsReferenced(t,r){for(let n of t.allOf)this.markSchemaIdAsReferenced(n.schema,r);for(let n of t.properties)this.markSchemaAsReferenced(n.schema,r)}markOneofSchemaAsReferenced(t,r){switch(t.type){case"discriminated":for(let n of Object.values(t.schemas))this.markSchemaAsReferenced(n,r);return;case"undiscriminated":for(let n of t.schemas)this.markSchemaAsReferenced(n,r);return;default:Ee(t)}}markSchemaIdAsReferenced(t,r){if(this.referencedSchemaIds!=null&&!this.referencedSchemaIds.has(t)){this.referencedSchemaIds.add(t);let n=this.getSchema(t,r);n!=null&&this.markSchemaAsReferenced(n,r)}}isInAnyState(...t){return t.some(r=>this.isInState(r))}setSchemaFinalName(t,r){this.schemaNameMapping.set(t,r)}hasReadVariant(t){return this.schemaNameMapping.has(t)}setVariantPlan(t,r){this.variantPlan=t,this.reachability=r;let n=[this.ir.groupedSchemas.rootSchemas,...Object.values(this.ir.groupedSchemas.namespacedSchemas)];for(let i of n)for(let[o,s]of Object.entries(i))if(t.needsBothVariants.has(o)&&s.type==="object"){let a=s.nameOverride??s.generatedName;this.schemaNameMapping.set(a,`${a}Read`)}}needsBothVariants(t){return this.variantPlan?.needsBothVariants.has(t)??!1}isRequestOnlyWithReadonly(t){return this.variantPlan?.requestOnlyWithReadonly.has(t)??!1}isResponseReachable(t){return this.reachability==null?this.ir.nonRequestReferencedSchemas.has(t):this.reachability.responseReachable.has(t)}isRequestOnly(t){return this.reachability==null?!this.ir.nonRequestReferencedSchemas.has(t):this.reachability.requestReachable.has(t)&&!this.reachability.responseReachable.has(t)}getSchemaFinalName(t,r){return!this.options.respectReadonlySchemas||r==="write"?t:this.schemaNameMapping.get(t)??t}}});function Zro(e){let t=new S1r(e);return Vic(t)}var Kic=h(()=>{"use strict";Hro();Hic()});var T1r=h(()=>{"use strict";q$i();Kic();C1r()});var _Cf,Jic,qCf,GCf,WCf,HCf,Eb,KCf,JCf,hFt,gFt,YCf,aF,Yic,Xic,Zic,$ic,eoc,toc,roc,noc,ioc,ooc,soc,aoc,coc,uoc,loc,poc,foc,$ro,XCf,ZCf,doc,tf0,rf0,nf0,if0,of0,sf0,aYe,af0,AFt,O1r,cf0,uf0,lf0,pf0,xr,cs=h(()=>{"use strict";_Cf=Object.create,Jic=Object.defineProperty,qCf=Object.getOwnPropertyDescriptor,GCf=Object.getOwnPropertyNames,WCf=Object.getPrototypeOf,HCf=Object.prototype.hasOwnProperty,Eb=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),KCf=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=GCf(t),o=0,s=i.length,a;o<s;o++)a=i[o],!HCf.call(e,a)&&a!==r&&Jic(e,a,{get:(c=>t[c]).bind(null,a),enumerable:!(n=qCf(t,a))||n.enumerable});return e},JCf=(e,t,r)=>(r=e!=null?_Cf(WCf(e)):{},KCf(t||!e||!e.__esModule?Jic(r,"default",{value:e,enumerable:!0}):r,e)),hFt=Eb(((e,t)=>{function r(c){return typeof c>"u"||c===null}function n(c){return typeof c=="object"&&c!==null}function i(c){return Array.isArray(c)?c:r(c)?[]:[c]}function o(c,u){if(u){let l=Object.keys(u);for(let p=0,d=l.length;p<d;p+=1){let f=l[p];c[f]=u[f]}}return c}function s(c,u){let l="";for(let p=0;p<u;p+=1)l+=c;return l}function a(c){return c===0&&Number.NEGATIVE_INFINITY===1/c}t.exports.isNothing=r,t.exports.isObject=n,t.exports.toArray=i,t.exports.repeat=s,t.exports.isNegativeZero=a,t.exports.extend=o})),gFt=Eb(((e,t)=>{function r(i,o){let s="",a=i.reason||"(unknown reason)";return i.mark?(i.mark.name&&(s+='in "'+i.mark.name+'" '),s+="("+(i.mark.line+1)+":"+(i.mark.column+1)+")",!o&&i.mark.snippet&&(s+=`
176
176
 
177
177
  `+i.mark.snippet),a+" "+s):a}function n(i,o){Error.call(this),this.name="YAMLException",this.reason=i,this.mark=o,this.message=r(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n.prototype.toString=function(o){return this.name+": "+r(this,o)},t.exports=n})),YCf=Eb(((e,t)=>{var r=hFt();function n(s,a,c,u,l){let p="",d="",f=Math.floor(l/2)-1;return u-a>f&&(p=" ... ",a=u-f+p.length),c-u>f&&(d=" ...",c=u+f-d.length),{str:p+s.slice(a,c).replace(/\t/g,"\u2192")+d,pos:u-a+p.length}}function i(s,a){return r.repeat(" ",a-s.length)+s}function o(s,a){if(a=Object.create(a||null),!s.buffer)return null;a.maxLength||(a.maxLength=79),typeof a.indent!="number"&&(a.indent=1),typeof a.linesBefore!="number"&&(a.linesBefore=3),typeof a.linesAfter!="number"&&(a.linesAfter=2);let c=/\r?\n|\r|\0/g,u=[0],l=[],p,d=-1;for(;p=c.exec(s.buffer);)l.push(p.index),u.push(p.index+p[0].length),s.position<=p.index&&d<0&&(d=u.length-2);d<0&&(d=u.length-1);let f="",m=Math.min(s.line+a.linesAfter,l.length).toString().length,g=a.maxLength-(a.indent+m+3);for(let y=1;y<=a.linesBefore&&!(d-y<0);y++){let E=n(s.buffer,u[d-y],l[d-y],s.position-(u[d]-u[d-y]),g);f=r.repeat(" ",a.indent)+i((s.line-y+1).toString(),m)+" | "+E.str+`
@@ -1718,7 +1718,7 @@ ${c}`)}async function WBl({logger:e,containerId:t,runner:r}){await xc(e,r??"dock
1718
1718
  `),priority:this.classifySection(u)})).sort((u,l)=>u.priority-l.priority),s=[],a=[],c=0;for(let u of o){let l=Buffer.byteLength(u.text,"utf-8"),p=a.length>0?1:0;if(l>r){a.length>0&&(s.push(a.join(`
1719
1719
  `)),a=[]),c=0,s.push(u.text);continue}c+l+p>r&&a.length>0&&(s.push(a.join(`
1720
1720
  `)),a=[],c=0),a.push(u.text),c+=l+(a.length>1?1:0)}return a.length>0&&s.push(a.join(`
1721
- `)),s}static isDiffHeader(t){return t.startsWith("--- a/")||t.startsWith("--- /dev/null")||t.startsWith("+++ b/")||t.startsWith("+++ /dev/null")}classifySection(t){let r=!1,n=!1,i=!1;for(let o of t.lines){let s=o.startsWith("+")&&!e.isDiffHeader(o),a=o.startsWith("-")&&!e.isDiffHeader(o);if(s&&(r=!0),a&&(n=!0),s||a){for(let c of e.SIGNATURE_PATTERNS)if(c.test(o)){i=!0;break}}if(r&&n&&i)break}return n&&!r?1:n&&r&&i?2:n&&r?3:r?4:5}parseFileSections(t){let r=[],n;for(let i of t)i.startsWith("diff --git")?(n!=null&&r.push(n),n={lines:[i]}):n?.lines.push(i);return n!=null&&r.push(n),r}cleanFileSection(t,r){let n=[],i=[],o=!1;for(let u of t.lines)u.startsWith("@@")?(o=!0,n.push(u)):o?i.push(u):n.push(u);let s=this.removeGoModulePathSuffixPairs(i);s=this.removeVersionChangePairs(s,r),s=this.removeRemainingMagicVersionLines(s,r);let a=!1;for(let u of s){let l=u.startsWith("+")&&!e.isDiffHeader(u),p=u.startsWith("-")&&!e.isDiffHeader(u);if(l||p){a=!0;break}}if(!a)return;let c={lines:[]};return c.lines.push(...n),c.lines.push(...s),c}removeRemainingMagicVersionLines(t,r){let n=[];for(let i of t)i.includes(r)||n.push(i);return n}removeVersionChangePairs(t,r){let n=new Set;for(let i=0;i<t.length;i++){let o=t[i];if(!(o==null||n.has(i)||!this.isDeletionLine(o)))for(let s=0;s<t.length;s++){if(s===i||n.has(s))continue;let a=t[s];if(!(a==null||!this.isAdditionLine(a))&&this.isVersionChangePair(o,a,r)){n.add(i),n.add(s);break}}}return t.filter((i,o)=>!n.has(o))}isDeletionLine(t){return t.startsWith("-")&&!e.isDiffHeader(t)}isAdditionLine(t){return t.startsWith("+")&&!e.isDiffHeader(t)}shouldStopSearching(t){return t.startsWith("@@")||t.startsWith("diff --git")||t.startsWith("index ")||e.isDiffHeader(t)}isVersionChangePair(t,r,n){if(this.isGoModulePathSuffixChange(t,r))return!0;if(!r.includes(n))return!1;let i=t.substring(1),o=r.substring(1),s=o.indexOf(n);if(s===-1)return!1;let a=o.substring(0,s),c=o.substring(s+n.length);if(!i.startsWith(a))return!1;let u=a.length,l=i.length-c.length;if(l<=u||l>i.length)return!1;let p=i.substring(u,l);return i.substring(l)!==c?!1:/.*\d+.*/.test(p)}isGoModulePathSuffixChange(t,r){let n=this.analyzeGoModulePathLine(t),i=this.analyzeGoModulePathLine(r);return n==null||i==null||n.strippedContent!==i.strippedContent?!1:n.hasSuffix||i.hasSuffix}removeGoModulePathSuffixPairs(t){let r=[];for(let o=0;o<t.length;o++){let s=t[o];if(s==null||!this.isAdditionLine(s))continue;let a=this.analyzeGoModulePathLine(s);a!=null&&r.push({index:o,strippedContent:a.strippedContent})}let n=new Set,i=new Set;for(let o=0;o<t.length;o++){let s=t[o];if(s==null||!this.isDeletionLine(s))continue;let a=this.analyzeGoModulePathLine(s);if(a==null||!a.hasSuffix)continue;let c=r.find(u=>!i.has(u.index)&&u.strippedContent===a.strippedContent);c!=null&&(i.add(c.index),n.add(o),n.add(c.index))}return n.size===0?t:t.filter((o,s)=>!n.has(s))}analyzeGoModulePathLine(t){let r=t.substring(1),n=/"[^"]*(?:github\.com|golang\.org|google\.golang\.org|gopkg\.in)\/[^"]*"/,i=/^\s*module\s+(?:github\.com|golang\.org|google\.golang\.org|gopkg\.in)\/\S+/;if(!(n.test(r)||i.test(r.trim())))return;let s=/\/v\d+(?=\/|"|$)/g;return{strippedContent:r.replace(s,""),hasSuffix:s.test(r)}}async getLatestVersionFromGitTags(t){try{let n=(await(0,vFh.loggingExeca)(this.logger,"git",["ls-remote","--tags","origin"],{cwd:t,doNotPipeOutput:!0})).stdout;if(!n||n.trim().length===0){this.logger.info("No git tags found in repository");return}let i=[];for(let s of n.split(`
1721
+ `)),s}static isDiffHeader(t){return t.startsWith("--- a/")||t.startsWith("--- /dev/null")||t.startsWith("+++ b/")||t.startsWith("+++ /dev/null")}classifySection(t){let r=!1,n=!1,i=!1;for(let o of t.lines){let s=o.startsWith("+")&&!e.isDiffHeader(o),a=o.startsWith("-")&&!e.isDiffHeader(o);if(s&&(r=!0),a&&(n=!0),s||a){for(let c of e.SIGNATURE_PATTERNS)if(c.test(o)){i=!0;break}}if(r&&n&&i)break}return n&&!r?1:n&&r&&i?2:n&&r?3:r?4:5}parseFileSections(t){let r=[],n;for(let i of t)i.startsWith("diff --git")?(n!=null&&r.push(n),n={lines:[i]}):n?.lines.push(i);return n!=null&&r.push(n),r}cleanFileSection(t,r){let n=[],i=[],o=!1;for(let u of t.lines)u.startsWith("@@")?(o=!0,n.push(u)):o?i.push(u):n.push(u);let s=this.removeGoModulePathSuffixPairs(i);s=this.removeGoExplicitFieldBitConstantPairs(s),s=this.removeVersionChangePairs(s,r),s=this.removeRemainingMagicVersionLines(s,r);let a=!1;for(let u of s){let l=u.startsWith("+")&&!e.isDiffHeader(u),p=u.startsWith("-")&&!e.isDiffHeader(u);if(l||p){a=!0;break}}if(!a)return;let c={lines:[]};return c.lines.push(...n),c.lines.push(...s),c}removeRemainingMagicVersionLines(t,r){let n=[];for(let i of t)i.includes(r)||n.push(i);return n}removeVersionChangePairs(t,r){let n=new Set;for(let i=0;i<t.length;i++){let o=t[i];if(!(o==null||n.has(i)||!this.isDeletionLine(o)))for(let s=0;s<t.length;s++){if(s===i||n.has(s))continue;let a=t[s];if(!(a==null||!this.isAdditionLine(a))&&this.isVersionChangePair(o,a,r)){n.add(i),n.add(s);break}}}return t.filter((i,o)=>!n.has(o))}isDeletionLine(t){return t.startsWith("-")&&!e.isDiffHeader(t)}isAdditionLine(t){return t.startsWith("+")&&!e.isDiffHeader(t)}shouldStopSearching(t){return t.startsWith("@@")||t.startsWith("diff --git")||t.startsWith("index ")||e.isDiffHeader(t)}isVersionChangePair(t,r,n){if(this.isGoModulePathSuffixChange(t,r))return!0;if(!r.includes(n))return!1;let i=t.substring(1),o=r.substring(1),s=o.indexOf(n);if(s===-1)return!1;let a=o.substring(0,s),c=o.substring(s+n.length);if(!i.startsWith(a))return!1;let u=a.length,l=i.length-c.length;if(l<=u||l>i.length)return!1;let p=i.substring(u,l);return i.substring(l)!==c?!1:/.*\d+.*/.test(p)}isGoModulePathSuffixChange(t,r){let n=this.analyzeGoModulePathLine(t),i=this.analyzeGoModulePathLine(r);return n==null||i==null||n.strippedContent!==i.strippedContent?!1:n.hasSuffix||i.hasSuffix}removeGoModulePathSuffixPairs(t){let r=[];for(let o=0;o<t.length;o++){let s=t[o];if(s==null||!this.isAdditionLine(s))continue;let a=this.analyzeGoModulePathLine(s);a!=null&&r.push({index:o,strippedContent:a.strippedContent})}let n=new Set,i=new Set;for(let o=0;o<t.length;o++){let s=t[o];if(s==null||!this.isDeletionLine(s))continue;let a=this.analyzeGoModulePathLine(s);if(a==null||!a.hasSuffix)continue;let c=r.find(u=>!i.has(u.index)&&u.strippedContent===a.strippedContent);c!=null&&(i.add(c.index),n.add(o),n.add(c.index))}return n.size===0?t:t.filter((o,s)=>!n.has(s))}analyzeGoModulePathLine(t){let r=t.substring(1),n=/"[^"]*(?:github\.com|golang\.org|google\.golang\.org|gopkg\.in)\/[^"]*"/,i=/^\s*module\s+(?:github\.com|golang\.org|google\.golang\.org|gopkg\.in)\/\S+/;if(!(n.test(r)||i.test(r.trim())))return;let s=/\/v\d+(?=\/|"|$)/g;return{strippedContent:r.replace(s,""),hasSuffix:s.test(r)}}removeGoExplicitFieldBitConstantPairs(t){let r=[];for(let o=0;o<t.length;o++){let s=t[o];if(s==null||!this.isAdditionLine(s))continue;let a=this.analyzeGoBitConstantLine(s);a!=null&&r.push({index:o,normalized:a.normalized})}let n=new Set,i=new Set;for(let o=0;o<t.length;o++){let s=t[o];if(s==null||!this.isDeletionLine(s))continue;let a=this.analyzeGoBitConstantLine(s);if(a==null)continue;let c=r.find(u=>!i.has(u.index)&&u.normalized===a.normalized);c!=null&&(i.add(c.index),n.add(o),n.add(c.index))}return n.size===0?t:t.filter((o,s)=>!n.has(s))}analyzeGoBitConstantLine(t){let r=t.substring(1),n=r.match(/^(\s*)([A-Za-z_][A-Za-z0-9_]*)\s*=\s*big\.NewInt\(1\s*<<\s*\d+\)\s*$/);if(n?.[2]!=null)return{normalized:`${n[2]}=big.NewInt(1<<#)`};let i=r.match(/^(\s*)([A-Za-z_][A-Za-z0-9_]*)\s*=\s*big\.NewInt\(0\)\.Lsh\(big\.NewInt\(1\),\s*\d+\)\s*$/);if(i?.[2]!=null)return{normalized:`${i[2]}=big.NewInt(0).Lsh(big.NewInt(1),#)`}}async getLatestVersionFromGitTags(t){try{let n=(await(0,vFh.loggingExeca)(this.logger,"git",["ls-remote","--tags","origin"],{cwd:t,doNotPipeOutput:!0})).stdout;if(!n||n.trim().length===0){this.logger.info("No git tags found in repository");return}let i=[];for(let s of n.split(`
1722
1722
  `)){let a=s.trim();if(a.length===0||a.includes("^{}"))continue;let c=a.match(/refs\/tags\/(.+)$/);c?.[1]&&i.push(c[1])}let o=i.filter(s=>_Pl.default.valid(s)!=null).sort((s,a)=>_Pl.default.rcompare(s,a));if(o.length>0){let s=o[0];return this.logger.info(`Found latest version from git tags: ${s}`),s}this.logger.info("No valid semver tags found in repository");return}catch(r){this.logger.warn(`Failed to read git tags: ${r}`);return}}async replaceMagicVersion(t,r,n){this.logger.debug(`Replacing placeholder version ${r} with final version: ${n}`);let i=await this.walkDirectory(t,()=>!0),o=async c=>{if(await this.isBinaryFile(c))return!1;let u=await(0,K9.readFile)(c,"utf-8");if(!u.includes(r))return!1;let l=u.split(r).join(n);return await(0,K9.writeFile)(c,l,"utf-8"),!0},a=(await this.processInParallel(i,o)).filter(Boolean).length;this.logger.debug(`Placeholder version replaced successfully in ${a} file(s)`)}async isBinaryFile(t){let r=await(0,K9.open)(t,"r");try{let n=Buffer.alloc(8192),{bytesRead:i}=await r.read(n,0,8192,0);for(let o=0;o<i;o++)if(n[o]===0)return!0;return!1}finally{await r.close()}}async addGoMajorVersionSuffix(t,r){let n=this.extractMajorVersion(r);if(n==null||n<2){this.logger.debug(`Version ${r} has major ${n??"unknown"}, no Go module path suffix needed`);return}let i=(0,Xui.join)(t,"go.mod");if(!(0,xFh.existsSync)(i)){this.logger.debug(`No go.mod found in ${t}, skipping Go module path update`);return}let o=await this.readGoModulePath(i);if(o==null){this.logger.warn(`Could not read module path from go.mod in ${t}`);return}let s=`/v${n}`;if(/\/v\d+$/.test(o)){this.logger.debug(`Module path ${o} already has a version suffix, skipping`);return}await this.addSuffixToGoMod(i,o,s),await this.addSuffixToGoFiles(t,o,s),await this.addSuffixToMarkdownFiles(t,o,s),this.logger.info(`Added ${s} to Go module path ${o} across imports, headers, and docs`)}extractMajorVersion(t){let r=t.match(/^v?(\d+)\./);if(r?.[1]!=null)return parseInt(r[1],10)}async readGoModulePath(t){let r=await(0,K9.readFile)(t,"utf-8");for(let n of r.split(`
1723
1723
  `)){let i=n.trim();if(i.startsWith("module "))return i.substring(7).trim()}}async addSuffixToGoMod(t,r,n){let o=(await(0,K9.readFile)(t,"utf-8")).split(`
1724
1724
  `),s=!1;for(let a=0;a<o.length;a++){let c=o[a];if(c!=null&&c.trim().startsWith("module ")&&c.includes(r)){o[a]=c.replace(r,r+n),s=!0;break}}s&&(await(0,K9.writeFile)(t,o.join(`
@@ -3091,7 +3091,7 @@ ${EPu.default.cursorShow}`)}releaseCursor(){this.extraLinesUnderPrompt>0&&I2o(th
3091
3091
  `+cLe.default.red(">> ")+t),this.screen.render(r,n)}getMaskedValue(t){return this.status==="answered"?this.opt.mask?cLe.default.cyan(BPu(t,this.opt.mask)):cLe.default.italic(cLe.default.dim("[hidden]")):this.opt.mask?BPu(t,this.opt.mask):cLe.default.italic(cLe.default.dim("[input is hidden] "))}getSpinningValue(t){return this.getMaskedValue(t)}filterInput(t){return t||(this.opt.default==null?"":this.opt.default)}onEnd(t){this.status="answered",this.answer=t.value,this.render(),this.screen.done(),this.done(t.value)}onError(t){this.render(t.isValid)}onKeypress(){this.opt.default&&=void 0,this.render()}};var rqr=be(kw(),1);var ODu=be(rNo(),1),eqr=require("child_process"),Ynt=require("fs"),$9r=be(require("path"),1),BDu=be(require("os"),1),PDu=require("crypto"),LNo=be(SDu(),1);var Y9r=class extends Error{originalError;constructor(t){super(`Failed to create temporary file. ${t.message}`),this.originalError=t}};var bUt=class extends Error{originalError;constructor(t){super(`Failed to launch editor. ${t.message}`),this.originalError=t}};var X9r=class extends Error{originalError;constructor(t){super(`Failed to read temporary file. ${t.message}`),this.originalError=t}};var Z9r=class extends Error{originalError;constructor(t){super(`Failed to remove temporary file. ${t.message}`),this.originalError=t}};function tqr(e="",t,r){let n=new UNo(e,r);n.runAsync((i,o)=>{if(i)setImmediate(t,i,void 0);else try{n.cleanup(),setImmediate(t,void 0,o)}catch(s){setImmediate(t,s,void 0)}})}function TDu(e){return e?e.replace(/[^a-zA-Z0-9_.-]/g,"_"):""}function Rdm(e){let t=[],r="";for(let n=0;n<e.length;n++){let i=e.charAt(n);n>0&&i===" "&&e[n-1]!=="\\"&&r.length>0?(t.push(r),r=""):r=`${r}${i}`}return r.length>0&&t.push(r),t}var UNo=class{text="";tempFile;editor;lastExitStatus=0;fileOptions={};get temp_file(){return console.log("DEPRECATED: temp_file. Use tempFile moving forward."),this.tempFile}get last_exit_status(){return console.log("DEPRECATED: last_exit_status. Use lastExitStatus moving forward."),this.lastExitStatus}constructor(t="",r){this.text=t,r&&(this.fileOptions=r),this.determineEditor(),this.createTemporaryFile()}run(){return this.launchEditor(),this.readTemporaryFile(),this.text}runAsync(t){try{this.launchEditorAsync(()=>{try{this.readTemporaryFile(),setImmediate(t,void 0,this.text)}catch(r){setImmediate(t,r,void 0)}})}catch(r){setImmediate(t,r,void 0)}}cleanup(){this.removeTemporaryFile()}determineEditor(){let t=process.env.VISUAL?process.env.VISUAL:process.env.EDITOR?process.env.EDITOR:process.platform.startsWith("win")?"notepad":"vim",r=Rdm(t).map(i=>i.replace("\\ "," ")),n=r.shift();this.editor={args:r,bin:n}}createTemporaryFile(){try{let t=this.fileOptions.dir??BDu.default.tmpdir(),r=(0,PDu.randomUUID)(),n=TDu(this.fileOptions.prefix),i=TDu(this.fileOptions.postfix),o=`${n}${r}${i}`,s=$9r.default.resolve(t,o),a=$9r.default.resolve(t)+$9r.default.sep;if(!s.startsWith(a))throw new Error("Resolved temporary file escaped the base directory");this.tempFile=s;let c={encoding:"utf8",flag:"wx"};Object.prototype.hasOwnProperty.call(this.fileOptions,"mode")&&(c.mode=this.fileOptions.mode),(0,Ynt.writeFileSync)(this.tempFile,this.text,c)}catch(t){throw new Y9r(t)}}readTemporaryFile(){try{let t=(0,Ynt.readFileSync)(this.tempFile);if(t.length===0)this.text="";else{let r=(0,ODu.detect)(t)??"utf8";LNo.default.encodingExists(r)||(r="utf8"),this.text=LNo.default.decode(t,r)}}catch(t){throw new X9r(t)}}removeTemporaryFile(){try{(0,Ynt.unlinkSync)(this.tempFile)}catch(t){throw new Z9r(t)}}launchEditor(){try{let t=(0,eqr.spawnSync)(this.editor.bin,this.editor.args.concat([this.tempFile]),{stdio:"inherit"});this.lastExitStatus=t.status??0}catch(t){throw new bUt(t)}}launchEditorAsync(t){try{(0,eqr.spawn)(this.editor.bin,this.editor.args.concat([this.tempFile]),{stdio:"inherit"}).on("exit",n=>{this.lastExitStatus=n,setImmediate(t)})}catch(r){throw new bUt(r)}}};var DDu=be(JL(),1);var EUt=class extends Fw{_run(t){this.done=t,this.editorResult=new DDu.Subject;let r=IB(this.rl);this.lineSubscription=r.line.subscribe(this.startExternalEditor.bind(this));let n=this.opt.waitUserInput===void 0?!0:this.opt.waitUserInput,i=this.handleSubmitEvents(this.editorResult);return i.success.forEach(this.onEnd.bind(this)),i.error.forEach(this.onError.bind(this)),this.currentText=this.opt.default,this.opt.default=null,n?this.render():this.startExternalEditor(),this}render(t){let r="",n=this.getQuestion();n+=this.status==="answered"?rqr.default.dim("Received"):rqr.default.dim("Press <enter> to launch your preferred editor."),t&&(r=rqr.default.red(">> ")+t),this.screen.render(n,r)}startExternalEditor(){this.rl.pause(),tqr(this.currentText,this.endExternalEditor.bind(this),{postfix:this.opt.postfix??".txt"})}endExternalEditor(t,r){this.rl.resume(),t?this.editorResult.error(t):this.editorResult.next(r)}onEnd(t){this.editorResult.unsubscribe(),this.lineSubscription.unsubscribe(),this.answer=t.value,this.status="answered",this.render(),this.screen.done(),this.done(this.answer)}onError(t){this.render(t.isValid)}};var jDu=require("stream");var FDu=be(require("readline"),1),NDu=be(kDu(),1),fLe=class{constructor(t){this.rl||=FDu.default.createInterface(Fdm(t)),this.rl.resume(),this.onForceClose=this.onForceClose.bind(this),process.on("exit",this.onForceClose),this.rl.on("SIGINT",this.onForceClose)}onForceClose(){this.close(),process.kill(process.pid,"SIGINT"),console.log("")}close(){this.rl.removeListener("SIGINT",this.onForceClose),process.removeListener("exit",this.onForceClose),this.rl.output.unmute(),this.activePrompt&&typeof this.activePrompt.close=="function"&&this.activePrompt.close(),this.rl.output.end(),this.rl.pause(),this.rl.close()}};function Fdm(e={}){e.skipTTYChecks=e.skipTTYChecks===void 0?!0:e.skipTTYChecks;let t=e.input||process.stdin;if(!e.skipTTYChecks&&!t.isTTY){let i=new Error("Prompts can not be meaningfully rendered in non-TTY environments");throw i.isTtyError=!0,i}let r=new NDu.default;return r.pipe(e.output||process.stdout),{terminal:!0,...e,input:t,output:r}}var IUt=class extends fLe{constructor(t={}){super(t),this.log=new jDu.Writable({write:(r,n,i)=>{this.writeLog(r),i()}}),this.bottomBar=t.bottomBar||"",this.render()}render(){return this.write(this.bottomBar),this}clean(){return iUt(this.rl,this.bottomBar.split(`
3092
3092
  `).length),this}updateBottomBar(t){return iUt(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+`
3093
3093
  `}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&&C9r(this.rl,t.length+this.rl.line.length),this.rl.output.write(t)}};var Td=be(JL(),1),MDu=be(N4t(),1);var nqr=be(JL(),1),QDu=be(N4t(),1),iqr=function(e,t,r){return typeof e[t]!="function"?(0,nqr.of)(e):(0,nqr.from)((0,QDu.default)(e[t])(r).then(n=>(e[t]=n,e)))};var zDu={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}},Xnt=class extends fLe{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,Td.from)(t):(0,Td.isObservable)(t)?n=t:Object.values(t).every(i=>typeof i=="object"&&!Array.isArray(i)&&i!=null)?n=(0,Td.from)(Object.entries(t).map(([i,o])=>({name:i,...o}))):n=(0,Td.from)([t]),this.process=n.pipe((0,Td.concatMap)(this.processQuestion.bind(this)),(0,Td.publish)()),this.process.connect(),this.process.pipe((0,Td.reduce)((i,o)=>(zDu.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,Td.defer)(()=>(0,Td.of)(t).pipe((0,Td.concatMap)(this.setDefaultType.bind(this)),(0,Td.concatMap)(this.filterIfRunnable.bind(this)),(0,Td.concatMap)(()=>iqr(t,"message",this.answers)),(0,Td.concatMap)(()=>iqr(t,"default",this.answers)),(0,Td.concatMap)(()=>iqr(t,"choices",this.answers)),(0,Td.concatMap)(this.fetchAnswer.bind(this))))}fetchAnswer(t){let r=this.prompts[t.type];return this.activePrompt=new r(t,this.rl,this.answers),(0,Td.defer)(()=>(0,Td.from)(this.activePrompt.run().then(n=>({name:t.name,answer:n}))))}setDefaultType(t){return this.prompts[t.type]||(t.type="input"),(0,Td.defer)(()=>(0,Td.of)(t))}filterIfRunnable(t){if(t.askAnswered!==!0&&zDu.get(this.answers,t.name)!==void 0)return Td.EMPTY;if(t.when===!1)return Td.EMPTY;if(typeof t.when!="function")return(0,Td.of)(t);let{answers:r}=this;return(0,Td.defer)(()=>(0,Td.from)((0,MDu.default)(t.when)(r).then(n=>{if(n)return t})).pipe((0,Td.filter)(n=>n!=null)))}};function LDu(e){let t=function(r,n){let i;try{i=new Xnt(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",sUt),this.registerPrompt("input",aLe),this.registerPrompt("number",aUt),this.registerPrompt("confirm",cUt),this.registerPrompt("rawlist",uUt),this.registerPrompt("expand",lUt),this.registerPrompt("checkbox",pUt),this.registerPrompt("password",fUt),this.registerPrompt("editor",EUt)},t.restoreDefaultPrompts(),t}var _No=LDu();function jdm(e,t){_No.registerPrompt(e,t)}function Qdm(){_No.restoreDefaultPrompts()}var zdm={prompt:_No,ui:{BottomBar:IUt,Prompt:Xnt},createPromptModule:LDu,registerPrompt:jdm,restoreDefaultPrompts:Qdm,Separator:QQ},cu=zdm;var Znt=require("path");function VDu(){let e=Mdm();return async t=>{for(let r of t)r.module=e(r.filename);return t}}function Mdm(e=process.argv[1]?(0,Znt.dirname)(process.argv[1]):process.cwd(),t=Znt.sep==="\\"){let r=t?UDu(e):e;return n=>{if(!n)return;let i=t?UDu(n):n,{dir:o,base:s,ext:a}=Znt.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 UDu(e){return e.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}var qNo=e=>{if("flags"in e){let t=_Du(e.flags),r=qDu(e.flags);return{...e,featureFlags:t,featureFlagPayloads:r}}{let t=e.featureFlags??{},r=Object.fromEntries(Object.entries(e.featureFlagPayloads||{}).map(([i,o])=>[i,GNo(o)])),n=Object.fromEntries(Object.entries(t).map(([i,o])=>[i,Ldm(i,o,r[i])]));return{...e,featureFlags:t,featureFlagPayloads:r,flags:n}}};function Ldm(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 _Du=e=>Object.fromEntries(Object.entries(e??{}).map(([t,r])=>[t,vUt(r)]).filter(([,t])=>t!==void 0)),qDu=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?GNo(n):void 0]}))};var vUt=e=>e===void 0?void 0:e.variant??e.enabled,GNo=e=>{if(typeof e!="string")return e;try{return JSON.parse(e)}catch{return e}};var KF=(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.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.SurveyLastSeenDate="survey_last_seen_date",e.SurveysSeen="surveys_seen",e.Surveys="surveys",e.RemoteConfig="remote_config",e.FlagsEndpointWasHit="flags_endpoint_was_hit",e.DeviceId="device_id",e})({});function WNo(){return"CompressionStream"in globalThis&&"TextEncoder"in globalThis&&"Response"in globalThis&&typeof Response.prototype.blob=="function"}var Vdm="NativeGzipValidationError",_dm=31,qdm=139,Gdm=8,Wdm=e=>e.length>=2&&e[0]===_dm&&e[1]===qdm;var xUt,Hdm=()=>{if(xUt)return xUt;xUt=[];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;xUt[e]=t>>>0}return xUt},Kdm=e=>{let t=Hdm(),r=4294967295;for(let n=0;n<e.length;n++)r=t[(r^e[n])&255]^r>>>8;return(4294967295^r)>>>0},oqr=e=>{let t=new Error(`Native gzip produced invalid output: ${e}`);throw t.name=Vdm,t},Jdm=async(e,t)=>{e.size<18&&oqr("too-short");let r=new Uint8Array(await e.slice(0,10).arrayBuffer());(!Wdm(r)||r[2]!==Gdm)&&oqr("invalid-header");let n=new DataView(await e.slice(e.size-8).arrayBuffer());n.getUint32(0,!0)!==Kdm(t)&&oqr("invalid-crc");let i=t.length>>>0;n.getUint32(4,!0)!==i&&oqr("invalid-size")};async function CUt(e,t=!0,r){try{let n=new TextEncoder().encode(e),i=new 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 Jdm(c,n),c}catch(n){if(r?.rethrow)throw n;return t&&console.error("Failed to gzip compress data",n),null}}var Ydm=["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","pinterest","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"],GDu=function(e,t=[]){if(!e)return!1;let r=e.toLowerCase();return Ydm.concat(t).some(n=>{let i=n.toLowerCase();return r.indexOf(i)!==-1})};var Zdm=Array.isArray,WDu=Object.prototype,n0I=WDu.hasOwnProperty,HNo=WDu.toString,$nt=Zdm||function(e){return HNo.call(e)==="[object Array]"};var wUt=e=>e===Object(e)&&!$nt(e);var eit=e=>e===void 0,Rve=e=>HNo.call(e)=="[object String]",HDu=e=>Rve(e)&&e.trim().length===0;var SUt=e=>HNo.call(e)=="[object Number]"&&e===e;var KNo=e=>e instanceof Error;function sqr(e){return e===null||typeof e!="object"}function dLe(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function KDu(e){return dLe(e,"ErrorEvent")}function tit(e){return typeof Event<"u"&&$dm(e,Event)}function JDu(e){return dLe(e,"Object")}function $dm(e,t){try{return e instanceof t}catch{return!1}}function TUt(e,t,r,n,i){return t>r&&(n.warn("min cannot be greater than max."),t=r),SUt(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),TUt(i||r,t,r,n))}var emm=864e5,aqr=class{constructor(t){this._buckets={},this._onBucketRateLimited=t._onBucketRateLimited,this._bucketSize=TUt(t.bucketSize,0,100,t._logger),this._refillRate=TUt(t.refillRate,0,this._bucketSize,t._logger),this._refillInterval=TUt(t.refillInterval,0,emm,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 cqr="0123456789abcdef",uqr=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+=cqr.charAt(this.bytes[r]>>>4),t+=cqr.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+=cqr.charAt(this.bytes[r]>>>4),t+=cqr.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}},JNo=class{constructor(t){this.timestamp=0,this.counter=0,this.random=t??tmm()}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 uqr.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,uqr.ofInner(t)}},tmm=()=>({nextUint32:()=>65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random())}),YDu,fee=()=>rmm().toString(),rmm=()=>(YDu||(YDu=new JNo)).generate();var lqr=class{add(t){let r=fee();return this.promiseByIds[r]=t,t.catch(()=>{}).finally(()=>{delete this.promiseByIds[r]}),t}async join(){let t=Object.values(this.promiseByIds),r=t.length;for(;r>0;)await Promise.all(t),t=Object.values(this.promiseByIds),r=t.length}get length(){return Object.keys(this.promiseByIds).length}constructor(){this.promiseByIds={}}};function nmm(e=console){return{log:e.log.bind(e),warn:e.warn.bind(e),error:e.error.bind(e),debug:e.debug.bind(e)}}var XDu=(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=>XDu(`${e} ${o}`,t,r)}},imm=e=>e();function ZDu(e,t=imm){return XDu(e,t,nmm())}var nit="Mobile",fqr="iOS",rit="Android",$Du="Tablet",h0I=rit+" "+$Du;var smm="Apple",g0I=smm+" Watch",eRu="Safari",dqr="BlackBerry",tRu="Samsung",amm=tRu+"Browser",cmm=tRu+" Internet",mqr="Chrome",umm=mqr+" OS",lmm=mqr+" "+fqr,rRu="Internet Explorer",pmm=rRu+" "+nit,XNo="Opera",A0I=XNo+" Mini",nRu="Edge",fmm="Microsoft "+nRu,ZNo="Firefox",dmm=ZNo+" "+fqr,$No="Nintendo",ejo="PlayStation",pqr="Xbox",mmm=rit+" "+nit,hmm=nit+" "+eRu,OUt="Windows",gmm=OUt+" Phone";var iRu="Generic",y0I=iRu+" "+nit.toLowerCase(),b0I=iRu+" "+$Du.toLowerCase(),Amm="Konqueror",ymm="Oculus Browser",TD="(\\d+(\\.\\d+)?)",YNo=new RegExp("Version/"+TD),E0I=new RegExp(pqr,"i"),I0I=new RegExp(ejo+" \\w+","i"),v0I=new RegExp($No+" \\w+","i"),bmm=new RegExp(dqr+"|PlayBook|BB10","i"),Emm={"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 x0I={[pmm]:[new RegExp("rv:"+TD)],[fmm]:[new RegExp(nRu+"?\\/"+TD)],[mqr]:[new RegExp("("+mqr+"|CrMo)\\/"+TD)],[lmm]:[new RegExp("CriOS\\/"+TD)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+TD)],[eRu]:[YNo],[hmm]:[YNo],[XNo]:[new RegExp("("+XNo+"|OPR)\\/"+TD)],[ZNo]:[new RegExp(ZNo+"\\/"+TD)],[dmm]:[new RegExp("FxiOS\\/"+TD)],[Amm]:[new RegExp("Konqueror[:/]?"+TD,"i")],[dqr]:[new RegExp(dqr+" "+TD),YNo],[mmm]:[new RegExp("android\\s"+TD,"i")],[cmm]:[new RegExp(amm+"\\/"+TD)],[ymm]:[new RegExp("OculusBrowser\\/"+TD)],[rRu]:[new RegExp("(rv:|MSIE )"+TD)],Mozilla:[new RegExp("rv:"+TD)]};var C0I=[[new RegExp(pqr+"; "+pqr+" (.*?)[);]","i"),e=>[pqr,e&&e[1]||""]],[new RegExp($No,"i"),[$No,""]],[new RegExp(ejo,"i"),[ejo,""]],[bmm,[dqr,""]],[new RegExp(OUt,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[gmm,""];if(new RegExp(nit).test(t)&&!/IEMobile\b/.test(t))return[OUt+" "+nit,""];let r=/Windows NT ([0-9.]+)/i.exec(t);if(r&&r[1]){let n=r[1],i=Emm[n]||"";return/arm/i.test(t)&&(i="RT"),[OUt,i]}return[OUt,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>{if(e&&e[3]){let t=[e[3],e[4],e[5]||"0"];return[fqr,t.join(".")]}return[fqr,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{let t="";return e&&e.length>=3&&(t=eit(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+rit+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+rit+")","i"),e=>{if(e&&e[2]){let t=[e[2],e[3],e[4]||"0"];return[rit,t.join(".")]}return[rit,""]}],[/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/,[umm,""]],[/Linux|debian/i,["Linux",""]]];var oRu="utf8";function sRu(e){return e?.replace(/\/+$/,"")}async function aRu(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 hqr(){return new Date().toISOString()}function dee(e,t){let r=setTimeout(e,t);return r?.unref&&r?.unref(),r}var cRu=e=>e instanceof Error;function tjo(e){return Promise.all(e.map(t=>(t??Promise.resolve()).then(r=>({status:"fulfilled",value:r}),r=>({status:"rejected",reason:r}))))}var Imm={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}},z0I=Imm.info;var gqr=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)}};var hLe=class extends Error{constructor(t,r){super("HTTP error while fetching PostHog: status="+t.status+", reqByteLength="+r),this.response=t,this.reqByteLength=r,this.name="PostHogFetchHttpError"}get status(){return this.response.status}get text(){return this.response.text()}get json(){return this.response.json()}},mLe=class extends Error{constructor(t){super("Network error while fetching PostHog",t instanceof Error?{cause:t}:{}),this.error=t,this.name="PostHogFetchNetworkError"}};async function uRu(e){if(e instanceof hLe){let t="";try{t=await e.text}catch{}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 Aqr(e){return typeof e=="object"&&(e instanceof hLe||e instanceof mLe)}function yqr(e){return typeof e=="object"&&e instanceof hLe&&e.status===413}var BUt=class{constructor(t,r={}){this.flushPromise=null,this.shutdownPromise=null,this.promiseQueue=new lqr,this._events=new gqr,this._isInitialized=!1;let n=typeof t=="string"?t.trim():"",i=typeof r.host=="string"?r.host.trim():"",o=!n;this._logger=ZDu("[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=sRu(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:Aqr},this.requestTimeout=r.requestTimeout??1e4,this.featureFlagsRequestTimeoutMs=r.featureFlagsRequestTimeoutMs??3e3,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=!WNo()||(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(KF.OptedOut)??!this.defaultOptIn}async optIn(){this.wrap(()=>{this.setPersistedProperty(KF.OptedOut,!1)})}async optOut(){this.wrap(()=>{this.setPersistedProperty(KF.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){return{distinct_id:t.distinct_id,event:t.event,properties:{...t.properties||{},...this.getCommonEventProperties()}}}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 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,{retryCount:0},this.remoteConfigRequestTimeoutMs).then(i=>i.json()).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={method:"POST",headers:{...this.getCustomHeaders(),"Content-Type":"application/json"},body:JSON.stringify(u)};return this._logger.info("Flags URL",c),this.fetchWithRetry(c,l,{retryCount:0},this.featureFlagsRequestTimeoutMs).then(p=>p.json()).then(p=>({success:!0,response:qNo(p)})).catch(p=>(this._events.emit("error",p),{success:!1,error:this.categorizeRequestError(p)}))}categorizeRequestError(t){if(t instanceof hLe)return{type:"api_error",statusCode:t.status};if(t instanceof mLe){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=vUt(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={};(o??this.disableGeoip)&&(a.geoip_disable=!0),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).then(o=>{if(o.status!==200||!o.json){let s=`Surveys API could not be loaded: ${o.status}`,a=new Error(s);this._logger.error(a),this._events.emit("error",new Error(s));return}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(KF.Props)),this._props||{}}set props(t){this._props=t}async register(t){this.wrap(()=>{this.props={...this.props,...t},this.setPersistedProperty(KF.Props,this.props)})}async unregister(t){this.wrap(()=>{delete this.props[t],this.setPersistedProperty(KF.Props,this.props)})}processBeforeEnqueue(t){return t}async flushStorage(){}enqueue(t,r,n){this.wrap(()=>{if(this.optedOut)return void this._events.emit(t,"Library is disabled. Not sending event. To re-enable, call posthog.optIn()");let i=this.prepareMessage(t,r,n);if(i=this.processBeforeEnqueue(i),i===null)return;let o=this.getPersistedProperty(KF.Queue)||[];o.length>=this.maxQueueSize&&(o.shift(),this._logger.info("Queue is full, the oldest event is dropped.")),o.push({message:i}),this.setPersistedProperty(KF.Queue,o),this._events.emit(t,i),o.length>=this.flushAt&&this.flushBackground(),this.flushInterval&&!this._flushTimer&&(this._flushTimer=dee(()=>this.flushBackground(),this.flushInterval))})}async sendImmediate(t,r,n){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 i=this.prepareMessage(t,r,n);if(i=this.processBeforeEnqueue(i),i===null)return;let o={api_key:this.apiKey,batch:[i],sent_at:hqr()};this.historicalMigration&&(o.historical_migration=!0);let s=JSON.stringify(o),a=`${this.host}/batch/`,c=this.disableCompression?null:await CUt(s,this.isDebug),u={method:"POST",headers:{...this.getCustomHeaders(),"Content-Type":"application/json",...c!==null&&{"Content-Encoding":"gzip"}},body:c||s};try{await(await this.fetchWithRetry(a,u)).body?.cancel()?.catch(()=>{})}catch(l){this._events.emit("error",l)}}prepareMessage(t,r,n){let i={...r,type:t,library:this.getLibraryId(),library_version:this.getLibraryVersion(),timestamp:n?.timestamp?n?.timestamp:hqr(),uuid:n?.uuid?n.uuid:fee()};return(n?.disableGeoip??this.disableGeoip)&&(i.properties||(i.properties={}),i.properties.$geoip_disable=!0),i.distinctId&&(i.distinct_id=i.distinctId,delete i.distinctId),i}clearFlushTimer(){this._flushTimer&&(clearTimeout(this._flushTimer),this._flushTimer=void 0)}flushBackground(){this.flush().catch(async t=>{await uRu(t)})}async flush(){if(this.disabled)return;let t=tjo([this.flushPromise]).then(()=>this._flush());return this.flushPromise=t,this.addPendingPromise(t),tjo([t]).then(()=>{this.flushPromise===t&&(this.flushPromise=null)}),t}getCustomHeaders(){let t=this.getCustomUserAgent(),r={};return t&&t!==""&&(r["User-Agent"]=t),r}async _flush(){this.clearFlushTimer(),await this._initPromise;let t=this.getPersistedProperty(KF.Queue)||[];if(!t.length)return;let r=[],n=t.length;for(;t.length>0&&r.length<n;){let i=t.slice(0,this.maxBatchSize),o=i.map(f=>f.message),s=async()=>{let m=(this.getPersistedProperty(KF.Queue)||[]).slice(i.length);this.setPersistedProperty(KF.Queue,m),t=m,await this.flushStorage()},a={api_key:this.apiKey,batch:o,sent_at:hqr()};this.historicalMigration&&(a.historical_migration=!0);let c=JSON.stringify(a),u=`${this.host}/batch/`,l=this.disableCompression?null:await CUt(c,this.isDebug),p={method:"POST",headers:{...this.getCustomHeaders(),"Content-Type":"application/json",...l!==null&&{"Content-Encoding":"gzip"}},body:l||c},d={retryCheck:f=>yqr(f)?!1:Aqr(f)};try{await(await this.fetchWithRetry(u,p,d)).body?.cancel()?.catch(()=>{})}catch(f){if(yqr(f)&&o.length>1){this.maxBatchSize=Math.max(1,Math.floor(o.length/2)),this._logger.warn(`Received 413 when sending batch of size ${o.length}, reducing batch size to ${this.maxBatchSize}`);continue}throw f instanceof mLe||await s(),this._events.emit("error",f),f}await s(),r.push(...o)}this._events.emit("flush",r)}async _sendLogsBatch(t){if(this.disabled)return{kind:"fatal",error:new Error("The client is disabled")};let r=JSON.stringify(t),n=`${this.host}/i/v1/logs?token=${encodeURIComponent(this.apiKey)}`,i=this.disableCompression?null:await CUt(r,this.isDebug),o={method:"POST",headers:{...this.getCustomHeaders(),"Content-Type":"application/json",...i!==null&&{"Content-Encoding":"gzip"}},body:i||r};try{return await this.fetchWithRetry(n,o,{retryCheck:s=>yqr(s)?!1:Aqr(s)}),{kind:"ok"}}catch(s){return yqr(s)?{kind:"too-large"}:s instanceof mLe?{kind:"retry-later",error:s}:{kind:"fatal",error:s}}}async fetchWithRetry(t,r,n,i){let o=r.body?r.body:"",s=-1;try{s=o instanceof Blob?o.size:Buffer.byteLength(o,oRu)}catch{o instanceof Blob?s=o.size:s=new TextEncoder().encode(o).length}return await aRu(async()=>{let a=new AbortController,c=i??this.requestTimeout,u=dee(()=>a.abort(),c),l=null;try{l=await this.fetch(t,{signal:a.signal,...r})}catch(d){throw new mLe(d)}finally{clearTimeout(u)}if(!(r.mode==="no-cors")&&(l.status<200||l.status>=400))throw new hLe(l,s);return l},{...this._retryOptions,...n})}async _shutdown(t=3e4){await this._initPromise;let r=!1;if(this.clearFlushTimer(),this.disabled)return;let n=async()=>{try{for(await this.promiseQueue.join();!((this.getPersistedProperty(KF.Queue)||[]).length===0||(await this.flush(),r)););}catch(o){if(!Aqr(o))throw o;await uRu(o)}},i;try{return await Promise.race([new Promise((o,s)=>{i=dee(()=>{this._logger.error("Timed out while shutting down PostHog"),r=!0,s("Timeout while shutting down PostHog. Some events may not have been sent.")},t)}),n()])}finally{clearTimeout(i)}}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 MQ={};X(MQ,{DEFAULT_EXCEPTION_STEPS_CONFIG:()=>xqr,DOMExceptionCoercer:()=>ojo,EXCEPTION_STEP_INTERNAL_FIELDS:()=>PUt,ErrorCoercer:()=>sjo,ErrorEventCoercer:()=>ajo,ErrorPropertiesBuilder:()=>rjo,EventCoercer:()=>ljo,ExceptionStepsBuffer:()=>hjo,ObjectCoercer:()=>ujo,PrimitiveCoercer:()=>pjo,PromiseRejectionEventCoercer:()=>fjo,ReduceableCache:()=>djo,StringCoercer:()=>cjo,chromeStackLineParser:()=>njo,createDefaultStackParser:()=>zmm,createStackParser:()=>ERu,geckoStackLineParser:()=>ijo,getUtf8ByteLength:()=>vRu,nodeStackLineParser:()=>gRu,opera10StackLineParser:()=>dRu,opera11StackLineParser:()=>mRu,resolveExceptionStepsConfig:()=>mjo,reverseAndStripFrames:()=>bRu,stripReservedExceptionStepFields:()=>Umm,winjsStackLineParser:()=>fRu});var bqr,lRu,Eqr;function pRu(e){let t=globalThis._posthogChunkIds;if(!t)return;let r=Object.keys(t);return Eqr&&r.length===lRu||(lRu=r.length,Eqr=r.reduce((n,i)=>{bqr||(bqr={});let o=bqr[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,bqr[i]=[u,l];break}}}return n},{})),Eqr}var wmm=4,rjo=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&&$nt(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;return t.stack!=""&&t.stack!=null&&(i=this.applyChunkIds(this.stackParser(t.stack,t.synthetic?r.skipFirstLines:0),r.chunkIdMap)),{...t,cause:n,stack:i}}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={type:t.type,value:t.value,mechanism:{type:r.type??"generic",handled:r.handled??!0,synthetic:t.synthetic??!1}};t.stack&&(n.stacktrace={type:"raw",frames:t.stack});let i=[n];return t.cause!=null&&i.push(...this.convertToExceptionList(t.cause,{...r,handled:!0})),i}buildParsingContext(t){return{chunkIdMap:pRu(this.stackParser),skipFirstLines:t.skipFirstLines??1}}buildCoercingContext(t,r,n=0){let i=(s,a)=>{if(a<=wmm){let c=this.buildCoercingContext(t,r,a);return this.applyCoercers(s,c)}};return{...r,syntheticException:n==0?r.syntheticException:void 0,mechanism:t,apply:s=>i(s,n),next:s=>i(s,n+1)}}};var xB="?";function mee(e,t,r,n,i){let o={platform:e,filename:t,function:r==="<anonymous>"?xB:r,in_app:!0};return eit(n)||(o.lineno=n),eit(i)||(o.colno=i),o}var Iqr=(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]:xB,r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};var Smm=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Tmm=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Omm=/\((\S*)(?::(\d+))(?::(\d+))\)/,njo=(e,t)=>{let r=Smm.exec(e);if(r){let[,i,o,s]=r;return mee(t,i,xB,+o,+s)}let n=Tmm.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){let a=Omm.exec(n[2]);a&&(n[2]=a[1],n[3]=a[2],n[4]=a[3])}let[o,s]=Iqr(n[1]||xB,n[2]);return mee(t,s,o,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}};var Bmm=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Pmm=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ijo=(e,t)=>{let r=Bmm.exec(e);if(r){if(r[3]&&r[3].indexOf(" > eval")>-1){let s=Pmm.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]||xB;return[o,i]=Iqr(o,i),mee(t,i,o,r[4]?+r[4]:void 0,r[5]?+r[5]:void 0)}};var Dmm=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,fRu=(e,t)=>{let r=Dmm.exec(e);return r?mee(t,r[2],r[1]||xB,+r[3],r[4]?+r[4]:void 0):void 0};var Rmm=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,dRu=(e,t)=>{let r=Rmm.exec(e);return r?mee(t,r[2],r[3]||xB,+r[1]):void 0},kmm=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,mRu=(e,t)=>{let r=kmm.exec(e);return r?mee(t,r[5],r[3]||r[4]||xB,+r[1],+r[2]):void 0};var Fmm=/^\s*[-]{4,}$/,Nmm=/at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/,gRu=(e,t)=>{let r=e.match(Nmm);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||xB,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]),{filename:c?decodeURI(c):void 0,module:void 0,function:o,lineno:hRu(r[3]),colno:hRu(r[4]),in_app:jmm(c||"",u),platform:t}}if(e.match(Fmm))return{filename:e,platform:t}};function jmm(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 hRu(e){return parseInt(e||"",10)||void 0}var ARu=/\(error: (.*)\)/,yRu=50;function bRu(e){if(!e.length)return[];let t=Array.from(e);return t.reverse(),t.slice(0,yRu).map(r=>({...r,filename:r.filename||Qmm(t).filename,function:r.function||xB}))}function Qmm(e){return e[e.length-1]||{}}function zmm(){return ERu("web:javascript",njo,ijo)}function ERu(e,...t){return(r,n=0)=>{let i=[],o=r.split(`
3094
- `);for(let s=n;s<o.length;s++){let a=o[s];if(a.length>1024)continue;let c=ARu.test(a)?a.replace(ARu,"$1"):a;if(!c.match(/\S*Error: /)){for(let u of t){let l=u(c,e);if(l){i.push(l);break}}if(i.length>=yRu)break}}return bRu(i)}}var ojo=class{match(t){return this.isDOMException(t)||this.isDOMError(t)}coerce(t,r){let n=Rve(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 dLe(t,"DOMException")}isDOMError(t){return dLe(t,"DOMError")}};var sjo=class{match(t){return KNo(t)}coerce(t,r){return{type:this.getType(t),value:this.getMessage(t,r),stack:this.getStack(t),cause:t.cause?r.next(t.cause):void 0,synthetic:!1}}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){return t.stacktrace||t.stack||void 0}};var ajo=class{constructor(){}match(t){return KDu(t)&&t.error!=null}coerce(t,r){let n=r.apply(t.error);return n||{type:"ErrorEvent",value:t.message,stack:r.syntheticException?.stack,synthetic:!0}}};var Mmm=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,cjo=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(Mmm);return i&&(r=i[1],n=i[2]),[r,n]}};var IRu=["fatal","error","warning","log","info","debug"];function vqr(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 ujo=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:r.syntheticException?.stack,level:this.isSeverityLevel(t.level)?t.level:"error",synthetic:!0}}getType(t){return tit(t)?t.constructor.name:"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=vqr(t);return`${r&&r!=="Object"?`'${r}'`:"Object"} captured as exception with keys: ${n}`}isSeverityLevel(t){return Rve(t)&&!HDu(t)&&IRu.indexOf(t)>=0}getErrorPropertyFromObject(t){for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let n=t[r];if(cRu(n))return n}}getObjectClassName(t){try{let r=Object.getPrototypeOf(t);return r?r.constructor.name:void 0}catch{return}}};var ljo=class{match(t){return tit(t)}coerce(t,r){let n=t.constructor.name;return{type:n,value:`${n} captured as exception with keys: ${vqr(t)}`,stack:r.syntheticException?.stack,synthetic:!0}}};var pjo=class{match(t){return sqr(t)}coerce(t,r){return{type:"Error",value:`Primitive value captured as exception: ${String(t)}`,stack:r.syntheticException?.stack,synthetic:!0}}};var fjo=class{match(t){return dLe(t,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(t)}isCustomEventWrappingRejection(t){if(!tit(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 sqr(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 djo=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 PUt={MESSAGE:"$message",TIMESTAMP:"$timestamp"},Lmm=new Set([PUt.MESSAGE,PUt.TIMESTAMP]),xqr={enabled:!0,max_bytes:32768};function mjo(e){return e?{enabled:e.enabled??xqr.enabled,max_bytes:Vmm(e.max_bytes,xqr.max_bytes)}:{...xqr}}function Umm(e){if(!e)return{sanitizedProperties:{},droppedKeys:[]};let t=[];return{sanitizedProperties:Object.keys(e).reduce((n,i)=>Lmm.has(i)?(t.push(i),n):(n[i]=e[i],n),{}),droppedKeys:t}}var hjo=class{constructor(t){this._entries=[],this._totalBytes=0,this._config=mjo(t)}setConfig(t){this._config=mjo(t),this._trimToMaxBytes()}add(t){let r=_mm(t);if(!r)return;let n=vRu(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 Vmm(e,t){if(!SUt(e)||e===1/0||e===-1/0)return t;let r=Math.floor(e);return r<0?t:r}function _mm(e){let t=qmm(e);if(t)try{let r=JSON.parse(t);if(!wUt(r))return;let n=r,i=n[PUt.MESSAGE],o=n[PUt.TIMESTAMP];return!Rve(i)||i.trim().length===0||!Rve(o)&&!SUt(o)?void 0:{step:n,json:t}}catch{return}}function qmm(e){let t=new WeakSet;try{return JSON.stringify(e,(r,n)=>{if(typeof n=="bigint")return n.toString();if(!(typeof n=="function"||typeof n=="symbol")){if(n instanceof Date)return n.toISOString();if(n instanceof Error)return{name:n.name,message:n.message,stack:n.stack};if(n&&typeof n=="object"){if(t.has(n))return"[Circular]";t.add(n)}return n}})}catch{return}}function vRu(e){if(typeof TextEncoder<"u")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}var wRu=require("fs"),SRu=require("readline"),Cqr=new MQ.ReduceableCache(25),TRu=new MQ.ReduceableCache(20),gjo=7,Gmm=1e3,Wmm=1e4;async function ORu(e){let t={};for(let i=e.length-1;i>=0;i--){let o=e[i],s=o?.filename;if(!o||typeof s!="string"||typeof o.lineno!="number"||Ymm(s)||Xmm(o))continue;t[s]||(t[s]=[]),t[s].push(o.lineno)}let r=Object.keys(t);if(r.length==0)return e;let n=[];for(let i of r){if(TRu.get(i))continue;let o=t[i];if(!o)continue;o.sort((c,u)=>c-u);let s=$mm(o);if(s.every(c=>Zmm(i,c)))continue;let a=ehm(Cqr,i,{});n.push(Hmm(i,s,a))}return await Promise.all(n).catch(()=>{}),e&&e.length>0&&Kmm(e,Cqr),Cqr.reduce(),e}function Hmm(e,t,r){return new Promise(n=>{let i=(0,wRu.createReadStream)(e),o=(0,SRu.createInterface)({input:i});function s(){i.destroy(),n()}let a=0,c=0,u=t[c];if(u===void 0)return void s();let l=u[0],p=u[1];function d(){TRu.set(e,1),o.close(),o.removeAllListeners(),s()}i.on("error",d),o.on("error",d),o.on("close",s),o.on("line",f=>{if(a++,!(a<l)&&(r[a]=thm(f,0),a>=p)){if(c===t.length-1){o.close(),o.removeAllListeners();return}c++;let m=t[c];if(m===void 0){o.close(),o.removeAllListeners();return}l=m[0],p=m[1]}})})}function Kmm(e,t){for(let r of e)if(r.filename&&r.context_line===void 0&&typeof r.lineno=="number"){let n=t.get(r.filename);if(n===void 0)continue;Jmm(r.lineno,r,n)}}function Jmm(e,t,r){if(t.lineno===void 0||r===void 0)return;t.pre_context=[];for(let i=BRu(e);i<e;i++){let o=r[i];if(o===void 0)return void xRu(t);t.pre_context.push(o)}if(r[e]===void 0)return void xRu(t);t.context_line=r[e];let n=PRu(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 xRu(e){delete e.pre_context,delete e.context_line,delete e.post_context}function Ymm(e){return e.startsWith("node:")||e.endsWith(".min.js")||e.endsWith(".min.cjs")||e.endsWith(".min.mjs")||e.startsWith("data:")}function Xmm(e){return e.lineno!==void 0&&e.lineno>Wmm||e.colno!==void 0&&e.colno>Gmm}function Zmm(e,t){let r=Cqr.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 $mm(e){if(!e.length)return[];let t=0,r=e[0];if(typeof r!="number")return[];let n=CRu(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+gjo:(i.push(n),n=CRu(o)),t++}return i}function CRu(e){return[BRu(e),PRu(e)]}function BRu(e){return Math.max(1,e-gjo)}function PRu(e){return e+gjo}function ehm(e,t,r){let n=e.get(t);return n===void 0?(e.set(t,r),r):n}function thm(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 iit=require("path");function DRu(e=process.cwd()){let t=iit.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,iit.isAbsolute)(o.filename)&&(o.filename=r((0,iit.relative)(n,r(o.filename))));return i}}function rhm(e,t){let r=!1;return Object.assign(n=>{let o=global.process.listeners("uncaughtException").filter(s=>s.name!=="domainUncaughtExceptionClear"&&s._posthogErrorHandler!==!0).length===0;e(n,{mechanism:{type:"onuncaughtexception",handled:!1}}),!r&&o&&(r=!0,t(n))},{_posthogErrorHandler:!0})}function RRu(e,t){globalThis.process?.on("uncaughtException",rhm(e,t))}function kRu(e){globalThis.process?.on("unhandledRejection",t=>e(t,{mechanism:{type:"onunhandledrejection",handled:!1}}))}var nhm=2e3,sH=class e{constructor(t,r,n){this.client=t,this._exceptionAutocaptureEnabled=r.enableExceptionAutocapture||!1,this._logger=n,this._rateLimiter=new aqr({refillRate:1,bucketSize:10,refillInterval:1e4,_logger:this._logger}),this.startAutocaptureIfEnabled()}static isPreviouslyCapturedError(t){return wUt(t)&&"__posthog_previously_captured_error"in t&&t.__posthog_previously_captured_error===!0}static async buildEventMessage(t,r,n,i){let o={...i},s=this.errorPropertiesBuilder.buildFromUnknown(t,r);return s.$exception_list=await this.errorPropertiesBuilder.modifyFrames(s.$exception_list),{event:"$exception",distinctId:n,properties:{...s,...o},_originatedFromCaptureException:!0}}startAutocaptureIfEnabled(){this.isEnabled()&&(RRu(this.onException.bind(this),this.onFatalError.bind(this)),kRu(this.onException.bind(this)))}onException(t,r){this.client.addPendingPromise((async()=>{if(!e.isPreviouslyCapturedError(t)){let n=await e.buildEventMessage(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.capture(n)}})())}async onFatalError(t){console.error(t),await this.client.shutdown(nhm),process.exit(1)}isEnabled(){return!this.client.isDisabled&&this._exceptionAutocaptureEnabled}shutdown(){this._rateLimiter.stop()}};var FRu="5.35.1";var dfe={ERRORS_WHILE_COMPUTING:"errors_while_computing_flags",FLAG_MISSING:"flag_missing",QUOTA_LIMITED:"quota_limited",UNKNOWN_ERROR:"unknown_error"};var oit=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){let r=this._flags[t];return this._recordAccess(t),r?.enabled??!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?.locallyEvaluated&&this._flagDefinitionsLoadedAt!==void 0&&(i.$feature_flag_definitions_loaded_at=this._flagDefinitionsLoadedAt);let o=[];this._errorsWhileComputing&&o.push(dfe.ERRORS_WHILE_COMPUTING),this._quotaLimited&&o.push(dfe.QUOTA_LIMITED),r===void 0&&o.push(dfe.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})}};async function NRu(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(i=>i.toString(16).padStart(2,"0")).join("")}var ihm=6e4,ohm=1152921504606847e3,shm=["is_not","is_set"],sit=class e extends Error{constructor(t){super(),Error.captureStackTrace(this,this.constructor),this.name="ClientError",this.message=t,Object.setPrototypeOf(this,e.prototype)}},Od=class e extends Error{constructor(t){super(t),this.name=this.constructor.name,Error.captureStackTrace(this,this.constructor),Object.setPrototypeOf(this,e.prototype)}},hee=class e extends Error{constructor(t){super(t),this.name=this.constructor.name,Error.captureStackTrace(this,this.constructor),Object.setPrototypeOf(this,e.prototype)}},wqr=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.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.cacheProvider=a.cacheProvider,this.strictLocalEvaluation=a.strictLocalEvaluation??!1,this.loadFeatureFlags()}debug(t=!0){this.debugMode=t}logMsgIfDebug(t){this.debugMode&&t()}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 hee||u instanceof Od?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={...t,evaluationCache:t.evaluationCache??{}};return await Promise.all(s.map(async c=>{try{let{value:u,payload:l}=await this.computeFlagAndPayloadLocally(c,a);n[c.key]=u,l&&(i[c.key]=l)}catch(u){u instanceof hee||u instanceof Od?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(o||await this.loadFeatureFlags(),!this.loadedSuccessfullyOnce)return{value:!1,payload:null};let s;s=i!==void 0?i:await this.computeFlagValueLocally(t,r);let a=this.getFeatureFlagPayload(t.key,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 Od("Flag has experience continuity enabled");let c=(t.filters||{}).aggregation_group_type_index;if(c!=null){let u=this.groupTypeMapping[String(c)];if(!u)throw this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Unknown group type index ${c} for feature flag ${t.key}`)),new Od("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 Od(`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}getFeatureFlagPayload(t,r){let n=null;if(r!==!1&&r!=null&&(typeof r=="boolean"?n=this.featureFlagsByKey?.[t]?.filters?.payloads?.[r.toString()]||null:typeof r=="string"&&(n=this.featureFlagsByKey?.[t]?.filters?.payloads?.[r]||null),n!=null)){if(typeof n=="object")return n;if(typeof n=="string")try{return JSON.parse(n)}catch{}return n}return null}async evaluateFlagDependency(t,r,n){let{evaluationCache:i}=n,o=t.key;if(!this.featureFlagsByKey)throw new Od("Feature flags not available for dependency evaluation");if(!("dependency_chain"in t))throw new Od(`Flag dependency property for '${o}' is missing required 'dependency_chain' field`);let s=t.dependency_chain;if(!Array.isArray(s))throw new Od(`Flag dependency property for '${o}' has an invalid 'dependency_chain' (expected array, got ${typeof s})`);if(s.length===0)throw new Od(`Circular dependency detected for flag '${o}' (empty dependency chain)`);for(let c of s){if(!(c in i)){let l=this.featureFlagsByKey[c];if(l)if(l.active)try{let p=await this.computeFlagValueLocally(l,n);i[c]=p}catch(p){throw new Od(`Error evaluating flag dependency '${c}' for flag '${o}': ${p}`)}else i[c]=!1;else throw new Od(`Missing flag dependency '${c}' for flag '${o}'`)}if(i[c]==null)throw new Od(`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){let o=t.filters||{},s=o.groups||[],a=o.aggregation_group_type_index,{groups:c,groupProperties:u}=i,l=!1,p;for(let d of s)try{let f=d.aggregation_group_type_index!==void 0?d.aggregation_group_type_index:a,m=n,g=r;if(f!==a&&f!=null){let A=this.groupTypeMapping[String(f)];if(!A||!(A in c)){this.logMsgIfDebug(()=>console.debug(`[FEATURE FLAGS] Skipping group condition for flag '${t.key}': group type index ${f} not available`));continue}if(!(A in u)){l=!0;continue}m=u[A],g=c[A]}if(await this.isConditionMatch(t,g,d,m,i)){let A=d.variant,y=o.multivariate?.variants||[];p=A&&y.some(E=>E.key===A)?A:await this.getMatchingVariant(t,g)||!0;break}}catch(f){if(f instanceof hee)throw f;if(f instanceof Od)l=!0;else throw f}if(p!==void 0)return p;if(l)throw new Od("Can't determine if feature flag is enabled or not with given properties");return!1}async isConditionMatch(t,r,n,i,o){let s=n.rollout_percentage,a=c=>{this.logMsgIfDebug(()=>console.warn(c))};if((n.properties||[]).length>0){for(let c of n.properties){let u=c.type,l=!1;if(l=u==="cohort"?await LRu(c,i,this.cohorts,this.debugMode,p=>this.evaluateFlagDependency(p,i,o)):u==="flag"?await this.evaluateFlagDependency(c,i,o):MRu(c,i,a),!l)return!1}if(s==null)return!0}return!(s!=null&&await jRu(t.key,r)>s/100)}async getMatchingVariant(t,r){let n=await jRu(t.key,r,"variant"),i=this.variantLookupTable(t).find(o=>n>=o.valueMin&&n<o.valueMax);if(i)return i.key}variantLookupTable(t){let r=[],n=0,i=0;return((t.filters||{}).multivariate?.variants||[]).forEach(a=>{i=n+a.rollout_percentage/100,r.push({valueMin:n,valueMax:i,key:a.key}),n=i}),r}updateFlagState(t){this.featureFlags=t.flags,this.featureFlagsByKey=t.flags.reduce((r,n)=>(r[n.key]=n,r),{}),this.groupTypeMapping=t.groupTypeMapping,this.cohorts=t.cohorts,this.loadedSuccessfullyOnce=!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(r.flags),!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(){return this.shouldBeginExponentialBackoff?Math.min(ihm,this.pollingInterval*2**this.backOffCount):this.pollingInterval}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),this.poller=setTimeout(()=>this.loadFeatureFlags(!0),this.getPollingInterval());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 sit(`Your project key or personal API 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.groupTypeMapping={},this.cohorts={};return;case 403:throw this.beginBackoff(),new sit(`Your personal API 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 personal and Project API key pair? More information: https://posthog.com/docs/api/overview`);case 429:throw this.beginBackoff(),new sit(`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={flags:n.flags??[],groupTypeMapping:n.group_type_mapping||{},cohorts:n.cohorts||{}};if(this.updateFlagState(i),this.flagDefinitionsLoadedAt=Date.now(),this.clearBackoff(),this.cacheProvider&&t)try{await this.cacheProvider.onFlagDefinitionsReceived(i)}catch(o){this.onError?.(new Error(`Failed to store in cache: ${o}`))}this.onLoad?.(this.featureFlags.length),this.warnAboutExperienceContinuityFlags(i.flags);break}default:return}}catch(t){t instanceof sit&&this.onError?.(t)}}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}}_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 i=new AbortController;n=dee(()=>{i.abort()},this.timeout),r.signal=i.signal}try{let i=this.fetch;return i(t,r)}finally{clearTimeout(n)}}async stopPoller(t=3e4){if(clearTimeout(this.poller),this.cacheProvider)try{let r=this.cacheProvider.shutdown();r instanceof Promise&&await Promise.race([r,new Promise((n,i)=>setTimeout(()=>i(new Error(`Cache shutdown timeout after ${t}ms`)),t))])}catch(r){this.onError?.(new Error(`Error during cache shutdown: ${r}`))}}};async function jRu(e,t,r=""){let n=await NRu(`${e}.${t}${r}`);return parseInt(n.slice(0,15),16)/ohm}function MRu(e,t,r){let n=e.key,i=e.value,o=e.operator||"exact";if(n in t){if(o==="is_not_set")return!1}else{if(o==="is_not_set")return!0;throw new Od(`Property ${n} not found in propertyValues`)}let s=t[n];if(s==null&&!shm.includes(o))return r&&r(`Property ${n} cannot have a value of null/undefined with the ${o} operator`),!1;function a(u,l){return Array.isArray(u)?u.map(p=>String(p).toLowerCase()).includes(String(l).toLowerCase()):String(u).toLowerCase()===String(l).toLowerCase()}function c(u,l,p){if(p==="gt")return u>l;if(p==="gte")return u>=l;if(p==="lt")return u<l;if(p==="lte")return u<=l;throw new Error(`Invalid operator: ${p}`)}switch(o){case"exact":return a(i,s);case"is_not":return!a(i,s);case"is_set":return n in t;case"icontains":return String(s).toLowerCase().includes(String(i).toLowerCase());case"not_icontains":return!String(s).toLowerCase().includes(String(i).toLowerCase());case"regex":return QRu(String(i))&&String(s).match(String(i))!==null;case"not_regex":return QRu(String(i))&&String(s).match(String(i))===null;case"gt":case"gte":case"lt":case"lte":{let u=typeof i=="number"?i:parseFloat(String(i)),l;return l=typeof s=="number"?s:s!=null?parseFloat(String(s)):NaN,Number.isFinite(u)&&Number.isFinite(l)?c(l,u,o):c(String(s),String(i),o)}case"is_date_after":case"is_date_before":{if(typeof i=="boolean")throw new Od("Date operations cannot be performed on boolean values");let u=phm(String(i));if(u==null&&(u=zRu(i)),u==null)throw new Od(`Invalid date: ${i}`);let l=zRu(s);return["is_date_before"].includes(o)?l<u:l>u}case"semver_eq":return w_(CB(String(s)),CB(String(i)))===0;case"semver_neq":return w_(CB(String(s)),CB(String(i)))!==0;case"semver_gt":return w_(CB(String(s)),CB(String(i)))>0;case"semver_gte":return w_(CB(String(s)),CB(String(i)))>=0;case"semver_lt":return w_(CB(String(s)),CB(String(i)))<0;case"semver_lte":return w_(CB(String(s)),CB(String(i)))<=0;case"semver_tilde":{let u=CB(String(s)),{lower:l,upper:p}=chm(String(i));return w_(u,l)>=0&&w_(u,p)<0}case"semver_caret":{let u=CB(String(s)),{lower:l,upper:p}=uhm(String(i));return w_(u,l)>=0&&w_(u,p)<0}case"semver_wildcard":{let u=CB(String(s)),{lower:l,upper:p}=lhm(String(i));return w_(u,l)>=0&&w_(u,p)<0}default:throw new Od(`Unknown operator: ${o}`)}}function ahm(e,t){if(!(e in t))throw new hee(`cohort ${e} not found in local cohorts - likely a static cohort that requires server evaluation`)}async function LRu(e,t,r,n=!1,i){let o=String(e.value);ahm(o,r);let s=r[o];return URu(s,t,r,n,i)}async function URu(e,t,r,n=!1,i){if(!e)return!0;let o=e.type,s=e.values;if(!s||s.length===0)return!0;let a=!1;if("values"in s[0]){for(let c of s)try{let u=await URu(c,t,r,n,i);if(o==="AND"){if(!u)return!1}else if(u)return!0}catch(u){if(u instanceof hee)throw u;if(u instanceof Od)n&&console.debug(`Failed to compute property ${c} locally: ${u}`),a=!0;else throw u}if(a)throw new Od("Can't match cohort without a given cohort property value");return o==="AND"}for(let c of s)try{let u;if(c.type==="cohort")u=await LRu(c,t,r,n,i);else if(c.type==="flag"){if(!i)throw new Od(`Flag dependency '${c.key||"unknown"}' cannot be evaluated without a flag dependency evaluator`);u=await i(c)}else u=MRu(c,t);let l=c.negation||!1;if(o==="AND"){if(!u&&!l||u&&l)return!1}else if(u&&!l||!u&&l)return!0}catch(u){if(u instanceof hee)throw u;if(u instanceof Od)n&&console.debug(`Failed to compute property ${c} locally: ${u}`),a=!0;else throw u}if(a)throw new Od("can't match cohort without a given cohort property value");return o==="AND"}function QRu(e){try{return new RegExp(e),!0}catch{return!1}}function VRu(e,t){if(!/^\d+$/.test(e))throw new Od(`Invalid semver: ${t}`);if(e.length>1&&e[0]==="0")throw new Od(`Invalid semver: ${t}`);return parseInt(e,10)}function CB(e){let r=String(e).trim().replace(/^[vV]/,"").split("-")[0].split("+")[0];if(!r||r.startsWith("."))throw new Od(`Invalid semver: ${e}`);let n=r.split("."),i=c=>c===void 0||c===""?0:VRu(c,e),o=i(n[0]),s=i(n[1]),a=i(n[2]);return[o,s,a]}function w_(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 chm(e){let t=CB(e),r=[t[0],t[1],t[2]],n=[t[0],t[1]+1,0];return{lower:r,upper:n}}function uhm(e){let t=CB(e),[r,n,i]=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 lhm(e){let r=String(e).trim().replace(/^[vV]/,"").replace(/\.\*$/,"").replace(/\*$/,"");if(!r)throw new Od(`Invalid wildcard semver: ${e}`);let n=r.split("."),i=c=>{try{return VRu(c,e)}catch{throw new Od(`Invalid wildcard semver: ${e}`)}},o=i(n[0]),s,a;if(n.length===1)s=[o,0,0],a=[o+1,0,0];else{let c=i(n[1]);s=[o,c,0],a=[o,c+1,0]}return{lower:s,upper:a}}function zRu(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 Od(`${e} is in an invalid date format`)}throw new Od(`The date provided ${e} must be a string, number, or date object`)}function phm(e){let t=/^-?(?<number>[0-9]+)(?<interval>[a-z])$/,r=e.match(t),n=new Date(new Date().toISOString());if(!r)return null;{if(!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}}var Sqr=class{getProperty(t){return this._memoryStorage[t]}setProperty(t,r){this._memoryStorage[t]=r!==null?r:void 0}constructor(){this._memoryStorage={}}};var fhm=100,_Ru=3e4,dhm=5e4,mhm=50,hhm=500,ghm="https://us.i.posthog.com",qRu=new Set;function Tqr(e,t){qRu.has(e)||(qRu.add(e),console.warn(`[PostHog] ${t}`))}function Ahm(e){return typeof e=="string"?e.trim():""}function yhm(e){return(typeof e=="string"?e.trim():"")||void 0}function bhm(e){return(typeof e=="string"?e.trim():"")||ghm}function Ehm(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 Oqr=class extends BUt{constructor(t,r={}){let n=Ahm(t),i={...r,host:bhm(r.host),personalApiKey:yhm(r.personalApiKey)};if(super(n,i),this._memoryStorage=new Sqr,this.options=i,this.context=this.initializeContext(),this.options.featureFlagsPollingInterval=typeof i.featureFlagsPollingInterval=="number"?Math.max(i.featureFlagsPollingInterval,fhm):_Ru,typeof i.waitUntilDebounceMs=="number"&&(this.options.waitUntilDebounceMs=Math.max(i.waitUntilDebounceMs,0)),typeof i.waitUntilMaxWaitMs=="number"&&(this.options.waitUntilMaxWaitMs=Math.max(i.waitUntilMaxWaitMs,0)),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 wqr({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)},customHeaders:this.getCustomHeaders(),cacheProvider:i.flagDefinitionCacheProvider,strictLocalEvaluation:i.strictLocalEvaluation}))}this.errorTracking=new sH(this,i,this._logger),this.distinctIdHasSentFlagCalls={},this.maxCacheSize=i.maxCacheSize||dhm}enqueue(t,r,n){super.enqueue(t,r,n),this.scheduleDebouncedFlush()}async flush(){let t=super.flush(),r=this.options.waitUntil;if(r&&!this._waitUntilCycle)try{r(t.catch(()=>{}))}catch{}return t}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??hhm,i=r>=n;if(this._waitUntilCycle.timer!==void 0&&clearTimeout(this._waitUntilCycle.timer),i)return void this.resolveWaitUntilFlush();let o=this.options.waitUntilDebounceMs??mhm;this._waitUntilCycle.timer=dee(()=>{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 super.flush()}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)}getLibraryVersion(){return FRu}getCustomUserAgent(){return`${this.getLibraryId()}/${this.getLibraryVersion()}`}enable(){return super.optIn()}disable(){return super.optOut()}debug(t=!0){super.debug(t),this.featureFlagsPoller?.debug(t)}capture(t){typeof t=="string"&&this._logger.warn("Called capture() with a string as the first argument when an object was expected."),t.event==="$exception"&&!t._originatedFromCaptureException&&this._logger.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.addPendingPromise(this.prepareEventMessage(t).then(({distinctId:r,event:n,properties:i,options:o})=>super.captureStateless(r,n,i,{timestamp:o.timestamp,disableGeoip:o.disableGeoip,uuid:o.uuid})).catch(r=>{r&&console.error(r)}))}async captureImmediate(t){return typeof t=="string"&&this._logger.warn("Called captureImmediate() with a string as the first argument when an object was expected."),t.event==="$exception"&&!t._originatedFromCaptureException&&this._logger.warn("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.addPendingPromise(this.prepareEventMessage(t).then(({distinctId:r,event:n,properties:i,options:o})=>super.captureStatelessImmediate(r,n,i,{timestamp:o.timestamp,disableGeoip:o.disableGeoip,uuid:o.uuid})).catch(r=>{r&&console.error(r)}))}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};super.identifyStateless(t,l,{disableGeoip:n})}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 super.identifyStatelessImmediate(t,l,{disableGeoip:n})}alias(t){super.aliasStateless(t.alias,t.distinctId,void 0,{disableGeoip:t.disableGeoip})}async aliasImmediate(t){await super.aliasStatelessImmediate(t.alias,t.distinctId,void 0,{disableGeoip:t.disableGeoip})}isLocalEvaluationReady(){return this.featureFlagsPoller?.isLocalEvaluationReady()??!1}async waitForLocalEvaluationReady(t=_Ru){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){let o=n.sendFeatureFlagEvents??!0;if(this._flagOverrides!==void 0&&t in this._flagOverrides){let w=this._flagOverrides[t];if(w===void 0)return;let O=this._payloadOverrides?.[t];return{key:t,enabled:w!==!1,variant:typeof w=="string"?w:void 0,payload:O}}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,u,l);c==null&&(c=this.options.strictLocalEvaluation??!1);let f,m=!1,g,A,y,E,v,I;if(this.featureFlagsPoller!==void 0){await this.featureFlagsPoller?.loadFeatureFlags();let w=this.featureFlagsPoller?.featureFlagsByKey[t];if(w)try{let O=await this.featureFlagsPoller?.computeFlagAndPayloadLocally(w,d,{matchValue:i});if(O){m=!0;let D=O.value;E=w.id,I="Evaluated locally",f={key:t,enabled:D!==!1,variant:typeof D=="string"?D:void 0,payload:O.payload??void 0}}}catch(O){if(O instanceof hee||O instanceof Od)this._logger?.info(`${O.name} when computing flag locally: ${t}: ${O.message}`);else throw O}}if(!m&&!c){let w=await super.getFeatureFlagDetailsStateless(d.distinctId,d.groups,d.personProperties,d.groupProperties,a,[t]);if(w===void 0)y=dfe.UNKNOWN_ERROR;else{g=w.requestId,A=w.evaluatedAt;let O=[];w.errorsWhileComputingFlags&&O.push(dfe.ERRORS_WHILE_COMPUTING),w.quotaLimited?.includes("feature_flags")&&O.push(dfe.QUOTA_LIMITED);let D=w.flags[t];if(D===void 0)O.push(dfe.FLAG_MISSING);else{E=D.metadata?.id,v=D.metadata?.version,I=D.reason?.description??D.reason?.code;let S;if(D.metadata?.payload!==void 0)try{S=JSON.parse(D.metadata.payload)}catch{S=D.metadata.payload}f={key:t,enabled:D.enabled,variant:D.variant,payload:S}}O.length>0&&(y=O.join(","))}}if(o){let w=f===void 0?void 0:f.enabled===!1?!1:f.variant??!0,O={$feature_flag:t,$feature_flag_response:w,$feature_flag_id:E,$feature_flag_version:v,$feature_flag_reason:I,locally_evaluated:m,[`$feature/${t}`]:w,$feature_flag_request_id:g,$feature_flag_evaluated_at:m?Date.now():A};if(m&&this.featureFlagsPoller){let D=this.featureFlagsPoller.getFlagDefinitionsLoadedAt();D!==void 0&&(O.$feature_flag_definitions_loaded_at=D)}y&&(O.$feature_flag_error=y),this._captureFlagCalledEventIfNeeded({distinctId:r,key:t,response:w,groups:s,disableGeoip:a,properties:O})}return f!==void 0&&this._payloadOverrides!==void 0&&t in this._payloadOverrides&&(f={...f,payload:this._payloadOverrides[t]}),f}async getFeatureFlag(t,r,n){Tqr("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(Tqr("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.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){Tqr("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:{}};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,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,d.personProperties,d.groupProperties,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 oit({host:this._getFeatureFlagEvaluationsHost(),distinctId:"",flags:{}});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,u,l);c==null&&(c=this.options.strictLocalEvaluation??!1);let f={},m,g,A=!1,y=!1,E=await this.featureFlagsPoller?.getAllFlagsAndPayloads(d,a),v=new Set;if(E)for(let[C,w]of Object.entries(E.response)){let O=this.featureFlagsPoller?.featureFlagsByKey[C];f[C]={key:C,enabled:w!==!1,variant:typeof w=="string"?w:void 0,payload:E.payloads[C],id:O?.id,version:void 0,reason:"Evaluated locally",locallyEvaluated:!0},v.add(C)}if((E?E.fallbackToFlags:!0)&&!c){let C=await super.getFeatureFlagDetailsStateless(d.distinctId,d.groups,d.personProperties,d.groupProperties,s,a);if(C){m=C.requestId,g=C.evaluatedAt,A=!!C.errorsWhileComputingFlags,y=Array.isArray(C.quotaLimited)&&C.quotaLimited.includes("feature_flags");for(let[w,O]of Object.entries(C.flags)){if(v.has(w))continue;let D;if(O.metadata?.payload!==void 0)try{D=JSON.parse(O.metadata.payload)}catch{D=O.metadata.payload}f[w]={key:w,enabled:O.enabled,variant:O.variant,payload:D,id:O.metadata?.id,version:O.metadata?.version,reason:O.reason?.description??O.reason?.code,locallyEvaluated:!1}}}}if(this._flagOverrides!==void 0)for(let[C,w]of Object.entries(this._flagOverrides)){if(w===void 0){delete f[C];continue}let O=f[C];f[C]={key:C,enabled:w!==!1,variant:typeof w=="string"?w:void 0,payload:O?.payload,id:O?.id,version:O?.version,reason:O?.reason,locallyEvaluated:O?.locallyEvaluated??!1}}if(this._payloadOverrides!==void 0)for(let[C,w]of Object.entries(this._payloadOverrides)){let O=f[C];O&&(f[C]={...O,payload:w})}return new oit({host:this._getFeatureFlagEvaluationsHost(),distinctId:n,groups:o,disableGeoip:s,flags:f,requestId:m,evaluatedAt:g,flagDefinitionsLoadedAt:this.featureFlagsPoller?.getFlagDefinitionsLoadedAt(),errorsWhileComputing:A,quotaLimited:y})}_captureFlagCalledEventIfNeeded(t){let{distinctId:r,key:n,response:i,groups:o,disableGeoip:s,properties:a}=t,c=`${n}_${i}`;r in this.distinctIdHasSentFlagCalls&&this.distinctIdHasSentFlagCalls[r].includes(c)||(Object.keys(this.distinctIdHasSentFlagCalls).length>=this.maxCacheSize&&(this.distinctIdHasSentFlagCalls={}),Array.isArray(this.distinctIdHasSentFlagCalls[r])?this.distinctIdHasSentFlagCalls[r].push(c):this.distinctIdHasSentFlagCalls[r]=[c],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}){super.groupIdentifyStateless(t,r,n,{disableGeoip:o},i)}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=this._consumeWaitUntilCycle();await this.featureFlagsPoller?.stopPoller(t),this.errorTracking.shutdown();try{return await super._shutdown(t)}finally{r?.()}}async _requestRemoteConfigPayload(t){if(!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=dee(()=>{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(JDu(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){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={distinct_id:t,...n||{}},s={};if(r)for(let a of Object.keys(r))s[a]={$group_key:r[a],...i?.[a]||{}};return{allPersonProperties:o,allGroupProperties:s}}createFeatureFlagEvaluationContext(t,r,n,i){return{distinctId:t,groups:r||{},personProperties:n||{},groupProperties:i||{},evaluationCache:{}}}captureException(t,r,n,i,o){if(!sH.isPreviouslyCapturedError(t)){let s=new Error("PostHog syntheticException");this.addPendingPromise(sH.buildEventMessage(t,{syntheticException:s},r,n).then(a=>this.capture({...a,uuid:i,flags:o})))}}async captureExceptionImmediate(t,r,n,i){if(!sH.isPreviouslyCapturedError(t)){let o=new Error("PostHog syntheticException");return this.addPendingPromise(sH.buildEventMessage(t,{syntheticException:o},r,n).then(s=>this.captureImmediate({...s,flags:i})))}}async prepareEventMessage(t){let{distinctId:r,event:n,properties:i,groups:o,flags:s,sendFeatureFlags:a,timestamp:c,disableGeoip:u,uuid:l}=t,p=this.context?.get(),d=r||p?.distinctId,f={...this.props,...p?.properties||{},...i||{}};d||(d=fee(),f.$process_person_profile=!1),p?.sessionId&&!f.$session_id&&(f.$session_id=p.sessionId);let m=this._runBeforeSend({distinctId:d,event:n,properties:f,groups:o,flags:s,sendFeatureFlags:a,timestamp:c,disableGeoip:u,uuid:l});if(!m)return Promise.reject(null);let g=await Promise.resolve().then(async()=>{if(s)return a&&console.warn("[PostHog] Both `flags` and `sendFeatureFlags` were passed to capture(); using `flags` and ignoring `sendFeatureFlags`."),s._getEventProperties();if(a){Tqr("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 A=typeof a=="object"?a:void 0,y=await this.getFeatureFlagsForEvent(m.distinctId,o,u,A);return Ehm(y)}return{}}).catch(()=>({})).then(A=>({...A,...m.properties||{},$groups:m.groups||o}));return m.event==="$pageview"&&this.options.__preview_capture_bot_pageviews&&typeof g.$raw_user_agent=="string"&&GDu(g.$raw_user_agent,this.options.custom_blocked_useragents||[])&&(m.event="$bot_pageview",g.$browser_type="bot"),{distinctId:m.distinctId,event:m.event,properties:g,options:{timestamp:m.timestamp,disableGeoip:m.disableGeoip,uuid:m.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){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)}}return i}};var GRu=require("async_hooks"),Bqr=class{constructor(){this.storage=new GRu.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 WRu="posthog-node";function Ihm(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[Ajo.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(m=>({...m,stacktrace:m.stacktrace?{...m.stacktrace,type:"raw",frames:(m.stacktrace.frames||[]).map(g=>({...g,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};return 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 Ajo=class{static#e=this.POSTHOG_ID_TAG="posthog_distinct_id";constructor(t,r,n,i,o){this.name=WRu,this.name=WRu,this.setupOnce=function(s,a){let c=a()?.getClient()?.getDsn()?.projectId;s(Ihm(t,{organization:r,projectId:c,prefix:n,severityAllowList:i,sendExceptionsToPostHog:o??!0}))}}};sH.errorPropertiesBuilder=new MQ.ErrorPropertiesBuilder([new MQ.EventCoercer,new MQ.ErrorCoercer,new MQ.ObjectCoercer,new MQ.StringCoercer,new MQ.PrimitiveCoercer],MQ.createStackParser("node:javascript",MQ.nodeStackLineParser),[VDu(),ORu,DRu()]);var kve=class extends Oqr{getLibraryId(){return"posthog-node"}initializeContext(){return new Bqr}};var Pqr=class{posthog;constructor({posthogApiKey:t}){this.posthog=new kve(t)}async identify(){}async sendEvent(t){t.orgId!=null&&this.posthog.capture({distinctId:t.orgId,event:"CLI",properties:{...t,...t.properties,version:"5.80.1",usingAccessToken:!0,...ece()}})}sendAutomationEvent(t){this.posthog.capture({distinctId:t.distinctId,event:t.event,properties:t.properties})}async flush(){try{await Promise.race([this.posthog.flush(),new Promise(t=>setTimeout(t,3e3))])}catch{}}};var DUt=class{async sendEvent(){}async sendAutomationEvent(){}async identify(){}async flush(){}};om();Zt();var ait=require("fs/promises"),HRu=require("os"),KRu=require("path");Wtt();var vhm="id",xhm=".fern",RUt=class{posthog;userId;token;constructor({token:t,posthogApiKey:r}){this.posthog=new kve(r),this.userId=t==null?void 0:LPo(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.80.1",...t,...t.properties,usingAccessToken:!1,...r!=null?{userEmail:r}:{},...ece()}})}sendAutomationEvent(t){this.posthog.capture({distinctId:t.distinctId,event:t.event,properties:t.properties})}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 xf({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=vD(),r=We(Vt.of((0,HRu.homedir)()),we.of(xhm),we.of(vhm));try{await rr(r)?this.persistedDistinctId=(await(0,ait.readFile)(r)).toString():(await(0,ait.mkdir)((0,KRu.dirname)(r),{recursive:!0}),await(0,ait.writeFile)(r,t),this.persistedDistinctId=t)}catch{this.persistedDistinctId=t}}return this.persistedDistinctId}};var yjo;async function kUt(){return yjo==null&&(yjo=await Chm()),yjo}async function Chm(){try{let e="phc_yQgAEdJJkVpI24NdSRID2mor1x1leRpDoC9yZ9mfXal",t=process.env.FERN_DISABLE_TELEMETRY==="true";if(e==null||t)return new DUt;let r=await vrt();return r!=null?new RUt({token:r,posthogApiKey:e}):await u_()!=null?new Pqr({posthogApiKey:e}):new RUt({token:void 0,posthogApiKey:e})}catch{return new DUt}}En();Dt();Qt();OW();var FUt=be(require("process"),1);dGe();var XRu=be(dvo(),1),ZRu=be(YRu(),1);function N1(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=QG(e),e.length===0))return 0;e=e.replace((0,ZRu.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(XRu.default.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}En();function Dqr(e){let t=0;for(let r of e.split(`
3094
+ `);for(let s=n;s<o.length;s++){let a=o[s];if(a.length>1024)continue;let c=ARu.test(a)?a.replace(ARu,"$1"):a;if(!c.match(/\S*Error: /)){for(let u of t){let l=u(c,e);if(l){i.push(l);break}}if(i.length>=yRu)break}}return bRu(i)}}var ojo=class{match(t){return this.isDOMException(t)||this.isDOMError(t)}coerce(t,r){let n=Rve(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 dLe(t,"DOMException")}isDOMError(t){return dLe(t,"DOMError")}};var sjo=class{match(t){return KNo(t)}coerce(t,r){return{type:this.getType(t),value:this.getMessage(t,r),stack:this.getStack(t),cause:t.cause?r.next(t.cause):void 0,synthetic:!1}}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){return t.stacktrace||t.stack||void 0}};var ajo=class{constructor(){}match(t){return KDu(t)&&t.error!=null}coerce(t,r){let n=r.apply(t.error);return n||{type:"ErrorEvent",value:t.message,stack:r.syntheticException?.stack,synthetic:!0}}};var Mmm=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,cjo=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(Mmm);return i&&(r=i[1],n=i[2]),[r,n]}};var IRu=["fatal","error","warning","log","info","debug"];function vqr(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 ujo=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:r.syntheticException?.stack,level:this.isSeverityLevel(t.level)?t.level:"error",synthetic:!0}}getType(t){return tit(t)?t.constructor.name:"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=vqr(t);return`${r&&r!=="Object"?`'${r}'`:"Object"} captured as exception with keys: ${n}`}isSeverityLevel(t){return Rve(t)&&!HDu(t)&&IRu.indexOf(t)>=0}getErrorPropertyFromObject(t){for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let n=t[r];if(cRu(n))return n}}getObjectClassName(t){try{let r=Object.getPrototypeOf(t);return r?r.constructor.name:void 0}catch{return}}};var ljo=class{match(t){return tit(t)}coerce(t,r){let n=t.constructor.name;return{type:n,value:`${n} captured as exception with keys: ${vqr(t)}`,stack:r.syntheticException?.stack,synthetic:!0}}};var pjo=class{match(t){return sqr(t)}coerce(t,r){return{type:"Error",value:`Primitive value captured as exception: ${String(t)}`,stack:r.syntheticException?.stack,synthetic:!0}}};var fjo=class{match(t){return dLe(t,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(t)}isCustomEventWrappingRejection(t){if(!tit(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 sqr(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 djo=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 PUt={MESSAGE:"$message",TIMESTAMP:"$timestamp"},Lmm=new Set([PUt.MESSAGE,PUt.TIMESTAMP]),xqr={enabled:!0,max_bytes:32768};function mjo(e){return e?{enabled:e.enabled??xqr.enabled,max_bytes:Vmm(e.max_bytes,xqr.max_bytes)}:{...xqr}}function Umm(e){if(!e)return{sanitizedProperties:{},droppedKeys:[]};let t=[];return{sanitizedProperties:Object.keys(e).reduce((n,i)=>Lmm.has(i)?(t.push(i),n):(n[i]=e[i],n),{}),droppedKeys:t}}var hjo=class{constructor(t){this._entries=[],this._totalBytes=0,this._config=mjo(t)}setConfig(t){this._config=mjo(t),this._trimToMaxBytes()}add(t){let r=_mm(t);if(!r)return;let n=vRu(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 Vmm(e,t){if(!SUt(e)||e===1/0||e===-1/0)return t;let r=Math.floor(e);return r<0?t:r}function _mm(e){let t=qmm(e);if(t)try{let r=JSON.parse(t);if(!wUt(r))return;let n=r,i=n[PUt.MESSAGE],o=n[PUt.TIMESTAMP];return!Rve(i)||i.trim().length===0||!Rve(o)&&!SUt(o)?void 0:{step:n,json:t}}catch{return}}function qmm(e){let t=new WeakSet;try{return JSON.stringify(e,(r,n)=>{if(typeof n=="bigint")return n.toString();if(!(typeof n=="function"||typeof n=="symbol")){if(n instanceof Date)return n.toISOString();if(n instanceof Error)return{name:n.name,message:n.message,stack:n.stack};if(n&&typeof n=="object"){if(t.has(n))return"[Circular]";t.add(n)}return n}})}catch{return}}function vRu(e){if(typeof TextEncoder<"u")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}var wRu=require("fs"),SRu=require("readline"),Cqr=new MQ.ReduceableCache(25),TRu=new MQ.ReduceableCache(20),gjo=7,Gmm=1e3,Wmm=1e4;async function ORu(e){let t={};for(let i=e.length-1;i>=0;i--){let o=e[i],s=o?.filename;if(!o||typeof s!="string"||typeof o.lineno!="number"||Ymm(s)||Xmm(o))continue;t[s]||(t[s]=[]),t[s].push(o.lineno)}let r=Object.keys(t);if(r.length==0)return e;let n=[];for(let i of r){if(TRu.get(i))continue;let o=t[i];if(!o)continue;o.sort((c,u)=>c-u);let s=$mm(o);if(s.every(c=>Zmm(i,c)))continue;let a=ehm(Cqr,i,{});n.push(Hmm(i,s,a))}return await Promise.all(n).catch(()=>{}),e&&e.length>0&&Kmm(e,Cqr),Cqr.reduce(),e}function Hmm(e,t,r){return new Promise(n=>{let i=(0,wRu.createReadStream)(e),o=(0,SRu.createInterface)({input:i});function s(){i.destroy(),n()}let a=0,c=0,u=t[c];if(u===void 0)return void s();let l=u[0],p=u[1];function d(){TRu.set(e,1),o.close(),o.removeAllListeners(),s()}i.on("error",d),o.on("error",d),o.on("close",s),o.on("line",f=>{if(a++,!(a<l)&&(r[a]=thm(f,0),a>=p)){if(c===t.length-1){o.close(),o.removeAllListeners();return}c++;let m=t[c];if(m===void 0){o.close(),o.removeAllListeners();return}l=m[0],p=m[1]}})})}function Kmm(e,t){for(let r of e)if(r.filename&&r.context_line===void 0&&typeof r.lineno=="number"){let n=t.get(r.filename);if(n===void 0)continue;Jmm(r.lineno,r,n)}}function Jmm(e,t,r){if(t.lineno===void 0||r===void 0)return;t.pre_context=[];for(let i=BRu(e);i<e;i++){let o=r[i];if(o===void 0)return void xRu(t);t.pre_context.push(o)}if(r[e]===void 0)return void xRu(t);t.context_line=r[e];let n=PRu(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 xRu(e){delete e.pre_context,delete e.context_line,delete e.post_context}function Ymm(e){return e.startsWith("node:")||e.endsWith(".min.js")||e.endsWith(".min.cjs")||e.endsWith(".min.mjs")||e.startsWith("data:")}function Xmm(e){return e.lineno!==void 0&&e.lineno>Wmm||e.colno!==void 0&&e.colno>Gmm}function Zmm(e,t){let r=Cqr.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 $mm(e){if(!e.length)return[];let t=0,r=e[0];if(typeof r!="number")return[];let n=CRu(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+gjo:(i.push(n),n=CRu(o)),t++}return i}function CRu(e){return[BRu(e),PRu(e)]}function BRu(e){return Math.max(1,e-gjo)}function PRu(e){return e+gjo}function ehm(e,t,r){let n=e.get(t);return n===void 0?(e.set(t,r),r):n}function thm(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 iit=require("path");function DRu(e=process.cwd()){let t=iit.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,iit.isAbsolute)(o.filename)&&(o.filename=r((0,iit.relative)(n,r(o.filename))));return i}}function rhm(e,t){let r=!1;return Object.assign(n=>{let o=global.process.listeners("uncaughtException").filter(s=>s.name!=="domainUncaughtExceptionClear"&&s._posthogErrorHandler!==!0).length===0;e(n,{mechanism:{type:"onuncaughtexception",handled:!1}}),!r&&o&&(r=!0,t(n))},{_posthogErrorHandler:!0})}function RRu(e,t){globalThis.process?.on("uncaughtException",rhm(e,t))}function kRu(e){globalThis.process?.on("unhandledRejection",t=>e(t,{mechanism:{type:"onunhandledrejection",handled:!1}}))}var nhm=2e3,sH=class e{constructor(t,r,n){this.client=t,this._exceptionAutocaptureEnabled=r.enableExceptionAutocapture||!1,this._logger=n,this._rateLimiter=new aqr({refillRate:1,bucketSize:10,refillInterval:1e4,_logger:this._logger}),this.startAutocaptureIfEnabled()}static isPreviouslyCapturedError(t){return wUt(t)&&"__posthog_previously_captured_error"in t&&t.__posthog_previously_captured_error===!0}static async buildEventMessage(t,r,n,i){let o={...i},s=this.errorPropertiesBuilder.buildFromUnknown(t,r);return s.$exception_list=await this.errorPropertiesBuilder.modifyFrames(s.$exception_list),{event:"$exception",distinctId:n,properties:{...s,...o},_originatedFromCaptureException:!0}}startAutocaptureIfEnabled(){this.isEnabled()&&(RRu(this.onException.bind(this),this.onFatalError.bind(this)),kRu(this.onException.bind(this)))}onException(t,r){this.client.addPendingPromise((async()=>{if(!e.isPreviouslyCapturedError(t)){let n=await e.buildEventMessage(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.capture(n)}})())}async onFatalError(t){console.error(t),await this.client.shutdown(nhm),process.exit(1)}isEnabled(){return!this.client.isDisabled&&this._exceptionAutocaptureEnabled}shutdown(){this._rateLimiter.stop()}};var FRu="5.35.1";var dfe={ERRORS_WHILE_COMPUTING:"errors_while_computing_flags",FLAG_MISSING:"flag_missing",QUOTA_LIMITED:"quota_limited",UNKNOWN_ERROR:"unknown_error"};var oit=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){let r=this._flags[t];return this._recordAccess(t),r?.enabled??!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?.locallyEvaluated&&this._flagDefinitionsLoadedAt!==void 0&&(i.$feature_flag_definitions_loaded_at=this._flagDefinitionsLoadedAt);let o=[];this._errorsWhileComputing&&o.push(dfe.ERRORS_WHILE_COMPUTING),this._quotaLimited&&o.push(dfe.QUOTA_LIMITED),r===void 0&&o.push(dfe.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})}};async function NRu(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(i=>i.toString(16).padStart(2,"0")).join("")}var ihm=6e4,ohm=1152921504606847e3,shm=["is_not","is_set"],sit=class e extends Error{constructor(t){super(),Error.captureStackTrace(this,this.constructor),this.name="ClientError",this.message=t,Object.setPrototypeOf(this,e.prototype)}},Od=class e extends Error{constructor(t){super(t),this.name=this.constructor.name,Error.captureStackTrace(this,this.constructor),Object.setPrototypeOf(this,e.prototype)}},hee=class e extends Error{constructor(t){super(t),this.name=this.constructor.name,Error.captureStackTrace(this,this.constructor),Object.setPrototypeOf(this,e.prototype)}},wqr=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.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.cacheProvider=a.cacheProvider,this.strictLocalEvaluation=a.strictLocalEvaluation??!1,this.loadFeatureFlags()}debug(t=!0){this.debugMode=t}logMsgIfDebug(t){this.debugMode&&t()}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 hee||u instanceof Od?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={...t,evaluationCache:t.evaluationCache??{}};return await Promise.all(s.map(async c=>{try{let{value:u,payload:l}=await this.computeFlagAndPayloadLocally(c,a);n[c.key]=u,l&&(i[c.key]=l)}catch(u){u instanceof hee||u instanceof Od?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(o||await this.loadFeatureFlags(),!this.loadedSuccessfullyOnce)return{value:!1,payload:null};let s;s=i!==void 0?i:await this.computeFlagValueLocally(t,r);let a=this.getFeatureFlagPayload(t.key,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 Od("Flag has experience continuity enabled");let c=(t.filters||{}).aggregation_group_type_index;if(c!=null){let u=this.groupTypeMapping[String(c)];if(!u)throw this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Unknown group type index ${c} for feature flag ${t.key}`)),new Od("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 Od(`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}getFeatureFlagPayload(t,r){let n=null;if(r!==!1&&r!=null&&(typeof r=="boolean"?n=this.featureFlagsByKey?.[t]?.filters?.payloads?.[r.toString()]||null:typeof r=="string"&&(n=this.featureFlagsByKey?.[t]?.filters?.payloads?.[r]||null),n!=null)){if(typeof n=="object")return n;if(typeof n=="string")try{return JSON.parse(n)}catch{}return n}return null}async evaluateFlagDependency(t,r,n){let{evaluationCache:i}=n,o=t.key;if(!this.featureFlagsByKey)throw new Od("Feature flags not available for dependency evaluation");if(!("dependency_chain"in t))throw new Od(`Flag dependency property for '${o}' is missing required 'dependency_chain' field`);let s=t.dependency_chain;if(!Array.isArray(s))throw new Od(`Flag dependency property for '${o}' has an invalid 'dependency_chain' (expected array, got ${typeof s})`);if(s.length===0)throw new Od(`Circular dependency detected for flag '${o}' (empty dependency chain)`);for(let c of s){if(!(c in i)){let l=this.featureFlagsByKey[c];if(l)if(l.active)try{let p=await this.computeFlagValueLocally(l,n);i[c]=p}catch(p){throw new Od(`Error evaluating flag dependency '${c}' for flag '${o}': ${p}`)}else i[c]=!1;else throw new Od(`Missing flag dependency '${c}' for flag '${o}'`)}if(i[c]==null)throw new Od(`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){let o=t.filters||{},s=o.groups||[],a=o.aggregation_group_type_index,{groups:c,groupProperties:u}=i,l=!1,p;for(let d of s)try{let f=d.aggregation_group_type_index!==void 0?d.aggregation_group_type_index:a,m=n,g=r;if(f!==a&&f!=null){let A=this.groupTypeMapping[String(f)];if(!A||!(A in c)){this.logMsgIfDebug(()=>console.debug(`[FEATURE FLAGS] Skipping group condition for flag '${t.key}': group type index ${f} not available`));continue}if(!(A in u)){l=!0;continue}m=u[A],g=c[A]}if(await this.isConditionMatch(t,g,d,m,i)){let A=d.variant,y=o.multivariate?.variants||[];p=A&&y.some(E=>E.key===A)?A:await this.getMatchingVariant(t,g)||!0;break}}catch(f){if(f instanceof hee)throw f;if(f instanceof Od)l=!0;else throw f}if(p!==void 0)return p;if(l)throw new Od("Can't determine if feature flag is enabled or not with given properties");return!1}async isConditionMatch(t,r,n,i,o){let s=n.rollout_percentage,a=c=>{this.logMsgIfDebug(()=>console.warn(c))};if((n.properties||[]).length>0){for(let c of n.properties){let u=c.type,l=!1;if(l=u==="cohort"?await LRu(c,i,this.cohorts,this.debugMode,p=>this.evaluateFlagDependency(p,i,o)):u==="flag"?await this.evaluateFlagDependency(c,i,o):MRu(c,i,a),!l)return!1}if(s==null)return!0}return!(s!=null&&await jRu(t.key,r)>s/100)}async getMatchingVariant(t,r){let n=await jRu(t.key,r,"variant"),i=this.variantLookupTable(t).find(o=>n>=o.valueMin&&n<o.valueMax);if(i)return i.key}variantLookupTable(t){let r=[],n=0,i=0;return((t.filters||{}).multivariate?.variants||[]).forEach(a=>{i=n+a.rollout_percentage/100,r.push({valueMin:n,valueMax:i,key:a.key}),n=i}),r}updateFlagState(t){this.featureFlags=t.flags,this.featureFlagsByKey=t.flags.reduce((r,n)=>(r[n.key]=n,r),{}),this.groupTypeMapping=t.groupTypeMapping,this.cohorts=t.cohorts,this.loadedSuccessfullyOnce=!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(r.flags),!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(){return this.shouldBeginExponentialBackoff?Math.min(ihm,this.pollingInterval*2**this.backOffCount):this.pollingInterval}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),this.poller=setTimeout(()=>this.loadFeatureFlags(!0),this.getPollingInterval());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 sit(`Your project key or personal API 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.groupTypeMapping={},this.cohorts={};return;case 403:throw this.beginBackoff(),new sit(`Your personal API 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 personal and Project API key pair? More information: https://posthog.com/docs/api/overview`);case 429:throw this.beginBackoff(),new sit(`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={flags:n.flags??[],groupTypeMapping:n.group_type_mapping||{},cohorts:n.cohorts||{}};if(this.updateFlagState(i),this.flagDefinitionsLoadedAt=Date.now(),this.clearBackoff(),this.cacheProvider&&t)try{await this.cacheProvider.onFlagDefinitionsReceived(i)}catch(o){this.onError?.(new Error(`Failed to store in cache: ${o}`))}this.onLoad?.(this.featureFlags.length),this.warnAboutExperienceContinuityFlags(i.flags);break}default:return}}catch(t){t instanceof sit&&this.onError?.(t)}}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}}_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 i=new AbortController;n=dee(()=>{i.abort()},this.timeout),r.signal=i.signal}try{let i=this.fetch;return i(t,r)}finally{clearTimeout(n)}}async stopPoller(t=3e4){if(clearTimeout(this.poller),this.cacheProvider)try{let r=this.cacheProvider.shutdown();r instanceof Promise&&await Promise.race([r,new Promise((n,i)=>setTimeout(()=>i(new Error(`Cache shutdown timeout after ${t}ms`)),t))])}catch(r){this.onError?.(new Error(`Error during cache shutdown: ${r}`))}}};async function jRu(e,t,r=""){let n=await NRu(`${e}.${t}${r}`);return parseInt(n.slice(0,15),16)/ohm}function MRu(e,t,r){let n=e.key,i=e.value,o=e.operator||"exact";if(n in t){if(o==="is_not_set")return!1}else{if(o==="is_not_set")return!0;throw new Od(`Property ${n} not found in propertyValues`)}let s=t[n];if(s==null&&!shm.includes(o))return r&&r(`Property ${n} cannot have a value of null/undefined with the ${o} operator`),!1;function a(u,l){return Array.isArray(u)?u.map(p=>String(p).toLowerCase()).includes(String(l).toLowerCase()):String(u).toLowerCase()===String(l).toLowerCase()}function c(u,l,p){if(p==="gt")return u>l;if(p==="gte")return u>=l;if(p==="lt")return u<l;if(p==="lte")return u<=l;throw new Error(`Invalid operator: ${p}`)}switch(o){case"exact":return a(i,s);case"is_not":return!a(i,s);case"is_set":return n in t;case"icontains":return String(s).toLowerCase().includes(String(i).toLowerCase());case"not_icontains":return!String(s).toLowerCase().includes(String(i).toLowerCase());case"regex":return QRu(String(i))&&String(s).match(String(i))!==null;case"not_regex":return QRu(String(i))&&String(s).match(String(i))===null;case"gt":case"gte":case"lt":case"lte":{let u=typeof i=="number"?i:parseFloat(String(i)),l;return l=typeof s=="number"?s:s!=null?parseFloat(String(s)):NaN,Number.isFinite(u)&&Number.isFinite(l)?c(l,u,o):c(String(s),String(i),o)}case"is_date_after":case"is_date_before":{if(typeof i=="boolean")throw new Od("Date operations cannot be performed on boolean values");let u=phm(String(i));if(u==null&&(u=zRu(i)),u==null)throw new Od(`Invalid date: ${i}`);let l=zRu(s);return["is_date_before"].includes(o)?l<u:l>u}case"semver_eq":return w_(CB(String(s)),CB(String(i)))===0;case"semver_neq":return w_(CB(String(s)),CB(String(i)))!==0;case"semver_gt":return w_(CB(String(s)),CB(String(i)))>0;case"semver_gte":return w_(CB(String(s)),CB(String(i)))>=0;case"semver_lt":return w_(CB(String(s)),CB(String(i)))<0;case"semver_lte":return w_(CB(String(s)),CB(String(i)))<=0;case"semver_tilde":{let u=CB(String(s)),{lower:l,upper:p}=chm(String(i));return w_(u,l)>=0&&w_(u,p)<0}case"semver_caret":{let u=CB(String(s)),{lower:l,upper:p}=uhm(String(i));return w_(u,l)>=0&&w_(u,p)<0}case"semver_wildcard":{let u=CB(String(s)),{lower:l,upper:p}=lhm(String(i));return w_(u,l)>=0&&w_(u,p)<0}default:throw new Od(`Unknown operator: ${o}`)}}function ahm(e,t){if(!(e in t))throw new hee(`cohort ${e} not found in local cohorts - likely a static cohort that requires server evaluation`)}async function LRu(e,t,r,n=!1,i){let o=String(e.value);ahm(o,r);let s=r[o];return URu(s,t,r,n,i)}async function URu(e,t,r,n=!1,i){if(!e)return!0;let o=e.type,s=e.values;if(!s||s.length===0)return!0;let a=!1;if("values"in s[0]){for(let c of s)try{let u=await URu(c,t,r,n,i);if(o==="AND"){if(!u)return!1}else if(u)return!0}catch(u){if(u instanceof hee)throw u;if(u instanceof Od)n&&console.debug(`Failed to compute property ${c} locally: ${u}`),a=!0;else throw u}if(a)throw new Od("Can't match cohort without a given cohort property value");return o==="AND"}for(let c of s)try{let u;if(c.type==="cohort")u=await LRu(c,t,r,n,i);else if(c.type==="flag"){if(!i)throw new Od(`Flag dependency '${c.key||"unknown"}' cannot be evaluated without a flag dependency evaluator`);u=await i(c)}else u=MRu(c,t);let l=c.negation||!1;if(o==="AND"){if(!u&&!l||u&&l)return!1}else if(u&&!l||!u&&l)return!0}catch(u){if(u instanceof hee)throw u;if(u instanceof Od)n&&console.debug(`Failed to compute property ${c} locally: ${u}`),a=!0;else throw u}if(a)throw new Od("can't match cohort without a given cohort property value");return o==="AND"}function QRu(e){try{return new RegExp(e),!0}catch{return!1}}function VRu(e,t){if(!/^\d+$/.test(e))throw new Od(`Invalid semver: ${t}`);if(e.length>1&&e[0]==="0")throw new Od(`Invalid semver: ${t}`);return parseInt(e,10)}function CB(e){let r=String(e).trim().replace(/^[vV]/,"").split("-")[0].split("+")[0];if(!r||r.startsWith("."))throw new Od(`Invalid semver: ${e}`);let n=r.split("."),i=c=>c===void 0||c===""?0:VRu(c,e),o=i(n[0]),s=i(n[1]),a=i(n[2]);return[o,s,a]}function w_(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 chm(e){let t=CB(e),r=[t[0],t[1],t[2]],n=[t[0],t[1]+1,0];return{lower:r,upper:n}}function uhm(e){let t=CB(e),[r,n,i]=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 lhm(e){let r=String(e).trim().replace(/^[vV]/,"").replace(/\.\*$/,"").replace(/\*$/,"");if(!r)throw new Od(`Invalid wildcard semver: ${e}`);let n=r.split("."),i=c=>{try{return VRu(c,e)}catch{throw new Od(`Invalid wildcard semver: ${e}`)}},o=i(n[0]),s,a;if(n.length===1)s=[o,0,0],a=[o+1,0,0];else{let c=i(n[1]);s=[o,c,0],a=[o,c+1,0]}return{lower:s,upper:a}}function zRu(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 Od(`${e} is in an invalid date format`)}throw new Od(`The date provided ${e} must be a string, number, or date object`)}function phm(e){let t=/^-?(?<number>[0-9]+)(?<interval>[a-z])$/,r=e.match(t),n=new Date(new Date().toISOString());if(!r)return null;{if(!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}}var Sqr=class{getProperty(t){return this._memoryStorage[t]}setProperty(t,r){this._memoryStorage[t]=r!==null?r:void 0}constructor(){this._memoryStorage={}}};var fhm=100,_Ru=3e4,dhm=5e4,mhm=50,hhm=500,ghm="https://us.i.posthog.com",qRu=new Set;function Tqr(e,t){qRu.has(e)||(qRu.add(e),console.warn(`[PostHog] ${t}`))}function Ahm(e){return typeof e=="string"?e.trim():""}function yhm(e){return(typeof e=="string"?e.trim():"")||void 0}function bhm(e){return(typeof e=="string"?e.trim():"")||ghm}function Ehm(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 Oqr=class extends BUt{constructor(t,r={}){let n=Ahm(t),i={...r,host:bhm(r.host),personalApiKey:yhm(r.personalApiKey)};if(super(n,i),this._memoryStorage=new Sqr,this.options=i,this.context=this.initializeContext(),this.options.featureFlagsPollingInterval=typeof i.featureFlagsPollingInterval=="number"?Math.max(i.featureFlagsPollingInterval,fhm):_Ru,typeof i.waitUntilDebounceMs=="number"&&(this.options.waitUntilDebounceMs=Math.max(i.waitUntilDebounceMs,0)),typeof i.waitUntilMaxWaitMs=="number"&&(this.options.waitUntilMaxWaitMs=Math.max(i.waitUntilMaxWaitMs,0)),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 wqr({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)},customHeaders:this.getCustomHeaders(),cacheProvider:i.flagDefinitionCacheProvider,strictLocalEvaluation:i.strictLocalEvaluation}))}this.errorTracking=new sH(this,i,this._logger),this.distinctIdHasSentFlagCalls={},this.maxCacheSize=i.maxCacheSize||dhm}enqueue(t,r,n){super.enqueue(t,r,n),this.scheduleDebouncedFlush()}async flush(){let t=super.flush(),r=this.options.waitUntil;if(r&&!this._waitUntilCycle)try{r(t.catch(()=>{}))}catch{}return t}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??hhm,i=r>=n;if(this._waitUntilCycle.timer!==void 0&&clearTimeout(this._waitUntilCycle.timer),i)return void this.resolveWaitUntilFlush();let o=this.options.waitUntilDebounceMs??mhm;this._waitUntilCycle.timer=dee(()=>{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 super.flush()}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)}getLibraryVersion(){return FRu}getCustomUserAgent(){return`${this.getLibraryId()}/${this.getLibraryVersion()}`}enable(){return super.optIn()}disable(){return super.optOut()}debug(t=!0){super.debug(t),this.featureFlagsPoller?.debug(t)}capture(t){typeof t=="string"&&this._logger.warn("Called capture() with a string as the first argument when an object was expected."),t.event==="$exception"&&!t._originatedFromCaptureException&&this._logger.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.addPendingPromise(this.prepareEventMessage(t).then(({distinctId:r,event:n,properties:i,options:o})=>super.captureStateless(r,n,i,{timestamp:o.timestamp,disableGeoip:o.disableGeoip,uuid:o.uuid})).catch(r=>{r&&console.error(r)}))}async captureImmediate(t){return typeof t=="string"&&this._logger.warn("Called captureImmediate() with a string as the first argument when an object was expected."),t.event==="$exception"&&!t._originatedFromCaptureException&&this._logger.warn("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.addPendingPromise(this.prepareEventMessage(t).then(({distinctId:r,event:n,properties:i,options:o})=>super.captureStatelessImmediate(r,n,i,{timestamp:o.timestamp,disableGeoip:o.disableGeoip,uuid:o.uuid})).catch(r=>{r&&console.error(r)}))}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};super.identifyStateless(t,l,{disableGeoip:n})}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 super.identifyStatelessImmediate(t,l,{disableGeoip:n})}alias(t){super.aliasStateless(t.alias,t.distinctId,void 0,{disableGeoip:t.disableGeoip})}async aliasImmediate(t){await super.aliasStatelessImmediate(t.alias,t.distinctId,void 0,{disableGeoip:t.disableGeoip})}isLocalEvaluationReady(){return this.featureFlagsPoller?.isLocalEvaluationReady()??!1}async waitForLocalEvaluationReady(t=_Ru){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){let o=n.sendFeatureFlagEvents??!0;if(this._flagOverrides!==void 0&&t in this._flagOverrides){let w=this._flagOverrides[t];if(w===void 0)return;let O=this._payloadOverrides?.[t];return{key:t,enabled:w!==!1,variant:typeof w=="string"?w:void 0,payload:O}}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,u,l);c==null&&(c=this.options.strictLocalEvaluation??!1);let f,m=!1,g,A,y,E,v,I;if(this.featureFlagsPoller!==void 0){await this.featureFlagsPoller?.loadFeatureFlags();let w=this.featureFlagsPoller?.featureFlagsByKey[t];if(w)try{let O=await this.featureFlagsPoller?.computeFlagAndPayloadLocally(w,d,{matchValue:i});if(O){m=!0;let D=O.value;E=w.id,I="Evaluated locally",f={key:t,enabled:D!==!1,variant:typeof D=="string"?D:void 0,payload:O.payload??void 0}}}catch(O){if(O instanceof hee||O instanceof Od)this._logger?.info(`${O.name} when computing flag locally: ${t}: ${O.message}`);else throw O}}if(!m&&!c){let w=await super.getFeatureFlagDetailsStateless(d.distinctId,d.groups,d.personProperties,d.groupProperties,a,[t]);if(w===void 0)y=dfe.UNKNOWN_ERROR;else{g=w.requestId,A=w.evaluatedAt;let O=[];w.errorsWhileComputingFlags&&O.push(dfe.ERRORS_WHILE_COMPUTING),w.quotaLimited?.includes("feature_flags")&&O.push(dfe.QUOTA_LIMITED);let D=w.flags[t];if(D===void 0)O.push(dfe.FLAG_MISSING);else{E=D.metadata?.id,v=D.metadata?.version,I=D.reason?.description??D.reason?.code;let S;if(D.metadata?.payload!==void 0)try{S=JSON.parse(D.metadata.payload)}catch{S=D.metadata.payload}f={key:t,enabled:D.enabled,variant:D.variant,payload:S}}O.length>0&&(y=O.join(","))}}if(o){let w=f===void 0?void 0:f.enabled===!1?!1:f.variant??!0,O={$feature_flag:t,$feature_flag_response:w,$feature_flag_id:E,$feature_flag_version:v,$feature_flag_reason:I,locally_evaluated:m,[`$feature/${t}`]:w,$feature_flag_request_id:g,$feature_flag_evaluated_at:m?Date.now():A};if(m&&this.featureFlagsPoller){let D=this.featureFlagsPoller.getFlagDefinitionsLoadedAt();D!==void 0&&(O.$feature_flag_definitions_loaded_at=D)}y&&(O.$feature_flag_error=y),this._captureFlagCalledEventIfNeeded({distinctId:r,key:t,response:w,groups:s,disableGeoip:a,properties:O})}return f!==void 0&&this._payloadOverrides!==void 0&&t in this._payloadOverrides&&(f={...f,payload:this._payloadOverrides[t]}),f}async getFeatureFlag(t,r,n){Tqr("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(Tqr("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.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){Tqr("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:{}};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,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,d.personProperties,d.groupProperties,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 oit({host:this._getFeatureFlagEvaluationsHost(),distinctId:"",flags:{}});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,u,l);c==null&&(c=this.options.strictLocalEvaluation??!1);let f={},m,g,A=!1,y=!1,E=await this.featureFlagsPoller?.getAllFlagsAndPayloads(d,a),v=new Set;if(E)for(let[C,w]of Object.entries(E.response)){let O=this.featureFlagsPoller?.featureFlagsByKey[C];f[C]={key:C,enabled:w!==!1,variant:typeof w=="string"?w:void 0,payload:E.payloads[C],id:O?.id,version:void 0,reason:"Evaluated locally",locallyEvaluated:!0},v.add(C)}if((E?E.fallbackToFlags:!0)&&!c){let C=await super.getFeatureFlagDetailsStateless(d.distinctId,d.groups,d.personProperties,d.groupProperties,s,a);if(C){m=C.requestId,g=C.evaluatedAt,A=!!C.errorsWhileComputingFlags,y=Array.isArray(C.quotaLimited)&&C.quotaLimited.includes("feature_flags");for(let[w,O]of Object.entries(C.flags)){if(v.has(w))continue;let D;if(O.metadata?.payload!==void 0)try{D=JSON.parse(O.metadata.payload)}catch{D=O.metadata.payload}f[w]={key:w,enabled:O.enabled,variant:O.variant,payload:D,id:O.metadata?.id,version:O.metadata?.version,reason:O.reason?.description??O.reason?.code,locallyEvaluated:!1}}}}if(this._flagOverrides!==void 0)for(let[C,w]of Object.entries(this._flagOverrides)){if(w===void 0){delete f[C];continue}let O=f[C];f[C]={key:C,enabled:w!==!1,variant:typeof w=="string"?w:void 0,payload:O?.payload,id:O?.id,version:O?.version,reason:O?.reason,locallyEvaluated:O?.locallyEvaluated??!1}}if(this._payloadOverrides!==void 0)for(let[C,w]of Object.entries(this._payloadOverrides)){let O=f[C];O&&(f[C]={...O,payload:w})}return new oit({host:this._getFeatureFlagEvaluationsHost(),distinctId:n,groups:o,disableGeoip:s,flags:f,requestId:m,evaluatedAt:g,flagDefinitionsLoadedAt:this.featureFlagsPoller?.getFlagDefinitionsLoadedAt(),errorsWhileComputing:A,quotaLimited:y})}_captureFlagCalledEventIfNeeded(t){let{distinctId:r,key:n,response:i,groups:o,disableGeoip:s,properties:a}=t,c=`${n}_${i}`;r in this.distinctIdHasSentFlagCalls&&this.distinctIdHasSentFlagCalls[r].includes(c)||(Object.keys(this.distinctIdHasSentFlagCalls).length>=this.maxCacheSize&&(this.distinctIdHasSentFlagCalls={}),Array.isArray(this.distinctIdHasSentFlagCalls[r])?this.distinctIdHasSentFlagCalls[r].push(c):this.distinctIdHasSentFlagCalls[r]=[c],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}){super.groupIdentifyStateless(t,r,n,{disableGeoip:o},i)}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=this._consumeWaitUntilCycle();await this.featureFlagsPoller?.stopPoller(t),this.errorTracking.shutdown();try{return await super._shutdown(t)}finally{r?.()}}async _requestRemoteConfigPayload(t){if(!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=dee(()=>{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(JDu(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){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={distinct_id:t,...n||{}},s={};if(r)for(let a of Object.keys(r))s[a]={$group_key:r[a],...i?.[a]||{}};return{allPersonProperties:o,allGroupProperties:s}}createFeatureFlagEvaluationContext(t,r,n,i){return{distinctId:t,groups:r||{},personProperties:n||{},groupProperties:i||{},evaluationCache:{}}}captureException(t,r,n,i,o){if(!sH.isPreviouslyCapturedError(t)){let s=new Error("PostHog syntheticException");this.addPendingPromise(sH.buildEventMessage(t,{syntheticException:s},r,n).then(a=>this.capture({...a,uuid:i,flags:o})))}}async captureExceptionImmediate(t,r,n,i){if(!sH.isPreviouslyCapturedError(t)){let o=new Error("PostHog syntheticException");return this.addPendingPromise(sH.buildEventMessage(t,{syntheticException:o},r,n).then(s=>this.captureImmediate({...s,flags:i})))}}async prepareEventMessage(t){let{distinctId:r,event:n,properties:i,groups:o,flags:s,sendFeatureFlags:a,timestamp:c,disableGeoip:u,uuid:l}=t,p=this.context?.get(),d=r||p?.distinctId,f={...this.props,...p?.properties||{},...i||{}};d||(d=fee(),f.$process_person_profile=!1),p?.sessionId&&!f.$session_id&&(f.$session_id=p.sessionId);let m=this._runBeforeSend({distinctId:d,event:n,properties:f,groups:o,flags:s,sendFeatureFlags:a,timestamp:c,disableGeoip:u,uuid:l});if(!m)return Promise.reject(null);let g=await Promise.resolve().then(async()=>{if(s)return a&&console.warn("[PostHog] Both `flags` and `sendFeatureFlags` were passed to capture(); using `flags` and ignoring `sendFeatureFlags`."),s._getEventProperties();if(a){Tqr("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 A=typeof a=="object"?a:void 0,y=await this.getFeatureFlagsForEvent(m.distinctId,o,u,A);return Ehm(y)}return{}}).catch(()=>({})).then(A=>({...A,...m.properties||{},$groups:m.groups||o}));return m.event==="$pageview"&&this.options.__preview_capture_bot_pageviews&&typeof g.$raw_user_agent=="string"&&GDu(g.$raw_user_agent,this.options.custom_blocked_useragents||[])&&(m.event="$bot_pageview",g.$browser_type="bot"),{distinctId:m.distinctId,event:m.event,properties:g,options:{timestamp:m.timestamp,disableGeoip:m.disableGeoip,uuid:m.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){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)}}return i}};var GRu=require("async_hooks"),Bqr=class{constructor(){this.storage=new GRu.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 WRu="posthog-node";function Ihm(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[Ajo.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(m=>({...m,stacktrace:m.stacktrace?{...m.stacktrace,type:"raw",frames:(m.stacktrace.frames||[]).map(g=>({...g,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};return 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 Ajo=class{static#e=this.POSTHOG_ID_TAG="posthog_distinct_id";constructor(t,r,n,i,o){this.name=WRu,this.name=WRu,this.setupOnce=function(s,a){let c=a()?.getClient()?.getDsn()?.projectId;s(Ihm(t,{organization:r,projectId:c,prefix:n,severityAllowList:i,sendExceptionsToPostHog:o??!0}))}}};sH.errorPropertiesBuilder=new MQ.ErrorPropertiesBuilder([new MQ.EventCoercer,new MQ.ErrorCoercer,new MQ.ObjectCoercer,new MQ.StringCoercer,new MQ.PrimitiveCoercer],MQ.createStackParser("node:javascript",MQ.nodeStackLineParser),[VDu(),ORu,DRu()]);var kve=class extends Oqr{getLibraryId(){return"posthog-node"}initializeContext(){return new Bqr}};var Pqr=class{posthog;constructor({posthogApiKey:t}){this.posthog=new kve(t)}async identify(){}async sendEvent(t){t.orgId!=null&&this.posthog.capture({distinctId:t.orgId,event:"CLI",properties:{...t,...t.properties,version:"5.80.2",usingAccessToken:!0,...ece()}})}sendAutomationEvent(t){this.posthog.capture({distinctId:t.distinctId,event:t.event,properties:t.properties})}async flush(){try{await Promise.race([this.posthog.flush(),new Promise(t=>setTimeout(t,3e3))])}catch{}}};var DUt=class{async sendEvent(){}async sendAutomationEvent(){}async identify(){}async flush(){}};om();Zt();var ait=require("fs/promises"),HRu=require("os"),KRu=require("path");Wtt();var vhm="id",xhm=".fern",RUt=class{posthog;userId;token;constructor({token:t,posthogApiKey:r}){this.posthog=new kve(r),this.userId=t==null?void 0:LPo(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.80.2",...t,...t.properties,usingAccessToken:!1,...r!=null?{userEmail:r}:{},...ece()}})}sendAutomationEvent(t){this.posthog.capture({distinctId:t.distinctId,event:t.event,properties:t.properties})}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 xf({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=vD(),r=We(Vt.of((0,HRu.homedir)()),we.of(xhm),we.of(vhm));try{await rr(r)?this.persistedDistinctId=(await(0,ait.readFile)(r)).toString():(await(0,ait.mkdir)((0,KRu.dirname)(r),{recursive:!0}),await(0,ait.writeFile)(r,t),this.persistedDistinctId=t)}catch{this.persistedDistinctId=t}}return this.persistedDistinctId}};var yjo;async function kUt(){return yjo==null&&(yjo=await Chm()),yjo}async function Chm(){try{let e="phc_yQgAEdJJkVpI24NdSRID2mor1x1leRpDoC9yZ9mfXal",t=process.env.FERN_DISABLE_TELEMETRY==="true";if(e==null||t)return new DUt;let r=await vrt();return r!=null?new RUt({token:r,posthogApiKey:e}):await u_()!=null?new Pqr({posthogApiKey:e}):new RUt({token:void 0,posthogApiKey:e})}catch{return new DUt}}En();Dt();Qt();OW();var FUt=be(require("process"),1);dGe();var XRu=be(dvo(),1),ZRu=be(YRu(),1);function N1(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=QG(e),e.length===0))return 0;e=e.replace((0,ZRu.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(XRu.default.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}En();function Dqr(e){let t=0;for(let r of e.split(`
3095
3095
  `))t=Math.max(t,N1(r));return t}var yku=be(Ejo(),1);var Shm=/[\p{Lu}]/u,Thm=/[\p{Ll}]/u,tku=/^[\p{Lu}](?![\p{Lu}])/gu,iku=/([\p{Alpha}\p{N}_]|$)/u,Ijo=/[_.\- ]+/,Ohm=new RegExp("^"+Ijo.source),rku=new RegExp(Ijo.source+iku.source,"gu"),nku=new RegExp("\\d+"+iku.source,"gu"),Bhm=(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&&Shm.test(u)?(e=e.slice(0,c)+"-"+e.slice(c),i=!1,s=o,o=!0,c++):o&&s&&Thm.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},Phm=(e,t)=>(tku.lastIndex=0,e.replace(tku,r=>t(r))),Dhm=(e,t)=>(rku.lastIndex=0,nku.lastIndex=0,e.replace(rku,(r,n)=>t(n)).replace(nku,r=>t(r)));function vjo(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?Ijo.test(e)?"":t.pascalCase?n(e):r(e):(e!==r(e)&&(e=Bhm(e,r,n,t.preserveConsecutiveUppercase)),e=e.replace(Ohm,""),e=t.preserveConsecutiveUppercase?Phm(e,r):r(e),t.pascalCase&&(e=n(e.charAt(0))+e.slice(1)),Dhm(e,n))}var Sjo=be(sku(),1);dGe();var aku=(e=0)=>t=>`\x1B[${t+e}m`,cku=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,uku=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,P0={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]}},PxI=Object.keys(P0.modifier),Nhm=Object.keys(P0.color),jhm=Object.keys(P0.bgColor),DxI=[...Nhm,...jhm];function Qhm(){let e=new Map;for(let[t,r]of Object.entries(P0)){for(let[n,i]of Object.entries(r))P0[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=P0[n],e.set(i[0],i[1]);Object.defineProperty(P0,t,{value:r,enumerable:!1})}return Object.defineProperty(P0,"codes",{value:e,enumerable:!1}),P0.color.close="\x1B[39m",P0.bgColor.close="\x1B[49m",P0.color.ansi=aku(),P0.color.ansi256=cku(),P0.color.ansi16m=uku(),P0.bgColor.ansi=aku(10),P0.bgColor.ansi256=cku(10),P0.bgColor.ansi16m=uku(10),Object.defineProperties(P0,{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=>P0.rgbToAnsi256(...P0.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)=>P0.ansi256ToAnsi(P0.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>P0.ansi256ToAnsi(P0.hexToAnsi256(t)),enumerable:!1}}),P0}var zhm=Qhm(),lku=zhm;var Rqr=new Set(["\x1B","\x9B"]),Mhm=39,Cjo="\x07",dku="[",Lhm="]",mku="m",wjo=`${Lhm}8;;`,pku=e=>`${Rqr.values().next().value}${dku}${e}${mku}`,fku=e=>`${Rqr.values().next().value}${wjo}${e}${Cjo}`,Uhm=e=>e.split(" ").map(t=>N1(t)),xjo=(e,t,r)=>{let n=[...t],i=!1,o=!1,s=N1(QG(e[e.length-1]));for(let[a,c]of n.entries()){let u=N1(c);if(s+u<=r?e[e.length-1]+=c:(e.push(c),s=0),Rqr.has(c)&&(i=!0,o=n.slice(a+1).join("").startsWith(wjo)),i){o?c===Cjo&&(i=!1,o=!1):c===mku&&(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())},Vhm=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(N1(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},_hm=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let n="",i,o,s=Uhm(e),a=[""];for(let[u,l]of e.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let p=N1(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(""),xjo(a,l,t);continue}if(p+s[u]>t&&p>0&&s[u]>0){if(r.wordWrap===!1&&p<t){xjo(a,l,t);continue}a.push("")}if(p+s[u]>t&&r.wordWrap===!1){xjo(a,l,t);continue}a[a.length-1]+=l}r.trim!==!1&&(a=a.map(u=>Vhm(u)));let c=[...a.join(`
3096
3096
  `)];for(let[u,l]of c.entries()){if(n+=l,Rqr.has(l)){let{groups:d}=new RegExp(`(?:\\${dku}(?<code>\\d+)m|\\${wjo}(?<uri>.*)${Cjo})`).exec(c.slice(u).join(""))||{groups:{}};if(d.code!==void 0){let f=Number.parseFloat(d.code);i=f===Mhm?void 0:f}else d.uri!==void 0&&(o=d.uri.length===0?void 0:d.uri)}let p=lku.codes.get(Number(i));c[u+1]===`
3097
3097
  `?(o&&(n+=fku("")),i&&p&&(n+=pku(p))):l===`
@@ -3663,7 +3663,7 @@ Hint: Values starting with "@" (such as scoped npm packages) must be wrapped in
3663
3663
  Add a 'docs:' section to your fern.yml to get started.`,code:P.Code.ConfigError});let o=await new iPe({context:t}).check({workspace:n,strict:r.strict}),s=new Set(o.mdxParseErrors.map(p=>p.displayRelativeFilepath)),a=new Set(o.mdxParseErrors.map(p=>p.rawMessage)),c=o.violations.filter(p=>!(s.size>0&&Aeh(p,s,a))),u=o.hasErrors||r.strict&&o.hasWarnings;if(r.json){let p=this.buildJsonResponse({result:o,filteredViolations:c,hasErrors:u});if(t.stdout.info(JSON.stringify(p,null,2)),u)throw new P({code:P.Code.ValidationError});return}if(c.length>0)for(let p of c){let d=p.severity==="warning"?fe.yellow:fe.red;process.stderr.write(`${d(`${p.displayRelativeFilepath}:${p.line}:${p.column}: ${p.message}`)}
3664
3664
  `)}let l=0;if(o.mdxParseErrors.length>0){for(let p of o.mdxParseErrors)t.stderr.info(`
3665
3665
  ${p.toString()}
3666
- `);r.fix?l+=await Xei(t,o.mdxParseErrors):process.stdout.isTTY===!0&&!vXn()&&await Zei(t,o.mdxParseErrors)}if(r.fix&&c.length>0){let d=await new fbt({context:t}).fix({workspace:n,violations:c});l+=d.fixedCount}if(u&&(!r.fix||l===0))throw new P({code:P.Code.ValidationError});if(o.warningCount>0){t.stderr.info(`${Pr.warning} ${fe.yellow(`Found ${o.warningCount} warnings`)}`),t.stderr.info(fe.dim(" Run 'fern docs check --strict' to treat warnings as errors"));return}t.stderr.info(`${Pr.success} ${fe.green("All checks passed")}`)}buildJsonResponse({result:t,filteredViolations:r,hasErrors:n}){let i={};return(r.length>0||t.mdxParseErrors.length>0)&&(i.docs=[...r.map(o=>Eee(o)),...t.mdxParseErrors.map(o=>({severity:"error",rule:o.code.code,filepath:o.displayRelativeFilepath,...o.line!=null?{line:o.line}:{},...o.column!=null?{column:o.column}:{},message:`[${o.code.code}] ${o.code.title}: ${o.rawMessage}`}))]),{success:!n,results:i}}};function Aeh(e,t,r){if(!/failed to parse|failed to initialize/i.test(e.message))return!1;for(let n of r)if(n.length>0&&e.message.includes(n))return!0;for(let n of t){if(e.message.includes(n))return!0;let i=n.split("/").filter(Boolean);for(let o=i.length;o>=2;o--){let s=i.slice(i.length-o).join("/");if(e.message.includes(s))return!0}if(i.length===1){let o=i[0];if(o!=null&&e.message.includes(o))return!0}}return!1}function FYo(e){let t=new kYo;Zn(e,"check","Validate docs configuration",(r,n)=>t.handle(r,n),r=>r.option("strict",{type:"boolean",description:"Treat warnings as errors",default:!1}).option("json",{type:"boolean",description:"Output results as JSON to stdout",default:!1}).option("fix",{type:"boolean",description:"Automatically fix issues that have a known resolution",default:!1}))}Ab();Qt();var aol=be(require("net"),1),col=be(require("os"),1),tti=class extends Error{constructor(t){super(`${t} is locked`)}},gbt={old:new Set,young:new Set},yeh=1e3*15,uol=new Set;var v9t,beh=()=>{let e=col.default.networkInterfaces(),t=new Set([void 0,"0.0.0.0"]);for(let r of Object.values(e))for(let n of r)t.add(n.address);return t},ool=e=>new Promise((t,r)=>{let n=aol.default.createServer();n.unref(),n.on("error",r),n.listen(e,()=>{let{port:i}=n.address();n.close(()=>{t(i)})})}),sol=async(e,t)=>{if(e.host||e.port===0)return ool(e);for(let r of t)try{await ool({port:e.port,host:r})}catch(n){if(!["EADDRNOTAVAIL","EINVAL"].includes(n.code))throw n}return e.port},Eeh=e=>gbt.old.has(e)||gbt.young.has(e)||uol.has(e),Ieh=function*(e){e&&(yield*e),yield 0};async function sPe(e){let t,r=new Set;if(e&&(e.port&&(t=typeof e.port=="number"?[e.port]:e.port),e.exclude)){let s=e.exclude;if(typeof s[Symbol.iterator]!="function")throw new TypeError("The `exclude` option must be an iterable.");for(let a of s){if(typeof a!="number")throw new TypeError("Each item in the `exclude` option must be a number corresponding to the port you want excluded.");if(!Number.isSafeInteger(a))throw new TypeError(`Number ${a} in the exclude option is not a safe integer and can't be used`)}r=new Set(s)}let{reserve:n,...i}=e??{};v9t===void 0&&(v9t=setTimeout(()=>{v9t=void 0,gbt.old=gbt.young,gbt.young=new Set},yeh),v9t.unref&&v9t.unref());let o=beh();for(let s of Ieh(t))try{if(r.has(s))continue;let a=await sol({...i,port:s},o);for(;Eeh(a);){if(s!==0)throw new tti(s);a=await sol({...i,port:s},o)}return n?uol.add(a):gbt.young.add(a),a}catch(a){if(!["EADDRINUSE","EACCES"].includes(a.code)&&!(a instanceof tti))throw a}throw new Error("No available ports found")}Qt();var fol=/^[a-z0-9-]+-preview-[a-z0-9-]+\.docs\.buildwithfern\.com$/i,lol="docs.buildwithfern.com",pol=62;function v4e(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)),fol.test(t)}function dol(e){let t=e.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"");return t.length===0?"default":t}function x9t({orgId:e,previewId:t}){let r=dol(t),n=`${e}-preview-${r}.${lol}`;if(n.length<=pol)return n;let i=`${e}-preview-`,o=pol-i.length;if(o<8)throw new P({message:`Organization name "${e}" is too long to generate a valid preview URL`,code:P.Code.ValidationError});let a=r.slice(0,o).replace(/-+$/,"");return`${i}${a}.${lol}`}Dt();SC();Lm();Zt();iC();Qt();En();var Ees=require("child_process"),QAl=be(QYo(),1),Ies=be(Uti(),1),ves=be(require("fs"),1),SPe=require("fs/promises"),zAl=be(require("http"),1),MAl=be(require("os"),1),Pni=be(require("path"),1);rri();Zt();var B9=require("fs/promises"),Xll=require("os"),CZo=be(require("path"),1),cuh=".fern",uuh="logs",xZo=100*1024*1024;function luh(){return"cli@5.80.1"}var j4e=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??We(We(Vt.of((0,Xll.homedir)()),we.of(cuh)),we.of(uuh));await rr(n)||await(0,B9.mkdir)(n,{recursive:!0});let o=`${new Date().toISOString().replace(/[:.]/g,"-")}.debug.log`;this.logFilePath=We(n,we.of(o));let s=["================================================================================","Fern Docs Dev Debug Log",`Session started: ${new Date().toISOString()}`,`Log file: ${CZo.default.basename(this.logFilePath)}`,"================================================================================",""].join(`
3666
+ `);r.fix?l+=await Xei(t,o.mdxParseErrors):process.stdout.isTTY===!0&&!vXn()&&await Zei(t,o.mdxParseErrors)}if(r.fix&&c.length>0){let d=await new fbt({context:t}).fix({workspace:n,violations:c});l+=d.fixedCount}if(u&&(!r.fix||l===0))throw new P({code:P.Code.ValidationError});if(o.warningCount>0){t.stderr.info(`${Pr.warning} ${fe.yellow(`Found ${o.warningCount} warnings`)}`),t.stderr.info(fe.dim(" Run 'fern docs check --strict' to treat warnings as errors"));return}t.stderr.info(`${Pr.success} ${fe.green("All checks passed")}`)}buildJsonResponse({result:t,filteredViolations:r,hasErrors:n}){let i={};return(r.length>0||t.mdxParseErrors.length>0)&&(i.docs=[...r.map(o=>Eee(o)),...t.mdxParseErrors.map(o=>({severity:"error",rule:o.code.code,filepath:o.displayRelativeFilepath,...o.line!=null?{line:o.line}:{},...o.column!=null?{column:o.column}:{},message:`[${o.code.code}] ${o.code.title}: ${o.rawMessage}`}))]),{success:!n,results:i}}};function Aeh(e,t,r){if(!/failed to parse|failed to initialize/i.test(e.message))return!1;for(let n of r)if(n.length>0&&e.message.includes(n))return!0;for(let n of t){if(e.message.includes(n))return!0;let i=n.split("/").filter(Boolean);for(let o=i.length;o>=2;o--){let s=i.slice(i.length-o).join("/");if(e.message.includes(s))return!0}if(i.length===1){let o=i[0];if(o!=null&&e.message.includes(o))return!0}}return!1}function FYo(e){let t=new kYo;Zn(e,"check","Validate docs configuration",(r,n)=>t.handle(r,n),r=>r.option("strict",{type:"boolean",description:"Treat warnings as errors",default:!1}).option("json",{type:"boolean",description:"Output results as JSON to stdout",default:!1}).option("fix",{type:"boolean",description:"Automatically fix issues that have a known resolution",default:!1}))}Ab();Qt();var aol=be(require("net"),1),col=be(require("os"),1),tti=class extends Error{constructor(t){super(`${t} is locked`)}},gbt={old:new Set,young:new Set},yeh=1e3*15,uol=new Set;var v9t,beh=()=>{let e=col.default.networkInterfaces(),t=new Set([void 0,"0.0.0.0"]);for(let r of Object.values(e))for(let n of r)t.add(n.address);return t},ool=e=>new Promise((t,r)=>{let n=aol.default.createServer();n.unref(),n.on("error",r),n.listen(e,()=>{let{port:i}=n.address();n.close(()=>{t(i)})})}),sol=async(e,t)=>{if(e.host||e.port===0)return ool(e);for(let r of t)try{await ool({port:e.port,host:r})}catch(n){if(!["EADDRNOTAVAIL","EINVAL"].includes(n.code))throw n}return e.port},Eeh=e=>gbt.old.has(e)||gbt.young.has(e)||uol.has(e),Ieh=function*(e){e&&(yield*e),yield 0};async function sPe(e){let t,r=new Set;if(e&&(e.port&&(t=typeof e.port=="number"?[e.port]:e.port),e.exclude)){let s=e.exclude;if(typeof s[Symbol.iterator]!="function")throw new TypeError("The `exclude` option must be an iterable.");for(let a of s){if(typeof a!="number")throw new TypeError("Each item in the `exclude` option must be a number corresponding to the port you want excluded.");if(!Number.isSafeInteger(a))throw new TypeError(`Number ${a} in the exclude option is not a safe integer and can't be used`)}r=new Set(s)}let{reserve:n,...i}=e??{};v9t===void 0&&(v9t=setTimeout(()=>{v9t=void 0,gbt.old=gbt.young,gbt.young=new Set},yeh),v9t.unref&&v9t.unref());let o=beh();for(let s of Ieh(t))try{if(r.has(s))continue;let a=await sol({...i,port:s},o);for(;Eeh(a);){if(s!==0)throw new tti(s);a=await sol({...i,port:s},o)}return n?uol.add(a):gbt.young.add(a),a}catch(a){if(!["EADDRINUSE","EACCES"].includes(a.code)&&!(a instanceof tti))throw a}throw new Error("No available ports found")}Qt();var fol=/^[a-z0-9-]+-preview-[a-z0-9-]+\.docs\.buildwithfern\.com$/i,lol="docs.buildwithfern.com",pol=62;function v4e(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)),fol.test(t)}function dol(e){let t=e.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"");return t.length===0?"default":t}function x9t({orgId:e,previewId:t}){let r=dol(t),n=`${e}-preview-${r}.${lol}`;if(n.length<=pol)return n;let i=`${e}-preview-`,o=pol-i.length;if(o<8)throw new P({message:`Organization name "${e}" is too long to generate a valid preview URL`,code:P.Code.ValidationError});let a=r.slice(0,o).replace(/-+$/,"");return`${i}${a}.${lol}`}Dt();SC();Lm();Zt();iC();Qt();En();var Ees=require("child_process"),QAl=be(QYo(),1),Ies=be(Uti(),1),ves=be(require("fs"),1),SPe=require("fs/promises"),zAl=be(require("http"),1),MAl=be(require("os"),1),Pni=be(require("path"),1);rri();Zt();var B9=require("fs/promises"),Xll=require("os"),CZo=be(require("path"),1),cuh=".fern",uuh="logs",xZo=100*1024*1024;function luh(){return"cli@5.80.2"}var j4e=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??We(We(Vt.of((0,Xll.homedir)()),we.of(cuh)),we.of(uuh));await rr(n)||await(0,B9.mkdir)(n,{recursive:!0});let o=`${new Date().toISOString().replace(/[:.]/g,"-")}.debug.log`;this.logFilePath=We(n,we.of(o));let s=["================================================================================","Fern Docs Dev Debug Log",`Session started: ${new Date().toISOString()}`,`Log file: ${CZo.default.basename(this.logFilePath)}`,"================================================================================",""].join(`
3667
3667
  `);await(0,B9.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)+`
3668
3668
  `;try{await(0,B9.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:luh(),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,B9.readdir)(t)).filter(c=>c.endsWith(".log")),i=[];for(let c of n){let u=CZo.default.join(t,c);try{let l=await(0,B9.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=xZo/1024/1024;if(o<=xZo){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<=xZo)break;if(!(this.logFilePath!=null&&c.fullPath===this.logFilePath))try{await(0,B9.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 nri={"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET, POST, OPTIONS","Access-Control-Allow-Headers":"Content-Type"};function Zll(e){let t=puh();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:nri});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",...nri}})}catch{return new Response(JSON.stringify(i()),{headers:{"Content-Type":"application/json",...nri}})}let d=/^\/_local\/(.*)/.exec(p.pathname);return u.method==="GET"&&d!=null?new Response(t.file(`/${d[1]}`),{headers:nri}):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 j4e.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 puh(){return globalThis.Bun}Qt();var Apl=require("events"),cri=be(require("fs"),1),z4e=be(require("path"),1);var $ll=be(require("os"),1),epl=300,hPe=20,rqt=1e7,tpl=$ll.default.platform();var fuh=tpl==="darwin",wZo=tpl==="win32",gPe=fuh||wZo,rpl=3e3,npl=2e4,SZo=1250;var Cie;(function(e){e[e.DIR=1]="DIR",e[e.FILE=2]="FILE"})(Cie||(Cie={}));var Q4e;(function(e){e.CHANGE="change",e.RENAME="rename"})(Q4e||(Q4e={}));var nqt;(function(e){e.CHANGE="change",e.ERROR="error"})(nqt||(nqt={}));var Sc;(function(e){e.ADD="add",e.ADD_DIR="addDir",e.CHANGE="change",e.RENAME="rename",e.RENAME_DIR="renameDir",e.UNLINK="unlink",e.UNLINK_DIR="unlinkDir"})(Sc||(Sc={}));var rN;(function(e){e.ALL="all",e.CLOSE="close",e.ERROR="error",e.READY="ready"})(rN||(rN={}));var duh=(e,t=1,r)=>{t=Math.max(1,t);let n=r?.leading??!1,i=r?.trailing??!0,o=Math.max(r?.maxWait??1/0,t),s,a,c=0,u=0,l=()=>{let I=Date.now(),C=I-c,w=I-u,O=C>=t||w>=o;return[I,O]},p=I=>{if(u=I,!s)return;let C=s;s=void 0,e.apply(void 0,C)},d=()=>{E(0)},f=()=>{a&&(d(),p(Date.now()))},m=I=>{if(u=I,n)return p(I)},g=I=>{if(i&&s)return p(I);s=void 0},A=()=>{a=void 0;let[I,C]=l();return C?g(I):y(I)},y=I=>{let C=I-c,w=I-u,O=t-C,D=o-w,S=Math.min(O,D);return E(S)},E=I=>{a&&clearTimeout(a),!(I<=0)&&(a=setTimeout(A,I))},v=(...I)=>{let[C,w]=l(),O=!!a;if(s=I,c=C,(w||!a)&&E(t),w)return O?p(C):m(C)};return v.cancel=d,v.flush=f,v},iri=duh;var PZo=be(require("fs"),1),sri=be(require("path"),1);var Dd=be(require("fs"),1),LB=require("util");var Wde=(e,t)=>function(...n){return e.apply(void 0,n).catch(t)},wie=(e,t)=>function(...n){try{return e.apply(void 0,n)}catch(i){return t(i)}};var TZo=be(require("process"),1),ipl=TZo.default.getuid?!TZo.default.getuid():!1,opl=1e4,iM=()=>{};var iqt={isChangeErrorOk:e=>{if(!iqt.isNodeError(e))return!1;let{code:t}=e;return t==="ENOSYS"||!ipl&&(t==="EINVAL"||t==="EPERM")},isNodeError:e=>e instanceof Error,isRetriableError:e=>{if(!iqt.isNodeError(e))return!1;let{code:t}=e;return t==="EMFILE"||t==="ENFILE"||t==="EAGAIN"||t==="EBUSY"||t==="EACCESS"||t==="EACCES"||t==="EACCS"||t==="EPERM"},onChangeError:e=>{if(!iqt.isNodeError(e))throw e;if(!iqt.isChangeErrorOk(e))throw e}},Zv=iqt;var OZo=class{constructor(){this.interval=25,this.intervalId=void 0,this.limit=opl,this.queueActive=new Set,this.queueWaiting=new Set,this.init=()=>{this.intervalId||(this.intervalId=setInterval(this.tick,this.interval))},this.reset=()=>{this.intervalId&&(clearInterval(this.intervalId),delete this.intervalId)},this.add=t=>{this.queueWaiting.add(t),this.queueActive.size<this.limit/2?this.tick():this.init()},this.remove=t=>{this.queueWaiting.delete(t),this.queueActive.delete(t)},this.schedule=()=>new Promise(t=>{let r=()=>this.remove(n),n=()=>t(r);this.add(n)}),this.tick=()=>{if(!(this.queueActive.size>=this.limit)){if(!this.queueWaiting.size)return this.reset();for(let t of this.queueWaiting){if(this.queueActive.size>=this.limit)break;this.queueWaiting.delete(t),this.queueActive.add(t),t()}}}}},spl=new OZo;var Hde=(e,t)=>function(n){return function i(...o){return spl.schedule().then(s=>{let a=u=>(s(),u),c=u=>{if(s(),Date.now()>=n)throw u;if(t(u)){let l=Math.round(100*Math.random());return new Promise(d=>setTimeout(d,l)).then(()=>i.apply(void 0,o))}throw u};return e.apply(void 0,o).then(a,c)})}},Kde=(e,t)=>function(n){return function i(...o){try{return e.apply(void 0,o)}catch(s){if(Date.now()>n)throw s;if(t(s))return i.apply(void 0,o);throw s}}};var muh={attempt:{chmod:Wde((0,LB.promisify)(Dd.default.chmod),Zv.onChangeError),chown:Wde((0,LB.promisify)(Dd.default.chown),Zv.onChangeError),close:Wde((0,LB.promisify)(Dd.default.close),iM),fsync:Wde((0,LB.promisify)(Dd.default.fsync),iM),mkdir:Wde((0,LB.promisify)(Dd.default.mkdir),iM),realpath:Wde((0,LB.promisify)(Dd.default.realpath),iM),stat:Wde((0,LB.promisify)(Dd.default.stat),iM),unlink:Wde((0,LB.promisify)(Dd.default.unlink),iM),chmodSync:wie(Dd.default.chmodSync,Zv.onChangeError),chownSync:wie(Dd.default.chownSync,Zv.onChangeError),closeSync:wie(Dd.default.closeSync,iM),existsSync:wie(Dd.default.existsSync,iM),fsyncSync:wie(Dd.default.fsync,iM),mkdirSync:wie(Dd.default.mkdirSync,iM),realpathSync:wie(Dd.default.realpathSync,iM),statSync:wie(Dd.default.statSync,iM),unlinkSync:wie(Dd.default.unlinkSync,iM)},retry:{close:Hde((0,LB.promisify)(Dd.default.close),Zv.isRetriableError),fsync:Hde((0,LB.promisify)(Dd.default.fsync),Zv.isRetriableError),open:Hde((0,LB.promisify)(Dd.default.open),Zv.isRetriableError),readFile:Hde((0,LB.promisify)(Dd.default.readFile),Zv.isRetriableError),rename:Hde((0,LB.promisify)(Dd.default.rename),Zv.isRetriableError),stat:Hde((0,LB.promisify)(Dd.default.stat),Zv.isRetriableError),write:Hde((0,LB.promisify)(Dd.default.write),Zv.isRetriableError),writeFile:Hde((0,LB.promisify)(Dd.default.writeFile),Zv.isRetriableError),closeSync:Kde(Dd.default.closeSync,Zv.isRetriableError),fsyncSync:Kde(Dd.default.fsyncSync,Zv.isRetriableError),openSync:Kde(Dd.default.openSync,Zv.isRetriableError),readFileSync:Kde(Dd.default.readFileSync,Zv.isRetriableError),renameSync:Kde(Dd.default.renameSync,Zv.isRetriableError),statSync:Kde(Dd.default.statSync,Zv.isRetriableError),writeSync:Kde(Dd.default.writeSync,Zv.isRetriableError),writeFileSync:Kde(Dd.default.writeFileSync,Zv.isRetriableError)}},apl=muh;var ori=be(require("fs"),1),oqt=be(require("path"),1);var BZo=()=>{};var huh=()=>{let e=BZo,t=BZo,r=!1,n=!1;return{promise:new Promise((c,u)=>{e=l=>(r=!0,c(l)),t=l=>(n=!0,u(l))}),resolve:e,reject:t,isPending:()=>!r&&!n,isResolved:()=>r,isRejected:()=>n}},cpl=huh;var guh=()=>{let{promise:e,resolve:t,isPending:r}=cpl(),n=0,i=()=>{n+=1},o=()=>{n-=1,!n&&t()};return i(),queueMicrotask(o),{promise:e,isPending:r,increment:i,decrement:o}},upl=guh;var lpl={then:e=>{e()}};var ppl=e=>Array.isArray(e)?e:[e],fpl=e=>typeof e=="function";var Auh=(e,t)=>{let r=t?.followSymlinks??!1,n=t?.depth??1/0,i=t?.limit??1/0,o=t?.ignore??[],s=ppl(o).map(oe=>fpl(oe)?oe:de=>oe.test(de)),a=oe=>s.some(de=>de(oe)),c=t?.signal??{aborted:!1},u=t?.onDirents||(()=>{}),l=[],p=new Set,d={},f=[],m=new Set,g={},A=[],y=new Set,E={},v={},I=new Set,C={directories:[],directoriesNames:new Set,directoriesNamesToPaths:{},files:[],filesNames:new Set,filesNamesToPaths:{},symlinks:[],symlinksNames:new Set,symlinksNamesToPaths:{},map:{}},w={directories:l,directoriesNames:p,directoriesNamesToPaths:d,files:f,filesNames:m,filesNamesToPaths:g,symlinks:A,symlinksNames:y,symlinksNamesToPaths:E,map:v},{promise:O,increment:D,decrement:S}=upl(),z=0,K=(oe,de,Oe,ve)=>{I.has(de)||z>=i||(z+=1,oe.directories.push(de),oe.directoriesNames.add(Oe),l.push(de),p.add(Oe),d.propertyIsEnumerable(Oe)||(d[Oe]=[]),d[Oe].push(de),I.add(de),!(ve>=n)&&(z>=i||le(de,ve+1)))},Y=(oe,de,Oe)=>{I.has(de)||z>=i||(z+=1,oe.files.push(de),oe.filesNames.add(Oe),f.push(de),m.add(Oe),g.propertyIsEnumerable(Oe)||(g[Oe]=[]),g[Oe].push(de),I.add(de))},Z=(oe,de,Oe,ve)=>{I.has(de)||z>=i||(z+=1,oe.symlinks.push(de),oe.symlinksNames.add(Oe),A.push(de),y.add(Oe),E.propertyIsEnumerable(Oe)||(E[Oe]=[]),E[Oe].push(de),I.add(de),r&&(ve>=n||z>=i||Ce(de,ve+1)))},ae=(oe,de,Oe,ve,ze)=>{c.aborted||a(de)||(ve.isDirectory()?K(oe,de,Oe,ze):ve.isFile()?Y(oe,de,Oe):ve.isSymbolicLink()&&Z(oe,de,Oe,ze))},ue=(oe,de,Oe,ve)=>{if(c.aborted)return;let ze=de===oqt.default.sep?"":oqt.default.sep,tt=Oe.name,ot=`${de}${ze}${tt}`;a(ot)||(Oe.isDirectory()?K(oe,ot,tt,ve):Oe.isFile()?Y(oe,ot,tt):Oe.isSymbolicLink()&&Z(oe,ot,tt,ve))},ne=(oe,de,Oe,ve)=>{for(let ze=0,tt=Oe.length;ze<tt;ze++)ue(oe,de,Oe[ze],ve)},le=(oe,de)=>{c.aborted||de>n||z>=i||(D(),ori.default.readdir(oe,{withFileTypes:!0},(Oe,ve)=>{if(Oe||c.aborted||!ve.length)return S();(u(ve)||lpl).then(()=>{let tt=v[oe]={directories:[],directoriesNames:new Set,directoriesNamesToPaths:{},files:[],filesNames:new Set,filesNamesToPaths:{},symlinks:[],symlinksNames:new Set,symlinksNamesToPaths:{}};ne(tt,oe,ve,de),S()})}))},Ce=(oe,de)=>{D(),ori.default.realpath(oe,(Oe,ve)=>{if(Oe||c.aborted)return S();ori.default.stat(ve,(ze,tt)=>{if(ze||c.aborted)return S();let ot=oqt.default.basename(ve),mt=v[oe]={directories:[],directoriesNames:new Set,directoriesNamesToPaths:{},files:[],filesNames:new Set,filesNamesToPaths:{},symlinks:[],symlinksNames:new Set,symlinksNamesToPaths:{}};ae(mt,ve,ot,tt,de),S()})})};return(async(oe,de=1)=>(oe=oqt.default.normalize(oe),I.add(oe),le(oe,de),await O,c.aborted?C:w))(e)},dpl=Auh;var Sie={lang:{debounce:iri,attempt:e=>{try{return e()}catch(t){return Sie.lang.castError(t)}},castArray:e=>Sie.lang.isArray(e)?e:[e],castError:e=>Sie.lang.isError(e)?e:Sie.lang.isString(e)?new Error(e):new Error("Unknown error"),defer:e=>setTimeout(e,0),isArray:e=>Array.isArray(e),isError:e=>e instanceof Error,isFunction:e=>typeof e=="function",isNaN:e=>Number.isNaN(e),isNumber:e=>typeof e=="number",isPrimitive:e=>{if(e===null)return!0;let t=typeof e;return t!=="object"&&t!=="function"},isShallowEqual:(e,t)=>{if(e===t)return!0;if(Sie.lang.isNaN(e))return Sie.lang.isNaN(t);if(Sie.lang.isPrimitive(e)||Sie.lang.isPrimitive(t))return e===t;for(let r in e)if(!(r in t))return!1;for(let r in t)if(e[r]!==t[r])return!1;return!0},isSet:e=>e instanceof Set,isString:e=>typeof e=="string",isUndefined:e=>e===void 0,noop:()=>{},uniq:e=>e.length<2?e:Array.from(new Set(e))},fs:{getDepth:e=>Math.max(0,e.split(sri.default.sep).length-1),getRealPath:(e,t)=>{try{return t?PZo.default.realpathSync.native(e):PZo.default.realpathSync(e)}catch{return}},isSubPath:(e,t)=>t.startsWith(e)&&t[e.length]===sri.default.sep&&t.length-e.length>sri.default.sep.length,poll:(e,t=npl)=>apl.retry.stat(t)(e,{bigint:!0}).catch(Sie.lang.noop),readdir:async(e,t,r=1/0,n=1/0,i,o)=>{if(o&&r===1&&e in o){let s=o[e];return[s.directories,s.files]}else{let s=await dpl(e,{depth:r,limit:n,ignore:t,signal:i});return[s.directories,s.files]}}}},Zl=Sie;var ari=be(require("path"),1);var DZo=class{constructor(t,r,n){this.base=n,this.watcher=t,this.handler=r.handler,this.fswatcher=r.watcher,this.options=r.options,this.folderPath=r.folderPath,this.filePath=r.filePath,this.handlerBatched=this.base?this.base.onWatcherEvent.bind(this.base):this._makeHandlerBatched(this.options.debounce)}_isSubRoot(t){return this.filePath?t===this.filePath:t===this.folderPath||Zl.fs.isSubPath(this.folderPath,t)}_makeHandlerBatched(t=epl){return(()=>{let r=this.watcher._readyWait,n=[],i=new Set,o=async(a,c)=>{let u=this.options.ignoreInitial?[]:a,l=await this.eventsPopulate([...c]),p=this.eventsDeduplicate([...u,...l]);this.onTargetEvents(p)},s=Zl.lang.debounce(()=>{this.watcher.isClosed()||(r=o(n,i),n=[],i=new Set)},t);return async(a,c="",u=!1)=>{u?await this.eventsPopulate([c],n,!0):i.add(c),r.then(s)}})()}eventsDeduplicate(t){if(t.length<2)return t;let r={};return t.reduce((n,i)=>{let[o,s]=i,a=r[s];return o===a||o===Sc.CHANGE&&a===Sc.ADD||(r[s]=o,n.push(i)),n},[])}async eventsPopulate(t,r=[],n=!1){return await Promise.all(t.map(async i=>{let o=await this.watcher._poller.update(i,this.options.pollingTimeout);await Promise.all(o.map(async s=>{r.push([s,i]),s===Sc.ADD_DIR?await this.eventsPopulateAddDir(t,i,r,n):s===Sc.UNLINK_DIR&&await this.eventsPopulateUnlinkDir(t,i,r,n)}))})),r}async eventsPopulateAddDir(t,r,n=[],i=!1){if(i)return n;let o=this.options.recursive?this.options.depth??hPe:Math.min(1,this.options.depth??hPe),s=this.options.limit??rqt,[a,c]=await Zl.fs.readdir(r,this.options.ignore,o,s,this.watcher._closeSignal),u=[...a,...c];return await Promise.all(u.map(l=>{if(!this.watcher.isIgnored(l,this.options.ignore)&&!t.includes(l))return this.eventsPopulate([l],n,!0)})),n}async eventsPopulateUnlinkDir(t,r,n=[],i=!1){if(i)return n;for(let o of this.watcher._poller.stats.keys())Zl.fs.isSubPath(r,o)&&(t.includes(o)||await this.eventsPopulate([o],n,!0));return n}onTargetAdd(t){this._isSubRoot(t)&&(this.options.renameDetection?this.watcher._locker.getLockTargetAdd(t,this.options.renameTimeout):this.watcher.event(Sc.ADD,t))}onTargetAddDir(t){t!==this.folderPath&&this.options.recursive&&!gPe&&this.options.native!==!1&&this.watcher.watchDirectory(t,this.options,this.handler,void 0,this.base||this),this._isSubRoot(t)&&(this.options.renameDetection?this.watcher._locker.getLockTargetAddDir(t,this.options.renameTimeout):this.watcher.event(Sc.ADD_DIR,t))}onTargetChange(t){this._isSubRoot(t)&&this.watcher.event(Sc.CHANGE,t)}onTargetUnlink(t){this.watcher.watchersClose(ari.default.dirname(t),t,!1),this._isSubRoot(t)&&(this.options.renameDetection?this.watcher._locker.getLockTargetUnlink(t,this.options.renameTimeout):this.watcher.event(Sc.UNLINK,t))}onTargetUnlinkDir(t){this.watcher.watchersClose(ari.default.dirname(t),t,!1),this.watcher.watchersClose(t),this._isSubRoot(t)&&(this.options.renameDetection?this.watcher._locker.getLockTargetUnlinkDir(t,this.options.renameTimeout):this.watcher.event(Sc.UNLINK_DIR,t))}onTargetEvent(t){let[r,n]=t;r===Sc.ADD?this.onTargetAdd(n):r===Sc.ADD_DIR?this.onTargetAddDir(n):r===Sc.CHANGE?this.onTargetChange(n):r===Sc.UNLINK?this.onTargetUnlink(n):r===Sc.UNLINK_DIR&&this.onTargetUnlinkDir(n)}onTargetEvents(t){for(let r of t)this.onTargetEvent(r)}onWatcherEvent(t,r,n=!1){return this.handlerBatched(t,r,n)}onWatcherChange(t=Q4e.CHANGE,r){if(this.watcher.isClosed())return;let n=ari.default.resolve(this.folderPath,r||"");this.filePath&&n!==this.folderPath&&n!==this.filePath||this.watcher.isIgnored(n,this.options.ignore)||this.onWatcherEvent(t,n)}onWatcherError(t){wZo&&t.code==="EPERM"?this.onWatcherChange(Q4e.CHANGE,""):this.watcher.error(t)}async init(){await this.initWatcherEvents(),await this.initInitialEvents()}async initWatcherEvents(){let t=this.onWatcherChange.bind(this);this.fswatcher.on(nqt.CHANGE,t);let r=this.onWatcherError.bind(this);this.fswatcher.on(nqt.ERROR,r)}async initInitialEvents(){let t=!this.watcher.isReady();if(this.filePath){if(this.watcher._poller.stats.has(this.filePath))return;await this.onWatcherEvent(Q4e.CHANGE,this.filePath,t)}else{let r=this.options.recursive&&gPe&&this.options.native!==!1?this.options.depth??hPe:Math.min(1,this.options.depth??hPe),n=this.options.limit??rqt,[i,o]=await Zl.fs.readdir(this.folderPath,this.options.ignore,r,n,this.watcher._closeSignal,this.options.readdirMap),s=[this.folderPath,...i,...o];await Promise.all(s.map(a=>{if(!this.watcher._poller.stats.has(a)&&!this.watcher.isIgnored(a,this.options.ignore))return this.onWatcherEvent(Q4e.CHANGE,a,t)}))}}},mpl=DZo;var nN={interval:100,intervalId:void 0,fns:new Map,init:()=>{nN.intervalId||(nN.intervalId=setInterval(nN.resolve,nN.interval))},reset:()=>{nN.intervalId&&(clearInterval(nN.intervalId),delete nN.intervalId)},add:(e,t)=>{nN.fns.set(e,Date.now()+t),nN.init()},remove:e=>{nN.fns.delete(e)},resolve:()=>{if(!nN.fns.size)return nN.reset();let e=Date.now();for(let[t,r]of nN.fns)r>=e||(nN.remove(t),t())}},sqt=nN;var aqt=class e{constructor(t){this._watcher=t,this.reset()}getLockAdd(t,r=SZo){let{ino:n,targetPath:i,events:o,locks:s}=t,a=()=>{let p=this._watcher._poller.paths.find(n||-1,d=>d!==i);if(p&&p!==i){if(Zl.fs.getRealPath(i,!0)===p)return;this._watcher.event(o.rename,p,i)}else this._watcher.event(o.add,i)};if(!n)return a();let c=()=>{s.add.delete(n),sqt.remove(u)},u=()=>{c(),a()};sqt.add(u,r);let l=()=>{let p=s.unlink.get(n);if(!p)return;c();let d=p();i===d?o.change&&this._watcher._poller.stats.has(i)&&this._watcher.event(o.change,i):this._watcher.event(o.rename,d,i)};s.add.set(n,l),l()}getLockUnlink(t,r=SZo){let{ino:n,targetPath:i,events:o,locks:s}=t,a=()=>{this._watcher.event(o.unlink,i)};if(!n)return a();let c=()=>{s.unlink.delete(n),sqt.remove(u)},u=()=>{c(),a()};sqt.add(u,r);let l=()=>(c(),i);s.unlink.set(n,l),s.add.get(n)?.()}getLockTargetAdd(t,r){let n=this._watcher._poller.getIno(t,Sc.ADD,Cie.FILE);return this.getLockAdd({ino:n,targetPath:t,events:e.FILE_EVENTS,locks:this._locksFile},r)}getLockTargetAddDir(t,r){let n=this._watcher._poller.getIno(t,Sc.ADD_DIR,Cie.DIR);return this.getLockAdd({ino:n,targetPath:t,events:e.DIR_EVENTS,locks:this._locksDir},r)}getLockTargetUnlink(t,r){let n=this._watcher._poller.getIno(t,Sc.UNLINK,Cie.FILE);return this.getLockUnlink({ino:n,targetPath:t,events:e.FILE_EVENTS,locks:this._locksFile},r)}getLockTargetUnlinkDir(t,r){let n=this._watcher._poller.getIno(t,Sc.UNLINK_DIR,Cie.DIR);return this.getLockUnlink({ino:n,targetPath:t,events:e.DIR_EVENTS,locks:this._locksDir},r)}reset(){this._locksAdd=new Map,this._locksAddDir=new Map,this._locksUnlink=new Map,this._locksUnlinkDir=new Map,this._locksDir={add:this._locksAddDir,unlink:this._locksUnlinkDir},this._locksFile={add:this._locksAdd,unlink:this._locksUnlink}}};aqt.DIR_EVENTS={add:Sc.ADD_DIR,rename:Sc.RENAME_DIR,unlink:Sc.UNLINK_DIR};aqt.FILE_EVENTS={add:Sc.ADD,change:Sc.CHANGE,rename:Sc.RENAME,unlink:Sc.UNLINK};var hpl=aqt;var RZo=class{constructor(){this.map=new Map}clear(){this.map.clear()}delete(t,r){if(Zl.lang.isUndefined(r))return this.map.delete(t);if(this.map.has(t)){let n=this.map.get(t);if(Zl.lang.isSet(n)){let i=n.delete(r);return n.size||this.map.delete(t),i}else if(n===r)return this.map.delete(t),!0}return!1}find(t,r){if(this.map.has(t)){let n=this.map.get(t);if(Zl.lang.isSet(n))return Array.from(n).find(r);if(r(n))return n}}get(t){return this.map.get(t)}has(t,r){if(Zl.lang.isUndefined(r))return this.map.has(t);if(this.map.has(t)){let n=this.map.get(t);return Zl.lang.isSet(n)?n.has(r):n===r}return!1}set(t,r){if(this.map.has(t)){let n=this.map.get(t);Zl.lang.isSet(n)?n.add(r):n!==r&&this.map.set(t,new Set([n,r]))}else this.map.set(t,r);return this}},kZo=RZo;var FZo=class{constructor(t){this.ino=t.ino<=Number.MAX_SAFE_INTEGER?Number(t.ino):t.ino,this.size=Number(t.size),this.atimeMs=Number(t.atimeMs),this.mtimeMs=Number(t.mtimeMs),this.ctimeMs=Number(t.ctimeMs),this.birthtimeMs=Number(t.birthtimeMs),this._isFile=t.isFile(),this._isDirectory=t.isDirectory(),this._isSymbolicLink=t.isSymbolicLink()}isFile(){return this._isFile}isDirectory(){return this._isDirectory}isSymbolicLink(){return this._isSymbolicLink}},gpl=FZo;var NZo=class{constructor(){this.inos={},this.paths=new kZo,this.stats=new Map}getIno(t,r,n){let i=this.inos[r];if(!i)return;let o=i[t];if(o&&!(n&&o[1]!==n))return o[0]}getStats(t){return this.stats.get(t)}async poll(t,r){let n=await Zl.fs.poll(t,r);if(!(!n||!(n.isFile()||n.isDirectory())))return new gpl(n)}reset(){this.inos={},this.paths=new kZo,this.stats=new Map}async update(t,r){let n=this.getStats(t),i=await this.poll(t,r);if(this.updateStats(t,i),!n&&i){if(i.isFile())return this.updateIno(t,Sc.ADD,i),[Sc.ADD];if(i.isDirectory())return this.updateIno(t,Sc.ADD_DIR,i),[Sc.ADD_DIR]}else if(n&&!i){if(n.isFile())return this.updateIno(t,Sc.UNLINK,n),[Sc.UNLINK];if(n.isDirectory())return this.updateIno(t,Sc.UNLINK_DIR,n),[Sc.UNLINK_DIR]}else if(n&&i){if(n.isFile()){if(i.isFile())return n.ino===i.ino&&!n.size&&!i.size?[]:(this.updateIno(t,Sc.CHANGE,i),[Sc.CHANGE]);if(i.isDirectory())return this.updateIno(t,Sc.UNLINK,n),this.updateIno(t,Sc.ADD_DIR,i),[Sc.UNLINK,Sc.ADD_DIR]}else if(n.isDirectory()){if(i.isFile())return this.updateIno(t,Sc.UNLINK_DIR,n),this.updateIno(t,Sc.ADD,i),[Sc.UNLINK_DIR,Sc.ADD];if(i.isDirectory())return n.ino===i.ino?[]:(this.updateIno(t,Sc.UNLINK_DIR,n),this.updateIno(t,Sc.ADD_DIR,i),[Sc.UNLINK_DIR,Sc.ADD_DIR])}}return[]}updateIno(t,r,n){let i=this.inos[r]=this.inos[r]||(this.inos[r]={}),o=n.isFile()?Cie.FILE:Cie.DIR;i[t]=[n.ino,o]}updateStats(t,r){if(r)this.paths.set(r.ino,t),this.stats.set(t,r);else{let n=this.stats.get(t)?.ino||-1;this.paths.delete(n,t),this.stats.delete(t)}}},jZo=NZo;var QZo=class e extends Apl.EventEmitter{constructor(t,r,n){super(),this._closed=!1,this._ready=!1,this._closeAborter=new AbortController,this._closeSignal=this._closeAborter.signal,this.on(rN.CLOSE,()=>this._closeAborter.abort()),this._closeWait=new Promise(i=>this.on(rN.CLOSE,i)),this._readyWait=new Promise(i=>this.on(rN.READY,i)),this._locker=new hpl(this),this._roots=new Set,this._poller=new jZo,this._pollers=new Set,this._subwatchers=new Set,this._watchers={},this._watchersLock=Promise.resolve(),this._watchersRestorable={},this.watch(t,r,n)}isClosed(){return this._closed}isIgnored(t,r){return!!r&&(Zl.lang.isFunction(r)?!!r(t):r.test(t))}isReady(){return this._ready}close(){return this._locker.reset(),this._poller.reset(),this._roots.clear(),this.watchersClose(),this.isClosed()?!1:(this._closed=!0,this.emit(rN.CLOSE))}error(t){if(this.isClosed())return!1;let r=Zl.lang.castError(t);return this.emit(rN.ERROR,r)}event(t,r,n){return this.isClosed()?!1:(this.emit(rN.ALL,t,r,n),this.emit(t,r,n))}ready(){return this.isClosed()||this.isReady()?!1:(this._ready=!0,this.emit(rN.READY))}pollerExists(t,r){for(let n of this._pollers)if(n.targetPath===t&&Zl.lang.isShallowEqual(n.options,r))return!0;return!1}subwatcherExists(t,r){for(let n of this._subwatchers)if(n.targetPath===t&&Zl.lang.isShallowEqual(n.options,r))return!0;return!1}watchersClose(t,r,n=!0){if(t){let i=this._watchers[t];if(i)for(let o of[...i])r&&o.filePath!==r||this.watcherClose(o);if(n)for(let o in this._watchers)Zl.fs.isSubPath(t,o)&&this.watchersClose(o,r,!1)}else for(let i in this._watchers)this.watchersClose(i,r,!1)}watchersLock(t){return this._watchersLock.then(()=>this._watchersLock=new Promise(async r=>{await t(),r()}))}watchersRestore(){delete this._watchersRestoreTimeout;let t=Object.entries(this._watchersRestorable);this._watchersRestorable={};for(let[r,n]of t)this.watchPath(r,n.options,n.handler)}async watcherAdd(t,r){let{folderPath:n}=t;(this._watchers[n]=this._watchers[n]||[]).push(t);let o=new mpl(this,t,r);return await o.init(),o}watcherClose(t){t.watcher.close();let r=this._watchers[t.folderPath];if(r){let o=r.indexOf(t);r.splice(o,1),r.length||delete this._watchers[t.folderPath]}let n=t.filePath||t.folderPath;this._roots.has(n)&&(this._watchersRestorable[n]=t,this._watchersRestoreTimeout||(this._watchersRestoreTimeout=Zl.lang.defer(()=>this.watchersRestore())))}watcherExists(t,r,n,i){if(this._watchers[t]?.find(a=>a.handler===n&&(!a.filePath||a.filePath===i)&&a.options.ignore===r.ignore&&!!a.options.native==!!r.native&&(!r.recursive||a.options.recursive)))return!0;let s=z4e.default.dirname(t);for(let a=1;a<1/0;a++){if(this._watchers[s]?.find(l=>(a===1||l.options.recursive&&a<=(l.options.depth??hPe))&&l.handler===n&&(!l.filePath||l.filePath===i)&&l.options.ignore===r.ignore&&!!l.options.native==!!r.native&&(!r.recursive||l.options.recursive&&gPe&&l.options.native!==!1)))return!0;if(!gPe)break;let u=z4e.default.dirname(t);if(s===u)break;s=u}return!1}async watchDirectories(t,r,n,i,o){if(this.isClosed())return;t=Zl.lang.uniq(t).sort();let s;for(let a of t)if(!this.isIgnored(a,r.ignore)&&!this.watcherExists(a,r,n,i))try{let c=!r.recursive||gPe&&r.native!==!1?r:{...r,recursive:!1},l={watcher:cri.default.watch(a,c),handler:n,options:r,folderPath:a,filePath:i},p=s=await this.watcherAdd(l,o);if(this._roots.has(i||a)){let f={...r,ignoreInitial:!0,recursive:!1},m=z4e.default.dirname(a),g=a;await this.watchDirectories([m],f,n,g,p)}}catch(c){this.error(c)}return s}async watchDirectory(t,r,n,i,o){if(!this.isClosed()&&!this.isIgnored(t,r.ignore)){if(!r.recursive||gPe&&r.native!==!1)return this.watchersLock(()=>this.watchDirectories([t],r,n,i,o));{r={...r,recursive:!0};let s=r.depth??hPe,a=r.limit??rqt,[c]=await Zl.fs.readdir(t,r.ignore,s,a,this._closeSignal,r.readdirMap);return this.watchersLock(async()=>{let u=await this.watchDirectories([t],r,n,i,o);if(c.length){let l=Zl.fs.getDepth(t);for(let p of c){let d=Zl.fs.getDepth(p),f=Math.max(0,s-(d-l)),m={...r,depth:f};await this.watchDirectories([p],m,n,i,o||u)}}})}}}async watchFileOnce(t,r,n){if(this.isClosed()||(r={...r,ignoreInitial:!1},this.subwatcherExists(t,r)))return;let i={targetPath:t,options:r},o=(u,l)=>{l===t&&(c(),n())},s=new e(o),a=()=>{this._subwatchers.add(i),this.on(rN.CLOSE,c),s.watchFile(t,r,o)},c=()=>{this._subwatchers.delete(i),this.removeListener(rN.CLOSE,c),s.close()};return a()}async watchFile(t,r,n){if(this.isClosed()||this.isIgnored(t,r.ignore))return;r={...r,recursive:!1};let i=z4e.default.dirname(t);return this.watchDirectory(i,r,n,t)}async watchPollingOnce(t,r,n){if(this.isClosed())return;let i=!1,o=new jZo,s=await this.watchPolling(t,r,async()=>{i||!(await o.update(t,r.pollingTimeout)).length||i||(i=!0,s(),n())})}async watchPolling(t,r,n){if(this.isClosed())return Zl.lang.noop;if(this.pollerExists(t,r))return Zl.lang.noop;let i={...r,interval:r.pollingInterval??rpl},o={targetPath:t,options:r},s=()=>{this._pollers.add(o),this.on(rN.CLOSE,a),cri.default.watchFile(t,i,n)},a=()=>{this._pollers.delete(o),this.removeListener(rN.CLOSE,a),cri.default.unwatchFile(t,n)};return Zl.lang.attempt(s),()=>Zl.lang.attempt(a)}async watchUnknownChild(t,r,n){if(this.isClosed())return;let i=()=>this.watchPath(t,r,n);return this.watchFileOnce(t,r,i)}async watchUnknownTarget(t,r,n){if(this.isClosed())return;let i=()=>this.watchPath(t,r,n);return this.watchPollingOnce(t,r,i)}async watchPaths(t,r,n){if(this.isClosed())return;if(t=Zl.lang.uniq(t).sort(),t.every((o,s)=>t.every((a,c)=>c===s||!Zl.fs.isSubPath(o,a))))await Promise.all(t.map(o=>this.watchPath(o,r,n)));else for(let o of t)await this.watchPath(o,r,n)}async watchPath(t,r,n){if(this.isClosed()||(t=z4e.default.resolve(t),this.isIgnored(t,r.ignore)))return;let i=await Zl.fs.poll(t,r.pollingTimeout);if(i){if(i.isFile())return this.watchFile(t,r,n);if(i.isDirectory())return this.watchDirectory(t,r,n);this.error(`"${t}" is not supported`)}else{let o=z4e.default.dirname(t);return(await Zl.fs.poll(o,r.pollingTimeout))?.isDirectory()?this.watchUnknownChild(t,r,n):this.watchUnknownTarget(t,r,n)}}async watch(t,r,n=Zl.lang.noop){if(Zl.lang.isFunction(t))return this.watch([],{},t);if(Zl.lang.isUndefined(t))return this.watch([],r,n);if(Zl.lang.isFunction(r))return this.watch(t,{},r);if(Zl.lang.isUndefined(r))return this.watch(t,{},n);if(this.isClosed())return;this.isReady()&&(r.readdirMap=void 0);let i=Zl.lang.castArray(t);i.forEach(o=>this._roots.add(o)),await this.watchPaths(i,r,n),!this.isClosed()&&(n!==Zl.lang.noop&&this.on(rN.ALL,n),r.readdirMap=void 0,this.ready())}},ypl=QZo;function yuh(e){return"code"in e&&typeof e.code=="string"}function bpl(e){return e instanceof Error?e:new Error(String(e))}function Epl(e){return yuh(e)&&e.code==="ENOSPC"?"Unable to watch Fern docs files for changes because the system limit for file watchers was reached. Close other file-watching processes or increase the file watcher limit, then restart `fern docs dev`.":`Unable to watch Fern docs files for changes: ${e.message}`}async function uri({absoluteFilePathToFern:e,additionalFilepaths:t,context:r}){let n=new ypl([e,...t],{recursive:!0,ignoreInitial:!0,debounce:100,renameDetection:!0}),i=await new Promise(o=>{let s=()=>{n.off("error",a),o(void 0)},a=c=>{n.off("ready",s),o(bpl(c))};n.once("ready",s),n.once("error",a)});return i!=null&&(n.close(),r.failAndThrow(Epl(i),i,{code:P.Code.EnvironmentError})),n.on("error",o=>{let s=bpl(o);r.failWithoutThrowing(Epl(s),s,{code:P.Code.EnvironmentError}),n.close()}),n}Zt();iC();Qt();En();var vAl=require("child_process"),vni=be(WZo(),1),xAl=be(oes(),1),GE=require("fs"),GB=require("fs/promises"),CAl=require("os"),oN=be(require("path"),1),wAl=be(lE(),1),SAl=be(IAl(),1),H4e=process.platform==="win32",Ini=fe.cyan("[docs]:"),Kdh="etag",Jdh=23,ges=e=>e.padEnd(Jdh," "),Ydh="preview",Xdh="app-preview",Zdh="bundle",$dh=".next",emh="standalone",tmh=".fern",rmh="packages/fern-docs/bundle/.next/server/instrumentation.js",nmh='Cannot find matching keyid: {"signatures":',imh="ERR_PNPM_IGNORED_BUILDS";function omh(e){try{let r=(0,vAl.execSync)('reg query "HKLM\\SYSTEM\\CurrentControlSet\\Control\\FileSystem" /v LongPathsEnabled',{encoding:"utf-8",timeout:5e3}).match(/LongPathsEnabled\s+REG_DWORD\s+0x(\d+)/i);if(r!=null&&r[1]==="1")return}catch(t){e.debug(`Registry query for LongPathsEnabled failed: ${t}`)}throw new P({message:`Windows long path support is not enabled. The docs bundle contains deeply nested .pnpm paths that exceed the 260-character MAX_PATH limit.
3669
3669
 
@@ -4246,7 +4246,7 @@ Please ensure you have membership at https://dashboard.buildwithfern.com, and as
4246
4246
  `);i.failAndThrow(s!=null?`No docs instance found matching '${s}'.
4247
4247
 
4248
4248
  Available instances:
4249
- ${I}`:"No docs instance found. Failed to register.",void 0,{code:P.Code.ConfigError});return}let E=(typeof y.customDomain=="string"?[y.customDomain]:y.customDomain??[]).map(Rjl);kjl(y.url,E,i),i.logger.info(`Starting docs publishing for ${a?"preview":"production"}: ${y.url}`),i.logger.debug(`Organization: ${e}, Preview: ${a}, APIs: ${t.length}, OSS: ${r.length}`);let v;return await i.runInteractiveTask({name:y.url},async()=>{let I=performance.now(),C=()=>HUl({docsWorkspace:n,customDomains:E,domain:y.url,token:o,organization:e,context:i,apiWorkspaces:t,ossWorkspaces:r,preview:a,previewId:c,editThisPage:y.editThisPage,disableTemplates:u,skipUpload:l,withAiExamples:n.config.aiExamples?.enabled??n.config.experimental?.aiExamples??!0,excludeApis:n.config.experimental?.excludeApis??!1,targetAudiences:y.audiences?Array.isArray(y.audiences)?y.audiences:[y.audiences]:void 0,docsUrl:y.url,cliVersion:p,ciSource:d,deployerAuthor:f,loginCommand:m,multiSource:y.multiSource??!1});for(let O=0;;O++)try{v=await C();break}catch(D){if(!(D instanceof Dvt)||O>=LWt.length){if(D instanceof Dvt)return i.failAndThrow("Another docs publish is currently in progress. Please try again once the other publish is complete.",void 0,{code:P.Code.NetworkError});throw D}let S=LWt[O]??LWt[LWt.length-1]??6e4,z=S/6e4;i.logger.warn(`Another docs publish is in progress. Retrying in ${z} minute${z===1?"":"s"} (attempt ${O+1}/${LWt.length})...`),await new Promise(K=>setTimeout(K,S))}let w=performance.now()-I;i.logger.debug(`Docs publishing completed in ${w.toFixed(0)}ms`)}),v}Qt();var Bfi=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 sd({context:this.context,task:this.task});try{let s=await UWt({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.80.1",loginCommand:"fern auth login"});return o.getResult()===Rf.Failure?{success:!1}:{success:!0,url:s}}catch(s){return{success:!1,error:Mn(s)}}}};Dt();En();var Rvt=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(`
4249
+ ${I}`:"No docs instance found. Failed to register.",void 0,{code:P.Code.ConfigError});return}let E=(typeof y.customDomain=="string"?[y.customDomain]:y.customDomain??[]).map(Rjl);kjl(y.url,E,i),i.logger.info(`Starting docs publishing for ${a?"preview":"production"}: ${y.url}`),i.logger.debug(`Organization: ${e}, Preview: ${a}, APIs: ${t.length}, OSS: ${r.length}`);let v;return await i.runInteractiveTask({name:y.url},async()=>{let I=performance.now(),C=()=>HUl({docsWorkspace:n,customDomains:E,domain:y.url,token:o,organization:e,context:i,apiWorkspaces:t,ossWorkspaces:r,preview:a,previewId:c,editThisPage:y.editThisPage,disableTemplates:u,skipUpload:l,withAiExamples:n.config.aiExamples?.enabled??n.config.experimental?.aiExamples??!0,excludeApis:n.config.experimental?.excludeApis??!1,targetAudiences:y.audiences?Array.isArray(y.audiences)?y.audiences:[y.audiences]:void 0,docsUrl:y.url,cliVersion:p,ciSource:d,deployerAuthor:f,loginCommand:m,multiSource:y.multiSource??!1});for(let O=0;;O++)try{v=await C();break}catch(D){if(!(D instanceof Dvt)||O>=LWt.length){if(D instanceof Dvt)return i.failAndThrow("Another docs publish is currently in progress. Please try again once the other publish is complete.",void 0,{code:P.Code.NetworkError});throw D}let S=LWt[O]??LWt[LWt.length-1]??6e4,z=S/6e4;i.logger.warn(`Another docs publish is in progress. Retrying in ${z} minute${z===1?"":"s"} (attempt ${O+1}/${LWt.length})...`),await new Promise(K=>setTimeout(K,S))}let w=performance.now()-I;i.logger.debug(`Docs publishing completed in ${w.toFixed(0)}ms`)}),v}Qt();var Bfi=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 sd({context:this.context,task:this.task});try{let s=await UWt({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.80.2",loginCommand:"fern auth login"});return o.getResult()===Rf.Failure?{success:!1}:{success:!0,url:s}}catch(s){return{success:!1,error:Mn(s)}}}};Dt();En();var Rvt=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(`
4250
4250
  `),this.stream.write(`${fe.cyan("\u25C6")} ${fe.bold(t.title)}
4251
4251
  `),t.subtitle!=null&&this.stream.write(` ${fe.dim(t.subtitle)}
4252
4252
  `),this.stream.write(`
@@ -4900,7 +4900,7 @@ ${r}`}function dbi(e){let t=this,{emitParseErrors:r,...n}={...t.data("settings")
4900
4900
  `),g="";return c&&(g=l.style.error(c)),[`${p} ${f} ${s}`,[m,g].filter(Boolean).join(`
4901
4901
  `)]});var DUg=yx((e,t)=>{let{validate:r=()=>!0}=e,n=oI(e.theme),[i,o]=Zc("idle"),[s,a]=Zc(),[c,u]=Zc(""),l=gx({status:i,theme:n});Ax(async(g,A)=>{if(i==="idle")if(hx(g)){let y=c;o("loading");let E=await r(y);E===!0?(u(y),o("done"),t(y)):(A.write(c),a(E||"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]")}${Kwt}`),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 e8e=be(kw(),1);var RUg={icon:{cursor:cC.pointer},style:{disabled:e=>e8e.default.dim(`- ${e}`),searchTerm:e=>e8e.default.cyan(e),description:e=>e8e.default.cyan(e),keysHelpTip:e=>e.map(([t,r])=>`${e8e.default.bold(t)} ${e8e.default.dim(r)}`).join(e8e.default.dim(" \u2022 "))},helpMode:"always"};function jFs(e){return!dd.isSeparator(e)&&!e.disabled}function kUg(e){return e.map(t=>{if(dd.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 FUg=yx((e,t)=>{let{pageSize:r=7,validate:n=()=>!0}=e,i=oI(RUg,e.theme),[o,s]=Zc("loading"),[a,c]=Zc(""),[u,l]=Zc([]),[p,d]=Zc(),f=gx({status:o,theme:i}),m=r6(()=>{let z=u.findIndex(jFs),K=u.findLastIndex(jFs);return{first:z,last:K}},[u]),[g=m.first,A]=Zc();t4(()=>{let z=new AbortController;return s("loading"),d(void 0),(async()=>{try{let Y=await e.source(a||void 0,{signal:z.signal});z.signal.aborted||(A(void 0),d(void 0),l(kUg(Y)),s("idle"))}catch(Y){!z.signal.aborted&&Y instanceof Error&&d(Y.message)}})(),()=>{z.abort()}},[a]);let y=u[g];Ax(async(z,K)=>{if(hx(z))if(y){s("loading");let Y=await n(y.value);s("idle"),Y===!0?(s("done"),t(y.value)):y.name===a?d(Y||"You must provide a valid value"):(K.write(y.name),c(y.name))}else K.write(a);else if(Nhe(z)&&y)K.clearLine(0),K.write(y.name),c(y.name);else if(o!=="loading"&&(oP(z)||t6(z))){if(K.clearLine(0),oP(z)&&g!==m.first||t6(z)&&g!==m.last){let Y=oP(z)?-1:1,Z=g;do Z=(Z+Y+u.length)%u.length;while(!jFs(u[Z]));A(Z)}}else c(K.line)});let E=i.style.message(e.message,o),v;if(i.helpMode!=="never")if(e.instructions){let{pager:z,navigation:K}=e.instructions;v=i.style.help(u.length>r?z:K)}else v=i.style.keysHelpTip([["\u2191\u2193","navigate"],["\u23CE","select"]]);let I=Y5e({items:u,active:g,renderItem({item:z,isActive:K}){if(dd.isSeparator(z))return` ${z.separator}`;if(z.disabled){let ae=typeof z.disabled=="string"?z.disabled:"(disabled)";return i.style.disabled(`${z.name} ${ae}`)}let Y=K?i.style.highlight:ae=>ae,Z=K?i.icon.cursor:" ";return Y(`${Z} ${z.name}`)},pageSize:r,loop:!1}),C;p?C=i.style.error(p):u.length===0&&a!==""&&o==="idle"&&(C=i.style.error("No results found"));let w;if(o==="done"&&y)return[f,E,i.style.answer(y.short)].filter(Boolean).join(" ").trimEnd();w=i.style.searchTerm(a);let O=y?.description,D=[f,E,w].filter(Boolean).join(" ").trimEnd(),S=[C??I," ",O?i.style.description(O):"",v].filter(Boolean).join(`
4902
4902
  `).trimEnd();return[D,S]});var Ywt=be(kw(),1);var NUg={icon:{cursor:cC.pointer},style:{disabled:e=>Ywt.default.dim(`- ${e}`),description:e=>Ywt.default.cyan(e),keysHelpTip:e=>e.map(([t,r])=>`${Ywt.default.bold(t)} ${Ywt.default.dim(r)}`).join(Ywt.default.dim(" \u2022 "))},helpMode:"always",indexMode:"hidden",keybindings:[]};function Jwt(e){return!dd.isSeparator(e)&&!e.disabled}function jUg(e){return e.map(t=>{if(dd.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 QFs=yx((e,t)=>{let{loop:r=!0,pageSize:n=7}=e,i=oI(NUg,e.theme),{keybindings:o}=i,[s,a]=Zc("idle"),c=gx({status:s,theme:i}),u=J5e(),l=!o.includes("vim"),p=r6(()=>jUg(e.choices),[e.choices]),d=r6(()=>{let O=p.findIndex(Jwt),D=p.findLastIndex(Jwt);if(O===-1)throw new vae("[select prompt] No selectable choices. All choices are disabled.");return{first:O,last:D}},[p]),f=r6(()=>"default"in e?p.findIndex(O=>Jwt(O)&&O.value===e.default):-1,[e.default,p]),[m,g]=Zc(f===-1?d.first:f),A=p[m];Ax((O,D)=>{if(clearTimeout(u.current),hx(O))a("done"),t(A.value);else if(oP(O,o)||t6(O,o)){if(D.clearLine(0),r||oP(O,o)&&m!==d.first||t6(O,o)&&m!==d.last){let S=oP(O,o)?-1:1,z=m;do z=(z+S+p.length)%p.length;while(!Jwt(p[z]));g(z)}}else if(dYt(O)&&!Number.isNaN(Number(D.line))){let S=Number(D.line)-1,z=-1,K=p.findIndex(Z=>dd.isSeparator(Z)?!1:(z++,z===S)),Y=p[K];Y!=null&&Jwt(Y)&&g(K),u.current=setTimeout(()=>{D.clearLine(0)},700)}else if(W5e(O))D.clearLine(0);else if(l){let S=D.line.toLowerCase(),z=p.findIndex(K=>dd.isSeparator(K)||!Jwt(K)?!1:K.name.toLowerCase().startsWith(S));z!==-1&&g(z),u.current=setTimeout(()=>{D.clearLine(0)},700)}}),t4(()=>()=>{clearTimeout(u.current)},[]);let y=i.style.message(e.message,s),E;if(i.helpMode!=="never")if(e.instructions){let{pager:O,navigation:D}=e.instructions;E=i.style.help(p.length>n?O:D)}else E=i.style.keysHelpTip([["\u2191\u2193","navigate"],["\u23CE","select"]]);let v=0,I=Y5e({items:p,active:m,renderItem({item:O,isActive:D,index:S}){if(dd.isSeparator(O))return v++,` ${O.separator}`;let z=i.indexMode==="number"?`${S+1-v}. `:"";if(O.disabled){let Z=typeof O.disabled=="string"?O.disabled:"(disabled)";return i.style.disabled(`${z}${O.name} ${Z}`)}let K=D?i.style.highlight:Z=>Z,Y=D?i.icon.cursor:" ";return K(`${Y} ${z}${O.name}`)},pageSize:n,loop:r});if(s==="done")return[c,y,i.style.answer(A.short)].filter(Boolean).join(" ");let{description:C}=A;return`${[[c,y].filter(Boolean).join(" "),I," ",C?i.style.description(C):"",E].filter(Boolean).join(`
4903
- `).trimEnd()}${Kwt}`});En();qi();var xae={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"},QUg={[xae.GENERATION_STARTED]:!1,[xae.GENERATION_COMPLETED]:!1,[xae.GENERATION_FAILED]:!0,[xae.VERIFICATION_FAILED]:!0,[xae.SDK_PR_CREATED]:!1,[xae.UPGRADE_APPLIED]:!1,[xae.MAJOR_VERSION_BUMP]:!1};function map(e){return QUg[e]}function hap(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 gap(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 Aap(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 yap(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 bap(e){let t=e.join(" ");return/\bautomations\s+generate\b/.test(t)?xae.GENERATION_FAILED:/\bautomations\s+preview\b/.test(t)?xae.VERIFICATION_FAILED:xae.GENERATION_FAILED}var zUg="",MUg="FERN_AUTOMATION_EVENTS_ORIGIN",LUg=3e3,Jbi=class e{static instance;origin;inflight=[];static getInstance(){return e.instance==null&&(e.instance=new e(process.env[MUg]??zUg)),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(),LUg);try{let s={"content-type":"application/json"},a=await u_();a!=null&&a.value.length>0&&(s.Authorization=`Bearer ${a.value}`);let c=await fetch(n,{method:"POST",headers:s,body:JSON.stringify(yap(t,r)),signal:i.signal})}catch{return}finally{clearTimeout(o)}}};function Eap(){let{fern_run_id:e,github_run_id:t}=ece();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.80.1"}}function Iap(){return process.env.FERN_AUTOMATION==="true"}var Ybi=class{constructor(t,r=Jbi.getInstance()){this.reporter=t;this.automationEventApiClient=r;this.context=Eap()}reporter;automationEventApiClient;context;setOrganization(t){this.context={...this.context,org:t}}emit(t,r){let n=this.captureSentryForFailure({event:t,context:this.context,error:r?.error}),i=n==null?t:{...t,attributes:{...t.attributes??{},sentry_event_id:n}};this.capturePostHogEvent({event:i,context:this.context}),this.captureAutomationEventApiEvent(i,this.context)}async flush(){await this.automationEventApiClient.shutdown()}capturePostHogEvent({event:t,context:r}){this.reporter.instrumentPostHogAutomationEvent({distinctId:r.run_id??void 0,event:t.event,properties:hap(t,r)})}captureSentryForFailure({event:t,context:r,error:n}){if(!(!map(t.event)||t.errorCode==null))return this.reporter.captureException(n,{tags:gap(t,r),context:{automation:Aap(t,r)}})}captureAutomationEventApiEvent(t,r){this.automationEventApiClient.post(t,r)}};Qt();function Xbi(e,t,r){if(t instanceof tu)return;let n=WFe(t,r?.code),i=r?.argv??process.argv,o=i.join(" "),s=r?.message??(t instanceof Error?t.message:void 0)??"",a=t??new P({message:s,code:n});Iap()?VUg(i,e,n,s,a):UUg(e,o,n,a)}function UUg(e,t,r,n){e.instrumentPostHogEvent({command:t,properties:{failed:!0,errorCode:r}}),gBt(r)&&e.captureException(n,{tags:{"error.code":r}})}function VUg(e,t,r,n,i){let o=bap(e);t.emitAutomationTelemetryEvent({event:o,errorCode:r,attributes:{error_message:n}},{error:i})}Qt();function t8e(){return process.env.FERN_DISABLE_TELEMETRY==="true"}function Zbi({cliName:e,packageVersion:t,isLocal:r}){return t8e()||r?!1:!(t==="0.0.0")&&(e==="fern"&&!0)}var $bi=class{sentry;constructor({release:t,telemetry:r}){let n="https://84f58b5e457f06999d92f11ce4b79158@o4509504076185600.ingest.us.sentry.io/4511021546602496";if(Zbi(r)&&n!=null&&n.length>0){let i="production";if(i==null||i.length===0)throw new P({message:"SENTRY_ENVIRONMENT must be set when SENTRY_DSN is configured",code:P.Code.ConfigError});this.sentry=uBt({dsn:n,release:t,environment:i,defaultIntegrations:!1,integrations:[H9e(),Mge(),Lge(),xge(),zge()],tracesSampleRate:0,attachStacktrace:!0,sendClientReports:!1}),lBt()}}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):lO(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(()=>{})}};Qt();var e0i=class{originalWrite;redirected=!1;redirect(){if(this.redirected)throw new P({message:"StdoutRedirector: already redirected \u2014 did you forget to restore()?",code:P.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()}}};Ape();Dt();Ab();Qt();En();var AYt=class{result=Rf.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 tu}failWithoutThrowing(t,r,n){this.result=Rf.Failure,!(r instanceof tu)&&(t!=null&&(this.lastFailureMessage=t),UMt({message:t,error:r,logger:this.logger}),Xbi(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=lv(this.logAtLevel.bind(this));addInteractiveTask({name:t,subtitle:r}){let n=new zFs({name:t,subtitle:r,logImmediately:i=>this.logImmediately(i),logPrefix:`${this.logPrefix}${fe.blackBright(t)} `,takeOverTerminal:this.takeOverTerminal,onResult:this.onResult,shouldBufferLogs:this.shouldBufferLogs,instrumentPostHogEvent:i=>this.instrumentPostHogEventImpl(i),captureException:this.captureExceptionImpl,emitAutomationTelemetryEvent:this.emitAutomationTelemetryEventImpl});return this.subtasks.push(n),n}async runInteractiveTask(t,r){let n=this.addInteractiveTask(t).start();try{await r(n)}catch(i){n.failWithoutThrowing(void 0,i)}finally{n.finish()}return n.getResult()===Rf.Success}printInteractiveTasks({spinner:t}){return this.subtasks.map(r=>r.print({spinner:t})).join(`
4903
+ `).trimEnd()}${Kwt}`});En();qi();var xae={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"},QUg={[xae.GENERATION_STARTED]:!1,[xae.GENERATION_COMPLETED]:!1,[xae.GENERATION_FAILED]:!0,[xae.VERIFICATION_FAILED]:!0,[xae.SDK_PR_CREATED]:!1,[xae.UPGRADE_APPLIED]:!1,[xae.MAJOR_VERSION_BUMP]:!1};function map(e){return QUg[e]}function hap(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 gap(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 Aap(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 yap(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 bap(e){let t=e.join(" ");return/\bautomations\s+generate\b/.test(t)?xae.GENERATION_FAILED:/\bautomations\s+preview\b/.test(t)?xae.VERIFICATION_FAILED:xae.GENERATION_FAILED}var zUg="",MUg="FERN_AUTOMATION_EVENTS_ORIGIN",LUg=3e3,Jbi=class e{static instance;origin;inflight=[];static getInstance(){return e.instance==null&&(e.instance=new e(process.env[MUg]??zUg)),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(),LUg);try{let s={"content-type":"application/json"},a=await u_();a!=null&&a.value.length>0&&(s.Authorization=`Bearer ${a.value}`);let c=await fetch(n,{method:"POST",headers:s,body:JSON.stringify(yap(t,r)),signal:i.signal})}catch{return}finally{clearTimeout(o)}}};function Eap(){let{fern_run_id:e,github_run_id:t}=ece();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.80.2"}}function Iap(){return process.env.FERN_AUTOMATION==="true"}var Ybi=class{constructor(t,r=Jbi.getInstance()){this.reporter=t;this.automationEventApiClient=r;this.context=Eap()}reporter;automationEventApiClient;context;setOrganization(t){this.context={...this.context,org:t}}emit(t,r){let n=this.captureSentryForFailure({event:t,context:this.context,error:r?.error}),i=n==null?t:{...t,attributes:{...t.attributes??{},sentry_event_id:n}};this.capturePostHogEvent({event:i,context:this.context}),this.captureAutomationEventApiEvent(i,this.context)}async flush(){await this.automationEventApiClient.shutdown()}capturePostHogEvent({event:t,context:r}){this.reporter.instrumentPostHogAutomationEvent({distinctId:r.run_id??void 0,event:t.event,properties:hap(t,r)})}captureSentryForFailure({event:t,context:r,error:n}){if(!(!map(t.event)||t.errorCode==null))return this.reporter.captureException(n,{tags:gap(t,r),context:{automation:Aap(t,r)}})}captureAutomationEventApiEvent(t,r){this.automationEventApiClient.post(t,r)}};Qt();function Xbi(e,t,r){if(t instanceof tu)return;let n=WFe(t,r?.code),i=r?.argv??process.argv,o=i.join(" "),s=r?.message??(t instanceof Error?t.message:void 0)??"",a=t??new P({message:s,code:n});Iap()?VUg(i,e,n,s,a):UUg(e,o,n,a)}function UUg(e,t,r,n){e.instrumentPostHogEvent({command:t,properties:{failed:!0,errorCode:r}}),gBt(r)&&e.captureException(n,{tags:{"error.code":r}})}function VUg(e,t,r,n,i){let o=bap(e);t.emitAutomationTelemetryEvent({event:o,errorCode:r,attributes:{error_message:n}},{error:i})}Qt();function t8e(){return process.env.FERN_DISABLE_TELEMETRY==="true"}function Zbi({cliName:e,packageVersion:t,isLocal:r}){return t8e()||r?!1:!(t==="0.0.0")&&(e==="fern"&&!0)}var $bi=class{sentry;constructor({release:t,telemetry:r}){let n="https://84f58b5e457f06999d92f11ce4b79158@o4509504076185600.ingest.us.sentry.io/4511021546602496";if(Zbi(r)&&n!=null&&n.length>0){let i="production";if(i==null||i.length===0)throw new P({message:"SENTRY_ENVIRONMENT must be set when SENTRY_DSN is configured",code:P.Code.ConfigError});this.sentry=uBt({dsn:n,release:t,environment:i,defaultIntegrations:!1,integrations:[H9e(),Mge(),Lge(),xge(),zge()],tracesSampleRate:0,attachStacktrace:!0,sendClientReports:!1}),lBt()}}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):lO(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(()=>{})}};Qt();var e0i=class{originalWrite;redirected=!1;redirect(){if(this.redirected)throw new P({message:"StdoutRedirector: already redirected \u2014 did you forget to restore()?",code:P.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()}}};Ape();Dt();Ab();Qt();En();var AYt=class{result=Rf.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 tu}failWithoutThrowing(t,r,n){this.result=Rf.Failure,!(r instanceof tu)&&(t!=null&&(this.lastFailureMessage=t),UMt({message:t,error:r,logger:this.logger}),Xbi(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=lv(this.logAtLevel.bind(this));addInteractiveTask({name:t,subtitle:r}){let n=new zFs({name:t,subtitle:r,logImmediately:i=>this.logImmediately(i),logPrefix:`${this.logPrefix}${fe.blackBright(t)} `,takeOverTerminal:this.takeOverTerminal,onResult:this.onResult,shouldBufferLogs:this.shouldBufferLogs,instrumentPostHogEvent:i=>this.instrumentPostHogEventImpl(i),captureException:this.captureExceptionImpl,emitAutomationTelemetryEvent:this.emitAutomationTelemetryEventImpl});return this.subtasks.push(n),n}async runInteractiveTask(t,r){let n=this.addInteractiveTask(t).start();try{await r(n)}catch(i){n.failWithoutThrowing(void 0,i)}finally{n.finish()}return n.getResult()===Rf.Success}printInteractiveTasks({spinner:t}){return this.subtasks.map(r=>r.print({spinner:t})).join(`
4904
4904
  `)}},zFs=class extends AYt{name;subtitle;constructor({name:t,subtitle:r,...n}){super(n),this.name=t,this.subtitle=r}start(){return super.start(),this.logAtLevelWithOverrides(Un.Info,["Started."],{omitOnTTY:!0}),this.flushLogs(),this}isStarted(){return this.status!=="notStarted"}finish(){this.status!=="finished"&&(this.result===Rf.Success?this.logAtLevelWithOverrides(Un.Info,["Finished."],{omitOnTTY:!0}):this.logAtLevelWithOverrides(Un.Error,["Failed."],{omitOnTTY:!0}),super.finish())}setSubtitle(t){this.subtitle=t}print({spinner:t}){let r=[this.name];return this.subtitle!=null&&r.push(fe.dim(this.subtitle)),r.push(...this.subtasks.map(n=>n.print({spinner:t}))),ej({prefix:this.getIcon({spinner:t}),content:r.join(`
4905
4905
  `)})}printInteractiveTasks({spinner:t}){return this.print({spinner:t})}getIcon({spinner:t}){let r=this.subtasks.length>0;switch(this.status){case"notStarted":return r?fe.dim("\u25B8 "):fe.dim("\u25E6 ");case"running":return r?fe.cyan("\u25BE "):t;case"finished":switch(this.getResult()){case Rf.Success:return r?fe.green("\u25BE "):fe.green("\u2713 ");case Rf.Failure:return r?fe.red("\u25BE "):fe.red("x ")}}}getResult(){if(this.result===Rf.Failure)return Rf.Failure;for(let t of this.subtasks)if(t.getResult()===Rf.Failure)return Rf.Failure;return Rf.Success}};Qt();var vap=be(Rze(),1);En();function xap(e){return e.filter(t=>t.isUpgradeAvailable).length>0}function _Ug(e){return(e.cliUpgradeInfo?.isUpgradeAvailable??!1)||xap(e.generatorUpgradeInfo)}async function Cap({cliEnvironment:e,upgradeInfo:t}){if(!_Ug(t)||e.packageVersion==t.cliUpgradeInfo?.latestVersion)return;let r=`${fe.underline("Upgrades available")}
4906
4906
 
@@ -4909,7 +4909,7 @@ ${r}`}function dbi(e){let t=this,{emitParseErrors:r,...n}={...t.data("settings")
4909
4909
  Run ${fe.cyan("fern generator upgrade")} to upgrade your generators.`),i.length>2&&(r+=`
4910
4910
  Run ${fe.cyan("fern generator upgrade --list")} to see the full list of generator upgrades available.`),cit(r,{padding:1,float:"center",textAlignment:"center",borderColor:"yellow",borderStyle:"round"})}async function MFs({generatorUpgradeInfo:e,header:t,limit:r,includeBoxen:n=!0}){if(!xap(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+=`
4911
4911
  ${await qUg(a.generatorName)} (${a.apiName!=null?"API: "+a.apiName+", ":""}Group: ${a.generatorGroup}) `+fe.dim(a.currentVersion)+fe.reset(" \u2192 ")+fe.green(a.latestVersion);return i+=`
4912
- `,n?cit(i,{padding:1,float:"center",textAlignment:"center",borderColor:"yellow",borderStyle:"round"}):i}async function qUg(e){let r=await new vap.FernRegistryClient({environment:"https://registry.buildwithfern.com"}).generators.getGeneratorByImage({dockerImage:e});if(!r.ok||r.body==null)throw new P({message:`Generator ${e} not found`,code:P.Code.ConfigError});return r.body.displayName}Qo();rIe();Qt();async function GUg({cliContext:e,project:{apiWorkspaces:t},generatorFilter:r,groupFilter:n,channel:i,includeMajor:o}){if(t.length===1){let a={type:"singleApi",versions:{}};return await wap({cliContext:e,apiWorkspaces:t,perGeneratorAction:async(c,u,l,p)=>{a.versions[u]==null&&(a.versions[u]={});let d=vze(l.name);if(d==null){p.logger.debug(`Skipping unknown generator: ${l.name}`);return}let f=await a1({generatorName:d,cliVersion:e.environment.packageVersion,currentGeneratorVersion:l.version,channel:i,includeMajor:o,context:p});f!=null&&(a.versions[u][l.name]={previousVersion:l.version,latestVersion:f})},generatorFilter:r,groupFilter:n}),a}let s={type:"multiApi",versions:{}};return await wap({cliContext:e,apiWorkspaces:t,perGeneratorAction:async(a,c,u,l)=>{if(a==null)return;s.versions[a]==null&&(s.versions[a]={}),s.versions[a][c]==null&&(s.versions[a][c]={});let p=vze(u.name);if(p==null){l.logger.debug(`Skipping unknown generator: ${u.name}`);return}let d=await a1({generatorName:p,cliVersion:e.environment.packageVersion,currentGeneratorVersion:u.version,channel:i,includeMajor:o,context:l});d!=null&&(s.versions[a][c][u.name]={previousVersion:u.version,latestVersion:d})},generatorFilter:r,groupFilter:n}),s}async function wap({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 bL({absolutePathToWorkspace:o.absoluteFilePath,context:s});if(a==null||a.groups==null)return;let c=n!=null?BA(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 Sap(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;try{c=bQ(a.latestVersion,a.previousVersion)}catch{throw new P({message:`Generator "${s}" has an invalid version "${a.previousVersion}" in generators.yml. Use an exact version like 1.2.3.`,code:P.Code.ConfigError})}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 t0i({project:e,cliContext:t,generatorFilter:r,groupFilter:n,channel:i,includeMajor:o}){let s=[];if(e!=null){let a=await GUg({cliContext:t,project:e,generatorFilter:r,groupFilter:n,channel:i,includeMajor:o});if(a.type==="multiApi")for(let[c,u]of Object.entries(a.versions))s.push(...Sap(u,c,t.logger));else s.push(...Sap(a.versions,void 0,t.logger))}return s}Qt();Q8i();async function jhe({cliEnvironment:e,includePreReleases:t=!1}){if(e.packageName!=="fern-api"||e.packageVersion==="0.0.0")return e.packageVersion;try{return await dRt(e.packageName,{version:t?"prerelease":"latest"})}catch(r){throw new P({message:`Failed to resolve latest CLI version: ${r instanceof Error?r.message:String(r)}`,code:P.Code.NetworkError})}}var Tap=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],r0i=class e{environment;sentryClient;posthogManager;automationTelemetryManager;didSucceed=!0;numTasks=0;ttyAwareLogger;logLevel=Un.Info;isLocal;stdoutRedirector=new e0i;jsonMode=!1;static async create(t,r,{isLocal:n}){let i=await kUt();return new e(t,r,{isLocal:n,posthogManager:i})}constructor(t,r,{isLocal:n,posthogManager:i}){this.ttyAwareLogger=new i6t(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 $bi({release:`cli@${this.environment.packageVersion}`,telemetry:{cliName:this.environment.cliName,packageVersion:this.environment.packageVersion,isLocal:this.isLocal}}),this.automationTelemetryManager=new Ybi(this)}getPackageName(){return"fern-api"}getPackageVersion(){return"5.80.1"}getCliName(){return"fern"}setLogLevel(t){this.logLevel=t}logFernVersionDebug(){this.logger.debug(`Running ${fe.bold(`${this.environment.cliName}`)} (${this.environment.packageName}@${this.environment.packageVersion})`)}failAndThrow(t,r,n){throw this.failWithoutThrowing(t,r,n),new tu}failWithoutThrowing(t,r,n){this.didSucceed=!1,!(r instanceof tu)&&(UMt({message:t,error:r,logger:this.logger}),Xbi(this,r,{...n,message:t}))}enableJsonMode(){this.jsonMode||(this.jsonMode=!0,this.stdoutRedirector.redirect())}get isJsonMode(){return this.jsonMode}writeJsonToStdout(t){this.stdoutRedirector.restore(),process.stdout.write(JSON.stringify(t,null,2)+`
4912
+ `,n?cit(i,{padding:1,float:"center",textAlignment:"center",borderColor:"yellow",borderStyle:"round"}):i}async function qUg(e){let r=await new vap.FernRegistryClient({environment:"https://registry.buildwithfern.com"}).generators.getGeneratorByImage({dockerImage:e});if(!r.ok||r.body==null)throw new P({message:`Generator ${e} not found`,code:P.Code.ConfigError});return r.body.displayName}Qo();rIe();Qt();async function GUg({cliContext:e,project:{apiWorkspaces:t},generatorFilter:r,groupFilter:n,channel:i,includeMajor:o}){if(t.length===1){let a={type:"singleApi",versions:{}};return await wap({cliContext:e,apiWorkspaces:t,perGeneratorAction:async(c,u,l,p)=>{a.versions[u]==null&&(a.versions[u]={});let d=vze(l.name);if(d==null){p.logger.debug(`Skipping unknown generator: ${l.name}`);return}let f=await a1({generatorName:d,cliVersion:e.environment.packageVersion,currentGeneratorVersion:l.version,channel:i,includeMajor:o,context:p});f!=null&&(a.versions[u][l.name]={previousVersion:l.version,latestVersion:f})},generatorFilter:r,groupFilter:n}),a}let s={type:"multiApi",versions:{}};return await wap({cliContext:e,apiWorkspaces:t,perGeneratorAction:async(a,c,u,l)=>{if(a==null)return;s.versions[a]==null&&(s.versions[a]={}),s.versions[a][c]==null&&(s.versions[a][c]={});let p=vze(u.name);if(p==null){l.logger.debug(`Skipping unknown generator: ${u.name}`);return}let d=await a1({generatorName:p,cliVersion:e.environment.packageVersion,currentGeneratorVersion:u.version,channel:i,includeMajor:o,context:l});d!=null&&(s.versions[a][c][u.name]={previousVersion:u.version,latestVersion:d})},generatorFilter:r,groupFilter:n}),s}async function wap({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 bL({absolutePathToWorkspace:o.absoluteFilePath,context:s});if(a==null||a.groups==null)return;let c=n!=null?BA(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 Sap(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;try{c=bQ(a.latestVersion,a.previousVersion)}catch{throw new P({message:`Generator "${s}" has an invalid version "${a.previousVersion}" in generators.yml. Use an exact version like 1.2.3.`,code:P.Code.ConfigError})}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 t0i({project:e,cliContext:t,generatorFilter:r,groupFilter:n,channel:i,includeMajor:o}){let s=[];if(e!=null){let a=await GUg({cliContext:t,project:e,generatorFilter:r,groupFilter:n,channel:i,includeMajor:o});if(a.type==="multiApi")for(let[c,u]of Object.entries(a.versions))s.push(...Sap(u,c,t.logger));else s.push(...Sap(a.versions,void 0,t.logger))}return s}Qt();Q8i();async function jhe({cliEnvironment:e,includePreReleases:t=!1}){if(e.packageName!=="fern-api"||e.packageVersion==="0.0.0")return e.packageVersion;try{return await dRt(e.packageName,{version:t?"prerelease":"latest"})}catch(r){throw new P({message:`Failed to resolve latest CLI version: ${r instanceof Error?r.message:String(r)}`,code:P.Code.NetworkError})}}var Tap=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],r0i=class e{environment;sentryClient;posthogManager;automationTelemetryManager;didSucceed=!0;numTasks=0;ttyAwareLogger;logLevel=Un.Info;isLocal;stdoutRedirector=new e0i;jsonMode=!1;static async create(t,r,{isLocal:n}){let i=await kUt();return new e(t,r,{isLocal:n,posthogManager:i})}constructor(t,r,{isLocal:n,posthogManager:i}){this.ttyAwareLogger=new i6t(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 $bi({release:`cli@${this.environment.packageVersion}`,telemetry:{cliName:this.environment.cliName,packageVersion:this.environment.packageVersion,isLocal:this.isLocal}}),this.automationTelemetryManager=new Ybi(this)}getPackageName(){return"fern-api"}getPackageVersion(){return"5.80.2"}getCliName(){return"fern"}setLogLevel(t){this.logLevel=t}logFernVersionDebug(){this.logger.debug(`Running ${fe.bold(`${this.environment.cliName}`)} (${this.environment.packageName}@${this.environment.packageVersion})`)}failAndThrow(t,r,n){throw this.failWithoutThrowing(t,r,n),new tu}failWithoutThrowing(t,r,n){this.didSucceed=!1,!(r instanceof tu)&&(UMt({message:t,error:r,logger:this.logger}),Xbi(this,r,{...n,message:t}))}enableJsonMode(){this.jsonMode||(this.jsonMode=!0,this.stdoutRedirector.redirect())}get isJsonMode(){return this.jsonMode}writeJsonToStdout(t){this.stdoutRedirector.restore(),process.stdout.write(JSON.stringify(t,null,2)+`
4913
4913
  `),this.jsonMode&&this.stdoutRedirector.redirect()}async exit({code:t}={}){!this._suppressUpgradeMessage&&!this.isLocal&&await this.nudgeUpgradeIfAvailable(),this.ttyAwareLogger.finish();try{await this.posthogManager.flush()}catch{}await this.sentryClient.flush(),await this.automationTelemetryManager.flush(),this.exitProgram({code:t})}async nudgeUpgradeIfAvailable(){try{let t=await Promise.race([this.isUpgradeAvailable(),new Promise((n,i)=>setTimeout(()=>i("Request timed out"),300))]),r=await Cap({cliEnvironment:this.environment,upgradeInfo:t});r!=null&&(r.endsWith(`
4914
4914
  `)||(r+=`
4915
4915
  `),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=vDi(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 AYt(t);return this.ttyAwareLogger.registerTask(r),r}USE_NODE_18_OR_ABOVE_MESSAGE="The Fern CLI requires Node 18+ or above.";async runTaskWithInit(t,r){let n=this.addTaskWithInit(t).start(),i;try{i=await r(n)}catch(o){throw n.failWithoutThrowing(void 0,o),new tu}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=lv((t,...r)=>this.log(t,...r));stderr=lv((t,...r)=>this.logStderr(t,...r));constructTaskInitForWorkspace(t){let r=t.type==="docs"?"docs":t.workspaceName??"api",n=Oap(r),i=1+(this.longestWorkspaceName!=null?Oap(this.longestWorkspaceName):n).length,o=n.padEnd(i),s=Tap[this.numTasks++%Tap.length],a=fe.hex(s)(o);return{...this.constructTaskInit(),logPrefix:a,title:fe.hex(s).bold(r)}}constructTaskInit(){return{logImmediately:t=>this.logImmediately(t),takeOverTerminal:t=>this.ttyAwareLogger.takeOverTerminal(t),onResult:t=>{t===Rf.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=>nw.indexOf(i.level)>=nw.indexOf(this.logLevel));this.ttyAwareLogger.log(n,{includeDebugInfo:this.logLevel===Un.Debug,stderr:r||this.jsonMode})}_suppressUpgradeMessage=!1;suppressUpgradeMessage(){this._suppressUpgradeMessage=!0}_isUpgradeAvailable;async isUpgradeAvailable({includePreReleases:t=!1}={}){if(this._isUpgradeAvailable==null){this.logger.debug(`Checking if ${this.environment.packageName} upgrade is available...`);let r=await jhe({cliEnvironment:this.environment,includePreReleases:t}),n=bQ(r,this.environment.packageVersion);this.logger.debug(`Latest version: ${r}. `+(n?"Upgrade available.":"No upgrade available."));let i={isUpgradeAvailable:n,latestVersion:r},o=await t0i({project:this.project,cliContext:this});this._isUpgradeAvailable={cliUpgradeInfo:i,generatorUpgradeInfo:o}}return this._isUpgradeAvailable}async confirmPrompt(t,r=!1){try{return await QFs({message:t,choices:[{name:"No",value:!1},{name:"Yes",value:!0}],default:r,theme:{prefix:fe.yellow("?"),style:{answer:i=>fe.cyan(i),message:i=>fe.bold(i),highlight:i=>fe.cyan(i)}}})}catch(n){throw n?.name==="ExitPromptError"?(this.logger.info(`